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

Caolán McNamara caolanm at redhat.com
Tue Jan 26 07:34:36 PST 2016


 svx/source/sdr/contact/viewcontactofsdrpathobj.cxx |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

New commits:
commit ad99c633908f7c70d06812ebfb4e0696666f0158
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Jan 26 15:33:40 2016 +0000

    Resolves: tdf#97276 don't clip out line if the underlying page size is unknown
    
    Change-Id: I77d88d8020e9ac26bd6b7277e6d8afefed5e3ee7

diff --git a/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx b/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx
index 9666db1..358d5de 100644
--- a/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx
@@ -91,15 +91,17 @@ namespace sdr
             if(bIsLine)
             {
                 const SdrPage* pPage = GetPathObj().GetPage();
-                if (pPage)
+                double fPageWidth = pPage ? pPage->GetWdt() : 0.0;
+                double fPageHeight = pPage ? pPage->GetHgt() : 0.0;
+                if (fPageWidth && fPageHeight)
                 {
                     //tdf#63955 if we have an extremely long line then clip it
                     //to a very generous range of -1 page width/height vs +1
                     //page width/height to avoid oom and massive churn
                     //generating a huge polygon chain to cover the length in
                     //applyLineDashing if this line is dashed
-                    double fPageWidth = pPage->GetWdt();
-                    double fPageHeight = pPage->GetHgt();
+                    //tdf#97276 don't clip if the underlying page dimension
+                    //is unknown
                     basegfx::B2DRange aClipRange(-fPageWidth, -fPageHeight,
                                                  fPageWidth*2, fPageHeight*2);
                     aUnitPolyPolygon = basegfx::tools::clipPolyPolygonOnRange(aUnitPolyPolygon,


More information about the Libreoffice-commits mailing list