diff options
author | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2018-03-19 11:33:53 +0100 |
---|---|---|
committer | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2018-03-20 07:42:09 +0100 |
commit | ecb20d71ff6bd6e6230c06a2c50ee71d35c88949 (patch) | |
tree | 230349ae391b5c9fbad48bc53ebe884db026f2c7 /xmloff | |
parent | e2b941fef3d0fb955c2528ea2d3f91f62685912e (diff) |
Signatureline ODF export: Use tokens instead of plain strings
Change-Id: I80eca35b03be2a7f288705295a355f08fbc757be
Reviewed-on: https://gerrit.libreoffice.org/51542
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/core/xmltoken.cxx | 7 | ||||
-rw-r--r-- | xmloff/source/draw/shapeexport.cxx | 20 | ||||
-rw-r--r-- | xmloff/source/token/tokens.txt | 7 |
3 files changed, 24 insertions, 10 deletions
diff --git a/xmloff/source/core/xmltoken.cxx b/xmloff/source/core/xmltoken.cxx index 4893fade61ab..1475d4f99b19 100644 --- a/xmloff/source/core/xmltoken.cxx +++ b/xmloff/source/core/xmltoken.cxx @@ -368,6 +368,7 @@ namespace xmloff { namespace token { TOKEN( "calculation-settings", XML_CALCULATION_SETTINGS ), TOKEN( "calendar", XML_CALENDAR ), TOKEN( "capitalize-entries", XML_CAPITALIZE_ENTRIES ), + TOKEN( "can-add-comment", XML_CAN_ADD_COMMENT ), TOKEN( "caption", XML_CAPTION ), TOKEN( "caption-point-x", XML_CAPTION_POINT_X ), TOKEN( "caption-point-y", XML_CAPTION_POINT_Y ), @@ -1943,8 +1944,14 @@ namespace xmloff { namespace token { TOKEN( "dot-dash", XML_DOT_DASH ), TOKEN( "dot-dot-dash", XML_DOT_DOT_DASH ), TOKEN( "long-dash", XML_LONG_DASH ), + TOKEN( "show-sign-date", XML_SHOW_SIGN_DATE ), + TOKEN( "signatureline", XML_SIGNATURELINE ), + TOKEN( "signing-instructions", XML_SIGNING_INSTRUCTIONS ), TOKEN( "single", XML_SINGLE ), TOKEN( "small-wave", XML_SMALL_WAVE ), + TOKEN( "suggested-signer-email", XML_SUGGESTED_SIGNER_EMAIL ), + TOKEN( "suggested-signer-name", XML_SUGGESTED_SIGNER_NAME ), + TOKEN( "suggested-signer-title", XML_SUGGESTED_SIGNER_TITLE ), TOKEN( "wave", XML_WAVE ), TOKEN( "unformatted-text", XML_UNFORMATTED_TEXT ), TOKEN( "union", XML_UNION ), diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx index 3a685ac3697a..a670d6dad8ec 100644 --- a/xmloff/source/draw/shapeexport.cxx +++ b/xmloff/source/draw/shapeexport.cxx @@ -1269,39 +1269,39 @@ void XMLShapeExport::ImpExportSignatureLine(const uno::Reference<drawing::XShape OUString aSignatureLineId; xPropSet->getPropertyValue("SignatureLineId") >>= aSignatureLineId; - mrExport.AddAttribute(XML_NAMESPACE_LO_EXT, "id", aSignatureLineId); + mrExport.AddAttribute(XML_NAMESPACE_LO_EXT, XML_ID, aSignatureLineId); OUString aSuggestedSignerName; xPropSet->getPropertyValue("SignatureLineSuggestedSignerName") >>= aSuggestedSignerName; if (!aSuggestedSignerName.isEmpty()) - mrExport.AddAttribute(XML_NAMESPACE_LO_EXT, "suggested-signer-name", aSuggestedSignerName); + mrExport.AddAttribute(XML_NAMESPACE_LO_EXT, XML_SUGGESTED_SIGNER_NAME, aSuggestedSignerName); OUString aSuggestedSignerTitle; xPropSet->getPropertyValue("SignatureLineSuggestedSignerTitle") >>= aSuggestedSignerTitle; if (!aSuggestedSignerTitle.isEmpty()) - mrExport.AddAttribute(XML_NAMESPACE_LO_EXT, "suggested-signer-title", aSuggestedSignerTitle); + mrExport.AddAttribute(XML_NAMESPACE_LO_EXT, XML_SUGGESTED_SIGNER_TITLE, aSuggestedSignerTitle); OUString aSuggestedSignerEmail; xPropSet->getPropertyValue("SignatureLineSuggestedSignerEmail") >>= aSuggestedSignerEmail; if (!aSuggestedSignerEmail.isEmpty()) - mrExport.AddAttribute(XML_NAMESPACE_LO_EXT, "suggested-signer-email", aSuggestedSignerEmail); + mrExport.AddAttribute(XML_NAMESPACE_LO_EXT, XML_SUGGESTED_SIGNER_EMAIL, aSuggestedSignerEmail); OUString aSigningInstructions; xPropSet->getPropertyValue("SignatureLineSigningInstructions") >>= aSigningInstructions; if (!aSigningInstructions.isEmpty()) - mrExport.AddAttribute(XML_NAMESPACE_LO_EXT, "signing-instructions", aSigningInstructions); + mrExport.AddAttribute(XML_NAMESPACE_LO_EXT, XML_SIGNING_INSTRUCTIONS, aSigningInstructions); bool bShowSignDate = false; xPropSet->getPropertyValue("SignatureLineShowSignDate") >>= bShowSignDate; - mrExport.AddAttribute(XML_NAMESPACE_LO_EXT, "show-sign-date", - bShowSignDate ? OUString("true") : OUString("false")); + mrExport.AddAttribute(XML_NAMESPACE_LO_EXT, XML_SHOW_SIGN_DATE, + bShowSignDate ? XML_TRUE : XML_FALSE); bool bCanAddComment = false; xPropSet->getPropertyValue("SignatureLineCanAddComment") >>= bCanAddComment; - mrExport.AddAttribute(XML_NAMESPACE_LO_EXT, "can-add-comment", - bCanAddComment ? OUString("true") : OUString("false")); + mrExport.AddAttribute(XML_NAMESPACE_LO_EXT, XML_CAN_ADD_COMMENT, + bCanAddComment ? XML_TRUE : XML_FALSE); - SvXMLElementExport aSignatureLineElement(mrExport, XML_NAMESPACE_LO_EXT, "signatureline", true, + SvXMLElementExport aSignatureLineElement(mrExport, XML_NAMESPACE_LO_EXT, XML_SIGNATURELINE, true, true); } diff --git a/xmloff/source/token/tokens.txt b/xmloff/source/token/tokens.txt index d977e96c4016..6c68ea0c339b 100644 --- a/xmloff/source/token/tokens.txt +++ b/xmloff/source/token/tokens.txt @@ -291,6 +291,7 @@ c calculation-settings calendar capitalize-entries +can-add-comment caption caption-point-x caption-point-y @@ -1861,8 +1862,14 @@ type dot-dash dot-dot-dash long-dash +show-sign-date +signatureline +signing-instructions single small-wave +suggested-signer-email +suggested-signer-name +suggested-signer-title wave unformatted-text union |