[Libreoffice-commits] core.git: cui/uiconfig cui/UI_cui.mk sc/inc sc/source sc/uiconfig sc/UI_scalc.mk

Caolán McNamara caolanm at redhat.com
Mon Feb 11 16:32:27 PST 2013


 cui/UI_cui.mk                              |    1 
 cui/uiconfig/ui/cellprotectionpage.ui      |  208 --------------------------
 sc/UI_scalc.mk                             |    1 
 sc/inc/helpids.h                           |    1 
 sc/inc/sc.hrc                              |    1 
 sc/source/ui/attrdlg/tabpages.cxx          |   23 --
 sc/source/ui/inc/tabpages.hxx              |   12 -
 sc/uiconfig/scalc/ui/cellprotectionpage.ui |  225 +++++++++++++++++++++++++++++
 8 files changed, 236 insertions(+), 236 deletions(-)

New commits:
commit e53c0cb90066645d66c2265afbde0a4bdc6fbc98
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Feb 12 00:12:27 2013 +0000

    address cell protection text alignment
    
    tabpage code lives in sc, so .ui should live in sc
    
    Change-Id: Ia7cfe98291ef92d5f661ff4665000a433c14c75d

diff --git a/cui/UI_cui.mk b/cui/UI_cui.mk
index 58dcb6d..820dcf2 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/cui/uiconfig/ui/cellprotectionpage.ui b/cui/uiconfig/ui/cellprotectionpage.ui
deleted file mode 100644
index e9762e2..0000000
--- a/cui/uiconfig/ui/cellprotectionpage.ui
+++ /dev/null
@@ -1,208 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<interface>
-  <!-- interface-requires gtk+ 3.0 -->
-  <object class="GtkGrid" id="ProtectionPage">
-    <property name="visible">True</property>
-    <property name="can_focus">False</property>
-    <property name="border_width">6</property>
-    <property name="row_spacing">12</property>
-    <property name="column_spacing">6</property>
-    <child>
-      <object class="GtkFrame" id="FrameProtection">
-        <property name="visible">True</property>
-        <property name="can_focus">False</property>
-        <property name="events">GDK_EXPOSURE_MASK</property>
-        <property name="hexpand">True</property>
-        <property name="label_xalign">0</property>
-        <property name="shadow_type">none</property>
-        <child>
-          <object class="GtkAlignment" id="protection1">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-            <property name="hexpand">True</property>
-            <property name="vexpand">True</property>
-            <property name="left_padding">12</property>
-            <child>
-              <object class="GtkGrid" id="grid1">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <child>
-                  <object class="GtkBox" id="box1">
-                    <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>
-                  </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>
-                <child>
-                  <object class="GtkLabel" id="label1">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="margin_left">50</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>
-                  </object>
-                  <packing>
-                    <property name="left_attach">1</property>
-                    <property name="top_attach">0</property>
-                    <property name="width">1</property>
-                    <property name="height">1</property>
-                  </packing>
-                </child>
-              </object>
-            </child>
-          </object>
-        </child>
-        <child type="label">
-          <object class="GtkLabel" id="LabelProtection">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-            <property name="label" translatable="yes">Protection</property>
-            <attributes>
-              <attribute name="weight" value="bold"/>
-            </attributes>
-          </object>
-        </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>
-    <child>
-      <object class="GtkFrame" id="framePrint">
-        <property name="visible">True</property>
-        <property name="can_focus">False</property>
-        <property name="hexpand">True</property>
-        <property name="label_xalign">0</property>
-        <property name="shadow_type">none</property>
-        <child>
-          <object class="GtkAlignment" id="alignment1">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-            <property name="left_padding">12</property>
-            <child>
-              <object class="GtkGrid" id="grid2">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <child>
-                  <object class="GtkCheckButton" id="checkHidePrinting">
-                    <property name="label" translatable="yes">Hide _when printing</property>
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">False</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">0</property>
-                    <property name="width">1</property>
-                    <property name="height">1</property>
-                  </packing>
-                </child>
-                <child>
-                  <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="label" translatable="yes">The cells selected will be omitted when printing.</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>
-                  </packing>
-                </child>
-              </object>
-            </child>
-          </object>
-        </child>
-        <child type="label">
-          <object class="GtkLabel" id="label3">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-            <property name="label" translatable="yes">Print</property>
-            <attributes>
-              <attribute name="weight" value="bold"/>
-            </attributes>
-          </object>
-        </child>
-      </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>
-  </object>
-</interface>
diff --git a/sc/UI_scalc.mk b/sc/UI_scalc.mk
index aee514e..76afe9a 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 d556337..984dea82 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 e410b63..d3fc41a 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 b0eca20..f16897a 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 f6c9ce7..2f91c26 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/sc/uiconfig/scalc/ui/cellprotectionpage.ui b/sc/uiconfig/scalc/ui/cellprotectionpage.ui
new file mode 100644
index 0000000..c619dfc
--- /dev/null
+++ b/sc/uiconfig/scalc/ui/cellprotectionpage.ui
@@ -0,0 +1,225 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <object class="GtkGrid" id="CellProtectionPage">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="border_width">6</property>
+    <property name="row_spacing">12</property>
+    <property name="column_spacing">6</property>
+    <child>
+      <object class="GtkFrame" id="FrameProtection">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="events">GDK_EXPOSURE_MASK</property>
+        <property name="hexpand">True</property>
+        <property name="label_xalign">0</property>
+        <property name="shadow_type">none</property>
+        <child>
+          <object class="GtkAlignment" id="protection1">
+            <property name="visible">True</property>
+            <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="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">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>
+                    <property name="top_attach">0</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="label1">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</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">3</property>
+                  </packing>
+                </child>
+              </object>
+            </child>
+          </object>
+        </child>
+        <child type="label">
+          <object class="GtkLabel" id="LabelProtection">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label" translatable="yes">Protection</property>
+            <attributes>
+              <attribute name="weight" value="bold"/>
+            </attributes>
+          </object>
+        </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>
+    <child>
+      <object class="GtkFrame" id="framePrint">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="hexpand">True</property>
+        <property name="label_xalign">0</property>
+        <property name="shadow_type">none</property>
+        <child>
+          <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>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</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">0</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="label4">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</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>
+                    <property name="top_attach">0</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
+                  </packing>
+                </child>
+              </object>
+            </child>
+          </object>
+        </child>
+        <child type="label">
+          <object class="GtkLabel" id="label3">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label" translatable="yes">Print</property>
+            <attributes>
+              <attribute name="weight" value="bold"/>
+            </attributes>
+          </object>
+        </child>
+      </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>
+  </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>


More information about the Libreoffice-commits mailing list