Commits

Anonymous committed eceeaa2 Merge

accstuff: merge with DEV300_m103

Comments (0)

Files changed (1442)

 8601acbe0e6ca2dd3797ec8289027bed264a67b7 OOO330_m20
 055aad264da0cf9598fd1b7aafbd3e144c9b8ce2 DEV300_m99
 20c5c9384888da33596d864251881e6e46bdd339 DEV300_m100
+564e24baaaae5e18c8bfa76811993fbefa571b5c DEV300_m101
+7dbaa615ad894cfd4f9611e82783250bd0a3016d DEV300_m102
 	sw \
 	toolkit \
 	tools \
+	unoxml \
 	xmloff \
     vbahelper \
 ))
 	tk \
 	tl \
 	utl \
+	unordf \
+	unoxml \
 	vbahelper \
 	vcl \
 	xcr \
 ))
 
 $(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO, \
+	cppunit \
 	icuuc \
-	cppunit \
+	rdf \
+	xslt \
 ))
 
 
 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 xml2:ixml2%,xml2:libxml2$(gb_Library_IARCEXT),$(gb_Library_FILENAMES))
+gb_Library_FILENAMES := $(patsubst xslt:ixslt%,xslt:libxslt$(gb_Library_IARCEXT),$(gb_Library_FILENAMES))
+gb_Library_FILENAMES := $(patsubst rdf:irdf%,rdf:librdf.dll$(gb_Library_IARCEXT),$(gb_Library_FILENAMES))
 gb_Library_FILENAMES := $(patsubst z:iz%,z:zlib%,$(gb_Library_FILENAMES))
 ifeq ($(gb_PRODUCT),$(true))
 gb_Library_FILENAMES := $(patsubst stl:istl%,stl:stlport_vc71%,$(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 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))
 gb_Library_FILENAMES := $(patsubst z:iz%,z:zlib%,$(gb_Library_FILENAMES))
 ifeq ($(gb_PRODUCT),$(true))
 gb_Library_FILENAMES := $(patsubst stl:istl%,stl:stlport_vc71%,$(gb_Library_FILENAMES))
 gb_Library_TARGETS := $(filter-out xml2,$(gb_Library_TARGETS))
 endif
 
+ifeq ($(SYSTEM_LIBXSLT),YES)
+gb_Library_TARGETS := $(filter-out xslt,$(gb_Library_TARGETS))
+endif
+
+ifeq ($(SYSTEM_REDLAND),YES)
+gb_Library_TARGETS := $(filter-out rdf,$(gb_Library_TARGETS))
+endif
+
 ifeq ($(SYSTEM_ICU),YES)
 gb_Library_TARGETS := $(filter-out icuuc,$(gb_Library_TARGETS))
 endif

autodoc/source/parser_i/idoc/docu_pe2.cxx

 /*************************************************************************
  *
  * 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
 
 
 // NOT FULLY DEFINED SERVICES
+#include <cctype>
 #include <ary/doc/d_oldidldocu.hxx>
 #include <ary_i/d_token.hxx>
 #include <parser/parserinfo.hxx>
 	else if (i_rToken.Id() == Tok_AtTag::since)
 	{
 		pCurAtTag = new DT_SinceAtTag;
-		fCurTokenAddFunction = &SapiDocu_PE::SetCurSinceAtTagVersion;
+		fCurTokenAddFunction = &SapiDocu_PE::SetCurSinceAtTagVersion_OOo;
 	}
 	else
 	{
 	fCurTokenAddFunction = &SapiDocu_PE::AddDocuToken2CurAtTag;
 }
 
-
+const String
+    C_sSinceFormat("Correct version format: \"OOo <major>.<minor>[.<micro> if micro is not 0]\".");
 
 void
-SapiDocu_PE::SetCurSinceAtTagVersion( DYN ary::inf::DocuToken & let_drNewToken )
+SapiDocu_PE::SetCurSinceAtTagVersion_OOo( DYN ary::inf::DocuToken & let_drNewToken )
 {
 	csv_assert(pCurAtTag);
 
 
     const String
         sVersion(pToken->GetText());
-    const char
-        cFirst = *sVersion.begin();
-    const char
-        cCiphersend = '9' + 1;
+    if (NOT CheckVersionSyntax_OOo(sVersion))
+    {
+        Cerr() << "Version information in @since tag has incorrect format.\n"
+               << "Found: \"" << sVersion << "\"\n"
+               << C_sSinceFormat
+               << Endl();
+        exit(1);
+    }
+
     const autodoc::CommandLine &
         rCommandLine = autodoc::CommandLine::Get_();
+    if (NOT rCommandLine.DoesTransform_SinceTag())
+        pCurAtTag->AddToken(let_drNewToken);
 
+    fCurTokenAddFunction = &SapiDocu_PE::SetCurSinceAtTagVersion_Number;
+}
 
+void
+SapiDocu_PE::SetCurSinceAtTagVersion_Number( DYN ary::inf::DocuToken & let_drNewToken )
+{
+	csv_assert(pCurAtTag);
+
+    DT_TextToken * pToken = dynamic_cast< DT_TextToken* >(&let_drNewToken);
+    if (pToken == 0)
+    {
+        if (dynamic_cast< DT_White* >(&let_drNewToken) != 0)
+        {
+            String &
+                sValue = pCurAtTag->Access_Text().Access_TextOfFirstToken();
+            StreamLock
+                sHelp(1000);
+            sValue = sHelp() << sValue << " " << c_str;
+        }
+
+    	delete &let_drNewToken;
+        return;
+    }
+
+    const String
+        sVersion(pToken->GetText());
+    if (NOT CheckVersionSyntax_Number(sVersion))
+    {
+        Cerr() << "Version information in @since tag has incorrect format.\n"
+               << "Found: \"" << sVersion << "\"\n"
+               << C_sSinceFormat
+               << Endl();
+        exit(1);
+    }
+
+    const autodoc::CommandLine &
+        rCommandLine = autodoc::CommandLine::Get_();
     if ( rCommandLine.DoesTransform_SinceTag())
     {
-        // The @since version number shall be interpreted,
+        pCurAtTag->AddToken(let_drNewToken);
 
-        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())
+        if (rCommandLine.DisplayOf_SinceTagValue(sVersion).empty())
         {
             // This is the numbered part, but we don't know it.
         	delete &let_drNewToken;
             throw X_Docu("since", sl().c_str());
         }
     }
-
-    // Either since tags are not specially interpreted, or
-    // we got a known one.
-    pCurAtTag->AddToken(let_drNewToken);
+    else
+    {
+        AddDocuToken2SinceAtTag(let_drNewToken);
+    }
     fCurTokenAddFunction = &SapiDocu_PE::AddDocuToken2SinceAtTag;
 }
 
   	delete &let_drNewToken;
 }
 
+bool
+SapiDocu_PE::CheckVersionSyntax_OOo(const String & i_versionPart1)
+{
+    return      i_versionPart1 == "OOo"
+            OR  i_versionPart1 == "OpenOffice.org";
+}
+
+bool
+SapiDocu_PE::CheckVersionSyntax_Number(const String & i_versionPart2)
+{
+    if (i_versionPart2.length () == 0)
+        return false;
+
+    const char
+        pt = '.';
+    unsigned int countDigit = 0;
+    unsigned int countPoint = 0;
+    const char *
+        pFirstPoint = 0;
+    const char *
+        pLastPoint = 0;
+
+    for ( const char * p = i_versionPart2.begin();
+          *p != 0;
+          ++p )
+    {
+        if ( std::isdigit(*p) )
+            ++countDigit;
+        else if (*p == pt)
+        {
+            if (countPoint == 0)
+                pFirstPoint = p;
+            pLastPoint = p;
+            ++countPoint;
+        }
+    }
+
+    if (    countDigit + countPoint == i_versionPart2.length()         // only digits and points
+        AND pFirstPoint != 0 AND countPoint < 3                         // 1 or 2 points
+        AND pFirstPoint + 1 != pLastPoint                               // there are digits between two points
+        AND *i_versionPart2.begin() != pt AND *(pLastPoint + 1) != 0    // points are surrounded by digits
+        AND (*(pLastPoint + 1) != '0' OR pLastPoint == pFirstPoint) )   // the first micro-digit is not 0
+    {
+        return true;
+    }
+    return false;
+}
+