summaryrefslogtreecommitdiff
path: root/sw/source/ui/shells/textdrw.cxx
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2005-01-11 11:43:56 +0000
committerRüdiger Timm <rt@openoffice.org>2005-01-11 11:43:56 +0000
commit4285947d79c7435559a0c5d9bcea8abb94ebc089 (patch)
tree11e8d0fb516aec35e61759204c10b6f2b1273ca3 /sw/source/ui/shells/textdrw.cxx
parent62bca2df52ee7c18651189932357ffa0a40958e9 (diff)
INTEGRATION: CWS sb19 (1.7.120); FILE MERGED
2004/10/07 14:22:15 os 1.7.120.1: #110409# static base URL has gone
Diffstat (limited to 'sw/source/ui/shells/textdrw.cxx')
-rw-r--r--sw/source/ui/shells/textdrw.cxx20
1 files changed, 17 insertions, 3 deletions
diff --git a/sw/source/ui/shells/textdrw.cxx b/sw/source/ui/shells/textdrw.cxx
index 8d2b3892400f..eba623199f45 100644
--- a/sw/source/ui/shells/textdrw.cxx
+++ b/sw/source/ui/shells/textdrw.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: textdrw.cxx,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: rt $ $Date: 2004-07-12 15:52:22 $
+ * last change: $Author: rt $ $Date: 2005-01-11 12:43:56 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -101,6 +101,15 @@
#include <poolfmt.hrc>
#endif
+#ifndef _DOCSH_HXX
+#include <docsh.hxx>
+#endif
+#ifndef _SFXDOCFILE_HXX
+#include <sfx2/docfile.hxx>
+#endif
+#ifndef SVTOOLS_URIHELPER_HXX
+#include <svtools/urihelper.hxx>
+#endif
#ifndef _SV_SOUND_HXX
#include <vcl/sound.hxx>
#endif
@@ -156,7 +165,12 @@ void SwBaseShell::InsertURLButton(const String& rURL, const String& rTarget, con
aTmp <<= OUString(rTxt);
xPropSet->setPropertyValue( C2U("Label"), aTmp );
- aTmp <<= OUString(INetURLObject::RelToAbs(rURL));
+ SfxMedium* pMedium = rSh.GetView().GetDocShell()->GetMedium();
+ INetURLObject aAbs;
+ if( pMedium )
+ aAbs = pMedium->GetURLObject();
+
+ aTmp <<= OUString(URIHelper::SmartRel2Abs(aAbs, rURL));
xPropSet->setPropertyValue( C2U("TargetURL"), aTmp );
if( rTarget.Len() )