[Libreoffice-commits] core.git: sfx2/source

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Fri May 10 09:12:57 UTC 2019


 sfx2/source/appl/workwin.cxx     |    2 +-
 sfx2/source/doc/sfxbasemodel.cxx |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 3ca2a0e5f004c6ff22b5f839f4f9da2f3a02d4f5
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Thu May 9 16:33:08 2019 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Fri May 10 11:12:11 2019 +0200

    handle empty tools::Rectangle in sfx2
    
    Change-Id: I468108c74480e61215a85232421e8ce1a00e846d
    Reviewed-on: https://gerrit.libreoffice.org/72058
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/sfx2/source/appl/workwin.cxx b/sfx2/source/appl/workwin.cxx
index 12276fe01bdb..939bef94ac10 100644
--- a/sfx2/source/appl/workwin.cxx
+++ b/sfx2/source/appl/workwin.cxx
@@ -2334,7 +2334,7 @@ void SfxWorkWindow::ArrangeAutoHideWindows( SfxSplitWindow *pActSplitWin )
                 // If a Window is visible to the right, then the free region
                 // starts to the left from it, for example at the Client area
                 long nRight = aPos.X();
-                if ( nRight < aArea.Right() )
+                if ( !aArea.IsWidthEmpty() && nRight < aArea.Right() )
                     aArea.SetRight( nRight );
                 break;
             }
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index 2736a86f2d27..7261d429d919 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -982,8 +982,8 @@ Sequence< beans::PropertyValue > SAL_CALL SfxBaseModel::getArgs()
         Sequence< sal_Int32 > aRectSeq(4);
         aRectSeq[0] = aTmpRect.Left();
         aRectSeq[1] = aTmpRect.Top();
-        aRectSeq[2] = aTmpRect.Right();
-        aRectSeq[3] = aTmpRect.Bottom();
+        aRectSeq[2] = aTmpRect.IsWidthEmpty() ? aTmpRect.Left() : aTmpRect.Right();
+        aRectSeq[3] = aTmpRect.IsHeightEmpty() ? aTmpRect.Top() : aTmpRect.Bottom();
 
         seqArgsNew.realloc( ++nNewLength );
         seqArgsNew[ nNewLength - 1 ].Name = "WinExtent";


More information about the Libreoffice-commits mailing list