convert remnants of String to OUString in filter module
Change-Id: I83cea804b73d9219019354223bd2c966f52c5688
This commit is contained in:
@@ -629,7 +629,7 @@ EquationResult Read_SubF_Combined(WW8ReadFieldParams& rReadParam)
|
|||||||
{
|
{
|
||||||
EquationResult aResult;
|
EquationResult aResult;
|
||||||
|
|
||||||
String sCombinedCharacters;
|
OUString sCombinedCharacters;
|
||||||
WW8ReadFieldParams aOriFldParam = rReadParam;
|
WW8ReadFieldParams aOriFldParam = rReadParam;
|
||||||
const sal_Int32 cGetChar = rReadParam.SkipToNextToken();
|
const sal_Int32 cGetChar = rReadParam.SkipToNextToken();
|
||||||
switch( cGetChar )
|
switch( cGetChar )
|
||||||
@@ -659,43 +659,42 @@ EquationResult Read_SubF_Combined(WW8ReadFieldParams& rReadParam)
|
|||||||
{
|
{
|
||||||
if (-2 == rReadParam.SkipToNextToken())
|
if (-2 == rReadParam.SkipToNextToken())
|
||||||
{
|
{
|
||||||
String sPart = rReadParam.GetResult();
|
OUString sPart = rReadParam.GetResult();
|
||||||
xub_StrLen nBegin = sPart.Search('(');
|
sal_Int32 nBegin = sPart.indexOf('(');
|
||||||
|
|
||||||
//Word disallows brackets in this field, which
|
//Word disallows brackets in this field, which
|
||||||
//aids figuring out the case of an end of )) vs )
|
//aids figuring out the case of an end of )) vs )
|
||||||
xub_StrLen nEnd = sPart.Search(')');
|
sal_Int32 nEnd = sPart.indexOf(')');
|
||||||
|
|
||||||
if ((nBegin != STRING_NOTFOUND) &&
|
if (nBegin != -1 && nEnd != -1)
|
||||||
(nEnd != STRING_NOTFOUND))
|
|
||||||
{
|
{
|
||||||
sCombinedCharacters +=
|
sCombinedCharacters +=
|
||||||
sPart.Copy(nBegin+1,nEnd-nBegin-1);
|
sPart.copy(nBegin+1,nEnd-nBegin-1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (sCombinedCharacters.Len())
|
if (!sCombinedCharacters.isEmpty())
|
||||||
{
|
{
|
||||||
aResult.sType = "CombinedCharacters";
|
aResult.sType = "CombinedCharacters";
|
||||||
aResult.sResult = sCombinedCharacters;
|
aResult.sResult = sCombinedCharacters;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
const String sPart = aOriFldParam.GetResult();
|
const OUString sPart = aOriFldParam.GetResult();
|
||||||
xub_StrLen nBegin = sPart.Search('(');
|
sal_Int32 nBegin = sPart.indexOf('(');
|
||||||
xub_StrLen nEnd = sPart.Search(',');
|
sal_Int32 nEnd = sPart.indexOf(',');
|
||||||
if ( nEnd == STRING_NOTFOUND )
|
if ( nEnd == -1 )
|
||||||
{
|
{
|
||||||
nEnd = sPart.Search(')');
|
nEnd = sPart.indexOf(')');
|
||||||
}
|
}
|
||||||
if ( (nBegin != STRING_NOTFOUND) && (nEnd != STRING_NOTFOUND) )
|
if ( nBegin != -1 && nEnd != -1 )
|
||||||
{
|
{
|
||||||
// skip certain leading characters
|
// skip certain leading characters
|
||||||
for (int i = nBegin;i < nEnd-1;i++)
|
for (int i = nBegin;i < nEnd-1;i++)
|
||||||
{
|
{
|
||||||
const sal_Unicode cC = sPart.GetChar(nBegin+1);
|
const sal_Unicode cC = sPart[nBegin+1];
|
||||||
if ( cC < 32 )
|
if ( cC < 32 )
|
||||||
{
|
{
|
||||||
nBegin++;
|
nBegin++;
|
||||||
@@ -703,8 +702,8 @@ EquationResult Read_SubF_Combined(WW8ReadFieldParams& rReadParam)
|
|||||||
else
|
else
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
sCombinedCharacters = sPart.Copy( nBegin+1, nEnd-nBegin-1 );
|
sCombinedCharacters = sPart.copy( nBegin+1, nEnd-nBegin-1 );
|
||||||
if ( sCombinedCharacters.Len() )
|
if ( !sCombinedCharacters.isEmpty() )
|
||||||
{
|
{
|
||||||
aResult.sType = "Input";
|
aResult.sType = "Input";
|
||||||
aResult.sResult = sCombinedCharacters;
|
aResult.sResult = sCombinedCharacters;
|
||||||
|
Reference in New Issue
Block a user