diff options
author | Brij Mohan Lal Srivastava <contactbrijmohan@gmail.com> | 2014-11-12 14:24:10 +0530 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-11-14 09:20:38 +0100 |
commit | d32be3ace8c8fd430bbecdf69f88a116b0ee91d1 (patch) | |
tree | b373c084cb124434e0498867b24bc7bb333155dd /framework/source | |
parent | f5e86ebc097f0f8bc5b282511149cb026710ecde (diff) |
fdo#86023 - O[U]String needs a 'clear' method
Added clear() method to OString and OUString class, Updated appropriate call-sites.
Change-Id: I0ba97fa6dc7af3e31b605953089a4e8e9c3e61ac
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'framework/source')
-rw-r--r-- | framework/source/accelerators/presethandler.cxx | 2 | ||||
-rw-r--r-- | framework/source/fwe/xml/xmlnamespaces.cxx | 2 | ||||
-rw-r--r-- | framework/source/helper/persistentwindowstate.cxx | 4 | ||||
-rw-r--r-- | framework/source/helper/statusindicatorfactory.cxx | 2 | ||||
-rw-r--r-- | framework/source/helper/vclstatusindicator.cxx | 2 | ||||
-rw-r--r-- | framework/source/jobs/helponstartup.cxx | 6 | ||||
-rw-r--r-- | framework/source/jobs/joburl.cxx | 12 | ||||
-rw-r--r-- | framework/source/layoutmanager/helpers.cxx | 2 | ||||
-rw-r--r-- | framework/source/layoutmanager/layoutmanager.cxx | 4 | ||||
-rw-r--r-- | framework/source/services/frame.cxx | 2 | ||||
-rw-r--r-- | framework/source/services/pathsettings.cxx | 2 | ||||
-rw-r--r-- | framework/source/uiconfiguration/moduleuicfgsupplier.cxx | 2 | ||||
-rw-r--r-- | framework/source/uielement/controlmenucontroller.cxx | 2 | ||||
-rw-r--r-- | framework/source/uielement/menubarmanager.cxx | 2 |
14 files changed, 23 insertions, 23 deletions
diff --git a/framework/source/accelerators/presethandler.cxx b/framework/source/accelerators/presethandler.cxx index 6396ecf3d671..feed98870065 100644 --- a/framework/source/accelerators/presethandler.cxx +++ b/framework/source/accelerators/presethandler.cxx @@ -777,7 +777,7 @@ css::uno::Reference< css::embed::XStorage > PresetHandler::impl_openLocalizedPat if (xLocalePath.is()) sPath = sLocalizedPath; else - sPath = OUString(); + sPath.clear(); return xLocalePath; } diff --git a/framework/source/fwe/xml/xmlnamespaces.cxx b/framework/source/fwe/xml/xmlnamespaces.cxx index da01d4f4e35f..f52536e2d098 100644 --- a/framework/source/fwe/xml/xmlnamespaces.cxx +++ b/framework/source/fwe/xml/xmlnamespaces.cxx @@ -51,7 +51,7 @@ void XMLNamespaces::addNamespace( const OUString& aName, const OUString& aValue { if ( aNamespaceName.getLength() == nXMLNamespaceLength ) { - aNamespaceName = OUString(); + aNamespaceName.clear(); } else if ( aNamespaceName.getLength() >= nXMLNamespaceLength+2 ) { diff --git a/framework/source/helper/persistentwindowstate.cxx b/framework/source/helper/persistentwindowstate.cxx index 1599447eef8c..ea253438079f 100644 --- a/framework/source/helper/persistentwindowstate.cxx +++ b/framework/source/helper/persistentwindowstate.cxx @@ -158,7 +158,7 @@ OUString PersistentWindowState::implst_identifyModule(const css::uno::Reference< catch(const css::uno::RuntimeException&) { throw; } catch(const css::uno::Exception&) - { sModuleName = OUString(); } + { sModuleName.clear(); } return sModuleName; } @@ -188,7 +188,7 @@ OUString PersistentWindowState::implst_getWindowStateFromConfig(const css::uno:: catch(const css::uno::RuntimeException&) { throw; } catch(const css::uno::Exception&) - { sWindowState = OUString(); } + { sWindowState.clear(); } return sWindowState; } diff --git a/framework/source/helper/statusindicatorfactory.cxx b/framework/source/helper/statusindicatorfactory.cxx index 5067a66217de..c0ed698825ec 100644 --- a/framework/source/helper/statusindicatorfactory.cxx +++ b/framework/source/helper/statusindicatorfactory.cxx @@ -157,7 +157,7 @@ void StatusIndicatorFactory::reset(const css::uno::Reference< css::task::XStatus if (pItem != m_aStack.end()) { pItem->m_nValue = 0; - pItem->m_sText = OUString(); + (pItem->m_sText).clear(); } css::uno::Reference< css::task::XStatusIndicator > xActive = m_xActiveChild; diff --git a/framework/source/helper/vclstatusindicator.cxx b/framework/source/helper/vclstatusindicator.cxx index 856ad02b02fc..e02c4e747ca9 100644 --- a/framework/source/helper/vclstatusindicator.cxx +++ b/framework/source/helper/vclstatusindicator.cxx @@ -82,7 +82,7 @@ void SAL_CALL VCLStatusIndicator::end() { SolarMutexGuard aSolarGuard; - m_sText = OUString(); + m_sText.clear(); m_nRange = 0; m_nValue = 0; diff --git a/framework/source/jobs/helponstartup.cxx b/framework/source/jobs/helponstartup.cxx index 6f53eb69aa38..198af2d038af 100644 --- a/framework/source/jobs/helponstartup.cxx +++ b/framework/source/jobs/helponstartup.cxx @@ -207,7 +207,7 @@ OUString HelpOnStartup::its_getModuleIdFromEnv(const css::uno::Sequence< css::be catch(const css::uno::RuntimeException&) { throw; } catch(const css::uno::Exception&) - { sModuleId = OUString(); } + { sModuleId.clear(); } return sModuleId; } @@ -248,7 +248,7 @@ OUString HelpOnStartup::its_getCurrentHelpURL() catch(const css::uno::RuntimeException&) { throw; } catch(const css::uno::Exception&) - { sCurrentHelpURL = OUString(); } + { sCurrentHelpURL.clear(); } return sCurrentHelpURL; } @@ -331,7 +331,7 @@ OUString HelpOnStartup::its_checkIfHelpEnabledAndGetURL(const OUString& sModule) catch(const css::uno::RuntimeException&) { throw; } catch(const css::uno::Exception&) - { sHelpURL = OUString(); } + { sHelpURL.clear(); } return sHelpURL; } diff --git a/framework/source/jobs/joburl.cxx b/framework/source/jobs/joburl.cxx index fae5556ec31f..2dacc370893b 100644 --- a/framework/source/jobs/joburl.cxx +++ b/framework/source/jobs/joburl.cxx @@ -128,7 +128,7 @@ bool JobURL::getEvent( /*OUT*/ OUString& sEvent ) const { SolarMutexGuard g; - sEvent = OUString(); + sEvent.clear(); bool bSet = ((m_eRequest & E_EVENT) == E_EVENT); if (bSet) sEvent = m_sEvent; @@ -156,7 +156,7 @@ bool JobURL::getAlias( /*OUT*/ OUString& sAlias ) const { SolarMutexGuard g; - sAlias = OUString(); + sAlias.clear(); bool bSet = ((m_eRequest & E_ALIAS) == E_ALIAS); if (bSet) sAlias = m_sAlias; @@ -184,7 +184,7 @@ bool JobURL::getService( /*OUT*/ OUString& sService ) const { SolarMutexGuard g; - sService = OUString(); + sService.clear(); bool bSet = ((m_eRequest & E_SERVICE) == E_SERVICE); if (bSet) sService = m_sService; @@ -541,7 +541,7 @@ sal_Bool JobURL::getServiceArgs( /*OUT*/ OUString& sServiceArgs ) const { SolarMutexGuard g; - sServiceArgs = OUString(); + sServiceArgs.clear(); sal_Bool bSet = ((m_eRequest & E_SERVICE) == E_SERVICE); if (bSet) sServiceArgs = m_sServiceArgs; @@ -553,7 +553,7 @@ sal_Bool JobURL::getEventArgs( /*OUT*/ OUString& sEventArgs ) const { SolarMutexGuard g; - sEventArgs = OUString(); + sEventArgs.clear(); sal_Bool bSet = ((m_eRequest & E_EVENT) == E_EVENT); if (bSet) sEventArgs = m_sEventArgs; @@ -565,7 +565,7 @@ sal_Bool JobURL::getAliasArgs( /*OUT*/ OUString& sAliasArgs ) const { SolarMutexGuard g; - sAliasArgs = OUString(); + sAliasArgs.clear(); sal_Bool bSet = ((m_eRequest & E_ALIAS) == E_ALIAS); if (bSet) sAliasArgs = m_sAliasArgs; diff --git a/framework/source/layoutmanager/helpers.cxx b/framework/source/layoutmanager/helpers.cxx index ca623fff4730..dd6b12e0984a 100644 --- a/framework/source/layoutmanager/helpers.cxx +++ b/framework/source/layoutmanager/helpers.cxx @@ -93,7 +93,7 @@ OUString retrieveToolbarNameFromHelpURL( vcl::Window* pWindow ) if ( !aToolbarName.isEmpty() && ( i > 0 ) && (( i + 1 ) < aToolbarName.getLength() )) aToolbarName = aToolbarName.copy( i+1 ); // Remove ".HelpId:" protocol from toolbar name else - aToolbarName = OUString(); + aToolbarName.clear(); } } return aToolbarName; diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx index ad8187d310bf..e8d466b878a7 100644 --- a/framework/source/layoutmanager/layoutmanager.cxx +++ b/framework/source/layoutmanager/layoutmanager.cxx @@ -367,7 +367,7 @@ void LayoutManager::implts_reset( bool bAttached ) xModuleCfgMgr.clear(); xDocCfgMgr.clear(); xPersistentWindowState.clear(); - aModuleIdentifier = OUString(); + aModuleIdentifier.clear(); } Reference< XUIConfigurationManager > xModCfgMgr( xModuleCfgMgr, UNO_QUERY ); @@ -813,7 +813,7 @@ void LayoutManager::implts_destroyStatusBar() Reference< XComponent > xCompStatusBar; SolarMutexClearableGuard aWriteLock; - m_aStatusBarElement.m_aName = OUString(); + m_aStatusBarElement.m_aName.clear(); xCompStatusBar = Reference< XComponent >( m_aStatusBarElement.m_xUIElement, UNO_QUERY ); m_aStatusBarElement.m_xUIElement.clear(); aWriteLock.clear(); diff --git a/framework/source/services/frame.cxx b/framework/source/services/frame.cxx index b7c5cfa50863..1138184a2f55 100644 --- a/framework/source/services/frame.cxx +++ b/framework/source/services/frame.cxx @@ -2096,7 +2096,7 @@ void SAL_CALL Frame::dispose() throw( css::uno::RuntimeException, std::exception // If may be later somewhere change the disposed-behaviour of this implementation // and doesn't throw any DisposedExceptions we must guarantee best matching default values ... m_eActiveState = E_INACTIVE; - m_sName = OUString(); + m_sName.clear(); m_bIsFrameTop = false; m_bConnected = false; m_nExternalLockCount = 0; diff --git a/framework/source/services/pathsettings.cxx b/framework/source/services/pathsettings.cxx index e248e77ba083..55cfc7a180a7 100644 --- a/framework/source/services/pathsettings.cxx +++ b/framework/source/services/pathsettings.cxx @@ -1222,7 +1222,7 @@ void PathSettings::impl_setPathValue( sal_Int32 nID , if ( !lList.empty() ) aChangePath.sWritePath = *(lList.begin()); else - aChangePath.sWritePath = OUString(); + aChangePath.sWritePath.clear(); } else { diff --git a/framework/source/uiconfiguration/moduleuicfgsupplier.cxx b/framework/source/uiconfiguration/moduleuicfgsupplier.cxx index 3546c9ad4588..4ef0f208b356 100644 --- a/framework/source/uiconfiguration/moduleuicfgsupplier.cxx +++ b/framework/source/uiconfiguration/moduleuicfgsupplier.cxx @@ -174,7 +174,7 @@ throw ( NoSuchElementException, RuntimeException, std::exception) } catch( const Exception& ) { - sShort = OUString(); + sShort.clear(); } if (sShort.isEmpty()) diff --git a/framework/source/uielement/controlmenucontroller.cxx b/framework/source/uielement/controlmenucontroller.cxx index c11c2e50d0d3..848e60d225fa 100644 --- a/framework/source/uielement/controlmenucontroller.cxx +++ b/framework/source/uielement/controlmenucontroller.cxx @@ -454,7 +454,7 @@ void SAL_CALL ControlMenuController::initialize( const Sequence< Any >& aArgumen { osl::ResettableMutexGuard aLock( m_aMutex ); svt::PopupMenuControllerBase::initialize(aArguments); - m_aBaseURL = OUString(); + m_aBaseURL.clear(); } } diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx index 76f4bcdd11a0..64b179e12083 100644 --- a/framework/source/uielement/menubarmanager.cxx +++ b/framework/source/uielement/menubarmanager.cxx @@ -1317,7 +1317,7 @@ void MenuBarManager::FillMenuManager( Menu* pMenu, const Reference< XFrame >& rF { MenuBarManager* pSubMenuManager = new MenuBarManager( m_xContext, m_xFrame, m_xURLTransformer,pSubMenu, true, false ); AddMenu(pSubMenuManager,aItemCommand,nItemId); - pSubMenuManager->m_aMenuItemCommand = OUString(); + (pSubMenuManager->m_aMenuItemCommand).clear(); // Set image for the addon popup menu item if ( bItemShowMenuImages && !pPopup->GetItemImage( ITEMID_ADDONLIST )) |