summaryrefslogtreecommitdiff
path: root/basic/source/basmgr/basmgr.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'basic/source/basmgr/basmgr.cxx')
-rw-r--r--basic/source/basmgr/basmgr.cxx152
1 files changed, 43 insertions, 109 deletions
diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx
index 21ffb5b90a2f..56cf96adebb6 100644
--- a/basic/source/basmgr/basmgr.cxx
+++ b/basic/source/basmgr/basmgr.cxx
@@ -135,16 +135,12 @@ public:
// XEventListener
- virtual void SAL_CALL disposing( const lang::EventObject& Source )
- throw(uno::RuntimeException, std::exception) override;
+ virtual void SAL_CALL disposing( const lang::EventObject& Source ) override;
// XContainerListener
- virtual void SAL_CALL elementInserted( const container::ContainerEvent& Event )
- throw(uno::RuntimeException, std::exception) override;
- virtual void SAL_CALL elementReplaced( const container::ContainerEvent& Event )
- throw(uno::RuntimeException, std::exception) override;
- virtual void SAL_CALL elementRemoved( const container::ContainerEvent& Event )
- throw(uno::RuntimeException, std::exception) override;
+ virtual void SAL_CALL elementInserted( const container::ContainerEvent& Event ) override;
+ virtual void SAL_CALL elementReplaced( const container::ContainerEvent& Event ) override;
+ virtual void SAL_CALL elementRemoved( const container::ContainerEvent& Event ) override;
};
@@ -216,7 +212,6 @@ void BasMgrContainerListenerImpl::addLibraryModulesImpl( BasicManager* pMgr,
void SAL_CALL BasMgrContainerListenerImpl::disposing( const lang::EventObject& Source )
- throw( uno::RuntimeException, std::exception )
{
(void)Source;
}
@@ -225,7 +220,6 @@ void SAL_CALL BasMgrContainerListenerImpl::disposing( const lang::EventObject& S
void SAL_CALL BasMgrContainerListenerImpl::elementInserted( const container::ContainerEvent& Event )
- throw( uno::RuntimeException, std::exception )
{
bool bLibContainer = maLibName.isEmpty();
OUString aName;
@@ -272,7 +266,6 @@ void SAL_CALL BasMgrContainerListenerImpl::elementInserted( const container::Con
void SAL_CALL BasMgrContainerListenerImpl::elementReplaced( const container::ContainerEvent& Event )
- throw( uno::RuntimeException, std::exception )
{
OUString aName;
Event.Accessor >>= aName;
@@ -298,7 +291,6 @@ void SAL_CALL BasMgrContainerListenerImpl::elementReplaced( const container::Con
void SAL_CALL BasMgrContainerListenerImpl::elementRemoved( const container::ContainerEvent& Event )
- throw( uno::RuntimeException, std::exception )
{
OUString aName;
Event.Accessor >>= aName;
@@ -1629,11 +1621,11 @@ public:
: maName( aName ), maLanguage( aLanguage), maSource( aSource ) {}
// Methods XStarBasicModuleInfo
- virtual OUString SAL_CALL getName() throw(uno::RuntimeException, std::exception) override
+ virtual OUString SAL_CALL getName() override
{ return maName; }
- virtual OUString SAL_CALL getLanguage() throw(uno::RuntimeException, std::exception) override
+ virtual OUString SAL_CALL getLanguage() override
{ return maLanguage; }
- virtual OUString SAL_CALL getSource() throw(uno::RuntimeException, std::exception) override
+ virtual OUString SAL_CALL getSource() override
{ return maSource; }
};
@@ -1648,9 +1640,9 @@ public:
: maName( aName ), mData( Data ) {}
// Methods XStarBasicDialogInfo
- virtual OUString SAL_CALL getName() throw(uno::RuntimeException, std::exception) override
+ virtual OUString SAL_CALL getName() override
{ return maName; }
- virtual uno::Sequence< sal_Int8 > SAL_CALL getData() throw(uno::RuntimeException, std::exception) override
+ virtual uno::Sequence< sal_Int8 > SAL_CALL getData() override
{ return mData; }
};
@@ -1683,17 +1675,17 @@ public:
{}
// Methods XStarBasicLibraryInfo
- virtual OUString SAL_CALL getName() throw(uno::RuntimeException, std::exception) override
+ virtual OUString SAL_CALL getName() override
{ return maName; }
- virtual uno::Reference< container::XNameContainer > SAL_CALL getModuleContainer() throw(uno::RuntimeException, std::exception) override
+ virtual uno::Reference< container::XNameContainer > SAL_CALL getModuleContainer() override
{ return mxModuleContainer; }
- virtual uno::Reference< container::XNameContainer > SAL_CALL getDialogContainer() throw(uno::RuntimeException, std::exception) override
+ virtual uno::Reference< container::XNameContainer > SAL_CALL getDialogContainer() override
{ return mxDialogContainer; }
- virtual OUString SAL_CALL getPassword() throw(uno::RuntimeException, std::exception) override
+ virtual OUString SAL_CALL getPassword() override
{ return maPassword; }
- virtual OUString SAL_CALL getExternalSourceURL() throw(uno::RuntimeException, std::exception) override
+ virtual OUString SAL_CALL getExternalSourceURL() override
{ return maExternaleSourceURL; }
- virtual OUString SAL_CALL getLinkTargetURL() throw(uno::RuntimeException, std::exception) override
+ virtual OUString SAL_CALL getLinkTargetURL() override
{ return maLinkTargetURL; }
};
@@ -1707,49 +1699,36 @@ public:
:mpLib( pLib ) {}
// Methods XElementAccess
- virtual uno::Type SAL_CALL getElementType()
- throw(uno::RuntimeException, std::exception) override;
- virtual sal_Bool SAL_CALL hasElements()
- throw(uno::RuntimeException, std::exception) override;
+ virtual uno::Type SAL_CALL getElementType() override;
+ virtual sal_Bool SAL_CALL hasElements() override;
// Methods XNameAccess
- virtual uno::Any SAL_CALL getByName( const OUString& aName )
- throw(container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException, std::exception) override;
- virtual uno::Sequence< OUString > SAL_CALL getElementNames()
- throw(uno::RuntimeException, std::exception) override;
- virtual sal_Bool SAL_CALL hasByName( const OUString& aName )
- throw(uno::RuntimeException, std::exception) override;
+ virtual uno::Any SAL_CALL getByName( const OUString& aName ) override;
+ virtual uno::Sequence< OUString > SAL_CALL getElementNames() override;
+ virtual sal_Bool SAL_CALL hasByName( const OUString& aName ) override;
// Methods XNameReplace
- virtual void SAL_CALL replaceByName( const OUString& aName, const uno::Any& aElement )
- throw(lang::IllegalArgumentException, container::NoSuchElementException,
- lang::WrappedTargetException, uno::RuntimeException, std::exception) override;
+ virtual void SAL_CALL replaceByName( const OUString& aName, const uno::Any& aElement ) override;
// Methods XNameContainer
- virtual void SAL_CALL insertByName( const OUString& aName, const uno::Any& aElement )
- throw(lang::IllegalArgumentException, container::ElementExistException,
- lang::WrappedTargetException, uno::RuntimeException, std::exception) override;
- virtual void SAL_CALL removeByName( const OUString& Name )
- throw(container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException, std::exception) override;
+ virtual void SAL_CALL insertByName( const OUString& aName, const uno::Any& aElement ) override;
+ virtual void SAL_CALL removeByName( const OUString& Name ) override;
};
// Methods XElementAccess
uno::Type ModuleContainer_Impl::getElementType()
- throw(uno::RuntimeException, std::exception)
{
uno::Type aModuleType = cppu::UnoType<script::XStarBasicModuleInfo>::get();
return aModuleType;
}
sal_Bool ModuleContainer_Impl::hasElements()
- throw(uno::RuntimeException, std::exception)
{
return mpLib && !mpLib->GetModules().empty();
}
// Methods XNameAccess
uno::Any ModuleContainer_Impl::getByName( const OUString& aName )
- throw(container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException, std::exception)
{
SbModule* pMod = mpLib ? mpLib->FindModule( aName ) : nullptr;
if( !pMod )
@@ -1761,7 +1740,6 @@ uno::Any ModuleContainer_Impl::getByName( const OUString& aName )
}
uno::Sequence< OUString > ModuleContainer_Impl::getElementNames()
- throw(uno::RuntimeException, std::exception)
{
sal_uInt16 nMods = mpLib ? mpLib->GetModules().size() : 0;
uno::Sequence< OUString > aRetSeq( nMods );
@@ -1774,7 +1752,6 @@ uno::Sequence< OUString > ModuleContainer_Impl::getElementNames()
}
sal_Bool ModuleContainer_Impl::hasByName( const OUString& aName )
- throw(uno::RuntimeException, std::exception)
{
SbModule* pMod = mpLib ? mpLib->FindModule( aName ) : nullptr;
bool bRet = (pMod != nullptr);
@@ -1784,7 +1761,6 @@ sal_Bool ModuleContainer_Impl::hasByName( const OUString& aName )
// Methods XNameReplace
void ModuleContainer_Impl::replaceByName( const OUString& aName, const uno::Any& aElement )
- throw(lang::IllegalArgumentException, container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException, std::exception)
{
removeByName( aName );
insertByName( aName, aElement );
@@ -1793,7 +1769,6 @@ void ModuleContainer_Impl::replaceByName( const OUString& aName, const uno::Any&
// Methods XNameContainer
void ModuleContainer_Impl::insertByName( const OUString& aName, const uno::Any& aElement )
- throw(lang::IllegalArgumentException, container::ElementExistException, lang::WrappedTargetException, uno::RuntimeException, std::exception)
{
uno::Type aModuleType = cppu::UnoType<script::XStarBasicModuleInfo>::get();
const uno::Type& aAnyType = aElement.getValueType();
@@ -1807,7 +1782,6 @@ void ModuleContainer_Impl::insertByName( const OUString& aName, const uno::Any&
}
void ModuleContainer_Impl::removeByName( const OUString& Name )
- throw(container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException, std::exception)
{
SbModule* pMod = mpLib ? mpLib->FindModule( Name ) : nullptr;
if( !pMod )
@@ -1853,40 +1827,30 @@ public:
:mpLib( pLib ) {}
// Methods XElementAccess
- virtual uno::Type SAL_CALL getElementType()
- throw(uno::RuntimeException, std::exception) override;
- virtual sal_Bool SAL_CALL hasElements()
- throw(uno::RuntimeException, std::exception) override;
+ virtual uno::Type SAL_CALL getElementType() override;
+ virtual sal_Bool SAL_CALL hasElements() override;
// Methods XNameAccess
- virtual uno::Any SAL_CALL getByName( const OUString& aName )
- throw(container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException, std::exception) override;
- virtual uno::Sequence< OUString > SAL_CALL getElementNames()
- throw(uno::RuntimeException, std::exception) override;
- virtual sal_Bool SAL_CALL hasByName( const OUString& aName )
- throw(uno::RuntimeException, std::exception) override;
+ virtual uno::Any SAL_CALL getByName( const OUString& aName ) override;
+ virtual uno::Sequence< OUString > SAL_CALL getElementNames() override;
+ virtual sal_Bool SAL_CALL hasByName( const OUString& aName ) override;
// Methods XNameReplace
- virtual void SAL_CALL replaceByName( const OUString& aName, const uno::Any& aElement )
- throw(lang::IllegalArgumentException, container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException, std::exception) override;
+ virtual void SAL_CALL replaceByName( const OUString& aName, const uno::Any& aElement ) override;
// Methods XNameContainer
- virtual void SAL_CALL insertByName( const OUString& aName, const uno::Any& aElement )
- throw(lang::IllegalArgumentException, container::ElementExistException, lang::WrappedTargetException, uno::RuntimeException, std::exception) override;
- virtual void SAL_CALL removeByName( const OUString& Name )
- throw(container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException, std::exception) override;
+ virtual void SAL_CALL insertByName( const OUString& aName, const uno::Any& aElement ) override;
+ virtual void SAL_CALL removeByName( const OUString& Name ) override;
};
// Methods XElementAccess
uno::Type DialogContainer_Impl::getElementType()
- throw(uno::RuntimeException, std::exception)
{
uno::Type aModuleType = cppu::UnoType<script::XStarBasicDialogInfo>::get();
return aModuleType;
}
sal_Bool DialogContainer_Impl::hasElements()
- throw(uno::RuntimeException, std::exception)
{
bool bRet = false;
@@ -1906,7 +1870,6 @@ sal_Bool DialogContainer_Impl::hasElements()
// Methods XNameAccess
uno::Any DialogContainer_Impl::getByName( const OUString& aName )
- throw(container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException, std::exception)
{
SbxVariable* pVar = mpLib->GetObjects()->Find( aName, SbxClassType::DontCare );
SbxObject* pObj = dynamic_cast<SbxObject*>(pVar);
@@ -1924,7 +1887,6 @@ uno::Any DialogContainer_Impl::getByName( const OUString& aName )
}
uno::Sequence< OUString > DialogContainer_Impl::getElementNames()
- throw(uno::RuntimeException, std::exception)
{
sal_Int16 nCount = mpLib->GetObjects()->Count();
uno::Sequence< OUString > aRetSeq( nCount );
@@ -1946,7 +1908,6 @@ uno::Sequence< OUString > DialogContainer_Impl::getElementNames()
}
sal_Bool DialogContainer_Impl::hasByName( const OUString& aName )
- throw(uno::RuntimeException, std::exception)
{
bool bRet = false;
SbxVariable* pVar = mpLib->GetObjects()->Find( aName, SbxClassType::DontCare );
@@ -1961,7 +1922,6 @@ sal_Bool DialogContainer_Impl::hasByName( const OUString& aName )
// Methods XNameReplace
void DialogContainer_Impl::replaceByName( const OUString& aName, const uno::Any& aElement )
- throw(lang::IllegalArgumentException, container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException, std::exception)
{
removeByName( aName );
insertByName( aName, aElement );
@@ -1970,7 +1930,6 @@ void DialogContainer_Impl::replaceByName( const OUString& aName, const uno::Any&
// Methods XNameContainer
void DialogContainer_Impl::insertByName( const OUString& aName, const uno::Any& aElement )
- throw(lang::IllegalArgumentException, container::ElementExistException, lang::WrappedTargetException, uno::RuntimeException, std::exception)
{
(void)aName;
uno::Type aModuleType = cppu::UnoType<script::XStarBasicDialogInfo>::get();
@@ -1986,7 +1945,6 @@ void DialogContainer_Impl::insertByName( const OUString& aName, const uno::Any&
}
void DialogContainer_Impl::removeByName( const OUString& Name )
- throw(container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException, std::exception)
{
(void)Name;
SbxVariable* pVar = mpLib->GetObjects()->Find( Name, SbxClassType::DontCare );
@@ -2008,41 +1966,31 @@ public:
:mpMgr( pMgr ) {}
// Methods XElementAccess
- virtual uno::Type SAL_CALL getElementType()
- throw(uno::RuntimeException, std::exception) override;
- virtual sal_Bool SAL_CALL hasElements()
- throw(uno::RuntimeException, std::exception) override;
+ virtual uno::Type SAL_CALL getElementType() override;
+ virtual sal_Bool SAL_CALL hasElements() override;
// Methods XNameAccess
- virtual uno::Any SAL_CALL getByName( const OUString& aName )
- throw(container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException, std::exception) override;
- virtual uno::Sequence< OUString > SAL_CALL getElementNames()
- throw(uno::RuntimeException, std::exception) override;
- virtual sal_Bool SAL_CALL hasByName( const OUString& aName )
- throw(uno::RuntimeException, std::exception) override;
+ virtual uno::Any SAL_CALL getByName( const OUString& aName ) override;
+ virtual uno::Sequence< OUString > SAL_CALL getElementNames() override;
+ virtual sal_Bool SAL_CALL hasByName( const OUString& aName ) override;
// Methods XNameReplace
- virtual void SAL_CALL replaceByName( const OUString& aName, const uno::Any& aElement )
- throw(lang::IllegalArgumentException, container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException, std::exception) override;
+ virtual void SAL_CALL replaceByName( const OUString& aName, const uno::Any& aElement ) override;
// Methods XNameContainer
- virtual void SAL_CALL insertByName( const OUString& aName, const uno::Any& aElement )
- throw(lang::IllegalArgumentException, container::ElementExistException, lang::WrappedTargetException, uno::RuntimeException, std::exception) override;
- virtual void SAL_CALL removeByName( const OUString& Name )
- throw(container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException, std::exception) override;
+ virtual void SAL_CALL insertByName( const OUString& aName, const uno::Any& aElement ) override;
+ virtual void SAL_CALL removeByName( const OUString& Name ) override;
};
// Methods XElementAccess
uno::Type LibraryContainer_Impl::getElementType()
- throw(uno::RuntimeException, std::exception)
{
uno::Type aType = cppu::UnoType<script::XStarBasicLibraryInfo>::get();
return aType;
}
sal_Bool LibraryContainer_Impl::hasElements()
- throw(uno::RuntimeException, std::exception)
{
sal_Int32 nLibs = mpMgr->GetLibCount();
bool bRet = (nLibs > 0);
@@ -2051,7 +1999,6 @@ sal_Bool LibraryContainer_Impl::hasElements()
// Methods XNameAccess
uno::Any LibraryContainer_Impl::getByName( const OUString& aName )
- throw(container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException, std::exception)
{
uno::Any aRetAny;
if( !mpMgr->HasLib( aName ) )
@@ -2094,7 +2041,6 @@ uno::Any LibraryContainer_Impl::getByName( const OUString& aName )
}
uno::Sequence< OUString > LibraryContainer_Impl::getElementNames()
- throw(uno::RuntimeException, std::exception)
{
sal_uInt16 nLibs = mpMgr->GetLibCount();
uno::Sequence< OUString > aRetSeq( nLibs );
@@ -2107,7 +2053,6 @@ uno::Sequence< OUString > LibraryContainer_Impl::getElementNames()
}
sal_Bool LibraryContainer_Impl::hasByName( const OUString& aName )
- throw(uno::RuntimeException, std::exception)
{
bool bRet = mpMgr->HasLib( aName );
return bRet;
@@ -2115,7 +2060,6 @@ sal_Bool LibraryContainer_Impl::hasByName( const OUString& aName )
// Methods XNameReplace
void LibraryContainer_Impl::replaceByName( const OUString& aName, const uno::Any& aElement )
- throw(lang::IllegalArgumentException, container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException, std::exception)
{
removeByName( aName );
insertByName( aName, aElement );
@@ -2123,7 +2067,6 @@ void LibraryContainer_Impl::replaceByName( const OUString& aName, const uno::Any
// Methods XNameContainer
void LibraryContainer_Impl::insertByName( const OUString& aName, const uno::Any& aElement )
- throw(lang::IllegalArgumentException, container::ElementExistException, lang::WrappedTargetException, uno::RuntimeException, std::exception)
{
(void)aName;
(void)aElement;
@@ -2131,7 +2074,6 @@ void LibraryContainer_Impl::insertByName( const OUString& aName, const uno::Any&
}
void LibraryContainer_Impl::removeByName( const OUString& Name )
- throw(container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException, std::exception)
{
StarBASIC* pLib = mpMgr->GetLib( Name );
if( !pLib )
@@ -2157,21 +2099,16 @@ public:
public:
// Methods
- virtual uno::Reference< container::XNameContainer > SAL_CALL getLibraryContainer()
- throw(uno::RuntimeException, std::exception) override;
+ virtual uno::Reference< container::XNameContainer > SAL_CALL getLibraryContainer() override;
virtual void SAL_CALL createLibrary( const OUString& LibName, const OUString& Password,
- const OUString& ExternalSourceURL, const OUString& LinkTargetURL )
- throw(container::ElementExistException, uno::RuntimeException, std::exception) override;
+ const OUString& ExternalSourceURL, const OUString& LinkTargetURL ) override;
virtual void SAL_CALL addModule( const OUString& LibraryName, const OUString& ModuleName,
- const OUString& Language, const OUString& Source )
- throw(container::NoSuchElementException, uno::RuntimeException, std::exception) override;
+ const OUString& Language, const OUString& Source ) override;
virtual void SAL_CALL addDialog( const OUString& LibraryName, const OUString& DialogName,
- const uno::Sequence< sal_Int8 >& Data )
- throw(container::NoSuchElementException, uno::RuntimeException, std::exception) override;
+ const uno::Sequence< sal_Int8 >& Data ) override;
};
uno::Reference< container::XNameContainer > SAL_CALL StarBasicAccess_Impl::getLibraryContainer()
- throw(uno::RuntimeException, std::exception)
{
if( !mxLibContainer.is() )
mxLibContainer = new LibraryContainer_Impl( mpMgr );
@@ -2185,7 +2122,6 @@ void SAL_CALL StarBasicAccess_Impl::createLibrary
const OUString& ExternalSourceURL,
const OUString& LinkTargetURL
)
- throw(container::ElementExistException, uno::RuntimeException, std::exception)
{
(void)ExternalSourceURL;
StarBASIC* pLib = mpMgr->CreateLib( LibName, Password, LinkTargetURL );
@@ -2199,7 +2135,6 @@ void SAL_CALL StarBasicAccess_Impl::addModule
const OUString& Language,
const OUString& Source
)
- throw(container::NoSuchElementException, uno::RuntimeException, std::exception)
{
(void)Language;
StarBASIC* pLib = mpMgr->GetLib( LibraryName );
@@ -2216,7 +2151,6 @@ void SAL_CALL StarBasicAccess_Impl::addDialog
const OUString& DialogName,
const uno::Sequence< sal_Int8 >& Data
)
- throw(container::NoSuchElementException, uno::RuntimeException, std::exception)
{
(void)LibraryName;
(void)DialogName;