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
f41fe899
Kaydet (Commit)
f41fe899
authored
Kas 03, 2000
tarafından
Oliver Specht
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#76433# ::insertNewByName: throw exception on illegal group names
üst
badc95ea
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
3 deletions
+27
-3
unoatxt.cxx
sw/source/ui/uno/unoatxt.cxx
+27
-3
No files found.
sw/source/ui/uno/unoatxt.cxx
Dosyayı görüntüle @
f41fe899
...
@@ -2,9 +2,9 @@
...
@@ -2,9 +2,9 @@
*
*
* $RCSfile: unoatxt.cxx,v $
* $RCSfile: unoatxt.cxx,v $
*
*
* $Revision: 1.
2
$
* $Revision: 1.
3
$
*
*
* last change: $Author: os $ $Date: 2000-1
0-10 11:16:32
$
* last change: $Author: os $ $Date: 2000-1
1-03 09:43:54
$
*
*
* The Contents of this file are made available subject to the terms of
* The Contents of this file are made available subject to the terms of
* either of the following licenses
* either of the following licenses
...
@@ -124,6 +124,7 @@
...
@@ -124,6 +124,7 @@
using
namespace
::
com
::
sun
::
star
;
using
namespace
::
com
::
sun
::
star
;
using
namespace
::
com
::
sun
::
star
::
uno
;
using
namespace
::
com
::
sun
::
star
::
uno
;
using
namespace
::
com
::
sun
::
star
::
lang
;
using
namespace
::
rtl
;
using
namespace
::
rtl
;
...
@@ -295,12 +296,35 @@ sal_Bool SwXAutoTextContainer::hasByName(const OUString& Name)
...
@@ -295,12 +296,35 @@ sal_Bool SwXAutoTextContainer::hasByName(const OUString& Name)
/*-- 21.12.98 12:42:19---------------------------------------------------
/*-- 21.12.98 12:42:19---------------------------------------------------
-----------------------------------------------------------------------*/
-----------------------------------------------------------------------*/
Reference
<
text
::
XAutoTextGroup
>
SwXAutoTextContainer
::
insertNewByName
(
const
OUString
&
aGroupName
)
Reference
<
text
::
XAutoTextGroup
>
SwXAutoTextContainer
::
insertNewByName
(
const
OUString
&
aGroupName
)
throw
(
lang
::
IllegalArgumentException
,
container
::
ElementExistException
,
uno
::
RuntimeException
)
throw
(
lang
::
IllegalArgumentException
,
container
::
ElementExistException
,
uno
::
RuntimeException
)
{
{
::
vos
::
OGuard
aGuard
(
Application
::
GetSolarMutex
());
::
vos
::
OGuard
aGuard
(
Application
::
GetSolarMutex
());
if
(
hasByName
(
aGroupName
))
if
(
hasByName
(
aGroupName
))
throw
container
::
ElementExistException
();
throw
container
::
ElementExistException
();
//check for non-ASCII characters
if
(
!
aGroupName
.
getLength
())
{
IllegalArgumentException
aIllegal
;
aIllegal
.
Message
=
C2U
(
"group name must not be empty"
);
throw
aIllegal
;
}
for
(
sal_Int32
nPos
=
0
;
nPos
<
aGroupName
.
getLength
();
nPos
++
)
{
sal_Unicode
cChar
=
aGroupName
[
nPos
];
if
(
((
cChar
>=
'A'
)
&&
(
cChar
<=
'Z'
))
||
((
cChar
>=
'a'
)
&&
(
cChar
<=
'z'
))
||
((
cChar
>=
'0'
)
&&
(
cChar
<=
'9'
))
||
(
cChar
==
'_'
)
||
cChar
==
0x20
)
{
continue
;
}
IllegalArgumentException
aIllegal
;
aIllegal
.
Message
=
C2U
(
"group name must not contain non-ASCII characters"
);
throw
aIllegal
;
}
String
sGroup
(
aGroupName
);
String
sGroup
(
aGroupName
);
if
(
STRING_NOTFOUND
==
sGroup
.
Search
(
GLOS_DELIM
))
if
(
STRING_NOTFOUND
==
sGroup
.
Search
(
GLOS_DELIM
))
{
{
...
...
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