summaryrefslogtreecommitdiff
path: root/sc/inc
diff options
context:
space:
mode:
authorAttila Szűcs <szucs.attila3@nisz.hu>2020-11-30 15:18:09 +0100
committerLászló Németh <nemeth@numbertext.org>2020-12-03 14:00:27 +0100
commitf85d860ccbebd99bc128218148e2992c9415f221 (patch)
tree6a6f8d6f8ea20da7631029e681fc7febba6fec97 /sc/inc
parent520a2819fa6030ec11175d82dd42cfcdb2e92634 (diff)
tdf#87973 XLSX export: fix lost file names in modified links
Calculate new indexes for external reference files to export it to xlsx. These indexes are calculated only temporary, only for exporting. Much better solution would be to change the indexes permanently, but the original indexes are stored so many places in the code (for example it is stored in cells formula tokens converted to string). So it would be a much bigger refactoring to be able to delete an external reference permanently... even just to reorder the indexes, require to modify a lot of code. Co-authored-by: Tibor Nagy (NISZ) Change-Id: If9254f6e62ec739e2b159a066ada7efdbceb3ad8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106895 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sc/inc')
-rw-r--r--sc/inc/externalrefmgr.hxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/sc/inc/externalrefmgr.hxx b/sc/inc/externalrefmgr.hxx
index fd07fa0e657a..2669781e9caa 100644
--- a/sc/inc/externalrefmgr.hxx
+++ b/sc/inc/externalrefmgr.hxx
@@ -598,6 +598,13 @@ public:
const OUString* getExternalFileName(sal_uInt16 nFileId, bool bForceOriginal = false);
/**
+ * Reindex external file references to skip unused files, if skipping is enabled.
+ */
+ sal_uInt16 convertFileIdToUsedFileId(sal_uInt16 nFileId);
+ void setSkipUnusedFileIds(std::vector<sal_uInt16>& pExternFileIds);
+ void disableSkipUnusedFileIds();
+
+ /**
* Get all cached external file names as an array. Array indices of the
* returned name array correspond with external file ID's.
*/
@@ -845,6 +852,9 @@ private:
*/
bool mbUserInteractionEnabled:1;
+ bool mbSkipUnusedFileIds = false;
+ std::vector<sal_uInt16> maConvertFileIdToUsedFileId;
+
bool mbDocTimerEnabled:1;
AutoTimer maSrcDocTimer;