[Libreoffice-commits] .: 2 commits - codemaker/source cppuhelper/source scp2/source ure/source

Stephan Bergmann sbergmann at kemper.freedesktop.org
Wed Nov 2 09:25:56 PDT 2011


 codemaker/source/cppumaker/cpputype.cxx |  169 +++++++++-----------------------
 codemaker/source/cppumaker/cpputype.hxx |   17 ++-
 cppuhelper/source/bootstrap.cxx         |  163 ++++++++++++++++++++++--------
 scp2/source/ooo/common_brand.scp        |    4 
 scp2/source/ooo/directory_ooo.scp       |   10 +
 scp2/source/ooo/file_ooo.scp            |    6 -
 ure/source/README                       |    5 
 7 files changed, 201 insertions(+), 173 deletions(-)

New commits:
commit b5ec39a65e8b5d78f9f58bc179e9130c81ec347a
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Nov 2 17:01:25 2011 +0100

    Make .hpp/.hdl more robust against accidental include of .hdl instead of .hpp.
    
    .hdl failed to declare the inline cppu_detail_getUnoType functions defined in
    .hpp, which if client code only includes .hdl instead of .hpp could lead to
    runtime failures, now leads to compiler warnings.

diff --git a/codemaker/source/cppumaker/cpputype.cxx b/codemaker/source/cppumaker/cpputype.cxx
index 5b87cc0..e1a524f 100644
--- a/codemaker/source/cppumaker/cpputype.cxx
+++ b/codemaker/source/cppumaker/cpputype.cxx
@@ -125,6 +125,10 @@ void CppuType::addGetCppuTypeIncludes(codemaker::cppumaker::Includes & includes)
     }
 }
 
+void CppuType::dumpDeclaration(FileStream &) throw (CannotDumpException) {
+    OSL_ASSERT(false);
+}
+
 bool CppuType::dumpFiles(CppuOptions * options, rtl::OString const & outPath) {
     return dumpFile(options, ".hdl", m_typeName, outPath)
         && dumpFile(options, ".hpp", m_typeName, outPath);
@@ -433,6 +437,42 @@ void CppuType::dumpInitializer(
     out << ")";
 }
 
+void CppuType::dumpHFileContent(
+    FileStream & out, codemaker::cppumaker::Includes & includes)
+{
+    addDefaultHIncludes(includes);
+    dumpHeaderDefine(out, "HDL");
+    out << "\n";
+    includes.dump(out, 0);
+    out << ("\nnamespace com { namespace sun { namespace star { namespace uno"
+            " { class Type; } } } }\n\n");
+    if (codemaker::cppumaker::dumpNamespaceOpen(out, m_typeName, false)) {
+        out << "\n";
+    }
+    dumpDeclaration(out);
+    if (!(m_typeName.equalsL(
+              RTL_CONSTASCII_STRINGPARAM("com/sun/star/uno/XInterface")) ||
+          m_typeName.equalsL(
+              RTL_CONSTASCII_STRINGPARAM("com/sun/star/uno/Exception")) ||
+          isPolymorphic()))
+    {
+        out << "\n" << indent()
+            << ("inline ::com::sun::star::uno::Type const &"
+                " cppu_detail_getUnoType(");
+        dumpType(out, m_typeName, false, false, true);
+        out << " const *);\n";
+    }
+    if (codemaker::cppumaker::dumpNamespaceClose(out, m_typeName, false)) {
+        out << "\n";
+    }
+    out << "\n";
+    dumpTemplateHead(out);
+    out << "inline ::com::sun::star::uno::Type const & SAL_CALL getCppuType(";
+    dumpType(out, m_typeName, true);
+    dumpTemplateParameters(out);
+    out << " *) SAL_THROW(());\n\n#endif\n";
+}
+
 void CppuType::dumpGetCppuType(FileStream & out) {
     if (m_typeName.equals("com/sun/star/uno/XInterface")) {
         out << indent()
@@ -1268,34 +1308,14 @@ sal_Bool InterfaceType::dumpHFile(
     FileStream& o, codemaker::cppumaker::Includes & includes)
     throw( CannotDumpException )
 {
-    OString headerDefine(dumpHeaderDefine(o, "HDL"));
-    o << "\n";
-
-    addDefaultHIncludes(includes);
     if (m_reader.getMethodCount() != 0) {
         includes.add("com/sun/star/uno/RuntimeException");
     }
-    includes.dump(o, 0);
-    o << ("\nnamespace com { namespace sun { namespace star { namespace uno {\n"
-          "class Type;\n} } } }\n\n");
-
-    if (codemaker::cppumaker::dumpNamespaceOpen(o, m_typeName, false)) {
-        o << "\n";
-    }
-    dumpDeclaration(o);
-    if (codemaker::cppumaker::dumpNamespaceClose(o, m_typeName, false)) {
-        o << "\n";
-    }
-
-    o << "\ninline const ::com::sun::star::uno::Type& SAL_CALL getCppuType( ";
-    dumpType(o, m_typeName, sal_True, sal_False);
-    o << "* ) SAL_THROW( () );\n\n";
-
-    o << "#endif // "<< headerDefine << "\n";
+    dumpHFileContent(o, includes);
     return sal_True;
 }
 
-sal_Bool InterfaceType::dumpDeclaration(FileStream& o)
+void InterfaceType::dumpDeclaration(FileStream& o)
     throw( CannotDumpException )
 {
 //     rtl::OString cppName(translateUnoToCppIdentifier(
@@ -1323,8 +1343,6 @@ sal_Bool InterfaceType::dumpDeclaration(FileStream& o)
 
     dec();
     o << "};\n\n";
-
-    return sal_True;
 }
 
 sal_Bool InterfaceType::dumpHxxFile(
@@ -2283,7 +2301,7 @@ sal_Bool ConstantsType::dumpHFile(
     return sal_True;
 }
 
-sal_Bool ConstantsType::dumpDeclaration(FileStream& o)
+void ConstantsType::dumpDeclaration(FileStream& o)
     throw( CannotDumpException )
 {
     sal_uInt16      fieldCount = m_reader.getFieldCount();
@@ -2302,8 +2320,6 @@ sal_Bool ConstantsType::dumpDeclaration(FileStream& o)
         dumpConstantValue(o, i);
         o << ";\n";
     }
-
-    return sal_True;
 }
 
 sal_Bool ConstantsType::hasConstants()
@@ -2395,38 +2411,11 @@ sal_Bool StructureType::dumpHFile(
     FileStream& o, codemaker::cppumaker::Includes & includes)
     throw( CannotDumpException )
 {
-    OString headerDefine(dumpHeaderDefine(o, "HDL"));
-    o << "\n";
-
-    addDefaultHIncludes(includes);
-    includes.dump(o, 0);
-    o << "\n";
-
-    if (codemaker::cppumaker::dumpNamespaceOpen(o, m_typeName, false)) {
-        o << "\n";
-    }
-
-    dumpDeclaration(o);
-
-    if (codemaker::cppumaker::dumpNamespaceClose(o, m_typeName, false)) {
-        o << "\n";
-    }
-
-    o << "\nnamespace com { namespace sun { namespace star { namespace uno {\n"
-      << "class Type;\n} } } }\n\n";
-
-    dumpTemplateHead(o);
-    o << "inline const ::com::sun::star::uno::Type& SAL_CALL getCppuType( ";
-    dumpType(o, m_typeName, sal_True, sal_False);
-    dumpTemplateParameters(o);
-    o << "* );\n\n";
-
-    o << "#endif // "<< headerDefine << "\n";
-
+    dumpHFileContent(o, includes);
     return sal_True;
 }
 
-sal_Bool StructureType::dumpDeclaration(FileStream& o)
+void StructureType::dumpDeclaration(FileStream& o)
     throw( CannotDumpException )
 {
     o << "\n#ifdef SAL_W32\n"
@@ -2508,8 +2497,6 @@ sal_Bool StructureType::dumpDeclaration(FileStream& o)
     o << "#ifdef SAL_W32\n"
       << "#   pragma pack(pop)\n"
       << "#endif\n\n";
-
-    return sal_True;
 }
 
 sal_Bool StructureType::dumpHxxFile(
@@ -3177,36 +3164,11 @@ sal_Bool ExceptionType::dumpHFile(
     FileStream& o, codemaker::cppumaker::Includes & includes)
     throw( CannotDumpException )
 {
-    OString headerDefine(dumpHeaderDefine(o, "HDL"));
-    o << "\n";
-
-    addDefaultHIncludes(includes);
-    includes.dump(o, 0);
-    o << "\n";
-
-    if (codemaker::cppumaker::dumpNamespaceOpen(o, m_typeName, false)) {
-        o << "\n";
-    }
-
-    dumpDeclaration(o);
-
-    if (codemaker::cppumaker::dumpNamespaceClose(o, m_typeName, false)) {
-        o << "\n";
-    }
-
-    o << "\nnamespace com { namespace sun { namespace star { namespace uno {\n"
-      << "class Type;\n} } } }\n\n";
-
-    o << "inline const ::com::sun::star::uno::Type& SAL_CALL getCppuType( ";
-    dumpType(o, m_typeName, sal_True, sal_False);
-    o << "* ) SAL_THROW( () );\n\n";
-
-    o << "#endif // "<< headerDefine << "\n";
-
+    dumpHFileContent(o, includes);
     return sal_True;
 }
 
-sal_Bool ExceptionType::dumpDeclaration(FileStream& o)
+void ExceptionType::dumpDeclaration(FileStream& o)
     throw( CannotDumpException )
 {
     o << "\nclass CPPU_GCC_DLLPUBLIC_EXPORT " << m_name;
@@ -3291,8 +3253,6 @@ sal_Bool ExceptionType::dumpDeclaration(FileStream& o)
 
     dec();
     o << "};\n\n";
-
-    return sal_True;
 }
 
 sal_Bool ExceptionType::dumpHxxFile(
@@ -3558,36 +3518,11 @@ sal_Bool EnumType::dumpHFile(
     FileStream& o, codemaker::cppumaker::Includes & includes)
     throw( CannotDumpException )
 {
-    OString headerDefine(dumpHeaderDefine(o, "HDL"));
-    o << "\n";
-
-    addDefaultHIncludes(includes);
-    includes.dump(o, 0);
-    o << "\n";
-
-    if (codemaker::cppumaker::dumpNamespaceOpen(o, m_typeName, false)) {
-        o << "\n";
-    }
-
-    dumpDeclaration(o);
-
-    if (codemaker::cppumaker::dumpNamespaceClose(o, m_typeName, false)) {
-        o << "\n";
-    }
-
-    o << "\nnamespace com { namespace sun { namespace star { namespace uno {\n"
-      << "class Type;\n} } } }\n\n";
-
-    o << "inline const ::com::sun::star::uno::Type& SAL_CALL getCppuType( ";
-    dumpType(o, m_typeName, sal_True, sal_False);
-    o << "* ) SAL_THROW( () );\n\n";
-
-    o << "#endif // "<< headerDefine << "\n";
-
+    dumpHFileContent(o, includes);
     return sal_True;
 }
 
-sal_Bool EnumType::dumpDeclaration(FileStream& o)
+void EnumType::dumpDeclaration(FileStream& o)
     throw( CannotDumpException )
 {
     o << "\nenum " << m_name << "\n{\n";
@@ -3621,8 +3556,6 @@ sal_Bool EnumType::dumpDeclaration(FileStream& o)
 
     dec();
     o << "};\n\n";
-
-    return sal_True;
 }
 
 sal_Bool EnumType::dumpHxxFile(
@@ -3800,7 +3733,7 @@ sal_Bool TypeDefType::dumpHFile(
     return sal_True;
 }
 
-sal_Bool TypeDefType::dumpDeclaration(FileStream& o)
+void TypeDefType::dumpDeclaration(FileStream& o)
     throw( CannotDumpException )
 {
     o << "\ntypedef ";
@@ -3809,8 +3742,6 @@ sal_Bool TypeDefType::dumpDeclaration(FileStream& o)
         rtl::OUStringToOString(
             m_reader.getSuperTypeName(0), RTL_TEXTENCODING_UTF8));
     o << " " << m_name << ";\n\n";
-
-    return sal_True;
 }
 
 sal_Bool TypeDefType::dumpHxxFile(
diff --git a/codemaker/source/cppumaker/cpputype.hxx b/codemaker/source/cppumaker/cpputype.hxx
index 2823e9c..c33a0f0 100644
--- a/codemaker/source/cppumaker/cpputype.hxx
+++ b/codemaker/source/cppumaker/cpputype.hxx
@@ -110,6 +110,8 @@ protected:
 
     codemaker::cpp::IdentifierTranslationMode isGlobal() const;
 
+    virtual void dumpDeclaration(FileStream & out) throw (CannotDumpException);
+
     virtual void addSpecialDependencies() {}
 
     virtual bool dumpFiles(CppuOptions * options, rtl::OString const & outPath);
@@ -139,6 +141,9 @@ protected:
     void dumpInitializer(
         FileStream & out, bool parameterized, rtl::OUString const & type) const;
 
+    void dumpHFileContent(
+        FileStream & out, codemaker::cppumaker::Includes & includes);
+
 protected:
     sal_uInt32          m_inheritedMemberCount;
 
@@ -165,7 +170,7 @@ public:
 
     virtual ~InterfaceType();
 
-    sal_Bool    dumpDeclaration(FileStream& o) throw( CannotDumpException );
+    virtual void dumpDeclaration(FileStream& o) throw( CannotDumpException );
     sal_Bool    dumpHFile(FileStream& o, codemaker::cppumaker::Includes & includes) throw( CannotDumpException );
     sal_Bool    dumpHxxFile(FileStream& o, codemaker::cppumaker::Includes & includes) throw( CannotDumpException );
 
@@ -227,7 +232,7 @@ public:
 
     virtual sal_Bool    dump(CppuOptions* pOptions) throw( CannotDumpException );
 
-    sal_Bool            dumpDeclaration(FileStream& o) throw( CannotDumpException );
+    virtual void dumpDeclaration(FileStream& o) throw( CannotDumpException );
     sal_Bool            dumpHFile(FileStream& o, codemaker::cppumaker::Includes & includes) throw( CannotDumpException );
     sal_Bool            dumpHxxFile(FileStream& o, codemaker::cppumaker::Includes & includes) throw( CannotDumpException );
     sal_Bool            hasConstants();
@@ -255,7 +260,7 @@ public:
 
     virtual ~StructureType();
 
-    sal_Bool    dumpDeclaration(FileStream& o) throw( CannotDumpException );
+    virtual void dumpDeclaration(FileStream& o) throw( CannotDumpException );
     sal_Bool    dumpHFile(FileStream& o, codemaker::cppumaker::Includes & includes) throw( CannotDumpException );
     sal_Bool    dumpHxxFile(FileStream& o, codemaker::cppumaker::Includes & includes) throw( CannotDumpException );
 
@@ -293,7 +298,7 @@ public:
 
     virtual ~ExceptionType();
 
-    sal_Bool    dumpDeclaration(FileStream& o) throw( CannotDumpException );
+    virtual void dumpDeclaration(FileStream& o) throw( CannotDumpException );
     sal_Bool    dumpHFile(FileStream& o, codemaker::cppumaker::Includes & includes) throw( CannotDumpException );
     sal_Bool    dumpHxxFile(FileStream& o, codemaker::cppumaker::Includes & includes) throw( CannotDumpException );
 
@@ -309,7 +314,7 @@ public:
 
     virtual ~EnumType();
 
-    sal_Bool    dumpDeclaration(FileStream& o) throw( CannotDumpException );
+    virtual void dumpDeclaration(FileStream& o) throw( CannotDumpException );
     sal_Bool    dumpHFile(FileStream& o, codemaker::cppumaker::Includes & includes) throw( CannotDumpException );
     sal_Bool    dumpHxxFile(FileStream& o, codemaker::cppumaker::Includes & includes) throw( CannotDumpException );
 
@@ -326,7 +331,7 @@ public:
 
     virtual ~TypeDefType();
 
-    sal_Bool    dumpDeclaration(FileStream& o) throw( CannotDumpException );
+    virtual void dumpDeclaration(FileStream& o) throw( CannotDumpException );
     sal_Bool    dumpHFile(FileStream& o, codemaker::cppumaker::Includes & includes) throw( CannotDumpException );
     sal_Bool    dumpHxxFile(FileStream& o, codemaker::cppumaker::Includes & includes) throw( CannotDumpException );
 };
commit 8524330a746da6bd26ca5676b48cdce6bb722380
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Nov 2 16:57:23 2011 +0100

    Simplify addition of optional components to URE_MORE_{SERVICES,TYPES}.
    
    Those bootstrap variables now support <XXX>* syntax to include all files (non-
    recursively) contained in the directory denoted by XXX.  Optional components can
    put their data simply into program/services/ and program/types/.

diff --git a/cppuhelper/source/bootstrap.cxx b/cppuhelper/source/bootstrap.cxx
index 90a16af..7aefa0b 100644
--- a/cppuhelper/source/bootstrap.cxx
+++ b/cppuhelper/source/bootstrap.cxx
@@ -75,6 +75,8 @@ using namespace ::osl;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 
+namespace css = com::sun::star;
+
 namespace cppu
 {
 
@@ -198,6 +200,105 @@ OUString findBootstrapArgument(
     return result;
 }
 
+css::uno::Reference< css::registry::XSimpleRegistry > readRdbFile(
+    rtl::OUString const & url, bool fatalErrors,
+    css::uno::Reference< css::registry::XSimpleRegistry > const & lastRegistry,
+    css::uno::Reference< css::lang::XSingleServiceFactory > const &
+        simpleRegistryFactory,
+    css::uno::Reference< css::lang::XSingleServiceFactory > const &
+        nestedRegistryFactory)
+{
+    OSL_ASSERT(simpleRegistryFactory.is() && nestedRegistryFactory.is());
+    try {
+        css::uno::Reference< css::registry::XSimpleRegistry > simple(
+            simpleRegistryFactory->createInstance(), css::uno::UNO_QUERY_THROW);
+        simple->open(url, true, false);
+        if (lastRegistry.is()) {
+            css::uno::Reference< css::registry::XSimpleRegistry > nested(
+                nestedRegistryFactory->createInstance(),
+                css::uno::UNO_QUERY_THROW);
+            css::uno::Sequence< css::uno::Any > args(2);
+            args[0] <<= lastRegistry;
+            args[1] <<= simple;
+            css::uno::Reference< css::lang::XInitialization >(
+                nested, css::uno::UNO_QUERY_THROW)->
+                initialize(args);
+            return nested;
+        } else {
+            return simple;
+        }
+    } catch (css::registry::InvalidRegistryException & e) {
+        (void) e; // avoid warnings
+        OSL_TRACE(
+            OSL_LOG_PREFIX "warning, could not open \"%s\": \"%s\"",
+            rtl::OUStringToOString(url, RTL_TEXTENCODING_UTF8).getStr(),
+            rtl::OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8).getStr());
+        if (fatalErrors) {
+            throw;
+        }
+        return lastRegistry;
+    }
+}
+
+Reference< registry::XSimpleRegistry > readRdbDirectory(
+    rtl::OUString const & url, bool fatalErrors,
+    css::uno::Reference< css::registry::XSimpleRegistry > const & lastRegistry,
+    css::uno::Reference< css::lang::XSingleServiceFactory > const &
+        simpleRegistryFactory,
+    css::uno::Reference< css::lang::XSingleServiceFactory > const &
+        nestedRegistryFactory)
+{
+    OSL_ASSERT(simpleRegistryFactory.is() && nestedRegistryFactory.is());
+    osl::Directory dir(url);
+    switch (dir.open()) {
+    case osl::FileBase::E_None:
+        break;
+    case osl::FileBase::E_NOENT:
+        if (!fatalErrors) {
+            return lastRegistry;
+        }
+        // fall through
+    default:
+        throw css::uno::RuntimeException(
+            (rtl::OUString(
+                RTL_CONSTASCII_USTRINGPARAM("cannot open directory ")) +
+             url),
+            css::uno::Reference< css::uno::XInterface >());
+    }
+    for (css::uno::Reference< css::registry::XSimpleRegistry > last(
+             lastRegistry);;)
+    {
+        osl::DirectoryItem i;
+        switch (dir.getNextItem(i, SAL_MAX_UINT32)) {
+        case osl::FileBase::E_None:
+            break;
+        case osl::FileBase::E_NOENT:
+            return last;
+        default:
+            throw css::uno::RuntimeException(
+                (rtl::OUString(
+                    RTL_CONSTASCII_USTRINGPARAM("cannot iterate directory ")) +
+                 url),
+                css::uno::Reference< css::uno::XInterface >());
+        }
+        osl::FileStatus stat(
+            osl_FileStatus_Mask_Type | osl_FileStatus_Mask_FileName |
+            osl_FileStatus_Mask_FileURL);
+        if (i.getFileStatus(stat) != osl::FileBase::E_None) {
+            throw css::uno::RuntimeException(
+                (rtl::OUString(
+                    RTL_CONSTASCII_USTRINGPARAM("cannot stat in directory ")) +
+                 url),
+                css::uno::Reference< css::uno::XInterface >());
+        }
+        if (stat.getFileType() != osl::FileStatus::Directory) { //TODO: symlinks
+            last = readRdbFile(
+                stat.getFileURL(), fatalErrors, last, simpleRegistryFactory,
+                nestedRegistryFactory);
+        }
+    }
+}
+
 Reference< registry::XSimpleRegistry > nestRegistries(
     const OUString &baseDir,
     const Reference< lang::XSingleServiceFactory > & xSimRegFac,
@@ -238,54 +339,30 @@ Reference< registry::XSimpleRegistry > nestRegistries(
         OUString rdb_name = (index == -1) ? csl_rdbs : csl_rdbs.copy(0, index);
         csl_rdbs = (index == -1) ? OUString() : csl_rdbs.copy(index + 1);
 
-        if (! rdb_name.getLength())
+        if (rdb_name.isEmpty()) {
             continue;
+        }
 
-        bool optional = ('?' == rdb_name[ 0 ]);
-        if (optional)
-            rdb_name = rdb_name.copy( 1 );
-
-        try
-        {
-            Reference<registry::XSimpleRegistry> simpleRegistry(
-                xSimRegFac->createInstance(), UNO_QUERY_THROW );
-
-            osl::FileBase::getAbsoluteFileURL(baseDir, rdb_name, rdb_name);
-            simpleRegistry->open(rdb_name, sal_True, sal_False);
-
-            if(lastRegistry.is())
-            {
-                Reference< registry::XSimpleRegistry > nestedRegistry(
-                    xNesRegFac->createInstance(), UNO_QUERY );
-                Reference< lang::XInitialization > nestedRegistry_xInit(
-                    nestedRegistry, UNO_QUERY );
-
-                Sequence<Any> aArgs(2);
-                aArgs[0] <<= lastRegistry;
-                aArgs[1] <<= simpleRegistry;
-
-                nestedRegistry_xInit->initialize(aArgs);
-
-                lastRegistry = nestedRegistry;
-            }
-            else
-                lastRegistry = simpleRegistry;
+        bool fatalErrors = !bFallenBack;
+        if (rdb_name[0] == '?') {
+            rdb_name = rdb_name.copy(1);
+            fatalErrors = false;
         }
-        catch(registry::InvalidRegistryException & e)
-        {
-            (void) e; // avoid warnings
-            OSL_TRACE(
-                OSL_LOG_PREFIX "warning, could not open \"%s\": \"%s\"",
-                OUStringToOString(rdb_name, RTL_TEXTENCODING_UTF8).getStr(),
-                OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8).getStr());
-            if (! optional)
-            {
-                // if a registry was explicitly given, the exception shall fly
-                if( ! bFallenBack )
-                    throw;
-            }
 
+        bool directory = rdb_name.getLength() >= 3 && rdb_name[0] == '<' &&
+            rdb_name[rdb_name.getLength() - 2] == '>' &&
+            rdb_name[rdb_name.getLength() -1] == '*';
+        if (directory) {
+            rdb_name = rdb_name.copy(1, rdb_name.getLength() - 3);
         }
+
+        osl::FileBase::getAbsoluteFileURL(baseDir, rdb_name, rdb_name);
+
+        lastRegistry = directory
+            ? readRdbDirectory(
+                rdb_name, fatalErrors, lastRegistry, xSimRegFac, xNesRegFac)
+            : readRdbFile(
+                rdb_name, fatalErrors, lastRegistry, xSimRegFac, xNesRegFac);
     }
     while(index != -1 && csl_rdbs.getLength()); // are there more rdbs in list?
 
diff --git a/scp2/source/ooo/common_brand.scp b/scp2/source/ooo/common_brand.scp
index 9b75f36..710cdb8 100644
--- a/scp2/source/ooo/common_brand.scp
+++ b/scp2/source/ooo/common_brand.scp
@@ -1168,7 +1168,7 @@ ProfileItem gid_Brand_Profileitem_Fundamental_Ure_More_Types
     ProfileID = gid_Brand_Profile_Fundamental_Ini;
     Section = "Bootstrap";
     Key = "URE_MORE_TYPES";
-    Value = "$ORIGIN/offapi.rdb $ORIGIN/oovbaapi.rdb ${${$ORIGIN/" PROFILENAME(uno) ":PKG_UserUnoFile}:UNO_TYPES} ${${$ORIGIN/" PROFILENAME(uno) ":PKG_SharedUnoFile}:UNO_TYPES} ${${$ORIGIN/" PROFILENAME(uno) ":PKG_BundledUnoFile}:UNO_TYPES}";
+    Value = "<$ORIGIN/types>* ${${$ORIGIN/" PROFILENAME(uno) ":PKG_UserUnoFile}:UNO_TYPES} ${${$ORIGIN/" PROFILENAME(uno) ":PKG_SharedUnoFile}:UNO_TYPES} ${${$ORIGIN/" PROFILENAME(uno) ":PKG_BundledUnoFile}:UNO_TYPES}";
 End
 
 ProfileItem gid_Brand_Profileitem_Fundamental_Ure_More_Services
@@ -1176,7 +1176,7 @@ ProfileItem gid_Brand_Profileitem_Fundamental_Ure_More_Services
     ProfileID = gid_Brand_Profile_Fundamental_Ini;
     Section = "Bootstrap";
     Key = "URE_MORE_SERVICES";
-    Value = "${${$ORIGIN/" PROFILENAME(uno) ":PKG_UserUnoFile}:UNO_SERVICES} ${${$ORIGIN/" PROFILENAME(uno) ":PKG_SharedUnoFile}:UNO_SERVICES} ${${$ORIGIN/" PROFILENAME(uno) ":PKG_BundledUnoFile}:UNO_SERVICES} $ORIGIN/services.rdb";
+    Value = "${${$ORIGIN/" PROFILENAME(uno) ":PKG_UserUnoFile}:UNO_SERVICES} ${${$ORIGIN/" PROFILENAME(uno) ":PKG_SharedUnoFile}:UNO_SERVICES} ${${$ORIGIN/" PROFILENAME(uno) ":PKG_BundledUnoFile}:UNO_SERVICES} <$ORIGIN/services>*";
 End
 
 ProfileItem gid_Brand_Profileitem_Fundamental_Ure_More_Java_Types
diff --git a/scp2/source/ooo/directory_ooo.scp b/scp2/source/ooo/directory_ooo.scp
index a25b2d7..afd11a9 100644
--- a/scp2/source/ooo/directory_ooo.scp
+++ b/scp2/source/ooo/directory_ooo.scp
@@ -1435,3 +1435,13 @@ Directory gid_Dir_Template_Common_Presnt
     ParentID = gid_Dir_Template_Common;
     DosName = "presnt";
 End
+
+Directory gid_Brand_Dir_Program_Services
+    ParentID = gid_Brand_Dir_Program;
+    DosName = "services";
+End
+
+Directory gid_Brand_Dir_Program_Types
+    ParentID = gid_Brand_Dir_Program;
+    DosName = "types";
+End
diff --git a/scp2/source/ooo/file_ooo.scp b/scp2/source/ooo/file_ooo.scp
index 34ed8a9..a8e0d88 100644
--- a/scp2/source/ooo/file_ooo.scp
+++ b/scp2/source/ooo/file_ooo.scp
@@ -629,14 +629,14 @@ End
 
 File gid_File_Rdb_Offapi
     TXT_FILE_BODY;
-    Dir = gid_Brand_Dir_Program;
+    Dir = gid_Brand_Dir_Program_Types;
     Styles = (PACKED);
     Name = "offapi.rdb";
 End
 
 File gid_File_Rdb_TypesVba
     TXT_FILE_BODY;
-    Dir = gid_Brand_Dir_Program;
+    Dir = gid_Brand_Dir_Program_Types;
     Styles = (PACKED, OVERWRITE);
     Name = "oovbaapi.rdb";
 End
@@ -1142,7 +1142,7 @@ End
 File gid_Starregistry_Services_Rdb
     TXT_FILE_BODY;
     Name = "services.rdb";
-    Dir = gid_Brand_Dir_Program;
+    Dir = gid_Brand_Dir_Program_Services;
     Styles = (PACKED);
 End
 
diff --git a/ure/source/README b/ure/source/README
index 64fa40b..1463e04 100644
--- a/ure/source/README
+++ b/ure/source/README
@@ -273,6 +273,11 @@ types.rdb and services.rdb files.  That is, you cannot store additional
 types.rdb and services.rdb files in a Documents and Settings\All
 Users\Application Data\URE directory.
 
+URE_MORE_TYPES and URE_MORE_SERVICES each contain zero or more space-separated
+URI descriptors.  A URI descriptor is either a URI (denoting an individual file)
+or a URI embeded in "<" and ">*" (denoting all the files contained non-
+recursively within the directory denoted by the given URI).
+
 The Java UNO environment needs type information in the form of Java class files
 instead of rdb files.  Additional types are searched for in any URLs listed in
 the public deployment variable URE_MORE_JAVA_TYPES.


More information about the Libreoffice-commits mailing list