summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Sherlock <chris.sherlock79@gmail.com>2017-05-07 14:30:36 +1000
committerChris Sherlock <chris.sherlock79@gmail.com>2017-05-07 14:30:36 +1000
commit392dbe6fe982e11009e04229e7e5200f838ea4f9 (patch)
tree66786427a08ba684ca71faa2239f102629d3f116
parent83017d884d58a2fe0ccaf23271ab3e232118ec79 (diff)
tdf#43157: convert sw module away from OSL_ASSERT to assert
Change-Id: I2018d669e4886040882c90012ad2b2c9f8a07331
-rw-r--r--sw/source/core/attr/hints.cxx2
-rw-r--r--sw/source/core/bastyp/calc.cxx2
-rw-r--r--sw/source/core/doc/doccomp.cxx4
-rw-r--r--sw/source/core/doc/number.cxx4
-rw-r--r--sw/source/core/docnode/ndtbl.cxx2
-rw-r--r--sw/source/core/edit/ednumber.cxx2
-rw-r--r--sw/source/core/edit/edws.cxx2
-rw-r--r--sw/source/core/undo/rolbck.cxx2
-rw-r--r--sw/source/core/undo/untbl.cxx2
-rw-r--r--sw/source/core/unocore/XMLRangeHelper.cxx2
-rw-r--r--sw/source/core/unocore/unobkm.cxx2
-rw-r--r--sw/source/core/unocore/unocrsrhelper.cxx2
-rw-r--r--sw/source/core/unocore/unoflatpara.cxx4
-rw-r--r--sw/source/core/unocore/unoidx.cxx2
-rw-r--r--sw/source/core/unocore/unorefmk.cxx4
-rw-r--r--sw/source/core/unocore/unotext.cxx2
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx6
-rw-r--r--sw/source/filter/ww8/ww8scan.cxx2
-rw-r--r--sw/source/ui/frmdlg/wrap.cxx2
-rw-r--r--sw/source/uibase/app/apphdl.cxx2
-rw-r--r--sw/source/uibase/app/swdll.cxx2
-rw-r--r--sw/source/uibase/docvw/FrameControlsManager.cxx2
22 files changed, 28 insertions, 28 deletions
diff --git a/sw/source/core/attr/hints.cxx b/sw/source/core/attr/hints.cxx
index 3ea3732a6f18..6934941f2186 100644
--- a/sw/source/core/attr/hints.cxx
+++ b/sw/source/core/attr/hints.cxx
@@ -126,7 +126,7 @@ SfxPoolItem* SwMsgPoolItem::Clone( SfxItemPool* ) const
#if OSL_DEBUG_LEVEL > 0
const SfxPoolItem* GetDfltAttr( sal_uInt16 nWhich )
{
- OSL_ASSERT( nWhich < POOLATTR_END && nWhich >= POOLATTR_BEGIN );
+ assert( nWhich < POOLATTR_END && nWhich >= POOLATTR_BEGIN );
SfxPoolItem *pHt = aAttrTab[ nWhich - POOLATTR_BEGIN ];
OSL_ENSURE( pHt, "GetDfltFormatAttr(): Dflt == 0" );
diff --git a/sw/source/core/bastyp/calc.cxx b/sw/source/core/bastyp/calc.cxx
index 35882054a097..d24949867c6d 100644
--- a/sw/source/core/bastyp/calc.cxx
+++ b/sw/source/core/bastyp/calc.cxx
@@ -1312,7 +1312,7 @@ namespace
double& rVal,
const LocaleDataWrapper* const pLclData )
{
- OSL_ASSERT(pLclData);
+ assert(pLclData);
const sal_Unicode nCurrCmdPos = rCommandPos;
rtl_math_ConversionStatus eStatus;
const sal_Unicode* pEnd;
diff --git a/sw/source/core/doc/doccomp.cxx b/sw/source/core/doc/doccomp.cxx
index 4b3daa8bcee2..4b5c3c388b94 100644
--- a/sw/source/core/doc/doccomp.cxx
+++ b/sw/source/core/doc/doccomp.cxx
@@ -2334,8 +2334,8 @@ int CommonSubseq::FindLCS( int *pLcs1, int *pLcs2, int nStt1, int nEnd1,
int nLen1 = nEnd1 ? nEnd1 - nStt1 : rCmp.GetLen1();
int nLen2 = nEnd2 ? nEnd2 - nStt2 : rCmp.GetLen2();
- OSL_ASSERT( nLen1 >= 0 );
- OSL_ASSERT( nLen2 >= 0 );
+ assert( nLen1 >= 0 );
+ assert( nLen2 >= 0 );
std::unique_ptr<int*[]> pLcs( new int*[ nLen1 + 1 ] );
pLcs[ 0 ] = pData.get();
diff --git a/sw/source/core/doc/number.cxx b/sw/source/core/doc/number.cxx
index f414b3a6a226..dd0c68d00279 100644
--- a/sw/source/core/doc/number.cxx
+++ b/sw/source/core/doc/number.cxx
@@ -78,7 +78,7 @@ OUString SwNumRule::GetOutlineRuleName()
const SwNumFormat& SwNumRule::Get( sal_uInt16 i ) const
{
- OSL_ASSERT( i < MAXLEVEL && meRuleType < RULE_END );
+ assert( i < MAXLEVEL && meRuleType < RULE_END );
return maFormats[ i ]
? *maFormats[ i ]
: ( meDefaultNumberFormatPositionAndSpaceMode == SvxNumberFormat::LABEL_WIDTH_AND_POSITION
@@ -90,7 +90,7 @@ const SwNumFormat* SwNumRule::GetNumFormat( sal_uInt16 i ) const
{
const SwNumFormat * pResult = nullptr;
- OSL_ASSERT( i < MAXLEVEL && meRuleType < RULE_END );
+ assert( i < MAXLEVEL && meRuleType < RULE_END );
if ( i < MAXLEVEL && meRuleType < RULE_END)
{
pResult = maFormats[ i ];
diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx
index 10c90fddd03a..38ba5ecb5a12 100644
--- a/sw/source/core/docnode/ndtbl.cxx
+++ b/sw/source/core/docnode/ndtbl.cxx
@@ -2297,7 +2297,7 @@ TableMergeErr SwDoc::MergeTable( SwPaM& rPam )
if (pU && pU->GetRedlSaveCount())
{
SwEditShell *const pEditShell(GetEditShell());
- OSL_ASSERT(pEditShell);
+ assert(pEditShell);
::sw::UndoRedoContext context(*this, *pEditShell);
static_cast<SfxUndoAction *>(pU)->UndoWithContext(context);
}
diff --git a/sw/source/core/edit/ednumber.cxx b/sw/source/core/edit/ednumber.cxx
index 70f9541ccb04..ef503f3187f4 100644
--- a/sw/source/core/edit/ednumber.cxx
+++ b/sw/source/core/edit/ednumber.cxx
@@ -97,7 +97,7 @@ void SwPamRanges::Insert( const SwNodeIndex& rIdx1, const SwNodeIndex& rIdx2 )
SwPaM& SwPamRanges::SetPam( size_t nArrPos, SwPaM& rPam )
{
- OSL_ASSERT( nArrPos < Count() );
+ assert( nArrPos < Count() );
const SwPamRange& rTmp = maVector[ nArrPos ];
rPam.GetPoint()->nNode = rTmp.nStart;
rPam.GetPoint()->nContent.Assign( rPam.GetContentNode(), 0 );
diff --git a/sw/source/core/edit/edws.cxx b/sw/source/core/edit/edws.cxx
index cbda86ddf3eb..57283f484f39 100644
--- a/sw/source/core/edit/edws.cxx
+++ b/sw/source/core/edit/edws.cxx
@@ -122,7 +122,7 @@ sal_uInt16 SwEditShell::GetCntType() const
default: break;
}
- OSL_ASSERT( nRet );
+ assert( nRet );
return nRet;
}
diff --git a/sw/source/core/undo/rolbck.cxx b/sw/source/core/undo/rolbck.cxx
index 93c25f85bc5c..017796153597 100644
--- a/sw/source/core/undo/rolbck.cxx
+++ b/sw/source/core/undo/rolbck.cxx
@@ -549,7 +549,7 @@ SwHistoryTextFlyCnt::~SwHistoryTextFlyCnt()
void SwHistoryTextFlyCnt::SetInDoc( SwDoc* pDoc, bool )
{
::sw::IShellCursorSupplier *const pISCS(pDoc->GetIShellCursorSupplier());
- OSL_ASSERT(pISCS);
+ assert(pISCS);
::sw::UndoRedoContext context(*pDoc, *pISCS);
m_pUndo->UndoImpl(context);
}
diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx
index 7d6c81349aa0..043a759f3b85 100644
--- a/sw/source/core/undo/untbl.cxx
+++ b/sw/source/core/undo/untbl.cxx
@@ -2460,7 +2460,7 @@ void SwUndoTableCpyTable::UndoImpl(::sw::UndoRedoContext & rContext)
dynamic_cast<SwUndoDelete*>(pEntry->pUndo);
SwUndoRedlineDelete *const pUndoRedlineDelete =
dynamic_cast<SwUndoRedlineDelete*>(pEntry->pUndo);
- OSL_ASSERT(pUndoDelete || pUndoRedlineDelete);
+ assert(pUndoDelete || pUndoRedlineDelete);
if (pUndoRedlineDelete)
{
// The old content was not empty or he has been merged with the new content
diff --git a/sw/source/core/unocore/XMLRangeHelper.cxx b/sw/source/core/unocore/XMLRangeHelper.cxx
index 3c4b828f58d1..d837d841fbb9 100644
--- a/sw/source/core/unocore/XMLRangeHelper.cxx
+++ b/sw/source/core/unocore/XMLRangeHelper.cxx
@@ -72,7 +72,7 @@ private:
void lcl_getXMLStringForCell( const /*::chart::*/XMLRangeHelper::Cell & rCell, OUStringBuffer * output )
{
- OSL_ASSERT(output != nullptr);
+ assert(output != nullptr);
if( rCell.empty())
return;
diff --git a/sw/source/core/unocore/unobkm.cxx b/sw/source/core/unocore/unobkm.cxx
index a7a62f713ce6..cf9f0f9a296c 100644
--- a/sw/source/core/unocore/unobkm.cxx
+++ b/sw/source/core/unocore/unobkm.cxx
@@ -604,7 +604,7 @@ SwXFieldmark::getCheckboxFieldmark()
{
// evil #TODO #FIXME casting away the const-ness
pCheckboxFm = const_cast<sw::mark::ICheckboxFieldmark*>(dynamic_cast< const ::sw::mark::ICheckboxFieldmark* >( GetBookmark()));
- OSL_ASSERT( GetBookmark() == nullptr || pCheckboxFm != nullptr );
+ assert( GetBookmark() == nullptr || pCheckboxFm != nullptr );
// unclear to me whether GetBookmark() can be null here
}
return pCheckboxFm;
diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx
index 71faf3dbb0bd..ceaa633c5f2d 100644
--- a/sw/source/core/unocore/unocrsrhelper.cxx
+++ b/sw/source/core/unocore/unocrsrhelper.cxx
@@ -293,7 +293,7 @@ GetNestedTextContent(SwTextNode & rTextNode, sal_Int32 const nIndex,
{
::sw::Meta *const pMeta(
static_cast<SwFormatMeta &>(pTextAttr->GetAttr()).GetMeta());
- OSL_ASSERT(pMeta);
+ assert(pMeta);
xRet.set(pMeta->MakeUnoObject(), uno::UNO_QUERY);
}
return xRet;
diff --git a/sw/source/core/unocore/unoflatpara.cxx b/sw/source/core/unocore/unoflatpara.cxx
index 39a0d616d5e9..704e3f45fa9e 100644
--- a/sw/source/core/unocore/unoflatpara.cxx
+++ b/sw/source/core/unocore/unoflatpara.cxx
@@ -472,7 +472,7 @@ uno::Reference< text::XFlatParagraph > SwXFlatParagraphIterator::getParaAfter(co
return xRet;
const uno::Reference<lang::XUnoTunnel> xFPTunnel(xPara, uno::UNO_QUERY);
- OSL_ASSERT(xFPTunnel.is());
+ assert(xFPTunnel.is());
SwXFlatParagraph* const pFlatParagraph(sw::UnoTunnelGetImplementation<SwXFlatParagraph>(xFPTunnel));
if ( !pFlatParagraph )
@@ -517,7 +517,7 @@ uno::Reference< text::XFlatParagraph > SwXFlatParagraphIterator::getParaBefore(c
return xRet;
const uno::Reference<lang::XUnoTunnel> xFPTunnel(xPara, uno::UNO_QUERY);
- OSL_ASSERT(xFPTunnel.is());
+ assert(xFPTunnel.is());
SwXFlatParagraph* const pFlatParagraph(sw::UnoTunnelGetImplementation<SwXFlatParagraph>(xFPTunnel));
if ( !pFlatParagraph )
diff --git a/sw/source/core/unocore/unoidx.cxx b/sw/source/core/unocore/unoidx.cxx
index dbdd6e13d971..3450e52473cf 100644
--- a/sw/source/core/unocore/unoidx.cxx
+++ b/sw/source/core/unocore/unoidx.cxx
@@ -1972,7 +1972,7 @@ void SwXDocumentIndexMark::Impl::InsertTOXMark(
std::vector<SwTextAttr *>::const_iterator const iter(
std::find_if(newMarks.begin(), newMarks.end(),
NotContainedIn<SwTextAttr *>(oldMarks)));
- OSL_ASSERT(newMarks.end() != iter);
+ assert(newMarks.end() != iter);
if (newMarks.end() != iter)
{
pTextAttr = *iter;
diff --git a/sw/source/core/unocore/unorefmk.cxx b/sw/source/core/unocore/unorefmk.cxx
index a66d7200b48c..48c878fa15b8 100644
--- a/sw/source/core/unocore/unorefmk.cxx
+++ b/sw/source/core/unocore/unorefmk.cxx
@@ -254,7 +254,7 @@ void SwXReferenceMark::Impl::InsertRefMark(SwPaM& rPam,
std::vector<SwTextAttr *>::const_iterator const iter(
std::find_if(newMarks.begin(), newMarks.end(),
NotContainedIn<SwTextAttr *>(oldMarks)));
- OSL_ASSERT(newMarks.end() != iter);
+ assert(newMarks.end() != iter);
if (newMarks.end() != iter)
{
pTextAttr = *iter;
@@ -263,7 +263,7 @@ void SwXReferenceMark::Impl::InsertRefMark(SwPaM& rPam,
else
{
SwTextNode *pTextNd = rPam.GetNode().GetTextNode();
- OSL_ASSERT(pTextNd);
+ assert(pTextNd);
pTextAttr = pTextNd ? rPam.GetNode().GetTextNode()->GetTextAttrForCharAt(
rPam.GetPoint()->nContent.GetIndex() - 1, RES_TXTATR_REFMARK) : nullptr;
}
diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx
index a22f2e874822..e115f1d4b65c 100644
--- a/sw/source/core/unocore/unotext.cxx
+++ b/sw/source/core/unocore/unotext.cxx
@@ -1661,7 +1661,7 @@ SwXText::convertToTextFrame(
}
SwTextNode *const pTextNode(aStartPam.GetNode().GetTextNode());
- OSL_ASSERT(pTextNode);
+ assert(pTextNode);
if (!pTextNode || !pTextNode->Len()) // don't remove if it contains text!
{
{ // has to be in a block to remove the SwIndexes before
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index e1bffe7ffca0..380c14c2d574 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -1740,13 +1740,13 @@ void DocxAttributeOutput::StartRunProperties()
}
InitCollectedRunProperties();
- OSL_ASSERT( !m_pPostponedGraphic );
+ assert( !m_pPostponedGraphic );
m_pPostponedGraphic.reset(new std::list<PostponedGraphic>);
- OSL_ASSERT( !m_pPostponedDiagrams );
+ assert( !m_pPostponedDiagrams );
m_pPostponedDiagrams.reset(new std::list<PostponedDiagram>);
- OSL_ASSERT( !m_pPostponedVMLDrawings );
+ assert( !m_pPostponedVMLDrawings );
m_pPostponedVMLDrawings.reset(new std::list<PostponedDrawing>);
assert(!m_pPostponedDMLDrawings);
diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index 2e3e2fc9cf4a..f2b05dc6c560 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -7062,7 +7062,7 @@ WW8Fonts::WW8Fonts( SvStream& rSt, WW8Fib& rFib )
pVer8 += 24; //FONTSIGNATURE
cbFfnM1-=24;
- OSL_ASSERT(cbFfnM1 >= 2);
+ assert(cbFfnM1 >= 2);
sal_uInt8 nMaxNullTerminatedPossible = cbFfnM1/2 - 1;
sal_Unicode *pPrimary = reinterpret_cast<sal_Unicode*>(pVer8);
diff --git a/sw/source/ui/frmdlg/wrap.cxx b/sw/source/ui/frmdlg/wrap.cxx
index 02c3a58682e5..73bbdd3966c7 100644
--- a/sw/source/ui/frmdlg/wrap.cxx
+++ b/sw/source/ui/frmdlg/wrap.cxx
@@ -605,7 +605,7 @@ IMPL_LINK( SwWrapTabPage, RangeModifyHdl, SpinField&, rSpin, void )
else if (&rEdit == m_pBottomMarginED)
pOpposite = m_pTopMarginED;
- OSL_ASSERT(pOpposite);
+ assert(pOpposite);
if (pOpposite)
{
diff --git a/sw/source/uibase/app/apphdl.cxx b/sw/source/uibase/app/apphdl.cxx
index 61e98ca892ca..f119656d77ed 100644
--- a/sw/source/uibase/app/apphdl.cxx
+++ b/sw/source/uibase/app/apphdl.cxx
@@ -823,7 +823,7 @@ void SwModule::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
switch( pEvHint->GetEventId() )
{
case SfxEventHintId::LoadFinished:
- OSL_ASSERT(!pWrtSh);
+ assert(!pWrtSh);
// if it is a new document created from a template,
// update fixed fields
if (pDocSh->GetMedium())
diff --git a/sw/source/uibase/app/swdll.cxx b/sw/source/uibase/app/swdll.cxx
index 0b226ec4dadd..af1e91322a80 100644
--- a/sw/source/uibase/app/swdll.cxx
+++ b/sw/source/uibase/app/swdll.cxx
@@ -172,7 +172,7 @@ SwDLL::~SwDLL()
sw::Filters & SwDLL::getFilters()
{
- OSL_ASSERT(filters_);
+ assert(filters_);
return *filters_.get();
}
diff --git a/sw/source/uibase/docvw/FrameControlsManager.cxx b/sw/source/uibase/docvw/FrameControlsManager.cxx
index a16193227b1d..3ffb9a96f532 100644
--- a/sw/source/uibase/docvw/FrameControlsManager.cxx
+++ b/sw/source/uibase/docvw/FrameControlsManager.cxx
@@ -104,7 +104,7 @@ void SwFrameControlsManager::SetReadonlyControls( bool bReadonly )
void SwFrameControlsManager::SetHeaderFooterControl( const SwPageFrame* pPageFrame, FrameControlType eType, Point aOffset )
{
- OSL_ASSERT( eType == Header || eType == Footer );
+ assert( eType == Header || eType == Footer );
// Check if we already have the control
SwFrameControlPtr pControl;