diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-02-12 00:12:27 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-02-12 00:31:22 +0000 |
commit | e53c0cb90066645d66c2265afbde0a4bdc6fbc98 (patch) | |
tree | fcdbf1170d203f24f3eaa49716bdd3aac594d0ff | |
parent | ed51d060fa10b2664abc24b22c20529de30dff64 (diff) |
address cell protection text alignment
tabpage code lives in sc, so .ui should live in sc
Change-Id: Ia7cfe98291ef92d5f661ff4665000a433c14c75d
-rw-r--r-- | cui/UI_cui.mk | 1 | ||||
-rw-r--r-- | sc/UI_scalc.mk | 1 | ||||
-rw-r--r-- | sc/inc/helpids.h | 1 | ||||
-rw-r--r-- | sc/inc/sc.hrc | 1 | ||||
-rw-r--r-- | sc/source/ui/attrdlg/tabpages.cxx | 23 | ||||
-rw-r--r-- | sc/source/ui/inc/tabpages.hxx | 12 | ||||
-rw-r--r-- | sc/uiconfig/scalc/ui/cellprotectionpage.ui (renamed from cui/uiconfig/ui/cellprotectionpage.ui) | 145 |
7 files changed, 92 insertions, 92 deletions
diff --git a/cui/UI_cui.mk b/cui/UI_cui.mk index 58dcb6d65878..820dcf2836e5 100644 --- a/cui/UI_cui.mk +++ b/cui/UI_cui.mk @@ -13,7 +13,6 @@ $(eval $(call gb_UI_add_uifiles,cui,\ cui/uiconfig/ui/backgroundpage \ cui/uiconfig/ui/borderpage \ cui/uiconfig/ui/charnamepage \ - cui/uiconfig/ui/cellprotectionpage \ cui/uiconfig/ui/colorpage \ cui/uiconfig/ui/gradientpage \ cui/uiconfig/ui/colorconfigwin \ diff --git a/sc/UI_scalc.mk b/sc/UI_scalc.mk index aee514edca52..76afe9a9b97e 100644 --- a/sc/UI_scalc.mk +++ b/sc/UI_scalc.mk @@ -10,6 +10,7 @@ $(eval $(call gb_UI_UI,modules/scalc)) $(eval $(call gb_UI_add_uifiles,modules/scalc,\ + sc/uiconfig/scalc/ui/cellprotectionpage \ sc/uiconfig/scalc/ui/printeroptions \ sc/uiconfig/scalc/ui/sortcriteriapage \ sc/uiconfig/scalc/ui/sortkey \ diff --git a/sc/inc/helpids.h b/sc/inc/helpids.h index d5563371a1c1..984dea82096f 100644 --- a/sc/inc/helpids.h +++ b/sc/inc/helpids.h @@ -73,7 +73,6 @@ #define HID_SC_PIVOTSUBT "SC_HID_SC_PIVOTSUBT" #define HID_SCPAGE_SUBT_OPTIONS "SC_HID_SCPAGE_SUBT_OPTIONS" #define HID_SCPAGE_SUBT_GROUP "SC_HID_SCPAGE_SUBT_GROUP" -#define HID_SCPAGE_PROTECTION "SC_HID_SCPAGE_PROTECTION" #define HID_SCPAGE_CALC "SC_HID_SCPAGE_CALC" #define HID_SCPAGE_FORMULA "SC_HID_SCPAGE_FORMULA" #define HID_SCPAGE_USERLISTS "SC_HID_SCPAGE_USERLISTS" diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc index e410b635d681..d3fc41a66f69 100644 --- a/sc/inc/sc.hrc +++ b/sc/inc/sc.hrc @@ -943,7 +943,6 @@ #define SC_DIALOGS_START (BMP_END) #define RID_SCDLG_ATTR (SC_DIALOGS_START) -#define RID_SCPAGE_PROTECTION (SC_DIALOGS_START + 3) #define RID_SCDLG_SORT (SC_DIALOGS_START + 5) #define RID_SCPAGE_SORT_FIELDS (SC_DIALOGS_START + 6) diff --git a/sc/source/ui/attrdlg/tabpages.cxx b/sc/source/ui/attrdlg/tabpages.cxx index b0eca20ccfca..f16897ac176f 100644 --- a/sc/source/ui/attrdlg/tabpages.cxx +++ b/sc/source/ui/attrdlg/tabpages.cxx @@ -43,14 +43,10 @@ static sal_uInt16 pProtectionRanges[] = // Zellschutz-Tabpage: //======================================================================== -ScTabPageProtection::ScTabPageProtection( Window* pParent, - const SfxItemSet& rCoreAttrs ) - : SfxTabPage ( pParent, - "ProtectionPage", - "cui/ui/cellprotectionpage.ui", - rCoreAttrs ) - - { +ScTabPageProtection::ScTabPageProtection(Window* pParent, const SfxItemSet& rCoreAttrs) + : SfxTabPage(pParent, "CellProtectionPage", + "modules/scalc/ui/cellprotectionpage.ui", rCoreAttrs) +{ get(m_pBtnHideCell,"checkHideAll"); get(m_pBtnProtect,"checkProtected"); get(m_pBtnHideFormula,"checkHideFormula"); @@ -66,17 +62,8 @@ ScTabPageProtection::ScTabPageProtection( Window* pParent, m_pBtnHideCell->SetClickHdl( LINK( this, ScTabPageProtection, ButtonClickHdl ) ); m_pBtnHideFormula->SetClickHdl( LINK( this, ScTabPageProtection, ButtonClickHdl ) ); m_pBtnHidePrint->SetClickHdl( LINK( this, ScTabPageProtection, ButtonClickHdl ) ); - } -// ----------------------------------------------------------------------- - -ScTabPageProtection::~ScTabPageProtection() -{ -} - -//------------------------------------------------------------------------ - sal_uInt16* ScTabPageProtection::GetRanges() { return pProtectionRanges; @@ -180,7 +167,7 @@ int ScTabPageProtection::DeactivatePage( SfxItemSet* pSetP ) //------------------------------------------------------------------------ -IMPL_LINK( ScTabPageProtection, ButtonClickHdl, CheckBox*, pBox ) +IMPL_LINK( ScTabPageProtection, ButtonClickHdl, TriStateBox*, pBox ) { TriState eState = pBox->GetState(); if ( eState == STATE_DONTKNOW ) diff --git a/sc/source/ui/inc/tabpages.hxx b/sc/source/ui/inc/tabpages.hxx index f6c9ce7b6b00..2f91c2680f98 100644 --- a/sc/source/ui/inc/tabpages.hxx +++ b/sc/source/ui/inc/tabpages.hxx @@ -42,13 +42,11 @@ protected: private: ScTabPageProtection( Window* pParent, const SfxItemSet& rCoreAttrs ); - ~ScTabPageProtection(); - private: - CheckBox* m_pBtnHideCell; - CheckBox* m_pBtnProtect; - CheckBox* m_pBtnHideFormula; - CheckBox* m_pBtnHidePrint; + TriStateBox* m_pBtnHideCell; + TriStateBox* m_pBtnProtect; + TriStateBox* m_pBtnHideFormula; + TriStateBox* m_pBtnHidePrint; // current status: sal_Bool bTriEnabled; // if before - DontCare sal_Bool bDontCare; // all in TriState @@ -58,7 +56,7 @@ private: sal_Bool bHidePrint; // Handler: - DECL_LINK( ButtonClickHdl, CheckBox* pBox ); + DECL_LINK( ButtonClickHdl, TriStateBox* pBox ); void UpdateButtons(); }; diff --git a/cui/uiconfig/ui/cellprotectionpage.ui b/sc/uiconfig/scalc/ui/cellprotectionpage.ui index e9762e22727f..c619dfc09bc4 100644 --- a/cui/uiconfig/ui/cellprotectionpage.ui +++ b/sc/uiconfig/scalc/ui/cellprotectionpage.ui @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <interface> <!-- interface-requires gtk+ 3.0 --> - <object class="GtkGrid" id="ProtectionPage"> + <object class="GtkGrid" id="CellProtectionPage"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="border_width">6</property> @@ -21,72 +21,66 @@ <property name="can_focus">False</property> <property name="hexpand">True</property> <property name="vexpand">True</property> + <property name="top_padding">6</property> <property name="left_padding">12</property> <child> <object class="GtkGrid" id="grid1"> <property name="visible">True</property> <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="row_spacing">6</property> + <property name="column_spacing">12</property> <child> - <object class="GtkBox" id="box1"> + <object class="GtkCheckButton" id="checkProtected"> + <property name="label" translatable="yes">_Protected</property> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="orientation">vertical</property> - <child> - <object class="GtkCheckButton" id="checkHideAll"> - <property name="label" translatable="yes">Hide _all</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="has_tooltip">True</property> - <property name="use_underline">True</property> - <property name="xalign">0</property> - <property name="always_show_image">True</property> - <property name="inconsistent">True</property> - <property name="draw_indicator">True</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkCheckButton" id="checkProtected"> - <property name="label" translatable="yes">_Protected</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="margin_left">25</property> - <property name="use_underline">True</property> - <property name="xalign">0</property> - <property name="active">True</property> - <property name="inconsistent">True</property> - <property name="draw_indicator">True</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">1</property> - </packing> - </child> - <child> - <object class="GtkCheckButton" id="checkHideFormula"> - <property name="label" translatable="yes">Hide _formula</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="margin_left">25</property> - <property name="use_underline">True</property> - <property name="xalign">0</property> - <property name="inconsistent">True</property> - <property name="draw_indicator">True</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">2</property> - </packing> - </child> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="margin_left">12</property> + <property name="use_underline">True</property> + <property name="xalign">0</property> + <property name="active">True</property> + <property name="inconsistent">True</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkHideFormula"> + <property name="label" translatable="yes">Hide _formula</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="margin_left">12</property> + <property name="use_underline">True</property> + <property name="xalign">0</property> + <property name="inconsistent">True</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">2</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkHideAll"> + <property name="label" translatable="yes">Hide _all</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="has_tooltip">True</property> + <property name="use_underline">True</property> + <property name="xalign">0</property> + <property name="always_show_image">True</property> + <property name="inconsistent">True</property> + <property name="draw_indicator">True</property> </object> <packing> <property name="left_attach">0</property> @@ -99,16 +93,20 @@ <object class="GtkLabel" id="label1"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="margin_left">50</property> + <property name="halign">end</property> + <property name="hexpand">True</property> + <property name="xalign">0</property> <property name="label" translatable="yes">Cell protection is only effective after the current sheet has been protected. Select 'Protect Document' from the 'Tools' menu, and specify 'Sheet'.</property> + <property name="wrap">True</property> + <property name="max_width_chars">52</property> </object> <packing> <property name="left_attach">1</property> <property name="top_attach">0</property> <property name="width">1</property> - <property name="height">1</property> + <property name="height">3</property> </packing> </child> </object> @@ -144,11 +142,13 @@ Select 'Protect Document' from the 'Tools' menu, and specify 'Sheet'.</property> <object class="GtkAlignment" id="alignment1"> <property name="visible">True</property> <property name="can_focus">False</property> + <property name="top_padding">6</property> <property name="left_padding">12</property> <child> <object class="GtkGrid" id="grid2"> <property name="visible">True</property> <property name="can_focus">False</property> + <property name="column_spacing">12</property> <child> <object class="GtkCheckButton" id="checkHidePrinting"> <property name="label" translatable="yes">Hide _when printing</property> @@ -171,9 +171,12 @@ Select 'Protect Document' from the 'Tools' menu, and specify 'Sheet'.</property> <object class="GtkLabel" id="label4"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="halign">start</property> - <property name="margin_left">12</property> + <property name="halign">end</property> + <property name="hexpand">True</property> + <property name="xalign">0</property> <property name="label" translatable="yes">The cells selected will be omitted when printing.</property> + <property name="wrap">True</property> + <property name="width_chars">52</property> </object> <packing> <property name="left_attach">1</property> @@ -205,4 +208,18 @@ Select 'Protect Document' from the 'Tools' menu, and specify 'Sheet'.</property> </packing> </child> </object> + <object class="GtkSizeGroup" id="sizegroup1"> + <widgets> + <widget name="label1"/> + <widget name="label4"/> + </widgets> + </object> + <object class="GtkSizeGroup" id="sizegroup2"> + <widgets> + <widget name="checkProtected"/> + <widget name="checkHideFormula"/> + <widget name="checkHideAll"/> + <widget name="checkHidePrinting"/> + </widgets> + </object> </interface> |