2000-09-18 16:07:07 +00:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
2005-09-08 16:27:42 +00:00
|
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
2000-09-18 16:07:07 +00:00
|
|
|
*
|
2005-09-08 16:27:42 +00:00
|
|
|
* $RCSfile: column.hxx,v $
|
2000-09-18 16:07:07 +00:00
|
|
|
*
|
2008-01-29 14:15:03 +00:00
|
|
|
* $Revision: 1.19 $
|
2000-09-18 16:07:07 +00:00
|
|
|
*
|
2008-01-29 14:15:03 +00:00
|
|
|
* last change: $Author: rt $ $Date: 2008-01-29 15:15:03 $
|
2000-09-18 16:07:07 +00:00
|
|
|
*
|
2005-09-08 16:27:42 +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:07:07 +00:00
|
|
|
*
|
|
|
|
*
|
2005-09-08 16:27:42 +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:07:07 +00:00
|
|
|
*
|
2005-09-08 16:27:42 +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:07:07 +00:00
|
|
|
*
|
2005-09-08 16:27:42 +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:07:07 +00:00
|
|
|
*
|
2005-09-08 16:27:42 +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:07:07 +00:00
|
|
|
*
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
#ifndef SC_COLUMN_HXX
|
|
|
|
#define SC_COLUMN_HXX
|
|
|
|
|
|
|
|
#ifndef SC_MARKARR_HXX
|
|
|
|
#include "markarr.hxx"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef SC_SCGLOB_HXX
|
|
|
|
#include "global.hxx"
|
|
|
|
#endif
|
|
|
|
|
2004-08-20 08:07:30 +00:00
|
|
|
#ifndef SC_COMPRESSEDARRAY_HXX
|
|
|
|
#include "compressedarray.hxx"
|
|
|
|
#endif
|
2004-06-04 09:04:34 +00:00
|
|
|
#ifndef SC_ADDRESS_HXX
|
|
|
|
#include "address.hxx"
|
|
|
|
#endif
|
|
|
|
#ifndef _SOLAR_H
|
|
|
|
#include <tools/solar.h>
|
|
|
|
#endif
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
class Fraction;
|
|
|
|
class OutputDevice;
|
|
|
|
class Rectangle;
|
|
|
|
class SfxBroadcaster;
|
|
|
|
class SfxItemPoolCache;
|
|
|
|
class SfxItemSet;
|
2004-06-04 09:04:34 +00:00
|
|
|
class SvtListener;
|
2000-09-18 16:07:07 +00:00
|
|
|
class SfxPoolItem;
|
|
|
|
class SfxStyleSheetBase;
|
|
|
|
class SvxBorderLine;
|
|
|
|
class SvxBoxInfoItem;
|
|
|
|
class SvxBoxItem;
|
|
|
|
|
|
|
|
class ScAttrIterator;
|
|
|
|
class ScAttrArray;
|
|
|
|
class ScBaseCell;
|
|
|
|
class ScDocument;
|
|
|
|
class ScFormulaCell;
|
|
|
|
class ScMarkData;
|
|
|
|
class ScMultipleReadHeader;
|
|
|
|
class ScMultipleWriteHeader;
|
|
|
|
class ScPatternAttr;
|
|
|
|
class ScStyleSheet;
|
2004-06-04 09:04:34 +00:00
|
|
|
class SvtBroadcaster;
|
2000-09-18 16:07:07 +00:00
|
|
|
class TypedStrCollection;
|
2002-10-01 16:10:37 +00:00
|
|
|
class ScProgress;
|
2008-01-29 14:15:03 +00:00
|
|
|
class ScPostIt;
|
2000-09-18 16:07:07 +00:00
|
|
|
struct ScFunctionData;
|
|
|
|
struct ScLineFlags;
|
2005-03-29 12:29:07 +00:00
|
|
|
struct ScMergePatternState;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
|
|
|
|
#define COLUMN_DELTA 4
|
|
|
|
|
|
|
|
|
|
|
|
struct ScNeededSizeOptions
|
|
|
|
{
|
|
|
|
const ScPatternAttr* pPattern;
|
|
|
|
BOOL bFormula;
|
|
|
|
BOOL bSkipMerged;
|
|
|
|
BOOL bGetFont;
|
|
|
|
BOOL bTotalSize;
|
|
|
|
|
|
|
|
ScNeededSizeOptions()
|
|
|
|
{
|
|
|
|
pPattern = NULL;
|
|
|
|
bFormula = FALSE;
|
|
|
|
bSkipMerged = TRUE;
|
|
|
|
bGetFont = TRUE;
|
|
|
|
bTotalSize = FALSE;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
struct ColEntry
|
|
|
|
{
|
2004-06-04 09:04:34 +00:00
|
|
|
SCROW nRow;
|
2000-09-18 16:07:07 +00:00
|
|
|
ScBaseCell* pCell;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class ScIndexMap;
|
|
|
|
|
|
|
|
class ScColumn
|
|
|
|
{
|
|
|
|
private:
|
2004-06-04 09:04:34 +00:00
|
|
|
SCCOL nCol;
|
|
|
|
SCTAB nTab;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2004-06-04 09:04:34 +00:00
|
|
|
SCSIZE nCount;
|
|
|
|
SCSIZE nLimit;
|
2000-09-18 16:07:07 +00:00
|
|
|
ColEntry* pItems;
|
|
|
|
|
|
|
|
ScAttrArray* pAttrArray;
|
|
|
|
ScDocument* pDocument;
|
|
|
|
|
|
|
|
friend class ScDocument; // fuer FillInfo
|
|
|
|
friend class ScDocumentIterator;
|
|
|
|
friend class ScValueIterator;
|
|
|
|
friend class ScQueryValueIterator;
|
|
|
|
friend class ScColumnIterator;
|
|
|
|
friend class ScQueryCellIterator;
|
|
|
|
friend class ScMarkedDataIter;
|
|
|
|
friend class ScCellIterator;
|
|
|
|
friend class ScHorizontalCellIterator;
|
|
|
|
friend class ScHorizontalAttrIterator;
|
|
|
|
|
|
|
|
public:
|
|
|
|
static BOOL bDoubleAlloc; // fuer Import: Groesse beim Allozieren verdoppeln
|
|
|
|
|
|
|
|
public:
|
|
|
|
ScColumn();
|
|
|
|
~ScColumn();
|
|
|
|
|
2004-06-04 09:04:34 +00:00
|
|
|
void Init(SCCOL nNewCol, SCTAB nNewTab, ScDocument* pDoc);
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2004-06-04 09:04:34 +00:00
|
|
|
BOOL Search( SCROW nRow, SCSIZE& nIndex ) const;
|
|
|
|
ScBaseCell* GetCell( SCROW nRow ) const;
|
|
|
|
void Insert( SCROW nRow, ScBaseCell* pCell );
|
|
|
|
void Insert( SCROW nRow, ULONG nFormatIndex, ScBaseCell* pCell );
|
|
|
|
void Append( SCROW nRow, ScBaseCell* pCell );
|
|
|
|
void Delete( SCROW nRow );
|
|
|
|
void DeleteAtIndex( SCSIZE nIndex );
|
2000-09-18 16:07:07 +00:00
|
|
|
void FreeAll();
|
2004-06-04 09:04:34 +00:00
|
|
|
void Resize( SCSIZE nSize );
|
|
|
|
void SetNewRow( SCROW nRow1, SCROW nRow2 );
|
|
|
|
void SwapRow( SCROW nRow1, SCROW nRow2 );
|
|
|
|
void SwapCell( SCROW nRow, ScColumn& rCol);
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2004-06-04 09:04:34 +00:00
|
|
|
BOOL HasLines( SCROW nRow1, SCROW nRow2, Rectangle& rSizes,
|
2000-09-18 16:07:07 +00:00
|
|
|
BOOL bLeft, BOOL bRight ) const;
|
2004-06-04 09:04:34 +00:00
|
|
|
BOOL HasAttrib( SCROW nRow1, SCROW nRow2, USHORT nMask ) const;
|
2000-09-18 16:07:07 +00:00
|
|
|
BOOL HasAttribSelection( const ScMarkData& rMark, USHORT nMask ) const;
|
2004-06-04 09:04:34 +00:00
|
|
|
BOOL ExtendMerge( SCCOL nThisCol, SCROW nStartRow, SCROW nEndRow,
|
|
|
|
SCCOL& rPaintCol, SCROW& rPaintRow,
|
2000-09-18 16:07:07 +00:00
|
|
|
BOOL bRefresh, BOOL bAttrs );
|
|
|
|
|
|
|
|
BOOL IsEmptyVisData(BOOL bNotes) const; // ohne Broadcaster
|
|
|
|
BOOL IsEmptyData() const;
|
|
|
|
BOOL IsEmptyAttr() const;
|
|
|
|
BOOL IsEmpty() const;
|
|
|
|
|
|
|
|
// nur Daten:
|
2004-06-04 09:04:34 +00:00
|
|
|
BOOL IsEmptyBlock(SCROW nStartRow, SCROW nEndRow) const;
|
|
|
|
SCSIZE GetEmptyLinesInBlock( SCROW nStartRow, SCROW nEndRow, ScDirection eDir ) const;
|
|
|
|
BOOL HasDataAt(SCROW nRow) const;
|
|
|
|
BOOL HasVisibleDataAt(SCROW nRow) const;
|
|
|
|
SCROW GetFirstDataPos() const;
|
|
|
|
SCROW GetLastDataPos() const;
|
|
|
|
SCROW GetLastVisDataPos(BOOL bNotes) const; // ohne Broadcaster
|
|
|
|
SCROW GetFirstVisDataPos(BOOL bNotes) const;
|
|
|
|
BOOL GetPrevDataPos(SCROW& rRow) const;
|
|
|
|
BOOL GetNextDataPos(SCROW& rRow) const;
|
|
|
|
void FindDataAreaPos(SCROW& rRow, long nMovY) const; // (ohne Broadcaster)
|
|
|
|
void FindUsed( SCROW nStartRow, SCROW nEndRow, BOOL* pUsed ) const;
|
|
|
|
|
|
|
|
SCSIZE VisibleCount( SCROW nStartRow, SCROW nEndRow ) const;
|
|
|
|
|
|
|
|
USHORT GetBlockMatrixEdges( SCROW nRow1, SCROW nRow2, USHORT nMask ) const;
|
2000-09-18 16:07:07 +00:00
|
|
|
BOOL HasSelectionMatrixFragment(const ScMarkData& rMark) const;
|
|
|
|
|
|
|
|
// Daten oder Attribute:
|
2004-06-04 09:04:34 +00:00
|
|
|
SCROW GetFirstEntryPos() const;
|
|
|
|
SCROW GetLastEntryPos() const;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
// nur Attribute:
|
2004-06-04 09:04:34 +00:00
|
|
|
SCROW GetLastAttrPos() const;
|
2005-02-21 14:56:44 +00:00
|
|
|
BOOL GetFirstVisibleAttr( SCROW& rFirstRow ) const;
|
|
|
|
BOOL GetLastVisibleAttr( SCROW& rLastRow ) const;
|
2004-06-04 09:04:34 +00:00
|
|
|
BOOL HasVisibleAttrIn( SCROW nStartRow, SCROW nEndRow ) const;
|
|
|
|
BOOL IsVisibleAttrEqual( const ScColumn& rCol, SCROW nStartRow = 0,
|
|
|
|
SCROW nEndRow = MAXROW ) const;
|
|
|
|
BOOL IsAllAttrEqual( const ScColumn& rCol, SCROW nStartRow, SCROW nEndRow ) const;
|
|
|
|
|
|
|
|
BOOL TestInsertCol( SCROW nStartRow, SCROW nEndRow) const;
|
|
|
|
BOOL TestInsertRow( SCSIZE nSize ) const;
|
|
|
|
void InsertRow( SCROW nStartRow, SCSIZE nSize );
|
|
|
|
void DeleteRow( SCROW nStartRow, SCSIZE nSize );
|
|
|
|
void DeleteRange( SCSIZE nStartIndex, SCSIZE nEndIndex, USHORT nDelFlag );
|
|
|
|
void DeleteArea(SCROW nStartRow, SCROW nEndRow, USHORT nDelFlag );
|
|
|
|
void CopyToClip(SCROW nRow1, SCROW nRow2, ScColumn& rColumn, BOOL bKeepScenarioFlags);
|
|
|
|
void CopyFromClip(SCROW nRow1, SCROW nRow2, long nDy,
|
2002-10-10 15:56:51 +00:00
|
|
|
USHORT nInsFlag, BOOL bAsLink, BOOL bSkipAttrForEmpty, ScColumn& rColumn);
|
2004-06-04 09:04:34 +00:00
|
|
|
void StartListeningInArea( SCROW nRow1, SCROW nRow2 );
|
|
|
|
void BroadcastInArea( SCROW nRow1, SCROW nRow2 );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2004-06-04 09:04:34 +00:00
|
|
|
void RemoveEditAttribs( SCROW nStartRow, SCROW nEndRow );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
// Markierung von diesem Dokument
|
|
|
|
void MixMarked( const ScMarkData& rMark, USHORT nFunction,
|
|
|
|
BOOL bSkipEmpty, ScColumn& rSrcCol );
|
2004-06-04 09:04:34 +00:00
|
|
|
void MixData( SCROW nRow1, SCROW nRow2, USHORT nFunction, BOOL bSkipEmpty,
|
2000-09-18 16:07:07 +00:00
|
|
|
ScColumn& rSrcCol );
|
|
|
|
|
|
|
|
ScFormulaCell* CreateRefCell( ScDocument* pDestDoc, const ScAddress& rDestPos,
|
2004-06-04 09:04:34 +00:00
|
|
|
SCSIZE nIndex, USHORT nFlags ) const;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2004-06-04 09:04:34 +00:00
|
|
|
ScAttrIterator* CreateAttrIterator( SCROW nStartRow, SCROW nEndRow ) const;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2004-06-04 09:04:34 +00:00
|
|
|
SCCOL GetCol() const { return nCol; }
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
// UpdateSelectionFunction: Mehrfachselektion
|
|
|
|
void UpdateSelectionFunction( const ScMarkData& rMark,
|
2004-08-20 08:07:30 +00:00
|
|
|
ScFunctionData& rData,
|
|
|
|
const ScBitMaskCompressedArray< SCROW, BYTE>* pRowFlags,
|
2004-06-04 09:04:34 +00:00
|
|
|
BOOL bDoExclude, SCROW nExStartRow, SCROW nExEndRow );
|
2004-08-20 08:07:30 +00:00
|
|
|
void UpdateAreaFunction( ScFunctionData& rData,
|
|
|
|
const ScBitMaskCompressedArray< SCROW, BYTE>* pRowFlags,
|
2004-06-04 09:04:34 +00:00
|
|
|
SCROW nStartRow, SCROW nEndRow );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2004-06-04 09:04:34 +00:00
|
|
|
void CopyToColumn(SCROW nRow1, SCROW nRow2, USHORT nFlags, BOOL bMarked,
|
2000-09-18 16:07:07 +00:00
|
|
|
ScColumn& rColumn, const ScMarkData* pMarkData = NULL,
|
|
|
|
BOOL bAsLink = FALSE );
|
2004-06-04 09:04:34 +00:00
|
|
|
void UndoToColumn(SCROW nRow1, SCROW nRow2, USHORT nFlags, BOOL bMarked,
|
2000-09-18 16:07:07 +00:00
|
|
|
ScColumn& rColumn, const ScMarkData* pMarkData = NULL );
|
|
|
|
|
|
|
|
void CopyScenarioFrom( const ScColumn& rSrcCol );
|
|
|
|
void CopyScenarioTo( ScColumn& rDestCol ) const;
|
|
|
|
BOOL TestCopyScenarioTo( const ScColumn& rDestCol ) const;
|
|
|
|
void MarkScenarioIn( ScMarkData& rDestMark ) const;
|
|
|
|
|
|
|
|
void CopyUpdated( const ScColumn& rPosCol, ScColumn& rDestCol ) const;
|
|
|
|
|
|
|
|
void SwapCol(ScColumn& rCol);
|
2004-06-04 09:04:34 +00:00
|
|
|
void MoveTo(SCROW nStartRow, SCROW nEndRow, ScColumn& rCol);
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2004-06-04 09:04:34 +00:00
|
|
|
BOOL HasEditCells(SCROW nStartRow, SCROW nEndRow, SCROW& rFirst) const;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
// TRUE = Zahlformat gesetzt
|
2006-10-18 11:16:09 +00:00
|
|
|
BOOL SetString( SCROW nRow, SCTAB nTab, const String& rString,
|
|
|
|
ScAddress::Convention conv = ScAddress::CONV_OOO );
|
2004-06-04 09:04:34 +00:00
|
|
|
void SetValue( SCROW nRow, const double& rVal);
|
|
|
|
void SetNote( SCROW nRow, const ScPostIt& rNote );
|
|
|
|
void SetError( SCROW nRow, const USHORT nError);
|
|
|
|
|
|
|
|
void GetString( SCROW nRow, String& rString ) const;
|
|
|
|
void GetInputString( SCROW nRow, String& rString ) const;
|
|
|
|
double GetValue( SCROW nRow ) const;
|
|
|
|
void GetFormula( SCROW nRow, String& rFormula,
|
2000-09-18 16:07:07 +00:00
|
|
|
BOOL bAsciiExport = FALSE ) const;
|
2004-06-04 09:04:34 +00:00
|
|
|
BOOL GetNote( SCROW nRow, ScPostIt& rNote ) const;
|
|
|
|
CellType GetCellType( SCROW nRow ) const;
|
|
|
|
SCSIZE GetCellCount() const { return nCount; }
|
|
|
|
ULONG GetWeightedCount() const;
|
2000-09-18 16:07:07 +00:00
|
|
|
ULONG GetCodeCount() const; // RPN-Code in Formeln
|
2004-06-04 09:04:34 +00:00
|
|
|
USHORT GetErrCode( SCROW nRow ) const;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2004-06-04 09:04:34 +00:00
|
|
|
BOOL HasStringData( SCROW nRow ) const;
|
|
|
|
BOOL HasValueData( SCROW nRow ) const;
|
|
|
|
USHORT GetErrorData( SCROW nRow) const;
|
|
|
|
BOOL HasStringCells( SCROW nStartRow, SCROW nEndRow ) const;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
void SetDirty();
|
|
|
|
void SetDirty( const ScRange& );
|
|
|
|
void SetDirtyVar();
|
|
|
|
void SetDirtyAfterLoad();
|
2001-02-13 17:51:12 +00:00
|
|
|
void SetTableOpDirty( const ScRange& );
|
2000-09-18 16:07:07 +00:00
|
|
|
void CalcAll();
|
|
|
|
void CalcAfterLoad();
|
|
|
|
void CompileAll();
|
2002-10-01 16:10:37 +00:00
|
|
|
void CompileXML( ScProgress& rProgress );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2004-06-04 09:04:34 +00:00
|
|
|
void ResetChanged( SCROW nStartRow, SCROW nEndRow );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2004-06-04 09:04:34 +00:00
|
|
|
void UpdateReference( UpdateRefMode eUpdateRefMode, SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
|
|
|
|
SCCOL nCol2, SCROW nRow2, SCTAB nTab2,
|
|
|
|
SCsCOL nDx, SCsROW nDy, SCsTAB nDz,
|
2000-09-18 16:07:07 +00:00
|
|
|
ScDocument* pUndoDoc = NULL );
|
2004-06-04 09:04:34 +00:00
|
|
|
void UpdateInsertTab( SCTAB nTable);
|
|
|
|
void UpdateInsertTabOnlyCells( SCTAB nTable);
|
|
|
|
void UpdateDeleteTab( SCTAB nTable, BOOL bIsMove, ScColumn* pRefUndo = NULL );
|
|
|
|
void UpdateMoveTab(SCTAB nOldPos, SCTAB nNewPos, SCTAB nTabNo);
|
2000-09-18 16:07:07 +00:00
|
|
|
void UpdateCompile( BOOL bForceIfNameInUse = FALSE );
|
|
|
|
void UpdateTranspose( const ScRange& rSource, const ScAddress& rDest,
|
|
|
|
ScDocument* pUndoDoc );
|
2004-06-04 09:04:34 +00:00
|
|
|
void UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2004-06-04 09:04:34 +00:00
|
|
|
void SetTabNo(SCTAB nNewTab);
|
|
|
|
BOOL IsRangeNameInUse(SCROW nRow1, SCROW nRow2, USHORT nIndex) const;
|
|
|
|
void ReplaceRangeNamesInUse( SCROW nRow1, SCROW nRow2, const ScIndexMap& rMap );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2004-06-04 09:04:34 +00:00
|
|
|
const SfxPoolItem* GetAttr( SCROW nRow, USHORT nWhich ) const;
|
|
|
|
const ScPatternAttr* GetPattern( SCROW nRow ) const;
|
2004-09-08 14:27:38 +00:00
|
|
|
const ScPatternAttr* GetMostUsedPattern( SCROW nStartRow, SCROW nEndRow ) const;
|
|
|
|
|
2004-06-04 09:04:34 +00:00
|
|
|
ULONG GetNumberFormat( SCROW nRow ) const;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2005-03-29 12:29:07 +00:00
|
|
|
void MergeSelectionPattern( ScMergePatternState& rState, const ScMarkData& rMark, BOOL bDeep ) const;
|
|
|
|
void MergePatternArea( ScMergePatternState& rState, SCROW nRow1, SCROW nRow2, BOOL bDeep ) const;
|
2000-09-18 16:07:07 +00:00
|
|
|
void MergeBlockFrame( SvxBoxItem* pLineOuter, SvxBoxInfoItem* pLineInner,
|
|
|
|
ScLineFlags& rFlags,
|
2004-06-04 09:04:34 +00:00
|
|
|
SCROW nStartRow, SCROW nEndRow, BOOL bLeft, SCCOL nDistRight ) const;
|
2000-09-18 16:07:07 +00:00
|
|
|
void ApplyBlockFrame( const SvxBoxItem* pLineOuter, const SvxBoxInfoItem* pLineInner,
|
2004-06-04 09:04:34 +00:00
|
|
|
SCROW nStartRow, SCROW nEndRow, BOOL bLeft, SCCOL nDistRight );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2004-06-04 09:04:34 +00:00
|
|
|
void ApplyAttr( SCROW nRow, const SfxPoolItem& rAttr );
|
|
|
|
void ApplyPattern( SCROW nRow, const ScPatternAttr& rPatAttr );
|
|
|
|
void ApplyPatternArea( SCROW nStartRow, SCROW nEndRow, const ScPatternAttr& rPatAttr );
|
|
|
|
void SetPattern( SCROW nRow, const ScPatternAttr& rPatAttr, BOOL bPutToPool = FALSE );
|
|
|
|
void SetPatternArea( SCROW nStartRow, SCROW nEndRow,
|
2000-09-18 16:07:07 +00:00
|
|
|
const ScPatternAttr& rPatAttr, BOOL bPutToPool = FALSE );
|
|
|
|
void ApplyPatternIfNumberformatIncompatible( const ScRange& rRange,
|
|
|
|
const ScPatternAttr& rPattern, short nNewType );
|
|
|
|
|
2004-06-04 09:04:34 +00:00
|
|
|
void ApplyStyle( SCROW nRow, const ScStyleSheet& rStyle );
|
|
|
|
void ApplyStyleArea( SCROW nStartRow, SCROW nEndRow, const ScStyleSheet& rStyle );
|
2000-09-18 16:07:07 +00:00
|
|
|
void ApplySelectionStyle(const ScStyleSheet& rStyle, const ScMarkData& rMark);
|
|
|
|
void ApplySelectionLineStyle( const ScMarkData& rMark,
|
|
|
|
const SvxBorderLine* pLine, BOOL bColorOnly );
|
|
|
|
|
2004-06-04 09:04:34 +00:00
|
|
|
const ScStyleSheet* GetStyle( SCROW nRow ) const;
|
2000-09-18 16:07:07 +00:00
|
|
|
const ScStyleSheet* GetSelectionStyle( const ScMarkData& rMark, BOOL& rFound ) const;
|
2004-06-04 09:04:34 +00:00
|
|
|
const ScStyleSheet* GetAreaStyle( BOOL& rFound, SCROW nRow1, SCROW nRow2 ) const;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
void FindStyleSheet( const SfxStyleSheetBase* pStyleSheet, BOOL* pUsed, BOOL bReset );
|
2002-12-05 15:00:12 +00:00
|
|
|
BOOL IsStyleSheetUsed( const ScStyleSheet& rStyle, BOOL bGatherAllStyles ) const;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2004-06-04 09:04:34 +00:00
|
|
|
/// May return -1 if not found
|
|
|
|
SCsROW SearchStyle( SCsROW nRow, const ScStyleSheet* pSearchStyle,
|
2000-09-18 16:07:07 +00:00
|
|
|
BOOL bUp, BOOL bInSelection, const ScMarkData& rMark );
|
2004-06-04 09:04:34 +00:00
|
|
|
BOOL SearchStyleRange( SCsROW& rRow, SCsROW& rEndRow, const ScStyleSheet* pSearchStyle,
|
2000-09-18 16:07:07 +00:00
|
|
|
BOOL bUp, BOOL bInSelection, const ScMarkData& rMark );
|
|
|
|
|
2004-06-04 09:04:34 +00:00
|
|
|
BOOL ApplyFlags( SCROW nStartRow, SCROW nEndRow, INT16 nFlags );
|
|
|
|
BOOL RemoveFlags( SCROW nStartRow, SCROW nEndRow, INT16 nFlags );
|
|
|
|
void ClearItems( SCROW nStartRow, SCROW nEndRow, const USHORT* pWhich );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2004-06-04 09:04:34 +00:00
|
|
|
void RemoveProtected( SCROW nStartRow, SCROW nEndRow );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2004-06-04 09:04:34 +00:00
|
|
|
SCsROW ApplySelectionCache( SfxItemPoolCache* pCache, const ScMarkData& rMark );
|
2000-09-18 16:07:07 +00:00
|
|
|
void DeleteSelection( USHORT nDelFlag, const ScMarkData& rMark );
|
|
|
|
|
|
|
|
void ClearSelectionItems( const USHORT* pWhich, const ScMarkData& rMark );
|
|
|
|
void ChangeSelectionIndent( BOOL bIncrement, const ScMarkData& rMark );
|
|
|
|
|
2004-06-04 09:04:34 +00:00
|
|
|
long GetNeededSize( SCROW nRow, OutputDevice* pDev,
|
2000-09-18 16:07:07 +00:00
|
|
|
double nPPTX, double nPPTY,
|
|
|
|
const Fraction& rZoomX, const Fraction& rZoomY,
|
|
|
|
BOOL bWidth, const ScNeededSizeOptions& rOptions );
|
|
|
|
USHORT GetOptimalColWidth( OutputDevice* pDev, double nPPTX, double nPPTY,
|
|
|
|
const Fraction& rZoomX, const Fraction& rZoomY,
|
|
|
|
BOOL bFormula, USHORT nOldWidth,
|
|
|
|
const ScMarkData* pMarkData,
|
|
|
|
BOOL bSimpleTextImport );
|
2004-06-04 09:04:34 +00:00
|
|
|
void GetOptimalHeight( SCROW nStartRow, SCROW nEndRow, USHORT* pHeight,
|
2000-09-18 16:07:07 +00:00
|
|
|
OutputDevice* pDev,
|
|
|
|
double nPPTX, double nPPTY,
|
|
|
|
const Fraction& rZoomX, const Fraction& rZoomY,
|
2004-06-04 09:04:34 +00:00
|
|
|
BOOL bShrink, USHORT nMinHeight, SCROW nMinStart );
|
2000-09-18 16:07:07 +00:00
|
|
|
private:
|
2004-06-04 09:04:34 +00:00
|
|
|
long GetSimpleTextNeededSize( SCSIZE nIndex, OutputDevice* pDev,
|
2000-09-18 16:07:07 +00:00
|
|
|
BOOL bWidth );
|
|
|
|
public:
|
|
|
|
|
2004-06-04 09:04:34 +00:00
|
|
|
/// Including current, may return -1
|
|
|
|
SCsROW GetNextUnprotected( SCROW nRow, BOOL bUp ) const;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2004-06-04 09:04:34 +00:00
|
|
|
void GetFilterEntries(SCROW nStartRow, SCROW nEndRow, TypedStrCollection& rStrings);
|
|
|
|
BOOL GetDataEntries(SCROW nRow, TypedStrCollection& rStrings, BOOL bLimit);
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2004-06-04 09:04:34 +00:00
|
|
|
SCROW NoteCount( SCROW nMaxRow = MAXROW ) const;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
void LoadData( SvStream& rStream );
|
|
|
|
void SaveData( SvStream& rStream ) const;
|
|
|
|
|
|
|
|
void LoadNotes( SvStream& rStream );
|
|
|
|
void SaveNotes( SvStream& rStream ) const;
|
|
|
|
|
|
|
|
BOOL Load( SvStream& rStream, ScMultipleReadHeader& rHdr );
|
|
|
|
BOOL Save( SvStream& rStream, ScMultipleWriteHeader& rHdr ) const;
|
2004-06-04 09:04:34 +00:00
|
|
|
void UpdateInsertTabAbs(SCTAB nNewPos);
|
|
|
|
BOOL TestTabRefAbs(SCTAB nTable);
|
|
|
|
BOOL GetNextSpellingCell(SCROW& nRow, BOOL bInSel, const ScMarkData& rData) const;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
void RemoveAutoSpellObj();
|
|
|
|
|
2004-06-04 09:04:34 +00:00
|
|
|
void StartListening( SvtListener& rLst, SCROW nRow );
|
|
|
|
void EndListening( SvtListener& rLst, SCROW nRow );
|
|
|
|
void MoveListeners( SvtBroadcaster& rSource, SCROW nDestRow );
|
2000-09-18 16:07:07 +00:00
|
|
|
void StartAllListeners();
|
2004-09-07 09:38:39 +00:00
|
|
|
void StartNeededListeners(); // only for cells where NeedsListening()==TRUE
|
2000-09-18 16:07:07 +00:00
|
|
|
void SetRelNameDirty();
|
|
|
|
|
|
|
|
void CompileDBFormula();
|
|
|
|
void CompileDBFormula( BOOL bCreateFormulaString );
|
|
|
|
void CompileNameFormula( BOOL bCreateFormulaString );
|
|
|
|
void CompileColRowNameFormula();
|
|
|
|
|
2007-01-25 10:02:49 +00:00
|
|
|
sal_Int32 GetMaxStringLen( SCROW nRowStart, SCROW nRowEnd, CharSet eCharSet ) const;
|
2000-09-18 16:07:07 +00:00
|
|
|
xub_StrLen GetMaxNumberStringLen( USHORT& nPrecision,
|
2004-06-04 09:04:34 +00:00
|
|
|
SCROW nRowStart, SCROW nRowEnd ) const;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
private:
|
2004-06-04 09:04:34 +00:00
|
|
|
ScBaseCell* CloneCell(SCSIZE nIndex, USHORT nFlags,
|
2000-09-18 16:07:07 +00:00
|
|
|
ScDocument* pDestDoc, const ScAddress& rDestPos);
|
2002-06-24 14:40:30 +00:00
|
|
|
void CorrectSymbolCells( CharSet eStreamCharSet );
|
2000-09-18 16:07:07 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class ScColumnIterator // alle Daten eines Bereichs durchgehen
|
|
|
|
{
|
|
|
|
const ScColumn* pColumn;
|
2004-06-04 09:04:34 +00:00
|
|
|
SCSIZE nPos;
|
|
|
|
SCROW nTop;
|
|
|
|
SCROW nBottom;
|
2000-09-18 16:07:07 +00:00
|
|
|
public:
|
2004-06-04 09:04:34 +00:00
|
|
|
ScColumnIterator( const ScColumn* pCol, SCROW nStart=0, SCROW nEnd=MAXROW );
|
2000-09-18 16:07:07 +00:00
|
|
|
~ScColumnIterator();
|
|
|
|
|
2004-06-04 09:04:34 +00:00
|
|
|
BOOL Next( SCROW& rRow, ScBaseCell*& rpCell );
|
|
|
|
SCSIZE GetIndex() const;
|
2000-09-18 16:07:07 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class ScMarkedDataIter // Daten in selektierten Bereichen durchgehen
|
|
|
|
{
|
|
|
|
const ScColumn* pColumn;
|
2004-06-04 09:04:34 +00:00
|
|
|
SCSIZE nPos;
|
2000-09-18 16:07:07 +00:00
|
|
|
ScMarkArrayIter* pMarkIter;
|
2004-06-04 09:04:34 +00:00
|
|
|
SCROW nTop;
|
|
|
|
SCROW nBottom;
|
2000-09-18 16:07:07 +00:00
|
|
|
BOOL bNext;
|
|
|
|
BOOL bAll;
|
|
|
|
|
|
|
|
public:
|
|
|
|
ScMarkedDataIter( const ScColumn* pCol, const ScMarkData* pMarkData,
|
|
|
|
BOOL bAllIfNone = FALSE );
|
|
|
|
~ScMarkedDataIter();
|
|
|
|
|
2004-06-04 09:04:34 +00:00
|
|
|
BOOL Next( SCSIZE& rIndex );
|
2000-09-18 16:07:07 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|