diff options
author | Noel Grandin <noel@peralex.com> | 2013-09-13 13:20:26 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-09-17 09:02:18 +0200 |
commit | 8f23a3b0e2484fea4a85f4d5b961a718c71877a9 (patch) | |
tree | 72957d4969ce8aab5a84fd811ae4e0be6dacf560 | |
parent | 12d44973d96f5cad4b99386c8a281f8427d304e4 (diff) |
convert formula::FormulaCompiler::OpCodeMap from String to OUString
..and add some convenience methods
sal_Unicode getSymbolChar
sal_Unicode GetNativeSymbolChar
since most call sites are only interested in the first char of
the symbol.
Change-Id: I6aeb43b055b849e71cb1f62c3efe79d6a4cc10bd
-rw-r--r-- | formula/source/core/api/FormulaCompiler.cxx | 41 | ||||
-rw-r--r-- | include/formula/FormulaCompiler.hxx | 16 | ||||
-rw-r--r-- | sc/source/core/data/funcdesc.cxx | 10 | ||||
-rw-r--r-- | sc/source/core/tool/compiler.cxx | 10 | ||||
-rw-r--r-- | sc/source/core/tool/rangelst.cxx | 6 | ||||
-rw-r--r-- | sc/source/core/tool/rangeutl.cxx | 2 | ||||
-rw-r--r-- | sc/source/core/tool/reffind.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/xml/XMLTableShapeResizer.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/app/inputhdl.cxx | 6 | ||||
-rw-r--r-- | sc/source/ui/pagedlg/areasdlg.cxx | 8 | ||||
-rw-r--r-- | sc/source/ui/unoobj/chart2uno.cxx | 16 | ||||
-rw-r--r-- | sc/source/ui/view/tabview3.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/view/viewfun2.cxx | 2 |
13 files changed, 66 insertions, 57 deletions
diff --git a/formula/source/core/api/FormulaCompiler.cxx b/formula/source/core/api/FormulaCompiler.cxx index 5586791da39e..bad67daad312 100644 --- a/formula/source/core/api/FormulaCompiler.cxx +++ b/formula/source/core/api/FormulaCompiler.cxx @@ -118,7 +118,7 @@ short lcl_GetRetFormat( OpCode eOpCode ) } inline void lclPushOpCodeMapEntry( ::std::vector< sheet::FormulaOpCodeMapEntry >& rVec, - const String* pTable, sal_uInt16 nOpCode ) + const OUString* pTable, sal_uInt16 nOpCode ) { sheet::FormulaOpCodeMapEntry aEntry; aEntry.Token.OpCode = nOpCode; @@ -127,14 +127,14 @@ inline void lclPushOpCodeMapEntry( ::std::vector< sheet::FormulaOpCodeMapEntry > } void lclPushOpCodeMapEntries( ::std::vector< sheet::FormulaOpCodeMapEntry >& rVec, - const String* pTable, sal_uInt16 nOpCodeBeg, sal_uInt16 nOpCodeEnd ) + const OUString* pTable, sal_uInt16 nOpCodeBeg, sal_uInt16 nOpCodeEnd ) { for (sal_uInt16 nOpCode = nOpCodeBeg; nOpCode < nOpCodeEnd; ++nOpCode) lclPushOpCodeMapEntry( rVec, pTable, nOpCode ); } void lclPushOpCodeMapEntries( ::std::vector< sheet::FormulaOpCodeMapEntry >& rVec, - const String* pTable, const sal_uInt16* pnOpCodes, size_t nCount ) + const OUString* pTable, const sal_uInt16* pnOpCodes, size_t nCount ) { for (const sal_uInt16* pnEnd = pnOpCodes + nCount; pnOpCodes < pnEnd; ++pnOpCodes) lclPushOpCodeMapEntry( rVec, pTable, *pnOpCodes ); @@ -497,7 +497,7 @@ void FormulaCompiler::OpCodeMap::putOpCode( const String & rStr, const OpCode eO DBG_ASSERT( 0 < eOp && sal_uInt16(eOp) < mnSymbols, "OpCodeMap::putOpCode: OpCode out of range"); if (0 < eOp && sal_uInt16(eOp) < mnSymbols) { - SAL_WARN_IF( !((mpTable[eOp].Len() == 0) || (mpTable[eOp] == rStr) || + SAL_WARN_IF( !(mpTable[eOp].isEmpty() || (mpTable[eOp] == rStr) || (eOp == ocCurrency) || (eOp == ocSep) || (eOp == ocArrayColSep) || (eOp == ocArrayRowSep)), "formula.core", "OpCodeMap::putOpCode: reusing OpCode " << eOp @@ -642,13 +642,18 @@ void lcl_fillNativeSymbols( FormulaCompiler::NonConstOpCodeMapPtr& xMap, bool bD xMap = s_SymbolMap; } -const String& FormulaCompiler::GetNativeSymbol( OpCode eOp ) +const OUString& FormulaCompiler::GetNativeSymbol( OpCode eOp ) { NonConstOpCodeMapPtr xSymbolsNative; lcl_fillNativeSymbols( xSymbolsNative); return xSymbolsNative->getSymbol( eOp ); } +sal_Unicode FormulaCompiler::GetNativeSymbolChar( OpCode eOp ) +{ + return GetNativeSymbol(eOp)[0]; +} + void FormulaCompiler::InitSymbolsNative() const { lcl_fillNativeSymbols( mxSymbolsNative); @@ -822,9 +827,9 @@ FormulaCompiler::OpCodeMap::~OpCodeMap() void FormulaCompiler::OpCodeMap::putCopyOpCode( const String& rSymbol, OpCode eOp ) { - SAL_WARN_IF( mpTable[eOp].Len() && !rSymbol.Len(), "formula.core", + SAL_WARN_IF( !mpTable[eOp].isEmpty() && !rSymbol.Len(), "formula.core", "OpCodeMap::putCopyOpCode: NOT replacing OpCode " << eOp << " '" << mpTable[eOp] << "' with empty name!"); - if (mpTable[eOp].Len() && !rSymbol.Len()) + if (!mpTable[eOp].isEmpty() && !rSymbol.Len()) mpHashMap->insert( OpCodeHashMap::value_type( mpTable[eOp], eOp)); else { @@ -845,7 +850,7 @@ void FormulaCompiler::OpCodeMap::copyFrom( const OpCodeMap& r, bool bOverrideKno n = mnSymbols; // OpCode 0 (ocPush) should never be in a map. - SAL_WARN_IF( mpTable[0].Len() || r.mpTable[0].Len(), "formula.core", + SAL_WARN_IF( !mpTable[0].isEmpty() || !r.mpTable[0].isEmpty(), "formula.core", "OpCodeMap::copyFrom: OpCode 0 assigned, this: '" << mpTable[0] << "' that: '" << r.mpTable[0] << "'"); @@ -1950,44 +1955,44 @@ OpCode FormulaCompiler::NextToken() switch ( eOp ) { // swap operators case ocGreater: - if ( c == mxSymbols->getSymbol( ocEqual).GetChar(0) ) + if ( c == mxSymbols->getSymbolChar( ocEqual) ) { // >= instead of => aCorrectedFormula.SetChar( nPos, - mxSymbols->getSymbol( ocGreater).GetChar(0) ); + mxSymbols->getSymbolChar( ocGreater) ); aCorrectedSymbol = OUString(c); bCorrected = true; } break; case ocLess: - if ( c == mxSymbols->getSymbol( ocEqual).GetChar(0) ) + if ( c == mxSymbols->getSymbolChar( ocEqual) ) { // <= instead of =< aCorrectedFormula.SetChar( nPos, - mxSymbols->getSymbol( ocLess).GetChar(0) ); + mxSymbols->getSymbolChar( ocLess) ); aCorrectedSymbol = OUString(c); bCorrected = true; } - else if ( c == mxSymbols->getSymbol( ocGreater).GetChar(0) ) + else if ( c == mxSymbols->getSymbolChar( ocGreater) ) { // <> instead of >< aCorrectedFormula.SetChar( nPos, - mxSymbols->getSymbol( ocLess).GetChar(0) ); + mxSymbols->getSymbolChar( ocLess) ); aCorrectedSymbol = OUString(c); bCorrected = true; } break; case ocMul: - if ( c == mxSymbols->getSymbol( ocSub).GetChar(0) ) + if ( c == mxSymbols->getSymbolChar( ocSub) ) { // *- instead of -* aCorrectedFormula.SetChar( nPos, - mxSymbols->getSymbol( ocMul).GetChar(0) ); + mxSymbols->getSymbolChar( ocMul) ); aCorrectedSymbol = OUString(c); bCorrected = true; } break; case ocDiv: - if ( c == mxSymbols->getSymbol( ocSub).GetChar(0) ) + if ( c == mxSymbols->getSymbolChar( ocSub) ) { // /- instead of -/ aCorrectedFormula.SetChar( nPos, - mxSymbols->getSymbol( ocDiv).GetChar(0) ); + mxSymbols->getSymbolChar( ocDiv) ); aCorrectedSymbol = OUString(c); bCorrected = true; } diff --git a/include/formula/FormulaCompiler.hxx b/include/formula/FormulaCompiler.hxx index 0328e39f4048..641107e2f489 100644 --- a/include/formula/FormulaCompiler.hxx +++ b/include/formula/FormulaCompiler.hxx @@ -87,11 +87,11 @@ public: class FORMULA_DLLPUBLIC OpCodeMap { OpCodeHashMap * mpHashMap; /// Hash map of symbols, String -> OpCode - String * mpTable; /// Array of symbols, OpCode -> String, offset==OpCode + OUString * mpTable; /// Array of symbols, OpCode -> String, offset==OpCode ExternalHashMap * mpExternalHashMap; /// Hash map of ocExternal, Filter String -> AddIn String ExternalHashMap * mpReverseExternalHashMap; /// Hash map of ocExternal, AddIn String -> Filter String FormulaGrammar::Grammar meGrammar; /// Grammar, language and reference convention - sal_uInt16 mnSymbols; /// Count of OpCode symbols + sal_uInt16 mnSymbols; /// Count of OpCode symbols bool mbCore : 1; /// If mapping was setup by core, not filters bool mbEnglish : 1; /// If English symbols and external names @@ -103,7 +103,7 @@ public: OpCodeMap(sal_uInt16 nSymbols, bool bCore, FormulaGrammar::Grammar eGrammar ) : mpHashMap( new OpCodeHashMap( nSymbols)), - mpTable( new String[ nSymbols ]), + mpTable( new OUString[ nSymbols ]), mpExternalHashMap( new ExternalHashMap), mpReverseExternalHashMap( new ExternalHashMap), meGrammar( eGrammar), @@ -133,15 +133,18 @@ public: inline const ExternalHashMap* getReverseExternalHashMap() const { return mpReverseExternalHashMap; } /// Get the symbol string matching an OpCode. - inline const String& getSymbol( const OpCode eOp ) const + inline const OUString& getSymbol( const OpCode eOp ) const { DBG_ASSERT( sal_uInt16(eOp) < mnSymbols, "OpCodeMap::getSymbol: OpCode out of range"); if (sal_uInt16(eOp) < mnSymbols) return mpTable[ eOp ]; - static String s_sEmpty; + static OUString s_sEmpty; return s_sEmpty; } + /// Get the first character of the symbol string matching an OpCode. + inline sal_Unicode getSymbolChar( const OpCode eOp ) const { return getSymbol(eOp)[0]; }; + /// Get the grammar. inline FormulaGrammar::Grammar getGrammar() const { return meGrammar; } @@ -237,7 +240,8 @@ public: static bool DeQuote( String& rStr ); - static const String& GetNativeSymbol( OpCode eOp ); + static const OUString& GetNativeSymbol( OpCode eOp ); + static sal_Unicode GetNativeSymbolChar( OpCode eOp ); static bool IsMatrixFunction(OpCode _eOpCode); // if a function _always_ returns a Matrix short GetNumFormatType() const { return nNumFmt; } diff --git a/sc/source/core/data/funcdesc.cxx b/sc/source/core/data/funcdesc.cxx index b6691c650da0..0874b0a5e5c0 100644 --- a/sc/source/core/data/funcdesc.cxx +++ b/sc/source/core/data/funcdesc.cxx @@ -821,15 +821,15 @@ sal_Unicode ScFunctionMgr::getSingleToken(const formula::IFunctionManager::EToke switch(_eToken) { case eOk: - return ScCompiler::GetNativeSymbol(ocOpen).GetChar(0); + return ScCompiler::GetNativeSymbolChar(ocOpen); case eClose: - return ScCompiler::GetNativeSymbol(ocClose).GetChar(0); + return ScCompiler::GetNativeSymbolChar(ocClose); case eSep: - return ScCompiler::GetNativeSymbol(ocSep).GetChar(0); + return ScCompiler::GetNativeSymbolChar(ocSep); case eArrayOpen: - return ScCompiler::GetNativeSymbol(ocArrayOpen).GetChar(0); + return ScCompiler::GetNativeSymbolChar(ocArrayOpen); case eArrayClose: - return ScCompiler::GetNativeSymbol(ocArrayClose).GetChar(0); + return ScCompiler::GetNativeSymbolChar(ocArrayClose); } return 0; } diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx index 01e6077ca8e9..13271c445658 100644 --- a/sc/source/core/tool/compiler.cxx +++ b/sc/source/core/tool/compiler.cxx @@ -1806,9 +1806,9 @@ xub_StrLen ScCompiler::NextSymbol(bool bInArray) mnRangeOpPosInSymbol = -1; ScanState eState = ssGetChar; xub_StrLen nSpaces = 0; - sal_Unicode cSep = mxSymbols->getSymbol( ocSep).GetChar(0); - sal_Unicode cArrayColSep = mxSymbols->getSymbol( ocArrayColSep).GetChar(0); - sal_Unicode cArrayRowSep = mxSymbols->getSymbol( ocArrayRowSep).GetChar(0); + sal_Unicode cSep = mxSymbols->getSymbolChar( ocSep); + sal_Unicode cArrayColSep = mxSymbols->getSymbolChar( ocArrayColSep); + sal_Unicode cArrayRowSep = mxSymbols->getSymbolChar( ocArrayRowSep); sal_Unicode cDecSep = (mxSymbols->isEnglish() ? '.' : ScGlobal::pLocaleData->getNumDecimalSep()[0]); @@ -3272,13 +3272,13 @@ void ScCompiler::AutoCorrectParsedSymbol() xub_StrLen nXcount; if ( (nXcount = comphelper::string::getTokenCount(aCorrectedSymbol, cx)) > 1 ) { // x => * - sal_Unicode c = mxSymbols->getSymbol(ocMul).GetChar(0); + sal_Unicode c = mxSymbols->getSymbolChar(ocMul); aCorrectedSymbol = aCorrectedSymbol.replaceAll(OUString(cx), OUString(c)); bCorrected = true; } if ( (nXcount = comphelper::string::getTokenCount(aCorrectedSymbol, cX)) > 1 ) { // X => * - sal_Unicode c = mxSymbols->getSymbol(ocMul).GetChar(0); + sal_Unicode c = mxSymbols->getSymbolChar(ocMul); aCorrectedSymbol = aCorrectedSymbol.replaceAll(OUString(cX), OUString(c)); bCorrected = true; } diff --git a/sc/source/core/tool/rangelst.cxx b/sc/source/core/tool/rangelst.cxx index 64a6943c1f6f..232b251c3c94 100644 --- a/sc/source/core/tool/rangelst.cxx +++ b/sc/source/core/tool/rangelst.cxx @@ -186,7 +186,7 @@ sal_uInt16 ScRangeList::Parse( const String& rStr, ScDocument* pDoc, sal_uInt16 if ( rStr.Len() ) { if (!cDelimiter) - cDelimiter = ScCompiler::GetNativeSymbol(ocSep).GetChar(0); + cDelimiter = ScCompiler::GetNativeSymbolChar(ocSep); nMask |= SCA_VALID; // falls das jemand vergessen sollte sal_uInt16 nResult = (sal_uInt16)~0; // alle Bits setzen @@ -231,7 +231,7 @@ void ScRangeList::Format( String& rStr, sal_uInt16 nFlags, ScDocument* pDoc, rStr.Erase(); if (!cDelimiter) - cDelimiter = ScCompiler::GetNativeSymbol(ocSep).GetChar(0); + cDelimiter = ScCompiler::GetNativeSymbolChar(ocSep); FormatString func(rStr, nFlags, pDoc, eConv, cDelimiter); for_each(maRanges.begin(), maRanges.end(), func); @@ -243,7 +243,7 @@ void ScRangeList::Format( OUString& rStr, sal_uInt16 nFlags, ScDocument* pDoc, { if (!cDelimiter) - cDelimiter = ScCompiler::GetNativeSymbol(ocSep).GetChar(0); + cDelimiter = ScCompiler::GetNativeSymbolChar(ocSep); String aStr; FormatString func(aStr, nFlags, pDoc, eConv, cDelimiter); diff --git a/sc/source/core/tool/rangeutl.cxx b/sc/source/core/tool/rangeutl.cxx index 74e1dbfbd8ec..9781dffe6af3 100644 --- a/sc/source/core/tool/rangeutl.cxx +++ b/sc/source/core/tool/rangeutl.cxx @@ -839,7 +839,7 @@ void ScRangeStringConverter::GetStringFromXMLRangeString( OUString& rString, con { FormulaGrammar::AddressConvention eConv = pDoc->GetAddressConvention(); const sal_Unicode cSep = ' '; - const sal_Unicode cSepNew = ScCompiler::GetNativeSymbol(ocSep).GetChar(0); + const sal_Unicode cSepNew = ScCompiler::GetNativeSymbolChar(ocSep); const sal_Unicode cQuote = '\''; OUStringBuffer aRetStr; diff --git a/sc/source/core/tool/reffind.cxx b/sc/source/core/tool/reffind.cxx index e461920ce22b..3379c60ddfad 100644 --- a/sc/source/core/tool/reffind.cxx +++ b/sc/source/core/tool/reffind.cxx @@ -38,7 +38,7 @@ inline bool IsText( sal_Unicode c ) return false; // argument separator is configurable. - const sal_Unicode sep = ScCompiler::GetNativeSymbol(ocSep).GetChar(0); + const sal_Unicode sep = ScCompiler::GetNativeSymbolChar(ocSep); return c != sep; } diff --git a/sc/source/filter/xml/XMLTableShapeResizer.cxx b/sc/source/filter/xml/XMLTableShapeResizer.cxx index d6ffc275d59a..f76217b6f4cb 100644 --- a/sc/source/filter/xml/XMLTableShapeResizer.cxx +++ b/sc/source/filter/xml/XMLTableShapeResizer.cxx @@ -85,7 +85,7 @@ void ScMyOLEFixer::CreateChartListener(ScDocument* pDoc, SAL_WNODEPRECATED_DECLARATIONS_PUSH auto_ptr< vector<ScTokenRef> > pRefTokens(new vector<ScTokenRef>); SAL_WNODEPRECATED_DECLARATIONS_POP - const sal_Unicode cSep = ScCompiler::GetNativeSymbol(ocSep).GetChar(0); + const sal_Unicode cSep = ScCompiler::GetNativeSymbolChar(ocSep); ScRefTokenHelper::compileRangeRepresentation( *pRefTokens, aRangeStr, pDoc, cSep, pDoc->GetGrammar()); if (!pRefTokens->empty()) diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx index 7454a7481992..3ce1a6ce9a10 100644 --- a/sc/source/ui/app/inputhdl.cxx +++ b/sc/source/ui/app/inputhdl.cxx @@ -808,7 +808,7 @@ void ScInputHandler::ShowTipCursor() HideTipBelow(); EditView* pActiveView = pTopView ? pTopView : pTableView; ScDocShell* pDocSh = pActiveViewSh->GetViewData()->GetDocShell(); - const sal_Unicode cSep = ScCompiler::GetNativeSymbol(ocSep).GetChar(0); + const sal_Unicode cSep = ScCompiler::GetNativeSymbolChar(ocSep); const sal_Unicode cSheetSep = lcl_getSheetSeparator(pDocSh->GetDocument()); if ( bFormulaMode && pActiveView && pFormulaDataPara && pEngine->GetParagraphCount() == 1 ) @@ -1034,7 +1034,7 @@ void ScInputHandler::UseFormulaData() { EditView* pActiveView = pTopView ? pTopView : pTableView; ScDocShell* pDocSh = pActiveViewSh->GetViewData()->GetDocShell(); - const sal_Unicode cSep = ScCompiler::GetNativeSymbol(ocSep).GetChar(0); + const sal_Unicode cSep = ScCompiler::GetNativeSymbolChar(ocSep); const sal_Unicode cSheetSep = lcl_getSheetSeparator(pDocSh->GetDocument()); // Formeln duerfen nur 1 Absatz haben @@ -2897,7 +2897,7 @@ bool ScInputHandler::IsModalMode( SfxObjectShell* pDocSh ) void ScInputHandler::AddRefEntry() { - const sal_Unicode cSep = ScCompiler::GetNativeSymbol(ocSep).GetChar(0); + const sal_Unicode cSep = ScCompiler::GetNativeSymbolChar(ocSep); UpdateActiveView(); if (!pTableView && !pTopView) return; // z.B. FillMode diff --git a/sc/source/ui/pagedlg/areasdlg.cxx b/sc/source/ui/pagedlg/areasdlg.cxx index 268e03b51e5f..e1067d80a131 100644 --- a/sc/source/ui/pagedlg/areasdlg.cxx +++ b/sc/source/ui/pagedlg/areasdlg.cxx @@ -229,7 +229,7 @@ void ScPrintAreasDlg::AddRefEntry() { if ( pRefInputEdit == pEdPrintArea ) { - const sal_Unicode sep = ScCompiler::GetNativeSymbol(ocSep).GetChar(0); + const sal_Unicode sep = ScCompiler::GetNativeSymbolChar(ocSep); String aVal = pEdPrintArea->GetText(); aVal += sep; pEdPrintArea->SetText(aVal); @@ -302,7 +302,7 @@ void ScPrintAreasDlg::Impl_Reset() aStrRange.Erase(); String aOne; const formula::FormulaGrammar::AddressConvention eConv = pDoc->GetAddressConvention(); - const sal_Unicode sep = ScCompiler::GetNativeSymbol(ocSep).GetChar(0); + const sal_Unicode sep = ScCompiler::GetNativeSymbolChar(ocSep); sal_uInt16 nRangeCount = pDoc->GetPrintRangeCount( nCurTab ); for (sal_uInt16 i=0; i<nRangeCount; i++) { @@ -377,7 +377,7 @@ sal_Bool ScPrintAreasDlg::Impl_CheckRefStrings() const sal_uInt16 nValidAddr = SCA_VALID | SCA_VALID_ROW | SCA_VALID_COL; const sal_uInt16 nValidRange = nValidAddr | SCA_VALID_ROW2 | SCA_VALID_COL2; const formula::FormulaGrammar::AddressConvention eConv = pDoc->GetAddressConvention(); - const sal_Unicode sep = ScCompiler::GetNativeSymbol(ocSep).GetChar(0); + const sal_Unicode sep = ScCompiler::GetNativeSymbolChar(ocSep); ScAddress aAddr; ScRange aRange; @@ -784,7 +784,7 @@ static bool lcl_CheckRepeatString( const String& rStr, ScDocument* pDoc, bool bI // Col: [valid col] rsep [valid col] const formula::FormulaGrammar::AddressConvention eConv = pDoc->GetAddressConvention(); - const sal_Unicode rsep = ScCompiler::GetNativeSymbol(ocRange).GetChar(0); + const sal_Unicode rsep = ScCompiler::GetNativeSymbolChar(ocRange); if (pRange) { diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx index f052423367dd..bad25f6bacf7 100644 --- a/sc/source/ui/unoobj/chart2uno.cxx +++ b/sc/source/ui/unoobj/chart2uno.cxx @@ -999,7 +999,7 @@ private: void lcl_convertTokensToString(OUString& rStr, const vector<ScTokenRef>& rTokens, ScDocument* pDoc) { - const sal_Unicode cRangeSep = ScCompiler::GetNativeSymbol(ocSep).GetChar(0); + const sal_Unicode cRangeSep = ScCompiler::GetNativeSymbolChar(ocSep); FormulaGrammar::Grammar eGrammar = pDoc->GetGrammar(); Tokens2RangeString func(pDoc, eGrammar, cRangeSep); func = ::std::for_each(rTokens.begin(), rTokens.end(), func); @@ -1052,7 +1052,7 @@ void ScChart2DataProvider::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint } vector<ScTokenRef> aTokens; - const sal_Unicode cSep = ScCompiler::GetNativeSymbol(ocSep).GetChar(0); + const sal_Unicode cSep = ScCompiler::GetNativeSymbolChar(ocSep); ScRefTokenHelper::compileRangeRepresentation( aTokens, aRangeRepresentation, m_pDocument, cSep, m_pDocument->GetGrammar(), true); return !aTokens.empty(); @@ -1478,7 +1478,7 @@ ScChart2DataProvider::createDataSource( } vector<ScTokenRef> aRefTokens; - const sal_Unicode cSep = ScCompiler::GetNativeSymbol(ocSep).GetChar(0); + const sal_Unicode cSep = ScCompiler::GetNativeSymbolChar(ocSep); ScRefTokenHelper::compileRangeRepresentation( aRefTokens, aRangeRepresentation, m_pDocument, cSep, m_pDocument->GetGrammar(), true); if (aRefTokens.empty()) @@ -1812,7 +1812,7 @@ uno::Sequence< beans::PropertyValue > SAL_CALL ScChart2DataProvider::detectArgum { bFirstCellAsLabel = true; vector<ScTokenRef> aTokens; - const sal_Unicode cSep = ScCompiler::GetNativeSymbol(ocSep).GetChar(0); + const sal_Unicode cSep = ScCompiler::GetNativeSymbolChar(ocSep); ScRefTokenHelper::compileRangeRepresentation( aTokens, xLabel->getSourceRangeRepresentation(), m_pDocument, cSep, m_pDocument->GetGrammar(), true); aLabel.initRangeAnalyzer(aTokens); @@ -1831,7 +1831,7 @@ uno::Sequence< beans::PropertyValue > SAL_CALL ScChart2DataProvider::detectArgum if( xValues.is()) { vector<ScTokenRef> aTokens; - const sal_Unicode cSep = ScCompiler::GetNativeSymbol(ocSep).GetChar(0); + const sal_Unicode cSep = ScCompiler::GetNativeSymbolChar(ocSep); ScRefTokenHelper::compileRangeRepresentation( aTokens, xValues->getSourceRangeRepresentation(), m_pDocument, cSep, m_pDocument->GetGrammar(), true); aValues.initRangeAnalyzer(aTokens); @@ -2040,7 +2040,7 @@ uno::Sequence< beans::PropertyValue > SAL_CALL ScChart2DataProvider::detectArgum return false; vector<ScTokenRef> aTokens; - const sal_Unicode cSep = ScCompiler::GetNativeSymbol(ocSep).GetChar(0); + const sal_Unicode cSep = ScCompiler::GetNativeSymbolChar(ocSep); ScRefTokenHelper::compileRangeRepresentation( aTokens, aRangeRepresentation, m_pDocument, cSep, m_pDocument->GetGrammar(), true); return !aTokens.empty(); @@ -2060,7 +2060,7 @@ uno::Reference< chart2::data::XDataSequence > SAL_CALL return xResult; vector<ScTokenRef> aRefTokens; - const sal_Unicode cSep = ScCompiler::GetNativeSymbol(ocSep).GetChar(0); + const sal_Unicode cSep = ScCompiler::GetNativeSymbolChar(ocSep); ScRefTokenHelper::compileRangeRepresentation( aRefTokens, aRangeRepresentation, m_pDocument, cSep, m_pDocument->GetGrammar(), true); if (aRefTokens.empty()) @@ -2231,7 +2231,7 @@ OUString SAL_CALL ScChart2DataProvider::convertRangeToXML( const OUString& sRang return aRet; vector<ScTokenRef> aRefTokens; - const sal_Unicode cSep = ScCompiler::GetNativeSymbol(ocSep).GetChar(0); + const sal_Unicode cSep = ScCompiler::GetNativeSymbolChar(ocSep); ScRefTokenHelper::compileRangeRepresentation( aRefTokens, sRangeRepresentation, m_pDocument, cSep, m_pDocument->GetGrammar(), true); if (aRefTokens.empty()) diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx index cd99e5b54f92..e258761fc948 100644 --- a/sc/source/ui/view/tabview3.cxx +++ b/sc/source/ui/view/tabview3.cxx @@ -2162,7 +2162,7 @@ void ScTabView::DoChartSelection( const uno::Sequence< chart2::data::HighlightedRange > & rHilightRanges ) { ClearHighlightRanges(); - const sal_Unicode sep = ::formula::FormulaCompiler::GetNativeSymbol(ocSep).GetChar(0); + const sal_Unicode sep = ::formula::FormulaCompiler::GetNativeSymbolChar(ocSep); for( sal_Int32 i=0; i<rHilightRanges.getLength(); ++i ) { diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx index 9d10c2507ebf..c8ba3a77327a 100644 --- a/sc/source/ui/view/viewfun2.cxx +++ b/sc/source/ui/view/viewfun2.cxx @@ -963,7 +963,7 @@ void ScViewFunc::SetPrintRanges( sal_Bool bEntireSheet, const String* pPrint, { if ( pPrint->Len() ) { - const sal_Unicode sep = ScCompiler::GetNativeSymbol(ocSep).GetChar(0); + const sal_Unicode sep = ScCompiler::GetNativeSymbolChar(ocSep); sal_uInt16 nTCount = comphelper::string::getTokenCount(*pPrint, sep); for (sal_uInt16 i=0; i<nTCount; i++) { |