diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-11-06 09:36:08 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-11-06 09:36:08 +0100 |
commit | 69ef5d40c27f033cc60ef9fd563edbb0e81fbeaf (patch) | |
tree | 888a351ea69a6f6c6d03155784b568d0c0ae4fa1 /framework | |
parent | e9c65d802bc84b2c96435cd90974d79fb6c359ae (diff) |
loplugin:stringconstant: elide explicit ctor usage (automatic rewrite)
Change-Id: Iff1f68969f0f044c59a92ab4c019c471511743f7
Diffstat (limited to 'framework')
21 files changed, 103 insertions, 103 deletions
diff --git a/framework/source/accelerators/documentacceleratorconfiguration.cxx b/framework/source/accelerators/documentacceleratorconfiguration.cxx index f9c059e187c7..3aaf2c192aaf 100644 --- a/framework/source/accelerators/documentacceleratorconfiguration.cxx +++ b/framework/source/accelerators/documentacceleratorconfiguration.cxx @@ -125,7 +125,7 @@ DocumentAcceleratorConfiguration::DocumentAcceleratorConfiguration( { ::comphelper::SequenceAsHashMap lArgs(lArguments); m_xDocumentRoot = lArgs.getUnpackedValueOrDefault( - OUString("DocumentRoot"), + "DocumentRoot", css::uno::Reference< css::embed::XStorage >()); } } diff --git a/framework/source/classes/fwktabwindow.cxx b/framework/source/classes/fwktabwindow.cxx index b95258ce9b78..6292953bd53b 100644 --- a/framework/source/classes/fwktabwindow.cxx +++ b/framework/source/classes/fwktabwindow.cxx @@ -115,7 +115,7 @@ void FwkTabPage::CreateDialog() } } - CallMethod( OUString(INITIALIZE_METHOD) ); + CallMethod( INITIALIZE_METHOD ); } catch ( const lang::IllegalArgumentException& ) { diff --git a/framework/source/fwe/classes/addonmenu.cxx b/framework/source/fwe/classes/addonmenu.cxx index bce03cef00d9..f63e52ebc7e9 100644 --- a/framework/source/fwe/classes/addonmenu.cxx +++ b/framework/source/fwe/classes/addonmenu.cxx @@ -169,7 +169,7 @@ void AddonMenuManager::MergeAddonHelpMenu( const Reference< XFrame >& rFrame, PopupMenu* pHelpMenu = pMergeMenuBar->GetPopupMenu( SID_HELPMENU ); if ( !pHelpMenu ) { - sal_uInt16 nId = FindMenuId(pMergeMenuBar, OUString(".uno:HelpMenu")); + sal_uInt16 nId = FindMenuId(pMergeMenuBar, ".uno:HelpMenu"); if ( nId != USHRT_MAX ) pHelpMenu = pMergeMenuBar->GetPopupMenu( nId ); } @@ -183,7 +183,7 @@ void AddonMenuManager::MergeAddonHelpMenu( const Reference< XFrame >& rFrame, AddonsOptions aOptions; // try to detect the about menu item with the command URL - sal_uInt16 nId = FindMenuId(pHelpMenu, OUString(".uno:About")); + sal_uInt16 nId = FindMenuId(pHelpMenu, ".uno:About"); sal_uInt16 nInsPos = pHelpMenu->GetItemPos( nId ); const Sequence< Sequence< PropertyValue > >& rAddonHelpMenuEntries = aOptions.GetAddonsHelpMenu(); diff --git a/framework/source/fwe/xml/menudocumenthandler.cxx b/framework/source/fwe/xml/menudocumenthandler.cxx index 23131021a62c..fc27cf93632f 100644 --- a/framework/source/fwe/xml/menudocumenthandler.cxx +++ b/framework/source/fwe/xml/menudocumenthandler.cxx @@ -772,14 +772,14 @@ throw ( SAXException, RuntimeException ) m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); } - pList->AddAttribute( OUString( ATTRIBUTE_XMLNS_MENU ), + pList->AddAttribute( ATTRIBUTE_XMLNS_MENU, m_aAttributeType, - OUString( XMLNS_MENU ) ); + XMLNS_MENU ); if ( m_bIsMenuBar ) //FIXME - pList->AddAttribute( OUString( ATTRIBUTE_NS_ID ), + pList->AddAttribute( ATTRIBUTE_NS_ID, m_aAttributeType, - OUString( "menubar" ) ); + "menubar" ); OUString aRootElement; if ( m_bIsMenuBar ) @@ -831,12 +831,12 @@ throw ( SAXException, RuntimeException ) ::comphelper::AttributeList* pListMenu = new ::comphelper::AttributeList; Reference< XAttributeList > xListMenu( static_cast<XAttributeList *>(pListMenu) , UNO_QUERY ); - pListMenu->AddAttribute( OUString( ATTRIBUTE_NS_ID ), + pListMenu->AddAttribute( ATTRIBUTE_NS_ID, m_aAttributeType, aCommandURL ); if ( aCommandURL.copy( CMD_PROTOCOL_SIZE ) != CMD_PROTOCOL ) - pListMenu->AddAttribute( OUString( ATTRIBUTE_NS_LABEL ), + pListMenu->AddAttribute( ATTRIBUTE_NS_LABEL, m_aAttributeType, aLabel ); @@ -882,20 +882,20 @@ void OWriteMenuDocumentHandler::WriteMenuItem( const OUString& aCommandURL, cons ::comphelper::AttributeList* pList = new ::comphelper::AttributeList; Reference< XAttributeList > xList( static_cast<XAttributeList *>(pList) , UNO_QUERY ); - pList->AddAttribute( OUString( ATTRIBUTE_NS_ID ), + pList->AddAttribute( ATTRIBUTE_NS_ID, m_aAttributeType, aCommandURL ); if ( !aHelpURL.isEmpty() ) { - pList->AddAttribute( OUString( ATTRIBUTE_NS_HELPID ), + pList->AddAttribute( ATTRIBUTE_NS_HELPID, m_aAttributeType, aHelpURL ); } if ( !aLabel.isEmpty() && aCommandURL.copy( CMD_PROTOCOL_SIZE ) != CMD_PROTOCOL ) { - pList->AddAttribute( OUString( ATTRIBUTE_NS_LABEL ), + pList->AddAttribute( ATTRIBUTE_NS_LABEL, m_aAttributeType, aLabel ); } @@ -909,11 +909,11 @@ void OWriteMenuDocumentHandler::WriteMenuItem( const OUString& aCommandURL, cons if ( nStyle & pStyle->nBit ) { if ( !aValue.isEmpty() ) - aValue = aValue.concat( OUString( "+" ) ); + aValue = aValue.concat( "+" ); aValue += OUString::createFromAscii( pStyle->attrName ); } } - pList->AddAttribute( OUString( ATTRIBUTE_NS_STYLE ), + pList->AddAttribute( ATTRIBUTE_NS_STYLE, m_aAttributeType, aValue ); } diff --git a/framework/source/fwe/xml/statusbardocumenthandler.cxx b/framework/source/fwe/xml/statusbardocumenthandler.cxx index 1bd69f014093..6219eb184d7a 100644 --- a/framework/source/fwe/xml/statusbardocumenthandler.cxx +++ b/framework/source/fwe/xml/statusbardocumenthandler.cxx @@ -516,13 +516,13 @@ void OWriteStatusBarDocumentHandler::WriteStatusBarDocument() throw ::comphelper::AttributeList* pList = new ::comphelper::AttributeList; Reference< XAttributeList > xList( static_cast<XAttributeList *>(pList) , UNO_QUERY ); - pList->AddAttribute( OUString( ATTRIBUTE_XMLNS_STATUSBAR ), + pList->AddAttribute( ATTRIBUTE_XMLNS_STATUSBAR, m_aAttributeType, - OUString( XMLNS_STATUSBAR ) ); + XMLNS_STATUSBAR ); - pList->AddAttribute( OUString( ATTRIBUTE_XMLNS_XLINK ), + pList->AddAttribute( ATTRIBUTE_XMLNS_XLINK, m_aAttributeType, - OUString( XMLNS_XLINK ) ); + XMLNS_XLINK ); m_xWriteDocumentHandler->startElement( ELEMENT_NS_STATUSBAR, pList ); m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); @@ -587,19 +587,19 @@ throw ( SAXException, RuntimeException ) { pList->AddAttribute( m_aXMLStatusBarNS + ATTRIBUTE_ALIGN, m_aAttributeType, - OUString( ATTRIBUTE_ALIGN_RIGHT ) ); + ATTRIBUTE_ALIGN_RIGHT ); } else if ( nStyle & ItemStyle::ALIGN_CENTER ) { pList->AddAttribute( m_aXMLStatusBarNS + ATTRIBUTE_ALIGN, m_aAttributeType, - OUString( ATTRIBUTE_ALIGN_CENTER ) ); + ATTRIBUTE_ALIGN_CENTER ); } else { pList->AddAttribute( m_aXMLStatusBarNS + ATTRIBUTE_ALIGN, m_aAttributeType, - OUString( ATTRIBUTE_ALIGN_LEFT ) ); + ATTRIBUTE_ALIGN_LEFT ); } // style ( SIB_IN is default ) @@ -607,13 +607,13 @@ throw ( SAXException, RuntimeException ) { pList->AddAttribute( m_aXMLStatusBarNS + ATTRIBUTE_STYLE, m_aAttributeType, - OUString( ATTRIBUTE_STYLE_FLAT ) ); + ATTRIBUTE_STYLE_FLAT ); } else if ( nStyle & ItemStyle::DRAW_OUT3D ) { pList->AddAttribute( m_aXMLStatusBarNS + ATTRIBUTE_STYLE, m_aAttributeType, - OUString( ATTRIBUTE_STYLE_OUT ) ); + ATTRIBUTE_STYLE_OUT ); } // autosize (default sal_False) @@ -621,7 +621,7 @@ throw ( SAXException, RuntimeException ) { pList->AddAttribute( m_aXMLStatusBarNS + ATTRIBUTE_AUTOSIZE, m_aAttributeType, - OUString( ATTRIBUTE_BOOLEAN_TRUE ) ); + ATTRIBUTE_BOOLEAN_TRUE ); } // ownerdraw (default sal_False) @@ -629,7 +629,7 @@ throw ( SAXException, RuntimeException ) { pList->AddAttribute( m_aXMLStatusBarNS + ATTRIBUTE_OWNERDRAW, m_aAttributeType, - OUString( ATTRIBUTE_BOOLEAN_TRUE ) ); + ATTRIBUTE_BOOLEAN_TRUE ); } // width (default 0) diff --git a/framework/source/fwe/xml/toolboxdocumenthandler.cxx b/framework/source/fwe/xml/toolboxdocumenthandler.cxx index 2a0333e00d56..38eb688be7d3 100644 --- a/framework/source/fwe/xml/toolboxdocumenthandler.cxx +++ b/framework/source/fwe/xml/toolboxdocumenthandler.cxx @@ -699,13 +699,13 @@ void OWriteToolBoxDocumentHandler::WriteToolBoxDocument() throw ::comphelper::AttributeList* pList = new ::comphelper::AttributeList; Reference< XAttributeList > xList( static_cast<XAttributeList *>(pList) , UNO_QUERY ); - pList->AddAttribute( OUString( ATTRIBUTE_XMLNS_TOOLBAR ), + pList->AddAttribute( ATTRIBUTE_XMLNS_TOOLBAR, m_aAttributeType, - OUString( XMLNS_TOOLBAR ) ); + XMLNS_TOOLBAR ); - pList->AddAttribute( OUString( ATTRIBUTE_XMLNS_XLINK ), + pList->AddAttribute( ATTRIBUTE_XMLNS_XLINK, m_aAttributeType, - OUString( XMLNS_XLINK ) ); + XMLNS_XLINK ); if ( !aUIName.isEmpty() ) pList->AddAttribute( m_aXMLToolbarNS + ATTRIBUTE_UINAME, @@ -785,7 +785,7 @@ throw ( SAXException, RuntimeException ) { pList->AddAttribute( m_aXMLToolbarNS + ATTRIBUTE_VISIBLE, m_aAttributeType, - OUString( ATTRIBUTE_BOOLEAN_FALSE ) ); + ATTRIBUTE_BOOLEAN_FALSE ); } if ( !rHelpURL.isEmpty() ) @@ -812,7 +812,7 @@ throw ( SAXException, RuntimeException ) if ( nStyle & pStyle->nBit ) { if ( !aValue.isEmpty() ) - aValue = aValue.concat( OUString( " " ) ); + aValue = aValue.concat( " " ); aValue += OUString::createFromAscii( pStyle->attrName ); } } diff --git a/framework/source/loadenv/loadenv.cxx b/framework/source/loadenv/loadenv.cxx index 18b43ebdb4ae..a9183a8fa745 100644 --- a/framework/source/loadenv/loadenv.cxx +++ b/framework/source/loadenv/loadenv.cxx @@ -876,7 +876,7 @@ bool LoadEnv::impl_handleContent() while(xSet->hasMoreElements()) { ::comphelper::SequenceAsHashMap lProps (xSet->nextElement()); - OUString sHandler = lProps.getUnpackedValueOrDefault(OUString(PROP_NAME), OUString()); + OUString sHandler = lProps.getUnpackedValueOrDefault(PROP_NAME, OUString()); css::uno::Reference< css::frame::XNotifyingDispatch > xHandler; try @@ -920,9 +920,9 @@ bool LoadEnv::impl_furtherDocsAllowed() { css::uno::Any aVal = ::comphelper::ConfigurationHelper::readDirectKey( xContext, - OUString("org.openoffice.Office.Common/"), - OUString("Misc"), - OUString("MaxOpenDocuments"), + "org.openoffice.Office.Common/", + "Misc", + "MaxOpenDocuments", ::comphelper::ConfigurationHelper::E_READONLY); // NIL means: count of allowed documents = infinite ! @@ -1167,7 +1167,7 @@ css::uno::Reference< css::uno::XInterface > LoadEnv::impl_searchLoader() // try everyone ... // Ignore any loader, which makes trouble :-) ::comphelper::SequenceAsHashMap lLoaderProps(xSet->nextElement()); - OUString sLoader = lLoaderProps.getUnpackedValueOrDefault(OUString(PROP_NAME), OUString()); + OUString sLoader = lLoaderProps.getUnpackedValueOrDefault(PROP_NAME, OUString()); css::uno::Reference< css::uno::XInterface > xLoader; xLoader = xLoaderFactory->createInstance(sLoader); @@ -1639,9 +1639,9 @@ void LoadEnv::impl_makeFrameWindowVisible(const css::uno::Reference< css::awt::X css::uno::Any const a = ::comphelper::ConfigurationHelper::readDirectKey( xContext, - OUString("org.openoffice.Office.Common/View"), - OUString("NewDocumentHandling"), - OUString("ForceFocusAndToFront"), + "org.openoffice.Office.Common/View", + "NewDocumentHandling", + "ForceFocusAndToFront", ::comphelper::ConfigurationHelper::E_READONLY); a >>= bForceFrontAndFocus; } diff --git a/framework/source/services/autorecovery.cxx b/framework/source/services/autorecovery.cxx index 7e819b82eaa8..0acace7f88f4 100644 --- a/framework/source/services/autorecovery.cxx +++ b/framework/source/services/autorecovery.cxx @@ -1776,13 +1776,13 @@ css::uno::Reference< css::container::XNameAccess > AutoRecovery::implts_openConf ::comphelper::ConfigurationHelper::readDirectKey(m_xContext, sCFG_PACKAGE_RECOVERY, sCFG_PATH_AUTOSAVE, - OUString(CFG_ENTRY_MINSPACE_DOCSAVE), + CFG_ENTRY_MINSPACE_DOCSAVE, ::comphelper::ConfigurationHelper::E_STANDARD) >>= nMinSpaceDocSave; ::comphelper::ConfigurationHelper::readDirectKey(m_xContext, sCFG_PACKAGE_RECOVERY, sCFG_PATH_AUTOSAVE, - OUString(CFG_ENTRY_MINSPACE_CONFIGSAVE), + CFG_ENTRY_MINSPACE_CONFIGSAVE, ::comphelper::ConfigurationHelper::E_STANDARD) >>= nMinSpaceConfigSave; } catch(const css::uno::Exception&) @@ -1954,7 +1954,7 @@ void AutoRecovery::implts_specifyDefaultFilterAndExtension(AutoRecovery::TDocume if (! xCFG.is()) { // open module config on demand and cache the update access - xCFG.set( ::comphelper::ConfigurationHelper::openConfig(m_xContext, OUString(CFG_PACKAGE_MODULES), + xCFG.set( ::comphelper::ConfigurationHelper::openConfig(m_xContext, CFG_PACKAGE_MODULES, ::comphelper::ConfigurationHelper::E_STANDARD), css::uno::UNO_QUERY_THROW); @@ -1978,9 +1978,9 @@ void AutoRecovery::implts_specifyDefaultFilterAndExtension(AutoRecovery::TDocume "com.sun.star.document.TypeDetection", m_xContext), css::uno::UNO_QUERY_THROW); ::comphelper::SequenceAsHashMap lFilterProps (xFilterCFG->getByName(rInfo.DefaultFilter)); - OUString sTypeRegistration = lFilterProps.getUnpackedValueOrDefault(OUString(FILTER_PROP_TYPE), OUString()); + OUString sTypeRegistration = lFilterProps.getUnpackedValueOrDefault(FILTER_PROP_TYPE, OUString()); ::comphelper::SequenceAsHashMap lTypeProps (xTypeCFG->getByName(sTypeRegistration)); - css::uno::Sequence< OUString > lExtensions = lTypeProps.getUnpackedValueOrDefault(OUString(TYPE_PROP_EXTENSIONS), css::uno::Sequence< OUString >()); + css::uno::Sequence< OUString > lExtensions = lTypeProps.getUnpackedValueOrDefault(TYPE_PROP_EXTENSIONS, css::uno::Sequence< OUString >()); if (lExtensions.getLength()) { rInfo.Extension = "." + lExtensions[0]; @@ -3714,9 +3714,9 @@ void AutoRecovery::implts_doEmergencySave(const DispatchParams& aParams) // documents exists and was saved. ::comphelper::ConfigurationHelper::writeDirectKey( m_xContext, - OUString(CFG_PACKAGE_RECOVERY), - OUString(CFG_PATH_RECOVERYINFO), - OUString(CFG_ENTRY_CRASHED), + CFG_PACKAGE_RECOVERY, + CFG_PATH_RECOVERYINFO, + CFG_ENTRY_CRASHED, css::uno::makeAny(sal_True), ::comphelper::ConfigurationHelper::E_STANDARD); @@ -3774,9 +3774,9 @@ void AutoRecovery::implts_doRecovery(const DispatchParams& aParams) // Reset the configuration hint "we was crashed"! ::comphelper::ConfigurationHelper::writeDirectKey( m_xContext, - OUString(CFG_PACKAGE_RECOVERY), - OUString(CFG_PATH_RECOVERYINFO), - OUString(CFG_ENTRY_CRASHED), + CFG_PACKAGE_RECOVERY, + CFG_PATH_RECOVERYINFO, + CFG_ENTRY_CRASHED, css::uno::makeAny(sal_False), ::comphelper::ConfigurationHelper::E_STANDARD); } @@ -3839,9 +3839,9 @@ void AutoRecovery::implts_doSessionQuietQuit(const DispatchParams& /*aParams*/) // the on next startup we know what's happen last time ::comphelper::ConfigurationHelper::writeDirectKey( m_xContext, - OUString(CFG_PACKAGE_RECOVERY), - OUString(CFG_PATH_RECOVERYINFO), - OUString(CFG_ENTRY_SESSIONDATA), + CFG_PACKAGE_RECOVERY, + CFG_PATH_RECOVERYINFO, + CFG_ENTRY_SESSIONDATA, css::uno::makeAny(sal_True), ::comphelper::ConfigurationHelper::E_STANDARD); @@ -3874,9 +3874,9 @@ void AutoRecovery::implts_doSessionRestore(const DispatchParams& aParams) SAL_INFO("fwk.autorecovery", "... reset config key 'SessionData'"); ::comphelper::ConfigurationHelper::writeDirectKey( m_xContext, - OUString(CFG_PACKAGE_RECOVERY), - OUString(CFG_PATH_RECOVERYINFO), - OUString(CFG_ENTRY_SESSIONDATA), + CFG_PACKAGE_RECOVERY, + CFG_PATH_RECOVERYINFO, + CFG_ENTRY_SESSIONDATA, css::uno::makeAny(sal_False), ::comphelper::ConfigurationHelper::E_STANDARD); @@ -4007,9 +4007,9 @@ void SAL_CALL AutoRecovery::getFastPropertyValue(css::uno::Any& aValue , bool bSessionData = false; ::comphelper::ConfigurationHelper::readDirectKey( m_xContext, - OUString(CFG_PACKAGE_RECOVERY), - OUString(CFG_PATH_RECOVERYINFO), - OUString(CFG_ENTRY_SESSIONDATA), + CFG_PACKAGE_RECOVERY, + CFG_PATH_RECOVERYINFO, + CFG_ENTRY_SESSIONDATA, ::comphelper::ConfigurationHelper::E_READONLY) >>= bSessionData; bool bRecoveryData = m_lDocCache.size() > 0; @@ -4026,18 +4026,18 @@ void SAL_CALL AutoRecovery::getFastPropertyValue(css::uno::Any& aValue , case AUTORECOVERY_PROPHANDLE_CRASHED : aValue = ::comphelper::ConfigurationHelper::readDirectKey( m_xContext, - OUString(CFG_PACKAGE_RECOVERY), - OUString(CFG_PATH_RECOVERYINFO), - OUString(CFG_ENTRY_CRASHED), + CFG_PACKAGE_RECOVERY, + CFG_PATH_RECOVERYINFO, + CFG_ENTRY_CRASHED, ::comphelper::ConfigurationHelper::E_READONLY); break; case AUTORECOVERY_PROPHANDLE_EXISTS_SESSIONDATA : aValue = ::comphelper::ConfigurationHelper::readDirectKey( m_xContext, - OUString(CFG_PACKAGE_RECOVERY), - OUString(CFG_PATH_RECOVERYINFO), - OUString(CFG_ENTRY_SESSIONDATA), + CFG_PACKAGE_RECOVERY, + CFG_PATH_RECOVERYINFO, + CFG_ENTRY_SESSIONDATA, ::comphelper::ConfigurationHelper::E_READONLY); break; } @@ -4337,7 +4337,7 @@ void AutoRecovery::st_impl_removeFile(const OUString& sURL) try { ::ucbhelper::Content aContent = ::ucbhelper::Content(sURL, css::uno::Reference< css::ucb::XCommandEnvironment >(), m_xContext); - aContent.executeCommand(OUString("delete"), css::uno::makeAny(sal_True)); + aContent.executeCommand("delete", css::uno::makeAny(sal_True)); } catch(const css::uno::Exception&) { diff --git a/framework/source/services/substitutepathvars.cxx b/framework/source/services/substitutepathvars.cxx index 9f40be23b408..ef5b9698ec13 100644 --- a/framework/source/services/substitutepathvars.cxx +++ b/framework/source/services/substitutepathvars.cxx @@ -1236,7 +1236,7 @@ void SubstitutePathVariables::SetPredefinedPathVariables() // Set $(prog), $(progpath), $(progurl) INetURLObject aProgObj( m_aPreDefVars.m_FixedVar[PREDEFVAR_BRANDBASEURL] ); - if ( !aProgObj.HasError() && aProgObj.insertName( OUString(LIBO_BIN_FOLDER) ) ) + if ( !aProgObj.HasError() && aProgObj.insertName( LIBO_BIN_FOLDER ) ) { m_aPreDefVars.m_FixedVar[ PREDEFVAR_PROGPATH ] = aProgObj.GetMainURL(INetURLObject::NO_DECODE); m_aPreDefVars.m_FixedVar[ PREDEFVAR_PROGURL ] = m_aPreDefVars.m_FixedVar[ PREDEFVAR_PROGPATH ]; diff --git a/framework/source/services/taskcreatorsrv.cxx b/framework/source/services/taskcreatorsrv.cxx index 70c1651707f8..7e8fa63944e5 100644 --- a/framework/source/services/taskcreatorsrv.cxx +++ b/framework/source/services/taskcreatorsrv.cxx @@ -138,15 +138,15 @@ css::uno::Reference< css::uno::XInterface > SAL_CALL TaskCreatorService::createI { ::comphelper::SequenceAsHashMap lArgs(lArguments); - css::uno::Reference< css::frame::XFrame > xParentFrame = lArgs.getUnpackedValueOrDefault(OUString(ARGUMENT_PARENTFRAME) , css::uno::Reference< css::frame::XFrame >()); - OUString sFrameName = lArgs.getUnpackedValueOrDefault(OUString(ARGUMENT_FRAMENAME) , OUString() ); - bool bVisible = lArgs.getUnpackedValueOrDefault(OUString(ARGUMENT_MAKEVISIBLE) , false ); - bool bCreateTopWindow = lArgs.getUnpackedValueOrDefault(OUString(ARGUMENT_CREATETOPWINDOW) , true ); + css::uno::Reference< css::frame::XFrame > xParentFrame = lArgs.getUnpackedValueOrDefault(ARGUMENT_PARENTFRAME , css::uno::Reference< css::frame::XFrame >()); + OUString sFrameName = lArgs.getUnpackedValueOrDefault(ARGUMENT_FRAMENAME , OUString() ); + bool bVisible = lArgs.getUnpackedValueOrDefault(ARGUMENT_MAKEVISIBLE , false ); + bool bCreateTopWindow = lArgs.getUnpackedValueOrDefault(ARGUMENT_CREATETOPWINDOW , true ); // only possize=[0,0,0,0] triggers default handling of vcl ! - css::awt::Rectangle aPosSize = lArgs.getUnpackedValueOrDefault(OUString(ARGUMENT_POSSIZE) , css::awt::Rectangle(0, 0, 0, 0) ); - css::uno::Reference< css::awt::XWindow > xContainerWindow = lArgs.getUnpackedValueOrDefault(OUString(ARGUMENT_CONTAINERWINDOW) , css::uno::Reference< css::awt::XWindow >() ); - bool bSupportPersistentWindowState = lArgs.getUnpackedValueOrDefault(OUString(ARGUMENT_SUPPORTPERSISTENTWINDOWSTATE) , false ); - bool bEnableTitleBarUpdate = lArgs.getUnpackedValueOrDefault(OUString(ARGUMENT_ENABLE_TITLEBARUPDATE) , true ); + css::awt::Rectangle aPosSize = lArgs.getUnpackedValueOrDefault(ARGUMENT_POSSIZE , css::awt::Rectangle(0, 0, 0, 0) ); + css::uno::Reference< css::awt::XWindow > xContainerWindow = lArgs.getUnpackedValueOrDefault(ARGUMENT_CONTAINERWINDOW , css::uno::Reference< css::awt::XWindow >() ); + bool bSupportPersistentWindowState = lArgs.getUnpackedValueOrDefault(ARGUMENT_SUPPORTPERSISTENTWINDOWSTATE , false ); + bool bEnableTitleBarUpdate = lArgs.getUnpackedValueOrDefault(ARGUMENT_ENABLE_TITLEBARUPDATE , true ); // We use FrameName property to set it as API name of the new created frame later. // But those frame names must be different from the set of special target names as e.g. _blank, _self etcpp ! diff --git a/framework/source/uielement/comboboxtoolbarcontroller.cxx b/framework/source/uielement/comboboxtoolbarcontroller.cxx index 5a8277f1c6d3..b4748579a86a 100644 --- a/framework/source/uielement/comboboxtoolbarcontroller.cxx +++ b/framework/source/uielement/comboboxtoolbarcontroller.cxx @@ -285,7 +285,7 @@ void ComboboxToolbarController::executeControlCommand( const css::frame::Control // send notification uno::Sequence< beans::NamedValue > aInfo { { "List", css::uno::makeAny(aList) } }; - addNotifyInfo( OUString( "ListChanged" ), + addNotifyInfo( "ListChanged", getDispatchFromCommand( m_aCommandURL ), aInfo ); diff --git a/framework/source/uielement/complextoolbarcontroller.cxx b/framework/source/uielement/complextoolbarcontroller.cxx index 62c7edbb128d..4f3d6ea602d0 100644 --- a/framework/source/uielement/complextoolbarcontroller.cxx +++ b/framework/source/uielement/complextoolbarcontroller.cxx @@ -303,7 +303,7 @@ void ComplexToolbarController::notifyFocusGet() { // send focus get notification uno::Sequence< beans::NamedValue > aInfo; - addNotifyInfo( OUString( "FocusSet" ), + addNotifyInfo( "FocusSet", getDispatchFromCommand( m_aCommandURL ), aInfo ); } @@ -312,7 +312,7 @@ void ComplexToolbarController::notifyFocusLost() { // send focus lost notification uno::Sequence< beans::NamedValue > aInfo; - addNotifyInfo( OUString( "FocusLost" ), + addNotifyInfo( "FocusLost", getDispatchFromCommand( m_aCommandURL ), aInfo ); } @@ -321,7 +321,7 @@ void ComplexToolbarController::notifyTextChanged( const OUString& aText ) { // send text changed notification uno::Sequence< beans::NamedValue > aInfo { { "Text", css::uno::makeAny(aText) } }; - addNotifyInfo( OUString( "TextChanged" ), + addNotifyInfo( "TextChanged", getDispatchFromCommand( m_aCommandURL ), aInfo ); } diff --git a/framework/source/uielement/dropdownboxtoolbarcontroller.cxx b/framework/source/uielement/dropdownboxtoolbarcontroller.cxx index 82e0ad8bfa17..72adca5533a3 100644 --- a/framework/source/uielement/dropdownboxtoolbarcontroller.cxx +++ b/framework/source/uielement/dropdownboxtoolbarcontroller.cxx @@ -222,7 +222,7 @@ void DropdownToolbarController::executeControlCommand( const css::frame::Control // send notification uno::Sequence< beans::NamedValue > aInfo { { "List", css::uno::makeAny(aList) } }; - addNotifyInfo( OUString( "ListChanged" ), + addNotifyInfo( "ListChanged", getDispatchFromCommand( m_aCommandURL ), aInfo ); diff --git a/framework/source/uielement/imagebuttontoolbarcontroller.cxx b/framework/source/uielement/imagebuttontoolbarcontroller.cxx index ddf97b064fc6..11d6163c9e29 100644 --- a/framework/source/uielement/imagebuttontoolbarcontroller.cxx +++ b/framework/source/uielement/imagebuttontoolbarcontroller.cxx @@ -113,7 +113,7 @@ void ImageButtonToolbarController::executeControlCommand( const css::frame::Cont // send notification uno::Sequence< beans::NamedValue > aInfo { { "URL", css::uno::makeAny(aURL) } }; - addNotifyInfo( OUString( "ImageChanged" ), + addNotifyInfo( "ImageChanged", getDispatchFromCommand( m_aCommandURL ), aInfo ); break; diff --git a/framework/source/uielement/recentfilesmenucontroller.cxx b/framework/source/uielement/recentfilesmenucontroller.cxx index 6311bff9e17c..33e3efea200c 100644 --- a/framework/source/uielement/recentfilesmenucontroller.cxx +++ b/framework/source/uielement/recentfilesmenucontroller.cxx @@ -235,7 +235,7 @@ void RecentFilesMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu > pVCLPopupMenu->InsertItem( sal_uInt16( nCount + 1 ), FWK_RESSTR(STR_CLEAR_RECENT_FILES) ); pVCLPopupMenu->SetItemCommand( sal_uInt16( nCount + 1 ), - OUString( CMD_CLEAR_LIST ) ); + CMD_CLEAR_LIST ); pVCLPopupMenu->SetHelpText( sal_uInt16( nCount + 1 ), FWK_RESSTR(STR_CLEAR_RECENT_FILES_HELP) ); @@ -245,7 +245,7 @@ void RecentFilesMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu > pVCLPopupMenu->InsertItem( sal_uInt16( nCount + 2 ), FWK_RESSTR(STR_OPEN_REMOTE) ); pVCLPopupMenu->SetItemCommand( sal_uInt16( nCount + 2 ), - OUString( CMD_OPEN_REMOTE ) ); + CMD_OPEN_REMOTE ); } } else diff --git a/framework/source/uielement/saveasmenucontroller.cxx b/framework/source/uielement/saveasmenucontroller.cxx index 63bbbfc64cca..77e3f0267473 100644 --- a/framework/source/uielement/saveasmenucontroller.cxx +++ b/framework/source/uielement/saveasmenucontroller.cxx @@ -117,7 +117,7 @@ void SaveAsMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& rPo pVCLPopupMenu->InsertItem( sal_uInt16( 1 ), FWK_RESSTR( STR_REMOTE_FILE ) ); pVCLPopupMenu->SetItemCommand( sal_uInt16( 1 ), - OUString( CMD_SAVE_REMOTE ) ); + CMD_SAVE_REMOTE ); } } diff --git a/framework/source/uielement/togglebuttontoolbarcontroller.cxx b/framework/source/uielement/togglebuttontoolbarcontroller.cxx index c590764656c2..5dd73a65a47e 100644 --- a/framework/source/uielement/togglebuttontoolbarcontroller.cxx +++ b/framework/source/uielement/togglebuttontoolbarcontroller.cxx @@ -145,7 +145,7 @@ void ToggleButtonToolbarController::executeControlCommand( const css::frame::Con // send notification uno::Sequence< beans::NamedValue > aInfo { { "List", css::uno::makeAny(aList) } }; - addNotifyInfo( OUString( "ListChanged" ), + addNotifyInfo( "ListChanged", getDispatchFromCommand( m_aCommandURL ), aInfo ); @@ -170,7 +170,7 @@ void ToggleButtonToolbarController::executeControlCommand( const css::frame::Con // send notification uno::Sequence< beans::NamedValue > aInfo { { "ItemChecked", css::uno::makeAny(nPos) } }; - addNotifyInfo( OUString( "Pos" ), + addNotifyInfo( "Pos", getDispatchFromCommand( m_aCommandURL ), aInfo ); } diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx index d30ee80a5f72..cdf6b582ad5a 100644 --- a/framework/source/uielement/toolbarmanager.cxx +++ b/framework/source/uielement/toolbarmanager.cxx @@ -217,7 +217,7 @@ ToolBarManager::ToolBarManager( const Reference< XComponentContext >& rxContext, // enables a menu for clipped items and customization SvtCommandOptions aCmdOptions; sal_uInt16 nMenuType = TOOLBOX_MENUTYPE_CLIPPEDITEMS; - if ( !aCmdOptions.Lookup( SvtCommandOptions::CMDOPTION_DISABLED, OUString("CreateDialog"))) + if ( !aCmdOptions.Lookup( SvtCommandOptions::CMDOPTION_DISABLED, "CreateDialog")) nMenuType |= TOOLBOX_MENUTYPE_CUSTOMIZE; m_pToolBar->SetCommandHdl( LINK( this, ToolBarManager, Command ) ); @@ -1111,7 +1111,7 @@ void ToolBarManager::AddImageOrientationListener() m_xImageOrientationListener.set( static_cast< ::cppu::OWeakObject *>( pImageOrientation ), UNO_QUERY ); pImageOrientation->addStatusListener( - OUString( ".uno:ImageOrientation" )); + ".uno:ImageOrientation"); pImageOrientation->bindListener(); } } diff --git a/framework/source/uielement/toolbarsmenucontroller.cxx b/framework/source/uielement/toolbarsmenucontroller.cxx index 52a7cc1230b2..bf9c793f9f30 100644 --- a/framework/source/uielement/toolbarsmenucontroller.cxx +++ b/framework/source/uielement/toolbarsmenucontroller.cxx @@ -473,11 +473,11 @@ void ToolbarsMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& r { if ( m_aModuleIdentifier == "com.sun.star.drawing.DrawingDocument" || m_aModuleIdentifier == "com.sun.star.presentation.PresentationDocument" ) - addCommand( m_xPopupMenu, OUString( CMD_COLORBAR ), aEmptyString ); + addCommand( m_xPopupMenu, CMD_COLORBAR, aEmptyString ); else if ( m_aModuleIdentifier == "com.sun.star.sheet.SpreadsheetDocument" ) - addCommand( m_xPopupMenu, OUString( CMD_INPUTLINEBAR ), aEmptyString ); + addCommand( m_xPopupMenu, CMD_INPUTLINEBAR, aEmptyString ); else - addCommand( m_xPopupMenu, OUString( CMD_FORMULABAR ), aEmptyString ); + addCommand( m_xPopupMenu, CMD_FORMULABAR, aEmptyString ); } bool bAddCommand( true ); @@ -487,7 +487,7 @@ void ToolbarsMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& r if ( aCmdOptions.HasEntries( SvtCommandOptions::CMDOPTION_DISABLED )) { if ( aCmdOptions.Lookup( SvtCommandOptions::CMDOPTION_DISABLED, - OUString( CONFIGURE_TOOLBARS_CMD ))) + CONFIGURE_TOOLBARS_CMD)) bAddCommand = false; } diff --git a/framework/source/xml/acceleratorconfigurationwriter.cxx b/framework/source/xml/acceleratorconfigurationwriter.cxx index fce62f848930..07c0a123bd26 100644 --- a/framework/source/xml/acceleratorconfigurationwriter.cxx +++ b/framework/source/xml/acceleratorconfigurationwriter.cxx @@ -101,16 +101,16 @@ void AcceleratorConfigurationWriter::impl_ts_writeKeyCommandPair(const css::awt: pAttribs->AddAttribute(AL_ATTRIBUTE_URL , ATTRIBUTE_TYPE_CDATA, sCommand); if ((aKey.Modifiers & css::awt::KeyModifier::SHIFT) == css::awt::KeyModifier::SHIFT) - pAttribs->AddAttribute(AL_ATTRIBUTE_MOD_SHIFT, ATTRIBUTE_TYPE_CDATA, OUString("true")); + pAttribs->AddAttribute(AL_ATTRIBUTE_MOD_SHIFT, ATTRIBUTE_TYPE_CDATA, "true"); if ((aKey.Modifiers & css::awt::KeyModifier::MOD1) == css::awt::KeyModifier::MOD1) - pAttribs->AddAttribute(AL_ATTRIBUTE_MOD_MOD1, ATTRIBUTE_TYPE_CDATA, OUString("true")); + pAttribs->AddAttribute(AL_ATTRIBUTE_MOD_MOD1, ATTRIBUTE_TYPE_CDATA, "true"); if ((aKey.Modifiers & css::awt::KeyModifier::MOD2) == css::awt::KeyModifier::MOD2) - pAttribs->AddAttribute(AL_ATTRIBUTE_MOD_MOD2, ATTRIBUTE_TYPE_CDATA, OUString("true")); + pAttribs->AddAttribute(AL_ATTRIBUTE_MOD_MOD2, ATTRIBUTE_TYPE_CDATA, "true"); if ((aKey.Modifiers & css::awt::KeyModifier::MOD3) == css::awt::KeyModifier::MOD3) - pAttribs->AddAttribute(AL_ATTRIBUTE_MOD_MOD3, ATTRIBUTE_TYPE_CDATA, OUString("true")); + pAttribs->AddAttribute(AL_ATTRIBUTE_MOD_MOD3, ATTRIBUTE_TYPE_CDATA, "true"); xConfig->ignorableWhitespace(OUString()); xConfig->startElement(AL_ELEMENT_ITEM, xAttribs); diff --git a/framework/source/xml/imagesdocumenthandler.cxx b/framework/source/xml/imagesdocumenthandler.cxx index 20c5bb42ab7e..b838f4888fde 100644 --- a/framework/source/xml/imagesdocumenthandler.cxx +++ b/framework/source/xml/imagesdocumenthandler.cxx @@ -631,13 +631,13 @@ void OWriteImagesDocumentHandler::WriteImagesDocument() throw ::comphelper::AttributeList* pList = new ::comphelper::AttributeList; Reference< XAttributeList > xList( static_cast<XAttributeList *>(pList) , UNO_QUERY ); - pList->AddAttribute( OUString( ATTRIBUTE_XMLNS_IMAGE), + pList->AddAttribute( ATTRIBUTE_XMLNS_IMAGE, m_aAttributeType, - OUString( XMLNS_IMAGE ) ); + XMLNS_IMAGE ); - pList->AddAttribute( OUString( ATTRIBUTE_XMLNS_XLINK ), + pList->AddAttribute( ATTRIBUTE_XMLNS_XLINK, m_aAttributeType, - OUString( XMLNS_XLINK ) ); + XMLNS_XLINK ); m_xWriteDocumentHandler->startElement( ELEMENT_NS_IMAGESCONTAINER, pList ); m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); @@ -685,7 +685,7 @@ void OWriteImagesDocumentHandler::WriteImageList( const ImageListItemDescriptor* { pList->AddAttribute( m_aXMLImageNS + ATTRIBUTE_MASKMODE, m_aAttributeType, - OUString( ATTRIBUTE_MASKMODE_BITMAP ) ); + ATTRIBUTE_MASKMODE_BITMAP ); pList->AddAttribute( m_aXMLImageNS + ATTRIBUTE_MASKURL, m_aAttributeType, @@ -712,7 +712,7 @@ void OWriteImagesDocumentHandler::WriteImageList( const ImageListItemDescriptor* pList->AddAttribute( m_aXMLImageNS + ATTRIBUTE_MASKMODE, m_aAttributeType, - OUString( ATTRIBUTE_MASKMODE_COLOR ) ); + ATTRIBUTE_MASKMODE_COLOR ); } if ( !pImageList->aHighContrastURL.isEmpty() ) |