summaryrefslogtreecommitdiff
path: root/sc/source/ui/view/viewfunc.cxx
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2009-03-02 14:19:13 +0000
committerOliver Bolte <obo@openoffice.org>2009-03-02 14:19:13 +0000
commit07b0c01857137de7e4bd02375e7c892d622d270e (patch)
treeca4599cb8c96535139e3e0ee07acb37bcb5ad636 /sc/source/ui/view/viewfunc.cxx
parent74e4b152bbe46cf55cec4da21b9365363ec2fa8d (diff)
CWS-TOOLING: integrate CWS dr66
2009-01-22 15:51:40 +0100 dr r266730 : #i98028# moved to CWS dr66 2009-01-22 15:50:28 +0100 dr r266729 : #i98028# moved to CWS dr66 2009-01-20 16:25:49 +0100 dr r266595 : #i98282# resolve palette colors while loading chart gradients (convert back to unx lineends...) 2009-01-20 16:23:19 +0100 dr r266594 : #i98282# resolve palette colors while loading chart gradients 2009-01-19 15:43:57 +0100 dr r266507 : #i97900# move fix to CWS dr66 2009-01-19 15:40:28 +0100 dr r266506 : #i97900# move fix to CWS dr66 2009-01-19 15:20:14 +0100 dr r266505 : #i98141# correctly update note position while switching LTR/RTL mode of sheet 2009-01-06 10:28:02 +0100 dr r265899 : CWS-TOOLING: rebase CWS dr66 to trunk@265758 (milestone: DEV300:m38) 2008-11-13 13:59:02 +0100 dr r263644 : #i10000# merge problems 2008-11-13 13:25:15 +0100 dr r263639 : #i10000# merge problems 2008-11-13 13:22:58 +0100 dr r263638 : #i10000# merge problems 2008-11-13 13:22:25 +0100 dr r263637 : #i10000# merge problems 2008-11-12 13:40:46 +0100 dr r263595 : #i10000# merge problem 2008-11-12 11:34:51 +0100 dr r263583 : CWS-TOOLING: rebase CWS dr66 to trunk@263288 (milestone: DEV300:m35) 2008-11-11 16:58:11 +0100 dr r263568 : CWS-TOOLING: rebase CWS dr66 to trunk@262087 (milestone: DEV300:m33) 2008-10-27 14:38:34 +0100 dr r262675 : migrate CWS dr66 to SVN
Diffstat (limited to 'sc/source/ui/view/viewfunc.cxx')
-rw-r--r--sc/source/ui/view/viewfunc.cxx43
1 files changed, 20 insertions, 23 deletions
diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx
index 72af71cf1b09..41682a0c5211 100644
--- a/sc/source/ui/view/viewfunc.cxx
+++ b/sc/source/ui/view/viewfunc.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: viewfunc.cxx,v $
- * $Revision: 1.44.22.2 $
+ * $Revision: 1.46.18.4 $
*
* This file is part of OpenOffice.org.
*
@@ -388,7 +388,7 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rS
pDoc->GetCell( nCol, nRow, i, pDocCell );
if ( pDocCell )
{
- ppOldCells[nUndoPos] = pDocCell->Clone(pDoc);
+ ppOldCells[nUndoPos] = pDocCell->CloneWithoutNote( *pDoc );
if ( pDocCell->GetCellType() == CELLTYPE_EDIT )
bEditDeleted = TRUE;
@@ -599,7 +599,7 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rS
}
else
{
- ScFormulaCell* pCell = new ScFormulaCell( pDoc, aPos, aCell );
+ ScFormulaCell* pCell = new ScFormulaCell( aCell, *pDoc, aPos );
if ( nError )
{
pCell->GetCode()->DelRPN();
@@ -683,9 +683,8 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rS
}
// Wert in einzele Zelle eintragen (nur auf nTab)
-//! umbenennen in EnterValue !!!!
-void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const double& rValue )
+void ScViewFunc::EnterValue( SCCOL nCol, SCROW nRow, SCTAB nTab, const double& rValue )
{
ScDocument* pDoc = GetViewData()->GetDocument();
ScDocShell* pDocSh = GetViewData()->GetDocShell();
@@ -698,18 +697,14 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const double& rV
ScEditableTester aTester( pDoc, nTab, nCol,nRow, nCol,nRow );
if (aTester.IsEditable())
{
- ScBaseCell* pOldCell;
- pDoc->GetCell( nCol, nRow, nTab, pOldCell );
+ ScAddress aPos( nCol, nRow, nTab );
+ ScBaseCell* pOldCell = pDoc->GetCell( aPos );
BOOL bNeedHeight = ( pOldCell && pOldCell->GetCellType() == CELLTYPE_EDIT )
|| pDoc->HasAttrib(
nCol,nRow,nTab, nCol,nRow,nTab, HASATTR_NEEDHEIGHT );
// Undo
- ScBaseCell* pUndoCell = NULL;
- if (bUndo)
- {
- pUndoCell = pOldCell ? pOldCell->Clone(pDoc) : NULL;
- }
+ ScBaseCell* pUndoCell = (bUndo && pOldCell) ? pOldCell->CloneWithoutNote( *pDoc ) : 0;
pDoc->SetValue( nCol, nRow, nTab, rValue );
@@ -717,8 +712,7 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const double& rV
if (bUndo)
{
pDocSh->GetUndoManager()->AddUndoAction(
- new ScUndoEnterValue( pDocSh, ScAddress(nCol,nRow,nTab),
- pUndoCell, rValue, bNeedHeight ) );
+ new ScUndoEnterValue( pDocSh, aPos, pUndoCell, rValue, bNeedHeight ) );
}
/*! Zeilenhoehe anpassen? Dann auch bei Undo...
@@ -726,7 +720,7 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const double& rV
AdjustRowHeight(nRow,nRow);
*/
- pDocSh->PostPaintCell( nCol, nRow, nTab );
+ pDocSh->PostPaintCell( aPos );
pDocSh->UpdateOle(GetViewData());
aModificator.SetDocumentModified();
}
@@ -811,10 +805,7 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const EditTextOb
pTabs[nPos] = i;
ScBaseCell* pDocCell;
pDoc->GetCell( nCol, nRow, i, pDocCell );
- if ( pDocCell )
- ppOldCells[nPos] = pDocCell->Clone( pDoc );
- else
- ppOldCells[nPos] = NULL;
+ ppOldCells[nPos] = pDocCell ? pDocCell->CloneWithoutNote( *pDoc ) : 0;
++nPos;
}
@@ -2054,6 +2045,8 @@ void ScViewFunc::DeleteContents( USHORT nFlags, BOOL bRecord )
nUndoDocFlags |= IDF_STRING; // -> Zellen werden geaendert
if (nFlags & IDF_NOTE)
nUndoDocFlags |= IDF_CONTENTS; // #68795# copy all cells with their notes
+ // do not copy note captions to undo document
+ nUndoDocFlags |= IDF_NOCAPTIONS;
pDoc->CopyToDocument( aCopyRange, nUndoDocFlags, bMulti, pUndoDoc, &aFuncMark );
}
@@ -2065,7 +2058,7 @@ void ScViewFunc::DeleteContents( USHORT nFlags, BOOL bRecord )
else
{
pDoc->DeleteSelection( nFlags, aFuncMark );
- aFuncMark.MarkToSimple();
+// aFuncMark.MarkToSimple();
}
if ( bRecord )
@@ -2654,10 +2647,14 @@ BOOL ScViewFunc::Unprotect( SCTAB nTab, const String& rPassword )
return bChanged;
}
-void ScViewFunc::SetNote( SCCOL nCol, SCROW nRow, SCTAB nTab, const ScPostIt& rNote )
+void ScViewFunc::SetNoteText( const ScAddress& rPos, const String& rNoteText )
{
- ScDocShell* pDocSh = GetViewData()->GetDocShell();
- pDocSh->GetDocFunc().SetNote( ScAddress(nCol,nRow,nTab), rNote, FALSE );
+ GetViewData()->GetDocShell()->GetDocFunc().SetNoteText( rPos, rNoteText, FALSE );
+}
+
+void ScViewFunc::ReplaceNote( const ScAddress& rPos, const String& rNoteText, const String* pAuthor, const String* pDate )
+{
+ GetViewData()->GetDocShell()->GetDocFunc().ReplaceNote( rPos, rNoteText, pAuthor, pDate, FALSE );
}
void ScViewFunc::SetNumberFormat( short nFormatType, ULONG nAdd )