diff options
author | Eike Rathke <erack@redhat.com> | 2017-09-19 18:36:27 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2017-09-19 18:38:18 +0200 |
commit | 9c90cf14cc200778e3689371e62fa4c19466f75c (patch) | |
tree | 5c963b210448e28e110f38e6da2f128ffd9b1d3e /svtools | |
parent | 055456b075c0c953cd6216d518b5a92e8f5b54bf (diff) |
Writer export to PNG|JPG dialog preparation, current page number nonsense
... if selection, workaround to get SvFilterOptionsDialog displayed.
Change-Id: I7ebf2bfa8054555db2365078a02effd88ce5836f
Reviewed-on: https://gerrit.libreoffice.org/42486
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/filter/DocumentToGraphicRenderer.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/svtools/source/filter/DocumentToGraphicRenderer.cxx b/svtools/source/filter/DocumentToGraphicRenderer.cxx index e5885f618df2..c5e390700189 100644 --- a/svtools/source/filter/DocumentToGraphicRenderer.cxx +++ b/svtools/source/filter/DocumentToGraphicRenderer.cxx @@ -101,9 +101,15 @@ Size DocumentToGraphicRenderer::getDocumentSizeIn100mm(sal_Int32 aCurrentPage) awt::Size aSize; + /* 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) + if (nPages >= aCurrentPage || (mbSelectionOnly && nPages > 0)) { + if (nPages < aCurrentPage) + // In case of mbSelectionOnly hit. + aCurrentPage = 1; + Sequence< beans::PropertyValue > aResult = mxRenderable->getRenderer(aCurrentPage - 1, selection, renderProperties ); for( sal_Int32 nProperty = 0, nPropertyCount = aResult.getLength(); nProperty < nPropertyCount; ++nProperty ) { |