From 321aafced3e00aa1e5ee5b6da59cd24d949b14dd Mon Sep 17 00:00:00 2001 From: RĂ¼diger Timm Date: Fri, 6 Jun 2008 08:28:40 +0000 Subject: INTEGRATION: CWS sw30rng01 (1.37.36); FILE MERGED 2008/05/20 14:38:19 ama 1.37.36.1: Fix #i64237#: Hidden != Display --- xmloff/source/text/txtstyli.cxx | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) (limited to 'xmloff') diff --git a/xmloff/source/text/txtstyli.cxx b/xmloff/source/text/txtstyli.cxx index 5c1550777651..4d940cc363ed 100644 --- a/xmloff/source/text/txtstyli.cxx +++ b/xmloff/source/text/txtstyli.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: txtstyli.cxx,v $ - * $Revision: 1.37 $ + * $Revision: 1.38 $ * * This file is part of OpenOffice.org. * @@ -440,6 +440,7 @@ void XMLTextStyleContext::FillPropertySet( { CTF_COMBINED_CHARACTERS_FIELD, -1 }, { CTF_KEEP_TOGETHER, -1 }, { CTF_BORDER_MODEL, -1 }, + { CTF_TEXT_DISPLAY, -1 }, { CTF_FONTFAMILYNAME, -1 }, { CTF_FONTFAMILYNAME_CJK, -1 }, { CTF_FONTFAMILYNAME_CTL, -1 }, @@ -518,8 +519,8 @@ void XMLTextStyleContext::FillPropertySet( if (!xInfo.is()) xInfo.set(rPropSet->getPropertySetInfo()); - // iterate over aContextIDs entries 1..3 - for ( sal_Int32 i = 2; i < 5; i++ ) + // iterate over aContextIDs entries 3..6 + for ( sal_Int32 i = 3; i < 7; i++ ) { nIndex = aContextIDs[i].nIndex; if ( nIndex != -1 ) @@ -528,6 +529,30 @@ void XMLTextStyleContext::FillPropertySet( struct XMLPropertyState& rState = GetProperties()[nIndex]; Any rAny = rState.maValue; sal_Int32 nMapperIndex = rState.mnIndex; + if( i == 3 ) + { + if( SvXMLImport::OOo_2x != GetImport().getGeneratorVersion() ) + continue; + sal_Bool bHidden; + rAny >>= bHidden; + bHidden = !bHidden; + Any aAny( rAny ); + aAny <<= bHidden; + // get property set mapper + UniReference rPropMapper = + xImpPrMap->getPropertySetMapper(); + + // set property + OUString rPropertyName( + rPropMapper->GetEntryAPIName(nMapperIndex) ); + if( !xInfo.is() ) + xInfo = rPropSet->getPropertySetInfo(); + if ( xInfo->hasPropertyByName( rPropertyName ) ) + { + rPropSet->setPropertyValue( rPropertyName, aAny ); + } + continue; + } // Now check for font name in rState and set corrected value, // if necessary. -- cgit