summaryrefslogtreecommitdiff
path: root/sd/source/ui/slidesorter/controller
diff options
context:
space:
mode:
Diffstat (limited to 'sd/source/ui/slidesorter/controller')
-rw-r--r--sd/source/ui/slidesorter/controller/SlideSorterController.cxx22
-rw-r--r--sd/source/ui/slidesorter/controller/SlsAnimator.cxx12
-rw-r--r--sd/source/ui/slidesorter/controller/SlsCurrentSlideManager.cxx6
-rw-r--r--sd/source/ui/slidesorter/controller/SlsFocusManager.cxx4
-rw-r--r--sd/source/ui/slidesorter/controller/SlsInsertionIndicatorHandler.cxx2
-rw-r--r--sd/source/ui/slidesorter/controller/SlsListener.cxx4
-rw-r--r--sd/source/ui/slidesorter/controller/SlsPageSelector.cxx2
-rw-r--r--sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx2
-rw-r--r--sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx6
-rw-r--r--sd/source/ui/slidesorter/controller/SlsSelectionManager.cxx8
-rw-r--r--sd/source/ui/slidesorter/controller/SlsSelectionObserver.cxx6
-rw-r--r--sd/source/ui/slidesorter/controller/SlsSlotManager.cxx4
12 files changed, 39 insertions, 39 deletions
diff --git a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx
index 8a6bb541c727..dfbf1692ef8d 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());
- assert(pWindow);
+ OSL_ASSERT(pWindow);
if (pWindow)
{
// The whole background is painted by the view and controls.
vcl::Window* pParentWindow = pWindow->GetParent();
- assert(pParentWindow!=nullptr);
+ OSL_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()
{
- assert(mpPageSelector.get()!=nullptr);
+ OSL_ASSERT(mpPageSelector.get()!=nullptr);
return *mpPageSelector.get();
}
FocusManager& SlideSorterController::GetFocusManager()
{
- assert(mpFocusManager.get()!=nullptr);
+ OSL_ASSERT(mpFocusManager.get()!=nullptr);
return *mpFocusManager.get();
}
Clipboard& SlideSorterController::GetClipboard()
{
- assert(mpClipboard.get()!=nullptr);
+ OSL_ASSERT(mpClipboard.get()!=nullptr);
return *mpClipboard.get();
}
ScrollBarManager& SlideSorterController::GetScrollBarManager()
{
- assert(mpScrollBarManager.get()!=nullptr);
+ OSL_ASSERT(mpScrollBarManager.get()!=nullptr);
return *mpScrollBarManager.get();
}
std::shared_ptr<CurrentSlideManager> const & SlideSorterController::GetCurrentSlideManager() const
{
- assert(mpCurrentSlideManager.get()!=nullptr);
+ OSL_ASSERT(mpCurrentSlideManager.get()!=nullptr);
return mpCurrentSlideManager;
}
std::shared_ptr<SlotManager> const & SlideSorterController::GetSlotManager() const
{
- assert(mpSlotManager.get()!=nullptr);
+ OSL_ASSERT(mpSlotManager.get()!=nullptr);
return mpSlotManager;
}
std::shared_ptr<SelectionManager> const & SlideSorterController::GetSelectionManager() const
{
- assert(mpSelectionManager.get()!=nullptr);
+ OSL_ASSERT(mpSelectionManager.get()!=nullptr);
return mpSelectionManager;
}
std::shared_ptr<InsertionIndicatorHandler> const &
SlideSorterController::GetInsertionIndicatorHandler() const
{
- assert(mpInsertionIndicatorHandler.get()!=nullptr);
+ OSL_ASSERT(mpInsertionIndicatorHandler.get()!=nullptr);
return mpInsertionIndicatorHandler;
}
@@ -881,7 +881,7 @@ void SlideSorterController::SetDocumentSlides (const Reference<container::XIndex
VisibleAreaManager& SlideSorterController::GetVisibleAreaManager() const
{
- assert(mpVisibleAreaManager);
+ OSL_ASSERT(mpVisibleAreaManager);
return *mpVisibleAreaManager;
}
diff --git a/sd/source/ui/slidesorter/controller/SlsAnimator.cxx b/sd/source/ui/slidesorter/controller/SlsAnimator.cxx
index 19fe97286de0..fd6a63ebdf6a 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)
{
- assert(mbIsDisposed);
+ OSL_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.)
- assert( ! mbIsDisposed);
+ OSL_ASSERT( ! mbIsDisposed);
if (mbIsDisposed)
return -1;
@@ -123,7 +123,7 @@ Animator::AnimationId Animator::AddAnimation (
void Animator::RemoveAnimation (const Animator::AnimationId nId)
{
- assert( ! mbIsDisposed);
+ OSL_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())
{
- assert((*iAnimation)->mnAnimationId == nId);
+ OSL_ASSERT((*iAnimation)->mnAnimationId == nId);
(*iAnimation)->Expire();
maAnimations.erase(iAnimation);
}
@@ -166,7 +166,7 @@ bool Animator::ProcessAnimations (const double nTime)
{
bool bExpired (false);
- assert( ! mbIsDisposed);
+ OSL_ASSERT( ! mbIsDisposed);
if (mbIsDisposed)
return bExpired;
@@ -182,7 +182,7 @@ bool Animator::ProcessAnimations (const double nTime)
void Animator::CleanUpAnimationList()
{
- assert( ! mbIsDisposed);
+ OSL_ASSERT( ! mbIsDisposed);
if (mbIsDisposed)
return;
diff --git a/sd/source/ui/slidesorter/controller/SlsCurrentSlideManager.cxx b/sd/source/ui/slidesorter/controller/SlsCurrentSlideManager.cxx
index 0c14dd8fe02c..47d2aa64e00c 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)
{
- assert(rpDescriptor.get() != nullptr);
+ OSL_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)
{
- assert(rpDescriptor.get() != nullptr);
+ OSL_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)
{
- assert(rpDescriptor.get() != nullptr);
+ OSL_ASSERT(rpDescriptor.get() != nullptr);
try
{
diff --git a/sd/source/ui/slidesorter/controller/SlsFocusManager.cxx b/sd/source/ui/slidesorter/controller/SlsFocusManager.cxx
index 3c016a32c9b5..3ee0bb0677d0 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)
{
- assert(mnPageIndex>=0);
+ OSL_ASSERT(mnPageIndex>=0);
mnPageIndex = 0;
}
else if (mnPageIndex >= nPageCount)
{
- assert(mnPageIndex<nPageCount);
+ OSL_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 adfccf8b76a9..f162147acdd5 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)
{
- assert(!mbIsActive);
+ OSL_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 4e5499d1f94c..271ff8ad02fa 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)
{
- assert(pDocument!=nullptr);
+ OSL_ASSERT(pDocument!=nullptr);
return;
}
pCacheManager->InvalidatePreviewBitmap(pDocument->getUnoModel(), pPage);
@@ -597,7 +597,7 @@ void Listener::HandleShapeModification (const SdrPage* pPage)
}
else
{
- assert(pCandidate!=nullptr && pCandidate->TRG_HasMasterPage());
+ OSL_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 639369daf677..bf35f39e54a8 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;
- assert(mpSelector->mnUpdateLockCount >= 0);
+ OSL_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 bb75d83f4da3..ccf42d0db77e 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:
- assert(eOrientation==Orientation_Horizontal || eOrientation==Orientation_Vertical);
+ OSL_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 766458d28cfe..08671ecbbd63 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();
- assert(pPage!=nullptr);
+ OSL_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
{
- assert(pNextPageDescriptor.get() != nullptr);
+ OSL_ASSERT(pNextPageDescriptor.get() != nullptr);
}
ResetShiftKeySelectionAnchor();
}
@@ -1549,7 +1549,7 @@ bool DragAndDropModeHandler::ProcessButtonUpEvent (
bool DragAndDropModeHandler::ProcessDragEvent (SelectionFunction::EventDescriptor& rDescriptor)
{
- assert(mpDragAndDropContext);
+ OSL_ASSERT(mpDragAndDropContext);
if (rDescriptor.mbIsLeaving)
{
diff --git a/sd/source/ui/slidesorter/controller/SlsSelectionManager.cxx b/sd/source/ui/slidesorter/controller/SlsSelectionManager.cxx
index 50d865cbc513..60fc8565dc03 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.
- assert(mrSlideSorter.GetModel().GetEditMode() == EditMode::Page);
+ OSL_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.
- assert(mrSlideSorter.GetModel().GetEditMode() == EditMode::MasterPage);
+ OSL_ASSERT(mrSlideSorter.GetModel().GetEditMode() == EditMode::MasterPage);
try
{
@@ -230,7 +230,7 @@ void SelectionManager::SelectionHasChanged ()
pViewShell->Invalidate (SID_STATUS_PAGE);
pViewShell->Invalidate (SID_STATUS_LAYOUT);
- assert(mrController.GetCurrentSlideManager());
+ OSL_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.
- assert(nInsertionPosition<=mrSlideSorter.GetModel().GetPageCount());
+ OSL_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 4f5a669fa339..cf1ed111faaf 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()
{
- assert(!mbIsOvservationActive);
+ OSL_ASSERT(!mbIsOvservationActive);
maInsertedPages.clear();
mbIsOvservationActive = true;
}
void SelectionObserver::AbortObservation()
{
- assert(mbIsOvservationActive);
+ OSL_ASSERT(mbIsOvservationActive);
mbIsOvservationActive = false;
maInsertedPages.clear();
}
void SelectionObserver::EndObservation()
{
- assert(mbIsOvservationActive);
+ OSL_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 256d5399f9a0..b4dfa803e5db 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.
- assert(false);
+ OSL_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.
- assert(false);
+ OSL_ASSERT(false);
return -1;
}
}