diff options
41 files changed, 68 insertions, 82 deletions
diff --git a/basic/source/comp/codegen.cxx b/basic/source/comp/codegen.cxx index c3e8a000cf8c..8b840770a0e6 100644 --- a/basic/source/comp/codegen.cxx +++ b/basic/source/comp/codegen.cxx @@ -83,7 +83,7 @@ void SbiCodeGen::GenStmnt() UINT32 SbiCodeGen::Gen( SbiOpcode eOpcode ) { -#ifndef PRODUCT +#ifdef DBG_UTIL if( eOpcode < SbOP0_START || eOpcode > SbOP0_END ) pParser->Error( SbERR_INTERNAL_ERROR, "OPCODE1" ); #endif @@ -94,7 +94,7 @@ UINT32 SbiCodeGen::Gen( SbiOpcode eOpcode ) UINT32 SbiCodeGen::Gen( SbiOpcode eOpcode, UINT32 nOpnd ) { -#ifndef PRODUCT +#ifdef DBG_UTIL if( eOpcode < SbOP1_START || eOpcode > SbOP1_END ) pParser->Error( SbERR_INTERNAL_ERROR, "OPCODE2" ); #endif @@ -107,7 +107,7 @@ UINT32 SbiCodeGen::Gen( SbiOpcode eOpcode, UINT32 nOpnd ) UINT32 SbiCodeGen::Gen( SbiOpcode eOpcode, UINT32 nOpnd1, UINT32 nOpnd2 ) { -#ifndef PRODUCT +#ifdef DBG_UTIL if( eOpcode < SbOP2_START || eOpcode > SbOP2_END ) pParser->Error( SbERR_INTERNAL_ERROR, "OPCODE3" ); #endif diff --git a/basic/source/comp/exprgen.cxx b/basic/source/comp/exprgen.cxx index c18501c98e40..32a0007a61ca 100644 --- a/basic/source/comp/exprgen.cxx +++ b/basic/source/comp/exprgen.cxx @@ -170,7 +170,7 @@ void SbiExprNode::Gen( RecursiveMode eRecMode ) void SbiExprNode::GenElement( SbiOpcode eOp ) { -#ifndef PRODUCT +#ifdef DBG_UTIL if( (eOp < _RTL || eOp > _CALLC) && eOp != _FIND_G && eOp != _FIND_CM ) pGen->GetParser()->Error( SbERR_INTERNAL_ERROR, "Opcode" ); #endif diff --git a/basic/source/comp/symtbl.cxx b/basic/source/comp/symtbl.cxx index 2eb87dcdcc52..089dc068773a 100644 --- a/basic/source/comp/symtbl.cxx +++ b/basic/source/comp/symtbl.cxx @@ -175,7 +175,7 @@ void SbiSymPool::Add( SbiSymDef* pDef ) { if( pDef->pIn ) { -#ifndef PRODUCT +#ifdef DBG_UTIL // schon in einem anderen Pool drin! pParser->Error( SbERR_INTERNAL_ERROR, "Dbl Pool" ); #endif diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx index d81cebe60fc6..d41b24e00312 100644 --- a/basic/source/runtime/runtime.cxx +++ b/basic/source/runtime/runtime.cxx @@ -839,7 +839,7 @@ void SbiRuntime::PushVar( SbxVariable* pVar ) SbxVariableRef SbiRuntime::PopVar() { -#ifndef PRODUCT +#ifdef DBG_UTIL if( !nExprLvl ) { StarBASIC::FatalError( SbERR_INTERNAL_ERROR ); @@ -882,7 +882,7 @@ BOOL SbiRuntime::ClearExprStack() SbxVariable* SbiRuntime::GetTOS( short n ) { n = nExprLvl - n - 1; -#ifndef PRODUCT +#ifdef DBG_UTIL if( n < 0 ) { StarBASIC::FatalError( SbERR_INTERNAL_ERROR ); diff --git a/basic/source/runtime/step1.cxx b/basic/source/runtime/step1.cxx index 938e5f6ad236..3c461c1f5541 100644 --- a/basic/source/runtime/step1.cxx +++ b/basic/source/runtime/step1.cxx @@ -160,7 +160,7 @@ void SbiRuntime::StepPAD( UINT32 nOp1 ) void SbiRuntime::StepJUMP( UINT32 nOp1 ) { -#ifndef PRODUCT +#ifdef DBG_UTIL // #QUESTION shouln't this be // if( (BYTE*)( nOp1+pImagGetCode() ) >= pImg->GetCodeSize() ) if( nOp1 >= pImg->GetCodeSize() ) diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index 8675d22e0aae..6ea00ca50559 100644 --- a/desktop/source/app/app.cxx +++ b/desktop/source/app/app.cxx @@ -1348,7 +1348,7 @@ void Desktop::Main() else aTitle = aTitleString; -#ifndef PRODUCT +#ifdef DBG_UTIL //include version ID in non product builds ::rtl::OUString aDefault; aTitle += DEFINE_CONST_UNICODE(" ["); diff --git a/formula/inc/formula/opcode.hxx b/formula/inc/formula/opcode.hxx index 4346fc80112e..e93368e59f57 100644 --- a/formula/inc/formula/opcode.hxx +++ b/formula/inc/formula/opcode.hxx @@ -401,7 +401,7 @@ enum OpCodeEnum ocNone = SC_OPCODE_NONE }; -#ifdef PRODUCT +#ifndef DBG_UTIL // save memory since compilers tend to int an enum typedef USHORT OpCode; #else diff --git a/formula/inc/formula/token.hxx b/formula/inc/formula/token.hxx index d2b4c9989a84..a930442ee4f1 100644 --- a/formula/inc/formula/token.hxx +++ b/formula/inc/formula/token.hxx @@ -79,7 +79,7 @@ enum StackVarEnum svUnknown // unknown StackType }; -#ifdef PRODUCT +#ifndef DBG_UTIL // save memory since compilers tend to int an enum typedef BYTE StackVar; #else diff --git a/framework/source/helper/titlehelper.cxx b/framework/source/helper/titlehelper.cxx index 291ed4f00633..ce5be87dc911 100644 --- a/framework/source/helper/titlehelper.cxx +++ b/framework/source/helper/titlehelper.cxx @@ -616,7 +616,7 @@ void TitleHelper::impl_appendModuleName (::rtl::OUStringBuffer& sTitle) } //***************************************************************************************************************** -#ifndef PRODUCT +#ifdef DBG_UTIL void TitleHelper::impl_appendDebugVersion (::rtl::OUStringBuffer& sTitle) { ::rtl::OUString sDefault ; diff --git a/sfx2/source/appl/app.cxx b/sfx2/source/appl/app.cxx index b7f0ab91feee..d30ba1ab753d 100644 --- a/sfx2/source/appl/app.cxx +++ b/sfx2/source/appl/app.cxx @@ -359,7 +359,7 @@ SfxApplication::SfxApplication() RTL_LOGFILE_CONTEXT_TRACE( aLog, "{ initialize DDE" ); #ifdef DDE_AVAILABLE -#ifdef PRODUCT +#ifndef DBG_UTIL InitializeDde(); #else if( !InitializeDde() ) diff --git a/sfx2/source/appl/appmain.cxx b/sfx2/source/appl/appmain.cxx index a65a16e3b518..8d9114abda40 100644 --- a/sfx2/source/appl/appmain.cxx +++ b/sfx2/source/appl/appmain.cxx @@ -124,7 +124,7 @@ void SfxApplication::Init */ { #ifdef DDE_AVAILABLE -#ifdef PRODUCT +#ifndef DBG_UTIL InitializeDde(); #else if( !InitializeDde() ) diff --git a/sfx2/source/appl/appmisc.cxx b/sfx2/source/appl/appmisc.cxx index 08a61b1f0ce6..684a78aeb39c 100644 --- a/sfx2/source/appl/appmisc.cxx +++ b/sfx2/source/appl/appmisc.cxx @@ -189,7 +189,7 @@ void SfxApplication::InitializeDisplayName_Impl() aGuard.clear(); -#ifndef PRODUCT +#ifdef DBG_UTIL ::rtl::OUString aDefault; aTitle += DEFINE_CONST_UNICODE(" ["); diff --git a/sfx2/source/appl/appquit.cxx b/sfx2/source/appl/appquit.cxx index 16ae1fe236a9..9a89b4de2f81 100644 --- a/sfx2/source/appl/appquit.cxx +++ b/sfx2/source/appl/appquit.cxx @@ -77,7 +77,7 @@ using ::basic::BasicManagerRepository; -#ifndef PRODUCT +#ifdef DBG_UTIL DECLARE_LIST( SfxFrameWindowFactoryArray_Impl, SfxFrameWindowFactory* ) SV_DECL_PTRARR(SfxInitLinkList, Link*, 2, 2) #endif @@ -203,7 +203,7 @@ void SfxApplication::Deinitialize() delete pAppData_Impl->pLabelResMgr; -#ifndef PRODUCT +#ifdef DBG_UTIL DELETEX(pAppData_Impl->pSlotPool); DELETEX(pAppData_Impl->pEventConfig); DELETEX(pAppData_Impl->pMiscConfig); @@ -212,7 +212,7 @@ void SfxApplication::Deinitialize() DELETEX(pAppData_Impl->pInitLinkList); #endif -#ifndef PRODUCT +#ifdef DBG_UTIL DELETEX(pAppData_Impl->pTbxCtrlFac); DELETEX(pAppData_Impl->pStbCtrlFac); DELETEX(pAppData_Impl->pMenuCtrlFac); diff --git a/sfx2/source/control/shell.cxx b/sfx2/source/control/shell.cxx index fcfd93cbc9ef..f9b601a4cf23 100644 --- a/sfx2/source/control/shell.cxx +++ b/sfx2/source/control/shell.cxx @@ -659,7 +659,7 @@ void SfxShell::DoActivate_Impl( SfxViewFrame *pFrame, BOOL bMDI ) */ { -#ifndef PRODUCT +#ifdef DBG_UTIL const SfxInterface *p_IF = GetInterface(); if ( !p_IF ) return; @@ -702,7 +702,7 @@ void SfxShell::DoDeactivate_Impl( SfxViewFrame *pFrame, BOOL bMDI ) */ { -#ifndef PRODUCT +#ifdef DBG_UTIL const SfxInterface *p_IF = GetInterface(); if ( !p_IF ) return; diff --git a/sfx2/source/view/topfrm.cxx b/sfx2/source/view/topfrm.cxx index 205fdf788ba1..b8f0d3640988 100644 --- a/sfx2/source/view/topfrm.cxx +++ b/sfx2/source/view/topfrm.cxx @@ -532,7 +532,7 @@ SfxTopFrame* SfxTopFrame::Create( SfxObjectShell* pDoc, USHORT nViewId, BOOL bHi aTitle += String(aProductName); aTitle += ' '; aTitle += String( GetModuleName_Impl( aDocServiceName ) ); -#ifndef PRODUCT +#ifdef DBG_UTIL ::rtl::OUString aDefault; aTitle += DEFINE_CONST_UNICODE(" ["); String aVerId( utl::Bootstrap::getBuildIdData( aDefault )); @@ -1095,7 +1095,7 @@ String SfxTopViewFrame::UpdateTitle() aTitle += ' '; ::rtl::OUString aDocServiceName( GetObjectShell()->GetFactory().GetDocumentServiceName() ); aTitle += String( GetModuleName_Impl( aDocServiceName ) ); -#ifndef PRODUCT +#ifdef DBG_UTIL ::rtl::OUString aDefault; aTitle += DEFINE_CONST_UNICODE(" ["); String aVerId( utl::Bootstrap::getBuildIdData( aDefault )); diff --git a/shell/source/tools/lngconvex/lngconvex.cxx b/shell/source/tools/lngconvex/lngconvex.cxx index 7f177233d7cc..807d65f6700b 100644 --- a/shell/source/tools/lngconvex/lngconvex.cxx +++ b/shell/source/tools/lngconvex/lngconvex.cxx @@ -31,12 +31,6 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_shell.hxx" -#if OSL_DEBUG_LEVEL == 0 -#ifndef NDEBUG -#define NDEBUG -#endif -#endif - #include <tools/presys.h> #if defined _MSC_VER #pragma warning(push, 1) @@ -60,7 +54,6 @@ #include <iostream> #include <fstream> -#include <assert.h> #include <map> #include <sstream> #include <iterator> @@ -282,7 +275,7 @@ public: void substitute(std::string& Text) { replacement_table_t* prt = get_replacement_table(active_iso_lang_.make_std_string()); - assert(prt); + OSL_ASSERT(prt); replacement_table_t::iterator iter = prt->find(Text); if (iter != prt->end()) Text = iter->second; @@ -292,7 +285,7 @@ public: const std::string& Placeholder, const std::string& Substitute) { replacement_table_t* prt = get_replacement_table(active_iso_lang_.make_std_string()); - assert(prt); + OSL_ASSERT(prt); prt->insert(std::make_pair(Placeholder, Substitute)); } @@ -330,7 +323,7 @@ void add_group_entries( const ByteString& GroupName, Substitutor& Substitutor) { - assert(aConfig.HasGroup(GroupName)); + OSL_ASSERT(aConfig.HasGroup(GroupName)); aConfig.SetGroup(GroupName); size_t key_count = aConfig.GetKeyCount(); diff --git a/svx/source/cui/treeopt.cxx b/svx/source/cui/treeopt.cxx index 7491b2bb1cc5..a0d07d999c60 100644 --- a/svx/source/cui/treeopt.cxx +++ b/svx/source/cui/treeopt.cxx @@ -2032,7 +2032,7 @@ void OfaTreeOptionsDialog::Initialize( const Reference< XFrame >& _xFrame ) ( RID_SW_TP_MAILCONFIG != nPageId || MailMergeCfg_Impl().IsEmailSupported() ) ) AddTabPage( nPageId, rTextArray.GetString(i), nGroup ); } -#ifndef PRODUCT +#ifdef DBG_UTIL AddTabPage( RID_SW_TP_OPTTEST_PAGE, String::CreateFromAscii("Interner Test"), nGroup ); #endif } @@ -2048,7 +2048,7 @@ void OfaTreeOptionsDialog::Initialize( const Reference< XFrame >& _xFrame ) if ( !lcl_isOptionHidden( nPageId, aOptionsDlgOpt ) ) AddTabPage( nPageId, rHTMLArray.GetString(i), nGroup ); } -#ifndef PRODUCT +#ifdef DBG_UTIL AddTabPage( RID_SW_TP_OPTTEST_PAGE, String::CreateFromAscii("Interner Test"), nGroup ); #endif } diff --git a/svx/source/dialog/impgrf.cxx b/svx/source/dialog/impgrf.cxx index 59292068852b..6fad7cb03f58 100644 --- a/svx/source/dialog/impgrf.cxx +++ b/svx/source/dialog/impgrf.cxx @@ -111,7 +111,7 @@ int LoadGraphic( const String &rPath, const String &rFilterName, nRes = pFilter->ImportGraphic( rGraphic, rPath, *pStream, nFilter, pDeterminedFormat ); -#ifndef PRODUCT +#ifdef DBG_UTIL if( nRes ) { if( pMed ) diff --git a/svx/source/editeng/editeng.cxx b/svx/source/editeng/editeng.cxx index 9a0b1d593f40..2cff5e76dded 100644 --- a/svx/source/editeng/editeng.cxx +++ b/svx/source/editeng/editeng.cxx @@ -1117,7 +1117,7 @@ sal_Bool EditEngine::PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pEditVie break; default: { - #if (OSL_DEBUG_LEVEL > 1) && !defined( PRODUCT ) + #if (OSL_DEBUG_LEVEL > 1) && defined(DBG_UTIL) if ( ( nCode == KEY_W ) && rKeyEvent.GetKeyCode().IsMod1() && rKeyEvent.GetKeyCode().IsMod2() ) { SfxItemSet aAttribs = pEditView->GetAttribs(); diff --git a/svx/source/editeng/svxacorr.cxx b/svx/source/editeng/svxacorr.cxx index 88e1543ab8c9..a6f9faf6eff4 100644 --- a/svx/source/editeng/svxacorr.cxx +++ b/svx/source/editeng/svxacorr.cxx @@ -1385,7 +1385,7 @@ void SvxAutoCorrect::SaveCplSttExceptList( LanguageType eLang ) if( pLists ) pLists->SaveCplSttExceptList(); } -#ifndef PRODUCT +#ifdef DBG_UTIL else { DBG_ERROR("speichern einer leeren Liste?"); @@ -1401,7 +1401,7 @@ void SvxAutoCorrect::SaveWrdSttExceptList(LanguageType eLang) if(pLists) pLists->SaveWrdSttExceptList(); } -#ifndef PRODUCT +#ifdef DBG_UTIL else { DBG_ERROR("speichern einer leeren Liste?"); diff --git a/svx/source/editeng/txtrange.cxx b/svx/source/editeng/txtrange.cxx index 223219ae4b6a..7a33745fd974 100644 --- a/svx/source/editeng/txtrange.cxx +++ b/svx/source/editeng/txtrange.cxx @@ -67,7 +67,7 @@ TextRanger::TextRanger( const basegfx::B2DPolyPolygon& rPolyPolygon, const baseg bInner( bInnr ), bVertical( bVert ) { -#ifndef PRODUCT +#ifdef DBG_UTIL bFlag3 = bFlag4 = bFlag5 = bFlag6 = bFlag7 = FALSE; #endif pRangeArr = new Range[ nCacheSize ]; diff --git a/svx/source/items/paraitem.cxx b/svx/source/items/paraitem.cxx index 80af583638e8..f9d9cc97f59d 100644 --- a/svx/source/items/paraitem.cxx +++ b/svx/source/items/paraitem.cxx @@ -283,7 +283,7 @@ SfxItemPresentation SvxLineSpacingItem::GetPresentation XubString& rText, const IntlWrapper * ) const { -#ifndef PRODUCT +#ifdef DBG_UTIL rText.AssignAscii( RTL_CONSTASCII_STRINGPARAM( "SvxLineSpacingItem" )); #else rText.Erase(); diff --git a/svx/source/svdraw/svdview.cxx b/svx/source/svdraw/svdview.cxx index 84ddc594f97e..0d47c0e81170 100644 --- a/svx/source/svdraw/svdview.cxx +++ b/svx/source/svdraw/svdview.cxx @@ -1293,7 +1293,7 @@ XubString SdrView::GetStatusText() aStr.SearchAndReplaceAscii("%2", UniString::CreateFromInt32(nLin + 1)); aStr.SearchAndReplaceAscii("%3", UniString::CreateFromInt32(nCol + 1)); -#ifndef PRODUCT +#ifdef DBG_UTIL aStr += UniString( RTL_CONSTASCII_USTRINGPARAM( ", Level " ) ); aStr += UniString::CreateFromInt32( pTextEditOutliner->GetDepth( aSel.nEndPara ) ); #endif diff --git a/svx/source/svrtf/rtfgrf.cxx b/svx/source/svrtf/rtfgrf.cxx index 417c72cf02b1..b4aaa497d2ef 100644 --- a/svx/source/svrtf/rtfgrf.cxx +++ b/svx/source/svrtf/rtfgrf.cxx @@ -44,7 +44,7 @@ #include "svxrtf.hxx" -#ifdef PRODUCT +#ifndef DBG_UTIL #undef DEBUG_JP #endif diff --git a/svx/source/svxlink/fileobj.cxx b/svx/source/svxlink/fileobj.cxx index f2628f181d31..b8dca94fec93 100644 --- a/svx/source/svxlink/fileobj.cxx +++ b/svx/source/svxlink/fileobj.cxx @@ -422,7 +422,7 @@ BOOL SvFileObject::GetGraphic_Impl( Graphic& rGrf, SvStream* pStream ) if( pStream && ERRCODE_IO_PENDING == pStream->GetError() ) pStream->ResetError(); -#ifndef PRODUCT +#ifdef DBG_UTIL if( nRes ) { if( xMed.Is() && !pStream ) diff --git a/xmloff/inc/xmloff/ProgressBarHelper.hxx b/xmloff/inc/xmloff/ProgressBarHelper.hxx index 7908b575ec36..383f35059ee9 100644 --- a/xmloff/inc/xmloff/ProgressBarHelper.hxx +++ b/xmloff/inc/xmloff/ProgressBarHelper.hxx @@ -52,7 +52,7 @@ class XMLOFF_DLLPUBLIC ProgressBarHelper // #96469#; if the value goes over the Range the progressbar starts again sal_Bool bRepeat; -#ifndef PRODUCT +#ifdef DBG_UTIL sal_Bool bFailure; #endif public: diff --git a/xmloff/inc/xmloff/xmlexp.hxx b/xmloff/inc/xmloff/xmlexp.hxx index 99097487b604..95ceb1712423 100644 --- a/xmloff/inc/xmloff/xmlexp.hxx +++ b/xmloff/inc/xmloff/xmlexp.hxx @@ -363,7 +363,7 @@ public: virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException); // Check if common attribute list is empty. -#ifdef PRODUCT +#ifndef DBG_UTIL void CheckAttrList() {} #else void CheckAttrList(); diff --git a/xmloff/source/core/ProgressBarHelper.cxx b/xmloff/source/core/ProgressBarHelper.cxx index dc35627a8ea2..68df76642196 100644 --- a/xmloff/source/core/ProgressBarHelper.cxx +++ b/xmloff/source/core/ProgressBarHelper.cxx @@ -56,7 +56,7 @@ ProgressBarHelper::ProgressBarHelper(const ::com::sun::star::uno::Reference < :: , fOldPercent(0.0) , bStrict(bTempStrict) , bRepeat(sal_True) -#ifndef PRODUCT +#ifdef DBG_UTIL , bFailure(sal_False) #endif { @@ -130,7 +130,7 @@ void ProgressBarHelper::SetValue(sal_Int32 nTempValue) // fOldPercent = fPercent; // } } -#ifndef PRODUCT +#ifdef DBG_UTIL else if (!bFailure) { DBG_ERROR("tried to set a wrong value on the progressbar"); diff --git a/xmloff/source/core/attrlist.cxx b/xmloff/source/core/attrlist.cxx index 130fc7be832f..75c189ce68b3 100644 --- a/xmloff/source/core/attrlist.cxx +++ b/xmloff/source/core/attrlist.cxx @@ -37,13 +37,6 @@ #include <rtl/uuid.h> #include <rtl/memory.h> -#if OSL_DEBUG_LEVEL == 0 -# ifndef NDEBUG -# define NDEBUG -# endif -#endif -#include <assert.h> - #include <xmloff/attrlist.hxx> using ::rtl::OUString; @@ -183,7 +176,7 @@ void SvXMLAttributeList::Clear() { m_pImpl->vecAttribute.clear(); - assert( ! getLength() ); + OSL_ASSERT( ! getLength() ); } void SvXMLAttributeList::RemoveAttribute( const OUString sName ) @@ -207,7 +200,7 @@ void SvXMLAttributeList::SetAttributeList( const uno::Reference< ::com::sun::sta void SvXMLAttributeList::AppendAttributeList( const uno::Reference< ::com::sun::star::xml::sax::XAttributeList > &r ) { - assert( r.is() ); + OSL_ASSERT( r.is() ); sal_Int16 nMax = r->getLength(); SvXMLAttributeList_Impl::size_type nTotalSize = @@ -220,7 +213,7 @@ void SvXMLAttributeList::AppendAttributeList( const uno::Reference< ::com::sun:: r->getValueByIndex( i ))); } - assert( nTotalSize == (SvXMLAttributeList_Impl::size_type)getLength()); + OSL_ASSERT( nTotalSize == (SvXMLAttributeList_Impl::size_type)getLength()); } void SvXMLAttributeList::SetValueByIndex( sal_Int16 i, diff --git a/xmloff/source/core/xmlerror.cxx b/xmloff/source/core/xmlerror.cxx index 5e3173c16597..9331ff228ed1 100644 --- a/xmloff/source/core/xmlerror.cxx +++ b/xmloff/source/core/xmlerror.cxx @@ -126,7 +126,7 @@ void XMLErrors::AddRecord( aErrors.push_back( ErrorRecord( nId, rParams, rExceptionMessage, nRow, nColumn, rPublicId, rSystemId ) ); -#ifndef PRODUCT +#ifdef DBG_UTIL // give detailed assertion on this message diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx index 0789cb54b0ce..7f46b1c5c25c 100644 --- a/xmloff/source/core/xmlexp.cxx +++ b/xmloff/source/core/xmlexp.cxx @@ -988,7 +988,7 @@ void SvXMLExport::ClearAttrList() mpAttrList->Clear(); } -#ifndef PRODUCT +#ifdef DBG_UTIL void SvXMLExport::CheckAttrList() { DBG_ASSERT( !mpAttrList->getLength(), diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx index 06d6b575a21f..c744e21f6a6c 100644 --- a/xmloff/source/core/xmlimp.cxx +++ b/xmloff/source/core/xmlimp.cxx @@ -715,7 +715,7 @@ void SAL_CALL SvXMLImport::startElement( const OUString& rName, } void SAL_CALL SvXMLImport::endElement( const OUString& -#ifndef PRODUCT +#ifdef DBG_UTIL rName #endif ) @@ -729,7 +729,7 @@ rName SvXMLImportContext *pContext = (*mpContexts)[nCount-1]; mpContexts->Remove( nCount-1, 1 ); -#ifndef PRODUCT +#ifdef DBG_UTIL // Non product only: check if endElement call matches startELement call. OUString aLocalName; USHORT nPrefix = diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx index d3e3edcd6716..0b6c7dd170e7 100644 --- a/xmloff/source/draw/shapeexport.cxx +++ b/xmloff/source/draw/shapeexport.cxx @@ -559,7 +559,7 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape const ImplXMLShapeExportInfo& aShapeInfo = aShapeInfoVector[nZIndex]; -#ifndef PRODUCT +#ifdef DBG_UTIL // --------------------------------------- // check if this is the correct ShapesInfo // --------------------------------------- diff --git a/xmloff/source/style/xmlstyle.cxx b/xmloff/source/style/xmlstyle.cxx index 5e7477bedbff..24522797bb3c 100644 --- a/xmloff/source/style/xmlstyle.cxx +++ b/xmloff/source/style/xmlstyle.cxx @@ -283,7 +283,7 @@ class SvXMLStylesContext_Impl SvXMLStyleIndices_Impl *pIndices; sal_Bool bAutomaticStyle; -#ifndef PRODUCT +#ifdef DBG_UTIL sal_uInt32 nIndexCreated; #endif @@ -317,7 +317,7 @@ SvXMLStylesContext_Impl::SvXMLStylesContext_Impl( sal_Bool bAuto ) : aStyles( 20, 5 ), pIndices( 0 ), bAutomaticStyle( bAuto ) -#ifndef PRODUCT +#ifdef DBG_UTIL , nIndexCreated( 0 ) #endif {} @@ -363,7 +363,7 @@ const SvXMLStyleContext *SvXMLStylesContext_Impl::FindStyleChildContext( if( !pIndices && bCreateIndex && aStyles.Count() > 0 ) { -#ifndef PRODUCT +#ifdef DBG_UTIL DBG_ASSERT( 0==nIndexCreated, "Performance warning: sdbcx::Index created multiple times" ); #endif @@ -379,7 +379,7 @@ const SvXMLStyleContext *SvXMLStylesContext_Impl::FindStyleChildContext( delete pStyleIndex; } } -#ifndef PRODUCT +#ifdef DBG_UTIL ((SvXMLStylesContext_Impl *)this)->nIndexCreated++; #endif } diff --git a/xmloff/source/text/XMLIndexTOCContext.cxx b/xmloff/source/text/XMLIndexTOCContext.cxx index 92f015344948..9c206ad95430 100644 --- a/xmloff/source/text/XMLIndexTOCContext.cxx +++ b/xmloff/source/text/XMLIndexTOCContext.cxx @@ -220,7 +220,7 @@ void XMLIndexTOCContext::StartElement( // index // preliminaries -#ifdef PRODUCT +#ifndef DBG_UTIL OUString sMarker(RTL_CONSTASCII_USTRINGPARAM(" ")); #else OUString sMarker(RTL_CONSTASCII_USTRINGPARAM("Y")); diff --git a/xmloff/source/text/XMLSectionImportContext.cxx b/xmloff/source/text/XMLSectionImportContext.cxx index 7148bc92fc3a..443aa15dc77c 100644 --- a/xmloff/source/text/XMLSectionImportContext.cxx +++ b/xmloff/source/text/XMLSectionImportContext.cxx @@ -226,7 +226,7 @@ void XMLSectionImportContext::StartElement( // last paragraph (and marker) when closing a section. Reference<XTextRange> xStart = rHelper->GetCursor()->getStart(); -#ifdef PRODUCT +#ifndef DBG_UTIL static const sal_Char sMarker[] = " "; #else static const sal_Char sMarker[] = "X"; diff --git a/xmloff/source/text/txtflde.cxx b/xmloff/source/text/txtflde.cxx index a77e49925554..e8344e757aed 100644 --- a/xmloff/source/text/txtflde.cxx +++ b/xmloff/source/text/txtflde.cxx @@ -2781,7 +2781,7 @@ sal_Bool XMLTextFieldExport::ExplodeFieldMasterName( sal_Int32 nSeparator = sMasterName.indexOf('.', nLength); sal_Bool bReturn = sal_True; -#ifndef PRODUCT +#ifdef DBG_UTIL // check for service name bReturn &= (0 == sFieldMasterPrefix.compareTo(sMasterName, nLength)); #endif diff --git a/xmloff/source/text/txtimppr.cxx b/xmloff/source/text/txtimppr.cxx index 875d78b6bfe7..5ccf3652eebe 100644 --- a/xmloff/source/text/txtimppr.cxx +++ b/xmloff/source/text/txtimppr.cxx @@ -207,7 +207,7 @@ void XMLTextImportPropertyMapper::FontDefaultsCheck( if( !pFontStyleName ) { aAny <<= sEmpty; - #ifndef PRODUCT + #ifdef DBG_UTIL sal_Int16 nTmp = getPropertySetMapper()->GetEntryContextId( pFontFamilyName->mnIndex + 1 ); DBG_ASSERT( nTmp == CTF_FONTSTYLENAME || nTmp == CTF_FONTSTYLENAME_CJK || nTmp == CTF_FONTSTYLENAME_CTL, @@ -221,7 +221,7 @@ void XMLTextImportPropertyMapper::FontDefaultsCheck( { aAny <<= (sal_Int16)com::sun::star::awt::FontFamily::DONTKNOW; - #ifndef PRODUCT + #ifdef DBG_UTIL sal_Int16 nTmp = getPropertySetMapper()->GetEntryContextId( pFontFamilyName->mnIndex + 2 ); DBG_ASSERT( nTmp == CTF_FONTFAMILY || nTmp == CTF_FONTFAMILY_CJK || nTmp == CTF_FONTFAMILY_CTL, @@ -234,7 +234,7 @@ void XMLTextImportPropertyMapper::FontDefaultsCheck( if( !pFontPitch ) { aAny <<= (sal_Int16)com::sun::star::awt::FontPitch::DONTKNOW; - #ifndef PRODUCT + #ifdef DBG_UTIL sal_Int16 nTmp = getPropertySetMapper()->GetEntryContextId( pFontFamilyName->mnIndex + 3 ); DBG_ASSERT( nTmp == CTF_FONTPITCH || nTmp == CTF_FONTPITCH_CJK || nTmp == CTF_FONTPITCH_CTL, @@ -247,7 +247,7 @@ void XMLTextImportPropertyMapper::FontDefaultsCheck( if( !pFontCharSet ) { aAny <<= (sal_Int16)gsl_getSystemTextEncoding(); - #ifndef PRODUCT + #ifdef DBG_UTIL sal_Int16 nTmp = getPropertySetMapper()->GetEntryContextId( pFontFamilyName->mnIndex + 4 ); DBG_ASSERT( nTmp == CTF_FONTCHARSET || nTmp == CTF_FONTCHARSET_CJK || nTmp == CTF_FONTCHARSET_CTL, @@ -397,7 +397,7 @@ void XMLTextImportPropertyMapper::finished( { if( pAllBorderDistance && !pBorderDistances[i] ) { -#ifndef PRODUCT +#ifdef DBG_UTIL sal_Int16 nTmp = getPropertySetMapper()->GetEntryContextId( pAllBorderDistance->mnIndex + i + 1 ); DBG_ASSERT( nTmp >= CTF_LEFTBORDERDISTANCE && @@ -411,7 +411,7 @@ void XMLTextImportPropertyMapper::finished( } if( pAllBorder && !pBorders[i] ) { -#ifndef PRODUCT +#ifdef DBG_UTIL sal_Int16 nTmp = getPropertySetMapper()->GetEntryContextId( pAllBorder->mnIndex + i + 1 ); DBG_ASSERT( nTmp >= CTF_LEFTBORDER && nTmp <= CTF_BOTTOMBORDER, @@ -450,7 +450,7 @@ void XMLTextImportPropertyMapper::finished( { if( !pBorderDistances[i] ) { -#ifndef PRODUCT +#ifdef DBG_UTIL sal_Int16 nTmp = getPropertySetMapper()->GetEntryContextId( pBorders[i]->mnIndex + 5 ); DBG_ASSERT( nTmp >= CTF_LEFTBORDERDISTANCE && diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx index 2617a8ff0089..3f243e52cbdc 100644 --- a/xmloff/source/text/txtparae.cxx +++ b/xmloff/source/text/txtparae.cxx @@ -274,7 +274,7 @@ SV_IMPL_PTRARR( OUStrings_Impl, OUStringPtr ) SV_DECL_PTRARR_SORT_DEL( OUStringsSort_Impl, OUStringPtr, 20, 10 ) SV_IMPL_OP_PTRARR_SORT( OUStringsSort_Impl, OUStringPtr ) -#ifndef PRODUCT +#ifdef DBG_UTIL static int txtparae_bContainsIllegalCharacters = sal_False; #endif @@ -1293,7 +1293,7 @@ XMLTextParagraphExport::~XMLTextParagraphExport() // delete pExportedLists; // <-- delete pListAutoPool; -#ifndef PRODUCT +#ifdef DBG_UTIL txtparae_bContainsIllegalCharacters = sal_False; #endif // --> OD 2008-04-25 #refactorlists# @@ -3341,7 +3341,7 @@ void XMLTextParagraphExport::exportText( const OUString& rText, default: if( cChar < 0x0020 ) { -#ifndef PRODUCT +#ifdef DBG_UTIL OSL_ENSURE( txtparae_bContainsIllegalCharacters || cChar >= 0x0020, "illegal character in text content" ); diff --git a/xmloff/source/transform/StyleOOoTContext.cxx b/xmloff/source/transform/StyleOOoTContext.cxx index c4d645277e91..d1941c18585b 100644 --- a/xmloff/source/transform/StyleOOoTContext.cxx +++ b/xmloff/source/transform/StyleOOoTContext.cxx @@ -352,7 +352,7 @@ XMLTypedPropertiesOOoTContext_Impl ++i; } -#ifndef PRODUCT +#ifdef DBG_UTIL if( !( XML_NAMESPACE_NONE == nPrefix || (XML_NAMESPACE_UNKNOWN_FLAG & nPrefix) || XML_PROP_TYPE_END==m_aPropTypes[1] || diff --git a/xmloff/source/transform/TransformerBase.cxx b/xmloff/source/transform/TransformerBase.cxx index 12b36274609e..973b49274031 100644 --- a/xmloff/source/transform/TransformerBase.cxx +++ b/xmloff/source/transform/TransformerBase.cxx @@ -337,7 +337,7 @@ void SAL_CALL XMLTransformerBase::startElement( const OUString& rName, } void SAL_CALL XMLTransformerBase::endElement( const OUString& -#ifndef PRODUCT +#ifdef DBG_UTIL rName #endif ) @@ -348,7 +348,7 @@ rName // Get topmost context ::rtl::Reference< XMLTransformerContext > xContext = m_pContexts->back(); -#ifndef PRODUCT +#ifdef DBG_UTIL OSL_ENSURE( xContext->GetQName() == rName, "XMLTransformerBase::endElement: popped context has wrong lname" ); #endif |