diff options
author | Ricardo Montania <ricardo@linuxafundo.com.br> | 2012-10-04 00:32:16 -0300 |
---|---|---|
committer | Olivier Hallot <olivier.hallot@alta.org.br> | 2012-10-05 00:58:00 +0000 |
commit | b29ecc914b78216ea9a355c431ca4748eb056b06 (patch) | |
tree | ed79136d417df15689d68f4339961d6770903b13 /basctl | |
parent | 554a45f266791c32543fcf96a979036becf41f8a (diff) |
More ::rtl::OUString cleanup in basctl
Change-Id: If7cefe8d2e188e65a465a25a5d5f77e6daebcd17
Reviewed-on: https://gerrit.libreoffice.org/760
Reviewed-by: Olivier Hallot <olivier.hallot@alta.org.br>
Tested-by: Olivier Hallot <olivier.hallot@alta.org.br>
Diffstat (limited to 'basctl')
-rw-r--r-- | basctl/source/basicide/basidesh.cxx | 41 | ||||
-rw-r--r-- | basctl/source/basicide/basobj2.cxx | 52 |
2 files changed, 46 insertions, 47 deletions
diff --git a/basctl/source/basicide/basidesh.cxx b/basctl/source/basicide/basidesh.cxx index 5b64d24aa854..4639b4eaf734 100644 --- a/basctl/source/basicide/basidesh.cxx +++ b/basctl/source/basicide/basidesh.cxx @@ -65,7 +65,6 @@ namespace basctl using namespace ::com::sun::star::uno; using namespace ::com::sun::star; -using ::rtl::OUString; typedef ::cppu::WeakImplHelper1< container::XContainerListener > ContainerListenerBASE; @@ -79,7 +78,7 @@ public: ~ContainerListenerImpl() { } - void addContainerListener( const ScriptDocument& rScriptDocument, const ::rtl::OUString& aLibName ) + void addContainerListener( const ScriptDocument& rScriptDocument, const OUString& aLibName ) { try { @@ -92,7 +91,7 @@ public: } catch(const uno::Exception& ) {} } - void removeContainerListener( const ScriptDocument& rScriptDocument, const ::rtl::OUString& aLibName ) + void removeContainerListener( const ScriptDocument& rScriptDocument, const OUString& aLibName ) { try { @@ -112,14 +111,14 @@ public: // XContainerListener virtual void SAL_CALL elementInserted( const container::ContainerEvent& Event ) throw( uno::RuntimeException ) { - rtl::OUString sModuleName; + OUString sModuleName; if( mpShell && ( Event.Accessor >>= sModuleName ) ) mpShell->FindBasWin( mpShell->m_aCurDocument, mpShell->m_aCurLibName, sModuleName, true, false ); } virtual void SAL_CALL elementReplaced( const container::ContainerEvent& ) throw( com::sun::star::uno::RuntimeException ) { } virtual void SAL_CALL elementRemoved( const container::ContainerEvent& Event ) throw( com::sun::star::uno::RuntimeException ) { - rtl::OUString sModuleName; + OUString sModuleName; if( mpShell && ( Event.Accessor >>= sModuleName ) ) { ModulWindow* pWin = mpShell->FindBasWin(mpShell->m_aCurDocument, mpShell->m_aCurLibName, sModuleName, false, true); @@ -186,7 +185,7 @@ void Shell::Init() GetExtraData()->ShellInCriticalSection() = true; - SetName( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "BasicIDE" ) ) ); + SetName( OUString( "BasicIDE" ) ); SetHelpId( SVX_INTERFACE_BASIDE_VIEWSH ); LibBoxControl::RegisterControl( SID_BASICIDE_LIBSELECTOR ); @@ -208,7 +207,7 @@ void Shell::Init() InitScrollBars(); InitTabBar(); - SetCurLib( ScriptDocument::getApplicationScriptDocument(), ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Standard")), false, false ); + SetCurLib( ScriptDocument::getApplicationScriptDocument(), "Standard", false, false ); ShellCreated(this); @@ -330,7 +329,7 @@ void Shell::onDocumentClosed( const ScriptDocument& _rDocument ) pData->GetLibInfos().RemoveInfoFor( _rDocument ); if ( bSetCurLib ) - SetCurLib( ScriptDocument::getApplicationScriptDocument(), ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Standard")), true, false ); + SetCurLib( ScriptDocument::getApplicationScriptDocument(), "Standard", true, false ); else if ( bSetCurWindow ) SetCurWindow( FindApplicationWindow(), true ); } @@ -401,7 +400,7 @@ sal_uInt16 Shell::PrepareClose( sal_Bool bUI, sal_Bool bForBrowsing ) if ( !pWin->CanClose() ) { if ( !m_aCurLibName.isEmpty() && ( pWin->IsDocument( m_aCurDocument ) || pWin->GetLibName() != m_aCurLibName ) ) - SetCurLib( ScriptDocument::getApplicationScriptDocument(), ::rtl::OUString(), false ); + SetCurLib( ScriptDocument::getApplicationScriptDocument(), OUString(), false ); SetCurWindow( pWin, true ); bCanClose = false; } @@ -626,7 +625,7 @@ void Shell::CheckWindows() -void Shell::RemoveWindows( const ScriptDocument& rDocument, const ::rtl::OUString& rLibName, bool bDestroy ) +void Shell::RemoveWindows( const ScriptDocument& rDocument, const OUString& rLibName, bool bDestroy ) { bool bChangeCurWindow = pCurWin ? false : true; std::vector<BaseWindow*> aDeleteVec; @@ -693,13 +692,13 @@ void Shell::UpdateWindows() StartListening( *doc->getBasicManager(), true /* log on only once */ ); // libraries - Sequence< ::rtl::OUString > aLibNames( doc->getLibraryNames() ); + Sequence< OUString > aLibNames( doc->getLibraryNames() ); sal_Int32 nLibCount = aLibNames.getLength(); - const ::rtl::OUString* pLibNames = aLibNames.getConstArray(); + const OUString* pLibNames = aLibNames.getConstArray(); for ( sal_Int32 i = 0 ; i < nLibCount ; i++ ) { - ::rtl::OUString aLibName = pLibNames[ i ]; + OUString aLibName = pLibNames[ i ]; if ( m_aCurLibName.isEmpty() || ( *doc == m_aCurDocument && aLibName == m_aCurLibName ) ) { @@ -730,13 +729,13 @@ void Shell::UpdateWindows() try { - Sequence< ::rtl::OUString > aModNames( doc->getObjectNames( E_SCRIPTS, aLibName ) ); + Sequence< OUString > aModNames( doc->getObjectNames( E_SCRIPTS, aLibName ) ); sal_Int32 nModCount = aModNames.getLength(); - const ::rtl::OUString* pModNames = aModNames.getConstArray(); + const OUString* pModNames = aModNames.getConstArray(); for ( sal_Int32 j = 0 ; j < nModCount ; j++ ) { - ::rtl::OUString aModName = pModNames[ j ]; + OUString aModName = pModNames[ j ]; ModulWindow* pWin = FindBasWin( *doc, aLibName, aModName, false ); if ( !pWin ) pWin = CreateBasWin( *doc, aLibName, aModName ); @@ -759,13 +758,13 @@ void Shell::UpdateWindows() { try { - Sequence< ::rtl::OUString > aDlgNames = doc->getObjectNames( E_DIALOGS, aLibName ); + Sequence< OUString > aDlgNames = doc->getObjectNames( E_DIALOGS, aLibName ); sal_Int32 nDlgCount = aDlgNames.getLength(); - const ::rtl::OUString* pDlgNames = aDlgNames.getConstArray(); + const OUString* pDlgNames = aDlgNames.getConstArray(); for ( sal_Int32 j = 0 ; j < nDlgCount ; j++ ) { - ::rtl::OUString aDlgName = pDlgNames[ j ]; + OUString aDlgName = pDlgNames[ j ]; // this find only looks for non-suspended windows; // suspended windows are handled in CreateDlgWin DialogWindow* pWin = FindDlgWin( *doc, aLibName, aDlgName, false ); @@ -907,7 +906,7 @@ void Shell::EnableScrollbars( bool bEnable ) aVScrollBar.Enable(bEnable); } -void Shell::SetCurLib( const ScriptDocument& rDocument, ::rtl::OUString aLibName, bool bUpdateWindows, bool bCheck ) +void Shell::SetCurLib( const ScriptDocument& rDocument, OUString aLibName, bool bUpdateWindows, bool bCheck ) { if ( !bCheck || ( rDocument != m_aCurDocument || aLibName != m_aCurLibName ) ) { @@ -938,7 +937,7 @@ void Shell::SetCurLib( const ScriptDocument& rDocument, ::rtl::OUString aLibName } } -void Shell::SetCurLibForLocalization( const ScriptDocument& rDocument, ::rtl::OUString aLibName ) +void Shell::SetCurLibForLocalization( const ScriptDocument& rDocument, OUString aLibName ) { // Create LocalizationMgr Reference< resource::XStringResourceManager > xStringResourceManager; diff --git a/basctl/source/basicide/basobj2.cxx b/basctl/source/basicide/basobj2.cxx index e7a9b4e0119e..25d43a0d74d8 100644 --- a/basctl/source/basicide/basobj2.cxx +++ b/basctl/source/basicide/basobj2.cxx @@ -56,9 +56,9 @@ using namespace ::com::sun::star::container; extern "C" { SAL_DLLPUBLIC_EXPORT rtl_uString* basicide_choose_macro( void* pOnlyInDocument_AsXModel, sal_Bool bChooseOnly, rtl_uString* pMacroDesc ) { - ::rtl::OUString aMacroDesc( pMacroDesc ); + OUString aMacroDesc( pMacroDesc ); Reference< frame::XModel > aDocument( static_cast< frame::XModel* >( pOnlyInDocument_AsXModel ) ); - ::rtl::OUString aScriptURL = basctl::ChooseMacro( aDocument, bChooseOnly, aMacroDesc ); + OUString aScriptURL = basctl::ChooseMacro( aDocument, bChooseOnly, aMacroDesc ); rtl_uString* pScriptURL = aScriptURL.pData; rtl_uString_acquire( pScriptURL ); @@ -112,15 +112,15 @@ static bool StringCompareLessThan( const String& rStr1, const String& rStr2 ) //---------------------------------------------------------------------------- -Sequence< ::rtl::OUString > GetMergedLibraryNames( const Reference< script::XLibraryContainer >& xModLibContainer, const Reference< script::XLibraryContainer >& xDlgLibContainer ) +Sequence< OUString > GetMergedLibraryNames( const Reference< script::XLibraryContainer >& xModLibContainer, const Reference< script::XLibraryContainer >& xDlgLibContainer ) { // create a sorted list of module library names ::std::vector<String> aModLibList; if ( xModLibContainer.is() ) { - Sequence< ::rtl::OUString > aModLibNames = xModLibContainer->getElementNames(); + Sequence< OUString > aModLibNames = xModLibContainer->getElementNames(); sal_Int32 nModLibCount = aModLibNames.getLength(); - const ::rtl::OUString* pModLibNames = aModLibNames.getConstArray(); + const OUString* pModLibNames = aModLibNames.getConstArray(); for ( sal_Int32 i = 0 ; i < nModLibCount ; i++ ) aModLibList.push_back( pModLibNames[ i ] ); ::std::sort( aModLibList.begin() , aModLibList.end() , StringCompareLessThan ); @@ -130,9 +130,9 @@ Sequence< ::rtl::OUString > GetMergedLibraryNames( const Reference< script::XLib ::std::vector<String> aDlgLibList; if ( xDlgLibContainer.is() ) { - Sequence< ::rtl::OUString > aDlgLibNames = xDlgLibContainer->getElementNames(); + Sequence< OUString > aDlgLibNames = xDlgLibContainer->getElementNames(); sal_Int32 nDlgLibCount = aDlgLibNames.getLength(); - const ::rtl::OUString* pDlgLibNames = aDlgLibNames.getConstArray(); + const OUString* pDlgLibNames = aDlgLibNames.getConstArray(); for ( sal_Int32 i = 0 ; i < nDlgLibCount ; i++ ) aDlgLibList.push_back( pDlgLibNames[ i ] ); ::std::sort( aDlgLibList.begin() , aDlgLibList.end() , StringCompareLessThan ); @@ -146,7 +146,7 @@ Sequence< ::rtl::OUString > GetMergedLibraryNames( const Reference< script::XLib // copy to sequence sal_Int32 nLibCount = aLibList.size(); - Sequence< ::rtl::OUString > aSeqLibNames( nLibCount ); + Sequence< OUString > aSeqLibNames( nLibCount ); for ( sal_Int32 i = 0 ; i < nLibCount ; i++ ) aSeqLibNames.getArray()[ i ] = aLibList[ i ]; @@ -158,9 +158,9 @@ Sequence< ::rtl::OUString > GetMergedLibraryNames( const Reference< script::XLib bool RenameModule ( Window* pErrorParent, const ScriptDocument& rDocument, - const ::rtl::OUString& rLibName, - const ::rtl::OUString& rOldName, - const ::rtl::OUString& rNewName + const OUString& rLibName, + const OUString& rOldName, + const OUString& rNewName ) { if ( !rDocument.hasModule( rLibName, rOldName ) ) @@ -259,7 +259,7 @@ namespace //---------------------------------------------------------------------------- -::rtl::OUString ChooseMacro( const uno::Reference< frame::XModel >& rxLimitToDocument, bool bChooseOnly, const ::rtl::OUString& rMacroDesc ) +OUString ChooseMacro( const uno::Reference< frame::XModel >& rxLimitToDocument, bool bChooseOnly, const OUString& rMacroDesc ) { (void)rMacroDesc; @@ -324,15 +324,15 @@ namespace aName += pMethod->GetName(); // language - rtl::OUString aLanguage("Basic"); + OUString aLanguage("Basic"); // location - rtl::OUString aLocation; + OUString aLocation; ScriptDocument aDocument( ScriptDocument::getDocumentForBasicManager( pBasMgr ) ); if ( aDocument.isDocument() ) { // document basic - aLocation = rtl::OUString("document"); + aLocation = "document" ; if ( rxLimitToDocument.is() ) { @@ -366,17 +366,17 @@ namespace else { // application basic - aLocation = rtl::OUString("application"); + aLocation = "application" ; } // script URL if ( !bError ) { - aScriptURL = rtl::OUString("vnd.sun.star.script:"); + aScriptURL = "vnd.sun.star.script:" ; aScriptURL += aName; - aScriptURL += rtl::OUString("?language="); + aScriptURL += "?language=" ; aScriptURL += aLanguage; - aScriptURL += rtl::OUString("&location="); + aScriptURL += "&location=" ; aScriptURL += aLocation; } @@ -396,13 +396,13 @@ namespace //---------------------------------------------------------------------------- -Sequence< ::rtl::OUString > GetMethodNames( const ScriptDocument& rDocument, const ::rtl::OUString& rLibName, const ::rtl::OUString& rModName ) +Sequence< OUString > GetMethodNames( const ScriptDocument& rDocument, const OUString& rLibName, const OUString& rModName ) throw(NoSuchElementException ) { - Sequence< ::rtl::OUString > aSeqMethods; + Sequence< OUString > aSeqMethods; // get module - ::rtl::OUString aOUSource; + OUString aOUSource; if ( rDocument.getModule( rLibName, rModName, aOUSource ) ) { SbModuleRef xModule = new SbModule( rModName ); @@ -435,14 +435,14 @@ Sequence< ::rtl::OUString > GetMethodNames( const ScriptDocument& rDocument, con bool HasMethod ( ScriptDocument const& rDocument, - rtl::OUString const& rLibName, - rtl::OUString const& rModName, - rtl::OUString const& rMethName + OUString const& rLibName, + OUString const& rModName, + OUString const& rMethName ) { bool bHasMethod = false; - ::rtl::OUString aOUSource; + OUString aOUSource; if ( rDocument.hasModule( rLibName, rModName ) && rDocument.getModule( rLibName, rModName, aOUSource ) ) { SbModuleRef xModule = new SbModule( rModName ); |