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

David Tardon dtardon at redhat.com
Mon Mar 25 22:01:14 PDT 2013


 svtools/source/filter/DocumentToGraphicRenderer.cxx   |   17 +++++++++--------
 svx/source/customshapes/EnhancedCustomShapeEngine.hxx |    2 --
 2 files changed, 9 insertions(+), 10 deletions(-)

New commits:
commit d927a3cc49f2d2005813d042c0527f8d5dbe372a
Author: David Tardon <dtardon at redhat.com>
Date:   Tue Mar 26 06:00:24 2013 +0100

    WaE: unused variable 'nPages'
    
    Change-Id: Iccc8dc88e9afe7713e5d8b7ffdd94b0a42277b23

diff --git a/svtools/source/filter/DocumentToGraphicRenderer.cxx b/svtools/source/filter/DocumentToGraphicRenderer.cxx
index 99b4436..dd2a330 100644
--- a/svtools/source/filter/DocumentToGraphicRenderer.cxx
+++ b/svtools/source/filter/DocumentToGraphicRenderer.cxx
@@ -71,20 +71,21 @@ Size DocumentToGraphicRenderer::getDocumentSizeIn100mm(sal_Int32 aCurrentPage)
     renderProperties[2].Name = "View";
     renderProperties[2].Value <<= mxController;
 
-    Sequence< beans::PropertyValue > aResult;
+    awt::Size aSize;
 
     sal_Int32 nPages = mxRenderable->getRendererCount( selection, renderProperties );
-
-    aResult = mxRenderable->getRenderer(aCurrentPage - 1, selection, renderProperties );
-
-    awt::Size aSize;
-    for( sal_Int32 nProperty = 0, nPropertyCount = aResult.getLength(); nProperty < nPropertyCount; ++nProperty )
+    if (nPages >= aCurrentPage)
     {
-        if ( aResult[ nProperty ].Name == "PageSize" )
+        Sequence< beans::PropertyValue > aResult = mxRenderable->getRenderer(aCurrentPage - 1, selection, renderProperties );
+        for( sal_Int32 nProperty = 0, nPropertyCount = aResult.getLength(); nProperty < nPropertyCount; ++nProperty )
         {
-            aResult[ nProperty ].Value >>= aSize;
+            if ( aResult[ nProperty ].Name == "PageSize" )
+            {
+                aResult[ nProperty ].Value >>= aSize;
+            }
         }
     }
+
     return Size( aSize.Width, aSize.Height );
 }
 
commit 8fe626d78f9d6dc03f9f397f0585b3542843dc1a
Author: David Tardon <dtardon at redhat.com>
Date:   Tue Mar 26 05:45:45 2013 +0100

    drop external include guard
    
    Change-Id: I8cac4fef46e745b8256e45e5b40abc3f87128916

diff --git a/svx/source/customshapes/EnhancedCustomShapeEngine.hxx b/svx/source/customshapes/EnhancedCustomShapeEngine.hxx
index 14a3721..1c8fa43 100644
--- a/svx/source/customshapes/EnhancedCustomShapeEngine.hxx
+++ b/svx/source/customshapes/EnhancedCustomShapeEngine.hxx
@@ -26,9 +26,7 @@
 #include <com/sun/star/lang/XComponent.hpp>
 #include <com/sun/star/registry/XRegistryKey.hpp>
 #include <cppuhelper/implbase3.hxx>
-#ifndef __com_sun_star_awt_Rectangle_hpp_
 #include <com/sun/star/awt/Rectangle.hpp>
-#endif
 #include <com/sun/star/beans/PropertyValue.hpp>
 #include <com/sun/star/drawing/PolyPolygonBezierCoords.hpp>
 #include <com/sun/star/lang/XInitialization.hpp>


More information about the Libreoffice-commits mailing list