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
5a4796f7
Kaydet (Commit)
5a4796f7
authored
Tem 13, 2012
tarafından
Noel Grandin
Kaydeden (comit)
Michael Stahl
Tem 17, 2012
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Convert SV_DECL_PTRARR_DEL(SwUnoCrsrTbl) to std::set
Change-Id: I0d79505e2d97b1f8608e6d6e72b317bfaa344b1d
üst
49f78145
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
36 additions
and
28 deletions
+36
-28
docary.hxx
sw/inc/docary.hxx
+7
-3
unocrsr.cxx
sw/source/core/crsr/unocrsr.cxx
+12
-8
doc.cxx
sw/source/core/doc/doc.cxx
+1
-1
docbm.cxx
sw/source/core/doc/docbm.cxx
+9
-9
doccorr.cxx
sw/source/core/doc/doccorr.cxx
+6
-6
docnew.cxx
sw/source/core/doc/docnew.cxx
+1
-1
No files found.
sw/inc/docary.hxx
Dosyayı görüntüle @
5a4796f7
...
...
@@ -30,7 +30,9 @@
#include <com/sun/star/i18n/ForbiddenCharacters.hpp>
#include <vector>
#include <set>
#include <algorithm>
#include <svl/svarray.hxx>
class
SwFieldType
;
class
SwFmt
;
...
...
@@ -51,7 +53,6 @@ namespace com { namespace sun { namespace star { namespace i18n {
}}}}
#include <swtypes.hxx>
#include <svl/svarray.hxx>
// provides some methods for generic operations on lists that contain
// SwFmt* subclasses.
...
...
@@ -174,8 +175,11 @@ public:
using
_SwRedlineTbl
::
GetPos
;
};
typedef
SwUnoCrsr
*
SwUnoCrsrPtr
;
SV_DECL_PTRARR_DEL
(
SwUnoCrsrTbl
,
SwUnoCrsrPtr
,
0
)
class
SwUnoCrsrTbl
:
public
std
::
set
<
SwUnoCrsr
*>
{
public
:
// the destructor will free all objects still in the set
~
SwUnoCrsrTbl
();
};
class
SwOLENodes
:
public
std
::
vector
<
SwOLENode
*>
{};
...
...
sw/source/core/crsr/unocrsr.cxx
Dosyayı görüntüle @
5a4796f7
...
...
@@ -32,8 +32,6 @@
#include <docary.hxx>
#include <rootfrm.hxx>
SV_IMPL_PTRARR
(
SwUnoCrsrTbl
,
SwUnoCrsrPtr
)
IMPL_FIXEDMEMPOOL_NEWDEL
(
SwUnoCrsr
)
SwUnoCrsr
::
SwUnoCrsr
(
const
SwPosition
&
rPos
,
SwPaM
*
pRing
)
...
...
@@ -51,12 +49,9 @@ SwUnoCrsr::~SwUnoCrsr()
{
// then remove cursor from array
SwUnoCrsrTbl
&
rTbl
=
(
SwUnoCrsrTbl
&
)
pDoc
->
GetUnoCrsrTbl
();
sal_uInt16
nDelPos
=
rTbl
.
GetPos
(
this
);
if
(
USHRT_MAX
!=
nDelPos
)
rTbl
.
Remove
(
nDelPos
);
else
{
OSL_ENSURE
(
!
this
,
"UNO cursor not anymore in array"
);
if
(
!
rTbl
.
erase
(
this
)
)
{
OSL_ENSURE
(
!
this
,
"UNO Cursor nicht mehr im Array"
);
}
}
...
...
@@ -258,4 +253,13 @@ void SwUnoTableCrsr::MakeBoxSels()
}
}
SwUnoCrsrTbl
::~
SwUnoCrsrTbl
()
{
while
(
!
empty
())
{
delete
*
begin
();
erase
(
begin
()
);
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sw/source/core/doc/doc.cxx
Dosyayı görüntüle @
5a4796f7
...
...
@@ -2662,7 +2662,7 @@ SwUnoCrsr* SwDoc::CreateUnoCrsr( const SwPosition& rPos, sal_Bool bTblCrsr )
else
pNew
=
new
SwUnoCrsr
(
rPos
);
pUnoCrsrTbl
->
Insert
(
pNew
,
pUnoCrsrTbl
->
Count
()
);
pUnoCrsrTbl
->
insert
(
pNew
);
return
pNew
;
}
...
...
sw/source/core/doc/docbm.cxx
Dosyayı görüntüle @
5a4796f7
...
...
@@ -1418,15 +1418,15 @@ void _SaveCntntIdx(SwDoc* pDoc,
{
aSave
.
SetTypeAndCount
(
0x400
,
0
);
const
SwUnoCrsrTbl
&
rTbl
=
pDoc
->
GetUnoCrsrTbl
();
for
(
sal_uInt16
n
=
0
;
n
<
rTbl
.
Count
();
++
n
)
for
(
SwUnoCrsrTbl
::
iterator
it
=
rTbl
.
begin
();
it
!=
rTbl
.
end
();
++
it
)
{
FOREACHPAM_START
(
rTbl
[
n
]
)
FOREACHPAM_START
(
*
it
)
lcl_ChkPaM
(
rSaveArr
,
nNode
,
nCntnt
,
*
PCURCRSR
,
aSave
,
sal_False
);
aSave
.
IncCount
();
FOREACHPAM_END
()
SwUnoTableCrsr
*
pUnoTblCrsr
=
dynamic_cast
<
SwUnoTableCrsr
*>
(
rTbl
[
n
]
);
dynamic_cast
<
SwUnoTableCrsr
*>
(
*
it
);
if
(
pUnoTblCrsr
)
{
FOREACHPAM_START
(
&
pUnoTblCrsr
->
GetSelRing
()
)
...
...
@@ -1558,9 +1558,9 @@ void _RestoreCntntIdx(SwDoc* pDoc,
{
sal_uInt16
nCnt
=
0
;
const
SwUnoCrsrTbl
&
rTbl
=
pDoc
->
GetUnoCrsrTbl
();
for
(
sal_uInt16
i
=
0
;
i
<
rTbl
.
Count
();
++
i
)
for
(
SwUnoCrsrTbl
::
iterator
it
=
rTbl
.
begin
();
it
!=
rTbl
.
end
();
++
it
)
{
FOREACHPAM_START
(
rTbl
[
i
]
)
FOREACHPAM_START
(
*
it
)
if
(
aSave
.
GetCount
()
==
nCnt
)
{
pPos
=
&
PCURCRSR
->
GetBound
(
0x0400
==
...
...
@@ -1573,7 +1573,7 @@ void _RestoreCntntIdx(SwDoc* pDoc,
break
;
SwUnoTableCrsr
*
pUnoTblCrsr
=
dynamic_cast
<
SwUnoTableCrsr
*>
(
rTbl
[
i
]
);
dynamic_cast
<
SwUnoTableCrsr
*>
(
*
it
);
if
(
pUnoTblCrsr
)
{
FOREACHPAM_START
(
&
pUnoTblCrsr
->
GetSelRing
()
)
...
...
@@ -1718,9 +1718,9 @@ void _RestoreCntntIdx(std::vector<sal_uLong> &rSaveArr,
{
sal_uInt16
nCnt
=
0
;
const
SwUnoCrsrTbl
&
rTbl
=
pDoc
->
GetUnoCrsrTbl
();
for
(
sal_uInt16
i
=
0
;
i
<
rTbl
.
Count
();
++
i
)
for
(
SwUnoCrsrTbl
::
iterator
it
=
rTbl
.
begin
();
it
!=
rTbl
.
end
();
++
it
)
{
FOREACHPAM_START
(
rTbl
[
i
]
)
FOREACHPAM_START
(
*
it
)
if
(
aSave
.
GetCount
()
==
nCnt
)
{
pPos
=
&
PCURCRSR
->
GetBound
(
0x0400
==
...
...
@@ -1733,7 +1733,7 @@ void _RestoreCntntIdx(std::vector<sal_uLong> &rSaveArr,
break
;
SwUnoTableCrsr
*
pUnoTblCrsr
=
dynamic_cast
<
SwUnoTableCrsr
*>
(
rTbl
[
i
]
);
dynamic_cast
<
SwUnoTableCrsr
*>
(
*
it
);
if
(
pUnoTblCrsr
)
{
FOREACHPAM_START
(
&
pUnoTblCrsr
->
GetSelRing
()
)
...
...
sw/source/core/doc/doccorr.cxx
Dosyayı görüntüle @
5a4796f7
...
...
@@ -153,9 +153,9 @@ void PaMCorrAbs( const SwPaM& rRange,
{
SwUnoCrsrTbl
&
rTbl
=
const_cast
<
SwUnoCrsrTbl
&>
(
pDoc
->
GetUnoCrsrTbl
());
for
(
sal_uInt16
n
=
0
;
n
<
rTbl
.
Count
();
++
n
)
for
(
SwUnoCrsrTbl
::
iterator
it
=
rTbl
.
begin
();
it
!=
rTbl
.
end
();
++
it
)
{
SwUnoCrsr
*
const
pUnoCursor
=
rTbl
[
n
]
;
SwUnoCrsr
*
const
pUnoCursor
=
*
it
;
bool
bChange
=
false
;
// has the UNO cursor been corrected?
...
...
@@ -172,7 +172,7 @@ void PaMCorrAbs( const SwPaM& rRange,
FOREACHPAM_END
()
SwUnoTableCrsr
*
const
pUnoTblCrsr
=
dynamic_cast
<
SwUnoTableCrsr
*>
(
rTbl
[
n
]
);
dynamic_cast
<
SwUnoTableCrsr
*>
(
*
it
);
if
(
pUnoTblCrsr
)
{
FOREACHPAM_START
(
&
pUnoTblCrsr
->
GetSelRing
()
)
...
...
@@ -298,14 +298,14 @@ void PaMCorrRel( const SwNodeIndex &rOldNode,
}
{
SwUnoCrsrTbl
&
rTbl
=
(
SwUnoCrsrTbl
&
)
pDoc
->
GetUnoCrsrTbl
();
for
(
sal_uInt16
n
=
0
;
n
<
rTbl
.
Count
();
++
n
)
for
(
SwUnoCrsrTbl
::
iterator
it
=
rTbl
.
begin
();
it
!=
rTbl
.
end
();
++
it
)
{
FOREACHPAM_START
(
rTbl
[
n
]
)
FOREACHPAM_START
(
*
it
)
lcl_PaMCorrRel1
(
PCURCRSR
,
pOldNode
,
aNewPos
,
nCntIdx
);
FOREACHPAM_END
()
SwUnoTableCrsr
*
pUnoTblCrsr
=
dynamic_cast
<
SwUnoTableCrsr
*>
(
rTbl
[
n
]
);
dynamic_cast
<
SwUnoTableCrsr
*>
(
*
it
);
if
(
pUnoTblCrsr
)
{
FOREACHPAM_START
(
&
pUnoTblCrsr
->
GetSelRing
()
)
...
...
sw/source/core/doc/docnew.cxx
Dosyayı görüntüle @
5a4796f7
...
...
@@ -249,7 +249,7 @@ SwDoc::SwDoc()
maListStyleLists
(),
pRedlineTbl
(
new
SwRedlineTbl
),
pAutoFmtRedlnComment
(
0
),
pUnoCrsrTbl
(
new
SwUnoCrsrTbl
(
0
)
),
pUnoCrsrTbl
(
new
SwUnoCrsrTbl
()
),
pPgPViewPrtData
(
0
),
pExtInputRing
(
0
),
pLayouter
(
0
),
...
...
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