diff options
author | Daniel Vogelheim <dvo@openoffice.org> | 2000-11-21 10:53:19 +0000 |
---|---|---|
committer | Daniel Vogelheim <dvo@openoffice.org> | 2000-11-21 10:53:19 +0000 |
commit | 07f98249d061cfd60047e9f73d16f6465fd81ed6 (patch) | |
tree | 6582fab56eff8d4287520d373d0b1a8ae7c285d5 | |
parent | 6ff110678d1a4b10dd571ecab9c951fba884877e (diff) |
- added/fixed: text:use-index-source-styles property
-rw-r--r-- | xmloff/inc/xmlkywd.hxx | 5 | ||||
-rw-r--r-- | xmloff/source/text/XMLIndexSourceBaseContext.cxx | 7 | ||||
-rw-r--r-- | xmloff/source/text/XMLIndexSourceBaseContext.hxx | 7 | ||||
-rw-r--r-- | xmloff/source/text/XMLIndexTOCSourceContext.cxx | 23 | ||||
-rw-r--r-- | xmloff/source/text/XMLIndexTOCSourceContext.hxx | 6 | ||||
-rw-r--r-- | xmloff/source/text/XMLIndexUserSourceContext.cxx | 20 | ||||
-rw-r--r-- | xmloff/source/text/XMLIndexUserSourceContext.hxx | 6 | ||||
-rw-r--r-- | xmloff/source/text/XMLSectionExport.cxx | 21 | ||||
-rw-r--r-- | xmloff/source/text/XMLSectionExport.hxx | 5 |
9 files changed, 72 insertions, 28 deletions
diff --git a/xmloff/inc/xmlkywd.hxx b/xmloff/inc/xmlkywd.hxx index 7e9a12fde2..4b6044716e 100644 --- a/xmloff/inc/xmlkywd.hxx +++ b/xmloff/inc/xmlkywd.hxx @@ -2,9 +2,9 @@ * * $RCSfile: xmlkywd.hxx,v $ * - * $Revision: 1.42 $ + * $Revision: 1.43 $ * - * last change: $Author: sab $ $Date: 2000-11-20 11:33:42 $ + * last change: $Author: dvo $ $Date: 2000-11-21 11:53:19 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -1362,6 +1362,7 @@ XML_CONSTASCII_ACTION( sXML_use_floating_frames, "use-floating-frames" ); XML_CONSTASCII_ACTION( sXML_use_graphics, "use-graphics" ); XML_CONSTASCII_ACTION( sXML_use_image_objects, "use-image-objects" ); XML_CONSTASCII_ACTION( sXML_use_index_marks, "use-index-marks" ); +XML_CONSTASCII_ACTION( sXML_use_index_source_styles, "use-index-source-styles" ); XML_CONSTASCII_ACTION( sXML_use_keys_as_entries, "use-keys-as-entries" ); XML_CONSTASCII_ACTION( sXML_use_label, "use-label" ); XML_CONSTASCII_ACTION( sXML_use_math_objects, "use-math-objects" ); diff --git a/xmloff/source/text/XMLIndexSourceBaseContext.cxx b/xmloff/source/text/XMLIndexSourceBaseContext.cxx index cef7e29e0f..276bd52628 100644 --- a/xmloff/source/text/XMLIndexSourceBaseContext.cxx +++ b/xmloff/source/text/XMLIndexSourceBaseContext.cxx @@ -2,9 +2,9 @@ * * $RCSfile: XMLIndexSourceBaseContext.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: dvo $ $Date: 2000-11-20 19:56:50 $ + * last change: $Author: dvo $ $Date: 2000-11-21 11:53:19 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -215,6 +215,9 @@ static __FAR_DATA SvXMLTokenMapEntry aIndexSourceTokenMap[] = { XML_NAMESPACE_TEXT, sXML_comma_separated, XML_TOK_INDEXSOURCE_COMMA_SEPARATED }, + { XML_NAMESPACE_TEXT, + sXML_use_index_source_styles, + XML_TOK_INDEXSOURCE_USE_INDEX_SOURCE_STYLES }, XML_TOKEN_MAP_END }; diff --git a/xmloff/source/text/XMLIndexSourceBaseContext.hxx b/xmloff/source/text/XMLIndexSourceBaseContext.hxx index 6aa1a6dd28..bc344f18e9 100644 --- a/xmloff/source/text/XMLIndexSourceBaseContext.hxx +++ b/xmloff/source/text/XMLIndexSourceBaseContext.hxx @@ -2,9 +2,9 @@ * * $RCSfile: XMLIndexSourceBaseContext.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: dvo $ $Date: 2000-11-20 19:56:50 $ + * last change: $Author: dvo $ $Date: 2000-11-21 11:53:19 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -108,7 +108,8 @@ enum IndexSourceParamEnum XML_TOK_INDEXSOURCE_USE_CAPTION, XML_TOK_INDEXSOURCE_SEQUENCE_NAME, XML_TOK_INDEXSOURCE_SEQUENCE_FORMAT, - XML_TOK_INDEXSOURCE_COMMA_SEPARATED + XML_TOK_INDEXSOURCE_COMMA_SEPARATED, + XML_TOK_INDEXSOURCE_USE_INDEX_SOURCE_STYLES }; diff --git a/xmloff/source/text/XMLIndexTOCSourceContext.cxx b/xmloff/source/text/XMLIndexTOCSourceContext.cxx index 5e91a6ac9a..0c64d940ed 100644 --- a/xmloff/source/text/XMLIndexTOCSourceContext.cxx +++ b/xmloff/source/text/XMLIndexTOCSourceContext.cxx @@ -2,9 +2,9 @@ * * $RCSfile: XMLIndexTOCSourceContext.cxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: dvo $ $Date: 2000-11-20 19:56:50 $ + * last change: $Author: dvo $ $Date: 2000-11-21 11:53:19 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -133,6 +133,7 @@ const sal_Char sAPI_CreateFromChapter[] = "CreateFromChapter"; const sal_Char sAPI_CreateFromOutline[] = "CreateFromOutline"; const sal_Char sAPI_CreateFromMarks[] = "CreateFromMarks"; const sal_Char sAPI_Level[] = "Level"; +const sal_Char sAPI_CreateFromLevelParagraphStyles[] = "CreateFromLevelParagraphStyles"; TYPEINIT1( XMLIndexTOCSourceContext, XMLIndexSourceBaseContext ); @@ -150,7 +151,10 @@ XMLIndexTOCSourceContext::XMLIndexTOCSourceContext( bUseMarks(sal_True), sCreateFromMarks(RTL_CONSTASCII_USTRINGPARAM(sAPI_CreateFromMarks)), sLevel(RTL_CONSTASCII_USTRINGPARAM(sAPI_Level)), - sCreateFromOutline(RTL_CONSTASCII_USTRINGPARAM(sAPI_CreateFromOutline)) + sCreateFromOutline(RTL_CONSTASCII_USTRINGPARAM(sAPI_CreateFromOutline)), + sCreateFromLevelParagraphStyles(RTL_CONSTASCII_USTRINGPARAM( + sAPI_CreateFromLevelParagraphStyles)), + bUseParagraphStyles(sal_False) { } @@ -192,6 +196,16 @@ void XMLIndexTOCSourceContext::ProcessAttribute( break; } + case XML_TOK_INDEXSOURCE_USE_INDEX_SOURCE_STYLES: + { + sal_Bool bTmp; + if (SvXMLUnitConverter::convertBool(bTmp, rValue)) + { + bUseParagraphStyles = bTmp; + } + break; + } + default: // default: ask superclass XMLIndexSourceBaseContext::ProcessAttribute(eParam, rValue); @@ -209,6 +223,9 @@ void XMLIndexTOCSourceContext::EndElement() aAny.setValue(&bUseOutline, ::getBooleanCppuType()); rIndexPropertySet->setPropertyValue(sCreateFromOutline, aAny); + aAny.setValue(&bUseParagraphStyles, ::getBooleanCppuType()); + rIndexPropertySet->setPropertyValue(sCreateFromLevelParagraphStyles, aAny); + aAny <<= (sal_Int16)nOutlineLevel; rIndexPropertySet->setPropertyValue(sLevel, aAny); diff --git a/xmloff/source/text/XMLIndexTOCSourceContext.hxx b/xmloff/source/text/XMLIndexTOCSourceContext.hxx index b95f880a6f..f05ab353a3 100644 --- a/xmloff/source/text/XMLIndexTOCSourceContext.hxx +++ b/xmloff/source/text/XMLIndexTOCSourceContext.hxx @@ -2,9 +2,9 @@ * * $RCSfile: XMLIndexTOCSourceContext.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: dvo $ $Date: 2000-11-14 14:42:50 $ + * last change: $Author: dvo $ $Date: 2000-11-21 11:53:19 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -87,10 +87,12 @@ class XMLIndexTOCSourceContext : public XMLIndexSourceBaseContext const ::rtl::OUString sLevel; const ::rtl::OUString sCreateFromChapter; const ::rtl::OUString sCreateFromOutline; + const ::rtl::OUString sCreateFromLevelParagraphStyles; sal_Int32 nOutlineLevel; sal_Bool bUseOutline; sal_Bool bUseMarks; + sal_Bool bUseParagraphStyles; public: diff --git a/xmloff/source/text/XMLIndexUserSourceContext.cxx b/xmloff/source/text/XMLIndexUserSourceContext.cxx index 0fe04c65ac..75e60c6657 100644 --- a/xmloff/source/text/XMLIndexUserSourceContext.cxx +++ b/xmloff/source/text/XMLIndexUserSourceContext.cxx @@ -2,9 +2,9 @@ * * $RCSfile: XMLIndexUserSourceContext.cxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: dvo $ $Date: 2000-11-14 14:42:50 $ + * last change: $Author: dvo $ $Date: 2000-11-21 11:53:19 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -133,6 +133,7 @@ const sal_Char sAPI_CreateFromMarks[] = "CreateFromMarks"; const sal_Char sAPI_CreateFromTables[] = "CreateFromTables"; const sal_Char sAPI_CreateFromTextFrames[] = "CreateFromTextFrames"; const sal_Char sAPI_UseLevelFromSource[] = "UseLevelFromSource"; +const sal_Char sAPI_CreateFromLevelParagraphStyles[] = "CreateFromLevelParagraphStyles"; TYPEINIT1(XMLIndexUserSourceContext, XMLIndexSourceBaseContext); @@ -154,12 +155,15 @@ XMLIndexUserSourceContext::XMLIndexUserSourceContext( sAPI_CreateFromTextFrames)), sUseLevelFromSource(RTL_CONSTASCII_USTRINGPARAM( sAPI_UseLevelFromSource)), + sCreateFromLevelParagraphStyles(RTL_CONSTASCII_USTRINGPARAM( + sAPI_CreateFromLevelParagraphStyles)), bUseObjects(sal_False), bUseGraphic(sal_False), bUseMarks(sal_False), bUseTables(sal_False), bUseFrames(sal_False), - bUseLevelFromSource(sal_False) + bUseLevelFromSource(sal_False), + bUseLevelParagraphStyles(sal_False) { } @@ -217,6 +221,13 @@ void XMLIndexUserSourceContext::ProcessAttribute( } break; + case XML_TOK_INDEXSOURCE_USE_INDEX_SOURCE_STYLES: + if (SvXMLUnitConverter::convertBool(bTmp, rValue)) + { + bUseLevelParagraphStyles = bTmp; + } + break; + default: XMLIndexSourceBaseContext::ProcessAttribute(eParam, rValue); break; @@ -246,6 +257,9 @@ void XMLIndexUserSourceContext::EndElement() aAny.setValue(&bUseFrames, ::getBooleanCppuType()); rIndexPropertySet->setPropertyValue(sCreateFromTextFrames, aAny); + aAny.setValue(&bUseLevelParagraphStyles, ::getBooleanCppuType()); + rIndexPropertySet->setPropertyValue(sCreateFromLevelParagraphStyles, aAny); + XMLIndexSourceBaseContext::EndElement(); } diff --git a/xmloff/source/text/XMLIndexUserSourceContext.hxx b/xmloff/source/text/XMLIndexUserSourceContext.hxx index fa9601abe6..65dd399707 100644 --- a/xmloff/source/text/XMLIndexUserSourceContext.hxx +++ b/xmloff/source/text/XMLIndexUserSourceContext.hxx @@ -2,9 +2,9 @@ * * $RCSfile: XMLIndexUserSourceContext.hxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: dvo $ $Date: 2000-11-14 14:42:50 $ + * last change: $Author: dvo $ $Date: 2000-11-21 11:53:19 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -89,6 +89,7 @@ class XMLIndexUserSourceContext : public XMLIndexSourceBaseContext const ::rtl::OUString sCreateFromTables; const ::rtl::OUString sCreateFromTextFrames; const ::rtl::OUString sUseLevelFromSource; + const ::rtl::OUString sCreateFromLevelParagraphStyles; sal_Bool bUseObjects; sal_Bool bUseGraphic; @@ -96,6 +97,7 @@ class XMLIndexUserSourceContext : public XMLIndexSourceBaseContext sal_Bool bUseTables; sal_Bool bUseFrames; sal_Bool bUseLevelFromSource; + sal_Bool bUseLevelParagraphStyles; public: diff --git a/xmloff/source/text/XMLSectionExport.cxx b/xmloff/source/text/XMLSectionExport.cxx index 48fe6338fd..55ffb0dd16 100644 --- a/xmloff/source/text/XMLSectionExport.cxx +++ b/xmloff/source/text/XMLSectionExport.cxx @@ -2,9 +2,9 @@ * * $RCSfile: XMLSectionExport.cxx,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: dvo $ $Date: 2000-11-21 09:39:34 $ + * last change: $Author: dvo $ $Date: 2000-11-21 11:53:19 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -233,6 +233,8 @@ XMLSectionExport::XMLSectionExport( sIsCommaSeparated(RTL_CONSTASCII_USTRINGPARAM("IsCommaSeparated")), sIsAutomaticUpdate(RTL_CONSTASCII_USTRINGPARAM("IsAutomaticUpdate")), sIsRelativeTabstops(RTL_CONSTASCII_USTRINGPARAM("IsRelativeTabstops")), + sCreateFromLevelParagraphStyles( + RTL_CONSTASCII_USTRINGPARAM("CreateFromLevelParagraphStyles")), sTableOfContent(RTL_CONSTASCII_USTRINGPARAM(sXML_table_of_content)), sIllustrationIndex(RTL_CONSTASCII_USTRINGPARAM(sXML_illustration_index)), sAlphabeticalIndex(RTL_CONSTASCII_USTRINGPARAM(sXML_alphabetical_index)), @@ -591,13 +593,12 @@ void XMLSectionExport::ExportTableOfContentStart( } // use index marks - aAny = rPropertySet->getPropertyValue(sCreateFromMarks); - if (! (*(sal_Bool*)aAny.getValue())) - { - GetExport().AddAttributeASCII(XML_NAMESPACE_TEXT, - sXML_use_index_marks, - sXML_true); - } + ExportBoolean(rPropertySet, sCreateFromMarks, + sXML_use_index_marks, sal_True); + + // use level styles + ExportBoolean(rPropertySet, sCreateFromLevelParagraphStyles, + sXML_use_index_source_styles, sal_False); ExportBaseIndexSource(TEXT_SECTION_TYPE_TOC, rPropertySet); } @@ -730,6 +731,8 @@ void XMLSectionExport::ExportUserIndexStart( sXML_use_floating_frames, sal_False); ExportBoolean(rPropertySet, sUseLevelFromSource, sXML_copy_outline_levels, sal_False); + ExportBoolean(rPropertySet, sCreateFromLevelParagraphStyles, + sXML_use_index_source_styles, sal_False); ExportBaseIndexSource(TEXT_SECTION_TYPE_USER, rPropertySet); } diff --git a/xmloff/source/text/XMLSectionExport.hxx b/xmloff/source/text/XMLSectionExport.hxx index e6a4d96da6..a5bcf45258 100644 --- a/xmloff/source/text/XMLSectionExport.hxx +++ b/xmloff/source/text/XMLSectionExport.hxx @@ -2,9 +2,9 @@ * * $RCSfile: XMLSectionExport.hxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: dvo $ $Date: 2000-11-20 19:56:50 $ + * last change: $Author: dvo $ $Date: 2000-11-21 11:53:19 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -165,6 +165,7 @@ class XMLSectionExport const ::rtl::OUString sIsCommaSeparated; const ::rtl::OUString sIsAutomaticUpdate; const ::rtl::OUString sIsRelativeTabstops; + const ::rtl::OUString sCreateFromLevelParagraphStyles; const ::rtl::OUString sTableOfContent; const ::rtl::OUString sIllustrationIndex; |