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
2915069a
Kaydet (Commit)
2915069a
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(AutoTextGroups) to std::vector
üst
96938bd0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
26 deletions
+25
-26
gloslst.hxx
sw/source/ui/inc/gloslst.hxx
+1
-2
gloslst.cxx
sw/source/ui/utlui/gloslst.cxx
+24
-24
No files found.
sw/source/ui/inc/gloslst.hxx
Dosyayı görüntüle @
2915069a
...
@@ -51,8 +51,7 @@ struct AutoTextGroup
...
@@ -51,8 +51,7 @@ struct AutoTextGroup
};
};
typedef
AutoTextGroup
*
AutoTextGroupPtr
;
typedef
std
::
vector
<
AutoTextGroup
*>
AutoTextGroups
;
SV_DECL_PTRARR
(
AutoTextGroups
,
AutoTextGroupPtr
,
4
)
class
SwGlossaryList
:
public
AutoTimer
class
SwGlossaryList
:
public
AutoTimer
{
{
...
...
sw/source/ui/utlui/gloslst.cxx
Dosyayı görüntüle @
2915069a
...
@@ -130,11 +130,11 @@ sal_Bool SwGlossaryList::GetShortName(const String& rLongName,
...
@@ -130,11 +130,11 @@ sal_Bool SwGlossaryList::GetShortName(const String& rLongName,
std
::
vector
<
TripleString
>
aTripleStrings
;
std
::
vector
<
TripleString
>
aTripleStrings
;
sal_uInt16
nCount
=
aGroupArr
.
Count
();
sal_uInt16
nCount
=
aGroupArr
.
size
();
sal_uInt16
nFound
=
0
;
sal_uInt16
nFound
=
0
;
for
(
sal_uInt16
i
=
0
;
i
<
nCount
;
i
++
)
for
(
sal_uInt16
i
=
0
;
i
<
nCount
;
i
++
)
{
{
AutoTextGroup
*
pGroup
=
aGroupArr
.
GetObject
(
i
)
;
AutoTextGroup
*
pGroup
=
aGroupArr
[
i
]
;
if
(
rGroupName
.
Len
()
&&
rGroupName
!=
pGroup
->
sName
)
if
(
rGroupName
.
Len
()
&&
rGroupName
!=
pGroup
->
sName
)
continue
;
continue
;
...
@@ -193,7 +193,7 @@ sal_uInt16 SwGlossaryList::GetGroupCount()
...
@@ -193,7 +193,7 @@ sal_uInt16 SwGlossaryList::GetGroupCount()
{
{
if
(
!
bFilled
)
if
(
!
bFilled
)
Update
();
Update
();
return
aGroupArr
.
Count
();
return
aGroupArr
.
size
();
}
}
/********************************************************************
/********************************************************************
...
@@ -203,11 +203,11 @@ sal_uInt16 SwGlossaryList::GetGroupCount()
...
@@ -203,11 +203,11 @@ sal_uInt16 SwGlossaryList::GetGroupCount()
String
SwGlossaryList
::
GetGroupName
(
sal_uInt16
nPos
,
sal_Bool
bNoPath
,
String
*
pTitle
)
String
SwGlossaryList
::
GetGroupName
(
sal_uInt16
nPos
,
sal_Bool
bNoPath
,
String
*
pTitle
)
{
{
OSL_ENSURE
(
aGroupArr
.
Count
()
>
nPos
,
"group not available"
);
OSL_ENSURE
(
aGroupArr
.
size
()
>
nPos
,
"group not available"
);
String
sRet
(
aEmptyStr
);
String
sRet
(
aEmptyStr
);
if
(
nPos
<
aGroupArr
.
Count
())
if
(
nPos
<
aGroupArr
.
size
())
{
{
AutoTextGroup
*
pGroup
=
aGroupArr
.
GetObject
(
nPos
)
;
AutoTextGroup
*
pGroup
=
aGroupArr
[
nPos
]
;
sRet
=
pGroup
->
sName
;
sRet
=
pGroup
->
sName
;
if
(
bNoPath
)
if
(
bNoPath
)
sRet
=
sRet
.
GetToken
(
0
,
GLOS_DELIM
);
sRet
=
sRet
.
GetToken
(
0
,
GLOS_DELIM
);
...
@@ -225,10 +225,10 @@ String SwGlossaryList::GetGroupName(sal_uInt16 nPos, sal_Bool bNoPath, String* p
...
@@ -225,10 +225,10 @@ String SwGlossaryList::GetGroupName(sal_uInt16 nPos, sal_Bool bNoPath, String* p
sal_uInt16
SwGlossaryList
::
GetBlockCount
(
sal_uInt16
nGroup
)
sal_uInt16
SwGlossaryList
::
GetBlockCount
(
sal_uInt16
nGroup
)
{
{
OSL_ENSURE
(
aGroupArr
.
Count
()
>
nGroup
,
"group not available"
);
OSL_ENSURE
(
aGroupArr
.
size
()
>
nGroup
,
"group not available"
);
if
(
nGroup
<
aGroupArr
.
Count
())
if
(
nGroup
<
aGroupArr
.
size
())
{
{
AutoTextGroup
*
pGroup
=
aGroupArr
.
GetObject
(
nGroup
)
;
AutoTextGroup
*
pGroup
=
aGroupArr
[
nGroup
]
;
return
pGroup
->
nCount
;
return
pGroup
->
nCount
;
}
}
return
0
;
return
0
;
...
@@ -241,10 +241,10 @@ sal_uInt16 SwGlossaryList::GetBlockCount(sal_uInt16 nGroup)
...
@@ -241,10 +241,10 @@ sal_uInt16 SwGlossaryList::GetBlockCount(sal_uInt16 nGroup)
String
SwGlossaryList
::
GetBlockName
(
sal_uInt16
nGroup
,
sal_uInt16
nBlock
,
String
&
rShortName
)
String
SwGlossaryList
::
GetBlockName
(
sal_uInt16
nGroup
,
sal_uInt16
nBlock
,
String
&
rShortName
)
{
{
OSL_ENSURE
(
aGroupArr
.
Count
()
>
nGroup
,
"group not available"
);
OSL_ENSURE
(
aGroupArr
.
size
()
>
nGroup
,
"group not available"
);
if
(
nGroup
<
aGroupArr
.
Count
())
if
(
nGroup
<
aGroupArr
.
size
())
{
{
AutoTextGroup
*
pGroup
=
aGroupArr
.
GetObject
(
nGroup
)
;
AutoTextGroup
*
pGroup
=
aGroupArr
[
nGroup
]
;
rShortName
=
pGroup
->
sShortNames
.
GetToken
(
nBlock
,
STRING_DELIM
);
rShortName
=
pGroup
->
sShortNames
.
GetToken
(
nBlock
,
STRING_DELIM
);
return
pGroup
->
sLongNames
.
GetToken
(
nBlock
,
STRING_DELIM
);
return
pGroup
->
sLongNames
.
GetToken
(
nBlock
,
STRING_DELIM
);
}
}
...
@@ -294,7 +294,7 @@ void SwGlossaryList::Update()
...
@@ -294,7 +294,7 @@ void SwGlossaryList::Update()
&
pGroup
->
aDateModified
,
&
pGroup
->
aDateModified
,
&
pGroup
->
aDateModified
);
&
pGroup
->
aDateModified
);
aGroupArr
.
Insert
(
pGroup
,
i
);
aGroupArr
.
insert
(
aGroupArr
.
begin
(),
pGroup
);
}
}
}
}
bFilled
=
sal_True
;
bFilled
=
sal_True
;
...
@@ -327,7 +327,7 @@ void SwGlossaryList::Update()
...
@@ -327,7 +327,7 @@ void SwGlossaryList::Update()
FillGroup
(
pFound
,
pGlossaries
);
FillGroup
(
pFound
,
pGlossaries
);
pFound
->
aDateModified
=
*
pDT
;
pFound
->
aDateModified
=
*
pDT
;
aGroupArr
.
Insert
(
pFound
,
aGroupArr
.
Count
()
);
aGroupArr
.
push_back
(
pFound
);
}
}
else
if
(
pFound
->
aDateModified
<
*
pDT
)
else
if
(
pFound
->
aDateModified
<
*
pDT
)
{
{
...
@@ -340,11 +340,11 @@ void SwGlossaryList::Update()
...
@@ -340,11 +340,11 @@ void SwGlossaryList::Update()
delete
pDT
;
delete
pDT
;
}
}
sal_uInt16
nArrCount
=
aGroupArr
.
Count
();
sal_uInt16
nArrCount
=
aGroupArr
.
size
();
for
(
sal_uInt16
i
=
nArrCount
;
i
;
--
i
)
for
(
sal_uInt16
i
=
nArrCount
;
i
;
--
i
)
{
{
// evtl. geloeschte Gruppen entfernen
// evtl. geloeschte Gruppen entfernen
AutoTextGroup
*
pGroup
=
aGroupArr
.
GetObject
(
i
-
1
)
;
AutoTextGroup
*
pGroup
=
aGroupArr
[
i
-
1
]
;
sal_uInt16
nGroupPath
=
(
sal_uInt16
)
pGroup
->
sName
.
GetToken
(
1
,
sal_uInt16
nGroupPath
=
(
sal_uInt16
)
pGroup
->
sName
.
GetToken
(
1
,
GLOS_DELIM
).
ToInt32
();
GLOS_DELIM
).
ToInt32
();
// nur die Gruppen werden geprueft, die fuer den
// nur die Gruppen werden geprueft, die fuer den
...
@@ -358,7 +358,7 @@ void SwGlossaryList::Update()
...
@@ -358,7 +358,7 @@ void SwGlossaryList::Update()
if
(
!
bFound
)
if
(
!
bFound
)
{
{
aGroupArr
.
Remove
(
i
-
1
);
aGroupArr
.
erase
(
aGroupArr
.
begin
()
+
i
-
1
);
delete
pGroup
;
delete
pGroup
;
}
}
}
}
...
@@ -386,9 +386,9 @@ void SwGlossaryList::Timeout()
...
@@ -386,9 +386,9 @@ void SwGlossaryList::Timeout()
AutoTextGroup
*
SwGlossaryList
::
FindGroup
(
const
String
&
rGroupName
)
AutoTextGroup
*
SwGlossaryList
::
FindGroup
(
const
String
&
rGroupName
)
{
{
for
(
sal_uInt16
i
=
0
;
i
<
aGroupArr
.
Count
();
i
++
)
for
(
sal_uInt16
i
=
0
;
i
<
aGroupArr
.
size
();
i
++
)
{
{
AutoTextGroup
*
pRet
=
aGroupArr
.
GetObject
(
i
)
;
AutoTextGroup
*
pRet
=
aGroupArr
[
i
]
;
if
(
pRet
->
sName
==
rGroupName
)
if
(
pRet
->
sName
==
rGroupName
)
return
pRet
;
return
pRet
;
}
}
...
@@ -428,13 +428,13 @@ sal_Bool SwGlossaryList::HasLongName(const String& rBegin, SvStringsISortDtor* p
...
@@ -428,13 +428,13 @@ sal_Bool SwGlossaryList::HasLongName(const String& rBegin, SvStringsISortDtor* p
if
(
!
bFilled
)
if
(
!
bFilled
)
Update
();
Update
();
sal_uInt16
nFound
=
0
;
sal_uInt16
nFound
=
0
;
sal_uInt16
nCount
=
aGroupArr
.
Count
();
sal_uInt16
nCount
=
aGroupArr
.
size
();
sal_uInt16
nBeginLen
=
rBegin
.
Len
();
sal_uInt16
nBeginLen
=
rBegin
.
Len
();
const
::
utl
::
TransliterationWrapper
&
rSCmp
=
GetAppCmpStrIgnore
();
const
::
utl
::
TransliterationWrapper
&
rSCmp
=
GetAppCmpStrIgnore
();
for
(
sal_uInt16
i
=
0
;
i
<
nCount
;
i
++
)
for
(
sal_uInt16
i
=
0
;
i
<
nCount
;
i
++
)
{
{
AutoTextGroup
*
pGroup
=
aGroupArr
.
GetObject
(
i
)
;
AutoTextGroup
*
pGroup
=
aGroupArr
[
i
]
;
for
(
sal_uInt16
j
=
0
;
j
<
pGroup
->
nCount
;
j
++
)
for
(
sal_uInt16
j
=
0
;
j
<
pGroup
->
nCount
;
j
++
)
{
{
String
sBlock
=
pGroup
->
sLongNames
.
GetToken
(
j
,
STRING_DELIM
);
String
sBlock
=
pGroup
->
sLongNames
.
GetToken
(
j
,
STRING_DELIM
);
...
@@ -457,11 +457,11 @@ sal_Bool SwGlossaryList::HasLongName(const String& rBegin, SvStringsISortDtor* p
...
@@ -457,11 +457,11 @@ sal_Bool SwGlossaryList::HasLongName(const String& rBegin, SvStringsISortDtor* p
********************************************************************/
********************************************************************/
void
SwGlossaryList
::
ClearGroups
()
void
SwGlossaryList
::
ClearGroups
()
{
{
sal_uInt16
nCount
=
aGroupArr
.
Count
();
sal_uInt16
nCount
=
aGroupArr
.
size
();
for
(
sal_uInt16
i
=
0
;
i
<
nCount
;
++
i
)
for
(
sal_uInt16
i
=
0
;
i
<
nCount
;
++
i
)
delete
aGroupArr
.
GetObject
(
i
)
;
delete
aGroupArr
[
i
]
;
aGroupArr
.
Remove
(
0
,
nCount
);
aGroupArr
.
clear
(
);
bFilled
=
sal_False
;
bFilled
=
sal_False
;
}
}
...
...
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