From 2372d1a8b5e116b0ea84d09b4b577cc0f4ee7333 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 30 Jul 2019 17:48:38 +0200 Subject: Improved loplugin:stringconstant (now that GCC 7 supports it): starmath Change-Id: I12c7978be638fb875be1b183c70a8eb08bedf778 Reviewed-on: https://gerrit.libreoffice.org/76645 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- starmath/source/AccessibleSmElement.cxx | 4 ++-- starmath/source/AccessibleSmElementsControl.cxx | 2 +- starmath/source/accessibility.cxx | 4 ++-- starmath/source/action.cxx | 2 +- starmath/source/smdetect.cxx | 6 +++--- starmath/source/uiobject.cxx | 2 +- starmath/source/unodoc.cxx | 2 +- starmath/source/unofilter.cxx | 2 +- starmath/source/unomodel.cxx | 2 +- 9 files changed, 13 insertions(+), 13 deletions(-) (limited to 'starmath') diff --git a/starmath/source/AccessibleSmElement.cxx b/starmath/source/AccessibleSmElement.cxx index e4cebe9712f6..551d0d3ca9a2 100644 --- a/starmath/source/AccessibleSmElement.cxx +++ b/starmath/source/AccessibleSmElement.cxx @@ -107,7 +107,7 @@ void AccessibleSmElement::disposing() OUString AccessibleSmElement::getImplementationName() { - return OUString("com.sun.star.comp.toolkit.AccessibleSmElement"); + return "com.sun.star.comp.toolkit.AccessibleSmElement"; } sal_Bool AccessibleSmElement::supportsService(const OUString& rServiceName) @@ -274,7 +274,7 @@ OUString AccessibleSmElement::getAccessibleActionDescription(sal_Int32 nIndex) testAction(nIndex); - return OUString("press"); + return "press"; } uno::Reference diff --git a/starmath/source/AccessibleSmElementsControl.cxx b/starmath/source/AccessibleSmElementsControl.cxx index 5421c03799eb..3e9c2d84e792 100644 --- a/starmath/source/AccessibleSmElementsControl.cxx +++ b/starmath/source/AccessibleSmElementsControl.cxx @@ -156,7 +156,7 @@ sal_Int32 AccessibleSmElementsControl::getBackground() // XServiceInfo OUString AccessibleSmElementsControl::getImplementationName() { - return OUString("com.sun.star.comp.toolkit.AccessibleSmElementsControl"); + return "com.sun.star.comp.toolkit.AccessibleSmElementsControl"; } sal_Bool AccessibleSmElementsControl::supportsService(const OUString& rServiceName) diff --git a/starmath/source/accessibility.cxx b/starmath/source/accessibility.cxx index 75408826ff42..2121f5da59e6 100644 --- a/starmath/source/accessibility.cxx +++ b/starmath/source/accessibility.cxx @@ -720,7 +720,7 @@ sal_Bool SAL_CALL SmGraphicAccessible::copyText( OUString SAL_CALL SmGraphicAccessible::getImplementationName() { - return OUString("SmGraphicAccessible"); + return "SmGraphicAccessible"; } sal_Bool SAL_CALL SmGraphicAccessible::supportsService( @@ -1763,7 +1763,7 @@ void SAL_CALL SmEditAccessible::removeAccessibleEventListener( const uno::Refere OUString SAL_CALL SmEditAccessible::getImplementationName() { - return OUString("SmEditAccessible"); + return "SmEditAccessible"; } sal_Bool SAL_CALL SmEditAccessible::supportsService( diff --git a/starmath/source/action.cxx b/starmath/source/action.cxx index 21b75a481f67..37e643c85cd9 100644 --- a/starmath/source/action.cxx +++ b/starmath/source/action.cxx @@ -47,7 +47,7 @@ void SmFormatAction::Repeat(SfxRepeatTarget& rDocSh) OUString SmFormatAction::GetComment() const { - return OUString(RID_UNDOFORMATNAME); + return RID_UNDOFORMATNAME; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/starmath/source/smdetect.cxx b/starmath/source/smdetect.cxx index 0db1564f2a06..aa6280156619 100644 --- a/starmath/source/smdetect.cxx +++ b/starmath/source/smdetect.cxx @@ -80,7 +80,7 @@ OUString SAL_CALL SmFilterDetect::detect( Sequence< PropertyValue >& lDescriptor { sal_uInt8 nVersion; if ( GetMathTypeVersion( aStorage.get(), nVersion ) && nVersion <=3 ) - return OUString("math_MathType_3x"); + return "math_MathType_3x"; } } } @@ -114,7 +114,7 @@ OUString SAL_CALL SmFilterDetect::detect( Sequence< PropertyValue >& lDescriptor 0 == strncmp( " ", aBuffer, 12)); if ( bIsMathType ) - return OUString("math_MathML_XML_Math"); + return "math_MathML_XML_Math"; } } @@ -124,7 +124,7 @@ OUString SAL_CALL SmFilterDetect::detect( Sequence< PropertyValue >& lDescriptor /* XServiceInfo */ OUString SAL_CALL SmFilterDetect::getImplementationName() { - return OUString("com.sun.star.comp.math.FormatDetector"); + return "com.sun.star.comp.math.FormatDetector"; } /* XServiceInfo */ diff --git a/starmath/source/uiobject.cxx b/starmath/source/uiobject.cxx index ffa1c9cec109..a4dad7ffbccc 100644 --- a/starmath/source/uiobject.cxx +++ b/starmath/source/uiobject.cxx @@ -104,7 +104,7 @@ std::unique_ptr ElementSelectorUIObject::create(vcl::Window* pWindow) OUString ElementSelectorUIObject::get_name() const { - return OUString("SmElementSelector"); + return "SmElementSelector"; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/starmath/source/unodoc.cxx b/starmath/source/unodoc.cxx index ac2e35ca14ef..8e5230ad7f44 100644 --- a/starmath/source/unodoc.cxx +++ b/starmath/source/unodoc.cxx @@ -28,7 +28,7 @@ using namespace ::com::sun::star; OUString SmDocument_getImplementationName() throw() { - return OUString( "com.sun.star.comp.Math.FormulaDocument" ); + return "com.sun.star.comp.Math.FormulaDocument"; } uno::Sequence< OUString > SmDocument_getSupportedServiceNames() throw() diff --git a/starmath/source/unofilter.cxx b/starmath/source/unofilter.cxx index 8c142e8f7274..7add12f9e3fb 100644 --- a/starmath/source/unofilter.cxx +++ b/starmath/source/unofilter.cxx @@ -101,7 +101,7 @@ void MathTypeFilter::setTargetDocument(const uno::Reference< lang::XComponent >& OUString MathTypeFilter::getImplementationName() { - return OUString("com.sun.star.comp.Math.MathTypeFilter"); + return "com.sun.star.comp.Math.MathTypeFilter"; } sal_Bool MathTypeFilter::supportsService(const OUString& rServiceName) diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx index ce6e1d0c4f68..8f200542829e 100644 --- a/starmath/source/unomodel.cxx +++ b/starmath/source/unomodel.cxx @@ -387,7 +387,7 @@ static sal_Int16 lcl_AnyToINT16(const uno::Any& rAny) OUString SmModel::getImplementationName() { - return OUString("com.sun.star.comp.Math.FormulaDocument"); + return "com.sun.star.comp.Math.FormulaDocument"; } sal_Bool SmModel::supportsService(const OUString& rServiceName) -- cgit v1.2.3