Author: damjan
Date: Thu Feb 25 18:47:29 2016
New Revision: 1732340
URL: http://svn.apache.org/viewvc?rev=1732340&view=rev
Log:
Merge r1409462 from branches/gbuild:
[mq]: oox_gmake.patch
Also fixed the paths to oox.component.
BUILDS
Build updated by: me
Modified:
openoffice/branches/gbuild-reintegration/ (props changed)
openoffice/branches/gbuild-reintegration/main/Module_ooo.mk
openoffice/branches/gbuild-reintegration/main/Repository.mk
openoffice/branches/gbuild-reintegration/main/RepositoryFixes.mk
openoffice/branches/gbuild-reintegration/main/oox/Library_oox.mk
openoffice/branches/gbuild-reintegration/main/oox/prj/build.lst
openoffice/branches/gbuild-reintegration/main/oox/prj/d.lst
openoffice/branches/gbuild-reintegration/main/oox/source/token/namespacemap.cxx
openoffice/branches/gbuild-reintegration/main/oox/source/token/namespaces.pl
openoffice/branches/gbuild-reintegration/main/oox/source/token/properties.pl
openoffice/branches/gbuild-reintegration/main/oox/source/token/propertynames.cxx
openoffice/branches/gbuild-reintegration/main/oox/source/token/tokenmap.cxx
openoffice/branches/gbuild-reintegration/main/oox/source/token/tokens.pl
openoffice/branches/gbuild-reintegration/main/postprocess/packcomponents/makefile.mk
openoffice/branches/gbuild-reintegration/main/solenv/gbuild/gbuild.mk
Propchange: openoffice/branches/gbuild-reintegration/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Feb 25 18:47:29 2016
@@ -1,4 +1,4 @@
-/incubator/ooo/branches/gbuild:1409313-1409425,1409427-1409428,1409430,1409432-1409436,1409438,1409440,1409442,1409444-1409446,1409452,1409454,1409457,1409459-1409460,1409470
+/incubator/ooo/branches/gbuild:1409313-1409425,1409427-1409428,1409430,1409432-1409436,1409438,1409440,1409442,1409444-1409446,1409452,1409454,1409457,1409459-1409460,1409462,1409470
/openoffice/branches/AOO400:1503684
/openoffice/branches/AOO410:1572480,1573601,1583349,1583635,1583666
/openoffice/branches/alg_writerframes:1556289-1579189
Modified: openoffice/branches/gbuild-reintegration/main/Module_ooo.mk
URL:
http://svn.apache.org/viewvc/openoffice/branches/gbuild-reintegration/main/Module_ooo.mk?rev=1732340&r1=1732339&r2=1732340&view=diff
==============================================================================
--- openoffice/branches/gbuild-reintegration/main/Module_ooo.mk (original)
+++ openoffice/branches/gbuild-reintegration/main/Module_ooo.mk Thu Feb 25
18:47:29 2016
@@ -30,6 +30,7 @@ $(eval $(call gb_Module_add_moduledirs,o
framework \
offapi \
oovbaapi \
+ oox \
padmin \
sfx2 \
sot \
Modified: openoffice/branches/gbuild-reintegration/main/Repository.mk
URL:
http://svn.apache.org/viewvc/openoffice/branches/gbuild-reintegration/main/Repository.mk?rev=1732340&r1=1732339&r2=1732340&view=diff
==============================================================================
--- openoffice/branches/gbuild-reintegration/main/Repository.mk (original)
+++ openoffice/branches/gbuild-reintegration/main/Repository.mk Thu Feb 25
18:47:29 2016
@@ -149,4 +149,23 @@ $(eval $(call gb_Helper_register_static_
vclmain \
))
+ifeq ($(OS),WNT)
+$(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO, \
+ crypto \
+ ssl \
+))
+else
+$(eval $(call gb_Helper_register_static_libraries,PLAINLIBS, \
+ crypto \
+ ssl \
+))
+endif
+
+ifeq ($(SYSTEM_OPENSSL),YES)
+$(eval $(call gb_Helper_register_libraries,PLAINLIBS_NONE, \
+ crypto \
+ ssl \
+))
+endif
+
# vim: set noet sw=4 ts=4:
Modified: openoffice/branches/gbuild-reintegration/main/RepositoryFixes.mk
URL:
http://svn.apache.org/viewvc/openoffice/branches/gbuild-reintegration/main/RepositoryFixes.mk?rev=1732340&r1=1732339&r2=1732340&view=diff
==============================================================================
--- openoffice/branches/gbuild-reintegration/main/RepositoryFixes.mk (original)
+++ openoffice/branches/gbuild-reintegration/main/RepositoryFixes.mk Thu Feb 25
18:47:29 2016
@@ -69,6 +69,8 @@ gb_Library_FILENAMES := $(patsubst svt:i
gb_Library_FILENAMES := $(patsubst tl:itl%,tl:itools%,$(gb_Library_FILENAMES))
gb_Library_FILENAMES := $(patsubst
vbahelper:ivbahelper%,vbahelper:vbahelper%,$(gb_Library_FILENAMES))
gb_Library_FILENAMES := $(patsubst
vos3:ivos3%,vos3:ivos%,$(gb_Library_FILENAMES))
+gb_Library_FILENAMES := $(patsubst
crypto:icrypto%,crypto:crypto%,$(gb_Library_FILENAMES))
+gb_Library_FILENAMES := $(patsubst ssl:issl%,ssl:ssl%,$(gb_Library_FILENAMES))
gb_Library_FILENAMES := $(patsubst
xml2:ixml2%,xml2:libxml2$(gb_Library_IARCEXT),$(gb_Library_FILENAMES))
gb_Library_FILENAMES := $(patsubst
xslt:ixslt%,xslt:libxslt.dll$(gb_Library_IARCEXT),$(gb_Library_FILENAMES))
gb_Library_FILENAMES := $(patsubst
rdf:irdf%,rdf:librdf.dll$(gb_Library_IARCEXT),$(gb_Library_FILENAMES))
@@ -113,6 +115,8 @@ gb_Library_FILENAMES := $(patsubst svt:i
gb_Library_FILENAMES := $(patsubst tl:itl%,tl:itools%,$(gb_Library_FILENAMES))
gb_Library_FILENAMES := $(patsubst
vbahelper:ivbahelper%,vbahelper:vbahelper%,$(gb_Library_FILENAMES))
gb_Library_FILENAMES := $(patsubst
vos3:ivos3%,vos3:ivos%,$(gb_Library_FILENAMES))
+gb_Library_FILENAMES := $(patsubst
crypto:icrypto%,crypto:libeay32%,$(gb_Library_FILENAMES))
+gb_Library_FILENAMES := $(patsubst
ssl:issl%,ssl:ssleay32%,$(gb_Library_FILENAMES))
gb_Library_FILENAMES := $(patsubst
xml2:ixml2%,xml2:libxml2%,$(gb_Library_FILENAMES))
gb_Library_FILENAMES := $(patsubst
xslt:ixslt%,xslt:libxslt%,$(gb_Library_FILENAMES))
gb_Library_FILENAMES := $(patsubst
rdf:irdf%,rdf:librdf%,$(gb_Library_FILENAMES))
@@ -236,6 +240,13 @@ endif
gb_Library_TARGETS := $(filter-out stl,$(gb_Library_TARGETS))
+ifeq ($(SYSTEM_OPENSSL),YES)
+gb_StaticLibrary_TARGETS := $(filter-out crypto,$(gb_StaticLibrary_TARGETS))
+gb_StaticLibrary_TARGETS := $(filter-out ssl,$(gb_StaticLibrary_TARGETS))
+gb_Library_TARGETS := $(filter-out crypto,$(gb_Library_TARGETS))
+gb_Library_TARGETS := $(filter-out ssl,$(gb_Library_TARGETS))
+endif
+
ifeq ($(SYSTEM_LIBXML),YES)
gb_Library_TARGETS := $(filter-out xml2,$(gb_Library_TARGETS))
endif
Modified: openoffice/branches/gbuild-reintegration/main/oox/Library_oox.mk
URL:
http://svn.apache.org/viewvc/openoffice/branches/gbuild-reintegration/main/oox/Library_oox.mk?rev=1732340&r1=1732339&r2=1732340&view=diff
==============================================================================
--- openoffice/branches/gbuild-reintegration/main/oox/Library_oox.mk (original)
+++ openoffice/branches/gbuild-reintegration/main/oox/Library_oox.mk Thu Feb 25
18:47:29 2016
@@ -31,7 +31,7 @@ $(eval $(call gb_Library_add_package_hea
$(eval $(call gb_Library_add_package_headers,oox,oox_source))
$(eval $(call gb_Library_add_package_headers,oox,oox_generated))
-$(eval $(call gb_Library_set_componentfile,oox,oox/oox))
+$(eval $(call gb_Library_set_componentfile,oox,oox/util/oox))
$(eval $(call gb_Library_add_api,oox,\
udkapi \
Modified: openoffice/branches/gbuild-reintegration/main/oox/prj/build.lst
URL:
http://svn.apache.org/viewvc/openoffice/branches/gbuild-reintegration/main/oox/prj/build.lst?rev=1732340&r1=1732339&r2=1732340&view=diff
==============================================================================
--- openoffice/branches/gbuild-reintegration/main/oox/prj/build.lst (original)
+++ openoffice/branches/gbuild-reintegration/main/oox/prj/build.lst Thu Feb 25
18:47:29 2016
@@ -1,18 +1,2 @@
oox oox : vos cppu cppuhelper comphelper sal offapi sax basegfx xmlscript
tools vcl BOOST:boost OPENSSL:openssl LIBXSLT:libxslt NULL
-oox oox usr1 - all oox_mkout NULL
-oox oox\prj get - all oox_prj NULL
-oox oox\source\token nmake - all oox_token NULL
-oox oox\source\helper nmake - all oox_helper oox_token
NULL
-oox oox\source\core nmake - all oox_core oox_token NULL
-oox oox\source\ole nmake - all oox_ole oox_token NULL
-oox oox\source\docprop nmake - all oox_docprop oox_token
NULL
-oox oox\source\drawingml nmake - all oox_drawingml oox_token
NULL
-oox oox\source\drawingml\diagram nmake - all oox_diagram oox_token
NULL
-oox oox\source\drawingml\chart nmake - all oox_chart oox_token NULL
-oox oox\source\drawingml\table nmake - all oox_table oox_token NULL
-oox oox\source\ppt nmake - all oox_ppt oox_token NULL
-oox oox\source\vml nmake - all oox_vml oox_token NULL
-oox oox\source\xls nmake - all oox_xls oox_token NULL
-oox oox\source\dump nmake - all oox_dump oox_token NULL
-oox oox\source\shape nmake - all oox_shape oox_token NULL
-oox oox\util nmake - all oox_util oox_token
oox_helper oox_core oox_ole oox_vml oox_drawingml oox_diagram oox_chart
oox_table oox_ppt oox_xls oox_dump oox_shape oox_docprop NULL
+oox oox\prj nmake - all oox_prj NULL
Modified: openoffice/branches/gbuild-reintegration/main/oox/prj/d.lst
URL:
http://svn.apache.org/viewvc/openoffice/branches/gbuild-reintegration/main/oox/prj/d.lst?rev=1732340&r1=1732339&r2=1732340&view=diff
==============================================================================
--- openoffice/branches/gbuild-reintegration/main/oox/prj/d.lst (original)
+++ openoffice/branches/gbuild-reintegration/main/oox/prj/d.lst Thu Feb 25
18:47:29 2016
@@ -1,48 +0,0 @@
-mkdir: %_DEST%\inc%_EXT%\oox
-mkdir: %_DEST%\inc%_EXT%\oox\core
-mkdir: %_DEST%\inc%_EXT%\oox\drawingml
-mkdir: %_DEST%\inc%_EXT%\oox\drawingml\chart
-mkdir: %_DEST%\inc%_EXT%\oox\drawingml\table
-mkdir: %_DEST%\inc%_EXT%\oox\helper
-mkdir: %_DEST%\inc%_EXT%\oox\ole
-mkdir: %_DEST%\inc%_EXT%\oox\token
-mkdir: %_DEST%\inc%_EXT%\oox\vml
-mkdir: %_DEST%\inc%_EXT%\oox\xls
-
-..\%__SRC%\misc\*.map %_DEST%\bin%_EXT%\*.map
-..\%__SRC%\lib\ixo.lib %_DEST%\lib%_EXT%\ixo.lib
-..\%__SRC%\lib\xol.lib %_DEST%\lib%_EXT%\xol.lib
-..\%__SRC%\lib\libxol.a %_DEST%\lib%_EXT%\libxol.a
-..\%__SRC%\bin\*.dll %_DEST%\bin%_EXT%\*.dll
-..\%__SRC%\lib\lib*.so %_DEST%\lib%_EXT%\lib*.so
-..\%__SRC%\lib\i*.lib %_DEST%\lib%_EXT%\i*.lib
-..\%__SRC%\lib\oox.lib %_DEST%\lib%_EXT%\oox.lib
-..\%__SRC%\lib\*.dylib %_DEST%\lib%_EXT%\*.dylib
-
-..\%__SRC%\inc\oox\token\tokens.hxx %_DEST%\inc%_EXT%\oox\token\tokens.hxx
-..\%__SRC%\misc\namespaces.txt %_DEST%\inc%_EXT%\oox\token\namespaces.txt
-
-..\source\token\tokens.txt %_DEST%\inc%_EXT%\oox\token\tokens.txt
-
-..\inc\oox\dllapi.h %_DEST%\inc%_EXT%\oox\dllapi.h
-..\inc\oox\helper\binarystreambase.hxx
%_DEST%\inc%_EXT%\oox\helper\binarystreambase.hxx
-..\inc\oox\helper\helper.hxx %_DEST%\inc%_EXT%\oox\helper\helper.hxx
-..\inc\oox\helper\refmap.hxx %_DEST%\inc%_EXT%\oox\helper\refmap.hxx
-..\inc\oox\helper\refvector.hxx %_DEST%\inc%_EXT%\oox\helper\refvector.hxx
-..\inc\oox\helper\storagebase.hxx %_DEST%\inc%_EXT%\oox\helper\storagebase.hxx
-..\inc\oox\helper\zipstorage.hxx %_DEST%\inc%_EXT%\oox\helper\zipstorage.hxx
-..\inc\oox\core\filterbase.hxx %_DEST%\inc%_EXT%\oox\core\filterbase.hxx
-..\inc\oox\core\filterdetect.hxx %_DEST%\inc%_EXT%\oox\core\filterdetect.hxx
-..\inc\oox\core\relations.hxx %_DEST%\inc%_EXT%\oox\core\relations.hxx
-..\inc\oox\core\xmlfilterbase.hxx %_DEST%\inc%_EXT%\oox\core\xmlfilterbase.hxx
-..\inc\oox\drawingml\chart\chartconverter.hxx
%_DEST%\inc%_EXT%\oox\drawingml\chart\chartconverter.hxx
-..\inc\oox\drawingml\table\tablestylelist.hxx
%_DEST%\inc%_EXT%\oox\drawingml\table\tablestylelist.hxx
-..\inc\oox\ole\vbaproject.hxx %_DEST%\inc%_EXT%\oox\ole\vbaproject.hxx
-..\inc\oox\vml\vmldrawing.hxx %_DEST%\inc%_EXT%\oox\vml\vmldrawing.hxx
-..\inc\oox\vml\vmlshape.hxx %_DEST%\inc%_EXT%\oox\vml\vmlshape.hxx
-..\inc\oox\xls\excelvbaproject.hxx
%_DEST%\inc%_EXT%\oox\xls\excelvbaproject.hxx
-
-dos: sh -c "if test %OS% = MACOSX; then create-bundle
%_DEST%\lib%_EXT%\*.dylib; fi"
-
-..\xml\components.xml %_DEST%\xml%_EXT%\components.xml
-..\%__SRC%\misc\oox.component %_DEST%\xml%_EXT%\oox.component
Modified:
openoffice/branches/gbuild-reintegration/main/oox/source/token/namespacemap.cxx
URL:
http://svn.apache.org/viewvc/openoffice/branches/gbuild-reintegration/main/oox/source/token/namespacemap.cxx?rev=1732340&r1=1732339&r2=1732340&view=diff
==============================================================================
---
openoffice/branches/gbuild-reintegration/main/oox/source/token/namespacemap.cxx
(original)
+++
openoffice/branches/gbuild-reintegration/main/oox/source/token/namespacemap.cxx
Thu Feb 25 18:47:29 2016
@@ -32,7 +32,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 "namespacenames.inc"
+#include <token/namespacenames.inc>
{ -1, "" }
};
Modified:
openoffice/branches/gbuild-reintegration/main/oox/source/token/namespaces.pl
URL:
http://svn.apache.org/viewvc/openoffice/branches/gbuild-reintegration/main/oox/source/token/namespaces.pl?rev=1732340&r1=1732339&r2=1732340&view=diff
==============================================================================
---
openoffice/branches/gbuild-reintegration/main/oox/source/token/namespaces.pl
(original)
+++
openoffice/branches/gbuild-reintegration/main/oox/source/token/namespaces.pl
Thu Feb 25 18:47:29 2016
@@ -21,17 +21,19 @@
-$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> )
-{
+# operation mode (1 = identifiers, 2 = names, 3 = plain)
+$op = shift @ARGV;
+die "Error: invalid operation" unless( $op >= 1 && $op <= 3);
+
+# number of bits to shift the namespace identifier
+$shift = 16;
+
+if( $op == 1 ) {
+ print( "const size_t NMSP_SHIFT = $shift;\n" );
+}
+
+$i = 1;
+while( <> ) {
# trim newline
chomp( $_ );
# trim leading/trailing whitespace
@@ -40,36 +42,14 @@ while( <INFILE> )
# trim comments
$_ =~ s/^#.*//;
# skip empty lines
- if( $_ )
- {
+ 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;
+ $_ =~ /^([a-zA-Z]+)\s+([a-zA-Z0-9-.:\/]+)\s*$/ or die "Error: invalid
entry: '$_'";
+ # generate output
+ $id = $i << $shift;
+ if( $op == 1 ) { print( "const sal_Int32 NMSP_$1 = $i <<
NMSP_SHIFT;\n" ); }
+ elsif( $op == 2 ) { print( "{ $id, \"$2\" },\n" ); }
+ elsif( $op == 3 ) { print( "$id $1 $2\n" ); }
+ ++$i;
}
}
-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 );
Modified:
openoffice/branches/gbuild-reintegration/main/oox/source/token/properties.pl
URL:
http://svn.apache.org/viewvc/openoffice/branches/gbuild-reintegration/main/oox/source/token/properties.pl?rev=1732340&r1=1732339&r2=1732340&view=diff
==============================================================================
---
openoffice/branches/gbuild-reintegration/main/oox/source/token/properties.pl
(original)
+++
openoffice/branches/gbuild-reintegration/main/oox/source/token/properties.pl
Thu Feb 25 18:47:29 2016
@@ -21,43 +21,33 @@
-$ARGV0 = shift @ARGV;
-$ARGV1 = shift @ARGV;
-$ARGV2 = shift @ARGV;
+# operation mode (1 = identifiers, 2 = names)
+$op = shift @ARGV;
+die "Error: invalid operation" unless( $op >= 1 && $op <= 2);
-# parse input file
-
-open( INFILE, $ARGV0 ) or die "Error: cannot open input file: $!";
-my %props;
-while( <INFILE> )
-{
+$i = 0;
+while( <> ) {
# trim newline
chomp( $_ );
# trim leading/trailing whitespace
$_ =~ s/^\s*//g;
$_ =~ s/\s*$//g;
- # check for valid characters
- $_ =~ /^[A-Z][a-zA-Z0-9]*$/ or die "Error: invalid character in property
'$_'";
- $id = "PROP_$_";
- $props{$_} = $id;
+ # 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;
+ }
}
-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: $!";
-$i = 0;
-foreach( sort( keys( %props ) ) )
-{
- print( IDFILE "const sal_Int32 $props{$_} = $i;\n" );
- print( NAMEFILE "/* $i */ \"$_\",\n" );
- ++$i;
+if( $op == 1 ) {
+ print( "const sal_Int32 PROP_COUNT = $i;\nconst sal_Int32 PROP_INVALID =
-1;\n" );
+} elsif( $op == 2 ) {
+ print( " \"\"" );
}
-
-print( IDFILE "const sal_Int32 PROP_COUNT = $i;\n" );
-print( IDFILE "const sal_Int32 PROP_INVALID = -1;\n" );
-
-close( IDFILE );
-close( NAMEFILE );
Modified:
openoffice/branches/gbuild-reintegration/main/oox/source/token/propertynames.cxx
URL:
http://svn.apache.org/viewvc/openoffice/branches/gbuild-reintegration/main/oox/source/token/propertynames.cxx?rev=1732340&r1=1732339&r2=1732340&view=diff
==============================================================================
---
openoffice/branches/gbuild-reintegration/main/oox/source/token/propertynames.cxx
(original)
+++
openoffice/branches/gbuild-reintegration/main/oox/source/token/propertynames.cxx
Thu Feb 25 18:47:29 2016
@@ -32,8 +32,7 @@ PropertyNameVector::PropertyNameVector()
static const sal_Char* sppcPropertyNames[] =
{
// include auto-generated C array with property names as C strings
-#include "propertynames.inc"
- ""
+#include <token/propertynames.inc>
};
size_t nArraySize = (sizeof( sppcPropertyNames ) / sizeof(
*sppcPropertyNames )) - 1;
Modified:
openoffice/branches/gbuild-reintegration/main/oox/source/token/tokenmap.cxx
URL:
http://svn.apache.org/viewvc/openoffice/branches/gbuild-reintegration/main/oox/source/token/tokenmap.cxx?rev=1732340&r1=1732339&r2=1732340&view=diff
==============================================================================
--- openoffice/branches/gbuild-reintegration/main/oox/source/token/tokenmap.cxx
(original)
+++ openoffice/branches/gbuild-reintegration/main/oox/source/token/tokenmap.cxx
Thu Feb 25 18:47:29 2016
@@ -39,8 +39,10 @@ using ::rtl::OUString;
// ============================================================================
namespace {
-// include auto-generated Perfect_Hash
-#include "tokenhash.inc"
+
+// include auto-generated Perfect_Hash class
+#include <token/tokenhash.inc>
+
} // namespace
// ============================================================================
@@ -51,7 +53,7 @@ TokenMap::TokenMap() :
static const sal_Char* sppcTokenNames[] =
{
// include auto-generated C array with token names as C strings
-#include "tokennames.inc"
+#include <token/tokennames.inc>
""
};
@@ -64,14 +66,14 @@ TokenMap::TokenMap() :
}
#if OSL_DEBUG_LEVEL > 0
- // check that the perfect_hash is in sync with the token name list
+ // check that the Perfect_Hash 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 );
- struct xmltoken* pToken = Perfect_Hash::in_word_set(
aUtf8Name.getStr(), aUtf8Name.getLength() );
- bOk = pToken && (pToken->nToken == nToken);
+ const XMLTokenInfo* pTokenInfo = Perfect_Hash::getTokenInfo(
aUtf8Name.getStr(), aUtf8Name.getLength() );
+ bOk = pTokenInfo && (pTokenInfo->mnToken == nToken);
OSL_ENSURE( bOk, ::rtl::OStringBuffer( "TokenMap::TokenMap - token
list broken, #" ).
append( nToken ).append( ", '" ).append( aUtf8Name ).append( '\''
).getStr() );
}
@@ -92,8 +94,8 @@ OUString TokenMap::getUnicodeTokenName(
sal_Int32 TokenMap::getTokenFromUnicode( const OUString& rUnicodeName ) const
{
OString aUtf8Name = OUStringToOString( rUnicodeName, RTL_TEXTENCODING_UTF8
);
- struct xmltoken* pToken = Perfect_Hash::in_word_set( aUtf8Name.getStr(),
aUtf8Name.getLength() );
- return pToken ? pToken->nToken : XML_TOKEN_INVALID;
+ const XMLTokenInfo* pTokenInfo = Perfect_Hash::getTokenInfo(
aUtf8Name.getStr(), aUtf8Name.getLength() );
+ return pTokenInfo ? pTokenInfo->mnToken : XML_TOKEN_INVALID;
}
Sequence< sal_Int8 > TokenMap::getUtf8TokenName( sal_Int32 nToken ) const
@@ -105,9 +107,9 @@ Sequence< sal_Int8 > TokenMap::getUtf8To
sal_Int32 TokenMap::getTokenFromUtf8( const Sequence< sal_Int8 >& rUtf8Name )
const
{
- struct xmltoken* pToken = Perfect_Hash::in_word_set(
+ const XMLTokenInfo* pTokenInfo = Perfect_Hash::getTokenInfo(
reinterpret_cast< const char* >( rUtf8Name.getConstArray() ),
rUtf8Name.getLength() );
- return pToken ? pToken->nToken : XML_TOKEN_INVALID;
+ return pTokenInfo ? pTokenInfo->mnToken : XML_TOKEN_INVALID;
}
// ============================================================================
Modified:
openoffice/branches/gbuild-reintegration/main/oox/source/token/tokens.pl
URL:
http://svn.apache.org/viewvc/openoffice/branches/gbuild-reintegration/main/oox/source/token/tokens.pl?rev=1732340&r1=1732339&r2=1732340&view=diff
==============================================================================
--- openoffice/branches/gbuild-reintegration/main/oox/source/token/tokens.pl
(original)
+++ openoffice/branches/gbuild-reintegration/main/oox/source/token/tokens.pl
Thu Feb 25 18:47:29 2016
@@ -21,56 +21,55 @@
-$ARGV0 = shift @ARGV;
-$ARGV1 = shift @ARGV;
-$ARGV2 = shift @ARGV;
-$ARGV3 = shift @ARGV;
-
-open( INFILE, $ARGV0 ) or die "Error: cannot open input file: $!";
-my %tokens;
-while ( <INFILE> )
+# operation mode (1 = identifiers, 2 = names, 3 = gperf)
+$op = shift @ARGV;
+die "Error: invalid operation" unless( $op >= 1 && $op <= 3);
+
+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( <> )
{
# trim newline
chomp( $_ );
# trim leading/trailing whitespace
$_ =~ s/^\s*//g;
$_ =~ s/\s*$//g;
- # check for valid characters
- $_ =~ /^[a-zA-Z0-9-_]+$/ or die "Error: invalid character in token '$_'";
- $id = "XML_$_";
- $id =~ s/-/_/g;
- $tokens{$_} = $id;
+ # 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;
+ }
}
-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: $!";
-
-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;
+if( $op == 1 ) {
+ print( "const sal_Int32 XML_TOKEN_COUNT = $i;\n" );
+} elsif( $op == 3 ) {
+ print( "%%\n" );
}
-
-print( IDFILE "const sal_Int32 XML_TOKEN_COUNT = $i;\n" );
-print( GPERFFILE "%%\n" );
-
-close( IDFILE );
-close( NAMEFILE );
-close( GPERFFILE );
Modified:
openoffice/branches/gbuild-reintegration/main/postprocess/packcomponents/makefile.mk
URL:
http://svn.apache.org/viewvc/openoffice/branches/gbuild-reintegration/main/postprocess/packcomponents/makefile.mk?rev=1732340&r1=1732339&r2=1732340&view=diff
==============================================================================
---
openoffice/branches/gbuild-reintegration/main/postprocess/packcomponents/makefile.mk
(original)
+++
openoffice/branches/gbuild-reintegration/main/postprocess/packcomponents/makefile.mk
Thu Feb 25 18:47:29 2016
@@ -75,6 +75,7 @@ my_components = \
component/framework/util/fwk \
component/framework/util/fwl \
component/framework/util/fwm \
+ component/oox/util/oox \
component/vbahelper/util/msforms \
component/sfx2/util/sfx \
component/sot/util/sot \
@@ -136,7 +137,6 @@ my_components = \
odbc \
offacc \
oooimprovecore \
- oox \
package2 \
pcr \
pdffilter \
Modified: openoffice/branches/gbuild-reintegration/main/solenv/gbuild/gbuild.mk
URL:
http://svn.apache.org/viewvc/openoffice/branches/gbuild-reintegration/main/solenv/gbuild/gbuild.mk?rev=1732340&r1=1732339&r2=1732340&view=diff
==============================================================================
--- openoffice/branches/gbuild-reintegration/main/solenv/gbuild/gbuild.mk
(original)
+++ openoffice/branches/gbuild-reintegration/main/solenv/gbuild/gbuild.mk Thu
Feb 25 18:47:29 2016
@@ -260,5 +260,8 @@ endif
export gb_AWK
export gb_XSLTPROC
+export GBUILDDIR
+# FIXME exporting SRCDIR seems kind of a hack
+export SRCDIR
# vim: set noet sw=4 ts=4: