[Libreoffice-commits] .: 29 commits - sot/inc sot/source svl/inc svl/source svtools/inc svtools/source tools/inc tools/source unotools/inc unotools/source vcl/inc vcl/source
Caolán McNamara
caolan at kemper.freedesktop.org
Mon Jul 11 01:29:19 PDT 2011
sot/inc/sot/storage.hxx | 3
sot/source/sdstor/storage.cxx | 123 -----------
svl/inc/svl/adrparse.hxx | 22 --
svl/source/misc/adrparse.cxx | 138 -------------
svtools/inc/svtools/filter.hxx | 1
svtools/inc/svtools/helpopt.hxx | 4
svtools/inc/svtools/unitconv.hxx | 4
svtools/inc/svtools/wmf.hxx | 2
svtools/source/config/helpopt.cxx | 18 -
svtools/source/dialogs/mcvmath.cxx | 159 ---------------
svtools/source/dialogs/mcvmath.hxx | 9
svtools/source/filter/sgfbram.cxx | 12 -
svtools/source/filter/sgvtext.cxx | 42 ----
svtools/source/filter/wmf/wmf.cxx | 7
svtools/source/misc/unitconv.cxx | 58 -----
tools/inc/impstrg.hxx | 6
tools/inc/tools/fsys.hxx | 5
tools/inc/tools/stream.hxx | 4
tools/inc/tools/string.hxx | 23 --
tools/inc/tools/tempfile.hxx | 1
tools/source/fsys/dirent.cxx | 4
tools/source/fsys/tdir.cxx | 13 -
tools/source/fsys/tempfile.cxx | 11 -
tools/source/stream/stream.cxx | 100 ---------
tools/source/string/strcvt.cxx | 55 -----
tools/source/string/strimp.cxx | 346 ---------------------------------
tools/source/string/tstring.cxx | 13 -
tools/source/string/tustring.cxx | 316 ++++++++++++++++++++++++++++++
unotools/inc/unotools/regoptions.hxx | 6
unotools/inc/unotools/tempfile.hxx | 1
unotools/source/config/regoptions.cxx | 51 ----
unotools/source/ucbhelper/tempfile.cxx | 12 -
vcl/inc/list.h | 3
vcl/inc/sallayout.hxx | 1
vcl/inc/vcl/accel.hxx | 1
vcl/inc/vcl/graphictools.hxx | 12 -
vcl/inc/vcl/settings.hxx | 1
vcl/source/app/settings.cxx | 40 ---
vcl/source/fontsubset/list.c | 33 ---
vcl/source/gdi/graphictools.cxx | 20 -
vcl/source/gdi/region.cxx | 28 --
vcl/source/gdi/sallayout.cxx | 85 --------
vcl/source/window/accel.cxx | 10
43 files changed, 323 insertions(+), 1480 deletions(-)
New commits:
commit 307370e834df0c556a8c31c21f507181ff7070f0
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Jul 11 01:11:53 2011 +0100
callcatcher: unused IsKeyCodeValid
diff --git a/vcl/inc/vcl/accel.hxx b/vcl/inc/vcl/accel.hxx
index 7f43de3..2c1f4dd 100644
--- a/vcl/inc/vcl/accel.hxx
+++ b/vcl/inc/vcl/accel.hxx
@@ -98,7 +98,6 @@ public:
sal_uInt16 GetItemId( const KeyCode& rKeyCode ) const;
KeyCode GetKeyCode( sal_uInt16 nItemId ) const;
sal_Bool IsIdValid( sal_uInt16 nItemId ) const;
- sal_Bool IsKeyCodeValid( const KeyCode rKeyCode ) const;
sal_Bool Call( const KeyCode& rKeyCode, sal_uInt16 nRepeat = 0 );
void SetAccel( sal_uInt16 nItemId, Accelerator* pAccel );
diff --git a/vcl/source/window/accel.cxx b/vcl/source/window/accel.cxx
index 8cd5d98..4711fce 100644
--- a/vcl/source/window/accel.cxx
+++ b/vcl/source/window/accel.cxx
@@ -560,16 +560,6 @@ sal_Bool Accelerator::IsIdValid( sal_uInt16 nItemId ) const
// -----------------------------------------------------------------------
-sal_Bool Accelerator::IsKeyCodeValid( const KeyCode rKeyCode ) const
-{
- DBG_CHKTHIS( Accelerator, NULL );
-
- ImplAccelEntry* pEntry = ImplGetAccelData( rKeyCode );
- return (pEntry != NULL);
-}
-
-// -----------------------------------------------------------------------
-
sal_Bool Accelerator::Call( const KeyCode& rKeyCode, sal_uInt16 nRepeat )
{
DBG_CHKTHIS( Accelerator, NULL );
commit 4c2d4c3ac8ce85ee3a0ccb1249454085c01074fd
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Jul 10 22:45:34 2011 +0100
compiler can now detect additional unused function
diff --git a/svtools/source/dialogs/mcvmath.cxx b/svtools/source/dialogs/mcvmath.cxx
index d3199e5..82c8302 100644
--- a/svtools/source/dialogs/mcvmath.cxx
+++ b/svtools/source/dialogs/mcvmath.cxx
@@ -129,82 +129,4 @@ FixCpx ImpExPI( sal_uInt16 nPhi )
return aIter;
}
-/**************************************************************************
-|*
-|* ImpATanx2()
-|*
-|* Beschreibung ATANX2-Funktion fuer FixPoint-Berechnungen
-|*
-**************************************************************************/
-
-// use for x*x+y*y==1 only
-
-static sal_uInt16 ImpATanx2( const Fix& rX, const Fix& rY )
-{
- sal_uInt16 phi0 = 0; // result angel higher part
- sal_uInt16 phi = 0; // dito lower part
- long x = rX.x;
- long y = rY.x;
- long z;
- const char Sft=14-FIX_POST;
- short i;
- FixCpx aTry;
- FixCpx aInc;
- FixCpx aIter(1L);
- sal_Bool Small = sal_False;
-
- if ( (x==0) && (y==0) )
- return 0;
-
- if ( y < 0)
- {
- // reduce 3. to 1. quadrant (0..90 Degree)
- phi0 += 180L * 65536L / 360L;
- // turn 180 degree
- y *= -1;
- x *= -1;
- }
-
- if ( x < 0)
- {
- // 2. to 1. q.
- phi0 += 90L * 65536L / 360L;
- // turn 90 degree clockwise
- z = y;
- y = -x;
- x = z;
- }
-
- for ( i = 13; i >= 0; i-- )
- {
- aInc.r.x = CosTab[i]>>Sft; // e**(i(phi1+phi2)) =
- aInc.i.x = SinTab[i]>>Sft; // e**(i*phi1)) * e**(i*phi2))
- aTry = aIter*aInc;
-
- if ( Small )
- {
- // is try ok
- if ( aTry.r.x >= x )
- {
- aIter = aTry;
- phi += (1<<i);
- }
- }
- else
- {
- // is try ok
- if ( aTry.i.x <= y )
- {
- aIter = aTry;
- phi += (1<<i);
-
- if ( i > 11 )
- Small=sal_True;
- }
- }
- }
-
- return phi0+phi;
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit a7da1617813d0c169703486c52c95e2dfc8dbc03
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Jul 10 22:37:15 2011 +0100
Dir::SetSort unused
diff --git a/tools/inc/tools/fsys.hxx b/tools/inc/tools/fsys.hxx
index e66a4ef..095b262 100644
--- a/tools/inc/tools/fsys.hxx
+++ b/tools/inc/tools/fsys.hxx
@@ -453,8 +453,6 @@ public:
FSysSort nSort, ... );
~Dir();
- FSysError SetSort( FSysSort nSort, ... );
-
void Reset();
sal_uInt16 Scan( sal_uInt16 nCount = 5 );
size_t Count( sal_Bool bUpdated = sal_True ) const;
diff --git a/tools/source/fsys/tdir.cxx b/tools/source/fsys/tdir.cxx
index d15efb4..faedb70 100644
--- a/tools/source/fsys/tdir.cxx
+++ b/tools/source/fsys/tdir.cxx
@@ -587,19 +587,6 @@ FSysError Dir::ImpSetSort( std::va_list pArgs, int nFirstSort )
/*************************************************************************
|*
-|* Dir::SetSort()
-|*
-*************************************************************************/
-
-FSysError Dir::SetSort( FSysSort nSort, ... )
-{
- std::va_list pArgs;
- va_start( pArgs, nSort );
- return ImpSetSort( pArgs, nSort );
-}
-
-/*************************************************************************
-|*
|* Dir::operator[]()
|*
*************************************************************************/
commit 5f341bbb3aa12ffa7d9b3f886ddde5f920ac62e7
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Jul 10 22:36:07 2011 +0100
don't need these methods on some platforms
diff --git a/tools/inc/tools/fsys.hxx b/tools/inc/tools/fsys.hxx
index 6d706bf..e66a4ef 100644
--- a/tools/inc/tools/fsys.hxx
+++ b/tools/inc/tools/fsys.hxx
@@ -251,9 +251,12 @@ private:
TOOLS_DLLPRIVATE FSysError ImpParseName( const ByteString& rIntiName,
FSysPathStyle eParser );
+#if defined(WNT)
TOOLS_DLLPRIVATE FSysError ImpParseOs2Name( const ByteString& rPfad,
FSysPathStyle eStyle );
+#else
TOOLS_DLLPRIVATE FSysError ImpParseUnixName( const ByteString& rPfad,
+#endif
FSysPathStyle eStyle );
TOOLS_DLLPRIVATE const DirEntry* ImpGetTopPtr() const;
TOOLS_DLLPRIVATE DirEntry* ImpGetTopPtr();
diff --git a/tools/source/fsys/dirent.cxx b/tools/source/fsys/dirent.cxx
index a38d698..5f1d743 100644
--- a/tools/source/fsys/dirent.cxx
+++ b/tools/source/fsys/dirent.cxx
@@ -331,6 +331,7 @@ ByteString ImplCutPath( const ByteString& rStr, sal_uInt16 nMax, char cAccDel )
return aCutPath;
}
+#if defined(WNT)
/*************************************************************************
|*
|* DirEntry::ImpParseOs2Name()
@@ -502,6 +503,7 @@ FSysError DirEntry::ImpParseOs2Name( const ByteString& rPfad, FSysPathStyle eSty
aName = rPfad;
return nErr;
}
+#endif
/*************************************************************************
|*
@@ -1726,6 +1728,7 @@ const DirEntry &DirEntry::operator[]( sal_uInt16 nParentLevel ) const
return *pRes;
}
+#if !defined(WNT)
/*************************************************************************
|*
|* DirEntry::ImpParseUnixName()
@@ -1841,6 +1844,7 @@ FSysError DirEntry::ImpParseUnixName( const ByteString& rPfad, FSysPathStyle eSt
return FSYS_ERR_OK;
}
+#endif
#define MAX_EXT_MAX 250
#define MAX_LEN_MAX 255
commit 1a1dcdeb9dd4d63bd44fcbb8f21a93072105dfbf
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Jul 10 22:31:10 2011 +0100
callcatcher: drop ugly unused hack
diff --git a/sot/inc/sot/storage.hxx b/sot/inc/sot/storage.hxx
index e335ef9..32945d5 100644
--- a/sot/inc/sot/storage.hxx
+++ b/sot/inc/sot/storage.hxx
@@ -242,9 +242,6 @@ public:
static sal_Bool IsOLEStorage( const String & rFileName );
static sal_Bool IsOLEStorage( SvStream* pStream );
- // this is temporary HACK, _MUST_ be removed before release
- ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >
- GetUNOAPIDuplicate( const String& rEleName, sal_Int32 nUNOStorageMode );
void RemoveUNOStorageHolder( UNOStorageHolder* pHolder );
static SotStorage* OpenOLEStorage( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& xStorage,
diff --git a/sot/source/sdstor/storage.cxx b/sot/source/sdstor/storage.cxx
index 6e806b0..514faaf 100644
--- a/sot/source/sdstor/storage.cxx
+++ b/sot/source/sdstor/storage.cxx
@@ -744,129 +744,6 @@ void SotStorage::RemoveUNOStorageHolder( UNOStorageHolder* pHolder )
}
/*************************************************************************
-|* SotStorage::GetUNOAPIDuplicate()
-|*
-|* Beschreibung
-*************************************************************************/
-uno::Reference< embed::XStorage > SotStorage::GetUNOAPIDuplicate( const String& rEleName, sal_Int32 nUNOStorageMode )
-{
- // after we create a duplicate we will register wrapper
- // for storage messages, the wrapper will control the real storage
- // the real storage will be able to ask the duplicate to dispose if it's parent is disposed
-
- uno::Reference< embed::XStorage > xResult;
-
- UCBStorage* pStg = PTR_CAST( UCBStorage, m_pOwnStg );
- if ( !pStg )
- return xResult;
-
- UNOStorageHolderList* pUNOStorageHolderList = pStg->GetUNOStorageHolderList();
- if ( !pUNOStorageHolderList )
- return xResult;
-
- for ( UNOStorageHolderList::iterator aIter = pUNOStorageHolderList->begin();
- aIter != pUNOStorageHolderList->end(); ++aIter )
- if ( (*aIter) && (*aIter)->GetStorageName().Equals( rEleName ) )
- {
- // the storage is already in use
- return xResult;
- }
-
- if ( IsStream( rEleName ) )
- return xResult;
-
- if ( GetError() == ERRCODE_NONE )
- {
- StreamMode nMode = ( ( nUNOStorageMode & embed::ElementModes::WRITE ) == embed::ElementModes::WRITE ) ?
- STREAM_WRITE : ( STREAM_READ | STREAM_NOCREATE );
- if ( nUNOStorageMode & embed::ElementModes::NOCREATE )
- nMode |= STREAM_NOCREATE;
-
- sal_Bool bStorageReady = !IsStorage( rEleName );
- SotStorageRef pChildStorage = OpenUCBStorage( rEleName, nMode, STORAGE_TRANSACTED );
- if ( pChildStorage->GetError() == ERRCODE_NONE && pChildStorage->m_pOwnStg )
- {
- ::utl::TempFile* pTempFile = new ::utl::TempFile();
- if ( pTempFile->GetURL().Len() )
- {
- if ( !bStorageReady )
- {
- UCBStorage* pChildUCBStg = PTR_CAST( UCBStorage, pChildStorage->m_pOwnStg );
- if ( pChildUCBStg )
- {
- UCBStorage* pTempStorage = new UCBStorage( pTempFile->GetURL(), STREAM_WRITE, sal_False, sal_True );
- if ( pTempStorage )
- {
- pChildUCBStg->CopyTo( pTempStorage );
-
- // CopyTo does not transport unknown media type
- // just workaround it
- uno::Any aMediaType;
-
- if ( pChildUCBStg->GetProperty(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MediaType")), aMediaType ) )
- pTempStorage->SetProperty( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MediaType")), aMediaType );
-
- bStorageReady = !pChildUCBStg->GetError() && !pTempStorage->GetError()
- && pTempStorage->Commit();
-
- delete ((BaseStorage*)pTempStorage);
- pTempStorage = NULL;
- }
- }
-
- OSL_ENSURE( bStorageReady, "Problem on storage copy!\n" );
- }
-
- if ( bStorageReady )
- {
- try {
- uno::Reference< lang::XSingleServiceFactory > xStorageFactory(
- ::comphelper::getProcessServiceFactory()->createInstance(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.embed.StorageFactory")) ),
- uno::UNO_QUERY );
-
- OSL_ENSURE( xStorageFactory.is(), "Can't create storage factory!\n" );
- if ( xStorageFactory.is() )
- {
- uno::Sequence< uno::Any > aArg( 2 );
- aArg[0] <<= ::rtl::OUString( pTempFile->GetURL() );
- aArg[1] <<= nUNOStorageMode;
- uno::Reference< embed::XStorage > xDuplStorage(
- xStorageFactory->createInstanceWithArguments( aArg ),
- uno::UNO_QUERY );
-
- OSL_ENSURE( xDuplStorage.is(), "Can't open storage!\n" );
- if ( xDuplStorage.is() )
- {
- UNOStorageHolder* pHolder =
- new UNOStorageHolder( *this, *pChildStorage, xDuplStorage, pTempFile );
- pHolder->acquire();
- pTempFile = NULL;
- pUNOStorageHolderList->push_back( pHolder );
- xResult = xDuplStorage;
- }
- }
- }
- catch( uno::Exception& e )
- {
- (void)e;
- OSL_FAIL( ::rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ) );
- }
- }
- }
-
- if ( pTempFile != NULL )
- delete pTempFile;
- }
- else
- SetError( pChildStorage->GetError() );
- }
-
- return xResult;
-}
-
-/*************************************************************************
|* SotStorage::CreateMemoryStream()
|*
|* Beschreibung
commit c733d74d67fc2fb5b6c684bdf3bc47930a776f06
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Jul 10 22:17:35 2011 +0100
strip out unused methods
diff --git a/tools/inc/tools/stream.hxx b/tools/inc/tools/stream.hxx
index fd61de1..db135f6 100644
--- a/tools/inc/tools/stream.hxx
+++ b/tools/inc/tools/stream.hxx
@@ -305,7 +305,6 @@ public:
SvStream( SvLockBytes *pLockBytes);
virtual ~SvStream();
- ErrCode SetLockBytes( SvLockBytesRef& rBytes );
SvLockBytes* GetLockBytes() const { return xLockBytes; }
sal_uInt32 GetError() const { return ERRCODE_TOERROR(nError); }
@@ -515,7 +514,6 @@ public:
void RefreshBuffer();
SvStream& PutBack( char aCh );
- void EatWhite();
sal_Bool IsWritable() const { return bIsWritable; }
StreamMode GetStreamMode() const { return eStreamMode; }
diff --git a/tools/source/stream/stream.cxx b/tools/source/stream/stream.cxx
index 6de9ee9..eecd612 100644
--- a/tools/source/stream/stream.cxx
+++ b/tools/source/stream/stream.cxx
@@ -373,13 +373,6 @@ sal_Size SvStream::GetData( void* pData, sal_Size nSize )
else return 0;
}
-ErrCode SvStream::SetLockBytes( SvLockBytesRef& rLB )
-{
- xLockBytes = rLB;
- RefreshBuffer();
- return ERRCODE_NONE;
-}
-
//========================================================================
sal_Size SvStream::PutData( const void* pData, sal_Size nSize )
@@ -1826,91 +1819,6 @@ void SvStream::Flush()
FlushData();
}
-
-/*************************************************************************
-|*
-|* Stream::PutBack()
-|*
-*************************************************************************/
-
-/*
- 4 Faelle :
-
- 1. Datenzeiger steht mitten im Puffer (nBufActualPos >= 1)
- 2. Datenzeiger auf Position 0, Puffer ist voll
- 3. Datenzeiger auf Position 0, Puffer ist teilweise gefuellt
- 4. Datenzeiger auf Position 0, Puffer ist leer -> Fehler!
-*/
-
-SvStream& SvStream::PutBack( char aCh )
-{
- // wenn kein Buffer oder Zurueckscrollen nicht moeglich -> Fehler
- if( !pRWBuf || !nBufActualLen || ( !nBufActualPos && !nBufFilePos ) )
- {
- // 4. Fall
- SetError( SVSTREAM_GENERALERROR );
- return *this;
- }
-
- // Flush() (Phys. Flushen aber nicht notwendig, deshalb selbst schreiben)
- if( bIsConsistent && bIsDirty )
- {
- SeekPos( nBufFilePos );
- if( nCryptMask )
- CryptAndWriteBuffer( pRWBuf, nBufActualLen );
- else
- PutData( pRWBuf, nBufActualLen );
- bIsDirty = sal_False;
- }
- bIsConsistent = sal_False; // Puffer enthaelt jetzt TRASH
- if( nBufActualPos )
- {
- // 1. Fall
- nBufActualPos--;
- pBufPos--;
- *pBufPos = aCh;
- nBufFree++;
- }
- else // Puffer muss verschoben werden
- {
- // Ist Puffer am Anschlag ?
- if( nBufSize == nBufActualLen )
- {
- // 2. Fall
- memmove( pRWBuf+1, pRWBuf, nBufSize-1 );
- // nBufFree behaelt den Wert!
- }
- else
- {
- // 3. Fall -> Puffer vergroessern
- memmove( pRWBuf+1, pRWBuf, (sal_uInt16)nBufActualLen );
- nBufActualLen++;
- nBufFree++;
- }
- nBufFilePos--;
- *pRWBuf = aCh;
- }
- eIOMode = STREAM_IO_DONTKNOW;
- bIsEof = sal_False;
- return *this;
-}
-
-/*************************************************************************
-|*
-|* Stream::EatWhite()
-|*
-*************************************************************************/
-
-void SvStream::EatWhite()
-{
- char aCh;
- Read(&aCh, sizeof(char) );
- while( !bIsEof && isspace((int)aCh) ) //( aCh == ' ' || aCh == '\t' ) )
- Read(&aCh, sizeof(char) );
- if( !bIsEof ) // konnte das letzte Char gelesen werden ?
- SeekRel( -1L );
-}
-
/*************************************************************************
|*
|* Stream::RefreshBuffer()
commit 19f604d0de5bc13d228c60d5989b760c007141f6
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Jul 10 22:12:14 2011 +0100
callcatcher: remove unused WriteUniStringLines
diff --git a/tools/inc/tools/stream.hxx b/tools/inc/tools/stream.hxx
index 391024f..fd61de1 100644
--- a/tools/inc/tools/stream.hxx
+++ b/tools/inc/tools/stream.hxx
@@ -446,8 +446,6 @@ public:
{ return WriteUnicodeOrByteText( rStr, GetStreamCharSet() ); }
/// Write a line of Unicode and append line end (endlu())
sal_Bool WriteUniStringLine( const String& rStr );
- /// Write multiple lines of Unicode (with CovertLineEnd) and append line end (endlu())
- sal_Bool WriteUniStringLines( const String& rStr );
/// Write a Unicode character if eDestCharSet==RTL_TEXTENCODING_UNICODE,
/// otherwise write as Bytecode converted to eDestCharSet.
diff --git a/tools/source/stream/stream.cxx b/tools/source/stream/stream.cxx
index 6ca9d79..6de9ee9 100644
--- a/tools/source/stream/stream.cxx
+++ b/tools/source/stream/stream.cxx
@@ -949,14 +949,6 @@ sal_Bool SvStream::WriteLines( const ByteString& rStr )
return (sal_Bool)(nError == SVSTREAM_OK);
}
-sal_Bool SvStream::WriteUniStringLines( const String& rStr )
-{
- String aStr( rStr );
- aStr.ConvertLineEnd( eLineDelimiter );
- WriteUniStringLine( aStr );
- return nError == SVSTREAM_OK;
-}
-
/*************************************************************************
|*
|* Stream::WriteUniOrByteChar()
commit fb0b65b61ca976f439f1ffb9aa85b75bff53ee1b
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Jul 10 22:11:06 2011 +0100
shrink ByteString api by removing unused methods
diff --git a/tools/inc/tools/string.hxx b/tools/inc/tools/string.hxx
index a291044..a47802a 100644
--- a/tools/inc/tools/string.hxx
+++ b/tools/inc/tools/string.hxx
@@ -239,8 +239,6 @@ public:
xub_StrLen Len() const { return (xub_StrLen)mpData->mnLen; }
ByteString& Insert( const ByteString& rStr, xub_StrLen nIndex = STRING_LEN );
- ByteString& Insert( const ByteString& rStr, xub_StrLen nPos, xub_StrLen nLen,
- xub_StrLen nIndex = STRING_LEN );
ByteString& Insert( const sal_Char* pCharStr, xub_StrLen nIndex = STRING_LEN );
ByteString& Insert( sal_Char c, xub_StrLen nIndex = STRING_LEN );
ByteString& Replace( xub_StrLen nIndex, xub_StrLen nCount, const ByteString& rStr );
@@ -254,7 +252,6 @@ public:
ByteString& EraseTrailingChars( sal_Char c = ' ' );
ByteString& EraseLeadingAndTrailingChars( sal_Char c = ' ' );
ByteString& EraseAllChars( sal_Char c = ' ' );
- ByteString& Reverse();
ByteString& Convert( rtl_TextEncoding eSource,
rtl_TextEncoding eTarget,
@@ -301,21 +298,14 @@ public:
xub_StrLen nIndex, xub_StrLen nLen ) const;
sal_Bool Equals( const sal_Char* pCharStr,
xub_StrLen nIndex, xub_StrLen nLen ) const;
- sal_Bool EqualsIgnoreCaseAscii( const ByteString& rStr,
- xub_StrLen nIndex, xub_StrLen nLen ) const;
- sal_Bool EqualsIgnoreCaseAscii( const sal_Char* pCharStr,
- xub_StrLen nIndex, xub_StrLen nLen ) const;
xub_StrLen Match( const ByteString& rStr ) const;
- xub_StrLen Match( const sal_Char* pCharStr ) const;
xub_StrLen Search( sal_Char c, xub_StrLen nIndex = 0 ) const;
xub_StrLen Search( const ByteString& rStr, xub_StrLen nIndex = 0 ) const;
xub_StrLen Search( const sal_Char* pCharStr, xub_StrLen nIndex = 0 ) const;
xub_StrLen SearchBackward( sal_Char c, xub_StrLen nIndex = STRING_LEN ) const;
- xub_StrLen SearchChar( const sal_Char* pChars, xub_StrLen nIndex = 0 ) const;
- xub_StrLen SearchAndReplace( sal_Char c, sal_Char cRep, xub_StrLen nIndex = 0 );
xub_StrLen SearchAndReplace( const ByteString& rStr, const ByteString& rRepStr,
xub_StrLen nIndex = 0 );
xub_StrLen SearchAndReplace( const sal_Char* pCharStr, const ByteString& rRepStr,
@@ -330,9 +320,6 @@ public:
ByteString GetToken( xub_StrLen nToken, sal_Char cTok, xub_StrLen& rIndex ) const;
ByteString GetToken( xub_StrLen nToken, sal_Char cTok = ';' ) const;
- xub_StrLen GetQuotedTokenCount( const ByteString& rQuotedPairs, sal_Char cTok = ';' ) const;
- ByteString GetQuotedToken( xub_StrLen nToken, const ByteString& rQuotedPairs,
- sal_Char cTok, xub_StrLen& rIndex ) const;
ByteString GetQuotedToken( xub_StrLen nToken, const ByteString& rQuotedPairs,
sal_Char cTok = ';' ) const;
@@ -390,13 +377,6 @@ inline ByteString ByteString::GetToken( xub_StrLen nToken, sal_Char cTok ) const
return GetToken( nToken, cTok, nTempPos );
}
-inline ByteString ByteString::GetQuotedToken( xub_StrLen nToken, const ByteString& rQuotedPairs,
- sal_Char cTok ) const
-{
- xub_StrLen nTempPos = 0;
- return GetQuotedToken( nToken, rQuotedPairs, cTok, nTempPos );
-}
-
// -----------------------------------------------------------------------
// ------------------------
diff --git a/tools/source/string/strimp.cxx b/tools/source/string/strimp.cxx
index b01811f..4dde7f9 100644
--- a/tools/source/string/strimp.cxx
+++ b/tools/source/string/strimp.cxx
@@ -691,52 +691,6 @@ STRING& STRING::Insert( const STRING& rStr, xub_StrLen nIndex )
// -----------------------------------------------------------------------
-STRING& STRING::Insert( const STRING& rStr, xub_StrLen nPos, xub_StrLen nLen,
- xub_StrLen nIndex )
-{
- DBG_CHKTHIS( STRING, DBGCHECKSTRING );
- DBG_CHKOBJ( &rStr, STRING, DBGCHECKSTRING );
-
- // Stringlaenge ermitteln
- if ( nPos > rStr.mpData->mnLen )
- nLen = 0;
- else
- {
- // Laenge korrigieren, wenn noetig
- sal_Int32 nMaxLen = rStr.mpData->mnLen-nPos;
- if ( nLen > nMaxLen )
- nLen = static_cast< xub_StrLen >(nMaxLen);
- }
-
- // Ueberlauf abfangen
- sal_Int32 nCopyLen = ImplGetCopyLen( mpData->mnLen, nLen );
-
- // 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, rStr.mpData->maStr+nPos, 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( const STRCODE* pCharStr, xub_StrLen nIndex )
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -1061,30 +1015,6 @@ STRING& STRING::EraseAllChars( STRCODE c )
// -----------------------------------------------------------------------
-STRING& STRING::Reverse()
-{
- DBG_CHKTHIS( STRING, DBGCHECKSTRING );
-
- if ( !mpData->mnLen )
- return *this;
-
- // Daten kopieren, wenn noetig
- ImplCopyData();
-
- // Reverse
- sal_Int32 nCount = mpData->mnLen / 2;
- for ( sal_Int32 i = 0; i < nCount; ++i )
- {
- STRCODE cTemp = mpData->maStr[i];
- mpData->maStr[i] = mpData->maStr[mpData->mnLen-i-1];
- mpData->maStr[mpData->mnLen-i-1] = cTemp;
- }
-
- return *this;
-}
-
-// -----------------------------------------------------------------------
-
STRING& STRING::ToLowerAscii()
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -1419,41 +1349,6 @@ sal_Bool STRING::Equals( const STRCODE* pCharStr, xub_StrLen nIndex, xub_StrLen
// -----------------------------------------------------------------------
-sal_Bool STRING::EqualsIgnoreCaseAscii( const STRING& rStr, xub_StrLen nIndex, xub_StrLen nLen ) const
-{
- DBG_CHKTHIS( STRING, DBGCHECKSTRING );
- DBG_CHKOBJ( &rStr, STRING, DBGCHECKSTRING );
-
- // Are there enough codes for comparing?
- if ( nIndex > mpData->mnLen )
- return (rStr.mpData->mnLen == 0);
- sal_Int32 nMaxLen = mpData->mnLen-nIndex;
- if ( nMaxLen < nLen )
- {
- if ( rStr.mpData->mnLen != nMaxLen )
- return sal_False;
- nLen = static_cast< xub_StrLen >(nMaxLen);
- }
-
- // String vergleichen
- return (ImplStringICompareWithoutZero( mpData->maStr+nIndex, rStr.mpData->maStr, nLen ) == 0);
-}
-
-// -----------------------------------------------------------------------
-
-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);
-}
-
-// -----------------------------------------------------------------------
-
xub_StrLen STRING::Match( const STRING& rStr ) const
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -1482,32 +1377,6 @@ xub_StrLen STRING::Match( const STRING& rStr ) const
// -----------------------------------------------------------------------
-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;
-}
-
-// -----------------------------------------------------------------------
-
xub_StrLen STRING::Search( STRCODE c, xub_StrLen nIndex ) const
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -1642,56 +1511,6 @@ xub_StrLen STRING::SearchBackward( STRCODE c, xub_StrLen nIndex ) const
// -----------------------------------------------------------------------
-xub_StrLen STRING::SearchChar( const STRCODE* pChars, xub_StrLen nIndex ) const
-{
- DBG_CHKTHIS( STRING, DBGCHECKSTRING );
-
- sal_Int32 nLen = mpData->mnLen;
- const STRCODE* pStr = mpData->maStr;
- pStr += nIndex;
- while ( nIndex < nLen )
- {
- STRCODE c = *pStr;
- const STRCODE* pCompStr = pChars;
- while ( *pCompStr )
- {
- if ( *pCompStr == c )
- return nIndex;
- ++pCompStr;
- }
- ++pStr,
- ++nIndex;
- }
-
- return STRING_NOTFOUND;
-}
-
-// -----------------------------------------------------------------------
-
-xub_StrLen STRING::SearchAndReplace( STRCODE c, STRCODE cRep, xub_StrLen nIndex )
-{
- DBG_CHKTHIS( STRING, DBGCHECKSTRING );
-
- sal_Int32 nLen = mpData->mnLen;
- const STRCODE* pStr = mpData->maStr;
- pStr += nIndex;
- while ( nIndex < nLen )
- {
- if ( *pStr == c )
- {
- ImplCopyData();
- mpData->maStr[nIndex] = cRep;
- return nIndex;
- }
- ++pStr,
- ++nIndex;
- }
-
- return STRING_NOTFOUND;
-}
-
-// -----------------------------------------------------------------------
-
xub_StrLen STRING::SearchAndReplace( const STRING& rStr, const STRING& rRepStr,
xub_StrLen nIndex )
{
@@ -1893,141 +1712,6 @@ STRING STRING::GetToken( xub_StrLen nToken, STRCODE cTok, xub_StrLen& rIndex ) c
// -----------------------------------------------------------------------
-xub_StrLen STRING::GetQuotedTokenCount( const STRING& rQuotedPairs, STRCODE cTok ) const
-{
- DBG_CHKTHIS( STRING, DBGCHECKSTRING );
- DBG_CHKOBJ( &rQuotedPairs, STRING, DBGCHECKSTRING );
- DBG_ASSERT( !(rQuotedPairs.Len()%2), "String::GetQuotedTokenCount() - QuotedString%2 != 0" );
- DBG_ASSERT( rQuotedPairs.Search(cTok) == STRING_NOTFOUND, "String::GetQuotedTokenCount() - cTok in QuotedString" );
-
- // Leerer String: TokenCount per Definition 0
- if ( !mpData->mnLen )
- return 0;
-
- xub_StrLen nTokCount = 1;
- sal_Int32 nLen = mpData->mnLen;
- xub_StrLen nQuotedLen = rQuotedPairs.Len();
- STRCODE cQuotedEndChar = 0;
- const STRCODE* pQuotedStr = rQuotedPairs.mpData->maStr;
- const STRCODE* pStr = mpData->maStr;
- sal_Int32 nIndex = 0;
- while ( nIndex < nLen )
- {
- STRCODE c = *pStr;
- if ( cQuotedEndChar )
- {
- // Ende des Quotes erreicht ?
- if ( c == cQuotedEndChar )
- cQuotedEndChar = 0;
- }
- else
- {
- // Ist das Zeichen ein Quote-Anfang-Zeichen ?
- xub_StrLen nQuoteIndex = 0;
- while ( nQuoteIndex < nQuotedLen )
- {
- if ( pQuotedStr[nQuoteIndex] == c )
- {
- cQuotedEndChar = pQuotedStr[nQuoteIndex+1];
- break;
- }
- else
- nQuoteIndex += 2;
- }
-
- // Stimmt das Tokenzeichen ueberein, dann erhoehe TokCount
- if ( c == cTok )
- ++nTokCount;
- }
-
- ++pStr,
- ++nIndex;
- }
-
- return nTokCount;
-}
-
-// -----------------------------------------------------------------------
-
-STRING STRING::GetQuotedToken( xub_StrLen nToken, const STRING& rQuotedPairs,
- STRCODE cTok, xub_StrLen& rIndex ) const
-{
- DBG_CHKTHIS( STRING, DBGCHECKSTRING );
- DBG_CHKOBJ( &rQuotedPairs, STRING, DBGCHECKSTRING );
- DBG_ASSERT( !(rQuotedPairs.Len()%2), "String::GetQuotedToken() - QuotedString%2 != 0" );
- DBG_ASSERT( rQuotedPairs.Search(cTok) == STRING_NOTFOUND, "String::GetQuotedToken() - cTok in QuotedString" );
-
- const STRCODE* pStr = mpData->maStr;
- const STRCODE* pQuotedStr = rQuotedPairs.mpData->maStr;
- STRCODE cQuotedEndChar = 0;
- xub_StrLen nQuotedLen = rQuotedPairs.Len();
- xub_StrLen nLen = (xub_StrLen)mpData->mnLen;
- xub_StrLen nTok = 0;
- xub_StrLen nFirstChar = rIndex;
- xub_StrLen i = nFirstChar;
-
- // Bestimme die Token-Position und Laenge
- pStr += i;
- while ( i < nLen )
- {
- STRCODE c = *pStr;
- if ( cQuotedEndChar )
- {
- // Ende des Quotes erreicht ?
- if ( c == cQuotedEndChar )
- cQuotedEndChar = 0;
- }
- else
- {
- // Ist das Zeichen ein Quote-Anfang-Zeichen ?
- xub_StrLen nQuoteIndex = 0;
- while ( nQuoteIndex < nQuotedLen )
- {
- if ( pQuotedStr[nQuoteIndex] == c )
- {
- cQuotedEndChar = pQuotedStr[nQuoteIndex+1];
- break;
- }
- else
- nQuoteIndex += 2;
- }
-
- // Stimmt das Tokenzeichen ueberein, dann erhoehe TokCount
- if ( c == cTok )
- {
- ++nTok;
-
- if ( nTok == nToken )
- nFirstChar = i+1;
- else
- {
- if ( nTok > nToken )
- break;
- }
- }
- }
-
- ++pStr,
- ++i;
- }
-
- if ( nTok >= nToken )
- {
- if ( i < nLen )
- rIndex = i+1;
- else
- rIndex = STRING_NOTFOUND;
- return Copy( nFirstChar, i-nFirstChar );
- }
- else
- {
- rIndex = STRING_NOTFOUND;
- return STRING();
- }
-}
-
-// -----------------------------------------------------------------------
-
STRCODE* STRING::GetBufferAccess()
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
diff --git a/tools/source/string/tustring.cxx b/tools/source/string/tustring.cxx
index c99d0a8..923f606 100644
--- a/tools/source/string/tustring.cxx
+++ b/tools/source/string/tustring.cxx
@@ -155,4 +155,320 @@ double UniString::ToDouble() const
return rtl_ustr_toDouble( mpData->maStr );
}
+// -----------------------------------------------------------------------
+
+xub_StrLen STRING::SearchChar( const STRCODE* pChars, xub_StrLen nIndex ) const
+{
+ DBG_CHKTHIS( STRING, DBGCHECKSTRING );
+
+ sal_Int32 nLen = mpData->mnLen;
+ const STRCODE* pStr = mpData->maStr;
+ pStr += nIndex;
+ while ( nIndex < nLen )
+ {
+ STRCODE c = *pStr;
+ const STRCODE* pCompStr = pChars;
+ while ( *pCompStr )
+ {
+ if ( *pCompStr == c )
+ return nIndex;
+ ++pCompStr;
+ }
+ ++pStr,
+ ++nIndex;
+ }
+
+ return STRING_NOTFOUND;
+}
+
+// -----------------------------------------------------------------------
+
+xub_StrLen STRING::SearchAndReplace( STRCODE c, STRCODE cRep, xub_StrLen nIndex )
+{
+ DBG_CHKTHIS( STRING, DBGCHECKSTRING );
+
+ sal_Int32 nLen = mpData->mnLen;
+ const STRCODE* pStr = mpData->maStr;
+ pStr += nIndex;
+ while ( nIndex < nLen )
+ {
+ if ( *pStr == c )
+ {
+ ImplCopyData();
+ mpData->maStr[nIndex] = cRep;
+ return nIndex;
+ }
+ ++pStr,
+ ++nIndex;
+ }
+
+ return STRING_NOTFOUND;
+}
+
+// -----------------------------------------------------------------------
+
+STRING& STRING::Reverse()
+{
+ DBG_CHKTHIS( STRING, DBGCHECKSTRING );
+
+ if ( !mpData->mnLen )
+ return *this;
+
+ // Daten kopieren, wenn noetig
+ ImplCopyData();
+
+ // Reverse
+ sal_Int32 nCount = mpData->mnLen / 2;
+ for ( sal_Int32 i = 0; i < nCount; ++i )
+ {
+ STRCODE cTemp = mpData->maStr[i];
+ mpData->maStr[i] = mpData->maStr[mpData->mnLen-i-1];
+ mpData->maStr[mpData->mnLen-i-1] = cTemp;
+ }
+
+ return *this;
+}
+
+// -----------------------------------------------------------------------
+
+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 )
+{
+ DBG_CHKTHIS( STRING, DBGCHECKSTRING );
+ DBG_CHKOBJ( &rStr, STRING, DBGCHECKSTRING );
+
+ // Stringlaenge ermitteln
+ if ( nPos > rStr.mpData->mnLen )
+ nLen = 0;
+ else
+ {
+ // Laenge korrigieren, wenn noetig
+ sal_Int32 nMaxLen = rStr.mpData->mnLen-nPos;
+ if ( nLen > nMaxLen )
+ nLen = static_cast< xub_StrLen >(nMaxLen);
+ }
+
+ // Ueberlauf abfangen
+ sal_Int32 nCopyLen = ImplGetCopyLen( mpData->mnLen, nLen );
+
+ // 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, rStr.mpData->maStr+nPos, 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;
+}
+
+// -----------------------------------------------------------------------
+
+xub_StrLen STRING::GetQuotedTokenCount( const STRING& rQuotedPairs, STRCODE cTok ) const
+{
+ DBG_CHKTHIS( STRING, DBGCHECKSTRING );
+ DBG_CHKOBJ( &rQuotedPairs, STRING, DBGCHECKSTRING );
+ DBG_ASSERT( !(rQuotedPairs.Len()%2), "String::GetQuotedTokenCount() - QuotedString%2 != 0" );
+ DBG_ASSERT( rQuotedPairs.Search(cTok) == STRING_NOTFOUND, "String::GetQuotedTokenCount() - cTok in QuotedString" );
+
+ // Leerer String: TokenCount per Definition 0
+ if ( !mpData->mnLen )
+ return 0;
+
+ xub_StrLen nTokCount = 1;
+ sal_Int32 nLen = mpData->mnLen;
+ xub_StrLen nQuotedLen = rQuotedPairs.Len();
+ STRCODE cQuotedEndChar = 0;
+ const STRCODE* pQuotedStr = rQuotedPairs.mpData->maStr;
+ const STRCODE* pStr = mpData->maStr;
+ sal_Int32 nIndex = 0;
+ while ( nIndex < nLen )
+ {
+ STRCODE c = *pStr;
+ if ( cQuotedEndChar )
+ {
+ // Ende des Quotes erreicht ?
+ if ( c == cQuotedEndChar )
+ cQuotedEndChar = 0;
+ }
+ else
+ {
+ // Ist das Zeichen ein Quote-Anfang-Zeichen ?
+ xub_StrLen nQuoteIndex = 0;
+ while ( nQuoteIndex < nQuotedLen )
+ {
+ if ( pQuotedStr[nQuoteIndex] == c )
+ {
+ cQuotedEndChar = pQuotedStr[nQuoteIndex+1];
+ break;
+ }
+ else
+ nQuoteIndex += 2;
+ }
+
+ // Stimmt das Tokenzeichen ueberein, dann erhoehe TokCount
+ if ( c == cTok )
+ ++nTokCount;
+ }
+
+ ++pStr,
+ ++nIndex;
+ }
+
+ return nTokCount;
+}
+
+// -----------------------------------------------------------------------
+
+STRING STRING::GetQuotedToken( xub_StrLen nToken, const STRING& rQuotedPairs,
+ STRCODE cTok, xub_StrLen& rIndex ) const
+{
+ DBG_CHKTHIS( STRING, DBGCHECKSTRING );
+ DBG_CHKOBJ( &rQuotedPairs, STRING, DBGCHECKSTRING );
+ DBG_ASSERT( !(rQuotedPairs.Len()%2), "String::GetQuotedToken() - QuotedString%2 != 0" );
+ DBG_ASSERT( rQuotedPairs.Search(cTok) == STRING_NOTFOUND, "String::GetQuotedToken() - cTok in QuotedString" );
+
+ const STRCODE* pStr = mpData->maStr;
+ const STRCODE* pQuotedStr = rQuotedPairs.mpData->maStr;
+ STRCODE cQuotedEndChar = 0;
+ xub_StrLen nQuotedLen = rQuotedPairs.Len();
+ xub_StrLen nLen = (xub_StrLen)mpData->mnLen;
+ xub_StrLen nTok = 0;
+ xub_StrLen nFirstChar = rIndex;
+ xub_StrLen i = nFirstChar;
+
+ // Bestimme die Token-Position und Laenge
+ pStr += i;
+ while ( i < nLen )
+ {
+ STRCODE c = *pStr;
+ if ( cQuotedEndChar )
+ {
+ // Ende des Quotes erreicht ?
+ if ( c == cQuotedEndChar )
+ cQuotedEndChar = 0;
+ }
+ else
+ {
+ // Ist das Zeichen ein Quote-Anfang-Zeichen ?
+ xub_StrLen nQuoteIndex = 0;
+ while ( nQuoteIndex < nQuotedLen )
+ {
+ if ( pQuotedStr[nQuoteIndex] == c )
+ {
+ cQuotedEndChar = pQuotedStr[nQuoteIndex+1];
+ break;
+ }
+ else
+ nQuoteIndex += 2;
+ }
+
+ // Stimmt das Tokenzeichen ueberein, dann erhoehe TokCount
+ if ( c == cTok )
+ {
+ ++nTok;
+
+ if ( nTok == nToken )
+ nFirstChar = i+1;
+ else
+ {
+ if ( nTok > nToken )
+ break;
+ }
+ }
+ }
+
+ ++pStr,
+ ++i;
+ }
+
+ if ( nTok >= nToken )
+ {
+ if ( i < nLen )
+ rIndex = i+1;
+ else
+ rIndex = STRING_NOTFOUND;
+ return Copy( nFirstChar, i-nFirstChar );
+ }
+ else
+ {
+ rIndex = STRING_NOTFOUND;
+ return STRING();
+ }
+}
+
+// -----------------------------------------------------------------------
+
+sal_Bool STRING::EqualsIgnoreCaseAscii( const STRING& rStr, xub_StrLen nIndex, xub_StrLen nLen ) const
+{
+ DBG_CHKTHIS( STRING, DBGCHECKSTRING );
+ DBG_CHKOBJ( &rStr, STRING, DBGCHECKSTRING );
+
+ // Are there enough codes for comparing?
+ if ( nIndex > mpData->mnLen )
+ return (rStr.mpData->mnLen == 0);
+ sal_Int32 nMaxLen = mpData->mnLen-nIndex;
+ if ( nMaxLen < nLen )
+ {
+ if ( rStr.mpData->mnLen != nMaxLen )
+ return sal_False;
+ nLen = static_cast< xub_StrLen >(nMaxLen);
+ }
+
+ // String vergleichen
+ return (ImplStringICompareWithoutZero( mpData->maStr+nIndex, rStr.mpData->maStr, nLen ) == 0);
+}
+
+// -----------------------------------------------------------------------
+
+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);
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 11793f90161419e12c588b1bfe575781c90c0187
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Jul 10 21:58:57 2011 +0100
callcatcher: unused ByteString::EmptyString
diff --git a/tools/inc/tools/string.hxx b/tools/inc/tools/string.hxx
index 20044e0..a291044 100644
--- a/tools/inc/tools/string.hxx
+++ b/tools/inc/tools/string.hxx
@@ -204,7 +204,6 @@ public:
}
static ByteString CreateFromInt32( sal_Int32 n, sal_Int16 nRadix = 10 );
- static const ByteString& EmptyString();
sal_Int32 ToInt32() const;
sal_Int64 ToInt64() const;
diff --git a/tools/source/string/tstring.cxx b/tools/source/string/tstring.cxx
index aceadc9..3a6c5f6 100644
--- a/tools/source/string/tstring.cxx
+++ b/tools/source/string/tstring.cxx
@@ -38,7 +38,6 @@
#include <rtl/alloc.h>
#include <rtl/memory.h>
#include <rtl/tencinfo.h>
-#include <rtl/instance.hxx>
#include <tools/string.hxx>
#include <impstrg.hxx>
@@ -104,18 +103,6 @@ ByteString ByteString::CreateFromInt32( sal_Int32 n, sal_Int16 nRadix )
// -----------------------------------------------------------------------
-namespace
-{
- struct theEmpty : public rtl::Static< const ByteString, theEmpty> {};
-}
-
-const ByteString& ByteString::EmptyString()
-{
- return theEmpty::get();
-}
-
-// -----------------------------------------------------------------------
-
sal_Int32 ByteString::ToInt32() const
{
DBG_CHKTHIS( ByteString, DbgCheckByteString );
commit 225af9156d0a89fd30c5045c5a854fd13f5a903f
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Jul 10 21:52:25 2011 +0100
callcatcher: unused methods
diff --git a/svtools/inc/svtools/unitconv.hxx b/svtools/inc/svtools/unitconv.hxx
index 5f5454b..1f5bf0d 100644
--- a/svtools/inc/svtools/unitconv.hxx
+++ b/svtools/inc/svtools/unitconv.hxx
@@ -52,9 +52,6 @@ SVT_DLLPUBLIC long ControlToItem( long nIn, SfxFieldUnit eCtrl, SfxMapUnit eIte
SVT_DLLPUBLIC FieldUnit MapToFieldUnit( const SfxMapUnit eUnit );
-SVT_DLLPUBLIC long ConvertValueToMap( long nVal, SfxMapUnit eUnit );
-SVT_DLLPUBLIC long ConvertValueToUnit( long nVal, SfxMapUnit eUnit );
-
SVT_DLLPUBLIC void SetMetricValue( MetricField& rField, long lCoreValue, SfxMapUnit eUnit );
SVT_DLLPUBLIC long GetCoreValue( const MetricField& rField, SfxMapUnit eUnit );
diff --git a/svtools/source/misc/unitconv.cxx b/svtools/source/misc/unitconv.cxx
index 3f4e30a..248fc72 100644
--- a/svtools/source/misc/unitconv.cxx
+++ b/svtools/source/misc/unitconv.cxx
@@ -293,57 +293,6 @@ FieldUnit MapToFieldUnit( const SfxMapUnit eUnit )
// -----------------------------------------------------------------------
-long ConvertValueToMap( long nVal, SfxMapUnit eUnit )
-{
- long nNew = nVal;
-
- switch ( eUnit )
- {
- case SFX_MAPUNIT_10TH_MM:
- case SFX_MAPUNIT_10TH_INCH:
- nNew *= 10;
- break;
-
- case SFX_MAPUNIT_100TH_MM:
- case SFX_MAPUNIT_100TH_INCH:
- nNew *= 100;
- break;
-
- case SFX_MAPUNIT_1000TH_INCH:
- nNew *= 1000;
- default: ;//prevent warning
- }
- return nNew;
-}
-
-// -----------------------------------------------------------------------
-
-long ConvertValueToUnit( long nVal, SfxMapUnit eUnit )
-{
- long nNew = nVal;
-
- switch ( eUnit )
- {
- case SFX_MAPUNIT_10TH_MM:
- case SFX_MAPUNIT_10TH_INCH:
- nNew /= 10;
- break;
-
- case SFX_MAPUNIT_100TH_MM:
- case SFX_MAPUNIT_100TH_INCH:
- nNew /= 100;
- break;
-
- case SFX_MAPUNIT_1000TH_INCH:
- nNew /= 1000;
- break;
- default: ;//prevent warning
- }
- return nNew;
-}
-
-// -----------------------------------------------------------------------
-
long CalcToPoint( long nIn, SfxMapUnit eUnit, sal_uInt16 nFaktor )
{
DBG_ASSERT( eUnit == SFX_MAPUNIT_TWIP ||
commit 2a94096ffd3a58210c341d0fe43bdd489b152d07
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Jul 10 21:51:12 2011 +0100
callcatcher: unused FieldToMapUnit
diff --git a/svtools/inc/svtools/unitconv.hxx b/svtools/inc/svtools/unitconv.hxx
index e6d43e1..5f5454b 100644
--- a/svtools/inc/svtools/unitconv.hxx
+++ b/svtools/inc/svtools/unitconv.hxx
@@ -51,7 +51,6 @@ SVT_DLLPUBLIC long ItemToControl( long nIn, SfxMapUnit eItem, SfxFieldUnit eCtr
SVT_DLLPUBLIC long ControlToItem( long nIn, SfxFieldUnit eCtrl, SfxMapUnit eItem );
SVT_DLLPUBLIC FieldUnit MapToFieldUnit( const SfxMapUnit eUnit );
-SVT_DLLPUBLIC MapUnit FieldToMapUnit( const SfxFieldUnit eUnit );
SVT_DLLPUBLIC long ConvertValueToMap( long nVal, SfxMapUnit eUnit );
SVT_DLLPUBLIC long ConvertValueToUnit( long nVal, SfxMapUnit eUnit );
diff --git a/svtools/source/misc/unitconv.cxx b/svtools/source/misc/unitconv.cxx
index b5aa764..3f4e30a 100644
--- a/svtools/source/misc/unitconv.cxx
+++ b/svtools/source/misc/unitconv.cxx
@@ -293,13 +293,6 @@ FieldUnit MapToFieldUnit( const SfxMapUnit eUnit )
// -----------------------------------------------------------------------
-MapUnit FieldToMapUnit( const SfxFieldUnit /*eUnit*/ )
-{
- return MAP_APPFONT;
-}
-
-// -----------------------------------------------------------------------
-
long ConvertValueToMap( long nVal, SfxMapUnit eUnit )
{
long nNew = nVal;
commit 8312be3b317acf78dd7d9ccda2a3e75fa12cbddb
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Jul 10 21:43:54 2011 +0100
callcatcher: unused ImpATan2
diff --git a/svtools/source/dialogs/mcvmath.cxx b/svtools/source/dialogs/mcvmath.cxx
index 5d69559..d3199e5 100644
--- a/svtools/source/dialogs/mcvmath.cxx
+++ b/svtools/source/dialogs/mcvmath.cxx
@@ -207,26 +207,4 @@ static sal_uInt16 ImpATanx2( const Fix& rX, const Fix& rY )
return phi0+phi;
}
-/**************************************************************************
-|*
-|* ImpATan2()
-|*
-|* Beschreibung ATAN-Funktion fuer FixPoint-Berechnungen
-|*
-**************************************************************************/
-
-sal_uInt16 ImpATan2( const short x, const short y )
-{
- Fix rRad = ImpSqrt(sal_uLong(long(x)*x+long(y)*y));
-
- if ( !rRad.x )
- return 0;
- Fix fx = x;
- fx.DivBig( rRad ); // Normiere auf Einheitskreis
- Fix fy = y;
- fy.DivBig( rRad );
-
- return ImpATanx2( fx, fy );
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svtools/source/dialogs/mcvmath.hxx b/svtools/source/dialogs/mcvmath.hxx
index 9df276d..007aaf9 100644
--- a/svtools/source/dialogs/mcvmath.hxx
+++ b/svtools/source/dialogs/mcvmath.hxx
@@ -215,7 +215,6 @@ inline FixCpx operator/ ( const FixCpx& a, const FixCpx& b )
Fix ImpMultBig2( const Fix& a, const Fix& b );
sal_uInt16 ImpSqrt( sal_uLong nRadi );
-sal_uInt16 ImpATan2( const short x, const short y );
FixCpx ImpExPI( sal_uInt16 nPhi );
#endif // _MCVMATH_HXX
commit cd0e6208a63dd6f904ea88f13110bd21dabd5776
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Jul 10 01:44:45 2011 +0100
callcatcher: [Byte|UniString]::SearchCharBackward unused
diff --git a/tools/inc/impstrg.hxx b/tools/inc/impstrg.hxx
index 5a78436..e6aaff4 100644
--- a/tools/inc/impstrg.hxx
+++ b/tools/inc/impstrg.hxx
@@ -46,12 +46,6 @@ const char* DbgCheckUniString( const void* pString );
xub_StrLen ImplStringLen( const sal_Char* pStr );
xub_StrLen ImplStringLen( const sal_Unicode* pStr );
-// ------------------------------------
-// - Zugriff fuer International class -
-// ------------------------------------
-
-sal_Unicode* ImplGet1ByteUnicodeTab( rtl_TextEncoding eTextEncoding );
-
#endif // _IMPSTRG_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/tools/inc/tools/string.hxx b/tools/inc/tools/string.hxx
index 2e745bd..20044e0 100644
--- a/tools/inc/tools/string.hxx
+++ b/tools/inc/tools/string.hxx
@@ -315,7 +315,6 @@ public:
xub_StrLen Search( const sal_Char* pCharStr, xub_StrLen nIndex = 0 ) const;
xub_StrLen SearchBackward( sal_Char c, xub_StrLen nIndex = STRING_LEN ) const;
xub_StrLen SearchChar( const sal_Char* pChars, xub_StrLen nIndex = 0 ) const;
- xub_StrLen SearchCharBackward( const sal_Char* pChars, xub_StrLen nIndex = STRING_LEN ) const;
xub_StrLen SearchAndReplace( sal_Char c, sal_Char cRep, xub_StrLen nIndex = 0 );
xub_StrLen SearchAndReplace( const ByteString& rStr, const ByteString& rRepStr,
@@ -608,7 +607,6 @@ public:
xub_StrLen SearchAscii( const sal_Char* pAsciiStr, xub_StrLen nIndex = 0 ) const;
xub_StrLen SearchBackward( sal_Unicode c, xub_StrLen nIndex = STRING_LEN ) const;
xub_StrLen SearchChar( const sal_Unicode* pChars, xub_StrLen nIndex = 0 ) const;
- xub_StrLen SearchCharBackward( const sal_Unicode* pChars, xub_StrLen nIndex = STRING_LEN ) const;
xub_StrLen SearchAndReplace( sal_Unicode c, sal_Unicode cRep,
xub_StrLen nIndex = 0 );
diff --git a/tools/source/string/strcvt.cxx b/tools/source/string/strcvt.cxx
index efaea88..741886e 100644
--- a/tools/source/string/strcvt.cxx
+++ b/tools/source/string/strcvt.cxx
@@ -169,61 +169,6 @@ struct Impl1ByteConvertTabData
Impl1ByteConvertTabData* mpNext;
};
-// =======================================================================
-
-sal_Unicode* ImplGet1ByteUnicodeTab( rtl_TextEncoding eTextEncoding )
-{
-#ifndef BOOTSTRAP
- TOOLSINDATA* pToolsData = ImplGetToolsInData();
-#else
- TOOLSINDATA* pToolsData = 0x0;
-#endif
- Impl1ByteUnicodeTabData* pTab = pToolsData->mpFirstUniTabData;
-
- while ( pTab )
- {
- if ( pTab->meTextEncoding == eTextEncoding )
- return pTab->maUniTab;
- pTab = pTab->mpNext;
- }
-
- // get TextEncodingInfo
- rtl_TextEncodingInfo aTextEncInfo;
- aTextEncInfo.StructSize = sizeof( aTextEncInfo );
- rtl_getTextEncodingInfo( eTextEncoding, &aTextEncInfo );
-
- if ( aTextEncInfo.MaximumCharSize == 1 )
- {
- pTab = new Impl1ByteUnicodeTabData;
- pTab->meTextEncoding = eTextEncoding;
- pTab->mpNext = pToolsData->mpFirstUniTabData;
-
- rtl_TextToUnicodeConverter hConverter;
- sal_uInt32 nInfo;
- sal_Size nSrcBytes;
- sal_Size nDestChars;
- hConverter = rtl_createTextToUnicodeConverter( eTextEncoding );
- nDestChars = rtl_convertTextToUnicode( hConverter, 0,
- (const sal_Char*)aImplByteTab, 256,
- pTab->maUniTab, 256,
- RTL_TEXTTOUNICODE_FLAGS_UNDEFINED_MAPTOPRIVATE |
- RTL_TEXTTOUNICODE_FLAGS_MBUNDEFINED_DEFAULT |
- RTL_TEXTTOUNICODE_FLAGS_INVALID_DEFAULT,
- &nInfo, &nSrcBytes );
- rtl_destroyTextToUnicodeConverter( hConverter );
-
- if ( (nSrcBytes != 256) || (nDestChars != 256) )
- delete pTab;
- else
- {
- pToolsData->mpFirstUniTabData = pTab;
- return pTab->maUniTab;
- }
- }
-
- return NULL;
-}
-
// -----------------------------------------------------------------------
static sal_uChar* ImplGet1ByteConvertTab( rtl_TextEncoding eSrcTextEncoding,
diff --git a/tools/source/string/strimp.cxx b/tools/source/string/strimp.cxx
index a758830..b01811f 100644
--- a/tools/source/string/strimp.cxx
+++ b/tools/source/string/strimp.cxx
@@ -1668,36 +1668,6 @@ xub_StrLen STRING::SearchChar( const STRCODE* pChars, xub_StrLen nIndex ) const
// -----------------------------------------------------------------------
-xub_StrLen STRING::SearchCharBackward( const STRCODE* pChars, xub_StrLen nIndex ) const
-{
- DBG_CHKTHIS( STRING, DBGCHECKSTRING );
-
- if ( nIndex > mpData->mnLen )
- nIndex = (xub_StrLen)mpData->mnLen;
-
- const STRCODE* pStr = mpData->maStr;
- pStr += nIndex;
-
- while ( nIndex )
- {
- nIndex--;
- pStr--;
-
- STRCODE c =*pStr;
- const STRCODE* pCompStr = pChars;
- while ( *pCompStr )
- {
- if ( *pCompStr == c )
- return nIndex;
- ++pCompStr;
- }
- }
-
- return STRING_NOTFOUND;
-}
-
-// -----------------------------------------------------------------------
-
xub_StrLen STRING::SearchAndReplace( STRCODE c, STRCODE cRep, xub_StrLen nIndex )
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
commit f5ddefd7254c1b7f18ef0eea8bf53c7b17592390
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Jul 10 01:43:53 2011 +0100
callcatcher: remove this unused ImpMultBig2 variant
diff --git a/svtools/source/dialogs/mcvmath.cxx b/svtools/source/dialogs/mcvmath.cxx
index 4337d2c..5d69559 100644
--- a/svtools/source/dialogs/mcvmath.cxx
+++ b/svtools/source/dialogs/mcvmath.cxx
@@ -71,23 +71,6 @@ Fix ImpMultBig2( const Fix& a, const Fix& b )
/**************************************************************************
|*
-|* ImpMultBig2()
-|*
-|* Beschreibung Multiplikation fuer FixPoint-Berechnungen
-|*
-**************************************************************************/
-
-// first parameter should be the bigger one
-
-FixCpx ImpMultBig2( const FixCpx& ra, const FixCpx& rb )
-{
- Fix rr = ImpMultBig2(ra.r,rb.r)-ImpMultBig2(ra.i,rb.i);
- Fix ii = ImpMultBig2(ra.r,rb.i)+ImpMultBig2(ra.i,rb.r);
- return FixCpx( rr,ii );
-}
-
-/**************************************************************************
-|*
|* ImpSqrt()
|*
|* Beschreibung Wurzelfunktion fuer FixPoint-Berechnungen
diff --git a/svtools/source/dialogs/mcvmath.hxx b/svtools/source/dialogs/mcvmath.hxx
index 597e547..9df276d 100644
--- a/svtools/source/dialogs/mcvmath.hxx
+++ b/svtools/source/dialogs/mcvmath.hxx
@@ -75,8 +75,6 @@ private:
friend class FixCpx;
friend class ColWheel;
-// friend Fix ImpMultBig2( const Fix& a, const Fix& b );
-
public:
long x;
@@ -122,8 +120,6 @@ public:
class FixCpx
{
-// friend FixCpx ImpMultBig2( const FixCpx& ra, const FixCpx& rb );
-
public:
Fix r;
Fix i;
@@ -217,7 +213,6 @@ inline FixCpx operator/ ( const FixCpx& a, const FixCpx& b )
// -----------------------------------------------------------------------
Fix ImpMultBig2( const Fix& a, const Fix& b );
-FixCpx ImpMultBig2( const FixCpx& ra, const FixCpx& rb );
sal_uInt16 ImpSqrt( sal_uLong nRadi );
sal_uInt16 ImpATan2( const short x, const short y );
commit 0d2ca2ed28caf9966d098db54ff0befe2ef8cc57
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Jul 10 01:12:33 2011 +0100
callcatcher: unused GetSchnittBit
diff --git a/svtools/source/filter/sgvtext.cxx b/svtools/source/filter/sgvtext.cxx
index 3409652..ed83389 100644
--- a/svtools/source/filter/sgvtext.cxx
+++ b/svtools/source/filter/sgvtext.cxx
@@ -288,32 +288,6 @@ UCHAR ConvertTextChar(UCHAR c)
return c;
}
-
-
-sal_uInt16 GetSchnittBit(UCHAR c)
-{
- sal_uInt16 r=0;
- switch (c) {
- case EscBold : r=TextBoldBit; break;
- case EscRSlnt: r=TextRSlnBit; break;
- case EscUndln: r=TextUndlBit; break;
- case EscStrik: r=TextStrkBit; break;
- case EscDbUnd: r=TextDbUnBit; break;
- case EscDbStk: r=TextDbStBit; break;
- case EscSupSc: r=TextSupSBit; break;
- case EscSubSc: r=TextSubSBit; break;
- case EscKaptF: r=TextKaptBit; break;
- case EscLSlnt: r=TextLSlnBit; break;
- case Esc2DShd: r=TextSh2DBit; break;
- case Esc3DShd: r=TextSh3DBit; break;
- case Esc4DShd: r=TextSh4DBit; break;
- case EscEbShd: r=TextShEbBit;
- }
- return r;
-}
-
-
-
long ChgValue(long Def, long Min, long Max, UCHAR FlgVal, long NumVal)
{
long r=0;
commit 49f1e4b8e476ac53ba6607e7eb94d9b18e3dfc05
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Jul 10 01:11:38 2011 +0100
callcatcher: GetAutofallback unused
diff --git a/vcl/inc/sallayout.hxx b/vcl/inc/sallayout.hxx
index 14eed12..01393b5 100644
--- a/vcl/inc/sallayout.hxx
+++ b/vcl/inc/sallayout.hxx
@@ -149,7 +149,6 @@ sal_UCS4 GetVerticalChar( sal_UCS4 );
// #i80090# GetMirroredChar also needed outside vcl, moved to svapp.hxx
// VCL_DLLPUBLIC sal_UCS4 GetMirroredChar( sal_UCS4 );
sal_UCS4 GetLocalizedChar( sal_UCS4, LanguageType );
-VCL_PLUGIN_PUBLIC const char* GetAutofallback( sal_UCS4 ) ;
// -------------
// - SalLayout -
diff --git a/vcl/source/gdi/sallayout.cxx b/vcl/source/gdi/sallayout.cxx
index a084ad3..e9aee36 100644
--- a/vcl/source/gdi/sallayout.cxx
+++ b/vcl/source/gdi/sallayout.cxx
@@ -159,91 +159,6 @@ VCL_DLLPUBLIC sal_UCS4 GetMirroredChar( sal_UCS4 nChar )
// -----------------------------------------------------------------------
-// Get simple approximations for unicodes
-const char* GetAutofallback( sal_UCS4 nChar )
-{
- const char* pStr = NULL;
- switch( nChar )
- {
- case 0x01C0:
- case 0x2223:
- case 0x2758:
- pStr = "|"; break;
- case 0x02DC:
- pStr = "~"; break;
- case 0x037E:
- pStr = ";"; break;
- case 0x2000:
- case 0x2001:
- case 0x2002:
- case 0x2003:
- case 0x2004:
- case 0x2005:
- case 0x2006:
- case 0x2007:
- case 0x2008:
- case 0x2009:
- case 0x200A:
- case 0x202F:
- pStr = " "; break;
- case 0x2010:
- case 0x2011:
- case 0x2012:
- case 0x2013:
- case 0x2014:
- pStr = "-"; break;
- case 0x2015:
- pStr = "--"; break;
- case 0x2016:
- pStr = "||"; break;
- case 0x2017:
- pStr = "_"; break;
- case 0x2018:
- case 0x2019:
- case 0x201B:
- pStr = "\'"; break;
- case 0x201A:
- pStr = ","; break;
- case 0x201C:
- case 0x201D:
- case 0x201E:
- case 0x201F:
- case 0x2033:
- pStr = "\""; break;
- case 0x2039:
- pStr = "<"; break;
- case 0x203A:
- pStr = ">"; break;
- case 0x203C:
- pStr = "!!"; break;
- case 0x203D:
- pStr = "?"; break;
- case 0x2044:
- case 0x2215:
- pStr = "/"; break;
- case 0x2048:
- pStr = "?!"; break;
- case 0x2049:
- pStr = "!?"; break;
- case 0x2216:
- pStr = "\\"; break;
- case 0x2217:
- pStr = "*"; break;
- case 0x2236:
- pStr = ":"; break;
- case 0x2264:
- pStr = "<="; break;
- case 0x2265:
- pStr = "<="; break;
- case 0x2303:
- pStr = "^"; break;
- }
-
- return pStr;
-}
-
-// -----------------------------------------------------------------------
-
sal_UCS4 GetLocalizedChar( sal_UCS4 nChar, LanguageType eLang )
{
// currently only conversion from ASCII digits is interesting
commit eef1eded6b2d30db047f08c46914b519aa63ced6
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Jul 10 01:04:01 2011 +0100
remove unused and archaic ImpCartToPolar
diff --git a/svtools/source/dialogs/mcvmath.cxx b/svtools/source/dialogs/mcvmath.cxx
index ece26a2..4337d2c 100644
--- a/svtools/source/dialogs/mcvmath.cxx
+++ b/svtools/source/dialogs/mcvmath.cxx
@@ -246,29 +246,4 @@ sal_uInt16 ImpATan2( const short x, const short y )
return ImpATanx2( fx, fy );
}
-/**************************************************************************
-|*
-|* ImpCartToPolar()
-|*
-|* Beschreibung Koordinaaten-Wandlung
-|*
-**************************************************************************/
-
-void ImpCartToPolar( const short x, const short y, Fix& rRad, sal_uInt16& rPhi )
-{
- rRad = Fix( ImpSqrt( sal_uLong( long(x)*x+long(y)*y ) ) );
-
- if ( !rRad.x )
- rPhi=0;
- else
- {
- // Normiere auf Einheitskreis
- Fix fx = x;
- fx.DivBig(rRad);
- Fix fy = y;
- fy.DivBig(rRad);
- rPhi = ImpATanx2(fx, fy);
- }
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svtools/source/dialogs/mcvmath.hxx b/svtools/source/dialogs/mcvmath.hxx
index d8c1141..597e547 100644
--- a/svtools/source/dialogs/mcvmath.hxx
+++ b/svtools/source/dialogs/mcvmath.hxx
@@ -219,7 +219,6 @@ inline FixCpx operator/ ( const FixCpx& a, const FixCpx& b )
Fix ImpMultBig2( const Fix& a, const Fix& b );
FixCpx ImpMultBig2( const FixCpx& ra, const FixCpx& rb );
-void ImpCartToPolar( const short x, const short y, Fix& rRad, sal_uInt16& rPhi );
sal_uInt16 ImpSqrt( sal_uLong nRadi );
sal_uInt16 ImpATan2( const short x, const short y );
FixCpx ImpExPI( sal_uInt16 nPhi );
commit 9a9c40921e4ca1e13bc2466e21688d4218ece4ca
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Jul 10 01:03:31 2011 +0100
remove unused and archaic ImpPolarToCart
diff --git a/svtools/source/dialogs/mcvmath.cxx b/svtools/source/dialogs/mcvmath.cxx
index d448f80..ece26a2 100644
--- a/svtools/source/dialogs/mcvmath.cxx
+++ b/svtools/source/dialogs/mcvmath.cxx
@@ -271,21 +271,4 @@ void ImpCartToPolar( const short x, const short y, Fix& rRad, sal_uInt16& rPhi )
}
}
-/**************************************************************************
-|*
-|* ImpPolarToCart()
-|*
-|* Beschreibung Koordinaaten-Wandlung
-|*
-**************************************************************************/
-
-void ImpPolarToCart( const Fix& rR, const sal_uInt16 Phi, short& rX, short& rY )
-{
- FixCpx fc = ImpExPI( Phi ); // calculate sin() & cos()
- fc.GetReal().MultBig( rR );
- rX = sal::static_int_cast< short >(long( fc.GetReal() ));
- fc.GetImag().MultBig( rR );
- rY = sal::static_int_cast< short >(long( fc.GetImag() ));
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svtools/source/dialogs/mcvmath.hxx b/svtools/source/dialogs/mcvmath.hxx
index 604a901..d8c1141 100644
--- a/svtools/source/dialogs/mcvmath.hxx
+++ b/svtools/source/dialogs/mcvmath.hxx
@@ -220,8 +220,6 @@ Fix ImpMultBig2( const Fix& a, const Fix& b );
FixCpx ImpMultBig2( const FixCpx& ra, const FixCpx& rb );
void ImpCartToPolar( const short x, const short y, Fix& rRad, sal_uInt16& rPhi );
-void ImpPolarToCart( const Fix& rR, const sal_uInt16 Phi, short& rX, short& rY );
-
sal_uInt16 ImpSqrt( sal_uLong nRadi );
sal_uInt16 ImpATan2( const short x, const short y );
FixCpx ImpExPI( sal_uInt16 nPhi );
diff --git a/svtools/source/filter/sgfbram.cxx b/svtools/source/filter/sgfbram.cxx
index 8559cbe..0ba3c5e 100644
--- a/svtools/source/filter/sgfbram.cxx
+++ b/svtools/source/filter/sgfbram.cxx
@@ -561,18 +561,6 @@ sal_Bool SgfVectFilter(SvStream& rInp, GDIMetaFile& rMtf)
return(bRet);
}
-
-/*************************************************************************
-|*
-|* SgfFilterPScr()
-|*
-*************************************************************************/
-sal_Bool SgfFilterPScr(SvStream&, SgfHeader&, SgfEntry&)
-{
- return sal_False; // PostSrcipt wird noch nicht unterstuetzt !
-}
-
-
/*************************************************************************
|*
|* CheckSgfTyp()
diff --git a/svtools/source/filter/sgvtext.cxx b/svtools/source/filter/sgvtext.cxx
index ddda27f..3409652 100644
--- a/svtools/source/filter/sgvtext.cxx
+++ b/svtools/source/filter/sgvtext.cxx
@@ -235,23 +235,7 @@ short hPoint2Sgf(short a)
return short(b);
}
-short Sgf2hPoint(short a)
-{
- long b;
- b=long(a)*5*144/(127*SgfDpmm);
- return short(b);
-}
-
// End of Misc.Pas
-/////////////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////////////
-
-
-
-/////////////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////////////
// AbsRead.Pas
// ======================================================================
commit 6bbfc4b47c03ccfef04857c69a5c45158d0e19bd
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Jul 10 00:51:32 2011 +0100
remove unused TraceBands
diff --git a/vcl/source/gdi/region.cxx b/vcl/source/gdi/region.cxx
index bf40a1e..7cd359e 100644
--- a/vcl/source/gdi/region.cxx
+++ b/vcl/source/gdi/region.cxx
@@ -382,34 +382,6 @@ const char* ImplDbgTestRegion( const void* pObj )
return NULL;
}
-void TraceBands (const ImplRegionBand* pFirstBand)
-{
- int nBandIndex (0);
- const ImplRegionBand* pBand = pFirstBand;
- while (pBand != NULL)
- {
- OSL_TRACE(" band %d %d->%d : ", nBandIndex++,
- pBand->mnYTop, pBand->mnYBottom);
-
- ImplRegionBandPoint* pPoint = pBand->mpFirstBandPoint;
- while (pPoint != NULL)
- {
- OSL_TRACE(" %d ", pPoint->mnX);
- pPoint = pPoint->mpNextBandPoint;
- }
- OSL_TRACE(" | ");
-
- ImplRegionBandSep* pSep = pBand->mpFirstSep;
- while (pSep != NULL)
- {
- OSL_TRACE(" %d->%d ", pSep->mnXLeft, pSep->mnXRight);
- pSep = pSep->mpNextSep;
- }
- OSL_TRACE("\n");
-
- pBand = pBand->mpNextBand;
- }
-}
#endif
// =======================================================================
commit 596ed7518e0a4911759cd67f62b90a6bd572225a
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Jul 10 00:49:15 2011 +0100
callcatcher: WriteWindowMetafile moved to binfilter long ago, remove this copy
diff --git a/svtools/inc/svtools/filter.hxx b/svtools/inc/svtools/filter.hxx
index d2d4688..3aae4a4 100644
--- a/svtools/inc/svtools/filter.hxx
+++ b/svtools/inc/svtools/filter.hxx
@@ -376,7 +376,6 @@ public:
// ------------------------------------
SVT_DLLPUBLIC sal_Bool ReadWindowMetafile( SvStream& rStream, GDIMetaFile& rMTF, FilterConfigItem* pConfigItem );
-SVT_DLLPUBLIC sal_Bool WriteWindowMetafile( SvStream& rStream, const GDIMetaFile& rMTF );
SVT_DLLPUBLIC sal_Bool WriteWindowMetafileBits( SvStream& rStream, const GDIMetaFile& rMTF );
#endif //_FILTER_HXX
diff --git a/svtools/inc/svtools/wmf.hxx b/svtools/inc/svtools/wmf.hxx
index 335e178..7020e61 100644
--- a/svtools/inc/svtools/wmf.hxx
+++ b/svtools/inc/svtools/wmf.hxx
@@ -63,8 +63,6 @@ SVT_DLLPUBLIC sal_Bool ConvertGDIMetaFileToWMF( const GDIMetaFile & rMTF, SvStre
sal_Bool ConvertGDIMetaFileToEMF( const GDIMetaFile & rMTF, SvStream & rTargetStream, FilterConfigItem* pConfigItem = NULL );
-SVT_DLLPUBLIC sal_Bool WriteWindowMetafile( SvStream& rStream, const GDIMetaFile& rMTF );
-
SVT_DLLPUBLIC sal_Bool WriteWindowMetafileBits( SvStream& rStream, const GDIMetaFile& rMTF );
#endif
diff --git a/svtools/source/filter/wmf/wmf.cxx b/svtools/source/filter/wmf/wmf.cxx
index 9b2a8ed..03923dd 100644
--- a/svtools/source/filter/wmf/wmf.cxx
+++ b/svtools/source/filter/wmf/wmf.cxx
@@ -102,13 +102,6 @@ sal_Bool ConvertGDIMetaFileToEMF( const GDIMetaFile & rMTF, SvStream & rTargetSt
// -----------------------------------------------------------------------------
-sal_Bool WriteWindowMetafile( SvStream& rStream, const GDIMetaFile& rMTF )
-{
- return WMFWriter().WriteWMF( rMTF, rStream, NULL );
-}
-
-// -----------------------------------------------------------------------------
-
sal_Bool WriteWindowMetafileBits( SvStream& rStream, const GDIMetaFile& rMTF )
{
return WMFWriter().WriteWMF( rMTF, rStream, NULL, sal_False );
commit 830bebd728dba0821c02b71ee3c408dbdac4a36f
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Jul 10 00:34:35 2011 +0100
callcatcher: unused listPositionAt
diff --git a/vcl/inc/list.h b/vcl/inc/list.h
index 2572573..c809126 100644
--- a/vcl/inc/list.h
+++ b/vcl/inc/list.h
@@ -66,8 +66,6 @@ extern "C"
int listAtLast(list);
int listPosition(list); /* Expensive! */
#endif
-/*- search */
- int listFind(list, void *); /* Returns true/false */
/*- positioning functions */
/*- return the number of elements by which the current position in the list changes */
diff --git a/vcl/source/fontsubset/list.c b/vcl/source/fontsubset/list.c
index 9396960..bcb9f3e 100644
--- a/vcl/source/fontsubset/list.c
+++ b/vcl/source/fontsubset/list.c
@@ -140,24 +140,6 @@ int listIsEmpty(list this)
return this->aCount == 0;
}
-int listFind(list this, void *el)
-{
- lnode *ptr;
- assert(this != 0);
-
- ptr = this->head;
-
- while (ptr) {
- if (ptr->value == el) {
- this->cptr = ptr;
- return 1;
- }
- ptr = ptr->next;
- }
-
- return 0;
-}
-
int listNext(list this)
{
return listSkipForward(this, 1);
commit aa1a4c97f78d369bc13a594e540ba1392e8d23e8
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Jul 10 00:34:00 2011 +0100
callcatcher: unused listPositionAt
diff --git a/vcl/inc/list.h b/vcl/inc/list.h
index 224bfe7..2572573 100644
--- a/vcl/inc/list.h
+++ b/vcl/inc/list.h
@@ -75,7 +75,6 @@ extern "C"
int listSkipForward(list, int n);
int listToFirst(list);
int listToLast(list);
- int listPositionAt(list, int n); /* Expensive! */
/*- adding and removing elements */
list listAppend(list, void *);
diff --git a/vcl/source/fontsubset/list.c b/vcl/source/fontsubset/list.c
index 38c7958..9396960 100644
--- a/vcl/source/fontsubset/list.c
+++ b/vcl/source/fontsubset/list.c
@@ -201,21 +201,6 @@ int listToLast(list this)
return 0;
}
-int listPositionAt(list this, int n) /*- returns the actual position number */
-{
- int m = 0;
- assert(this != 0);
-
- this->cptr = this->head;
- while (n != 0) {
- if (this->cptr->next == 0) break;
- this->cptr = this->cptr->next;
- n--;
- m++;
- }
- return m;
-}
-
list listAppend(list this, void *el)
{
assert(this != 0);
commit 30e915ceef2708a97eed2f369cde4237bede677d
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Jul 10 00:22:39 2011 +0100
callcatcher: remove unused GetTempNameBaseDirectory
diff --git a/tools/inc/tools/tempfile.hxx b/tools/inc/tools/tempfile.hxx
index da8a18b..3eec3e8 100644
--- a/tools/inc/tools/tempfile.hxx
+++ b/tools/inc/tools/tempfile.hxx
@@ -72,7 +72,6 @@ public:
// The argument must be a simple name, not a complete URL.
// The return value of both methods is the complete URL of the tempname base folder.
static String SetTempNameBaseDirectory( const String &rBaseName );
- static String GetTempNameBaseDirectory();
};
#endif
diff --git a/tools/source/fsys/tempfile.cxx b/tools/source/fsys/tempfile.cxx
index 36e06b0..bf558a8 100644
--- a/tools/source/fsys/tempfile.cxx
+++ b/tools/source/fsys/tempfile.cxx
@@ -289,15 +289,4 @@ String TempFile::SetTempNameBaseDirectory( const String &rBaseName )
return aTmp;
}
-String TempFile::GetTempNameBaseDirectory()
-{
- ::rtl::OUString& rTempNameBase_Impl = TempNameBase_Impl::get();
- if ( !rTempNameBase_Impl.getLength() )
- rTempNameBase_Impl = GetSystemTempDir_Impl();
-
- rtl::OUString aTmp;
- aTmp = rTempNameBase_Impl;
- return aTmp;
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 49db4056a642422335abe35a922a61851b3c3ea8
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Jul 10 00:21:52 2011 +0100
callcatcher: remove unused GetTempNameBaseDirectory
diff --git a/unotools/inc/unotools/tempfile.hxx b/unotools/inc/unotools/tempfile.hxx
index 377a88b..2580b63 100644
--- a/unotools/inc/unotools/tempfile.hxx
+++ b/unotools/inc/unotools/tempfile.hxx
@@ -154,7 +154,6 @@ public:
It is not a URL because alle URLs must be "UCB compatible", so there may be no suitable URL at all.
*/
static String SetTempNameBaseDirectory( const String &rBaseName );
- static String GetTempNameBaseDirectory();
};
}
diff --git a/unotools/source/ucbhelper/tempfile.cxx b/unotools/source/ucbhelper/tempfile.cxx
index 8c793e3..4274888 100644
--- a/unotools/source/ucbhelper/tempfile.cxx
+++ b/unotools/source/ucbhelper/tempfile.cxx
@@ -484,18 +484,6 @@ String TempFile::SetTempNameBaseDirectory( const String &rBaseName )
return aTmp;
}
-
-String TempFile::GetTempNameBaseDirectory()
-{
- const ::rtl::OUString &rTempNameBase_Impl = TempNameBase_Impl::get();
- if ( !rTempNameBase_Impl.getLength() )
- return String();
-
- rtl::OUString aTmp;
- FileBase::getSystemPathFromFileURL( rTempNameBase_Impl, aTmp );
- return aTmp;
-}
-
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit a4fa345f744886ea79e3ea716936b01e8722881b
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Jul 10 00:19:39 2011 +0100
callcatcher: remove unused hasReminderDateCome
diff --git a/unotools/inc/unotools/regoptions.hxx b/unotools/inc/unotools/regoptions.hxx
index b7dddca..1b14260 100644
--- a/unotools/inc/unotools/regoptions.hxx
+++ b/unotools/inc/unotools/regoptions.hxx
@@ -111,12 +111,6 @@ namespace utl
<p>If this method is called, the reminder for the dialog will be removed.
*/
void removeReminder();
-
- /** checks if the reminder date has come
-
- <p>Returns <true/> if the current date is greater or equal the reminder date.
- */
- bool hasReminderDateCome() const;
};
//........................................................................
diff --git a/unotools/source/config/regoptions.cxx b/unotools/source/config/regoptions.cxx
index 7d89c71..1d52475 100644
--- a/unotools/source/config/regoptions.cxx
+++ b/unotools/source/config/regoptions.cxx
@@ -189,7 +189,6 @@ namespace utl
void markSessionDone( );
void activateReminder( sal_Int32 _nDaysFromNow );
void removeReminder();
- bool hasReminderDateCome() const;
};
//--------------------------------------------------------------------
@@ -383,48 +382,6 @@ namespace utl
}
//--------------------------------------------------------------------
- bool RegOptionsImpl::hasReminderDateCome() const
- {
- bool bRet = false;
- sal_Int32 nDate = 0;
- ::rtl::OUString sDate;
- m_aRegistrationNode.getNodeValue( lcl_getReminderDateName() ) >>= sDate;
- if ( sDate.getLength() )
- {
- if ( sDate.indexOf( lcl_getPatchName() ) == 0)
- {
- if (sDate.equals( lcl_getPatchName() ))
- bRet = true;
- else if (sDate.getLength() > lcl_getPatchName().getLength() )
- {
- // Check the build ID to determine if the registration
- // dialog needs to be shown.
- sal_Int32 nBuildId = getBuildId();
- ::rtl::OUString aStoredBuildId( sDate.copy(lcl_getPatchName().getLength()));
-
- // remind if the current build ID is not the same as the stored one
- if ( nBuildId != aStoredBuildId.toInt32() )
- bRet = true;
- }
- }
- else
- {
- nDate = lcl_convertString2Date( sDate );
- if ( nDate > 0 )
- {
- Date aReminderDate;
- aReminderDate.SetDate( nDate );
- bRet = aReminderDate <= Date();
- }
- }
- }
- else
- bRet = true;
-
- return bRet;
- }
-
- //--------------------------------------------------------------------
void RegOptionsImpl::markSessionDone( )
{
OSL_ENSURE( !s_bThisSessionDone, "RegOptionsImpl::markSessionDone: already marked!" );
@@ -533,14 +490,6 @@ namespace utl
const_cast< RegOptions* >( this )->ensureImpl( );
m_pImpl->removeReminder();
}
-
- //--------------------------------------------------------------------
- bool RegOptions::hasReminderDateCome() const
- {
- const_cast< RegOptions* >( this )->ensureImpl( );
- return m_pImpl->hasReminderDateCome();
- }
-
//........................................................................
} // namespace utl
//........................................................................
commit cec1e10c58ce29352368f8324cd664d091094e05
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Jul 10 00:15:19 2011 +0100
callcatcher: remove unused PIList* methods
diff --git a/svtools/inc/svtools/helpopt.hxx b/svtools/inc/svtools/helpopt.hxx
index 3b62a95..bd265fa 100644
--- a/svtools/inc/svtools/helpopt.hxx
+++ b/svtools/inc/svtools/helpopt.hxx
@@ -85,10 +85,6 @@ public:
void SetWelcomeScreen( sal_Bool b );
sal_Bool IsWelcomeScreen() const;
- IdList* GetPIStarterList();
- void AddToPIStarterList( sal_Int32 nId );
- void RemoveFromPIStarterList( sal_Int32 nId );
-
String GetLocale() const;
String GetSystem() const;
};
diff --git a/svtools/source/config/helpopt.cxx b/svtools/source/config/helpopt.cxx
index 2e7d29f..aacb0a3 100644
--- a/svtools/source/config/helpopt.cxx
+++ b/svtools/source/config/helpopt.cxx
@@ -62,7 +62,6 @@ static sal_Int32 nRefCount = 0;
class SvtHelpOptions_Impl : public utl::ConfigItem
{
- IdList* pList;
sal_Int32 nHelpAgentTimeoutPeriod;
sal_Int32 nHelpAgentRetryLimit;
sal_Bool bExtendedHelp;
@@ -105,9 +104,6 @@ public:
void SetWelcomeScreen( sal_Bool b ) { bWelcomeScreen = b; SetModified(); }
sal_Bool IsWelcomeScreen() const { return bWelcomeScreen; }
- IdList* GetPIStarterList() { return pList; }
- void AddToPIStarterList( sal_Int32 nId );
- void RemoveFromPIStarterList( sal_Int32 nId );
String GetLocale() const { return aLocale; }
String GetSystem() const { return aSystem; }
@@ -168,7 +164,6 @@ Sequence< OUString > SvtHelpOptions_Impl::GetPropertyNames()
SvtHelpOptions_Impl::SvtHelpOptions_Impl()
: ConfigItem( OUString( RTL_CONSTASCII_USTRINGPARAM( "Office.Common/Help" )) )
- , pList( 0 )
, bExtendedHelp( sal_False )
, bHelpTips( sal_True )
, bHelpAgentEnabled( sal_False )
@@ -733,19 +728,6 @@ sal_Bool SvtHelpOptions::IsWelcomeScreen() const
return pImp->IsWelcomeScreen();
}
-IdList* SvtHelpOptions::GetPIStarterList()
-{
- return pImp->GetPIStarterList();
-}
-
-void SvtHelpOptions::AddToPIStarterList( sal_Int32 )
-{
-}
-
-void SvtHelpOptions::RemoveFromPIStarterList( sal_Int32 )
-{
-}
-
String SvtHelpOptions::GetLocale() const
{
return pImp->GetLocale();
commit 6f966b093ce50d7f6105a550995f42cb2e0682d6
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Jul 10 00:11:35 2011 +0100
callcatcher: remove unused setGrad* methods
diff --git a/vcl/inc/vcl/graphictools.hxx b/vcl/inc/vcl/graphictools.hxx
index 5ace72c..dca34fa 100644
--- a/vcl/inc/vcl/graphictools.hxx
+++ b/vcl/inc/vcl/graphictools.hxx
@@ -424,18 +424,6 @@ public:
void setHatchType ( HatchType aHatchType );
/// Set color used for drawing the hatch
void setHatchColor ( Color aHatchColor );
- /// Set type of gradient used
- void setGradientType ( GradientType aGradType );
- /// Set start color of the gradient
- void setGradient1stColor ( Color aColor );
- /// Set end color of the gradient
- void setGradient2ndColor ( Color aColor );
- /** Set the numbers of steps to render the gradient.
-
- @param aCount
- The step count. gradientStepsInfinite means use infinitely many.
- */
- void setGradientStepCount( int aCount );
/// Set the texture graphic used
void setGraphic ( const Graphic& rGraphic );
diff --git a/vcl/source/gdi/graphictools.cxx b/vcl/source/gdi/graphictools.cxx
index 51e6d0d..d683311 100644
--- a/vcl/source/gdi/graphictools.cxx
+++ b/vcl/source/gdi/graphictools.cxx
@@ -675,26 +675,6 @@ void SvtGraphicFill::setHatchColor( Color aHatchColor )
maHatchColor = aHatchColor;
}
-void SvtGraphicFill::setGradientType( GradientType aGradType )
-{
- maGradientType = aGradType;
-}
-
-void SvtGraphicFill::setGradient1stColor( Color aColor )
-{
- maGradient1stColor = aColor;
-}
-
-void SvtGraphicFill::setGradient2ndColor( Color aColor )
-{
- maGradient2ndColor = aColor;
-}
-
-void SvtGraphicFill::setGradientStepCount( int aCount )
-{
- maGradientStepCount = aCount;
-}
-
void SvtGraphicFill::setGraphic( const Graphic& rGraphic )
{
maFillGraphic = rGraphic;
commit fa2b65aff3a4d243e6d47ffb83db262a6698e644
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Jul 10 00:08:28 2011 +0100
callcatcher: remove unused createRFC822Mailbox
diff --git a/svl/inc/svl/adrparse.hxx b/svl/inc/svl/adrparse.hxx
index dbb6718..e9f479a 100644
--- a/svl/inc/svl/adrparse.hxx
+++ b/svl/inc/svl/adrparse.hxx
@@ -67,28 +67,6 @@ public:
inline UniString const & GetEmailAddress(sal_Int32 nIndex) const;
inline UniString const &GetRealName(sal_Int32 nIndex) const;
-
- /** Create an RFC 822 <mailbox> (i.e., 'e-mail address').
-
- @param rPhrase Either an empty string (the <mailbox> will have no
- <phrase> an will be of the form <addr-spec>), or some text that will
- become the <phrase> part of a <phrase route-addr> form <mailbox>. Non
- US-ASCII characters within the text are put into a <qouted-string>
- verbatim, so the result may actually not be a valid RFC 822 <mailbox>,
- but a more human-readable representation.
-
- @param rAddrSpec A valid RFC 822 <addr-spec>. (An RFC 822 <mailbox>
- including a <route> cannot be created by this method.)
-
- @param rMailbox If this method returns true, this parameter returns
- the created RFC 822 <mailbox> (rather, a more human-readable
- representation thereof). Otherwise, this parameter is not modified.
-
- @return True, if rAddrSpec is a valid RFC 822 <addr-spec>.
- */
- static bool createRFC822Mailbox(String const & rPhrase,
- String const & rAddrSpec,
- String & rMailbox);
};
inline UniString const & SvAddressParser::GetEmailAddress(sal_Int32 nIndex)
diff --git a/svl/source/misc/adrparse.cxx b/svl/source/misc/adrparse.cxx
index e0087aa..b6aa9d9 100644
--- a/svl/source/misc/adrparse.cxx
+++ b/svl/source/misc/adrparse.cxx
@@ -780,142 +780,4 @@ SvAddressParser::~SvAddressParser()
m_aRest.clear();
}
-//============================================================================
-// static
-bool SvAddressParser::createRFC822Mailbox(String const & rPhrase,
- String const & rAddrSpec,
- String & rMailbox)
-{
- String aTheAddrSpec;
- sal_Unicode const * p = rAddrSpec.GetBuffer();
- sal_Unicode const * pEnd = p + rAddrSpec.Len();
- {for (bool bSegment = false;;)
- {
- p = INetMIME::skipLinearWhiteSpaceComment(p, pEnd);
- if (p == pEnd)
- return false;
- if (bSegment)
- {
- sal_Unicode c = *p++;
- if (c == '@')
- break;
- else if (c != '.')
- return false;
- aTheAddrSpec += '.';
- p = INetMIME::skipLinearWhiteSpaceComment(p, pEnd);
- if (p == pEnd)
- return false;
- }
- else
- bSegment = true;
- if (*p == '"')
- {
- aTheAddrSpec += *p++;
- for (;;)
- {
- if (INetMIME::startsWithLineFolding(p, pEnd))
- p += 2;
- if (p == pEnd)
- return false;
- if (*p == '"')
- break;
- if (*p == '\x0D' || (*p == '\\' && ++p == pEnd)
- || !INetMIME::isUSASCII(*p))
- return false;
- if (INetMIME::needsQuotedStringEscape(*p))
- aTheAddrSpec += '\\';
- aTheAddrSpec += *p++;
- }
- aTheAddrSpec += *p++;
- }
- else if (INetMIME::isAtomChar(*p))
- while (p != pEnd && INetMIME::isAtomChar(*p))
- aTheAddrSpec += *p++;
- else
- return false;
- }}
- aTheAddrSpec += '@';
- {for (bool bSegment = false;;)
- {
- p = INetMIME::skipLinearWhiteSpaceComment(p, pEnd);
- if (p == pEnd)
- {
- if (bSegment)
- break;
- else
- return false;
- }
- if (bSegment)
- {
- if (*p++ != '.')
- return false;
- aTheAddrSpec += '.';
- p = INetMIME::skipLinearWhiteSpaceComment(p, pEnd);
- if (p == pEnd)
- return false;
- }
- else
- bSegment = true;
- if (*p == '[')
- {
- aTheAddrSpec += *p++;
- for (;;)
- {
- if (INetMIME::startsWithLineFolding(p, pEnd))
- p += 2;
- if (p == pEnd)
- return false;
- if (*p == ']')
- break;
- if (*p == '\x0D' || *p == '[' || (*p == '\\' && ++p == pEnd)
- || !INetMIME::isUSASCII(*p))
- return false;
- if (*p >= '[' && *p <= ']')
- aTheAddrSpec += '\\';
- aTheAddrSpec += *p++;
- }
- aTheAddrSpec += *p++;
- }
- else if (INetMIME::isAtomChar(*p))
- while (p != pEnd && INetMIME::isAtomChar(*p))
- aTheAddrSpec += *p++;
- else
- return false;
- }}
-
- if (rPhrase.Len() == 0)
- rMailbox = aTheAddrSpec;
- else
- {
- bool bQuotedString = false;
- p = rPhrase.GetBuffer();
- pEnd = p + rPhrase.Len();
- for (;p != pEnd; ++p)
- if (!(INetMIME::isAtomChar(*p)))
- {
- bQuotedString = true;
- break;
- }
- String aTheMailbox;
- if (bQuotedString)
- {
- aTheMailbox = '"';
- for (p = rPhrase.GetBuffer(); p != pEnd; ++p)
- {
- if (INetMIME::needsQuotedStringEscape(*p))
- aTheMailbox += '\\';
- aTheMailbox += *p;
- }
- aTheMailbox += '"';
- }
- else
- aTheMailbox = rPhrase;
- aTheMailbox.AppendAscii(RTL_CONSTASCII_STRINGPARAM(" <"));
- aTheMailbox += aTheAddrSpec;
- aTheMailbox += '>';
- rMailbox = aTheMailbox;
- }
- return true;
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 4ea17538b3c2349cb2f7cc64ee6382d55609bcef
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Jul 10 00:05:56 2011 +0100
callcatcher: remove unused IsHighContrastBlackAndWhite
diff --git a/vcl/inc/vcl/settings.hxx b/vcl/inc/vcl/settings.hxx
index c9c0b3a..e7f61f6 100644
--- a/vcl/inc/vcl/settings.hxx
+++ b/vcl/inc/vcl/settings.hxx
@@ -713,7 +713,6 @@ public:
{ CopyData(); mpData->mnHighContrast = bHighContrast; }
sal_Bool GetHighContrastMode() const
{ return (sal_Bool) mpData->mnHighContrast; }
- sal_Bool IsHighContrastBlackAndWhite() const;
void SetUseSystemUIFonts( sal_Bool bUseSystemUIFonts )
{ CopyData(); mpData->mnUseSystemUIFonts = bUseSystemUIFonts; }
sal_Bool GetUseSystemUIFonts() const
diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx
index 32fb928..3d35fb3 100644
--- a/vcl/source/app/settings.cxx
+++ b/vcl/source/app/settings.cxx
@@ -964,46 +964,6 @@ inline sal_Bool ImplIsBackOrWhite( const Color& rColor )
return ( nLuminance < 8 ) || ( nLuminance > 250 );
}
-sal_Bool StyleSettings::IsHighContrastBlackAndWhite() const
-{
- sal_Bool bBWOnly = sal_True;
-
- // Only use B&W if fully B&W, like on GNOME.
- // Some colors like CheckedColor and HighlightColor are not B&W in Windows Standard HC Black,
- // and we don't want to be B&W then, so check these color first, very probably not B&W.
-
- // Unfortunately, GNOME uses a very very dark color (0x000033) instead of BLACK (0x000000)
-
- if ( !ImplIsBackOrWhite( GetFaceColor() ) )
- bBWOnly = sal_False;
- else if ( !ImplIsBackOrWhite( GetHighlightTextColor() ) )
- bBWOnly = sal_False;
- else if ( !ImplIsBackOrWhite( GetWindowColor() ) )
- bBWOnly = sal_False;
- else if ( !ImplIsBackOrWhite( GetWindowTextColor() ) )
- bBWOnly = sal_False;
- else if ( !ImplIsBackOrWhite( GetButtonTextColor() ) )
- bBWOnly = sal_False;
- else if ( !ImplIsBackOrWhite( GetButtonTextColor() ) )
- bBWOnly = sal_False;
- else if ( !ImplIsBackOrWhite( GetGroupTextColor() ) )
- bBWOnly = sal_False;
- else if ( !ImplIsBackOrWhite( GetLabelTextColor() ) )
- bBWOnly = sal_False;
- else if ( !ImplIsBackOrWhite( GetDialogColor() ) )
- bBWOnly = sal_False;
- else if ( !ImplIsBackOrWhite( GetFieldColor() ) )
- bBWOnly = sal_False;
- else if ( !ImplIsBackOrWhite( GetMenuColor() ) )
- bBWOnly = sal_False;
- else if ( !ImplIsBackOrWhite( GetMenuBarColor() ) )
- bBWOnly = sal_False;
- else if ( !ImplIsBackOrWhite( GetMenuHighlightColor() ) )
- bBWOnly = sal_False;
-
- return bBWOnly;
-}
-
// -----------------------------------------------------------------------
sal_Bool StyleSettings::operator ==( const StyleSettings& rSet ) const
More information about the Libreoffice-commits
mailing list