[Libreoffice-commits] .: 4 commits - sc/inc sc/source

Eike Rathke erack at kemper.freedesktop.org
Thu Nov 10 06:55:14 PST 2011


 sc/inc/attarray.hxx              |   66 ++++++------
 sc/inc/attrib.hxx                |   48 ++++-----
 sc/inc/patattr.hxx               |    8 -
 sc/source/core/data/attarray.cxx |  202 +++++++++++++++++++-------------------
 sc/source/core/data/attrib.cxx   |   60 +++++------
 sc/source/core/data/patattr.cxx  |  205 +++++++++++++++++++--------------------
 sc/source/ui/view/viewfunc.cxx   |    4 
 7 files changed, 298 insertions(+), 295 deletions(-)

New commits:
commit 7fd62379668b455c0581fbb757c0f1518e6b7286
Author: Eike Rathke <erack at redhat.com>
Date:   Thu Nov 10 15:54:13 2011 +0100

    sal_Bool to bool

diff --git a/sc/inc/patattr.hxx b/sc/inc/patattr.hxx
index 78d1fd9..f42b7e4 100644
--- a/sc/inc/patattr.hxx
+++ b/sc/inc/patattr.hxx
@@ -83,7 +83,7 @@ public:
     const SfxPoolItem&      GetItem( sal_uInt16 nWhich, const SfxItemSet* pCondSet ) const;
 
                             // pWhich are no ranges, but single IDs, 0-terminated
-    sal_Bool                    HasItemsSet( const sal_uInt16* pWhich ) const;
+    bool                    HasItemsSet( const sal_uInt16* pWhich ) const;
     void                    ClearItems( const sal_uInt16* pWhich );
 
     void                    DeleteUnchanged( const ScPatternAttr* pOldAttrs );
@@ -127,12 +127,12 @@ public:
     void                    UpdateStyleSheet();
     void                    StyleToName();
 
-    sal_Bool                    IsVisible() const;
-    sal_Bool                    IsVisibleEqual( const ScPatternAttr& rOther ) const;
+    bool                    IsVisible() const;
+    bool                    IsVisibleEqual( const ScPatternAttr& rOther ) const;
 
                             /** If font is an old symbol font StarBats/StarMath
                                 with text encoding RTL_TEXTENC_SYMBOL */
-    sal_Bool                    IsSymbolFont() const;
+    bool                    IsSymbolFont() const;
 
     sal_uLong                   GetNumberFormat( SvNumberFormatter* ) const;
     sal_uLong                   GetNumberFormat( SvNumberFormatter* pFormatter,
diff --git a/sc/source/core/data/patattr.cxx b/sc/source/core/data/patattr.cxx
index 71dcc57..838d82f 100644
--- a/sc/source/core/data/patattr.cxx
+++ b/sc/source/core/data/patattr.cxx
@@ -127,7 +127,7 @@ ScPatternAttr::~ScPatternAttr()
 
 SfxPoolItem* ScPatternAttr::Clone( SfxItemPool *pPool ) const
 {
-    ScPatternAttr* pPattern = new ScPatternAttr( GetItemSet().Clone(sal_True, pPool) );
+    ScPatternAttr* pPattern = new ScPatternAttr( GetItemSet().Clone(true, pPool) );
 
     pPattern->pStyle = pStyle;
     pPattern->pName  = pName ? new String(*pName) : NULL;
@@ -137,7 +137,7 @@ SfxPoolItem* ScPatternAttr::Clone( SfxItemPool *pPool ) const
 
 inline int StrCmp( const String* pStr1, const String* pStr2 )
 {
-    return ( pStr1 ? ( pStr2 ? ( *pStr1 == *pStr2 ) : false ) : ( pStr2 ? false : sal_True ) );
+    return ( pStr1 ? ( pStr2 ? ( *pStr1 == *pStr2 ) : false ) : ( pStr2 ? false : true ) );
 }
 
 inline bool EqualPatternSets( const SfxItemSet& rSet1, const SfxItemSet& rSet2 )
@@ -249,10 +249,10 @@ void ScPatternAttr::GetFont(
     FontItalic eItalic;
     FontUnderline eUnder;
     FontUnderline eOver;
-    sal_Bool bWordLine;
+    bool bWordLine;
     FontStrikeout eStrike;
-    sal_Bool bOutline;
-    sal_Bool bShadow;
+    bool bOutline;
+    bool bShadow;
     FontEmphasisMark eEmphasis;
     FontRelief eRelief;
     Color aColor;
@@ -288,59 +288,59 @@ void ScPatternAttr::GetFont(
     {
         const SfxPoolItem* pItem;
 
-        if ( pCondSet->GetItemState( nFontId, sal_True, &pItem ) != SFX_ITEM_SET )
+        if ( pCondSet->GetItemState( nFontId, true, &pItem ) != SFX_ITEM_SET )
             pItem = &rItemSet.Get( nFontId );
         pFontAttr = (const SvxFontItem*) pItem;
 
-        if ( pCondSet->GetItemState( nHeightId, sal_True, &pItem ) != SFX_ITEM_SET )
+        if ( pCondSet->GetItemState( nHeightId, true, &pItem ) != SFX_ITEM_SET )
             pItem = &rItemSet.Get( nHeightId );
         nFontHeight = ((const SvxFontHeightItem*)pItem)->GetHeight();
 
-        if ( pCondSet->GetItemState( nWeightId, sal_True, &pItem ) != SFX_ITEM_SET )
+        if ( pCondSet->GetItemState( nWeightId, true, &pItem ) != SFX_ITEM_SET )
             pItem = &rItemSet.Get( nWeightId );
         eWeight = (FontWeight)((const SvxWeightItem*)pItem)->GetValue();
 
-        if ( pCondSet->GetItemState( nPostureId, sal_True, &pItem ) != SFX_ITEM_SET )
+        if ( pCondSet->GetItemState( nPostureId, true, &pItem ) != SFX_ITEM_SET )
             pItem = &rItemSet.Get( nPostureId );
         eItalic = (FontItalic)((const SvxPostureItem*)pItem)->GetValue();
 
-        if ( pCondSet->GetItemState( ATTR_FONT_UNDERLINE, sal_True, &pItem ) != SFX_ITEM_SET )
+        if ( pCondSet->GetItemState( ATTR_FONT_UNDERLINE, true, &pItem ) != SFX_ITEM_SET )
             pItem = &rItemSet.Get( ATTR_FONT_UNDERLINE );
         eUnder = (FontUnderline)((const SvxUnderlineItem*)pItem)->GetValue();
 
-        if ( pCondSet->GetItemState( ATTR_FONT_OVERLINE, sal_True, &pItem ) != SFX_ITEM_SET )
+        if ( pCondSet->GetItemState( ATTR_FONT_OVERLINE, true, &pItem ) != SFX_ITEM_SET )
             pItem = &rItemSet.Get( ATTR_FONT_OVERLINE );
         eOver = (FontUnderline)((const SvxOverlineItem*)pItem)->GetValue();
 
-        if ( pCondSet->GetItemState( ATTR_FONT_WORDLINE, sal_True, &pItem ) != SFX_ITEM_SET )
+        if ( pCondSet->GetItemState( ATTR_FONT_WORDLINE, true, &pItem ) != SFX_ITEM_SET )
             pItem = &rItemSet.Get( ATTR_FONT_WORDLINE );
         bWordLine = ((const SvxWordLineModeItem*)pItem)->GetValue();
 
-        if ( pCondSet->GetItemState( ATTR_FONT_CROSSEDOUT, sal_True, &pItem ) != SFX_ITEM_SET )
+        if ( pCondSet->GetItemState( ATTR_FONT_CROSSEDOUT, true, &pItem ) != SFX_ITEM_SET )
             pItem = &rItemSet.Get( ATTR_FONT_CROSSEDOUT );
         eStrike = (FontStrikeout)((const SvxCrossedOutItem*)pItem)->GetValue();
 
-        if ( pCondSet->GetItemState( ATTR_FONT_CONTOUR, sal_True, &pItem ) != SFX_ITEM_SET )
+        if ( pCondSet->GetItemState( ATTR_FONT_CONTOUR, true, &pItem ) != SFX_ITEM_SET )
             pItem = &rItemSet.Get( ATTR_FONT_CONTOUR );
         bOutline = ((const SvxContourItem*)pItem)->GetValue();
 
-        if ( pCondSet->GetItemState( ATTR_FONT_SHADOWED, sal_True, &pItem ) != SFX_ITEM_SET )
+        if ( pCondSet->GetItemState( ATTR_FONT_SHADOWED, true, &pItem ) != SFX_ITEM_SET )
             pItem = &rItemSet.Get( ATTR_FONT_SHADOWED );
         bShadow = ((const SvxShadowedItem*)pItem)->GetValue();
 
-        if ( pCondSet->GetItemState( ATTR_FONT_EMPHASISMARK, sal_True, &pItem ) != SFX_ITEM_SET )
+        if ( pCondSet->GetItemState( ATTR_FONT_EMPHASISMARK, true, &pItem ) != SFX_ITEM_SET )
             pItem = &rItemSet.Get( ATTR_FONT_EMPHASISMARK );
         eEmphasis = ((const SvxEmphasisMarkItem*)pItem)->GetEmphasisMark();
 
-        if ( pCondSet->GetItemState( ATTR_FONT_RELIEF, sal_True, &pItem ) != SFX_ITEM_SET )
+        if ( pCondSet->GetItemState( ATTR_FONT_RELIEF, true, &pItem ) != SFX_ITEM_SET )
             pItem = &rItemSet.Get( ATTR_FONT_RELIEF );
         eRelief = (FontRelief)((const SvxCharReliefItem*)pItem)->GetValue();
 
-        if ( pCondSet->GetItemState( ATTR_FONT_COLOR, sal_True, &pItem ) != SFX_ITEM_SET )
+        if ( pCondSet->GetItemState( ATTR_FONT_COLOR, true, &pItem ) != SFX_ITEM_SET )
             pItem = &rItemSet.Get( ATTR_FONT_COLOR );
         aColor = ((const SvxColorItem*)pItem)->GetValue();
 
-        if ( pCondSet->GetItemState( nLangId, sal_True, &pItem ) != SFX_ITEM_SET )
+        if ( pCondSet->GetItemState( nLangId, true, &pItem ) != SFX_ITEM_SET )
             pItem = &rItemSet.Get( nLangId );
         eLang = ((const SvxLanguageItem*)pItem)->GetLanguage();
     }
@@ -433,7 +433,7 @@ void ScPatternAttr::GetFont(
             if ( pCondSet )
             {
                 const SfxPoolItem* pItem;
-                if ( pCondSet->GetItemState( ATTR_BACKGROUND, sal_True, &pItem ) != SFX_ITEM_SET )
+                if ( pCondSet->GetItemState( ATTR_BACKGROUND, true, &pItem ) != SFX_ITEM_SET )
                     pItem = &rItemSet.Get( ATTR_BACKGROUND );
                 aBackColor = ((const SvxBrushItem*)pItem)->GetColor();
             }
@@ -498,7 +498,7 @@ void ScPatternAttr::GetFont(
     rFont.SetEmphasisMark( eEmphasis );
     rFont.SetRelief( eRelief );
     rFont.SetColor( aColor );
-    rFont.SetTransparent( sal_True );
+    rFont.SetTransparent( true );
 }
 
 void ScPatternAttr::GetFont(
@@ -523,16 +523,16 @@ void ScPatternAttr::FillToEditItemSet( SfxItemSet& rEditSet, const SfxItemSet& r
     FontWeight      eWeight, eCjkWeight, eCtlWeight;
     SvxUnderlineItem aUnderlineItem(UNDERLINE_NONE, EE_CHAR_UNDERLINE);
     SvxOverlineItem aOverlineItem(UNDERLINE_NONE, EE_CHAR_OVERLINE);
-    sal_Bool            bWordLine;
+    bool            bWordLine;
     FontStrikeout   eStrike;
     FontItalic      eItalic, eCjkItalic, eCtlItalic;
-    sal_Bool            bOutline;
-    sal_Bool            bShadow;
-    sal_Bool            bForbidden;
+    bool            bOutline;
+    bool            bShadow;
+    bool            bForbidden;
     FontEmphasisMark eEmphasis;
     FontRelief      eRelief;
     LanguageType    eLang, eCjkLang, eCtlLang;
-    sal_Bool            bHyphenate;
+    bool            bHyphenate;
     SvxFrameDirection eDirection;
 
     //! additional parameter to control if language is needed?
@@ -541,100 +541,100 @@ void ScPatternAttr::FillToEditItemSet( SfxItemSet& rEditSet, const SfxItemSet& r
     {
         const SfxPoolItem* pItem;
 
-        if ( pCondSet->GetItemState( ATTR_FONT_COLOR, sal_True, &pItem ) != SFX_ITEM_SET )
+        if ( pCondSet->GetItemState( ATTR_FONT_COLOR, true, &pItem ) != SFX_ITEM_SET )
             pItem = &rSrcSet.Get( ATTR_FONT_COLOR );
         aColorItem = *(const SvxColorItem*)pItem;
 
-        if ( pCondSet->GetItemState( ATTR_FONT, sal_True, &pItem ) != SFX_ITEM_SET )
+        if ( pCondSet->GetItemState( ATTR_FONT, true, &pItem ) != SFX_ITEM_SET )
             pItem = &rSrcSet.Get( ATTR_FONT );
         aFontItem = *(const SvxFontItem*)pItem;
-        if ( pCondSet->GetItemState( ATTR_CJK_FONT, sal_True, &pItem ) != SFX_ITEM_SET )
+        if ( pCondSet->GetItemState( ATTR_CJK_FONT, true, &pItem ) != SFX_ITEM_SET )
             pItem = &rSrcSet.Get( ATTR_CJK_FONT );
         aCjkFontItem = *(const SvxFontItem*)pItem;
-        if ( pCondSet->GetItemState( ATTR_CTL_FONT, sal_True, &pItem ) != SFX_ITEM_SET )
+        if ( pCondSet->GetItemState( ATTR_CTL_FONT, true, &pItem ) != SFX_ITEM_SET )
             pItem = &rSrcSet.Get( ATTR_CTL_FONT );
         aCtlFontItem = *(const SvxFontItem*)pItem;
 
-        if ( pCondSet->GetItemState( ATTR_FONT_HEIGHT, sal_True, &pItem ) != SFX_ITEM_SET )
+        if ( pCondSet->GetItemState( ATTR_FONT_HEIGHT, true, &pItem ) != SFX_ITEM_SET )
             pItem = &rSrcSet.Get( ATTR_FONT_HEIGHT );
         nTHeight = ((const SvxFontHeightItem*)pItem)->GetHeight();
-        if ( pCondSet->GetItemState( ATTR_CJK_FONT_HEIGHT, sal_True, &pItem ) != SFX_ITEM_SET )
+        if ( pCondSet->GetItemState( ATTR_CJK_FONT_HEIGHT, true, &pItem ) != SFX_ITEM_SET )
             pItem = &rSrcSet.Get( ATTR_CJK_FONT_HEIGHT );
         nCjkTHeight = ((const SvxFontHeightItem*)pItem)->GetHeight();
-        if ( pCondSet->GetItemState( ATTR_CTL_FONT_HEIGHT, sal_True, &pItem ) != SFX_ITEM_SET )
+        if ( pCondSet->GetItemState( ATTR_CTL_FONT_HEIGHT, true, &pItem ) != SFX_ITEM_SET )
             pItem = &rSrcSet.Get( ATTR_CTL_FONT_HEIGHT );
         nCtlTHeight = ((const SvxFontHeightItem*)pItem)->GetHeight();
 
-        if ( pCondSet->GetItemState( ATTR_FONT_WEIGHT, sal_True, &pItem ) != SFX_ITEM_SET )
+        if ( pCondSet->GetItemState( ATTR_FONT_WEIGHT, true, &pItem ) != SFX_ITEM_SET )
             pItem = &rSrcSet.Get( ATTR_FONT_WEIGHT );
         eWeight = (FontWeight)((const SvxWeightItem*)pItem)->GetValue();
-        if ( pCondSet->GetItemState( ATTR_CJK_FONT_WEIGHT, sal_True, &pItem ) != SFX_ITEM_SET )
+        if ( pCondSet->GetItemState( ATTR_CJK_FONT_WEIGHT, true, &pItem ) != SFX_ITEM_SET )
             pItem = &rSrcSet.Get( ATTR_CJK_FONT_WEIGHT );
         eCjkWeight = (FontWeight)((const SvxWeightItem*)pItem)->GetValue();
-        if ( pCondSet->GetItemState( ATTR_CTL_FONT_WEIGHT, sal_True, &pItem ) != SFX_ITEM_SET )
+        if ( pCondSet->GetItemState( ATTR_CTL_FONT_WEIGHT, true, &pItem ) != SFX_ITEM_SET )
             pItem = &rSrcSet.Get( ATTR_CTL_FONT_WEIGHT );
         eCtlWeight = (FontWeight)((const SvxWeightItem*)pItem)->GetValue();
 
-        if ( pCondSet->GetItemState( ATTR_FONT_POSTURE, sal_True, &pItem ) != SFX_ITEM_SET )
+        if ( pCondSet->GetItemState( ATTR_FONT_POSTURE, true, &pItem ) != SFX_ITEM_SET )
             pItem = &rSrcSet.Get( ATTR_FONT_POSTURE );
         eItalic = (FontItalic)((const SvxPostureItem*)pItem)->GetValue();
-        if ( pCondSet->GetItemState( ATTR_CJK_FONT_POSTURE, sal_True, &pItem ) != SFX_ITEM_SET )
+        if ( pCondSet->GetItemState( ATTR_CJK_FONT_POSTURE, true, &pItem ) != SFX_ITEM_SET )
             pItem = &rSrcSet.Get( ATTR_CJK_FONT_POSTURE );
         eCjkItalic = (FontItalic)((const SvxPostureItem*)pItem)->GetValue();
-        if ( pCondSet->GetItemState( ATTR_CTL_FONT_POSTURE, sal_True, &pItem ) != SFX_ITEM_SET )
+        if ( pCondSet->GetItemState( ATTR_CTL_FONT_POSTURE, true, &pItem ) != SFX_ITEM_SET )
             pItem = &rSrcSet.Get( ATTR_CTL_FONT_POSTURE );
         eCtlItalic = (FontItalic)((const SvxPostureItem*)pItem)->GetValue();
 
-        if ( pCondSet->GetItemState( ATTR_FONT_UNDERLINE, sal_True, &pItem ) != SFX_ITEM_SET )
+        if ( pCondSet->GetItemState( ATTR_FONT_UNDERLINE, true, &pItem ) != SFX_ITEM_SET )
             pItem = &rSrcSet.Get( ATTR_FONT_UNDERLINE );
         aUnderlineItem = *(const SvxUnderlineItem*)pItem;
 
-        if ( pCondSet->GetItemState( ATTR_FONT_OVERLINE, sal_True, &pItem ) != SFX_ITEM_SET )
+        if ( pCondSet->GetItemState( ATTR_FONT_OVERLINE, true, &pItem ) != SFX_ITEM_SET )
             pItem = &rSrcSet.Get( ATTR_FONT_OVERLINE );
         aOverlineItem = *(const SvxOverlineItem*)pItem;
 
-        if ( pCondSet->GetItemState( ATTR_FONT_WORDLINE, sal_True, &pItem ) != SFX_ITEM_SET )
+        if ( pCondSet->GetItemState( ATTR_FONT_WORDLINE, true, &pItem ) != SFX_ITEM_SET )
             pItem = &rSrcSet.Get( ATTR_FONT_WORDLINE );
         bWordLine = ((const SvxWordLineModeItem*)pItem)->GetValue();
 
-        if ( pCondSet->GetItemState( ATTR_FONT_CROSSEDOUT, sal_True, &pItem ) != SFX_ITEM_SET )
+        if ( pCondSet->GetItemState( ATTR_FONT_CROSSEDOUT, true, &pItem ) != SFX_ITEM_SET )
             pItem = &rSrcSet.Get( ATTR_FONT_CROSSEDOUT );
         eStrike = (FontStrikeout)((const SvxCrossedOutItem*)pItem)->GetValue();
 
-        if ( pCondSet->GetItemState( ATTR_FONT_CONTOUR, sal_True, &pItem ) != SFX_ITEM_SET )
+        if ( pCondSet->GetItemState( ATTR_FONT_CONTOUR, true, &pItem ) != SFX_ITEM_SET )
             pItem = &rSrcSet.Get( ATTR_FONT_CONTOUR );
         bOutline = ((const SvxContourItem*)pItem)->GetValue();
 
-        if ( pCondSet->GetItemState( ATTR_FONT_SHADOWED, sal_True, &pItem ) != SFX_ITEM_SET )
+        if ( pCondSet->GetItemState( ATTR_FONT_SHADOWED, true, &pItem ) != SFX_ITEM_SET )
             pItem = &rSrcSet.Get( ATTR_FONT_SHADOWED );
         bShadow = ((const SvxShadowedItem*)pItem)->GetValue();
 
-        if ( pCondSet->GetItemState( ATTR_FORBIDDEN_RULES, sal_True, &pItem ) != SFX_ITEM_SET )
+        if ( pCondSet->GetItemState( ATTR_FORBIDDEN_RULES, true, &pItem ) != SFX_ITEM_SET )
             pItem = &rSrcSet.Get( ATTR_FORBIDDEN_RULES );
         bForbidden = ((const SvxForbiddenRuleItem*)pItem)->GetValue();
 
-        if ( pCondSet->GetItemState( ATTR_FONT_EMPHASISMARK, sal_True, &pItem ) != SFX_ITEM_SET )
+        if ( pCondSet->GetItemState( ATTR_FONT_EMPHASISMARK, true, &pItem ) != SFX_ITEM_SET )
             pItem = &rSrcSet.Get( ATTR_FONT_EMPHASISMARK );
         eEmphasis = ((const SvxEmphasisMarkItem*)pItem)->GetEmphasisMark();
-        if ( pCondSet->GetItemState( ATTR_FONT_RELIEF, sal_True, &pItem ) != SFX_ITEM_SET )
+        if ( pCondSet->GetItemState( ATTR_FONT_RELIEF, true, &pItem ) != SFX_ITEM_SET )
             pItem = &rSrcSet.Get( ATTR_FONT_RELIEF );
         eRelief = (FontRelief)((const SvxCharReliefItem*)pItem)->GetValue();
 
-        if ( pCondSet->GetItemState( ATTR_FONT_LANGUAGE, sal_True, &pItem ) != SFX_ITEM_SET )
+        if ( pCondSet->GetItemState( ATTR_FONT_LANGUAGE, true, &pItem ) != SFX_ITEM_SET )
             pItem = &rSrcSet.Get( ATTR_FONT_LANGUAGE );
         eLang = ((const SvxLanguageItem*)pItem)->GetLanguage();
-        if ( pCondSet->GetItemState( ATTR_CJK_FONT_LANGUAGE, sal_True, &pItem ) != SFX_ITEM_SET )
+        if ( pCondSet->GetItemState( ATTR_CJK_FONT_LANGUAGE, true, &pItem ) != SFX_ITEM_SET )
             pItem = &rSrcSet.Get( ATTR_CJK_FONT_LANGUAGE );
         eCjkLang = ((const SvxLanguageItem*)pItem)->GetLanguage();
-        if ( pCondSet->GetItemState( ATTR_CTL_FONT_LANGUAGE, sal_True, &pItem ) != SFX_ITEM_SET )
+        if ( pCondSet->GetItemState( ATTR_CTL_FONT_LANGUAGE, true, &pItem ) != SFX_ITEM_SET )
             pItem = &rSrcSet.Get( ATTR_CTL_FONT_LANGUAGE );
         eCtlLang = ((const SvxLanguageItem*)pItem)->GetLanguage();
 
-        if ( pCondSet->GetItemState( ATTR_HYPHENATE, sal_True, &pItem ) != SFX_ITEM_SET )
+        if ( pCondSet->GetItemState( ATTR_HYPHENATE, true, &pItem ) != SFX_ITEM_SET )
             pItem = &rSrcSet.Get( ATTR_HYPHENATE );
         bHyphenate = ((const SfxBoolItem*)pItem)->GetValue();
 
-        if ( pCondSet->GetItemState( ATTR_WRITINGDIR, sal_True, &pItem ) != SFX_ITEM_SET )
+        if ( pCondSet->GetItemState( ATTR_WRITINGDIR, true, &pItem ) != SFX_ITEM_SET )
             pItem = &rSrcSet.Get( ATTR_WRITINGDIR );
         eDirection = (SvxFrameDirection)((const SvxFrameDirectionItem*)pItem)->GetValue();
     }
@@ -755,80 +755,80 @@ void ScPatternAttr::GetFromEditItemSet( SfxItemSet& rDestSet, const SfxItemSet&
 {
     const SfxPoolItem* pItem;
 
-    if (rEditSet.GetItemState(EE_CHAR_COLOR,sal_True,&pItem) == SFX_ITEM_SET)
+    if (rEditSet.GetItemState(EE_CHAR_COLOR,true,&pItem) == SFX_ITEM_SET)
         rDestSet.Put( SvxColorItem(ATTR_FONT_COLOR) = *(const SvxColorItem*)pItem );
 
-    if (rEditSet.GetItemState(EE_CHAR_FONTINFO,sal_True,&pItem) == SFX_ITEM_SET)
+    if (rEditSet.GetItemState(EE_CHAR_FONTINFO,true,&pItem) == SFX_ITEM_SET)
         rDestSet.Put( SvxFontItem(ATTR_FONT) = *(const SvxFontItem*)pItem );
-    if (rEditSet.GetItemState(EE_CHAR_FONTINFO_CJK,sal_True,&pItem) == SFX_ITEM_SET)
+    if (rEditSet.GetItemState(EE_CHAR_FONTINFO_CJK,true,&pItem) == SFX_ITEM_SET)
         rDestSet.Put( SvxFontItem(ATTR_CJK_FONT) = *(const SvxFontItem*)pItem );
-    if (rEditSet.GetItemState(EE_CHAR_FONTINFO_CTL,sal_True,&pItem) == SFX_ITEM_SET)
+    if (rEditSet.GetItemState(EE_CHAR_FONTINFO_CTL,true,&pItem) == SFX_ITEM_SET)
         rDestSet.Put( SvxFontItem(ATTR_CTL_FONT) = *(const SvxFontItem*)pItem );
 
-    if (rEditSet.GetItemState(EE_CHAR_FONTHEIGHT,sal_True,&pItem) == SFX_ITEM_SET)
+    if (rEditSet.GetItemState(EE_CHAR_FONTHEIGHT,true,&pItem) == SFX_ITEM_SET)
         rDestSet.Put( SvxFontHeightItem( HMMToTwips( ((const SvxFontHeightItem*)pItem)->GetHeight() ),
                         100, ATTR_FONT_HEIGHT ) );
-    if (rEditSet.GetItemState(EE_CHAR_FONTHEIGHT_CJK,sal_True,&pItem) == SFX_ITEM_SET)
+    if (rEditSet.GetItemState(EE_CHAR_FONTHEIGHT_CJK,true,&pItem) == SFX_ITEM_SET)
         rDestSet.Put( SvxFontHeightItem( HMMToTwips( ((const SvxFontHeightItem*)pItem)->GetHeight() ),
                         100, ATTR_CJK_FONT_HEIGHT ) );
-    if (rEditSet.GetItemState(EE_CHAR_FONTHEIGHT_CTL,sal_True,&pItem) == SFX_ITEM_SET)
+    if (rEditSet.GetItemState(EE_CHAR_FONTHEIGHT_CTL,true,&pItem) == SFX_ITEM_SET)
         rDestSet.Put( SvxFontHeightItem( HMMToTwips( ((const SvxFontHeightItem*)pItem)->GetHeight() ),
                         100, ATTR_CTL_FONT_HEIGHT ) );
 
-    if (rEditSet.GetItemState(EE_CHAR_WEIGHT,sal_True,&pItem) == SFX_ITEM_SET)
+    if (rEditSet.GetItemState(EE_CHAR_WEIGHT,true,&pItem) == SFX_ITEM_SET)
         rDestSet.Put( SvxWeightItem( (FontWeight)((const SvxWeightItem*)pItem)->GetValue(),
                         ATTR_FONT_WEIGHT) );
-    if (rEditSet.GetItemState(EE_CHAR_WEIGHT_CJK,sal_True,&pItem) == SFX_ITEM_SET)
+    if (rEditSet.GetItemState(EE_CHAR_WEIGHT_CJK,true,&pItem) == SFX_ITEM_SET)
         rDestSet.Put( SvxWeightItem( (FontWeight)((const SvxWeightItem*)pItem)->GetValue(),
                         ATTR_CJK_FONT_WEIGHT) );
-    if (rEditSet.GetItemState(EE_CHAR_WEIGHT_CTL,sal_True,&pItem) == SFX_ITEM_SET)
+    if (rEditSet.GetItemState(EE_CHAR_WEIGHT_CTL,true,&pItem) == SFX_ITEM_SET)
         rDestSet.Put( SvxWeightItem( (FontWeight)((const SvxWeightItem*)pItem)->GetValue(),
                         ATTR_CTL_FONT_WEIGHT) );
 
     // SvxTextLineItem contains enum and color
-    if (rEditSet.GetItemState(EE_CHAR_UNDERLINE,sal_True,&pItem) == SFX_ITEM_SET)
+    if (rEditSet.GetItemState(EE_CHAR_UNDERLINE,true,&pItem) == SFX_ITEM_SET)
         rDestSet.Put( SvxUnderlineItem(UNDERLINE_NONE,ATTR_FONT_UNDERLINE) = *(const SvxUnderlineItem*)pItem );
-    if (rEditSet.GetItemState(EE_CHAR_OVERLINE,sal_True,&pItem) == SFX_ITEM_SET)
+    if (rEditSet.GetItemState(EE_CHAR_OVERLINE,true,&pItem) == SFX_ITEM_SET)
         rDestSet.Put( SvxOverlineItem(UNDERLINE_NONE,ATTR_FONT_OVERLINE) = *(const SvxOverlineItem*)pItem );
-    if (rEditSet.GetItemState(EE_CHAR_WLM,sal_True,&pItem) == SFX_ITEM_SET)
+    if (rEditSet.GetItemState(EE_CHAR_WLM,true,&pItem) == SFX_ITEM_SET)
         rDestSet.Put( SvxWordLineModeItem( ((const SvxWordLineModeItem*)pItem)->GetValue(),
                         ATTR_FONT_WORDLINE) );
 
-    if (rEditSet.GetItemState(EE_CHAR_STRIKEOUT,sal_True,&pItem) == SFX_ITEM_SET)
+    if (rEditSet.GetItemState(EE_CHAR_STRIKEOUT,true,&pItem) == SFX_ITEM_SET)
         rDestSet.Put( SvxCrossedOutItem( (FontStrikeout)((const SvxCrossedOutItem*)pItem)->GetValue(),
                         ATTR_FONT_CROSSEDOUT) );
 
-    if (rEditSet.GetItemState(EE_CHAR_ITALIC,sal_True,&pItem) == SFX_ITEM_SET)
+    if (rEditSet.GetItemState(EE_CHAR_ITALIC,true,&pItem) == SFX_ITEM_SET)
         rDestSet.Put( SvxPostureItem( (FontItalic)((const SvxPostureItem*)pItem)->GetValue(),
                         ATTR_FONT_POSTURE) );
-    if (rEditSet.GetItemState(EE_CHAR_ITALIC_CJK,sal_True,&pItem) == SFX_ITEM_SET)
+    if (rEditSet.GetItemState(EE_CHAR_ITALIC_CJK,true,&pItem) == SFX_ITEM_SET)
         rDestSet.Put( SvxPostureItem( (FontItalic)((const SvxPostureItem*)pItem)->GetValue(),
                         ATTR_CJK_FONT_POSTURE) );
-    if (rEditSet.GetItemState(EE_CHAR_ITALIC_CTL,sal_True,&pItem) == SFX_ITEM_SET)
+    if (rEditSet.GetItemState(EE_CHAR_ITALIC_CTL,true,&pItem) == SFX_ITEM_SET)
         rDestSet.Put( SvxPostureItem( (FontItalic)((const SvxPostureItem*)pItem)->GetValue(),
                         ATTR_CTL_FONT_POSTURE) );
 
-    if (rEditSet.GetItemState(EE_CHAR_OUTLINE,sal_True,&pItem) == SFX_ITEM_SET)
+    if (rEditSet.GetItemState(EE_CHAR_OUTLINE,true,&pItem) == SFX_ITEM_SET)
         rDestSet.Put( SvxContourItem( ((const SvxContourItem*)pItem)->GetValue(),
                         ATTR_FONT_CONTOUR) );
-    if (rEditSet.GetItemState(EE_CHAR_SHADOW,sal_True,&pItem) == SFX_ITEM_SET)
+    if (rEditSet.GetItemState(EE_CHAR_SHADOW,true,&pItem) == SFX_ITEM_SET)
         rDestSet.Put( SvxShadowedItem( ((const SvxShadowedItem*)pItem)->GetValue(),
                         ATTR_FONT_SHADOWED) );
-    if (rEditSet.GetItemState(EE_CHAR_EMPHASISMARK,sal_True,&pItem) == SFX_ITEM_SET)
+    if (rEditSet.GetItemState(EE_CHAR_EMPHASISMARK,true,&pItem) == SFX_ITEM_SET)
         rDestSet.Put( SvxEmphasisMarkItem( ((const SvxEmphasisMarkItem*)pItem)->GetEmphasisMark(),
                         ATTR_FONT_EMPHASISMARK) );
-    if (rEditSet.GetItemState(EE_CHAR_RELIEF,sal_True,&pItem) == SFX_ITEM_SET)
+    if (rEditSet.GetItemState(EE_CHAR_RELIEF,true,&pItem) == SFX_ITEM_SET)
         rDestSet.Put( SvxCharReliefItem( (FontRelief)((const SvxCharReliefItem*)pItem)->GetValue(),
                         ATTR_FONT_RELIEF) );
 
-    if (rEditSet.GetItemState(EE_CHAR_LANGUAGE,sal_True,&pItem) == SFX_ITEM_SET)
+    if (rEditSet.GetItemState(EE_CHAR_LANGUAGE,true,&pItem) == SFX_ITEM_SET)
         rDestSet.Put( SvxLanguageItem(static_cast<const SvxLanguageItem*>(pItem)->GetValue(), ATTR_FONT_LANGUAGE) );
-    if (rEditSet.GetItemState(EE_CHAR_LANGUAGE_CJK,sal_True,&pItem) == SFX_ITEM_SET)
+    if (rEditSet.GetItemState(EE_CHAR_LANGUAGE_CJK,true,&pItem) == SFX_ITEM_SET)
         rDestSet.Put( SvxLanguageItem(static_cast<const SvxLanguageItem*>(pItem)->GetValue(), ATTR_CJK_FONT_LANGUAGE) );
-    if (rEditSet.GetItemState(EE_CHAR_LANGUAGE_CTL,sal_True,&pItem) == SFX_ITEM_SET)
+    if (rEditSet.GetItemState(EE_CHAR_LANGUAGE_CTL,true,&pItem) == SFX_ITEM_SET)
         rDestSet.Put( SvxLanguageItem(static_cast<const SvxLanguageItem*>(pItem)->GetValue(), ATTR_CTL_FONT_LANGUAGE) );
 
-    if (rEditSet.GetItemState(EE_PARA_JUST,sal_True,&pItem) == SFX_ITEM_SET)
+    if (rEditSet.GetItemState(EE_PARA_JUST,true,&pItem) == SFX_ITEM_SET)
     {
         SvxCellHorJustify eVal;
         switch ( ((const SvxAdjustItem*)pItem)->GetAdjust() )
@@ -902,7 +902,7 @@ void ScPatternAttr::DeleteUnchanged( const ScPatternAttr* pOldAttrs )
         //  only items that are set are interesting
         if ( rThisSet.GetItemState( nSubWhich, false, &pThisItem ) == SFX_ITEM_SET )
         {
-            SfxItemState eOldState = rOldSet.GetItemState( nSubWhich, sal_True, &pOldItem );
+            SfxItemState eOldState = rOldSet.GetItemState( nSubWhich, true, &pOldItem );
             if ( eOldState == SFX_ITEM_SET )
             {
                 //  item is set in OldAttrs (or its parent) -> compare pointers
@@ -919,12 +919,12 @@ void ScPatternAttr::DeleteUnchanged( const ScPatternAttr* pOldAttrs )
     }
 }
 
-sal_Bool ScPatternAttr::HasItemsSet( const sal_uInt16* pWhich ) const
+bool ScPatternAttr::HasItemsSet( const sal_uInt16* pWhich ) const
 {
     const SfxItemSet& rSet = GetItemSet();
     for (sal_uInt16 i=0; pWhich[i]; i++)
         if ( rSet.GetItemState( pWhich[i], false ) == SFX_ITEM_SET )
-            return sal_True;
+            return true;
     return false;
 }
 
@@ -1098,53 +1098,53 @@ ScPatternAttr* ScPatternAttr::PutInPool( ScDocument* pDestDoc, ScDocument* pSrcD
     return pPatternAttr;
 }
 
-sal_Bool ScPatternAttr::IsVisible() const
+bool ScPatternAttr::IsVisible() const
 {
     const SfxItemSet& rSet = GetItemSet();
 
     const SfxPoolItem* pItem;
     SfxItemState eState;
 
-    eState = rSet.GetItemState( ATTR_BACKGROUND, sal_True, &pItem );
+    eState = rSet.GetItemState( ATTR_BACKGROUND, true, &pItem );
     if ( eState == SFX_ITEM_SET )
         if ( ((const SvxBrushItem*)pItem)->GetColor().GetColor() != COL_TRANSPARENT )
-            return sal_True;
+            return true;
 
-    eState = rSet.GetItemState( ATTR_BORDER, sal_True, &pItem );
+    eState = rSet.GetItemState( ATTR_BORDER, true, &pItem );
     if ( eState == SFX_ITEM_SET )
     {
         const SvxBoxItem* pBoxItem = (SvxBoxItem*) pItem;
         if ( pBoxItem->GetTop() || pBoxItem->GetBottom() ||
              pBoxItem->GetLeft() || pBoxItem->GetRight() )
-            return sal_True;
+            return true;
     }
 
-    eState = rSet.GetItemState( ATTR_BORDER_TLBR, sal_True, &pItem );
+    eState = rSet.GetItemState( ATTR_BORDER_TLBR, true, &pItem );
     if ( eState == SFX_ITEM_SET )
         if( static_cast< const SvxLineItem* >( pItem )->GetLine() )
-            return sal_True;
+            return true;
 
-    eState = rSet.GetItemState( ATTR_BORDER_BLTR, sal_True, &pItem );
+    eState = rSet.GetItemState( ATTR_BORDER_BLTR, true, &pItem );
     if ( eState == SFX_ITEM_SET )
         if( static_cast< const SvxLineItem* >( pItem )->GetLine() )
-            return sal_True;
+            return true;
 
-    eState = rSet.GetItemState( ATTR_SHADOW, sal_True, &pItem );
+    eState = rSet.GetItemState( ATTR_SHADOW, true, &pItem );
     if ( eState == SFX_ITEM_SET )
         if ( ((const SvxShadowItem*)pItem)->GetLocation() != SVX_SHADOW_NONE )
-            return sal_True;
+            return true;
 
     return false;
 }
 
-inline sal_Bool OneEqual( const SfxItemSet& rSet1, const SfxItemSet& rSet2, sal_uInt16 nId )
+inline bool OneEqual( const SfxItemSet& rSet1, const SfxItemSet& rSet2, sal_uInt16 nId )
 {
     const SfxPoolItem* pItem1 = &rSet1.Get(nId);
     const SfxPoolItem* pItem2 = &rSet2.Get(nId);
     return ( pItem1 == pItem2 || *pItem1 == *pItem2 );
 }
 
-sal_Bool ScPatternAttr::IsVisibleEqual( const ScPatternAttr& rOther ) const
+bool ScPatternAttr::IsVisibleEqual( const ScPatternAttr& rOther ) const
 {
     const SfxItemSet& rThisSet = GetItemSet();
     const SfxItemSet& rOtherSet = rOther.GetItemSet();
@@ -1175,7 +1175,7 @@ void ScPatternAttr::SetStyleSheet( ScStyleSheet* pNewStyle, bool bClearDirectFor
         {
             for (sal_uInt16 i=ATTR_PATTERN_START; i<=ATTR_PATTERN_END; i++)
             {
-                if (rStyleSet.GetItemState(i, sal_True) == SFX_ITEM_SET)
+                if (rStyleSet.GetItemState(i, true) == SFX_ITEM_SET)
                     rPatternSet.ClearItem(i);
             }
         }
@@ -1233,12 +1233,11 @@ void ScPatternAttr::StyleToName()
     }
 }
 
-sal_Bool ScPatternAttr::IsSymbolFont() const
+bool ScPatternAttr::IsSymbolFont() const
 {
     const SfxPoolItem* pItem;
-    if( GetItemSet().GetItemState( ATTR_FONT, sal_True, &pItem ) == SFX_ITEM_SET )
-        return sal_Bool( ((const SvxFontItem*) pItem)->GetCharSet()
-            == RTL_TEXTENCODING_SYMBOL );
+    if( GetItemSet().GetItemState( ATTR_FONT, true, &pItem ) == SFX_ITEM_SET )
+        return ((const SvxFontItem*) pItem)->GetCharSet() == RTL_TEXTENCODING_SYMBOL;
     else
         return false;
 }
@@ -1265,11 +1264,11 @@ sal_uLong ScPatternAttr::GetNumberFormat( SvNumberFormatter* pFormatter,
     OSL_ENSURE(pFormatter,"GetNumberFormat ohne Formatter");
 
     const SfxPoolItem* pFormItem;
-    if ( !pCondSet || pCondSet->GetItemState(ATTR_VALUE_FORMAT,sal_True,&pFormItem) != SFX_ITEM_SET )
+    if ( !pCondSet || pCondSet->GetItemState(ATTR_VALUE_FORMAT,true,&pFormItem) != SFX_ITEM_SET )
         pFormItem = &GetItemSet().Get(ATTR_VALUE_FORMAT);
 
     const SfxPoolItem* pLangItem;
-    if ( !pCondSet || pCondSet->GetItemState(ATTR_LANGUAGE_FORMAT,sal_True,&pLangItem) != SFX_ITEM_SET )
+    if ( !pCondSet || pCondSet->GetItemState(ATTR_LANGUAGE_FORMAT,true,&pLangItem) != SFX_ITEM_SET )
         pLangItem = &GetItemSet().Get(ATTR_LANGUAGE_FORMAT);
 
     return pFormatter->GetFormatForLanguageIfBuiltIn(
@@ -1280,7 +1279,7 @@ sal_uLong ScPatternAttr::GetNumberFormat( SvNumberFormatter* pFormatter,
 const SfxPoolItem& ScPatternAttr::GetItem( sal_uInt16 nWhich, const SfxItemSet& rItemSet, const SfxItemSet* pCondSet )
 {
     const SfxPoolItem* pCondItem;
-    if ( pCondSet && pCondSet->GetItemState( nWhich, sal_True, &pCondItem ) == SFX_ITEM_SET )
+    if ( pCondSet && pCondSet->GetItemState( nWhich, true, &pCondItem ) == SFX_ITEM_SET )
         return *pCondItem;
     return rItemSet.Get(nWhich);
 }
@@ -1297,7 +1296,7 @@ long ScPatternAttr::GetRotateVal( const SfxItemSet* pCondSet ) const
     long nAttrRotate = 0;
     if ( GetCellOrientation() == SVX_ORIENTATION_STANDARD )
     {
-        sal_Bool bRepeat = ( static_cast<const SvxHorJustifyItem&>(GetItem(ATTR_HOR_JUSTIFY, pCondSet)).
+        bool bRepeat = ( static_cast<const SvxHorJustifyItem&>(GetItem(ATTR_HOR_JUSTIFY, pCondSet)).
                             GetValue() == SVX_HOR_JUSTIFY_REPEAT );
         // ignore orientation/rotation if "repeat" is active
         if ( !bRepeat )
commit 38f46105e9fd8062850637d112ad85f11779716c
Author: Eike Rathke <erack at redhat.com>
Date:   Thu Nov 10 15:38:15 2011 +0100

    sal_Bool to bool

diff --git a/sc/inc/attrib.hxx b/sc/inc/attrib.hxx
index 398a317..1df6d5c 100644
--- a/sc/inc/attrib.hxx
+++ b/sc/inc/attrib.hxx
@@ -55,7 +55,7 @@
 class EditTextObject;
 namespace editeng { class SvxBorderLine; }
 
-sal_Bool SC_DLLPUBLIC ScHasPriority( const ::editeng::SvxBorderLine* pThis, const ::editeng::SvxBorderLine* pOther );
+bool SC_DLLPUBLIC ScHasPriority( const ::editeng::SvxBorderLine* pThis, const ::editeng::SvxBorderLine* pOther );
 
 //------------------------------------------------------------------------
 
@@ -79,7 +79,7 @@ public:
             SCsCOL          GetColMerge() const {return nColMerge; }
             SCsROW          GetRowMerge() const {return nRowMerge; }
 
-            sal_Bool            IsMerged() const { return nColMerge>1 || nRowMerge>1; }
+            bool            IsMerged() const { return nColMerge>1 || nRowMerge>1; }
 
     inline  ScMergeAttr& operator=(const ScMergeAttr& rMerge)
             {
@@ -98,31 +98,31 @@ public:
             ScMergeFlagAttr(sal_Int16 nFlags);
             ~ScMergeFlagAttr();
 
-    sal_Bool    IsHorOverlapped() const     { return ( GetValue() & SC_MF_HOR ) != 0;  }
-    sal_Bool    IsVerOverlapped() const     { return ( GetValue() & SC_MF_VER ) != 0;  }
-    sal_Bool    IsOverlapped() const        { return ( GetValue() & ( SC_MF_HOR | SC_MF_VER ) ) != 0; }
+    bool    IsHorOverlapped() const     { return ( GetValue() & SC_MF_HOR ) != 0;  }
+    bool    IsVerOverlapped() const     { return ( GetValue() & SC_MF_VER ) != 0;  }
+    bool    IsOverlapped() const        { return ( GetValue() & ( SC_MF_HOR | SC_MF_VER ) ) != 0; }
 
-    sal_Bool    HasAutoFilter() const       { return ( GetValue() & SC_MF_AUTO ) != 0; }
-    sal_Bool    HasButton() const           { return ( GetValue() & SC_MF_BUTTON ) != 0; }
+    bool    HasAutoFilter() const       { return ( GetValue() & SC_MF_AUTO ) != 0; }
+    bool    HasButton() const           { return ( GetValue() & SC_MF_BUTTON ) != 0; }
     bool    HasDPTable() const          { return ( GetValue() & SC_MF_DP_TABLE ) != 0; }
 
-    sal_Bool    IsScenario() const          { return ( GetValue() & SC_MF_SCENARIO ) != 0; }
+    bool    IsScenario() const          { return ( GetValue() & SC_MF_SCENARIO ) != 0; }
 };
 
 //------------------------------------------------------------------------
 class SC_DLLPUBLIC ScProtectionAttr: public SfxPoolItem
 {
-    sal_Bool        bProtection;    // protect cell
-    sal_Bool        bHideFormula;   // hide formula
-    sal_Bool        bHideCell;      // hide cell
-    sal_Bool        bHidePrint;     // don't print cell
+    bool        bProtection;    // protect cell
+    bool        bHideFormula;   // hide formula
+    bool        bHideCell;      // hide cell
+    bool        bHidePrint;     // don't print cell
 public:
                             TYPEINFO();
                             ScProtectionAttr();
-                            ScProtectionAttr(   sal_Bool bProtect,
-                                                sal_Bool bHFormula = false,
-                                                sal_Bool bHCell = false,
-                                                sal_Bool bHPrint = false);
+                            ScProtectionAttr(   bool bProtect,
+                                                bool bHFormula = false,
+                                                bool bHCell = false,
+                                                bool bHPrint = false);
                             ScProtectionAttr( const ScProtectionAttr& );
                             ~ScProtectionAttr();
 
@@ -141,14 +141,14 @@ public:
     virtual bool            QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
     virtual bool            PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
 
-            sal_Bool            GetProtection() const { return bProtection; }
-            sal_Bool            SetProtection( sal_Bool bProtect);
-            sal_Bool            GetHideFormula() const { return bHideFormula; }
-            sal_Bool            SetHideFormula( sal_Bool bHFormula);
-            sal_Bool            GetHideCell() const { return bHideCell; }
-            sal_Bool            SetHideCell( sal_Bool bHCell);
-            sal_Bool            GetHidePrint() const { return bHidePrint; }
-            sal_Bool            SetHidePrint( sal_Bool bHPrint);
+            bool            GetProtection() const { return bProtection; }
+            bool            SetProtection( bool bProtect);
+            bool            GetHideFormula() const { return bHideFormula; }
+            bool            SetHideFormula( bool bHFormula);
+            bool            GetHideCell() const { return bHideCell; }
+            bool            SetHideCell( bool bHCell);
+            bool            GetHidePrint() const { return bHidePrint; }
+            bool            SetHidePrint( bool bHPrint);
     inline  ScProtectionAttr& operator=(const ScProtectionAttr& rProtection)
             {
                 bProtection = rProtection.bProtection;
diff --git a/sc/source/core/data/attrib.cxx b/sc/source/core/data/attrib.cxx
index ccc78bb..d5b2d7b 100644
--- a/sc/source/core/data/attrib.cxx
+++ b/sc/source/core/data/attrib.cxx
@@ -75,30 +75,30 @@ TYPEINIT1(ScPageScaleToItem,    SfxPoolItem);
 //      allgemeine Hilfsfunktionen
 //
 
-sal_Bool ScHasPriority( const ::editeng::SvxBorderLine* pThis, const ::editeng::SvxBorderLine* pOther )
+bool ScHasPriority( const ::editeng::SvxBorderLine* pThis, const ::editeng::SvxBorderLine* pOther )
 {
 
     if (!pThis)
         return false;
     if (!pOther)
-        return sal_True;
+        return true;
 
     sal_uInt16 nThisSize = pThis->GetOutWidth() + pThis->GetDistance() + pThis->GetInWidth();
     sal_uInt16 nOtherSize = pOther->GetOutWidth() + pOther->GetDistance() + pOther->GetInWidth();
 
     if (nThisSize > nOtherSize)
-        return sal_True;
+        return true;
     else if (nThisSize < nOtherSize)
         return false;
     else
     {
         if ( pOther->GetInWidth() && !pThis->GetInWidth() )
-            return sal_True;
+            return true;
         else if ( pThis->GetInWidth() && !pOther->GetInWidth() )
             return false;
         else
         {
-            return sal_True;            //! ???
+            return true;            //! ???
         }
     }
 }
@@ -205,7 +205,7 @@ ScMergeFlagAttr::~ScMergeFlagAttr()
 
 ScProtectionAttr::ScProtectionAttr():
     SfxPoolItem(ATTR_PROTECTION),
-    bProtection(sal_True),
+    bProtection(true),
     bHideFormula(false),
     bHideCell(false),
     bHidePrint(false)
@@ -214,8 +214,8 @@ ScProtectionAttr::ScProtectionAttr():
 
 //------------------------------------------------------------------------
 
-ScProtectionAttr::ScProtectionAttr( sal_Bool bProtect, sal_Bool bHFormula,
-                                    sal_Bool bHCell, sal_Bool bHPrint):
+ScProtectionAttr::ScProtectionAttr( bool bProtect, bool bHFormula,
+                                    bool bHCell, bool bHPrint):
     SfxPoolItem(ATTR_PROTECTION),
     bProtection(bProtect),
     bHideFormula(bHFormula),
@@ -275,7 +275,7 @@ bool ScProtectionAttr::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
 bool ScProtectionAttr::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
 {
     bool bRet = false;
-    sal_Bool bVal = sal_Bool();
+    sal_Bool bVal = sal_False;
     nMemberId &= ~CONVERT_TWIPS;
     switch ( nMemberId )
     {
@@ -412,34 +412,34 @@ SfxPoolItem* ScProtectionAttr::Create( SvStream& rStream, sal_uInt16 /* n */ ) c
 
 //------------------------------------------------------------------------
 
-sal_Bool ScProtectionAttr::SetProtection( sal_Bool bProtect)
+bool ScProtectionAttr::SetProtection( bool bProtect)
 {
     bProtection =  bProtect;
-    return sal_True;
+    return true;
 }
 
 //------------------------------------------------------------------------
 
-sal_Bool ScProtectionAttr::SetHideFormula( sal_Bool bHFormula)
+bool ScProtectionAttr::SetHideFormula( bool bHFormula)
 {
     bHideFormula = bHFormula;
-    return sal_True;
+    return true;
 }
 
 //------------------------------------------------------------------------
 
-sal_Bool ScProtectionAttr::SetHideCell( sal_Bool bHCell)
+bool ScProtectionAttr::SetHideCell( bool bHCell)
 {
     bHideCell = bHCell;
-    return sal_True;
+    return true;
 }
 
 //------------------------------------------------------------------------
 
-sal_Bool ScProtectionAttr::SetHidePrint( sal_Bool bHPrint)
+bool ScProtectionAttr::SetHidePrint( bool bHPrint)
 {
     bHidePrint = bHPrint;
-    return sal_True;
+    return true;
 }
 
 // -----------------------------------------------------------------------
@@ -552,7 +552,7 @@ int ScTableListItem::operator==( const SfxPoolItem& rAttr ) const
     OSL_ENSURE( SfxPoolItem::operator==(rAttr), "unequal types" );
 
     ScTableListItem&    rCmp   = (ScTableListItem&)rAttr;
-    sal_Bool                bEqual = (nCount == rCmp.nCount);
+    bool                bEqual = (nCount == rCmp.nCount);
 
     if ( nCount > 0 )
     {
@@ -698,7 +698,7 @@ bool ScPageHFItem::PutValue( const uno::Any& rVal, sal_uInt8 /* nMemberId */ )
                 if ( !pLeftArea || !pCenterArea || !pRightArea )
                 {
                     // keine Texte auf NULL stehen lassen
-                    ScEditEngineDefaulter aEngine( EditEngine::CreatePool(), sal_True );
+                    ScEditEngineDefaulter aEngine( EditEngine::CreatePool(), true );
                     if (!pLeftArea)
                         pLeftArea = aEngine.CreateTextObject();
                     if (!pCenterArea)
@@ -758,9 +758,9 @@ void lcl_SetSpace( String& rStr, const ESelection& rSel )
     rStr.SetChar( rSel.nStartPos, ' ' );
 }
 
-sal_Bool lcl_ConvertFields(EditEngine& rEng, const String* pCommands)
+bool lcl_ConvertFields(EditEngine& rEng, const String* pCommands)
 {
-    sal_Bool bChange = false;
+    bool bChange = false;
     sal_uInt16 nParCnt = rEng.GetParagraphCount();
     for (sal_uInt16 nPar = 0; nPar<nParCnt; nPar++)
     {
@@ -771,37 +771,37 @@ sal_Bool lcl_ConvertFields(EditEngine& rEng, const String* pCommands)
         {
             ESelection aSel( nPar,nPos, nPar,nPos+pCommands[0].Len() );
             rEng.QuickInsertField( SvxFieldItem(SvxPageField(), EE_FEATURE_FIELD), aSel );
-            lcl_SetSpace(aStr, aSel ); bChange = sal_True;
+            lcl_SetSpace(aStr, aSel ); bChange = true;
         }
         while ((nPos = aStr.Search(pCommands[1])) != STRING_NOTFOUND)
         {
             ESelection aSel( nPar,nPos, nPar,nPos+pCommands[1].Len() );
             rEng.QuickInsertField( SvxFieldItem(SvxPagesField(), EE_FEATURE_FIELD), aSel );
-            lcl_SetSpace(aStr, aSel ); bChange = sal_True;
+            lcl_SetSpace(aStr, aSel ); bChange = true;
         }
         while ((nPos = aStr.Search(pCommands[2])) != STRING_NOTFOUND)
         {
             ESelection aSel( nPar,nPos, nPar,nPos+pCommands[2].Len() );
             rEng.QuickInsertField( SvxFieldItem(SvxDateField(Date(),SVXDATETYPE_VAR), EE_FEATURE_FIELD), aSel );
-            lcl_SetSpace(aStr, aSel ); bChange = sal_True;
+            lcl_SetSpace(aStr, aSel ); bChange = true;
         }
         while ((nPos = aStr.Search(pCommands[3])) != STRING_NOTFOUND)
         {
             ESelection aSel( nPar,nPos, nPar,nPos+pCommands[3].Len() );
             rEng.QuickInsertField( SvxFieldItem(SvxTimeField(), EE_FEATURE_FIELD ), aSel );
-            lcl_SetSpace(aStr, aSel ); bChange = sal_True;
+            lcl_SetSpace(aStr, aSel ); bChange = true;
         }
         while ((nPos = aStr.Search(pCommands[4])) != STRING_NOTFOUND)
         {
             ESelection aSel( nPar,nPos, nPar,nPos+pCommands[4].Len() );
             rEng.QuickInsertField( SvxFieldItem(SvxFileField(), EE_FEATURE_FIELD), aSel );
-            lcl_SetSpace(aStr, aSel ); bChange = sal_True;
+            lcl_SetSpace(aStr, aSel ); bChange = true;
         }
         while ((nPos = aStr.Search(pCommands[5])) != STRING_NOTFOUND)
         {
             ESelection aSel( nPar,nPos, nPar,nPos+pCommands[5].Len() );
             rEng.QuickInsertField( SvxFieldItem(SvxTableField(), EE_FEATURE_FIELD), aSel );
-            lcl_SetSpace(aStr, aSel ); bChange = sal_True;
+            lcl_SetSpace(aStr, aSel ); bChange = true;
         }
     }
     return bChange;
@@ -825,7 +825,7 @@ SfxPoolItem* ScPageHFItem::Create( SvStream& rStream, sal_uInt16 nVer ) const
         //  Excel import in 5.1 created broken TextObjects (#67442#) that are
         //  corrected here to avoid saving wrong files again (#90487#).
 
-        ScEditEngineDefaulter aEngine( EditEngine::CreatePool(), sal_True );
+        ScEditEngineDefaulter aEngine( EditEngine::CreatePool(), true );
         if ( pLeft == NULL || pLeft->GetParagraphCount() == 0 )
         {
             delete pLeft;
@@ -859,7 +859,7 @@ SfxPoolItem* ScPageHFItem::Create( SvStream& rStream, sal_uInt16 nVer ) const
         for (i=0; i<SC_FIELD_COUNT; i++)
             aCommands[i] += rDel;
 
-        ScEditEngineDefaulter aEngine( EditEngine::CreatePool(), sal_True );
+        ScEditEngineDefaulter aEngine( EditEngine::CreatePool(), true );
         aEngine.SetText(*pLeft);
         if (lcl_ConvertFields(aEngine,aCommands))
         {
@@ -1216,7 +1216,7 @@ bool ScPageScaleToItem::QueryValue( uno::Any& rAny, sal_uInt8 nMemberId ) const
 
 bool ScPageScaleToItem::PutValue( const uno::Any& rAny, sal_uInt8 nMemberId )
 {
-    sal_Bool bRet = false;
+    bool bRet = false;
     switch( nMemberId )
     {
         case SC_MID_PAGE_SCALETO_WIDTH:     bRet = rAny >>= mnWidth;    break;
commit d0aedf87a6ee76bb7ba55f115b284835e1a15d79
Author: Eike Rathke <erack at redhat.com>
Date:   Thu Nov 10 15:21:48 2011 +0100

    sal_Bool to bool

diff --git a/sc/inc/attarray.hxx b/sc/inc/attarray.hxx
index b3fe1a5..b58472e 100644
--- a/sc/inc/attarray.hxx
+++ b/sc/inc/attarray.hxx
@@ -101,9 +101,9 @@ friend void lcl_IterGetNumberFormat( sal_uLong& nFormat,
         const ScAttrArray*& rpArr, SCROW& nAttrEndRow,
         const ScAttrArray* pNewArr, SCROW nRow, ScDocument* pDoc );
 
-    sal_Bool    ApplyFrame( const SvxBoxItem* pLineOuter, const SvxBoxInfoItem* pLineInner,
+    bool    ApplyFrame( const SvxBoxItem* pLineOuter, const SvxBoxInfoItem* pLineInner,
                             SCROW nStartRow, SCROW nEndRow,
-                            sal_Bool bLeft, SCCOL nDistRight, sal_Bool bTop, SCROW nDistBottom );
+                            bool bLeft, SCCOL nDistRight, bool bTop, SCROW nDistBottom );
 
     void RemoveCellCharAttribs( SCROW nStartRow, SCROW nEndRow,
                               const ScPatternAttr* pPattern, ScEditDataArray* pDataArray );
@@ -117,72 +117,72 @@ public:
 #if OSL_DEBUG_LEVEL > 1
     void    TestData() const;
 #endif
-    void    Reset( const ScPatternAttr* pPattern, sal_Bool bAlloc = sal_True );
-    sal_Bool    Concat(SCSIZE nPos);
+    void    Reset( const ScPatternAttr* pPattern, bool bAlloc = sal_True );
+    bool    Concat(SCSIZE nPos);
 
     const ScPatternAttr* GetPattern( SCROW nRow ) const;
     const ScPatternAttr* GetPatternRange( SCROW& rStartRow, SCROW& rEndRow, SCROW nRow ) const;
-    void    MergePatternArea( SCROW nStartRow, SCROW nEndRow, ScMergePatternState& rState, sal_Bool bDeep ) const;
+    void    MergePatternArea( SCROW nStartRow, SCROW nEndRow, ScMergePatternState& rState, bool bDeep ) const;
 
     void    MergeBlockFrame( SvxBoxItem* pLineOuter, SvxBoxInfoItem* pLineInner, ScLineFlags& rFlags,
-                            SCROW nStartRow, SCROW nEndRow, sal_Bool bLeft, SCCOL nDistRight ) const;
+                            SCROW nStartRow, SCROW nEndRow, bool bLeft, SCCOL nDistRight ) const;
     void    ApplyBlockFrame( const SvxBoxItem* pLineOuter, const SvxBoxInfoItem* pLineInner,
-                            SCROW nStartRow, SCROW nEndRow, sal_Bool bLeft, SCCOL nDistRight );
+                            SCROW nStartRow, SCROW nEndRow, bool bLeft, SCCOL nDistRight );
 
-    void    SetPattern( SCROW nRow, const ScPatternAttr* pPattern, sal_Bool bPutToPool = false );
+    void    SetPattern( SCROW nRow, const ScPatternAttr* pPattern, bool bPutToPool = false );
     void    SetPatternArea( SCROW nStartRow, SCROW nEndRow, const ScPatternAttr* pPattern,
-                            sal_Bool bPutToPool = false, ScEditDataArray* pDataArray = NULL );
+                            bool bPutToPool = false, ScEditDataArray* pDataArray = NULL );
     void    ApplyStyleArea( SCROW nStartRow, SCROW nEndRow, ScStyleSheet* pStyle );
     void    ApplyCacheArea( SCROW nStartRow, SCROW nEndRow, SfxItemPoolCache* pCache,
                             ScEditDataArray* pDataArray = NULL );
     bool    SetAttrEntries(ScAttrEntry* pNewData, SCSIZE nSize);
     void    ApplyLineStyleArea( SCROW nStartRow, SCROW nEndRow,
-                                const ::editeng::SvxBorderLine* pLine, sal_Bool bColorOnly );
+                                const ::editeng::SvxBorderLine* pLine, bool bColorOnly );
 
     void    ClearItems( SCROW nStartRow, SCROW nEndRow, const sal_uInt16* pWhich );
-    void    ChangeIndent( SCROW nStartRow, SCROW nEndRow, sal_Bool bIncrement );
+    void    ChangeIndent( SCROW nStartRow, SCROW nEndRow, bool bIncrement );
 
             /// Including current, may return -1
-    SCsROW  GetNextUnprotected( SCsROW nRow, sal_Bool bUp ) const;
+    SCsROW  GetNextUnprotected( SCsROW nRow, bool bUp ) const;
 
             /// May return -1 if not found
     SCsROW  SearchStyle( SCsROW nRow, const ScStyleSheet* pSearchStyle,
-                            sal_Bool bUp, ScMarkArray* pMarkArray = NULL );
-    sal_Bool    SearchStyleRange( SCsROW& rRow, SCsROW& rEndRow, const ScStyleSheet* pSearchStyle,
-                            sal_Bool bUp, ScMarkArray* pMarkArray = NULL );
+                            bool bUp, ScMarkArray* pMarkArray = NULL );
+    bool    SearchStyleRange( SCsROW& rRow, SCsROW& rEndRow, const ScStyleSheet* pSearchStyle,
+                            bool bUp, ScMarkArray* pMarkArray = NULL );
 
-    sal_Bool    ApplyFlags( SCROW nStartRow, SCROW nEndRow, sal_Int16 nFlags );
-    sal_Bool    RemoveFlags( SCROW nStartRow, SCROW nEndRow, sal_Int16 nFlags );
+    bool    ApplyFlags( SCROW nStartRow, SCROW nEndRow, sal_Int16 nFlags );
+    bool    RemoveFlags( SCROW nStartRow, SCROW nEndRow, sal_Int16 nFlags );
 
-    sal_Bool    Search( SCROW nRow, SCSIZE& nIndex ) const;
+    bool    Search( SCROW nRow, SCSIZE& nIndex ) const;
 
-    sal_Bool    HasLines( SCROW nRow1, SCROW nRow2, Rectangle& rSizes,
-                        sal_Bool bLeft, sal_Bool bRight ) const;
+    bool    HasLines( SCROW nRow1, SCROW nRow2, Rectangle& rSizes,
+                        bool bLeft, bool bRight ) const;
     bool    HasAttrib( SCROW nRow1, SCROW nRow2, sal_uInt16 nMask ) const;
-    sal_Bool    ExtendMerge( SCCOL nThisCol, SCROW nStartRow, SCROW nEndRow,
+    bool    ExtendMerge( SCCOL nThisCol, SCROW nStartRow, SCROW nEndRow,
                                 SCCOL& rPaintCol, SCROW& rPaintRow,
-                                sal_Bool bRefresh );
-    sal_Bool    RemoveAreaMerge( SCROW nStartRow, SCROW nEndRow );
+                                bool bRefresh );
+    bool    RemoveAreaMerge( SCROW nStartRow, SCROW nEndRow );
 
     void    FindStyleSheet( const SfxStyleSheetBase* pStyleSheet, ScFlatBoolRowSegments& rUsedRows, bool bReset );
-    sal_Bool    IsStyleSheetUsed( const ScStyleSheet& rStyle, sal_Bool bGatherAllStyles ) const;
+    bool    IsStyleSheetUsed( const ScStyleSheet& rStyle, bool bGatherAllStyles ) const;
 
     void    DeleteAreaSafe(SCROW nStartRow, SCROW nEndRow);
     void    SetPatternAreaSafe( SCROW nStartRow, SCROW nEndRow,
-                                    const ScPatternAttr* pWantedPattern, sal_Bool bDefault );
+                                    const ScPatternAttr* pWantedPattern, bool bDefault );
     void    CopyAreaSafe( SCROW nStartRow, SCROW nEndRow, long nDy, ScAttrArray& rAttrArray );
 
-    sal_Bool    IsEmpty() const;
+    bool    IsEmpty() const;
 
-    sal_Bool    GetFirstVisibleAttr( SCROW& rFirstRow ) const;
-    sal_Bool    GetLastVisibleAttr( SCROW& rLastRow, SCROW nLastData ) const;
-    sal_Bool    HasVisibleAttrIn( SCROW nStartRow, SCROW nEndRow ) const;
-    sal_Bool    IsVisibleEqual( const ScAttrArray& rOther,
+    bool    GetFirstVisibleAttr( SCROW& rFirstRow ) const;
+    bool    GetLastVisibleAttr( SCROW& rLastRow, SCROW nLastData ) const;
+    bool    HasVisibleAttrIn( SCROW nStartRow, SCROW nEndRow ) const;
+    bool    IsVisibleEqual( const ScAttrArray& rOther,
                             SCROW nStartRow, SCROW nEndRow ) const;
-    sal_Bool    IsAllEqual( const ScAttrArray& rOther, SCROW nStartRow, SCROW nEndRow ) const;
+    bool    IsAllEqual( const ScAttrArray& rOther, SCROW nStartRow, SCROW nEndRow ) const;
 
-    sal_Bool    TestInsertCol( SCROW nStartRow, SCROW nEndRow) const;
-    sal_Bool    TestInsertRow( SCSIZE nSize ) const;
+    bool    TestInsertCol( SCROW nStartRow, SCROW nEndRow) const;
+    bool    TestInsertRow( SCSIZE nSize ) const;
     void    InsertRow( SCROW nStartRow, SCSIZE nSize );
     void    DeleteRow( SCROW nStartRow, SCSIZE nSize );
     void    DeleteRange( SCSIZE nStartIndex, SCSIZE nEndIndex );
diff --git a/sc/source/core/data/attarray.cxx b/sc/source/core/data/attarray.cxx
index 794bc7d..fd5082d 100644
--- a/sc/source/core/data/attarray.cxx
+++ b/sc/source/core/data/attarray.cxx
@@ -128,7 +128,7 @@ void ScAttrArray::TestData() const
 
 //------------------------------------------------------------------------
 
-void ScAttrArray::Reset( const ScPatternAttr* pPattern, sal_Bool bAlloc )
+void ScAttrArray::Reset( const ScPatternAttr* pPattern, bool bAlloc )
 {
     if (pData)
     {
@@ -184,9 +184,9 @@ void ScAttrArray::Reset( const ScPatternAttr* pPattern, sal_Bool bAlloc )
 }
 
 
-sal_Bool ScAttrArray::Concat(SCSIZE nPos)
+bool ScAttrArray::Concat(SCSIZE nPos)
 {
-    sal_Bool bRet = false;
+    bool bRet = false;
     if (pData && (nPos < nCount))
     {
         if (nPos > 0)
@@ -200,7 +200,7 @@ sal_Bool ScAttrArray::Concat(SCSIZE nPos)
                 pData[nCount - 1].nRow = 0;
                 nCount--;
                 nPos--;
-                bRet = sal_True;
+                bRet = true;
             }
         }
         if (nPos + 1 < nCount)
@@ -213,7 +213,7 @@ sal_Bool ScAttrArray::Concat(SCSIZE nPos)
                 pData[nCount - 1].pPattern = NULL;
                 pData[nCount - 1].nRow = 0;
                 nCount--;
-                bRet = sal_True;
+                bRet = true;
             }
         }
     }
@@ -222,11 +222,11 @@ sal_Bool ScAttrArray::Concat(SCSIZE nPos)
 
 //------------------------------------------------------------------------
 
-sal_Bool ScAttrArray::Search( SCROW nRow, SCSIZE& nIndex ) const
+bool ScAttrArray::Search( SCROW nRow, SCSIZE& nIndex ) const
 {
     long    nHi         = static_cast<long>(nCount) - 1;
     long    i           = 0;
-    sal_Bool    bFound      = (nCount == 1);
+    bool    bFound      = (nCount == 1);
     if (pData)
     {
         long nLo = 0;
@@ -246,7 +246,7 @@ sal_Bool ScAttrArray::Search( SCROW nRow, SCSIZE& nIndex ) const
                 if (nStartRow >= (long) nRow)
                     nHi = --i;
                 else
-                    bFound = sal_True;
+                    bFound = true;
         }
     }
     else
@@ -288,7 +288,7 @@ const ScPatternAttr* ScAttrArray::GetPatternRange( SCROW& rStartRow,
 
 //------------------------------------------------------------------------
 
-void ScAttrArray::SetPattern( SCROW nRow, const ScPatternAttr* pPattern, sal_Bool bPutToPool )
+void ScAttrArray::SetPattern( SCROW nRow, const ScPatternAttr* pPattern, bool bPutToPool )
 {
     SetPatternArea( nRow, nRow, pPattern, bPutToPool );
 }
@@ -317,7 +317,7 @@ void ScAttrArray::RemoveCellCharAttribs( SCROW nStartRow, SCROW nEndRow,
 }
 
 void ScAttrArray::SetPatternArea(SCROW nStartRow, SCROW nEndRow, const ScPatternAttr *pPattern,
-                                 sal_Bool bPutToPool, ScEditDataArray* pDataArray )
+                                 bool bPutToPool, ScEditDataArray* pDataArray )
 {
     if (ValidRow(nStartRow) && ValidRow(nEndRow))
     {
@@ -389,8 +389,8 @@ void ScAttrArray::SetPatternArea(SCROW nStartRow, SCROW nEndRow, const ScPattern
             // continue modifying data array
 
             SCSIZE nInsert;     // insert position (MAXROWCOUNT := no insert)
-            sal_Bool bCombined = false;
-            sal_Bool bSplit = false;
+            bool bCombined = false;
+            bool bSplit = false;
             if ( nStartRow > 0 )
             {
                 nInsert = MAXROWCOUNT;
@@ -400,7 +400,7 @@ void ScAttrArray::SetPatternArea(SCROW nStartRow, SCROW nEndRow, const ScPattern
                     {   // may be a split or a simple insert or just a shrink,
                         // row adjustment is done further down
                         if ( pData[ni].nRow > nEndRow )
-                            bSplit = sal_True;
+                            bSplit = true;
                         ni++;
                         nInsert = ni;
                     }
@@ -411,7 +411,7 @@ void ScAttrArray::SetPatternArea(SCROW nStartRow, SCROW nEndRow, const ScPattern
                 {   // combine
                     pData[ni-1].nRow = nEndRow;
                     nInsert = MAXROWCOUNT;
-                    bCombined = sal_True;
+                    bCombined = true;
                 }
             }
             else
@@ -435,7 +435,7 @@ void ScAttrArray::SetPatternArea(SCROW nStartRow, SCROW nEndRow, const ScPattern
                             pData[ni-1].nRow = nStartRow - 1;   // shrink
                     }
                     nInsert = MAXROWCOUNT;
-                    bCombined = sal_True;
+                    bCombined = true;
                 }
                 else if ( ni > 0 && ni == nInsert )
                     pData[ni-1].nRow = nStartRow - 1;   // shrink
@@ -538,7 +538,7 @@ void ScAttrArray::ApplyStyleArea( SCROW nStartRow, SCROW nEndRow, ScStyleSheet*
             {
                 if (nY1 < nStartRow) nY1=nStartRow;
                 if (nY2 > nEndRow) nY2=nEndRow;
-                SetPatternArea( nY1, nY2, pNewPattern, sal_True );
+                SetPatternArea( nY1, nY2, pNewPattern, true );
                 Search( nStart, nPos );
             }
             else
@@ -595,7 +595,7 @@ void ScAttrArray::ApplyStyleArea( SCROW nStartRow, SCROW nEndRow, ScStyleSheet*
     }
 
 void ScAttrArray::ApplyLineStyleArea( SCROW nStartRow, SCROW nEndRow,
-                                      const SvxBorderLine* pLine, sal_Bool bColorOnly )
+                                      const SvxBorderLine* pLine, bool bColorOnly )
 {
     if ( bColorOnly && !pLine )
         return;
@@ -615,11 +615,11 @@ void ScAttrArray::ApplyLineStyleArea( SCROW nStartRow, SCROW nEndRow,
             const ScPatternAttr*    pOldPattern = pData[nPos].pPattern;
             const SfxItemSet&       rOldSet = pOldPattern->GetItemSet();
             const SfxPoolItem*      pBoxItem = 0;
-            SfxItemState            eState = rOldSet.GetItemState( ATTR_BORDER, sal_True, &pBoxItem );
+            SfxItemState            eState = rOldSet.GetItemState( ATTR_BORDER, true, &pBoxItem );
             const SfxPoolItem*      pTLBRItem = 0;
-            SfxItemState            eTLBRState = rOldSet.GetItemState( ATTR_BORDER_TLBR, sal_True, &pTLBRItem );
+            SfxItemState            eTLBRState = rOldSet.GetItemState( ATTR_BORDER_TLBR, true, &pTLBRItem );
             const SfxPoolItem*      pBLTRItem = 0;
-            SfxItemState            eBLTRState = rOldSet.GetItemState( ATTR_BORDER_BLTR, sal_True, &pBLTRItem );
+            SfxItemState            eBLTRState = rOldSet.GetItemState( ATTR_BORDER_BLTR, true, &pBLTRItem );
 
             if ( (SFX_ITEM_SET == eState) || (SFX_ITEM_SET == eTLBRState) || (SFX_ITEM_SET == eBLTRState) )
             {
@@ -690,7 +690,7 @@ void ScAttrArray::ApplyLineStyleArea( SCROW nStartRow, SCROW nEndRow,
                 {
                     if (nY1 < nStartRow) nY1=nStartRow;
                     if (nY2 > nEndRow) nY2=nEndRow;
-                    SetPatternArea( nY1, nY2, pNewPattern, sal_True );
+                    SetPatternArea( nY1, nY2, pNewPattern, true );
                     Search( nStart, nPos );
                 }
                 else
@@ -746,7 +746,7 @@ void ScAttrArray::ApplyCacheArea( SCROW nStartRow, SCROW nEndRow, SfxItemPoolCac
         do
         {
             const ScPatternAttr* pOldPattern = pData[nPos].pPattern;
-            const ScPatternAttr* pNewPattern = (const ScPatternAttr*) &pCache->ApplyTo( *pOldPattern, sal_True );
+            const ScPatternAttr* pNewPattern = (const ScPatternAttr*) &pCache->ApplyTo( *pOldPattern, true );
             ScDocumentPool::CheckRef( *pOldPattern );
             ScDocumentPool::CheckRef( *pNewPattern );
             if (pNewPattern != pOldPattern)
@@ -840,7 +840,7 @@ void lcl_MergeDeep( SfxItemSet& rMergeSet, const SfxItemSet& rSource )
 
         if ( eOldState == SFX_ITEM_DEFAULT )
         {
-            SfxItemState eNewState = rSource.GetItemState( nId, sal_True, &pNewItem );
+            SfxItemState eNewState = rSource.GetItemState( nId, true, &pNewItem );
             if ( eNewState == SFX_ITEM_SET )
             {
                 if ( *pNewItem != rMergeSet.GetPool()->GetDefaultItem(nId) )
@@ -849,7 +849,7 @@ void lcl_MergeDeep( SfxItemSet& rMergeSet, const SfxItemSet& rSource )
         }
         else if ( eOldState == SFX_ITEM_SET )               // Item gesetzt
         {
-            SfxItemState eNewState = rSource.GetItemState( nId, sal_True, &pNewItem );
+            SfxItemState eNewState = rSource.GetItemState( nId, true, &pNewItem );
             if ( eNewState == SFX_ITEM_SET )
             {
                 if ( pNewItem != pOldItem )                 // beide gepuhlt
@@ -867,7 +867,7 @@ void lcl_MergeDeep( SfxItemSet& rMergeSet, const SfxItemSet& rSource )
 
 
 void ScAttrArray::MergePatternArea( SCROW nStartRow, SCROW nEndRow,
-                                    ScMergePatternState& rState, sal_Bool bDeep ) const
+                                    ScMergePatternState& rState, bool bDeep ) const
 {
     if (ValidRow(nStartRow) && ValidRow(nEndRow))
     {
@@ -916,7 +916,7 @@ void ScAttrArray::MergePatternArea( SCROW nStartRow, SCROW nEndRow,
 
 // assemble border
 
-sal_Bool lcl_TestAttr( const SvxBorderLine* pOldLine, const SvxBorderLine* pNewLine,
+bool lcl_TestAttr( const SvxBorderLine* pOldLine, const SvxBorderLine* pNewLine,
                             sal_uInt8& rModified, const SvxBorderLine*& rpNew )
 {
     if (rModified == SC_LINE_DONTCARE)
@@ -950,7 +950,7 @@ sal_Bool lcl_TestAttr( const SvxBorderLine* pOldLine, const SvxBorderLine* pNewL
 
 void lcl_MergeToFrame( SvxBoxItem* pLineOuter, SvxBoxInfoItem* pLineInner,
                                 ScLineFlags& rFlags, const ScPatternAttr* pPattern,
-                                sal_Bool bLeft, SCCOL nDistRight, sal_Bool bTop, SCROW nDistBottom )
+                                bool bLeft, SCCOL nDistRight, bool bTop, SCROW nDistBottom )
 {
     // right/bottom border set when connected together
     const ScMergeAttr& rMerge = (const ScMergeAttr&)pPattern->GetItem(ATTR_MERGE);
@@ -1014,19 +1014,19 @@ void lcl_MergeToFrame( SvxBoxItem* pLineOuter, SvxBoxInfoItem* pLineInner,
 
 void ScAttrArray::MergeBlockFrame( SvxBoxItem* pLineOuter, SvxBoxInfoItem* pLineInner,
                     ScLineFlags& rFlags,
-                    SCROW nStartRow, SCROW nEndRow, sal_Bool bLeft, SCCOL nDistRight ) const
+                    SCROW nStartRow, SCROW nEndRow, bool bLeft, SCCOL nDistRight ) const
 {
     const ScPatternAttr* pPattern;
 
     if (nStartRow == nEndRow)
     {
         pPattern = GetPattern( nStartRow );
-        lcl_MergeToFrame( pLineOuter, pLineInner, rFlags, pPattern, bLeft, nDistRight, sal_True, 0 );
+        lcl_MergeToFrame( pLineOuter, pLineInner, rFlags, pPattern, bLeft, nDistRight, true, 0 );
     }
     else
     {
         pPattern = GetPattern( nStartRow );
-        lcl_MergeToFrame( pLineOuter, pLineInner, rFlags, pPattern, bLeft, nDistRight, sal_True,
+        lcl_MergeToFrame( pLineOuter, pLineInner, rFlags, pPattern, bLeft, nDistRight, true,
                             nEndRow-nStartRow );
 
         SCSIZE nStartIndex;
@@ -1052,10 +1052,10 @@ void ScAttrArray::MergeBlockFrame( SvxBoxItem* pLineOuter, SvxBoxInfoItem* pLine
 
 // ApplyFrame - on an entry into the array
 
-sal_Bool ScAttrArray::ApplyFrame( const SvxBoxItem*     pBoxItem,
+bool ScAttrArray::ApplyFrame( const SvxBoxItem*     pBoxItem,
                               const SvxBoxInfoItem* pBoxInfoItem,
                               SCROW nStartRow, SCROW nEndRow,
-                              sal_Bool bLeft, SCCOL nDistRight, sal_Bool bTop, SCROW nDistBottom )
+                              bool bLeft, SCCOL nDistRight, bool bTop, SCROW nDistBottom )
 {
     OSL_ENSURE( pBoxItem && pBoxInfoItem, "Linienattribute fehlen!" );
 
@@ -1101,14 +1101,14 @@ sal_Bool ScAttrArray::ApplyFrame( const SvxBoxItem*     pBoxItem,
 
 
 void ScAttrArray::ApplyBlockFrame( const SvxBoxItem* pLineOuter, const SvxBoxInfoItem* pLineInner,
-                            SCROW nStartRow, SCROW nEndRow, sal_Bool bLeft, SCCOL nDistRight )
+                            SCROW nStartRow, SCROW nEndRow, bool bLeft, SCCOL nDistRight )
 {
     if (nStartRow == nEndRow)
-        ApplyFrame( pLineOuter, pLineInner, nStartRow, nEndRow, bLeft, nDistRight, sal_True, 0 );
+        ApplyFrame( pLineOuter, pLineInner, nStartRow, nEndRow, bLeft, nDistRight, true, 0 );
     else
     {
         ApplyFrame( pLineOuter, pLineInner, nStartRow, nStartRow, bLeft, nDistRight,
-                        sal_True, nEndRow-nStartRow );
+                        true, nEndRow-nStartRow );
 
         if ( nEndRow > nStartRow+1 )     // inner part available?
         {
@@ -1121,7 +1121,7 @@ void ScAttrArray::ApplyBlockFrame( const SvxBoxItem* pLineOuter, const SvxBoxInf
             for (SCSIZE i=nStartIndex; i<=nEndIndex;)
             {
                 nTmpEnd = Min( (SCROW)(nEndRow-1), (SCROW)(pData[i].nRow) );
-                sal_Bool bChanged = ApplyFrame( pLineOuter, pLineInner, nTmpStart, nTmpEnd,
+                bool bChanged = ApplyFrame( pLineOuter, pLineInner, nTmpStart, nTmpEnd,
                                             bLeft, nDistRight, false, nEndRow-nTmpEnd );
                 nTmpStart = nTmpEnd+1;
                 if (bChanged)
@@ -1163,14 +1163,14 @@ long lcl_LineSize( const SvxBorderLine& rLine )
     return nTotal;
 }
 
-sal_Bool ScAttrArray::HasLines( SCROW nRow1, SCROW nRow2, Rectangle& rSizes,
-                                sal_Bool bLeft, sal_Bool bRight ) const
+bool ScAttrArray::HasLines( SCROW nRow1, SCROW nRow2, Rectangle& rSizes,
+                                bool bLeft, bool bRight ) const
 {
     SCSIZE nStartIndex;
     SCSIZE nEndIndex;
     Search( nRow1, nStartIndex );
     Search( nRow2, nEndIndex );
-    sal_Bool bFound = false;
+    bool bFound = false;
 
     const SvxBoxItem* pItem = 0;
     const SvxBorderLine* pLine = 0;
@@ -1185,7 +1185,7 @@ sal_Bool ScAttrArray::HasLines( SCROW nRow1, SCROW nRow2, Rectangle& rSizes,
         nCmp = lcl_LineSize(*pLine);
         if ( nCmp > rSizes.Top() )
             rSizes.Top() = nCmp;
-        bFound = sal_True;
+        bFound = true;
     }
 
     // down
@@ -1198,7 +1198,7 @@ sal_Bool ScAttrArray::HasLines( SCROW nRow1, SCROW nRow2, Rectangle& rSizes,
         nCmp = lcl_LineSize(*pLine);
         if ( nCmp > rSizes.Bottom() )
             rSizes.Bottom() = nCmp;
-        bFound = sal_True;
+        bFound = true;
     }
 
     if ( bLeft || bRight )
@@ -1214,7 +1214,7 @@ sal_Bool ScAttrArray::HasLines( SCROW nRow1, SCROW nRow2, Rectangle& rSizes,
                     nCmp = lcl_LineSize(*pLine);
                     if ( nCmp > rSizes.Left() )
                         rSizes.Left() = nCmp;
-                    bFound = sal_True;
+                    bFound = true;
                 }
             }
 
@@ -1226,7 +1226,7 @@ sal_Bool ScAttrArray::HasLines( SCROW nRow1, SCROW nRow2, Rectangle& rSizes,
                     nCmp = lcl_LineSize(*pLine);
                     if ( nCmp > rSizes.Right() )
                         rSizes.Right() = nCmp;
-                    bFound = sal_True;
+                    bFound = true;
                 }
             }
         }
@@ -1350,9 +1350,9 @@ bool ScAttrArray::HasAttrib( SCROW nRow1, SCROW nRow2, sal_uInt16 nMask ) const
 }
 
 // Area around any given summaries expand and adapt any MergeFlag (bRefresh)
-sal_Bool ScAttrArray::ExtendMerge( SCCOL nThisCol, SCROW nStartRow, SCROW nEndRow,
+bool ScAttrArray::ExtendMerge( SCCOL nThisCol, SCROW nStartRow, SCROW nEndRow,
                                 SCCOL& rPaintCol, SCROW& rPaintRow,
-                                sal_Bool bRefresh )
+                                bool bRefresh )
 {
     const ScPatternAttr* pPattern;
     const ScMergeAttr* pItem;
@@ -1360,7 +1360,7 @@ sal_Bool ScAttrArray::ExtendMerge( SCCOL nThisCol, SCROW nStartRow, SCROW nEndRo
     SCSIZE nEndIndex;
     Search( nStartRow, nStartIndex );
     Search( nEndRow, nEndIndex );
-    sal_Bool bFound = false;
+    bool bFound = false;
 
     for (SCSIZE i=nStartIndex; i<=nEndIndex; i++)
     {
@@ -1377,7 +1377,7 @@ sal_Bool ScAttrArray::ExtendMerge( SCCOL nThisCol, SCROW nStartRow, SCROW nEndRo
                 rPaintCol = nMergeEndCol;
             if (nMergeEndRow > rPaintRow && nMergeEndRow <= MAXROW)
                 rPaintRow = nMergeEndRow;
-            bFound = sal_True;
+            bFound = true;
 
             if (bRefresh)
             {
@@ -1402,9 +1402,9 @@ sal_Bool ScAttrArray::ExtendMerge( SCCOL nThisCol, SCROW nStartRow, SCROW nEndRo
 }
 
 
-sal_Bool ScAttrArray::RemoveAreaMerge(SCROW nStartRow, SCROW nEndRow)
+bool ScAttrArray::RemoveAreaMerge(SCROW nStartRow, SCROW nEndRow)
 {
-    sal_Bool bFound = false;
+    bool bFound = false;
     const ScPatternAttr* pPattern;
     const ScMergeAttr* pItem;
     SCSIZE nIndex;
@@ -1466,12 +1466,12 @@ sal_Bool ScAttrArray::RemoveAreaMerge(SCROW nStartRow, SCROW nEndRow)
 
 void ScAttrArray::DeleteAreaSafe(SCROW nStartRow, SCROW nEndRow)
 {
-    SetPatternAreaSafe( nStartRow, nEndRow, pDocument->GetDefPattern(), sal_True );
+    SetPatternAreaSafe( nStartRow, nEndRow, pDocument->GetDefPattern(), true );
 }
 
 
 void ScAttrArray::SetPatternAreaSafe( SCROW nStartRow, SCROW nEndRow,
-                        const ScPatternAttr* pWantedPattern, sal_Bool bDefault )
+                        const ScPatternAttr* pWantedPattern, bool bDefault )
 {
     const ScPatternAttr*    pOldPattern;
     const ScMergeFlagAttr*  pItem;
@@ -1479,7 +1479,7 @@ void ScAttrArray::SetPatternAreaSafe( SCROW nStartRow, SCROW nEndRow,
     SCSIZE  nIndex;
     SCROW   nRow;
     SCROW   nThisRow;
-    sal_Bool    bFirstUse = sal_True;
+    bool    bFirstUse = true;
 
     Search( nStartRow, nIndex );
     nThisRow = (nIndex>0) ? pData[nIndex-1].nRow+1 : 0;
@@ -1502,7 +1502,7 @@ void ScAttrArray::SetPatternAreaSafe( SCROW nStartRow, SCROW nEndRow,
                 ScPatternAttr*  pNewPattern = new ScPatternAttr( *pWantedPattern );
                 SfxItemSet*     pSet = &pNewPattern->GetItemSet();
                 pSet->Put( *pItem );
-                SetPatternArea( nThisRow, nAttrRow, pNewPattern, sal_True );
+                SetPatternArea( nThisRow, nAttrRow, pNewPattern, true );
                 delete pNewPattern;
             }
             else
@@ -1527,7 +1527,7 @@ void ScAttrArray::SetPatternAreaSafe( SCROW nStartRow, SCROW nEndRow,
 }
 
 
-sal_Bool ScAttrArray::ApplyFlags( SCROW nStartRow, SCROW nEndRow, sal_Int16 nFlags )
+bool ScAttrArray::ApplyFlags( SCROW nStartRow, SCROW nEndRow, sal_Int16 nFlags )
 {
     const ScPatternAttr* pOldPattern;
 
@@ -1535,7 +1535,7 @@ sal_Bool ScAttrArray::ApplyFlags( SCROW nStartRow, SCROW nEndRow, sal_Int16 nFla
     SCSIZE  nIndex;
     SCROW   nRow;
     SCROW   nThisRow;
-    sal_Bool    bChanged = false;
+    bool    bChanged = false;
 
     Search( nStartRow, nIndex );
     nThisRow = (nIndex>0) ? pData[nIndex-1].nRow+1 : 0;
@@ -1564,7 +1564,7 @@ sal_Bool ScAttrArray::ApplyFlags( SCROW nStartRow, SCROW nEndRow, sal_Int16 nFla
 }
 
 
-sal_Bool ScAttrArray::RemoveFlags( SCROW nStartRow, SCROW nEndRow, sal_Int16 nFlags )
+bool ScAttrArray::RemoveFlags( SCROW nStartRow, SCROW nEndRow, sal_Int16 nFlags )
 {
     const ScPatternAttr* pOldPattern;
 
@@ -1572,7 +1572,7 @@ sal_Bool ScAttrArray::RemoveFlags( SCROW nStartRow, SCROW nEndRow, sal_Int16 nFl
     SCSIZE  nIndex;
     SCROW   nRow;
     SCROW   nThisRow;
-    sal_Bool    bChanged = false;
+    bool    bChanged = false;
 
     Search( nStartRow, nIndex );
     nThisRow = (nIndex>0) ? pData[nIndex-1].nRow+1 : 0;
@@ -1633,7 +1633,7 @@ void ScAttrArray::ClearItems( SCROW nStartRow, SCROW nEndRow, const sal_uInt16*
 }
 
 
-void ScAttrArray::ChangeIndent( SCROW nStartRow, SCROW nEndRow, sal_Bool bIncrement )
+void ScAttrArray::ChangeIndent( SCROW nStartRow, SCROW nEndRow, bool bIncrement )
 {
     SCSIZE nIndex;
     Search( nStartRow, nIndex );
@@ -1646,7 +1646,7 @@ void ScAttrArray::ChangeIndent( SCROW nStartRow, SCROW nEndRow, sal_Bool bIncrem
         const SfxItemSet& rOldSet = pOldPattern->GetItemSet();
         const SfxPoolItem* pItem;
 
-        sal_Bool bNeedJust = ( rOldSet.GetItemState( ATTR_HOR_JUSTIFY, false, &pItem ) != SFX_ITEM_SET
+        bool bNeedJust = ( rOldSet.GetItemState( ATTR_HOR_JUSTIFY, false, &pItem ) != SFX_ITEM_SET
                         || ((const SvxHorJustifyItem*)pItem)->GetValue() != SVX_HOR_JUSTIFY_LEFT );
         sal_uInt16 nOldValue = ((const SfxUInt16Item&)rOldSet.Get( ATTR_INDENT )).GetValue();
         sal_uInt16 nNewValue = nOldValue;
@@ -1678,7 +1678,7 @@ void ScAttrArray::ChangeIndent( SCROW nStartRow, SCROW nEndRow, sal_Bool bIncrem
             if ( bNeedJust )
                 aNewPattern.GetItemSet().Put(
                                 SvxHorJustifyItem( SVX_HOR_JUSTIFY_LEFT, ATTR_HOR_JUSTIFY ) );
-            SetPatternArea( nThisStart, nAttrRow, &aNewPattern, sal_True );
+            SetPatternArea( nThisStart, nAttrRow, &aNewPattern, true );
 
             nThisStart = nThisEnd + 1;
             Search( nThisStart, nIndex ); // data changed
@@ -1692,7 +1692,7 @@ void ScAttrArray::ChangeIndent( SCROW nStartRow, SCROW nEndRow, sal_Bool bIncrem
 }
 
 
-SCsROW ScAttrArray::GetNextUnprotected( SCsROW nRow, sal_Bool bUp ) const
+SCsROW ScAttrArray::GetNextUnprotected( SCsROW nRow, bool bUp ) const
 {
     long nRet = nRow;
     if (VALIDROW(nRow))
@@ -1758,10 +1758,10 @@ void ScAttrArray::FindStyleSheet( const SfxStyleSheetBase* pStyleSheet, ScFlatBo
 }
 
 
-sal_Bool ScAttrArray::IsStyleSheetUsed( const ScStyleSheet& rStyle,
-        sal_Bool bGatherAllStyles ) const
+bool ScAttrArray::IsStyleSheetUsed( const ScStyleSheet& rStyle,
+        bool bGatherAllStyles ) const
 {
-    sal_Bool    bIsUsed = false;
+    bool    bIsUsed = false;
     SCSIZE  nPos    = 0;
 
     while ( nPos < nCount )
@@ -1773,8 +1773,8 @@ sal_Bool ScAttrArray::IsStyleSheetUsed( const ScStyleSheet& rStyle,
             if ( pStyle == &rStyle )
             {
                 if ( !bGatherAllStyles )
-                    return sal_True;
-                bIsUsed = sal_True;
+                    return true;
+                bIsUsed = true;
             }
         }
         nPos++;
@@ -1784,25 +1784,25 @@ sal_Bool ScAttrArray::IsStyleSheetUsed( const ScStyleSheet& rStyle,
 }
 
 
-sal_Bool ScAttrArray::IsEmpty() const
+bool ScAttrArray::IsEmpty() const
 {
     if (nCount == 1)
     {
         if ( pData[0].pPattern != pDocument->GetDefPattern() )
             return false;
         else
-            return sal_True;
+            return true;
     }
     else
         return false;
 }
 
 
-sal_Bool ScAttrArray::GetFirstVisibleAttr( SCROW& rFirstRow ) const
+bool ScAttrArray::GetFirstVisibleAttr( SCROW& rFirstRow ) const
 {
     OSL_ENSURE( nCount, "nCount == 0" );
 
-    sal_Bool bFound = false;
+    bool bFound = false;
     SCSIZE nStart = 0;
 
     // Skip first entry if more than 1 row.
@@ -1819,7 +1819,7 @@ sal_Bool ScAttrArray::GetFirstVisibleAttr( SCROW& rFirstRow ) const
         if ( pData[nStart].pPattern->IsVisible() )
         {
             rFirstRow = nStart ? ( pData[nStart-1].nRow + 1 ) : 0;
-            bFound = sal_True;
+            bFound = true;
         }
         else
             ++nStart;
@@ -1833,7 +1833,7 @@ sal_Bool ScAttrArray::GetFirstVisibleAttr( SCROW& rFirstRow ) const
 
 const SCROW SC_VISATTR_STOP = 84;
 
-sal_Bool ScAttrArray::GetLastVisibleAttr( SCROW& rLastRow, SCROW nLastData ) const
+bool ScAttrArray::GetLastVisibleAttr( SCROW& rLastRow, SCROW nLastData ) const
 {
     //  #i30830# changed behavior:
     //  ignore all attributes starting with the first run of SC_VISATTR_STOP equal rows
@@ -1842,10 +1842,10 @@ sal_Bool ScAttrArray::GetLastVisibleAttr( SCROW& rLastRow, SCROW nLastData ) con
     if ( nLastData == MAXROW )
     {
         rLastRow = MAXROW;      // can't look for attributes below MAXROW
-        return sal_True;
+        return true;
     }
 
-    sal_Bool bFound = false;
+    bool bFound = false;
 
     //  loop backwards from the end instead of using Search, assuming that
     //  there usually aren't many attributes below the last cell
@@ -1871,7 +1871,7 @@ sal_Bool ScAttrArray::GetLastVisibleAttr( SCROW& rLastRow, SCROW nLastData ) con
         else if ( !bFound && pData[nEndPos].pPattern->IsVisible() )
         {
             rLastRow = pData[nEndPos].nRow;
-            bFound = sal_True;
+            bFound = true;
         }
 
         nPos = nStartPos;           // look further from the top of the range
@@ -1881,16 +1881,16 @@ sal_Bool ScAttrArray::GetLastVisibleAttr( SCROW& rLastRow, SCROW nLastData ) con
 }
 
 
-sal_Bool ScAttrArray::HasVisibleAttrIn( SCROW nStartRow, SCROW nEndRow ) const
+bool ScAttrArray::HasVisibleAttrIn( SCROW nStartRow, SCROW nEndRow ) const
 {
     SCSIZE nIndex;
     Search( nStartRow, nIndex );
     SCROW nThisStart = nStartRow;
-    sal_Bool bFound = false;
+    bool bFound = false;
     while ( nIndex < nCount && nThisStart <= nEndRow && !bFound )
     {
         if ( pData[nIndex].pPattern->IsVisible() )
-            bFound = sal_True;
+            bFound = true;
 
         nThisStart = pData[nIndex].nRow + 1;
         ++nIndex;
@@ -1900,10 +1900,10 @@ sal_Bool ScAttrArray::HasVisibleAttrIn( SCROW nStartRow, SCROW nEndRow ) const
 }
 
 
-sal_Bool ScAttrArray::IsVisibleEqual( const ScAttrArray& rOther,
+bool ScAttrArray::IsVisibleEqual( const ScAttrArray& rOther,
                                     SCROW nStartRow, SCROW nEndRow ) const
 {
-    sal_Bool bEqual = sal_True;
+    bool bEqual = true;
     SCSIZE nThisPos = 0;
     SCSIZE nOtherPos = 0;
     if ( nStartRow > 0 )
@@ -1937,11 +1937,11 @@ sal_Bool ScAttrArray::IsVisibleEqual( const ScAttrArray& rOther,
 }
 
 
-sal_Bool ScAttrArray::IsAllEqual( const ScAttrArray& rOther, SCROW nStartRow, SCROW nEndRow ) const
+bool ScAttrArray::IsAllEqual( const ScAttrArray& rOther, SCROW nStartRow, SCROW nEndRow ) const
 {
     // summarised with IsVisibleEqual
 
-    sal_Bool bEqual = sal_True;
+    bool bEqual = true;
     SCSIZE nThisPos = 0;
     SCSIZE nOtherPos = 0;
     if ( nStartRow > 0 )
@@ -1974,12 +1974,12 @@ sal_Bool ScAttrArray::IsAllEqual( const ScAttrArray& rOther, SCROW nStartRow, SC
 }
 
 
-sal_Bool ScAttrArray::TestInsertCol( SCROW nStartRow, SCROW nEndRow) const
+bool ScAttrArray::TestInsertCol( SCROW nStartRow, SCROW nEndRow) const
 {
     // Horizontal aggregate are not allowed to be moved out; if whole summary,
     // here is not recognized
 
-    sal_Bool bTest = sal_True;
+    bool bTest = true;
     if (!IsEmpty())
     {
         SCSIZE nIndex = 0;
@@ -2002,7 +2002,7 @@ sal_Bool ScAttrArray::TestInsertCol( SCROW nStartRow, SCROW nEndRow) const
 }
 
 
-sal_Bool ScAttrArray::TestInsertRow( SCSIZE nSize ) const
+bool ScAttrArray::TestInsertRow( SCSIZE nSize ) const
 {
     // if 1st row pushed out is vertically overlapped, summary would be broken
 
@@ -2019,7 +2019,7 @@ sal_Bool ScAttrArray::TestInsertRow( SCSIZE nSize ) const
             return false;
     }
 
-    return sal_True;
+    return true;
 }
 
 
@@ -2034,7 +2034,7 @@ void ScAttrArray::InsertRow( SCROW nStartRow, SCSIZE nSize )
 
     // set ScMergeAttr may not be extended (so behind delete again)
 
-    sal_Bool bDoMerge = ((const ScMergeAttr&) pData[nIndex].pPattern->GetItem(ATTR_MERGE)).IsMerged();
+    bool bDoMerge = ((const ScMergeAttr&) pData[nIndex].pPattern->GetItem(ATTR_MERGE)).IsMerged();
 
     SCSIZE nRemove = 0;
     SCSIZE i;
@@ -2076,7 +2076,7 @@ void ScAttrArray::DeleteRow( SCROW nStartRow, SCSIZE nSize )
 {
     if (pData)
     {
-        sal_Bool bFirst=sal_True;
+        bool bFirst=true;
         SCSIZE nStartIndex = 0;
         SCSIZE nEndIndex = 0;
         SCSIZE i;
@@ -2176,7 +2176,7 @@ void ScAttrArray::DeleteHardAttr(SCROW nStartRow, SCROW nEndRow)
             if ( aNewPattern == *pDefPattern )
                 SetPatternArea( nThisRow, nAttrRow, pDefPattern, false );
             else
-                SetPatternArea( nThisRow, nAttrRow, &aNewPattern, sal_True );
+                SetPatternArea( nThisRow, nAttrRow, &aNewPattern, true );
 
             Search( nThisRow, nIndex );  // data changed
         }
@@ -2194,11 +2194,11 @@ void ScAttrArray::MoveTo(SCROW nStartRow, SCROW nEndRow, ScAttrArray& rAttrArray
     SCROW nStart = nStartRow;
     for (SCSIZE i = 0; i < nCount; i++)
     {
-        if ((pData[i].nRow >= nStartRow) && ((i==0) ? sal_True : pData[i-1].nRow < nEndRow))
+        if ((pData[i].nRow >= nStartRow) && ((i==0) ? true : pData[i-1].nRow < nEndRow))
         {
             // copy (bPutToPool=TRUE)
             rAttrArray.SetPatternArea( nStart, Min( (SCROW)pData[i].nRow, (SCROW)nEndRow ),
-                                        pData[i].pPattern, sal_True );
+                                        pData[i].pPattern, true );
         }
         nStart = Max( (SCROW)nStart, (SCROW)(pData[i].nRow + 1) );
     }
@@ -2219,7 +2219,7 @@ void ScAttrArray::CopyArea( SCROW nStartRow, SCROW nEndRow, long nDy, ScAttrArra
 
     ScDocumentPool* pSourceDocPool = pDocument->GetPool();
     ScDocumentPool* pDestDocPool = rAttrArray.pDocument->GetPool();
-    sal_Bool bSamePool = (pSourceDocPool==pDestDocPool);
+    bool bSamePool = (pSourceDocPool==pDestDocPool);
 
     for (SCSIZE i = 0; (i < nCount) && (nDestStart <= nDestEnd); i++)
     {
@@ -2292,7 +2292,7 @@ void ScAttrArray::CopyAreaSafe( SCROW nStartRow, SCROW nEndRow, long nDy, ScAttr
 
     ScDocumentPool* pSourceDocPool = pDocument->GetPool();
     ScDocumentPool* pDestDocPool = rAttrArray.pDocument->GetPool();
-    sal_Bool bSamePool = (pSourceDocPool==pDestDocPool);
+    bool bSamePool = (pSourceDocPool==pDestDocPool);
 
     for (SCSIZE i = 0; (i < nCount) && (nDestStart <= nDestEnd); i++)
     {
@@ -2318,9 +2318,9 @@ void ScAttrArray::CopyAreaSafe( SCROW nStartRow, SCROW nEndRow, long nDy, ScAttr
 
 
 SCsROW ScAttrArray::SearchStyle( SCsROW nRow, const ScStyleSheet* pSearchStyle,
-                                    sal_Bool bUp, ScMarkArray* pMarkArray )
+                                    bool bUp, ScMarkArray* pMarkArray )
 {
-    sal_Bool bFound = false;
+    bool bFound = false;
 
     if (pMarkArray)
     {
@@ -2342,10 +2342,10 @@ SCsROW ScAttrArray::SearchStyle( SCsROW nRow, const ScStyleSheet* pSearchStyle,
                 nRow = pMarkArray->GetNextMarked( nRow, bUp );
                 SCROW nStart = nIndex ? pData[nIndex-1].nRow+1 : 0;
                 if (nRow >= nStart && nRow <= pData[nIndex].nRow)
-                    bFound = sal_True;
+                    bFound = true;
             }
             else
-                bFound = sal_True;
+                bFound = true;
         }
 
         if (!bFound)
@@ -2380,8 +2380,8 @@ SCsROW ScAttrArray::SearchStyle( SCsROW nRow, const ScStyleSheet* pSearchStyle,
 }
 
 
-sal_Bool ScAttrArray::SearchStyleRange( SCsROW& rRow, SCsROW& rEndRow,
-                        const ScStyleSheet* pSearchStyle, sal_Bool bUp, ScMarkArray* pMarkArray )
+bool ScAttrArray::SearchStyleRange( SCsROW& rRow, SCsROW& rEndRow,
+                        const ScStyleSheet* pSearchStyle, bool bUp, ScMarkArray* pMarkArray )
 {
     SCsROW nStartRow = SearchStyle( rRow, pSearchStyle, bUp, pMarkArray );
     if (VALIDROW(nStartRow))
@@ -2398,7 +2398,7 @@ sal_Bool ScAttrArray::SearchStyleRange( SCsROW& rRow, SCsROW& rEndRow,
                 rEndRow = 0;
             if (pMarkArray)
             {
-                SCROW nMarkEnd = pMarkArray->GetMarkEnd( nStartRow, sal_True );
+                SCROW nMarkEnd = pMarkArray->GetMarkEnd( nStartRow, true );
                 if (nMarkEnd>rEndRow)
                     rEndRow = nMarkEnd;
             }
@@ -2414,7 +2414,7 @@ sal_Bool ScAttrArray::SearchStyleRange( SCsROW& rRow, SCsROW& rEndRow,
             }
         }
 
-        return sal_True;
+        return true;
     }
     else
         return false;
commit bdb2df3820d26ec933feaff4d6fbbbb1a5fbf5f0
Author: Eike Rathke <erack at redhat.com>
Date:   Thu Nov 10 14:29:22 2011 +0100

    Fixed fdo#36247 mismatch between drawing layer and cell grid
    
    * Ensure that the drawing layer's map mode scaling factors match the new
      heights and widths after resize.

diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx
index dacdb11..4ec207f 100644
--- a/sc/source/ui/view/viewfunc.cxx
+++ b/sc/source/ui/view/viewfunc.cxx
@@ -2311,6 +2311,10 @@ void ScViewFunc::SetWidthOrHeight( sal_Bool bWidth, SCCOLROW nRangeCnt, SCCOLROW
                                      pUndoTab, eMode, nSizeTwips, bWidth ) );
     }
 
+    // fdo#36247 Ensure that the drawing layer's map mode scaling factors match
+    // the new heights and widths.
+    GetViewData()->GetView()->RefreshZoom();
+
     itr = pMarkData->begin();
     for (; itr != itrEnd; ++itr)
         pDoc->UpdatePageBreaks( *itr );


More information about the Libreoffice-commits mailing list