summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2013-03-22 14:24:13 +0100
committerMichael Stahl <mstahl@redhat.com>2013-03-22 15:25:23 +0100
commit3605407693c83e5e5e0af6f7ec4a3863bc7178b0 (patch)
treed41873296862797baba2b70bc877fa5cefe9de95 /sd
parentcc85e44cfa7ce7ae49944535418c5735c560f0ad (diff)
sd::DocumentSettings: throwing UnknownPropertyException ...
... for properties that are in the PropertySetInfo just because there's no document or shell is just plain wrong. Change-Id: I84f4f930f492753b20ba04ec4d41c905d674b9ba
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/unoidl/UnoDocumentSettings.cxx25
1 files changed, 19 insertions, 6 deletions
diff --git a/sd/source/ui/unoidl/UnoDocumentSettings.cxx b/sd/source/ui/unoidl/UnoDocumentSettings.cxx
index e9d6f65d95c9..2711af2e34fe 100644
--- a/sd/source/ui/unoidl/UnoDocumentSettings.cxx
+++ b/sd/source/ui/unoidl/UnoDocumentSettings.cxx
@@ -111,8 +111,8 @@ namespace sd
const uno::Sequence<beans::PropertyValue>& aConfigProps );
protected:
- virtual void _setPropertyValues( const comphelper::PropertyMapEntry** ppEntries, const ::com::sun::star::uno::Any* pValues ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException );
- virtual void _getPropertyValues( const comphelper::PropertyMapEntry** ppEntries, ::com::sun::star::uno::Any* pValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException );
+ virtual void _setPropertyValues( const comphelper::PropertyMapEntry** ppEntries, const ::com::sun::star::uno::Any* pValues ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, RuntimeException );
+ virtual void _getPropertyValues( const comphelper::PropertyMapEntry** ppEntries, ::com::sun::star::uno::Any* pValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, RuntimeException );
private:
bool LoadList( XPropertyListType t, const rtl::OUString &rPath,
@@ -388,14 +388,21 @@ uno::Sequence<beans::PropertyValue>
return aRet;
}
-void DocumentSettings::_setPropertyValues( const PropertyMapEntry** ppEntries, const Any* pValues ) throw(UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException )
+void
+DocumentSettings::_setPropertyValues(const PropertyMapEntry** ppEntries,
+ const Any* pValues)
+throw (UnknownPropertyException, PropertyVetoException,
+ IllegalArgumentException, WrappedTargetException, RuntimeException)
{
::SolarMutexGuard aGuard;
SdDrawDocument* pDoc = mpModel->GetDoc();
::sd::DrawDocShell* pDocSh = mpModel->GetDocShell();
if( NULL == pDoc || NULL == pDocSh )
- throw UnknownPropertyException();
+ {
+ throw RuntimeException("Document or Shell missing",
+ static_cast<OWeakObject *>(this));
+ }
sal_Bool bValue = sal_False;
bool bOk, bChanged = false, bOptionsChanged = false;
@@ -949,14 +956,20 @@ void DocumentSettings::ExtractURL( XPropertyListType t, Any* pValue )
*pValue <<= aPath;
}
-void DocumentSettings::_getPropertyValues( const PropertyMapEntry** ppEntries, Any* pValue ) throw(UnknownPropertyException, WrappedTargetException )
+void
+DocumentSettings::_getPropertyValues(
+ const PropertyMapEntry** ppEntries, Any* pValue)
+throw (UnknownPropertyException, WrappedTargetException, RuntimeException)
{
::SolarMutexGuard aGuard;
SdDrawDocument* pDoc = mpModel->GetDoc();
::sd::DrawDocShell* pDocSh = mpModel->GetDocShell();
if( NULL == pDoc || NULL == pDocSh )
- throw UnknownPropertyException();
+ {
+ throw RuntimeException("Document or Shell missing",
+ static_cast<OWeakObject *>(this));
+ }
SdOptionsPrintItem aOptionsPrintItem( ATTR_OPTIONS_PRINT );