summaryrefslogtreecommitdiff
path: root/xmloff/source/text/XMLSectionImportContext.cxx
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2008-07-01 15:04:00 +0000
committerVladimir Glazounov <vg@openoffice.org>2008-07-01 15:04:00 +0000
commit1eed12565d63319c0d30f27225b957421ff86a4b (patch)
tree83f2934367f35e7e7a91a74afc32ada55229250d /xmloff/source/text/XMLSectionImportContext.cxx
parentb641ec006c4cd5a5cc6c9737dc5f933a84f9cce2 (diff)
INTEGRATION: CWS odfmetadata (1.26.50); FILE MERGED
2008/06/19 17:06:56 mst 1.26.50.1: #i90620#: import xml:id in text elements - xmloff/source/text/XMLIndexTOCContext.cxx: + XMLIndexTOCContext::StartElement(): attribute xml:id - xmloff/source/text/XMLSectionImportContext{.hxx,.cxx}: + XMLSectionToken: new token: XML_TOK_SECTION_XMLID + XMLSectionImportContext::ProcessAttributes(): attribute xml:id - xmloff/source/text/XMLTextListBlockContext{.hxx,.cxx}: + XMLTextListBlockContext::XMLTextListBlockContext(): attribute xml:id - xmloff/source/text/XMLTextListItemContext.cxx: + XMLTextListItemContext::XMLTextListItemContext(): attribute xml:id - xmloff/source/text/XMLTextMarkImportContext{.hxx,.cxx}: + refactor methods to pass XmlId around + XMLTextMarkImportContext::FindName(): attribute xml:id - xmloff/source/text/txtparai{.hxx,.cxx}: + new class XMLMetaImportContext + XMLImpSpanContext_Impl::CreateChildContext(): handle TEXT_META and (provisionally) TEXT_META_FIELD + XMLParaContext::XMLParaContext(): attribute xml:id
Diffstat (limited to 'xmloff/source/text/XMLSectionImportContext.cxx')
-rw-r--r--xmloff/source/text/XMLSectionImportContext.cxx14
1 files changed, 11 insertions, 3 deletions
diff --git a/xmloff/source/text/XMLSectionImportContext.cxx b/xmloff/source/text/XMLSectionImportContext.cxx
index d368e7eee8..3f916db8e0 100644
--- a/xmloff/source/text/XMLSectionImportContext.cxx
+++ b/xmloff/source/text/XMLSectionImportContext.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: XMLSectionImportContext.cxx,v $
- * $Revision: 1.26 $
+ * $Revision: 1.27 $
*
* This file is part of OpenOffice.org.
*
@@ -71,8 +71,9 @@ const sal_Char sAPI_IsVisible[] = "IsVisible";
const sal_Char sAPI_IsCurrentlyVisible[] = "IsCurrentlyVisible";
const sal_Char sAPI_ProtectionKey[] = "ProtectionKey";
-enum XMLSectionToken
+enum XMLSectionToken
{
+ XML_TOK_SECTION_XMLID,
XML_TOK_SECTION_STYLE_NAME,
XML_TOK_SECTION_NAME,
XML_TOK_SECTION_CONDITION,
@@ -84,6 +85,7 @@ enum XMLSectionToken
static __FAR_DATA SvXMLTokenMapEntry aSectionTokenMap[] =
{
+ { XML_NAMESPACE_XML , XML_ID, XML_TOK_SECTION_XMLID },
{ XML_NAMESPACE_TEXT, XML_STYLE_NAME, XML_TOK_SECTION_STYLE_NAME },
{ XML_NAMESPACE_TEXT, XML_NAME, XML_TOK_SECTION_NAME },
{ XML_NAMESPACE_TEXT, XML_CONDITION, XML_TOK_SECTION_CONDITION },
@@ -162,6 +164,9 @@ void XMLSectionImportContext::StartElement(
// save PropertySet (for CreateChildContext)
xSectionPropertySet = xPropSet;
+ // xml:id for RDF metadata
+ GetImport().SetXmlId(xIfc, sXmlId);
+
// name
Reference<XNamed> xNamed(xPropSet, UNO_QUERY);
xNamed->setName(sName);
@@ -171,7 +176,7 @@ void XMLSectionImportContext::StartElement(
{
XMLPropStyleContext* pStyle = rHelper->
FindSectionStyle(sStyleName);
-
+
if (pStyle != NULL)
{
pStyle->FillPropertySet( xPropSet );
@@ -272,6 +277,9 @@ void XMLSectionImportContext::ProcessAttributes(
switch (aTokenMap.Get(nNamePrefix, sLocalName))
{
+ case XML_TOK_SECTION_XMLID:
+ sXmlId = sAttr;
+ break;
case XML_TOK_SECTION_STYLE_NAME:
sStyleName = sAttr;
break;