summaryrefslogtreecommitdiff
path: root/sw/source/uibase/wrtsh/delete.cxx
diff options
context:
space:
mode:
authorJim Raykowski <raykowj@gmail.com>2022-11-22 17:57:15 -0900
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-11-24 08:09:42 +0100
commit8ba1c4e27376cbd73892768d1e741067918eb897 (patch)
tree76089bd4497aa862d6ed776040b0b59a3e9f6487 /sw/source/uibase/wrtsh/delete.cxx
parentb1fad7043a7286d5d9bb33c9ed9235f044d92aed (diff)
tdf#152165 Improve the 'Read-only Content' dialog message
This patch implements user j.a.swami's suggested improvement of the messages shown in the 'Read-only Content' dialog when trying to delete a selection in the document that has folded content. In doing so, repeated code to create and run the dialog at each place it is used is replaced by a single function call. Change-Id: If79298e0ee920e60620934f1eacc98c776e5d33e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143132 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/uibase/wrtsh/delete.cxx')
-rw-r--r--sw/source/uibase/wrtsh/delete.cxx8
1 files changed, 2 insertions, 6 deletions
diff --git a/sw/source/uibase/wrtsh/delete.cxx b/sw/source/uibase/wrtsh/delete.cxx
index 2a6038d6d9a6..e66797a7086d 100644
--- a/sw/source/uibase/wrtsh/delete.cxx
+++ b/sw/source/uibase/wrtsh/delete.cxx
@@ -283,9 +283,7 @@ bool SwWrtShell::DelLeft()
CloseMark( bRet );
if (!bRet)
{ // false indicates HasReadonlySel failed
- std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetView().GetFrameWeld(), "modules/swriter/ui/inforeadonlydialog.ui"));
- std::unique_ptr<weld::MessageDialog> xInfo(xBuilder->weld_message_dialog("InfoReadonlyDialog"));
- xInfo->run();
+ InfoReadOnlyDialog();
}
return bRet;
}
@@ -404,9 +402,7 @@ bool SwWrtShell::DelRight(bool const isReplaceHeuristic)
CloseMark( bRet );
if (!bRet)
{ // false indicates HasReadonlySel failed
- std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetView().GetFrameWeld(), "modules/swriter/ui/inforeadonlydialog.ui"));
- std::unique_ptr<weld::MessageDialog> xInfo(xBuilder->weld_message_dialog("InfoReadonlyDialog"));
- xInfo->run();
+ InfoReadOnlyDialog();
}
break;