[Libreoffice-commits] .: 2 commits - sw/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Sat Dec 22 07:14:02 PST 2012


 sw/source/filter/html/htmlatr.cxx |    8 ++++----
 sw/source/filter/html/wrthtml.cxx |   28 ++++++++++++++--------------
 sw/source/filter/html/wrthtml.hxx |   14 +++++++-------
 sw/source/filter/inc/fltshell.hxx |   10 +++++-----
 sw/source/filter/inc/msfilter.hxx |    2 --
 5 files changed, 30 insertions(+), 32 deletions(-)

New commits:
commit 2b3c23c8a030a5df5c54812ebbb961068d76a4dc
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Sun Dec 23 00:13:04 2012 +0900

    Drop unused #define
    
    Change-Id: Id432bec2ad19b0ff71135cbe65f6e8ba42bf036d

diff --git a/sw/source/filter/inc/msfilter.hxx b/sw/source/filter/inc/msfilter.hxx
index 65cc4ec..1f807c02 100644
--- a/sw/source/filter/inc/msfilter.hxx
+++ b/sw/source/filter/inc/msfilter.hxx
@@ -36,8 +36,6 @@
 
 #include <boost/noncopyable.hpp>
 
-#define CREATE_CONST_ASC(s) String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM(s))
-
 class SwDoc;
 class SwPaM;
 class String;
commit ac0f9d3214c25cd0086fd69c45a0ce922a2b950c
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Sun Dec 23 00:04:13 2012 +0900

    sal_Bool to bool
    
    Change-Id: I25394e009009ae9c111e929d493eb949c042e1bc

diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx
index 99186e7..7bd1af6 100644
--- a/sw/source/filter/html/htmlatr.cxx
+++ b/sw/source/filter/html/htmlatr.cxx
@@ -255,7 +255,7 @@ SwHTMLFmtInfo::SwHTMLFmtInfo( const SwFmt *pF, SwDoc *pDoc, SwDoc *pTemplate,
                               sal_Bool bOutStyles,
                               LanguageType eDfltLang,
                               sal_uInt16 nCSS1Script, sal_Bool bHardDrop ) :
-    pFmt( pF ), pRefFmt(0), pItemSet( 0 ), bScriptDependent( sal_False )
+    pFmt( pF ), pRefFmt(0), pItemSet( 0 ), bScriptDependent( false )
 {
     sal_uInt16 nRefPoolId = 0;
     // Den Selektor des Formats holen
@@ -556,7 +556,7 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt,
         rHWrt.aTxtCollInfos.insert( pFmtInfo );
         String aName( rFmt.GetName() );
         if( 0 != rHWrt.aScriptParaStyles.count( aName ) )
-            ((SwHTMLFmtInfo *)pFmtInfo)->bScriptDependent = sal_True;
+            ((SwHTMLFmtInfo *)pFmtInfo)->bScriptDependent = true;
     }
 
     // Jetzt wird festgelegt, was aufgrund des Tokens so moeglich ist
@@ -1656,7 +1656,7 @@ const SwHTMLFmtInfo *HTMLEndPosLst::GetFmtInfo( const SwFmt& rFmt,
         rFmtInfos.insert( pFmtInfo );
         String aName( rFmt.GetName() );
         if( 0 != rScriptTxtStyles.count( aName ) )
-            ((SwHTMLFmtInfo *)pFmtInfo)->bScriptDependent = sal_True;
+            ((SwHTMLFmtInfo *)pFmtInfo)->bScriptDependent = true;
     }
 
     return pFmtInfo;
@@ -2943,7 +2943,7 @@ Writer& OutHTML_INetFmt( Writer& rWrt, const SwFmtINetFmt& rINetFmt, sal_Bool bO
     rtl::OStringBuffer sOut;
     sOut.append('<').append(OOO_STRING_SVTOOLS_HTML_anchor);
 
-    sal_Bool bScriptDependent = sal_False;
+    bool bScriptDependent = false;
     {
         const SwCharFmt* pFmt = rWrt.pDoc->GetCharFmtFromPool(
                  RES_POOLCHR_INET_NORMAL );
diff --git a/sw/source/filter/html/wrthtml.cxx b/sw/source/filter/html/wrthtml.cxx
index 470f2ca..f0558d0 100644
--- a/sw/source/filter/html/wrthtml.cxx
+++ b/sw/source/filter/html/wrthtml.cxx
@@ -487,9 +487,9 @@ static const SwFmtCol *lcl_html_GetFmtCol( const SwHTMLWriter& rHTMLWrt,
     return pCol;
 }
 
-static sal_Bool lcl_html_IsMultiColStart( const SwHTMLWriter& rHTMLWrt, sal_uLong nIndex )
+static bool lcl_html_IsMultiColStart( const SwHTMLWriter& rHTMLWrt, sal_uLong nIndex )
 {
-    sal_Bool bRet = sal_False;
+    bool bRet = false;
     const SwSectionNode *pSectNd =
         rHTMLWrt.pDoc->GetNodes()[nIndex]->GetSectionNode();
     if( pSectNd )
@@ -497,15 +497,15 @@ static sal_Bool lcl_html_IsMultiColStart( const SwHTMLWriter& rHTMLWrt, sal_uLon
         const SwSection& rSection = pSectNd->GetSection();
         const SwSectionFmt *pFmt = rSection.GetFmt();
         if( pFmt && lcl_html_GetFmtCol( rHTMLWrt, rSection, *pFmt ) )
-            bRet = sal_True;
+            bRet = true;
     }
 
     return bRet;
 }
 
-static sal_Bool lcl_html_IsMultiColEnd( const SwHTMLWriter& rHTMLWrt, sal_uLong nIndex )
+static bool lcl_html_IsMultiColEnd( const SwHTMLWriter& rHTMLWrt, sal_uLong nIndex )
 {
-    sal_Bool bRet = sal_False;
+    bool bRet = false;
     const SwEndNode *pEndNd = rHTMLWrt.pDoc->GetNodes()[nIndex]->GetEndNode();
     if( pEndNd )
         bRet = lcl_html_IsMultiColStart( rHTMLWrt,
@@ -519,7 +519,7 @@ static void lcl_html_OutSectionStartTag( SwHTMLWriter& rHTMLWrt,
                                      const SwSection& rSection,
                                      const SwSectionFmt& rFmt,
                                   const SwFmtCol *pCol,
-                                  sal_Bool bContinued=sal_False )
+                                  bool bContinued=false )
 {
     OSL_ENSURE( pCol || !bContinued, "Continuation of DIV" );
 
@@ -558,7 +558,7 @@ static void lcl_html_OutSectionStartTag( SwHTMLWriter& rHTMLWrt,
 
         String aEncURL( URIHelper::simpleNormalizedMakeRelative(rHTMLWrt.GetBaseURL(), aURL ) );
         sal_Unicode cDelim = 255U;
-        sal_Bool bURLContainsDelim =
+        bool bURLContainsDelim =
             (STRING_NOTFOUND != aEncURL.Search( cDelim ) );
 
         HTMLOutFuncs::Out_String( rHTMLWrt.Strm(), aEncURL,
@@ -651,8 +651,8 @@ static Writer& OutHTML_Section( Writer& rWrt, const SwSectionNode& rSectNd )
     const SwSectionFmt *pFmt = rSection.GetFmt();
     OSL_ENSURE( pFmt, "Section without a format?" );
 
-    sal_Bool bStartTag = sal_True;
-    sal_Bool bEndTag = sal_True;
+    bool bStartTag = true;
+    bool bEndTag = true;
     const SwSectionFmt *pSurrFmt = 0;
     const SwSectionNode *pSurrSectNd = 0;
     const SwSection *pSurrSection = 0;
@@ -666,11 +666,11 @@ static Writer& OutHTML_Section( Writer& rWrt, const SwSectionNode& rSectNd )
         // If the next node is a columned section node, too, don't export
         // an empty section.
         if( lcl_html_IsMultiColStart( rHTMLWrt, nSectSttIdx+1 ) )
-            bStartTag = sal_False;
+            bStartTag = false;
 
         // The same applies if the section end with another columned section.
         if( lcl_html_IsMultiColEnd( rHTMLWrt, nSectEndIdx-1 ) )
-            bEndTag = sal_False;
+            bEndTag = false;
 
         //.is there a columned section arround this one?
         const SwStartNode *pSttNd = rSectNd.StartOfSectionNode();
@@ -722,7 +722,7 @@ static Writer& OutHTML_Section( Writer& rWrt, const SwSectionNode& rSectNd )
         pSurrSectNd->EndOfSectionIndex() - nSectEndIdx > 1 &&
         !lcl_html_IsMultiColStart( rHTMLWrt, nSectEndIdx+1 ) )
         lcl_html_OutSectionStartTag( rHTMLWrt, *pSurrSection, *pSurrFmt,
-                                     pSurrCol, sal_True );
+                                     pSurrCol, true );
 
     return rWrt;
 }
@@ -813,9 +813,9 @@ static void OutBodyColor( const sal_Char *pTag, const SwFmt *pFmt,
 
     const SfxItemSet& rItemSet = pFmt->GetAttrSet();
     const SfxPoolItem *pRefItem = 0, *pItem = 0;
-    sal_Bool bItemSet = SFX_ITEM_SET == rItemSet.GetItemState( RES_CHRATR_COLOR,
+    bool bItemSet = SFX_ITEM_SET == rItemSet.GetItemState( RES_CHRATR_COLOR,
                                                            sal_True, &pItem);
-    sal_Bool bRefItemSet = pRefFmt &&
+    bool bRefItemSet = pRefFmt &&
         SFX_ITEM_SET == pRefFmt->GetAttrSet().GetItemState( RES_CHRATR_COLOR,
                                                             sal_True, &pRefItem);
     if( bItemSet )
diff --git a/sw/source/filter/html/wrthtml.hxx b/sw/source/filter/html/wrthtml.hxx
index 0cb14df..8b77193 100644
--- a/sw/source/filter/html/wrthtml.hxx
+++ b/sw/source/filter/html/wrthtml.hxx
@@ -230,7 +230,7 @@ struct SwHTMLFmtInfo
     sal_uInt16 nTopMargin;
     sal_uInt16 nBottomMargin;
 
-    sal_Bool bScriptDependent;
+    bool bScriptDependent;
 
     // Konstruktor fuer einen Dummy zum Suchen
     SwHTMLFmtInfo( const SwFmt *pF ) :
@@ -245,13 +245,13 @@ struct SwHTMLFmtInfo
                    sal_Bool bHardDrop=sal_False );
     ~SwHTMLFmtInfo();
 
-    friend sal_Bool operator==( const SwHTMLFmtInfo& rInfo1,
+    friend bool operator==( const SwHTMLFmtInfo& rInfo1,
                             const SwHTMLFmtInfo& rInfo2 )
     {
         return (long)rInfo1.pFmt == (long)rInfo2.pFmt;
     }
 
-    friend sal_Bool operator<( const SwHTMLFmtInfo& rInfo1,
+    friend bool operator<( const SwHTMLFmtInfo& rInfo1,
                             const SwHTMLFmtInfo& rInfo2 )
     {
         return (long)rInfo1.pFmt < (long)rInfo2.pFmt;
@@ -544,8 +544,8 @@ public:
     sal_uInt32 GetHTMLMode() const { return nHTMLMode; }
     sal_Bool IsHTMLMode( sal_uInt32 nMode ) const { return (nHTMLMode & nMode) != 0; }
 
-    inline sal_Bool IsCSS1Source( sal_uInt16 n ) const;
-    inline sal_Bool IsCSS1Script( sal_uInt16 n ) const;
+    inline bool IsCSS1Source( sal_uInt16 n ) const;
+    inline bool IsCSS1Script( sal_uInt16 n ) const;
 
     static const sal_Char *GetNumFormat( sal_uInt16 nFmt );
     static void PrepareFontList( const SvxFontItem& rFontItem, String& rNames,
@@ -556,12 +556,12 @@ public:
     FieldUnit GetCSS1Unit() const { return eCSS1Unit; }
 };
 
-inline sal_Bool SwHTMLWriter::IsCSS1Source( sal_uInt16 n ) const
+inline bool SwHTMLWriter::IsCSS1Source( sal_uInt16 n ) const
 {
     return n == (nCSS1OutMode & CSS1_OUTMODE_SOURCE);
 }
 
-inline sal_Bool SwHTMLWriter::IsCSS1Script( sal_uInt16 n ) const
+inline bool SwHTMLWriter::IsCSS1Script( sal_uInt16 n ) const
 {
     sal_uInt16 nScript = (nCSS1OutMode & CSS1_OUTMODE_SCRIPT);
     return CSS1_OUTMODE_ANY_SCRIPT == nScript || n == nScript;
diff --git a/sw/source/filter/inc/fltshell.hxx b/sw/source/filter/inc/fltshell.hxx
index 55ea8e4..8422ab8 100644
--- a/sw/source/filter/inc/fltshell.hxx
+++ b/sw/source/filter/inc/fltshell.hxx
@@ -52,7 +52,7 @@ inline void SwFltClearFlag(sal_uLong& rFieldFlags, int no)
 inline void SwFltSetFlag(sal_uLong& rFieldFlags, int no)
     { rFieldFlags |= 1L << no; }
 
-inline sal_Bool SwFltGetFlag(sal_uLong nFieldFlags, int no)
+inline bool SwFltGetFlag(sal_uLong nFieldFlags, int no)
     { return (nFieldFlags & (1L << no)) != 0; }
 
 //Subvert the Node/Content system to get positions which don't update as
@@ -134,7 +134,7 @@ class SW_DLLPUBLIC SwFltControlStack : private ::boost::noncopyable
 
 protected:
     SwDoc* pDoc;
-    sal_Bool bIsEndStack;
+    bool bIsEndStack;
 
     void MoveAttrs( const SwPosition&  rPos );
     virtual void SetAttrInDoc(const SwPosition& rTmpPos, SwFltStackEntry& rEntry);
@@ -156,7 +156,7 @@ public:
     SwFltControlStack(SwDoc* pDo, sal_uLong nFieldFl);
     virtual ~SwFltControlStack();
 
-    sal_Bool IsFlagSet(Flags no) const  { return ::SwFltGetFlag(nFieldFlags, no);}
+    bool IsFlagSet(Flags no) const  { return ::SwFltGetFlag(nFieldFlags, no);}
 
     void NewAttr(const SwPosition& rPos, const SfxPoolItem & rAttr );
 
@@ -313,7 +313,7 @@ public:
     SwFltEndStack(SwDoc* pDo, sal_uLong nFieldFl)
         :SwFltControlStack(pDo, nFieldFl)
     {
-        bIsEndStack = sal_True;
+        bIsEndStack = true;
     }
 };
 
@@ -640,7 +640,7 @@ public:
         eSubMode = None;
     }
 
-    sal_Bool IsFlagSet(SwFltControlStack::Flags no) const
+    bool IsFlagSet(SwFltControlStack::Flags no) const
         { return aStack.IsFlagSet(no); }
     void ConvertUStr( String& rInOut );
     OUString QuoteStr( const OUString& rIn );


More information about the Libreoffice-commits mailing list