[Libreoffice-commits] .: Branch 'libreoffice-3-3' - 2 commits - sysui/desktop xmlhelp/prj xmlhelp/source xmlhelp/util

Petr Mladek pmladek at kemper.freedesktop.org
Tue Dec 14 07:37:38 PST 2010


 sysui/desktop/freedesktop/freedesktop-menus.spec |    4 ++++
 sysui/desktop/mandriva/mandriva-menus.spec       |    7 ++++++-
 sysui/desktop/productversion.mk                  |   12 ++++++------
 sysui/desktop/redhat/redhat-menus.spec           |    5 +++++
 sysui/desktop/share/create_tree.sh               |    6 +++++-
 sysui/desktop/suse/suse-menus.spec               |    5 +++++
 xmlhelp/prj/build.lst                            |    2 +-
 xmlhelp/source/cxxhelp/provider/databases.hxx    |   18 ++++++++++--------
 xmlhelp/source/cxxhelp/provider/provider.cxx     |    6 ++++--
 xmlhelp/source/treeview/makefile.mk              |    1 +
 xmlhelp/source/treeview/tvread.cxx               |    5 ++++-
 xmlhelp/util/makefile.mk                         |    1 +
 12 files changed, 52 insertions(+), 20 deletions(-)

New commits:
commit d873fc5f1226f4689936b736704b2f3d9156bbe5
Author: Petr Mladek <pmladek at suse.cz>
Date:   Tue Dec 14 16:32:58 2010 +0100

    use BrOffice also in the help content when enabled (fdo#31770)
    
    use ::utl::ConfigManager::GetDirectConfigProperty to get
    the product name; it returns BrOffice in pt_BR locales
    when BrOffice branding enabled
    
    Signed off by Michael Meeks <michael.meeks at novell.com>

diff --git a/xmlhelp/prj/build.lst b/xmlhelp/prj/build.lst
index 7430bf6..00e285c 100644
--- a/xmlhelp/prj/build.lst
+++ b/xmlhelp/prj/build.lst
@@ -1,4 +1,4 @@
-xh      xmlhelp :       comphelper ucbhelper LIBXSLT:libxslt unoil BERKELEYDB:berkeleydb LUCENE:lucene javaunohelper l10ntools NULL
+xh      xmlhelp :       comphelper ucbhelper LIBXSLT:libxslt unoil BERKELEYDB:berkeleydb LUCENE:lucene javaunohelper l10ntools unotools NULL
 xh	xmlhelp									usr1	-	all	xh_mkout NULL
 xh	xmlhelp\inc								nmake	-	all	xh_inc NULL
 xh	xmlhelp\source\treeview					nmake	-	all	xh_treeview xh_inc NULL
diff --git a/xmlhelp/source/cxxhelp/provider/databases.hxx b/xmlhelp/source/cxxhelp/provider/databases.hxx
index 134adbd..5f029c2 100644
--- a/xmlhelp/source/cxxhelp/provider/databases.hxx
+++ b/xmlhelp/source/cxxhelp/provider/databases.hxx
@@ -310,14 +310,16 @@ namespace chelp {
         int    m_nCustomCSSDocLength;
         char*  m_pCustomCSSDoc;
         rtl::OUString m_aCSS;
-        
-#define PRODUCTNAME    0
-#define PRODUCTVERSION 1
-#define VENDORNAME     2
-#define VENDORVERSION  3
-#define VENDORSHORT    4
-#define NEWPRODUCTNAME    5
-#define NEWPRODUCTVERSION 6
+
+        enum {
+            PRODUCTNAME = 0,
+            PRODUCTVERSION,
+            VENDORNAME,
+            VENDORVERSION,
+            VENDORSHORT,
+            NEWPRODUCTNAME,
+            NEWPRODUCTVERSION
+        };
         
         int                    m_vAdd[7];
         rtl::OUString          m_vReplacement[7];
diff --git a/xmlhelp/source/cxxhelp/provider/provider.cxx b/xmlhelp/source/cxxhelp/provider/provider.cxx
index 365fff0..e6f4898 100644
--- a/xmlhelp/source/cxxhelp/provider/provider.cxx
+++ b/xmlhelp/source/cxxhelp/provider/provider.cxx
@@ -47,6 +47,7 @@
 #include <com/sun/star/container/XNameReplace.hpp>
 #include <com/sun/star/uno/XComponentContext.hpp>
 #include <com/sun/star/beans/XPropertySet.hpp>
+#include <unotools/configmgr.hxx>
 #include <rtl/bootstrap.hxx>
 
 #include "databases.hxx"
@@ -306,9 +307,10 @@ void ContentProvider::init()
      *  productversion,
      */
 
+    rtl::OUString productname;
+    ::utl::ConfigManager::GetDirectConfigProperty(::utl::ConfigManager::PRODUCTNAME) >>= productname;
+
     xHierAccess = getHierAccess( sProvider, "org.openoffice.Setup" );
-    rtl::OUString productname(
-        getKey( xHierAccess,"Product/ooName" ) );
 
     rtl::OUString setupversion(
         getKey( xHierAccess,"Product/ooSetupVersion" ) );
diff --git a/xmlhelp/source/treeview/makefile.mk b/xmlhelp/source/treeview/makefile.mk
index 0c38586..3dc6545 100644
--- a/xmlhelp/source/treeview/makefile.mk
+++ b/xmlhelp/source/treeview/makefile.mk
@@ -57,6 +57,7 @@ SHL1STDLIBS=\
     $(CPPULIB) \
     $(COMPHELPERLIB)         \
     $(EXPATASCII3RDLIB)      \
+    $(UNOTOOLSLIB)	     \
     $(SALLIB)  
 SHL1VERSIONMAP=$(SOLARENV)/src/component.map
 
diff --git a/xmlhelp/source/treeview/tvread.cxx b/xmlhelp/source/treeview/tvread.cxx
index 988a775..9d3ffa8 100644
--- a/xmlhelp/source/treeview/tvread.cxx
+++ b/xmlhelp/source/treeview/tvread.cxx
@@ -36,6 +36,7 @@
 #include "tvread.hxx"
 #include <expat.h>
 #include <osl/file.hxx>
+#include <unotools/configmgr.hxx>
 #include <com/sun/star/frame/XConfigManager.hpp>
 #include <com/sun/star/beans/PropertyValue.hpp>
 
@@ -676,10 +677,12 @@ ConfigData TVChildTarget::init( const Reference< XMultiServiceFactory >& xSMgr )
     /*                       reading setup                                */
     /**********************************************************************/
 
+    rtl::OUString productName;
+    ::utl::ConfigManager::GetDirectConfigProperty(::utl::ConfigManager::PRODUCTNAME) >>= productName;
+
     xHierAccess = getHierAccess( sProvider,
                                  "org.openoffice.Setup" );
 
-    rtl::OUString productName( getKey(  xHierAccess,"Product/ooName" ) );
     rtl::OUString setupversion( getKey( xHierAccess,"Product/ooSetupVersion" ) );
     rtl::OUString setupextension;
 
diff --git a/xmlhelp/util/makefile.mk b/xmlhelp/util/makefile.mk
index 66551f1..5bc5bc6 100644
--- a/xmlhelp/util/makefile.mk
+++ b/xmlhelp/util/makefile.mk
@@ -59,6 +59,7 @@ SHL1STDLIBS=                     \
     $(COMPHELPERLIB)         \
     $(SALLIB)                \
     $(EXPATASCII3RDLIB)      \
+    $(UNOTOOLSLIB)           \
     $(UCBHELPERLIB)          \
         $(BERKELEYLIB)           \
         $(XSLTLIB)
commit 45b2e791e0ef33c7665cf6047a6dcb88c2862799
Author: Petr Mladek <pmladek at suse.cz>
Date:   Sun Dec 12 20:54:39 2010 +0100

    fix broffice branding packages (fdo#32229)
    
    - rename the packages from broffice.org to broffice
    - add /opt/broffice compat symlink

diff --git a/sysui/desktop/freedesktop/freedesktop-menus.spec b/sysui/desktop/freedesktop/freedesktop-menus.spec
index 01bec9f..30c2dd6 100644
--- a/sysui/desktop/freedesktop/freedesktop-menus.spec
+++ b/sysui/desktop/freedesktop/freedesktop-menus.spec
@@ -318,6 +318,10 @@ done
 # glibc breaks rpm unless rpm is build with internal glob-matching (issue 49374)
 # https://bugzilla.redhat.com/beta/show_bug.cgi?id=134362
 %defattr(-, root, root)
+%if %unixfilename != libreoffice
+# compat symlinks
+%attr(0755, root, root) /opt/%unixfilename
+%endif
 %attr(0755, root, root) /usr/bin/*
 /usr/share/applications/%unixfilename-base.desktop
 /usr/share/applications/%unixfilename-calc.desktop
diff --git a/sysui/desktop/mandriva/mandriva-menus.spec b/sysui/desktop/mandriva/mandriva-menus.spec
index f02a468..f068788 100644
--- a/sysui/desktop/mandriva/mandriva-menus.spec
+++ b/sysui/desktop/mandriva/mandriva-menus.spec
@@ -309,7 +309,12 @@ fi
 
 
 %files
-%attr(0755,root,root) /usr/bin/%unixfilename
+%if %unixfilename != libreoffice
+# compat symlinks
+%attr(0755,root,root) /opt/%unixfilename
+%attr(0755,root,root) /usr/bin/libreoffice
+%attr(0755,root,root) /usr/bin/libreoffice-printeradmin
+%endif
 %attr(0755,root,root) %verify(not size md5) /usr/bin/%unixfilename
 %attr(0755,root,root) /usr/bin/%unixfilename-printeradmin
 %defattr(0644, root, root)
diff --git a/sysui/desktop/productversion.mk b/sysui/desktop/productversion.mk
index e9bd131..6f41333 100644
--- a/sysui/desktop/productversion.mk
+++ b/sysui/desktop/productversion.mk
@@ -65,11 +65,11 @@ PKGVERSION.libreoffice = $(PKGVERSION)
 UNIXFILENAME.libreoffice = $(PRODUCTNAME.libreoffice:l)
 ICONPREFIX.libreoffice = $(UNIXFILENAME.libreoffice:s/.//g)
 
-PRODUCTNAME.broffice.org = BrOffice.org
-PRODUCTVERSION.broffice.org = $(PRODUCTVERSION)
-PRODUCTVERSIONSHORT.broffice.org = $(PRODUCTVERSIONSHORT)
-PKGVERSION.broffice.org = $(PKGVERSION)
-UNIXFILENAME.broffice.org = $(PRODUCTNAME.broffice.org:l)
-ICONPREFIX.broffice.org = $(UNIXFILENAME.broffice.org:s/.//g)
+PRODUCTNAME.broffice = BrOffice
+PRODUCTVERSION.broffice = $(PRODUCTVERSION)
+PRODUCTVERSIONSHORT.broffice = $(PRODUCTVERSIONSHORT)
+PKGVERSION.broffice = $(PKGVERSION)
+UNIXFILENAME.broffice = $(PRODUCTNAME.broffice:l)
+ICONPREFIX.broffice = $(UNIXFILENAME.broffice:s/.//g)
 
 
diff --git a/sysui/desktop/redhat/redhat-menus.spec b/sysui/desktop/redhat/redhat-menus.spec
index ce9cdc2..663fe23 100644
--- a/sysui/desktop/redhat/redhat-menus.spec
+++ b/sysui/desktop/redhat/redhat-menus.spec
@@ -268,7 +268,12 @@ for theme in gnome hicolor locolor; do
 done
 
 %files
+%if %unixfilename != libreoffice
+# compat symlinks
+%attr(0755,root,root) /opt/%unixfilename
 %attr(0755,root,root) /usr/bin/libreoffice
+%attr(0755,root,root) /usr/bin/libreoffice-printeradmin
+%endif
 %attr(0755,root,root) %verify(not size md5) /usr/bin/%unixfilename
 %attr(0755,root,root) /usr/bin/%unixfilename-printeradmin
 %defattr(0644, root, root)
diff --git a/sysui/desktop/share/create_tree.sh b/sysui/desktop/share/create_tree.sh
index 48b0458..e7b3303 100644
--- a/sysui/desktop/share/create_tree.sh
+++ b/sysui/desktop/share/create_tree.sh
@@ -92,13 +92,17 @@ fi
 
 mkdir -p ${DESTDIR}/usr/bin
 
-office_root=/opt/${PREFIX}
+office_prefix=/opt
+office_root=${office_prefix}/${PREFIX}
 
 cp openoffice.sh ${DESTDIR}/usr/bin/${PREFIX}
 cp printeradmin.sh ${DESTDIR}/usr/bin/${PREFIX}-printeradmin
 chmod 0755 ${DESTDIR}/usr/bin/${PREFIX} ${DESTDIR}/usr/bin/${PREFIX}-printeradmin
 
 if test "${PREFIX}" != libreoffice ; then
+    # compat symlinks
+    mkdir -p ${DESTDIR}${office_prefix}
+    ln -sf libreoffice ${DESTDIR}${office_root}
     ln -sf /usr/bin/${PREFIX} ${DESTDIR}/usr/bin/libreoffice
     ln -sf /usr/bin/${PREFIX}-printeradmin ${DESTDIR}/usr/bin/libreoffice-printeradmin
 fi
diff --git a/sysui/desktop/suse/suse-menus.spec b/sysui/desktop/suse/suse-menus.spec
index 52df81f..fe70969 100644
--- a/sysui/desktop/suse/suse-menus.spec
+++ b/sysui/desktop/suse/suse-menus.spec
@@ -280,7 +280,12 @@ for themedir in /opt/gnome/share/icons/gnome /opt/gnome/share/icons/hicolor /opt
 done
 
 %files
+%if %unixfilename != libreoffice
+# compat symlinks
+%attr(0755,root,root) /opt/%unixfilename
 %attr(0755,root,root) /usr/bin/libreoffice
+%attr(0755,root,root) /usr/bin/libreoffice-printeradmin
+%endif
 %attr(0755,root,root) %verify(not size md5) /usr/bin/%unixfilename
 %attr(0755,root,root) /usr/bin/%unixfilename-printeradmin
 %defattr(0644, root, root)


More information about the Libreoffice-commits mailing list