elide some OUString allocation
Change-Id: I5f0b9057b86ec98b66b4ce2d6c681b8cb93d49e1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134802 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user