summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorMatt K <mattkse@gmail.com>2021-11-14 15:33:43 -0600
committerMike Kaganski <mike.kaganski@collabora.com>2021-11-17 10:51:00 +0100
commitf9ab31366dbe466ef739015734bb5b6a1a0deca4 (patch)
tree64fd9aeb48ce1e656ce47d41447ab0294541ec99 /sfx2
parent8dec2a98ce29251936cd45ebf864a89ff767ee50 (diff)
tdf#143971 Removes pop-up dialog for read-only documents
No longer does the user get a pop-up dialog when opening documents that are read-only, asking whether they want to be notified when the document becomes editable. The change removes some of the functionality introduced in commit 95eb088802562b75f8b299908160145c7e88d763 "tdf#47065 Add new file open UI options and implement a new thread". Change-Id: Ic25e8e293e7224fb5086249a9d4814914fa961d1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125340 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/doc/docfile.cxx43
1 files changed, 1 insertions, 42 deletions
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index 4c6770255e46..588e349a2e5b 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -38,7 +38,6 @@
#include <com/sun/star/document/LockFileIgnoreRequest.hpp>
#include <com/sun/star/document/LockFileCorruptRequest.hpp>
#include <com/sun/star/document/ChangedByOthersRequest.hpp>
-#include <com/sun/star/document/ReadOnlyOpenRequest.hpp>
#include <com/sun/star/document/ReloadEditableRequest.hpp>
#include <com/sun/star/embed/XTransactedObject.hpp>
#include <com/sun/star/embed/ElementModes.hpp>
@@ -1178,42 +1177,6 @@ SfxMedium::ShowLockResult SfxMedium::ShowLockedDocumentDialog(const LockFileEntr
return nResult;
}
-bool SfxMedium::ShowReadOnlyOpenDialog()
-{
- uno::Reference<task::XInteractionHandler> xHandler = GetInteractionHandler();
- if (xHandler.is())
- {
- OUString aDocumentURL
- = GetURLObject().GetLastName(INetURLObject::DecodeMechanism::WithCharset);
- ::rtl::Reference<::ucbhelper::InteractionRequest> xInteractionRequestImpl
- = new ::ucbhelper::InteractionRequest(uno::makeAny(document::ReadOnlyOpenRequest(
- OUString(), uno::Reference<uno::XInterface>(), aDocumentURL)));
- if (xInteractionRequestImpl != nullptr)
- {
- uno::Sequence<uno::Reference<task::XInteractionContinuation>> aContinuations{
- new ::ucbhelper::InteractionAbort(xInteractionRequestImpl.get()),
- new ::ucbhelper::InteractionApprove(xInteractionRequestImpl.get())
- };
- xInteractionRequestImpl->setContinuations(aContinuations);
- xHandler->handle(xInteractionRequestImpl);
- ::rtl::Reference<::ucbhelper::InteractionContinuation> xSelected
- = xInteractionRequestImpl->getSelection();
- if (uno::Reference<task::XInteractionAbort>(xSelected.get(), uno::UNO_QUERY).is())
- {
- SetError(ERRCODE_ABORT);
- return false;
- }
- else if (!uno::Reference<task::XInteractionApprove>(xSelected.get(), uno::UNO_QUERY)
- .is())
- // user selected "Notify"
- pImpl->m_bNotifyWhenEditable = true;
-
- return true;
- }
- }
- return false;
-}
-
bool SfxMedium::ShowLockFileProblemDialog(MessageDlg nWhichDlg)
{
// system file locking is not active, ask user whether he wants to open the document without any locking
@@ -3019,11 +2982,7 @@ void SfxMedium::Init_Impl()
if (item.getFileStatus(stat) == osl::FileBase::E_None
&& stat.isValid(osl_FileStatus_Mask_Attributes))
{
- if ((stat.getAttributes() & osl_File_Attribute_ReadOnly) != 0
-#if HAVE_FEATURE_MULTIUSER_ENVIRONMENT
- && ShowReadOnlyOpenDialog()
-#endif
- )
+ if ((stat.getAttributes() & osl_File_Attribute_ReadOnly) != 0)
{
pImpl->m_bOriginallyReadOnly = true;
}