diff options
-rw-r--r-- | xmloff/source/text/XMLIndexTOCContext.cxx | 19 | ||||
-rw-r--r-- | xmloff/source/text/XMLIndexTOCContext.hxx | 5 | ||||
-rw-r--r-- | xmloff/source/text/XMLSectionExport.cxx | 13 | ||||
-rw-r--r-- | xmloff/source/text/XMLSectionExport.hxx | 5 |
4 files changed, 33 insertions, 9 deletions
diff --git a/xmloff/source/text/XMLIndexTOCContext.cxx b/xmloff/source/text/XMLIndexTOCContext.cxx index 8cfc208312bf..ba542f40cf69 100644 --- a/xmloff/source/text/XMLIndexTOCContext.cxx +++ b/xmloff/source/text/XMLIndexTOCContext.cxx @@ -2,9 +2,9 @@ * * $RCSfile: XMLIndexTOCContext.cxx,v $ * - * $Revision: 1.8 $ + * $Revision: 1.9 $ * - * last change: $Author: dvo $ $Date: 2001-06-29 21:07:22 $ + * last change: $Author: dvo $ $Date: 2001-08-23 09:40:43 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -226,7 +226,8 @@ XMLIndexTOCContext::XMLIndexTOCContext( bValid(sal_False), xBodyContextRef(), sTitle(RTL_CONSTASCII_USTRINGPARAM("Title")), - sIsProtected(RTL_CONSTASCII_USTRINGPARAM("IsProtected")) + sIsProtected(RTL_CONSTASCII_USTRINGPARAM("IsProtected")), + sName(RTL_CONSTASCII_USTRINGPARAM("Name")) { if (XML_NAMESPACE_TEXT == nPrfx) { @@ -384,8 +385,10 @@ void XMLIndexTOCContext::StartElement( // find text:style-name attribute and set section style // find text:protected and set value + // find text:name and set value (if not empty) sal_Int16 nCount = xAttrList->getLength(); sal_Bool bProtected = sal_False; + OUString sIndexName; for(sal_Int16 nAttr = 0; nAttr < nCount; nAttr++) { OUString sLocalName; @@ -413,11 +416,21 @@ void XMLIndexTOCContext::StartElement( bProtected = bTmp; } } + else if ( IsXMLToken( sLocalName, XML_NAME ) ) + { + sIndexName = xAttrList->getValueByIndex(nAttr); + } } } Any aAny; aAny.setValue( &bProtected, ::getBooleanCppuType() ); xTOCPropertySet->setPropertyValue( sIsProtected, aAny ); + + if (sIndexName.getLength() > 0) + { + aAny <<= sIndexName; + xTOCPropertySet->setPropertyValue( sName, aAny ); + } } } diff --git a/xmloff/source/text/XMLIndexTOCContext.hxx b/xmloff/source/text/XMLIndexTOCContext.hxx index 59b6f626bd83..ae6674f7494d 100644 --- a/xmloff/source/text/XMLIndexTOCContext.hxx +++ b/xmloff/source/text/XMLIndexTOCContext.hxx @@ -2,9 +2,9 @@ * * $RCSfile: XMLIndexTOCContext.hxx,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: dvo $ $Date: 2001-05-31 16:11:06 $ + * last change: $Author: dvo $ $Date: 2001-08-23 09:40:43 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -104,6 +104,7 @@ class XMLIndexTOCContext : public SvXMLImportContext { const ::rtl::OUString sTitle; const ::rtl::OUString sIsProtected; + const ::rtl::OUString sName; /** XPropertySet of the index */ ::com::sun::star::uno::Reference< diff --git a/xmloff/source/text/XMLSectionExport.cxx b/xmloff/source/text/XMLSectionExport.cxx index d3d456dacc4c..aa25efd27749 100644 --- a/xmloff/source/text/XMLSectionExport.cxx +++ b/xmloff/source/text/XMLSectionExport.cxx @@ -2,9 +2,9 @@ * * $RCSfile: XMLSectionExport.cxx,v $ * - * $Revision: 1.25 $ + * $Revision: 1.26 $ * - * last change: $Author: dvo $ $Date: 2001-07-02 10:18:42 $ + * last change: $Author: dvo $ $Date: 2001-08-23 09:40:43 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -232,6 +232,7 @@ XMLSectionExport::XMLSectionExport( sParaStyleLevel(RTL_CONSTASCII_USTRINGPARAM("ParaStyleLevel")), sSection(GetXMLToken(XML_SECTION)), sTitle(RTL_CONSTASCII_USTRINGPARAM("Title")), + sName(RTL_CONSTASCII_USTRINGPARAM("Name")), sUseAlphabeticalSeparators( RTL_CONSTASCII_USTRINGPARAM("UseAlphabeticalSeparators")), sUseCombinedEntries(RTL_CONSTASCII_USTRINGPARAM("UseCombinedEntries")), @@ -926,6 +927,14 @@ void XMLSectionExport::ExportBaseIndexStart( GetExport().AddAttribute(XML_NAMESPACE_TEXT, XML_PROTECTED, XML_TRUE); } + // index name + OUString sIndexName; + rPropertySet->getPropertyValue(sName) >>= sIndexName; + if ( sIndexName.getLength() > 0 ) + { + GetExport().AddAttribute(XML_NAMESPACE_TEXT, XML_NAME, sIndexName); + } + // index Element start GetExport().GetDocHandler()->ignorableWhitespace( GetExport().sWS ); GetExport().GetDocHandler()->startElement( diff --git a/xmloff/source/text/XMLSectionExport.hxx b/xmloff/source/text/XMLSectionExport.hxx index 74abfaa24bec..555d627219fb 100644 --- a/xmloff/source/text/XMLSectionExport.hxx +++ b/xmloff/source/text/XMLSectionExport.hxx @@ -2,9 +2,9 @@ * * $RCSfile: XMLSectionExport.hxx,v $ * - * $Revision: 1.12 $ + * $Revision: 1.13 $ * - * last change: $Author: dvo $ $Date: 2001-06-29 21:07:22 $ + * last change: $Author: dvo $ $Date: 2001-08-23 09:40:43 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -159,6 +159,7 @@ class XMLSectionExport const ::rtl::OUString sParaStyleLevel; const ::rtl::OUString sSection; const ::rtl::OUString sTitle; + const ::rtl::OUString sName; const ::rtl::OUString sUseAlphabeticalSeparators; const ::rtl::OUString sUseCombinedEntries; const ::rtl::OUString sUseDash; |