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
ce2bcf89
Kaydet (Commit)
ce2bcf89
authored
May 29, 2012
tarafından
Kohei Yoshida
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Added options list and other misc stuff.
Change-Id: Idd7b8823a26e2a272d911c097dbde350092ec0e8
üst
f1010e94
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
149 additions
and
4 deletions
+149
-4
calcoptionsdlg.cxx
sc/source/ui/optdlg/calcoptionsdlg.cxx
+86
-1
calcoptionsdlg.hrc
sc/source/ui/optdlg/calcoptionsdlg.hrc
+6
-0
calcoptionsdlg.hxx
sc/source/ui/optdlg/calcoptionsdlg.hxx
+18
-0
calcoptionsdlg.src
sc/source/ui/optdlg/calcoptionsdlg.src
+39
-3
No files found.
sc/source/ui/optdlg/calcoptionsdlg.cxx
Dosyayı görüntüle @
ce2bcf89
...
@@ -30,13 +30,98 @@
...
@@ -30,13 +30,98 @@
#include "calcoptionsdlg.hrc"
#include "calcoptionsdlg.hrc"
#include "scresid.hxx"
#include "scresid.hxx"
#include "svtools/svlbitm.hxx"
namespace
{
class
OptionString
:
public
SvLBoxString
{
rtl
::
OUString
maDesc
;
rtl
::
OUString
maValue
;
public
:
OptionString
(
const
rtl
::
OUString
&
rDesc
,
const
rtl
::
OUString
&
rValue
)
:
maDesc
(
rDesc
),
maValue
(
rValue
)
{}
virtual
void
Paint
(
const
Point
&
rPos
,
SvLBox
&
rDev
,
sal_uInt16
nFlags
,
SvLBoxEntry
*
pEntry
);
};
void
OptionString
::
Paint
(
const
Point
&
rPos
,
SvLBox
&
rDev
,
sal_uInt16
/*nFlags*/
,
SvLBoxEntry
*
/*pEntry*/
)
{
Point
aPos
=
rPos
;
rtl
::
OUString
aDesc
=
maDesc
+
rtl
::
OUString
(
": "
);
rDev
.
DrawText
(
aPos
,
aDesc
);
aPos
.
X
()
+=
rDev
.
GetTextWidth
(
aDesc
);
Font
aOldFont
=
rDev
.
GetFont
();
Font
aFont
=
aOldFont
;
aFont
.
SetWeight
(
WEIGHT_BOLD
);
rDev
.
SetFont
(
aFont
);
rDev
.
DrawText
(
aPos
,
maValue
);
rDev
.
SetFont
(
aOldFont
);
}
}
ScCalcOptionsDialog
::
ScCalcOptionsDialog
(
Window
*
pParent
)
:
ScCalcOptionsDialog
::
ScCalcOptionsDialog
(
Window
*
pParent
)
:
ModalDialog
(
pParent
,
ScResId
(
RID_SCDLG_FORMULA_CALCOPTIONS
)),
ModalDialog
(
pParent
,
ScResId
(
RID_SCDLG_FORMULA_CALCOPTIONS
)),
maLbSettings
(
this
,
ScResId
(
LB_SETTINGS
)),
maBtnEdit
(
this
,
ScResId
(
BTN_EDIT
)),
maFlAnnotation
(
this
,
ScResId
(
FL_ANNOTATION
)),
maFtAnnotation
(
this
,
ScResId
(
FT_ANNOTATION
)),
maBtnOK
(
this
,
ScResId
(
BTN_OK
)),
maBtnOK
(
this
,
ScResId
(
BTN_OK
)),
maBtnCancel
(
this
,
ScResId
(
BTN_CANCEL
))
maBtnCancel
(
this
,
ScResId
(
BTN_CANCEL
)),
maDescIndirectSyntax
(
ScResId
(
STR_INDIRECT_SYNTAX_DESC
).
toString
())
{
{
maLbSettings
.
SetStyle
(
maLbSettings
.
GetStyle
()
|
WB_CLIPCHILDREN
|
WB_FORCE_MAKEVISIBLE
);
maLbSettings
.
SetHighlightRange
();
maLbSettings
.
SetSelectHdl
(
LINK
(
this
,
ScCalcOptionsDialog
,
SettingsSelHdl
));
maLbSettings
.
SetDoubleClickHdl
(
LINK
(
this
,
ScCalcOptionsDialog
,
SettingsDoubleClickHdl
));
FillOptionsList
();
FreeResource
();
SelectionChanged
();
}
}
ScCalcOptionsDialog
::~
ScCalcOptionsDialog
()
{}
ScCalcOptionsDialog
::~
ScCalcOptionsDialog
()
{}
void
ScCalcOptionsDialog
::
FillOptionsList
()
{
maLbSettings
.
SetUpdateMode
(
false
);
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
(
"Formula syntax INDIRECT function expects"
,
"Calc A1"
);
pEntry
->
AddItem
(
pItem
);
pModel
->
Insert
(
pEntry
);
maLbSettings
.
SetUpdateMode
(
true
);
}
void
ScCalcOptionsDialog
::
SelectionChanged
()
{
maFtAnnotation
.
SetText
(
maDescIndirectSyntax
);
}
void
ScCalcOptionsDialog
::
EditOption
()
{
}
IMPL_LINK_NOARG
(
ScCalcOptionsDialog
,
SettingsSelHdl
)
{
SelectionChanged
();
return
0
;
}
IMPL_LINK_NOARG
(
ScCalcOptionsDialog
,
SettingsDoubleClickHdl
)
{
EditOption
();
return
0
;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sc/source/ui/optdlg/calcoptionsdlg.hrc
Dosyayı görüntüle @
ce2bcf89
...
@@ -30,5 +30,11 @@
...
@@ -30,5 +30,11 @@
#define BTN_OK 1
#define BTN_OK 1
#define BTN_CANCEL 2
#define BTN_CANCEL 2
#define LB_SETTINGS 3
#define BTN_EDIT 4
#define FL_ANNOTATION 5
#define FT_ANNOTATION 6
#define STR_INDIRECT_SYNTAX_DESC 10
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sc/source/ui/optdlg/calcoptionsdlg.hxx
Dosyayı görüntüle @
ce2bcf89
...
@@ -31,6 +31,8 @@
...
@@ -31,6 +31,8 @@
#include "vcl/dialog.hxx"
#include "vcl/dialog.hxx"
#include "vcl/button.hxx"
#include "vcl/button.hxx"
#include "vcl/fixed.hxx"
#include "svx/checklbx.hxx"
class
ScCalcOptionsDialog
:
public
ModalDialog
class
ScCalcOptionsDialog
:
public
ModalDialog
{
{
...
@@ -38,9 +40,25 @@ public:
...
@@ -38,9 +40,25 @@ public:
ScCalcOptionsDialog
(
Window
*
pParent
);
ScCalcOptionsDialog
(
Window
*
pParent
);
virtual
~
ScCalcOptionsDialog
();
virtual
~
ScCalcOptionsDialog
();
DECL_LINK
(
SettingsSelHdl
,
void
*
);
DECL_LINK
(
SettingsDoubleClickHdl
,
void
*
);
private
:
void
FillOptionsList
();
void
SelectionChanged
();
void
EditOption
();
private
:
private
:
SvxCheckListBox
maLbSettings
;
PushButton
maBtnEdit
;
FixedLine
maFlAnnotation
;
FixedText
maFtAnnotation
;
OKButton
maBtnOK
;
OKButton
maBtnOK
;
CancelButton
maBtnCancel
;
CancelButton
maBtnCancel
;
rtl
::
OUString
maDescIndirectSyntax
;
};
};
#endif
#endif
...
...
sc/source/ui/optdlg/calcoptionsdlg.src
Dosyayı görüntüle @
ce2bcf89
...
@@ -32,20 +32,56 @@ ModalDialog RID_SCDLG_FORMULA_CALCOPTIONS
...
@@ -32,20 +32,56 @@ ModalDialog RID_SCDLG_FORMULA_CALCOPTIONS
OutputSize = TRUE ;
OutputSize = TRUE ;
Hide = TRUE ;
Hide = TRUE ;
SVLook = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 2
6
0, 200 ) ;
Size = MAP_APPFONT ( 2
3
0, 200 ) ;
Text [ en-US ] = "Detailed Calculation Settings" ;
Text [ en-US ] = "Detailed Calculation Settings" ;
Control LB_SETTINGS
{
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 10 ) ;
Size = MAP_APPFONT ( 218 , 67 ) ;
TabStop = TRUE ;
};
PushButton BTN_EDIT
{
Pos = MAP_APPFONT ( 8 , 82 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
Text [ en-US ] = "Edit...";
};
FixedLine FL_ANNOTATION
{
Pos = MAP_APPFONT ( 6 , 98 ) ;
Size = MAP_APPFONT ( 218 , 8 ) ;
TabStop = TRUE ;
};
FixedText FT_ANNOTATION
{
Pos = MAP_APPFONT ( 8 , 108 ) ;
Size = MAP_APPFONT ( 214 , 70 ) ;
WordBreak = TRUE ;
NoLabel = TRUE ;
};
OKButton BTN_OK
OKButton BTN_OK
{
{
Pos = MAP_APPFONT ( 1
4
8 , 180 ) ;
Pos = MAP_APPFONT ( 1
1
8 , 180 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
TabStop = TRUE ;
};
};
CancelButton BTN_CANCEL
CancelButton BTN_CANCEL
{
{
Pos = MAP_APPFONT (
20
4 , 180 ) ;
Pos = MAP_APPFONT (
17
4 , 180 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
TabStop = TRUE ;
};
};
String STR_INDIRECT_SYNTAX_DESC
{
Text [ en-US ] = "Formula syntax that built-in function INDIRECT expects.";
};
};
};
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