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

Takeshi Abe tabe at fixedpoint.jp
Sat Nov 16 14:24:11 PST 2013


 sw/inc/format.hxx                  |   16 +++++++---------
 sw/inc/frmfmt.hxx                  |    4 ++--
 sw/source/core/attr/format.cxx     |   24 ++++++++++++------------
 sw/source/core/inc/flyfrm.hxx      |    4 ++--
 sw/source/core/layout/atrfrm.cxx   |   14 +++++++-------
 sw/source/core/layout/paintfrm.cxx |   12 ++++++------
 sw/source/filter/html/htmlfldw.cxx |    6 +++---
 7 files changed, 39 insertions(+), 41 deletions(-)

New commits:
commit 11077cb75d0dcf1ebb25b12358776fde45a78eb4
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Sun Nov 17 07:21:50 2013 +0900

    undefining inline is just confusing
    
    Change-Id: I70b973a88944603077a06632c801e8211f9efbd9

diff --git a/sw/inc/format.hxx b/sw/inc/format.hxx
index a777f9f..e92f8e3 100644
--- a/sw/inc/format.hxx
+++ b/sw/inc/format.hxx
@@ -341,8 +341,6 @@ inline SfxItemState SwFmt::GetItemState( sal_uInt16 nWhich, sal_Bool bSrchInPare
     return aSet.GetItemState( nWhich, bSrchInParent, ppItem );
 }
 
-#undef inline
-
 #endif // INCLUDED_SW_INC_FORMAT_HXX
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 5c6bbe6a23b6b746dcbb20de1360b4745b1e4679
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Sun Nov 17 06:44:00 2013 +0900

    sal_Bool to bool
    
    Change-Id: I0b01f904f78ec1a3d1aebd2af2ae8f55588a504f

diff --git a/sw/inc/format.hxx b/sw/inc/format.hxx
index abea51a..a777f9f 100644
--- a/sw/inc/format.hxx
+++ b/sw/inc/format.hxx
@@ -46,10 +46,10 @@ class SW_DLLPUBLIC SwFmt : public SwModify
                                        (is not hard attribution!!!) */
     sal_uInt16 nPoolHelpId;       ///< HelpId for this Pool-style.
     sal_uInt8 nPoolHlpFileId;     ///< FilePos to Doc to these style helps.
-    sal_Bool   bWritten : 1;      ///< TRUE: already written.
+    bool   bWritten : 1;      ///< TRUE: already written.
     bool   bAutoFmt : 1;      /**< FALSE: it is a template.
                                        default is true! */
-    sal_Bool   bFmtInDTOR : 1;    /**< TRUE: Format becomes deleted. In order to be able
+    bool   bFmtInDTOR : 1;    /**< TRUE: Format becomes deleted. In order to be able
                                        to recognize this in FmtChg-message!! */
     sal_Bool   bAutoUpdateFmt : 1;/**< TRUE: Set attributes of a whole paragraph
                                        at format (UI-side!). */
@@ -101,7 +101,7 @@ public:
     virtual sal_uInt16 ResetAllFmtAttr();
 
     inline SwFmt* DerivedFrom() const { return (SwFmt*)GetRegisteredIn(); }
-    inline sal_Bool IsDefault() const { return DerivedFrom() == 0; }
+    inline bool IsDefault() const { return DerivedFrom() == 0; }
 
     inline OUString GetName() const   { return aFmtName; }
     void SetName( const OUString& rNewName, sal_Bool bBroadcast=sal_False );
@@ -152,7 +152,7 @@ public:
         { aSet.GetPresentation( ePres, eCoreMetric, ePresMetric, rText ); }
 
     /// Format-ID for reading/writing:
-    void   ResetWritten()    { bWritten = sal_False; }
+    void   ResetWritten()    { bWritten = false; }
 
     /// Query / set AutoFmt-flag.
     bool IsAuto() const                 { return bAutoFmt; }
@@ -168,7 +168,7 @@ public:
     sal_Bool IsAutoUpdateFmt() const                { return bAutoUpdateFmt; }
     void SetAutoUpdateFmt( sal_Bool bNew = sal_True )   { bAutoUpdateFmt = bNew; }
 
-    sal_Bool IsFmtInDTOR() const { return bFmtInDTOR; }
+    bool IsFmtInDTOR() const { return bFmtInDTOR; }
 
     /** GetMethods: Bool indicates whether to search only in Set (FALSE)
      or also in Parents.
@@ -306,7 +306,7 @@ public:
 
         @return false, default implementation
     */
-    virtual sal_Bool IsBackgroundTransparent() const;
+    virtual bool IsBackgroundTransparent() const;
 
     /** SwFmt::IsShadowTransparent
 
@@ -318,7 +318,7 @@ public:
 
         @return false, default implementation
     */
-    virtual sal_Bool IsShadowTransparent() const;
+    virtual bool IsShadowTransparent() const;
 };
 
 // --------------- inline Implementations ------------------------
diff --git a/sw/inc/frmfmt.hxx b/sw/inc/frmfmt.hxx
index 29436cb..aa86dce 100644
--- a/sw/inc/frmfmt.hxx
+++ b/sw/inc/frmfmt.hxx
@@ -191,7 +191,7 @@ public:
         @return true, if background color is transparent, but not "no fill"
         or a existing background graphic is transparent.
     */
-    virtual sal_Bool IsBackgroundTransparent() const;
+    virtual bool IsBackgroundTransparent() const;
 
     /** SwFlyFrmFmt::IsBackgroundBrushInherited
 
@@ -204,7 +204,7 @@ public:
 
         @return true, if background brush is "inherited" from parent/grandparent
     */
-    sal_Bool IsBackgroundBrushInherited() const;
+    bool IsBackgroundBrushInherited() const;
 
     const Point & GetLastFlyFrmPrtRectPos() const       { return m_aLastFlyFrmPrtRectPos; }
     void SetLastFlyFrmPrtRectPos( const Point &rPoint ) { m_aLastFlyFrmPrtRectPos = rPoint; }
diff --git a/sw/source/core/attr/format.cxx b/sw/source/core/attr/format.cxx
index d94f2d7..f7747e3 100644
--- a/sw/source/core/attr/format.cxx
+++ b/sw/source/core/attr/format.cxx
@@ -43,9 +43,9 @@ SwFmt::SwFmt( SwAttrPool& rPool, const sal_Char* pFmtNm,
     nPoolHelpId( USHRT_MAX ),
     nPoolHlpFileId( UCHAR_MAX )
 {
-    bWritten = bFmtInDTOR = bAutoUpdateFmt = sal_False; // LAYER_IMPL
-    bAutoFmt = sal_True;
-    bHidden = false;
+    bAutoUpdateFmt = sal_False; // LAYER_IMPL
+    bAutoFmt = true;
+    bWritten = bFmtInDTOR = bHidden = false;
 
     if( pDrvdFrm )
         aSet.SetParent( &pDrvdFrm->aSet );
@@ -62,9 +62,9 @@ SwFmt::SwFmt( SwAttrPool& rPool, const OUString& rFmtNm,
     nPoolHelpId( USHRT_MAX ),
     nPoolHlpFileId( UCHAR_MAX )
 {
-    bWritten = bFmtInDTOR = bAutoUpdateFmt = sal_False; // LAYER_IMPL
-    bAutoFmt = sal_True;
-    bHidden = false;
+    bAutoUpdateFmt = sal_False; // LAYER_IMPL
+    bAutoFmt = true;
+    bWritten = bFmtInDTOR = bHidden = false;
 
     if( pDrvdFrm )
         aSet.SetParent( &pDrvdFrm->aSet );
@@ -79,7 +79,7 @@ SwFmt::SwFmt( const SwFmt& rFmt )
     nPoolHelpId( rFmt.GetPoolHelpId() ),
     nPoolHlpFileId( rFmt.GetPoolHlpFileId() )
 {
-    bWritten = bFmtInDTOR = sal_False; // LAYER_IMPL
+    bWritten = bFmtInDTOR = false; // LAYER_IMPL
     bAutoFmt = rFmt.bAutoFmt;
     bHidden = rFmt.bHidden;
     bAutoUpdateFmt = rFmt.bAutoUpdateFmt;
@@ -219,7 +219,7 @@ SwFmt::~SwFmt()
     {
         OSL_ENSURE( DerivedFrom(), "SwFmt::~SwFmt: Def dependents!" );
 
-        bFmtInDTOR = sal_True;
+        bFmtInDTOR = true;
 
         SwFmt* pParentFmt = DerivedFrom();
         if( !pParentFmt )
@@ -577,9 +577,9 @@ void SwFmt::DelDiffs( const SfxItemSet& rSet )
 
     @return false, default implementation
 */
-sal_Bool SwFmt::IsBackgroundTransparent() const
+bool SwFmt::IsBackgroundTransparent() const
 {
-    return sal_False;
+    return false;
 }
 
 /** SwFmt::IsShadowTransparent
@@ -590,9 +590,9 @@ sal_Bool SwFmt::IsBackgroundTransparent() const
 
     @return false, default implementation
 */
-sal_Bool SwFmt::IsShadowTransparent() const
+bool SwFmt::IsShadowTransparent() const
 {
-    return sal_False;
+    return false;
 }
 
 /*
diff --git a/sw/source/core/inc/flyfrm.hxx b/sw/source/core/inc/flyfrm.hxx
index 5d94e6a..6157846 100644
--- a/sw/source/core/inc/flyfrm.hxx
+++ b/sw/source/core/inc/flyfrm.hxx
@@ -237,7 +237,7 @@ public:
         @return true, if background color is transparent or a existing background
         graphic is transparent.
     */
-    sal_Bool IsBackgroundTransparent() const;
+    bool IsBackgroundTransparent() const;
 
     /** SwFlyFrm::IsShadowTransparent
 
@@ -247,7 +247,7 @@ public:
 
         @return true, if shadow color is transparent.
     */
-    sal_Bool IsShadowTransparent() const;
+    bool IsShadowTransparent() const;
 
     void Chain( SwFrm* _pAnchor );
     void Unchain();
diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx
index 9da5139..4f482c5 100644
--- a/sw/source/core/layout/atrfrm.cxx
+++ b/sw/source/core/layout/atrfrm.cxx
@@ -2933,9 +2933,9 @@ OUString SwFlyFrmFmt::GetObjDescription() const
     @return true, if background color is transparent, but not "no fill"
     or the transparency of a existing background graphic is set.
 */
-sal_Bool SwFlyFrmFmt::IsBackgroundTransparent() const
+bool SwFlyFrmFmt::IsBackgroundTransparent() const
 {
-    sal_Bool bReturn = sal_False;
+    bool bReturn = false;
 
     /// NOTE: If background color is "no fill"/"auto fill" (COL_TRANSPARENT)
     ///     and there is no background graphic, it "inherites" the background
@@ -2944,7 +2944,7 @@ sal_Bool SwFlyFrmFmt::IsBackgroundTransparent() const
          (GetBackground().GetColor() != COL_TRANSPARENT)
        )
     {
-        bReturn = sal_True;
+        bReturn = true;
     }
     else
     {
@@ -2954,7 +2954,7 @@ sal_Bool SwFlyFrmFmt::IsBackgroundTransparent() const
              (pTmpGrf->GetAttr().GetTransparency() != 0)
            )
         {
-            bReturn = sal_True;
+            bReturn = true;
         }
     }
 
@@ -2973,14 +2973,14 @@ sal_Bool SwFlyFrmFmt::IsBackgroundTransparent() const
 
     @return true, if background brush is "inherited" from parent/grandparent
 */
-sal_Bool SwFlyFrmFmt::IsBackgroundBrushInherited() const
+bool SwFlyFrmFmt::IsBackgroundBrushInherited() const
 {
-    sal_Bool bReturn = sal_False;
+    bool bReturn = false;
 
     if ( (GetBackground().GetColor() == COL_TRANSPARENT) &&
          !(GetBackground().GetGraphicObject()) )
     {
-        bReturn = sal_True;
+        bReturn = true;
     }
 
     return bReturn;
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index 83c87aa..d5ae1c8 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -3760,9 +3760,9 @@ void SwPageFrm::PaintDecorators( ) const
 
     @return true, if background is transparent drawn.
 */
-sal_Bool SwFlyFrm::IsBackgroundTransparent() const
+bool SwFlyFrm::IsBackgroundTransparent() const
 {
-    sal_Bool bBackgroundTransparent = GetFmt()->IsBackgroundTransparent();
+    bool bBackgroundTransparent = GetFmt()->IsBackgroundTransparent();
     if ( !bBackgroundTransparent &&
          static_cast<const SwFlyFrmFmt*>(GetFmt())->IsBackgroundBrushInherited() )
     {
@@ -3777,14 +3777,14 @@ sal_Bool SwFlyFrm::IsBackgroundTransparent() const
                  (pSectionTOXColor->GetTransparency() != 0) &&
                  (pSectionTOXColor->GetColor() != COL_TRANSPARENT) )
             {
-                bBackgroundTransparent = sal_True;
+                bBackgroundTransparent = true;
             }
             else if ( pBackgrdBrush )
             {
                 if ( (pBackgrdBrush->GetColor().GetTransparency() != 0) &&
                      (pBackgrdBrush->GetColor() != COL_TRANSPARENT) )
                 {
-                    bBackgroundTransparent = sal_True;
+                    bBackgroundTransparent = true;
                 }
                 else
                 {
@@ -3794,7 +3794,7 @@ sal_Bool SwFlyFrm::IsBackgroundTransparent() const
                          (pTmpGrf->GetAttr().GetTransparency() != 0)
                        )
                     {
-                        bBackgroundTransparent = sal_True;
+                        bBackgroundTransparent = true;
                     }
                 }
             }
@@ -3814,7 +3814,7 @@ sal_Bool SwFlyFrm::IsBackgroundTransparent() const
 
     @return true, if shadow color is transparent.
 */
-sal_Bool SwFlyFrm::IsShadowTransparent() const
+bool SwFlyFrm::IsShadowTransparent() const
 {
     return GetFmt()->IsShadowTransparent();
 };
diff --git a/sw/source/filter/html/htmlfldw.cxx b/sw/source/filter/html/htmlfldw.cxx
index 3554732..4009363 100644
--- a/sw/source/filter/html/htmlfldw.cxx
+++ b/sw/source/filter/html/htmlfldw.cxx
@@ -462,7 +462,7 @@ Writer& OutHTML_SwFmtFld( Writer& rWrt, const SfxPoolItem& rHt )
         // Kommentare werden im ANSI-Zeichensetz, aber mit System-Zeilen-
         // Umbruechen gesschrieben.
         const OUString& rComment = pFld->GetPar2();
-        sal_Bool bWritten = sal_False;
+        bool bWritten = false;
 
         if( (rComment.getLength() >= 6 && rComment.startsWith("<") && rComment.endsWith(">") &&
              rComment.copy( 1, 4 ).equalsIgnoreAsciiCase( OOO_STRING_SVTOOLS_HTML_meta) ) ||
@@ -477,7 +477,7 @@ Writer& OutHTML_SwFmtFld( Writer& rWrt, const SfxPoolItem& rHt )
             OString sTmp(OUStringToOString(sComment,
                 ((SwHTMLWriter&)rWrt).eDestEnc));
             rWrt.Strm() << sTmp.getStr();
-            bWritten = sal_True;
+            bWritten = true;
         }
         else if( rComment.getLength() >= 7 &&
                  rComment.endsWith(">") &&
@@ -493,7 +493,7 @@ Writer& OutHTML_SwFmtFld( Writer& rWrt, const SfxPoolItem& rHt )
                 OString sTmp(OUStringToOString(sComment,
                     ((SwHTMLWriter&)rWrt).eDestEnc));
                 rWrt.Strm() << sTmp.getStr();
-                bWritten = sal_True;
+                bWritten = true;
             }
 
         }


More information about the Libreoffice-commits mailing list