Kaydet (Commit) 3ac5138c authored tarafından Stephan Bergmann's avatar Stephan Bergmann

loplugin:simplifybool

Change-Id: I8087e16e50c06534e7d9a08c3bc72ab53de9f126
üst ed83ba34
......@@ -49,7 +49,7 @@ namespace cairocanvas
{
maFont->SetAlign( ALIGN_BASELINE );
maFont->SetCharSet( (rFontRequest.FontDescription.IsSymbolFont==com::sun::star::util::TriState_YES) ? RTL_TEXTENCODING_SYMBOL : RTL_TEXTENCODING_UNICODE );
maFont->SetVertical( (rFontRequest.FontDescription.IsVertical==com::sun::star::util::TriState_YES) ? true : false );
maFont->SetVertical( rFontRequest.FontDescription.IsVertical==com::sun::star::util::TriState_YES );
// TODO(F2): improve panose->vclenum conversion
maFont->SetWeight( static_cast<FontWeight>(rFontRequest.FontDescription.FontDescription.Weight) );
......
......@@ -135,7 +135,7 @@ namespace cairocanvas
// avoid repaints on hidden window (hidden: not mapped to
// screen). Return failure, since the screen really has _not_
// been updated (caller should try again later)
return !mbIsVisible ? false : maCanvasHelper.updateScreen(
return mbIsVisible && maCanvasHelper.updateScreen(
::basegfx::unotools::b2IRectangleFromAwtRectangle(maBounds),
bUpdateAll,
mbSurfaceDirty);
......
......@@ -121,7 +121,7 @@ namespace canvas
return false;
// call refresh() if requested, otherwise we're up to date...
return bRefresh ? refresh() : true;
return !bRefresh || refresh();
}
bool refresh()
......
......@@ -51,7 +51,7 @@ namespace vclcanvas
{
maFont->SetAlign( ALIGN_BASELINE );
maFont->SetCharSet( (rFontRequest.FontDescription.IsSymbolFont==com::sun::star::util::TriState_YES) ? RTL_TEXTENCODING_SYMBOL : RTL_TEXTENCODING_UNICODE );
maFont->SetVertical( (rFontRequest.FontDescription.IsVertical==com::sun::star::util::TriState_YES) ? true : false );
maFont->SetVertical( rFontRequest.FontDescription.IsVertical==com::sun::star::util::TriState_YES );
// TODO(F2): improve panose->vclenum conversion
maFont->SetWeight( static_cast<FontWeight>(rFontRequest.FontDescription.FontDescription.Weight) );
......
......@@ -145,7 +145,7 @@ namespace vclcanvas
// avoid repaints on hidden window (hidden: not mapped to
// screen). Return failure, since the screen really has _not_
// been updated (caller should try again later)
return !mbIsVisible ? false : maCanvasHelper.updateScreen(bUpdateAll,
return !mbIsVisible && maCanvasHelper.updateScreen(bUpdateAll,
mbSurfaceDirty);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment