summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAron Budea <aron.budea@collabora.com>2018-02-18 23:04:09 +0100
committerJan Holesovsky <kendy@collabora.com>2018-05-22 12:03:49 +0200
commitb3e1ff9818cb553a4a67d510e0e7277e54534898 (patch)
tree70cb8f885d966f1b8b3321d9e79925adbec531fe
parent013980a795c1861a7e2c6a1b95e9bf2fde194ba0 (diff)
for listeners the range needs to be set before the formula, tdf#115530
Reviewed-on: https://gerrit.libreoffice.org/49957 Reviewed-by: Aron Budea <aron.budea@collabora.com> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com> (cherry picked from commit 26b51c9550ef300e7685fc41eb9cde4dbbc11265) Reviewed-on: https://gerrit.libreoffice.org/50016 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> (cherry picked from commit 56e0895730fa289d72333d7b432122292e37b4c4) Change-Id: I001795fd456375c4babab2c2e505bedff03e991f
-rw-r--r--sc/source/filter/oox/condformatbuffer.cxx12
1 files changed, 7 insertions, 5 deletions
diff --git a/sc/source/filter/oox/condformatbuffer.cxx b/sc/source/filter/oox/condformatbuffer.cxx
index aa8fbbaa4d96..335eda125e65 100644
--- a/sc/source/filter/oox/condformatbuffer.cxx
+++ b/sc/source/filter/oox/condformatbuffer.cxx
@@ -1060,10 +1060,6 @@ void CondFormat::finalizeImport()
// probably some error in the xml if we are not ready
if ( !mbReadyForFinalize )
return;
- ScDocument& rDoc = getScDocument();
- maRules.forEachMem( &CondFormatRule::finalizeImport );
- SCTAB nTab = maModel.maRanges.getBaseAddress().Tab();
- sal_Int32 nIndex = getScDocument().AddCondFormat(mpFormat, nTab);
ScRangeList aList;
for( ::std::vector< CellRangeAddress >::const_iterator itr = maModel.maRanges.begin(); itr != maModel.maRanges.end(); ++itr)
@@ -1072,8 +1068,14 @@ void CondFormat::finalizeImport()
ScUnoConversion::FillScRange(aRange, *itr);
aList.Append(aRange);
}
- rDoc.AddCondFormatData( aList, nTab, nIndex );
mpFormat->SetRange(aList);
+
+ ScDocument& rDoc = getScDocument();
+ maRules.forEachMem( &CondFormatRule::finalizeImport );
+ SCTAB nTab = maModel.maRanges.getBaseAddress().Tab();
+ sal_Int32 nIndex = getScDocument().AddCondFormat(mpFormat, nTab);
+
+ rDoc.AddCondFormatData( aList, nTab, nIndex );
}
CondFormatRuleRef CondFormat::createRule()