diff options
Diffstat (limited to 'svx/source/sidebar/shadow')
-rw-r--r-- | svx/source/sidebar/shadow/ShadowPropertyPanel.cxx | 37 | ||||
-rw-r--r-- | svx/source/sidebar/shadow/ShadowPropertyPanel.hxx | 11 |
2 files changed, 20 insertions, 28 deletions
diff --git a/svx/source/sidebar/shadow/ShadowPropertyPanel.cxx b/svx/source/sidebar/shadow/ShadowPropertyPanel.cxx index a1ea3879f3dd..0766550e29cd 100644 --- a/svx/source/sidebar/shadow/ShadowPropertyPanel.cxx +++ b/svx/source/sidebar/shadow/ShadowPropertyPanel.cxx @@ -10,6 +10,7 @@ #include <ShadowPropertyPanel.hxx> #include <comphelper/string.hxx> #include <sfx2/sidebar/ControlFactory.hxx> +#include <svx/colorbox.hxx> #include <svx/dialogs.hrc> #include <svx/dialmgr.hxx> #include <sfx2/objsh.hxx> @@ -122,25 +123,18 @@ void ShadowPropertyPanel::dispose() void ShadowPropertyPanel::Initialize() { - SfxObjectShell* pSh = SfxObjectShell::Current(); - - const SvxColorListItem* pColorListItem = static_cast<const SvxColorListItem*>(pSh ? pSh->GetItem(SID_COLOR_TABLE) : nullptr); - if (pColorListItem) - { - mpLBShadowColor->Fill(pColorListItem->GetColorList()); - mpShowShadow->SetState( TRISTATE_FALSE ); - mpShowShadow->SetClickHdl( LINK(this, ShadowPropertyPanel, ClickShadowHdl ) ); - mpShadowTransMetric->SetModifyHdl( LINK(this, ShadowPropertyPanel, ModifyShadowTransMetricHdl) ); - mpLBShadowColor->SetSelectHdl( LINK( this, ShadowPropertyPanel, ModifyShadowColorHdl ) ); - mpShadowAngle->SetModifyHdl( LINK(this, ShadowPropertyPanel, ModifyShadowDistanceHdl) ); - mpShadowDistance->SetModifyHdl( LINK(this, ShadowPropertyPanel, ModifyShadowDistanceHdl) ); - mpShadowTransSlider->SetRange(Range(0,100)); - mpShadowTransSlider->SetUpdateMode(true); - mpShadowTransSlider->SetSlideHdl( LINK(this, ShadowPropertyPanel, ModifyShadowTransSliderHdl) ); - for(sal_uInt16 i = 0; i <= 20 ; i++) - mpShadowDistance->InsertValue(i*2,FUNIT_POINT); - InsertAngleValues(); - } + mpShowShadow->SetState( TRISTATE_FALSE ); + mpShowShadow->SetClickHdl( LINK(this, ShadowPropertyPanel, ClickShadowHdl ) ); + mpShadowTransMetric->SetModifyHdl( LINK(this, ShadowPropertyPanel, ModifyShadowTransMetricHdl) ); + mpLBShadowColor->SetSelectHdl( LINK( this, ShadowPropertyPanel, ModifyShadowColorHdl ) ); + mpShadowAngle->SetModifyHdl( LINK(this, ShadowPropertyPanel, ModifyShadowDistanceHdl) ); + mpShadowDistance->SetModifyHdl( LINK(this, ShadowPropertyPanel, ModifyShadowDistanceHdl) ); + mpShadowTransSlider->SetRange(Range(0,100)); + mpShadowTransSlider->SetUpdateMode(true); + mpShadowTransSlider->SetSlideHdl( LINK(this, ShadowPropertyPanel, ModifyShadowTransSliderHdl) ); + for(sal_uInt16 i = 0; i <= 20 ; i++) + mpShadowDistance->InsertValue(i*2,FUNIT_POINT); + InsertAngleValues(); } IMPL_LINK_NOARG(ShadowPropertyPanel, ClickShadowHdl, Button*, void) @@ -159,7 +153,7 @@ IMPL_LINK_NOARG(ShadowPropertyPanel, ClickShadowHdl, Button*, void) } } -IMPL_LINK_NOARG(ShadowPropertyPanel, ModifyShadowColorHdl, ListBox&, void) +IMPL_LINK_NOARG(ShadowPropertyPanel, ModifyShadowColorHdl, SvxColorListBox&, void) { XColorItem aItem(makeSdrShadowColorItem(mpLBShadowColor->GetSelectEntryColor())); GetBindings()->GetDispatcher()->ExecuteList(SID_ATTR_SHADOW_COLOR, @@ -320,9 +314,6 @@ void ShadowPropertyPanel::NotifyItemUpdate( { mpLBShadowColor->SelectEntry(pColorItem->GetColorValue()); } - else - { - } } } break; diff --git a/svx/source/sidebar/shadow/ShadowPropertyPanel.hxx b/svx/source/sidebar/shadow/ShadowPropertyPanel.hxx index 7e7288617d32..f3fd1c7e12eb 100644 --- a/svx/source/sidebar/shadow/ShadowPropertyPanel.hxx +++ b/svx/source/sidebar/shadow/ShadowPropertyPanel.hxx @@ -25,6 +25,7 @@ #include <sfx2/request.hxx> #include <svx/dlgctrl.hxx> +class SvxColorListBox; namespace svx { namespace sidebar { @@ -60,10 +61,10 @@ public: SfxBindings* pBindings); private: - VclPtr<CheckBox> mpShowShadow; - VclPtr<MetricBox> mpShadowDistance; - VclPtr<ColorLB> mpLBShadowColor; - VclPtr<MetricBox> mpShadowAngle; + VclPtr<CheckBox> mpShowShadow; + VclPtr<MetricBox> mpShadowDistance; + VclPtr<SvxColorListBox> mpLBShadowColor; + VclPtr<MetricBox> mpShadowAngle; VclPtr<FixedText> mpFTAngle; VclPtr<FixedText> mpFTDistance; VclPtr<FixedText> mpFTTransparency; @@ -84,7 +85,7 @@ private: void SetTransparencyValue(long); void UpdateControls(); DECL_LINK(ClickShadowHdl, Button*, void); - DECL_LINK(ModifyShadowColorHdl, ListBox&, void); + DECL_LINK(ModifyShadowColorHdl, SvxColorListBox&, void); DECL_LINK(ModifyShadowTransMetricHdl, Edit&, void); DECL_LINK(ModifyShadowDistanceHdl, Edit&, void); DECL_LINK(ModifyShadowTransSliderHdl, Slider*, void); |