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
ef3fd657
Kaydet (Commit)
ef3fd657
authored
May 30, 2012
tarafından
Kohei Yoshida
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Get the sub dialog functional.
Change-Id: Ib3311f64417b68cf94505aeb7f8b153cf5fcdbff
üst
7dd9054b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
90 additions
and
23 deletions
+90
-23
calcoptionsdlg.cxx
sc/source/ui/optdlg/calcoptionsdlg.cxx
+83
-17
calcoptionsdlg.hxx
sc/source/ui/optdlg/calcoptionsdlg.hxx
+4
-3
calcoptionsdlg.src
sc/source/ui/optdlg/calcoptionsdlg.src
+2
-2
tpformula.cxx
sc/source/ui/optdlg/tpformula.cxx
+1
-1
No files found.
sc/source/ui/optdlg/calcoptionsdlg.cxx
Dosyayı görüntüle @
ef3fd657
...
@@ -62,6 +62,41 @@ void OptionString::Paint(const Point& rPos, SvLBox& rDev, sal_uInt16 /*nFlags*/,
...
@@ -62,6 +62,41 @@ void OptionString::Paint(const Point& rPos, SvLBox& rDev, sal_uInt16 /*nFlags*/,
rDev
.
SetFont
(
aOldFont
);
rDev
.
SetFont
(
aOldFont
);
}
}
rtl
::
OUString
toString
(
formula
::
FormulaGrammar
::
AddressConvention
eConv
)
{
switch
(
eConv
)
{
case
formula
:
:
FormulaGrammar
::
CONV_OOO
:
return
rtl
::
OUString
(
"Calc A1"
);
case
formula
:
:
FormulaGrammar
::
CONV_XL_A1
:
return
rtl
::
OUString
(
"Excel A1"
);
case
formula
:
:
FormulaGrammar
::
CONV_XL_R1C1
:
return
rtl
::
OUString
(
"Excel R1C1"
);
case
formula
:
:
FormulaGrammar
::
CONV_UNSPECIFIED
:
default
:
;
}
return
rtl
::
OUString
(
"Use formula syntax"
);
}
formula
::
FormulaGrammar
::
AddressConvention
toAddressConvention
(
sal_uInt16
nPos
)
{
switch
(
nPos
)
{
case
1
:
return
formula
::
FormulaGrammar
::
CONV_OOO
;
case
2
:
return
formula
::
FormulaGrammar
::
CONV_XL_A1
;
case
3
:
return
formula
::
FormulaGrammar
::
CONV_XL_R1C1
;
case
0
:
default
:
;
}
return
formula
::
FormulaGrammar
::
CONV_UNSPECIFIED
;
}
}
}
ScCalcOptionsDialog
::
ScCalcOptionsDialog
(
Window
*
pParent
,
const
ScCalcConfig
&
rConfig
)
:
ScCalcOptionsDialog
::
ScCalcOptionsDialog
(
Window
*
pParent
,
const
ScCalcConfig
&
rConfig
)
:
...
@@ -80,8 +115,9 @@ ScCalcOptionsDialog::ScCalcOptionsDialog(Window* pParent, const ScCalcConfig& rC
...
@@ -80,8 +115,9 @@ ScCalcOptionsDialog::ScCalcOptionsDialog(Window* pParent, const ScCalcConfig& rC
maLbSettings
.
SetStyle
(
maLbSettings
.
GetStyle
()
|
WB_CLIPCHILDREN
|
WB_FORCE_MAKEVISIBLE
);
maLbSettings
.
SetStyle
(
maLbSettings
.
GetStyle
()
|
WB_CLIPCHILDREN
|
WB_FORCE_MAKEVISIBLE
);
maLbSettings
.
SetHighlightRange
();
maLbSettings
.
SetHighlightRange
();
maLbSettings
.
SetSelectHdl
(
LINK
(
this
,
ScCalcOptionsDialog
,
SettingsSelHdl
));
Link
aLink
=
LINK
(
this
,
ScCalcOptionsDialog
,
SettingsSelHdl
);
maLbSettings
.
SetDoubleClickHdl
(
LINK
(
this
,
ScCalcOptionsDialog
,
SettingsDoubleClickHdl
));
maLbSettings
.
SetSelectHdl
(
aLink
);
maLbOptionEdit
.
SetSelectHdl
(
aLink
);
FillOptionsList
();
FillOptionsList
();
FreeResource
();
FreeResource
();
...
@@ -90,18 +126,28 @@ ScCalcOptionsDialog::ScCalcOptionsDialog(Window* pParent, const ScCalcConfig& rC
...
@@ -90,18 +126,28 @@ ScCalcOptionsDialog::ScCalcOptionsDialog(Window* pParent, const ScCalcConfig& rC
ScCalcOptionsDialog
::~
ScCalcOptionsDialog
()
{}
ScCalcOptionsDialog
::~
ScCalcOptionsDialog
()
{}
const
ScCalcConfig
&
ScCalcOptionsDialog
::
GetConfig
()
const
{
return
maConfig
;
}
void
ScCalcOptionsDialog
::
FillOptionsList
()
void
ScCalcOptionsDialog
::
FillOptionsList
()
{
{
maLbSettings
.
SetUpdateMode
(
false
);
maLbSettings
.
SetUpdateMode
(
false
);
maLbSettings
.
Clear
();
SvLBoxTreeList
*
pModel
=
maLbSettings
.
GetModel
();
SvLBoxTreeList
*
pModel
=
maLbSettings
.
GetModel
();
SvLBoxEntry
*
pEntry
=
new
SvLBoxEntry
;
pEntry
->
AddItem
(
new
SvLBoxString
(
pEntry
,
0
,
rtl
::
OUString
()));
pEntry
->
AddItem
(
new
SvLBoxContextBmp
(
pEntry
,
0
,
Image
(),
Image
(),
0
));
OptionString
*
pItem
=
new
OptionString
(
maCaptionIndirectSyntax
,
"Calc A1"
);
pEntry
->
AddItem
(
pItem
);
pModel
->
Insert
(
pEntry
);
{
// Syntax for INDIRECT function.
SvLBoxEntry
*
pEntry
=
new
SvLBoxEntry
;
pEntry
->
AddItem
(
new
SvLBoxString
(
pEntry
,
0
,
rtl
::
OUString
()));
pEntry
->
AddItem
(
new
SvLBoxContextBmp
(
pEntry
,
0
,
Image
(),
Image
(),
0
));
OptionString
*
pItem
=
new
OptionString
(
maCaptionIndirectSyntax
,
toString
(
maConfig
.
meIndirectRefSyntax
));
pEntry
->
AddItem
(
pItem
);
pModel
->
Insert
(
pEntry
);
}
maLbSettings
.
SetUpdateMode
(
true
);
maLbSettings
.
SetUpdateMode
(
true
);
}
}
...
@@ -112,27 +158,47 @@ void ScCalcOptionsDialog::SelectionChanged()
...
@@ -112,27 +158,47 @@ void ScCalcOptionsDialog::SelectionChanged()
{
{
// Formula syntax for INDIRECT function.
// Formula syntax for INDIRECT function.
maLbOptionEdit
.
Clear
();
maLbOptionEdit
.
Clear
();
maLbOptionEdit
.
InsertEntry
(
rtl
::
OUString
(
"Use formula syntax"
));
maLbOptionEdit
.
InsertEntry
(
rtl
::
OUString
(
"Calc A1"
));
maLbOptionEdit
.
InsertEntry
(
rtl
::
OUString
(
"Calc A1"
));
maLbOptionEdit
.
InsertEntry
(
rtl
::
OUString
(
"Excel A1"
));
maLbOptionEdit
.
InsertEntry
(
rtl
::
OUString
(
"Excel A1"
));
maLbOptionEdit
.
InsertEntry
(
rtl
::
OUString
(
"Excel R1C1"
));
maLbOptionEdit
.
InsertEntry
(
rtl
::
OUString
(
"Excel R1C1"
));
maLbOptionEdit
.
SelectEntryPos
(
0
);
switch
(
maConfig
.
meIndirectRefSyntax
)
{
case
formula
:
:
FormulaGrammar
::
CONV_OOO
:
maLbOptionEdit
.
SelectEntryPos
(
1
);
break
;
case
formula
:
:
FormulaGrammar
::
CONV_XL_A1
:
maLbOptionEdit
.
SelectEntryPos
(
2
);
break
;
case
formula
:
:
FormulaGrammar
::
CONV_XL_R1C1
:
maLbOptionEdit
.
SelectEntryPos
(
3
);
break
;
case
formula
:
:
FormulaGrammar
::
CONV_UNSPECIFIED
:
default
:
maLbOptionEdit
.
SelectEntryPos
(
0
);
}
maFtAnnotation
.
SetText
(
maDescIndirectSyntax
);
maFtAnnotation
.
SetText
(
maDescIndirectSyntax
);
}
}
}
}
void
ScCalcOptionsDialog
::
EditOption
()
void
ScCalcOptionsDialog
::
ListOptionValueChanged
()
{
{
if
(
true
)
{
// Formula syntax for INDIRECT function.
sal_uInt16
nPos
=
maLbOptionEdit
.
GetSelectEntryPos
();
maConfig
.
meIndirectRefSyntax
=
toAddressConvention
(
nPos
);
FillOptionsList
();
}
}
}
IMPL_LINK
_NOARG
(
ScCalcOptionsDialog
,
SettingsSelHd
l
)
IMPL_LINK
(
ScCalcOptionsDialog
,
SettingsSelHdl
,
Control
*
,
pCtr
l
)
{
{
SelectionChanged
();
if
(
pCtrl
==
&
maLbSettings
)
return
0
;
SelectionChanged
();
}
else
if
(
pCtrl
==
&
maLbOptionEdit
)
ListOptionValueChanged
();
IMPL_LINK_NOARG
(
ScCalcOptionsDialog
,
SettingsDoubleClickHdl
)
{
EditOption
();
return
0
;
return
0
;
}
}
...
...
sc/source/ui/optdlg/calcoptionsdlg.hxx
Dosyayı görüntüle @
ef3fd657
...
@@ -42,13 +42,14 @@ public:
...
@@ -42,13 +42,14 @@ public:
ScCalcOptionsDialog
(
Window
*
pParent
,
const
ScCalcConfig
&
rConfig
);
ScCalcOptionsDialog
(
Window
*
pParent
,
const
ScCalcConfig
&
rConfig
);
virtual
~
ScCalcOptionsDialog
();
virtual
~
ScCalcOptionsDialog
();
DECL_LINK
(
SettingsSelHdl
,
void
*
);
DECL_LINK
(
SettingsSelHdl
,
Control
*
);
DECL_LINK
(
SettingsDoubleClickHdl
,
void
*
);
const
ScCalcConfig
&
GetConfig
()
const
;
private
:
private
:
void
FillOptionsList
();
void
FillOptionsList
();
void
SelectionChanged
();
void
SelectionChanged
();
void
EditOption
();
void
ListOptionValueChanged
();
private
:
private
:
SvxCheckListBox
maLbSettings
;
SvxCheckListBox
maLbSettings
;
...
...
sc/source/ui/optdlg/calcoptionsdlg.src
Dosyayı görüntüle @
ef3fd657
...
@@ -54,8 +54,8 @@ ModalDialog RID_SCDLG_FORMULA_CALCOPTIONS
...
@@ -54,8 +54,8 @@ ModalDialog RID_SCDLG_FORMULA_CALCOPTIONS
ListBox LB_OPTION_EDIT
ListBox LB_OPTION_EDIT
{
{
Pos = MAP_APPFONT ( 50
, 82 ) ;
Pos = MAP_APPFONT ( 50, 82 ) ;
Size = MAP_APPFONT (
6
0, 46 ) ;
Size = MAP_APPFONT (
10
0, 46 ) ;
TabStop = TRUE ;
TabStop = TRUE ;
DropDown = TRUE ;
DropDown = TRUE ;
};
};
...
...
sc/source/ui/optdlg/tpformula.cxx
Dosyayı görüntüle @
ef3fd657
...
@@ -144,7 +144,7 @@ void ScTpFormulaOptions::LaunchCustomCalcSettings()
...
@@ -144,7 +144,7 @@ void ScTpFormulaOptions::LaunchCustomCalcSettings()
ScCalcOptionsDialog
aDlg
(
this
,
maCurrentConfig
);
ScCalcOptionsDialog
aDlg
(
this
,
maCurrentConfig
);
if
(
aDlg
.
Execute
()
==
RET_OK
)
if
(
aDlg
.
Execute
()
==
RET_OK
)
{
{
maCurrentConfig
=
aDlg
.
GetConfig
();
}
}
}
}
...
...
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