Author: orw
Date: Thu Apr 18 13:03:39 2013
New Revision: 1469302
URL: http://svn.apache.org/r1469302
Log:
121803: fix cropping on DOCX import
Patch by: Sven Jacobi
Review by: orw
Modified:
openoffice/trunk/main/writerfilter/source/dmapper/GraphicImport.cxx
Modified: openoffice/trunk/main/writerfilter/source/dmapper/GraphicImport.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/writerfilter/source/dmapper/GraphicImport.cxx?rev=1469302&r1=1469301&r2=1469302&view=diff
==============================================================================
--- openoffice/trunk/main/writerfilter/source/dmapper/GraphicImport.cxx
(original)
+++ openoffice/trunk/main/writerfilter/source/dmapper/GraphicImport.cxx Thu Apr
18 13:03:39 2013
@@ -1088,6 +1088,18 @@ void GraphicImport::lcl_attribute(Id nNa
uno::makeAny( aSize.Height ) );
xGraphProps->setPropertyValue(
rtl::OUString::createFromAscii( "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::createFromAscii("GraphicCrop"));
+ if ( aAny >>= aGraphicCrop )
+ {
+ xGraphProps->setPropertyValue(
+
rtl::OUString::createFromAscii("GraphicCrop"),
+ uno::makeAny( aGraphicCrop ) );
+ }
+ }
}
}
catch( const beans::UnknownPropertyException e )