diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2020-06-11 19:04:18 +0200 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2020-06-19 10:26:53 +0100 |
commit | 149c4195dca1b8e3b5358f94b11229cee96f9d26 (patch) | |
tree | ab45e70fcde12bca3291f0f92627481a61ffcec2 /i18npool | |
parent | 51703be4e72eaaeaa3765f125df127a111895cc5 (diff) |
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@collabora.com>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
(cherry picked from commit 56e2183b4916888fa104b62411151401932d8f92)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96179
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
(cherry picked from commit 0634b66805f0f4bc3f45a44b1f6a984f17ff8a09)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96421
Diffstat (limited to 'i18npool')
-rw-r--r-- | i18npool/inc/calendarImpl.hxx | 2 | ||||
-rw-r--r-- | i18npool/source/calendar/calendarImpl.cxx | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/i18npool/inc/calendarImpl.hxx b/i18npool/inc/calendarImpl.hxx index 299bfe79bae2..927bf42935aa 100644 --- a/i18npool/inc/calendarImpl.hxx +++ b/i18npool/inc/calendarImpl.hxx @@ -40,7 +40,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() |