diff options
author | Bernhard Widl <bernhard.widl@cib.de> | 2017-06-30 11:15:36 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2017-06-30 18:04:29 +0200 |
commit | e1fc7ea54a6dc76378fee8880530b24ca33039b6 (patch) | |
tree | 22a9621520a0c0ff1fd9da795f41aa7dab2f49f8 | |
parent | 77f98204ba2fbb51b0a0bb2ac94b839249eec9a4 (diff) |
fdo#43157 convert OSL_ASSERT to assert in sd/source/ui/slidesorter
Change-Id: I2348501e620defa7997d257c230fe6a6ac351fca
Reviewed-on: https://gerrit.libreoffice.org/39407
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
4 files changed, 40 insertions, 40 deletions
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 b972daacfd09..b17392dc14a8 100644 --- a/sd/source/ui/slidesorter/shell/SlideSorter.cxx +++ b/sd/source/ui/slidesorter/shell/SlideSorter.cxx @@ -211,19 +211,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; } @@ -323,7 +323,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); } @@ -406,13 +406,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 ef7d146c8d9d..650ccd022fe1 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, SdrLayerID 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, SdrLayerID 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); } |