summaryrefslogtreecommitdiff
path: root/sc/source/core/data/dpobject.cxx
diff options
context:
space:
mode:
authorJacek Wolszczak <shutdownrunner@gmail.com>2011-05-21 13:29:51 +0200
committerDavid Tardon <dtardon@redhat.com>2011-05-27 06:03:37 +0200
commit630916f24c022f0bcfa305b89c989a3cac6018dd (patch)
treee9cecc65e87dc8b5df93a76c6ab6ffdb8bc79238 /sc/source/core/data/dpobject.cxx
parentd7e25f736f71784fd2c1db3715c6face9fb122fc (diff)
Replace DBG_* with OSL_* in sc/source/core
Diffstat (limited to 'sc/source/core/data/dpobject.cxx')
-rw-r--r--sc/source/core/data/dpobject.cxx34
1 files changed, 17 insertions, 17 deletions
diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx
index c661a7046..e6e8bc97c 100644
--- a/sc/source/core/data/dpobject.cxx
+++ b/sc/source/core/data/dpobject.cxx
@@ -456,7 +456,7 @@ void ScDPObject::CreateObjects()
{
//! cache DPSource and/or Output?
- DBG_ASSERT( bAlive, "CreateObjects on non-inserted DPObject" );
+ OSL_ENSURE( bAlive, "CreateObjects on non-inserted DPObject" );
DELETEZ( pOutput ); // not valid when xSource is changed
@@ -467,7 +467,7 @@ void ScDPObject::CreateObjects()
if ( !xSource.is() ) // database or sheet data, or error in CreateSource
{
- DBG_ASSERT( !pServDesc, "DPSource could not be created" );
+ OSL_ENSURE( !pServDesc, "DPSource could not be created" );
ScDPTableData* pData = GetTableData();
if (pData)
{
@@ -922,7 +922,7 @@ void ScDPObject::FillPageList( TypedScStrCollection& rStrings, long nField )
//! convert field index to dimension index?
- DBG_ASSERT( xSource.is(), "no source" );
+ OSL_ENSURE( xSource.is(), "no source" );
if ( !xSource.is() ) return;
uno::Reference<container::XNamed> xDim;
@@ -935,7 +935,7 @@ void ScDPObject::FillPageList( TypedScStrCollection& rStrings, long nField )
xIntDims->getByIndex(nField) );
xDim = uno::Reference<container::XNamed>( xIntDim, uno::UNO_QUERY );
}
- DBG_ASSERT( xDim.is(), "dimension not found" );
+ OSL_ENSURE( xDim.is(), "dimension not found" );
if ( !xDim.is() ) return;
uno::Reference<beans::XPropertySet> xDimProp( xDim, uno::UNO_QUERY );
@@ -955,7 +955,7 @@ void ScDPObject::FillPageList( TypedScStrCollection& rStrings, long nField )
uno::Reference<uno::XInterface> xHier;
if ( nHierarchy < nHierCount )
xHier = ScUnoHelpFunctions::AnyToInterface( xHiers->getByIndex(nHierarchy) );
- DBG_ASSERT( xHier.is(), "hierarchy not found" );
+ OSL_ENSURE( xHier.is(), "hierarchy not found" );
if ( !xHier.is() ) return;
long nLevCount = 0;
@@ -970,14 +970,14 @@ void ScDPObject::FillPageList( TypedScStrCollection& rStrings, long nField )
uno::Reference<uno::XInterface> xLevel;
if ( nLevel < nLevCount )
xLevel = ScUnoHelpFunctions::AnyToInterface( xLevels->getByIndex(nLevel) );
- DBG_ASSERT( xLevel.is(), "level not found" );
+ OSL_ENSURE( xLevel.is(), "level not found" );
if ( !xLevel.is() ) return;
uno::Reference<container::XNameAccess> xMembers;
uno::Reference<sheet::XMembersSupplier> xMbrSupp( xLevel, uno::UNO_QUERY );
if ( xMbrSupp.is() )
xMembers = xMbrSupp->getMembers();
- DBG_ASSERT( xMembers.is(), "members not found" );
+ OSL_ENSURE( xMembers.is(), "members not found" );
if ( !xMembers.is() ) return;
uno::Sequence<rtl::OUString> aNames = xMembers->getElementNames();
@@ -1372,7 +1372,7 @@ sal_Bool ScDPObject::ParseFilters( ScDPGetPivotDataField& rTarget,
SCSIZE nDataFields = aDataNames.size();
SCSIZE nFieldCount = aFieldNames.size();
- DBG_ASSERT( aGivenNames.size() == nDataFields && aFieldValues.size() == nFieldCount, "wrong count" );
+ OSL_ENSURE( aGivenNames.size() == nDataFields && aFieldValues.size() == nFieldCount, "wrong count" );
bool bError = false;
bool bHasData = false;
@@ -1517,7 +1517,7 @@ void ScDPObject::ToggleDetails(const DataPilotTableHeaderData& rElemDesc, ScDPOb
xIntDims->getByIndex(rElemDesc.Dimension) );
xDim = uno::Reference<container::XNamed>( xIntDim, uno::UNO_QUERY );
}
- DBG_ASSERT( xDim.is(), "dimension not found" );
+ OSL_ENSURE( xDim.is(), "dimension not found" );
if ( !xDim.is() ) return;
String aDimName = xDim->getName();
@@ -1545,7 +1545,7 @@ void ScDPObject::ToggleDetails(const DataPilotTableHeaderData& rElemDesc, ScDPOb
uno::Reference<uno::XInterface> xHier;
if ( rElemDesc.Hierarchy < nHierCount )
xHier = ScUnoHelpFunctions::AnyToInterface( xHiers->getByIndex(rElemDesc.Hierarchy) );
- DBG_ASSERT( xHier.is(), "hierarchy not found" );
+ OSL_ENSURE( xHier.is(), "hierarchy not found" );
if ( !xHier.is() ) return;
long nLevCount = 0;
@@ -1560,7 +1560,7 @@ void ScDPObject::ToggleDetails(const DataPilotTableHeaderData& rElemDesc, ScDPOb
uno::Reference<uno::XInterface> xLevel;
if ( rElemDesc.Level < nLevCount )
xLevel = ScUnoHelpFunctions::AnyToInterface( xLevels->getByIndex(rElemDesc.Level) );
- DBG_ASSERT( xLevel.is(), "level not found" );
+ OSL_ENSURE( xLevel.is(), "level not found" );
if ( !xLevel.is() ) return;
uno::Reference<container::XNameAccess> xMembers;
@@ -1588,14 +1588,14 @@ void ScDPObject::ToggleDetails(const DataPilotTableHeaderData& rElemDesc, ScDPOb
}
}
- DBG_ASSERT( bFound, "member not found" );
+ OSL_ENSURE( bFound, "member not found" );
(void)bFound;
//! use Hierarchy and Level in SaveData !!!!
// modify pDestObj if set, this object otherwise
ScDPSaveData* pModifyData = pDestObj ? ( pDestObj->pSaveData ) : pSaveData;
- DBG_ASSERT( pModifyData, "no data?" );
+ OSL_ENSURE( pModifyData, "no data?" );
if ( pModifyData )
{
const String aName = rElemDesc.MemberName;
@@ -2146,7 +2146,7 @@ void ScDPObject::ConvertOrientation(
vector<PivotField>* pRefColFields, vector<PivotField>* pRefRowFields, vector<PivotField>* pRefPageFields )
{
// xSource must be set
- DBG_ASSERT( xSource.is(), "missing string source" );
+ OSL_ENSURE( xSource.is(), "missing string source" );
vector<PivotField>::const_iterator itr, itrBeg = rFields.begin(), itrEnd = rFields.end();
for (itr = itrBeg; itr != itrEnd; ++itr)
@@ -2476,7 +2476,7 @@ const ScDPCache* ScDPCollection::DBCaches::getCache(sal_Int32 nSdbType, const OU
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( SC_SERVICE_ROWSET )) ),
uno::UNO_QUERY);
uno::Reference<beans::XPropertySet> xRowProp( xRowSet, uno::UNO_QUERY );
- DBG_ASSERT( xRowProp.is(), "can't get RowSet" );
+ OSL_ENSURE( xRowProp.is(), "can't get RowSet" );
if ( xRowProp.is() )
{
//
@@ -2623,7 +2623,7 @@ void ScDPCollection::WriteRefsTo( ScDPCollection& r ) const
// Matching objects are found by their names.
size_t nSrcSize = maTables.size();
size_t nDestSize = r.maTables.size();
- DBG_ASSERT( nSrcSize >= nDestSize, "WriteRefsTo: missing entries in document" );
+ OSL_ENSURE( nSrcSize >= nDestSize, "WriteRefsTo: missing entries in document" );
for (size_t nSrcPos = 0; nSrcPos < nSrcSize; ++nSrcPos)
{
const ScDPObject& rSrcObj = maTables[nSrcPos];
@@ -2648,7 +2648,7 @@ void ScDPCollection::WriteRefsTo( ScDPCollection& r ) const
r.InsertNewTable(pDestObj);
}
}
- DBG_ASSERT( maTables.size() == r.maTables.size(), "WriteRefsTo: couldn't restore all entries" );
+ OSL_ENSURE( maTables.size() == r.maTables.size(), "WriteRefsTo: couldn't restore all entries" );
}
}