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