shapes with position:static (default) should be anchored inline

Visible with incorrect alignment of the image in the footer
in the doc from bnc#764745.

Change-Id: Ibea9f38f7404981a9a846c23a09f8244c6020797
This commit is contained in:
Luboš Luňák 2012-06-06 20:45:56 +02:00
parent 5de61f7a4d
commit 21eca1c73f

View file

@ -612,6 +612,10 @@ Reference< XShape > ComplexShape::implConvertAndInsert( const Reference< XShapes
aPropSet.setProperty(PROP_VertOrientPosition, rShapeRect.Y);
aPropSet.setProperty(PROP_Opaque, sal_False);
}
else if( maTypeModel.maPosition == "static" || maTypeModel.maPosition.isEmpty())
{ // static position (the default) means anchored inline
aPropSet.setProperty(PROP_AnchorType, makeAny(text::TextContentAnchorType_AS_CHARACTER));
}
if ( maTypeModel.maPositionVerticalRelative == "page" )
{
aPropSet.setProperty(PROP_VertOrientRelation, text::RelOrientation::PAGE_FRAME);