1 diff --git sc/inc/compiler.hxx sc/inc/compiler.hxx
2 index c96da1f..a8bbe7c 100644
3 --- sc/inc/compiler.hxx
4 +++ sc/inc/compiler.hxx
5 @@ -353,6 +353,7 @@ public:
7 static BOOL EnQuote( String& rStr );
9 + sal_Unicode GetNativeAddressSymbol( Convention::SpecialSymbolType eType ) const;
11 // Check if it is a valid english function name
12 bool IsEnglishSymbol( const String& rName );
13 diff --git sc/source/core/tool/compiler.cxx sc/source/core/tool/compiler.cxx
14 index ad87394..5d088b3 100644
15 --- sc/source/core/tool/compiler.cxx
16 +++ sc/source/core/tool/compiler.cxx
17 @@ -4984,6 +4984,11 @@ BOOL ScCompiler::EnQuote( String& rStr )
21 +sal_Unicode ScCompiler::GetNativeAddressSymbol( Convention::SpecialSymbolType eType ) const
23 + return pConv->getSpecialSymbol(eType);
26 void ScCompiler::fillAddInToken(::std::vector< ::com::sun::star::sheet::FormulaOpCodeMapEntry >& _rVec,bool _bIsEnglish) const
28 // All known AddIn functions.
29 diff --git sc/source/core/tool/editutil.cxx sc/source/core/tool/editutil.cxx
30 index 31dc996..f6eb148 100644
31 --- sc/source/core/tool/editutil.cxx
32 +++ sc/source/core/tool/editutil.cxx
34 #include "patattr.hxx"
36 #include "inputopt.hxx"
37 +#include "compiler.hxx"
39 // STATIC DATA -----------------------------------------------------------
41 // Delimiters zusaetzlich zu EditEngine-Default:
43 -const sal_Char __FAR_DATA ScEditUtil::pCalcDelimiters[] = "=();+-*/^&<>";
44 +const sal_Char __FAR_DATA ScEditUtil::pCalcDelimiters[] = "=()+-*/^&<>";
47 //------------------------------------------------------------------------
48 @@ -79,6 +80,7 @@ String ScEditUtil::ModifyDelimiters( const String& rOld )
50 aRet.EraseAllChars( '_' ); // underscore is used in function argument names
51 aRet.AppendAscii( RTL_CONSTASCII_STRINGPARAM( pCalcDelimiters ) );
52 + aRet.Append(ScCompiler::GetNativeSymbol(ocSep)); // argument separator is localized.
56 diff --git sc/source/ui/app/inputhdl.cxx sc/source/ui/app/inputhdl.cxx
57 index 8e4bb2a..2740091 100644
58 --- sc/source/ui/app/inputhdl.cxx
59 +++ sc/source/ui/app/inputhdl.cxx
60 @@ -113,14 +113,22 @@ extern USHORT nEditAdjust; //! Member an ViewData
62 //==================================================================
64 +static sal_Unicode lcl_getSheetSeparator(ScDocument* pDoc)
66 + ScCompiler aComp(pDoc, ScAddress());
67 + aComp.SetGrammar(pDoc->GetGrammar());
68 + return aComp.GetNativeAddressSymbol(ScCompiler::Convention::SHEET_SEPARATOR);
71 void ScInputHandler::InitRangeFinder( const String& rFormula )
74 + ScDocShell* pDocSh = pActiveViewSh->GetViewData()->GetDocShell();
75 + ScDocument* pDoc = pDocSh->GetDocument();
76 + const sal_Unicode cSheetSep = lcl_getSheetSeparator(pDoc);
78 if ( !pActiveViewSh || !SC_MOD()->GetInputOptions().GetRangeFinder() )
80 - ScDocShell* pDocSh = pActiveViewSh->GetViewData()->GetDocShell();
81 - ScDocument* pDoc = pDocSh->GetDocument();
83 // String aDelimiters = pEngine->GetWordDelimiters();
84 String aDelimiters = ScEditUtil::ModifyDelimiters(
85 @@ -129,7 +137,7 @@ void ScInputHandler::InitRangeFinder( const String& rFormula )
86 xub_StrLen nColon = aDelimiters.Search(':');
87 if ( nColon != STRING_NOTFOUND )
88 aDelimiters.Erase( nColon, 1 ); // Delimiter ohne Doppelpunkt
89 - xub_StrLen nDot = aDelimiters.Search('.');
90 + xub_StrLen nDot = aDelimiters.Search(cSheetSep);
91 if ( nDot != STRING_NOTFOUND )
92 aDelimiters.Erase( nDot, 1 ); // Delimiter ohne Punkt
94 @@ -702,6 +710,9 @@ void ScInputHandler::ShowTipCursor()
97 EditView* pActiveView = pTopView ? pTopView : pTableView;
98 + ScDocShell* pDocSh = pActiveViewSh->GetViewData()->GetDocShell();
99 + const sal_Unicode cSep = ScCompiler::GetNativeSymbol(ocSep).GetChar(0);
100 + const sal_Unicode cSheetSep = lcl_getSheetSeparator(pDocSh->GetDocument());
102 if ( bFormulaMode && pActiveView && pFormulaDataPara && pEngine->GetParagraphCount() == 1 )
104 @@ -731,7 +742,7 @@ void ScInputHandler::ShowTipCursor()
105 if( nLeftParentPos != STRING_NOTFOUND )
107 sal_Unicode c = aSelText.GetChar( nLeftParentPos-1 );
108 - if( !(c >= 'A' && c<= 'Z' || c>= 'a' && c<= 'z' ) )
109 + if( !((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') ) )
111 nNextFStart = aHelper.GetFunctionStart( aSelText, nLeftParentPos, TRUE);
112 if( aHelper.GetNextFunc( aSelText, FALSE, nNextFStart, &nNextFEnd, &ppFDesc, &aArgs ) )
113 @@ -764,8 +775,8 @@ void ScInputHandler::ShowTipCursor()
117 - nCountSemicolon = aNew.GetTokenCount(';')-1;
118 - nCountDot = aNew.GetTokenCount('.')-1;
119 + nCountSemicolon = aNew.GetTokenCount(cSep)-1;
120 + nCountDot = aNew.GetTokenCount(cSheetSep)-1;
122 if( !nCountSemicolon )
124 @@ -787,7 +798,7 @@ void ScInputHandler::ShowTipCursor()
126 nStartPosition = i+1;
128 - else if( cNext == ';' )
129 + else if( cNext == cSep )
133 @@ -808,7 +819,7 @@ void ScInputHandler::ShowTipCursor()
135 nStartPosition = i+1;
137 - else if( cNext == ';' )
138 + else if( cNext == cSep )
142 @@ -818,7 +829,7 @@ void ScInputHandler::ShowTipCursor()
144 nStartPosition = nEndPosition+1;
146 - else if( cNext == '.' )
147 + else if( cNext == cSheetSep )
151 @@ -919,6 +930,9 @@ void ScInputHandler::ShowTipBelow( const String& rText )
152 void ScInputHandler::UseFormulaData()
154 EditView* pActiveView = pTopView ? pTopView : pTableView;
155 + ScDocShell* pDocSh = pActiveViewSh->GetViewData()->GetDocShell();
156 + const sal_Unicode cSep = ScCompiler::GetNativeSymbol(ocSep).GetChar(0);
157 + const sal_Unicode cSheetSep = lcl_getSheetSeparator(pDocSh->GetDocument());
159 // Formeln duerfen nur 1 Absatz haben
160 if ( pActiveView && pFormulaData && pEngine->GetParagraphCount() == 1 )
161 @@ -970,7 +984,7 @@ void ScInputHandler::UseFormulaData()
164 sal_Unicode c = aFormula.GetChar( nLeftParentPos-1 );
165 - if( !(c >= 'A' && c<= 'Z' || c>= 'a' && c<= 'z' ) )
166 + if( !((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') ) )
168 nNextFStart = aHelper.GetFunctionStart( aFormula, nLeftParentPos, TRUE);
169 if( aHelper.GetNextFunc( aFormula, FALSE, nNextFStart, &nNextFEnd, &ppFDesc, &aArgs ) )
170 @@ -1002,8 +1016,8 @@ void ScInputHandler::UseFormulaData()
174 - nCountSemicolon = aNew.GetTokenCount(';')-1;
175 - nCountDot = aNew.GetTokenCount('.')-1;
176 + nCountSemicolon = aNew.GetTokenCount(cSep)-1;
177 + nCountDot = aNew.GetTokenCount(cSheetSep)-1;
179 if( !nCountSemicolon )
181 @@ -1025,7 +1039,7 @@ void ScInputHandler::UseFormulaData()
183 nStartPosition = i+1;
185 - else if( cNext == ';' )
186 + else if( cNext == cSep )
190 @@ -1046,7 +1060,7 @@ void ScInputHandler::UseFormulaData()
192 nStartPosition = i+1;
194 - else if( cNext == ';' )
195 + else if( cNext == cSep )
199 @@ -1056,7 +1070,7 @@ void ScInputHandler::UseFormulaData()
201 nStartPosition = nEndPosition+1;
203 - else if( cNext == '.' )
204 + else if( cNext == cSheetSep )
208 @@ -2759,6 +2773,7 @@ BOOL ScInputHandler::IsModalMode( SfxObjectShell* pDocSh )
210 void ScInputHandler::AddRefEntry()
212 + const sal_Unicode cSep = ScCompiler::GetNativeSymbol(ocSep).GetChar(0);
214 if (!pTableView && !pTopView)
215 return; // z.B. FillMode
216 @@ -2767,9 +2782,9 @@ void ScInputHandler::AddRefEntry()
220 - pTableView->InsertText( ';', FALSE );
221 + pTableView->InsertText( cSep, FALSE );
223 - pTopView->InsertText( ';', FALSE );
224 + pTopView->InsertText( cSep, FALSE );