[Libreoffice-commits] .: basic/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Mon Sep 17 08:30:54 PDT 2012


 basic/source/basmgr/basmgr.cxx   |  430 +++++++++++++++++++--------------------
 basic/source/runtime/methods.cxx |   90 +++-----
 2 files changed, 255 insertions(+), 265 deletions(-)

New commits:
commit f88c4a5bc155b64421639b57c7a5758c06a6afbd
Author: Michael Meeks <michael.meeks at suse.com>
Date:   Mon Sep 17 16:26:24 2012 +0100

    dung out namespacing clutter.
    
    Change-Id: I14794ca0cd2a8ea84ba41e1dc689503647696e3a

diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx
index 697ca6d..7f5c691 100644
--- a/basic/source/basmgr/basmgr.cxx
+++ b/basic/source/basmgr/basmgr.cxx
@@ -69,17 +69,15 @@
 using com::sun::star::uno::Reference;
 using ::std::vector;
 using ::std::advance;
-using namespace com::sun::star::container;
-using namespace com::sun::star::uno;
-using namespace com::sun::star::lang;
+using namespace com::sun::star;
 using namespace com::sun::star::script;
 using namespace cppu;
 
-typedef WeakImplHelper1< XNameContainer > NameContainerHelper;
-typedef WeakImplHelper1< XStarBasicModuleInfo > ModuleInfoHelper;
-typedef WeakImplHelper1< XStarBasicDialogInfo > DialogInfoHelper;
-typedef WeakImplHelper1< XStarBasicLibraryInfo > LibraryInfoHelper;
-typedef WeakImplHelper1< XStarBasicAccess > StarBasicAccessHelper;
+typedef WeakImplHelper1< container::XNameContainer > NameContainerHelper;
+typedef WeakImplHelper1< script::XStarBasicModuleInfo > ModuleInfoHelper;
+typedef WeakImplHelper1< script::XStarBasicDialogInfo > DialogInfoHelper;
+typedef WeakImplHelper1< script::XStarBasicLibraryInfo > LibraryInfoHelper;
+typedef WeakImplHelper1< script::XStarBasicAccess > StarBasicAccessHelper;
 
 // Version 1
 //    sal_uIntPtr   nEndPos
@@ -140,7 +138,7 @@ BasicManagerImpl::~BasicManagerImpl()
 // BasMgrContainerListenerImpl
 //============================================================================
 
-typedef ::cppu::WeakImplHelper1< ::com::sun::star::container::XContainerListener > ContainerListenerHelper;
+typedef ::cppu::WeakImplHelper1< container::XContainerListener > ContainerListenerHelper;
 
 class BasMgrContainerListenerImpl: public ContainerListenerHelper
 {
@@ -152,23 +150,23 @@ public:
         : mpMgr( pMgr )
         , maLibName( aLibName ) {}
 
-    static void insertLibraryImpl( const Reference< XLibraryContainer >& xScriptCont, BasicManager* pMgr,
-        Any aLibAny, ::rtl::OUString aLibName );
-    static void addLibraryModulesImpl( BasicManager* pMgr, Reference< XNameAccess > xLibNameAccess,
+    static void insertLibraryImpl( const uno::Reference< script::XLibraryContainer >& xScriptCont, BasicManager* pMgr,
+        uno::Any aLibAny, ::rtl::OUString aLibName );
+    static void addLibraryModulesImpl( BasicManager* pMgr, uno::Reference< container::XNameAccess > xLibNameAccess,
         ::rtl::OUString aLibName );
 
 
     // XEventListener
-    virtual void SAL_CALL disposing( const  ::com::sun::star::lang::EventObject& Source )
-        throw(::com::sun::star::uno::RuntimeException);
+    virtual void SAL_CALL disposing( const lang::EventObject& Source )
+        throw(uno::RuntimeException);
 
     // XContainerListener
-    virtual void SAL_CALL elementInserted( const ::com::sun::star::container::ContainerEvent& Event )
-        throw(::com::sun::star::uno::RuntimeException);
-    virtual void SAL_CALL elementReplaced( const ::com::sun::star::container::ContainerEvent& Event )
-        throw(::com::sun::star::uno::RuntimeException);
-    virtual void SAL_CALL elementRemoved( const ::com::sun::star::container::ContainerEvent& Event )
-        throw(::com::sun::star::uno::RuntimeException);
+    virtual void SAL_CALL elementInserted( const container::ContainerEvent& Event )
+        throw(uno::RuntimeException);
+    virtual void SAL_CALL elementReplaced( const container::ContainerEvent& Event )
+        throw(uno::RuntimeException);
+    virtual void SAL_CALL elementRemoved( const container::ContainerEvent& Event )
+        throw(uno::RuntimeException);
 };
 
 
@@ -176,10 +174,10 @@ public:
 // BasMgrContainerListenerImpl
 //============================================================================
 
-void BasMgrContainerListenerImpl::insertLibraryImpl( const Reference< XLibraryContainer >& xScriptCont,
-    BasicManager* pMgr, Any aLibAny, ::rtl::OUString aLibName )
+void BasMgrContainerListenerImpl::insertLibraryImpl( const uno::Reference< script::XLibraryContainer >& xScriptCont,
+    BasicManager* pMgr, uno::Any aLibAny, ::rtl::OUString aLibName )
 {
-    Reference< XNameAccess > xLibNameAccess;
+    Reference< container::XNameAccess > xLibNameAccess;
     aLibAny >>= xLibNameAccess;
 
     if( !pMgr->GetLib( aLibName ) )
@@ -192,12 +190,12 @@ void BasMgrContainerListenerImpl::insertLibraryImpl( const Reference< XLibraryCo
         DBG_ASSERT( pLib, "XML Import: Basic library could not be created");
     }
 
-    Reference< XContainer> xLibContainer( xLibNameAccess, UNO_QUERY );
+    uno::Reference< container::XContainer> xLibContainer( xLibNameAccess, uno::UNO_QUERY );
     if( xLibContainer.is() )
     {
         // Register listener for library
-        Reference< XContainerListener > xLibraryListener
-            = static_cast< XContainerListener* >
+        Reference< container::XContainerListener > xLibraryListener
+            = static_cast< container::XContainerListener* >
                 ( new BasMgrContainerListenerImpl( pMgr, aLibName ) );
         xLibContainer->addContainerListener( xLibraryListener );
     }
@@ -210,9 +208,9 @@ void BasMgrContainerListenerImpl::insertLibraryImpl( const Reference< XLibraryCo
 
 
 void BasMgrContainerListenerImpl::addLibraryModulesImpl( BasicManager* pMgr,
-    Reference< XNameAccess > xLibNameAccess, ::rtl::OUString aLibName )
+    uno::Reference< container::XNameAccess > xLibNameAccess, ::rtl::OUString aLibName )
 {
-    Sequence< ::rtl::OUString > aModuleNames = xLibNameAccess->getElementNames();
+    uno::Sequence< ::rtl::OUString > aModuleNames = xLibNameAccess->getElementNames();
     sal_Int32 nModuleCount = aModuleNames.getLength();
 
     StarBASIC* pLib = pMgr->GetLib( aLibName );
@@ -223,10 +221,10 @@ void BasMgrContainerListenerImpl::addLibraryModulesImpl( BasicManager* pMgr,
         for( sal_Int32 j = 0 ; j < nModuleCount ; j++ )
         {
             ::rtl::OUString aModuleName = pNames[ j ];
-            Any aElement = xLibNameAccess->getByName( aModuleName );
+            uno::Any aElement = xLibNameAccess->getByName( aModuleName );
             ::rtl::OUString aMod;
             aElement >>= aMod;
-            Reference< vba::XVBAModuleInfo > xVBAModuleInfo( xLibNameAccess, UNO_QUERY );
+            uno::Reference< vba::XVBAModuleInfo > xVBAModuleInfo( xLibNameAccess, uno::UNO_QUERY );
             if ( xVBAModuleInfo.is() && xVBAModuleInfo->hasModuleInfo( aModuleName ) )
             {
                 ModuleInfo mInfo = xVBAModuleInfo->getModuleInfo( aModuleName );
@@ -246,8 +244,8 @@ void BasMgrContainerListenerImpl::addLibraryModulesImpl( BasicManager* pMgr,
 // XEventListener
 //----------------------------------------------------------------------------
 
-void SAL_CALL BasMgrContainerListenerImpl::disposing( const  EventObject& Source )
-    throw( RuntimeException )
+void SAL_CALL BasMgrContainerListenerImpl::disposing( const lang::EventObject& Source )
+    throw( uno::RuntimeException )
 {
     (void)Source;
 }
@@ -255,8 +253,8 @@ void SAL_CALL BasMgrContainerListenerImpl::disposing( const  EventObject& Source
 // XContainerListener
 //----------------------------------------------------------------------------
 
-void SAL_CALL BasMgrContainerListenerImpl::elementInserted( const ContainerEvent& Event )
-    throw( RuntimeException )
+void SAL_CALL BasMgrContainerListenerImpl::elementInserted( const container::ContainerEvent& Event )
+    throw( uno::RuntimeException )
 {
     sal_Bool bLibContainer = ( maLibName.getLength() == 0 );
     ::rtl::OUString aName;
@@ -264,12 +262,12 @@ void SAL_CALL BasMgrContainerListenerImpl::elementInserted( const ContainerEvent
 
     if( bLibContainer )
     {
-        Reference< XLibraryContainer > xScriptCont( Event.Source, UNO_QUERY );
+        uno::Reference< script::XLibraryContainer > xScriptCont( Event.Source, uno::UNO_QUERY );
         insertLibraryImpl( xScriptCont, mpMgr, Event.Element, aName );
         StarBASIC* pLib = mpMgr->GetLib( aName );
         if ( pLib )
         {
-            Reference< vba::XVBACompatibility > xVBACompat( xScriptCont, UNO_QUERY );
+            uno::Reference< vba::XVBACompatibility > xVBACompat( xScriptCont, uno::UNO_QUERY );
             if ( xVBACompat.is() )
                 pLib->SetVBAEnabled( xVBACompat->getVBACompatibilityMode() );
         }
@@ -286,7 +284,7 @@ void SAL_CALL BasMgrContainerListenerImpl::elementInserted( const ContainerEvent
             {
             ::rtl::OUString aMod;
             Event.Element >>= aMod;
-                Reference< vba::XVBAModuleInfo > xVBAModuleInfo( Event.Source, UNO_QUERY );
+                uno::Reference< vba::XVBAModuleInfo > xVBAModuleInfo( Event.Source, uno::UNO_QUERY );
                 if ( xVBAModuleInfo.is() && xVBAModuleInfo->hasModuleInfo( aName ) )
                 {
                     ModuleInfo mInfo = xVBAModuleInfo->getModuleInfo( aName );
@@ -302,8 +300,8 @@ void SAL_CALL BasMgrContainerListenerImpl::elementInserted( const ContainerEvent
 
 //----------------------------------------------------------------------------
 
-void SAL_CALL BasMgrContainerListenerImpl::elementReplaced( const ContainerEvent& Event )
-    throw( RuntimeException )
+void SAL_CALL BasMgrContainerListenerImpl::elementReplaced( const container::ContainerEvent& Event )
+    throw( uno::RuntimeException )
 {
     ::rtl::OUString aName;
     Event.Accessor >>= aName;
@@ -332,8 +330,8 @@ void SAL_CALL BasMgrContainerListenerImpl::elementReplaced( const ContainerEvent
 
 //----------------------------------------------------------------------------
 
-void SAL_CALL BasMgrContainerListenerImpl::elementRemoved( const ContainerEvent& Event )
-    throw( RuntimeException )
+void SAL_CALL BasMgrContainerListenerImpl::elementRemoved( const container::ContainerEvent& Event )
+    throw( uno::RuntimeException )
 {
     ::rtl::OUString aName;
     Event.Accessor >>= aName;
@@ -391,7 +389,7 @@ private:
     sal_Bool            bPasswordVerified;
 
     // Lib represents library in new UNO library container
-    Reference< XLibraryContainer > mxScriptCont;
+    uno::Reference< script::XLibraryContainer > mxScriptCont;
 
 public:
     BasicLibInfo();
@@ -432,9 +430,9 @@ public:
 
     static BasicLibInfo*    Create( SotStorageStream& rSStream );
 
-    Reference< XLibraryContainer > GetLibraryContainer( void )
+    uno::Reference< script::XLibraryContainer > GetLibraryContainer( void )
         { return mxScriptCont; }
-    void SetLibraryContainer( const Reference< XLibraryContainer >& xScriptCont )
+    void SetLibraryContainer( const uno::Reference< script::XLibraryContainer >& xScriptCont )
         { mxScriptCont = xScriptCont; }
 };
 
@@ -663,7 +661,7 @@ BasicManager::BasicManager( SotStorage& rStorage, const String& rBaseURL, StarBA
 
 void copyToLibraryContainer( StarBASIC* pBasic, const LibraryContainerInfo& rInfo )
 {
-    Reference< XLibraryContainer > xScriptCont( rInfo.mxScriptCont.get() );
+    uno::Reference< script::XLibraryContainer > xScriptCont( rInfo.mxScriptCont.get() );
     if ( !xScriptCont.is() )
         return;
 
@@ -671,8 +669,8 @@ void copyToLibraryContainer( StarBASIC* pBasic, const LibraryContainerInfo& rInf
     if( !xScriptCont->hasByName( aLibName ) )
         xScriptCont->createLibrary( aLibName );
 
-    Any aLibAny = xScriptCont->getByName( aLibName );
-    Reference< XNameContainer > xLib;
+    uno::Any aLibAny = xScriptCont->getByName( aLibName );
+    uno::Reference< container::XNameContainer > xLib;
     aLibAny >>= xLib;
     if ( !xLib.is() )
         return;
@@ -687,19 +685,19 @@ void copyToLibraryContainer( StarBASIC* pBasic, const LibraryContainerInfo& rInf
         if( !xLib->hasByName( aModName ) )
         {
             ::rtl::OUString aSource = pModule->GetSource32();
-            Any aSourceAny;
+            uno::Any aSourceAny;
             aSourceAny <<= aSource;
             xLib->insertByName( aModName, aSourceAny );
         }
     }
 }
 
-const Reference< XPersistentLibraryContainer >& BasicManager::GetDialogLibraryContainer()  const
+const uno::Reference< script::XPersistentLibraryContainer >& BasicManager::GetDialogLibraryContainer()  const
 {
     return mpImpl->maContainerInfo.mxDialogCont;
 }
 
-const Reference< XPersistentLibraryContainer >& BasicManager::GetScriptLibraryContainer()  const
+const uno::Reference< script::XPersistentLibraryContainer >& BasicManager::GetScriptLibraryContainer()  const
 {
     return mpImpl->maContainerInfo.mxScriptCont;
 }
@@ -708,21 +706,21 @@ void BasicManager::SetLibraryContainerInfo( const LibraryContainerInfo& rInfo )
 {
     mpImpl->maContainerInfo = rInfo;
 
-    Reference< XLibraryContainer > xScriptCont( mpImpl->maContainerInfo.mxScriptCont.get() );
+    uno::Reference< script::XLibraryContainer > xScriptCont( mpImpl->maContainerInfo.mxScriptCont.get() );
     StarBASIC* pStdLib = GetStdLib();
     String aLibName = pStdLib->GetName();
     if( xScriptCont.is() )
     {
         // Register listener for lib container
         ::rtl::OUString aEmptyLibName;
-        Reference< XContainerListener > xLibContainerListener
-            = static_cast< XContainerListener* >
+        uno::Reference< container::XContainerListener > xLibContainerListener
+            = static_cast< container::XContainerListener* >
                 ( new BasMgrContainerListenerImpl( this, aEmptyLibName ) );
 
-        Reference< XContainer> xLibContainer( xScriptCont, UNO_QUERY );
+        uno::Reference< container::XContainer> xLibContainer( xScriptCont, uno::UNO_QUERY );
         xLibContainer->addContainerListener( xLibContainerListener );
 
-        Sequence< ::rtl::OUString > aScriptLibNames = xScriptCont->getElementNames();
+        uno::Sequence< ::rtl::OUString > aScriptLibNames = xScriptCont->getElementNames();
         const ::rtl::OUString* pScriptLibName = aScriptLibNames.getConstArray();
         sal_Int32 i, nNameCount = aScriptLibNames.getLength();
 
@@ -730,7 +728,7 @@ void BasicManager::SetLibraryContainerInfo( const LibraryContainerInfo& rInfo )
         {
             for( i = 0 ; i < nNameCount ; ++i, ++pScriptLibName )
             {
-                Any aLibAny = xScriptCont->getByName( *pScriptLibName );
+                uno::Any aLibAny = xScriptCont->getByName( *pScriptLibName );
 
                 if ( *pScriptLibName == "Standard" )
                     xScriptCont->loadLibrary( *pScriptLibName );
@@ -1471,7 +1469,7 @@ sal_Bool BasicManager::LoadLib( sal_uInt16 nLib )
     DBG_ASSERT( pLibInfo, "Lib?!" );
     if ( pLibInfo )
     {
-        Reference< XLibraryContainer > xLibContainer = pLibInfo->GetLibraryContainer();
+        uno::Reference< script::XLibraryContainer > xLibContainer = pLibInfo->GetLibraryContainer();
         if( xLibContainer.is() )
         {
             String aLibName = pLibInfo->GetLibName();
@@ -1546,7 +1544,7 @@ StarBASIC* BasicManager::CreateLib
 }
 
 StarBASIC* BasicManager::CreateLibForLibContainer( const String& rLibName,
-    const Reference< XLibraryContainer >& xScriptCont )
+    const uno::Reference< script::XLibraryContainer >& xScriptCont )
 {
     DBG_CHKTHIS( BasicManager, 0 );
     if ( GetLib( rLibName ) )
@@ -1600,7 +1598,7 @@ std::vector<BasicError>& BasicManager::GetErrors()
     return aErrors;
 }
 
-bool BasicManager::GetGlobalUNOConstant( const sal_Char* _pAsciiName, ::com::sun::star::uno::Any& aOut )
+bool BasicManager::GetGlobalUNOConstant( const sal_Char* _pAsciiName, uno::Any& aOut )
 {
     bool bRes = false;
     StarBASIC* pStandardLib = GetStdLib();
@@ -1610,9 +1608,9 @@ bool BasicManager::GetGlobalUNOConstant( const sal_Char* _pAsciiName, ::com::sun
     return bRes;
 }
 
-Any BasicManager::SetGlobalUNOConstant( const sal_Char* _pAsciiName, const Any& _rValue )
+uno::Any BasicManager::SetGlobalUNOConstant( const sal_Char* _pAsciiName, const uno::Any& _rValue )
 {
-    Any aOldValue;
+    uno::Any aOldValue;
 
     StarBASIC* pStandardLib = GetStdLib();
     OSL_PRECOND( pStandardLib, "BasicManager::SetGlobalUNOConstant: no lib to insert into!" );
@@ -1633,14 +1631,14 @@ Any BasicManager::SetGlobalUNOConstant( const sal_Char* _pAsciiName, const Any&
     return aOldValue;
 }
 
-bool BasicManager::LegacyPsswdBinaryLimitExceeded( ::com::sun::star::uno::Sequence< rtl::OUString >& _out_rModuleNames )
+bool BasicManager::LegacyPsswdBinaryLimitExceeded( uno::Sequence< rtl::OUString >& _out_rModuleNames )
 {
     try
     {
-        Reference< XNameAccess > xScripts( GetScriptLibraryContainer(), UNO_QUERY_THROW );
-        Reference< XLibraryContainerPassword > xPassword( GetScriptLibraryContainer(), UNO_QUERY_THROW );
+        uno::Reference< container::XNameAccess > xScripts( GetScriptLibraryContainer(), uno::UNO_QUERY_THROW );
+        uno::Reference< script::XLibraryContainerPassword > xPassword( GetScriptLibraryContainer(), uno::UNO_QUERY_THROW );
 
-        Sequence< ::rtl::OUString > aNames( xScripts->getElementNames() );
+        uno::Sequence< ::rtl::OUString > aNames( xScripts->getElementNames() );
         const ::rtl::OUString* pNames = aNames.getConstArray();
         const ::rtl::OUString* pNamesEnd = aNames.getConstArray() + aNames.getLength();
         for ( ; pNames != pNamesEnd; ++pNames )
@@ -1652,11 +1650,11 @@ bool BasicManager::LegacyPsswdBinaryLimitExceeded( ::com::sun::star::uno::Sequen
             if ( !pBasicLib )
                 continue;
 
-            Reference< XNameAccess > xScriptLibrary( xScripts->getByName( *pNames ), UNO_QUERY_THROW );
-            Sequence< ::rtl::OUString > aElementNames( xScriptLibrary->getElementNames() );
+            uno::Reference< container::XNameAccess > xScriptLibrary( xScripts->getByName( *pNames ), uno::UNO_QUERY_THROW );
+            uno::Sequence< ::rtl::OUString > aElementNames( xScriptLibrary->getElementNames() );
             sal_Int32 nLen = aElementNames.getLength();
 
-            Sequence< ::rtl::OUString > aBigModules( nLen );
+            uno::Sequence< ::rtl::OUString > aBigModules( nLen );
             sal_Int32 nBigModules = 0;
 
             const ::rtl::OUString* pElementNames = aElementNames.getConstArray();
@@ -1676,7 +1674,7 @@ bool BasicManager::LegacyPsswdBinaryLimitExceeded( ::com::sun::star::uno::Sequen
             }
         }
     }
-    catch( const Exception& )
+    catch( const uno::Exception& )
     {
         DBG_UNHANDLED_EXCEPTION();
     }
@@ -1807,11 +1805,11 @@ public:
         : maName( aName ), maLanguage( aLanguage), maSource( aSource ) {}
 
     // Methods XStarBasicModuleInfo
-    virtual ::rtl::OUString SAL_CALL getName() throw(RuntimeException)
+    virtual ::rtl::OUString SAL_CALL getName() throw(uno::RuntimeException)
         { return maName; }
-    virtual ::rtl::OUString SAL_CALL getLanguage() throw(RuntimeException)
+    virtual ::rtl::OUString SAL_CALL getLanguage() throw(uno::RuntimeException)
         { return maLanguage; }
-    virtual ::rtl::OUString SAL_CALL getSource() throw(RuntimeException)
+    virtual ::rtl::OUString SAL_CALL getSource() throw(uno::RuntimeException)
         { return maSource; }
 };
 
@@ -1821,16 +1819,16 @@ public:
 class DialogInfo_Impl : public DialogInfoHelper
 {
     ::rtl::OUString maName;
-    Sequence< sal_Int8 > mData;
+    uno::Sequence< sal_Int8 > mData;
 
 public:
-    DialogInfo_Impl( const ::rtl::OUString& aName, Sequence< sal_Int8 > Data )
+    DialogInfo_Impl( const ::rtl::OUString& aName, uno::Sequence< sal_Int8 > Data )
         : maName( aName ), mData( Data ) {}
 
     // Methods XStarBasicDialogInfo
-    virtual ::rtl::OUString SAL_CALL getName() throw(RuntimeException)
+    virtual ::rtl::OUString SAL_CALL getName() throw(uno::RuntimeException)
         { return maName; }
-    virtual Sequence< sal_Int8 > SAL_CALL getData() throw(RuntimeException)
+    virtual uno::Sequence< sal_Int8 > SAL_CALL getData() throw(uno::RuntimeException)
         { return mData; }
 };
 
@@ -1840,8 +1838,8 @@ public:
 class LibraryInfo_Impl : public LibraryInfoHelper
 {
     ::rtl::OUString maName;
-    Reference< XNameContainer > mxModuleContainer;
-    Reference< XNameContainer > mxDialogContainer;
+    uno::Reference< container::XNameContainer > mxModuleContainer;
+    uno::Reference< container::XNameContainer > mxDialogContainer;
     ::rtl::OUString maPassword;
     ::rtl::OUString maExternaleSourceURL;
     ::rtl::OUString maLinkTargetURL;
@@ -1850,8 +1848,8 @@ public:
     LibraryInfo_Impl
     (
         const ::rtl::OUString& aName,
-        Reference< XNameContainer > xModuleContainer,
-        Reference< XNameContainer > xDialogContainer,
+        uno::Reference< container::XNameContainer > xModuleContainer,
+        uno::Reference< container::XNameContainer > xDialogContainer,
         const ::rtl::OUString& aPassword,
         const ::rtl::OUString& aExternaleSourceURL,
         const ::rtl::OUString& aLinkTargetURL
@@ -1865,17 +1863,17 @@ public:
     {}
 
     // Methods XStarBasicLibraryInfo
-    virtual ::rtl::OUString SAL_CALL getName() throw(RuntimeException)
+    virtual ::rtl::OUString SAL_CALL getName() throw(uno::RuntimeException)
         { return maName; }
-    virtual Reference< XNameContainer > SAL_CALL getModuleContainer() throw(RuntimeException)
+    virtual uno::Reference< container::XNameContainer > SAL_CALL getModuleContainer() throw(uno::RuntimeException)
         { return mxModuleContainer; }
-    virtual Reference< XNameContainer > SAL_CALL getDialogContainer() throw(RuntimeException)
+    virtual uno::Reference< container::XNameContainer > SAL_CALL getDialogContainer() throw(uno::RuntimeException)
         { return mxDialogContainer; }
-    virtual ::rtl::OUString SAL_CALL getPassword() throw(RuntimeException)
+    virtual ::rtl::OUString SAL_CALL getPassword() throw(uno::RuntimeException)
         { return maPassword; }
-    virtual ::rtl::OUString SAL_CALL getExternalSourceURL() throw(RuntimeException)
+    virtual ::rtl::OUString SAL_CALL getExternalSourceURL() throw(uno::RuntimeException)
         { return maExternaleSourceURL; }
-    virtual ::rtl::OUString SAL_CALL getLinkTargetURL() throw(RuntimeException)
+    virtual ::rtl::OUString SAL_CALL getLinkTargetURL() throw(uno::RuntimeException)
         { return maLinkTargetURL; }
 };
 
@@ -1890,65 +1888,67 @@ public:
         :mpLib( pLib ) {}
 
     // Methods XElementAccess
-    virtual Type SAL_CALL getElementType()
-        throw(RuntimeException);
+    virtual uno::Type SAL_CALL getElementType()
+        throw(uno::RuntimeException);
     virtual sal_Bool SAL_CALL hasElements()
-        throw(RuntimeException);
+        throw(uno::RuntimeException);
 
     // Methods XNameAccess
-    virtual Any SAL_CALL getByName( const ::rtl::OUString& aName )
-        throw(NoSuchElementException, WrappedTargetException, RuntimeException);
-    virtual Sequence< ::rtl::OUString > SAL_CALL getElementNames()
-        throw(RuntimeException);
+    virtual uno::Any SAL_CALL getByName( const ::rtl::OUString& aName )
+        throw(container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException);
+    virtual uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames()
+        throw(uno::RuntimeException);
     virtual sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName )
-        throw(RuntimeException);
+        throw(uno::RuntimeException);
 
     // Methods XNameReplace
-    virtual void SAL_CALL replaceByName( const ::rtl::OUString& aName, const Any& aElement )
-        throw(IllegalArgumentException, NoSuchElementException, WrappedTargetException, RuntimeException);
+    virtual void SAL_CALL replaceByName( const ::rtl::OUString& aName, const uno::Any& aElement )
+        throw(lang::IllegalArgumentException, container::NoSuchElementException,
+              lang::WrappedTargetException, uno::RuntimeException);
 
     // Methods XNameContainer
-    virtual void SAL_CALL insertByName( const ::rtl::OUString& aName, const Any& aElement )
-        throw(IllegalArgumentException, ElementExistException, WrappedTargetException, RuntimeException);
+    virtual void SAL_CALL insertByName( const ::rtl::OUString& aName, const uno::Any& aElement )
+        throw(lang::IllegalArgumentException, container::ElementExistException,
+              lang::WrappedTargetException, uno::RuntimeException);
     virtual void SAL_CALL removeByName( const ::rtl::OUString& Name )
-        throw(NoSuchElementException, WrappedTargetException, RuntimeException);
+        throw(container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException);
 };
 
 // Methods XElementAccess
-Type ModuleContainer_Impl::getElementType()
-    throw(RuntimeException)
+uno::Type ModuleContainer_Impl::getElementType()
+    throw(uno::RuntimeException)
 {
-    Type aModuleType = ::getCppuType( (const Reference< XStarBasicModuleInfo > *)0 );
+    uno::Type aModuleType = ::getCppuType( (const uno::Reference< script::XStarBasicModuleInfo > *)0 );
     return aModuleType;
 }
 
 sal_Bool ModuleContainer_Impl::hasElements()
-    throw(RuntimeException)
+    throw(uno::RuntimeException)
 {
     SbxArray* pMods = mpLib ? mpLib->GetModules() : NULL;
     return pMods && pMods->Count() > 0;
 }
 
 // Methods XNameAccess
-Any ModuleContainer_Impl::getByName( const ::rtl::OUString& aName )
-    throw(NoSuchElementException, WrappedTargetException, RuntimeException)
+uno::Any ModuleContainer_Impl::getByName( const ::rtl::OUString& aName )
+    throw(container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
 {
     SbModule* pMod = mpLib ? mpLib->FindModule( aName ) : NULL;
     if( !pMod )
-        throw NoSuchElementException();
-    Reference< XStarBasicModuleInfo > xMod = (XStarBasicModuleInfo*)new ModuleInfo_Impl
+        throw container::NoSuchElementException();
+    uno::Reference< script::XStarBasicModuleInfo > xMod = (XStarBasicModuleInfo*)new ModuleInfo_Impl
         ( aName, ::rtl::OUString::createFromAscii( szScriptLanguage ), pMod->GetSource32() );
-    Any aRetAny;
+    uno::Any aRetAny;
     aRetAny <<= xMod;
     return aRetAny;
 }
 
-Sequence< ::rtl::OUString > ModuleContainer_Impl::getElementNames()
-    throw(RuntimeException)
+uno::Sequence< ::rtl::OUString > ModuleContainer_Impl::getElementNames()
+    throw(uno::RuntimeException)
 {
     SbxArray* pMods = mpLib ? mpLib->GetModules() : NULL;
     sal_uInt16 nMods = pMods ? pMods->Count() : 0;
-    Sequence< ::rtl::OUString > aRetSeq( nMods );
+    uno::Sequence< ::rtl::OUString > aRetSeq( nMods );
     ::rtl::OUString* pRetSeq = aRetSeq.getArray();
     for( sal_uInt16 i = 0 ; i < nMods ; i++ )
     {
@@ -1959,7 +1959,7 @@ Sequence< ::rtl::OUString > ModuleContainer_Impl::getElementNames()
 }
 
 sal_Bool ModuleContainer_Impl::hasByName( const ::rtl::OUString& aName )
-    throw(RuntimeException)
+    throw(uno::RuntimeException)
 {
     SbModule* pMod = mpLib ? mpLib->FindModule( aName ) : NULL;
     sal_Bool bRet = (pMod != NULL);
@@ -1968,8 +1968,8 @@ sal_Bool ModuleContainer_Impl::hasByName( const ::rtl::OUString& aName )
 
 
 // Methods XNameReplace
-void ModuleContainer_Impl::replaceByName( const ::rtl::OUString& aName, const Any& aElement )
-    throw(IllegalArgumentException, NoSuchElementException, WrappedTargetException, RuntimeException)
+void ModuleContainer_Impl::replaceByName( const ::rtl::OUString& aName, const uno::Any& aElement )
+    throw(lang::IllegalArgumentException, container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
 {
     removeByName( aName );
     insertByName( aName, aElement );
@@ -1977,43 +1977,43 @@ void ModuleContainer_Impl::replaceByName( const ::rtl::OUString& aName, const An
 
 
 // Methods XNameContainer
-void ModuleContainer_Impl::insertByName( const ::rtl::OUString& aName, const Any& aElement )
-    throw(IllegalArgumentException, ElementExistException, WrappedTargetException, RuntimeException)
+void ModuleContainer_Impl::insertByName( const ::rtl::OUString& aName, const uno::Any& aElement )
+    throw(lang::IllegalArgumentException, container::ElementExistException, lang::WrappedTargetException, uno::RuntimeException)
 {
-    Type aModuleType = ::getCppuType( (const Reference< XStarBasicModuleInfo > *)0 );
-    Type aAnyType = aElement.getValueType();
+    uno::Type aModuleType = ::getCppuType( (const uno::Reference< script::XStarBasicModuleInfo > *)0 );
+    uno::Type aAnyType = aElement.getValueType();
     if( aModuleType != aAnyType )
-        throw IllegalArgumentException();
-    Reference< XStarBasicModuleInfo > xMod;
+        throw lang::IllegalArgumentException();
+    uno::Reference< script::XStarBasicModuleInfo > xMod;
     aElement >>= xMod;
     mpLib->MakeModule32( aName, xMod->getSource() );
 }
 
 void ModuleContainer_Impl::removeByName( const ::rtl::OUString& Name )
-    throw(NoSuchElementException, WrappedTargetException, RuntimeException)
+    throw(container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
 {
     SbModule* pMod = mpLib ? mpLib->FindModule( Name ) : NULL;
     if( !pMod )
-        throw NoSuchElementException();
+        throw container::NoSuchElementException();
     mpLib->Remove( pMod );
 }
 
 
 //=====================================================================
 
-Sequence< sal_Int8 > implGetDialogData( SbxObject* pDialog )
+uno::Sequence< sal_Int8 > implGetDialogData( SbxObject* pDialog )
 {
     SvMemoryStream aMemStream;
     pDialog->Store( aMemStream );
     sal_Int32 nLen = aMemStream.Tell();
-    Sequence< sal_Int8 > aData( nLen );
+    uno::Sequence< sal_Int8 > aData( nLen );
     sal_Int8* pDestData = aData.getArray();
     const sal_Int8* pSrcData = (const sal_Int8*)aMemStream.GetData();
     rtl_copyMemory( pDestData, pSrcData, nLen );
     return aData;
 }
 
-SbxObject* implCreateDialog( Sequence< sal_Int8 > aData )
+SbxObject* implCreateDialog( uno::Sequence< sal_Int8 > aData )
 {
     sal_Int8* pData = aData.getArray();
     SvMemoryStream aMemStream( pData, aData.getLength(), STREAM_READ );
@@ -2035,40 +2035,40 @@ public:
         :mpLib( pLib ) {}
 
     // Methods XElementAccess
-    virtual Type SAL_CALL getElementType()
-        throw(RuntimeException);
+    virtual uno::Type SAL_CALL getElementType()
+        throw(uno::RuntimeException);
     virtual sal_Bool SAL_CALL hasElements()
-        throw(RuntimeException);
+        throw(uno::RuntimeException);
 
     // Methods XNameAccess
-    virtual Any SAL_CALL getByName( const ::rtl::OUString& aName )
-        throw(NoSuchElementException, WrappedTargetException, RuntimeException);
-    virtual Sequence< ::rtl::OUString > SAL_CALL getElementNames()
-        throw(RuntimeException);
+    virtual uno::Any SAL_CALL getByName( const ::rtl::OUString& aName )
+        throw(container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException);
+    virtual uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames()
+        throw(uno::RuntimeException);
     virtual sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName )
-        throw(RuntimeException);
+        throw(uno::RuntimeException);
 
     // Methods XNameReplace
-    virtual void SAL_CALL replaceByName( const ::rtl::OUString& aName, const Any& aElement )
-        throw(IllegalArgumentException, NoSuchElementException, WrappedTargetException, RuntimeException);
+    virtual void SAL_CALL replaceByName( const ::rtl::OUString& aName, const uno::Any& aElement )
+        throw(lang::IllegalArgumentException, container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException);
 
     // Methods XNameContainer
-    virtual void SAL_CALL insertByName( const ::rtl::OUString& aName, const Any& aElement )
-        throw(IllegalArgumentException, ElementExistException, WrappedTargetException, RuntimeException);
+    virtual void SAL_CALL insertByName( const ::rtl::OUString& aName, const uno::Any& aElement )
+        throw(lang::IllegalArgumentException, container::ElementExistException, lang::WrappedTargetException, uno::RuntimeException);
     virtual void SAL_CALL removeByName( const ::rtl::OUString& Name )
-        throw(NoSuchElementException, WrappedTargetException, RuntimeException);
+        throw(container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException);
 };
 
 // Methods XElementAccess
-Type DialogContainer_Impl::getElementType()
-    throw(RuntimeException)
+uno::Type DialogContainer_Impl::getElementType()
+    throw(uno::RuntimeException)
 {
-    Type aModuleType = ::getCppuType( (const Reference< XStarBasicDialogInfo > *)0 );
+    uno::Type aModuleType = ::getCppuType( (const uno::Reference< script::XStarBasicDialogInfo > *)0 );
     return aModuleType;
 }
 
 sal_Bool DialogContainer_Impl::hasElements()
-    throw(RuntimeException)
+    throw(uno::RuntimeException)
 {
     sal_Bool bRet = sal_False;
 
@@ -2087,31 +2087,31 @@ sal_Bool DialogContainer_Impl::hasElements()
 }
 
 // Methods XNameAccess
-Any DialogContainer_Impl::getByName( const ::rtl::OUString& aName )
-    throw(NoSuchElementException, WrappedTargetException, RuntimeException)
+uno::Any DialogContainer_Impl::getByName( const ::rtl::OUString& aName )
+    throw(container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
 {
     SbxVariable* pVar = mpLib->GetObjects()->Find( aName, SbxCLASS_DONTCARE );
     if( !( pVar && pVar->ISA( SbxObject ) &&
            ( ((SbxObject*)pVar)->GetSbxId() == SBXID_DIALOG ) ) )
     {
-        throw NoSuchElementException();
+        throw container::NoSuchElementException();
     }
 
-    Reference< XStarBasicDialogInfo > xDialog =
+    uno::Reference< script::XStarBasicDialogInfo > xDialog =
         (XStarBasicDialogInfo*)new DialogInfo_Impl
             ( aName, implGetDialogData( (SbxObject*)pVar ) );
 
-    Any aRetAny;
+    uno::Any aRetAny;
     aRetAny <<= xDialog;
     return aRetAny;
 }
 
-Sequence< ::rtl::OUString > DialogContainer_Impl::getElementNames()
-    throw(RuntimeException)
+uno::Sequence< ::rtl::OUString > DialogContainer_Impl::getElementNames()
+    throw(uno::RuntimeException)
 {
     mpLib->GetAll( SbxCLASS_OBJECT );
     sal_Int16 nCount = mpLib->GetObjects()->Count();
-    Sequence< ::rtl::OUString > aRetSeq( nCount );
+    uno::Sequence< ::rtl::OUString > aRetSeq( nCount );
     ::rtl::OUString* pRetSeq = aRetSeq.getArray();
     sal_Int32 nDialogCounter = 0;
 
@@ -2129,7 +2129,7 @@ Sequence< ::rtl::OUString > DialogContainer_Impl::getElementNames()
 }
 
 sal_Bool DialogContainer_Impl::hasByName( const ::rtl::OUString& aName )
-    throw(RuntimeException)
+    throw(uno::RuntimeException)
 {
     sal_Bool bRet = sal_False;
     SbxVariable* pVar = mpLib->GetObjects()->Find( aName, SbxCLASS_DONTCARE );
@@ -2143,8 +2143,8 @@ sal_Bool DialogContainer_Impl::hasByName( const ::rtl::OUString& aName )
 
 
 // Methods XNameReplace
-void DialogContainer_Impl::replaceByName( const ::rtl::OUString& aName, const Any& aElement )
-    throw(IllegalArgumentException, NoSuchElementException, WrappedTargetException, RuntimeException)
+void DialogContainer_Impl::replaceByName( const ::rtl::OUString& aName, const uno::Any& aElement )
+    throw(lang::IllegalArgumentException, container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
 {
     removeByName( aName );
     insertByName( aName, aElement );
@@ -2152,29 +2152,29 @@ void DialogContainer_Impl::replaceByName( const ::rtl::OUString& aName, const An
 
 
 // Methods XNameContainer
-void DialogContainer_Impl::insertByName( const ::rtl::OUString& aName, const Any& aElement )
-    throw(IllegalArgumentException, ElementExistException, WrappedTargetException, RuntimeException)
+void DialogContainer_Impl::insertByName( const ::rtl::OUString& aName, const uno::Any& aElement )
+    throw(lang::IllegalArgumentException, container::ElementExistException, lang::WrappedTargetException, uno::RuntimeException)
 {
     (void)aName;
-    Type aModuleType = ::getCppuType( (const Reference< XStarBasicDialogInfo > *)0 );
-    Type aAnyType = aElement.getValueType();
+    uno::Type aModuleType = ::getCppuType( (const uno::Reference< script::XStarBasicDialogInfo > *)0 );
+    uno::Type aAnyType = aElement.getValueType();
     if( aModuleType != aAnyType )
-        throw IllegalArgumentException();
-    Reference< XStarBasicDialogInfo > xMod;
+        throw lang::IllegalArgumentException();
+    uno::Reference< script::XStarBasicDialogInfo > xMod;
     aElement >>= xMod;
     SbxObjectRef xDialog = implCreateDialog( xMod->getData() );
     mpLib->Insert( xDialog );
 }
 
 void DialogContainer_Impl::removeByName( const ::rtl::OUString& Name )
-    throw(NoSuchElementException, WrappedTargetException, RuntimeException)
+    throw(container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
 {
     (void)Name;
     SbxVariable* pVar = mpLib->GetObjects()->Find( Name, SbxCLASS_DONTCARE );
     if( !( pVar && pVar->ISA( SbxObject ) &&
            ( ((SbxObject*)pVar)->GetSbxId() == SBXID_DIALOG ) ) )
     {
-        throw NoSuchElementException();
+        throw container::NoSuchElementException();
     }
     mpLib->Remove( pVar );
 }
@@ -2192,41 +2192,41 @@ public:
         :mpMgr( pMgr ) {}
 
     // Methods XElementAccess
-    virtual Type SAL_CALL getElementType()
-        throw(RuntimeException);
+    virtual uno::Type SAL_CALL getElementType()
+        throw(uno::RuntimeException);
     virtual sal_Bool SAL_CALL hasElements()
-        throw(RuntimeException);
+        throw(uno::RuntimeException);
 
     // Methods XNameAccess
-    virtual Any SAL_CALL getByName( const ::rtl::OUString& aName )
-        throw(NoSuchElementException, WrappedTargetException, RuntimeException);
-    virtual Sequence< ::rtl::OUString > SAL_CALL getElementNames()
-        throw(RuntimeException);
+    virtual uno::Any SAL_CALL getByName( const ::rtl::OUString& aName )
+        throw(container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException);
+    virtual uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames()
+        throw(uno::RuntimeException);
     virtual sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName )
-        throw(RuntimeException);
+        throw(uno::RuntimeException);
 
     // Methods XNameReplace
-    virtual void SAL_CALL replaceByName( const ::rtl::OUString& aName, const Any& aElement )
-        throw(IllegalArgumentException, NoSuchElementException, WrappedTargetException, RuntimeException);
+    virtual void SAL_CALL replaceByName( const ::rtl::OUString& aName, const uno::Any& aElement )
+        throw(lang::IllegalArgumentException, container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException);
 
     // Methods XNameContainer
-    virtual void SAL_CALL insertByName( const ::rtl::OUString& aName, const Any& aElement )
-        throw(IllegalArgumentException, ElementExistException, WrappedTargetException, RuntimeException);
+    virtual void SAL_CALL insertByName( const ::rtl::OUString& aName, const uno::Any& aElement )
+        throw(lang::IllegalArgumentException, container::ElementExistException, lang::WrappedTargetException, uno::RuntimeException);
     virtual void SAL_CALL removeByName( const ::rtl::OUString& Name )
-        throw(NoSuchElementException, WrappedTargetException, RuntimeException);
+        throw(container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException);
 };
 
 
 // Methods XElementAccess
-Type LibraryContainer_Impl::getElementType()
-    throw(RuntimeException)
+uno::Type LibraryContainer_Impl::getElementType()
+    throw(uno::RuntimeException)
 {
-    Type aType = ::getCppuType( (const Reference< XStarBasicLibraryInfo > *)0 );
+    uno::Type aType = ::getCppuType( (const uno::Reference< script::XStarBasicLibraryInfo > *)0 );
     return aType;
 }
 
 sal_Bool LibraryContainer_Impl::hasElements()
-    throw(RuntimeException)
+    throw(uno::RuntimeException)
 {
     sal_Int32 nLibs = mpMgr->GetLibCount();
     sal_Bool bRet = (nLibs > 0);
@@ -2234,19 +2234,19 @@ sal_Bool LibraryContainer_Impl::hasElements()
 }
 
 // Methods XNameAccess
-Any LibraryContainer_Impl::getByName( const ::rtl::OUString& aName )
-    throw(NoSuchElementException, WrappedTargetException, RuntimeException)
+uno::Any LibraryContainer_Impl::getByName( const ::rtl::OUString& aName )
+    throw(container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
 {
-    Any aRetAny;
+    uno::Any aRetAny;
     if( !mpMgr->HasLib( aName ) )
-        throw NoSuchElementException();
+        throw container::NoSuchElementException();
     StarBASIC* pLib = mpMgr->GetLib( aName );
 
-    Reference< XNameContainer > xModuleContainer =
-        (XNameContainer*)new ModuleContainer_Impl( pLib );
+    uno::Reference< container::XNameContainer > xModuleContainer =
+        (container::XNameContainer*)new ModuleContainer_Impl( pLib );
 
-    Reference< XNameContainer > xDialogContainer =
-        (XNameContainer*)new DialogContainer_Impl( pLib );
+    uno::Reference< container::XNameContainer > xDialogContainer =
+        (container::XNameContainer*)new DialogContainer_Impl( pLib );
 
     BasicLibInfo* pLibInfo = mpMgr->FindLibInfo( pLib );
 
@@ -2260,7 +2260,7 @@ Any LibraryContainer_Impl::getByName( const ::rtl::OUString& aName )
     else if( pLibInfo->IsExtern() )
         aExternaleSourceURL = pLibInfo->GetStorageName();
 
-    Reference< XStarBasicLibraryInfo > xLibInfo = new LibraryInfo_Impl
+    uno::Reference< script::XStarBasicLibraryInfo > xLibInfo = new LibraryInfo_Impl
     (
         aName,
         xModuleContainer,
@@ -2274,11 +2274,11 @@ Any LibraryContainer_Impl::getByName( const ::rtl::OUString& aName )
     return aRetAny;
 }
 
-Sequence< ::rtl::OUString > LibraryContainer_Impl::getElementNames()
-    throw(RuntimeException)
+uno::Sequence< ::rtl::OUString > LibraryContainer_Impl::getElementNames()
+    throw(uno::RuntimeException)
 {
     sal_uInt16 nLibs = mpMgr->GetLibCount();
-    Sequence< ::rtl::OUString > aRetSeq( nLibs );
+    uno::Sequence< ::rtl::OUString > aRetSeq( nLibs );
     ::rtl::OUString* pRetSeq = aRetSeq.getArray();
     for( sal_uInt16 i = 0 ; i < nLibs ; i++ )
     {
@@ -2288,23 +2288,23 @@ Sequence< ::rtl::OUString > LibraryContainer_Impl::getElementNames()
 }
 
 sal_Bool LibraryContainer_Impl::hasByName( const ::rtl::OUString& aName )
-    throw(RuntimeException)
+    throw(uno::RuntimeException)
 {
     sal_Bool bRet = mpMgr->HasLib( aName );
     return bRet;
 }
 
 // Methods XNameReplace
-void LibraryContainer_Impl::replaceByName( const ::rtl::OUString& aName, const Any& aElement )
-    throw(IllegalArgumentException, NoSuchElementException, WrappedTargetException, RuntimeException)
+void LibraryContainer_Impl::replaceByName( const ::rtl::OUString& aName, const uno::Any& aElement )
+    throw(lang::IllegalArgumentException, container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
 {
     removeByName( aName );
     insertByName( aName, aElement );
 }
 
 // Methods XNameContainer
-void LibraryContainer_Impl::insertByName( const ::rtl::OUString& aName, const Any& aElement )
-    throw(IllegalArgumentException, ElementExistException, WrappedTargetException, RuntimeException)
+void LibraryContainer_Impl::insertByName( const ::rtl::OUString& aName, const uno::Any& aElement )
+    throw(lang::IllegalArgumentException, container::ElementExistException, lang::WrappedTargetException, uno::RuntimeException)
 {
     (void)aName;
     (void)aElement;
@@ -2312,51 +2312,49 @@ void LibraryContainer_Impl::insertByName( const ::rtl::OUString& aName, const An
 }
 
 void LibraryContainer_Impl::removeByName( const ::rtl::OUString& Name )
-    throw(NoSuchElementException, WrappedTargetException, RuntimeException)
+    throw(container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
 {
     StarBASIC* pLib = mpMgr->GetLib( Name );
     if( !pLib )
-        throw NoSuchElementException();
+        throw container::NoSuchElementException();
     sal_uInt16 nLibId = mpMgr->GetLibId( Name );
     mpMgr->RemoveLib( nLibId );
 }
 
 //=====================================================================
 
-typedef WeakImplHelper1< XStarBasicAccess > StarBasicAccessHelper;
+typedef WeakImplHelper1< script::XStarBasicAccess > StarBasicAccessHelper;
 
 
 class StarBasicAccess_Impl : public StarBasicAccessHelper
 {
     BasicManager* mpMgr;
-    Reference< XNameContainer > mxLibContainer;
+    uno::Reference< container::XNameContainer > mxLibContainer;
 
 public:
     StarBasicAccess_Impl( BasicManager* pMgr )
         :mpMgr( pMgr ) {}
 
 public:
-
     // Methods
-    virtual Reference< XNameContainer > SAL_CALL getLibraryContainer()
-        throw(RuntimeException);
+    virtual uno::Reference< container::XNameContainer > SAL_CALL getLibraryContainer()
+        throw(uno::RuntimeException);
     virtual void SAL_CALL createLibrary( const ::rtl::OUString& LibName, const ::rtl::OUString& Password,
         const ::rtl::OUString& ExternalSourceURL, const ::rtl::OUString& LinkTargetURL )
-            throw(ElementExistException, RuntimeException);
+            throw(container::ElementExistException, uno::RuntimeException);
     virtual void SAL_CALL addModule( const ::rtl::OUString& LibraryName, const ::rtl::OUString& ModuleName,
         const ::rtl::OUString& Language, const ::rtl::OUString& Source )
-            throw(NoSuchElementException, RuntimeException);
+            throw(container::NoSuchElementException, uno::RuntimeException);
     virtual void SAL_CALL addDialog( const ::rtl::OUString& LibraryName, const ::rtl::OUString& DialogName,
-        const Sequence< sal_Int8 >& Data )
-            throw(NoSuchElementException, RuntimeException);
-
+        const uno::Sequence< sal_Int8 >& Data )
+            throw(container::NoSuchElementException, uno::RuntimeException);
 };
 
-Reference< XNameContainer > SAL_CALL StarBasicAccess_Impl::getLibraryContainer()
-    throw(RuntimeException)
+uno::Reference< container::XNameContainer > SAL_CALL StarBasicAccess_Impl::getLibraryContainer()
+    throw(uno::RuntimeException)
 {
     if( !mxLibContainer.is() )
-        mxLibContainer = (XNameContainer*)new LibraryContainer_Impl( mpMgr );
+        mxLibContainer = (container::XNameContainer*)new LibraryContainer_Impl( mpMgr );
     return mxLibContainer;
 }
 
@@ -2367,7 +2365,7 @@ void SAL_CALL StarBasicAccess_Impl::createLibrary
     const ::rtl::OUString& ExternalSourceURL,
     const ::rtl::OUString& LinkTargetURL
 )
-    throw(ElementExistException, RuntimeException)
+    throw(container::ElementExistException, uno::RuntimeException)
 {
     (void)ExternalSourceURL;
 #ifdef DBG_UTIL
@@ -2384,7 +2382,7 @@ void SAL_CALL StarBasicAccess_Impl::addModule
     const ::rtl::OUString& Language,
     const ::rtl::OUString& Source
 )
-    throw(NoSuchElementException, RuntimeException)
+    throw(container::NoSuchElementException, uno::RuntimeException)
 {
     (void)Language;
     StarBASIC* pLib = mpMgr->GetLib( LibraryName );
@@ -2397,9 +2395,9 @@ void SAL_CALL StarBasicAccess_Impl::addDialog
 (
     const ::rtl::OUString& LibraryName,
     const ::rtl::OUString& DialogName,
-    const Sequence< sal_Int8 >& Data
+    const uno::Sequence< sal_Int8 >& Data
 )
-    throw(NoSuchElementException, RuntimeException)
+    throw(container::NoSuchElementException, uno::RuntimeException)
 {
     (void)LibraryName;
     (void)DialogName;
@@ -2407,9 +2405,9 @@ void SAL_CALL StarBasicAccess_Impl::addDialog
 }
 
 // Basic XML Import/Export
-Reference< XStarBasicAccess > getStarBasicAccess( BasicManager* pMgr )
+uno::Reference< script::XStarBasicAccess > getStarBasicAccess( BasicManager* pMgr )
 {
-    Reference< XStarBasicAccess > xRet =
+    uno::Reference< script::XStarBasicAccess > xRet =
         new StarBasicAccess_Impl( (BasicManager*)pMgr );
     return xRet;
 }
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index 1d2835b..a90cc0e 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -53,21 +53,13 @@
 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
 #include <com/sun/star/lang/Locale.hpp>
 #include <com/sun/star/ucb/XSimpleFileAccess3.hpp>
-#include <com/sun/star/io/XInputStream.hpp>
-#include <com/sun/star/io/XOutputStream.hpp>
-#include <com/sun/star/io/XStream.hpp>
-#include <com/sun/star/io/XSeekable.hpp>
 #include <com/sun/star/script/XErrorQuery.hpp>
 #include <ooo/vba/XHelperInterface.hpp>
 #include <com/sun/star/bridge/oleautomation/XAutomationObject.hpp>
+
 using namespace comphelper;
 using namespace osl;
-using namespace com::sun::star::uno;
-using namespace com::sun::star::lang;
-using namespace com::sun::star::ucb;
-using namespace com::sun::star::io;
-using namespace com::sun::star::script;
-using namespace com::sun::star::frame;
+using namespace com::sun::star;
 
 #include <comphelper/string.hxx>
 
@@ -115,7 +107,7 @@ SbxVariable* getDefaultProp( SbxVariable* pRef );
 bool implDateSerial( sal_Int16 nYear, sal_Int16 nMonth, sal_Int16 nDay, double& rdRet );
 
 // from source/classes/sbxmod.cxx
-Reference< XModel > getDocumentModel( StarBASIC* );
+uno::Reference< frame::XModel > getDocumentModel( StarBASIC* );
 
 static void FilterWhiteSpace( String& rStr )
 {
@@ -142,7 +134,7 @@ static long GetDayDiff( const Date& rDate );
 static const CharClass& GetCharClass( void )
 {
     static bool bNeedsInit = true;
-    static ::com::sun::star::lang::Locale aLocale;
+    static lang::Locale aLocale;
     if( bNeedsInit )
     {
         bNeedsInit = false;
@@ -179,16 +171,16 @@ String getFullPath( const String& aRelPath )
 }
 
 // TODO: -> SbiGlobals
-static com::sun::star::uno::Reference< XSimpleFileAccess3 > getFileAccess( void )
+static uno::Reference< ucb::XSimpleFileAccess3 > getFileAccess( void )
 {
-    static com::sun::star::uno::Reference< XSimpleFileAccess3 > xSFI;
+    static uno::Reference< ucb::XSimpleFileAccess3 > xSFI;
     if( !xSFI.is() )
     {
-        com::sun::star::uno::Reference< XMultiServiceFactory > xSMgr = getProcessServiceFactory();
+        uno::Reference< lang::XMultiServiceFactory > xSMgr = getProcessServiceFactory();
         if( xSMgr.is() )
         {
-            xSFI = com::sun::star::uno::Reference< XSimpleFileAccess3 >( xSMgr->createInstance
-                ( ::rtl::OUString("com.sun.star.ucb.SimpleFileAccess" ) ), UNO_QUERY );
+            xSFI = uno::Reference< ucb::XSimpleFileAccess3 >( xSMgr->createInstance
+                ( ::rtl::OUString("com.sun.star.ucb.SimpleFileAccess" ) ), uno::UNO_QUERY );
         }
     }
     return xSFI;
@@ -260,7 +252,7 @@ RTLFUNC(Error)
         // ( complicated isn't it ? )
         if ( bVBA && rPar.Count() > 1 )
         {
-            com::sun::star::uno::Reference< ooo::vba::XErrObject > xErrObj( SbxErrObject::getUnoErrObject() );
+            uno::Reference< ooo::vba::XErrObject > xErrObj( SbxErrObject::getUnoErrObject() );
             if ( xErrObj.is() && xErrObj->getNumber() == nCode && !xErrObj->getDescription().isEmpty() )
                 tmpErrMsg = xErrObj->getDescription();
         }
@@ -501,7 +493,7 @@ RTLFUNC(ChDrive)
 // Implementation of StepRENAME with UCB
 void implStepRenameUCB( const String& aSource, const String& aDest )
 {
-    com::sun::star::uno::Reference< XSimpleFileAccess3 > xSFI = getFileAccess();
+    uno::Reference< ucb::XSimpleFileAccess3 > xSFI = getFileAccess();
     if( xSFI.is() )
     {
         try
@@ -548,7 +540,7 @@ RTLFUNC(FileCopy)
         String aDest = rPar.Get(2)->GetString();
         if( hasUno() )
         {
-            com::sun::star::uno::Reference< XSimpleFileAccess3 > xSFI = getFileAccess();
+            uno::Reference< ucb::XSimpleFileAccess3 > xSFI = getFileAccess();
             if( xSFI.is() )
             {
                 try
@@ -586,7 +578,7 @@ RTLFUNC(Kill)
 
         if( hasUno() )
         {
-            com::sun::star::uno::Reference< XSimpleFileAccess3 > xSFI = getFileAccess();
+            uno::Reference< ucb::XSimpleFileAccess3 > xSFI = getFileAccess();
             if( xSFI.is() )
             {
                 String aFullPath = getFullPath( aFileSpec );
@@ -626,7 +618,7 @@ RTLFUNC(MkDir)
 
         if( hasUno() )
         {
-            com::sun::star::uno::Reference< XSimpleFileAccess3 > xSFI = getFileAccess();
+            uno::Reference< ucb::XSimpleFileAccess3 > xSFI = getFileAccess();
             if( xSFI.is() )
             {
                 try
@@ -717,7 +709,7 @@ RTLFUNC(RmDir)
         String aPath = rPar.Get(1)->GetString();
         if( hasUno() )
         {
-            com::sun::star::uno::Reference< XSimpleFileAccess3 > xSFI = getFileAccess();
+            uno::Reference< ucb::XSimpleFileAccess3 > xSFI = getFileAccess();
             if( xSFI.is() )
             {
                 try
@@ -796,7 +788,7 @@ RTLFUNC(FileLen)
         sal_Int32 nLen = 0;
         if( hasUno() )
         {
-            com::sun::star::uno::Reference< XSimpleFileAccess3 > xSFI = getFileAccess();
+            uno::Reference< ucb::XSimpleFileAccess3 > xSFI = getFileAccess();
             if( xSFI.is() )
             {
                 try
@@ -1555,12 +1547,12 @@ RTLFUNC(StrComp)
         ::utl::TransliterationWrapper* pTransliterationWrapper = GetSbData()->pTransliterationWrapper;
         if( !pTransliterationWrapper )
         {
-            com::sun::star::uno::Reference< XMultiServiceFactory > xSMgr = getProcessServiceFactory();
+            uno::Reference< lang::XMultiServiceFactory > xSMgr = getProcessServiceFactory();
             pTransliterationWrapper = GetSbData()->pTransliterationWrapper =
                 new ::utl::TransliterationWrapper( xSMgr,
-                    ::com::sun::star::i18n::TransliterationModules_IGNORE_CASE |
-                    ::com::sun::star::i18n::TransliterationModules_IGNORE_KANA |
-                    ::com::sun::star::i18n::TransliterationModules_IGNORE_WIDTH );
+                    i18n::TransliterationModules_IGNORE_CASE |
+                    i18n::TransliterationModules_IGNORE_KANA |
+                    i18n::TransliterationModules_IGNORE_WIDTH );
         }
 
         LanguageType eLangType = GetpApp()->GetSettings().GetLanguage();
@@ -1841,7 +1833,7 @@ RTLFUNC(DateValue)
         if( !bSuccess && ( eLangType != LANGUAGE_ENGLISH_US ) )
         {
             // Create a new SvNumberFormatter by using LANGUAGE_ENGLISH to get the date value;
-            com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >
+            uno::Reference< lang::XMultiServiceFactory >
                 xFactory = comphelper::getProcessServiceFactory();
             SvNumberFormatter aFormatter( xFactory, LANGUAGE_ENGLISH_US );
             bSuccess = aFormatter.IsNumberFormat( aStr, nIndex, fResult );
@@ -2274,9 +2266,9 @@ RTLFUNC(IsError)
                     if ( SbxBase* pBaseObj = pVar->GetObject() )
                         pObj = PTR_CAST(SbUnoObject, pBaseObj );
                 }
-        Reference< XErrorQuery > xError;
+        uno::Reference< script::XErrorQuery > xError;
         if ( pObj )
-            xError.set( pObj->getUnoAny(), UNO_QUERY );
+            xError.set( pObj->getUnoAny(), uno::UNO_QUERY );
         if ( xError.is() )
             rPar.Get( 0 )->PutBool( xError->hasError() );
         else
@@ -2455,7 +2447,7 @@ RTLFUNC(Dir)
 
         if( hasUno() )
         {
-            com::sun::star::uno::Reference< XSimpleFileAccess3 > xSFI = getFileAccess();
+            uno::Reference< ucb::XSimpleFileAccess3 > xSFI = getFileAccess();
             if( xSFI.is() )
             {
                 if ( nParCount >= 2 )
@@ -2733,7 +2725,7 @@ RTLFUNC(GetAttr)
 
         if( hasUno() )
         {
-            com::sun::star::uno::Reference< XSimpleFileAccess3 > xSFI = getFileAccess();
+            uno::Reference< ucb::XSimpleFileAccess3 > xSFI = getFileAccess();
             if( xSFI.is() )
             {
                 try
@@ -2801,12 +2793,12 @@ RTLFUNC(FileDateTime)
         Date aDate( Date::EMPTY );
         if( hasUno() )
         {
-            com::sun::star::uno::Reference< XSimpleFileAccess3 > xSFI = getFileAccess();
+            uno::Reference< ucb::XSimpleFileAccess3 > xSFI = getFileAccess();
             if( xSFI.is() )
             {
                 try
                 {
-                    com::sun::star::util::DateTime aUnoDT = xSFI->getDateTimeModified( aPath );
+                    util::DateTime aUnoDT = xSFI->getDateTimeModified( aPath );
                     aTime = Time( aUnoDT.Hours, aUnoDT.Minutes, aUnoDT.Seconds, aUnoDT.HundredthSeconds );
                     aDate = Date( aUnoDT.Day, aUnoDT.Month, aUnoDT.Year );
                 }
@@ -3353,21 +3345,21 @@ String getObjectTypeName( SbxVariable* pVar )
                 // we need to get detect the vba-ness of the object in some
                 // other way
                 // note: Automation objects do not support XServiceInfo
-                Reference< XServiceInfo > xServInfo( aObj, UNO_QUERY );
+                uno::Reference< XServiceInfo > xServInfo( aObj, uno::UNO_QUERY );
                 if ( xServInfo.is() )
                 {
                     // is this a VBA object ?
-                    Reference< ooo::vba::XHelperInterface > xVBA( aObj, UNO_QUERY );
+                    uno::Reference< ooo::vba::XHelperInterface > xVBA( aObj, uno::UNO_QUERY );
                     Sequence< rtl::OUString > sServices = xServInfo->getSupportedServiceNames();
                     if ( sServices.getLength() )
                         sRet = sServices[ 0 ];
                 }
                 else
                 {
-                    Reference< com::sun::star::bridge::oleautomation::XAutomationObject > xAutoMation( aObj, UNO_QUERY );
+                    uno::Reference< bridge::oleautomation::XAutomationObject > xAutoMation( aObj, uno::UNO_QUERY );
                     if ( xAutoMation.is() )
                     {
-                        Reference< XInvocation > xInv( aObj, UNO_QUERY );
+                        uno::Reference< script::XInvocation > xInv( aObj, uno::UNO_QUERY );
                         if ( xInv.is() )
                         {
                             try
@@ -3775,26 +3767,26 @@ RTLFUNC(StrConv)
         aOldStr = rCharClass.titlecase( aOldStr.ToLowerAscii(), 0, nOldLen );
     }
     else if ( (nConversion & 0x01) == 1 ) // vbUpperCase
-        nType |= ::com::sun::star::i18n::TransliterationModules_LOWERCASE_UPPERCASE;
+        nType |= i18n::TransliterationModules_LOWERCASE_UPPERCASE;
     else if ( (nConversion & 0x02) == 2 ) // vbLowerCase
-        nType |= ::com::sun::star::i18n::TransliterationModules_UPPERCASE_LOWERCASE;
+        nType |= i18n::TransliterationModules_UPPERCASE_LOWERCASE;
 
     if ( (nConversion & 0x04) == 4 ) // vbWide
-        nType |= ::com::sun::star::i18n::TransliterationModules_HALFWIDTH_FULLWIDTH;
+        nType |= i18n::TransliterationModules_HALFWIDTH_FULLWIDTH;
     else if ( (nConversion & 0x08) == 8 ) // vbNarrow
-        nType |= ::com::sun::star::i18n::TransliterationModules_FULLWIDTH_HALFWIDTH;
+        nType |= i18n::TransliterationModules_FULLWIDTH_HALFWIDTH;
 
     if ( (nConversion & 0x10) == 16) // vbKatakana
-        nType |= ::com::sun::star::i18n::TransliterationModules_HIRAGANA_KATAKANA;
+        nType |= i18n::TransliterationModules_HIRAGANA_KATAKANA;
     else if ( (nConversion & 0x20) == 32 ) // vbHiragana
-        nType |= ::com::sun::star::i18n::TransliterationModules_KATAKANA_HIRAGANA;
+        nType |= i18n::TransliterationModules_KATAKANA_HIRAGANA;
 
     String aNewStr( aOldStr );
     if( nType != 0 )
     {
-        com::sun::star::uno::Reference< XMultiServiceFactory > xSMgr = getProcessServiceFactory();
+        uno::Reference< lang::XMultiServiceFactory > xSMgr = getProcessServiceFactory();
         ::utl::TransliterationWrapper aTransliterationWrapper( xSMgr,nType );
-        com::sun::star::uno::Sequence<sal_Int32> aOffsets;
+        uno::Sequence<sal_Int32> aOffsets;
         aTransliterationWrapper.loadModuleIfNeeded( nLanguage );
         aNewStr = aTransliterationWrapper.transliterate( aOldStr, nLanguage, 0, nOldLen, &aOffsets );
     }
@@ -4118,7 +4110,7 @@ RTLFUNC(SetAttr)
 
         if( hasUno() )
         {
-            com::sun::star::uno::Reference< XSimpleFileAccess3 > xSFI = getFileAccess();
+            uno::Reference< ucb::XSimpleFileAccess3 > xSFI = getFileAccess();
             if( xSFI.is() )
             {
                 try
@@ -4187,7 +4179,7 @@ RTLFUNC(FileExists)
 
         if( hasUno() )
         {
-            com::sun::star::uno::Reference< XSimpleFileAccess3 > xSFI = getFileAccess();
+            uno::Reference< ucb::XSimpleFileAccess3 > xSFI = getFileAccess();
             if( xSFI.is() )
             {
                 try


More information about the Libreoffice-commits mailing list