[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - sc/inc sc/source

Markus Mohrhard markus.mohrhard at googlemail.com
Fri Dec 15 13:11:25 UTC 2017


 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 9e0ab4e19dc47953fe5ddff4b0af83b652d4f09b
Author: Markus Mohrhard <markus.mohrhard at 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 <ci at libreoffice.org>
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
    (cherry picked from commit 2194105a38631e1c5c074634bc5b084cd2f8661f)
    Reviewed-on: https://gerrit.libreoffice.org/46496
    Reviewed-by: Eike Rathke <erack at redhat.com>

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())
         {


More information about the Libreoffice-commits mailing list