summaryrefslogtreecommitdiff
path: root/svx/source
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-07-09 08:50:37 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-07-13 18:14:11 +0200
commitcbce40e965acef51822b31d73da5fbc271fbcad0 (patch)
treebad77c67c68055f7597b8ecf1df1b74e778873cf /svx/source
parent429280541ff1fbbbf3f0482211a659c96c3347d2 (diff)
Make content of OSL_ASSERT, DBG_ASSERT, etc. visiblie in non-debug builds
...to avoid lots of loplugin:staticmethods warnings. Also enables DBG_ASSERT etc. also for --enable-debug builds in addition to --enable-dbgutil builds. Change-Id: Ib89ecd9ab8ce7abb2c64790ace248b31f9d2b64d
Diffstat (limited to 'svx/source')
-rw-r--r--svx/source/fmcomp/dbaexchange.cxx22
-rw-r--r--svx/source/fmcomp/dbaobjectex.cxx9
-rw-r--r--svx/source/fmcomp/gridctrl.cxx2
-rw-r--r--svx/source/form/fmpgeimp.cxx6
-rw-r--r--svx/source/form/navigatortree.cxx8
-rw-r--r--svx/source/svdraw/svdundo.cxx25
-rw-r--r--svx/source/unodraw/unoshape.cxx2
7 files changed, 17 insertions, 57 deletions
diff --git a/svx/source/fmcomp/dbaexchange.cxx b/svx/source/fmcomp/dbaexchange.cxx
index 270e41a6a53f..cc49e5c252d5 100644
--- a/svx/source/fmcomp/dbaexchange.cxx
+++ b/svx/source/fmcomp/dbaexchange.cxx
@@ -267,20 +267,15 @@ namespace svx
// extract the any from the transferable
DataFlavor aFlavor;
-#if OSL_DEBUG_LEVEL > 0
bool bSuccess =
-#endif
- SotExchange::GetFormatDataFlavor(getDescriptorFormatId(), aFlavor);
+ SotExchange::GetFormatDataFlavor(getDescriptorFormatId(), aFlavor);
OSL_ENSURE(bSuccess, "OColumnTransferable::extractColumnDescriptor: invalid data format (no flavor)!");
Any aDescriptor = _rData.GetAny(aFlavor, OUString());
// extract the property value sequence
Sequence< PropertyValue > aDescriptorProps;
-#if OSL_DEBUG_LEVEL > 0
- bSuccess =
-#endif
- aDescriptor >>= aDescriptorProps;
+ bSuccess = aDescriptor >>= aDescriptorProps;
OSL_ENSURE(bSuccess, "OColumnTransferable::extractColumnDescriptor: invalid clipboard format!");
// build the real descriptor
@@ -511,20 +506,15 @@ namespace svx
{
// extract the any from the transferable
DataFlavor aFlavor;
-#if OSL_DEBUG_LEVEL > 0
bool bSuccess =
-#endif
- SotExchange::GetFormatDataFlavor(nKnownFormatId, aFlavor);
+ SotExchange::GetFormatDataFlavor(nKnownFormatId, aFlavor);
OSL_ENSURE(bSuccess, "OColumnTransferable::extractColumnDescriptor: invalid data format (no flavor)!");
Any aDescriptor = _rData.GetAny(aFlavor, OUString());
// extract the property value sequence
Sequence< PropertyValue > aDescriptorProps;
-#if OSL_DEBUG_LEVEL > 0
- bSuccess =
-#endif
- aDescriptor >>= aDescriptorProps;
+ bSuccess = aDescriptor >>= aDescriptorProps;
OSL_ENSURE(bSuccess, "OColumnTransferable::extractColumnDescriptor: invalid clipboard format!");
// build the real descriptor
@@ -669,10 +659,8 @@ namespace svx
{
// extract the any from the transferable
DataFlavor aFlavor;
-#if OSL_DEBUG_LEVEL > 0
bool bSuccess =
-#endif
- SotExchange::GetFormatDataFlavor(getDescriptorFormatId(), aFlavor);
+ SotExchange::GetFormatDataFlavor(getDescriptorFormatId(), aFlavor);
OSL_ENSURE(bSuccess, "OColumnTransferable::extractColumnDescriptor: invalid data format (no flavor)!");
_rData.GetAny(aFlavor, OUString()) >>= aList;
diff --git a/svx/source/fmcomp/dbaobjectex.cxx b/svx/source/fmcomp/dbaobjectex.cxx
index 38d4a1e0d4c3..04e7698bb3cd 100644
--- a/svx/source/fmcomp/dbaobjectex.cxx
+++ b/svx/source/fmcomp/dbaobjectex.cxx
@@ -121,20 +121,15 @@ namespace svx
// extract the any from the transferable
DataFlavor aFlavor;
-#if OSL_DEBUG_LEVEL > 0
bool bSuccess =
-#endif
- SotExchange::GetFormatDataFlavor(getDescriptorFormatId(bForm), aFlavor);
+ SotExchange::GetFormatDataFlavor(getDescriptorFormatId(bForm), aFlavor);
OSL_ENSURE(bSuccess, "OComponentTransferable::extractColumnDescriptor: invalid data format (no flavor)!");
Any aDescriptor = _rData.GetAny(aFlavor, OUString());
// extract the property value sequence
Sequence< PropertyValue > aDescriptorProps;
-#if OSL_DEBUG_LEVEL > 0
- bSuccess =
-#endif
- aDescriptor >>= aDescriptorProps;
+ bSuccess = aDescriptor >>= aDescriptorProps;
OSL_ENSURE(bSuccess, "OComponentTransferable::extractColumnDescriptor: invalid clipboard format!");
// build the real descriptor
diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx
index 3607211f467b..18fb327295aa 100644
--- a/svx/source/fmcomp/gridctrl.cxx
+++ b/svx/source/fmcomp/gridctrl.cxx
@@ -3550,9 +3550,7 @@ void DbGridControl::DisconnectFromFields()
ColumnFieldValueListeners* pListeners = static_cast<ColumnFieldValueListeners*>(m_pFieldListeners);
while (!pListeners->empty())
{
-#ifdef DBG_UTIL
sal_Int32 nOldSize = pListeners->size();
-#endif
pListeners->begin()->second->dispose();
DBG_ASSERT(nOldSize > (sal_Int32)pListeners->size(), "DbGridControl::DisconnectFromFields : dispose on a listener should result in a removal from my list !");
}
diff --git a/svx/source/form/fmpgeimp.cxx b/svx/source/form/fmpgeimp.cxx
index 1956e278d204..39868ffb1a55 100644
--- a/svx/source/form/fmpgeimp.cxx
+++ b/svx/source/form/fmpgeimp.cxx
@@ -264,17 +264,11 @@ namespace
return;
}
- #if OSL_DEBUG_LEVEL > 0
Any aOldAssignment =
- #endif
_map->remove( makeAny( xControlModel ) );
- #if OSL_DEBUG_LEVEL > 0
- (void)aOldAssignment;
- #endif
OSL_ENSURE( !i_ignoreNonExistence ||
( aOldAssignment == makeAny( Reference< XControlShape >( const_cast< FmFormObj& >( _object ).getUnoShape(), UNO_QUERY ) ) ),
"lcl_removeFormObject: map was inconsistent!" );
- (void)i_ignoreNonExistence;
}
}
diff --git a/svx/source/form/navigatortree.cxx b/svx/source/form/navigatortree.cxx
index a1f49fb34a13..dbc3b2e6dcae 100644
--- a/svx/source/form/navigatortree.cxx
+++ b/svx/source/form/navigatortree.cxx
@@ -103,10 +103,8 @@ namespace svxform
Reference< XInterface > xNormalizedModel( pFormObject->GetUnoControlModel(), UNO_QUERY );
// note that this is normalized (i.e. queried for XInterface explicitly)
-#ifdef DBG_UTIL
::std::pair< MapModelToShape::iterator, bool > aPos =
-#endif
- _rMapping.insert( ModelShapePair( xNormalizedModel, pSdrObject ) );
+ _rMapping.insert( ModelShapePair( xNormalizedModel, pSdrObject ) );
DBG_ASSERT( aPos.second, "collectShapeModelMapping: model was already existent!" );
// if this asserts, this would mean we have 2 shapes pointing to the same model
}
@@ -947,13 +945,17 @@ namespace svxform
if ( DND_ACTION_COPY == _nAction )
{ // bHasHiddenControlsFormat means that only hidden controls are part of the data
+#ifdef DBG_UTIL
DBG_ASSERT( bHasHiddenControlsFormat, "NavigatorTree::implExecuteDataTransfer: copy allowed for hidden controls only!" );
+#endif
DBG_ASSERT( _pTargetEntry && ( _pTargetEntry != m_pRootEntry ) && IsFormEntry( _pTargetEntry ),
"NavigatorTree::implExecuteDataTransfer: should not be here!" );
// implAcceptDataTransfer should have caught both cases
+#ifdef DBG_UTIL
DBG_ASSERT(bHasHiddenControlsFormat, "NavigatorTree::implExecuteDataTransfer: only copying of hidden controls is supported !");
// should be catched by AcceptDrop
+#endif
// because i want to select all targets (and only them)
SelectAll(false);
diff --git a/svx/source/svdraw/svdundo.cxx b/svx/source/svdraw/svdundo.cxx
index 069afe450f8e..e6ed8ef90413 100644
--- a/svx/source/svdraw/svdundo.cxx
+++ b/svx/source/svdraw/svdundo.cxx
@@ -785,10 +785,7 @@ void SdrUndoInsertObj::Undo()
{
ImplUnmarkObject( pObj );
-#ifdef DBG_UTIL
- SdrObject* pChkObj=
-#endif
- pObjList->RemoveObject(nOrdNum);
+ SdrObject* pChkObj= pObjList->RemoveObject(nOrdNum);
DBG_ASSERT(pChkObj==pObj,"UndoInsertObj: RemoveObjNum!=pObj");
}
}
@@ -1327,10 +1324,7 @@ void SdrUndoNewLayer::Undo()
{
DBG_ASSERT(!bItsMine,"SdrUndoNewLayer::Undo(): Layer already belongs to UndoAction.");
bItsMine=true;
-#ifdef DBG_UTIL
- SdrLayer* pCmpLayer=
-#endif
- pLayerAdmin->RemoveLayer(nNum);
+ SdrLayer* pCmpLayer= pLayerAdmin->RemoveLayer(nNum);
DBG_ASSERT(pCmpLayer==pLayer,"SdrUndoNewLayer::Undo(): Removed layer is != pLayer.");
}
@@ -1359,10 +1353,7 @@ void SdrUndoDelLayer::Redo()
{
DBG_ASSERT(!bItsMine,"SdrUndoDelLayer::Undo(): Layer already belongs to UndoAction.");
bItsMine=true;
-#ifdef DBG_UTIL
- SdrLayer* pCmpLayer=
-#endif
- pLayerAdmin->RemoveLayer(nNum);
+ SdrLayer* pCmpLayer= pLayerAdmin->RemoveLayer(nNum);
DBG_ASSERT(pCmpLayer==pLayer,"SdrUndoDelLayer::Redo(): Removed layer is != pLayer.");
}
@@ -1375,20 +1366,14 @@ OUString SdrUndoDelLayer::GetComment() const
void SdrUndoMoveLayer::Undo()
{
-#ifdef DBG_UTIL
- SdrLayer* pCmpLayer=
-#endif
- pLayerAdmin->RemoveLayer(nNeuPos);
+ SdrLayer* pCmpLayer= pLayerAdmin->RemoveLayer(nNeuPos);
DBG_ASSERT(pCmpLayer==pLayer,"SdrUndoMoveLayer::Undo(): Removed layer is != pLayer.");
pLayerAdmin->InsertLayer(pLayer,nNum);
}
void SdrUndoMoveLayer::Redo()
{
-#ifdef DBG_UTIL
- SdrLayer* pCmpLayer=
-#endif
- pLayerAdmin->RemoveLayer(nNum);
+ SdrLayer* pCmpLayer= pLayerAdmin->RemoveLayer(nNum);
DBG_ASSERT(pCmpLayer==pLayer,"SdrUndoMoveLayer::Redo(): Removed layer is != pLayer.");
pLayerAdmin->InsertLayer(pLayer,nNeuPos);
}
diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx
index 549c3e7dfb57..94ceb4350359 100644
--- a/svx/source/unodraw/unoshape.cxx
+++ b/svx/source/unodraw/unoshape.cxx
@@ -2182,9 +2182,7 @@ bool SvxShape::setPropertyValueImpl( const OUString&, const SfxItemPropertySimpl
SdrObjList* pObjList = mpObj->GetObjList();
if( pObjList )
{
-#ifdef DBG_UTIL
SdrObject* pCheck =
-#endif
pObjList->SetObjectOrdNum( mpObj->GetOrdNum(), static_cast<size_t>(nNewOrdNum) );
DBG_ASSERT( pCheck == mpObj.get(), "GetOrdNum() failed!" );
}