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 )
}
ScInputBarGroup
::
ScInputBarGroup
(
vcl
::
Window
*
pParent
,
ScTabViewShell
*
pViewSh
)
:
ScTextWndBase
(
pParent
,
WinBits
(
WB_HIDE
|
WB_TABSTOP
)
),
aMultiTextWnd
(
VclPtr
<
ScMultiTextWnd
>::
Create
(
this
,
pViewSh
)
),
aButton
(
VclPtr
<
ImageButton
>::
Create
(
this
,
WB_TABSTOP
|
WB_RECTSTYLE
|
WB_SMALLSTYLE
)
),
aScrollBar
(
VclPtr
<
ScrollBar
>::
Create
(
this
,
WB_TABSTOP
|
WB_VERT
|
WB_DRAG
)
),
nVertOffset
(
0
)
:
ScTextWndBase
(
pParent
,
WinBits
(
WB_HIDE
|
WB_TABSTOP
)
),
maTextWnd
(
VclPtr
<
ScMultiTextWnd
>::
Create
(
this
,
pViewSh
)
),
maButton
(
VclPtr
<
ImageButton
>::
Create
(
this
,
WB_TABSTOP
|
WB_RECTSTYLE
|
WB_SMALLSTYLE
)
),
maScrollbar
(
VclPtr
<
ScrollBar
>::
Create
(
this
,
WB_TABSTOP
|
WB_VERT
|
WB_DRAG
)
),
mnVertOffset
(
0
)
{
aMulti
TextWnd
->
Show
();
aMulti
TextWnd
->
SetQuickHelpText
(
ScResId
(
SCSTR_QHELP_INPUTWND
));
aMulti
TextWnd
->
SetHelpId
(
HID_INSWIN_INPUT
);
ma
TextWnd
->
Show
();
ma
TextWnd
->
SetQuickHelpText
(
ScResId
(
SCSTR_QHELP_INPUTWND
));
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
));
aButton
->
SetSizePixel
(
aSize
);
aButton
->
Enable
();
aButton
->
SetSymbol
(
SymbolType
::
SPIN_DOWN
);
aButton
->
SetQuickHelpText
(
ScResId
(
SCSTR_QHELP_EXPAND_FORMULA
));
aButton
->
Show
();
m
aButton
->
SetClickHdl
(
LINK
(
this
,
ScInputBarGroup
,
ClickHdl
));
m
aButton
->
SetSizePixel
(
aSize
);
m
aButton
->
Enable
();
m
aButton
->
SetSymbol
(
SymbolType
::
SPIN_DOWN
);
m
aButton
->
SetQuickHelpText
(
ScResId
(
SCSTR_QHELP_EXPAND_FORMULA
));
m
aButton
->
Show
();
aScrollB
ar
->
SetSizePixel
(
aSize
);
aScrollB
ar
->
SetScrollHdl
(
LINK
(
this
,
ScInputBarGroup
,
Impl_ScrollHdl
));
maScrollb
ar
->
SetSizePixel
(
aSize
);
maScrollb
ar
->
SetScrollHdl
(
LINK
(
this
,
ScInputBarGroup
,
Impl_ScrollHdl
));
}
ScInputBarGroup
::~
ScInputBarGroup
()
...
...
@@ -907,30 +907,30 @@ ScInputBarGroup::~ScInputBarGroup()
void
ScInputBarGroup
::
dispose
()
{
aMulti
TextWnd
.
disposeAndClear
();
aButton
.
disposeAndClear
();
aScrollB
ar
.
disposeAndClear
();
ma
TextWnd
.
disposeAndClear
();
m
aButton
.
disposeAndClear
();
maScrollb
ar
.
disposeAndClear
();
ScTextWndBase
::
dispose
();
}
void
ScInputBarGroup
::
InsertAccessibleTextData
(
ScAccessibleEditLineTextData
&
rTextData
)
{
aMulti
TextWnd
->
InsertAccessibleTextData
(
rTextData
);
ma
TextWnd
->
InsertAccessibleTextData
(
rTextData
);
}
void
ScInputBarGroup
::
RemoveAccessibleTextData
(
ScAccessibleEditLineTextData
&
rTextData
)
{
aMulti
TextWnd
->
RemoveAccessibleTextData
(
rTextData
);
ma
TextWnd
->
RemoveAccessibleTextData
(
rTextData
);
}
const
OUString
&
ScInputBarGroup
::
GetTextString
()
const
{
return
aMulti
TextWnd
->
GetTextString
();
return
ma
TextWnd
->
GetTextString
();
}
void
ScInputBarGroup
::
SetTextString
(
const
OUString
&
rString
)
{
aMulti
TextWnd
->
SetTextString
(
rString
);
ma
TextWnd
->
SetTextString
(
rString
);
}
void
ScInputBarGroup
::
Resize
()
...
...
@@ -951,89 +951,89 @@ void ScInputBarGroup::Resize()
Size
aSize
=
GetSizePixel
();
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
);
aTmpSize
.
Width
()
=
aTmpSize
.
Width
()
-
aButton
->
GetSizePixel
().
Width
()
-
BUTTON_OFFSET
;
aMulti
TextWnd
->
SetSizePixel
(
aTmpSize
);
aTmpSize
.
Width
()
=
aTmpSize
.
Width
()
-
m
aButton
->
GetSizePixel
().
Width
()
-
BUTTON_OFFSET
;
ma
TextWnd
->
SetSizePixel
(
aTmpSize
);
aMulti
TextWnd
->
Resize
();
ma
TextWnd
->
Resize
();
aSize
.
Height
()
=
aMulti
TextWnd
->
GetSizePixel
().
Height
();
aSize
.
Height
()
=
ma
TextWnd
->
GetSizePixel
().
Height
();
SetSizePixel
(
aSize
);
if
(
aMulti
TextWnd
->
GetNumLines
()
>
1
)
if
(
ma
TextWnd
->
GetNumLines
()
>
1
)
{
aButton
->
SetSymbol
(
SymbolType
::
SPIN_UP
);
aButton
->
SetQuickHelpText
(
ScResId
(
SCSTR_QHELP_COLLAPSE_FORMULA
)
);
Size
scrollSize
=
aButton
->
GetSizePixel
();
scrollSize
.
Height
()
=
aMultiTextWnd
->
GetSizePixel
().
Height
()
-
aButton
->
GetSizePixel
().
Height
();
aScrollB
ar
->
SetSizePixel
(
scrollSize
);
m
aButton
->
SetSymbol
(
SymbolType
::
SPIN_UP
);
m
aButton
->
SetQuickHelpText
(
ScResId
(
SCSTR_QHELP_COLLAPSE_FORMULA
)
);
Size
scrollSize
=
m
aButton
->
GetSizePixel
();
scrollSize
.
Height
()
=
maTextWnd
->
GetSizePixel
().
Height
()
-
m
aButton
->
GetSizePixel
().
Height
();
maScrollb
ar
->
SetSizePixel
(
scrollSize
);
Size
aOutSz
=
aMulti
TextWnd
->
GetOutputSize
();
Size
aOutSz
=
ma
TextWnd
->
GetOutputSize
();
aScrollB
ar
->
SetVisibleSize
(
aOutSz
.
Height
()
);
aScrollB
ar
->
SetPageSize
(
aOutSz
.
Height
()
);
aScrollBar
->
SetLineSize
(
aMulti
TextWnd
->
GetTextHeight
()
);
aScrollBar
->
SetRange
(
Range
(
0
,
aMulti
TextWnd
->
GetEditEngTxtHeight
()
)
);
maScrollb
ar
->
SetVisibleSize
(
aOutSz
.
Height
()
);
maScrollb
ar
->
SetPageSize
(
aOutSz
.
Height
()
);
maScrollbar
->
SetLineSize
(
ma
TextWnd
->
GetTextHeight
()
);
maScrollbar
->
SetRange
(
Range
(
0
,
ma
TextWnd
->
GetEditEngTxtHeight
()
)
);
aScrollB
ar
->
Resize
();
aScrollB
ar
->
Show
();
maScrollb
ar
->
Resize
();
maScrollb
ar
->
Show
();
}
else
{
aButton
->
SetSymbol
(
SymbolType
::
SPIN_DOWN
);
aButton
->
SetQuickHelpText
(
ScResId
(
SCSTR_QHELP_EXPAND_FORMULA
)
);
aScrollB
ar
->
Hide
();
m
aButton
->
SetSymbol
(
SymbolType
::
SPIN_DOWN
);
m
aButton
->
SetQuickHelpText
(
ScResId
(
SCSTR_QHELP_EXPAND_FORMULA
)
);
maScrollb
ar
->
Hide
();
}
aButton
->
SetPosPixel
(
Point
(
aSize
.
Width
()
-
aButton
->
GetSizePixel
().
Width
(),
0
));
maButton
->
SetPosPixel
(
Point
(
aSize
.
Width
()
-
m
aButton
->
GetSizePixel
().
Width
(),
0
));
Invalidate
();
}
void
ScInputBarGroup
::
StopEditEngine
(
bool
bAll
)
{
aMulti
TextWnd
->
StopEditEngine
(
bAll
);
ma
TextWnd
->
StopEditEngine
(
bAll
);
}
void
ScInputBarGroup
::
StartEditEngine
()
{
aMulti
TextWnd
->
StartEditEngine
();
ma
TextWnd
->
StartEditEngine
();
}
void
ScInputBarGroup
::
MakeDialogEditView
()
{
aMulti
TextWnd
->
MakeDialogEditView
();
ma
TextWnd
->
MakeDialogEditView
();
}
EditView
*
ScInputBarGroup
::
GetEditView
()
{
return
aMulti
TextWnd
->
GetEditView
();
return
ma
TextWnd
->
GetEditView
();
}
bool
ScInputBarGroup
::
IsInputActive
()
{
return
aMulti
TextWnd
->
IsInputActive
();
return
ma
TextWnd
->
IsInputActive
();
}
void
ScInputBarGroup
::
SetFormulaMode
(
bool
bSet
)
{
aMulti
TextWnd
->
SetFormulaMode
(
bSet
);
ma
TextWnd
->
SetFormulaMode
(
bSet
);
}
void
ScInputBarGroup
::
IncrementVerticalSize
()
{
aMultiTextWnd
->
SetNumLines
(
aMulti
TextWnd
->
GetNumLines
()
+
1
);
maTextWnd
->
SetNumLines
(
ma
TextWnd
->
GetNumLines
()
+
1
);
TriggerToolboxLayout
();
}
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
();
}
}
...
...
@@ -1049,19 +1049,19 @@ IMPL_LINK_NOARG_TYPED(ScInputBarGroup, ClickHdl, Button*, void)
OSL_FAIL
(
"The parent window pointer pParent is null"
);
return
;
}
if
(
aMulti
TextWnd
->
GetNumLines
()
>
1
)
if
(
ma
TextWnd
->
GetNumLines
()
>
1
)
{
aMulti
TextWnd
->
SetNumLines
(
1
);
ma
TextWnd
->
SetNumLines
(
1
);
}
else
{
aMultiTextWnd
->
SetNumLines
(
aMulti
TextWnd
->
GetLastNumExpandedLines
());
maTextWnd
->
SetNumLines
(
ma
TextWnd
->
GetLastNumExpandedLines
());
}
TriggerToolboxLayout
();
// Restore focus to input line(s) if necessary
if
(
SC_MOD
()
->
GetInputHdl
()
->
IsTopMode
()
)
aMulti
TextWnd
->
GrabFocus
();
ma
TextWnd
->
GrabFocus
();
}
void
ScInputBarGroup
::
TriggerToolboxLayout
()
...
...
@@ -1073,8 +1073,8 @@ void ScInputBarGroup::TriggerToolboxLayout()
// 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
// into account
if
(
!
nVertOffset
)
nVertOffset
=
rParent
.
GetItemPosRect
(
rParent
.
GetItemCount
()
-
1
).
Top
();
if
(
!
m
nVertOffset
)
m
nVertOffset
=
rParent
.
GetItemPosRect
(
rParent
.
GetItemCount
()
-
1
).
Top
();
if
(
pViewFrm
)
{
...
...
@@ -1089,7 +1089,7 @@ void ScInputBarGroup::TriggerToolboxLayout()
if
(
xLayoutManager
.
is
()
)
{
if
(
aMulti
TextWnd
->
GetNumLines
()
>
1
)
if
(
ma
TextWnd
->
GetNumLines
()
>
1
)
rParent
.
SetToolbarLayoutMode
(
TBX_LAYOUT_LOCKVERT
);
else
rParent
.
SetToolbarLayoutMode
(
TBX_LAYOUT_NORMAL
);
...
...
@@ -1117,12 +1117,12 @@ void ScInputBarGroup::TriggerToolboxLayout()
IMPL_LINK_NOARG_TYPED
(
ScInputBarGroup
,
Impl_ScrollHdl
,
ScrollBar
*
,
void
)
{
aMulti
TextWnd
->
DoScroll
();
ma
TextWnd
->
DoScroll
();
}
void
ScInputBarGroup
::
TextGrabFocus
()
{
aMulti
TextWnd
->
TextGrabFocus
();
ma
TextWnd
->
TextGrabFocus
();
}
ScMultiTextWnd
::
ScMultiTextWnd
(
ScInputBarGroup
*
pParen
,
ScTabViewShell
*
pViewSh
)
...
...
sc/source/ui/inc/inputwin.hxx
Dosyayı görüntüle @
5639a769
...
...
@@ -215,17 +215,17 @@ public:
void
SetFormulaMode
(
bool
bSet
)
override
;
void
MakeDialogEditView
()
override
;
bool
IsInputActive
()
override
;
ScrollBar
&
GetScrollBar
()
{
return
*
aScrollB
ar
.
get
();
}
ScrollBar
&
GetScrollBar
()
{
return
*
maScrollb
ar
.
get
();
}
void
IncrementVerticalSize
();
void
DecrementVerticalSize
();
long
GetNumLines
()
{
return
aMulti
TextWnd
->
GetNumLines
();
}
long
GetVertOffset
()
{
return
nVertOffset
;
}
long
GetNumLines
()
{
return
ma
TextWnd
->
GetNumLines
();
}
long
GetVertOffset
()
{
return
m
nVertOffset
;
}
private
:
void
TriggerToolboxLayout
();
VclPtr
<
ScMultiTextWnd
>
aMulti
TextWnd
;
VclPtr
<
ImageButton
>
aButton
;
VclPtr
<
ScrollBar
>
aScrollB
ar
;
long
nVertOffset
;
VclPtr
<
ScMultiTextWnd
>
ma
TextWnd
;
VclPtr
<
ImageButton
>
m
aButton
;
VclPtr
<
ScrollBar
>
maScrollb
ar
;
long
m
nVertOffset
;
DECL_LINK_TYPED
(
ClickHdl
,
Button
*
,
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