[Libreoffice-commits] .: 43 commits - chart2/source cli_ure/CliLibrary_cli_basetypes.mk cli_ure/CliLibrary_cli_ure.mk cli_ure/CliNativeLibrary_cli_cppuhelper.mk cli_ure/CliUnoApi_cli_uretypes.mk cli_ure/Library_cli_cppuhelper_native.mk cli_ure/Library_cli_uno.mk cli_ure/source config_host.mk.in configure.in connectivity/Library_ado.mk connectivity/source cppuhelper/inc download extensions/Library_oleautobridge2.mk extensions/Library_oleautobridge.mk extensions/Library_so_activex.mk extensions/Library_so_activex_x64.mk extensions/source external/msm100 external/msm110 external/prj external/rebase i18npool/Library_textconv_dict.mk instsetoo_native/inc_openoffice libcdr/ExternalProject_libcdr.mk liborcus/ExternalProject_liborcus.mk Library_merged.mk libwpd/ExternalProject_libwpd.mk Makefile.top ooo.lst.in oowintool openssl/makefile.mk post_download.in postprocess/rebase python/makefile.mk python/Python-2.6.1-vc12.patch sc/Library_scui.mk scp2/source sc/source sd/source sfx2/CppunitTest_sfx2_ metadatable.mk shell/source solenv/bin solenv/gbuild sw/CppunitTest_sw_subsequent_ooxmlexport.mk sw/CppunitTest_sw_subsequent_rtfexport.mk sw/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Sun Oct 7 01:43:44 PDT 2012
Library_merged.mk | 14
Makefile.top | 4
chart2/source/controller/dialogs/DialogModel.cxx | 2
cli_ure/CliLibrary_cli_basetypes.mk | 2
cli_ure/CliLibrary_cli_ure.mk | 2
cli_ure/CliNativeLibrary_cli_cppuhelper.mk | 2
cli_ure/CliUnoApi_cli_uretypes.mk | 2
cli_ure/Library_cli_cppuhelper_native.mk | 2
cli_ure/Library_cli_uno.mk | 2
cli_ure/source/native/assembly.cxx | 2
cli_ure/source/native/native_bootstrap.cxx | 42
cli_ure/source/native/native_share.h | 22
cli_ure/source/uno_bridge/cli_base.h | 129 -
cli_ure/source/uno_bridge/cli_bridge.cxx | 11
cli_ure/source/uno_bridge/cli_bridge.h | 23
cli_ure/source/uno_bridge/cli_data.cxx | 687 +++++-----
cli_ure/source/uno_bridge/cli_environment.cxx | 67
cli_ure/source/uno_bridge/cli_environment.h | 31
cli_ure/source/uno_bridge/cli_proxy.cxx | 329 ++--
cli_ure/source/uno_bridge/cli_proxy.h | 104 -
cli_ure/source/uno_bridge/cli_uno.cxx | 42
config_host.mk.in | 2
configure.in | 150 +-
connectivity/Library_ado.mk | 6
connectivity/source/drivers/ado/ado_pre_sys_include.h | 2
cppuhelper/inc/cppuhelper/implbase1.hxx | 2
cppuhelper/inc/cppuhelper/implbase2.hxx | 2
download | 28
extensions/Library_oleautobridge.mk | 4
extensions/Library_oleautobridge2.mk | 4
extensions/Library_so_activex.mk | 1
extensions/Library_so_activex_x64.mk | 1
extensions/source/activex/StdAfx2.cxx | 2
extensions/source/activex/StdAfx2.h | 2
external/msm100/README_msm100.txt | 6
external/msm110/README_msm110.txt | 6
external/prj/d.lst | 4
external/rebase/README_rebase.exe | 1
i18npool/Library_textconv_dict.mk | 3
instsetoo_native/inc_openoffice/windows/msi_templates/_Validat.idt | 1
libcdr/ExternalProject_libcdr.mk | 20
liborcus/ExternalProject_liborcus.mk | 12
libwpd/ExternalProject_libwpd.mk | 13
ooo.lst.in | 1
oowintool | 53
openssl/makefile.mk | 3
post_download.in | 4
postprocess/rebase/rebase.pl | 16
python/Python-2.6.1-vc12.patch | 69 +
python/makefile.mk | 5
sc/Library_scui.mk | 1
sc/source/core/data/fillinfo.cxx | 1
scp2/source/ooo/vc_redist.scp | 45
sd/source/core/sdpage.cxx | 6
sfx2/CppunitTest_sfx2_metadatable.mk | 2
shell/source/win32/simplemail/simplemapi.hxx | 2
solenv/bin/build.pl | 3
solenv/gbuild/TargetLocations.mk | 18
solenv/gbuild/UnoApiTarget.mk | 120 -
solenv/gbuild/platform/IOS_ARM_GCC.mk | 8
solenv/gbuild/platform/WNT_INTEL_GCC.mk | 8
solenv/gbuild/platform/WNT_INTEL_MSC.mk | 20
solenv/gbuild/platform/macosx.mk | 12
solenv/gbuild/platform/solaris.mk | 8
solenv/gbuild/platform/unxgcc.mk | 8
solenv/gbuild/tail_build_modules.mk | 4
sw/CppunitTest_sw_subsequent_ooxmlexport.mk | 1
sw/CppunitTest_sw_subsequent_rtfexport.mk | 1
sw/source/core/crsr/crbm.cxx | 4
sw/source/core/doc/docbm.cxx | 16
sw/source/core/unocore/unoportenum.cxx | 2
71 files changed, 1318 insertions(+), 916 deletions(-)
New commits:
commit 8226b906382a98b6680ef8b09866786f42510143
Author: Peter Foley <pefoley2 at verizon.net>
Date: Sat Oct 6 11:00:24 2012 -0400
fix build.pl deps
Change-Id: Ia532558eb25c3745f9d43303358b785994f389fe
diff --git a/solenv/bin/build.pl b/solenv/bin/build.pl
index 74d0f32..b754f16 100755
--- a/solenv/bin/build.pl
+++ b/solenv/bin/build.pl
@@ -556,9 +556,10 @@ sub expand_dependencies {
sub get_tail_build_modules {
my $tail_build_prj = shift;
my $make = $ENV{'GNUMAKE'};
+ my $build_type = $ENV{'BUILD_TYPE'};
my $tail_build_mk = "$tail_build_module_dir/Module_$tail_build_prj.mk";
- my $modules_str = `$make --no-print-directory -r -f $tail_build_modules_mk get_modules TAIL_BUILD_MK=$tail_build_mk`;
+ my $modules_str = `$make --no-print-directory -r -f $tail_build_modules_mk get_modules TAIL_BUILD_MK=$tail_build_mk BUILD_TYPE='$build_type'`;
chomp $modules_str;
my %modules = ();
diff --git a/solenv/gbuild/tail_build_modules.mk b/solenv/gbuild/tail_build_modules.mk
index e5301f4..2ce60fd 100644
--- a/solenv/gbuild/tail_build_modules.mk
+++ b/solenv/gbuild/tail_build_modules.mk
@@ -29,6 +29,10 @@ TAIL_BUILD_MODULES :=
gb_Module_Module :=
+define gb_Helper_optional
+$(if $(filter $(1),$(BUILD_TYPE)),$(2))
+endef
+
define gb_Module_add_moduledirs
TAIL_BUILD_MODULES += $(2)
commit d19932ac5795df8df46fdc6cc60153d4e6d6042e
Author: Peter Foley <pefoley2 at verizon.net>
Date: Fri Oct 5 19:03:06 2012 -0400
fix libcdr with VS2012
Change-Id: I9943dce422bd43b826baeaccaeb494d870aaaa77
diff --git a/libcdr/ExternalProject_libcdr.mk b/libcdr/ExternalProject_libcdr.mk
index 933ce97..4982b8c 100644
--- a/libcdr/ExternalProject_libcdr.mk
+++ b/libcdr/ExternalProject_libcdr.mk
@@ -22,6 +22,7 @@ $(eval $(call gb_ExternalProject_use_externals,libcdr,\
ifeq ($(OS)$(COM),WNTMSC)
+ifeq ($(VCVER),90)
$(call gb_ExternalProject_get_state_target,libcdr,build) :
cd $(EXTERNAL_WORKDIR)/build/win32 \
&& export LIBWPD_INCLUDE_DIR=$(OUTDIR)/inc/external \
@@ -30,6 +31,25 @@ $(call gb_ExternalProject_get_state_target,libcdr,build) :
&& export ZLIB_INCLUDE_DIR=$(OUTDIR)/inc/external/zlib \
&& $(COMPATH)/vcpackages/vcbuild.exe libcdr.vcproj "Release|Win32" \
&& touch $@
+else ifeq ($(VCVER),100)
+$(call gb_ExternalProject_get_state_target,libcdr,build) :
+ cd $(EXTERNAL_WORKDIR)/build/win32 \
+ && export LIBWPD_INCLUDE_DIR=$(OUTDIR)/inc/external \
+ && export LIBWPG_INCLUDE_DIR=$(OUTDIR)/inc/external \
+ && export LCMS2_INCLUDE_DIR=$(OUTDIR)/inc/lcms2 \
+ && export ZLIB_INCLUDE_DIR=$(OUTDIR)/inc/external/zlib \
+ && msbuild.exe libcdr.vcxproj /p:Configuration=Release \
+ && touch $@
+else
+$(call gb_ExternalProject_get_state_target,libcdr,build) :
+ cd $(EXTERNAL_WORKDIR)/build/win32 \
+ && export LIBWPD_INCLUDE_DIR=$(OUTDIR)/inc/external \
+ && export LIBWPG_INCLUDE_DIR=$(OUTDIR)/inc/external \
+ && export LCMS2_INCLUDE_DIR=$(OUTDIR)/inc/lcms2 \
+ && export ZLIB_INCLUDE_DIR=$(OUTDIR)/inc/external/zlib \
+ && msbuild.exe libcdr.vcxproj /p:PlatformToolset=v110 /p:Configuration=Release \
+ && touch $@
+endif
else
commit b23f3e484273ed44c36a0c039454cdfbf6f6f1e7
Author: Peter Foley <pefoley2 at verizon.net>
Date: Wed Oct 3 16:58:15 2012 -0400
download rebase if needed for all sdk versions
Change-Id: I1417d243c94438c36158b0d5f873fa939b7d7642
diff --git a/configure.in b/configure.in
index faf2679..4fbc6f5 100644
--- a/configure.in
+++ b/configure.in
@@ -9134,7 +9134,7 @@ dnl Check for Micorosft rebase.exe
dnl =========================================
if test "$build_os" = "cygwin"; then
AC_PATH_PROG([REBASE], [rebase])
- if test \( -z "$REBASE" -o "$REBASE" = "/usr/bin/rebase" \) -a "$WINDOWS_SDK_VERSION" = "80"; then
+ if test \( -z "$REBASE" -o "$REBASE" = "/usr/bin/rebase" \); then
REBASE=download
AC_SUBST(REBASE)
fi
commit 8693885f8c80e13eef08841be2e672b35c81dfce
Author: Peter Foley <pefoley2 at verizon.net>
Date: Tue Oct 2 21:48:12 2012 -0400
fix libwpd for vs90
Change-Id: Ia8a21cd512ac425207eb31a194db9f4c9b10fee4
diff --git a/libwpd/ExternalProject_libwpd.mk b/libwpd/ExternalProject_libwpd.mk
index f91314a..e8547ea 100644
--- a/libwpd/ExternalProject_libwpd.mk
+++ b/libwpd/ExternalProject_libwpd.mk
@@ -17,12 +17,12 @@ $(eval $(call gb_ExternalProject_register_targets,libwpd,\
ifeq ($(OS)$(COM),WNTMSC)
-ifeq ($(CCNUMVER),90)
+ifeq ($(VCVER),90)
$(call gb_ExternalProject_get_state_target,libwpd,build) :
cd $(EXTERNAL_WORKDIR)/build/win32 \
&& $(COMPATH)/vcpackages/vcbuild.exe libwpd.vcproj "Release|Win32" \
&& touch $@
-else ifeq ($(CCNUMVER),100)
+else ifeq ($(VCVER),100)
$(call gb_ExternalProject_get_state_target,libwpd,build) :
cd $(EXTERNAL_WORKDIR)/build/win32 \
&& msbuild.exe libwpd.vcxproj \
commit 29440bd18985f6ab50029552c5e9d8d1cf643d4c
Author: Peter Foley <pefoley2 at verizon.net>
Date: Tue Oct 2 14:26:12 2012 -0400
add cppuhelper to sw tests
Change-Id: Ie50c7adf5bd4ba1b18a8deb3e708bcf83a2777af
diff --git a/sw/CppunitTest_sw_subsequent_ooxmlexport.mk b/sw/CppunitTest_sw_subsequent_ooxmlexport.mk
index 588349c..9eff7dd 100644
--- a/sw/CppunitTest_sw_subsequent_ooxmlexport.mk
+++ b/sw/CppunitTest_sw_subsequent_ooxmlexport.mk
@@ -36,6 +36,7 @@ $(eval $(call gb_CppunitTest_add_exception_objects,sw_subsequent_ooxmlexport, \
$(eval $(call gb_CppunitTest_use_libraries,sw_subsequent_ooxmlexport, \
cppu \
+ cppuhelper \
sal \
sw \
test \
diff --git a/sw/CppunitTest_sw_subsequent_rtfexport.mk b/sw/CppunitTest_sw_subsequent_rtfexport.mk
index bd45fad..d6d2a29 100644
--- a/sw/CppunitTest_sw_subsequent_rtfexport.mk
+++ b/sw/CppunitTest_sw_subsequent_rtfexport.mk
@@ -36,6 +36,7 @@ $(eval $(call gb_CppunitTest_add_exception_objects,sw_subsequent_rtfexport, \
$(eval $(call gb_CppunitTest_use_libraries,sw_subsequent_rtfexport, \
cppu \
+ cppuhelper \
sal \
sw \
test \
commit 6691aa36c1cc9175c87b86567b04bc632a09809e
Author: Peter Foley <pefoley2 at verizon.net>
Date: Tue Sep 25 21:38:04 2012 -0400
fix libwpd with VS2012
Change-Id: I2df9ab344bb2a934f6408a394280c01563d0c9b8
diff --git a/libwpd/ExternalProject_libwpd.mk b/libwpd/ExternalProject_libwpd.mk
index 16ddad5..f91314a 100644
--- a/libwpd/ExternalProject_libwpd.mk
+++ b/libwpd/ExternalProject_libwpd.mk
@@ -17,11 +17,22 @@ $(eval $(call gb_ExternalProject_register_targets,libwpd,\
ifeq ($(OS)$(COM),WNTMSC)
+ifeq ($(CCNUMVER),90)
$(call gb_ExternalProject_get_state_target,libwpd,build) :
cd $(EXTERNAL_WORKDIR)/build/win32 \
&& $(COMPATH)/vcpackages/vcbuild.exe libwpd.vcproj "Release|Win32" \
&& touch $@
-
+else ifeq ($(CCNUMVER),100)
+$(call gb_ExternalProject_get_state_target,libwpd,build) :
+ cd $(EXTERNAL_WORKDIR)/build/win32 \
+ && msbuild.exe libwpd.vcxproj \
+ && touch $@
+else
+$(call gb_ExternalProject_get_state_target,libwpd,build) :
+ cd $(EXTERNAL_WORKDIR)/build/win32 \
+ && msbuild.exe libwpd.vcxproj /p:PlatformToolset=v110 /p:TargetName=libwpd-0.9 /p:Configuration=Release \
+ && touch $@
+endif
else
$(call gb_ExternalProject_get_state_target,libwpd,build) :
commit 1cf215b16fc65e27f3fa333af43bc067f5189f2b
Author: Peter Foley <pefoley2 at verizon.net>
Date: Mon Sep 24 16:55:19 2012 -0400
add needed libraries to sfx2_metadatatable
Change-Id: I83aaa7170f59f89e4f1e7715295edceca3a9bef4
diff --git a/sfx2/CppunitTest_sfx2_metadatable.mk b/sfx2/CppunitTest_sfx2_metadatable.mk
index 277c564..c06dcac 100644
--- a/sfx2/CppunitTest_sfx2_metadatable.mk
+++ b/sfx2/CppunitTest_sfx2_metadatable.mk
@@ -26,6 +26,8 @@ $(eval $(call gb_CppunitTest_add_exception_objects,sfx2_metadatable, \
$(eval $(call gb_CppunitTest_use_sdk_api,sfx2_metadatable))
$(eval $(call gb_CppunitTest_use_libraries,sfx2_metadatable, \
+ cppu \
+ cppuhelper \
sal \
sfx \
$(gb_UWINAPI) \
commit 8c1c24ac4e18dabce24f03effc3f6703656f2c4e
Author: Peter Foley <pefoley2 at verizon.net>
Date: Sat Sep 22 17:38:00 2012 -0400
add needed libraries to scui
Change-Id: Ia6ef50bbb28c4d16154f8e673a4f3b3a1cef5cd5
diff --git a/sc/Library_scui.mk b/sc/Library_scui.mk
index 0cc4099..92017d0 100644
--- a/sc/Library_scui.mk
+++ b/sc/Library_scui.mk
@@ -38,6 +38,7 @@ $(eval $(call gb_Library_use_external,scui,mdds_headers))
$(eval $(call gb_Library_use_libraries,scui,\
comphelper \
cppu \
+ cppuhelper \
editeng \
for \
forui \
commit caa51aedc139cc6af678323658d352d6ea8509bf
Author: Peter Foley <pefoley2 at verizon.net>
Date: Sat Sep 22 10:01:34 2012 -0400
mergelibs works on windows now
Change-Id: I536921b4734a50b90aa0007ebf2120306ce497a0
diff --git a/configure.in b/configure.in
index e8e0295..faf2679 100644
--- a/configure.in
+++ b/configure.in
@@ -12574,7 +12574,7 @@ if test "$enable_mergelibs" = "yes" ; then
add_warning "--enable-mergelibs conflicts with --enable-binfilter. Disabling mergelibs."
AC_MSG_RESULT([no])
else
- if test $_os != Linux -a $_os != Android; then
+ if test $_os != Linux -a $_os != Android -a $_os != WINNT; then
add_warning "--enable-mergelibs is not tested for this platform"
fi
MERGELIBS="TRUE"
commit 0ba0b1ca90066fbae669ab66d1de1878e8f0e5f9
Author: Peter Foley <pefoley2 at verizon.net>
Date: Sat Sep 22 09:42:16 2012 -0400
prevent libmerged warning spam
Change-Id: I8ee74175d3dc08318461dfe08ebd10b12ce8d814
diff --git a/Library_merged.mk b/Library_merged.mk
index 6c3b047..51b9194 100644
--- a/Library_merged.mk
+++ b/Library_merged.mk
@@ -122,6 +122,11 @@ $(eval $(call gb_Library_use_system_win32_libs,merged,\
winmm \
winspool \
))
+# prevent warning spamming
+$(eval $(call gb_Library_add_ldflags,merged,\
+ /ignore:4049 \
+ /ignore:4217 \
+))
$(eval $(call gb_Library_use_externals,merged,\
icuin \
))
commit 1685f36f3517d6e177dfd11a6e766d8fecedb83a
Author: Peter Foley <pefoley2 at verizon.net>
Date: Fri Sep 21 19:16:52 2012 -0400
add needed libraries to textconv_dict
Change-Id: Ic0f55385c34bb253a1f452335ebcd3bba92ca9fa
diff --git a/i18npool/Library_textconv_dict.mk b/i18npool/Library_textconv_dict.mk
index 23afa21..9afc2ac 100644
--- a/i18npool/Library_textconv_dict.mk
+++ b/i18npool/Library_textconv_dict.mk
@@ -37,6 +37,9 @@ $(eval $(call gb_Library_use_sdk_api,textconv_dict))
$(eval $(call gb_Library_use_libraries,textconv_dict,\
$(gb_UWINAPI) \
+ sal \
+ cppu \
+ cppuhelper \
))
$(eval $(call gb_Library_add_generated_exception_objects,textconv_dict,\
commit 8ae194caf7d4f2c9c065dbee3aa43d1dc07d9dfe
Author: Peter Foley <pefoley2 at verizon.net>
Date: Fri Sep 21 16:57:37 2012 -0400
fix mergedlib on windows
Change-Id: I30ee99fe2a2e92c69ebfcef9af5ff1bb27ec114b
diff --git a/cppuhelper/inc/cppuhelper/implbase1.hxx b/cppuhelper/inc/cppuhelper/implbase1.hxx
index cf6125a..57c71f5 100644
--- a/cppuhelper/inc/cppuhelper/implbase1.hxx
+++ b/cppuhelper/inc/cppuhelper/implbase1.hxx
@@ -104,7 +104,7 @@ namespace cppu
to implement 1 till 12 interfaces in your component.
*/
template< class Ifc1 >
- class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE WeakImplHelper1
+ class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE SAL_DLLPUBLIC_EXPORT WeakImplHelper1
: public OWeakObject
, public com::sun::star::lang::XTypeProvider
, public Ifc1
diff --git a/cppuhelper/inc/cppuhelper/implbase2.hxx b/cppuhelper/inc/cppuhelper/implbase2.hxx
index 3ed5aac..95a1b9f 100644
--- a/cppuhelper/inc/cppuhelper/implbase2.hxx
+++ b/cppuhelper/inc/cppuhelper/implbase2.hxx
@@ -100,7 +100,7 @@ namespace cppu
Your sub class defines method implementations for these interface(s).
*/
template< class Ifc1, class Ifc2 >
- class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE WeakImplHelper2
+ class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE SAL_DLLPUBLIC_EXPORT WeakImplHelper2
: public OWeakObject
, public com::sun::star::lang::XTypeProvider
, public Ifc1, public Ifc2
commit a0eef541ef974762ba3e38cbc7b68765a8319b3b
Author: Peter Foley <pefoley2 at verizon.net>
Date: Wed Sep 19 11:13:25 2012 -0400
only add win8 lib path for win8 sdk
Change-Id: I9b30e5e0a8f961df1070f4ceb0e330558ab16335
diff --git a/configure.in b/configure.in
index eebe6da..e8e0295 100644
--- a/configure.in
+++ b/configure.in
@@ -12545,11 +12545,15 @@ if test "$build_os" = "cygwin"; then
if test "$BITNESS_OVERRIDE" = 64; then
ILIB="$ILIB;$COMPATH/lib/amd64"
ILIB="$ILIB;$WINDOWS_SDK_HOME/lib64"
- ILIB="$ILIB;$WINDOWS_SDK_HOME/lib/win8/um/x64"
+ if test "$WINDOWS_SDK_VERSION" = "80"; then
+ ILIB="$ILIB;$WINDOWS_SDK_HOME/lib/win8/um/x64"
+ fi
else
ILIB="$ILIB;$COMPATH/lib"
ILIB="$ILIB;$WINDOWS_SDK_HOME/lib"
- ILIB="$ILIB;$WINDOWS_SDK_HOME/lib/win8/um/x86"
+ if test "$WINDOWS_SDK_VERSION" = "80"; then
+ ILIB="$ILIB;$WINDOWS_SDK_HOME/lib/win8/um/x86"
+ fi
fi
ILIB="$ILIB;$DOTNET_FRAMEWORK_HOME/lib"
commit 7d2bbd22e7f81475c9b9eb3a4f120267c33818ee
Author: Peter Foley <pefoley2 at verizon.net>
Date: Sat Sep 15 16:41:10 2012 -0400
prevent ccache from being doubled with MSVC
Change-Id: Idb2fd2a115c5e32d3e894d70c0e86730b38e73e9
diff --git a/configure.in b/configure.in
index 1c71c13..eebe6da 100644
--- a/configure.in
+++ b/configure.in
@@ -2455,7 +2455,7 @@ AC_SUBST(SYSBASE)
dnl ===================================================================
dnl Checks if ccache is available
dnl ===================================================================
-if test "$enable_ccache" = "yes" -o \( "$enable_ccache" = "" -a "$enable_icecream" != "yes" -a "$build_os" != "cygwin" \); then
+if test "$enable_ccache" = "yes" -o \( "$enable_ccache" = "" -a "$enable_icecream" != "yes" \); then
case "%$CC%$CXX%" in
# If $CC and/or $CXX already contain "ccache" (possibly suffixed with some verison number etc),
# assume that's good then
@@ -4850,22 +4850,24 @@ fi
#
# prefx CXX with ccache if needed
#
-if test "$CCACHE" != ""; then
- AC_MSG_CHECKING([whether $CXX is already ccached])
- AC_LANG_PUSH([C++])
- save_CXXFLAGS=$CXXFLAGS
- CXXFLAGS="$CXXFLAGS --ccache-skip -O2"
- dnl an empty program will do, we're checking the compiler flags
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],
- [use_ccache=yes], [use_ccache=no])
- if test $use_ccache = yes; then
- AC_MSG_RESULT([yes])
- else
- CXX="$CCACHE $CXX"
- AC_MSG_RESULT([no])
- fi
- CXXFLAGS=$save_CXXFLAGS
- AC_LANG_POP([C++])
+if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
+ if test "$CCACHE" != ""; then
+ AC_MSG_CHECKING([whether $CXX is already ccached])
+ AC_LANG_PUSH([C++])
+ save_CXXFLAGS=$CXXFLAGS
+ CXXFLAGS="$CXXFLAGS --ccache-skip -O2"
+ dnl an empty program will do, we're checking the compiler flags
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],
+ [use_ccache=yes], [use_ccache=no])
+ if test $use_ccache = yes; then
+ AC_MSG_RESULT([yes])
+ else
+ CXX="$CCACHE $CXX"
+ AC_MSG_RESULT([no])
+ fi
+ CXXFLAGS=$save_CXXFLAGS
+ AC_LANG_POP([C++])
+ fi
fi
dnl ===================================================================
commit 0e866192ae2abe5f9bcdfc8cb0b4aa23aba1301b
Author: Peter Foley <pefoley2 at verizon.net>
Date: Sat Sep 15 10:58:59 2012 -0400
fix for openssl with MSVC when ccache is enabled
Change-Id: I93deea3a80178f51fff9a23328df7a67f308e052
diff --git a/openssl/makefile.mk b/openssl/makefile.mk
index 04a8683..286e424 100644
--- a/openssl/makefile.mk
+++ b/openssl/makefile.mk
@@ -155,7 +155,8 @@ OUT2BIN += libeay32.dll
# The env. vars CC and PERL are used by nmake, and nmake insists on '\'s
# If WRAPCMD is set it is prepended before the compiler, don't touch that.
.IF "$(WRAPCMD)"==""
- CC!:=$(subst,/,\ $(normpath,1 $(CC)))
+ CC!:=$(subst,/,\ $(normpath,1 $(CC:1)))
+ CC!:=$(CC:s/ccache/ccache cl.exe/)
.EXPORT : CC
.ENDIF
PERL_bak:=$(PERL)
commit 1b0c68b61a1673d809930087bdf65d2205492765
Author: Peter Foley <pefoley2 at verizon.net>
Date: Sat Sep 15 09:47:11 2012 -0400
add aditional targets to clean and distclean
Change-Id: Ic7539b88936370cc6bc01edf2c2755343e0113b6
diff --git a/Makefile.top b/Makefile.top
index ccf6589..e5bd89d 100644
--- a/Makefile.top
+++ b/Makefile.top
@@ -342,6 +342,7 @@ endif
rm -fr $(OUTDIR)
rm -fr $(WORKDIR)
rm -fr $(SRCDIR)/*/$(INPATH)
+ rm -fr $(SRCDIR)/solenv/$(OUTPATH)
rm -fr install
clean-build:
@@ -361,7 +362,8 @@ endif
rm -fr config_host.mk config_build.mk aclocal.m4 autom4te.cache \
bin/repo-list config.log config.status configure \
ooo.lst post_download post_download.log \
- config_host.mk.last set_soenv.stamp src.downloaded warn
+ config_host.mk.last set_soenv.stamp src.downloaded warn \
+ solenv/bin/concat-deps.exe solenv/bin/concat-deps
find $(SOLARENV)/gdb -name "*.pyc" -exec rm {} \;
#
commit 4b17650868da44dea228d524c38615786a256460
Author: Peter Foley <pefoley2 at verizon.net>
Date: Sat Sep 15 09:35:04 2012 -0400
Fix ccache with MSVC
Change-Id: I0721a8d0aa584051d1e16b327c3cd1352eedf253
diff --git a/configure.in b/configure.in
index 83c6f48..1c71c13 100644
--- a/configure.in
+++ b/configure.in
@@ -3289,26 +3289,23 @@ AC_SUBST(DBGHELP_DLL)
#
# prefix C with ccache if needed
#
-if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
- if test "$CCACHE" != ""; then
- AC_MSG_CHECKING([whether $CC is already ccached])
-
- AC_LANG_PUSH([C])
- save_CFLAGS=$CFLAGS
- CFLAGS="$CFLAGS --ccache-skip -O2"
- dnl an empty program will do, we're checking the compiler flags
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],
- [use_ccache=yes], [use_ccache=no])
- if test $use_ccache = yes; then
- AC_MSG_RESULT([yes])
- else
- CC="$CCACHE $CC"
- AC_MSG_RESULT([no])
- fi
- CFLAGS=$save_CFLAGS
- AC_LANG_POP([C])
- fi
-
+if test "$CCACHE" != ""; then
+ AC_MSG_CHECKING([whether $CC is already ccached])
+
+ AC_LANG_PUSH([C])
+ save_CFLAGS=$CFLAGS
+ CFLAGS="$CFLAGS --ccache-skip -O2"
+ dnl an empty program will do, we're checking the compiler flags
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],
+ [use_ccache=yes], [use_ccache=no])
+ if test $use_ccache = yes; then
+ AC_MSG_RESULT([yes])
+ else
+ CC="$CCACHE $CC"
+ AC_MSG_RESULT([no])
+ fi
+ CFLAGS=$save_CFLAGS
+ AC_LANG_POP([C])
fi
#
commit a97fdbda6b568d776e04e27dda7c26d33b88c8c5
Author: Peter Foley <pefoley2 at verizon.net>
Date: Fri Sep 7 18:42:27 2012 -0400
fix liborcus build with VS2012
Change-Id: I98248b2fe45da32fc0f478aee55b6939825112f7
diff --git a/liborcus/ExternalProject_liborcus.mk b/liborcus/ExternalProject_liborcus.mk
index f67b48c..3882971 100644
--- a/liborcus/ExternalProject_liborcus.mk
+++ b/liborcus/ExternalProject_liborcus.mk
@@ -17,13 +17,23 @@ $(eval $(call gb_ExternalProject_register_targets,liborcus,\
ifeq ($(OS)$(COM),WNTMSC)
+ifeq ($(CCNUMVER),90)
$(call gb_ExternalProject_get_state_target,liborcus,build) :
cd $(EXTERNAL_WORKDIR)/vsprojects/liborcus-static-nozip \
&& export BOOST_INCLUDE_DIR=$(OUTDIR)/inc/external \
&& export BOOST_LIB_DIR=$(OUTDIR)/lib \
&& $(COMPATH)/vcpackages/vcbuild.exe liborcus-static-nozip.vcproj "Release|Win32" \
&& touch $@
-
+else
+$(call gb_ExternalProject_get_state_target,liborcus,build) :
+ cd $(EXTERNAL_WORKDIR)/vsprojects/liborcus-static-nozip \
+ && export BOOST_INCLUDE_DIR=$(OUTDIR)/inc/external \
+ && export BOOST_LIB_DIR=$(OUTDIR)/lib \
+ && $(COMPATH)/../Common7/Tools/vcupgrade.exe liborcus-static-nozip.vcproj \
+ && MSBuild.exe liborcus-static-nozip.vcxproj /p:Configuration=Release /p:OutDir=Release /p:TargetName=orcus /p:WholeProgramOptimization=no \
+ && touch $@
+endif
+
else
$(call gb_ExternalProject_get_state_target,liborcus,build) :
commit 2db6f67b6e006cfcc6569306eef40f9cafdec798
Author: Peter Foley <pefoley2 at verizon.net>
Date: Fri Sep 7 17:01:04 2012 -0400
add support for libmerged on Windows
Change-Id: I05d1c557967000be2fb7128b43d6e8c6005a7892
diff --git a/Library_merged.mk b/Library_merged.mk
index f6bf68a..6c3b047 100644
--- a/Library_merged.mk
+++ b/Library_merged.mk
@@ -45,7 +45,6 @@ $(eval $(call gb_Library_use_libraries,merged,\
$(eval $(call gb_Library_use_externals,merged,\
cups \
- icui18n \
icule \
icuuc \
jpeg \
@@ -117,11 +116,19 @@ $(eval $(call gb_Library_use_system_win32_libs,merged,\
oleaut32 \
shell32 \
user32 \
+ usp10 \
uuid \
version \
winmm \
winspool \
))
+$(eval $(call gb_Library_use_externals,merged,\
+ icuin \
+))
+else
+$(eval $(call gb_Library_use_externals,merged,\
+ icui18n \
+))
endif
ifeq ($(OS),MACOSX)
diff --git a/solenv/gbuild/platform/WNT_INTEL_MSC.mk b/solenv/gbuild/platform/WNT_INTEL_MSC.mk
index 6483d47..151327e 100644
--- a/solenv/gbuild/platform/WNT_INTEL_MSC.mk
+++ b/solenv/gbuild/platform/WNT_INTEL_MSC.mk
@@ -341,6 +341,13 @@ gb_LinkTarget_INCLUDE_STL := $(filter %/stl, $(subst -I. , ,$(SOLARINC)))
gb_LinkTarget_get_pdbfile = $(call gb_LinkTarget_get_target,)pdb/$(1).pdb
+# avoid fatal error LNK1170 for Library_merged
+define gb_LinkTarget_MergedResponseFile
+cut -f -1000 -d ' ' $${RESPONSEFILE} > $${RESPONSEFILE}.1 && \
+cut -f 1001- -d ' ' $${RESPONSEFILE} >> $${RESPONSEFILE}.1 && \
+mv $${RESPONSEFILE}.1 $${RESPONSEFILE} &&
+endef
+
define gb_LinkTarget__command
$(call gb_Output_announce,$(2),$(true),LNK,4)
$(call gb_Helper_abbreviate_dirs,\
@@ -354,6 +361,7 @@ $(call gb_Helper_abbreviate_dirs,\
$(foreach object,$(ASMOBJECTS),$(call gb_AsmObject_get_target,$(object))) \
$(foreach extraobjectlist,$(EXTRAOBJECTLISTS),$(shell cat $(extraobjectlist))) \
$(NATIVERES)) && \
+ $(if $(filter $(call gb_Library_get_linktargetname,merged),$(2)),$(call gb_LinkTarget_MergedResponseFile)) \
unset INCLUDE && \
$(if $(filter YES,$(LIBRARY_X64)), $(LINK_X64_BINARY), $(gb_LINK)) \
$(if $(filter Library CppunitTest,$(TARGETTYPE)),$(gb_Library_TARGETTYPEFLAGS)) \
commit c140a5fdbba098704ba800c5e4f9b3a2fef2900e
Author: Peter Foley <pefoley2 at verizon.net>
Date: Fri Sep 7 16:57:12 2012 -0400
fix msm_path detection
Change-Id: Id507a3483a126f4a04dcb9be287c12a3eae5429c
diff --git a/oowintool b/oowintool
index e8f0b3b..58ea153 100755
--- a/oowintool
+++ b/oowintool
@@ -313,7 +313,9 @@ sub msvc_copy_dlls($)
sub msvc_find_msms()
{
my $ver = find_msvc();
- my $msm_path = (cygpath reg_get_value ("HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/VisualStudio/$ver->{'ver'}/Setup/VS/MSMDir"), 'w', $output_format);
+ my $msm_path = (cygpath reg_get_value ("HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/VisualStudio/9.0/Setup/VS/MSMDir"), 'w', $output_format) ||
+ (cygpath reg_get_value ("HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/VisualStudio/10.0/Setup/VS/MSMDir"), 'w', $output_format) ||
+ (cygpath reg_get_value ("HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/VisualStudio/11.0/Setup/VS/MSMDir"), 'w', $output_format);
defined $msm_path || die "MSMDir not found";
return -e "$msm_path/Microsoft_VC".$ver->{'dll_suffix'}."_CRT_x86.msm" ? 0 : 1;
}
@@ -326,7 +328,9 @@ sub msvc_copy_msms($$)
my $ver = find_msvc();
defined $ver || return;
- my $msm_path = (cygpath reg_get_value ("HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/VisualStudio/$ver->{'ver'}/Setup/VS/MSMDir"), 'w', $output_format);
+ my $msm_path = (cygpath reg_get_value ("HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/VisualStudio/9.0/Setup/VS/MSMDir"), 'w', $output_format) ||
+ (cygpath reg_get_value ("HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/VisualStudio/10.0/Setup/VS/MSMDir"), 'w', $output_format) ||
+ (cygpath reg_get_value ("HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/VisualStudio/11.0/Setup/VS/MSMDir"), 'w', $output_format);
defined $msm_path || die "MSMDir not found";
if ($ver->{'dll_suffix'} == 90) {
if ( $postfix eq "_x86" ) {
commit 5c1a93df5b3a8d7f31d9bb672d391c888418aa53
Author: Peter Foley <pefoley2 at verizon.net>
Date: Fri Aug 31 13:30:12 2012 -0400
fix dbghelp.dll download again
Change-Id: I5992023a946301809b9708d9df29dd9cc1500b53
diff --git a/configure.in b/configure.in
index 63103ae..83c6f48 100644
--- a/configure.in
+++ b/configure.in
@@ -3279,6 +3279,14 @@ MSPDB_PATH="$formatted_path"
AC_SUBST(SHOWINCLUDES_PREFIX)
#
+# dbghelp.dll
+#
+if test "$_os" == "WINNT"; then
+ DBGHELP_DLL="13fbc2e8b37ddf28181dd6d8081c2b8e-dbghelp.dll"
+fi
+AC_SUBST(DBGHELP_DLL)
+
+#
# prefix C with ccache if needed
#
if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
diff --git a/download b/download
index 620a292..fd9bb4a 100755
--- a/download
+++ b/download
@@ -179,7 +179,6 @@ for i in $filelist ; do
done
if [ "$COM" = "MSC" ]; then
- downloaditem "http://download.microsoft.com/download/A/6/A/A6AC035D-DA3F-4F0C-ADA4-37C8E5D34E3D/setup/WinSDKDebuggingTools/" "dbg_x86.msi" "2bd67a7b00507ad93539e138a4a6a2bf"
downloaditem "http://download.microsoft.com/download/E/9/F/E9FCA9E9-9908-4D8F-B491-8E8A4C294C01/" "WindowsXP-KB958911-x86-ENU.exe" "ff084c5815b0672d54628158b820f5b1"
fi
@@ -220,15 +219,9 @@ if [ "$COM" = "MSC" -a -n "$md5sum" ]; then
# This can be run only on Windows itself (Cygwin)
TMPUNPACK=`cygpath -d $TARFILE_LOCATION/tmp`
chmod a+w $TARFILE_LOCATION/tmp
- if [ ! -f ./external/dbghelp/dbghelp.dll -a -f $TARFILE_LOCATION/dbg_x86.msi ]; then
- msiexec /a `cygpath -d $TARFILE_LOCATION/dbg_x86.msi` /qn TARGETDIR=$TMPUNPACK SHORTFILENAMES=1
- dbghelp_dll_path=PFiles/DbgTools/dbghelp.dll
- sum=`$md5sum $md5special $TARFILE_LOCATION/tmp/$dbghelp_dll_path | sed "s/ .*//"`
- if [ "$sum" = "4003e34416ebd25e4c115d49dc15e1a7" ]; then
- cp $TARFILE_LOCATION/tmp/$dbghelp_dll_path ./external/dbghelp/dbghelp.dll
- fi
- fi
-
+ if [ ! -f ./external/dbghelp/dbghelp.dll -a -f $TARFILE_LOCATION/13fbc2e8b37ddf28181dd6d8081c2b8e-dbghelp.dll ]; then
+ cp $TARFILE_LOCATION/13fbc2e8b37ddf28181dd6d8081c2b8e-dbghelp.dll ./external/dbghelp/dbghelp.dll
+ fi
if [ "$REBASE" = "download" ]; then
if [ ! -f ./external/rebase/rebase.exe -a -f $TARFILE_LOCATION/WinSDKTools_x86.msi ]; then
msiexec /a `cygpath -d $TARFILE_LOCATION/WinSDKTools_x86.msi` /qn TARGETDIR=$TMPUNPACK SHORTFILENAMES=1
diff --git a/ooo.lst.in b/ooo.lst.in
index 25b83fc..06081e4 100644
--- a/ooo.lst.in
+++ b/ooo.lst.in
@@ -101,6 +101,7 @@ fa6a2f85bd28baab035b2c95e722713f-liblangtag-0.2.tar.bz2
@ORCUS_TARBALL@
http://dev-www.libreoffice.org/extern
185d60944ea767075d27247c3162b3bc-unowinreg.dll
+ at DBGHELP_DLL@
http://ooo.itc.hu/oxygenoffice/download/libreoffice/
@OOOP_GALLERY_PACK@
@OOOP_TEMPLATES_PACK@
commit 59bf5321fa4c49b0d140700e2c56de7e1b637926
Author: Peter Foley <pefoley2 at verizon.net>
Date: Fri Aug 31 13:24:00 2012 -0400
fix msm suport for VS2012
Change-Id: Ibc816de83eb48163671948ecc84e7653f2b4ec13
diff --git a/config_host.mk.in b/config_host.mk.in
index 97f6ec6..251847e 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -622,6 +622,7 @@ export USE_XINERAMA=@USE_XINERAMA@
export UUIDGEN=@UUIDGEN@
export VALGRIND_CFLAGS=@VALGRIND_CFLAGS@
export VALIDATOR_EXTENSION_PACK=@VALIDATOR_EXTENSION_PACK@
+export VCVER=@VCVER@
export VERBOSE=@VERBOSE@
export VIGRA_TARBALL=@VIGRA_TARBALL@
export VISIO_CFLAGS=@VISIO_CFLAGS@
diff --git a/configure.in b/configure.in
index 2d3115f..63103ae 100644
--- a/configure.in
+++ b/configure.in
@@ -3185,12 +3185,15 @@ if test "$_os" = "WINNT"; then
if test "$CCNUMVER" -ge "001700000000"; then
COMEX=14
MSVSVER=2012
+ VCVER=110
elif test "$CCNUMVER" -ge "001600000000"; then
COMEX=13
MSVSVER=2010
+ VCVER=100
elif test "$CCNUMVER" -ge "001500000000"; then
COMEX=12
MSVSVER=2008
+ VCVER=90
else
AC_MSG_ERROR([Compiler too old. Use Microsoft Visual Studio 2008 or 2010.])
fi
@@ -3270,6 +3273,7 @@ if test "$_os" = "WINNT"; then
fi
fi
AC_SUBST(COMEX)
+AC_SUBST(VCVER)
PathFormat "$MSPDB_PATH"
MSPDB_PATH="$formatted_path"
AC_SUBST(SHOWINCLUDES_PREFIX)
@@ -5675,10 +5679,10 @@ fi
AC_SUBST([JITC_PROCESSOR_TYPE])
if test $_os = "WINNT"; then
- AC_MSG_CHECKING([for Microsoft_VC100_CRT_x86.msm])
- if ./oowintool --msvc-find-msms-vc100; then
+ AC_MSG_CHECKING([for Microsoft_VC"$VCVER"_CRT_x86.msm])
+ if ./oowintool --msvc-find-msms; then
AC_MSG_RESULT([yes])
- SCPDEFS="$SCPDEFS -DWITH_VC100_REDIST"
+ SCPDEFS="$SCPDEFS -DWITH_VC"$VCVER"_REDIST"
else
AC_MSG_RESULT([no])
fi
diff --git a/external/msm100/README_msm100.txt b/external/msm100/README_msm100.txt
new file mode 100755
index 0000000..a40bbdb
--- /dev/null
+++ b/external/msm100/README_msm100.txt
@@ -0,0 +1,6 @@
+Put
+Microsoft_VC100_CRT_x86.msm
+into this directory for Windows builds using a VS 2010 / VC 10.0 compiler.
+For builds with --enable-dbgutil also put
+Microsoft_VC100_DebugCRT_x86.msm
+here.
diff --git a/external/msm110/README_msm110.txt b/external/msm110/README_msm110.txt
new file mode 100755
index 0000000..b9af577
--- /dev/null
+++ b/external/msm110/README_msm110.txt
@@ -0,0 +1,6 @@
+Put
+Microsoft_VC110_CRT_x86.msm
+into this directory for Windows builds using a VS 2012 / VC 11.0 compiler.
+For builds with --enable-dbgutil also put
+Microsoft_VC110_DebugCRT_x86.msm
+here.
diff --git a/external/prj/d.lst b/external/prj/d.lst
index 6d15049..0577f7f 100644
--- a/external/prj/d.lst
+++ b/external/prj/d.lst
@@ -44,6 +44,8 @@ mkdir: %_DEST%\inc\external\wine
..\msvcp90\Microsoft.VC90.CRT.manifest %_DEST%\bin\Microsoft.VC90.CRT.manifest
..\msvcp90\Microsoft.VC90.DebugCRT.manifest %_DEST%\bin\Microsoft.VC90.DebugCRT.manifest
..\msm90\*.msm %_DEST%\bin
+..\msm100\*.msm %_DEST%\bin
+..\msm110\*.msm %_DEST%\bin
..\unowinreg\unowinreg.dll %_DEST%\bin\unowinreg.dll
diff --git a/instsetoo_native/inc_openoffice/windows/msi_templates/_Validat.idt b/instsetoo_native/inc_openoffice/windows/msi_templates/_Validat.idt
index 0759d33..e716732 100644
--- a/instsetoo_native/inc_openoffice/windows/msi_templates/_Validat.idt
+++ b/instsetoo_native/inc_openoffice/windows/msi_templates/_Validat.idt
@@ -1,7 +1,6 @@
Table Column Nullable MinValue MaxValue KeyTable KeyColumn Category Set Description
s32 s32 s4 I4 I4 S255 I2 S32 S255 S255
_Validation Table Column
-_Validation Category Y Text;Formatted;Template;Condition;Guid;Path;Version;Language;Identifier;Binary;UpperCase;LowerCase;Filename;Paths;AnyPath;WildCardFilename;RegPath;KeyFormatted;CustomSource;Property;Cabinet;Shortcut;URL String category
_Validation Column N Identifier Name of column
_Validation Description Y Text Description of column
_Validation KeyColumn Y 1 32 Column to which foreign key connects
diff --git a/oowintool b/oowintool
index 5f7d603..e8f0b3b 100755
--- a/oowintool
+++ b/oowintool
@@ -310,11 +310,12 @@ sub msvc_copy_dlls($)
}
}
-sub msvc_find_msms_vc100()
+sub msvc_find_msms()
{
- my $msm_path = (cygpath reg_get_value ("HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/VisualStudio/9.0/Setup/VS/MSMDir"), 'w', $output_format);
+ my $ver = find_msvc();
+ my $msm_path = (cygpath reg_get_value ("HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/VisualStudio/$ver->{'ver'}/Setup/VS/MSMDir"), 'w', $output_format);
defined $msm_path || die "MSMDir not found";
- return -e "$msm_path/Microsoft_VC100_CRT_x86.msm" ? 0 : 1;
+ return -e "$msm_path/Microsoft_VC".$ver->{'dll_suffix'}."_CRT_x86.msm" ? 0 : 1;
}
sub msvc_copy_msms($$)
@@ -323,18 +324,31 @@ sub msvc_copy_msms($$)
my ($dest, $postfix) = @_;
my $ver = find_msvc();
- (defined $ver && ($ver->{'ver'} eq '9.0')) || return;
+ defined $ver || return;
- my $msm_path = (cygpath reg_get_value ("HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/VisualStudio/9.0/Setup/VS/MSMDir"), 'w', $output_format);
+ my $msm_path = (cygpath reg_get_value ("HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/VisualStudio/$ver->{'ver'}/Setup/VS/MSMDir"), 'w', $output_format);
defined $msm_path || die "MSMDir not found";
+ if ($ver->{'dll_suffix'} == 90) {
+ if ( $postfix eq "_x86" ) {
+ $postfix = ""
+ }
foreach $fname ("Microsoft_VC90_CRT_x86$postfix.msm", "policy_9_0_Microsoft_VC90_CRT_x86$postfix.msm") {
print STDERR "Copying $msm_path/$fname to $dest\n";
copy ("$msm_path/$fname", $dest) || die "copy failed: $!";
}
- foreach $fname ("Microsoft_VC100_CRT_x86$postfix.msm") {
+ }
+ elsif ($ver->{'dll_suffix'} == 100) {
+ foreach $fname ("Microsoft_VC100_CRT$postfix.msm") {
+ print STDERR "Copying $msm_path/$fname to $dest\n";
+ copy ("$msm_path/$fname", $dest) || print "copy failed: $!\n";
+ }
+ }
+ else {
+ foreach $fname ("Microsoft_VC110_CRT$postfix.msm") {
print STDERR "Copying $msm_path/$fname to $dest\n";
copy ("$msm_path/$fname", $dest) || print "copy failed: $!\n";
}
+ }
}
if (!@ARGV) {
@@ -364,12 +378,12 @@ while (@commands) {
my $dest = shift @commands;
defined $dest || die "copy-dlls requires a destination directory";
msvc_copy_dlls( $dest );
- } elsif ($opt eq '--msvc-find-msms-vc100') {
- exit msvc_find_msms_vc100();
+ } elsif ($opt eq '--msvc-find-msms') {
+ exit msvc_find_msms();
} elsif ($opt eq '--msvc-copy-msms') {
my $dest = shift @commands;
defined $dest || die "copy-msms requires a destination directory";
- msvc_copy_msms( $dest, '' );
+ msvc_copy_msms( $dest, '_x86' );
} elsif ($opt eq '--msvc-copy-msms-64') {
my $dest = shift @commands;
defined $dest || die "copy-msms-64 requires a destination directory";
diff --git a/post_download.in b/post_download.in
index 0161233..7685f56 100644
--- a/post_download.in
+++ b/post_download.in
@@ -47,10 +47,10 @@ dnl ===================================================================
dnl Windows builds - use oowintool to copy VC redist merge modules
dnl ===================================================================
if test "$COM" = "MSC"; then
- if ! ./oowintool --msvc-copy-msms ./external/msm90 ; then
+ if ! ./oowintool --msvc-copy-msms ./external/msm"$VCVER" ; then
AC_MSG_ERROR([oowintool failed to copy merge modules])
fi
- if ! ./oowintool --msvc-copy-msms-64 ./external/msm90 ; then
+ if ! ./oowintool --msvc-copy-msms-64 ./external/msm"$VCVER" ; then
AC_MSG_WARN([oowintool failed to copy x64 merge modules, installation
will lack the 64-bit Explorer extension])
fi
diff --git a/scp2/source/ooo/vc_redist.scp b/scp2/source/ooo/vc_redist.scp
index c0e5302..fa7d1c2 100644
--- a/scp2/source/ooo/vc_redist.scp
+++ b/scp2/source/ooo/vc_redist.scp
@@ -27,6 +27,8 @@
#include "macros.inc"
+#if defined(WITH_VC90_REDIST)
+
MergeModule gid_MergeModule_Microsoft_VC90_CRT_x86
Feature = gm_Root;
Name = "Microsoft_VC90_CRT_x86.msm";
@@ -34,6 +36,15 @@ MergeModule gid_MergeModule_Microsoft_VC90_CRT_x86
ComponentCondition = "VC_REDIST=1";
End
+MergeModule gid_MergeModule_policy_9_0_Microsoft_VC90_CRT_x86
+ Feature = gm_Root;
+ Name = "policy_9_0_Microsoft_VC90_CRT_x86.msm";
+ RootDir = "TARGETDIR";
+ ComponentCondition = "VC_REDIST=1";
+End
+
+#endif
+
#if defined(WITH_VC100_REDIST)
MergeModule gid_MergeModule_Microsoft_VC100_CRT_x86
@@ -45,15 +56,21 @@ End
#endif
-MergeModule gid_MergeModule_policy_9_0_Microsoft_VC90_CRT_x86
+#if defined(WITH_VC110_REDIST)
+
+MergeModule gid_MergeModule_Microsoft_VC110_CRT_x86
Feature = gm_Root;
- Name = "policy_9_0_Microsoft_VC90_CRT_x86.msm";
+ Name = "Microsoft_VC110_CRT_x86.msm";
RootDir = "TARGETDIR";
ComponentCondition = "VC_REDIST=1";
End
+#endif
+
#if defined(BUILD_X64)
+#if defined(WITH_VC90_REDIST)
+
MergeModule gid_MergeModule_Microsoft_VC90_CRT_x86_x64
Feature = gm_Root;
Name = "Microsoft_VC90_CRT_x86_x64.msm";
@@ -69,3 +86,27 @@ MergeModule gid_MergeModule_policy_9_0_Microsoft_VC90_CRT_x86_x64
End
#endif
+
+#if defined(WITH_VC100_REDIST)
+
+MergeModule gid_MergeModule_Microsoft_VC100_CRT_x64
+ Feature = gm_Root;
+ Name = "Microsoft_VC100_CRT_x64.msm";
+ RootDir = "TARGETDIR";
+ ComponentCondition = "VC_REDIST=1";
+End
+
+#endif
+
+#if defined(WITH_VC110_REDIST)
+
+MergeModule gid_MergeModule_Microsoft_VC110_CRT_x64
+ Feature = gm_Root;
+ Name = "Microsoft_VC110_CRT_x64.msm";
+ RootDir = "TARGETDIR";
+ ComponentCondition = "VC_REDIST=1";
+End
+
+#endif
+
+#endif
commit e994a91060c145ad08ef75dcf9862043202ac6ce
Author: Peter Foley <pefoley2 at verizon.net>
Date: Fri Aug 31 09:33:34 2012 -0400
use downloaded rebase.exe with Win8 SDK
Change-Id: Ib7cb49e9c992ba3bd8cc69e7e492f82a493d7053
diff --git a/postprocess/rebase/rebase.pl b/postprocess/rebase/rebase.pl
index 546068e..f5e5ce0 100644
--- a/postprocess/rebase/rebase.pl
+++ b/postprocess/rebase/rebase.pl
@@ -179,7 +179,13 @@ sub rebase_again
my $newfiles_ref = shift;
my @grownfiles;
my $solarbin ="$ENV{SOLARVERSION}/$ENV{INPATH}/bin$ENV{UPDMINOREXT}";
- my $command = "rebase " . $options_string;
+ my $command;
+ if ( $ENV{REBASE} eq "download" ) {
+ $command = $ENV{OUTDIR}."/bin/rebase " . $options_string;
+ }
+ else {
+ $command = "rebase " . $options_string;
+ }
if ( $ENV{WRAPCMD} ) {
$command = $ENV{WRAPCMD} . " " . $command;
}
@@ -241,7 +247,13 @@ sub rebase_again
sub rebase_initially
{
my ($files_ref, $start_address) = @_;
- my $command = "rebase ";
+ my $command;
+ if ( $ENV{REBASE} eq "download" ) {
+ $command = $ENV{OUTDIR}."/bin/rebase " . $options_string;
+ }
+ else {
+ $command = "rebase " . $options_string;
+ }
if ( $ENV{WRAPCMD} ) {
$command = $ENV{WRAPCMD} . " " . $command;
}
commit 79fce4ddeb8b45fd047a97507051cd9ca4245f60
Author: Peter Foley <pefoley2 at verizon.net>
Date: Thu Aug 30 18:54:55 2012 -0400
Win8 SDK no longer ships rebase.exe
Change-Id: I3c4280ee53411f4914be8ebd4f41d1c1cec1ba97
diff --git a/config_host.mk.in b/config_host.mk.in
index a192ab7..97f6ec6 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -481,6 +481,7 @@ export PYTHON_LIBS=@PYTHON_LIBS@
export RANLIB=@RANLIB@
export REDLAND_CFLAGS=@REDLAND_CFLAGS@
export REDLAND_LIBS=@REDLAND_LIBS@
+export REBASE=@REBASE@
export RHINO_JAR=@RHINO_JAR@
export RHINO_TARBALL=@RHINO_TARBALL@
export RPM=@RPM@
diff --git a/configure.in b/configure.in
index 074f16c..2d3115f 100644
--- a/configure.in
+++ b/configure.in
@@ -9119,6 +9119,17 @@ AC_SUBST(WINDOWS_SDK_HOME)
AC_SUBST(WINDOWS_SDK_VERSION)
dnl =========================================
+dnl Check for Micorosft rebase.exe
+dnl =========================================
+if test "$build_os" = "cygwin"; then
+ AC_PATH_PROG([REBASE], [rebase])
+ if test \( -z "$REBASE" -o "$REBASE" = "/usr/bin/rebase" \) -a "$WINDOWS_SDK_VERSION" = "80"; then
+ REBASE=download
+ AC_SUBST(REBASE)
+ fi
+fi
+
+dnl =========================================
dnl Check for uuidgen
dnl =========================================
if test "$_os" = "WINNT" -a "$cross_compiling" != "yes"; then
diff --git a/download b/download
index 7821484..620a292 100755
--- a/download
+++ b/download
@@ -183,6 +183,11 @@ if [ "$COM" = "MSC" ]; then
downloaditem "http://download.microsoft.com/download/E/9/F/E9FCA9E9-9908-4D8F-B491-8E8A4C294C01/" "WindowsXP-KB958911-x86-ENU.exe" "ff084c5815b0672d54628158b820f5b1"
fi
+if [ "$REBASE" = "download" ]; then
+ downloaditem "http://download.microsoft.com/download/A/6/A/A6AC035D-DA3F-4F0C-ADA4-37C8E5D34E3D/setup/WinSDKTools/" "cab1.cab" "15331cc5cb4a03e7a44aaa303e34bf5b"
+ downloaditem "http://download.microsoft.com/download/A/6/A/A6AC035D-DA3F-4F0C-ADA4-37C8E5D34E3D/setup/WinSDKTools/" "WinSDKTools_x86.msi" "d1f44ddc2ba6bbda79407e951e44303b"
+fi
+
if [ -f $start_dir/sources.ver -a ! -d $start_dir/.git ] ; then
# these sources are from a tarball, so get the other source tarballs
. $start_dir/sources.ver
@@ -223,6 +228,18 @@ if [ "$COM" = "MSC" -a -n "$md5sum" ]; then
cp $TARFILE_LOCATION/tmp/$dbghelp_dll_path ./external/dbghelp/dbghelp.dll
fi
fi
+
+ if [ "$REBASE" = "download" ]; then
+ if [ ! -f ./external/rebase/rebase.exe -a -f $TARFILE_LOCATION/WinSDKTools_x86.msi ]; then
+ msiexec /a `cygpath -d $TARFILE_LOCATION/WinSDKTools_x86.msi` /qn TARGETDIR=$TMPUNPACK SHORTFILENAMES=1
+ rebase_exe_path=Pfiles/*/Windows/v7.1/Bin/ReBase.Exe
+ sum=`$md5sum $md5special $TARFILE_LOCATION/tmp/$rebase_exe_path | sed "s/ .*//"`
+ if [ "$sum" = "5892a62147b7be59f0553ae3634e9dfa" ]; then
+ cp $TARFILE_LOCATION/tmp/$rebase_exe_path ./external/rebase/rebase.exe
+ fi
+ fi
+ fi
+
if [ ! -f ./external/gdiplus/gdiplus.dll -a -f $TARFILE_LOCATION/WindowsXP-KB958911-x86-ENU.exe ]; then
gdiplus_dll_path=SP3QFE/asms/10/msft/windows/gdiplus/gdiplus.dll
chmod +x `cygpath $TARFILE_LOCATION`/WindowsXP-KB958911-x86-ENU.exe
diff --git a/external/prj/d.lst b/external/prj/d.lst
index 7fa38d3..6d15049 100644
--- a/external/prj/d.lst
+++ b/external/prj/d.lst
@@ -28,6 +28,8 @@ mkdir: %_DEST%\inc\external\wine
..\dbghelp\dbghelp.dll %_DEST%\bin\dbghelp.dll
+..\rebase\rebase.exe %_DEST%\bin\rebase.exe
+
..\gdiplus\gdiplus.dll %_DEST%\bin\gdiplus.dll
..\msvcp80\msvcm80*.dll %_DEST%\bin
diff --git a/external/rebase/README_rebase.exe b/external/rebase/README_rebase.exe
new file mode 100755
index 0000000..8724893
--- /dev/null
+++ b/external/rebase/README_rebase.exe
@@ -0,0 +1 @@
+Put rebase.exe in this directory for Windows builds.
commit 959cbe4c6931170aec74a212ea02b6a64568b00a
Author: Peter Foley <pefoley2 at verizon.net>
Date: Thu Aug 30 15:42:13 2012 -0400
fix path for make_installer.pl
Change-Id: Iac0ca81edaada999c774cdf8169f07fa98278cc6
diff --git a/configure.in b/configure.in
index 6249f8c..074f16c 100644
--- a/configure.in
+++ b/configure.in
@@ -12719,8 +12719,10 @@ else
pathmunge "$MSPDB_PATH" "before"
if test "$BITNESS_OVERRIDE" = 64; then
pathmunge "$COMPATH/bin/amd64" "before"
+ pathmunge "$WINDOWS_SDK_HOME/bin/x64" "before"
else
pathmunge "$COMPATH/bin" "before"
+ pathmunge "$WINDOWS_SDK_HOME/bin/x86" "before"
fi
if test "$SOLAR_JAVA" != "" -a "$JDK"!="gcj"; then
if test -d "$JAVA_HOME/jre/bin/client"; then
commit 53ca7b480f8fb23b04023faee74fbfa4b77bfa02
Author: Peter Foley <pefoley2 at verizon.net>
Date: Wed Aug 29 19:50:38 2012 -0400
work-around really weird bug in VS2012
Change-Id: I7092bbcbddec179c62c2817b069f757863ca5982
diff --git a/sc/source/core/data/fillinfo.cxx b/sc/source/core/data/fillinfo.cxx
index 01204d6..d0aabfa 100644
--- a/sc/source/core/data/fillinfo.cxx
+++ b/sc/source/core/data/fillinfo.cxx
@@ -1,4 +1,5 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
commit 4b56d82c7d20ba5897d87aaf7fc94da5356b8eec
Author: Peter Foley <pefoley2 at verizon.net>
Date: Mon Aug 27 15:28:23 2012 -0400
convert uno_bridge to new syntax
Change-Id: Iac5e9a860f7ef68104c4cfc19abe686b754190af
diff --git a/cli_ure/Library_cli_uno.mk b/cli_ure/Library_cli_uno.mk
index 3166365..aa34fc0 100644
--- a/cli_ure/Library_cli_uno.mk
+++ b/cli_ure/Library_cli_uno.mk
@@ -11,7 +11,7 @@ $(eval $(call gb_Library_Library,cli_uno))
$(eval $(call gb_Library_add_cxxflags,cli_uno,\
-AI $(gb_Helper_OUTDIRLIBDIR) \
- -clr:oldSyntax \
+ -clr \
-wd4339 \
))
diff --git a/cli_ure/source/uno_bridge/cli_base.h b/cli_ure/source/uno_bridge/cli_base.h
index e678f8e..d544087 100644
--- a/cli_ure/source/uno_bridge/cli_base.h
+++ b/cli_ure/source/uno_bridge/cli_base.h
@@ -32,78 +32,77 @@ struct _oslMutexImpl
#include "rtl/ustring.hxx"
#include "typelib/typedescription.hxx"
-#using <mscorlib.dll>
#using <system.dll>
#define OUSTR(x) ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(x) )
namespace cli_uno
{
-System::Type* loadCliType(System::String * typeName);
-System::Type* mapUnoType(typelib_TypeDescription const * pTD);
-System::Type* mapUnoType(typelib_TypeDescriptionReference const * pTD);
-typelib_TypeDescriptionReference* mapCliType(System::Type* cliType);
-rtl::OUString mapCliString(System::String const * data);
-System::String* mapUnoString(rtl_uString const * data);
-System::String* mapUnoTypeName(rtl_uString const * typeName);
-
-__gc struct Constants
+System::Type^ loadCliType(System::String ^ typeName);
+System::Type^ mapUnoType(typelib_TypeDescription const * pTD);
+System::Type^ mapUnoType(typelib_TypeDescriptionReference const * pTD);
+typelib_TypeDescriptionReference* mapCliType(System::Type^ cliType);
+rtl::OUString mapCliString(System::String const ^ data);
+System::String^ mapUnoString(rtl_uString const * data);
+System::String^ mapUnoTypeName(rtl_uString const * typeName);
+
+ref struct Constants
{
- static const System::String* sXInterfaceName= new System::String(
- S"unoidl.com.sun.star.uno.XInterface");
- static const System::String* sObject= new System::String(S"System.Object");
- static const System::String* sType= new System::String(S"System.Type");
- static const System::String* sUnoidl= new System::String(S"unoidl.");
- static const System::String* sVoid= new System::String(S"System.Void");
- static const System::String* sAny= new System::String(S"uno.Any");
- static const System::String* sArArray= new System::String(S"System.Array[]");
- static const System::String* sBoolean= new System::String(S"System.Boolean");
- static const System::String* sChar= new System::String(S"System.Char");
- static const System::String* sByte= new System::String(S"System.Byte");
- static const System::String* sInt16= new System::String(S"System.Int16");
- static const System::String* sUInt16= new System::String(S"System.UInt16");
- static const System::String* sInt32= new System::String(S"System.Int32");
- static const System::String* sUInt32= new System::String(S"System.UInt32");
- static const System::String* sInt64= new System::String(S"System.Int64");
- static const System::String* sUInt64= new System::String(S"System.UInt64");
- static const System::String* sString= new System::String(S"System.String");
- static const System::String* sSingle= new System::String(S"System.Single");
- static const System::String* sDouble= new System::String(S"System.Double");
- static const System::String* sArBoolean= new System::String(S"System.Boolean[]");
- static const System::String* sArChar= new System::String(S"System.Char[]");
- static const System::String* sArByte= new System::String(S"System.Byte[]");
- static const System::String* sArInt16= new System::String(S"System.Int16[]");
- static const System::String* sArUInt16= new System::String(S"System.UInt16[]");
- static const System::String* sArInt32= new System::String(S"System.Int32[]");
- static const System::String* sArUInt32= new System::String(S"System.UInt32[]");
- static const System::String* sArInt64= new System::String(S"System.Int64[]");
- static const System::String* sArUInt64= new System::String(S"System.UInt64[]");
- static const System::String* sArString= new System::String(S"System.String[]");
- static const System::String* sArSingle= new System::String(S"System.Single[]");
- static const System::String* sArDouble= new System::String(S"System.Double[]");
- static const System::String* sArType= new System::String(S"System.Type[]");
- static const System::String* sArObject= new System::String(S"System.Object[]");
- static const System::String* sBrackets= new System::String(S"[]");
- static const System::String* sAttributeSet= new System::String(S"set_");
- static const System::String* sAttributeGet= new System::String(S"get_");
-
- static const System::String* usXInterface = S"com.sun.star.uno.XInterface";
- static const System::String* usVoid = S"void";
- static const System::String* usType = S"type";
- static const System::String* usAny = S"any";
- static const System::String* usBrackets = S"[]";
- static const System::String* usBool = S"boolean";
- static const System::String* usByte = S"byte";
- static const System::String* usChar = S"char";
- static const System::String* usShort = S"short";
- static const System::String* usUShort = S"unsigned short";
- static const System::String* usLong = S"long";
- static const System::String* usULong = S"unsigned long";
- static const System::String* usHyper = S"hyper";
- static const System::String* usUHyper = S"unsigned hyper";
- static const System::String* usString = S"string";
- static const System::String* usFloat = S"float";
- static const System::String* usDouble = S"double";
+ static const System::String^ sXInterfaceName= gcnew System::String(
+ "unoidl.com.sun.star.uno.XInterface");
+ static const System::String^ sObject= gcnew System::String("System.Object");
+ static const System::String^ sType= gcnew System::String("System.Type");
+ static const System::String^ sUnoidl= gcnew System::String("unoidl.");
+ static const System::String^ sVoid= gcnew System::String("System.Void");
+ static const System::String^ sAny= gcnew System::String("uno.Any");
+ static const System::String^ sArArray= gcnew System::String("System.Array[]");
+ static const System::String^ sBoolean= gcnew System::String("System.Boolean");
+ static const System::String^ sChar= gcnew System::String("System.Char");
+ static const System::String^ sByte= gcnew System::String("System.Byte");
+ static const System::String^ sInt16= gcnew System::String("System.Int16");
+ static const System::String^ sUInt16= gcnew System::String("System.UInt16");
+ static const System::String^ sInt32= gcnew System::String("System.Int32");
+ static const System::String^ sUInt32= gcnew System::String("System.UInt32");
+ static const System::String^ sInt64= gcnew System::String("System.Int64");
+ static const System::String^ sUInt64= gcnew System::String("System.UInt64");
+ static const System::String^ sString= gcnew System::String("System.String");
+ static const System::String^ sSingle= gcnew System::String("System.Single");
+ static const System::String^ sDouble= gcnew System::String("System.Double");
+ static const System::String^ sArBoolean= gcnew System::String("System.Boolean[]");
+ static const System::String^ sArChar= gcnew System::String("System.Char[]");
+ static const System::String^ sArByte= gcnew System::String("System.Byte[]");
+ static const System::String^ sArInt16= gcnew System::String("System.Int16[]");
+ static const System::String^ sArUInt16= gcnew System::String("System.UInt16[]");
+ static const System::String^ sArInt32= gcnew System::String("System.Int32[]");
+ static const System::String^ sArUInt32= gcnew System::String("System.UInt32[]");
+ static const System::String^ sArInt64= gcnew System::String("System.Int64[]");
+ static const System::String^ sArUInt64= gcnew System::String("System.UInt64[]");
+ static const System::String^ sArString= gcnew System::String("System.String[]");
+ static const System::String^ sArSingle= gcnew System::String("System.Single[]");
+ static const System::String^ sArDouble= gcnew System::String("System.Double[]");
+ static const System::String^ sArType= gcnew System::String("System.Type[]");
+ static const System::String^ sArObject= gcnew System::String("System.Object[]");
+ static const System::String^ sBrackets= gcnew System::String("[]");
+ static const System::String^ sAttributeSet= gcnew System::String("set_");
+ static const System::String^ sAttributeGet= gcnew System::String("get_");
+
+ static const System::String^ usXInterface = "com.sun.star.uno.XInterface";
+ static const System::String^ usVoid = "void";
+ static const System::String^ usType = "type";
+ static const System::String^ usAny = "any";
+ static const System::String^ usBrackets = "[]";
+ static const System::String^ usBool = "boolean";
+ static const System::String^ usByte = "byte";
+ static const System::String^ usChar = "char";
+ static const System::String^ usShort = "short";
+ static const System::String^ usUShort = "unsigned short";
+ static const System::String^ usLong = "long";
+ static const System::String^ usULong = "unsigned long";
+ static const System::String^ usHyper = "hyper";
+ static const System::String^ usUHyper = "unsigned hyper";
+ static const System::String^ usString = "string";
+ static const System::String^ usFloat = "float";
+ static const System::String^ usDouble = "double";
};
struct BridgeRuntimeError
diff --git a/cli_ure/source/uno_bridge/cli_bridge.cxx b/cli_ure/source/uno_bridge/cli_bridge.cxx
index 53329e8..12b432e 100644
--- a/cli_ure/source/uno_bridge/cli_bridge.cxx
+++ b/cli_ure/source/uno_bridge/cli_bridge.cxx
@@ -31,7 +31,6 @@
#include "cli_bridge.h"
#include "cli_proxy.h"
-#using <mscorlib.dll>
#if defined(_MSC_VER) && (_MSC_VER < 1400)
#include <_vcclrit.h>
#endif
@@ -85,7 +84,7 @@ void SAL_CALL Mapping_cli2uno(
if (0 != cliI)
{
- System::Object* cliObj= sri::GCHandle::op_Explicit(cliI).Target;
+ System::Object^ cliObj= sri::GCHandle::FromIntPtr(IntPtr(cliI)).Target;
(*ppOut)= bridge->map_cli2uno(cliObj, (typelib_TypeDescription*) td);
}
}
@@ -130,16 +129,16 @@ void SAL_CALL Mapping_uno2cli(
if (0 != *ppDNetI)
{
- sri::GCHandle::op_Explicit(ppDNetI).Free();
+ sri::GCHandle::FromIntPtr(IntPtr(ppDNetI)).Free();
}
if (0 != pUnoI)
{
- System::Object* cliI= bridge->map_uno2cli(pUnoI, td);
+ System::Object^ cliI= bridge->map_uno2cli(pUnoI, td);
intptr_t ptr= NULL;
if(cliI)
{
- ptr= sri::GCHandle::op_Explicit(sri::GCHandle::Alloc(cliI))
+ ptr= sri::GCHandle::ToIntPtr(sri::GCHandle::Alloc(cliI))
#ifdef _WIN32
.ToInt32();
#else /* defined(_WIN64) */ .ToInt64();
@@ -288,7 +287,7 @@ SAL_DLLPUBLIC_EXPORT void SAL_CALL uno_initEnvironment( uno_Environment * uno_cl
//where g_cli_env is accessed.
//When we compile the bridge with .NET 2 then we can again hold g_cli_env as a static gcroot
//member in a unmanaged class, such as Bridge.
- CliEnvHolder::g_cli_env = new Cli_environment();
+ CliEnvHolder::g_cli_env = gcnew Cli_environment();
}
//##################################################################################################
SAL_DLLPUBLIC_EXPORT void SAL_CALL uno_ext_getMapping(
diff --git a/cli_ure/source/uno_bridge/cli_bridge.h b/cli_ure/source/uno_bridge/cli_bridge.h
index 7c45169..b12b448 100644
--- a/cli_ure/source/uno_bridge/cli_bridge.h
+++ b/cli_ure/source/uno_bridge/cli_bridge.h
@@ -26,7 +26,6 @@
#include "uno/dispatcher.h"
#include "cli_base.h"
#include "cli_environment.h"
-#using <mscorlib.dll>
//#using <cli_uretypes.dll>
#using <cli_basetypes.dll>
#using <system.dll>
@@ -47,8 +46,8 @@ struct Mapping : public uno_Mapping
// The environment will be created in uno_initEnvironment. See also the remarks there
//Managed cli environment for cli objects an UNO proxies (which are cli
//objects. The uno_Environment is not used for cli objects.
-__gc struct CliEnvHolder {
-static Cli_environment * g_cli_env = NULL;
+ref struct CliEnvHolder {
+static Cli_environment ^ g_cli_env = nullptr;
};
//==================================================================================================
@@ -72,7 +71,7 @@ struct Bridge
void release() const;
void map_to_uno(
- void * uno_data, System::Object* cli_data,
+ void * uno_data, System::Object^ cli_data,
typelib_TypeDescriptionReference * type,
bool assign) const;
@@ -81,28 +80,28 @@ struct Bridge
the type of the converted data. It may be a byref type.
*/
void map_to_cli(
- System::Object* *cli_data, void const * uno_data,
- typelib_TypeDescriptionReference * type, System::Type* info /* maybe 0 */,
+ System::Object^ *cli_data, void const * uno_data,
+ typelib_TypeDescriptionReference * type, System::Type^ info /* maybe 0 */,
bool bDontCreateObj) const;
- System::Object* map_uno2cli(uno_Interface * pUnoI, typelib_InterfaceTypeDescription* pTD) const;
+ System::Object^ map_uno2cli(uno_Interface * pUnoI, typelib_InterfaceTypeDescription* pTD) const;
- System::Object* call_uno(uno_Interface * pUnoI,
+ System::Object^ call_uno(uno_Interface * pUnoI,
typelib_TypeDescription* member_td,
typelib_TypeDescriptionReference * return_type,
sal_Int32 nParams, typelib_MethodParameter const * pParams,
- System::Object * args[], System::Type* argTypes[],
- System::Object** pException) const;
+ array<System::Object^>^ args, array<System::Type^>^ argTypes,
+ System::Object^* pException) const;
void call_cli(
- System::Object* cliI, sr::MethodInfo* method,
+ System::Object^ cliI, sr::MethodInfo^ method,
typelib_TypeDescriptionReference * return_type,
typelib_MethodParameter * params, int nParams,
void * uno_ret, void * uno_args [], uno_Any ** uno_exc ) const;
uno_Interface * map_cli2uno(
- System::Object* cliI, typelib_TypeDescription* pTD) const;
+ System::Object^ cliI, typelib_TypeDescription* pTD) const;
};
diff --git a/cli_ure/source/uno_bridge/cli_data.cxx b/cli_ure/source/uno_bridge/cli_data.cxx
index e9edae0..3a0eb80 100644
--- a/cli_ure/source/uno_bridge/cli_data.cxx
+++ b/cli_ure/source/uno_bridge/cli_data.cxx
@@ -52,10 +52,10 @@ using ::rtl::OUStringBuffer;
namespace cli_uno
{
-System::String* mapUnoPolymorphicName(System::String* unoName);
-OUString mapCliTypeName(System::String* typeName);
-System::String* mapCliPolymorphicName(System::String* unoName);
-System::String* mapPolymorphicName(System::String* unoName, bool bCliToUno);
+System::String^ mapUnoPolymorphicName(System::String^ unoName);
+OUString mapCliTypeName(System::String^ typeName);
+System::String^ mapCliPolymorphicName(System::String^ unoName);
+System::String^ mapPolymorphicName(System::String^ unoName, bool bCliToUno);
inline auto_ptr< rtl_mem > seq_allocate( sal_Int32 nElements, sal_Int32 nSize )
{
@@ -68,9 +68,9 @@ inline auto_ptr< rtl_mem > seq_allocate( sal_Int32 nElements, sal_Int32 nSize )
}
-System::Object* Bridge::map_uno2cli(uno_Interface * pUnoI, typelib_InterfaceTypeDescription *pTD) const
+System::Object^ Bridge::map_uno2cli(uno_Interface * pUnoI, typelib_InterfaceTypeDescription *pTD) const
{
- System::Object* retVal= NULL;
+ System::Object^ retVal= nullptr;
// get oid
rtl_uString * pOid = 0;
(*m_uno_env->getObjectIdentifier)( m_uno_env, &pOid, pUnoI );
@@ -78,8 +78,8 @@ System::Object* Bridge::map_uno2cli(uno_Interface * pUnoI, typelib_InterfaceType
OUString oid(pOid, SAL_NO_ACQUIRE);
//see if the interface was already mapped
- System::Type* ifaceType= mapUnoType(reinterpret_cast<typelib_TypeDescription*>(pTD));
- System::String* sOid= mapUnoString(oid.pData);
+ System::Type^ ifaceType= mapUnoType(reinterpret_cast<typelib_TypeDescription*>(pTD));
+ System::String^ sOid= mapUnoString(oid.pData);
System::Threading::Monitor::Enter( CliEnvHolder::g_cli_env );
try
@@ -93,7 +93,7 @@ System::Object* Bridge::map_uno2cli(uno_Interface * pUnoI, typelib_InterfaceType
// interface. If it already does that, then it does nothing
if (srr::RemotingServices::IsTransparentProxy(retVal))
{
- UnoInterfaceProxy* p = static_cast<UnoInterfaceProxy*>(
+ UnoInterfaceProxy^ p = static_cast<UnoInterfaceProxy^>(
srr::RemotingServices::GetRealProxy(retVal));
p->addUnoInterface(pUnoI, pTD);
}
@@ -112,18 +112,18 @@ System::Object* Bridge::map_uno2cli(uno_Interface * pUnoI, typelib_InterfaceType
return retVal;
}
-uno_Interface* Bridge::map_cli2uno(System::Object* cliObj, typelib_TypeDescription *pTD) const
+uno_Interface* Bridge::map_cli2uno(System::Object^ cliObj, typelib_TypeDescription *pTD) const
{
uno_Interface* retIface = NULL;
// get oid from dot net environment
- System::String* ds_oid = CliEnvHolder::g_cli_env->getObjectIdentifier( cliObj);
+ System::String^ ds_oid = CliEnvHolder::g_cli_env->getObjectIdentifier( cliObj);
OUString ousOid = mapCliString(ds_oid);
// look if interface is already mapped
m_uno_env->getRegisteredInterface(m_uno_env, (void**) &retIface, ousOid.pData,
(typelib_InterfaceTypeDescription*) pTD);
if ( ! retIface)
{
- System::Threading::Monitor::Enter(__typeof(Cli_environment));
+ System::Threading::Monitor::Enter(Cli_environment::typeid);
try
{
m_uno_env->getRegisteredInterface(m_uno_env, (void**) &retIface, ousOid.pData,
@@ -135,35 +135,35 @@ uno_Interface* Bridge::map_cli2uno(System::Object* cliObj, typelib_TypeDescripti
}
__finally
{
- System::Threading::Monitor::Exit(__typeof(Cli_environment));
+ System::Threading::Monitor::Exit(Cli_environment::typeid);
}
}
return retIface;
}
-inline System::Type* loadCliType(rtl_uString * unoName)
+inline System::Type^ loadCliType(rtl_uString * unoName)
{
return loadCliType(mapUnoTypeName(unoName));
}
-System::Type* loadCliType(System::String * unoName)
+System::Type^ loadCliType(System::String ^ unoName)
{
- System::Type* retVal= NULL;
+ System::Type^ retVal= nullptr;
try
{
//If unoName denotes a polymorphic type, e.g com.sun.star.beans.Defaulted<System.Char>
//then we remove the type list, otherwise the type could not be loaded.
bool bIsPolymorphic = false;
- System::String * loadName = unoName;
+ System::String ^ loadName = unoName;
int index = unoName->IndexOf('<');
if (index != -1)
{
loadName = unoName->Substring(0, index);
bIsPolymorphic = true;
}
- System::AppDomain* currentDomain = System::AppDomain::CurrentDomain;
- sr::Assembly* assems[] = currentDomain->GetAssemblies();
+ System::AppDomain^ currentDomain = System::AppDomain::CurrentDomain;
+ array<sr::Assembly^>^ assems = currentDomain->GetAssemblies();
for (int i = 0; i < assems->Length; i++)
{
retVal = assems[i]->GetType(loadName, false);
@@ -171,9 +171,9 @@ System::Type* loadCliType(System::String * unoName)
break;
}
- if (retVal == NULL)
+ if (retVal == nullptr)
{
- System::String * msg = new System::String(S"A type could not be loaded: ");
+ System::String ^ msg = gcnew System::String("A type could not be loaded: ");
msg = System::String::Concat(msg, loadName);
throw BridgeRuntimeError(mapCliString(msg));
}
@@ -183,55 +183,55 @@ System::Type* loadCliType(System::String * unoName)
retVal = uno::PolymorphicType::GetType(retVal, unoName);
}
}
- catch( System::Exception * e)
+ catch( System::Exception ^ e)
{
- rtl::OUString ouMessage(mapCliString(e->get_Message()));
+ rtl::OUString ouMessage(mapCliString(e->Message));
throw BridgeRuntimeError(ouMessage);
}
return retVal;
}
-System::Type* mapUnoType(typelib_TypeDescription const * pTD)
+System::Type^ mapUnoType(typelib_TypeDescription const * pTD)
{
return mapUnoType(pTD->pWeakRef);
}
-System::Type* mapUnoType(typelib_TypeDescriptionReference const * pTD)
+System::Type^ mapUnoType(typelib_TypeDescriptionReference const * pTD)
{
- System::Type * retVal = 0;
+ System::Type ^ retVal = nullptr;
switch (pTD->eTypeClass)
{
case typelib_TypeClass_VOID:
- retVal= __typeof(void); break;
+ retVal= void::typeid; break;
case typelib_TypeClass_CHAR:
- retVal= __typeof(System::Char); break;
+ retVal= System::Char::typeid; break;
case typelib_TypeClass_BOOLEAN:
- retVal= __typeof(System::Boolean); break;
+ retVal= System::Boolean::typeid; break;
case typelib_TypeClass_BYTE:
- retVal= __typeof(System::Byte); break;
+ retVal= System::Byte::typeid; break;
case typelib_TypeClass_SHORT:
- retVal= __typeof(System::Int16); break;
+ retVal= System::Int16::typeid; break;
case typelib_TypeClass_UNSIGNED_SHORT:
- retVal= __typeof(System::UInt16); break;
+ retVal= System::UInt16::typeid; break;
case typelib_TypeClass_LONG:
- retVal= __typeof(System::Int32); break;
+ retVal= System::Int32::typeid; break;
case typelib_TypeClass_UNSIGNED_LONG:
- retVal= __typeof(System::UInt32); break;
+ retVal= System::UInt32::typeid; break;
case typelib_TypeClass_HYPER:
- retVal= __typeof(System::Int64); break;
+ retVal= System::Int64::typeid; break;
case typelib_TypeClass_UNSIGNED_HYPER:
- retVal= __typeof(System::UInt64); break;
+ retVal= System::UInt64::typeid; break;
case typelib_TypeClass_FLOAT:
- retVal= __typeof(System::Single); break;
+ retVal= System::Single::typeid; break;
case typelib_TypeClass_DOUBLE:
- retVal= __typeof(System::Double); break;
+ retVal= System::Double::typeid; break;
case typelib_TypeClass_STRING:
- retVal= __typeof(System::String); break;
+ retVal= System::String::typeid; break;
case typelib_TypeClass_TYPE:
- retVal= __typeof(System::Type); break;
+ retVal= System::Type::typeid; break;
case typelib_TypeClass_ANY:
- retVal= __typeof(uno::Any); break;
+ retVal= uno::Any::typeid; break;
case typelib_TypeClass_ENUM:
case typelib_TypeClass_STRUCT:
case typelib_TypeClass_EXCEPTION:
@@ -241,7 +241,7 @@ System::Type* mapUnoType(typelib_TypeDescriptionReference const * pTD)
//special handling for XInterface, since it does not exist in cli.
rtl::OUString usXInterface(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uno.XInterface"));
if (usXInterface.equals(pTD->pTypeName))
- retVal= __typeof(System::Object);
+ retVal= System::Object::typeid;
else
retVal= loadCliType(pTD->pTypeName);
break;
@@ -255,42 +255,42 @@ System::Type* mapUnoType(typelib_TypeDescriptionReference const * pTD)
switch (pElementTDRef->eTypeClass)
{
case typelib_TypeClass_CHAR:
- retVal= System::Type::GetType(const_cast<System::String*>(Constants::sArChar)); break;
+ retVal= System::Type::GetType(const_cast<System::String^>(Constants::sArChar)); break;
case typelib_TypeClass_BOOLEAN:
- retVal= System::Type::GetType(const_cast<System::String*>(Constants::sArBoolean));
+ retVal= System::Type::GetType(const_cast<System::String^>(Constants::sArBoolean));
break;
case typelib_TypeClass_BYTE:
- retVal= System::Type::GetType(const_cast<System::String*>(Constants::sArByte));
+ retVal= System::Type::GetType(const_cast<System::String^>(Constants::sArByte));
break;
case typelib_TypeClass_SHORT:
- retVal= System::Type::GetType(const_cast<System::String*>(Constants::sArInt16));
+ retVal= System::Type::GetType(const_cast<System::String^>(Constants::sArInt16));
break;
case typelib_TypeClass_UNSIGNED_SHORT:
- retVal= System::Type::GetType(const_cast<System::String*>(Constants::sArUInt16));
+ retVal= System::Type::GetType(const_cast<System::String^>(Constants::sArUInt16));
break;
case typelib_TypeClass_LONG:
- retVal= System::Type::GetType(const_cast<System::String*>(Constants::sArInt32));
+ retVal= System::Type::GetType(const_cast<System::String^>(Constants::sArInt32));
break;
case typelib_TypeClass_UNSIGNED_LONG:
- retVal= System::Type::GetType(const_cast<System::String*>(Constants::sArUInt32));
+ retVal= System::Type::GetType(const_cast<System::String^>(Constants::sArUInt32));
break;
case typelib_TypeClass_HYPER:
- retVal= System::Type::GetType(const_cast<System::String*>(Constants::sArInt64));
+ retVal= System::Type::GetType(const_cast<System::String^>(Constants::sArInt64));
break;
case typelib_TypeClass_UNSIGNED_HYPER:
- retVal= System::Type::GetType(const_cast<System::String*>(Constants::sArUInt64));
+ retVal= System::Type::GetType(const_cast<System::String^>(Constants::sArUInt64));
break;
case typelib_TypeClass_FLOAT:
- retVal= System::Type::GetType(const_cast<System::String*>(Constants::sArSingle));
+ retVal= System::Type::GetType(const_cast<System::String^>(Constants::sArSingle));
break;
case typelib_TypeClass_DOUBLE:
- retVal= System::Type::GetType(const_cast<System::String*>(Constants::sArDouble));
+ retVal= System::Type::GetType(const_cast<System::String^>(Constants::sArDouble));
break;
case typelib_TypeClass_STRING:
- retVal= System::Type::GetType(const_cast<System::String*>(Constants::sArString));
+ retVal= System::Type::GetType(const_cast<System::String^>(Constants::sArString));
break;
case typelib_TypeClass_TYPE:
- retVal= System::Type::GetType(const_cast<System::String*>(Constants::sArType));
+ retVal= System::Type::GetType(const_cast<System::String^>(Constants::sArType));
break;
case typelib_TypeClass_ANY:
case typelib_TypeClass_ENUM:
@@ -318,10 +318,10 @@ System::Type* mapUnoType(typelib_TypeDescriptionReference const * pTD)
/** Returns an acquired td.
*/
-typelib_TypeDescriptionReference* mapCliType(System::Type* cliType)
+typelib_TypeDescriptionReference* mapCliType(System::Type^ cliType)
{
typelib_TypeDescriptionReference* retVal= NULL;
- if (cliType == NULL)
+ if (cliType == nullptr)
{
retVal = * typelib_static_type_getByTypeClass(
typelib_TypeClass_VOID );
@@ -330,9 +330,9 @@ typelib_TypeDescriptionReference* mapCliType(System::Type* cliType)
}
//check for Enum first,
//because otherwise case System::TypeCode::Int32 applies
- if (cliType->get_IsEnum())
+ if (cliType->IsEnum)
{
- OUString usTypeName= mapCliTypeName(cliType->get_FullName());
+ OUString usTypeName= mapCliTypeName(cliType->FullName);
css::uno::Type unoType(css::uno::TypeClass_ENUM, usTypeName);
retVal= unoType.getTypeLibType();
typelib_typedescriptionreference_acquire(retVal);
@@ -407,9 +407,9 @@ typelib_TypeDescriptionReference* mapCliType(System::Type* cliType)
}
if (retVal == NULL)
{
- System::String* cliTypeName= cliType->get_FullName();
+ System::String^ cliTypeName= cliType->FullName;
// Void
- if (const_cast<System::String*>(Constants::sVoid)->Equals(
+ if (const_cast<System::String^>(Constants::sVoid)->Equals(
cliTypeName))
{
retVal = * typelib_static_type_getByTypeClass(
@@ -417,7 +417,7 @@ typelib_TypeDescriptionReference* mapCliType(System::Type* cliType)
typelib_typedescriptionreference_acquire( retVal );
}
// Type
- else if (const_cast<System::String*>(Constants::sType)->Equals(
+ else if (const_cast<System::String^>(Constants::sType)->Equals(
cliTypeName))
{
retVal = * typelib_static_type_getByTypeClass(
@@ -425,7 +425,7 @@ typelib_TypeDescriptionReference* mapCliType(System::Type* cliType)
typelib_typedescriptionreference_acquire( retVal );
}
// Any
- else if (const_cast<System::String*>(Constants::sAny)->Equals(
+ else if (const_cast<System::String^>(Constants::sAny)->Equals(
cliTypeName))
{
retVal = * typelib_static_type_getByTypeClass(
@@ -436,8 +436,8 @@ typelib_TypeDescriptionReference* mapCliType(System::Type* cliType)
else
{
OUString usTypeName;
- uno::PolymorphicType * poly = dynamic_cast<uno::PolymorphicType*>(cliType);
- if (poly != NULL)
+ uno::PolymorphicType ^ poly = dynamic_cast<uno::PolymorphicType^>(cliType);
+ if (poly != nullptr)
usTypeName = mapCliTypeName( poly->PolymorphicName);
else
usTypeName = mapCliTypeName(cliTypeName);
@@ -457,7 +457,7 @@ typelib_TypeDescriptionReference* mapCliType(System::Type* cliType)
buf.appendAscii(
RTL_CONSTASCII_STRINGPARAM("[cli_uno bridge] mapCliType():"
"could not map type: ") );
- buf.append(mapCliString(cliType->get_FullName()));
+ buf.append(mapCliString(cliType->FullName));
throw BridgeRuntimeError( buf.makeStringAndClear() );
}
return retVal;
@@ -466,10 +466,10 @@ typelib_TypeDescriptionReference* mapCliType(System::Type* cliType)
/**
Otherwise a leading "unoidl." is removed.
*/
-System::String* mapUnoTypeName(rtl_uString const * typeName)
+System::String^ mapUnoTypeName(rtl_uString const * typeName)
{
OUString usUnoName( const_cast< rtl_uString * >( typeName ) );
- st::StringBuilder* buf= new st::StringBuilder();
+ st::StringBuilder^ buf= gcnew st::StringBuilder();
//determine if the type is a sequence and its dimensions
int dims= 0;
if (usUnoName[0] == '[')
@@ -484,52 +484,52 @@ System::String* mapUnoTypeName(rtl_uString const * typeName)
}
usUnoName = usUnoName.copy(index - 1);
}
- System::String * sUnoName = mapUnoString(usUnoName.pData);
- if (sUnoName->Equals(const_cast<System::String*>(Constants::usBool)))
- buf->Append(const_cast<System::String*>(Constants::sBoolean));
- else if (sUnoName->Equals(const_cast<System::String*>(Constants::usChar)))
- buf->Append(const_cast<System::String*>(Constants::sChar));
- else if (sUnoName->Equals(const_cast<System::String*>(Constants::usByte)))
- buf->Append(const_cast<System::String*>(Constants::sByte));
- else if (sUnoName->Equals(const_cast<System::String*>(Constants::usShort)))
- buf->Append(const_cast<System::String*>(Constants::sInt16));
- else if (sUnoName->Equals(const_cast<System::String*>(Constants::usUShort)))
- buf->Append(const_cast<System::String*>(Constants::sUInt16));
- else if (sUnoName->Equals(const_cast<System::String*>(Constants::usLong)))
- buf->Append(const_cast<System::String*>(Constants::sInt32));
- else if (sUnoName->Equals(const_cast<System::String*>(Constants::usULong)))
- buf->Append(const_cast<System::String*>(Constants::sUInt32));
- else if (sUnoName->Equals(const_cast<System::String*>(Constants::usHyper)))
- buf->Append(const_cast<System::String*>(Constants::sInt64));
- else if (sUnoName->Equals(const_cast<System::String*>(Constants::usUHyper)))
- buf->Append(const_cast<System::String*>(Constants::sUInt64));
- else if (sUnoName->Equals(const_cast<System::String*>(Constants::usFloat)))
- buf->Append(const_cast<System::String*>(Constants::sSingle));
- else if (sUnoName->Equals(const_cast<System::String*>(Constants::usDouble)))
- buf->Append(const_cast<System::String*>(Constants::sDouble));
- else if (sUnoName->Equals(const_cast<System::String*>(Constants::usString)))
- buf->Append(const_cast<System::String*>(Constants::sString));
- else if (sUnoName->Equals(const_cast<System::String*>(Constants::usVoid)))
- buf->Append(const_cast<System::String*>(Constants::sVoid));
- else if (sUnoName->Equals(const_cast<System::String*>(Constants::usType)))
- buf->Append(const_cast<System::String*>(Constants::sType));
- else if (sUnoName->Equals(const_cast<System::String*>(Constants::usXInterface)))
- buf->Append(const_cast<System::String*>(Constants::sObject));
- else if (sUnoName->Equals(const_cast<System::String*>(Constants::usAny)))
+ System::String ^ sUnoName = mapUnoString(usUnoName.pData);
+ if (sUnoName->Equals(const_cast<System::String^>(Constants::usBool)))
+ buf->Append(const_cast<System::String^>(Constants::sBoolean));
+ else if (sUnoName->Equals(const_cast<System::String^>(Constants::usChar)))
+ buf->Append(const_cast<System::String^>(Constants::sChar));
+ else if (sUnoName->Equals(const_cast<System::String^>(Constants::usByte)))
+ buf->Append(const_cast<System::String^>(Constants::sByte));
+ else if (sUnoName->Equals(const_cast<System::String^>(Constants::usShort)))
+ buf->Append(const_cast<System::String^>(Constants::sInt16));
+ else if (sUnoName->Equals(const_cast<System::String^>(Constants::usUShort)))
+ buf->Append(const_cast<System::String^>(Constants::sUInt16));
+ else if (sUnoName->Equals(const_cast<System::String^>(Constants::usLong)))
+ buf->Append(const_cast<System::String^>(Constants::sInt32));
+ else if (sUnoName->Equals(const_cast<System::String^>(Constants::usULong)))
+ buf->Append(const_cast<System::String^>(Constants::sUInt32));
+ else if (sUnoName->Equals(const_cast<System::String^>(Constants::usHyper)))
+ buf->Append(const_cast<System::String^>(Constants::sInt64));
+ else if (sUnoName->Equals(const_cast<System::String^>(Constants::usUHyper)))
+ buf->Append(const_cast<System::String^>(Constants::sUInt64));
+ else if (sUnoName->Equals(const_cast<System::String^>(Constants::usFloat)))
+ buf->Append(const_cast<System::String^>(Constants::sSingle));
+ else if (sUnoName->Equals(const_cast<System::String^>(Constants::usDouble)))
+ buf->Append(const_cast<System::String^>(Constants::sDouble));
+ else if (sUnoName->Equals(const_cast<System::String^>(Constants::usString)))
+ buf->Append(const_cast<System::String^>(Constants::sString));
+ else if (sUnoName->Equals(const_cast<System::String^>(Constants::usVoid)))
+ buf->Append(const_cast<System::String^>(Constants::sVoid));
+ else if (sUnoName->Equals(const_cast<System::String^>(Constants::usType)))
+ buf->Append(const_cast<System::String^>(Constants::sType));
+ else if (sUnoName->Equals(const_cast<System::String^>(Constants::usXInterface)))
+ buf->Append(const_cast<System::String^>(Constants::sObject));
+ else if (sUnoName->Equals(const_cast<System::String^>(Constants::usAny)))
{
- buf->Append(const_cast<System::String*>(Constants::sAny));
+ buf->Append(const_cast<System::String^>(Constants::sAny));
}
else
{
//put "unoidl." at the beginning
- buf->Append(const_cast<System::String*>(Constants::sUnoidl));
+ buf->Append(const_cast<System::String^>(Constants::sUnoidl));
//for polymorphic struct types remove the brackets, e.g mystruct<bool> -> mystruct
- System::String * sName = mapUnoPolymorphicName(sUnoName);
+ System::String ^ sName = mapUnoPolymorphicName(sUnoName);
buf->Append(sName);
}
// apend []
for (;dims--;)
- buf->Append(const_cast<System::String*>(Constants::sBrackets));
+ buf->Append(const_cast<System::String^>(Constants::sBrackets));
return buf->ToString();
}
@@ -544,7 +544,7 @@ System::String* mapUnoTypeName(rtl_uString const * typeName)
System.Int32, etc.
The präfix unoidl is not added.
*/
-inline System::String* mapUnoPolymorphicName(System::String* unoName)
+inline System::String^ mapUnoPolymorphicName(System::String^ unoName)
{
return mapPolymorphicName(unoName, false);
}
@@ -555,18 +555,18 @@ inline System::String* mapUnoPolymorphicName(System::String* unoName)
long, etc.
The präfix unoidl remains.
*/
-inline System::String* mapCliPolymorphicName(System::String* unoName)
+inline System::String^ mapCliPolymorphicName(System::String^ unoName)
{
return mapPolymorphicName(unoName, true);
}
-System::String* mapPolymorphicName(System::String* unoName, bool bCliToUno)
+System::String^ mapPolymorphicName(System::String^ unoName, bool bCliToUno)
{
int index = unoName->IndexOf('<');
if (index == -1)
return unoName;
- System::Text::StringBuilder * builder = new System::Text::StringBuilder(256);
+ System::Text::StringBuilder ^ builder = gcnew System::Text::StringBuilder(256);
builder->Append(unoName->Substring(0, index +1 ));
//Find the first occurrence of ','
@@ -579,14 +579,14 @@ System::String* mapPolymorphicName(System::String* unoName, bool bCliToUno)
int countParams = 0;
while (cur <= endIndex)
{
- System::Char c = unoName->Chars[cur];
+ System::Char c = unoName[cur];
if (c == ',' || c == '>')
{
//insert a comma if needed
if (countParams != 0)
- builder->Append(S",");
+ builder->Append(",");
countParams++;
- System::String * sParam = unoName->Substring(index, cur - index);
+ System::String ^ sParam = unoName->Substring(index, cur - index);
//skip the comma
cur++;
//the the index to the beginning of the next param
@@ -608,7 +608,7 @@ System::String* mapPolymorphicName(System::String* unoName, bool bCliToUno)
int numNested = 0;
for (;;cur++)
{
- System::Char curChar = unoName->Chars[cur];
+ System::Char curChar = unoName[cur];
if (curChar == '<')
{
numNested ++;
@@ -629,7 +629,7 @@ System::String* mapPolymorphicName(System::String* unoName, bool bCliToUno)
return builder->ToString();
}
-OUString mapCliTypeName(System::String* typeName)
+OUString mapCliTypeName(System::String^ typeName)
{
int dims= 0;
// Array? determine the "rank" (number of "[]")
@@ -640,7 +640,7 @@ OUString mapCliTypeName(System::String* typeName)
bool bRightBracket = false;
while (cur >= 0)
{
- System::Char c = typeName->Chars[cur];
+ System::Char c = typeName[cur];
if (c == ']')
{
bRightBracket = true;
@@ -672,47 +672,47 @@ OUString mapCliTypeName(System::String* typeName)
typeName = typeName->Substring(0, cur + 1);
- System::Text::StringBuilder * buf = new System::Text::StringBuilder(512);
+ System::Text::StringBuilder ^ buf = gcnew System::Text::StringBuilder(512);
//Put the "[]" at the beginning of the uno type name
for (;dims--;)
- buf->Append(const_cast<System::String*>(Constants::usBrackets));
-
- if (typeName->Equals(const_cast<System::String*>(Constants::sBoolean)))
- buf->Append(const_cast<System::String*>(Constants::usBool));
- else if (typeName->Equals(const_cast<System::String*>(Constants::sChar)))
- buf->Append(const_cast<System::String*>(Constants::usChar));
- else if (typeName->Equals(const_cast<System::String*>(Constants::sByte)))
- buf->Append(const_cast<System::String*>(Constants::usByte));
- else if (typeName->Equals(const_cast<System::String*>(Constants::sInt16)))
- buf->Append(const_cast<System::String*>(Constants::usShort));
- else if (typeName->Equals(const_cast<System::String*>(Constants::sUInt16)))
- buf->Append(const_cast<System::String*>(Constants::usUShort));
- else if (typeName->Equals(const_cast<System::String*>(Constants::sInt32)))
- buf->Append(const_cast<System::String*>(Constants::usLong));
- else if (typeName->Equals(const_cast<System::String*>(Constants::sUInt32)))
- buf->Append(const_cast<System::String*>(Constants::usULong));
- else if (typeName->Equals(const_cast<System::String*>(Constants::sInt64)))
- buf->Append(const_cast<System::String*>(Constants::usHyper));
- else if (typeName->Equals(const_cast<System::String*>(Constants::sUInt64)))
- buf->Append(const_cast<System::String*>(Constants::usUHyper));
- else if (typeName->Equals(const_cast<System::String*>(Constants::sSingle)))
- buf->Append(const_cast<System::String*>(Constants::usFloat));
- else if (typeName->Equals(const_cast<System::String*>(Constants::sDouble)))
- buf->Append(const_cast<System::String*>(Constants::usDouble));
- else if (typeName->Equals(const_cast<System::String*>(Constants::sString)))
- buf->Append(const_cast<System::String*>(Constants::usString));
- else if (typeName->Equals(const_cast<System::String*>(Constants::sVoid)))
- buf->Append(const_cast<System::String*>(Constants::usVoid));
- else if (typeName->Equals(const_cast<System::String*>(Constants::sType)))
- buf->Append(const_cast<System::String*>(Constants::usType));
- else if (typeName->Equals(const_cast<System::String*>(Constants::sObject)))
- buf->Append(const_cast<System::String*>(Constants::usXInterface));
- else if (typeName->Equals(const_cast<System::String*>(Constants::sAny)))
- buf->Append(const_cast<System::String*>(Constants::usAny));
+ buf->Append(const_cast<System::String^>(Constants::usBrackets));
+
+ if (typeName->Equals(const_cast<System::String^>(Constants::sBoolean)))
+ buf->Append(const_cast<System::String^>(Constants::usBool));
+ else if (typeName->Equals(const_cast<System::String^>(Constants::sChar)))
+ buf->Append(const_cast<System::String^>(Constants::usChar));
+ else if (typeName->Equals(const_cast<System::String^>(Constants::sByte)))
+ buf->Append(const_cast<System::String^>(Constants::usByte));
+ else if (typeName->Equals(const_cast<System::String^>(Constants::sInt16)))
+ buf->Append(const_cast<System::String^>(Constants::usShort));
+ else if (typeName->Equals(const_cast<System::String^>(Constants::sUInt16)))
+ buf->Append(const_cast<System::String^>(Constants::usUShort));
+ else if (typeName->Equals(const_cast<System::String^>(Constants::sInt32)))
+ buf->Append(const_cast<System::String^>(Constants::usLong));
+ else if (typeName->Equals(const_cast<System::String^>(Constants::sUInt32)))
+ buf->Append(const_cast<System::String^>(Constants::usULong));
+ else if (typeName->Equals(const_cast<System::String^>(Constants::sInt64)))
+ buf->Append(const_cast<System::String^>(Constants::usHyper));
+ else if (typeName->Equals(const_cast<System::String^>(Constants::sUInt64)))
+ buf->Append(const_cast<System::String^>(Constants::usUHyper));
+ else if (typeName->Equals(const_cast<System::String^>(Constants::sSingle)))
+ buf->Append(const_cast<System::String^>(Constants::usFloat));
+ else if (typeName->Equals(const_cast<System::String^>(Constants::sDouble)))
+ buf->Append(const_cast<System::String^>(Constants::usDouble));
+ else if (typeName->Equals(const_cast<System::String^>(Constants::sString)))
+ buf->Append(const_cast<System::String^>(Constants::usString));
+ else if (typeName->Equals(const_cast<System::String^>(Constants::sVoid)))
+ buf->Append(const_cast<System::String^>(Constants::usVoid));
+ else if (typeName->Equals(const_cast<System::String^>(Constants::sType)))
+ buf->Append(const_cast<System::String^>(Constants::usType));
+ else if (typeName->Equals(const_cast<System::String^>(Constants::sObject)))
+ buf->Append(const_cast<System::String^>(Constants::usXInterface));
+ else if (typeName->Equals(const_cast<System::String^>(Constants::sAny)))
+ buf->Append(const_cast<System::String^>(Constants::usAny));
else
{
- System::String * sName = mapCliPolymorphicName(typeName);
+ System::String ^ sName = mapCliPolymorphicName(typeName);
int i= sName->IndexOf(L'.');
buf->Append(sName->Substring(i + 1));
}
@@ -721,20 +721,20 @@ OUString mapCliTypeName(System::String* typeName)
/** Maps uno types to dot net types.
* If uno_data is null then the type description is converted to System::Type
*/
-inline System::String* mapUnoString( rtl_uString const * data)
+inline System::String^ mapUnoString( rtl_uString const * data)
{
OSL_ASSERT(data);
- return new System::String((__wchar_t*) data->buffer, 0, data->length);
+ return gcnew System::String((__wchar_t*) data->buffer, 0, data->length);
}
-OUString mapCliString(System::String const * data)
+OUString mapCliString(System::String const ^ data)
{
- if (data != NULL)
+ if (data != nullptr)
{
OSL_ASSERT(sizeof(wchar_t) == sizeof(sal_Unicode));
- wchar_t const __pin * pdata= PtrToStringChars(data);
- return OUString(pdata, const_cast<System::String*>(data)->get_Length());
+ pin_ptr<wchar_t const> pdata= PtrToStringChars(data);
+ return OUString(pdata, const_cast<System::String^>(data)->Length);
}
else
{
@@ -745,7 +745,7 @@ OUString mapCliString(System::String const * data)
// ToDo convert cli types to expected types, e.g a long to a short where the uno type
// is a sal_Int16. This could be necessary if a scripting language (typeless) is used
// @param assign the uno_data has to be destructed (in/out args)
-void Bridge::map_to_uno(void * uno_data, System::Object* cli_data,
+void Bridge::map_to_uno(void * uno_data, System::Object^ cli_data,
typelib_TypeDescriptionReference * type,
bool assign) const
{
@@ -756,67 +756,67 @@ void Bridge::map_to_uno(void * uno_data, System::Object* cli_data,
break;
case typelib_TypeClass_CHAR:
{
- System::Char aChar= *__try_cast<System::Char*>(cli_data);
+ System::Char aChar= *safe_cast<System::Char^>(cli_data);
*(sal_Unicode*) uno_data= aChar;
break;
}
case typelib_TypeClass_BOOLEAN:
{
- System::Boolean aBool= *__try_cast<System::Boolean*>(cli_data);
+ System::Boolean aBool= *safe_cast<System::Boolean^>(cli_data);
*(sal_Bool*)uno_data= aBool == true ? sal_True : sal_False;
break;
}
case typelib_TypeClass_BYTE:
{
- System::Byte aByte= *__try_cast<System::Byte*>(cli_data);
+ System::Byte aByte= *safe_cast<System::Byte^>(cli_data);
*(sal_Int8*) uno_data= aByte;
break;
}
case typelib_TypeClass_SHORT:
{
- System::Int16 aShort= *__try_cast<System::Int16*>(cli_data);
+ System::Int16 aShort= *safe_cast<System::Int16^>(cli_data);
*(sal_Int16*) uno_data= aShort;
break;
}
case typelib_TypeClass_UNSIGNED_SHORT:
{
- System::UInt16 aUShort= *__try_cast<System::UInt16*>(cli_data);
+ System::UInt16 aUShort= *safe_cast<System::UInt16^>(cli_data);
*(sal_uInt16*) uno_data= aUShort;
break;
}
case typelib_TypeClass_LONG:
{
- System::Int32 aLong= *__try_cast<System::Int32*>(cli_data);
+ System::Int32 aLong= *safe_cast<System::Int32^>(cli_data);
*(sal_Int32*) uno_data= aLong;
break;
}
case typelib_TypeClass_UNSIGNED_LONG:
{
- System::UInt32 aULong= *__try_cast<System::UInt32*>(cli_data);
+ System::UInt32 aULong= *safe_cast<System::UInt32^>(cli_data);
*(sal_uInt32*) uno_data= aULong;
break;
}
case typelib_TypeClass_HYPER:
{
- System::Int64 aHyper= *__try_cast<System::Int64*>(cli_data);
+ System::Int64 aHyper= *safe_cast<System::Int64^>(cli_data);
*(sal_Int64*) uno_data= aHyper;
break;
}
case typelib_TypeClass_UNSIGNED_HYPER:
{
- System::UInt64 aLong= *__try_cast<System::UInt64*>(cli_data);
+ System::UInt64 aLong= *safe_cast<System::UInt64^>(cli_data);
*(sal_uInt64*) uno_data= aLong;
break;
}
case typelib_TypeClass_FLOAT:
{
- System::Single aFloat= *__try_cast<System::Single*>(cli_data);
+ System::Single aFloat= *safe_cast<System::Single^>(cli_data);
*(float*) uno_data= aFloat;
break;
}
case typelib_TypeClass_DOUBLE:
{
- System::Double aDouble= *__try_cast<System::Double*>(cli_data);
+ System::Double aDouble= *safe_cast<System::Double^>(cli_data);
*(double*) uno_data= aDouble;
break;
}
@@ -826,22 +826,22 @@ void Bridge::map_to_uno(void * uno_data, System::Object* cli_data,
rtl_uString_release(*(rtl_uString**) uno_data);
*(rtl_uString **)uno_data = 0;
- if (cli_data == NULL)
+ if (cli_data == nullptr)
{
rtl_uString_new((rtl_uString**) uno_data);
}
else
{
- System::String *s= __try_cast<System::String*>(cli_data);
- wchar_t const __pin * pdata= PtrToStringChars(s);
+ System::String ^s= safe_cast<System::String^>(cli_data);
+ pin_ptr<const wchar_t> pdata= PtrToStringChars(s);
rtl_uString_newFromStr_WithLength( (rtl_uString**) uno_data,
- pdata, s->get_Length() );
+ pdata, s->Length );
}
break;
}
case typelib_TypeClass_TYPE:
{
- typelib_TypeDescriptionReference* td= mapCliType(__try_cast<System::Type*>(
+ typelib_TypeDescriptionReference* td= mapCliType(safe_cast<System::Type^>(
cli_data));
if (assign)
{
@@ -854,14 +854,14 @@ void Bridge::map_to_uno(void * uno_data, System::Object* cli_data,
case typelib_TypeClass_ANY:
{
uno_Any * pAny = (uno_Any *)uno_data;
- if (cli_data == NULL) // null-ref or uninitialized any maps to empty any
+ if (cli_data == nullptr) // null-ref or uninitialized any maps to empty any
{
if (assign)
uno_any_destruct( pAny, 0 );
uno_any_construct( pAny, 0, 0, 0 );
break;
}
- uno::Any aAny= *__try_cast<uno::Any*>(cli_data);
+ uno::Any aAny= *safe_cast<uno::Any^>(cli_data);
css::uno::Type value_td( mapCliType(aAny.Type), SAL_NO_ACQUIRE);
if (assign)
@@ -876,42 +876,42 @@ void Bridge::map_to_uno(void * uno_data, System::Object* cli_data,
break;
case typelib_TypeClass_CHAR:
pAny->pData = &pAny->pReserved;
- *(sal_Unicode*) &pAny->pReserved = *__try_cast<System::Char*>(aAny.Value);
+ *(sal_Unicode*) &pAny->pReserved = *safe_cast<System::Char^>(aAny.Value);
break;
case typelib_TypeClass_BOOLEAN:
pAny->pData = &pAny->pReserved;
- *(sal_Bool *) &pAny->pReserved = *__try_cast<System::Boolean*>(aAny.Value);
+ *(sal_Bool *) &pAny->pReserved = *safe_cast<System::Boolean^>(aAny.Value);
break;
case typelib_TypeClass_BYTE:
pAny->pData = &pAny->pReserved;
- *(sal_Int8*) &pAny->pReserved = *__try_cast<System::Byte*>(aAny.Value);
+ *(sal_Int8*) &pAny->pReserved = *safe_cast<System::Byte^>(aAny.Value);
break;
case typelib_TypeClass_SHORT:
pAny->pData = &pAny->pReserved;
- *(sal_Int16*) &pAny->pReserved = *__try_cast<System::Int16*>(aAny.Value);
+ *(sal_Int16*) &pAny->pReserved = *safe_cast<System::Int16^>(aAny.Value);
break;
case typelib_TypeClass_UNSIGNED_SHORT:
pAny->pData = &pAny->pReserved;
- *(sal_uInt16*) &pAny->pReserved = *__try_cast<System::UInt16*>(aAny.Value);
+ *(sal_uInt16*) &pAny->pReserved = *safe_cast<System::UInt16^>(aAny.Value);
break;
case typelib_TypeClass_LONG:
pAny->pData = &pAny->pReserved;
- *(sal_Int32*) &pAny->pReserved = *__try_cast<System::Int32*>(aAny.Value);
+ *(sal_Int32*) &pAny->pReserved = *safe_cast<System::Int32^>(aAny.Value);
break;
case typelib_TypeClass_UNSIGNED_LONG:
pAny->pData = &pAny->pReserved;
- *(sal_uInt32*) &pAny->pReserved = *__try_cast<System::UInt32*>(aAny.Value);
+ *(sal_uInt32*) &pAny->pReserved = *safe_cast<System::UInt32^>(aAny.Value);
break;
case typelib_TypeClass_HYPER:
if (sizeof (sal_Int64) <= sizeof (void *))
{
pAny->pData = &pAny->pReserved;
- *(sal_Int64*) &pAny->pReserved = *__try_cast<System::Int64*>(aAny.Value);
+ *(sal_Int64*) &pAny->pReserved = *safe_cast<System::Int64^>(aAny.Value);
}
else
{
auto_ptr< rtl_mem > mem( rtl_mem::allocate( sizeof (sal_Int64) ) );
- *(sal_Int64 *) mem.get()= *__try_cast<System::Int64*>(aAny.Value);
+ *(sal_Int64 *) mem.get()= *safe_cast<System::Int64^>(aAny.Value);
pAny->pData = mem.release();
}
break;
@@ -919,12 +919,12 @@ void Bridge::map_to_uno(void * uno_data, System::Object* cli_data,
if (sizeof (sal_uInt64) <= sizeof (void *))
{
pAny->pData = &pAny->pReserved;
- *(sal_uInt64*) &pAny->pReserved = *__try_cast<System::UInt64*>(aAny.Value);
+ *(sal_uInt64*) &pAny->pReserved = *safe_cast<System::UInt64^>(aAny.Value);
}
else
{
auto_ptr< rtl_mem > mem( rtl_mem::allocate( sizeof (sal_uInt64) ) );
- *(sal_uInt64 *) mem.get()= *__try_cast<System::UInt64*>(aAny.Value);
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list