summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorTamás Zolnai <tamas.zolnai@collabora.com>2019-03-01 11:11:46 +0100
committerTamás Zolnai <tamas.zolnai@collabora.com>2019-03-01 13:47:55 +0100
commit5f4df4b39722b9b3aa45d669e932d054d264ffbf (patch)
tree4ac618777e69b1696a8dc1f633e29362db0274c9 /filter
parentd559c28e9e65f3be415ec2e36ee90aa147e65b84 (diff)
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.zolnai@collabora.com>
Diffstat (limited to 'filter')
-rw-r--r--filter/source/svg/svgexport.cxx2
-rw-r--r--filter/source/svg/svgfilter.cxx14
2 files changed, 7 insertions, 9 deletions
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 );
}