[Libreoffice-commits] .: canvas/source
Jan Holesovsky
kendy at kemper.freedesktop.org
Tue Nov 22 12:59:37 PST 2011
canvas/source/cairo/cairo_textlayout.cxx | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
New commits:
commit 6b74943cc6fb7983035b12f6cda8cb8e0c0a016b
Author: Jan Holesovsky <kendy at suse.cz>
Date: Tue Nov 22 21:56:33 2011 +0100
Using #if etc. inside OSL_TRACE is not a good idea, breaks Windows.
diff --git a/canvas/source/cairo/cairo_textlayout.cxx b/canvas/source/cairo/cairo_textlayout.cxx
index 68143b5..3aac7a9 100644
--- a/canvas/source/cairo/cairo_textlayout.cxx
+++ b/canvas/source/cairo/cairo_textlayout.cxx
@@ -578,6 +578,11 @@ namespace cairocanvas
cairo_set_font_matrix(pSCairo.get(), &m);
+ #if (defined CAIRO_HAS_WIN32_SURFACE) && (OSL_DEBUG_LEVEL > 1)
+ #define TEMP_TRACE_FONT ::rtl::OUStringToOString( reinterpret_cast<const sal_Unicode*> (logfont.lfFaceName), RTL_TEXTENCODING_UTF8 ).getStr()
+ #else
+ #define TEMP_TRACE_FONT ::rtl::OUStringToOString( aFont.GetName(), RTL_TEXTENCODING_UTF8 ).getStr()
+ #endif
OSL_TRACE("\r\n:cairocanvas::TextLayout::draw(S,O,p,v,r): Size:(%d,%d), W:%d->%d, Pos (%d,%d), G(%d,%d,%d) %s%s%s%s || Name:%s - %s",
aFont.GetWidth(),
aFont.GetHeight(),
@@ -590,14 +595,11 @@ namespace cairocanvas
rSysFontData.bAntialias ? "AA " : "",
rSysFontData.bFakeBold ? "FB " : "",
rSysFontData.bFakeItalic ? "FI " : "",
- #if (defined CAIRO_HAS_WIN32_SURFACE) && (OSL_DEBUG_LEVEL > 1)
- ::rtl::OUStringToOString( reinterpret_cast<const sal_Unicode*> (logfont.lfFaceName), RTL_TEXTENCODING_UTF8 ).getStr(),
- #else
- ::rtl::OUStringToOString( aFont.GetName(), RTL_TEXTENCODING_UTF8 ).getStr(),
- #endif
+ TEMP_TRACE_FONT,
::rtl::OUStringToOString( maText.Text.copy( maText.StartPosition, maText.Length ),
RTL_TEXTENCODING_UTF8 ).getStr()
);
+ #undef TEMP_TRACE_FONT
cairo_show_glyphs(pSCairo.get(), &cairo_glyphs[0], cairo_glyphs.size());
More information about the Libreoffice-commits
mailing list