diff options
author | Eike Rathke <erack@redhat.com> | 2017-09-19 18:55:19 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2017-09-19 18:56:29 +0200 |
commit | 179da6befe2181e276a12de350e3dd80682c4b2f (patch) | |
tree | a71720a25c9f225af78b7f6f302d8de28d4a698d | |
parent | d915987bfcd99deb9446781408d475ff96b1df55 (diff) |
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>
-rw-r--r-- | filter/source/graphic/GraphicExportFilter.cxx | 2 | ||||
-rw-r--r-- | include/svtools/DocumentToGraphicRenderer.hxx | 4 | ||||
-rw-r--r-- | svtools/source/filter/DocumentToGraphicRenderer.cxx | 5 | ||||
-rw-r--r-- | svtools/source/filter/GraphicExportOptionsDialog.cxx | 2 | ||||
-rw-r--r-- | svtools/source/filter/exportdialog.cxx | 4 |
5 files changed, 12 insertions, 5 deletions
diff --git a/filter/source/graphic/GraphicExportFilter.cxx b/filter/source/graphic/GraphicExportFilter.cxx index b6d468889569..de9d68646e27 100644 --- a/filter/source/graphic/GraphicExportFilter.cxx +++ b/filter/source/graphic/GraphicExportFilter.cxx @@ -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); diff --git a/include/svtools/DocumentToGraphicRenderer.hxx b/include/svtools/DocumentToGraphicRenderer.hxx index 458f9826fb07..450672ebe7ad 100644 --- a/include/svtools/DocumentToGraphicRenderer.hxx +++ b/include/svtools/DocumentToGraphicRenderer.hxx @@ -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 ); diff --git a/svtools/source/filter/DocumentToGraphicRenderer.cxx b/svtools/source/filter/DocumentToGraphicRenderer.cxx index d3f78afa575d..459bfb925174 100644 --- a/svtools/source/filter/DocumentToGraphicRenderer.cxx +++ b/svtools/source/filter/DocumentToGraphicRenderer.cxx @@ -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); diff --git a/svtools/source/filter/GraphicExportOptionsDialog.cxx b/svtools/source/filter/GraphicExportOptionsDialog.cxx index cb7cb64c919e..60c3dc05bba4 100644 --- a/svtools/source/filter/GraphicExportOptionsDialog.cxx +++ b/svtools/source/filter/GraphicExportOptionsDialog.cxx @@ -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 diff --git a/svtools/source/filter/exportdialog.cxx b/svtools/source/filter/exportdialog.cxx index db1c77e2b38e..3de009f3daef 100644 --- a/svtools/source/filter/exportdialog.cxx +++ b/svtools/source/filter/exportdialog.cxx @@ -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 ? |