[Libreoffice-commits] core.git: svx/source
Rishabh Kumar
kris.kr296 at gmail.com
Tue Jul 28 02:11:04 PDT 2015
svx/source/sidebar/line/LinePropertyPanel.cxx | 46 +++++++++++++++++++++++++-
svx/source/sidebar/line/LinePropertyPanel.hxx | 3 +
2 files changed, 48 insertions(+), 1 deletion(-)
New commits:
commit 618fd9d91a87113a1fbb5f829bd0d61207ff78af
Author: Rishabh Kumar <kris.kr296 at gmail.com>
Date: Mon Jun 8 11:54:52 2015 +0530
Line Controls are disabled when none entry is checked
Change-Id: Ie0ece4ca4b463642ea7b45bd3e27338fa5d3b9b8
Reviewed-on: https://gerrit.libreoffice.org/16146
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Yousuf Philips <philipz85 at hotmail.com>
Tested-by: Yousuf Philips <philipz85 at hotmail.com>
Reviewed-by: Katarina Behrens <Katarina.Behrens at cib.de>
diff --git a/svx/source/sidebar/line/LinePropertyPanel.cxx b/svx/source/sidebar/line/LinePropertyPanel.cxx
index faa5477..7890bca 100644
--- a/svx/source/sidebar/line/LinePropertyPanel.cxx
+++ b/svx/source/sidebar/line/LinePropertyPanel.cxx
@@ -177,6 +177,8 @@ LinePropertyPanel::LinePropertyPanel(
{
get(mpFTWidth, "widthlabel");
get(mpTBWidth, "width");
+ get(mpFTColor, "colorlabel");
+ get(mpLBColor, "color");
get(mpFTStyle, "stylelabel");
get(mpLBStyle, "linestyle");
get(mpFTTransparency, "translabel");
@@ -201,6 +203,8 @@ void LinePropertyPanel::dispose()
{
mpFTWidth.clear();
mpTBWidth.clear();
+ mpFTColor.clear();
+ mpLBColor.clear();
mpFTStyle.clear();
mpLBStyle.clear();
mpFTTransparency.clear();
@@ -285,6 +289,8 @@ void LinePropertyPanel::Initialize()
aLink = LINK( this, LinePropertyPanel, ChangeCapStyleHdl );
mpLBCapStyle->SetSelectHdl( aLink );
mpLBCapStyle->SetAccessibleName(OUString("Cap Style"));
+
+ ActivateControls();
}
VclPtr<vcl::Window> LinePropertyPanel::Create (
@@ -611,6 +617,7 @@ void LinePropertyPanel::NotifyItemUpdate(
break;
}
}
+ ActivateControls();
}
IMPL_LINK_NOARG(LinePropertyPanel, ChangeLineStyleHdl)
@@ -647,7 +654,7 @@ IMPL_LINK_NOARG(LinePropertyPanel, ChangeLineStyleHdl)
GetBindings()->GetDispatcher()->Execute(SID_ATTR_LINE_DASH, SfxCallMode::RECORD, &aItemB, 0L);
}
}
-
+ ActivateControls();
return 0;
}
@@ -773,6 +780,43 @@ VclPtr<PopupControl> LinePropertyPanel::CreateLineWidthPopupControl (PopupContai
return VclPtrInstance<LineWidthControl>(pParent, *this);
}
+void LinePropertyPanel::ActivateControls()
+{
+ const sal_Int32 nPos(mpLBStyle->GetSelectEntryPos());
+ if( 0 == nPos )
+ {
+ mpFTWidth->Disable();
+ mpTBWidth->Disable();
+ mpFTColor->Disable();
+ mpLBColor->Disable();
+ mpFTTransparency->Disable();
+ mpMFTransparent->Disable();
+ mpFTArrow->Disable();
+ mpLBStart->Disable();
+ mpLBEnd->Disable();
+ mpFTEdgeStyle->Disable();
+ mpLBEdgeStyle->Disable();
+ mpFTCapStyle->Disable();
+ mpLBCapStyle->Disable();
+ }
+ else
+ {
+ mpFTWidth->Enable();
+ mpTBWidth->Enable();
+ mpFTColor->Enable();
+ mpLBColor->Enable();
+ mpFTTransparency->Enable();
+ mpMFTransparent->Enable();
+ mpFTArrow->Enable();
+ mpLBStart->Enable();
+ mpLBEnd->Enable();
+ mpFTEdgeStyle->Enable();
+ mpLBEdgeStyle->Enable();
+ mpFTCapStyle->Enable();
+ mpLBCapStyle->Enable();
+ }
+}
+
void LinePropertyPanel::EndLineWidthPopupMode()
{
maLineWidthPopup.Hide();
diff --git a/svx/source/sidebar/line/LinePropertyPanel.hxx b/svx/source/sidebar/line/LinePropertyPanel.hxx
index 6ef96e1..f86a205 100644
--- a/svx/source/sidebar/line/LinePropertyPanel.hxx
+++ b/svx/source/sidebar/line/LinePropertyPanel.hxx
@@ -95,6 +95,8 @@ private:
//ui controls
VclPtr<FixedText> mpFTWidth;
VclPtr<ToolBox> mpTBWidth;
+ VclPtr<FixedText> mpFTColor;
+ VclPtr<ListBox> mpLBColor;
VclPtr<FixedText> mpFTStyle;
VclPtr<ListBox> mpLBStyle;
VclPtr<FixedText> mpFTTransparency;
@@ -150,6 +152,7 @@ private:
void FillLineStyleList();
void SelectEndStyle(bool bStart);
void SelectLineStyle();
+ void ActivateControls();
DECL_LINK(ChangeLineStyleHdl, void*);
DECL_LINK_TYPED(ToolboxWidthSelectHdl, ToolBox*, void);
More information about the Libreoffice-commits
mailing list