cui/source/dialogs/cuihyperdlg.cxx | 16 +++++++++-- cui/source/dialogs/iconcdlg.cxx | 4 ++ desktop/qa/desktop_lib/test_desktop_lib.cxx | 38 ---------------------------- vcl/jsdialog/enabled.cxx | 3 ++ 4 files changed, 19 insertions(+), 42 deletions(-)
New commits: commit 38aeb717ee647b74282c4856ad541a8f00e18a92 Author: Szymon Kłos <szymon.k...@collabora.com> AuthorDate: Fri Sep 8 21:22:48 2023 +0200 Commit: Szymon Kłos <szymon.k...@collabora.com> CommitDate: Mon Sep 11 09:47:32 2023 +0200 Hyperlink dialog: hide some buttons in LOK Change-Id: I55a4ca5921b44a7c091a3742a85f2c9da5a188a1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156760 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Attila Szűcs <attila.sz...@collabora.com> diff --git a/cui/source/dialogs/cuihyperdlg.cxx b/cui/source/dialogs/cuihyperdlg.cxx index 20c1b1e26f85..a08b08e40987 100644 --- a/cui/source/dialogs/cuihyperdlg.cxx +++ b/cui/source/dialogs/cuihyperdlg.cxx @@ -106,10 +106,20 @@ SvxHpLinkDlg::SvxHpLinkDlg(SfxBindings* pBindings, SfxChildWindow* pChild, weld: // Buttons m_xOKBtn->show(); - m_xApplyBtn->show(); m_xCancelBtn->show(); - m_xHelpBtn->show(); - m_xResetBtn->show(); + + if (comphelper::LibreOfficeKit::isActive()) + { + m_xApplyBtn->hide(); + m_xHelpBtn->hide(); + m_xResetBtn->hide(); + } + else + { + m_xApplyBtn->show(); + m_xHelpBtn->show(); + m_xResetBtn->show(); + } mbGrabFocus = true; diff --git a/cui/source/dialogs/iconcdlg.cxx b/cui/source/dialogs/iconcdlg.cxx index 6e6ffaf5c53a..73ef1a8994ef 100644 --- a/cui/source/dialogs/iconcdlg.cxx +++ b/cui/source/dialogs/iconcdlg.cxx @@ -18,6 +18,7 @@ */ #include <iconcdlg.hxx> +#include <comphelper/lok.hxx> #include <cuihyperdlg.hxx> #include <cassert> @@ -148,7 +149,8 @@ void SvxHpLinkDlg::ActivatePageImpl() pData->xPage->ActivatePage( *pExampleSet ); m_xDialog->set_help_id(pData->xPage->GetHelpId()); - m_xResetBtn->show(); + if (!comphelper::LibreOfficeKit::isActive()) + m_xResetBtn->show(); } void SvxHpLinkDlg::DeActivatePageImpl () commit d24f48e69b901a6613fd487977a84ee57c55c4b4 Author: Szymon Kłos <szymon.k...@collabora.com> AuthorDate: Thu Sep 7 16:25:45 2023 +0200 Commit: Szymon Kłos <szymon.k...@collabora.com> CommitDate: Mon Sep 11 09:47:20 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> diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx index 943889faee70..12c52f08e833 100644 --- a/desktop/qa/desktop_lib/test_desktop_lib.cxx +++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx @@ -209,7 +209,6 @@ public: void testComplexSelection(); void testSpellcheckerMultiView(); void testDialogPaste(); - void testShowHideDialog(); void testDialogInput(); void testCalcSaveAs(); void testControlState(); @@ -281,7 +280,6 @@ public: CPPUNIT_TEST(testComplexSelection); CPPUNIT_TEST(testSpellcheckerMultiView); CPPUNIT_TEST(testDialogPaste); - CPPUNIT_TEST(testShowHideDialog); CPPUNIT_TEST(testDialogInput); CPPUNIT_TEST(testCalcSaveAs); CPPUNIT_TEST(testControlState); @@ -2173,7 +2171,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), @@ -2230,16 +2227,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: { @@ -3080,31 +3067,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 c93897d95d6c..d63f6903e01e 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"