summaryrefslogtreecommitdiff
path: root/xmloff/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 /xmloff/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 'xmloff/source')
-rw-r--r--xmloff/source/draw/shapeimport.cxx6
-rw-r--r--xmloff/source/forms/elementexport.cxx6
-rw-r--r--xmloff/source/forms/elementimport.cxx5
-rw-r--r--xmloff/source/forms/layerexport.cxx14
-rw-r--r--xmloff/source/forms/propertyimport.cxx22
-rw-r--r--xmloff/source/text/XMLSectionExport.cxx6
-rw-r--r--xmloff/source/text/XMLSectionFootnoteConfigExport.cxx6
-rw-r--r--xmloff/source/xforms/xformsapi.cxx6
8 files changed, 16 insertions, 55 deletions
diff --git a/xmloff/source/draw/shapeimport.cxx b/xmloff/source/draw/shapeimport.cxx
index 322d27cbe983..1e3e893d1b90 100644
--- a/xmloff/source/draw/shapeimport.cxx
+++ b/xmloff/source/draw/shapeimport.cxx
@@ -1097,11 +1097,7 @@ void XMLShapeImportHelper::startPage( com::sun::star::uno::Reference< com::sun::
}
/** this method must be calling after the last shape is imported for the given page */
-void XMLShapeImportHelper::endPage( com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >&
-#ifdef DBG_UTIL
-rShapes
-#endif
-)
+void XMLShapeImportHelper::endPage( com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes )
{
DBG_ASSERT( mpPageContext && (mpPageContext->mxShapes == rShapes), "wrong call to endPage(), no startPage called or wrong page" );
if( NULL == mpPageContext )
diff --git a/xmloff/source/forms/elementexport.cxx b/xmloff/source/forms/elementexport.cxx
index 374d2ba7dbe2..317afe6e1925 100644
--- a/xmloff/source/forms/elementexport.cxx
+++ b/xmloff/source/forms/elementexport.cxx
@@ -950,10 +950,12 @@ namespace xmloff
#endif
}
+ #if OSL_DEBUG_LEVEL > 0
OSL_ENSURE( 0 == nIncludeBinding,
"OControlExport::exportBindingAtributes: forgot some flags!");
// in the debug version, we should have removed every bit we handled from the mask, so it should
// be 0 now ...
+ #endif
}
void OControlExport::exportSpecialAttributes()
@@ -1609,10 +1611,8 @@ namespace xmloff
// for a list box, if the ListSourceType is VALUE_LIST, no ListSource is stored, but instead
// a sequence of pairs which is build from the StringItemList and the ValueList
ListSourceType eListSourceType = ListSourceType_VALUELIST;
- #if OSL_DEBUG_LEVEL > 0
bool bSuccess =
- #endif
- m_xProps->getPropertyValue(PROPERTY_LISTSOURCETYPE) >>= eListSourceType;
+ m_xProps->getPropertyValue(PROPERTY_LISTSOURCETYPE) >>= eListSourceType;
OSL_ENSURE(bSuccess, "OControlExport::examineControl: could not retrieve the ListSourceType!");
if (ListSourceType_VALUELIST != eListSourceType)
{
diff --git a/xmloff/source/forms/elementimport.cxx b/xmloff/source/forms/elementimport.cxx
index f69a4cf3b82f..859f1d0c9d13 100644
--- a/xmloff/source/forms/elementimport.cxx
+++ b/xmloff/source/forms/elementimport.cxx
@@ -936,10 +936,7 @@ namespace xmloff
Property aProp = _rxPropInfo->getPropertyByName(_rPropValue.Name);
// the untranslated string value as read in handleAttribute
OUString sValue;
- #if OSL_DEBUG_LEVEL > 0
- bool bSuccess =
- #endif
- _rPropValue.Value >>= sValue;
+ bool bSuccess = _rPropValue.Value >>= sValue;
OSL_ENSURE(bSuccess, "OControlImport::implTranslateValueProperty: supposed to be called with non-translated string values!");
if (TypeClass_ANY == aProp.Type.getTypeClass())
diff --git a/xmloff/source/forms/layerexport.cxx b/xmloff/source/forms/layerexport.cxx
index 634aba470eb6..9787b92e6a53 100644
--- a/xmloff/source/forms/layerexport.cxx
+++ b/xmloff/source/forms/layerexport.cxx
@@ -275,10 +275,7 @@ namespace xmloff
return;
}
-#if OSL_DEBUG_LEVEL > 0
- bool bPageIsKnown =
-#endif
- implMoveIterators(_rxDrawPage, false);
+ bool bPageIsKnown = implMoveIterators(_rxDrawPage, false);
OSL_ENSURE(bPageIsKnown, "OFormLayerXMLExport_Impl::exportForms: exporting a page which has not been examined!");
// export forms collection
@@ -414,10 +411,7 @@ namespace xmloff
}
// move the iterator which specify the currently handled page
-#if OSL_DEBUG_LEVEL > 0
- bool bPageIsKnown =
-#endif
- implMoveIterators(_rxDrawPage, true);
+ bool bPageIsKnown = implMoveIterators(_rxDrawPage, true);
OSL_ENSURE(!bPageIsKnown, "OFormLayerXMLExport_Impl::examineForms: examining a page twice!");
::std::stack< Reference< XIndexAccess > > aContainerHistory;
@@ -752,10 +746,8 @@ namespace xmloff
{
Reference< XPropertySet > xProps( _rxControl, UNO_QUERY );
OSL_ENSURE( xProps.is(), "OFormLayerXMLExport_Impl::excludeFromExport: invalid control model!" );
-#if OSL_DEBUG_LEVEL > 0
::std::pair< PropertySetBag::iterator, bool > aPos =
-#endif
- m_aIgnoreList.insert( xProps );
+ m_aIgnoreList.insert( xProps );
OSL_ENSURE( aPos.second, "OFormLayerXMLExport_Impl::excludeFromExport: element already exists in the ignore list!" );
}
diff --git a/xmloff/source/forms/propertyimport.cxx b/xmloff/source/forms/propertyimport.cxx
index 178104844698..d40003387a58 100644
--- a/xmloff/source/forms/propertyimport.cxx
+++ b/xmloff/source/forms/propertyimport.cxx
@@ -93,10 +93,8 @@ Any PropertyConversion::convertString( const ::com::sun::star::uno::Type& _rExpe
case TypeClass_BOOLEAN: // sal_Bool
{
bool bValue;
- #if OSL_DEBUG_LEVEL > 0
bool bSuccess =
- #endif
- ::sax::Converter::convertBool(bValue, _rReadCharacters);
+ ::sax::Converter::convertBool(bValue, _rReadCharacters);
OSL_ENSURE(bSuccess,
OStringBuffer("PropertyConversion::convertString: could not convert \"").
append(OUStringToOString(_rReadCharacters, RTL_TEXTENCODING_ASCII_US)).
@@ -109,10 +107,8 @@ Any PropertyConversion::convertString( const ::com::sun::star::uno::Type& _rExpe
if (!_pEnumMap)
{ // it's a real int32/16 property
sal_Int32 nValue(0);
- #if OSL_DEBUG_LEVEL > 0
bool bSuccess =
- #endif
- ::sax::Converter::convertNumber(nValue, _rReadCharacters);
+ ::sax::Converter::convertNumber(nValue, _rReadCharacters);
OSL_ENSURE(bSuccess,
OStringBuffer("PropertyConversion::convertString: could not convert \"").
append(OUStringToOString(_rReadCharacters, RTL_TEXTENCODING_ASCII_US)).
@@ -149,10 +145,8 @@ Any PropertyConversion::convertString( const ::com::sun::star::uno::Type& _rExpe
case TypeClass_DOUBLE:
{
double nValue;
- #if OSL_DEBUG_LEVEL > 0
bool bSuccess =
- #endif
- ::sax::Converter::convertDouble(nValue, _rReadCharacters);
+ ::sax::Converter::convertDouble(nValue, _rReadCharacters);
OSL_ENSURE(bSuccess,
OStringBuffer("PropertyConversion::convertString: could not convert \"").
append(OUStringToOString(_rReadCharacters, RTL_TEXTENCODING_ASCII_US)).
@@ -177,10 +171,8 @@ Any PropertyConversion::convertString( const ::com::sun::star::uno::Type& _rExpe
{
// first extract the double
double nValue = 0;
- #if OSL_DEBUG_LEVEL > 0
bool bSuccess =
- #endif
- ::sax::Converter::convertDouble(nValue, _rReadCharacters);
+ ::sax::Converter::convertDouble(nValue, _rReadCharacters);
OSL_ENSURE(bSuccess,
OStringBuffer("PropertyConversion::convertString: could not convert \"").
append(OUStringToOString(_rReadCharacters, RTL_TEXTENCODING_ASCII_US)).
@@ -315,11 +307,7 @@ bool OPropertyImport::encounteredAttribute(const OUString& _rAttributeName) cons
return m_aEncounteredAttributes.end() != m_aEncounteredAttributes.find(_rAttributeName);
}
-void OPropertyImport::Characters(const OUString&
-#if OSL_DEBUG_LEVEL > 0
-_rChars
-#endif
-)
+void OPropertyImport::Characters(const OUString& _rChars )
{
// ignore them (should be whitespaces only)
OSL_ENSURE(_rChars.trim().isEmpty(), "OPropertyImport::Characters: non-whitespace characters!");
diff --git a/xmloff/source/text/XMLSectionExport.cxx b/xmloff/source/text/XMLSectionExport.cxx
index 94049faab795..ba6fd6bdd881 100644
--- a/xmloff/source/text/XMLSectionExport.cxx
+++ b/xmloff/source/text/XMLSectionExport.cxx
@@ -899,11 +899,7 @@ void XMLSectionExport::ExportBaseIndexSource(
void XMLSectionExport::ExportBaseIndexBody(
- SectionTypeEnum
- #if OSL_DEBUG_LEVEL > 0
- eType
- #endif
- ,
+ SectionTypeEnum eType,
const Reference<XPropertySet> &)
{
// type not used; checked anyway.
diff --git a/xmloff/source/text/XMLSectionFootnoteConfigExport.cxx b/xmloff/source/text/XMLSectionFootnoteConfigExport.cxx
index 24611fee23e0..9b878ef3ebd7 100644
--- a/xmloff/source/text/XMLSectionFootnoteConfigExport.cxx
+++ b/xmloff/source/text/XMLSectionFootnoteConfigExport.cxx
@@ -47,11 +47,7 @@ void XMLSectionFootnoteConfigExport::exportXML(
SvXMLExport& rExport,
bool bEndnote,
const vector<XMLPropertyState> *pProperties,
- sal_uInt32
- #ifdef DBG_UTIL
- nIdx
- #endif
- ,
+ sal_uInt32 nIdx,
const rtl::Reference<XMLPropertySetMapper> & rMapper)
{
// store and initialize the values
diff --git a/xmloff/source/xforms/xformsapi.cxx b/xmloff/source/xforms/xformsapi.cxx
index adfcb3554e68..20c9a96a6369 100644
--- a/xmloff/source/xforms/xformsapi.cxx
+++ b/xmloff/source/xforms/xformsapi.cxx
@@ -191,11 +191,7 @@ static const SvXMLTokenMapEntry aTypes[] =
};
sal_uInt16 xforms_getTypeClass(
- const Reference<XDataTypeRepository>&
- #ifdef DBG_UTIL
- xRepository
- #endif
- ,
+ const Reference<XDataTypeRepository>& xRepository,
const SvXMLNamespaceMap& rNamespaceMap,
const OUString& rXMLName )
{