summaryrefslogtreecommitdiff
path: root/xmloff/source/style/prstylei.cxx
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2004-07-13 07:24:59 +0000
committerRüdiger Timm <rt@openoffice.org>2004-07-13 07:24:59 +0000
commitb820ffa48e9a22032b818273b973a9154b610f19 (patch)
tree289287f925e59799d247d6e21b006653b1bca9f3 /xmloff/source/style/prstylei.cxx
parent566cc2d7fce7abac66014329d6dfc035f283e01d (diff)
INTEGRATION: CWS oasis (1.10.248); FILE MERGED
2004/05/07 12:00:00 mib 1.10.248.3: - #i20153#: encode/decode style names (ooo2oasis missing) 2004/04/21 07:27:24 mib 1.10.248.2: - separated attribute lists for <*-properties> elements on import (#i20153#) - replaced "style:text-backgroubnd-color" with "fo:background-color" 2004/04/07 11:49:55 mib 1.10.248.1: splitted <properties>
Diffstat (limited to 'xmloff/source/style/prstylei.cxx')
-rw-r--r--xmloff/source/style/prstylei.cxx42
1 files changed, 37 insertions, 5 deletions
diff --git a/xmloff/source/style/prstylei.cxx b/xmloff/source/style/prstylei.cxx
index b066fd5afe1d..398de74a99ba 100644
--- a/xmloff/source/style/prstylei.cxx
+++ b/xmloff/source/style/prstylei.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: prstylei.cxx,v $
*
- * $Revision: 1.10 $
+ * $Revision: 1.11 $
*
- * last change: $Author: hbrinkm $ $Date: 2002-11-06 16:26:02 $
+ * last change: $Author: rt $ $Date: 2004-07-13 08:24:59 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -157,8 +157,33 @@ SvXMLImportContext *XMLPropStyleContext::CreateChildContext(
{
SvXMLImportContext *pContext = 0;
- if( XML_NAMESPACE_STYLE == nPrefix &&
- IsXMLToken( rLocalName, XML_PROPERTIES ) )
+ sal_uInt32 nFamily = 0;
+ if( XML_NAMESPACE_STYLE == nPrefix )
+ {
+ if( IsXMLToken( rLocalName, XML_GRAPHIC_PROPERTIES ) )
+ nFamily = XML_TYPE_PROP_GRAPHIC;
+ else if( IsXMLToken( rLocalName, XML_DRAWING_PAGE_PROPERTIES ) )
+ nFamily = XML_TYPE_PROP_DRAWING_PAGE;
+ else if( IsXMLToken( rLocalName, XML_TEXT_PROPERTIES ) )
+ nFamily = XML_TYPE_PROP_TEXT;
+ else if( IsXMLToken( rLocalName, XML_PARAGRAPH_PROPERTIES ) )
+ nFamily = XML_TYPE_PROP_PARAGRAPH;
+ else if( IsXMLToken( rLocalName, XML_RUBY_PROPERTIES ) )
+ nFamily = XML_TYPE_PROP_RUBY;
+ else if( IsXMLToken( rLocalName, XML_SECTION_PROPERTIES ) )
+ nFamily = XML_TYPE_PROP_SECTION;
+ else if( IsXMLToken( rLocalName, XML_TABLE_PROPERTIES ) )
+ nFamily = XML_TYPE_PROP_TABLE;
+ else if( IsXMLToken( rLocalName, XML_TABLE_COLUMN_PROPERTIES ) )
+ nFamily = XML_TYPE_PROP_TABLE_COLUMN;
+ else if( IsXMLToken( rLocalName, XML_TABLE_ROW_PROPERTIES ) )
+ nFamily = XML_TYPE_PROP_TABLE_ROW;
+ else if( IsXMLToken( rLocalName, XML_TABLE_CELL_PROPERTIES ) )
+ nFamily = XML_TYPE_PROP_TABLE_CELL;
+ else if( IsXMLToken( rLocalName, XML_CHART_PROPERTIES ) )
+ nFamily = XML_TYPE_PROP_CHART;
+ }
+ if( nFamily )
{
UniReference < SvXMLImportPropertyMapper > xImpPrMap =
((SvXMLStylesContext *)&xStyles)->GetImportPropertyMapper(
@@ -166,6 +191,7 @@ SvXMLImportContext *XMLPropStyleContext::CreateChildContext(
if( xImpPrMap.is() )
pContext = new SvXMLPropertySetContext( GetImport(), nPrefix,
rLocalName, xAttrList,
+ nFamily,
aProperties,
xImpPrMap );
}
@@ -218,7 +244,7 @@ typedef ::std::set < OUString, ::comphelper::UStringLess > PropertyNameSet;
void XMLPropStyleContext::CreateAndInsert( sal_Bool bOverwrite )
{
- const OUString& rName = GetName();
+ const OUString& rName = GetDisplayName();
if( 0 == rName.getLength() || IsDefaultStyle() )
return;
@@ -254,6 +280,8 @@ void XMLPropStyleContext::CreateAndInsert( sal_Bool bOverwrite )
bNew = !*(sal_Bool *)aAny.getValue();
}
SetNew( bNew );
+ if( rName != GetName() )
+ GetImport().AddStyleDisplayName( GetFamily(), GetName(), rName );
if( bOverwrite || bNew )
{
@@ -330,6 +358,8 @@ void XMLPropStyleContext::Finish( sal_Bool bOverwrite )
// connect parent
OUString sParent( GetParent() );
+ if( sParent.getLength() )
+ sParent = GetImport().GetStyleDisplayName( GetFamily(), sParent );
if( sParent.getLength() && !xFamilies->hasByName( sParent ) )
sParent = OUString();
@@ -366,6 +396,8 @@ void XMLPropStyleContext::Finish( sal_Bool bOverwrite )
// connect follow
OUString sFollow( GetFollow() );
+ if( sFollow.getLength() )
+ sFollow = GetImport().GetStyleDisplayName( GetFamily(), sFollow );
if( !sFollow.getLength() || !xFamilies->hasByName( sFollow ) )
sFollow = xStyle->getName();