diff options
author | Michael Stahl <mstahl@redhat.com> | 2013-08-24 01:05:14 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2013-08-24 01:08:18 +0200 |
commit | 7b28b6cc6116856246ad2f339f5e6fb753197781 (patch) | |
tree | ad2652cc9ab0d8f98a63df54dd6854a754457ff0 /sw/inc/txatritr.hxx | |
parent | 087ee66013916bd009eb0b29460ef1868b4d755c (diff) |
fdo#68319: sw: fix Chinese Conversion
... and perhaps other things too: the SwScriptIterator constructor gets
passed a temporary String created by implicit conversion from OUString
and retains a reference to that; convert the thing to use OUString
(and adapt some sCleanStr too not to get the inverse problem...).
(regression from 0295c8a34e39326414c1b98cf4da905802f061b0)
Change-Id: I038ad0734385cdcae99ec404153f51ee427c7c64
Diffstat (limited to 'sw/inc/txatritr.hxx')
-rw-r--r-- | sw/inc/txatritr.hxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sw/inc/txatritr.hxx b/sw/inc/txatritr.hxx index 05ed48fb3dbf..b583f7334bd8 100644 --- a/sw/inc/txatritr.hxx +++ b/sw/inc/txatritr.hxx @@ -24,8 +24,8 @@ #include <editeng/langitem.hxx> #include <hintids.hxx> #include <deque> +#include <tools/string.hxx> -class String; class SwTxtNode; class SwTxtAttr; class SfxPoolItem; @@ -33,20 +33,20 @@ class SfxPoolItem; class SwScriptIterator { - const String& rText; - xub_StrLen nChgPos; + const OUString& m_rText; + sal_Int32 m_nChgPos; sal_uInt16 nCurScript; bool bForward; public: - SwScriptIterator( const String& rStr, xub_StrLen nStart = 0, + SwScriptIterator( const OUString& rStr, xub_StrLen nStart = 0, bool bFrwrd = true ); bool Next(); sal_uInt16 GetCurrScript() const { return nCurScript; } - xub_StrLen GetScriptChgPos() const { return nChgPos; } - const String& GetText() const { return rText; } + xub_StrLen GetScriptChgPos() const { return (m_nChgPos == -1) ? STRING_LEN : m_nChgPos; } + const OUString& GetText() const { return m_rText; } }; |