diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-09-09 23:36:10 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-09-12 09:09:59 +0100 |
commit | 97a13a600b9d07d3255cbf955d027cd068a2beda (patch) | |
tree | 8569c00b952cba56940fb92d608d3f331601a7b6 /cui | |
parent | make slideshow ByteString free (diff) | |
download | core-97a13a600b9d07d3255cbf955d027cd068a2beda.tar.gz core-97a13a600b9d07d3255cbf955d027cd068a2beda.zip |
make cui ByteString free
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/tabpages/autocdlg.cxx | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx index 9fc514a083da..a5bcab64f949 100644 --- a/cui/source/tabpages/autocdlg.cxx +++ b/cui/source/tabpages/autocdlg.cxx @@ -52,6 +52,7 @@ #include <svx/SmartTagMgr.hxx> #include <com/sun/star/smarttags/XSmartTagRecognizer.hpp> #include <com/sun/star/smarttags/XSmartTagAction.hpp> +#include <rtl/strbuf.hxx> #define _OFA_AUTOCDLG_CXX #include "autocdlg.hxx" @@ -2460,8 +2461,8 @@ void OfaAutoCompleteTabPage::CopyToClipboard() const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > xRef( pCntnr ); - ByteString sData; - const sal_Char* pLineEnd = + rtl::OStringBuffer sData; + const sal_Char aLineEnd[] = #if defined(UNX) "\012"; #else @@ -2472,10 +2473,11 @@ void OfaAutoCompleteTabPage::CopyToClipboard() const for( sal_uInt16 n = 0; n < nSelCnt; ++n ) { - sData += ByteString( aLBEntries.GetSelectEntry( n ), nEncode ); - sData += pLineEnd; + sData.append(rtl::OUStringToOString(aLBEntries.GetSelectEntry(n), + nEncode)); + sData.append(RTL_CONSTASCII_STRINGPARAM(aLineEnd)); } - pCntnr->CopyByteString( SOT_FORMAT_STRING, sData ); + pCntnr->CopyByteString( SOT_FORMAT_STRING, sData.makeStringAndClear() ); pCntnr->CopyToClipboard( (Window*)this ); } } |