diff options
Diffstat (limited to 'sc/source/ui/unoobj/styleuno.cxx')
-rw-r--r-- | sc/source/ui/unoobj/styleuno.cxx | 92 |
1 files changed, 19 insertions, 73 deletions
diff --git a/sc/source/ui/unoobj/styleuno.cxx b/sc/source/ui/unoobj/styleuno.cxx index e646e70e5dfd..1b27d6f6e2fb 100644 --- a/sc/source/ui/unoobj/styleuno.cxx +++ b/sc/source/ui/unoobj/styleuno.cxx @@ -457,14 +457,12 @@ ScStyleFamilyObj* ScStyleFamiliesObj::GetObjectByName_Impl(const OUString& aName // container::XIndexAccess -sal_Int32 SAL_CALL ScStyleFamiliesObj::getCount() throw(uno::RuntimeException, std::exception) +sal_Int32 SAL_CALL ScStyleFamiliesObj::getCount() { return SC_STYLE_FAMILY_COUNT; } uno::Any SAL_CALL ScStyleFamiliesObj::getByIndex( sal_Int32 nIndex ) - throw(lang::IndexOutOfBoundsException, - lang::WrappedTargetException, uno::RuntimeException, std::exception) { SolarMutexGuard aGuard; uno::Reference< container::XNameContainer > xFamily(GetObjectByIndex_Impl(nIndex)); @@ -475,13 +473,13 @@ uno::Any SAL_CALL ScStyleFamiliesObj::getByIndex( sal_Int32 nIndex ) // return uno::Any(); } -uno::Type SAL_CALL ScStyleFamiliesObj::getElementType() throw(uno::RuntimeException, std::exception) +uno::Type SAL_CALL ScStyleFamiliesObj::getElementType() { SolarMutexGuard aGuard; return cppu::UnoType<container::XNameContainer>::get(); // muss zu getByIndex passen } -sal_Bool SAL_CALL ScStyleFamiliesObj::hasElements() throw(uno::RuntimeException, std::exception) +sal_Bool SAL_CALL ScStyleFamiliesObj::hasElements() { SolarMutexGuard aGuard; return ( getCount() != 0 ); @@ -490,8 +488,6 @@ sal_Bool SAL_CALL ScStyleFamiliesObj::hasElements() throw(uno::RuntimeException, // container::XNameAccess uno::Any SAL_CALL ScStyleFamiliesObj::getByName( const OUString& aName ) - throw(container::NoSuchElementException, - lang::WrappedTargetException, uno::RuntimeException, std::exception) { SolarMutexGuard aGuard; uno::Reference< container::XNameContainer > xFamily(GetObjectByName_Impl(aName)); @@ -503,13 +499,11 @@ uno::Any SAL_CALL ScStyleFamiliesObj::getByName( const OUString& aName ) } uno::Sequence<OUString> SAL_CALL ScStyleFamiliesObj::getElementNames() - throw(uno::RuntimeException, std::exception) { return {SC_FAMILYNAME_CELL, SC_FAMILYNAME_PAGE}; } sal_Bool SAL_CALL ScStyleFamiliesObj::hasByName( const OUString& aName ) - throw(uno::RuntimeException, std::exception) { return aName == SC_FAMILYNAME_CELL || aName == SC_FAMILYNAME_PAGE; } @@ -518,7 +512,6 @@ sal_Bool SAL_CALL ScStyleFamiliesObj::hasByName( const OUString& aName ) void SAL_CALL ScStyleFamiliesObj::loadStylesFromURL( const OUString& aURL, const uno::Sequence<beans::PropertyValue>& aOptions ) - throw(io::IOException, uno::RuntimeException, std::exception) { //! use aOptions (like Writer) //! set flag to disable filter option dialogs when importing @@ -533,7 +526,6 @@ void SAL_CALL ScStyleFamiliesObj::loadStylesFromURL( const OUString& aURL, } uno::Sequence<beans::PropertyValue> SAL_CALL ScStyleFamiliesObj::getStyleLoaderOptions() - throw(uno::RuntimeException, std::exception) { // return defaults for options (?) @@ -556,7 +548,6 @@ uno::Sequence<beans::PropertyValue> SAL_CALL ScStyleFamiliesObj::getStyleLoaderO void SAL_CALL ScStyleFamiliesObj::loadStylesFromDocument( const uno::Reference < lang::XComponent > & aSourceComponent, const uno::Sequence<beans::PropertyValue>& aOptions ) - throw(io::IOException, uno::RuntimeException, std::exception) { // Source document docShell if ( !aSourceComponent.is() ) @@ -571,7 +562,6 @@ void SAL_CALL ScStyleFamiliesObj::loadStylesFromDocument( const uno::Reference < void ScStyleFamiliesObj::loadStylesFromDocShell( ScDocShell* pSource, const uno::Sequence<beans::PropertyValue>& aOptions ) - throw(io::IOException, uno::RuntimeException, std::exception) { if ( pSource && pDocShell ) @@ -662,8 +652,6 @@ ScStyleObj* ScStyleFamilyObj::GetObjectByName_Impl(const OUString& aName) } void SAL_CALL ScStyleFamilyObj::insertByName( const OUString& aName, const uno::Any& aElement ) - throw(lang::IllegalArgumentException, container::ElementExistException, - lang::WrappedTargetException, uno::RuntimeException, std::exception) { SolarMutexGuard aGuard; bool bDone = false; @@ -709,8 +697,6 @@ void SAL_CALL ScStyleFamilyObj::insertByName( const OUString& aName, const uno:: } void SAL_CALL ScStyleFamilyObj::replaceByName( const OUString& aName, const uno::Any& aElement ) - throw(lang::IllegalArgumentException, container::NoSuchElementException, - lang::WrappedTargetException, uno::RuntimeException, std::exception) { SolarMutexGuard aGuard; //! zusammenfassen? @@ -719,10 +705,6 @@ void SAL_CALL ScStyleFamilyObj::replaceByName( const OUString& aName, const uno: } void SAL_CALL ScStyleFamilyObj::removeByName( const OUString& aName ) - throw(container::NoSuchElementException, - lang::WrappedTargetException, - uno::RuntimeException, - std::exception) { SolarMutexGuard aGuard; bool bFound = false; @@ -777,7 +759,7 @@ void SAL_CALL ScStyleFamilyObj::removeByName( const OUString& aName ) // container::XIndexAccess -sal_Int32 SAL_CALL ScStyleFamilyObj::getCount() throw(uno::RuntimeException, std::exception) +sal_Int32 SAL_CALL ScStyleFamilyObj::getCount() { SolarMutexGuard aGuard; if ( pDocShell ) @@ -792,8 +774,6 @@ sal_Int32 SAL_CALL ScStyleFamilyObj::getCount() throw(uno::RuntimeException, std } uno::Any SAL_CALL ScStyleFamilyObj::getByIndex( sal_Int32 nIndex ) - throw(lang::IndexOutOfBoundsException, - lang::WrappedTargetException, uno::RuntimeException, std::exception) { SolarMutexGuard aGuard; uno::Reference< style::XStyle > xObj(GetObjectByIndex_Impl(nIndex)); @@ -804,13 +784,13 @@ uno::Any SAL_CALL ScStyleFamilyObj::getByIndex( sal_Int32 nIndex ) // return uno::Any(); } -uno::Type SAL_CALL ScStyleFamilyObj::getElementType() throw(uno::RuntimeException, std::exception) +uno::Type SAL_CALL ScStyleFamilyObj::getElementType() { SolarMutexGuard aGuard; return cppu::UnoType<style::XStyle>::get(); // muss zu getByIndex passen } -sal_Bool SAL_CALL ScStyleFamilyObj::hasElements() throw(uno::RuntimeException, std::exception) +sal_Bool SAL_CALL ScStyleFamilyObj::hasElements() { SolarMutexGuard aGuard; return ( getCount() != 0 ); @@ -819,8 +799,6 @@ sal_Bool SAL_CALL ScStyleFamilyObj::hasElements() throw(uno::RuntimeException, s // container::XNameAccess uno::Any SAL_CALL ScStyleFamilyObj::getByName( const OUString& aName ) - throw(container::NoSuchElementException, - lang::WrappedTargetException, uno::RuntimeException, std::exception) { SolarMutexGuard aGuard; uno::Reference< style::XStyle > xObj( @@ -833,7 +811,6 @@ uno::Any SAL_CALL ScStyleFamilyObj::getByName( const OUString& aName ) } uno::Sequence<OUString> SAL_CALL ScStyleFamilyObj::getElementNames() - throw(uno::RuntimeException, std::exception) { SolarMutexGuard aGuard; if ( pDocShell ) @@ -862,7 +839,6 @@ uno::Sequence<OUString> SAL_CALL ScStyleFamilyObj::getElementNames() } sal_Bool SAL_CALL ScStyleFamilyObj::hasByName( const OUString& aName ) - throw(uno::RuntimeException, std::exception) { SolarMutexGuard aGuard; if ( pDocShell ) @@ -879,18 +855,18 @@ sal_Bool SAL_CALL ScStyleFamilyObj::hasByName( const OUString& aName ) // XPropertySet -uno::Reference< beans::XPropertySetInfo > SAL_CALL ScStyleFamilyObj::getPropertySetInfo( ) throw (uno::RuntimeException, std::exception) +uno::Reference< beans::XPropertySetInfo > SAL_CALL ScStyleFamilyObj::getPropertySetInfo( ) { OSL_FAIL( "###unexpected!" ); return uno::Reference< beans::XPropertySetInfo >(); } -void SAL_CALL ScStyleFamilyObj::setPropertyValue( const OUString&, const uno::Any& ) throw (beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException, std::exception) +void SAL_CALL ScStyleFamilyObj::setPropertyValue( const OUString&, const uno::Any& ) { OSL_FAIL( "###unexpected!" ); } -uno::Any SAL_CALL ScStyleFamilyObj::getPropertyValue( const OUString& sPropertyName ) throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException, std::exception) +uno::Any SAL_CALL ScStyleFamilyObj::getPropertyValue( const OUString& sPropertyName ) { uno::Any aRet; @@ -921,22 +897,22 @@ uno::Any SAL_CALL ScStyleFamilyObj::getPropertyValue( const OUString& sPropertyN return aRet; } -void SAL_CALL ScStyleFamilyObj::addPropertyChangeListener( const OUString&, const uno::Reference< beans::XPropertyChangeListener >& ) throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException, std::exception) +void SAL_CALL ScStyleFamilyObj::addPropertyChangeListener( const OUString&, const uno::Reference< beans::XPropertyChangeListener >& ) { OSL_FAIL( "###unexpected!" ); } -void SAL_CALL ScStyleFamilyObj::removePropertyChangeListener( const OUString&, const uno::Reference< beans::XPropertyChangeListener >& ) throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException, std::exception) +void SAL_CALL ScStyleFamilyObj::removePropertyChangeListener( const OUString&, const uno::Reference< beans::XPropertyChangeListener >& ) { OSL_FAIL( "###unexpected!" ); } -void SAL_CALL ScStyleFamilyObj::addVetoableChangeListener( const OUString&, const uno::Reference< beans::XVetoableChangeListener >& ) throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException, std::exception) +void SAL_CALL ScStyleFamilyObj::addVetoableChangeListener( const OUString&, const uno::Reference< beans::XVetoableChangeListener >& ) { OSL_FAIL( "###unexpected!" ); } -void SAL_CALL ScStyleFamilyObj::removeVetoableChangeListener( const OUString&, const uno::Reference< beans::XVetoableChangeListener >& ) throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException, std::exception) +void SAL_CALL ScStyleFamilyObj::removeVetoableChangeListener( const OUString&, const uno::Reference< beans::XVetoableChangeListener >& ) { OSL_FAIL( "###unexpected!" ); } @@ -977,7 +953,7 @@ ScStyleObj::~ScStyleObj() // XUnoTunnel sal_Int64 SAL_CALL ScStyleObj::getSomething( - const uno::Sequence<sal_Int8 >& rId ) throw(uno::RuntimeException, std::exception) + const uno::Sequence<sal_Int8 >& rId ) { if ( rId.getLength() == 16 && 0 == memcmp( getUnoTunnelId().getConstArray(), @@ -1034,7 +1010,7 @@ SfxStyleSheetBase* ScStyleObj::GetStyle_Impl( bool bUseCachedValue ) // style::XStyle -sal_Bool SAL_CALL ScStyleObj::isUserDefined() throw(uno::RuntimeException, std::exception) +sal_Bool SAL_CALL ScStyleObj::isUserDefined() { SolarMutexGuard aGuard; SfxStyleSheetBase* pStyle = GetStyle_Impl(); @@ -1043,7 +1019,7 @@ sal_Bool SAL_CALL ScStyleObj::isUserDefined() throw(uno::RuntimeException, std:: return false; } -sal_Bool SAL_CALL ScStyleObj::isInUse() throw(uno::RuntimeException, std::exception) +sal_Bool SAL_CALL ScStyleObj::isInUse() { SolarMutexGuard aGuard; SfxStyleSheetBase* pStyle = GetStyle_Impl(); @@ -1052,7 +1028,7 @@ sal_Bool SAL_CALL ScStyleObj::isInUse() throw(uno::RuntimeException, std::except return false; } -OUString SAL_CALL ScStyleObj::getParentStyle() throw(uno::RuntimeException, std::exception) +OUString SAL_CALL ScStyleObj::getParentStyle() { SolarMutexGuard aGuard; SfxStyleSheetBase* pStyle = GetStyle_Impl(); @@ -1062,9 +1038,6 @@ OUString SAL_CALL ScStyleObj::getParentStyle() throw(uno::RuntimeException, std: } void SAL_CALL ScStyleObj::setParentStyle( const OUString& rParentStyle ) - throw(container::NoSuchElementException, - uno::RuntimeException, - std::exception) { SolarMutexGuard aGuard; SfxStyleSheetBase* pStyle = GetStyle_Impl(); @@ -1113,7 +1086,7 @@ void SAL_CALL ScStyleObj::setParentStyle( const OUString& rParentStyle ) // container::XNamed -OUString SAL_CALL ScStyleObj::getName() throw(uno::RuntimeException, std::exception) +OUString SAL_CALL ScStyleObj::getName() { SolarMutexGuard aGuard; SfxStyleSheetBase* pStyle = GetStyle_Impl(); @@ -1123,7 +1096,6 @@ OUString SAL_CALL ScStyleObj::getName() throw(uno::RuntimeException, std::except } void SAL_CALL ScStyleObj::setName( const OUString& aNewName ) - throw(uno::RuntimeException, std::exception) { SolarMutexGuard aGuard; SfxStyleSheetBase* pStyle = GetStyle_Impl(); @@ -1201,7 +1173,6 @@ const SfxItemSet* ScStyleObj::GetStyleItemSet_Impl( const OUString& rPropName, } beans::PropertyState ScStyleObj::getPropertyState_Impl( const OUString& aPropertyName ) - throw(beans::UnknownPropertyException, uno::RuntimeException, std::exception) { beans::PropertyState eRet = beans::PropertyState_DIRECT_VALUE; @@ -1240,7 +1211,6 @@ beans::PropertyState ScStyleObj::getPropertyState_Impl( const OUString& aPropert } beans::PropertyState SAL_CALL ScStyleObj::getPropertyState( const OUString& aPropertyName ) - throw(beans::UnknownPropertyException, uno::RuntimeException, std::exception) { SolarMutexGuard aGuard; GetStyle_Impl(); @@ -1249,7 +1219,6 @@ beans::PropertyState SAL_CALL ScStyleObj::getPropertyState( const OUString& aPro } uno::Sequence<beans::PropertyState> SAL_CALL ScStyleObj::getPropertyStates( const uno::Sequence<OUString>& aPropertyNames ) - throw(beans::UnknownPropertyException, uno::RuntimeException, std::exception) { SolarMutexGuard aGuard; GetStyle_Impl(); @@ -1263,8 +1232,6 @@ uno::Sequence<beans::PropertyState> SAL_CALL ScStyleObj::getPropertyStates( cons } void SAL_CALL ScStyleObj::setPropertyToDefault( const OUString& aPropertyName ) - throw(beans::UnknownPropertyException, uno::RuntimeException, - std::exception) { SolarMutexGuard aGuard; GetStyle_Impl(); @@ -1277,7 +1244,6 @@ void SAL_CALL ScStyleObj::setPropertyToDefault( const OUString& aPropertyName ) } uno::Any ScStyleObj::getPropertyDefault_Impl( const OUString& aPropertyName ) - throw(beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException, std::exception) { uno::Any aAny; @@ -1364,7 +1330,6 @@ uno::Any ScStyleObj::getPropertyDefault_Impl( const OUString& aPropertyName ) } uno::Any SAL_CALL ScStyleObj::getPropertyDefault( const OUString& aPropertyName ) - throw(beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException, std::exception) { SolarMutexGuard aGuard; GetStyle_Impl(); @@ -1373,7 +1338,6 @@ uno::Any SAL_CALL ScStyleObj::getPropertyDefault( const OUString& aPropertyName } uno::Sequence<uno::Any> SAL_CALL ScStyleObj::getPropertyDefaults( const uno::Sequence<OUString>& aPropertyNames ) - throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException, std::exception) { SolarMutexGuard aGuard; GetStyle_Impl(); @@ -1389,9 +1353,6 @@ uno::Sequence<uno::Any> SAL_CALL ScStyleObj::getPropertyDefaults( const uno::Seq void SAL_CALL ScStyleObj::setPropertyValues( const uno::Sequence< OUString >& aPropertyNames, const uno::Sequence< uno::Any >& aValues ) -throw (beans::PropertyVetoException, lang::IllegalArgumentException, - lang::WrappedTargetException, uno::RuntimeException, - std::exception) { SolarMutexGuard aGuard; GetStyle_Impl(); @@ -1410,7 +1371,6 @@ throw (beans::PropertyVetoException, lang::IllegalArgumentException, } uno::Sequence<uno::Any> SAL_CALL ScStyleObj::getPropertyValues( const uno::Sequence< OUString >& aPropertyNames ) - throw (uno::RuntimeException, std::exception) { SolarMutexGuard aGuard; GetStyle_Impl(); @@ -1424,21 +1384,18 @@ uno::Sequence<uno::Any> SAL_CALL ScStyleObj::getPropertyValues( const uno::Seque void SAL_CALL ScStyleObj::addPropertiesChangeListener( const uno::Sequence<OUString>& /* aPropertyNames */, const uno::Reference<beans::XPropertiesChangeListener>& /* xListener */ ) - throw (uno::RuntimeException, std::exception) { // no bound properties } void SAL_CALL ScStyleObj::removePropertiesChangeListener( const uno::Reference<beans::XPropertiesChangeListener>& /* xListener */ ) - throw (uno::RuntimeException, std::exception) { // no bound properties } void SAL_CALL ScStyleObj::firePropertiesChangeEvent( const uno::Sequence<OUString>& /* aPropertyNames */, const uno::Reference<beans::XPropertiesChangeListener>& /* xListener */ ) - throw (uno::RuntimeException, std::exception) { // no bound properties } @@ -1447,7 +1404,6 @@ void SAL_CALL ScStyleObj::firePropertiesChangeEvent( const uno::Sequence<OUStrin // getPropertyStates already defined for XPropertyState void SAL_CALL ScStyleObj::setAllPropertiesToDefault() - throw (uno::RuntimeException, std::exception) { SolarMutexGuard aGuard; @@ -1497,7 +1453,6 @@ void SAL_CALL ScStyleObj::setAllPropertiesToDefault() } void SAL_CALL ScStyleObj::setPropertiesToDefault( const uno::Sequence<OUString>& aPropertyNames ) - throw (beans::UnknownPropertyException, uno::RuntimeException, std::exception) { SolarMutexGuard aGuard; GetStyle_Impl(); @@ -1514,16 +1469,12 @@ void SAL_CALL ScStyleObj::setPropertiesToDefault( const uno::Sequence<OUString>& // beans::XPropertySet uno::Reference<beans::XPropertySetInfo> SAL_CALL ScStyleObj::getPropertySetInfo() - throw(uno::RuntimeException, std::exception) { SolarMutexGuard aGuard; return pPropSet->getPropertySetInfo(); } void SAL_CALL ScStyleObj::setPropertyValue( const OUString& aPropertyName, const uno::Any& aValue ) - throw(beans::UnknownPropertyException, beans::PropertyVetoException, - lang::IllegalArgumentException, lang::WrappedTargetException, - uno::RuntimeException, std::exception) { SolarMutexGuard aGuard; GetStyle_Impl(); @@ -1536,7 +1487,6 @@ void SAL_CALL ScStyleObj::setPropertyValue( const OUString& aPropertyName, const } void ScStyleObj::setPropertyValue_Impl( const OUString& rPropertyName, const SfxItemPropertySimpleEntry* pEntry, const uno::Any* pValue ) - throw(lang::IllegalArgumentException, uno::RuntimeException, std::exception) { SfxStyleSheetBase* pStyle = GetStyle_Impl( true ); if ( pStyle && pEntry ) @@ -1844,7 +1794,6 @@ void ScStyleObj::setPropertyValue_Impl( const OUString& rPropertyName, const Sfx } uno::Any ScStyleObj::getPropertyValue_Impl( const OUString& aPropertyName ) - throw(beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException, std::exception) { uno::Any aAny; SfxStyleSheetBase* pStyle = GetStyle_Impl( true ); @@ -1976,7 +1925,6 @@ uno::Any ScStyleObj::getPropertyValue_Impl( const OUString& aPropertyName ) } uno::Any SAL_CALL ScStyleObj::getPropertyValue( const OUString& aPropertyName ) - throw(beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException, std::exception) { SolarMutexGuard aGuard; GetStyle_Impl(); @@ -1988,19 +1936,17 @@ SC_IMPL_DUMMY_PROPERTY_LISTENER( ScStyleObj ) // lang::XServiceInfo -OUString SAL_CALL ScStyleObj::getImplementationName() throw(uno::RuntimeException, std::exception) +OUString SAL_CALL ScStyleObj::getImplementationName() { return OUString("ScStyleObj" ); } sal_Bool SAL_CALL ScStyleObj::supportsService( const OUString& rServiceName ) - throw(uno::RuntimeException, std::exception) { return cppu::supportsService(this, rServiceName); } uno::Sequence<OUString> SAL_CALL ScStyleObj::getSupportedServiceNames() - throw(uno::RuntimeException, std::exception) { const bool bPage = ( eFamily == SfxStyleFamily::Page ); |