diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-06-23 12:34:31 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-06-26 13:12:31 +0200 |
commit | 0193b284e880a659ab73160e42238e1d5fe5cf8f (patch) | |
tree | da09299838a6afb43d7c601803a6bab787489854 /sd/source/ui/view/drviewsf.cxx | |
parent | 2ef138de767c312188d41a7f206234eafac3108b (diff) |
new loplugin:constexprliteral
OUStringLiteral should be declared constexpr, to enforce
that it is initialised at compile-time and not runtime.
This seems to make a different at least on Visual Studio
Change-Id: I1698f5fa22ddb480347c2f4d444530c2e0e88d92
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153499
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd/source/ui/view/drviewsf.cxx')
-rw-r--r-- | sd/source/ui/view/drviewsf.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sd/source/ui/view/drviewsf.cxx b/sd/source/ui/view/drviewsf.cxx index e74fe71dd45e..08d75842a187 100644 --- a/sd/source/ui/view/drviewsf.cxx +++ b/sd/source/ui/view/drviewsf.cxx @@ -121,13 +121,13 @@ void DrawViewShell::GetCtrlState(SfxItemSet &rSet) uno::Reference< beans::XPropertySetInfo > xPropInfo( xPropSet->getPropertySetInfo(), uno::UNO_SET_THROW ); form::FormButtonType eButtonType = form::FormButtonType_URL; - static const OUStringLiteral sButtonType( u"ButtonType" ); + static constexpr OUStringLiteral sButtonType( u"ButtonType" ); if(xPropInfo->hasPropertyByName( sButtonType ) && (xPropSet->getPropertyValue( sButtonType ) >>= eButtonType ) ) { OUString aString; // Label - static const OUStringLiteral sLabel( u"Label" ); + static constexpr OUStringLiteral sLabel( u"Label" ); if(xPropInfo->hasPropertyByName(sLabel)) { if( xPropSet->getPropertyValue(sLabel) >>= aString ) @@ -135,7 +135,7 @@ void DrawViewShell::GetCtrlState(SfxItemSet &rSet) } // URL - static const OUStringLiteral sTargetURL( u"TargetURL" ); + static constexpr OUStringLiteral sTargetURL( u"TargetURL" ); if(xPropInfo->hasPropertyByName(sTargetURL)) { if( xPropSet->getPropertyValue(sTargetURL) >>= aString ) @@ -143,7 +143,7 @@ void DrawViewShell::GetCtrlState(SfxItemSet &rSet) } // Target - static const OUStringLiteral sTargetFrame( u"TargetFrame" ); + static constexpr OUStringLiteral sTargetFrame( u"TargetFrame" ); if(xPropInfo->hasPropertyByName(sTargetFrame) ) { if( xPropSet->getPropertyValue(sTargetFrame) >>= aString ) |