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
af50c7d9
Kaydet (Commit)
af50c7d9
authored
Haz 14, 2012
tarafından
Noel Grandin
Kaydeden (comit)
Michael Stahl
Haz 20, 2012
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Convert SV_DECL_PTRARR(SfxViewFrameArr_Impl) to std::vector
Change-Id: I3b6f41b97d1fc375985465ea9e5c0cca9e05ba10
üst
20aa56cc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
22 deletions
+21
-22
arrdecl.hxx
sfx2/inc/arrdecl.hxx
+1
-1
viewfrm.cxx
sfx2/source/view/viewfrm.cxx
+14
-15
viewsh.cxx
sfx2/source/view/viewsh.cxx
+6
-6
No files found.
sfx2/inc/arrdecl.hxx
Dosyayı görüntüle @
af50c7d9
...
...
@@ -37,7 +37,7 @@ class SfxObjectShell;
SV_DECL_PTRARR
(
SfxObjectShellArr_Impl
,
SfxObjectShell
*
,
4
)
class
SfxViewFrame
;
SV_DECL_PTRARR
(
SfxViewFrameArr_Impl
,
SfxViewFrame
*
,
4
)
class
SfxViewFrameArr_Impl
:
public
std
::
vector
<
SfxViewFrame
*>
{};
class
SfxViewShell
;
class
SfxViewShellArr_Impl
:
public
std
::
vector
<
SfxViewShell
*>
{};
...
...
sfx2/source/view/viewfrm.cxx
Dosyayı görüntüle @
af50c7d9
...
...
@@ -252,7 +252,7 @@ public:
void
InsertViewFrame
(
SfxViewFrame
*
pFrame
)
{
StartListening
(
*
pFrame
);
C40_INSERT
(
SfxViewFrame
,
pFrame
,
Count
()
);
push_back
(
pFrame
);
}
void
Notify
(
SfxBroadcaster
&
rBC
,
const
SfxHint
&
rHint
);
};
...
...
@@ -268,9 +268,9 @@ void SfxViewNotificatedFrameList_Impl::Notify( SfxBroadcaster& rBC, const SfxHin
SfxViewFrame
*
pFrame
=
(
SfxViewFrame
*
)
&
rBC
;
if
(
pFrame
)
{
sal_uInt16
nPos
=
C40_GETPOS
(
SfxViewFrame
,
pFrame
);
if
(
nPos
!=
USHRT_MAX
)
Remove
(
nPos
);
iterator
it
=
std
::
find
(
begin
(),
end
()
,
pFrame
);
if
(
it
!=
end
()
)
erase
(
it
);
}
break
;
}
...
...
@@ -1432,9 +1432,8 @@ void SfxViewFrame::Construct_Impl( SfxObjectShell *pObjSh )
pDispatcher
->
Flush
();
}
SfxViewFrame
*
pThis
=
this
;
// this due to the sick Array syntax
SfxViewFrameArr_Impl
&
rViewArr
=
SFX_APP
()
->
GetViewFrames_Impl
();
rViewArr
.
C40_INSERT
(
SfxViewFrame
,
pThis
,
rViewArr
.
Count
()
);
rViewArr
.
push_back
(
this
);
}
SfxViewFrame
::
SfxViewFrame
...
...
@@ -1491,8 +1490,8 @@ SfxViewFrame::~SfxViewFrame()
// Unregister from the Frame List.
SfxApplication
*
pSfxApp
=
SFX_APP
();
SfxViewFrameArr_Impl
&
rFrames
=
pSfxApp
->
GetViewFrames_Impl
();
const
SfxViewFrame
*
pThis
=
this
;
rFrames
.
Remove
(
rFrames
.
GetPos
(
pThis
)
);
SfxViewFrameArr_Impl
::
iterator
it
=
std
::
find
(
rFrames
.
begin
(),
rFrames
.
end
(),
this
)
;
rFrames
.
erase
(
it
);
// Delete Member
KillDispatcher_Impl
();
...
...
@@ -1539,9 +1538,9 @@ SfxViewFrame* SfxViewFrame::GetFirst
SfxViewFrameArr_Impl
&
rFrames
=
pSfxApp
->
GetViewFrames_Impl
();
// search for a SfxDocument of the specified type
for
(
sal_uInt16
nPos
=
0
;
nPos
<
rFrames
.
Count
();
++
nPos
)
for
(
sal_uInt16
nPos
=
0
;
nPos
<
rFrames
.
size
();
++
nPos
)
{
SfxViewFrame
*
pFrame
=
rFrames
.
GetObject
(
nPos
)
;
SfxViewFrame
*
pFrame
=
rFrames
[
nPos
]
;
if
(
(
!
pDoc
||
pDoc
==
pFrame
->
GetObjectShell
()
)
&&
(
!
bOnlyIfVisible
||
pFrame
->
IsVisible
()
)
)
...
...
@@ -1565,14 +1564,14 @@ SfxViewFrame* SfxViewFrame::GetNext
// refind the specified predecessor
sal_uInt16
nPos
;
for
(
nPos
=
0
;
nPos
<
rFrames
.
Count
();
++
nPos
)
if
(
rFrames
.
GetObject
(
nPos
)
==
&
rPrev
)
for
(
nPos
=
0
;
nPos
<
rFrames
.
size
();
++
nPos
)
if
(
rFrames
[
nPos
]
==
&
rPrev
)
break
;
// search for a Frame of the specified type
for
(
++
nPos
;
nPos
<
rFrames
.
Count
();
++
nPos
)
for
(
++
nPos
;
nPos
<
rFrames
.
size
();
++
nPos
)
{
SfxViewFrame
*
pFrame
=
rFrames
.
GetObject
(
nPos
)
;
SfxViewFrame
*
pFrame
=
rFrames
[
nPos
]
;
if
(
(
!
pDoc
||
pDoc
==
pFrame
->
GetObjectShell
()
)
&&
(
!
bOnlyIfVisible
||
pFrame
->
IsVisible
()
)
)
...
...
@@ -2205,7 +2204,7 @@ sal_Bool SfxViewFrame::SwitchToViewShell_Impl
return
sal_False
;
}
DBG_ASSERT
(
SFX_APP
()
->
GetViewFrames_Impl
().
Count
()
==
SFX_APP
()
->
GetViewShells_Impl
().
size
(),
"Inconsistent view arrays!"
);
DBG_ASSERT
(
SFX_APP
()
->
GetViewFrames_Impl
().
size
()
==
SFX_APP
()
->
GetViewShells_Impl
().
size
(),
"Inconsistent view arrays!"
);
return
sal_True
;
}
...
...
sfx2/source/view/viewsh.cxx
Dosyayı görüntüle @
af50c7d9
...
...
@@ -1552,9 +1552,9 @@ SfxViewShell* SfxViewShell::GetFirst
// sometimes dangling SfxViewShells exist that point to a dead SfxViewFrame
// these ViewShells shouldn't be accessible anymore
// a destroyed ViewFrame is not in the ViewFrame array anymore, so checking this array helps
for
(
sal_uInt16
n
=
0
;
n
<
rFrames
.
Count
();
++
n
)
for
(
sal_uInt16
n
=
0
;
n
<
rFrames
.
size
();
++
n
)
{
SfxViewFrame
*
pFrame
=
rFrames
.
GetObject
(
n
)
;
SfxViewFrame
*
pFrame
=
rFrames
[
n
]
;
if
(
pFrame
==
pShell
->
GetViewFrame
()
)
{
// only ViewShells with a valid ViewFrame will be returned
...
...
@@ -1594,9 +1594,9 @@ SfxViewShell* SfxViewShell::GetNext
// sometimes dangling SfxViewShells exist that point to a dead SfxViewFrame
// these ViewShells shouldn't be accessible anymore
// a destroyed ViewFrame is not in the ViewFrame array anymore, so checking this array helps
for
(
sal_uInt16
n
=
0
;
n
<
rFrames
.
Count
();
++
n
)
for
(
sal_uInt16
n
=
0
;
n
<
rFrames
.
size
();
++
n
)
{
SfxViewFrame
*
pFrame
=
rFrames
.
GetObject
(
n
)
;
SfxViewFrame
*
pFrame
=
rFrames
[
n
]
;
if
(
pFrame
==
pShell
->
GetViewFrame
()
)
{
// only ViewShells with a valid ViewFrame will be returned
...
...
@@ -1626,9 +1626,9 @@ void SfxViewShell::Notify( SfxBroadcaster& rBC,
{
// avoid access to dangling ViewShells
SfxViewFrameArr_Impl
&
rFrames
=
SFX_APP
()
->
GetViewFrames_Impl
();
for
(
sal_uInt16
n
=
0
;
n
<
rFrames
.
Count
();
++
n
)
for
(
sal_uInt16
n
=
0
;
n
<
rFrames
.
size
();
++
n
)
{
SfxViewFrame
*
frame
=
rFrames
.
GetObject
(
n
)
;
SfxViewFrame
*
frame
=
rFrames
[
n
]
;
if
(
frame
==
GetViewFrame
()
&&
&
rBC
==
GetObjectShell
()
)
{
SfxItemSet
*
pSet
=
GetObjectShell
()
->
GetMedium
()
->
GetItemSet
();
...
...
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