diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-04-23 20:49:05 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-04-24 08:12:31 +0200 |
commit | 6a22fc81e219667566b9cc3ed5e9de1898c1fe6b (patch) | |
tree | faf240652c3762ccda48357efb2717b59df6fcc6 /svx/source | |
parent | 951b6a9570ae2665f7b6e7cdd6d24d1fc513ba90 (diff) |
loplugin:unusedmethods
Change-Id: Ieec5099a8ce9fa3f07e36be244071efc1b101cf7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92803
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source')
-rw-r--r-- | svx/source/tbxctrls/PaletteManager.cxx | 51 | ||||
-rw-r--r-- | svx/source/tbxctrls/SvxColorValueSet.cxx | 28 |
2 files changed, 0 insertions, 79 deletions
diff --git a/svx/source/tbxctrls/PaletteManager.cxx b/svx/source/tbxctrls/PaletteManager.cxx index 322c1e3b1647..8a4f4e5b8efd 100644 --- a/svx/source/tbxctrls/PaletteManager.cxx +++ b/svx/source/tbxctrls/PaletteManager.cxx @@ -125,39 +125,6 @@ void PaletteManager::LoadPalettes() } } -void PaletteManager::ReloadColorSet(SvxColorValueSet &rColorSet) -{ - if( mnCurrentPalette == 0) - { - rColorSet.Clear(); - css::uno::Sequence< sal_Int32 > CustomColorList( officecfg::Office::Common::UserColors::CustomColor::get() ); - css::uno::Sequence< OUString > CustomColorNameList( officecfg::Office::Common::UserColors::CustomColorName::get() ); - int nIx = 1; - for (int i = 0; i < CustomColorList.getLength(); ++i) - { - Color aColor(CustomColorList[i]); - rColorSet.InsertItem(nIx, aColor, CustomColorNameList[i]); - ++nIx; - } - } - else if( mnCurrentPalette == mnNumOfPalettes - 1 ) - { - rColorSet.Clear(); - // Add doc colors to palette - SfxObjectShell* pDocSh = SfxObjectShell::Current(); - if (pDocSh) - { - std::set<Color> aColors = pDocSh->GetDocColors(); - mnColorCount = aColors.size(); - rColorSet.addEntriesForColorSet(aColors, SvxResId( RID_SVXSTR_DOC_COLOR_PREFIX ) + " " ); - } - } - else - { - m_Palettes[mnCurrentPalette - 1]->LoadColorSet( rColorSet ); - mnColorCount = rColorSet.GetItemCount(); - } -} void PaletteManager::ReloadColorSet(ColorValueSet &rColorSet) { @@ -193,24 +160,6 @@ void PaletteManager::ReloadColorSet(ColorValueSet &rColorSet) } } -void PaletteManager::ReloadRecentColorSet(SvxColorValueSet& rColorSet) -{ - maRecentColors.clear(); - rColorSet.Clear(); - css::uno::Sequence< sal_Int32 > Colorlist(officecfg::Office::Common::UserColors::RecentColor::get()); - css::uno::Sequence< OUString > ColorNamelist(officecfg::Office::Common::UserColors::RecentColorName::get()); - int nIx = 1; - const bool bHasColorNames = Colorlist.getLength() == ColorNamelist.getLength(); - for (int i = 0; i < Colorlist.getLength(); ++i) - { - Color aColor(Colorlist[i]); - OUString sColorName = bHasColorNames ? ColorNamelist[i] : ("#" + aColor.AsRGBHexString().toAsciiUpperCase()); - maRecentColors.emplace_back(aColor, sColorName); - rColorSet.InsertItem(nIx, aColor, sColorName); - ++nIx; - } -} - void PaletteManager::ReloadRecentColorSet(ColorValueSet& rColorSet) { maRecentColors.clear(); diff --git a/svx/source/tbxctrls/SvxColorValueSet.cxx b/svx/source/tbxctrls/SvxColorValueSet.cxx index 2c0ba7c73966..ffdbdab668eb 100644 --- a/svx/source/tbxctrls/SvxColorValueSet.cxx +++ b/svx/source/tbxctrls/SvxColorValueSet.cxx @@ -162,34 +162,6 @@ Size ColorValueSet::layoutAllVisible(sal_uInt32 nEntryCount) return CalcWindowSizePixel(aItemSize); } -Size SvxColorValueSet::layoutAllVisible(sal_uInt32 nEntryCount) -{ - if(!nEntryCount) - { - nEntryCount++; - } - - const sal_uInt32 nRowCount(ceil(double(nEntryCount)/getColumnCount())); - const Size aItemSize(getEntryEdgeLength() - 2, getEntryEdgeLength() - 2); - const WinBits aWinBits(GetStyle() & ~WB_VSCROLL); - - if(nRowCount > getMaxRowCount()) - { - SetStyle(aWinBits|WB_VSCROLL); - } - else - { - SetStyle(aWinBits); - } - - SetColCount(getColumnCount()); - SetLineCount(std::min(nRowCount, getMaxRowCount())); - SetItemWidth(aItemSize.Width()); - SetItemHeight(aItemSize.Height()); - - return CalcWindowSizePixel(aItemSize); -} - void SvxColorValueSet::Resize() { layoutToGivenHeight(GetSizePixel().Height(), GetItemCount()); |