summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2013-01-29 00:09:59 -0500
committerKohei Yoshida <kohei.yoshida@gmail.com>2013-01-29 09:27:48 -0500
commitf4b3cef45cc8c02ccc7139c644ac4b20079bbc5d (patch)
treedc9d55c8d1b4a2b7b27197b6f805363c6a86a013 /sc
parent0532733965f78f71a41983815d4e0525c07f9019 (diff)
We don't need this hack anymore for unit test.
I've addressed the root cause the right way. Change-Id: I1b3b13d28e4acc9f9ec814c0ad242166aa34a65e
Diffstat (limited to 'sc')
-rw-r--r--sc/inc/document.hxx5
-rw-r--r--sc/qa/unit/ucalc.cxx2
-rw-r--r--sc/source/core/data/documen2.cxx3
-rw-r--r--sc/source/core/data/document.cxx3
4 files changed, 2 insertions, 11 deletions
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 3874916a4793..b857cb7336f3 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -403,10 +403,6 @@ private:
::std::set<ScFormulaCell*> maSubTotalCells;
- // quick and ugly hack to fix the ScEditableTester problem in ucalc
- // write a clean fix for this as soon as possible
- bool mbIsInTest;
-
public:
SC_DLLPUBLIC sal_uLong GetCellCount() const; // all cells
SCSIZE GetCellCount(SCTAB nTab, SCCOL nCol) const;
@@ -1102,7 +1098,6 @@ public:
bool bColInfo = false, bool bRowInfo = false );
SC_DLLPUBLIC void InitUndoSelected( ScDocument* pSrcDoc, const ScMarkData& rTabSelection,
bool bColInfo = false, bool bRowInfo = false );
- void SetInTest() { mbIsInTest = true; }
// don't use anymore:
void CopyToDocument(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index 6a2ac0fbfcfe..c6778a476219 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -5150,7 +5150,6 @@ void Test::testMergedCells()
ScRange aRange(0,2,0,MAXCOL,2,0);
ScMarkData aMark;
aMark.SetMarkArea(aRange);
- m_pDoc->SetInTest();
m_xDocShRef->GetDocFunc().InsertCells(aRange, &aMark, INS_INSROWS, true, true);
m_pDoc->ExtendMerge(1, 1, nEndCol, nEndRow, 0, false);
cout << nEndRow << nEndCol;
@@ -5479,7 +5478,6 @@ void Test::testCopyPasteFormulas()
m_pDoc->SetString(0,4,0, "=$Sheet2.A$1");
// to prevent ScEditableTester in ScDocFunc::MoveBlock
- m_pDoc->SetInTest();
ASSERT_DOUBLES_EQUAL(m_pDoc->GetValue(0,0,0), 1.0);
ASSERT_DOUBLES_EQUAL(m_pDoc->GetValue(0,1,0), 1.0);
ScDocFunc& rDocFunc = m_xDocShRef->GetDocFunc();
diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx
index 79f90f48854f..f182316f0781 100644
--- a/sc/source/core/data/documen2.cxx
+++ b/sc/source/core/data/documen2.cxx
@@ -206,8 +206,7 @@ ScDocument::ScDocument( ScDocumentMode eMode,
mbChangeReadOnlyEnabled( false ),
mbStreamValidLocked( false ),
mbUserInteractionEnabled(true),
- mnNamedRangesLockCount( 0 ),
- mbIsInTest( false )
+ mnNamedRangesLockCount(0)
{
SetStorageGrammar( formula::FormulaGrammar::GRAM_STORAGE_DEFAULT);
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index d2ff1eecafee..7905d6ecface 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -4743,8 +4743,7 @@ bool ScDocument::IsBlockEditable( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow,
bool* pOnlyNotBecauseOfMatrix /* = NULL */ ) const
{
// import into read-only document is possible
- // TODO: come up with a clean solution for the testing problem
- if ( !bImportingXML && !mbChangeReadOnlyEnabled && pShell && (pShell->IsReadOnly()&&!mbIsInTest) )
+ if (!bImportingXML && !mbChangeReadOnlyEnabled && pShell && pShell->IsReadOnly())
{
if ( pOnlyNotBecauseOfMatrix )
*pOnlyNotBecauseOfMatrix = false;