diff options
author | Kurt Zenker <kz@openoffice.org> | 2008-04-02 08:49:50 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2008-04-02 08:49:50 +0000 |
commit | ae3b1984361755c8f2142e49980975e29a9fa3a2 (patch) | |
tree | 6625dfb595962feebad2e5c0e1b30115f4c774bf /sd | |
parent | 46d7f4c511ab47327b45f4b63f803c6b78b6b6f8 (diff) |
INTEGRATION: CWS impress139 (1.20.202); FILE MERGED
2008/03/17 12:48:05 cl 1.20.202.2: RESYNC: (1.20-1.21); FILE MERGED
2008/03/10 15:05:35 cl 1.20.202.1: #i86789# using selected text as names for new hyperlinks
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/view/drviewsf.cxx | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/sd/source/ui/view/drviewsf.cxx b/sd/source/ui/view/drviewsf.cxx index caa1fbf53..347e5a431 100644 --- a/sd/source/ui/view/drviewsf.cxx +++ b/sd/source/ui/view/drviewsf.cxx @@ -4,9 +4,9 @@ * * $RCSfile: drviewsf.cxx,v $ * - * $Revision: 1.21 $ + * $Revision: 1.22 $ * - * last change: $Author: rt $ $Date: 2008-03-12 11:58:00 $ + * last change: $Author: kz $ $Date: 2008-04-02 09:49:50 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -160,6 +160,7 @@ void DrawViewShell::GetCtrlState(SfxItemSet &rSet) if (pOLV) { + bool bField = false; const SvxFieldItem* pFieldItem = pOLV->GetFieldAtSelection(); if (pFieldItem) { @@ -172,9 +173,18 @@ void DrawViewShell::GetCtrlState(SfxItemSet &rSet) aHLinkItem.SetName(((const SvxURLField*) pField)->GetRepresentation()); aHLinkItem.SetURL(((const SvxURLField*) pField)->GetURL()); aHLinkItem.SetTargetFrame(((const SvxURLField*) pField)->GetTargetFrame()); + bField = true; } } } + if (!bField) + { + // use selected text as name for urls + String sReturn = pOLV->GetSelected(); + sReturn.Erase(255); + sReturn.EraseTrailingChars(); + aHLinkItem.SetName(sReturn); + } } else { |