diff options
-rw-r--r-- | config/config_version.h.in | 12 | ||||
-rw-r--r-- | configure.ac | 8 | ||||
-rw-r--r-- | sw/source/filter/ww8/rtfexport.cxx | 12 | ||||
-rw-r--r-- | vcl/inc/svdata.hxx | 3 |
4 files changed, 27 insertions, 8 deletions
diff --git a/config/config_version.h.in b/config/config_version.h.in index caaa9c4d0e5a..736c578afc8c 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 e99640ff1325..9f14bb91f661 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 1b211b8e134f..80085edf7732 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 515bcbc7fdff..bca3ea7e84c7 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; |