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
50b5d607
Kaydet (Commit)
50b5d607
authored
Haz 13, 2011
tarafından
Albert Thuswaldner
Kaydeden (comit)
Kohei Yoshida
Haz 13, 2011
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fdo#33293: Option to configure initial number of sheets in Calc.
üst
2206f826
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
289 additions
and
8 deletions
+289
-8
Library_scui.mk
sc/Library_scui.mk
+1
-0
docoptio.hxx
sc/inc/docoptio.hxx
+9
-0
helpids.h
sc/inc/helpids.h
+1
-1
sc.hrc
sc/inc/sc.hrc
+3
-0
appoptio.cxx
sc/source/core/tool/appoptio.cxx
+1
-1
docoptio.cxx
sc/source/core/tool/docoptio.cxx
+65
-1
scmod.cxx
sc/source/ui/app/scmod.cxx
+9
-1
scdlgfact.cxx
sc/source/ui/attrdlg/scdlgfact.cxx
+3
-0
optdlg.hrc
sc/source/ui/inc/optdlg.hrc
+5
-0
tpdefaults.hxx
sc/source/ui/inc/tpdefaults.hxx
+65
-0
tpdefaults.cxx
sc/source/ui/optdlg/tpdefaults.cxx
+87
-0
optdlg.src
sc/source/ui/src/optdlg.src
+32
-0
tabvwsh4.cxx
sc/source/ui/view/tabvwsh4.cxx
+8
-4
No files found.
sc/Library_scui.mk
Dosyayı görüntüle @
50b5d607
...
@@ -103,6 +103,7 @@ $(eval $(call gb_Library_add_exception_objects,scui,\
...
@@ -103,6 +103,7 @@ $(eval $(call gb_Library_add_exception_objects,scui,\
sc/source/ui/optdlg/tpcalc \
sc/source/ui/optdlg/tpcalc \
sc/source/ui/optdlg/tpcompatibility \
sc/source/ui/optdlg/tpcompatibility \
sc/source/ui/optdlg/tpformula \
sc/source/ui/optdlg/tpformula \
sc/source/ui/optdlg/tpdefaults \
sc/source/ui/optdlg/tpprint \
sc/source/ui/optdlg/tpprint \
sc/source/ui/optdlg/tpusrlst \
sc/source/ui/optdlg/tpusrlst \
sc/source/ui/optdlg/tpview \
sc/source/ui/optdlg/tpview \
...
...
sc/inc/docoptio.hxx
Dosyayı görüntüle @
50b5d607
...
@@ -33,6 +33,7 @@
...
@@ -33,6 +33,7 @@
#include <svl/poolitem.hxx>
#include <svl/poolitem.hxx>
#include <svl/itemprop.hxx>
#include <svl/itemprop.hxx>
#include "scdllapi.h"
#include "scdllapi.h"
#include "scmod.hxx"
#include "optutil.hxx"
#include "optutil.hxx"
#include "formula/grammar.hxx"
#include "formula/grammar.hxx"
...
@@ -41,6 +42,7 @@ class SC_DLLPUBLIC ScDocOptions
...
@@ -41,6 +42,7 @@ class SC_DLLPUBLIC ScDocOptions
{
{
double
fIterEps
;
// epsilon value dazu
double
fIterEps
;
// epsilon value dazu
sal_uInt16
nIterCount
;
// number
sal_uInt16
nIterCount
;
// number
SCTAB
nInitTabCount
;
// number of Tabs for new Spreadssheet doc
sal_uInt16
nPrecStandardFormat
;
// precision for standard format
sal_uInt16
nPrecStandardFormat
;
// precision for standard format
ScOptionsUtil
::
KeyBindingType
eKeyBindingType
;
ScOptionsUtil
::
KeyBindingType
eKeyBindingType
;
sal_uInt16
nDay
;
// Null date:
sal_uInt16
nDay
;
// Null date:
...
@@ -79,6 +81,8 @@ public:
...
@@ -79,6 +81,8 @@ public:
void
SetIter
(
sal_Bool
bVal
)
{
bIsIter
=
bVal
;
}
void
SetIter
(
sal_Bool
bVal
)
{
bIsIter
=
bVal
;
}
sal_uInt16
GetIterCount
()
const
{
return
nIterCount
;
}
sal_uInt16
GetIterCount
()
const
{
return
nIterCount
;
}
void
SetIterCount
(
sal_uInt16
nCount
)
{
nIterCount
=
nCount
;
}
void
SetIterCount
(
sal_uInt16
nCount
)
{
nIterCount
=
nCount
;
}
SCTAB
GetInitTabCount
()
const
{
return
nInitTabCount
;
}
void
SetInitTabCount
(
SCTAB
nTabs
)
{
nInitTabCount
=
nTabs
;
}
double
GetIterEps
()
const
{
return
fIterEps
;
}
double
GetIterEps
()
const
{
return
fIterEps
;
}
void
SetIterEps
(
double
fEps
)
{
fIterEps
=
fEps
;
}
void
SetIterEps
(
double
fEps
)
{
fIterEps
=
fEps
;
}
...
@@ -134,6 +138,7 @@ inline const ScDocOptions& ScDocOptions::operator=( const ScDocOptions& rCpy )
...
@@ -134,6 +138,7 @@ inline const ScDocOptions& ScDocOptions::operator=( const ScDocOptions& rCpy )
bIsIgnoreCase
=
rCpy
.
bIsIgnoreCase
;
bIsIgnoreCase
=
rCpy
.
bIsIgnoreCase
;
bIsIter
=
rCpy
.
bIsIter
;
bIsIter
=
rCpy
.
bIsIter
;
nIterCount
=
rCpy
.
nIterCount
;
nIterCount
=
rCpy
.
nIterCount
;
nInitTabCount
=
rCpy
.
nInitTabCount
;
fIterEps
=
rCpy
.
fIterEps
;
fIterEps
=
rCpy
.
fIterEps
;
nPrecStandardFormat
=
rCpy
.
nPrecStandardFormat
;
nPrecStandardFormat
=
rCpy
.
nPrecStandardFormat
;
eKeyBindingType
=
rCpy
.
eKeyBindingType
;
eKeyBindingType
=
rCpy
.
eKeyBindingType
;
...
@@ -162,6 +167,7 @@ inline int ScDocOptions::operator==( const ScDocOptions& rOpt ) const
...
@@ -162,6 +167,7 @@ inline int ScDocOptions::operator==( const ScDocOptions& rOpt ) const
rOpt
.
bIsIgnoreCase
==
bIsIgnoreCase
rOpt
.
bIsIgnoreCase
==
bIsIgnoreCase
&&
rOpt
.
bIsIter
==
bIsIter
&&
rOpt
.
bIsIter
==
bIsIter
&&
rOpt
.
nIterCount
==
nIterCount
&&
rOpt
.
nIterCount
==
nIterCount
&&
rOpt
.
nInitTabCount
==
nInitTabCount
&&
rOpt
.
fIterEps
==
fIterEps
&&
rOpt
.
fIterEps
==
fIterEps
&&
rOpt
.
nPrecStandardFormat
==
nPrecStandardFormat
&&
rOpt
.
nPrecStandardFormat
==
nPrecStandardFormat
&&
rOpt
.
eKeyBindingType
==
eKeyBindingType
&&
rOpt
.
eKeyBindingType
==
eKeyBindingType
...
@@ -221,16 +227,19 @@ class ScDocCfg : public ScDocOptions
...
@@ -221,16 +227,19 @@ class ScDocCfg : public ScDocOptions
ScLinkConfigItem
aFormulaItem
;
ScLinkConfigItem
aFormulaItem
;
ScLinkConfigItem
aLayoutItem
;
ScLinkConfigItem
aLayoutItem
;
ScLinkConfigItem
aCompatItem
;
ScLinkConfigItem
aCompatItem
;
ScLinkConfigItem
aDefaultsItem
;
DECL_LINK
(
CalcCommitHdl
,
void
*
);
DECL_LINK
(
CalcCommitHdl
,
void
*
);
DECL_LINK
(
FormulaCommitHdl
,
void
*
);
DECL_LINK
(
FormulaCommitHdl
,
void
*
);
DECL_LINK
(
LayoutCommitHdl
,
void
*
);
DECL_LINK
(
LayoutCommitHdl
,
void
*
);
DECL_LINK
(
CompatCommitHdl
,
void
*
);
DECL_LINK
(
CompatCommitHdl
,
void
*
);
DECL_LINK
(
DefaultsCommitHdl
,
void
*
);
com
::
sun
::
star
::
uno
::
Sequence
<
rtl
::
OUString
>
GetCalcPropertyNames
();
com
::
sun
::
star
::
uno
::
Sequence
<
rtl
::
OUString
>
GetCalcPropertyNames
();
com
::
sun
::
star
::
uno
::
Sequence
<
rtl
::
OUString
>
GetFormulaPropertyNames
();
com
::
sun
::
star
::
uno
::
Sequence
<
rtl
::
OUString
>
GetFormulaPropertyNames
();
com
::
sun
::
star
::
uno
::
Sequence
<
rtl
::
OUString
>
GetLayoutPropertyNames
();
com
::
sun
::
star
::
uno
::
Sequence
<
rtl
::
OUString
>
GetLayoutPropertyNames
();
com
::
sun
::
star
::
uno
::
Sequence
<
rtl
::
OUString
>
GetCompatPropertyNames
();
com
::
sun
::
star
::
uno
::
Sequence
<
rtl
::
OUString
>
GetCompatPropertyNames
();
com
::
sun
::
star
::
uno
::
Sequence
<
rtl
::
OUString
>
GetDefaultsPropertyNames
();
public
:
public
:
ScDocCfg
();
ScDocCfg
();
...
...
sc/inc/helpids.h
Dosyayı görüntüle @
50b5d607
...
@@ -99,7 +99,7 @@
...
@@ -99,7 +99,7 @@
#define HID_SCPAGE_COMPATIBILITY "SC_HID_SCPAGE_COMPATIBILITY"
#define HID_SCPAGE_COMPATIBILITY "SC_HID_SCPAGE_COMPATIBILITY"
#define HID_SCPAGE_TABLE "SC_HID_SCPAGE_TABLE"
#define HID_SCPAGE_TABLE "SC_HID_SCPAGE_TABLE"
#define HID_SCPAGE_PRINT "SC_HID_SCPAGE_PRINT"
#define HID_SCPAGE_PRINT "SC_HID_SCPAGE_PRINT"
#define HID_SCPAGE_DEFAULTS "SC_HID_SCPAGE_DEFAULTS"
#define HID_SCPAGE_SUBT_GROUP1 "SC_HID_SCPAGE_SUBT_GROUP1"
#define HID_SCPAGE_SUBT_GROUP1 "SC_HID_SCPAGE_SUBT_GROUP1"
#define HID_SCPAGE_SUBT_GROUP2 "SC_HID_SCPAGE_SUBT_GROUP2"
#define HID_SCPAGE_SUBT_GROUP2 "SC_HID_SCPAGE_SUBT_GROUP2"
#define HID_SCPAGE_SUBT_GROUP3 "SC_HID_SCPAGE_SUBT_GROUP3"
#define HID_SCPAGE_SUBT_GROUP3 "SC_HID_SCPAGE_SUBT_GROUP3"
...
...
sc/inc/sc.hrc
Dosyayı görüntüle @
50b5d607
...
@@ -1254,5 +1254,8 @@
...
@@ -1254,5 +1254,8 @@
// compatibility options page
// compatibility options page
#define RID_SCPAGE_COMPATIBILITY (SC_OOO_BUILD_START + 9)
#define RID_SCPAGE_COMPATIBILITY (SC_OOO_BUILD_START + 9)
// init option page
#define RID_SCPAGE_DEFAULTS (SC_OOO_BUILD_START + 10)
#endif
#endif
sc/source/core/tool/appoptio.cxx
Dosyayı görüntüle @
50b5d607
...
@@ -85,7 +85,7 @@ ScAppOptions::~ScAppOptions()
...
@@ -85,7 +85,7 @@ ScAppOptions::~ScAppOptions()
void
ScAppOptions
::
SetDefaults
()
void
ScAppOptions
::
SetDefaults
()
{
{
// Set default tab count for new spreadsheet.
// Set default tab count for new spreadsheet.
nTabCountInNewSpreadsheet
=
3
;
nTabCountInNewSpreadsheet
=
0
;
if
(
ScOptionsUtil
::
IsMetricSystem
()
)
if
(
ScOptionsUtil
::
IsMetricSystem
()
)
eMetric
=
FUNIT_CM
;
// default for countries with metric system
eMetric
=
FUNIT_CM
;
// default for countries with metric system
...
...
sc/source/core/tool/docoptio.cxx
Dosyayı görüntüle @
50b5d607
...
@@ -91,6 +91,7 @@ ScDocOptions::ScDocOptions()
...
@@ -91,6 +91,7 @@ ScDocOptions::ScDocOptions()
ScDocOptions
::
ScDocOptions
(
const
ScDocOptions
&
rCpy
)
ScDocOptions
::
ScDocOptions
(
const
ScDocOptions
&
rCpy
)
:
fIterEps
(
rCpy
.
fIterEps
),
:
fIterEps
(
rCpy
.
fIterEps
),
nIterCount
(
rCpy
.
nIterCount
),
nIterCount
(
rCpy
.
nIterCount
),
nInitTabCount
(
rCpy
.
nInitTabCount
),
nPrecStandardFormat
(
rCpy
.
nPrecStandardFormat
),
nPrecStandardFormat
(
rCpy
.
nPrecStandardFormat
),
eKeyBindingType
(
rCpy
.
eKeyBindingType
),
eKeyBindingType
(
rCpy
.
eKeyBindingType
),
nDay
(
rCpy
.
nDay
),
nDay
(
rCpy
.
nDay
),
...
@@ -126,6 +127,7 @@ void ScDocOptions::ResetDocOptions()
...
@@ -126,6 +127,7 @@ void ScDocOptions::ResetDocOptions()
bIsIgnoreCase
=
false
;
bIsIgnoreCase
=
false
;
bIsIter
=
false
;
bIsIter
=
false
;
nIterCount
=
100
;
nIterCount
=
100
;
nInitTabCount
=
3
;
fIterEps
=
1.0E-3
;
fIterEps
=
1.0E-3
;
nPrecStandardFormat
=
SvNumberFormatter
::
UNLIMITED_PRECISION
;
nPrecStandardFormat
=
SvNumberFormatter
::
UNLIMITED_PRECISION
;
eKeyBindingType
=
ScOptionsUtil
::
KEY_DEFAULT
;
eKeyBindingType
=
ScOptionsUtil
::
KEY_DEFAULT
;
...
@@ -290,6 +292,11 @@ SfxPoolItem* ScTpCalcItem::Clone( SfxItemPool * ) const
...
@@ -290,6 +292,11 @@ SfxPoolItem* ScTpCalcItem::Clone( SfxItemPool * ) const
#define SCCOMPATOPT_KEY_BINDING 0
#define SCCOMPATOPT_KEY_BINDING 0
#define SCCOMPATOPT_COUNT 1
#define SCCOMPATOPT_COUNT 1
#define CFGPATH_DEFAULTS "Office.Calc/Defaults"
#define SCDEFAULTSOPT_TAB_COUNT 0
#define SCDEFAULTSOPT_COUNT 1
Sequence
<
OUString
>
ScDocCfg
::
GetCalcPropertyNames
()
Sequence
<
OUString
>
ScDocCfg
::
GetCalcPropertyNames
()
{
{
static
const
char
*
aPropNames
[]
=
static
const
char
*
aPropNames
[]
=
...
@@ -365,11 +372,27 @@ Sequence<OUString> ScDocCfg::GetCompatPropertyNames()
...
@@ -365,11 +372,27 @@ Sequence<OUString> ScDocCfg::GetCompatPropertyNames()
return
aNames
;
return
aNames
;
}
}
Sequence
<
OUString
>
ScDocCfg
::
GetDefaultsPropertyNames
()
{
static
const
char
*
aPropNames
[]
=
{
"Other/TabCount"
// SCDEFAULTSOPT_COUNT_TAB_COUNT
};
Sequence
<
OUString
>
aNames
(
SCDEFAULTSOPT_COUNT
);
OUString
*
pNames
=
aNames
.
getArray
();
for
(
int
i
=
0
;
i
<
SCDEFAULTSOPT_COUNT
;
++
i
)
pNames
[
i
]
=
OUString
::
createFromAscii
(
aPropNames
[
i
]);
return
aNames
;
}
ScDocCfg
::
ScDocCfg
()
:
ScDocCfg
::
ScDocCfg
()
:
aCalcItem
(
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
CFGPATH_CALC
))
),
aCalcItem
(
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
CFGPATH_CALC
))
),
aFormulaItem
(
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
CFGPATH_FORMULA
))),
aFormulaItem
(
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
CFGPATH_FORMULA
))),
aLayoutItem
(
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
CFGPATH_DOCLAYOUT
))),
aLayoutItem
(
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
CFGPATH_DOCLAYOUT
))),
aCompatItem
(
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
CFGPATH_COMPAT
)))
aCompatItem
(
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
CFGPATH_COMPAT
))),
aDefaultsItem
(
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
CFGPATH_DEFAULTS
)))
{
{
sal_Int32
nIntVal
=
0
;
sal_Int32
nIntVal
=
0
;
...
@@ -559,6 +582,27 @@ ScDocCfg::ScDocCfg() :
...
@@ -559,6 +582,27 @@ ScDocCfg::ScDocCfg() :
}
}
}
}
aCompatItem
.
SetCommitLink
(
LINK
(
this
,
ScDocCfg
,
CompatCommitHdl
)
);
aCompatItem
.
SetCommitLink
(
LINK
(
this
,
ScDocCfg
,
CompatCommitHdl
)
);
aNames
=
GetDefaultsPropertyNames
();
aValues
=
aDefaultsItem
.
GetProperties
(
aNames
);
aDefaultsItem
.
EnableNotification
(
aNames
);
pValues
=
aValues
.
getConstArray
();
if
(
aValues
.
getLength
()
==
aNames
.
getLength
())
{
for
(
int
nProp
=
0
;
nProp
<
aNames
.
getLength
();
++
nProp
)
{
switch
(
nProp
)
{
case
SCDEFAULTSOPT_TAB_COUNT
:
nIntVal
=
3
;
// 3 = 'Default'
if
(
pValues
[
nProp
]
>>=
nIntVal
)
SetInitTabCount
(
static_cast
<
SCTAB
>
(
nIntVal
)
);
break
;
}
}
}
aDefaultsItem
.
SetCommitLink
(
LINK
(
this
,
ScDocCfg
,
DefaultsCommitHdl
)
);
}
}
IMPL_LINK
(
ScDocCfg
,
CalcCommitHdl
,
void
*
,
EMPTYARG
)
IMPL_LINK
(
ScDocCfg
,
CalcCommitHdl
,
void
*
,
EMPTYARG
)
...
@@ -703,6 +747,25 @@ IMPL_LINK( ScDocCfg, CompatCommitHdl, void *, EMPTYARG )
...
@@ -703,6 +747,25 @@ IMPL_LINK( ScDocCfg, CompatCommitHdl, void *, EMPTYARG )
return
0
;
return
0
;
}
}
IMPL_LINK
(
ScDocCfg
,
DefaultsCommitHdl
,
void
*
,
EMPTYARG
)
{
Sequence
<
OUString
>
aNames
=
GetDefaultsPropertyNames
();
Sequence
<
Any
>
aValues
(
aNames
.
getLength
());
Any
*
pValues
=
aValues
.
getArray
();
for
(
int
nProp
=
0
;
nProp
<
aNames
.
getLength
();
++
nProp
)
{
switch
(
nProp
)
{
case
SCDEFAULTSOPT_TAB_COUNT
:
pValues
[
nProp
]
<<=
static_cast
<
sal_Int32
>
(
GetInitTabCount
());
break
;
}
}
aDefaultsItem
.
PutProperties
(
aNames
,
aValues
);
return
0
;
}
void
ScDocCfg
::
SetOptions
(
const
ScDocOptions
&
rNew
)
void
ScDocCfg
::
SetOptions
(
const
ScDocOptions
&
rNew
)
{
{
*
(
ScDocOptions
*
)
this
=
rNew
;
*
(
ScDocOptions
*
)
this
=
rNew
;
...
@@ -711,6 +774,7 @@ void ScDocCfg::SetOptions( const ScDocOptions& rNew )
...
@@ -711,6 +774,7 @@ void ScDocCfg::SetOptions( const ScDocOptions& rNew )
aFormulaItem
.
SetModified
();
aFormulaItem
.
SetModified
();
aLayoutItem
.
SetModified
();
aLayoutItem
.
SetModified
();
aCompatItem
.
SetModified
();
aCompatItem
.
SetModified
();
aDefaultsItem
.
SetModified
();
}
}
...
...
sc/source/ui/app/scmod.cxx
Dosyayı görüntüle @
50b5d607
...
@@ -100,13 +100,13 @@
...
@@ -100,13 +100,13 @@
#include "dwfunctr.hxx"
#include "dwfunctr.hxx"
#include "formdata.hxx"
#include "formdata.hxx"
#include "tpprint.hxx"
#include "tpprint.hxx"
#include "tpdefaults.hxx"
#include "transobj.hxx"
#include "transobj.hxx"
#include "detfunc.hxx"
#include "detfunc.hxx"
#include "preview.hxx"
#include "preview.hxx"
#include <svx/xmlsecctrl.hxx>
#include <svx/xmlsecctrl.hxx>
#define ScModule
#define ScModule
#include "scslots.hxx"
#include "scslots.hxx"
...
@@ -2047,6 +2047,14 @@ SfxTabPage* ScModule::CreateTabPage( sal_uInt16 nId, Window* pParent, const Sfx
...
@@ -2047,6 +2047,14 @@ SfxTabPage* ScModule::CreateTabPage( sal_uInt16 nId, Window* pParent, const Sfx
pRet
=
(
*
ScTpPrintOptionsCreate
)(
pParent
,
rSet
);
pRet
=
(
*
ScTpPrintOptionsCreate
)(
pParent
,
rSet
);
}
}
break
;
break
;
case
RID_SC_TP_DEFAULTS
:
{
::
CreateTabPage
ScTpDefaultsOptionsCreate
=
pFact
->
GetTabPageCreatorFunc
(
RID_SCPAGE_DEFAULTS
);
if
(
ScTpDefaultsOptionsCreate
)
pRet
=
(
*
ScTpDefaultsOptionsCreate
)(
pParent
,
rSet
);
}
break
;
case
RID_OFA_TP_INTERNATIONAL
:
case
RID_OFA_TP_INTERNATIONAL
:
{
{
SfxAbstractDialogFactory
*
pSfxFact
=
SfxAbstractDialogFactory
::
Create
();
SfxAbstractDialogFactory
*
pSfxFact
=
SfxAbstractDialogFactory
::
Create
();
...
...
sc/source/ui/attrdlg/scdlgfact.cxx
Dosyayı görüntüle @
50b5d607
...
@@ -83,6 +83,7 @@
...
@@ -83,6 +83,7 @@
#include "tpformula.hxx"
#include "tpformula.hxx"
#include "datafdlg.hxx"
#include "datafdlg.hxx"
#include "tpcompatibility.hxx"
#include "tpcompatibility.hxx"
#include "tpdefaults.hxx"
// ause
// ause
#include "editutil.hxx"
#include "editutil.hxx"
...
@@ -1608,6 +1609,8 @@ CreateTabPage ScAbstractDialogFactory_Impl::GetTabPageCreatorFunc( sal_uInt16 nI
...
@@ -1608,6 +1609,8 @@ CreateTabPage ScAbstractDialogFactory_Impl::GetTabPageCreatorFunc( sal_uInt16 nI
return
ScTpFormulaOptions
::
Create
;
return
ScTpFormulaOptions
::
Create
;
case
RID_SCPAGE_COMPATIBILITY
:
case
RID_SCPAGE_COMPATIBILITY
:
return
ScTpCompatOptions
::
Create
;
return
ScTpCompatOptions
::
Create
;
case
RID_SCPAGE_DEFAULTS
:
return
ScTpDefaultsOptions
::
Create
;
case
RID_SCPAGE_PRINT
:
case
RID_SCPAGE_PRINT
:
return
ScTpPrintOptions
::
Create
;
return
ScTpPrintOptions
::
Create
;
//break;
//break;
...
...
sc/source/ui/inc/optdlg.hrc
Dosyayı görüntüle @
50b5d607
...
@@ -194,3 +194,8 @@
...
@@ -194,3 +194,8 @@
#define FL_KEY_BINDINGS 1
#define FL_KEY_BINDINGS 1
#define FT_KEY_BINDINGS 2
#define FT_KEY_BINDINGS 2
#define LB_KEY_BINDINGS 3
#define LB_KEY_BINDINGS 3
// TP_DEFAULTS
#define FL_INIT_SPREADSHEET 1
#define FT_NSHEETS 2
#define ED_NSHEETS 3
sc/source/ui/inc/tpdefaults.hxx
0 → 100644
Dosyayı görüntüle @
50b5d607
/* -*- 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) 2011 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_TPDEFAULTS_HXX__
#define __SC_TPDEFAULTS_HXX__
#include <sfx2/tabdlg.hxx>
#include <vcl/fixed.hxx>
#include <vcl/field.hxx>
#include <boost/shared_ptr.hpp>
class
ScDocOptions
;
class
ScTpDefaultsOptions
:
public
SfxTabPage
{
public
:
using
SfxTabPage
::
DeactivatePage
;
static
SfxTabPage
*
Create
(
Window
*
pParent
,
const
SfxItemSet
&
rCoreAttrs
);
virtual
sal_Bool
FillItemSet
(
SfxItemSet
&
rCoreAttrs
);
virtual
void
Reset
(
const
SfxItemSet
&
rCoreAttrs
);
virtual
int
DeactivatePage
(
SfxItemSet
*
pSet
=
NULL
);
private
:
explicit
ScTpDefaultsOptions
(
Window
*
pParent
,
const
SfxItemSet
&
rCoreAttrs
);
virtual
~
ScTpDefaultsOptions
();
private
:
FixedLine
aFLInitSpreadSheet
;
FixedText
aFtNSheets
;
NumericField
aEdNSheets
;
::
boost
::
shared_ptr
<
ScDocOptions
>
mpLocalOptions
;
};
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sc/source/ui/optdlg/tpdefaults.cxx
0 → 100644
Dosyayı görüntüle @
50b5d607
/* -*- 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) 2011 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.
*/
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sc.hxx"
#undef SC_DLLIMPLEMENTATION
#include "tpdefaults.hxx"
#include "optdlg.hrc"
#include "scresid.hxx"
#include "scmod.hxx"
#include "docoptio.hxx"
ScTpDefaultsOptions
::
ScTpDefaultsOptions
(
Window
*
pParent
,
const
SfxItemSet
&
rCoreAttrs
)
:
SfxTabPage
(
pParent
,
ScResId
(
RID_SCPAGE_DEFAULTS
),
rCoreAttrs
),
aFLInitSpreadSheet
(
this
,
ScResId
(
FL_INIT_SPREADSHEET
)
),
aFtNSheets
(
this
,
ScResId
(
FT_NSHEETS
)
),
aEdNSheets
(
this
,
ScResId
(
ED_NSHEETS
)
)
{
FreeResource
();
const
ScTpCalcItem
&
rItem
=
static_cast
<
const
ScTpCalcItem
&>
(
rCoreAttrs
.
Get
(
GetWhich
(
SID_SCDOCOPTIONS
)));
mpLocalOptions
.
reset
(
new
ScDocOptions
(
rItem
.
GetDocOptions
()));
}
ScTpDefaultsOptions
::~
ScTpDefaultsOptions
()
{
}
SfxTabPage
*
ScTpDefaultsOptions
::
Create
(
Window
*
pParent
,
const
SfxItemSet
&
rCoreAttrs
)
{
return
new
ScTpDefaultsOptions
(
pParent
,
rCoreAttrs
);
}
sal_Bool
ScTpDefaultsOptions
::
FillItemSet
(
SfxItemSet
&
rCoreAttrs
)
{
SCTAB
nTabCount
=
static_cast
<
SCTAB
>
(
aEdNSheets
.
GetValue
());
if
(
mpLocalOptions
->
GetInitTabCount
()
!=
nTabCount
)
{
mpLocalOptions
->
SetInitTabCount
(
nTabCount
);
rCoreAttrs
.
Put
(
ScTpCalcItem
(
GetWhich
(
SID_SCDOCOPTIONS
),
*
mpLocalOptions
));
return
sal_True
;
}
else
return
sal_False
;
}
void
ScTpDefaultsOptions
::
Reset
(
const
SfxItemSet
&
/*rCoreAttrs*/
)
{
aEdNSheets
.
SetValue
(
static_cast
<
sal_uInt16
>
(
mpLocalOptions
->
GetInitTabCount
())
);
}
int
ScTpDefaultsOptions
::
DeactivatePage
(
SfxItemSet
*
/*pSet*/
)
{
return
KEEP_PAGE
;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sc/source/ui/src/optdlg.src
Dosyayı görüntüle @
50b5d607
...
@@ -908,3 +908,35 @@ TabPage RID_SCPAGE_PRINT
...
@@ -908,3 +908,35 @@ TabPage RID_SCPAGE_PRINT
Text [ en-US ] = "~Print only selected sheets";
Text [ en-US ] = "~Print only selected sheets";
};
};
};
};
TabPage RID_SCPAGE_DEFAULTS
{
HelpId = HID_SCPAGE_DEFAULTS ;
SVLook = TRUE ;
Hide = TRUE ;
Pos = MAP_APPFONT ( 0 , 0 ) ;
Size = MAP_APPFONT ( 260 , 185 ) ;
FixedLine FL_INIT_SPREADSHEET
{
Pos = MAP_APPFONT ( 6 , 3 ) ;
Size = MAP_APPFONT ( 248 , 8 ) ;
Text [ en-US ] = "New Spreadsheet";
};
FixedText FT_NSHEETS
{
Pos = MAP_APPFONT ( 12 , 32 ) ;
Size = MAP_APPFONT ( 120 , 8 ) ;
Text [ en-US ] = "Number of worksheets in new document";
};
NumericField ED_NSHEETS
{
HelpID = "sc:NumericField:RID_SCPAGE_CALC:ED_NSHEETS";
Border = TRUE ;
Pos = MAP_APPFONT ( 130 , 30 ) ;
Size = MAP_APPFONT ( 25 , 12 ) ;
Minimum = 1 ;
Maximum = 32000 ;
Spin = TRUE ;
Repeat = TRUE ;
};
};
sc/source/ui/view/tabvwsh4.cxx
Dosyayı görüntüle @
50b5d607
...
@@ -29,8 +29,6 @@
...
@@ -29,8 +29,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sc.hxx"
#include "precompiled_sc.hxx"
// INCLUDE ---------------------------------------------------------------
// INCLUDE ---------------------------------------------------------------
#include "scitems.hxx"
#include "scitems.hxx"
...
@@ -97,6 +95,7 @@
...
@@ -97,6 +95,7 @@
#include "sc.hrc"
#include "sc.hrc"
#include "scabstdlg.hxx"
#include "scabstdlg.hxx"
#include "externalrefmgr.hxx"
#include "externalrefmgr.hxx"
#include "docoptio.hxx"
void
ActivateOlk
(
ScViewData
*
pViewData
);
void
ActivateOlk
(
ScViewData
*
pViewData
);
void
DeActivateOlk
(
ScViewData
*
pViewData
);
void
DeActivateOlk
(
ScViewData
*
pViewData
);
...
@@ -1596,8 +1595,13 @@ void ScTabViewShell::Construct( sal_uInt8 nForceDesignMode )
...
@@ -1596,8 +1595,13 @@ void ScTabViewShell::Construct( sal_uInt8 nForceDesignMode )
// append additional sheets (not for OLE object)
// append additional sheets (not for OLE object)
if
(
pDocSh
->
GetCreateMode
()
!=
SFX_CREATE_MODE_EMBEDDED
)
if
(
pDocSh
->
GetCreateMode
()
!=
SFX_CREATE_MODE_EMBEDDED
)
{
{
SCTAB
nInitTabCount
=
3
;
//! konfigurierbar !!!
// Get the customized initial tab count...
// Get the customized initial tab count, we only can set the count by VBA API currently.
// ... from option dialog.
const
ScDocOptions
&
rDocOpt
=
SC_MOD
()
->
GetDocOptions
();
SCTAB
nInitTabCount
=
rDocOpt
.
GetInitTabCount
();
// ... by VBA API.
const
ScAppOptions
&
rAppOpt
=
SC_MOD
()
->
GetAppOptions
();
const
ScAppOptions
&
rAppOpt
=
SC_MOD
()
->
GetAppOptions
();
SCTAB
nNewTabCount
=
rAppOpt
.
GetTabCountInNewSpreadsheet
();
SCTAB
nNewTabCount
=
rAppOpt
.
GetTabCountInNewSpreadsheet
();
if
(
nNewTabCount
>=
1
&&
nNewTabCount
<=
MAXTAB
)
if
(
nNewTabCount
>=
1
&&
nNewTabCount
<=
MAXTAB
)
...
...
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