summaryrefslogtreecommitdiff
path: root/sw/source/uibase/wrtsh
diff options
context:
space:
mode:
authorSiqi Liu <me@siqi.fr>2015-03-08 23:11:16 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-03-09 10:16:19 +0100
commitbbb857c1d3a7c1e5e9f2548e63fb8a80807f1ee3 (patch)
treed7ddc9ff934c50065177adc0c2cf7da154908198 /sw/source/uibase/wrtsh
parent3650a9f0cee4c3f15c35f5966e4a58ca67500346 (diff)
tdf#89705 hyperlink clickable in writer (not in impress, yet)
Change-Id: Ifaa6c0de7d9b91706985667b72195bcfc2d610cd
Diffstat (limited to 'sw/source/uibase/wrtsh')
-rw-r--r--sw/source/uibase/wrtsh/wrtsh2.cxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/sw/source/uibase/wrtsh/wrtsh2.cxx b/sw/source/uibase/wrtsh/wrtsh2.cxx
index 489aeba0e0c9..a2bb96066802 100644
--- a/sw/source/uibase/wrtsh/wrtsh2.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh2.cxx
@@ -66,6 +66,8 @@
#include <xmloff/odffields.hxx>
#include <boost/scoped_ptr.hpp>
+#include <LibreOfficeKit/LibreOfficeKitEnums.h>
+
void SwWrtShell::Insert(SwField &rFld)
{
ResetCursorStack();
@@ -469,9 +471,17 @@ void LoadURL( SwViewShell& rVSh, const OUString& rURL, sal_uInt16 nFilter,
if ( !rVSh.ISA(SwCrsrShell) )
return;
+ // We are doing tiledRendering, let the client handles the URL loading.
+ if (rVSh.isTiledRendering()) {
+ rVSh.libreOfficeKitCallback(LOK_CALLBACK_HYPERLINK_CLICKED,
+ OUStringToOString(rURL, RTL_TEXTENCODING_UTF8).getStr());
+ return;
+ }
+
//A CrsrShell is always a WrtShell
SwWrtShell &rSh = static_cast<SwWrtShell&>(rVSh);
+
SwDocShell* pDShell = rSh.GetView().GetDocShell();
OSL_ENSURE( pDShell, "No DocShell?!");
OUString sTargetFrame(rTargetFrameName);