summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
Diffstat (limited to 'svx')
-rw-r--r--svx/source/unodraw/unoprov.cxx22
1 files changed, 17 insertions, 5 deletions
diff --git a/svx/source/unodraw/unoprov.cxx b/svx/source/unodraw/unoprov.cxx
index 891423952aff..639b8c798d39 100644
--- a/svx/source/unodraw/unoprov.cxx
+++ b/svx/source/unodraw/unoprov.cxx
@@ -1838,12 +1838,24 @@ static bool SvxUnoConvertResourceStringBuiltIn(const char** pSourceResIds, const
for(int i = 0; i < nCount; ++i )
{
- OUString aStrDefName = bToApi ? SvxResId(pSourceResIds[i]) : OUString::createFromAscii(pSourceResIds[i]);
- if( sStr == aStrDefName )
+ if (bToApi)
+ {
+ OUString aStrDefName = SvxResId(pSourceResIds[i]);
+ if( sStr == aStrDefName )
+ {
+ OUString aReplace = OUString::createFromAscii(pDestResIds[i]);
+ rString = rString.replaceAt( 0, aStrDefName.getLength(), aReplace );
+ return true;
+ }
+ }
+ else
{
- OUString aReplace = bToApi ? OUString::createFromAscii(pDestResIds[i]) : SvxResId(pDestResIds[i]);
- rString = rString.replaceAt( 0, aStrDefName.getLength(), aReplace );
- return true;
+ if( sStr.equalsAscii(pSourceResIds[i]) )
+ {
+ OUString aReplace = SvxResId(pDestResIds[i]);
+ rString = rString.replaceAt( 0, strlen(pSourceResIds[i]), aReplace );
+ return true;
+ }
}
}