sfx2/source/notebookbar/SfxNotebookBar.cxx |    3 
 sw/source/ui/dialog/uiregionsw.cxx         |  102 ++++++++++++++---------------
 vcl/jsdialog/enabled.cxx                   |    1 
 3 files changed, 56 insertions(+), 50 deletions(-)

New commits:
commit ba970cb1e267531affc90735ae2b66456a9eb8ed
Author:     Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk>
AuthorDate: Mon Jul 17 17:14:21 2023 +0900
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Wed Oct 11 15:21:29 2023 +0200

    disable add-ons for NotebookBar in LOKit - perf. issues
    
    Searching for add-ons to use in NotebookBar causes perf. issues,
    so disable them for now. This was discovered during a editing
    session and the flame-graph showed up the NotebookbarAddonValues
    method. See COOL GitHub ticket [1] for more details.
    
    [1] https://github.com/CollaboraOnline/online/issues/6896
    
    Change-Id: I4b2ced2be966de1cd1282f801a4410bc1625f0f9
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154513
    Reviewed-by: Michael Meeks <michael.me...@collabora.com>
    Tested-by: Michael Meeks <michael.me...@collabora.com>
    (cherry picked from commit 0cda4c31c6c7881ea7b5089b04ad5147b28117af)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157815
    Tested-by: Jenkins

diff --git a/sfx2/source/notebookbar/SfxNotebookBar.cxx 
b/sfx2/source/notebookbar/SfxNotebookBar.cxx
index 3b33ef7dd781..4937e278c73d 100644
--- a/sfx2/source/notebookbar/SfxNotebookBar.cxx
+++ b/sfx2/source/notebookbar/SfxNotebookBar.cxx
@@ -49,6 +49,9 @@ static void NotebookbarAddonValues(
     
std::vector<css::uno::Sequence<css::uno::Sequence<css::beans::PropertyValue>>>&
         aExtensionValues)
 {
+    if (comphelper::LibreOfficeKit::isActive())
+        return;
+
     framework::AddonsOptions aAddonsItems;
 
     for (int nIdx = 0; nIdx < aAddonsItems.GetAddonsNotebookBarCount(); nIdx++)
commit ff568f6ec8292ad7e5b7001ce0d27430c23c2258
Author:     Skyler Grey <skyler.g...@collabora.com>
AuthorDate: Sun Feb 19 13:13:05 2023 +0000
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Wed Oct 11 15:21:21 2023 +0200

    Make the format > sections > options dialog a jsdialog
    
    - This dialog was not properly tunneled so did not show on collabora
      online
    - Running asynchronously as a jsdialog both fixes this issue and is a
      general improvement (in that jsdialog conversion improves
      accessability, looks more consistent with the rest of COOL, etc.)
    
    Note- This commit was previously given the Change-Id
          Ie9a70da70bbb30de039ded82f738285b1b734421 however I have replaced
          it due to accidentally creating it against the wrong base branch.
          To see the old change go to
          https://gerrit.libreoffice.org/c/core/+/147295
    
    Change-Id: I2715eb1d8e3e301e1519e2ef6b69c823e571d08c
    Signed-off-by: Skyler Grey <skyler.g...@collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151188
    Reviewed-by: Szymon Kłos <szymon.k...@collabora.com>
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    (cherry picked from commit 6aff11f36ecd02613c0613c9e89883c81656d9f6)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157814
    Tested-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/sw/source/ui/dialog/uiregionsw.cxx 
b/sw/source/ui/dialog/uiregionsw.cxx
index f55b2194bdc2..85bb57abba7c 100644
--- a/sw/source/ui/dialog/uiregionsw.cxx
+++ b/sw/source/ui/dialog/uiregionsw.cxx
@@ -1048,57 +1048,59 @@ IMPL_LINK_NOARG(SwEditRegionDlg, OptionsHdl, 
weld::Button&, void)
     aSet.Put(SwFormatFrameSize(SwFrameSize::Variable, nWidth));
     aSet.Put(SvxSizeItem(SID_ATTR_PAGE_SIZE, Size(nWidth, nWidth)));
 
-    SwSectionPropertyTabDialog aTabDlg(m_xDialog.get(), aSet, m_rSh);
-    if (RET_OK != aTabDlg.run())
-        return;
-
-    const SfxItemSet* pOutSet = aTabDlg.GetOutputItemSet();
-    if( !(pOutSet && pOutSet->Count()) )
-        return;
-
-    const SwFormatCol* pColItem = pOutSet->GetItemIfSet(
-                            RES_COL, false );
-    const SvxBrushItem* pBrushItem = pOutSet->GetItemIfSet(
-                            RES_BACKGROUND, false );
-    const SwFormatFootnoteAtTextEnd* pFootnoteItem = pOutSet->GetItemIfSet(
-                            RES_FTN_AT_TXTEND, false );
-    const SwFormatEndAtTextEnd* pEndItem = pOutSet->GetItemIfSet(
-                            RES_END_AT_TXTEND, false );
-    const SwFormatNoBalancedColumns* pBalanceItem = pOutSet->GetItemIfSet(
-                            RES_COLUMNBALANCE, false );
-    const SvxFrameDirectionItem* pFrameDirItem = pOutSet->GetItemIfSet(
-                            RES_FRAMEDIR, false );
-    const SvxLRSpaceItem* pLRSpaceItem = pOutSet->GetItemIfSet(
-                            RES_LR_SPACE, false );
-
-    if( !(pColItem ||
-          pBrushItem ||
-          pFootnoteItem ||
-          pEndItem ||
-          pBalanceItem ||
-          pFrameDirItem ||
-          pLRSpaceItem) )
-        return;
-
-    m_xTree->selected_foreach([&](weld::TreeIter& rEntry)
-    {
-        SectRepr* pRepr = weld::fromId<SectRepr*>(m_xTree->get_id(rEntry));
-        if (pColItem)
-            pRepr->GetCol() = *pColItem;
-        if (pBrushItem)
-            pRepr->GetBackground().reset(pBrushItem->Clone());
-        if (pFootnoteItem)
-            pRepr->GetFootnoteNtAtEnd() = *pFootnoteItem;
-        if (pEndItem)
-            pRepr->GetEndNtAtEnd() = *pEndItem;
-        if (pBalanceItem)
-            pRepr->GetBalance().SetValue(pBalanceItem->GetValue());
-        if (pFrameDirItem)
-            pRepr->GetFrameDir()->SetValue(pFrameDirItem->GetValue());
-        if (pLRSpaceItem)
-            pRepr->GetLRSpace().reset(pLRSpaceItem->Clone());
-        return false;
+    auto pDlg = std::make_shared<SwSectionPropertyTabDialog>(m_xDialog.get(), 
aSet, m_rSh);
+    SfxTabDialogController::runAsync(pDlg, [pDlg, this](sal_Int32 nResult){
+        if (nResult == RET_OK) {
+            const SfxItemSet* pOutSet = pDlg->GetOutputItemSet();
+            if( !(pOutSet && pOutSet->Count()) )
+                return;
+
+            const SwFormatCol* pColItem = pOutSet->GetItemIfSet(
+                                    RES_COL, false );
+            const SvxBrushItem* pBrushItem = pOutSet->GetItemIfSet(
+                                    RES_BACKGROUND, false );
+            const SwFormatFootnoteAtTextEnd* pFootnoteItem = 
pOutSet->GetItemIfSet(
+                                    RES_FTN_AT_TXTEND, false );
+            const SwFormatEndAtTextEnd* pEndItem = pOutSet->GetItemIfSet(
+                                    RES_END_AT_TXTEND, false );
+            const SwFormatNoBalancedColumns* pBalanceItem = 
pOutSet->GetItemIfSet(
+                                    RES_COLUMNBALANCE, false );
+            const SvxFrameDirectionItem* pFrameDirItem = pOutSet->GetItemIfSet(
+                                    RES_FRAMEDIR, false );
+            const SvxLRSpaceItem* pLRSpaceItem = pOutSet->GetItemIfSet(
+                                    RES_LR_SPACE, false );
+
+            if( !(pColItem ||
+                  pBrushItem ||
+                  pFootnoteItem ||
+                  pEndItem ||
+                  pBalanceItem ||
+                  pFrameDirItem ||
+                  pLRSpaceItem) )
+                return;
+
+            m_xTree->selected_foreach([&](weld::TreeIter& rEntry)
+            {
+                SectRepr* pRepr = 
weld::fromId<SectRepr*>(m_xTree->get_id(rEntry));
+                if (pColItem)
+                    pRepr->GetCol() = *pColItem;
+                if (pBrushItem)
+                    pRepr->GetBackground().reset(pBrushItem->Clone());
+                if (pFootnoteItem)
+                    pRepr->GetFootnoteNtAtEnd() = *pFootnoteItem;
+                if (pEndItem)
+                    pRepr->GetEndNtAtEnd() = *pEndItem;
+                if (pBalanceItem)
+                    pRepr->GetBalance().SetValue(pBalanceItem->GetValue());
+                if (pFrameDirItem)
+                    pRepr->GetFrameDir()->SetValue(pFrameDirItem->GetValue());
+                if (pLRSpaceItem)
+                    pRepr->GetLRSpace().reset(pLRSpaceItem->Clone());
+                return false;
+            });
+        }
     });
+
 }
 
 IMPL_LINK(SwEditRegionDlg, FileNameComboBoxHdl, weld::ComboBox&, rEdit, void)
diff --git a/vcl/jsdialog/enabled.cxx b/vcl/jsdialog/enabled.cxx
index 1a774e243196..78aa703a8b6e 100644
--- a/vcl/jsdialog/enabled.cxx
+++ b/vcl/jsdialog/enabled.cxx
@@ -176,6 +176,7 @@ bool isBuilderEnabled(std::u16string_view rUIFile, bool 
bMobile)
         || rUIFile == u"modules/swriter/ui/footnoteareapage.ui"
         || rUIFile == u"modules/swriter/ui/footnotepage.ui"
         || rUIFile == u"modules/swriter/ui/footnotesendnotestabpage.ui"
+        || rUIFile == u"modules/swriter/ui/formatsectiondialog.ui"
         || rUIFile == u"modules/swriter/ui/formattablepage.ui"
         || rUIFile == u"modules/swriter/ui/frmaddpage.ui"
         || rUIFile == u"modules/swriter/ui/frmurlpage.ui"

Reply via email to