[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - 12 commits - dbaccess/source extras/CustomTarget_tpldraw.mk extras/Package_tpldraw.mk include/sfx2 officecfg/registry sc/source sc/uiconfig sd/source sfx2/source svx/source svx/uiconfig sw/qa sw/source

Julien Nabet (via logerrit) logerrit at kemper.freedesktop.org
Wed Jun 23 19:05:45 UTC 2021


 dbaccess/source/ui/browser/unodatbr.cxx                        |    2 
 dbaccess/source/ui/control/dbtreelistbox.cxx                   |    4 
 dbaccess/source/ui/inc/dbtreelistbox.hxx                       |    2 
 extras/CustomTarget_tpldraw.mk                                 |   12 +-
 extras/Package_tpldraw.mk                                      |    2 
 include/sfx2/sidebar/SidebarController.hxx                     |    1 
 officecfg/registry/schema/org/openoffice/Office/UI/Sidebar.xcs |    7 +
 sc/source/core/data/table7.cxx                                 |    3 
 sc/uiconfig/scalc/ui/notebookbar.ui                            |    4 
 sc/uiconfig/scalc/ui/notebookbar_groupedbar_compact.ui         |    4 
 sd/source/ui/unoidl/randomnode.cxx                             |    7 -
 sfx2/source/sidebar/SidebarController.cxx                      |    5 
 svx/source/sidebar/possize/PosSizePropertyPanel.cxx            |    2 
 svx/uiconfig/ui/sidebarpossize.ui                              |    1 
 sw/qa/core/layout/data/birt_min.odt                            |binary
 sw/qa/core/layout/layout.cxx                                   |    6 +
 sw/source/core/doc/htmltbl.cxx                                 |    2 
 sw/source/core/inc/layact.hxx                                  |    5 
 sw/source/core/inc/tabfrm.hxx                                  |   13 --
 sw/source/core/layout/layact.cxx                               |   20 ---
 sw/source/core/layout/tabfrm.cxx                               |   55 ++++++++--
 sw/source/filter/ww8/ww8par.cxx                                |   32 +++--
 sw/source/uibase/docvw/edtwin.cxx                              |   13 ++
 23 files changed, 118 insertions(+), 84 deletions(-)

New commits:
commit e41b48d8995918d4296b28a160c762697b551af2
Author:     Julien Nabet <serval2412 at yahoo.fr>
AuthorDate: Sat Jun 19 13:51:28 2021 +0200
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Wed Jun 23 21:05:00 2021 +0200

    tdf#142932: fix crash when pasting cells with comments+"skip empty cells"
    
    See bt here:
    https://bugs.documentfoundation.org/attachment.cgi?id=173011
    
    4  0x00007fc4b0cdbb3d in ScColContainer::operator[](unsigned long) (this=0x872e1e0, nIndex=64) at sc/inc/colcontainer.hxx:43
    5  0x00007fc4b120d82b in ScTable::DeleteBeforeCopyFromClip(sc::CopyFromClipContext&, ScTable const&, sc::ColumnSpanSet&) (this=0x872e1e0, rCxt=..., rClipTab=..., rBroadcastSpans=...)
       at sc/source/core/data/table7.cxx:118
    6  0x00007fc4b0e42939 in ScDocument::DeleteBeforeCopyFromClip(sc::CopyFromClipContext&, ScMarkData const&, sc::ColumnSpanSet&) (this=0x3bffa60, rCxt=..., rMark=..., rBroadcastSpans=...)
       at sc/source/core/data/document10.cxx:75
    7  0x00007fc4b0e0b67b in ScDocument::CopyFromClip(ScRange const&, ScMarkData const&, InsertDeleteFlags, ScDocument*, ScDocument*, bool, bool, bool, bool, ScRangeList const*)
       (this=0x3bffa60, rDestRange=..., rMark=..., nInsFlag=7, pRefUndoDoc=0x0, pClipDoc=0x7d3bb40, bResetCut=true, bAsLink=false, bIncludeFiltered=false, bSkipAttrForEmpty=true, pDestRanges=0x7fff4a3da4b0)
       at sc/source/core/data/document.cxx:2916
    8  0x00007fc4b2412dc3 in ScViewFunc::PasteFromClip(InsertDeleteFlags, ScDocument*, ScPasteFunc, bool, bool, bool, InsCellCmd, InsertDeleteFlags, bool) (this=
       0x41a29e0, nFlags=7, pClipDoc=0x7d3bb40, nFunction=ScPasteFunc::NONE, bSkipEmpty=true, bTranspose=false, bAsLink=false, eMoveMode=INS_NONE, nUndoExtraFlags=InsertDeleteFlags::NONE, bAllowDialogs=true)
       at sc/source/ui/view/viewfun3.cxx:1312
    
    Change-Id: Ic119cb5d414a35a9ba18b0564d7adf83154eb9d7
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117497
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
    (cherry picked from commit a6d269ed9478b20f611912bf9711c2683e7bc924)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117632
    Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>
    (cherry picked from commit bb59b4165456d13eda800098be8b875d93b093d3)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117637

diff --git a/sc/source/core/data/table7.cxx b/sc/source/core/data/table7.cxx
index fc821133ef65..b75751ff7de4 100644
--- a/sc/source/core/data/table7.cxx
+++ b/sc/source/core/data/table7.cxx
@@ -108,7 +108,8 @@ void ScTable::DeleteBeforeCopyFromClip(
     ScRange aClipRange = rCxt.getClipDoc()->GetClipParam().getWholeRange();
     SCCOL nClipCol = aClipRange.aStart.Col();
     {
-        for (SCCOL nCol = aRange.mnCol1; nCol <= aRange.mnCol2; ++nCol, ++nClipCol)
+        const SCCOL nMaxCol2 = std::min<SCCOL>( aRange.mnCol2, aCol.size() - 1 );
+        for (SCCOL nCol = aRange.mnCol1; nCol <= nMaxCol2; ++nCol, ++nClipCol)
         {
             if (nClipCol > aClipRange.aEnd.Col())
                 nClipCol = aClipRange.aStart.Col(); // loop through columns.
commit ddd472813b12501f907c6936e27f9de66fa58452
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Jun 10 21:02:33 2021 +0100
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Wed Jun 23 21:04:59 2021 +0200

    tdf#139447 crash on dragging query/table from explorer to calc sheet
    
    Change-Id: Ic827cb967a9a9cb78f28a23707813aeec8381cd4
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117019
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>

diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx
index 2d7d29f7797b..be1d04927957 100644
--- a/dbaccess/source/ui/browser/unodatbr.cxx
+++ b/dbaccess/source/ui/browser/unodatbr.cxx
@@ -296,7 +296,7 @@ bool SbaTableQueryBrowser::Construct(vcl::Window* pParent)
         m_pSplitter->SetPosSizePixel( ::Point(0,0), ::Size(nFrameWidth,0) );
         m_pSplitter->SetBackground( Wallpaper( Application::GetSettings().GetStyleSettings().GetDialogColor() ) );
 
-        m_pTreeView = VclPtr<InterimDBTreeListBox>::Create(getBrowserView(), E_TABLE);
+        m_pTreeView = VclPtr<InterimDBTreeListBox>::Create(getBrowserView());
 
         weld::TreeView& rTreeView = m_pTreeView->GetWidget();
         rTreeView.connect_expanding(LINK(this, SbaTableQueryBrowser, OnExpandEntry));
diff --git a/dbaccess/source/ui/control/dbtreelistbox.cxx b/dbaccess/source/ui/control/dbtreelistbox.cxx
index d63beff8c346..de5ff835deea 100644
--- a/dbaccess/source/ui/control/dbtreelistbox.cxx
+++ b/dbaccess/source/ui/control/dbtreelistbox.cxx
@@ -53,9 +53,9 @@ using namespace ::com::sun::star::datatransfer;
 using namespace ::com::sun::star::ui;
 using namespace ::com::sun::star::view;
 
-InterimDBTreeListBox::InterimDBTreeListBox(vcl::Window* pParent, bool bSQLType)
+InterimDBTreeListBox::InterimDBTreeListBox(vcl::Window* pParent)
     : InterimItemWindow(pParent, "dbaccess/ui/dbtreelist.ui", "DBTreeList")
-    , TreeListBox(m_xBuilder->weld_tree_view("treeview"), bSQLType)
+    , TreeListBox(m_xBuilder->weld_tree_view("treeview"), true)
 {
     InitControlBase(&GetWidget());
 }
diff --git a/dbaccess/source/ui/inc/dbtreelistbox.hxx b/dbaccess/source/ui/inc/dbtreelistbox.hxx
index af68b9e9b8d7..d5e37022ec64 100644
--- a/dbaccess/source/ui/inc/dbtreelistbox.hxx
+++ b/dbaccess/source/ui/inc/dbtreelistbox.hxx
@@ -117,7 +117,7 @@ namespace dbaui
                                , public TreeListBox
     {
     public:
-        InterimDBTreeListBox(vcl::Window* pParent, bool bSQLType);
+        InterimDBTreeListBox(vcl::Window* pParent);
         virtual void dispose() override;
         virtual ~InterimDBTreeListBox() override;
         void show_container() { m_xContainer->show(); }
commit 9da7e8c92883635718ae4541d4737c9593a3c046
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sun Jun 13 16:41:32 2021 +0100
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Wed Jun 23 21:04:59 2021 +0200

    ofz#34297 Indirect-leak
    
    this is similar to the memory leak fixed by
    
    commit d6e752d5ebfaf66d1c9b0694f9c8582311d6151a
    Author: Jian Fang Zhang <zhangjf at apache.org>
    Date:   Mon Jun 18 12:26:30 2012 +0000
    
        i#113608#, memory leak in animations: newly exposed crashed problem
    
    where the parent node holds a reference to its children and the child
    held a reference to its parent.
    
    Change RandomAnimationNode to use a WeakReference to its parent like
    the other AnimationNodes do
    
    Change-Id: I251a6127c301d1fb7e51397d8f05db4020bc612c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117115
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>

diff --git a/sd/source/ui/unoidl/randomnode.cxx b/sd/source/ui/unoidl/randomnode.cxx
index 86c973336101..a87ae1783721 100644
--- a/sd/source/ui/unoidl/randomnode.cxx
+++ b/sd/source/ui/unoidl/randomnode.cxx
@@ -33,6 +33,7 @@
 
 #include <cppuhelper/implbase.hxx>
 #include <cppuhelper/supportsservice.hxx>
+#include <cppuhelper/weakref.hxx>
 #include <osl/mutex.hxx>
 #include <CustomAnimationPreset.hxx>
 #include <randomnode.hxx>
@@ -45,6 +46,7 @@ using ::com::sun::star::uno::Sequence;
 using ::com::sun::star::uno::Any;
 using ::com::sun::star::uno::UNO_QUERY;
 using ::com::sun::star::uno::XInterface;
+using ::com::sun::star::uno::WeakReference;
 using ::com::sun::star::beans::NamedValue;
 using ::com::sun::star::lang::IllegalArgumentException;
 using ::com::sun::star::container::XEnumeration;
@@ -58,6 +60,7 @@ using ::com::sun::star::presentation::ParagraphTarget;
 using ::com::sun::star::drawing::XShape;
 
 using namespace ::com::sun::star::animations;
+
 namespace sd
 {
 
@@ -139,7 +142,7 @@ private:
     Mutex maMutex;
 
     sal_Int16 mnPresetClass;
-    Reference< XInterface > mxParent;
+    WeakReference<XInterface> mxParent;
 
     Any maBegin, maDuration, maEnd, maEndSync, maRepeatCount, maRepeatDuration, maTarget;
     sal_Int16 mnFill, mnFillDefault, mnRestart, mnRestartDefault;
@@ -426,7 +429,7 @@ void SAL_CALL RandomAnimationNode::setUserData( const Sequence< NamedValue >& _u
 Reference< XInterface > SAL_CALL RandomAnimationNode::getParent()
 {
     Guard< Mutex > aGuard( maMutex );
-    return mxParent;
+    return mxParent.get();
 }
 
 // XChild
commit 442caa3ffc66c6609bb8e13c2d24906276873dca
Author:     Michael Stahl <michael.stahl at allotropia.de>
AuthorDate: Mon Jun 21 14:44:29 2021 +0200
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Wed Jun 23 21:04:58 2021 +0200

    sw: add BIRT layout test document
    
    This nested table is an example that was broken by commit
    91b2239783dc716bd71ce7962bfd7e341dfe4175 - if loaded with a wide window,
    it goes into layout loop; if loaded with a tall window size where page
    2 is visible, strangely it doesn't loop.
    
    Change-Id: I5e73cfcd928ff1a321667c1a75b0ba7f348d4b77
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117587
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.stahl at allotropia.de>
    (cherry picked from commit a41c71838d4662adf1ada9d46ec6e070cae7e695)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117603
    Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>

diff --git a/sw/qa/core/layout/data/birt_min.odt b/sw/qa/core/layout/data/birt_min.odt
new file mode 100644
index 000000000000..44bcecb976ff
Binary files /dev/null and b/sw/qa/core/layout/data/birt_min.odt differ
diff --git a/sw/qa/core/layout/layout.cxx b/sw/qa/core/layout/layout.cxx
index fc780f476ba8..1a83a17332c7 100644
--- a/sw/qa/core/layout/layout.cxx
+++ b/sw/qa/core/layout/layout.cxx
@@ -60,6 +60,12 @@ CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testTdf128195)
     CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(3529), nTxtBottom);
 }
 
+CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testBIRT)
+{
+    // this looped
+    load(DATA_DIRECTORY, "birt_min.odt");
+}
+
 CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testBorderCollapseCompat)
 {
     // Load a document with a border conflict: top cell has a dotted bottom border, bottom cell has
commit c4f554dc38b461dd825e7b99bdf1e8a64a1e13f9
Author:     Michael Stahl <michael.stahl at allotropia.de>
AuthorDate: Fri Jun 18 19:49:46 2021 +0200
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Wed Jun 23 21:04:58 2021 +0200

    tdf#116501 sw: layout: check for flys in SwTabFrame::ShouldBwdMoved()
    
    On loading, this hits loop control
    
    warn:legacy.osl:580715:580715:sw/source/core/layout/layact.cxx:543: LoopControl_1 in SwLayAction::InternalAction
    
    This is because there's a fly frame 404 anchored at the last text
    frame 353 on page 2 inside the nested table 347.
    
    ShouldBwdMoved() sees that there is space on the bottom of page 2 and
    hence the follow flow row joined, but then it immediately splits again
    in the same way as before due to the fly with WrapTextMode_NONE.
    
    But then the outer table's cell 273 (upper of 347) is invalidated
    again, hence the loop.
    
    Try to check for overlapping flys in SwTabFrame::ShouldBwdMoved()
    by reusing CalcFlyOffsets(), which is ... not quite ideal, but perhaps
    better than copy-pasting half of it to a new function.
    
    This should have less side effects than the previous fix, but a problem
    remains that clicking on the shape on bottom of page 2 causes the layout
    to go wonky, but that was also the case with previous fix.
    
    Note there's a check of SwLayouter::DoesRowContainMovedFwdFrame() there
    already, but that doesn't help because it will only detect when the fly
    itself was moved forward, but in this case the fly remains on the page.
    
    Also likely it wouldn't be a good idea to move a text frame forward if
    the only thing of it that fits on a page is an anchored fly (i.e. its
    follow has mnOffset=0) because that can be intentional.
    
    Change-Id: I0376f7dcb784c006990336233c97f5093aaccb77
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117473
    Tested-by: Jenkins
    Tested-by: László Németh <nemeth at numbertext.org>
    Reviewed-by: László Németh <nemeth at numbertext.org>
    (cherry picked from commit f1439db62eb36ef5fbc9111b87dc4e0f24b3cb86)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117602
    Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>

diff --git a/sw/source/core/doc/htmltbl.cxx b/sw/source/core/doc/htmltbl.cxx
index 31edb6dff0bc..dd0011bfacad 100644
--- a/sw/source/core/doc/htmltbl.cxx
+++ b/sw/source/core/doc/htmltbl.cxx
@@ -363,7 +363,7 @@ sal_uInt16 SwHTMLTableLayout::GetBrowseWidthByTabFrame(
     SwTwips nUpperDummy = 0;
     tools::Long nRightOffset = 0,
          nLeftOffset  = 0;
-    rTabFrame.CalcFlyOffsets( nUpperDummy, nLeftOffset, nRightOffset );
+    rTabFrame.CalcFlyOffsets(nUpperDummy, nLeftOffset, nRightOffset, nullptr);
     nWidth -= (nLeftOffset + nRightOffset);
 
     return static_cast<sal_uInt16>(std::min(nWidth, SwTwips(SAL_MAX_UINT16)));
diff --git a/sw/source/core/inc/tabfrm.hxx b/sw/source/core/inc/tabfrm.hxx
index 7e302473a421..34010d96a9c3 100644
--- a/sw/source/core/inc/tabfrm.hxx
+++ b/sw/source/core/inc/tabfrm.hxx
@@ -203,7 +203,8 @@ public:
     bool CalcFlyOffsets(
         SwTwips& rUpper,
         tools::Long& rLeftOffset,
-        tools::Long& rRightOffset ) const;
+        tools::Long& rRightOffset,
+        SwTwips * pSpaceBelowBottom) const;
 
     SwTwips CalcHeightOfFirstContentLine() const;
 
diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index 05069534af8d..d639e4d18d74 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -2730,7 +2730,8 @@ static bool IsNextOnSamePage(SwPageFrame const& rPage,
 /// Calculate the offsets arising because of FlyFrames
 bool SwTabFrame::CalcFlyOffsets( SwTwips& rUpper,
                                tools::Long& rLeftOffset,
-                               tools::Long& rRightOffset ) const
+                               tools::Long& rRightOffset,
+                               SwTwips *const pSpaceBelowBottom) const
 {
     bool bInvalidatePrtArea = false;
     const SwPageFrame *pPage = FindPageFrame();
@@ -2750,9 +2751,16 @@ bool SwTabFrame::CalcFlyOffsets( SwTwips& rUpper,
         tools::Long nPrtPos = aRectFnSet.GetTop(getFrameArea());
         nPrtPos = aRectFnSet.YInc( nPrtPos, rUpper );
         SwRect aRect( getFrameArea() );
-        tools::Long nYDiff = aRectFnSet.YDiff( aRectFnSet.GetTop(getFramePrintArea()), rUpper );
-        if( nYDiff > 0 )
-            aRectFnSet.AddBottom( aRect, -nYDiff );
+        if (pSpaceBelowBottom)
+        {   // set to space below table frame
+            aRectFnSet.SetTopAndHeight(aRect, aRectFnSet.GetBottom(aRect), *pSpaceBelowBottom);
+        }
+        else
+        {
+            tools::Long nYDiff = aRectFnSet.YDiff( aRectFnSet.GetTop(getFramePrintArea()), rUpper );
+            if (nYDiff > 0)
+                aRectFnSet.AddBottom( aRect, -nYDiff );
+        }
 
         bool bAddVerticalFlyOffsets = rIDSA.get(DocumentSettingId::ADD_VERTICAL_FLY_OFFSETS);
 
@@ -2789,8 +2797,9 @@ bool SwTabFrame::CalcFlyOffsets( SwTwips& rUpper,
                     aFlyRect.IsOver( aRect ) &&
                     // fly isn't lower of table and
                     // anchor character frame of fly isn't lower of table
-                    ( !IsAnLower( pFly ) &&
-                      ( !pAnchorCharFrame || !IsAnLower( pAnchorCharFrame ) ) ) &&
+                    (pSpaceBelowBottom // not if in ShouldBwdMoved
+                     || (!IsAnLower( pFly ) &&
+                          (!pAnchorCharFrame || !IsAnLower(pAnchorCharFrame)))) &&
                     // table isn't lower of fly
                     !pFly->IsAnLower( this ) &&
                     // fly is lower of fly, the table is in
@@ -2872,6 +2881,20 @@ bool SwTabFrame::CalcFlyOffsets( SwTwips& rUpper,
                         {
                             if (aRectFnSet.YDiff( nPrtPos, nBottom ) < 0)
                                 nPrtPos = nBottom;
+                            // tdf#116501 subtract flys blocking space from below
+                            // TODO this may not work ideally for multiple flys
+                            if (pSpaceBelowBottom
+                                && aRectFnSet.YDiff(aRectFnSet.GetBottom(aRect), nBottom) < 0)
+                            {
+                                if (aRectFnSet.YDiff(aRectFnSet.GetTop(aRect), aRectFnSet.GetTop(aFlyRect)) < 0)
+                                {
+                                    aRectFnSet.SetBottom(aRect, aRectFnSet.GetTop(aFlyRect));
+                                }
+                                else
+                                {
+                                    aRectFnSet.SetHeight(aRect, 0);
+                                }
+                            }
                             bInvalidatePrtArea = true;
                         }
                     }
@@ -2899,6 +2922,10 @@ bool SwTabFrame::CalcFlyOffsets( SwTwips& rUpper,
             }
         }
         rUpper = aRectFnSet.YDiff( nPrtPos, aRectFnSet.GetTop(getFrameArea()) );
+        if (pSpaceBelowBottom)
+        {
+            *pSpaceBelowBottom = aRectFnSet.GetHeight(aRect);
+        }
     }
 
     return bInvalidatePrtArea;
@@ -2934,7 +2961,7 @@ void SwTabFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderA
     //    those are right or left aligned, those set the minimum for the margins
     tools::Long nTmpRight = -1000000,
          nLeftOffset  = 0;
-    if( CalcFlyOffsets( nUpper, nLeftOffset, nTmpRight ) )
+    if (CalcFlyOffsets(nUpper, nLeftOffset, nTmpRight, nullptr))
     {
         setFramePrintAreaValid(false);
     }
@@ -3579,6 +3606,14 @@ bool SwTabFrame::ShouldBwdMoved( SwLayoutFrame *pNewUpper, bool &rReformat )
                     const SwViewShell *pSh = getRootFrame()->GetCurrShell();
                     if( pSh && pSh->GetViewOptions()->getBrowseMode() )
                         nSpace += pNewUpper->Grow( LONG_MAX, true );
+                    if (0 < nSpace && GetPrecede())
+                    {
+                        SwTwips nUpperDummy(0);
+                        tools::Long nLeftOffsetDummy(0), nRightOffsetDummy(0);
+                        // tdf#116501 check for no-wrap fly overlap
+                        static_cast<const SwTabFrame*>(GetPrecede())->CalcFlyOffsets(
+                            nUpperDummy, nLeftOffsetDummy, nRightOffsetDummy, &nSpace);
+                    }
                 }
             }
             else if (!m_bLockBackMove)
commit bf249c6404dfca1b545bf75cc98176d917fd45d4
Author:     Michael Stahl <michael.stahl at allotropia.de>
AuthorDate: Wed Jun 16 15:34:40 2021 +0200
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Wed Jun 23 21:04:57 2021 +0200

    Revert "tdf#116501 fix freezing at embedded text tables"
    
    This reverts commit 91b2239783dc716bd71ce7962bfd7e341dfe4175.
    
    This breaks documents that have many nested tables.
    
    For example Eclipse BIRT generates reports with tables nested 8 levels
    deep, they run into the counter in no time and, ironically, one goes
    into a layout loop because of this counter.
    
    Change-Id: I7451d01787903bbc60b305da3dc72f8259175e97
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117472
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.stahl at allotropia.de>
    (cherry picked from commit ee042a371e98cdcc59848f0b953f1ce545e18e31)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117601
    Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>

diff --git a/sw/source/core/inc/layact.hxx b/sw/source/core/inc/layact.hxx
index 71484e00da5f..6680949b3eff 100644
--- a/sw/source/core/inc/layact.hxx
+++ b/sw/source/core/inc/layact.hxx
@@ -97,11 +97,6 @@ class SwLayAction
     // OD 14.04.2003 #106346# - new flag for content formatting on interrupt.
     bool    mbFormatContentOnInterrupt;
 
-    // for loop control by disabling in-row splitting within embedded tables
-    const SwPageFrame  *m_pCurPage;
-    sal_uInt16 m_nTabLevel;  // embedding level
-    sal_uInt32 m_nCallCount; // calling FormatLayoutTab on the same page
-
     void PaintContent( const SwContentFrame *, const SwPageFrame *,
                      const SwRect &rOldRect, tools::Long nOldBottom );
     bool PaintWithoutFlys( const SwRect &, const SwContentFrame *,
diff --git a/sw/source/core/inc/tabfrm.hxx b/sw/source/core/inc/tabfrm.hxx
index d0eb807297a1..7e302473a421 100644
--- a/sw/source/core/inc/tabfrm.hxx
+++ b/sw/source/core/inc/tabfrm.hxx
@@ -84,8 +84,6 @@ class SwTabFrame: public SwLayoutFrame, public SwFlowFrame
 
     bool m_bInRecalcLowerRow : 1;
 
-    bool m_bSplitRowDisabled : 1;          // loop control
-
     /**
      * Split() splits the Frame at the specified position: a Follow is
      * created and constructed and inserted directly after this.
@@ -177,14 +175,6 @@ public:
     {
         m_bInRecalcLowerRow = bNew;
     }
-    bool IsSplitRowDisabled() const
-    {
-        return m_bSplitRowDisabled;
-    }
-    void SetSplitRowDisabled()
-    {
-        m_bSplitRowDisabled = true;
-    }
 
     // #i26945#
     bool IsConsiderObjsForMinCellHeight() const
diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx
index c613507a5142..87b76cc6b4ca 100644
--- a/sw/source/core/layout/layact.cxx
+++ b/sw/source/core/layout/layact.cxx
@@ -262,10 +262,7 @@ SwLayAction::SwLayAction( SwRootFrame *pRt, SwViewShellImp *pI ) :
     m_nStartTicks( std::clock() ),
     m_nInputType( VclInputFlags::NONE ),
     m_nEndPage( USHRT_MAX ),
-    m_nCheckPageNum( USHRT_MAX ),
-    m_pCurPage( nullptr ),
-    m_nTabLevel( 0 ),
-    m_nCallCount( 0 )
+    m_nCheckPageNum( USHRT_MAX )
 {
     m_bPaintExtraData = ::IsExtraData( m_pImp->GetShell()->GetDoc() );
     m_bPaint = m_bComplete = m_bWaitAllowed = m_bCheckPages = true;
@@ -293,7 +290,6 @@ void SwLayAction::Reset()
     m_bPaint = m_bComplete = m_bWaitAllowed = m_bCheckPages = true;
     m_bInput = m_bAgain = m_bNextCycle = m_bCalcLayout = m_bIdle = m_bReschedule =
     m_bUpdateExpFields = m_bBrowseActionStop = false;
-    m_pCurPage = nullptr;
 }
 
 bool SwLayAction::RemoveEmptyBrowserPages()
@@ -1184,12 +1180,6 @@ bool SwLayAction::IsShortCut( SwPageFrame *&prPage )
 // introduce support for vertical layout
 bool SwLayAction::FormatLayout( OutputDevice *pRenderContext, SwLayoutFrame *pLay, bool bAddRect )
 {
-    // save page for loop control
-    if( pLay->IsPageFrame() && static_cast<SwPageFrame*>(pLay) != m_pCurPage )
-    {
-        m_nCallCount = 0;
-        m_pCurPage = static_cast<SwPageFrame*>(pLay);
-    }
     OSL_ENSURE( !IsAgain(), "Attention to the invalid page." );
     if ( IsAgain() )
         return false;
@@ -1371,13 +1361,6 @@ bool SwLayAction::FormatLayout( OutputDevice *pRenderContext, SwLayoutFrame *pLa
         {
             if ( pLow->IsTabFrame() )
             {
-                // loop control for embedded tables
-                if ( m_nTabLevel > 0 && ++m_nCallCount > 50 ) {
-                    static_cast<SwTabFrame*>(pLow)->SetSplitRowDisabled();
-                }
-
-                ++m_nTabLevel;
-
                 // Remember what was the next of the lower. Formatting may move it to the previous
                 // page, in which case it looses its next.
                 pNext = pLow->GetNext();
@@ -1394,7 +1377,6 @@ bool SwLayAction::FormatLayout( OutputDevice *pRenderContext, SwLayoutFrame *pLa
                 }
 
                 bTabChanged |= FormatLayoutTab( static_cast<SwTabFrame*>(pLow), bAddRect );
-                --m_nTabLevel;
             }
             // Skip the ones already registered for deletion
             else if( !pLow->IsSctFrame() || static_cast<SwSectionFrame*>(pLow)->GetSection() )
diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index 13ba152f12fe..05069534af8d 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -84,7 +84,6 @@ SwTabFrame::SwTabFrame( SwTable &rTab, SwFrame* pSib )
     , m_bConsiderObjsForMinCellHeight(true)
     , m_bObjsDoesFit(true)
     , m_bInRecalcLowerRow(false)
-    , m_bSplitRowDisabled(false)
 {
     mbFixSize = false;     //Don't fall for import filter again.
     mnFrameType = SwFrameType::Tab;
@@ -123,7 +122,6 @@ SwTabFrame::SwTabFrame( SwTabFrame &rTab )
     , m_bConsiderObjsForMinCellHeight(true)
     , m_bObjsDoesFit(true)
     , m_bInRecalcLowerRow(false)
-    , m_bSplitRowDisabled(false)
 {
     mbFixSize = false;     //Don't fall for import filter again.
     mnFrameType = SwFrameType::Tab;
@@ -1056,8 +1054,8 @@ bool SwTabFrame::Split( const SwTwips nCutPos, bool bTryToSplit, bool bTableRowK
     //                   table, or it will be set to false under certain
     //                   conditions that are not suitable for splitting
     //                   the row.
-    bool bSplitRowAllowed = !IsSplitRowDisabled();
-    if ( bSplitRowAllowed && !pRow->IsRowSplitAllowed() )
+    bool bSplitRowAllowed = true;
+    if (!pRow->IsRowSplitAllowed())
     {
         // A row larger than the entire page ought to be allowed to split regardless of setting,
         // otherwise it has hidden content and that makes no sense
commit 8656c173f6f1c1200ab79922a8a0bffc1579b683
Author:     Heiko Tietze <tietze.heiko at gmail.com>
AuthorDate: Fri Jun 4 14:42:58 2021 +0200
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Wed Jun 23 21:04:57 2021 +0200

    Resolves tdf#140360 - Provide option to turn off sidebar's minimum width
    
    Boolean option Sidebar:General:MinimumWidth introduced defaulting
    to true; if false the sidebar width is under full user control
    
    Change-Id: Iab1413a83adf90461feb5d6416aad174439392ca
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116715
    Tested-by: Jenkins
    Reviewed-by: Jim Raykowski <raykowj at gmail.com>
    (cherry picked from commit f43fdcad400b6ff51f0810d923fe75d5a2cfde0c)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117414
    Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>

diff --git a/include/sfx2/sidebar/SidebarController.hxx b/include/sfx2/sidebar/SidebarController.hxx
index 629abf405c5c..f1d874141382 100644
--- a/include/sfx2/sidebar/SidebarController.hxx
+++ b/include/sfx2/sidebar/SidebarController.hxx
@@ -190,6 +190,7 @@ private:
     /// Use a combination of SwitchFlag_* as value.
     sal_Int32 mnRequestedForceFlags;
     sal_Int32 mnMaximumSidebarWidth;
+    bool mbMinimumSidebarWidth;
     OUString msCurrentDeckId;
     AsynchronousCall maPropertyChangeForwarder;
     AsynchronousCall maContextChangeUpdate;
diff --git a/officecfg/registry/schema/org/openoffice/Office/UI/Sidebar.xcs b/officecfg/registry/schema/org/openoffice/Office/UI/Sidebar.xcs
index 9fbb0fbbcbee..e4aad7f551d2 100644
--- a/officecfg/registry/schema/org/openoffice/Office/UI/Sidebar.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/UI/Sidebar.xcs
@@ -250,6 +250,13 @@
         </info>
         <value>500</value>
       </prop>
+      <prop oor:name="MinimumWidth" oor:type="xs:boolean" oor:nillable="false">
+        <info>
+          <desc>Minimum width the sidebar can have. If true, the minumum width
+          is calculated from the largest deck.</desc>
+        </info>
+        <value>true</value>
+      </prop>
     </group>
     <group oor:name="Content">
       <info>
diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx
index c120a9cc301c..90ddc0b6c6d4 100644
--- a/sfx2/source/sidebar/SidebarController.cxx
+++ b/sfx2/source/sidebar/SidebarController.cxx
@@ -138,6 +138,7 @@ SidebarController::SidebarController (
       maRequestedContext(),
       mnRequestedForceFlags(SwitchFlag_NoForce),
       mnMaximumSidebarWidth(officecfg::Office::UI::Sidebar::General::MaximumWidth::get()),
+      mbMinimumSidebarWidth(officecfg::Office::UI::Sidebar::General::MinimumWidth::get()),
       msCurrentDeckId(gsDefaultDeckId),
       maPropertyChangeForwarder([this](){ return this->BroadcastPropertyChange(); }),
       maContextChangeUpdate([this](){ return this->UpdateConfigurations(); }),
@@ -379,7 +380,7 @@ void SAL_CALL SidebarController::requestLayout()
     if (mpCurrentDeck && !mpCurrentDeck->isDisposed())
     {
         mpCurrentDeck->RequestLayout();
-        nMinimalWidth = mpCurrentDeck->GetMinimalWidth();
+        nMinimalWidth = mbMinimumSidebarWidth ? mpCurrentDeck->GetMinimalWidth() : 0;
     }
     RestrictWidth(nMinimalWidth);
 }
@@ -474,7 +475,7 @@ void SidebarController::NotifyResize()
         DeckTitleBar* pTitleBar = mpCurrentDeck->GetTitleBar();
         if (pTitleBar && pTitleBar->GetVisible())
             pTitleBar->SetCloserVisible(CanModifyChildWindowWidth());
-        nMinimalWidth = mpCurrentDeck->GetMinimalWidth();
+        nMinimalWidth = mbMinimumSidebarWidth ? mpCurrentDeck->GetMinimalWidth() : 0;
     }
 
     RestrictWidth(nMinimalWidth);
commit 69a322ab73d27d2b79f225c2af1bd8f010f4290f
Author:     Katarina Behrens <bubli at bubli.org>
AuthorDate: Fri Jun 18 09:48:25 2021 +0200
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Wed Jun 23 21:04:56 2021 +0200

    tdf#141311: Rotation spinbox in sidebar used to have 2 decimal places
    
    regression from weld-ing (c85fcc6e1994eb8e079aaca85066ab4d67149c15)
    
    Change-Id: Iad0725fd4542ecdddb65092846dbf9d103016d9a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117408
    Tested-by: Jenkins
    Reviewed-by: Katarina Behrens <bubli at bubli.org>
    (cherry picked from commit 7a717c8b9319edcc12e50ab78554b8e0e7049cbf)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117419
    Reviewed-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>
    (cherry picked from commit 1bec8a3d3b16bb8881bd49f58d8786421ff5f839)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117554
    Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>

diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
index 50915798a068..f9d0b762e471 100644
--- a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
+++ b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
@@ -205,7 +205,7 @@ void PosSizePropertyPanel::Initialize()
     mxCbxScale->connect_toggled( LINK( this, PosSizePropertyPanel, ClickAutoHdl ) );
 
     //rotation control
-    mxCtrlDial->SetLinkedField(mxMtrAngle.get());
+    mxCtrlDial->SetLinkedField(mxMtrAngle.get(), 2);
     mxCtrlDial->SetModifyHdl(LINK( this, PosSizePropertyPanel, RotationHdl));
 
     //use same logic as DialControl_Impl::SetSize
diff --git a/svx/uiconfig/ui/sidebarpossize.ui b/svx/uiconfig/ui/sidebarpossize.ui
index b507f2bca7fa..94dade3d1f89 100644
--- a/svx/uiconfig/ui/sidebarpossize.ui
+++ b/svx/uiconfig/ui/sidebarpossize.ui
@@ -400,6 +400,7 @@
                 <property name="hexpand">True</property>
                 <property name="tooltip_text" translatable="yes" context="sidebarpossize|rotation|tooltip_text">Select the angle for rotation.</property>
                 <property name="hexpand">True</property>
+                <property name="digits">2</property>
                 <property name="adjustment">adjustmentSpinDegrees</property>
                 <property name="wrap">True</property>
                 <property name="truncate-multiline">True</property>
commit bbcf7856ea897bb390c49180ad60a7495c8a6f73
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sun Jun 20 17:42:14 2021 +0100
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Wed Jun 23 21:04:56 2021 +0200

    ofz#34221 avoid OOM
    
    Change-Id: I1987d39ea8ff195b397b0ee3fb0e45f9bfbfb572
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117516
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.stahl at allotropia.de>

diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index bc5ca4295519..b637c797225f 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -6096,23 +6096,25 @@ const OUString* SwWW8ImplReader::GetAnnotationAuthor(sal_uInt16 nIdx)
         m_pAtnNames.reset(new std::vector<OUString>);
         SvStream& rStrm = *m_pTableStream;
 
-        tools::Long nOldPos = rStrm.Tell();
-        rStrm.Seek( m_xWwFib->m_fcGrpStAtnOwners );
-
-        tools::Long nRead = 0, nCount = m_xWwFib->m_lcbGrpStAtnOwners;
-        while (nRead < nCount && rStrm.good())
+        auto nOldPos = rStrm.Tell();
+        bool bValidPos = checkSeek(rStrm, m_xWwFib->m_fcGrpStAtnOwners);
+        if (bValidPos)
         {
-            if( m_bVer67 )
-            {
-                m_pAtnNames->push_back(read_uInt8_PascalString(rStrm,
-                    RTL_TEXTENCODING_MS_1252));
-                nRead += m_pAtnNames->rbegin()->getLength() + 1; // Length + sal_uInt8 count
-            }
-            else
+            tools::Long nRead = 0, nCount = m_xWwFib->m_lcbGrpStAtnOwners;
+            while (nRead < nCount && rStrm.good())
             {
-                m_pAtnNames->push_back(read_uInt16_PascalString(rStrm));
-                // Unicode: double the length + sal_uInt16 count
-                nRead += (m_pAtnNames->rbegin()->getLength() + 1)*2;
+                if( m_bVer67 )
+                {
+                    m_pAtnNames->push_back(read_uInt8_PascalString(rStrm,
+                        RTL_TEXTENCODING_MS_1252));
+                    nRead += m_pAtnNames->rbegin()->getLength() + 1; // Length + sal_uInt8 count
+                }
+                else
+                {
+                    m_pAtnNames->push_back(read_uInt16_PascalString(rStrm));
+                    // Unicode: double the length + sal_uInt16 count
+                    nRead += (m_pAtnNames->rbegin()->getLength() + 1)*2;
+                }
             }
         }
         rStrm.Seek( nOldPos );
commit 82696d04cc752cf8db926699281ed570be57f7e4
Author:     Julien Nabet <serval2412 at yahoo.fr>
AuthorDate: Tue Jun 15 22:06:48 2021 +0200
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Wed Jun 23 21:04:56 2021 +0200

    tdf#142873: Fix print preview zoom-out zoom-in buttons
    
    .uno:ZoomOut has been renamed .uno:ZoomMinus
    .uno:ZoomIn has been renamed .uno:ZoomPlus
    
    Change-Id: I06e7e66550399e53032a0df39a98846982acba48
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117279
    Tested-by: Jenkins
    Reviewed-by: Jim Raykowski <raykowj at gmail.com>
    (cherry picked from commit c21398066b6bf630070ed291456f2663e06d94b9)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117427
    Reviewed-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>

diff --git a/sc/uiconfig/scalc/ui/notebookbar.ui b/sc/uiconfig/scalc/ui/notebookbar.ui
index 3c2d2d1efaff..d63580934237 100644
--- a/sc/uiconfig/scalc/ui/notebookbar.ui
+++ b/sc/uiconfig/scalc/ui/notebookbar.ui
@@ -14995,7 +14995,7 @@
                                       <object class="GtkToolButton" id="Print-ZoomOut">
                                         <property name="visible">True</property>
                                         <property name="can_focus">False</property>
-                                        <property name="action_name">.uno:ZoomOut</property>
+                                        <property name="action_name">.uno:ZoomMinus</property>
                                       </object>
                                       <packing>
                                         <property name="expand">False</property>
@@ -15020,7 +15020,7 @@
                                       <object class="GtkToolButton" id="Print-ZoomIn">
                                         <property name="visible">True</property>
                                         <property name="can_focus">False</property>
-                                        <property name="action_name">.uno:ZoomIn</property>
+                                        <property name="action_name">.uno:ZoomPlus</property>
                                       </object>
                                       <packing>
                                         <property name="expand">False</property>
diff --git a/sc/uiconfig/scalc/ui/notebookbar_groupedbar_compact.ui b/sc/uiconfig/scalc/ui/notebookbar_groupedbar_compact.ui
index fa97921c36ab..8161fffdc2ee 100644
--- a/sc/uiconfig/scalc/ui/notebookbar_groupedbar_compact.ui
+++ b/sc/uiconfig/scalc/ui/notebookbar_groupedbar_compact.ui
@@ -11064,7 +11064,7 @@
                                       <object class="GtkToolButton" id="Print-ZoomOut">
                                         <property name="visible">True</property>
                                         <property name="can_focus">False</property>
-                                        <property name="action_name">.uno:ZoomOut</property>
+                                        <property name="action_name">.uno:ZoomMinus</property>
                                       </object>
                                       <packing>
                                         <property name="expand">False</property>
@@ -11091,7 +11091,7 @@
                                       <object class="GtkToolButton" id="Print-ZoomIn">
                                         <property name="visible">True</property>
                                         <property name="can_focus">False</property>
-                                        <property name="action_name">.uno:ZoomIn</property>
+                                        <property name="action_name">.uno:ZoomPlus</property>
                                       </object>
                                       <packing>
                                         <property name="expand">False</property>
commit 3ec3f45b28a7dfe2319e82fa21ece5b3f973210c
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Jun 18 15:46:20 2021 +0100
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Wed Jun 23 21:04:55 2021 +0200

    tdf#142852 forward surrounding-text requests to an active drawing editengine
    
    when present.
    
    As we do for related CommandEventId::[StartExtTextInput/EndExtTextInput]
    
    Change-Id: Ie5b57c8a8a1a258efc2be079a2674b1ca620dc9d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117421
    Tested-by: Jenkins
    Tested-by: Justin Luth <justin_luth at sil.org>
    Reviewed-by: Justin Luth <justin_luth at sil.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx
index e07c9fd89e6f..d28e67b9d8f9 100644
--- a/sw/source/uibase/docvw/edtwin.cxx
+++ b/sw/source/uibase/docvw/edtwin.cxx
@@ -6442,8 +6442,12 @@ void SwEditWin::SetUseInputLanguage( bool bNew )
 
 OUString SwEditWin::GetSurroundingText() const
 {
-    OUString sReturn;
     SwWrtShell& rSh = m_rView.GetWrtShell();
+
+    if (rSh.HasDrawView() && rSh.GetDrawView()->IsTextEdit())
+        return rSh.GetDrawView()->GetTextEditOutlinerView()->GetSurroundingText();
+
+    OUString sReturn;
     if( rSh.HasSelection() && !rSh.IsMultiSelection() && rSh.IsSelOnePara() )
         rSh.GetSelectedText( sReturn, ParaBreakType::ToOnlyCR  );
     else if( !rSh.HasSelection() )
@@ -6475,6 +6479,10 @@ OUString SwEditWin::GetSurroundingText() const
 Selection SwEditWin::GetSurroundingTextSelection() const
 {
     SwWrtShell& rSh = m_rView.GetWrtShell();
+
+    if (rSh.HasDrawView() && rSh.GetDrawView()->IsTextEdit())
+        return rSh.GetDrawView()->GetTextEditOutlinerView()->GetSurroundingTextSelection();
+
     if( rSh.HasSelection() )
     {
         OUString sReturn;
@@ -6510,6 +6518,9 @@ bool SwEditWin::DeleteSurroundingText(const Selection& rSelection)
 {
     SwWrtShell& rSh = m_rView.GetWrtShell();
 
+    if (rSh.HasDrawView() && rSh.GetDrawView()->IsTextEdit())
+        return rSh.GetDrawView()->GetTextEditOutlinerView()->DeleteSurroundingText(rSelection);
+
     if (rSh.HasSelection())
         return false;
 
commit bf7871731b8706bb8e40baa6d1daedcf5242ebe9
Author:     Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Mon Jun 7 17:06:13 2021 +0900
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Wed Jun 23 21:04:55 2021 +0200

    tdf#127028 "bpmn" template should have ext. otg instead of ott
    
    "bpmn" is an template for draw documents and not text documents
    (writer) so it should have the extension otg and not ott. This is
    also important for the template manager as it categorises the
    templates based on the extension, so the bpmn was not categorised
    correctly.
    
    Change-Id: I503b972711830dc3c5ab98d9c24f974862ffc540
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116775
    Tested-by: Jenkins
    Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>
    (cherry picked from commit e9a824dd6c1c33777461874d9892343d193c867d)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116907
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/extras/CustomTarget_tpldraw.mk b/extras/CustomTarget_tpldraw.mk
index 69e1f63848b7..ec878697f55a 100644
--- a/extras/CustomTarget_tpldraw.mk
+++ b/extras/CustomTarget_tpldraw.mk
@@ -25,7 +25,7 @@ extras_DRAW_MIMETYPEFILES := $(foreach atexts,$(extras_TEMPLATES_DRAW),$(atexts)
 
 
 $(call gb_CustomTarget_get_target,extras/source/templates/draw) : \
-	$(foreach atexts,$(extras_TEMPLATES_DRAW),$(call gb_CustomTarget_get_workdir,extras/source/templates/draw)/$(atexts).ott)
+	$(foreach atexts,$(extras_TEMPLATES_DRAW),$(call gb_CustomTarget_get_workdir,extras/source/templates/draw)/$(atexts).otg)
 
 $(call gb_CustomTarget_get_workdir,extras/source/templates/draw)/%/mimetype : $(SRCDIR)/extras/source/templates/draw/%/mimetype
 	$(call gb_Output_announce,templates/draw/$*/mimetype,$(true),CPY,1)
@@ -70,15 +70,15 @@ $(call gb_CustomTarget_get_workdir,extras/source/templates/draw)/%.xml : $(SRCDI
 	$(call gb_ExternalExecutable_get_command,xsltproc) --nonet -o $@ $(SRCDIR)/extras/util/compact.xsl $<
 	$(call gb_Trace_EndRange,templates/draw/$*.xml,XSL)
 
-$(call gb_CustomTarget_get_workdir,extras/source/templates/draw)/%.ott :
-	$(call gb_Output_announce,templates/draw/$*.ott,$(true),ZIP,2)
-	$(call gb_Trace_StartRange,templates/draw/$*.ott,ZIP)
+$(call gb_CustomTarget_get_workdir,extras/source/templates/draw)/%.otg :
+	$(call gb_Output_announce,templates/draw/$*.otg,$(true),ZIP,2)
+	$(call gb_Trace_StartRange,templates/draw/$*.otg,ZIP)
 	$(call gb_Helper_abbreviate_dirs,\
 		cd $(EXTRAS_DRAW_DIR) && \
 		zip -q0X --filesync --must-match $@ $(EXTRAS_DRAW_MIMEFILES_FILTER) && \
 		zip -qrX --must-match $@ $(EXTRAS_DRAW_XMLFILES_FILTER) \
 	)
-	$(call gb_Trace_EndRange,templates/draw/$*.ott,ZIP)
+	$(call gb_Trace_EndRange,templates/draw/$*.otg,ZIP)
 
 define extras_Tpldraw_make_file_deps
 $(call gb_CustomTarget_get_workdir,$(1))/$(2) : $(SRCDIR)/$(1)/$(2) \
@@ -105,7 +105,7 @@ $(eval $(foreach file,$(extras_DRAW_MIMETYPEFILES) $(extras_DRAW_XMLFILES),\
 ))
 
 $(eval $(foreach atexts,$(extras_TEMPLATES_DRAW),\
-	$(call extras_Tpldraw_make_zip_deps,extras/source/templates/draw,$(atexts).ott,$(atexts)) \
+	$(call extras_Tpldraw_make_zip_deps,extras/source/templates/draw,$(atexts).otg,$(atexts)) \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/extras/Package_tpldraw.mk b/extras/Package_tpldraw.mk
index b6d72e3eb595..05f03deabc10 100644
--- a/extras/Package_tpldraw.mk
+++ b/extras/Package_tpldraw.mk
@@ -10,7 +10,7 @@
 $(eval $(call gb_Package_Package,extras_tpldraw,$(call gb_CustomTarget_get_workdir,extras/source/templates/draw)))
 
 $(eval $(call gb_Package_add_files,extras_tpldraw,$(LIBO_SHARE_FOLDER)/template/common/draw,\
-	bpmn.ott \
+    bpmn.otg \
 ))
 
 # vim: set noet sw=4 ts=4:


More information about the Libreoffice-commits mailing list