From 0865ddf7358ad8a0dc27b47089d25443ff789caf Mon Sep 17 00:00:00 2001 From: Andre Fischer Date: Mon, 7 Jun 2010 17:55:32 +0200 Subject: [PATCH] renaissance1: #i107215# Bug fixes. New focus indicator bitmap. --- .../controller/SlsCurrentSlideManager.cxx | 2 +- .../ui/slidesorter/controller/SlsListener.cxx | 58 +++---------------- sd/source/ui/unoidl/DrawController.cxx | 18 +++--- 3 files changed, 20 insertions(+), 58 deletions(-) diff --git a/sd/source/ui/slidesorter/controller/SlsCurrentSlideManager.cxx b/sd/source/ui/slidesorter/controller/SlsCurrentSlideManager.cxx index 5a7ead7d2391..bb63fcb80cba 100644 --- a/sd/source/ui/slidesorter/controller/SlsCurrentSlideManager.cxx +++ b/sd/source/ui/slidesorter/controller/SlsCurrentSlideManager.cxx @@ -231,7 +231,7 @@ void CurrentSlideManager::SetCurrentSlideAtXController (const SharedPageDescript aPage); } } - catch (beans::UnknownPropertyException aException) + catch (Exception aException) { // We have not been able to set the current page at the main view. // This is sad but still leaves us in a valid state. Therefore, diff --git a/sd/source/ui/slidesorter/controller/SlsListener.cxx b/sd/source/ui/slidesorter/controller/SlsListener.cxx index 726a96adeba7..03cba2e4a522 100644 --- a/sd/source/ui/slidesorter/controller/SlsListener.cxx +++ b/sd/source/ui/slidesorter/controller/SlsListener.cxx @@ -642,46 +642,6 @@ void Listener::UpdateEditMode (void) -void Listener::HandleObjectModification (void) -{ - ::boost::shared_ptr pInstance ( - cache::PageCacheManager::Instance()); - if ( ! pInstance) - break; - SdDrawDocument* pDocument = mrSlideSorter.GetModel().GetDocument(); - if (pDocument == NULL) - { - OSL_ASSERT(pDocument!=NULL); - break; - } - pInstance->InvalidatePreviewBitmap(pDocument->getUnoModel(), rSdrHint.GetPage()); - mrSlideSorter.GetView().GetPreviewCache()->RequestPreviewBitmap(rSdrHint.GetPage()); - - // When the modified page is a master page then we have to - // invalidate all pages that depend on it. - if (rSdrHint.GetPage()->IsMasterPage()) - { - for (USHORT nIndex=0,nCount=pDocument->GetSdPageCount(PK_STANDARD); - nIndexGetSdPage(nIndex, PK_STANDARD); - if (pPage!=NULL && pPage->TRG_HasMasterPage()) - { - if (&pPage->TRG_GetMasterPage() == rSdrHint.GetPage()) - pInstance->InvalidatePreviewBitmap(pDocument->getUnoModel(), pPage); - } - else - { - OSL_ASSERT(pPage!=NULL && pPage->TRG_HasMasterPage()); - } - } - } -} - - - - void Listener::HandleShapeModification (const SdrPage* pPage) { if (pPage == NULL) @@ -691,15 +651,15 @@ void Listener::HandleShapeModification (const SdrPage* pPage) // it.) ::boost::shared_ptr pCacheManager (cache::PageCacheManager::Instance()); if ( ! pCacheManager) - break; + return; SdDrawDocument* pDocument = mrSlideSorter.GetModel().GetDocument(); if (pDocument == NULL) { OSL_ASSERT(pDocument!=NULL); - break; + return; } - pCacheManager->InvalidatePreviewBitmap(pDocument->getUnoModel(), rSdrHint.GetPage()); - mrSlideSorter.GetView().GetPreviewCache()->RequestPreviewBitmap(rSdrHint.GetPage()); + pCacheManager->InvalidatePreviewBitmap(pDocument->getUnoModel(), pPage); + mrSlideSorter.GetView().GetPreviewCache()->RequestPreviewBitmap(pPage); // When the page is a master page then invalidate the previews of all // pages that are linked to this master page. @@ -709,15 +669,15 @@ void Listener::HandleShapeModification (const SdrPage* pPage) nIndexGetSdPage(nIndex, PK_STANDARD); - if (pPage!=NULL && pPage->TRG_HasMasterPage()) + const SdPage* pCandidate = pDocument->GetSdPage(nIndex, PK_STANDARD); + if (pCandidate!=NULL && pCandidate->TRG_HasMasterPage()) { - if (&pPage->TRG_GetMasterPage() == rSdrHint.GetPage()) - pCacheManager->InvalidatePreviewBitmap(pDocument->getUnoModel(), pPage); + if (&pCandidate->TRG_GetMasterPage() == pPage) + pCacheManager->InvalidatePreviewBitmap(pDocument->getUnoModel(), pCandidate); } else { - OSL_ASSERT(pPage!=NULL && pPage->TRG_HasMasterPage()); + OSL_ASSERT(pCandidate!=NULL && pCandidate->TRG_HasMasterPage()); } } } diff --git a/sd/source/ui/unoidl/DrawController.cxx b/sd/source/ui/unoidl/DrawController.cxx index acd57f18d85c..e6131c9838a9 100644 --- a/sd/source/ui/unoidl/DrawController.cxx +++ b/sd/source/ui/unoidl/DrawController.cxx @@ -807,14 +807,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;