summaryrefslogtreecommitdiff
path: root/sw/source/uibase
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-04-15 18:34:58 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-04-16 09:11:41 +0200
commit059f07f9f33460c809a93e0fda1165f5c6f6d805 (patch)
tree09bbd8b4daab16e8752b3bcf6e2d3b6602bb801a /sw/source/uibase
parent2670e980c7dbadbdc20ff23d57ad892951edc254 (diff)
fixes for code creating reversed Rectangles
ie. where left > right or top > bottom These are all places where the code is self-evidently doing the wrong thing. Found by adding asserts to tools::Rectangle. In theory, this is legit, and code that wants a proper Rectangle is supposed to be first call Justify on a Rectangle, but lots of places don't do that, and that seems very dodgy to me. So lets work towards Rectangles always being in a valid state. Change-Id: I03296a624bd9b5b193e6aa8778addfb09708cdc7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92310 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/uibase')
-rw-r--r--sw/source/uibase/uiview/view.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx
index 5f34e355bb17..f2d10b466dce 100644
--- a/sw/source/uibase/uiview/view.cxx
+++ b/sw/source/uibase/uiview/view.cxx
@@ -1290,7 +1290,7 @@ void SwView::ReadUserDataSequence ( const uno::Sequence < beans::PropertyValue >
const SwViewOption* pVOpt = m_pWrtShell->GetViewOptions();
sal_Int64 nX = rRect.Left(), nY = rRect.Top(), nLeft = rVis.Left(), nTop = rVis.Top();
- sal_Int64 nRight = LONG_MIN;
+ sal_Int64 nRight = nLeft;
sal_Int64 nBottom = LONG_MIN;
sal_Int16 nZoomType = static_cast< sal_Int16 >(pVOpt->GetZoomType());
sal_Int16 nZoomFactor = static_cast < sal_Int16 > (pVOpt->GetZoom());