summaryrefslogtreecommitdiff
path: root/sfx2
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 /sfx2
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 'sfx2')
-rw-r--r--sfx2/source/bastyp/sfxhtml.cxx4
-rw-r--r--sfx2/source/control/thumbnailview.cxx2
-rw-r--r--sfx2/source/control/thumbnailviewitem.cxx2
-rw-r--r--sfx2/source/dialog/templdlg.cxx2
-rw-r--r--sfx2/source/dialog/titledockwin.cxx2
-rw-r--r--sfx2/source/doc/objserv.cxx2
-rw-r--r--sfx2/source/view/viewprn.cxx2
7 files changed, 8 insertions, 8 deletions
diff --git a/sfx2/source/bastyp/sfxhtml.cxx b/sfx2/source/bastyp/sfxhtml.cxx
index 3c38b4e1bd13..d994d7e4ff2b 100644
--- a/sfx2/source/bastyp/sfxhtml.cxx
+++ b/sfx2/source/bastyp/sfxhtml.cxx
@@ -153,14 +153,14 @@ bool SfxHTMLParser::ParseAreaOptions(ImageMap * pImageMap, const OUString& rBase
case HTML_O_ONMOUSEOVER:
eScrpType = JAVASCRIPT;
- //fallthrough
+ SAL_FALLTHROUGH;
case HTML_O_SDONMOUSEOVER:
nEvent = nEventMouseOver;
goto IMAPOBJ_SETEVENT;
case HTML_O_ONMOUSEOUT:
eScrpType = JAVASCRIPT;
- //fallthrough
+ SAL_FALLTHROUGH;
case HTML_O_SDONMOUSEOUT:
nEvent = nEventMouseOut;
goto IMAPOBJ_SETEVENT;
diff --git a/sfx2/source/control/thumbnailview.cxx b/sfx2/source/control/thumbnailview.cxx
index 526477fa5e6f..894db1e56cd5 100644
--- a/sfx2/source/control/thumbnailview.cxx
+++ b/sfx2/source/control/thumbnailview.cxx
@@ -602,7 +602,7 @@ void ThumbnailView::KeyInput( const KeyEvent& rKEvt )
if ( bFoundLast )
OnItemDblClicked( mFilteredItemList[nLastPos] );
}
- //fall-through
+ SAL_FALLTHROUGH;
default:
Control::KeyInput( rKEvt );
}
diff --git a/sfx2/source/control/thumbnailviewitem.cxx b/sfx2/source/control/thumbnailviewitem.cxx
index 0d2e8f383fe8..fd754989544d 100644
--- a/sfx2/source/control/thumbnailviewitem.cxx
+++ b/sfx2/source/control/thumbnailviewitem.cxx
@@ -77,7 +77,7 @@ bool ResizableMultiLineEdit::PreNotify(NotifyEvent& rNEvt)
{
case KEY_RETURN:
mpItem->setTitle( GetText() );
- //fall-through
+ SAL_FALLTHROUGH;
case KEY_ESCAPE:
mpItem->setEditTitle(false);
bDone = true;
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index 4c0408382510..d5c539f971a5 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -2438,7 +2438,7 @@ void SfxTemplateDialog_Impl::EnableItem(sal_uInt16 nMesId, bool bCheck)
case SID_STYLE_WATERCAN :
if(!bCheck && IsCheckedItem(SID_STYLE_WATERCAN))
Execute_Impl(SID_STYLE_WATERCAN, "", "", 0);
- //fall-through
+ SAL_FALLTHROUGH;
case SID_STYLE_NEW_BY_EXAMPLE:
case SID_STYLE_UPDATE_BY_EXAMPLE:
m_aActionTbR->EnableItem(nMesId,bCheck);
diff --git a/sfx2/source/dialog/titledockwin.cxx b/sfx2/source/dialog/titledockwin.cxx
index cfe9d7331158..bfa9d6782f56 100644
--- a/sfx2/source/dialog/titledockwin.cxx
+++ b/sfx2/source/dialog/titledockwin.cxx
@@ -274,7 +274,7 @@ namespace sfx2
case DataChangedEventType::SETTINGS:
if ( !( i_rDataChangedEvent.GetFlags() & AllSettingsFlags::STYLE ) )
break;
- // else fall through.
+ SAL_FALLTHROUGH;
case DataChangedEventType::FONTS:
case DataChangedEventType::FONTSUBSTITUTION:
{
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index c47141433357..fb31aef69bb4 100644
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -523,7 +523,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
case SID_EXPORTDOCASPDF:
case SID_DIRECTEXPORTDOCASPDF:
bIsPDFExport = true;
- //fall-through
+ SAL_FALLTHROUGH;
case SID_EXPORTDOC:
case SID_SAVEASDOC:
case SID_SAVEASREMOTE:
diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx
index a806be450daa..ad240875f81d 100644
--- a/sfx2/source/view/viewprn.cxx
+++ b/sfx2/source/view/viewprn.cxx
@@ -345,7 +345,7 @@ void SfxPrinterController::jobFinished( css::view::PrintableState nState )
OUString aMsg( SfxResId(STR_NOSTARTPRINTER).toString() );
if ( !m_bApi )
ScopedVclPtrInstance<MessageDialog>::Create(mpViewShell->GetWindow(), aMsg)->Execute();
- // intentionally no break
+ SAL_FALLTHROUGH;
}
case view::PrintableState_JOB_ABORTED :
{