[Libreoffice-commits] .: Branch 'feature/vs2012' - 277 commits - accessibility/source android/Bootstrap android/experimental android/qa android/sdremote animations/source basctl/source basic/CppunitTest_basic_nested_struct.mk basic/inc basic/source bean/com bean/qa bean/test berkeleydb/makefile.mk binaryurp/source boost/boost.vc2012.patch boost/Module_boost.mk boost/Package_boostdatetime.mk boost/Package_boostthread.mk boost/prj boost/StaticLibrary_boostdatetime.mk boost/StaticLibrary_boostthread.mk bridges/test cairo/prj canvas/Library_directx9canvas.mk canvas/Library_gdipluscanvas.mk canvas/source canvas/StaticLibrary_directxcanvas.mk chart2/qa chart2/source cli_ure/source clucene/Library_clucene.mk comphelper/inc comphelper/source config_host.mk.in configure.in connectivity/com connectivity/Jar_sdbc_hsqldb.mk connectivity/Library_ado.mk connectivity/org connectivity/qa connectivity/source cppcanvas/source cui/source dbaccess/qa dbaccess/source desktop/CustomTarget_soffice.mk desktop/Mo dule_desktop.mk desktop/scripts desktop/source desktop/test desktop/unx download embeddedobj/source embedserv/Library_emser.mk embedserv/source eventattacher/source extensions/JunitTest_extensions_unoapi.mk extensions/Library_oleautobridge2.mk extensions/Library_oleautobridge.mk extensions/Library_so_activex.mk extensions/Library_so_activex_x64.mk extensions/Module_extensions.mk extensions/qa extensions/README extensions/source extensions/test external/msm100 external/msm110 external/prj external/rebase filter/Library_filtertracer.mk filter/Module_filter.mk filter/qa filter/source forms/qa forms/source framework/inc framework/qa framework/source i18npool/CppunitTest_i18npool_test_ordinalsuffix.mk i18npool/inc i18npool/Module_i18npool.mk i18npool/qa i18npool/source i18nutil/inc i18nutil/source icon-themes/tango_testing idlc/source instsetoo_native/inc_ooohelppack instsetoo_native/inc_ooolangpack instsetoo_native/inc_openoffice instsetoo_native/inc_sdkoo instsetoo_native/inc_u re javaunohelper/com javaunohelper/test l10ntools/Executable_gsicheck.mk l10ntools/inc l10ntools/source l10ntools/StaticLibrary_transex.mk lcms2/makefile.mk libcdr/Makefile libcdr/makefile.mk libcdr/Module_libcdr.mk libcdr/Package_libcdr.mk libcdr/prj libcdr/StaticLibrary_cdr.mk libcdr/UnpackedTarball_cdr.mk libcmis/boost-win.patch libcmis/libcmis-0.2.3-backports.patch libcmis/libcmis-0.2.3.patch libcmis/Makefile libcmis/makefile.mk libcmis/Module_libcmis.mk libcmis/Package_libcmis.mk libcmis/prj libcmis/StaticLibrary_cmis.mk libcmis/UnpackedTarball_cmis.mk libmspub/Makefile libmspub/makefile.mk libmspub/Module_libmspub.mk libmspub/Package_libmspub.mk libmspub/prj libmspub/StaticLibrary_mspub.mk libmspub/UnpackedTarball_mspub.mk liborcus/liborcus_0.1.0-warnings.patch liborcus/makefile.mk liborcus/prj libpng/configs libpng/libpng-1.5.10.patch libpng/Makefile libpng/makefile.mk libpng/Module_libpng.mk libpng/Package_libpng.mk libpng/prj libpng/StaticLibrary_png.mk libpng/Unpac kedTarball_png.mk Library_merged.mk libvisio/Makefile libvisio/makefile.mk libvisio/Module_libvisio.mk libvisio/Package_libvisio.mk libvisio/prj libvisio/StaticLibrary_visio.mk libvisio/UnpackedTarball_visio.mk libwpd/Makefile libwpd/makefile.mk libwpd/Module_libwpd.mk libwpd/Package_libwpd.mk libwpd/prj libwpd/StaticLibrary_wpd.mk libwpd/UnpackedTarball_wpd.mk libwpg/libwpg-0.2.1-build.patch libwpg/Makefile libwpg/makefile.mk libwpg/Module_libwpg.mk libwpg/Package_libwpg.mk libwpg/prj libwpg/StaticLibrary_wpg.mk libwpg/UnpackedTarball_wpg.mk libwps/Makefile libwps/makefile.mk libwps/Module_libwps.mk libwps/Package_libwps.mk libwps/prj libwps/StaticLibrary_wps.mk libwps/UnpackedTarball_wps.mk Makefile.top Module_tail_build.mk nlpsolver/src nlpsolver/ThirdParty odk/examples offapi/com offapi/type_reference offapi/UnoApi_offapi.mk ooo.lst.in oowintool oox/inc oox/source post_download.in postprocess/rebase python/makefile.mk python/Python-2.6.1-vc12.patch pyuno/source qadevOOo/ Jar_OOoRunner.mk qadevOOo/qa qadevOOo/tests reportbuilder/java reportdesign/source RepositoryExternal.mk RepositoryModule_ooo.mk sal/android sal/CppunitTest_sal_rtl_strings.mk sal/inc sal/osl sal/qa sax/inc sax/source sc/CppunitTest_sc_ucalc.mk sc/inc sc/Library_scfilt.mk scp2/inc scp2/InstallModule_gnome.mk scp2/InstallScript_setup_osl.mk scp2/Module_scp2.mk scp2/source sc/prj scripting/workben sc/source sd/CppunitTest_sd_uimpress.mk sdext/CustomTarget_presenter.mk sdext/Extension_presenter.mk sdext/Module_sdext.mk sdext/source sd/Library_sd.mk sd/source sfx2/inc sfx2/JunitTest_sfx2_unoapi.mk sfx2/qa sfx2/source shell/source slideshow/source smoketest/com solenv/bin solenv/gbuild solenv/inc sot/qa starmath/source stoc/test svl/qa svl/source svtools/source svx/inc svx/source sw/inc sw/qa sw/source sysui/desktop tail_build/prj testtools/qa testtools/source toolkit/source toolkit/test ucb/prj ucb/qa ucb/source ucb/test udkapi/com udkapi/UnoApi_udkapi.mk unotest/Jar_test.mk uno test/source unoxml/qa uui/source vbahelper/inc vbahelper/source vcl/aqua vcl/generic vcl/headless vcl/inc vcl/ios vcl/Library_vcl.mk vcl/Package_inc.mk vcl/qa vcl/source vcl/unx vcl/win wizards/com wizards/source writerfilter/qa writerfilter/source writerperfect/Module_writerperfect.mk writerperfect/prj xmlhelp/source xmlhelp/util xmlscript/inc xmlscript/source xmlscript/test xmlsecurity/workben
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Sat Sep 15 04:26:19 PDT 2012
Rebased ref, commits from common ancestor:
commit cb8ec771795fe1e81695e3a46aa34fcd77aa3c12
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/makefile.mk b/liborcus/makefile.mk
index fd04605..d776ee0 100644
--- a/liborcus/makefile.mk
+++ b/liborcus/makefile.mk
@@ -41,10 +41,18 @@ PATCH_FILES=liborcus_0.1.0-warnings.patch
.IF "$(GUI)$(COM)"=="WNTMSC"
BUILD_DIR=vsprojects/liborcus-static-nozip
+.IF "$(CCNUMVER)" >= "001600000000"
+BUILD_ACTION=\
+ 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
+.ELSE
BUILD_ACTION= \
export BOOST_INCLUDE_DIR=$(OUTDIR)/inc/external && \
export BOOST_LIB_DIR=$(OUTDIR)/lib && \
$(COMPATH)$/vcpackages$/vcbuild.exe liborcus-static-nozip.vcproj "Release|Win32"
+.ENDIF
.ELSE
commit 85ea2b6bda2774f6f080c62a47c9cb7c9f854924
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 39ed587..2db7827 100644
--- a/Library_merged.mk
+++ b/Library_merged.mk
@@ -44,7 +44,6 @@ $(eval $(call gb_Library_use_libraries,merged,\
))
$(eval $(call gb_Library_use_externals,merged,\
- icui18n \
icule \
icuuc \
jpeg \
@@ -116,11 +115,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 4b3fb31..f01fddd 100644
--- a/solenv/gbuild/platform/WNT_INTEL_MSC.mk
+++ b/solenv/gbuild/platform/WNT_INTEL_MSC.mk
@@ -340,6 +340,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,\
@@ -353,6 +360,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 46e5dadd4b19cd02c164afd707f0fb5641d4b900
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 5625854ce8740ab76f210eeb03b1a5bae171c385
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 ba5a51a..41d710d 100644
--- a/sdext/Extension_presenter.mk
+++ b/sdext/Extension_presenter.mk
@@ -141,6 +141,6 @@ $(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))
# vim:set shiftwidth=4 softtabstop=4 expandtab:
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 14b50e0..077ebae 100644
--- a/solenv/gbuild/ExtensionTarget.mk
+++ b/solenv/gbuild/ExtensionTarget.mk
@@ -303,7 +303,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 23c908d926ac716a2f52c7ea7c06c43ed4fe159d
Author: Peter Foley <pefoley2 at verizon.net>
Date: Fri Aug 31 21:45:58 2012 -0400
enable LTO for Visual Studio
Change-Id: I3ac3be0bde5c27c73f7d85da4487eb61e3f587f3
diff --git a/solenv/gbuild/platform/WNT_INTEL_MSC.mk b/solenv/gbuild/platform/WNT_INTEL_MSC.mk
index 9c0fb9f..4b3fb31 100644
--- a/solenv/gbuild/platform/WNT_INTEL_MSC.mk
+++ b/solenv/gbuild/platform/WNT_INTEL_MSC.mk
@@ -194,6 +194,11 @@ gb_CFLAGS_WERROR := -WX -DLIBO_WERROR
gb_CXXFLAGS_WERROR := -WX -DLIBO_WERROR
endif
+ifeq ($(ENABLE_LTO),TRUE)
+gb_CFLAGS += -GL
+gb_CXXFLAGS += -GL
+endif
+
ifeq ($(MERGELIBS),TRUE)
gb_CFLAGS += -DLIBO_MERGELIBS
gb_CXXFLAGS += -DLIBO_MERGELIBS
@@ -355,6 +360,7 @@ $(call gb_Helper_abbreviate_dirs,\
$(if $(filter Executable,$(TARGETTYPE)),$(gb_Executable_TARGETTYPEFLAGS)) \
$(if $(filter YES,$(TARGETGUI)), -SUBSYSTEM:WINDOWS, -SUBSYSTEM:CONSOLE) \
$(if $(filter YES,$(LIBRARY_X64)), -MACHINE:X64, -MACHINE:IX86) \
+ $(if $(filter YES,$(ENABLE_LTO)), -LTCG,) \
$(if $(filter YES,$(LIBRARY_X64)), -LIBPATH:$(OUTDIR)/lib/x64 -LIBPATH:$(COMPATH)/lib/amd64 -LIBPATH:$(WINDOWS_SDK_HOME)/lib/x64 \
$(if $(filter 80,$(WINDOWS_SDK_VERSION)),-LIBPATH:$(WINDOWS_SDK_HOME)/lib/win8/um/x64,),) \
$(T_LDFLAGS) \
commit cb1327683cb48f25a0730e7dacf0763e52a2ecc4
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 bbea1db..bef35be 100644
--- a/configure.in
+++ b/configure.in
@@ -3193,6 +3193,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 af48708..f30f337 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 c3637be5f42927b00ba70568e2a6d6dea4e5d8b7
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 71e786c..cc7f84e 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -390,6 +390,7 @@ export MOZ_FLAVOUR=@MOZ_FLAVOUR@
export MOZ_INC=@MOZ_INC@
export MOZ_LIB=@MOZ_LIB@
export MOZ_LIB_XPCOM=@MOZ_LIB_XPCOM@
+export MSMVER=@MSMVER@
export MSPUB_CFLAGS=@MSPUB_CFLAGS@
export MSPUB_LIBS=@MSPUB_LIBS@
export MSPUB_TARBALL=@MSPUB_TARBALL@
diff --git a/configure.in b/configure.in
index 659d8c9..bbea1db 100644
--- a/configure.in
+++ b/configure.in
@@ -3099,12 +3099,15 @@ if test "$_os" = "WINNT"; then
if test "$CCNUMVER" -ge "001700000000"; then
COMEX=14
MSVSVER=2012
+ MSMVER=110
elif test "$CCNUMVER" -ge "001600000000"; then
COMEX=13
MSVSVER=2010
+ MSMVER=100
elif test "$CCNUMVER" -ge "001500000000"; then
COMEX=12
MSVSVER=2008
+ MSMVER=90
else
AC_MSG_ERROR([Compiler too old. Use Microsoft Visual Studio 2008 or 2010.])
fi
@@ -3184,6 +3187,7 @@ if test "$_os" = "WINNT"; then
fi
fi
AC_SUBST(COMEX)
+AC_SUBST(MSMVER)
PathFormat "$MSPDB_PATH"
MSPDB_PATH="$formatted_path"
AC_SUBST(SHOWINCLUDES_PREFIX)
@@ -5525,10 +5529,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"$MSMVER"_CRT_x86.msm])
+ if ./oowintool --msvc-find-msms; then
AC_MSG_RESULT([yes])
- SCPDEFS="$SCPDEFS -DWITH_VC100_REDIST"
+ SCPDEFS="$SCPDEFS -DWITH_VC"$MSMVER"_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..8eee9d1 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"$MSMVER" ; 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"$MSMVER" ; 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 61016b29d7688b7a812307c31fee95f0d9ccc475
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 675bdacf689ad0548b32d7d473911d887424750f
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 fd27924..71e786c 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -459,6 +459,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 8227adb..659d8c9 100644
--- a/configure.in
+++ b/configure.in
@@ -8946,6 +8946,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 c0ac2f7b5024868652726bdb04c710467f312035
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 6774bec..8227adb 100644
--- a/configure.in
+++ b/configure.in
@@ -12405,8 +12405,10 @@ else
pathmunge "$MSPDB_PATH" "before"
if test "$CL_X64" = "TRUE"; 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 16e3548194f7e9594a9cccc3708b713c5c5d7653
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 1ee5a51..17d70a2 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 59329f19d5fe879a547d01986603691174a0d826
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/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 298b381..96464cc 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 @@ void SAL_CALL uno_initEnvironment( uno_Environment * uno_cli_env )
//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();
}
//##################################################################################################
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());
@@ -1058,7 +1058,7 @@ void Bridge::map_to_uno(void * uno_data, System::Object* cli_data,
sal_Int32 nMembers = comp_td->nMembers;
boolean bException= false;
- System::Type* cliType = NULL;
+ System::Type^ cliType = nullptr;
if (cli_data)
cliType = cli_data->GetType();
@@ -1084,10 +1084,10 @@ void Bridge::map_to_uno(void * uno_data, System::Object* cli_data,
__s = mapUnoString(comp_td->ppMemberNames[nPos]);
arFields = cliType != NULL ? cliType->GetFields() : NULL;
#endif
- System::Object* val= NULL;
- if (cli_data != NULL)
+ System::Object^ val= nullptr;
+ if (cli_data != nullptr)
{
- sr::FieldInfo* aField= cliType->GetField(
+ sr::FieldInfo^ aField= cliType->GetField(
mapUnoString(comp_td->ppMemberNames[nPos]));
// special case for Exception.Message property
// The com.sun.star.uno.Exception.Message field is mapped to the
@@ -1097,9 +1097,9 @@ void Bridge::map_to_uno(void * uno_data, System::Object* cli_data,
rtl::OUString usMessageMember(RTL_CONSTASCII_USTRINGPARAM("Message"));
if (usMessageMember.equals(comp_td->ppMemberNames[nPos]))
{
- sr::PropertyInfo* pi= cliType->GetProperty(
+ sr::PropertyInfo^ pi= cliType->GetProperty(
mapUnoString(comp_td->ppMemberNames[nPos]));
- val= pi->GetValue(cli_data, NULL);
+ val= pi->GetValue(cli_data, nullptr);
}
else
{
@@ -1120,75 +1120,75 @@ void Bridge::map_to_uno(void * uno_data, System::Object* cli_data,
bool bDefault = ((struct_td != NULL
&& struct_td->pParameterizedTypes != NULL
&& struct_td->pParameterizedTypes[nPos] == sal_True
- && val == NULL)
- || cli_data == NULL) ? true : false;
+ && val == nullptr)
+ || cli_data == nullptr) ? true : false;
switch (member_type->eTypeClass)
{
case typelib_TypeClass_CHAR:
if (bDefault)
*(sal_Unicode*) p = 0;
else
- *(sal_Unicode*) p = *__try_cast<System::Char*>(val);
+ *(sal_Unicode*) p = *safe_cast<System::Char^>(val);
break;
case typelib_TypeClass_BOOLEAN:
if (bDefault)
*(sal_Bool*) p = sal_False;
else
- *(sal_Bool*) p = *__try_cast<System::Boolean*>(val);
+ *(sal_Bool*) p = *safe_cast<System::Boolean^>(val);
break;
case typelib_TypeClass_BYTE:
if (bDefault)
*(sal_Int8*) p = 0;
else
- *(sal_Int8*) p = *__try_cast<System::Byte*>(val);
+ *(sal_Int8*) p = *safe_cast<System::Byte^>(val);
break;
case typelib_TypeClass_SHORT:
if (bDefault)
*(sal_Int16*) p = 0;
else
- *(sal_Int16*) p = *__try_cast<System::Int16*>(val);
+ *(sal_Int16*) p = *safe_cast<System::Int16^>(val);
break;
case typelib_TypeClass_UNSIGNED_SHORT:
if (bDefault)
*(sal_uInt16*) p = 0;
else
- *(sal_uInt16*) p = *__try_cast<System::UInt16*>(val);
+ *(sal_uInt16*) p = *safe_cast<System::UInt16^>(val);
break;
case typelib_TypeClass_LONG:
if (bDefault)
*(sal_Int32*) p = 0;
else
- *(sal_Int32*) p = *__try_cast<System::Int32*>(val);
+ *(sal_Int32*) p = *safe_cast<System::Int32^>(val);
break;
case typelib_TypeClass_UNSIGNED_LONG:
if (bDefault)
*(sal_uInt32*) p = 0;
else
- *(sal_uInt32*) p = *__try_cast<System::UInt32*>(val);
+ *(sal_uInt32*) p = *safe_cast<System::UInt32^>(val);
break;
case typelib_TypeClass_HYPER:
if (bDefault)
*(sal_Int64*) p = 0;
else
- *(sal_Int64*) p = *__try_cast<System::Int64*>(val);
+ *(sal_Int64*) p = *safe_cast<System::Int64^>(val);
break;
case typelib_TypeClass_UNSIGNED_HYPER:
if (bDefault)
*(sal_uInt64*) p = 0;
else
- *(sal_uInt64*) p= *__try_cast<System::UInt64*>(val);
+ *(sal_uInt64*) p= *safe_cast<System::UInt64^>(val);
break;
case typelib_TypeClass_FLOAT:
if (bDefault)
*(float*) p = 0.;
else
- *(float*) p = *__try_cast<System::Single*>(val);
+ *(float*) p = *safe_cast<System::Single^>(val);
break;
case typelib_TypeClass_DOUBLE:
if (bDefault)
*(double*) p = 0.;
else
- *(double*) p = *__try_cast<System::Double*>(val);
+ *(double*) p = *safe_cast<System::Double^>(val);
break;
default:
{ // ToDo enum, should be converted here
@@ -1205,7 +1205,7 @@ void Bridge::map_to_uno(void * uno_data, System::Object* cli_data,
buf.appendAscii(RTL_CONSTASCII_STRINGPARAM("[map_to_uno():"));
if (cliType)
{
- buf.append(mapCliString(cliType->get_FullName()));
+ buf.append(mapCliString(cliType->FullName));
buf.appendAscii(RTL_CONSTASCII_STRINGPARAM("."));
buf.append(comp_td->ppMemberNames[nPos]);
buf.appendAscii(RTL_CONSTASCII_STRINGPARAM(" "));
@@ -1213,14 +1213,14 @@ void Bridge::map_to_uno(void * uno_data, System::Object* cli_data,
buf.append(e.m_message);
throw BridgeRuntimeError(buf.makeStringAndClear());
}
- catch (System::InvalidCastException* )
+ catch (System::InvalidCastException^ )
{
bException= true;
OUStringBuffer buf( 256 );
buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("[map_to_uno():") );
if (cliType)
{
- buf.append(mapCliString(cliType->get_FullName()));
+ buf.append(mapCliString(cliType->FullName));
buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("."));
buf.append(comp_td->ppMemberNames[nPos]);
}
@@ -1260,10 +1260,10 @@ void Bridge::map_to_uno(void * uno_data, System::Object* cli_data,
auto_ptr< rtl_mem > seq;
- System::Array* ar = NULL;
- if (cli_data != NULL)
+ System::Array^ ar = nullptr;
+ if (cli_data != nullptr)
{
- ar = __try_cast<System::Array*>(cli_data);
+ ar = safe_cast<System::Array^>(cli_data);
sal_Int32 nElements = ar->GetLength(0);
try
@@ -1272,74 +1272,74 @@ void Bridge::map_to_uno(void * uno_data, System::Object* cli_data,
{
case typelib_TypeClass_CHAR:
seq = seq_allocate(nElements, sizeof (sal_Unicode));
- sri::Marshal::Copy(__try_cast<System::Char[]>(cli_data), 0,
- & ((uno_Sequence*) seq.get())->elements, nElements);
+ sri::Marshal::Copy(safe_cast<array<System::Char>^>(cli_data), 0,
+ IntPtr(& ((uno_Sequence*) seq.get())->elements), nElements);
break;
case typelib_TypeClass_BOOLEAN:
seq = seq_allocate(nElements, sizeof (sal_Bool));
- sri::Marshal::Copy(__try_cast<System::Boolean[]>(cli_data), 0,
- & ((uno_Sequence*) seq.get())->elements, nElements);
+ sri::Marshal::Copy(safe_cast<array<System::Char>^>(cli_data), 0,
+ IntPtr(& ((uno_Sequence*) seq.get())->elements), nElements);
break;
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list