diff options
Diffstat (limited to 'sd/source/ui/unoidl')
-rwxr-xr-x | sd/source/ui/unoidl/DrawController.cxx | 18 | ||||
-rwxr-xr-x | sd/source/ui/unoidl/SdUnoSlideView.cxx | 24 | ||||
-rwxr-xr-x[-rw-r--r--] | sd/source/ui/unoidl/UnoDocumentSettings.cxx | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | sd/source/ui/unoidl/detreg.cxx | 24 | ||||
-rwxr-xr-x | sd/source/ui/unoidl/facreg.cxx | 109 | ||||
-rwxr-xr-x[-rw-r--r--] | sd/source/ui/unoidl/sddetect.cxx | 16 | ||||
-rwxr-xr-x | sd/source/ui/unoidl/unopage.cxx | 16 | ||||
-rwxr-xr-x | sd/source/ui/unoidl/unopage.hxx | 1 |
8 files changed, 46 insertions, 162 deletions
diff --git a/sd/source/ui/unoidl/DrawController.cxx b/sd/source/ui/unoidl/DrawController.cxx index 2bc98cd66de3..3c99baa3ee79 100755 --- a/sd/source/ui/unoidl/DrawController.cxx +++ b/sd/source/ui/unoidl/DrawController.cxx @@ -812,14 +812,16 @@ sal_Bool DrawController::convertFastPropertyValue ( else if (mxSubController.is()) { rConvertedValue = rValue; - rOldValue = mxSubController->getFastPropertyValue(nHandle); - bResult = (rOldValue != rConvertedValue); - /* bResult = mpSubController->convertFastPropertyValue( - rConvertedValue, - rOldValue, - nHandle, - rValue); - */ + try + { + rOldValue = mxSubController->getFastPropertyValue(nHandle); + bResult = (rOldValue != rConvertedValue); + } + catch(beans::UnknownPropertyException aException) + { + // The prperty is unknown and thus an illegal argument to this method. + throw com::sun::star::lang::IllegalArgumentException(); + } } return bResult; diff --git a/sd/source/ui/unoidl/SdUnoSlideView.cxx b/sd/source/ui/unoidl/SdUnoSlideView.cxx index a6502711ee72..4e788db90928 100755 --- a/sd/source/ui/unoidl/SdUnoSlideView.cxx +++ b/sd/source/ui/unoidl/SdUnoSlideView.cxx @@ -35,7 +35,7 @@ #include "SlideSorter.hxx" #include "controller/SlideSorterController.hxx" #include "controller/SlsPageSelector.hxx" -#include "controller/SlsSelectionManager.hxx" +#include "controller/SlsCurrentSlideManager.hxx" #include "model/SlsPageEnumerationProvider.hxx" #include "model/SlideSorterModel.hxx" #include "model/SlsPageDescriptor.hxx" @@ -104,7 +104,6 @@ sal_Bool SAL_CALL SdUnoSlideView::select (const Any& aSelection) } } } - rSlideSorterController.GetSelectionManager()->MakeSelectionVisible(); return bOk; } @@ -161,19 +160,30 @@ void SAL_CALL SdUnoSlideView::removeSelectionChangeListener ( //----- XDrawView ------------------------------------------------------------- void SAL_CALL SdUnoSlideView::setCurrentPage ( - const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage >& ) - throw(::com::sun::star::uno::RuntimeException) + const css::uno::Reference<css::drawing::XDrawPage>& rxDrawPage) + throw(css::uno::RuntimeException) { + Reference<beans::XPropertySet> xProperties (rxDrawPage, UNO_QUERY); + if (xProperties.is()) + { + sal_uInt16 nPageNumber(0); + if (xProperties->getPropertyValue(::rtl::OUString::createFromAscii("Number")) >>= nPageNumber) + { + mrSlideSorter.GetController().GetCurrentSlideManager()->SwitchCurrentSlide( + nPageNumber-1, + true); + } + } } -::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage > SAL_CALL +css::uno::Reference<css::drawing::XDrawPage > SAL_CALL SdUnoSlideView::getCurrentPage (void) - throw(::com::sun::star::uno::RuntimeException) + throw(css::uno::RuntimeException) { - return Reference<drawing::XDrawPage>(); + return mrSlideSorter.GetController().GetCurrentSlideManager()->GetCurrentSlide()->GetXDrawPage(); } diff --git a/sd/source/ui/unoidl/UnoDocumentSettings.cxx b/sd/source/ui/unoidl/UnoDocumentSettings.cxx index ed47e57b2130..ed47e57b2130 100644..100755 --- a/sd/source/ui/unoidl/UnoDocumentSettings.cxx +++ b/sd/source/ui/unoidl/UnoDocumentSettings.cxx diff --git a/sd/source/ui/unoidl/detreg.cxx b/sd/source/ui/unoidl/detreg.cxx index a45496d5d5a4..caf7e2730e75 100644..100755 --- a/sd/source/ui/unoidl/detreg.cxx +++ b/sd/source/ui/unoidl/detreg.cxx @@ -48,30 +48,6 @@ SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( *ppEnvironmentTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME ; } -SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( - void* , - void* pRegistryKey ) -{ - Reference< ::registry::XRegistryKey > - xKey( reinterpret_cast< ::registry::XRegistryKey* >( pRegistryKey ) ) ; - - ::rtl::OUString aDelimiter( RTL_CONSTASCII_USTRINGPARAM("/") ); - ::rtl::OUString aUnoServices( RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES") ); - - // Eigentliche Implementierung und ihre Services registrieren - sal_Int32 i; - Reference< ::registry::XRegistryKey > xNewKey; - - xNewKey = xKey->createKey( aDelimiter + SdFilterDetect::impl_getStaticImplementationName() + - aUnoServices ); - - Sequence< ::rtl::OUString > aServices = SdFilterDetect::impl_getStaticSupportedServiceNames(); - for(i = 0; i < aServices.getLength(); i++ ) - xNewKey->createKey( aServices.getConstArray()[i] ); - - return sal_True; -} - SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplementationName, void* pServiceManager, diff --git a/sd/source/ui/unoidl/facreg.cxx b/sd/source/ui/unoidl/facreg.cxx index 1ac245ad00d4..7e82654887ae 100755 --- a/sd/source/ui/unoidl/facreg.cxx +++ b/sd/source/ui/unoidl/facreg.cxx @@ -303,115 +303,6 @@ SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } -static void SAL_CALL writeInfo( - registry::XRegistryKey * pRegistryKey, - const OUString & rImplementationName, - const uno::Sequence< OUString > & rServices ) -{ - uno::Reference< registry::XRegistryKey > xNewKey( - pRegistryKey->createKey( - OUString( RTL_CONSTASCII_USTRINGPARAM("/") ) + rImplementationName + OUString(RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES") ) ) ); - - for( sal_Int32 i = 0; i < rServices.getLength(); i++ ) - xNewKey->createKey( rServices.getConstArray()[i]); -} - -SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( - void * , - void * pRegistryKey ) -{ - if( pRegistryKey ) - { - try - { - registry::XRegistryKey *pKey = reinterpret_cast< registry::XRegistryKey * >( pRegistryKey ); - - writeInfo( pKey, SdHtmlOptionsDialog_getImplementationName(), SdHtmlOptionsDialog_getSupportedServiceNames() ); - writeInfo( pKey, SdDrawingDocument_getImplementationName(), SdDrawingDocument_getSupportedServiceNames() ); - writeInfo( pKey, SdPresentationDocument_getImplementationName(), SdPresentationDocument_getSupportedServiceNames() ); - writeInfo( pKey, SdUnoModule_getImplementationName(), SdUnoModule_getSupportedServiceNames() ); - writeInfo( pKey, sd::RandomNode__getImplementationName(), sd::RandomNode_getSupportedServiceNames() ); - writeInfo( - pKey, - sd::framework::Configuration_getImplementationName(), - sd::framework::Configuration_getSupportedServiceNames()); - writeInfo( - pKey, - sd::framework::ConfigurationController_getImplementationName(), - sd::framework::ConfigurationController_getSupportedServiceNames()); - writeInfo( - pKey, - sd::framework::ModuleController_getImplementationName(), - sd::framework::ModuleController_getSupportedServiceNames()); - writeInfo( - pKey, - sd::framework::BasicPaneFactory_getImplementationName(), - sd::framework::BasicPaneFactory_getSupportedServiceNames()); - writeInfo( - pKey, - sd::framework::BasicToolBarFactory_getImplementationName(), - sd::framework::BasicToolBarFactory_getSupportedServiceNames()); - writeInfo( - pKey, - sd::framework::BasicViewFactory_getImplementationName(), - sd::framework::BasicViewFactory_getSupportedServiceNames()); - writeInfo( - pKey, - sd::framework::TaskPanelFactory_getImplementationName(), - sd::framework::TaskPanelFactory_getSupportedServiceNames()); - writeInfo( - pKey, - sd::toolpanel::ToolPanelFactory_getImplementationName(), - sd::toolpanel::ToolPanelFactory_getSupportedServiceNames()); - writeInfo( - pKey, - sd::framework::ResourceId_getImplementationName(), - sd::framework::ResourceId_getSupportedServiceNames()); - writeInfo( - pKey, - sd::framework::PresentationFactoryProvider_getImplementationName(), - sd::framework::PresentationFactoryProvider_getSupportedServiceNames()); - writeInfo( - pKey, - sd::presenter::SlideRenderer_getImplementationName(), - sd::presenter::SlideRenderer_getSupportedServiceNames()); - writeInfo( - pKey, - sd::presenter::PresenterCanvas_getImplementationName(), - sd::presenter::PresenterCanvas_getSupportedServiceNames()); - writeInfo( - pKey, - sd::presenter::PresenterTextViewService_getImplementationName(), - sd::presenter::PresenterTextViewService_getSupportedServiceNames()); - writeInfo( - pKey, - sd::presenter::PresenterHelperService_getImplementationName(), - sd::presenter::PresenterHelperService_getSupportedServiceNames()); - writeInfo( - pKey, - sd::presenter::PresenterPreviewCache_getImplementationName(), - sd::presenter::PresenterPreviewCache_getSupportedServiceNames()); - writeInfo( - pKey, - sd::slidesorter::SlideSorterService_getImplementationName(), - sd::slidesorter::SlideSorterService_getSupportedServiceNames()); - writeInfo( - pKey, - sd::SlideLayoutController_getImplementationName(), - sd::SlideLayoutController_getSupportedServiceNames()); - writeInfo( - pKey, - sd::InsertSlideController_getImplementationName(), - sd::InsertSlideController_getSupportedServiceNames()); - } - catch (registry::InvalidRegistryException &) - { - OSL_ENSURE( sal_False, "### InvalidRegistryException!" ); - } - } - return sal_True; -} - SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, diff --git a/sd/source/ui/unoidl/sddetect.cxx b/sd/source/ui/unoidl/sddetect.cxx index 90767a332609..f462d22a780e 100644..100755 --- a/sd/source/ui/unoidl/sddetect.cxx +++ b/sd/source/ui/unoidl/sddetect.cxx @@ -167,7 +167,7 @@ SdFilterDetect::~SdFilterDetect() } else if( lDescriptor[nProperty].Name == OUString(RTL_CONSTASCII_USTRINGPARAM("InteractionHandler")) ) lDescriptor[nProperty].Value >>= xInteraction; - else if( lDescriptor[nProperty].Name == OUString(RTL_CONSTASCII_USTRINGPARAM("RapairPackage")) ) + else if( lDescriptor[nProperty].Name == OUString(RTL_CONSTASCII_USTRINGPARAM("RepairPackage")) ) lDescriptor[nProperty].Value >>= bRepairPackage; else if( lDescriptor[nProperty].Name == OUString(RTL_CONSTASCII_USTRINGPARAM("DocumentTitle")) ) nIndexOfDocumentTitle = nProperty; @@ -291,20 +291,16 @@ SdFilterDetect::~SdFilterDetect() if ( !bRepairPackage ) { // ask the user whether he wants to try to repair - RequestPackageReparation* pRequest = new RequestPackageReparation( aDocumentTitle ); - uno::Reference< task::XInteractionRequest > xRequest ( pRequest ); - - xInteraction->handle( xRequest ); - - bRepairAllowed = pRequest->isApproved(); + RequestPackageReparation aRequest( aDocumentTitle ); + xInteraction->handle( aRequest.GetRequest() ); + bRepairAllowed = aRequest.isApproved(); } if ( !bRepairAllowed ) { // repair either not allowed or not successful - NotifyBrokenPackage* pNotifyRequest = new NotifyBrokenPackage( aDocumentTitle ); - uno::Reference< task::XInteractionRequest > xRequest ( pNotifyRequest ); - xInteraction->handle( xRequest ); + NotifyBrokenPackage aNotifyRequest( aDocumentTitle ); + xInteraction->handle( aNotifyRequest.GetRequest() ); } } diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx index 379344667a0c..fb356087245a 100755 --- a/sd/source/ui/unoidl/unopage.cxx +++ b/sd/source/ui/unoidl/unopage.cxx @@ -382,6 +382,7 @@ SdGenericDrawPage::SdGenericDrawPage( SdXImpressDocument* _pModel, SdPage* pInPa SdUnoSearchReplaceShape(this), mpModel ( _pModel ), mpSdrModel(0), + mnTempPageNumber(0), mpPropSet ( _pSet ), mbIsImpressDocument(false) { @@ -924,9 +925,18 @@ void SAL_CALL SdGenericDrawPage::setPropertyValue( const OUString& aPropertyName break; } + case WID_PAGE_NUMBER: + if( (GetPage()->GetPageKind() == PK_HANDOUT) && !GetPage()->IsMasterPage() ) + { + if( !(aValue >>= mnTempPageNumber) ) + throw lang::IllegalArgumentException(); + + break; + } + throw beans::PropertyVetoException(); + case WID_PAGE_LDBITMAP: case WID_PAGE_LDNAME: - case WID_PAGE_NUMBER: case WID_PAGE_ISDARK: throw beans::PropertyVetoException(); @@ -1053,9 +1063,7 @@ Any SAL_CALL SdGenericDrawPage::getPropertyValue( const OUString& PropertyName ) } else { - // for pages with number 0 (Handout Master, Handout page) - // return 0 - aAny <<= (sal_Int16)0; + aAny <<= mnTempPageNumber; } } break; diff --git a/sd/source/ui/unoidl/unopage.hxx b/sd/source/ui/unoidl/unopage.hxx index 5d525b0f0f04..e3fda70c0f11 100755 --- a/sd/source/ui/unoidl/unopage.hxx +++ b/sd/source/ui/unoidl/unopage.hxx @@ -74,6 +74,7 @@ class SdGenericDrawPage : public SvxFmDrawPage, private: SdXImpressDocument* mpModel; SdrModel* mpSdrModel; + sal_Int16 mnTempPageNumber; // for printing handouts protected: friend class SdXImpressDocument; |