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

Stephan Bergmann sbergman at redhat.com
Thu Jan 8 03:04:54 PST 2015


 svx/source/unodraw/unoshap4.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 8eb880a04d17c888c2c986426e935e02ae309e7a
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Jan 8 11:55:20 2015 +0100

    HACK to avoid empty page size/div by 0 in chart2 LegendWrapper::setPosition
    
    see thread starting at
    <http://lists.freedesktop.org/archives/libreoffice/2015-January/065706.html>
    "CppunitTest_sw_ooxmlsdrexport: division by zero in
    chart2/source/controller/chartapiwrapper/LegendWrapper.cxx"
    
    Change-Id: If8fde31dff04d9a223687838df6dd9fe4e57ee8b

diff --git a/svx/source/unodraw/unoshap4.cxx b/svx/source/unodraw/unoshap4.cxx
index 0054afc..75f8846 100644
--- a/svx/source/unodraw/unoshap4.cxx
+++ b/svx/source/unodraw/unoshap4.cxx
@@ -429,7 +429,7 @@ bool SvxOle2Shape::createObject( const SvGlobalName &aClassName )
             {}
             pOle2Obj->SetLogicRect( aRect );
         }
-        else
+        else if (!aRect.IsEmpty()) //HACK: can aRect legally be empty?
         {
             awt::Size aSz;
             Size aSize = aRect.GetSize();
commit 51d004b1d761193aa092a7532748935970e82ec8
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Jan 8 10:04:00 2015 +0100

    Re-use aRect
    
    Change-Id: Ic63daa16e6931dd7842faae0d3c83ae0fdeb132f

diff --git a/svx/source/unodraw/unoshap4.cxx b/svx/source/unodraw/unoshap4.cxx
index 111883e..0054afc 100644
--- a/svx/source/unodraw/unoshap4.cxx
+++ b/svx/source/unodraw/unoshap4.cxx
@@ -432,7 +432,7 @@ bool SvxOle2Shape::createObject( const SvGlobalName &aClassName )
         else
         {
             awt::Size aSz;
-            Size aSize = pOle2Obj->GetLogicRect().GetSize();
+            Size aSize = aRect.GetSize();
             aSz.Width = aSize.Width();
             aSz.Height = aSize.Height();
             xObj->setVisualAreaSize(  pOle2Obj->GetAspect(), aSz );


More information about the Libreoffice-commits mailing list