Kaydet (Commit) 9c90cf14 authored tarafından Eike Rathke's avatar Eike Rathke

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/42486Reviewed-by: 's avatarEike Rathke <erack@redhat.com>
Tested-by: 's avatarEike Rathke <erack@redhat.com>
üst 055456b0
...@@ -101,9 +101,15 @@ Size DocumentToGraphicRenderer::getDocumentSizeIn100mm(sal_Int32 aCurrentPage) ...@@ -101,9 +101,15 @@ Size DocumentToGraphicRenderer::getDocumentSizeIn100mm(sal_Int32 aCurrentPage)
awt::Size aSize; 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 ); 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 ); Sequence< beans::PropertyValue > aResult = mxRenderable->getRenderer(aCurrentPage - 1, selection, renderProperties );
for( sal_Int32 nProperty = 0, nPropertyCount = aResult.getLength(); nProperty < nPropertyCount; ++nProperty ) for( sal_Int32 nProperty = 0, nPropertyCount = aResult.getLength(); nProperty < nPropertyCount; ++nProperty )
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment