renaissance1: #i107215# Bug fixes. New focus indicator bitmap.

This commit is contained in:
Andre Fischer
2010-06-07 17:55:32 +02:00
parent 3d7b39ef94
commit 0865ddf735
3 changed files with 20 additions and 58 deletions

View File

@@ -231,7 +231,7 @@ void CurrentSlideManager::SetCurrentSlideAtXController (const SharedPageDescript
aPage); aPage);
} }
} }
catch (beans::UnknownPropertyException aException) catch (Exception aException)
{ {
// We have not been able to set the current page at the main view. // 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, // This is sad but still leaves us in a valid state. Therefore,

View File

@@ -642,46 +642,6 @@ void Listener::UpdateEditMode (void)
void Listener::HandleObjectModification (void)
{
::boost::shared_ptr<cache::PageCacheManager> 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);
nIndex<nCount;
++nIndex)
{
const SdPage* pPage = pDocument->GetSdPage(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) void Listener::HandleShapeModification (const SdrPage* pPage)
{ {
if (pPage == NULL) if (pPage == NULL)
@@ -691,15 +651,15 @@ void Listener::HandleShapeModification (const SdrPage* pPage)
// it.) // it.)
::boost::shared_ptr<cache::PageCacheManager> pCacheManager (cache::PageCacheManager::Instance()); ::boost::shared_ptr<cache::PageCacheManager> pCacheManager (cache::PageCacheManager::Instance());
if ( ! pCacheManager) if ( ! pCacheManager)
break; return;
SdDrawDocument* pDocument = mrSlideSorter.GetModel().GetDocument(); SdDrawDocument* pDocument = mrSlideSorter.GetModel().GetDocument();
if (pDocument == NULL) if (pDocument == NULL)
{ {
OSL_ASSERT(pDocument!=NULL); OSL_ASSERT(pDocument!=NULL);
break; return;
} }
pCacheManager->InvalidatePreviewBitmap(pDocument->getUnoModel(), rSdrHint.GetPage()); pCacheManager->InvalidatePreviewBitmap(pDocument->getUnoModel(), pPage);
mrSlideSorter.GetView().GetPreviewCache()->RequestPreviewBitmap(rSdrHint.GetPage()); mrSlideSorter.GetView().GetPreviewCache()->RequestPreviewBitmap(pPage);
// When the page is a master page then invalidate the previews of all // When the page is a master page then invalidate the previews of all
// pages that are linked to this master page. // pages that are linked to this master page.
@@ -709,15 +669,15 @@ void Listener::HandleShapeModification (const SdrPage* pPage)
nIndex<nCount; nIndex<nCount;
++nIndex) ++nIndex)
{ {
const SdPage* pPage = pDocument->GetSdPage(nIndex, PK_STANDARD); const SdPage* pCandidate = pDocument->GetSdPage(nIndex, PK_STANDARD);
if (pPage!=NULL && pPage->TRG_HasMasterPage()) if (pCandidate!=NULL && pCandidate->TRG_HasMasterPage())
{ {
if (&pPage->TRG_GetMasterPage() == rSdrHint.GetPage()) if (&pCandidate->TRG_GetMasterPage() == pPage)
pCacheManager->InvalidatePreviewBitmap(pDocument->getUnoModel(), pPage); pCacheManager->InvalidatePreviewBitmap(pDocument->getUnoModel(), pCandidate);
} }
else else
{ {
OSL_ASSERT(pPage!=NULL && pPage->TRG_HasMasterPage()); OSL_ASSERT(pCandidate!=NULL && pCandidate->TRG_HasMasterPage());
} }
} }
} }

View File

@@ -807,14 +807,16 @@ sal_Bool DrawController::convertFastPropertyValue (
else if (mxSubController.is()) else if (mxSubController.is())
{ {
rConvertedValue = rValue; rConvertedValue = rValue;
rOldValue = mxSubController->getFastPropertyValue(nHandle); try
bResult = (rOldValue != rConvertedValue); {
/* bResult = mpSubController->convertFastPropertyValue( rOldValue = mxSubController->getFastPropertyValue(nHandle);
rConvertedValue, bResult = (rOldValue != rConvertedValue);
rOldValue, }
nHandle, catch(beans::UnknownPropertyException aException)
rValue); {
*/ // The prperty is unknown and thus an illegal argument to this method.
throw com::sun::star::lang::IllegalArgumentException();
}
} }
return bResult; return bResult;