LibreOffice Module sc (master)  1
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
ScAttrArray Class Reference

#include <attarray.hxx>

Collaboration diagram for ScAttrArray:
[legend]

Public Member Functions

 ScAttrArray (SCCOL nNewCol, SCTAB nNewTab, ScDocument &rDoc, ScAttrArray *pNextColAttrArray)
 
 ~ScAttrArray ()
 
ScDocumentGetDoc ()
 
void SetTab (SCTAB nNewTab)
 
void SetCol (SCCOL nNewCol)
 
void Reset (const ScPatternAttr *pPattern)
 
bool Concat (SCSIZE nPos)
 
const ScPatternAttrGetPattern (SCROW nRow) const
 
const ScPatternAttrGetPatternRange (SCROW &rStartRow, SCROW &rEndRow, SCROW nRow) const
 Returns if you search for attributes at nRow the range from rStartRow to rEndRow where that attribute combination (ScPatternAttr) is applied. More...
 
void MergePatternArea (SCROW nStartRow, SCROW nEndRow, ScMergePatternState &rState, bool bDeep) const
 
void MergeBlockFrame (SvxBoxItem *pLineOuter, SvxBoxInfoItem *pLineInner, ScLineFlags &rFlags, SCROW nStartRow, SCROW nEndRow, bool bLeft, SCCOL nDistRight) const
 
void ApplyBlockFrame (const SvxBoxItem &rLineOuter, const SvxBoxInfoItem *pLineInner, SCROW nStartRow, SCROW nEndRow, bool bLeft, SCCOL nDistRight)
 
void SetPattern (SCROW nRow, const ScPatternAttr *pPattern, bool bPutToPool=false)
 
const ScPatternAttrSetPattern (SCROW nRow, std::unique_ptr< ScPatternAttr > pPattern, bool bPutToPool=false)
 
void SetPatternArea (SCROW nStartRow, SCROW nEndRow, std::unique_ptr< ScPatternAttr > pPattern, bool bPutToPool=false, ScEditDataArray *pDataArray=nullptr)
 
void SetPatternArea (SCROW nStartRow, SCROW nEndRow, const ScPatternAttr *pPattern, bool bPutToPool=false, ScEditDataArray *pDataArray=nullptr)
 
void ApplyStyleArea (SCROW nStartRow, SCROW nEndRow, const ScStyleSheet &rStyle)
 
void ApplyCacheArea (SCROW nStartRow, SCROW nEndRow, SfxItemPoolCache *pCache, ScEditDataArray *pDataArray=nullptr, bool *const pIsChanged=nullptr)
 
void SetAttrEntries (std::vector< ScAttrEntry > &&vNewData)
 
void ApplyLineStyleArea (SCROW nStartRow, SCROW nEndRow, const ::editeng::SvxBorderLine *pLine, bool bColorOnly)
 
void AddCondFormat (SCROW nStartRow, SCROW nEndRow, sal_uInt32 nIndex)
 
void RemoveCondFormat (SCROW nStartRow, SCROW nEndRow, sal_uInt32 nIndex)
 if nIndex == 0, remove all conditional format data More...
 
void ClearItems (SCROW nStartRow, SCROW nEndRow, const sal_uInt16 *pWhich)
 
void ChangeIndent (SCROW nStartRow, SCROW nEndRow, bool bIncrement)
 
SCROW GetNextUnprotected (SCROW nRow, bool bUp) const
 Including current, may return -1. More...
 
SCROW SearchStyle (SCROW nRow, const ScStyleSheet *pSearchStyle, bool bUp, const ScMarkArray *pMarkArray=nullptr) const
 May return -1 if not found. More...
 
bool SearchStyleRange (SCROW &rRow, SCROW &rEndRow, const ScStyleSheet *pSearchStyle, bool bUp, const ScMarkArray *pMarkArray=nullptr) const
 
bool ApplyFlags (SCROW nStartRow, SCROW nEndRow, ScMF nFlags)
 
bool RemoveFlags (SCROW nStartRow, SCROW nEndRow, ScMF nFlags)
 
bool Search (SCROW nRow, SCSIZE &nIndex) const
 
bool HasAttrib (SCROW nRow1, SCROW nRow2, HasAttrFlags nMask) const
 
bool IsMerged (SCROW nRow) const
 
bool ExtendMerge (SCCOL nThisCol, SCROW nStartRow, SCROW nEndRow, SCCOL &rPaintCol, SCROW &rPaintRow, bool bRefresh)
 Area around any given summaries expand and adapt any MergeFlag (bRefresh) More...
 
void RemoveAreaMerge (SCROW nStartRow, SCROW nEndRow)
 
void FindStyleSheet (const SfxStyleSheetBase *pStyleSheet, ScFlatBoolRowSegments &rUsedRows, bool bReset)
 
bool IsStyleSheetUsed (const ScStyleSheet &rStyle) const
 
void SetPatternAreaSafe (SCROW nStartRow, SCROW nEndRow, const ScPatternAttr *pWantedPattern, bool bDefault)
 
void CopyAreaSafe (SCROW nStartRow, SCROW nEndRow, long nDy, ScAttrArray &rAttrArray)
 Leave flags summarized with CopyArea. More...
 
bool IsEmpty () const
 
bool GetFirstVisibleAttr (SCROW &rFirstRow) const
 
bool GetLastVisibleAttr (SCROW &rLastRow, SCROW nLastData) const
 
bool HasVisibleAttrIn (SCROW nStartRow, SCROW nEndRow) const
 
bool IsVisibleEqual (const ScAttrArray &rOther, SCROW nStartRow, SCROW nEndRow) const
 
bool IsAllEqual (const ScAttrArray &rOther, 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)
 
void DeleteArea (SCROW nStartRow, SCROW nEndRow)
 
void MoveTo (SCROW nStartRow, SCROW nEndRow, ScAttrArray &rAttrArray)
 Move within a document. More...
 
void CopyArea (SCROW nStartRow, SCROW nEndRow, long nDy, ScAttrArray &rAttrArray, ScMF nStripFlags=ScMF::NONE) const
 Copy between documents (Clipboard) More...
 
void DeleteHardAttr (SCROW nStartRow, SCROW nEndRow)
 
bool Reserve (SCSIZE nReserve)
 
SCSIZE Count () const
 
SCSIZE Count (SCROW nRow1, SCROW nRow2) const
 

Private Member Functions

bool ApplyFrame (const SvxBoxItem *pLineOuter, const SvxBoxInfoItem *pLineInner, SCROW nStartRow, SCROW nEndRow, bool bLeft, SCCOL nDistRight, bool bTop, SCROW nDistBottom)
 
void RemoveCellCharAttribs (SCROW nStartRow, SCROW nEndRow, const ScPatternAttr *pPattern, ScEditDataArray *pDataArray)
 
void SetDefaultIfNotInit (SCSIZE nNeeded=1)
 
bool HasAttrib_Impl (const ScPatternAttr *pPattern, HasAttrFlags nMask, SCROW nRow1, SCROW nRow2, SCSIZE i) const
 
 ScAttrArray (const ScAttrArray &)=delete
 
ScAttrArrayoperator= (const ScAttrArray &)=delete
 
const ScPatternAttrSetPatternAreaImpl (SCROW nStartRow, SCROW nEndRow, const ScPatternAttr *pPattern, bool bPutToPool=false, ScEditDataArray *pDataArray=nullptr, bool bPassingPatternOwnership=false)
 

Private Attributes

SCCOL nCol
 
SCTAB nTab
 
ScDocumentrDocument
 
std::vector< ScAttrEntrymvData
 

Friends

class ScDocument
 
class ScDocumentIterator
 
class ScAttrIterator
 
class ScHorizontalAttrIterator
 

Detailed Description

Definition at line 86 of file attarray.hxx.

Constructor & Destructor Documentation

ScAttrArray::ScAttrArray ( const ScAttrArray )
privatedelete
ScAttrArray::ScAttrArray ( SCCOL  nNewCol,
SCTAB  nNewTab,
ScDocument rDoc,
ScAttrArray pNextColAttrArray 
)
ScAttrArray::~ScAttrArray ( )

Definition at line 77 of file attarray.cxx.

References ScDocument::GetPool(), mvData, rDocument, and SfxItemPool::Remove().

Member Function Documentation

void ScAttrArray::AddCondFormat ( SCROW  nStartRow,
SCROW  nEndRow,
sal_uInt32  nIndex 
)
void ScAttrArray::ApplyBlockFrame ( const SvxBoxItem rLineOuter,
const SvxBoxInfoItem pLineInner,
SCROW  nStartRow,
SCROW  nEndRow,
bool  bLeft,
SCCOL  nDistRight 
)

Definition at line 1232 of file attarray.cxx.

References ApplyFrame(), i, mvData, and Search().

void ScAttrArray::ApplyCacheArea ( SCROW  nStartRow,
SCROW  nEndRow,
SfxItemPoolCache pCache,
ScEditDataArray pDataArray = nullptr,
bool *const  pIsChanged = nullptr 
)
bool ScAttrArray::ApplyFlags ( SCROW  nStartRow,
SCROW  nEndRow,
ScMF  nFlags 
)
bool ScAttrArray::ApplyFrame ( const SvxBoxItem pLineOuter,
const SvxBoxInfoItem pLineInner,
SCROW  nStartRow,
SCROW  nEndRow,
bool  bLeft,
SCCOL  nDistRight,
bool  bTop,
SCROW  nDistBottom 
)
private
void ScAttrArray::ApplyLineStyleArea ( SCROW  nStartRow,
SCROW  nEndRow,
const ::editeng::SvxBorderLine pLine,
bool  bColorOnly 
)
void ScAttrArray::ApplyStyleArea ( SCROW  nStartRow,
SCROW  nEndRow,
const ScStyleSheet rStyle 
)
void ScAttrArray::ChangeIndent ( SCROW  nStartRow,
SCROW  nEndRow,
bool  bIncrement 
)
void ScAttrArray::ClearItems ( SCROW  nStartRow,
SCROW  nEndRow,
const sal_uInt16 *  pWhich 
)
bool ScAttrArray::Concat ( SCSIZE  nPos)
void ScAttrArray::CopyArea ( SCROW  nStartRow,
SCROW  nEndRow,
long  nDy,
ScAttrArray rAttrArray,
ScMF  nStripFlags = ScMF::NONE 
) const
void ScAttrArray::CopyAreaSafe ( SCROW  nStartRow,
SCROW  nEndRow,
long  nDy,
ScAttrArray rAttrArray 
)
SCSIZE ScAttrArray::Count ( ) const
inline
SCSIZE ScAttrArray::Count ( SCROW  nRow1,
SCROW  nRow2 
) const

Definition at line 2656 of file attarray.cxx.

References mvData, and Search().

void ScAttrArray::DeleteArea ( SCROW  nStartRow,
SCROW  nEndRow 
)
void ScAttrArray::DeleteHardAttr ( SCROW  nStartRow,
SCROW  nEndRow 
)
void ScAttrArray::DeleteRange ( SCSIZE  nStartIndex,
SCSIZE  nEndIndex 
)

Definition at line 2305 of file attarray.cxx.

References ScDocument::GetPool(), i, mvData, rDocument, SfxItemPool::Remove(), and SetDefaultIfNotInit().

Referenced by DeleteRow(), and InsertRow().

void ScAttrArray::DeleteRow ( SCROW  nStartRow,
SCSIZE  nSize 
)
bool ScAttrArray::ExtendMerge ( SCCOL  nThisCol,
SCROW  nStartRow,
SCROW  nEndRow,
SCCOL rPaintCol,
SCROW rPaintRow,
bool  bRefresh 
)
void ScAttrArray::FindStyleSheet ( const SfxStyleSheetBase pStyleSheet,
ScFlatBoolRowSegments rUsedRows,
bool  bReset 
)
ScDocument& ScAttrArray::GetDoc ( )
inline

Definition at line 116 of file attarray.hxx.

References rDocument.

bool ScAttrArray::GetFirstVisibleAttr ( SCROW rFirstRow) const

Definition at line 1891 of file attarray.cxx.

References mvData.

bool ScAttrArray::GetLastVisibleAttr ( SCROW rLastRow,
SCROW  nLastData 
) const

Definition at line 1927 of file attarray.cxx.

References ScDocument::MaxRow(), mvData, rDocument, and Search().

SCROW ScAttrArray::GetNextUnprotected ( SCROW  nRow,
bool  bUp 
) const

Including current, may return -1.

Definition at line 1771 of file attarray.cxx.

References ATTR_PROTECTION(), GetItem(), ScDocument::MaxRow(), mvData, nIndex, rDocument, Search(), and ScDocument::ValidRow().

Referenced by ScTable::GetNextPos().

const ScPatternAttr * ScAttrArray::GetPattern ( SCROW  nRow) const
const ScPatternAttr * ScAttrArray::GetPatternRange ( SCROW rStartRow,
SCROW rEndRow,
SCROW  nRow 
) const

Returns if you search for attributes at nRow the range from rStartRow to rEndRow where that attribute combination (ScPatternAttr) is applied.

The next ScPatternAttr different from this one starts at rEndRow+1 (if that is <= MAXROW).

Definition at line 254 of file attarray.cxx.

References ScDocument::GetDefPattern(), ScDocument::MaxRow(), mvData, nIndex, rDocument, Search(), and ScDocument::ValidRow().

Referenced by AddCondFormat(), RemoveCondFormat(), and ScAttrArray_IterGetNumberFormat().

bool ScAttrArray::HasAttrib ( SCROW  nRow1,
SCROW  nRow2,
HasAttrFlags  nMask 
) const
bool ScAttrArray::HasAttrib_Impl ( const ScPatternAttr pPattern,
HasAttrFlags  nMask,
SCROW  nRow1,
SCROW  nRow2,
SCSIZE  i 
) const
private
bool ScAttrArray::HasVisibleAttrIn ( SCROW  nStartRow,
SCROW  nEndRow 
) const
void ScAttrArray::InsertRow ( SCROW  nStartRow,
SCSIZE  nSize 
)
bool ScAttrArray::IsAllEqual ( const ScAttrArray rOther,
SCROW  nStartRow,
SCROW  nEndRow 
) const

Definition at line 2085 of file attarray.cxx.

References Count(), ScDocument::GetDefPattern(), mvData, rDocument, and Search().

bool ScAttrArray::IsEmpty ( ) const

Definition at line 1878 of file attarray.cxx.

References ScDocument::GetDefPattern(), mvData, and rDocument.

Referenced by TestInsertCol().

bool ScAttrArray::IsMerged ( SCROW  nRow) const
bool ScAttrArray::IsStyleSheetUsed ( const ScStyleSheet rStyle) const
bool ScAttrArray::IsVisibleEqual ( const ScAttrArray rOther,
SCROW  nStartRow,
SCROW  nEndRow 
) const
void ScAttrArray::MergeBlockFrame ( SvxBoxItem pLineOuter,
SvxBoxInfoItem pLineInner,
ScLineFlags rFlags,
SCROW  nStartRow,
SCROW  nEndRow,
bool  bLeft,
SCCOL  nDistRight 
) const
void ScAttrArray::MergePatternArea ( SCROW  nStartRow,
SCROW  nEndRow,
ScMergePatternState rState,
bool  bDeep 
) const
void ScAttrArray::MoveTo ( SCROW  nStartRow,
SCROW  nEndRow,
ScAttrArray rAttrArray 
)

Move within a document.

Definition at line 2371 of file attarray.cxx.

References DeleteArea(), i, mvData, SetDefaultIfNotInit(), and SetPatternArea().

ScAttrArray& ScAttrArray::operator= ( const ScAttrArray )
privatedelete
void ScAttrArray::RemoveAreaMerge ( SCROW  nStartRow,
SCROW  nEndRow 
)
void ScAttrArray::RemoveCellCharAttribs ( SCROW  nStartRow,
SCROW  nEndRow,
const ScPatternAttr pPattern,
ScEditDataArray pDataArray 
)
private
void ScAttrArray::RemoveCondFormat ( SCROW  nStartRow,
SCROW  nEndRow,
sal_uInt32  nIndex 
)
bool ScAttrArray::RemoveFlags ( SCROW  nStartRow,
SCROW  nEndRow,
ScMF  nFlags 
)
bool ScAttrArray::Reserve ( SCSIZE  nReserve)

Definition at line 427 of file attarray.cxx.

References ScDocument::GetDefPattern(), ScDocument::MaxRow(), mvData, and rDocument.

void ScAttrArray::Reset ( const ScPatternAttr pPattern)
bool ScAttrArray::Search ( SCROW  nRow,
SCSIZE nIndex 
) const
SCROW ScAttrArray::SearchStyle ( SCROW  nRow,
const ScStyleSheet pSearchStyle,
bool  bUp,
const ScMarkArray pMarkArray = nullptr 
) const
bool ScAttrArray::SearchStyleRange ( SCROW rRow,
SCROW rEndRow,
const ScStyleSheet pSearchStyle,
bool  bUp,
const ScMarkArray pMarkArray = nullptr 
) const
void ScAttrArray::SetAttrEntries ( std::vector< ScAttrEntry > &&  vNewData)

Definition at line 926 of file attarray.cxx.

References ScDocument::GetPool(), mvData, rDocument, and SfxItemPool::Remove().

void ScAttrArray::SetCol ( SCCOL  nNewCol)
inline

Definition at line 118 of file attarray.hxx.

void ScAttrArray::SetDefaultIfNotInit ( SCSIZE  nNeeded = 1)
private
void ScAttrArray::SetPattern ( SCROW  nRow,
const ScPatternAttr pPattern,
bool  bPutToPool = false 
)
inline

Definition at line 141 of file attarray.hxx.

References SetPatternAreaImpl().

const ScPatternAttr* ScAttrArray::SetPattern ( SCROW  nRow,
std::unique_ptr< ScPatternAttr pPattern,
bool  bPutToPool = false 
)
inline

Definition at line 143 of file attarray.hxx.

References SetPatternAreaImpl().

void ScAttrArray::SetPatternArea ( SCROW  nStartRow,
SCROW  nEndRow,
std::unique_ptr< ScPatternAttr pPattern,
bool  bPutToPool = false,
ScEditDataArray pDataArray = nullptr 
)
inline
void ScAttrArray::SetPatternArea ( SCROW  nStartRow,
SCROW  nEndRow,
const ScPatternAttr pPattern,
bool  bPutToPool = false,
ScEditDataArray pDataArray = nullptr 
)
inline

Definition at line 148 of file attarray.hxx.

References SetPatternAreaImpl().

const ScPatternAttr * ScAttrArray::SetPatternAreaImpl ( SCROW  nStartRow,
SCROW  nEndRow,
const ScPatternAttr pPattern,
bool  bPutToPool = false,
ScEditDataArray pDataArray = nullptr,
bool  bPassingPatternOwnership = false 
)
private
void ScAttrArray::SetPatternAreaSafe ( SCROW  nStartRow,
SCROW  nEndRow,
const ScPatternAttr pWantedPattern,
bool  bDefault 
)
void ScAttrArray::SetTab ( SCTAB  nNewTab)
inline

Definition at line 117 of file attarray.hxx.

bool ScAttrArray::TestInsertCol ( SCROW  nStartRow,
SCROW  nEndRow 
) const

Definition at line 2163 of file attarray.cxx.

References ATTR_MERGE_FLAG(), GetItem(), IsEmpty(), mvData, nIndex, and Search().

bool ScAttrArray::TestInsertRow ( SCSIZE  nSize) const

Friends And Related Function Documentation

friend class ScAttrIterator
friend

Definition at line 97 of file attarray.hxx.

friend class ScDocument
friend

Definition at line 95 of file attarray.hxx.

friend class ScDocumentIterator
friend

Definition at line 96 of file attarray.hxx.

friend class ScHorizontalAttrIterator
friend

Definition at line 98 of file attarray.hxx.

Member Data Documentation

std::vector<ScAttrEntry> ScAttrArray::mvData
private
SCCOL ScAttrArray::nCol
private
SCTAB ScAttrArray::nTab
private
ScDocument& ScAttrArray::rDocument
private

The documentation for this class was generated from the following files: