filter/source/svg/svgexport.cxx | 2 -- filter/source/svg/svgfilter.cxx | 14 +++++++------- 2 files changed, 7 insertions(+), 9 deletions(-)
New commits: commit 5f4df4b39722b9b3aa45d669e932d054d264ffbf Author: Tamás Zolnai <tamas.zol...@collabora.com> AuthorDate: Fri Mar 1 11:11:46 2019 +0100 Commit: Tamás Zolnai <tamas.zol...@collabora.com> CommitDate: Fri Mar 1 13:47:55 2019 +0100 tdf#123780: Fix SVG export of Writer images Used for LO online to generate preview. Change-Id: I25107bedecc5a60e6a3ac094b7defd5dcb822138 Reviewed-on: https://gerrit.libreoffice.org/68543 Tested-by: Jenkins Reviewed-by: Tamás Zolnai <tamas.zol...@collabora.com> diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx index 6f1c759a103d..c6f9ce9bd015 100644 --- a/filter/source/svg/svgexport.cxx +++ b/filter/source/svg/svgexport.cxx @@ -704,8 +704,6 @@ bool SVGFilter::implExportWriterTextGraphic( const Reference< view::XSelectionSu SdrGrafObj* pGraphicObj = new SdrGrafObj(pSvxDrawPage->GetSdrPage()->getSdrModelFromSdrPage(), aGraphic, tools::Rectangle( aPos, aSize )); uno::Reference< drawing::XShape > xShape = GetXShapeForSdrObject(pGraphicObj); uno::Reference< XPropertySet > xShapePropSet(xShape, uno::UNO_QUERY); - css::awt::Rectangle aBoundRect (aPos.X(), aPos.Y(), aSize.Width(), aSize.Height()); - xShapePropSet->setPropertyValue("BoundRect", uno::Any(aBoundRect)); xShapePropSet->setPropertyValue("Graphic", uno::Any(xGraphic)); maShapeSelection = drawing::ShapeCollection::create(comphelper::getProcessComponentContext()); diff --git a/filter/source/svg/svgfilter.cxx b/filter/source/svg/svgfilter.cxx index 19db16e51545..183e3eb94ef4 100644 --- a/filter/source/svg/svgfilter.cxx +++ b/filter/source/svg/svgfilter.cxx @@ -577,6 +577,13 @@ bool SVGFilter::filterWriterOrCalc( const Sequence< PropertyValue >& rDescriptor if (!xSelection.is()) return false; + // Select only one draw page + uno::Reference< drawing::XDrawPagesSupplier > xDrawPagesSupplier( mxSrcDoc, uno::UNO_QUERY ); + uno::Reference<drawing::XDrawPages> xDrawPages = xDrawPagesSupplier->getDrawPages(); + uno::Reference< drawing::XDrawPage > xDrawPage( xDrawPages->getByIndex(0), uno::UNO_QUERY ); + mSelectedPages.resize( 1 ); + mSelectedPages[0] = xDrawPage; + bool bGotSelection = xSelection->getSelection() >>= maShapeSelection; if (!bGotSelection) @@ -590,13 +597,6 @@ bool SVGFilter::filterWriterOrCalc( const Sequence< PropertyValue >& rDescriptor return false; } - // Select only one draw page - uno::Reference< drawing::XDrawPagesSupplier > xDrawPagesSupplier( mxSrcDoc, uno::UNO_QUERY ); - uno::Reference<drawing::XDrawPages> xDrawPages = xDrawPagesSupplier->getDrawPages(); - uno::Reference< drawing::XDrawPage > xDrawPage( xDrawPages->getByIndex(0), uno::UNO_QUERY ); - mSelectedPages.resize( 1 ); - mSelectedPages[0] = xDrawPage; - return implExport( rDescriptor ); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits