[Libreoffice-commits] .: 2 commits - config/config_version.h.in configure.ac sc/source sw/source vcl/inc
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Fri Jan 11 04:10:24 PST 2013
config/config_version.h.in | 12 ++++++++++++
configure.ac | 8 ++++----
sc/source/filter/xml/xmlstyle.cxx | 6 +++---
sw/source/filter/ww8/rtfexport.cxx | 12 +++++++++++-
vcl/inc/svdata.hxx | 3 ---
5 files changed, 30 insertions(+), 11 deletions(-)
New commits:
commit 3c91ac17ae401a1a2bb5752892fb108872096160
Author: Tor Lillqvist <tml at iki.fi>
Date: Fri Jan 11 14:09:53 2013 +0200
WaE: unused parameters
Change-Id: I8457b72f0f844fe9fb4bf5b670248224e7d60911
diff --git a/sc/source/filter/xml/xmlstyle.cxx b/sc/source/filter/xml/xmlstyle.cxx
index e81a173..a74113b 100644
--- a/sc/source/filter/xml/xmlstyle.cxx
+++ b/sc/source/filter/xml/xmlstyle.cxx
@@ -523,9 +523,9 @@ void ScXMLCellExportPropertyMapper::handleSpecialItem(
void ScXMLCellExportPropertyMapper::handleElementItem(
SvXMLExport& rExport,
const XMLPropertyState& rProperty,
- sal_uInt16 nFlags,
- const ::std::vector< XMLPropertyState > *pProperties,
- sal_uInt32 nIdx ) const
+ sal_uInt16 /* nFlags */,
+ const ::std::vector< XMLPropertyState > * /* pProperties */,
+ sal_uInt32 /* nIdx */) const
{
sal_uInt32 nContextId = getPropertySetMapper()->GetEntryContextId( rProperty.mnIndex );
OUString sURL;
commit fc4003e960340d6ace29c59b6d9f00f5b19308b0
Author: Tor Lillqvist <tml at iki.fi>
Date: Fri Jan 11 13:21:22 2013 +0200
Make the LIBO_VERSION_* macros integers, not strings
Change-Id: I6083de4a3f88d50cf4e923aa7fb495fe1711b632
diff --git a/config/config_version.h.in b/config/config_version.h.in
index caaa9c4..736c578 100644
--- a/config/config_version.h.in
+++ b/config/config_version.h.in
@@ -6,9 +6,21 @@ Version settings
#ifndef CONFIG_VERSION_H
#define CONFIG_VERSION_H
+#define LIBO_VERSION_STRINGIFY_inner(s) #s
+#define LIBO_VERSION_STRINGIFY(s) LIBO_VERSION_STRINGIFY_inner(s)
+
#undef LIBO_VERSION_MAJOR
#undef LIBO_VERSION_MINOR
#undef LIBO_VERSION_MICRO
#undef LIBO_VERSION_PATCH
+#define LIBO_VERSION_DOTTED \
+ (LIBO_VERSION_STRINGIFY(LIBO_VERSION_MAJOR) "." \
+ LIBO_VERSION_STRINGIFY(LIBO_VERSION_MINOR) "." \
+ LIBO_VERSION_STRINGIFY(LIBO_VERSION_MICRO) "." \
+ LIBO_VERSION_STRINGIFY(LIBO_VERSION_PATCH))
+
+#define LIBO_VERSION_ENCODED_IN_32BITS \
+ ((LIBO_VERSION_MAJOR << 24) | (LIBO_VERSION_MINOR << 16) | (LIBO_VERSION_MICRO << 8) | LIBO_VERSION_PATCH)
+
#endif
diff --git a/configure.ac b/configure.ac
index e99640f..9f14bb9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4331,10 +4331,10 @@ 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")
+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 Check for syslog header
diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx
index 1b211b8..80085ed 100644
--- a/sw/source/filter/ww8/rtfexport.cxx
+++ b/sw/source/filter/ww8/rtfexport.cxx
@@ -408,12 +408,22 @@ void RtfExport::WriteInfo()
OutUnicode(OOO_STRING_SVTOOLS_RTF_AUTHOR,xDocProps->getModifiedBy());
OutDateTime(OOO_STRING_SVTOOLS_RTF_REVTIM, xDocProps->getModificationDate());
+
OutDateTime(OOO_STRING_SVTOOLS_RTF_PRINTIM, xDocProps->getPrintDate());
}
Strm() << '{' << OOO_STRING_SVTOOLS_RTF_COMMENT << " ";
Strm() << OUStringToOString( utl::ConfigManager::getProductName(), eCurrentEncoding).getStr() << "}{" << OOO_STRING_SVTOOLS_RTF_VERN;
- Strm() << LIBO_VERSION_MAJOR LIBO_VERSION_MINOR LIBO_VERSION_MICRO "0" << '}';
+
+// The convention that we follow is that the version number
+// should be a non-negative 32-bit int
+#if LIBO_VERSION_MAJOR > 127
+#error Major version number must be less than 128
+#elif LIBO_VERSION_MINOR > 255 || LIBO_VERSION_MICRO > 255 || LIBO_VERSION_PATCH > 255
+#error Minor, micro and patchlevel version numbers must be less than 256
+#endif
+
+ Strm() << (sal_Int32) LIBO_VERSION_ENCODED_IN_32BITS << '}';
Strm() << '}';
}
diff --git a/vcl/inc/svdata.hxx b/vcl/inc/svdata.hxx
index 515bcbc..bca3ea7 100644
--- a/vcl/inc/svdata.hxx
+++ b/vcl/inc/svdata.hxx
@@ -47,9 +47,6 @@
#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;
More information about the Libreoffice-commits
mailing list