Kaydet (Commit) 871a41cf authored tarafından Noel Grandin's avatar Noel Grandin Kaydeden (comit) Noel Grandin

loplugin:unusedmethods unotools

Change-Id: Ieb73b50471263212285b9c3883c082477c1ad656
Reviewed-on: https://gerrit.libreoffice.org/16729Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noelgrandin@gmail.com>
üst e47db97d
......@@ -105,9 +105,6 @@ public:
inline void setGregorianDateTime( const DateTime& rDateTime )
{ setLocalDateTime( rDateTime - aEpochStart ); }
/// get the DateTime as a local (!) Gregorian DateTime
inline DateTime getGregorianDateTime() const
{ return aEpochStart + getLocalDateTime(); }
};
#endif
......
......@@ -208,10 +208,8 @@ public:
bool isDigit( const OUString& rStr, sal_Int32 nPos ) const;
bool isAlphaNumeric( const OUString& rStr, sal_Int32 nPos ) const;
bool isLetterNumeric( const OUString& rStr, sal_Int32 nPos ) const;
bool isAlpha( const OUString& rStr ) const;
bool isLetter( const OUString& rStr ) const;
bool isNumeric( const OUString& rStr ) const;
bool isAlphaNumeric( const OUString& rStr ) const;
bool isLetterNumeric( const OUString& rStr ) const;
private:
......
......@@ -147,7 +147,6 @@ namespace utl
@see EnableNotification
*/
void DisableNotification();
bool IsInternalNotification()const {return IsInValueChange();}
//returns all members of a node in a specific format
com::sun::star::uno::Sequence< OUString >
......
......@@ -110,11 +110,6 @@ namespace utl
*/
OConfigurationNode createNode(const OUString& _rName) const throw();
OConfigurationNode createNode( const sal_Char* _pAsciiName ) const
{
return createNode( OUString::createFromAscii( _pAsciiName ) );
}
/** remove an existent child nod
If the object represents a set node, this method may be used to delete an existent child. For non-set-nodes,
......@@ -122,11 +117,6 @@ namespace utl
*/
bool removeNode(const OUString& _rName) const throw();
bool removeNode( const sal_Char* _pAsciiName ) const
{
return removeNode( OUString::createFromAscii( _pAsciiName ) );
}
/** retrieves the content of a descendant
the returned value may contain anything from an interface (if <arg>_rPath</arg> refers to inner node of
......@@ -186,7 +176,6 @@ namespace utl
/// checks whether or not a descendent (no matter if direct or indirect) with the given name exists
bool hasByHierarchicalName( const OUString& _rName ) const throw();
bool hasByHierarchicalName( const sal_Char* _pAsciiName ) const { return hasByHierarchicalName( OUString::createFromAscii( _pAsciiName ) ); }
/// check if the objects represents a valid configuration node
bool isValid() const { return m_xHierarchyAccess.is(); }
......
......@@ -55,14 +55,6 @@ public:
//want to convert a string, you don't want to use this.
virtual OUString ConvertChar(sal_Unicode &rChar) = 0;
//Starts converting the string at position rIndex. It converts as much of
//the string that can be converted to the same symbol font and returns the
//name of that font. rIndex is modified to the last index that was
//converted. Typically you call if continuously until rIndex ==
//rString.Len() and handle each section as separate 8bit strings using
//separate fonts. Will return an empty string for a continuous section
//that has no possible mapping.
virtual OUString ConvertString(OUString &rString, sal_Int32 &rIndex) = 0;
virtual ~StarSymbolToMSMultiFont() {}
};
......
......@@ -149,9 +149,6 @@ class UNOTOOLS_DLLPUBLIC SvtLinguConfig: public utl::detail::Options
com::sun::star::uno::Reference< com::sun::star::util::XChangesBatch > GetMainUpdateAccess() const;
com::sun::star::uno::Sequence< OUString > GetCurrentOrLastActiveDicts_Impl( const OUString &rPropName ) const;
void SetCurrentOrLastActiveDicts_Impl( const OUString &rPropName, const com::sun::star::uno::Sequence< OUString > &rDictionaries ) const;
OUString GetVendorImageUrl_Impl( const OUString &rServiceImplName, const OUString &rImageName ) const;
SvtLinguConfig( const SvtLinguConfig & ) SAL_DELETED_FUNCTION;
......
......@@ -211,9 +211,7 @@ public:
{ return getOneLocaleItem( ::com::sun::star::i18n::LocaleItem::DOUBLE_QUOTATION_START ); }
const OUString& getDoubleQuotationMarkEnd() const
{ return getOneLocaleItem( ::com::sun::star::i18n::LocaleItem::DOUBLE_QUOTATION_END ); }
const OUString& getMeasurementSystem() const
{ return getOneLocaleItem( ::com::sun::star::i18n::LocaleItem::MEASUREMENT_SYSTEM ); }
MeasurementSystem getMeasurementSystemEnum() const
MeasurementSystem getMeasurementSystemEnum() const
{ return mapMeasurementStringToEnum( getOneLocaleItem( ::com::sun::star::i18n::LocaleItem::MEASUREMENT_SYSTEM ) ); }
const OUString& getTimeAM() const
{ return getOneLocaleItem( ::com::sun::star::i18n::LocaleItem::TIME_AM ); }
......@@ -285,13 +283,6 @@ public:
OUString getCurr( sal_Int64 nNumber, sal_uInt16 nDecimals,
const OUString& rCurrencySymbol,
bool bUseThousandSep = true ) const;
/** Default currency formatted string, use with
care as default currency may change in any
locale, for example, DEM -> EUR */
OUString getCurr( sal_Int64 nNumber, sal_uInt16 nDecimals,
bool bUseThousandSep = true ) const
{ return getCurr( nNumber, nDecimals,
getCurrSymbol(), bUseThousandSep ); }
// dummy returns, to be implemented
inline sal_Unicode getCurrZeroChar() const
......@@ -310,9 +301,6 @@ public:
{ return getOneReservedWord( ::com::sun::star::i18n::reservedWords::TRUE_WORD ); }
const OUString& getFalseWord() const
{ return getOneReservedWord( ::com::sun::star::i18n::reservedWords::FALSE_WORD ); }
/// return a quarter string matching nQuarter (0..3) => "1st quarter" .. "4th quarter"
const OUString& getQuarterWord( sal_Int16 nQuarter ) const
{ return getOneReservedWord( ::com::sun::star::i18n::reservedWords::QUARTER1_WORD + nQuarter ); }
const OUString& getAboveWord() const
{ return getOneReservedWord( ::com::sun::star::i18n::reservedWords::ABOVE_WORD ); }
const OUString& getBelowWord() const
......
......@@ -48,9 +48,6 @@ public:
/// set a new Locale
void setLocale( const ::com::sun::star::lang::Locale& rLocale );
/// get current Locale
const ::com::sun::star::lang::Locale& getLocale() const { return aLocale; }
// Wrapper implementations of class NumberFormatCodeMapper
::com::sun::star::i18n::NumberFormatCode getFormatCode( sal_Int16 nFormatIndex ) const;
......
......@@ -121,7 +121,6 @@ public:
OUString UseVariable( const OUString& rVar ) const;
bool SearchFile( OUString& rIniFile, Paths ePath = PATH_USERCONFIG );
const LanguageTag& GetLanguageTag() const;
bool IsReadonly() const;
};
#endif // INCLUDED_UNOTOOLS_PATHOPTIONS_HXX
......
......@@ -149,15 +149,6 @@ public:
eLang, GetCurrencyConfigString() );
}
void SetCurrencyAbbrevAndLanguage(
const OUString& rAbbrev,
LanguageType eLang )
{
SetCurrencyConfigString(
CreateCurrencyConfigString(
rAbbrev, eLang ) );
}
/** Set a link to a method to be called whenever the default currency
changes. This can be only one method, and normally it is the static
link method which calls SvNumberFormatter::SetDefaultSystemCurrency().
......
......@@ -86,26 +86,12 @@ public:
bool IsSrchInSelection() const { return m_bSrchInSel; }
bool IsSrchWordOnly() const { return m_bWordOnly; }
void SetSrchStr( const OUString& rStr ) { sSrchStr = rStr; }
void SetReplaceStr( const OUString& rStr ) { sReplaceStr = rStr; }
void SetSrchType( SearchType eType ) { m_eSrchType = eType; }
void SetCaseSensitive( int bFlag ) { m_bCaseSense = bFlag; }
void SetSrchInSelection( int bFlag ) { m_bSrchInSel = bFlag; }
void SetSrchWordOnly( int bFlag ) { m_bWordOnly = bFlag; }
bool IsSrchRelaxed() const { return bLEV_Relaxed; }
int GetLEVOther() const { return nLEV_OtherX; }
int GetLEVShorter() const { return nLEV_ShorterY; }
int GetLEVLonger() const { return nLEV_LongerZ; }
void SetSrchRelaxed( int bFlag ) { bLEV_Relaxed = bFlag; }
void SetLEVOther( int nValue ) { nLEV_OtherX = nValue; }
void SetLEVShorter( int nValue ) { nLEV_ShorterY = nValue; }
void SetLEVLonger( int nValue ) { nLEV_LongerZ = nValue; }
long GetTransliterationFlags() const { return nTransliterationFlags; }
void SetTransliterationFlags( long nValue ) { nTransliterationFlags = nValue; }
};
// Utility class for searching a substring in a string.
......
......@@ -55,10 +55,6 @@ public:
~TransliterationWrapper();
// get current Locale / Language
const ::com::sun::star::lang::Locale& getLocale() const { return aLanguageTag.getLocale();}
sal_uInt16 getLanguage() const { return aLanguageTag.getLanguageType(); }
sal_uInt32 getType() const { return nType; }
bool needLanguageForTheMode() const;
......
......@@ -1034,7 +1034,6 @@ private:
public:
explicit StarSymbolToMSMultiFontImpl(bool bPerfectOnly);
OUString ConvertChar(sal_Unicode &rChar) SAL_OVERRIDE;
OUString ConvertString(OUString &rString, sal_Int32& rIndex) SAL_OVERRIDE;
};
struct ExtraTable { sal_Unicode cStar; sal_uInt8 cMS;};
......@@ -1239,80 +1238,6 @@ OUString StarSymbolToMSMultiFontImpl::ConvertChar(sal_Unicode &rChar)
return sRet;
}
OUString StarSymbolToMSMultiFontImpl::ConvertString(OUString &rString,
sal_Int32& rIndex)
{
typedef ::std::multimap<sal_Unicode, SymbolEntry>::iterator MI;
typedef ::std::pair<MI, MI> Result;
OUString sRet;
sal_Int32 nLen = rString.getLength();
if (rIndex >= nLen)
return sRet;
int nTotal = 0, nResult = 0;
::std::vector<Result> aPossibilities;
aPossibilities.reserve(nLen - rIndex);
sal_Int32 nStart = rIndex;
do
{
Result aResult = maMagicMap.equal_range(rString[rIndex]);
int nBitfield = 0;
for (MI aIndex = aResult.first; aIndex != aResult.second; ++aIndex)
nBitfield |= aIndex->second.eFont;
if (!nTotal)
nTotal = nBitfield;
else
{
if (nTotal != nBitfield) //Allow a series of failures
{
nTotal &= nBitfield;
if (!nTotal)
break;
}
}
nResult = nTotal;
if (nResult) //Don't bother storing a series of failures
aPossibilities.push_back(aResult);
++rIndex;
}while(rIndex < nLen);
if (nResult)
{
int nI = Symbol;
while (nI <= nResult)
{
if (!(nI & nResult))
nI = nI << 1;
else
break;
}
const char* pc = SymbolFontToString(nI);
sRet = OUString(pc, strlen(pc), RTL_TEXTENCODING_ASCII_US);
sal_Int32 nSize = aPossibilities.size();
OUStringBuffer sBuff(rString);
for(sal_Int32 nPos = 0; nPos < nSize; ++nPos)
{
const Result &rResult = aPossibilities[nPos];
for (MI aIndex = rResult.first; aIndex != rResult.second; ++aIndex)
{
if (aIndex->second.eFont == nI)
{
sBuff[nPos + nStart] = aIndex->second.cIndex;
break;
}
}
}
rString = sBuff.makeStringAndClear();
}
return sRet;
}
StarSymbolToMSMultiFont *CreateStarSymbolToMSMultiFont(bool bPerfectOnly)
{
return new StarSymbolToMSMultiFontImpl(bPerfectOnly);
......
......@@ -1046,7 +1046,6 @@ static bool _UCBOpenContentSync(
UcbLockBytes::UcbLockBytes( UcbLockBytesHandler* pHandler )
: m_aExpireDate( DateTime::EMPTY )
, m_xInputStream (NULL)
, m_pCommandThread( NULL )
, m_xHandler( pHandler )
, m_nError( ERRCODE_NONE )
, m_bTerminated (false)
......
......@@ -69,14 +69,9 @@ typedef tools::SvRef<UcbLockBytes> UcbLockBytesRef;
class UcbLockBytesHandler : public SvRefBase
{
bool m_bActive;
public:
UcbLockBytesHandler()
: m_bActive( true )
{}
void Activate( bool bActivate = true ) { m_bActive = bActivate; }
bool IsActive() const { return m_bActive; }
};
typedef tools::SvRef<UcbLockBytesHandler> UcbLockBytesHandlerRef;
......@@ -94,7 +89,6 @@ class UcbLockBytes : public virtual SvLockBytes
::com::sun::star::uno::Reference < ::com::sun::star::io::XInputStream > m_xInputStream;
::com::sun::star::uno::Reference < ::com::sun::star::io::XOutputStream > m_xOutputStream;
::com::sun::star::uno::Reference < ::com::sun::star::io::XSeekable > m_xSeekable;
void* m_pCommandThread; // is alive only for compatibility reasons
UcbLockBytesHandlerRef m_xHandler;
ErrCode m_nError;
......@@ -132,11 +126,6 @@ public:
ErrCode GetError() const
{ return m_nError; }
// the following properties are available when and after the first DataAvailable callback has been executed
OUString GetContentType() const;
OUString GetRealURL() const;
DateTime GetExpireDate() const;
// calling this method delegates the responsibility to call closeinput to the caller!
::com::sun::star::uno::Reference < ::com::sun::star::io::XInputStream > getInputStream();
......@@ -163,12 +152,6 @@ public:
return m_xSeekable;
}
bool hasInputStream_Impl() const
{
osl::MutexGuard aGuard( (const_cast< UcbLockBytes* >(this))->m_aMutex );
return m_xInputStream.is();
}
void setDontClose_Impl()
{ m_bDontClose = true; }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment