sc/inc/rangelst.hxx | 2 +- sc/source/core/tool/rangelst.cxx | 12 +++++++----- sc/source/filter/excel/xecontent.cxx | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-)
New commits: commit 2194105a38631e1c5c074634bc5b084cd2f8661f Author: Markus Mohrhard <markus.mohrh...@googlemail.com> Date: Fri Dec 15 00:14:45 2017 +0100 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 <c...@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrh...@googlemail.com> diff --git a/sc/inc/rangelst.hxx b/sc/inc/rangelst.hxx index 2071e8a66ff1..4d9fe2770815 100644 --- a/sc/inc/rangelst.hxx +++ b/sc/inc/rangelst.hxx @@ -45,7 +45,7 @@ public: void Format( OUString&, ScRefFlags nFlags, ScDocument*, 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 bd2217556644..592d01845efa 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 7d69eae7cbe0..29523aa81c9d 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() == ScFormatEntry::Type::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()) { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits