Improved loplugin:stringconstant (now that GCC 7 supports it): vbahelper

Change-Id: I10c543744f22a9f4db4e99c97629bb0e0b7f37db
Reviewed-on: https://gerrit.libreoffice.org/76628
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
This commit is contained in:
Stephan Bergmann
2019-07-30 17:45:52 +02:00
parent 7680623292
commit d69da86570
44 changed files with 54 additions and 54 deletions

View File

@@ -313,7 +313,7 @@ public:
// XDefaultMethod
OUString SAL_CALL getDefaultMethodName( ) override
{
return OUString("Item");
return "Item";
}
// XEnumerationAccess
virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() override = 0;

View File

@@ -131,7 +131,7 @@ public:
#define VBAHELPER_IMPL_XHELPERINTERFACE( classname, servicename ) \
OUString classname::getServiceImplName() \
{ \
return OUString( #classname ); \
return #classname; \
} \
css::uno::Sequence< OUString > classname::getServiceNames() \
{ \

View File

@@ -51,7 +51,7 @@ public:
virtual css::uno::Any SAL_CALL getValue() override;
virtual void SAL_CALL setValue( const css::uno::Any& _value ) override;
OUString SAL_CALL getDefaultPropertyName() override { return OUString("Value"); }
OUString SAL_CALL getDefaultPropertyName() override { return "Value"; }
};
#endif //SC_VBA_PROPVALULE_HXX

View File

@@ -39,7 +39,7 @@ namespace ooo
DefaultReturnHelper( const T1& nValue ) : mnValue( nValue ) {}
virtual void SAL_CALL setValue( T1 nValue ) override { mnValue = nValue; }
virtual T1 SAL_CALL getValue() override { return mnValue; }
OUString SAL_CALL getDefaultPropertyName( ) override { return OUString("Value"); }
OUString SAL_CALL getDefaultPropertyName( ) override { return "Value"; }
};
typedef DefaultReturnHelper< sal_Int32, ov::msforms::XReturnInteger > ReturnInteger_BASE;

View File

@@ -112,7 +112,7 @@ uno::Reference< msforms::XNewFont > SAL_CALL VbaButton::getFont()
OUString
VbaButton::getServiceImplName()
{
return OUString("VbaButton");
return "VbaButton";
}
uno::Sequence< OUString >

View File

@@ -86,7 +86,7 @@ uno::Reference< msforms::XNewFont > SAL_CALL ScVbaCheckbox::getFont()
OUString
ScVbaCheckbox::getServiceImplName()
{
return OUString("ScVbaCheckbox");
return "ScVbaCheckbox";
}
uno::Sequence< OUString >

View File

@@ -43,7 +43,7 @@ public:
virtual sal_Bool SAL_CALL getLocked() override;
virtual void SAL_CALL setLocked( sal_Bool bAutoSize ) override;
// XDefaultProperty
OUString SAL_CALL getDefaultPropertyName( ) override { return OUString("Value"); }
OUString SAL_CALL getDefaultPropertyName( ) override { return "Value"; }
//XHelperInterface
virtual OUString getServiceImplName() override;
virtual css::uno::Sequence<OUString> getServiceNames() override;

View File

@@ -253,7 +253,7 @@ uno::Reference< msforms::XNewFont > SAL_CALL ScVbaComboBox::getFont()
OUString
ScVbaComboBox::getServiceImplName()
{
return OUString("ScVbaComboBox");
return "ScVbaComboBox";
}
sal_Int32 SAL_CALL ScVbaComboBox::getBackColor()

View File

@@ -79,7 +79,7 @@ public:
virtual void SAL_CALL setRowSource( const OUString& _rowsource ) override;
// XDefaultProperty
OUString SAL_CALL getDefaultPropertyName( ) override { return OUString("Value"); }
OUString SAL_CALL getDefaultPropertyName( ) override { return "Value"; }
//XHelperInterface
virtual OUString getServiceImplName() override;
virtual css::uno::Sequence<OUString> getServiceNames() override;

View File

@@ -696,7 +696,7 @@ void SAL_CALL ScVbaControl::setTabIndex( sal_Int32 /*nTabIndex*/ )
OUString
ScVbaControl::getServiceImplName()
{
return OUString("ScVbaControl");
return "ScVbaControl";
}
uno::Sequence< OUString >

View File

@@ -30,7 +30,7 @@ ScVbaImage::ScVbaImage( const uno::Reference< XHelperInterface >& xParent, const
OUString
ScVbaImage::getServiceImplName()
{
return OUString("ScVbaImage");
return "ScVbaImage";
}
uno::Sequence< OUString >

View File

@@ -76,7 +76,7 @@ uno::Reference< msforms::XNewFont > SAL_CALL ScVbaLabel::getFont()
OUString ScVbaLabel::getServiceImplName()
{
return OUString( "ScVbaLabel" );
return "ScVbaLabel";
}
sal_Int32 SAL_CALL ScVbaLabel::getBackColor()

View File

@@ -46,7 +46,7 @@ public:
virtual OUString getServiceImplName() override;
virtual css::uno::Sequence<OUString> getServiceNames() override;
// XDefaultProperty
OUString SAL_CALL getDefaultPropertyName( ) override { return OUString("Value"); }
OUString SAL_CALL getDefaultPropertyName( ) override { return "Value"; }
};
#endif // INCLUDED_VBAHELPER_SOURCE_MSFORMS_VBALABEL_HXX

View File

@@ -261,7 +261,7 @@ uno::Reference< msforms::XNewFont > SAL_CALL ScVbaListBox::getFont()
OUString
ScVbaListBox::getServiceImplName()
{
return OUString("ScVbaListBox");
return "ScVbaListBox";
}
uno::Sequence< OUString >

View File

@@ -63,7 +63,7 @@ public:
virtual void SAL_CALL setRowSource( const OUString& _rowsource ) override;
// XDefaultProperty
OUString SAL_CALL getDefaultPropertyName( ) override { return OUString("Value"); }
OUString SAL_CALL getDefaultPropertyName( ) override { return "Value"; }
//XHelperInterface
virtual OUString getServiceImplName() override;

View File

@@ -86,7 +86,7 @@ ScVbaMultiPage::setValue( const sal_Int32 _value )
OUString
ScVbaMultiPage::getServiceImplName()
{
return OUString( "ScVbaMultiPage" );
return "ScVbaMultiPage";
}
uno::Any SAL_CALL

View File

@@ -41,7 +41,7 @@ ScVbaPages::createCollectionObject( const css::uno::Any& aSource )
OUString
ScVbaPages::getServiceImplName()
{
return OUString( "ScVbaPages" );
return "ScVbaPages";
}
uno::Reference< container::XEnumeration > SAL_CALL

View File

@@ -45,7 +45,7 @@ ScVbaProgressBar::setValue( const uno::Any& _value )
OUString
ScVbaProgressBar::getServiceImplName()
{
return OUString( "ScVbaProgressBar" );
return "ScVbaProgressBar";
}
uno::Sequence< OUString >

View File

@@ -39,7 +39,7 @@ public:
virtual OUString getServiceImplName() override;
virtual css::uno::Sequence<OUString> getServiceNames() override;
// XDefaultProperty
OUString SAL_CALL getDefaultPropertyName( ) override { return OUString("Value"); }
OUString SAL_CALL getDefaultPropertyName( ) override { return "Value"; }
};
#endif // INCLUDED_VBAHELPER_SOURCE_MSFORMS_VBAPROGRESSBAR_HXX

View File

@@ -94,7 +94,7 @@ uno::Reference< msforms::XNewFont > SAL_CALL ScVbaRadioButton::getFont()
OUString
ScVbaRadioButton::getServiceImplName()
{
return OUString( "ScVbaRadioButton" );
return "ScVbaRadioButton";
}
uno::Sequence< OUString >

View File

@@ -39,7 +39,7 @@ public:
virtual OUString getServiceImplName() override;
virtual css::uno::Sequence<OUString> getServiceNames() override;
// XDefaultProperty
OUString SAL_CALL getDefaultPropertyName( ) override { return OUString("Value"); }
OUString SAL_CALL getDefaultPropertyName( ) override { return "Value"; }
};
#endif // INCLUDED_VBAHELPER_SOURCE_MSFORMS_VBARADIOBUTTON_HXX

View File

@@ -99,7 +99,7 @@ ScVbaScrollBar::setSmallChange( ::sal_Int32 _smallchange )
OUString
ScVbaScrollBar::getServiceImplName()
{
return OUString("ScVbaScrollBar" );
return "ScVbaScrollBar";
}
uno::Sequence< OUString >

View File

@@ -71,7 +71,7 @@ ScVbaSpinButton::setMin( sal_Int32 nVal )
OUString
ScVbaSpinButton::getServiceImplName()
{
return OUString( "ScVbaSpinButton" );
return "ScVbaSpinButton";
}
uno::Sequence< OUString >

View File

@@ -68,7 +68,7 @@ sal_Bool SAL_CALL VbaSystemAXControl::hasProperty( const OUString& aName )
OUString
VbaSystemAXControl::getServiceImplName()
{
return OUString( "VbaSystemAXControl" );
return "VbaSystemAXControl";
}

View File

@@ -167,7 +167,7 @@ void SAL_CALL ScVbaTextBox::setLocked( sal_Bool bLocked )
OUString
ScVbaTextBox::getServiceImplName()
{
return OUString( "ScVbaTextBox" );
return "ScVbaTextBox";
}
uno::Sequence< OUString >

View File

@@ -55,7 +55,7 @@ public:
virtual void SAL_CALL setLocked( sal_Bool bAutoSize ) override;
// XDefaultProperty
OUString SAL_CALL getDefaultPropertyName( ) override { return OUString("Value"); }
OUString SAL_CALL getDefaultPropertyName( ) override { return "Value"; }
//XHelperInterface
virtual OUString getServiceImplName() override;
virtual css::uno::Sequence<OUString> getServiceNames() override;

View File

@@ -148,7 +148,7 @@ void SAL_CALL ScVbaToggleButton::setLocked( sal_Bool bLocked )
OUString
ScVbaToggleButton::getServiceImplName()
{
return OUString( "ScVbaToggleButton" );
return "ScVbaToggleButton";
}
uno::Sequence< OUString >

View File

@@ -53,7 +53,7 @@ public:
virtual OUString getServiceImplName() override;
virtual css::uno::Sequence<OUString> getServiceNames() override;
// XDefaultProperty
OUString SAL_CALL getDefaultPropertyName( ) override { return OUString("Value"); }
OUString SAL_CALL getDefaultPropertyName( ) override { return "Value"; }
};
#endif // INCLUDED_VBAHELPER_SOURCE_MSFORMS_VBATOGGLEBUTTON_HXX

View File

@@ -182,7 +182,7 @@ ScVbaUserForm::UnloadObject( )
OUString
ScVbaUserForm::getServiceImplName()
{
return OUString("ScVbaUserForm");
return "ScVbaUserForm";
}
uno::Sequence< OUString >

View File

@@ -316,7 +316,7 @@ VbaApplicationBase::CommandBars( const uno::Any& aIndex )
OUString SAL_CALL
VbaApplicationBase::getVersion()
{
return OUString(OFFICEVERSION);
return OFFICEVERSION;
}
uno::Any SAL_CALL VbaApplicationBase::Run( const OUString& MacroName, const uno::Any& varg1, const uno::Any& varg2, const uno::Any& varg3, const uno::Any& varg4, const uno::Any& varg5, const uno::Any& varg6, const uno::Any& varg7, const uno::Any& varg8, const uno::Any& varg9, const uno::Any& varg10, const uno::Any& varg11, const uno::Any& varg12, const uno::Any& varg13, const uno::Any& varg14, const uno::Any& varg15, const uno::Any& varg16, const uno::Any& varg17, const uno::Any& varg18, const uno::Any& varg19, const uno::Any& varg20, const uno::Any& varg21, const uno::Any& varg22, const uno::Any& varg23, const uno::Any& varg24, const uno::Any& varg25, const uno::Any& varg26, const uno::Any& varg27, const uno::Any& varg28, const uno::Any& varg29, const uno::Any& varg30 )
@@ -425,7 +425,7 @@ uno::Any SAL_CALL VbaApplicationBase::getVBE()
OUString
VbaApplicationBase::getServiceImplName()
{
return OUString("VbaApplicationBase");
return "VbaApplicationBase";
}
uno::Sequence<OUString>

View File

@@ -154,7 +154,7 @@ ScVbaColorFormat::setSchemeColor( sal_Int32 _schemecolor )
OUString
ScVbaColorFormat::getServiceImplName()
{
return OUString("ScVbaColorFormat");
return "ScVbaColorFormat";
}
uno::Sequence< OUString >

View File

@@ -177,7 +177,7 @@ ScVbaCommandBar::FindControl( const uno::Any& /*aType*/, const uno::Any& /*aId*/
OUString
ScVbaCommandBar::getServiceImplName()
{
return OUString("ScVbaCommandBar");
return "ScVbaCommandBar";
}
uno::Sequence<OUString>
@@ -259,7 +259,7 @@ uno::Any SAL_CALL VbaDummyCommandBar::FindControl( const uno::Any& /*aType*/, co
OUString VbaDummyCommandBar::getServiceImplName()
{
return OUString("VbaDummyCommandBar");
return "VbaDummyCommandBar";
}
uno::Sequence< OUString > VbaDummyCommandBar::getServiceNames()

View File

@@ -179,7 +179,7 @@ ScVbaCommandBarControl::Controls( const uno::Any& aIndex )
OUString
ScVbaCommandBarControl::getServiceImplName()
{
return OUString("ScVbaCommandBarControl");
return "ScVbaCommandBarControl";
}
uno::Sequence<OUString>
@@ -209,7 +209,7 @@ ScVbaCommandBarPopup::ScVbaCommandBarPopup( const css::uno::Reference< ov::XHelp
OUString
ScVbaCommandBarPopup::getServiceImplName()
{
return OUString("ScVbaCommandBarPopup");
return "ScVbaCommandBarPopup";
}
uno::Sequence<OUString>
@@ -239,7 +239,7 @@ ScVbaCommandBarButton::ScVbaCommandBarButton( const css::uno::Reference< ov::XHe
OUString
ScVbaCommandBarButton::getServiceImplName()
{
return OUString("ScVbaCommandBarButton");
return "ScVbaCommandBarButton";
}
uno::Sequence<OUString>

View File

@@ -230,7 +230,7 @@ ScVbaCommandBarControls::Add( const uno::Any& Type, const uno::Any& Id, const un
OUString
ScVbaCommandBarControls::getServiceImplName()
{
return OUString("ScVbaCommandBarControls");
return "ScVbaCommandBarControls";
}
uno::Sequence<OUString>
@@ -299,7 +299,7 @@ uno::Reference< XCommandBarControl > SAL_CALL VbaDummyCommandBarControls::Add(
// XHelperInterface
OUString VbaDummyCommandBarControls::getServiceImplName()
{
return OUString("VbaDummyCommandBarControls");
return "VbaDummyCommandBarControls";
}
uno::Sequence<OUString> VbaDummyCommandBarControls::getServiceNames()

View File

@@ -220,7 +220,7 @@ ScVbaCommandBars::Item( const uno::Any& aIndex, const uno::Any& /*aIndex2*/ )
OUString
ScVbaCommandBars::getServiceImplName()
{
return OUString("ScVbaCommandBars");
return "ScVbaCommandBars";
}
uno::Sequence<OUString>

View File

@@ -296,7 +296,7 @@ VbaDocumentBase::getVBProject()
OUString
VbaDocumentBase::getServiceImplName()
{
return OUString( "VbaDocumentBase" );
return "VbaDocumentBase";
}
uno::Sequence< OUString >

View File

@@ -171,7 +171,7 @@ ScVbaFillFormat::ForeColor()
OUString
ScVbaFillFormat::getServiceImplName()
{
return OUString("ScVbaFillFormat");
return "ScVbaFillFormat";
}
uno::Sequence< OUString >

View File

@@ -81,15 +81,15 @@ ScVbaLineFormat::convertArrowheadStyleToLineStartEndName( sal_Int32 nArrowheadSt
case office::MsoArrowheadStyle::msoArrowheadNone:
return OUString();
case office::MsoArrowheadStyle::msoArrowheadStealth:
return OUString("Arrow concave");
return "Arrow concave";
case office::MsoArrowheadStyle::msoArrowheadOpen:
return OUString("Line Arrow");
return "Line Arrow";
case office::MsoArrowheadStyle::msoArrowheadOval:
return OUString("Circle");
return "Circle";
case office::MsoArrowheadStyle::msoArrowheadDiamond:
return OUString("Square 45");
return "Square 45";
case office::MsoArrowheadStyle::msoArrowheadTriangle:
return OUString("Arrow");
return "Arrow";
default:
throw uno::RuntimeException( "Invalid Arrow Style!" );
}
@@ -427,7 +427,7 @@ ScVbaLineFormat::ForeColor()
OUString
ScVbaLineFormat::getServiceImplName()
{
return OUString("ScVbaLineFormat");
return "ScVbaLineFormat";
}
uno::Sequence< OUString >

View File

@@ -118,7 +118,7 @@ ScVbaPictureFormat::IncrementContrast( double increment )
OUString
ScVbaPictureFormat::getServiceImplName()
{
return OUString("ScVbaPictureFormat");
return "ScVbaPictureFormat";
}
uno::Sequence< OUString >

View File

@@ -742,7 +742,7 @@ ScVbaShape::WrapFormat()
OUString
ScVbaShape::getServiceImplName()
{
return OUString("ScVbaShape");
return "ScVbaShape";
}
uno::Sequence< OUString >

View File

@@ -400,7 +400,7 @@ ScVbaShapeRange:: createCollectionObject( const css::uno::Any& aSource )
OUString
ScVbaShapeRange::getServiceImplName()
{
return OUString("ScVbaShapeRange");
return "ScVbaShapeRange";
}
uno::Sequence< OUString >

View File

@@ -120,7 +120,7 @@ ScVbaShapes::getElementType()
OUString
ScVbaShapes::getServiceImplName()
{
return OUString("ScVbaShapes");
return "ScVbaShapes";
}
uno::Sequence< OUString >

View File

@@ -141,7 +141,7 @@ VbaTextFrame::Characters()
OUString
VbaTextFrame::getServiceImplName()
{
return OUString("VbaTextFrame");
return "VbaTextFrame";
}
uno::Sequence< OUString >

View File

@@ -132,7 +132,7 @@ VbaWindowBase::setWidth( sal_Int32 _width )
OUString
VbaWindowBase::getServiceImplName()
{
return OUString("VbaWindowBase");
return "VbaWindowBase";
}
uno::Sequence< OUString >