summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2012-05-26 02:01:02 -0400
committerKohei Yoshida <kohei.yoshida@gmail.com>2012-05-30 11:37:19 -0400
commitf1010e946f2bed587d7e7ad4e52e20c38062f683 (patch)
tree27f6729063100dd011c766b5023e949538681132 /sc
parent805ec73aa824e7c14dc867fbf2a7f5f67fb06c7a (diff)
New skeleton dialog for detailed calculation settings.
This dialog is launched from the Formula options dialog. Change-Id: I554de0f7d376803f2e94907aa78648708b8f6b84
Diffstat (limited to 'sc')
-rw-r--r--sc/AllLangResTarget_sc.mk1
-rw-r--r--sc/Library_scui.mk1
-rw-r--r--sc/inc/sc.hrc3
-rw-r--r--sc/source/ui/inc/tpformula.hxx1
-rw-r--r--sc/source/ui/optdlg/calcoptionsdlg.cxx42
-rw-r--r--sc/source/ui/optdlg/calcoptionsdlg.hrc34
-rw-r--r--sc/source/ui/optdlg/calcoptionsdlg.hxx48
-rw-r--r--sc/source/ui/optdlg/calcoptionsdlg.src51
-rw-r--r--sc/source/ui/optdlg/tpformula.cxx14
9 files changed, 194 insertions, 1 deletions
diff --git a/sc/AllLangResTarget_sc.mk b/sc/AllLangResTarget_sc.mk
index 09526bd78025..ba833475e278 100644
--- a/sc/AllLangResTarget_sc.mk
+++ b/sc/AllLangResTarget_sc.mk
@@ -83,6 +83,7 @@ $(eval $(call gb_SrsTarget_add_files,sc/res,\
sc/source/ui/cctrl/checklistmenu.src \
sc/source/ui/navipi/navipi.src \
sc/source/ui/docshell/tpstat.src \
+ sc/source/ui/optdlg/calcoptionsdlg.src \
sc/source/ui/pagedlg/pagedlg.src \
sc/source/ui/pagedlg/tphf.src \
sc/source/ui/pagedlg/hfedtdlg.src \
diff --git a/sc/Library_scui.mk b/sc/Library_scui.mk
index 9af5a6356ac2..fbb84d69d19f 100644
--- a/sc/Library_scui.mk
+++ b/sc/Library_scui.mk
@@ -98,6 +98,7 @@ $(eval $(call gb_Library_add_exception_objects,scui,\
sc/source/ui/miscdlgs/tabbgcolordlg \
sc/source/ui/miscdlgs/textdlgs \
sc/source/ui/namedlg/namepast \
+ sc/source/ui/optdlg/calcoptionsdlg \
sc/source/ui/optdlg/opredlin \
sc/source/ui/optdlg/tpcalc \
sc/source/ui/optdlg/tpcompatibility \
diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc
index 1860bcf3e1dd..69398565537c 100644
--- a/sc/inc/sc.hrc
+++ b/sc/inc/sc.hrc
@@ -1225,8 +1225,9 @@
#define RID_SCDLG_TEXT_IMPORT_OPTIONS (SC_DIALOGS_START + 152)
#define RID_POPUP_FILTER (SC_DIALOGS_START + 153)
#define RID_SCDLG_TAB_BG_COLOR (SC_DIALOGS_START + 154)
+#define RID_SCDLG_FORMULA_CALCOPTIONS (SC_DIALOGS_START + 155)
-#define SC_DIALOGS_END (SC_DIALOGS_START + 155)
+#define SC_DIALOGS_END (SC_DIALOGS_START + 156)
#ifndef STD_MASKCOLOR
#define STD_MASKCOLOR Color { Red = 0xFF00; Green = 0x0000; Blue = 0xFF00; }
diff --git a/sc/source/ui/inc/tpformula.hxx b/sc/source/ui/inc/tpformula.hxx
index 7dda2e350f28..808e0efa3e09 100644
--- a/sc/source/ui/inc/tpformula.hxx
+++ b/sc/source/ui/inc/tpformula.hxx
@@ -52,6 +52,7 @@ private:
void ResetSeparators();
void OnFocusSeparatorInput(Edit* pEdit);
+ void LaunchCustomCalcSettings();
bool IsValidSeparator(const ::rtl::OUString& rSep) const;
bool IsValidSeparatorSet() const;
diff --git a/sc/source/ui/optdlg/calcoptionsdlg.cxx b/sc/source/ui/optdlg/calcoptionsdlg.cxx
new file mode 100644
index 000000000000..ebd6370170f7
--- /dev/null
+++ b/sc/source/ui/optdlg/calcoptionsdlg.cxx
@@ -0,0 +1,42 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License or as specified alternatively below. You may obtain a copy of
+ * the License at http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * Major Contributor(s):
+ * Copyright (C) 2012 Kohei Yoshida <kohei.yoshida@suse.com>
+ *
+ * All Rights Reserved.
+ *
+ * For minor contributions see the git repository.
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+ * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
+ */
+
+#include "calcoptionsdlg.hxx"
+#include "calcoptionsdlg.hrc"
+#include "scresid.hxx"
+
+ScCalcOptionsDialog::ScCalcOptionsDialog(Window* pParent) :
+ ModalDialog(pParent, ScResId(RID_SCDLG_FORMULA_CALCOPTIONS)),
+ maBtnOK(this, ScResId(BTN_OK)),
+ maBtnCancel(this, ScResId(BTN_CANCEL))
+{
+}
+
+ScCalcOptionsDialog::~ScCalcOptionsDialog() {}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/optdlg/calcoptionsdlg.hrc b/sc/source/ui/optdlg/calcoptionsdlg.hrc
new file mode 100644
index 000000000000..364383984c63
--- /dev/null
+++ b/sc/source/ui/optdlg/calcoptionsdlg.hrc
@@ -0,0 +1,34 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License or as specified alternatively below. You may obtain a copy of
+ * the License at http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * Major Contributor(s):
+ * Copyright (C) 2012 Kohei Yoshida <kohei.yoshida@suse.com>
+ *
+ * All Rights Reserved.
+ *
+ * For minor contributions see the git repository.
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+ * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
+ */
+
+#include "sc.hrc"
+
+#define BTN_OK 1
+#define BTN_CANCEL 2
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/optdlg/calcoptionsdlg.hxx b/sc/source/ui/optdlg/calcoptionsdlg.hxx
new file mode 100644
index 000000000000..76f99b3fba3d
--- /dev/null
+++ b/sc/source/ui/optdlg/calcoptionsdlg.hxx
@@ -0,0 +1,48 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License or as specified alternatively below. You may obtain a copy of
+ * the License at http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * Major Contributor(s):
+ * Copyright (C) 2012 Kohei Yoshida <kohei.yoshida@suse.com>
+ *
+ * All Rights Reserved.
+ *
+ * For minor contributions see the git repository.
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+ * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
+ */
+
+#ifndef __SC_OPTDLG_CALCOPTIONSDLG_HXX__
+#define __SC_OPTDLG_CALCOPTIONSDLG_HXX__
+
+#include "vcl/dialog.hxx"
+#include "vcl/button.hxx"
+
+class ScCalcOptionsDialog : public ModalDialog
+{
+public:
+ ScCalcOptionsDialog(Window* pParent);
+ virtual ~ScCalcOptionsDialog();
+
+private:
+ OKButton maBtnOK;
+ CancelButton maBtnCancel;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/optdlg/calcoptionsdlg.src b/sc/source/ui/optdlg/calcoptionsdlg.src
new file mode 100644
index 000000000000..f0e72e3d6e96
--- /dev/null
+++ b/sc/source/ui/optdlg/calcoptionsdlg.src
@@ -0,0 +1,51 @@
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License or as specified alternatively below. You may obtain a copy of
+ * the License at http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * Major Contributor(s):
+ * Copyright (C) 2012 Kohei Yoshida <kohei.yoshida@suse.com>
+ *
+ * All Rights Reserved.
+ *
+ * For minor contributions see the git repository.
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+ * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
+ */
+
+#include "calcoptionsdlg.hrc"
+
+ModalDialog RID_SCDLG_FORMULA_CALCOPTIONS
+{
+ OutputSize = TRUE ;
+ Hide = TRUE ;
+ SVLook = TRUE ;
+ Size = MAP_APPFONT ( 260, 200 ) ;
+ Text [ en-US ] = "Detailed Calculation Settings" ;
+
+ OKButton BTN_OK
+ {
+ Pos = MAP_APPFONT ( 148 , 180 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ TabStop = TRUE ;
+ };
+
+ CancelButton BTN_CANCEL
+ {
+ Pos = MAP_APPFONT ( 204 , 180 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ TabStop = TRUE ;
+ };
+};
diff --git a/sc/source/ui/optdlg/tpformula.cxx b/sc/source/ui/optdlg/tpformula.cxx
index 77c571f402bb..4ed483d6672e 100644
--- a/sc/source/ui/optdlg/tpformula.cxx
+++ b/sc/source/ui/optdlg/tpformula.cxx
@@ -41,6 +41,8 @@
#include "optdlg.hrc"
#include "scresid.hxx"
#include "formula/grammar.hxx"
+#include "calcoptionsdlg.hxx"
+#include "vcl/msgbox.hxx"
#include <unotools/localedatawrapper.hxx>
@@ -77,6 +79,7 @@ ScTpFormulaOptions::ScTpFormulaOptions(Window* pParent, const SfxItemSet& rCoreA
Link aLink = LINK( this, ScTpFormulaOptions, ButtonHdl );
maBtnSepReset.SetClickHdl(aLink);
+ maBtnCustomCalcDetails.SetClickHdl(aLink);
aLink = LINK( this, ScTpFormulaOptions, SepModifyHdl );
maEdSepFuncArg.SetModifyHdl(aLink);
@@ -124,6 +127,15 @@ void ScTpFormulaOptions::OnFocusSeparatorInput(Edit* pEdit)
maOldSepValue = pEdit->GetText();
}
+void ScTpFormulaOptions::LaunchCustomCalcSettings()
+{
+ ScCalcOptionsDialog aDlg(this);
+ if (aDlg.Execute() == RET_OK)
+ {
+
+ }
+}
+
bool ScTpFormulaOptions::IsValidSeparator(const OUString& rSep) const
{
if (rSep.getLength() != 1)
@@ -177,6 +189,8 @@ IMPL_LINK( ScTpFormulaOptions, ButtonHdl, PushButton*, pBtn )
{
if (pBtn == &maBtnSepReset)
ResetSeparators();
+ else if (pBtn == &maBtnCustomCalcDetails)
+ LaunchCustomCalcSettings();
return 0;
}