[Libreoffice-commits] core.git: Branch 'feature/tiled-editing' - sw/source

Siqi Liu me at siqi.fr
Sun Mar 8 15:18:49 PDT 2015


 sw/source/uibase/wrtsh/wrtsh2.cxx |   10 ++++++++++
 1 file changed, 10 insertions(+)

New commits:
commit 8513f4f76ac1769533fe65a686fcd4eae739547b
Author: Siqi Liu <me at siqi.fr>
Date:   Sun Mar 8 23:11:16 2015 +0100

    tdf#89705 hyperlink clickable in writer (not in impress, yet)
    
    Change-Id: Ifaa6c0de7d9b91706985667b72195bcfc2d610cd

diff --git a/sw/source/uibase/wrtsh/wrtsh2.cxx b/sw/source/uibase/wrtsh/wrtsh2.cxx
index 489aeba..a2bb960 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);


More information about the Libreoffice-commits mailing list