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 ()
 
const ScDocumentGetDoc () const
 
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 HasAttrib (SCROW nRow, HasAttrFlags nMask, SCROW *nStartRow=nullptr, SCROW *nEndRow=nullptr) 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, tools::Long nDy, ScAttrArray &rAttrArray)
 Leave flags summarized with CopyArea. More...
 
bool IsEmpty () const
 
bool GetFirstVisibleAttr (SCROW &rFirstRow) const
 
bool GetLastVisibleAttr (SCROW &rLastRow, SCROW nLastData, bool bSkipEmpty) 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, tools::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 &rLineOuter, 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 91 of file attarray.hxx.

Constructor & Destructor Documentation

◆ ScAttrArray() [1/2]

ScAttrArray::ScAttrArray ( const ScAttrArray )
privatedelete

◆ ScAttrArray() [2/2]

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

◆ ~ScAttrArray()

ScAttrArray::~ScAttrArray ( )

Definition at line 77 of file attarray.cxx.

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

Member Function Documentation

◆ AddCondFormat()

void ScAttrArray::AddCondFormat ( SCROW  nStartRow,
SCROW  nEndRow,
sal_uInt32  nIndex 
)

◆ ApplyBlockFrame()

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

Definition at line 1234 of file attarray.cxx.

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

◆ ApplyCacheArea()

void ScAttrArray::ApplyCacheArea ( SCROW  nStartRow,
SCROW  nEndRow,
SfxItemPoolCache pCache,
ScEditDataArray pDataArray = nullptr,
bool *const  pIsChanged = nullptr 
)

◆ ApplyFlags()

bool ScAttrArray::ApplyFlags ( SCROW  nStartRow,
SCROW  nEndRow,
ScMF  nFlags 
)

◆ ApplyFrame()

bool ScAttrArray::ApplyFrame ( const SvxBoxItem rLineOuter,
const SvxBoxInfoItem pLineInner,
SCROW  nStartRow,
SCROW  nEndRow,
bool  bLeft,
SCCOL  nDistRight,
bool  bTop,
SCROW  nDistBottom 
)
private

◆ ApplyLineStyleArea()

void ScAttrArray::ApplyLineStyleArea ( SCROW  nStartRow,
SCROW  nEndRow,
const ::editeng::SvxBorderLine pLine,
bool  bColorOnly 
)

◆ ApplyStyleArea()

void ScAttrArray::ApplyStyleArea ( SCROW  nStartRow,
SCROW  nEndRow,
const ScStyleSheet rStyle 
)

◆ ChangeIndent()

void ScAttrArray::ChangeIndent ( SCROW  nStartRow,
SCROW  nEndRow,
bool  bIncrement 
)

◆ ClearItems()

void ScAttrArray::ClearItems ( SCROW  nStartRow,
SCROW  nEndRow,
const sal_uInt16 *  pWhich 
)

◆ Concat()

bool ScAttrArray::Concat ( SCSIZE  nPos)

◆ CopyArea()

void ScAttrArray::CopyArea ( SCROW  nStartRow,
SCROW  nEndRow,
tools::Long  nDy,
ScAttrArray rAttrArray,
ScMF  nStripFlags = ScMF::NONE 
) const

◆ CopyAreaSafe()

void ScAttrArray::CopyAreaSafe ( SCROW  nStartRow,
SCROW  nEndRow,
tools::Long  nDy,
ScAttrArray rAttrArray 
)

◆ Count() [1/2]

SCSIZE ScAttrArray::Count ( ) const
inline

◆ Count() [2/2]

SCSIZE ScAttrArray::Count ( SCROW  nRow1,
SCROW  nRow2 
) const

Definition at line 2686 of file attarray.cxx.

References mvData, and Search().

◆ DeleteArea()

void ScAttrArray::DeleteArea ( SCROW  nStartRow,
SCROW  nEndRow 
)

◆ DeleteHardAttr()

void ScAttrArray::DeleteHardAttr ( SCROW  nStartRow,
SCROW  nEndRow 
)

◆ DeleteRange()

void ScAttrArray::DeleteRange ( SCSIZE  nStartIndex,
SCSIZE  nEndIndex 
)

Definition at line 2335 of file attarray.cxx.

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

Referenced by DeleteRow(), and InsertRow().

◆ DeleteRow()

void ScAttrArray::DeleteRow ( SCROW  nStartRow,
SCSIZE  nSize 
)

◆ ExtendMerge()

bool ScAttrArray::ExtendMerge ( SCCOL  nThisCol,
SCROW  nStartRow,
SCROW  nEndRow,
SCCOL rPaintCol,
SCROW rPaintRow,
bool  bRefresh 
)

◆ FindStyleSheet()

void ScAttrArray::FindStyleSheet ( const SfxStyleSheetBase pStyleSheet,
ScFlatBoolRowSegments rUsedRows,
bool  bReset 
)

◆ GetDoc() [1/2]

ScDocument & ScAttrArray::GetDoc ( )
inline

Definition at line 121 of file attarray.hxx.

References rDocument.

Referenced by ScAttrIterator::Next().

◆ GetDoc() [2/2]

const ScDocument & ScAttrArray::GetDoc ( ) const
inline

Definition at line 122 of file attarray.hxx.

References rDocument.

◆ GetFirstVisibleAttr()

bool ScAttrArray::GetFirstVisibleAttr ( SCROW rFirstRow) const

Definition at line 1909 of file attarray.cxx.

References mvData.

◆ GetLastVisibleAttr()

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

Definition at line 1945 of file attarray.cxx.

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

◆ GetNextUnprotected()

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

Including current, may return -1.

Definition at line 1790 of file attarray.cxx.

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

◆ GetPattern()

const ScPatternAttr * ScAttrArray::GetPattern ( SCROW  nRow) const

◆ GetPatternRange()

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().

◆ HasAttrib() [1/2]

bool ScAttrArray::HasAttrib ( SCROW  nRow,
HasAttrFlags  nMask,
SCROW nStartRow = nullptr,
SCROW nEndRow = nullptr 
) const

◆ HasAttrib() [2/2]

bool ScAttrArray::HasAttrib ( SCROW  nRow1,
SCROW  nRow2,
HasAttrFlags  nMask 
) const

◆ HasAttrib_Impl()

bool ScAttrArray::HasAttrib_Impl ( const ScPatternAttr pPattern,
HasAttrFlags  nMask,
SCROW  nRow1,
SCROW  nRow2,
SCSIZE  i 
) const
private

◆ HasVisibleAttrIn()

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

◆ InsertRow()

void ScAttrArray::InsertRow ( SCROW  nStartRow,
SCSIZE  nSize 
)

◆ IsAllEqual()

bool ScAttrArray::IsAllEqual ( const ScAttrArray rOther,
SCROW  nStartRow,
SCROW  nEndRow 
) const

Definition at line 2115 of file attarray.cxx.

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

◆ IsEmpty()

bool ScAttrArray::IsEmpty ( ) const

Definition at line 1896 of file attarray.cxx.

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

Referenced by TestInsertCol().

◆ IsMerged()

bool ScAttrArray::IsMerged ( SCROW  nRow) const

◆ IsStyleSheetUsed()

bool ScAttrArray::IsStyleSheetUsed ( const ScStyleSheet rStyle) const

◆ IsVisibleEqual()

bool ScAttrArray::IsVisibleEqual ( const ScAttrArray rOther,
SCROW  nStartRow,
SCROW  nEndRow 
) const

◆ MergeBlockFrame()

void ScAttrArray::MergeBlockFrame ( SvxBoxItem pLineOuter,
SvxBoxInfoItem pLineInner,
ScLineFlags rFlags,
SCROW  nStartRow,
SCROW  nEndRow,
bool  bLeft,
SCCOL  nDistRight 
) const

◆ MergePatternArea()

void ScAttrArray::MergePatternArea ( SCROW  nStartRow,
SCROW  nEndRow,
ScMergePatternState rState,
bool  bDeep 
) const

◆ MoveTo()

void ScAttrArray::MoveTo ( SCROW  nStartRow,
SCROW  nEndRow,
ScAttrArray rAttrArray 
)

Move within a document.

Definition at line 2401 of file attarray.cxx.

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

◆ operator=()

ScAttrArray & ScAttrArray::operator= ( const ScAttrArray )
privatedelete

◆ RemoveAreaMerge()

void ScAttrArray::RemoveAreaMerge ( SCROW  nStartRow,
SCROW  nEndRow 
)

◆ RemoveCellCharAttribs()

void ScAttrArray::RemoveCellCharAttribs ( SCROW  nStartRow,
SCROW  nEndRow,
const ScPatternAttr pPattern,
ScEditDataArray pDataArray 
)
private

◆ RemoveCondFormat()

void ScAttrArray::RemoveCondFormat ( SCROW  nStartRow,
SCROW  nEndRow,
sal_uInt32  nIndex 
)

◆ RemoveFlags()

bool ScAttrArray::RemoveFlags ( SCROW  nStartRow,
SCROW  nEndRow,
ScMF  nFlags 
)

◆ Reserve()

bool ScAttrArray::Reserve ( SCSIZE  nReserve)

Definition at line 423 of file attarray.cxx.

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

◆ Reset()

void ScAttrArray::Reset ( const ScPatternAttr pPattern)

◆ Search()

bool ScAttrArray::Search ( SCROW  nRow,
SCSIZE nIndex 
) const

◆ SearchStyle()

SCROW ScAttrArray::SearchStyle ( SCROW  nRow,
const ScStyleSheet pSearchStyle,
bool  bUp,
const ScMarkArray pMarkArray = nullptr 
) const

◆ SearchStyleRange()

bool ScAttrArray::SearchStyleRange ( SCROW rRow,
SCROW rEndRow,
const ScStyleSheet pSearchStyle,
bool  bUp,
const ScMarkArray pMarkArray = nullptr 
) const

◆ SetAttrEntries()

void ScAttrArray::SetAttrEntries ( std::vector< ScAttrEntry > &&  vNewData)

Definition at line 919 of file attarray.cxx.

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

◆ SetCol()

void ScAttrArray::SetCol ( SCCOL  nNewCol)
inline

Definition at line 124 of file attarray.hxx.

References nCol.

◆ SetDefaultIfNotInit()

void ScAttrArray::SetDefaultIfNotInit ( SCSIZE  nNeeded = 1)
private

◆ SetPattern() [1/2]

void ScAttrArray::SetPattern ( SCROW  nRow,
const ScPatternAttr pPattern,
bool  bPutToPool = false 
)
inline

Definition at line 147 of file attarray.hxx.

References ScHorizontalAttrIterator::nRow, and SetPatternAreaImpl().

◆ SetPattern() [2/2]

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

Definition at line 149 of file attarray.hxx.

References ScHorizontalAttrIterator::nRow, and SetPatternAreaImpl().

◆ SetPatternArea() [1/2]

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

◆ SetPatternArea() [2/2]

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

◆ SetPatternAreaImpl()

const ScPatternAttr * ScAttrArray::SetPatternAreaImpl ( SCROW  nStartRow,
SCROW  nEndRow,
const ScPatternAttr pPattern,
bool  bPutToPool = false,
ScEditDataArray pDataArray = nullptr,
bool  bPassingPatternOwnership = false 
)
private

◆ SetPatternAreaSafe()

void ScAttrArray::SetPatternAreaSafe ( SCROW  nStartRow,
SCROW  nEndRow,
const ScPatternAttr pWantedPattern,
bool  bDefault 
)

◆ SetTab()

void ScAttrArray::SetTab ( SCTAB  nNewTab)
inline

Definition at line 123 of file attarray.hxx.

References nTab.

◆ TestInsertCol()

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

Definition at line 2193 of file attarray.cxx.

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

◆ TestInsertRow()

bool ScAttrArray::TestInsertRow ( SCSIZE  nSize) const

Friends And Related Function Documentation

◆ ScAttrIterator

friend class ScAttrIterator
friend

Definition at line 102 of file attarray.hxx.

◆ ScDocument

friend class ScDocument
friend

Definition at line 100 of file attarray.hxx.

◆ ScDocumentIterator

friend class ScDocumentIterator
friend

Definition at line 101 of file attarray.hxx.

◆ ScHorizontalAttrIterator

friend class ScHorizontalAttrIterator
friend

Definition at line 103 of file attarray.hxx.

Member Data Documentation

◆ mvData

std::vector<ScAttrEntry> ScAttrArray::mvData
private

◆ nCol

SCCOL ScAttrArray::nCol
private

◆ nTab

SCTAB ScAttrArray::nTab
private

◆ rDocument

ScDocument& ScAttrArray::rDocument
private

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