summaryrefslogtreecommitdiff
path: root/include/canvas
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-12-12 15:05:28 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-12-13 06:10:04 +0000
commita005fbeddc4e615cfff56a9bd84355f8d42c1c8c (patch)
treef7e561a362b6aa005ceea7e6176e35f05790462a /include/canvas
parent81f2a9f46451492d4d879573bc9ac7f2e44abedb (diff)
OSL_TRACE->SAL in framework..sal
Change-Id: I9a897af88aa9f6f7ca98ce521c69b5a4ee8462e9 Reviewed-on: https://gerrit.libreoffice.org/31903 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/canvas')
-rw-r--r--include/canvas/canvastools.hxx13
-rw-r--r--include/canvas/debug.hxx59
2 files changed, 5 insertions, 67 deletions
diff --git a/include/canvas/canvastools.hxx b/include/canvas/canvastools.hxx
index 67119cf914b8..261a490230bb 100644
--- a/include/canvas/canvastools.hxx
+++ b/include/canvas/canvastools.hxx
@@ -377,7 +377,7 @@ namespace canvas
( arg>TargetLimits::max() ) ) // overflow will happen
{
# if OSL_DEBUG_LEVEL > 2
- OSL_TRACE("numeric_cast detected data loss");
+ SAL_WARN("canvas", "numeric_cast detected data loss");
#endif
throw css::uno::RuntimeException(
"numeric_cast detected data loss",
@@ -460,8 +460,7 @@ namespace canvas
if( !mbCaseSensitive &&
aStr != aStr.toAsciiLowerCase() )
{
- OSL_TRACE("ValueMap::ValueMap(): Key %s is not lowercase",
- pMap->maKey);
+ SAL_WARN("canvas", "ValueMap::ValueMap(): Key is not lowercase " << pMap->maKey);
OSL_FAIL( "ValueMap::ValueMap(): Key is not lowercase" );
}
@@ -472,9 +471,8 @@ namespace canvas
if( !mapComparator(pMap[0], pMap[1]) &&
mapComparator(pMap[1], pMap[0]) )
{
- OSL_TRACE("ValueMap::ValueMap(): Map is not sorted, keys %s and %s are wrong",
- pMap[0].maKey,
- pMap[1].maKey);
+ SAL_WARN("canvas", "ValueMap::ValueMap(): Map is not sorted, keys are wrong, "
+ << pMap[0].maKey << " and " << pMap[1].maKey);
OSL_FAIL( "ValueMap::ValueMap(): Map is not sorted" );
}
@@ -482,8 +480,7 @@ namespace canvas
if( !mbCaseSensitive &&
aStr2 != aStr2.toAsciiLowerCase() )
{
- OSL_TRACE("ValueMap::ValueMap(): Key %s is not lowercase",
- pMap[1].maKey);
+ SAL_WARN("canvas", "ValueMap::ValueMap(): Key is not lowercase" << pMap[1].maKey);
OSL_FAIL( "ValueMap::ValueMap(): Key is not lowercase" );
}
}
diff --git a/include/canvas/debug.hxx b/include/canvas/debug.hxx
deleted file mode 100644
index f016df163eb7..000000000000
--- a/include/canvas/debug.hxx
+++ /dev/null
@@ -1,59 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef INCLUDED_CANVAS_DEBUG_HXX
-#define INCLUDED_CANVAS_DEBUG_HXX
-
-// shared_ptr debugging
-
-
-#ifdef BOOST_SP_ENABLE_DEBUG_HOOKS
-
-# include <sal/config.h>
-# include <osl/diagnose.h>
-# include <memory>
-
-::std::size_t find_unreachable_objects( bool );
-
-# if OSL_DEBUG_LEVEL > 2
-# define SHARED_PTR_LEFTOVERS(a) OSL_TRACE("%s\n%s: Unreachable objects still use %d bytes\n", \
- OSL_THIS_FUNC, a, \
- find_unreachable_objects(true) )
-# else
-/** This macro shows how much memory is still used by shared_ptrs
-
- Use this macro at places in the code where normally all shared_ptr
- objects should have been deleted. You'll get the number of bytes
- still contained in those objects, which quite possibly are prevented
- from deletion by circular references.
- */
-# define SHARED_PTR_LEFTOVERS(a) OSL_TRACE("%s\n%s: Unreachable objects still use %d bytes\n", \
- OSL_THIS_FUNC, a, \
- find_unreachable_objects(false) )
-# endif
-
-#else
-
-# define SHARED_PTR_LEFTOVERS(a) ((void)0)
-
-#endif
-
-#endif // ! defined(INCLUDED_CANVAS_DEBUG_HXX)
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */