summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2010-11-20 11:42:30 +0100
committerDavid Tardon <dtardon@redhat.com>2010-11-20 11:42:30 +0100
commit9e595c48b583e9f33d078b3d65f093a7dbe0ecbf (patch)
tree95774b178df44b85b3c3327b00ba1e0de48f1f23
parentd765db020b580086edb2b1068c9995c442a1ad91 (diff)
replace ScfRef with boost::shared_ptr in assertions too
-rw-r--r--sc/source/filter/excel/xechart.cxx2
-rw-r--r--sc/source/filter/excel/xelink.cxx2
-rw-r--r--sc/source/filter/excel/xename.cxx2
-rw-r--r--sc/source/filter/excel/xeroot.cxx32
-rw-r--r--sc/source/filter/excel/xetable.cxx10
-rw-r--r--sc/source/filter/excel/xiescher.cxx4
-rw-r--r--sc/source/filter/excel/xiroot.cxx16
-rw-r--r--sc/source/filter/xcl97/XclExpChangeTrack.cxx2
8 files changed, 35 insertions, 35 deletions
diff --git a/sc/source/filter/excel/xechart.cxx b/sc/source/filter/excel/xechart.cxx
index 86bbe06ff5cd..b670ec90f164 100644
--- a/sc/source/filter/excel/xechart.cxx
+++ b/sc/source/filter/excel/xechart.cxx
@@ -686,7 +686,7 @@ sal_uInt32 XclExpChEscherFormat::RegisterColor( sal_uInt16 nPropId )
void XclExpChEscherFormat::WriteBody( XclExpStream& rStrm )
{
- DBG_ASSERT( maData.mxEscherSet.is(), "XclExpChEscherFormat::WriteBody - missing property container" );
+ DBG_ASSERT( maData.mxEscherSet, "XclExpChEscherFormat::WriteBody - missing property container" );
// write Escher property container via temporary memory stream
SvMemoryStream aMemStrm;
maData.mxEscherSet->Commit( aMemStrm );
diff --git a/sc/source/filter/excel/xelink.cxx b/sc/source/filter/excel/xelink.cxx
index dff43ffc29e7..e419955936e4 100644
--- a/sc/source/filter/excel/xelink.cxx
+++ b/sc/source/filter/excel/xelink.cxx
@@ -1775,7 +1775,7 @@ bool XclExpSupbookBuffer::InsertAddIn(
}
else
xSupbook = maSupbookList.GetRecord( mnAddInSB );
- DBG_ASSERT( xSupbook.is(), "XclExpSupbookBuffer::InsertAddin - missing add-in supbook" );
+ DBG_ASSERT( xSupbook, "XclExpSupbookBuffer::InsertAddin - missing add-in supbook" );
rnSupbook = mnAddInSB;
rnExtName = xSupbook->InsertAddIn( rName );
return rnExtName > 0;
diff --git a/sc/source/filter/excel/xename.cxx b/sc/source/filter/excel/xename.cxx
index bfc588abb6b3..2598a3f83b28 100644
--- a/sc/source/filter/excel/xename.cxx
+++ b/sc/source/filter/excel/xename.cxx
@@ -310,7 +310,7 @@ bool XclExpName::IsMacroCall( bool bVBasic, bool bFunc ) const
void XclExpName::Save( XclExpStream& rStrm )
{
- DBG_ASSERT( mxName.is() && (mxName->Len() > 0), "XclExpName::Save - missing name" );
+ DBG_ASSERT( mxName && (mxName->Len() > 0), "XclExpName::Save - missing name" );
DBG_ASSERT( !(IsGlobal() && ::get_flag( mnFlags, EXC_NAME_BUILTIN )), "XclExpName::Save - global built-in name" );
SetRecSize( 11 + mxName->GetSize() + (mxTokArr ? mxTokArr->GetSize() : 2) );
XclExpRecord::Save( rStrm );
diff --git a/sc/source/filter/excel/xeroot.cxx b/sc/source/filter/excel/xeroot.cxx
index 27c844360f49..4b6169ceb20a 100644
--- a/sc/source/filter/excel/xeroot.cxx
+++ b/sc/source/filter/excel/xeroot.cxx
@@ -76,91 +76,91 @@ XclExpRoot::XclExpRoot( XclExpRootData& rExpRootData ) :
XclExpTabInfo& XclExpRoot::GetTabInfo() const
{
- DBG_ASSERT( mrExpData.mxTabInfo.is(), "XclExpRoot::GetTabInfo - missing object (wrong BIFF?)" );
+ DBG_ASSERT( mrExpData.mxTabInfo, "XclExpRoot::GetTabInfo - missing object (wrong BIFF?)" );
return *mrExpData.mxTabInfo;
}
XclExpAddressConverter& XclExpRoot::GetAddressConverter() const
{
- DBG_ASSERT( mrExpData.mxAddrConv.is(), "XclExpRoot::GetAddressConverter - missing object (wrong BIFF?)" );
+ DBG_ASSERT( mrExpData.mxAddrConv, "XclExpRoot::GetAddressConverter - missing object (wrong BIFF?)" );
return *mrExpData.mxAddrConv;
}
XclExpFormulaCompiler& XclExpRoot::GetFormulaCompiler() const
{
- DBG_ASSERT( mrExpData.mxFmlaComp.is(), "XclExpRoot::GetFormulaCompiler - missing object (wrong BIFF?)" );
+ DBG_ASSERT( mrExpData.mxFmlaComp, "XclExpRoot::GetFormulaCompiler - missing object (wrong BIFF?)" );
return *mrExpData.mxFmlaComp;
}
XclExpProgressBar& XclExpRoot::GetProgressBar() const
{
- DBG_ASSERT( mrExpData.mxProgress.is(), "XclExpRoot::GetProgressBar - missing object (wrong BIFF?)" );
+ DBG_ASSERT( mrExpData.mxProgress, "XclExpRoot::GetProgressBar - missing object (wrong BIFF?)" );
return *mrExpData.mxProgress;
}
XclExpSst& XclExpRoot::GetSst() const
{
- DBG_ASSERT( mrExpData.mxSst.is(), "XclExpRoot::GetSst - missing object (wrong BIFF?)" );
+ DBG_ASSERT( mrExpData.mxSst, "XclExpRoot::GetSst - missing object (wrong BIFF?)" );
return *mrExpData.mxSst;
}
XclExpPalette& XclExpRoot::GetPalette() const
{
- DBG_ASSERT( mrExpData.mxPalette.is(), "XclExpRoot::GetPalette - missing object (wrong BIFF?)" );
+ DBG_ASSERT( mrExpData.mxPalette, "XclExpRoot::GetPalette - missing object (wrong BIFF?)" );
return *mrExpData.mxPalette;
}
XclExpFontBuffer& XclExpRoot::GetFontBuffer() const
{
- DBG_ASSERT( mrExpData.mxFontBfr.is(), "XclExpRoot::GetFontBuffer - missing object (wrong BIFF?)" );
+ DBG_ASSERT( mrExpData.mxFontBfr, "XclExpRoot::GetFontBuffer - missing object (wrong BIFF?)" );
return *mrExpData.mxFontBfr;
}
XclExpNumFmtBuffer& XclExpRoot::GetNumFmtBuffer() const
{
- DBG_ASSERT( mrExpData.mxNumFmtBfr.is(), "XclExpRoot::GetNumFmtBuffer - missing object (wrong BIFF?)" );
+ DBG_ASSERT( mrExpData.mxNumFmtBfr, "XclExpRoot::GetNumFmtBuffer - missing object (wrong BIFF?)" );
return *mrExpData.mxNumFmtBfr;
}
XclExpXFBuffer& XclExpRoot::GetXFBuffer() const
{
- DBG_ASSERT( mrExpData.mxXFBfr.is(), "XclExpRoot::GetXFBuffer - missing object (wrong BIFF?)" );
+ DBG_ASSERT( mrExpData.mxXFBfr, "XclExpRoot::GetXFBuffer - missing object (wrong BIFF?)" );
return *mrExpData.mxXFBfr;
}
XclExpLinkManager& XclExpRoot::GetGlobalLinkManager() const
{
- DBG_ASSERT( mrExpData.mxGlobLinkMgr.is(), "XclExpRoot::GetGlobalLinkManager - missing object (wrong BIFF?)" );
+ DBG_ASSERT( mrExpData.mxGlobLinkMgr, "XclExpRoot::GetGlobalLinkManager - missing object (wrong BIFF?)" );
return *mrExpData.mxGlobLinkMgr;
}
XclExpLinkManager& XclExpRoot::GetLocalLinkManager() const
{
- DBG_ASSERT( GetLocalLinkMgrRef().is(), "XclExpRoot::GetLocalLinkManager - missing object (wrong BIFF?)" );
+ DBG_ASSERT( GetLocalLinkMgrRef(), "XclExpRoot::GetLocalLinkManager - missing object (wrong BIFF?)" );
return *GetLocalLinkMgrRef();
}
XclExpNameManager& XclExpRoot::GetNameManager() const
{
- DBG_ASSERT( mrExpData.mxNameMgr.is(), "XclExpRoot::GetNameManager - missing object (wrong BIFF?)" );
+ DBG_ASSERT( mrExpData.mxNameMgr, "XclExpRoot::GetNameManager - missing object (wrong BIFF?)" );
return *mrExpData.mxNameMgr;
}
XclExpObjectManager& XclExpRoot::GetObjectManager() const
{
- DBG_ASSERT( mrExpData.mxObjMgr.is(), "XclExpRoot::GetObjectManager - missing object (wrong BIFF?)" );
+ DBG_ASSERT( mrExpData.mxObjMgr, "XclExpRoot::GetObjectManager - missing object (wrong BIFF?)" );
return *mrExpData.mxObjMgr;
}
XclExpFilterManager& XclExpRoot::GetFilterManager() const
{
- DBG_ASSERT( mrExpData.mxFilterMgr.is(), "XclExpRoot::GetFilterManager - missing object (wrong BIFF?)" );
+ DBG_ASSERT( mrExpData.mxFilterMgr, "XclExpRoot::GetFilterManager - missing object (wrong BIFF?)" );
return *mrExpData.mxFilterMgr;
}
XclExpPivotTableManager& XclExpRoot::GetPivotTableManager() const
{
- DBG_ASSERT( mrExpData.mxPTableMgr.is(), "XclExpRoot::GetPivotTableManager - missing object (wrong BIFF?)" );
+ DBG_ASSERT( mrExpData.mxPTableMgr, "XclExpRoot::GetPivotTableManager - missing object (wrong BIFF?)" );
return *mrExpData.mxPTableMgr;
}
@@ -231,7 +231,7 @@ XclExpRecordRef XclExpRoot::CreateRecord( sal_uInt16 nRecId ) const
case EXC_ID_EXTERNSHEET: xRec = GetLocalLinkMgrRef(); break;
case EXC_ID_NAME: xRec = mrExpData.mxNameMgr; break;
}
- DBG_ASSERT( xRec.is(), "XclExpRoot::CreateRecord - unknown record ID or missing object" );
+ DBG_ASSERT( xRec, "XclExpRoot::CreateRecord - unknown record ID or missing object" );
return xRec;
}
diff --git a/sc/source/filter/excel/xetable.cxx b/sc/source/filter/excel/xetable.cxx
index 76cb870fa687..fc6c3b0ad101 100644
--- a/sc/source/filter/excel/xetable.cxx
+++ b/sc/source/filter/excel/xetable.cxx
@@ -680,7 +680,7 @@ bool XclExpLabelCell::IsMultiLineText() const
void XclExpLabelCell::Init( const XclExpRoot& rRoot,
const ScPatternAttr* pPattern, XclExpStringRef xText )
{
- DBG_ASSERT( xText.is() && xText->Len(), "XclExpLabelCell::XclExpLabelCell - empty string passed" );
+ DBG_ASSERT( xText && xText->Len(), "XclExpLabelCell::XclExpLabelCell - empty string passed" );
mxText = xText;
mnSstIndex = 0;
@@ -846,7 +846,7 @@ XclExpFormulaCell::XclExpFormulaCell(
// other formula cell covered by a matrix - find the ARRAY record
mxAddRec = rArrayBfr.FindArray( rScTokArr );
// should always be found, if Calc document is not broken
- DBG_ASSERT( mxAddRec.is(), "XclExpFormulaCell::XclExpFormulaCell - no matrix found" );
+ DBG_ASSERT( mxAddRec, "XclExpFormulaCell::XclExpFormulaCell - no matrix found" );
}
break;
default:;
@@ -868,7 +868,7 @@ void XclExpFormulaCell::Save( XclExpStream& rStrm )
mxTokArr = mxAddRec->CreateCellTokenArray( rStrm.GetRoot() );
// FORMULA record itself
- DBG_ASSERT( mxTokArr.is(), "XclExpFormulaCell::Save - missing token array" );
+ DBG_ASSERT( mxTokArr, "XclExpFormulaCell::Save - missing token array" );
if( !mxTokArr )
mxTokArr = rStrm.GetRoot().GetFormulaCompiler().CreateErrorFormula( EXC_ERR_NA );
SetContSize( 16 + mxTokArr->GetSize() );
@@ -1936,7 +1936,7 @@ void XclExpRow::Save( XclExpStream& rStrm )
void XclExpRow::InsertCell( XclExpCellRef xCell, size_t nPos, bool bIsMergedBase )
{
- DBG_ASSERT( xCell.is(), "XclExpRow::InsertCell - missing cell" );
+ DBG_ASSERT( xCell, "XclExpRow::InsertCell - missing cell" );
/* #109751# If we have a multi-line text in a merged cell, and the resulting
row height has not been confirmed, we need to force the EXC_ROW_UNSYNCED
@@ -2005,7 +2005,7 @@ XclExpRowBuffer::XclExpRowBuffer( const XclExpRoot& rRoot ) :
void XclExpRowBuffer::AppendCell( XclExpCellRef xCell, bool bIsMergedBase )
{
- DBG_ASSERT( xCell.is(), "XclExpRowBuffer::AppendCell - missing cell" );
+ DBG_ASSERT( xCell, "XclExpRowBuffer::AppendCell - missing cell" );
GetOrCreateRow( xCell->GetXclRow(), false ).AppendCell( xCell, bIsMergedBase );
}
diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx
index 2d7360f54d14..968fd5e67edf 100644
--- a/sc/source/filter/excel/xiescher.cxx
+++ b/sc/source/filter/excel/xiescher.cxx
@@ -3202,7 +3202,7 @@ void XclImpDffConverter::StartProgressBar( sal_Size nProgressSize )
void XclImpDffConverter::Progress( sal_Size nDelta )
{
- DBG_ASSERT( mxProgress.is(), "XclImpDffConverter::Progress - invalid call, no progress bar" );
+ DBG_ASSERT( mxProgress, "XclImpDffConverter::Progress - invalid call, no progress bar" );
mxProgress->Progress( nDelta );
}
@@ -3858,7 +3858,7 @@ void XclImpDrawing::ImplConvertObjects( XclImpDffConverter& rDffConv, SdrModel&
void XclImpDrawing::AppendRawObject( const XclImpDrawObjRef& rxDrawObj )
{
- DBG_ASSERT( rxDrawObj.is(), "XclImpDrawing::AppendRawObject - unexpected empty reference" );
+ DBG_ASSERT( rxDrawObj, "XclImpDrawing::AppendRawObject - unexpected empty reference" );
maRawObjs.push_back( rxDrawObj );
}
diff --git a/sc/source/filter/excel/xiroot.cxx b/sc/source/filter/excel/xiroot.cxx
index 979edf004578..9180ed401b62 100644
--- a/sc/source/filter/excel/xiroot.cxx
+++ b/sc/source/filter/excel/xiroot.cxx
@@ -151,7 +151,7 @@ ExcelToSc& XclImpRoot::GetOldFmlaConverter() const
XclImpSst& XclImpRoot::GetSst() const
{
- DBG_ASSERT( mrImpData.mxSst.is(), "XclImpRoot::GetSst - invalid call, wrong BIFF" );
+ DBG_ASSERT( mrImpData.mxSst, "XclImpRoot::GetSst - invalid call, wrong BIFF" );
return *mrImpData.mxSst;
}
@@ -204,7 +204,7 @@ XclImpNameManager& XclImpRoot::GetNameManager() const
XclImpLinkManager& XclImpRoot::GetLinkManager() const
{
- DBG_ASSERT( mrImpData.mxLinkMgr.is(), "XclImpRoot::GetLinkManager - invalid call, wrong BIFF" );
+ DBG_ASSERT( mrImpData.mxLinkMgr, "XclImpRoot::GetLinkManager - invalid call, wrong BIFF" );
return *mrImpData.mxLinkMgr;
}
@@ -221,13 +221,13 @@ XclImpSheetDrawing& XclImpRoot::GetCurrSheetDrawing() const
XclImpCondFormatManager& XclImpRoot::GetCondFormatManager() const
{
- DBG_ASSERT( mrImpData.mxCondFmtMgr.is(), "XclImpRoot::GetCondFormatManager - invalid call, wrong BIFF" );
+ DBG_ASSERT( mrImpData.mxCondFmtMgr, "XclImpRoot::GetCondFormatManager - invalid call, wrong BIFF" );
return *mrImpData.mxCondFmtMgr;
}
XclImpValidationManager& XclImpRoot::GetValidationManager() const
{
- DBG_ASSERT( mrImpData.mxValidMgr.is(), "XclImpRoot::GetValidationManager - invalid call, wrong BIFF" );
+ DBG_ASSERT( mrImpData.mxValidMgr, "XclImpRoot::GetValidationManager - invalid call, wrong BIFF" );
return *mrImpData.mxValidMgr;
}
@@ -240,25 +240,25 @@ XclImpAutoFilterBuffer& XclImpRoot::GetFilterManager() const
XclImpWebQueryBuffer& XclImpRoot::GetWebQueryBuffer() const
{
- DBG_ASSERT( mrImpData.mxWebQueryBfr.is(), "XclImpRoot::GetWebQueryBuffer - invalid call, wrong BIFF" );
+ DBG_ASSERT( mrImpData.mxWebQueryBfr, "XclImpRoot::GetWebQueryBuffer - invalid call, wrong BIFF" );
return *mrImpData.mxWebQueryBfr;
}
XclImpPivotTableManager& XclImpRoot::GetPivotTableManager() const
{
- DBG_ASSERT( mrImpData.mxPTableMgr.is(), "XclImpRoot::GetPivotTableManager - invalid call, wrong BIFF" );
+ DBG_ASSERT( mrImpData.mxPTableMgr, "XclImpRoot::GetPivotTableManager - invalid call, wrong BIFF" );
return *mrImpData.mxPTableMgr;
}
XclImpSheetProtectBuffer& XclImpRoot::GetSheetProtectBuffer() const
{
- DBG_ASSERT( mrImpData.mxTabProtect.is(), "XclImpRoot::GetSheetProtectBuffer - invalid call, wrong BIFF" );
+ DBG_ASSERT( mrImpData.mxTabProtect, "XclImpRoot::GetSheetProtectBuffer - invalid call, wrong BIFF" );
return *mrImpData.mxTabProtect;
}
XclImpDocProtectBuffer& XclImpRoot::GetDocProtectBuffer() const
{
- DBG_ASSERT( mrImpData.mxDocProtect.is(), "XclImpRoot::GetDocProtectBuffer - invalid call, wrong BIFF" );
+ DBG_ASSERT( mrImpData.mxDocProtect, "XclImpRoot::GetDocProtectBuffer - invalid call, wrong BIFF" );
return *mrImpData.mxDocProtect;
}
diff --git a/sc/source/filter/xcl97/XclExpChangeTrack.cxx b/sc/source/filter/xcl97/XclExpChangeTrack.cxx
index 0cd4961c03e6..dfb157653028 100644
--- a/sc/source/filter/xcl97/XclExpChangeTrack.cxx
+++ b/sc/source/filter/xcl97/XclExpChangeTrack.cxx
@@ -741,7 +741,7 @@ void XclExpChTrData::Clear()
void XclExpChTrData::WriteFormula( XclExpStream& rStrm, const XclExpChTrTabIdBuffer& rTabIdBuffer )
{
- DBG_ASSERT( mxTokArr.is() && !mxTokArr->Empty(), "XclExpChTrData::Write - no formula" );
+ DBG_ASSERT( mxTokArr && !mxTokArr->Empty(), "XclExpChTrData::Write - no formula" );
rStrm << *mxTokArr;
for( XclExpRefLog::const_iterator aIt = maRefLog.begin(), aEnd = maRefLog.end(); aIt != aEnd; ++aIt )