LibreOffice Module svx (master)
1
|
#include <PaletteManager.hxx>
Public Member Functions | |
PaletteManager () | |
~PaletteManager () | |
PaletteManager (const PaletteManager &)=delete | |
PaletteManager & | operator= (const PaletteManager &)=delete |
void | LoadPalettes () |
void | ReloadColorSet (SvxColorValueSet &rColorSet) |
void | ReloadRecentColorSet (SvxColorValueSet &rColorSet) |
std::vector< OUString > | GetPaletteList () |
void | SetPalette (sal_Int32 nPos) |
sal_Int32 | GetPalette () const |
sal_Int32 | GetPaletteCount () const |
OUString | GetPaletteName () |
OUString | GetSelectedPalettePath () |
tools::Long | GetColorCount () const |
tools::Long | GetRecentColorCount () const |
void | AddRecentColor (const Color &rRecentColor, const OUString &rColorName, bool bFront=true) |
void | SetBtnUpdater (svx::ToolboxButtonColorUpdaterBase *pBtnUpdater) |
void | PopupColorPicker (weld::Window *pParent, const OUString &aCommand, const Color &rInitialColor) |
void | SetColorSelectFunction (const ColorSelectFunction &aColorSelectFunction) |
bool | IsThemePaletteSelected () const |
Static Public Member Functions | |
static void | GetThemeIndexLumModOff (sal_uInt16 nItemId, sal_Int16 &rThemeIndex, sal_Int16 &rLumMod, sal_Int16 &rLumOff) |
static void | DispatchColorCommand (const OUString &aCommand, const svx::NamedThemedColor &rColor) |
Private Attributes | |
const sal_uInt16 | mnMaxRecentColors |
sal_uInt16 | mnNumOfPalettes |
sal_uInt16 | mnCurrentPalette |
tools::Long | mnColorCount |
svx::ToolboxButtonColorUpdaterBase * | mpBtnUpdater |
XColorListRef | pColorList |
std::deque< NamedColor > | maRecentColors |
std::vector< std::unique_ptr< Palette > > | m_Palettes |
ColorSelectFunction | maColorSelectFunction |
std::unique_ptr< SvColorDialog > | m_pColorDlg |
Definition at line 35 of file PaletteManager.hxx.
PaletteManager::PaletteManager | ( | ) |
Definition at line 58 of file PaletteManager.cxx.
References XColorList::CreateStdColorList(), SfxObjectShell::Current(), SfxShell::GetItem(), LoadPalettes(), m_Palettes, mnNumOfPalettes, and pColorList.
PaletteManager::~PaletteManager | ( | ) |
Definition at line 80 of file PaletteManager.cxx.
|
delete |
void PaletteManager::AddRecentColor | ( | const Color & | rRecentColor, |
const OUString & | rColorName, | ||
bool | bFront = true |
||
) |
Definition at line 341 of file PaletteManager.cxx.
References a, comphelper::ConfigurationChanges::create(), i, maRecentColors, and mnMaxRecentColors.
Referenced by PopupColorPicker().
|
static |
Definition at line 402 of file PaletteManager.cxx.
References aTargetURL, comphelper::containerToSequence(), comphelper::getProcessComponentContext(), INetURLObject::GetURLPath(), svx::NamedThemedColor::m_aColor, svx::NamedThemedColor::m_nLumMod, svx::NamedThemedColor::m_nLumOff, svx::NamedThemedColor::m_nThemeIndex, comphelper::makePropertyValue(), URL, xDispatch, and xFrame.
tools::Long PaletteManager::GetColorCount | ( | ) | const |
Definition at line 331 of file PaletteManager.cxx.
References mnColorCount.
sal_Int32 PaletteManager::GetPalette | ( | ) | const |
Definition at line 302 of file PaletteManager.cxx.
References mnCurrentPalette.
|
inline |
Definition at line 63 of file PaletteManager.hxx.
std::vector< OUString > PaletteManager::GetPaletteList | ( | ) |
Definition at line 257 of file PaletteManager.cxx.
References m_Palettes, and SvxResId().
Referenced by GetPaletteName().
OUString PaletteManager::GetPaletteName | ( | ) |
Definition at line 307 of file PaletteManager.cxx.
References SfxObjectShell::Current(), SfxShell::GetItem(), GetPaletteList(), mnCurrentPalette, mnNumOfPalettes, and pColorList.
Referenced by SetPalette().
tools::Long PaletteManager::GetRecentColorCount | ( | ) | const |
Definition at line 336 of file PaletteManager.cxx.
References maRecentColors.
OUString PaletteManager::GetSelectedPalettePath | ( | ) |
Definition at line 323 of file PaletteManager.cxx.
References GetPath(), m_Palettes, and mnCurrentPalette.
Referenced by SetPalette().
|
static |
Definition at line 145 of file PaletteManager.cxx.
Referenced by IMPL_LINK().
bool PaletteManager::IsThemePaletteSelected | ( | ) | const |
Definition at line 140 of file PaletteManager.cxx.
References mnCurrentPalette, and mnNumOfPalettes.
Referenced by ReloadColorSet().
void PaletteManager::LoadPalettes | ( | ) |
Definition at line 84 of file PaletteManager.cxx.
References INetURLObject::GetBase(), SvtPathOptions::GetPalettePath(), m_Palettes, and nIndex.
Referenced by PaletteManager().
|
delete |
void PaletteManager::PopupColorPicker | ( | weld::Window * | pParent, |
const OUString & | aCommand, | ||
const Color & | rInitialColor | ||
) |
Definition at line 381 of file PaletteManager.cxx.
References AddRecentColor(), Color::AsRGBHexString(), svx::NamedThemedColor::FromNamedColor(), m_pColorDlg, maColorSelectFunction, svtools::Modify, mpBtnUpdater, RET_OK, and svx::ToolboxButtonColorUpdaterBase::Update().
void PaletteManager::ReloadColorSet | ( | SvxColorValueSet & | rColorSet | ) |
Definition at line 156 of file PaletteManager.cxx.
References SvxColorValueSet::addEntriesForColorSet(), Color::ApplyLumModOff(), ValueSet::Clear(), ColorTransparency, SfxObjectShell::Current(), SfxObjectShell::GetDocColors(), ValueSet::GetItemCount(), SfxObjectShell::GetThemeColors(), i, ValueSet::InsertItem(), IsThemePaletteSelected(), m_Palettes, mnColorCount, mnCurrentPalette, mnNumOfPalettes, and SvxResId().
void PaletteManager::ReloadRecentColorSet | ( | SvxColorValueSet & | rColorSet | ) |
Definition at line 239 of file PaletteManager.cxx.
References Color::AsRGBHexString(), ValueSet::Clear(), ColorTransparency, i, ValueSet::InsertItem(), and maRecentColors.
void PaletteManager::SetBtnUpdater | ( | svx::ToolboxButtonColorUpdaterBase * | pBtnUpdater | ) |
Definition at line 371 of file PaletteManager.cxx.
References mpBtnUpdater.
void PaletteManager::SetColorSelectFunction | ( | const ColorSelectFunction & | aColorSelectFunction | ) |
Definition at line 376 of file PaletteManager.cxx.
References maColorSelectFunction.
void PaletteManager::SetPalette | ( | sal_Int32 | nPos | ) |
Definition at line 273 of file PaletteManager.cxx.
References XPropertyList::AsColorList(), Color, comphelper::ConfigurationChanges::create(), XPropertyList::CreatePropertyListFromURL(), SfxObjectShell::Current(), GetPaletteName(), GetSelectedPalettePath(), mnCurrentPalette, mnNumOfPalettes, name, pColorList, and SfxShell::PutItem().
|
private |
Definition at line 47 of file PaletteManager.hxx.
Referenced by GetPaletteList(), GetSelectedPalettePath(), LoadPalettes(), PaletteManager(), and ReloadColorSet().
|
private |
Definition at line 51 of file PaletteManager.hxx.
Referenced by PopupColorPicker().
|
private |
Definition at line 49 of file PaletteManager.hxx.
Referenced by PopupColorPicker(), and SetColorSelectFunction().
|
private |
Definition at line 46 of file PaletteManager.hxx.
Referenced by AddRecentColor(), GetRecentColorCount(), and ReloadRecentColorSet().
|
private |
Definition at line 42 of file PaletteManager.hxx.
Referenced by GetColorCount(), and ReloadColorSet().
|
private |
Definition at line 40 of file PaletteManager.hxx.
Referenced by GetPalette(), GetPaletteName(), GetSelectedPalettePath(), IsThemePaletteSelected(), ReloadColorSet(), and SetPalette().
|
private |
Definition at line 37 of file PaletteManager.hxx.
Referenced by AddRecentColor().
|
private |
Definition at line 39 of file PaletteManager.hxx.
Referenced by GetPaletteName(), IsThemePaletteSelected(), PaletteManager(), ReloadColorSet(), and SetPalette().
|
private |
Definition at line 43 of file PaletteManager.hxx.
Referenced by PopupColorPicker(), and SetBtnUpdater().
|
private |
Definition at line 45 of file PaletteManager.hxx.
Referenced by GetPaletteName(), PaletteManager(), and SetPalette().