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
ef096038
Kaydet (Commit)
ef096038
authored
Agu 20, 2013
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
convert include/svtools/htmltokn.h from String to OUString
Change-Id: Idf7401e67fda69655860e7eb3d5c740d77d9e086
üst
ba39b8e7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
50 additions
and
53 deletions
+50
-53
htmltokn.h
include/svtools/htmltokn.h
+7
-5
htmlkywd.cxx
svtools/source/svhtml/htmlkywd.cxx
+43
-48
No files found.
include/svtools/htmltokn.h
Dosyayı görüntüle @
ef096038
...
...
@@ -24,19 +24,21 @@
#include <sal/types.h>
#include <tools/solar.h>
class
String
;
namespace
rtl
{
class
OUString
;
};
// suche das Char zu dem CharNamen
sal_Unicode
GetHTMLCharName
(
const
String
&
rName
);
sal_Unicode
GetHTMLCharName
(
const
rtl
::
OU
String
&
rName
);
// suche die TokenID zu dem Token
SVT_DLLPUBLIC
int
GetHTMLToken
(
const
String
&
rName
);
SVT_DLLPUBLIC
int
GetHTMLToken
(
const
rtl
::
OU
String
&
rName
);
// suche die TokenId zu einemm Attribut-Token
int
GetHTMLOption
(
const
String
&
rName
);
int
GetHTMLOption
(
const
rtl
::
OU
String
&
rName
);
// suche die 24-bit-Farbe zu einem Farbnamen (nicht gefunden = ULONG_MAX)
SVT_DLLPUBLIC
sal_uInt32
GetHTMLColor
(
const
String
&
rName
);
SVT_DLLPUBLIC
sal_uInt32
GetHTMLColor
(
const
rtl
::
OU
String
&
rName
);
// beginnen immer ab 256, groesser als ein char
const
int
HTML_TOKEN_START
=
0x100
;
...
...
svtools/source/svhtml/htmlkywd.cxx
Dosyayı görüntüle @
ef096038
...
...
@@ -33,7 +33,7 @@ struct HTML_TokenEntry
union
{
const
sal_Char
*
sToken
;
const
String
*
pUToken
;
const
OU
String
*
pUToken
;
};
int
nToken
;
};
...
...
@@ -194,24 +194,22 @@ extern "C"
static
int
SAL_CALL
HTMLKeyCompare
(
const
void
*
pFirst
,
const
void
*
pSecond
)
{
HTML_TokenEntry
*
pFirstEntry
=
(
HTML_TokenEntry
*
)
pFirst
;
HTML_TokenEntry
*
pSecondEntry
=
(
HTML_TokenEntry
*
)
pSecond
;
int
nRet
=
0
;
if
(
-
1
==
((
HTML_TokenEntry
*
)
pFirst
)
->
nToken
)
if
(
-
1
==
pFirstEntry
->
nToken
)
{
if
(
-
1
==
((
HTML_TokenEntry
*
)
pSecond
)
->
nToken
)
nRet
=
((
HTML_TokenEntry
*
)
pFirst
)
->
pUToken
->
CompareTo
(
*
((
HTML_TokenEntry
*
)
pSecond
)
->
pUToken
);
if
(
-
1
==
pSecondEntry
->
nToken
)
nRet
=
pFirstEntry
->
pUToken
->
compareTo
(
*
pSecondEntry
->
pUToken
);
else
nRet
=
((
HTML_TokenEntry
*
)
pFirst
)
->
pUToken
->
CompareToAscii
(
((
HTML_TokenEntry
*
)
pSecond
)
->
sToken
);
nRet
=
pFirstEntry
->
pUToken
->
compareToAscii
(
pSecondEntry
->
sToken
);
}
else
{
if
(
-
1
==
((
HTML_TokenEntry
*
)
pSecond
)
->
nToken
)
nRet
=
-
1
*
((
HTML_TokenEntry
*
)
pSecond
)
->
pUToken
->
CompareToAscii
(
((
HTML_TokenEntry
*
)
pFirst
)
->
sToken
);
if
(
-
1
==
pSecondEntry
->
nToken
)
nRet
=
-
1
*
pSecondEntry
->
pUToken
->
compareToAscii
(
pFirstEntry
->
sToken
);
else
nRet
=
strcmp
(
((
HTML_TokenEntry
*
)
pFirst
)
->
sToken
,
((
HTML_TokenEntry
*
)
pSecond
)
->
sToken
);
nRet
=
strcmp
(
pFirstEntry
->
sToken
,
pSecondEntry
->
sToken
);
}
return
nRet
;
...
...
@@ -219,7 +217,7 @@ static int SAL_CALL HTMLKeyCompare( const void *pFirst, const void *pSecond)
}
int
GetHTMLToken
(
const
String
&
rName
)
int
GetHTMLToken
(
const
OU
String
&
rName
)
{
if
(
!
bSortKeyWords
)
{
...
...
@@ -232,7 +230,7 @@ int GetHTMLToken( const String& rName )
int
nRet
=
0
;
if
(
!
rName
.
CompareToAscii
(
OOO_STRING_SVTOOLS_HTML_comment
,
3UL
)
)
if
(
!
rName
.
compareTo
(
OOO_STRING_SVTOOLS_HTML_comment
,
3
)
)
return
HTML_COMMENT
;
void
*
pFound
;
...
...
@@ -240,11 +238,12 @@ int GetHTMLToken( const String& rName )
aSrch
.
pUToken
=
&
rName
;
aSrch
.
nToken
=
-
1
;
if
(
0
!=
(
pFound
=
bsearch
(
(
sal_Char
*
)
&
aSrch
,
(
void
*
)
aHTMLTokenTab
,
sizeof
(
aHTMLTokenTab
)
/
sizeof
(
HTML_TokenEntry
),
sizeof
(
HTML_TokenEntry
),
HTMLKeyCompare
)))
pFound
=
bsearch
(
(
sal_Char
*
)
&
aSrch
,
(
void
*
)
aHTMLTokenTab
,
sizeof
(
aHTMLTokenTab
)
/
sizeof
(
HTML_TokenEntry
),
sizeof
(
HTML_TokenEntry
),
HTMLKeyCompare
);
if
(
0
!=
pFound
)
nRet
=
((
HTML_TokenEntry
*
)
pFound
)
->
nToken
;
return
nRet
;
}
...
...
@@ -254,7 +253,7 @@ struct HTML_CharEntry
union
{
const
sal_Char
*
sName
;
const
String
*
pUName
;
const
OU
String
*
pUName
;
};
sal_Unicode
cChar
;
};
...
...
@@ -540,32 +539,30 @@ extern "C"
static
int
SAL_CALL
HTMLCharNameCompare
(
const
void
*
pFirst
,
const
void
*
pSecond
)
{
HTML_CharEntry
*
pFirstEntry
=
(
HTML_CharEntry
*
)
pFirst
;
HTML_CharEntry
*
pSecondEntry
=
(
HTML_CharEntry
*
)
pSecond
;
int
nRet
=
0
;
if
(
USHRT_MAX
==
((
HTML_CharEntry
*
)
pFirst
)
->
cChar
)
if
(
USHRT_MAX
==
pFirstEntry
->
cChar
)
{
if
(
USHRT_MAX
==
((
HTML_CharEntry
*
)
pSecond
)
->
cChar
)
nRet
=
((
HTML_CharEntry
*
)
pFirst
)
->
pUName
->
CompareTo
(
*
((
HTML_CharEntry
*
)
pSecond
)
->
pUName
);
if
(
USHRT_MAX
==
pSecondEntry
->
cChar
)
nRet
=
pFirstEntry
->
pUName
->
compareTo
(
*
pSecondEntry
->
pUName
);
else
nRet
=
((
HTML_CharEntry
*
)
pFirst
)
->
pUName
->
CompareToAscii
(
((
HTML_CharEntry
*
)
pSecond
)
->
sName
);
nRet
=
pFirstEntry
->
pUName
->
compareToAscii
(
pSecondEntry
->
sName
);
}
else
{
if
(
USHRT_MAX
==
((
HTML_CharEntry
*
)
pSecond
)
->
cChar
)
nRet
=
-
1
*
((
HTML_CharEntry
*
)
pSecond
)
->
pUName
->
CompareToAscii
(
((
HTML_CharEntry
*
)
pFirst
)
->
sName
);
if
(
USHRT_MAX
==
pSecondEntry
->
cChar
)
nRet
=
-
1
*
pSecondEntry
->
pUName
->
compareToAscii
(
pFirstEntry
->
sName
);
else
nRet
=
strcmp
(
((
HTML_CharEntry
*
)
pFirst
)
->
sName
,
((
HTML_CharEntry
*
)
pSecond
)
->
sName
);
nRet
=
strcmp
(
pFirstEntry
->
sName
,
pSecondEntry
->
sName
);
}
return
nRet
;
}
}
}
// extern "C"
sal_Unicode
GetHTMLCharName
(
const
String
&
rName
)
sal_Unicode
GetHTMLCharName
(
const
OU
String
&
rName
)
{
if
(
!
bSortCharKeyWords
)
{
...
...
@@ -796,7 +793,7 @@ static HTML_TokenEntry aHTMLOptionTab[] = {
{{
OOO_STRING_SVTOOLS_HTML_O_units
},
HTML_O_UNITS
}
};
int
GetHTMLOption
(
const
String
&
rName
)
int
GetHTMLOption
(
const
OU
String
&
rName
)
{
if
(
!
bSortOptionKeyWords
)
{
...
...
@@ -828,7 +825,7 @@ struct HTML_ColorEntry
union
{
const
sal_Char
*
sName
;
const
String
*
pUName
;
const
OU
String
*
pUName
;
};
sal_uInt32
nColor
;
};
...
...
@@ -989,32 +986,30 @@ extern "C"
static
int
SAL_CALL
HTMLColorNameCompare
(
const
void
*
pFirst
,
const
void
*
pSecond
)
{
HTML_ColorEntry
*
pFirstEntry
=
(
HTML_ColorEntry
*
)
pFirst
;
HTML_ColorEntry
*
pSecondEntry
=
(
HTML_ColorEntry
*
)
pSecond
;
int
nRet
=
0
;
if
(
HTML_NO_COLOR
==
((
HTML_ColorEntry
*
)
pFirst
)
->
nColor
)
if
(
HTML_NO_COLOR
==
pFirstEntry
->
nColor
)
{
if
(
HTML_NO_COLOR
==
((
HTML_ColorEntry
*
)
pSecond
)
->
nColor
)
nRet
=
((
HTML_ColorEntry
*
)
pFirst
)
->
pUName
->
CompareTo
(
*
((
HTML_ColorEntry
*
)
pSecond
)
->
pUName
);
if
(
HTML_NO_COLOR
==
pSecondEntry
->
nColor
)
nRet
=
pFirstEntry
->
pUName
->
compareTo
(
*
pSecondEntry
->
pUName
);
else
nRet
=
((
HTML_ColorEntry
*
)
pFirst
)
->
pUName
->
CompareToAscii
(
((
HTML_ColorEntry
*
)
pSecond
)
->
sName
);
nRet
=
pFirstEntry
->
pUName
->
compareToAscii
(
pSecondEntry
->
sName
);
}
else
{
if
(
HTML_NO_COLOR
==
((
HTML_ColorEntry
*
)
pSecond
)
->
nColor
)
nRet
=
-
1
*
((
HTML_ColorEntry
*
)
pSecond
)
->
pUName
->
CompareToAscii
(
((
HTML_ColorEntry
*
)
pFirst
)
->
sName
);
if
(
HTML_NO_COLOR
==
pSecondEntry
->
nColor
)
nRet
=
-
1
*
pSecondEntry
->
pUName
->
compareToAscii
(
pFirstEntry
->
sName
);
else
nRet
=
strcmp
(
((
HTML_ColorEntry
*
)
pFirst
)
->
sName
,
((
HTML_ColorEntry
*
)
pSecond
)
->
sName
);
nRet
=
strcmp
(
pFirstEntry
->
sName
,
pSecondEntry
->
sName
);
}
return
nRet
;
}
}
}
// extern "C"
sal_uInt32
GetHTMLColor
(
const
String
&
rName
)
sal_uInt32
GetHTMLColor
(
const
OU
String
&
rName
)
{
if
(
!
bSortColorKeyWords
)
{
...
...
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