sw/source/ui/chrdlg/chardlg.cxx | 6 +++++- vcl/inc/jsdialog/jsdialogbuilder.hxx | 2 ++ vcl/jsdialog/enabled.cxx | 14 +++++++++++++- vcl/jsdialog/jsdialogbuilder.cxx | 12 ++++++++++++ 4 files changed, 32 insertions(+), 2 deletions(-)
New commits: commit f3aca61de33b396bad10d08ddbb6f83e1a29ac13 Author: Pranam Lashkari <lpra...@collabora.com> AuthorDate: Fri Mar 3 02:30:55 2023 +0530 Commit: Szymon Kłos <szymon.k...@collabora.com> CommitDate: Mon Mar 6 09:47:08 2023 +0000 jsdialog: enabled format Character dialog (writer) can be found from: Tabbed view > Format > Character Sidebar > Character Compact view > Format > Character Change-Id: I43f9dc63a1941345a7ef55bfecd8bb38f652208e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148242 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.k...@collabora.com> diff --git a/sw/source/ui/chrdlg/chardlg.cxx b/sw/source/ui/chrdlg/chardlg.cxx index 0cf38a652bec..efa16ce22797 100644 --- a/sw/source/ui/chrdlg/chardlg.cxx +++ b/sw/source/ui/chrdlg/chardlg.cxx @@ -47,6 +47,7 @@ #include <SwStyleNameMapper.hxx> #include <sfx2/filedlghelper.hxx> #include <sfx2/frame.hxx> +#include <comphelper/lok.hxx> #include <svx/svxdlg.hxx> #include <svx/flagsdef.hxx> @@ -167,7 +168,10 @@ SwCharURLPage::SwCharURLPage(weld::Container* pPage, weld::DialogController* pCo m_xCharStyleContainer->hide(); } - m_xURLPB->connect_clicked(LINK( this, SwCharURLPage, InsertFileHdl)); + if(comphelper::LibreOfficeKit::isActive()) + m_xURLPB->hide(); // Hide browse button in online (not supported yet) + else + m_xURLPB->connect_clicked(LINK( this, SwCharURLPage, InsertFileHdl)); m_xEventPB->connect_clicked(LINK( this, SwCharURLPage, EventHdl)); SwView *pView = ::GetActiveView(); diff --git a/vcl/jsdialog/enabled.cxx b/vcl/jsdialog/enabled.cxx index 9a10f5bc0079..b76bd70597b0 100644 --- a/vcl/jsdialog/enabled.cxx +++ b/vcl/jsdialog/enabled.cxx @@ -34,12 +34,22 @@ bool isBuilderEnabled(std::u16string_view rUIFile, bool bMobile) } if (// cui - rUIFile == u"cui/ui/formatnumberdialog.ui" + rUIFile == u"cui/ui/areatabpage.ui" + || rUIFile == u"cui/ui/borderpage.ui" + || rUIFile == u"cui/ui/charnamepage.ui" + || rUIFile == u"cui/ui/colorpage.ui" + || rUIFile == u"cui/ui/effectspage.ui" + || rUIFile == u"cui/ui/eventassigndialog.ui" + || rUIFile == u"cui/ui/fontfeaturesdialog.ui" + || rUIFile == u"cui/ui/formatnumberdialog.ui" || rUIFile == u"cui/ui/macroselectordialog.ui" || rUIFile == u"cui/ui/numberingformatpage.ui" || rUIFile == u"cui/ui/password.ui" + || rUIFile == u"cui/ui/positionpage.ui" + || rUIFile == u"cui/ui/queryduplicatedialog.ui" || rUIFile == u"cui/ui/similaritysearchdialog.ui" || rUIFile == u"cui/ui/splitcellsdialog.ui" + || rUIFile == u"cui/ui/twolinespage.ui" || rUIFile == u"cui/ui/widgettestdialog.ui" // scalc || rUIFile == u"modules/scalc/ui/analysisofvariancedialog.ui" @@ -78,6 +88,8 @@ bool isBuilderEnabled(std::u16string_view rUIFile, bool bMobile) || rUIFile == u"modules/schart/ui/wizelementspage.ui" // swriter || rUIFile == u"modules/swriter/ui/captionoptions.ui" + || rUIFile == u"modules/swriter/ui/characterproperties.ui" + || rUIFile == u"modules/swriter/ui/charurlpage.ui" || rUIFile == u"modules/swriter/ui/contentcontroldlg.ui" || rUIFile == u"modules/swriter/ui/contentcontrollistitemdlg.ui" || rUIFile == u"modules/swriter/ui/dropdownfielddialog.ui" commit 26486cd12f47090fbd505b4b51828ee9e79bf3b7 Author: Szymon Kłos <szymon.k...@collabora.com> AuthorDate: Sat Mar 4 15:14:49 2023 +0100 Commit: Szymon Kłos <szymon.k...@collabora.com> CommitDate: Mon Mar 6 09:47:02 2023 +0000 jsdialog: send full update when showing BuilderPage BuilderPage when created welds only container. Detect that case when full update wasn't sent in weld_dialog or weld_assistant so we show new tab pages. Fixes problem in Characters -> Higlight -> Color Change-Id: Iab38493a12feb4fc5e8b258125987856485275a4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148221 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.k...@collabora.com> diff --git a/vcl/inc/jsdialog/jsdialogbuilder.hxx b/vcl/inc/jsdialog/jsdialogbuilder.hxx index b7b0e941f2e0..f9dea1a3987d 100644 --- a/vcl/inc/jsdialog/jsdialogbuilder.hxx +++ b/vcl/inc/jsdialog/jsdialogbuilder.hxx @@ -221,6 +221,8 @@ class JSInstanceBuilder final : public SalInstanceBuilder, public JSDialogSender std::string m_sTypeOfJSON; bool m_bHasTopLevelDialog; bool m_bIsNotebookbar; + /// used to detect when we have to send Full Update in container handler + bool m_bSentInitialUpdate; /// When LOKNotifier is set by jsdialogs code we need to release it VclPtr<vcl::Window> m_aWindowToRelease; diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx index cc1ca91262c8..db2481897fa3 100644 --- a/vcl/jsdialog/jsdialogbuilder.cxx +++ b/vcl/jsdialog/jsdialogbuilder.cxx @@ -509,6 +509,7 @@ JSInstanceBuilder::JSInstanceBuilder(weld::Widget* pParent, const OUString& rUIR , m_sTypeOfJSON("dialog") , m_bHasTopLevelDialog(false) , m_bIsNotebookbar(false) + , m_bSentInitialUpdate(false) , m_aWindowToRelease(nullptr) { // when it is a popup we initialize sender in weld_popover @@ -541,6 +542,7 @@ JSInstanceBuilder::JSInstanceBuilder(weld::Widget* pParent, const OUString& rUIR , m_sTypeOfJSON("sidebar") , m_bHasTopLevelDialog(false) , m_bIsNotebookbar(false) + , m_bSentInitialUpdate(false) , m_aWindowToRelease(nullptr) { vcl::Window* pRoot = m_xBuilder->get_widget_root(); @@ -583,6 +585,7 @@ JSInstanceBuilder::JSInstanceBuilder(vcl::Window* pParent, const OUString& rUIRo , m_sTypeOfJSON("notebookbar") , m_bHasTopLevelDialog(false) , m_bIsNotebookbar(false) + , m_bSentInitialUpdate(false) , m_aWindowToRelease(nullptr) { vcl::Window* pRoot = m_xBuilder->get_widget_root(); @@ -612,6 +615,7 @@ JSInstanceBuilder::JSInstanceBuilder(vcl::Window* pParent, const OUString& rUIRo , m_sTypeOfJSON("formulabar") , m_bHasTopLevelDialog(false) , m_bIsNotebookbar(false) + , m_bSentInitialUpdate(false) , m_aWindowToRelease(nullptr) { vcl::Window* pRoot = m_xBuilder->get_widget_root(); @@ -839,6 +843,7 @@ std::unique_ptr<weld::Dialog> JSInstanceBuilder::weld_dialog(const OString& id) initializeSender(GetNotifierWindow(), GetContentWindow(), GetTypeOfJSON()); sendFullUpdate(); + m_bSentInitialUpdate = true; } return pRet; @@ -867,6 +872,7 @@ std::unique_ptr<weld::Assistant> JSInstanceBuilder::weld_assistant(const OString initializeSender(GetNotifierWindow(), GetContentWindow(), GetTypeOfJSON()); sendFullUpdate(); + m_bSentInitialUpdate = true; } return pRet; @@ -908,6 +914,12 @@ std::unique_ptr<weld::Container> JSInstanceBuilder::weld_container(const OString if (pWeldWidget) RememberWidget(id, pWeldWidget.get()); + if (!m_bSentInitialUpdate) + { + m_bSentInitialUpdate = true; + sendFullUpdate(); + } + return pWeldWidget; }