openoffice-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From msei...@apache.org
Subject [openoffice] branch trunk updated: Patch by: Damjan
Date Mon, 19 Aug 2019 16:29:10 GMT
This is an automated email from the ASF dual-hosted git repository.

mseidel pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 5168e59  Patch by: Damjan
5168e59 is described below

commit 5168e59c15cb9af435bdca9b78b99d1abe16c58e
Author: mseidel <mseidel@apache.org>
AuthorDate: Mon Aug 19 18:28:35 2019 +0200

    Patch by: Damjan
---
 main/scripting/source/protocolhandler/scripthandler.cxx | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/main/scripting/source/protocolhandler/scripthandler.cxx b/main/scripting/source/protocolhandler/scripthandler.cxx
index 24ad36f..913cc5f 100644
--- a/main/scripting/source/protocolhandler/scripthandler.cxx
+++ b/main/scripting/source/protocolhandler/scripthandler.cxx
@@ -41,6 +41,7 @@
 #include <com/sun/star/script/provider/XScriptProviderFactory.hpp>
 #include <com/sun/star/script/provider/ScriptFrameworkErrorType.hpp>
 
+#include <rtl/uri.hxx>
 #include <sfx2/objsh.hxx>
 #include <sfx2/frame.hxx>
 #include <sfx2/sfxdlg.hxx>
@@ -158,8 +159,11 @@ void SAL_CALL ScriptProtocolHandler::dispatchWithNotification(
     {
         try
         {
-            bool bIsDocumentScript = ( aURL.Complete.indexOfAsciiL( RTL_CONSTASCII_STRINGPARAM(
"document" ) ) !=-1 );
-                // TODO: isn't this somewhat strange? This should be a test for a location=document
parameter, shouldn't it?
+printf("ScriptProtocolHandler::dispatchWithNotification()\n");
+            ::rtl::OUString xStringUri = ::rtl::Uri::decode( aURL.Complete,
+                rtl_UriDecodeWithCharset, RTL_TEXTENCODING_UTF8 );
+            bool bIsDocumentScript = ( xStringUri.indexOfAsciiL( RTL_CONSTASCII_STRINGPARAM(
"document" ) ) !=-1 );
+printf("URI is %s\n", ::rtl::OUStringToOString (xStringUri, RTL_TEXTENCODING_UTF8).pData->buffer);
 
             if ( bIsDocumentScript )
             {


Mime
View raw message