[Libreoffice-commits] .: 8 commits - i18npool/inc i18npool/source l10ntools/source rsc/inc rsc/source sax/test sot/source svl/source svtools/source tools/inc tools/source
Caolán McNamara
caolan at kemper.freedesktop.org
Wed Jul 13 02:27:27 PDT 2011
i18npool/inc/i18npool/mslangid.hxx | 34 ------------
i18npool/source/isolang/mslangid.cxx | 31 -----------
l10ntools/source/localize.cxx | 96 -----------------------------------
rsc/inc/rscdb.hxx | 1
rsc/inc/rscdef.hxx | 6 --
rsc/source/parser/rscdb.cxx | 9 ---
rsc/source/tools/rscdef.cxx | 77 ----------------------------
sax/test/testcomponent.cxx | 13 ++--
sot/source/sdstor/ucbstorage.cxx | 3 -
svl/source/misc/inethist.cxx | 19 ------
svtools/source/contnr/fileview.cxx | 14 -----
tools/inc/tools/string.hxx | 2
tools/source/string/strimp.cxx | 30 ----------
tools/source/string/tustring.cxx | 30 ++++++++++
14 files changed, 41 insertions(+), 324 deletions(-)
New commits:
commit c6684f711a3e65f57e4172775431ba0dfbf2d1ed
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Jul 13 00:49:10 2011 +0100
init against short reads
diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx
index 67b033c..dfc5024 100644
--- a/sot/source/sdstor/ucbstorage.cxx
+++ b/sot/source/sdstor/ucbstorage.cxx
@@ -3266,7 +3266,7 @@ sal_Bool UCBStorage::IsStorageFile( SvStream* pFile )
return sal_False;
pFile->Seek(0);
- sal_uInt32 nBytes;
+ sal_uInt32 nBytes(0);
*pFile >> nBytes;
// search for the magic bytes
@@ -3277,6 +3277,7 @@ sal_Bool UCBStorage::IsStorageFile( SvStream* pFile )
bRet = ( nBytes == 0x08074b50 );
if ( bRet )
{
+ nBytes = 0;
*pFile >> nBytes;
bRet = ( nBytes == 0x04034b50 );
}
commit 3f15b9171fb0e4dc87cc5824fc482b1c479f0a15
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jul 12 21:21:23 2011 +0100
callcatcher: ByteString::CompareIgnoreCaseToAscii unused, shrink api
diff --git a/tools/inc/tools/string.hxx b/tools/inc/tools/string.hxx
index a47802a..753b6ef 100644
--- a/tools/inc/tools/string.hxx
+++ b/tools/inc/tools/string.hxx
@@ -286,8 +286,6 @@ public:
xub_StrLen nLen = STRING_LEN ) const;
StringCompare CompareTo( const sal_Char* pCharStr,
xub_StrLen nLen = STRING_LEN ) const;
- StringCompare CompareIgnoreCaseToAscii( const ByteString& rStr,
- xub_StrLen nLen = STRING_LEN ) const;
StringCompare CompareIgnoreCaseToAscii( const sal_Char* pCharStr,
xub_StrLen nLen = STRING_LEN ) const;
sal_Bool Equals( const ByteString& rStr ) const;
diff --git a/tools/source/string/strimp.cxx b/tools/source/string/strimp.cxx
index 4dde7f9..f244d82 100644
--- a/tools/source/string/strimp.cxx
+++ b/tools/source/string/strimp.cxx
@@ -1209,36 +1209,6 @@ StringCompare STRING::CompareTo( const STRCODE* pCharStr, xub_StrLen nLen ) cons
// -----------------------------------------------------------------------
-StringCompare STRING::CompareIgnoreCaseToAscii( const STRING& rStr,
- xub_StrLen nLen ) const
-{
- DBG_CHKTHIS( STRING, DBGCHECKSTRING );
- DBG_CHKOBJ( &rStr, STRING, DBGCHECKSTRING );
-
- // Auf Gleichheit der Pointer testen
- if ( mpData == rStr.mpData )
- return COMPARE_EQUAL;
-
- // Maximale Laenge ermitteln
- if ( mpData->mnLen < nLen )
- nLen = static_cast< xub_StrLen >(mpData->mnLen+1);
- if ( rStr.mpData->mnLen < nLen )
- nLen = static_cast< xub_StrLen >(rStr.mpData->mnLen+1);
-
- // String vergleichen
- sal_Int32 nCompare = ImplStringICompareWithoutZero( mpData->maStr, rStr.mpData->maStr, 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
{
diff --git a/tools/source/string/tustring.cxx b/tools/source/string/tustring.cxx
index 923f606..2868e2c 100644
--- a/tools/source/string/tustring.cxx
+++ b/tools/source/string/tustring.cxx
@@ -471,4 +471,34 @@ sal_Bool STRING::EqualsIgnoreCaseAscii( const STRCODE* pCharStr, xub_StrLen nInd
return (ImplStringICompare( mpData->maStr+nIndex, pCharStr, nLen ) == 0);
}
+// -----------------------------------------------------------------------
+
+StringCompare STRING::CompareIgnoreCaseToAscii( const STRING& rStr,
+ xub_StrLen nLen ) const
+{
+ DBG_CHKTHIS( STRING, DBGCHECKSTRING );
+ DBG_CHKOBJ( &rStr, STRING, DBGCHECKSTRING );
+
+ // Auf Gleichheit der Pointer testen
+ if ( mpData == rStr.mpData )
+ return COMPARE_EQUAL;
+
+ // Maximale Laenge ermitteln
+ if ( mpData->mnLen < nLen )
+ nLen = static_cast< xub_StrLen >(mpData->mnLen+1);
+ if ( rStr.mpData->mnLen < nLen )
+ nLen = static_cast< xub_StrLen >(rStr.mpData->mnLen+1);
+
+ // String vergleichen
+ sal_Int32 nCompare = ImplStringICompareWithoutZero( mpData->maStr, rStr.mpData->maStr, nLen );
+
+ // Rueckgabewert anpassen
+ if ( nCompare == 0 )
+ return COMPARE_EQUAL;
+ else if ( nCompare < 0 )
+ return COMPARE_LESS;
+ else
+ return COMPARE_GREATER;
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 6df8e05dd151b9bb2780ea3fd106198738ebbd10
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jul 12 21:16:08 2011 +0100
callcatcher: unused methods
diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx
index 6a511bd..e8f6f9c 100644
--- a/svtools/source/contnr/fileview.cxx
+++ b/svtools/source/contnr/fileview.cxx
@@ -496,15 +496,12 @@ class NameTranslator_Impl : public ::svt::IContentTitleTranslation
private:
NameTranslationList* mpActFolder;
public:
- NameTranslator_Impl( void );
NameTranslator_Impl( const INetURLObject& rActualFolder );
virtual ~NameTranslator_Impl();
// IContentTitleTranslation
virtual sal_Bool GetTranslation( const OUString& rOriginalName, OUString& rTranslatedName ) const;
- void UpdateTranslationTable(); // reads the translation file again
-
void SetActualFolder( const INetURLObject& rActualFolder );
const String* GetTransTableFileName() const;
// returns the name for the file, which contains the translation strings
@@ -1810,11 +1807,6 @@ void SvtFileView::StateChanged( StateChangedType nStateChange )
// class NameTranslator_Impl
// -----------------------------------------------------------------------
-NameTranslator_Impl::NameTranslator_Impl( void ) :
- mpActFolder( NULL )
-{
-}
-
NameTranslator_Impl::NameTranslator_Impl( const INetURLObject& rActualFolder )
{
mpActFolder = new NameTranslationList( rActualFolder );
@@ -1826,12 +1818,6 @@ NameTranslator_Impl::~NameTranslator_Impl()
delete mpActFolder;
}
-void NameTranslator_Impl::UpdateTranslationTable()
-{
- if( mpActFolder )
- mpActFolder->Update();
-}
-
void NameTranslator_Impl::SetActualFolder( const INetURLObject& rActualFolder )
{
HashedEntry aActFolder( rActualFolder );
commit 398d59dd901f8b722173a9c2872181b441ff6bdf
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jul 12 21:14:33 2011 +0100
callcatcher: remove beautiful, but unused methods
diff --git a/i18npool/inc/i18npool/mslangid.hxx b/i18npool/inc/i18npool/mslangid.hxx
index 6e8384b..15fcd01 100644
--- a/i18npool/inc/i18npool/mslangid.hxx
+++ b/i18npool/inc/i18npool/mslangid.hxx
@@ -75,9 +75,7 @@ public:
special value.
@descr: NOTE: The "system" values may be overridden by the
- application's configuration. If you need to access the system
- values use <method>getRealLanguageWithoutConfig()</method>
- instead.
+ application's configuration.
@returns
case LANGUAGE_PROCESS_OR_USER_DEFAULT : configured or system language
@@ -154,13 +152,6 @@ public:
static ::com::sun::star::lang::Locale getFallbackLocale(
const ::com::sun::star::lang::Locale & rLocale );
-
- /** Get fall-back LanguageType for LanguageType, resolving LANGUAGE_SYSTEM.
- Returns the same LanguageType if an exact match was found.
- */
- static LanguageType getFallbackLanguage( LanguageType nLang );
-
-
// -----------------------------
// - ConvertLanguageToIsoNames -
// -----------------------------
@@ -187,29 +178,6 @@ public:
static LanguageType convertUnxByteStringToLanguage(
const rtl::OString& rString );
-
- /** @short: A real language/locale if the nLang parameter designates some
- special value.
-
- @descr: NOTE: This is a raw interface to the system and does not take
- any application configuration into account. If that is wanted,
- which is most likely, use <method>getRealLanguage()</method>
- instead.
-
- @returns
- case LANGUAGE_PROCESS_OR_USER_DEFAULT : getSystemLanguage()
- case LANGUAGE_SYSTEM_DEFAULT : getSystemLanguage()
- case LANGUAGE_SYSTEM : getSystemLanguage()
- case LANGUAGE_NONE : getSystemUILanguage()
- case LANGUAGE_DONTKNOW : LANGUAGE_ENGLISH_US
- else: nLang
-
- In case getSystemLanguage() or getSystemUILanguage() returned
- LANGUAGE_DONTKNOW, LANGUAGE_ENGLISH_US is returned instead.
- */
- static LanguageType getRealLanguageWithoutConfig( LanguageType nLang );
-
-
static LanguageType resolveSystemLanguageByScriptType( LanguageType nLang, sal_Int16 nType );
diff --git a/i18npool/source/isolang/mslangid.cxx b/i18npool/source/isolang/mslangid.cxx
index aa1397c..74838ba 100644
--- a/i18npool/source/isolang/mslangid.cxx
+++ b/i18npool/source/isolang/mslangid.cxx
@@ -90,29 +90,6 @@ inline LanguageType MsLangId::simplifySystemLanguages( LanguageType nLang )
return nLang;
}
-
-// static
-LanguageType MsLangId::getRealLanguageWithoutConfig( LanguageType nLang )
-{
- switch (simplifySystemLanguages( nLang))
- {
- case LANGUAGE_SYSTEM :
- nLang = getSystemLanguage();
- break;
- case LANGUAGE_NONE :
- nLang = getSystemUILanguage();
- break;
- default:
- /* TODO: would this be useful here? */
- //nLang = MsLangId::getReplacementForObsoleteLanguage( nLang);
- ; // nothing
- }
- if (nLang == LANGUAGE_DONTKNOW)
- nLang = LANGUAGE_ENGLISH_US;
- return nLang;
-}
-
-
// static
LanguageType MsLangId::getRealLanguage( LanguageType nLang )
{
@@ -252,14 +229,6 @@ LanguageType MsLangId::convertLocaleToLanguageWithFallback(
return lookupFallbackLocale( rLocale);
}
-
-// static
-LanguageType MsLangId::getFallbackLanguage( LanguageType nLang )
-{
- return lookupFallbackLanguage( MsLangId::getRealLanguage( nLang));
-}
-
-
// static
bool MsLangId::isRightToLeft( LanguageType nLang )
{
commit f61a73058783928ba1814ad142f64eed3d004a94
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jul 12 21:09:13 2011 +0100
callcatcher: strip l10ntools down by more unused methods
diff --git a/l10ntools/source/localize.cxx b/l10ntools/source/localize.cxx
index 66edfcd..4a992bb 100644
--- a/l10ntools/source/localize.cxx
+++ b/l10ntools/source/localize.cxx
@@ -204,7 +204,6 @@ private:
const ByteString &rCollectMode
);
void WorkOnDirectory( const ByteString &rDirectory );
- sal_Bool ExecuteMerge();
sal_Bool MergeSingleFile(
const ByteString &rPrj,
const ByteString &rFile,
@@ -699,101 +698,6 @@ sal_Bool SourceTreeLocalizer::MergeSingleFile(
}
return sal_True;
}
-/*****************************************************************************/
-sal_Bool SourceTreeLocalizer::ExecuteMerge( )
-/*****************************************************************************/
-{
- DirEntry aEntry( Export::GetTempFile());
- sal_Bool bReturn = sal_True;
- bool bMerged = false;
-
- ByteString sFileName;
- ByteString sCurFile;
- ByteString sLine;
- ByteString sFileKey;
-
- SvFileStream aFile;
-
- ByteString sOutputFileName = sOutputFile;
- ByteString sInpath(".");
- sInpath += Export::GetEnv("INPATH");
- ByteString sBlank("");
-
- sOutputFileName.SearchAndReplaceAll( sInpath , sBlank );
-
- String sDel = DirEntry::GetAccessDelimiter();
- ByteString sBDel( sDel.GetBuffer() , sDel.Len() , RTL_TEXTENCODING_UTF8 );
- if( bLocal ){
- xub_StrLen nPos = sOutputFileName.SearchBackward( sBDel.GetChar(0) );
- sOutputFileName = sOutputFileName.Copy( nPos+1 , sOutputFileName.Len()-nPos-1 );
- }
- ByteStringBoolHashMap aFileHM;
- // Read all possible files
- while ( !aSDF.IsEof()) {
- aSDF.ReadLine( sLine );
- sFileName = sLine.GetToken( 0, '\t' );
- sFileName += "#";
- sFileName += sLine.GetToken( 1, '\t' );
- aFileHM[sFileName]=true;
- }
-
- for( ByteStringBoolHashMap::iterator iter = aFileHM.begin(); iter != aFileHM.end(); ++iter ){
- sFileKey = iter->first;
- aSDF.Seek( 0 );
- aFile.Open( aEntry.GetFull(), STREAM_STD_WRITE |STREAM_TRUNC );
-
- while ( !aSDF.IsEof()) {
- aSDF.ReadLine( sLine );
- sFileName = sLine.GetToken( 0, '\t' );
- sFileName += "#";
- sFileName += sLine.GetToken( 1, '\t' );
- if( sFileName.Len() && ( sFileName.CompareTo(sFileKey) == COMPARE_EQUAL ) ){
- if ( aFile.IsOpen() && sLine.Len())
- aFile.WriteLine( sLine );
- }
- }
- if ( aFile.IsOpen())
- aFile.Close();
-
- ByteString sPrj( sFileKey.GetToken( 0, '#' ));
- ByteString sFile( sFileKey.GetToken( 1, '#' ));
- ByteString sSDFFile( aFile.GetFileName(), RTL_TEXTENCODING_ASCII_US );
-
- //printf("localize test sPrj = %s , sFile = %s , sSDFFile = %s sOutputFileName = %s\n",sPrj.GetBuffer(), sFile.GetBuffer() , sSDFFile.GetBuffer() , sOutputFileName.GetBuffer() );
-
- // Test
- bLocal = true;
- // Test
-
- if( bLocal ){
- sal_uInt16 nPos = sFile.SearchBackward( '\\' );
- ByteString sTmp = sFile.Copy( nPos+1 , sFile.Len()-nPos-1 );
- //printf("'%s'='%s'\n",sTmp.GetBuffer(), sOutputFileName.GetBuffer());
- if( sTmp.CompareTo(sOutputFileName) == COMPARE_EQUAL ){
- bMerged = true;
- if ( !MergeSingleFile( sPrj, sFile, sSDFFile ))
- bReturn = sal_False;
- }else{
- bMerged = true;
- //printf("MergeSingleFile('%s','%s','%s')\n",sPrj.GetBuffer(),sFile.GetBuffer(),sSDFFile.GetBuffer());
- if ( !MergeSingleFile( sPrj, sFile, sSDFFile ))
- bReturn = sal_False;
- }
- }
- }
- aEntry.Kill();
- // If Outputfile not included in the SDF file copy it without merge
-
- if( bLocal && !bMerged ){
- DirEntry aSourceFile( sOutputFileName.GetBuffer() );
- FSysError aErr = aSourceFile.CopyTo( DirEntry ( sOutputFile.GetBuffer() ) , FSYS_ACTION_COPYFILE );
- if( aErr != FSYS_ERR_OK ){
- printf("ERROR: Can't copy file '%s' to '%s' %d\n",sOutputFileName.GetBuffer(),sOutputFile.GetBuffer(),sal::static_int_cast<int>(aErr));
- }
- }
- return bReturn;
-
-}
}
using namespace transex3;
commit ca78afd0c13f61fbf45169e11c034f6b5ae0f638
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jul 12 21:08:21 2011 +0100
callcatcher: strip rsc down by more unused methods
diff --git a/rsc/inc/rscdb.hxx b/rsc/inc/rscdb.hxx
index be73763..dfa6e12 100644
--- a/rsc/inc/rscdb.hxx
+++ b/rsc/inc/rscdb.hxx
@@ -336,7 +336,6 @@ public:
aBaseLst.push_back( pType );
}
RscTop * SearchType( Atom nTypId );
- RscTop * Search( Atom typ );
// loescht alle Resourceobjekte diese Datei
void Delete( sal_uLong lFileKey );
RscTop * GetRoot() { return( pRoot ); };
diff --git a/rsc/inc/rscdef.hxx b/rsc/inc/rscdef.hxx
index 92f0a1d..994e1c8 100644
--- a/rsc/inc/rscdef.hxx
+++ b/rsc/inc/rscdef.hxx
@@ -140,8 +140,6 @@ protected:
void DecRef();
void DefineToNumber();
void SetName( const ByteString & rNewName ){ aName = rNewName; }
- void ChangeMacro( RscExpression * pExpression );
- void ChangeMacro( sal_Int32 lIdentifier );
using StringNode::Search;
public:
@@ -164,7 +162,6 @@ private:
sal_Int32 lDefId, size_t lPos );
RscDefine * New( sal_uLong lFileKey, const ByteString & rDefName,
RscExpression * pExpression, size_t lPos );
- sal_Bool Remove( RscDefine * pDef );
sal_Bool Remove();
size_t GetPos( RscDefine* item ) {
for ( size_t i = 0, n = maList.size(); i < n; ++i )
@@ -217,7 +214,6 @@ public:
RscFile();
~RscFile();
sal_Bool InsertDependFile( sal_uLong lDepFile, size_t lPos );
- void RemoveDependFile( sal_uLong lDepFile );
sal_Bool Depend( sal_uLong lDepend, sal_uLong lFree );
void SetIncFlag(){ bIncFile = sal_True; };
sal_Bool IsIncFile(){ return bIncFile; };
@@ -233,7 +229,6 @@ public:
RscDefTree(){ pDefRoot = NULL; }
~RscDefTree();
void Remove();
- sal_Bool Evaluate();
RscDefine * Search( const char * pName );
void Insert( RscDefine * pDef );
void Remove( RscDefine * pDef );
@@ -248,7 +243,6 @@ public:
RscDefine * FindDef( const char * );
RscDefine * FindDef( const ByteString& rStr ) { return FindDef( rStr.GetBuffer() ); }
- RscDefine * FindDef( sal_uLong lKey, const ByteString & );
sal_Bool Depend( sal_uLong lDepend, sal_uLong lFree );
sal_Bool TestDef( sal_uLong lFileKey, size_t lPos,
diff --git a/rsc/source/parser/rscdb.cxx b/rsc/source/parser/rscdb.cxx
index 1e91fa3..967de81 100644
--- a/rsc/source/parser/rscdb.cxx
+++ b/rsc/source/parser/rscdb.cxx
@@ -315,15 +315,6 @@ RscTop * RscTypCont::SearchType( Atom nId )
/*************************************************************************
|*
-|* RscTypCont :: Search
-|*
-*************************************************************************/
-RscTop * RscTypCont :: Search( Atom nRT ){
- return( (RscTop *)pRoot->Search( nRT ) );
-}
-
-/*************************************************************************
-|*
|* RscTypCont :: PutSysName()
|*
*************************************************************************/
diff --git a/rsc/source/tools/rscdef.cxx b/rsc/source/tools/rscdef.cxx
index 2bd41ed..f6d65a7 100644
--- a/rsc/source/tools/rscdef.cxx
+++ b/rsc/source/tools/rscdef.cxx
@@ -246,26 +246,6 @@ void RscDefine::DefineToNumber()
/*************************************************************************
|*
-|* RscDefine::ChangeMacro()
-|*
-*************************************************************************/
-void RscDefine::ChangeMacro( RscExpression * pExpression ){
- if( pExp )
- delete pExp;
- pExp = pExpression;
- pExp->Evaluate( &lId );
-}
-
-void RscDefine::ChangeMacro( sal_Int32 lIdentifier ){
- if( pExp ){
- delete pExp;
- pExp = NULL;
- }
- lId = lIdentifier;
-}
-
-/*************************************************************************
-|*
|* RscDefine::Evaluate()
|*
*************************************************************************/
@@ -341,23 +321,6 @@ RscDefine * RscDefineList::New( sal_uLong lFileKey, const ByteString & rDefName,
return pDef;
}
-/*************************************************************************
-|*
-|* RscDefineList::Remove()
-|*
-*************************************************************************/
-sal_Bool RscDefineList::Remove( RscDefine * pDef ) {
- for ( RscSubDefList::iterator it = maList.begin(); it < maList.end(); ++it ) {
- if ( *it == pDef ) {
- (*it)->DefineToNumber();
- (*it)->DecRef();
- maList.erase( it );
- return sal_True;
- }
- }
- return sal_False;
-}
-
sal_Bool RscDefineList::Remove() {
if ( maList.empty() )
return sal_False;
@@ -610,25 +573,6 @@ sal_Bool RscFile :: InsertDependFile( sal_uLong lIncFile, size_t lPos )
return sal_True;
}
-/*************************************************************************
-|*
-|* RscFile::RemoveDependFile()
-|*
-*************************************************************************/
-void RscFile :: RemoveDependFile( sal_uLong lDepFile )
-{
- for ( size_t i = aDepLst.size(); i > 0; )
- {
- RscDepend* pDep = aDepLst[ --i ];
- if( pDep->GetFileKey() == lDepFile ) {
- RscDependList::iterator it = aDepLst.begin();
- ::std::advance( it, i );
- delete *it;
- aDepLst.erase( it );
- }
- }
-}
-
/****************** R s c D e f T r e e **********************************/
/*************************************************************************
|*
@@ -705,10 +649,6 @@ sal_Bool RscDefTree::Evaluate( RscDefine * pDef ){
return sal_True;
}
-sal_Bool RscDefTree::Evaluate(){
- return Evaluate( pDefRoot );
-}
-
/****************** R s c F i l e T a b **********************************/
/*************************************************************************
|*
@@ -766,23 +706,6 @@ RscDefine * RscFileTab::FindDef( const char * pName ){
/*************************************************************************
|*
-|* RscFileTab::FindDef()
-|*
-*************************************************************************/
-RscDefine * RscFileTab::FindDef( sal_uLong lFileKey, const ByteString & rName )
-{
- RscDefine * pDef = FindDef( rName );
-
- if( pDef )
- //befindet sich das DEFINE in einer Include-Datei in der
- //Datei lFileKey
- if( Depend( lFileKey, pDef->GetFileKey() ) )
- return pDef;
- return NULL;
-}
-
-/*************************************************************************
-|*
|* RscFileTab::Depend()
|*
*************************************************************************/
commit 4ec978ac7e47d50bc486fd05a80e47ca5140dacb
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jul 12 20:57:00 2011 +0100
callcatcher: downheap only used by removed heapsort, also remove it
diff --git a/svl/source/misc/inethist.cxx b/svl/source/misc/inethist.cxx
index 0bdc98a..37d75ba 100644
--- a/svl/source/misc/inethist.cxx
+++ b/svl/source/misc/inethist.cxx
@@ -156,8 +156,6 @@ class INetURLHistory_Impl
*/
void initialize (void);
- void downheap (hash_entry a[], sal_uInt16 n, sal_uInt16 k);
-
/** capacity.
*/
sal_uInt16 capacity (void) const
@@ -257,23 +255,6 @@ void INetURLHistory_Impl::initialize (void)
}
/*
- * downheap.
- */
-void INetURLHistory_Impl::downheap (hash_entry a[], sal_uInt16 n, sal_uInt16 k)
-{
- hash_entry h = a[k];
- while (k < n / 2)
- {
- sal_uInt16 i = k + k + 1;
- if (((i + 1) < n) && (a[i] < a[i + 1])) i++;
- if (!(h < a[i])) break;
- a[k] = a[i];
- k = i;
- }
- a[k] = h;
-}
-
-/*
* find.
*/
sal_uInt16 INetURLHistory_Impl::find (sal_uInt32 nHash) const
commit 7bcd7291d4b64306478cad05cd1f57571cd4303f
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jul 12 16:51:52 2011 +0100
WaE: unused arguments
diff --git a/sax/test/testcomponent.cxx b/sax/test/testcomponent.cxx
index 9648758..7e4f0b8 100644
--- a/sax/test/testcomponent.cxx
+++ b/sax/test/testcomponent.cxx
@@ -82,7 +82,8 @@ int main (int argc, char **argv)
OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.registry.ImplementationRegistration")) );
xReg = Reference< XImplementationRegistration > ( x , UNO_QUERY );
}
- catch( Exception & ) {
+ catch (const Exception&)
+ {
printf( "Couldn't create ImplementationRegistration service\n" );
exit(1);
}
@@ -107,7 +108,8 @@ int main (int argc, char **argv)
xSimpleReg );
}
}
- catch( Exception &e ) {
+ catch (const Exception &e)
+ {
printf( "Couldn't reach dll %s\n" , szBuf );
printf( "%s\n" , OUStringToOString( e.Message , RTL_TEXTENCODING_ASCII_US ).getStr() );
@@ -134,7 +136,7 @@ int main (int argc, char **argv)
aDllName,
xSimpleReg );
}
- catch( Exception & e )
+ catch (const Exception&)
{
printf( "Couldn't reach dll %s\n" , szBuf );
exit(1);
@@ -178,12 +180,13 @@ int main (int argc, char **argv)
nNewHandle = xTest->test(
OStringToOUString( argv[1] , RTL_TEXTENCODING_ASCII_US ) , x , nHandle );
}
- catch( Exception & e ) {
+ catch (const Exception &e)
+ {
OString o = OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US );
printf( "testcomponent : uncaught exception %s\n" , o.getStr() );
exit(1);
}
- catch( ... )
+ catch (...)
{
printf( "testcomponent : uncaught unknown exception\n" );
exit(1);
More information about the Libreoffice-commits
mailing list