diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-03-29 20:36:12 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-03-29 20:39:00 +0200 |
commit | f826a5b56ac12e0b85c380f7d26c379e3d1f7281 (patch) | |
tree | 0c2d53ae632e9e81ea0f918fbcee9b1bae2955bf /sc | |
parent | 82f5a3b5df000966d344b26fe36e776bc947c6ef (diff) |
quick and ugly hack for ScEditableTester in ucalc
Fix this as soon as possible with a clean fix
Diffstat (limited to 'sc')
-rw-r--r-- | sc/inc/document.hxx | 5 | ||||
-rw-r--r-- | sc/source/core/data/document.cxx | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx index 6b2139bb208c..2fbd0eb27970 100644 --- a/sc/inc/document.hxx +++ b/sc/inc/document.hxx @@ -419,6 +419,10 @@ 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; @@ -1103,6 +1107,7 @@ 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/source/core/data/document.cxx b/sc/source/core/data/document.cxx index 6e21d910cb3a..ef2a8c48cf59 100644 --- a/sc/source/core/data/document.cxx +++ b/sc/source/core/data/document.cxx @@ -4766,7 +4766,8 @@ bool ScDocument::IsBlockEditable( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, bool* pOnlyNotBecauseOfMatrix /* = NULL */ ) const { // import into read-only document is possible - if ( !bImportingXML && !mbChangeReadOnlyEnabled && pShell && pShell->IsReadOnly() ) + // TODO: come up with a clean solution for the testing problem + if ( !bImportingXML && !mbChangeReadOnlyEnabled && pShell && (pShell->IsReadOnly()&&!mbIsInTest) ) { if ( pOnlyNotBecauseOfMatrix ) *pOnlyNotBecauseOfMatrix = false; |