summaryrefslogtreecommitdiff
path: root/sc/inc
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2013-08-06 19:03:47 -0400
committerKohei Yoshida <kohei.yoshida@gmail.com>2013-08-12 19:46:25 -0400
commit027f8cd9442aec9c432bfcfc69f7d6e81b760eb5 (patch)
treef6e5ed97b1f9e74f33219d5310b844e768fff55b /sc/inc
parent417d1c2b13cbd70300d2921b5667dfadc7e25895 (diff)
Handle shared token array correctly when adjusting formula grouping.
Change-Id: Ib4b141f415b36565106e946ccbc47f2b9f80d89c
Diffstat (limited to 'sc/inc')
-rw-r--r--sc/inc/formulacell.hxx6
-rw-r--r--sc/inc/sharedformula.hxx6
2 files changed, 7 insertions, 5 deletions
diff --git a/sc/inc/formulacell.hxx b/sc/inc/formulacell.hxx
index f857aff36410..3d702009820b 100644
--- a/sc/inc/formulacell.hxx
+++ b/sc/inc/formulacell.hxx
@@ -314,6 +314,10 @@ public:
void MaybeInterpret();
+ /**
+ * Turn a non-grouped cell into the top of a grouped cell.
+ */
+ ScFormulaCellGroupRef CreateCellGroup( SCROW nStart, SCROW nLen, bool bInvariant );
ScFormulaCellGroupRef GetCellGroup();
void SetCellGroup( const ScFormulaCellGroupRef &xRef );
@@ -333,6 +337,8 @@ public:
bool IsSharedInvariant() const;
SCROW GetSharedTopRow() const;
SCROW GetSharedLength() const;
+ ScTokenArray* GetSharedCode();
+ const ScTokenArray* GetSharedCode() const;
};
#endif
diff --git a/sc/inc/sharedformula.hxx b/sc/inc/sharedformula.hxx
index 866c22f6486d..232c4bc59be1 100644
--- a/sc/inc/sharedformula.hxx
+++ b/sc/inc/sharedformula.hxx
@@ -46,11 +46,7 @@ public:
}
// Create a new group.
- xGroup.reset(new ScFormulaCellGroup);
- xGroup->mnStart = pPrev->aPos.Row();
- xGroup->mnLength = 2;
- xGroup->mbInvariant = (eState == ScFormulaCell::EqualInvariant);
- pPrev->SetCellGroup(xGroup);
+ xGroup = pPrev->CreateCellGroup(pPrev->aPos.Row(), 2, eState == ScFormulaCell::EqualInvariant);
pCur->SetCellGroup(xGroup);
}
}