From 97eb00c75e173d4c8d0b483a7941ad3d2f23783e Mon Sep 17 00:00:00 2001 From: Chris Sherlock Date: Sun, 7 May 2017 17:03:35 +1000 Subject: revert OSL_ASSERT changes Change-Id: I365d140446bd2a62cf8256acbfdd53fe72987380 --- .../ui/accessibility/AccessibleSlideSorterView.cxx | 4 +- .../ui/accessibility/AccessibleViewForwarder.cxx | 4 +- sd/source/ui/controller/slidelayoutcontroller.cxx | 2 +- sd/source/ui/dlg/sdtreelb.cxx | 6 +-- .../ui/framework/configuration/Configuration.cxx | 2 +- .../configuration/ConfigurationController.cxx | 14 +++--- .../ConfigurationControllerResourceManager.cxx | 4 +- .../ui/framework/factories/BasicViewFactory.cxx | 2 +- sd/source/ui/framework/module/ModuleController.cxx | 4 +- sd/source/ui/framework/module/ResourceManager.cxx | 2 +- sd/source/ui/framework/module/ShellStackGuard.cxx | 2 +- sd/source/ui/framework/tools/FrameworkHelper.cxx | 2 +- sd/source/ui/func/fudraw.cxx | 2 +- sd/source/ui/func/fusel.cxx | 2 +- sd/source/ui/func/fusnapln.cxx | 2 +- sd/source/ui/presenter/PresenterPreviewCache.cxx | 12 +++--- .../ui/sidebar/CurrentMasterPagesSelector.cxx | 4 +- sd/source/ui/sidebar/DocumentHelper.cxx | 4 +- sd/source/ui/sidebar/MasterPageContainer.cxx | 6 +-- sd/source/ui/slideshow/slideshow.cxx | 4 +- sd/source/ui/slideshow/slideshowimpl.cxx | 2 +- sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx | 2 +- .../ui/slidesorter/cache/SlsGenericPageCache.cxx | 8 ++-- .../ui/slidesorter/cache/SlsPageCacheManager.cxx | 6 +-- .../ui/slidesorter/cache/SlsQueueProcessor.cxx | 2 +- sd/source/ui/slidesorter/cache/SlsRequestQueue.cxx | 4 +- .../controller/SlideSorterController.cxx | 22 +++++----- .../ui/slidesorter/controller/SlsAnimator.cxx | 12 +++--- .../controller/SlsCurrentSlideManager.cxx | 6 +-- .../ui/slidesorter/controller/SlsFocusManager.cxx | 4 +- .../controller/SlsInsertionIndicatorHandler.cxx | 2 +- .../ui/slidesorter/controller/SlsListener.cxx | 4 +- .../ui/slidesorter/controller/SlsPageSelector.cxx | 2 +- .../slidesorter/controller/SlsScrollBarManager.cxx | 2 +- .../controller/SlsSelectionFunction.cxx | 6 +-- .../slidesorter/controller/SlsSelectionManager.cxx | 8 ++-- .../controller/SlsSelectionObserver.cxx | 6 +-- .../ui/slidesorter/controller/SlsSlotManager.cxx | 4 +- .../ui/slidesorter/model/SlideSorterModel.cxx | 10 ++--- .../ui/slidesorter/model/SlsPageDescriptor.cxx | 8 ++-- sd/source/ui/slidesorter/shell/SlideSorter.cxx | 12 +++--- .../ui/slidesorter/shell/SlideSorterViewShell.cxx | 50 +++++++++++----------- sd/source/ui/slidesorter/view/SlideSorterView.cxx | 8 ++-- sd/source/ui/slidesorter/view/SlsFramePainter.cxx | 12 +++--- .../ui/slidesorter/view/SlsInsertAnimator.cxx | 8 ++-- sd/source/ui/slidesorter/view/SlsLayeredDevice.cxx | 18 ++++---- sd/source/ui/slidesorter/view/SlsLayouter.cxx | 4 +- .../ui/slidesorter/view/SlsPageObjectLayouter.cxx | 4 +- .../ui/slidesorter/view/SlsPageObjectPainter.cxx | 2 +- sd/source/ui/slidesorter/view/SlsTheme.cxx | 6 +-- sd/source/ui/slidesorter/view/SlsToolTip.cxx | 2 +- sd/source/ui/table/tablefunction.cxx | 2 +- sd/source/ui/tools/PreviewRenderer.cxx | 2 +- sd/source/ui/view/DocumentRenderer.cxx | 20 ++++----- sd/source/ui/view/FormShellManager.cxx | 4 +- sd/source/ui/view/Outliner.cxx | 14 +++--- sd/source/ui/view/OutlinerIterator.cxx | 6 +-- sd/source/ui/view/ToolBarManager.cxx | 4 +- sd/source/ui/view/ViewShellBase.cxx | 24 +++++------ sd/source/ui/view/ViewShellManager.cxx | 10 ++--- sd/source/ui/view/drviews1.cxx | 6 +-- sd/source/ui/view/drviews3.cxx | 2 +- sd/source/ui/view/drviews4.cxx | 2 +- sd/source/ui/view/drviews5.cxx | 2 +- sd/source/ui/view/drviewsa.cxx | 4 +- sd/source/ui/view/drviewse.cxx | 2 +- sd/source/ui/view/outlnvsh.cxx | 2 +- sd/source/ui/view/sdview3.cxx | 6 +-- sd/source/ui/view/sdview4.cxx | 2 +- sd/source/ui/view/viewshe2.cxx | 12 +++--- sd/source/ui/view/viewshel.cxx | 18 ++++---- 71 files changed, 237 insertions(+), 237 deletions(-) (limited to 'sd/source/ui') diff --git a/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx b/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx index c18898a006bc..c3ac9d6aa3cf 100644 --- a/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx +++ b/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx @@ -228,7 +228,7 @@ Reference SAL_CALL AccessibleSlideSorterView::getAccessibleParent( sal_Int32 SAL_CALL AccessibleSlideSorterView::getAccessibleIndexInParent() { - assert(getAccessibleParent().is()); + OSL_ASSERT(getAccessibleParent().is()); ThrowIfDisposed(); const SolarMutexGuard aSolarGuard; sal_Int32 nIndexInParent(-1); @@ -756,7 +756,7 @@ AccessibleSlideSorterObject* AccessibleSlideSorterView::Implementation::GetAcces } else { - assert(nIndex>=0 && (sal_uInt32)nIndex=0 && (sal_uInt32)nIndexPaintWindowCount()) { SdrPaintWindow* pPaintWindow = mpView->GetPaintWindow((sal_uInt32)mnWindowId); @@ -87,7 +87,7 @@ Point AccessibleViewForwarder::LogicToPixel (const Point& rPoint) const Size AccessibleViewForwarder::LogicToPixel (const Size& rSize) const { - assert (mpView != nullptr); + OSL_ASSERT (mpView != nullptr); if((sal_uInt32)mnWindowId < mpView->PaintWindowCount()) { SdrPaintWindow* pPaintWindow = mpView->GetPaintWindow((sal_uInt32)mnWindowId); diff --git a/sd/source/ui/controller/slidelayoutcontroller.cxx b/sd/source/ui/controller/slidelayoutcontroller.cxx index bc5954653ba0..759c9eacd8da 100644 --- a/sd/source/ui/controller/slidelayoutcontroller.cxx +++ b/sd/source/ui/controller/slidelayoutcontroller.cxx @@ -171,7 +171,7 @@ LayoutToolbarMenu::LayoutToolbarMenu( SlideLayoutController& rController, vcl::W catch( Exception& e ) { (void)e; - assert(false); + OSL_ASSERT(false); } const sal_Int32 LAYOUT_BORDER_PIX = 7; diff --git a/sd/source/ui/dlg/sdtreelb.cxx b/sd/source/ui/dlg/sdtreelb.cxx index 0bba1914b561..614592536d9a 100644 --- a/sd/source/ui/dlg/sdtreelb.cxx +++ b/sd/source/ui/dlg/sdtreelb.cxx @@ -604,7 +604,7 @@ void SdPageObjsTLB::AddShapeList ( while( aIter.IsMore() ) { SdrObject* pObj = aIter.Next(); - assert(pObj!=nullptr); + OSL_ASSERT(pObj!=nullptr); // Get the shape name. OUString aStr (GetObjectName( pObj ) ); @@ -1189,13 +1189,13 @@ void SdPageObjsTLB::DoDrag() ::sd::ViewShell* pViewShell = GetViewShellForDocShell(*pDocShell); if (pViewShell == nullptr) { - assert(pViewShell!=nullptr); + OSL_ASSERT(pViewShell!=nullptr); return; } sd::View* pView = pViewShell->GetView(); if (pView == nullptr) { - assert(pView!=nullptr); + OSL_ASSERT(pView!=nullptr); return; } diff --git a/sd/source/ui/framework/configuration/Configuration.cxx b/sd/source/ui/framework/configuration/Configuration.cxx index be74d1f9e22c..593742e1deed 100644 --- a/sd/source/ui/framework/configuration/Configuration.cxx +++ b/sd/source/ui/framework/configuration/Configuration.cxx @@ -241,7 +241,7 @@ void Configuration::PostEvent ( const Reference& rxResourceId, const bool bActivation) { - assert(rxResourceId.is()); + OSL_ASSERT(rxResourceId.is()); if (mxBroadcaster.is()) { diff --git a/sd/source/ui/framework/configuration/ConfigurationController.cxx b/sd/source/ui/framework/configuration/ConfigurationController.cxx index 1a0bb8a07d7c..fa1f75662a80 100644 --- a/sd/source/ui/framework/configuration/ConfigurationController.cxx +++ b/sd/source/ui/framework/configuration/ConfigurationController.cxx @@ -88,7 +88,7 @@ public: ConfigurationController::Lock::Lock (const Reference& rxController) : mxController(rxController) { - assert(mxController.is()); + OSL_ASSERT(mxController.is()); if (mxController.is()) mxController->lock(); @@ -149,7 +149,7 @@ void ConfigurationController::ProcessEvent() { if (mpImplementation.get() != nullptr) { - assert(mpImplementation->mpQueueProcessor.get()!=nullptr); + OSL_ASSERT(mpImplementation->mpQueueProcessor.get()!=nullptr); mpImplementation->mpQueueProcessor->ProcessOneEvent(); } @@ -174,7 +174,7 @@ void SAL_CALL ConfigurationController::addConfigurationChangeListener ( ::osl::MutexGuard aGuard (maMutex); ThrowIfDisposed(); - assert(mpImplementation.get()!=nullptr); + OSL_ASSERT(mpImplementation.get()!=nullptr); mpImplementation->mpBroadcaster->AddListener(rxListener, rsEventType, rUserData); } @@ -198,8 +198,8 @@ void SAL_CALL ConfigurationController::notifyEvent ( void SAL_CALL ConfigurationController::lock() { - assert(mpImplementation.get()!=nullptr); - assert(mpImplementation->mpConfigurationUpdater.get()!=nullptr); + OSL_ASSERT(mpImplementation.get()!=nullptr); + OSL_ASSERT(mpImplementation->mpConfigurationUpdater.get()!=nullptr); ::osl::MutexGuard aGuard (maMutex); ThrowIfDisposed(); @@ -219,7 +219,7 @@ void SAL_CALL ConfigurationController::unlock() if (rBHelper.bDisposed) ThrowIfDisposed(); - assert(mpImplementation->mnLockCount>0); + OSL_ASSERT(mpImplementation->mnLockCount>0); --mpImplementation->mnLockCount; if (mpImplementation->mnLockCount == 0) mpImplementation->mpConfigurationUpdaterLock.reset(); @@ -510,7 +510,7 @@ void ConfigurationController::ThrowIfDisposed () const if (mpImplementation.get() == nullptr) { - assert(mpImplementation.get() != nullptr); + OSL_ASSERT(mpImplementation.get() != nullptr); throw RuntimeException("ConfigurationController not initialized", const_cast(static_cast(this))); } diff --git a/sd/source/ui/framework/configuration/ConfigurationControllerResourceManager.cxx b/sd/source/ui/framework/configuration/ConfigurationControllerResourceManager.cxx index c6a5f2a85b5e..de2d7386fa45 100644 --- a/sd/source/ui/framework/configuration/ConfigurationControllerResourceManager.cxx +++ b/sd/source/ui/framework/configuration/ConfigurationControllerResourceManager.cxx @@ -104,7 +104,7 @@ void ConfigurationControllerResourceManager::ActivateResource ( { if ( ! rxResourceId.is()) { - assert(rxResourceId.is()); + OSL_ASSERT(rxResourceId.is()); return; } @@ -249,7 +249,7 @@ void ConfigurationControllerResourceManager::AddResource ( { if ( ! rxResource.is()) { - assert(rxResource.is()); + OSL_ASSERT(rxResource.is()); return; } diff --git a/sd/source/ui/framework/factories/BasicViewFactory.cxx b/sd/source/ui/framework/factories/BasicViewFactory.cxx index f0bc96a3babb..a537cb6a5574 100644 --- a/sd/source/ui/framework/factories/BasicViewFactory.cxx +++ b/sd/source/ui/framework/factories/BasicViewFactory.cxx @@ -124,7 +124,7 @@ void SAL_CALL BasicViewFactory::disposing() // ViewShellContainer::const_iterator iView; for (iView=mpViewShellContainer->begin(); iView!=mpViewShellContainer->end(); ++iView) { - assert((*iView)->mpViewShell.unique()); + OSL_ASSERT((*iView)->mpViewShell.unique()); } mpViewShellContainer.reset(); } diff --git a/sd/source/ui/framework/module/ModuleController.cxx b/sd/source/ui/framework/module/ModuleController.cxx index f032eadc4295..564354cbc34d 100644 --- a/sd/source/ui/framework/module/ModuleController.cxx +++ b/sd/source/ui/framework/module/ModuleController.cxx @@ -114,7 +114,7 @@ void SAL_CALL ModuleController::disposing() void ModuleController::ProcessFactory (const ::std::vector& rValues) { - assert(rValues.size() == snFactoryPropertyCount); + OSL_ASSERT(rValues.size() == snFactoryPropertyCount); // Get the service name of the factory. OUString sServiceName; @@ -166,7 +166,7 @@ void ModuleController::InstantiateStartupServices() void ModuleController::ProcessStartupService (const ::std::vector& rValues) { - assert(rValues.size() == snStartupPropertyCount); + OSL_ASSERT(rValues.size() == snStartupPropertyCount); try { diff --git a/sd/source/ui/framework/module/ResourceManager.cxx b/sd/source/ui/framework/module/ResourceManager.cxx index 05168fa5722b..a0c77e24b83f 100644 --- a/sd/source/ui/framework/module/ResourceManager.cxx +++ b/sd/source/ui/framework/module/ResourceManager.cxx @@ -112,7 +112,7 @@ void SAL_CALL ResourceManager::disposing() void SAL_CALL ResourceManager::notifyConfigurationChange ( const ConfigurationChangeEvent& rEvent) { - assert(rEvent.ResourceId.is()); + OSL_ASSERT(rEvent.ResourceId.is()); sal_Int32 nEventType = 0; rEvent.UserData >>= nEventType; diff --git a/sd/source/ui/framework/module/ShellStackGuard.cxx b/sd/source/ui/framework/module/ShellStackGuard.cxx index ead5314e614f..2372158fe950 100644 --- a/sd/source/ui/framework/module/ShellStackGuard.cxx +++ b/sd/source/ui/framework/module/ShellStackGuard.cxx @@ -119,7 +119,7 @@ void SAL_CALL ShellStackGuard::disposing ( IMPL_LINK(ShellStackGuard, TimeoutHandler, Timer*, pIdle, void) { #ifdef DEBUG - assert(pIdle==&maPrinterPollingIdle); + OSL_ASSERT(pIdle==&maPrinterPollingIdle); #else (void)pIdle; #endif diff --git a/sd/source/ui/framework/tools/FrameworkHelper.cxx b/sd/source/ui/framework/tools/FrameworkHelper.cxx index e22fea6cdd2d..a469dce9ec7d 100644 --- a/sd/source/ui/framework/tools/FrameworkHelper.cxx +++ b/sd/source/ui/framework/tools/FrameworkHelper.cxx @@ -945,7 +945,7 @@ LifetimeController::LifetimeController (::sd::ViewShellBase& rBase) LifetimeController::~LifetimeController() { - assert(!mbListeningToController && !mbListeningToViewShellBase); + OSL_ASSERT(!mbListeningToController && !mbListeningToViewShellBase); } void LifetimeController::disposing() diff --git a/sd/source/ui/func/fudraw.cxx b/sd/source/ui/func/fudraw.cxx index 5800adc74361..404b3be53d65 100644 --- a/sd/source/ui/func/fudraw.cxx +++ b/sd/source/ui/func/fudraw.cxx @@ -349,7 +349,7 @@ bool FuDraw::KeyInput(const KeyEvent& rKEvt) avoid the restoration of an no more existing object in ::SelectionHasChanged after deletion. All other OLE objects are not affected. */ - assert (mpViewShell->GetViewShell()!=nullptr); + OSL_ASSERT (mpViewShell->GetViewShell()!=nullptr); Client* pIPClient = static_cast( mpViewShell->GetViewShell()->GetIPClient()); if (pIPClient && pIPClient->IsObjectInPlaceActive()) diff --git a/sd/source/ui/func/fusel.cxx b/sd/source/ui/func/fusel.cxx index 4d061fc43eaf..846b2e208cc5 100644 --- a/sd/source/ui/func/fusel.cxx +++ b/sd/source/ui/func/fusel.cxx @@ -360,7 +360,7 @@ bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt) if ( !rMEvt.IsShift() && !rMEvt.IsMod2() ) { - assert (mpViewShell->GetViewShell()!=nullptr); + OSL_ASSERT (mpViewShell->GetViewShell()!=nullptr); Client* pIPClient = static_cast( mpViewShell->GetViewShell()->GetIPClient()); diff --git a/sd/source/ui/func/fusnapln.cxx b/sd/source/ui/func/fusnapln.cxx index 56c53a50f31e..958f7f906a1e 100644 --- a/sd/source/ui/func/fusnapln.cxx +++ b/sd/source/ui/func/fusnapln.cxx @@ -111,7 +111,7 @@ void FuSnapLine::DoExecute( SfxRequest& rReq ) SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create(); ScopedVclPtr pDlg(pFact ? pFact->CreateSdSnapLineDlg(mpViewShell->GetActiveWindow(), aNewAttr, mpView) : nullptr); - assert(pDlg); + OSL_ASSERT(pDlg); if (!pDlg) return; diff --git a/sd/source/ui/presenter/PresenterPreviewCache.cxx b/sd/source/ui/presenter/PresenterPreviewCache.cxx index 19b4529c2f25..a55330d3865b 100644 --- a/sd/source/ui/presenter/PresenterPreviewCache.cxx +++ b/sd/source/ui/presenter/PresenterPreviewCache.cxx @@ -99,7 +99,7 @@ void SAL_CALL PresenterPreviewCache::setDocumentSlides ( const Reference& rxDocument) { ThrowIfDisposed(); - assert(mpCacheContext.get()!=nullptr); + OSL_ASSERT(mpCacheContext.get()!=nullptr); mpCacheContext->SetDocumentSlides(rxSlides, rxDocument); } @@ -109,7 +109,7 @@ void SAL_CALL PresenterPreviewCache::setVisibleRange ( sal_Int32 nLastVisibleSlideIndex) { ThrowIfDisposed(); - assert(mpCacheContext.get()!=nullptr); + OSL_ASSERT(mpCacheContext.get()!=nullptr); mpCacheContext->SetVisibleSlideRange (nFirstVisibleSlideIndex, nLastVisibleSlideIndex); } @@ -118,7 +118,7 @@ void SAL_CALL PresenterPreviewCache::setPreviewSize ( const css::geometry::IntegerSize2D& rSize) { ThrowIfDisposed(); - assert(mpCache.get()!=nullptr); + OSL_ASSERT(mpCache.get()!=nullptr); maPreviewSize = Size(rSize.Width, rSize.Height); mpCache->ChangeSize(maPreviewSize, Bitmap::HasFastScale()); @@ -129,7 +129,7 @@ Reference SAL_CALL PresenterPreviewCache::getSlidePreview ( const Reference& rxCanvas) { ThrowIfDisposed(); - assert(mpCacheContext.get()!=nullptr); + OSL_ASSERT(mpCacheContext.get()!=nullptr); cppcanvas::CanvasSharedPtr pCanvas ( cppcanvas::VCLFactory::createCanvas(rxCanvas)); @@ -166,14 +166,14 @@ void SAL_CALL PresenterPreviewCache::removePreviewCreationNotifyListener ( void SAL_CALL PresenterPreviewCache::pause() { ThrowIfDisposed(); - assert(mpCache.get()!=nullptr); + OSL_ASSERT(mpCache.get()!=nullptr); mpCache->Pause(); } void SAL_CALL PresenterPreviewCache::resume() { ThrowIfDisposed(); - assert(mpCache.get()!=nullptr); + OSL_ASSERT(mpCache.get()!=nullptr); mpCache->Resume(); } diff --git a/sd/source/ui/sidebar/CurrentMasterPagesSelector.cxx b/sd/source/ui/sidebar/CurrentMasterPagesSelector.cxx index 3e59d9e4aa14..0512139aaf90 100644 --- a/sd/source/ui/sidebar/CurrentMasterPagesSelector.cxx +++ b/sd/source/ui/sidebar/CurrentMasterPagesSelector.cxx @@ -90,7 +90,7 @@ void CurrentMasterPagesSelector::dispose() } else { - assert(mrDocument.GetDocSh() != nullptr); + OSL_ASSERT(mrDocument.GetDocSh() != nullptr); } Link aLink (LINK(this,CurrentMasterPagesSelector,EventMultiplexerListener)); @@ -109,7 +109,7 @@ void CurrentMasterPagesSelector::LateInit() } else { - assert(mrDocument.GetDocSh() != nullptr); + OSL_ASSERT(mrDocument.GetDocSh() != nullptr); } } diff --git a/sd/source/ui/sidebar/DocumentHelper.cxx b/sd/source/ui/sidebar/DocumentHelper.cxx index 4cc72acb2189..d6d7c9fd7585 100644 --- a/sd/source/ui/sidebar/DocumentHelper.cxx +++ b/sd/source/ui/sidebar/DocumentHelper.cxx @@ -311,7 +311,7 @@ void DocumentHelper::AssignMasterPageToPageList ( ::std::vector aCleanedList; for (iPage=rpPageList->begin(); iPage!=rpPageList->end(); ++iPage) { - assert(*iPage!=nullptr && (*iPage)->GetModel() == &rTargetDocument); + OSL_ASSERT(*iPage!=nullptr && (*iPage)->GetModel() == &rTargetDocument); if (*iPage != nullptr && (*iPage)->GetLayoutName() != sFullLayoutName) { aCleanedList.push_back(*iPage); @@ -477,7 +477,7 @@ SdPage* DocumentHelper::ProvideMasterPage ( if (pMasterPage == nullptr) { // The caller should make sure that the master page is valid. - assert(pMasterPage != nullptr); + OSL_ASSERT(pMasterPage != nullptr); return nullptr; } SdDrawDocument* pSourceDocument = static_cast(pMasterPage->GetModel()); diff --git a/sd/source/ui/sidebar/MasterPageContainer.cxx b/sd/source/ui/sidebar/MasterPageContainer.cxx index 72f1aa1d5a1a..9deef401d79e 100644 --- a/sd/source/ui/sidebar/MasterPageContainer.cxx +++ b/sd/source/ui/sidebar/MasterPageContainer.cxx @@ -265,7 +265,7 @@ void MasterPageContainer::ReleaseToken (Token aToken) SharedMasterPageDescriptor pDescriptor = mpImpl->GetDescriptor(aToken); if (pDescriptor.get() != nullptr) { - assert(pDescriptor->mnUseCount>0); + OSL_ASSERT(pDescriptor->mnUseCount>0); --pDescriptor->mnUseCount; if (pDescriptor->mnUseCount <= 0) { @@ -527,7 +527,7 @@ void MasterPageContainer::Implementation::LateInit() { meInitializationState = INITIALIZING; - assert(Instance().get()==this); + OSL_ASSERT(Instance().get()==this); mpRequestQueue.reset(MasterPageContainerQueue::Create( std::shared_ptr(Instance()))); @@ -576,7 +576,7 @@ void MasterPageContainer::Implementation::UpdatePreviewSizePixel() if (*iDescriptor!=nullptr && (*iDescriptor)->mpMasterPage != nullptr) { Size aPageSize ((*iDescriptor)->mpMasterPage->GetSize()); - assert(aPageSize.Width() > 0 && aPageSize.Height() > 0); + OSL_ASSERT(aPageSize.Width() > 0 && aPageSize.Height() > 0); if (aPageSize.Width() > 0) nWidth = aPageSize.Width(); if (aPageSize.Height() > 0) diff --git a/sd/source/ui/slideshow/slideshow.cxx b/sd/source/ui/slideshow/slideshow.cxx index bd6f4a16faf9..51e2c0bfb094 100644 --- a/sd/source/ui/slideshow/slideshow.cxx +++ b/sd/source/ui/slideshow/slideshow.cxx @@ -637,7 +637,7 @@ void SAL_CALL SlideShow::end() // The mbIsInStartup flag should have been reset during the start of the // slide show. Reset it here just in case that something has horribly // gone wrong. - assert(!mbIsInStartup); + OSL_ASSERT(!mbIsInStartup); mbIsInStartup = false; rtl::Reference< SlideshowImpl > xController( mxController ); @@ -791,7 +791,7 @@ void SAL_CALL SlideShow::startWithArguments(const Sequence< PropertyValue >& rAr // Stop a running show before starting a new one. if( mxController.is() ) { - assert(!mbIsInStartup); + OSL_ASSERT(!mbIsInStartup); end(); } else if (mbIsInStartup) diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx index 458a5b3cf375..8de1e7ac82d2 100644 --- a/sd/source/ui/slideshow/slideshowimpl.cxx +++ b/sd/source/ui/slideshow/slideshowimpl.cxx @@ -1740,7 +1740,7 @@ void SlideshowImpl::updateSlideShow() // Make sure that the maximum frame count has not been set // too high (only then conversion to milliseconds and long // integer may lead to zero value.) - assert(static_cast(fUpdate * 1000.0) > 0); + OSL_ASSERT(static_cast(fUpdate * 1000.0) > 0); } // Use our high resolution timers for the asynchronous callback. diff --git a/sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx b/sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx index b45c2ade3cd0..e783d059ade7 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: - assert(false); + OSL_ASSERT(false); break; } } diff --git a/sd/source/ui/slidesorter/cache/SlsGenericPageCache.cxx b/sd/source/ui/slidesorter/cache/SlsGenericPageCache.cxx index 4adac147c359..ec5e6fbf5ea7 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) { - assert(aKey != nullptr); + OSL_ASSERT(aKey != nullptr); Bitmap aPreview; bool bMayBeUpToDate = true; @@ -143,7 +143,7 @@ Bitmap GenericPageCache::GetPreviewBitmap ( Bitmap GenericPageCache::GetMarkedPreviewBitmap ( const CacheKey aKey) { - assert(aKey != nullptr); + OSL_ASSERT(aKey != nullptr); ProvideCacheAndProcessor(); const SdrPage* pPage = mpCacheContext->GetPage(aKey); @@ -156,7 +156,7 @@ void GenericPageCache::SetMarkedPreviewBitmap ( const CacheKey aKey, const Bitmap& rMarkedBitmap) { - assert(aKey != nullptr); + OSL_ASSERT(aKey != nullptr); ProvideCacheAndProcessor(); const SdrPage* pPage = mpCacheContext->GetPage(aKey); @@ -167,7 +167,7 @@ void GenericPageCache::RequestPreviewBitmap ( const CacheKey aKey, const bool bMayBeUpToDate) { - assert(aKey != nullptr); + OSL_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 6ad5e4a45dd3..9b7f551e57f0 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& rpCache) if (iCache != mpPageCaches->end()) { - assert(iCache->second == rpCache); + OSL_ASSERT(iCache->second == rpCache); PutRecentlyUsedCache(iCache->first.mpDocument,iCache->first.maPreviewSize,rpCache); @@ -290,7 +290,7 @@ std::shared_ptr PageCacheManager::ChangeSize ( PageCacheContainer::CompareWithCache(rpCache))); if (iCacheToChange != mpPageCaches->end()) { - assert(iCacheToChange->second == rpCache); + OSL_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::ChangeSize ( } else { - assert(iCacheToChange != mpPageCaches->end()); + OSL_ASSERT(iCacheToChange != mpPageCaches->end()); } } diff --git a/sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx b/sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx index 6954f51cc64d..a4ba8dd088ee 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() { - assert(mpCacheContext.get()!=nullptr); + OSL_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 809fbf46ca01..8bc8bb3e74da 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); - assert(eRequestClass>=MIN_CLASS && eRequestClass<=MAX_CLASS); + OSL_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); - assert(eNewRequestClass>=MIN_CLASS && eNewRequestClass<=MAX_CLASS); + OSL_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 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 const & SlideSorterController::GetCurrentSlideManager() const { - assert(mpCurrentSlideManager.get()!=nullptr); + OSL_ASSERT(mpCurrentSlideManager.get()!=nullptr); return mpCurrentSlideManager; } std::shared_ptr const & SlideSorterController::GetSlotManager() const { - assert(mpSlotManager.get()!=nullptr); + OSL_ASSERT(mpSlotManager.get()!=nullptr); return mpSlotManager; } std::shared_ptr const & SlideSorterController::GetSelectionManager() const { - assert(mpSelectionManager.get()!=nullptr); + OSL_ASSERT(mpSelectionManager.get()!=nullptr); return mpSelectionManager; } std::shared_ptr const & SlideSorterController::GetInsertionIndicatorHandler() const { - assert(mpInsertionIndicatorHandler.get()!=nullptr); + OSL_ASSERT(mpInsertionIndicatorHandler.get()!=nullptr); return mpInsertionIndicatorHandler; } @@ -881,7 +881,7 @@ void SlideSorterController::SetDocumentSlides (const ReferencemnAnimationId; })); 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(mnPageIndexInvalidatePreviewBitmap(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& 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& void SelectionManager::DeleteSelectedMasterPages (const ::std::vector& 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; } } diff --git a/sd/source/ui/slidesorter/model/SlideSorterModel.cxx b/sd/source/ui/slidesorter/model/SlideSorterModel.cxx index cf51887bc5c5..0416857d716a 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); - assert(pDescriptor); + OSL_ASSERT(pDescriptor); return false; } if (nIndex != pDescriptor->GetPageIndex()) { PrintModel(rModel); - assert(nIndex == pDescriptor->GetPageIndex()); + OSL_ASSERT(nIndex == pDescriptor->GetPageIndex()); return false; } if (nIndex != pDescriptor->GetVisualState().mnPageId) { PrintModel(rModel); - assert(nIndex == pDescriptor->GetVisualState().mnPageId); + OSL_ASSERT(nIndex == pDescriptor->GetVisualState().mnPageId); return false; } } @@ -462,7 +462,7 @@ void SlideSorterModel::UpdatePageList() default: // We should never get here. - assert(false); + OSL_ASSERT(false); break; } } @@ -618,7 +618,7 @@ void SlideSorterModel::UpdateIndices (const sal_Int32 nFirstIndex) { if (rpDescriptor->GetPageIndex()!=nDescriptorIndex) { - assert(rpDescriptor->GetPageIndex()==nDescriptorIndex); + OSL_ASSERT(rpDescriptor->GetPageIndex()==nDescriptorIndex); } } else diff --git a/sd/source/ui/slidesorter/model/SlsPageDescriptor.cxx b/sd/source/ui/slidesorter/model/SlsPageDescriptor.cxx index 0737d00cada6..39211e967b21 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) { - assert(mpPage); - assert(mpPage == SdPage::getImplementation(rxPage)); + OSL_ASSERT(mpPage); + OSL_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: - assert(false); + OSL_ASSERT(false); return false; } } @@ -205,7 +205,7 @@ void PageDescriptor::SetCoreSelection() mpPage->SetSelected(false); else { - assert(mpPage!=nullptr); + OSL_ASSERT(mpPage!=nullptr); } } diff --git a/sd/source/ui/slidesorter/shell/SlideSorter.cxx b/sd/source/ui/slidesorter/shell/SlideSorter.cxx index 80ff622427bd..37a710a45663 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 { - assert(mpSlideSorterModel.get()!=nullptr); + OSL_ASSERT(mpSlideSorterModel.get()!=nullptr); return *mpSlideSorterModel; } view::SlideSorterView& SlideSorter::GetView() const { - assert(mpSlideSorterView.get()!=nullptr); + OSL_ASSERT(mpSlideSorterView.get()!=nullptr); return *mpSlideSorterView; } controller::SlideSorterController& SlideSorter::GetController() const { - assert(mpSlideSorterController.get()!=nullptr); + OSL_ASSERT(mpSlideSorterController.get()!=nullptr); return *mpSlideSorterController; } @@ -325,7 +325,7 @@ model::SlideSorterModel* SlideSorter::CreateModel() ViewShellBase* pViewShellBase = GetViewShellBase(); if (pViewShellBase != nullptr) { - assert (pViewShellBase->GetDocument() != nullptr); + OSL_ASSERT (pViewShellBase->GetDocument() != nullptr); return new model::SlideSorterModel(*this); } @@ -410,13 +410,13 @@ void SlideSorter::SetCurrentFunction (const rtl::Reference& rpFunction) std::shared_ptr const & SlideSorter::GetProperties() const { - assert(mpProperties); + OSL_ASSERT(mpProperties); return mpProperties; } std::shared_ptr const & SlideSorter::GetTheme() const { - assert(mpTheme); + OSL_ASSERT(mpTheme); return mpTheme; } diff --git a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx index b72f1f48c717..1f015f1ae9bc 100644 --- a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx +++ b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx @@ -255,7 +255,7 @@ css::uno::Reference if (mpView == nullptr || mpSlideSorter.get() == nullptr) return nullptr; - assert(mpSlideSorter.get()!=nullptr); + OSL_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 { - assert(mpSlideSorter.get()!=nullptr); + OSL_ASSERT(mpSlideSorter.get()!=nullptr); return *mpSlideSorter; } bool SlideSorterViewShell::RelocateToParentWindow (vcl::Window* pParentWindow) { - assert(mpSlideSorter); + OSL_ASSERT(mpSlideSorter); if ( ! mpSlideSorter) return false; @@ -357,32 +357,32 @@ SdPage* SlideSorterViewShell::GetActualPage() void SlideSorterViewShell::GetMenuState ( SfxItemSet& rSet) { ViewShell::GetMenuState(rSet); - assert(mpSlideSorter.get()!=nullptr); + OSL_ASSERT(mpSlideSorter.get()!=nullptr); mpSlideSorter->GetController().GetSlotManager()->GetMenuState(rSet); } void SlideSorterViewShell::GetClipboardState ( SfxItemSet& rSet) { ViewShell::GetMenuState(rSet); - assert(mpSlideSorter.get()!=nullptr); + OSL_ASSERT(mpSlideSorter.get()!=nullptr); mpSlideSorter->GetController().GetSlotManager()->GetClipboardState(rSet); } void SlideSorterViewShell::ExecCtrl (SfxRequest& rRequest) { - assert(mpSlideSorter.get()!=nullptr); + OSL_ASSERT(mpSlideSorter.get()!=nullptr); mpSlideSorter->GetController().ExecCtrl(rRequest); } void SlideSorterViewShell::GetCtrlState (SfxItemSet& rSet) { - assert(mpSlideSorter.get()!=nullptr); + OSL_ASSERT(mpSlideSorter.get()!=nullptr); mpSlideSorter->GetController().GetCtrlState(rSet); } void SlideSorterViewShell::FuSupport (SfxRequest& rRequest) { - assert(mpSlideSorter.get()!=nullptr); + OSL_ASSERT(mpSlideSorter.get()!=nullptr); mpSlideSorter->GetController().FuSupport(rRequest); } @@ -391,7 +391,7 @@ void SlideSorterViewShell::FuSupport (SfxRequest& rRequest) */ void SlideSorterViewShell::FuTemporary (SfxRequest& rRequest) { - assert(mpSlideSorter.get()!=nullptr); + OSL_ASSERT(mpSlideSorter.get()!=nullptr); switch (rRequest.GetSlot()) { case SID_MODIFYPAGE: @@ -415,19 +415,19 @@ void SlideSorterViewShell::FuTemporary (SfxRequest& rRequest) void SlideSorterViewShell::GetStatusBarState (SfxItemSet& rSet) { - assert(mpSlideSorter.get()!=nullptr); + OSL_ASSERT(mpSlideSorter.get()!=nullptr); mpSlideSorter->GetController().GetStatusBarState(rSet); } void SlideSorterViewShell::FuPermanent (SfxRequest& rRequest) { - assert(mpSlideSorter.get()!=nullptr); + OSL_ASSERT(mpSlideSorter.get()!=nullptr); mpSlideSorter->GetController().FuPermanent(rRequest); } void SlideSorterViewShell::GetAttrState (SfxItemSet& rSet) { - assert(mpSlideSorter.get()!=nullptr); + OSL_ASSERT(mpSlideSorter.get()!=nullptr); mpSlideSorter->GetController().GetAttrState(rSet); } @@ -440,7 +440,7 @@ void SlideSorterViewShell::Paint ( ::sd::Window* pWindow) { SetActiveWindow (pWindow); - assert(mpSlideSorter); + OSL_ASSERT(mpSlideSorter); if (mpSlideSorter) mpSlideSorter->GetController().Paint(rBBox,pWindow); } @@ -449,7 +449,7 @@ void SlideSorterViewShell::ArrangeGUIElements() { if (IsActive()) { - assert(mpSlideSorter.get()!=nullptr); + OSL_ASSERT(mpSlideSorter.get()!=nullptr); mpSlideSorter->ArrangeGUIElements(maViewPos, maViewSize); mbIsArrangeGUIElementsPending = false; } @@ -503,14 +503,14 @@ void SlideSorterViewShell::Command ( const CommandEvent& rEvent, ::sd::Window* pWindow) { - assert(mpSlideSorter.get()!=nullptr); + OSL_ASSERT(mpSlideSorter.get()!=nullptr); if ( ! mpSlideSorter->GetController().Command (rEvent, pWindow)) ViewShell::Command (rEvent, pWindow); } void SlideSorterViewShell::ReadFrameViewData (FrameView* pFrameView) { - assert(mpSlideSorter.get()!=nullptr); + OSL_ASSERT(mpSlideSorter.get()!=nullptr); if (pFrameView != nullptr) { view::SlideSorterView& rView (mpSlideSorter->GetView()); @@ -546,7 +546,7 @@ void SlideSorterViewShell::ReadFrameViewData (FrameView* pFrameView) void SlideSorterViewShell::WriteFrameViewData() { - assert(mpSlideSorter.get()!=nullptr); + OSL_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) { - assert(mpSlideSorter.get()!=nullptr); + OSL_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 ) { - assert(mpSlideSorter.get()!=nullptr); + OSL_ASSERT(mpSlideSorter.get()!=nullptr); mpSlideSorter->GetController().GetClipboard().StartDrag ( rDragPt, pWindow); @@ -645,7 +645,7 @@ sal_Int8 SlideSorterViewShell::AcceptDrop ( sal_uInt16 nPage, sal_uInt16 nLayer) { - assert(mpSlideSorter.get()!=nullptr); + OSL_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) { - assert(mpSlideSorter.get()!=nullptr); + OSL_ASSERT(mpSlideSorter.get()!=nullptr); return mpSlideSorter->GetController().GetClipboard().ExecuteDrop ( rEvt, rTargetHelper, @@ -673,28 +673,28 @@ sal_Int8 SlideSorterViewShell::ExecuteDrop ( std::shared_ptr SlideSorterViewShell::GetPageSelection() const { - assert(mpSlideSorter.get()!=nullptr); + OSL_ASSERT(mpSlideSorter.get()!=nullptr); return mpSlideSorter->GetController().GetPageSelector().GetPageSelection(); } void SlideSorterViewShell::SetPageSelection ( const std::shared_ptr& rSelection) { - assert(mpSlideSorter.get()!=nullptr); + OSL_ASSERT(mpSlideSorter.get()!=nullptr); mpSlideSorter->GetController().GetPageSelector().SetPageSelection(rSelection, true); } void SlideSorterViewShell::AddSelectionChangeListener ( const Link& rCallback) { - assert(mpSlideSorter.get()!=nullptr); + OSL_ASSERT(mpSlideSorter.get()!=nullptr); mpSlideSorter->GetController().GetSelectionManager()->AddSelectionChangeListener(rCallback); } void SlideSorterViewShell::RemoveSelectionChangeListener ( const Link& rCallback) { - assert(mpSlideSorter.get()!=nullptr); + OSL_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 ddca23bb17ff..3a98bfcb0cb6 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) { - assert(mbIsDisposed); + OSL_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) - assert(mpLayeredDevice.unique()); + OSL_ASSERT(mpLayeredDevice.unique()); mpLayeredDevice.reset(); mbIsDisposed = true; @@ -732,7 +732,7 @@ void SlideSorterView::RemoveVisibilityChangeListener(const Link0); + OSL_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 110f493e8b21..05c97f6a6c51 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 { - assert(rShadowBitmap.GetSizePixel().Width() == rShadowBitmap.GetSizePixel().Height()); - assert((rShadowBitmap.GetSizePixel().Width()-1)%2 == 0); - assert(((rShadowBitmap.GetSizePixel().Width()-1)/2)%2 == 1); + 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); } } @@ -109,8 +109,8 @@ FramePainter::OffsetBitmap::OffsetBitmap ( : maBitmap(), maOffset() { - assert(nHorizontalPosition>=-1 && nHorizontalPosition<=+1); - assert(nVerticalPosition>=-1 && nVerticalPosition<=+1); + OSL_ASSERT(nHorizontalPosition>=-1 && nHorizontalPosition<=+1); + OSL_ASSERT(nVerticalPosition>=-1 && nVerticalPosition<=+1); const sal_Int32 nS (1); const sal_Int32 nC (::std::max(0,(rBitmap.GetSizePixel().Width()-nS)/2)); @@ -208,7 +208,7 @@ void FramePainter::OffsetBitmap::PaintSide ( else { // Diagonal sides indicates an error. - assert(false); + OSL_ASSERT(false); } } diff --git a/sd/source/ui/slidesorter/view/SlsInsertAnimator.cxx b/sd/source/ui/slidesorter/view/SlsInsertAnimator.cxx index e632dd59df61..7677b9015d0e 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; - assert(iRun != maRuns.end()); + OSL_ASSERT(iRun != maRuns.end()); } } } @@ -266,7 +266,7 @@ void InsertAnimator::Implementation::AddRun (const std::shared_ptrmnRunIndex)); if (iRun != maRuns.end()) { - assert(*iRun == rRun); + OSL_ASSERT(*iRun == rRun); maRuns.erase(iRun); } } } else { - assert(rRun); + OSL_ASSERT(rRun); } } diff --git a/sd/source/ui/slidesorter/view/SlsLayeredDevice.cxx b/sd/source/ui/slidesorter/view/SlsLayeredDevice.cxx index dce3744e2c80..276dc2cd791b 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& aFunction) { - assert(aFunction); + OSL_ASSERT(aFunction); RectangleVector aRectangles; rRegion.GetRegionRectangles(aRectangles); @@ -174,7 +174,7 @@ void LayeredDevice::Invalidate ( { if (nLayer<0 || size_t(nLayer)>=mpLayers->size()) { - assert(nLayer>=0 && size_t(nLayer)size()); + OSL_ASSERT(nLayer>=0 && size_t(nLayer)size()); return; } @@ -197,15 +197,15 @@ void LayeredDevice::RegisterPainter ( const SharedILayerPainter& rpPainter, const sal_Int32 nLayer) { - assert(mpLayers); + OSL_ASSERT(mpLayers); if ( ! rpPainter) { - assert(rpPainter); + OSL_ASSERT(rpPainter); return; } if (nLayer<0 || nLayer>=gnMaximumLayerCount) { - assert(nLayer>=0 && nLayer=0 && nLayer=mpLayers->size()) { - assert(nLayer>=0 && size_t(nLayer)size()); + OSL_ASSERT(nLayer>=0 && size_t(nLayer)size()); return; } @@ -360,7 +360,7 @@ bool LayeredDevice::HandleMapModeChange() else { // Can this happen? Lets trigger a warning when it does. - assert(false); + OSL_ASSERT(false); } maSavedMapMode = rMapMode; @@ -461,7 +461,7 @@ void Layer::Resize (const Size& rSize) void Layer::AddPainter (const SharedILayerPainter& rpPainter) { - assert(::std::find(maPainters.begin(), maPainters.end(), rpPainter) == maPainters.end()); + OSL_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 e276b5f95514..1728cc390c3f 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) { - assert(mpWindow); + OSL_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)) { - assert(bCalculateWidth || bCalculateHeight); + OSL_ASSERT(bCalculateWidth || bCalculateHeight); return maPreferredSize; } diff --git a/sd/source/ui/slidesorter/view/SlsPageObjectLayouter.cxx b/sd/source/ui/slidesorter/view/SlsPageObjectLayouter.cxx index 39e25aec4800..b4d41cc4ddff 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) { - assert(rpPageDescriptor); + OSL_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) { - assert(mpWindow); + OSL_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 4695a1a2f129..51d361205b36 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. - assert(rpDescriptor->GetPage()!=nullptr); + OSL_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 2398bb938256..c204140ab45f 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 { - assert(eType>=0 && size_t(eType)=0 && size_t(eType)=0 && size_t(eType)=0 && size_t(eType)=0 && size_t(eType)=0 && size_t(eType)GetName(); else { - assert(mpDescriptor->GetPage() != nullptr); + OSL_ASSERT(mpDescriptor->GetPage() != nullptr); } if (sHelpText.isEmpty()) { diff --git a/sd/source/ui/table/tablefunction.cxx b/sd/source/ui/table/tablefunction.cxx index 038bfaf9c140..69878f2ef874 100644 --- a/sd/source/ui/table/tablefunction.cxx +++ b/sd/source/ui/table/tablefunction.cxx @@ -220,7 +220,7 @@ void DrawViewShell::FuTable(SfxRequest& rReq) rReq.Ignore(); SfxViewShell* pViewShell = GetViewShell(); - assert (pViewShell!=nullptr); + OSL_ASSERT (pViewShell!=nullptr); SfxBindings& rBindings = pViewShell->GetViewFrame()->GetBindings(); rBindings.Invalidate( SID_INSERT_TABLE, true ); break; diff --git a/sd/source/ui/tools/PreviewRenderer.cxx b/sd/source/ui/tools/PreviewRenderer.cxx index 48e29d5709fd..d8096c27e53c 100644 --- a/sd/source/ui/tools/PreviewRenderer.cxx +++ b/sd/source/ui/tools/PreviewRenderer.cxx @@ -376,7 +376,7 @@ void PreviewRenderer::SetupOutputSize ( else { // We should never get here. - assert(false); + OSL_ASSERT(false); aMapMode.SetScaleX(1.0); aMapMode.SetScaleY(1.0); } diff --git a/sd/source/ui/view/DocumentRenderer.cxx b/sd/source/ui/view/DocumentRenderer.cxx index 17e0184b36b1..f1c6d3186a0d 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(); - assert(pPageView!=nullptr); + OSL_ASSERT(pPageView!=nullptr); pPageView->SetVisibleLayers(rVisibleLayers); pPageView->SetPrintableLayers(rPrintableLayers); @@ -1183,7 +1183,7 @@ public: */ void ProcessProperties (const css::uno::Sequence& rOptions) { - assert(!mbIsDisposed); + OSL_ASSERT(!mbIsDisposed); if (mbIsDisposed) return; @@ -1222,7 +1222,7 @@ public: */ sal_Int32 GetPrintPageCount() { - assert(!mbIsDisposed); + OSL_ASSERT(!mbIsDisposed); if (mbIsDisposed) return 0; else @@ -1256,7 +1256,7 @@ public: */ void PrintPage (const sal_Int32 nIndex) { - assert(!mbIsDisposed); + OSL_ASSERT(!mbIsDisposed); if (mbIsDisposed) return; @@ -1267,7 +1267,7 @@ public: return; SdDrawDocument* pDocument = pViewShell->GetDoc(); - assert(pDocument!=nullptr); + OSL_ASSERT(pDocument!=nullptr); std::shared_ptr pDrawViewShell( std::dynamic_pointer_cast(mrBase.GetMainViewShell())); @@ -1279,7 +1279,7 @@ public: return; const std::shared_ptr pPage (maPrinterPages[nIndex]); - assert(pPage); + OSL_ASSERT(pPage); if ( ! pPage) return; @@ -1580,8 +1580,8 @@ private: const sal_Int32 nPageIndex, const PageKind ePageKind) const { - assert(mrBase.GetDocument() != nullptr); - assert(nPageIndex>=0); + OSL_ASSERT(mrBase.GetDocument() != nullptr); + OSL_ASSERT(nPageIndex>=0); SdPage* pPage = mrBase.GetDocument()->GetSdPage( sal::static_int_cast(nPageIndex), ePageKind); @@ -1756,7 +1756,7 @@ private: void PrepareHandout (PrintInfo& rInfo) { SdDrawDocument* pDocument = mrBase.GetDocument(); - assert(pDocument != nullptr); + OSL_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) { - assert(rInfo.mpPrinter != nullptr); + OSL_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 68cbbb1bdfb0..c5b324aede8b 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. - assert(mpSubShellFactory.get()==nullptr); + OSL_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. - assert(mpFormShell==nullptr); + OSL_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 33c289a2c391..0cd8df02d24e 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 pViewShell (mpWeakViewShell.lock()); if ( ! pViewShell) { - assert(pViewShell); + OSL_ASSERT(pViewShell); return true; } @@ -539,7 +539,7 @@ void SdOutliner::Initialize (bool bDirectionIsForward) std::shared_ptr pViewShell (mpWeakViewShell.lock()); if ( ! pViewShell) { - assert(pViewShell); + OSL_ASSERT(pViewShell); return; } @@ -604,7 +604,7 @@ bool SdOutliner::SearchAndReplaceAll() std::shared_ptr pViewShell (mpWeakViewShell.lock()); if ( ! pViewShell) { - assert(pViewShell); + OSL_ASSERT(pViewShell); return true; } @@ -945,7 +945,7 @@ void SdOutliner::RememberStartPosition() std::shared_ptr pViewShell (mpWeakViewShell.lock()); if ( ! pViewShell) { - assert(pViewShell); + OSL_ASSERT(pViewShell); return; } @@ -1128,7 +1128,7 @@ void SdOutliner::EndOfSearch() std::shared_ptr pViewShell (mpWeakViewShell.lock()); if ( ! pViewShell) { - assert(pViewShell); + OSL_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(pViewShell); - assert(pDrawViewShell.get()!=nullptr); + OSL_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 pViewShell (mpWeakViewShell.lock()); std::shared_ptr pDrawViewShell( std::dynamic_pointer_cast(pViewShell)); - assert(pDrawViewShell.get()!=nullptr); + OSL_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 11b83861e922..0126a1d3a57b 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) { - assert(rpViewShell.get()); + OSL_ASSERT(rpViewShell.get()); sal_Int32 nObjectIndex; @@ -226,7 +226,7 @@ Iterator OutlinerContainer::CreateDocumentIterator ( bool bDirectionIsForward, IteratorLocation aLocation) { - assert(rpViewShell.get()); + OSL_ASSERT(rpViewShell.get()); PageKind ePageKind; EditMode eEditMode; @@ -292,7 +292,7 @@ sal_Int32 OutlinerContainer::GetPageIndex ( bool bDirectionIsForward, IteratorLocation aLocation) { - assert(rpViewShell); + OSL_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 8949d7b0392b..c4e2e6fd6561 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) { - assert(mpSynchronousLayouterLock.get()==nullptr); + OSL_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); - assert(mnLockCount>0); + OSL_ASSERT(mnLockCount>0); --mnLockCount; if (mnLockCount == 0) { diff --git a/sd/source/ui/view/ViewShellBase.cxx b/sd/source/ui/view/ViewShellBase.cxx index 65913edae752..308e28f890af 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() { - assert(GetViewFrame()!=nullptr); + OSL_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 ViewShellBase::GetRenderable() SfxPrinter* ViewShellBase::GetPrinter (bool bCreate) { - assert(mpImpl.get()!=nullptr); + OSL_ASSERT(mpImpl.get()!=nullptr); return GetDocShell()->GetPrinter (bCreate); } @@ -535,7 +535,7 @@ sal_uInt16 ViewShellBase::SetPrinter ( SfxPrinter* pNewPrinter, SfxPrinterChangeFlags nDiffFlags) { - assert(mpImpl.get()!=nullptr); + OSL_ASSERT(mpImpl.get()!=nullptr); GetDocShell()->SetPrinter(pNewPrinter); @@ -917,8 +917,8 @@ OUString ViewShellBase::GetInitialViewShellType() std::shared_ptr ViewShellBase::GetEventMultiplexer() { - assert(mpImpl.get()!=nullptr); - assert(mpImpl->mpEventMultiplexer.get()!=nullptr); + OSL_ASSERT(mpImpl.get()!=nullptr); + OSL_ASSERT(mpImpl->mpEventMultiplexer.get()!=nullptr); return mpImpl->mpEventMultiplexer; } @@ -930,37 +930,37 @@ const ::tools::Rectangle& ViewShellBase::getClientRectangle() const std::shared_ptr ViewShellBase::GetToolBarManager() const { - assert(mpImpl.get()!=nullptr); - assert(mpImpl->mpToolBarManager.get()!=nullptr); + OSL_ASSERT(mpImpl.get()!=nullptr); + OSL_ASSERT(mpImpl->mpToolBarManager.get()!=nullptr); return mpImpl->mpToolBarManager; } std::shared_ptr ViewShellBase::GetFormShellManager() const { - assert(mpImpl.get()!=nullptr); - assert(mpImpl->mpFormShellManager.get()!=nullptr); + OSL_ASSERT(mpImpl.get()!=nullptr); + OSL_ASSERT(mpImpl->mpFormShellManager.get()!=nullptr); return mpImpl->mpFormShellManager; } DrawController& ViewShellBase::GetDrawController() const { - assert(mpImpl.get()!=nullptr); + OSL_ASSERT(mpImpl.get()!=nullptr); return *mpImpl->mpController; } void ViewShellBase::SetViewTabBar (const ::rtl::Reference& rViewTabBar) { - assert(mpImpl.get()!=nullptr); + OSL_ASSERT(mpImpl.get()!=nullptr); mpImpl->mpViewTabBar = rViewTabBar; } vcl::Window* ViewShellBase::GetViewWindow() { - assert(mpImpl.get()!=nullptr); + OSL_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 4dac411b5589..8990f5aa76ef 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 { - assert(mpTopShell == mrBase.GetSubShell(0)); + OSL_ASSERT(mpTopShell == mrBase.GetSubShell(0)); return mpTopShell; } @@ -734,7 +734,7 @@ void ViewShellManager::Implementation::UnlockUpdate() if (mnUpdateLockCount < 0) { // This should not happen. - assert (mnUpdateLockCount>=0); + OSL_ASSERT (mnUpdateLockCount>=0); mnUpdateLockCount = 0; } if (mnUpdateLockCount == 0) @@ -1060,7 +1060,7 @@ ShellDescriptor ViewShellManager::Implementation::CreateSubShell ( void ViewShellManager::Implementation::DestroyViewShell ( ShellDescriptor& rDescriptor) { - assert(rDescriptor.mpShell != nullptr); + OSL_ASSERT(rDescriptor.mpShell != nullptr); if (rDescriptor.mbIsListenerAddedToWindow) { @@ -1089,7 +1089,7 @@ void ViewShellManager::Implementation::DestroySubShell ( const ShellDescriptor& rDescriptor) { (void)rParentShell; - assert(rDescriptor.mpFactory.get() != nullptr); + OSL_ASSERT(rDescriptor.mpFactory.get() != nullptr); rDescriptor.mpFactory->ReleaseShell(rDescriptor.mpShell); } @@ -1169,7 +1169,7 @@ void ViewShellManager::Implementation::DumpSfxShellStack() void ViewShellManager::Implementation::Deactivate (SfxShell* pShell) { - assert(pShell!=nullptr); + OSL_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 6f9637a987b4..2ea8063470ab 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); - assert(GetViewShell()!=nullptr); + OSL_ASSERT(GetViewShell()!=nullptr); Client* pClient = static_cast(GetViewShell()->GetIPClient()); if (pClient) pClient->SetSdrGrafObj(nullptr); @@ -842,7 +842,7 @@ bool DrawViewShell::SwitchPage(sal_uInt16 nSelectedPage) } else { - assert(mpFrameView!=nullptr); + OSL_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) !!! - assert (GetViewShell()!=nullptr); + OSL_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 af4d8f51de31..2a3aedf19bba 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 - assert (GetViewShell()!=nullptr); + OSL_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 bd6220c032ff..6bc0613f250a 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 - assert (GetViewShell()!=nullptr); + OSL_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 f1c6b613c6d3..9ba7f6bb4dce 100644 --- a/sd/source/ui/view/drviews5.cxx +++ b/sd/source/ui/view/drviews5.cxx @@ -116,7 +116,7 @@ void DrawViewShell::ArrangeGUIElements() maTabControl->Hide(); - assert (GetViewShell()!=nullptr); + OSL_ASSERT (GetViewShell()!=nullptr); Client* pIPClient = static_cast(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 ee7873d10419..c623adcb6517 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(); - assert (GetViewShell()!=nullptr); + OSL_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(); - assert (GetViewShell()!=nullptr); + OSL_ASSERT (GetViewShell()!=nullptr); SetPool( &GetDoc()->GetPool() ); diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx index 9fd244e7904d..39688be50520 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; - assert (GetViewShell()!=nullptr); + OSL_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 b6f19b8cdc4e..25bf6e858a9b 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 OutlineViewShell::CreateAccessibleDocumentView (::sd::Window* pWindow) { - assert (GetViewShell()!=nullptr); + OSL_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 59f8b4cfc7b3..5fa5158618bf 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) { - assert (mpViewSh->GetViewShell()!=nullptr); + OSL_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) { - assert (mpViewSh->GetViewShell()!=nullptr); + OSL_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) { - assert (mpViewSh->GetViewShell()!=nullptr); + OSL_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 4c7f60b3c2c1..af1bafb11a81 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) { - assert (mpViewSh->GetViewShell()!=nullptr); + OSL_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 27900d92d086..c56e19ac138e 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(); - assert (pViewShell!=nullptr); + OSL_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(); - assert (pViewShell!=nullptr); + OSL_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(); - assert (pViewShell!=nullptr); + OSL_ASSERT (pViewShell!=nullptr); bool bChangeDefaultsForChart = false; OUString aName; @@ -934,7 +934,7 @@ void ViewShell::SetRuler(bool bRuler) } } - assert(GetViewShell()!=nullptr); + OSL_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 ); - assert (GetViewShell()!=nullptr); + OSL_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*/) { - assert (GetViewShell()!=nullptr); + OSL_ASSERT (GetViewShell()!=nullptr); GetViewShell()->VisAreaChanged(); } diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx index d16323842a90..b741231d7986 100644 --- a/sd/source/ui/view/viewshel.cxx +++ b/sd/source/ui/view/viewshel.cxx @@ -133,7 +133,7 @@ SfxViewFrame* ViewShell::GetViewFrame() const } else { - assert (GetViewShell()!=nullptr); + OSL_ASSERT (GetViewShell()!=nullptr); return nullptr; } } @@ -195,7 +195,7 @@ void ViewShell::construct() mpImpl.reset(new Implementation(*this)); meShellType = ST_NONE; - assert (GetViewShell()!=nullptr); + OSL_ASSERT (GetViewShell()!=nullptr); if (IsMainViewShell()) GetDocSh()->Connect (this); @@ -326,7 +326,7 @@ void ViewShell::Activate(bool bIsMDIActivate) { &aItem }); SfxViewShell* pViewShell = GetViewShell(); - assert (pViewShell!=nullptr); + OSL_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* ) { - assert (GetViewShell()!=nullptr); + OSL_ASSERT (GetViewShell()!=nullptr); GetViewShellBase().GetToolBarManager()->ToolBarsDestroyed(); } void ViewShell::UIDeactivated( SfxInPlaceClient* ) { - assert (GetViewShell()!=nullptr); + OSL_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 ); - assert (GetViewShell()!=nullptr); + OSL_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. - assert (GetViewShell()!=nullptr); + OSL_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.) - assert(mpImpl->mpUpdateLockForMouse.expired()); + OSL_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) { - assert (GetViewShell()!=nullptr); + OSL_ASSERT (GetViewShell()!=nullptr); if (mpContentWindow) mpContentWindow->SetPosSizePixel( -- cgit