diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2020-11-16 10:28:40 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2020-11-16 10:00:02 +0100 |
commit | 600dfc9d39883b4150b7d773a5a2de483a4c94b6 (patch) | |
tree | cae0cb4999aa98685d2275f257823570a5e7e1dc /svtools/source/dialogs | |
parent | f57b158701fb082ad9016819a2af7cdb13e6fa30 (diff) |
tdf#138229: make OleObjectDescriptor match OBJECTDESCRIPTOR on _WIN64
... broken since tools::Long is 64-bit on that platform, and thus
Point and Size are not equal to POINTL and SIZEL.
Change-Id: I8cf53f778ece89415687c6966d8e079fb0cf6189
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105910
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'svtools/source/dialogs')
-rw-r--r-- | svtools/source/dialogs/insdlg.cxx | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/svtools/source/dialogs/insdlg.cxx b/svtools/source/dialogs/insdlg.cxx index 4c0701406ed8..4698d4f186c8 100644 --- a/svtools/source/dialogs/insdlg.cxx +++ b/svtools/source/dialogs/insdlg.cxx @@ -34,6 +34,14 @@ using namespace ::com::sun::star; +#if defined _WIN32 +#include <prewin.h> +#include <oleidl.h> +#include <postwin.h> +#else +typedef Size SIZEL; +typedef Point POINTL; +#endif // this struct conforms to the Microsoft // OBJECTDESCRIPTOR -> see oleidl.h @@ -46,13 +54,22 @@ struct OleObjectDescriptor sal_uInt32 cbSize; ClsId clsid; sal_uInt32 dwDrawAspect; - Size sizel; - Point pointl; + SIZEL sizel; + POINTL pointl; sal_uInt32 dwStatus; sal_uInt32 dwFullUserTypeName; sal_uInt32 dwSrcOfCopy; }; +#if defined _WIN32 +static_assert(sizeof(OleObjectDescriptor) == sizeof(OBJECTDESCRIPTOR)); +// check the two fields that we use here +static_assert(offsetof(OleObjectDescriptor, dwFullUserTypeName) + == offsetof(OBJECTDESCRIPTOR, dwFullUserTypeName)); +static_assert(offsetof(OleObjectDescriptor, dwSrcOfCopy) + == offsetof(OBJECTDESCRIPTOR, dwSrcOfCopy)); +#endif + } /********************** SvObjectServerList ******************************** |