Kaydet (Commit) c3f9fa6f authored tarafından Michael Stahl's avatar Michael Stahl

sw: WW8 export: GetPseudoCharRuns() parameter bSplitOnCharSet is obsolete

Change-Id: Icd1fbf247e63c92c8a51de78eb70e9b8e5f03b5e
üst 55835249
......@@ -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);
}
}
......
......@@ -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)
......
......@@ -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),
......
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