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
a56c8a0d
Kaydet (Commit)
a56c8a0d
authored
Nis 26, 2012
tarafından
Noel Grandin
Kaydeden (comit)
Michael Stahl
May 09, 2012
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Convert SV_DECL_PTRARR_DEL(SwSortList) to boost::ptr_vector
üst
25d018c0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
21 deletions
+20
-21
UndoSort.hxx
sw/source/core/inc/UndoSort.hxx
+2
-1
unsort.cxx
sw/source/core/undo/unsort.cxx
+18
-20
No files found.
sw/source/core/inc/UndoSort.hxx
Dosyayı görüntüle @
a56c8a0d
...
...
@@ -30,6 +30,7 @@
#define SW_UNDO_SORT_HXX
#include <undobj.hxx>
#include <boost/ptr_container/ptr_vector.hpp>
struct
SwSortOptions
;
...
...
@@ -67,7 +68,7 @@ struct SwSortUndoElement
~
SwSortUndoElement
();
};
SV_DECL_PTRARR_DEL
(
SwSortList
,
SwSortUndoElement
*
,
10
)
typedef
boost
::
ptr_vector
<
SwSortUndoElement
>
SwSortList
;
typedef
std
::
vector
<
SwNodeIndex
*>
SwUndoSortList
;
class
SwUndoSort
:
public
SwUndo
,
private
SwUndRng
...
...
sw/source/core/undo/unsort.cxx
Dosyayı görüntüle @
a56c8a0d
...
...
@@ -47,8 +47,6 @@
--------------------------------------------------------------------*/
SV_IMPL_PTRARR
(
SwSortList
,
SwSortUndoElement
*
)
SwSortUndoElement
::~
SwSortUndoElement
()
{
...
...
@@ -111,12 +109,12 @@ void SwUndoSort::UndoImpl(::sw::UndoRedoContext & rContext)
const
SwTable
&
rTbl
=
pTblNd
->
GetTable
();
SwMovedBoxes
aMovedList
;
for
(
sal_uInt16
i
=
0
;
i
<
aSortList
.
Count
();
i
++
)
for
(
sal_uInt16
i
=
0
;
i
<
aSortList
.
size
();
i
++
)
{
const
SwTableBox
*
pSource
=
rTbl
.
GetTblBox
(
*
aSortList
[
i
]
->
SORT_TXT_TBL
.
TBL
.
pSource
);
*
aSortList
[
i
]
.
SORT_TXT_TBL
.
TBL
.
pSource
);
const
SwTableBox
*
pTarget
=
rTbl
.
GetTblBox
(
*
aSortList
[
i
]
->
SORT_TXT_TBL
.
TBL
.
pTarget
);
*
aSortList
[
i
]
.
SORT_TXT_TBL
.
TBL
.
pTarget
);
// zurueckverschieben
MoveCell
(
&
rDoc
,
pTarget
,
pSource
,
...
...
@@ -141,20 +139,20 @@ void SwUndoSort::UndoImpl(::sw::UndoRedoContext & rContext)
// fuer die sorted Positions einen Index anlegen.
// JP 25.11.97: Die IndexList muss aber nach SourcePosition
// aufsteigend sortiert aufgebaut werden
SwUndoSortList
aIdxList
(
(
sal_uInt8
)
aSortList
.
Count
()
);
SwUndoSortList
aIdxList
(
(
sal_uInt8
)
aSortList
.
size
()
);
sal_uInt16
i
;
for
(
i
=
0
;
i
<
aSortList
.
Count
();
++
i
)
for
(
sal_uInt16
ii
=
0
;
ii
<
aSortList
.
Count
();
++
ii
)
if
(
aSortList
[
ii
]
->
SORT_TXT_TBL
.
TXT
.
nSource
==
nSttNode
+
i
)
for
(
i
=
0
;
i
<
aSortList
.
size
();
++
i
)
for
(
sal_uInt16
ii
=
0
;
ii
<
aSortList
.
size
();
++
ii
)
if
(
aSortList
[
ii
]
.
SORT_TXT_TBL
.
TXT
.
nSource
==
nSttNode
+
i
)
{
SwNodeIndex
*
pIdx
=
new
SwNodeIndex
(
rDoc
.
GetNodes
(),
aSortList
[
ii
]
->
SORT_TXT_TBL
.
TXT
.
nTarget
);
aSortList
[
ii
]
.
SORT_TXT_TBL
.
TXT
.
nTarget
);
aIdxList
.
insert
(
aIdxList
.
begin
()
+
i
,
pIdx
);
break
;
}
for
(
i
=
0
;
i
<
aSortList
.
Count
();
++
i
)
for
(
i
=
0
;
i
<
aSortList
.
size
();
++
i
)
{
SwNodeIndex
aIdx
(
rDoc
.
GetNodes
(),
nSttNode
+
i
);
SwNodeRange
aRg
(
*
aIdxList
[
i
],
0
,
*
aIdxList
[
i
],
1
);
...
...
@@ -188,12 +186,12 @@ void SwUndoSort::RedoImpl(::sw::UndoRedoContext & rContext)
const
SwTable
&
rTbl
=
pTblNd
->
GetTable
();
SwMovedBoxes
aMovedList
;
for
(
sal_uInt16
i
=
0
;
i
<
aSortList
.
Count
();
++
i
)
for
(
sal_uInt16
i
=
0
;
i
<
aSortList
.
size
();
++
i
)
{
const
SwTableBox
*
pSource
=
rTbl
.
GetTblBox
(
(
const
String
&
)
*
aSortList
[
i
]
->
SORT_TXT_TBL
.
TBL
.
pSource
);
(
const
String
&
)
*
aSortList
[
i
]
.
SORT_TXT_TBL
.
TBL
.
pSource
);
const
SwTableBox
*
pTarget
=
rTbl
.
GetTblBox
(
(
const
String
&
)
*
aSortList
[
i
]
->
SORT_TXT_TBL
.
TBL
.
pTarget
);
(
const
String
&
)
*
aSortList
[
i
]
.
SORT_TXT_TBL
.
TBL
.
pTarget
);
// zurueckverschieben
MoveCell
(
&
rDoc
,
pSource
,
pTarget
,
...
...
@@ -220,17 +218,17 @@ void SwUndoSort::RedoImpl(::sw::UndoRedoContext & rContext)
SetPaM
(
rPam
);
RemoveIdxFromRange
(
rPam
,
true
);
SwUndoSortList
aIdxList
(
(
sal_uInt8
)
aSortList
.
Count
()
);
SwUndoSortList
aIdxList
(
(
sal_uInt8
)
aSortList
.
size
()
);
sal_uInt16
i
;
for
(
i
=
0
;
i
<
aSortList
.
Count
();
++
i
)
for
(
i
=
0
;
i
<
aSortList
.
size
();
++
i
)
{
// aktuelle Pos ist die Ausgangslage
SwNodeIndex
*
pIdx
=
new
SwNodeIndex
(
rDoc
.
GetNodes
(),
aSortList
[
i
]
->
SORT_TXT_TBL
.
TXT
.
nSource
);
aSortList
[
i
]
.
SORT_TXT_TBL
.
TXT
.
nSource
);
aIdxList
.
insert
(
aIdxList
.
begin
()
+
i
,
pIdx
);
}
for
(
i
=
0
;
i
<
aSortList
.
Count
();
++
i
)
for
(
i
=
0
;
i
<
aSortList
.
size
();
++
i
)
{
SwNodeIndex
aIdx
(
rDoc
.
GetNodes
(),
nSttNode
+
i
);
SwNodeRange
aRg
(
*
aIdxList
[
i
],
0
,
*
aIdxList
[
i
],
1
);
...
...
@@ -266,13 +264,13 @@ void SwUndoSort::RepeatImpl(::sw::RepeatContext & rContext)
void
SwUndoSort
::
Insert
(
const
String
&
rOrgPos
,
const
String
&
rNewPos
)
{
SwSortUndoElement
*
pEle
=
new
SwSortUndoElement
(
rOrgPos
,
rNewPos
);
aSortList
.
C40_INSERT
(
SwSortUndoElement
,
pEle
,
aSortList
.
Count
()
);
aSortList
.
push_back
(
pEle
);
}
void
SwUndoSort
::
Insert
(
sal_uLong
nOrgPos
,
sal_uLong
nNewPos
)
{
SwSortUndoElement
*
pEle
=
new
SwSortUndoElement
(
nOrgPos
,
nNewPos
);
aSortList
.
C40_INSERT
(
SwSortUndoElement
,
pEle
,
aSortList
.
Count
()
);
aSortList
.
push_back
(
pEle
);
}
...
...
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