diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2015-05-16 06:30:51 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2015-05-16 07:26:40 +0200 |
commit | f8b94e51c672eaa55bceaee2ceca72d8399b434b (patch) | |
tree | 916ab4980b0c1768864c6f31ea252f3931bded85 /sc | |
parent | e9a206c8d7533ba8ccf8ad5f4e3e76557850459e (diff) |
fix sheet into which we insert extLst cond formats
Change-Id: Idbf9772bbb2c034a6c016492ab31b87e248f7b47
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/filter/oox/condformatbuffer.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/oox/extlstcontext.cxx | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/sc/source/filter/oox/condformatbuffer.cxx b/sc/source/filter/oox/condformatbuffer.cxx index b54930e792bf..927513c92029 100644 --- a/sc/source/filter/oox/condformatbuffer.cxx +++ b/sc/source/filter/oox/condformatbuffer.cxx @@ -1144,10 +1144,10 @@ void CondFormatBuffer::finalizeImport() for (auto itr = maExtCondFormats.begin(); itr != maExtCondFormats.end(); ++itr) { - SCTAB nTab = this->getCurrentSheetIndex(); ScDocument* pDoc = &getScDocument(); const ScRangeList& rRange = itr->getRange(); + SCTAB nTab = rRange.front()->aStart.Tab(); ScConditionalFormat* pFormat = findFormatByRange(rRange, pDoc, nTab); if (!pFormat) { diff --git a/sc/source/filter/oox/extlstcontext.cxx b/sc/source/filter/oox/extlstcontext.cxx index 92d7f03e67c7..67809e21f791 100644 --- a/sc/source/filter/oox/extlstcontext.cxx +++ b/sc/source/filter/oox/extlstcontext.cxx @@ -156,6 +156,13 @@ void ExtConditionalFormattingContext::onEndElement() if (!bSuccess || aRange.empty()) break; + SCTAB nTab = getCurrentSheetIndex(); + for (size_t i = 0; i < aRange.size(); ++i) + { + aRange[i]->aStart.SetTab(nTab); + aRange[i]->aEnd.SetTab(nTab); + } + boost::ptr_vector<ExtCfCondFormat>& rExtFormats = getCondFormats().importExtCondFormat(); rExtFormats.push_back(new ExtCfCondFormat(aRange, maEntries)); } |