diff options
author | David Tardon <dtardon@redhat.com> | 2013-03-26 06:00:24 +0100 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2013-03-26 06:00:24 +0100 |
commit | d927a3cc49f2d2005813d042c0527f8d5dbe372a (patch) | |
tree | 984f67379ba82d270507bd7435f0022f301a47ec /svtools/source | |
parent | 8fe626d78f9d6dc03f9f397f0585b3542843dc1a (diff) |
WaE: unused variable 'nPages'
Change-Id: Iccc8dc88e9afe7713e5d8b7ffdd94b0a42277b23
Diffstat (limited to 'svtools/source')
-rw-r--r-- | svtools/source/filter/DocumentToGraphicRenderer.cxx | 17 |
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 ); } |