summaryrefslogtreecommitdiff
path: root/canvas
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-05-10 16:42:16 +0200
committerAshod Nakashian <ashod.nakashian@collabora.co.uk>2016-07-20 01:26:06 -0400
commite7b11300cd813f821d1ec5cb4633ce2c5f7d1b9f (patch)
treea6c39d9d4cde1baa84a9d788affbce3508af89a8 /canvas
parent34f591ca95c4c63be092da4c4b2294230404f336 (diff)
Replace fallthrough comments with new SAL_FALLTHROUGH macro
...which (in LIBO_INTERNAL_ONLY) for Clang expands to [[clang::fallthrough]] in preparation of enabling -Wimplicit-fallthrough. (This is only relevant for C++11, as neither C nor old C++ has a way to annotate intended fallthroughs.) Could use BOOST_FALLTHROUGH instead of introducing our own SAL_FALLTHROUGH, but that would require adding back in dependencies on boost_headers to many libraries where we carefully removed any remaining Boost dependencies only recently. (At least make SAL_FALLTHROUGH strictly LIBO_INTERNAL_ONLY, so its future evolution will not have any impact on the stable URE interface.) C++17 will have a proper [[fallthroug]], eventually removing the need for a macro altogether. (cherry picked from commit 14cd5182c5f64c43581c82db8c958369152226ac) Change-Id: I342a7610a107db7d7a344ea9cbddfd9714d7e9ca
Diffstat (limited to 'canvas')
-rw-r--r--canvas/source/cairo/cairo_canvashelper.cxx2
-rw-r--r--canvas/source/cairo/cairo_canvashelper_text.cxx2
-rw-r--r--canvas/source/vcl/canvashelper.cxx2
3 files changed, 3 insertions, 3 deletions
diff --git a/canvas/source/cairo/cairo_canvashelper.cxx b/canvas/source/cairo/cairo_canvashelper.cxx
index c42e85f8d76d..8d974afc25d4 100644
--- a/canvas/source/cairo/cairo_canvashelper.cxx
+++ b/canvas/source/cairo/cairo_canvashelper.cxx
@@ -1197,7 +1197,7 @@ namespace cairocanvas
{
case rendering::PathJoinType::NONE:
bNoLineJoin = true;
- // cairo doesn't have join type NONE so we use MITER as it's pretty close
+ SAL_FALLTHROUGH; // cairo doesn't have join type NONE so we use MITER as it's pretty close
case rendering::PathJoinType::MITER:
cairo_set_line_join( mpCairo.get(), CAIRO_LINE_JOIN_MITER );
break;
diff --git a/canvas/source/cairo/cairo_canvashelper_text.cxx b/canvas/source/cairo/cairo_canvashelper_text.cxx
index 6f37f7f310b2..34fbb1face5a 100644
--- a/canvas/source/cairo/cairo_canvashelper_text.cxx
+++ b/canvas/source/cairo/cairo_canvashelper_text.cxx
@@ -288,7 +288,7 @@ namespace cairocanvas
case rendering::TextDirection::WEAK_RIGHT_TO_LEFT:
nLayoutMode |= TEXT_LAYOUT_BIDI_RTL;
- // FALLTHROUGH intended
+ SAL_FALLTHROUGH;
case rendering::TextDirection::STRONG_RIGHT_TO_LEFT:
nLayoutMode |= TEXT_LAYOUT_BIDI_RTL | TEXT_LAYOUT_BIDI_STRONG;
nLayoutMode |= TEXT_LAYOUT_TEXTORIGIN_RIGHT;
diff --git a/canvas/source/vcl/canvashelper.cxx b/canvas/source/vcl/canvashelper.cxx
index f7fec84338cf..5e5af9fa1620 100644
--- a/canvas/source/vcl/canvashelper.cxx
+++ b/canvas/source/vcl/canvashelper.cxx
@@ -598,7 +598,7 @@ namespace vclcanvas
case rendering::TextDirection::WEAK_RIGHT_TO_LEFT:
nLayoutMode |= TEXT_LAYOUT_BIDI_RTL;
- // FALLTHROUGH intended
+ SAL_FALLTHROUGH;
case rendering::TextDirection::STRONG_RIGHT_TO_LEFT:
nLayoutMode |= TEXT_LAYOUT_BIDI_RTL | TEXT_LAYOUT_BIDI_STRONG;
nLayoutMode |= TEXT_LAYOUT_TEXTORIGIN_RIGHT;