[Libreoffice-commits] core.git: sc/inc sc/source
Jochen Nitschke
j.nitschke+logerrit at ok.de
Fri Jul 22 18:46:51 UTC 2016
sc/inc/global.hxx | 14 +-------
sc/inc/tokenarray.hxx | 5 ---
sc/source/core/data/formulacell.cxx | 3 -
sc/source/core/tool/token.cxx | 60 ------------------------------------
4 files changed, 3 insertions(+), 79 deletions(-)
New commits:
commit c2524387f3c26c3f0a01a2ce06a352429e27f87c
Author: Jochen Nitschke <j.nitschke+logerrit at ok.de>
Date: Fri Jul 22 15:13:29 2016 +0200
sc: remove unused ScCloneFlags: Adjust3Drel and NoCaption
ScTokenArray::ReadjustRelative3DReferences() is unused now
and is removed too
Adjust3Drel got obsolete with
commit 3f41b12c6685b82b5c2674bd9b9d5991adebeaf9
SwapRow() is no more!
NoCaption got obsolete with
commit c06dbbe7594c2a0b5a5b19f8e183d9c421e6e094
remove mpNote from ScBaseCell
Change-Id: I0e21a80ad06b2f0cb1346cf2eeeabbb7cce9d6e9
Reviewed-on: https://gerrit.libreoffice.org/27439
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Jochen Nitschke <j.nitschke+logerrit at ok.de>
diff --git a/sc/inc/global.hxx b/sc/inc/global.hxx
index 51679ea..4af5cf1 100644
--- a/sc/inc/global.hxx
+++ b/sc/inc/global.hxx
@@ -228,24 +228,16 @@ enum class ScCloneFlags{
/** If set, cloned formula cells will start to listen to the document. */
StartListening = 0x0001,
-/** If set, relative 3D references of cloned formula cells will be adjusted to
- old position (used while swapping cells for sorting a cell range). */
- Adjust3Drel = 0x0002,
-
-/** If set, the caption object of a cell note will not be cloned (used while
- copying cells to undo document, where captions are handled in drawing undo). */
- NoCaption = 0x0004,
-
/** If set, absolute refs will not transformed to external references */
- NoMakeAbsExternal = 0x0008,
+ NoMakeAbsExternal = 0x0002,
/** If set, global named expressions will be converted to sheet-local named
expressions. */
- NamesToLocal = 0x0010
+ NamesToLocal = 0x0004
};
namespace o3tl
{
- template<> struct typed_flags<ScCloneFlags> : is_typed_flags<ScCloneFlags, 0x1f> {};
+ template<> struct typed_flags<ScCloneFlags> : is_typed_flags<ScCloneFlags, 0x0007> {};
}
#ifndef DELETEZ
diff --git a/sc/inc/tokenarray.hxx b/sc/inc/tokenarray.hxx
index 892cb88..8f6bce3 100644
--- a/sc/inc/tokenarray.hxx
+++ b/sc/inc/tokenarray.hxx
@@ -116,11 +116,6 @@ public:
/// Assignment with references to FormulaToken entries (not copied!)
ScTokenArray& operator=( const ScTokenArray& );
- /// Make 3D references point to old referenced position even if relative
- void ReadjustRelative3DReferences(
- const ScAddress& rOldPos,
- const ScAddress& rNewPos );
-
/**
* Make all absolute references external references pointing to the old document
*
diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx
index 25a527f..f1b239d 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -880,9 +880,6 @@ ScFormulaCell::ScFormulaCell(const ScFormulaCell& rCell, ScDocument& rDoc, const
pCode->AdjustReferenceOnCopy( aPos);
}
- if ( nCloneFlags & ScCloneFlags::Adjust3Drel )
- pCode->ReadjustRelative3DReferences( rCell.aPos, aPos );
-
if( !bCompile )
{ // Name references with references and ColRowNames
pCode->Reset();
diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx
index 2d7b016..37838f0 100644
--- a/sc/source/core/tool/token.cxx
+++ b/sc/source/core/tool/token.cxx
@@ -2264,66 +2264,6 @@ bool ScTokenArray::GetAdjacentExtendOfOuterFuncRefs( SCCOLROW& nExtend,
return false;
}
-void ScTokenArray::ReadjustRelative3DReferences( const ScAddress& rOldPos,
- const ScAddress& rNewPos )
-{
- TokenPointers aPtrs( pCode, nLen, pRPN, nRPN, false);
- for (size_t j=0; j<2; ++j)
- {
- FormulaToken** pp = aPtrs.maPointerRange[j].mpStart;
- FormulaToken** pEnd = aPtrs.maPointerRange[j].mpStop;
- for (; pp != pEnd; ++pp)
- {
- FormulaToken* p = aPtrs.getHandledToken(j,pp);
- if (!p)
- continue;
-
- switch ( p->GetType() )
- {
- case svDoubleRef :
- {
- ScSingleRefData& rRef2 = *p->GetSingleRef2();
- // Also adjust if the reference is of the form Sheet1.A2:A3
- if ( rRef2.IsFlag3D() || p->GetSingleRef()->IsFlag3D() )
- {
- ScAddress aAbs = rRef2.toAbs(rOldPos);
- rRef2.SetAddress(aAbs, rNewPos);
- }
- }
- SAL_FALLTHROUGH;
- case svSingleRef :
- {
- ScSingleRefData& rRef1 = *p->GetSingleRef();
- if ( rRef1.IsFlag3D() )
- {
- ScAddress aAbs = rRef1.toAbs(rOldPos);
- rRef1.SetAddress(aAbs, rNewPos);
- }
- }
- break;
- case svExternalDoubleRef :
- {
- ScSingleRefData& rRef2 = *p->GetSingleRef2();
- ScAddress aAbs = rRef2.toAbs(rOldPos);
- rRef2.SetAddress(aAbs, rNewPos);
- }
- SAL_FALLTHROUGH;
- case svExternalSingleRef :
- {
- ScSingleRefData& rRef1 = *p->GetSingleRef();
- ScAddress aAbs = rRef1.toAbs(rOldPos);
- rRef1.SetAddress(aAbs, rNewPos);
- }
- break;
- default:
- {
- // added to avoid warnings
- }
- }
- }
- }
-}
-
namespace {
void GetExternalTableData(const ScDocument* pOldDoc, const ScDocument* pNewDoc, const SCTAB nTab, OUString& rTabName, sal_uInt16& rFileId)
More information about the Libreoffice-commits
mailing list