diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2017-12-15 00:14:45 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2017-12-15 14:08:40 +0100 |
commit | 9e0ab4e19dc47953fe5ddff4b0af83b652d4f09b (patch) | |
tree | e2cfda330179d9be1f5a760c49c4b830182e9312 | |
parent | 574b06d36e3f0df1dfa1029e8d33473237807dcb (diff) |
tdf#113621: don't write whole column refs for conditional format ranges
Change-Id: I6b21345fb08cc7b7cf0cdc40532d480a8d5f72ae
Reviewed-on: https://gerrit.libreoffice.org/46493
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
(cherry picked from commit 2194105a38631e1c5c074634bc5b084cd2f8661f)
Reviewed-on: https://gerrit.libreoffice.org/46496
Reviewed-by: Eike Rathke <erack@redhat.com>
-rw-r--r-- | sc/inc/rangelst.hxx | 2 | ||||
-rw-r--r-- | sc/source/core/tool/rangelst.cxx | 12 | ||||
-rw-r--r-- | sc/source/filter/excel/xecontent.cxx | 2 |
3 files changed, 9 insertions, 7 deletions
diff --git a/sc/inc/rangelst.hxx b/sc/inc/rangelst.hxx index 932a5ed52d6d..01e67ee49e55 100644 --- a/sc/inc/rangelst.hxx +++ b/sc/inc/rangelst.hxx @@ -45,7 +45,7 @@ public: void Format( OUString&, ScRefFlags nFlags, ScDocument* = nullptr, formula::FormulaGrammar::AddressConvention eConv = formula::FormulaGrammar::CONV_OOO, - sal_Unicode cDelimiter = 0 ) const; + sal_Unicode cDelimiter = 0, bool bFullAddressNotation = false ) const; void Join( const ScRange&, bool bIsInList = false ); diff --git a/sc/source/core/tool/rangelst.cxx b/sc/source/core/tool/rangelst.cxx index 8f976819bd5b..ae9ebd2b5d67 100644 --- a/sc/source/core/tool/rangelst.cxx +++ b/sc/source/core/tool/rangelst.cxx @@ -110,17 +110,18 @@ private: class FormatString { public: - FormatString(OUString& rStr, ScRefFlags nFlags, ScDocument* pDoc, FormulaGrammar::AddressConvention eConv, sal_Unicode cDelim) : + FormatString(OUString& rStr, ScRefFlags nFlags, ScDocument* pDoc, FormulaGrammar::AddressConvention eConv, sal_Unicode cDelim, bool bFullAddressNotation) : mrStr(rStr), mnFlags(nFlags), mpDoc(pDoc), meConv(eConv), mcDelim(cDelim), - mbFirst(true) {} + mbFirst(true), + mbFullAddressNotation(bFullAddressNotation) {} void operator() (const ScRange* p) { - OUString aStr(p->Format(mnFlags, mpDoc, meConv)); + OUString aStr(p->Format(mnFlags, mpDoc, meConv, mbFullAddressNotation)); if (mbFirst) mbFirst = false; else @@ -134,6 +135,7 @@ private: FormulaGrammar::AddressConvention meConv; sal_Unicode mcDelim; bool mbFirst; + bool mbFullAddressNotation; }; } @@ -186,14 +188,14 @@ ScRefFlags ScRangeList::Parse( const OUString& rStr, const ScDocument* pDoc, void ScRangeList::Format( OUString& rStr, ScRefFlags nFlags, ScDocument* pDoc, formula::FormulaGrammar::AddressConvention eConv, - sal_Unicode cDelimiter ) const + sal_Unicode cDelimiter, bool bFullAddressNotation ) const { if (!cDelimiter) cDelimiter = ScCompiler::GetNativeSymbolChar(ocSep); OUString aStr; - FormatString func(aStr, nFlags, pDoc, eConv, cDelimiter); + FormatString func(aStr, nFlags, pDoc, eConv, cDelimiter, bFullAddressNotation); for_each(maRanges.begin(), maRanges.end(), func); rStr = aStr; } diff --git a/sc/source/filter/excel/xecontent.cxx b/sc/source/filter/excel/xecontent.cxx index 3164164c2cef..d8584e908bd1 100644 --- a/sc/source/filter/excel/xecontent.cxx +++ b/sc/source/filter/excel/xecontent.cxx @@ -1269,7 +1269,7 @@ XclExpCondfmt::XclExpCondfmt( const XclExpRoot& rRoot, const ScConditionalFormat else if(pFormatEntry->GetType() == condformat::DATE) maCFList.AppendNewRecord( new XclExpDateFormat( GetRoot(), static_cast<const ScCondDateFormatEntry&>(*pFormatEntry), ++rIndex ) ); } - aScRanges.Format( msSeqRef, ScRefFlags::VALID, nullptr, formula::FormulaGrammar::CONV_XL_OOX, ' ' ); + aScRanges.Format( msSeqRef, ScRefFlags::VALID, nullptr, formula::FormulaGrammar::CONV_XL_OOX, ' ', true ); if(!aExtEntries.empty() && xExtLst.get()) { |