summaryrefslogtreecommitdiffstats
path: root/cui
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-11-05 20:28:27 +0000
committerCaolán McNamara <caolanm@redhat.com>2016-11-07 21:04:50 +0000
commit64a708cba9b954afe3331f63c58218eb53b3d0ce (patch)
treeddc1bea3b63f32a1c6d377c1d1dd7aee0803fb70 /cui
parentstyle fix for cppcheck duplicateBreak (diff)
downloadcore-64a708cba9b954afe3331f63c58218eb53b3d0ce.tar.gz
core-64a708cba9b954afe3331f63c58218eb53b3d0ce.zip
Revert "Reverts a commit series that cripple windows ci."
with addition of... - svxlo-SvxColorListBox + svxcorelo-SvxColorListBox This reverts commit db380aab1063e8a5e40111c40ee9f7921aa82601. Change-Id: I3af7aa0abb1a430bce64188244404fcbd480b128 Reviewed-on: https://gerrit.libreoffice.org/30598 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'cui')
-rw-r--r--cui/source/inc/border.hxx7
-rw-r--r--cui/source/inc/chardlg.hxx11
-rw-r--r--cui/source/inc/cuires.hrc1
-rw-r--r--cui/source/inc/cuitabarea.hxx24
-rw-r--r--cui/source/inc/cuitabline.hxx5
-rw-r--r--cui/source/inc/numpages.hxx6
-rw-r--r--cui/source/options/optchart.cxx107
-rw-r--r--cui/source/options/optchart.hxx15
-rw-r--r--cui/source/options/optcolor.cxx93
-rw-r--r--cui/source/tabpages/backgrnd.cxx2
-rw-r--r--cui/source/tabpages/border.cxx58
-rw-r--r--cui/source/tabpages/borderconn.cxx13
-rw-r--r--cui/source/tabpages/borderconn.hxx4
-rw-r--r--cui/source/tabpages/chardlg.cxx166
-rw-r--r--cui/source/tabpages/numpages.cxx32
-rw-r--r--cui/source/tabpages/strings.src4
-rw-r--r--cui/source/tabpages/tabarea.cxx1
-rw-r--r--cui/source/tabpages/tabline.cxx1
-rw-r--r--cui/source/tabpages/tpgradnt.cxx56
-rw-r--r--cui/source/tabpages/tphatch.cxx55
-rw-r--r--cui/source/tabpages/tpline.cxx30
-rw-r--r--cui/source/tabpages/tppattern.cxx58
-rw-r--r--cui/source/tabpages/tpshadow.cxx36
-rw-r--r--cui/uiconfig/ui/borderpage.ui4
-rw-r--r--cui/uiconfig/ui/colorconfigwin.ui92
-rw-r--r--cui/uiconfig/ui/effectspage.ui6
-rw-r--r--cui/uiconfig/ui/gradientpage.ui4
-rw-r--r--cui/uiconfig/ui/hatchpage.ui4
-rw-r--r--cui/uiconfig/ui/linetabpage.ui2
-rw-r--r--cui/uiconfig/ui/numberingoptionspage.ui2
-rw-r--r--cui/uiconfig/ui/optchartcolorspage.ui3
-rw-r--r--cui/uiconfig/ui/patterntabpage.ui4
-rw-r--r--cui/uiconfig/ui/shadowtabpage.ui2
33 files changed, 308 insertions, 600 deletions
diff --git a/cui/source/inc/border.hxx b/cui/source/inc/border.hxx
index 9675b1029a94..915debae2dfc 100644
--- a/cui/source/inc/border.hxx
+++ b/cui/source/inc/border.hxx
@@ -25,6 +25,7 @@
#include <vcl/fixed.hxx>
#include <svtools/valueset.hxx>
#include <sfx2/tabdlg.hxx>
+#include <svx/colorbox.hxx>
#include <svx/frmsel.hxx>
#include <svx/flagsdef.hxx>
@@ -72,7 +73,7 @@ private:
VclPtr<svx::FrameSelector> m_pFrameSel;
VclPtr<LineListBox> m_pLbLineStyle;
- VclPtr<ColorListBox> m_pLbLineColor;
+ VclPtr<SvxColorListBox> m_pLbLineColor;
VclPtr<MetricField> m_pLineWidthMF;
VclPtr<VclContainer> m_pSpacingFrame;
@@ -91,7 +92,7 @@ private:
VclPtr<FixedText> m_pFtShadowSize;
VclPtr<MetricField> m_pEdShadowSize;
VclPtr<FixedText> m_pFtShadowColor;
- VclPtr<ColorListBox> m_pLbShadowColor;
+ VclPtr<SvxColorListBox> m_pLbShadowColor;
VclPtr<VclContainer> m_pPropertiesFrame;///< properties - "Merge with next paragraph" in Writer
@@ -120,7 +121,7 @@ private:
// Handler
DECL_LINK( SelStyleHdl_Impl, ListBox&, void );
- DECL_LINK( SelColHdl_Impl, ListBox&, void );
+ DECL_LINK( SelColHdl_Impl, SvxColorListBox&, void );
DECL_LINK( SelPreHdl_Impl, ValueSet*, void );
DECL_LINK( SelSdwHdl_Impl, ValueSet*, void );
DECL_LINK( LinesChanged_Impl, LinkParamNone*, void );
diff --git a/cui/source/inc/chardlg.hxx b/cui/source/inc/chardlg.hxx
index bea73e4f253e..484897d93afe 100644
--- a/cui/source/inc/chardlg.hxx
+++ b/cui/source/inc/chardlg.hxx
@@ -23,6 +23,7 @@
#include <sfx2/tabdlg.hxx>
#include <svx/fntctrl.hxx>
#include <svx/checklbx.hxx>
+#include <svx/colorbox.hxx>
#include <svx/langbox.hxx>
#include <vcl/layout.hxx>
#include <memory>
@@ -175,7 +176,7 @@ class SvxCharEffectsPage : public SvxCharBasePage
private:
static const sal_uInt16 pEffectsRanges[];
VclPtr<FixedText> m_pFontColorFT;
- VclPtr<ColorListBox> m_pFontColorLB;
+ VclPtr<SvxColorListBox> m_pFontColorLB;
VclPtr<FixedText> m_pEffectsFT;
VclPtr<ListBox> m_pEffectsLB;
@@ -190,13 +191,13 @@ private:
VclPtr<ListBox> m_pOverlineLB;
VclPtr<FixedText> m_pOverlineColorFT;
- VclPtr<ColorListBox> m_pOverlineColorLB;
+ VclPtr<SvxColorListBox> m_pOverlineColorLB;
VclPtr<ListBox> m_pStrikeoutLB;
VclPtr<ListBox> m_pUnderlineLB;
VclPtr<FixedText> m_pUnderlineColorFT;
- VclPtr<ColorListBox> m_pUnderlineColorLB;
+ VclPtr<SvxColorListBox> m_pUnderlineColorLB;
VclPtr<CheckBox> m_pIndividualWordsBtn;
@@ -210,8 +211,6 @@ private:
sal_uInt16 m_nHtmlMode;
- OUString m_aTransparentColorName;
-
SvxCharEffectsPage( vcl::Window* pParent, const SfxItemSet& rSet );
void Initialize();
@@ -225,7 +224,7 @@ private:
DECL_LINK(CbClickHdl_Impl, Button*, void);
DECL_LINK(TristClickHdl_Impl, Button*, void);
DECL_LINK(UpdatePreview_Impl, ListBox&, void);
- DECL_LINK(ColorBoxSelectHdl_Impl, ListBox&, void);
+ DECL_LINK(ColorBoxSelectHdl_Impl, SvxColorListBox&, void);
public:
virtual ~SvxCharEffectsPage() override;
diff --git a/cui/source/inc/cuires.hrc b/cui/source/inc/cuires.hrc
index 0f57cf68ef32..33f5ea39e1a1 100644
--- a/cui/source/inc/cuires.hrc
+++ b/cui/source/inc/cuires.hrc
@@ -85,7 +85,6 @@
#define RID_SVXSTR_CONNECTOR (RID_SVX_START + 221)
#define RID_SVXSTR_DIMENSION_LINE (RID_SVX_START + 222)
-#define RID_SVXSTR_CHARNAME_TRANSPARENT (RID_SVX_START + 237)
#define RID_SVXSTR_DESC_LINEEND (RID_SVX_START + 238)
#define RID_SVXSTR_CHARNAME_NOSTYLE (RID_SVX_START + 239)
#define RID_SVXSTR_CHARNAME_FAMILY (RID_SVX_START + 240)
diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx
index 52d4fce87273..362777aa0e02 100644
--- a/cui/source/inc/cuitabarea.hxx
+++ b/cui/source/inc/cuitabarea.hxx
@@ -39,6 +39,7 @@
class SdrModel;
class SvxBitmapCtl;
+class SvxColorListBox;
/************************************************************************/
class ButtonBox
@@ -321,7 +322,7 @@ private:
VclPtr<VclGrid> m_pGridShadow;
VclPtr<SvxRectCtl> m_pCtlPosition;
VclPtr<MetricField> m_pMtrDistance;
- VclPtr<ColorLB> m_pLbShadowColor;
+ VclPtr<SvxColorListBox> m_pLbShadowColor;
VclPtr<MetricField> m_pMtrTransparent;
VclPtr<SvxXShadowPreview> m_pCtlXRectPreview;
@@ -340,14 +341,13 @@ private:
DECL_LINK( ClickShadowHdl_Impl, Button*, void );
DECL_LINK( ModifyShadowHdl_Impl, Edit&, void );
- DECL_LINK( SelectShadowHdl_Impl, ListBox&, void );
+ DECL_LINK( SelectShadowHdl_Impl, SvxColorListBox&, void );
public:
SvxShadowTabPage( vcl::Window* pParent, const SfxItemSet& rInAttrs );
virtual ~SvxShadowTabPage() override;
virtual void dispose() override;
- void Construct();
static VclPtr<SfxTabPage> Create( vcl::Window*, const SfxItemSet* );
static const sal_uInt16* GetRanges() { return pShadowRanges; }
@@ -381,9 +381,9 @@ private:
VclPtr<MetricField> m_pMtrAngle;
VclPtr<MetricField> m_pMtrBorder;
VclPtr<Slider> m_pSliderBorder;
- VclPtr<ColorLB> m_pLbColorFrom;
+ VclPtr<SvxColorListBox> m_pLbColorFrom;
VclPtr<MetricField> m_pMtrColorFrom;
- VclPtr<ColorLB> m_pLbColorTo;
+ VclPtr<SvxColorListBox> m_pLbColorTo;
VclPtr<MetricField> m_pMtrColorTo;
VclPtr<SvxPresetListBox> m_pGradientLB;
VclPtr<NumericField> m_pMtrIncrement;
@@ -413,6 +413,7 @@ private:
DECL_LINK( ClickRenameHdl_Impl, SvxPresetListBox*, void );
DECL_LINK( ClickDeleteHdl_Impl, SvxPresetListBox*, void );
DECL_LINK( ModifiedEditHdl_Impl, Edit&, void );
+ DECL_LINK( ModifiedColorListBoxHdl_Impl, SvxColorListBox&, void );
DECL_LINK( ModifiedListBoxHdl_Impl, ListBox&, void );
DECL_LINK( ChangeAutoStepHdl_Impl, CheckBox&, void );
DECL_LINK( ModifiedSliderHdl_Impl, Slider*, void );
@@ -455,9 +456,9 @@ private:
VclPtr<MetricField> m_pMtrAngle;
VclPtr<Slider> m_pSliderAngle;
VclPtr<ListBox> m_pLbLineType;
- VclPtr<ColorLB> m_pLbLineColor;
+ VclPtr<SvxColorListBox> m_pLbLineColor;
VclPtr<CheckBox> m_pCbBackgroundColor;
- VclPtr<ColorLB> m_pLbBackgroundColor;
+ VclPtr<SvxColorListBox> m_pLbBackgroundColor;
VclPtr<SvxPresetListBox> m_pHatchLB;
VclPtr<SvxXRectPreview> m_pCtlPreview;
VclPtr<PushButton> m_pBtnAdd;
@@ -483,8 +484,9 @@ private:
void ChangeHatchHdl_Impl();
DECL_LINK( ModifiedEditHdl_Impl, Edit&, void );
DECL_LINK( ModifiedListBoxHdl_Impl, ListBox&, void );
+ DECL_LINK( ModifiedColorListBoxHdl_Impl, SvxColorListBox&, void );
DECL_LINK( ToggleHatchBackgroundColor_Impl, CheckBox&, void );
- DECL_LINK( ModifiedBackgroundHdl_Impl, ListBox&, void );
+ DECL_LINK( ModifiedBackgroundHdl_Impl, SvxColorListBox&, void );
DECL_LINK( ModifiedSliderHdl_Impl, Slider*, void );
void ModifiedHdl_Impl(void*);
DECL_LINK( ClickAddHdl_Impl, Button*, void );
@@ -613,8 +615,8 @@ class SvxPatternTabPage : public SvxTabPage
private:
VclPtr<VclBox> m_pBxPixelEditor;
VclPtr<SvxPixelCtl> m_pCtlPixel;
- VclPtr<ColorLB> m_pLbColor;
- VclPtr<ColorLB> m_pLbBackgroundColor;
+ VclPtr<SvxColorListBox> m_pLbColor;
+ VclPtr<SvxColorListBox> m_pLbBackgroundColor;
VclPtr<SvxPresetListBox> m_pPatternLB;
VclPtr<SvxXRectPreview> m_pCtlPreview;
VclPtr<PushButton> m_pBtnAdd;
@@ -642,7 +644,7 @@ private:
DECL_LINK( ClickAddHdl_Impl, Button*, void );
DECL_LINK( ClickModifyHdl_Impl, Button*, void );
DECL_LINK( ChangePatternHdl_Impl, ValueSet*, void );
- DECL_LINK( ChangeColorHdl_Impl, ListBox&, void );
+ DECL_LINK( ChangeColorHdl_Impl, SvxColorListBox&, void );
DECL_LINK( ClickRenameHdl_Impl, SvxPresetListBox*, void );
DECL_LINK( ClickDeleteHdl_Impl, SvxPresetListBox*, void );
diff --git a/cui/source/inc/cuitabline.hxx b/cui/source/inc/cuitabline.hxx
index 957b421ecd2f..39e7498e5fdb 100644
--- a/cui/source/inc/cuitabline.hxx
+++ b/cui/source/inc/cuitabline.hxx
@@ -25,6 +25,7 @@
#include <svx/tabarea.hxx>
enum class PageType;
+class SvxColorListBox;
class SvxLineTabDialog : public SfxTabDialog
{
@@ -92,7 +93,7 @@ class SvxLineTabPage : public SvxTabPage
private:
VclPtr<VclBox> m_pBoxColor;
VclPtr<LineLB> m_pLbLineStyle;
- VclPtr<ColorLB> m_pLbColor;
+ VclPtr<SvxColorListBox> m_pLbColor;
VclPtr<VclBox> m_pBoxWidth;
VclPtr<MetricField> m_pMtrLineWidth;
VclPtr<VclBox> m_pBoxTransparency;
@@ -182,7 +183,7 @@ private:
DECL_LINK( ChangeEndModifyHdl_Impl, Edit&, void );
DECL_LINK( ChangeEndClickHdl_Impl, Button*, void );
void ChangeEndHdl_Impl(void*);
- DECL_LINK( ChangePreviewListBoxHdl_Impl, ListBox&, void );
+ DECL_LINK( ChangePreviewListBoxHdl_Impl, SvxColorListBox&, void );
DECL_LINK( ChangePreviewModifyHdl_Impl, Edit&, void );
void ChangePreviewHdl_Impl(void*);
DECL_LINK( ChangeTransparentHdl_Impl, Edit&, void );
diff --git a/cui/source/inc/numpages.hxx b/cui/source/inc/numpages.hxx
index 7f65cbf65511..afaaf1e61ba1 100644
--- a/cui/source/inc/numpages.hxx
+++ b/cui/source/inc/numpages.hxx
@@ -23,6 +23,7 @@
#include <memory>
#include <sfx2/tabdlg.hxx>
+#include <svx/Palette.hxx>
#include <vcl/group.hxx>
#include <vcl/fixed.hxx>
#include <vcl/menubtn.hxx>
@@ -33,6 +34,7 @@
#include <svtools/ctrlbox.hxx>
#include <vcl/dialog.hxx>
+class SvxColorListBox;
class SvxNumRule;
class SvxBmpNumValueSet;
class SvxNumValueSet;
@@ -254,7 +256,7 @@ class SvxNumOptionsTabPage : public SfxTabPage
VclPtr<FixedText> m_pCharFmtFT;
VclPtr<ListBox> m_pCharFmtLB;
VclPtr<FixedText> m_pBulColorFT;
- VclPtr<ColorListBox> m_pBulColLB;
+ VclPtr<SvxColorListBox> m_pBulColLB;
VclPtr<FixedText> m_pBulRelSizeFT;
VclPtr<MetricField> m_pBulRelSizeMF;
VclPtr<FixedText> m_pAllLevelFT;
@@ -327,7 +329,7 @@ class SvxNumOptionsTabPage : public SfxTabPage
DECL_LINK( AllLevelHdl_Impl, Edit&, void );
DECL_LINK( OrientHdl_Impl, ListBox&, void );
DECL_LINK( SameLevelHdl_Impl, Button*, void );
- DECL_LINK( BulColorHdl_Impl, ListBox&, void );
+ DECL_LINK( BulColorHdl_Impl, SvxColorListBox&, void );
DECL_LINK( BulRelSizeHdl_Impl, Edit&, void);
DECL_LINK( PreviewInvalidateHdl_Impl, Timer *, void);
void EditModifyHdl_Impl(Edit*);
diff --git a/cui/source/options/optchart.cxx b/cui/source/options/optchart.cxx
index 3d95da759c74..060d3b0b6587 100644
--- a/cui/source/options/optchart.cxx
+++ b/cui/source/options/optchart.cxx
@@ -21,24 +21,99 @@
#include <cuires.hrc>
#include "optchart.hxx"
#include <dialmgr.hxx>
+#include <vcl/builderfactory.hxx>
#include <vcl/msgbox.hxx>
+#include <vcl/svapp.hxx>
#include <svx/svxids.hrc>
-namespace
+Color SvxDefaultColorOptPage::GetSelectEntryColor() const
{
- void FillBoxChartColorLB(ColorLB *pLB, const SvxChartColorTable & rTab)
+ sal_Int32 nPos = m_pLbChartColors->GetSelectEntryPos();
+ Color aColor;
+ if (nPos != LISTBOX_ENTRY_NOTFOUND)
+ aColor = GetEntryColor(nPos);
+ return aColor;
+}
+
+void SvxDefaultColorOptPage::InsertColorEntry(const XColorEntry& rEntry, sal_Int32 nPos)
+{
+ const Color& rColor = rEntry.GetColor();
+ const OUString& rStr = rEntry.GetName();
+
+ const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
+ Size aImageSize = rStyleSettings.GetListBoxPreviewDefaultPixelSize();
+
+ VclPtr<VirtualDevice> xDevice = VclPtr<VirtualDevice>::Create();
+ xDevice->SetOutputSize(aImageSize);
+ const Rectangle aRect(Point(0, 0), aImageSize);
+ xDevice->SetFillColor(rColor);
+ xDevice->SetLineColor(rStyleSettings.GetDisableColor());
+ xDevice->DrawRect(aRect);
+ Bitmap aBitmap(xDevice->GetBitmap(Point(0, 0), xDevice->GetOutputSize()));
+
+ nPos = m_pLbChartColors->InsertEntry(rStr, Image(aBitmap), nPos);
+
+ if (nPos != LISTBOX_ERROR)
{
- pLB->SetUpdateMode(false);
- pLB->Clear();
- long nCount = rTab.size();
- for(long i = 0; i < nCount; ++i)
+ if ( static_cast<size_t>(nPos) < aColorList.size() )
{
- pLB->Append(rTab[i]);
+ ImpColorList::iterator it = aColorList.begin();
+ ::std::advance( it, nPos );
+ aColorList.insert( it, rColor );
+ }
+ else
+ {
+ aColorList.push_back( rColor );
+ nPos = aColorList.size() - 1;
}
- pLB->SetUpdateMode(true);
}
}
+void SvxDefaultColorOptPage::RemoveColorEntry(sal_Int32 nPos)
+{
+ m_pLbChartColors->RemoveEntry(nPos);
+ if ( 0 <= nPos && static_cast<size_t>(nPos) < aColorList.size() )
+ {
+ ImpColorList::iterator it = aColorList.begin();
+ std::advance(it, nPos);
+ aColorList.erase(it);
+ }
+}
+
+void SvxDefaultColorOptPage::ClearColorEntries()
+{
+ aColorList.clear();
+ m_pLbChartColors->Clear();
+}
+
+Color SvxDefaultColorOptPage::GetEntryColor(sal_Int32 nPos) const
+{
+ Color aColor;
+ if (0 <= nPos && static_cast<size_t>(nPos) < aColorList.size())
+ aColor = aColorList[nPos];
+ return aColor;
+}
+
+void SvxDefaultColorOptPage::ModifyColorEntry(const XColorEntry& rEntry, sal_Int32 nPos)
+{
+ RemoveColorEntry(nPos);
+ InsertColorEntry(rEntry, nPos);
+}
+
+void SvxDefaultColorOptPage::FillBoxChartColorLB()
+{
+ if (!pColorConfig)
+ return;
+
+ const SvxChartColorTable & rTab = pColorConfig->GetColorList();
+ m_pLbChartColors->SetUpdateMode(false);
+ ClearColorEntries();
+ long nCount = rTab.size();
+ for (long i = 0; i < nCount; ++i)
+ InsertColorEntry(rTab[i]);
+ m_pLbChartColors->SetUpdateMode(true);
+}
+
SvxDefaultColorOptPage::SvxDefaultColorOptPage(vcl::Window* pParent, const SfxItemSet& rInAttrs)
: SfxTabPage(pParent, "OptChartColorsPage","cui/ui/optchartcolorspage.ui", &rInAttrs)
{
@@ -109,9 +184,7 @@ void SvxDefaultColorOptPage::dispose()
void SvxDefaultColorOptPage::Construct()
{
- if( pColorConfig )
- FillBoxChartColorLB(m_pLbChartColors, pColorConfig->GetColorList());
-
+ FillBoxChartColorLB();
FillColorBox();
m_pLbChartColors->SelectEntryPos( 0 );
@@ -184,7 +257,7 @@ IMPL_LINK_NOARG(SvxDefaultColorOptPage, ResetToDefaults, Button*, void)
{
pColorConfig->GetColorList().useDefault();
- FillBoxChartColorLB(m_pLbChartColors, pColorConfig->GetColorList());
+ FillBoxChartColorLB();
m_pLbChartColors->GetFocus();
m_pLbChartColors->SelectEntryPos( 0 );
@@ -203,7 +276,7 @@ IMPL_LINK_NOARG(SvxDefaultColorOptPage, AddChartColor, Button*, void)
pColorConfig->GetColorList().append (XColorEntry ( black, pColorConfig->GetColorList().getDefaultName(pColorConfig->GetColorList().size())));
- FillBoxChartColorLB(m_pLbChartColors, pColorConfig->GetColorList());
+ FillBoxChartColorLB();
m_pLbChartColors->GetFocus();
m_pLbChartColors->SelectEntryPos( pColorConfig->GetColorList().size() - 1 );
@@ -231,7 +304,7 @@ IMPL_LINK( SvxDefaultColorOptPage, RemoveChartColor, Button*, pButton, void )
{
pColorConfig->GetColorList().remove( nIndex );
- FillBoxChartColorLB(m_pLbChartColors, pColorConfig->GetColorList());
+ FillBoxChartColorLB();
m_pLbChartColors->GetFocus();
@@ -245,9 +318,9 @@ IMPL_LINK( SvxDefaultColorOptPage, RemoveChartColor, Button*, pButton, void )
}
}
-IMPL_LINK( SvxDefaultColorOptPage, ListClickedHdl, ListBox&, _rBox, void )
+IMPL_LINK_NOARG( SvxDefaultColorOptPage, ListClickedHdl, ListBox&, void )
{
- Color aCol = static_cast<ColorLB&>(_rBox).GetSelectEntryColor();
+ Color aCol = GetSelectEntryColor();
long nIndex = GetColorIndex( aCol );
@@ -264,7 +337,7 @@ IMPL_LINK_NOARG(SvxDefaultColorOptPage, BoxClickedHdl, ValueSet*, void)
{
const XColorEntry aEntry( m_pValSetColorBox->GetItemColor( m_pValSetColorBox->GetSelectItemId() ), m_pLbChartColors->GetSelectEntry() );
- m_pLbChartColors->Modify( aEntry, nIdx );
+ ModifyColorEntry(aEntry, nIdx);
pColorConfig->ReplaceColorByIndex( nIdx, aEntry );
m_pLbChartColors->SelectEntryPos( nIdx ); // reselect entry
diff --git a/cui/source/options/optchart.hxx b/cui/source/options/optchart.hxx
index 34cd2113f2a3..79af3c1dd8b8 100644
--- a/cui/source/options/optchart.hxx
+++ b/cui/source/options/optchart.hxx
@@ -29,11 +29,12 @@
#include "cfgchart.hxx"
+typedef std::vector<Color> ImpColorList;
+
class SvxDefaultColorOptPage : public SfxTabPage
{
-
private:
- VclPtr<ColorLB> m_pLbChartColors;
+ VclPtr<ListBox> m_pLbChartColors;
VclPtr<ValueSet> m_pValSetColorBox;
VclPtr<PushButton> m_pPBDefault;
VclPtr<PushButton> m_pPBAdd;
@@ -42,6 +43,7 @@ private:
SvxChartOptions* pChartOptions;
SvxChartColorTableItem* pColorConfig;
XColorListRef pColorList;
+ ImpColorList aColorList;
DECL_LINK( ResetToDefaults, Button *, void );
DECL_LINK( AddChartColor, Button *, void );
@@ -52,6 +54,15 @@ private:
void FillColorBox();
long GetColorIndex( const Color& rCol );
+private:
+ void InsertColorEntry(const XColorEntry& rEntry, sal_Int32 nPos = LISTBOX_APPEND);
+ void RemoveColorEntry(sal_Int32 nPos);
+ void ModifyColorEntry(const XColorEntry& rEntry, sal_Int32 nPos);
+ void ClearColorEntries();
+ void FillBoxChartColorLB();
+ Color GetEntryColor(sal_Int32 nPos) const;
+ Color GetSelectEntryColor() const;
+
public:
SvxDefaultColorOptPage( vcl::Window* pParent, const SfxItemSet& rInAttrs );
virtual ~SvxDefaultColorOptPage() override;
diff --git a/cui/source/options/optcolor.cxx b/cui/source/options/optcolor.cxx
index 43f76b4b6884..1d962bddbd3b 100644
--- a/cui/source/options/optcolor.cxx
+++ b/cui/source/options/optcolor.cxx
@@ -21,11 +21,13 @@
#include <bitset>
+#include <editeng/editids.hrc>
#include <svtools/colorcfg.hxx>
#include <svtools/extcolorcfg.hxx>
#include <svtools/headbar.hxx>
#include <svtools/ctrlbox.hxx>
#include <vcl/scrbar.hxx>
+#include <svx/colorbox.hxx>
#include <svx/xtable.hxx>
#include <unotools/moduleoptions.hxx>
#include <unotools/pathoptions.hxx>
@@ -177,12 +179,12 @@ public:
virtual void dispose() override;
public:
- void SetLinks (Link<Button*,void> const&, Link<ListBox&,void> const&, Link<Control&,void> const&);
+ void SetLinks (Link<Button*,void> const&, Link<SvxColorListBox&,void> const&, Link<Control&,void> const&);
unsigned GetEntryHeight () const { return vEntries[0]->GetHeight(); }
void Update (EditableColorConfig const*, EditableExtendedColorConfig const*);
void ScrollHdl(const ScrollBar&);
void ClickHdl (EditableColorConfig*, CheckBox*);
- void ColorHdl (EditableColorConfig*, EditableExtendedColorConfig*, ColorListBox*);
+ void ColorHdl (EditableColorConfig*, EditableExtendedColorConfig*, SvxColorListBox*);
void Init(ScrollBar *pVScroll, HeaderBar *m_pHeaderHB);
void AdjustScrollBar();
void AdjustHeaderBar();
@@ -214,10 +216,10 @@ private:
public:
void Show ();
void Hide ();
- void SetAppearance(Wallpaper const& aTextWall, ColorListBox const& aSampleList);
+ void SetAppearance(Wallpaper const& rTextWall);
void SetTextColor (Color C) { m_pText->SetTextColor(C); }
public:
- void SetLinks (Link<Button*,void> const&, Link<ListBox&,void> const&, Link<Control&,void> const&);
+ void SetLinks (Link<Button*,void> const&, Link<SvxColorListBox&,void> const&, Link<Control&,void> const&);
void Update (ColorConfigEntry, ColorConfigValue const&);
void Update (ExtendedColorConfigValue const&);
void ColorChanged (ColorConfigEntry, ColorConfigValue&);
@@ -227,7 +229,7 @@ private:
unsigned GetHeight () const { return m_pColorList->GetSizePixel().Height(); }
public:
bool Is (CheckBox* pBox) const { return m_pText == pBox; }
- bool Is (ColorListBox* pBox) const { return m_pColorList == pBox; }
+ bool Is (SvxColorListBox* pBox) const { return m_pColorList == pBox; }
void dispose()
{
m_pText.disposeAndClear();
@@ -239,7 +241,7 @@ private:
// checkbox (CheckBox) or simple text (FixedText)
VclPtr<Control> m_pText;
// color list box
- VclPtr<ColorListBox> m_pColorList;
+ VclPtr<SvxColorListBox> m_pColorList;
// color preview box
VclPtr<vcl::Window> m_pPreview;
// default color
@@ -350,9 +352,7 @@ ColorConfigWindow_Impl::Entry::Entry( vcl::Window *pGrid, unsigned nYPos,
m_pText->set_margin_left(6 + nCheckBoxLabelOffset);
m_pText->SetText(rColorEntry.getDisplayName());
- WinBits nWinBits = WB_LEFT|WB_VCENTER|WB_3DLOOK|WB_TABSTOP|WB_DROPDOWN;
- m_pColorList = VclPtr<ColorListBox>::Create(pGrid, nWinBits);
- m_pColorList->EnableAutoSize(true);
+ m_pColorList = VclPtr<SvxColorListBox>::Create(pGrid);
m_pColorList->set_grid_left_attach(1);
m_pColorList->set_grid_top_attach(nYPos);
@@ -390,24 +390,22 @@ void ColorConfigWindow_Impl::Entry::Hide()
// SetAppearance()
// iEntry: which entry is this?
-// aTextWall: background of the text (transparent)
+// rTextWall: background of the text (transparent)
// aSampleList: sample color listbox (to copy from)
-void ColorConfigWindow_Impl::Entry::SetAppearance(
- Wallpaper const& aTextWall,
- ColorListBox const& aSampleList)
+void ColorConfigWindow_Impl::Entry::SetAppearance(Wallpaper const& rTextWall)
{
// text (and optionally checkbox)
- m_pText->SetBackground(aTextWall);
+ m_pText->SetBackground(rTextWall);
// preview
m_pPreview->SetBorderStyle(WindowBorderStyle::MONO);
// color list
- m_pColorList->CopyEntries(aSampleList);
- m_pColorList->InsertAutomaticEntryColor(m_aDefaultColor);
+ m_pColorList->SetSlotId(SID_ATTR_CHAR_COLOR);
+ m_pColorList->SetAutoDisplayColor(m_aDefaultColor);
}
// SetLinks()
void ColorConfigWindow_Impl::Entry::SetLinks(
- Link<Button*,void> const& aCheckLink, Link<ListBox&,void> const& aColorLink,
+ Link<Button*,void> const& aCheckLink, Link<SvxColorListBox&,void> const& aColorLink,
Link<Control&,void> const& aGetFocusLink)
{
m_pColorList->SetSelectHdl(aColorLink);
@@ -423,17 +421,10 @@ void ColorConfigWindow_Impl::Entry::SetLinks(
void ColorConfigWindow_Impl::Entry::Update (
ColorConfigEntry aColorEntry, ColorConfigValue const& rValue
) {
- Color aColor;
- if ((unsigned)rValue.nColor == COL_AUTO)
- {
+ Color aColor(rValue.nColor);
+ m_pColorList->SelectEntry(aColor);
+ if (aColor.GetColor() == COL_AUTO)
aColor = ColorConfig::GetDefaultColor(aColorEntry);
- m_pColorList->SelectEntryPos(0);
- }
- else
- {
- aColor = Color(rValue.nColor);
- m_pColorList->SelectEntry(aColor);
- }
m_pPreview->SetBackground(Wallpaper(aColor));
if (CheckBox* pCheckBox = dynamic_cast<CheckBox*>(m_pText.get()))
pCheckBox->Check(rValue.bIsVisible);
@@ -445,7 +436,7 @@ void ColorConfigWindow_Impl::Entry::Update (
) {
Color aColor(rValue.getColor());
if (rValue.getColor() == rValue.getDefaultColor())
- m_pColorList->SelectEntryPos(0);
+ m_pColorList->SelectEntry(Color(COL_AUTO));
else
m_pColorList->SelectEntry(aColor);
SetColor(aColor);
@@ -456,17 +447,10 @@ void ColorConfigWindow_Impl::Entry::ColorChanged (
ColorConfigEntry aColorEntry,
ColorConfigValue& rValue
) {
- Color aColor;
- if (m_pColorList->IsAutomaticSelected())
- {
+ Color aColor = m_pColorList->GetSelectEntryColor();
+ rValue.nColor = aColor.GetColor();
+ if (aColor.GetColor() == COL_AUTO)
aColor = ColorConfig::GetDefaultColor(aColorEntry);
- rValue.nColor = COL_AUTO;
- }
- else
- {
- aColor = m_pColorList->GetSelectEntryColor();
- rValue.nColor = aColor.GetColor();
- }
SetColor(aColor);
}
@@ -476,8 +460,7 @@ void ColorConfigWindow_Impl::Entry::ColorChanged (
) {
Color aColor = m_pColorList->GetSelectEntryColor();
rValue.setColor(aColor.GetColor());
- // automatic?
- if (m_pColorList->GetSelectEntryPos() == 0)
+ if (aColor.GetColor() == COL_AUTO)
{
rValue.setColor(rValue.getDefaultColor());
aColor.SetColor(rValue.getColor());
@@ -628,22 +611,11 @@ void ColorConfigWindow_Impl::SetAppearance ()
OSL_ENSURE( vEntries.size() >= SAL_N_ELEMENTS(vEntryInfo), "wrong number of helpIDs for color listboxes" );
- // creating a sample color listbox with the color entries
- ScopedVclPtrInstance< ColorListBox > aSampleColorList(this);
- {
- XColorListRef const xColorTable = XColorList::CreateStdColorList();
- for (sal_Int32 i = 0; i != xColorTable->Count(); ++i)
- {
- XColorEntry& rEntry = *xColorTable->GetColor(i);
- aSampleColorList->InsertEntry(rEntry.GetColor(), rEntry.GetName());
- }
- }
-
// appearance
for (size_t i = 0; i != vEntries.size(); ++i)
{
// appearance
- vEntries[i]->SetAppearance(aTransparentWall, *aSampleColorList.get());
+ vEntries[i]->SetAppearance(aTransparentWall);
}
}
@@ -681,7 +653,7 @@ void ColorConfigWindow_Impl::Init(ScrollBar *pVScroll, HeaderBar *pHeaderHB)
// SetLinks()
void ColorConfigWindow_Impl::SetLinks (
- Link<Button*,void> const& aCheckLink, Link<ListBox&,void> const& aColorLink, Link<Control&,void> const& aGetFocusLink
+ Link<Button*,void> const& aCheckLink, Link<SvxColorListBox&,void> const& aColorLink, Link<Control&,void> const& aGetFocusLink
) {
for (unsigned i = 0; i != vEntries.size(); ++i)
vEntries[i]->SetLinks(aCheckLink, aColorLink, aGetFocusLink);
@@ -742,10 +714,10 @@ void ColorConfigWindow_Impl::ClickHdl (EditableColorConfig* pConfig, CheckBox* p
}
// ColorHdl()
-void ColorConfigWindow_Impl::ColorHdl (
+void ColorConfigWindow_Impl::ColorHdl(
EditableColorConfig* pConfig, EditableExtendedColorConfig* pExtConfig,
- ColorListBox* pBox
-) {
+ SvxColorListBox* pBox)
+{
unsigned i = 0;
// default entries
@@ -838,7 +810,7 @@ class ColorConfigCtrl_Impl : public VclVBox
DECL_LINK(ScrollHdl, ScrollBar*, void);
DECL_LINK(ClickHdl, Button*, void);
- DECL_LINK(ColorHdl, ListBox&, void);
+ DECL_LINK(ColorHdl, SvxColorListBox&, void);
DECL_LINK(ControlFocusHdl, Control&, void);
virtual bool PreNotify (NotifyEvent& rNEvt) override;
@@ -892,7 +864,7 @@ ColorConfigCtrl_Impl::ColorConfigCtrl_Impl(vcl::Window* pParent)
m_pVScroll->SetEndScrollHdl(aScrollLink);
Link<Button*,void> aCheckLink = LINK(this, ColorConfigCtrl_Impl, ClickHdl);
- Link<ListBox&,void> aColorLink = LINK(this, ColorConfigCtrl_Impl, ColorHdl);
+ Link<SvxColorListBox&,void> aColorLink = LINK(this, ColorConfigCtrl_Impl, ColorHdl);
Link<Control&,void> aGetFocusLink = LINK(this, ColorConfigCtrl_Impl, ControlFocusHdl);
m_pScrollWindow->SetLinks(aCheckLink, aColorLink, aGetFocusLink);
@@ -998,11 +970,12 @@ IMPL_LINK(ColorConfigCtrl_Impl, ClickHdl, Button*, pBox, void)
}
// a color list has changed
-IMPL_LINK(ColorConfigCtrl_Impl, ColorHdl, ListBox&, rBox, void)
+IMPL_LINK(ColorConfigCtrl_Impl, ColorHdl, SvxColorListBox&, rBox, void)
{
DBG_ASSERT(pColorConfig, "Configuration not set" );
- m_pScrollWindow->ColorHdl(pColorConfig, pExtColorConfig, static_cast<ColorListBox*>(&rBox));
+ m_pScrollWindow->ColorHdl(pColorConfig, pExtColorConfig, &rBox);
}
+
IMPL_LINK(ColorConfigCtrl_Impl, ControlFocusHdl, Control&, rCtrl, void)
{
// determine whether a control is completely visible
diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx
index ce9948c6c79f..41e525d2d358 100644
--- a/cui/source/tabpages/backgrnd.cxx
+++ b/cui/source/tabpages/backgrnd.cxx
@@ -381,7 +381,7 @@ SvxBackgroundTabPage::SvxBackgroundTabPage(vcl::Window* pParent, const SfxItemSe
m_pBackgroundColorSet->SetSelectHdl( HDL(BackgroundColorHdl_Impl) );
m_pBackgroundColorSet->SetStyle(m_pBackgroundColorSet->GetStyle() | WB_ITEMBORDER | WB_NAMEFIELD | WB_NONEFIELD);
- m_pBackgroundColorSet->SetText(SVX_RESSTR(RID_SVXSTR_TRANSPARENT));
+ m_pBackgroundColorSet->SetText(SVX_RESSTR(RID_SVXSTR_NOFILL));
}
SvxBackgroundTabPage::~SvxBackgroundTabPage()
diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx
index d74ae35b723a..f989a7ce7af6 100644
--- a/cui/source/tabpages/border.cxx
+++ b/cui/source/tabpages/border.cxx
@@ -284,45 +284,13 @@ SvxBorderTabPage::SvxBorderTabPage(vcl::Window* pParent, const SfxItemSet& rCore
m_pLbLineStyle->SetSelectHdl( LINK( this, SvxBorderTabPage, SelStyleHdl_Impl ) );
m_pLbLineColor->SetSelectHdl( LINK( this, SvxBorderTabPage, SelColHdl_Impl ) );
m_pLineWidthMF->SetModifyHdl( LINK( this, SvxBorderTabPage, ModifyWidthHdl_Impl ) );
- m_pLbShadowColor->SetSelectHdl( LINK( this, SvxBorderTabPage, SelColHdl_Impl ) );
m_pWndPresets->SetSelectHdl( LINK( this, SvxBorderTabPage, SelPreHdl_Impl ) );
m_pWndShadows->SetSelectHdl( LINK( this, SvxBorderTabPage, SelSdwHdl_Impl ) );
FillValueSets();
FillLineListBox_Impl();
- // fill ColorBox out of the XColorList
- SfxObjectShell* pDocSh = SfxObjectShell::Current();
- XColorListRef pColorTable;
-
- DBG_ASSERT( pDocSh, "DocShell not found!" );
-
- if ( pDocSh )
- {
- pItem = pDocSh->GetItem( SID_COLOR_TABLE );
- if ( pItem != nullptr )
- pColorTable = static_cast<const SvxColorListItem*>(pItem)->GetColorList();
- }
-
- DBG_ASSERT( pColorTable.is(), "ColorTable not found!" );
-
- if ( pColorTable.is() )
- {
- // filling the line color box
- m_pLbLineColor->SetUpdateMode( false );
-
- for ( long i = 0; i < pColorTable->Count(); ++i )
- {
- const XColorEntry* pEntry = pColorTable->GetColor(i);
- m_pLbLineColor->InsertEntry( pEntry->GetColor(), pEntry->GetName() );
- }
- m_pLbLineColor->SetUpdateMode( true );
-
- m_pLbShadowColor->CopyEntries(*m_pLbLineColor);
- }
-
// connections
-
bool bSupportsShadow = !SfxItemPool::IsSlot( GetWhich( SID_ATTR_BORDER_SHADOW ) );
if( bSupportsShadow )
AddItemConnection( svx::CreateShadowConnection( rCoreAttrs, *m_pWndShadows, *m_pEdShadowSize, *m_pLbShadowColor ) );
@@ -344,7 +312,8 @@ SvxBorderTabPage::SvxBorderTabPage(vcl::Window* pParent, const SfxItemSet& rCore
AddItemConnection( new sfx::CheckBoxConnection( SID_SW_COLLAPSING_BORDERS, *m_pMergeAdjacentBordersCB, ItemConnFlags::NONE ) );
m_pMergeAdjacentBordersCB->Hide();
- if( pDocSh )
+ SfxObjectShell* pDocSh = SfxObjectShell::Current();
+ if (pDocSh)
{
Reference< XServiceInfo > xSI( pDocSh->GetModel(), UNO_QUERY );
if ( xSI.is() )
@@ -564,12 +533,8 @@ void SvxBorderTabPage::Reset( const SfxItemSet* rSet )
if( !bColorEq )
aColor.SetColor( COL_BLACK );
- sal_Int32 nSelPos = m_pLbLineColor->GetEntryPos( aColor );
- if( nSelPos == LISTBOX_ENTRY_NOTFOUND )
- nSelPos = m_pLbLineColor->InsertEntry( aColor, SVX_RESSTR( RID_SVXSTR_COLOR_USER ) );
-
- m_pLbLineColor->SelectEntryPos( nSelPos );
- m_pLbLineStyle->SetColor( aColor );
+ m_pLbLineColor->SelectEntry(aColor);
+ m_pLbLineStyle->SetColor(aColor);
// Select all visible lines, if they are all equal.
if( bWidthEq && bColorEq )
@@ -577,7 +542,6 @@ void SvxBorderTabPage::Reset( const SfxItemSet* rSet )
// set the current style and color (caches style in control even if nothing is selected)
SelStyleHdl_Impl(*m_pLbLineStyle);
- SelColHdl_Impl(*m_pLbLineColor);
}
bool bEnable = m_pWndShadows->GetSelectItemId() > 1 ;
@@ -868,7 +832,6 @@ IMPL_LINK_NOARG(SvxBorderTabPage, SelPreHdl_Impl, ValueSet*, void)
// set current style to all previously selected lines
SelStyleHdl_Impl(*m_pLbLineStyle);
- SelColHdl_Impl(*m_pLbLineColor);
}
// Presets ValueSet does not show a selection (used as push buttons).
@@ -888,16 +851,11 @@ IMPL_LINK_NOARG(SvxBorderTabPage, SelSdwHdl_Impl, ValueSet*, void)
m_pLbShadowColor->Enable(bEnable);
}
-
-IMPL_LINK( SvxBorderTabPage, SelColHdl_Impl, ListBox&, rLb, void )
+IMPL_LINK(SvxBorderTabPage, SelColHdl_Impl, SvxColorListBox&, rColorBox, void)
{
- ColorListBox* pColLb = static_cast<ColorListBox*>(&rLb);
-
- if (&rLb == m_pLbLineColor)
- {
- m_pFrameSel->SetColorToSelection( pColLb->GetSelectEntryColor() );
- m_pLbLineStyle->SetColor( pColLb->GetSelectEntryColor() );
- }
+ Color aColor = rColorBox.GetSelectEntryColor();
+ m_pFrameSel->SetColorToSelection(aColor);
+ m_pLbLineStyle->SetColor(aColor);
}
IMPL_LINK_NOARG(SvxBorderTabPage, ModifyWidthHdl_Impl, Edit&, void)
diff --git a/cui/source/tabpages/borderconn.cxx b/cui/source/tabpages/borderconn.cxx
index 5aec14626802..70243d055a47 100644
--- a/cui/source/tabpages/borderconn.cxx
+++ b/cui/source/tabpages/borderconn.cxx
@@ -22,6 +22,7 @@
#include "editeng/lineitem.hxx"
#include <editeng/boxitem.hxx>
#include <svx/algitem.hxx>
+#include <svx/colorbox.hxx>
#include <editeng/shaditem.hxx>
namespace svx {
@@ -203,7 +204,7 @@ static const ShadowPosWrapper::MapEntryType s_pShadowPosMap[] =
class ShadowControlsWrapper : public sfx::MultiControlWrapper< SvxShadowItem >
{
public:
- explicit ShadowControlsWrapper( ValueSet& rVsPos, MetricField& rMfSize, ColorListBox& rLbColor );
+ explicit ShadowControlsWrapper( ValueSet& rVsPos, MetricField& rMfSize, SvxColorListBox& rLbColor );
virtual SvxShadowItem GetControlValue() const override;
virtual void SetControlValue( SvxShadowItem aItem ) override;
@@ -211,11 +212,11 @@ public:
private:
ShadowPosWrapper maPosWrp;
sfx::MetricFieldWrapper<sal_uInt16> maSizeWrp;
- sfx::ColorListBoxWrapper maColorWrp;
+ SvxColorListBoxWrapper maColorWrp;
};
ShadowControlsWrapper::ShadowControlsWrapper(
- ValueSet& rVsPos, MetricField& rMfSize, ColorListBox& rLbColor ) :
+ ValueSet& rVsPos, MetricField& rMfSize, SvxColorListBox& rLbColor ) :
maPosWrp( rVsPos, s_pShadowPosMap ),
maSizeWrp( rMfSize, FUNIT_TWIP ),
maColorWrp( rLbColor )
@@ -250,11 +251,11 @@ class ShadowConnection : public sfx::ItemControlConnection< ShadowItemWrapper, S
{
public:
explicit ShadowConnection( const SfxItemSet& rItemSet,
- ValueSet& rVsPos, MetricField& rMfSize, ColorListBox& rLbColor );
+ ValueSet& rVsPos, MetricField& rMfSize, SvxColorListBox& rLbColor );
};
ShadowConnection::ShadowConnection( const SfxItemSet& rItemSet,
- ValueSet& rVsPos, MetricField& rMfSize, ColorListBox& rLbColor ) :
+ ValueSet& rVsPos, MetricField& rMfSize, SvxColorListBox& rLbColor ) :
ItemControlConnectionType( SID_ATTR_BORDER_SHADOW, new ShadowControlsWrapper( rVsPos, rMfSize, rLbColor ), ItemConnFlags::NONE )
{
mxCtrlWrp->SetDefaultValue( maItemWrp.GetDefaultItem( rItemSet ) );
@@ -275,7 +276,7 @@ sfx::ItemConnectionBase* CreateMarginConnection( const SfxItemSet& rItemSet,
}
sfx::ItemConnectionBase* CreateShadowConnection( const SfxItemSet& rItemSet,
- ValueSet& rVsPos, MetricField& rMfSize, ColorListBox& rLbColor )
+ ValueSet& rVsPos, MetricField& rMfSize, SvxColorListBox& rLbColor )
{
return new ShadowConnection( rItemSet, rVsPos, rMfSize, rLbColor );
}
diff --git a/cui/source/tabpages/borderconn.hxx b/cui/source/tabpages/borderconn.hxx
index 17343d80025f..b04d4a8b0c1f 100644
--- a/cui/source/tabpages/borderconn.hxx
+++ b/cui/source/tabpages/borderconn.hxx
@@ -26,7 +26,7 @@
class SfxItemSet;
class MetricField;
class ValueSet;
-class ColorListBox;
+class SvxColorListBox;
namespace svx {
@@ -47,7 +47,7 @@ sfx::ItemConnectionBase* CreateMarginConnection( const SfxItemSet& rItemSet,
/** Creates an item connection object that connects an SvxShadowItem with the
controls of the SvxBorderTabPage. */
sfx::ItemConnectionBase* CreateShadowConnection( const SfxItemSet& rItemSet,
- ValueSet& rVsPos, MetricField& rMfSize, ColorListBox& rLbColor );
+ ValueSet& rVsPos, MetricField& rMfSize, SvxColorListBox& rLbColor );
}
diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index d1b7b8b50c28..15a1020591e5 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -1348,10 +1348,10 @@ void SvxCharNamePage::PageCreated(const SfxAllItemSet& aSet)
SvxCharEffectsPage::SvxCharEffectsPage( vcl::Window* pParent, const SfxItemSet& rInSet )
: SvxCharBasePage(pParent, "EffectsPage", "cui/ui/effectspage.ui", rInSet)
- , m_aTransparentColorName(CUI_RES(RID_SVXSTR_CHARNAME_TRANSPARENT))
{
get(m_pFontColorFT, "fontcolorft");
get(m_pFontColorLB, "fontcolorlb");
+ m_pFontColorLB->SetSlotId(SID_ATTR_CHAR_COLOR);
get(m_pEffectsFT, "effectsft");
get(m_pEffectsLB, "effectslb");
get(m_pReliefFT, "reliefft");
@@ -1363,10 +1363,12 @@ SvxCharEffectsPage::SvxCharEffectsPage( vcl::Window* pParent, const SfxItemSet&
get(m_pOverlineLB, "overlinelb");
get(m_pOverlineColorFT, "overlinecolorft");
get(m_pOverlineColorLB, "overlinecolorlb");
+ m_pOverlineColorLB->SetSlotId(SID_ATTR_CHAR_COLOR);
get(m_pStrikeoutLB, "strikeoutlb");
get(m_pUnderlineLB, "underlinelb");
get(m_pUnderlineColorFT, "underlinecolorft");
get(m_pUnderlineColorLB, "underlinecolorlb");
+ m_pUnderlineColorLB->SetSlotId(SID_ATTR_CHAR_COLOR);
get(m_pIndividualWordsBtn, "individualwordscb");
get(m_pEmphasisFT, "emphasisft");
get(m_pEmphasisLB, "emphasislb");
@@ -1431,55 +1433,14 @@ void SvxCharEffectsPage::Initialize()
}
}
- // fill the color box
- SfxObjectShell* pDocSh = SfxObjectShell::Current();
- DBG_ASSERT( pDocSh, "DocShell not found!" );
- XColorListRef pColorTable;
-
- if ( pDocSh )
- {
- pItem = pDocSh->GetItem( SID_COLOR_TABLE );
- if ( pItem != nullptr )
- pColorTable = static_cast<const SvxColorListItem*>(pItem)->GetColorList();
- }
-
- if ( !pColorTable.is() )
- pColorTable = XColorList::CreateStdColorList();
-
- m_pUnderlineColorLB->SetUpdateMode( false );
- m_pOverlineColorLB->SetUpdateMode( false );
- m_pFontColorLB->SetUpdateMode( false );
-
- {
- std::unique_ptr<SfxPoolItem> pDummy;
- SfxViewFrame* pFrame = SfxViewFrame::GetFirst( pDocSh );
- if ( !pFrame ||
- SfxItemState::DEFAULT > pFrame->GetBindings().QueryState( SID_ATTR_AUTO_COLOR_INVALID, pDummy ) )
- {
- m_pUnderlineColorLB->InsertAutomaticEntryColor( Color( COL_AUTO ) );
- m_pOverlineColorLB->InsertAutomaticEntryColor( Color( COL_AUTO ) );
- m_pFontColorLB->InsertAutomaticEntryColor( Color( COL_AUTO ) );
- }
- }
- for ( long i = 0; i < pColorTable->Count(); i++ )
- {
- const XColorEntry* pEntry = pColorTable->GetColor(i);
- m_pUnderlineColorLB->InsertEntry( pEntry->GetColor(), pEntry->GetName() );
- m_pOverlineColorLB->InsertEntry( pEntry->GetColor(), pEntry->GetName() );
- m_pFontColorLB->InsertEntry( pEntry->GetColor(), pEntry->GetName() );
- }
-
- m_pUnderlineColorLB->SetUpdateMode( true );
- m_pOverlineColorLB->SetUpdateMode( true );
- m_pFontColorLB->SetUpdateMode( true );
- m_pFontColorLB->SetSelectHdl( LINK( this, SvxCharEffectsPage, ColorBoxSelectHdl_Impl ) );
+ m_pFontColorLB->SetSelectHdl(LINK(this, SvxCharEffectsPage, ColorBoxSelectHdl_Impl));
// handler
Link<ListBox&,void> aLink = LINK( this, SvxCharEffectsPage, SelectListBoxHdl_Impl );
m_pUnderlineLB->SetSelectHdl( aLink );
- m_pUnderlineColorLB->SetSelectHdl( aLink );
+ m_pUnderlineColorLB->SetSelectHdl(LINK(this, SvxCharEffectsPage, ColorBoxSelectHdl_Impl));
m_pOverlineLB->SetSelectHdl( aLink );
- m_pOverlineColorLB->SetSelectHdl( aLink );
+ m_pOverlineColorLB->SetSelectHdl(LINK(this, SvxCharEffectsPage, ColorBoxSelectHdl_Impl));
m_pStrikeoutLB->SetSelectHdl( aLink );
m_pEmphasisLB->SetSelectHdl( aLink );
m_pPositionLB->SetSelectHdl( aLink );
@@ -1487,9 +1448,7 @@ void SvxCharEffectsPage::Initialize()
m_pReliefLB->SetSelectHdl( aLink );
m_pUnderlineLB->SelectEntryPos( 0 );
- m_pUnderlineColorLB->SelectEntryPos( 0 );
m_pOverlineLB->SelectEntryPos( 0 );
- m_pOverlineColorLB->SelectEntryPos( 0 );
m_pStrikeoutLB->SelectEntryPos( 0 );
m_pEmphasisLB->SelectEntryPos( 0 );
m_pPositionLB->SelectEntryPos( 0 );
@@ -1520,6 +1479,11 @@ void SvxCharEffectsPage::UpdatePreview_Impl()
SvxFont& rCJKFont = GetPreviewCJKFont();
SvxFont& rCTLFont = GetPreviewCTLFont();
+ const Color& rSelectedColor = m_pFontColorLB->GetSelectEntryColor();
+ rFont.SetColor(rSelectedColor.GetColor() == COL_AUTO ? Color(COL_BLACK) : rSelectedColor);
+ rCJKFont.SetColor(rSelectedColor.GetColor() == COL_AUTO ? Color(COL_BLACK) : rSelectedColor);
+ rCTLFont.SetColor(rSelectedColor.GetColor() == COL_AUTO ? Color(COL_BLACK) : rSelectedColor);
+
sal_Int32 nPos = m_pUnderlineLB->GetSelectEntryPos();
FontLineStyle eUnderline = (FontLineStyle)reinterpret_cast<sal_uLong>(m_pUnderlineLB->GetEntryData( nPos ));
nPos = m_pOverlineLB->GetSelectEntryPos();
@@ -1547,7 +1511,7 @@ void SvxCharEffectsPage::UpdatePreview_Impl()
rCTLFont.SetEmphasisMark( eMark );
sal_Int32 nRelief = m_pReliefLB->GetSelectEntryPos();
- if(LISTBOX_ENTRY_NOTFOUND != nRelief)
+ if (LISTBOX_ENTRY_NOTFOUND != nRelief)
{
rFont.SetRelief( (FontRelief)nRelief );
rCJKFont.SetRelief( (FontRelief)nRelief );
@@ -1631,71 +1595,38 @@ void SvxCharEffectsPage::ResetColor_Impl( const SfxItemSet& rSet )
rCTLFont.SetColor( aColor.GetColor() == COL_AUTO ? Color(COL_BLACK) : aColor );
m_pPreviewWin->Invalidate();
- sal_Int32 nSelPos = m_pFontColorLB->GetEntryPos( aColor );
- if ( nSelPos == LISTBOX_ENTRY_NOTFOUND && aColor == Color( COL_TRANSPARENT ) )
- nSelPos = m_pFontColorLB->GetEntryPos( m_aTransparentColorName );
- if ( LISTBOX_ENTRY_NOTFOUND != nSelPos )
- m_pFontColorLB->SelectEntryPos( nSelPos );
- else
- {
- nSelPos = m_pFontColorLB->GetEntryPos( aColor );
- if ( LISTBOX_ENTRY_NOTFOUND != nSelPos )
- m_pFontColorLB->SelectEntryPos( nSelPos );
- else
- m_pFontColorLB->SelectEntryPos(
- m_pFontColorLB->InsertEntry( aColor, OUString( SVX_RES( RID_SVXSTR_COLOR_USER ) ) ) );
- }
+ m_pFontColorLB->SelectEntry(aColor);
break;
}
}
}
-
bool SvxCharEffectsPage::FillItemSetColor_Impl( SfxItemSet& rSet )
{
sal_uInt16 nWhich = GetWhich( SID_ATTR_CHAR_COLOR );
const SvxColorItem* pOld = static_cast<const SvxColorItem*>(GetOldItem( rSet, SID_ATTR_CHAR_COLOR ));
- const SvxColorItem* pItem = nullptr;
bool bChanged = true;
- const SfxItemSet* pExampleSet = GetTabDialog() ? GetTabDialog()->GetExampleSet() : nullptr;
const SfxItemSet& rOldSet = GetItemSet();
- Color aSelectedColor;
- if ( m_pFontColorLB->GetSelectEntry() == m_aTransparentColorName )
- aSelectedColor = Color( COL_TRANSPARENT );
- else
- aSelectedColor = m_pFontColorLB->GetSelectEntryColor();
+ Color aSelectedColor = m_pFontColorLB->GetSelectEntryColor();
- if ( pOld && pOld->GetValue() == aSelectedColor )
+ if (pOld && pOld->GetValue() == aSelectedColor)
bChanged = false;
- if ( !bChanged )
- bChanged = ( m_pFontColorLB->GetSavedValue() == LISTBOX_ENTRY_NOTFOUND );
-
- if ( !bChanged && pExampleSet &&
- pExampleSet->GetItemState( nWhich, false, reinterpret_cast<const SfxPoolItem**>(&pItem) ) == SfxItemState::SET &&
- pItem->GetValue() != aSelectedColor )
- bChanged = true;
-
- bool bModified = false;
-
- if ( bChanged && m_pFontColorLB->GetSelectEntryPos() != LISTBOX_ENTRY_NOTFOUND )
- {
+ if (bChanged)
rSet.Put( SvxColorItem( aSelectedColor, nWhich ) );
- bModified = true;
- }
else if ( SfxItemState::DEFAULT == rOldSet.GetItemState( nWhich, false ) )
CLEARTITEM;
- return bModified;
+ return bChanged;
}
-
IMPL_LINK( SvxCharEffectsPage, SelectListBoxHdl_Impl, ListBox&, rBox, void )
{
SelectHdl_Impl(&rBox);
}
+
void SvxCharEffectsPage::SelectHdl_Impl( ListBox* pBox )
{
if ( m_pEmphasisLB == pBox )
@@ -1751,26 +1682,11 @@ IMPL_LINK_NOARG(SvxCharEffectsPage, TristClickHdl_Impl, Button*, void)
}
-IMPL_LINK( SvxCharEffectsPage, ColorBoxSelectHdl_Impl, ListBox&, rListBox, void )
+IMPL_LINK_NOARG(SvxCharEffectsPage, ColorBoxSelectHdl_Impl, SvxColorListBox&, void)
{
- ColorListBox* pBox = static_cast<ColorListBox*>(&rListBox);
- SvxFont& rFont = GetPreviewFont();
- SvxFont& rCJKFont = GetPreviewCJKFont();
- SvxFont& rCTLFont = GetPreviewCTLFont();
-
- Color aSelectedColor;
- if ( pBox->GetSelectEntry() == m_aTransparentColorName )
- aSelectedColor = Color( COL_TRANSPARENT );
- else
- aSelectedColor = pBox->GetSelectEntryColor();
- rFont.SetColor( aSelectedColor.GetColor() == COL_AUTO ? Color(COL_BLACK) : aSelectedColor );
- rCJKFont.SetColor( aSelectedColor.GetColor() == COL_AUTO ? Color(COL_BLACK) : aSelectedColor );
- rCTLFont.SetColor( aSelectedColor.GetColor() == COL_AUTO ? Color(COL_BLACK) : aSelectedColor );
-
- m_pPreviewWin->Invalidate();
+ UpdatePreview_Impl();
}
-
DeactivateRC SvxCharEffectsPage::DeactivatePage( SfxItemSet* _pSet )
{
if ( _pSet )
@@ -1827,24 +1743,11 @@ void SvxCharEffectsPage::Reset( const SfxItemSet* rSet )
}
Color aColor = rItem.GetColor();
- sal_Int32 nPos = m_pUnderlineColorLB->GetEntryPos( aColor );
-
- if ( LISTBOX_ENTRY_NOTFOUND != nPos )
- m_pUnderlineColorLB->SelectEntryPos( nPos );
- else
- {
- nPos = m_pUnderlineColorLB->GetEntryPos( aColor );
- if ( LISTBOX_ENTRY_NOTFOUND != nPos )
- m_pUnderlineColorLB->SelectEntryPos( nPos );
- else
- m_pUnderlineColorLB->SelectEntryPos(
- m_pUnderlineColorLB->InsertEntry( aColor,
- OUString( SVX_RES( RID_SVXSTR_COLOR_USER ) ) ) );
- }
+ m_pUnderlineColorLB->SelectEntry(aColor);
}
else
{
- m_pUnderlineColorLB->SelectEntry( Color( COL_AUTO ));
+ m_pUnderlineColorLB->SelectEntry(Color(COL_AUTO));
m_pUnderlineColorLB->Disable();
}
}
@@ -1884,24 +1787,11 @@ void SvxCharEffectsPage::Reset( const SfxItemSet* rSet )
}
Color aColor = rItem.GetColor();
- sal_Int32 nPos = m_pOverlineColorLB->GetEntryPos( aColor );
-
- if ( LISTBOX_ENTRY_NOTFOUND != nPos )
- m_pOverlineColorLB->SelectEntryPos( nPos );
- else
- {
- nPos = m_pOverlineColorLB->GetEntryPos( aColor );
- if ( LISTBOX_ENTRY_NOTFOUND != nPos )
- m_pOverlineColorLB->SelectEntryPos( nPos );
- else
- m_pOverlineColorLB->SelectEntryPos(
- m_pOverlineColorLB->InsertEntry( aColor,
- OUString( SVX_RES( RID_SVXSTR_COLOR_USER ) ) ) );
- }
+ m_pOverlineColorLB->SelectEntry(aColor);
}
else
{
- m_pOverlineColorLB->SelectEntry( Color( COL_AUTO ));
+ m_pOverlineColorLB->SelectEntry(Color(COL_AUTO));
m_pOverlineColorLB->Disable();
}
}
@@ -2214,12 +2104,10 @@ void SvxCharEffectsPage::Reset( const SfxItemSet* rSet )
ChangesApplied();
}
-void SvxCharEffectsPage::ChangesApplied()
+void SvxCharEffectsPage::ChangesApplied()
{
m_pUnderlineLB->SaveValue();
- m_pUnderlineColorLB->SaveValue();
m_pOverlineLB->SaveValue();
- m_pOverlineColorLB->SaveValue();
m_pStrikeoutLB->SaveValue();
m_pIndividualWordsBtn->SaveValue();
m_pEmphasisLB->SaveValue();
@@ -2231,10 +2119,8 @@ void SvxCharEffectsPage::ChangesApplied()
m_pBlinkingBtn->SaveValue();
m_pHiddenBtn->SaveValue();
m_pFontColorLB->SaveValue();
-
}
-
bool SvxCharEffectsPage::FillItemSet( SfxItemSet* rSet )
{
const SfxPoolItem* pOld = nullptr;
@@ -2305,7 +2191,7 @@ bool SvxCharEffectsPage::FillItemSet( SfxItemSet* rSet )
rSet->Put( aNewItem );
bModified = true;
}
- else if ( SfxItemState::DEFAULT == rOldSet.GetItemState( nWhich, false ) )
+ else if ( SfxItemState::DEFAULT == rOldSet.GetItemState( nWhich, false ) )
rSet->InvalidateItem(nWhich);
bChanged = true;
diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index 6aacd7e695b7..49564a9e1716 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -31,6 +31,7 @@
#include <svl/eitem.hxx>
#include <vcl/layout.hxx>
#include <vcl/svapp.hxx>
+#include <svx/colorbox.hxx>
#include <svx/gallery.hxx>
#include <svl/urihelper.hxx>
#include <editeng/brushitem.hxx>
@@ -1103,6 +1104,7 @@ SvxNumOptionsTabPage::SvxNumOptionsTabPage(vcl::Window* pParent,
get(m_pBulColorFT, "colorft");
get(m_pBulColLB, "color");
+ m_pBulColLB->SetSlotId(SID_ATTR_CHAR_COLOR);
get(m_pBulRelSizeFT, "relsizeft");
get(m_pBulRelSizeMF, "relsize");
@@ -1368,31 +1370,6 @@ void SvxNumOptionsTabPage::Reset( const SfxItemSet* rSet )
m_pPreviewWIN->SetNumRule(pActNum);
m_pSameLevelCB->Check(pActNum->IsContinuousNumbering());
- // fill ColorListBox as needed
- if ( pActNum->IsFeatureSupported( SvxNumRuleFlags::BULLET_COLOR ) )
- {
- SfxObjectShell* pDocSh = SfxObjectShell::Current();
- DBG_ASSERT( pDocSh, "DocShell not found!" );
- XColorListRef pColorTable;
- if ( pDocSh )
- {
- pItem = pDocSh->GetItem( SID_COLOR_TABLE );
- if ( pItem )
- pColorTable = static_cast<const SvxColorListItem*>(pItem)->GetColorList();
- }
-
- if ( !pColorTable.is() )
- pColorTable = XColorList::CreateStdColorList();
-
- m_pBulColLB->InsertEntry( Color( COL_AUTO ), SVX_RESSTR( RID_SVXSTR_AUTOMATIC ));
-
- for ( long i = 0; i < pColorTable->Count(); i++ )
- {
- const XColorEntry* pEntry = pColorTable->GetColor(i);
- m_pBulColLB->InsertEntry( pEntry->GetColor(), pEntry->GetName() );
- }
- }
-
SfxObjectShell* pShell;
if ( SfxItemState::SET == rSet->GetItemState( SID_HTML_MODE, false, &pItem )
|| ( nullptr != ( pShell = SfxObjectShell::Current()) &&
@@ -1922,10 +1899,9 @@ IMPL_LINK( SvxNumOptionsTabPage, SameLevelHdl_Impl, Button*, pBox, void )
InitControls();
}
-IMPL_LINK( SvxNumOptionsTabPage, BulColorHdl_Impl, ListBox&, rListBox, void )
+IMPL_LINK(SvxNumOptionsTabPage, BulColorHdl_Impl, SvxColorListBox&, rColorBox, void)
{
- ColorListBox* pBox = static_cast<ColorListBox*>(&rListBox);
- Color nSetColor = pBox->GetSelectEntryColor();
+ Color nSetColor = rColorBox.GetSelectEntryColor();
sal_uInt16 nMask = 1;
for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++)
diff --git a/cui/source/tabpages/strings.src b/cui/source/tabpages/strings.src
index 2bf8809c0d97..0b296d647f89 100644
--- a/cui/source/tabpages/strings.src
+++ b/cui/source/tabpages/strings.src
@@ -87,10 +87,6 @@ String RID_SVXSTR_DESC_LINEEND
{
Text [ en-US ] = "Please enter a name for the new arrowhead:" ;
};
-String RID_SVXSTR_CHARNAME_TRANSPARENT
-{
- Text [ en-US ] = "Transparent";
-};
String RID_SVXSTR_CHARNAME_NOSTYLE
{
Text [ en-US ] = "No %1";
diff --git a/cui/source/tabpages/tabarea.cxx b/cui/source/tabpages/tabarea.cxx
index 6acbf08a03d7..72538f070da7 100644
--- a/cui/source/tabpages/tabarea.cxx
+++ b/cui/source/tabpages/tabarea.cxx
@@ -266,7 +266,6 @@ void SvxAreaTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
{
static_cast<SvxShadowTabPage&>(rPage).SetColorList( mpColorList );
static_cast<SvxShadowTabPage&>(rPage).SetColorChgd( &mnColorListState );
- static_cast<SvxShadowTabPage&>(rPage).Construct();
}
else if (nId == m_nTransparenceTabPage)
{
diff --git a/cui/source/tabpages/tabline.cxx b/cui/source/tabpages/tabline.cxx
index b9efb53c7850..e8d080e3a812 100644
--- a/cui/source/tabpages/tabline.cxx
+++ b/cui/source/tabpages/tabline.cxx
@@ -235,7 +235,6 @@ void SvxLineTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
static_cast<SvxShadowTabPage&>(rPage).SetDlgType( 0 );
static_cast<SvxShadowTabPage&>(rPage).SetAreaTP( &mbAreaTP );
static_cast<SvxShadowTabPage&>(rPage).SetColorChgd( &mnColorListState );
- static_cast<SvxShadowTabPage&>(rPage).Construct();
}
}
diff --git a/cui/source/tabpages/tpgradnt.cxx b/cui/source/tabpages/tpgradnt.cxx
index e28e17791d56..7aac0c7fc14c 100644
--- a/cui/source/tabpages/tpgradnt.cxx
+++ b/cui/source/tabpages/tpgradnt.cxx
@@ -28,6 +28,7 @@
#include <cuires.hrc>
#include "helpid.hrc"
+#include <svx/colorbox.hxx>
#include "svx/xattr.hxx"
#include <svx/xtable.hxx>
#include <svx/xpool.hxx>
@@ -124,9 +125,10 @@ SvxGradientTabPage::SvxGradientTabPage
m_pMtrBorder->SetModifyHdl( aLink );
m_pSliderBorder->SetSlideHdl( LINK( this, SvxGradientTabPage, ModifiedSliderHdl_Impl ) );
m_pMtrColorFrom->SetModifyHdl( aLink );
- m_pLbColorFrom->SetSelectHdl( aLink2 );
+ Link<SvxColorListBox&,void> aLink3 = LINK( this, SvxGradientTabPage, ModifiedColorListBoxHdl_Impl );
+ m_pLbColorFrom->SetSelectHdl( aLink3 );
m_pMtrColorTo->SetModifyHdl( aLink );
- m_pLbColorTo->SetSelectHdl( aLink2 );
+ m_pLbColorTo->SetSelectHdl( aLink3 );
// #i76307# always paint the preview in LTR, because this is what the document does
m_pCtlPreview->EnableRTL( false );
@@ -163,21 +165,13 @@ void SvxGradientTabPage::dispose()
SfxTabPage::dispose();
}
-
void SvxGradientTabPage::Construct()
{
- m_pLbColorFrom->Fill( m_pColorList );
- m_pLbColorTo->CopyEntries( *m_pLbColorFrom );
-
m_pGradientLB->FillPresetListBox( *m_pGradientList );
}
-
void SvxGradientTabPage::ActivatePage( const SfxItemSet& rSet )
{
- sal_Int32 nPos;
- sal_Int32 nCount;
-
if( m_pColorList.is() )
{
// ColorList
@@ -189,30 +183,6 @@ void SvxGradientTabPage::ActivatePage( const SfxItemSet& rSet )
if (pArea)
m_pColorList = pArea->GetNewColorList();
- // LbColorFrom
- nPos = m_pLbColorFrom->GetSelectEntryPos();
- m_pLbColorFrom->Clear();
- m_pLbColorFrom->Fill( m_pColorList );
- nCount = m_pLbColorFrom->GetEntryCount();
- if( nCount == 0 )
- ; // this case should not occur
- else if( nCount <= nPos )
- m_pLbColorFrom->SelectEntryPos( 0 );
- else
- m_pLbColorFrom->SelectEntryPos( nPos );
-
- // LbColorTo
- nPos = m_pLbColorTo->GetSelectEntryPos();
- m_pLbColorTo->Clear();
- m_pLbColorTo->CopyEntries( *m_pLbColorFrom );
- nCount = m_pLbColorTo->GetEntryCount();
- if( nCount == 0 )
- ; // this case should not occur
- else if( nCount <= nPos )
- m_pLbColorTo->SelectEntryPos( 0 );
- else
- m_pLbColorTo->SelectEntryPos( nPos );
-
ModifiedHdl_Impl( this );
}
@@ -310,12 +280,16 @@ VclPtr<SfxTabPage> SvxGradientTabPage::Create( vcl::Window* pWindow,
return VclPtr<SvxGradientTabPage>::Create( pWindow, *rOutAttrs );
}
-
IMPL_LINK( SvxGradientTabPage, ModifiedListBoxHdl_Impl, ListBox&, rListBox, void )
{
ModifiedHdl_Impl(&rListBox);
}
+IMPL_LINK( SvxGradientTabPage, ModifiedColorListBoxHdl_Impl, SvxColorListBox&, rListBox, void )
+{
+ ModifiedHdl_Impl(&rListBox);
+}
+
IMPL_LINK( SvxGradientTabPage, ModifiedEditHdl_Impl, Edit&, rBox, void )
{
ModifiedHdl_Impl(&rBox);
@@ -617,21 +591,9 @@ void SvxGradientTabPage::ChangeGradientHdl_Impl()
m_pLbColorFrom->SetNoSelection();
m_pLbColorFrom->SelectEntry( pGradient->GetStartColor() );
- if ( m_pLbColorFrom->GetSelectEntryCount() == 0 )
- {
- m_pLbColorFrom->InsertEntry( pGradient->GetStartColor(),
- OUString() );
- m_pLbColorFrom->SelectEntry( pGradient->GetStartColor() );
- }
m_pLbColorTo->SetNoSelection();
m_pLbColorTo->SelectEntry( pGradient->GetEndColor() );
- if ( m_pLbColorTo->GetSelectEntryCount() == 0 )
- {
- m_pLbColorTo->InsertEntry( pGradient->GetEndColor(), OUString() );
- m_pLbColorTo->SelectEntry( pGradient->GetEndColor() );
- }
-
m_pMtrAngle->SetValue( pGradient->GetAngle() / 10 ); // should be changed in resource
m_pMtrBorder->SetValue( pGradient->GetBorder() );
m_pSliderBorder->SetThumbPos( pGradient->GetBorder() );
diff --git a/cui/source/tabpages/tphatch.cxx b/cui/source/tabpages/tphatch.cxx
index 1f4fa526d9da..31efad7ad521 100644
--- a/cui/source/tabpages/tphatch.cxx
+++ b/cui/source/tabpages/tphatch.cxx
@@ -29,6 +29,7 @@
#include <cuires.hrc>
#include "helpid.hrc"
+#include <svx/colorbox.hxx>
#include "svx/xattr.hxx"
#include <svx/xpool.hxx>
#include <svx/xtable.hxx>
@@ -118,7 +119,8 @@ SvxHatchTabPage::SvxHatchTabPage
m_pMtrAngle->SetModifyHdl( aLink );
m_pSliderAngle->SetSlideHdl( LINK( this, SvxHatchTabPage, ModifiedSliderHdl_Impl ) );
m_pLbLineType->SetSelectHdl( aLink2 );
- m_pLbLineColor->SetSelectHdl( aLink2 );
+ Link<SvxColorListBox&,void> aLink3 = LINK( this, SvxHatchTabPage, ModifiedColorListBoxHdl_Impl );
+ m_pLbLineColor->SetSelectHdl( aLink3 );
m_pCbBackgroundColor->SetToggleHdl( LINK( this, SvxHatchTabPage, ToggleHatchBackgroundColor_Impl ) );
m_pLbBackgroundColor->SetSelectHdl( LINK( this, SvxHatchTabPage, ModifiedBackgroundHdl_Impl ) );
@@ -150,20 +152,13 @@ void SvxHatchTabPage::dispose()
SvxTabPage::dispose();
}
-
void SvxHatchTabPage::Construct()
{
- m_pLbLineColor->Fill( m_pColorList );
- m_pLbBackgroundColor->Fill( m_pColorList );
m_pHatchLB->FillPresetListBox(*m_pHatchingList);
}
-
void SvxHatchTabPage::ActivatePage( const SfxItemSet& rSet )
{
- sal_Int32 nPos;
- sal_Int32 nCount;
-
if( m_pColorList.is() )
{
// ColorList
@@ -175,18 +170,6 @@ void SvxHatchTabPage::ActivatePage( const SfxItemSet& rSet )
if (pArea)
m_pColorList = pArea->GetNewColorList();
- // LbLineColor
- nPos = m_pLbLineColor->GetSelectEntryPos();
- m_pLbLineColor->Clear();
- m_pLbLineColor->Fill( m_pColorList );
- nCount = m_pLbLineColor->GetEntryCount();
- if( nCount == 0 )
- ; // this case should not occur
- else if( nCount <= nPos )
- m_pLbLineColor->SelectEntryPos( 0 );
- else
- m_pLbLineColor->SelectEntryPos( nPos );
-
ModifiedHdl_Impl( this );
}
@@ -228,12 +211,6 @@ void SvxHatchTabPage::ActivatePage( const SfxItemSet& rSet )
Color aColor(aColorItem.GetColorValue());
m_pLbBackgroundColor->Enable();
m_pLbBackgroundColor->SelectEntry(aColor);
-
- if( m_pLbBackgroundColor->GetSelectEntryCount() == 0 )
- {
- m_pLbBackgroundColor->InsertEntry( aColor , OUString() );
- m_pLbBackgroundColor->SelectEntry( aColor );
- }
m_rXFSet.Put( aColorItem );
}
else
@@ -295,15 +272,10 @@ bool SvxHatchTabPage::FillItemSet( SfxItemSet* rSet )
rSet->Put( XFillStyleItem( drawing::FillStyle_HATCH ) );
rSet->Put( XFillHatchItem( aString, *pXHatch ) );
rSet->Put( XFillBackgroundItem( m_pCbBackgroundColor->IsChecked() ) );
- if(m_pCbBackgroundColor->IsChecked())
+ if (m_pCbBackgroundColor->IsChecked())
{
- sal_uInt32 nPosBckColor = m_pLbBackgroundColor->GetSelectEntryPos();
- OUString aBckColorString;
- if( nPosBckColor != LISTBOX_ENTRY_NOTFOUND )
- aBckColorString = m_pLbBackgroundColor->GetSelectEntry();
- else
- aBckColorString = OUString();
- rSet->Put( XFillColorItem( aBckColorString, m_pLbBackgroundColor->GetSelectEntryColor() ) );
+ NamedColor aColor = m_pLbBackgroundColor->GetSelectEntry();
+ rSet->Put(XFillColorItem(aColor.second, aColor.first));
}
return true;
}
@@ -335,12 +307,16 @@ VclPtr<SfxTabPage> SvxHatchTabPage::Create( vcl::Window* pWindow,
return VclPtr<SvxHatchTabPage>::Create( pWindow, *rSet );
}
-
IMPL_LINK( SvxHatchTabPage, ModifiedListBoxHdl_Impl, ListBox&, rListBox, void )
{
ModifiedHdl_Impl(&rListBox);
}
+IMPL_LINK( SvxHatchTabPage, ModifiedColorListBoxHdl_Impl, SvxColorListBox&, rListBox, void )
+{
+ ModifiedHdl_Impl(&rListBox);
+}
+
IMPL_LINK_NOARG( SvxHatchTabPage, ToggleHatchBackgroundColor_Impl, CheckBox&, void )
{
if(m_pCbBackgroundColor->IsChecked())
@@ -351,7 +327,7 @@ IMPL_LINK_NOARG( SvxHatchTabPage, ToggleHatchBackgroundColor_Impl, CheckBox&, vo
ModifiedBackgroundHdl_Impl(*m_pLbBackgroundColor);
}
-IMPL_LINK_NOARG( SvxHatchTabPage, ModifiedBackgroundHdl_Impl, ListBox&, void )
+IMPL_LINK_NOARG( SvxHatchTabPage, ModifiedBackgroundHdl_Impl, SvxColorListBox&, void )
{
Color aColor(COL_TRANSPARENT);
if(m_pCbBackgroundColor->IsChecked())
@@ -429,15 +405,8 @@ void SvxHatchTabPage::ChangeHatchHdl_Impl()
{
m_pLbLineType->SelectEntryPos(
sal::static_int_cast< sal_Int32 >( pHatch->GetHatchStyle() ) );
- // if the entry is not in the listbox
- // the color is added temporarily
m_pLbLineColor->SetNoSelection();
m_pLbLineColor->SelectEntry( pHatch->GetColor() );
- if( m_pLbLineColor->GetSelectEntryCount() == 0 )
- {
- m_pLbLineColor->InsertEntry( pHatch->GetColor(), OUString() );
- m_pLbLineColor->SelectEntry( pHatch->GetColor() );
- }
SetMetricValue( *m_pMtrDistance, pHatch->GetDistance(), m_ePoolUnit );
long mHatchAngle = pHatch->GetAngle() / 10;
m_pMtrAngle->SetValue( mHatchAngle );
diff --git a/cui/source/tabpages/tpline.cxx b/cui/source/tabpages/tpline.cxx
index 11ffd614387d..3172081f1a2c 100644
--- a/cui/source/tabpages/tpline.cxx
+++ b/cui/source/tabpages/tpline.cxx
@@ -24,6 +24,7 @@
#include <sfx2/module.hxx>
#include <cuires.hrc>
+#include <svx/colorbox.hxx>
#include "svx/xattr.hxx"
#include <svx/xpool.hxx>
#include <svx/xtable.hxx>
@@ -268,8 +269,6 @@ void SvxLineTabPage::dispose()
void SvxLineTabPage::Construct()
{
- // Color chart
- m_pLbColor->Fill( m_pColorList );
FillListboxes();
}
@@ -641,17 +640,6 @@ void SvxLineTabPage::ActivatePage( const SfxItemSet& rSet )
{
if( *m_pnColorListState & ChangeType::CHANGED )
m_pColorList = static_cast<SvxLineTabDialog*>( GetParentDialog() )->GetNewColorList();
- // aLbColor
- sal_Int32 nColorPos = m_pLbColor->GetSelectEntryPos();
- m_pLbColor->Clear();
- m_pLbColor->Fill( m_pColorList );
- nCount = m_pLbColor->GetEntryCount();
- if( nCount == 0 )
- ; // This case should never occur
- else if( nCount <= nColorPos )
- m_pLbColor->SelectEntryPos( 0 );
- else
- m_pLbColor->SelectEntryPos( nColorPos );
ChangePreviewHdl_Impl( nullptr );
}
@@ -767,9 +755,9 @@ bool SvxLineTabPage::FillItemSet( SfxItemSet* rAttrs )
}
// Line color
- if( m_pLbColor->IsValueChangedFromSaved() )
{
- XLineColorItem aItem( m_pLbColor->GetSelectEntry(), m_pLbColor->GetSelectEntryColor() );
+ NamedColor aColor = m_pLbColor->GetSelectEntry();
+ XLineColorItem aItem(aColor.second, aColor.first);
pOld = GetOldItem( *rAttrs, XATTR_LINECOLOR );
if ( !pOld || !( *static_cast<const XLineColorItem*>(pOld) == aItem ) )
{
@@ -1070,7 +1058,8 @@ void SvxLineTabPage::FillXLSet_Impl()
m_rXLSet.Put( XLineEndWidthItem( GetCoreValue( *m_pMtrEndWidth, m_ePoolUnit ) ) );
m_rXLSet.Put( XLineWidthItem( GetCoreValue( *m_pMtrLineWidth, m_ePoolUnit ) ) );
- m_rXLSet.Put( XLineColorItem( m_pLbColor->GetSelectEntry(), m_pLbColor->GetSelectEntryColor() ) );
+ NamedColor aColor = m_pLbColor->GetSelectEntry();
+ m_rXLSet.Put(XLineColorItem(aColor.second, aColor.first));
// Centered line end
if( m_pTsbCenterStart->GetState() == TRISTATE_TRUE )
@@ -1260,11 +1249,6 @@ void SvxLineTabPage::Reset( const SfxItemSet* rAttrs )
{
Color aCol = static_cast<const XLineColorItem&>( rAttrs->Get( XATTR_LINECOLOR ) ).GetColorValue();
m_pLbColor->SelectEntry( aCol );
- if( m_pLbColor->GetSelectEntryCount() == 0 )
- {
- m_pLbColor->InsertEntry( aCol, OUString() );
- m_pLbColor->SelectEntry( aCol );
- }
}
// Line start
@@ -1498,11 +1482,11 @@ VclPtr<SfxTabPage> SvxLineTabPage::Create( vcl::Window* pWindow,
return VclPtr<SvxLineTabPage>::Create( pWindow, *rAttrs );
}
-
-IMPL_LINK( SvxLineTabPage, ChangePreviewListBoxHdl_Impl, ListBox&, rListBox, void )
+IMPL_LINK( SvxLineTabPage, ChangePreviewListBoxHdl_Impl, SvxColorListBox&, rListBox, void )
{
ChangePreviewHdl_Impl(&rListBox);
}
+
IMPL_LINK( SvxLineTabPage, ChangePreviewModifyHdl_Impl, Edit&, rEdit, void )
{
ChangePreviewHdl_Impl(&rEdit);
diff --git a/cui/source/tabpages/tppattern.cxx b/cui/source/tabpages/tppattern.cxx
index 253b1984d478..cb4c7a3d7b88 100644
--- a/cui/source/tabpages/tppattern.cxx
+++ b/cui/source/tabpages/tppattern.cxx
@@ -27,6 +27,7 @@
#include <sfx2/filedlghelper.hxx>
#include <unotools/localfilehelper.hxx>
#include "com/sun/star/ui/dialogs/TemplateDescription.hpp"
+#include <svx/colorbox.hxx>
#include <svx/dialmgr.hxx>
#include <vcl/bitmapaccess.hxx>
#include <vcl/settings.hxx>
@@ -158,17 +159,11 @@ void SvxPatternTabPage::dispose()
void SvxPatternTabPage::Construct()
{
- m_pLbColor->Fill( m_pColorList );
- m_pLbBackgroundColor->CopyEntries( *m_pLbColor );
m_pPatternLB->FillPresetListBox( *m_pPatternList );
}
-
void SvxPatternTabPage::ActivatePage( const SfxItemSet& rSet )
{
- sal_Int32 nPos;
- sal_Int32 nCount;
-
if( m_pColorList.is() )
{
// ColorList
@@ -179,30 +174,6 @@ void SvxPatternTabPage::ActivatePage( const SfxItemSet& rSet )
dynamic_cast<SvxAreaTabDialog*>(GetParentDialog()) : nullptr;
if (pArea)
m_pColorList = pArea->GetNewColorList();
-
- // LbColor
- nPos = m_pLbColor->GetSelectEntryPos();
- m_pLbColor->Clear();
- m_pLbColor->Fill( m_pColorList );
- nCount = m_pLbColor->GetEntryCount();
- if( nCount == 0 )
- ; // this case should not occur
- else if( nCount <= nPos )
- m_pLbColor->SelectEntryPos( 0 );
- else
- m_pLbColor->SelectEntryPos( nPos );
-
- // LbColorBackground
- nPos = m_pLbBackgroundColor->GetSelectEntryPos();
- m_pLbBackgroundColor->Clear();
- m_pLbBackgroundColor->CopyEntries( *m_pLbColor );
- nCount = m_pLbBackgroundColor->GetEntryCount();
- if( nCount == 0 )
- ; // this case should not occur
- else if( nCount <= nPos )
- m_pLbBackgroundColor->SelectEntryPos( 0 );
- else
- m_pLbBackgroundColor->SelectEntryPos( nPos );
}
// determining (possibly cutting) the name and
@@ -353,34 +324,9 @@ IMPL_LINK_NOARG(SvxPatternTabPage, ChangePatternHdl_Impl, ValueSet*, void)
Color aPixelColor = aFront;
Color aBackColor = aBack;
- // #i123564# This causes the wrong color to be selected
- // as foreground color when the 1st bitmap in the bitmap
- // list is selected. I see no reason why this is done,
- // thus I will take it out
-
- //if( 0 == m_pLbBitmaps->GetSelectEntryPos() )
- //{
- // m_pLbColor->SelectEntry( Color( COL_BLACK ) );
- // ChangePixelColorHdl_Impl( this );
- //}
- //else
-
m_pLbColor->SelectEntry( aPixelColor );
-
- if( m_pLbColor->GetSelectEntryCount() == 0 )
- {
- m_pLbColor->InsertEntry( aPixelColor, OUString() );
- m_pLbColor->SelectEntry( aPixelColor );
- }
-
m_pLbBackgroundColor->SelectEntry( aBackColor );
- if( m_pLbBackgroundColor->GetSelectEntryCount() == 0 )
- {
- m_pLbBackgroundColor->InsertEntry( aBackColor, OUString() );
- m_pLbBackgroundColor->SelectEntry( aBackColor );
- }
-
// update m_pBitmapCtl, rXFSet and m_pCtlPreview
m_pBitmapCtl->SetPixelColor( aPixelColor );
m_pBitmapCtl->SetBackgroundColor( aBackColor );
@@ -608,7 +554,7 @@ IMPL_LINK_NOARG(SvxPatternTabPage, ClickDeleteHdl_Impl, SvxPresetListBox*, void)
}
}
-IMPL_LINK_NOARG(SvxPatternTabPage, ChangeColorHdl_Impl, ListBox&, void)
+IMPL_LINK_NOARG(SvxPatternTabPage, ChangeColorHdl_Impl, SvxColorListBox&, void)
{
ChangeColor_Impl();
}
diff --git a/cui/source/tabpages/tpshadow.cxx b/cui/source/tabpages/tpshadow.cxx
index d2b1dca3ce28..84179d24f7bb 100644
--- a/cui/source/tabpages/tpshadow.cxx
+++ b/cui/source/tabpages/tpshadow.cxx
@@ -19,6 +19,7 @@
#include <sfx2/app.hxx>
#include <sfx2/module.hxx>
+#include <svx/colorbox.hxx>
#include <svx/dialogs.hrc>
#include "svx/xattr.hxx"
@@ -182,17 +183,8 @@ void SvxShadowTabPage::dispose()
SvxTabPage::dispose();
}
-void SvxShadowTabPage::Construct()
-{
- m_pLbShadowColor->Fill( m_pColorList );
-}
-
-
void SvxShadowTabPage::ActivatePage( const SfxItemSet& rSet )
{
- sal_Int32 nPos;
- sal_Int32 nCount;
-
const SfxUInt16Item* pPageTypeItem = rSet.GetItem<SfxUInt16Item>(SID_PAGE_TYPE, false);
if (pPageTypeItem)
SetPageType((PageType) pPageTypeItem->GetValue());
@@ -220,18 +212,6 @@ void SvxShadowTabPage::ActivatePage( const SfxItemSet& rSet )
}
}
- // aLbShadowColor
- nPos = m_pLbShadowColor->GetSelectEntryPos();
- m_pLbShadowColor->Clear();
- m_pLbShadowColor->Fill( m_pColorList );
- nCount = m_pLbShadowColor->GetEntryCount();
- if( nCount == 0 )
- ; // this case should not occur
- else if( nCount <= nPos )
- m_pLbShadowColor->SelectEntryPos( 0 );
- else
- m_pLbShadowColor->SelectEntryPos( nPos );
-
SfxItemSet rAttribs( rSet );
// rSet contains shadow attributes too, but we want
// to use it for updating rectangle attributes only,
@@ -335,9 +315,6 @@ bool SvxShadowTabPage::FillItemSet( SfxItemSet* rAttrs )
}
// ShadowColor
- sal_Int32 nPos = m_pLbShadowColor->GetSelectEntryPos();
- if( nPos != LISTBOX_ENTRY_NOTFOUND &&
- m_pLbShadowColor->IsValueChangedFromSaved() )
{
XColorItem aItem(makeSdrShadowColorItem(m_pLbShadowColor->GetSelectEntryColor()));
pOld = GetOldItem( *rAttrs, SDRATTR_SHADOWCOLOR );
@@ -488,11 +465,11 @@ IMPL_LINK_NOARG(SvxShadowTabPage, ClickShadowHdl_Impl, Button*, void)
ModifyShadowHdl_Impl( *m_pMtrTransparent );
}
-
-IMPL_LINK_NOARG(SvxShadowTabPage, SelectShadowHdl_Impl, ListBox&, void)
+IMPL_LINK_NOARG(SvxShadowTabPage, SelectShadowHdl_Impl, SvxColorListBox&, void)
{
ModifyShadowHdl_Impl(*m_pMtrTransparent);
}
+
IMPL_LINK_NOARG(SvxShadowTabPage, ModifyShadowHdl_Impl, Edit&, void)
{
if( m_pTsbShowShadow->GetState() == TRISTATE_TRUE )
@@ -500,11 +477,7 @@ IMPL_LINK_NOARG(SvxShadowTabPage, ModifyShadowHdl_Impl, Edit&, void)
else
m_rXFSet.Put( XFillStyleItem( drawing::FillStyle_NONE ) );
- sal_Int32 nPos = m_pLbShadowColor->GetSelectEntryPos();
- if( nPos != LISTBOX_ENTRY_NOTFOUND )
- {
- m_rXFSet.Put( XFillColorItem( OUString(), m_pLbShadowColor->GetSelectEntryColor() ) );
- }
+ m_rXFSet.Put( XFillColorItem( OUString(), m_pLbShadowColor->GetSelectEntryColor() ) );
sal_uInt16 nVal = (sal_uInt16)m_pMtrTransparent->GetValue();
XFillTransparenceItem aItem( nVal );
m_rXFSet.Put( XFillTransparenceItem( aItem ) );
@@ -553,7 +526,6 @@ void SvxShadowTabPage::PageCreated(const SfxAllItemSet& aSet)
SetPageType((PageType) pPageTypeItem->GetValue());
if (pDlgTypeItem)
SetDlgType(pDlgTypeItem->GetValue());
- Construct();
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/uiconfig/ui/borderpage.ui b/cui/uiconfig/ui/borderpage.ui
index c783d268396a..a3cb06bb068a 100644
--- a/cui/uiconfig/ui/borderpage.ui
+++ b/cui/uiconfig/ui/borderpage.ui
@@ -233,7 +233,7 @@
</packing>
</child>
<child>
- <object class="svtlo-ColorListBox" id="linecolorlb">
+ <object class="svxcorelo-SvxColorListBox" id="linecolorlb">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
@@ -505,7 +505,7 @@
</packing>
</child>
<child>
- <object class="svtlo-ColorListBox" id="shadowcolorlb">
+ <object class="svxcorelo-SvxColorListBox" id="shadowcolorlb">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
diff --git a/cui/uiconfig/ui/colorconfigwin.ui b/cui/uiconfig/ui/colorconfigwin.ui
index d03daf7c34fd..6c8dd3f6aedb 100644
--- a/cui/uiconfig/ui/colorconfigwin.ui
+++ b/cui/uiconfig/ui/colorconfigwin.ui
@@ -38,7 +38,7 @@
</packing>
</child>
<child>
- <object class="svtlo-ColorListBox" id="doccolor_lb">
+ <object class="svxcorelo-SvxColorListBox" id="doccolor_lb">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
@@ -72,7 +72,7 @@
</packing>
</child>
<child>
- <object class="svtlo-ColorListBox" id="docboundaries_lb">
+ <object class="svxcorelo-SvxColorListBox" id="docboundaries_lb">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
@@ -98,7 +98,7 @@
</packing>
</child>
<child>
- <object class="svtlo-ColorListBox" id="appback_lb">
+ <object class="svxcorelo-SvxColorListBox" id="appback_lb">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
@@ -148,7 +148,7 @@
</packing>
</child>
<child>
- <object class="svtlo-ColorListBox" id="objboundaries_lb">
+ <object class="svxcorelo-SvxColorListBox" id="objboundaries_lb">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
@@ -185,7 +185,7 @@
</packing>
</child>
<child>
- <object class="svtlo-ColorListBox" id="tblboundaries_lb">
+ <object class="svxcorelo-SvxColorListBox" id="tblboundaries_lb">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
@@ -220,7 +220,7 @@
</packing>
</child>
<child>
- <object class="svtlo-ColorListBox" id="font_lb">
+ <object class="svxcorelo-SvxColorListBox" id="font_lb">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
@@ -257,7 +257,7 @@
</packing>
</child>
<child>
- <object class="svtlo-ColorListBox" id="unvisitedlinks_lb">
+ <object class="svxcorelo-SvxColorListBox" id="unvisitedlinks_lb">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
@@ -294,7 +294,7 @@
</packing>
</child>
<child>
- <object class="svtlo-ColorListBox" id="visitedlinks_lb">
+ <object class="svxcorelo-SvxColorListBox" id="visitedlinks_lb">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
@@ -354,7 +354,7 @@
</packing>
</child>
<child>
- <object class="svtlo-ColorListBox" id="autospellcheck_lb">
+ <object class="svxcorelo-SvxColorListBox" id="autospellcheck_lb">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
@@ -364,7 +364,7 @@
</packing>
</child>
<child>
- <object class="svtlo-ColorListBox" id="shadows_lb">
+ <object class="svxcorelo-SvxColorListBox" id="shadows_lb">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
@@ -374,7 +374,7 @@
</packing>
</child>
<child>
- <object class="svtlo-ColorListBox" id="smarttags_lb">
+ <object class="svxcorelo-SvxColorListBox" id="smarttags_lb">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
@@ -400,7 +400,7 @@
</packing>
</child>
<child>
- <object class="svtlo-ColorListBox" id="writergrid_lb">
+ <object class="svxcorelo-SvxColorListBox" id="writergrid_lb">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
@@ -435,7 +435,7 @@
</packing>
</child>
<child>
- <object class="svtlo-ColorListBox" id="field_lb">
+ <object class="svxcorelo-SvxColorListBox" id="field_lb">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
@@ -457,7 +457,7 @@
</packing>
</child>
<child>
- <object class="svtlo-ColorListBox" id="index_lb">
+ <object class="svxcorelo-SvxColorListBox" id="index_lb">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
@@ -479,7 +479,7 @@
</packing>
</child>
<child>
- <object class="svtlo-ColorListBox" id="script_lb">
+ <object class="svxcorelo-SvxColorListBox" id="script_lb">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
@@ -559,7 +559,7 @@
</packing>
</child>
<child>
- <object class="svtlo-ColorListBox" id="section_lb">
+ <object class="svxcorelo-SvxColorListBox" id="section_lb">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
@@ -581,7 +581,7 @@
</packing>
</child>
<child>
- <object class="svtlo-ColorListBox" id="hdft_lb">
+ <object class="svxcorelo-SvxColorListBox" id="hdft_lb">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
@@ -616,7 +616,7 @@
</packing>
</child>
<child>
- <object class="svtlo-ColorListBox" id="pagebreak_lb">
+ <object class="svxcorelo-SvxColorListBox" id="pagebreak_lb">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
@@ -651,7 +651,7 @@
</packing>
</child>
<child>
- <object class="svtlo-ColorListBox" id="direct_lb">
+ <object class="svxcorelo-SvxColorListBox" id="direct_lb">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
@@ -702,7 +702,7 @@
</packing>
</child>
<child>
- <object class="svtlo-ColorListBox" id="sgml_lb">
+ <object class="svxcorelo-SvxColorListBox" id="sgml_lb">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
@@ -737,7 +737,7 @@
</packing>
</child>
<child>
- <object class="svtlo-ColorListBox" id="htmlcomment_lb">
+ <object class="svxcorelo-SvxColorListBox" id="htmlcomment_lb">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
@@ -772,7 +772,7 @@
</packing>
</child>
<child>
- <object class="svtlo-ColorListBox" id="htmlkeyword_lb">
+ <object class="svxcorelo-SvxColorListBox" id="htmlkeyword_lb">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
@@ -807,7 +807,7 @@
</packing>
</child>
<child>
- <object class="svtlo-ColorListBox" id="unknown_lb">
+ <object class="svxcorelo-SvxColorListBox" id="unknown_lb">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
@@ -858,7 +858,7 @@
</packing>
</child>
<child>
- <object class="svtlo-ColorListBox" id="calcgrid_lb">
+ <object class="svxcorelo-SvxColorListBox" id="calcgrid_lb">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
@@ -893,7 +893,7 @@
</packing>
</child>
<child>
- <object class="svtlo-ColorListBox" id="brk_lb">
+ <object class="svxcorelo-SvxColorListBox" id="brk_lb">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
@@ -928,7 +928,7 @@
</packing>
</child>
<child>
- <object class="svtlo-ColorListBox" id="brkmanual_lb">
+ <object class="svxcorelo-SvxColorListBox" id="brkmanual_lb">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
@@ -963,7 +963,7 @@
</packing>
</child>
<child>
- <object class="svtlo-ColorListBox" id="brkauto_lb">
+ <object class="svxcorelo-SvxColorListBox" id="brkauto_lb">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
@@ -998,7 +998,7 @@
</packing>
</child>
<child>
- <object class="svtlo-ColorListBox" id="det_lb">
+ <object class="svxcorelo-SvxColorListBox" id="det_lb">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
@@ -1033,7 +1033,7 @@
</packing>
</child>
<child>
- <object class="svtlo-ColorListBox" id="deterror_lb">
+ <object class="svxcorelo-SvxColorListBox" id="deterror_lb">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
@@ -1068,7 +1068,7 @@
</packing>
</child>
<child>
- <object class="svtlo-ColorListBox" id="ref_lb">
+ <object class="svxcorelo-SvxColorListBox" id="ref_lb">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
@@ -1103,7 +1103,7 @@
</packing>
</child>
<child>
- <object class="svtlo-ColorListBox" id="notes_lb">
+ <object class="svxcorelo-SvxColorListBox" id="notes_lb">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
@@ -1154,7 +1154,7 @@
</packing>
</child>
<child>
- <object class="svtlo-ColorListBox" id="drawgrid_lb">
+ <object class="svxcorelo-SvxColorListBox" id="drawgrid_lb">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
@@ -1205,7 +1205,7 @@
</packing>
</child>
<child>
- <object class="svtlo-ColorListBox" id="basicid_lb">
+ <object class="svxcorelo-SvxColorListBox" id="basicid_lb">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
@@ -1240,7 +1240,7 @@
</packing>
</child>
<child>
- <object class="svtlo-ColorListBox" id="basiccomment_lb">
+ <object class="svxcorelo-SvxColorListBox" id="basiccomment_lb">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
@@ -1275,7 +1275,7 @@
</packing>
</child>
<child>
- <object class="svtlo-ColorListBox" id="basicnumber_lb">
+ <object class="svxcorelo-SvxColorListBox" id="basicnumber_lb">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
@@ -1310,7 +1310,7 @@
</packing>
</child>
<child>
- <object class="svtlo-ColorListBox" id="basicstring_lb">
+ <object class="svxcorelo-SvxColorListBox" id="basicstring_lb">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
@@ -1345,7 +1345,7 @@
</packing>
</child>
<child>
- <object class="svtlo-ColorListBox" id="basicop_lb">
+ <object class="svxcorelo-SvxColorListBox" id="basicop_lb">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
@@ -1380,7 +1380,7 @@
</packing>
</child>
<child>
- <object class="svtlo-ColorListBox" id="basickeyword_lb">
+ <object class="svxcorelo-SvxColorListBox" id="basickeyword_lb">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
@@ -1415,7 +1415,7 @@
</packing>
</child>
<child>
- <object class="svtlo-ColorListBox" id="error_lb">
+ <object class="svxcorelo-SvxColorListBox" id="error_lb">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
@@ -1466,7 +1466,7 @@
</packing>
</child>
<child>
- <object class="svtlo-ColorListBox" id="sqlid_lb">
+ <object class="svxcorelo-SvxColorListBox" id="sqlid_lb">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
@@ -1501,7 +1501,7 @@
</packing>
</child>
<child>
- <object class="svtlo-ColorListBox" id="sqlnumber_lb">
+ <object class="svxcorelo-SvxColorListBox" id="sqlnumber_lb">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
@@ -1536,7 +1536,7 @@
</packing>
</child>
<child>
- <object class="svtlo-ColorListBox" id="sqlstring_lb">
+ <object class="svxcorelo-SvxColorListBox" id="sqlstring_lb">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
@@ -1571,7 +1571,7 @@
</packing>
</child>
<child>
- <object class="svtlo-ColorListBox" id="sqlop_lb">
+ <object class="svxcorelo-SvxColorListBox" id="sqlop_lb">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
@@ -1606,7 +1606,7 @@
</packing>
</child>
<child>
- <object class="svtlo-ColorListBox" id="sqlkeyword_lb">
+ <object class="svxcorelo-SvxColorListBox" id="sqlkeyword_lb">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
@@ -1641,7 +1641,7 @@
</packing>
</child>
<child>
- <object class="svtlo-ColorListBox" id="sqlparam_lb">
+ <object class="svxcorelo-SvxColorListBox" id="sqlparam_lb">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
@@ -1676,7 +1676,7 @@
</packing>
</child>
<child>
- <object class="svtlo-ColorListBox" id="sqlcomment_lb">
+ <object class="svxcorelo-SvxColorListBox" id="sqlcomment_lb">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
diff --git a/cui/uiconfig/ui/effectspage.ui b/cui/uiconfig/ui/effectspage.ui
index 1e9171cae8ad..bf80526b73e2 100644
--- a/cui/uiconfig/ui/effectspage.ui
+++ b/cui/uiconfig/ui/effectspage.ui
@@ -324,7 +324,7 @@
</packing>
</child>
<child>
- <object class="svtlo-ColorListBox" id="fontcolorlb">
+ <object class="svxcorelo-SvxColorListBox" id="fontcolorlb">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
@@ -389,7 +389,7 @@
</packing>
</child>
<child>
- <object class="svtlo-ColorListBox" id="underlinecolorlb">
+ <object class="svxcorelo-SvxColorListBox" id="underlinecolorlb">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
@@ -399,7 +399,7 @@
</packing>
</child>
<child>
- <object class="svtlo-ColorListBox" id="overlinecolorlb">
+ <object class="svxcorelo-SvxColorListBox" id="overlinecolorlb">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
diff --git a/cui/uiconfig/ui/gradientpage.ui b/cui/uiconfig/ui/gradientpage.ui
index 8ab982badffd..96bb4baa9d84 100644
--- a/cui/uiconfig/ui/gradientpage.ui
+++ b/cui/uiconfig/ui/gradientpage.ui
@@ -450,7 +450,7 @@
</packing>
</child>
<child>
- <object class="svxlo-ColorLB" id="colorfromlb">
+ <object class="svxcorelo-SvxColorListBox" id="colorfromlb">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="entry_text_column">0</property>
@@ -496,7 +496,7 @@
<property name="row_spacing">3</property>
<property name="column_spacing">6</property>
<child>
- <object class="svxlo-ColorLB" id="colortolb">
+ <object class="svxcorelo-SvxColorListBox" id="colortolb">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="entry_text_column">0</property>
diff --git a/cui/uiconfig/ui/hatchpage.ui b/cui/uiconfig/ui/hatchpage.ui
index fd12b3e547f7..365ce1ba5927 100644
--- a/cui/uiconfig/ui/hatchpage.ui
+++ b/cui/uiconfig/ui/hatchpage.ui
@@ -266,7 +266,7 @@
</packing>
</child>
<child>
- <object class="svxlo-ColorLB" id="linecolorlb">
+ <object class="svxcorelo-SvxColorListBox" id="linecolorlb">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
@@ -292,7 +292,7 @@
</packing>
</child>
<child>
- <object class="svxlo-ColorLB" id="backgroundcolorlb">
+ <object class="svxcorelo-SvxColorListBox" id="backgroundcolorlb">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
diff --git a/cui/uiconfig/ui/linetabpage.ui b/cui/uiconfig/ui/linetabpage.ui
index 0060a6fef564..26dd4db2b166 100644
--- a/cui/uiconfig/ui/linetabpage.ui
+++ b/cui/uiconfig/ui/linetabpage.ui
@@ -156,7 +156,7 @@
</packing>
</child>
<child>
- <object class="svxlo-ColorLB" id="LB_COLOR">
+ <object class="svxcorelo-SvxColorListBox" id="LB_COLOR">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
diff --git a/cui/uiconfig/ui/numberingoptionspage.ui b/cui/uiconfig/ui/numberingoptionspage.ui
index 71f392aab6df..b1035671e78a 100644
--- a/cui/uiconfig/ui/numberingoptionspage.ui
+++ b/cui/uiconfig/ui/numberingoptionspage.ui
@@ -485,7 +485,7 @@
</packing>
</child>
<child>
- <object class="svtlo-ColorListBox" id="color">
+ <object class="svxcorelo-SvxColorListBox" id="color">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
diff --git a/cui/uiconfig/ui/optchartcolorspage.ui b/cui/uiconfig/ui/optchartcolorspage.ui
index 3cadc55c6bec..3d1fc1a40b83 100644
--- a/cui/uiconfig/ui/optchartcolorspage.ui
+++ b/cui/uiconfig/ui/optchartcolorspage.ui
@@ -26,8 +26,7 @@
<property name="top_padding">6</property>
<property name="left_padding">12</property>
<child>
- <object class="svxlo-ColorLB" id="colors:border">
- <property name="dropdown">False</property>
+ <object class="GtkTreeView" id="colors:border">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
diff --git a/cui/uiconfig/ui/patterntabpage.ui b/cui/uiconfig/ui/patterntabpage.ui
index 03bfe52c374e..309608cd34ba 100644
--- a/cui/uiconfig/ui/patterntabpage.ui
+++ b/cui/uiconfig/ui/patterntabpage.ui
@@ -185,7 +185,7 @@
</packing>
</child>
<child>
- <object class="svxlo-ColorLB" id="LB_COLOR">
+ <object class="svxcorelo-SvxColorListBox" id="LB_COLOR">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
@@ -223,7 +223,7 @@
</packing>
</child>
<child>
- <object class="svxlo-ColorLB" id="LB_BACKGROUND_COLOR">
+ <object class="svxcorelo-SvxColorListBox" id="LB_BACKGROUND_COLOR">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
diff --git a/cui/uiconfig/ui/shadowtabpage.ui b/cui/uiconfig/ui/shadowtabpage.ui
index de63629337d3..98c2563b5b14 100644
--- a/cui/uiconfig/ui/shadowtabpage.ui
+++ b/cui/uiconfig/ui/shadowtabpage.ui
@@ -99,7 +99,7 @@
</packing>
</child>
<child>
- <object class="svxlo-ColorLB" id="LB_SHADOW_COLOR">
+ <object class="svxcorelo-SvxColorListBox" id="LB_SHADOW_COLOR">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>