[Libreoffice-commits] .: Branch 'feature/vs2012' - 261 commits - android/Bootstrap android/experimental android/sdremote animations/Library_animcore.mk avmedia/Module_avmedia.mk avmedia/source basctl/source basegfx/Library_basegfx.mk basic/source boost/boost.vc2012.patch bridges/CustomTarget_gcc3_ios_arm.mk bridges/inc bridges/Jar_java_uno.mk bridges/Library_cc50_solaris_intel.mk bridges/Library_cc50_solaris_sparc.mk bridges/Library_cc5_solaris_sparc64.mk bridges/Library_gcc3_aix_powerpc.mk bridges/Library_gcc3_ios_arm.mk bridges/Library_gcc3_linux_alpha.mk bridges/Library_gcc3_linux_arm.mk bridges/Library_gcc3_linux_hppa.mk bridges/Library_gcc3_linux_ia64.mk bridges/Library_gcc3_linux_intel.mk bridges/Library_gcc3_linux_m68k.mk bridges/Library_gcc3_linux_mips.mk bridges/Library_gcc3_linux_powerpc64.mk bridges/Library_gcc3_linux_powerpc.mk bridges/Library_gcc3_linux_s390.mk bridges/Library_gcc3_linux_s390x.mk bridges/Library_gcc3_linux_sparc.mk bridges/Library_gcc3_linux_x86-64.mk bridges /Library_gcc3_macosx_intel.mk bridges/Library_gcc3_macosx_powerpc.mk bridges/Library_gcc3_solaris_intel.mk bridges/Library_gcc3_solaris_sparc.mk bridges/Library_java_uno.mk bridges/Library_mingw_intel.mk bridges/Library_msvc_win32_intel.mk bridges/Library_msvc_win32_x86-64.mk bridges/Makefile bridges/Module_bridges.mk bridges/prj bridges/source bridges/test bridges/unotypes bridges/version.mk canvas/Library_directx9canvas.mk canvas/Library_gdipluscanvas.mk canvas/source canvas/StaticLibrary_directxcanvas.mk 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/CustomTarget_cli_ure_assemblies.mk cli_ure/Executable_climaker.mk cli_ure/inc cli_ure/Library_cli_cppuhelper_native.mk cli_ure/Library_cli_uno.mk cli_ure/Makefile cli_ure/Module_cli_ure.mk cli_ure/Package_config.mk cli_ure/Package_version.mk cli_ure/prj cli_ure/source cli_ure/unotypes cli_ure/util cli_ure/vers ion clucene/ExternalPackage_clucene.mk clucene/Module_clucene.mk clucene/Package_source.mk clucene/prj codemaker/Executable_cppumaker.mk codemaker/Executable_javamaker.mk codemaker/StaticLibrary_codemaker_cpp.mk codemaker/StaticLibrary_codemaker_java.mk codemaker/StaticLibrary_codemaker.mk comphelper/Library_comphelper.mk comphelper/source config_host.mk.in configure.in connectivity/Library_ado.mk connectivity/Library_mork.mk connectivity/registry connectivity/source cppu/CustomTarget_cppu_allheaders.mk cppuhelper/CustomTarget_cppuhelper_allheaders.mk cppuhelper/inc cppu/inc cppu/source cross_tail_build/prj cui/source dbaccess/source desktop/source desktop/unx download editeng/source embeddedobj/source embedserv/Library_emser.mk embedserv/source eventattacher/source extensions/Library_oleautobridge2.mk extensions/Library_oleautobridge.mk extensions/Library_so_activex.mk extensions/Library_so_activex_x64.mk extensions/source extensions/test external/msm100 external/msm110 ext ernal/prj external/rebase extras/CustomTarget_autocorr.mk extras/source fileaccess/source filter/Module_filter.mk filter/source forms/source framework/source helpcompiler/inc helpcompiler/Library_helplinker.mk hunspell/hunspell-1.3.2-compound.patch hunspell/makefile.mk i18npool/CustomTarget_localedata.mk i18npool/Library_localedata_others.mk i18npool/Library_textconv_dict.mk i18npool/qa i18npool/source idl/source instsetoo_native/inc_openoffice javaunohelper/com javaunohelper/Library_juh.mk javaunohelper/Module_javaunohelper.mk lcms2/makefile.mk libcdr/ExternalPackage_libcdr.mk libcdr/Module_libcdr.mk libcdr/Package_libcdr.mk libcmis/ExternalPackage_libcmis.mk libcmis/Module_libcmis.mk libcmis/Package_libcmis.mk liblangtag/liblangtag-0.2-xmlCleanupParser.patch liblangtag/makefile.mk libmspub/ExternalPackage_libmspub.mk libmspub/Module_libmspub.mk libmspub/Package_libmspub.mk liborcus/ExternalProject_liborcus.mk libpng/ExternalPackage_libpng.mk libpng/Module_libpng.mk libpng/ Package_libpng.mk Library_merged.mk libvisio/ExternalPackage_libvisio.mk libvisio/Module_libvisio.mk libvisio/Package_libvisio.mk libwpd/ExternalPackage_libwpd.mk libwpd/Module_libwpd.mk libwpd/Package_libwpd.mk libwpg/ExternalPackage_libwpg.mk libwpg/Module_libwpg.mk libwpg/Package_libwpg.mk libwps/ExternalPackage_libwps.mk libwps/Module_libwps.mk libwps/Package_libwps.mk lotuswordpro/source Makefile.top mdds/UnpackedTarball_mdds.mk Module_cross_tail_build.mk Module_tail_build.mk neon/configs neon/Library_neon.mk neon/Makefile neon/makefile.mk neon/Module_neon.mk neon/neon.def neon/neon_exports_unix.patch neon/neon_exports_win.patch neon/neon_ne_set_request_flag.patch neon/neon.patch neon/prj neon/UnpackedTarball_neon.mk neon/version.mk nss/makefile.mk o3tl/inc odk/examples offapi/com offapi/UnoApi_offapi.mk officecfg/Configuration_officecfg.mk officecfg/CustomTarget_registry.mk officecfg/Module_officecfg.mk officecfg/Package_cppheader.mk officecfg/qa officecfg/registry ooo .lst.in oovbaapi/ooo oovbaapi/UnoApi_oovbaapi.mk oowintool oox/inc oox/source openssl/makefile.mk package/inc package/qa package/source packimages/CustomTarget_images.mk post_download.in postprocess/rebase python/makefile.mk python/Python-2.6.1-vc12.patch reportbuilder/Configuration_reportbuilder.mk reportdesign/source RepositoryExternal.mk Repository.mk RepositoryModule_ooo.mk sal/android sal/CustomTarget_sal_allheaders.mk salhelper/CustomTarget_salhelper_allheaders.mk sal/inc sax/source sc/CppunitTest_sc_filters_test.mk sc/inc sc/Library_vbaobj.mk scp2/InstallModule_accessories.mk scp2/InstallModule_activex.mk scp2/InstallModule_base.mk scp2/InstallModule_binfilter.mk scp2/InstallModule_calc.mk scp2/InstallModule_canvas.mk scp2/InstallModule_crashrep.mk scp2/InstallModule_draw.mk scp2/InstallModule_extensions.mk scp2/InstallModule_gnome.mk scp2/InstallModule_graphicfilter.mk scp2/InstallModule_impress.mk scp2/InstallModule_javafilter.mk scp2/InstallModule_kde.mk scp2/Insta llModule_math.mk scp2/InstallModule_onlineupdate.mk scp2/InstallModule_ooo.mk scp2/InstallModule_python.mk scp2/InstallModule_quickstart.mk scp2/InstallModule_sdkoo.mk scp2/InstallModule_smoketest.mk scp2/InstallModule_stdlibs.mk scp2/InstallModule_tde.mk scp2/InstallModule_ure.mk scp2/InstallModule_ure_standalone.mk scp2/InstallModule_windows.mk scp2/InstallModule_winexplorerext.mk scp2/InstallModule_writer.mk scp2/InstallModule_xsltfilter.mk scp2/Module_scp2.mk scp2/Package_inc.mk scp2/Package_langmacros.mk scp2/source sc/qa sc/source sd/CppunitTest_sd_filters_test.mk sdext/CustomTarget_presenter.mk sdext/Extension_presenter.mk sdext/Module_sdext.mk sdext/source sd/Library_sdui.mk sd/qa sd/source sfx2/source shell/source solenv/bin solenv/gbuild solenv/inc sot/source starmath/Module_starmath.mk stoc/source svl/source svtools/inc svtools/Module_svtools.mk svtools/source svx/source sw/inc sw/Module_sw.mk sw/qa sw/source tail_build/prj testtools/CustomTarget_bridgetest_javama ker.mk testtools/CustomTarget_uno_test.mk toolkit/inc toolkit/source touch/CustomTarget_touch_javamaker.mk ucbhelper/Library_ucbhelper.mk ucbhelper/source ucb/source UnoControls/source unotools/inc unotools/source unoxml/source unusedcode.easy uui/source vcl/aqua vcl/inc vcl/Library_vcl.mk vcl/source vcl/unx vigra/UnpackedTarball_vigra.mk writerfilter/inc writerfilter/source writerfilter/unocomponent xmlhelp/Library_ucpchelp1.mk xmlhelp/source xmloff/source xmlscript/Library_xmlscript.mk xmlscript/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Sat Sep 22 11:12:50 PDT 2012
Rebased ref, commits from common ancestor:
commit 9d040f637d2ad5535b3f6f4bd0f648000b3bf2c2
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 34b3579..ddaab5e 100644
--- a/configure.in
+++ b/configure.in
@@ -12405,7 +12405,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 42e5c57f91f091762c5fa8923825af766d41b79a
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 520f5f9..ded399e 100644
--- a/Library_merged.mk
+++ b/Library_merged.mk
@@ -122,6 +122,11 @@ $(eval $(call gb_Library_use_libraries,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 e4d37e37dccd78afb0d9ab8c36f6bc84f01fd796
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 e98a452..fb90fc7 100644
--- a/i18npool/Library_textconv_dict.mk
+++ b/i18npool/Library_textconv_dict.mk
@@ -36,6 +36,9 @@ $(eval $(call gb_Library_set_include,textconv_dict,\
$(eval $(call gb_Library_use_sdk_api,textconv_dict))
$(eval $(call gb_Library_use_libraries,textconv_dict,\
+ sal \
+ cppu \
+ cppuhelper \
$(gb_STDLIBS) \
))
commit 41d1c4ca091e7264330197825fb370b1eb48ddfd
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 54119c05f3e09195b478fb8078beb9902566d686
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 d44ef7d..34b3579 100644
--- a/configure.in
+++ b/configure.in
@@ -12376,11 +12376,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 227bd43942c8c82b1188c89746e6acfa1ea8839d
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 53705a6..d44ef7d 100644
--- a/configure.in
+++ b/configure.in
@@ -2426,7 +2426,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
@@ -4770,22 +4770,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 da8890f1d3f721343cec248515d27fe118b988e8
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 e3244a5fc4470d6dfbbd3b2c84de24a8d1ee7d45
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 fcbc03e..2286ec5 100644
--- a/Makefile.top
+++ b/Makefile.top
@@ -336,6 +336,7 @@ endif
rm -fr $(OUTDIR)
rm -fr $(WORKDIR)
rm -fr $(SRCDIR)/*/$(INPATH)
+ rm -fr $(SRCDIR)/solenv/$(OUTPATH)
rm -fr install
clean-build:
@@ -355,7 +356,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 fbfe1cbe7fefe3a4baa66356d630973e6891aef8
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 b802611..53705a6 100644
--- a/configure.in
+++ b/configure.in
@@ -3254,26 +3254,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 5ce20a8242805e7f06666b035d9c23a5b7cf8020
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 fda9ac60b004265e6e1f6dcb70baafac4bb1ad88
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 c08fb9f..520f5f9 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_libraries,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 6045f09..1930462 100644
--- a/solenv/gbuild/platform/WNT_INTEL_MSC.mk
+++ b/solenv/gbuild/platform/WNT_INTEL_MSC.mk
@@ -342,6 +342,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,\
@@ -355,6 +362,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 9b46c8d2995114d51a8decf04d1b4a80e2b5717d
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 b44c8753c55b286223507fac9ce917bab09367b0
Author: Peter Foley <pefoley2 at verizon.net>
Date: Sat Sep 1 17:58:42 2012 -0400
fix MSI build on windows
Change-Id: I08197d8f005fe4a720ad0cab2c08105916e0185a
diff --git a/sdext/CustomTarget_presenter.mk b/sdext/CustomTarget_presenter.mk
deleted file mode 100644
index afecd49..0000000
--- a/sdext/CustomTarget_presenter.mk
+++ /dev/null
@@ -1,41 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-# Version: MPL 1.1 / GPLv3+ / LGPLv3+
-#
-# The contents of this file are subject to the Mozilla Public License Version
-# 1.1 (the "License"); you may not use this file except in compliance with
-# the License or as specified alternatively below. You may obtain a copy of
-# the License at http://www.mozilla.org/MPL/
-#
-# Software distributed under the License is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-# for the specific language governing rights and limitations under the
-# License.
-#
-# Major Contributor(s):
-# Copyright (C) 2012 Red Hat, Inc., David Tardon <dtardon at redhat.com>
-# (initial developer)
-#
-# All Rights Reserved.
-#
-# For minor contributions see the git repository.
-#
-# Alternatively, the contents of this file may be used under the terms of
-# either the GNU General Public License Version 3 or later (the "GPLv3+"), or
-# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
-# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
-# instead of those above.
-
-$(eval $(call gb_CustomTarget_CustomTarget,sdext/source/presenter/help/en-US/com.sun.PresenterScreen))
-
-$(call gb_CustomTarget_get_target,sdext/source/presenter/help/en-US/com.sun.PresenterScreen) : \
- $(call gb_CustomTarget_get_workdir,sdext/source/presenter/help/en-US/com.sun.PresenterScreen)/presenter.xhp
-
-include $(SRCDIR)/sdext/platform.mk
-
-$(call gb_CustomTarget_get_workdir,sdext/source/presenter/help/en-US/com.sun.PresenterScreen)/presenter.xhp : \
- $(SRCDIR)/sdext/source/presenter/help/en-US/com.sun.PresenterScreen/presenter.xhp \
- | $(call gb_CustomTarget_get_workdir,sdext/source/presenter/help/en-US/com.sun.PresenterScreen)/.dir
- $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),SED,1)
- sed "s/PLATFORMID/$(sdext_PLATFORM)/" < $< > $@
-
-# vim:set shiftwidth=4 tabstop=4 noexpandtab:
diff --git a/sdext/Extension_presenter.mk b/sdext/Extension_presenter.mk
index 66f93a8..52f0f38 100644
--- a/sdext/Extension_presenter.mk
+++ b/sdext/Extension_presenter.mk
@@ -141,7 +141,7 @@ $(eval $(call gb_Extension_add_files,presenter-screen,registry/data/org/openoffi
$(call gb_XcuDataTarget_get_target,sdext/source/presenter/registry/data/org/openoffice/Office/ProtocolHandler.xcu) \
))
-$(eval $(call gb_Extension_add_helpfile,presenter-screen,$(WORKDIR)/CustomTarget/sdext/source/presenter/help/en-US,com.sun.PresenterScreen-$(sdext_PLATFORM)/presenter.xhp,com.sun.PresenterScreen/presenter.xhp))
+$(eval $(call gb_Extension_add_helpfile,presenter-screen,$(SRCDIR)/sdext/source/presenter/help/en-US,com.sun.PresenterScreen-$(sdext_PLATFORM)/presenter.xhp,com.sun.PresenterScreen/presenter.xhp))
$(eval $(call gb_Extension_add_helptreefile,presenter-screen,$(SRCDIR)/sdext/source/presenter/help/en-US,/help.tree,com.sun.PresenterScreen/help.tree,com.sun.PresenterScreen-$(sdext_PLATFORM)))
diff --git a/sdext/Module_sdext.mk b/sdext/Module_sdext.mk
index 7bba9d9..0ab6444 100644
--- a/sdext/Module_sdext.mk
+++ b/sdext/Module_sdext.mk
@@ -56,7 +56,6 @@ endif
ifeq ($(ENABLE_PRESENTER_SCREEN),YES)
$(eval $(call gb_Module_add_targets,sdext,\
Configuration_presenter \
- CustomTarget_presenter \
Extension_presenter \
Library_presenter \
Rdb_presenter \
diff --git a/sdext/source/presenter/help/en-US/com.sun.PresenterScreen/presenter.xhp b/sdext/source/presenter/help/en-US/com.sun.PresenterScreen/presenter.xhp
index 1c07357..194c3fa 100644
--- a/sdext/source/presenter/help/en-US/com.sun.PresenterScreen/presenter.xhp
+++ b/sdext/source/presenter/help/en-US/com.sun.PresenterScreen/presenter.xhp
@@ -34,7 +34,7 @@
<meta>
<topic id="textpresenterxml" indexer="include" status="PUBLISH">
<title xml-lang="en-US" id="tit" l10n="NEW">Presenter Console Keyboard Shortcuts</title>
- <filename>/com.sun.PresenterScreen-PLATFORMID/presenter.xhp</filename>
+ <filename>presenter.xhp</filename>
</topic>
</meta>
<body>
diff --git a/solenv/gbuild/ExtensionTarget.mk b/solenv/gbuild/ExtensionTarget.mk
index d68f79e..891df56 100644
--- a/solenv/gbuild/ExtensionTarget.mk
+++ b/solenv/gbuild/ExtensionTarget.mk
@@ -353,7 +353,7 @@ $(call gb_ExtensionTarget_get_rootdir,$(1))/help/$(2).done : \
$(gb_ExtensionTarget_HELPLINKERCOMMAND) -mod help \
-extlangsrc $(call gb_ExtensionTarget_get_workdir,$(1))/help/$(2) \
-sty $(OUTDIR_FOR_BUILD)/bin/embed.xsl \
- -extlangdest $$(basename $$@) \
+ -extlangdest $$(basename $$@)/$$(dir $$(HELPFILES)) \
-idxcaption $(OUTDIR_FOR_BUILD)/bin/idxcaption.xsl \
-idxcontent $(OUTDIR_FOR_BUILD)/bin/idxcontent.xsl \
$$(HELPFILES) && \
commit eea91ba365be9a79641079524f565ad9279ce80f
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 6a8fc1e..b802611 100644
--- a/configure.in
+++ b/configure.in
@@ -3244,6 +3244,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 a7693f0..348b0b9 100644
--- a/ooo.lst.in
+++ b/ooo.lst.in
@@ -102,6 +102,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 bbe974cab045002aecf4ff59493690b378d73d03
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 bf6558c..a31be2b 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -593,6 +593,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 65e07f0..6a8fc1e 100644
--- a/configure.in
+++ b/configure.in
@@ -3150,12 +3150,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
@@ -3235,6 +3238,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)
@@ -5604,10 +5608,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 c505edbe2485a3990172e3a1f51d4a3e6c6522eb
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 36fbaadcd9265f99a285b50e7789d3b6a24cb030
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 5d0df06..bf6558c 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -467,6 +467,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 RPM=@RPM@
export RTL_OS=@RTL_OS@
diff --git a/configure.in b/configure.in
index 9da0472..65e07f0 100644
--- a/configure.in
+++ b/configure.in
@@ -9041,6 +9041,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 624d0d0824bf05153e6ab8f4cfb05894776a6651
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 0f3262e..9da0472 100644
--- a/configure.in
+++ b/configure.in
@@ -12550,8 +12550,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 409ff413306c749bb306d145cfa89f911fd7c3b5
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 ad9faa9..cb91e12 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 810ba44cfef87a1af808a6ea3c8c83ab320677b2
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 46f20b9..55f3783 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 aed48df..f46c65e 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);
+ *(sal_uInt64 *) mem.get()= *safe_cast<System::UInt64^>(aAny.Value);
pAny->pData = mem.release();
}
break;
@@ -932,12 +932,12 @@ void Bridge::map_to_uno(void * uno_data, System::Object* cli_data,
if (sizeof (float) <= sizeof (void *))
{
pAny->pData = &pAny->pReserved;
- *(float*) &pAny->pReserved = *__try_cast<System::Single*>(aAny.Value);
+ *(float*) &pAny->pReserved = *safe_cast<System::Single^>(aAny.Value);
}
else
{
auto_ptr< rtl_mem > mem( rtl_mem::allocate( sizeof (float) ) );
- *(float*) mem.get() = *__try_cast<System::Single*>(aAny.Value);
+ *(float*) mem.get() = *safe_cast<System::Single^>(aAny.Value);
pAny->pData = mem.release();
}
break;
@@ -945,19 +945,19 @@ void Bridge::map_to_uno(void * uno_data, System::Object* cli_data,
if (sizeof (double) <= sizeof (void *))
{
pAny->pData = &pAny->pReserved;
- *(double*) &pAny->pReserved= *__try_cast<System::Double*>(aAny.Value);
+ *(double*) &pAny->pReserved= *safe_cast<System::Double^>(aAny.Value);
}
else
{
auto_ptr< rtl_mem > mem( rtl_mem::allocate( sizeof (double) ) );
- *(double*) mem.get()= *__try_cast<System::Double*>(aAny.Value);
+ *(double*) mem.get()= *safe_cast<System::Double^>(aAny.Value);
pAny->pData= mem.release();
}
break;
case typelib_TypeClass_STRING: // anies often contain strings; copy string directly
{
pAny->pData= &pAny->pReserved;
- OUString _s = mapCliString(static_cast<System::String*>(aAny.Value));
+ OUString _s = mapCliString(static_cast<System::String^>(aAny.Value));
pAny->pReserved= _s.pData;
rtl_uString_acquire(_s.pData);
break;
@@ -996,7 +996,7 @@ void Bridge::map_to_uno(void * uno_data, System::Object* cli_data,
}
}
}
- catch(System::InvalidCastException* )
+ catch(System::InvalidCastException^ )
{
// ToDo check this
if (assign)
@@ -1008,7 +1008,7 @@ void Bridge::map_to_uno(void * uno_data, System::Object* cli_data,
buf.append(value_td.getTypeName());
buf.appendAscii( RTL_CONSTASCII_STRINGPARAM(" does not correspont "
"to its value type: ") );
- if(aAny.Value != NULL)
+ if(aAny.Value != nullptr)
{
css::uno::Type td(mapCliType(aAny.Value->GetType()), SAL_NO_ACQUIRE);
buf.append(td.getTypeName());
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list