diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-02-05 20:58:08 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-02-06 13:11:54 +0100 |
commit | 66693d82bae6c4333ac754f76550eb5f4a289b22 (patch) | |
tree | bcb2c29b5738bbcc63de875258b4ca62fda1b913 /svx | |
parent | cad01ea74c603affcc15a5e32f75967f6dff0f87 (diff) |
merge FillTypeLB with SvxFillTypeBox
Change-Id: Ia6229e8cc04c88e6740a12648c50cf5efca3bbd0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88067
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/dialog/dlgctrl.cxx | 31 | ||||
-rw-r--r-- | svx/source/sidebar/area/AreaPropertyPanelBase.cxx | 2 | ||||
-rw-r--r-- | svx/source/tbxctrls/itemwin.cxx | 42 |
3 files changed, 38 insertions, 37 deletions
diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx index 1e2631e990c7..fc73e1ac5a84 100644 --- a/svx/source/dialog/dlgctrl.cxx +++ b/svx/source/dialog/dlgctrl.cxx @@ -891,37 +891,6 @@ void SvxPixelCtl::Reset() Invalidate(); } -void FillTypeLB::Fill() -{ - SetUpdateMode( false ); - - InsertEntry( SvxResId(RID_SVXSTR_INVISIBLE) ); - InsertEntry( SvxResId(RID_SVXSTR_COLOR) ); - InsertEntry( SvxResId(RID_SVXSTR_GRADIENT) ); - InsertEntry( SvxResId(RID_SVXSTR_HATCH) ); - InsertEntry( SvxResId(RID_SVXSTR_BITMAP) ); - InsertEntry( SvxResId(RID_SVXSTR_PATTERN) ); - - AdaptDropDownLineCountToMaximum(); - SetUpdateMode( true ); -} - -void FillTypeLB::Fill(weld::ComboBox& rListBox) -{ - rListBox.freeze(); - - rListBox.append_text(SvxResId(RID_SVXSTR_INVISIBLE)); - rListBox.append_text(SvxResId(RID_SVXSTR_COLOR)); - rListBox.append_text(SvxResId(RID_SVXSTR_GRADIENT)); - rListBox.append_text(SvxResId(RID_SVXSTR_HATCH)); - rListBox.append_text(SvxResId(RID_SVXSTR_BITMAP)); - rListBox.append_text(SvxResId(RID_SVXSTR_PATTERN)); - - rListBox.thaw(); - - rListBox.set_active(1); // solid color -} - SvxLineLB::SvxLineLB(std::unique_ptr<weld::ComboBox> pControl) : m_xControl(std::move(pControl)) , mbAddStandardFields(true) diff --git a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx index fab124cadf6d..56b3e5602df4 100644 --- a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx +++ b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx @@ -146,7 +146,7 @@ void AreaPropertyPanelBase::dispose() void AreaPropertyPanelBase::Initialize() { - FillTypeLB::Fill(*mxLbFillType); + SvxFillTypeBox::Fill(*mxLbFillType); maGradientLinear.SetXOffset(DEFAULT_CENTERX); maGradientLinear.SetYOffset(DEFAULT_CENTERY); diff --git a/svx/source/tbxctrls/itemwin.cxx b/svx/source/tbxctrls/itemwin.cxx index 9bff3642360f..0baf9407b01e 100644 --- a/svx/source/tbxctrls/itemwin.cxx +++ b/svx/source/tbxctrls/itemwin.cxx @@ -31,6 +31,8 @@ #include <vcl/svapp.hxx> #include <vcl/settings.hxx> +#include <svx/dialmgr.hxx> +#include <svx/strings.hrc> #include <svx/svxids.hrc> #include <svx/xlnclit.hxx> @@ -191,7 +193,7 @@ void SvxMetricField::DataChanged( const DataChangedEvent& rDCEvt ) } SvxFillTypeBox::SvxFillTypeBox( vcl::Window* pParent ) : - FillTypeLB( pParent, WB_BORDER | WB_DROPDOWN | WB_AUTOHSCROLL | WB_TABSTOP ), + ListBox( pParent, WB_BORDER | WB_DROPDOWN | WB_AUTOHSCROLL | WB_TABSTOP ), nCurPos ( 0 ), bSelect ( false ) { @@ -220,13 +222,12 @@ bool SvxFillTypeBox::PreNotify( NotifyEvent& rNEvt ) } } - return FillTypeLB::PreNotify( rNEvt ); + return ListBox::PreNotify( rNEvt ); } - bool SvxFillTypeBox::EventNotify( NotifyEvent& rNEvt ) { - bool bHandled = FillTypeLB::EventNotify( rNEvt ); + bool bHandled = ListBox::EventNotify( rNEvt ); if (isDisposed()) return false; @@ -269,11 +270,42 @@ void SvxFillTypeBox::ReleaseFocus_Impl() boost::property_tree::ptree SvxFillTypeBox::DumpAsPropertyTree() { - boost::property_tree::ptree aTree = FillTypeLB::DumpAsPropertyTree(); + boost::property_tree::ptree aTree = ListBox::DumpAsPropertyTree(); aTree.put("command", ".uno:FillStyle"); return aTree; } +void SvxFillTypeBox::Fill() +{ + SetUpdateMode( false ); + + InsertEntry( SvxResId(RID_SVXSTR_INVISIBLE) ); + InsertEntry( SvxResId(RID_SVXSTR_COLOR) ); + InsertEntry( SvxResId(RID_SVXSTR_GRADIENT) ); + InsertEntry( SvxResId(RID_SVXSTR_HATCH) ); + InsertEntry( SvxResId(RID_SVXSTR_BITMAP) ); + InsertEntry( SvxResId(RID_SVXSTR_PATTERN) ); + + AdaptDropDownLineCountToMaximum(); + SetUpdateMode( true ); +} + +void SvxFillTypeBox::Fill(weld::ComboBox& rListBox) +{ + rListBox.freeze(); + + rListBox.append_text(SvxResId(RID_SVXSTR_INVISIBLE)); + rListBox.append_text(SvxResId(RID_SVXSTR_COLOR)); + rListBox.append_text(SvxResId(RID_SVXSTR_GRADIENT)); + rListBox.append_text(SvxResId(RID_SVXSTR_HATCH)); + rListBox.append_text(SvxResId(RID_SVXSTR_BITMAP)); + rListBox.append_text(SvxResId(RID_SVXSTR_PATTERN)); + + rListBox.thaw(); + + rListBox.set_active(1); // solid color +} + SvxFillAttrBox::SvxFillAttrBox( vcl::Window* pParent ) : ListBox(pParent, WB_BORDER | WB_DROPDOWN | WB_AUTOHSCROLL | WB_TABSTOP), nCurPos( 0 ) |