[Libreoffice-commits] core.git: connectivity/source dbaccess/source desktop/source editeng/source fileaccess/source include/sfx2 include/sot include/svl include/svtools include/svx include/tools include/unotools include/vcl lotuswordpro/source sd/source sot/source svl/source svtools/source sw/source tools/inc tools/qa tools/source unotools/source vcl/source vcl/win

Norbert Thiebaud nthiebaud at gmail.com
Sat Jun 29 21:59:12 PDT 2013


 connectivity/source/drivers/file/quotedstring.cxx       |   59 -
 connectivity/source/drivers/flat/ETable.cxx             |   27 
 connectivity/source/inc/file/quotedstring.hxx           |   15 
 connectivity/source/inc/flat/ETable.hxx                 |    6 
 dbaccess/source/ui/tabledesign/TableRow.cxx             |    1 
 desktop/source/migration/services/wordbookmigration.cxx |    1 
 editeng/source/editeng/impedit4.cxx                     |    6 
 fileaccess/source/FileAccess.cxx                        |    1 
 include/sfx2/docfilt.hxx                                |    8 
 include/sot/factory.hxx                                 |    1 
 include/sot/storinfo.hxx                                |    1 
 include/svl/sfontitm.hxx                                |    1 
 include/svtools/ehdl.hxx                                |    6 
 include/svx/svdobj.hxx                                  |    1 
 include/svx/svdpagv.hxx                                 |    1 
 include/tools/b3dtrans.hxx                              |   12 
 include/tools/bigint.hxx                                |   48 -
 include/tools/cachestr.hxx                              |   17 
 include/tools/color.hxx                                 |   20 
 include/tools/config.hxx                                |   20 
 include/tools/date.hxx                                  |   18 
 include/tools/datetime.hxx                              |   18 
 include/tools/debug.hxx                                 |    4 
 include/tools/errinf.hxx                                |   12 
 include/tools/gen.hxx                                   |   52 -
 include/tools/globname.hxx                              |   21 
 include/tools/inetmime.hxx                              |    1 
 include/tools/inetmsg.hxx                               |    2 
 include/tools/inetstrm.hxx                              |   16 
 include/tools/line.hxx                                  |    4 
 include/tools/link.hxx                                  |   22 
 include/tools/multisel.hxx                              |   28 
 include/tools/poly.hxx                                  |   26 
 include/tools/pstm.hxx                                  |    6 
 include/tools/rc.hxx                                    |    4 
 include/tools/resid.hxx                                 |    6 
 include/tools/resmgr.hxx                                |    4 
 include/tools/stream.hxx                                |  188 ++---
 include/tools/svborder.hxx                              |    6 
 include/tools/tempfile.hxx                              |   16 
 include/tools/time.hxx                                  |   16 
 include/tools/vcompat.hxx                               |    2 
 include/tools/vector2d.hxx                              |   12 
 include/tools/weakbase.h                                |   10 
 include/tools/weakbase.hxx                              |   10 
 include/tools/wldcrd.hxx                                |    4 
 include/tools/zcodec.hxx                                |    8 
 include/unotools/ucblockbytes.hxx                       |    3 
 include/vcl/gfxlink.hxx                                 |    1 
 lotuswordpro/source/filter/lwpcelllayout.cxx            |    7 
 lotuswordpro/source/filter/lwpdrawobj.cxx               |    1 
 lotuswordpro/source/filter/lwptblcell.hxx               |    2 
 sd/source/filter/eppt/pptexsoundcollection.cxx          |    9 
 sd/source/filter/html/htmlex.cxx                        |    2 
 sd/source/filter/html/htmlex.hxx                        |    2 
 sot/source/base/object.cxx                              |    1 
 svl/source/fsstor/fsstorage.cxx                         |    3 
 svtools/source/misc/ehdl.cxx                            |   12 
 sw/source/ui/dbui/createaddresslistdialog.cxx           |   16 
 sw/source/ui/index/cnttab.cxx                           |   18 
 sw/source/ui/uno/unomailmerge.cxx                       |    2 
 tools/inc/poly.h                                        |    4 
 tools/qa/cppunit/test_inetmime.cxx                      |    1 
 tools/qa/cppunit/test_stream.cxx                        |    2 
 tools/source/datetime/datetime.cxx                      |   30 
 tools/source/datetime/tdate.cxx                         |   26 
 tools/source/datetime/ttime.cxx                         |    2 
 tools/source/debug/debug.cxx                            |  102 +-
 tools/source/fsys/tempfile.cxx                          |   31 
 tools/source/fsys/wldcrd.cxx                            |    8 
 tools/source/generic/b3dtrans.cxx                       |   56 -
 tools/source/generic/bigint.cxx                         |   61 -
 tools/source/generic/color.cxx                          |    8 
 tools/source/generic/config.cxx                         |  107 +-
 tools/source/generic/fract.cxx                          |    2 
 tools/source/generic/gen.cxx                            |   22 
 tools/source/generic/line.cxx                           |   24 
 tools/source/generic/link.cxx                           |   10 
 tools/source/generic/poly.cxx                           |   56 -
 tools/source/generic/poly2.cxx                          |   24 
 tools/source/inet/inetmime.cxx                          |    1 
 tools/source/inet/inetmsg.cxx                           |    3 
 tools/source/inet/inetstrm.cxx                          |  574 +++++++---------
 tools/source/memtools/multisel.cxx                      |   56 -
 tools/source/rc/resmgr.cxx                              |   44 -
 tools/source/ref/errinf.cxx                             |   28 
 tools/source/ref/globname.cxx                           |   32 
 tools/source/ref/pstm.cxx                               |    8 
 tools/source/stream/cachestr.cxx                        |    9 
 tools/source/stream/stream.cxx                          |  246 +++---
 tools/source/stream/strmunx.cxx                         |   72 +-
 tools/source/stream/strmwnt.cxx                         |   53 -
 tools/source/zcodec/zcodec.cxx                          |   36 -
 unotools/source/ucbhelper/ucblockbytes.cxx              |    2 
 unotools/source/ucbhelper/ucbstreamhelper.cxx           |    2 
 vcl/source/gdi/jobset.cxx                               |    1 
 vcl/win/source/gdi/salgdi3.cxx                          |    2 
 97 files changed, 1304 insertions(+), 1288 deletions(-)

New commits:
commit 710f41b7aec8e7d35a0da8be332aa289f98942af
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Sat Jun 29 23:57:38 2013 -0500

    Clean String and sal_Bool in tools
    
    Change-Id: I6a92196f33d7a5278c7dcc426112e9c56d582655
    Reviewed-on: https://gerrit.libreoffice.org/4627
    Reviewed-by: Norbert Thiebaud <nthiebaud at gmail.com>
    Tested-by: Norbert Thiebaud <nthiebaud at gmail.com>

diff --git a/connectivity/source/drivers/file/quotedstring.cxx b/connectivity/source/drivers/file/quotedstring.cxx
index 316ad2f..f69230d 100644
--- a/connectivity/source/drivers/file/quotedstring.cxx
+++ b/connectivity/source/drivers/file/quotedstring.cxx
@@ -18,6 +18,7 @@
  */
 
 #include "file/quotedstring.hxx"
+#include <rtl/ustrbuf.hxx>
 
 namespace connectivity
 {
@@ -25,28 +26,28 @@ namespace connectivity
     //= QuotedTokenizedString
     //==================================================================
     //------------------------------------------------------------------
-    xub_StrLen QuotedTokenizedString::GetTokenCount( sal_Unicode cTok, sal_Unicode cStrDel ) const
+    sal_Int32 QuotedTokenizedString::GetTokenCount( sal_Unicode cTok, sal_Unicode cStrDel ) const
     {
         SAL_INFO( "connectivity.drivers", "file Ocke.Janssen at sun.com QuotedTokenizedString::GetTokenCount" );
-        const xub_StrLen nLen = m_sString.Len();
+        const sal_Int32 nLen = m_sString.getLength();
         if ( !nLen )
             return 0;
 
-        xub_StrLen nTokCount = 1;
-        sal_Bool bStart = sal_True;     // Are we on the first character in the Token?
-        sal_Bool bInString = sal_False; // Are we WITHIN a (cStrDel delimited) String?
+        sal_Int32 nTokCount = 1;
+        bool bStart = true;     // Are we on the first character in the Token?
+        bool bInString = false; // Are we WITHIN a (cStrDel delimited) String?
 
         // Search for String-end after the first not matching character
-        for( xub_StrLen i = 0; i < nLen; ++i )
+        for( sal_Int32 i = 0; i < nLen; ++i )
         {
-            const sal_Unicode cChar = m_sString.GetChar(i);
+            const sal_Unicode cChar = m_sString[i];
             if (bStart)
             {
-                bStart = sal_False;
+                bStart = false;
                 // First character a String-Delimiter?
                 if ( cChar == cStrDel )
                 {
-                    bInString = sal_True;   // then we are now WITHIN the string!
+                    bInString = true;   // then we are now WITHIN the string!
                     continue;           // skip this character!
                 }
             }
@@ -56,7 +57,7 @@ namespace connectivity
                 // when now the String-Delimiter-character occurs ...
                 if ( cChar == cStrDel )
                 {
-                    if ((i+1 < nLen) && (m_sString.GetChar(i+1) == cStrDel))
+                    if ((i+1 < nLen) && (m_sString[i+1] == cStrDel))
                     {
                         // double String-Delimter-character:
                         ++i;    // no string-end, skip next character.
@@ -64,7 +65,7 @@ namespace connectivity
                     else
                     {
                         // String-End
-                        bInString = sal_False;
+                        bInString = false;
                     }
                 }
             } // if (bInString)
@@ -74,7 +75,7 @@ namespace connectivity
                 if ( cChar == cTok )
                 {
                     ++nTokCount;
-                    bStart = sal_True;
+                    bStart = true;
                 }
             }
         }
@@ -84,51 +85,48 @@ namespace connectivity
     }
 
     //------------------------------------------------------------------
-    String QuotedTokenizedString::GetTokenSpecial(xub_StrLen& nStartPos, sal_Unicode cTok, sal_Unicode cStrDel) const
+    OUString QuotedTokenizedString::GetTokenSpecial(sal_Int32& nStartPos, sal_Unicode cTok, sal_Unicode cStrDel) const
     {
         SAL_INFO( "connectivity.drivers", "file Ocke.Janssen at sun.com QuotedTokenizedString::GetTokenCount" );
-        String aStr;
-        const xub_StrLen nLen = m_sString.Len();
+        const sal_Int32 nLen = m_sString.getLength();
         if ( nLen )
         {
-            sal_Bool bInString = (nStartPos < nLen) && (m_sString.GetChar(nStartPos) == cStrDel);   // are we WITHIN a (cStrDel delimited) String?
+            bool bInString = (nStartPos < nLen) && (m_sString[nStartPos] == cStrDel);   // are we WITHIN a (cStrDel delimited) String?
 
             // First character a String-Delimiter?
             if (bInString )
                 ++nStartPos;            // skip this character!
             if ( nStartPos >= nLen )
-                return aStr;
+                return OUString();
+
+            OUStringBuffer sBuff( nLen - nStartPos + 1 );
 
-            sal_Unicode* pData = aStr.AllocBuffer( nLen - nStartPos + 1 );
-            const sal_Unicode* pStart = pData;
             // Search until end of string for the first not matching character
-            for( xub_StrLen i = nStartPos; i < nLen; ++i )
+            for( sal_Int32 i = nStartPos; i < nLen; ++i )
             {
-                const sal_Unicode cChar = m_sString.GetChar(i);
+                const sal_Unicode cChar = m_sString[i];
                 if (bInString)
                 {
                     // when now the String-Delimiter-character occurs ...
                     if ( cChar == cStrDel )
                     {
-                        if ((i+1 < nLen) && (m_sString.GetChar(i+1) == cStrDel))
+                        if ((i+1 < nLen) && (m_sString[i+1] == cStrDel))
                         {
                             // double String Delimiter-character
                             // no end of string, skip next character.
                             ++i;
-                            *pData++ = m_sString.GetChar(i);    // character belongs to Result-String
+                            sBuff.append(m_sString[i]);    // character belongs to Result-String
                         }
                         else
                         {
                             //end of String
-                            bInString = sal_False;
-                            *pData = 0;
+                            bInString = false;
                         }
                     }
                     else
                     {
-                        *pData++ = cChar;   // character belongs to Result-String
+                        sBuff.append(cChar);
                     }
-
                 }
                 else
                 {
@@ -141,14 +139,13 @@ namespace connectivity
                     }
                     else
                     {
-                        *pData++ = cChar;   // character belongs to Result-String
+                        sBuff.append(cChar);
                     }
                 }
             } // for( xub_StrLen i = nStartPos; i < nLen; ++i )
-            *pData = 0;
-            aStr.ReleaseBufferAccess(xub_StrLen(pData - pStart));
+            return sBuff.makeStringAndClear();
         }
-        return aStr;
+        return OUString();
     }
 }
 
diff --git a/connectivity/source/drivers/flat/ETable.cxx b/connectivity/source/drivers/flat/ETable.cxx
index b2788e6..8f4e2c3 100644
--- a/connectivity/source/drivers/flat/ETable.cxx
+++ b/connectivity/source/drivers/flat/ETable.cxx
@@ -137,9 +137,9 @@ void OFlatTable::fillColumns(const ::com::sun::star::lang::Locale& _aLocale)
 
     do
     {
-        xub_StrLen nStartPosHeaderLine = 0; // use for efficient way to get the tokens
-        xub_StrLen nStartPosFirstLine = 0; // use for efficient way to get the tokens
-        xub_StrLen nStartPosFirstLine2 = 0;
+        sal_Int32 nStartPosHeaderLine = 0; // use for efficient way to get the tokens
+        sal_Int32 nStartPosFirstLine = 0; // use for efficient way to get the tokens
+        sal_Int32 nStartPosFirstLine2 = 0;
         for (xub_StrLen i = 0; i < nFieldCount; i++)
         {
             if ( nRowCount == 0)
@@ -160,7 +160,11 @@ void OFlatTable::fillColumns(const ::com::sun::star::lang::Locale& _aLocale)
                 aColumnNames.push_back(aColumnName);
             }
             if(bRead)
-                impl_fillColumnInfo_nothrow(m_aCurrentLine,nStartPosFirstLine,nStartPosFirstLine2,m_aTypes[i],m_aPrecisions[i],m_aScales[i],m_aTypeNames[i],cDecimalDelimiter,cThousandDelimiter,aCharClass);
+            {
+                impl_fillColumnInfo_nothrow(m_aCurrentLine, nStartPosFirstLine, nStartPosFirstLine2,
+                                            m_aTypes[i], m_aPrecisions[i], m_aScales[i], m_aTypeNames[i],
+                                            cDecimalDelimiter, cThousandDelimiter, aCharClass);
+            }
         }
         ++nRowCount;
         bRead = readLine(&rowPos.second, &rowPos.first, false);
@@ -197,9 +201,10 @@ void OFlatTable::fillColumns(const ::com::sun::star::lang::Locale& _aLocale)
 
     m_pFileStream->Seek(m_aRowPosToFilePos[0].second);
 }
-void OFlatTable::impl_fillColumnInfo_nothrow(QuotedTokenizedString& aFirstLine,xub_StrLen& nStartPosFirstLine,xub_StrLen& nStartPosFirstLine2
-                                             ,sal_Int32& io_nType,sal_Int32& io_nPrecisions,sal_Int32& io_nScales,String& o_sTypeName
-                                             ,const sal_Unicode cDecimalDelimiter,const sal_Unicode cThousandDelimiter,const CharClass&  aCharClass)
+
+void OFlatTable::impl_fillColumnInfo_nothrow(QuotedTokenizedString& aFirstLine, sal_Int32& nStartPosFirstLine, sal_Int32& nStartPosFirstLine2,
+                                             sal_Int32& io_nType, sal_Int32& io_nPrecisions, sal_Int32& io_nScales, String& o_sTypeName,
+                                             const sal_Unicode cDecimalDelimiter, const sal_Unicode cThousandDelimiter, const CharClass&  aCharClass)
 {
     if ( io_nType != DataType::VARCHAR )
     {
@@ -630,7 +635,7 @@ sal_Bool OFlatTable::fetchRow(OValueRefRow& _rRow, const OSQLColumns & _rCols, s
     const sal_Unicode cDecimalDelimiter = pConnection->getDecimalDelimiter();
     const sal_Unicode cThousandDelimiter = pConnection->getThousandDelimiter();
     // Fields:
-    xub_StrLen nStartPos = 0;
+    sal_Int32 nStartPos = 0;
     OSQLColumns::Vector::const_iterator aIter = _rCols.get().begin();
     OSQLColumns::Vector::const_iterator aEnd = _rCols.get().end();
     const OValueRefVector::Vector::size_type nCount = _rRow->get().size();
@@ -935,7 +940,7 @@ bool OFlatTable::readLine(sal_Int32 * const pEndPos, sal_Int32 * const pStartPos
     {
         if (pStartPos)
             *pStartPos = m_pFileStream->Tell();
-        m_pFileStream->ReadByteStringLine(m_aCurrentLine,nEncoding);
+        m_pFileStream->ReadByteStringLine(m_aCurrentLine, nEncoding);
         if (m_pFileStream->IsEof())
             return false;
 
@@ -945,8 +950,8 @@ bool OFlatTable::readLine(sal_Int32 * const pEndPos, sal_Int32 * const pStartPos
             m_pFileStream->ReadByteStringLine(sLine,nEncoding);
             if ( !m_pFileStream->IsEof() )
             {
-                m_aCurrentLine.GetString().Append('\n');
-                m_aCurrentLine.GetString() += sLine.GetString();
+                OUString aStr = m_aCurrentLine.GetString() + "\n" + sLine.GetString();
+                m_aCurrentLine.SetString(aStr);
                 sLine = m_aCurrentLine;
             }
             else
diff --git a/connectivity/source/inc/file/quotedstring.hxx b/connectivity/source/inc/file/quotedstring.hxx
index b7b13d7..6c39e7c 100644
--- a/connectivity/source/inc/file/quotedstring.hxx
+++ b/connectivity/source/inc/file/quotedstring.hxx
@@ -31,16 +31,17 @@ namespace connectivity
     //==================================================================
     class OOO_DLLPUBLIC_FILE QuotedTokenizedString
     {
-        String m_sString;
+        OUString m_sString;
     public:
         QuotedTokenizedString() {}
-        QuotedTokenizedString(const String& _sString) : m_sString(_sString){}
+        QuotedTokenizedString(const OUString& _sString) : m_sString(_sString){}
 
-        xub_StrLen  GetTokenCount( sal_Unicode cTok , sal_Unicode cStrDel ) const;
-        String      GetTokenSpecial(xub_StrLen& nStartPos, sal_Unicode cTok = ';', sal_Unicode cStrDel = '\0') const;
-        inline String& GetString() { return m_sString; }
-        inline xub_StrLen Len() const { return m_sString.Len(); }
-        inline operator String&() { return m_sString; }
+        sal_Int32  GetTokenCount( sal_Unicode cTok , sal_Unicode cStrDel ) const;
+        OUString   GetTokenSpecial(sal_Int32& nStartPos, sal_Unicode cTok = ';', sal_Unicode cStrDel = '\0') const;
+        inline OUString& GetString() { return m_sString; }
+        inline void SetString(OUString aStr) { m_sString = aStr;}
+        inline sal_Int32 Len() const { return m_sString.getLength(); }
+        inline operator OUString&() { return m_sString; }
     };
 }
 
diff --git a/connectivity/source/inc/flat/ETable.hxx b/connectivity/source/inc/flat/ETable.hxx
index c5b3608..f283647 100644
--- a/connectivity/source/inc/flat/ETable.hxx
+++ b/connectivity/source/inc/flat/ETable.hxx
@@ -60,9 +60,9 @@ namespace connectivity
             sal_Bool CreateFile(const INetURLObject& aFile, sal_Bool& bCreateMemo);
             bool readLine(sal_Int32 *pEndPos = NULL, sal_Int32 *pStartPos = NULL, bool nonEmpty = false);
             void setRowPos(::std::vector<TRowPositionInFile>::size_type rowNum, const TRowPositionInFile &rowPos);
-            void impl_fillColumnInfo_nothrow(QuotedTokenizedString& aFirstLine,xub_StrLen& nStartPosFirstLine,xub_StrLen& nStartPosFirstLine2
-                                             ,sal_Int32& io_nType,sal_Int32& io_nPrecisions,sal_Int32& io_nScales,String& o_sTypeName
-                                             ,const sal_Unicode cDecimalDelimiter,const sal_Unicode cThousandDelimiter,const CharClass& aCharClass);
+            void impl_fillColumnInfo_nothrow(QuotedTokenizedString& aFirstLine, sal_Int32& nStartPosFirstLine, sal_Int32& nStartPosFirstLine2,
+                                             sal_Int32& io_nType, sal_Int32& io_nPrecisions, sal_Int32& io_nScales, String& o_sTypeName,
+                                             const sal_Unicode cDecimalDelimiter, const sal_Unicode cThousandDelimiter, const CharClass& aCharClass);
             OFlatConnection* getFlatConnection()
             {
 #if OSL_DEBUG_LEVEL>1
diff --git a/dbaccess/source/ui/tabledesign/TableRow.cxx b/dbaccess/source/ui/tabledesign/TableRow.cxx
index da1e61b..fc2ee35 100644
--- a/dbaccess/source/ui/tabledesign/TableRow.cxx
+++ b/dbaccess/source/ui/tabledesign/TableRow.cxx
@@ -22,6 +22,7 @@
 #include "FieldDescriptions.hxx"
 #include <algorithm>
 #include <comphelper/types.hxx>
+#include <tools/string.hxx>
 
 using namespace dbaui;
 using namespace ::com::sun::star::sdbc;
diff --git a/desktop/source/migration/services/wordbookmigration.cxx b/desktop/source/migration/services/wordbookmigration.cxx
index fd3a335..5abe441 100644
--- a/desktop/source/migration/services/wordbookmigration.cxx
+++ b/desktop/source/migration/services/wordbookmigration.cxx
@@ -19,6 +19,7 @@
 
 #include "wordbookmigration.hxx"
 #include <cppuhelper/supportsservice.hxx>
+#include <tools/string.hxx>
 #include <tools/urlobj.hxx>
 #include <unotools/bootstrap.hxx>
 #include <unotools/ucbstreamhelper.hxx>
diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx
index 39e8156..7572014 100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -123,11 +123,11 @@ EditPaM ImpEditEngine::ReadText( SvStream& rInput, EditSelection aSel )
         aSel = ImpDeleteSelection( aSel );
     EditPaM aPaM = aSel.Max();
 
-    XubString aTmpStr;
-    sal_Bool bDone = rInput.ReadByteStringLine( aTmpStr, rInput.GetStreamCharSet() );
+    OUString aTmpStr;
+    bool bDone = rInput.ReadByteStringLine( aTmpStr, rInput.GetStreamCharSet() );
     while ( bDone )
     {
-        aTmpStr.Erase( MAXCHARSINPARA );
+        aTmpStr = aTmpStr.copy(0, MAXCHARSINPARA );
         aPaM = ImpInsertText( EditSelection( aPaM, aPaM ), aTmpStr );
         aPaM = ImpInsertParaBreak( aPaM );
         bDone = rInput.ReadByteStringLine( aTmpStr, rInput.GetStreamCharSet() );
diff --git a/fileaccess/source/FileAccess.cxx b/fileaccess/source/FileAccess.cxx
index 28e3b69..6255442 100644
--- a/fileaccess/source/FileAccess.cxx
+++ b/fileaccess/source/FileAccess.cxx
@@ -29,6 +29,7 @@
 #include <ucbhelper/content.hxx>
 #include <unotools/streamwrap.hxx>
 #include <tools/stream.hxx>
+#include <tools/string.hxx>
 
 #include <com/sun/star/beans/Property.hpp>
 #include <com/sun/star/container/XChild.hpp>
diff --git a/include/sfx2/docfilt.hxx b/include/sfx2/docfilt.hxx
index cc6f6b8..5b23b71 100644
--- a/include/sfx2/docfilt.hxx
+++ b/include/sfx2/docfilt.hxx
@@ -19,9 +19,11 @@
 #ifndef _SFX_DOCFILT_HACK_HXX
 #define _SFX_DOCFILT_HACK_HXX
 
-#include "sal/config.h"
-#include "sfx2/dllapi.h"
-#include "sal/types.h"
+#include <sal/config.h>
+#include <sfx2/dllapi.h>
+#include <sal/types.h>
+#include <tools/solar.h>
+#include <tools/string.hxx>
 #include <com/sun/star/plugin/PluginDescription.hpp>
 #include <com/sun/star/embed/XStorage.hpp>
 #include <com/sun/star/beans/UnknownPropertyException.hpp>
diff --git a/include/sot/factory.hxx b/include/sot/factory.hxx
index 726b243..406333d 100644
--- a/include/sot/factory.hxx
+++ b/include/sot/factory.hxx
@@ -21,6 +21,7 @@
 #define _SOT_FACTORY_HXX
 
 #include <tools/globname.hxx>
+#include <tools/string.hxx>
 #include <tools/rtti.hxx>
 #include "sot/sotdllapi.h"
 #include <vector>
diff --git a/include/sot/storinfo.hxx b/include/sot/storinfo.hxx
index 5518d61..08fc5ea 100644
--- a/include/sot/storinfo.hxx
+++ b/include/sot/storinfo.hxx
@@ -21,6 +21,7 @@
 #define _SOT_STORINFO_HXX
 
 #include <tools/globname.hxx>
+#include <tools/string.hxx>
 #include <vector>
 #include "sot/sotdllapi.h"
 
diff --git a/include/svl/sfontitm.hxx b/include/svl/sfontitm.hxx
index f9bcbdc..068eb93 100644
--- a/include/svl/sfontitm.hxx
+++ b/include/svl/sfontitm.hxx
@@ -22,6 +22,7 @@
 
 #include <tools/color.hxx>
 #include <tools/gen.hxx>
+#include <tools/string.hxx>
 #include <i18nlangtag/lang.h>
 #include <svl/poolitem.hxx>
 
diff --git a/include/svtools/ehdl.hxx b/include/svtools/ehdl.hxx
index 4b06a6e..6958eaf 100644
--- a/include/svtools/ehdl.hxx
+++ b/include/svtools/ehdl.hxx
@@ -25,6 +25,7 @@
 #include "svtools/svtdllapi.h"
 
 #include <tools/errinf.hxx>
+#include <tools/string.hxx>
 
 class Window;
 class ResMgr;
@@ -38,7 +39,7 @@ public:
     SfxErrorContext(
             sal_uInt16 nCtxIdP, const String &aArg1, Window *pWin=0,
             sal_uInt16 nResIdP=USHRT_MAX, ResMgr *pMgrP=0);
-    virtual sal_Bool GetString(sal_uLong nErrId, OUString &rStr);
+    virtual bool GetString(sal_uLong nErrId, OUString &rStr);
 
 private:
     sal_uInt16 nCtxId;
@@ -66,8 +67,7 @@ private:
     ResMgr          *pFreeMgr;
 
     SVT_DLLPRIVATE sal_Bool             GetClassString(sal_uLong lErrId, String &) const;
-    virtual sal_Bool     CreateString(
-                         const ErrorInfo *, OUString &, sal_uInt16 &) const;
+    virtual bool     CreateString( const ErrorInfo *, OUString &, sal_uInt16 &) const;
 };
 
 #endif
diff --git a/include/svx/svdobj.hxx b/include/svx/svdobj.hxx
index c4924d0..ae32d08d 100644
--- a/include/svx/svdobj.hxx
+++ b/include/svx/svdobj.hxx
@@ -24,6 +24,7 @@
 #include <typeinfo>
 #include <cppuhelper/weakref.hxx>
 #include <vcl/mapmod.hxx>
+#include <tools/string.hxx>
 #include <tools/weakbase.hxx>
 #include <svl/lstner.hxx>
 #include <vcl/timer.hxx>
diff --git a/include/svx/svdpagv.hxx b/include/svx/svdpagv.hxx
index b43db7d..2a485be 100644
--- a/include/svx/svdpagv.hxx
+++ b/include/svx/svdpagv.hxx
@@ -21,6 +21,7 @@
 #define _SVDPAGV_HXX
 
 #include <com/sun/star/awt/XControlContainer.hpp>
+#include <tools/string.hxx>
 #include <svl/lstner.hxx>
 #include <svx/svdhlpln.hxx>
 #include <cppuhelper/implbase4.hxx>
diff --git a/include/tools/b3dtrans.hxx b/include/tools/b3dtrans.hxx
index c9e6595..5dace97 100644
--- a/include/tools/b3dtrans.hxx
+++ b/include/tools/b3dtrans.hxx
@@ -145,13 +145,13 @@ public:
     // Parameters of ViewportTransformation
     void SetDeviceRectangle(double fL=-1.0, double fR=1.0,
                             double fB=-1.0, double fT=1.0,
-                            sal_Bool bBroadCastChange=sal_True);
+                            bool bBroadCastChange=true);
     double GetDeviceRectangleWidth() const { return mfRightBound - mfLeftBound; }
     double GetDeviceRectangleHeight() const { return mfTopBound - mfBottomBound; }
     double GetFrontClippingPlane() { return mfNearBound; }
     double GetBackClippingPlane() { return mfFarBound; }
-    void SetPerspective(sal_Bool bNew);
-    sal_Bool GetPerspective() { return mbPerspective; }
+    void SetPerspective(bool bNew);
+    bool GetPerspective() { return mbPerspective; }
     void SetViewportRectangle(Rectangle& rRect, Rectangle& rVisible);
     void SetViewportRectangle(Rectangle& rRect) { SetViewportRectangle(rRect, rRect); }
     const Rectangle& GetViewportRectangle() { return maViewportRectangle; }
@@ -234,7 +234,7 @@ public:
         const basegfx::B3DPoint& rPos = basegfx::B3DPoint(0.0, 0.0, 1.0),
         const basegfx::B3DVector& rLkAt = basegfx::B3DVector(0.0, 0.0, 0.0),
         double fFocLen = 35.0, double fBnkAng = 0.0,
-        sal_Bool bUseFocLen = sal_False);
+        bool bUseFocLen = false);
     virtual ~B3dCamera();
 
     const basegfx::B3DPoint& GetPosition() const { return aPosition; }
@@ -245,11 +245,11 @@ public:
 
     double GetBankAngle() const { return fBankAngle; }
 
-    sal_Bool GetUseFocalLength() const { return (sal_Bool)bUseFocalLength; }
+    bool GetUseFocalLength() const { return (bool)bUseFocalLength; }
 
 protected:
     void CalcNewViewportValues();
-    sal_Bool CalcFocalLength();
+    bool CalcFocalLength();
 
     virtual void DeviceRectangleChange();
 };
diff --git a/include/tools/bigint.hxx b/include/tools/bigint.hxx
index 0cf47ad..95cd395 100644
--- a/include/tools/bigint.hxx
+++ b/include/tools/bigint.hxx
@@ -49,13 +49,13 @@ private:
     TOOLS_DLLPRIVATE void Normalize();
     TOOLS_DLLPRIVATE void Mult(BigInt const &, sal_uInt16);
     TOOLS_DLLPRIVATE void Div(sal_uInt16, sal_uInt16 &);
-    TOOLS_DLLPRIVATE sal_Bool IsLess(BigInt const &) const;
+    TOOLS_DLLPRIVATE bool IsLess(BigInt const &) const;
     TOOLS_DLLPRIVATE void AddLong(BigInt &, BigInt &);
     TOOLS_DLLPRIVATE void SubLong(BigInt &, BigInt &);
     TOOLS_DLLPRIVATE void MultLong(BigInt const &, BigInt &) const;
     TOOLS_DLLPRIVATE void DivLong(BigInt const &, BigInt &) const;
     TOOLS_DLLPRIVATE void ModLong(BigInt const &, BigInt &) const;
-    TOOLS_DLLPRIVATE sal_Bool ABS_IsLess(BigInt const &) const;
+    TOOLS_DLLPRIVATE bool ABS_IsLess(BigInt const &) const;
 
 public:
                     BigInt();
@@ -79,18 +79,18 @@ public:
     operator        sal_uInt16() const;
     operator        sal_uIntPtr() const;
 
-    void            Set( sal_Bool bSet ) { bIsSet = bSet; }
-    OUString   GetString() const;
+    void            Set( bool bSet ) { bIsSet = bSet ? sal_True : sal_False; }
+    OUString        GetString() const;
 
-    sal_Bool        IsSet() const { return bIsSet; }
-    sal_Bool        IsNeg() const;
-    sal_Bool        IsZero() const;
-    sal_Bool        IsOne() const;
-    sal_Bool        IsLong() const { return !bIsBig; }
+    bool        IsSet() const { return (bool)bIsSet; }
+    bool        IsNeg() const;
+    bool        IsZero() const;
+    bool        IsOne() const;
+    bool        IsLong() const { return !((bool)bIsBig); }
     void            Abs();
 #ifdef _TLBIGINT_INT64
-    sal_Bool        INT64 ( SbxINT64  *p ) const;
-    sal_Bool        UINT64( SbxUINT64 *p ) const;
+    bool        INT64 ( SbxINT64  *p ) const;
+    bool        UINT64( SbxUINT64 *p ) const;
 #endif
 
     BigInt&         operator  =( const BigInt& rVal );
@@ -111,12 +111,12 @@ public:
     friend inline   BigInt operator /( const BigInt& rVal1, const BigInt& rVal2 );
     friend inline   BigInt operator %( const BigInt& rVal1, const BigInt& rVal2 );
 
-    TOOLS_DLLPUBLIC friend          sal_Bool operator==( const BigInt& rVal1, const BigInt& rVal2 );
-    friend inline   sal_Bool operator!=( const BigInt& rVal1, const BigInt& rVal2 );
-    TOOLS_DLLPUBLIC friend          sal_Bool operator< ( const BigInt& rVal1, const BigInt& rVal2 );
-    TOOLS_DLLPUBLIC friend          sal_Bool operator> ( const BigInt& rVal1, const BigInt& rVal2 );
-    friend inline   sal_Bool operator<=( const BigInt& rVal1, const BigInt& rVal2 );
-    friend inline   sal_Bool operator>=( const BigInt& rVal1, const BigInt& rVal2 );
+    TOOLS_DLLPUBLIC friend          bool operator==( const BigInt& rVal1, const BigInt& rVal2 );
+    friend inline   bool operator!=( const BigInt& rVal1, const BigInt& rVal2 );
+    TOOLS_DLLPUBLIC friend          bool operator< ( const BigInt& rVal1, const BigInt& rVal2 );
+    TOOLS_DLLPUBLIC friend          bool operator> ( const BigInt& rVal1, const BigInt& rVal2 );
+    friend inline   bool operator<=( const BigInt& rVal1, const BigInt& rVal2 );
+    friend inline   bool operator>=( const BigInt& rVal1, const BigInt& rVal2 );
 
     friend class Fraction;
 };
@@ -224,15 +224,15 @@ inline BigInt& BigInt::operator =( const sal_uInt16 nValue )
     return *this;
 }
 
-inline sal_Bool BigInt::IsNeg() const
+inline bool BigInt::IsNeg() const
 {
     if ( !bIsBig )
         return (nVal < 0);
     else
-        return (sal_Bool)bIsNeg;
+        return (bool)bIsNeg;
 }
 
-inline sal_Bool BigInt::IsZero() const
+inline bool BigInt::IsZero() const
 {
     if ( bIsBig )
         return sal_False;
@@ -240,7 +240,7 @@ inline sal_Bool BigInt::IsZero() const
         return (nVal == 0);
 }
 
-inline sal_Bool BigInt::IsOne() const
+inline bool BigInt::IsOne() const
 {
     if ( bIsBig )
         return sal_False;
@@ -291,17 +291,17 @@ inline BigInt operator%( const BigInt &rVal1, const BigInt &rVal2 )
     return aErg;
 }
 
-inline sal_Bool operator!=( const BigInt& rVal1, const BigInt& rVal2 )
+inline bool operator!=( const BigInt& rVal1, const BigInt& rVal2 )
 {
     return !(rVal1 == rVal2);
 }
 
-inline sal_Bool operator<=( const BigInt& rVal1, const BigInt& rVal2 )
+inline bool operator<=( const BigInt& rVal1, const BigInt& rVal2 )
 {
     return !( rVal1 > rVal2);
 }
 
-inline sal_Bool operator>=( const BigInt& rVal1, const BigInt& rVal2 )
+inline bool operator>=( const BigInt& rVal1, const BigInt& rVal2 )
 {
     return !(rVal1 < rVal2);
 }
diff --git a/include/tools/cachestr.hxx b/include/tools/cachestr.hxx
index 60c31e2..6d98056 100644
--- a/include/tools/cachestr.hxx
+++ b/include/tools/cachestr.hxx
@@ -20,7 +20,6 @@
 #define _CACHESTR_HXX
 
 #include <tools/stream.hxx>
-#include <tools/string.hxx>
 #include "tools/toolsdllapi.h"
 
 class TempFile;
@@ -28,9 +27,9 @@ class TempFile;
 class TOOLS_DLLPUBLIC SvCacheStream : public SvStream
 {
 private:
-    String          aFileName;
+    OUString        aFileName;
     sal_uIntPtr     nMaxSize;
-    int             bPersistent;
+    bool            bPersistent;
 
     SvStream*       pSwapStream;
     SvStream*       pCurrentStream;
@@ -48,18 +47,16 @@ public:
                     SvCacheStream( sal_uIntPtr nMaxMemSize = 0 );
                     ~SvCacheStream();
 
-    void            SetFilename( const String& rFN )
-                 { aFileName = rFN; } // call only from FilenameHdl
-    const String&   GetFilename() const { return aFileName; }
+    void            SetFilename( const OUString& rFN ) { aFileName = rFN; } // call only from FilenameHdl
+    const OUString& GetFilename() const { return aFileName; }
 
     void            SwapOut();
     const void*     GetBuffer();
     sal_uIntPtr     GetSize();
 
-    sal_Bool        IsPersistent() { return bPersistent != 0; }
-    void            SetPersistence( sal_Bool b = sal_True ) { bPersistent = b; }
-    void            SetSwapStream( SvStream *p )
-                 { pSwapStream = p; } // call only from FilenameHdl
+    bool            IsPersistent() { return bPersistent; }
+    void            SetPersistence( bool b = true ) { bPersistent = b; }
+    void            SetSwapStream( SvStream *p ) { pSwapStream = p; } // call only from FilenameHdl
 };
 
 #endif
diff --git a/include/tools/color.hxx b/include/tools/color.hxx
index 911088b..f992c32 100644
--- a/include/tools/color.hxx
+++ b/include/tools/color.hxx
@@ -138,11 +138,11 @@ public:
 
     void                Merge( const Color& rMergeColor, sal_uInt8 cTransparency );
 
-    sal_Bool            IsRGBEqual( const Color& rColor ) const;
+    bool                IsRGBEqual( const Color& rColor ) const;
 
     // comparison with luminance thresholds
-    sal_Bool            IsDark()    const;
-    sal_Bool            IsBright()  const;
+    bool                IsDark()    const;
+    bool                IsBright()  const;
 
     // color space conversion tools
     // the range for h/s/b is:
@@ -152,13 +152,13 @@ public:
     static ColorData    HSBtoRGB( sal_uInt16 nHue, sal_uInt16 nSat, sal_uInt16 nBri );
     void                RGBtoHSB( sal_uInt16& nHue, sal_uInt16& nSat, sal_uInt16& nBri ) const;
 
-    sal_Bool            operator==( const Color& rColor ) const
-                        { return (mnColor == rColor.mnColor); }
-    sal_Bool            operator!=( const Color& rColor ) const
-                        { return !(Color::operator==( rColor )); }
+    bool                operator==( const Color& rColor ) const
+                            { return (mnColor == rColor.mnColor); }
+    bool                operator!=( const Color& rColor ) const
+                            { return !(Color::operator==( rColor )); }
 
-    SvStream&           Read( SvStream& rIStm, sal_Bool bNewFormat = sal_True );
-    SvStream&           Write( SvStream& rOStm, sal_Bool bNewFormat = sal_True );
+    SvStream&           Read( SvStream& rIStm, bool bNewFormat = true );
+    SvStream&           Write( SvStream& rOStm, bool bNewFormat = true );
 
     TOOLS_DLLPUBLIC friend SvStream&    operator>>( SvStream& rIStream, Color& rColor );
     TOOLS_DLLPUBLIC friend SvStream&    operator<<( SvStream& rOStream, const Color& rColor );
@@ -191,7 +191,7 @@ inline void Color::SetTransparency( sal_uInt8 nTransparency )
     mnColor |= ((sal_uInt32)nTransparency)<<24;
 }
 
-inline sal_Bool Color::IsRGBEqual( const Color& rColor ) const
+inline bool Color::IsRGBEqual( const Color& rColor ) const
 {
     return (COLORDATA_RGB( mnColor ) == COLORDATA_RGB( rColor.mnColor ));
 }
diff --git a/include/tools/config.hxx b/include/tools/config.hxx
index 64b690f..d19cc0d 100644
--- a/include/tools/config.hxx
+++ b/include/tools/config.hxx
@@ -28,17 +28,17 @@ struct ImplGroupData;
 class TOOLS_DLLPUBLIC Config
 {
 private:
-    OUString       maFileName;
-    OString        maGroupName;
+    OUString            maFileName;
+    OString             maGroupName;
     ImplConfigData*     mpData;
     ImplGroupData*      mpActGroup;
     sal_uIntPtr         mnDataUpdateId;
     sal_uInt16          mnLockCount;
-    sal_Bool            mbPersistence;
-    sal_Bool            mbDummy1;
+    bool                mbPersistence;
+    bool                mbDummy1;
 
-    TOOLS_DLLPRIVATE sal_Bool           ImplUpdateConfig() const;
-    TOOLS_DLLPRIVATE ImplGroupData*     ImplGetGroup() const;
+    TOOLS_DLLPRIVATE bool           ImplUpdateConfig() const;
+    TOOLS_DLLPRIVATE ImplGroupData* ImplGetGroup() const;
 
 public:
                         Config( const OUString& rFileName );
@@ -51,7 +51,7 @@ public:
     void DeleteGroup(const OString& rGroup);
     OString GetGroupName(sal_uInt16 nGroup) const;
     sal_uInt16 GetGroupCount() const;
-    sal_Bool HasGroup(const OString& rGroup) const;
+    bool HasGroup(const OString& rGroup) const;
 
     OString ReadKey(const OString& rKey) const;
     OUString ReadKey(const OString& rKey, rtl_TextEncoding eEncoding) const;
@@ -62,12 +62,12 @@ public:
     OString ReadKey(sal_uInt16 nKey) const;
     sal_uInt16              GetKeyCount() const;
 
-    sal_Bool            IsLocked() const { return (mnLockCount != 0); }
+    bool                IsLocked() const { return (mnLockCount != 0); }
     void                Flush();
 
-    void                EnablePersistence( sal_Bool bPersistence = sal_True )
+    void                EnablePersistence( bool bPersistence = true )
                             { mbPersistence = bPersistence; }
-    sal_Bool                IsPersistenceEnabled() const { return mbPersistence; }
+    bool                IsPersistenceEnabled() const { return mbPersistence; }
 
 private:
     TOOLS_DLLPRIVATE    Config( const Config& rConfig );
diff --git a/include/tools/date.hxx b/include/tools/date.hxx
index 714a97b..5b451a3 100644
--- a/include/tools/date.hxx
+++ b/include/tools/date.hxx
@@ -110,13 +110,13 @@ public:
     sal_uInt16      GetDaysInMonth() const;
 
     sal_uInt16      GetDaysInYear() const { return (IsLeapYear()) ? 366 : 365; }
-    sal_Bool        IsLeapYear() const;
+    bool            IsLeapYear() const;
 
     /** If the represented date is valid (1<=month<=12, 1<=day<=(28,29,30,31)
         depending on month/year) AND is of the Gregorian calendar (1582-10-15
         <= date) (AND implicitly date <= 9999-12-31 due to internal
         representation) */
-    sal_Bool        IsValidAndGregorian() const;
+    bool            IsValidAndGregorian() const;
 
     /** If the represented date is valid (1<=month<=12, 1<=day<=(28,29,30,31)
         depending on month/year) */
@@ -136,21 +136,21 @@ public:
      */
     bool            Normalize();
 
-    sal_Bool        IsBetween( const Date& rFrom, const Date& rTo ) const
+    bool            IsBetween( const Date& rFrom, const Date& rTo ) const
                         { return ((nDate >= rFrom.nDate) &&
                                  (nDate <= rTo.nDate)); }
 
-    sal_Bool        operator ==( const Date& rDate ) const
+    bool            operator ==( const Date& rDate ) const
                         { return (nDate == rDate.nDate); }
-    sal_Bool        operator !=( const Date& rDate ) const
+    bool            operator !=( const Date& rDate ) const
                         { return (nDate != rDate.nDate); }
-    sal_Bool        operator  >( const Date& rDate ) const
+    bool            operator  >( const Date& rDate ) const
                         { return (nDate > rDate.nDate); }
-    sal_Bool        operator  <( const Date& rDate ) const
+    bool            operator  <( const Date& rDate ) const
                         { return (nDate < rDate.nDate); }
-    sal_Bool        operator >=( const Date& rDate ) const
+    bool            operator >=( const Date& rDate ) const
                         { return (nDate >= rDate.nDate); }
-    sal_Bool        operator <=( const Date& rDate ) const
+    bool            operator <=( const Date& rDate ) const
                         { return (nDate <= rDate.nDate); }
 
     Date&           operator =( const Date& rDate )
diff --git a/include/tools/datetime.hxx b/include/tools/datetime.hxx
index 1de0f3d..a8d732e 100644
--- a/include/tools/datetime.hxx
+++ b/include/tools/datetime.hxx
@@ -47,26 +47,26 @@ public:
                     DateTime( const Date& rDate, const Time& rTime ) :
                         Date( rDate ), Time( rTime ) {}
 
-    sal_Bool        IsBetween( const DateTime& rFrom,
+    bool            IsBetween( const DateTime& rFrom,
                                const DateTime& rTo ) const;
 
-    sal_Bool        IsEqualIgnoreNanoSec( const DateTime& rDateTime ) const
+    bool            IsEqualIgnoreNanoSec( const DateTime& rDateTime ) const
                     {
                         if ( Date::operator!=( rDateTime ) )
-                            return sal_False;
+                            return false;
                         return Time::IsEqualIgnoreNanoSec( rDateTime );
                     }
 
-    sal_Bool        operator ==( const DateTime& rDateTime ) const
+    bool            operator ==( const DateTime& rDateTime ) const
                         { return (Date::operator==( rDateTime ) &&
                                   Time::operator==( rDateTime )); }
-    sal_Bool        operator !=( const DateTime& rDateTime ) const
+    bool            operator !=( const DateTime& rDateTime ) const
                         { return (Date::operator!=( rDateTime ) ||
                                   Time::operator!=( rDateTime )); }
-    sal_Bool        operator  >( const DateTime& rDateTime ) const;
-    sal_Bool        operator  <( const DateTime& rDateTime ) const;
-    sal_Bool        operator >=( const DateTime& rDateTime ) const;
-    sal_Bool        operator <=( const DateTime& rDateTime ) const;
+    bool            operator  >( const DateTime& rDateTime ) const;
+    bool            operator  <( const DateTime& rDateTime ) const;
+    bool            operator >=( const DateTime& rDateTime ) const;
+    bool            operator <=( const DateTime& rDateTime ) const;
 
     long            GetSecFromDateTime( const Date& rDate ) const;
 
diff --git a/include/tools/debug.hxx b/include/tools/debug.hxx
index 5416050..44be8f0 100644
--- a/include/tools/debug.hxx
+++ b/include/tools/debug.hxx
@@ -182,9 +182,9 @@ typedef sal_uInt16 DbgChannelId;
 */
 TOOLS_DLLPUBLIC DbgChannelId DbgRegisterUserChannel( DbgPrintLine pProc );
 
-inline sal_Bool DbgFilterMessage( const char* pMsg )
+inline bool DbgFilterMessage( const char* pMsg )
 {
-    return (sal_Bool)(long) DbgFunc( DBG_FUNC_FILTERMESSAGE, (void*)pMsg );
+    return (bool)(long) DbgFunc( DBG_FUNC_FILTERMESSAGE, (void*)pMsg );
 }
 
 inline int DbgIsAllErrorOut()
diff --git a/include/tools/errinf.hxx b/include/tools/errinf.hxx
index 815447b..04f0367 100644
--- a/include/tools/errinf.hxx
+++ b/include/tools/errinf.hxx
@@ -23,9 +23,9 @@
 #define _EINF_HXX
 
 #include <limits.h>
+#include <rtl/ustring.hxx>
 #include <tools/rtti.hxx>
 #include <tools/errcode.hxx>
-#include <tools/string.hxx>
 #include "tools/toolsdllapi.h"
 
 class EDcr_Impl;
@@ -127,7 +127,7 @@ public:
                             ErrorContext(Window *pWin=0);
     virtual                 ~ErrorContext();
 
-    virtual sal_Bool        GetString( sal_uIntPtr nErrId, OUString& rCtxStr ) = 0;
+    virtual bool            GetString( sal_uIntPtr nErrId, OUString& rCtxStr ) = 0;
     Window*                 GetParent() { return pWin; }
 
     static ErrorContext*    GetContext();
@@ -148,10 +148,10 @@ private:
 
     static sal_uInt16   HandleError_Impl( sal_uIntPtr lId,
                               sal_uInt16 nFlags,
-                              sal_Bool bJustCreateString,
+                              bool bJustCreateString,
                               OUString & rError);
 protected:
-    virtual sal_Bool    CreateString( const ErrorInfo *,
+    virtual bool        CreateString( const ErrorInfo *,
                               OUString &, sal_uInt16& nMask ) const = 0;
 
 public:
@@ -159,7 +159,7 @@ public:
     virtual             ~ErrorHandler();
 
     static sal_uInt16   HandleError ( sal_uIntPtr lId, sal_uInt16 nMask = USHRT_MAX );
-    static sal_Bool     GetErrorString( sal_uIntPtr lId, OUString& rStr );
+    static bool         GetErrorString( sal_uIntPtr lId, OUString& rStr );
 
     static void         RegisterDisplay( BasicDisplayErrorFunc* );
     static void         RegisterDisplay( WindowDisplayErrorFunc* );
@@ -168,7 +168,7 @@ public:
 class TOOLS_DLLPUBLIC SimpleErrorHandler : private ErrorHandler
 {
 protected:
-    virtual sal_Bool    CreateString( const ErrorInfo*, OUString &,
+    virtual bool        CreateString( const ErrorInfo*, OUString &,
                                       sal_uInt16 &nMask ) const;
 
 public:
diff --git a/include/tools/gen.hxx b/include/tools/gen.hxx
index c1a1e35..fbfac95 100644
--- a/include/tools/gen.hxx
+++ b/include/tools/gen.hxx
@@ -42,8 +42,8 @@ public:
     long&               A() { return nA; }
     long&               B() { return nB; }
 
-    sal_Bool            operator == ( const Pair& rPair ) const;
-    sal_Bool            operator != ( const Pair& rPair ) const;
+    bool                operator == ( const Pair& rPair ) const;
+    bool                operator != ( const Pair& rPair ) const;
 
     TOOLS_DLLPUBLIC friend SvStream&    operator>>( SvStream& rIStream, Pair& rPair );
     TOOLS_DLLPUBLIC friend SvStream&    operator<<( SvStream& rOStream, const Pair& rPair );
@@ -64,12 +64,12 @@ inline Pair::Pair( long _nA, long _nB )
     Pair::nB = _nB;
 }
 
-inline sal_Bool Pair::operator == ( const Pair& rPair ) const
+inline bool Pair::operator == ( const Pair& rPair ) const
 {
     return ((nA == rPair.nA) && (nB == rPair.nB));
 }
 
-inline sal_Bool Pair::operator != ( const Pair& rPair ) const
+inline bool Pair::operator != ( const Pair& rPair ) const
 {
     return ((nA != rPair.nA) || (nB != rPair.nB));
 }
@@ -89,10 +89,10 @@ public:
     long&               Y() { return nB; }
 
     void                Move( long nHorzMove, long nVertMove );
-    sal_Bool            IsAbove( const Point& rPoint ) const;
-    sal_Bool            IsBelow( const Point& rPoint ) const;
-    sal_Bool            IsLeft( const Point& rPoint ) const;
-    sal_Bool            IsRight( const Point& rPoint ) const;
+    bool                IsAbove( const Point& rPoint ) const;
+    bool                IsBelow( const Point& rPoint ) const;
+    bool                IsLeft( const Point& rPoint ) const;
+    bool                IsRight( const Point& rPoint ) const;
 
     Point&              operator += ( const Point& rPoint );
     Point&              operator -= ( const Point& rPoint );
@@ -124,22 +124,22 @@ inline void Point::Move( long nHorzMove, long nVertMove )
     nB += nVertMove;
 }
 
-inline sal_Bool Point::IsAbove( const Point& rPoint ) const
+inline bool Point::IsAbove( const Point& rPoint ) const
 {
     return (nB > rPoint.nB);
 }
 
-inline sal_Bool Point::IsBelow( const Point& rPoint ) const
+inline bool Point::IsBelow( const Point& rPoint ) const
 {
     return (nB < rPoint.nB);
 }
 
-inline sal_Bool Point::IsLeft( const Point& rPoint ) const
+inline bool Point::IsLeft( const Point& rPoint ) const
 {
     return (nA < rPoint.nA);
 }
 
-inline sal_Bool Point::IsRight( const Point& rPoint ) const
+inline bool Point::IsRight( const Point& rPoint ) const
 {
     return (nA > rPoint.nA);
 }
@@ -252,7 +252,7 @@ public:
     long&           Min() { return nA; }
     long&           Max() { return nB; }
 
-    sal_Bool        IsInside( long nIs ) const;
+    bool            IsInside( long nIs ) const;
 
     void            Justify();
 };
@@ -265,7 +265,7 @@ inline Range::Range( long nMin, long nMax ) : Pair( nMin, nMax )
 {
 }
 
-inline sal_Bool Range::IsInside( long nIs ) const
+inline bool Range::IsInside( long nIs ) const
 {
     return ((nA <= nIs) && (nIs <= nB ));
 }
@@ -306,11 +306,11 @@ public:
     long&           Min() { return nA; }
     long&           Max() { return nB; }
 
-    sal_Bool        IsInside( long nIs ) const;
+    bool            IsInside( long nIs ) const;
 
     void            Justify();
 
-    sal_Bool        operator !() const { return !Len(); }
+    bool            operator !() const { return !Len(); }
 
     long            getMin() const { return Min(); }
     long            getMax() const { return Max(); }
@@ -331,7 +331,7 @@ inline Selection::Selection( long nMin, long nMax ) :
 {
 }
 
-inline sal_Bool Selection::IsInside( long nIs ) const
+inline bool Selection::IsInside( long nIs ) const
 {
     return ((nA <= nIs) && (nIs < nB ));
 }
@@ -401,15 +401,15 @@ public:
 
     void                Justify();
 
-    sal_Bool            IsInside( const Point& rPOINT ) const;
-    sal_Bool            IsInside( const Rectangle& rRect ) const;
-    sal_Bool            IsOver( const Rectangle& rRect ) const;
+    bool                IsInside( const Point& rPOINT ) const;
+    bool                IsInside( const Rectangle& rRect ) const;
+    bool                IsOver( const Rectangle& rRect ) const;
 
     void                SetEmpty() { nRight = nBottom = RECT_EMPTY; }
-    inline sal_Bool     IsEmpty() const;
+    inline bool         IsEmpty() const;
 
-    inline sal_Bool     operator == ( const Rectangle& rRect ) const;
-    inline sal_Bool     operator != ( const Rectangle& rRect ) const;
+    inline bool         operator == ( const Rectangle& rRect ) const;
+    inline bool         operator != ( const Rectangle& rRect ) const;
 
     inline Rectangle&   operator += ( const Point& rPt );
     inline Rectangle&   operator -= ( const Point& rPt );
@@ -468,7 +468,7 @@ inline Rectangle::Rectangle( const Point& rLT, const Size& rSize )
     nBottom = rSize.Height() ? nTop+rSize.Height()-1 : RECT_EMPTY;
 }
 
-inline sal_Bool Rectangle::IsEmpty() const
+inline bool Rectangle::IsEmpty() const
 {
     return ((nRight == RECT_EMPTY) || (nBottom == RECT_EMPTY));
 }
@@ -621,7 +621,7 @@ inline Rectangle Rectangle::GetIntersection( const Rectangle& rRect ) const
     return aTmpRect.Intersection( rRect );
 }
 
-inline sal_Bool Rectangle::operator == ( const Rectangle& rRect ) const
+inline bool Rectangle::operator == ( const Rectangle& rRect ) const
 {
     return ((nLeft   == rRect.nLeft   ) &&
             (nTop    == rRect.nTop    ) &&
@@ -629,7 +629,7 @@ inline sal_Bool Rectangle::operator == ( const Rectangle& rRect ) const
             (nBottom == rRect.nBottom ));
 }
 
-inline sal_Bool Rectangle::operator != ( const Rectangle& rRect ) const
+inline bool Rectangle::operator != ( const Rectangle& rRect ) const
 {
     return ((nLeft   != rRect.nLeft   ) ||
             (nTop    != rRect.nTop    ) ||
diff --git a/include/tools/globname.hxx b/include/tools/globname.hxx
index 2ea6850..eb7b7e9 100644
--- a/include/tools/globname.hxx
+++ b/include/tools/globname.hxx
@@ -23,7 +23,6 @@
 
 #include "tools/toolsdllapi.h"
 #include <com/sun/star/uno/Sequence.hxx>
-#include <tools/string.hxx>
 
 struct ImpSvGlobalName
 {
@@ -39,7 +38,7 @@ struct ImpSvGlobalName
                 ImpSvGlobalName( const ImpSvGlobalName & rObj );
                 ImpSvGlobalName( Empty );
 
-    sal_Bool    operator == ( const ImpSvGlobalName & rObj ) const;
+    bool        operator == ( const ImpSvGlobalName & rObj ) const;
 };
 
 #ifdef WNT
@@ -82,17 +81,17 @@ public:
     TOOLS_DLLPUBLIC friend SvStream & operator >> ( SvStream &, SvGlobalName & );
     TOOLS_DLLPUBLIC friend SvStream & operator << ( SvStream &, const SvGlobalName & );
 
-    sal_Bool            operator < ( const SvGlobalName & rObj ) const;
-    SvGlobalName &  operator += ( sal_uInt32 );
-    SvGlobalName &  operator ++ () { return operator += ( 1 ); }
+    bool          operator < ( const SvGlobalName & rObj ) const;
+    SvGlobalName& operator += ( sal_uInt32 );
+    SvGlobalName& operator ++ () { return operator += ( 1 ); }
 
-    sal_Bool    operator == ( const SvGlobalName & rObj ) const;
-    sal_Bool    operator != ( const SvGlobalName & rObj ) const
-            { return !(*this == rObj); }
+    bool          operator == ( const SvGlobalName & rObj ) const;
+    bool          operator != ( const SvGlobalName & rObj ) const
+                      { return !(*this == rObj); }
 
-    void    MakeFromMemory( void * pData );
-    sal_Bool    MakeId( const String & rId );
-    String  GetHexName() const;
+    void          MakeFromMemory( void * pData );
+    bool          MakeId( const OUString & rId );
+    OUString      GetHexName() const;
 
                   SvGlobalName( const CLSID & rId );
     const CLSID & GetCLSID() const { return *(CLSID *)pImp->szData; }
diff --git a/include/tools/inetmime.hxx b/include/tools/inetmime.hxx
index afe4247..347bb78 100644
--- a/include/tools/inetmime.hxx
+++ b/include/tools/inetmime.hxx
@@ -26,6 +26,7 @@
 #include <rtl/character.hxx>
 #include <rtl/string.hxx>
 #include <rtl/strbuf.hxx>
+#include <rtl/ustring.hxx>
 #include <rtl/tencinfo.h>
 #include <tools/debug.hxx>
 #include <tools/errcode.hxx>
diff --git a/include/tools/inetmsg.hxx b/include/tools/inetmsg.hxx
index 395286a..fe05d63 100644
--- a/include/tools/inetmsg.hxx
+++ b/include/tools/inetmsg.hxx
@@ -408,7 +408,7 @@ class TOOLS_DLLPUBLIC INetMIMEMessage : public INetRFC822Message
 
     void CleanupImp();
     void CopyImp    (const INetMIMEMessage& rMsg);
-    void SetHeaderParsed() { bHeaderParsed = sal_True; }
+    void SetHeaderParsed() { bHeaderParsed = true; }
 
 protected:
     virtual SvStream& operator<< (SvStream& rStrm) const;
diff --git a/include/tools/inetstrm.hxx b/include/tools/inetstrm.hxx
index d7b4e14..dcf1ecd 100644
--- a/include/tools/inetstrm.hxx
+++ b/include/tools/inetstrm.hxx
@@ -21,7 +21,7 @@
 
 #include "tools/toolsdllapi.h"
 #include <sal/types.h>
-#include <tools/string.hxx>
+#include <rtl/ustring.hxx>
 
 class INetMessage;
 class INetMIMEMessage;
@@ -84,7 +84,7 @@ enum INetMessageStreamState
 class INetMessageIStream : public INetIStream
 {
     INetMessage    *pSourceMsg;
-    sal_Bool            bHeaderGenerated;
+    bool            bHeaderGenerated;
 
     sal_uIntPtr           nBufSiz;
     sal_Char       *pBuffer;
@@ -112,15 +112,15 @@ public:
     INetMessage *GetSourceMessage (void) const { return pSourceMsg; }
     void SetSourceMessage (INetMessage *pMsg) { pSourceMsg = pMsg; }
 
-    void GenerateHeader (sal_Bool bGen = sal_True) { bHeaderGenerated = !bGen; }
-    sal_Bool IsHeaderGenerated (void) const { return bHeaderGenerated; }
+    void GenerateHeader (bool bGen = true) { bHeaderGenerated = !bGen; }
+    bool IsHeaderGenerated (void) const { return bHeaderGenerated; }
 };
 
 /// Message Parser Interface.
 class INetMessageOStream : public INetOStream
 {
     INetMessage            *pTargetMsg;
-    sal_Bool                    bHeaderParsed;
+    bool                    bHeaderParsed;
 
     INetMessageStreamState  eOState;
 
@@ -142,8 +142,8 @@ public:
     INetMessage *GetTargetMessage (void) const { return pTargetMsg; }
     void SetTargetMessage (INetMessage *pMsg) { pTargetMsg = pMsg; }
 
-    void ParseHeader (sal_Bool bParse = sal_True) { bHeaderParsed = !bParse; }
-    sal_Bool IsHeaderParsed (void) const { return bHeaderParsed; }
+    void ParseHeader (bool bParse = true) { bHeaderParsed = !bParse; }
+    bool IsHeaderParsed (void) const { return bHeaderParsed; }
 };
 
 class INetMessageIOStream
@@ -182,7 +182,7 @@ class TOOLS_DLLPUBLIC INetMIMEMessageStream : public INetMessageIOStream
     SvMemoryStream        *pMsgBuffer;
 
     static INetMessageEncoding GetMsgEncoding (
-        const String& rContentType);
+        const OUString& rContentType);
 
     // Not implemented.
     INetMIMEMessageStream (const INetMIMEMessageStream& rStrm);
diff --git a/include/tools/line.hxx b/include/tools/line.hxx
index e1b62ff..eb3f321 100644
--- a/include/tools/line.hxx
+++ b/include/tools/line.hxx
@@ -47,8 +47,8 @@ public:
 
     double          GetLength() const;
 
-    sal_Bool        Intersection( const Line& rLine, double& rIntersectionX, double& rIntersectionY ) const;
-    sal_Bool        Intersection( const Line& rLine, Point& rIntersection ) const;
+    bool            Intersection( const Line& rLine, double& rIntersectionX, double& rIntersectionY ) const;
+    bool            Intersection( const Line& rLine, Point& rIntersection ) const;
 
     double          GetDistance( const double& rPtX, const double& rPtY ) const;
     double          GetDistance( const Point& rPoint ) const { return( GetDistance( rPoint.X(), rPoint.Y() ) ); }
diff --git a/include/tools/link.hxx b/include/tools/link.hxx
index a06e8b9..279c7b7 100644
--- a/include/tools/link.hxx
+++ b/include/tools/link.hxx
@@ -96,13 +96,13 @@ public:
 
     sal_IntPtr      Call( void* pCaller ) const;
 
-    sal_Bool        IsSet() const;
-    sal_Bool        operator !() const;
+    bool            IsSet() const;
+    bool            operator !() const;
 
-    sal_Bool        operator==( const Link& rLink ) const;
-    sal_Bool        operator!=( const Link& rLink ) const
+    bool            operator==( const Link& rLink ) const;
+    bool            operator!=( const Link& rLink ) const
                     { return !(Link::operator==( rLink )); }
-    sal_Bool        operator<( const Link& rLink ) const
+    bool            operator<( const Link& rLink ) const
                     { return ((sal_uIntPtr)rLink.pFunc < (sal_uIntPtr)pFunc); }
 };
 
@@ -123,20 +123,20 @@ inline sal_IntPtr Link::Call(void *pCaller) const
     return pFunc ? (*pFunc)(pInst, pCaller) : 0;
 }
 
-inline sal_Bool Link::IsSet() const
+inline bool Link::IsSet() const
 {
     if ( pFunc )
-        return sal_True;
+        return true;
     else
-        return sal_False;
+        return false;
 }
 
-inline sal_Bool Link::operator !() const
+inline bool Link::operator !() const
 {
     if ( !pFunc )
-        return sal_True;
+        return true;
     else
-        return sal_False;
+        return false;
 }
 
 #endif
diff --git a/include/tools/multisel.hxx b/include/tools/multisel.hxx
index 8b5d434..7e3d463 100644
--- a/include/tools/multisel.hxx
+++ b/include/tools/multisel.hxx
@@ -38,13 +38,13 @@ private:
     sal_uIntPtr     nCurSubSel; // index in aSels of current selected index
     long            nCurIndex;  // current selected entry
     sal_uIntPtr     nSelCount;  // number of selected indexes
-    sal_Bool        bInverseCur;// inverse cursor
-    sal_Bool        bCurValid;  // are nCurIndex and nCurSubSel valid
-    sal_Bool        bSelectNew; // auto-select newly inserted indexes
+    bool            bInverseCur;// inverse cursor
+    bool            bCurValid;  // are nCurIndex and nCurSubSel valid
+    bool            bSelectNew; // auto-select newly inserted indexes
 
     TOOLS_DLLPRIVATE void           ImplClear();
     TOOLS_DLLPRIVATE size_t         ImplFindSubSelection( long nIndex ) const;
-    TOOLS_DLLPRIVATE sal_Bool       ImplMergeSubSelections( size_t nPos1, size_t nPos2 );
+    TOOLS_DLLPRIVATE bool           ImplMergeSubSelections( size_t nPos1, size_t nPos2 );
     TOOLS_DLLPRIVATE long           ImplFwdUnselected();
 
 public:
@@ -54,17 +54,17 @@ public:
                     ~MultiSelection();
 
     MultiSelection& operator= ( const MultiSelection& rOrig );
-    sal_Bool        operator== ( MultiSelection& rOrig );
-    sal_Bool        operator!= ( MultiSelection& rOrig )
+    bool            operator== ( MultiSelection& rOrig );
+    bool            operator!= ( MultiSelection& rOrig )
                         { return !operator==( rOrig ); }
-    sal_Bool        operator !() const
+    bool            operator !() const
                         { return nSelCount == 0; }
 
-    void            SelectAll( sal_Bool bSelect = sal_True );
-    sal_Bool        Select( long nIndex, sal_Bool bSelect = sal_True );
-    void            Select( const Range& rIndexRange, sal_Bool bSelect = sal_True );
-    sal_Bool        IsSelected( long nIndex ) const;
-    sal_Bool        IsAllSelected() const
+    void            SelectAll( bool bSelect = true );
+    bool            Select( long nIndex, bool bSelect = true );
+    void            Select( const Range& rIndexRange, bool bSelect = true );
+    bool            IsSelected( long nIndex ) const;
+    bool            IsAllSelected() const
                         { return nSelCount == sal_uIntPtr(aTotRange.Len()); }
     long            GetSelectCount() const { return nSelCount; }
 
@@ -73,9 +73,9 @@ public:
     void            Remove( long nIndex );
 
     const Range&    GetTotalRange() const { return aTotRange; }
-    sal_Bool        IsCurValid() const { return bCurValid; }
+    bool            IsCurValid() const { return bCurValid; }
     long            GetCurSelected() const { return nCurIndex; }
-    long            FirstSelected( sal_Bool bInverse = sal_False );
+    long            FirstSelected( bool bInverse = false );
     long            LastSelected();
     long            NextSelected();
 
diff --git a/include/tools/poly.hxx b/include/tools/poly.hxx
index 4229195..b2d9b71 100644
--- a/include/tools/poly.hxx
+++ b/include/tools/poly.hxx
@@ -107,7 +107,7 @@ public:
                         Polygon( const Rectangle& rBound,
                                  const Point& rStart, const Point& rEnd,
                                  PolyStyle ePolyStyle = POLY_ARC,
-                                 sal_Bool bWholeCircle = sal_False );
+                                 bool bWholeCircle = false );
                         Polygon( const Point& rBezPt1, const Point& rCtrlPt1,
                                  const Point& rBezPt2, const Point& rCtrlPt2,
                                  sal_uInt16 nPoints = 0 );
@@ -120,9 +120,9 @@ public:
 
     void                SetFlags( sal_uInt16 nPos, PolyFlags eFlags );
     PolyFlags           GetFlags( sal_uInt16 nPos ) const;
-    sal_Bool            HasFlags() const;
+    bool                HasFlags() const;
 
-    sal_Bool            IsRect() const;
+    bool                IsRect() const;
 
     void                SetSize( sal_uInt16 nNewSize );
     sal_uInt16          GetSize() const;
@@ -131,10 +131,10 @@ public:
 
     Rectangle           GetBoundRect() const;
     double              GetSignedArea() const;
-    sal_Bool            IsInside( const Point& rPt ) const;
-    sal_Bool            IsRightOrientated() const;
+    bool                IsInside( const Point& rPt ) const;
+    bool                IsRightOrientated() const;
     double              CalcDistance( sal_uInt16 nPt1, sal_uInt16 nPt2 );
-    void                Clip( const Rectangle& rRect, sal_Bool bPolygon = sal_True );
+    void                Clip( const Rectangle& rRect, bool bPolygon = true );
     void                Optimize( sal_uIntPtr nOptimizeFlags, const PolyOptimizeData* pData = NULL );
 
     /** Adaptive subdivision of polygons with curves
@@ -170,10 +170,10 @@ public:
     Point&              operator[]( sal_uInt16 nPos );
 
     Polygon&            operator=( const Polygon& rPoly );
-    sal_Bool            operator==( const Polygon& rPoly ) const;
-    sal_Bool            operator!=( const Polygon& rPoly ) const
+    bool                operator==( const Polygon& rPoly ) const;
+    bool                operator!=( const Polygon& rPoly ) const
                             { return !(Polygon::operator==( rPoly )); }
-    sal_Bool            IsEqual( const Polygon& rPoly ) const;
+    bool                IsEqual( const Polygon& rPoly ) const;
 
     // streaming a Polygon does ignore PolyFlags, so use the Write Or Read
     // method to take care of PolyFlags
@@ -214,7 +214,7 @@ public:
     void                Replace( const Polygon& rPoly, sal_uInt16 nPos );
     const Polygon&      GetObject( sal_uInt16 nPos ) const;
 
-    sal_Bool            IsRect() const;
+    bool                IsRect() const;
 
     void                Clear();
 
@@ -256,11 +256,11 @@ public:
     Polygon&            operator[]( sal_uInt16 nPos );
 
     PolyPolygon&        operator=( const PolyPolygon& rPolyPoly );
-    sal_Bool                operator==( const PolyPolygon& rPolyPoly ) const;
-    sal_Bool                operator!=( const PolyPolygon& rPolyPoly ) const
+    bool                operator==( const PolyPolygon& rPolyPoly ) const;
+    bool                operator!=( const PolyPolygon& rPolyPoly ) const
                             { return !(PolyPolygon::operator==( rPolyPoly )); }
 
-    sal_Bool            IsEqual( const PolyPolygon& rPolyPoly ) const;
+    bool                IsEqual( const PolyPolygon& rPolyPoly ) const;
 
     TOOLS_DLLPUBLIC friend SvStream&    operator>>( SvStream& rIStream, PolyPolygon& rPolyPoly );
     TOOLS_DLLPUBLIC friend SvStream&    operator<<( SvStream& rOStream, const PolyPolygon& rPolyPoly );
diff --git a/include/tools/pstm.hxx b/include/tools/pstm.hxx
index 6f971ca..bb608a1 100644
--- a/include/tools/pstm.hxx
+++ b/include/tools/pstm.hxx
@@ -202,11 +202,11 @@ class TOOLS_DLLPUBLIC SvPersistStream : public SvStream
 
 protected:
     void                WriteObj( sal_uInt8 nHdr, SvPersistBase * pObj );
-    sal_uInt32          ReadObj( SvPersistBase * & rpObj, sal_Bool bRegister );
+    sal_uInt32          ReadObj( SvPersistBase * & rpObj, bool bRegister );
 
 public:
-    sal_Bool            IsStreamed( SvPersistBase * pObj ) const
-                        { return 0 != GetIndex( pObj ); }
+    bool                IsStreamed( SvPersistBase * pObj ) const
+                            { return 0 != GetIndex( pObj ); }
     virtual void        ResetError();
 
                         SvPersistStream( SvClassManager &, SvStream * pStream,
diff --git a/include/tools/rc.hxx b/include/tools/rc.hxx
index a043db4..e89b911 100644
--- a/include/tools/rc.hxx
+++ b/include/tools/rc.hxx
@@ -30,8 +30,8 @@ protected:
     ResMgr* m_pResMgr;
 
     // check availability of Resource
-    sal_Bool                IsAvailableRes( const ResId& rId ) const
-    { return m_pResMgr->IsAvailable( rId, this ); }
+    bool                IsAvailableRes( const ResId& rId ) const
+        { return m_pResMgr->IsAvailable( rId, this ); }
 
     // Load a Resource
     void                GetRes( const ResId& rResId );
diff --git a/include/tools/resid.hxx b/include/tools/resid.hxx
index 14c0a11..89606c8 100644
--- a/include/tools/resid.hxx
+++ b/include/tools/resid.hxx
@@ -132,7 +132,7 @@ public:
         return *this;
     }
 
-    const ResId &  SetAutoRelease(sal_Bool bRelease) const
+    const ResId &  SetAutoRelease(bool bRelease) const
     {
         if( bRelease )
             m_nResId &= ~RSC_DONTRELEASE;
@@ -141,8 +141,8 @@ public:
         return *this;
     }
 
-    sal_Bool        IsAutoRelease()  const
-    { return !(m_nResId & RSC_DONTRELEASE); }
+    bool        IsAutoRelease()  const
+        { return !(m_nResId & RSC_DONTRELEASE); }
 
     sal_uInt32      GetId()        const { return m_nResId & ~RSC_DONTRELEASE; }
     RSHEADER_TYPE*  GetpResource() const { return m_pResource; }
diff --git a/include/tools/resmgr.hxx b/include/tools/resmgr.hxx
index 603a2c7..9f6b2d2 100644
--- a/include/tools/resmgr.hxx
+++ b/include/tools/resmgr.hxx
@@ -143,11 +143,11 @@ public:
     void                TestStack( const Resource * );
 
     /// Check whether resource is available
-    sal_Bool            IsAvailable( const ResId& rId,
+    bool                IsAvailable( const ResId& rId,
                                      const Resource* = NULL) const;
 
     /// Search and load resource, given its ID
-    sal_Bool            GetResource( const ResId& rId, const Resource * = NULL );
+    bool                GetResource( const ResId& rId, const Resource * = NULL );
     static void *       GetResourceSkipHeader( const ResId& rResId, ResMgr ** ppResMgr );
     /// Free resource context
     void                PopContext( const Resource* = NULL );
diff --git a/include/tools/stream.hxx b/include/tools/stream.hxx
index 78a0bc3..3d9f363 100644
--- a/include/tools/stream.hxx
+++ b/include/tools/stream.hxx
@@ -22,7 +22,7 @@
 #include <limits>
 #include "tools/toolsdllapi.h"
 #include <tools/solar.h>
-#include <tools/string.hxx>
+#include <tools/lineend.hxx>
 #include <tools/errinf.hxx>
 #include <tools/ref.hxx>
 #include <tools/rtti.hxx>
@@ -79,10 +79,6 @@ typedef sal_uInt16 StreamMode;
 #define COMPRESSMODE_ZBITMAP            (sal_uInt16)0x0001
 #define COMPRESSMODE_NATIVE             (sal_uInt16)0x0010
 
-#define STREAM_IO_DONTKNOW              0
-#define STREAM_IO_READ                  1
-#define STREAM_IO_WRITE                 2
-
 #define ID_STREAM                       1
 #define ID_FILESTREAM                   2
 #define ID_MEMORYSTREAM                 3
@@ -112,8 +108,8 @@ enum SvLockBytesStatFlag { SVSTATFLAG_DEFAULT };
 class TOOLS_DLLPUBLIC SvLockBytes: public virtual SvRefBase
 {
     SvStream * m_pStream;
-    sal_Bool m_bOwner;
-    sal_Bool m_bSync;
+    bool m_bOwner;
+    bool m_bSync;
 
 protected:
     void close();
@@ -121,17 +117,17 @@ protected:
 public:
     TYPEINFO();
 
-    SvLockBytes() : m_pStream(0), m_bOwner(sal_False), m_bSync(sal_False) {}
+    SvLockBytes() : m_pStream(0), m_bOwner(false), m_bSync(false) {}
 
-    SvLockBytes(SvStream * pTheStream, sal_Bool bTheOwner = sal_False) :
-        m_pStream(pTheStream), m_bOwner(bTheOwner), m_bSync(sal_False) {}
+    SvLockBytes(SvStream * pTheStream, bool bTheOwner = false) :
+        m_pStream(pTheStream), m_bOwner(bTheOwner), m_bSync(false) {}
 
     virtual ~SvLockBytes() { close(); }
 
     virtual const SvStream * GetStream() const { return m_pStream; }
 
-    virtual void SetSynchronMode(sal_Bool bTheSync = sal_True) { m_bSync = bTheSync; }
-    virtual sal_Bool IsSynchronMode() const { return m_bSync; }
+    virtual void    SetSynchronMode(bool bTheSync = true) { m_bSync = bTheSync; }
+    virtual bool    IsSynchronMode() const { return m_bSync; }
 
     virtual ErrCode ReadAt(sal_Size nPos, void * pBuffer, sal_Size nCount,
                            sal_Size * pRead) const;
@@ -154,8 +150,8 @@ class TOOLS_DLLPUBLIC SvOpenLockBytes: public SvLockBytes
 public:
     TYPEINFO();
 
-    SvOpenLockBytes() : SvLockBytes(0, sal_False) {}
-    SvOpenLockBytes(SvStream * pStream, sal_Bool bOwner):
+    SvOpenLockBytes() : SvLockBytes(0, false) {}
+    SvOpenLockBytes(SvStream * pStream, bool bOwner):
         SvLockBytes(pStream, bOwner) {}
 
     virtual ErrCode FillAppend(const void * pBuffer, sal_Size nCount,
@@ -165,7 +161,7 @@ public:
 
     virtual sal_Size Seek(sal_Size nPos) = 0;
 
-    virtual void Terminate() = 0;
+    virtual void    Terminate() = 0;
 };
 
 SV_DECL_IMPL_REF(SvOpenLockBytes);
@@ -175,13 +171,13 @@ SV_DECL_IMPL_REF(SvOpenLockBytes);
 class SvAsyncLockBytes: public SvOpenLockBytes
 {
     sal_Size m_nSize;
-    sal_Bool m_bTerminated;
+    bool m_bTerminated;
 
 public:
     TYPEINFO();
 
-    SvAsyncLockBytes(SvStream * pStream, sal_Bool bOwner):
-        SvOpenLockBytes(pStream, bOwner), m_nSize(0), m_bTerminated(sal_False) {}
+    SvAsyncLockBytes(SvStream * pStream, bool bOwner):
+        SvOpenLockBytes(pStream, bOwner), m_nSize(0), m_bTerminated(false) {}
 
     virtual ErrCode ReadAt(sal_Size nPos, void * pBuffer, sal_Size nCount,
                            sal_Size * pRead) const;
@@ -195,7 +191,7 @@ public:
 
     virtual sal_Size Seek(sal_Size nPos);
 
-    virtual void Terminate() { m_bTerminated = sal_True; }
+    virtual void    Terminate() { m_bTerminated = true; }
 };
 
 SV_DECL_IMPL_REF(SvAsyncLockBytes);
@@ -206,32 +202,33 @@ class TOOLS_DLLPUBLIC SvStream
 {
 private:
     // LockBytes Interface
-    void*       pImp;           // unused
-    SvLockBytesRef xLockBytes;  // Default implementation
-    sal_Size    nActPos;
+    void*           pImp;           // unused
+    SvLockBytesRef  xLockBytes;  // Default implementation
+    sal_Size        nActPos;
 
     // Puffer-Verwaltung
-    sal_uInt8*  pRWBuf;         // Points to read/write buffer
-    sal_uInt8*  pBufPos;        // pRWBuf + nBufActualPos
-    sal_uInt16  nBufSize;       // Allocated size of buffer
-    sal_uInt16  nBufActualLen;  // Length of used segment of puffer
+    sal_uInt8*      pRWBuf;         // Points to read/write buffer
+    sal_uInt8*      pBufPos;        // pRWBuf + nBufActualPos
+    sal_uInt16      nBufSize;       // Allocated size of buffer
+    sal_uInt16      nBufActualLen;  // Length of used segment of puffer
                                 // = nBufSize, if EOF did not occur
-    sal_uInt16  nBufActualPos;  // current position in buffer (0..nBufSize-1)
-    sal_uInt16  nBufFree;       // number of free slots in buffer to IO of type eIOMode
-    unsigned int    eIOMode : 2;// STREAM_IO_*
+    sal_uInt16      nBufActualPos;  // current position in buffer (0..nBufSize-1)
+    sal_uInt16      nBufFree;       // number of free slots in buffer to IO of type eIOMode
+    bool            bIoRead;
+    bool            bIoWrite;
 
     // Error codes, conversion, compression, ...
-    int             bIsDirty : 1; // sal_True: Stream != buffer content
-    int             bIsConsistent : 1;// sal_False: Buffer contains data, which were
+    bool            bIsDirty; // true: Stream != buffer content
+    bool            bIsConsistent;// false: Buffer contains data, which were
                                 // NOT allowed to be written by PutData
                                 // into the derived stream (cf. PutBack)
-    int             bSwap  : 1;
-    int             bIsEof : 1;
-    sal_uInt32  nError;
-    sal_uInt16  nNumberFormatInt;
-    sal_uInt16  nCompressMode;
-    LineEnd     eLineDelimiter;
-    CharSet     eStreamCharSet;
+    bool            bSwap;
+    bool            bIsEof;
+    sal_uInt32      nError;
+    sal_uInt16      nNumberFormatInt;
+    sal_uInt16      nCompressMode;
+    LineEnd         eLineDelimiter;
+    rtl_TextEncoding eStreamCharSet;
 
     // Encryption
     OString m_aCryptMaskKey;// aCryptMaskKey.getLength != 0  -> Encryption used
@@ -249,7 +246,7 @@ private:
 protected:
     sal_Size        nBufFilePos;///< File position of pBuf[0]
     sal_uInt16      eStreamMode;
-    sal_Bool        bIsWritable;
+    bool            bIsWritable;
 
     virtual sal_Size GetData( void* pData, sal_Size nSize );
     virtual sal_Size PutData( const void* pData, sal_Size nSize );
@@ -262,7 +259,7 @@ protected:
 
     // encrypt and write in blocks
     sal_Size        CryptAndWriteBuffer( const void* pStart, sal_Size nLen );
-    sal_Bool        EncryptBuffer( void* pStart, sal_Size nLen );
+    bool            EncryptBuffer( void* pStart, sal_Size nLen );
 
     void            SyncSvStream( sal_Size nNewStreamPos ); ///< SvStream <- Medium
     void            SyncSysStream(); ///< SvStream -> Medium
@@ -274,8 +271,8 @@ public:
 
     SvLockBytes*    GetLockBytes() const { return xLockBytes; }
 
-    sal_uInt32  GetError() const { return ERRCODE_TOERROR(nError); }
-    sal_uInt32  GetErrorCode() const { return nError; }
+    sal_uInt32      GetError() const { return ERRCODE_TOERROR(nError); }
+    sal_uInt32      GetErrorCode() const { return nError; }
 
     void            SetError( sal_uInt32 nErrorCode );
     virtual void    ResetError();
@@ -283,9 +280,9 @@ public:
     void            SetNumberFormatInt( sal_uInt16 nNewFormat );
     sal_uInt16      GetNumberFormatInt() const { return nNumberFormatInt; }
     /// Enable/disable swapping of endians, may be needed for Unicode import/export
-    inline void     SetEndianSwap( sal_Bool bVal );
+    inline void     SetEndianSwap( bool bVal );
     /// returns status of endian swap flag
-    sal_Bool        IsEndianSwap() const { return 0 != bSwap; }
+    bool            IsEndianSwap() const { return 0 != bSwap; }
 
     void            SetCompressMode( sal_uInt16 nNewMode )
                         { nCompressMode = nNewMode; }
@@ -294,9 +291,9 @@ public:
     void SetCryptMaskKey(const OString& rCryptMaskKey);
     const OString& GetCryptMaskKey() const { return m_aCryptMaskKey; }
 
-    void            SetStreamCharSet( CharSet eCharSet )
+    void            SetStreamCharSet( rtl_TextEncoding eCharSet )
                         { eStreamCharSet = eCharSet; }
-    CharSet         GetStreamCharSet() const { return eStreamCharSet; }
+    rtl_TextEncoding GetStreamCharSet() const { return eStreamCharSet; }
 
     void            SetLineDelimiter( LineEnd eLineEnd )
                         { eLineDelimiter = eLineEnd; }
@@ -324,7 +321,7 @@ public:
     SvStream&       operator<<( sal_Int64 nInt64 );
 
     SvStream&       operator<<( bool b )
-    { return operator<<(static_cast< sal_Bool >(b)); }
+                        { return operator<<(static_cast< sal_Bool >(b)); }
     SvStream&       operator<<( signed char nChar );
     SvStream&       operator<<( char nChar );
     SvStream&       operator<<( unsigned char nChar );
@@ -345,9 +342,9 @@ public:
     // length between current (Tell()) pos and end of stream
     virtual sal_Size remainingSize();
     void            Flush();
-    sal_Bool        IsEof() const { return bIsEof; }
+    bool            IsEof() const { return bIsEof; }
     // next Tell() <= nSize
-    sal_Bool        SetStreamSize( sal_Size nSize );
+    bool            SetStreamSize( sal_Size nSize );
 
     /** Read a line of bytes.
 
@@ -363,8 +360,8 @@ public:
               @endcode
               causing endless loops ...
     */
-    sal_Bool        ReadLine( OString& rStr, sal_Int32 nMaxBytesToRead = 0xFFFE );
-    sal_Bool        WriteLine( const OString& rStr );
+    bool            ReadLine( OString& rStr, sal_Int32 nMaxBytesToRead = 0xFFFE );
+    bool            WriteLine( const OString& rStr );
 
     /** Read a line of bytes.
 
@@ -380,13 +377,12 @@ public:
               @endcode
               causing endless loops ...
     */
-    sal_Bool        ReadByteStringLine( OUString& rStr, rtl_TextEncoding eSrcCharSet,
+    bool            ReadByteStringLine( OUString& rStr, rtl_TextEncoding eSrcCharSet,
                                         sal_Int32 nMaxBytesToRead = 0xFFFE );
-    sal_Bool        ReadByteStringLine( String& rStr, rtl_TextEncoding eSrcCharSet );
-    sal_Bool        WriteByteStringLine( const String& rStr, rtl_TextEncoding eDestCharSet );
+    bool            WriteByteStringLine( const OUString& rStr, rtl_TextEncoding eDestCharSet );
 
     /// Switch to no endian swapping and write 0xfeff
-    sal_Bool        StartWritingUnicodeText();
+    bool        StartWritingUnicodeText();
 
     /** If eReadBomCharSet==RTL_TEXTENCODING_DONTKNOW: read 16bit, if 0xfeff do
         nothing (UTF-16), if 0xfffe switch endian swapping (UTF-16), if 0xefbb
@@ -397,7 +393,7 @@ public:
 
         If eReadBomCharSet!=RTL_TEXTENCODING_DONTKNOW: only read a BOM of that
         encoding and switch endian swapping if UTF-16 and 0xfffe. */
-    sal_Bool        StartReadingUnicodeText( rtl_TextEncoding eReadBomCharSet );
+    bool        StartReadingUnicodeText( rtl_TextEncoding eReadBomCharSet );
 
     /** Read a line of Unicode.
 
@@ -413,11 +409,11 @@ public:
               @endcode
               causing endless loops ...
     */
-    sal_Bool        ReadUniStringLine( OUString& rStr, sal_Int32 nMaxCodepointsToRead = 0xFFFE );
+    bool            ReadUniStringLine( OUString& rStr, sal_Int32 nMaxCodepointsToRead = 0xFFFE );
     /** Read a 32bit length prefixed sequence of utf-16 if
         eSrcCharSet==RTL_TEXTENCODING_UNICODE, otherwise read a 16bit length
         prefixed sequence of bytes and convert from eSrcCharSet */
-    OUString   ReadUniOrByteString(rtl_TextEncoding eSrcCharSet);
+    OUString        ReadUniOrByteString(rtl_TextEncoding eSrcCharSet);
     /** Write a 32bit length prefixed sequence of utf-16 if
         eSrcCharSet==RTL_TEXTENCODING_UNICODE, otherwise convert to eSrcCharSet
         and write a 16bit length prefixed sequence of bytes */
@@ -438,13 +434,13 @@ public:
               @endcode
               causing endless loops ...
     */
-    sal_Bool        ReadUniOrByteStringLine( OUString& rStr, rtl_TextEncoding eSrcCharSet,
+    bool            ReadUniOrByteStringLine( OUString& rStr, rtl_TextEncoding eSrcCharSet,
                                              sal_Int32 nMaxCodepointsToRead = 0xFFFE );
     /** Write a sequence of Unicode characters if
         eDestCharSet==RTL_TEXTENCODING_UNICODE, otherwise write a sequence of
         Bytecodes converted to eDestCharSet */
-    sal_Bool        WriteUnicodeOrByteText( const String& rStr, rtl_TextEncoding eDestCharSet );
-    sal_Bool        WriteUnicodeOrByteText( const String& rStr )
+    bool            WriteUnicodeOrByteText( const OUString& rStr, rtl_TextEncoding eDestCharSet );
+    bool            WriteUnicodeOrByteText( const OUString& rStr )
                     { return WriteUnicodeOrByteText( rStr, GetStreamCharSet() ); }
 
     /** Write a Unicode character if eDestCharSet==RTL_TEXTENCODING_UNICODE,
@@ -452,19 +448,19 @@ public:
 
         This may result in more than one byte being written if a multi byte
         encoding (e.g. UTF7, UTF8) is chosen. */
-    sal_Bool        WriteUniOrByteChar( sal_Unicode ch, rtl_TextEncoding eDestCharSet );
-    sal_Bool        WriteUniOrByteChar( sal_Unicode ch )
+    bool            WriteUniOrByteChar( sal_Unicode ch, rtl_TextEncoding eDestCharSet );
+    bool            WriteUniOrByteChar( sal_Unicode ch )
                     { return WriteUniOrByteChar( ch, GetStreamCharSet() ); }
 
     void            SetBufferSize( sal_uInt16 nBufSize );
-    sal_uInt16  GetBufferSize() const { return nBufSize; }
+    sal_uInt16      GetBufferSize() const { return nBufSize; }
 
     void            RefreshBuffer();
     SvStream&       PutBack( char aCh );
 
-    sal_Bool            IsWritable() const { return bIsWritable; }
+    bool            IsWritable() const { return bIsWritable; }
     StreamMode      GetStreamMode() const { return eStreamMode; }
-    virtual sal_uInt16  IsA() const;
+    virtual sal_uInt16 IsA() const;
 
     long            GetVersion() { return nVersion; }
     void            SetVersion( long n ) { nVersion = n; }
@@ -472,10 +468,10 @@ public:
     friend SvStream& operator<<( SvStream& rStr, SvStrPtr f ); // for Manips
 
     /// end of input seen during previous i/o operation
-    bool eof() const { return bIsEof; }
+    bool            eof() const { return bIsEof; }
 
     /// stream is broken
-    bool bad() const { return GetError() != 0; }
+    bool            bad() const { return GetError() != 0; }
 
     /** Get state
 
@@ -499,7 +495,7 @@ inline SvStream& operator<<( SvStream& rStr, SvStrPtr f )
     return rStr;
 }
 
-inline void SvStream::SetEndianSwap( sal_Bool bVal )
+inline void SvStream::SetEndianSwap( bool bVal )
 {
 #ifdef OSL_BIGENDIAN
     SetNumberFormatInt( bVal ? NUMBERFORMAT_INT_LITTLEENDIAN : NUMBERFORMAT_INT_BIGENDIAN );
@@ -579,8 +575,9 @@ namespace streamdetail
 /// Attempt to write a pascal-style length (of type prefix) prefixed sequence
 /// of 16bit units from an OUString, returned value is number of bytes written
 /// (including byte-count of prefix)
-template<typename prefix> sal_Size write_lenPrefixed_uInt16s_FromOUString(SvStream& rStrm,
-    const OUString &rStr)
+template<typename prefix>
+sal_Size write_lenPrefixed_uInt16s_FromOUString(SvStream& rStrm,
+                                                const OUString &rStr)
 {
     return streamdetail::write_lenPrefixed_seq_From_str<prefix, OUString, write_uInt16s_FromOUString>(rStrm, rStr);
 }
@@ -611,7 +608,7 @@ OString read_lenPrefixed_uInt8s_ToOString(SvStream& rStrm)
 /// 8bit units to an OUString
 template<typename prefix>
 OUString read_lenPrefixed_uInt8s_ToOUString(SvStream& rStrm,
-    rtl_TextEncoding eEnc)
+                                            rtl_TextEncoding eEnc)
 {
     return OStringToOUString(read_lenPrefixed_uInt8s_ToOString<prefix>(rStrm), eEnc);
 }
@@ -619,7 +616,7 @@ OUString read_lenPrefixed_uInt8s_ToOUString(SvStream& rStrm,
 /// Attempt to write a prefixed sequence of nUnits 8bit units from an OString,
 /// returned value is number of bytes written
 TOOLS_DLLPUBLIC inline sal_Size write_uInt8s_FromOString(SvStream& rStrm, const OString& rStr,
-    sal_Size nUnits)
+                                                         sal_Size nUnits)
 {
     return rStrm.Write(rStr.getStr(), nUnits);
 }
@@ -632,8 +629,9 @@ TOOLS_DLLPUBLIC inline sal_Size write_uInt8s_FromOString(SvStream& rStrm, const
 /// Attempt to write a pascal-style length (of type prefix) prefixed sequence
 /// of 8bit units from an OString, returned value is number of bytes written
 /// (including byte-count of prefix)
-template<typename prefix> sal_Size write_lenPrefixed_uInt8s_FromOString(SvStream& rStrm,
-    const OString &rStr)
+template<typename prefix>
+sal_Size write_lenPrefixed_uInt8s_FromOString(SvStream& rStrm,
+                                              const OString &rStr)
 {
     return streamdetail::write_lenPrefixed_seq_From_str<prefix, OString, write_uInt8s_FromOString>(rStrm, rStr);
 }
@@ -641,8 +639,10 @@ template<typename prefix> sal_Size write_lenPrefixed_uInt8s_FromOString(SvStream
 /// Attempt to write a pascal-style length (of type prefix) prefixed sequence
 /// of 8bit units from an OUString, returned value is number of bytes written
 /// (including byte-count of prefix)
-template<typename prefix> sal_Size write_lenPrefixed_uInt8s_FromOUString(SvStream& rStrm,
-    const OUString &rStr, rtl_TextEncoding eEnc)
+template<typename prefix>
+sal_Size write_lenPrefixed_uInt8s_FromOUString(SvStream& rStrm,
+                                               const OUString &rStr,
+                                               rtl_TextEncoding eEnc)
 {
     return write_lenPrefixed_uInt8s_FromOString<prefix>(rStrm, OUStringToOString(rStr, eEnc));
 }
@@ -653,9 +653,9 @@ class TOOLS_DLLPUBLIC SvFileStream : public SvStream
 {
 private:
     StreamData*     pInstanceData;
-    String          aFilename;
+    OUString        aFilename;
     sal_uInt16      nLockCounter;
-    sal_Bool        bIsOpen;
+    bool            bIsOpen;
 #ifdef UNX
     sal_uInt32      GetFileHandle() const;
 #endif
@@ -663,10 +663,10 @@ private:
     SvFileStream (const SvFileStream&);
     SvFileStream & operator= (const SvFileStream&);
 
-    sal_Bool LockRange( sal_Size nByteOffset, sal_Size nBytes );
-    sal_Bool UnlockRange( sal_Size nByteOffset, sal_Size nBytes );
-    sal_Bool LockFile();
-    sal_Bool UnlockFile();
+    bool LockRange( sal_Size nByteOffset, sal_Size nBytes );
+    bool UnlockRange( sal_Size nByteOffset, sal_Size nBytes );
+    bool LockFile();
+    bool UnlockFile();
 
 protected:
     virtual sal_Size GetData( void* pData, sal_Size nSize );
@@ -677,19 +677,19 @@ protected:
 
 public:
                     // Switches to Read StreamMode on failed attempt of Write opening
-                    SvFileStream( const String& rFileName, StreamMode eOpenMode );
+                    SvFileStream( const OUString& rFileName, StreamMode eOpenMode );
                     SvFileStream();
                     ~SvFileStream();
 
     virtual void    ResetError();
 
-    void            Open( const String& rFileName, StreamMode eOpenMode );
+    void            Open( const OUString& rFileName, StreamMode eOpenMode );
     void            Close();
-    sal_Bool        IsOpen() const { return bIsOpen; }
-    sal_Bool        IsLocked() const { return ( nLockCounter!=0 ); }
+    bool            IsOpen() const { return bIsOpen; }
+    bool            IsLocked() const { return ( nLockCounter!=0 ); }
     virtual sal_uInt16 IsA() const;
 
-    const String&   GetFileName() const { return aFilename; }
+    const OUString& GetFileName() const { return aFilename; }
 };
 
 // MemoryStream
@@ -709,7 +709,7 @@ protected:
     sal_Size        nPos;
     sal_Size        nEndOfData;
     sal_uInt8*      pBuf;
-    sal_Bool        bOwnsData;
+    bool            bOwnsData;
 
     virtual sal_Size GetData( void* pData, sal_Size nSize );
     virtual sal_Size PutData( const void* pData, sal_Size nSize );
@@ -719,7 +719,7 @@ protected:
 
     /// AllocateMemory must update pBuf accordingly
     /// - pBuf: Address of new block
-    virtual sal_Bool AllocateMemory( sal_Size nSize );
+    virtual bool    AllocateMemory( sal_Size nSize );
 
     /// ReAllocateMemory must update the following variables:
     /// - pBuf: Address of new block
@@ -727,7 +727,7 @@ protected:
     ///               Set to 0 , if new block size is 0 bytes
     /// - nSize: New block size
     /// - nPos: Set to 0 if position outside of block
-    virtual sal_Bool ReAllocateMemory( long nDiff );
+    virtual bool    ReAllocateMemory( long nDiff );
 
     /// Is called when this stream allocated the buffer or the buffer is
     /// resized. FreeMemory may need to NULLify handles in derived classes.
@@ -749,10 +749,10 @@ public:
 
     void*           SwitchBuffer( sal_Size nInitSize=512, sal_Size nResize=64 );
     void*           SetBuffer( void* pBuf, sal_Size nSize,
-                               sal_Bool bOwnsData=sal_True, sal_Size nEOF=0 );
+                               bool bOwnsData=true, sal_Size nEOF=0 );
 
-    void            ObjectOwnsMemory( sal_Bool bOwn ) { bOwnsData = bOwn; }
-    sal_Bool        IsObjectMemoryOwner() { return bOwnsData; }
+    void            ObjectOwnsMemory( bool bOwn ) { bOwnsData = bOwn; }
+    bool            IsObjectMemoryOwner() { return bOwnsData; }
     void            SetResizeOffset( sal_Size nNewResize ) { nResize = nNewResize; }
     sal_Size        GetResizeOffset() const { return nResize; }
     virtual sal_Size remainingSize() { return GetSize() - Tell(); }
diff --git a/include/tools/svborder.hxx b/include/tools/svborder.hxx
index de4a866..0fc87a9 100644
--- a/include/tools/svborder.hxx
+++ b/include/tools/svborder.hxx
@@ -44,12 +44,12 @@ public:
         nRight = nRightP;
         nBottom = nBottomP;
     }
-    sal_Bool    operator == ( const SvBorder & rObj ) const
+    bool    operator == ( const SvBorder & rObj ) const
             {
                 return nTop == rObj.nTop && nRight == rObj.nRight &&
                        nBottom == rObj.nBottom && nLeft == rObj.nLeft;
             }
-    sal_Bool    operator != ( const SvBorder & rObj ) const
+    bool    operator != ( const SvBorder & rObj ) const
             { return !(*this == rObj); }
     SvBorder & operator = ( const SvBorder & rBorder )
             {
@@ -75,7 +75,7 @@ public:
                 Bottom() -= rBorder.Bottom();
                 return *this;
             }
-    sal_Bool    IsInside( const SvBorder & rInside )
+    bool    IsInside( const SvBorder & rInside )
             {
                 return nTop >= rInside.nTop && nRight >= rInside.nRight &&
                        nBottom >= rInside.nBottom && nLeft >= rInside.nLeft;
diff --git a/include/tools/tempfile.hxx b/include/tools/tempfile.hxx
index 8ef8c57..8d43c18 100644
--- a/include/tools/tempfile.hxx
+++ b/include/tools/tempfile.hxx
@@ -19,14 +19,14 @@
 #ifndef _TOOLS_TEMPFILE_HXX
 #define _TOOLS_TEMPFILE_HXX
 
-#include <tools/string.hxx>
+#include <rtl/ustring.hxx>
 #include "tools/toolsdllapi.h"
 
 struct TempFile_Impl;
 class TOOLS_DLLPUBLIC TempFile
 {
     TempFile_Impl*  pImp;
-    sal_Bool        bKillingFileEnabled;
+    bool        bKillingFileEnabled;
 
 public:
     /** Create a temporary file in the default tempfile folder. */
@@ -40,25 +40,25 @@ public:
         The extension string may be f.e. ".txt" or "", if no extension string is
         given, ".tmp" is used.
     */
-    TempFile( const String& rLeadingChars, const String* pExtension=NULL );
+    TempFile( const OUString& rLeadingChars, const OUString* pExtension=NULL );
 
     /** TempFile will be removed from disk in dtor if EnableKillingTempFile was
         called before. TempDirs will be removed recursively in that case. */
     ~TempFile();
 
-    sal_Bool IsValid() const;
+    bool IsValid() const;
 
     /** Returns the real name of the tempfile in file URL scheme. */
-    String GetName() const;
+    OUString GetName() const;
 
     /** If enabled the file will be removed from disk when the dtor is called
         (default is not enabled) */
-    void EnableKillingFile( sal_Bool bEnable=sal_True ) { bKillingFileEnabled = bEnable; }
+    void EnableKillingFile( bool bEnable=true ) { bKillingFileEnabled = bEnable; }
 
-    sal_Bool IsKillingFileEnabled() const { return bKillingFileEnabled; }
+    bool IsKillingFileEnabled() const { return bKillingFileEnabled; }
 
     /** Only create a name for a temporary file that would be valid at that moment. */
-    static String   CreateTempName();
+    static OUString   CreateTempName();
 };
 
 #endif
diff --git a/include/tools/time.hxx b/include/tools/time.hxx
index 64751af..31a8f94 100644
--- a/include/tools/time.hxx
+++ b/include/tools/time.hxx
@@ -98,22 +98,22 @@ public:
                     /// 12 hours == 0.5 days
     double          GetTimeInDays() const;
 
-    sal_Bool        IsBetween( const Time& rFrom, const Time& rTo ) const
+    bool            IsBetween( const Time& rFrom, const Time& rTo ) const
                     { return ((nTime >= rFrom.nTime) && (nTime <= rTo.nTime)); }
 
-    sal_Bool        IsEqualIgnoreNanoSec( const Time& rTime ) const;
+    bool            IsEqualIgnoreNanoSec( const Time& rTime ) const;
 
-    sal_Bool        operator ==( const Time& rTime ) const
+    bool            operator ==( const Time& rTime ) const
                     { return (nTime == rTime.nTime); }
-    sal_Bool        operator !=( const Time& rTime ) const
+    bool            operator !=( const Time& rTime ) const
                     { return (nTime != rTime.nTime); }
-    sal_Bool        operator  >( const Time& rTime ) const
+    bool            operator  >( const Time& rTime ) const
                     { return (nTime > rTime.nTime); }
-    sal_Bool        operator  <( const Time& rTime ) const
+    bool            operator  <( const Time& rTime ) const
                     { return (nTime < rTime.nTime); }
-    sal_Bool        operator >=( const Time& rTime ) const
+    bool            operator >=( const Time& rTime ) const
                     { return (nTime >= rTime.nTime); }
-    sal_Bool        operator <=( const Time& rTime ) const
+    bool            operator <=( const Time& rTime ) const
                     { return (nTime <= rTime.nTime); }
 
     static Time     GetUTCOffset();
diff --git a/include/tools/vcompat.hxx b/include/tools/vcompat.hxx
index cb3c297..0f97b58 100644
--- a/include/tools/vcompat.hxx
+++ b/include/tools/vcompat.hxx
@@ -41,7 +41,7 @@ class TOOLS_DLLPUBLIC VersionCompat
                     VersionCompat() {}
                     VersionCompat( const VersionCompat& ) {}
     VersionCompat&  operator=( const VersionCompat& ) { return *this; }
-    sal_Bool        operator==( const VersionCompat& ) { return sal_False; }
+    bool            operator==( const VersionCompat& ) { return false; }
 
 public:
 
diff --git a/include/tools/vector2d.hxx b/include/tools/vector2d.hxx
index d3d1c5c..bd4795c 100644
--- a/include/tools/vector2d.hxx
+++ b/include/tools/vector2d.hxx
@@ -75,8 +75,8 @@ public:
     inline Vector2D&    operator/=(double t) { mfX /= t; mfY /= t; return *this; }
     inline Vector2D     operator/(double t) const { Vector2D aNew(*this); aNew /= t; return aNew; }
 
-    inline sal_Bool     operator==( const Vector2D& rVec ) const { return( mfX == rVec.mfX && mfY == rVec.mfY ); }
-    inline sal_Bool     operator!=( const Vector2D& rVec ) const { return !( *this == rVec ); }
+    inline bool         operator==( const Vector2D& rVec ) const { return( mfX == rVec.mfX && mfY == rVec.mfY ); }
+    inline bool         operator!=( const Vector2D& rVec ) const { return !( *this == rVec ); }
 
     inline Vector2D&    operator=( const Vector2D& rVec ) { mfX = rVec.mfX, mfY = rVec.mfY; return *this; }
     inline Vector2D&    operator=( const Pair& rPair ) { mfX = rPair.A(), mfY = rPair.B(); return *this; }
@@ -85,11 +85,11 @@ public:
     inline Vector2D&    operator*=( const Pair& rPair ) { mfX *= rPair.A(), mfY *= rPair.B(); return *this; }
     inline Vector2D&    operator/=( const Pair& rPair ) { mfX /= rPair.A(), mfY /= rPair.B(); return *this; }
 
-    inline sal_Bool     operator==( const Pair& rPair ) const { return( mfX == rPair.A() && mfY == rPair.B() ); }
-    inline sal_Bool     operator!=( const Pair& rPair ) const { return !( *this == rPair ); }
+    inline bool         operator==( const Pair& rPair ) const { return( mfX == rPair.A() && mfY == rPair.B() ); }
+    inline bool         operator!=( const Pair& rPair ) const { return !( *this == rPair ); }
 
-    inline sal_Bool     IsPositive( Vector2D& rVec ) const { return( ( mfX * rVec.mfY - mfY * rVec.mfX ) >= 0.0 ); }
-    inline sal_Bool     IsNegative( Vector2D& rVec ) const { return !IsPositive( rVec ); }
+    inline bool         IsPositive( Vector2D& rVec ) const { return( ( mfX * rVec.mfY - mfY * rVec.mfX ) >= 0.0 ); }
+    inline bool         IsNegative( Vector2D& rVec ) const { return !IsPositive( rVec ); }
 };
 
 inline Vector2D& Vector2D::Normalize()
diff --git a/include/tools/weakbase.h b/include/tools/weakbase.h
index a4ce1d0..d37a3fd 100644
--- a/include/tools/weakbase.h
+++ b/include/tools/weakbase.h
@@ -95,19 +95,19 @@ public:
     inline reference_type * operator->() const;
 
     /** returns true if this instance references pReferenceObject */
-    inline sal_Bool operator== (const reference_type * pReferenceObject) const;
+    inline bool operator== (const reference_type * pReferenceObject) const;
 
     /** returns true if this instance and the given weakref reference the same object */
-    inline sal_Bool operator== (const WeakReference<reference_type> & handle) const;
+    inline bool operator== (const WeakReference<reference_type> & handle) const;
 
     /** only needed for using this class with stl containers */
-    inline sal_Bool operator!= (const WeakReference<reference_type> & handle) const;
+    inline bool operator!= (const WeakReference<reference_type> & handle) const;
 
     /** only needed for using this class with stl containers */
-    inline sal_Bool operator< (const WeakReference<reference_type> & handle) const;
+    inline bool operator< (const WeakReference<reference_type> & handle) const;
 
     /** only needed for using this class with stl containers */
-    inline sal_Bool operator> (const WeakReference<reference_type> & handle) const;
+    inline bool operator> (const WeakReference<reference_type> & handle) const;
 
     /** the assignment operator */
     inline WeakReference<reference_type>& operator= (const WeakReference<reference_type> & handle);
diff --git a/include/tools/weakbase.hxx b/include/tools/weakbase.hxx
index 08e85e1..05498e5 100644
--- a/include/tools/weakbase.hxx
+++ b/include/tools/weakbase.hxx
@@ -91,31 +91,31 @@ inline reference_type * WeakReference< reference_type >::operator->() const
 }
 
 template< class reference_type >
-inline sal_Bool WeakReference< reference_type >::operator==(const reference_type * pReferenceObject) const
+inline bool WeakReference< reference_type >::operator==(const reference_type * pReferenceObject) const
 {
     return mpWeakConnection->mpReference == pReferenceObject;
 }
 
 template< class reference_type >
-inline sal_Bool WeakReference< reference_type >::operator==(const WeakReference<reference_type> & handle) const
+inline bool WeakReference< reference_type >::operator==(const WeakReference<reference_type> & handle) const
 {
     return mpWeakConnection == handle.mpWeakConnection;
 }
 
 template< class reference_type >
-inline sal_Bool WeakReference< reference_type >::operator!=(const WeakReference<reference_type> & handle) const
+inline bool WeakReference< reference_type >::operator!=(const WeakReference<reference_type> & handle) const
 {
     return mpWeakConnection != handle.mpWeakConnection;
 }
 
 template< class reference_type >
-inline sal_Bool WeakReference< reference_type >::operator<(const WeakReference<reference_type> & handle) const
+inline bool WeakReference< reference_type >::operator<(const WeakReference<reference_type> & handle) const
 {
     return mpWeakConnection->mpReference < handle.mpWeakConnection->mpReference;
 }
 
 template< class reference_type >
-inline sal_Bool WeakReference< reference_type >::operator>(const WeakReference<reference_type> & handle) const
+inline bool WeakReference< reference_type >::operator>(const WeakReference<reference_type> & handle) const
 {
     return mpWeakConnection->mpReference > handle.mpWeakConnection->mpReference;
 }
diff --git a/include/tools/wldcrd.hxx b/include/tools/wldcrd.hxx
index 8991b88..9b143b7 100644
--- a/include/tools/wldcrd.hxx
+++ b/include/tools/wldcrd.hxx
@@ -20,8 +20,8 @@
 #define _WLDCRD_HXX
 
 #include "tools/toolsdllapi.h"
-#include <tools/string.hxx>
 #include <osl/thread.h>
+#include <rtl/ustring.hxx>
 
 class TOOLS_DLLPUBLIC WildCard
 {
@@ -54,7 +54,7 @@ public:
         aWildString = OUStringToOString(rString, osl_getThreadTextEncoding());
     }
 
-    sal_Bool Matches( const String& rStr ) const;
+    bool Matches( const OUString& rStr ) const;
 };
 
 #endif
diff --git a/include/tools/zcodec.hxx b/include/tools/zcodec.hxx
index 185cb1d..b8b86fe 100644
--- a/include/tools/zcodec.hxx
+++ b/include/tools/zcodec.hxx
@@ -56,8 +56,8 @@ class TOOLS_DLLPUBLIC ZCodec
 {
 private:
     sal_uIntPtr     mbInit;
-    sal_Bool        mbStatus;
-    sal_Bool        mbFinish;
+    bool            mbStatus;
+    bool            mbFinish;
     sal_uIntPtr     mnMemUsage;
     SvStream*       mpIStm;
     sal_uInt8*      mpInBuf;
@@ -71,7 +71,7 @@ private:
     sal_uIntPtr     mnCompressMethod;
     void*           mpsC_Stream;
 
-    void            ImplInitBuf( sal_Bool nIOFlag );
+    void            ImplInitBuf( bool nIOFlag );
     void            ImplWriteBack( void );
 
 public:
@@ -81,7 +81,7 @@ public:
 
     virtual void    BeginCompression( sal_uIntPtr nCompressMethod = ZCODEC_DEFAULT );
     virtual long    EndCompression();
-    sal_Bool        IsFinished () const { return mbFinish; }
+    bool            IsFinished () const { return mbFinish; }
 
     long            Compress( SvStream& rIStm, SvStream& rOStm );
     long            Decompress( SvStream& rIStm, SvStream& rOStm );
diff --git a/include/unotools/ucblockbytes.hxx b/include/unotools/ucblockbytes.hxx
index cf5d98b..acd7992 100644
--- a/include/unotools/ucblockbytes.hxx
+++ b/include/unotools/ucblockbytes.hxx
@@ -32,6 +32,7 @@
 #include <tools/link.hxx>
 #include <tools/errcode.hxx>
 #include <tools/datetime.hxx>
+#include <tools/string.hxx>
 
 namespace com
 {
@@ -130,7 +131,7 @@ public:
     static UcbLockBytesRef  CreateLockBytes( const ::com::sun::star::uno::Reference < ::com::sun::star::io::XStream >& xContent );
 
     // SvLockBytes
-    virtual void            SetSynchronMode (sal_Bool bSynchron);
+    virtual void            SetSynchronMode (bool bSynchron);
     virtual ErrCode         ReadAt ( sal_uLong nPos, void *pBuffer, sal_uLong nCount, sal_uLong *pRead) const;
     virtual ErrCode         WriteAt ( sal_uLong, const void*, sal_uLong, sal_uLong *pWritten);
     virtual ErrCode         Flush (void) const;
diff --git a/include/vcl/gfxlink.hxx b/include/vcl/gfxlink.hxx
index 380298b..efc9c09 100644
--- a/include/vcl/gfxlink.hxx
+++ b/include/vcl/gfxlink.hxx
@@ -23,6 +23,7 @@
 #include <vcl/dllapi.h>
 #include <tools/solar.h>
 #include <vcl/mapmod.hxx>
+#include <tools/string.hxx>
 #include <tools/stream.hxx>
 
 // -------------
diff --git a/lotuswordpro/source/filter/lwpcelllayout.cxx b/lotuswordpro/source/filter/lwpcelllayout.cxx
index 45835f0..529acc3 100644
--- a/lotuswordpro/source/filter/lwpcelllayout.cxx
+++ b/lotuswordpro/source/filter/lwpcelllayout.cxx
@@ -57,10 +57,9 @@
  * @file
  *  For LWP filter architecture prototype - cell layouts
  */
-/*************************************************************************
- * Change History
- April 2005         Created
- ************************************************************************/
+
+#include <tools/string.hxx>
+
 #include "lwpcelllayout.hxx"
 #include "lwpfoundry.hxx"
 #include "lwpobjfactory.hxx"
diff --git a/lotuswordpro/source/filter/lwpdrawobj.cxx b/lotuswordpro/source/filter/lwpdrawobj.cxx
index 9d978b9..b01bf7b 100644

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list