summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-09-09 15:59:31 +0200
committerNoel Grandin <noel@peralex.com>2013-09-11 09:45:36 +0200
commit832e5dc89a7d04f3724bae2f4e1dae5f1e3ddd96 (patch)
tree5ab77fc3741fe261110f606e77abf213a3f1b269 /editeng
parentb7c58f553296bb6f5bd85108dd26f0180fac5e4a (diff)
covnert editeng/source/editeng/impedit.hxx from String to OUString
Change-Id: I68ce6c002085b7c5abfd31c284ab2afa0bd233ad
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/editeng/impedit.cxx6
-rw-r--r--editeng/source/editeng/impedit.hxx38
-rw-r--r--editeng/source/editeng/impedit2.cxx10
-rw-r--r--editeng/source/editeng/impedit4.cxx12
-rw-r--r--editeng/source/editeng/impedit5.cxx2
5 files changed, 34 insertions, 34 deletions
diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx
index c0d98e957a5f..6b610a452e27 100644
--- a/editeng/source/editeng/impedit.cxx
+++ b/editeng/source/editeng/impedit.cxx
@@ -1098,9 +1098,9 @@ sal_Bool ImpEditView::IsWrongSpelledWord( const EditPaM& rPaM, sal_Bool bMarkIfW
return bIsWrong;
}
-String ImpEditView::SpellIgnoreOrAddWord( sal_Bool bAdd )
+OUString ImpEditView::SpellIgnoreOrAddWord( sal_Bool bAdd )
{
- String aWord;
+ OUString aWord;
if ( pEditEngine->pImpEditEngine->GetSpeller().is() )
{
EditPaM aPaM = GetEditSelection().Max();
@@ -1118,7 +1118,7 @@ String ImpEditView::SpellIgnoreOrAddWord( sal_Bool bAdd )
DrawSelection();
}
- if ( aWord.Len() )
+ if ( !aWord.isEmpty() )
{
if ( bAdd )
{
diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx
index 9e43df306544..2ded5c5f6fb2 100644
--- a/editeng/source/editeng/impedit.hxx
+++ b/editeng/source/editeng/impedit.hxx
@@ -134,14 +134,14 @@ struct DragAndDropInfo
struct ImplIMEInfos
{
- String aOldTextAfterStartPos;
+ OUString aOldTextAfterStartPos;
sal_uInt16* pAttribs;
EditPaM aPos;
sal_uInt16 nLen;
sal_Bool bCursor;
sal_Bool bWasCursorOverwrite;
- ImplIMEInfos( const EditPaM& rPos, const String& rOldTextAfterStartPos );
+ ImplIMEInfos( const EditPaM& rPos, const OUString& rOldTextAfterStartPos );
~ImplIMEInfos();
void CopyAttribs( const sal_uInt16* pA, sal_uInt16 nL );
@@ -341,28 +341,28 @@ public:
Pair Scroll( long ndX, long ndY, sal_uInt8 nRangeCheck = RGCHK_NEG );
void SetInsertMode( sal_Bool bInsert );
- sal_Bool IsInsertMode() const { return ( ( nControl & EV_CNTRL_OVERWRITE ) == 0 ); }
+ sal_Bool IsInsertMode() const { return ( ( nControl & EV_CNTRL_OVERWRITE ) == 0 ); }
- void EnablePaste( sal_Bool bEnable ) { SetFlags( nControl, EV_CNTRL_ENABLEPASTE, bEnable ); }
- sal_Bool IsPasteEnabled() const { return ( ( nControl & EV_CNTRL_ENABLEPASTE ) != 0 ); }
+ void EnablePaste( sal_Bool bEnable ) { SetFlags( nControl, EV_CNTRL_ENABLEPASTE, bEnable ); }
+ sal_Bool IsPasteEnabled() const { return ( ( nControl & EV_CNTRL_ENABLEPASTE ) != 0 ); }
- sal_Bool DoSingleLinePaste() const { return ( ( nControl & EV_CNTRL_SINGLELINEPASTE ) != 0 ); }
- sal_Bool DoAutoScroll() const { return ( ( nControl & EV_CNTRL_AUTOSCROLL ) != 0 ); }
- sal_Bool DoBigScroll() const { return ( ( nControl & EV_CNTRL_BIGSCROLL ) != 0 ); }
- sal_Bool DoAutoSize() const { return ( ( nControl & EV_CNTRL_AUTOSIZE ) != 0 ); }
- sal_Bool DoAutoWidth() const { return ( ( nControl & EV_CNTRL_AUTOSIZEX) != 0 ); }
- sal_Bool DoAutoHeight() const { return ( ( nControl & EV_CNTRL_AUTOSIZEY) != 0 ); }
- sal_Bool DoInvalidateMore() const { return ( ( nControl & EV_CNTRL_INVONEMORE ) != 0 ); }
+ sal_Bool DoSingleLinePaste() const { return ( ( nControl & EV_CNTRL_SINGLELINEPASTE ) != 0 ); }
+ sal_Bool DoAutoScroll() const { return ( ( nControl & EV_CNTRL_AUTOSCROLL ) != 0 ); }
+ sal_Bool DoBigScroll() const { return ( ( nControl & EV_CNTRL_BIGSCROLL ) != 0 ); }
+ sal_Bool DoAutoSize() const { return ( ( nControl & EV_CNTRL_AUTOSIZE ) != 0 ); }
+ sal_Bool DoAutoWidth() const { return ( ( nControl & EV_CNTRL_AUTOSIZEX) != 0 ); }
+ sal_Bool DoAutoHeight() const { return ( ( nControl & EV_CNTRL_AUTOSIZEY) != 0 ); }
+ sal_Bool DoInvalidateMore() const { return ( ( nControl & EV_CNTRL_INVONEMORE ) != 0 ); }
void SetBackgroundColor( const Color& rColor );
const Color& GetBackgroundColor() const {
return ( pBackgroundColor ? *pBackgroundColor : pOutWin->GetBackground().GetColor() ); }
- sal_Bool IsWrongSpelledWord( const EditPaM& rPaM, sal_Bool bMarkIfWrong );
- String SpellIgnoreOrAddWord( sal_Bool bAdd );
+ sal_Bool IsWrongSpelledWord( const EditPaM& rPaM, sal_Bool bMarkIfWrong );
+ OUString SpellIgnoreOrAddWord( sal_Bool bAdd );
const SvxFieldItem* GetField( const Point& rPos, sal_Int32* pPara, sal_uInt16* pPos ) const;
- void DeleteSelected();
+ void DeleteSelected();
// If possible invalidate more than OutputArea, for the DrawingEngine text frame
void SetInvalidateMore( sal_uInt16 nPixel ) { nInvMore = nPixel; }
@@ -608,7 +608,7 @@ private:
EditPaM ReadText( SvStream& rInput, EditSelection aSel );
EditPaM ReadRTF( SvStream& rInput, EditSelection aSel );
EditPaM ReadXML( SvStream& rInput, EditSelection aSel );
- EditPaM ReadHTML( SvStream& rInput, const String& rBaseURL, EditSelection aSel, SvKeyValueIterator* pHTTPHeaderAttrs );
+ EditPaM ReadHTML( SvStream& rInput, const OUString& rBaseURL, EditSelection aSel, SvKeyValueIterator* pHTTPHeaderAttrs );
EditPaM ReadBin( SvStream& rInput, EditSelection aSel );
sal_uInt32 WriteText( SvStream& rOutput, EditSelection aSel );
sal_uInt32 WriteRTF( SvStream& rOutput, EditSelection aSel );
@@ -767,7 +767,7 @@ public:
EditPaM InsertField(const EditSelection& rCurSel, const SvxFieldItem& rFld);
sal_Bool UpdateFields();
- EditPaM Read( SvStream& rInput, const String& rBaseURL, EETextFormat eFormat, EditSelection aSel, SvKeyValueIterator* pHTTPHeaderAttrs = NULL );
+ EditPaM Read( SvStream& rInput, const OUString& rBaseURL, EETextFormat eFormat, EditSelection aSel, SvKeyValueIterator* pHTTPHeaderAttrs = NULL );
void Write( SvStream& rOutput, EETextFormat eFormat, EditSelection aSel );
EditTextObject* CreateTextObject();
@@ -982,11 +982,11 @@ public:
void SetAutoCompleteText(const OUString& rStr, bool bUpdateTipWindow);
EditSelection TransliterateText( const EditSelection& rSelection, sal_Int32 nTransliterationMode );
- short ReplaceTextOnly( ContentNode* pNode, sal_uInt16 nCurrentStart, xub_StrLen nLen, const String& rText, const ::com::sun::star::uno::Sequence< sal_Int32 >& rOffsets );
+ short ReplaceTextOnly( ContentNode* pNode, sal_uInt16 nCurrentStart, xub_StrLen nLen, const OUString& rText, const ::com::sun::star::uno::Sequence< sal_Int32 >& rOffsets );
void SetAsianCompressionMode( sal_uInt16 n );
- sal_uInt16 GetAsianCompressionMode() const { return nAsianCompressionMode; }
+ sal_uInt16 GetAsianCompressionMode() const { return nAsianCompressionMode; }
void SetKernAsianPunctuation( bool b );
bool IsKernAsianPunctuation() const { return bKernAsianPunctuation; }
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx
index 17de955d0785..46c3b6146f53 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -423,21 +423,21 @@ void ImpEditEngine::Command( const CommandEvent& rCEvt, EditView* pView )
sal_Int32 nNewIMETextLen = pData->GetText().getLength();
if ( ( nOldIMETextLen > nNewIMETextLen ) &&
- ( nNewIMETextLen < mpIMEInfos->aOldTextAfterStartPos.Len() ) )
+ ( nNewIMETextLen < mpIMEInfos->aOldTextAfterStartPos.getLength() ) )
{
// restore old characters
sal_Int32 nRestore = nOldIMETextLen - nNewIMETextLen;
EditPaM aPaM( mpIMEInfos->aPos );
aPaM.GetIndex() = aPaM.GetIndex() + nNewIMETextLen;
- ImpInsertText( aPaM, mpIMEInfos->aOldTextAfterStartPos.Copy( nNewIMETextLen, nRestore ) );
+ ImpInsertText( aPaM, mpIMEInfos->aOldTextAfterStartPos.copy( nNewIMETextLen, nRestore ) );
}
else if ( ( nOldIMETextLen < nNewIMETextLen ) &&
- ( nOldIMETextLen < mpIMEInfos->aOldTextAfterStartPos.Len() ) )
+ ( nOldIMETextLen < mpIMEInfos->aOldTextAfterStartPos.getLength() ) )
{
// overwrite
sal_uInt16 nOverwrite = nNewIMETextLen - nOldIMETextLen;
- if ( ( nOldIMETextLen + nOverwrite ) > mpIMEInfos->aOldTextAfterStartPos.Len() )
- nOverwrite = mpIMEInfos->aOldTextAfterStartPos.Len() - nOldIMETextLen;
+ if ( ( nOldIMETextLen + nOverwrite ) > mpIMEInfos->aOldTextAfterStartPos.getLength() )
+ nOverwrite = mpIMEInfos->aOldTextAfterStartPos.getLength() - nOldIMETextLen;
OSL_ENSURE( nOverwrite && (nOverwrite < 0xFF00), "IME Overwrite?!" );
EditPaM aPaM( mpIMEInfos->aPos );
aPaM.GetIndex() = aPaM.GetIndex() + nNewIMETextLen;
diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx
index 946391bbf01e..7357d08e038d 100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -91,7 +91,7 @@ void Swapsal_uIt16s( sal_uInt16& rX, sal_uInt16& rY )
rY = n;
}
-EditPaM ImpEditEngine::Read( SvStream& rInput, const String& rBaseURL, EETextFormat eFormat, EditSelection aSel, SvKeyValueIterator* pHTTPHeaderAttrs )
+EditPaM ImpEditEngine::Read( SvStream& rInput, const OUString& rBaseURL, EETextFormat eFormat, EditSelection aSel, SvKeyValueIterator* pHTTPHeaderAttrs )
{
sal_Bool _bUpdate = GetUpdateMode();
SetUpdateMode( sal_False );
@@ -183,7 +183,7 @@ EditPaM ImpEditEngine::ReadRTF( SvStream& rInput, EditSelection aSel )
return xPrsr->GetCurPaM();
}
-EditPaM ImpEditEngine::ReadHTML( SvStream& rInput, const String& rBaseURL, EditSelection aSel, SvKeyValueIterator* pHTTPHeaderAttrs )
+EditPaM ImpEditEngine::ReadHTML( SvStream& rInput, const OUString& rBaseURL, EditSelection aSel, SvKeyValueIterator* pHTTPHeaderAttrs )
{
if ( aSel.HasRange() )
aSel = ImpDeleteSelection( aSel );
@@ -3046,7 +3046,7 @@ EditSelection ImpEditEngine::TransliterateText( const EditSelection& rSelection,
short ImpEditEngine::ReplaceTextOnly(
ContentNode* pNode,
sal_uInt16 nCurrentStart, xub_StrLen nLen,
- const String& rNewText,
+ const OUString& rNewText,
const uno::Sequence< sal_Int32 >& rOffsets )
{
(void) nLen;
@@ -3064,13 +3064,13 @@ short ImpEditEngine::ReplaceTextOnly(
if ( !nDiff )
{
DBG_ASSERT( nCurrentPos < pNode->Len(), "TransliterateText - String smaller than expected!" );
- pNode->SetChar( nCurrentPos, rNewText.GetChar(n) );
+ pNode->SetChar( nCurrentPos, rNewText[n] );
}
else if ( nDiff < 0 )
{
// Replace first char, delete the rest...
DBG_ASSERT( nCurrentPos < pNode->Len(), "TransliterateText - String smaller than expected!" );
- pNode->SetChar( nCurrentPos, rNewText.GetChar(n) );
+ pNode->SetChar( nCurrentPos, rNewText[n] );
DBG_ASSERT( (nCurrentPos+1) < pNode->Len(), "TransliterateText - String smaller than expected!" );
GetEditDoc().RemoveChars( EditPaM( pNode, nCurrentPos+1 ), sal::static_int_cast< sal_uInt16 >(-nDiff) );
@@ -3078,7 +3078,7 @@ short ImpEditEngine::ReplaceTextOnly(
else
{
DBG_ASSERT( nDiff == 1, "TransliterateText - Diff other than expected! But should work..." );
- GetEditDoc().InsertText( EditPaM( pNode, nCurrentPos ), OUString(rNewText.GetChar(n)) );
+ GetEditDoc().InsertText( EditPaM( pNode, nCurrentPos ), OUString(rNewText[n]) );
}
nDiffs = sal::static_int_cast< short >(nDiffs + nDiff);
diff --git a/editeng/source/editeng/impedit5.cxx b/editeng/source/editeng/impedit5.cxx
index 571cc817414c..3f2a195e0560 100644
--- a/editeng/source/editeng/impedit5.cxx
+++ b/editeng/source/editeng/impedit5.cxx
@@ -819,7 +819,7 @@ void IdleFormattter::ForceTimeout()
}
}
-ImplIMEInfos::ImplIMEInfos( const EditPaM& rPos, const String& rOldTextAfterStartPos )
+ImplIMEInfos::ImplIMEInfos( const EditPaM& rPos, const OUString& rOldTextAfterStartPos )
: aOldTextAfterStartPos( rOldTextAfterStartPos )
{
aPos = rPos;