[ooo-build-commit] patches/dev300

Kohei Yoshida kohei at kemper.freedesktop.org
Fri Dec 4 20:51:32 PST 2009


 patches/dev300/apply                                 |    3 
 patches/dev300/calc-formula-range-separator-fix.diff |   95 +++++++++++++++++++
 2 files changed, 98 insertions(+)

New commits:
commit ee73efea6fe2e87c9c82d4e0a363b3ef30b5a34e
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Fri Dec 4 23:49:03 2009 -0500

    Fixed use of incorrect range separator for disjoint ranges in chart.
    
    * patches/dev300/apply:
    * patches/dev300/calc-formula-range-separator-fix.diff: we now use
      localized separators, but the range seprators for ScRangeList
      were still hard-coded for each address convention.  Fixed.
      (n#556268)

diff --git a/patches/dev300/apply b/patches/dev300/apply
index c6e38fe..59da91a 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -867,6 +867,9 @@ calc-auto-tab-complete.diff, i#18748, muthusuba/kohei
 # Speed up filtering performance with notes.
 calc-perf-filtering-with-notes.diff, n#556927, kohei
 
+# Use current range separator for range lists.
+calc-formula-range-separator-fix.diff, n#556268, kohei
+
 # Support PHONETIC function to display asian phonetic guide.
 # LATER: I'll take care of this later.  --kohei
 # calc-formula-asian-phonetic.diff, i#80764, i#80765, i#80766, kohei
diff --git a/patches/dev300/calc-formula-range-separator-fix.diff b/patches/dev300/calc-formula-range-separator-fix.diff
new file mode 100644
index 0000000..4d1d415
--- /dev/null
+++ b/patches/dev300/calc-formula-range-separator-fix.diff
@@ -0,0 +1,95 @@
+diff --git sc/inc/rangelst.hxx sc/inc/rangelst.hxx
+index ba694e2..ae1fee6 100644
+--- sc/inc/rangelst.hxx
++++ sc/inc/rangelst.hxx
+@@ -58,10 +58,10 @@ public:
+     USHORT			Parse( const String&, ScDocument* = NULL,
+                            USHORT nMask = SCA_VALID,
+                            formula::FormulaGrammar::AddressConvention eConv = formula::FormulaGrammar::CONV_OOO,
+-                           char cDelimiter = 0 );
++                           sal_Unicode cDelimiter = 0 );
+     void 			Format( String&, USHORT nFlags = 0, ScDocument* = NULL,
+                             formula::FormulaGrammar::AddressConvention eConv = formula::FormulaGrammar::CONV_OOO,
+-                            char cDelimiter = 0 ) const;
++                            sal_Unicode cDelimiter = 0 ) const;
+     void			Join( const ScRange&, BOOL bIsInList = FALSE );
+     BOOL 			UpdateReference( UpdateRefMode, ScDocument*,
+                                     const ScRange& rWhere,
+diff --git sc/source/core/tool/rangelst.cxx sc/source/core/tool/rangelst.cxx
+index 9c16d73..7ce1d61 100644
+--- sc/source/core/tool/rangelst.cxx
++++ sc/source/core/tool/rangelst.cxx
+@@ -44,7 +44,7 @@
+ #include "document.hxx"
+ #include "refupdat.hxx"
+ #include "rechead.hxx"
+-
++#include "compiler.hxx"
+ 
+ // === ScRangeList ====================================================
+ 
+@@ -61,32 +61,14 @@ void ScRangeList::RemoveAll()
+     Clear();
+ }
+ 
+-static void defaultDelimiter( char& cDelimiter, formula::FormulaGrammar::AddressConvention eConv)
+-{
+-    if( cDelimiter == 0)
+-    {
+-        switch( eConv )
+-        {
+-        default :
+-        case formula::FormulaGrammar::CONV_OOO :
+-            cDelimiter = ';';
+-            break;
+-
+-        case formula::FormulaGrammar::CONV_XL_A1 :
+-        case formula::FormulaGrammar::CONV_XL_R1C1 :
+-            cDelimiter = ',';
+-            break;
+-        }
+-    }
+-}
+-
+ USHORT ScRangeList::Parse( const String& rStr, ScDocument* pDoc, USHORT nMask,
+                            formula::FormulaGrammar::AddressConvention eConv,
+-                           char cDelimiter )
++                           sal_Unicode cDelimiter )
+ {
+     if ( rStr.Len() )
+     {
+-        defaultDelimiter( cDelimiter, eConv);
++        if (!cDelimiter)
++            cDelimiter = ScCompiler::GetNativeSymbol(ocSep).GetChar(0);
+ 
+         nMask |= SCA_VALID;				// falls das jemand vergessen sollte
+         USHORT nResult = (USHORT)~0;	// alle Bits setzen
+@@ -129,11 +111,12 @@ SCA_VALID_TAB2;
+ 
+ void ScRangeList::Format( String& rStr, USHORT nFlags, ScDocument* pDoc,
+                           formula::FormulaGrammar::AddressConvention eConv,
+-                          char cDelimiter ) const
++                          sal_Unicode cDelimiter ) const
+ {
+     rStr.Erase();
+ 
+-    defaultDelimiter( cDelimiter, eConv);
++    if (!cDelimiter)
++        cDelimiter = ScCompiler::GetNativeSymbol(ocSep).GetChar(0);
+ 
+     ULONG nCnt = Count();
+     for ( ULONG nIdx = 0; nIdx < nCnt; nIdx++ )
+diff --git sc/source/ui/drawfunc/fuins2.cxx sc/source/ui/drawfunc/fuins2.cxx
+index dae97f1..2271c07 100644
+--- sc/source/ui/drawfunc/fuins2.cxx
++++ sc/source/ui/drawfunc/fuins2.cxx
+@@ -529,7 +529,8 @@ FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, Window* pWin, ScDrawView*
+             ScRangeList aRanges;
+             aMultiMark.FillRangeListWithMarks( &aRanges, FALSE );
+             String aStr;
+-            aRanges.Format( aStr, SCR_ABS_3D, pViewSh->GetViewData()->GetDocument() );
++            ScDocument* pDocument = pViewSh->GetViewData()->GetDocument();
++            aRanges.Format( aStr, SCR_ABS_3D, pDocument, pDocument->GetAddressConvention() );
+             aRangeString = aStr;
+ 
+             // get "total" range for positioning


More information about the ooo-build-commit mailing list