[Libreoffice-commits] core.git: include/unotools unotools/source

Noel Grandin noel at peralex.com
Mon Jul 6 03:56:31 PDT 2015


 include/unotools/calendarwrapper.hxx         |    3 -
 include/unotools/charclass.hxx               |    2 
 include/unotools/configitem.hxx              |    1 
 include/unotools/confignode.hxx              |   11 ---
 include/unotools/fontcvt.hxx                 |    8 --
 include/unotools/lingucfg.hxx                |    3 -
 include/unotools/localedatawrapper.hxx       |   14 -----
 include/unotools/numberformatcodewrapper.hxx |    3 -
 include/unotools/pathoptions.hxx             |    1 
 include/unotools/syslocaleoptions.hxx        |    9 ---
 include/unotools/textsearch.hxx              |   14 -----
 include/unotools/transliterationwrapper.hxx  |    4 -
 unotools/source/misc/fontcvt.cxx             |   75 ---------------------------
 unotools/source/ucbhelper/ucblockbytes.cxx   |    1 
 unotools/source/ucbhelper/ucblockbytes.hxx   |   17 ------
 15 files changed, 1 insertion(+), 165 deletions(-)

New commits:
commit 871a41cfd043e1c7391ca0b8b3c5e60bd799025c
Author: Noel Grandin <noel at peralex.com>
Date:   Fri Jul 3 09:21:43 2015 +0200

    loplugin:unusedmethods unotools
    
    Change-Id: Ieb73b50471263212285b9c3883c082477c1ad656
    Reviewed-on: https://gerrit.libreoffice.org/16729
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noelgrandin at gmail.com>

diff --git a/include/unotools/calendarwrapper.hxx b/include/unotools/calendarwrapper.hxx
index 68ee61c..ceffdea 100644
--- a/include/unotools/calendarwrapper.hxx
+++ b/include/unotools/calendarwrapper.hxx
@@ -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
diff --git a/include/unotools/charclass.hxx b/include/unotools/charclass.hxx
index 06ec048..af4994e 100644
--- a/include/unotools/charclass.hxx
+++ b/include/unotools/charclass.hxx
@@ -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:
diff --git a/include/unotools/configitem.hxx b/include/unotools/configitem.hxx
index 16a6f84..9d5e4ba 100644
--- a/include/unotools/configitem.hxx
+++ b/include/unotools/configitem.hxx
@@ -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 >
diff --git a/include/unotools/confignode.hxx b/include/unotools/confignode.hxx
index 0624221..8abd1e6 100644
--- a/include/unotools/confignode.hxx
+++ b/include/unotools/confignode.hxx
@@ -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(); }
diff --git a/include/unotools/fontcvt.hxx b/include/unotools/fontcvt.hxx
index 6e51a9a..567be3b 100644
--- a/include/unotools/fontcvt.hxx
+++ b/include/unotools/fontcvt.hxx
@@ -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() {}
 };
 
diff --git a/include/unotools/lingucfg.hxx b/include/unotools/lingucfg.hxx
index cceae1b..a17082d 100644
--- a/include/unotools/lingucfg.hxx
+++ b/include/unotools/lingucfg.hxx
@@ -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;
diff --git a/include/unotools/localedatawrapper.hxx b/include/unotools/localedatawrapper.hxx
index d644859..55106d8 100644
--- a/include/unotools/localedatawrapper.hxx
+++ b/include/unotools/localedatawrapper.hxx
@@ -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
diff --git a/include/unotools/numberformatcodewrapper.hxx b/include/unotools/numberformatcodewrapper.hxx
index 066e388..00f647a 100644
--- a/include/unotools/numberformatcodewrapper.hxx
+++ b/include/unotools/numberformatcodewrapper.hxx
@@ -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;
diff --git a/include/unotools/pathoptions.hxx b/include/unotools/pathoptions.hxx
index 07bf3eb..482d48b 100644
--- a/include/unotools/pathoptions.hxx
+++ b/include/unotools/pathoptions.hxx
@@ -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
diff --git a/include/unotools/syslocaleoptions.hxx b/include/unotools/syslocaleoptions.hxx
index cd62d85..99883ac 100644
--- a/include/unotools/syslocaleoptions.hxx
+++ b/include/unotools/syslocaleoptions.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().
diff --git a/include/unotools/textsearch.hxx b/include/unotools/textsearch.hxx
index d13ec3f..76e53df 100644
--- a/include/unotools/textsearch.hxx
+++ b/include/unotools/textsearch.hxx
@@ -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.
diff --git a/include/unotools/transliterationwrapper.hxx b/include/unotools/transliterationwrapper.hxx
index 7d0dce0..840bb40 100644
--- a/include/unotools/transliterationwrapper.hxx
+++ b/include/unotools/transliterationwrapper.hxx
@@ -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;
diff --git a/unotools/source/misc/fontcvt.cxx b/unotools/source/misc/fontcvt.cxx
index 29a783e..492fd34 100644
--- a/unotools/source/misc/fontcvt.cxx
+++ b/unotools/source/misc/fontcvt.cxx
@@ -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);
diff --git a/unotools/source/ucbhelper/ucblockbytes.cxx b/unotools/source/ucbhelper/ucblockbytes.cxx
index 27f6fa2..09043b4 100644
--- a/unotools/source/ucbhelper/ucblockbytes.cxx
+++ b/unotools/source/ucbhelper/ucblockbytes.cxx
@@ -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)
diff --git a/unotools/source/ucbhelper/ucblockbytes.hxx b/unotools/source/ucbhelper/ucblockbytes.hxx
index e84600a..ad432ec 100644
--- a/unotools/source/ucbhelper/ucblockbytes.hxx
+++ b/unotools/source/ucbhelper/ucblockbytes.hxx
@@ -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; }
 


More information about the Libreoffice-commits mailing list