diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2023-11-27 18:07:30 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2023-11-29 06:23:33 +0100 |
commit | 92e7f28f9aff78907bad030be80a9ea9452a3ddc (patch) | |
tree | a2ba933ad3ac9f1191ad9fc768903a57dc278c14 /include/sfx2 | |
parent | 01a02ee7f1dbe7501a89b41e62599fba6a8b33f3 (diff) |
Related: tdf#104718 Use package repair request and behavior
Same as in other places handling that:
* SfxBaseModel::load (sfx2/source/doc/sfxbasemodel.cxx);
* StorageFilterDetect::detect (filter/source/storagefilterdetect/filterdetect.cxx);
* TypeDetection::impl_detectTypeFlatAndDeep (filter/source/config/cache/typedetection.cxx)
In these cases, the same handler is used (RequestPackageReparation);
when the user approves an attempt to repair the package, the media
descriptor gets "RepairPackage" property set to true (this produces
a "(repaired document)" appended to the document title); also, the
document is opened in template mode (so saving it doesn't simply
overwrite the original broken document, but asks for a new name).
Re-using this logic, and checking if the "RepairPackage" is already
set, allows to unify the behavior, and to avoid duplicate warnings
when the user already approved repair of a broken package.
The request won't contain the details of the XML problem; but it
will be shown if rejected anyway, so OK for the diagnostics.
Change-Id: Ic997f89272212227479d14236f5e7788298a904a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160001
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'include/sfx2')
-rw-r--r-- | include/sfx2/objsh.hxx | 2 | ||||
-rw-r--r-- | include/sfx2/strings.hrc | 3 |
2 files changed, 1 insertions, 4 deletions
diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx index fd23ae4af437..20e497b6e4af 100644 --- a/include/sfx2/objsh.hxx +++ b/include/sfx2/objsh.hxx @@ -475,7 +475,7 @@ public: void AvoidRecentDocs(bool bAvoid) { mbAvoidRecentDocs = bAvoid; } /// On first error ask user if import should continue; return saved answer. - bool IsContinueImportOnFilterExceptions(std::u16string_view aErrMessage); + bool IsContinueImportOnFilterExceptions(); // Transfer IFace bool IsAbortingImport() const; diff --git a/include/sfx2/strings.hrc b/include/sfx2/strings.hrc index 300e1036169b..d28fa1cc22b7 100644 --- a/include/sfx2/strings.hrc +++ b/include/sfx2/strings.hrc @@ -70,9 +70,6 @@ #define STR_QMSG_SEL_FOLDER_DELETE NC_("STR_QMSG_SEL_FOLDER_DELETE", "Do you want to delete the selected category?") #define STR_QMSG_TEMPLATE_OVERWRITE NC_("STR_QMSG_TEMPLATE_OVERWRITE", "A template named $1 already exists in $2. Do you want to overwrite it?") #define STR_QMSG_SEL_TEMPLATE_DELETE NC_("STR_QMSG_SEL_TEMPLATE_DELETE", "Do you want to delete the selected templates?") -#define STR_QMSG_ERROR_OPENING_FILE NC_("STR_QMSG_ERROR_OPENING_FILE", "An error occurred during opening the file. This may be caused by incorrect file contents.\n") -#define STR_QMSG_ERROR_OPENING_FILE_DETAILS NC_("STR_QMSG_ERROR_OPENING_FILE_DETAILS", "The error details are:\n") -#define STR_QMSG_ERROR_OPENING_FILE_CONTINUE NC_("STR_QMSG_ERROR_OPENING_FILE_CONTINUE", "\nProceeding with import may cause data loss or corruption, and application may become unstable or crash.\n\nDo you want to ignore the error and attempt to continue loading the file?") #define STR_HELP_WINDOW_TITLE NC_("STR_HELP_WINDOW_TITLE", "%PRODUCTNAME Help") #define STR_HELP_BUTTON_INDEX_ON NC_("STR_HELP_BUTTON_INDEX_ON", "Show Navigation Pane") |