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
5639a769
Kaydet (Commit)
5639a769
authored
Ara 11, 2015
tarafından
Jan Holesovsky
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
sc: Prefix members of ScInputBarGroup.
Change-Id: I72e4fdacb326a966b2717e235a58de856189a6cf
üst
b562c31d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
71 additions
and
71 deletions
+71
-71
inputwin.cxx
sc/source/ui/app/inputwin.cxx
+64
-64
inputwin.hxx
sc/source/ui/inc/inputwin.hxx
+7
-7
No files found.
sc/source/ui/app/inputwin.cxx
Dosyayı görüntüle @
5639a769
...
@@ -877,27 +877,27 @@ void ScInputWindow::MouseButtonUp( const MouseEvent& rMEvt )
...
@@ -877,27 +877,27 @@ void ScInputWindow::MouseButtonUp( const MouseEvent& rMEvt )
}
}
ScInputBarGroup
::
ScInputBarGroup
(
vcl
::
Window
*
pParent
,
ScTabViewShell
*
pViewSh
)
ScInputBarGroup
::
ScInputBarGroup
(
vcl
::
Window
*
pParent
,
ScTabViewShell
*
pViewSh
)
:
ScTextWndBase
(
pParent
,
WinBits
(
WB_HIDE
|
WB_TABSTOP
)
),
:
ScTextWndBase
(
pParent
,
WinBits
(
WB_HIDE
|
WB_TABSTOP
)
),
aMultiTextWnd
(
VclPtr
<
ScMultiTextWnd
>::
Create
(
this
,
pViewSh
)
),
maTextWnd
(
VclPtr
<
ScMultiTextWnd
>::
Create
(
this
,
pViewSh
)
),
aButton
(
VclPtr
<
ImageButton
>::
Create
(
this
,
WB_TABSTOP
|
WB_RECTSTYLE
|
WB_SMALLSTYLE
)
),
maButton
(
VclPtr
<
ImageButton
>::
Create
(
this
,
WB_TABSTOP
|
WB_RECTSTYLE
|
WB_SMALLSTYLE
)
),
aScrollBar
(
VclPtr
<
ScrollBar
>::
Create
(
this
,
WB_TABSTOP
|
WB_VERT
|
WB_DRAG
)
),
maScrollbar
(
VclPtr
<
ScrollBar
>::
Create
(
this
,
WB_TABSTOP
|
WB_VERT
|
WB_DRAG
)
),
nVertOffset
(
0
)
mnVertOffset
(
0
)
{
{
aMulti
TextWnd
->
Show
();
ma
TextWnd
->
Show
();
aMulti
TextWnd
->
SetQuickHelpText
(
ScResId
(
SCSTR_QHELP_INPUTWND
));
ma
TextWnd
->
SetQuickHelpText
(
ScResId
(
SCSTR_QHELP_INPUTWND
));
aMulti
TextWnd
->
SetHelpId
(
HID_INSWIN_INPUT
);
ma
TextWnd
->
SetHelpId
(
HID_INSWIN_INPUT
);
Size
aSize
(
GetSettings
().
GetStyleSettings
().
GetScrollBarSize
(),
aMulti
TextWnd
->
GetPixelHeightForLines
(
1
));
Size
aSize
(
GetSettings
().
GetStyleSettings
().
GetScrollBarSize
(),
ma
TextWnd
->
GetPixelHeightForLines
(
1
));
aButton
->
SetClickHdl
(
LINK
(
this
,
ScInputBarGroup
,
ClickHdl
));
m
aButton
->
SetClickHdl
(
LINK
(
this
,
ScInputBarGroup
,
ClickHdl
));
aButton
->
SetSizePixel
(
aSize
);
m
aButton
->
SetSizePixel
(
aSize
);
aButton
->
Enable
();
m
aButton
->
Enable
();
aButton
->
SetSymbol
(
SymbolType
::
SPIN_DOWN
);
m
aButton
->
SetSymbol
(
SymbolType
::
SPIN_DOWN
);
aButton
->
SetQuickHelpText
(
ScResId
(
SCSTR_QHELP_EXPAND_FORMULA
));
m
aButton
->
SetQuickHelpText
(
ScResId
(
SCSTR_QHELP_EXPAND_FORMULA
));
aButton
->
Show
();
m
aButton
->
Show
();
aScrollB
ar
->
SetSizePixel
(
aSize
);
maScrollb
ar
->
SetSizePixel
(
aSize
);
aScrollB
ar
->
SetScrollHdl
(
LINK
(
this
,
ScInputBarGroup
,
Impl_ScrollHdl
));
maScrollb
ar
->
SetScrollHdl
(
LINK
(
this
,
ScInputBarGroup
,
Impl_ScrollHdl
));
}
}
ScInputBarGroup
::~
ScInputBarGroup
()
ScInputBarGroup
::~
ScInputBarGroup
()
...
@@ -907,30 +907,30 @@ ScInputBarGroup::~ScInputBarGroup()
...
@@ -907,30 +907,30 @@ ScInputBarGroup::~ScInputBarGroup()
void
ScInputBarGroup
::
dispose
()
void
ScInputBarGroup
::
dispose
()
{
{
aMulti
TextWnd
.
disposeAndClear
();
ma
TextWnd
.
disposeAndClear
();
aButton
.
disposeAndClear
();
m
aButton
.
disposeAndClear
();
aScrollB
ar
.
disposeAndClear
();
maScrollb
ar
.
disposeAndClear
();
ScTextWndBase
::
dispose
();
ScTextWndBase
::
dispose
();
}
}
void
ScInputBarGroup
::
InsertAccessibleTextData
(
ScAccessibleEditLineTextData
&
rTextData
)
void
ScInputBarGroup
::
InsertAccessibleTextData
(
ScAccessibleEditLineTextData
&
rTextData
)
{
{
aMulti
TextWnd
->
InsertAccessibleTextData
(
rTextData
);
ma
TextWnd
->
InsertAccessibleTextData
(
rTextData
);
}
}
void
ScInputBarGroup
::
RemoveAccessibleTextData
(
ScAccessibleEditLineTextData
&
rTextData
)
void
ScInputBarGroup
::
RemoveAccessibleTextData
(
ScAccessibleEditLineTextData
&
rTextData
)
{
{
aMulti
TextWnd
->
RemoveAccessibleTextData
(
rTextData
);
ma
TextWnd
->
RemoveAccessibleTextData
(
rTextData
);
}
}
const
OUString
&
ScInputBarGroup
::
GetTextString
()
const
const
OUString
&
ScInputBarGroup
::
GetTextString
()
const
{
{
return
aMulti
TextWnd
->
GetTextString
();
return
ma
TextWnd
->
GetTextString
();
}
}
void
ScInputBarGroup
::
SetTextString
(
const
OUString
&
rString
)
void
ScInputBarGroup
::
SetTextString
(
const
OUString
&
rString
)
{
{
aMulti
TextWnd
->
SetTextString
(
rString
);
ma
TextWnd
->
SetTextString
(
rString
);
}
}
void
ScInputBarGroup
::
Resize
()
void
ScInputBarGroup
::
Resize
()
...
@@ -951,89 +951,89 @@ void ScInputBarGroup::Resize()
...
@@ -951,89 +951,89 @@ void ScInputBarGroup::Resize()
Size
aSize
=
GetSizePixel
();
Size
aSize
=
GetSizePixel
();
aSize
.
Width
()
=
std
::
max
(
long
(
nWidth
-
nLeft
-
LEFT_OFFSET
),
long
(
0
));
aSize
.
Width
()
=
std
::
max
(
long
(
nWidth
-
nLeft
-
LEFT_OFFSET
),
long
(
0
));
aScrollBar
->
SetPosPixel
(
Point
(
aSize
.
Width
()
-
aButton
->
GetSizePixel
().
Width
(),
aButton
->
GetSizePixel
().
Height
()
)
);
maScrollbar
->
SetPosPixel
(
Point
(
aSize
.
Width
()
-
maButton
->
GetSizePixel
().
Width
(),
m
aButton
->
GetSizePixel
().
Height
()
)
);
Size
aTmpSize
(
aSize
);
Size
aTmpSize
(
aSize
);
aTmpSize
.
Width
()
=
aTmpSize
.
Width
()
-
aButton
->
GetSizePixel
().
Width
()
-
BUTTON_OFFSET
;
aTmpSize
.
Width
()
=
aTmpSize
.
Width
()
-
m
aButton
->
GetSizePixel
().
Width
()
-
BUTTON_OFFSET
;
aMulti
TextWnd
->
SetSizePixel
(
aTmpSize
);
ma
TextWnd
->
SetSizePixel
(
aTmpSize
);
aMulti
TextWnd
->
Resize
();
ma
TextWnd
->
Resize
();
aSize
.
Height
()
=
aMulti
TextWnd
->
GetSizePixel
().
Height
();
aSize
.
Height
()
=
ma
TextWnd
->
GetSizePixel
().
Height
();
SetSizePixel
(
aSize
);
SetSizePixel
(
aSize
);
if
(
aMulti
TextWnd
->
GetNumLines
()
>
1
)
if
(
ma
TextWnd
->
GetNumLines
()
>
1
)
{
{
aButton
->
SetSymbol
(
SymbolType
::
SPIN_UP
);
m
aButton
->
SetSymbol
(
SymbolType
::
SPIN_UP
);
aButton
->
SetQuickHelpText
(
ScResId
(
SCSTR_QHELP_COLLAPSE_FORMULA
)
);
m
aButton
->
SetQuickHelpText
(
ScResId
(
SCSTR_QHELP_COLLAPSE_FORMULA
)
);
Size
scrollSize
=
aButton
->
GetSizePixel
();
Size
scrollSize
=
m
aButton
->
GetSizePixel
();
scrollSize
.
Height
()
=
aMultiTextWnd
->
GetSizePixel
().
Height
()
-
aButton
->
GetSizePixel
().
Height
();
scrollSize
.
Height
()
=
maTextWnd
->
GetSizePixel
().
Height
()
-
m
aButton
->
GetSizePixel
().
Height
();
aScrollB
ar
->
SetSizePixel
(
scrollSize
);
maScrollb
ar
->
SetSizePixel
(
scrollSize
);
Size
aOutSz
=
aMulti
TextWnd
->
GetOutputSize
();
Size
aOutSz
=
ma
TextWnd
->
GetOutputSize
();
aScrollB
ar
->
SetVisibleSize
(
aOutSz
.
Height
()
);
maScrollb
ar
->
SetVisibleSize
(
aOutSz
.
Height
()
);
aScrollB
ar
->
SetPageSize
(
aOutSz
.
Height
()
);
maScrollb
ar
->
SetPageSize
(
aOutSz
.
Height
()
);
aScrollBar
->
SetLineSize
(
aMulti
TextWnd
->
GetTextHeight
()
);
maScrollbar
->
SetLineSize
(
ma
TextWnd
->
GetTextHeight
()
);
aScrollBar
->
SetRange
(
Range
(
0
,
aMulti
TextWnd
->
GetEditEngTxtHeight
()
)
);
maScrollbar
->
SetRange
(
Range
(
0
,
ma
TextWnd
->
GetEditEngTxtHeight
()
)
);
aScrollB
ar
->
Resize
();
maScrollb
ar
->
Resize
();
aScrollB
ar
->
Show
();
maScrollb
ar
->
Show
();
}
}
else
else
{
{
aButton
->
SetSymbol
(
SymbolType
::
SPIN_DOWN
);
m
aButton
->
SetSymbol
(
SymbolType
::
SPIN_DOWN
);
aButton
->
SetQuickHelpText
(
ScResId
(
SCSTR_QHELP_EXPAND_FORMULA
)
);
m
aButton
->
SetQuickHelpText
(
ScResId
(
SCSTR_QHELP_EXPAND_FORMULA
)
);
aScrollB
ar
->
Hide
();
maScrollb
ar
->
Hide
();
}
}
aButton
->
SetPosPixel
(
Point
(
aSize
.
Width
()
-
aButton
->
GetSizePixel
().
Width
(),
0
));
maButton
->
SetPosPixel
(
Point
(
aSize
.
Width
()
-
m
aButton
->
GetSizePixel
().
Width
(),
0
));
Invalidate
();
Invalidate
();
}
}
void
ScInputBarGroup
::
StopEditEngine
(
bool
bAll
)
void
ScInputBarGroup
::
StopEditEngine
(
bool
bAll
)
{
{
aMulti
TextWnd
->
StopEditEngine
(
bAll
);
ma
TextWnd
->
StopEditEngine
(
bAll
);
}
}
void
ScInputBarGroup
::
StartEditEngine
()
void
ScInputBarGroup
::
StartEditEngine
()
{
{
aMulti
TextWnd
->
StartEditEngine
();
ma
TextWnd
->
StartEditEngine
();
}
}
void
ScInputBarGroup
::
MakeDialogEditView
()
void
ScInputBarGroup
::
MakeDialogEditView
()
{
{
aMulti
TextWnd
->
MakeDialogEditView
();
ma
TextWnd
->
MakeDialogEditView
();
}
}
EditView
*
ScInputBarGroup
::
GetEditView
()
EditView
*
ScInputBarGroup
::
GetEditView
()
{
{
return
aMulti
TextWnd
->
GetEditView
();
return
ma
TextWnd
->
GetEditView
();
}
}
bool
ScInputBarGroup
::
IsInputActive
()
bool
ScInputBarGroup
::
IsInputActive
()
{
{
return
aMulti
TextWnd
->
IsInputActive
();
return
ma
TextWnd
->
IsInputActive
();
}
}
void
ScInputBarGroup
::
SetFormulaMode
(
bool
bSet
)
void
ScInputBarGroup
::
SetFormulaMode
(
bool
bSet
)
{
{
aMulti
TextWnd
->
SetFormulaMode
(
bSet
);
ma
TextWnd
->
SetFormulaMode
(
bSet
);
}
}
void
ScInputBarGroup
::
IncrementVerticalSize
()
void
ScInputBarGroup
::
IncrementVerticalSize
()
{
{
aMultiTextWnd
->
SetNumLines
(
aMulti
TextWnd
->
GetNumLines
()
+
1
);
maTextWnd
->
SetNumLines
(
ma
TextWnd
->
GetNumLines
()
+
1
);
TriggerToolboxLayout
();
TriggerToolboxLayout
();
}
}
void
ScInputBarGroup
::
DecrementVerticalSize
()
void
ScInputBarGroup
::
DecrementVerticalSize
()
{
{
if
(
aMulti
TextWnd
->
GetNumLines
()
>
1
)
if
(
ma
TextWnd
->
GetNumLines
()
>
1
)
{
{
aMultiTextWnd
->
SetNumLines
(
aMulti
TextWnd
->
GetNumLines
()
-
1
);
maTextWnd
->
SetNumLines
(
ma
TextWnd
->
GetNumLines
()
-
1
);
TriggerToolboxLayout
();
TriggerToolboxLayout
();
}
}
}
}
...
@@ -1049,19 +1049,19 @@ IMPL_LINK_NOARG_TYPED(ScInputBarGroup, ClickHdl, Button*, void)
...
@@ -1049,19 +1049,19 @@ IMPL_LINK_NOARG_TYPED(ScInputBarGroup, ClickHdl, Button*, void)
OSL_FAIL
(
"The parent window pointer pParent is null"
);
OSL_FAIL
(
"The parent window pointer pParent is null"
);
return
;
return
;
}
}
if
(
aMulti
TextWnd
->
GetNumLines
()
>
1
)
if
(
ma
TextWnd
->
GetNumLines
()
>
1
)
{
{
aMulti
TextWnd
->
SetNumLines
(
1
);
ma
TextWnd
->
SetNumLines
(
1
);
}
}
else
else
{
{
aMultiTextWnd
->
SetNumLines
(
aMulti
TextWnd
->
GetLastNumExpandedLines
());
maTextWnd
->
SetNumLines
(
ma
TextWnd
->
GetLastNumExpandedLines
());
}
}
TriggerToolboxLayout
();
TriggerToolboxLayout
();
// Restore focus to input line(s) if necessary
// Restore focus to input line(s) if necessary
if
(
SC_MOD
()
->
GetInputHdl
()
->
IsTopMode
()
)
if
(
SC_MOD
()
->
GetInputHdl
()
->
IsTopMode
()
)
aMulti
TextWnd
->
GrabFocus
();
ma
TextWnd
->
GrabFocus
();
}
}
void
ScInputBarGroup
::
TriggerToolboxLayout
()
void
ScInputBarGroup
::
TriggerToolboxLayout
()
...
@@ -1073,8 +1073,8 @@ void ScInputBarGroup::TriggerToolboxLayout()
...
@@ -1073,8 +1073,8 @@ void ScInputBarGroup::TriggerToolboxLayout()
// Capture the vertical position of this window in the toolbar, when we increase
// Capture the vertical position of this window in the toolbar, when we increase
// the size of the toolbar to accommodate expanded line input we need to take this
// the size of the toolbar to accommodate expanded line input we need to take this
// into account
// into account
if
(
!
nVertOffset
)
if
(
!
m
nVertOffset
)
nVertOffset
=
rParent
.
GetItemPosRect
(
rParent
.
GetItemCount
()
-
1
).
Top
();
m
nVertOffset
=
rParent
.
GetItemPosRect
(
rParent
.
GetItemCount
()
-
1
).
Top
();
if
(
pViewFrm
)
if
(
pViewFrm
)
{
{
...
@@ -1089,7 +1089,7 @@ void ScInputBarGroup::TriggerToolboxLayout()
...
@@ -1089,7 +1089,7 @@ void ScInputBarGroup::TriggerToolboxLayout()
if
(
xLayoutManager
.
is
()
)
if
(
xLayoutManager
.
is
()
)
{
{
if
(
aMulti
TextWnd
->
GetNumLines
()
>
1
)
if
(
ma
TextWnd
->
GetNumLines
()
>
1
)
rParent
.
SetToolbarLayoutMode
(
TBX_LAYOUT_LOCKVERT
);
rParent
.
SetToolbarLayoutMode
(
TBX_LAYOUT_LOCKVERT
);
else
else
rParent
.
SetToolbarLayoutMode
(
TBX_LAYOUT_NORMAL
);
rParent
.
SetToolbarLayoutMode
(
TBX_LAYOUT_NORMAL
);
...
@@ -1117,12 +1117,12 @@ void ScInputBarGroup::TriggerToolboxLayout()
...
@@ -1117,12 +1117,12 @@ void ScInputBarGroup::TriggerToolboxLayout()
IMPL_LINK_NOARG_TYPED
(
ScInputBarGroup
,
Impl_ScrollHdl
,
ScrollBar
*
,
void
)
IMPL_LINK_NOARG_TYPED
(
ScInputBarGroup
,
Impl_ScrollHdl
,
ScrollBar
*
,
void
)
{
{
aMulti
TextWnd
->
DoScroll
();
ma
TextWnd
->
DoScroll
();
}
}
void
ScInputBarGroup
::
TextGrabFocus
()
void
ScInputBarGroup
::
TextGrabFocus
()
{
{
aMulti
TextWnd
->
TextGrabFocus
();
ma
TextWnd
->
TextGrabFocus
();
}
}
ScMultiTextWnd
::
ScMultiTextWnd
(
ScInputBarGroup
*
pParen
,
ScTabViewShell
*
pViewSh
)
ScMultiTextWnd
::
ScMultiTextWnd
(
ScInputBarGroup
*
pParen
,
ScTabViewShell
*
pViewSh
)
...
...
sc/source/ui/inc/inputwin.hxx
Dosyayı görüntüle @
5639a769
...
@@ -215,17 +215,17 @@ public:
...
@@ -215,17 +215,17 @@ public:
void
SetFormulaMode
(
bool
bSet
)
override
;
void
SetFormulaMode
(
bool
bSet
)
override
;
void
MakeDialogEditView
()
override
;
void
MakeDialogEditView
()
override
;
bool
IsInputActive
()
override
;
bool
IsInputActive
()
override
;
ScrollBar
&
GetScrollBar
()
{
return
*
aScrollB
ar
.
get
();
}
ScrollBar
&
GetScrollBar
()
{
return
*
maScrollb
ar
.
get
();
}
void
IncrementVerticalSize
();
void
IncrementVerticalSize
();
void
DecrementVerticalSize
();
void
DecrementVerticalSize
();
long
GetNumLines
()
{
return
aMulti
TextWnd
->
GetNumLines
();
}
long
GetNumLines
()
{
return
ma
TextWnd
->
GetNumLines
();
}
long
GetVertOffset
()
{
return
nVertOffset
;
}
long
GetVertOffset
()
{
return
m
nVertOffset
;
}
private
:
private
:
void
TriggerToolboxLayout
();
void
TriggerToolboxLayout
();
VclPtr
<
ScMultiTextWnd
>
aMulti
TextWnd
;
VclPtr
<
ScMultiTextWnd
>
ma
TextWnd
;
VclPtr
<
ImageButton
>
aButton
;
VclPtr
<
ImageButton
>
m
aButton
;
VclPtr
<
ScrollBar
>
aScrollB
ar
;
VclPtr
<
ScrollBar
>
maScrollb
ar
;
long
nVertOffset
;
long
m
nVertOffset
;
DECL_LINK_TYPED
(
ClickHdl
,
Button
*
,
void
);
DECL_LINK_TYPED
(
ClickHdl
,
Button
*
,
void
);
DECL_LINK_TYPED
(
Impl_ScrollHdl
,
ScrollBar
*
,
void
);
DECL_LINK_TYPED
(
Impl_ScrollHdl
,
ScrollBar
*
,
void
);
...
...
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