diff options
author | Michael Stahl <mstahl@redhat.com> | 2015-06-19 22:35:47 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2015-06-20 11:42:36 +0200 |
commit | c3f9fa6f3a18ffe088a1fbc6280ade296967e66a (patch) | |
tree | 22d3816c62e685752232ad380e65edff9b9f6927 /sw | |
parent | 558352495a79a7db644c21b4581409f172996c24 (diff) |
sw: WW8 export: GetPseudoCharRuns() parameter bSplitOnCharSet is obsolete
Change-Id: Icd1fbf247e63c92c8a51de78eb70e9b8e5f03b5e
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/filter/inc/msfilter.hxx | 7 | ||||
-rw-r--r-- | sw/source/filter/ww8/writerwordglue.cxx | 45 | ||||
-rw-r--r-- | sw/source/filter/ww8/wrtw8nds.cxx | 2 |
3 files changed, 3 insertions, 51 deletions
diff --git a/sw/source/filter/inc/msfilter.hxx b/sw/source/filter/inc/msfilter.hxx index 8c9dc5d87755..9b1c2551e271 100644 --- a/sw/source/filter/inc/msfilter.hxx +++ b/sw/source/filter/inc/msfilter.hxx @@ -445,11 +445,6 @@ namespace sw @param nStart The position in the TextNode to start processing from - @param bSplitOnCharSet - Set to true is we want to split on ranges of characters that - share a plausible charset for export to e.g. WW7- or perhaps - RTF format, not necessary for a unicode aware format like WW8+ - @return STL container of CharRuns which describe the shared direction, script and optionally script of the contiguous sequences of characters @@ -460,7 +455,7 @@ namespace sw @see #i22537# for example */ CharRuns GetPseudoCharRuns(const SwTextNode& rTextNd, - sal_Int32 nStart = 0, bool bSplitOnCharSet = false); + sal_Int32 nStart = 0); } } diff --git a/sw/source/filter/ww8/writerwordglue.cxx b/sw/source/filter/ww8/writerwordglue.cxx index 50892e443e8b..9827113c052d 100644 --- a/sw/source/filter/ww8/writerwordglue.cxx +++ b/sw/source/filter/ww8/writerwordglue.cxx @@ -518,7 +518,7 @@ namespace sw } CharRuns GetPseudoCharRuns(const SwTextNode& rTextNd, - sal_Int32 nTextStart, bool bSplitOnCharSet) + sal_Int32 nTextStart) { const OUString &rText = rTextNd.GetText(); @@ -556,16 +556,11 @@ namespace sw typedef std::vector<DirEntry> DirChanges; typedef DirChanges::const_iterator cDirIter; - typedef std::pair<sal_Int32, sal_Int16> CharSetEntry; - typedef std::vector<CharSetEntry> CharSetChanges; - typedef CharSetChanges::const_iterator cCharSetIter; - typedef std::pair<sal_Int32, sal_uInt16> ScriptEntry; typedef std::vector<ScriptEntry> ScriptChanges; typedef ScriptChanges::const_iterator cScriptIter; DirChanges aDirChanges; - CharSetChanges aCharSets; ScriptChanges aScripts; UBiDiDirection eDefaultDir = bParaIsRTL ? UBIDI_RTL : UBIDI_LTR; @@ -599,28 +594,6 @@ namespace sw } ubidi_close(pBidi); - if (bSplitOnCharSet) - { - //Split unicode text into plausible 8bit ranges for export to - //older non unicode aware format - sal_Int32 nLen = rText.getLength(); - sal_Int32 nPos = 0; - while (nPos != nLen) - { - rtl_TextEncoding ScriptType = - getBestMSEncodingByChar(rText[nPos++]); - while ( - (nPos != nLen) && - (ScriptType == getBestMSEncodingByChar(rText[nPos])) - ) - { - ++nPos; - } - - aCharSets.push_back(CharSetEntry(nPos, ScriptType)); - } - } - using sw::types::writer_cast; if (g_pBreakIt && g_pBreakIt->GetBreakIter().is()) @@ -640,18 +613,15 @@ namespace sw } cDirIter aBiDiEnd = aDirChanges.end(); - cCharSetIter aCharSetEnd = aCharSets.end(); cScriptIter aScriptEnd = aScripts.end(); cDirIter aBiDiIter = aDirChanges.begin(); - cCharSetIter aCharSetIter = aCharSets.begin(); cScriptIter aScriptIter = aScripts.begin(); bool bCharIsRTL = bParaIsRTL; while ( aBiDiIter != aBiDiEnd || - aCharSetIter != aCharSetEnd || aScriptIter != aScriptEnd ) { @@ -664,13 +634,6 @@ namespace sw bCharIsRTL = aBiDiIter->second; } - if (aCharSetIter != aCharSetEnd) - { - if (aCharSetIter->first < nMinPos) - nMinPos = aCharSetIter->first; - eChrSet = aCharSetIter->second; - } - if (aScriptIter != aScriptEnd) { if (aScriptIter->first < nMinPos) @@ -687,12 +650,6 @@ namespace sw ++aBiDiIter; } - if (aCharSetIter != aCharSetEnd) - { - if (aCharSetIter->first == nMinPos) - ++aCharSetIter; - } - if (aScriptIter != aScriptEnd) { if (aScriptIter->first == nMinPos) diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx index 62946c8ab15b..ff71f2bd3294 100644 --- a/sw/source/filter/ww8/wrtw8nds.cxx +++ b/sw/source/filter/ww8/wrtw8nds.cxx @@ -179,7 +179,7 @@ void SwWW8AttrIter::IterToCurrent() SwWW8AttrIter::SwWW8AttrIter(MSWordExportBase& rWr, const SwTextNode& rTextNd) : MSWordAttrIter(rWr), rNd(rTextNd), - maCharRuns(GetPseudoCharRuns(rTextNd, 0, false)), + maCharRuns(GetPseudoCharRuns(rTextNd, 0)), pCurRedline(0), nAktSwPos(0), nCurRedlinePos(USHRT_MAX), |