diff options
author | Ivan Timofeev <timofeev.i.s@gmail.com> | 2013-08-11 21:36:15 +0400 |
---|---|---|
committer | Ivan Timofeev <timofeev.i.s@gmail.com> | 2013-08-11 21:53:59 +0400 |
commit | d08a76cf72e1d1db9add8b01f4e93c4b4ba4dd15 (patch) | |
tree | 4b30780ff8a05fadb413b7b01d34268875f40a16 /editeng | |
parent | de973a371c64ef796956d67fd18e4a62a451abc8 (diff) |
String->OUString
Change-Id: I49e0e589c4bad3706882c9e30fe4f6bf8bdd7f1d
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/editeng/editeng.cxx | 10 | ||||
-rw-r--r-- | editeng/source/editeng/impedit.hxx | 3 | ||||
-rw-r--r-- | editeng/source/editeng/impedit2.cxx | 3 | ||||
-rw-r--r-- | editeng/source/outliner/outlin2.cxx | 4 | ||||
-rw-r--r-- | editeng/source/outliner/outlvw.cxx | 6 |
5 files changed, 11 insertions, 15 deletions
diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx index 9bf29e5c2e9b..0684bfe0782d 100644 --- a/editeng/source/editeng/editeng.cxx +++ b/editeng/source/editeng/editeng.cxx @@ -1359,7 +1359,7 @@ sal_Bool EditEngine::PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pEditVie // Only at end of word... sal_uInt16 nIndex = aCurSel.Max().GetIndex(); if ( ( nIndex >= aCurSel.Max().GetNode()->Len() ) || - ( pImpEditEngine->aWordDelimiters.Search( aCurSel.Max().GetNode()->GetChar( nIndex ) ) != STRING_NOTFOUND ) ) + ( pImpEditEngine->aWordDelimiters.indexOf( aCurSel.Max().GetNode()->GetChar( nIndex ) ) != -1 ) ) { EditPaM aStart( pImpEditEngine->WordLeft( aCurSel.Max() ) ); String aWord = pImpEditEngine->GetSelected( EditSelection( aStart, aCurSel.Max() ) ); @@ -2246,15 +2246,15 @@ SfxStyleSheetPool* EditEngine::GetStyleSheetPool() return pImpEditEngine->GetStyleSheetPool(); } -void EditEngine::SetWordDelimiters( const XubString& rDelimiters ) +void EditEngine::SetWordDelimiters( const OUString& rDelimiters ) { DBG_CHKTHIS( EditEngine, 0 ); pImpEditEngine->aWordDelimiters = rDelimiters; - if ( pImpEditEngine->aWordDelimiters.Search( CH_FEATURE ) == STRING_NOTFOUND ) - pImpEditEngine->aWordDelimiters.Insert( CH_FEATURE ); + if (pImpEditEngine->aWordDelimiters.indexOf(CH_FEATURE) == -1) + pImpEditEngine->aWordDelimiters += OUString(CH_FEATURE); } -XubString EditEngine::GetWordDelimiters() const +OUString EditEngine::GetWordDelimiters() const { DBG_CHKTHIS( EditEngine, 0 ); return pImpEditEngine->aWordDelimiters; diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx index 55b98f15fcb6..92bcac41b144 100644 --- a/editeng/source/editeng/impedit.hxx +++ b/editeng/source/editeng/impedit.hxx @@ -412,8 +412,7 @@ private: std::vector<EENotify> aNotifyCache; - XubString aWordDelimiters; - XubString aGroupChars; + OUString aWordDelimiters; EditSelFunctionSet aSelFuncSet; EditSelectionEngine aSelEngine; diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx index bba2f2a5dcf7..1503a7b869dc 100644 --- a/editeng/source/editeng/impedit2.cxx +++ b/editeng/source/editeng/impedit2.cxx @@ -83,8 +83,7 @@ ImpEditEngine::ImpEditEngine( EditEngine* pEE, SfxItemPool* pItemPool ) : aMinAutoPaperSize( 0x0, 0x0 ), aMaxAutoPaperSize( 0x7FFFFFFF, 0x7FFFFFFF ), aEditDoc( pItemPool ), - aWordDelimiters( RTL_CONSTASCII_USTRINGPARAM( " .,;:-'`'?!_=\"{}()[]\0xFF" ) ), - aGroupChars( RTL_CONSTASCII_USTRINGPARAM( "{}()[]" ) ), + aWordDelimiters(" .,;:-'`'?!_=\"{}()[]\0xFF"), bKernAsianPunctuation(false), bAddExtLeading(false), bIsFormatting(false), diff --git a/editeng/source/outliner/outlin2.cxx b/editeng/source/outliner/outlin2.cxx index a5251a1c5d46..ff8bc7449e59 100644 --- a/editeng/source/outliner/outlin2.cxx +++ b/editeng/source/outliner/outlin2.cxx @@ -181,13 +181,13 @@ void Outliner::RemoveFields( sal_Bool bKeepFieldText, TypeId aType ) pEditEngine->RemoveFields( bKeepFieldText, aType ); } -void Outliner::SetWordDelimiters( const String& rDelimiters ) +void Outliner::SetWordDelimiters( const OUString& rDelimiters ) { DBG_CHKTHIS(Outliner,0); pEditEngine->SetWordDelimiters( rDelimiters ); } -String Outliner::GetWordDelimiters() const +OUString Outliner::GetWordDelimiters() const { DBG_CHKTHIS(Outliner,0); return pEditEngine->GetWordDelimiters(); diff --git a/editeng/source/outliner/outlvw.cxx b/editeng/source/outliner/outlvw.cxx index a72f2bc9c30a..a9701fe0880a 100644 --- a/editeng/source/outliner/outlvw.cxx +++ b/editeng/source/outliner/outlvw.cxx @@ -1562,7 +1562,7 @@ Selection OutlinerView::GetSurroundingTextSelection() const // returns: true if a word for thesaurus look-up was found at the current cursor position. // The status string will be word + iso language string (e.g. "light#en-US") bool EDITENG_DLLPUBLIC GetStatusValueForThesaurusFromContext( - String &rStatusVal, + OUString &rStatusVal, LanguageType &rLang, const EditView &rEditView ) { @@ -1578,9 +1578,7 @@ bool EDITENG_DLLPUBLIC GetStatusValueForThesaurusFromContext( OUString aLangText( LanguageTag::convertToBcp47( nLang ) ); // set word and locale to look up as status value - OUString aStatusVal= aText + "#" + aLangText; - - rStatusVal = aStatusVal; + rStatusVal = aText + "#" + aLangText; rLang = nLang; return aText.getLength() > 0; |