summaryrefslogtreecommitdiff
path: root/xmloff/source/style/xmlaustp.cxx
diff options
context:
space:
mode:
authorDaniel Rentz <dr@openoffice.org>2000-10-19 11:26:13 +0000
committerDaniel Rentz <dr@openoffice.org>2000-10-19 11:26:13 +0000
commit45fec49af6181b4f7da680580680544321ca915e (patch)
tree625a62ba7660e79b2f44cc0052fb3fababeb1a40 /xmloff/source/style/xmlaustp.cxx
parente619f985a30afe93a653354609e05601747b5ad4 (diff)
moved style:page-usage from style:properties to style:page-master
Diffstat (limited to 'xmloff/source/style/xmlaustp.cxx')
-rw-r--r--xmloff/source/style/xmlaustp.cxx34
1 files changed, 30 insertions, 4 deletions
diff --git a/xmloff/source/style/xmlaustp.cxx b/xmloff/source/style/xmlaustp.cxx
index af79769ab442..2200c9b8118c 100644
--- a/xmloff/source/style/xmlaustp.cxx
+++ b/xmloff/source/style/xmlaustp.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: xmlaustp.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: dr $ $Date: 2000-10-18 11:34:12 $
+ * last change: $Author: dr $ $Date: 2000-10-19 12:26:13 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -97,6 +97,7 @@ using namespace ::std;
using namespace ::rtl;
using namespace ::com::sun::star;
+
void SvXMLAutoStylePoolP::exportStyleAttributes(
SvXMLAttributeList& rAttrList,
sal_Int32 nFamily,
@@ -105,6 +106,30 @@ void SvXMLAutoStylePoolP::exportStyleAttributes(
const SvXMLUnitConverter& rUnitConverter,
const SvXMLNamespaceMap& rNamespaceMap ) const
{
+ if( nFamily == XML_STYLE_FAMILY_PAGE_MASTER )
+ {
+ for( vector< XMLPropertyState >::const_iterator pProp = rProperties.begin(); pProp != rProperties.end(); pProp++ )
+ {
+ UniReference< XMLPropertySetMapper > aPropMapper = rPropExp.getPropertySetMapper();
+ sal_Int32 nIndex = pProp->mnIndex;
+ sal_Int16 nContextID = aPropMapper->GetEntryContextId( nIndex );
+ switch( nContextID )
+ {
+ case CTF_PM_PAGEUSAGE:
+ {
+ OUString sAttrName( rNamespaceMap.GetQNameByKey(
+ aPropMapper->GetEntryNameSpace( nIndex ), aPropMapper->GetEntryXMLName( nIndex ) ) );
+ OUString sCDATA( RTL_CONSTASCII_USTRINGPARAM( sXML_CDATA ) );
+ OUString sValue;
+ const XMLPropertyHandler* pPropHdl = aPropMapper->GetPropertyHandler( nIndex );
+ if( pPropHdl && pPropHdl->exportXML( sValue, pProp->maValue, rUnitConverter ) &&
+ (sValue.compareToAscii( sXML_all ) != 0) )
+ rAttrList.AddAttribute( sAttrName, sCDATA, sValue );
+ }
+ break;
+ }
+ }
+ }
}
void SvXMLAutoStylePoolP::exportStyleContent(
@@ -139,11 +164,12 @@ void SvXMLAutoStylePoolP::exportStyleContent(
const XMLPropertyHandler* pPropHdl = aPropMapper->GetPropertyHandler( nIndex );
if( pPropHdl )
{
- if( pPropHdl->exportXML( sValue, pProp->maValue, rUnitConverter ) )
+ if( pPropHdl->exportXML( sValue, pProp->maValue, rUnitConverter ) &&
+ (pProp->mnIndex >= 0) )
{
if( nId & CTF_PM_HEADERFLAG )
pHeaderAttr->AddAttribute( sName, sType, sValue );
- else if( nId & CTF_PM_FOOTERFLAG )
+ else
pFooterAttr->AddAttribute( sName, sType, sValue );
}
}