[Libreoffice-commits] core.git: Branch 'feature/formula-core-rework' - sc/inc sc/source
Kohei Yoshida
kohei.yoshida at gmail.com
Thu Mar 21 07:43:42 PDT 2013
sc/inc/cell.hxx | 3 --
sc/source/core/data/cell.cxx | 8 -----
sc/source/ui/docshell/docfunc.cxx | 53 --------------------------------------
sc/source/ui/inc/docfunc.hxx | 5 ---
4 files changed, 69 deletions(-)
New commits:
commit 7631a4ad56216837b23c27d341639b3d0ef81ecb
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date: Thu Mar 21 10:44:50 2013 -0400
Remove unused methods.
Change-Id: I8a7b5513e136a632950c3d41f62020f6b68203ef
diff --git a/sc/inc/cell.hxx b/sc/inc/cell.hxx
index 71aee73..4230272 100644
--- a/sc/inc/cell.hxx
+++ b/sc/inc/cell.hxx
@@ -112,9 +112,6 @@ public:
/** Deletes the own cell broadcaster. */
void DeleteBroadcaster();
- // String- oder EditCell
- static ScBaseCell* CreateTextCell( const rtl::OUString& rString, ScDocument* );
-
// nOnlyNames may be one or more of SC_LISTENING_NAMES_*
void StartListeningTo( ScDocument* pDoc );
void EndListeningTo( ScDocument* pDoc,
diff --git a/sc/source/core/data/cell.cxx b/sc/source/core/data/cell.cxx
index a8aab98..4aac6b5 100644
--- a/sc/source/core/data/cell.cxx
+++ b/sc/source/core/data/cell.cxx
@@ -277,14 +277,6 @@ void ScBaseCell::DeleteBroadcaster()
DELETEZ( mpBroadcaster );
}
-ScBaseCell* ScBaseCell::CreateTextCell( const rtl::OUString& rString, ScDocument* pDoc )
-{
- if ( rString.indexOf('\n') != -1 || rString.indexOf(CHAR_CR) != -1 )
- return new ScEditCell( rString, pDoc );
- else
- return new ScStringCell( rString );
-}
-
void ScBaseCell::StartListeningTo( ScDocument* pDoc )
{
if ( eCellType == CELLTYPE_FORMULA && !pDoc->IsClipOrUndo()
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index c1ecbc5..c2f3df6 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -1109,59 +1109,6 @@ static ScTokenArray* lcl_ScDocFunc_CreateTokenArrayXML( const String& rText, con
return pCode;
}
-
-ScBaseCell* ScDocFunc::InterpretEnglishString( const ScAddress& rPos,
- const String& rText, const String& rFormulaNmsp, const formula::FormulaGrammar::Grammar eGrammar, short* pRetFormatType )
-{
- ScDocument* pDoc = rDocShell.GetDocument();
- ScBaseCell* pNewCell = NULL;
-
- if ( rText.Len() > 1 && rText.GetChar(0) == '=' )
- {
- ScTokenArray* pCode;
- if ( pDoc->IsImportingXML() )
- { // temporary formula string as string tokens
- pCode = lcl_ScDocFunc_CreateTokenArrayXML( rText, rFormulaNmsp, eGrammar );
- pDoc->IncXMLImportedFormulaCount( rText.Len() );
- }
- else
- {
- ScCompiler aComp( pDoc, rPos );
- aComp.SetGrammar(eGrammar);
- pCode = aComp.CompileString( rText );
- }
- pNewCell = new ScFormulaCell( pDoc, rPos, pCode, eGrammar, MM_NONE );
- delete pCode; // Zell-ctor hat das TokenArray kopiert
- }
- else if ( rText.Len() > 1 && rText.GetChar(0) == '\'' )
- {
- // for bEnglish, "'" at the beginning is always interpreted as text
- // marker and stripped
- pNewCell = ScBaseCell::CreateTextCell( rText.Copy( 1 ), pDoc );
- }
- else // (nur) auf englisches Zahlformat testen
- {
- SvNumberFormatter* pFormatter = pDoc->GetFormatTable();
- sal_uInt32 nEnglish = pFormatter->GetStandardIndex(LANGUAGE_ENGLISH_US);
- double fVal;
- if ( pFormatter->IsNumberFormat( rText, nEnglish, fVal ) )
- {
- pNewCell = new ScValueCell( fVal );
- // return the format type from the English format, so a localized format can be created
- if ( pRetFormatType )
- *pRetFormatType = pFormatter->GetType( nEnglish );
- }
- else if ( rText.Len() )
- pNewCell = ScBaseCell::CreateTextCell( rText, pDoc );
-
- // das (englische) Zahlformat wird nicht gesetzt
- //! passendes lokales Format suchen und setzen???
- }
-
- return pNewCell;
-}
-
-
bool ScDocFunc::SetCellText(
const ScAddress& rPos, const OUString& rText, bool bInterpret, bool bEnglish, bool bApi,
const formula::FormulaGrammar::Grammar eGrammar )
diff --git a/sc/source/ui/inc/docfunc.hxx b/sc/source/ui/inc/docfunc.hxx
index 964a839..da96bb9 100644
--- a/sc/source/ui/inc/docfunc.hxx
+++ b/sc/source/ui/inc/docfunc.hxx
@@ -106,11 +106,6 @@ public:
const ScAddress& rPos, const OUString& rText, bool bInterpret, bool bEnglish, bool bApi,
const formula::FormulaGrammar::Grammar eGrammar );
- // creates a new cell for use with PutCell
- ScBaseCell* InterpretEnglishString( const ScAddress& rPos, const String& rText,
- const String& rFormulaNmsp, const formula::FormulaGrammar::Grammar eGrammar,
- short* pRetFormatType = NULL );
-
virtual bool ShowNote( const ScAddress& rPos, bool bShow = true );
inline bool HideNote( const ScAddress& rPos ) { return ShowNote( rPos, false ); }
More information about the Libreoffice-commits
mailing list