Rename getCurrentPageWriter() to getCurrentPage()

... and let getCurrentPageWriter() be a private implementation detail.

Change-Id: Iaa14d8eab81e5750fbaf45adc6aab66eee9018eb
Reviewed-on: https://gerrit.libreoffice.org/42488
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
This commit is contained in:
Eike Rathke
2017-09-19 18:55:19 +02:00
parent d915987bfc
commit 179da6befe
5 changed files with 12 additions and 5 deletions

View File

@@ -115,7 +115,7 @@ sal_Bool SAL_CALL GraphicExportFilter::filter( const Sequence<PropertyValue>& rD
gatherProperties(rDescriptor);
DocumentToGraphicRenderer aRenderer( mxDocument, mbSelectionOnly );
sal_Int32 nCurrentPage = aRenderer.getCurrentPageWriter();
sal_Int32 nCurrentPage = aRenderer.getCurrentPage();
Size aDocumentSizePixel = aRenderer.getDocumentSizeInPixels(nCurrentPage);
Size aTargetSizePixel(mTargetWidth, mTargetHeight);

View File

@@ -42,11 +42,13 @@ class SVT_DLLPUBLIC DocumentToGraphicRenderer
css::uno::Any getSelection() const;
sal_Int32 getCurrentPageWriter();
public:
DocumentToGraphicRenderer(const css::uno::Reference<css::lang::XComponent>& xDocument, bool bSelectionOnly);
~DocumentToGraphicRenderer();
sal_Int32 getCurrentPageWriter( );
sal_Int32 getCurrentPage();
Size getDocumentSizeInPixels( sal_Int32 nCurrentPage );

View File

@@ -181,6 +181,11 @@ Graphic DocumentToGraphicRenderer::renderToGraphic(
return Graphic(aMtf);
}
sal_Int32 DocumentToGraphicRenderer::getCurrentPage()
{
return getCurrentPageWriter();
}
sal_Int32 DocumentToGraphicRenderer::getCurrentPageWriter()
{
Reference<text::XTextViewCursorSupplier> xTextViewCursorSupplier(mxModel->getCurrentController(), UNO_QUERY);

View File

@@ -60,7 +60,7 @@ void GraphicExportOptionsDialog::dispose()
void GraphicExportOptionsDialog::initialize()
{
mCurrentPage = mRenderer.getCurrentPageWriter();
mCurrentPage = mRenderer.getCurrentPage();
mSize100mm = mRenderer.getDocumentSizeIn100mm(mCurrentPage);
// Init DPI with screen resolution, taking width. This may lead to unusual
// DPI values but ensures a size in pixels that matches the actual screen

View File

@@ -351,7 +351,7 @@ awt::Size ExportDialog::GetOriginalSize()
else if (!mbGraphicsSource)
{
DocumentToGraphicRenderer aRenderer( mxSourceDocument, mbExportSelection);
const sal_Int32 nCurrentPage = aRenderer.getCurrentPageWriter();
const sal_Int32 nCurrentPage = aRenderer.getCurrentPage();
const Size aSize = aRenderer.getDocumentSizeIn100mm( nCurrentPage);
return awt::Size( aSize.Width(), aSize.Height());
}
@@ -435,7 +435,7 @@ void ExportDialog::GetGraphicStream()
{
// Create a Graphic to be used below.
DocumentToGraphicRenderer aRenderer( mxSourceDocument, mbExportSelection);
const sal_Int32 nCurrentPage = aRenderer.getCurrentPageWriter();
const sal_Int32 nCurrentPage = aRenderer.getCurrentPage();
const Size aDocumentSizePixel = aRenderer.getDocumentSizeInPixels( nCurrentPage);
const Size aTargetSizePixel( mbIsPixelFormat ?