diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-01-30 11:31:05 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-01-30 13:18:38 +0000 |
commit | bbc94edb9a91b27910d43610db9994df10dd99e1 (patch) | |
tree | 99f81b7bc96dd93ae6c6e6a4f7a57cfda72cdfa4 /cui | |
parent | 47e1e8494dde85414d28efafa99b33a62b59116d (diff) |
refactor ConvertLineEnd
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/dialogs/pastedlg.cxx | 2 | ||||
-rw-r--r-- | cui/source/dialogs/postdlg.cxx | 8 |
2 files changed, 6 insertions, 4 deletions
diff --git a/cui/source/dialogs/pastedlg.cxx b/cui/source/dialogs/pastedlg.cxx index 99cb18709094..105178240e19 100644 --- a/cui/source/dialogs/pastedlg.cxx +++ b/cui/source/dialogs/pastedlg.cxx @@ -226,7 +226,7 @@ sal_uLong SvPasteObjectDialog::GetFormat( const TransferableDataHelper& rHelper, aTypeName += '\n'; aTypeName += aSourceName; - aTypeName.ConvertLineEnd(); + aTypeName = convertLineEnd(aTypeName, GetSystemLineEnd()); } ObjectSource().SetText( aTypeName ); diff --git a/cui/source/dialogs/postdlg.cxx b/cui/source/dialogs/postdlg.cxx index ab5ed760d79f..0bb2a3e91743 100644 --- a/cui/source/dialogs/postdlg.cxx +++ b/cui/source/dialogs/postdlg.cxx @@ -112,7 +112,7 @@ SvxPostItDialog::SvxPostItDialog( Window* pParent, } nWhich = rSet.GetPool()->GetWhich( SID_ATTR_POSTIT_AUTHOR ); - String aAuthorStr, aDateStr, aTextStr; + String aAuthorStr, aDateStr; if ( rSet.GetItemState( nWhich, sal_True ) >= SFX_ITEM_AVAILABLE ) { @@ -140,6 +140,7 @@ SvxPostItDialog::SvxPostItDialog( Window* pParent, nWhich = rSet.GetPool()->GetWhich( SID_ATTR_POSTIT_TEXT ); + rtl::OUString aTextStr; if ( rSet.GetItemState( nWhich, sal_True ) >= SFX_ITEM_AVAILABLE ) { const SvxPostItTextItem& rText = @@ -148,7 +149,7 @@ SvxPostItDialog::SvxPostItDialog( Window* pParent, } ShowLastAuthor(aAuthorStr, aDateStr); - aEditED.SetText( aTextStr.ConvertLineEnd() ); + aEditED.SetText(convertLineEnd(aTextStr, GetSystemLineEnd())); if ( !bNew ) SetText( CUI_RESSTR( STR_NOTIZ_EDIT ) ); @@ -235,8 +236,9 @@ IMPL_LINK( SvxPostItDialog, Stamp, Button *, EMPTYARG ) aStr += aLocaleWrapper.getTime(aTime, sal_False, sal_False); aStr.AppendAscii( RTL_CONSTASCII_STRINGPARAM( " ----\n" ) ); + aStr = convertLineEnd(aStr, GetSystemLineEnd()); - aEditED.SetText( aStr.ConvertLineEnd() ); + aEditED.SetText(aStr); xub_StrLen nLen = aStr.Len(); aEditED.GrabFocus(); aEditED.SetSelection( Selection( nLen, nLen ) ); |