summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--starmath/source/unomodel.cxx7
-rw-r--r--svx/source/customshapes/EnhancedCustomShape2d.cxx15
-rw-r--r--ucbhelper/source/client/content.cxx3
3 files changed, 15 insertions, 10 deletions
diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx
index 8b0b8817f588..b61fae230441 100644
--- a/starmath/source/unomodel.cxx
+++ b/starmath/source/unomodel.cxx
@@ -389,10 +389,9 @@ sal_Bool SmModel::supportsService(const OUString& rServiceName)
uno::Sequence< OUString > SmModel::getSupportedServiceNames()
{
- return uno::Sequence<OUString>{
- "com.sun.star.document.OfficeDocument",
- "com.sun.star.formula.FormulaProperties"
- };
+ static constexpr OUStringLiteral service1 = u"com.sun.star.document.OfficeDocument";
+ static constexpr OUStringLiteral service2 = u"com.sun.star.formula.FormulaProperties";
+ return uno::Sequence<OUString>{ service1, service2 };
}
void SmModel::_setPropertyValues(const PropertyMapEntry** ppEntries, const Any* pValues)
diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx
index 41cec42df4a1..87c081628993 100644
--- a/svx/source/customshapes/EnhancedCustomShape2d.cxx
+++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx
@@ -541,13 +541,15 @@ bool EnhancedCustomShape2d::ConvertSequenceToEnhancedCustomShape2dHandle(
void EnhancedCustomShape2d::ApplyShapeAttributes( const SdrCustomShapeGeometryItem& rGeometryItem )
{
// AdjustmentValues
- const Any* pAny = const_cast<SdrCustomShapeGeometryItem&>(rGeometryItem).GetPropertyValueByName( "AdjustmentValues" );
+ static constexpr OUStringLiteral sAdjustmentValues( u"AdjustmentValues" );
+ const Any* pAny = const_cast<SdrCustomShapeGeometryItem&>(rGeometryItem).GetPropertyValueByName( sAdjustmentValues );
if ( pAny )
*pAny >>= seqAdjustmentValues;
// Coordsize
- const Any* pViewBox = const_cast<SdrCustomShapeGeometryItem&>(rGeometryItem).GetPropertyValueByName( "ViewBox" );
+ static constexpr OUStringLiteral sViewBox( u"ViewBox" );
+ const Any* pViewBox = const_cast<SdrCustomShapeGeometryItem&>(rGeometryItem).GetPropertyValueByName( sViewBox );
css::awt::Rectangle aViewBox;
if ( pViewBox && (*pViewBox >>= aViewBox ) )
{
@@ -745,7 +747,8 @@ EnhancedCustomShape2d::EnhancedCustomShape2d(SdrObjCustomShape& rSdrObjCustomSha
OUString sShapeType;
const SdrCustomShapeGeometryItem& rGeometryItem(mrSdrObjCustomShape.GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ));
- const Any* pAny = rGeometryItem.GetPropertyValueByName( "Type" );
+ static constexpr OUStringLiteral sType = u"Type";
+ const Any* pAny = rGeometryItem.GetPropertyValueByName( sType );
if ( pAny ) {
*pAny >>= sShapeType;
bOOXMLShape = sShapeType.startsWith("ooxml-");
@@ -753,10 +756,12 @@ EnhancedCustomShape2d::EnhancedCustomShape2d(SdrObjCustomShape& rSdrObjCustomSha
}
eSpType = EnhancedCustomShapeTypeNames::Get( sShapeType );
- pAny = rGeometryItem.GetPropertyValueByName( "MirroredX" );
+ static constexpr OUStringLiteral sMirroredX = u"MirroredX";
+ static constexpr OUStringLiteral sMirroredY = u"MirroredY";
+ pAny = rGeometryItem.GetPropertyValueByName( sMirroredX );
if ( pAny )
*pAny >>= bFlipH;
- pAny = rGeometryItem.GetPropertyValueByName( "MirroredY" );
+ pAny = rGeometryItem.GetPropertyValueByName( sMirroredY );
if ( pAny )
*pAny >>= bFlipV;
diff --git a/ucbhelper/source/client/content.cxx b/ucbhelper/source/client/content.cxx
index 948c4848c6f4..7f3268c41754 100644
--- a/ucbhelper/source/client/content.cxx
+++ b/ucbhelper/source/client/content.cxx
@@ -416,8 +416,9 @@ Reference< XCommandInfo > Content::getCommands()
Reference< XPropertySetInfo > Content::getProperties()
{
+ static constexpr OUStringLiteral sgetPropertySetInfo = u"getPropertySetInfo";
Command aCommand;
- aCommand.Name = "getPropertySetInfo";
+ aCommand.Name = sgetPropertySetInfo;
aCommand.Handle = -1; // n/a
aCommand.Argument = Any();