summaryrefslogtreecommitdiff
path: root/vcl/source/edit/textview.cxx
diff options
context:
space:
mode:
authorJochen Nitschke <j.nitschke+logerrit@ok.de>2017-08-11 10:30:04 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-08-11 13:44:29 +0200
commitdd8a400bbbb1b8d5592a870f2036a4df3d005a7d (patch)
treeb2ca1cf048b04f2fb1ba8b20f3ccf86d2f8e6b96 /vcl/source/edit/textview.cxx
parente7c0bd4df01744a744847a94c7a04746787e5157 (diff)
vcl: remove dead TextAttribHyperLink
couldn't even find a proper ctor beside copy-ctor since commit e19c00ed76f5d46c3b88d2721b9ac84fcaaed97c Date: Wed Jul 13 13:30:48 2011 +0200 callcatcher: remove unused TextAttrib stuff Change-Id: Ia7f0bd1dcc725beb8cc53bb82372a4cce3ec68b0 Reviewed-on: https://gerrit.libreoffice.org/41012 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/source/edit/textview.cxx')
-rw-r--r--vcl/source/edit/textview.cxx30
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;