[Libreoffice-commits] core.git: Branch 'feature/formula-core-rework' - sc/inc sc/source
Kohei Yoshida
kohei.yoshida at gmail.com
Thu Jul 25 19:24:18 PDT 2013
sc/inc/compiler.hxx | 1
sc/source/core/tool/compiler.cxx | 109 ---------------------------------------
2 files changed, 110 deletions(-)
New commits:
commit 76936cc9045e8d663d43edb670cd0369b61400d2
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date: Thu Jul 25 22:24:47 2013 -0400
Nobody uses this method now. Chuck it.
Change-Id: I2d55b2e43cf87895f29fd69226ec96c5d75e3696
diff --git a/sc/inc/compiler.hxx b/sc/inc/compiler.hxx
index 5cc2498..adaa339 100644
--- a/sc/inc/compiler.hxx
+++ b/sc/inc/compiler.hxx
@@ -457,7 +457,6 @@ public:
const ScAddress& rOldPos, const ScRange&,
SCsCOL nDx, SCsROW nDy, SCsTAB nDz );
- ScRangeData* UpdateInsertTab(SCTAB nTable, bool bIsName, SCTAB nNewSheets = 1 );
ScRangeData* UpdateDeleteTab(SCTAB nTable, bool bIsMove, bool bIsName, bool& bCompile, SCTAB nSheets = 1);
ScRangeData* UpdateMoveTab(SCTAB nOldPos, SCTAB nNewPos, bool bIsName );
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 77793da..a2cc262 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -4424,115 +4424,6 @@ void ScCompiler::UpdateSharedFormulaReference( UpdateRefMode eUpdateRefMode,
}
}
-
-ScRangeData* ScCompiler::UpdateInsertTab( SCTAB nTable, bool bIsName , SCTAB nNewSheets)
-{
- ScRangeData* pRangeData = NULL;
- SCTAB nPosTab = aPos.Tab(); // _after_ incremented!
- SCTAB nOldPosTab = ((nPosTab > nTable) ? (nPosTab - nNewSheets) : nPosTab);
- bool bIsRel = false;
- ScToken* t;
- pArr->Reset();
- if (bIsName)
- t = static_cast<ScToken*>(pArr->GetNextReference());
- else
- t = static_cast<ScToken*>(pArr->GetNextReferenceOrName());
- while( t )
- {
- if( t->GetOpCode() == ocName )
- {
- if (!bIsName)
- {
- ScRangeData* pName = GetRangeData( *t);
- if (pName && pName->HasType(RT_SHAREDMOD))
- pRangeData = pName;
- }
- }
- else if( t->GetType() != svIndex ) // it may be a DB area!!!
- {
- if ( !(bIsName && t->GetSingleRef().IsTabRel()) )
- { // of names only adjust absolute references
- ScSingleRefData& rRef = t->GetSingleRef();
- if ( rRef.IsTabRel() )
- {
- rRef.nTab = rRef.nRelTab + nOldPosTab;
- if ( rRef.nTab < 0 )
- rRef.nTab = sal::static_int_cast<SCsTAB>( rRef.nTab + pDoc->GetTableCount() ); // was a wrap
- }
- if (nTable <= rRef.nTab)
- rRef.nTab += nNewSheets;
- rRef.nRelTab = rRef.nTab - nPosTab;
- }
- else
- bIsRel = true;
- if ( t->GetType() == svDoubleRef )
- {
- if ( !(bIsName && t->GetDoubleRef().Ref2.IsTabRel()) )
- { // of names only adjust absolute references
- ScSingleRefData& rRef = t->GetDoubleRef().Ref2;
- if ( rRef.IsTabRel() )
- {
- rRef.nTab = rRef.nRelTab + nOldPosTab;
- if ( rRef.nTab < 0 )
- rRef.nTab = sal::static_int_cast<SCsTAB>( rRef.nTab + pDoc->GetTableCount() ); // was a wrap
- }
- if (nTable <= rRef.nTab)
- rRef.nTab += nNewSheets;
- rRef.nRelTab = rRef.nTab - nPosTab;
- }
- else
- bIsRel = true;
- }
- if ( bIsName && bIsRel )
- pRangeData = (ScRangeData*) this; // not dereferenced in rangenam
- }
- if (bIsName)
- t = static_cast<ScToken*>(pArr->GetNextReference());
- else
- t = static_cast<ScToken*>(pArr->GetNextReferenceOrName());
- }
- if ( !bIsName )
- {
- pArr->Reset();
- while ( (t = static_cast<ScToken*>(pArr->GetNextReferenceRPN())) != NULL )
- {
- if ( t->GetRef() == 1 )
- {
- ScSingleRefData& rRef1 = t->GetSingleRef();
- if ( !(rRef1.IsRelName() && rRef1.IsTabRel()) )
- { // of names only adjust absolute references
- if ( rRef1.IsTabRel() )
- {
- rRef1.nTab = rRef1.nRelTab + nOldPosTab;
- if ( rRef1.nTab < 0 )
- rRef1.nTab = sal::static_int_cast<SCsTAB>( rRef1.nTab + pDoc->GetTableCount() ); // was a wrap
- }
- if (nTable <= rRef1.nTab)
- rRef1.nTab += nNewSheets;
- rRef1.nRelTab = rRef1.nTab - nPosTab;
- }
- if ( t->GetType() == svDoubleRef )
- {
- ScSingleRefData& rRef2 = t->GetDoubleRef().Ref2;
- if ( !(rRef2.IsRelName() && rRef2.IsTabRel()) )
- { // of names only adjust absolute references
- if ( rRef2.IsTabRel() )
- {
- rRef2.nTab = rRef2.nRelTab + nOldPosTab;
- if ( rRef2.nTab < 0 )
- rRef2.nTab = sal::static_int_cast<SCsTAB>( rRef2.nTab + pDoc->GetTableCount() ); // was a wrap
- }
- if (nTable <= rRef2.nTab)
- rRef2.nTab += nNewSheets;
- rRef2.nRelTab = rRef2.nTab - nPosTab;
- }
- }
- }
- }
- }
- return pRangeData;
-}
-
ScRangeData* ScCompiler::UpdateDeleteTab(SCTAB nTable, bool /* bIsMove */, bool bIsName,
bool& rChanged, SCTAB nSheets)
{
More information about the Libreoffice-commits
mailing list