diff options
author | Kurt Zenker <kz@openoffice.org> | 2008-04-03 13:55:09 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2008-04-03 13:55:09 +0000 |
commit | 872d9b47de12d3cd8b0025f0ccff2f11d254013f (patch) | |
tree | cef748846a5f60bd100a070674a5c08fb5f0835d /sd/source/ui/unoidl | |
parent | 04f7a49b8ab56dc83e6406ea751b94a55d4ea268 (diff) |
INTEGRATION: CWS presenterview (1.33.20); FILE MERGED
2007/09/25 08:02:35 af 1.33.20.2: #i18486# Removed unreachable breaks.
2007/09/11 11:16:36 af 1.33.20.1: #i18486# Turned SubControllers into components.
Diffstat (limited to 'sd/source/ui/unoidl')
-rw-r--r-- | sd/source/ui/unoidl/SdUnoDrawView.cxx | 177 |
1 files changed, 40 insertions, 137 deletions
diff --git a/sd/source/ui/unoidl/SdUnoDrawView.cxx b/sd/source/ui/unoidl/SdUnoDrawView.cxx index 49f0ed92a394..1c5c16425e57 100644 --- a/sd/source/ui/unoidl/SdUnoDrawView.cxx +++ b/sd/source/ui/unoidl/SdUnoDrawView.cxx @@ -4,9 +4,9 @@ * * $RCSfile: SdUnoDrawView.cxx,v $ * - * $Revision: 1.33 $ + * $Revision: 1.34 $ * - * last change: $Author: vg $ $Date: 2007-01-09 11:32:52 $ + * last change: $Author: kz $ $Date: 2008-04-03 14:55:09 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -86,7 +86,7 @@ SdUnoDrawView::SdUnoDrawView( DrawController& rController, DrawViewShell& rViewShell, View& rView) throw() - : DrawSubController(), + : DrawSubControllerInterfaceBase(m_aMutex), mrController(rController), mrDrawViewShell(rViewShell), mrView(rView) @@ -357,141 +357,36 @@ Any SAL_CALL SdUnoDrawView::getSelection() } -//---------------------------------------------------------------------- -//------ XPropertySet & OPropertySetHelper ----------------------------- -//---------------------------------------------------------------------- -// Return sal_True, value change -sal_Bool SdUnoDrawView::convertFastPropertyValue -( - Any & rConvertedValue, - Any & rOldValue, - sal_Int32 nHandle, - const Any& rValue -) throw ( com::sun::star::lang::IllegalArgumentException) +void SAL_CALL SdUnoDrawView::addSelectionChangeListener ( + const css::uno::Reference<css::view::XSelectionChangeListener>& rxListener) + throw(css::uno::RuntimeException) { - sal_Bool bResult = sal_False; + (void)rxListener; +} - switch( nHandle ) - { - case DrawController::PROPERTY_CURRENTPAGE: - { - Reference< drawing::XDrawPage > xOldPage( getCurrentPage() ); - Reference< drawing::XDrawPage > xNewPage; - ::cppu::convertPropertyValue( xNewPage, rValue ); - if( xOldPage != xNewPage ) - { - rConvertedValue <<= xNewPage; - rOldValue <<= xOldPage; - bResult = sal_True; - } - } - break; - case DrawController::PROPERTY_MASTERPAGEMODE: - { - sal_Bool bOldValue = getMasterPageMode(); - sal_Bool b; - ::cppu::convertPropertyValue( b , rValue ); - if( b != bOldValue ) - { - rConvertedValue.setValue( &b , ::getCppuBooleanType() ); - rOldValue.setValue( & bOldValue , ::getCppuBooleanType() ); - bResult = sal_True; - } - } - break; - - case DrawController::PROPERTY_LAYERMODE: - { - sal_Bool bOldValue = getLayerMode(); - sal_Bool b; - ::cppu::convertPropertyValue( b , rValue ); - if( b != bOldValue ) - { - rConvertedValue.setValue( &b , ::getCppuBooleanType() ); - rOldValue.setValue( & bOldValue , ::getCppuBooleanType() ); - bResult = sal_True; - } - } - break; - case DrawController::PROPERTY_ACTIVE_LAYER: - { - Reference<drawing::XLayer> xOldLayer (getActiveLayer()); - Reference<drawing::XLayer> xNewLayer; - ::cppu::convertPropertyValue (xNewLayer, rValue); - if (xOldLayer != xNewLayer) - { - rConvertedValue <<= xNewLayer; - rOldValue <<= xOldLayer; - bResult = sal_True; - } - } - break; - - case DrawController::PROPERTY_ZOOMVALUE: - { - sal_Int16 nOldZoom = GetZoom(); - sal_Int16 nNewZoom; - ::cppu::convertPropertyValue( nNewZoom, rValue ); - if( nNewZoom != nOldZoom ) - { - rConvertedValue <<= nNewZoom; - rOldValue <<= nOldZoom; - bResult = sal_True; - } - } - break; - - case DrawController::PROPERTY_ZOOMTYPE: - { - sal_Int16 nOldType = com::sun::star::view::DocumentZoomType::BY_VALUE; - sal_Int16 nNewType; - ::cppu::convertPropertyValue( nNewType, rValue ); - if( nNewType != nOldType ) - { - rConvertedValue <<= nNewType; - rOldValue <<= nOldType; - bResult = sal_True; - } - } - break; - - case DrawController::PROPERTY_VIEWOFFSET: - { - awt::Point aOld( GetViewOffset() ); - awt::Point aNew; - ::cppu::convertPropertyValue( aNew, rValue ); - if( (aOld.X != aNew.X) && (aOld.Y != aNew.Y) ) - { - rConvertedValue <<= aNew; - rOldValue <<= aOld; - bResult = sal_True; - } - } - break; +void SAL_CALL SdUnoDrawView::removeSelectionChangeListener ( + const css::uno::Reference<css::view::XSelectionChangeListener>& rxListener) + throw(css::uno::RuntimeException) +{ + (void)rxListener; +} - default: - bResult = sal_False; - break; - } - return bResult; -} -//---------------------------------------------------------------------- -/** - * only set the value. - */ -void SdUnoDrawView::setFastPropertyValue_NoBroadcast -( +void SdUnoDrawView::setFastPropertyValue ( sal_Int32 nHandle, - const Any& rValue -) throw ( com::sun::star::uno::Exception) + const Any& rValue) + throw(css::beans::UnknownPropertyException, + css::beans::PropertyVetoException, + css::lang::IllegalArgumentException, + css::lang::WrappedTargetException, + css::uno::RuntimeException) { switch( nHandle ) { @@ -548,45 +443,53 @@ void SdUnoDrawView::setFastPropertyValue_NoBroadcast break; default: - break; + throw beans::UnknownPropertyException(); } } -//---------------------------------------------------------------------- -void SdUnoDrawView::getFastPropertyValue( Any & rRet, sal_Int32 nHandle ) const + + +Any SAL_CALL SdUnoDrawView::getFastPropertyValue ( + sal_Int32 nHandle) + throw(css::beans::UnknownPropertyException, + css::lang::WrappedTargetException, + css::uno::RuntimeException) { + Any aValue; switch( nHandle ) { case DrawController::PROPERTY_CURRENTPAGE: - rRet <<= (const_cast<SdUnoDrawView*>(this))->getCurrentPage(); + aValue <<= (const_cast<SdUnoDrawView*>(this))->getCurrentPage(); break; case DrawController::PROPERTY_MASTERPAGEMODE: - rRet <<= getMasterPageMode(); + aValue <<= getMasterPageMode(); break; case DrawController::PROPERTY_LAYERMODE: - rRet <<= getLayerMode(); + aValue <<= getLayerMode(); break; case DrawController::PROPERTY_ACTIVE_LAYER: - rRet <<= (const_cast<SdUnoDrawView*>(this))->getActiveLayer(); + aValue <<= (const_cast<SdUnoDrawView*>(this))->getActiveLayer(); break; case DrawController::PROPERTY_ZOOMVALUE: - rRet <<= GetZoom(); + aValue <<= GetZoom(); break; case DrawController::PROPERTY_ZOOMTYPE: - rRet <<= (sal_Int16)com::sun::star::view::DocumentZoomType::BY_VALUE; + aValue <<= (sal_Int16)com::sun::star::view::DocumentZoomType::BY_VALUE; break; case DrawController::PROPERTY_VIEWOFFSET: - rRet <<= GetViewOffset(); + aValue <<= GetViewOffset(); break; default: - break; + throw beans::UnknownPropertyException(); } + + return aValue; } |