summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSJacobi <Sven-Jacobi@gmx.de>2013-03-05 14:54:00 +0100
committerLuboš Luňák <l.lunak@suse.cz>2013-05-28 15:06:28 +0200
commit5fee3899804931009e12b1751af7c7def90281e6 (patch)
tree2847c37d048880287aacc8bfe271c1ea5482b20c
parent9bff812099f56edfbc2efe6f2eae1913ab79661b (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>
-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 efcfa7e19b78..e64becaf97f1 100644
--- a/writerfilter/source/dmapper/GraphicImport.cxx
+++ b/writerfilter/source/dmapper/GraphicImport.cxx
@@ -926,6 +926,14 @@ void GraphicImport::lcl_attribute(Id nName, Value & val)
xGraphProps->setPropertyValue( rtl::OUString("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( );