diff options
author | Noel Grandin <noel@peralex.com> | 2013-09-06 12:01:31 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-09-11 09:45:30 +0200 |
commit | ac85b6cff11d193f5f71d11b1f3cc1c474653f59 (patch) | |
tree | c39ae299f09d993b963613b6af9869fbd0d8403e /editeng/qa | |
parent | convert SvStringsISortDtor from OUString* to OUString (diff) | |
download | core-ac85b6cff11d193f5f71d11b1f3cc1c474653f59.tar.gz core-ac85b6cff11d193f5f71d11b1f3cc1c474653f59.zip |
convert SvxAutoCorrDoc from String to OUString
Also:
- simplify the return type of the GetPrevPara method, there is no
need return an OUString by pointer
- simply the ppPara parameter of the ChgAutoCorrWord method,
passing a pointer to a pointer to a value type is unnecessary.
Change-Id: I4a8c44fdab1cf68af88c34003827d1c20704f839
Diffstat (limited to 'editeng/qa')
-rw-r--r-- | editeng/qa/unit/core-test.cxx | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/editeng/qa/unit/core-test.cxx b/editeng/qa/unit/core-test.cxx index b1c100c48380..e8958e13d349 100644 --- a/editeng/qa/unit/core-test.cxx +++ b/editeng/qa/unit/core-test.cxx @@ -240,18 +240,18 @@ private: m_rText = m_rText.replaceAt(nStt, nEnd-nStt, ""); return true; } - virtual sal_Bool Insert( xub_StrLen nPos, const String& rTxt ) + virtual sal_Bool Insert( xub_StrLen nPos, const OUString& rTxt ) { //fprintf(stderr, "TestAutoCorrDoc::Insert\n"); m_rText = m_rText.replaceAt(nPos, 0, rTxt); return true; } - virtual sal_Bool Replace( xub_StrLen nPos, const String& rTxt ) + virtual sal_Bool Replace( xub_StrLen nPos, const OUString& rTxt ) { //fprintf(stderr, "TestAutoCorrDoc::Replace\n"); - return ReplaceRange( nPos, rTxt.Len(), rTxt ); + return ReplaceRange( nPos, rTxt.getLength(), rTxt ); } - virtual sal_Bool ReplaceRange( xub_StrLen nPos, xub_StrLen nLen, const String& rTxt ) + virtual sal_Bool ReplaceRange( xub_StrLen nPos, xub_StrLen nLen, const OUString& rTxt ) { //fprintf(stderr, "TestAutoCorrDoc::ReplaceRange %d %d %s\n", nPos, nLen, OUStringToOString(rTxt, RTL_TEXTENCODING_UTF8).getStr()); m_rText = m_rText.replaceAt(nPos, nLen, rTxt); @@ -267,14 +267,14 @@ private: //fprintf(stderr, "TestAutoCorrDoc::SetINetAttr\n"); return true; } - virtual const String* GetPrevPara( sal_Bool ) + virtual OUString GetPrevPara( sal_Bool ) { //fprintf(stderr, "TestAutoCorrDoc::GetPrevPara\n"); - return NULL; + return OUString(); } virtual sal_Bool ChgAutoCorrWord( sal_uInt16& rSttPos, sal_uInt16 nEndPos, SvxAutoCorrect& rACorrect, - const String** ppPara ) + OUString* pPara ) { //fprintf(stderr, "TestAutoCorrDoc::ChgAutoCorrWord\n"); @@ -286,8 +286,8 @@ private: if (pFnd && pFnd->IsTextOnly()) { m_rText = m_rText.replaceAt(rSttPos, nEndPos, pFnd->GetLong()); - if( ppPara ) - *ppPara = NULL;//&pCurNode->GetString(); + if( pPara ) + *pPara = "";//&pCurNode->GetString(); return true; } |