summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-08-31 13:16:25 +0100
committerMichael Stahl <mstahl@redhat.com>2017-08-31 15:49:28 +0200
commite09c2106c136b9cb3a32e1ffbc19aba8269f37ca (patch)
tree59aed28c9e6042718e5618738d71eef4cd108fb1
parente4aabf5c75104a1d97827aafdd97308ad0fb6c4e (diff)
Resolves: tdf#112123 check m_xAutoStyles like in similar methods
Change-Id: I099da789a0e64fd862d09bb462ccb699e1dc8b9f Reviewed-on: https://gerrit.libreoffice.org/41752 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
-rw-r--r--sw/qa/core/data/odt/pass/tdf112123.odtbin0 -> 1673 bytes
-rw-r--r--xmloff/source/text/txtimp.cxx3
2 files changed, 3 insertions, 0 deletions
diff --git a/sw/qa/core/data/odt/pass/tdf112123.odt b/sw/qa/core/data/odt/pass/tdf112123.odt
new file mode 100644
index 000000000000..c5d2195b9468
--- /dev/null
+++ b/sw/qa/core/data/odt/pass/tdf112123.odt
Binary files differ
diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx
index 234673c26461..9fd732c98f55 100644
--- a/xmloff/source/text/txtimp.cxx
+++ b/xmloff/source/text/txtimp.cxx
@@ -2431,6 +2431,9 @@ SvXMLImportContext *XMLTextImportHelper::CreateTableChildContext(
sal_Int32 XMLTextImportHelper::GetDataStyleKey(const OUString& sStyleName,
bool* pIsSystemLanguage )
{
+ if (!m_xImpl->m_xAutoStyles.is())
+ return -1;
+
const SvXMLStyleContext* pStyle =
static_cast<SvXMLStylesContext *>(m_xImpl->m_xAutoStyles.get())->
FindStyleChildContext( XML_STYLE_FAMILY_DATA_STYLE,