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
e31496c9
Kaydet (Commit)
e31496c9
authored
Eki 21, 2011
tarafından
Michael Meeks
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
misc trivial tweaks, and documentation addition
üst
034350a5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
35 additions
and
23 deletions
+35
-23
Module_basic.mk
basic/Module_basic.mk
+1
-1
test_scanner.cxx
basic/qa/cppunit/test_scanner.cxx
+7
-15
scanner.cxx
basic/source/comp/scanner.cxx
+5
-5
token.cxx
basic/source/comp/token.cxx
+2
-2
ustring.hxx
sal/inc/rtl/ustring.hxx
+20
-0
No files found.
basic/Module_basic.mk
Dosyayı görüntüle @
e31496c9
...
...
@@ -39,6 +39,6 @@ $(eval $(call gb_Module_add_targets,basic,\
$(eval $(call gb_Module_add_check_targets,basic,\
CppunitTest_basic_scanner \
))
))
# vim: set noet sw=4 ts=4:
basic/qa/cppunit/test_scanner.cxx
Dosyayı görüntüle @
e31496c9
...
...
@@ -36,7 +36,7 @@ namespace
void
testGoto
();
void
testExclamation
();
void
testNumbers
();
// Adds code needed to register the test suite
CPPUNIT_TEST_SUITE
(
ScannerTest
);
...
...
@@ -51,14 +51,6 @@ namespace
// End of test suite definition
CPPUNIT_TEST_SUITE_END
();
public
:
void
setUp
()
{
}
void
tearDown
()
{
}
};
const
static
rtl
::
OUString
cr
(
RTL_CONSTASCII_USTRINGPARAM
(
"
\n
"
));
...
...
@@ -309,7 +301,7 @@ namespace
CPPUNIT_ASSERT
(
symbols
[
1
].
type
==
SbxVARIANT
);
CPPUNIT_ASSERT
(
symbols
[
2
].
text
==
cr
);
CPPUNIT_ASSERT
(
symbols
[
2
].
type
==
SbxVARIANT
);
symbols
=
getSymbols
(
source10
);
CPPUNIT_ASSERT
(
symbols
.
size
()
==
8
);
CPPUNIT_ASSERT
(
symbols
[
0
].
text
==
cr
);
...
...
@@ -405,7 +397,7 @@ namespace
CPPUNIT_ASSERT
(
symbols
[
0
].
type
==
SbxVARIANT
);
CPPUNIT_ASSERT
(
symbols
[
1
].
text
==
rem
);
CPPUNIT_ASSERT
(
symbols
[
1
].
type
==
SbxVARIANT
);
symbols
=
getSymbols
(
source7
);
CPPUNIT_ASSERT
(
symbols
.
size
()
==
4
);
CPPUNIT_ASSERT
(
symbols
[
0
].
text
==
rem
);
...
...
@@ -471,7 +463,7 @@ namespace
CPPUNIT_ASSERT
(
symbols
[
0
].
text
==
asdf
);
CPPUNIT_ASSERT
(
symbols
[
1
].
text
==
excl
);
CPPUNIT_ASSERT
(
symbols
[
2
].
text
==
asdf
);
CPPUNIT_ASSERT
(
symbols
[
3
].
text
==
cr
);
CPPUNIT_ASSERT
(
symbols
[
3
].
text
==
cr
);
symbols
=
getSymbols
(
source2
);
CPPUNIT_ASSERT
(
symbols
.
size
()
==
3
);
...
...
@@ -497,7 +489,7 @@ namespace
CPPUNIT_ASSERT
(
symbols
[
0
].
text
==
excl
);
CPPUNIT_ASSERT
(
symbols
[
1
].
text
==
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"%"
)));
CPPUNIT_ASSERT
(
symbols
[
2
].
text
==
cr
);
symbols
=
getSymbols
(
source6
);
CPPUNIT_ASSERT
(
symbols
.
size
()
==
2
);
CPPUNIT_ASSERT
(
symbols
[
0
].
text
==
excl
);
...
...
@@ -523,12 +515,12 @@ namespace
CPPUNIT_ASSERT
(
symbols
.
size
()
==
2
);
CPPUNIT_ASSERT
(
symbols
[
0
].
number
==
12345
);
CPPUNIT_ASSERT
(
symbols
[
1
].
text
==
cr
);
symbols
=
getSymbols
(
source2
);
CPPUNIT_ASSERT
(
symbols
.
size
()
==
2
);
CPPUNIT_ASSERT
(
symbols
[
0
].
number
==
1.23
);
CPPUNIT_ASSERT
(
symbols
[
1
].
text
==
cr
);
symbols
=
getSymbols
(
source3
);
CPPUNIT_ASSERT
(
symbols
.
size
()
==
2
);
CPPUNIT_ASSERT
(
symbols
[
0
].
number
=
123.4
);
...
...
basic/source/comp/scanner.cxx
Dosyayı görüntüle @
e31496c9
...
...
@@ -391,7 +391,7 @@ sal_Bool SbiScanner::NextSym()
break
;
default
:
// treated as an operator
pLine
--
;
nCol
--
;
nCol1
=
nCol
-
1
;
pLine
--
;
nCol
--
;
nCol1
=
nCol
-
1
;
aSym
=
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"&"
));
return
SYMBOL
;
}
...
...
@@ -459,14 +459,14 @@ sal_Bool SbiScanner::NextSym()
// get out duplicate string delimiters
String
s
(
cSep
);
s
+=
cSep
;
sal_
uInt16
nIdx
=
0
;
sal_
Int32
nIdx
=
0
;
do
{
nIdx
=
aSym
.
indexOf
(
s
,
nIdx
);
if
(
nIdx
==
STRING_NOTFOUND
)
if
(
nIdx
<
0
)
break
;
::
rtl
::
OUStringBuffer
aSymBuf
(
aSym
);
aSymBuf
.
remove
(
nIdx
,
1
);
::
rtl
::
OUStringBuffer
aSymBuf
(
aSym
);
aSymBuf
.
remove
(
nIdx
,
1
);
aSym
=
aSymBuf
.
makeStringAndClear
();
nIdx
++
;
}
...
...
basic/source/comp/token.cxx
Dosyayı görüntüle @
e31496c9
...
...
@@ -291,10 +291,10 @@ const ::rtl::OUString& SbiTokenizer::Symbol( SbiToken t )
}
switch
(
t
)
{
case
NEG
:
case
NEG
:
aSym
=
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"-"
));
return
aSym
;
case
EOS
:
case
EOS
:
aSym
=
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
":/CRLF"
));
return
aSym
;
case
EOLN
:
...
...
sal/inc/rtl/ustring.hxx
Dosyayı görüntüle @
e31496c9
...
...
@@ -343,6 +343,8 @@ public:
@return 0 - if both strings are equal
< 0 - if this string is less than the string argument
> 0 - if this string is greater than the string argument
@since UDK 3.2.7
*/
sal_Int32
compareTo
(
const
OUString
&
str
,
sal_Int32
maxLength
)
const
SAL_THROW
(())
{
...
...
@@ -598,6 +600,24 @@ public:
return
rtl_ustr_ascii_compareIgnoreAsciiCase_WithLength
(
pData
->
buffer
,
pData
->
length
,
asciiStr
)
==
0
;
}
/**
Compares two ASCII strings ignoring case
The comparison is based on the numeric value of each character in
the strings and return a value indicating their relationship.
Since this method is optimized for performance, the ASCII character
values are not converted in any way. The caller has to make sure that
all ASCII characters are in the allowed range between 0 and
127. The ASCII string must be NULL-terminated.
This function can't be used for language specific sorting.
@param asciiStr the 8-Bit ASCII character string to be compared.
@return 0 - if both strings are equal
< 0 - if this string is less than the string argument
> 0 - if this string is greater than the string argument
@since LibreOffice 3.5
*/
sal_Int32
compareToIgnoreAsciiCaseAscii
(
const
sal_Char
*
asciiStr
)
const
SAL_THROW
(())
{
return
rtl_ustr_ascii_compareIgnoreAsciiCase_WithLength
(
pData
->
buffer
,
pData
->
length
,
asciiStr
);
...
...
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