[Libreoffice-commits] core.git: filter/source include/svtools svtools/source

Eike Rathke erack at redhat.com
Tue Sep 19 16:56:56 UTC 2017


 filter/source/graphic/GraphicExportFilter.cxx        |    2 +-
 include/svtools/DocumentToGraphicRenderer.hxx        |    4 +++-
 svtools/source/filter/DocumentToGraphicRenderer.cxx  |    5 +++++
 svtools/source/filter/GraphicExportOptionsDialog.cxx |    2 +-
 svtools/source/filter/exportdialog.cxx               |    4 ++--
 5 files changed, 12 insertions(+), 5 deletions(-)

New commits:
commit 179da6befe2181e276a12de350e3dd80682c4b2f
Author: Eike Rathke <erack at redhat.com>
Date:   Tue Sep 19 18:55:19 2017 +0200

    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 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 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 ?


More information about the Libreoffice-commits mailing list