diff options
author | Kohei Yoshida <kohei.yoshida@gmail.com> | 2012-05-26 02:01:02 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2012-05-30 11:37:19 -0400 |
commit | f1010e946f2bed587d7e7ad4e52e20c38062f683 (patch) | |
tree | 27f6729063100dd011c766b5023e949538681132 /sc/source/ui/optdlg | |
parent | 805ec73aa824e7c14dc867fbf2a7f5f67fb06c7a (diff) |
New skeleton dialog for detailed calculation settings.
This dialog is launched from the Formula options dialog.
Change-Id: I554de0f7d376803f2e94907aa78648708b8f6b84
Diffstat (limited to 'sc/source/ui/optdlg')
-rw-r--r-- | sc/source/ui/optdlg/calcoptionsdlg.cxx | 42 | ||||
-rw-r--r-- | sc/source/ui/optdlg/calcoptionsdlg.hrc | 34 | ||||
-rw-r--r-- | sc/source/ui/optdlg/calcoptionsdlg.hxx | 48 | ||||
-rw-r--r-- | sc/source/ui/optdlg/calcoptionsdlg.src | 51 | ||||
-rw-r--r-- | sc/source/ui/optdlg/tpformula.cxx | 14 |
5 files changed, 189 insertions, 0 deletions
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; } |