diff options
Diffstat (limited to 'sd/source/ui/slidesorter')
30 files changed, 122 insertions, 122 deletions
diff --git a/sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx b/sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx index e783d059ade7..b45c2ade3cd0 100644 --- a/sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx +++ b/sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx @@ -441,7 +441,7 @@ void BitmapCache::UpdateCacheSize (const CacheEntry& rEntry, CacheOperation eOpe break; default: - OSL_ASSERT(false); + assert(false); break; } } diff --git a/sd/source/ui/slidesorter/cache/SlsGenericPageCache.cxx b/sd/source/ui/slidesorter/cache/SlsGenericPageCache.cxx index ec5e6fbf5ea7..4adac147c359 100644 --- a/sd/source/ui/slidesorter/cache/SlsGenericPageCache.cxx +++ b/sd/source/ui/slidesorter/cache/SlsGenericPageCache.cxx @@ -106,7 +106,7 @@ Bitmap GenericPageCache::GetPreviewBitmap ( const CacheKey aKey, const bool bResize) { - OSL_ASSERT(aKey != nullptr); + assert(aKey != nullptr); Bitmap aPreview; bool bMayBeUpToDate = true; @@ -143,7 +143,7 @@ Bitmap GenericPageCache::GetPreviewBitmap ( Bitmap GenericPageCache::GetMarkedPreviewBitmap ( const CacheKey aKey) { - OSL_ASSERT(aKey != nullptr); + assert(aKey != nullptr); ProvideCacheAndProcessor(); const SdrPage* pPage = mpCacheContext->GetPage(aKey); @@ -156,7 +156,7 @@ void GenericPageCache::SetMarkedPreviewBitmap ( const CacheKey aKey, const Bitmap& rMarkedBitmap) { - OSL_ASSERT(aKey != nullptr); + assert(aKey != nullptr); ProvideCacheAndProcessor(); const SdrPage* pPage = mpCacheContext->GetPage(aKey); @@ -167,7 +167,7 @@ void GenericPageCache::RequestPreviewBitmap ( const CacheKey aKey, const bool bMayBeUpToDate) { - OSL_ASSERT(aKey != nullptr); + assert(aKey != nullptr); const SdrPage* pPage = mpCacheContext->GetPage(aKey); diff --git a/sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx b/sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx index 9b7f551e57f0..6ad5e4a45dd3 100644 --- a/sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx +++ b/sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx @@ -264,7 +264,7 @@ void PageCacheManager::ReleaseCache (const std::shared_ptr<Cache>& rpCache) if (iCache != mpPageCaches->end()) { - OSL_ASSERT(iCache->second == rpCache); + assert(iCache->second == rpCache); PutRecentlyUsedCache(iCache->first.mpDocument,iCache->first.maPreviewSize,rpCache); @@ -290,7 +290,7 @@ std::shared_ptr<PageCacheManager::Cache> PageCacheManager::ChangeSize ( PageCacheContainer::CompareWithCache(rpCache))); if (iCacheToChange != mpPageCaches->end()) { - OSL_ASSERT(iCacheToChange->second == rpCache); + assert(iCacheToChange->second == rpCache); // Now, we can change the preview size of the existing one by // removing the cache from the list and re-insert it with the @@ -306,7 +306,7 @@ std::shared_ptr<PageCacheManager::Cache> PageCacheManager::ChangeSize ( } else { - OSL_ASSERT(iCacheToChange != mpPageCaches->end()); + assert(iCacheToChange != mpPageCaches->end()); } } diff --git a/sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx b/sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx index a4ba8dd088ee..6954f51cc64d 100644 --- a/sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx +++ b/sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx @@ -113,7 +113,7 @@ IMPL_LINK_NOARG(QueueProcessor, ProcessRequestHdl, Timer *, void) void QueueProcessor::ProcessRequests() { - OSL_ASSERT(mpCacheContext.get()!=nullptr); + assert(mpCacheContext.get()!=nullptr); // Never process more than one request at a time in order to prevent the // lock up of the edit view. diff --git a/sd/source/ui/slidesorter/cache/SlsRequestQueue.cxx b/sd/source/ui/slidesorter/cache/SlsRequestQueue.cxx index 8bc8bb3e74da..809fbf46ca01 100644 --- a/sd/source/ui/slidesorter/cache/SlsRequestQueue.cxx +++ b/sd/source/ui/slidesorter/cache/SlsRequestQueue.cxx @@ -103,7 +103,7 @@ void RequestQueue::AddRequest ( { ::osl::MutexGuard aGuard (maMutex); - OSL_ASSERT(eRequestClass>=MIN_CLASS && eRequestClass<=MAX_CLASS); + assert(eRequestClass>=MIN_CLASS && eRequestClass<=MAX_CLASS); // If the request is already a member of the queue then remove it so // that the following insertion will use the new prioritization. @@ -174,7 +174,7 @@ void RequestQueue::ChangeClass ( { ::osl::MutexGuard aGuard (maMutex); - OSL_ASSERT(eNewRequestClass>=MIN_CLASS && eNewRequestClass<=MAX_CLASS); + assert(eNewRequestClass>=MIN_CLASS && eNewRequestClass<=MAX_CLASS); Container::const_iterator iRequest ( ::std::find_if ( diff --git a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx index dfbf1692ef8d..8a6bb541c727 100644 --- a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx +++ b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx @@ -121,12 +121,12 @@ SlideSorterController::SlideSorterController (SlideSorter& rSlideSorter) mbIsContextMenuOpen(false) { sd::Window *pWindow (mrSlideSorter.GetContentWindow().get()); - OSL_ASSERT(pWindow); + assert(pWindow); if (pWindow) { // The whole background is painted by the view and controls. vcl::Window* pParentWindow = pWindow->GetParent(); - OSL_ASSERT(pParentWindow!=nullptr); + assert(pParentWindow!=nullptr); pParentWindow->SetBackground (Wallpaper()); // Connect the view with the window that has been created by our base @@ -217,50 +217,50 @@ model::SharedPageDescriptor SlideSorterController::GetPageAt ( PageSelector& SlideSorterController::GetPageSelector() { - OSL_ASSERT(mpPageSelector.get()!=nullptr); + assert(mpPageSelector.get()!=nullptr); return *mpPageSelector.get(); } FocusManager& SlideSorterController::GetFocusManager() { - OSL_ASSERT(mpFocusManager.get()!=nullptr); + assert(mpFocusManager.get()!=nullptr); return *mpFocusManager.get(); } Clipboard& SlideSorterController::GetClipboard() { - OSL_ASSERT(mpClipboard.get()!=nullptr); + assert(mpClipboard.get()!=nullptr); return *mpClipboard.get(); } ScrollBarManager& SlideSorterController::GetScrollBarManager() { - OSL_ASSERT(mpScrollBarManager.get()!=nullptr); + assert(mpScrollBarManager.get()!=nullptr); return *mpScrollBarManager.get(); } std::shared_ptr<CurrentSlideManager> const & SlideSorterController::GetCurrentSlideManager() const { - OSL_ASSERT(mpCurrentSlideManager.get()!=nullptr); + assert(mpCurrentSlideManager.get()!=nullptr); return mpCurrentSlideManager; } std::shared_ptr<SlotManager> const & SlideSorterController::GetSlotManager() const { - OSL_ASSERT(mpSlotManager.get()!=nullptr); + assert(mpSlotManager.get()!=nullptr); return mpSlotManager; } std::shared_ptr<SelectionManager> const & SlideSorterController::GetSelectionManager() const { - OSL_ASSERT(mpSelectionManager.get()!=nullptr); + assert(mpSelectionManager.get()!=nullptr); return mpSelectionManager; } std::shared_ptr<InsertionIndicatorHandler> const & SlideSorterController::GetInsertionIndicatorHandler() const { - OSL_ASSERT(mpInsertionIndicatorHandler.get()!=nullptr); + assert(mpInsertionIndicatorHandler.get()!=nullptr); return mpInsertionIndicatorHandler; } @@ -881,7 +881,7 @@ void SlideSorterController::SetDocumentSlides (const Reference<container::XIndex VisibleAreaManager& SlideSorterController::GetVisibleAreaManager() const { - OSL_ASSERT(mpVisibleAreaManager); + assert(mpVisibleAreaManager); return *mpVisibleAreaManager; } diff --git a/sd/source/ui/slidesorter/controller/SlsAnimator.cxx b/sd/source/ui/slidesorter/controller/SlsAnimator.cxx index fd6a63ebdf6a..19fe97286de0 100644 --- a/sd/source/ui/slidesorter/controller/SlsAnimator.cxx +++ b/sd/source/ui/slidesorter/controller/SlsAnimator.cxx @@ -74,7 +74,7 @@ Animator::~Animator() { if ( ! mbIsDisposed) { - OSL_ASSERT(mbIsDisposed); + assert(mbIsDisposed); Dispose(); } } @@ -102,7 +102,7 @@ Animator::AnimationId Animator::AddAnimation ( { // When the animator is already disposed then ignore this call // silently (well, we show an assertion, but do not throw an exception.) - OSL_ASSERT( ! mbIsDisposed); + assert( ! mbIsDisposed); if (mbIsDisposed) return -1; @@ -123,7 +123,7 @@ Animator::AnimationId Animator::AddAnimation ( void Animator::RemoveAnimation (const Animator::AnimationId nId) { - OSL_ASSERT( ! mbIsDisposed); + assert( ! mbIsDisposed); const AnimationList::iterator iAnimation (::std::find_if( maAnimations.begin(), @@ -132,7 +132,7 @@ void Animator::RemoveAnimation (const Animator::AnimationId nId) { return nId == pAnim->mnAnimationId; })); if (iAnimation != maAnimations.end()) { - OSL_ASSERT((*iAnimation)->mnAnimationId == nId); + assert((*iAnimation)->mnAnimationId == nId); (*iAnimation)->Expire(); maAnimations.erase(iAnimation); } @@ -166,7 +166,7 @@ bool Animator::ProcessAnimations (const double nTime) { bool bExpired (false); - OSL_ASSERT( ! mbIsDisposed); + assert( ! mbIsDisposed); if (mbIsDisposed) return bExpired; @@ -182,7 +182,7 @@ bool Animator::ProcessAnimations (const double nTime) void Animator::CleanUpAnimationList() { - OSL_ASSERT( ! mbIsDisposed); + assert( ! mbIsDisposed); if (mbIsDisposed) return; diff --git a/sd/source/ui/slidesorter/controller/SlsCurrentSlideManager.cxx b/sd/source/ui/slidesorter/controller/SlsCurrentSlideManager.cxx index 47d2aa64e00c..0c14dd8fe02c 100644 --- a/sd/source/ui/slidesorter/controller/SlsCurrentSlideManager.cxx +++ b/sd/source/ui/slidesorter/controller/SlsCurrentSlideManager.cxx @@ -162,7 +162,7 @@ void CurrentSlideManager::SwitchCurrentSlide ( void CurrentSlideManager::SetCurrentSlideAtViewShellBase (const SharedPageDescriptor& rpDescriptor) { - OSL_ASSERT(rpDescriptor.get() != nullptr); + assert(rpDescriptor.get() != nullptr); ViewShellBase* pBase = mrSlideSorter.GetViewShellBase(); if (pBase != nullptr) @@ -181,7 +181,7 @@ void CurrentSlideManager::SetCurrentSlideAtViewShellBase (const SharedPageDescri void CurrentSlideManager::SetCurrentSlideAtTabControl (const SharedPageDescriptor& rpDescriptor) { - OSL_ASSERT(rpDescriptor.get() != nullptr); + assert(rpDescriptor.get() != nullptr); ViewShellBase* pBase = mrSlideSorter.GetViewShellBase(); if (pBase != nullptr) @@ -199,7 +199,7 @@ void CurrentSlideManager::SetCurrentSlideAtTabControl (const SharedPageDescripto void CurrentSlideManager::SetCurrentSlideAtXController (const SharedPageDescriptor& rpDescriptor) { - OSL_ASSERT(rpDescriptor.get() != nullptr); + assert(rpDescriptor.get() != nullptr); try { diff --git a/sd/source/ui/slidesorter/controller/SlsFocusManager.cxx b/sd/source/ui/slidesorter/controller/SlsFocusManager.cxx index 3ee0bb0677d0..3c016a32c9b5 100644 --- a/sd/source/ui/slidesorter/controller/SlsFocusManager.cxx +++ b/sd/source/ui/slidesorter/controller/SlsFocusManager.cxx @@ -93,12 +93,12 @@ void FocusManager::MoveFocus (FocusMoveDirection eDirection) if (mnPageIndex < 0) { - OSL_ASSERT(mnPageIndex>=0); + assert(mnPageIndex>=0); mnPageIndex = 0; } else if (mnPageIndex >= nPageCount) { - OSL_ASSERT(mnPageIndex<nPageCount); + assert(mnPageIndex<nPageCount); mnPageIndex = nPageCount - 1; } diff --git a/sd/source/ui/slidesorter/controller/SlsInsertionIndicatorHandler.cxx b/sd/source/ui/slidesorter/controller/SlsInsertionIndicatorHandler.cxx index f162147acdd5..adfccf8b76a9 100644 --- a/sd/source/ui/slidesorter/controller/SlsInsertionIndicatorHandler.cxx +++ b/sd/source/ui/slidesorter/controller/SlsInsertionIndicatorHandler.cxx @@ -55,7 +55,7 @@ void InsertionIndicatorHandler::Start (const bool bIsOverSourceView) { if (mbIsActive) { - OSL_ASSERT(!mbIsActive); + assert(!mbIsActive); } mbIsReadOnly = mrSlideSorter.GetModel().IsReadOnly(); diff --git a/sd/source/ui/slidesorter/controller/SlsListener.cxx b/sd/source/ui/slidesorter/controller/SlsListener.cxx index 271ff8ad02fa..4e5499d1f94c 100644 --- a/sd/source/ui/slidesorter/controller/SlsListener.cxx +++ b/sd/source/ui/slidesorter/controller/SlsListener.cxx @@ -575,7 +575,7 @@ void Listener::HandleShapeModification (const SdrPage* pPage) SdDrawDocument* pDocument = mrSlideSorter.GetModel().GetDocument(); if (pDocument == nullptr) { - OSL_ASSERT(pDocument!=nullptr); + assert(pDocument!=nullptr); return; } pCacheManager->InvalidatePreviewBitmap(pDocument->getUnoModel(), pPage); @@ -597,7 +597,7 @@ void Listener::HandleShapeModification (const SdrPage* pPage) } else { - OSL_ASSERT(pCandidate!=nullptr && pCandidate->TRG_HasMasterPage()); + assert(pCandidate!=nullptr && pCandidate->TRG_HasMasterPage()); } } } diff --git a/sd/source/ui/slidesorter/controller/SlsPageSelector.cxx b/sd/source/ui/slidesorter/controller/SlsPageSelector.cxx index bf35f39e54a8..639369daf677 100644 --- a/sd/source/ui/slidesorter/controller/SlsPageSelector.cxx +++ b/sd/source/ui/slidesorter/controller/SlsPageSelector.cxx @@ -353,7 +353,7 @@ void PageSelector::UpdateLock::Release() if (mpSelector != nullptr) { --mpSelector->mnUpdateLockCount; - OSL_ASSERT(mpSelector->mnUpdateLockCount >= 0); + assert(mpSelector->mnUpdateLockCount >= 0); if (mpSelector->mnUpdateLockCount == 0) mpSelector->UpdateCurrentPage(true); diff --git a/sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx b/sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx index ccf42d0db77e..bb75d83f4da3 100644 --- a/sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx +++ b/sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx @@ -548,7 +548,7 @@ void ScrollBarManager::Scroll( case Orientation_Horizontal: bIsVertical = false; break; case Orientation_Vertical: bIsVertical = true; break; default: - OSL_ASSERT(eOrientation==Orientation_Horizontal || eOrientation==Orientation_Vertical); + assert(eOrientation==Orientation_Horizontal || eOrientation==Orientation_Vertical); return; } diff --git a/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx b/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx index 08671ecbbd63..766458d28cfe 100644 --- a/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx +++ b/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx @@ -619,7 +619,7 @@ void SelectionFunction::GotoNextPage (int nOffset) if (pDescriptor.get() != nullptr) { SdPage* pPage = pDescriptor->GetPage(); - OSL_ASSERT(pPage!=nullptr); + assert(pPage!=nullptr); sal_Int32 nIndex = (pPage->GetPageNum()-1) / 2; GotoPage(nIndex + nOffset); } @@ -642,7 +642,7 @@ void SelectionFunction::GotoPage (int nIndex) mpModeHandler->SetCurrentPage(pNextPageDescriptor); else { - OSL_ASSERT(pNextPageDescriptor.get() != nullptr); + assert(pNextPageDescriptor.get() != nullptr); } ResetShiftKeySelectionAnchor(); } @@ -1549,7 +1549,7 @@ bool DragAndDropModeHandler::ProcessButtonUpEvent ( bool DragAndDropModeHandler::ProcessDragEvent (SelectionFunction::EventDescriptor& rDescriptor) { - OSL_ASSERT(mpDragAndDropContext); + assert(mpDragAndDropContext); if (rDescriptor.mbIsLeaving) { diff --git a/sd/source/ui/slidesorter/controller/SlsSelectionManager.cxx b/sd/source/ui/slidesorter/controller/SlsSelectionManager.cxx index 60fc8565dc03..50d865cbc513 100644 --- a/sd/source/ui/slidesorter/controller/SlsSelectionManager.cxx +++ b/sd/source/ui/slidesorter/controller/SlsSelectionManager.cxx @@ -150,7 +150,7 @@ void SelectionManager::DeleteSelectedPages (const bool bSelectFollowingPage) void SelectionManager::DeleteSelectedNormalPages (const ::std::vector<SdPage*>& rSelectedPages) { // Prepare the deletion via the UNO API. - OSL_ASSERT(mrSlideSorter.GetModel().GetEditMode() == EditMode::Page); + assert(mrSlideSorter.GetModel().GetEditMode() == EditMode::Page); try { @@ -183,7 +183,7 @@ void SelectionManager::DeleteSelectedNormalPages (const ::std::vector<SdPage*>& void SelectionManager::DeleteSelectedMasterPages (const ::std::vector<SdPage*>& rSelectedPages) { // Prepare the deletion via the UNO API. - OSL_ASSERT(mrSlideSorter.GetModel().GetEditMode() == EditMode::MasterPage); + assert(mrSlideSorter.GetModel().GetEditMode() == EditMode::MasterPage); try { @@ -230,7 +230,7 @@ void SelectionManager::SelectionHasChanged () pViewShell->Invalidate (SID_STATUS_PAGE); pViewShell->Invalidate (SID_STATUS_LAYOUT); - OSL_ASSERT(mrController.GetCurrentSlideManager()); + assert(mrController.GetCurrentSlideManager()); SharedPageDescriptor pDescriptor(mrController.GetCurrentSlideManager()->GetCurrentSlide()); if (pDescriptor.get() != nullptr) pViewShell->UpdatePreview(pDescriptor->GetPage()); @@ -297,7 +297,7 @@ void SelectionManager::SetInsertionPosition (const sal_Int32 nInsertionPosition) else if (nInsertionPosition > mrSlideSorter.GetModel().GetPageCount()) { // Assert but then ignore invalid values. - OSL_ASSERT(nInsertionPosition<=mrSlideSorter.GetModel().GetPageCount()); + assert(nInsertionPosition<=mrSlideSorter.GetModel().GetPageCount()); return; } else diff --git a/sd/source/ui/slidesorter/controller/SlsSelectionObserver.cxx b/sd/source/ui/slidesorter/controller/SlsSelectionObserver.cxx index cf1ed111faaf..4f5a669fa339 100644 --- a/sd/source/ui/slidesorter/controller/SlsSelectionObserver.cxx +++ b/sd/source/ui/slidesorter/controller/SlsSelectionObserver.cxx @@ -89,21 +89,21 @@ void SelectionObserver::NotifyPageEvent (const SdrPage* pSdrPage) void SelectionObserver::StartObservation() { - OSL_ASSERT(!mbIsOvservationActive); + assert(!mbIsOvservationActive); maInsertedPages.clear(); mbIsOvservationActive = true; } void SelectionObserver::AbortObservation() { - OSL_ASSERT(mbIsOvservationActive); + assert(mbIsOvservationActive); mbIsOvservationActive = false; maInsertedPages.clear(); } void SelectionObserver::EndObservation() { - OSL_ASSERT(mbIsOvservationActive); + assert(mbIsOvservationActive); mbIsOvservationActive = false; PageSelector& rSelector (mrSlideSorter.GetController().GetPageSelector()); diff --git a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx index b4dfa803e5db..256d5399f9a0 100644 --- a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx +++ b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx @@ -1177,7 +1177,7 @@ sal_Int32 SlotManager::GetInsertionPosition() return nIndex; // We should never get here. - OSL_ASSERT(false); + assert(false); return rSelector.GetPageCount() - 1; } @@ -1192,7 +1192,7 @@ sal_Int32 SlotManager::GetInsertionPosition() else { // We should never get here because there has to be at least one page. - OSL_ASSERT(false); + assert(false); return -1; } } diff --git a/sd/source/ui/slidesorter/model/SlideSorterModel.cxx b/sd/source/ui/slidesorter/model/SlideSorterModel.cxx index 0416857d716a..cf51887bc5c5 100644 --- a/sd/source/ui/slidesorter/model/SlideSorterModel.cxx +++ b/sd/source/ui/slidesorter/model/SlideSorterModel.cxx @@ -78,19 +78,19 @@ namespace { if ( ! pDescriptor) { PrintModel(rModel); - OSL_ASSERT(pDescriptor); + assert(pDescriptor); return false; } if (nIndex != pDescriptor->GetPageIndex()) { PrintModel(rModel); - OSL_ASSERT(nIndex == pDescriptor->GetPageIndex()); + assert(nIndex == pDescriptor->GetPageIndex()); return false; } if (nIndex != pDescriptor->GetVisualState().mnPageId) { PrintModel(rModel); - OSL_ASSERT(nIndex == pDescriptor->GetVisualState().mnPageId); + assert(nIndex == pDescriptor->GetVisualState().mnPageId); return false; } } @@ -462,7 +462,7 @@ void SlideSorterModel::UpdatePageList() default: // We should never get here. - OSL_ASSERT(false); + assert(false); break; } } @@ -618,7 +618,7 @@ void SlideSorterModel::UpdateIndices (const sal_Int32 nFirstIndex) { if (rpDescriptor->GetPageIndex()!=nDescriptorIndex) { - OSL_ASSERT(rpDescriptor->GetPageIndex()==nDescriptorIndex); + assert(rpDescriptor->GetPageIndex()==nDescriptorIndex); } } else diff --git a/sd/source/ui/slidesorter/model/SlsPageDescriptor.cxx b/sd/source/ui/slidesorter/model/SlsPageDescriptor.cxx index 39211e967b21..0737d00cada6 100644 --- a/sd/source/ui/slidesorter/model/SlsPageDescriptor.cxx +++ b/sd/source/ui/slidesorter/model/SlsPageDescriptor.cxx @@ -50,8 +50,8 @@ PageDescriptor::PageDescriptor ( mbIsMouseOver(false), mbHasTransition(false) { - OSL_ASSERT(mpPage); - OSL_ASSERT(mpPage == SdPage::getImplementation(rxPage)); + assert(mpPage); + assert(mpPage == SdPage::getImplementation(rxPage)); if (mpPage != nullptr) { if (mpPage->TRG_HasMasterPage()) @@ -125,7 +125,7 @@ bool PageDescriptor::HasState (const State eState) const return mpPage!=nullptr && mpPage->IsExcluded(); default: - OSL_ASSERT(false); + assert(false); return false; } } @@ -205,7 +205,7 @@ void PageDescriptor::SetCoreSelection() mpPage->SetSelected(false); else { - OSL_ASSERT(mpPage!=nullptr); + assert(mpPage!=nullptr); } } diff --git a/sd/source/ui/slidesorter/shell/SlideSorter.cxx b/sd/source/ui/slidesorter/shell/SlideSorter.cxx index 37a710a45663..80ff622427bd 100644 --- a/sd/source/ui/slidesorter/shell/SlideSorter.cxx +++ b/sd/source/ui/slidesorter/shell/SlideSorter.cxx @@ -213,19 +213,19 @@ SlideSorter::~SlideSorter() model::SlideSorterModel& SlideSorter::GetModel() const { - OSL_ASSERT(mpSlideSorterModel.get()!=nullptr); + assert(mpSlideSorterModel.get()!=nullptr); return *mpSlideSorterModel; } view::SlideSorterView& SlideSorter::GetView() const { - OSL_ASSERT(mpSlideSorterView.get()!=nullptr); + assert(mpSlideSorterView.get()!=nullptr); return *mpSlideSorterView; } controller::SlideSorterController& SlideSorter::GetController() const { - OSL_ASSERT(mpSlideSorterController.get()!=nullptr); + assert(mpSlideSorterController.get()!=nullptr); return *mpSlideSorterController; } @@ -325,7 +325,7 @@ model::SlideSorterModel* SlideSorter::CreateModel() ViewShellBase* pViewShellBase = GetViewShellBase(); if (pViewShellBase != nullptr) { - OSL_ASSERT (pViewShellBase->GetDocument() != nullptr); + assert (pViewShellBase->GetDocument() != nullptr); return new model::SlideSorterModel(*this); } @@ -410,13 +410,13 @@ void SlideSorter::SetCurrentFunction (const rtl::Reference<FuPoor>& rpFunction) std::shared_ptr<controller::Properties> const & SlideSorter::GetProperties() const { - OSL_ASSERT(mpProperties); + assert(mpProperties); return mpProperties; } std::shared_ptr<view::Theme> const & SlideSorter::GetTheme() const { - OSL_ASSERT(mpTheme); + assert(mpTheme); return mpTheme; } diff --git a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx index 1f015f1ae9bc..b72f1f48c717 100644 --- a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx +++ b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx @@ -255,7 +255,7 @@ css::uno::Reference<css::accessibility::XAccessible> if (mpView == nullptr || mpSlideSorter.get() == nullptr) return nullptr; - OSL_ASSERT(mpSlideSorter.get()!=nullptr); + assert(mpSlideSorter.get()!=nullptr); ::accessibility::AccessibleSlideSorterView *pAccessibleView = new ::accessibility::AccessibleSlideSorterView( @@ -283,13 +283,13 @@ void SlideSorterViewShell::SwitchViewFireFocus(const css::uno::Reference< css::a SlideSorter& SlideSorterViewShell::GetSlideSorter() const { - OSL_ASSERT(mpSlideSorter.get()!=nullptr); + assert(mpSlideSorter.get()!=nullptr); return *mpSlideSorter; } bool SlideSorterViewShell::RelocateToParentWindow (vcl::Window* pParentWindow) { - OSL_ASSERT(mpSlideSorter); + assert(mpSlideSorter); if ( ! mpSlideSorter) return false; @@ -357,32 +357,32 @@ SdPage* SlideSorterViewShell::GetActualPage() void SlideSorterViewShell::GetMenuState ( SfxItemSet& rSet) { ViewShell::GetMenuState(rSet); - OSL_ASSERT(mpSlideSorter.get()!=nullptr); + assert(mpSlideSorter.get()!=nullptr); mpSlideSorter->GetController().GetSlotManager()->GetMenuState(rSet); } void SlideSorterViewShell::GetClipboardState ( SfxItemSet& rSet) { ViewShell::GetMenuState(rSet); - OSL_ASSERT(mpSlideSorter.get()!=nullptr); + assert(mpSlideSorter.get()!=nullptr); mpSlideSorter->GetController().GetSlotManager()->GetClipboardState(rSet); } void SlideSorterViewShell::ExecCtrl (SfxRequest& rRequest) { - OSL_ASSERT(mpSlideSorter.get()!=nullptr); + assert(mpSlideSorter.get()!=nullptr); mpSlideSorter->GetController().ExecCtrl(rRequest); } void SlideSorterViewShell::GetCtrlState (SfxItemSet& rSet) { - OSL_ASSERT(mpSlideSorter.get()!=nullptr); + assert(mpSlideSorter.get()!=nullptr); mpSlideSorter->GetController().GetCtrlState(rSet); } void SlideSorterViewShell::FuSupport (SfxRequest& rRequest) { - OSL_ASSERT(mpSlideSorter.get()!=nullptr); + assert(mpSlideSorter.get()!=nullptr); mpSlideSorter->GetController().FuSupport(rRequest); } @@ -391,7 +391,7 @@ void SlideSorterViewShell::FuSupport (SfxRequest& rRequest) */ void SlideSorterViewShell::FuTemporary (SfxRequest& rRequest) { - OSL_ASSERT(mpSlideSorter.get()!=nullptr); + assert(mpSlideSorter.get()!=nullptr); switch (rRequest.GetSlot()) { case SID_MODIFYPAGE: @@ -415,19 +415,19 @@ void SlideSorterViewShell::FuTemporary (SfxRequest& rRequest) void SlideSorterViewShell::GetStatusBarState (SfxItemSet& rSet) { - OSL_ASSERT(mpSlideSorter.get()!=nullptr); + assert(mpSlideSorter.get()!=nullptr); mpSlideSorter->GetController().GetStatusBarState(rSet); } void SlideSorterViewShell::FuPermanent (SfxRequest& rRequest) { - OSL_ASSERT(mpSlideSorter.get()!=nullptr); + assert(mpSlideSorter.get()!=nullptr); mpSlideSorter->GetController().FuPermanent(rRequest); } void SlideSorterViewShell::GetAttrState (SfxItemSet& rSet) { - OSL_ASSERT(mpSlideSorter.get()!=nullptr); + assert(mpSlideSorter.get()!=nullptr); mpSlideSorter->GetController().GetAttrState(rSet); } @@ -440,7 +440,7 @@ void SlideSorterViewShell::Paint ( ::sd::Window* pWindow) { SetActiveWindow (pWindow); - OSL_ASSERT(mpSlideSorter); + assert(mpSlideSorter); if (mpSlideSorter) mpSlideSorter->GetController().Paint(rBBox,pWindow); } @@ -449,7 +449,7 @@ void SlideSorterViewShell::ArrangeGUIElements() { if (IsActive()) { - OSL_ASSERT(mpSlideSorter.get()!=nullptr); + assert(mpSlideSorter.get()!=nullptr); mpSlideSorter->ArrangeGUIElements(maViewPos, maViewSize); mbIsArrangeGUIElementsPending = false; } @@ -503,14 +503,14 @@ void SlideSorterViewShell::Command ( const CommandEvent& rEvent, ::sd::Window* pWindow) { - OSL_ASSERT(mpSlideSorter.get()!=nullptr); + assert(mpSlideSorter.get()!=nullptr); if ( ! mpSlideSorter->GetController().Command (rEvent, pWindow)) ViewShell::Command (rEvent, pWindow); } void SlideSorterViewShell::ReadFrameViewData (FrameView* pFrameView) { - OSL_ASSERT(mpSlideSorter.get()!=nullptr); + assert(mpSlideSorter.get()!=nullptr); if (pFrameView != nullptr) { view::SlideSorterView& rView (mpSlideSorter->GetView()); @@ -546,7 +546,7 @@ void SlideSorterViewShell::ReadFrameViewData (FrameView* pFrameView) void SlideSorterViewShell::WriteFrameViewData() { - OSL_ASSERT(mpSlideSorter.get()!=nullptr); + assert(mpSlideSorter.get()!=nullptr); if (mpFrameView != nullptr) { view::SlideSorterView& rView (mpSlideSorter->GetView()); @@ -584,7 +584,7 @@ void SlideSorterViewShell::SetZoom (long int ) void SlideSorterViewShell::SetZoomRect (const ::tools::Rectangle& rZoomRect) { - OSL_ASSERT(mpSlideSorter.get()!=nullptr); + assert(mpSlideSorter.get()!=nullptr); Size aPageSize (mpSlideSorter->GetView().GetLayouter().GetPageObjectSize()); ::tools::Rectangle aRect(rZoomRect); @@ -632,7 +632,7 @@ void SlideSorterViewShell::StartDrag ( const Point& rDragPt, vcl::Window* pWindow ) { - OSL_ASSERT(mpSlideSorter.get()!=nullptr); + assert(mpSlideSorter.get()!=nullptr); mpSlideSorter->GetController().GetClipboard().StartDrag ( rDragPt, pWindow); @@ -645,7 +645,7 @@ sal_Int8 SlideSorterViewShell::AcceptDrop ( sal_uInt16 nPage, sal_uInt16 nLayer) { - OSL_ASSERT(mpSlideSorter.get()!=nullptr); + assert(mpSlideSorter.get()!=nullptr); return mpSlideSorter->GetController().GetClipboard().AcceptDrop ( rEvt, rTargetHelper, @@ -661,7 +661,7 @@ sal_Int8 SlideSorterViewShell::ExecuteDrop ( sal_uInt16 nPage, sal_uInt16 nLayer) { - OSL_ASSERT(mpSlideSorter.get()!=nullptr); + assert(mpSlideSorter.get()!=nullptr); return mpSlideSorter->GetController().GetClipboard().ExecuteDrop ( rEvt, rTargetHelper, @@ -673,28 +673,28 @@ sal_Int8 SlideSorterViewShell::ExecuteDrop ( std::shared_ptr<SlideSorterViewShell::PageSelection> SlideSorterViewShell::GetPageSelection() const { - OSL_ASSERT(mpSlideSorter.get()!=nullptr); + assert(mpSlideSorter.get()!=nullptr); return mpSlideSorter->GetController().GetPageSelector().GetPageSelection(); } void SlideSorterViewShell::SetPageSelection ( const std::shared_ptr<PageSelection>& rSelection) { - OSL_ASSERT(mpSlideSorter.get()!=nullptr); + assert(mpSlideSorter.get()!=nullptr); mpSlideSorter->GetController().GetPageSelector().SetPageSelection(rSelection, true); } void SlideSorterViewShell::AddSelectionChangeListener ( const Link<LinkParamNone*,void>& rCallback) { - OSL_ASSERT(mpSlideSorter.get()!=nullptr); + assert(mpSlideSorter.get()!=nullptr); mpSlideSorter->GetController().GetSelectionManager()->AddSelectionChangeListener(rCallback); } void SlideSorterViewShell::RemoveSelectionChangeListener ( const Link<LinkParamNone*,void>& rCallback) { - OSL_ASSERT(mpSlideSorter.get()!=nullptr); + assert(mpSlideSorter.get()!=nullptr); mpSlideSorter->GetController().GetSelectionManager()->RemoveSelectionChangeListener(rCallback); } diff --git a/sd/source/ui/slidesorter/view/SlideSorterView.cxx b/sd/source/ui/slidesorter/view/SlideSorterView.cxx index 3a98bfcb0cb6..ddca23bb17ff 100644 --- a/sd/source/ui/slidesorter/view/SlideSorterView.cxx +++ b/sd/source/ui/slidesorter/view/SlideSorterView.cxx @@ -174,7 +174,7 @@ SlideSorterView::~SlideSorterView() { if ( ! mbIsDisposed) { - OSL_ASSERT(mbIsDisposed); + assert(mbIsDisposed); Dispose(); } } @@ -198,7 +198,7 @@ void SlideSorterView::Dispose() // Deletion of the objects and the page will be done in SdrModel // destructor (as long as objects and pages are added) - OSL_ASSERT(mpLayeredDevice.unique()); + assert(mpLayeredDevice.unique()); mpLayeredDevice.reset(); mbIsDisposed = true; @@ -732,7 +732,7 @@ void SlideSorterView::RemoveVisibilityChangeListener(const Link<LinkParamNone*,v ToolTip& SlideSorterView::GetToolTip() const { - OSL_ASSERT(mpToolTip); + assert(mpToolTip); return *mpToolTip; } @@ -841,7 +841,7 @@ SlideSorterView::DrawLock::DrawLock (SlideSorter& rSlideSorter) SlideSorterView::DrawLock::~DrawLock() { - OSL_ASSERT(mrView.mnLockRedrawSmph>0); + assert(mrView.mnLockRedrawSmph>0); --mrView.mnLockRedrawSmph; if (mrView.mnLockRedrawSmph == 0) if (mpWindow) diff --git a/sd/source/ui/slidesorter/view/SlsFramePainter.cxx b/sd/source/ui/slidesorter/view/SlsFramePainter.cxx index 05c97f6a6c51..110f493e8b21 100644 --- a/sd/source/ui/slidesorter/view/SlsFramePainter.cxx +++ b/sd/source/ui/slidesorter/view/SlsFramePainter.cxx @@ -43,9 +43,9 @@ FramePainter::FramePainter (const BitmapEx& rShadowBitmap) } else { - OSL_ASSERT(rShadowBitmap.GetSizePixel().Width() == rShadowBitmap.GetSizePixel().Height()); - OSL_ASSERT((rShadowBitmap.GetSizePixel().Width()-1)%2 == 0); - OSL_ASSERT(((rShadowBitmap.GetSizePixel().Width()-1)/2)%2 == 1); + assert(rShadowBitmap.GetSizePixel().Width() == rShadowBitmap.GetSizePixel().Height()); + assert((rShadowBitmap.GetSizePixel().Width()-1)%2 == 0); + assert(((rShadowBitmap.GetSizePixel().Width()-1)/2)%2 == 1); } } @@ -109,8 +109,8 @@ FramePainter::OffsetBitmap::OffsetBitmap ( : maBitmap(), maOffset() { - OSL_ASSERT(nHorizontalPosition>=-1 && nHorizontalPosition<=+1); - OSL_ASSERT(nVerticalPosition>=-1 && nVerticalPosition<=+1); + assert(nHorizontalPosition>=-1 && nHorizontalPosition<=+1); + assert(nVerticalPosition>=-1 && nVerticalPosition<=+1); const sal_Int32 nS (1); const sal_Int32 nC (::std::max<sal_Int32>(0,(rBitmap.GetSizePixel().Width()-nS)/2)); @@ -208,7 +208,7 @@ void FramePainter::OffsetBitmap::PaintSide ( else { // Diagonal sides indicates an error. - OSL_ASSERT(false); + assert(false); } } diff --git a/sd/source/ui/slidesorter/view/SlsInsertAnimator.cxx b/sd/source/ui/slidesorter/view/SlsInsertAnimator.cxx index 7677b9015d0e..e632dd59df61 100644 --- a/sd/source/ui/slidesorter/view/SlsInsertAnimator.cxx +++ b/sd/source/ui/slidesorter/view/SlsInsertAnimator.cxx @@ -237,7 +237,7 @@ SharedPageObjectRun InsertAnimator::Implementation::GetRun ( nRow, nStartIndex, nEndIndex)).first; - OSL_ASSERT(iRun != maRuns.end()); + assert(iRun != maRuns.end()); } } } @@ -266,7 +266,7 @@ void InsertAnimator::Implementation::AddRun (const std::shared_ptr<PageObjectRun } else { - OSL_ASSERT(rRun); + assert(rRun); } } @@ -280,14 +280,14 @@ void InsertAnimator::Implementation::RemoveRun (const std::shared_ptr<PageObject InsertAnimator::Implementation::RunContainer::const_iterator iRun (FindRun(rRun->mnRunIndex)); if (iRun != maRuns.end()) { - OSL_ASSERT(*iRun == rRun); + assert(*iRun == rRun); maRuns.erase(iRun); } } } else { - OSL_ASSERT(rRun); + assert(rRun); } } diff --git a/sd/source/ui/slidesorter/view/SlsLayeredDevice.cxx b/sd/source/ui/slidesorter/view/SlsLayeredDevice.cxx index 276dc2cd791b..dce3744e2c80 100644 --- a/sd/source/ui/slidesorter/view/SlsLayeredDevice.cxx +++ b/sd/source/ui/slidesorter/view/SlsLayeredDevice.cxx @@ -72,7 +72,7 @@ void DeviceCopy ( void ForAllRectangles (const vcl::Region& rRegion, const std::function<void (const ::tools::Rectangle&)>& aFunction) { - OSL_ASSERT(aFunction); + assert(aFunction); RectangleVector aRectangles; rRegion.GetRegionRectangles(aRectangles); @@ -174,7 +174,7 @@ void LayeredDevice::Invalidate ( { if (nLayer<0 || size_t(nLayer)>=mpLayers->size()) { - OSL_ASSERT(nLayer>=0 && size_t(nLayer)<mpLayers->size()); + assert(nLayer>=0 && size_t(nLayer)<mpLayers->size()); return; } @@ -197,15 +197,15 @@ void LayeredDevice::RegisterPainter ( const SharedILayerPainter& rpPainter, const sal_Int32 nLayer) { - OSL_ASSERT(mpLayers); + assert(mpLayers); if ( ! rpPainter) { - OSL_ASSERT(rpPainter); + assert(rpPainter); return; } if (nLayer<0 || nLayer>=gnMaximumLayerCount) { - OSL_ASSERT(nLayer>=0 && nLayer<gnMaximumLayerCount); + assert(nLayer>=0 && nLayer<gnMaximumLayerCount); return; } @@ -233,12 +233,12 @@ void LayeredDevice::RemovePainter ( { if ( ! rpPainter) { - OSL_ASSERT(rpPainter); + assert(rpPainter); return; } if (nLayer<0 || size_t(nLayer)>=mpLayers->size()) { - OSL_ASSERT(nLayer>=0 && size_t(nLayer)<mpLayers->size()); + assert(nLayer>=0 && size_t(nLayer)<mpLayers->size()); return; } @@ -360,7 +360,7 @@ bool LayeredDevice::HandleMapModeChange() else { // Can this happen? Lets trigger a warning when it does. - OSL_ASSERT(false); + assert(false); } maSavedMapMode = rMapMode; @@ -461,7 +461,7 @@ void Layer::Resize (const Size& rSize) void Layer::AddPainter (const SharedILayerPainter& rpPainter) { - OSL_ASSERT(::std::find(maPainters.begin(), maPainters.end(), rpPainter) == maPainters.end()); + assert(::std::find(maPainters.begin(), maPainters.end(), rpPainter) == maPainters.end()); maPainters.push_back(rpPainter); } diff --git a/sd/source/ui/slidesorter/view/SlsLayouter.cxx b/sd/source/ui/slidesorter/view/SlsLayouter.cxx index 1728cc390c3f..e276b5f95514 100644 --- a/sd/source/ui/slidesorter/view/SlsLayouter.cxx +++ b/sd/source/ui/slidesorter/view/SlsLayouter.cxx @@ -325,7 +325,7 @@ bool Layouter::Rearrange ( const Size& rPageSize, const sal_uInt32 nPageCount) { - OSL_ASSERT(mpWindow); + assert(mpWindow); if (eOrientation != mpImplementation->GetOrientation()) mpImplementation.reset(Implementation::Create(*mpImplementation, eOrientation)); @@ -842,7 +842,7 @@ Size Layouter::Implementation::GetTargetSize ( return maPreferredSize; if ( ! (bCalculateWidth || bCalculateHeight)) { - OSL_ASSERT(bCalculateWidth || bCalculateHeight); + assert(bCalculateWidth || bCalculateHeight); return maPreferredSize; } diff --git a/sd/source/ui/slidesorter/view/SlsPageObjectLayouter.cxx b/sd/source/ui/slidesorter/view/SlsPageObjectLayouter.cxx index b4d41cc4ddff..39e25aec4800 100644 --- a/sd/source/ui/slidesorter/view/SlsPageObjectLayouter.cxx +++ b/sd/source/ui/slidesorter/view/SlsPageObjectLayouter.cxx @@ -165,7 +165,7 @@ PageObjectLayouter::~PageObjectLayouter() const CoordinateSystem eCoordinateSystem, bool bIgnoreLocation) { - OSL_ASSERT(rpPageDescriptor); + assert(rpPageDescriptor); Point aLocation(0,0); if (rpPageDescriptor) aLocation = rpPageDescriptor->GetLocation( bIgnoreLocation ); @@ -228,7 +228,7 @@ Size PageObjectLayouter::GetGridMaxSize() Size PageObjectLayouter::GetPageNumberAreaSize (const int nPageCount) { - OSL_ASSERT(mpWindow); + assert(mpWindow); // Set the correct font. vcl::Font aOriginalFont (mpWindow->GetFont()); diff --git a/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx b/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx index 51d361205b36..4695a1a2f129 100644 --- a/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx +++ b/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx @@ -258,7 +258,7 @@ void PageObjectPainter::PaintPageNumber ( } // Paint the page number. - OSL_ASSERT(rpDescriptor->GetPage()!=nullptr); + assert(rpDescriptor->GetPage()!=nullptr); const sal_Int32 nPageNumber ((rpDescriptor->GetPage()->GetPageNum() - 1) / 2 + 1); const OUString sPageNumber(OUString::number(nPageNumber)); rDevice.SetFont(*mpPageNumberFont); diff --git a/sd/source/ui/slidesorter/view/SlsTheme.cxx b/sd/source/ui/slidesorter/view/SlsTheme.cxx index c204140ab45f..2398bb938256 100644 --- a/sd/source/ui/slidesorter/view/SlsTheme.cxx +++ b/sd/source/ui/slidesorter/view/SlsTheme.cxx @@ -223,7 +223,7 @@ const BitmapEx& Theme::GetIcon (const IconType eType) return maIcons[eType]; else { - OSL_ASSERT(eType>=0 && size_t(eType)<maIcons.size()); + assert(eType>=0 && size_t(eType)<maIcons.size()); return maIcons[0]; } } @@ -234,7 +234,7 @@ Theme::GradientDescriptor& Theme::GetGradient (const GradientColorType eType) return maGradients[eType]; else { - OSL_ASSERT(eType>=0 && size_t(eType)<maGradients.size()); + assert(eType>=0 && size_t(eType)<maGradients.size()); return maGradients[0]; } } @@ -248,7 +248,7 @@ void Theme::InitializeIcon(const IconType eType, const OUString& rResourceId) } else { - OSL_ASSERT(eType>=0 && size_t(eType)<maIcons.size()); + assert(eType>=0 && size_t(eType)<maIcons.size()); } } diff --git a/sd/source/ui/slidesorter/view/SlsToolTip.cxx b/sd/source/ui/slidesorter/view/SlsToolTip.cxx index 515520b8371a..8707e5db3d99 100644 --- a/sd/source/ui/slidesorter/view/SlsToolTip.cxx +++ b/sd/source/ui/slidesorter/view/SlsToolTip.cxx @@ -73,7 +73,7 @@ void ToolTip::SetPage (const model::SharedPageDescriptor& rpDescriptor) sHelpText = pPage->GetName(); else { - OSL_ASSERT(mpDescriptor->GetPage() != nullptr); + assert(mpDescriptor->GetPage() != nullptr); } if (sHelpText.isEmpty()) { |