diff options
author | Daniel Vogelheim <dvo@openoffice.org> | 2002-01-09 11:57:21 +0000 |
---|---|---|
committer | Daniel Vogelheim <dvo@openoffice.org> | 2002-01-09 11:57:21 +0000 |
commit | 2ef9c9b92f8dbc0acf6e21c9eada7f9b7769cafa (patch) | |
tree | f8677f92f452e2cc3294db7d9fcde7deaeded301 | |
parent | 475c7ff86a5f54f509958563e87389edc850c8ef (diff) |
#96249# new user-index-source attribute (index-name) added
-rw-r--r-- | xmloff/dtd/text.mod | 3 | ||||
-rw-r--r-- | xmloff/source/text/XMLIndexSourceBaseContext.cxx | 5 | ||||
-rw-r--r-- | xmloff/source/text/XMLIndexSourceBaseContext.hxx | 7 | ||||
-rw-r--r-- | xmloff/source/text/XMLIndexUserSourceContext.cxx | 17 | ||||
-rw-r--r-- | xmloff/source/text/XMLIndexUserSourceContext.hxx | 6 | ||||
-rw-r--r-- | xmloff/source/text/XMLSectionExport.cxx | 11 | ||||
-rw-r--r-- | xmloff/source/text/XMLSectionExport.hxx | 5 |
7 files changed, 40 insertions, 14 deletions
diff --git a/xmloff/dtd/text.mod b/xmloff/dtd/text.mod index 6de92214ac..1d9b7bc553 100644 --- a/xmloff/dtd/text.mod +++ b/xmloff/dtd/text.mod @@ -1,5 +1,5 @@ <!-- - $Id: text.mod,v 1.38 2001-12-14 18:47:17 dvo Exp $ + $Id: text.mod,v 1.39 2002-01-09 12:57:20 dvo Exp $ The Contents of this file are made available subject to the terms of either of the following licenses @@ -876,6 +876,7 @@ <!ATTLIST text:user-index-source fo:language %string; #IMPLIED> <!ATTLIST text:user-index-source fo:country %string; #IMPLIED> <!ATTLIST text:user-index-source text:sort-algorithm %string; #IMPLIED> +<!ATTLIST text:user-index-source text:index-name %string; #IMPLIED> <!ELEMENT text:user-index-entry-template ( text:index-entry-chapter | text:index-entry-page-number | diff --git a/xmloff/source/text/XMLIndexSourceBaseContext.cxx b/xmloff/source/text/XMLIndexSourceBaseContext.cxx index 9456a10a98..f0ccb255c0 100644 --- a/xmloff/source/text/XMLIndexSourceBaseContext.cxx +++ b/xmloff/source/text/XMLIndexSourceBaseContext.cxx @@ -2,9 +2,9 @@ * * $RCSfile: XMLIndexSourceBaseContext.cxx,v $ * - * $Revision: 1.8 $ + * $Revision: 1.9 $ * - * last change: $Author: dvo $ $Date: 2001-06-29 21:07:22 $ + * last change: $Author: dvo $ $Date: 2002-01-09 12:57:21 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -223,6 +223,7 @@ static __FAR_DATA SvXMLTokenMapEntry aIndexSourceTokenMap[] = XML_TOK_INDEXSOURCE_SORT_ALGORITHM }, { XML_NAMESPACE_FO, XML_LANGUAGE, XML_TOK_INDEXSOURCE_LANGUAGE }, { XML_NAMESPACE_FO, XML_COUNTRY, XML_TOK_INDEXSOURCE_COUNTRY }, + { XML_NAMESPACE_TEXT, XML_INDEX_NAME, XML_TOK_INDEXSOURCE_USER_INDEX_NAME }, XML_TOKEN_MAP_END }; diff --git a/xmloff/source/text/XMLIndexSourceBaseContext.hxx b/xmloff/source/text/XMLIndexSourceBaseContext.hxx index 9664c04b52..4584ed7018 100644 --- a/xmloff/source/text/XMLIndexSourceBaseContext.hxx +++ b/xmloff/source/text/XMLIndexSourceBaseContext.hxx @@ -2,9 +2,9 @@ * * $RCSfile: XMLIndexSourceBaseContext.hxx,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: dvo $ $Date: 2001-06-20 14:16:28 $ + * last change: $Author: dvo $ $Date: 2002-01-09 12:57:21 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -112,7 +112,8 @@ enum IndexSourceParamEnum XML_TOK_INDEXSOURCE_USE_INDEX_SOURCE_STYLES, XML_TOK_INDEXSOURCE_SORT_ALGORITHM, XML_TOK_INDEXSOURCE_LANGUAGE, - XML_TOK_INDEXSOURCE_COUNTRY + XML_TOK_INDEXSOURCE_COUNTRY, + XML_TOK_INDEXSOURCE_USER_INDEX_NAME }; diff --git a/xmloff/source/text/XMLIndexUserSourceContext.cxx b/xmloff/source/text/XMLIndexUserSourceContext.cxx index e1fb8ad7ef..d58ca32ae4 100644 --- a/xmloff/source/text/XMLIndexUserSourceContext.cxx +++ b/xmloff/source/text/XMLIndexUserSourceContext.cxx @@ -2,9 +2,9 @@ * * $RCSfile: XMLIndexUserSourceContext.cxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: dvo $ $Date: 2001-06-29 21:07:22 $ + * last change: $Author: dvo $ $Date: 2002-01-09 12:57:21 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -138,6 +138,8 @@ const sal_Char sAPI_CreateFromTables[] = "CreateFromTables"; const sal_Char sAPI_CreateFromTextFrames[] = "CreateFromTextFrames"; const sal_Char sAPI_UseLevelFromSource[] = "UseLevelFromSource"; const sal_Char sAPI_CreateFromLevelParagraphStyles[] = "CreateFromLevelParagraphStyles"; +const sal_Char sAPI_UserIndexName[] = "UserIndexName"; + TYPEINIT1(XMLIndexUserSourceContext, XMLIndexSourceBaseContext); @@ -161,6 +163,7 @@ XMLIndexUserSourceContext::XMLIndexUserSourceContext( sAPI_UseLevelFromSource)), sCreateFromLevelParagraphStyles(RTL_CONSTASCII_USTRINGPARAM( sAPI_CreateFromLevelParagraphStyles)), + sUserIndexName(RTL_CONSTASCII_USTRINGPARAM(sAPI_UserIndexName)), bUseObjects(sal_False), bUseGraphic(sal_False), bUseMarks(sal_False), @@ -232,6 +235,10 @@ void XMLIndexUserSourceContext::ProcessAttribute( } break; + case XML_TOK_INDEXSOURCE_USER_INDEX_NAME: + sIndexName = rValue; + break; + default: XMLIndexSourceBaseContext::ProcessAttribute(eParam, rValue); break; @@ -264,6 +271,12 @@ void XMLIndexUserSourceContext::EndElement() aAny.setValue(&bUseLevelParagraphStyles, ::getBooleanCppuType()); rIndexPropertySet->setPropertyValue(sCreateFromLevelParagraphStyles, aAny); + if( sIndexName.getLength() > 0 ) + { + aAny <<= sIndexName; + rIndexPropertySet->setPropertyValue(sUserIndexName, aAny); + } + XMLIndexSourceBaseContext::EndElement(); } diff --git a/xmloff/source/text/XMLIndexUserSourceContext.hxx b/xmloff/source/text/XMLIndexUserSourceContext.hxx index 65dd399707..5f6e532e11 100644 --- a/xmloff/source/text/XMLIndexUserSourceContext.hxx +++ b/xmloff/source/text/XMLIndexUserSourceContext.hxx @@ -2,9 +2,9 @@ * * $RCSfile: XMLIndexUserSourceContext.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: dvo $ $Date: 2000-11-21 11:53:19 $ + * last change: $Author: dvo $ $Date: 2002-01-09 12:57:21 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -90,6 +90,7 @@ class XMLIndexUserSourceContext : public XMLIndexSourceBaseContext const ::rtl::OUString sCreateFromTextFrames; const ::rtl::OUString sUseLevelFromSource; const ::rtl::OUString sCreateFromLevelParagraphStyles; + const ::rtl::OUString sUserIndexName; sal_Bool bUseObjects; sal_Bool bUseGraphic; @@ -98,6 +99,7 @@ class XMLIndexUserSourceContext : public XMLIndexSourceBaseContext sal_Bool bUseFrames; sal_Bool bUseLevelFromSource; sal_Bool bUseLevelParagraphStyles; + ::rtl::OUString sIndexName; public: diff --git a/xmloff/source/text/XMLSectionExport.cxx b/xmloff/source/text/XMLSectionExport.cxx index 84731b2e05..6b0dac6fe4 100644 --- a/xmloff/source/text/XMLSectionExport.cxx +++ b/xmloff/source/text/XMLSectionExport.cxx @@ -2,9 +2,9 @@ * * $RCSfile: XMLSectionExport.cxx,v $ * - * $Revision: 1.28 $ + * $Revision: 1.29 $ * - * last change: $Author: dvo $ $Date: 2001-09-24 13:40:55 $ + * last change: $Author: dvo $ $Date: 2002-01-09 12:57:21 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -263,6 +263,7 @@ XMLSectionExport::XMLSectionExport( sProtectionKey(RTL_CONSTASCII_USTRINGPARAM("ProtectionKey")), sSortAlgorithm(RTL_CONSTASCII_USTRINGPARAM("SortAlgorithm")), sLocale(RTL_CONSTASCII_USTRINGPARAM("Locale")), + sUserIndexName(RTL_CONSTASCII_USTRINGPARAM("UserIndexName")), sEmpty() { } @@ -865,6 +866,12 @@ void XMLSectionExport::ExportUserIndexStart( ExportBoolean(rPropertySet, sCreateFromLevelParagraphStyles, XML_USE_INDEX_SOURCE_STYLES, sal_False); + Any aAny = rPropertySet->getPropertyValue( sUserIndexName ); + OUString sIndexName; + aAny >>= sIndexName; + GetExport().AddAttribute(XML_NAMESPACE_TEXT, XML_INDEX_NAME, + sIndexName); + ExportBaseIndexSource(TEXT_SECTION_TYPE_USER, rPropertySet); } diff --git a/xmloff/source/text/XMLSectionExport.hxx b/xmloff/source/text/XMLSectionExport.hxx index 8d8dec567c..e8905588c4 100644 --- a/xmloff/source/text/XMLSectionExport.hxx +++ b/xmloff/source/text/XMLSectionExport.hxx @@ -2,9 +2,9 @@ * * $RCSfile: XMLSectionExport.hxx,v $ * - * $Revision: 1.15 $ + * $Revision: 1.16 $ * - * last change: $Author: dvo $ $Date: 2001-09-24 13:40:55 $ + * last change: $Author: dvo $ $Date: 2002-01-09 12:57:21 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -179,6 +179,7 @@ class XMLSectionExport const ::rtl::OUString sProtectionKey; const ::rtl::OUString sSortAlgorithm; const ::rtl::OUString sLocale; + const ::rtl::OUString sUserIndexName; const ::rtl::OUString sEmpty; |