summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2008-06-06 08:28:40 +0000
committerRüdiger Timm <rt@openoffice.org>2008-06-06 08:28:40 +0000
commit321aafced3e00aa1e5ee5b6da59cd24d949b14dd (patch)
tree9b3836c8a09a94747e67da5d0960cd7d1dd0004c /xmloff
parent083dd2f698964b8b2fe60a6f24afaebc4d598d19 (diff)
INTEGRATION: CWS sw30rng01 (1.37.36); FILE MERGED
2008/05/20 14:38:19 ama 1.37.36.1: Fix #i64237#: Hidden != Display
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/text/txtstyli.cxx31
1 files changed, 28 insertions, 3 deletions
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<XMLPropertySetMapper> 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.