31#include <document.hxx>
40 : pPattAttr(
std::move(
p))
83 std::vector< std::unique_ptr<ENTRY> >::const_iterator iter
85 [nRefHash] (
const std::unique_ptr<ENTRY>& rEntry) { return rEntry->nHash0 == nRefHash; } );
88 return *((*iter)->pPattAttr);
94 ENTRY *pCurrent =
new ENTRY( std::unique_ptr<ScPatternAttr>(pNewPatt) );
96 pCurrent->
nHash0 = nRefHash;
114 aBox.
SetLine( &aTop, SvxBoxItemLine::TOP );
115 aBox.
SetLine( &aLeft, SvxBoxItemLine::LEFT );
116 aBox.
SetLine( &aBottom, SvxBoxItemLine::BOTTOM );
117 aBox.
SetLine( &aRight, SvxBoxItemLine::RIGHT );
119 rItemSet.
Put( aBox );
136 if( rAttr.
nBack & 0x80 )
139 rItemSet.
Put( aHorJustify );
142 aEntries.push_back(std::unique_ptr<ENTRY>(pCurrent));
168 assert( nLotIndex > 0 && nLotIndex < 7 );
177 assert( nLotIndex < 8 );
186 SAL_WARN_IF( !pDoc->
ValidRow(nRow),
"sc.filter",
"*LotAttrCol::SetAttr(): ... and failed?!" );
188 std::vector<std::unique_ptr<ENTRY> >::reverse_iterator iterLast =
aEntries.rbegin();
192 if( ( (*iterLast)->nLastRow == nRow - 1 ) && ( &rAttr == (*iterLast)->pPattAttr ) )
193 (*iterLast)->nLastRow = nRow;
201 aEntries.push_back(std::unique_ptr<ENTRY>(pCurrent));
210 aEntries.push_back(std::unique_ptr<ENTRY>(pCurrent));
218 for (
const auto& rxEntry :
aEntries)
221 nTabNum, *(rxEntry->pPattAttr));
239 for( nColCnt = nColFirst ; nColCnt <= nColLast ; nColCnt++ )
247 pCols[ nColCnt ].
Apply(rContext, nColCnt, nTabNum);
std::unique_ptr< Color[]> pColTab
std::unique_ptr< SvxColorItem > ppColorItems[6]
const ScPatternAttr & GetPattAttr(const LotAttrWK3 &)
std::unique_ptr< SvxColorItem > pWhite
static void MakeHash(const LotAttrWK3 &rAttr, sal_uInt32 &rOut)
const Color & GetColor(const sal_uInt8 nLotIndex) const
LotAttrCache(LotusContext &rContext)
ScDocumentPool * pDocPool
const SvxColorItem & GetColorItem(const sal_uInt8 nLotIndex) const
std::vector< std::unique_ptr< ENTRY > > aEntries
static void LotusToScBorderLine(sal_uInt8 nLine, ::editeng::SvxBorderLine &)
void Apply(LotusContext &rContext, const SCCOL nCol, const SCTAB nTab)
std::vector< std::unique_ptr< ENTRY > > aEntries
void SetAttr(const ScDocument *pDoc, const SCROW nRow, const ScPatternAttr &)
void SetAttr(const LotusContext &rContext, const SCCOL nColFirst, const SCCOL nColLast, const SCROW nRow, const LotAttrWK3 &)
LotAttrCol pCols[MAXCOLCOUNT]
void Apply(LotusContext &rContext, const SCTAB nTabNum)
LotAttrTable(LotusContext &rContext)
void Fill(const sal_uInt8 nIndex, SfxItemSet &rItemSet)
bool ValidRow(SCROW nRow) const
SC_DLLPUBLIC SCCOL MaxCol() const
SC_DLLPUBLIC ScDocumentPool * GetPool()
SC_DLLPUBLIC void ApplyPatternAreaTab(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, const ScPatternAttr &rAttr)
SfxItemSet & GetItemSet()
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
static const sal_Int16 Thin
static const sal_Int16 Medium
void SetLine(const editeng::SvxBorderLine *pNew, SvxBoxItemLine nLine)
void SetWidth(tools::Long nWidth)
void SetBorderLineStyle(SvxBorderLineStyle nNew)
constexpr ::Color COL_LIGHTRED(0xFF, 0x00, 0x00)
constexpr ::Color COL_WHITE(0xFF, 0xFF, 0xFF)
constexpr ::Color COL_LIGHTCYAN(0x00, 0xFF, 0xFF)
constexpr ::Color COL_LIGHTMAGENTA(0xFF, 0x00, 0xFF)
constexpr ::Color COL_YELLOW(0xFF, 0xFF, 0x00)
constexpr ::Color COL_LIGHTBLUE(0x00, 0x00, 0xFF)
constexpr ::Color COL_LIGHTGREEN(0x00, 0xFF, 0x00)
constexpr ::Color COL_BLACK(0x00, 0x00, 0x00)
#define SAL_WARN_IF(condition, area, stream)
constexpr TypedWhichId< SvxColorItem > ATTR_FONT_COLOR(109)
constexpr TypedWhichId< SvxBrushItem > ATTR_BACKGROUND(148)
constexpr TypedWhichId< SvxHorJustifyItem > ATTR_HOR_JUSTIFY(129)
constexpr TypedWhichId< SvxBoxItem > ATTR_BORDER(150)
ENTRY(std::unique_ptr< ScPatternAttr > p)
const ScPatternAttr * pPattAttr
LotusFontBuffer maFontBuff