summaryrefslogtreecommitdiff
path: root/sc/source/ui
diff options
context:
space:
mode:
authorKohei Yoshida <kyoshida@novell.com>2010-10-11 18:13:35 -0400
committerKohei Yoshida <kyoshida@novell.com>2010-10-11 18:13:35 -0400
commit6c4839248eaf174c6bde635430bab7e29cd29e42 (patch)
tree1ccffae74a588f74c98caac92420c9dd0e54bfd6 /sc/source/ui
parent4b33c0d44fe85064d73ebe39eba4ea2d8ed018b9 (diff)
fdo#30559: Added new tab page 'Compatibility' in the Options dialog.
This is the first cut: more changes to come.
Diffstat (limited to 'sc/source/ui')
-rw-r--r--sc/source/ui/app/scmod.cxx7
-rw-r--r--sc/source/ui/attrdlg/scdlgfact.cxx3
-rw-r--r--sc/source/ui/inc/optdlg.hrc20
-rw-r--r--sc/source/ui/inc/tpcompatibility.hxx55
-rw-r--r--sc/source/ui/optdlg/makefile.mk1
-rw-r--r--sc/source/ui/optdlg/tpcompatibility.cxx67
-rw-r--r--sc/source/ui/src/optdlg.src36
7 files changed, 174 insertions, 15 deletions
diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx
index 19ecdcb728df..95d718a36633 100644
--- a/sc/source/ui/app/scmod.cxx
+++ b/sc/source/ui/app/scmod.cxx
@@ -2109,6 +2109,13 @@ SfxTabPage* ScModule::CreateTabPage( USHORT nId, Window* pParent, const SfxItem
pRet = (*ScTpFormulaOptionsCreate)(pParent, rSet);
}
break;
+ case SID_SC_TP_COMPATIBILITY:
+ {
+ ::CreateTabPage ScTpCompatOptionsCreate = pFact->GetTabPageCreatorFunc (RID_SCPAGE_COMPATIBILITY);
+ if (ScTpCompatOptionsCreate)
+ pRet = (*ScTpCompatOptionsCreate)(pParent, rSet);
+ }
+ break;
case SID_SC_TP_CHANGES:
{
::CreateTabPage ScRedlineOptionsTabPageCreate = pFact->GetTabPageCreatorFunc( RID_SCPAGE_OPREDLINE );
diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx b/sc/source/ui/attrdlg/scdlgfact.cxx
index e9141f40a871..bb1325e0280f 100644
--- a/sc/source/ui/attrdlg/scdlgfact.cxx
+++ b/sc/source/ui/attrdlg/scdlgfact.cxx
@@ -80,6 +80,7 @@
#include "tpusrlst.hxx" //add for ScTpUserLists
#include "tpview.hxx" //add for ScTpContentOptions
#include "tpformula.hxx"
+#include "tpcompatibility.hxx"
// ause
#include "editutil.hxx"
@@ -1557,6 +1558,8 @@ CreateTabPage ScAbstractDialogFactory_Impl::GetTabPageCreatorFunc( USHORT nId )
//break;
case RID_SCPAGE_FORMULA:
return ScTpFormulaOptions::Create;
+ case RID_SCPAGE_COMPATIBILITY:
+ return ScTpCompatOptions::Create;
case RID_SCPAGE_PRINT :
return ScTpPrintOptions::Create;
//break;
diff --git a/sc/source/ui/inc/optdlg.hrc b/sc/source/ui/inc/optdlg.hrc
index afe113177afd..e03f3e807037 100644
--- a/sc/source/ui/inc/optdlg.hrc
+++ b/sc/source/ui/inc/optdlg.hrc
@@ -27,13 +27,6 @@
#include "sc.hrc"
-/*
-#define RID_SCDLG_OPTIONS 256
-#define RID_SCPAGE_VIEW 256
-#define RID_SCPAGE_USERLISTS 257
-#define RID_SCPAGE_CALC 258
-#define RID_SCPAGE_PRINT 259
-*/
#define TP_GENERAL 1
#define TP_SAVE 2
@@ -90,14 +83,6 @@
#define BTN_NOTES 22
#define GB_CONTENTS 23
-//#define FT_OLE 31
-//#define FT_CHARTS 32
-//#define FT_DRAWINGS 33
-//#define LB_OLE 34
-//#define LB_CHARTS 35
-//#define LB_DRAWINGS 36
-//#define GB_OBJECTS 37
-
// TP_USERLISTS:
#define FT_LISTS 1
@@ -205,3 +190,8 @@
#define FT_FORMULA_SEP_ARRAY_C 89
#define ED_FORMULA_SEP_ARRAY_C 90
#define BTN_FORMULA_SEP_RESET 91
+
+// TP_COMPATIBILITY
+#define FL_KEY_BINDINGS 1
+#define FT_KEY_BINDINGS 2
+#define LB_KEY_BINDINGS 3
diff --git a/sc/source/ui/inc/tpcompatibility.hxx b/sc/source/ui/inc/tpcompatibility.hxx
new file mode 100644
index 000000000000..75942c7cdd46
--- /dev/null
+++ b/sc/source/ui/inc/tpcompatibility.hxx
@@ -0,0 +1,55 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyrigt 2010 Novell, Inc.
+ *
+ * LibreOffice - a multi-platform office productivity suite
+ *
+ * This file is part of LibreOffice.
+ *
+ * LibreOffice is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * LibreOffice is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with LibreOffice. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef __SC_TPCOMPATIBILITY_HXX__
+#define __SC_TPCOMPATIBILITY_HXX__
+
+#include <sfx2/tabdlg.hxx>
+#include <vcl/fixed.hxx>
+#include <vcl/lstbox.hxx>
+
+class ScTpCompatOptions : public SfxTabPage
+{
+public:
+ static SfxTabPage* Create (Window* pParent, const SfxItemSet& rCoreAttrs);
+
+ virtual BOOL FillItemSet(SfxItemSet& rCoreAttrs);
+ virtual void Reset(const SfxItemSet& rCoreAttrs);
+ virtual int DeactivatePage(SfxItemSet* pSet = NULL);
+
+private:
+ explicit ScTpCompatOptions(Window* pParent, const SfxItemSet& rCoreAttrs);
+ virtual ~ScTpCompatOptions();
+
+private:
+ FixedLine maFlKeyBindings;
+ FixedText maFtKeyBindings;
+ ListBox maLbKeyBindings;
+
+};
+
+#endif
diff --git a/sc/source/ui/optdlg/makefile.mk b/sc/source/ui/optdlg/makefile.mk
index f09eb9238f8c..90e4c9ca8bce 100644
--- a/sc/source/ui/optdlg/makefile.mk
+++ b/sc/source/ui/optdlg/makefile.mk
@@ -52,6 +52,7 @@ SLOFILES = \
$(SLO)$/tpview.obj \
$(SLO)$/tpcalc.obj \
$(SLO)$/tpformula.obj \
+ $(SLO)$/tpcompatibility.obj \
$(SLO)$/tpprint.obj \
$(SLO)$/opredlin.obj
diff --git a/sc/source/ui/optdlg/tpcompatibility.cxx b/sc/source/ui/optdlg/tpcompatibility.cxx
new file mode 100644
index 000000000000..7820dc4ad53d
--- /dev/null
+++ b/sc/source/ui/optdlg/tpcompatibility.cxx
@@ -0,0 +1,67 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyrigt 2010 Novell, Inc.
+ *
+ * LibreOffice - a multi-platform office productivity suite
+ *
+ * This file is part of LibreOffice.
+ *
+ * LibreOffice is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * LibreOffice is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with LibreOffice. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_sc.hxx"
+
+#undef SC_DLLIMPLEMENTATION
+
+#include "tpcompatibility.hxx"
+#include "optdlg.hrc"
+#include "scresid.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))
+{
+ FreeResource();
+}
+
+ScTpCompatOptions::~ScTpCompatOptions()
+{
+}
+
+SfxTabPage* ScTpCompatOptions::Create(Window *pParent, const SfxItemSet &rCoreAttrs)
+{
+ return new ScTpCompatOptions(pParent, rCoreAttrs);
+}
+
+BOOL ScTpCompatOptions::FillItemSet(SfxItemSet &rCoreAttrs)
+{
+ return false;
+}
+
+void ScTpCompatOptions::Reset(const SfxItemSet &rCoreAttrs)
+{
+}
+
+int ScTpCompatOptions::DeactivatePage(SfxItemSet* /*pSet*/)
+{
+ return KEEP_PAGE;
+}
diff --git a/sc/source/ui/src/optdlg.src b/sc/source/ui/src/optdlg.src
index db65aa7e7b09..99fc1bca7686 100644
--- a/sc/source/ui/src/optdlg.src
+++ b/sc/source/ui/src/optdlg.src
@@ -279,6 +279,42 @@ TabPage RID_SCPAGE_FORMULA
};
};
+TabPage RID_SCPAGE_COMPATIBILITY
+{
+ HelpId = HID_SCPAGE_COMPATIBILITY ;
+ SVLook = TRUE ;
+ Hide = TRUE ;
+ Pos = MAP_APPFONT ( 0 , 0 ) ;
+ Size = MAP_APPFONT ( 260 , 185 ) ;
+
+ 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 ( 21, 16 ) ;
+ Size = MAP_APPFONT ( 80, 8 ) ;
+ Text [ en-US ] = "~Key bindings" ;
+ };
+
+ ListBox LB_KEY_BINDINGS
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 85, 14 ) ;
+ Size = MAP_APPFONT ( 60, 46 ) ;
+ DropDown = TRUE ;
+ StringList [ en-US ] =
+ {
+ < "Default" ; Default ; > ;
+ < "OpenOffice.org legacy" ; Default ; > ;
+ };
+ };
+};
+
/**************************************************************************/
/* */
/* */