summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristina Rossmanith <ChrRossmanith@web.de>2011-04-13 21:17:34 +0200
committerChristina Rossmanith <ChrRossmanith@web.de>2011-04-19 20:36:12 +0200
commite198be5988cb150de99e9f2e52c64fdc72036042 (patch)
treeabb79d0eddb805593b9b76d44ee439454b87d162
parentb0b3e5fdf811fa5939366f378a22755fb80e51ab (diff)
Removed dbgmacros.{ch}xx / use OSL_{ENSURE,POSTCOND} instead
-rw-r--r--shell/inc/internal/dbgmacros.hxx46
-rw-r--r--shell/inc/internal/global.hxx1
-rw-r--r--shell/source/all/ooofilereader/basereader.cxx4
-rw-r--r--shell/source/all/ooofilereader/contentreader.cxx8
-rw-r--r--shell/source/all/ooofilereader/metainforeader.cxx8
-rw-r--r--shell/source/win32/shlxthandler/classfactory.cxx2
-rw-r--r--shell/source/win32/shlxthandler/prophdl/propertyhdl.cxx2
-rw-r--r--shell/source/win32/shlxthandler/util/dbgmacros.cxx46
-rwxr-xr-xshell/source/win32/shlxthandler/util/makefile.mk6
-rw-r--r--shell/source/win32/shlxthandler/util/registry.cxx1
-rw-r--r--shell/source/win32/shlxthandler/util/utilities.cxx3
11 files changed, 15 insertions, 112 deletions
diff --git a/shell/inc/internal/dbgmacros.hxx b/shell/inc/internal/dbgmacros.hxx
deleted file mode 100644
index 0fe72b4aceb2..000000000000
--- a/shell/inc/internal/dbgmacros.hxx
+++ /dev/null
@@ -1,46 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef DBGMACROS_HXX_INCLUDED
-#define DBGMACROS_HXX_INCLUDED
-
-void DbgAssert(bool condition, const char* message);
-
-#if OSL_DEBUG_LEVEL > 0
- #define PRE_CONDITION(x, msg) DbgAssert(x, msg)
- #define POST_CONDITION(x, msg) DbgAssert(x, msg)
- #define ENSURE(x ,msg) DbgAssert(x, msg)
-#else // OSL_DEBUG_LEVEL == 0
- #define PRE_CONDITION(x, msg) ((void)0)
- #define POST_CONDITION(x, msg) ((void)0)
- #define ENSURE(x, msg) ((void)0)
-#endif
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/shell/inc/internal/global.hxx b/shell/inc/internal/global.hxx
index b711c34b8b1d..359435a79192 100644
--- a/shell/inc/internal/global.hxx
+++ b/shell/inc/internal/global.hxx
@@ -38,7 +38,6 @@
#if defined _MSC_VER
#pragma warning(pop)
#endif
-#include "internal/dbgmacros.hxx"
extern long g_DllRefCnt;
diff --git a/shell/source/all/ooofilereader/basereader.cxx b/shell/source/all/ooofilereader/basereader.cxx
index 2c0f8bdb3522..0ea625924d10 100644
--- a/shell/source/all/ooofilereader/basereader.cxx
+++ b/shell/source/all/ooofilereader/basereader.cxx
@@ -88,11 +88,11 @@ void CBaseReader::Initialize( const std::string& ContentName)
#endif
)
{
- ENSURE( false, ex.what() );
+ OSL_ENSURE( false, ex.what() );
}
catch(...)
{
- ENSURE(false, "Unknown error");
+ OSL_ENSURE(false, "Unknown error");
}
}
diff --git a/shell/source/all/ooofilereader/contentreader.cxx b/shell/source/all/ooofilereader/contentreader.cxx
index 360d3dcfd3b6..d9525c5ec1a6 100644
--- a/shell/source/all/ooofilereader/contentreader.cxx
+++ b/shell/source/all/ooofilereader/contentreader.cxx
@@ -51,11 +51,11 @@ CBaseReader( DocumentName )
#endif
)
{
- ENSURE(false, ex.what());
+ OSL_ENSURE(false, ex.what());
}
catch(...)
{
- ENSURE(false, "Unknown error");
+ OSL_ENSURE(false, "Unknown error");
}
}
@@ -73,11 +73,11 @@ try
#endif
)
{
- ENSURE(false, ex.what());
+ OSL_ENSURE(false, ex.what());
}
catch(...)
{
- ENSURE(false, "Unknown error");
+ OSL_ENSURE(false, "Unknown error");
}
}
diff --git a/shell/source/all/ooofilereader/metainforeader.cxx b/shell/source/all/ooofilereader/metainforeader.cxx
index be6ad746569d..6df5145dd3cf 100644
--- a/shell/source/all/ooofilereader/metainforeader.cxx
+++ b/shell/source/all/ooofilereader/metainforeader.cxx
@@ -70,11 +70,11 @@ CBaseReader( DocumentName )
#endif
)
{
- ENSURE(false, ex.what());
+ OSL_ENSURE(false, ex.what());
}
catch(...)
{
- ENSURE(false, "Unknown error");
+ OSL_ENSURE(false, "Unknown error");
}
}
@@ -111,11 +111,11 @@ try
#endif
)
{
- ENSURE(false, ex.what());
+ OSL_ENSURE(false, ex.what());
}
catch(...)
{
- ENSURE(false, "Unknown error");
+ OSL_ENSURE(false, "Unknown error");
}
}
diff --git a/shell/source/win32/shlxthandler/classfactory.cxx b/shell/source/win32/shlxthandler/classfactory.cxx
index 422c2be34ecc..4bf5f6a97577 100644
--- a/shell/source/win32/shlxthandler/classfactory.cxx
+++ b/shell/source/win32/shlxthandler/classfactory.cxx
@@ -125,7 +125,7 @@ HRESULT STDMETHODCALLTYPE CClassFactory::CreateInstance(
else if (CLSID_THUMBVIEWER_HANDLER == m_Clsid)
pUnk = static_cast<IExtractImage*>(new CThumbviewer());
- POST_CONDITION(pUnk != 0, "Could not create COM object");
+ OSL_POSTCOND(pUnk != 0, "Could not create COM object");
if (0 == pUnk)
return E_OUTOFMEMORY;
diff --git a/shell/source/win32/shlxthandler/prophdl/propertyhdl.cxx b/shell/source/win32/shlxthandler/prophdl/propertyhdl.cxx
index 491ed2170136..b0e0a4b4b0e5 100644
--- a/shell/source/win32/shlxthandler/prophdl/propertyhdl.cxx
+++ b/shell/source/win32/shlxthandler/prophdl/propertyhdl.cxx
@@ -385,7 +385,7 @@ HRESULT STDMETHODCALLTYPE CClassFactory::CreateInstance(
if ( CLSID_PROPERTY_HANDLER == m_Clsid )
pUnk = static_cast<IPropertyStore*>( new CPropertyHdl() );
- POST_CONDITION(pUnk != 0, "Could not create COM object");
+ OSL_POSTCOND(pUnk != 0, "Could not create COM object");
if (0 == pUnk)
return E_OUTOFMEMORY;
diff --git a/shell/source/win32/shlxthandler/util/dbgmacros.cxx b/shell/source/win32/shlxthandler/util/dbgmacros.cxx
deleted file mode 100644
index 76a2d83f5b03..000000000000
--- a/shell/source/win32/shlxthandler/util/dbgmacros.cxx
+++ /dev/null
@@ -1,46 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_shell.hxx"
-
-#if defined _MSC_VER
-#pragma warning(push, 1)
-#endif
-#include <windows.h>
-#if defined _MSC_VER
-#pragma warning(pop)
-#endif
-#include <stdio.h>
-#include "internal/dbgmacros.hxx"
-
-void DbgAssert(bool /*condition*/, const char* /*message*/)
-{
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/shell/source/win32/shlxthandler/util/makefile.mk b/shell/source/win32/shlxthandler/util/makefile.mk
index 195bf9fac6fe..8d54e138f350 100755
--- a/shell/source/win32/shlxthandler/util/makefile.mk
+++ b/shell/source/win32/shlxthandler/util/makefile.mk
@@ -45,14 +45,12 @@ CDEFS_X64+=-D_WIN32_IE=0x501
# --- Files --------------------------------------------------------
-SLOFILES=$(SLO)$/dbgmacros.obj\
- $(SLO)$/fileextensions.obj\
+SLOFILES=$(SLO)$/fileextensions.obj\
$(SLO)$/registry.obj\
$(SLO)$/utilities.obj\
$(SLO)$/iso8601_converter.obj
-SLOFILES_X64=$(SLO_X64)$/dbgmacros.obj\
- $(SLO_X64)$/fileextensions.obj\
+SLOFILES_X64=$(SLO_X64)$/fileextensions.obj\
$(SLO_X64)$/registry.obj\
$(SLO_X64)$/utilities.obj\
$(SLO_X64)$/iso8601_converter.obj
diff --git a/shell/source/win32/shlxthandler/util/registry.cxx b/shell/source/win32/shlxthandler/util/registry.cxx
index 5bbd207791cc..a38bcef99a83 100644
--- a/shell/source/win32/shlxthandler/util/registry.cxx
+++ b/shell/source/win32/shlxthandler/util/registry.cxx
@@ -37,7 +37,6 @@
#pragma warning(pop)
#endif
#include <malloc.h>
-#include "internal/dbgmacros.hxx"
#include "internal/registry.hxx"
#if defined _MSC_VER
diff --git a/shell/source/win32/shlxthandler/util/utilities.cxx b/shell/source/win32/shlxthandler/util/utilities.cxx
index 06619a485f34..48783978e7ca 100644
--- a/shell/source/win32/shlxthandler/util/utilities.cxx
+++ b/shell/source/win32/shlxthandler/util/utilities.cxx
@@ -31,7 +31,6 @@
#include "internal/config.hxx"
-#include "internal/dbgmacros.hxx"
#include "internal/utilities.hxx"
//-----------------------------
@@ -85,7 +84,7 @@ std::wstring GetResString(int ResId)
int rc = LoadStringW( GetModuleHandleW(MODULE_NAME), ResId, szResStr, sizeof(szResStr) );
OutputDebugStringFormat( "GetResString: read %d chars\n", rc );
- ENSURE(rc, "String resource not found");
+ OSL_ENSURE(rc, "String resource not found");
return std::wstring(szResStr);
}