20#undef SC_DLLIMPLEMENTATION
27#include <officecfg/Office/Common.hxx>
30 const OUString& rTabBgColorNoColorText,
const Color& rDefaultColor)
31 : GenericDialogController(pParent,
"modules/scalc/ui/tabcolordialog.ui",
"TabColorDialog")
32 , m_aTabBgColor(rDefaultColor)
33 , m_xSelectPalette(m_xBuilder->weld_combo_box(
"paletteselector"))
34 , m_xTabBgColorSet(new
ScTabBgColorValueSet(m_xBuilder->weld_scrolled_window(
"colorsetwin", true)))
35 , m_xTabBgColorSetWin(new
weld::CustomWeld(*m_xBuilder,
"colorset", *m_xTabBgColorSet))
36 , m_xBtnOk(m_xBuilder->weld_button(
"ok"))
48 const sal_uInt32 nRowCount(10);
73 for (
auto const& palette : aPaletteList)
77 OUString aPaletteName( officecfg::Office::Common::UserColors::PaletteName::get() );
87 m_xTabBgColorSet->Clear();
88 sal_Int32
nPos = m_xSelectPalette->get_active();
89 m_aPaletteManager.SetPalette(
nPos );
90 m_aPaletteManager.ReloadColorSet(*m_xTabBgColorSet);
91 m_xTabBgColorSet->Resize();
92 m_xTabBgColorSet->SelectItem(0);
98 sal_uInt16 nItemId = m_xTabBgColorSet->GetSelectedItemId();
99 Color aColor = nItemId ? ( m_xTabBgColorSet->GetItemColor( nItemId ) ) :
COL_AUTO;
100 m_aTabBgColor = aColor;
107 sal_uInt16 nItemId = m_xTabBgColorSet->GetSelectedItemId();
108 Color aColor = nItemId ? ( m_xTabBgColorSet->GetItemColor( nItemId ) ) :
COL_AUTO;
109 m_aTabBgColor = aColor;
115 , m_pTabBgColorDlg(nullptr)
130 sal_uInt16 nItemId = GetSelectedItemId();
131 const Color& aColor = nItemId ? ( GetItemColor( nItemId ) ) :
COL_AUTO;
132 m_pTabBgColorDlg->m_aTabBgColor = aColor;
133 m_pTabBgColorDlg->response(
RET_OK);
138 return SvxColorValueSet::KeyInput(rKEvt);
Reference< XExecutableDialog > m_xDialog
const vcl::KeyCode & GetKeyCode() const
std::vector< OUString > GetPaletteList()
virtual bool KeyInput(const KeyEvent &rKEvt) override
ScTabBgColorValueSet(std::unique_ptr< weld::ScrolledWindow > pWindow)
virtual ~ScTabBgColorValueSet() override
std::unique_ptr< weld::ComboBox > m_xSelectPalette
PaletteManager m_aPaletteManager
std::unique_ptr< weld::Button > m_xBtnOk
std::unique_ptr< weld::CustomWeld > m_xTabBgColorSetWin
void GetSelectedColor(Color &rColor) const
virtual ~ScTabBgColorDlg() override
std::unique_ptr< ScTabBgColorValueSet > m_xTabBgColorSet
ScTabBgColorDlg(weld::Window *pParent, const OUString &rTitle, const OUString &rTabBgColorNoColorText, const Color &rDefaultColor)
constexpr tools::Long Height() const
constexpr tools::Long Width() const
static sal_uInt32 getColumnCount()
static sal_uInt32 getEntryEdgeLength()
sal_uInt16 GetCode() const
std::shared_ptr< weld::Dialog > m_xDialog
constexpr ::Color COL_AUTO(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
constexpr sal_uInt16 KEY_RETURN
constexpr sal_uInt16 KEY_SPACE
#define LINK(Instance, Class, Member)
IMPL_LINK_NOARG(ScTabBgColorDlg, SelectPaletteLBHdl, weld::ComboBox &, void)
#define WB_NO_DIRECTSELECT