[Libreoffice-commits] .: basic/source linguistic/inc linguistic/source sfx2/inc sfx2/source
Caolán McNamara
caolan at kemper.freedesktop.org
Wed Aug 3 05:32:36 PDT 2011
basic/source/basmgr/basmgr.cxx | 79 -----------------------------
linguistic/inc/linguistic/misc.hxx | 15 -----
linguistic/inc/linguistic/spelldta.hxx | 10 ---
linguistic/source/misc.cxx | 88 ---------------------------------
linguistic/source/misc2.cxx | 64 ------------------------
linguistic/source/spelldta.cxx | 52 -------------------
sfx2/inc/sfx2/app.hxx | 1
sfx2/source/appl/app.cxx | 9 ---
sfx2/source/appl/appdata.cxx | 1
sfx2/source/inc/appdata.hxx | 1
10 files changed, 1 insertion(+), 319 deletions(-)
New commits:
commit aa0c8241c75f8f336c40690f0a202d35a56a65f6
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Aug 3 10:47:36 2011 +0100
callcatcher: remove unused methods
diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx
index ce32c0b..f39a684 100644
--- a/basic/source/basmgr/basmgr.cxx
+++ b/basic/source/basmgr/basmgr.cxx
@@ -490,7 +490,6 @@ private:
public:
BasicLibInfo();
- BasicLibInfo( const String& rStorageName );
sal_Bool IsReference() const { return bReference; }
sal_Bool& IsReference() { return bReference; }
@@ -530,7 +529,6 @@ public:
sal_Bool IsFoundInPath() const { return bFoundInPath; }
void SetFoundInPath( sal_Bool bInPath ) { bFoundInPath = bInPath; }
- void Store( SotStorageStream& rSStream, const String& rBasMgrStorageName, sal_Bool bUseOldReloadInfo );
static BasicLibInfo* Create( SotStorageStream& rSStream );
Reference< XLibraryContainer > GetLibraryContainer( void )
@@ -655,83 +653,6 @@ BasicLibInfo::BasicLibInfo()
aRelStorageName = String::CreateFromAscii(szImbedded);
}
-BasicLibInfo::BasicLibInfo( const String& rStorageName )
-{
- bReference = sal_True;
- bPasswordVerified = sal_False;
- bDoLoad = sal_False;
- mxScriptCont = NULL;
- aStorageName = rStorageName;
-}
-
-void BasicLibInfo::Store( SotStorageStream& rSStream, const String& rBasMgrStorageName, sal_Bool bUseOldReloadInfo )
-{
- sal_uIntPtr nStartPos = rSStream.Tell();
- sal_uInt32 nEndPos = 0;
-
- sal_uInt16 nId = LIBINFO_ID;
- sal_uInt16 nVer = CURR_VER;
-
- rSStream << nEndPos;
- rSStream << nId;
- rSStream << nVer;
-
- String aCurStorageName = INetURLObject(rBasMgrStorageName, INET_PROT_FILE).GetMainURL( INetURLObject::NO_DECODE );
- DBG_ASSERT(aCurStorageName.Len() != 0, "Bad storage name");
-
- // If not set initialize StorageName
- if ( aStorageName.Len() == 0 )
- aStorageName = aCurStorageName;
-
- // Load again?
- sal_Bool bDoLoad_ = xLib.Is();
- if ( bUseOldReloadInfo )
- bDoLoad_ = DoLoad();
- rSStream << bDoLoad_;
-
- // The name of the lib...
- rSStream.WriteByteString(GetLibName());
-
- // Absolute path...
- if ( ! GetStorageName().EqualsAscii(szImbedded) )
- {
- String aSName = INetURLObject( GetStorageName(), INET_PROT_FILE).GetMainURL( INetURLObject::NO_DECODE );
- DBG_ASSERT(aSName.Len() != 0, "Bad storage name");
- rSStream.WriteByteString( aSName );
- }
- else
- rSStream.WriteByteString( szImbedded );
-
- // Relative path...
- if ( ( aStorageName == aCurStorageName ) || ( aStorageName.EqualsAscii(szImbedded) ) )
- rSStream.WriteByteString( szImbedded );
- else
- {
- // Do not determine the relative path if the file was only found in path:
- // because the relative path would change and after moving the lib the
- // the file cannot be found.
- if ( !IsFoundInPath() )
- CalcRelStorageName( aCurStorageName );
- rSStream.WriteByteString(aRelStorageName);
- }
-
- // ------------------------------
- // Version 2
- // ------------------------------
-
- // reference...
- rSStream << bReference;
-
- // ------------------------------
- // End
- // ------------------------------
-
- nEndPos = rSStream.Tell();
- rSStream.Seek( nStartPos );
- rSStream << nEndPos;
- rSStream.Seek( nEndPos );
-}
-
BasicLibInfo* BasicLibInfo::Create( SotStorageStream& rSStream )
{
BasicLibInfo* pInfo = new BasicLibInfo;
diff --git a/linguistic/inc/linguistic/misc.hxx b/linguistic/inc/linguistic/misc.hxx
index 93e7fd0..277e216 100644
--- a/linguistic/inc/linguistic/misc.hxx
+++ b/linguistic/inc/linguistic/misc.hxx
@@ -80,7 +80,7 @@ namespace linguistic
#define A2OU(x) ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( x ))
/// Flags to be used with the multi-path related functions
-/// @see GetDictionaryPaths, GetLinguisticPaths
+/// @see GetDictionaryPaths
#define PATH_FLAG_INTERNAL 0x01
#define PATH_FLAG_USER 0x02
#define PATH_FLAG_WRITABLE 0x04
@@ -99,10 +99,6 @@ LNG_DLLPUBLIC ::osl::Mutex& GetLinguMutex();
LocaleDataWrapper & GetLocaleDataWrapper( sal_Int16 nLang );
-rtl_TextEncoding GetTextEncoding( sal_Int16 nLanguage );
-
-rtl::OUString StripTrailingChars( rtl::OUString &rTxt, sal_Unicode cChar );
-
sal_Int32 LevDistance( const rtl::OUString &rTxt1, const rtl::OUString &rTxt2 );
::com::sun::star::lang::Locale
@@ -114,9 +110,6 @@ LNG_DLLPUBLIC LanguageType
::com::sun::star::lang::Locale&
LanguageToLocale( ::com::sun::star::lang::Locale& rLocale, LanguageType eLang );
-::com::sun::star::uno::Sequence< ::com::sun::star::lang::Locale >
- LangSeqToLocaleSeq( const ::com::sun::star::uno::Sequence< sal_Int16 > &rLangSeq );
-
::com::sun::star::uno::Sequence< sal_Int16 >
LocaleSeqToLangSeq( ::com::sun::star::uno::Sequence<
::com::sun::star::lang::Locale > &rLocaleSeq );
@@ -131,17 +124,11 @@ sal_Bool FileExists( const String &rURL );
::rtl::OUString GetDictionaryWriteablePath();
::com::sun::star::uno::Sequence< ::rtl::OUString > GetDictionaryPaths( sal_Int16 nPathFlags = PATH_FLAG_ALL );
-::com::sun::star::uno::Sequence< ::rtl::OUString > GetLinguisticPaths( sal_Int16 nPathFlags = PATH_FLAG_ALL );
/// @returns an URL for a new and writable dictionary rDicName.
/// The URL will point to the path given by 'GetDictionaryWriteablePath'
LNG_DLLPUBLIC String GetWritableDictionaryURL( const String &rDicName );
-// looks for the specified file in the list of paths.
-// In case of multiple occurrences only the first found is returned.
-String SearchFileInPaths( const String &rFile, const ::com::sun::star::uno::Sequence< ::rtl::OUString > &rPaths );
-
-
LNG_DLLPUBLIC sal_Int32 GetPosInWordToCheck( const rtl::OUString &rTxt, sal_Int32 nPos );
::com::sun::star::uno::Reference<
diff --git a/linguistic/inc/linguistic/spelldta.hxx b/linguistic/inc/linguistic/spelldta.hxx
index 8ce4474..6e9a554 100644
--- a/linguistic/inc/linguistic/spelldta.hxx
+++ b/linguistic/inc/linguistic/spelldta.hxx
@@ -49,16 +49,6 @@ namespace com { namespace sun { namespace star {
namespace linguistic
{
-///////////////////////////////////////////////////////////////////////////
-
-::com::sun::star::uno::Reference<
- ::com::sun::star::linguistic2::XSpellAlternatives >
- MergeProposals(
- ::com::sun::star::uno::Reference<
- ::com::sun::star::linguistic2::XSpellAlternatives > &rxAlt1,
- ::com::sun::star::uno::Reference<
- ::com::sun::star::linguistic2::XSpellAlternatives > &rxAlt2 );
-
::com::sun::star::uno::Sequence< ::rtl::OUString >
MergeProposalSeqs(
::com::sun::star::uno::Sequence< ::rtl::OUString > &rAlt1,
diff --git a/linguistic/source/misc.cxx b/linguistic/source/misc.cxx
index 4f57fb2..a1651c7 100644
--- a/linguistic/source/misc.cxx
+++ b/linguistic/source/misc.cxx
@@ -102,85 +102,12 @@ LocaleDataWrapper & GetLocaleDataWrapper( sal_Int16 nLang )
return aLclDtaWrp;
}
-
-/**
- returns text-encoding used for ByteString unicode String conversion
- */
-rtl_TextEncoding GetTextEncoding( sal_Int16 nLanguage )
-{
- DBG_ASSERT( nLanguage != LANGUAGE_NONE, "invalid language argument" );
- static sal_Int16 nLastLanguage = LANGUAGE_NONE;
-
- // set default value for unknown languages
- static rtl_TextEncoding nEncoding = RTL_TEXTENCODING_DONTKNOW;
-
- if (nLastLanguage != nLanguage)
- {
- //!! IPR uses textencodings Latin-1, Latin-2, Latin-5 and Latin-7 !!
-
- nLastLanguage = nLanguage;
- switch (nLanguage)
- {
- case LANGUAGE_GERMAN :
- case LANGUAGE_GERMAN_SWISS :
- case LANGUAGE_ENGLISH_US :
- case LANGUAGE_ENGLISH_UK :
- case LANGUAGE_FRENCH :
- case LANGUAGE_ITALIAN :
- case LANGUAGE_SPANISH :
- case LANGUAGE_CATALAN :
- case LANGUAGE_PORTUGUESE :
- case LANGUAGE_PORTUGUESE_BRAZILIAN :
- case LANGUAGE_DANISH :
- case LANGUAGE_DUTCH :
- case LANGUAGE_SWEDISH :
- case LANGUAGE_FINNISH :
- case LANGUAGE_NORWEGIAN_BOKMAL :
- case LANGUAGE_NORWEGIAN_NYNORSK :
- case LANGUAGE_AFRIKAANS :
- case LANGUAGE_ENGLISH_EIRE :
- case LANGUAGE_ENGLISH_AUS :
-#ifdef WNT
- nEncoding = RTL_TEXTENCODING_MS_1252; break;
-#else
- nEncoding = RTL_TEXTENCODING_ISO_8859_1; break;
-#endif
- case LANGUAGE_CZECH :
- case LANGUAGE_HUNGARIAN :
- case LANGUAGE_POLISH :
-#ifdef WNT
- nEncoding = RTL_TEXTENCODING_MS_1250; break;
-#else
- nEncoding = RTL_TEXTENCODING_ISO_8859_2; break;
-#endif
- case LANGUAGE_RUSSIAN :
-#ifdef WNT
- nEncoding = RTL_TEXTENCODING_MS_1251; break;
-#else
- nEncoding = RTL_TEXTENCODING_ISO_8859_5; break;
-#endif
- case LANGUAGE_GREEK :
-#ifdef WNT
- nEncoding = RTL_TEXTENCODING_MS_1253; break;
-#else
- nEncoding = RTL_TEXTENCODING_ISO_8859_7; break;
-#endif
- default:
- DBG_ASSERT( 0, "unexpected language" );
- }
- }
-
- return nEncoding;
-}
-
-
static inline sal_Int32 Minimum( sal_Int32 n1, sal_Int32 n2, sal_Int32 n3 )
{
sal_Int32 nMin = n1 < n2 ? n1 : n2;
return nMin < n3 ? nMin : n3;
}
-
class IntArray2D
{
private:
@@ -481,21 +408,6 @@ Locale CreateLocale( LanguageType eLang )
return aLocale;
}
-uno::Sequence< Locale > LangSeqToLocaleSeq( const uno::Sequence< sal_Int16 > &rLangSeq )
-{
- const sal_Int16 *pLang = rLangSeq.getConstArray();
- sal_Int32 nCount = rLangSeq.getLength();
-
- uno::Sequence< Locale > aLocales( nCount );
- Locale *pLocale = aLocales.getArray();
- for (sal_Int32 i = 0; i < nCount; ++i)
- {
- LanguageToLocale( pLocale[i], pLang[ i ] );
- }
-
- return aLocales;
-}
-
uno::Sequence< sal_Int16 >
LocaleSeqToLangSeq( uno::Sequence< Locale > &rLocaleSeq )
{
diff --git a/linguistic/source/misc2.cxx b/linguistic/source/misc2.cxx
index 906de5c..0857337 100644
--- a/linguistic/source/misc2.cxx
+++ b/linguistic/source/misc2.cxx
@@ -71,21 +71,6 @@ sal_Bool FileExists( const String &rMainURL )
return bExists;
}
-
-rtl::OUString StripTrailingChars( rtl::OUString &rTxt, sal_Unicode cChar )
-{
- sal_Int32 nTrailing = 0;
- sal_Int32 nTxtLen = rTxt.getLength();
- sal_Int32 nIdx = nTxtLen - 1;
- while (nIdx >= 0 && rTxt[ nIdx-- ] == cChar)
- ++nTrailing;
-
- rtl::OUString aRes( rTxt.copy( nTxtLen - nTrailing ) );
- rTxt = rTxt.copy( 0, nTxtLen - nTrailing );
- return aRes;
-}
-
-
static uno::Sequence< rtl::OUString > GetMultiPaths_Impl(
const rtl::OUString &rPathPrefix,
sal_Int16 nPathFlags )
@@ -166,11 +151,6 @@ uno::Sequence< rtl::OUString > GetDictionaryPaths( sal_Int16 nPathFlags )
return GetMultiPaths_Impl( A2OU("Dictionary"), nPathFlags );
}
-uno::Sequence< rtl::OUString > GetLinguisticPaths( sal_Int16 nPathFlags )
-{
- return GetMultiPaths_Impl( A2OU("Linguistic"), nPathFlags );
-}
-
String GetWritableDictionaryURL( const String &rDicName )
{
// new user writable dictionaries should be created in the 'writable' path
@@ -190,50 +170,6 @@ String GetWritableDictionaryURL( const String &rDicName )
return aURLObj.GetMainURL( INetURLObject::NO_DECODE );
}
-
-String SearchFileInPaths(
- const String &rFile,
- const uno::Sequence< rtl::OUString > &rPaths )
-{
- //!! see also SvtPathOptions::SearchFile for the riginal code
-
- String aRes;
-
- // check in all paths...
- const sal_Int32 nPaths = rPaths.getLength();
- for (sal_Int32 k = 0; k < nPaths; ++k)
- {
- sal_Bool bIsURL = sal_True;
- INetURLObject aObj( rPaths[k] );
- if ( aObj.HasError() )
- {
- bIsURL = sal_False;
- String aURL;
- if ( utl::LocalFileHelper::ConvertPhysicalNameToURL( rPaths[k], aURL ) )
- aObj.SetURL( aURL );
- }
-
- xub_StrLen i, nCount = rFile.GetTokenCount( '/' );
- for ( i = 0; i < nCount; ++i )
- aObj.insertName( rFile.GetToken( i, '/' ) );
- bool bRet = ::utl::UCBContentHelper::Exists( aObj.GetMainURL( INetURLObject::NO_DECODE ) );
-
- if ( bRet )
- {
- if ( !bIsURL )
- ::utl::LocalFileHelper::ConvertURLToPhysicalName(
- aObj.GetMainURL( INetURLObject::NO_DECODE ), aRes );
- else
- aRes = aObj.GetMainURL( INetURLObject::NO_DECODE );
- break;
- }
- }
-
- return aRes;
-}
-
-
} // namespace linguistic
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/linguistic/source/spelldta.cxx b/linguistic/source/spelldta.cxx
index 9b3a4e4..5389742 100644
--- a/linguistic/source/spelldta.cxx
+++ b/linguistic/source/spelldta.cxx
@@ -55,60 +55,8 @@ using ::rtl::OUString;
namespace linguistic
{
-
-
#define MAX_PROPOSALS 40
-Reference< XSpellAlternatives > MergeProposals(
- Reference< XSpellAlternatives > &rxAlt1,
- Reference< XSpellAlternatives > &rxAlt2)
-{
- Reference< XSpellAlternatives > xMerged;
-
- if (!rxAlt1.is())
- xMerged = rxAlt2;
- else if (!rxAlt2.is())
- xMerged = rxAlt1;
- else
- {
- sal_Int32 nAltCount1 = rxAlt1->getAlternativesCount();
- Sequence< OUString > aAlt1( rxAlt1->getAlternatives() );
- const OUString *pAlt1 = aAlt1.getConstArray();
-
- sal_Int32 nAltCount2 = rxAlt2->getAlternativesCount();
- Sequence< OUString > aAlt2( rxAlt2->getAlternatives() );
- const OUString *pAlt2 = aAlt2.getConstArray();
-
- sal_Int32 nCountNew = Min( nAltCount1 + nAltCount2, (sal_Int32) MAX_PROPOSALS );
- Sequence< OUString > aAltNew( nCountNew );
- OUString *pAltNew = aAltNew.getArray();
-
- sal_Int32 nIndex = 0;
- sal_Int32 i = 0;
- for (int j = 0; j < 2; j++)
- {
- sal_Int32 nCount = j == 0 ? nAltCount1 : nAltCount2;
- const OUString *pAlt = j == 0 ? pAlt1 : pAlt2;
- for (i = 0; i < nCount && nIndex < MAX_PROPOSALS; i++)
- {
- if (pAlt[i].getLength())
- pAltNew[ nIndex++ ] = pAlt[ i ];
- }
- }
- DBG_ASSERT(nIndex == nCountNew, "lng : wrong number of proposals");
-
- SpellAlternatives *pSpellAlt = new SpellAlternatives;
- pSpellAlt->SetWordLanguage( rxAlt1->getWord(),
- LocaleToLanguage( rxAlt1->getLocale() ) );
- pSpellAlt->SetFailureType( rxAlt1->getFailureType() );
- pSpellAlt->SetAlternatives( aAltNew );
- xMerged = pSpellAlt;
- }
-
- return xMerged;
-}
-
-
sal_Bool SeqHasEntry(
const Sequence< OUString > &rSeq,
const OUString &rTxt)
diff --git a/sfx2/inc/sfx2/app.hxx b/sfx2/inc/sfx2/app.hxx
index 7684757..5bc5a1e 100644
--- a/sfx2/inc/sfx2/app.hxx
+++ b/sfx2/inc/sfx2/app.hxx
@@ -164,7 +164,6 @@ public:
// Resource Manager
SfxResourceManager& GetResourceManager() const;
ResMgr* GetSfxResManager();
- SimpleResMgr* GetSimpleResManager();
static ResMgr* CreateResManager( const char *pPrefix );
SimpleResMgr* CreateSimpleResManager();
diff --git a/sfx2/source/appl/app.cxx b/sfx2/source/appl/app.cxx
index 6a37c67..672713a 100644
--- a/sfx2/source/appl/app.cxx
+++ b/sfx2/source/appl/app.cxx
@@ -530,15 +530,6 @@ ResMgr* SfxApplication::GetSfxResManager()
return SfxResId::GetResMgr();
}
-//--------------------------------------------------------------------
-
-SimpleResMgr* SfxApplication::GetSimpleResManager()
-{
- if ( !pAppData_Impl->pSimpleResManager )
- pAppData_Impl->pSimpleResManager = CreateSimpleResManager();
- return pAppData_Impl->pSimpleResManager;
-}
-
//------------------------------------------------------------------------
void SfxApplication::SetProgress_Impl
diff --git a/sfx2/source/appl/appdata.cxx b/sfx2/source/appl/appdata.cxx
index 6404431..1ed2972 100644
--- a/sfx2/source/appl/appdata.cxx
+++ b/sfx2/source/appl/appdata.cxx
@@ -121,7 +121,6 @@ SfxAppData_Impl::SfxAppData_Impl( SfxApplication* ) :
, pObjShells(0)
, pSfxResManager(0)
, pOfaResMgr(0)
- , pSimpleResManager(0)
, pBasicManager( new SfxBasicManagerHolder )
, pBasMgrListener( new SfxBasicManagerCreationListener( *this ) )
, pViewFrame( 0 )
diff --git a/sfx2/source/inc/appdata.hxx b/sfx2/source/inc/appdata.hxx
index aa180a6..8dcfffe 100644
--- a/sfx2/source/inc/appdata.hxx
+++ b/sfx2/source/inc/appdata.hxx
@@ -150,7 +150,6 @@ public:
SfxObjectShellArr_Impl* pObjShells;
ResMgr* pSfxResManager;
ResMgr* pOfaResMgr;
- SimpleResMgr* pSimpleResManager;
SfxBasicManagerHolder* pBasicManager;
SfxBasicManagerCreationListener*
pBasMgrListener;
More information about the Libreoffice-commits
mailing list