[Libreoffice-commits] .: 2 commits - sc/inc sc/source test/inc test/Library_subsequenttest.mk test/Package_inc.mk test/source
Markus Mohrhard
mmohrhard at kemper.freedesktop.org
Thu Mar 1 06:41:25 PST 2012
sc/inc/cell.hxx | 14 +---
sc/source/core/data/cell.cxx | 10 ---
sc/source/core/data/column.cxx | 10 +--
sc/source/core/data/column3.cxx | 10 +--
sc/source/core/data/documen4.cxx | 4 -
sc/source/core/data/table2.cxx | 6 +-
sc/source/core/data/table4.cxx | 4 -
sc/source/core/data/table6.cxx | 4 -
sc/source/core/tool/chgtrack.cxx | 10 +--
sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx | 6 +-
sc/source/ui/docshell/docfunc.cxx | 6 +-
sc/source/ui/undo/undocell.cxx | 8 +-
sc/source/ui/view/spelleng.cxx | 4 -
sc/source/ui/view/viewfunc.cxx | 6 +-
test/Library_subsequenttest.mk | 1
test/Package_inc.mk | 1
test/inc/test/sheet/xspreadsheetdocument.hxx | 50 ++++++++++++++++
test/source/sheet/xspreadsheetdocument.cxx | 51 +++++++++++++++++
18 files changed, 149 insertions(+), 56 deletions(-)
New commits:
commit a5c891f59e7dfd81281b8bcc1b54c03f4e395203
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Thu Feb 23 15:23:39 2012 +0100
add test case for XSpreadsheetDocument
diff --git a/test/Library_subsequenttest.mk b/test/Library_subsequenttest.mk
index cd540d6..bb0214d 100644
--- a/test/Library_subsequenttest.mk
+++ b/test/Library_subsequenttest.mk
@@ -79,6 +79,7 @@ $(eval $(call gb_Library_add_exception_objects,subsequenttest,\
test/source/sheet/xdatapilottable2 \
test/source/sheet/xnamedrange \
test/source/sheet/xnamedranges \
+ test/source/sheet/xspreadsheetdocument \
test/source/sheet/xspreadsheets2 \
test/source/util/xreplaceable \
test/source/util/xsearchable \
diff --git a/test/Package_inc.mk b/test/Package_inc.mk
index 1dcc10e..62c3fa4 100644
--- a/test/Package_inc.mk
+++ b/test/Package_inc.mk
@@ -46,6 +46,7 @@ $(eval $(call gb_Package_add_file,test_inc,inc/test/sheet/xdatapilottable.hxx,te
$(eval $(call gb_Package_add_file,test_inc,inc/test/sheet/xdatapilottable2.hxx,test/sheet/xdatapilottable2.hxx))
$(eval $(call gb_Package_add_file,test_inc,inc/test/sheet/xdatapilotfieldgrouping.hxx,test/sheet/xdatapilotfieldgrouping.hxx))
$(eval $(call gb_Package_add_file,test_inc,inc/test/sheet/datapilotfield.hxx,test/sheet/datapilotfield.hxx))
+$(eval $(call gb_Package_add_file,test_inc,inc/test/sheet/xspreadsheetdocument.hxx,test/sheet/xspreadsheetdocument.hxx))
$(eval $(call gb_Package_add_file,test_inc,inc/test/sheet/xspreadsheets2.hxx,test/sheet/xspreadsheets2.hxx))
$(eval $(call gb_Package_add_file,test_inc,inc/test/util/xreplaceable.hxx,test/util/xreplaceable.hxx))
$(eval $(call gb_Package_add_file,test_inc,inc/test/util/xsearchable.hxx,test/util/xsearchable.hxx))
diff --git a/test/inc/test/sheet/xspreadsheetdocument.hxx b/test/inc/test/sheet/xspreadsheetdocument.hxx
new file mode 100644
index 0000000..e4e258a
--- /dev/null
+++ b/test/inc/test/sheet/xspreadsheetdocument.hxx
@@ -0,0 +1,50 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License or as specified alternatively below. You may obtain a copy of
+ * the License at http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * Major Contributor(s):
+ * Copyright (C) 2012 Markus Mohrhard <markus.mohrhard at googlemail.com> (initial developer)
+ *
+ * All Rights Reserved.
+ *
+ * For minor contributions see the git repository.
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+ * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
+ */
+
+#include <com/sun/star/uno/Reference.hxx>
+#include <test/testdllapi.hxx>
+
+using namespace com::sun::star;
+
+namespace apitest {
+
+class XSpreadsheetDocument
+{
+public:
+ XSpreadsheetDocument(sal_Int32 nSheets) : mnSheets(nSheets) {}
+
+ virtual uno::Reference< uno::XInterface > init() = 0;
+
+ void testGetSheets();
+private:
+ sal_Int32 mnSheets;
+};
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/test/source/sheet/xspreadsheetdocument.cxx b/test/source/sheet/xspreadsheetdocument.cxx
new file mode 100644
index 0000000..a7720f6
--- /dev/null
+++ b/test/source/sheet/xspreadsheetdocument.cxx
@@ -0,0 +1,51 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License or as specified alternatively below. You may obtain a copy of
+ * the License at http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * Major Contributor(s):
+ * Copyright (C) 2012 Markus Mohrhard <markus.mohrhard at googlemail.com> (initial developer)
+ *
+ * All Rights Reserved.
+ *
+ * For minor contributions see the git repository.
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+ * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
+ */
+
+#include <test/sheet/xspreadsheetdocument.hxx>
+#include <com/sun/star/sheet/XSpreadsheets.hpp>
+#include <com/sun/star/sheet/XSpreadsheetDocument.hpp>
+#include <com/sun/star/container/XIndexAccess.hpp>
+#include "cppunit/extensions/HelperMacros.h"
+
+using namespace com::sun::star::uno;
+
+namespace apitest {
+
+void XSpreadsheetDocument::testGetSheets()
+{
+ uno::Reference< sheet::XSpreadsheetDocument > xSpreadsheetDoc(init(), UNO_QUERY_THROW);
+ uno::Reference< sheet::XSpreadsheets > xSheets = xSpreadsheetDoc->getSheets();
+ CPPUNIT_ASSERT(xSheets.is());
+
+ uno::Reference< container::XIndexAccess > xIA(xSheets, UNO_QUERY_THROW);
+ CPPUNIT_ASSERT( xIA->getCount() == mnSheets );
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 956c9d1775b14c116b8b8ee4bc576a126d36c63f
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Thu Mar 1 14:46:04 2012 +0100
there is no need any more for CloneWith[out]Note
diff --git a/sc/inc/cell.hxx b/sc/inc/cell.hxx
index da09357..ebae2b4 100644
--- a/sc/inc/cell.hxx
+++ b/sc/inc/cell.hxx
@@ -92,17 +92,13 @@ public:
/** Base copy constructor. Does NOT clone cell note or broadcaster! */
ScBaseCell( const ScBaseCell& rCell );
- /** Returns a clone of this cell at the same position, cell note and
+ /** Returns a clone of this cell at the same position,
broadcaster will not be cloned. */
- ScBaseCell* CloneWithoutNote( ScDocument& rDestDoc, int nCloneFlags = SC_CLONECELL_DEFAULT ) const;
+ ScBaseCell* Clone( ScDocument& rDestDoc, int nCloneFlags = SC_CLONECELL_DEFAULT ) const;
- /** Returns a clone of this cell for the passed document position, cell
- note and broadcaster will not be cloned. */
- ScBaseCell* CloneWithoutNote( ScDocument& rDestDoc, const ScAddress& rDestPos, int nCloneFlags = SC_CLONECELL_DEFAULT ) const;
-
- /** Returns a clone of this cell, clones cell note and caption object too
- (unless SC_CLONECELL_NOCAPTION flag is set). Broadcaster will not be cloned. */
- ScBaseCell* CloneWithNote( ScDocument& rDestDoc, const ScAddress& rDestPos, int nCloneFlags = SC_CLONECELL_DEFAULT ) const;
+ /** Returns a clone of this cell for the passed document position,
+ broadcaster will not be cloned. */
+ ScBaseCell* Clone( ScDocument& rDestDoc, const ScAddress& rDestPos, int nCloneFlags = SC_CLONECELL_DEFAULT ) const;
/** Due to the fact that ScBaseCell does not have a vtable, this function
deletes the cell by calling the appropriate d'tor of the derived class. */
diff --git a/sc/source/core/data/cell.cxx b/sc/source/core/data/cell.cxx
index bd616b1..5924cf8 100644
--- a/sc/source/core/data/cell.cxx
+++ b/sc/source/core/data/cell.cxx
@@ -226,7 +226,7 @@ void adjustDBRange(ScToken* pToken, ScDocument& rNewDoc, const ScDocument* pOldD
} // namespace
-ScBaseCell* ScBaseCell::CloneWithoutNote( ScDocument& rDestDoc, int nCloneFlags ) const
+ScBaseCell* ScBaseCell::Clone( ScDocument& rDestDoc, int nCloneFlags ) const
{
// notes will not be cloned -> cell address only needed for formula cells
ScAddress aDestPos;
@@ -235,17 +235,11 @@ ScBaseCell* ScBaseCell::CloneWithoutNote( ScDocument& rDestDoc, int nCloneFlags
return lclCloneCell( *this, rDestDoc, aDestPos, nCloneFlags );
}
-ScBaseCell* ScBaseCell::CloneWithoutNote( ScDocument& rDestDoc, const ScAddress& rDestPos, int nCloneFlags ) const
+ScBaseCell* ScBaseCell::Clone( ScDocument& rDestDoc, const ScAddress& rDestPos, int nCloneFlags ) const
{
return lclCloneCell( *this, rDestDoc, rDestPos, nCloneFlags );
}
-ScBaseCell* ScBaseCell::CloneWithNote( ScDocument& rDestDoc, const ScAddress& rDestPos, int nCloneFlags ) const
-{
- ScBaseCell* pNewCell = lclCloneCell( *this, rDestDoc, rDestPos, nCloneFlags );
- return pNewCell;
-}
-
void ScBaseCell::Delete()
{
switch (eCellType)
diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx
index abee27e..c0becb6 100644
--- a/sc/source/core/data/column.cxx
+++ b/sc/source/core/data/column.cxx
@@ -943,14 +943,14 @@ void ScColumn::SwapRow(SCROW nRow1, SCROW nRow2)
/* Create clone of pCell1 at position of pCell2 (pCell1 exists always, see
variable swapping above). Do not clone the note, but move pointer of
old note to new cell. */
- ScBaseCell* pNew2 = pCell1->CloneWithoutNote( *pDocument, aPos2, SC_CLONECELL_ADJUST3DREL );
+ ScBaseCell* pNew2 = pCell1->Clone( *pDocument, aPos2, SC_CLONECELL_ADJUST3DREL );
/* Create clone of pCell2 at position of pCell1. Do not clone the note,
but move pointer of old note to new cell. */
ScBaseCell* pNew1 = 0;
if ( pCell2 )
{
- pNew1 = pCell2->CloneWithoutNote( *pDocument, aPos1, SC_CLONECELL_ADJUST3DREL );
+ pNew1 = pCell2->Clone( *pDocument, aPos1, SC_CLONECELL_ADJUST3DREL );
}
// move old broadcasters new cells at the same old position
@@ -1219,7 +1219,7 @@ void ScColumn::CopyToClip(SCROW nRow1, SCROW nRow2, ScColumn& rColumn, bool bKee
{
aOwnPos.SetRow( maItems[i].nRow );
aDestPos.SetRow( maItems[i].nRow );
- ScBaseCell* pNewCell = maItems[i].pCell->CloneWithNote( *rColumn.pDocument, aDestPos, nCloneFlags );
+ ScBaseCell* pNewCell = maItems[i].pCell->Clone( *rColumn.pDocument, aDestPos, nCloneFlags );
rColumn.Append( aDestPos.Row(), pNewCell );
}
}
@@ -1347,7 +1347,7 @@ void ScColumn::CopyUpdated( const ScColumn& rPosCol, ScColumn& rDestCol ) const
SCSIZE nThisIndex;
if ( Search( aDestPos.Row(), nThisIndex ) )
{
- ScBaseCell* pNew = maItems[nThisIndex].pCell->CloneWithNote( rDestDoc, aDestPos );
+ ScBaseCell* pNew = maItems[nThisIndex].pCell->Clone( rDestDoc, aDestPos );
rDestCol.Insert( aDestPos.Row(), pNew );
}
}
@@ -1732,7 +1732,7 @@ void ScColumn::UpdateDeleteTab( SCTAB nTable, bool bIsMove, ScColumn* pRefUndo,
/* Do not copy cell note to the undo document. Undo will copy
back the formula cell while keeping the original note. */
- ScBaseCell* pSave = pRefUndo ? pOld->CloneWithoutNote( *pDocument ) : 0;
+ ScBaseCell* pSave = pRefUndo ? pOld->Clone( *pDocument ) : 0;
bool bChanged = pOld->UpdateDeleteTab(nTable, bIsMove, nSheets);
if ( nRow != maItems[i].nRow )
diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx
index 66db4ef..fbe114e 100644
--- a/sc/source/core/data/column3.cxx
+++ b/sc/source/core/data/column3.cxx
@@ -787,13 +787,13 @@ ScBaseCell* ScColumn::CloneCell(SCSIZE nIndex, sal_uInt16 nFlags, ScDocument& rD
case CELLTYPE_EDIT:
// note will be cloned below
if (bCloneString)
- pNew = rSource.CloneWithoutNote( rDestDoc, rDestPos );
+ pNew = rSource.Clone( rDestDoc, rDestPos );
break;
case CELLTYPE_VALUE:
// note will be cloned below
if (lclCanCloneValue( *pDocument, *this, maItems[nIndex].nRow, bCloneValue, bCloneDateTime ))
- pNew = rSource.CloneWithoutNote( rDestDoc, rDestPos );
+ pNew = rSource.Clone( rDestDoc, rDestPos );
break;
case CELLTYPE_FORMULA:
@@ -811,7 +811,7 @@ ScBaseCell* ScColumn::CloneCell(SCSIZE nIndex, sal_uInt16 nFlags, ScDocument& rD
if (bForceFormula || bCloneFormula)
{
// note will be cloned below
- pNew = rSource.CloneWithoutNote( rDestDoc, rDestPos );
+ pNew = rSource.Clone( rDestDoc, rDestPos );
}
else if ( (bCloneValue || bCloneDateTime || bCloneString) && !rDestDoc.IsUndo() )
{
@@ -968,7 +968,7 @@ void ScColumn::MixData( SCROW nRow1, SCROW nRow2,
{
if ( pSrc ) // war da eine Zelle?
{
- pNew = pSrc->CloneWithoutNote( *pDocument );
+ pNew = pSrc->Clone( *pDocument );
}
}
else if ( nFunction ) // wirklich Rechenfunktion angegeben
@@ -1024,7 +1024,7 @@ void ScColumn::MixData( SCROW nRow1, SCROW nRow2,
// mit Texten wird nicht gerechnet - immer "alte" Zelle, also pSrc
if (pSrc)
- pNew = pSrc->CloneWithoutNote( *pDocument );
+ pNew = pSrc->Clone( *pDocument );
else if (pDest)
bDelete = sal_True;
}
diff --git a/sc/source/core/data/documen4.cxx b/sc/source/core/data/documen4.cxx
index 7eda7fc..4a73dca 100644
--- a/sc/source/core/data/documen4.cxx
+++ b/sc/source/core/data/documen4.cxx
@@ -170,7 +170,7 @@ void ScDocument::InsertMatrixFormula(SCCOL nCol1, SCROW nRow1,
if (*itr == nTab1)
maTabs[*itr]->PutCell(nCol1, nRow1, pCell);
else
- maTabs[*itr]->PutCell(nCol1, nRow1, pCell->CloneWithoutNote(*this, ScAddress( nCol1, nRow1, *itr), SC_CLONECELL_STARTLISTENING));
+ maTabs[*itr]->PutCell(nCol1, nRow1, pCell->Clone(*this, ScAddress( nCol1, nRow1, *itr), SC_CLONECELL_STARTLISTENING));
}
}
@@ -306,7 +306,7 @@ void ScDocument::InsertTableOp(const ScTabOpParam& rParam, // Mehrfachopera
itr = rMark.begin();
for (; itr != itrEnd && *itr < nMax; ++itr)
if( maTabs[*itr] )
- maTabs[*itr]->PutCell( j, k, aRefCell.CloneWithoutNote( *this, ScAddress( j, k, *itr ), SC_CLONECELL_STARTLISTENING ) );
+ maTabs[*itr]->PutCell( j, k, aRefCell.Clone( *this, ScAddress( j, k, *itr ), SC_CLONECELL_STARTLISTENING ) );
}
}
diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index 9f24b47..c2597f1 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -775,7 +775,7 @@ void ScTable::TransposeClip( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
ScAddress aOwnPos( nCol, nRow, nTab );
if (pCell->GetCellType() == CELLTYPE_FORMULA)
{
- pNew = pCell->CloneWithNote( *pDestDoc, aDestPos, SC_CLONECELL_STARTLISTENING );
+ pNew = pCell->Clone( *pDestDoc, aDestPos, SC_CLONECELL_STARTLISTENING );
// Referenzen drehen
// bei Cut werden Referenzen spaeter per UpdateTranspose angepasst
@@ -785,7 +785,7 @@ void ScTable::TransposeClip( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
}
else
{
- pNew = pCell->CloneWithNote( *pDestDoc, aDestPos );
+ pNew = pCell->Clone( *pDestDoc, aDestPos );
}
}
pTransClip->PutCell( static_cast<SCCOL>(nRow-nRow1), static_cast<SCROW>(nCol-nCol1), pNew );
@@ -3106,7 +3106,7 @@ void ScTable::CopyData( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW n
ScBaseCell* pCell = GetCell( nCol, nRow );
if (pCell)
{
- pCell = pCell->CloneWithoutNote( *pDocument );
+ pCell = pCell->Clone( *pDocument );
if (pCell->GetCellType() == CELLTYPE_FORMULA)
{
((ScFormulaCell*)pCell)->UpdateReference( URM_COPY, aRange,
diff --git a/sc/source/core/data/table4.cxx b/sc/source/core/data/table4.cxx
index 85f3169..5cc05aa 100644
--- a/sc/source/core/data/table4.cxx
+++ b/sc/source/core/data/table4.cxx
@@ -812,7 +812,7 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
{
case CELLTYPE_STRING:
case CELLTYPE_EDIT:
- aCol[nCol].Insert( aDestPos.Row(), pSrcCell->CloneWithoutNote( *pDocument ) );
+ aCol[nCol].Insert( aDestPos.Row(), pSrcCell->Clone( *pDocument ) );
break;
default:
{
@@ -1368,7 +1368,7 @@ void ScTable::FillSeries( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
if (pDocument->RowFiltered( rInner, nTab))
continue;
ScAddress aDestPos( static_cast<SCCOL>(nCol), static_cast<SCROW>(nRow), nTab );
- aCol[nCol].Insert( aDestPos.Row(), pSrcCell->CloneWithoutNote( *pDocument ) );
+ aCol[nCol].Insert( aDestPos.Row(), pSrcCell->Clone( *pDocument ) );
}
nProgress += nIMax - nIMin + 1;
rProgress.SetStateOnPercent( nProgress );
diff --git a/sc/source/core/data/table6.cxx b/sc/source/core/data/table6.cxx
index ca47dcb..1050413 100644
--- a/sc/source/core/data/table6.cxx
+++ b/sc/source/core/data/table6.cxx
@@ -154,7 +154,7 @@ bool ScTable::SearchCell(const SvxSearchItem& rSearchItem, SCCOL nCol, SCROW nRo
else if (pUndoDoc)
{
ScAddress aAdr( nCol, nRow, nTab );
- ScBaseCell* pUndoCell = pCell->CloneWithoutNote( *pUndoDoc );
+ ScBaseCell* pUndoCell = pCell->Clone( *pUndoDoc );
pUndoDoc->PutCell( aAdr, pUndoCell);
}
bool bRepeat = !rSearchItem.GetWordOnly();
@@ -1026,7 +1026,7 @@ bool ScTable::SearchRangeForAllEmptyCells(
if (pUndoDoc)
{
ScAddress aCellPos(nCol, nRow, nTab);
- pUndoDoc->PutCell(nCol, nRow, nTab, pCell->CloneWithNote(*pUndoDoc, aCellPos));
+ pUndoDoc->PutCell(nCol, nRow, nTab, pCell->Clone(*pUndoDoc, aCellPos));
}
aCol[nCol].SetString(nRow, nTab, rSearchItem.GetReplaceString(), pDocument->GetAddressConvention());
}
diff --git a/sc/source/core/tool/chgtrack.cxx b/sc/source/core/tool/chgtrack.cxx
index 0a90a22..c9cfb7b 100644
--- a/sc/source/core/tool/chgtrack.cxx
+++ b/sc/source/core/tool/chgtrack.cxx
@@ -1802,7 +1802,7 @@ void ScChangeActionContent::SetValue(
pCell->Delete();
if ( ScChangeActionContent::GetContentCellType( pOrgCell ) )
{
- pCell = pOrgCell->CloneWithoutNote( *pToDoc );
+ pCell = pOrgCell->Clone( *pToDoc );
switch ( pOrgCell->GetCellType() )
{
case CELLTYPE_VALUE :
@@ -1963,7 +1963,7 @@ void ScChangeActionContent::PutValueToDoc(
// nothing
break;
default:
- pDoc->PutCell( aPos, pCell->CloneWithoutNote( *pDoc ) );
+ pDoc->PutCell( aPos, pCell->Clone( *pDoc ) );
}
}
}
@@ -4570,7 +4570,7 @@ ScChangeTrack* ScChangeTrack::Clone( ScDocument* pDocument ) const
const ScBaseCell* pNewCell = pContent->GetNewCell();
if ( pNewCell )
{
- ScBaseCell* pClonedNewCell = pNewCell->CloneWithoutNote( *pDocument );
+ ScBaseCell* pClonedNewCell = pNewCell->Clone( *pDocument );
rtl::OUString aNewValue;
pContent->GetNewString( aNewValue );
pClonedTrack->nGeneratedMin = pGenerated->GetActionNumber() + 1;
@@ -4654,7 +4654,7 @@ ScChangeTrack* ScChangeTrack::Clone( ScDocument* pDocument ) const
const ScChangeActionContent* pContent = dynamic_cast< const ScChangeActionContent* >( pAction );
OSL_ENSURE( pContent, "ScChangeTrack::Clone: pContent is null!" );
const ScBaseCell* pOldCell = pContent->GetOldCell();
- ScBaseCell* pClonedOldCell = pOldCell ? pOldCell->CloneWithoutNote( *pDocument ) : 0;
+ ScBaseCell* pClonedOldCell = pOldCell ? pOldCell->Clone( *pDocument ) : 0;
rtl::OUString aOldValue;
pContent->GetOldString( aOldValue );
@@ -4673,7 +4673,7 @@ ScChangeTrack* ScChangeTrack::Clone( ScDocument* pDocument ) const
const ScBaseCell* pNewCell = pContent->GetNewCell();
if ( pNewCell )
{
- ScBaseCell* pClonedNewCell = pNewCell->CloneWithoutNote( *pDocument );
+ ScBaseCell* pClonedNewCell = pNewCell->Clone( *pDocument );
pClonedContent->SetNewValue( pClonedNewCell, pDocument );
}
diff --git a/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx b/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx
index 4359929..7eadefb 100644
--- a/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx
+++ b/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx
@@ -82,7 +82,7 @@ ScBaseCell* ScMyCellInfo::CreateCell(ScDocument* pDoc)
pDoc->GetFormatTable()->GetInputLineString(fValue, nFormat, sInputString);
}
- return pCell ? pCell->CloneWithoutNote( *pDoc ) : 0;
+ return pCell ? pCell->Clone( *pDoc ) : 0;
}
ScMyDeleted::ScMyDeleted()
@@ -656,7 +656,7 @@ void ScXMLChangeTrackingImportHelper::SetContentDependencies(ScMyContentAction*
const ScBaseCell* pOldCell = pActContent->GetOldCell();
if (pOldCell)
{
- ScBaseCell* pNewCell = pOldCell->CloneWithoutNote( *pDoc );
+ ScBaseCell* pNewCell = pOldCell->Clone( *pDoc );
if (pNewCell)
{
pPrevActContent->SetNewCell(pNewCell, pDoc, EMPTY_STRING);
@@ -748,7 +748,7 @@ void ScXMLChangeTrackingImportHelper::SetNewCell(ScMyContentAction* pAction)
{
ScBaseCell* pNewCell = NULL;
if (pCell->GetCellType() != CELLTYPE_FORMULA)
- pNewCell = pCell->CloneWithoutNote( *pDoc );
+ pNewCell = pCell->Clone( *pDoc );
else
{
sal_uInt8 nMatrixFlag = static_cast<ScFormulaCell*>(pCell)->GetMatrixFlag();
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index b8c995b..4291ece 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -790,7 +790,7 @@ sal_Bool ScDocFunc::SetNormalString( const ScAddress& rPos, const String& rText,
pTabs = new SCTAB[1];
pTabs[0] = rPos.Tab();
ppOldCells = new ScBaseCell*[1];
- ppOldCells[0] = pDocCell ? pDocCell->CloneWithoutNote( *pDoc ) : 0;
+ ppOldCells[0] = pDocCell ? pDocCell->Clone( *pDoc ) : 0;
pHasFormat = new sal_Bool[1];
pOldFormats = new sal_uLong[1];
@@ -854,8 +854,8 @@ sal_Bool ScDocFunc::PutCell( const ScAddress& rPos, ScBaseCell* pNewCell, sal_Bo
sal_Bool bHeight = ( bEditDeleted || bEditCell ||
pDoc->HasAttrib( ScRange(rPos), HASATTR_NEEDHEIGHT ) );
- ScBaseCell* pUndoCell = (bUndo && pDocCell) ? pDocCell->CloneWithoutNote( *pDoc, rPos ) : 0;
- ScBaseCell* pRedoCell = (bUndo && pNewCell) ? pNewCell->CloneWithoutNote( *pDoc, rPos ) : 0;
+ ScBaseCell* pUndoCell = (bUndo && pDocCell) ? pDocCell->Clone( *pDoc, rPos ) : 0;
+ ScBaseCell* pRedoCell = (bUndo && pNewCell) ? pNewCell->Clone( *pDoc, rPos ) : 0;
pDoc->PutCell( rPos, pNewCell );
diff --git a/sc/source/ui/undo/undocell.cxx b/sc/source/ui/undo/undocell.cxx
index a0198bb..39efce6 100644
--- a/sc/source/ui/undo/undocell.cxx
+++ b/sc/source/ui/undo/undocell.cxx
@@ -276,7 +276,7 @@ void ScUndoEnterData::Undo()
ScDocument* pDoc = pDocShell->GetDocument();
for (sal_uInt16 i=0; i<nCount; i++)
{
- ScBaseCell* pNewCell = ppOldCells[i] ? ppOldCells[i]->CloneWithoutNote( *pDoc, SC_CLONECELL_STARTLISTENING ) : 0;
+ ScBaseCell* pNewCell = ppOldCells[i] ? ppOldCells[i]->Clone( *pDoc, SC_CLONECELL_STARTLISTENING ) : 0;
pDoc->PutCell( nCol, nRow, pTabs[i], pNewCell );
if (pHasFormat && pOldFormats)
@@ -409,7 +409,7 @@ void ScUndoEnterValue::Undo()
BeginUndo();
ScDocument* pDoc = pDocShell->GetDocument();
- ScBaseCell* pNewCell = pOldCell ? pOldCell->CloneWithoutNote( *pDoc, SC_CLONECELL_STARTLISTENING ) : 0;
+ ScBaseCell* pNewCell = pOldCell ? pOldCell->Clone( *pDoc, SC_CLONECELL_STARTLISTENING ) : 0;
pDoc->PutCell( aPos, pNewCell );
@@ -495,7 +495,7 @@ void ScUndoPutCell::Undo()
BeginUndo();
ScDocument* pDoc = pDocShell->GetDocument();
- ScBaseCell* pNewCell = pOldCell ? pOldCell->CloneWithoutNote( *pDoc, aPos, SC_CLONECELL_STARTLISTENING ) : 0;
+ ScBaseCell* pNewCell = pOldCell ? pOldCell->Clone( *pDoc, aPos, SC_CLONECELL_STARTLISTENING ) : 0;
pDoc->PutCell( aPos.Col(), aPos.Row(), aPos.Tab(), pNewCell );
@@ -513,7 +513,7 @@ void ScUndoPutCell::Redo()
BeginRedo();
ScDocument* pDoc = pDocShell->GetDocument();
- ScBaseCell* pNewCell = pEnteredCell ? pEnteredCell->CloneWithoutNote( *pDoc, aPos, SC_CLONECELL_STARTLISTENING ) : 0;
+ ScBaseCell* pNewCell = pEnteredCell ? pEnteredCell->Clone( *pDoc, aPos, SC_CLONECELL_STARTLISTENING ) : 0;
pDoc->PutCell( aPos.Col(), aPos.Row(), aPos.Tab(), pNewCell );
diff --git a/sc/source/ui/view/spelleng.cxx b/sc/source/ui/view/spelleng.cxx
index ba9265a..b447098 100644
--- a/sc/source/ui/view/spelleng.cxx
+++ b/sc/source/ui/view/spelleng.cxx
@@ -134,7 +134,7 @@ bool ScConversionEngineBase::FindNextConversionCell()
if( mpUndoDoc && pCell )
{
- ScBaseCell* pUndoCell = pCell->CloneWithoutNote( *mpUndoDoc );
+ ScBaseCell* pUndoCell = pCell->Clone( *mpUndoDoc );
mpUndoDoc->PutCell( aPos, pUndoCell );
}
@@ -155,7 +155,7 @@ bool ScConversionEngineBase::FindNextConversionCell()
if( mpRedoDoc && pCell )
{
- ScBaseCell* pRedoCell = pCell->CloneWithoutNote( *mpRedoDoc );
+ ScBaseCell* pRedoCell = pCell->Clone( *mpRedoDoc );
mpRedoDoc->PutCell( aPos, pRedoCell );
}
diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx
index 38d7999..780e483 100644
--- a/sc/source/ui/view/viewfunc.cxx
+++ b/sc/source/ui/view/viewfunc.cxx
@@ -395,7 +395,7 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rS
pDoc->GetCell( nCol, nRow, i, pDocCell );
if ( pDocCell )
{
- ppOldCells[nUndoPos] = pDocCell->CloneWithoutNote( *pDoc );
+ ppOldCells[nUndoPos] = pDocCell->Clone( *pDoc );
if ( pDocCell->GetCellType() == CELLTYPE_EDIT )
bEditDeleted = sal_True;
@@ -707,7 +707,7 @@ void ScViewFunc::EnterValue( SCCOL nCol, SCROW nRow, SCTAB nTab, const double& r
nCol,nRow,nTab, nCol,nRow,nTab, HASATTR_NEEDHEIGHT );
// undo
- ScBaseCell* pUndoCell = (bUndo && pOldCell) ? pOldCell->CloneWithoutNote( *pDoc ) : 0;
+ ScBaseCell* pUndoCell = (bUndo && pOldCell) ? pOldCell->Clone( *pDoc ) : 0;
pDoc->SetValue( nCol, nRow, nTab, rValue );
@@ -802,7 +802,7 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const EditTextOb
pTabs[nPos] = *itr;
ScBaseCell* pDocCell;
pDoc->GetCell( nCol, nRow, *itr, pDocCell );
- ppOldCells[nPos] = pDocCell ? pDocCell->CloneWithoutNote( *pDoc ) : 0;
+ ppOldCells[nPos] = pDocCell ? pDocCell->Clone( *pDoc ) : 0;
++nPos;
}
More information about the Libreoffice-commits
mailing list