diff options
author | Noel Grandin <noel@peralex.com> | 2015-07-03 09:21:43 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-07-06 10:55:59 +0000 |
commit | 871a41cfd043e1c7391ca0b8b3c5e60bd799025c (patch) | |
tree | 395c13351fc57350dbf7bb14371b3553b8d08868 /unotools/source/misc | |
parent | e47db97d2ced9178456eebaece11118158dce406 (diff) |
loplugin:unusedmethods unotools
Change-Id: Ieb73b50471263212285b9c3883c082477c1ad656
Reviewed-on: https://gerrit.libreoffice.org/16729
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'unotools/source/misc')
-rw-r--r-- | unotools/source/misc/fontcvt.cxx | 75 |
1 files changed, 0 insertions, 75 deletions
diff --git a/unotools/source/misc/fontcvt.cxx b/unotools/source/misc/fontcvt.cxx index 29a783e58494..492fd34cd687 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); |