[Libreoffice-commits] core.git: 3 commits - configure.ac distro-configs/LibreOfficeMacOSX.conf distro-configs/LibreOfficeWin32.conf distro-configs/OxygenOfficeWin32.conf distro-configs/README extensions/source instsetoo_native/Module_instsetoo_native.mk sdext/source

Stephan Bergmann sbergman at redhat.com
Tue Oct 15 09:24:56 PDT 2013


 configure.ac                                 |   63 +++++++--------------------
 distro-configs/LibreOfficeMacOSX.conf        |    1 
 distro-configs/LibreOfficeWin32.conf         |    1 
 distro-configs/OxygenOfficeWin32.conf        |    1 
 distro-configs/README                        |    7 +++
 extensions/source/update/feed/updatefeed.cxx |   13 -----
 instsetoo_native/Module_instsetoo_native.mk  |    2 
 sdext/source/minimizer/fileopendialog.cxx    |   31 +++----------
 8 files changed, 36 insertions(+), 83 deletions(-)

New commits:
commit a83b3b5d45ba516883e80eefd7c5f6785b8a567c
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Oct 15 18:24:14 2013 +0200

    Minimizer: *.mini was saved w/o .odp etc. extension (and clean up)
    
    Change-Id: I4626794f7816ae455a392cdc0acbac42c866fff4

diff --git a/sdext/source/minimizer/fileopendialog.cxx b/sdext/source/minimizer/fileopendialog.cxx
index e7f42d4..d0b2761 100644
--- a/sdext/source/minimizer/fileopendialog.cxx
+++ b/sdext/source/minimizer/fileopendialog.cxx
@@ -46,8 +46,6 @@
 #include <com/sun/star/view/XControlAccess.hpp>
 #include <com/sun/star/ucb/InteractiveAugmentedIOException.hpp>
 
-#include <rtl/ustrbuf.hxx>
-
 using namespace ::rtl;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::lang;
@@ -140,29 +138,14 @@ FileOpenDialog::FileOpenDialog( const Reference< XComponentContext >& rxContext
                 }
                 if ( aExtensions.getLength() )
                 {
-                    OUString aExtension = aExtensions[0];
-
-                    const char filter[] = "*.";
-                    // the filter title must be formed in the same it is currently done
-                    // in the internal implementation: "UIName (.<extension>)"
-                    OUStringBuffer aUIName;
-                    // the filter must be in the form "*.<extension>"
-                    OUStringBuffer aFilter;
-
-                    // form the title: "<UIName> (.<extension)"
-                    aUIName.append( aIter->maUIName );
-                    aUIName.appendAscii( RTL_CONSTASCII_STRINGPARAM( " (." ));
-                    aUIName.append( aExtension );
-                    aUIName.append( sal_Unicode( ')' ) );
-                    // form the filter: "(*.<extension>)"
-                    aFilter.appendAscii( RTL_CONSTASCII_STRINGPARAM( filter ) );
-                    aFilter.append( aExtensions[0] );
-
-                    mxFilePicker->appendFilter( aUIName.makeStringAndClear(),
-                                                  aFilter.makeStringAndClear() );
-
+                    // The filter title must be formed in the same way it is
+                    // currently done in the internal implementation:
+                    OUString aTitle(
+                        aIter->maUIName + " (." + aExtensions[0] + ")");
+                    OUString aFilter("*." + aExtensions[0]);
+                    mxFilePicker->appendFilter(aTitle, aFilter);
                     if ( aIter->maFlags & 0x100 )
-                        mxFilePicker->setCurrentFilter( aIter->maUIName );
+                        mxFilePicker->setCurrentFilter(aTitle);
                 }
             }
         }
commit 4fa1fa931e9d5d8300eb185cfcbf08dcf95787e1
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Oct 15 17:54:41 2013 +0200

    Use OUString::replaceAll
    
    Change-Id: Ide87f07a97a51d924947f7959016164b98ab43f9

diff --git a/extensions/source/update/feed/updatefeed.cxx b/extensions/source/update/feed/updatefeed.cxx
index e18afa1..2274ad5 100644
--- a/extensions/source/update/feed/updatefeed.cxx
+++ b/extensions/source/update/feed/updatefeed.cxx
@@ -352,18 +352,7 @@ UpdateInformationProvider::UpdateInformationProvider(
 
     OUString aUserAgent( "${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE("version") ":UpdateUserAgent}" );
     rtl::Bootstrap::expandMacros( aUserAgent );
-
-    for (sal_Int32 i = 0;;) {
-        i = aUserAgent.indexOfAsciiL(
-            RTL_CONSTASCII_STRINGPARAM("<PRODUCT>"), i);
-        if (i == -1) {
-            break;
-        }
-        aUserAgent = aUserAgent.replaceAt(
-            i, RTL_CONSTASCII_LENGTH("<PRODUCT>"), product);
-        i += product.getLength();
-    }
-
+    aUserAgent = aUserAgent.replaceAll("<PRODUCT>", product);
     SAL_INFO("extensions.update", "UpdateUserAgent: " << aUserAgent);
 
     m_aRequestHeaderList[0].First = "Accept-Language";
commit 8fc7e560db11f424362c8effdeb61eb8d1526256
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Oct 15 17:10:01 2013 +0200

    Make building installation sets depend on --with-package-format=...
    
    ...instead of inconsitently having it depend on --enable-epm for some platforms
    and having it always enabled on Windows.  Only Android and iOS are presumably
    still special and build any installation sets in their specific modules and
    outside instsetoo_native.
    
    One consequence is that for a non-Windows --enable-online-update
    --without-package-format build, instdir's version ini-file contains an
    UpdateURL that ends in just "?pkgfmt=" without an actual format identifier.
    However, checking whether the update feature would actually work is difficult
    for most such developer builds, anyway.
    
    Change-Id: If14fcf0b2e612499811e8a6e067a854bda612c42

diff --git a/configure.ac b/configure.ac
index f3dfc1b..0375a34 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1404,10 +1404,11 @@ AC_ARG_WITH(epm,
 
 AC_ARG_WITH(package-format,
     AS_HELP_STRING([--with-package-format],
-        [Specify package format(s) for LibreOffice installsets. Default is the
-         "normal" one of the OS/Distribution. Possible values: aix, bsd, deb,
-         inst, tardist, osx, pkg, rpm, setld, native, portable, archive, dmg,
-          installed, msi. Example: --with-package-format="deb dmg"]),
+        [Specify package format(s) for LibreOffice installation sets. The
+         implicit --without-package-format leads to no installation sets being
+         generated. Possible values: aix, archive, bsd, deb, dmg, inst,
+         installed, msi, native, osx, pkg, portable, rpm, setld, and tardist.
+         Example: --with-package-format='deb rpm']),
 ,)
 
 AC_ARG_WITH(tls,
@@ -4400,7 +4401,7 @@ dnl ===================================================================
 dnl Test which package format to use
 dnl ===================================================================
 AC_MSG_CHECKING([which package format to use])
-if test -n "$with_package_format"; then
+if test -n "$with_package_format" -a "$with_package_format" != no; then
     for i in $with_package_format; do
         case "$i" in
         aix | bsd | deb | inst | tardist | osx | pkg | rpm | setld | native | portable | archive | dmg | installed | msi)
@@ -4428,49 +4429,11 @@ msi - Windows .msi
         esac
     done
     PKGFORMAT="$with_package_format"
-elif test "$enable_epm" = "yes"; then
-    # defaults
-    case "$_os" in
-    Darwin)
-        PKGFORMAT=dmg
-        ;;
-    SunOS)
-        PKGFORMAT=pkg
-        ;;
-    Linux)
-        # if building on Debian, default should be deb...
-        if test -e /etc/debian_version; then
-            PKGFORMAT=deb
-        else
-            PKGFORMAT=rpm
-        fi
-        ;;
-    AIX)
-        PKGFORMAT=rpm
-        ;;
-    OpenBSD|DragonFly)
-        PKGFORMAT=portable
-        ;;
-    *BSD)
-        PKGFORMAT=bsd
-        ;;
-    WINNT)
-        PKGFORMAT=msi
-        ;;
-    # we never should get here since we check the arciecture/os at the beginning,
-    # but go sure...
-    *)
-        AC_MSG_ERROR([unknown system])
-    esac
+    AC_MSG_RESULT([$PKGFORMAT])
 else
-    if test "$WITH_MINGW" = "yes"; then
-        # when tested, we should default this to 'msi', instead of 'archive'
-        PKGFORMAT=archive
-    else
-        PKGFORMAT=native
-    fi
+    PKGFORMAT=
+    AC_MSG_RESULT([none])
 fi
-AC_MSG_RESULT([$PKGFORMAT])
 AC_SUBST(PKGFORMAT)
 
 dnl ===================================================================
@@ -7463,6 +7426,14 @@ if test "$enable_epm" = "yes"; then
     AC_SUBST(DPKG)
     AC_SUBST(PKGMK)
 else
+    for i in $PKGFORMAT; do
+        case "$i" in
+        aix | bsd | deb | inst | tardist | osx | pkg | rpm | setld | native | portable)
+            AC_MSG_ERROR(
+                [--with-package-format='$PKGFORMAT' requires --enable-epm])
+            ;;
+        esac
+    done
     AC_MSG_RESULT([no])
     EPM=NO
 fi
diff --git a/distro-configs/LibreOfficeMacOSX.conf b/distro-configs/LibreOfficeMacOSX.conf
index 81b626c..a10bbd9 100644
--- a/distro-configs/LibreOfficeMacOSX.conf
+++ b/distro-configs/LibreOfficeMacOSX.conf
@@ -10,3 +10,4 @@
 --disable-gtk
 --with-help
 --with-myspell-dicts
+--with-package-format=dmg
diff --git a/distro-configs/LibreOfficeWin32.conf b/distro-configs/LibreOfficeWin32.conf
index 532fc31..b04c526 100644
--- a/distro-configs/LibreOfficeWin32.conf
+++ b/distro-configs/LibreOfficeWin32.conf
@@ -13,3 +13,4 @@
 --enable-win-mozab-driver
 --with-help
 --with-myspell-dicts
+--with-package-format=msi
diff --git a/distro-configs/OxygenOfficeWin32.conf b/distro-configs/OxygenOfficeWin32.conf
index 98802c2..42b96ae 100644
--- a/distro-configs/OxygenOfficeWin32.conf
+++ b/distro-configs/OxygenOfficeWin32.conf
@@ -29,6 +29,7 @@
 --with-jdk-home=/usr/local/jdk1.6.0_23/
 --without-junit
 --with-helppack-integration
+--with-package-format=msi
 --enable-cairo
 --enable-graphite
 --enable-dependency-tracking
diff --git a/distro-configs/README b/distro-configs/README
index 50006fb..a374acb 100644
--- a/distro-configs/README
+++ b/distro-configs/README
@@ -8,6 +8,13 @@ contrary, the intent is that just running ./autogen.sh without any
 options at all should produce a buildable configuration for developers
 with interest in working on the most commonly used parts of the code.
 
+See [[https://wiki.documentfoundation.org/Development/ReleaseBuilds]] for how
+TDF builds make use of these switches.  (Especially, since --with-package-format
+now triggers whether or not installation sets are built, all the relevant *.conf
+files specify it, except for LibreOfficeLinux.conf, where the TDF build
+instructions pass an explicit --with-package-format="rpm deb" in addition to
+--with-distro=LibreOfficeLinux.)
+
 (Possibly the above is a misunderstanding, or maybe there never even
 has been any clear consensus what situations these files actually are
 intended for.)
diff --git a/instsetoo_native/Module_instsetoo_native.mk b/instsetoo_native/Module_instsetoo_native.mk
index dc9e4a5..ea540eb 100644
--- a/instsetoo_native/Module_instsetoo_native.mk
+++ b/instsetoo_native/Module_instsetoo_native.mk
@@ -9,7 +9,7 @@
 
 $(eval $(call gb_Module_Module,instsetoo_native))
 
-ifneq (,$(filter WNT,$(OS))$(filter-out NO,$(EPM)))
+ifneq (,$(PKGFORMAT)$(filter TRUE,$(LIBO_TEST_INSTALL)))
 
 $(eval $(call gb_Module_add_targets,instsetoo_native,\
 	CustomTarget_install \


More information about the Libreoffice-commits mailing list