[Libreoffice-commits] core.git: filter/source include/svtools svtools/source
Eike Rathke
erack at redhat.com
Tue Sep 19 16:52:56 UTC 2017
filter/source/graphic/GraphicExportFilter.cxx | 6 +++---
include/svtools/DocumentToGraphicRenderer.hxx | 6 +++---
svtools/source/filter/DocumentToGraphicRenderer.cxx | 18 +++++++++---------
3 files changed, 15 insertions(+), 15 deletions(-)
New commits:
commit d915987bfcd99deb9446781408d475ff96b1df55
Author: Eike Rathke <erack at redhat.com>
Date: Tue Sep 19 18:48:44 2017 +0200
'a'CurrentPage gets on my nerves
Change-Id: Ifb6137048d7206c1f3a718331ed8b42f746052bb
Reviewed-on: https://gerrit.libreoffice.org/42487
Reviewed-by: Eike Rathke <erack at redhat.com>
Tested-by: Eike Rathke <erack at redhat.com>
diff --git a/filter/source/graphic/GraphicExportFilter.cxx b/filter/source/graphic/GraphicExportFilter.cxx
index bfc9e231ec72..b6d468889569 100644
--- a/filter/source/graphic/GraphicExportFilter.cxx
+++ b/filter/source/graphic/GraphicExportFilter.cxx
@@ -115,15 +115,15 @@ sal_Bool SAL_CALL GraphicExportFilter::filter( const Sequence<PropertyValue>& rD
gatherProperties(rDescriptor);
DocumentToGraphicRenderer aRenderer( mxDocument, mbSelectionOnly );
- sal_Int32 aCurrentPage = aRenderer.getCurrentPageWriter();
- Size aDocumentSizePixel = aRenderer.getDocumentSizeInPixels(aCurrentPage);
+ sal_Int32 nCurrentPage = aRenderer.getCurrentPageWriter();
+ Size aDocumentSizePixel = aRenderer.getDocumentSizeInPixels(nCurrentPage);
Size aTargetSizePixel(mTargetWidth, mTargetHeight);
if (mTargetWidth == 0 || mTargetHeight == 0)
aTargetSizePixel = aDocumentSizePixel;
- Graphic aGraphic = aRenderer.renderToGraphic(aCurrentPage, aDocumentSizePixel, aTargetSizePixel, COL_WHITE);
+ Graphic aGraphic = aRenderer.renderToGraphic(nCurrentPage, aDocumentSizePixel, aTargetSizePixel, COL_WHITE);
GraphicFilter& rFilter = GraphicFilter::GetGraphicFilter();
diff --git a/include/svtools/DocumentToGraphicRenderer.hxx b/include/svtools/DocumentToGraphicRenderer.hxx
index 2e6ee141773a..458f9826fb07 100644
--- a/include/svtools/DocumentToGraphicRenderer.hxx
+++ b/include/svtools/DocumentToGraphicRenderer.hxx
@@ -48,11 +48,11 @@ public:
sal_Int32 getCurrentPageWriter( );
- Size getDocumentSizeInPixels( sal_Int32 aCurrentPage );
+ Size getDocumentSizeInPixels( sal_Int32 nCurrentPage );
- Size getDocumentSizeIn100mm( sal_Int32 aCurrentPage );
+ Size getDocumentSizeIn100mm( sal_Int32 nCurrentPage );
- Graphic renderToGraphic(sal_Int32 aCurrentPage, Size aDocumentSizePixel,
+ Graphic renderToGraphic( sal_Int32 nCurrentPage, Size aDocumentSizePixel,
Size aTargetSizePixel, Color aPageColor);
};
diff --git a/svtools/source/filter/DocumentToGraphicRenderer.cxx b/svtools/source/filter/DocumentToGraphicRenderer.cxx
index c5e390700189..d3f78afa575d 100644
--- a/svtools/source/filter/DocumentToGraphicRenderer.cxx
+++ b/svtools/source/filter/DocumentToGraphicRenderer.cxx
@@ -52,9 +52,9 @@ DocumentToGraphicRenderer::~DocumentToGraphicRenderer()
{
}
-Size DocumentToGraphicRenderer::getDocumentSizeInPixels(sal_Int32 aCurrentPage)
+Size DocumentToGraphicRenderer::getDocumentSizeInPixels(sal_Int32 nCurrentPage)
{
- Size aSize100mm = getDocumentSizeIn100mm(aCurrentPage);
+ Size aSize100mm = getDocumentSizeIn100mm(nCurrentPage);
return Application::GetDefaultDevice()->LogicToPixel( aSize100mm, MapUnit::Map100thMM );
}
@@ -81,7 +81,7 @@ uno::Any DocumentToGraphicRenderer::getSelection() const
return aSelection;
}
-Size DocumentToGraphicRenderer::getDocumentSizeIn100mm(sal_Int32 aCurrentPage)
+Size DocumentToGraphicRenderer::getDocumentSizeIn100mm(sal_Int32 nCurrentPage)
{
Reference< awt::XDevice > xDevice(mxToolkit->createScreenCompatibleDevice( 32, 32 ) );
@@ -104,13 +104,13 @@ Size DocumentToGraphicRenderer::getDocumentSizeIn100mm(sal_Int32 aCurrentPage)
/* TODO: the whole absolute "current page" number concept is useless when
* it comes to selections, rework that. */
sal_Int32 nPages = mxRenderable->getRendererCount( selection, renderProperties );
- if (nPages >= aCurrentPage || (mbSelectionOnly && nPages > 0))
+ if (nPages >= nCurrentPage || (mbSelectionOnly && nPages > 0))
{
- if (nPages < aCurrentPage)
+ if (nPages < nCurrentPage)
// In case of mbSelectionOnly hit.
- aCurrentPage = 1;
+ nCurrentPage = 1;
- Sequence< beans::PropertyValue > aResult = mxRenderable->getRenderer(aCurrentPage - 1, selection, renderProperties );
+ Sequence< beans::PropertyValue > aResult = mxRenderable->getRenderer(nCurrentPage - 1, selection, renderProperties );
for( sal_Int32 nProperty = 0, nPropertyCount = aResult.getLength(); nProperty < nPropertyCount; ++nProperty )
{
if ( aResult[ nProperty ].Name == "PageSize" )
@@ -124,7 +124,7 @@ Size DocumentToGraphicRenderer::getDocumentSizeIn100mm(sal_Int32 aCurrentPage)
}
Graphic DocumentToGraphicRenderer::renderToGraphic(
- sal_Int32 aCurrentPage,
+ sal_Int32 nCurrentPage,
Size aDocumentSizePixel,
Size aTargetSizePixel,
Color aPageColor)
@@ -172,7 +172,7 @@ Graphic DocumentToGraphicRenderer::renderToGraphic(
}
uno::Any aSelection( getSelection());
- mxRenderable->render(aCurrentPage - 1, aSelection, renderProps );
+ mxRenderable->render(nCurrentPage - 1, aSelection, renderProps );
aMtf.Stop();
aMtf.WindStart();
More information about the Libreoffice-commits
mailing list