Kaydet (Commit) c5376ef6 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

loplugin:stringconstant: elide explicit ctor usage (manually due to macros)

Change-Id: I4633229b94be1b15dfa14eafe8d7176a1fd253c9
üst 7bad24fe
......@@ -100,11 +100,6 @@ namespace framework{
#define LAYOUTMANAGER_PROPNAME_ASCII_PRESERVE_CONTENT_SIZE "PreserveContentSize"
#define LAYOUTMANAGER_PROPNAME_MENUBARCLOSER LAYOUTMANAGER_PROPNAME_ASCII_MENUBARCLOSER
#define LAYOUTMANAGER_PROPNAME_AUTOMATICTOOLBARS OUString( LAYOUTMANAGER_PROPNAME_ASCII_AUTOMATICTOOLBARS )
#define LAYOUTMANAGER_PROPNAME_REFRESHVISIBILITY OUString( LAYOUTMANAGER_PROPNAME_ASCII_REFRESHVISIBILITY )
#define LAYOUTMANAGER_PROPNAME_HIDECURRENTUI OUString( LAYOUTMANAGER_PROPNAME_ASCII_HIDECURRENTUI )
#define LAYOUTMANAGER_PROPNAME_LOCKCOUNT OUString( LAYOUTMANAGER_PROPNAME_ASCII_LOCKCOUNT )
#define LAYOUTMANAGER_PROPNAME_PRESERVE_CONTENT_SIZE OUString( LAYOUTMANAGER_PROPNAME_ASCII_PRESERVE_CONTENT_SIZE )
#define LAYOUTMANAGER_PROPHANDLE_MENUBARCLOSER 0
#define LAYOUTMANAGER_PROPHANDLE_AUTOMATICTOOLBARS 1
......@@ -141,18 +136,12 @@ namespace framework{
#define FILTER_PROPNAME_ASCII_DOCUMENTSERVICE "DocumentService"
#define FILTER_PROPNAME_DOCUMENTSERVICE OUString( FILTER_PROPNAME_ASCII_DOCUMENTSERVICE )
/** properties for office module config (Setup.xcu) */
#define OFFICEFACTORY_PROPNAME_ASCII_WINDOWATTRIBUTES "ooSetupFactoryWindowAttributes"
#define OFFICEFACTORY_PROPNAME_ASCII_UINAME "ooSetupFactoryUIName"
#define OFFICEFACTORY_PROPNAME_ASCII_ICON "ooSetupFactoryIcon"
#define OFFICEFACTORY_PROPNAME_WINDOWATTRIBUTES OUString( OFFICEFACTORY_PROPNAME_ASCII_WINDOWATTRIBUTES )
#define OFFICEFACTORY_PROPNAME_UINAME OUString( OFFICEFACTORY_PROPNAME_ASCII_UINAME )
#define OFFICEFACTORY_PROPNAME_ICON OUString( OFFICEFACTORY_PROPNAME_ASCII_ICON )
/** properties for tab window (old) */
#define TABWINDOW_PROPNAME_ASCII_PARENTWINDOW "ParentWindow"
#define TABWINDOW_PROPNAME_ASCII_TOPWINDOW "TopWindow"
......
......@@ -542,7 +542,7 @@ void TitleHelper::impl_appendModuleName (OUStringBuffer& sTitle)
const OUString sID = xModuleManager->identify(xOwner);
::comphelper::SequenceAsHashMap lProps = xModuleManager->getByName (sID);
const OUString sUIName = lProps.getUnpackedValueOrDefault (OFFICEFACTORY_PROPNAME_UINAME, OUString());
const OUString sUIName = lProps.getUnpackedValueOrDefault (OFFICEFACTORY_PROPNAME_ASCII_UINAME, OUString());
// An UIname property is an optional value !
// So please add it to the title in case it does really exists only.
......
......@@ -196,8 +196,8 @@ bool TitleBarUpdate::implst_getModuleInfo(const css::uno::Reference< css::frame:
rInfo.sID = xModuleManager->identify(xFrame);
::comphelper::SequenceAsHashMap lProps = xModuleManager->getByName (rInfo.sID);
rInfo.sUIName = lProps.getUnpackedValueOrDefault (OFFICEFACTORY_PROPNAME_UINAME, OUString());
rInfo.nIcon = lProps.getUnpackedValueOrDefault (OFFICEFACTORY_PROPNAME_ICON , INVALID_ICON_ID );
rInfo.sUIName = lProps.getUnpackedValueOrDefault (OFFICEFACTORY_PROPNAME_ASCII_UINAME, OUString());
rInfo.nIcon = lProps.getUnpackedValueOrDefault (OFFICEFACTORY_PROPNAME_ASCII_ICON , INVALID_ICON_ID );
// Note: If we could retrieve a module id ... everything is OK.
// UIName and Icon ID are optional values !
......
......@@ -148,12 +148,12 @@ LayoutManager::LayoutManager( const Reference< XComponentContext >& xContext ) :
m_aAsyncLayoutTimer.SetTimeout( 50 );
m_aAsyncLayoutTimer.SetTimeoutHdl( LINK( this, LayoutManager, AsyncLayoutHdl ) );
registerProperty( LAYOUTMANAGER_PROPNAME_AUTOMATICTOOLBARS, LAYOUTMANAGER_PROPHANDLE_AUTOMATICTOOLBARS, css::beans::PropertyAttribute::TRANSIENT, &m_bAutomaticToolbars, cppu::UnoType<decltype(m_bAutomaticToolbars)>::get() );
registerProperty( LAYOUTMANAGER_PROPNAME_HIDECURRENTUI, LAYOUTMANAGER_PROPHANDLE_HIDECURRENTUI, beans::PropertyAttribute::TRANSIENT, &m_bHideCurrentUI, cppu::UnoType<decltype(m_bHideCurrentUI)>::get() );
registerProperty( LAYOUTMANAGER_PROPNAME_LOCKCOUNT, LAYOUTMANAGER_PROPHANDLE_LOCKCOUNT, beans::PropertyAttribute::TRANSIENT | beans::PropertyAttribute::READONLY, &m_nLockCount, cppu::UnoType<decltype(m_nLockCount)>::get() );
registerProperty( LAYOUTMANAGER_PROPNAME_ASCII_AUTOMATICTOOLBARS, LAYOUTMANAGER_PROPHANDLE_AUTOMATICTOOLBARS, css::beans::PropertyAttribute::TRANSIENT, &m_bAutomaticToolbars, cppu::UnoType<decltype(m_bAutomaticToolbars)>::get() );
registerProperty( LAYOUTMANAGER_PROPNAME_ASCII_HIDECURRENTUI, LAYOUTMANAGER_PROPHANDLE_HIDECURRENTUI, beans::PropertyAttribute::TRANSIENT, &m_bHideCurrentUI, cppu::UnoType<decltype(m_bHideCurrentUI)>::get() );
registerProperty( LAYOUTMANAGER_PROPNAME_ASCII_LOCKCOUNT, LAYOUTMANAGER_PROPHANDLE_LOCKCOUNT, beans::PropertyAttribute::TRANSIENT | beans::PropertyAttribute::READONLY, &m_nLockCount, cppu::UnoType<decltype(m_nLockCount)>::get() );
registerProperty( LAYOUTMANAGER_PROPNAME_MENUBARCLOSER, LAYOUTMANAGER_PROPHANDLE_MENUBARCLOSER, beans::PropertyAttribute::TRANSIENT, &m_bMenuBarCloseButton, cppu::UnoType<decltype(m_bMenuBarCloseButton)>::get() );
registerPropertyNoMember( LAYOUTMANAGER_PROPNAME_REFRESHVISIBILITY, LAYOUTMANAGER_PROPHANDLE_REFRESHVISIBILITY, beans::PropertyAttribute::TRANSIENT, cppu::UnoType<decltype(bRefreshVisibility)>::get(), &bRefreshVisibility );
registerProperty( LAYOUTMANAGER_PROPNAME_PRESERVE_CONTENT_SIZE, LAYOUTMANAGER_PROPHANDLE_PRESERVE_CONTENT_SIZE, beans::PropertyAttribute::TRANSIENT, &m_bPreserveContentSize, cppu::UnoType<decltype(m_bPreserveContentSize)>::get() );
registerPropertyNoMember( LAYOUTMANAGER_PROPNAME_ASCII_REFRESHVISIBILITY, LAYOUTMANAGER_PROPHANDLE_REFRESHVISIBILITY, beans::PropertyAttribute::TRANSIENT, cppu::UnoType<decltype(bRefreshVisibility)>::get(), &bRefreshVisibility );
registerProperty( LAYOUTMANAGER_PROPNAME_ASCII_PRESERVE_CONTENT_SIZE, LAYOUTMANAGER_PROPHANDLE_PRESERVE_CONTENT_SIZE, beans::PropertyAttribute::TRANSIENT, &m_bPreserveContentSize, cppu::UnoType<decltype(m_bPreserveContentSize)>::get() );
}
LayoutManager::~LayoutManager()
......
......@@ -1713,7 +1713,7 @@ void LoadEnv::impl_applyPersistentWindowState(const css::uno::Reference< css::aw
xContext->getServiceManager()->createInstanceWithContext(SERVICENAME_FILTERFACTORY, xContext),
css::uno::UNO_QUERY_THROW);
::comphelper::SequenceAsHashMap lProps (xFilterCfg->getByName(sFilter));
OUString sModule = lProps.getUnpackedValueOrDefault(FILTER_PROPNAME_DOCUMENTSERVICE, OUString());
OUString sModule = lProps.getUnpackedValueOrDefault(FILTER_PROPNAME_ASCII_DOCUMENTSERVICE, OUString());
// get access to the configuration of this office module
css::uno::Reference< css::container::XNameAccess > xModuleCfg(::comphelper::ConfigurationHelper::openConfig(
......@@ -1726,7 +1726,7 @@ void LoadEnv::impl_applyPersistentWindowState(const css::uno::Reference< css::aw
// and apply it on the window.
// Do nothing, if no configuration entry exists!
OUString sWindowState;
::comphelper::ConfigurationHelper::readRelativeKey(xModuleCfg, sModule, OFFICEFACTORY_PROPNAME_WINDOWATTRIBUTES) >>= sWindowState;
::comphelper::ConfigurationHelper::readRelativeKey(xModuleCfg, sModule, OFFICEFACTORY_PROPNAME_ASCII_WINDOWATTRIBUTES) >>= sWindowState;
if (!sWindowState.isEmpty())
{
// SOLAR SAFE ->
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment