diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-04-15 13:52:37 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-04-15 16:08:51 +0200 |
commit | d7855213ae60d79fc51d8b9bfe49f13200137c05 (patch) | |
tree | a9f852a6ddacffce339945e8667500d3531257a4 /sw/source/core/layout/layact.cxx | |
parent | b267650fd097f16d1b31c87a11a497294ad4ee42 (diff) |
add an IsEmpty method to tools::Size and use it
Change-Id: I7f5201e2ea6c74329336e16bf219630e38ff92cf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92264
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/core/layout/layact.cxx')
-rw-r--r-- | sw/source/core/layout/layact.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx index bf73d951705a..7f913c8a02ff 100644 --- a/sw/source/core/layout/layact.cxx +++ b/sw/source/core/layout/layact.cxx @@ -1295,14 +1295,14 @@ bool SwLayAction::FormatLayout( OutputDevice *pRenderContext, SwLayoutFrame *pLa SwRect aSpaceToPrevPage( aPageRect ); aSpaceToPrevPage.Top( aSpaceToPrevPage.Top() - nHalfDocBorder ); aSpaceToPrevPage.Bottom( pLay->getFrameArea().Top() ); - if(aSpaceToPrevPage.Height() > 0 && aSpaceToPrevPage.Width() > 0) + if(!aSpaceToPrevPage.IsEmpty()) m_pImp->GetShell()->AddPaintRect( aSpaceToPrevPage ); // left aSpaceToPrevPage = aPageRect; aSpaceToPrevPage.Left( aSpaceToPrevPage.Left() - nHalfDocBorder ); aSpaceToPrevPage.Right( pLay->getFrameArea().Left() ); - if(aSpaceToPrevPage.Height() > 0 && aSpaceToPrevPage.Width() > 0) + if(!aSpaceToPrevPage.IsEmpty()) m_pImp->GetShell()->AddPaintRect( aSpaceToPrevPage ); } if ( bNext ) @@ -1311,14 +1311,14 @@ bool SwLayAction::FormatLayout( OutputDevice *pRenderContext, SwLayoutFrame *pLa SwRect aSpaceToNextPage( aPageRect ); aSpaceToNextPage.Bottom( aSpaceToNextPage.Bottom() + nHalfDocBorder ); aSpaceToNextPage.Top( pLay->getFrameArea().Bottom() ); - if(aSpaceToNextPage.Height() > 0 && aSpaceToNextPage.Width() > 0) + if(!aSpaceToNextPage.IsEmpty()) m_pImp->GetShell()->AddPaintRect( aSpaceToNextPage ); // right aSpaceToNextPage = aPageRect; aSpaceToNextPage.Right( aSpaceToNextPage.Right() + nHalfDocBorder ); aSpaceToNextPage.Left( pLay->getFrameArea().Right() ); - if(aSpaceToNextPage.Height() > 0 && aSpaceToNextPage.Width() > 0) + if(!aSpaceToNextPage.IsEmpty()) m_pImp->GetShell()->AddPaintRect( aSpaceToNextPage ); } } |