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