Kaydet (Commit) f13f3b42 authored tarafından Luboš Luňák's avatar Luboš Luňák

place ooxml shapes properly to paragraph area (part of bnc#816583)

style="position:absolute;left:0" is relative to paragraph area,
not paragraph text area (which is different if it's indented).

Change-Id: I12a1d2b8a68aa3fa9c65b3d469118b5334f83d7f
üst 7dfc4da8
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#include <com/sun/star/drawing/XShapes.hpp> #include <com/sun/star/drawing/XShapes.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/text/HoriOrientation.hpp> #include <com/sun/star/text/HoriOrientation.hpp>
#include <com/sun/star/text/RelOrientation.hpp>
#include <com/sun/star/text/VertOrientation.hpp> #include <com/sun/star/text/VertOrientation.hpp>
#include <rtl/ustring.hxx> #include <rtl/ustring.hxx>
#include "oox/core/xmlfilterbase.hxx" #include "oox/core/xmlfilterbase.hxx"
...@@ -228,6 +229,8 @@ Reference< XShape > Drawing::createAndInsertXShape( const OUString& rService, ...@@ -228,6 +229,8 @@ Reference< XShape > Drawing::createAndInsertXShape( const OUString& rService,
xPropSet->setPropertyValue( OUString::createFromAscii( "VertOrient" ), makeAny( VertOrientation::NONE ) ); xPropSet->setPropertyValue( OUString::createFromAscii( "VertOrient" ), makeAny( VertOrientation::NONE ) );
xPropSet->setPropertyValue( OUString::createFromAscii( "HoriOrientPosition" ), makeAny( rShapeRect.X ) ); xPropSet->setPropertyValue( OUString::createFromAscii( "HoriOrientPosition" ), makeAny( rShapeRect.X ) );
xPropSet->setPropertyValue( OUString::createFromAscii( "VertOrientPosition" ), makeAny( rShapeRect.Y ) ); xPropSet->setPropertyValue( OUString::createFromAscii( "VertOrientPosition" ), makeAny( rShapeRect.Y ) );
xPropSet->setPropertyValue( OUString::createFromAscii( "HoriOrientRelation" ), makeAny( RelOrientation::FRAME ) );
xPropSet->setPropertyValue( OUString::createFromAscii( "VertOrientRelation" ), makeAny( RelOrientation::FRAME ) );
} }
xShape->setSize( awt::Size( rShapeRect.Width, rShapeRect.Height ) ); xShape->setSize( awt::Size( rShapeRect.Width, rShapeRect.Height ) );
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment