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

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu Jan 3 17:04:42 PST 2013


 sw/source/filter/xml/xmlfmt.cxx   |    2 
 sw/source/filter/xml/xmlimp.cxx   |   22 +++---
 sw/source/filter/xml/xmlimp.hxx   |   23 +++---
 sw/source/filter/xml/xmlimpit.cxx |  128 +++++++++++++++++++-------------------
 sw/source/filter/xml/xmlimpit.hxx |    6 -
 sw/source/filter/xml/xmlitemi.cxx |   10 +-
 sw/source/filter/xml/xmlithlp.cxx |   38 +++++------
 sw/source/filter/xml/xmlithlp.hxx |   26 ++-----
 sw/source/filter/xml/xmltexti.cxx |    4 -
 sw/source/filter/xml/xmltexti.hxx |    4 -
 10 files changed, 126 insertions(+), 137 deletions(-)

New commits:
commit 6a393297ce6d99bbc4edefbf01ab9c5c6f0eff84
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Thu Jan 3 16:51:28 2013 +0900

    sal_Bool to bool
    
    Change-Id: I6c04aea3a0bba0308206bb3c9d8435606b7a4d81

diff --git a/sw/source/filter/xml/xmlfmt.cxx b/sw/source/filter/xml/xmlfmt.cxx
index 819c64b..205b046 100644
--- a/sw/source/filter/xml/xmlfmt.cxx
+++ b/sw/source/filter/xml/xmlfmt.cxx
@@ -1068,7 +1068,7 @@ void SwXMLImport::UpdateTxtCollConditions( SwDoc *pDoc )
     }
 }
 
-sal_Bool SwXMLImport::FindAutomaticStyle(
+bool SwXMLImport::FindAutomaticStyle(
         sal_uInt16 nFamily,
         const OUString& rName,
         const SfxItemSet **ppItemSet,
diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx
index 54726d3..d085eb8 100644
--- a/sw/source/filter/xml/xmlimp.cxx
+++ b/sw/source/filter/xml/xmlimp.cxx
@@ -419,12 +419,12 @@ SwXMLImport::SwXMLImport(
     pGraphicResolver( 0 ),
     pEmbeddedResolver( 0 ),
     nStyleFamilyMask( SFX_STYLE_FAMILY_ALL ),
-    bLoadDoc( sal_True ),
-    bInsert( sal_False ),
-    bBlock( sal_False ),
-    bShowProgress( sal_True ),
-    bOrganizerMode( sal_False ),
-    bInititedXForms( sal_False ),
+    bLoadDoc( true ),
+    bInsert( false ),
+    bBlock( false ),
+    bShowProgress( true ),
+    bOrganizerMode( false ),
+    bInititedXForms( false ),
     bPreserveRedlineMode( sal_True )
 {
     _InitItemImport();
@@ -442,7 +442,7 @@ SwXMLImport::~SwXMLImport() throw ()
 void SwXMLImport::setTextInsertMode(
          const Reference< XTextRange > & rInsertPos )
 {
-    bInsert = sal_True;
+    bInsert = true;
 
     Reference < XText > xText = rInsertPos->getText();
     Reference < XTextCursor > xTextCursor =
@@ -455,17 +455,17 @@ void SwXMLImport::setStyleInsertMode( sal_uInt16 nFamilies,
 {
     bInsert = !bOverwrite;
     nStyleFamilyMask = nFamilies;
-    bLoadDoc = sal_False;
+    bLoadDoc = false;
 }
 
 void SwXMLImport::setBlockMode( )
 {
-    bBlock = sal_True;
+    bBlock = true;
 }
 
 void SwXMLImport::setOrganizerMode( )
 {
-    bOrganizerMode = sal_True;
+    bOrganizerMode = true;
 }
 
 namespace
@@ -1730,7 +1730,7 @@ void SwXMLImport::initXForms()
     if( ! pDoc->isXForms() )
         pDoc->initXForms( false );
 
-    bInititedXForms = sal_True;
+    bInititedXForms = true;
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/xml/xmlimp.hxx b/sw/source/filter/xml/xmlimp.hxx
index f9da2ae..e77cedd 100644
--- a/sw/source/filter/xml/xmlimp.hxx
+++ b/sw/source/filter/xml/xmlimp.hxx
@@ -68,15 +68,15 @@ class SwXMLImport: public SvXMLImport
                             xLateInitSettings;
 
     sal_uInt16              nStyleFamilyMask;// Mask of styles to load
-    sal_Bool                bLoadDoc : 1;   // Load doc or styles only
-    sal_Bool                bInsert : 1;    // Insert mode. If styles are
+    bool                bLoadDoc : 1;   // Load doc or styles only
+    bool                bInsert : 1;    // Insert mode. If styles are
                                             // loaded only sal_False means that
                                             // existing styles will be
                                             // overwritten.
-    sal_Bool                bBlock : 1;     // Load text block
-    sal_Bool                bShowProgress : 1;
-    sal_Bool                bOrganizerMode : 1;
-    sal_Bool                bInititedXForms : 1;
+    bool                bBlock : 1;     // Load text block
+    bool                bShowProgress : 1;
+    bool                bOrganizerMode : 1;
+    bool                bInititedXForms : 1;
     sal_Bool                bPreserveRedlineMode;
 
     void                    _InitItemImport();
@@ -153,10 +153,10 @@ public:
                     ::com::sun::star::xml::sax::XAttributeList > & xAttrList );
     SvXMLImportContext *CreateBodyContentContext( const ::rtl::OUString& rLocalName );
     sal_uInt16 GetStyleFamilyMask() const { return nStyleFamilyMask; }
-    sal_Bool IsInsertMode() const { return bInsert; }
-    sal_Bool IsStylesOnlyMode() const { return !bLoadDoc; }
-    sal_Bool IsBlockMode() const { return bBlock; }
-    sal_Bool IsOrganizerMode() const { return bOrganizerMode; }
+    bool IsInsertMode() const { return bInsert; }
+    bool IsStylesOnlyMode() const { return !bLoadDoc; }
+    bool IsBlockMode() const { return bBlock; }
+    bool IsOrganizerMode() const { return bOrganizerMode; }
 
     inline const SvXMLUnitConverter& GetTwipUnitConverter() const;
     inline const SvXMLImportItemMapper& GetTableItemMapper() const;
@@ -171,7 +171,7 @@ public:
     const SvXMLTokenMap& GetTableElemTokenMap();
     const SvXMLTokenMap& GetTableCellAttrTokenMap();
 
-    sal_Bool FindAutomaticStyle( sal_uInt16 nFamily,
+    bool FindAutomaticStyle( sal_uInt16 nFamily,
                              const ::rtl::OUString& rName,
                              const SfxItemSet **ppItemSet=0,
                              ::rtl::OUString *pParent=0 ) const;
diff --git a/sw/source/filter/xml/xmlimpit.cxx b/sw/source/filter/xml/xmlimpit.cxx
index 7c70e7f..124a785 100644
--- a/sw/source/filter/xml/xmlimpit.cxx
+++ b/sw/source/filter/xml/xmlimpit.cxx
@@ -119,7 +119,7 @@ void SvXMLImportItemMapper::importXML( SfxItemSet& rSet,
                 if(eState >= SFX_ITEM_DEFAULT && pItem)
                 {
                     SfxPoolItem *pNewItem = pItem->Clone();
-                    sal_Bool bPut = sal_False;
+                    bool bPut = false;
 
                     if( 0 == (pEntry->nMemberId&MID_SW_FLAG_SPECIAL_ITEM_IMPORT) )
                     {
@@ -193,7 +193,7 @@ void SvXMLImportItemMapper::importXML( SfxItemSet& rSet,
 
 /** this method is called for every item that has the
     MID_SW_FLAG_SPECIAL_ITEM_IMPORT flag set */
-sal_Bool
+bool
 SvXMLImportItemMapper::handleSpecialItem(  const SvXMLItemMapEntry& /*rEntry*/,
                                             SfxPoolItem& /*rItem*/,
                                             SfxItemSet& /*rSet*/,
@@ -202,19 +202,19 @@ SvXMLImportItemMapper::handleSpecialItem(  const SvXMLItemMapEntry& /*rEntry*/,
                                             const SvXMLNamespaceMap& /*rNamespaceMap*/ )
 {
     OSL_FAIL( "unsuported special item in xml import" );
-    return sal_False;
+    return false;
 }
 
 /** this method is called for every item that has the
     MID_SW_FLAG_NO_ITEM_IMPORT flag set */
-sal_Bool SvXMLImportItemMapper::handleNoItem( const SvXMLItemMapEntry& /*rEntry*/,
+bool SvXMLImportItemMapper::handleNoItem( const SvXMLItemMapEntry& /*rEntry*/,
                                            SfxItemSet& /*rSet*/,
                                            const OUString& /*rValue*/,
                                            const SvXMLUnitConverter& /*rUnitConverter*/,
                                            const SvXMLNamespaceMap& /*rNamespaceMap*/ )
 {
     OSL_FAIL( "unsuported no item in xml import" );
-    return sal_False;
+    return false;
 }
 
 void
@@ -226,13 +226,13 @@ SvXMLImportItemMapper::finished(SfxItemSet &, SvXMLUnitConverter const&) const
 
 
 // put an XML-string value into an item
-sal_Bool SvXMLImportItemMapper::PutXMLValue(
+bool SvXMLImportItemMapper::PutXMLValue(
     SfxPoolItem& rItem,
     const ::rtl::OUString& rValue,
     sal_uInt16 nMemberId,
     const SvXMLUnitConverter& rUnitConverter )
 {
-    sal_Bool bOk = sal_False;
+    bool bOk = false;
 
     switch (rItem.Which())
         {
@@ -329,8 +329,8 @@ sal_Bool SvXMLImportItemMapper::PutXMLValue(
             SvxShadowItem* pShadow = PTR_CAST(SvxShadowItem, &rItem);
             OSL_ENSURE( pShadow != NULL, "Wrong Which-ID" );
 
-            sal_Bool bColorFound = sal_False;
-            sal_Bool bOffsetFound = sal_False;
+            bool bColorFound = false;
+            bool bOffsetFound = false;
 
             SvXMLTokenEnumerator aTokenEnum( rValue );
 
@@ -343,17 +343,17 @@ sal_Bool SvXMLImportItemMapper::PutXMLValue(
                 if( IsXMLToken( aToken, XML_NONE ) )
                 {
                     pShadow->SetLocation( SVX_SHADOW_NONE );
-                    bOk = sal_True;
+                    bOk = true;
                 }
                 else if( !bColorFound && aToken.compareToAscii( "#", 1 ) == 0 )
                 {
                     sal_Int32 nColor(0);
                     bOk = ::sax::Converter::convertColor( nColor, aToken );
                     if( !bOk )
-                        return sal_False;
+                        return false;
 
                     aColor.SetColor(nColor);
-                    bColorFound = sal_True;
+                    bColorFound = true;
                 }
                 else if( !bOffsetFound )
                 {
@@ -401,7 +401,7 @@ sal_Bool SvXMLImportItemMapper::PutXMLValue(
                 pShadow->SetColor( aColor );
             }
             else
-                bOk = sal_False;
+                bOk = false;
         }
         break;
 
@@ -432,7 +432,7 @@ sal_Bool SvXMLImportItemMapper::PutXMLValue(
                     if (!rUnitConverter.convertMeasureToCore( nTemp, rValue,
                                 0, 0xffff ))
                     {
-                        return sal_False;
+                        return false;
                     }
 
                     if( nMemberId == LEFT_BORDER_PADDING ||
@@ -455,9 +455,9 @@ sal_Bool SvXMLImportItemMapper::PutXMLValue(
                 case TOP_BORDER:
                 case BOTTOM_BORDER:
                 {
-                    sal_Bool bHasStyle = sal_False;
-                    sal_Bool bHasWidth = sal_False;
-                    sal_Bool bHasColor = sal_False;
+                    bool bHasStyle = false;
+                    bool bHasWidth = false;
+                    bool bHasColor = false;
 
                     sal_uInt16 nStyle = USHRT_MAX;
                     sal_uInt16 nWidth = 0;
@@ -469,7 +469,7 @@ sal_Bool SvXMLImportItemMapper::PutXMLValue(
                                                       bHasStyle, nStyle,
                                                       bHasWidth, nWidth, nNamedWidth,
                                                       bHasColor, aColor ) )
-                        return sal_False;
+                        return false;
 
                     if( TOP_BORDER == nMemberId || ALL_BORDER == nMemberId )
                         sw_frmitems_setXMLBorder( pTop,
@@ -508,22 +508,22 @@ sal_Bool SvXMLImportItemMapper::PutXMLValue(
 
                     OUString aToken;
                     if( !aTokenEnum.getNextToken( aToken ) )
-                        return sal_False;
+                        return false;
 
                     if (!rUnitConverter.convertMeasureToCore(nInWidth, aToken))
-                        return sal_False;
+                        return false;
 
                     if( !aTokenEnum.getNextToken( aToken ) )
-                        return sal_False;
+                        return false;
 
                     if (!rUnitConverter.convertMeasureToCore(nDistance, aToken))
-                        return sal_False;
+                        return false;
 
                     if( !aTokenEnum.getNextToken( aToken ) )
-                        return sal_False;
+                        return false;
 
                     if (!rUnitConverter.convertMeasureToCore(nOutWidth, aToken))
-                        return sal_False;
+                        return false;
 
                     // #i61946: accept line style even it's not part of our "normal" set of line styles
                     sal_uInt16 nWidth = 0;
@@ -569,7 +569,7 @@ sal_Bool SvXMLImportItemMapper::PutXMLValue(
             delete pLeft;
             delete pRight;
 
-            bOk = sal_True;
+            bOk = true;
         }
         break;
 
@@ -581,12 +581,12 @@ sal_Bool SvXMLImportItemMapper::PutXMLValue(
             sal_uInt16 eEnum;
 
             if( !rUnitConverter.convertEnum( eEnum, rValue, psXML_BreakType ) )
-                return sal_False;
+                return false;
 
             if( eEnum == 0 )
             {
                 pFmtBreak->SetValue( SVX_BREAK_NONE );
-                bOk = sal_True;
+                bOk = true;
             }
             else
             {
@@ -603,7 +603,7 @@ sal_Bool SvXMLImportItemMapper::PutXMLValue(
                                              SVX_BREAK_PAGE_AFTER) );
                         break;
                 }
-                bOk = sal_True;
+                bOk = true;
             }
         }
         break;
@@ -617,13 +617,13 @@ sal_Bool SvXMLImportItemMapper::PutXMLValue(
                  IsXMLToken( rValue, XML_TRUE ) )
             {
                 pFmtKeep->SetValue( sal_True );
-                bOk = sal_True;
+                bOk = true;
             }
             else if( IsXMLToken( rValue, XML_AUTO ) ||
                      IsXMLToken( rValue, XML_FALSE ) )
             {
                 pFmtKeep->SetValue( sal_False );
-                bOk = sal_True;
+                bOk = true;
             }
         }
         break;
@@ -640,14 +640,14 @@ sal_Bool SvXMLImportItemMapper::PutXMLValue(
                     if( IsXMLToken( rValue, XML_TRANSPARENT ) )
                     {
                         pBrush->GetColor().SetTransparency(0xff);
-                        bOk = sal_True;
+                        bOk = true;
                     }
                     else if (::sax::Converter::convertColor(nTempColor, rValue))
                     {
                         Color aTempColor(nTempColor);
                         aTempColor.SetTransparency(0);
                         pBrush->SetColor( aTempColor );
-                        bOk = sal_True;
+                        bOk = true;
                     }
                     break;
 
@@ -660,7 +660,7 @@ sal_Bool SvXMLImportItemMapper::PutXMLValue(
                     if( GPOS_NONE == eOldGraphicPos &&
                         GPOS_NONE != pBrush->GetGraphicPos() )
                         pBrush->SetGraphicPos( GPOS_TILED );
-                    bOk = sal_True  ;
+                    bOk = true;
                 }
                 break;
 
@@ -674,7 +674,7 @@ sal_Bool SvXMLImportItemMapper::PutXMLValue(
                         if( GPOS_MM != nPos || GPOS_NONE == eGraphicPos ||
                             GPOS_AREA == eGraphicPos || GPOS_TILED == eGraphicPos )
                             pBrush->SetGraphicPos( (SvxGraphicPosition)nPos );
-                        bOk = sal_True;
+                        bOk = true;
                     }
                 }
                 break;
@@ -685,13 +685,13 @@ sal_Bool SvXMLImportItemMapper::PutXMLValue(
                     sal_uInt16 nTmp;
                     SvXMLTokenEnumerator aTokenEnum( rValue );
                     OUString aToken;
-                    sal_Bool bHori = sal_False, bVert = sal_False;
-                    bOk = sal_True;
+                    bool bHori = false, bVert = false;
+                    bOk = true;
                     while( bOk && aTokenEnum.getNextToken( aToken ) )
                     {
                         if( bHori && bVert )
                         {
-                            bOk = sal_False;
+                            bOk = false;
                         }
                         else if( -1 != aToken.indexOf( sal_Unicode('%') ) )
                         {
@@ -702,20 +702,20 @@ sal_Bool SvXMLImportItemMapper::PutXMLValue(
                                 {
                                     ePos = nPrc < 25 ? GPOS_LT :
                                                (nPrc < 75 ? GPOS_MM : GPOS_RB);
-                                    bHori = sal_True;
+                                    bHori = true;
                                 }
                                 else
                                 {
                                     eTmp = nPrc < 25 ? GPOS_LT:
                                                (nPrc < 75 ? GPOS_LM : GPOS_LB);
                                     sw_frmitems_MergeXMLVertPos( ePos, eTmp );
-                                    bVert = sal_True;
+                                    bVert = true;
                                 }
                             }
                             else
                             {
                                 // wrong percentage
-                                bOk = sal_False;
+                                bOk = false;
                             }
                         }
                         else if( IsXMLToken( aToken, XML_CENTER ) )
@@ -736,8 +736,8 @@ sal_Bool SvXMLImportItemMapper::PutXMLValue(
                             else if( !bHori )
                                 ePos = (SvxGraphicPosition)nTmp;
                             else
-                                bOk = sal_False;
-                            bHori = sal_True;
+                                bOk = false;
+                            bHori = true;
                         }
                         else if( rUnitConverter.convertEnum( nTmp, aToken,
                                                          psXML_BrushVertPos ) )
@@ -748,16 +748,16 @@ sal_Bool SvXMLImportItemMapper::PutXMLValue(
                             else if( !bVert )
                                 ePos = (SvxGraphicPosition)nTmp;
                             else
-                                bOk = sal_False;
-                            bVert = sal_True;
+                                bOk = false;
+                            bVert = true;
                         }
                         else
                         {
-                            bOk = sal_False;
+                            bOk = false;
                         }
                     }
 
-                    bOk &= GPOS_NONE != ePos;
+                    if( GPOS_NONE == ePos ) bOk = false;
                     if( bOk )
                         pBrush->SetGraphicPos( ePos );
                 }
@@ -765,7 +765,7 @@ sal_Bool SvXMLImportItemMapper::PutXMLValue(
 
                 case MID_GRAPHIC_FILTER:
                     pBrush->SetGraphicFilter( rValue );
-                    bOk = sal_True;
+                    bOk = true;
                     break;
                 }
         }
@@ -797,13 +797,13 @@ sal_Bool SvXMLImportItemMapper::PutXMLValue(
                  IsXMLToken( rValue, XML_TRUE ) )
             {
                 pSplit->SetValue( sal_True );
-                bOk = sal_True;
+                bOk = true;
             }
             else if( IsXMLToken( rValue, XML_ALWAYS ) ||
                      IsXMLToken( rValue, XML_FALSE ) )
             {
                 pSplit->SetValue( sal_False );
-                bOk = sal_True;
+                bOk = true;
             }
         }
         break;
@@ -835,7 +835,7 @@ sal_Bool SvXMLImportItemMapper::PutXMLValue(
             else if(rValue.isEmpty())
             {
                 pVertOrient->SetVertOrient( text::VertOrientation::NONE );
-                bOk = sal_True;
+                bOk = true;
             }
         }
         break;
@@ -845,9 +845,9 @@ sal_Bool SvXMLImportItemMapper::PutXMLValue(
             SwFmtFrmSize* pFrmSize = PTR_CAST(SwFmtFrmSize, &rItem);
             OSL_ENSURE( pFrmSize != NULL, "Wrong Which-ID" );
 
-            sal_Bool bSetHeight = sal_False;
-            sal_Bool bSetWidth = sal_False;
-            sal_Bool bSetSizeType = sal_False;
+            bool bSetHeight = false;
+            bool bSetWidth = false;
+            bool bSetSizeType = false;
             SwFrmSize eSizeType = ATT_VAR_SIZE;
             sal_Int32 nMin = MINLAY;
 
@@ -869,24 +869,24 @@ sal_Bool SvXMLImportItemMapper::PutXMLValue(
                 }
                 break;
                 case MID_FRMSIZE_WIDTH:
-                    bSetWidth = sal_True;
+                    bSetWidth = true;
                     break;
                 case MID_FRMSIZE_MIN_HEIGHT:
                     eSizeType = ATT_MIN_SIZE;
-                    bSetHeight = sal_True;
+                    bSetHeight = true;
                     nMin = 1;
-                    bSetSizeType = sal_True;
+                    bSetSizeType = true;
                     break;
                 case MID_FRMSIZE_FIX_HEIGHT:
                     eSizeType = ATT_FIX_SIZE;
-                    bSetHeight = sal_True;
+                    bSetHeight = true;
                     nMin = 1;
-                    bSetSizeType = sal_True;
+                    bSetSizeType = true;
                     break;
                 case MID_FRMSIZE_COL_WIDTH:
                     eSizeType = ATT_FIX_SIZE;
-                    bSetWidth = sal_True;
-                    bSetSizeType = sal_True;
+                    bSetWidth = true;
+                    bSetSizeType = true;
                     break;
                 case MID_FRMSIZE_REL_COL_WIDTH:
                 {
@@ -901,7 +901,7 @@ sal_Bool SvXMLImportItemMapper::PutXMLValue(
 
                         pFrmSize->SetWidth( (sal_uInt16)nValue );
                         pFrmSize->SetHeightSizeType( ATT_VAR_SIZE );
-                        bOk = sal_True;
+                        bOk = true;
                     }
                 }
                 break;
@@ -951,15 +951,15 @@ sal_Bool SvXMLImportItemMapper::PutXMLValue(
             if( IsXMLToken( rValue, XML_COLLAPSING ) )
             {
                 pBorders->SetValue( sal_True );
-                bOk = sal_True;
+                bOk = true;
             }
             else if( IsXMLToken( rValue, XML_SEPARATING ) )
             {
                 pBorders->SetValue( sal_False );
-                bOk = sal_True;
+                bOk = true;
             }
             else
-                bOk = sal_False;
+                bOk = false;
         }
         break;
 
diff --git a/sw/source/filter/xml/xmlimpit.hxx b/sw/source/filter/xml/xmlimpit.hxx
index a8e5957..5b2fce0 100644
--- a/sw/source/filter/xml/xmlimpit.hxx
+++ b/sw/source/filter/xml/xmlimpit.hxx
@@ -53,7 +53,7 @@ public:
 
     /** this method is called for every item that has the
         MID_SW_FLAG_SPECIAL_ITEM_IMPORT flag set */
-    virtual sal_Bool handleSpecialItem( const SvXMLItemMapEntry& rEntry,
+    virtual bool handleSpecialItem( const SvXMLItemMapEntry& rEntry,
                                     SfxPoolItem& rItem,
                                     SfxItemSet& rSet,
                                     const ::rtl::OUString& rValue,
@@ -62,7 +62,7 @@ public:
 
     /** this method is called for every item that has the
         MID_SW_FLAG_NO_ITEM_IMPORT flag set */
-    virtual sal_Bool handleNoItem( const SvXMLItemMapEntry& rEntry,
+    virtual bool handleNoItem( const SvXMLItemMapEntry& rEntry,
                                SfxItemSet& rSet,
                                const ::rtl::OUString& rValue,
                                const SvXMLUnitConverter& rUnitConverter,
@@ -79,7 +79,7 @@ public:
 
     /** This method is called for every item that should be set based
         upon an XML attribute value. */
-    static sal_Bool PutXMLValue(
+    static bool PutXMLValue(
         SfxPoolItem& rItem,
         const ::rtl::OUString& rValue,
         sal_uInt16 nMemberId,
diff --git a/sw/source/filter/xml/xmlitemi.cxx b/sw/source/filter/xml/xmlitemi.cxx
index 6353544..0c505be 100644
--- a/sw/source/filter/xml/xmlitemi.cxx
+++ b/sw/source/filter/xml/xmlitemi.cxx
@@ -66,14 +66,14 @@ public:
     SwXMLImportTableItemMapper_Impl( SvXMLItemMapEntriesRef rMapEntries );
     virtual ~SwXMLImportTableItemMapper_Impl();
 
-    virtual sal_Bool handleSpecialItem( const SvXMLItemMapEntry& rEntry,
+    virtual bool handleSpecialItem( const SvXMLItemMapEntry& rEntry,
                                 SfxPoolItem& rItem,
                                 SfxItemSet& rSet,
                                 const OUString& rValue,
                                 const SvXMLUnitConverter& rUnitConverter,
                                 const SvXMLNamespaceMap& rNamespaceMap );
 
-    virtual sal_Bool
+    virtual bool
     handleNoItem(SvXMLItemMapEntry const& rEntry,
                  SfxItemSet & rSet,
                  ::rtl::OUString const& rValue,
@@ -120,7 +120,7 @@ void SwXMLImportTableItemMapper_Impl::setMapEntries(
     SvXMLImportItemMapper::setMapEntries(rMapEntries);
 }
 
-sal_Bool SwXMLImportTableItemMapper_Impl::handleSpecialItem(
+bool SwXMLImportTableItemMapper_Impl::handleSpecialItem(
                                         const SvXMLItemMapEntry& rEntry,
                                         SfxPoolItem& rItem,
                                         SfxItemSet& rItemSet,
@@ -128,7 +128,7 @@ sal_Bool SwXMLImportTableItemMapper_Impl::handleSpecialItem(
                                         const SvXMLUnitConverter& rUnitConv,
                                         const SvXMLNamespaceMap& )
 {
-    sal_Bool bRet = sal_False;
+    bool bRet = false;
     sal_uInt16 nMemberId = static_cast< sal_Int16 >(rEntry.nMemberId & MID_SW_FLAG_MASK);
     switch( rItem.Which() )
     {
@@ -176,7 +176,7 @@ sal_Bool SwXMLImportTableItemMapper_Impl::handleSpecialItem(
 }
 
 
-sal_Bool SwXMLImportTableItemMapper_Impl::handleNoItem(
+bool SwXMLImportTableItemMapper_Impl::handleNoItem(
      SvXMLItemMapEntry const& rEntry,
      SfxItemSet & rSet,
      ::rtl::OUString const& rValue,
diff --git a/sw/source/filter/xml/xmlithlp.cxx b/sw/source/filter/xml/xmlithlp.cxx
index cddf89d..2e3ce1a 100644
--- a/sw/source/filter/xml/xmlithlp.cxx
+++ b/sw/source/filter/xml/xmlithlp.cxx
@@ -89,19 +89,19 @@ const sal_uInt16 aBorderWidths[] =
         DEF_LINE_WIDTH_1,
 };
 
-sal_Bool sw_frmitems_parseXMLBorder( const OUString& rValue,
+bool sw_frmitems_parseXMLBorder( const OUString& rValue,
                                       const SvXMLUnitConverter& rUnitConverter,
-                                      sal_Bool& rHasStyle, sal_uInt16& rStyle,
-                                      sal_Bool& rHasWidth, sal_uInt16& rWidth,
+                                      bool& rHasStyle, sal_uInt16& rStyle,
+                                      bool& rHasWidth, sal_uInt16& rWidth,
                                       sal_uInt16& rNamedWidth,
-                                      sal_Bool& rHasColor, Color& rColor )
+                                      bool& rHasColor, Color& rColor )
 {
     OUString aToken;
     SvXMLTokenEnumerator aTokens( rValue );
 
-    rHasStyle = sal_False;
-    rHasWidth = sal_False;
-    rHasColor = sal_False;
+    rHasStyle = false;
+    rHasWidth = false;
+    rHasColor = false;
 
     rStyle = USHRT_MAX;
     rWidth = 0;
@@ -114,29 +114,29 @@ sal_Bool sw_frmitems_parseXMLBorder( const OUString& rValue,
             rUnitConverter.convertEnum( rNamedWidth, aToken,
                                         psXML_NamedBorderWidths ) )
         {
-            rHasWidth = sal_True;
+            rHasWidth = true;
         }
         else if( !rHasStyle &&
                  rUnitConverter.convertEnum( rStyle, aToken,
                                              psXML_BorderStyles ) )
         {
-            rHasStyle = sal_True;
+            rHasStyle = true;
         }
         else if (!rHasColor && ::sax::Converter::convertColor(nTemp, aToken))
         {
             rColor.SetColor(nTemp);
-            rHasColor = sal_True;
+            rHasColor = true;
         }
         else if( !rHasWidth &&
              rUnitConverter.convertMeasureToCore(nTemp, aToken, 0, USHRT_MAX))
         {
             rWidth = (sal_uInt16)nTemp;
-            rHasWidth = sal_True;
+            rHasWidth = true;
         }
         else
         {
             // missformed
-            return sal_False;
+            return false;
         }
     }
 
@@ -151,17 +151,17 @@ void sw_frmitems_setXMLBorderStyle( SvxBorderLine& rLine, sal_uInt16 nStyle )
     rLine.SetBorderLineStyle(eStyle);
 }
 
-sal_Bool sw_frmitems_setXMLBorder( SvxBorderLine*& rpLine,
-                                    sal_Bool bHasStyle, sal_uInt16 nStyle,
-                                    sal_Bool bHasWidth, sal_uInt16 nWidth,
+bool sw_frmitems_setXMLBorder( SvxBorderLine*& rpLine,
+                                    bool bHasStyle, sal_uInt16 nStyle,
+                                    bool bHasWidth, sal_uInt16 nWidth,
                                     sal_uInt16 nNamedWidth,
-                                    sal_Bool bHasColor, const Color& rColor )
+                                    bool bHasColor, const Color& rColor )
 {
     // first of all, delete an empty line
     if( (bHasStyle && API_LINE_NONE == nStyle) ||
         (bHasWidth && USHRT_MAX == nNamedWidth && 0 == nWidth) )
     {
-        sal_Bool bRet = 0 != rpLine;
+        bool bRet = 0 != rpLine;
         if( rpLine )
         {
             delete rpLine;
@@ -173,7 +173,7 @@ sal_Bool sw_frmitems_setXMLBorder( SvxBorderLine*& rpLine,
 
     // if there is no line and no style and no with, there will never be a line
     if( !rpLine && !(bHasStyle && bHasWidth) )
-        return sal_False;
+        return false;
 
     // We now do know that there will be a line
     if( !rpLine )
@@ -218,7 +218,7 @@ sal_Bool sw_frmitems_setXMLBorder( SvxBorderLine*& rpLine,
     if( bHasColor )
         rpLine->SetColor( rColor );
 
-    return sal_True;
+    return true;
 }
 
 void sw_frmitems_setXMLBorder( SvxBorderLine*& rpLine,
diff --git a/sw/source/filter/xml/xmlithlp.hxx b/sw/source/filter/xml/xmlithlp.hxx
index 27b0d25..8187dcc 100644
--- a/sw/source/filter/xml/xmlithlp.hxx
+++ b/sw/source/filter/xml/xmlithlp.hxx
@@ -37,18 +37,18 @@ namespace rtl { class OUString; }
 /** Define various helper variables and functions for xmlimpit.cxx and
  * xmlexpit.cxx.  */
 
-sal_Bool sw_frmitems_parseXMLBorder( const ::rtl::OUString& rValue,
+bool sw_frmitems_parseXMLBorder( const ::rtl::OUString& rValue,
                                       const SvXMLUnitConverter& rUnitConverter,
-                                      sal_Bool& rHasStyle, sal_uInt16& rStyle,
-                                      sal_Bool& rHasWidth, sal_uInt16& rWidth,
+                                      bool& rHasStyle, sal_uInt16& rStyle,
+                                      bool& rHasWidth, sal_uInt16& rWidth,
                                       sal_uInt16& rNamedWidth,
-                                      sal_Bool& rHasColor, Color& rColor );
+                                      bool& rHasColor, Color& rColor );
 
-sal_Bool sw_frmitems_setXMLBorder( editeng::SvxBorderLine*& rpLine,
-                                    sal_Bool bHasStyle, sal_uInt16 nStyle,
-                                    sal_Bool bHasWidth, sal_uInt16 nWidth,
+bool sw_frmitems_setXMLBorder( editeng::SvxBorderLine*& rpLine,
+                                    bool bHasStyle, sal_uInt16 nStyle,
+                                    bool bHasWidth, sal_uInt16 nWidth,
                                     sal_uInt16 nNamedWidth,
-                                    sal_Bool bHasColor, const Color& rColor );
+                                    bool bHasColor, const Color& rColor );
 
 void sw_frmitems_setXMLBorder( editeng::SvxBorderLine*& rpLine,
                                 sal_uInt16 nWidth, sal_uInt16 nOutWidth,
diff --git a/sw/source/filter/xml/xmltexti.cxx b/sw/source/filter/xml/xmltexti.cxx
index ef6b102..5b66876 100644
--- a/sw/source/filter/xml/xmltexti.cxx
+++ b/sw/source/filter/xml/xmltexti.cxx
@@ -150,8 +150,8 @@ SwXMLTextImportHelper::SwXMLTextImportHelper(
         const uno::Reference < XModel>& rModel,
         SvXMLImport& rImport,
         const uno::Reference<XPropertySet> & rInfoSet,
-        sal_Bool bInsertM, sal_Bool bStylesOnlyM, sal_Bool _bProgress,
-        sal_Bool bBlockM, sal_Bool bOrganizerM,
+        bool bInsertM, bool bStylesOnlyM, bool _bProgress,
+        bool bBlockM, bool bOrganizerM,
         sal_Bool /*bPreserveRedlineMode*/ ) :
     XMLTextImportHelper( rModel, rImport, bInsertM, bStylesOnlyM, _bProgress,
                          bBlockM, bOrganizerM ),
diff --git a/sw/source/filter/xml/xmltexti.hxx b/sw/source/filter/xml/xmltexti.hxx
index 8c3aba0..2a59295 100644
--- a/sw/source/filter/xml/xmltexti.hxx
+++ b/sw/source/filter/xml/xmltexti.hxx
@@ -42,8 +42,8 @@ public:
             SvXMLImport& rImport,
             const ::com::sun::star::uno::Reference <
                 ::com::sun::star::beans::XPropertySet>& rInfoSet,
-            sal_Bool bInsertM, sal_Bool bStylesOnlyM, sal_Bool bProgress,
-            sal_Bool bBlockM, sal_Bool bOrganizerM,
+            bool bInsertM, bool bStylesOnlyM, bool bProgress,
+            bool bBlockM, bool bOrganizerM,
             sal_Bool bPreserveRedlineMode );
     ~SwXMLTextImportHelper();
 
commit 323c5ee69d5814f8400c0af3038023df9336b59c
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Thu Jan 3 12:26:28 2013 +0900

    Drop undefined declarations
    
    Change-Id: Ib0940004ba6873fda5d3821521ab2f1127acc3f0

diff --git a/sw/source/filter/xml/xmlithlp.hxx b/sw/source/filter/xml/xmlithlp.hxx
index 9a6a9a7..27b0d25 100644
--- a/sw/source/filter/xml/xmlithlp.hxx
+++ b/sw/source/filter/xml/xmlithlp.hxx
@@ -44,13 +44,6 @@ sal_Bool sw_frmitems_parseXMLBorder( const ::rtl::OUString& rValue,
                                       sal_uInt16& rNamedWidth,
                                       sal_Bool& rHasColor, Color& rColor );
 
-void sw_frmitems_setXMLBorderWidth( editeng::SvxBorderLine& rLine,
-                                     sal_uInt16 nOutWidth, sal_uInt16 nInWidth,
-                                     sal_uInt16 nDistance );
-
-void sw_frmitems_setXMLBorderWidth( editeng::SvxBorderLine& rLine,
-                                     sal_uInt16 nWidth, sal_Bool bDouble );
-
 sal_Bool sw_frmitems_setXMLBorder( editeng::SvxBorderLine*& rpLine,
                                     sal_Bool bHasStyle, sal_uInt16 nStyle,
                                     sal_Bool bHasWidth, sal_uInt16 nWidth,
@@ -67,9 +60,6 @@ void sw_frmitems_MergeXMLHoriPos( SvxGraphicPosition& ePos,
 void sw_frmitems_MergeXMLVertPos( SvxGraphicPosition& ePos,
                                      SvxGraphicPosition eVert );
 
-extern const sal_uInt16 aSBorderWidths[];
-extern const sal_uInt16 aDBorderWidths[5*11];
-
 extern const struct SvXMLEnumMapEntry psXML_BorderStyles[];
 extern const struct SvXMLEnumMapEntry psXML_NamedBorderWidths[];
 extern const struct SvXMLEnumMapEntry psXML_BrushRepeat[];
commit 323e55d706815f7e35e431b189d27ff95209ac94
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Thu Jan 3 11:06:38 2013 +0900

    Drop unused variable
    
    Change-Id: I7224b6a52ffa292c94ea44e779ee92d2524c0bb2

diff --git a/sw/source/filter/xml/xmlimp.hxx b/sw/source/filter/xml/xmlimp.hxx
index a23e8fa..f9da2ae 100644
--- a/sw/source/filter/xml/xmlimp.hxx
+++ b/sw/source/filter/xml/xmlimp.hxx
@@ -74,7 +74,6 @@ class SwXMLImport: public SvXMLImport
                                             // existing styles will be
                                             // overwritten.
     sal_Bool                bBlock : 1;     // Load text block
-    sal_Bool                bAutoStylesValid : 1;
     sal_Bool                bShowProgress : 1;
     sal_Bool                bOrganizerMode : 1;
     sal_Bool                bInititedXForms : 1;


More information about the Libreoffice-commits mailing list