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
757a17a3
Kaydet (Commit)
757a17a3
authored
Ock 21, 2012
tarafından
Michael Stahl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
SwGlossaryGroupDlg: String to OUString
üst
53526098
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
21 deletions
+27
-21
glosbib.hxx
sw/source/ui/inc/glosbib.hxx
+4
-3
glosbib.cxx
sw/source/ui/misc/glosbib.cxx
+23
-18
No files found.
sw/source/ui/inc/glosbib.hxx
Dosyayı görüntüle @
757a17a3
...
@@ -83,9 +83,10 @@ class SwGlossaryGroupDlg : public SvxStandardDialog
...
@@ -83,9 +83,10 @@ class SwGlossaryGroupDlg : public SvxStandardDialog
PushButton
aDelPB
;
PushButton
aDelPB
;
PushButton
aRenamePB
;
PushButton
aRenamePB
;
std
::
vector
<
String
>
m_RemovedArr
;
typedef
std
::
vector
<
::
rtl
::
OUString
>
OUVector_t
;
std
::
vector
<
String
>
m_InsertedArr
;
OUVector_t
m_RemovedArr
;
std
::
vector
<
String
>
m_RenamedArr
;
OUVector_t
m_InsertedArr
;
OUVector_t
m_RenamedArr
;
SwGlossaryHdl
*
pGlosHdl
;
SwGlossaryHdl
*
pGlosHdl
;
...
...
sw/source/ui/misc/glosbib.cxx
Dosyayı görüntüle @
757a17a3
...
@@ -30,6 +30,7 @@
...
@@ -30,6 +30,7 @@
#undef SW_DLLIMPLEMENTATION
#undef SW_DLLIMPLEMENTATION
#endif
#endif
#include <comphelper/string.hxx>
#include <tools/urlobj.hxx>
#include <tools/urlobj.hxx>
#include <tools/stream.hxx>
#include <tools/stream.hxx>
#include <vcl/msgbox.hxx>
#include <vcl/msgbox.hxx>
...
@@ -147,10 +148,11 @@ void SwGlossaryGroupDlg::Apply()
...
@@ -147,10 +148,11 @@ void SwGlossaryGroupDlg::Apply()
if
(
!
m_RemovedArr
.
empty
())
if
(
!
m_RemovedArr
.
empty
())
{
{
for
(
std
::
vector
<
String
>
::
const_iterator
it
(
m_RemovedArr
.
begin
());
for
(
OUVector_t
::
const_iterator
it
(
m_RemovedArr
.
begin
());
it
!=
m_RemovedArr
.
end
();
++
it
)
it
!=
m_RemovedArr
.
end
();
++
it
)
{
{
const
String
sDelGroup
=
it
->
GetToken
(
0
,
'\t'
);
const
String
sDelGroup
=
::
comphelper
::
string
::
getToken
(
*
it
,
0
,
'\t'
);
if
(
sDelGroup
==
aActGroup
)
if
(
sDelGroup
==
aActGroup
)
{
{
//when the current group is deleted, the current group has to be relocated
//when the current group is deleted, the current group has to be relocated
...
@@ -162,7 +164,7 @@ void SwGlossaryGroupDlg::Apply()
...
@@ -162,7 +164,7 @@ void SwGlossaryGroupDlg::Apply()
}
}
}
}
String
sMsg
(
SW_RES
(
STR_QUERY_DELETE_GROUP1
));
String
sMsg
(
SW_RES
(
STR_QUERY_DELETE_GROUP1
));
String
sTitle
(
it
->
GetToken
(
1
,
'\t'
)
);
String
sTitle
(
::
comphelper
::
string
::
getToken
(
*
it
,
1
,
'\t'
)
);
if
(
sTitle
.
Len
())
if
(
sTitle
.
Len
())
sMsg
+=
sTitle
;
sMsg
+=
sTitle
;
else
else
...
@@ -177,13 +179,15 @@ void SwGlossaryGroupDlg::Apply()
...
@@ -177,13 +179,15 @@ void SwGlossaryGroupDlg::Apply()
//don't rename before there was one
//don't rename before there was one
if
(
!
m_RenamedArr
.
empty
())
if
(
!
m_RenamedArr
.
empty
())
{
{
for
(
std
::
vector
<
String
>
::
const_iterator
it
(
m_RenamedArr
.
begin
());
for
(
OUVector_t
::
const_iterator
it
(
m_RenamedArr
.
begin
());
it
!=
m_RenamedArr
.
end
();
++
it
)
it
!=
m_RenamedArr
.
end
();
++
it
)
{
{
xub_StrLen
nStrSttPos
=
0
;
::
rtl
::
OUString
const
sOld
(
String
sOld
(
it
->
GetToken
(
0
,
RENAME_TOKEN_DELIM
,
nStrSttPos
)
);
::
comphelper
::
string
::
getToken
(
*
it
,
0
,
RENAME_TOKEN_DELIM
));
String
sNew
(
it
->
GetToken
(
0
,
RENAME_TOKEN_DELIM
,
nStrSttPos
)
);
String
sNew
(
String
sTitle
(
it
->
GetToken
(
0
,
RENAME_TOKEN_DELIM
,
nStrSttPos
)
);
::
comphelper
::
string
::
getToken
(
*
it
,
1
,
RENAME_TOKEN_DELIM
));
::
rtl
::
OUString
const
sTitle
(
::
comphelper
::
string
::
getToken
(
*
it
,
2
,
RENAME_TOKEN_DELIM
));
pGlosHdl
->
RenameGroup
(
sOld
,
sNew
,
sTitle
);
pGlosHdl
->
RenameGroup
(
sOld
,
sNew
,
sTitle
);
if
(
it
==
m_RenamedArr
.
begin
())
if
(
it
==
m_RenamedArr
.
begin
())
{
{
...
@@ -193,7 +197,7 @@ void SwGlossaryGroupDlg::Apply()
...
@@ -193,7 +197,7 @@ void SwGlossaryGroupDlg::Apply()
}
}
if
(
!
m_InsertedArr
.
empty
())
if
(
!
m_InsertedArr
.
empty
())
{
{
for
(
std
::
vector
<
String
>
::
const_iterator
it
(
m_InsertedArr
.
begin
());
for
(
OUVector_t
::
const_iterator
it
(
m_InsertedArr
.
begin
());
it
!=
m_InsertedArr
.
end
();
++
it
)
it
!=
m_InsertedArr
.
end
();
++
it
)
{
{
String
sNewGroup
=
*
it
;
String
sNewGroup
=
*
it
;
...
@@ -265,15 +269,15 @@ IMPL_LINK( SwGlossaryGroupDlg, DeleteHdl, Button*, pButton )
...
@@ -265,15 +269,15 @@ IMPL_LINK( SwGlossaryGroupDlg, DeleteHdl, Button*, pButton )
return
0
;
return
0
;
}
}
GlosBibUserData
*
pUserData
=
(
GlosBibUserData
*
)
pEntry
->
GetUserData
();
GlosBibUserData
*
pUserData
=
(
GlosBibUserData
*
)
pEntry
->
GetUserData
();
String
sEntry
(
pUserData
->
sGroupName
);
::
rtl
::
OUString
const
sEntry
(
pUserData
->
sGroupName
);
// if the name to be deleted is among the new ones - get rid of it
// if the name to be deleted is among the new ones - get rid of it
sal_Bool
bDelete
=
sal_True
;
sal_Bool
bDelete
=
sal_True
;
if
(
!
m_InsertedArr
.
empty
())
if
(
!
m_InsertedArr
.
empty
())
{
{
for
(
std
::
vector
<
String
>
::
iterator
it
(
m_InsertedArr
.
begin
());
for
(
OUVector_t
::
iterator
it
(
m_InsertedArr
.
begin
());
it
!=
m_InsertedArr
.
end
();
++
it
)
it
!=
m_InsertedArr
.
end
();
++
it
)
{
{
if
(
*
it
==
sEntry
)
if
(
*
it
==
sEntry
)
{
{
m_InsertedArr
.
erase
(
it
);
m_InsertedArr
.
erase
(
it
);
bDelete
=
sal_False
;
bDelete
=
sal_False
;
...
@@ -287,10 +291,11 @@ IMPL_LINK( SwGlossaryGroupDlg, DeleteHdl, Button*, pButton )
...
@@ -287,10 +291,11 @@ IMPL_LINK( SwGlossaryGroupDlg, DeleteHdl, Button*, pButton )
{
{
if
(
!
m_RenamedArr
.
empty
())
if
(
!
m_RenamedArr
.
empty
())
{
{
for
(
std
::
vector
<
String
>
::
iterator
it
(
m_RenamedArr
.
begin
());
for
(
OUVector_t
::
iterator
it
(
m_RenamedArr
.
begin
());
it
!=
m_RenamedArr
.
end
();
++
it
)
it
!=
m_RenamedArr
.
end
();
++
it
)
{
{
if
(
it
->
GetToken
(
0
,
RENAME_TOKEN_DELIM
)
==
sEntry
)
if
(
::
comphelper
::
string
::
getToken
(
*
it
,
0
,
RENAME_TOKEN_DELIM
)
==
sEntry
)
{
{
m_RenamedArr
.
erase
(
it
);
m_RenamedArr
.
erase
(
it
);
bDelete
=
sal_False
;
bDelete
=
sal_False
;
...
@@ -333,10 +338,10 @@ IMPL_LINK( SwGlossaryGroupDlg, RenameHdl, Button *, EMPTYARG )
...
@@ -333,10 +338,10 @@ IMPL_LINK( SwGlossaryGroupDlg, RenameHdl, Button *, EMPTYARG )
sal_Bool
bDone
=
sal_False
;
sal_Bool
bDone
=
sal_False
;
if
(
!
m_InsertedArr
.
empty
())
if
(
!
m_InsertedArr
.
empty
())
{
{
for
(
std
::
vector
<
String
>
::
iterator
it
(
m_InsertedArr
.
begin
());
for
(
OUVector_t
::
iterator
it
(
m_InsertedArr
.
begin
());
it
!=
m_InsertedArr
.
end
();
++
it
)
it
!=
m_InsertedArr
.
end
();
++
it
)
{
{
if
(
*
it
==
sEntry
)
if
(
String
(
*
it
)
==
sEntry
)
{
{
m_InsertedArr
.
erase
(
it
);
m_InsertedArr
.
erase
(
it
);
m_InsertedArr
.
push_back
(
sNewName
);
m_InsertedArr
.
push_back
(
sNewName
);
...
@@ -435,10 +440,10 @@ sal_Bool SwGlossaryGroupDlg::IsDeleteAllowed(const String &rGroup)
...
@@ -435,10 +440,10 @@ sal_Bool SwGlossaryGroupDlg::IsDeleteAllowed(const String &rGroup)
if
(
!
m_InsertedArr
.
empty
())
if
(
!
m_InsertedArr
.
empty
())
{
{
for
(
std
::
vector
<
String
>
::
const_iterator
it
(
m_InsertedArr
.
begin
());
for
(
OUVector_t
::
const_iterator
it
(
m_InsertedArr
.
begin
());
it
!=
m_InsertedArr
.
end
();
++
it
)
it
!=
m_InsertedArr
.
end
();
++
it
)
{
{
if
(
*
it
==
rGroup
)
if
(
String
(
*
it
)
==
rGroup
)
{
{
bDel
=
sal_True
;
bDel
=
sal_True
;
break
;
break
;
...
...
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