[Libreoffice-commits] core.git: sw/source

Stephan Bergmann sbergman at redhat.com
Thu Jan 14 06:05:58 PST 2016


 sw/source/core/edit/autofmt.cxx   |   14 ++++++++++----
 sw/source/core/inc/sectfrm.hxx    |   12 ++++++++----
 sw/source/core/text/inftxt.cxx    |   12 +++++++++---
 sw/source/core/text/inftxt.hxx    |    6 ++++--
 sw/source/core/text/redlnitr.cxx  |    6 ++++--
 sw/source/core/text/redlnitr.hxx  |   29 ++++++++++++++++++++---------
 sw/source/uibase/uiview/view0.cxx |    3 ++-
 7 files changed, 57 insertions(+), 25 deletions(-)

New commits:
commit 57e0ab0c3a82ad4a957ea97c15f8672fad4a1880
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Jan 14 15:05:31 2016 +0100

    -Werror=misleading-indentation (GCC 6)
    
    Change-Id: I5c5f38789e7001aa04a0a5481feb9f033e53748e

diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx
index c6c35cf..2c1c57d 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 395f18c..4184cb7 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 38d1e75..9c768ae 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 2ffce5e..3753bbd 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 d0f798e..bc174da 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 43b6b65..a179a36 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 1218818..77614df 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:


More information about the Libreoffice-commits mailing list