summaryrefslogtreecommitdiff
path: root/vcl/source/control/edit.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/control/edit.cxx')
-rw-r--r--vcl/source/control/edit.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index 5699124a9cde..d1322a4dcc65 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -282,8 +282,7 @@ void Edit::ImplInitEditData()
// note: controls that use a subedit will revert this (SpinField, ComboBox)
EnableRTL( false );
- vcl::unohelper::DragAndDropWrapper* pDnDWrapper = new vcl::unohelper::DragAndDropWrapper( this );
- mxDnDListener = pDnDWrapper;
+ mxDnDListener = new vcl::unohelper::DragAndDropWrapper( this );
}
bool Edit::ImplUseNativeBorder(vcl::RenderContext const & rRenderContext, WinBits nStyle)
@@ -2077,7 +2076,7 @@ void Edit::Command( const CommandEvent& rCEvt )
{
// restore old characters
const sal_Int32 nRestore = nOldIMETextLen - nNewIMETextLen;
- maText.insert( mpIMEInfos->nPos + nNewIMETextLen, mpIMEInfos->aOldTextAfterStartPos.copy( nNewIMETextLen, nRestore ) );
+ maText.insert( mpIMEInfos->nPos + nNewIMETextLen, mpIMEInfos->aOldTextAfterStartPos.subView( nNewIMETextLen, nRestore ) );
}
else if ( ( nOldIMETextLen < nNewIMETextLen ) &&
( nOldIMETextLen < mpIMEInfos->aOldTextAfterStartPos.getLength() ) )
@@ -2757,7 +2756,7 @@ void Edit::dragGestureRecognized( const css::datatransfer::dnd::DragGestureEvent
if ( IsTracking() )
EndTracking(); // before D&D disable tracking
- vcl::unohelper::TextDataObject* pDataObj = new vcl::unohelper::TextDataObject( GetSelected() );
+ rtl::Reference<vcl::unohelper::TextDataObject> pDataObj = new vcl::unohelper::TextDataObject( GetSelected() );
sal_Int8 nActions = datatransfer::dnd::DNDConstants::ACTION_COPY;
if ( !IsReadOnly() )
nActions |= datatransfer::dnd::DNDConstants::ACTION_MOVE;