summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/style/xmlnumfi.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/xmloff/source/style/xmlnumfi.cxx b/xmloff/source/style/xmlnumfi.cxx
index ccd8158ead14..85c6cfe47289 100644
--- a/xmloff/source/style/xmlnumfi.cxx
+++ b/xmloff/source/style/xmlnumfi.cxx
@@ -1692,6 +1692,11 @@ sal_Int32 SvXMLNumFormatContext::CreateAndInsert(SvNumberFormatter* pFormatter)
{
SvXMLNumFormatContext* pStyle = const_cast<SvXMLNumFormatContext*>( static_cast<const SvXMLNumFormatContext *>(pStyles->FindStyleChildContext(
XML_STYLE_FAMILY_DATA_STYLE, aMyConditions[i].sMapName)));
+ if (this == pStyle)
+ {
+ SAL_INFO("xmloff.style", "invalid style:map references containing style");
+ pStyle = nullptr;
+ }
if (pStyle)
{
if ((pStyle->PrivateGetKey() > -1)) // don't reset pStyle's bRemoveAfterUse flag