summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-09-09 23:36:10 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-09-12 09:09:59 +0100
commit97a13a600b9d07d3255cbf955d027cd068a2beda (patch)
tree8569c00b952cba56940fb92d608d3f331601a7b6 /cui
parent6b72a64543a73e8f57b31dab8d0882a1673c7f85 (diff)
make cui ByteString free
Diffstat (limited to 'cui')
-rw-r--r--cui/source/tabpages/autocdlg.cxx12
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 );
}
}