summaryrefslogtreecommitdiffstats
path: root/svtools
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2013-03-26 06:00:24 +0100
committerDavid Tardon <dtardon@redhat.com>2013-03-26 06:00:24 +0100
commitd927a3cc49f2d2005813d042c0527f8d5dbe372a (patch)
tree984f67379ba82d270507bd7435f0022f301a47ec /svtools
parentdrop external include guard (diff)
downloadcore-d927a3cc49f2d2005813d042c0527f8d5dbe372a.tar.gz
core-d927a3cc49f2d2005813d042c0527f8d5dbe372a.zip
WaE: unused variable 'nPages'
Change-Id: Iccc8dc88e9afe7713e5d8b7ffdd94b0a42277b23
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/filter/DocumentToGraphicRenderer.cxx17
1 files changed, 9 insertions, 8 deletions
diff --git a/svtools/source/filter/DocumentToGraphicRenderer.cxx b/svtools/source/filter/DocumentToGraphicRenderer.cxx
index 99b4436ea31a..dd2a33001eb6 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 );
}