diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-05-09 16:33:08 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-05-10 11:12:11 +0200 |
commit | 3ca2a0e5f004c6ff22b5f839f4f9da2f3a02d4f5 (patch) | |
tree | a58c9539189d06bb40d9de4b20fa7068a5c26a17 /sfx2 | |
parent | c3f82afd56a8d34420a489065a786cf67b6f290d (diff) |
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@collabora.co.uk>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/appl/workwin.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/doc/sfxbasemodel.cxx | 4 |
2 files changed, 3 insertions, 3 deletions
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"; |