summaryrefslogtreecommitdiff
path: root/xmloff/source/text/XMLTextShapeImportHelper.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-08-16 16:57:15 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-08-22 13:31:57 +0200
commit60bc26354763fa3461db49a3e827da552484150d (patch)
tree5c66cee43f76f556f9a086a67fa8a6e88750c5d5 /xmloff/source/text/XMLTextShapeImportHelper.cxx
parent7867e1f1cdd726cb98a236245e3d08557cc3a313 (diff)
new loplugin:conststringfield
Look for const string fields which can be static, and mostly convert them to OUStringLiteral And add a getLength() method to OUStringLiteral to make the transition easier. Remove dead code in XclExpRoot::GenerateDefaultEncryptionData, default password is never empty. Change-Id: Iae75514d9dbb87289fd5b016222f640abe755091 Reviewed-on: https://gerrit.libreoffice.org/59204 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff/source/text/XMLTextShapeImportHelper.cxx')
-rw-r--r--xmloff/source/text/XMLTextShapeImportHelper.cxx15
1 files changed, 8 insertions, 7 deletions
diff --git a/xmloff/source/text/XMLTextShapeImportHelper.cxx b/xmloff/source/text/XMLTextShapeImportHelper.cxx
index 0d42e9a3b183..2fbad1717326 100644
--- a/xmloff/source/text/XMLTextShapeImportHelper.cxx
+++ b/xmloff/source/text/XMLTextShapeImportHelper.cxx
@@ -39,14 +39,15 @@ using namespace ::com::sun::star::text;
using namespace ::com::sun::star::container;
using namespace ::com::sun::star::xml::sax;
+static const OUStringLiteral gsAnchorType("AnchorType");
+static const OUStringLiteral gsAnchorPageNo("AnchorPageNo");
+static const OUStringLiteral gsVertOrientPosition("VertOrientPosition");
+
XMLTextShapeImportHelper::XMLTextShapeImportHelper(
SvXMLImport& rImp ) :
XMLShapeImportHelper( rImp, rImp.GetModel(),
XMLTextImportHelper::CreateShapeExtPropMapper(rImp) ),
- rImport( rImp ),
- sAnchorType("AnchorType"),
- sAnchorPageNo("AnchorPageNo"),
- sVertOrientPosition("VertOrientPosition")
+ rImport( rImp )
{
Reference < XDrawPageSupplier > xDPS( rImp.GetModel(), UNO_QUERY );
if( xDPS.is() )
@@ -121,7 +122,7 @@ void XMLTextShapeImportHelper::addShape(
Reference < XPropertySet > xPropSet( rShape, UNO_QUERY );
// anchor type
- xPropSet->setPropertyValue( sAnchorType, Any(eAnchorType) );
+ xPropSet->setPropertyValue( gsAnchorType, Any(eAnchorType) );
Reference < XTextContent > xTxtCntnt( rShape, UNO_QUERY );
xTxtImport->InsertTextContent( xTxtCntnt );
@@ -134,11 +135,11 @@ void XMLTextShapeImportHelper::addShape(
// only set positive page numbers
if ( nPage > 0 )
{
- xPropSet->setPropertyValue( sAnchorPageNo, Any(nPage) );
+ xPropSet->setPropertyValue( gsAnchorPageNo, Any(nPage) );
}
break;
case TextContentAnchorType_AS_CHARACTER:
- xPropSet->setPropertyValue( sVertOrientPosition, Any(nY) );
+ xPropSet->setPropertyValue( gsVertOrientPosition, Any(nY) );
break;
default:
break;