summaryrefslogtreecommitdiff
path: root/xmloff/source/forms
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-05-10 16:42:16 +0200
committerStephan Bergmann <sbergman@redhat.com>2016-05-10 16:42:16 +0200
commit14cd5182c5f64c43581c82db8c958369152226ac (patch)
tree57f150ba2707f29214eeb9b1eaad2373780d1b15 /xmloff/source/forms
parente4bb2b4f4875c15bd68297b5be716edd6859841e (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. Change-Id: I342a7610a107db7d7a344ea9cbddfd9714d7e9ca
Diffstat (limited to 'xmloff/source/forms')
-rw-r--r--xmloff/source/forms/elementexport.cxx12
-rw-r--r--xmloff/source/forms/propertyimport.cxx2
-rw-r--r--xmloff/source/forms/valueproperties.cxx2
3 files changed, 8 insertions, 8 deletions
diff --git a/xmloff/source/forms/elementexport.cxx b/xmloff/source/forms/elementexport.cxx
index f90e51c64f0e..f7bc4ee74ebf 100644
--- a/xmloff/source/forms/elementexport.cxx
+++ b/xmloff/source/forms/elementexport.cxx
@@ -1454,7 +1454,7 @@ namespace xmloff
case FormComponentType::DATEFIELD:
m_eType = DATE;
knownType = true;
- // NO BREAK
+ SAL_FALLTHROUGH;
case FormComponentType::TIMEFIELD:
if ( !knownType )
{
@@ -1462,7 +1462,7 @@ namespace xmloff
knownType = true;
}
m_nIncludeSpecial |= SCA_VALIDATION;
- // NO BREAK
+ SAL_FALLTHROUGH;
case FormComponentType::NUMERICFIELD:
case FormComponentType::CURRENCYFIELD:
case FormComponentType::PATTERNFIELD:
@@ -1471,7 +1471,7 @@ namespace xmloff
m_eType = FORMATTED_TEXT;
knownType = true;
}
- // NO BREAK
+ SAL_FALLTHROUGH;
case FormComponentType::TEXTFIELD:
{ // it's some kind of edit. To know which type we need further investigation
@@ -1625,7 +1625,7 @@ namespace xmloff
m_eType = BUTTON;
m_nIncludeCommon |= CCA_TAB_STOP | CCA_LABEL;
m_nIncludeSpecial = SCA_DEFAULT_BUTTON | SCA_TOGGLE | SCA_FOCUS_ON_CLICK | SCA_IMAGE_POSITION | SCA_REPEAT_DELAY;
- // NO BREAK !
+ SAL_FALLTHROUGH;
case FormComponentType::IMAGEBUTTON:
if (BUTTON != m_eType)
{
@@ -1642,7 +1642,7 @@ namespace xmloff
case FormComponentType::CHECKBOX:
m_eType = CHECKBOX;
m_nIncludeSpecial = SCA_CURRENT_STATE | SCA_IS_TRISTATE | SCA_STATE;
- // NO BREAK !
+ SAL_FALLTHROUGH;
case FormComponentType::RADIOBUTTON:
m_nIncludeCommon =
CCA_NAME | CCA_SERVICE_NAME | CCA_DISABLED | CCA_LABEL | CCA_PRINTABLE |
@@ -1707,7 +1707,7 @@ namespace xmloff
default:
OSL_FAIL("OControlExport::examineControl: unknown control type (class id)!");
- // NO break!
+ SAL_FALLTHROUGH;
case FormComponentType::NAVIGATIONBAR:
// TODO: should we have an own file format for this?
diff --git a/xmloff/source/forms/propertyimport.cxx b/xmloff/source/forms/propertyimport.cxx
index c12775989f8f..fa92c1c53552 100644
--- a/xmloff/source/forms/propertyimport.cxx
+++ b/xmloff/source/forms/propertyimport.cxx
@@ -120,7 +120,7 @@ Any PropertyConversion::convertString( const css::uno::Type& _rExpectedType,
break;
}
bEnumAsInt = true;
- // NO BREAK! handle it as enum
+ SAL_FALLTHROUGH;
case TypeClass_ENUM:
{
sal_uInt16 nEnumValue(0);
diff --git a/xmloff/source/forms/valueproperties.cxx b/xmloff/source/forms/valueproperties.cxx
index 8f0c542af581..94bd723c7a5b 100644
--- a/xmloff/source/forms/valueproperties.cxx
+++ b/xmloff/source/forms/valueproperties.cxx
@@ -61,7 +61,7 @@ namespace xmloff
case FormComponentType::FILECONTROL:
case FormComponentType::COMBOBOX:
_rpValuePropertyName = PROPERTY_DEFAULT_TEXT;
- // NO BREAK!!
+ SAL_FALLTHROUGH;
case FormComponentType::COMMANDBUTTON:
_rpCurrentValuePropertyName = PROPERTY_TEXT;
break;