diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2020-01-01 13:54:05 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2020-01-01 19:21:50 +0100 |
commit | 4abb191916916c7003deedcfdcf46287faccaf01 (patch) | |
tree | e3cedd8eaeb9457cf08a68a832e540f8ff3bc44b /basic/source/inc/filefmt.hxx | |
parent | 83955c30405b086fb9b753f2734827c63e951c91 (diff) |
tdf#57113: store UTF-16 stringpool data after legacy 1-byte data
This allows to correctly store and read Unicode strings used in
password-protected libraries. The additional data stored after all
legacy data of the stringpool record (after a magic number to mark
its presence), and so is invisible for older versions of program:
this allows to keep the version of data and backward compatibility.
Of course, older versions will only see legacy data, with broken
Unicode strings; and password-protected libraries edited and saved
in older versions will not contain Unicode data.
read_uInt16s_ToOUString and write_uInt16s_FromOUString are used
for correct handling of UTF-16 strings on LE/BE systems.
Change-Id: I990bc27b5cc7d499e71c43d45b7f263af41911e7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86065
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'basic/source/inc/filefmt.hxx')
-rw-r--r-- | basic/source/inc/filefmt.hxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/basic/source/inc/filefmt.hxx b/basic/source/inc/filefmt.hxx index c4126907a671..eb1990087d9e 100644 --- a/basic/source/inc/filefmt.hxx +++ b/basic/source/inc/filefmt.hxx @@ -41,6 +41,8 @@ class SvStream; // Version 12: aoo#64377 increase code size that basic can handle // tdf#75973 support user defined types B_USERTYPES in password protected macros // Version 13: tdf#94617 store methods nStart information greater than sal_Int16 limit +// tdf#57113 store UTF-16 strings after legacy 1-byte-encoded strings in pool (no +// version number bump for backward compatibility; relies on magic number) // #define B_LEGACYVERSION 0x00000011 |