desktop/qa/desktop_lib/test_desktop_lib.cxx |   68 ----------------------------
 vcl/jsdialog/enabled.cxx                    |    3 +
 2 files changed, 3 insertions(+), 68 deletions(-)

New commits:
commit 245c76630f86695234840601e76067388b740de2
Author:     Szymon Kłos <szymon.k...@collabora.com>
AuthorDate: Thu Sep 7 16:25:45 2023 +0200
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Mon Oct 16 17:38:04 2023 +0200

    jsdialog: enable Hyperlink Dialog
    
    - removed old "tunneled window" test for hyperlink dialog
      which cannot work when using jsdialogs
    
    Change-Id: I62b6c568149d4ea4656b23c47f4c79efe61abfb0
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156668
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Attila Szűcs <attila.sz...@collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157022
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx 
b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index 186a18b0a03b..dcb5c7192782 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -211,8 +211,6 @@ public:
     void testComplexSelection();
     void testSpellcheckerMultiView();
     void testDialogPaste();
-    void testShowHideDialog();
-    void testDialogInput();
     void testCalcSaveAs();
     void testControlState();
     void testMetricField();
@@ -285,8 +283,6 @@ public:
     CPPUNIT_TEST(testComplexSelection);
     CPPUNIT_TEST(testSpellcheckerMultiView);
     CPPUNIT_TEST(testDialogPaste);
-    CPPUNIT_TEST(testShowHideDialog);
-    CPPUNIT_TEST(testDialogInput);
     CPPUNIT_TEST(testCalcSaveAs);
     CPPUNIT_TEST(testControlState);
     CPPUNIT_TEST(testMetricField);
@@ -2040,34 +2036,6 @@ void DesktopLOKTest::testBinaryCallback()
     }
 }
 
-void DesktopLOKTest::testDialogInput()
-{
-    LibLODocument_Impl* pDocument = loadDoc("blank_text.odt");
-    pDocument->pClass->postUnoCommand(pDocument, ".uno:HyperlinkDialog", 
nullptr, false);
-    Scheduler::ProcessEventsToIdle();
-
-    SfxViewShell* pViewShell = SfxViewShell::Current();
-    pViewShell->GetViewFrame().GetBindings().Update();
-
-    VclPtr<vcl::Window> pWindow(Application::GetActiveTopWindow());
-    CPPUNIT_ASSERT(pWindow);
-
-    Control* pCtrlFocused = GetFocusControl(pWindow.get());
-    CPPUNIT_ASSERT(pCtrlFocused);
-    CPPUNIT_ASSERT_EQUAL(WindowType::COMBOBOX, pCtrlFocused->GetType());
-    CPPUNIT_ASSERT_EQUAL(OUString(""), pCtrlFocused->GetText());
-
-    vcl::LOKWindowId nDialogId = pWindow->GetLOKWindowId();
-    pDocument->pClass->postWindowExtTextInputEvent(pDocument, nDialogId, 
LOK_EXT_TEXTINPUT, "wiki.");
-    pDocument->pClass->postWindowExtTextInputEvent(pDocument, nDialogId, 
LOK_EXT_TEXTINPUT_END, "wiki.");
-    pDocument->pClass->removeTextContext(pDocument, nDialogId, 1, 0);
-    Scheduler::ProcessEventsToIdle();
-    CPPUNIT_ASSERT_EQUAL(OUString("wiki"), pCtrlFocused->GetText());
-
-    static_cast<SystemWindow*>(pWindow.get())->Close();
-    Scheduler::ProcessEventsToIdle();
-}
-
 void DesktopLOKTest::testInput()
 {
     // Load a Writer document, enable change recording and press a key.
@@ -2174,7 +2142,6 @@ public:
     boost::property_tree::ptree m_aCommentCallbackResult;
     boost::property_tree::ptree m_aCallbackWindowResult;
     boost::property_tree::ptree m_aColorPaletteCallbackResult;
-    bool m_bWindowHidden;
 
     ViewCallback(LibLODocument_Impl* pDocument)
         : mpDocument(pDocument),
@@ -2231,16 +2198,6 @@ public:
             m_aCommentCallbackResult = 
m_aCommentCallbackResult.get_child("comment");
         }
         break;
-        case LOK_CALLBACK_WINDOW:
-        {
-            m_aCallbackWindowResult.clear();
-            std::stringstream aStream(pPayload);
-            boost::property_tree::read_json(aStream, m_aCallbackWindowResult);
-
-            std::string sAction = 
m_aCallbackWindowResult.get<std::string>("action");
-            if (sAction == "hide")
-                m_bWindowHidden = true;
-        }
         break;
         case LOK_CALLBACK_CELL_FORMULA:
         {
@@ -3083,31 +3040,6 @@ void DesktopLOKTest::testDialogPaste()
     Scheduler::ProcessEventsToIdle();
 }
 
-void DesktopLOKTest::testShowHideDialog()
-{
-
-    LibLODocument_Impl* pDocument = loadDoc("blank_text.odt");
-
-    pDocument->m_pDocumentClass->initializeForRendering(pDocument, "{}");
-    ViewCallback aView(pDocument);
-
-    pDocument->pClass->postUnoCommand(pDocument, ".uno:HyperlinkDialog", 
nullptr, false);
-    Scheduler::ProcessEventsToIdle();
-
-    VclPtr<vcl::Window> pWindow(Application::GetActiveTopWindow());
-    CPPUNIT_ASSERT(pWindow);
-
-    aView.m_bWindowHidden = false;
-
-    pWindow->Hide();
-    Scheduler::ProcessEventsToIdle();
-
-    CPPUNIT_ASSERT_EQUAL(true, aView.m_bWindowHidden);
-
-    static_cast<SystemWindow*>(pWindow.get())->Close();
-    Scheduler::ProcessEventsToIdle();
-}
-
 void DesktopLOKTest::testComplexSelection()
 {
     // Start with a blank text file and add contents.
diff --git a/vcl/jsdialog/enabled.cxx b/vcl/jsdialog/enabled.cxx
index c61be13c2b7c..c8e5ab93511c 100644
--- a/vcl/jsdialog/enabled.cxx
+++ b/vcl/jsdialog/enabled.cxx
@@ -46,6 +46,9 @@ bool isBuilderEnabled(std::u16string_view rUIFile, bool 
bMobile)
         || rUIFile == u"cui/ui/formatnumberdialog.ui"
         || rUIFile == u"cui/ui/gradientpage.ui"
         || rUIFile == u"cui/ui/hatchpage.ui"
+        || rUIFile == u"cui/ui/hyperlinkdialog.ui"
+        || rUIFile == u"cui/ui/hyperlinkinternetpage.ui"
+        || rUIFile == u"cui/ui/hyperlinkmailpage.ui"
         || rUIFile == u"cui/ui/imagetabpage.ui"
         || rUIFile == u"cui/ui/linedialog.ui"
         || rUIFile == u"cui/ui/lineendstabpage.ui"

Reply via email to