From e735b48e2107a0ee1a9553a6bc4d09d1d176b370 Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Tue, 22 Apr 2014 11:45:25 +0000 Subject: Resolves: #i63399# add to clipboard as URL only when... no fill and no line style, just a simple URL (cherry picked from commit a91b5943b2c971ff1e69f5c2da45b8a647562676) Change-Id: Ic8bd02c81663575355a0ca79e4987b5ef0e4a445 --- sd/source/ui/app/sdxfer.cxx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'sd') diff --git a/sd/source/ui/app/sdxfer.cxx b/sd/source/ui/app/sdxfer.cxx index c0b58a87bdca..d155f5c7e84f 100644 --- a/sd/source/ui/app/sdxfer.cxx +++ b/sd/source/ui/app/sdxfer.cxx @@ -225,7 +225,16 @@ void SdTransferable::CreateObjectReplacement( SdrObject* pObj ) { const SvxURLField* pURL = (SvxURLField*) pData; - mpBookmark = new INetBookmark( pURL->GetURL(), pURL->GetRepresentation() ); + // #i63399# This special code identifies TextFrames which have just an URL + // as content and directly add this to the clipboard, probably to avoid adding + // an unnecessary DrawObject to the target where paste may take place. This is + // wanted only for SdrObjects with no fill and no line, else it is necessary to + // use the whole SdrObect. Test here for Line/FillStyle and take shortcut only + // when both are unused + if(!pObj->HasFillStyle() && !pObj->HasLineStyle()) + { + mpBookmark = new INetBookmark( pURL->GetURL(), pURL->GetRepresentation() ); + } } } } -- cgit