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
104d688a
Kaydet (Commit)
104d688a
authored
Ock 16, 2012
tarafından
August Sodora
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
SV_DECL_PTRARR_DEL->std::vector
üst
a56cf221
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
45 deletions
+28
-45
gloslst.cxx
sw/source/ui/utlui/gloslst.cxx
+28
-45
No files found.
sw/source/ui/utlui/gloslst.cxx
Dosyayı görüntüle @
104d688a
...
@@ -62,10 +62,6 @@ struct TripleString
...
@@ -62,10 +62,6 @@ struct TripleString
String
sShort
;
String
sShort
;
};
};
typedef
TripleString
*
TripleStringPtr
;
SV_DECL_PTRARR_DEL
(
TripleStrings
,
TripleStringPtr
,
0
,
4
)
SV_IMPL_PTRARR
(
TripleStrings
,
TripleStringPtr
)
class
SwGlossDecideDlg
:
public
ModalDialog
class
SwGlossDecideDlg
:
public
ModalDialog
{
{
OKButton
aOk
;
OKButton
aOk
;
...
@@ -107,11 +103,6 @@ IMPL_LINK(SwGlossDecideDlg, SelectHdl, ListBox*, EMPTYARG)
...
@@ -107,11 +103,6 @@ IMPL_LINK(SwGlossDecideDlg, SelectHdl, ListBox*, EMPTYARG)
return
0
;
return
0
;
}
}
/********************************************************************
********************************************************************/
SwGlossaryList
::
SwGlossaryList
()
:
SwGlossaryList
::
SwGlossaryList
()
:
bFilled
(
sal_False
)
bFilled
(
sal_False
)
{
{
...
@@ -120,11 +111,6 @@ SwGlossaryList::SwGlossaryList() :
...
@@ -120,11 +111,6 @@ SwGlossaryList::SwGlossaryList() :
SetTimeout
(
GLOS_TIMEOUT
);
SetTimeout
(
GLOS_TIMEOUT
);
}
}
/********************************************************************
********************************************************************/
SwGlossaryList
::~
SwGlossaryList
()
SwGlossaryList
::~
SwGlossaryList
()
{
{
ClearGroups
();
ClearGroups
();
...
@@ -136,42 +122,44 @@ SwGlossaryList::~SwGlossaryList()
...
@@ -136,42 +122,44 @@ SwGlossaryList::~SwGlossaryList()
* bei Bedarf nach der richtigen Gruppe gefragt
* bei Bedarf nach der richtigen Gruppe gefragt
********************************************************************/
********************************************************************/
sal_Bool
SwGlossaryList
::
GetShortName
(
const
String
&
rLongName
,
sal_Bool
SwGlossaryList
::
GetShortName
(
const
String
&
rLongName
,
String
&
rShortName
,
String
&
rGroupName
)
String
&
rShortName
,
String
&
rGroupName
)
{
{
if
(
!
bFilled
)
if
(
!
bFilled
)
Update
();
Update
();
TripleStrings
aTripleStrings
;
std
::
vector
<
TripleString
>
aTripleStrings
;
sal_uInt16
nCount
=
aGroupArr
.
Count
();
sal_uInt16
nCount
=
aGroupArr
.
Count
();
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
.
GetObject
(
i
);
if
(
!
rGroupName
.
Len
()
||
rGroupName
==
pGroup
->
sName
)
if
(
rGroupName
.
Len
()
&&
rGroupName
!=
pGroup
->
sName
)
for
(
sal_uInt16
j
=
0
;
j
<
pGroup
->
nCount
;
j
++
)
continue
;
{
String
sLong
=
pGroup
->
sLongNames
.
GetToken
(
j
,
STRING_DELIM
);
for
(
sal_uInt16
j
=
0
;
j
<
pGroup
->
nCount
;
j
++
)
if
((
rLongName
==
sLong
))
{
{
String
sLong
=
pGroup
->
sLongNames
.
GetToken
(
j
,
STRING_DELIM
);
TripleString
*
pTriple
=
new
TripleString
;
if
(
rLongName
!=
sLong
)
pTriple
->
sGroup
=
pGroup
->
sName
;
continue
;
pTriple
->
sBlock
=
sLong
;
pTriple
->
sShort
=
pGroup
->
sShortNames
.
GetToken
(
j
,
STRING_DELIM
);
TripleString
pTriple
;
aTripleStrings
.
Insert
(
pTriple
,
nFound
++
);
pTriple
.
sGroup
=
pGroup
->
sName
;
}
pTriple
.
sBlock
=
sLong
;
}
pTriple
.
sShort
=
pGroup
->
sShortNames
.
GetToken
(
j
,
STRING_DELIM
);
aTripleStrings
.
push_back
(
pTriple
);
++
nFound
;
}
}
}
sal_Bool
bRet
=
sal_False
;
sal_Bool
bRet
=
sal_False
;
nCount
=
aTripleStrings
.
Count
();
nCount
=
aTripleStrings
.
size
();
if
(
1
==
nCount
)
if
(
1
==
nCount
)
{
{
TripleString
*
pTriple
=
aTripleStrings
[
0
]
;
const
TripleString
&
pTriple
(
aTripleStrings
.
front
())
;
rShortName
=
pTriple
->
sShort
;
rShortName
=
pTriple
.
sShort
;
rGroupName
=
pTriple
->
sGroup
;
rGroupName
=
pTriple
.
sGroup
;
bRet
=
sal_True
;
bRet
=
sal_True
;
}
}
else
if
(
1
<
nCount
)
else
if
(
1
<
nCount
)
...
@@ -179,20 +167,20 @@ sal_Bool SwGlossaryList::GetShortName(const String& rLongName,
...
@@ -179,20 +167,20 @@ sal_Bool SwGlossaryList::GetShortName(const String& rLongName,
SwGlossDecideDlg
aDlg
(
0
);
SwGlossDecideDlg
aDlg
(
0
);
String
sTitle
=
aDlg
.
GetText
();
String
sTitle
=
aDlg
.
GetText
();
sTitle
+=
' '
;
sTitle
+=
' '
;
sTitle
+=
aTripleStrings
[
0
]
->
sBlock
;
sTitle
+=
aTripleStrings
.
front
().
sBlock
;
aDlg
.
SetText
(
sTitle
);
aDlg
.
SetText
(
sTitle
);
ListBox
&
rLB
=
aDlg
.
GetListBox
();
ListBox
&
rLB
=
aDlg
.
GetListBox
();
for
(
s
al_uInt16
i
=
0
;
i
<
nCount
;
i
++
)
for
(
s
td
::
vector
<
TripleString
>::
const_iterator
i
=
aTripleStrings
.
begin
();
i
!=
aTripleStrings
.
end
();
++
i
)
rLB
.
InsertEntry
(
aTripleStrings
[
i
]
->
sGroup
.
GetToken
(
0
,
GLOS_DELIM
));
rLB
.
InsertEntry
(
i
->
sGroup
.
GetToken
(
0
,
GLOS_DELIM
));
rLB
.
SelectEntryPos
(
0
);
rLB
.
SelectEntryPos
(
0
);
if
(
RET_OK
==
aDlg
.
Execute
()
&&
if
(
RET_OK
==
aDlg
.
Execute
()
&&
LISTBOX_ENTRY_NOTFOUND
!=
rLB
.
GetSelectEntryPos
())
LISTBOX_ENTRY_NOTFOUND
!=
rLB
.
GetSelectEntryPos
())
{
{
TripleString
*
pTriple
=
aTripleStrings
[
rLB
.
GetSelectEntryPos
()]
;
const
TripleString
&
pTriple
(
aTripleStrings
[
rLB
.
GetSelectEntryPos
()])
;
rShortName
=
pTriple
->
sShort
;
rShortName
=
pTriple
.
sShort
;
rGroupName
=
pTriple
->
sGroup
;
rGroupName
=
pTriple
.
sGroup
;
bRet
=
sal_True
;
bRet
=
sal_True
;
}
}
else
else
...
@@ -201,11 +189,6 @@ sal_Bool SwGlossaryList::GetShortName(const String& rLongName,
...
@@ -201,11 +189,6 @@ sal_Bool SwGlossaryList::GetShortName(const String& rLongName,
return
bRet
;
return
bRet
;
}
}
/********************************************************************
********************************************************************/
sal_uInt16
SwGlossaryList
::
GetGroupCount
()
sal_uInt16
SwGlossaryList
::
GetGroupCount
()
{
{
if
(
!
bFilled
)
if
(
!
bFilled
)
...
...
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