Files
libreoffice/sw/inc/swtable.hxx

470 lines
18 KiB
C++
Raw Normal View History

2000-09-18 16:15:01 +00:00
/*************************************************************************
*
* OpenOffice.org - a multi-platform office productivity suite
2000-09-18 16:15:01 +00:00
*
* $RCSfile: swtable.hxx,v $
2000-09-18 16:15:01 +00:00
*
* $Revision: 1.19 $
2000-09-18 16:15:01 +00:00
*
* last change: $Author: rt $ $Date: 2007-07-06 09:51:24 $
2000-09-18 16:15:01 +00:00
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
2000-09-18 16:15:01 +00:00
*
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2005 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
2000-09-18 16:15:01 +00:00
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
2000-09-18 16:15:01 +00:00
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
2000-09-18 16:15:01 +00:00
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
2000-09-18 16:15:01 +00:00
*
************************************************************************/
#ifndef _SWTABLE_HXX
#define _SWTABLE_HXX
#ifndef _SVMEMPOOL_HXX //autogen
#include <tools/mempool.hxx>
#endif
#ifndef _TOOLS_REF_HXX
#include <tools/ref.hxx>
2000-09-18 16:15:01 +00:00
#endif
#ifndef _SVARRAY_HXX //autogen
#include <svtools/svarray.hxx>
#endif
#ifndef _TBLENUM_HXX
#include <tblenum.hxx>
#endif
#ifndef _SWTYPES_HXX
#include <swtypes.hxx>
#endif
#ifndef _CALBCK_HXX
#include <calbck.hxx>
#endif
#ifndef _SWRECT_HXX
#include <swrect.hxx>
#endif
#ifdef PRODUCT
#ifndef _NODE_HXX
#include <node.hxx> // fuer StartNode->GetMyIndex
#endif
#else
class SwStartNode;
#endif
class Color;
class SwFrmFmt;
class SwTableFmt;
class SwTableLineFmt;
class SwTableBoxFmt;
class SwHTMLTableLayout;
class SwTableLine;
class SwTableBox;
class SwTableNode;
class SwTabCols;
class SwDoc;
class SwSelBoxes;
class SwTblCalcPara;
class SwChartLines;
struct SwPosition;
class SwNodeIndex;
INTEGRATION: CWS swnewtable (1.14.52); FILE MERGED 2007/02/08 17:12:27 ama 1.14.52.25: #i4032#: New table model 2007/02/06 12:42:23 ama 1.14.52.24: #i4032#: New table model 2006/12/01 16:15:07 ama 1.14.52.23: #i4032#: New table model 2006/12/01 13:07:16 ama 1.14.52.22: i4032#: New table model 2006/12/01 09:03:05 ama 1.14.52.21: i4032#: New table model 2006/11/28 15:43:57 ama 1.14.52.20: #i4032#: New table model 2006/11/28 11:48:33 ama 1.14.52.19: #i4032#: New table model 2006/11/17 13:48:26 ama 1.14.52.18: #i4032#: New table model 2006/11/16 16:43:43 ama 1.14.52.17: #i4032#: New table model 2006/11/14 14:12:41 ama 1.14.52.16: #i4032#: New table model 2006/11/13 15:13:29 ama 1.14.52.15: #i4032#: New table model 2006/10/25 15:28:42 ama 1.14.52.14: #i4032#: New Table Model 2006/10/25 14:23:47 ama 1.14.52.13: #i4032#: New Table Model 2006/10/24 12:20:23 ama 1.14.52.12: #i4032#: New Table Model 2006/10/23 14:44:31 ama 1.14.52.11: #i4032#: New table model 2006/10/13 11:45:15 ama 1.14.52.10: #i4032#: New Tbale Model 2006/10/12 06:54:07 ama 1.14.52.9: #i4032#: New table model, rounding errors 2006/10/10 09:30:30 ama 1.14.52.8: #i4032#: New table model 2006/10/10 08:57:04 ama 1.14.52.7: #i4032#: New table model 2006/10/09 15:25:06 ama 1.14.52.6: #i4032#: New table model 2006/10/02 14:39:51 ama 1.14.52.5: #i4032#: New table model 2006/09/28 13:35:31 ama 1.14.52.4: #i4032#: New table model 2006/09/27 14:36:49 ama 1.14.52.3: #i4032#: New table concept 2006/09/27 13:52:03 ama 1.14.52.2: #i4032#: New table concept 2006/09/27 13:31:17 ama 1.14.52.1: #i4032#: New table concept
2007-02-28 14:37:11 +00:00
class SwNode;
2000-09-18 16:15:01 +00:00
class SfxPoolItem;
class SwUndoTblMerge;
class SwUndo;
INTEGRATION: CWS swnewtable (1.14.52); FILE MERGED 2007/02/08 17:12:27 ama 1.14.52.25: #i4032#: New table model 2007/02/06 12:42:23 ama 1.14.52.24: #i4032#: New table model 2006/12/01 16:15:07 ama 1.14.52.23: #i4032#: New table model 2006/12/01 13:07:16 ama 1.14.52.22: i4032#: New table model 2006/12/01 09:03:05 ama 1.14.52.21: i4032#: New table model 2006/11/28 15:43:57 ama 1.14.52.20: #i4032#: New table model 2006/11/28 11:48:33 ama 1.14.52.19: #i4032#: New table model 2006/11/17 13:48:26 ama 1.14.52.18: #i4032#: New table model 2006/11/16 16:43:43 ama 1.14.52.17: #i4032#: New table model 2006/11/14 14:12:41 ama 1.14.52.16: #i4032#: New table model 2006/11/13 15:13:29 ama 1.14.52.15: #i4032#: New table model 2006/10/25 15:28:42 ama 1.14.52.14: #i4032#: New Table Model 2006/10/25 14:23:47 ama 1.14.52.13: #i4032#: New Table Model 2006/10/24 12:20:23 ama 1.14.52.12: #i4032#: New Table Model 2006/10/23 14:44:31 ama 1.14.52.11: #i4032#: New table model 2006/10/13 11:45:15 ama 1.14.52.10: #i4032#: New Tbale Model 2006/10/12 06:54:07 ama 1.14.52.9: #i4032#: New table model, rounding errors 2006/10/10 09:30:30 ama 1.14.52.8: #i4032#: New table model 2006/10/10 08:57:04 ama 1.14.52.7: #i4032#: New table model 2006/10/09 15:25:06 ama 1.14.52.6: #i4032#: New table model 2006/10/02 14:39:51 ama 1.14.52.5: #i4032#: New table model 2006/09/28 13:35:31 ama 1.14.52.4: #i4032#: New table model 2006/09/27 14:36:49 ama 1.14.52.3: #i4032#: New table concept 2006/09/27 13:52:03 ama 1.14.52.2: #i4032#: New table concept 2006/09/27 13:31:17 ama 1.14.52.1: #i4032#: New table concept
2007-02-28 14:37:11 +00:00
class SwPaM;
2000-09-18 16:15:01 +00:00
class SwTableBox_Impl;
class SwUndoTblCpyTbl;
INTEGRATION: CWS swnewtable (1.14.52); FILE MERGED 2007/02/08 17:12:27 ama 1.14.52.25: #i4032#: New table model 2007/02/06 12:42:23 ama 1.14.52.24: #i4032#: New table model 2006/12/01 16:15:07 ama 1.14.52.23: #i4032#: New table model 2006/12/01 13:07:16 ama 1.14.52.22: i4032#: New table model 2006/12/01 09:03:05 ama 1.14.52.21: i4032#: New table model 2006/11/28 15:43:57 ama 1.14.52.20: #i4032#: New table model 2006/11/28 11:48:33 ama 1.14.52.19: #i4032#: New table model 2006/11/17 13:48:26 ama 1.14.52.18: #i4032#: New table model 2006/11/16 16:43:43 ama 1.14.52.17: #i4032#: New table model 2006/11/14 14:12:41 ama 1.14.52.16: #i4032#: New table model 2006/11/13 15:13:29 ama 1.14.52.15: #i4032#: New table model 2006/10/25 15:28:42 ama 1.14.52.14: #i4032#: New Table Model 2006/10/25 14:23:47 ama 1.14.52.13: #i4032#: New Table Model 2006/10/24 12:20:23 ama 1.14.52.12: #i4032#: New Table Model 2006/10/23 14:44:31 ama 1.14.52.11: #i4032#: New table model 2006/10/13 11:45:15 ama 1.14.52.10: #i4032#: New Tbale Model 2006/10/12 06:54:07 ama 1.14.52.9: #i4032#: New table model, rounding errors 2006/10/10 09:30:30 ama 1.14.52.8: #i4032#: New table model 2006/10/10 08:57:04 ama 1.14.52.7: #i4032#: New table model 2006/10/09 15:25:06 ama 1.14.52.6: #i4032#: New table model 2006/10/02 14:39:51 ama 1.14.52.5: #i4032#: New table model 2006/09/28 13:35:31 ama 1.14.52.4: #i4032#: New table model 2006/09/27 14:36:49 ama 1.14.52.3: #i4032#: New table concept 2006/09/27 13:52:03 ama 1.14.52.2: #i4032#: New table concept 2006/09/27 13:31:17 ama 1.14.52.1: #i4032#: New table concept
2007-02-28 14:37:11 +00:00
class SwBoxSelection;
struct Parm;
2000-09-18 16:15:01 +00:00
#ifndef SW_DECL_SWSERVEROBJECT_DEFINED
#define SW_DECL_SWSERVEROBJECT_DEFINED
SV_DECL_REF( SwServerObject )
2000-09-18 16:15:01 +00:00
#endif
SV_DECL_PTRARR_DEL(SwTableLines, SwTableLine*, 10, 20);
SV_DECL_PTRARR_DEL(SwTableBoxes, SwTableBox*, 25, 50);
// speicher die Inhaltstragenden Box-Pointer zusaetzlich in einem
// sortierten Array (fuers rechnen in der Tabelle)
typedef SwTableBox* SwTableBoxPtr;
SV_DECL_PTRARR_SORT( SwTableSortBoxes, SwTableBoxPtr, 25, 50 );
INTEGRATION: CWS swnewtable (1.14.52); FILE MERGED 2007/02/08 17:12:27 ama 1.14.52.25: #i4032#: New table model 2007/02/06 12:42:23 ama 1.14.52.24: #i4032#: New table model 2006/12/01 16:15:07 ama 1.14.52.23: #i4032#: New table model 2006/12/01 13:07:16 ama 1.14.52.22: i4032#: New table model 2006/12/01 09:03:05 ama 1.14.52.21: i4032#: New table model 2006/11/28 15:43:57 ama 1.14.52.20: #i4032#: New table model 2006/11/28 11:48:33 ama 1.14.52.19: #i4032#: New table model 2006/11/17 13:48:26 ama 1.14.52.18: #i4032#: New table model 2006/11/16 16:43:43 ama 1.14.52.17: #i4032#: New table model 2006/11/14 14:12:41 ama 1.14.52.16: #i4032#: New table model 2006/11/13 15:13:29 ama 1.14.52.15: #i4032#: New table model 2006/10/25 15:28:42 ama 1.14.52.14: #i4032#: New Table Model 2006/10/25 14:23:47 ama 1.14.52.13: #i4032#: New Table Model 2006/10/24 12:20:23 ama 1.14.52.12: #i4032#: New Table Model 2006/10/23 14:44:31 ama 1.14.52.11: #i4032#: New table model 2006/10/13 11:45:15 ama 1.14.52.10: #i4032#: New Tbale Model 2006/10/12 06:54:07 ama 1.14.52.9: #i4032#: New table model, rounding errors 2006/10/10 09:30:30 ama 1.14.52.8: #i4032#: New table model 2006/10/10 08:57:04 ama 1.14.52.7: #i4032#: New table model 2006/10/09 15:25:06 ama 1.14.52.6: #i4032#: New table model 2006/10/02 14:39:51 ama 1.14.52.5: #i4032#: New table model 2006/09/28 13:35:31 ama 1.14.52.4: #i4032#: New table model 2006/09/27 14:36:49 ama 1.14.52.3: #i4032#: New table concept 2006/09/27 13:52:03 ama 1.14.52.2: #i4032#: New table concept 2006/09/27 13:31:17 ama 1.14.52.1: #i4032#: New table concept
2007-02-28 14:37:11 +00:00
typedef SwTableLine* SwTableLinePtr;
2000-09-18 16:15:01 +00:00
class SwTable: public SwClient //Client vom FrmFmt
{
protected:
SwTableLines aLines;
SwTableSortBoxes aSortCntBoxes;
SwServerObjectRef refObj; // falls DataServer -> Pointer gesetzt
SwHTMLTableLayout *pHTMLLayout;
// Usually, the table node of a SwTable can be accessed by getting a box
// out of aSortCntBoxes, which know their SwStartNode. But in some rare
// cases, we need to know the table node of a SwTable, before the table
// boxes have been build (SwTableNode::MakeCopy with tables in tables).
SwTableNode* pTableNode;
2000-09-18 16:15:01 +00:00
//SOLL das fuer jede Tabelle einstellbar sein?
TblChgMode eTblChgMode;
2000-09-18 16:15:01 +00:00
USHORT nGrfsThatResize; // Anzahl der Grfs, die beim HTML-Import
2000-09-18 16:15:01 +00:00
// noch ein Resize der Tbl. anstossen
USHORT nRowsToRepeat; // number of rows to repeat on every page
2000-09-18 16:15:01 +00:00
BOOL bModifyLocked :1;
INTEGRATION: CWS swnewtable (1.14.52); FILE MERGED 2007/02/08 17:12:27 ama 1.14.52.25: #i4032#: New table model 2007/02/06 12:42:23 ama 1.14.52.24: #i4032#: New table model 2006/12/01 16:15:07 ama 1.14.52.23: #i4032#: New table model 2006/12/01 13:07:16 ama 1.14.52.22: i4032#: New table model 2006/12/01 09:03:05 ama 1.14.52.21: i4032#: New table model 2006/11/28 15:43:57 ama 1.14.52.20: #i4032#: New table model 2006/11/28 11:48:33 ama 1.14.52.19: #i4032#: New table model 2006/11/17 13:48:26 ama 1.14.52.18: #i4032#: New table model 2006/11/16 16:43:43 ama 1.14.52.17: #i4032#: New table model 2006/11/14 14:12:41 ama 1.14.52.16: #i4032#: New table model 2006/11/13 15:13:29 ama 1.14.52.15: #i4032#: New table model 2006/10/25 15:28:42 ama 1.14.52.14: #i4032#: New Table Model 2006/10/25 14:23:47 ama 1.14.52.13: #i4032#: New Table Model 2006/10/24 12:20:23 ama 1.14.52.12: #i4032#: New Table Model 2006/10/23 14:44:31 ama 1.14.52.11: #i4032#: New table model 2006/10/13 11:45:15 ama 1.14.52.10: #i4032#: New Tbale Model 2006/10/12 06:54:07 ama 1.14.52.9: #i4032#: New table model, rounding errors 2006/10/10 09:30:30 ama 1.14.52.8: #i4032#: New table model 2006/10/10 08:57:04 ama 1.14.52.7: #i4032#: New table model 2006/10/09 15:25:06 ama 1.14.52.6: #i4032#: New table model 2006/10/02 14:39:51 ama 1.14.52.5: #i4032#: New table model 2006/09/28 13:35:31 ama 1.14.52.4: #i4032#: New table model 2006/09/27 14:36:49 ama 1.14.52.3: #i4032#: New table concept 2006/09/27 13:52:03 ama 1.14.52.2: #i4032#: New table concept 2006/09/27 13:31:17 ama 1.14.52.1: #i4032#: New table concept
2007-02-28 14:37:11 +00:00
BOOL bNewModel :1; // FALSE: old SubTableModel; TRUE: new RowSpanModel
#ifndef PRODUCT
bool bDontChangeModel; // This is set by functions (like Merge()) to forbid a laet model change
#endif
2000-09-18 16:15:01 +00:00
BOOL IsModifyLocked(){ return bModifyLocked;}
public:
INTEGRATION: CWS swnewtable (1.14.52); FILE MERGED 2007/02/08 17:12:27 ama 1.14.52.25: #i4032#: New table model 2007/02/06 12:42:23 ama 1.14.52.24: #i4032#: New table model 2006/12/01 16:15:07 ama 1.14.52.23: #i4032#: New table model 2006/12/01 13:07:16 ama 1.14.52.22: i4032#: New table model 2006/12/01 09:03:05 ama 1.14.52.21: i4032#: New table model 2006/11/28 15:43:57 ama 1.14.52.20: #i4032#: New table model 2006/11/28 11:48:33 ama 1.14.52.19: #i4032#: New table model 2006/11/17 13:48:26 ama 1.14.52.18: #i4032#: New table model 2006/11/16 16:43:43 ama 1.14.52.17: #i4032#: New table model 2006/11/14 14:12:41 ama 1.14.52.16: #i4032#: New table model 2006/11/13 15:13:29 ama 1.14.52.15: #i4032#: New table model 2006/10/25 15:28:42 ama 1.14.52.14: #i4032#: New Table Model 2006/10/25 14:23:47 ama 1.14.52.13: #i4032#: New Table Model 2006/10/24 12:20:23 ama 1.14.52.12: #i4032#: New Table Model 2006/10/23 14:44:31 ama 1.14.52.11: #i4032#: New table model 2006/10/13 11:45:15 ama 1.14.52.10: #i4032#: New Tbale Model 2006/10/12 06:54:07 ama 1.14.52.9: #i4032#: New table model, rounding errors 2006/10/10 09:30:30 ama 1.14.52.8: #i4032#: New table model 2006/10/10 08:57:04 ama 1.14.52.7: #i4032#: New table model 2006/10/09 15:25:06 ama 1.14.52.6: #i4032#: New table model 2006/10/02 14:39:51 ama 1.14.52.5: #i4032#: New table model 2006/09/28 13:35:31 ama 1.14.52.4: #i4032#: New table model 2006/09/27 14:36:49 ama 1.14.52.3: #i4032#: New table concept 2006/09/27 13:52:03 ama 1.14.52.2: #i4032#: New table concept 2006/09/27 13:31:17 ama 1.14.52.1: #i4032#: New table concept
2007-02-28 14:37:11 +00:00
enum SearchType
{
SEARCH_NONE, // Default: expand to rectangle
SEARCH_ROW, // row selection
SEARCH_COL // column selection
};
2000-09-18 16:15:01 +00:00
TYPEINFO();
// single argument ctors shall be explicit.
explicit SwTable( SwTableFmt* );
virtual ~SwTable();
// @@@ public copy ctor, but no copy assignment?
2000-09-18 16:15:01 +00:00
SwTable( const SwTable& rTable ); // kein Copy der Lines !!
private:
// @@@ public copy ctor, but no copy assignment?
SwTable & operator= (const SwTable &);
// no default ctor.
SwTable();
INTEGRATION: CWS swnewtable (1.14.52); FILE MERGED 2007/02/08 17:12:27 ama 1.14.52.25: #i4032#: New table model 2007/02/06 12:42:23 ama 1.14.52.24: #i4032#: New table model 2006/12/01 16:15:07 ama 1.14.52.23: #i4032#: New table model 2006/12/01 13:07:16 ama 1.14.52.22: i4032#: New table model 2006/12/01 09:03:05 ama 1.14.52.21: i4032#: New table model 2006/11/28 15:43:57 ama 1.14.52.20: #i4032#: New table model 2006/11/28 11:48:33 ama 1.14.52.19: #i4032#: New table model 2006/11/17 13:48:26 ama 1.14.52.18: #i4032#: New table model 2006/11/16 16:43:43 ama 1.14.52.17: #i4032#: New table model 2006/11/14 14:12:41 ama 1.14.52.16: #i4032#: New table model 2006/11/13 15:13:29 ama 1.14.52.15: #i4032#: New table model 2006/10/25 15:28:42 ama 1.14.52.14: #i4032#: New Table Model 2006/10/25 14:23:47 ama 1.14.52.13: #i4032#: New Table Model 2006/10/24 12:20:23 ama 1.14.52.12: #i4032#: New Table Model 2006/10/23 14:44:31 ama 1.14.52.11: #i4032#: New table model 2006/10/13 11:45:15 ama 1.14.52.10: #i4032#: New Tbale Model 2006/10/12 06:54:07 ama 1.14.52.9: #i4032#: New table model, rounding errors 2006/10/10 09:30:30 ama 1.14.52.8: #i4032#: New table model 2006/10/10 08:57:04 ama 1.14.52.7: #i4032#: New table model 2006/10/09 15:25:06 ama 1.14.52.6: #i4032#: New table model 2006/10/02 14:39:51 ama 1.14.52.5: #i4032#: New table model 2006/09/28 13:35:31 ama 1.14.52.4: #i4032#: New table model 2006/09/27 14:36:49 ama 1.14.52.3: #i4032#: New table concept 2006/09/27 13:52:03 ama 1.14.52.2: #i4032#: New table concept 2006/09/27 13:31:17 ama 1.14.52.1: #i4032#: New table concept
2007-02-28 14:37:11 +00:00
BOOL OldMerge( SwDoc*, const SwSelBoxes&, SwTableBox*, SwUndoTblMerge* );
BOOL OldSplitRow( SwDoc*, const SwSelBoxes&, USHORT, BOOL );
BOOL NewMerge( SwDoc*, const SwSelBoxes&, const SwSelBoxes& rMerged,
SwTableBox*, SwUndoTblMerge* );
BOOL NewSplitRow( SwDoc*, const SwSelBoxes&, USHORT, BOOL );
SwBoxSelection* CollectBoxSelection( const SwPaM& rPam ) const;
void InsertSpannedRow( SwDoc* pDoc, USHORT nIdx, USHORT nCnt );
BOOL _InsertRow( SwDoc*, const SwSelBoxes&, USHORT nCnt, BOOL bBehind );
BOOL NewInsertCol( SwDoc*, const SwSelBoxes& rBoxes, USHORT nCnt, BOOL );
void _FindSuperfluousRows( SwSelBoxes& rBoxes, SwTableLine*, SwTableLine* );
void AdjustWidths( const long nOld, const long nNew );
void NewSetTabCols( Parm &rP, const SwTabCols &rNew, const SwTabCols &rOld,
const SwTableBox *pStart, BOOL bCurRowOnly );
public:
2000-09-18 16:15:01 +00:00
SwHTMLTableLayout *GetHTMLTableLayout() { return pHTMLLayout; }
const SwHTMLTableLayout *GetHTMLTableLayout() const { return pHTMLLayout; }
void SetHTMLTableLayout( SwHTMLTableLayout *p ); //Eigentumsuebergang!
USHORT IncGrfsThatResize() { return ++nGrfsThatResize; }
USHORT DecGrfsThatResize() { return nGrfsThatResize ? --nGrfsThatResize : 0; }
void LockModify() { bModifyLocked = TRUE; } //Muessen _immer_ paarig
void UnlockModify() { bModifyLocked = FALSE;} //benutzt werden!
INTEGRATION: CWS swnewtable (1.14.52); FILE MERGED 2007/02/08 17:12:27 ama 1.14.52.25: #i4032#: New table model 2007/02/06 12:42:23 ama 1.14.52.24: #i4032#: New table model 2006/12/01 16:15:07 ama 1.14.52.23: #i4032#: New table model 2006/12/01 13:07:16 ama 1.14.52.22: i4032#: New table model 2006/12/01 09:03:05 ama 1.14.52.21: i4032#: New table model 2006/11/28 15:43:57 ama 1.14.52.20: #i4032#: New table model 2006/11/28 11:48:33 ama 1.14.52.19: #i4032#: New table model 2006/11/17 13:48:26 ama 1.14.52.18: #i4032#: New table model 2006/11/16 16:43:43 ama 1.14.52.17: #i4032#: New table model 2006/11/14 14:12:41 ama 1.14.52.16: #i4032#: New table model 2006/11/13 15:13:29 ama 1.14.52.15: #i4032#: New table model 2006/10/25 15:28:42 ama 1.14.52.14: #i4032#: New Table Model 2006/10/25 14:23:47 ama 1.14.52.13: #i4032#: New Table Model 2006/10/24 12:20:23 ama 1.14.52.12: #i4032#: New Table Model 2006/10/23 14:44:31 ama 1.14.52.11: #i4032#: New table model 2006/10/13 11:45:15 ama 1.14.52.10: #i4032#: New Tbale Model 2006/10/12 06:54:07 ama 1.14.52.9: #i4032#: New table model, rounding errors 2006/10/10 09:30:30 ama 1.14.52.8: #i4032#: New table model 2006/10/10 08:57:04 ama 1.14.52.7: #i4032#: New table model 2006/10/09 15:25:06 ama 1.14.52.6: #i4032#: New table model 2006/10/02 14:39:51 ama 1.14.52.5: #i4032#: New table model 2006/09/28 13:35:31 ama 1.14.52.4: #i4032#: New table model 2006/09/27 14:36:49 ama 1.14.52.3: #i4032#: New table concept 2006/09/27 13:52:03 ama 1.14.52.2: #i4032#: New table concept 2006/09/27 13:31:17 ama 1.14.52.1: #i4032#: New table concept
2007-02-28 14:37:11 +00:00
void SetTableModel( BOOL bNew ){ bNewModel = bNew; }
BOOL IsNewModel() const { return bNewModel; }
USHORT GetRowsToRepeat() const { return Min( GetTabLines().Count(), nRowsToRepeat ); }
USHORT _GetRowsToRepeat() const { return nRowsToRepeat; }
void SetRowsToRepeat( USHORT nNumOfRows ) { nRowsToRepeat = nNumOfRows; }
bool IsHeadline( const SwTableLine& rLine ) const;
2000-09-18 16:15:01 +00:00
SwTableLines &GetTabLines() { return aLines; }
const SwTableLines &GetTabLines() const { return aLines; }
SwFrmFmt* GetFrmFmt() { return (SwFrmFmt*)pRegisteredIn; }
SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)pRegisteredIn; }
virtual void Modify( SfxPoolItem* pOld, SfxPoolItem* pNew );
void GetTabCols( SwTabCols &rToFill, const SwTableBox *pStart,
FASTBOOL bHidden = FALSE, BOOL bCurRowOnly = FALSE ) const;
void SetTabCols( const SwTabCols &rNew, const SwTabCols &rOld,
2000-09-18 16:15:01 +00:00
const SwTableBox *pStart, BOOL bCurRowOnly );
INTEGRATION: CWS swnewtable (1.14.52); FILE MERGED 2007/02/08 17:12:27 ama 1.14.52.25: #i4032#: New table model 2007/02/06 12:42:23 ama 1.14.52.24: #i4032#: New table model 2006/12/01 16:15:07 ama 1.14.52.23: #i4032#: New table model 2006/12/01 13:07:16 ama 1.14.52.22: i4032#: New table model 2006/12/01 09:03:05 ama 1.14.52.21: i4032#: New table model 2006/11/28 15:43:57 ama 1.14.52.20: #i4032#: New table model 2006/11/28 11:48:33 ama 1.14.52.19: #i4032#: New table model 2006/11/17 13:48:26 ama 1.14.52.18: #i4032#: New table model 2006/11/16 16:43:43 ama 1.14.52.17: #i4032#: New table model 2006/11/14 14:12:41 ama 1.14.52.16: #i4032#: New table model 2006/11/13 15:13:29 ama 1.14.52.15: #i4032#: New table model 2006/10/25 15:28:42 ama 1.14.52.14: #i4032#: New Table Model 2006/10/25 14:23:47 ama 1.14.52.13: #i4032#: New Table Model 2006/10/24 12:20:23 ama 1.14.52.12: #i4032#: New Table Model 2006/10/23 14:44:31 ama 1.14.52.11: #i4032#: New table model 2006/10/13 11:45:15 ama 1.14.52.10: #i4032#: New Tbale Model 2006/10/12 06:54:07 ama 1.14.52.9: #i4032#: New table model, rounding errors 2006/10/10 09:30:30 ama 1.14.52.8: #i4032#: New table model 2006/10/10 08:57:04 ama 1.14.52.7: #i4032#: New table model 2006/10/09 15:25:06 ama 1.14.52.6: #i4032#: New table model 2006/10/02 14:39:51 ama 1.14.52.5: #i4032#: New table model 2006/09/28 13:35:31 ama 1.14.52.4: #i4032#: New table model 2006/09/27 14:36:49 ama 1.14.52.3: #i4032#: New table concept 2006/09/27 13:52:03 ama 1.14.52.2: #i4032#: New table concept 2006/09/27 13:31:17 ama 1.14.52.1: #i4032#: New table concept
2007-02-28 14:37:11 +00:00
// The following functions are for new table model only...
void CreateSelection( const SwPaM& rPam, SwSelBoxes& rBoxes,
const SearchType eSearchType, bool bProtect ) const;
void CreateSelection( const SwNode* pStart, const SwNode* pEnd,
SwSelBoxes& rBoxes, const SearchType eSearchType, bool bProtect ) const;
void ExpandSelection( SwSelBoxes& rBoxes ) const;
// The following functions are "pseudo-virtual", i.e. they are different for old and new table model
// It's not allowed to change the table model after the first call of one of these functions.
BOOL Merge( SwDoc* pDoc, const SwSelBoxes& rBoxes, const SwSelBoxes& rMerged,
SwTableBox* pMergeBox, SwUndoTblMerge* pUndo = 0 )
{
#ifndef PRODUCT
bDontChangeModel = true;
#endif
return bNewModel ? NewMerge( pDoc, rBoxes, rMerged, pMergeBox, pUndo ) :
OldMerge( pDoc, rBoxes, pMergeBox, pUndo );
}
BOOL SplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, USHORT nCnt=1,
BOOL bSameHeight = FALSE )
{
#ifndef PRODUCT
bDontChangeModel = true;
#endif
return bNewModel ? NewSplitRow( pDoc, rBoxes, nCnt, bSameHeight ) :
OldSplitRow( pDoc, rBoxes, nCnt, bSameHeight );
}
bool PrepareMerge( const SwPaM& rPam, SwSelBoxes& rBoxes,
SwSelBoxes& rMerged, SwTableBox** ppMergeBox, SwUndoTblMerge* pUndo );
void ExpandColumnSelection( SwSelBoxes& rBoxes, long &rMin, long &rMax ) const;
void PrepareDeleteCol( long nMin, long nMax );
2000-09-18 16:15:01 +00:00
BOOL InsertCol( SwDoc*, const SwSelBoxes& rBoxes,
USHORT nCnt = 1, BOOL bBehind = TRUE );
BOOL InsertRow( SwDoc*, const SwSelBoxes& rBoxes,
USHORT nCnt = 1, BOOL bBehind = TRUE );
BOOL AppendRow( SwDoc* pDoc, USHORT nCnt = 1 );
INTEGRATION: CWS swnewtable (1.14.52); FILE MERGED 2007/02/08 17:12:27 ama 1.14.52.25: #i4032#: New table model 2007/02/06 12:42:23 ama 1.14.52.24: #i4032#: New table model 2006/12/01 16:15:07 ama 1.14.52.23: #i4032#: New table model 2006/12/01 13:07:16 ama 1.14.52.22: i4032#: New table model 2006/12/01 09:03:05 ama 1.14.52.21: i4032#: New table model 2006/11/28 15:43:57 ama 1.14.52.20: #i4032#: New table model 2006/11/28 11:48:33 ama 1.14.52.19: #i4032#: New table model 2006/11/17 13:48:26 ama 1.14.52.18: #i4032#: New table model 2006/11/16 16:43:43 ama 1.14.52.17: #i4032#: New table model 2006/11/14 14:12:41 ama 1.14.52.16: #i4032#: New table model 2006/11/13 15:13:29 ama 1.14.52.15: #i4032#: New table model 2006/10/25 15:28:42 ama 1.14.52.14: #i4032#: New Table Model 2006/10/25 14:23:47 ama 1.14.52.13: #i4032#: New Table Model 2006/10/24 12:20:23 ama 1.14.52.12: #i4032#: New Table Model 2006/10/23 14:44:31 ama 1.14.52.11: #i4032#: New table model 2006/10/13 11:45:15 ama 1.14.52.10: #i4032#: New Tbale Model 2006/10/12 06:54:07 ama 1.14.52.9: #i4032#: New table model, rounding errors 2006/10/10 09:30:30 ama 1.14.52.8: #i4032#: New table model 2006/10/10 08:57:04 ama 1.14.52.7: #i4032#: New table model 2006/10/09 15:25:06 ama 1.14.52.6: #i4032#: New table model 2006/10/02 14:39:51 ama 1.14.52.5: #i4032#: New table model 2006/09/28 13:35:31 ama 1.14.52.4: #i4032#: New table model 2006/09/27 14:36:49 ama 1.14.52.3: #i4032#: New table concept 2006/09/27 13:52:03 ama 1.14.52.2: #i4032#: New table concept 2006/09/27 13:31:17 ama 1.14.52.1: #i4032#: New table concept
2007-02-28 14:37:11 +00:00
void PrepareDelBoxes( const SwSelBoxes& rBoxes );
BOOL DeleteSel( SwDoc*, const SwSelBoxes& rBoxes, const SwSelBoxes* pMerged,
SwUndo* pUndo, const BOOL bDelMakeFrms, const BOOL bCorrBorder );
2000-09-18 16:15:01 +00:00
BOOL SplitCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, USHORT nCnt=1 );
INTEGRATION: CWS swnewtable (1.14.52); FILE MERGED 2007/02/08 17:12:27 ama 1.14.52.25: #i4032#: New table model 2007/02/06 12:42:23 ama 1.14.52.24: #i4032#: New table model 2006/12/01 16:15:07 ama 1.14.52.23: #i4032#: New table model 2006/12/01 13:07:16 ama 1.14.52.22: i4032#: New table model 2006/12/01 09:03:05 ama 1.14.52.21: i4032#: New table model 2006/11/28 15:43:57 ama 1.14.52.20: #i4032#: New table model 2006/11/28 11:48:33 ama 1.14.52.19: #i4032#: New table model 2006/11/17 13:48:26 ama 1.14.52.18: #i4032#: New table model 2006/11/16 16:43:43 ama 1.14.52.17: #i4032#: New table model 2006/11/14 14:12:41 ama 1.14.52.16: #i4032#: New table model 2006/11/13 15:13:29 ama 1.14.52.15: #i4032#: New table model 2006/10/25 15:28:42 ama 1.14.52.14: #i4032#: New Table Model 2006/10/25 14:23:47 ama 1.14.52.13: #i4032#: New Table Model 2006/10/24 12:20:23 ama 1.14.52.12: #i4032#: New Table Model 2006/10/23 14:44:31 ama 1.14.52.11: #i4032#: New table model 2006/10/13 11:45:15 ama 1.14.52.10: #i4032#: New Tbale Model 2006/10/12 06:54:07 ama 1.14.52.9: #i4032#: New table model, rounding errors 2006/10/10 09:30:30 ama 1.14.52.8: #i4032#: New table model 2006/10/10 08:57:04 ama 1.14.52.7: #i4032#: New table model 2006/10/09 15:25:06 ama 1.14.52.6: #i4032#: New table model 2006/10/02 14:39:51 ama 1.14.52.5: #i4032#: New table model 2006/09/28 13:35:31 ama 1.14.52.4: #i4032#: New table model 2006/09/27 14:36:49 ama 1.14.52.3: #i4032#: New table concept 2006/09/27 13:52:03 ama 1.14.52.2: #i4032#: New table concept 2006/09/27 13:31:17 ama 1.14.52.1: #i4032#: New table concept
2007-02-28 14:37:11 +00:00
void FindSuperfluousRows( SwSelBoxes& rBoxes )
{ _FindSuperfluousRows( rBoxes, 0, 0 ); }
void CheckRowSpan( SwTableLinePtr &rpLine, bool bUp ) const;
2000-09-18 16:15:01 +00:00
SwTableSortBoxes& GetTabSortBoxes() { return aSortCntBoxes; }
const SwTableSortBoxes& GetTabSortBoxes() const { return aSortCntBoxes; }
// lese die 1. Nummer und loesche sie aus dem String
// (wird von GetTblBox und SwTblFld benutzt)
static USHORT _GetBoxNum( String& rStr, BOOL bFirst = FALSE );
// suche die Inhaltstragende Box mit dem Namen
const SwTableBox* GetTblBox( const String& rName ) const;
// kopiere die selektierten Boxen in ein anderes Dokument.
BOOL MakeCopy( SwDoc*, const SwPosition&, const SwSelBoxes&,
BOOL bCpyNds = TRUE, BOOL bCpyName = FALSE ) const;
// kopiere die Tabelle in diese. (die Logik steht im TBLRWCL.CXX)
BOOL InsTable( const SwTable& rCpyTbl, const SwNodeIndex&,
SwUndoTblCpyTbl* pUndo = 0 );
BOOL InsTable( const SwTable& rCpyTbl, const SwSelBoxes&,
SwUndoTblCpyTbl* pUndo = 0 );
INTEGRATION: CWS swnewtable (1.14.52); FILE MERGED 2007/02/08 17:12:27 ama 1.14.52.25: #i4032#: New table model 2007/02/06 12:42:23 ama 1.14.52.24: #i4032#: New table model 2006/12/01 16:15:07 ama 1.14.52.23: #i4032#: New table model 2006/12/01 13:07:16 ama 1.14.52.22: i4032#: New table model 2006/12/01 09:03:05 ama 1.14.52.21: i4032#: New table model 2006/11/28 15:43:57 ama 1.14.52.20: #i4032#: New table model 2006/11/28 11:48:33 ama 1.14.52.19: #i4032#: New table model 2006/11/17 13:48:26 ama 1.14.52.18: #i4032#: New table model 2006/11/16 16:43:43 ama 1.14.52.17: #i4032#: New table model 2006/11/14 14:12:41 ama 1.14.52.16: #i4032#: New table model 2006/11/13 15:13:29 ama 1.14.52.15: #i4032#: New table model 2006/10/25 15:28:42 ama 1.14.52.14: #i4032#: New Table Model 2006/10/25 14:23:47 ama 1.14.52.13: #i4032#: New Table Model 2006/10/24 12:20:23 ama 1.14.52.12: #i4032#: New Table Model 2006/10/23 14:44:31 ama 1.14.52.11: #i4032#: New table model 2006/10/13 11:45:15 ama 1.14.52.10: #i4032#: New Tbale Model 2006/10/12 06:54:07 ama 1.14.52.9: #i4032#: New table model, rounding errors 2006/10/10 09:30:30 ama 1.14.52.8: #i4032#: New table model 2006/10/10 08:57:04 ama 1.14.52.7: #i4032#: New table model 2006/10/09 15:25:06 ama 1.14.52.6: #i4032#: New table model 2006/10/02 14:39:51 ama 1.14.52.5: #i4032#: New table model 2006/09/28 13:35:31 ama 1.14.52.4: #i4032#: New table model 2006/09/27 14:36:49 ama 1.14.52.3: #i4032#: New table concept 2006/09/27 13:52:03 ama 1.14.52.2: #i4032#: New table concept 2006/09/27 13:31:17 ama 1.14.52.1: #i4032#: New table concept
2007-02-28 14:37:11 +00:00
BOOL InsNewTable( const SwTable& rCpyTbl, const SwSelBoxes&,
SwUndoTblCpyTbl* pUndo );
2000-09-18 16:15:01 +00:00
// kopiere die Headline (mit Inhalt!) der Tabelle in eine andere
BOOL CopyHeadlineIntoTable( SwTableNode& rTblNd );
// erfrage die Box, dessen Start-Index auf nBoxStt steht
SwTableBox* GetTblBox( ULONG nSttIdx );
const SwTableBox* GetTblBox( ULONG nSttIdx ) const
{ return ((SwTable*)this)->GetTblBox( nSttIdx ); }
// returnt TRUE wenn sich in der Tabelle Verschachtelungen befinden
BOOL IsTblComplex() const;
//returnt TRUE wenn die Tabelle oder Selektion ausgeglichen ist
BOOL IsTblComplexForChart( const String& rSel,
SwChartLines* pGetCLines = 0 ) const;
// suche alle Inhaltstragenden-Boxen der Grundline in der diese Box
// steht. rBoxes auch als Return-Wert, um es gleich weiter zu benutzen
//JP 31.01.97: bToTop = TRUE -> hoch bis zur Grundline,
// FALSE-> sonst nur die Line der Box
SwSelBoxes& SelLineFromBox( const SwTableBox* pBox,
SwSelBoxes& rBoxes, BOOL bToTop = TRUE ) const;
// erfrage vom Client Informationen
virtual BOOL GetInfo( SfxPoolItem& ) const;
// suche im Format nach der angemeldeten Tabelle
static SwTable* FindTable( SwFrmFmt* pFmt );
// Struktur ein wenig aufraeumen
void GCLines();
// BorderLine ein wenig aufraeumen
void GCBorderLines();
// returns the table node via aSortCntBoxes or pTableNode
2000-09-18 16:15:01 +00:00
SwTableNode* GetTableNode() const;
void SetTableNode( SwTableNode* pNode ) { pTableNode = pNode; }
2000-09-18 16:15:01 +00:00
// Daten Server-Methoden
void SetRefObject( SwServerObject* );
2000-09-18 16:15:01 +00:00
const SwServerObject* GetObject() const { return &refObj; }
SwServerObject* GetObject() { return &refObj; }
//Daten fuer das Chart fuellen.
void UpdateCharts() const;
2000-09-18 16:15:01 +00:00
TblChgMode GetTblChgMode() const { return eTblChgMode; }
void SetTblChgMode( TblChgMode eMode ) { eTblChgMode = eMode; }
BOOL SetColWidth( SwTableBox& rAktBox, USHORT eType,
SwTwips nAbsDiff, SwTwips nRelDiff, SwUndo** ppUndo );
BOOL SetRowHeight( SwTableBox& rAktBox, USHORT eType,
SwTwips nAbsDiff, SwTwips nRelDiff, SwUndo** ppUndo );
INTEGRATION: CWS swnewtable (1.14.52); FILE MERGED 2007/02/08 17:12:27 ama 1.14.52.25: #i4032#: New table model 2007/02/06 12:42:23 ama 1.14.52.24: #i4032#: New table model 2006/12/01 16:15:07 ama 1.14.52.23: #i4032#: New table model 2006/12/01 13:07:16 ama 1.14.52.22: i4032#: New table model 2006/12/01 09:03:05 ama 1.14.52.21: i4032#: New table model 2006/11/28 15:43:57 ama 1.14.52.20: #i4032#: New table model 2006/11/28 11:48:33 ama 1.14.52.19: #i4032#: New table model 2006/11/17 13:48:26 ama 1.14.52.18: #i4032#: New table model 2006/11/16 16:43:43 ama 1.14.52.17: #i4032#: New table model 2006/11/14 14:12:41 ama 1.14.52.16: #i4032#: New table model 2006/11/13 15:13:29 ama 1.14.52.15: #i4032#: New table model 2006/10/25 15:28:42 ama 1.14.52.14: #i4032#: New Table Model 2006/10/25 14:23:47 ama 1.14.52.13: #i4032#: New Table Model 2006/10/24 12:20:23 ama 1.14.52.12: #i4032#: New Table Model 2006/10/23 14:44:31 ama 1.14.52.11: #i4032#: New table model 2006/10/13 11:45:15 ama 1.14.52.10: #i4032#: New Tbale Model 2006/10/12 06:54:07 ama 1.14.52.9: #i4032#: New table model, rounding errors 2006/10/10 09:30:30 ama 1.14.52.8: #i4032#: New table model 2006/10/10 08:57:04 ama 1.14.52.7: #i4032#: New table model 2006/10/09 15:25:06 ama 1.14.52.6: #i4032#: New table model 2006/10/02 14:39:51 ama 1.14.52.5: #i4032#: New table model 2006/09/28 13:35:31 ama 1.14.52.4: #i4032#: New table model 2006/09/27 14:36:49 ama 1.14.52.3: #i4032#: New table concept 2006/09/27 13:52:03 ama 1.14.52.2: #i4032#: New table concept 2006/09/27 13:31:17 ama 1.14.52.1: #i4032#: New table concept
2007-02-28 14:37:11 +00:00
#ifndef PRODUCT
void CheckConsistency() const;
#endif
2000-09-18 16:15:01 +00:00
};
class SwTableLine: public SwClient // Client vom FrmFmt
{
SwTableBoxes aBoxes;
SwTableBox *pUpper;
public:
TYPEINFO();
SwTableLine() : pUpper(0) {}
2000-09-18 16:15:01 +00:00
SwTableLine( SwTableLineFmt*, USHORT nBoxes, SwTableBox *pUp );
virtual ~SwTableLine();
2000-09-18 16:15:01 +00:00
SwTableBoxes &GetTabBoxes() { return aBoxes; }
const SwTableBoxes &GetTabBoxes() const { return aBoxes; }
SwTableBox *GetUpper() { return pUpper; }
const SwTableBox *GetUpper() const { return pUpper; }
void SetUpper( SwTableBox *pNew ) { pUpper = pNew; }
SwFrmFmt* GetFrmFmt() { return (SwFrmFmt*)pRegisteredIn; }
SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)pRegisteredIn; }
//Macht ein eingenes FrmFmt wenn noch mehr Lines von ihm abhaengen.
SwFrmFmt* ClaimFrmFmt();
void ChgFrmFmt( SwTableLineFmt* pNewFmt );
// suche nach der naechsten/vorherigen Box mit Inhalt
SwTableBox* FindNextBox( const SwTable&, const SwTableBox* =0,
BOOL bOvrTblLns=TRUE ) const;
SwTableBox* FindPreviousBox( const SwTable&, const SwTableBox* =0,
BOOL bOvrTblLns=TRUE ) const;
// bLayoutAvailable indicates if there's a table frame with a height
SwTwips GetTableLineHeight( bool& bLayoutAvailable ) const;
2000-09-18 16:15:01 +00:00
};
class SwTableBox: public SwClient //Client vom FrmFmt
{
friend class SwNodes; // um den Index umzusetzen !
friend void DelBoxNode(SwTableSortBoxes&); // um den StartNode* zu loeschen !
friend class SwXMLTableContext;
//nicht (mehr) implementiert.
SwTableBox( const SwTableBox & );
SwTableBox &operator=( const SwTableBox &); //gibts nicht.
2000-09-18 16:15:01 +00:00
SwTableLines aLines;
const SwStartNode * pSttNd;
SwTableLine *pUpper;
SwTableBox_Impl* pImpl;
// falls das Format schon Formeln/Values enthaelt, muss ein neues
// fuer die neue Box erzeugt werden.
SwTableBoxFmt* CheckBoxFmt( SwTableBoxFmt* );
public:
TYPEINFO();
SwTableBox() : pSttNd(0), pUpper(0), pImpl(0) {}
2000-09-18 16:15:01 +00:00
SwTableBox( SwTableBoxFmt*, USHORT nLines, SwTableLine *pUp = 0 );
SwTableBox( SwTableBoxFmt*, const SwStartNode&, SwTableLine *pUp = 0 );
SwTableBox( SwTableBoxFmt*, const SwNodeIndex&, SwTableLine *pUp = 0 );
virtual ~SwTableBox();
2000-09-18 16:15:01 +00:00
SwTableLines &GetTabLines() { return aLines; }
const SwTableLines &GetTabLines() const { return aLines; }
SwTableLine *GetUpper() { return pUpper; }
const SwTableLine *GetUpper() const { return pUpper; }
void SetUpper( SwTableLine *pNew ) { pUpper = pNew; }
SwFrmFmt* GetFrmFmt() { return (SwFrmFmt*)pRegisteredIn; }
SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)pRegisteredIn; }
//Macht ein eingenes FrmFmt wenn noch mehr Boxen von ihm abhaengen.
SwFrmFmt* ClaimFrmFmt();
void ChgFrmFmt( SwTableBoxFmt *pNewFmt );
const SwStartNode *GetSttNd() const { return pSttNd; }
ULONG GetSttIdx() const
#ifdef PRODUCT
{ return pSttNd ? pSttNd->GetIndex() : 0; }
#else
;
#endif
// suche nach der naechsten/vorherigen Box mit Inhalt
SwTableBox* FindNextBox( const SwTable&, const SwTableBox* =0,
BOOL bOvrTblLns=TRUE ) const;
SwTableBox* FindPreviousBox( const SwTable&, const SwTableBox* =0,
BOOL bOvrTblLns=TRUE ) const;
// gebe den Namen dieser Box zurueck. Dieser wird dynamisch bestimmt
// und ergibt sich aus der Position in den Lines/Boxen/Tabelle
String GetName() const;
// gebe den "Wert" der Box zurueck (fuers rechnen in der Tabelle)
double GetValue( SwTblCalcPara& rPara ) const;
BOOL IsInHeadline( const SwTable* pTbl = 0 ) const;
// enthaelt die Box Inhalt, der als Nummer formatiert werden kann?
BOOL HasNumCntnt( double& rNum, sal_uInt32& rFmtIndex,
2000-09-18 16:15:01 +00:00
BOOL& rIsEmptyTxtNd ) const;
ULONG IsValidNumTxtNd( BOOL bCheckAttr = TRUE ) const;
// teste ob der BoxInhalt mit der Nummer uebereinstimmt, wenn eine
// Tabellenformel gesetzt ist. (fuers Redo des Change vom NumFormat!)
BOOL IsNumberChanged() const;
// ist das eine FormelBox oder eine Box mit numerischen Inhalt (AutoSum)
// Was es ist, besagt der ReturnWert - die WhichId des Attributes
// Leere Boxen haben den ReturnWert USHRT_MAX !!
USHORT IsFormulaOrValueBox() const;
// Loading of a document requires an actualisation of cells with values
void ActualiseValueBox();
2000-09-18 16:15:01 +00:00
DECL_FIXEDMEMPOOL_NEWDEL(SwTableBox)
// zugriff auf interne Daten - z.Z. benutzt fuer den NumFormatter
inline const Color* GetSaveUserColor() const;
inline const Color* GetSaveNumFmtColor() const;
inline void SetSaveUserColor(const Color* p );
inline void SetSaveNumFmtColor( const Color* p );
INTEGRATION: CWS swnewtable (1.14.52); FILE MERGED 2007/02/08 17:12:27 ama 1.14.52.25: #i4032#: New table model 2007/02/06 12:42:23 ama 1.14.52.24: #i4032#: New table model 2006/12/01 16:15:07 ama 1.14.52.23: #i4032#: New table model 2006/12/01 13:07:16 ama 1.14.52.22: i4032#: New table model 2006/12/01 09:03:05 ama 1.14.52.21: i4032#: New table model 2006/11/28 15:43:57 ama 1.14.52.20: #i4032#: New table model 2006/11/28 11:48:33 ama 1.14.52.19: #i4032#: New table model 2006/11/17 13:48:26 ama 1.14.52.18: #i4032#: New table model 2006/11/16 16:43:43 ama 1.14.52.17: #i4032#: New table model 2006/11/14 14:12:41 ama 1.14.52.16: #i4032#: New table model 2006/11/13 15:13:29 ama 1.14.52.15: #i4032#: New table model 2006/10/25 15:28:42 ama 1.14.52.14: #i4032#: New Table Model 2006/10/25 14:23:47 ama 1.14.52.13: #i4032#: New Table Model 2006/10/24 12:20:23 ama 1.14.52.12: #i4032#: New Table Model 2006/10/23 14:44:31 ama 1.14.52.11: #i4032#: New table model 2006/10/13 11:45:15 ama 1.14.52.10: #i4032#: New Tbale Model 2006/10/12 06:54:07 ama 1.14.52.9: #i4032#: New table model, rounding errors 2006/10/10 09:30:30 ama 1.14.52.8: #i4032#: New table model 2006/10/10 08:57:04 ama 1.14.52.7: #i4032#: New table model 2006/10/09 15:25:06 ama 1.14.52.6: #i4032#: New table model 2006/10/02 14:39:51 ama 1.14.52.5: #i4032#: New table model 2006/09/28 13:35:31 ama 1.14.52.4: #i4032#: New table model 2006/09/27 14:36:49 ama 1.14.52.3: #i4032#: New table concept 2006/09/27 13:52:03 ama 1.14.52.2: #i4032#: New table concept 2006/09/27 13:31:17 ama 1.14.52.1: #i4032#: New table concept
2007-02-28 14:37:11 +00:00
long getRowSpan() const;
void setRowSpan( long nNewRowSpan );
bool getDummyFlag() const;
void setDummyFlag( bool bDummy );
SwTableBox& FindStartOfRowSpan( const SwTable&, USHORT nMaxStep = USHRT_MAX );
const SwTableBox& FindStartOfRowSpan( const SwTable& rTable,
USHORT nMaxStep = USHRT_MAX ) const
{ return const_cast<SwTableBox*>(this)->FindStartOfRowSpan( rTable, nMaxStep ); }
SwTableBox& FindEndOfRowSpan( const SwTable&, USHORT nMaxStep = USHRT_MAX );
const SwTableBox& FindEndOfRowSpan( const SwTable& rTable,
USHORT nMaxStep = USHRT_MAX ) const
{ return const_cast<SwTableBox*>(this)->FindEndOfRowSpan( rTable, nMaxStep ); }
2000-09-18 16:15:01 +00:00
};
#endif //_SWTABLE_HXX