diff options
author | Rüdiger Timm <rt@openoffice.org> | 2008-01-29 14:16:00 +0000 |
---|---|---|
committer | Rüdiger Timm <rt@openoffice.org> | 2008-01-29 14:16:00 +0000 |
commit | 72c3e3c5a5ffb55c9466f3d4a6f2b3746aec0dce (patch) | |
tree | 67b768517f93c5a05bdf8e34304616fc1ab1c1a2 /sc/source/core | |
parent | 42e6cd3d8eda52c2ca8966cbc34daa242de908ee (diff) |
INTEGRATION: CWS dr58_SRC680 (1.39.94); FILE MERGED
2008/01/11 12:45:24 dr 1.39.94.1: #i84412# set note visibility when copying cells, remove global depenencies from postit.hxx header
Diffstat (limited to 'sc/source/core')
-rw-r--r-- | sc/source/core/data/cell.cxx | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/sc/source/core/data/cell.cxx b/sc/source/core/data/cell.cxx index 73363f07ac9a..8a688bd5de00 100644 --- a/sc/source/core/data/cell.cxx +++ b/sc/source/core/data/cell.cxx @@ -4,9 +4,9 @@ * * $RCSfile: cell.cxx,v $ * - * $Revision: 1.39 $ + * $Revision: 1.40 $ * - * last change: $Author: rt $ $Date: 2007-07-06 12:32:38 $ + * last change: $Author: rt $ $Date: 2008-01-29 15:16:00 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -57,6 +57,7 @@ #include "progress.hxx" #include "editutil.hxx" #include "recursionhelper.hxx" +#include "postit.hxx" #ifndef _EDITOBJ_HXX #include <svx/editobj.hxx> #endif @@ -103,6 +104,27 @@ static const sal_Char __FAR_DATA msgDbgInfinity[] = // ----------------------------------------------------------------------- +ScBaseCell::ScBaseCell( CellType eNewType ) : + pNote( NULL ), + pBroadcaster( NULL ), + nTextWidth( TEXTWIDTH_DIRTY ), + eCellType( sal::static_int_cast<BYTE>(eNewType) ), + nScriptType( SC_SCRIPTTYPE_UNKNOWN ) +{ +} + +ScBaseCell::ScBaseCell( const ScBaseCell& rBaseCell, ScDocument* pDoc ) : + pBroadcaster( NULL ), + nTextWidth( rBaseCell.nTextWidth ), + eCellType( rBaseCell.eCellType ), + nScriptType( SC_SCRIPTTYPE_UNKNOWN ) +{ + if (rBaseCell.pNote) + pNote = new ScPostIt( *rBaseCell.pNote, pDoc ); + else + pNote = NULL; +} + ScBaseCell* ScBaseCell::Clone(ScDocument* pDoc) const { switch (eCellType) @@ -180,6 +202,11 @@ BOOL ScBaseCell::GetNote( ScPostIt& rNote ) const return ( pNote != NULL ); } +void ScBaseCell::DeleteNote() +{ + DELETEZ( pNote ); +} + ScBaseCell* ScBaseCell::CreateTextCell( const String& rString, ScDocument* pDoc ) { if ( rString.Search('\n') != STRING_NOTFOUND || rString.Search(CHAR_CR) != STRING_NOTFOUND ) |