From d0269808132f83e238cf050c8a013ae6507212e7 Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Fri, 22 Sep 2017 14:09:54 +0200 Subject: GetGraphicSource: use DocumentToGraphicRenderer::isShapeSelected() Change-Id: I50852360a29b4d5fd08277fcb2198f7956f9ebe0 Reviewed-on: https://gerrit.libreoffice.org/42654 Reviewed-by: Eike Rathke Tested-by: Eike Rathke --- svtools/source/filter/exportdialog.cxx | 11 ++--------- 1 file 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 ) { -- cgit