Kaydet (Commit) dc676d9d authored tarafından abdulmajeed ahmed's avatar abdulmajeed ahmed

Convert Compatibility tab page to .ui

Change-Id: I97e5ecfb800443e41b2d9a88731cc530600a7b1c
üst b5d93a58
......@@ -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 \
......
......@@ -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"
......
......@@ -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: */
......@@ -30,9 +30,7 @@ private:
virtual ~ScTpCompatOptions();
private:
FixedLine maFlKeyBindings;
FixedText maFtKeyBindings;
ListBox maLbKeyBindings;
ListBox* m_pLbKeyBindings;
};
#endif
......
......@@ -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*/)
......
......@@ -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 ;
......
<?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>
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