diff options
author | Daniel Vogelheim <dvo@openoffice.org> | 2000-11-17 17:54:34 +0000 |
---|---|---|
committer | Daniel Vogelheim <dvo@openoffice.org> | 2000-11-17 17:54:34 +0000 |
commit | 9ad9ee09c99c97ec6b483b8f2ac9c1928b86919c (patch) | |
tree | 24131cd41f37838f50d078f0833b23dbe0679cc2 | |
parent | c9a359997640331652affe961659353b0459b62e (diff) |
- fixed: empty strings in foot-/endnote configuration
- fixed: char style in foot-/endnote configuration
- fixed: image in object index
-rw-r--r-- | xmloff/inc/XMLFootnoteConfigurationImportContext.hxx | 5 | ||||
-rw-r--r-- | xmloff/inc/xmlkywd.hxx | 5 | ||||
-rw-r--r-- | xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx | 16 | ||||
-rw-r--r-- | xmloff/source/text/XMLIndexObjectSourceContext.cxx | 18 | ||||
-rw-r--r-- | xmloff/source/text/XMLIndexObjectSourceContext.hxx | 6 | ||||
-rw-r--r-- | xmloff/source/text/XMLSectionExport.cxx | 14 | ||||
-rw-r--r-- | xmloff/source/text/XMLSectionExport.hxx | 5 | ||||
-rw-r--r-- | xmloff/source/text/txtftne.cxx | 89 | ||||
-rw-r--r-- | xmloff/source/text/txtparae.cxx | 7 |
9 files changed, 88 insertions, 77 deletions
diff --git a/xmloff/inc/XMLFootnoteConfigurationImportContext.hxx b/xmloff/inc/XMLFootnoteConfigurationImportContext.hxx index 9bf224ee687f..834f9ae31e20 100644 --- a/xmloff/inc/XMLFootnoteConfigurationImportContext.hxx +++ b/xmloff/inc/XMLFootnoteConfigurationImportContext.hxx @@ -2,9 +2,9 @@ * * $RCSfile: XMLFootnoteConfigurationImportContext.hxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 17:07:01 $ + * last change: $Author: dvo $ $Date: 2000-11-17 18:54:30 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -77,6 +77,7 @@ class SvXMLImport; /// import footnote and endnote configuration elements class XMLFootnoteConfigurationImportContext : public SvXMLStyleContext { + const ::rtl::OUString sPropertyAnchorCharStyleName; const ::rtl::OUString sPropertyCharStyleName; const ::rtl::OUString sPropertyNumberingType; const ::rtl::OUString sPropertyPageStyleName; diff --git a/xmloff/inc/xmlkywd.hxx b/xmloff/inc/xmlkywd.hxx index 7172982f122c..a1aa775264b3 100644 --- a/xmloff/inc/xmlkywd.hxx +++ b/xmloff/inc/xmlkywd.hxx @@ -2,9 +2,9 @@ * * $RCSfile: xmlkywd.hxx,v $ * - * $Revision: 1.39 $ + * $Revision: 1.40 $ * - * last change: $Author: sab $ $Date: 2000-11-16 18:17:45 $ + * last change: $Author: dvo $ $Date: 2000-11-17 18:54:30 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -317,6 +317,7 @@ XML_CONSTASCII_ACTION( sXML_columnsplit_avoid, "avoid" ); XML_CONSTASCII_ACTION( sXML_combine_entries, "combine-entries" ); XML_CONSTASCII_ACTION( sXML_combine_entries_with_dash, "combine-entries-with-dash" ); XML_CONSTASCII_ACTION( sXML_combine_entries_with_pp, "combine-entries-with-pp" ); +XML_CONSTASCII_ACTION( sXML_comma_separated, "comma-separated" ); XML_CONSTASCII_ACTION( sXML_command, "command" ); XML_CONSTASCII_ACTION( sXML_comment, "comment" ); XML_CONSTASCII_ACTION( sXML_compose, "compose" ); diff --git a/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx b/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx index 1e21fad10a14..fcaf0175ff08 100644 --- a/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx +++ b/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx @@ -2,9 +2,9 @@ * * $RCSfile: XMLFootnoteConfigurationImportContext.cxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: dvo $ $Date: 2000-10-25 08:49:58 $ + * last change: $Author: dvo $ $Date: 2000-11-17 18:54:34 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -227,6 +227,8 @@ XMLFootnoteConfigurationImportContext::XMLFootnoteConfigurationImportContext( nNumbering(FootnoteNumbering::PER_PAGE), bPosition(sal_False), sPropertyCharStyleName(RTL_CONSTASCII_USTRINGPARAM("CharStyleName")), + sPropertyAnchorCharStyleName( + RTL_CONSTASCII_USTRINGPARAM("AnchorCharStyleName")), sPropertyNumberingType(RTL_CONSTASCII_USTRINGPARAM("NumberingType")), sPropertyPageStyleName(RTL_CONSTASCII_USTRINGPARAM("PageStyleName")), sPropertyParagraphStyleName( @@ -265,8 +267,8 @@ static __FAR_DATA SvXMLTokenMapEntry aTextFieldAttrTokenMap[] = { { XML_NAMESPACE_TEXT, sXML_citation_style_name, XML_TOK_FTNCONFIG_CITATION_STYLENAME }, -// { XML_NAMESPACE_TEXT, sXML_anchor_style_name, -// XML_TOK_FTNCONFIG_ANCHOR_STYLENAME }, + { XML_NAMESPACE_TEXT, sXML_citation_body_style_name, + XML_TOK_FTNCONFIG_ANCHOR_STYLENAME }, { XML_NAMESPACE_TEXT, sXML_default_style_name, XML_TOK_FTNCONFIG_DEFAULT_STYLENAME }, { XML_NAMESPACE_TEXT, sXML_master_page_name, @@ -449,6 +451,12 @@ void XMLFootnoteConfigurationImportContext::ProcessSettings( rConfig->setPropertyValue(sPropertyCharStyleName, aAny); } + if (sAnchorStyle.getLength() > 0) + { + aAny <<= sAnchorStyle; + rConfig->setPropertyValue(sPropertyAnchorCharStyleName, aAny); + } + if (sPageStyle.getLength() > 0) { aAny <<= sPageStyle; diff --git a/xmloff/source/text/XMLIndexObjectSourceContext.cxx b/xmloff/source/text/XMLIndexObjectSourceContext.cxx index 865217d53336..df12491fca16 100644 --- a/xmloff/source/text/XMLIndexObjectSourceContext.cxx +++ b/xmloff/source/text/XMLIndexObjectSourceContext.cxx @@ -2,9 +2,9 @@ * * $RCSfile: XMLIndexObjectSourceContext.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-17 18:54:34 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -151,8 +151,6 @@ XMLIndexObjectSourceContext::XMLIndexObjectSourceContext( sAPI_CreateFromStarChart)), sCreateFromStarDraw(RTL_CONSTASCII_USTRINGPARAM( sAPI_CreateFromStarDraw)), - sCreateFromStarImage(RTL_CONSTASCII_USTRINGPARAM( - sAPI_CreateFromStarImage)), sCreateFromStarMath(RTL_CONSTASCII_USTRINGPARAM( sAPI_CreateFromStarMath)), sCreateFromOtherEmbeddedObjects(RTL_CONSTASCII_USTRINGPARAM( @@ -160,7 +158,6 @@ XMLIndexObjectSourceContext::XMLIndexObjectSourceContext( bUseCalc(sal_False), bUseChart(sal_False), bUseDraw(sal_False), - bUseImage(sal_False), bUseMath(sal_False), bUseOtherObjects(sal_False) { @@ -206,13 +203,6 @@ void XMLIndexObjectSourceContext::ProcessAttribute( } break; - case XML_TOK_INDEXSOURCE_USE_IMAGE: - if (SvXMLUnitConverter::convertBool(bTmp, rValue)) - { - bUseImage = bTmp; - } - break; - case XML_TOK_INDEXSOURCE_USE_MATH: if (SvXMLUnitConverter::convertBool(bTmp, rValue)) { @@ -239,10 +229,6 @@ void XMLIndexObjectSourceContext::EndElement() aAny.setValue(&bUseDraw, ::getBooleanCppuType()); rIndexPropertySet->setPropertyValue(sCreateFromStarDraw, aAny); - aAny.setValue(&bUseImage, ::getBooleanCppuType()); -// TODO: wait for API -// rIndexPropertySet->setPropertyValue(sCreateFromStarImage, aAny); - aAny.setValue(&bUseMath, ::getBooleanCppuType()); rIndexPropertySet->setPropertyValue(sCreateFromStarMath, aAny); diff --git a/xmloff/source/text/XMLIndexObjectSourceContext.hxx b/xmloff/source/text/XMLIndexObjectSourceContext.hxx index aebfebd4a4b9..726533dcc782 100644 --- a/xmloff/source/text/XMLIndexObjectSourceContext.hxx +++ b/xmloff/source/text/XMLIndexObjectSourceContext.hxx @@ -2,9 +2,9 @@ * * $RCSfile: XMLIndexObjectSourceContext.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-17 18:54:34 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -86,14 +86,12 @@ class XMLIndexObjectSourceContext : public XMLIndexSourceBaseContext const ::rtl::OUString sCreateFromStarCalc; const ::rtl::OUString sCreateFromStarChart; const ::rtl::OUString sCreateFromStarDraw; - const ::rtl::OUString sCreateFromStarImage; const ::rtl::OUString sCreateFromStarMath; const ::rtl::OUString sCreateFromOtherEmbeddedObjects; sal_Bool bUseCalc; sal_Bool bUseChart; sal_Bool bUseDraw; - sal_Bool bUseImage; sal_Bool bUseMath; sal_Bool bUseOtherObjects; diff --git a/xmloff/source/text/XMLSectionExport.cxx b/xmloff/source/text/XMLSectionExport.cxx index 8efc5623d933..2fe63781a83b 100644 --- a/xmloff/source/text/XMLSectionExport.cxx +++ b/xmloff/source/text/XMLSectionExport.cxx @@ -2,9 +2,9 @@ * * $RCSfile: XMLSectionExport.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: dvo $ $Date: 2000-11-17 15:41:29 $ + * last change: $Author: dvo $ $Date: 2000-11-17 18:54:34 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -230,6 +230,7 @@ XMLSectionExport::XMLSectionExport( sCreateFromTables(RTL_CONSTASCII_USTRINGPARAM("CreateFromTables")), sCreateFromTextFrames(RTL_CONSTASCII_USTRINGPARAM("CreateFromTextFrames")), sUseLevelFromSource(RTL_CONSTASCII_USTRINGPARAM("UseLevelFromSource")), + sIsCommaSeparated(RTL_CONSTASCII_USTRINGPARAM("IsCommaSeparated")), sTableOfContent(RTL_CONSTASCII_USTRINGPARAM(sXML_table_of_content)), sIllustrationIndex(RTL_CONSTASCII_USTRINGPARAM(sXML_illustration_index)), sAlphabeticalIndex(RTL_CONSTASCII_USTRINGPARAM(sXML_alphabetical_index)), @@ -279,7 +280,7 @@ void XMLSectionExport::ExportIndexStart( sal_Bool bAutoStyles) { // HACK: disable index export until all problems have been resolved: - return; +// return; // get PropertySet Reference<XPropertySet> xPropertySet(rIndex, UNO_QUERY); @@ -366,7 +367,7 @@ void XMLSectionExport::ExportIndexEnd( sal_Bool bAutoStyles) { // HACK: disable index export until all problems have been resolved: - return; +// return; if (! bAutoStyles) { @@ -611,9 +612,6 @@ void XMLSectionExport::ExportObjectIndexStart( sXML_use_chart_objects, sal_False); ExportBoolean(rPropertySet, sCreateFromStarDraw, sXML_use_draw_objects,sal_False); -// TODO: wait for API -// ExportBoolean(rPropertySet, sCreateFromStarImage, -// sXML_use_image_objects, sal_False); ExportBoolean(rPropertySet, sCreateFromStarMath, sXML_use_math_objects, sal_False); @@ -693,6 +691,8 @@ void XMLSectionExport::ExportAlphabeticalIndexStart( sal_True); ExportBoolean(rPropertySet, sUseUpperCase, sXML_capitalize_entries, sal_False); + ExportBoolean(rPropertySet, sIsCommaSeparated, sXML_comma_separated, + sal_False); ExportBaseIndexSource(TEXT_SECTION_TYPE_ALPHABETICAL, rPropertySet); } diff --git a/xmloff/source/text/XMLSectionExport.hxx b/xmloff/source/text/XMLSectionExport.hxx index e40297bc2f88..7ef33d490704 100644 --- a/xmloff/source/text/XMLSectionExport.hxx +++ b/xmloff/source/text/XMLSectionExport.hxx @@ -2,9 +2,9 @@ * * $RCSfile: XMLSectionExport.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-17 18:54:34 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -162,6 +162,7 @@ class XMLSectionExport const ::rtl::OUString sUseLevelFromSource; const ::rtl::OUString sUsePP; const ::rtl::OUString sUseUpperCase; + const ::rtl::OUString sIsCommaSeparated; const ::rtl::OUString sTableOfContent; const ::rtl::OUString sIllustrationIndex; diff --git a/xmloff/source/text/txtftne.cxx b/xmloff/source/text/txtftne.cxx index 6a0de6868dc7..374838a611f4 100644 --- a/xmloff/source/text/txtftne.cxx +++ b/xmloff/source/text/txtftne.cxx @@ -2,9 +2,9 @@ * * $RCSfile: txtftne.cxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: dvo $ $Date: 2000-10-25 08:49:58 $ + * last change: $Author: dvo $ $Date: 2000-11-17 18:54:34 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -270,40 +270,54 @@ void XMLTextParagraphExport::exportTextFootnoteConfiguration() } +void lcl_exportString( + SvXMLExport& rExport, + const Reference<XPropertySet> & rPropSet, + const OUString& sProperty, + const sal_Char* pElementName, + sal_Bool bOmitIfEmpty = sal_True) +{ + DBG_ASSERT(NULL != pElementName, "need element name"); + + Any aAny = rPropSet->getPropertyValue(sProperty); + OUString sTmp; + aAny >>= sTmp; + if (!bOmitIfEmpty || (sTmp.getLength() > 0)) + { + rExport.AddAttribute(XML_NAMESPACE_TEXT, pElementName, sTmp); + } +} + void XMLTextParagraphExport::exportTextFootnoteConfigurationHelper( const Reference<XPropertySet> & rFootnoteConfig, sal_Bool bIsEndnote) { - Any aAny; - OUString sTmp; - // prefix - aAny = rFootnoteConfig->getPropertyValue(sPrefix); - aAny >>= sTmp; - GetExport().AddAttribute(XML_NAMESPACE_TEXT, sXML_num_prefix, sTmp); + lcl_exportString( GetExport(), rFootnoteConfig, + sPrefix, sXML_num_prefix, sal_True); // suffix - aAny = rFootnoteConfig->getPropertyValue(sSuffix); - aAny >>= sTmp; - GetExport().AddAttribute(XML_NAMESPACE_TEXT, sXML_num_suffix, sTmp); + lcl_exportString( GetExport(), rFootnoteConfig, + sSuffix, sXML_num_suffix, sal_True); - // citation style ??? - aAny = rFootnoteConfig->getPropertyValue(sCharStyleName); - aAny >>= sTmp; - GetExport().AddAttribute(XML_NAMESPACE_TEXT, sXML_citation_style_name, - sTmp); + // citation style + lcl_exportString( GetExport(), rFootnoteConfig, + sCharStyleName, sXML_citation_style_name, sal_True); + + // citation body style + lcl_exportString( GetExport(), rFootnoteConfig, sAnchorCharStyleName, + sXML_citation_body_style_name, sal_True); // default/paragraph style - aAny = rFootnoteConfig->getPropertyValue(sParaStyleName); - aAny >>= sTmp; - GetExport().AddAttribute(XML_NAMESPACE_TEXT, sXML_default_style_name, - sTmp); + lcl_exportString( GetExport(), rFootnoteConfig, + sParaStyleName, sXML_default_style_name, sal_True); // page style - aAny = rFootnoteConfig->getPropertyValue(sPageStyleName); - aAny >>= sTmp; - GetExport().AddAttribute(XML_NAMESPACE_TEXT, sXML_master_page_name, - sTmp); + lcl_exportString( GetExport(), rFootnoteConfig, + sPageStyleName, sXML_master_page_name, sal_True); + + + Any aAny; // numbering style aAny = rFootnoteConfig->getPropertyValue(sNumberingType); @@ -373,29 +387,30 @@ void XMLTextParagraphExport::exportTextFootnoteConfigurationHelper( // two element for footnote content if (!bIsEndnote) { + OUString sTmp; + + // end notice / quo vadis + aAny = rFootnoteConfig->getPropertyValue(sEndNotice); + aAny >>= sTmp; + + if (sTmp.getLength() > 0) { - // end notice / quo vadis - aAny = rFootnoteConfig->getPropertyValue( - sEndNotice); - aAny >>= sTmp; - SvXMLElementExport aElem(GetExport(), - XML_NAMESPACE_TEXT, + SvXMLElementExport aElem(GetExport(), XML_NAMESPACE_TEXT, sXML_footnote_continuation_notice_forward, sal_True, sal_False); GetExport().GetDocHandler()->characters(sTmp); } + // begin notice / ergo sum + aAny = rFootnoteConfig->getPropertyValue(sBeginNotice); + aAny >>= sTmp; + + if (sTmp.getLength() > 0) { - // begin notice / ergo sum - aAny = rFootnoteConfig->getPropertyValue( - sBeginNotice); - aAny >>= sTmp; - SvXMLElementExport aElem(GetExport(), - XML_NAMESPACE_TEXT, + SvXMLElementExport aElem(GetExport(), XML_NAMESPACE_TEXT, sXML_footnote_continuation_notice_backward, sal_True, sal_False); GetExport().GetDocHandler()->characters(sTmp); } } } - diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx index 9f0c8548ce5c..ae215a309521 100644 --- a/xmloff/source/text/txtparae.cxx +++ b/xmloff/source/text/txtparae.cxx @@ -2,9 +2,9 @@ * * $RCSfile: txtparae.cxx,v $ * - * $Revision: 1.23 $ + * $Revision: 1.24 $ * - * last change: $Author: dvo $ $Date: 2000-11-17 15:41:29 $ + * last change: $Author: dvo $ $Date: 2000-11-17 18:54:34 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -630,7 +630,8 @@ XMLTextParagraphExport::XMLTextParagraphExport( sDocumentIndex(RTL_CONSTASCII_USTRINGPARAM("DocumentIndex")), sDocumentIndexMark(RTL_CONSTASCII_USTRINGPARAM("DocumentIndexMark")), sActualSize(RTL_CONSTASCII_USTRINGPARAM("ActualSize")), - sContourPolyPolygon(RTL_CONSTASCII_USTRINGPARAM("ContourPolyPolygon")) + sContourPolyPolygon(RTL_CONSTASCII_USTRINGPARAM("ContourPolyPolygon")), + sAnchorCharStyleName(RTL_CONSTASCII_USTRINGPARAM("AnchorCharStyleName")) { UniReference < XMLPropertySetMapper > xPropMapper = new XMLTextPropertySetMapper( TEXT_PROP_MAP_PARA ); |