[Libreoffice-commits] .: 2 commits - filter/source framework/source sfx2/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Sep 12 08:51:49 PDT 2012


 filter/source/config/cache/filtercache.cxx       |   19 ++++++-------------
 framework/source/uielement/newmenucontroller.cxx |    1 -
 sfx2/source/toolbox/tbxitem.cxx                  |    1 -
 3 files changed, 6 insertions(+), 15 deletions(-)

New commits:
commit 8c8492892b68a010e55d4d19a89425cf7d98814d
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Sep 12 17:49:42 2012 +0200

    Better error reporting
    
    (The MESSAGE_CORRUPTED_FILTERCONFIG in the exception's Message would not be seen
    by end-users anyway, so better put something more useful in there.)
    
    Change-Id: I5c677a894a8b6fcfb61d24c59d45b2cbc53e7a60

diff --git a/filter/source/config/cache/filtercache.cxx b/filter/source/config/cache/filtercache.cxx
index e9dc2cf..36f97e5 100644
--- a/filter/source/config/cache/filtercache.cxx
+++ b/filter/source/config/cache/filtercache.cxx
@@ -67,13 +67,6 @@ namespace filter{
 
 namespace css = ::com::sun::star;
 
-
-// Error message in case filter config seems to be corrupted.
-// Note: Dont tell user something about "setup -repair"!
-// Its no longer supported by using native installers ...
-const char MESSAGE_CORRUPTED_FILTERCONFIG[] =
-    "The filter configuration appears to be defective. Please install the office suite again.";
-
 FilterCache::FilterCache()
     : BaseLock    (                                        )
     , m_xSMGR     (::comphelper::getProcessServiceFactory())
@@ -1006,7 +999,7 @@ css::uno::Reference< css::uno::XInterface > FilterCache::impl_createConfigAccess
     catch(const css::uno::Exception& ex)
     {
         throw css::document::CorruptedFilterConfigurationException(
-                rtl::OUString(MESSAGE_CORRUPTED_FILTERCONFIG),
+                "filter configuration, caught: " + ex.Message,
                 css::uno::Reference< css::uno::XInterface >(),
                 ex.Message);
     }
@@ -1051,7 +1044,7 @@ void FilterCache::impl_validateAndOptimize()
        )
     {
         throw css::document::CorruptedFilterConfigurationException(
-                rtl::OUString(MESSAGE_CORRUPTED_FILTERCONFIG),
+                "filter configuration: the list of types or filters is empty",
                 css::uno::Reference< css::uno::XInterface >(),
                 ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "The list of types or filters is empty." )));
     }
@@ -1315,7 +1308,7 @@ void FilterCache::impl_validateAndOptimize()
     OSL_ENSURE(!nErrors, ::rtl::OUStringToOString(sLogOut,RTL_TEXTENCODING_UTF8).getStr());
     if (nErrors>0)
         throw css::document::CorruptedFilterConfigurationException(
-                rtl::OUString(MESSAGE_CORRUPTED_FILTERCONFIG),
+                "filter configuration: " + sLogOut,
                 css::uno::Reference< css::uno::XInterface >(),
                 sLogOut);
     OSL_ENSURE(!nWarnings, ::rtl::OUStringToOString(sLogOut,RTL_TEXTENCODING_UTF8).getStr());
@@ -1566,7 +1559,7 @@ void FilterCache::impl_loadSet(const css::uno::Reference< css::container::XNameA
     catch(const css::uno::Exception& ex)
     {
         throw css::document::CorruptedFilterConfigurationException(
-                rtl::OUString(MESSAGE_CORRUPTED_FILTERCONFIG),
+                "filter configuration, caught: " + ex.Message,
                 css::uno::Reference< css::uno::XInterface >(),
                 ex.Message);
     }
@@ -1595,7 +1588,7 @@ void FilterCache::impl_loadSet(const css::uno::Reference< css::container::XNameA
                 catch(const css::uno::Exception& ex)
                 {
                     throw css::document::CorruptedFilterConfigurationException(
-                            rtl::OUString(MESSAGE_CORRUPTED_FILTERCONFIG),
+                            "filter configuration, caught: " + ex.Message,
                             css::uno::Reference< css::uno::XInterface >(),
                             ex.Message);
                 }
@@ -1624,7 +1617,7 @@ void FilterCache::impl_loadSet(const css::uno::Reference< css::container::XNameA
                 catch(const css::uno::Exception& ex)
                 {
                     throw css::document::CorruptedFilterConfigurationException(
-                            rtl::OUString(MESSAGE_CORRUPTED_FILTERCONFIG),
+                            "filter configuration, caught: " + ex.Message,
                             css::uno::Reference< css::uno::XInterface >(),
                             ex.Message);
                 }
commit 3357115adf0e5c43b8ba6c03e9a181aafd1dc0f6
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Sep 12 17:48:40 2012 +0200

    Unused #includes
    
    Change-Id: If5c8ee05ef84c03a9cec6ef428256e17b33f073e

diff --git a/framework/source/uielement/newmenucontroller.cxx b/framework/source/uielement/newmenucontroller.cxx
index 7a8ff0b..3859562 100644
--- a/framework/source/uielement/newmenucontroller.cxx
+++ b/framework/source/uielement/newmenucontroller.cxx
@@ -43,7 +43,6 @@
 #include <com/sun/star/ui/XUIConfigurationManagerSupplier.hpp>
 #include <com/sun/star/frame/XModuleManager.hpp>
 #include <com/sun/star/container/XNameAccess.hpp>
-#include <com/sun/star/document/CorruptedFilterConfigurationException.hpp>
 
 #include <vcl/svapp.hxx>
 #include <vcl/i18nhelp.hxx>
diff --git a/sfx2/source/toolbox/tbxitem.cxx b/sfx2/source/toolbox/tbxitem.cxx
index 934c0c0..d67b789 100644
--- a/sfx2/source/toolbox/tbxitem.cxx
+++ b/sfx2/source/toolbox/tbxitem.cxx
@@ -44,7 +44,6 @@
 #include <com/sun/star/container/XNameAccess.hpp>
 #include <com/sun/star/ui/XUIFunctionListener.hpp>
 #include <com/sun/star/frame/status/Visibility.hpp>
-#include <com/sun/star/document/CorruptedFilterConfigurationException.hpp>
 #include <svl/eitem.hxx>
 #include <svl/stritem.hxx>
 #include <svl/intitem.hxx>


More information about the Libreoffice-commits mailing list