[Libreoffice-commits] .: 5 commits - svtools/inc svtools/source tools/inc tools/qa tools/source vcl/Library_vcl.mk vcl/Library_vclplug_gen.mk vcl/source vcl/unx

Caolán McNamara caolan at kemper.freedesktop.org
Tue Jul 26 04:39:35 PDT 2011


 svtools/inc/svtools/unoevent.hxx          |    3 
 svtools/source/uno/unoevent.cxx           |   15 --
 tools/inc/tools/string.hxx                |   12 --
 tools/qa/cppunit/test_streamstate.cxx     |   13 ++
 tools/source/string/strimp.cxx            |  165 ------------------------------
 tools/source/string/tstring.cxx           |  149 +++++++++++++++++++++++++++
 tools/source/string/tustring.cxx          |   39 -------
 vcl/Library_vcl.mk                        |   16 --
 vcl/Library_vclplug_gen.mk                |    3 
 vcl/source/components/rasterizer_rsvg.cxx |    4 
 vcl/unx/generic/gdi/salgdi3.cxx           |    6 -
 11 files changed, 166 insertions(+), 259 deletions(-)

New commits:
commit 2ffac50af2b73d92c65e50e5f0757a5a355a4e2e
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Jul 26 01:13:31 2011 +0100

    strip down unused old-style string methods

diff --git a/tools/inc/tools/string.hxx b/tools/inc/tools/string.hxx
index 753b6ef..4e02879 100644
--- a/tools/inc/tools/string.hxx
+++ b/tools/inc/tools/string.hxx
@@ -519,7 +519,6 @@ public:
     UniString&			Insert( const UniString& rStr, xub_StrLen nIndex = STRING_LEN );
     UniString&			Insert( const UniString& rStr, xub_StrLen nPos, xub_StrLen nLen,
                                 xub_StrLen nIndex = STRING_LEN );
-    UniString&			Insert( const sal_Unicode* pCharStr, xub_StrLen nIndex = STRING_LEN );
     UniString&			Insert( sal_Unicode c, xub_StrLen nIndex = STRING_LEN );
     UniString&			InsertAscii( const sal_Char* pAsciiStr, xub_StrLen nIndex = STRING_LEN );
     UniString&			Replace( xub_StrLen nIndex, xub_StrLen nLen, const UniString& rStr );
@@ -546,18 +545,13 @@ public:
 
     StringCompare		CompareTo( const UniString& rStr,
                                    xub_StrLen nLen = STRING_LEN ) const;
-    StringCompare		CompareTo( const sal_Unicode* pCharStr,
-                                   xub_StrLen nLen = STRING_LEN ) const;
     StringCompare		CompareToAscii( const sal_Char* pAsciiStr,
                                         xub_StrLen nLen = STRING_LEN ) const;
     StringCompare		CompareIgnoreCaseToAscii( const UniString& rStr,
                                                   xub_StrLen nLen = STRING_LEN ) const;
-    StringCompare		CompareIgnoreCaseToAscii( const sal_Unicode* pCharStr,
-                                                  xub_StrLen nLen = STRING_LEN ) const;
     StringCompare		CompareIgnoreCaseToAscii( const sal_Char* pAsciiStr,
                                                   xub_StrLen nLen = STRING_LEN ) const;
     sal_Bool				Equals( const UniString& rStr ) const;
-    sal_Bool				Equals( const sal_Unicode* pCharStr ) const;
     sal_Bool				EqualsAscii( const sal_Char* pAsciiStr ) const;
     sal_Bool				EqualsIgnoreCaseAscii( const UniString& rStr ) const;
     sal_Bool				EqualsIgnoreCaseAscii( const sal_Unicode* pCharStr ) const;
@@ -570,13 +564,10 @@ public:
                                      xub_StrLen nIndex, xub_StrLen nLen ) const;
     sal_Bool				EqualsIgnoreCaseAscii( const UniString& rStr,
                                                xub_StrLen nIndex, xub_StrLen nLen ) const;
-    sal_Bool				EqualsIgnoreCaseAscii( const sal_Unicode* pCharStr,
-                                               xub_StrLen nIndex, xub_StrLen nLen ) const;
     sal_Bool				EqualsIgnoreCaseAscii( const sal_Char* pAsciiStr,
                                                xub_StrLen nIndex, xub_StrLen nLen ) const;
 
     xub_StrLen			Match( const UniString& rStr ) const;
-    xub_StrLen			Match( const sal_Unicode* pCharStr ) const;
 
     xub_StrLen			Search( sal_Unicode c, xub_StrLen nIndex = 0 ) const;
     xub_StrLen			Search( const UniString& rStr, xub_StrLen nIndex = 0 ) const;
@@ -589,13 +580,10 @@ public:
                                           xub_StrLen nIndex = 0 );
     xub_StrLen			SearchAndReplace( const UniString& rStr, const UniString& rRepStr,
                                           xub_StrLen nIndex = 0 );
-    xub_StrLen			SearchAndReplace( const sal_Unicode* pCharStr, const UniString& rRepStr,
-                                          xub_StrLen nIndex = 0 );
     xub_StrLen			SearchAndReplaceAscii( const sal_Char* pAsciiStr, const UniString& rRepStr,
                                                xub_StrLen nIndex = 0 );
     void				SearchAndReplaceAll( sal_Unicode c, sal_Unicode cRep );
     void				SearchAndReplaceAll( const UniString& rStr, const UniString& rRepStr );
-    void				SearchAndReplaceAll( const sal_Unicode* pCharStr, const UniString& rRepStr );
     void				SearchAndReplaceAllAscii( const sal_Char* pAsciiStr, const UniString& rRepStr );
 
     xub_StrLen			GetTokenCount( sal_Unicode cTok = ';' ) const;
diff --git a/tools/source/string/strimp.cxx b/tools/source/string/strimp.cxx
index f244d82..7b47dc0 100644
--- a/tools/source/string/strimp.cxx
+++ b/tools/source/string/strimp.cxx
@@ -28,23 +28,6 @@
 
 // no include "precompiled_tools.hxx" because this is included in other cxx files.
 
-// =======================================================================
-
-static sal_Int32 ImplStringCompare( const STRCODE* pStr1, const STRCODE* pStr2 )
-{
-    sal_Int32 nRet;
-    while ( ((nRet = ((sal_Int32)((STRCODEU)*pStr1))-((sal_Int32)((STRCODEU)*pStr2))) == 0) &&
-            *pStr2 )
-    {
-        ++pStr1,
-        ++pStr2;
-    }
-
-    return nRet;
-}
-
-// -----------------------------------------------------------------------
-
 static sal_Int32 ImplStringCompare( const STRCODE* pStr1, const STRCODE* pStr2,
                                     xub_StrLen nCount )
 {
@@ -108,39 +91,6 @@ static sal_Int32 ImplStringICompare( const STRCODE* pStr1, const STRCODE* pStr2
 
 // -----------------------------------------------------------------------
 
-static sal_Int32 ImplStringICompare( const STRCODE* pStr1, const STRCODE* pStr2,
-                                     xub_StrLen nCount )
-{
-    sal_Int32	nRet = 0;
-    STRCODE 	c1;
-    STRCODE 	c2;
-    do
-    {
-        if ( !nCount )
-            break;
-
-        // Ist das Zeichen zwischen 'A' und 'Z' dann umwandeln
-        c1 = *pStr1;
-        c2 = *pStr2;
-        if ( (c1 >= 65) && (c1 <= 90) )
-            c1 += 32;
-        if ( (c2 >= 65) && (c2 <= 90) )
-            c2 += 32;
-        nRet = ((sal_Int32)((STRCODEU)c1))-((sal_Int32)((STRCODEU)c2));
-        if ( nRet != 0 )
-            break;
-
-        ++pStr1,
-        ++pStr2,
-        --nCount;
-    }
-    while ( c2 );
-
-    return nRet;
-}
-
-// -----------------------------------------------------------------------
-
 static sal_Int32 ImplStringICompareWithoutZero( const STRCODE* pStr1, const STRCODE* pStr2,
                                                 sal_Int32 nCount )
 {
@@ -691,43 +641,6 @@ STRING& STRING::Insert( const STRING& rStr, xub_StrLen nIndex )
 
 // -----------------------------------------------------------------------
 
-STRING& STRING::Insert( const STRCODE* pCharStr, xub_StrLen nIndex )
-{
-    DBG_CHKTHIS( STRING, DBGCHECKSTRING );
-    DBG_ASSERT( pCharStr, "String::Insert() - pCharStr is NULL" );
-
-    // Stringlaenge ermitteln
-    sal_Int32 nCopyLen = ImplStringLen( pCharStr );
-
-    // Ueberlauf abfangen
-    nCopyLen = ImplGetCopyLen( mpData->mnLen, nCopyLen );
-
-    // Ist der einzufuegende String ein Leerstring
-    if ( !nCopyLen )
-        return *this;
-
-    // Index groesser als Laenge
-    if ( nIndex > mpData->mnLen )
-        nIndex = static_cast< xub_StrLen >(mpData->mnLen);
-
-    // Neue Laenge ermitteln und neuen String anlegen
-    STRINGDATA* pNewData = ImplAllocData( mpData->mnLen+nCopyLen );
-
-    // String kopieren
-    memcpy( pNewData->maStr, mpData->maStr, nIndex*sizeof( STRCODE ) );
-    memcpy( pNewData->maStr+nIndex, pCharStr, nCopyLen*sizeof( STRCODE ) );
-    memcpy( pNewData->maStr+nIndex+nCopyLen, mpData->maStr+nIndex,
-            (mpData->mnLen-nIndex)*sizeof( STRCODE ) );
-
-    // Alte Daten loeschen und Neue zuweisen
-    STRING_RELEASE((STRING_TYPE *)mpData);
-    mpData = pNewData;
-
-    return *this;
-}
-
-// -----------------------------------------------------------------------
-
 STRING& STRING::Insert( STRCODE c, xub_StrLen nIndex )
 {
     DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -1191,43 +1104,6 @@ StringCompare STRING::CompareTo( const STRING& rStr, xub_StrLen nLen ) const
 
 // -----------------------------------------------------------------------
 
-StringCompare STRING::CompareTo( const STRCODE* pCharStr, xub_StrLen nLen ) const
-{
-    DBG_CHKTHIS( STRING, DBGCHECKSTRING );
-
-    // String vergleichen
-    sal_Int32 nCompare = ImplStringCompare( mpData->maStr, pCharStr, nLen );
-
-    // Rueckgabewert anpassen
-    if ( nCompare == 0 )
-        return COMPARE_EQUAL;
-    else if ( nCompare < 0 )
-        return COMPARE_LESS;
-    else
-        return COMPARE_GREATER;
-}
-
-// -----------------------------------------------------------------------
-
-StringCompare STRING::CompareIgnoreCaseToAscii( const STRCODE* pCharStr,
-                                                xub_StrLen nLen ) const
-{
-    DBG_CHKTHIS( STRING, DBGCHECKSTRING );
-
-    // String vergleichen
-    sal_Int32 nCompare = ImplStringICompare( mpData->maStr, pCharStr, nLen );
-
-    // Rueckgabewert anpassen
-    if ( nCompare == 0 )
-        return COMPARE_EQUAL;
-    else if ( nCompare < 0 )
-        return COMPARE_LESS;
-    else
-        return COMPARE_GREATER;
-}
-
-// -----------------------------------------------------------------------
-
 sal_Bool STRING::Equals( const STRING& rStr ) const
 {
     DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -1247,15 +1123,6 @@ sal_Bool STRING::Equals( const STRING& rStr ) const
 
 // -----------------------------------------------------------------------
 
-sal_Bool STRING::Equals( const STRCODE* pCharStr ) const
-{
-    DBG_CHKTHIS( STRING, DBGCHECKSTRING );
-
-    return (ImplStringCompare( mpData->maStr, pCharStr ) == 0);
-}
-
-// -----------------------------------------------------------------------
-
 sal_Bool STRING::EqualsIgnoreCaseAscii( const STRING& rStr ) const
 {
     DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -1497,21 +1364,6 @@ xub_StrLen STRING::SearchAndReplace( const STRING& rStr, const STRING& rRepStr,
 
 // -----------------------------------------------------------------------
 
-xub_StrLen STRING::SearchAndReplace( const STRCODE* pCharStr, const STRING& rRepStr,
-                                     xub_StrLen nIndex )
-{
-    DBG_CHKTHIS( STRING, DBGCHECKSTRING );
-    DBG_CHKOBJ( &rRepStr, STRING, DBGCHECKSTRING );
-
-    xub_StrLen nSPos = Search( pCharStr, nIndex );
-    if ( nSPos != STRING_NOTFOUND )
-        Replace( nSPos, ImplStringLen( pCharStr ), rRepStr );
-
-    return nSPos;
-}
-
-// -----------------------------------------------------------------------
-
 void STRING::SearchAndReplaceAll( STRCODE c, STRCODE cRep )
 {
     DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -1533,23 +1385,6 @@ void STRING::SearchAndReplaceAll( STRCODE c, STRCODE cRep )
 
 // -----------------------------------------------------------------------
 
-void STRING::SearchAndReplaceAll( const STRCODE* pCharStr, const STRING& rRepStr )
-{
-    DBG_CHKTHIS( STRING, DBGCHECKSTRING );
-    DBG_CHKOBJ( &rRepStr, STRING, DBGCHECKSTRING );
-
-    xub_StrLen nCharLen = ImplStringLen( pCharStr );
-    xub_StrLen nSPos = Search( pCharStr, 0 );
-    while ( nSPos != STRING_NOTFOUND )
-    {
-        Replace( nSPos, nCharLen, rRepStr );
-        nSPos = nSPos + rRepStr.Len();
-        nSPos = Search( pCharStr, nSPos );
-    }
-}
-
-// -----------------------------------------------------------------------
-
 void STRING::SearchAndReplaceAll( const STRING& rStr, const STRING& rRepStr )
 {
     DBG_CHKTHIS( STRING, DBGCHECKSTRING );
diff --git a/tools/source/string/tstring.cxx b/tools/source/string/tstring.cxx
index 3a6c5f6..f3b53a8 100644
--- a/tools/source/string/tstring.cxx
+++ b/tools/source/string/tstring.cxx
@@ -227,4 +227,153 @@ sal_Bool ByteString::IsAlphaNumericAscii() const
     return sal_True;
 }
 
+void STRING::SearchAndReplaceAll( const STRCODE* pCharStr, const STRING& rRepStr )
+{
+    DBG_CHKTHIS( STRING, DBGCHECKSTRING );
+    DBG_CHKOBJ( &rRepStr, STRING, DBGCHECKSTRING );
+
+    xub_StrLen nCharLen = ImplStringLen( pCharStr );
+    xub_StrLen nSPos = Search( pCharStr, 0 );
+    while ( nSPos != STRING_NOTFOUND )
+    {
+        Replace( nSPos, nCharLen, rRepStr );
+        nSPos = nSPos + rRepStr.Len();
+        nSPos = Search( pCharStr, nSPos );
+    }
+}
+
+xub_StrLen STRING::SearchAndReplace( const STRCODE* pCharStr, const STRING& rRepStr,
+                                     xub_StrLen nIndex )
+{
+    DBG_CHKTHIS( STRING, DBGCHECKSTRING );
+    DBG_CHKOBJ( &rRepStr, STRING, DBGCHECKSTRING );
+
+    xub_StrLen nSPos = Search( pCharStr, nIndex );
+    if ( nSPos != STRING_NOTFOUND )
+        Replace( nSPos, ImplStringLen( pCharStr ), rRepStr );
+
+    return nSPos;
+}
+
+static sal_Int32 ImplStringICompare( const STRCODE* pStr1, const STRCODE* pStr2,
+                                     xub_StrLen nCount )
+{
+    sal_Int32	nRet = 0;
+    STRCODE 	c1;
+    STRCODE 	c2;
+    do
+    {
+        if ( !nCount )
+            break;
+
+        // Ist das Zeichen zwischen 'A' und 'Z' dann umwandeln
+        c1 = *pStr1;
+        c2 = *pStr2;
+        if ( (c1 >= 65) && (c1 <= 90) )
+            c1 += 32;
+        if ( (c2 >= 65) && (c2 <= 90) )
+            c2 += 32;
+        nRet = ((sal_Int32)((STRCODEU)c1))-((sal_Int32)((STRCODEU)c2));
+        if ( nRet != 0 )
+            break;
+
+        ++pStr1,
+        ++pStr2,
+        --nCount;
+    }
+    while ( c2 );
+
+    return nRet;
+}
+
+StringCompare STRING::CompareIgnoreCaseToAscii( const STRCODE* pCharStr,
+                                                xub_StrLen nLen ) const
+{
+    DBG_CHKTHIS( STRING, DBGCHECKSTRING );
+
+    // String vergleichen
+    sal_Int32 nCompare = ImplStringICompare( mpData->maStr, pCharStr, nLen );
+
+    // Rueckgabewert anpassen
+    if ( nCompare == 0 )
+        return COMPARE_EQUAL;
+    else if ( nCompare < 0 )
+        return COMPARE_LESS;
+    else
+        return COMPARE_GREATER;
+}
+
+StringCompare STRING::CompareTo( const STRCODE* pCharStr, xub_StrLen nLen ) const
+{
+    DBG_CHKTHIS( STRING, DBGCHECKSTRING );
+
+    // String vergleichen
+    sal_Int32 nCompare = ImplStringCompare( mpData->maStr, pCharStr, nLen );
+
+    // Rueckgabewert anpassen
+    if ( nCompare == 0 )
+        return COMPARE_EQUAL;
+    else if ( nCompare < 0 )
+        return COMPARE_LESS;
+    else
+        return COMPARE_GREATER;
+}
+
+// =======================================================================
+
+static sal_Int32 ImplStringCompare( const STRCODE* pStr1, const STRCODE* pStr2 )
+{
+    sal_Int32 nRet;
+    while ( ((nRet = ((sal_Int32)((STRCODEU)*pStr1))-((sal_Int32)((STRCODEU)*pStr2))) == 0) &&
+            *pStr2 )
+    {
+        ++pStr1,
+        ++pStr2;
+    }
+
+    return nRet;
+}
+
+sal_Bool STRING::Equals( const STRCODE* pCharStr ) const
+{
+    DBG_CHKTHIS( STRING, DBGCHECKSTRING );
+
+    return (ImplStringCompare( mpData->maStr, pCharStr ) == 0);
+}
+
+STRING& STRING::Insert( const STRCODE* pCharStr, xub_StrLen nIndex )
+{
+    DBG_CHKTHIS( STRING, DBGCHECKSTRING );
+    DBG_ASSERT( pCharStr, "String::Insert() - pCharStr is NULL" );
+
+    // Stringlaenge ermitteln
+    sal_Int32 nCopyLen = ImplStringLen( pCharStr );
+
+    // Ueberlauf abfangen
+    nCopyLen = ImplGetCopyLen( mpData->mnLen, nCopyLen );
+
+    // Ist der einzufuegende String ein Leerstring
+    if ( !nCopyLen )
+        return *this;
+
+    // Index groesser als Laenge
+    if ( nIndex > mpData->mnLen )
+        nIndex = static_cast< xub_StrLen >(mpData->mnLen);
+
+    // Neue Laenge ermitteln und neuen String anlegen
+    STRINGDATA* pNewData = ImplAllocData( mpData->mnLen+nCopyLen );
+
+    // String kopieren
+    memcpy( pNewData->maStr, mpData->maStr, nIndex*sizeof( STRCODE ) );
+    memcpy( pNewData->maStr+nIndex, pCharStr, nCopyLen*sizeof( STRCODE ) );
+    memcpy( pNewData->maStr+nIndex+nCopyLen, mpData->maStr+nIndex,
+            (mpData->mnLen-nIndex)*sizeof( STRCODE ) );
+
+    // Alte Daten loeschen und Neue zuweisen
+    STRING_RELEASE((STRING_TYPE *)mpData);
+    mpData = pNewData;
+
+    return *this;
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/tools/source/string/tustring.cxx b/tools/source/string/tustring.cxx
index 2868e2c..c6f576a 100644
--- a/tools/source/string/tustring.cxx
+++ b/tools/source/string/tustring.cxx
@@ -231,32 +231,6 @@ STRING& STRING::Reverse()
 
 // -----------------------------------------------------------------------
 
-xub_StrLen STRING::Match( const STRCODE* pCharStr ) const
-{
-    DBG_CHKTHIS( STRING, DBGCHECKSTRING );
-
-    // Ist dieser String leer
-    if ( !mpData->mnLen )
-        return STRING_MATCH;
-
-    // Suche bis Stringende nach dem ersten nicht uebereinstimmenden Zeichen
-    const STRCODE*	pStr = mpData->maStr;
-    xub_StrLen		i = 0;
-    while ( i < mpData->mnLen )
-    {
-        // Stimmt das Zeichen nicht ueberein, dann abbrechen
-        if ( *pStr != *pCharStr )
-            return i;
-        ++pStr,
-        ++pCharStr,
-        ++i;
-    }
-
-    return STRING_MATCH;
-}
-
-// -----------------------------------------------------------------------
-
 STRING& STRING::Insert( const STRING& rStr, xub_StrLen nPos, xub_StrLen nLen,
                         xub_StrLen nIndex )
 {
@@ -460,19 +434,6 @@ sal_Bool STRING::EqualsIgnoreCaseAscii( const STRING& rStr, xub_StrLen nIndex, x
 
 // -----------------------------------------------------------------------
 
-sal_Bool STRING::EqualsIgnoreCaseAscii( const STRCODE* pCharStr, xub_StrLen nIndex, xub_StrLen nLen ) const
-{
-    DBG_CHKTHIS( STRING, DBGCHECKSTRING );
-
-    // Are there enough codes for comparing?
-    if ( nIndex > mpData->mnLen )
-        return (*pCharStr == 0);
-
-    return (ImplStringICompare( mpData->maStr+nIndex, pCharStr, nLen ) == 0);
-}
-
-// -----------------------------------------------------------------------
-
 StringCompare STRING::CompareIgnoreCaseToAscii( const STRING& rStr,
                                                 xub_StrLen nLen ) const
 {
commit 8940c1f9aaef28dffb6857cc0a45107d69daa36f
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Jul 26 00:53:33 2011 +0100

    callcatcher: remove unused mapEventIDToName

diff --git a/svtools/inc/svtools/unoevent.hxx b/svtools/inc/svtools/unoevent.hxx
index c01ed8c..b9a6570 100644
--- a/svtools/inc/svtools/unoevent.hxx
+++ b/svtools/inc/svtools/unoevent.hxx
@@ -171,9 +171,6 @@ protected:
     /// convert an API event name to the event ID as used by SvxMacroItem
     sal_uInt16 mapNameToEventID(const ::rtl::OUString& rName) const;
 
-    /// convert an event ID to an API event name
-    ::rtl::OUString mapEventIDToName(sal_uInt16 nPoolID) const;
-
     /// get the event ID for the name; return 0 if not supported
     sal_uInt16 getMacroID(const ::rtl::OUString& rName) const;
 
diff --git a/svtools/source/uno/unoevent.cxx b/svtools/source/uno/unoevent.cxx
index c5ff2c6..640a05a 100644
--- a/svtools/source/uno/unoevent.cxx
+++ b/svtools/source/uno/unoevent.cxx
@@ -191,21 +191,6 @@ sal_uInt16 SvBaseEventDescriptor::mapNameToEventID(const OUString& rName) const
     return 0;
 }
 
-OUString SvBaseEventDescriptor::mapEventIDToName(sal_uInt16 nPoolID) const
-{
-    // iterate over known event IDs
-    for(sal_Int16 i = 0; i < mnMacroItems; i++)
-    {
-        if (nPoolID == mpSupportedMacroItems[i].mnEvent)
-        {
-            return OUString::createFromAscii(mpSupportedMacroItems[i].mpEventName);
-        }
-    }
-
-    // not found -> return empty string
-    return OUString();
-}
-
 sal_uInt16 SvBaseEventDescriptor::getMacroID(const OUString& rName) const
 {
     return mapNameToEventID(rName);
commit b7453df87aa6bac35546ca609293b4ee5e6e21b8
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Jul 25 23:10:34 2011 +0100

    add a test for a nasty suspicion I have

diff --git a/tools/qa/cppunit/test_streamstate.cxx b/tools/qa/cppunit/test_streamstate.cxx
index 1040dc6..c2a4be0 100644
--- a/tools/qa/cppunit/test_streamstate.cxx
+++ b/tools/qa/cppunit/test_streamstate.cxx
@@ -68,7 +68,7 @@ namespace
 
         aMemStream.Seek(STREAM_SEEK_TO_END);
         //seeking to end doesn't set eof, reading past eof does
-        CPPUNIT_ASSERT(!aMemStream.IsEof());
+        CPPUNIT_ASSERT(!aMemStream.eof());
         CPPUNIT_ASSERT(aMemStream.good());
 
         std_a = 78;
@@ -86,7 +86,7 @@ namespace
         tools_a = 78;
         aMemStream >> tools_a;
         //so, now eof is set
-        CPPUNIT_ASSERT(aMemStream.IsEof());
+        CPPUNIT_ASSERT(aMemStream.eof());
         //a failed read doesn't change the data, it remains unchanged
         CPPUNIT_ASSERT(tools_a == 78);
         //nothing wrong with the stream, so not bad
@@ -94,6 +94,15 @@ namespace
         //yet, the read didn't succeed
         CPPUNIT_ASSERT(!aMemStream.good());
 
+        sal_uInt16 tools_b = 0x1122;
+        aMemStream.SeekRel(-1);
+        CPPUNIT_ASSERT(!aMemStream.eof());
+        CPPUNIT_ASSERT(aMemStream.good());
+        aMemStream >> tools_b;
+        CPPUNIT_ASSERT(!aMemStream.good());
+        CPPUNIT_ASSERT(aMemStream.eof());
+//        CPPUNIT_ASSERT(tools_b == 0x1122); //nasty, real nasty
+
         iss.clear();
         iss.seekg(0);
         CPPUNIT_ASSERT(iss.good());
commit 9a950ae32c1257c336834de26d12533e5c57fc85
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Jul 25 22:24:54 2011 +0100

    use configured freetype and fontconfig flags, at end of link link

diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index 20927c7..ffa137c 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -55,12 +55,6 @@ $(eval $(call gb_Library_set_include,vcl,\
     $(WINEINCLUDE) \
     -I$(WORKDIR)/CustomTarget/vcl/unx/generic/fontmanager \
 ))
-ifeq ($(GUIBASE),unx)
-$(eval $(call gb_Library_add_cxxflags,vcl,\
-    $$(FONTCONFIG_CFLAGS) \
-    $$(FREETYPE_CFLAGS) \
-))
-endif
 
 $(eval $(call gb_Library_add_defs,vcl,\
     -DVCL_DLLIMPLEMENTATION \
@@ -480,9 +474,9 @@ $(eval $(call gb_Library_use_external,vcl,cairo))
 endif
 
 ifeq ($(GUIBASE),unx)
-$(eval $(call gb_Library_add_ldflags,vcl,\
-	$$(FONTCONFIG_LIBS) \
-    $$(FREETYPE_LIBS) \
+$(eval $(call gb_Library_use_externals,vcl,\
+	fontconfig \
+	freetype \
 ))
 endif
 
commit f9b38b5248f50e8e58c635a0fdb920e4c115a75a
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Jul 25 22:09:46 2011 +0100

    use new link mechanism and drop this horrible mess

diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index e738565..20927c7 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -465,7 +465,6 @@ endif
 $(eval $(call gb_Library_use_external,vcl,graphite))
 endif
 
-## handle Cairo
 ifneq ($(ENABLE_LIBRSVG),NO)
 
 $(eval $(call gb_Library_add_exception_objects,vcl,\
@@ -475,10 +474,11 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\
 $(eval $(call gb_Library_add_defs,vcl,\
     -DENABLE_LIBRSVG \
 ))
-endif
 
 $(eval $(call gb_Library_use_external,vcl,cairo))
 
+endif
+
 ifeq ($(GUIBASE),unx)
 $(eval $(call gb_Library_add_ldflags,vcl,\
 	$$(FONTCONFIG_LIBS) \
diff --git a/vcl/Library_vclplug_gen.mk b/vcl/Library_vclplug_gen.mk
index 8f5a2eb..7b8ae4a 100644
--- a/vcl/Library_vclplug_gen.mk
+++ b/vcl/Library_vclplug_gen.mk
@@ -63,12 +63,11 @@ $(eval $(call gb_Library_add_linked_libs,vclplug_gen,\
 ))
 
 $(eval $(call gb_Library_use_externals,vclplug_gen,\
+	cairo \
 	icule \
 	icuuc \
 ))
 
-$(eval $(call gb_Library_use_external,vclplug_gen,cairo))
-
 $(eval $(call gb_Library_add_exception_objects,vclplug_gen,\
     vcl/unx/generic/app/i18n_cb \
     vcl/unx/generic/app/i18n_ic \
diff --git a/vcl/source/components/rasterizer_rsvg.cxx b/vcl/source/components/rasterizer_rsvg.cxx
index ef0d5f8..6746285 100644
--- a/vcl/source/components/rasterizer_rsvg.cxx
+++ b/vcl/source/components/rasterizer_rsvg.cxx
@@ -38,11 +38,7 @@
 #include <cppuhelper/implbase2.hxx>
 #include <osl/module.h>
 
-#ifdef SYSTEM_CAIRO
 #include <cairo.h>
-#else
-#include <cairo/cairo.h>
-#endif
 
 #include <vector>
 
diff --git a/vcl/unx/generic/gdi/salgdi3.cxx b/vcl/unx/generic/gdi/salgdi3.cxx
index 40ab4a2..9f9601f 100644
--- a/vcl/unx/generic/gdi/salgdi3.cxx
+++ b/vcl/unx/generic/gdi/salgdi3.cxx
@@ -83,15 +83,9 @@
 #include <graphite_serverfont.hxx>
 #endif
 
-#ifdef SYSTEM_CAIRO
 #include <cairo.h>
 #include <cairo-ft.h>
 #include <cairo-xlib-xrender.h>
-#else
-#include <cairo/cairo.h>
-#include <cairo/cairo-ft.h>
-#include <cairo/cairo-xlib-xrender.h>
-#endif
 
 struct BOX
 {


More information about the Libreoffice-commits mailing list