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

Takeshi Abe tabe at fixedpoint.jp
Sun Apr 21 18:00:50 PDT 2013


 svx/source/xml/xmleohlp.cxx     |   14 +++++++-------
 svx/source/xml/xmlgrhlp.cxx     |    4 ++--
 svx/source/xml/xmlxtexp.cxx     |    2 +-
 svx/source/xml/xmlxtimp.cxx     |    8 ++++----
 svx/source/xoutdev/_xoutbmp.cxx |    6 +++---
 svx/source/xoutdev/_xpoly.cxx   |    2 +-
 svx/source/xoutdev/xattr.cxx    |   38 +++++++++++++++++++-------------------
 svx/source/xoutdev/xattrbmp.cxx |    4 ++--
 8 files changed, 39 insertions(+), 39 deletions(-)

New commits:
commit 550546a2fc651913a5624f4bcc4bec6e6d382c26
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Mon Apr 22 09:10:41 2013 +0900

    sal_Bool to bool
    
    Change-Id: Ibaa2a843e16c22b6e2fb7e53da335b9b35b70a96

diff --git a/svx/source/xml/xmleohlp.cxx b/svx/source/xml/xmleohlp.cxx
index c8dbc57..02839ab 100644
--- a/svx/source/xml/xmleohlp.cxx
+++ b/svx/source/xml/xmleohlp.cxx
@@ -66,7 +66,7 @@ class OutputStorageWrapper_Impl : public ::cppu::WeakImplHelper1<XOutputStream>
     ::osl::Mutex    maMutex;
     Reference < XOutputStream > xOut;
     TempFile aTempFile;
-    sal_Bool bStreamClosed : 1;
+    bool bStreamClosed : 1;
     SvStream* pStream;
 
 public:
@@ -82,7 +82,7 @@ public:
 };
 
 OutputStorageWrapper_Impl::OutputStorageWrapper_Impl()
-    : bStreamClosed( sal_False )
+    : bStreamClosed( false )
     , pStream(0)
 {
     aTempFile.EnableKillingFile();
@@ -121,7 +121,7 @@ void SAL_CALL OutputStorageWrapper_Impl::closeOutput()
 {
     MutexGuard          aGuard( maMutex );
     xOut->closeOutput();
-    bStreamClosed = sal_True;
+    bStreamClosed = true;
 }
 
 struct OUStringLess
@@ -283,7 +283,7 @@ sal_Bool SvXMLEmbeddedObjectHelper::ImplGetStorageNames(
         if( -1 == nPos )
             return sal_False;
         sal_Bool bObjUrl = aURLNoPar.startsWith( XML_EMBEDDEDOBJECT_URL_BASE );
-        sal_Bool bGrUrl = !bObjUrl &&
+        bool bGrUrl = !bObjUrl &&
               aURLNoPar.startsWith( XML_EMBEDDEDOBJECTGRAPHIC_URL_BASE );
         if( !(bObjUrl || bGrUrl) )
             return sal_False;
@@ -305,7 +305,7 @@ sal_Bool SvXMLEmbeddedObjectHelper::ImplGetStorageNames(
 
         if( bGrUrl )
         {
-            sal_Bool bOASIS = mxRootStorage.is() &&
+            bool bOASIS = mxRootStorage.is() &&
                 ( SotStorage::GetVersion( mxRootStorage ) > SOFFICE_FILEFORMAT_60 );
             rContainerStorageName = bOASIS
                     ? maReplacementGraphicsContainerStorageName
@@ -515,7 +515,7 @@ uno::Reference< io::XInputStream > SvXMLEmbeddedObjectHelper::ImplGetReplacement
     {
         try
         {
-            sal_Bool bSwitchBackToLoaded = sal_False;
+            bool bSwitchBackToLoaded = false;
             sal_Int32 nCurState = xObj->getCurrentState();
             if ( nCurState == embed::EmbedStates::LOADED || nCurState == embed::EmbedStates::RUNNING )
             {
@@ -530,7 +530,7 @@ uno::Reference< io::XInputStream > SvXMLEmbeddedObjectHelper::ImplGetReplacement
                 // the image must be regenerated
                 // TODO/LATER: another aspect could be used
                 if ( nCurState == embed::EmbedStates::LOADED )
-                    bSwitchBackToLoaded = sal_True;
+                    bSwitchBackToLoaded = true;
 
                 OUString aMediaType;
                 xStream = svt::EmbeddedObjectRef::GetGraphicReplacementStream(
diff --git a/svx/source/xml/xmlgrhlp.cxx b/svx/source/xml/xmlgrhlp.cxx
index 3f09fe8..438427d 100644
--- a/svx/source/xml/xmlgrhlp.cxx
+++ b/svx/source/xml/xmlgrhlp.cxx
@@ -91,7 +91,7 @@ public:
                                     SvXMLGraphicInputStream( const OUString& rGraphicId );
     virtual                         ~SvXMLGraphicInputStream();
 
-    sal_Bool                        Exists() const { return mxStmWrapper.is(); }
+    bool                            Exists() const { return mxStmWrapper.is(); }
 };
 
 SvXMLGraphicInputStream::SvXMLGraphicInputStream( const OUString& rGraphicId )
@@ -222,7 +222,7 @@ public:
                                     SvXMLGraphicOutputStream();
     virtual                         ~SvXMLGraphicOutputStream();
 
-    sal_Bool                        Exists() const { return mxStmWrapper.is(); }
+    bool                            Exists() const { return mxStmWrapper.is(); }
     const GraphicObject&            GetGraphicObject();
 };
 
diff --git a/svx/source/xml/xmlxtexp.cxx b/svx/source/xml/xmlxtexp.cxx
index 9cb97d9..4d74dbd 100644
--- a/svx/source/xml/xmlxtexp.cxx
+++ b/svx/source/xml/xmlxtexp.cxx
@@ -220,7 +220,7 @@ bool SvxXMLXTableExportComponent::save(
     INetURLObject aURLObj( rURL );
     bool bToStorage = aURLObj.GetProtocol() == INET_PROT_NOT_VALID; // a relative path
 
-    sal_Bool bSaveAsStorage = xTable->getElementType() == ::getCppuType((const OUString*)0);
+    bool bSaveAsStorage = xTable->getElementType() == ::getCppuType((const OUString*)0);
 
     if( pOptName )
         *pOptName = rURL;
diff --git a/svx/source/xml/xmlxtimp.cxx b/svx/source/xml/xmlxtimp.cxx
index 99d3e13..c5746f3 100644
--- a/svx/source/xml/xmlxtimp.cxx
+++ b/svx/source/xml/xmlxtimp.cxx
@@ -84,7 +84,7 @@ class SvxXMLTableImportContext : public SvXMLImportContext
 {
 public:
     SvxXMLTableImportContext( SvXMLImport& rImport, sal_uInt16 nPrfx, const OUString& rLName, const uno::Reference< XAttributeList >& xAttrList, SvxXMLTableImportContextEnum eContext, const uno::Reference< XNameContainer >& xTable,
-        sal_Bool bOOoFormat );
+        bool bOOoFormat );
     virtual ~SvxXMLTableImportContext();
 
     virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< XAttributeList >& xAttrList );
@@ -102,12 +102,12 @@ protected:
 private:
     uno::Reference< XNameContainer > mxTable;
     SvxXMLTableImportContextEnum meContext;
-    sal_Bool mbOOoFormat;
+    bool mbOOoFormat;
 };
 
 ///////////////////////////////////////////////////////////////////////
 
-SvxXMLTableImportContext::SvxXMLTableImportContext( SvXMLImport& rImport, sal_uInt16 nPrfx, const OUString& rLName, const uno::Reference< XAttributeList >&, SvxXMLTableImportContextEnum eContext, const uno::Reference< XNameContainer >& xTable, sal_Bool bOOoFormat )
+SvxXMLTableImportContext::SvxXMLTableImportContext( SvXMLImport& rImport, sal_uInt16 nPrfx, const OUString& rLName, const uno::Reference< XAttributeList >&, SvxXMLTableImportContextEnum eContext, const uno::Reference< XNameContainer >& xTable, bool bOOoFormat )
 : SvXMLImportContext( rImport, nPrfx, rLName ), mxTable( xTable ), meContext( eContext ),
     mbOOoFormat( bOOoFormat )
 {
@@ -467,7 +467,7 @@ SvXMLImportContext *SvxXMLXTableImport::CreateContext( sal_uInt16 nPrefix, const
     if( XML_NAMESPACE_OOO == nPrefix ||
         XML_NAMESPACE_OFFICE == nPrefix )
     {
-        sal_Bool bOOoFormat = (XML_NAMESPACE_OFFICE == nPrefix);
+        bool bOOoFormat = (XML_NAMESPACE_OFFICE == nPrefix);
         Type aType = mrTable->getElementType();
 
         if ( rLocalName == "color-table" )
diff --git a/svx/source/xoutdev/_xoutbmp.cxx b/svx/source/xoutdev/_xoutbmp.cxx
index 221665d..f088526 100644
--- a/svx/source/xoutdev/_xoutbmp.cxx
+++ b/svx/source/xoutdev/_xoutbmp.cxx
@@ -182,7 +182,7 @@ sal_uInt16 XOutBitmap::WriteGraphic( const Graphic& rGraphic, String& rFileName,
         if( GRFILTER_OK != nErr )
         {
             String  aFilter( rFilterName );
-            sal_Bool    bWriteTransGrf = ( aFilter.EqualsIgnoreCaseAscii( "transgrf" ) ) ||
+            bool    bWriteTransGrf = ( aFilter.EqualsIgnoreCaseAscii( "transgrf" ) ) ||
                                      ( aFilter.EqualsIgnoreCaseAscii( "gif" ) ) ||
                                      ( nFlags & XOUTBMP_USE_GIF_IF_POSSIBLE ) ||
                                      ( ( nFlags & XOUTBMP_USE_GIF_IF_SENSIBLE ) && ( bAnimated || bTransparent ) );
@@ -313,7 +313,7 @@ Bitmap XOutBitmap::DetectEdges( const Bitmap& rBmp, const sal_uInt8 cThreshold )
 {
     const Size  aSize( rBmp.GetSizePixel() );
     Bitmap      aRetBmp;
-    sal_Bool        bRet = sal_False;
+    bool        bRet = false;
 
     if( ( aSize.Width() > 2L ) && ( aSize.Height() > 2L ) )
     {
@@ -372,7 +372,7 @@ Bitmap XOutBitmap::DetectEdges( const Bitmap& rBmp, const sal_uInt8 cThreshold )
                     }
                 }
 
-                bRet = sal_True;
+                bRet = true;
             }
 
             aWorkBmp.ReleaseAccess( pReadAcc );
diff --git a/svx/source/xoutdev/_xpoly.cxx b/svx/source/xoutdev/_xpoly.cxx
index 4053c11..2573ba3 100644
--- a/svx/source/xoutdev/_xpoly.cxx
+++ b/svx/source/xoutdev/_xpoly.cxx
@@ -344,7 +344,7 @@ XPolygon::XPolygon(const Point& rCenter, long nRx, long nRy,
 
     nStartAngle %= 3600;
     if ( nEndAngle > 3600 ) nEndAngle %= 3600;
-    sal_Bool bFull = (nStartAngle == 0 && nEndAngle == 3600);
+    bool bFull = (nStartAngle == 0 && nEndAngle == 3600);
 
     // Faktor fuer Kontrollpunkte der Bezierkurven: 8/3 * (sin(45g) - 0.5)
     long    nXHdl = (long)(0.552284749 * nRx);
diff --git a/svx/source/xoutdev/xattr.cxx b/svx/source/xoutdev/xattr.cxx
index 9a516da..ed595af 100644
--- a/svx/source/xoutdev/xattr.cxx
+++ b/svx/source/xoutdev/xattr.cxx
@@ -187,7 +187,7 @@ SvStream& NameOrIndex::Store( SvStream& rOut, sal_uInt16 nItemVersion ) const
 */
 String NameOrIndex::CheckNamedItem( const NameOrIndex* pCheckItem, const sal_uInt16 nWhich, const SfxItemPool* pPool1, const SfxItemPool* /*pPool2*/, SvxCompareValueFunc pCompareValueFunc, sal_uInt16 nPrefixResId, const XPropertyListRef &pDefaults )
 {
-    sal_Bool bForceNew = sal_False;
+    bool bForceNew = false;
 
     OUString aUniqueName = SvxUnogetInternalNameForItem(nWhich, pCheckItem->GetName());
 
@@ -211,7 +211,7 @@ String NameOrIndex::CheckNamedItem( const NameOrIndex* pCheckItem, const sal_uIn
                 {
                     // same name but different value, we need a new name for this item
                     aUniqueName = String();
-                    bForceNew = sal_True;
+                    bForceNew = true;
                 }
                 break;
             }
@@ -1092,7 +1092,7 @@ bool XLineDashItem::PutValue( const ::com::sun::star::uno::Any& rVal, sal_uInt8
             uno::Sequence< beans::PropertyValue >   aPropSeq;
             ::com::sun::star::drawing::LineDash     aLineDash;
             OUString                           aName;
-            sal_Bool                                bLineDash( sal_False );
+            bool                               bLineDash( false );
 
             if ( rVal >>= aPropSeq )
             {
@@ -1782,7 +1782,7 @@ XLineStartItem* XLineStartItem::checkForUniqueItem( SdrModel* pModel ) const
             }
         }
 
-        sal_Bool bForceNew = sal_False;
+        bool bForceNew = false;
 
         // 2. if we have a name check if there is already an item with the
         // same name in the documents pool with a different line end or start
@@ -1806,7 +1806,7 @@ XLineStartItem* XLineStartItem::checkForUniqueItem( SdrModel* pModel ) const
                     {
                         // same name but different value, we need a new name for this item
                         aUniqueName = String();
-                        bForceNew = sal_True;
+                        bForceNew = true;
                     }
                     break;
                 }
@@ -1828,7 +1828,7 @@ XLineStartItem* XLineStartItem::checkForUniqueItem( SdrModel* pModel ) const
                         {
                             // same name but different value, we need a new name for this item
                             aUniqueName = String();
-                            bForceNew = sal_True;
+                            bForceNew = true;
                         }
                         break;
                     }
@@ -1852,7 +1852,7 @@ XLineStartItem* XLineStartItem::checkForUniqueItem( SdrModel* pModel ) const
                     {
                         // same name but different value, we need a new name for this item
                         aUniqueName = String();
-                        bForceNew = sal_True;
+                        bForceNew = true;
                     }
                     break;
                 }
@@ -1873,7 +1873,7 @@ XLineStartItem* XLineStartItem::checkForUniqueItem( SdrModel* pModel ) const
                         {
                             // same name but different value, we need a new name for this item
                             aUniqueName = String();
-                            bForceNew = sal_True;
+                            bForceNew = true;
                         }
                         break;
                     }
@@ -1885,7 +1885,7 @@ XLineStartItem* XLineStartItem::checkForUniqueItem( SdrModel* pModel ) const
         // create a unique name
         if( aUniqueName.Len() == 0 )
         {
-            sal_Bool bFoundExisting = sal_False;
+            bool bFoundExisting = false;
 
             sal_Int32 nUserIndex = 1;
             const ResId aRes(SVX_RES(RID_SVXSTR_LINEEND));
@@ -1905,7 +1905,7 @@ XLineStartItem* XLineStartItem::checkForUniqueItem( SdrModel* pModel ) const
                         if( !bForceNew && pItem->GetLineStartValue() == pLineStartItem->GetLineStartValue() )
                         {
                             aUniqueName = pItem->GetName();
-                            bFoundExisting = sal_True;
+                            bFoundExisting = true;
                             break;
                         }
 
@@ -1928,7 +1928,7 @@ XLineStartItem* XLineStartItem::checkForUniqueItem( SdrModel* pModel ) const
                         if( !bForceNew && pItem->GetLineEndValue() == pLineStartItem->GetLineStartValue() )
                         {
                             aUniqueName = pItem->GetName();
-                            bFoundExisting = sal_True;
+                            bFoundExisting = true;
                             break;
                         }
 
@@ -2134,7 +2134,7 @@ XLineEndItem* XLineEndItem::checkForUniqueItem( SdrModel* pModel ) const
             }
         }
 
-        sal_Bool bForceNew = sal_False;
+        bool bForceNew = false;
 
         // 2. if we have a name check if there is already an item with the
         // same name in the documents pool with a different line end or start
@@ -2158,7 +2158,7 @@ XLineEndItem* XLineEndItem::checkForUniqueItem( SdrModel* pModel ) const
                     {
                         // same name but different value, we need a new name for this item
                         aUniqueName = String();
-                        bForceNew = sal_True;
+                        bForceNew = true;
                     }
                     break;
                 }
@@ -2180,7 +2180,7 @@ XLineEndItem* XLineEndItem::checkForUniqueItem( SdrModel* pModel ) const
                         {
                             // same name but different value, we need a new name for this item
                             aUniqueName = String();
-                            bForceNew = sal_True;
+                            bForceNew = true;
                         }
                         break;
                     }
@@ -2204,7 +2204,7 @@ XLineEndItem* XLineEndItem::checkForUniqueItem( SdrModel* pModel ) const
                     {
                         // same name but different value, we need a new name for this item
                         aUniqueName = String();
-                        bForceNew = sal_True;
+                        bForceNew = true;
                     }
                     break;
                 }
@@ -2225,7 +2225,7 @@ XLineEndItem* XLineEndItem::checkForUniqueItem( SdrModel* pModel ) const
                         {
                             // same name but different value, we need a new name for this item
                             aUniqueName = String();
-                            bForceNew = sal_True;
+                            bForceNew = true;
                         }
                         break;
                     }
@@ -2237,7 +2237,7 @@ XLineEndItem* XLineEndItem::checkForUniqueItem( SdrModel* pModel ) const
         // create a unique name
         if( aUniqueName.Len() == 0 )
         {
-            sal_Bool bFoundExisting = sal_False;
+            bool bFoundExisting = false;
 
             sal_Int32 nUserIndex = 1;
             const ResId aRes(SVX_RES(RID_SVXSTR_LINEEND));
@@ -2257,7 +2257,7 @@ XLineEndItem* XLineEndItem::checkForUniqueItem( SdrModel* pModel ) const
                         if( !bForceNew && pItem->GetLineStartValue() == pLineEndItem->GetLineEndValue() )
                         {
                             aUniqueName = pItem->GetName();
-                            bFoundExisting = sal_True;
+                            bFoundExisting = true;
                             break;
                         }
 
@@ -2280,7 +2280,7 @@ XLineEndItem* XLineEndItem::checkForUniqueItem( SdrModel* pModel ) const
                         if( !bForceNew && pItem->GetLineEndValue() == pLineEndItem->GetLineEndValue() )
                         {
                             aUniqueName = pItem->GetName();
-                            bFoundExisting = sal_True;
+                            bFoundExisting = true;
                             break;
                         }
 
diff --git a/svx/source/xoutdev/xattrbmp.cxx b/svx/source/xoutdev/xattrbmp.cxx
index 0b622d4..b29dda0 100644
--- a/svx/source/xoutdev/xattrbmp.cxx
+++ b/svx/source/xoutdev/xattrbmp.cxx
@@ -189,7 +189,7 @@ const GraphicObject& XOBitmap::GetGraphicObject() const
 void XOBitmap::Bitmap2Array()
 {
     VirtualDevice   aVD;
-    sal_Bool            bPixelColor = sal_False;
+    bool            bPixelColor = false;
     const Bitmap    aBitmap( GetBitmap() );
     const sal_uInt16    nLines = 8; // von Type abhaengig
 
@@ -214,7 +214,7 @@ void XOBitmap::Bitmap2Array()
                 if( !bPixelColor )
                 {
                     aPixelColor = aVD.GetPixel( Point( j, i ) );
-                    bPixelColor = sal_True;
+                    bPixelColor = true;
                 }
             }
         }


More information about the Libreoffice-commits mailing list