24#include <osl/diagnose.h>
55 const sal_uInt32 nColorCount(rXColorList.
Count());
67 OSL_ENSURE(
false,
"OOps, XColorList with empty entries (!)");
74 sal_uInt32 nStartIndex = 1;
75 if(rNamePrefix.size() != 0)
77 for(
const auto& rColor : rColorSet)
79 InsertItem(nStartIndex, rColor, rNamePrefix + OUString::number(nStartIndex));
85 for(
const auto& rColor : rColorSet)
148 const sal_uInt32 nFieldHeight(aNewSize.
Height() - aSizeNoScrollNoFields.
Height());
149 const sal_uInt32 nAvailableHeight(nHeight >= nFieldHeight ? nHeight - nFieldHeight + aItemSizePixel.
Height() - 1 : 0);
152 const sal_uInt32 nLineCount(nAvailableHeight / aItemSizePixel.
Height());
155 if(nLineMax > nLineCount)
const StyleSettings & GetStyleSettings() const
static const AllSettings & GetSettings()
constexpr tools::Long Height() const
constexpr tools::Long Width() const
const Size & GetListBoxPreviewDefaultPixelSize() const
sal_uInt16 GetColorValueSetColumnCount() const
static std::unique_ptr< UIObject > create(vcl::Window *pWindow)
virtual FactoryFunction GetUITestFactory() const override
SvxColorValueSet(std::unique_ptr< weld::ScrolledWindow > pWindow)
virtual void Resize() override
Size layoutAllVisible(sal_uInt32 nEntryCount)
static sal_uInt32 getColumnCount()
static sal_uInt32 getEntryEdgeLength()
void addEntriesForColorSet(const std::set< Color > &rColorSet, std::u16string_view rNamePrefix)
void addEntriesForXColorList(const XColorList &rXColorList, sal_uInt32 nStartIndex=1)
void layoutToGivenHeight(sal_uInt32 nHeight, sal_uInt32 nEntryCount)
static constexpr sal_uInt32 getMaxRowCount()
void InsertItem(sal_uInt16 nItemId, const Image &rImage)
size_t GetItemCount() const
void SetEdgeBlending(bool bNew)
void SetStyle(WinBits nStyle)
Size CalcWindowSizePixel(const Size &rItemSize, sal_uInt16 nCalcCols=0, sal_uInt16 nCalcLines=0) const
Size CalcItemSizePixel(const Size &rSize) const
void SetLineCount(sal_uInt16 nNewLines=0)
void SetColCount(sal_uInt16 nNewCols=1)
virtual void Resize() override
void SetItemHeight(tools::Long nLineHeight)
void SetItemWidth(tools::Long nItemWidth)
const Color & GetColor() const
XColorEntry * GetColor(tools::Long nIndex) const
const OUString & GetName() const
tools::Long Count() const
std::function< std::unique_ptr< UIObject >(vcl::Window *)> FactoryFunction