diff options
author | Chris Sherlock <chris.sherlock79@gmail.com> | 2017-05-07 14:46:42 +1000 |
---|---|---|
committer | Chris Sherlock <chris.sherlock79@gmail.com> | 2017-05-07 14:46:42 +1000 |
commit | d0a99cc2ed76be220f7e868e332ba19f6e48a440 (patch) | |
tree | 56addcedd12a0a4f16471e55c46a7835857d5555 /sd/source/ui/view | |
parent | 3965f4cb28676133dc37a926e56b4d612e2a57ba (diff) |
tdf#43157: convert sd module away from OSL_ASSERT to assert
Change-Id: I1e768d23da6adb1a3fe351a8105286b0cb5b5192
Diffstat (limited to 'sd/source/ui/view')
-rw-r--r-- | sd/source/ui/view/DocumentRenderer.cxx | 20 | ||||
-rw-r--r-- | sd/source/ui/view/FormShellManager.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/view/Outliner.cxx | 14 | ||||
-rw-r--r-- | sd/source/ui/view/OutlinerIterator.cxx | 6 | ||||
-rw-r--r-- | sd/source/ui/view/ToolBarManager.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/view/ViewShellBase.cxx | 24 | ||||
-rw-r--r-- | sd/source/ui/view/ViewShellManager.cxx | 10 | ||||
-rw-r--r-- | sd/source/ui/view/drviews1.cxx | 6 | ||||
-rw-r--r-- | sd/source/ui/view/drviews3.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/view/drviews4.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/view/drviews5.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/view/drviewsa.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/view/drviewse.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/view/outlnvsh.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/view/sdview3.cxx | 6 | ||||
-rw-r--r-- | sd/source/ui/view/sdview4.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/view/viewshe2.cxx | 12 | ||||
-rw-r--r-- | sd/source/ui/view/viewshel.cxx | 18 |
18 files changed, 70 insertions, 70 deletions
diff --git a/sd/source/ui/view/DocumentRenderer.cxx b/sd/source/ui/view/DocumentRenderer.cxx index f1c6d3186a0d..17e0184b36b1 100644 --- a/sd/source/ui/view/DocumentRenderer.cxx +++ b/sd/source/ui/view/DocumentRenderer.cxx @@ -301,7 +301,7 @@ namespace { // Set the visible layers SdrPageView* pPageView = rPrintView.GetSdrPageView(); - OSL_ASSERT(pPageView!=nullptr); + assert(pPageView!=nullptr); pPageView->SetVisibleLayers(rVisibleLayers); pPageView->SetPrintableLayers(rPrintableLayers); @@ -1183,7 +1183,7 @@ public: */ void ProcessProperties (const css::uno::Sequence<css::beans::PropertyValue >& rOptions) { - OSL_ASSERT(!mbIsDisposed); + assert(!mbIsDisposed); if (mbIsDisposed) return; @@ -1222,7 +1222,7 @@ public: */ sal_Int32 GetPrintPageCount() { - OSL_ASSERT(!mbIsDisposed); + assert(!mbIsDisposed); if (mbIsDisposed) return 0; else @@ -1256,7 +1256,7 @@ public: */ void PrintPage (const sal_Int32 nIndex) { - OSL_ASSERT(!mbIsDisposed); + assert(!mbIsDisposed); if (mbIsDisposed) return; @@ -1267,7 +1267,7 @@ public: return; SdDrawDocument* pDocument = pViewShell->GetDoc(); - OSL_ASSERT(pDocument!=nullptr); + assert(pDocument!=nullptr); std::shared_ptr<DrawViewShell> pDrawViewShell( std::dynamic_pointer_cast<DrawViewShell>(mrBase.GetMainViewShell())); @@ -1279,7 +1279,7 @@ public: return; const std::shared_ptr<PrinterPage> pPage (maPrinterPages[nIndex]); - OSL_ASSERT(pPage); + assert(pPage); if ( ! pPage) return; @@ -1580,8 +1580,8 @@ private: const sal_Int32 nPageIndex, const PageKind ePageKind) const { - OSL_ASSERT(mrBase.GetDocument() != nullptr); - OSL_ASSERT(nPageIndex>=0); + assert(mrBase.GetDocument() != nullptr); + assert(nPageIndex>=0); SdPage* pPage = mrBase.GetDocument()->GetSdPage( sal::static_int_cast<sal_uInt16>(nPageIndex), ePageKind); @@ -1756,7 +1756,7 @@ private: void PrepareHandout (PrintInfo& rInfo) { SdDrawDocument* pDocument = mrBase.GetDocument(); - OSL_ASSERT(pDocument != nullptr); + assert(pDocument != nullptr); SdPage& rHandoutPage (*pDocument->GetSdPage(0, PageKind::Handout)); const bool bScalePage (mpOptions->IsPageSize()); @@ -1871,7 +1871,7 @@ private: const PageKind ePageKind, PrintInfo& rInfo) { - OSL_ASSERT(rInfo.mpPrinter != nullptr); + assert(rInfo.mpPrinter != nullptr); // Fill in page kind specific data. SdDrawDocument* pDocument = mrBase.GetMainViewShell()->GetDoc(); diff --git a/sd/source/ui/view/FormShellManager.cxx b/sd/source/ui/view/FormShellManager.cxx index c5b324aede8b..68cbbb1bdfb0 100644 --- a/sd/source/ui/view/FormShellManager.cxx +++ b/sd/source/ui/view/FormShellManager.cxx @@ -146,7 +146,7 @@ void FormShellManager::RegisterAtCenterPane() WindowEventHandler)); // Create a shell factory and with it activate the form shell. - OSL_ASSERT(mpSubShellFactory.get()==nullptr); + assert(mpSubShellFactory.get()==nullptr); mpSubShellFactory.reset(new FormShellManagerFactory(*pShell, *this)); mrBase.GetViewShellManager()->AddSubShellFactory(pShell,mpSubShellFactory); mrBase.GetViewShellManager()->ActivateSubShell(*pShell, RID_FORMLAYER_TOOLBOX); @@ -264,7 +264,7 @@ void FormShellManager::Notify(SfxBroadcaster&, const SfxHint& rHint) // If all goes well this listener is called after the // FormShellManager was notified about the dying form shell by the // FormShellManagerFactory. - OSL_ASSERT(mpFormShell==nullptr); + assert(mpFormShell==nullptr); if (mpFormShell != nullptr) { mpFormShell = nullptr; diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx index 0cd8df02d24e..33c289a2c391 100644 --- a/sd/source/ui/view/Outliner.cxx +++ b/sd/source/ui/view/Outliner.cxx @@ -476,7 +476,7 @@ bool SdOutliner::StartSearchAndReplace (const SvxSearchItem* pSearchItem) std::shared_ptr<sd::ViewShell> pViewShell (mpWeakViewShell.lock()); if ( ! pViewShell) { - OSL_ASSERT(pViewShell); + assert(pViewShell); return true; } @@ -539,7 +539,7 @@ void SdOutliner::Initialize (bool bDirectionIsForward) std::shared_ptr<sd::ViewShell> pViewShell (mpWeakViewShell.lock()); if ( ! pViewShell) { - OSL_ASSERT(pViewShell); + assert(pViewShell); return; } @@ -604,7 +604,7 @@ bool SdOutliner::SearchAndReplaceAll() std::shared_ptr<sd::ViewShell> pViewShell (mpWeakViewShell.lock()); if ( ! pViewShell) { - OSL_ASSERT(pViewShell); + assert(pViewShell); return true; } @@ -945,7 +945,7 @@ void SdOutliner::RememberStartPosition() std::shared_ptr<sd::ViewShell> pViewShell (mpWeakViewShell.lock()); if ( ! pViewShell) { - OSL_ASSERT(pViewShell); + assert(pViewShell); return; } @@ -1128,7 +1128,7 @@ void SdOutliner::EndOfSearch() std::shared_ptr<sd::ViewShell> pViewShell (mpWeakViewShell.lock()); if ( ! pViewShell) { - OSL_ASSERT(pViewShell); + assert(pViewShell); return; } @@ -1379,7 +1379,7 @@ void SdOutliner::SetViewMode (PageKind ePageKind) // Save edit mode so that it can be restored when switching the view // shell again. pDrawViewShell = std::dynamic_pointer_cast<sd::DrawViewShell>(pViewShell); - OSL_ASSERT(pDrawViewShell.get()!=nullptr); + assert(pDrawViewShell.get()!=nullptr); if (pDrawViewShell.get() != nullptr) mpImpl->meOriginalEditMode = pDrawViewShell->GetEditMode(); } @@ -1392,7 +1392,7 @@ void SdOutliner::SetPage (EditMode eEditMode, sal_uInt16 nPageIndex) std::shared_ptr<sd::ViewShell> pViewShell (mpWeakViewShell.lock()); std::shared_ptr<sd::DrawViewShell> pDrawViewShell( std::dynamic_pointer_cast<sd::DrawViewShell>(pViewShell)); - OSL_ASSERT(pDrawViewShell.get()!=nullptr); + assert(pDrawViewShell.get()!=nullptr); if (pDrawViewShell.get() != nullptr) { pDrawViewShell->ChangeEditMode(eEditMode, false); diff --git a/sd/source/ui/view/OutlinerIterator.cxx b/sd/source/ui/view/OutlinerIterator.cxx index 0126a1d3a57b..11b83861e922 100644 --- a/sd/source/ui/view/OutlinerIterator.cxx +++ b/sd/source/ui/view/OutlinerIterator.cxx @@ -187,7 +187,7 @@ Iterator OutlinerContainer::CreateSelectionIterator ( bool bDirectionIsForward, IteratorLocation aLocation) { - OSL_ASSERT(rpViewShell.get()); + assert(rpViewShell.get()); sal_Int32 nObjectIndex; @@ -226,7 +226,7 @@ Iterator OutlinerContainer::CreateDocumentIterator ( bool bDirectionIsForward, IteratorLocation aLocation) { - OSL_ASSERT(rpViewShell.get()); + assert(rpViewShell.get()); PageKind ePageKind; EditMode eEditMode; @@ -292,7 +292,7 @@ sal_Int32 OutlinerContainer::GetPageIndex ( bool bDirectionIsForward, IteratorLocation aLocation) { - OSL_ASSERT(rpViewShell); + assert(rpViewShell); sal_Int32 nPageIndex; sal_Int32 nPageCount; diff --git a/sd/source/ui/view/ToolBarManager.cxx b/sd/source/ui/view/ToolBarManager.cxx index c4e2e6fd6561..8949d7b0392b 100644 --- a/sd/source/ui/view/ToolBarManager.cxx +++ b/sd/source/ui/view/ToolBarManager.cxx @@ -743,7 +743,7 @@ void ToolBarManager::Implementation::LockUpdate() DBG_ASSERT(mnLockCount<100, "ToolBarManager lock count unusually high"); if (mnLockCount == 0) { - OSL_ASSERT(mpSynchronousLayouterLock.get()==nullptr); + assert(mpSynchronousLayouterLock.get()==nullptr); mpSynchronousLayouterLock.reset(new LayouterLock(mxLayouter)); } @@ -755,7 +755,7 @@ void ToolBarManager::Implementation::UnlockUpdate() SAL_INFO("sd.view", OSL_THIS_FUNC << ": UnlockUpdate " << mnLockCount); ::osl::MutexGuard aGuard(maMutex); - OSL_ASSERT(mnLockCount>0); + assert(mnLockCount>0); --mnLockCount; if (mnLockCount == 0) { diff --git a/sd/source/ui/view/ViewShellBase.cxx b/sd/source/ui/view/ViewShellBase.cxx index 308e28f890af..65913edae752 100644 --- a/sd/source/ui/view/ViewShellBase.cxx +++ b/sd/source/ui/view/ViewShellBase.cxx @@ -487,7 +487,7 @@ void ViewShellBase::OuterResizePixel (const Point& rOrigin, const Size &rSize) void ViewShellBase::Rearrange() { - OSL_ASSERT(GetViewFrame()!=nullptr); + assert(GetViewFrame()!=nullptr); // There is a bug in the communication between embedded objects and the // framework::LayoutManager that leads to missing resize updates. The @@ -526,7 +526,7 @@ Reference<view::XRenderable> ViewShellBase::GetRenderable() SfxPrinter* ViewShellBase::GetPrinter (bool bCreate) { - OSL_ASSERT(mpImpl.get()!=nullptr); + assert(mpImpl.get()!=nullptr); return GetDocShell()->GetPrinter (bCreate); } @@ -535,7 +535,7 @@ sal_uInt16 ViewShellBase::SetPrinter ( SfxPrinter* pNewPrinter, SfxPrinterChangeFlags nDiffFlags) { - OSL_ASSERT(mpImpl.get()!=nullptr); + assert(mpImpl.get()!=nullptr); GetDocShell()->SetPrinter(pNewPrinter); @@ -917,8 +917,8 @@ OUString ViewShellBase::GetInitialViewShellType() std::shared_ptr<tools::EventMultiplexer> ViewShellBase::GetEventMultiplexer() { - OSL_ASSERT(mpImpl.get()!=nullptr); - OSL_ASSERT(mpImpl->mpEventMultiplexer.get()!=nullptr); + assert(mpImpl.get()!=nullptr); + assert(mpImpl->mpEventMultiplexer.get()!=nullptr); return mpImpl->mpEventMultiplexer; } @@ -930,37 +930,37 @@ const ::tools::Rectangle& ViewShellBase::getClientRectangle() const std::shared_ptr<ToolBarManager> ViewShellBase::GetToolBarManager() const { - OSL_ASSERT(mpImpl.get()!=nullptr); - OSL_ASSERT(mpImpl->mpToolBarManager.get()!=nullptr); + assert(mpImpl.get()!=nullptr); + assert(mpImpl->mpToolBarManager.get()!=nullptr); return mpImpl->mpToolBarManager; } std::shared_ptr<FormShellManager> ViewShellBase::GetFormShellManager() const { - OSL_ASSERT(mpImpl.get()!=nullptr); - OSL_ASSERT(mpImpl->mpFormShellManager.get()!=nullptr); + assert(mpImpl.get()!=nullptr); + assert(mpImpl->mpFormShellManager.get()!=nullptr); return mpImpl->mpFormShellManager; } DrawController& ViewShellBase::GetDrawController() const { - OSL_ASSERT(mpImpl.get()!=nullptr); + assert(mpImpl.get()!=nullptr); return *mpImpl->mpController; } void ViewShellBase::SetViewTabBar (const ::rtl::Reference<ViewTabBar>& rViewTabBar) { - OSL_ASSERT(mpImpl.get()!=nullptr); + assert(mpImpl.get()!=nullptr); mpImpl->mpViewTabBar = rViewTabBar; } vcl::Window* ViewShellBase::GetViewWindow() { - OSL_ASSERT(mpImpl.get()!=nullptr); + assert(mpImpl.get()!=nullptr); return mpImpl->mpViewWindow.get(); } diff --git a/sd/source/ui/view/ViewShellManager.cxx b/sd/source/ui/view/ViewShellManager.cxx index 8990f5aa76ef..4dac411b5589 100644 --- a/sd/source/ui/view/ViewShellManager.cxx +++ b/sd/source/ui/view/ViewShellManager.cxx @@ -712,7 +712,7 @@ SfxShell* ViewShellManager::Implementation::GetShell (ShellId nId) const SfxShell* ViewShellManager::Implementation::GetTopShell() const { - OSL_ASSERT(mpTopShell == mrBase.GetSubShell(0)); + assert(mpTopShell == mrBase.GetSubShell(0)); return mpTopShell; } @@ -734,7 +734,7 @@ void ViewShellManager::Implementation::UnlockUpdate() if (mnUpdateLockCount < 0) { // This should not happen. - OSL_ASSERT (mnUpdateLockCount>=0); + assert (mnUpdateLockCount>=0); mnUpdateLockCount = 0; } if (mnUpdateLockCount == 0) @@ -1060,7 +1060,7 @@ ShellDescriptor ViewShellManager::Implementation::CreateSubShell ( void ViewShellManager::Implementation::DestroyViewShell ( ShellDescriptor& rDescriptor) { - OSL_ASSERT(rDescriptor.mpShell != nullptr); + assert(rDescriptor.mpShell != nullptr); if (rDescriptor.mbIsListenerAddedToWindow) { @@ -1089,7 +1089,7 @@ void ViewShellManager::Implementation::DestroySubShell ( const ShellDescriptor& rDescriptor) { (void)rParentShell; - OSL_ASSERT(rDescriptor.mpFactory.get() != nullptr); + assert(rDescriptor.mpFactory.get() != nullptr); rDescriptor.mpFactory->ReleaseShell(rDescriptor.mpShell); } @@ -1169,7 +1169,7 @@ void ViewShellManager::Implementation::DumpSfxShellStack() void ViewShellManager::Implementation::Deactivate (SfxShell* pShell) { - OSL_ASSERT(pShell!=nullptr); + assert(pShell!=nullptr); // We have to end a text edit for view shells that are to be taken from // the shell stack. diff --git a/sd/source/ui/view/drviews1.cxx b/sd/source/ui/view/drviews1.cxx index 2ea8063470ab..6f9637a987b4 100644 --- a/sd/source/ui/view/drviews1.cxx +++ b/sd/source/ui/view/drviews1.cxx @@ -747,7 +747,7 @@ bool DrawViewShell::ActivateObject(SdrOle2Obj* pObj, long nVerb) bActivated = ViewShell::ActivateObject(pObj, nVerb); - OSL_ASSERT(GetViewShell()!=nullptr); + assert(GetViewShell()!=nullptr); Client* pClient = static_cast<Client*>(GetViewShell()->GetIPClient()); if (pClient) pClient->SetSdrGrafObj(nullptr); @@ -842,7 +842,7 @@ bool DrawViewShell::SwitchPage(sal_uInt16 nSelectedPage) } else { - OSL_ASSERT(mpFrameView!=nullptr); + assert(mpFrameView!=nullptr); mpFrameView->SetSelectedPage(nSelectedPage); if (GetDoc()->GetSdPageCount(mePageKind) > nSelectedPage) @@ -932,7 +932,7 @@ bool DrawViewShell::SwitchPage(sal_uInt16 nSelectedPage) { // tighten VisArea, to possibly deactivate objects // !!! only if we are not in presentation mode (#96279) !!! - OSL_ASSERT (GetViewShell()!=nullptr); + assert (GetViewShell()!=nullptr); GetViewShell()->DisconnectAllClients(); VisAreaChanged(::tools::Rectangle(Point(), Size(1, 1))); } diff --git a/sd/source/ui/view/drviews3.cxx b/sd/source/ui/view/drviews3.cxx index 2a3aedf19bba..af4d8f51de31 100644 --- a/sd/source/ui/view/drviews3.cxx +++ b/sd/source/ui/view/drviews3.cxx @@ -327,7 +327,7 @@ void DrawViewShell::ExecCtrl(SfxRequest& rReq) case SID_OBJECTRESIZE: { // The server likes to change the client size - OSL_ASSERT (GetViewShell()!=nullptr); + assert (GetViewShell()!=nullptr); SfxInPlaceClient* pIPClient = GetViewShell()->GetIPClient(); if ( pIPClient && pIPClient->IsObjectInPlaceActive() ) diff --git a/sd/source/ui/view/drviews4.cxx b/sd/source/ui/view/drviews4.cxx index 6bc0613f250a..bd6220c032ff 100644 --- a/sd/source/ui/view/drviews4.cxx +++ b/sd/source/ui/view/drviews4.cxx @@ -831,7 +831,7 @@ void DrawViewShell::ShowMousePosInfo(const ::tools::Rectangle& rRect, } // display with coordinates in StatusBar - OSL_ASSERT (GetViewShell()!=nullptr); + assert (GetViewShell()!=nullptr); if ( !GetViewShell()->GetUIActiveClient() ) { SfxItemSet aSet(GetPool(), SID_CONTEXT, SID_CONTEXT, diff --git a/sd/source/ui/view/drviews5.cxx b/sd/source/ui/view/drviews5.cxx index 9ba7f6bb4dce..f1c6b613c6d3 100644 --- a/sd/source/ui/view/drviews5.cxx +++ b/sd/source/ui/view/drviews5.cxx @@ -116,7 +116,7 @@ void DrawViewShell::ArrangeGUIElements() maTabControl->Hide(); - OSL_ASSERT (GetViewShell()!=nullptr); + assert (GetViewShell()!=nullptr); Client* pIPClient = static_cast<Client*>(GetViewShell()->GetIPClient()); bool bClientActive = false; if ( pIPClient && pIPClient->IsObjectInPlaceActive() ) diff --git a/sd/source/ui/view/drviewsa.cxx b/sd/source/ui/view/drviewsa.cxx index c623adcb6517..ee7873d10419 100644 --- a/sd/source/ui/view/drviewsa.cxx +++ b/sd/source/ui/view/drviewsa.cxx @@ -136,7 +136,7 @@ DrawViewShell::~DrawViewShell() mpAnnotationManager.reset(); mpViewOverlayManager.reset(); - OSL_ASSERT (GetViewShell()!=nullptr); + assert (GetViewShell()!=nullptr); if( mxScannerListener.is() ) static_cast< ScannerEventListener* >( mxScannerListener.get() )->ParentDestroyed(); @@ -206,7 +206,7 @@ void DrawViewShell::Construct(DrawDocShell* pDocSh, PageKind eInitialPageKind) mpFrameView->Connect(); - OSL_ASSERT (GetViewShell()!=nullptr); + assert (GetViewShell()!=nullptr); SetPool( &GetDoc()->GetPool() ); diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx index 39688be50520..9fd244e7904d 100644 --- a/sd/source/ui/view/drviewse.cxx +++ b/sd/source/ui/view/drviewse.cxx @@ -1555,7 +1555,7 @@ void DrawViewShell::InsertURLButton(const OUString& rURL, const OUString& rText, SdrInsertFlags nOptions = SdrInsertFlags::SETDEFLAYER; - OSL_ASSERT (GetViewShell()!=nullptr); + assert (GetViewShell()!=nullptr); SfxInPlaceClient* pIpClient = GetViewShell()->GetIPClient(); if (pIpClient!=nullptr && pIpClient->IsObjectInPlaceActive()) { diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx index 25bf6e858a9b..b6f19b8cdc4e 100644 --- a/sd/source/ui/view/outlnvsh.cxx +++ b/sd/source/ui/view/outlnvsh.cxx @@ -1836,7 +1836,7 @@ void OutlineViewShell::VisAreaChanged(const ::tools::Rectangle& rRect) css::uno::Reference<css::accessibility::XAccessible> OutlineViewShell::CreateAccessibleDocumentView (::sd::Window* pWindow) { - OSL_ASSERT (GetViewShell()!=nullptr); + assert (GetViewShell()!=nullptr); if (GetViewShell()->GetController() != nullptr) { ::accessibility::AccessibleOutlineView* pDocumentView = diff --git a/sd/source/ui/view/sdview3.cxx b/sd/source/ui/view/sdview3.cxx index 5fa5158618bf..59f8b4cfc7b3 100644 --- a/sd/source/ui/view/sdview3.cxx +++ b/sd/source/ui/view/sdview3.cxx @@ -276,7 +276,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper, if (mpViewSh != nullptr) { - OSL_ASSERT (mpViewSh->GetViewShell()!=nullptr); + assert (mpViewSh->GetViewShell()!=nullptr); SfxInPlaceClient* pIpClient = mpViewSh->GetViewShell()->GetIPClient(); if( dynamic_cast< ::sd::slidesorter::SlideSorterViewShell *>( mpViewSh ) != nullptr || (pIpClient!=nullptr && pIpClient->IsObjectInPlaceActive())) @@ -1001,7 +1001,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper, if (mpViewSh!=nullptr) { - OSL_ASSERT (mpViewSh->GetViewShell()!=nullptr); + assert (mpViewSh->GetViewShell()!=nullptr); SfxInPlaceClient* pIpClient = mpViewSh->GetViewShell()->GetIPClient(); if (pIpClient!=nullptr && pIpClient->IsObjectInPlaceActive()) @@ -1171,7 +1171,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper, if (mpViewSh!=nullptr) { - OSL_ASSERT (mpViewSh->GetViewShell()!=nullptr); + assert (mpViewSh->GetViewShell()!=nullptr); SfxInPlaceClient* pIpClient = mpViewSh->GetViewShell()->GetIPClient(); if (pIpClient!=nullptr && pIpClient->IsObjectInPlaceActive()) diff --git a/sd/source/ui/view/sdview4.cxx b/sd/source/ui/view/sdview4.cxx index af1bafb11a81..4c7f60b3c2c1 100644 --- a/sd/source/ui/view/sdview4.cxx +++ b/sd/source/ui/view/sdview4.cxx @@ -543,7 +543,7 @@ IMPL_LINK_NOARG(View, DropInsertFileHdl, Timer *, void) if (mpViewSh != nullptr) { - OSL_ASSERT (mpViewSh->GetViewShell()!=nullptr); + assert (mpViewSh->GetViewShell()!=nullptr); SfxInPlaceClient* pIpClient = mpViewSh->GetViewShell()->GetIPClient(); if (pIpClient!=nullptr && pIpClient->IsObjectInPlaceActive()) diff --git a/sd/source/ui/view/viewshe2.cxx b/sd/source/ui/view/viewshe2.cxx index c56e19ac138e..27900d92d086 100644 --- a/sd/source/ui/view/viewshe2.cxx +++ b/sd/source/ui/view/viewshe2.cxx @@ -477,7 +477,7 @@ void ViewShell::SetPageSizeAndBorder(PageKind ePageKind, const Size& rNewSize, OUString aString(SdResId(STR_UNDO_CHANGE_PAGEFORMAT)); pUndoGroup->SetComment(aString); SfxViewShell* pViewShell = GetViewShell(); - OSL_ASSERT (pViewShell!=nullptr); + assert (pViewShell!=nullptr); sal_uInt16 i, nPageCnt = GetDoc()->GetMasterSdPageCount(ePageKind); @@ -639,7 +639,7 @@ void ViewShell::SetZoomFactor(const Fraction& rZoomX, const Fraction&) void ViewShell::SetActiveWindow (::sd::Window* pWin) { SfxViewShell* pViewShell = GetViewShell(); - OSL_ASSERT (pViewShell!=nullptr); + assert (pViewShell!=nullptr); if (pViewShell->GetWindow() != pWin) { @@ -722,7 +722,7 @@ bool ViewShell::ActivateObject(SdrOle2Obj* pObj, long nVerb) bool bAbort = false; GetDocSh()->SetWaitCursor( true ); SfxViewShell* pViewShell = GetViewShell(); - OSL_ASSERT (pViewShell!=nullptr); + assert (pViewShell!=nullptr); bool bChangeDefaultsForChart = false; OUString aName; @@ -934,7 +934,7 @@ void ViewShell::SetRuler(bool bRuler) } } - OSL_ASSERT(GetViewShell()!=nullptr); + assert(GetViewShell()!=nullptr); if (IsMainViewShell()) GetViewShell()->InvalidateBorder(); } @@ -966,7 +966,7 @@ void ViewShell::WriteUserDataSequence ( css::uno::Sequence < css::beans::Propert const sal_Int32 nIndex = rSequence.getLength(); rSequence.realloc( nIndex + 1 ); - OSL_ASSERT (GetViewShell()!=nullptr); + assert (GetViewShell()!=nullptr); // Get the view id from the view shell in the center pane. This will // usually be the called view shell, but to be on the safe side we call // the main view shell explicitly. @@ -986,7 +986,7 @@ void ViewShell::ReadUserDataSequence ( const css::uno::Sequence < css::beans::Pr void ViewShell::VisAreaChanged(const ::tools::Rectangle& /*rRect*/) { - OSL_ASSERT (GetViewShell()!=nullptr); + assert (GetViewShell()!=nullptr); GetViewShell()->VisAreaChanged(); } diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx index b741231d7986..d16323842a90 100644 --- a/sd/source/ui/view/viewshel.cxx +++ b/sd/source/ui/view/viewshel.cxx @@ -133,7 +133,7 @@ SfxViewFrame* ViewShell::GetViewFrame() const } else { - OSL_ASSERT (GetViewShell()!=nullptr); + assert (GetViewShell()!=nullptr); return nullptr; } } @@ -195,7 +195,7 @@ void ViewShell::construct() mpImpl.reset(new Implementation(*this)); meShellType = ST_NONE; - OSL_ASSERT (GetViewShell()!=nullptr); + assert (GetViewShell()!=nullptr); if (IsMainViewShell()) GetDocSh()->Connect (this); @@ -326,7 +326,7 @@ void ViewShell::Activate(bool bIsMDIActivate) { &aItem }); SfxViewShell* pViewShell = GetViewShell(); - OSL_ASSERT (pViewShell!=nullptr); + assert (pViewShell!=nullptr); SfxBindings& rBindings = pViewShell->GetViewFrame()->GetBindings(); rBindings.Invalidate( SID_3D_STATE, true ); @@ -349,13 +349,13 @@ void ViewShell::Activate(bool bIsMDIActivate) void ViewShell::UIActivating( SfxInPlaceClient* ) { - OSL_ASSERT (GetViewShell()!=nullptr); + assert (GetViewShell()!=nullptr); GetViewShellBase().GetToolBarManager()->ToolBarsDestroyed(); } void ViewShell::UIDeactivated( SfxInPlaceClient* ) { - OSL_ASSERT (GetViewShell()!=nullptr); + assert (GetViewShell()!=nullptr); GetViewShellBase().GetToolBarManager()->ToolBarsDestroyed(); if ( GetDrawView() ) GetViewShellBase().GetToolBarManager()->SelectionHasChanged(*this, *GetDrawView()); @@ -372,7 +372,7 @@ void ViewShell::Deactivate(bool bIsMDIActivate) if( pDragTransferable ) pDragTransferable->SetView( nullptr ); - OSL_ASSERT (GetViewShell()!=nullptr); + assert (GetViewShell()!=nullptr); // remember view attributes of FrameView WriteFrameViewData(); @@ -411,7 +411,7 @@ bool ViewShell::KeyInput(const KeyEvent& rKEvt, ::sd::Window* pWin) { // give key input first to SfxViewShell to give CTRL+Key // (e.g. CTRL+SHIFT+'+', to front) priority. - OSL_ASSERT (GetViewShell()!=nullptr); + assert (GetViewShell()!=nullptr); bReturn = GetViewShell()->KeyInput(rKEvt); } @@ -472,7 +472,7 @@ void ViewShell::MouseButtonDown(const MouseEvent& rMEvt, ::sd::Window* pWin) // selection; this changes the window size and thus the mouse position // in model coordinates: with respect to model coordinates the mouse // moves.) - OSL_ASSERT(mpImpl->mpUpdateLockForMouse.expired()); + assert(mpImpl->mpUpdateLockForMouse.expired()); mpImpl->mpUpdateLockForMouse = ViewShell::Implementation::ToolBarManagerLock::Create( GetViewShellBase().GetToolBarManager()); @@ -1081,7 +1081,7 @@ void ViewShell::ArrangeGUIElements() bool bSlideShowActive = (xSlideShow.is() && xSlideShow->isRunning()) && !xSlideShow->isFullScreen() && xSlideShow->getAnimationMode() == ANIMATIONMODE_SHOW; if ( !bSlideShowActive) { - OSL_ASSERT (GetViewShell()!=nullptr); + assert (GetViewShell()!=nullptr); if (mpContentWindow) mpContentWindow->SetPosSizePixel( |