diff options
author | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2018-11-13 01:24:40 -0500 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2018-12-07 11:52:31 +0100 |
commit | ad5fb8798b295e9ad706a3836ffb53a0630f752f (patch) | |
tree | 35cdee5e43071fa1788fb6b60eb25623ed0c0b1b /desktop/qa/desktop_lib | |
parent | 2bfc4494727d347d6ae8e0c6a68dee39a2dda040 (diff) |
LOK: Fix API for renderShapeSelection
Unlike C++, C doesn't allow reference-to-pointer types,
and we do have C code that wouldn't compile with ref-to-ptr.
Had to change to ptr-to-ptr, which is the proper way of
having output arrays.
For the same reason, we cannot use new/delete, rather we
must use malloc/free.
Another (lesser) issue was that we used the renderShapeSelection
API to echo back an array we give it as prefix. This made
the API unecessarily complex (in undocumented ways) and
forced the implementation to both worry about user-data
and managing the input memory. This logic is best moved
to the client and the API simply returns the output data.
Speaking of returning data, the API now returns the size
of the array it allocated and wrote to, so the client
can do a simple check on the return value directly.
Change-Id: Ida216c10d5b37efd1e0861e26b72cabb25c568e6
Diffstat (limited to 'desktop/qa/desktop_lib')
-rw-r--r-- | desktop/qa/desktop_lib/test_desktop_lib.cxx | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx index 81a51de8cde9..5bf343b8c825 100644 --- a/desktop/qa/desktop_lib/test_desktop_lib.cxx +++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx @@ -2459,6 +2459,7 @@ void DesktopLOKTest::testInsertCertificatePEM() comphelper::LibreOfficeKit::setActive(false); } + namespace { constexpr size_t documentClassOffset(int i) |