summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-01-14 15:05:31 +0100
committerStephan Bergmann <sbergman@redhat.com>2016-01-14 15:05:31 +0100
commit57e0ab0c3a82ad4a957ea97c15f8672fad4a1880 (patch)
tree2de6c22b65538d6e687b35dd2d01b7f63f7c848f
parent6efd3da8a20ec7683d84c3779d6685253dc21746 (diff)
-Werror=misleading-indentation (GCC 6)
Change-Id: I5c5f38789e7001aa04a0a5481feb9f033e53748e
-rw-r--r--sw/source/core/edit/autofmt.cxx14
-rw-r--r--sw/source/core/inc/sectfrm.hxx12
-rw-r--r--sw/source/core/text/inftxt.cxx12
-rw-r--r--sw/source/core/text/inftxt.hxx6
-rw-r--r--sw/source/core/text/redlnitr.cxx6
-rw-r--r--sw/source/core/text/redlnitr.hxx29
-rw-r--r--sw/source/uibase/uiview/view0.cxx3
7 files changed, 57 insertions, 25 deletions
diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx
index c6c35cf71aa3..2c1c57d4dcc3 100644
--- a/sw/source/core/edit/autofmt.cxx
+++ b/sw/source/core/edit/autofmt.cxx
@@ -221,10 +221,16 @@ class SwAutoFormat
bool DoTable();
void _SetRedlineText( sal_uInt16 nId );
- bool SetRedlineText( sal_uInt16 nId )
- { if( m_aFlags.bWithRedlining ) _SetRedlineText( nId ); return true; }
- bool ClearRedlineText()
- { if( m_aFlags.bWithRedlining ) m_pDoc->GetDocumentRedlineManager().SetAutoFormatRedlineComment(nullptr); return true; }
+ bool SetRedlineText( sal_uInt16 nId ) {
+ if( m_aFlags.bWithRedlining )
+ _SetRedlineText( nId );
+ return true;
+ }
+ bool ClearRedlineText() {
+ if( m_aFlags.bWithRedlining )
+ m_pDoc->GetDocumentRedlineManager().SetAutoFormatRedlineComment(nullptr);
+ return true;
+ }
public:
SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFormatFlags& rFlags,
diff --git a/sw/source/core/inc/sectfrm.hxx b/sw/source/core/inc/sectfrm.hxx
index 395f18ceb16f..4184cb78ffad 100644
--- a/sw/source/core/inc/sectfrm.hxx
+++ b/sw/source/core/inc/sectfrm.hxx
@@ -110,8 +110,10 @@ public:
* if bCheckFollow is set.
*/
bool ToMaximize( bool bCheckFollow ) const;
- inline bool _ToMaximize() const
- { if( !m_pSection ) return false; return ToMaximize( false ); }
+ inline bool _ToMaximize() const {
+ if( !m_pSection ) return false;
+ return ToMaximize( false );
+ }
bool MoveAllowed( const SwFrame* ) const;
bool CalcMinDiff( SwTwips& rMinDiff ) const;
@@ -136,8 +138,10 @@ public:
void InvalidateFootnotePos();
void CollectEndnotes( SwLayouter* pLayouter );
- const SwSectionFormat* GetEndSectFormat() const
- { if( IsEndnAtEnd() ) return _GetEndSectFormat(); return nullptr; }
+ const SwSectionFormat* GetEndSectFormat() const {
+ if( IsEndnAtEnd() ) return _GetEndSectFormat();
+ return nullptr;
+ }
static void MoveContentAndDelete( SwSectionFrame* pDel, bool bSave );
diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx
index 38d1e75feed5..9c768ae12511 100644
--- a/sw/source/core/text/inftxt.cxx
+++ b/sw/source/core/text/inftxt.cxx
@@ -1258,9 +1258,15 @@ void SwTextPaintInfo::DrawViewOpt( const SwLinePortion &rPor,
bDraw = true;
}
break;
- case POR_TAB: if ( GetOpt().IsTab() ) bDraw = true; break;
- case POR_SOFTHYPH: if ( GetOpt().IsSoftHyph() )bDraw = true; break;
- case POR_BLANK: if ( GetOpt().IsHardBlank())bDraw = true; break;
+ case POR_TAB:
+ if ( GetOpt().IsTab() ) bDraw = true;
+ break;
+ case POR_SOFTHYPH:
+ if ( GetOpt().IsSoftHyph() )bDraw = true;
+ break;
+ case POR_BLANK:
+ if ( GetOpt().IsHardBlank())bDraw = true;
+ break;
default:
{
OSL_ENSURE( false, "SwTextPaintInfo::DrawViewOpt: don't know how to draw this" );
diff --git a/sw/source/core/text/inftxt.hxx b/sw/source/core/text/inftxt.hxx
index 2ffce5e372e1..3753bbdbb13f 100644
--- a/sw/source/core/text/inftxt.hxx
+++ b/sw/source/core/text/inftxt.hxx
@@ -254,8 +254,10 @@ public:
inline const SwViewOption &GetOpt() const { return *m_pOpt; }
inline const OUString &GetText() const { return *m_pText; }
- inline sal_Unicode GetChar( const sal_Int32 nPos ) const
- { if (m_pText && nPos < m_pText->getLength()) return (*m_pText)[ nPos ]; return 0; }
+ inline sal_Unicode GetChar( const sal_Int32 nPos ) const {
+ if (m_pText && nPos < m_pText->getLength()) return (*m_pText)[ nPos ];
+ return 0;
+ }
sal_uInt16 GetTextHeight() const;
diff --git a/sw/source/core/text/redlnitr.cxx b/sw/source/core/text/redlnitr.cxx
index d0f798ef50b4..bc174dad6420 100644
--- a/sw/source/core/text/redlnitr.cxx
+++ b/sw/source/core/text/redlnitr.cxx
@@ -104,9 +104,11 @@ void SwAttrIter::CtorInitAttrIter( SwTextNode& rTextNode, SwScriptInfo& rScrInf,
int nTmp = SW_SCRIPTS;
switch ( pScriptInfo->GetScriptType( nCnt++ ) ) {
case i18n::ScriptType::ASIAN :
- if( !aMagicNo[SW_CJK] ) nTmp = SW_CJK; break;
+ if( !aMagicNo[SW_CJK] ) nTmp = SW_CJK;
+ break;
case i18n::ScriptType::COMPLEX :
- if( !aMagicNo[SW_CTL] ) nTmp = SW_CTL; break;
+ if( !aMagicNo[SW_CTL] ) nTmp = SW_CTL;
+ break;
default:
if( !aMagicNo[SW_LATIN ] ) nTmp = SW_LATIN;
}
diff --git a/sw/source/core/text/redlnitr.hxx b/sw/source/core/text/redlnitr.hxx
index 43b6b65af3f3..a179a362dd54 100644
--- a/sw/source/core/text/redlnitr.hxx
+++ b/sw/source/core/text/redlnitr.hxx
@@ -75,10 +75,14 @@ class SwRedlineItr
void FillHints( sal_uInt16 nAuthor, RedlineType_t eType );
short _Seek( SwFont& rFnt, sal_Int32 nNew, sal_Int32 nOld );
sal_Int32 _GetNextRedln( sal_Int32 nNext );
- short EnterExtend( SwFont& rFnt, sal_Int32 nNew )
- { if( pExt ) return pExt->Enter( rFnt, nNew ); return 0; }
- sal_Int32 NextExtend( sal_Int32 nNext )
- { if( pExt ) return pExt->Next( nNext ); return nNext; }
+ short EnterExtend( SwFont& rFnt, sal_Int32 nNew ) {
+ if( pExt ) return pExt->Enter( rFnt, nNew );
+ return 0;
+ }
+ sal_Int32 NextExtend( sal_Int32 nNext ) {
+ if( pExt ) return pExt->Next( nNext );
+ return nNext;
+ }
public:
SwRedlineItr( const SwTextNode& rTextNd, SwFont& rFnt, SwAttrHandler& rAH,
sal_Int32 nRedlPos, bool bShw, const std::vector<sal_uInt16> *pArr = nullptr,
@@ -87,18 +91,25 @@ public:
inline bool IsOn() const { return bOn || ( pExt && pExt->IsOn() ); }
inline void Clear( SwFont* pFnt ) { if( bOn ) _Clear( pFnt ); }
void ChangeTextAttr( SwFont* pFnt, SwTextAttr &rHt, bool bChg );
- inline short Seek( SwFont& rFnt, sal_Int32 nNew, sal_Int32 nOld )
- { if( bShow || pExt ) return _Seek( rFnt, nNew, nOld ); return 0; }
+ inline short Seek( SwFont& rFnt, sal_Int32 nNew, sal_Int32 nOld ) {
+ if( bShow || pExt ) return _Seek( rFnt, nNew, nOld );
+ return 0;
+ }
inline void Reset() { if( nAct != nFirst ) nAct = COMPLETE_STRING;
if( pExt ) pExt->Reset(); }
- inline sal_Int32 GetNextRedln( sal_Int32 nNext )
- { if( bShow || pExt ) return _GetNextRedln( nNext ); return nNext; }
+ inline sal_Int32 GetNextRedln( sal_Int32 nNext ) {
+ if( bShow || pExt ) return _GetNextRedln( nNext );
+ return nNext;
+ }
inline bool ChkSpecialUnderline() const
{ return IsOn() && _ChkSpecialUnderline(); }
bool CheckLine( sal_Int32 nChkStart, sal_Int32 nChkEnd );
inline bool LeaveExtend( SwFont& rFnt, sal_Int32 nNew )
{ return pExt->Leave(rFnt, nNew ); }
- inline bool ExtOn() { if( pExt ) return pExt->IsOn(); return false; }
+ inline bool ExtOn() {
+ if( pExt ) return pExt->IsOn();
+ return false;
+ }
inline void UpdateExtFont( SwFont &rFnt ) {
OSL_ENSURE( ExtOn(), "UpdateExtFont without ExtOn" );
pExt->UpdateFont( rFnt ); }
diff --git a/sw/source/uibase/uiview/view0.cxx b/sw/source/uibase/uiview/view0.cxx
index 1218818e8109..77614df261d1 100644
--- a/sw/source/uibase/uiview/view0.cxx
+++ b/sw/source/uibase/uiview/view0.cxx
@@ -330,7 +330,8 @@ void SwView::StateViewOptions(SfxItemSet &rSet)
nWhich = 0;
}
else
- aBool.SetValue( IsHScrollbarVisible() ); break;
+ aBool.SetValue( IsHScrollbarVisible() );
+ break;
case FN_VSCROLLBAR:
aBool.SetValue( IsVScrollbarVisible() ); break;
case SID_AUTOSPELL_CHECK: