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
db515895
Kaydet (Commit)
db515895
authored
Mar 15, 2012
tarafından
Bartosz Kosiorek
Kaydeden (comit)
Fridrich Štrba
Mar 22, 2012
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Convert SVARRAY SORT into STL set
üst
51cfbf0c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
39 deletions
+34
-39
docdraw.cxx
sw/source/core/doc/docdraw.cxx
+0
-3
docedt.cxx
sw/source/core/doc/docedt.cxx
+4
-5
ndcopy.cxx
sw/source/core/docnode/ndcopy.cxx
+28
-28
mvsave.hxx
sw/source/core/inc/mvsave.hxx
+2
-3
No files found.
sw/source/core/doc/docdraw.cxx
Dosyayı görüntüle @
db515895
...
...
@@ -76,9 +76,6 @@
using
namespace
::
com
::
sun
::
star
;
using
namespace
::
com
::
sun
::
star
::
linguistic2
;
SV_IMPL_VARARR_SORT
(
_ZSortFlys
,
_ZSortFly
)
/*************************************************************************
|*
|* SwDoc::GroupSelection / SwDoc::UnGroupSelection
...
...
sw/source/core/doc/docedt.cxx
Dosyayı görüntüle @
db515895
...
...
@@ -163,7 +163,6 @@ struct _SaveRedline
SV_DECL_PTRARR_DEL
(
_SaveRedlines
,
_SaveRedline
*
,
0
)
SV_IMPL_VARARR
(
_SaveFlyArr
,
_SaveFly
)
SV_IMPL_PTRARR
(
_SaveRedlines
,
_SaveRedline
*
)
bool
lcl_MayOverwrite
(
const
SwTxtNode
*
pNode
,
const
xub_StrLen
nPos
)
...
...
@@ -191,7 +190,7 @@ void _RestFlyInRange( _SaveFlyArr & rArr, const SwNodeIndex& rSttIdx,
const
SwNodeIndex
*
pInsertPos
)
{
SwPosition
aPos
(
rSttIdx
);
for
(
s
al_uInt16
n
=
0
;
n
<
rArr
.
Count
();
++
n
)
for
(
s
ize_t
n
=
0
;
n
<
rArr
.
size
();
++
n
)
{
// create new anchor
_SaveFly
&
rSave
=
rArr
[
n
];
...
...
@@ -234,7 +233,7 @@ void _SaveFlyInRange( const SwNodeRange& rRg, _SaveFlyArr& rArr )
{
_SaveFly
aSave
(
pAPos
->
nNode
.
GetIndex
()
-
rRg
.
aStart
.
GetIndex
(),
pFmt
,
sal_False
);
rArr
.
Insert
(
aSave
,
rArr
.
Count
()
);
rArr
.
push_back
(
aSave
);
pFmt
->
DelFrms
();
rFmts
.
Remove
(
n
--
,
1
);
}
...
...
@@ -295,7 +294,7 @@ void _SaveFlyInRange( const SwPaM& rPam, const SwNodeIndex& rInsPos,
{
_SaveFly
aSave
(
pAPos
->
nNode
.
GetIndex
()
-
rSttNdIdx
.
GetIndex
(),
pFmt
,
bInsPos
);
rArr
.
Insert
(
aSave
,
rArr
.
Count
()
);
rArr
.
push_back
(
aSave
);
pFmt
->
DelFrms
();
rFmts
.
Remove
(
n
--
,
1
);
}
...
...
@@ -1188,7 +1187,7 @@ bool SwDoc::MoveNodeRange( SwNodeRange& rRange, SwNodeIndex& rPos,
}
// move the Flys to the new position
if
(
aSaveFlyArr
.
Count
()
)
if
(
!
aSaveFlyArr
.
empty
()
)
_RestFlyInRange
(
aSaveFlyArr
,
aIdx
,
NULL
);
// Add the Bookmarks back to the Document
...
...
sw/source/core/docnode/ndcopy.cxx
Dosyayı görüntüle @
db515895
...
...
@@ -53,6 +53,8 @@
#include <pagedesc.hxx>
#include <poolfmt.hxx>
#include <SwNodeNum.hxx>
#include <set>
#include <vector>
#ifdef DBG_UTIL
#define CHECK_TABLE(t) (t).CheckConsistency();
...
...
@@ -328,7 +330,7 @@ sal_Bool lcl_CopyTblLine( const SwTableLine*& rpLine, void* pPara );
sal_Bool
lcl_CopyTblBox
(
const
SwTableBox
*&
rpBox
,
void
*
pPara
)
{
_CopyTable
*
pCT
=
(
_CopyTable
*
)
pPara
;
_CopyTable
*
pCT
=
reinterpret_cast
<
_CopyTable
*
>
(
pPara
)
;
SwTableBoxFmt
*
pBoxFmt
=
(
SwTableBoxFmt
*
)
rpBox
->
GetFrmFmt
();
pCT
->
rMapArr
.
ForEach
(
lcl_SrchNew
,
&
pBoxFmt
);
...
...
@@ -392,7 +394,7 @@ sal_Bool lcl_CopyTblBox( const SwTableBox*& rpBox, void* pPara )
sal_Bool
lcl_CopyTblLine
(
const
SwTableLine
*&
rpLine
,
void
*
pPara
)
{
_CopyTable
*
pCT
=
(
_CopyTable
*
)
pPara
;
_CopyTable
*
pCT
=
reinterpret_cast
<
_CopyTable
*
>
(
pPara
)
;
SwTableLineFmt
*
pLineFmt
=
(
SwTableLineFmt
*
)
rpLine
->
GetFrmFmt
();
pCT
->
rMapArr
.
ForEach
(
lcl_SrchNew
,
&
pLineFmt
);
if
(
pLineFmt
==
rpLine
->
GetFrmFmt
()
)
// ein neues anlegen ??
...
...
@@ -1403,7 +1405,7 @@ void SwDoc::CopyFlyInFlyImpl( const SwNodeRange& rRg,
// die Ordnungsnummer (wird nur im DrawModel verwaltet)
// beibehalten.
SwDoc
*
const
pDest
=
rStartIdx
.
GetNode
().
GetDoc
();
_ZSortFlys
aArr
;
::
std
::
set
<
_ZSortFly
>
aSet
;
sal_uInt16
nArrLen
=
GetSpzFrmFmts
()
->
Count
();
for
(
sal_uInt16
n
=
0
;
n
<
nArrLen
;
++
n
)
...
...
@@ -1467,22 +1469,20 @@ void SwDoc::CopyFlyInFlyImpl( const SwNodeRange& rRg,
}
}
if
(
bAdd
)
a
Arr
.
Insert
(
_ZSortFly
(
pFmt
,
pAnchor
,
nArrLen
+
aArr
.
Count
()
));
a
Set
.
insert
(
_ZSortFly
(
pFmt
,
pAnchor
,
nArrLen
+
aSet
.
size
()
));
}
}
//Alle kopierten (also die neu erzeugten) Rahmen in ein weiteres Array
//stopfen. Dort sizten sie passend zu den Originalen, damit hinterher
//die Chains entsprechend aufgebaut werden koennen.
SvPtrarr
aNewArr
(
10
)
;
::
std
::
vector
<
SwFrmFmt
*
>
aVecSwFrmFmt
;
for
(
sal_uInt16
n
=
0
;
n
<
aArr
.
Count
();
++
n
)
for
(
::
std
::
set
<
_ZSortFly
>::
const_iterator
it
=
aSet
.
begin
()
;
it
!=
aSet
.
end
();
it
++
)
{
const
_ZSortFly
&
rZSortFly
=
aArr
[
n
];
// #i59964#
// correct determination of new anchor position
SwFmtAnchor
aAnchor
(
*
rZSortFly
.
GetAnchor
()
);
SwFmtAnchor
aAnchor
(
*
(
*
it
)
.
GetAnchor
()
);
SwPosition
*
pNewPos
=
(
SwPosition
*
)
aAnchor
.
GetCntntAnchor
();
// for at-paragraph and at-character anchored objects the new anchor
// position can *not* be determined by the difference of the current
...
...
@@ -1571,7 +1571,7 @@ void SwDoc::CopyFlyInFlyImpl( const SwNodeRange& rRg,
sal_Bool
bMakeCpy
=
sal_True
;
if
(
pDest
==
this
)
{
const
SwFmtCntnt
&
rCntnt
=
rZSortFly
.
GetFmt
()
->
GetCntnt
();
const
SwFmtCntnt
&
rCntnt
=
(
*
it
)
.
GetFmt
()
->
GetCntnt
();
const
SwStartNode
*
pSNd
;
if
(
rCntnt
.
GetCntntIdx
()
&&
0
!=
(
pSNd
=
rCntnt
.
GetCntntIdx
()
->
GetNode
().
GetStartNode
()
)
&&
...
...
@@ -1579,42 +1579,42 @@ void SwDoc::CopyFlyInFlyImpl( const SwNodeRange& rRg,
rStartIdx
.
GetIndex
()
<
pSNd
->
EndOfSectionIndex
()
)
{
bMakeCpy
=
sal_False
;
aArr
.
Remove
(
n
,
1
);
--
n
;
aSet
.
erase
(
it
);
}
}
// Format kopieren und den neuen Anker setzen
if
(
bMakeCpy
)
a
NewArr
.
Insert
(
pDest
->
CopyLayoutFmt
(
*
rZSortFly
.
GetFmt
(),
aAnchor
,
false
,
true
)
,
aNewArr
.
Count
()
);
a
VecSwFrmFmt
.
push_back
(
pDest
->
CopyLayoutFmt
(
*
(
*
it
)
.
GetFmt
(),
aAnchor
,
false
,
true
)
);
}
//Alle chains, die im Original vorhanden sind, soweit wie moeglich wieder
//aufbauen.
OSL_ENSURE
(
a
Arr
.
Count
()
==
aNewArr
.
Count
(),
"Missing new Flys"
);
if
(
a
Arr
.
Count
()
==
aNewArr
.
Count
()
)
OSL_ENSURE
(
a
Set
.
size
()
==
aVecSwFrmFmt
.
size
(),
"Missing new Flys"
);
if
(
a
Set
.
size
()
==
aVecSwFrmFmt
.
size
()
)
{
for
(
sal_uInt16
n
=
0
;
n
<
aArr
.
Count
();
++
n
)
size_t
n
=
0
;
for
(
::
std
::
set
<
_ZSortFly
>::
const_iterator
nIt
=
aSet
.
begin
()
;
nIt
!=
aSet
.
end
();
++
nIt
,
++
n
)
{
const
SwFrmFmt
*
pFmt
=
aArr
[
n
]
.
GetFmt
();
const
SwFmtChain
&
rChain
=
pFmt
->
GetChain
();
const
SwFrmFmt
*
pFmt
N
=
(
*
nIt
)
.
GetFmt
();
const
SwFmtChain
&
rChain
=
pFmt
N
->
GetChain
();
int
nCnt
=
0
!=
rChain
.
GetPrev
();
nCnt
+=
rChain
.
GetNext
()
?
1
:
0
;
for
(
sal_uInt16
k
=
0
;
nCnt
&&
k
<
aArr
.
Count
();
++
k
)
size_t
k
=
0
;
for
(
::
std
::
set
<
_ZSortFly
>::
const_iterator
kIt
=
aSet
.
begin
()
;
kIt
!=
aSet
.
end
();
++
kIt
,
++
k
)
{
const
_ZSortFly
&
rTmp
=
aArr
[
k
];
const
SwFrmFmt
*
pTmp
=
rTmp
.
GetFmt
();
if
(
rChain
.
GetPrev
()
==
pTmp
)
const
SwFrmFmt
*
pFmtK
=
(
*
kIt
).
GetFmt
();
if
(
rChain
.
GetPrev
()
==
pFmtK
)
{
::
lcl_ChainFmts
(
(
SwFlyFrmFmt
*
)
aNewArr
[
k
]
,
(
SwFlyFrmFmt
*
)
aNewArr
[
n
]
);
::
lcl_ChainFmts
(
dynamic_cast
<
SwFlyFrmFmt
*
>
(
aVecSwFrmFmt
[
k
])
,
dynamic_cast
<
SwFlyFrmFmt
*
>
(
aVecSwFrmFmt
[
n
])
);
--
nCnt
;
}
else
if
(
rChain
.
GetNext
()
==
p
Tmp
)
else
if
(
rChain
.
GetNext
()
==
p
FmtK
)
{
::
lcl_ChainFmts
(
(
SwFlyFrmFmt
*
)
aNewArr
[
n
]
,
(
SwFlyFrmFmt
*
)
aNewArr
[
k
]
);
::
lcl_ChainFmts
(
dynamic_cast
<
SwFlyFrmFmt
*
>
(
aVecSwFrmFmt
[
n
])
,
dynamic_cast
<
SwFlyFrmFmt
*
>
(
aVecSwFrmFmt
[
k
])
);
--
nCnt
;
}
}
...
...
sw/source/core/inc/mvsave.hxx
Dosyayı görüntüle @
db515895
...
...
@@ -32,6 +32,7 @@
#include <svl/svarray.hxx>
#include <IDocumentMarkAccess.hxx>
#include <vector>
#include <deque>
namespace
sfx2
{
class
MetadatableUndo
;
...
...
@@ -111,7 +112,7 @@ struct _SaveFly
{
}
};
SV_DECL_VARARR
(
_SaveFlyArr
,
_SaveFly
,
0
)
typedef
::
std
::
deque
<
_SaveFly
>
_SaveFlyArr
;
void
_RestFlyInRange
(
_SaveFlyArr
&
rArr
,
const
SwNodeIndex
&
rSttIdx
,
const
SwNodeIndex
*
pInsPos
);
...
...
@@ -182,8 +183,6 @@ public:
const
SwFmtAnchor
*
GetAnchor
()
const
{
return
pAnchor
;
}
};
SV_DECL_VARARR_SORT
(
_ZSortFlys
,
_ZSortFly
,
0
)
class
SwTblNumFmtMerge
{
...
...
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