summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2017-09-22 14:09:54 +0200
committerEike Rathke <erack@redhat.com>2017-09-22 21:53:20 +0200
commitd0269808132f83e238cf050c8a013ae6507212e7 (patch)
treecd1336d5ae043251a137fb71d1f4908394fd2932
parent3b06d9df29dc2aef568bad5bbe10c57e78bbb81a (diff)
GetGraphicSource: use DocumentToGraphicRenderer::isShapeSelected()
Change-Id: I50852360a29b4d5fd08277fcb2198f7956f9ebe0 Reviewed-on: https://gerrit.libreoffice.org/42654 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
-rw-r--r--svtools/source/filter/exportdialog.cxx11
1 files changed, 2 insertions, 9 deletions
diff --git a/svtools/source/filter/exportdialog.cxx b/svtools/source/filter/exportdialog.cxx
index 27144326aaee..c1d6138a6ea4 100644
--- a/svtools/source/filter/exportdialog.cxx
+++ b/svtools/source/filter/exportdialog.cxx
@@ -373,15 +373,8 @@ void ExportDialog::GetGraphicSource()
{
if ( mbExportSelection ) // check if there is a selection
{
- uno::Reference< view::XSelectionSupplier > xSelectionSupplier( xController, uno::UNO_QUERY );
- if ( xSelectionSupplier.is() )
- {
- uno::Any aAny( xSelectionSupplier->getSelection() );
- if ( aAny >>= mxShapes )
- mbGraphicsSource = true;
- else if ( aAny >>= mxShape )
- mbGraphicsSource = true;
- }
+ if (DocumentToGraphicRenderer::isShapeSelected( mxShapes, mxShape, xController))
+ mbGraphicsSource = true;
}
if ( !mxShape.is() && !mxShapes.is() && mbGraphicsSource )
{