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
10629489
Kaydet (Commit)
10629489
authored
Kas 11, 2015
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
sfx2: boost::ptr_vector->std::vector<std::unique_ptr>
Change-Id: Ida6aa572b182f966180debc9bf8665975fe51ea2
üst
31a42483
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
14 deletions
+15
-14
splitwin.cxx
sfx2/source/dialog/splitwin.cxx
+12
-12
splitwin.hxx
sfx2/source/inc/splitwin.hxx
+3
-2
No files found.
sfx2/source/dialog/splitwin.cxx
Dosyayı görüntüle @
10629489
...
...
@@ -285,7 +285,7 @@ SfxSplitWindow::SfxSplitWindow( vcl::Window* pParent, SfxChildAlignment eAl,
pDock
->
bNewLine
=
true
;
}
pDockArr
->
insert
(
pDockArr
->
begin
()
+
n
,
pDock
);
pDockArr
->
insert
(
pDockArr
->
begin
()
+
n
,
std
::
unique_ptr
<
SfxDock_Impl
>
(
pDock
)
);
}
}
}
...
...
@@ -339,7 +339,7 @@ void SfxSplitWindow::SaveConfig_Impl()
sal_uInt16
n
;
for
(
n
=
0
;
n
<
pDockArr
->
size
();
n
++
)
{
const
SfxDock_Impl
&
rDock
=
(
*
pDockArr
)[
n
]
;
const
SfxDock_Impl
&
rDock
=
*
(
*
pDockArr
)[
n
].
get
()
;
if
(
rDock
.
bHide
||
rDock
.
pWin
)
nCount
++
;
}
...
...
@@ -348,7 +348,7 @@ void SfxSplitWindow::SaveConfig_Impl()
for
(
n
=
0
;
n
<
pDockArr
->
size
();
n
++
)
{
const
SfxDock_Impl
&
rDock
=
(
*
pDockArr
)[
n
]
;
const
SfxDock_Impl
&
rDock
=
*
(
*
pDockArr
)[
n
].
get
()
;
if
(
!
rDock
.
bHide
&&
!
rDock
.
pWin
)
continue
;
if
(
rDock
.
bNewLine
)
...
...
@@ -419,7 +419,7 @@ void SfxSplitWindow::Split()
sal_uInt16
nCount
=
pDockArr
->
size
();
for
(
sal_uInt16
n
=
0
;
n
<
nCount
;
n
++
)
{
const
SfxDock_Impl
&
rD
=
(
*
pDockArr
)[
n
]
;
const
SfxDock_Impl
&
rD
=
*
(
*
pDockArr
)[
n
].
get
()
;
if
(
rD
.
pWin
)
{
const
sal_uInt16
nId
=
rD
.
nType
;
...
...
@@ -476,7 +476,7 @@ void SfxSplitWindow::InsertWindow( SfxDockingWindow* pDockWin, const Size& rSize
sal_uInt16
nCount
=
pDockArr
->
size
();
for
(
sal_uInt16
n
=
0
;
n
<
nCount
;
n
++
)
{
SfxDock_Impl
&
rDock
=
(
*
pDockArr
)[
n
]
;
SfxDock_Impl
&
rDock
=
*
(
*
pDockArr
)[
n
].
get
()
;
if
(
rDock
.
bNewLine
)
{
// The window opens a new line
...
...
@@ -533,7 +533,7 @@ void SfxSplitWindow::InsertWindow( SfxDockingWindow* pDockWin, const Size& rSize
// Not found, insert at end
pFoundDock
=
new
SfxDock_Impl
;
pFoundDock
->
bHide
=
true
;
pDockArr
->
push_back
(
pFoundDock
);
pDockArr
->
push_back
(
std
::
unique_ptr
<
SfxDock_Impl
>
(
pFoundDock
)
);
pFoundDock
->
nType
=
pDockWin
->
GetType
();
nLine
++
;
nPos
=
0
;
...
...
@@ -557,11 +557,11 @@ void SfxSplitWindow::ReleaseWindow_Impl(SfxDockingWindow *pDockWin, bool bSave)
sal_uInt16
nCount
=
pDockArr
->
size
();
for
(
sal_uInt16
n
=
0
;
n
<
nCount
;
n
++
)
{
const
SfxDock_Impl
&
rDock
=
(
*
pDockArr
)[
n
]
;
const
SfxDock_Impl
&
rDock
=
*
(
*
pDockArr
)[
n
].
get
()
;
if
(
rDock
.
nType
==
pDockWin
->
GetType
()
)
{
if
(
rDock
.
bNewLine
&&
n
<
nCount
-
1
)
(
*
pDockArr
)[
n
+
1
]
.
bNewLine
=
true
;
(
*
pDockArr
)[
n
+
1
]
->
bNewLine
=
true
;
// Window has a position, this we forget
pDockArr
->
erase
(
pDockArr
->
begin
()
+
n
);
...
...
@@ -628,7 +628,7 @@ void SfxSplitWindow::InsertWindow( SfxDockingWindow* pDockWin, const Size& rSize
sal_uInt16
nInsertPos
=
0
;
for
(
sal_uInt16
n
=
0
;
n
<
nCount
;
n
++
)
{
SfxDock_Impl
&
rD
=
(
*
pDockArr
)[
n
]
;
SfxDock_Impl
&
rD
=
*
(
*
pDockArr
)[
n
].
get
()
;
if
(
rD
.
pWin
)
{
...
...
@@ -662,7 +662,7 @@ void SfxSplitWindow::InsertWindow( SfxDockingWindow* pDockWin, const Size& rSize
nInsertPos
=
nLastWindowIdx
+
1
;
// ignore all non-windows after the last window
}
pDockArr
->
insert
(
pDockArr
->
begin
()
+
nInsertPos
,
pDock
);
pDockArr
->
insert
(
pDockArr
->
begin
()
+
nInsertPos
,
std
::
unique_ptr
<
SfxDock_Impl
>
(
pDock
)
);
InsertWindow_Impl
(
pDock
,
rSize
,
nLine
,
nPos
,
bNewLine
);
SaveConfig_Impl
();
}
...
...
@@ -782,7 +782,7 @@ void SfxSplitWindow::InsertWindow_Impl( SfxDock_Impl* pDock,
sal_uInt16
nCount
=
pDockArr
->
size
();
for
(
sal_uInt16
n
=
0
;
n
<
nCount
;
++
n
)
{
const
SfxDock_Impl
&
rD
=
(
*
pDockArr
)[
n
]
;
const
SfxDock_Impl
&
rD
=
*
(
*
pDockArr
)[
n
].
get
()
;
if
(
rD
.
pWin
)
{
const
sal_uInt16
nId
=
rD
.
nType
;
...
...
@@ -839,7 +839,7 @@ void SfxSplitWindow::RemoveWindow( SfxDockingWindow* pDockWin, bool bHide )
sal_uInt16
nCount
=
pDockArr
->
size
();
for
(
sal_uInt16
n
=
0
;
n
<
nCount
;
n
++
)
{
SfxDock_Impl
&
rDock
=
(
*
pDockArr
)[
n
]
;
SfxDock_Impl
&
rDock
=
*
(
*
pDockArr
)[
n
].
get
()
;
if
(
rDock
.
nType
==
pDockWin
->
GetType
()
)
{
rDock
.
pWin
=
nullptr
;
...
...
sfx2/source/inc/splitwin.hxx
Dosyayı görüntüle @
10629489
...
...
@@ -22,7 +22,8 @@
#include <vcl/splitwin.hxx>
#include <sfx2/childwin.hxx>
#include <boost/ptr_container/ptr_vector.hpp>
#include <vector>
#include <memory>
class
SfxWorkWindow
;
class
SfxDockingWindow
;
...
...
@@ -37,7 +38,7 @@ struct SfxDock_Impl
long
nSize
;
};
typedef
boost
::
ptr_vector
<
SfxDock_Impl
>
SfxDockArr_Impl
;
typedef
std
::
vector
<
std
::
unique_ptr
<
SfxDock_Impl
>
>
SfxDockArr_Impl
;
class
SfxSplitWindow
:
public
SplitWindow
{
...
...
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