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
66803f4a
Kaydet (Commit)
66803f4a
authored
Tem 13, 2011
tarafından
Joseph Powers
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Replace List with std::vector< Window* >
I also removed the unused Dummy class members.
üst
51054e7a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
47 deletions
+47
-47
taskbar.hxx
svtools/inc/svtools/taskbar.hxx
+25
-16
taskmisc.cxx
svtools/source/control/taskmisc.cxx
+22
-31
No files found.
svtools/inc/svtools/taskbar.hxx
Dosyayı görüntüle @
66803f4a
...
...
@@ -440,30 +440,39 @@ class ImplWindowArrangeList;
// - class WindowArrange -
// -----------------------
typedef
::
std
::
vector
<
Window
*
>
WindowList_impl
;
class
SVT_DLLPUBLIC
WindowArrange
{
private
:
List
*
mpWinList
;
void
*
mpDummy
;
sal_uLong
mnDummy
;
WindowList_impl
maWinList
;
#ifdef _TASKBAR_CXX
SVT_DLLPRIVATE
void
ImplTile
(
const
Rectangle
&
rRect
);
SVT_DLLPRIVATE
void
ImplHorz
(
const
Rectangle
&
rRect
);
SVT_DLLPRIVATE
void
ImplVert
(
const
Rectangle
&
rRect
);
SVT_DLLPRIVATE
void
ImplCascade
(
const
Rectangle
&
rRect
);
SVT_DLLPRIVATE
void
ImplTile
(
const
Rectangle
&
rRect
);
SVT_DLLPRIVATE
void
ImplHorz
(
const
Rectangle
&
rRect
);
SVT_DLLPRIVATE
void
ImplVert
(
const
Rectangle
&
rRect
);
SVT_DLLPRIVATE
void
ImplCascade
(
const
Rectangle
&
rRect
);
#endif
public
:
WindowArrange
();
~
WindowArrange
();
void
AddWindow
(
Window
*
pWindow
,
sal_uLong
nPos
=
LIST_APPEND
)
{
mpWinList
->
Insert
(
(
void
*
)
pWindow
,
nPos
);
}
void
RemoveAllWindows
()
{
mpWinList
->
Clear
();
}
void
Arrange
(
sal_uInt16
nType
,
const
Rectangle
&
rRect
);
WindowArrange
();
~
WindowArrange
();
void
AddWindow
(
Window
*
pWindow
,
size_t
nPos
=
size_t
(
-
1
)
)
{
if
(
nPos
<
maWinList
.
size
()
)
{
maWinList
.
insert
(
maWinList
.
begin
()
+
nPos
,
pWindow
);
}
else
{
maWinList
.
push_back
(
pWindow
);
}
}
void
RemoveAllWindows
()
{
maWinList
.
clear
();
}
void
Arrange
(
sal_uInt16
nType
,
const
Rectangle
&
rRect
);
};
#endif // _TASKBAR_HXX
...
...
svtools/source/control/taskmisc.cxx
Dosyayı görüntüle @
66803f4a
...
...
@@ -61,14 +61,13 @@ void TaskButtonBar::RequestHelp( const HelpEvent& rHEvt )
WindowArrange
::
WindowArrange
()
{
mpWinList
=
new
List
;
}
// -----------------------------------------------------------------------
WindowArrange
::~
WindowArrange
()
{
delete
mpWinList
;
maWinList
.
clear
()
;
}
// -----------------------------------------------------------------------
...
...
@@ -103,22 +102,21 @@ static void ImplPosSizeWindow( Window* pWindow,
void
WindowArrange
::
ImplTile
(
const
Rectangle
&
rRect
)
{
s
al_uInt16
nCount
=
(
sal_uInt16
)
mpWinList
->
Count
();
s
ize_t
nCount
=
maWinList
.
size
();
if
(
nCount
<
3
)
{
ImplVert
(
rRect
);
return
;
}
sal_uInt16
i
;
sal_uInt16
j
;
sal_uInt16
nCols
;
sal_uInt16
nRows
;
sal_uInt16
nActRows
;
sal_uInt16
nOffset
;
sal_uInt16
i
;
sal_uInt16
j
;
sal_uInt16
nCols
;
sal_uInt16
nRows
;
sal_uInt16
nActRows
;
sal_uInt16
nOffset
;
long
nOverWidth
;
long
nOverHeight
;
Window
*
pWindow
;
long
nX
=
rRect
.
Left
();
long
nY
=
rRect
.
Top
();
long
nWidth
=
rRect
.
GetWidth
();
...
...
@@ -144,7 +142,7 @@ void WindowArrange::ImplTile( const Rectangle& rRect )
nWidth
=
1
;
nOverWidth
=
nRectWidth
-
(
nWidth
*
nCols
);
pWindow
=
(
Window
*
)
mpWinList
->
First
();
WindowList_impl
::
iterator
it
=
maWinList
.
begin
();
for
(
i
=
0
;
i
<
nCols
;
i
++
)
{
if
(
i
<
nOffset
)
...
...
@@ -172,18 +170,17 @@ void WindowArrange::ImplTile( const Rectangle& rRect )
nTempHeight
++
;
nOverHeight
--
;
}
ImplPosSizeWindow
(
pWindow
,
nX
,
nY
,
nTempWidth
,
nTempHeight
);
ImplPosSizeWindow
(
*
it
,
nX
,
nY
,
nTempWidth
,
nTempHeight
);
nY
+=
nTempHeight
;
pWindow
=
(
Window
*
)
mpWinList
->
Next
();
if
(
!
pWindow
)
if
(
++
it
==
maWinList
.
end
()
)
break
;
}
nX
+=
nWidth
;
nY
=
nRectY
;
if
(
!
pWindow
)
if
(
it
==
maWinList
.
end
()
)
break
;
}
}
...
...
@@ -192,7 +189,7 @@ void WindowArrange::ImplTile( const Rectangle& rRect )
void
WindowArrange
::
ImplHorz
(
const
Rectangle
&
rRect
)
{
long
nCount
=
(
long
)
mpWinList
->
Count
();
size_t
nCount
=
maWinList
.
size
();
long
nX
=
rRect
.
Left
();
long
nY
=
rRect
.
Top
();
long
nWidth
=
rRect
.
GetWidth
();
...
...
@@ -206,9 +203,9 @@ void WindowArrange::ImplHorz( const Rectangle& rRect )
if
(
nHeight
<
1
)
nHeight
=
1
;
nOver
=
nRectHeight
-
(
nCount
*
nHeight
);
pWindow
=
(
Window
*
)
mpWinList
->
First
();
while
(
pWindow
)
for
(
size_t
index
=
0
;
index
<
nCount
;
++
index
)
{
pWindow
=
maWinList
[
index
];
nTempHeight
=
nHeight
;
if
(
nOver
>
0
)
{
...
...
@@ -217,8 +214,6 @@ void WindowArrange::ImplHorz( const Rectangle& rRect )
}
ImplPosSizeWindow
(
pWindow
,
nX
,
nY
,
nWidth
,
nTempHeight
);
nY
+=
nTempHeight
;
pWindow
=
(
Window
*
)
mpWinList
->
Next
();
}
}
...
...
@@ -226,7 +221,7 @@ void WindowArrange::ImplHorz( const Rectangle& rRect )
void
WindowArrange
::
ImplVert
(
const
Rectangle
&
rRect
)
{
long
nCount
=
(
long
)
mpWinList
->
Count
();
size_t
nCount
=
maWinList
.
size
();
long
nX
=
rRect
.
Left
();
long
nY
=
rRect
.
Top
();
long
nWidth
=
rRect
.
GetWidth
();
...
...
@@ -240,9 +235,9 @@ void WindowArrange::ImplVert( const Rectangle& rRect )
if
(
nWidth
<
1
)
nWidth
=
1
;
nOver
=
nRectWidth
-
(
nCount
*
nWidth
);
pWindow
=
(
Window
*
)
mpWinList
->
First
();
while
(
pWindow
)
for
(
size_t
index
=
0
;
index
<
nCount
;
++
index
)
{
pWindow
=
maWinList
[
index
];
nTempWidth
=
nWidth
;
if
(
nOver
>
0
)
{
...
...
@@ -251,8 +246,6 @@ void WindowArrange::ImplVert( const Rectangle& rRect )
}
ImplPosSizeWindow
(
pWindow
,
nX
,
nY
,
nTempWidth
,
nHeight
);
nX
+=
nTempWidth
;
pWindow
=
(
Window
*
)
mpWinList
->
Next
();
}
}
...
...
@@ -285,7 +278,7 @@ void WindowArrange::ImplCascade( const Rectangle& rRect )
Window
*
pTempWindow
;
// Border-Fenster suchen um den Versatz zu ermitteln
pTempWindow
=
(
Window
*
)
mpWinList
->
Firs
t
();
pTempWindow
=
maWinList
.
fron
t
();
pTempWindow
->
GetBorder
(
nLeftBorder
,
nTopBorder
,
nRightBorder
,
nBottomBorder
);
while
(
!
nTopBorder
)
{
...
...
@@ -313,9 +306,9 @@ void WindowArrange::ImplCascade( const Rectangle& rRect )
nStartOverHeight
=
nRectHeight
-
(
nHeight
+
(
nCascadeWins
*
nOff
));
i
=
0
;
pWindow
=
(
Window
*
)
mpWinList
->
First
();
while
(
pWindow
)
for
(
size_t
index
=
0
,
count
=
maWinList
.
size
();
index
<
count
;
++
index
)
{
pWindow
=
maWinList
[
index
];
if
(
!
i
)
{
nOverWidth
=
nStartOverWidth
;
...
...
@@ -346,8 +339,6 @@ void WindowArrange::ImplCascade( const Rectangle& rRect )
i
++
;
else
i
=
0
;
pWindow
=
(
Window
*
)
mpWinList
->
Next
();
}
}
...
...
@@ -355,7 +346,7 @@ void WindowArrange::ImplCascade( const Rectangle& rRect )
void
WindowArrange
::
Arrange
(
sal_uInt16
nType
,
const
Rectangle
&
rRect
)
{
if
(
!
mpWinList
->
Count
()
)
if
(
maWinList
.
empty
()
)
return
;
switch
(
nType
)
...
...
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