diff options
author | Katarina Behrens <Katarina.Behrens@cib.de> | 2015-04-21 11:19:29 +0200 |
---|---|---|
committer | Katarina Behrens <Katarina.Behrens@cib.de> | 2015-04-21 11:52:26 +0200 |
commit | d34f5fe5ef39de6ddeb10617f27a990c27883361 (patch) | |
tree | bbdc0d1f042cd9a9a46f3700bc0881581e9e7a93 | |
parent | df9949ca1306825e6b5bba40b9a88657bc4db46d (diff) |
tdf88056: implement export of page title field to ODF
to loext namespace so far, since it isn't approved by ODF-TC yet
Change-Id: I1bb7723bdccec9b670630da5e4d56f47cd615e43
-rw-r--r-- | include/xmloff/xmltoken.hxx | 1 | ||||
-rw-r--r-- | xmloff/inc/txtflde.hxx | 1 | ||||
-rw-r--r-- | xmloff/source/core/xmltoken.cxx | 1 | ||||
-rw-r--r-- | xmloff/source/text/txtflde.cxx | 17 |
4 files changed, 20 insertions, 0 deletions
diff --git a/include/xmloff/xmltoken.hxx b/include/xmloff/xmltoken.hxx index 4ad2936c0610..a4f026d0e12e 100644 --- a/include/xmloff/xmltoken.hxx +++ b/include/xmloff/xmltoken.hxx @@ -1373,6 +1373,7 @@ namespace xmloff { namespace token { XML_PAGE_MASTER, XML_PAGE_MASTER_NAME, XML_PAGE_NUMBER, + XML_PAGE_TITLE, XML_PAGE_START_MARGIN, XML_PAGE_STYLE_NAME, XML_PAGE_THUMBNAIL, diff --git a/xmloff/inc/txtflde.hxx b/xmloff/inc/txtflde.hxx index 6610964cca1b..b37eb3e4066d 100644 --- a/xmloff/inc/txtflde.hxx +++ b/xmloff/inc/txtflde.hxx @@ -143,6 +143,7 @@ enum FieldIdEnum { FIELD_ID_DRAW_HEADER, FIELD_ID_DRAW_FOOTER, FIELD_ID_DRAW_DATE_TIME, + FIELD_ID_DRAW_PAGETITLE, // page/slide title FIELD_ID_UNKNOWN // invalid or unknown field type! }; diff --git a/xmloff/source/core/xmltoken.cxx b/xmloff/source/core/xmltoken.cxx index 2f7352d9de27..27d4c32f368e 100644 --- a/xmloff/source/core/xmltoken.cxx +++ b/xmloff/source/core/xmltoken.cxx @@ -1378,6 +1378,7 @@ namespace xmloff { namespace token { TOKEN( "page-master", XML_PAGE_MASTER ), TOKEN( "page-master-name", XML_PAGE_MASTER_NAME ), TOKEN( "page-number", XML_PAGE_NUMBER ), + TOKEN( "page-title", XML_PAGE_TITLE ), TOKEN( "page-start-margin", XML_PAGE_START_MARGIN ), TOKEN( "page-style-name", XML_PAGE_STYLE_NAME ), TOKEN( "page-thumbnail", XML_PAGE_THUMBNAIL ), diff --git a/xmloff/source/text/txtflde.cxx b/xmloff/source/text/txtflde.cxx index 626adaab8cd9..14f9d09fbe6b 100644 --- a/xmloff/source/text/txtflde.cxx +++ b/xmloff/source/text/txtflde.cxx @@ -414,6 +414,10 @@ enum FieldIdEnum XMLTextFieldExport::GetFieldID( { return FIELD_ID_DRAW_DATE_TIME; } + else if( sFieldName == "PageTitle" ) + { + return FIELD_ID_DRAW_PAGETITLE; + } } } @@ -738,6 +742,7 @@ bool XMLTextFieldExport::IsStringField( case FIELD_ID_DRAW_HEADER: case FIELD_ID_DRAW_FOOTER: case FIELD_ID_DRAW_DATE_TIME: + case FIELD_ID_DRAW_PAGETITLE: default: OSL_FAIL("unknown field type/field has no content"); return true; // invalid info; string in case of doubt @@ -953,6 +958,7 @@ void XMLTextFieldExport::ExportFieldAutoStyle( case FIELD_ID_DRAW_DATE_TIME: case FIELD_ID_DRAW_FOOTER: case FIELD_ID_DRAW_HEADER: + case FIELD_ID_DRAW_PAGETITLE: ; // no formats for these fields! break; @@ -1848,6 +1854,17 @@ void XMLTextFieldExport::ExportFieldHelper( } break; + case FIELD_ID_DRAW_PAGETITLE: + { + if (SvtSaveOptions().GetODFDefaultVersion() > SvtSaveOptions::ODFVER_012) + { + SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_LO_EXT, XML_PAGE_TITLE, false, false ); + GetExport().Characters( sPresentation ); + } + } + break; + + case FIELD_ID_UNKNOWN: default: OSL_FAIL("unknown field type encountered!"); |