Kaydet (Commit) b050021c authored tarafından Rishabh Kumar's avatar Rishabh Kumar Kaydeden (comit) Andras Timar

tdf#90888:Shrink the properties sidebar sections in Calc

Removal of less used controls

Change-Id: I2948e6582031db1f743af59fb1ae02c1a86467f4
Reviewed-on: https://gerrit.libreoffice.org/15935Reviewed-by: 's avatarYousuf Philips <philipz85@hotmail.com>
Tested-by: 's avatarYousuf Philips <philipz85@hotmail.com>
(cherry picked from commit 1c18deee)
Reviewed-on: https://gerrit.libreoffice.org/16133Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarPhilippe Jung <phil.jung@free.fr>
üst aa243d23
......@@ -45,7 +45,6 @@ AlignmentPropertyPanel::AlignmentPropertyPanel(
maMergeCellControl(FID_MERGE_TOGGLE, *pBindings, *this),
maWrapTextControl(SID_ATTR_ALIGN_LINEBREAK, *pBindings, *this),
maAngleControl(SID_ATTR_ALIGN_DEGREES, *pBindings, *this),
maStackControl(SID_ATTR_ALIGN_STACKED, *pBindings, *this),
mbMultiDisable(false),
mxFrame(rxFrame),
maContext(),
......@@ -56,9 +55,7 @@ AlignmentPropertyPanel::AlignmentPropertyPanel(
get(mpCBXWrapText, "wraptext");
get(mpCBXMergeCell, "mergecells");
get(mpFtRotate, "orientationlabel");
get(mpCtrlDial, "orientationcontrol");
get(mpMtrAngle, "orientationdegrees");
get(mpCbStacked, "verticallystacked");
Initialize();
......@@ -78,16 +75,13 @@ void AlignmentPropertyPanel::dispose()
mpCBXWrapText.clear();
mpCBXMergeCell.clear();
mpFtRotate.clear();
mpCtrlDial.clear();
mpMtrAngle.clear();
mpCbStacked.clear();
maAlignHorControl.dispose();
maLeftIndentControl.dispose();
maMergeCellControl.dispose();
maWrapTextControl.dispose();
maAngleControl.dispose();
maStackControl.dispose();
PanelLayout::dispose();
}
......@@ -107,8 +101,6 @@ void AlignmentPropertyPanel::Initialize()
mpCBXWrapText->SetClickHdl ( aLink );
//rotation control
mpCtrlDial->SetAccessibleName(OUString( "Text Orientation")); //wj acc
mpCtrlDial->SetModifyHdl(LINK( this, AlignmentPropertyPanel, RotationHdl));
//rotation
mpMtrAngle->SetAccessibleName(OUString( "Text Orientation")); //wj acc
......@@ -116,7 +108,6 @@ void AlignmentPropertyPanel::Initialize()
mpMtrAngle->EnableAutocomplete( false );
//Vertical stacked
mpCbStacked->SetClickHdl( LINK( this, AlignmentPropertyPanel, ClickStackHdl ) );
mpMtrAngle->InsertValue(0, FUNIT_CUSTOM);
mpMtrAngle->InsertValue(45, FUNIT_CUSTOM);
......@@ -170,27 +161,6 @@ IMPL_LINK_NOARG( AlignmentPropertyPanel, AngleModifiedHdl )
SID_ATTR_ALIGN_DEGREES, SfxCallMode::RECORD, &aAngleItem, 0L );
return 0;
}
IMPL_LINK_NOARG( AlignmentPropertyPanel, RotationHdl )
{
sal_Int32 nTmp = mpCtrlDial->GetRotation();
SfxInt32Item aAngleItem( SID_ATTR_ALIGN_DEGREES,(sal_uInt32) nTmp);
GetBindings()->GetDispatcher()->Execute(
SID_ATTR_ALIGN_DEGREES, SfxCallMode::RECORD, &aAngleItem, 0L );
return 0;
}
IMPL_LINK_NOARG( AlignmentPropertyPanel, ClickStackHdl )
{
bool bVertical = mpCbStacked->IsChecked();
SfxBoolItem aStackItem( SID_ATTR_ALIGN_STACKED, bVertical );
GetBindings()->GetDispatcher()->Execute(
SID_ATTR_ALIGN_STACKED, SfxCallMode::RECORD, &aStackItem, 0L );
return 0;
}
IMPL_LINK_NOARG(AlignmentPropertyPanel, MFLeftIndentMdyHdl)
{
mpCBXWrapText->EnableTriState(false);
......@@ -282,17 +252,14 @@ void AlignmentPropertyPanel::NotifyItemUpdate(
if( meHorAlignState == SVX_HOR_JUSTIFY_REPEAT )
{
mpFtRotate->Disable();
mpCtrlDial->Disable();
mpMtrAngle->Disable();
}
else
{
mpFtRotate->Enable(!mbMultiDisable);
mpCtrlDial->Enable(!mbMultiDisable);
mpMtrAngle->Enable(!mbMultiDisable);
}
mpCbStacked->Enable( meHorAlignState != SVX_HOR_JUSTIFY_REPEAT );
mpFTLeftIndent->Enable( meHorAlignState == SVX_HOR_JUSTIFY_LEFT );
mpMFLeftIndent->Enable( meHorAlignState == SVX_HOR_JUSTIFY_LEFT );
}
......@@ -352,7 +319,6 @@ void AlignmentPropertyPanel::NotifyItemUpdate(
{
long nTmp = static_cast<const SfxInt32Item*>(pState)->GetValue();
mpMtrAngle->SetValue( nTmp / 100); //wj
mpCtrlDial->SetRotation( nTmp );
switch(nTmp)
{
case 0:
......@@ -383,29 +349,8 @@ void AlignmentPropertyPanel::NotifyItemUpdate(
else
{
mpMtrAngle->SetText( OUString() );
mpCtrlDial->SetRotation( 0 );
}
break;
case SID_ATTR_ALIGN_STACKED:
if (eState >= SfxItemState::DEFAULT)
{
mpCbStacked->EnableTriState(false);
const SfxBoolItem* aStackItem = static_cast<const SfxBoolItem*>(pState);
mbMultiDisable = aStackItem->GetValue();
mpCbStacked->Check(mbMultiDisable);
mpFtRotate->Enable(!mbMultiDisable);
mpMtrAngle->Enable(!mbMultiDisable);
mpCtrlDial->Enable(!mbMultiDisable);
}
else
{
mbMultiDisable = true;
mpFtRotate->Disable();
mpMtrAngle->Disable();
mpCtrlDial->Disable();
mpCbStacked->EnableTriState(true);
mpCbStacked->SetState(TRISTATE_INDET);
}
}
}
......
......@@ -73,16 +73,13 @@ private:
VclPtr<CheckBox> mpCBXWrapText;
VclPtr<CheckBox> mpCBXMergeCell;
VclPtr<FixedText> mpFtRotate;
VclPtr<svx::sidebar::SidebarDialControl> mpCtrlDial;
VclPtr<MetricBox> mpMtrAngle;
VclPtr<CheckBox> mpCbStacked;
::sfx2::sidebar::ControllerItem maAlignHorControl;
::sfx2::sidebar::ControllerItem maLeftIndentControl;
::sfx2::sidebar::ControllerItem maMergeCellControl;
::sfx2::sidebar::ControllerItem maWrapTextControl;
::sfx2::sidebar::ControllerItem maAngleControl;
::sfx2::sidebar::ControllerItem maStackControl;
/// bitfield
bool mbMultiDisable : 1;
......
......@@ -132,7 +132,6 @@ CellAppearancePropertyPanel::CellAppearancePropertyPanel(
get(mpTBCellBorder, "cellbordertype");
get(mpTBLineStyle, "borderlinestyle");
get(mpTBLineColor, "borderlinecolor");
get(mpCBXShowGrid, "cellgridlines");
mpCellBorderUpdater.reset( new CellBorderUpdater(
mpTBCellBorder->GetItemId( UNO_SETBORDERSTYLE ), *mpTBCellBorder) );
......@@ -150,7 +149,6 @@ void CellAppearancePropertyPanel::dispose()
mpTBCellBorder.clear();
mpTBLineStyle.clear();
mpTBLineColor.clear();
mpCBXShowGrid.clear();
maLineStyleControl.dispose();
maBorderOuterControl.dispose();
......@@ -181,8 +179,6 @@ void CellAppearancePropertyPanel::Initialize()
mpTBLineColor->Disable();
mpCBXShowGrid->SetClickHdl ( LINK(this, CellAppearancePropertyPanel, CBOXGridShowClkHdl) );
mpTBLineColor->SetAccessibleRelationLabeledBy(mpTBLineColor);
mpTBLineStyle->SetAccessibleRelationLabeledBy(mpTBLineStyle);
}
......@@ -232,14 +228,6 @@ IMPL_LINK_TYPED(CellAppearancePropertyPanel, TbxLineStyleSelectHdl, ToolBox*, pT
}
}
IMPL_LINK_NOARG(CellAppearancePropertyPanel, CBOXGridShowClkHdl)
{
bool bState = mpCBXShowGrid->IsChecked();
SfxBoolItem aItem( FID_TAB_TOGGLE_GRID , bState);
GetBindings()->GetDispatcher()->Execute(FID_TAB_TOGGLE_GRID, SfxCallMode::RECORD, &aItem, 0L);
return 0;
}
VclPtr<vcl::Window> CellAppearancePropertyPanel::Create (
vcl::Window* pParent,
const css::uno::Reference<css::frame::XFrame>& rxFrame,
......@@ -476,22 +464,6 @@ void CellAppearancePropertyPanel::NotifyItemUpdate(
mbBLTR = false;
UpdateControlState();
break;
case FID_TAB_TOGGLE_GRID:
if(eState >= SfxItemState::DEFAULT)
{
const SfxBoolItem* pItem = dynamic_cast< const SfxBoolItem* >(pState);
if(pItem)
{
const bool bVal = pItem->GetValue();
if(bVal)
mpCBXShowGrid->Check(true);
else
mpCBXShowGrid->Check(false);
}
}
break;
}
}
......
......@@ -84,7 +84,6 @@ private:
VclPtr<ToolBox> mpTBLineStyle;
VclPtr<ToolBox> mpTBLineColor;
::boost::scoped_ptr< CellBorderUpdater > mpCellBorderUpdater;
VclPtr<CheckBox> mpCBXShowGrid;
::sfx2::sidebar::ControllerItem maLineStyleControl;
::sfx2::sidebar::ControllerItem maBorderOuterControl;
......@@ -143,7 +142,6 @@ private:
DECL_LINK_TYPED(TbxCellBorderSelectHdl, ToolBox*, void);
DECL_LINK_TYPED(TbxLineStyleSelectHdl, ToolBox*, void);
DECL_LINK(CBOXGridShowClkHdl, void*);
// for CellLineStyle popup
svx::sidebar::PopupControl* CreateCellLineStylePopupControl(svx::sidebar::PopupContainer* pParent);
......
......@@ -41,8 +41,6 @@ using ::sfx2::sidebar::Theme;
const char UNO_NUMERICFIELD[] = ".uno:NumericField";
const char UNO_NUMBERFORMATPERCENT[] = ".uno:NumberFormatPercent";
const char UNO_NUMBERFORMATCURRENCY[] = ".uno:NumberFormatCurrency";
const char UNO_NUMBERFORMATDATE[] = ".uno:NumberFormatDate";
const char UNO_INSERTFIXEDTEXT[] = ".uno:InsertFixedText";
namespace sc { namespace sidebar {
......@@ -125,10 +123,6 @@ IMPL_LINK_TYPED( NumberFormatPropertyPanel, NumFormatHdl, ToolBox*, pBox, void )
nId = 2;
else if(aCommand == UNO_NUMBERFORMATCURRENCY)
nId = 3;
else if(aCommand == UNO_NUMBERFORMATDATE)
nId = 4;
else if(aCommand == UNO_INSERTFIXEDTEXT)
nId = 9;
if( nId != mnCategorySelected )
{
......
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.18.3 -->
<interface>
<!-- interface-requires gtk+ 3.0 -->
<requires lib="gtk+" version="3.0"/>
<object class="GtkGrid" id="CellAppearancePropertyPanel">
<property name="visible">True</property>
<property name="can_focus">False</property>
......@@ -22,7 +23,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">_Cell background:</property>
<property name="label" translatable="yes">_Background:</property>
<property name="use_underline">True</property>
</object>
<packing>
......@@ -69,20 +70,6 @@
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="cellborderlabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Cell _border:</property>
<property name="use_underline">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkBox" id="box2">
<property name="visible">True</property>
......@@ -102,9 +89,8 @@
<property name="tooltip_markup" translatable="yes">Specify the borders of the selected cells.</property>
<property name="tooltip_text" translatable="yes">Specify the borders of the selected cells.</property>
<property name="halign">start</property>
<property name="use_action_appearance">False</property>
<property name="action_name">.uno:SetBorderStyle</property>
<property name="label" translatable="no">toolbutton1</property>
<property name="label">toolbutton1</property>
<property name="use_underline">True</property>
</object>
<packing>
......@@ -139,9 +125,8 @@
<property name="tooltip_markup" translatable="yes">Select the line style of the borders.</property>
<property name="tooltip_text" translatable="yes">Select the line style of the borders.</property>
<property name="halign">end</property>
<property name="use_action_appearance">False</property>
<property name="action_name">.uno:LineStyle</property>
<property name="label" translatable="no">toolbutton2</property>
<property name="label">toolbutton2</property>
<property name="use_underline">True</property>
</object>
<packing>
......@@ -204,32 +189,10 @@
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="cellgridlines">
<property name="label" translatable="yes">Show cell _grid lines</property>
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="tooltip_text" translatable="yes">Show the grid lines of the cells.</property>
<property name="action_name">.uno:ToggleSheetGrid</property>
<property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">4</property>
</packing>
</child>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
</object>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment