summaryrefslogtreecommitdiff
path: root/basctl
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2007-05-10 09:44:54 +0000
committerKurt Zenker <kz@openoffice.org>2007-05-10 09:44:54 +0000
commitb7a946748f5315fd723dc07ec727bad1330f6177 (patch)
treead8e6091f9437c8846252eddf9586d718a9341fc /basctl
parent0895d4c26ee9be2cf593c7bf855560db72d4bd46 (diff)
INTEGRATION: CWS dba23a (1.24.4); FILE MERGED
2007/03/20 08:31:50 fs 1.24.4.2: RESYNC: (1.24-1.25); FILE MERGED 2007/02/21 13:47:34 fs 1.24.4.1: #i74719# don't assert VetoExceptions when setting a new object
Diffstat (limited to 'basctl')
-rw-r--r--basctl/source/dlged/propbrw.cxx46
1 files changed, 25 insertions, 21 deletions
diff --git a/basctl/source/dlged/propbrw.cxx b/basctl/source/dlged/propbrw.cxx
index b123c91b69f1..c881c5cb7c70 100644
--- a/basctl/source/dlged/propbrw.cxx
+++ b/basctl/source/dlged/propbrw.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: propbrw.cxx,v $
*
- * $Revision: 1.25 $
+ * $Revision: 1.26 $
*
- * last change: $Author: rt $ $Date: 2007-01-29 16:52:31 $
+ * last change: $Author: kz $ $Date: 2007-05-10 10:44:54 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -58,6 +58,9 @@
#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
#endif
+#ifndef TOOLS_DIAGNOSE_EX_H
+#include <tools/diagnose_ex.h>
+#endif
#ifndef _SFX_BINDINGS_HXX
#include <sfx2/bindings.hxx>
@@ -604,42 +607,43 @@ void PropBrw::Update( SdrView* pNewView )
const SdrMarkList& rMarkList = pView->GetMarkedObjectList();
sal_uInt32 nMarkCount = rMarkList.GetMarkCount();
+ if ( nMarkCount == 0 )
+ {
+ EndListening( *(pView->GetModel()) );
+ pView = NULL;
+ implSetNewObject( NULL );
+ return;
+ }
+
+ Reference< XPropertySet > xNewObject;
+ Sequence< Reference< XInterface > > aNewObjects;
if ( nMarkCount == 1 )
{
DlgEdObj* pDlgEdObj = PTR_CAST( DlgEdObj, rMarkList.GetMark(0)->GetMarkedSdrObj() );
if ( pDlgEdObj )
{
if ( pDlgEdObj->IsGroupObject() ) // group object
- {
- implSetNewObjectSequence( CreateMultiSelectionSequence( rMarkList ) );
- }
+ aNewObjects = CreateMultiSelectionSequence( rMarkList );
else // single selection
- {
- implSetNewObject( Reference< XPropertySet >( pDlgEdObj->GetUnoControlModel(), UNO_QUERY ) );
- }
- }
- else
- {
- implSetNewObject( Reference< XPropertySet >() );
+ xNewObject = xNewObject.query( pDlgEdObj->GetUnoControlModel() );
}
}
else if ( nMarkCount > 1 ) // multiple selection
{
- implSetNewObjectSequence( CreateMultiSelectionSequence( rMarkList ) );
+ aNewObjects = CreateMultiSelectionSequence( rMarkList );
}
+
+ if ( aNewObjects.getLength() )
+ implSetNewObjectSequence( aNewObjects );
else
- {
- EndListening( *(pView->GetModel()) );
- pView = NULL;
- implSetNewObject( Reference< XPropertySet >() );
- return;
- }
+ implSetNewObject( xNewObject );
StartListening( *(pView->GetModel()) );
}
- catch ( Exception& )
+ catch ( const PropertyVetoException& ) { /* silence */ }
+ catch ( const Exception& )
{
- DBG_ERROR( "PropBrw::Update: Exception occured!" );
+ DBG_UNHANDLED_EXCEPTION();
}
}