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
62b7606f
Kaydet (Commit)
62b7606f
authored
Nis 25, 2012
tarafından
Noel Grandin
Kaydeden (comit)
Michael Stahl
Nis 25, 2012
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Convert SV_DECL_PTRARR_DEL(SwRedlineDataParentArr) to ptr_vector
üst
4dcc1b65
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
20 deletions
+18
-20
redlndlg.hxx
sw/source/ui/inc/redlndlg.hxx
+1
-2
redlndlg.cxx
sw/source/ui/misc/redlndlg.cxx
+17
-18
No files found.
sw/source/ui/inc/redlndlg.hxx
Dosyayı görüntüle @
62b7606f
...
...
@@ -63,8 +63,7 @@ struct SwRedlineDataParent
};
typedef
SwRedlineDataParent
*
SwRedlineDataParentPtr
;
SV_DECL_PTRARR_DEL
(
SwRedlineDataParentArr
,
SwRedlineDataParentPtr
,
10
)
typedef
boost
::
ptr_vector
<
SwRedlineDataParent
>
SwRedlineDataParentArr
;
SV_DECL_PTRARR_SORT
(
SwRedlineDataParentSortArr
,
SwRedlineDataParentPtr
,
10
)
...
...
sw/source/ui/misc/redlndlg.cxx
Dosyayı görüntüle @
62b7606f
...
...
@@ -70,7 +70,6 @@
SFX_IMPL_MODELESSDIALOG
(
SwRedlineAcceptChild
,
FN_REDLINE_ACCEPT
)
SV_IMPL_PTRARR
(
SwRedlineDataParentArr
,
SwRedlineDataParentPtr
)
SV_IMPL_OP_PTRARR_SORT
(
SwRedlineDataParentSortArr
,
SwRedlineDataParentPtr
)
SV_IMPL_PTRARR
(
SwRedlineDataChildArr
,
SwRedlineDataChildPtr
)
SV_IMPL_PTRARR
(
SvLBoxEntryArr
,
SvLBoxEntryPtr
)
...
...
@@ -266,12 +265,12 @@ void SwRedlineAcceptDlg::Init(sal_uInt16 nStart)
aUsedSeqNo
.
Remove
((
sal_uInt16
)
0
,
aUsedSeqNo
.
Count
());
if
(
nStart
)
RemoveParents
(
nStart
,
aRedlineParents
.
Count
()
-
1
);
RemoveParents
(
nStart
,
aRedlineParents
.
size
()
-
1
);
else
{
pTable
->
Clear
();
aRedlineChildren
.
DeleteAndDestroy
(
0
,
aRedlineChildren
.
Count
());
aRedlineParents
.
DeleteAndDestroy
(
nStart
,
aRedlineParents
.
Count
()
-
nStart
);
aRedlineParents
.
erase
(
aRedlineParents
.
begin
()
+
nStart
,
aRedlineParents
.
end
()
);
}
// insert parents
...
...
@@ -424,14 +423,14 @@ void SwRedlineAcceptDlg::Activate()
{
const
SwRedline
&
rRedln
=
pSh
->
GetRedline
(
i
);
if
(
i
>=
aRedlineParents
.
Count
())
if
(
i
>=
aRedlineParents
.
size
())
{
// new entries have been appended
Init
(
i
);
return
;
}
pParent
=
aRedlineParents
[
i
];
pParent
=
&
aRedlineParents
[
i
];
if
(
&
rRedln
.
GetRedlineData
()
!=
pParent
->
pData
)
{
// Redline-Parents were inserted, changed or deleted
...
...
@@ -468,7 +467,7 @@ void SwRedlineAcceptDlg::Activate()
}
}
if
(
nCount
!=
aRedlineParents
.
Count
())
if
(
nCount
!=
aRedlineParents
.
size
())
{
// Redlines were deleted at the end
Init
(
nCount
);
...
...
@@ -479,7 +478,7 @@ void SwRedlineAcceptDlg::Activate()
for
(
i
=
0
;
i
<
nCount
;
i
++
)
{
const
SwRedline
&
rRedln
=
pSh
->
GetRedline
(
i
);
pParent
=
aRedlineParents
[
i
];
pParent
=
&
aRedlineParents
[
i
];
if
(
!
rRedln
.
GetComment
().
Equals
(
pParent
->
sComment
))
{
...
...
@@ -509,7 +508,7 @@ sal_uInt16 SwRedlineAcceptDlg::CalcDiff(sal_uInt16 nStart, sal_Bool bChild)
SwView
*
pView
=
::
GetActiveView
();
SwWrtShell
*
pSh
=
pView
->
GetWrtShellPtr
();
sal_uInt16
nAutoFmt
=
HasRedlineAutoFmt
()
?
nsRedlineType_t
::
REDLINE_FORM_AUTOFMT
:
0
;
SwRedlineDataParent
*
pParent
=
aRedlineParents
[
nStart
];
SwRedlineDataParent
*
pParent
=
&
aRedlineParents
[
nStart
];
const
SwRedline
&
rRedln
=
pSh
->
GetRedline
(
nStart
);
if
(
bChild
)
// should actually never happen, but just in case...
...
...
@@ -539,9 +538,9 @@ sal_uInt16 SwRedlineAcceptDlg::CalcDiff(sal_uInt16 nStart, sal_Bool bChild)
// have entries been deleted?
const
SwRedlineData
*
pRedlineData
=
&
rRedln
.
GetRedlineData
();
sal_uInt16
i
;
for
(
i
=
nStart
+
1
;
i
<
aRedlineParents
.
Count
();
i
++
)
for
(
i
=
nStart
+
1
;
i
<
aRedlineParents
.
size
();
i
++
)
{
if
(
aRedlineParents
[
i
]
->
pData
==
pRedlineData
)
if
(
aRedlineParents
[
i
]
.
pData
==
pRedlineData
)
{
// remove entries from nStart to i-1
RemoveParents
(
nStart
,
i
-
1
);
...
...
@@ -552,7 +551,7 @@ sal_uInt16 SwRedlineAcceptDlg::CalcDiff(sal_uInt16 nStart, sal_Bool bChild)
// entries been inserted?
sal_uInt16
nCount
=
pSh
->
GetRedlineCount
();
pRedlineData
=
aRedlineParents
[
nStart
]
->
pData
;
pRedlineData
=
aRedlineParents
[
nStart
]
.
pData
;
for
(
i
=
nStart
+
1
;
i
<
nCount
;
i
++
)
{
...
...
@@ -664,12 +663,12 @@ void SwRedlineAcceptDlg::RemoveParents(sal_uInt16 nStart, sal_uInt16 nEnd)
// set the cursor after the last entry because otherwise performance problem in TLB.
// TLB would otherwise reset the cursor at every Remove (expensive)
sal_uInt16
nPos
=
Min
((
sal_uInt16
)
nCount
,
(
sal_uInt16
)
aRedlineParents
.
Count
());
sal_uInt16
nPos
=
Min
((
sal_uInt16
)
nCount
,
(
sal_uInt16
)
aRedlineParents
.
size
());
SvLBoxEntry
*
pCurEntry
=
NULL
;
while
(
(
pCurEntry
==
NULL
)
&&
(
nPos
>
0
)
)
{
--
nPos
;
pCurEntry
=
aRedlineParents
[
nPos
]
->
pTLBParent
;
pCurEntry
=
aRedlineParents
[
nPos
]
.
pTLBParent
;
}
if
(
pCurEntry
)
...
...
@@ -679,9 +678,9 @@ void SwRedlineAcceptDlg::RemoveParents(sal_uInt16 nStart, sal_uInt16 nEnd)
for
(
sal_uInt16
i
=
nStart
;
i
<=
nEnd
;
i
++
)
{
if
(
!
bChildrenRemoved
&&
aRedlineParents
[
i
]
->
pNext
)
if
(
!
bChildrenRemoved
&&
aRedlineParents
[
i
]
.
pNext
)
{
SwRedlineDataChildPtr
pChildPtr
=
(
SwRedlineDataChildPtr
)
aRedlineParents
[
i
]
->
pNext
;
SwRedlineDataChildPtr
pChildPtr
=
(
SwRedlineDataChildPtr
)
aRedlineParents
[
i
]
.
pNext
;
sal_uInt16
nChildPos
=
aRedlineChildren
.
GetPos
(
pChildPtr
);
if
(
nChildPos
!=
USHRT_MAX
)
...
...
@@ -698,7 +697,7 @@ void SwRedlineAcceptDlg::RemoveParents(sal_uInt16 nStart, sal_uInt16 nEnd)
bChildrenRemoved
=
sal_True
;
}
}
SvLBoxEntry
*
pEntry
=
aRedlineParents
[
i
]
->
pTLBParent
;
SvLBoxEntry
*
pEntry
=
aRedlineParents
[
i
]
.
pTLBParent
;
if
(
pEntry
)
{
long
nIdx
=
aLBoxArr
.
Count
()
-
1L
;
...
...
@@ -720,7 +719,7 @@ void SwRedlineAcceptDlg::RemoveParents(sal_uInt16 nStart, sal_uInt16 nEnd)
// unfortunately by Remove it was selected from the TLB always again ...
pTable
->
SelectAll
(
sal_False
);
aRedlineParents
.
DeleteAndDestroy
(
nStart
,
nEnd
-
nStart
+
1
);
aRedlineParents
.
erase
(
aRedlineParents
.
begin
()
+
nStart
,
aRedlineParents
.
begin
()
+
nEnd
);
}
void
SwRedlineAcceptDlg
::
InsertParents
(
sal_uInt16
nStart
,
sal_uInt16
nEnd
)
...
...
@@ -765,7 +764,7 @@ void SwRedlineAcceptDlg::InsertParents(sal_uInt16 nStart, sal_uInt16 nEnd)
String
sComment
(
rRedln
.
GetComment
());
sComment
.
SearchAndReplaceAll
((
sal_Unicode
)
_LF
,(
sal_Unicode
)
' '
);
pRedlineParent
->
sComment
=
sComment
;
aRedlineParents
.
Insert
(
pRedlineParent
,
i
);
aRedlineParents
.
insert
(
aRedlineParents
.
begin
()
+
i
,
pRedlineParent
);
pData
=
new
RedlinData
;
pData
->
pData
=
pRedlineParent
;
...
...
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