diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-06-26 10:11:50 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-06-26 16:29:14 +0100 |
commit | a8b32cc97aac79729b6561e542ede298d4f96c5a (patch) | |
tree | 3c3e5b16953f9437d1c69009b91660698fc681aa /svx | |
parent | 42bcbee2e6c71c766054bfd786d85302293b5b99 (diff) |
OSL_ENSURE->assert
Change-Id: Ib8ba49e89d03eaf3b3aae94dbbf121898ba9e8de
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/sdr/attribute/sdrtextattribute.cxx | 6 | ||||
-rw-r--r-- | svx/source/sdr/properties/defaultproperties.cxx | 2 | ||||
-rw-r--r-- | svx/source/stbctrls/pszctrl.cxx | 2 | ||||
-rw-r--r-- | svx/source/table/svdotable.cxx | 15 | ||||
-rw-r--r-- | svx/source/tbxctrls/grafctrl.cxx | 4 |
5 files changed, 9 insertions, 20 deletions
diff --git a/svx/source/sdr/attribute/sdrtextattribute.cxx b/svx/source/sdr/attribute/sdrtextattribute.cxx index 6b3fd30b735f..57d2dfd065d7 100644 --- a/svx/source/sdr/attribute/sdrtextattribute.cxx +++ b/svx/source/sdr/attribute/sdrtextattribute.cxx @@ -162,14 +162,16 @@ namespace drawinglayer // data read access const SdrText& getSdrText() const { - OSL_ENSURE(mpSdrText, "Access to text of default version of ImpSdrTextAttribute (!)"); + assert(mpSdrText && "Access to text of default version of ImpSdrTextAttribute (!)"); return *mpSdrText; } + const OutlinerParaObject& getOutlinerParaObject() const { - OSL_ENSURE(mpOutlinerParaObject, "Access to OutlinerParaObject of default version of ImpSdrTextAttribute (!)"); + assert(mpOutlinerParaObject && "Access to OutlinerParaObject of default version of ImpSdrTextAttribute (!)"); return *mpOutlinerParaObject; } + bool isContour() const { return mbContour; } bool isFitToSize() const { return mbFitToSize; } bool isAutoFit() const { return mbAutoFit; } diff --git a/svx/source/sdr/properties/defaultproperties.cxx b/svx/source/sdr/properties/defaultproperties.cxx index ac067fe7478c..47b32c6b518e 100644 --- a/svx/source/sdr/properties/defaultproperties.cxx +++ b/svx/source/sdr/properties/defaultproperties.cxx @@ -85,7 +85,7 @@ namespace sdr ((DefaultProperties*)this)->ForceDefaultAttributes(); } - DBG_ASSERT(mpItemSet, "Could not create an SfxItemSet(!)"); + assert(mpItemSet && "Could not create an SfxItemSet(!)"); return *mpItemSet; } diff --git a/svx/source/stbctrls/pszctrl.cxx b/svx/source/stbctrls/pszctrl.cxx index 102de3bda084..e48498ca1678 100644 --- a/svx/source/stbctrls/pszctrl.cxx +++ b/svx/source/stbctrls/pszctrl.cxx @@ -359,7 +359,7 @@ void SvxPosSizeStatusBarControl::Command( const CommandEvent& rCEvt ) void SvxPosSizeStatusBarControl::Paint( const UserDrawEvent& rUsrEvt ) { OutputDevice* pDev = rUsrEvt.GetDevice(); - DBG_ASSERT( pDev, "no OutputDevice on UserDrawEvent" ); + assert(pDev && "no OutputDevice on UserDrawEvent"); const Rectangle& rRect = rUsrEvt.GetRect(); StatusBar& rBar = GetStatusBar(); Point aItemPos = rBar.GetItemTextPos( GetId() ); diff --git a/svx/source/table/svdotable.cxx b/svx/source/table/svdotable.cxx index d49cfb3a96f2..0eba6e7b0c29 100644 --- a/svx/source/table/svdotable.cxx +++ b/svx/source/table/svdotable.cxx @@ -1297,8 +1297,6 @@ sal_Int32 SdrTableObj::CheckTextHit(const Point& rPnt) const return 0; } - - SdrOutliner* SdrTableObj::GetCellTextEditOutliner( const Cell& rCell ) const { if( mpImpl && (mpImpl->getCell( mpImpl->maEditPos ).get() == &rCell) ) @@ -1307,38 +1305,27 @@ SdrOutliner* SdrTableObj::GetCellTextEditOutliner( const Cell& rCell ) const return 0; } - - - const TableLayouter& SdrTableObj::getTableLayouter() const { - OSL_ENSURE(mpImpl && mpImpl->mpLayouter, "getTableLayouter() error: no mpImpl or mpLayouter (!)"); + assert(mpImpl && mpImpl->mpLayouter && "getTableLayouter() error: no mpImpl or mpLayouter (!)"); return *(mpImpl->mpLayouter); } - - bool SdrTableObj::IsAutoGrowHeight() const { return true; } - - bool SdrTableObj::IsAutoGrowWidth() const { return true; } - - bool SdrTableObj::HasText() const { return true; } - - bool SdrTableObj::IsTextEditActive( const CellPos& rPos ) { return pEdtOutl && mpImpl && (rPos == mpImpl->maEditPos); diff --git a/svx/source/tbxctrls/grafctrl.cxx b/svx/source/tbxctrls/grafctrl.cxx index 8d9240ab79e7..ffa10bef5acb 100644 --- a/svx/source/tbxctrls/grafctrl.cxx +++ b/svx/source/tbxctrls/grafctrl.cxx @@ -740,9 +740,9 @@ void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest& rReq, SdrView& rView ) const OUString aCropStr(SVX_RESSTR(RID_SVXSTR_GRAFCROP)); SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); - DBG_ASSERT(pFact, "Dialogdiet error!"); + assert(pFact && "Dialogdiet error!"); ::CreateTabPage fnCreatePage = pFact->GetTabPageCreatorFunc( RID_SVXPAGE_GRFCROP ); - DBG_ASSERT(fnCreatePage, "Dialogdiet error!"); + assert(fnCreatePage && "Dialogdiet error!"); SfxTabPage* pTabPage = (*fnCreatePage)( aCropDialog.get_content_area(), &aCropDlgAttr ); pTabPage->SetText( aCropStr ); |