diff options
Diffstat (limited to 'vcl/source/edit/textview.cxx')
-rw-r--r-- | vcl/source/edit/textview.cxx | 30 |
1 files changed, 1 insertions, 29 deletions
diff --git a/vcl/source/edit/textview.cxx b/vcl/source/edit/textview.cxx index 366aa5bfaf6a..ae9fac5aba7f 100644 --- a/vcl/source/edit/textview.cxx +++ b/vcl/source/edit/textview.cxx @@ -1038,9 +1038,6 @@ void TextView::Copy( css::uno::Reference< css::datatransfer::clipboard::XClipboa { TETextDataObject* pDataObj = new TETextDataObject( GetSelected() ); - if ( mpImpl->mpTextEngine->HasAttrib( TEXTATTR_HYPERLINK ) ) // then also as HTML - mpImpl->mpTextEngine->Write( pDataObj->GetHTMLStream(), &mpImpl->maSelection, true ); - SolarMutexReleaser aReleaser; try @@ -1752,11 +1749,10 @@ bool TextView::IsSelectionAtPoint( const Point& rPosPixel ) { Point aDocPos = GetDocPos( rPosPixel ); TextPaM aPaM = mpImpl->mpTextEngine->GetPaM( aDocPos ); - // For Hyperlinks D&D also start w/o a selection. // BeginDrag is only called, however, if IsSelectionAtPoint() // Problem: IsSelectionAtPoint is not called by Command() // if before MBDown returned false. - return IsInSelection( aPaM ) || mpImpl->mpTextEngine->FindAttrib( aPaM, TEXTATTR_HYPERLINK ); + return IsInSelection( aPaM ); } bool TextView::IsInSelection( const TextPaM& rPaM ) @@ -1882,30 +1878,6 @@ void TextView::dragGestureRecognized( const css::datatransfer::dnd::DragGestureE TETextDataObject* pDataObj = new TETextDataObject( GetSelected() ); - if ( mpImpl->mpTextEngine->HasAttrib( TEXTATTR_HYPERLINK ) ) // then also as HTML - mpImpl->mpTextEngine->Write( pDataObj->GetHTMLStream(), &mpImpl->maSelection, true ); - - /* - // D&D of a Hyperlink - // TODO: Better would be to store MBDownPaM in MBDown, - // but this would be incompatible => change later - TextPaM aPaM( mpImpl->mpTextEngine->GetPaM( GetDocPos( GetWindow()->GetPointerPosPixel() ) ) ); - const TextCharAttrib* pAttr = mpImpl->mpTextEngine->FindCharAttrib( aPaM, TEXTATTR_HYPERLINK ); - if ( pAttr ) - { - aSel = aPaM; - aSel.GetStart().GetIndex() = pAttr->GetStart(); - aSel.GetEnd().GetIndex() = pAttr->GetEnd(); - - const TextAttribHyperLink& rLink = (const TextAttribHyperLink&)pAttr->GetAttr(); - String aText( rLink.GetDescription() ); - if ( !aText.Len() ) - aText = mpImpl->mpTextEngine->GetText( aSel ); - INetBookmark aBookmark( rLink.GetURL(), aText ); - aBookmark.CopyDragServer(); - } - */ - mpImpl->mpCursor->Hide(); sal_Int8 nActions = css::datatransfer::dnd::DNDConstants::ACTION_COPY; |