summaryrefslogtreecommitdiff
path: root/canvas
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-03-13 10:50:28 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-03-13 10:53:28 +0100
commitee11e221d2108212619e1bbe7f029e7d9afdba32 (patch)
tree65e77bfcd7fc7a4ca7e1c111cc8707615bc0d613 /canvas
parente37388c7de15242b7af0bf9fdc48c6d194d8cd94 (diff)
tdf#43157: Fix format string violations in OSL_TRACE etc.
...in preparation of enabling the __attribute__((format(...))) in sal_detail_logFormat (include/sal/detail/log.h) Change-Id: I8a859199fa11ca0f9f4f4b4b23a8ebddec955a86
Diffstat (limited to 'canvas')
-rw-r--r--canvas/source/cairo/cairo_textlayout.cxx36
-rw-r--r--canvas/source/cairo/cairo_xlib_cairo.cxx7
-rw-r--r--canvas/source/vcl/spritehelper.cxx5
3 files changed, 26 insertions, 22 deletions
diff --git a/canvas/source/cairo/cairo_textlayout.cxx b/canvas/source/cairo/cairo_textlayout.cxx
index 892830e14f1e..5eef3e22f517 100644
--- a/canvas/source/cairo/cairo_textlayout.cxx
+++ b/canvas/source/cairo/cairo_textlayout.cxx
@@ -528,26 +528,26 @@ namespace cairocanvas
cairo_set_font_matrix(pSCairo.get(), &m);
#if (defined CAIRO_HAS_WIN32_SURFACE) && (OSL_DEBUG_LEVEL > 1)
-# define TEMP_TRACE_FONT OUStringToOString( reinterpret_cast<const sal_Unicode*> (logfont.lfFaceName), RTL_TEXTENCODING_UTF8 ).getStr()
+# define TEMP_TRACE_FONT OUString(reinterpret_cast<const sal_Unicode*> (logfont.lfFaceName))
#else
-# define TEMP_TRACE_FONT OUStringToOString( aFont.GetName(), RTL_TEXTENCODING_UTF8 ).getStr()
+# define TEMP_TRACE_FONT aFont.GetName()
#endif
- OSL_TRACE("\r\n:cairocanvas::TextLayout::draw(S,O,p,v,r): Size:(%d,%d), Pos (%d,%d), G(%d,%d,%d) %s%s%s%s || Name:%s - %s",
- aFont.GetWidth(),
- aFont.GetHeight(),
- (int) rOutpos.X(),
- (int) rOutpos.Y(),
- cairo_glyphs.size() > 0 ? cairo_glyphs[0].index : -1,
- cairo_glyphs.size() > 1 ? cairo_glyphs[1].index : -1,
- cairo_glyphs.size() > 2 ? cairo_glyphs[2].index : -1,
- maLogicalAdvancements.getLength() ? "ADV " : "",
- rSysFontData.bAntialias ? "AA " : "",
- rSysFontData.bFakeBold ? "FB " : "",
- rSysFontData.bFakeItalic ? "FI " : "",
- TEMP_TRACE_FONT,
- OUStringToOString( maText.Text.copy( maText.StartPosition, maText.Length ),
- RTL_TEXTENCODING_UTF8 ).getStr()
- );
+ SAL_INFO(
+ "canvas.cairo",
+ "Size:(" << aFont.GetWidth() << "," << aFont.GetHeight()
+ << "), Pos (" << rOutpos.X() << "," << rOutpos.Y()
+ << "), G("
+ << (cairo_glyphs.size() > 0 ? cairo_glyphs[0].index : -1)
+ << ","
+ << (cairo_glyphs.size() > 1 ? cairo_glyphs[1].index : -1)
+ << ","
+ << (cairo_glyphs.size() > 2 ? cairo_glyphs[2].index : -1)
+ << ") " << (maLogicalAdvancements.getLength() ? "ADV " : "")
+ << (rSysFontData.bAntialias ? "AA " : "")
+ << (rSysFontData.bFakeBold ? "FB " : "")
+ << (rSysFontData.bFakeItalic ? "FI " : "") << " || Name:"
+ << TEMP_TRACE_FONT << " - "
+ << maText.Text.copy(maText.StartPosition, maText.Length));
#undef TEMP_TRACE_FONT
cairo_show_glyphs(pSCairo.get(), &cairo_glyphs[0], cairo_glyphs.size());
diff --git a/canvas/source/cairo/cairo_xlib_cairo.cxx b/canvas/source/cairo/cairo_xlib_cairo.cxx
index ae9cecb93789..171d1053e5f4 100644
--- a/canvas/source/cairo/cairo_xlib_cairo.cxx
+++ b/canvas/source/cairo/cairo_xlib_cairo.cxx
@@ -356,8 +356,11 @@ namespace cairo
const BitmapSystemData& rData,
const Size& rSize )
{
- OSL_TRACE( "requested size: %d x %d available size: %d x %d",
- rSize.Width(), rSize.Height(), rData.mnWidth, rData.mnHeight );
+ SAL_INFO(
+ "canvas.cairo",
+ "requested size: " << rSize.Width() << " x " << rSize.Height()
+ << " available size: " << rData.mnWidth << " x "
+ << rData.mnHeight);
if ( rData.mnWidth == rSize.Width() && rData.mnHeight == rSize.Height() )
{
if( rRefDevice.GetOutDevType() == OUTDEV_WINDOW )
diff --git a/canvas/source/vcl/spritehelper.cxx b/canvas/source/vcl/spritehelper.cxx
index 8e7d783847d8..675ea920ef6a 100644
--- a/canvas/source/vcl/spritehelper.cxx
+++ b/canvas/source/vcl/spritehelper.cxx
@@ -332,8 +332,9 @@ namespace vclcanvas
2,'.',NULL,' ') );
rTargetSurface.DrawText( aOutPos+Point(2,2), text );
- VERBOSE_TRACE( "SpriteHelper::redraw(): sprite %X has prio %f\n",
- this, getPriority() );
+ SAL_INFO(
+ "canvas.level2",
+ "sprite " << this << " has prio " << getPriority());
}
}
}