diff options
author | Chris Sherlock <chris.sherlock79@gmail.com> | 2017-05-07 10:02:47 +1000 |
---|---|---|
committer | Chris Sherlock <chris.sherlock79@gmail.com> | 2017-05-07 10:02:47 +1000 |
commit | 74fa31e12355a45476458d0e6f907894bf4793cd (patch) | |
tree | 67cbaa54f680e500f60f0b6ab65f9491ebd68a97 | |
parent | 6c9fb88fc097ff42cb6a0e26dad84f535ea69edf (diff) |
tdf#43157: convert sfx2 module away from OSL_ASSERT to assert
Change-Id: I3facbef60a0d629db8f3028dd1b9f38e8f17e83e
-rw-r--r-- | sfx2/source/appl/appuno.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/appl/shutdownicon.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/dialog/mailmodel.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/dialog/templdlg.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/sidebar/DeckLayouter.cxx | 8 | ||||
-rw-r--r-- | sfx2/source/sidebar/DeckTitleBar.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/sidebar/PanelTitleBar.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/sidebar/SidebarController.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/sidebar/SidebarDockingWindow.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/sidebar/TabBar.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/sidebar/Theme.cxx | 16 | ||||
-rw-r--r-- | sfx2/source/sidebar/TitleBar.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/toolbox/tbxitem.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/view/viewsh.cxx | 4 |
14 files changed, 29 insertions, 29 deletions
diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx index d7bc5ff8d7b9..ac5a16aa92c2 100644 --- a/sfx2/source/appl/appuno.cxx +++ b/sfx2/source/appl/appuno.cxx @@ -296,7 +296,7 @@ void TransformParameters( sal_uInt16 nSlotId, const uno::Sequence<beans::Propert return; } - OSL_ASSERT(nCount > 0); + assert(nCount > 0); #ifdef DBG_UTIL // detect parameters that don't match to any formal argument or one of its members diff --git a/sfx2/source/appl/shutdownicon.cxx b/sfx2/source/appl/shutdownicon.cxx index f6a537ec72bb..82e68a9e4af5 100644 --- a/sfx2/source/appl/shutdownicon.cxx +++ b/sfx2/source/appl/shutdownicon.cxx @@ -535,7 +535,7 @@ void ShutdownIcon::terminateDesktop() ShutdownIcon* ShutdownIcon::getInstance() { - OSL_ASSERT( pShutdownIcon ); + assert( pShutdownIcon ); return pShutdownIcon; } diff --git a/sfx2/source/dialog/mailmodel.cxx b/sfx2/source/dialog/mailmodel.cxx index ac01c0fc6e6f..385a6552030b 100644 --- a/sfx2/source/dialog/mailmodel.cxx +++ b/sfx2/source/dialog/mailmodel.cxx @@ -305,7 +305,7 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat( bool bPrivateProtocol = ( aFileObj.GetProtocol() == INetProtocol::PrivSoffice ); bHasLocation = !aLocation.isEmpty() && !bPrivateProtocol; - OSL_ASSERT( !bPrivateProtocol ); + assert( !bPrivateProtocol ); } if ( !rType.isEmpty() ) bStoreTo = true; @@ -464,8 +464,8 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat( if ( aFileName.isEmpty() ) return eRet; - OSL_ASSERT( !aFilterName.isEmpty() ); - OSL_ASSERT( !aFileName.isEmpty() ); + assert( !aFilterName.isEmpty() ); + assert( !aFileName.isEmpty() ); // Creates a temporary directory to store a predefined file into it. // This makes it possible to store the file for "send document as e-mail" diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index b2a323aa6fe7..5fb7e5c78050 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -341,7 +341,7 @@ SfxTemplatePanelControl::SfxTemplatePanelControl(SfxBindings* pBindings, vcl::Wi , pImpl(new SfxTemplateDialog_Impl(pBindings, this)) , mpBindings(pBindings) { - OSL_ASSERT(mpBindings!=nullptr); + assert(mpBindings!=nullptr); SetStyle(GetStyle() & ~WB_DOCKABLE); } diff --git a/sfx2/source/sidebar/DeckLayouter.cxx b/sfx2/source/sidebar/DeckLayouter.cxx index 5a37474148c5..1721fd1b405e 100644 --- a/sfx2/source/sidebar/DeckLayouter.cxx +++ b/sfx2/source/sidebar/DeckLayouter.cxx @@ -302,7 +302,7 @@ sal_Int32 PlacePanels ( nPanelHeight = iItem->maLayoutSize.Preferred; break; default: - OSL_ASSERT(false); + assert(false); break; } @@ -453,7 +453,7 @@ void DistributeHeights ( if (nRemainingHeightToDistribute == 0) return; - OSL_ASSERT(nRemainingHeightToDistribute > 0); + assert(nRemainingHeightToDistribute > 0); // It is possible that not all of the height could be distributed // because of Maximum heights being smaller than expected. @@ -480,7 +480,7 @@ void DistributeHeights ( } } - OSL_ASSERT(nRemainingHeightToDistribute==0); + assert(nRemainingHeightToDistribute==0); } tools::Rectangle PlaceDeckTitle ( @@ -542,7 +542,7 @@ void SetupVerticalScrollBar( const sal_Int32 nContentHeight, const sal_Int32 nVisibleHeight) { - OSL_ASSERT(nContentHeight > nVisibleHeight); + assert(nContentHeight > nVisibleHeight); rVerticalScrollBar.SetRangeMin(0); rVerticalScrollBar.SetRangeMax(nContentHeight-1); diff --git a/sfx2/source/sidebar/DeckTitleBar.cxx b/sfx2/source/sidebar/DeckTitleBar.cxx index fe4d0b2aae6e..2f67fb100117 100644 --- a/sfx2/source/sidebar/DeckTitleBar.cxx +++ b/sfx2/source/sidebar/DeckTitleBar.cxx @@ -44,7 +44,7 @@ DeckTitleBar::DeckTitleBar (const OUString& rsTitle, , maCloserAction(rCloserAction) , mbIsCloserVisible(false) { - OSL_ASSERT(pParentWindow != nullptr); + assert(pParentWindow != nullptr); if (maCloserAction) SetCloserVisible(true); diff --git a/sfx2/source/sidebar/PanelTitleBar.cxx b/sfx2/source/sidebar/PanelTitleBar.cxx index fcb5e8f0ff6a..e46f001f3459 100644 --- a/sfx2/source/sidebar/PanelTitleBar.cxx +++ b/sfx2/source/sidebar/PanelTitleBar.cxx @@ -49,7 +49,7 @@ PanelTitleBar::PanelTitleBar(const OUString& rsTitle, mxFrame(), msMoreOptionsCommand() { - OSL_ASSERT(mpPanel != nullptr); + assert(mpPanel != nullptr); #ifdef DEBUG SetText(OUString("PanelTitleBar")); diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx index b21be2dfbc05..f3b83bda9d1c 100644 --- a/sfx2/source/sidebar/SidebarController.cxx +++ b/sfx2/source/sidebar/SidebarController.cxx @@ -336,7 +336,7 @@ void SidebarController::NotifyResize() { if (!mpTabBar) { - OSL_ASSERT(mpTabBar!=nullptr); + assert(mpTabBar!=nullptr); return; } diff --git a/sfx2/source/sidebar/SidebarDockingWindow.cxx b/sfx2/source/sidebar/SidebarDockingWindow.cxx index 84a2834e5a34..e350f1e52166 100644 --- a/sfx2/source/sidebar/SidebarDockingWindow.cxx +++ b/sfx2/source/sidebar/SidebarDockingWindow.cxx @@ -37,8 +37,8 @@ SidebarDockingWindow::SidebarDockingWindow(SfxBindings* pSfxBindings, SidebarChi // Get the XFrame from the bindings. if (pSfxBindings==nullptr || pSfxBindings->GetDispatcher()==nullptr) { - OSL_ASSERT(pSfxBindings!=nullptr); - OSL_ASSERT(pSfxBindings->GetDispatcher()!=nullptr); + assert(pSfxBindings!=nullptr); + assert(pSfxBindings->GetDispatcher()!=nullptr); } else { diff --git a/sfx2/source/sidebar/TabBar.cxx b/sfx2/source/sidebar/TabBar.cxx index 7d4ee1419ef0..4e6830f8c6f6 100644 --- a/sfx2/source/sidebar/TabBar.cxx +++ b/sfx2/source/sidebar/TabBar.cxx @@ -122,7 +122,7 @@ void TabBar::SetDecks(const ResourceManager::DeckContextDescriptorContainer& rDe std::shared_ptr<DeckDescriptor> xDescriptor = pParentSidebarController->GetResourceManager()->GetDeckDescriptor(iDeck->msId); if (xDescriptor == nullptr) { - OSL_ASSERT(xDescriptor!=nullptr); + assert(xDescriptor!=nullptr); continue; } diff --git a/sfx2/source/sidebar/Theme.cxx b/sfx2/source/sidebar/Theme.cxx index 2b29083f5bd9..db73bc21e273 100644 --- a/sfx2/source/sidebar/Theme.cxx +++ b/sfx2/source/sidebar/Theme.cxx @@ -61,7 +61,7 @@ Theme::~Theme() Image Theme::GetImage (const ThemeItem eItem) { const PropertyType eType (GetPropertyType(eItem)); - OSL_ASSERT(eType==PT_Image); + assert(eType==PT_Image); const sal_Int32 nIndex (GetIndex(eItem, eType)); const Theme& rTheme (GetCurrentTheme()); return rTheme.maImages[nIndex]; @@ -70,7 +70,7 @@ Image Theme::GetImage (const ThemeItem eItem) Color Theme::GetColor (const ThemeItem eItem) { const PropertyType eType (GetPropertyType(eItem)); - OSL_ASSERT(eType==PT_Color || eType==PT_Paint); + assert(eType==PT_Color || eType==PT_Paint); const sal_Int32 nIndex (GetIndex(eItem, eType)); const Theme& rTheme (GetCurrentTheme()); if (eType == PT_Color) @@ -84,7 +84,7 @@ Color Theme::GetColor (const ThemeItem eItem) const Paint& Theme::GetPaint (const ThemeItem eItem) { const PropertyType eType (GetPropertyType(eItem)); - OSL_ASSERT(eType==PT_Paint); + assert(eType==PT_Paint); const sal_Int32 nIndex (GetIndex(eItem, eType)); const Theme& rTheme (GetCurrentTheme()); return rTheme.maPaints[nIndex]; @@ -98,7 +98,7 @@ const Wallpaper Theme::GetWallpaper (const ThemeItem eItem) sal_Int32 Theme::GetInteger (const ThemeItem eItem) { const PropertyType eType (GetPropertyType(eItem)); - OSL_ASSERT(eType==PT_Integer); + assert(eType==PT_Integer); const sal_Int32 nIndex (GetIndex(eItem, eType)); const Theme& rTheme (GetCurrentTheme()); return rTheme.maIntegers[nIndex]; @@ -107,7 +107,7 @@ sal_Int32 Theme::GetInteger (const ThemeItem eItem) bool Theme::GetBoolean (const ThemeItem eItem) { const PropertyType eType (GetPropertyType(eItem)); - OSL_ASSERT(eType==PT_Boolean); + assert(eType==PT_Boolean); const sal_Int32 nIndex (GetIndex(eItem, eType)); const Theme& rTheme (GetCurrentTheme()); return rTheme.maBooleans[nIndex]; @@ -337,7 +337,7 @@ void Theme::UpdateTheme() catch(beans::UnknownPropertyException& rException) { SAL_WARN("sfx", "unknown property: " << rException.Message); - OSL_ASSERT(false); + assert(false); } } @@ -884,7 +884,7 @@ sal_Int32 Theme::GetIndex (const ThemeItem eItem, const PropertyType eType) return eItem - Bool_Rect_-1; default: - OSL_ASSERT(false); + assert(false); return 0; } } @@ -1049,7 +1049,7 @@ void Theme::ProcessNewValue ( break; } case PT_Invalid: - OSL_ASSERT(eType != PT_Invalid); + assert(eType != PT_Invalid); throw RuntimeException(); } } diff --git a/sfx2/source/sidebar/TitleBar.cxx b/sfx2/source/sidebar/TitleBar.cxx index 22433123cd4c..e03f382bc246 100644 --- a/sfx2/source/sidebar/TitleBar.cxx +++ b/sfx2/source/sidebar/TitleBar.cxx @@ -167,7 +167,7 @@ void TitleBar::PaintFocus(vcl::RenderContext& rRenderContext, const tools::Recta IMPL_LINK(TitleBar, SelectionHandler, ToolBox*, pToolBox, void) { (void)pToolBox; - OSL_ASSERT(maToolBox.get()==pToolBox); + assert(maToolBox.get()==pToolBox); const sal_uInt16 nItemId (maToolBox->GetHighlightItemId()); HandleToolBoxItemClick(nItemId); diff --git a/sfx2/source/toolbox/tbxitem.cxx b/sfx2/source/toolbox/tbxitem.cxx index 5aed453f2392..74ee50a7f3e8 100644 --- a/sfx2/source/toolbox/tbxitem.cxx +++ b/sfx2/source/toolbox/tbxitem.cxx @@ -104,7 +104,7 @@ SFX_IMPL_TOOLBOX_CONTROL_ARG(SfxToolBoxControl, SfxStringItem, true); static vcl::Window* GetTopMostParentSystemWindow( vcl::Window* pWindow ) { - OSL_ASSERT( pWindow ); + assert( pWindow ); if ( pWindow ) { // ->manually search topmost system window @@ -118,7 +118,7 @@ static vcl::Window* GetTopMostParentSystemWindow( vcl::Window* pWindow ) pWindow = pWindow->GetParent(); } pWindow = pTopMostSysWin; - OSL_ASSERT( pWindow ); + assert( pWindow ); return pWindow; } diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index dfb636d2e3a9..c73877ff5b57 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -633,8 +633,8 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq ) aFileName = aFObj.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DecodeMechanism::NONE ); } - OSL_ASSERT( !aFilterName.isEmpty() ); - OSL_ASSERT( !aFileName.isEmpty() ); + assert( !aFilterName.isEmpty() ); + assert( !aFileName.isEmpty() ); // Creates a temporary directory to store our predefined file into it. ::utl::TempFile aTempDir( nullptr, true ); |