diff options
author | Kurt Zenker <kz@openoffice.org> | 2005-01-21 15:49:08 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2005-01-21 15:49:08 +0000 |
commit | 41fa409e6ecface7b5a66d603817b3aeb2cf96d8 (patch) | |
tree | 57d97cf6f691a25d75eecc4489cd139feb4d45dc /xmloff | |
parent | 38bb16c00f73a0ce2d38a35778cbbde5a56c8a2f (diff) |
INTEGRATION: CWS dba22 (1.64.6); FILE MERGED
2005/01/07 07:34:24 oj 1.64.6.2: RESYNC: (1.64-1.65); FILE MERGED
2004/12/29 11:30:16 fs 1.64.6.1: #i34551#
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/draw/shapeexport.cxx | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx index 470ee89c162b..6b306f4e1a26 100644 --- a/xmloff/source/draw/shapeexport.cxx +++ b/xmloff/source/draw/shapeexport.cxx @@ -2,9 +2,9 @@ * * $RCSfile: shapeexport.cxx,v $ * - * $Revision: 1.65 $ + * $Revision: 1.66 $ * - * last change: $Author: rt $ $Date: 2004-11-26 19:33:11 $ + * last change: $Author: kz $ $Date: 2005-01-21 16:49:07 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -409,20 +409,22 @@ void XMLShapeExport::collectShapeAutoStyles(const uno::Reference< drawing::XShap // yet more additionally, we need to care for the ParaAdjust property if ( XmlShapeTypeDrawControlShape == aShapeInfo.meShapeType ) { - // this is because: - // * if controls shapes have a ParaAdjust property, then this is the Align property of the control model - // * control models are allowed to have an Align of "void" - // * the Default for control model's Align is TextAlign_LEFT - // * defaults for style properties are not written, but we need to write the "left", - // because we need to distiguish this "left" from the case where not align attribute - // is present which means "void" - // 102407 - 2002-11-01 - fs@openoffice.org - static const ::rtl::OUString s_sParaAdjustPropertyName( RTL_CONSTASCII_USTRINGPARAM( "ParaAdjust" ) ); uno::Reference< beans::XPropertySetInfo > xPropSetInfo( xPropSet->getPropertySetInfo() ); - if ( xPropSetInfo.is() && xPropSetInfo->hasPropertyByName( s_sParaAdjustPropertyName ) ) + uno::Reference< beans::XPropertyState > xPropState( xPropSet, uno::UNO_QUERY ); + if ( xPropSetInfo.is() && xPropState.is() ) { - uno::Reference< beans::XPropertyState > xPropState( xPropSet, uno::UNO_QUERY ); - if ( xPropState.is() && beans::PropertyState_DEFAULT_VALUE == xPropState->getPropertyState( s_sParaAdjustPropertyName ) ) + // this is because: + // * if controls shapes have a ParaAdjust property, then this is the Align property of the control model + // * control models are allowed to have an Align of "void" + // * the Default for control model's Align is TextAlign_LEFT + // * defaults for style properties are not written, but we need to write the "left", + // because we need to distiguish this "left" from the case where not align attribute + // is present which means "void" + // 102407 - 2002-11-01 - fs@openoffice.org + static const ::rtl::OUString s_sParaAdjustPropertyName( RTL_CONSTASCII_USTRINGPARAM( "ParaAdjust" ) ); + if ( xPropSetInfo->hasPropertyByName( s_sParaAdjustPropertyName ) + && ( beans::PropertyState_DEFAULT_VALUE == xPropState->getPropertyState( s_sParaAdjustPropertyName ) ) + ) { sal_Int32 nIndex = GetExport().GetTextParagraphExport()->GetParagraphPropertyMapper()->getPropertySetMapper()->FindEntryIndex( CTF_SD_SHAPE_PARA_ADJUST ); // TODO : this retrieval of the index should be moved into the ctor, holding the index |