[Libreoffice-commits] .: Branch 'libreoffice-4-0' - 3 commits - config/config_version.h.in configure.ac solenv/gbuild vcl/inc vcl/source vcl/unx
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Jan 14 03:32:54 PST 2013
config/config_version.h.in | 14 ++++++++++++++
configure.ac | 18 +++++++++++++++++-
solenv/gbuild/platform/com_GCC_defs.mk | 4 +++-
solenv/gbuild/platform/com_MSC_class.mk | 1 +
vcl/inc/svdata.hxx | 5 +++++
vcl/source/app/svapp.cxx | 4 ++++
vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx | 4 ++++
vcl/unx/gtk/window/gtkframe.cxx | 6 +-----
8 files changed, 49 insertions(+), 7 deletions(-)
New commits:
commit f9112b4f3b1952d23290597963d63c92d5356352
Author: Noel Power <noel.power at suse.com>
Date: Fri Jan 11 18:38:47 2013 +0000
add config path for commit bf85d5eb33ff33c9ff94336de9d9f67825296c10
Change-Id: Ib8dfd276246bc6bd157a63c26184991a9993c3c5
diff --git a/solenv/gbuild/platform/com_GCC_defs.mk b/solenv/gbuild/platform/com_GCC_defs.mk
index 21b34a9..437cdd3 100644
--- a/solenv/gbuild/platform/com_GCC_defs.mk
+++ b/solenv/gbuild/platform/com_GCC_defs.mk
@@ -157,7 +157,9 @@ gb_DEBUG_CFLAGS := $(GGDB2) $(FINLINE_LIMIT0) $(FNO_INLINE)
gb_DEBUG_CXXFLAGS := $(FNO_DEFAULT_INLINE)
-gb_LinkTarget_INCLUDE := $(subst -I. , ,$(SOLARINC))
+gb_LinkTarget_INCLUDE :=\
+ $(subst -I. , ,$(SOLARINC)) \
+ -I$(SRCDIR)/config \
ifeq ($(COM_GCC_IS_CLANG),TRUE)
ifeq ($(COMPILER_PLUGIN_TOOL),)
diff --git a/solenv/gbuild/platform/com_MSC_class.mk b/solenv/gbuild/platform/com_MSC_class.mk
index d0b3cfc..72d63af 100644
--- a/solenv/gbuild/platform/com_MSC_class.mk
+++ b/solenv/gbuild/platform/com_MSC_class.mk
@@ -108,6 +108,7 @@ gb_LinkTarget_CXXFLAGS := $(gb_CXXFLAGS)
gb_LinkTarget_INCLUDE :=\
$(subst -I. , ,$(SOLARINC)) \
$(foreach inc,$(subst ;, ,$(JDKINC)),-I$(inc)) \
+ -I$(SRCDIR)/config \
gb_LinkTarget_get_pdbfile = $(call gb_LinkTarget_get_target,)pdb/$(1).pdb
commit 513f25c7efba23d76e1cbab37f560d8e82e9e821
Author: Michael Meeks <michael.meeks at suse.com>
Date: Thu Jan 10 17:15:37 2013 +0000
add LIBO_VERSION_* macros and a config header for them to live in.
Change-Id: Ia6735e3e7f3231722231e9d7a4c9839f08038b96
Signed-off-by: Noel Power <noel.power at suse.com>
diff --git a/config/config_version.h.in b/config/config_version.h.in
new file mode 100644
index 0000000..caaa9c4
--- /dev/null
+++ b/config/config_version.h.in
@@ -0,0 +1,14 @@
+/*
+Version settings
+ version 4.0.0.1 is Major.Minor.Micro.Patch
+*/
+
+#ifndef CONFIG_VERSION_H
+#define CONFIG_VERSION_H
+
+#undef LIBO_VERSION_MAJOR
+#undef LIBO_VERSION_MINOR
+#undef LIBO_VERSION_MICRO
+#undef LIBO_VERSION_PATCH
+
+#endif
diff --git a/configure.ac b/configure.ac
index 9da5b39..deb7163 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4231,7 +4231,22 @@ SOURCEVERSION="OOO$UPD"
AC_SUBST(UPD)
AC_SUBST(SOURCEVERSION)
-
+dnl ===================================================================
+dnl Grim-ness to export version number of LibreOffice to code
+dnl this needs to be turned around and to be driven by configure
+dnl ===================================================================
+LIBO_VERSION_MAJOR="`$GREP VERSIONMAJOR solenv/inc/minor.mk | sed "s/^.*=//"`"
+LIBO_VERSION_MINOR="`$GREP VERSIONMINOR solenv/inc/minor.mk | sed "s/^.*=//"`"
+LIBO_VERSION_MICRO="`$GREP VERSIONMICRO solenv/inc/minor.mk | sed "s/^.*=//"`"
+LIBO_VERSION_PATCH="`$GREP BUILD solenv/inc/minor.mk | sed "s/^.*=//"`"
+AC_SUBST(LIBO_VERSION_MAJOR)
+AC_SUBST(LIBO_VERSION_MINOR)
+AC_SUBST(LIBO_VERSION_MICRO)
+AC_SUBST(LIBO_VERSION_PATCH)
+AC_DEFINE_UNQUOTED(LIBO_VERSION_MAJOR,"$LIBO_VERSION_MAJOR")
+AC_DEFINE_UNQUOTED(LIBO_VERSION_MINOR,"$LIBO_VERSION_MINOR")
+AC_DEFINE_UNQUOTED(LIBO_VERSION_MICRO,"$LIBO_VERSION_MICRO")
+AC_DEFINE_UNQUOTED(LIBO_VERSION_PATCH,"$LIBO_VERSION_PATCH")
dnl ===================================================================
dnl Set the ENABLE_CRASHDUMP variable.
@@ -12160,6 +12175,7 @@ else
fi
AC_CONFIG_FILES([config_host.mk])
+AC_CONFIG_HEADERS([config/config_version.h])
AC_OUTPUT
# touch the config timestamp file
commit 6f047915018e286b6f05d0e87866d5f18c9901cd
Author: Michael Meeks <michael.meeks at suse.com>
Date: Thu Jan 10 17:38:18 2013 +0000
export cleaned up dotted version in environment and GtkWindow user-data.
Change-Id: If865127a9a5560f4b3636fb870699e2f3bac0e83
Signed-off-by: Noel Power <noel.power at suse.com>
diff --git a/vcl/inc/svdata.hxx b/vcl/inc/svdata.hxx
index f7dcbd6..5c4ea0c 100644
--- a/vcl/inc/svdata.hxx
+++ b/vcl/inc/svdata.hxx
@@ -44,6 +44,11 @@
#include <boost/unordered_map.hpp>
+#include <config_version.h>
+
+#define LIBO_VERSION_DOTTED (LIBO_VERSION_MAJOR "." LIBO_VERSION_MINOR "." \
+ LIBO_VERSION_MICRO "." LIBO_VERSION_PATCH)
+
struct ImplTimerData;
struct ImplConfigData;
class ImplDirectFontSubstitution;
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index 6a799cd..49cc5a7 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -205,6 +205,10 @@ Application* GetpApp()
Application::Application()
{
+ // useful for themes at least, perhaps extensions too
+ rtl::OUString aVar("LIBO_VERSION"), aValue(LIBO_VERSION_DOTTED);
+ osl_setEnvironment(aVar.pData, aValue.pData);
+
if( ! ImplGetSVData() )
ImplInitSVData();
ImplGetSVData()->mpApp = this;
diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
index 46a4c01..736834a 100644
--- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
@@ -17,6 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_version.h>
#include "vcl/svapp.hxx"
@@ -4173,6 +4174,9 @@ static void NWAddWidgetToCacheWindow( GtkWidget* widget, SalX11Screen nScreen )
if ( !rData.gCacheWindow )
{
rData.gCacheWindow = gtk_window_new( GTK_WINDOW_TOPLEVEL );
+ g_object_set_data( G_OBJECT( rData.gCacheWindow ), "libo-version",
+ (gpointer)LIBO_VERSION_DOTTED );
+
GdkScreen* pScreen = gdk_display_get_screen( gdk_display_get_default(),
nScreen.getXScreen() );
if( pScreen )
diff --git a/vcl/unx/gtk/window/gtkframe.cxx b/vcl/unx/gtk/window/gtkframe.cxx
index 6bba141..398ece4 100644
--- a/vcl/unx/gtk/window/gtkframe.cxx
+++ b/vcl/unx/gtk/window/gtkframe.cxx
@@ -1071,11 +1071,7 @@ void GtkSalFrame::Init( SalFrame* pParent, sal_uLong nStyle )
m_pWindow = gtk_widget_new( GTK_TYPE_WINDOW, "type", eWinType,
"visible", FALSE, NULL );
g_object_set_data( G_OBJECT( m_pWindow ), "SalFrame", this );
-
- static char pVersion[16] = "";
- if( pVersion[0] == '\0' )
- g_sprintf( pVersion, "%d", SUPD );
- g_object_set_data( G_OBJECT( m_pWindow ), "libo-version", pVersion );
+ g_object_set_data( G_OBJECT( m_pWindow ), "libo-version", (gpointer)LIBO_VERSION_DOTTED);
// force wm class hint
m_nExtStyle = ~0;
More information about the Libreoffice-commits
mailing list