Kaydet (Commit) c5e51f94 authored tarafından os's avatar os

rebase

...@@ -60,18 +60,26 @@ SinceTagTransformationData::DoesTransform() const ...@@ -60,18 +60,26 @@ SinceTagTransformationData::DoesTransform() const
} }
const String & const String &
SinceTagTransformationData::DisplayOf( const String & i_sVersionNumber ) const SinceTagTransformationData::DisplayOf( const String & i_versionNumber ) const
{ {
if (DoesTransform()) if (DoesTransform())
{ {
const String * ret = csv::find_in_map(aTransformationTable, i_sVersionNumber); StreamLock
sl(200);
sl() << i_versionNumber;
sl().strip_frontback_whitespace();
String
sVersionNumber(sl().c_str());
const String *
ret = csv::find_in_map(aTransformationTable, sVersionNumber);
return ret != 0 return ret != 0
? *ret ? *ret
: String::Null_(); : String::Null_();
} }
else else
{ {
return i_sVersionNumber; return i_versionNumber;
} }
} }
......
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: x_parse.hxx,v $
* $Revision: 1.4 $
*
* 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.
*
************************************************************************/
#ifndef ADC_X_DOCU_HXX
#define ADC_X_DOCU_HXX
// BASE CLASSES
#include <autodoc/x_parsing.hxx>
class X_Docu : public autodoc::X_Parser_Ifc
{
public:
// LIFECYCLE
X_Docu(
const char * i_tag,
const char * i_explanation );
~X_Docu();
// INQUIRY
virtual E_Event GetEvent() const;
virtual void GetInfo(
std::ostream & o_rOutputMedium ) const;
private:
String sTagName;
String sExplanation;
};
#endif
#************************************************************************* #*************************************************************************
# #
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# Copyright 2008 by Sun Microsystems, Inc. # Copyright 2008 by Sun Microsystems, Inc.
# #
# OpenOffice.org - a multi-platform office productivity suite # OpenOffice.org - a multi-platform office productivity suite
...@@ -50,6 +50,7 @@ PRJINC=$(PRJ)$/source ...@@ -50,6 +50,7 @@ PRJINC=$(PRJ)$/source
OBJFILES= \ OBJFILES= \
$(OBJ)$/parsefct.obj \ $(OBJ)$/parsefct.obj \
$(OBJ)$/x_docu.obj \
$(OBJ)$/x_parse.obj $(OBJ)$/x_parse.obj
......
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: x_parse.cxx,v $
* $Revision: 1.7 $
*
* 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.
*
************************************************************************/
#include <precomp.h>
#include <x_docu.hxx>
// NOT FULLY DECLARED SERVICES
X_Docu::X_Docu( const char * i_tag,
const char * i_explanation )
: sTagName(i_tag),
sExplanation(i_explanation)
{
}
X_Docu::~X_Docu()
{
}
X_Docu::E_Event
X_Docu::GetEvent() const
{
return x_Any;
}
void
X_Docu::GetInfo( std::ostream & o_rOutputMedium ) const
{
o_rOutputMedium
<< "Error in tag '"
<< sTagName
<< "': "
<< sExplanation
<< Endl();
}
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
#include <ary/ary.hxx> #include <ary/ary.hxx>
#include <ary/idl/i_gate.hxx> #include <ary/idl/i_gate.hxx>
#include <ary/doc/d_oldidldocu.hxx> #include <ary/doc/d_oldidldocu.hxx>
#include <../parser/inc/x_docu.hxx>
#include <parser/parserinfo.hxx> #include <parser/parserinfo.hxx>
#include <tools/filecoll.hxx> #include <tools/filecoll.hxx>
#include <tools/tkpchars.hxx> #include <tools/tkpchars.hxx>
...@@ -113,6 +114,13 @@ IdlParser::Run( const autodoc::FileCollector_Ifc & i_rFiles ) ...@@ -113,6 +114,13 @@ IdlParser::Run( const autodoc::FileCollector_Ifc & i_rFiles )
= new FileParsePerformers(*pRepository, = new FileParsePerformers(*pRepository,
static_cast< ParserInfo& >(*this)); static_cast< ParserInfo& >(*this));
} }
catch (X_Docu & xd)
{
// Currently thic catches only wrong since tags, while since tags are
// transformed. In this case the program shall be terminated.
Cerr() << xd << Endl();
exit(1);
}
catch (...) catch (...)
{ {
Cout() << "Unknown error." << Endl(); Cout() << "Unknown error." << Endl();
......
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
#include <parser/parserinfo.hxx> #include <parser/parserinfo.hxx>
#include <adc_cl.hxx> #include <adc_cl.hxx>
#include <adc_msg.hxx> #include <adc_msg.hxx>
#include <../parser/inc/x_docu.hxx>
#include <s2_dsapi/dsapitok.hxx> #include <s2_dsapi/dsapitok.hxx>
#include <s2_dsapi/tk_atag2.hxx> #include <s2_dsapi/tk_atag2.hxx>
#include <s2_dsapi/tk_html.hxx> #include <s2_dsapi/tk_html.hxx>
...@@ -511,15 +512,44 @@ SapiDocu_PE::SetCurSinceAtTagVersion( DYN ary::inf::DocuToken & let_drNewToken ) ...@@ -511,15 +512,44 @@ SapiDocu_PE::SetCurSinceAtTagVersion( DYN ary::inf::DocuToken & let_drNewToken )
return; return;
} }
char cFirst = *pToken->GetText(); const String
const char cCiphersend = '9' + 1; sVersion(pToken->GetText());
if ( autodoc::CommandLine::Get_().DoesTransform_SinceTag() const char
AND NOT csv::in_range('0', cFirst, cCiphersend) ) cFirst = *sVersion.begin();
const char
cCiphersend = '9' + 1;
const autodoc::CommandLine &
rCommandLine = autodoc::CommandLine::Get_();
if ( rCommandLine.DoesTransform_SinceTag())
{ {
delete &let_drNewToken; // The @since version number shall be interpreted,
return;
if ( NOT csv::in_range('0', cFirst, cCiphersend) )
{
// But this is a non-number-part, so we wait for
// the next one.
delete &let_drNewToken;
return;
}
else if (rCommandLine.DisplayOf_SinceTagValue(sVersion).empty())
{
// This is the numbered part, but we don't know it.
delete &let_drNewToken;
StreamLock
sl(200);
sl()
<< "Since-value '"
<< sVersion
<< "' not found in translation table.";
throw X_Docu("since", sl().c_str());
}
} }
// Either since tags are not specially interpreted, or
// we got a known one.
pCurAtTag->AddToken(let_drNewToken); pCurAtTag->AddToken(let_drNewToken);
fCurTokenAddFunction = &SapiDocu_PE::AddDocuToken2SinceAtTag; fCurTokenAddFunction = &SapiDocu_PE::AddDocuToken2SinceAtTag;
} }
......
...@@ -36,6 +36,8 @@ TARGET=checkbin ...@@ -36,6 +36,8 @@ TARGET=checkbin
.INCLUDE: settings.mk .INCLUDE: settings.mk
.INCLUDE: $(PRJ)$/util$/makefile.pmk .INCLUDE: $(PRJ)$/util$/makefile.pmk
#---------------------------------------------------------------- #----------------------------------------------------------------
.IF "$(L10N_framework)"==""
ODKCHECKFILE=$(MISC)$/$(TARGET).txt ODKCHECKFILE=$(MISC)$/$(TARGET).txt
all: $(ODKCHECKFILE) all: $(ODKCHECKFILE)
...@@ -46,3 +48,8 @@ $(ODKCHECKFILE) : $(SDK_CONTENT_CHECK_FILES) ...@@ -46,3 +48,8 @@ $(ODKCHECKFILE) : $(SDK_CONTENT_CHECK_FILES)
$(PERL) $(PRJ)$/util$/check.pl $(DESTDIR) $(DESTPLATFROM) "$(EXEPOSTFIX)" $(ODKCHECKFILE) $(PERL) $(PRJ)$/util$/check.pl $(DESTDIR) $(DESTPLATFROM) "$(EXEPOSTFIX)" $(ODKCHECKFILE)
# RAISE AN ERROR WHEN TAG FILE IS NOT THERE ANYMORE # RAISE AN ERROR WHEN TAG FILE IS NOT THERE ANYMORE
cat $(ODKCHECKFILE) cat $(ODKCHECKFILE)
.ELSE
pseudo:
.ENDIF
...@@ -36,6 +36,8 @@ TARGET=checkidl ...@@ -36,6 +36,8 @@ TARGET=checkidl
.INCLUDE: settings.mk .INCLUDE: settings.mk
.INCLUDE: $(PRJ)$/util$/makefile.pmk .INCLUDE: $(PRJ)$/util$/makefile.pmk
#---------------------------------------------------------------- #----------------------------------------------------------------
.IF "$(L10N_framework)"==""
ODKCHECKFILE=$(MISC)$/$(TARGET).txt ODKCHECKFILE=$(MISC)$/$(TARGET).txt
all : $(ODKCHECKFILE) all : $(ODKCHECKFILE)
...@@ -46,3 +48,8 @@ $(ODKCHECKFILE) : $(SDK_CONTENT_CHECK_FILES) ...@@ -46,3 +48,8 @@ $(ODKCHECKFILE) : $(SDK_CONTENT_CHECK_FILES)
-diff -br $(DESTDIRIDL) $(SOLARIDLDIR) $(PIPEERROR) $(PERL) $(PRJ)$/util$/checkdiff.pl $(ODKCHECKFILE) -diff -br $(DESTDIRIDL) $(SOLARIDLDIR) $(PIPEERROR) $(PERL) $(PRJ)$/util$/checkdiff.pl $(ODKCHECKFILE)
# RAISE AN ERROR WHEN TAG FILE IS NOT THERE ANYMORE # RAISE AN ERROR WHEN TAG FILE IS NOT THERE ANYMORE
cat $(ODKCHECKFILE) cat $(ODKCHECKFILE)
.ELSE
pseudo:
.ENDIF
...@@ -36,6 +36,7 @@ TARGET=checkinc ...@@ -36,6 +36,7 @@ TARGET=checkinc
.INCLUDE: settings.mk .INCLUDE: settings.mk
.INCLUDE: $(PRJ)$/util$/makefile.pmk .INCLUDE: $(PRJ)$/util$/makefile.pmk
#---------------------------------------------------------------- #----------------------------------------------------------------
.IF "$(L10N_framework)"==""
ODKCHECKFILE=$(MISC)$/$(TARGET).txt ODKCHECKFILE=$(MISC)$/$(TARGET).txt
all : $(ODKCHECKFILE) all : $(ODKCHECKFILE)
...@@ -51,3 +52,7 @@ $(ODKCHECKFILE) : $(SDK_CONTENT_CHECK_FILES) ...@@ -51,3 +52,7 @@ $(ODKCHECKFILE) : $(SDK_CONTENT_CHECK_FILES)
-diff -br $(DESTDIRINC)$/vos $(SOLARINCDIR)$/vos $(PIPEERROR) $(PERL) $(PRJ)$/util$/checkdiff.pl $(ODKCHECKFILE) -diff -br $(DESTDIRINC)$/vos $(SOLARINCDIR)$/vos $(PIPEERROR) $(PERL) $(PRJ)$/util$/checkdiff.pl $(ODKCHECKFILE)
# RAISE AN ERROR WHEN TAG FILE IS NOT THERE ANYMORE # RAISE AN ERROR WHEN TAG FILE IS NOT THERE ANYMORE
cat $(ODKCHECKFILE) cat $(ODKCHECKFILE)
.ELSE
pseudo:
.ENDIF
...@@ -36,6 +36,7 @@ TARGET=checkinc2 ...@@ -36,6 +36,7 @@ TARGET=checkinc2
.INCLUDE: settings.mk .INCLUDE: settings.mk
.INCLUDE: $(PRJ)$/util$/makefile.pmk .INCLUDE: $(PRJ)$/util$/makefile.pmk
#---------------------------------------------------------------- #----------------------------------------------------------------
.IF "$(L10N_framework)"==""
ODKCHECKFILE=$(MISC)$/$(TARGET).txt ODKCHECKFILE=$(MISC)$/$(TARGET).txt
all : $(ODKCHECKFILE) all : $(ODKCHECKFILE)
...@@ -51,3 +52,7 @@ $(ODKCHECKFILE) : $(SDK_CONTENT_CHECK_FILES) ...@@ -51,3 +52,7 @@ $(ODKCHECKFILE) : $(SDK_CONTENT_CHECK_FILES)
-diff -br $(DESTDIRINC)$/cppuhelper $(SOLARINCDIR)$/cppuhelper $(PIPEERROR) $(PERL) $(PRJ)$/util$/checkdiff.pl $(ODKCHECKFILE) -diff -br $(DESTDIRINC)$/cppuhelper $(SOLARINCDIR)$/cppuhelper $(PIPEERROR) $(PERL) $(PRJ)$/util$/checkdiff.pl $(ODKCHECKFILE)
# RAISE AN ERROR WHEN TAG FILE IS NOT THERE ANYMORE # RAISE AN ERROR WHEN TAG FILE IS NOT THERE ANYMORE
cat $(ODKCHECKFILE) cat $(ODKCHECKFILE)
.ELSE
pseudo:
.ENDIF
"3.2.0" "OpenOffice 3.2.0"
"3.2" "OpenOffice 3.2"
"3.1.0" "OpenOffice 3.1.0"
"3.1" "OpenOffice 3.1"
"3.0.1" "OpenOffice 3.0.1"
"3.0.0" "OpenOffice 3.0.0" "3.0.0" "OpenOffice 3.0.0"
"3.0" "OpenOffice 3.0" "3.0" "OpenOffice 3.0"
"2.4.1" "OpenOffice 2.4.1" "2.4.1" "OpenOffice 2.4.1"
"2.4.0" "OpenOffice 2.4.0"
"2.4" "OpenOffice 2.4" "2.4" "OpenOffice 2.4"
"2.3.1" "OpenOffice 2.3.1" "2.3.1" "OpenOffice 2.3.1"
"2.3.0" "OpenOffice 2.3.0"
"2.3" "OpenOffice 2.3" "2.3" "OpenOffice 2.3"
"2.2.1" "OpenOffice 2.2.1" "2.2.1" "OpenOffice 2.2.1"
"2.2.0" "OpenOffice 2.2.0"
"2.2" "OpenOffice 2.2" "2.2" "OpenOffice 2.2"
"2.1" "OpenOffice 2.1" "2.1" "OpenOffice 2.1"
"2.0.6" "OpenOffice 2.0.6"
"2.0.4" "OpenOffice 2.0.4" "2.0.4" "OpenOffice 2.0.4"
"2.0.3" "OpenOffice 2.0.3" "2.0.3" "OpenOffice 2.0.3"
"2.0.2" "OpenOffice 2.0.2" "2.0.2" "OpenOffice 2.0.2"
......
...@@ -214,10 +214,15 @@ MYZIPLIST=com$/* win$/* ...@@ -214,10 +214,15 @@ MYZIPLIST=com$/* win$/*
#-------------------------------------------------- #--------------------------------------------------
# TARGETS # TARGETS
#-------------------------------------------------- #--------------------------------------------------
.IF "$(L10N_framework)"==""
all : CLEAN_DKVERSION_CHECK \ all : CLEAN_DKVERSION_CHECK \
$(DIR_FILE_LIST) \ $(DIR_FILE_LIST) \
$(DIR_FILE_FLAG) \ $(DIR_FILE_FLAG) \
.ENDIF
#-------------------------------------------------- #--------------------------------------------------
# use global rules # use global rules
#-------------------------------------------------- #--------------------------------------------------
......
...@@ -37,6 +37,7 @@ TARGET=gendocu ...@@ -37,6 +37,7 @@ TARGET=gendocu
.INCLUDE: settings.mk .INCLUDE: settings.mk
.INCLUDE: $(PRJ)$/util$/makefile.pmk .INCLUDE: $(PRJ)$/util$/makefile.pmk
#---------------------------------------------------------------- #----------------------------------------------------------------
.IF "$(L10N_framework)"==""
CPPDOCREFNAME="UDK $(UDK_MAJOR).$(UDK_MINOR).$(UDK_MICRO) C/C++ API Reference" CPPDOCREFNAME="UDK $(UDK_MAJOR).$(UDK_MINOR).$(UDK_MICRO) C/C++ API Reference"
JAVADOCREFNAME="UDK $(UDK_MAJOR).$(UDK_MINOR).$(UDK_MICRO) Java API Reference" JAVADOCREFNAME="UDK $(UDK_MAJOR).$(UDK_MINOR).$(UDK_MICRO) Java API Reference"
...@@ -120,3 +121,7 @@ $(JAVA_DOCU_INDEX_FILE) .SEQUENTIAL : $(JAVA_SRC_FILES) ...@@ -120,3 +121,7 @@ $(JAVA_DOCU_INDEX_FILE) .SEQUENTIAL : $(JAVA_SRC_FILES)
-$(MKDIRHIER) $(@:d) -$(MKDIRHIER) $(@:d)
$(JAVADOC) -J-Xmx120m $(JAVADOCPARAMS) > $(JAVADOCLOG) $(JAVADOC) -J-Xmx120m $(JAVADOCPARAMS) > $(JAVADOCLOG)
.ENDIF .ENDIF
.ELSE
pseudo:
.ENDIF
...@@ -135,6 +135,7 @@ public final class Loader { ...@@ -135,6 +135,7 @@ public final class Loader {
// invoke the main method // invoke the main method
if ( className != null ) { if ( className != null ) {
ClassLoader cl = getCustomLoader(); ClassLoader cl = getCustomLoader();
Thread.currentThread().setContextClassLoader(cl);
Class c = cl.loadClass( className ); Class c = cl.loadClass( className );
Method m = c.getMethod( "main", new Class[] { String[].class } ); Method m = c.getMethod( "main", new Class[] { String[].class } );
m.invoke( null, new Object[] { args } ); m.invoke( null, new Object[] { args } );
......
...@@ -6,18 +6,21 @@ TARGET=odk ...@@ -6,18 +6,21 @@ TARGET=odk
.INCLUDE: settings.mk .INCLUDE: settings.mk
.INCLUDE: makefile.pmk .INCLUDE: makefile.pmk
# ------------------------------------------------------------------ # ------------------------------------------------------------------
.IF "$(L10N_framework)"==""
ZIP1TARGET=odkexamples ZIP1TARGET=odkexamples
ZIP1FLAGS=-u -r ZIP1FLAGS=-u -r
ZIP1DIR=$(PRJ) ZIP1DIR=$(PRJ)
ZIP1LIST=examples -x "*.svn*" -x "*CVS*" -x "*makefile.mk" -x "*Inspector*" -x "*Container1*" -x "*Storage*" -x "*register_component*" -x "*examples.html" ZIP1LIST=examples -x "*.svn*" -x "*CVS*" -x "*makefile.mk" -x "*Inspector*" -x "*Container1*" -x "*Storage*" -x "*register_component*" -x "*examples.html"
.INCLUDE : target.mk .ENDIF
.INCLUDE : target.mk
.IF "$(L10N_framework)"==""
ALLTAR:\ ALLTAR:\
$(BIN)$/$(PRODUCTZIPFILE) $(BIN)$/$(PRODUCTZIPFILE)
# $(BIN)$/odk_oo.zip # $(BIN)$/odk_oo.zip
.ENDIF
$(BIN)$/$(PRODUCTZIPFILE) : $(SDK_CONTENT_CHECK_FILES) $(SDK_CHECK_FLAGS) $(BIN)$/$(PRODUCTZIPFILE) : $(SDK_CONTENT_CHECK_FILES) $(SDK_CHECK_FLAGS)
cd $(BIN)$/$(PRODUCT_NAME) && zip -urq ..$/$(PRODUCTZIPFILE) . $(CHECKZIPRESULT) cd $(BIN)$/$(PRODUCT_NAME) && zip -urq ..$/$(PRODUCTZIPFILE) . $(CHECKZIPRESULT)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment