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
422fdecc
Kaydet (Commit)
422fdecc
authored
Mar 08, 2015
tarafından
Tomaž Vajngerl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
tabbar: remove useless whitespace, rearrange constructor
Change-Id: Iee31413c1ded4fbda8227e88d09a1f917f18ca5d
üst
e8c2bb2e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
164 deletions
+12
-164
tabbar.cxx
svtools/source/control/tabbar.cxx
+12
-164
No files found.
svtools/source/control/tabbar.cxx
Dosyayı görüntüle @
422fdecc
...
...
@@ -86,12 +86,6 @@ struct ImplTabBarItem
}
};
// - ImplTabButton -
class
ImplTabButton
:
public
PushButton
{
bool
mbModKey
:
1
;
...
...
@@ -228,14 +222,7 @@ void ImplTabSizer::Paint( const Rectangle& )
aDecoView
.
DrawHandle
(
aOutputRect
,
true
);
}
// Is not named Impl. as it may be both instantiated and derived from
// - TabBarEdit -
class
TabBarEdit
:
public
Edit
{
private
:
...
...
@@ -257,16 +244,12 @@ public:
virtual
void
LoseFocus
()
SAL_OVERRIDE
;
};
TabBarEdit
::
TabBarEdit
(
TabBar
*
pParent
,
WinBits
nWinStyle
)
:
Edit
(
pParent
,
nWinStyle
)
{
mbPostEvt
=
false
;
}
bool
TabBarEdit
::
PreNotify
(
NotifyEvent
&
rNEvt
)
{
if
(
rNEvt
.
GetType
()
==
MouseNotifyEvent
::
KEYINPUT
)
...
...
@@ -298,8 +281,6 @@ bool TabBarEdit::PreNotify( NotifyEvent& rNEvt )
return
Edit
::
PreNotify
(
rNEvt
);
}
void
TabBarEdit
::
LoseFocus
()
{
if
(
!
mbPostEvt
)
...
...
@@ -311,8 +292,6 @@ void TabBarEdit::LoseFocus()
Edit
::
LoseFocus
();
}
IMPL_LINK
(
TabBarEdit
,
ImplEndEditHdl
,
void
*
,
pCancel
)
{
ResetPostEvent
();
...
...
@@ -332,8 +311,6 @@ IMPL_LINK( TabBarEdit, ImplEndEditHdl, void*, pCancel )
return
0
;
}
IMPL_LINK_NOARG
(
TabBarEdit
,
ImplEndTimerHdl
)
{
if
(
HasFocus
()
)
...
...
@@ -349,7 +326,6 @@ IMPL_LINK_NOARG(TabBarEdit, ImplEndTimerHdl)
return
0
;
}
struct
TabBar_Impl
{
std
::
unique_ptr
<
ImplTabSizer
>
mpSizer
;
...
...
@@ -387,7 +363,17 @@ struct TabBar_Impl
}
};
TabBar
::
TabBar
(
vcl
::
Window
*
pParent
,
WinBits
nWinStyle
)
:
Window
(
pParent
,
(
nWinStyle
&
WB_3DLOOK
)
|
WB_CLIPCHILDREN
)
{
ImplInit
(
nWinStyle
);
maCurrentItemList
=
0
;
}
TabBar
::~
TabBar
()
{
EndEditMode
(
true
);
}
const
sal_uInt16
TabBar
::
APPEND
=
::
std
::
numeric_limits
<
sal_uInt16
>::
max
();
const
sal_uInt16
TabBar
::
PAGE_NOT_FOUND
=
::
std
::
numeric_limits
<
sal_uInt16
>::
max
();
...
...
@@ -442,23 +428,6 @@ void TabBar::ImplInit( WinBits nWinStyle )
ImplInitSettings
(
true
,
true
);
}
TabBar
::
TabBar
(
vcl
::
Window
*
pParent
,
WinBits
nWinStyle
)
:
Window
(
pParent
,
(
nWinStyle
&
WB_3DLOOK
)
|
WB_CLIPCHILDREN
)
{
ImplInit
(
nWinStyle
);
maCurrentItemList
=
0
;
}
TabBar
::~
TabBar
()
{
EndEditMode
(
true
);
}
ImplTabBarItem
*
TabBar
::
seek
(
size_t
i
)
{
if
(
i
<
mpImpl
->
mpItemList
.
size
()
)
...
...
@@ -487,8 +456,6 @@ ImplTabBarItem* TabBar::next()
return
NULL
;
}
void
TabBar
::
ImplInitSettings
(
bool
bFont
,
bool
bBackground
)
{
const
StyleSettings
&
rStyleSettings
=
GetSettings
().
GetStyleSettings
();
...
...
@@ -524,8 +491,6 @@ void TabBar::ImplInitSettings( bool bFont, bool bBackground )
}
}
void
TabBar
::
ImplGetColors
(
Color
&
rFaceColor
,
Color
&
rFaceTextColor
,
Color
&
rSelectColor
,
Color
&
rSelectTextColor
)
{
...
...
@@ -558,8 +523,6 @@ void TabBar::ImplGetColors( Color& rFaceColor, Color& rFaceTextColor,
}
}
bool
TabBar
::
ImplCalcWidth
()
{
// Sizes should only be retrieved if the text or the font was changed
...
...
@@ -616,8 +579,6 @@ bool TabBar::ImplCalcWidth()
return
bChanged
;
}
void
TabBar
::
ImplFormat
()
{
ImplCalcWidth
();
...
...
@@ -664,8 +625,6 @@ void TabBar::ImplFormat()
ImplEnableControls
();
}
sal_uInt16
TabBar
::
ImplGetLastFirstPos
()
{
sal_uInt16
nCount
=
mpImpl
->
getItemSize
();
...
...
@@ -685,8 +644,6 @@ sal_uInt16 TabBar::ImplGetLastFirstPos()
return
nLastFirstPos
;
}
void
TabBar
::
ImplInitControls
()
{
if
(
mnWinStyle
&
WB_SIZEABLE
)
...
...
@@ -755,8 +712,6 @@ void TabBar::ImplInitControls()
mbHasInsertTab
=
(
mnWinStyle
&
WB_INSERTTAB
);
}
void
TabBar
::
ImplEnableControls
()
{
if
(
mbSizeFormat
||
mbFormat
)
...
...
@@ -844,8 +799,6 @@ IMPL_LINK( TabBar, ImplClickHdl, ImplTabButton*, pBtn )
return
0
;
}
void
TabBar
::
MouseMove
(
const
MouseEvent
&
rMEvt
)
{
if
(
rMEvt
.
IsLeaveWindow
()
)
...
...
@@ -854,8 +807,6 @@ void TabBar::MouseMove( const MouseEvent& rMEvt )
Window
::
MouseMove
(
rMEvt
);
}
void
TabBar
::
MouseButtonDown
(
const
MouseEvent
&
rMEvt
)
{
// Only terminate EditModus and do not execute click
...
...
@@ -1059,8 +1010,6 @@ void TabBar::MouseButtonDown( const MouseEvent& rMEvt )
Window
::
MouseButtonDown
(
rMEvt
);
}
void
TabBar
::
MouseButtonUp
(
const
MouseEvent
&
rMEvt
)
{
mbInSelect
=
false
;
...
...
@@ -1391,7 +1340,6 @@ void TabBar::Paint( const Rectangle& rect )
}
}
void
TabBar
::
Resize
()
{
Size
aNewSize
=
GetOutputSizePixel
();
...
...
@@ -1581,8 +1529,6 @@ void TabBar::RequestHelp( const HelpEvent& rHEvt )
Window
::
RequestHelp
(
rHEvt
);
}
void
TabBar
::
StateChanged
(
StateChangedType
nType
)
{
Window
::
StateChanged
(
nType
);
...
...
@@ -1623,8 +1569,6 @@ void TabBar::StateChanged( StateChangedType nType )
}
}
void
TabBar
::
DataChanged
(
const
DataChangedEvent
&
rDCEvt
)
{
Window
::
DataChanged
(
rDCEvt
);
...
...
@@ -1639,8 +1583,6 @@ void TabBar::DataChanged( const DataChangedEvent& rDCEvt )
}
}
void
TabBar
::
ImplSelect
()
{
Select
();
...
...
@@ -1648,28 +1590,20 @@ void TabBar::ImplSelect()
CallEventListeners
(
VCLEVENT_TABBAR_PAGESELECTED
,
reinterpret_cast
<
void
*>
(
sal
::
static_int_cast
<
sal_IntPtr
>
(
mnCurPageId
))
);
}
void
TabBar
::
Select
()
{
maSelectHdl
.
Call
(
this
);
}
void
TabBar
::
DoubleClick
()
{
}
void
TabBar
::
Split
()
{
maSplitHdl
.
Call
(
this
);
}
void
TabBar
::
ImplActivatePage
()
{
ActivatePage
();
...
...
@@ -1677,13 +1611,8 @@ void TabBar::ImplActivatePage()
CallEventListeners
(
VCLEVENT_TABBAR_PAGEACTIVATED
,
reinterpret_cast
<
void
*>
(
sal
::
static_int_cast
<
sal_IntPtr
>
(
mnCurPageId
))
);
}
void
TabBar
::
ActivatePage
()
{
}
{}
bool
TabBar
::
ImplDeactivatePage
()
{
...
...
@@ -1769,42 +1698,30 @@ Rectangle TabBar::ImplGetInsertTabRect(ImplTabBarItem* pItem) const
return
Rectangle
();
}
bool
TabBar
::
DeactivatePage
()
{
return
true
;
}
bool
TabBar
::
StartRenaming
()
{
return
true
;
}
TabBarAllowRenamingReturnCode
TabBar
::
AllowRenaming
()
{
return
TABBAR_RENAMING_YES
;
}
void
TabBar
::
EndRenaming
()
{
}
void
TabBar
::
Mirror
()
{
}
void
TabBar
::
InsertPage
(
sal_uInt16
nPageId
,
const
OUString
&
rText
,
TabBarPageBits
nBits
,
sal_uInt16
nPos
)
{
...
...
@@ -1838,8 +1755,6 @@ void TabBar::InsertPage( sal_uInt16 nPageId, const OUString& rText,
CallEventListeners
(
VCLEVENT_TABBAR_PAGEINSERTED
,
reinterpret_cast
<
void
*>
(
sal
::
static_int_cast
<
sal_IntPtr
>
(
nPageId
))
);
}
Color
TabBar
::
GetTabBgColor
(
sal_uInt16
nPageId
)
const
{
sal_uInt16
nPos
=
GetPagePos
(
nPageId
);
...
...
@@ -1872,8 +1787,6 @@ void TabBar::SetTabBgColor( sal_uInt16 nPageId, const Color& aTabBgColor )
}
}
void
TabBar
::
RemovePage
(
sal_uInt16
nPageId
)
{
sal_uInt16
nPos
=
GetPagePos
(
nPageId
);
...
...
@@ -1902,8 +1815,6 @@ void TabBar::RemovePage( sal_uInt16 nPageId )
}
}
void
TabBar
::
MovePage
(
sal_uInt16
nPageId
,
sal_uInt16
nNewPos
)
{
sal_uInt16
nPos
=
GetPagePos
(
nPageId
);
...
...
@@ -1940,8 +1851,6 @@ void TabBar::MovePage( sal_uInt16 nPageId, sal_uInt16 nNewPos )
}
}
void
TabBar
::
Clear
()
{
// delete all items
...
...
@@ -1964,8 +1873,6 @@ void TabBar::Clear()
CallEventListeners
(
VCLEVENT_TABBAR_PAGEREMOVED
,
reinterpret_cast
<
void
*>
(
sal
::
static_int_cast
<
sal_IntPtr
>
(
PAGE_NOT_FOUND
))
);
}
bool
TabBar
::
IsPageEnabled
(
sal_uInt16
nPageId
)
const
{
sal_uInt16
nPos
=
GetPagePos
(
nPageId
);
...
...
@@ -1976,8 +1883,6 @@ bool TabBar::IsPageEnabled( sal_uInt16 nPageId ) const
return
false
;
}
void
TabBar
::
SetPageBits
(
sal_uInt16
nPageId
,
TabBarPageBits
nBits
)
{
sal_uInt16
nPos
=
GetPagePos
(
nPageId
);
...
...
@@ -1997,8 +1902,6 @@ void TabBar::SetPageBits( sal_uInt16 nPageId, TabBarPageBits nBits )
}
}
TabBarPageBits
TabBar
::
GetPageBits
(
sal_uInt16
nPageId
)
const
{
sal_uInt16
nPos
=
GetPagePos
(
nPageId
);
...
...
@@ -2009,22 +1912,16 @@ TabBarPageBits TabBar::GetPageBits( sal_uInt16 nPageId ) const
return
sal_False
;
}
sal_uInt16
TabBar
::
GetPageCount
()
const
{
return
mpImpl
->
getItemSize
();
}
sal_uInt16
TabBar
::
GetPageId
(
sal_uInt16
nPos
)
const
{
return
nPos
<
mpImpl
->
mpItemList
.
size
()
?
mpImpl
->
mpItemList
[
nPos
]
->
mnId
:
0
;
}
sal_uInt16
TabBar
::
GetPagePos
(
sal_uInt16
nPageId
)
const
{
for
(
size_t
i
=
0
;
i
<
mpImpl
->
mpItemList
.
size
();
++
i
)
...
...
@@ -2036,8 +1933,6 @@ sal_uInt16 TabBar::GetPagePos( sal_uInt16 nPageId ) const
return
PAGE_NOT_FOUND
;
}
sal_uInt16
TabBar
::
GetPageId
(
const
Point
&
rPos
,
bool
bCheckInsTab
)
const
{
for
(
size_t
i
=
0
;
i
<
mpImpl
->
mpItemList
.
size
();
++
i
)
...
...
@@ -2057,8 +1952,6 @@ sal_uInt16 TabBar::GetPageId( const Point& rPos, bool bCheckInsTab ) const
return
0
;
}
Rectangle
TabBar
::
GetPageRect
(
sal_uInt16
nPageId
)
const
{
sal_uInt16
nPos
=
GetPagePos
(
nPageId
);
...
...
@@ -2069,8 +1962,6 @@ Rectangle TabBar::GetPageRect( sal_uInt16 nPageId ) const
return
Rectangle
();
}
void
TabBar
::
SetCurPageId
(
sal_uInt16
nPageId
)
{
sal_uInt16
nPos
=
GetPagePos
(
nPageId
);
...
...
@@ -2153,8 +2044,6 @@ void TabBar::SetCurPageId( sal_uInt16 nPageId )
}
}
void
TabBar
::
MakeVisible
(
sal_uInt16
nPageId
)
{
if
(
!
IsReallyVisible
()
)
...
...
@@ -2201,8 +2090,6 @@ void TabBar::MakeVisible( sal_uInt16 nPageId )
}
}
void
TabBar
::
SetFirstPageId
(
sal_uInt16
nPageId
)
{
sal_uInt16
nPos
=
GetPagePos
(
nPageId
);
...
...
@@ -2235,8 +2122,6 @@ void TabBar::SetFirstPageId( sal_uInt16 nPageId )
}
}
void
TabBar
::
SelectPage
(
sal_uInt16
nPageId
,
bool
bSelect
)
{
sal_uInt16
nPos
=
GetPagePos
(
nPageId
);
...
...
@@ -2256,8 +2141,6 @@ void TabBar::SelectPage( sal_uInt16 nPageId, bool bSelect )
}
}
sal_uInt16
TabBar
::
GetSelectPageCount
()
const
{
sal_uInt16
nSelected
=
0
;
...
...
@@ -2271,8 +2154,6 @@ sal_uInt16 TabBar::GetSelectPageCount() const
return
nSelected
;
}
bool
TabBar
::
IsPageSelected
(
sal_uInt16
nPageId
)
const
{
sal_uInt16
nPos
=
GetPagePos
(
nPageId
);
...
...
@@ -2282,8 +2163,6 @@ bool TabBar::IsPageSelected( sal_uInt16 nPageId ) const
return
false
;
}
bool
TabBar
::
StartEditMode
(
sal_uInt16
nPageId
)
{
sal_uInt16
nPos
=
GetPagePos
(
nPageId
);
...
...
@@ -2394,8 +2273,6 @@ void TabBar::EndEditMode( bool bCancel )
}
}
void
TabBar
::
SetMirrored
(
bool
bMirrored
)
{
if
(
mbMirrored
!=
bMirrored
)
...
...
@@ -2418,8 +2295,6 @@ bool TabBar::IsEffectiveRTL() const
return
IsMirrored
()
!=
Application
::
GetSettings
().
GetLayoutRTL
();
}
void
TabBar
::
SetMaxPageWidth
(
long
nMaxWidth
)
{
if
(
mnMaxPageWidth
!=
nMaxWidth
)
...
...
@@ -2433,8 +2308,6 @@ void TabBar::SetMaxPageWidth( long nMaxWidth )
}
}
void
TabBar
::
SetPageText
(
sal_uInt16
nPageId
,
const
OUString
&
rText
)
{
sal_uInt16
nPos
=
GetPagePos
(
nPageId
);
...
...
@@ -2451,8 +2324,6 @@ void TabBar::SetPageText( sal_uInt16 nPageId, const OUString& rText )
}
}
OUString
TabBar
::
GetPageText
(
sal_uInt16
nPageId
)
const
{
sal_uInt16
nPos
=
GetPagePos
(
nPageId
);
...
...
@@ -2461,8 +2332,6 @@ OUString TabBar::GetPageText( sal_uInt16 nPageId ) const
return
OUString
();
}
OUString
TabBar
::
GetHelpText
(
sal_uInt16
nPageId
)
const
{
sal_uInt16
nPos
=
GetPagePos
(
nPageId
);
...
...
@@ -2481,8 +2350,6 @@ OUString TabBar::GetHelpText( sal_uInt16 nPageId ) const
return
OUString
();
}
OString
TabBar
::
GetHelpId
(
sal_uInt16
nPageId
)
const
{
sal_uInt16
nPos
=
GetPagePos
(
nPageId
);
...
...
@@ -2492,8 +2359,6 @@ OString TabBar::GetHelpId( sal_uInt16 nPageId ) const
return
aRet
;
}
bool
TabBar
::
StartDrag
(
const
CommandEvent
&
rCEvt
,
vcl
::
Region
&
rRegion
)
{
if
(
!
(
mnWinStyle
&
WB_DRAG
)
||
(
rCEvt
.
GetCommand
()
!=
COMMAND_STARTDRAG
)
)
...
...
@@ -2537,8 +2402,6 @@ bool TabBar::StartDrag( const CommandEvent& rCEvt, vcl::Region& rRegion )
return
true
;
}
sal_uInt16
TabBar
::
ShowDropPos
(
const
Point
&
rPos
)
{
ImplTabBarItem
*
pItem
;
...
...
@@ -2660,8 +2523,6 @@ sal_uInt16 TabBar::ShowDropPos( const Point& rPos )
return
mnDropPos
;
}
void
TabBar
::
HideDropPos
()
{
if
(
mbDropPos
)
...
...
@@ -2700,8 +2561,6 @@ void TabBar::HideDropPos()
}
}
bool
TabBar
::
SwitchPage
(
const
Point
&
rPos
)
{
bool
bSwitch
=
false
;
...
...
@@ -2740,16 +2599,12 @@ bool TabBar::SwitchPage( const Point& rPos )
return
bSwitch
;
}
void
TabBar
::
EndSwitchPage
()
{
mnSwitchTime
=
0
;
mnSwitchId
=
0
;
}
void
TabBar
::
SetStyle
(
WinBits
nStyle
)
{
mnWinStyle
=
nStyle
;
...
...
@@ -2759,8 +2614,6 @@ void TabBar::SetStyle( WinBits nStyle )
Resize
();
}
Size
TabBar
::
CalcWindowSizePixel
()
const
{
long
nWidth
=
0
;
...
...
@@ -2778,19 +2631,14 @@ Size TabBar::CalcWindowSizePixel() const
return
Size
(
nWidth
,
GetSettings
().
GetStyleSettings
().
GetScrollBarSize
()
);
}
Rectangle
TabBar
::
GetPageArea
()
const
{
return
Rectangle
(
Point
(
mnOffX
,
mnOffY
),
Size
(
mnLastOffX
-
mnOffX
+
1
,
GetSizePixel
().
Height
()
-
mnOffY
)
);
}
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
accessibility
::
XAccessible
>
TabBar
::
CreateAccessible
()
css
::
uno
::
Reference
<
css
::
accessibility
::
XAccessible
>
TabBar
::
CreateAccessible
()
{
return
mpImpl
->
maAccessibleFactory
.
getFactory
().
createAccessibleTabBar
(
*
this
);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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