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
68ef83db
Kaydet (Commit)
68ef83db
authored
Haz 20, 2011
tarafından
Bjoern Michaelsen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fix buildbreakers in oox, revert token changes for now
üst
b7882741
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
173 additions
and
84 deletions
+173
-84
Library_oox.mk
oox/Library_oox.mk
+1
-6
build.lst
oox/prj/build.lst
+2
-1
d.lst
oox/prj/d.lst
+4
-0
namespacemap.cxx
oox/source/token/namespacemap.cxx
+1
-1
namespaces.pl
oox/source/token/namespaces.pl
+79
-0
properties.pl
oox/source/token/properties.pl
+31
-21
propertynames.cxx
oox/source/token/propertynames.cxx
+2
-1
tokenmap.cxx
oox/source/token/tokenmap.cxx
+10
-12
tokens.pl
oox/source/token/tokens.pl
+43
-42
oox.component
oox/util/oox.component
+0
-0
No files found.
oox/Library_oox.mk
Dosyayı görüntüle @
68ef83db
...
...
@@ -36,7 +36,6 @@ $(eval $(call gb_Library_set_include,oox,\
-I$(OUTDIR)/inc \
-I$(OUTDIR)/inc/offuh \
-I$(realpath $(SRCDIR)/oox/inc) \
$(if $(filter YES,$(SYSTEM_OPENSSL)),$(filter -I%,$(OPENSSL_CFLAGS))) \
))
$(eval $(call gb_Library_add_defs,oox,\
...
...
@@ -62,11 +61,7 @@ $(eval $(call gb_Library_add_linked_libs,oox,\
$(gb_STDLIBS) \
))
$(call gb_Library_use_external,oox,openssl)
$(eval $(call gb_Library_add_ldflags,oox,\
$(if $(filter YES,$(SYSTEM_OPENSSL)),$(OPENSSL_LIBS)) \
))
$(eval $(call gb_Library_use_external,oox,openssl))
$(eval $(call gb_Library_set_componentfile,oox,oox/util/oox))
...
...
oox/prj/build.lst
Dosyayı görüntüle @
68ef83db
oox oox : cppu cppuhelper comphelper filter sal offapi sax basegfx svx xmlscript tools vcl unotools BOOST:boost OPENSSL:openssl LIBXSLT:libxslt NULL
oox oox\prj nmake - all oox_prj NULL
oox oox usr1 - all oox_mkout NULL
oox oox\prj nmake - all oox_prj NULL
oox/prj/d.lst
Dosyayı görüntüle @
68ef83db
..\source\token\tokens.txt %_DEST%\inc\oox\token\tokens.txt
\ No newline at end of file
oox/source/token/namespacemap.cxx
Dosyayı görüntüle @
68ef83db
...
...
@@ -37,7 +37,7 @@ NamespaceMap::NamespaceMap()
static
const
struct
NamespaceUrl
{
sal_Int32
mnId
;
const
sal_Char
*
mpcUrl
;
}
spNamespaceUrls
[]
=
{
// include auto-generated C array with namespace URLs as C strings
#include
<token/namespacenames.inc>
#include
"namespacenames.inc"
{
-
1
,
""
}
};
...
...
oox/source/token/namespaces.pl
0 → 100644
Dosyayı görüntüle @
68ef83db
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License version 3
# only, as published by the Free Software Foundation.
#
# OpenOffice.org is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License version 3 for more details
# (a copy is included in the LICENSE file that accompanied this code).
#
# You should have received a copy of the GNU Lesser General Public License
# version 3 along with OpenOffice.org. If not, see
# <http://www.openoffice.org/license.html>
# for a copy of the LGPLv3 License.
#
#*************************************************************************
$ARGV0
=
shift
@ARGV
;
$ARGV1
=
shift
@ARGV
;
$ARGV2
=
shift
@ARGV
;
$ARGV3
=
shift
@ARGV
;
# parse input file
open
(
INFILE
,
$ARGV0
)
or
die
"cannot open input file: $!"
;
my
%
namespaces
;
while
(
<
INFILE
>
)
{
# trim newline
chomp
(
$_
);
# trim leading/trailing whitespace
$_
=~
s/^\s*//g
;
$_
=~
s/\s*$//g
;
# trim comments
$_
=~
s/^#.*//
;
# skip empty lines
if
(
$_
)
{
# check for valid characters
$_
=~
/^([a-zA-Z]+)\s+([a-zA-Z0-9-.:\/]+)\s*$/
or
die
"Error: invalid character in input data"
;
$namespaces
{
$1
}
=
$2
;
}
}
close
(
INFILE
);
# generate output files
open
(
IDFILE
,
">$ARGV1"
)
or
die
"Error: cannot open output file: $!"
;
open
(
NAMEFILE
,
">$ARGV2"
)
or
die
"Error: cannot open output file: $!"
;
open
(
TXTFILE
,
">$ARGV3"
)
or
die
"Error: cannot open output file: $!"
;
# number of bits to shift the namespace identifier
$shift
=
16
;
print
(
IDFILE
"const size_t NMSP_SHIFT = $shift;\n"
);
$i
=
1
;
foreach
(
keys
(
%
namespaces
)
)
{
print
(
IDFILE
"const sal_Int32 NMSP_$_ = $i << NMSP_SHIFT;\n"
);
$id
=
$i
<<
$shift
;
print
(
NAMEFILE
"{ $id, \"$namespaces{$_}\" },\n"
);
print
(
TXTFILE
"$id $_ $namespaces{$_}\n"
);
++
$i
;
}
close
(
IDFILE
);
close
(
nameFILE
);
close
(
TXTFILE
);
oox/source/token/properties.pl
Dosyayı görüntüle @
68ef83db
...
...
@@ -25,33 +25,43 @@
#
#*************************************************************************
# operation mode (1 = identifiers, 2 = names)
$
op
=
shift
@ARGV
;
die
"Error: invalid operation"
unless
(
$op
>=
1
&&
$op
<=
2
)
;
$ARGV0
=
shift
@ARGV
;
$
ARGV1
=
shift
@ARGV
;
$ARGV2
=
shift
@ARGV
;
$i
=
0
;
while
(
<>
)
{
# parse input file
open
(
INFILE
,
$ARGV0
)
or
die
"Error: cannot open input file: $!"
;
my
%
props
;
while
(
<
INFILE
>
)
{
# trim newline
chomp
(
$_
);
# trim leading/trailing whitespace
$_
=~
s/^\s*//g
;
$_
=~
s/\s*$//g
;
# skip empty lines
if
(
$_
)
{
# check for valid characters
$_
=~
/^[A-Z][a-zA-Z0-9]+$/
or
die
"Error: invalid entry: '$_'"
;
# generate output
if
(
$op
==
1
)
{
print
(
"const sal_Int32 PROP_$_ = $i;\n"
);
}
elsif
(
$op
==
2
)
{
print
(
"/* $i */ \"$_\",\n"
);
}
++
$i
;
}
# check for valid characters
$_
=~
/^[A-Z][a-zA-Z0-9]*$/
or
die
"Error: invalid character in property '$_'"
;
$id
=
"PROP_$_"
;
$props
{
$_
}
=
$id
;
}
close
(
INFILE
);
# generate output files
open
(
IDFILE
,
">$ARGV1"
)
or
die
"Error: cannot open output file: $!"
;
open
(
NAMEFILE
,
">$ARGV2"
)
or
die
"Error: cannot open output file: $!"
;
if
(
$op
==
1
)
{
print
(
"const sal_Int32 PROP_COUNT = $i;\nconst sal_Int32 PROP_INVALID = -1;\n"
);
}
elsif
(
$op
==
2
)
{
print
(
" \"\"\n"
);
$i
=
0
;
foreach
(
sort
(
keys
(
%
props
)
)
)
{
print
(
IDFILE
"const sal_Int32 $props{$_} = $i;\n"
);
print
(
NAMEFILE
"/* $i */ \"$_\",\n"
);
++
$i
;
}
print
(
IDFILE
"const sal_Int32 PROP_COUNT = $i;\n"
);
print
(
IDFILE
"const sal_Int32 PROP_INVALID = -1;\n"
);
close
(
IDFILE
);
close
(
NAMEFILE
);
oox/source/token/propertynames.cxx
Dosyayı görüntüle @
68ef83db
...
...
@@ -37,7 +37,8 @@ PropertyNameVector::PropertyNameVector()
static
const
sal_Char
*
sppcPropertyNames
[]
=
{
// include auto-generated C array with property names as C strings
#include <token/propertynames.inc>
#include "propertynames.inc"
""
};
size_t
nArraySize
=
(
sizeof
(
sppcPropertyNames
)
/
sizeof
(
*
sppcPropertyNames
))
-
1
;
...
...
oox/source/token/tokenmap.cxx
Dosyayı görüntüle @
68ef83db
...
...
@@ -43,10 +43,8 @@ using ::rtl::OUString;
// ============================================================================
namespace
{
// include auto-generated Perfect_Hash class
#include <token/tokenhash.inc>
// include auto-generated Perfect_Hash
#include "tokenhash.inc"
}
// namespace
// ============================================================================
...
...
@@ -57,7 +55,7 @@ TokenMap::TokenMap() :
static
const
sal_Char
*
sppcTokenNames
[]
=
{
// include auto-generated C array with token names as C strings
#include
<token/tokennames.inc>
#include
"tokennames.inc"
""
};
...
...
@@ -70,14 +68,14 @@ TokenMap::TokenMap() :
}
#if OSL_DEBUG_LEVEL > 0
// check that the
Perfect_H
ash is in sync with the token name list
// check that the
perfect_h
ash is in sync with the token name list
bool
bOk
=
true
;
for
(
sal_Int32
nToken
=
0
;
bOk
&&
(
nToken
<
XML_TOKEN_COUNT
);
++
nToken
)
{
// check that the getIdentifier <-> getToken roundtrip works
OString
aUtf8Name
=
OUStringToOString
(
maTokenNames
[
nToken
].
maUniName
,
RTL_TEXTENCODING_UTF8
);
const
XMLTokenInfo
*
pTokenInfo
=
Perfect_Hash
::
getTokenInfo
(
aUtf8Name
.
getStr
(),
aUtf8Name
.
getLength
()
);
bOk
=
pToken
Info
&&
(
pTokenInfo
->
m
nToken
==
nToken
);
struct
xmltoken
*
pToken
=
Perfect_Hash
::
in_word_set
(
aUtf8Name
.
getStr
(),
aUtf8Name
.
getLength
()
);
bOk
=
pToken
&&
(
pToken
->
nToken
==
nToken
);
OSL_ENSURE
(
bOk
,
::
rtl
::
OStringBuffer
(
"TokenMap::TokenMap - token list broken, #"
).
append
(
nToken
).
append
(
", '"
).
append
(
aUtf8Name
).
append
(
'\''
).
getStr
()
);
}
...
...
@@ -98,8 +96,8 @@ OUString TokenMap::getUnicodeTokenName( sal_Int32 nToken ) const
sal_Int32
TokenMap
::
getTokenFromUnicode
(
const
OUString
&
rUnicodeName
)
const
{
OString
aUtf8Name
=
OUStringToOString
(
rUnicodeName
,
RTL_TEXTENCODING_UTF8
);
const
XMLTokenInfo
*
pTokenInfo
=
Perfect_Hash
::
getTokenInfo
(
aUtf8Name
.
getStr
(),
aUtf8Name
.
getLength
()
);
return
pToken
Info
?
pTokenInfo
->
m
nToken
:
XML_TOKEN_INVALID
;
struct
xmltoken
*
pToken
=
Perfect_Hash
::
in_word_set
(
aUtf8Name
.
getStr
(),
aUtf8Name
.
getLength
()
);
return
pToken
?
pToken
->
nToken
:
XML_TOKEN_INVALID
;
}
Sequence
<
sal_Int8
>
TokenMap
::
getUtf8TokenName
(
sal_Int32
nToken
)
const
...
...
@@ -111,9 +109,9 @@ Sequence< sal_Int8 > TokenMap::getUtf8TokenName( sal_Int32 nToken ) const
sal_Int32
TokenMap
::
getTokenFromUtf8
(
const
Sequence
<
sal_Int8
>&
rUtf8Name
)
const
{
const
XMLTokenInfo
*
pTokenInfo
=
Perfect_Hash
::
getTokenInfo
(
struct
xmltoken
*
pToken
=
Perfect_Hash
::
in_word_set
(
reinterpret_cast
<
const
char
*
>
(
rUtf8Name
.
getConstArray
()
),
rUtf8Name
.
getLength
()
);
return
pToken
Info
?
pTokenInfo
->
m
nToken
:
XML_TOKEN_INVALID
;
return
pToken
?
pToken
->
nToken
:
XML_TOKEN_INVALID
;
}
// ============================================================================
...
...
oox/source/token/tokens.pl
Dosyayı görüntüle @
68ef83db
...
...
@@ -25,55 +25,56 @@
#
#*************************************************************************
# operation mode (1 = identifiers, 2 = names, 3 = gperf)
$op
=
shift
@ARGV
;
die
"Error: invalid operation"
unless
(
$op
>=
1
&&
$op
<=
3
);
$ARGV0
=
shift
@ARGV
;
$ARGV1
=
shift
@ARGV
;
$ARGV2
=
shift
@ARGV
;
$ARGV3
=
shift
@ARGV
;
if
(
$op
==
3
)
{
print
(
"%language=C++\n"
);
print
(
"%define slot-name mpcName\n"
);
print
(
"%define initializer-suffix ,0\n"
);
print
(
"%define lookup-function-name getTokenInfo\n"
);
print
(
"%compare-strncmp\n"
);
print
(
"%readonly-tables\n"
);
print
(
"%enum\n"
);
print
(
"%null-strings\n"
);
print
(
"%struct-type\n"
);
print
(
"struct XMLTokenInfo {\n"
);
print
(
" const sal_Char* mpcName;\n"
);
print
(
" sal_Int32 mnToken;\n"
);
print
(
"};\n"
);
print
(
"%%\n"
);
}
$i
=
0
;
while
(
<>
)
open
(
INFILE
,
$ARGV0
)
or
die
"Error: cannot open input file: $!"
;
my
%
tokens
;
while
(
<
INFILE
>
)
{
# trim newline
chomp
(
$_
);
# trim leading/trailing whitespace
$_
=~
s/^\s*//g
;
$_
=~
s/\s*$//g
;
# skip empty lines
if
(
$_
)
{
# check for valid characters
$_
=~
/^[a-zA-Z0-9-_]+$/
or
die
"Error: invalid entry: '$_'"
;
# generate output
$id
=
"XML_$_"
;
$id
=~
s/-/_/g
;
if
(
$op
==
1
)
{
print
(
"const sal_Int32 $id = $i;\n"
);
}
elsif
(
$op
==
2
)
{
print
(
"\"$_\",\n"
);
}
elsif
(
$op
==
3
)
{
print
(
"$_,$id\n"
);
}
++
$i
;
}
# check for valid characters
$_
=~
/^[a-zA-Z0-9-_]+$/
or
die
"Error: invalid character in token '$_'"
;
$id
=
"XML_$_"
;
$id
=~
s/-/_/g
;
$tokens
{
$_
}
=
$id
;
}
close
(
INFILE
);
# generate output files
open
(
IDFILE
,
">$ARGV1"
)
or
die
"Error: cannot open output file: $!"
;
open
(
NAMEFILE
,
">$ARGV2"
)
or
die
"Error: cannot open output file: $!"
;
open
(
GPERFFILE
,
">$ARGV3"
)
or
die
"Error: cannot open output file: $!"
;
if
(
$op
==
1
)
{
print
(
"const sal_Int32 XML_TOKEN_COUNT = $i;\n"
);
}
elsif
(
$op
==
3
)
{
print
(
"%%\n"
);
print
(
GPERFFILE
"%language=C++\n"
);
print
(
GPERFFILE
"%global-table\n"
);
print
(
GPERFFILE
"%null-strings\n"
);
print
(
GPERFFILE
"%struct-type\n"
);
print
(
GPERFFILE
"struct xmltoken {\n"
);
print
(
GPERFFILE
" const sal_Char *name;\n"
);
print
(
GPERFFILE
" sal_Int32 nToken;\n"
);
print
(
GPERFFILE
"};\n"
);
print
(
GPERFFILE
"%%\n"
);
$i
=
0
;
foreach
(
sort
(
keys
(
%
tokens
)
)
)
{
print
(
IDFILE
"const sal_Int32 $tokens{$_} = $i;\n"
);
print
(
NAMEFILE
"\"$_\",\n"
);
print
(
GPERFFILE
"$_,$tokens{$_}\n"
);
++
$i
;
}
print
(
IDFILE
"const sal_Int32 XML_TOKEN_COUNT = $i;\n"
);
print
(
GPERFFILE
"%%\n"
);
close
(
IDFILE
);
close
(
NAMEFILE
);
close
(
GPERFFILE
);
oox/oox.component
→
oox/
util/
oox.component
Dosyayı görüntüle @
68ef83db
File moved
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