Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index



 Hello,

 could somebody review the attached patch for bnc#689116? When e.g. Writer is 
not installed (which can happen with split rpms) and one tries to open a text 
document, LO simply quits without saying anything. Guessing from the 
surrounding code it's correct, but I'd prefer it to be checked as I have no 
clue about LO UI string handling or error handling (and I bow to the 
creativitity of whoever has created this complex error handling system).

-- 
 Lubos Lunak
 l.lunak@suse.cz
diff --git a/uui/source/iahndl.cxx b/uui/source/iahndl.cxx
index 868dfc1..b4186d3 100644
--- a/uui/source/iahndl.cxx
+++ b/uui/source/iahndl.cxx
@@ -67,6 +67,7 @@
 #include "com/sun/star/ucb/XInteractionReplaceExistingData.hpp"
 #include "com/sun/star/ucb/XInteractionSupplyName.hpp"
 #include "com/sun/star/xforms/InvalidDataOnSubmitException.hpp"
+#include "com/sun/star/loader/CannotActivateFactoryException.hpp"
 
 #include "osl/conditn.hxx"
 #include "tools/rcid.h" // RSC_STRING
@@ -857,6 +858,23 @@ UUIInteractionHelper::handleRequest_impl(
             return true;
         }
 
+        loader::CannotActivateFactoryException aCannotActivateFactoryException;
+        if (aAnyRequest >>= aCannotActivateFactoryException)
+        {
+            ErrCode nErrorCode = ERRCODE_UUI_CANNOT_ACTIVATE_FACTORY;
+            std::vector< rtl::OUString > aArguments;
+            aArguments.push_back( aCannotActivateFactoryException.Message );
+
+            handleErrorHandlerRequest( task::InteractionClassification_ERROR,
+                                       nErrorCode,
+                                       aArguments,
+                                       rRequest->getContinuations(),
+                                       bObtainErrorStringOnly,
+                                       bHasErrorString,
+                                       rErrorString );
+            return true;
+        }
+
 
         ///////////////////////////////////////////////////////////////////
         // Handle requests which do not have a plain string representation.
diff --git a/uui/source/ids.hrc b/uui/source/ids.hrc
index 23e377f..4f7918b 100755
--- a/uui/source/ids.hrc
+++ b/uui/source/ids.hrc
@@ -160,6 +160,7 @@
 #define ERRCODE_UUI_LOCKING_LOCKED_SELF                         (ERRCODE_AREA_UUI + 60)
 #define ERRCODE_UUI_LOCKING_NOT_LOCKED                          (ERRCODE_AREA_UUI + 61)
 #define ERRCODE_UUI_LOCKING_LOCK_EXPIRED                        (ERRCODE_AREA_UUI + 62)
+#define ERRCODE_UUI_CANNOT_ACTIVATE_FACTORY                     (ERRCODE_AREA_UUI + 63)
 
 #define ERRCODE_AREA_UUI_UNKNOWNAUTH    25000
 #define SSLWARN_TYPE_DOMAINMISMATCH     10
diff --git a/uui/source/ids.src b/uui/source/ids.src
index efff262..45bbeca 100644
--- a/uui/source/ids.src
+++ b/uui/source/ids.src
@@ -403,6 +403,11 @@ Resource RID_UUI_ERRHDL
         Text [ en-US ] = "Security Warning: Server Certificate Invalid";
     };
 
+    String (ERRCODE_UUI_CANNOT_ACTIVATE_FACTORY & ERRCODE_RES_MASK)
+    {
+        Text [ en-US ] = "Component cannot be loaded, possibly broken or incomplete 
installation.\nFull error message:\n\n $(ARG1).";
+    };
+
 
 };
 

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.