summaryrefslogtreecommitdiff
path: root/include/sfx2/docfile.hxx
AgeCommit message (Collapse)Author
2024-02-02Add SfxMedium::IsRepairPackageMike Kaganski
Change-Id: Id100e5a85a0504ab4fb80f75a168a4fd31a54119 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162924 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-12-07tdf#105844 package,sfx2: wholesome ODF package wrapping encryptionMichael Stahl
Redo the ODF encryption by storing an ODF package and wrapping it as a stream "encrypted-package" in another ODF package, such that there is only one encrypted stream - this requires only one KDF computation. * This is only enabled in Experimental mode for now. * Avoid storing unencrypted data in the pTempFile of SfxMedium, as it is usually created in the same directory as the target file, which may be on a network share or similar less trusted location. * SfxMedium::SetEncryptionDataToStorage_Impl() should just set an error status if it fails (how can it fail anyway) * when loading a document, SfxDocPasswordVerifier extracts an encrypted inner package (by calling SfxMedium::TryEncryptedInnerPackage()) * SfxMedium::GetStorage() automatically decrypts an encrypted inner storage and sets it as the SfxMedium's xStorage * when storing a document, SfxObjectShell::SaveTo_Impl() creates the wrapped storages * One challenge is to keep the macro/scripting signature working; this can only be put in the inner storage, whereas the document signature should continue to be on the outer storage; also it must use a Zip storage, to see the "META-INF" directory. This needs a new SfxMedium::GetScriptingStorageToSign_Impl() and changes in SfxMedium::SignContents_Impl(). Change-Id: Ibfee36ce3a9cd030f2aa2ce1484b6d001cba2389 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160401 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-10-03replace ErrorInfo with simpler mechanismNoel Grandin
Instead of returning ErrCode class everywhere, return a new class ErrrCodeMsg, which combines an ErrCode with the other parameters that are used to control the error reporting. I do not change everything that uses ErrCode here, I started from SfxBaseController/SfxMedium and worked outwards. This change serves two purposes (1) Replace the extremely whacky ErrorInfo mechanism we were using to smuggle information into the error handler reporting mechanism with a very straightforward approach of just combining it into the error class. (2) Allow us to capture the source location that produced the error, which makes debugging the source of a problem soooo much easier. Change-Id: I978b8f00c9851b41a216c7ebdef2ef94251d5519 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157440 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-09-29rename SfxMedium::GetError -> GetErrorIgnoreWarningNoel Grandin
to distinguish it from the very similar GetErrorCode() Change-Id: I937e3dcfd6ce116046ac7b1c98cf79479b322f1d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157388 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-07-28SfxMedium::GetItemSet never returns nullptrMike Kaganski
Change-Id: Ibfc98a49022aa09ebf5315e5d3328308c1e51d66 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154997 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-07-18tdf#68565 autosave: add option to store backup in document's folderJustin Luth
Creating a backup copy became the default in LO 7.6. Allow the user to choose whether to store this previous version of the file beside the original file (in the same folder). The historical (and still the default) action is to store it in a special backup folder instead. The problem with the backup folder is that it overwrites files that happen to have the same name (because the originals reside in different directories), which is not uncommon. Adding this option allows the user to overcome that limitation. However, I do not want this new option to become the default, because it effectively doubles the number of documents stored in the document folder. I think that is very messy, and previous versioning is best left to dedicated backup tools - which would not appreciate doubling the number of documents they preserve. Plus I've worked with enough novice users to know that people are easily confused when multiple documents have (essentially) the same name. Change-Id: I503f656af91807019587e3d7b0d82b661f1eb437 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154489 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com>
2022-12-01sc: move test back where it belongsXisco Fauli
This test was moved from sc/qa/unit/subsequent_filters_test2.cxx to sc/qa/unit/filters-test.cxx in ad40ad91c5400391a0848832e91c596be8fbd811 "CppunitTest_sc_subsequent_filters_test2: inherit from UnoApiXmlTest". As the commit message says: I couldn't find a way to test testTooManyColsRows, move it to sc/qa/unit/filters-test.cxx for the time being The problem is that using loadFromDestkop resets the Error in sfx2/source/doc/sfxbasemodel.cxx:2005 - m_pData->m_pObjectShell->ResetError(); so add a way to log the WarningError in SfxMedium Change-Id: Ieda9bdc9de856b75d4b162248da41d637305e28d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143506 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-09-18use more string_view in utl::TempFileNoel Grandin
Change-Id: I151c66479053b9b5b7699a4938a622b4320aeaa0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140104 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-29use more string_view in INetURLObjectNoel Grandin
Change-Id: I4462f7cf4740fa4d1b129d76a0775f4250f41bbd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133555 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-10use more string_viewNoel Grandin
found by tweaking the loplugin:stringview and making it whitelist getLength Change-Id: Ic15d3703d1fb07658e99e1db1c89e2fa5bc70c19 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132771 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-02loplugin:stringviewparam convert methods using indexOfNoel Grandin
.. and lastIndexOf, which convert to find and rfind Change-Id: I6c4156cf904774c0d867f85a4c2785dba7593f62 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132445 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-07loplugin:unusedmethodsNoel Grandin
Change-Id: Ic1ba90447575278d854af85312271c41766b776b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126422 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-05use more DECL_DLLPRIVATE_STATIC_LINKNoel Grandin
to avoid unnecessarily exporting symbols Change-Id: I224848cea217977088fe0643511660a7c99b7277 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124733 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-18loplugin:passstuffbyrefNoel Grandin
Change-Id: I4f01eb3842ef198f02af274f54afb2760c820a4b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120655 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-27tdf#47065 Add new file open UI options and implement a new threadMatt K
Add new UI options when opening a locked or non-writeable document to allow the user to be notified when such a document becomes editable . If the user selects "Notify", then that document is added to a list of open documents to be checked by a thread every 60 seconds for read/write access and whether lock file is available/obtainable. If access is allowed for a document, then show UI dialog to the user asking to Reload that document. If Reload is selected by the user then that document is reloaded with read/write access. The checking thread is spawned only once no matter how many "Notify" documents there are. The thread is spawned if not already running when a new "Notify" document is opened, and it terminates when all "Notify" documents have been closed or the application terminates. Also update badstatics clang plugin to ignore new global variables introduced. Change-Id: I7555ce6f5df79c2c87216e0129ef3b2883c7d921 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111654 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-01-26loplugin:passstuffbyrefNoel
Change-Id: I330e0ab6c9955939dad313f9d472f93e39dbd313 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109924 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-06-25sd signature line: pass the model down to xmlsecurityMiklos Vajna
So it can avoid SfxObjectShell::Current(), which is only correct when a single document is open. Also add an sfx2::DigitalSignatures interface so this can be done without UNO API changes. Change-Id: Ie81996b8f1e8851975b27c43a53f9d23e316004e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97116 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-12-17sw reqif-xhtml export: add a new RTFOLEMimeType parameterMiklos Vajna
This is similar to commit e0f20211a8048a87b078aa4cf0f28c0c847487ad (sw reqif-xhtml import: add a new AllowedRTFOLEMimeTypes parameter, 2019-12-16), except that was for the import and this is for the import. The situation was similar, SfxBaseModel::impl_store() still had the custom store parameters, but later functions lost it, so at the end OutHTML_FrameFormatOLENodeGrf() in the sw HTML export could not respect it. Fix the problem in a similar way, so the SfxMedium instance created for the duration of the export provides the custom options via SfxMedium::GetArgs(). Change-Id: I71d2c7920f42d98133f345703cfdfd50f0e8550c Reviewed-on: https://gerrit.libreoffice.org/85321 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-12-16sw reqif-xhtml import: add a new AllowedRTFOLEMimeTypes parameterMiklos Vajna
The HTML import is an old-style filter, so it has no XFilter implementation where filter() would get custom parameters out of the box. One way would be to fix by adding one more entry to the aFormalArgs table under sfx2/, but doing that with a random parameter of a random import filter feels dirty. So instead make SfxMedium store all arguments as-is, this way accessing other keys is as easy to accessing the already available FilterOptions (string) key. Regarding the actual filter change, don't require "text/rtf" as a mime type for embedded objects in the reqif XHTML import, so that in case the file has e.g. application/rtf, then that works as well. In case an (UNO) client wants to still limit the accepted set of MIME types, that's possible via the new parameter. Change-Id: Ia60da44d692f550d8ad5bbf374171cac67d9e04f Reviewed-on: https://gerrit.libreoffice.org/85229 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-11-28tdf#128898 import text from file with text-decode failedNoel Grandin
regression from commit 8f6f9e4217d03d874fb1ce391730a1c893ab6844 tdf#127958 crash adding 2 or more files into writer master document just make SfxMedium use shared_ptr, rather than the sometimes yes, sometimes no, ownership. Change-Id: I77559e9f766d84aca0f9dc0bd1b856c69f0f62f1 Reviewed-on: https://gerrit.libreoffice.org/83930 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-29loplugin:finalclasses sfx2Noel Grandin
Change-Id: I77330d53adb5c6ec66750e57fdc539353b4c9725 Reviewed-on: https://gerrit.libreoffice.org/81657 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-21Fix parameter nameSamuel Mehrbrodt
Change-Id: Ic82e0806c4654dedf615e12ddbd000cc709527e8 Reviewed-on: https://gerrit.libreoffice.org/81199 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-08-27loplugin:constmethod in sfx2Noel Grandin
Change-Id: Ic129a8e136dc3f3b0a36fdb83e7aa71027ada59a Reviewed-on: https://gerrit.libreoffice.org/78190 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-05Show who has locked the document when reopening a read-only documentMike Kaganski
Pass the locking data from SfxMedium::LockOrigFileOnDemand, to allow clients to show it themselves when required. Change-Id: I6afe46a1896e1b60771c080efa2f58794dbed8a6 Reviewed-on: https://gerrit.libreoffice.org/75113 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-06-03tdf#67538 XTypeDetection::queryTypeByDescriptor poor performance, part2Noel Grandin
SfxMedium was creating a temporary file and copying the input file, when CloseInStream_Impl was called from the destructor. Very very bad for performance. This is specifically fixing the performance of queryTypeByDescriptor when called from a basic macro on a local test file. This takes my test macro from 16.1s to 9s. Change-Id: If52f8e0587c7b11666893f6cb79b3180d45cce43 Reviewed-on: https://gerrit.libreoffice.org/73375 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-25tdf#42949 Fix IWYU warnings in include/sfx2/[a-D]*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I444cb71bc3d045072a4b1f9eed279ed7e425a0d4 Reviewed-on: https://gerrit.libreoffice.org/69481 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-02-14weld DigitalSignaturesDialogCaolán McNamara
Change-Id: I197f4805558b07aeb9e66734d0fb5c250c41ad3e Reviewed-on: https://gerrit.libreoffice.org/67796 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-12-18Simplify ShowLockedDocumentDialog argument listMike Kaganski
No need to pass file URL explicitly - it's available as GetURLObject(). commit 607b80ca3cddc239a35580470944a438ce144fc8 follow-up. Change-Id: I6a2ceb6d3ae78c277f40215082af22112f9e2d27 Reviewed-on: https://gerrit.libreoffice.org/65300 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-12-08Clean up LIBO_INTERNAL_ONLY uses of SAL_WARN_UNUSED_RESULTStephan Bergmann
Change-Id: I98b2d90c8345f07010f6defd82557188d5cd35c7 Reviewed-on: https://gerrit.libreoffice.org/64808 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-12-04tdf#34171: check foreign lockfiles to tell who has locked documentMike Kaganski
MS Office (Word/Excel/PowerPoint) lockfiles are supported now. Note that Excel does *not* create lockfiles for pre-OOXML files. This changes osl_openFile implementation on Windows, to treat osl_File_OpenFlag_NoLock to also include FILE_SHARE_DELETE flag for CreateFileW. This is required to allow opening files created with FILE_FLAG_DELETE_ON_CLOSE flag, such as Excel's owner files. The shange should be consistent with the overall meaning of the osl_File_OpenFlag_NoLock to not impose any locking constraints to the file being opened. Change-Id: I7b99012f4bd60ab3821fb91d5166a286031b7e93 Reviewed-on: https://gerrit.libreoffice.org/64496 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-10-28lokit: add funct. to insert, sign and verify signatureTomaž Vajngerl
A lot of signing code paths trigger a GUI dialog (to select the certificate for example) which aren't acceptable when triggering through the LOKit. This code paths needed to be duplicated and reworked to not trigger any GUI action. Change-Id: I2f0d6038fb1bcd00adcdf86e432f9df8858cc21c Reviewed-on: https://gerrit.libreoffice.org/61780 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-09-11loplugin:unusedfieldsNoel Grandin
Change-Id: I876183559a7d9f1e6d914fbf37d7ffe91459144e Reviewed-on: https://gerrit.libreoffice.org/60278 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-06clang-tidy performance-unnecessary-value-paramNoel Grandin
Change-Id: I69247498e13331f6ef84afeb242479f8fb1178a8 Reviewed-on: https://gerrit.libreoffice.org/60068 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-08loplugin:useuniqueptr in SfxApplication::LoadTemplate and SfxMediumNoel Grandin
pass SfxItemSet around by std::unique_ptr Change-Id: I54da96d8df224f7c4f2fb9ebf06ed32d479298e7 Reviewed-on: https://gerrit.libreoffice.org/58649 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-30loplugin:returnconstant in sfx2Noel Grandin
Change-Id: I9a41a2b53669bebfca573fef8d0d755e4621ce37 Reviewed-on: https://gerrit.libreoffice.org/58333 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-28loplugin:unusedmethodsNoel Grandin
Change-Id: I64df1f467986b3d70c058adff289a6dd8f00fb20 Reviewed-on: https://gerrit.libreoffice.org/54821 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-22tdf#83877 Use Signer comments as signature descriptionSamuel Mehrbrodt
Change-Id: Ia9f18addeee9cf86989c873419113ddbd07c219f Reviewed-on: https://gerrit.libreoffice.org/54551 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2018-05-22tdf#83877 Add valid/invalid images to signaturesSamuel Mehrbrodt
Change-Id: I958c1bad2f32383ebaaeb7d42c761f0d1dfefc35 Reviewed-on: https://gerrit.libreoffice.org/54513 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2018-05-22Don't pass ODF version, just retrieve it directlySamuel Mehrbrodt
Change-Id: I19ff42c348515b17dac17abe750ee03ca53efcbf Reviewed-on: https://gerrit.libreoffice.org/54483 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2018-05-22Rename parameter bScriptingContent -> bSignScriptingContentSamuel Mehrbrodt
Change-Id: I227e59417719625a9752e727060f5e4f5094092d Reviewed-on: https://gerrit.libreoffice.org/54479 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2018-05-18tdf#83877 Write SignatureLineId to ODF & OOXML signaturesSamuel Mehrbrodt
Change-Id: I483a3b7895cdcb10ef9d6dacf167ed0f8db7e723 Reviewed-on: https://gerrit.libreoffice.org/54432 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2018-05-15Sign Signature LineSamuel Mehrbrodt
This adds a new context menu entry "Sign Signature Line" to signature lines. You can directly sign the document from there. Still missing is the updating of the graphic to reflect the valid/invalid signature state. Change-Id: Ib8bc8c57f9d5370a10e379f86f9e41e57c715e3f Reviewed-on: https://gerrit.libreoffice.org/53778 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2018-05-15tdf#117225 sfx2: fix leftover temp file when saving doc with embedded objectsMiklos Vajna
Regression from 27938e1bbd5f3405c47b9933be7489eeb03920f3 (sfx2 store: create temp files next to local files (storage case), 2018-01-17), the optimization to store temp files during save next to the destination document (so that it can be renamed and not copied after writing the data successfully) causes problems when we have embedded objects. Avoid the problem by disabling this new optimization when the document has embedded objects. How to fix the actual root cause is not clear to me, I see that: - the SfxMedium::GetOutputStorage() call in SfxObjectShell::SaveTo_Impl() create a temp file - the SfxMedium::Commit() call in SfxObjectShell::SaveTo_Impl() tries to remove the file, which fails on Windows as there is an open file handle to that file - SfxObjectShell::SwitchChildrenPersistance() would close the storage, owning that open file handle, but it's too late So just go back to the previous behavior for now. Change-Id: I37259100d1ddf963c1f2d3b7bd9f460bc995815c Reviewed-on: https://gerrit.libreoffice.org/54340 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-02-09tdf#108210: Allow to ignore a lock file if there's no filesystem lockMike Kaganski
Two cases are handled: when a file is being opened, and when it was opened read-only already, and one tries to reopen it in edit mode. The option to ignore locking and open the file anyway is only offered when there is no filesystem lock present on the file. Change-Id: I377d3cae4c949ae64d449634acea8fb3f68a5700 Reviewed-on: https://gerrit.libreoffice.org/49448 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-01-10sfx2 store: add API to allow avoiding the fsync of the output fileMiklos Vajna
The use-case is when the consumer of the output file will read it right after SfxBaseModel::storeToURL() returns, in which case an expensive fsync is pointless. Times for 100 hello world inputs: 8516 -> 2785 ms is spent in ODT-load + HTML export + close (33% of original). Change-Id: I05e424a43ebfeea363f82b57af60f5aaa28696b4 Reviewed-on: https://gerrit.libreoffice.org/47695 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-12-27loplugin:passstuffbyref improved return in xmloff,sfx2Noel Grandin
Change-Id: I7161dfca77f944027bd20614616e22d6acfa27cd Reviewed-on: https://gerrit.libreoffice.org/47081 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-05tdf#109202: pass arg of --convert-images-to to (f)odt filterKatarina Behrens
Tunelling 1 piece of information through 20 layers of abstraction Advanced tunelling all the way to sfx2 Exhausted beyond recognition arrived to [Flat]ODF filter Change-Id: I0597c20c28f5cf8e2c60c4398622b36bda83abd0 Reviewed-on: https://gerrit.libreoffice.org/41777 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-07-21loplugin:constparams in sfx2Noel Grandin
Change-Id: Id982c8fb5654433e9db10e2da6a86a6c8d90b9b4 Reviewed-on: https://gerrit.libreoffice.org/40261 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-21convert ErrCode to strong typedefNoel Grandin
would have preferred to re-use o3tl::strong_int, of which this is a modified copy, but there are lots of convenience accessors which are nice to define on the class. Change-Id: I301b807aaf02fbced3bf75de1e1692cde6c0340a Reviewed-on: https://gerrit.libreoffice.org/38497 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-06tdf#106942 Wrong message when lock file is empty or corruptJuergen Funk
1. Erase empty or corrupt lockfile, when reading it fails and skip "Locked Document Dialog" in that case 2. Show Dialog (use LockFileIgnoreRequest -> LockFailedQueryBox) when create lock file is not possible. Two Dialogs: "lock file create error" and "empty lockfile is present" Set the document to read-only when creating lockfile is not possible. If lockfile is corrupt or empty, inform the user. They can interrupt loading the document or open it read-only, which also erases the corrupt lock file after closing the document 3. Handling for the two Dialogs Use LockFileIgnoreRequst for create lockfile error and add a new LockFileCorruptRequest, (lock file is corrupt). Change and generate new messages for both dialogs in english Change-Id: I35c377f85b5113e8ffb89d83b9544b8ebc81d89f Reviewed-on: https://gerrit.libreoffice.org/36658 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>