summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorSJacobi <Sven-Jacobi@gmx.de>2013-03-05 14:54:00 +0100
committerCaolán McNamara <caolanm@redhat.com>2013-03-06 09:29:58 +0000
commit0ece7f368b499a010e3ecf2ffa193c242f9a78db (patch)
tree22dcce5e50e7126e76f5c9d3b407270e39a37933 /writerfilter
parentf7bae94ebd5318a146907e1f9c70f323df4c15e1 (diff)
docx import, fixed cropping
Change-Id: I910c2f769e88c5d9d17fc5bf072909b4b7f28ef0 Reviewed-on: https://gerrit.libreoffice.org/2557 Tested-by: Luboš Luňák <l.lunak@suse.cz> Reviewed-by: Joren De Cuyper <joren.libreoffice@telenet.be> Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/dmapper/GraphicImport.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/writerfilter/source/dmapper/GraphicImport.cxx b/writerfilter/source/dmapper/GraphicImport.cxx
index 10a17e67e829..6a0a2ce9575e 100644
--- a/writerfilter/source/dmapper/GraphicImport.cxx
+++ b/writerfilter/source/dmapper/GraphicImport.cxx
@@ -932,6 +932,14 @@ void GraphicImport::lcl_attribute(Id nName, Value & val)
xGraphProps->setPropertyValue("Width",
uno::makeAny( aSize.Width ) );
+ text::GraphicCrop aGraphicCrop( 0, 0, 0, 0 );
+ uno::Reference< beans::XPropertySet > xSourceGraphProps( xShape, uno::UNO_QUERY );
+ uno::Any aAny = xSourceGraphProps->getPropertyValue( rtl::OUString("GraphicCrop"));
+ if(aAny >>= aGraphicCrop) {
+ xGraphProps->setPropertyValue( rtl::OUString("GraphicCrop"),
+ uno::makeAny( aGraphicCrop ) );
+ }
+
// We need to drop the shape here somehow
uno::Reference< lang::XComponent > xShapeComponent( xShape, uno::UNO_QUERY );
xShapeComponent->dispose( );