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
e80df0d5
Kaydet (Commit)
e80df0d5
authored
Tem 13, 2015
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
tdf#92639: Slashes are allowed in set member names, of course
Change-Id: I30944fe9611e83566c891a7d1461ad02979daddd
üst
888f51c7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
8 deletions
+9
-8
test.cxx
configmgr/qa/unit/test.cxx
+3
-2
access.cxx
configmgr/source/access.cxx
+6
-6
No files found.
configmgr/qa/unit/test.cxx
Dosyayı görüntüle @
e80df0d5
...
...
@@ -315,8 +315,9 @@ void Test::testInsertSetMember() {
}
catch
(
css
::
lang
::
IllegalArgumentException
&
)
{}
try
{
access
->
insertByName
(
"a/b"
,
css
::
uno
::
makeAny
(
member
));
CPPUNIT_FAIL
(
"expected IllegalArgumentException"
);
}
catch
(
css
::
lang
::
IllegalArgumentException
&
)
{}
}
catch
(
css
::
lang
::
IllegalArgumentException
&
)
{
CPPUNIT_FAIL
(
"unexpected IllegalArgumentException"
);
}
css
::
uno
::
Reference
<
css
::
util
::
XChangesBatch
>
(
access
,
css
::
uno
::
UNO_QUERY_THROW
)
->
commitChanges
();
css
::
uno
::
Reference
<
css
::
lang
::
XComponent
>
(
...
...
configmgr/source/access.cxx
Dosyayı görüntüle @
e80df0d5
...
...
@@ -109,12 +109,12 @@ namespace {
// Conservatively forbid what is either not an XML Char (including lone
// surrogates, even though they should not appear in well-formed UNO OUString
// instances anyway), or is a slash (as it causes problems in path syntax):
bool
isValidName
(
OUString
const
&
name
)
{
bool
isValidName
(
OUString
const
&
name
,
bool
setMember
)
{
for
(
sal_Int32
i
=
0
;
i
!=
name
.
getLength
();)
{
sal_uInt32
c
=
name
.
iterateCodePoints
(
&
i
);
if
((
c
<
0x20
&&
!
(
c
==
0x09
||
c
==
0x0A
||
c
==
0x0D
))
||
rtl
::
isHighSurrogate
(
c
)
||
rtl
::
isLowSurrogate
(
c
)
||
c
==
0xFFFE
||
c
==
0xFFFF
||
c
==
'/'
)
||
c
==
0xFFFF
||
(
!
setMember
&&
c
==
'/'
)
)
{
return
false
;
}
...
...
@@ -669,7 +669,7 @@ void Access::setName(OUString const & aName)
if
(
node
->
getMandatory
()
==
Data
::
NO_LAYER
&&
!
(
other
.
is
()
&&
other
->
isFinalized
()))
{
if
(
!
isValidName
(
aName
))
{
if
(
!
isValidName
(
aName
,
true
))
{
throw
css
::
uno
::
RuntimeException
(
"invalid element name "
+
aName
);
}
...
...
@@ -1188,7 +1188,7 @@ void Access::insertByName(
Modifications
localMods
;
switch
(
getNode
()
->
kind
())
{
case
Node
:
:
KIND_LOCALIZED_PROPERTY
:
if
(
!
isValidName
(
aName
))
{
if
(
!
isValidName
(
aName
,
false
))
{
throw
css
::
lang
::
IllegalArgumentException
(
aName
,
static_cast
<
cppu
::
OWeakObject
*>
(
this
),
0
);
}
...
...
@@ -1196,7 +1196,7 @@ void Access::insertByName(
break
;
case
Node
:
:
KIND_GROUP
:
{
if
(
!
isValidName
(
aName
))
{
if
(
!
isValidName
(
aName
,
false
))
{
throw
css
::
lang
::
IllegalArgumentException
(
aName
,
static_cast
<
cppu
::
OWeakObject
*>
(
this
),
0
);
}
...
...
@@ -1212,7 +1212,7 @@ void Access::insertByName(
break
;
case
Node
:
:
KIND_SET
:
{
if
(
!
isValidName
(
aName
))
{
if
(
!
isValidName
(
aName
,
true
))
{
throw
css
::
lang
::
IllegalArgumentException
(
aName
,
static_cast
<
cppu
::
OWeakObject
*>
(
this
),
0
);
}
...
...
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