[ooo-build-commit] Branch 'ooo-build-3-1-1' - patches/dev300
Kohei Yoshida
kohei at kemper.freedesktop.org
Fri Dec 4 21:07:05 PST 2009
patches/dev300/apply | 3
patches/dev300/calc-formula-range-separator-fix.diff | 95 +++++++++++++++++++
2 files changed, 98 insertions(+)
New commits:
commit 75b3b19791aa7167bb8032b83d882ecf8998d84c
Author: Kohei Yoshida <kyoshida at novell.com>
Date: Fri Dec 4 23:57:54 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 ed00394..7a81ef4 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -3253,6 +3253,9 @@ calc-chart-wrong-cast.diff, i#104484, caolan/kohei
# Fix R1C1 parser.
calc-r1c1-parse-fix.diff, n#557475, kohei
+# Use current range separator for range lists.
+calc-formula-range-separator-fix.diff, n#556268, kohei
+
[ CalcRowLimit ]
# The work to increase Calc's row size limit, and any work associated with it.
SectionOwner => 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