Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
bf0629e0
Kaydet (Commit)
bf0629e0
authored
Nis 09, 2012
tarafından
Albert Thuswaldner
Kaydeden (comit)
Kohei Yoshida
Nis 10, 2012
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Grouping ScFormulaOptions
üst
e6d4795e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
251 additions
and
214 deletions
+251
-214
Library_sc.mk
sc/Library_sc.mk
+1
-0
appoptio.hxx
sc/inc/appoptio.hxx
+0
-29
formulaopt.hxx
sc/inc/formulaopt.hxx
+124
-0
sc.hrc
sc/inc/sc.hrc
+1
-5
scmod.hxx
sc/inc/scmod.hxx
+5
-0
appoptio.cxx
sc/source/core/tool/appoptio.cxx
+0
-0
formulaopt.cxx
sc/source/core/tool/formulaopt.cxx
+0
-0
scmod.cxx
sc/source/ui/app/scmod.cxx
+27
-93
docsh3.cxx
sc/source/ui/docshell/docsh3.cxx
+2
-2
docsh6.cxx
sc/source/ui/docshell/docsh6.cxx
+10
-10
docsh.hxx
sc/source/ui/inc/docsh.hxx
+2
-1
tpformula.cxx
sc/source/ui/optdlg/tpformula.cxx
+79
-74
No files found.
sc/Library_sc.mk
Dosyayı görüntüle @
bf0629e0
...
@@ -177,6 +177,7 @@ $(eval $(call gb_Library_add_exception_objects,sc,\
...
@@ -177,6 +177,7 @@ $(eval $(call gb_Library_add_exception_objects,sc,\
sc/source/core/tool/doubleref \
sc/source/core/tool/doubleref \
sc/source/core/tool/editutil \
sc/source/core/tool/editutil \
sc/source/core/tool/filtopt \
sc/source/core/tool/filtopt \
sc/source/core/tool/formulaopt \
sc/source/core/tool/formulaparserpool \
sc/source/core/tool/formulaparserpool \
sc/source/core/tool/formularesult \
sc/source/core/tool/formularesult \
sc/source/core/tool/hints \
sc/source/core/tool/hints \
...
...
sc/inc/appoptio.hxx
Dosyayı görüntüle @
bf0629e0
...
@@ -91,26 +91,6 @@ public:
...
@@ -91,26 +91,6 @@ public:
ScOptionsUtil
::
KeyBindingType
GetKeyBindingType
()
const
{
return
meKeyBindingType
;
}
ScOptionsUtil
::
KeyBindingType
GetKeyBindingType
()
const
{
return
meKeyBindingType
;
}
void
SetKeyBindingType
(
ScOptionsUtil
::
KeyBindingType
e
)
{
meKeyBindingType
=
e
;
}
void
SetKeyBindingType
(
ScOptionsUtil
::
KeyBindingType
e
)
{
meKeyBindingType
=
e
;
}
void
SetFormulaSyntax
(
::
formula
::
FormulaGrammar
::
Grammar
eGram
)
{
eFormulaGrammar
=
eGram
;
}
::
formula
::
FormulaGrammar
::
Grammar
GetFormulaSyntax
()
const
{
return
eFormulaGrammar
;
}
void
SetUseEnglishFuncName
(
bool
bVal
)
{
bUseEnglishFuncName
=
bVal
;
}
bool
GetUseEnglishFuncName
()
const
{
return
bUseEnglishFuncName
;
}
void
SetFormulaSepArg
(
const
::
rtl
::
OUString
&
rSep
)
{
aFormulaSepArg
=
rSep
;
}
::
rtl
::
OUString
GetFormulaSepArg
()
const
{
return
aFormulaSepArg
;
}
void
SetFormulaSepArrayRow
(
const
::
rtl
::
OUString
&
rSep
)
{
aFormulaSepArrayRow
=
rSep
;
}
::
rtl
::
OUString
GetFormulaSepArrayRow
()
const
{
return
aFormulaSepArrayRow
;
}
void
SetFormulaSepArrayCol
(
const
::
rtl
::
OUString
&
rSep
)
{
aFormulaSepArrayCol
=
rSep
;
}
::
rtl
::
OUString
GetFormulaSepArrayCol
()
const
{
return
aFormulaSepArrayCol
;
}
void
ResetFormulaSeparators
();
static
void
GetDefaultFormulaSeparators
(
rtl
::
OUString
&
rSepArg
,
rtl
::
OUString
&
rSepArrayCol
,
rtl
::
OUString
&
rSepArrayRow
);
static
const
LocaleDataWrapper
&
GetLocaleDataWrapper
();
const
ScAppOptions
&
operator
=
(
const
ScAppOptions
&
rOpt
);
const
ScAppOptions
&
operator
=
(
const
ScAppOptions
&
rOpt
);
private
:
private
:
...
@@ -133,12 +113,6 @@ private:
...
@@ -133,12 +113,6 @@ private:
sal_Int32
nDefaultObjectSizeHeight
;
sal_Int32
nDefaultObjectSizeHeight
;
sal_Bool
mbShowSharedDocumentWarning
;
sal_Bool
mbShowSharedDocumentWarning
;
ScOptionsUtil
::
KeyBindingType
meKeyBindingType
;
ScOptionsUtil
::
KeyBindingType
meKeyBindingType
;
bool
bUseEnglishFuncName
;
// use English function name even if the locale is not English.
::
formula
::
FormulaGrammar
::
Grammar
eFormulaGrammar
;
// formula grammar used to switch different formula syntax
::
rtl
::
OUString
aFormulaSepArg
;
::
rtl
::
OUString
aFormulaSepArrayRow
;
::
rtl
::
OUString
aFormulaSepArrayCol
;
};
};
...
@@ -158,7 +132,6 @@ class ScAppCfg : public ScAppOptions
...
@@ -158,7 +132,6 @@ class ScAppCfg : public ScAppOptions
ScLinkConfigItem
aSortListItem
;
ScLinkConfigItem
aSortListItem
;
ScLinkConfigItem
aMiscItem
;
ScLinkConfigItem
aMiscItem
;
ScLinkConfigItem
aCompatItem
;
ScLinkConfigItem
aCompatItem
;
ScLinkConfigItem
aFormulaItem
;
DECL_LINK
(
LayoutCommitHdl
,
void
*
);
DECL_LINK
(
LayoutCommitHdl
,
void
*
);
DECL_LINK
(
InputCommitHdl
,
void
*
);
DECL_LINK
(
InputCommitHdl
,
void
*
);
...
@@ -167,7 +140,6 @@ class ScAppCfg : public ScAppOptions
...
@@ -167,7 +140,6 @@ class ScAppCfg : public ScAppOptions
DECL_LINK
(
SortListCommitHdl
,
void
*
);
DECL_LINK
(
SortListCommitHdl
,
void
*
);
DECL_LINK
(
MiscCommitHdl
,
void
*
);
DECL_LINK
(
MiscCommitHdl
,
void
*
);
DECL_LINK
(
CompatCommitHdl
,
void
*
);
DECL_LINK
(
CompatCommitHdl
,
void
*
);
DECL_LINK
(
FormulaCommitHdl
,
void
*
);
com
::
sun
::
star
::
uno
::
Sequence
<
rtl
::
OUString
>
GetLayoutPropertyNames
();
com
::
sun
::
star
::
uno
::
Sequence
<
rtl
::
OUString
>
GetLayoutPropertyNames
();
com
::
sun
::
star
::
uno
::
Sequence
<
rtl
::
OUString
>
GetInputPropertyNames
();
com
::
sun
::
star
::
uno
::
Sequence
<
rtl
::
OUString
>
GetInputPropertyNames
();
...
@@ -176,7 +148,6 @@ class ScAppCfg : public ScAppOptions
...
@@ -176,7 +148,6 @@ class ScAppCfg : public ScAppOptions
com
::
sun
::
star
::
uno
::
Sequence
<
rtl
::
OUString
>
GetSortListPropertyNames
();
com
::
sun
::
star
::
uno
::
Sequence
<
rtl
::
OUString
>
GetSortListPropertyNames
();
com
::
sun
::
star
::
uno
::
Sequence
<
rtl
::
OUString
>
GetMiscPropertyNames
();
com
::
sun
::
star
::
uno
::
Sequence
<
rtl
::
OUString
>
GetMiscPropertyNames
();
com
::
sun
::
star
::
uno
::
Sequence
<
rtl
::
OUString
>
GetCompatPropertyNames
();
com
::
sun
::
star
::
uno
::
Sequence
<
rtl
::
OUString
>
GetCompatPropertyNames
();
com
::
sun
::
star
::
uno
::
Sequence
<
rtl
::
OUString
>
GetFormulaPropertyNames
();
public
:
public
:
ScAppCfg
();
ScAppCfg
();
...
...
sc/inc/formulaopt.hxx
0 → 100644
Dosyayı görüntüle @
bf0629e0
/* -*- 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. 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.
*
* The Initial Developer of the Original Code is
* Albert Thuswaldner <albert.thuswaldner@gmail.com>
* Portions created by the Initial Developer are Copyright (C) 2012 the
* Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* 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_FORMULAOPT_HXX
#define SC_FORMULAOPT_HXX
#include <svl/poolitem.hxx>
#include <unotools/configitem.hxx>
#include <unotools/localedatawrapper.hxx>
#include "formula/grammar.hxx"
#include "scdllapi.h"
#include "global.hxx"
class
SC_DLLPUBLIC
ScFormulaOptions
{
private
:
bool
bUseEnglishFuncName
;
// use English function name even if the locale is not English.
::
formula
::
FormulaGrammar
::
Grammar
eFormulaGrammar
;
// formula grammar used to switch different formula syntax
::
rtl
::
OUString
aFormulaSepArg
;
::
rtl
::
OUString
aFormulaSepArrayRow
;
::
rtl
::
OUString
aFormulaSepArrayCol
;
public
:
ScFormulaOptions
();
ScFormulaOptions
(
const
ScFormulaOptions
&
rCpy
);
~
ScFormulaOptions
();
void
SetDefaults
();
void
SetFormulaSyntax
(
::
formula
::
FormulaGrammar
::
Grammar
eGram
)
{
eFormulaGrammar
=
eGram
;
}
::
formula
::
FormulaGrammar
::
Grammar
GetFormulaSyntax
()
const
{
return
eFormulaGrammar
;
}
void
SetUseEnglishFuncName
(
bool
bVal
)
{
bUseEnglishFuncName
=
bVal
;
}
bool
GetUseEnglishFuncName
()
const
{
return
bUseEnglishFuncName
;
}
void
SetFormulaSepArg
(
const
::
rtl
::
OUString
&
rSep
)
{
aFormulaSepArg
=
rSep
;
}
::
rtl
::
OUString
GetFormulaSepArg
()
const
{
return
aFormulaSepArg
;
}
void
SetFormulaSepArrayRow
(
const
::
rtl
::
OUString
&
rSep
)
{
aFormulaSepArrayRow
=
rSep
;
}
::
rtl
::
OUString
GetFormulaSepArrayRow
()
const
{
return
aFormulaSepArrayRow
;
}
void
SetFormulaSepArrayCol
(
const
::
rtl
::
OUString
&
rSep
)
{
aFormulaSepArrayCol
=
rSep
;
}
::
rtl
::
OUString
GetFormulaSepArrayCol
()
const
{
return
aFormulaSepArrayCol
;
}
void
ResetFormulaSeparators
();
static
void
GetDefaultFormulaSeparators
(
rtl
::
OUString
&
rSepArg
,
rtl
::
OUString
&
rSepArrayCol
,
rtl
::
OUString
&
rSepArrayRow
);
static
const
LocaleDataWrapper
&
GetLocaleDataWrapper
();
ScFormulaOptions
&
operator
=
(
const
ScFormulaOptions
&
rCpy
);
bool
operator
==
(
const
ScFormulaOptions
&
rOpt
)
const
;
bool
operator
!=
(
const
ScFormulaOptions
&
rOpt
)
const
;
};
//==================================================================
// item for the dialog / options page
//==================================================================
class
SC_DLLPUBLIC
ScTpFormulaItem
:
public
SfxPoolItem
{
public
:
TYPEINFO
();
ScTpFormulaItem
(
sal_uInt16
nWhich
,
const
ScFormulaOptions
&
rOpt
);
ScTpFormulaItem
(
const
ScTpFormulaItem
&
rItem
);
~
ScTpFormulaItem
();
virtual
String
GetValueText
()
const
;
virtual
int
operator
==
(
const
SfxPoolItem
&
)
const
;
virtual
SfxPoolItem
*
Clone
(
SfxItemPool
*
pPool
=
0
)
const
;
const
ScFormulaOptions
&
GetFormulaOptions
()
const
{
return
theOptions
;
}
private
:
ScFormulaOptions
theOptions
;
};
//==================================================================
// config item
//==================================================================
class
ScFormulaCfg
:
public
ScFormulaOptions
,
public
utl
::
ConfigItem
{
com
::
sun
::
star
::
uno
::
Sequence
<
rtl
::
OUString
>
GetPropertyNames
();
public
:
ScFormulaCfg
();
void
SetOptions
(
const
ScFormulaOptions
&
rNew
);
virtual
void
Commit
();
virtual
void
Notify
(
const
::
com
::
sun
::
star
::
uno
::
Sequence
<
rtl
::
OUString
>&
aPropertyNames
);
};
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sc/inc/sc.hrc
Dosyayı görüntüle @
bf0629e0
...
@@ -117,11 +117,7 @@
...
@@ -117,11 +117,7 @@
#define FID_MARKPAGEDOWN (SC_VIEW_START + 19)
#define FID_MARKPAGEDOWN (SC_VIEW_START + 19)
// Format options
// Format options
#define SID_SC_OPT_FORMULA_ENGLISH_FUNCNAME (SC_VIEW_START + 20)
#define SID_SCFORMULAOPTIONS (SC_VIEW_START + 20)
#define SID_SC_OPT_FORMULA_GRAMMAR (SC_VIEW_START + 21)
#define SID_SC_OPT_FORMULA_SEP_ARG (SC_VIEW_START + 22)
#define SID_SC_OPT_FORMULA_SEP_ARRAY_ROW (SC_VIEW_START + 23)
#define SID_SC_OPT_FORMULA_SEP_ARRAY_COL (SC_VIEW_START + 24)
// slot-IDs for attributes
// slot-IDs for attributes
...
...
sc/inc/scmod.hxx
Dosyayı görüntüle @
bf0629e0
...
@@ -60,11 +60,13 @@ class ScDocument;
...
@@ -60,11 +60,13 @@ class ScDocument;
class
ScViewCfg
;
class
ScViewCfg
;
class
ScDocCfg
;
class
ScDocCfg
;
class
ScAppCfg
;
class
ScAppCfg
;
class
ScFormulaCfg
;
class
ScInputCfg
;
class
ScInputCfg
;
class
ScPrintCfg
;
class
ScPrintCfg
;
class
ScViewOptions
;
class
ScViewOptions
;
class
ScDocOptions
;
class
ScDocOptions
;
class
ScAppOptions
;
class
ScAppOptions
;
class
ScFormulaOptions
;
class
ScInputOptions
;
class
ScInputOptions
;
class
ScPrintOptions
;
class
ScPrintOptions
;
class
ScInputHandler
;
class
ScInputHandler
;
...
@@ -104,6 +106,7 @@ class ScModule: public SfxModule, public SfxListener, utl::ConfigurationListener
...
@@ -104,6 +106,7 @@ class ScModule: public SfxModule, public SfxListener, utl::ConfigurationListener
ScViewCfg
*
pViewCfg
;
ScViewCfg
*
pViewCfg
;
ScDocCfg
*
pDocCfg
;
ScDocCfg
*
pDocCfg
;
ScAppCfg
*
pAppCfg
;
ScAppCfg
*
pAppCfg
;
ScFormulaCfg
*
pFormulaCfg
;
ScInputCfg
*
pInputCfg
;
ScInputCfg
*
pInputCfg
;
ScPrintCfg
*
pPrintCfg
;
ScPrintCfg
*
pPrintCfg
;
ScNavipiCfg
*
pNavipiCfg
;
ScNavipiCfg
*
pNavipiCfg
;
...
@@ -176,11 +179,13 @@ public:
...
@@ -176,11 +179,13 @@ public:
const
ScViewOptions
&
GetViewOptions
();
const
ScViewOptions
&
GetViewOptions
();
SC_DLLPUBLIC
const
ScDocOptions
&
GetDocOptions
();
SC_DLLPUBLIC
const
ScDocOptions
&
GetDocOptions
();
SC_DLLPUBLIC
const
ScAppOptions
&
GetAppOptions
();
SC_DLLPUBLIC
const
ScAppOptions
&
GetAppOptions
();
const
ScFormulaOptions
&
GetFormulaOptions
();
const
ScInputOptions
&
GetInputOptions
();
const
ScInputOptions
&
GetInputOptions
();
SC_DLLPUBLIC
const
ScPrintOptions
&
GetPrintOptions
();
SC_DLLPUBLIC
const
ScPrintOptions
&
GetPrintOptions
();
void
SetViewOptions
(
const
ScViewOptions
&
rOpt
);
void
SetViewOptions
(
const
ScViewOptions
&
rOpt
);
SC_DLLPUBLIC
void
SetDocOptions
(
const
ScDocOptions
&
rOpt
);
SC_DLLPUBLIC
void
SetDocOptions
(
const
ScDocOptions
&
rOpt
);
SC_DLLPUBLIC
void
SetAppOptions
(
const
ScAppOptions
&
rOpt
);
SC_DLLPUBLIC
void
SetAppOptions
(
const
ScAppOptions
&
rOpt
);
void
SetFormulaOptions
(
const
ScFormulaOptions
&
rOpt
);
void
SetInputOptions
(
const
ScInputOptions
&
rOpt
);
void
SetInputOptions
(
const
ScInputOptions
&
rOpt
);
void
SetPrintOptions
(
const
ScPrintOptions
&
rOpt
);
void
SetPrintOptions
(
const
ScPrintOptions
&
rOpt
);
void
InsertEntryToLRUList
(
sal_uInt16
nFIndex
);
void
InsertEntryToLRUList
(
sal_uInt16
nFIndex
);
...
...
sc/source/core/tool/appoptio.cxx
Dosyayı görüntüle @
bf0629e0
This diff is collapsed.
Click to expand it.
sc/source/core/tool/formulaopt.cxx
0 → 100644
Dosyayı görüntüle @
bf0629e0
This diff is collapsed.
Click to expand it.
sc/source/ui/app/scmod.cxx
Dosyayı görüntüle @
bf0629e0
...
@@ -79,6 +79,7 @@
...
@@ -79,6 +79,7 @@
#include "viewopti.hxx"
#include "viewopti.hxx"
#include "docoptio.hxx"
#include "docoptio.hxx"
#include "appoptio.hxx"
#include "appoptio.hxx"
#include "formulaopt.hxx"
#include "inputopt.hxx"
#include "inputopt.hxx"
#include "printopt.hxx"
#include "printopt.hxx"
#include "navicfg.hxx"
#include "navicfg.hxx"
...
@@ -141,6 +142,7 @@ ScModule::ScModule( SfxObjectFactory* pFact ) :
...
@@ -141,6 +142,7 @@ ScModule::ScModule( SfxObjectFactory* pFact ) :
pViewCfg
(
NULL
),
pViewCfg
(
NULL
),
pDocCfg
(
NULL
),
pDocCfg
(
NULL
),
pAppCfg
(
NULL
),
pAppCfg
(
NULL
),
pFormulaCfg
(
NULL
),
pInputCfg
(
NULL
),
pInputCfg
(
NULL
),
pPrintCfg
(
NULL
),
pPrintCfg
(
NULL
),
pNavipiCfg
(
NULL
),
pNavipiCfg
(
NULL
),
...
@@ -342,6 +344,7 @@ void ScModule::DeleteCfg()
...
@@ -342,6 +344,7 @@ void ScModule::DeleteCfg()
DELETEZ
(
pViewCfg
);
// Speichern passiert vor Exit() automatisch
DELETEZ
(
pViewCfg
);
// Speichern passiert vor Exit() automatisch
DELETEZ
(
pDocCfg
);
DELETEZ
(
pDocCfg
);
DELETEZ
(
pAppCfg
);
DELETEZ
(
pAppCfg
);
DELETEZ
(
pFormulaCfg
);
DELETEZ
(
pInputCfg
);
DELETEZ
(
pInputCfg
);
DELETEZ
(
pPrintCfg
);
DELETEZ
(
pPrintCfg
);
DELETEZ
(
pNavipiCfg
);
DELETEZ
(
pNavipiCfg
);
...
@@ -849,6 +852,22 @@ const ScAppOptions& ScModule::GetAppOptions()
...
@@ -849,6 +852,22 @@ const ScAppOptions& ScModule::GetAppOptions()
return
*
pAppCfg
;
return
*
pAppCfg
;
}
}
void
ScModule
::
SetFormulaOptions
(
const
ScFormulaOptions
&
rOpt
)
{
if
(
!
pFormulaCfg
)
pFormulaCfg
=
new
ScFormulaCfg
;
pFormulaCfg
->
SetOptions
(
rOpt
);
}
const
ScFormulaOptions
&
ScModule
::
GetFormulaOptions
()
{
if
(
!
pFormulaCfg
)
pFormulaCfg
=
new
ScFormulaCfg
;
return
*
pFormulaCfg
;
}
void
ScModule
::
SetInputOptions
(
const
ScInputOptions
&
rOpt
)
void
ScModule
::
SetInputOptions
(
const
ScInputOptions
&
rOpt
)
{
{
if
(
!
pInputCfg
)
if
(
!
pInputCfg
)
...
@@ -987,7 +1006,6 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet )
...
@@ -987,7 +1006,6 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet )
sal_Bool
bCalcAll
=
false
;
sal_Bool
bCalcAll
=
false
;
sal_Bool
bSaveAppOptions
=
false
;
sal_Bool
bSaveAppOptions
=
false
;
sal_Bool
bSaveInputOptions
=
false
;
sal_Bool
bSaveInputOptions
=
false
;
sal_Bool
bUpdateDocFormat
=
false
;
//--------------------------------------------------------------------------
//--------------------------------------------------------------------------
...
@@ -1031,71 +1049,18 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet )
...
@@ -1031,71 +1049,18 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet )
// FormulaOptions
// FormulaOptions
//============================================
//============================================
if
(
rOptSet
.
HasItem
(
SID_SCFORMULAOPTIONS
,
&
pItem
))
if
(
rOptSet
.
HasItem
(
SID_SC_OPT_FORMULA_ENGLISH_FUNCNAME
,
&
pItem
))
{
pAppCfg
->
SetUseEnglishFuncName
(
static_cast
<
const
SfxBoolItem
*>
(
pItem
)
->
GetValue
()
);
bSaveAppOptions
=
true
;
bUpdateDocFormat
=
true
;
}
if
(
rOptSet
.
HasItem
(
SID_SC_OPT_FORMULA_GRAMMAR
,
&
pItem
))
{
{
sal_uInt16
nVal
=
static_cast
<
const
SfxUInt16Item
*>
(
pItem
)
->
GetValue
();
const
ScFormulaOptions
&
rOpt
=
((
const
ScTpFormulaItem
*
)
pItem
)
->
GetFormulaOptions
();
::
formula
::
FormulaGrammar
::
Grammar
eOld
=
pAppCfg
->
GetFormulaSyntax
();
SetFormulaOptions
(
rOpt
);
::
formula
::
FormulaGrammar
::
Grammar
eNew
=
::
formula
::
FormulaGrammar
::
GRAM_NATIVE
;
switch
(
nVal
)
if
(
pDocSh
)
{
case
0
:
eNew
=
::
formula
::
FormulaGrammar
::
GRAM_NATIVE
;
break
;
case
1
:
eNew
=
::
formula
::
FormulaGrammar
::
GRAM_NATIVE_XL_A1
;
break
;
case
2
:
eNew
=
::
formula
::
FormulaGrammar
::
GRAM_NATIVE_XL_R1C1
;
break
;
default
:
;
}
if
(
eOld
!=
eNew
)
{
{
pAppCfg
->
SetFormulaSyntax
(
eNew
);
pDocSh
->
SetFormulaOptions
(
rOpt
);
bSaveAppOptions
=
true
;
pDocSh
->
SetDocumentModified
();
bUpdateDocFormat
=
true
;
}
}
}
}
if
(
rOptSet
.
HasItem
(
SID_SC_OPT_FORMULA_SEP_ARG
,
&
pItem
))
{
pAppCfg
->
SetFormulaSepArg
(
static_cast
<
const
SfxStringItem
*>
(
pItem
)
->
GetValue
()
);
bSaveAppOptions
=
true
;
bUpdateDocFormat
=
true
;
}
if
(
rOptSet
.
HasItem
(
SID_SC_OPT_FORMULA_SEP_ARRAY_ROW
,
&
pItem
))
{
pAppCfg
->
SetFormulaSepArrayRow
(
static_cast
<
const
SfxStringItem
*>
(
pItem
)
->
GetValue
()
);
bSaveAppOptions
=
true
;
bUpdateDocFormat
=
true
;
}
if
(
rOptSet
.
HasItem
(
SID_SC_OPT_FORMULA_SEP_ARRAY_COL
,
&
pItem
))
{
pAppCfg
->
SetFormulaSepArrayCol
(
static_cast
<
const
SfxStringItem
*>
(
pItem
)
->
GetValue
()
);
bSaveAppOptions
=
true
;
bUpdateDocFormat
=
true
;
}
// Do all the format updates on open documents in one go
if
(
bUpdateDocFormat
&&
pDocSh
)
{
pDocSh
->
SetFormulaOptions
(
*
pAppCfg
);
pDocSh
->
SetDocumentModified
();
}
//============================================
//============================================
// ViewOptions
// ViewOptions
//============================================
//============================================
...
@@ -1995,11 +1960,7 @@ SfxItemSet* ScModule::CreateItemSet( sal_uInt16 nId )
...
@@ -1995,11 +1960,7 @@ SfxItemSet* ScModule::CreateItemSet( sal_uInt16 nId )
// TP_COMPATIBILITY
// TP_COMPATIBILITY
SID_SC_OPT_KEY_BINDING_COMPAT
,
SID_SC_OPT_KEY_BINDING_COMPAT
,
SID_SC_OPT_KEY_BINDING_COMPAT
,
SID_SC_OPT_KEY_BINDING_COMPAT
,
// TP_FORMULA
// TP_FORMULA
SID_SC_OPT_FORMULA_ENGLISH_FUNCNAME
,
SID_SC_OPT_FORMULA_ENGLISH_FUNCNAME
,
SID_SCFORMULAOPTIONS
,
SID_SCFORMULAOPTIONS
,
SID_SC_OPT_FORMULA_GRAMMAR
,
SID_SC_OPT_FORMULA_GRAMMAR
,
SID_SC_OPT_FORMULA_SEP_ARG
,
SID_SC_OPT_FORMULA_SEP_ARG
,
SID_SC_OPT_FORMULA_SEP_ARRAY_COL
,
SID_SC_OPT_FORMULA_SEP_ARRAY_COL
,
SID_SC_OPT_FORMULA_SEP_ARRAY_ROW
,
SID_SC_OPT_FORMULA_SEP_ARRAY_ROW
,
0
);
0
);
const
ScAppOptions
&
rAppOpt
=
GetAppOptions
();
const
ScAppOptions
&
rAppOpt
=
GetAppOptions
();
...
@@ -2071,34 +2032,7 @@ SfxItemSet* ScModule::CreateItemSet( sal_uInt16 nId )
...
@@ -2071,34 +2032,7 @@ SfxItemSet* ScModule::CreateItemSet( sal_uInt16 nId )
rAppOpt
.
GetKeyBindingType
()
)
);
rAppOpt
.
GetKeyBindingType
()
)
);
// TP_FORMULA
// TP_FORMULA
pRet
->
Put
(
SfxBoolItem
(
SID_SC_OPT_FORMULA_ENGLISH_FUNCNAME
,
pRet
->
Put
(
ScTpFormulaItem
(
SID_SCFORMULAOPTIONS
,
GetFormulaOptions
()
)
);
rAppOpt
.
GetUseEnglishFuncName
()
)
);
sal_uInt16
nVal
=
0
;
switch
(
rAppOpt
.
GetFormulaSyntax
())
{
case
formula
:
:
FormulaGrammar
::
GRAM_NATIVE
:
nVal
=
0
;
break
;
case
formula
:
:
FormulaGrammar
::
GRAM_NATIVE_XL_A1
:
nVal
=
1
;
break
;
case
formula
:
:
FormulaGrammar
::
GRAM_NATIVE_XL_R1C1
:
nVal
=
2
;
break
;
default
:
;
}
pRet
->
Put
(
SfxUInt16Item
(
SID_SC_OPT_FORMULA_GRAMMAR
,
nVal
)
);
pRet
->
Put
(
SfxStringItem
(
SID_SC_OPT_FORMULA_SEP_ARG
,
rAppOpt
.
GetFormulaSepArg
()
)
);
pRet
->
Put
(
SfxStringItem
(
SID_SC_OPT_FORMULA_SEP_ARRAY_COL
,
rAppOpt
.
GetFormulaSepArrayCol
()
)
);
pRet
->
Put
(
SfxStringItem
(
SID_SC_OPT_FORMULA_SEP_ARRAY_ROW
,
rAppOpt
.
GetFormulaSepArrayRow
()
)
);
pRet
->
Put
(
aULItem
);
}
}
return
pRet
;
return
pRet
;
}
}
...
...
sc/source/ui/docshell/docsh3.cxx
Dosyayı görüntüle @
bf0629e0
...
@@ -432,7 +432,7 @@ void ScDocShell::InitOptions(bool bForLoading) // called from InitNew and L
...
@@ -432,7 +432,7 @@ void ScDocShell::InitOptions(bool bForLoading) // called from InitNew and L
ScModule
*
pScMod
=
SC_MOD
();
ScModule
*
pScMod
=
SC_MOD
();
ScDocOptions
aDocOpt
=
pScMod
->
GetDocOptions
();
ScDocOptions
aDocOpt
=
pScMod
->
GetDocOptions
();
Sc
AppOptions
aAppOpt
=
pScMod
->
GetApp
Options
();
Sc
FormulaOptions
aFormulaOpt
=
pScMod
->
GetFormula
Options
();
ScViewOptions
aViewOpt
=
pScMod
->
GetViewOptions
();
ScViewOptions
aViewOpt
=
pScMod
->
GetViewOptions
();
aDocOpt
.
SetAutoSpell
(
bAutoSpell
);
aDocOpt
.
SetAutoSpell
(
bAutoSpell
);
...
@@ -449,7 +449,7 @@ void ScDocShell::InitOptions(bool bForLoading) // called from InitNew and L
...
@@ -449,7 +449,7 @@ void ScDocShell::InitOptions(bool bForLoading) // called from InitNew and L
aDocument
.
SetDocOptions
(
aDocOpt
);
aDocument
.
SetDocOptions
(
aDocOpt
);
aDocument
.
SetViewOptions
(
aViewOpt
);
aDocument
.
SetViewOptions
(
aViewOpt
);
SetFormulaOptions
(
a
App
Opt
);
SetFormulaOptions
(
a
Formula
Opt
);
// Druck-Optionen werden jetzt direkt vor dem Drucken gesetzt
// Druck-Optionen werden jetzt direkt vor dem Drucken gesetzt
...
...
sc/source/ui/docshell/docsh6.cxx
Dosyayı görüntüle @
bf0629e0
...
@@ -481,13 +481,13 @@ sal_Bool ScDocShell::ReloadTabLinks()
...
@@ -481,13 +481,13 @@ sal_Bool ScDocShell::ReloadTabLinks()
return
sal_True
;
//! Fehler erkennen
return
sal_True
;
//! Fehler erkennen
}
}
void
ScDocShell
::
SetFormulaOptions
(
const
Sc
AppOptions
&
rApp
Opt
)
void
ScDocShell
::
SetFormulaOptions
(
const
Sc
FormulaOptions
&
r
Opt
)
{
{
aDocument
.
SetGrammar
(
r
App
Opt
.
GetFormulaSyntax
()
);
aDocument
.
SetGrammar
(
rOpt
.
GetFormulaSyntax
()
);
// This needs to be called first since it may re-initialize the entire
// This needs to be called first since it may re-initialize the entire
// opcode map.
// opcode map.
if
(
r
App
Opt
.
GetUseEnglishFuncName
())
if
(
rOpt
.
GetUseEnglishFuncName
())
{
{
// switch native symbols to English.
// switch native symbols to English.
ScCompiler
aComp
(
NULL
,
ScAddress
());
ScCompiler
aComp
(
NULL
,
ScAddress
());
...
@@ -503,7 +503,7 @@ void ScDocShell::SetFormulaOptions(const ScAppOptions& rAppOpt )
...
@@ -503,7 +503,7 @@ void ScDocShell::SetFormulaOptions(const ScAppOptions& rAppOpt )
// Update the separators.
// Update the separators.
ScCompiler
::
UpdateSeparatorsNative
(
ScCompiler
::
UpdateSeparatorsNative
(
r
AppOpt
.
GetFormulaSepArg
(),
rAppOpt
.
GetFormulaSepArrayCol
(),
rApp
Opt
.
GetFormulaSepArrayRow
());
r
Opt
.
GetFormulaSepArg
(),
rOpt
.
GetFormulaSepArrayCol
(),
r
Opt
.
GetFormulaSepArrayRow
());
}
}
void
ScDocShell
::
CheckConfigOptions
()
void
ScDocShell
::
CheckConfigOptions
()
...
@@ -515,19 +515,19 @@ void ScDocShell::CheckConfigOptions()
...
@@ -515,19 +515,19 @@ void ScDocShell::CheckConfigOptions()
OUString
aDecSep
=
ScGlobal
::
GetpLocaleData
()
->
getNumDecimalSep
();
OUString
aDecSep
=
ScGlobal
::
GetpLocaleData
()
->
getNumDecimalSep
();
ScModule
*
pScMod
=
SC_MOD
();
ScModule
*
pScMod
=
SC_MOD
();
const
Sc
AppOptions
&
rAppOpt
=
pScMod
->
GetApp
Options
();
const
Sc
FormulaOptions
&
rOpt
=
pScMod
->
GetFormula
Options
();
OUString
aSepArg
=
r
App
Opt
.
GetFormulaSepArg
();
OUString
aSepArg
=
rOpt
.
GetFormulaSepArg
();
OUString
aSepArrRow
=
r
App
Opt
.
GetFormulaSepArrayRow
();
OUString
aSepArrRow
=
rOpt
.
GetFormulaSepArrayRow
();
OUString
aSepArrCol
=
r
App
Opt
.
GetFormulaSepArrayCol
();
OUString
aSepArrCol
=
rOpt
.
GetFormulaSepArrayCol
();
if
(
aDecSep
==
aSepArg
||
aDecSep
==
aSepArrRow
||
aDecSep
==
aSepArrCol
)
if
(
aDecSep
==
aSepArg
||
aDecSep
==
aSepArrRow
||
aDecSep
==
aSepArrCol
)
{
{
// One of arg separators conflicts with the current decimal
// One of arg separators conflicts with the current decimal
// separator. Reset them to default.
// separator. Reset them to default.
Sc
AppOptions
aNew
=
rApp
Opt
;
Sc
FormulaOptions
aNew
=
r
Opt
;
aNew
.
ResetFormulaSeparators
();
aNew
.
ResetFormulaSeparators
();
SetFormulaOptions
(
aNew
);
SetFormulaOptions
(
aNew
);
pScMod
->
Set
App
Options
(
aNew
);
pScMod
->
Set
Formula
Options
(
aNew
);
// Launch a nice warning dialog to let the users know of this change.
// Launch a nice warning dialog to let the users know of this change.
ScTabViewShell
*
pViewShell
=
GetBestViewShell
();
ScTabViewShell
*
pViewShell
=
GetBestViewShell
();
...
...
sc/source/ui/inc/docsh.hxx
Dosyayı görüntüle @
bf0629e0
...
@@ -40,6 +40,7 @@
...
@@ -40,6 +40,7 @@
#include "scdll.hxx"
#include "scdll.hxx"
#include "document.hxx"
#include "document.hxx"
#include "appoptio.hxx"
#include "appoptio.hxx"
#include "formulaopt.hxx"
#include "shellids.hxx"
#include "shellids.hxx"
#include "refreshtimer.hxx"
#include "refreshtimer.hxx"
#include "optutil.hxx"
#include "optutil.hxx"
...
@@ -321,7 +322,7 @@ public:
...
@@ -321,7 +322,7 @@ public:
void
UpdateLinks
();
// Link-Eintraege aktuallisieren
void
UpdateLinks
();
// Link-Eintraege aktuallisieren
sal_Bool
ReloadTabLinks
();
// Links ausfuehren (Inhalt aktualisieren)
sal_Bool
ReloadTabLinks
();
// Links ausfuehren (Inhalt aktualisieren)
void
SetFormulaOptions
(
const
Sc
AppOptions
&
rApp
Opt
);
void
SetFormulaOptions
(
const
Sc
FormulaOptions
&
r
Opt
);
virtual
void
CheckConfigOptions
();
virtual
void
CheckConfigOptions
();
void
PostEditView
(
ScEditEngineDefaulter
*
pEditEngine
,
const
ScAddress
&
rCursorPos
);
void
PostEditView
(
ScEditEngineDefaulter
*
pEditEngine
,
const
ScAddress
&
rCursorPos
);
...
...
sc/source/ui/optdlg/tpformula.cxx
Dosyayı görüntüle @
bf0629e0
...
@@ -36,13 +36,11 @@
...
@@ -36,13 +36,11 @@
#include <scmod.hxx>
#include <scmod.hxx>
#include <svl/eitem.hxx>
#include <svl/eitem.hxx>
#include <svl/stritem.hxx>
#include <svl/stritem.hxx>
#include "tpformula.hxx"
#include "tpformula.hxx"
#include "formulaopt.hxx"
#include "optdlg.hrc"
#include "optdlg.hrc"
#include "scresid.hxx"
#include "scresid.hxx"
#include "formula/grammar.hxx"
#include "formula/grammar.hxx"
#include "appoptio.hxx"
#include "global.hxx"
#include <unotools/localedatawrapper.hxx>
#include <unotools/localedatawrapper.hxx>
...
@@ -87,7 +85,13 @@ ScTpFormulaOptions::ScTpFormulaOptions(Window* pParent, const SfxItemSet& rCoreA
...
@@ -87,7 +85,13 @@ ScTpFormulaOptions::ScTpFormulaOptions(Window* pParent, const SfxItemSet& rCoreA
maEdSepArrayRow
.
SetGetFocusHdl
(
aLink
);
maEdSepArrayRow
.
SetGetFocusHdl
(
aLink
);
// Get the decimal separator for current locale.
// Get the decimal separator for current locale.
rtl
::
OUString
aSep
=
SC_MOD
()
->
GetAppOptions
().
GetLocaleDataWrapper
().
getNumDecimalSep
();
ScFormulaOptions
aOpt
;
const
SfxPoolItem
*
pItem
=
NULL
;
if
(
SFX_ITEM_SET
==
rCoreAttrs
.
GetItemState
(
SID_SCFORMULAOPTIONS
,
false
,
&
pItem
))
aOpt
=
((
const
ScTpFormulaItem
*
)
pItem
)
->
GetFormulaOptions
();
rtl
::
OUString
aSep
=
aOpt
.
GetLocaleDataWrapper
().
getNumDecimalSep
();
mnDecSep
=
aSep
.
isEmpty
()
?
sal_Unicode
(
'.'
)
:
aSep
[
0
];
mnDecSep
=
aSep
.
isEmpty
()
?
sal_Unicode
(
'.'
)
:
aSep
[
0
];
}
}
...
@@ -98,7 +102,7 @@ ScTpFormulaOptions::~ScTpFormulaOptions()
...
@@ -98,7 +102,7 @@ ScTpFormulaOptions::~ScTpFormulaOptions()
void
ScTpFormulaOptions
::
ResetSeparators
()
void
ScTpFormulaOptions
::
ResetSeparators
()
{
{
rtl
::
OUString
aFuncArg
,
aArrayCol
,
aArrayRow
;
rtl
::
OUString
aFuncArg
,
aArrayCol
,
aArrayRow
;
Sc
App
Options
::
GetDefaultFormulaSeparators
(
aFuncArg
,
aArrayCol
,
aArrayRow
);
Sc
Formula
Options
::
GetDefaultFormulaSeparators
(
aFuncArg
,
aArrayCol
,
aArrayRow
);
maEdSepFuncArg
.
SetText
(
aFuncArg
);
maEdSepFuncArg
.
SetText
(
aFuncArg
);
maEdSepArrayCol
.
SetText
(
aArrayCol
);
maEdSepArrayCol
.
SetText
(
aArrayCol
);
maEdSepArrayRow
.
SetText
(
aArrayRow
);
maEdSepArrayRow
.
SetText
(
aArrayRow
);
...
@@ -208,96 +212,97 @@ SfxTabPage* ScTpFormulaOptions::Create(Window* pParent, const SfxItemSet& rCoreS
...
@@ -208,96 +212,97 @@ SfxTabPage* ScTpFormulaOptions::Create(Window* pParent, const SfxItemSet& rCoreS
sal_Bool
ScTpFormulaOptions
::
FillItemSet
(
SfxItemSet
&
rCoreSet
)
sal_Bool
ScTpFormulaOptions
::
FillItemSet
(
SfxItemSet
&
rCoreSet
)
{
{
bool
bRet
=
false
;
sal_Bool
bRet
=
false
;
if
(
maLbFormulaSyntax
.
GetSavedValue
()
!=
maLbFormulaSyntax
.
GetSelectEntryPos
())
ScFormulaOptions
aOpt
;
sal_Bool
bEnglishFuncName
=
maCbEnglishFuncName
.
IsChecked
();
sal_Int16
aSyntaxPos
=
maLbFormulaSyntax
.
GetSelectEntryPos
();
OUString
aSep
=
maEdSepFuncArg
.
GetText
();
OUString
aSepArrayCol
=
maEdSepArrayCol
.
GetText
();
OUString
aSepArrayRow
=
maEdSepArrayRow
.
GetText
();
if
(
maLbFormulaSyntax
.
GetSavedValue
()
!=
aSyntaxPos
||
maCbEnglishFuncName
.
GetSavedValue
()
!=
bEnglishFuncName
||
static_cast
<
OUString
>
(
maEdSepFuncArg
.
GetSavedValue
())
!=
aSep
||
static_cast
<
OUString
>
(
maEdSepArrayCol
.
GetSavedValue
())
!=
aSepArrayCol
||
static_cast
<
OUString
>
(
maEdSepArrayRow
.
GetSavedValue
())
!=
aSepArrayRow
)
{
{
rCoreSet
.
Put
(
::
formula
::
FormulaGrammar
::
Grammar
eGram
=
::
formula
::
FormulaGrammar
::
GRAM_DEFAULT
;
SfxUInt16Item
(
SID_SC_OPT_FORMULA_GRAMMAR
,
maLbFormulaSyntax
.
GetSelectEntryPos
()));
switch
(
aSyntaxPos
)
{
case
0
:
eGram
=
::
formula
::
FormulaGrammar
::
GRAM_NATIVE
;
break
;
case
1
:
eGram
=
::
formula
::
FormulaGrammar
::
GRAM_NATIVE_XL_A1
;
break
;
case
2
:
eGram
=
::
formula
::
FormulaGrammar
::
GRAM_NATIVE_XL_R1C1
;
break
;
}
aOpt
.
SetFormulaSyntax
(
eGram
);
aOpt
.
SetUseEnglishFuncName
(
bEnglishFuncName
);
aOpt
.
SetFormulaSepArg
(
aSep
);
aOpt
.
SetFormulaSepArrayCol
(
aSepArrayCol
);
aOpt
.
SetFormulaSepArrayRow
(
aSepArrayRow
);
rCoreSet
.
Put
(
ScTpFormulaItem
(
SID_SCFORMULAOPTIONS
,
aOpt
)
);
bRet
=
true
;
bRet
=
true
;
}
}
if
(
maCbEnglishFuncName
.
GetSavedValue
()
!=
maCbEnglishFuncName
.
IsChecked
())
{
rCoreSet
.
Put
(
SfxBoolItem
(
SID_SC_OPT_FORMULA_ENGLISH_FUNCNAME
,
maCbEnglishFuncName
.
IsChecked
()));
bRet
=
true
;
}
if
(
maEdSepFuncArg
.
GetSavedValue
()
!=
maEdSepFuncArg
.
GetText
())
{
rCoreSet
.
Put
(
SfxStringItem
(
SID_SC_OPT_FORMULA_SEP_ARG
,
maEdSepFuncArg
.
GetText
()));
bRet
=
true
;
}
if
(
maEdSepArrayCol
.
GetSavedValue
()
!=
maEdSepArrayCol
.
GetText
())
{
rCoreSet
.
Put
(
SfxStringItem
(
SID_SC_OPT_FORMULA_SEP_ARRAY_COL
,
maEdSepArrayCol
.
GetText
()));
bRet
=
true
;
}
if
(
maEdSepArrayRow
.
GetSavedValue
()
!=
maEdSepArrayRow
.
GetText
())
{
rCoreSet
.
Put
(
SfxStringItem
(
SID_SC_OPT_FORMULA_SEP_ARRAY_ROW
,
maEdSepArrayRow
.
GetText
()));
bRet
=
true
;
}
return
bRet
;
return
bRet
;
}
}
void
ScTpFormulaOptions
::
Reset
(
const
SfxItemSet
&
rCoreSet
)
void
ScTpFormulaOptions
::
Reset
(
const
SfxItemSet
&
rCoreSet
)
{
{
ScFormulaOptions
aOpt
;
const
SfxPoolItem
*
pItem
=
NULL
;
const
SfxPoolItem
*
pItem
=
NULL
;
if
(
SFX_ITEM_SET
==
rCoreSet
.
GetItemState
(
SID_SCFORMULAOPTIONS
,
false
,
&
pItem
))
aOpt
=
((
const
ScTpFormulaItem
*
)
pItem
)
->
GetFormulaOptions
();
// formula grammar.
// formula grammar.
maLbFormulaSyntax
.
SelectEntryPos
(
0
);
::
formula
::
FormulaGrammar
::
Grammar
eGram
=
aOpt
.
GetFormulaSyntax
();
if
(
rCoreSet
.
HasItem
(
SID_SC_OPT_FORMULA_GRAMMAR
,
&
pItem
))
switch
(
eGram
)
{
{
sal_uInt16
nVal
=
static_cast
<
const
SfxUInt16Item
*>
(
pItem
)
->
GetValue
();
case
:
:
formula
::
FormulaGrammar
::
GRAM_NATIVE
:
if
(
nVal
<=
2
)
maLbFormulaSyntax
.
SelectEntryPos
(
0
);
maLbFormulaSyntax
.
SelectEntryPos
(
nVal
);
break
;
case
:
:
formula
::
FormulaGrammar
::
GRAM_NATIVE_XL_A1
:
maLbFormulaSyntax
.
SelectEntryPos
(
1
);
break
;
case
:
:
formula
::
FormulaGrammar
::
GRAM_NATIVE_XL_R1C1
:
maLbFormulaSyntax
.
SelectEntryPos
(
2
);
break
;
default
:
maLbFormulaSyntax
.
SelectEntryPos
(
0
);
}
}
maLbFormulaSyntax
.
SaveValue
();
maLbFormulaSyntax
.
SaveValue
();
// english function name.
// english function name.
maCbEnglishFuncName
.
Check
(
false
);
maCbEnglishFuncName
.
Check
(
aOpt
.
GetUseEnglishFuncName
()
);
if
(
rCoreSet
.
HasItem
(
SID_SC_OPT_FORMULA_ENGLISH_FUNCNAME
,
&
pItem
))
{
bool
bVal
=
static_cast
<
const
SfxBoolItem
*>
(
pItem
)
->
GetValue
();
maCbEnglishFuncName
.
Check
(
bVal
);
}
maCbEnglishFuncName
.
SaveValue
();
maCbEnglishFuncName
.
SaveValue
();
ResetSeparators
();
// Separators
OUString
aSep
=
aOpt
.
GetFormulaSepArg
();
// argument separator.
OUString
aSepArrayRow
=
aOpt
.
GetFormulaSepArrayRow
();
if
(
rCoreSet
.
HasItem
(
SID_SC_OPT_FORMULA_SEP_ARG
,
&
pItem
))
OUString
aSepArrayCol
=
aOpt
.
GetFormulaSepArrayCol
();
{
rtl
::
OUString
aVal
=
static_cast
<
const
SfxStringItem
*>
(
pItem
)
->
GetValue
();
if
(
aVal
.
getLength
()
==
1
)
maEdSepFuncArg
.
SetText
(
aVal
);
}
maEdSepFuncArg
.
SaveValue
();
// matrix column separator.
if
(
rCoreSet
.
HasItem
(
SID_SC_OPT_FORMULA_SEP_ARRAY_COL
,
&
pItem
))
{
rtl
::
OUString
aVal
=
static_cast
<
const
SfxStringItem
*>
(
pItem
)
->
GetValue
();
if
(
aVal
.
getLength
()
==
1
)
maEdSepArrayCol
.
SetText
(
aVal
);
}
maEdSepArrayCol
.
SaveValue
();
// matrix row separator.
if
(
aSep
.
getLength
()
==
1
&&
aSepArrayRow
.
getLength
()
==
1
&&
aSepArrayCol
.
getLength
()
==
1
)
if
(
rCoreSet
.
HasItem
(
SID_SC_OPT_FORMULA_SEP_ARRAY_ROW
,
&
pItem
))
{
{
rtl
::
OUString
aVal
=
static_cast
<
const
SfxStringItem
*>
(
pItem
)
->
GetValue
();
// Each separator must be one character long.
if
(
aVal
.
getLength
()
==
1
)
maEdSepFuncArg
.
SetText
(
aSep
);
maEdSepArrayRow
.
SetText
(
aVal
);
maEdSepArrayCol
.
SetText
(
aSepArrayCol
);
maEdSepArrayRow
.
SetText
(
aSepArrayRow
);
maEdSepFuncArg
.
SaveValue
();
maEdSepArrayCol
.
SaveValue
();
maEdSepArrayRow
.
SaveValue
();
}
}
maEdSepArrayRow
.
SaveValue
();
else
ResetSeparators
();
}
}
int
ScTpFormulaOptions
::
DeactivatePage
(
SfxItemSet
*
/*pSet*/
)
int
ScTpFormulaOptions
::
DeactivatePage
(
SfxItemSet
*
/*pSet*/
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment