[Libreoffice-commits] core.git: i18npool/inc i18npool/source

Julien Nabet (via logerrit) logerrit at kemper.freedesktop.org
Fri Jun 12 07:39:35 UTC 2020


 i18npool/inc/calendarImpl.hxx             |    2 +-
 i18npool/source/calendar/calendarImpl.cxx |    7 +++++++
 2 files changed, 8 insertions(+), 1 deletion(-)

New commits:
commit ff508f6d8a3e58d29e9e7622006a7103fb0a2849
Author:     Julien Nabet <serval2412 at yahoo.fr>
AuthorDate: Thu Jun 11 19:04:18 2020 +0200
Commit:     Julien Nabet <serval2412 at yahoo.fr>
CommitDate: Fri Jun 12 09:39:00 2020 +0200

    tdf#133898: get a context in default ctr (i18npool/calendarImpl)
    
    See bt here:
    https://bugs.documentfoundation.org/attachment.cgi?id=161882
    
    Change-Id: If5a6c5e2b52af9ef97af9522296aaa58352cfa69
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96161
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
    Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>

diff --git a/i18npool/inc/calendarImpl.hxx b/i18npool/inc/calendarImpl.hxx
index f8c9333ed153..97135505146c 100644
--- a/i18npool/inc/calendarImpl.hxx
+++ b/i18npool/inc/calendarImpl.hxx
@@ -39,7 +39,7 @@ class CalendarImpl : public cppu::WeakImplHelper
 public:
 
     // Constructors
-    CalendarImpl() {};
+    CalendarImpl();
     CalendarImpl(const css::uno::Reference < css::uno::XComponentContext >& rxContext);
 
     /**
diff --git a/i18npool/source/calendar/calendarImpl.cxx b/i18npool/source/calendar/calendarImpl.cxx
index 2cb659560489..8a288bcb6c31 100644
--- a/i18npool/source/calendar/calendarImpl.cxx
+++ b/i18npool/source/calendar/calendarImpl.cxx
@@ -20,6 +20,7 @@
 #include <calendarImpl.hxx>
 #include <calendar_gregorian.hxx>
 #include <localedata.hxx>
+#include <comphelper/processfactory.hxx>
 #include <comphelper/sequence.hxx>
 #include <cppuhelper/supportsservice.hxx>
 
@@ -32,8 +33,14 @@ namespace i18npool {
 
 #define ERROR RuntimeException()
 
+CalendarImpl::CalendarImpl() : m_xContext(comphelper::getProcessComponentContext())
+{
+}
+
 CalendarImpl::CalendarImpl(const Reference< XComponentContext > &rxContext) : m_xContext(rxContext)
 {
+    if (!m_xContext.is())
+        throw ERROR;
 }
 
 CalendarImpl::~CalendarImpl()


More information about the Libreoffice-commits mailing list