[Libreoffice-commits] core.git: sc/inc sc/source sc/uiconfig sc/UIConfig_scalc.mk
abdulmajeed ahmed
aalabdulrazzaq at kacst.edu.sa
Thu Jun 6 04:14:26 PDT 2013
sc/UIConfig_scalc.mk | 1
sc/inc/helpids.h | 1
sc/source/ui/inc/optdlg.hrc | 4 -
sc/source/ui/inc/tpcompatibility.hxx | 4 -
sc/source/ui/optdlg/tpcompatibility.cxx | 17 ++---
sc/source/ui/src/optdlg.src | 38 -----------
sc/uiconfig/scalc/ui/optcompatibilitypage.ui | 90 +++++++++++++++++++++++++++
7 files changed, 99 insertions(+), 56 deletions(-)
New commits:
commit dc676d9d7a2aa92758e97208d4c6e641d2798664
Author: abdulmajeed ahmed <aalabdulrazzaq at kacst.edu.sa>
Date: Thu Jun 6 13:01:34 2013 +0200
Convert Compatibility tab page to .ui
Change-Id: I97e5ecfb800443e41b2d9a88731cc530600a7b1c
diff --git a/sc/UIConfig_scalc.mk b/sc/UIConfig_scalc.mk
index a9b2e6a..8fc9e35 100644
--- a/sc/UIConfig_scalc.mk
+++ b/sc/UIConfig_scalc.mk
@@ -81,6 +81,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/scalc,\
sc/uiconfig/scalc/ui/managenamesdialog \
sc/uiconfig/scalc/ui/optcalculatepage \
sc/uiconfig/scalc/ui/optchangespage \
+ sc/uiconfig/scalc/ui/optcompatibilitypage \
sc/uiconfig/scalc/ui/optdefaultpage \
sc/uiconfig/scalc/ui/printeroptions \
sc/uiconfig/scalc/ui/protectsheetdlg \
diff --git a/sc/inc/helpids.h b/sc/inc/helpids.h
index 2037945..afef8bb 100644
--- a/sc/inc/helpids.h
+++ b/sc/inc/helpids.h
@@ -63,7 +63,6 @@
#define HID_SCPAGE_FORMULA "SC_HID_SCPAGE_FORMULA"
#define HID_SCPAGE_USERLISTS "SC_HID_SCPAGE_USERLISTS"
#define HID_SCPAGE_AREAS "SC_HID_SCPAGE_AREAS"
-#define HID_SCPAGE_COMPATIBILITY "SC_HID_SCPAGE_COMPATIBILITY"
#define HID_SCPAGE_SUBT_GROUP1 "SC_HID_SCPAGE_SUBT_GROUP1"
#define HID_SCPAGE_SUBT_GROUP2 "SC_HID_SCPAGE_SUBT_GROUP2"
#define HID_SCPAGE_SUBT_GROUP3 "SC_HID_SCPAGE_SUBT_GROUP3"
diff --git a/sc/source/ui/inc/optdlg.hrc b/sc/source/ui/inc/optdlg.hrc
index 78fdf85..4103d54 100644
--- a/sc/source/ui/inc/optdlg.hrc
+++ b/sc/source/ui/inc/optdlg.hrc
@@ -147,9 +147,5 @@
#define FT_ODF_RECALC 99
#define LB_ODF_RECALC 100
-// TP_COMPATIBILITY
-#define FL_KEY_BINDINGS 1
-#define FT_KEY_BINDINGS 2
-#define LB_KEY_BINDINGS 3
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/tpcompatibility.hxx b/sc/source/ui/inc/tpcompatibility.hxx
index 67b906c..01d74f4 100644
--- a/sc/source/ui/inc/tpcompatibility.hxx
+++ b/sc/source/ui/inc/tpcompatibility.hxx
@@ -30,9 +30,7 @@ private:
virtual ~ScTpCompatOptions();
private:
- FixedLine maFlKeyBindings;
- FixedText maFtKeyBindings;
- ListBox maLbKeyBindings;
+ ListBox* m_pLbKeyBindings;
};
#endif
diff --git a/sc/source/ui/optdlg/tpcompatibility.cxx b/sc/source/ui/optdlg/tpcompatibility.cxx
index 00f9ef4..3aa1b60 100644
--- a/sc/source/ui/optdlg/tpcompatibility.cxx
+++ b/sc/source/ui/optdlg/tpcompatibility.cxx
@@ -16,12 +16,9 @@
#include "appoptio.hxx"
ScTpCompatOptions::ScTpCompatOptions(Window *pParent, const SfxItemSet &rCoreAttrs) :
- SfxTabPage(pParent, ScResId(RID_SCPAGE_COMPATIBILITY), rCoreAttrs),
- maFlKeyBindings(this, ScResId(FL_KEY_BINDINGS)),
- maFtKeyBindings(this, ScResId(FT_KEY_BINDINGS)),
- maLbKeyBindings(this, ScResId(LB_KEY_BINDINGS))
+ SfxTabPage(pParent, "OptCompatibilityPage","modules/scalc/ui/optcompatibilitypage.ui", rCoreAttrs)
{
- FreeResource();
+ get(m_pLbKeyBindings,"keybindings");
}
ScTpCompatOptions::~ScTpCompatOptions()
@@ -36,11 +33,11 @@ SfxTabPage* ScTpCompatOptions::Create(Window *pParent, const SfxItemSet &rCoreAt
sal_Bool ScTpCompatOptions::FillItemSet(SfxItemSet &rCoreAttrs)
{
bool bRet = false;
- if (maLbKeyBindings.GetSavedValue() != maLbKeyBindings.GetSelectEntryPos())
+ if (m_pLbKeyBindings->GetSavedValue() != m_pLbKeyBindings->GetSelectEntryPos())
{
rCoreAttrs.Put(
SfxUInt16Item(
- SID_SC_OPT_KEY_BINDING_COMPAT, maLbKeyBindings.GetSelectEntryPos()));
+ SID_SC_OPT_KEY_BINDING_COMPAT, m_pLbKeyBindings->GetSelectEntryPos()));
bRet = true;
}
return bRet;
@@ -58,17 +55,17 @@ void ScTpCompatOptions::Reset(const SfxItemSet &rCoreAttrs)
switch (eKeyB)
{
case ScOptionsUtil::KEY_DEFAULT:
- maLbKeyBindings.SelectEntryPos(0);
+ m_pLbKeyBindings->SelectEntryPos(0);
break;
case ScOptionsUtil::KEY_OOO_LEGACY:
- maLbKeyBindings.SelectEntryPos(1);
+ m_pLbKeyBindings->SelectEntryPos(1);
break;
default:
;
}
}
- maLbKeyBindings.SaveValue();
+ m_pLbKeyBindings->SaveValue();
}
int ScTpCompatOptions::DeactivatePage(SfxItemSet* /*pSet*/)
diff --git a/sc/source/ui/src/optdlg.src b/sc/source/ui/src/optdlg.src
index d3c4fdb..89dcfe4 100644
--- a/sc/source/ui/src/optdlg.src
+++ b/sc/source/ui/src/optdlg.src
@@ -189,44 +189,6 @@ TabPage RID_SCPAGE_FORMULA
};
};
-TabPage RID_SCPAGE_COMPATIBILITY
-{
- HelpId = HID_SCPAGE_COMPATIBILITY ;
- SVLook = TRUE ;
- Hide = TRUE ;
- Pos = MAP_APPFONT ( 0 , 0 ) ;
- Size = MAP_APPFONT ( TP_WIDTH , TP_HEIGHT ) ;
-
- FixedLine FL_KEY_BINDINGS
- {
- Pos = MAP_APPFONT ( 6 , 3 ) ;
- Size = MAP_APPFONT ( 248 , 8 ) ;
- Text [ en-US ] = "Key bindings";
- };
-
- FixedText FT_KEY_BINDINGS
- {
- Pos = MAP_APPFONT ( 12, 16 ) ;
- Size = MAP_APPFONT ( 165, 24 ) ;
- Wordbreak = TRUE;
- Text [ en-US ] = "Select desired ~key binding type. Changing the key binding type may overwrite some of the existing key bindings." ;
- };
-
- ListBox LB_KEY_BINDINGS
- {
- HelpID = "sc:ListBox:RID_SCPAGE_COMPATIBILITY:LB_KEY_BINDINGS";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 179, 20 ) ;
- Size = MAP_APPFONT ( 75, 46 ) ;
- DropDown = TRUE ;
- StringList [ en-US ] =
- {
- < "Default" ; Default ; > ;
- < "OpenOffice.org legacy" ; Default ; > ;
- };
- };
-};
-
TabPage RID_SCPAGE_USERLISTS
{
HelpId = HID_SCPAGE_USERLISTS ;
diff --git a/sc/uiconfig/scalc/ui/optcompatibilitypage.ui b/sc/uiconfig/scalc/ui/optcompatibilitypage.ui
new file mode 100644
index 0000000..902ada4
--- /dev/null
+++ b/sc/uiconfig/scalc/ui/optcompatibilitypage.ui
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <!-- interface-requires LibreOffice 1.0 -->
+ <object class="GtkBox" id="OptCompatibilityPage">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="border_width">6</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkFrame" id="frame1">
+ <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="hexpand">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="GtkLabel" id="label2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Select desired _key binding type. Changing the key binding
+ type may overwrite some of the existing key bindings.</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">keybindings</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="GtkComboBoxText" id="keybindings">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="entry_text_column">0</property>
+ <property name="id_column">1</property>
+ <items>
+ <item translatable="yes">Default</item>
+ <item translatable="yes">OpenOffice.org legacy</item>
+ </items>
+ </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="label1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Key bindings</property>
+ <attributes>
+ <attribute name="weight" value="semibold"/>
+ </attributes>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+</interface>
More information about the Libreoffice-commits
mailing list