summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-01-30 16:38:54 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-01-31 08:56:20 +0000
commit1c3e84d8192218befebcddae2ed9842d081dc6c7 (patch)
treef4fc5cddd181d6d49bf55f74e6d3d107b8ae8d18 /framework
parente1e6cdbb1e9ff37f0bb740a70045c66953bec50c (diff)
teach lolugin:stringconstant about calling constructors
so we can remove unnecessary calls to the OUString(literal) constructor when calling constructors like this: Foo(OUString("xxx"), 1) Change-Id: I1de60ef561437c86b27dc9cb095a5deb2e103b36 Reviewed-on: https://gerrit.libreoffice.org/33698 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'framework')
-rw-r--r--framework/inc/properties.h10
-rw-r--r--framework/source/dispatch/dispatchinformationprovider.cxx2
-rw-r--r--framework/source/fwe/classes/actiontriggerpropertyset.cxx10
-rw-r--r--framework/source/fwe/classes/actiontriggerseparatorpropertyset.cxx2
-rw-r--r--framework/source/fwe/classes/addonsoptions.cxx2
-rw-r--r--framework/source/fwi/uielement/constitemcontainer.cxx6
-rw-r--r--framework/source/fwi/uielement/rootitemcontainer.cxx6
-rw-r--r--framework/source/helper/uiconfigelementwrapperbase.cxx16
-rw-r--r--framework/source/helper/uielementwrapperbase.cxx6
-rw-r--r--framework/source/services/sessionlistener.cxx4
-rw-r--r--framework/source/uifactory/uicontrollerfactory.cxx12
11 files changed, 35 insertions, 41 deletions
diff --git a/framework/inc/properties.h b/framework/inc/properties.h
index 78f4701b9412..86bc5deeb2ee 100644
--- a/framework/inc/properties.h
+++ b/framework/inc/properties.h
@@ -103,9 +103,9 @@ namespace framework{
#define AUTORECOVERY_PROPNAME_ASCII_EXISTS_SESSIONDATA "ExistsSessionData"
#define AUTORECOVERY_PROPNAME_ASCII_CRASHED "Crashed"
-#define AUTORECOVERY_PROPNAME_EXISTS_RECOVERYDATA OUString( AUTORECOVERY_PROPNAME_ASCII_EXISTS_RECOVERYDATA )
-#define AUTORECOVERY_PROPNAME_EXISTS_SESSIONDATA OUString( AUTORECOVERY_PROPNAME_ASCII_EXISTS_SESSIONDATA )
-#define AUTORECOVERY_PROPNAME_CRASHED OUString( AUTORECOVERY_PROPNAME_ASCII_CRASHED )
+#define AUTORECOVERY_PROPNAME_EXISTS_RECOVERYDATA AUTORECOVERY_PROPNAME_ASCII_EXISTS_RECOVERYDATA
+#define AUTORECOVERY_PROPNAME_EXISTS_SESSIONDATA AUTORECOVERY_PROPNAME_ASCII_EXISTS_SESSIONDATA
+#define AUTORECOVERY_PROPNAME_CRASHED AUTORECOVERY_PROPNAME_ASCII_CRASHED
#define AUTORECOVERY_PROPHANDLE_EXISTS_RECOVERYDATA 0
#define AUTORECOVERY_PROPHANDLE_EXISTS_SESSIONDATA 1
@@ -126,8 +126,8 @@ namespace framework{
/** properties for tab window (old) */
#define TABWINDOW_PROPNAME_ASCII_PARENTWINDOW "ParentWindow"
#define TABWINDOW_PROPNAME_ASCII_TOPWINDOW "TopWindow"
-#define TABWINDOW_PROPNAME_PARENTWINDOW OUString( TABWINDOW_PROPNAME_ASCII_PARENTWINDOW )
-#define TABWINDOW_PROPNAME_TOPWINDOW OUString( TABWINDOW_PROPNAME_ASCII_TOPWINDOW )
+#define TABWINDOW_PROPNAME_PARENTWINDOW TABWINDOW_PROPNAME_ASCII_PARENTWINDOW
+#define TABWINDOW_PROPNAME_TOPWINDOW TABWINDOW_PROPNAME_ASCII_TOPWINDOW
#define TABWINDOW_PROPHANDLE_PARENTWINDOW 0
#define TABWINDOW_PROPHANDLE_TOPWINDOW 1
diff --git a/framework/source/dispatch/dispatchinformationprovider.cxx b/framework/source/dispatch/dispatchinformationprovider.cxx
index a35191893a60..0948f63c4c6c 100644
--- a/framework/source/dispatch/dispatchinformationprovider.cxx
+++ b/framework/source/dispatch/dispatchinformationprovider.cxx
@@ -124,7 +124,7 @@ css::uno::Sequence< css::uno::Reference< css::frame::XDispatchInformationProvide
if (!xFrame.is())
return css::uno::Sequence< css::uno::Reference< css::frame::XDispatchInformationProvider > >();
- CloseDispatcher* pCloser = new CloseDispatcher(m_xContext, xFrame, OUString("_self")); // explicit "_self" ... not "" ... see implementation of close dispatcher itself!
+ CloseDispatcher* pCloser = new CloseDispatcher(m_xContext, xFrame, "_self"); // explicit "_self" ... not "" ... see implementation of close dispatcher itself!
css::uno::Reference< css::uno::XInterface > xCloser(static_cast< css::frame::XDispatch* >(pCloser), css::uno::UNO_QUERY);
css::uno::Reference< css::frame::XDispatchInformationProvider > xCloseDispatch(xCloser , css::uno::UNO_QUERY);
diff --git a/framework/source/fwe/classes/actiontriggerpropertyset.cxx b/framework/source/fwe/classes/actiontriggerpropertyset.cxx
index 738a5ac5b1df..40043c1d8e96 100644
--- a/framework/source/fwe/classes/actiontriggerpropertyset.cxx
+++ b/framework/source/fwe/classes/actiontriggerpropertyset.cxx
@@ -300,11 +300,11 @@ const Sequence< Property > ActionTriggerPropertySet::impl_getStaticPropertyDescr
{
const Property pActionTriggerPropertys[] =
{
- Property( OUString( "CommandURL" ), HANDLE_COMMANDURL , cppu::UnoType<OUString>::get(), PropertyAttribute::TRANSIENT ),
- Property( OUString( "HelpURL" ), HANDLE_HELPURL , cppu::UnoType<OUString>::get(), PropertyAttribute::TRANSIENT ),
- Property( OUString( "Image" ), HANDLE_IMAGE , cppu::UnoType<XBitmap>::get(), PropertyAttribute::TRANSIENT ),
- Property( OUString( "SubContainer" ), HANDLE_SUBCONTAINER , cppu::UnoType<OUString>::get(), PropertyAttribute::TRANSIENT ),
- Property( OUString( "Text" ), HANDLE_TEXT , cppu::UnoType<XInterface>::get(), PropertyAttribute::TRANSIENT )
+ Property( "CommandURL" , HANDLE_COMMANDURL , cppu::UnoType<OUString>::get(), PropertyAttribute::TRANSIENT ),
+ Property( "HelpURL" , HANDLE_HELPURL , cppu::UnoType<OUString>::get(), PropertyAttribute::TRANSIENT ),
+ Property( "Image" , HANDLE_IMAGE , cppu::UnoType<XBitmap>::get(), PropertyAttribute::TRANSIENT ),
+ Property( "SubContainer" , HANDLE_SUBCONTAINER , cppu::UnoType<OUString>::get(), PropertyAttribute::TRANSIENT ),
+ Property( "Text" , HANDLE_TEXT , cppu::UnoType<XInterface>::get(), PropertyAttribute::TRANSIENT )
};
// Use it to initialize sequence!
diff --git a/framework/source/fwe/classes/actiontriggerseparatorpropertyset.cxx b/framework/source/fwe/classes/actiontriggerseparatorpropertyset.cxx
index 7752d6caa9f6..ca2ec4f88813 100644
--- a/framework/source/fwe/classes/actiontriggerseparatorpropertyset.cxx
+++ b/framework/source/fwe/classes/actiontriggerseparatorpropertyset.cxx
@@ -245,7 +245,7 @@ const Sequence< Property > ActionTriggerSeparatorPropertySet::impl_getStaticProp
{
const Property pActionTriggerPropertys[] =
{
- Property( OUString( "SeparatorType" ), HANDLE_TYPE, cppu::UnoType<sal_Int16>::get(), PropertyAttribute::TRANSIENT )
+ Property( "SeparatorType", HANDLE_TYPE, cppu::UnoType<sal_Int16>::get(), PropertyAttribute::TRANSIENT )
};
// Use it to initialize sequence!
diff --git a/framework/source/fwe/classes/addonsoptions.cxx b/framework/source/fwe/classes/addonsoptions.cxx
index fc11b4e4c803..aa21aac96871 100644
--- a/framework/source/fwe/classes/addonsoptions.cxx
+++ b/framework/source/fwe/classes/addonsoptions.cxx
@@ -46,7 +46,7 @@ using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star;
-#define ROOTNODE_ADDONMENU OUString("Office.Addons" )
+#define ROOTNODE_ADDONMENU "Office.Addons"
#define PATHDELIMITER OUString("/" )
#define SEPARATOR_URL "private:separator"
diff --git a/framework/source/fwi/uielement/constitemcontainer.cxx b/framework/source/fwi/uielement/constitemcontainer.cxx
index 6a1c6f696433..d386f391ef0f 100644
--- a/framework/source/fwi/uielement/constitemcontainer.cxx
+++ b/framework/source/fwi/uielement/constitemcontainer.cxx
@@ -315,9 +315,9 @@ const css::uno::Sequence< css::beans::Property > ConstItemContainer::impl_getSta
const css::beans::Property pProperties[] =
{
- css::beans::Property( OUString(PROPNAME_UINAME), PROPHANDLE_UINAME ,
- cppu::UnoType<OUString>::get(),
- css::beans::PropertyAttribute::TRANSIENT | css::beans::PropertyAttribute::READONLY )
+ css::beans::Property( PROPNAME_UINAME, PROPHANDLE_UINAME ,
+ cppu::UnoType<OUString>::get(),
+ css::beans::PropertyAttribute::TRANSIENT | css::beans::PropertyAttribute::READONLY )
};
// Use it to initialize sequence!
const css::uno::Sequence< css::beans::Property > lPropertyDescriptor( pProperties, PROPCOUNT );
diff --git a/framework/source/fwi/uielement/rootitemcontainer.cxx b/framework/source/fwi/uielement/rootitemcontainer.cxx
index b6c2a6499aec..b71fa57b4758 100644
--- a/framework/source/fwi/uielement/rootitemcontainer.cxx
+++ b/framework/source/fwi/uielement/rootitemcontainer.cxx
@@ -353,9 +353,9 @@ const css::uno::Sequence< css::beans::Property > RootItemContainer::impl_getStat
const css::beans::Property pProperties[] =
{
- css::beans::Property( OUString(PROPNAME_UINAME), PROPHANDLE_UINAME ,
- cppu::UnoType<OUString>::get(),
- css::beans::PropertyAttribute::TRANSIENT )
+ css::beans::Property( PROPNAME_UINAME, PROPHANDLE_UINAME ,
+ cppu::UnoType<OUString>::get(),
+ css::beans::PropertyAttribute::TRANSIENT )
};
// Use it to initialize sequence!
const css::uno::Sequence< css::beans::Property > lPropertyDescriptor( pProperties, PROPCOUNT );
diff --git a/framework/source/helper/uiconfigelementwrapperbase.cxx b/framework/source/helper/uiconfigelementwrapperbase.cxx
index 0a39baf25164..f7ce2a1e1705 100644
--- a/framework/source/helper/uiconfigelementwrapperbase.cxx
+++ b/framework/source/helper/uiconfigelementwrapperbase.cxx
@@ -432,14 +432,14 @@ const css::uno::Sequence< css::beans::Property > UIConfigElementWrapperBase::imp
const css::beans::Property pProperties[] =
{
- css::beans::Property( OUString(UIELEMENT_PROPNAME_CONFIGLISTENER), UIELEMENT_PROPHANDLE_CONFIGLISTENER , cppu::UnoType<sal_Bool>::get(), css::beans::PropertyAttribute::TRANSIENT ),
- css::beans::Property( OUString(UIELEMENT_PROPNAME_CONFIGSOURCE), UIELEMENT_PROPHANDLE_CONFIGSOURCE , cppu::UnoType<css::ui::XUIConfigurationManager>::get(), css::beans::PropertyAttribute::TRANSIENT ),
- css::beans::Property( OUString(UIELEMENT_PROPNAME_FRAME), UIELEMENT_PROPHANDLE_FRAME , cppu::UnoType<css::frame::XFrame>::get(), css::beans::PropertyAttribute::TRANSIENT | css::beans::PropertyAttribute::READONLY ),
- css::beans::Property( OUString(UIELEMENT_PROPNAME_NOCLOSE), UIELEMENT_PROPHANDLE_NOCLOSE , cppu::UnoType<sal_Bool>::get(), css::beans::PropertyAttribute::TRANSIENT ),
- css::beans::Property( OUString(UIELEMENT_PROPNAME_PERSISTENT), UIELEMENT_PROPHANDLE_PERSISTENT , cppu::UnoType<sal_Bool>::get(), css::beans::PropertyAttribute::TRANSIENT ),
- css::beans::Property( OUString(UIELEMENT_PROPNAME_RESOURCEURL), UIELEMENT_PROPHANDLE_RESOURCEURL , cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::TRANSIENT | css::beans::PropertyAttribute::READONLY ),
- css::beans::Property( OUString(UIELEMENT_PROPNAME_TYPE), UIELEMENT_PROPHANDLE_TYPE , cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::TRANSIENT | css::beans::PropertyAttribute::READONLY ),
- css::beans::Property( OUString(UIELEMENT_PROPNAME_XMENUBAR), UIELEMENT_PROPHANDLE_XMENUBAR , cppu::UnoType<css::awt::XMenuBar>::get(), css::beans::PropertyAttribute::TRANSIENT | css::beans::PropertyAttribute::READONLY )
+ css::beans::Property( UIELEMENT_PROPNAME_CONFIGLISTENER, UIELEMENT_PROPHANDLE_CONFIGLISTENER , cppu::UnoType<sal_Bool>::get(), css::beans::PropertyAttribute::TRANSIENT ),
+ css::beans::Property( UIELEMENT_PROPNAME_CONFIGSOURCE, UIELEMENT_PROPHANDLE_CONFIGSOURCE , cppu::UnoType<css::ui::XUIConfigurationManager>::get(), css::beans::PropertyAttribute::TRANSIENT ),
+ css::beans::Property( UIELEMENT_PROPNAME_FRAME, UIELEMENT_PROPHANDLE_FRAME , cppu::UnoType<css::frame::XFrame>::get(), css::beans::PropertyAttribute::TRANSIENT | css::beans::PropertyAttribute::READONLY ),
+ css::beans::Property( UIELEMENT_PROPNAME_NOCLOSE, UIELEMENT_PROPHANDLE_NOCLOSE , cppu::UnoType<sal_Bool>::get(), css::beans::PropertyAttribute::TRANSIENT ),
+ css::beans::Property( UIELEMENT_PROPNAME_PERSISTENT, UIELEMENT_PROPHANDLE_PERSISTENT , cppu::UnoType<sal_Bool>::get(), css::beans::PropertyAttribute::TRANSIENT ),
+ css::beans::Property( UIELEMENT_PROPNAME_RESOURCEURL, UIELEMENT_PROPHANDLE_RESOURCEURL , cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::TRANSIENT | css::beans::PropertyAttribute::READONLY ),
+ css::beans::Property( UIELEMENT_PROPNAME_TYPE, UIELEMENT_PROPHANDLE_TYPE , cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::TRANSIENT | css::beans::PropertyAttribute::READONLY ),
+ css::beans::Property( UIELEMENT_PROPNAME_XMENUBAR, UIELEMENT_PROPHANDLE_XMENUBAR , cppu::UnoType<css::awt::XMenuBar>::get(), css::beans::PropertyAttribute::TRANSIENT | css::beans::PropertyAttribute::READONLY )
};
// Use it to initialize sequence!
const css::uno::Sequence< css::beans::Property > lPropertyDescriptor( pProperties, UIELEMENT_PROPCOUNT );
diff --git a/framework/source/helper/uielementwrapperbase.cxx b/framework/source/helper/uielementwrapperbase.cxx
index cfb48e553f37..d50ce5a32953 100644
--- a/framework/source/helper/uielementwrapperbase.cxx
+++ b/framework/source/helper/uielementwrapperbase.cxx
@@ -227,9 +227,9 @@ const css::uno::Sequence< css::beans::Property > UIElementWrapperBase::impl_getS
const css::beans::Property pProperties[] =
{
- css::beans::Property( OUString(UIELEMENT_PROPNAME_FRAME), UIELEMENT_PROPHANDLE_FRAME , cppu::UnoType<XFrame>::get(), css::beans::PropertyAttribute::TRANSIENT | css::beans::PropertyAttribute::READONLY ),
- css::beans::Property( OUString(UIELEMENT_PROPNAME_RESOURCEURL), UIELEMENT_PROPHANDLE_RESOURCEURL , cppu::UnoType<sal_Int16>::get(), css::beans::PropertyAttribute::TRANSIENT | css::beans::PropertyAttribute::READONLY ),
- css::beans::Property( OUString(UIELEMENT_PROPNAME_TYPE), UIELEMENT_PROPHANDLE_TYPE , cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::TRANSIENT | css::beans::PropertyAttribute::READONLY )
+ css::beans::Property( UIELEMENT_PROPNAME_FRAME, UIELEMENT_PROPHANDLE_FRAME , cppu::UnoType<XFrame>::get(), css::beans::PropertyAttribute::TRANSIENT | css::beans::PropertyAttribute::READONLY ),
+ css::beans::Property( UIELEMENT_PROPNAME_RESOURCEURL, UIELEMENT_PROPHANDLE_RESOURCEURL , cppu::UnoType<sal_Int16>::get(), css::beans::PropertyAttribute::TRANSIENT | css::beans::PropertyAttribute::READONLY ),
+ css::beans::Property( UIELEMENT_PROPNAME_TYPE, UIELEMENT_PROPHANDLE_TYPE , cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::TRANSIENT | css::beans::PropertyAttribute::READONLY )
};
// Use it to initialize sequence!
const css::uno::Sequence< css::beans::Property > lPropertyDescriptor( pProperties, UIELEMENT_PROPCOUNT );
diff --git a/framework/source/services/sessionlistener.cxx b/framework/source/services/sessionlistener.cxx
index 89be517fe071..f9c53947bb4a 100644
--- a/framework/source/services/sessionlistener.cxx
+++ b/framework/source/services/sessionlistener.cxx
@@ -185,7 +185,7 @@ void SessionListener::StoreSession( bool bAsync )
xDispatch->addStatusListener(this, aURL);
Sequence< PropertyValue > args(1);
- args[0] = PropertyValue(OUString("DispatchAsynchron"),-1,makeAny(bAsync),PropertyState_DIRECT_VALUE);
+ args[0] = PropertyValue("DispatchAsynchron",-1,makeAny(bAsync),PropertyState_DIRECT_VALUE);
xDispatch->dispatch(aURL, args);
} catch (const css::uno::Exception& e) {
SAL_WARN("fwk.session",e.Message);
@@ -213,7 +213,7 @@ void SessionListener::QuitSessionQuietly()
xURLTransformer->parseStrict(aURL);
Sequence< PropertyValue > args(1);
- args[0] = PropertyValue(OUString("DispatchAsynchron"),-1,makeAny(false),PropertyState_DIRECT_VALUE);
+ args[0] = PropertyValue("DispatchAsynchron",-1,makeAny(false),PropertyState_DIRECT_VALUE);
xDispatch->dispatch(aURL, args);
} catch (const css::uno::Exception& e) {
SAL_WARN("fwk.session",e.Message);
diff --git a/framework/source/uifactory/uicontrollerfactory.cxx b/framework/source/uifactory/uicontrollerfactory.cxx
index 490cd92948be..2578f40bf2dc 100644
--- a/framework/source/uifactory/uicontrollerfactory.cxx
+++ b/framework/source/uifactory/uicontrollerfactory.cxx
@@ -255,9 +255,7 @@ public:
};
PopupMenuControllerFactory::PopupMenuControllerFactory( const Reference< XComponentContext >& xContext ) :
- UIControllerFactory(
- xContext,
- OUString( "PopupMenu") )
+ UIControllerFactory( xContext, "PopupMenu" )
{
}
@@ -302,9 +300,7 @@ public:
};
ToolbarControllerFactory::ToolbarControllerFactory( const Reference< XComponentContext >& xContext ) :
- UIControllerFactory(
- xContext,
- OUString( "ToolBar" ))
+ UIControllerFactory( xContext, "ToolBar" )
{
}
@@ -349,9 +345,7 @@ public:
};
StatusbarControllerFactory::StatusbarControllerFactory( const Reference< XComponentContext >& xContext ) :
- UIControllerFactory(
- xContext,
- OUString( "StatusBar" ) )
+ UIControllerFactory( xContext, "StatusBar" )
{
}