Makefile.in                                                                |   
28 
 Repository.mk                                                              |   
 6 
 configure.ac                                                               |   
15 
 external/python3/python-3.3.0-darwin.patch.1                               |   
22 
 instsetoo_native/CustomTarget_setup.mk                                     |   
 2 
 lo.xcent.in                                                                |   
 9 
 pyuno/source/loader/pyuno_loader.cxx                                       |   
 6 
 registry/Module_registry.mk                                                |   
 6 
 scp2/source/ooo/common_brand.scp                                           |   
 6 
 scp2/source/ooo/file_ooo.scp                                               |   
 2 
 scripting/java/com/sun/star/script/framework/container/ScriptMetaData.java |   
 2 
 scripting/java/com/sun/star/script/framework/provider/ScriptProvider.java  |   
 8 
 scripting/source/pyprov/pythonscript.py                                    |   
 2 
 sfx2/source/view/viewsh.cxx                                                |   
12 
 solenv/bin/macosx-codesign-app-bundle                                      |  
108 -
 solenv/gbuild/platform/macosx.mk                                           |   
 9 
 sysui/desktop/macosx/Info.plist.in                                         |  
872 ++++------
 17 files changed, 539 insertions(+), 576 deletions(-)

New commits:
commit cbc0f3c220670dad1c3348545d16d869168c8e47
Author: Tor Lillqvist <t...@collabora.com>
Date:   Tue Sep 23 20:21:47 2014 +0300

    Drop ui-previewer and unopkg.bin in the sandboxed (Mac App Store) case
    
    Change-Id: I99b7d0d53a2774ccbf0a0c353322e677c4fe43f4

diff --git a/scp2/source/ooo/common_brand.scp b/scp2/source/ooo/common_brand.scp
index ffc0729..0d7e383 100644
--- a/scp2/source/ooo/common_brand.scp
+++ b/scp2/source/ooo/common_brand.scp
@@ -612,12 +612,14 @@ Unixlink gid_Brand_Unixlink_Unopkg
 End
 #endif
 
+#if !defined ENABLE_MACOSX_SANDBOX
 File gid_Brand_File_Bin_Unopkg
     BIN_FILE_BODY;
     Dir = gid_Brand_Dir_Program;
     Styles = (PACKED);
     Name = "unopkg.bin";
 End
+#endif
 
 #if defined ENABLE_NPAPI_INTO_BROWSER
 File gid_Brand_File_Lib_Npsoplugin
diff --git a/scp2/source/ooo/file_ooo.scp b/scp2/source/ooo/file_ooo.scp
index 9b11d66..1cb2317 100644
--- a/scp2/source/ooo/file_ooo.scp
+++ b/scp2/source/ooo/file_ooo.scp
@@ -135,6 +135,7 @@ File gid_File_Exe_Nsplugin
 End
 #endif
 
+#if !defined ENABLE_MACOSX_SANDBOX
 File gid_File_Bin_UIPreviewer
     BIN_FILE_BODY;
     Dir = gid_Brand_Dir_Program;
@@ -145,6 +146,7 @@ File gid_File_Bin_UIPreviewer
     Name = "ui-previewer.exe";
   #endif
 End
+#endif
 
 #if defined UNX && !defined ENABLE_MACOSX_MACLIKE_APP_STRUCTURE
 
commit 3a0cb9e31977c8462b4e6627f0f3b170a3544318
Author: Tor Lillqvist <t...@collabora.com>
Date:   Tue Sep 23 14:57:52 2014 +0300

    Seems that we don't need the com.apple.application-identifier after all
    
    Change-Id: I3bc499b15c31724dca2d49123dcdbec8dfd934f6

diff --git a/lo.xcent.in b/lo.xcent.in
index f804daf..02d8929 100644
--- a/lo.xcent.in
+++ b/lo.xcent.in
@@ -2,8 +2,6 @@
 <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" 
"http://www.apple.com/DTDs/PropertyList-1.0.dtd";>
 <plist version="1.0">
 <dict>
-       <key>com.apple.application-identifier</key>
-       <string>@MACOSX_TEAMID@.@MACOSX_BUNDLE_IDENTIFIER@</string>
        <key>com.apple.security.app-sandbox</key>
        <true/>
        <key>com.apple.security.files.bookmarks.app-scope</key>
commit 935030bd4387171c797d74c0389788f3fc28dae8
Author: Tor Lillqvist <t...@collabora.com>
Date:   Tue Sep 23 12:52:53 2014 +0300

    Make the patch apply
    
    Change-Id: Ib4d7bc4e703a1c67380d6afaa6ab5fc22c43aed9

diff --git a/external/python3/python-3.3.0-darwin.patch.1 
b/external/python3/python-3.3.0-darwin.patch.1
index 78a2e7a..0049305 100644
--- a/external/python3/python-3.3.0-darwin.patch.1
+++ b/external/python3/python-3.3.0-darwin.patch.1
@@ -81,5 +81,5 @@ no /usr/include.
 -      <string>Python</string>
 +      <string>LibreOfficePython</string>
        <key>CFBundleGetInfoString</key>
-       <string>%version%, (c) 2004-2013 Python Software Foundation.</string>
+       <string>%version%, (c) 2004-2014 Python Software Foundation.</string>
        <key>CFBundleHelpBookFolder</key>
commit ff31f1c7e36d4dcdb5e691b5e1b7aa102ee36d2a
Author: Tor Lillqvist <t...@collabora.com>
Date:   Tue Sep 23 00:27:58 2014 +0300

    We need the gengal program at build time
    
    But don't bother shipping it on OS X, at least not in the sandboxed
    (App Store) case.
    
    Change-Id: Id73bef1ba71d126c2d2962fe846e9c31963d6c24
    (cherry picked from commit 11b4f4bfbee257d63f6a52808fb02b903ddea0d5)

diff --git a/Makefile.in b/Makefile.in
index c8ab64b..ec2a9b6 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -314,6 +314,11 @@ ifneq ($(MACOSX_CODESIGNING_IDENTITY),)
 # And with it removed, presumably the other stuff in the Python 
lib/python3.3/config-3.3m probably does not make sense either.
        rm -rf $(TESTINSTALLDIR)/LibreOffice$(if 
$(ENABLE_RELEASE_BUILD),,Dev).app/Contents/Frameworks/LibreOfficePython.framework/Versions/[1-9]*/lib/python[1-9]*/config-[1-9]*
 #
+ifneq ($ENABLE_MACOSX_SANDBOX),)
+# Remove the gengal.bin binary that we don't want
+       rm $(TESTINSTALLDIR)/LibreOffice$(if 
$(ENABLE_RELEASE_BUILD),,Dev).app/Contents/MacOS/gengal.bin
+endif
+#
 # Then use the macosx-codesign-app-bundle script
        @macosx-codesign-app-bundle $(TESTINSTALLDIR)/LibreOffice$(if 
$(ENABLE_RELEASE_BUILD),,Dev).app
 endif
diff --git a/Repository.mk b/Repository.mk
index f112343..291067d 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -82,9 +82,7 @@ $(eval $(call 
gb_Helper_register_executables_for_install,SDK,sdk, \
 ))
 
 $(eval $(call gb_Helper_register_executables_for_install,OOO,ooo, \
-       $(if $(ENABLE_MACOSX_SANDBOX),, \
-               gengal \
-       )\
+       gengal \
 ))
 
 $(eval $(call gb_Helper_register_executables,OOO, \
diff --git a/svx/Module_svx.mk b/svx/Module_svx.mk
index 1d600c4..1981e92 100644
--- a/svx/Module_svx.mk
+++ b/svx/Module_svx.mk
@@ -33,7 +33,6 @@ $(eval $(call gb_Module_add_l10n_targets,svx,\
 ))
 
 ifneq (,$(filter DESKTOP,$(BUILD_TYPE)))
-ifeq (,$(ENABLE_MACOSX_SANDBOX))
 $(eval $(call gb_Module_add_targets,svx,\
     Executable_gengal \
     Package_gengal \
@@ -41,7 +40,6 @@ $(eval $(call gb_Module_add_targets,svx,\
         Executable_pixelctl) \
 ))
 endif
-endif
 
 ifneq ($(OOO_JUNIT_JAR),)
 $(eval $(call gb_Module_add_subsequentcheck_targets,svx,\
commit eb0f2f2e7eae0c885f61ebde7fa0ade2d305a05a
Author: Tor Lillqvist <t...@collabora.com>
Date:   Mon Sep 22 00:07:53 2014 +0300

    The com.apple.application-identifier value should be prefixed with the 
teamid
    
    Change-Id: I6b58492ba051bb5032870aa47cfacbe3a292e31f

diff --git a/configure.ac b/configure.ac
index 39ffa4b..3452a1f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1300,6 +1300,12 @@ AC_ARG_ENABLE(macosx-sandbox,
          adherence to App Store rules.]),
 ,)
 
+AC_ARG_WITH(macosx-teamid,
+    AS_HELP_STRING([--with-macosx-teamid=<teamid>],
+        [The "team id" to be used for com.apple.application-identifier
+         in the entitlements when building a sandboxed LibreOffice.]),
+,)
+
 AC_ARG_ENABLE(canonical-installation-tree-structure,
     AS_HELP_STRING([--enable-canonical-installation-tree-structure],
         [Make the installation tree structure be more canonical for
@@ -3059,8 +3065,14 @@ if test $_os = Darwin; then
 
     AC_MSG_CHECKING([whether to sandbox the application])
 
+    if test -n "$with_macosx_teamid" -a "$with_macosx_teamid != yes -a 
"$with_macosx_teamid != no; then
+        MACOSX_TEAMID="$with_macosx_teamid"
+    fi
+
     if test -z "$MACOSX_CODESIGNING_IDENTITY" -a "$enable_macosx_sandbox" = 
yes; then
         AC_MSG_ERROR([OS X sandboxing requires code signing])
+    elif test -z "$MACOSX_TEAMID" -a "$enable_macosx_sandbox" = yes; then
+        AC_MSG_ERROR([OS X sandboxing requires a team id])
     elif test -n "$ENABLE_JAVA" -a "$enable_macosx_sandbox" = yes; then
         AC_MSG_ERROR([OS X sandboxing (actually App Store rules) disallows use 
of Java])
     elif test -n "$MACOSX_CODESIGNING_IDENTITY" -a "$enable_macosx_sandbox" = 
yes; then
@@ -3098,6 +3110,7 @@ AC_SUBST(MACOSX_CODESIGNING_IDENTITY)
 AC_SUBST(MACOSX_PACKAGE_SIGNING_IDENTITY)
 AC_SUBST(ENABLE_MACOSX_SANDBOX)
 AC_SUBST(MACOSX_BUNDLE_IDENTIFIER)
+AC_SUBST(MACOSX_TEAMID)
 AC_SUBST(MACOSX_APP_NAME)
 AC_SUBST(MACOSX_HIGH_RESOLUTION_VALUE)
 
diff --git a/lo.xcent.in b/lo.xcent.in
index 19802dd..f804daf 100644
--- a/lo.xcent.in
+++ b/lo.xcent.in
@@ -3,7 +3,7 @@
 <plist version="1.0">
 <dict>
        <key>com.apple.application-identifier</key>
-       <string>@MACOSX_BUNDLE_IDENTIFIER@</string>
+       <string>@MACOSX_TEAMID@.@MACOSX_BUNDLE_IDENTIFIER@</string>
        <key>com.apple.security.app-sandbox</key>
        <true/>
        <key>com.apple.security.files.bookmarks.app-scope</key>
commit 2e815da6923c376b774b1a07c0d8e2e528fb08f7
Author: Tor Lillqvist <t...@collabora.com>
Date:   Sun Sep 21 23:55:38 2014 +0300

    We don't build the Apple Remote code when sandboxed
    
    So no need for the related entitlements.
    
    Change-Id: I54ba7c0586ee77f30096b50755a9a85bbb7965a5
    (cherry picked from commit a1379c6d2555c77b1b096165ac2aab42808e90a7)

diff --git a/lo.xcent.in b/lo.xcent.in
index ca636d7..19802dd 100644
--- a/lo.xcent.in
+++ b/lo.xcent.in
@@ -20,13 +20,6 @@
        <true/>
        <key>com.apple.security.device.bluetooth</key>
        <true/>
-       <!-- usb needed for the apple_remote thingie... -->
-       <key>com.apple.security.device.usb</key>
-       <true/>
-       <key>com.apple.security.temporary-exception.apple-events</key>
-       <array>
-               <string>mac.remotecontrols</string>
-       </array>
        <key>com.apple.security.print</key>
        <true/>
 </dict>
commit f8f92797935281871e94c5914f717b05288bbc9a
Author: Tor Lillqvist <t...@collabora.com>
Date:   Sun Sep 21 20:46:03 2014 +0300

    Don't try to write Python bytecode files in case of a read-only installset
    
    It causes annoying messages in the system log in the OS X sandboxed
    case.
    
    Change-Id: I8ae3eb34df2c045bdbdfc63cae9007f973c42537
    (cherry picked from commit 1140e24abe731f2f94bca072147aa570ea686583)

diff --git a/pyuno/source/loader/pyuno_loader.cxx 
b/pyuno/source/loader/pyuno_loader.cxx
index 11b2c78..5b17705 100644
--- a/pyuno/source/loader/pyuno_loader.cxx
+++ b/pyuno/source/loader/pyuno_loader.cxx
@@ -17,6 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include <config_features.h>
 #include <config_folders.h>
 
 #include <pyuno/pyuno.hxx>
@@ -219,6 +220,11 @@ Reference< XInterface > CreateInstance( const Reference< 
XComponentContext > & c
 #else
         PyImport_AppendInittab( (char*)"pyuno", initpyuno );
 #endif
+
+#if HAVE_FEATURE_READONLY_INSTALLSET
+        Py_DontWriteBytecodeFlag = 1;
+#endif
+
         // initialize python
         Py_Initialize();
         PyEval_InitThreads();
commit 02c489db6974f4d10ff45138bf7d6fba594447ae
Author: Tor Lillqvist <t...@collabora.com>
Date:   Sun Sep 21 14:49:11 2014 +0300

    Disable the email sending menu entries when sandboxed on OS X
    
    The way we send email doesn't work anyway in a sandboxed app on OS X
    anyway. If we want to offer the functionality, we need to implement it
    in an OS X -specific way, perhaps using the Scripting Target
    functionality of Mail.app.
    
    What we need, to be really "native" in this regards on OS X, would be
    to have a "share" functionality that would in addition to sharing
    through email offer AirDrop, Facebook, Twitter etc. Like Apple's own
    apps. Quite possibly there are system APIs that automate much of
    that. But they probably require your app to be more "native" in other
    ways, too, like using NSDocument etc. Later...
    
    Change-Id: Id1424377b7d493d4ec696f3242dae55a2a67dfc7
    (cherry picked from commit 6bc38d2758c3535ed32bfe0bd2a475b7938f6fc1)

diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index c8b8eb7..1882f08 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -17,6 +17,8 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include <config_features.h>
+
 #include <svl/stritem.hxx>
 #include <svl/eitem.hxx>
 #include <svl/whiter.hxx>
@@ -784,6 +786,16 @@ void SfxViewShell::GetState_Impl( SfxItemSet &rSet )
     {
         switch ( nSID )
         {
+#if HAVE_FEATURE_MACOSX_SANDBOX
+            case SID_BLUETOOTH_SENDDOC:
+            case SID_MAIL_SENDDOC:
+            case SID_MAIL_SENDDOCASFORMAT:
+            case SID_MAIL_SENDDOCASMS:
+            case SID_MAIL_SENDDOCASOOO:
+            case SID_MAIL_SENDDOCASPDF:
+                rSet.DisableItem(nSID);
+                break;
+#endif
             // Printer functions
             case SID_PRINTDOC:
             case SID_PRINTDOCDIRECT:
commit 785ad9ac374cfa41ff3f4b565805a88198d541a5
Author: Tor Lillqvist <t...@collabora.com>
Date:   Sat Sep 20 23:40:06 2014 +0300

    Drop the deprecated CFBundleDocumentTypes and just have the UTI stuff
    
    Add icon file entries to the UTIs, and add missing UTIs. Let's hope
    CFBundleDocumentTypes really *is* deprecated and it works to just have
    the UTI thingies...
    
    Change-Id: Ia3c5cfd674ee6ae57621b63bceeea6ec50a0e6fe
    (cherry picked from commit b1df4e4cd39a7aa64d4ede3e1090e703e0c6c760)

diff --git a/sysui/desktop/macosx/Info.plist.in 
b/sysui/desktop/macosx/Info.plist.in
index 6d8edd6..60c5934 100755
--- a/sysui/desktop/macosx/Info.plist.in
+++ b/sysui/desktop/macosx/Info.plist.in
@@ -21,7 +21,7 @@
 <dict>
        <key>CFBundleDevelopmentRegion</key>
        <string>English</string>
-       <!-- UTI declarations for OS X >= 10.4  -->
+
        <key>UTExportedTypeDeclarations</key>
        <array>
                <!-- Writer documents -->
@@ -48,6 +48,8 @@
                                        
<string>application/vnd.stardivision.writer</string>
                                </array>
                        </dict>
+                       <key>UTTypeIconFile</key>
+                       <string>text.icns</string>
                </dict>
                <dict>
                        <key>UTTypeIdentifier</key>
@@ -70,6 +72,8 @@
                                        
<string>application/vnd.oasis.opendocument.text</string>
                                </array>
                        </dict>
+                       <key>UTTypeIconFile</key>
+                       <string>oasis-text.icns</string>
                </dict>
 
                <!-- Calc documents -->
@@ -96,6 +100,8 @@
                                        
<string>application/vnd.stardivision.calc</string>
                                </array>
                        </dict>
+                       <key>UTTypeIconFile</key>
+                       <string>spreadsheet.icns</string>
                </dict>
                <dict>
                        <key>UTTypeIdentifier</key>
@@ -118,6 +124,8 @@
                                        
<string>application/vnd.oasis.opendocument.spreadsheet</string>
                                </array>
                        </dict>
+                       <key>UTTypeIconFile</key>
+                       <string>oasis-spreadsheet.icns</string>
                </dict>
 
                <!-- Impress documents -->
@@ -146,6 +154,8 @@
                                        
<string>application/vnd.stardivision.impress-packed</string>
                                </array>
                        </dict>
+                       <key>UTTypeIconFile</key>
+                       <string>presentation.icns</string>
                </dict>
                <dict>
                        <key>UTTypeIdentifier</key>
@@ -168,6 +178,8 @@
                                        
<string>application/vnd.oasis.opendocument.presentation</string>
                                </array>
                        </dict>
+                       <key>UTTypeIconFile</key>
+                       <string>oasis-presentation.icns</string>
                </dict>
 
                <!-- Draw documents -->
@@ -194,6 +206,8 @@
                                        
<string>application/vnd.stardivision.draw</string>
                                </array>
                        </dict>
+                       <key>UTTypeIconFile</key>
+                       <string>drawing.icns</string>
                </dict>
                <dict>
                        <key>UTTypeIdentifier</key>
@@ -216,6 +230,8 @@
                                        
<string>application/vnd.oasis.opendocument.graphics</string>
                                </array>
                        </dict>
+                       <key>UTTypeIconFile</key>
+                       <string>oasis-drawing.icns</string>
                </dict>
 
                <!-- Chart documents -->
@@ -247,7 +263,7 @@
                        <key>UTTypeIdentifier</key>
                        <string>org.openoffice.text-master</string>
                        <key>UTTypeDescription</key>
-                       <string>OpenOffice.org 1.0 Master Document</string>
+                       <string>OpenOffice.org 1.0 Master</string>
                        <key>UTTypeConformsTo</key>
                        <array>
                                <string>public.data</string>
@@ -264,6 +280,8 @@
                                        
<string>application/vnd.sun.xml.writer.global</string>
                                </array>
                        </dict>
+                       <key>UTTypeIconFile</key>
+                       <string>master-document.icns</string>
                </dict>
                <dict>
                        <key>UTTypeIdentifier</key>
@@ -286,6 +304,8 @@
                                        
<string>application/vnd.oasis.opendocument.text-master</string>
                                </array>
                        </dict>
+                       <key>UTTypeIconFile</key>
+                       <string>oasis-master-document.icns</string>
                </dict>
 
                <!-- Math documents -->
@@ -312,6 +332,8 @@
                                        
<string>application/vnd.stardivision.math</string>
                                </array>
                        </dict>
+                       <key>UTTypeIconFile</key>
+                       <string>formula.icns</string>
                </dict>
                <dict>
                        <key>UTTypeIdentifier</key>
@@ -334,6 +356,8 @@
                                        
<string>application/vnd.oasis.opendocument.formula</string>
                                </array>
                        </dict>
+                       <key>UTTypeIconFile</key>
+                       <string>oasis-formula.icns</string>
                </dict>
 
                <!-- Text template documents -->
@@ -358,6 +382,8 @@
                                        
<string>application/vnd.sun.xml.writer.template</string>
                                </array>
                        </dict>
+                       <key>UTTypeIconFile</key>
+                       <string>text-template.icns</string>
                </dict>
                <dict>
                        <key>UTTypeIdentifier</key>
@@ -380,6 +406,8 @@
                                        
<string>application/vnd.oasis.opendocument.text-template</string>
                                </array>
                        </dict>
+                       <key>UTTypeIconFile</key>
+                       <string>oasis-text-template.icns</string>
                </dict>
 
                <!-- Spreadsheet template documents -->
@@ -404,6 +432,8 @@
                                        
<string>application/vnd.sun.xml.calc.template</string>
                                </array>
                        </dict>
+                       <key>UTTypeIconFile</key>
+                       <string>spreadsheet-template.icns</string>
                </dict>
                <dict>
                        <key>UTTypeIdentifier</key>
@@ -426,6 +456,8 @@
                                        
<string>application/vnd.oasis.opendocument.spreadsheet-template</string>
                                </array>
                        </dict>
+                       <key>UTTypeIconFile</key>
+                       <string>oasis-spreadsheet-template.icns</string>
                </dict>
 
                <!-- Presentation template documents -->
@@ -450,6 +482,8 @@
                                        
<string>application/vnd.sun.xml.impress.template</string>
                                </array>
                        </dict>
+                       <key>UTTypeIconFile</key>
+                       <string>presentation-template.icns</string>
                </dict>
                <dict>
                        <key>UTTypeIdentifier</key>
@@ -472,6 +506,8 @@
                                        
<string>application/vnd.oasis.opendocument.presentation-template</string>
                                </array>
                        </dict>
+                       <key>UTTypeIconFile</key>
+                       <string>oasis-presentation-template.icns</string>
                </dict>
 
                <!-- Drawing template documents -->
@@ -496,6 +532,8 @@
                                        
<string>application/vnd.sun.xml.draw.template</string>
                                </array>
                        </dict>
+                       <key>UTTypeIconFile</key>
+                       <string>drawing-template.icns</string>
                </dict>
                <dict>
                        <key>UTTypeIdentifier</key>
@@ -518,6 +556,8 @@
                                        
<string>application/vnd.oasis.opendocument.graphics-template</string>
                                </array>
                        </dict>
+                       <key>UTTypeIconFile</key>
+                       <string>oasis-drawing-template.icns</string>
                </dict>
 
                <!-- Base documents -->
@@ -542,6 +582,8 @@
                                        
<string>application/vnd.oasis.opendocument.database</string>
                                </array>
                        </dict>
+                       <key>UTTypeIconFile</key>
+                       <string>oasis-database.icns</string>
                </dict>
 
                <!-- Extensions -->
@@ -566,12 +608,36 @@
                                        
<string>application/vnd.openofficeorg.extension</string>
                                </array>
                        </dict>
+                       <key>UTTypeIconFile</key>
+                       <string>extension.icns</string>
                </dict>
        </array>
 
        <key>UTImportedTypeDeclarations</key>
        <array>
-               <!-- Microsoft Word XML -->
+               <!-- Microsoft Word Template -->
+               <dict>
+                       <key>UTTypeConformsTo</key>
+                       <array>
+                               <string>public.composite-content</string>
+                       </array>
+                       <key>UTTypeDescription</key>
+                       <string>Microsoft Word Template</string>
+                       <key>UTTypeIdentifier</key>
+                       <string>com.microsoft.word.dot</string>
+                       <key>UTTypeTagSpecification</key>
+                       <dict>
+                               <key>public.filename-extension</key>
+                               <array>
+                                       <string>dot</string>
+                               </array>
+                               <key>public.mime-type</key>
+                               <array>
+                                       <string>application/msword</string> 
<!-- ??? -->
+                               </array>
+                       </dict>
+               </dict>
+               <!-- OOXML wordprocessing -->
                <dict>
                        <key>UTTypeConformsTo</key>
                        <array>
@@ -663,7 +729,7 @@
                        </dict>
                </dict>
 
-               <!-- Microsoft Excel XML -->
+               <!-- OOXML spreadsheet -->
                <dict>
                        <key>UTTypeConformsTo</key>
                        <array>
@@ -778,7 +844,7 @@
                        </dict>
                </dict>
 
-               <!-- Microsoft Powerpoint XML -->
+               <!-- OOXML presentation -->
                <dict>
                        <key>UTTypeConformsTo</key>
                        <array>
@@ -829,7 +895,6 @@
                        <array>
                                <string>org.openxmlformats.openxml</string>
                                <string>public.presentation</string>
-                               <string>public.executable</string>
                        </array>
                        <key>UTTypeDescription</key>
                        <string>Office Open XML presentation template</string>
@@ -870,865 +935,349 @@
                                </array>
                        </dict>
                </dict>
-       </array>
 
-       <!-- Document type declaration for OS X < 10.4 -->
-       <key>CFBundleDocumentTypes</key>
-       <array>
+               <!-- Others -->
                <dict>
-                       <key>CFBundleTypeExtensions</key>
-                       <array>
-                               <string>sxw</string>
-                               <string>sdw</string>
-                       </array>
-                       <key>CFBundleTypeMIMETypes</key>
+                       <key>UTTypeConformsTo</key>
                        <array>
-                               <string>application/vnd.sun.xml.writer</string>
-                               
<string>application/vnd.stardivision.writer</string>
+                               <string>public.data</string>
+                               <string>public.content</string>
                        </array>
-                       <key>CFBundleTypeIconFile</key>
-                       <string>text.icns</string>
-                       <key>CFBundleTypeName</key>
-                       <string>OpenOffice.org 1.0 Text</string>
-                       <key>CFBundleTypeRole</key>
-                       <string>Editor</string>
-                       <key>LSIsAppleDefaultForType</key>
-                       <true/>
+                       <key>UTTypeDescription</key>
+                       <string>WordPerfect Document</string>
+                       <key>UTTypeIdentifier</key>
+                       <string>org.libreoffice.wpd-document</string>
+                       <key>UTTypeTagSpecification</key>
+                       <dict>
+                               <key>public.filename-extension</key>
+                               <array>
+                                       <string>wpd</string>
+                               </array>
+                               <key>public.mime-type</key>
+                               <array>
+                                       
<string>application/vnd.wordperfect</string>
+                               </array>
+                       </dict>
                </dict>
                <dict>
-                       <key>CFBundleTypeExtensions</key>
-                       <array>
-                               <string>odt</string>
-                       </array>
-                       <key>CFBundleTypeMIMETypes</key>
+                       <key>UTTypeConformsTo</key>
                        <array>
-                               
<string>application/vnd.oasis.opendocument.text</string>
+                               <string>public.data</string>
+                               <string>public.content</string>
                        </array>
-                       <key>CFBundleTypeIconFile</key>
-                       <string>oasis-text.icns</string>
-                       <key>CFBundleTypeName</key>
-                       <string>OpenDocument Text</string>
-                       <key>CFBundleTypeRole</key>
-                       <string>Editor</string>
-                       <key>LSIsAppleDefaultForType</key>
-                       <true/>
+                       <key>UTTypeDescription</key>
+                       <string>PalmDoc eBook </string>
+                       <key>UTTypeIdentifier</key>
+                       <string>org.libreoffice.pdb-document</string>
+                       <key>UTTypeTagSpecification</key>
+                       <dict>
+                               <key>public.filename-extension</key>
+                               <array>
+                                       <string>pdb</string>
+                               </array>
+                               <key>public.mime-type</key>
+                               <array>
+                                       
<string>application/x-aportisdoc</string>
+                               </array>
+                       </dict>
                </dict>
                <dict>
-                       <key>CFBundleTypeExtensions</key>
-                       <array>
-                               <string>sxc</string>
-                               <string>sdc</string>
-                       </array>
-                       <key>CFBundleTypeMIMETypes</key>
+                       <key>UTTypeConformsTo</key>
                        <array>
-                               <string>application/vnd.sun.xml.calc</string>
-                               
<string>application/vnd.stardivision.calc</string>
+                               <string>public.data</string>
+                               <string>public.content</string>
                        </array>
-                       <key>CFBundleTypeIconFile</key>
-                       <string>spreadsheet.icns</string>
-                       <key>CFBundleTypeName</key>
-                       <string>OpenOffice.org 1.0 Spreadsheet</string>
-                       <key>CFBundleTypeRole</key>
-                       <string>Editor</string>
-                       <key>LSIsAppleDefaultForType</key>
-                       <true/>
+                       <key>UTTypeDescription</key>
+                       <string>Hangul WP 97 Document</string>
+                       <key>UTTypeIdentifier</key>
+                       <string>org.libreoffice.hwp-document</string>
+                       <key>UTTypeTagSpecification</key>
+                       <dict>
+                               <key>public.filename-extension</key>
+                               <array>
+                                       <string>hwp</string>
+                               </array>
+                               <key>public.mime-type</key>
+                               <array>
+                                       
<string>application/x-hwp-document</string> <!-- ??? -->
+                               </array>
+                       </dict>
                </dict>
                <dict>
-                       <key>CFBundleTypeExtensions</key>
-                       <array>
-                               <string>ods</string>
-                       </array>
-                       <key>CFBundleTypeMIMETypes</key>
+                       <key>UTTypeConformsTo</key>
                        <array>
-                               
<string>application/vnd.oasis.opendocument.spreadsheet</string>
+                               <string>public.data</string>
+                               <string>public.content</string>
                        </array>
-                       <key>CFBundleTypeIconFile</key>
-                       <string>oasis-spreadsheet.icns</string>
-                       <key>CFBundleTypeName</key>
-                       <string>OpenDocument Spreadsheet</string>
-                       <key>CFBundleTypeRole</key>
-                       <string>Editor</string>
-                       <key>LSIsAppleDefaultForType</key>
-                       <true/>
+                       <key>UTTypeDescription</key>
+                       <string>Microsoft Works for Mac Document (v1 - 
v4)</string>
+                       <key>UTTypeIdentifier</key>
+                       <string>org.libreoffice.wks-document</string>
+                       <key>UTTypeTagSpecification</key>
+                       <dict>
+                               <key>public.filename-extension</key>
+                               <array>
+                                       <string>wps</string>
+                               </array>
+                               <key>public.mime-type</key>
+                               <array>
+                                       
<string>application/vnd.ms-works</string>
+                               </array>
+                       </dict>
                </dict>
                <dict>
-                       <key>CFBundleTypeExtensions</key>
-                       <array>
-                               <string>sxi</string>
-                               <string>sdd</string>
-                               <string>sdp</string>
-                       </array>
-                       <key>CFBundleTypeMIMETypes</key>
+                       <key>UTTypeConformsTo</key>
                        <array>
-                               <string>application/vnd.sun.xml.impress</string>
-                               
<string>application/vnd.stardivision.impress</string>
-                               
<string>application/vnd.stardivision.impress-packed</string>
+                               <string>public.data</string>
+                               <string>public.content</string>
                        </array>
-                       <key>CFBundleTypeIconFile</key>
-                       <string>presentation.icns</string>
-                       <key>CFBundleTypeName</key>
-                       <string>OpenOffice.org 1.0 Presentation</string>
-                       <key>CFBundleTypeRole</key>
-                       <string>Editor</string>
-                       <key>LSIsAppleDefaultForType</key>
-                       <true/>
+                       <key>UTTypeDescription</key>
+                       <string>Data Interchange Format</string>
+                       <key>UTTypeIdentifier</key>
+                       <string>org.libreoffice.dif-document</string>
+                       <key>UTTypeTagSpecification</key>
+                       <dict>
+                               <key>public.filename-extension</key>
+                               <array>
+                                       <string>dif</string>
+                               </array>
+                               <key>public.mime-type</key>
+                               <array>
+                                       
<string>application/x-dif-document</string> <!-- ??? -->
+                               </array>
+                       </dict>
                </dict>
                <dict>
-                       <key>CFBundleTypeExtensions</key>
-                       <array>
-                               <string>odp</string>
-                       </array>
-                       <key>CFBundleTypeMIMETypes</key>
+                       <key>UTTypeConformsTo</key>
                        <array>
-                               
<string>application/vnd.oasis.opendocument.presentation</string>
+                               <string>public.data</string>
+                               <string>public.content</string>
                        </array>
-                       <key>CFBundleTypeIconFile</key>
-                       <string>oasis-presentation.icns</string>
-                       <key>CFBundleTypeName</key>
-                       <string>OpenDocument Presentation</string>
-                       <key>CFBundleTypeRole</key>
-                       <string>Editor</string>
-                       <key>LSIsAppleDefaultForType</key>
-                       <true/>
+                       <key>UTTypeDescription</key>
+                       <string>SYLK Document</string>
+                       <key>UTTypeIdentifier</key>
+                       <string>org.libreoffice.slk-document</string>
+                       <key>UTTypeTagSpecification</key>
+                       <dict>
+                               <key>public.filename-extension</key>
+                               <array>
+                                       <string>slk</string>
+                               </array>
+                               <key>public.mime-type</key>
+                               <array>
+                                       
<string>application/x-slk-document</string> <!-- ??? -->
+                               </array>
+                       </dict>
                </dict>
                <dict>
-                       <key>CFBundleTypeExtensions</key>
-                       <array>
-                               <string>sxd</string>
-                               <string>sda</string>
-                       </array>
-                       <key>CFBundleTypeMIMETypes</key>
+                       <key>UTTypeConformsTo</key>
                        <array>
-                               <string>application/vnd.sun.xml.draw</string>
-                               
<string>application/vnd.stardivision.draw</string>
+                               <string>public.data</string>
+                               <string>public.content</string>
                        </array>
-                       <key>CFBundleTypeIconFile</key>
-                       <string>drawing.icns</string>
-                       <key>CFBundleTypeName</key>
-                       <string>OpenOffice.org 1.0 Drawing</string>
-                       <key>CFBundleTypeRole</key>
-                       <string>Editor</string>
-                       <key>LSIsAppleDefaultForType</key>
-                       <true/>
+                       <key>UTTypeDescription</key>
+                       <string>Comma-Separated Value Document</string>
+                       <key>UTTypeIdentifier</key>
+                       <string>org.libreoffice.csv-document</string>
+                       <key>UTTypeTagSpecification</key>
+                       <dict>
+                               <key>public.filename-extension</key>
+                               <array>
+                                       <string>csv</string>
+                               </array>
+                               <key>public.mime-type</key>
+                               <array>
+                                       
<string>application/x-csv-document</string> <!-- ??? -->
+                               </array>
+                       </dict>
                </dict>
                <dict>
-                       <key>CFBundleTypeExtensions</key>
-                       <array>
-                               <string>odg</string>
-                       </array>
-                       <key>CFBundleTypeMIMETypes</key>
+                       <key>UTTypeConformsTo</key>
                        <array>
-                               
<string>application/vnd.oasis.opendocument.graphics</string>
+                               <string>public.data</string>
+                               <string>public.content</string>
                        </array>
-                       <key>CFBundleTypeIconFile</key>
-                       <string>oasis-drawing.icns</string>
-                       <key>CFBundleTypeName</key>
-                       <string>OpenDocument Drawing</string>
-                       <key>CFBundleTypeRole</key>
-                       <string>Editor</string>
-                       <key>LSIsAppleDefaultForType</key>
-                       <true/>
+                       <key>UTTypeDescription</key>
+                       <string>dBASE Document</string>
+                       <key>UTTypeIdentifier</key>
+                       <string>org.libreoffice.dbf-document</string>
+                       <key>UTTypeTagSpecification</key>
+                       <dict>
+                               <key>public.filename-extension</key>
+                               <array>
+                                       <string>dbf</string>
+                               </array>
+                               <key>public.mime-type</key>
+                               <array>
+                                       
<string>application/x-dbf-document</string> <!-- ??? -->
+                               </array>
+                       </dict>
                </dict>
                <dict>
-                       <key>CFBundleTypeExtensions</key>
-                       <array>
-                               <string>sxg</string>
-                       </array>
-                       <key>CFBundleTypeMIMETypes</key>
+                       <key>UTTypeConformsTo</key>
                        <array>
-                               
<string>application/vnd.sun.xml.writer.global</string>
+                               <string>public.data</string>
+                               <string>public.content</string>
                        </array>
-                       <key>CFBundleTypeIconFile</key>
-                       <string>master-document.icns</string>
-                       <key>CFBundleTypeName</key>
-                       <string>OpenOffice.org 1.0 Master</string>
-                       <key>CFBundleTypeRole</key>
-                       <string>Editor</string>
-                       <key>LSIsAppleDefaultForType</key>
-                       <true/>
+                       <key>UTTypeDescription</key>
+                       <string>Lotus 1-2-3 Spreadsheet</string>
+                       <key>UTTypeIdentifier</key>
+                       <string>org.libreoffice.123-document</string>
+                       <key>UTTypeTagSpecification</key>
+                       <dict>
+                               <key>public.filename-extension</key>
+                               <array>
+                                       <string>wk1</string>
+                                       <string>wks</string>
+                                       <string>123</string>
+                               </array>
+                               <key>public.mime-type</key>
+                               <array>
+                                       
<string>application/vnd.lotus-1-2-3</string>
+                                       
<string>application/vnd.lotus-1-2-3</string>
+                                       
<string>application/vnd.lotus-1-2-3</string>
+                               </array>
+                       </dict>
                </dict>
                <dict>
-                       <key>CFBundleTypeExtensions</key>
-                       <array>
-                               <string>odm</string>
-                       </array>
-                       <key>CFBundleTypeMIMETypes</key>
+                       <key>UTTypeConformsTo</key>
                        <array>
-                               
<string>application/vnd.oasis.opendocument.text-master</string>
+                               <string>public.data</string>
+                               <string>public.content</string>
+                               <string>public.image</string>
                        </array>
-                       <key>CFBundleTypeIconFile</key>
-                       <string>oasis-master-document.icns</string>
-                       <key>CFBundleTypeName</key>
-                       <string>OpenDocument Master</string>
-                       <key>CFBundleTypeRole</key>
-                       <string>Editor</string>
-                       <key>LSIsAppleDefaultForType</key>
-                       <true/>
+                       <key>UTTypeDescription</key>
+                       <string>Computer Graphics Metafile</string>
+                       <key>UTTypeIdentifier</key>
+                       <string>org.libreoffice.cgm-document</string>
+                       <key>UTTypeTagSpecification</key>
+                       <dict>
+                               <key>public.filename-extension</key>
+                               <array>
+                                       <string>cgm</string>
+                               </array>
+                               <key>public.mime-type</key>
+                               <array>
+                                       <string>image/cgm</string>
+                               </array>
+                       </dict>
                </dict>
                <dict>
-                       <key>CFBundleTypeExtensions</key>
-                       <array>
-                               <string>sxm</string>
-                               <string>smf</string>
-                       </array>
-                       <key>CFBundleTypeMIMETypes</key>
+                       <key>UTTypeConformsTo</key>
                        <array>
-                               <string>application/vnd.sun.xml.math</string>
-                               
<string>application/vnd.stardivision.math</string>
+                               <string>public.data</string>
+                               <string>public.content</string>
+                               <string>public.image</string>
                        </array>
-                       <key>CFBundleTypeIconFile</key>
-                       <string>formula.icns</string>
-                       <key>CFBundleTypeName</key>
-                       <string>OpenOffice.org 1.0 Formula</string>
-                       <key>CFBundleTypeRole</key>
-                       <string>Editor</string>
-                       <key>LSIsAppleDefaultForType</key>
-                       <true/>
+                       <key>UTTypeDescription</key>
+                       <string>AutoCAD Interchange Format</string>
+                       <key>UTTypeIdentifier</key>
+                       <string>org.libreoffice.dxf-document</string>
+                       <key>UTTypeTagSpecification</key>
+                       <dict>
+                               <key>public.filename-extension</key>
+                               <array>
+                                       <string>dxf</string>
+                               </array>
+                               <key>public.mime-type</key>
+                               <array>
+                                       <string>image/vnd.dxf</string>
+                               </array>
+                       </dict>
                </dict>
                <dict>
-                       <key>CFBundleTypeExtensions</key>
-                       <array>
-                               <string>odf</string>
-                       </array>
-                       <key>CFBundleTypeMIMETypes</key>
+                       <key>UTTypeConformsTo</key>
                        <array>
-                               
<string>application/vnd.oasis.opendocument.formula</string>
+                               <string>public.data</string>
+                               <string>public.content</string>
+                               <string>public.image</string>
                        </array>
-                       <key>CFBundleTypeIconFile</key>
-                       <string>oasis-formula.icns</string>
-                       <key>CFBundleTypeName</key>
-                       <string>OpenDocument Formula</string>
-                       <key>CFBundleTypeRole</key>
-                       <string>Editor</string>
-                       <key>LSIsAppleDefaultForType</key>
-                       <true/>
-               </dict>
-               <dict>
-                       <key>CFBundleTypeExtensions</key>
-                       <array>
-                               <string>stw</string>
-                       </array>
-                       <key>CFBundleTypeMIMETypes</key>
-                       <array>
-                               
<string>application/vnd.sun.xml.writer.template</string>
-                       </array>
-                       <key>CFBundleTypeIconFile</key>
-                       <string>text-template.icns</string>
-                       <key>CFBundleTypeName</key>
-                       <string>OpenOffice.org 1.0 Text Template</string>
-                       <key>CFBundleTypeRole</key>
-                       <string>Editor</string>
-                       <key>LSIsAppleDefaultForType</key>
-                       <true/>
-               </dict>
-               <dict>
-                       <key>CFBundleTypeExtensions</key>
-                       <array>
-                               <string>ott</string>
-                       </array>
-                       <key>CFBundleTypeMIMETypes</key>
-                       <array>
-                               
<string>application/vnd.oasis.opendocument.text-template</string>
-                       </array>
-                       <key>CFBundleTypeIconFile</key>
-                       <string>oasis-text-template.icns</string>
-                       <key>CFBundleTypeName</key>
-                       <string>OpenDocument Text Template</string>
-                       <key>CFBundleTypeRole</key>
-                       <string>Editor</string>
-                       <key>LSIsAppleDefaultForType</key>
-                       <true/>
-               </dict>
-               <dict>
-                       <key>CFBundleTypeExtensions</key>
-                       <array>
-                               <string>stc</string>
-                       </array>
-                       <key>CFBundleTypeMIMETypes</key>
-                       <array>
-                               
<string>application/vnd.sun.xml.calc.template</string>
-                       </array>
-                       <key>CFBundleTypeIconFile</key>
-                       <string>spreadsheet-template.icns</string>
-                       <key>CFBundleTypeName</key>
-                       <string>OpenOffice.org 1.0 Spreadsheet Template</string>
-                       <key>CFBundleTypeRole</key>
-                       <string>Editor</string>
-                       <key>LSIsAppleDefaultForType</key>
-                       <true/>
-               </dict>
-               <dict>
-                       <key>CFBundleTypeExtensions</key>
-                       <array>
-                               <string>ots</string>
-                       </array>
-                       <key>CFBundleTypeMIMETypes</key>
-                       <array>
-                               
<string>application/vnd.oasis.opendocument.spreadsheet-template</string>
-                       </array>
-                       <key>CFBundleTypeIconFile</key>
-                       <string>oasis-spreadsheet-template.icns</string>
-                       <key>CFBundleTypeName</key>
-                       <string>OpenDocument Spreadsheet Template</string>
-                       <key>CFBundleTypeRole</key>
-                       <string>Editor</string>
-                       <key>LSIsAppleDefaultForType</key>
-                       <true/>
-               </dict>
-               <dict>
-                       <key>CFBundleTypeExtensions</key>
-                       <array>
-                               <string>sti</string>
-                       </array>
-                       <key>CFBundleTypeMIMETypes</key>
-                       <array>
-                               
<string>application/vnd.sun.xml.impress.template</string>
-                       </array>
-                       <key>CFBundleTypeIconFile</key>
-                       <string>presentation-template.icns</string>
-                       <key>CFBundleTypeName</key>
-                       <string>OpenOffice.org 1.0 Presentation 
Template</string>
-                       <key>CFBundleTypeRole</key>
-                       <string>Editor</string>
-                       <key>LSIsAppleDefaultForType</key>
-                       <true/>
-               </dict>
-               <dict>
-                       <key>CFBundleTypeExtensions</key>
-                       <array>
-                               <string>otp</string>
-                       </array>
-                       <key>CFBundleTypeMIMETypes</key>
-                       <array>
-                               
<string>application/vnd.oasis.opendocument.presentation-template</string>
-                       </array>
-                       <key>CFBundleTypeIconFile</key>
-                       <string>oasis-presentation-template.icns</string>
-                       <key>CFBundleTypeName</key>
-                       <string>OpenDocument Presentation Template</string>
-                       <key>CFBundleTypeRole</key>
-                       <string>Editor</string>
-                       <key>LSIsAppleDefaultForType</key>
-                       <true/>
-               </dict>
-               <dict>
-                       <key>CFBundleTypeExtensions</key>
-                       <array>
-                               <string>std</string>
-                       </array>
-                       <key>CFBundleTypeMIMETypes</key>
-                       <array>
-                               
<string>application/vnd.sun.xml.draw.template</string>
-                       </array>
-                       <key>CFBundleTypeIconFile</key>
-                       <string>drawing-template.icns</string>
-                       <key>CFBundleTypeName</key>
-                       <string>OpenOffice.org 1.0 Drawing Template</string>
-                       <key>CFBundleTypeRole</key>
-                       <string>Editor</string>
-                       <key>LSIsAppleDefaultForType</key>
-                       <true/>
-               </dict>
-               <dict>
-                       <key>CFBundleTypeExtensions</key>
-                       <array>
-                               <string>otg</string>
-                       </array>
-                       <key>CFBundleTypeMIMETypes</key>
-                       <array>
-                               
<string>application/vnd.oasis.opendocument.graphics-template</string>
-                       </array>
-                       <key>CFBundleTypeIconFile</key>
-                       <string>oasis-drawing-template.icns</string>
-                       <key>CFBundleTypeName</key>
-                       <string>OpenDocument Drawing Template</string>
-                       <key>CFBundleTypeRole</key>
-                       <string>Editor</string>
-                       <key>LSIsAppleDefaultForType</key>
-                       <true/>
-               </dict>
-               <dict>
-                       <key>CFBundleTypeExtensions</key>
-                       <array>
-                               <string>odb</string>
-                       </array>
-                       <key>CFBundleTypeMIMETypes</key>
-                       <array>
-                               
<string>application/vnd.oasis.opendocument.database</string>
-                       </array>
-                       <key>CFBundleTypeIconFile</key>
-                       <string>oasis-database.icns</string>
-                       <key>CFBundleTypeName</key>
-                       <string>OpenDocument Database</string>
-                       <key>CFBundleTypeRole</key>
-                       <string>Editor</string>
-                       <key>LSIsAppleDefaultForType</key>
-                       <true/>
-               </dict>
-               <dict>
-                       <key>CFBundleTypeExtensions</key>
-                       <array>
-                               <string>wpd</string>
-                       </array>
-                       <key>CFBundleTypeRole</key>
-                       <string>Editor</string>
-                       <key>CFBundleTypeName</key>
-                       <string>WordPerfect Document</string>
-               </dict>
-               <dict>
-                       <key>CFBundleTypeExtensions</key>
-                       <array>
-                               <string>pdb</string>
-                       </array>
-                       <key>CFBundleTypeRole</key>
-                       <string>Editor</string>
-                       <key>CFBundleTypeName</key>
-                       <string>PalmDoc eBook</string>
-               </dict>
-               <dict>
-                       <key>CFBundleTypeExtensions</key>
-                       <array>
-                               <string>hwp</string>
-                       </array>
-                       <key>CFBundleTypeRole</key>
-                       <string>Editor</string>
-                       <key>CFBundleTypeName</key>
-                       <string>Hangul WP 97 Document</string>
-               </dict>
-               <dict>
-                       <key>CFBundleTypeExtensions</key>
-                       <array>
-                               <string>wps</string>
-                       </array>
-                       <key>CFBundleTypeRole</key>
-                       <string>Editor</string>
-                       <key>CFBundleTypeName</key>
-                       <string>Microsoft Works for Mac Document (v1 - 
v4)</string>
-               </dict>
-               <dict>
-                       <key>CFBundleTypeExtensions</key>
-                       <array>
-                               <string>dif</string>
-                       </array>
-                       <key>CFBundleTypeRole</key>
-                       <string>Editor</string>
-                       <key>CFBundleTypeName</key>
-                       <string>Data Interchange Format Document</string>
-               </dict>
-               <dict>
-                       <key>CFBundleTypeExtensions</key>
-                       <array>
-                               <string>slk</string>
-                       </array>
-                       <key>CFBundleTypeRole</key>
-                       <string>Editor</string>
-                       <key>CFBundleTypeName</key>
-                       <string>SYLK Document</string>
-               </dict>
-               <dict>
-                       <key>CFBundleTypeExtensions</key>
-                       <array>
-                               <string>csv</string>
-                       </array>
-                       <key>CFBundleTypeRole</key>
-                       <string>Editor</string>
-                       <key>CFBundleTypeName</key>
-                       <string>Comma-Separated Value Spreadsheet</string>
-               </dict>
-               <dict>
-                       <key>CFBundleTypeExtensions</key>
-                       <array>
-                               <string>dbf</string>
-                       </array>
-                       <key>CFBundleTypeRole</key>
-                       <string>Editor</string>
-                       <key>CFBundleTypeName</key>
-                       <string>dBASE Document</string>
-               </dict>
-               <dict>
-                       <key>CFBundleTypeExtensions</key>
-                       <array>
-                               <string>wk1</string>
-                               <string>wk2</string>
-                               <string>123</string>
-                       </array>
-                       <key>CFBundleTypeRole</key>
-                       <string>Editor</string>
-                       <key>CFBundleTypeName</key>
-                       <string>Lotus 1-2-3 Document</string>
-               </dict>
-               <dict>
-                       <key>CFBundleTypeExtensions</key>
-                       <array>
-                               <string>cgm</string>
-                       </array>
-                       <key>CFBundleTypeRole</key>
-                       <string>Editor</string>
-                       <key>CFBundleTypeName</key>
-                       <string>Computer Graphics Metafile</string>
-               </dict>
-               <dict>
-                       <key>CFBundleTypeExtensions</key>
-                       <array>
-                               <string>dxf</string>
-                       </array>
-                       <key>CFBundleTypeRole</key>
-                       <string>Editor</string>
-                       <key>CFBundleTypeName</key>
-                       <string>AutoCAD Interchange Format</string>
-               </dict>
-               <dict>
-                       <key>CFBundleTypeExtensions</key>
-                       <array>
-                               <string>emf</string>
-                       </array>
-                       <key>CFBundleTypeRole</key>
-                       <string>Editor</string>
-                       <key>CFBundleTypeName</key>
+                       <key>UTTypeDescription</key>
                        <string>Windows Enhanced Metafile</string>
-               </dict>
-               <dict>
-                       <key>CFBundleTypeExtensions</key>
-                       <array>
-                               <string>wmf</string>
-                       </array>
-                       <key>CFBundleTypeRole</key>
-                       <string>Editor</string>
-                       <key>CFBundleTypeName</key>
-                       <string>Windows Metafile</string>
-               </dict>
-               <dict>
-                       <key>CFBundleTypeExtensions</key>
-                       <array>
-                               <string>txt</string>
-                               <string>TXT</string>
-                               <string>text</string>
-                       </array>
-                       <key>CFBundleTypeName</key>
-                       <string>Text file</string>
-                       <key>CFBundleTypeRole</key>
-                       <string>Editor</string>
-               </dict>
-               <dict>
-                       <key>LSItemContentTypes</key>
-                       <array>
-                               <string>org.openoffice.text</string>
-                       </array>
-                       <key>CFBundleTypeName</key>
-                       <string>OpenOffice.org 1.0 Text</string>
-                       <key>CFBundleTypeRole</key>
-                       <string>Editor</string>
-               </dict>
-               <dict>
-                       <key>LSItemContentTypes</key>
-                       <array>
-                               
<string>org.oasis-open.opendocument.text</string>
-                       </array>
-                       <key>CFBundleTypeName</key>
-                       <string>OpenDocument Text</string>
-                       <key>CFBundleTypeRole</key>
-                       <string>Editor</string>
-               </dict>
-               <dict>
-                       <key>LSItemContentTypes</key>
-                       <array>
-                               <string>org.openoffice.spreadsheet</string>
-                       </array>
-                       <key>CFBundleTypeName</key>
-                       <string>OpenOffice.org 1.0 Spreadsheet</string>
-                       <key>CFBundleTypeRole</key>
-                       <string>Editor</string>
-               </dict>
-               <dict>
-                       <key>LSItemContentTypes</key>
-                       <array>
-                               
<string>org.oasis-open.opendocument.spreadsheet</string>
-                       </array>
-                       <key>CFBundleTypeName</key>
-                       <string>OpenDocument Spreadsheet</string>
-                       <key>CFBundleTypeRole</key>
-                       <string>Editor</string>
-               </dict>
-               <dict>
-                       <key>LSItemContentTypes</key>
-                       <array>
-                               <string>org.openoffice.presentation</string>
-                       </array>
-                       <key>CFBundleTypeName</key>
-                       <string>OpenOffice.org 1.0 Presentation</string>
-                       <key>CFBundleTypeRole</key>
-                       <string>Editor</string>
-               </dict>
-               <dict>
-                       <key>LSItemContentTypes</key>
-                       <array>
-                               
<string>org.oasis-open.opendocument.presentation</string>
-                       </array>
-                       <key>CFBundleTypeName</key>
-                       <string>OpenDocument Presentation</string>
-                       <key>CFBundleTypeRole</key>
-                       <string>Editor</string>
-               </dict>
-               <dict>
-                       <key>LSItemContentTypes</key>
-                       <array>
-                               <string>org.openoffice.graphics</string>
-                       </array>
-                       <key>CFBundleTypeName</key>
-                       <string>OpenOffice.org 1.0 Drawing</string>
-                       <key>CFBundleTypeRole</key>
-                       <string>Editor</string>
-               </dict>
-               <dict>
-                       <key>LSItemContentTypes</key>
-                       <array>
-                               
<string>org.oasis-open.opendocument.graphics</string>
-                       </array>
-                       <key>CFBundleTypeName</key>
-                       <string>OpenDocument Drawing</string>
-                       <key>CFBundleTypeRole</key>
-                       <string>Editor</string>
-               </dict>
-               <dict>
-                       <key>LSItemContentTypes</key>
-                       <array>
-                               <string>org.openoffice.text-master</string>
-                       </array>
-                       <key>CFBundleTypeName</key>
-                       <string>OpenOffice.org 1.0 Master Document</string>
-                       <key>CFBundleTypeRole</key>
-                       <string>Editor</string>
-               </dict>
-               <dict>
-                       <key>LSItemContentTypes</key>
-                       <array>
-                               
<string>org.oasis-open.opendocument.text-master</string>
-                       </array>
-                       <key>CFBundleTypeName</key>
-                       <string>OpenDocument Master Document</string>
-                       <key>CFBundleTypeRole</key>
-                       <string>Editor</string>
-               </dict>
-               <dict>
-                       <key>LSItemContentTypes</key>
-                       <array>
-                               <string>org.openoffice.formula</string>
-                       </array>
-                       <key>CFBundleTypeName</key>
-                       <string>OpenOffice.org 1.0 Formula</string>
-                       <key>CFBundleTypeRole</key>
-                       <string>Editor</string>
-               </dict>
-               <dict>
-                       <key>LSItemContentTypes</key>
-                       <array>
-                               
<string>org.oasis-open.opendocument.formula</string>
-                       </array>
-                       <key>CFBundleTypeName</key>
-                       <string>OpenDocument Formula</string>
-                       <key>CFBundleTypeRole</key>
-                       <string>Editor</string>
-               </dict>
-               <dict>
-                       <key>LSItemContentTypes</key>
-                       <array>
-                               <string>org.openoffice.text-template</string>
-                       </array>
-                       <key>CFBundleTypeName</key>
-                       <string>OpenOffice.org 1.0 Text Template</string>
-                       <key>CFBundleTypeRole</key>
-                       <string>Editor</string>
-               </dict>
-               <dict>
-                       <key>LSItemContentTypes</key>
-                       <array>
-                               
<string>org.oasis-open.opendocument.text-template</string>
-                       </array>
-                       <key>CFBundleTypeName</key>
-                       <string>OpenDocument Text Template</string>
-                       <key>CFBundleTypeRole</key>
-                       <string>Editor</string>
-               </dict>
-               <dict>
-                       <key>LSItemContentTypes</key>
-                       <array>
-                               
<string>org.openoffice.spreadsheet-template</string>
-                       </array>
-                       <key>CFBundleTypeName</key>
-                       <string>OpenOffice.org 1.0 Spreadsheet Template</string>
-                       <key>CFBundleTypeRole</key>
-                       <string>Editor</string>
-               </dict>
-               <dict>
-                       <key>LSItemContentTypes</key>
-                       <array>
-                               
<string>org.oasis-open.opendocument.spreadsheet-template</string>
-                       </array>
-                       <key>CFBundleTypeName</key>
-                       <string>OpenDocument Spreadsheet Template</string>
-                       <key>CFBundleTypeRole</key>
-                       <string>Editor</string>
-               </dict>
-               <dict>
-                       <key>LSItemContentTypes</key>
-                       <array>
-                               
<string>org.openoffice.presentation-template</string>
-                       </array>
-                       <key>CFBundleTypeName</key>
-                       <string>OpenOffice.org 1.0 Presentation 
Template</string>
-                       <key>CFBundleTypeRole</key>
-                       <string>Editor</string>
-               </dict>
-               <dict>
-                       <key>LSItemContentTypes</key>
-                       <array>
-                               
<string>org.oasis-open.opendocument.presentation-template</string>
-                       </array>
-                       <key>CFBundleTypeName</key>
-                       <string>OpenDocument Presentation Template</string>
-                       <key>CFBundleTypeRole</key>
-                       <string>Editor</string>
-               </dict>
-               <dict>
-                       <key>LSItemContentTypes</key>
-                       <array>
-                               
<string>org.openoffice.graphics-template</string>
-                       </array>
-                       <key>CFBundleTypeName</key>
-                       <string>OpenOffice.org 1.0 Drawing Template</string>
-                       <key>CFBundleTypeRole</key>
-                       <string>Editor</string>
-               </dict>
-               <dict>
-                       <key>LSItemContentTypes</key>
-                       <array>
-                               
<string>org.oasis-open.opendocument.graphics-template</string>
-                       </array>
-                       <key>CFBundleTypeName</key>
-                       <string>OpenDocument DrawingTemplate</string>
-                       <key>CFBundleTypeRole</key>
-                       <string>Editor</string>
+                       <key>UTTypeIdentifier</key>
+                       <string>org.libreoffice.emf-document</string>
+                       <key>UTTypeTagSpecification</key>
+                       <dict>
+                               <key>public.filename-extension</key>
+                               <array>
+                                       <string>emf</string>
+                               </array>
+                               <key>public.mime-type</key>
+                               <array>
+                                       <string>image/x-emf</string>
+                               </array>
+                       </dict>
                </dict>
                <dict>
-                       <key>LSItemContentTypes</key>
+                       <key>UTTypeConformsTo</key>
                        <array>
-                               
<string>org.oasis-open.opendocument.database</string>
+                               <string>public.data</string>
+                               <string>public.content</string>
+                               <string>public.image</string>
                        </array>
-                       <key>CFBundleTypeName</key>
-                       <string>OpenDocument Database</string>
-                       <key>CFBundleTypeRole</key>
-                       <string>Editor</string>
+                       <key>UTTypeDescription</key>
+                       <string>Windows Metafile</string>
+                       <key>UTTypeIdentifier</key>
+                       <string>org.libreoffice.wmf-document</string>
+                       <key>UTTypeTagSpecification</key>
+                       <dict>
+                               <key>public.filename-extension</key>
+                               <array>
+                                       <string>wmf</string>
+                               </array>
+                               <key>public.mime-type</key>
+                               <array>
+                                       <string>image/x-wmf</string>
+                               </array>
+                       </dict>
                </dict>
                <dict>
-                       <key>LSItemContentTypes</key>
+                       <key>UTTypeConformsTo</key>
                        <array>
-                               
<string>org.oasis-open.opendocument.chart</string>
+                               <string>public.data</string>
+                               <string>public.content</string>
                        </array>
-                       <key>CFBundleTypeName</key>
-                       <string>OpenDocument Chart</string>
-                       <key>CFBundleTypeRole</key>
-                       <string>Editor</string>
+                       <key>UTTypeDescription</key>
+                       <string>Plain Text File</string>
+                       <key>UTTypeIdentifier</key>
+                       <string>public.plain-text</string>
+                       <key>UTTypeTagSpecification</key>
+                       <dict>
+                               <key>public.filename-extension</key>
+                               <array>
+                                       <string>txt</string>
+                               </array>
+                               <key>public.mime-type</key>
+                               <array>
+                                       <string>text/plain</string>
+                               </array>
+                       </dict>
                </dict>
                <dict>
-                       <key>LSItemContentTypes</key>
+                       <key>UTTypeConformsTo</key>
                        <array>
-                               <string>public.rtf</string>
+                               <string>public.data</string>
+                               <string>public.content</string>
                        </array>
-                       <key>CFBundleTypeName</key>
+                       <key>UTTypeDescription</key>
                        <string>Rich Text Format</string>
-                       <key>CFBundleTypeRole</key>
-                       <string>Editor</string>
-               </dict>
-               <dict>
-                       <key>LSItemContentTypes</key>
-                       <array>
-                               <string>com.microsoft.word.doc</string>
-                               <string>com.microsoft.word.dot</string>
-                       </array>
-                       <key>CFBundleTypeName</key>
-                       <string>Microsoft Word Document</string>
-                       <key>CFBundleTypeRole</key>
-                       <string>Editor</string>
-               </dict>
-               <dict>
-                       <key>LSItemContentTypes</key>
-                       <array>
-                               
<string>org.openxmlformats.wordprocessingml.document</string>
-                               
<string>org.openxmlformats.wordprocessingml.document.macroenabled</string>
-                               
<string>org.openxmlformats.wordprocessingml.template</string>
-                               
<string>org.openxmlformats.wordprocessingml.template.macroenabled</string>
-                       </array>
-                       <key>CFBundleTypeName</key>
-                       <string>Office Open XML Word Processing 
Document</string>
-                       <key>CFBundleTypeRole</key>
-                       <string>Editor</string>
-               </dict>
-               <dict>
-                       <key>LSItemContentTypes</key>
-                       <array>
-                               <string>com.microsoft.excel.xls</string>
-                               
<string>com.microsoft.excel.sheet.binary.macroenabled</string>
-                       </array>
-                       <key>CFBundleTypeName</key>
-                       <string>Microsoft Excel Spreadsheet</string>
-                       <key>CFBundleTypeRole</key>
-                       <string>Editor</string>
-               </dict>
-               <dict>
-                       <key>LSItemContentTypes</key>
-                       <array>
-                               
<string>org.openxmlformats.spreadsheetml.sheet</string>
-                               
<string>org.openxmlformats.spreadsheetml.sheet.macroenabled</string>
-                               
<string>org.openxmlformats.spreadsheetml.template</string>
-                               
<string>org.openxmlformats.spreadsheetml.template.macroenabled</string>
-                       </array>
-                       <key>CFBundleTypeName</key>
-                       <string>Office Open XML Spreadsheet</string>
-                       <key>CFBundleTypeRole</key>
-                       <string>Editor</string>
-               </dict>
-               <dict>
-                       <key>LSItemContentTypes</key>
-                       <array>
-                               <string>com.microsoft.powerpoint.ppt</string>
-                       </array>
-                       <key>CFBundleTypeName</key>
-                       <string>Microsoft PowerPoint Presentation</string>
-                       <key>CFBundleTypeRole</key>
-                       <string>Editor</string>
-               </dict>
-               <dict>
-                       <key>LSItemContentTypes</key>
-                       <array>
-                               
<string>org.openxmlformats.presentationml.presentation</string>
-                               
<string>org.openxmlformats.presentationml.presentation.macroenabled</string>
-                               
<string>org.openxmlformats.presentationml.template</string>
-                               
<string>org.openxmlformats.presentationml.template.macroenabled</string>
-                       </array>
-                       <key>CFBundleTypeName</key>
-                       <string>Office Open XML Presentation</string>
-                       <key>CFBundleTypeRole</key>
-                       <string>Editor</string>
-               </dict>
-               <dict>
-                       <key>CFBundleTypeExtensions</key>
-                       <array>
-                               <string>oxt</string>
-                       </array>
-                       <key>CFBundleTypeMIMETypes</key>
-                       <array>
-                               
<string>application/vnd.openofficeorg.extension</string>
-                       </array>
-                       <key>CFBundleTypeIconFile</key>
-                       <string>extension.icns</string>
-                       <key>CFBundleTypeName</key>
-                       <string>@PRODUCTNAME@ Extension</string>
-                       <key>CFBundleTypeRole</key>
-                       <string>Viewer</string>
-                       <key>LSIsAppleDefaultForType</key>
-                       <true/>
+                       <key>UTTypeIdentifier</key>
+                       <string>public.rtf</string>
+                       <key>UTTypeTagSpecification</key>
+                       <dict>
+                               <key>public.filename-extension</key>
+                               <array>
+                                       <string>rtf</string>
+                               </array>
+                               <key>public.mime-type</key>
+                               <array>
+                                       <string>application/rtf</string>
+                               </array>
+                       </dict>
                </dict>
+               
        </array>
+
        <key>CFBundleExecutable</key>
        <string>soffice</string>
        <key>CFBundleGetInfoString</key>
commit 21d15516bb4a30de453d9ef49dd919719fcf935e
Author: Tor Lillqvist <t...@collabora.com>
Date:   Sat Sep 20 10:59:47 2014 +0300

    Info.plist is invalid: CFBundleTypeName keys missing
    
    Each dictionary that is an entry in the CFBundleDocumentTypes array
    must have a CFBundleTypeName key.
    
    So split the long list into separate entries with a CFBundleTypeName.
    
    Dropped some weird document types that I seriously doubt we have good
    enough (import) support for.
    
    Drop image types, we should not pretend to be an image editor. That is
    counter-productive. It is fairly pointless to advertise ourselves as
    an XML editor, too, when we open arbitrary XML as simple text.
    
    Drop types mentioned in the entry with LSItemContentTypes.
    
    But actually, I wonder why we can't just drop the
    CFBundleDocumentTypes as it has been documented as obsolete for a long
    time. Is it because the icon entries are missing from the
    corresponding UTExportedTypeDeclarations entries? Need to fix that
    then. (See https://gerrit.libreoffice.org/#/c/6103/ )
    
    Change-Id: I9ed90254be25c39819b6ccf640052ef78a40e964
    (cherry picked from commit bccf009a0f47d4b87804ae6c04f90207f9415c27)

diff --git a/sysui/desktop/macosx/Info.plist.in 
b/sysui/desktop/macosx/Info.plist.in
index 6b9c0aa..6d8edd6 100755
--- a/sysui/desktop/macosx/Info.plist.in
+++ b/sysui/desktop/macosx/Info.plist.in
@@ -218,12 +218,36 @@
                        </dict>
                </dict>
 
+               <!-- Chart documents -->
+               <dict>
+                       <key>UTTypeIdentifier</key>
+                       <string>org.oasis-open.opendocument.chart</string>
+                       <key>UTTypeDescription</key>
+                       <string>OpenDocument Chart</string>
+                       <key>UTTypeConformsTo</key>
+                       <array>
+                               <string>public.data</string>
+                               <string>public.content</string>
+                       </array>
+                       <key>UTTypeTagSpecification</key>
+                       <dict>
+                               <key>public.filename-extension</key>
+                               <array>
+                                       <string>odc</string>
+                               </array>
+                               <key>public.mime-type</key>
+                               <array>
+                                       
<string>application/vnd.oasis.opendocument.chart</string>
+                               </array>
+                       </dict>
+               </dict>
+
                <!-- Text master documents -->
                <dict>
                        <key>UTTypeIdentifier</key>
                        <string>org.openoffice.text-master</string>
                        <key>UTTypeDescription</key>
-                       <string>OpenOffice.org 1.0 Master</string>
+                       <string>OpenOffice.org 1.0 Master Document</string>
                        <key>UTTypeConformsTo</key>
                        <array>
                                <string>public.data</string>
@@ -1244,138 +1268,445 @@
                <dict>
                        <key>CFBundleTypeExtensions</key>
                        <array>
-                               <string>doc</string>
-                               <string>dot</string>
-                               <string>rtf</string>
-                               <string>html</string>
-                               <string>htm</string>
-                               <string>pdb</string>
-                               <string>xml</string>
-                               <string>psw</string>
                                <string>wpd</string>
-                               <string>jtd</string>
-                               <string>jtt</string>
+                       </array>
+                       <key>CFBundleTypeRole</key>
+                       <string>Editor</string>
+                       <key>CFBundleTypeName</key>
+                       <string>WordPerfect Document</string>
+               </dict>
+               <dict>
+                       <key>CFBundleTypeExtensions</key>
+                       <array>
+                               <string>pdb</string>
+                       </array>
+                       <key>CFBundleTypeRole</key>
+                       <string>Editor</string>
+                       <key>CFBundleTypeName</key>
+                       <string>PalmDoc eBook</string>
+               </dict>
+               <dict>
+                       <key>CFBundleTypeExtensions</key>
+                       <array>
                                <string>hwp</string>
+                       </array>
+                       <key>CFBundleTypeRole</key>
+                       <string>Editor</string>
+                       <key>CFBundleTypeName</key>
+                       <string>Hangul WP 97 Document</string>
+               </dict>
+               <dict>
+                       <key>CFBundleTypeExtensions</key>
+                       <array>
                                <string>wps</string>
+                       </array>
+                       <key>CFBundleTypeRole</key>
+                       <string>Editor</string>
+                       <key>CFBundleTypeName</key>
+                       <string>Microsoft Works for Mac Document (v1 - 
v4)</string>
+               </dict>
+               <dict>
+                       <key>CFBundleTypeExtensions</key>
+                       <array>
                                <string>dif</string>
-                               <string>dbf</string>
-                               <string>xls</string>
-                               <string>xlw</string>
-                               <string>xlt</string>
+                       </array>
+                       <key>CFBundleTypeRole</key>
+                       <string>Editor</string>
+                       <key>CFBundleTypeName</key>
+                       <string>Data Interchange Format Document</string>
+               </dict>
+               <dict>
+                       <key>CFBundleTypeExtensions</key>
+                       <array>
                                <string>slk</string>
+                       </array>
+                       <key>CFBundleTypeRole</key>
+                       <string>Editor</string>
+                       <key>CFBundleTypeName</key>
+                       <string>SYLK Document</string>
+               </dict>
+               <dict>
+                       <key>CFBundleTypeExtensions</key>
+                       <array>
                                <string>csv</string>
+                       </array>
+                       <key>CFBundleTypeRole</key>
+                       <string>Editor</string>
+                       <key>CFBundleTypeName</key>
+                       <string>Comma-Separated Value Spreadsheet</string>
+               </dict>
+               <dict>
+                       <key>CFBundleTypeExtensions</key>
+                       <array>
+                               <string>dbf</string>
+                       </array>
+                       <key>CFBundleTypeRole</key>
+                       <string>Editor</string>
+                       <key>CFBundleTypeName</key>
+                       <string>dBASE Document</string>
+               </dict>
+               <dict>
+                       <key>CFBundleTypeExtensions</key>
+                       <array>
                                <string>wk1</string>
                                <string>wk2</string>
                                <string>123</string>
-                               <string>pxl</string>
-                               <string>ppt</string>
-                               <string>pps</string>
-                               <string>pot</string>
+                       </array>
+                       <key>CFBundleTypeRole</key>
+                       <string>Editor</string>
+                       <key>CFBundleTypeName</key>
+                       <string>Lotus 1-2-3 Document</string>
+               </dict>
+               <dict>
+                       <key>CFBundleTypeExtensions</key>
+                       <array>
                                <string>cgm</string>
+                       </array>
+                       <key>CFBundleTypeRole</key>
+                       <string>Editor</string>
+                       <key>CFBundleTypeName</key>
+                       <string>Computer Graphics Metafile</string>
+               </dict>
+               <dict>
+                       <key>CFBundleTypeExtensions</key>
+                       <array>
                                <string>dxf</string>
+                       </array>
+                       <key>CFBundleTypeRole</key>
+                       <string>Editor</string>
+                       <key>CFBundleTypeName</key>
+                       <string>AutoCAD Interchange Format</string>
+               </dict>
+               <dict>
+                       <key>CFBundleTypeExtensions</key>
+                       <array>
                                <string>emf</string>
-                               <string>eps</string>
-                               <string>met</string>
-                               <string>pct</string>
-                               <string>sgf</string>
-                               <string>sgv</string>
-                               <string>svm</string>
+                       </array>
+                       <key>CFBundleTypeRole</key>
+                       <string>Editor</string>
+                       <key>CFBundleTypeName</key>
+                       <string>Windows Enhanced Metafile</string>
+               </dict>
+               <dict>
+                       <key>CFBundleTypeExtensions</key>
+                       <array>
                                <string>wmf</string>
-                               <string>bmp</string>
-                               <string>gif</string>
-                               <string>jpg</string>
-                               <string>jpeg</string>
-                               <string>jfif</string>
-                               <string>jif</string>
-                               <string>jpe</string>
-                               <string>pbm</string>
-                               <string>pcx</string>
-                               <string>pgm</string>
-                               <string>png</string>
-                               <string>ppm</string>
-                               <string>psd</string>
-                               <string>ras</string>
-                               <string>tga</string>
-                               <string>tif</string>
-                               <string>tiff</string>
-                               <string>xbm</string>
-                               <string>xpm</string>
-                               <string>pcd</string>
-                               <string>oth</string>
-                               <string>mml</string>
                        </array>
                        <key>CFBundleTypeRole</key>
                        <string>Editor</string>
-               </dict>
+                       <key>CFBundleTypeName</key>
+                       <string>Windows Metafile</string>
+               </dict>
                <dict>
                        <key>CFBundleTypeExtensions</key>
                        <array>
                                <string>txt</string>
                                <string>TXT</string>
                                <string>text</string>
-                               <string>*</string>
                        </array>
                        <key>CFBundleTypeName</key>
-                       <string>TEXT</string>
-                       <key>CFBundleTypeOSTypes</key>
+                       <string>Text file</string>
+                       <key>CFBundleTypeRole</key>
+                       <string>Editor</string>
+               </dict>
+               <dict>
+                       <key>LSItemContentTypes</key>
                        <array>
-                               <string>TEXT</string>
-                               <string>sEXT</string>
-                               <string>ttro</string>
+                               <string>org.openoffice.text</string>
                        </array>
+                       <key>CFBundleTypeName</key>
+                       <string>OpenOffice.org 1.0 Text</string>
                        <key>CFBundleTypeRole</key>
                        <string>Editor</string>
                </dict>
                <dict>
                        <key>LSItemContentTypes</key>
                        <array>
-                               <string>org.openoffice.text</string>
                                
<string>org.oasis-open.opendocument.text</string>
+                       </array>
+                       <key>CFBundleTypeName</key>
+                       <string>OpenDocument Text</string>
+                       <key>CFBundleTypeRole</key>
+                       <string>Editor</string>
+               </dict>
+               <dict>
+                       <key>LSItemContentTypes</key>
+                       <array>
                                <string>org.openoffice.spreadsheet</string>
+                       </array>
+                       <key>CFBundleTypeName</key>
+                       <string>OpenOffice.org 1.0 Spreadsheet</string>
+                       <key>CFBundleTypeRole</key>
+                       <string>Editor</string>
+               </dict>
+               <dict>
+                       <key>LSItemContentTypes</key>
+                       <array>
                                
<string>org.oasis-open.opendocument.spreadsheet</string>
+                       </array>
+                       <key>CFBundleTypeName</key>
+                       <string>OpenDocument Spreadsheet</string>
+                       <key>CFBundleTypeRole</key>
+                       <string>Editor</string>
+               </dict>
+               <dict>
+                       <key>LSItemContentTypes</key>
+                       <array>
                                <string>org.openoffice.presentation</string>
+                       </array>
+                       <key>CFBundleTypeName</key>
+                       <string>OpenOffice.org 1.0 Presentation</string>
+                       <key>CFBundleTypeRole</key>
+                       <string>Editor</string>
+               </dict>
+               <dict>
+                       <key>LSItemContentTypes</key>
+                       <array>
                                
<string>org.oasis-open.opendocument.presentation</string>
+                       </array>
+                       <key>CFBundleTypeName</key>
+                       <string>OpenDocument Presentation</string>
+                       <key>CFBundleTypeRole</key>
+                       <string>Editor</string>
+               </dict>
+               <dict>
+                       <key>LSItemContentTypes</key>
+                       <array>
                                <string>org.openoffice.graphics</string>
+                       </array>
+                       <key>CFBundleTypeName</key>
+                       <string>OpenOffice.org 1.0 Drawing</string>
+                       <key>CFBundleTypeRole</key>
+                       <string>Editor</string>
+               </dict>
+               <dict>
+                       <key>LSItemContentTypes</key>
+                       <array>
                                
<string>org.oasis-open.opendocument.graphics</string>
+                       </array>
+                       <key>CFBundleTypeName</key>
+                       <string>OpenDocument Drawing</string>
+                       <key>CFBundleTypeRole</key>
+                       <string>Editor</string>
+               </dict>
+               <dict>
+                       <key>LSItemContentTypes</key>
+                       <array>
                                <string>org.openoffice.text-master</string>
+                       </array>
+                       <key>CFBundleTypeName</key>
+                       <string>OpenOffice.org 1.0 Master Document</string>
+                       <key>CFBundleTypeRole</key>
+                       <string>Editor</string>
+               </dict>
+               <dict>
+                       <key>LSItemContentTypes</key>
+                       <array>
                                
<string>org.oasis-open.opendocument.text-master</string>
+                       </array>
+                       <key>CFBundleTypeName</key>
+                       <string>OpenDocument Master Document</string>
+                       <key>CFBundleTypeRole</key>
+                       <string>Editor</string>
+               </dict>
+               <dict>
+                       <key>LSItemContentTypes</key>
+                       <array>
                                <string>org.openoffice.formula</string>
+                       </array>
+                       <key>CFBundleTypeName</key>
+                       <string>OpenOffice.org 1.0 Formula</string>
+                       <key>CFBundleTypeRole</key>
+                       <string>Editor</string>
+               </dict>
+               <dict>
+                       <key>LSItemContentTypes</key>
+                       <array>
                                
<string>org.oasis-open.opendocument.formula</string>
+                       </array>
+                       <key>CFBundleTypeName</key>
+                       <string>OpenDocument Formula</string>
+                       <key>CFBundleTypeRole</key>
+                       <string>Editor</string>
+               </dict>
+               <dict>
+                       <key>LSItemContentTypes</key>
+                       <array>
                                <string>org.openoffice.text-template</string>
+                       </array>
+                       <key>CFBundleTypeName</key>
+                       <string>OpenOffice.org 1.0 Text Template</string>
+                       <key>CFBundleTypeRole</key>
+                       <string>Editor</string>
+               </dict>
+               <dict>
+                       <key>LSItemContentTypes</key>
+                       <array>
                                
<string>org.oasis-open.opendocument.text-template</string>
+                       </array>
+                       <key>CFBundleTypeName</key>
+                       <string>OpenDocument Text Template</string>
+                       <key>CFBundleTypeRole</key>
+                       <string>Editor</string>
+               </dict>
+               <dict>
+                       <key>LSItemContentTypes</key>
+                       <array>
                                
<string>org.openoffice.spreadsheet-template</string>
+                       </array>
+                       <key>CFBundleTypeName</key>
+                       <string>OpenOffice.org 1.0 Spreadsheet Template</string>
+                       <key>CFBundleTypeRole</key>
+                       <string>Editor</string>
+               </dict>
+               <dict>
+                       <key>LSItemContentTypes</key>
+                       <array>
                                
<string>org.oasis-open.opendocument.spreadsheet-template</string>
+                       </array>
+                       <key>CFBundleTypeName</key>
+                       <string>OpenDocument Spreadsheet Template</string>
+                       <key>CFBundleTypeRole</key>
+                       <string>Editor</string>
+               </dict>
+               <dict>
+                       <key>LSItemContentTypes</key>
+                       <array>
                                
<string>org.openoffice.presentation-template</string>
+                       </array>
+                       <key>CFBundleTypeName</key>
+                       <string>OpenOffice.org 1.0 Presentation 
Template</string>
+                       <key>CFBundleTypeRole</key>
+                       <string>Editor</string>
+               </dict>
+               <dict>
+                       <key>LSItemContentTypes</key>
+                       <array>
                                
<string>org.oasis-open.opendocument.presentation-template</string>
+                       </array>
+                       <key>CFBundleTypeName</key>
+                       <string>OpenDocument Presentation Template</string>
+                       <key>CFBundleTypeRole</key>
+                       <string>Editor</string>
+               </dict>
+               <dict>
+                       <key>LSItemContentTypes</key>
+                       <array>
                                
<string>org.openoffice.graphics-template</string>
+                       </array>
+                       <key>CFBundleTypeName</key>
+                       <string>OpenOffice.org 1.0 Drawing Template</string>
+                       <key>CFBundleTypeRole</key>
+                       <string>Editor</string>
+               </dict>
+               <dict>
+                       <key>LSItemContentTypes</key>
+                       <array>
                                
<string>org.oasis-open.opendocument.graphics-template</string>
+                       </array>
+                       <key>CFBundleTypeName</key>
+                       <string>OpenDocument DrawingTemplate</string>
+                       <key>CFBundleTypeRole</key>
+                       <string>Editor</string>
+               </dict>
+               <dict>
+                       <key>LSItemContentTypes</key>
+                       <array>
                                
<string>org.oasis-open.opendocument.database</string>
+                       </array>
+                       <key>CFBundleTypeName</key>
+                       <string>OpenDocument Database</string>
+                       <key>CFBundleTypeRole</key>
+                       <string>Editor</string>
+               </dict>
+               <dict>
+                       <key>LSItemContentTypes</key>
+                       <array>
                                
<string>org.oasis-open.opendocument.chart</string>
+                       </array>
+                       <key>CFBundleTypeName</key>
+                       <string>OpenDocument Chart</string>
+                       <key>CFBundleTypeRole</key>
+                       <string>Editor</string>
+               </dict>
+               <dict>
+                       <key>LSItemContentTypes</key>
+                       <array>
                                <string>public.rtf</string>
-                               <string>public.html</string>
-                               <string>public.jpeg</string>
-                               <string>public.tiff</string>
-                               <string>public.png</string>
-                               <string>public.xbitmap-image</string>
-                               
<string>com.adobe.encapsulated-postscript</string>
-                               <string>com.microsoft.bmp</string>
+                       </array>
+                       <key>CFBundleTypeName</key>
+                       <string>Rich Text Format</string>
+                       <key>CFBundleTypeRole</key>
+                       <string>Editor</string>
+               </dict>
+               <dict>
+                       <key>LSItemContentTypes</key>
+                       <array>
                                <string>com.microsoft.word.doc</string>
-                               <string>com.microsoft.excel.xls</string>
-                               <string>com.microsoft.powerpoint.ppt</string>
+                               <string>com.microsoft.word.dot</string>
+                       </array>
+                       <key>CFBundleTypeName</key>
+                       <string>Microsoft Word Document</string>
+                       <key>CFBundleTypeRole</key>
+                       <string>Editor</string>
+               </dict>
+               <dict>
+                       <key>LSItemContentTypes</key>
+                       <array>
                                
<string>org.openxmlformats.wordprocessingml.document</string>
                                
<string>org.openxmlformats.wordprocessingml.document.macroenabled</string>
                                
<string>org.openxmlformats.wordprocessingml.template</string>
                                
<string>org.openxmlformats.wordprocessingml.template.macroenabled</string>
+                       </array>
+                       <key>CFBundleTypeName</key>
+                       <string>Office Open XML Word Processing 
Document</string>
+                       <key>CFBundleTypeRole</key>
+                       <string>Editor</string>
+               </dict>
+               <dict>
+                       <key>LSItemContentTypes</key>
+                       <array>
+                               <string>com.microsoft.excel.xls</string>
+                               
<string>com.microsoft.excel.sheet.binary.macroenabled</string>
+                       </array>
+                       <key>CFBundleTypeName</key>
+                       <string>Microsoft Excel Spreadsheet</string>
+                       <key>CFBundleTypeRole</key>
+                       <string>Editor</string>
+               </dict>
+               <dict>
+                       <key>LSItemContentTypes</key>
+                       <array>
                                
<string>org.openxmlformats.spreadsheetml.sheet</string>
                                
<string>org.openxmlformats.spreadsheetml.sheet.macroenabled</string>
-                               
<string>com.microsoft.excel.sheet.binary.macroenabled</string>
                                
<string>org.openxmlformats.spreadsheetml.template</string>
                                
<string>org.openxmlformats.spreadsheetml.template.macroenabled</string>
+                       </array>
+                       <key>CFBundleTypeName</key>
+                       <string>Office Open XML Spreadsheet</string>
+                       <key>CFBundleTypeRole</key>
+                       <string>Editor</string>
+               </dict>
+               <dict>
+                       <key>LSItemContentTypes</key>
+                       <array>
+                               <string>com.microsoft.powerpoint.ppt</string>
+                       </array>
+                       <key>CFBundleTypeName</key>
+                       <string>Microsoft PowerPoint Presentation</string>
+                       <key>CFBundleTypeRole</key>
+                       <string>Editor</string>
+               </dict>
+               <dict>
+                       <key>LSItemContentTypes</key>
+                       <array>
                                
<string>org.openxmlformats.presentationml.presentation</string>
                                
<string>org.openxmlformats.presentationml.presentation.macroenabled</string>
                                
<string>org.openxmlformats.presentationml.template</string>
                                
<string>org.openxmlformats.presentationml.template.macroenabled</string>
                        </array>
+                       <key>CFBundleTypeName</key>
+                       <string>Office Open XML Presentation</string>
                        <key>CFBundleTypeRole</key>
                        <string>Editor</string>
                </dict>
commit dd8963a7f591917f63b58120ce08d73daeb1ac50
Author: Tor Lillqvist <t...@collabora.com>
Date:   Sat Sep 20 01:12:17 2014 +0300

    This test was the wrong way surely?
    
    Change-Id: I3470fbd2992cd96a772452d75fb2f0320bb529bf

diff --git a/configure.ac b/configure.ac
index 9bc1cd6..39ffa4b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -12875,7 +12875,7 @@ if test "$enable_mpl_subset" = "yes"; then
         AC_MSG_ERROR([need to --disable-ext-mariadb-connector - mariadb/mysql 
support.])
     fi
     if test -n "$ENABLE_PDFIMPORT"; then
-        if test "x$SYSTEM_POPPLER" != "x"; then
+        if test "x$SYSTEM_POPPLER" = "x"; then
             AC_MSG_ERROR([need to disable PDF import via poppler or use system 
library])
         fi
     fi
commit ae73d9b3ea54c106599e1c39c2590583bf9b1e66
Author: Tor Lillqvist <t...@collabora.com>
Date:   Sat Sep 20 01:01:09 2014 +0300

    Skip some executables in the OS X sandboxed (Mac App Store) case
    
    I doubt end-users will miss gengal.bin, regview, or regmerge.
    
    Change-Id: I353610c0d039f25fa415f35902fe2b9890cd423f
    (cherry picked from commit beb30bbd867f9a28878e0d004458c3507f6c0956)

diff --git a/Repository.mk b/Repository.mk
index afd7cb8..f112343 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -82,7 +82,9 @@ $(eval $(call 
gb_Helper_register_executables_for_install,SDK,sdk, \
 ))
 
 $(eval $(call gb_Helper_register_executables_for_install,OOO,ooo, \
-       gengal \
+       $(if $(ENABLE_MACOSX_SANDBOX),, \
+               gengal \
+       )\
 ))
 
 $(eval $(call gb_Helper_register_executables,OOO, \
@@ -128,8 +130,10 @@ $(eval $(call gb_Helper_register_executables,OOO, \
 
 $(eval $(call gb_Helper_register_executables_for_install,UREBIN,ure,\
        $(if $(and $(ENABLE_JAVA),$(filter-out MACOSX WNT,$(OS)),$(filter 
DESKTOP,$(BUILD_TYPE))),javaldx) \
-       regmerge \
-       regview \
+       $(if $(ENABLE_MACOSX_SANDBOX),, \
+               regmerge \
+               regview \
+       ) \
        $(if $(filter DESKTOP,$(BUILD_TYPE)),uno) \
 ))
 
diff --git a/registry/Module_registry.mk b/registry/Module_registry.mk
index fb962c6..5f70ed9 100644
--- a/registry/Module_registry.mk
+++ b/registry/Module_registry.mk
@@ -12,8 +12,10 @@ $(eval $(call gb_Module_Module,registry))
 $(eval $(call gb_Module_add_targets,registry,\
        Library_reg \
        $(if $(filter-out $(OS),IOS), \
-               Executable_regmerge \
-               Executable_regview \
+               $(if $(ENABLE_MACOSX_SANDBOX),, \
+                       Executable_regmerge \
+                       Executable_regview \
+               ) \
                StaticLibrary_registry_helper \
        ) \
 ))
diff --git a/svx/Module_svx.mk b/svx/Module_svx.mk
index 1981e92..1d600c4 100644
--- a/svx/Module_svx.mk
+++ b/svx/Module_svx.mk
@@ -33,6 +33,7 @@ $(eval $(call gb_Module_add_l10n_targets,svx,\
 ))
 
 ifneq (,$(filter DESKTOP,$(BUILD_TYPE)))
+ifeq (,$(ENABLE_MACOSX_SANDBOX))
 $(eval $(call gb_Module_add_targets,svx,\
     Executable_gengal \
     Package_gengal \
@@ -40,6 +41,7 @@ $(eval $(call gb_Module_add_targets,svx,\
         Executable_pixelctl) \
 ))
 endif
+endif
 
 ifneq ($(OOO_JUNIT_JAR),)
 $(eval $(call gb_Module_add_subsequentcheck_targets,svx,\
commit bb04bc6c797beff70f73ef20e293497774c1fab8
Author: Tor Lillqvist <t...@collabora.com>
Date:   Fri Sep 19 22:58:16 2014 +0300

    OS X code signing fixes
    
    Remove unnecessary Python executables and stuff that complicates code
    signing in the test-install target.
    
    Sign executables in codesign-macosx-app-bundle, not when building
    them. It is more uniform to do all code signing in just one place.
    
    Don't bother signing data files in the sandboxed case, we assume we
    then also use the "Mac-like" app structure and they are all under
    Resources anyway and get handled that way.
    
    All executables must have the com.apple.security.app-sandbox
    entitlement.
    
    The bundle signature's identifier must equal the bundle identifier.
    
    The code signature identifiers of an embedded bundle needs to match
    the embedded bundle's identifier.
    
    Need the entitlements for embedded app executables too.
    
    Change-Id: Ic6a640eb03964fe9ce75d3a8fff071971a3e1939

diff --git a/Makefile.in b/Makefile.in
index e99ca43..c8ab64b 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -294,6 +294,7 @@ ifeq ($(OS_FOR_BUILD),WNT)
 else
        @ooinstall $(TESTINSTALLDIR)
 ifneq ($(MACOSX_CODESIGNING_IDENTITY),)
+#
 # Unzip bin/InfoPlist_*.zip files into corresponding Resources/*.lproj 
directories.
        set -x; for F in $(TESTINSTALLDIR)/LibreOffice$(if 
$(ENABLE_RELEASE_BUILD),,Dev).app/Contents/bin/InfoPlist_*.zip; do \
                bn=`basename $$F .zip`; \
@@ -302,8 +303,18 @@ ifneq ($(MACOSX_CODESIGNING_IDENTITY),)
                mkdir $$lproj; \
                (cd $$lproj; unzip $$F); \
        done
+#
 # And remove the "bin" folder which should not be there
        rm -rf $(TESTINSTALLDIR)/LibreOffice$(if 
$(ENABLE_RELEASE_BUILD),,Dev).app/Contents/bin
+#
+# Remove unnecessary executables in the LibreOfficePython framework
+       rm -rf $(TESTINSTALLDIR)/LibreOffice$(if 
$(ENABLE_RELEASE_BUILD),,Dev).app/Contents/Frameworks/LibreOfficePython.framework/Versions/[1-9]*/bin
+#
+# Remove the python.o object file which is weird and interferes with app store 
uploading
+# And with it removed, presumably the other stuff in the Python 
lib/python3.3/config-3.3m probably does not make sense either.
+       rm -rf $(TESTINSTALLDIR)/LibreOffice$(if 
$(ENABLE_RELEASE_BUILD),,Dev).app/Contents/Frameworks/LibreOfficePython.framework/Versions/[1-9]*/lib/python[1-9]*/config-[1-9]*
+#
+# Then use the macosx-codesign-app-bundle script
        @macosx-codesign-app-bundle $(TESTINSTALLDIR)/LibreOffice$(if 
$(ENABLE_RELEASE_BUILD),,Dev).app
 endif
 endif
diff --git a/solenv/bin/macosx-codesign-app-bundle 
b/solenv/bin/macosx-codesign-app-bundle
index cdaa8e8..028de8f 100755
--- a/solenv/bin/macosx-codesign-app-bundle
+++ b/solenv/bin/macosx-codesign-app-bundle
@@ -1,9 +1,8 @@
 #!/bin/bash
 
-# Script to sign dylibs and frameworks in an app bundle plus the
-# bundle itself. Called from
-# installer::simplepackage::create_package() in
-# solenv/bin/modules/installer/simplepackage.pm
+# Script to sign executables, dylibs and frameworks in an app bundle
+# plus the bundle itself. Called from
+# the test-install target in Makefile.in
 
 test `uname` = Darwin || { echo This is for OS X only; exit 1; }
 
@@ -19,62 +18,81 @@ for V in \
     fi
 done
 
-echo "codesigning using 
MACSOX_CODESIGNING_IDENTITY=[${MACOSX_CODESIGNING_IDENTITY?}]"
-
 APP_BUNDLE="$1"
 
+if test -n "$ENABLE_MACOSX_SANDBOX"; then
+    # In a sandboxed build executables need the entitlements
+    entitlements="--entitlements $BUILDDIR/lo.xcent"
+    # We use --enable-canonical-installation-tree-structure so all
+    # data files in Resources are included in the app bundle signature
+    # through that. I think.
+    other_files=''
+else
+    # In a non-sandboxed build (distributed outside the App Store)
+    # we traditionally have use --resource-rules. Let's not touch that?
+    resource_rules="--resource-rules 
$SRCDIR/setup_native/source/mac/CodesignRules.plist"
+    # And there we then want to sign data files, too, hmm.
+    other_files="\
+ -or -name '*.fodt' -or -name 'schema.strings' -or -name 'schema.xml' \
+ -or -name '*.jar' -or -name '*.jnilib' -or -name 'LICENSE' -or -name 
'LICENSE.html' \
+ -or -name '*.applescript'"
+fi
+
 # Sign dylibs
 #
-# Executables get signed right after linking, see
-# solenv/gbuild/platform/macosx.mk. But many of our dylibs are built
-# by ad-hoc or 3rd-party mechanisms, so we can't easily sign them
-# right after linking. So do it here.
-#
 # The dylibs in the Python framework are called *.so. Go figure
 #
-# First sign all files that can use the default identifier in the hope
-# that codesign will contact the timestamp server just once for all
-# mentioned on the command line.
-#
 # On Mavericks also would like to have data files signed...
 # add some where it makes sense. Make a depth-first search to sign the contents
 # of e.g. the spotlight plugin before attempting to sign the plugin itself
 
-find -d "$APP_BUNDLE" \( -name '*.dylib' -or -name '*.so' -or -name '*.fodt' \
-        -or -name 'schema.strings' -or -name 'schema.xml' -or -name 
'*.mdimporter' \
-        -or -name '*.jar' -or -name '*.jnilib' -or -name 'LICENSE' -or -name 
'LICENSE.html' \
-        -or -name '*.applescript' \) ! -type l | grep -v 
"LibreOfficePython\.framework" | \
+find "$APP_BUNDLE" \( -name '*.dylib' -or -name '*.dylib.*' -or -name '*.so' \
+        $other_files \) ! -type l |
 while read file; do
     id=`echo ${file#${APP_BUNDLE}/Contents/} | sed -e 's,/,.,g'`
     codesign --verbose --identifier=$MACOSX_BUNDLE_IDENTIFIER.$id --sign 
"$MACOSX_CODESIGNING_IDENTITY" "$file"
 done
 
-find $APP_BUNDLE -name '*.dylib.*' ! -type l | \
-while read dylib; do \
-    id=`basename "$dylib"`; \
-    id=`echo $id | sed -e 's/dylib.*/dylib/'`; \
-    codesign --verbose --identifier=$MACOSX_BUNDLE_IDENTIFIER.$id --sign 
"$MACOSX_CODESIGNING_IDENTITY" "$dylib"; \
+# Sign executables
+
+find "$APP_BUNDLE/Contents/MacOS" -type f |
+while read file; do
+    id=`echo ${file#${APP_BUNDLE}/Contents/} | sed -e 's,/,.,g'`
+    codesign --verbose --identifier=$MACOSX_BUNDLE_IDENTIFIER.$id --sign 
"$MACOSX_CODESIGNING_IDENTITY" $entitlements "$file"
 done
 
-# The executables have already been signed by
-# gb_LinkTarget__command_dynamiclink in
-# solenv/gbuild/platform/macosx.mk.
+# Sign included bundles. First .app ones (i.e. the Python.app inside
+# the LibreOfficePython.framework. Be generic for kicks...)
 
-# Sign frameworks.
-#
-# Yeah, we don't bundle any other framework than our Python one, and
-# it has just one version, so this generic search is mostly for
-# completeness.
+find "$APP_BUNDLE" -name '*.app' -type d |
+while read app; do
+    fn=`basename "$app"`
+    fn=${fn%.*}
+    # Assume the app has a XML (and not binary) Info.plist
+    id=`grep -A 1 '<key>CFBundleIdentifier</key>' $app/Contents/Info.plist | 
tail -1 | sed -e 's,.*<string>,,' -e 's,</string>.*,,'`
+    codesign --verbose --identifier=$id --sign "$MACOSX_CODESIGNING_IDENTITY" 
$entitlements "$app"
+done
+
+# Then .framework ones. Again, be generic just for kicks.
 
-for framework in `find $APP_BUNDLE -name '*.framework' -type d`; do \
-    fn="$(basename $framework)"
+find "$APP_BUNDLE" -name '*.framework' -type d |
+while read framework; do
+    fn=`basename "$framework"`
     fn=${fn%.*}
-    for version in $framework/Versions/*; do \
-        if test ! -L $version -a -d $version; then
-            codesign --force --verbose --prefix=$MACOSX_BUNDLE_IDENTIFIER. 
--sign "$MACOSX_CODESIGNING_IDENTITY" $version/$fn
-            codesign --force --verbose --prefix=$MACOSX_BUNDLE_IDENTIFIER. 
--sign "$MACOSX_CODESIGNING_IDENTITY" $version
-        fi; \
-    done; \
+    for version in "$framework"/Versions/*; do
+        if test ! -L "$version" -a -d "$version"; then
+           # Assume the framework has a XML (and not binary) Info.plist
+           id=`grep -A 1 '<key>CFBundleIdentifier</key>' 
$version/Resources/Info.plist | tail -1 | sed -e 's,.*<string>,,' -e 
's,</string>.*,,'`
+            codesign --verbose --identifier=$id --sign 
"$MACOSX_CODESIGNING_IDENTITY" "$version"
+        fi
+    done
+done
+
+# Then mdimporters
+
+find "$APP_BUNDLE" -name '*.mdimporter' -type d |
+while read bundle; do
+    codesign --verbose --prefix=$MACOSX_BUNDLE_IDENTIFIER. --sign 
"$MACOSX_CODESIGNING_IDENTITY" "$bundle"
 done
 
 # Sign the app bundle as a whole which means (re-)signing the
@@ -85,18 +103,12 @@ done
 #
 # At this stage we also attach the entitlements in the sandboxing case
 #
-# Also omit some files from the Bunlde's seal via the resource-rules
+# Also omit some files from the Bundle's seal via the resource-rules
 # (bootstraprc and similar that the user might adjust and image files)
 # See also https://developer.apple.com/library/mac/technotes/tn2206/
 
 id=`echo ${MACOSX_APP_NAME} | tr ' ' '-'`
 
-if test -n "$ENABLE_MACOSX_SANDBOX"; then
-    entitlements="--entitlements $BUILDDIR/lo.xcent"
-else
-    resource_rules="--resource-rules 
$SRCDIR/setup_native/source/mac/CodesignRules.plist"
-fi
-
-codesign --force --verbose --identifier="${MACOSX_BUNDLE_IDENTIFIER}.$id" 
$resource_rules --sign "$MACOSX_CODESIGNING_IDENTITY" $entitlements $APP_BUNDLE
+codesign --force --verbose --identifier="${MACOSX_BUNDLE_IDENTIFIER}" 
$resource_rules --sign "$MACOSX_CODESIGNING_IDENTITY" $entitlements 
"$APP_BUNDLE"
 
 exit 0
diff --git a/solenv/gbuild/platform/macosx.mk b/solenv/gbuild/platform/macosx.mk
index a40e054..6530741 100644
--- a/solenv/gbuild/platform/macosx.mk
+++ b/solenv/gbuild/platform/macosx.mk
@@ -122,12 +122,6 @@ $(if $(filter Executable,$(1)),\
        $$(call gb_Library_get_layer,$(2)))
 endef
 
-# We sign executables right after linking below. But not dylibs,
-# because many of them are built by ad-hoc or 3rd-party mechanisms. So
-# as we would need to sign those separately anyway, we do it for the
-# gbuild-built ones, too, after an app bundle has been constructed, in
-# the solenv/bin/macosx-codesign-app-bundle script.
-
 define gb_LinkTarget__command_dynamiclink
 $(call gb_Helper_abbreviate_dirs,\
        $(if 
$(CXXOBJECTS)$(OBJCXXOBJECTS)$(GENCXXOBJECTS)$(EXTRAOBJECTLISTS),$(gb_CXX),$(gb_CC))
 \
@@ -153,9 +147,6 @@ $(call gb_Helper_abbreviate_dirs,\
                $(PERL) $(SRCDIR)/solenv/bin/macosx-change-install-names.pl app 
$(LAYER) $(1) &&) \
        $(if $(filter Library Bundle CppunitTest,$(TARGETTYPE)),\
                $(PERL) $(SRCDIR)/solenv/bin/macosx-change-install-names.pl shl 
$(LAYER) $(1) &&) \
-       $(if $(MACOSX_CODESIGNING_IDENTITY), \
-               $(if $(filter Executable,$(TARGETTYPE)), \
-                       (codesign 
--identifier=$(MACOSX_BUNDLE_IDENTIFIER).$(notdir $(1)) --sign 
$(MACOSX_CODESIGNING_IDENTITY) --force $(1) || true) &&)) \
        $(if $(filter Library,$(TARGETTYPE)),\
                otool -l $(1) | grep -A 5 LC_ID_DYLIB \
                        > $(WORKDIR)/LinkTarget/$(2).exports.tmp && \
commit c0344073d5cfb85085ce52d9aa05391750696357
Author: Tor Lillqvist <t...@collabora.com>
Date:   Fri Sep 19 18:56:05 2014 +0300

    Use correct CFBundleExecutable in the Info.plist for Python.app
    
    Apparently the Python build machinery apparently does not use proper
    autoconfigury to expand this Info.plist.in file, so can't use
    @PYTHONFRAMEWORK@ as for the Info.plist for the framework itself, but
    have to hardcode LibreOfficePython.
    
    As such I am not sure that Python's way of including an app bundle
    inside a framework's Resources subtree is acceptable in the stricter
    code signing and Gatekeeper rules that soon will be in effect. Will
    see.
    
    Change-Id: I1ef9e7b748d41ec4b32d80e721d5fba5e7a90d18
    (cherry picked from commit a925583c009d2829e313cea11ed6cf7b40eca097)

diff --git a/external/python3/python-3.3.0-darwin.patch.1 
b/external/python3/python-3.3.0-darwin.patch.1
index ca70279..78a2e7a 100644
--- a/external/python3/python-3.3.0-darwin.patch.1
+++ b/external/python3/python-3.3.0-darwin.patch.1
@@ -72,3 +72,14 @@ no /usr/include.
        <key>CFBundleGetInfoString</key>
        <string>Python Runtime and Library</string>
        <key>CFBundleIdentifier</key>
+--- python3/Mac/Resources/app/Info.plist.in
++++ python3/Mac/Resources/app/Info.plist.in
+@@ -18,7 +18,7 @@
+               </dict>
+       </array>
+       <key>CFBundleExecutable</key>
+-      <string>Python</string>
++      <string>LibreOfficePython</string>
+       <key>CFBundleGetInfoString</key>
+       <string>%version%, (c) 2004-2013 Python Software Foundation.</string>
+       <key>CFBundleHelpBookFolder</key>
commit c5e17d376cd4931e0ae8efc6cdbe6dbd90f87bc5
Author: Tor Lillqvist <t...@collabora.com>
Date:   Fri Sep 19 17:10:15 2014 +0300

    Use correct CFBundleExecutable for the LibreOfficePython framework
    
    It should be the basename of the framework. The Python
    configury already provides that as @PYTHONFRAMEWORK@.
    
    Change-Id: I116a34c3bcc8f661abe16b2b5cc1b9268ecd2780
    (cherry picked from commit bb03775f9a73aeb4f25ad25c733bd88a2b6677d9)

diff --git a/external/python3/python-3.3.0-darwin.patch.1 
b/external/python3/python-3.3.0-darwin.patch.1
index a32b7f5..ca70279 100644
--- a/external/python3/python-3.3.0-darwin.patch.1
+++ b/external/python3/python-3.3.0-darwin.patch.1
@@ -61,3 +61,14 @@ no /usr/include.
  CPMAC=CpMac
  
  APPTEMPLATE=$(srcdir)/Resources/app
+--- python3/Mac/Resources/framework/Info.plist.in
++++ python3/Mac/Resources/framework/Info.plist.in
+@@ -5,7 +5,7 @@
+       <key>CFBundleDevelopmentRegion</key>
+       <string>English</string>
+       <key>CFBundleExecutable</key>
+-      <string>Python</string>
++      <string>@PYTHONFRAMEWORK@</string>
+       <key>CFBundleGetInfoString</key>
+       <string>Python Runtime and Library</string>
+       <key>CFBundleIdentifier</key>
commit 21ee2a77b71fb432bb66c4a3c59255252557341e
Author: Tor Lillqvist <t...@collabora.com>
Date:   Fri Sep 19 15:45:07 2014 +0300

    We need CFBundleVersion, too
    
    Change-Id: I50c12ffd741baf12589069d90f47566c5324ce7f
    (cherry picked from commit 68d186d3428df91c3efddb26294807d573c6306e)

diff --git a/sysui/desktop/macosx/Info.plist.in 
b/sysui/desktop/macosx/Info.plist.in
index f6d1dc8..6b9c0aa 100755
--- a/sysui/desktop/macosx/Info.plist.in
+++ b/sysui/desktop/macosx/Info.plist.in
@@ -1406,6 +1406,8 @@
        <string>main.icns</string>
        <key>CFBundleShortVersionString</key>
        <string>@MACOSX_BUNDLE_SHORTVERSION@</string>
+       <key>CFBundleVersion</key>
+       <string>@MACOSX_BUNDLE_SHORTVERSION@</string>
        <key>CFBundleIdentifier</key>
        <string>@MACOSX_BUNDLE_IDENTIFIER@</string>
        <key>CFBundleInfoDictionaryVersion</key>
commit f7fcac711831ee08b1344abc40969d8c806d0882
Author: Tor Lillqvist <t...@collabora.com>
Date:   Fri Sep 19 12:47:02 2014 +0300

    Unzip the InfoPlist.strings files into correct locations
    
    Not sure how useful it is to only provide translations for the ODF
    document format names, though.
    
    Change-Id: I22a2e5b896e077ca3067a30635f7cdf67c2f5e7c
    (cherry picked from commit 16f62d80c38f3920a40fc078edecad905ba2b196)

diff --git a/Makefile.in b/Makefile.in
index 6cbbd4f..e99ca43 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -294,9 +294,15 @@ ifeq ($(OS_FOR_BUILD),WNT)
 else
        @ooinstall $(TESTINSTALLDIR)
 ifneq ($(MACOSX_CODESIGNING_IDENTITY),)
-# The InfoPlist_*.zip files in "bin" are totally pointless and should
-# not be there. I am too lazy at the moment to figure out how to
-# prevent them from ending up there.
+# Unzip bin/InfoPlist_*.zip files into corresponding Resources/*.lproj 
directories.
+       set -x; for F in $(TESTINSTALLDIR)/LibreOffice$(if 
$(ENABLE_RELEASE_BUILD),,Dev).app/Contents/bin/InfoPlist_*.zip; do \
+               bn=`basename $$F .zip`; \
+               lang=$${bn#InfoPlist_}; \
+               lproj=$(TESTINSTALLDIR)/LibreOffice$(if 
$(ENABLE_RELEASE_BUILD),,Dev).app/Contents/Resources/$$lang.lproj; \
+               mkdir $$lproj; \
+               (cd $$lproj; unzip $$F); \
+       done
+# And remove the "bin" folder which should not be there
        rm -rf $(TESTINSTALLDIR)/LibreOffice$(if 
$(ENABLE_RELEASE_BUILD),,Dev).app/Contents/bin
        @macosx-codesign-app-bundle $(TESTINSTALLDIR)/LibreOffice$(if 
$(ENABLE_RELEASE_BUILD),,Dev).app
 endif
commit c5aabb8988d609a5f6960da037ff815e13c146b0
Author: Tor Lillqvist <t...@collabora.com>
Date:   Mon Sep 15 21:50:35 2014 +0300

    We don't want those bin/InfoPlist_*.zip files in the app bundle
    
    Change-Id: I29eefa599f175d98303fca8f5ccf1c8fe85b0bbc
    (cherry picked from commit 7956d38fa3c0db77b9b2b41f870bd3587e3dc1af)

diff --git a/Makefile.in b/Makefile.in
index 2c86b7c..6cbbd4f 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -294,6 +294,10 @@ ifeq ($(OS_FOR_BUILD),WNT)
 else
        @ooinstall $(TESTINSTALLDIR)
 ifneq ($(MACOSX_CODESIGNING_IDENTITY),)
+# The InfoPlist_*.zip files in "bin" are totally pointless and should
+# not be there. I am too lazy at the moment to figure out how to
+# prevent them from ending up there.
+       rm -rf $(TESTINSTALLDIR)/LibreOffice$(if 
$(ENABLE_RELEASE_BUILD),,Dev).app/Contents/bin
        @macosx-codesign-app-bundle $(TESTINSTALLDIR)/LibreOffice$(if 
$(ENABLE_RELEASE_BUILD),,Dev).app
 endif
 endif
commit 6eebafddc4cedfff990a07bd0b4e1e0484b58ccf
Author: Tor Lillqvist <t...@collabora.com>
Date:   Fri Sep 12 00:41:53 2014 +0300

    Typo
    
    Change-Id: I0a7d2f89fc8a01c128c65fc8708d98205072f2eb
    (cherry picked from commit edcbe70b4daf352976b5393148e34d199c8e08b8)

diff --git a/Makefile.in b/Makefile.in
index 9db0823..2c86b7c 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -294,7 +294,7 @@ ifeq ($(OS_FOR_BUILD),WNT)
 else
        @ooinstall $(TESTINSTALLDIR)
 ifneq ($(MACOSX_CODESIGNING_IDENTITY),)
-       @macosx-codesign-app-bundle $(TESTINSTALLDIR)/LibreOffice$(if 
$(ENABLE_RELASE_BUILD),,Dev).app
+       @macosx-codesign-app-bundle $(TESTINSTALLDIR)/LibreOffice$(if 
$(ENABLE_RELEASE_BUILD),,Dev).app
 endif
 endif
        @$(call gb_Top_InstallFinished,Test Installation,$(TESTINSTALLDIR))
commit 5e4c1ea41c8e73ab189e7b165d487e8d612bc70f
Author: Stephan Bergmann <sberg...@redhat.com>
Date:   Wed Sep 17 11:45:14 2014 +0200

    BRAND_BIN_SUBDIR -> BRAND_INI_DIR, to cater for new Mac OS X layout
    
    Change-Id: Ic367545895a25a4cf6e95fc1be2f5db9f36a221b

diff --git a/instsetoo_native/CustomTarget_setup.mk 
b/instsetoo_native/CustomTarget_setup.mk
index 48c264b..adae63c 100644
--- a/instsetoo_native/CustomTarget_setup.mk
+++ b/instsetoo_native/CustomTarget_setup.mk
@@ -48,7 +48,7 @@ $(call 
gb_CustomTarget_get_workdir,instsetoo_native/setup)/$(call gb_Helper_get_
        ( \
                echo '[Bootstrap]' \
                && echo 'BRAND_BASE_DIR=$${ORIGIN}/..' \
-               && echo 'BRAND_BIN_SUBDIR=$(LIBO_BIN_FOLDER)' \
+               && echo 'BRAND_INI_DIR=$${ORIGIN}' \
                && echo 'BRAND_SHARE_SUBDIR=$(LIBO_SHARE_FOLDER)' \
                && echo 
'CONFIGURATION_LAYERS=xcsxcu:$${BRAND_BASE_DIR}/$(LIBO_SHARE_FOLDER)/registry 
res:$${BRAND_BASE_DIR}/$(LIBO_SHARE_FOLDER)/registry 
bundledext:$${$${BRAND_BASE_DIR}/$(LIBO_ETC_FOLDER)/$(call 
gb_Helper_get_rcfile,uno):BUNDLED_EXTENSIONS_USER}/registry/com.sun.star.comp.deployment.configuration.PackageRegistryBackend/configmgr.ini
 sharedext:$${$${BRAND_BASE_DIR}/$(LIBO_ETC_FOLDER)/$(call 
gb_Helper_get_rcfile,uno):SHARED_EXTENSIONS_USER}/registry/com.sun.star.comp.deployment.configuration.PackageRegistryBackend/configmgr.ini
 userext:$${$${BRAND_BASE_DIR}/$(LIBO_ETC_FOLDER)/$(call 
gb_Helper_get_rcfile,uno):UNO_USER_PACKAGES_CACHE}/registry/com.sun.star.comp.deployment.configuration.PackageRegistryBackend/configmgr.ini
 user:$${$$BRAND_BASE_DIR/$(LIBO_ETC_FOLDER)/$(call 
gb_Helper_get_rcfile,bootstrap):UserInstallation}/user/registrymodifications.xcu'
 \
                && echo 
'LO_JAVA_DIR=$${BRAND_BASE_DIR}/$(LIBO_SHARE_JAVA_FOLDER)' \
diff --git a/scp2/source/ooo/common_brand.scp b/scp2/source/ooo/common_brand.scp
index 12645ee..ffc0729 100644
--- a/scp2/source/ooo/common_brand.scp
+++ b/scp2/source/ooo/common_brand.scp
@@ -1102,8 +1102,8 @@ ProfileItem 
gid_Brand_Profileitem_Fundamental_Brand_Bin_Subdir
     ModuleID = gid_Module_Root_Brand;
     ProfileID = gid_Brand_Profile_Fundamental_Ini;
     Section = "Bootstrap";
-    Key = "BRAND_BIN_SUBDIR";
-    Value = LIBO_BIN_FOLDER;
+    Key = "BRAND_INI_DIR";
+    Value = "${ORIGIN}";
 End
 
 ProfileItem gid_Brand_Profileitem_Fundamental_Lo_Lib_Dir
diff --git 
a/scripting/java/com/sun/star/script/framework/container/ScriptMetaData.java 
b/scripting/java/com/sun/star/script/framework/container/ScriptMetaData.java
index 2270d54..f7ecc9f 100644
--- a/scripting/java/com/sun/star/script/framework/container/ScriptMetaData.java
+++ b/scripting/java/com/sun/star/script/framework/container/ScriptMetaData.java
@@ -128,7 +128,7 @@ public class ScriptMetaData extends ScriptEntry implements 
Cloneable {
         "vnd.sun.star.expand:$BRAND_BASE_DIR/$BRAND_SHARE_SUBDIR";
 
     private static final String USER =
-        "vnd.sun.star.expand:${$BRAND_BASE_DIR/BRAND_BIN_SUBDIR/" +
+        "vnd.sun.star.expand:${$BRAND_INI_DIR/" +
         PathUtils.BOOTSTRAP_NAME +
         "::UserInstallation}/user";
 
diff --git 
a/scripting/java/com/sun/star/script/framework/provider/ScriptProvider.java 
b/scripting/java/com/sun/star/script/framework/provider/ScriptProvider.java
index a348dffd..5f93db0 100644
--- a/scripting/java/com/sun/star/script/framework/provider/ScriptProvider.java
+++ b/scripting/java/com/sun/star/script/framework/provider/ScriptProvider.java
@@ -211,20 +211,20 @@ public abstract class ScriptProvider
                     if ( originalContextURL.startsWith( "bundled" ) )
                     {
                         contextUrl = "vnd.sun.star.expand:$BUNDLED_EXTENSIONS";
-                        extensionDb = 
"vnd.sun.star.expand:${$BRAND_BASE_DIR/$BRAND_BIN_SUBDIR/" + 
PathUtils.BOOTSTRAP_NAME + "::UserInstallation}/user";
+                        extensionDb = "vnd.sun.star.expand:${$BRAND_INI_DIR/" 
+ PathUtils.BOOTSTRAP_NAME + "::UserInstallation}/user";
                         extensionRepository = "bundled";
                     }
 
                     if ( originalContextURL.startsWith( "share" ) )
                     {
                         contextUrl = 
"vnd.sun.star.expand:$BRAND_BASE_DIR/$BRAND_SHARE_SUBDIR";
-                        extensionDb = 
"vnd.sun.star.expand:${$BRAND_BASE_DIR/$BRAND_BIN_SUBDIR/" + 
PathUtils.BOOTSTRAP_NAME + "::UserInstallation}/user";
+                        extensionDb = "vnd.sun.star.expand:${$BRAND_INI_DIR/" 
+ PathUtils.BOOTSTRAP_NAME + "::UserInstallation}/user";
                         extensionRepository = "shared";
                     }
                     else if ( originalContextURL.startsWith( "user" ) )
                     {
-                        contextUrl = 
"vnd.sun.star.expand:${$BRAND_BASE_DIR/$BRAND_BIN_SUBDIR/" + 
PathUtils.BOOTSTRAP_NAME + "::UserInstallation}/user";
-                        extensionDb = 
"vnd.sun.star.expand:${$BRAND_BASE_DIR/$BRAND_BIN_SUBDIR/" + 
PathUtils.BOOTSTRAP_NAME + "::UserInstallation}/user";
+                        contextUrl = "vnd.sun.star.expand:${$BRAND_INI_DIR/" + 
PathUtils.BOOTSTRAP_NAME + "::UserInstallation}/user";
+                        extensionDb = "vnd.sun.star.expand:${$BRAND_INI_DIR/" 
+ PathUtils.BOOTSTRAP_NAME + "::UserInstallation}/user";
                         extensionRepository = "user";
                     }
 
diff --git a/scripting/source/pyprov/pythonscript.py 
b/scripting/source/pyprov/pythonscript.py
index 6732e25..03f0cde 100755
--- a/scripting/source/pyprov/pythonscript.py
+++ b/scripting/source/pyprov/pythonscript.py
@@ -176,7 +176,7 @@ class MyUriHelper:
         self.s_UriMap = \
         { "share" : 
"vnd.sun.star.expand:$BRAND_BASE_DIR/$BRAND_SHARE_SUBDIR/Scripts/python" , \
           "share:uno_packages" : 
"vnd.sun.star.expand:$UNO_SHARED_PACKAGES_CACHE/uno_packages", \
-          "user" : "vnd.sun.star.expand:${$BRAND_BASE_DIR/$BRAND_BIN_SUBDIR/" 
+ toIniName( "bootstrap") + "::UserInstallation}/user/Scripts/python" , \
+          "user" : "vnd.sun.star.expand:${$BRAND_INI_DIR/" + toIniName( 
"bootstrap") + "::UserInstallation}/user/Scripts/python" , \
           "user:uno_packages" : 
"vnd.sun.star.expand:$UNO_USER_PACKAGES_CACHE/uno_packages" } 
         self.m_uriRefFac = 
ctx.ServiceManager.createInstanceWithContext("com.sun.star.uri.UriReferenceFactory",ctx)
         if location.startswith( "vnd.sun.star.tdoc" ):
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to