summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2020-03-16 10:40:13 +0100
committerSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2020-03-16 15:26:50 +0100
commitce1594ad5fb948449f2beac0a2adeaaa07405b4a (patch)
tree9f55e115ff777cbb38aed6a951f452dc297ad314 /sfx2
parent158884cbe3fd7a760bfc409c895f3b6b56f41e22 (diff)
Some more places to check for AllowOverrideLocking option
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90554 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> (cherry picked from commit 10136818b4ef138fc2d5ec3af194beffed009480) Change-Id: Id09f691ef7e3fbae03771a43af1c7b1d940365bc
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/view/viewfrm.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 814a45f42b6f..f15e0fc670be 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -183,13 +183,15 @@ private:
std::unique_ptr<weld::MessageDialog> m_xQueryBox;
public:
SfxQueryOpenAsTemplate(weld::Window* pParent, bool bAllowIgnoreLock)
- : m_xQueryBox(Application::CreateMessageDialog(pParent, VclMessageType::Question, VclButtonsType::NONE,
- SfxResId(bAllowIgnoreLock ? STR_QUERY_OPENASTEMPLATE_ALLOW_IGNORE : STR_QUERY_OPENASTEMPLATE)))
+ : m_xQueryBox(Application::CreateMessageDialog(pParent, VclMessageType::Question, VclButtonsType::NONE, ""))
{
m_xQueryBox->add_button(SfxResId(STR_QUERY_OPENASTEMPLATE_OPENCOPY_BTN), RET_YES);
+ bAllowIgnoreLock
+ = bAllowIgnoreLock && officecfg::Office::Common::Misc::AllowOverrideLocking::get();
if (bAllowIgnoreLock)
m_xQueryBox->add_button(SfxResId(STR_QUERY_OPENASTEMPLATE_OPEN_BTN), RET_IGNORE);
m_xQueryBox->add_button(Button::GetStandardText( StandardButtonType::Cancel ), RET_CANCEL);
+ m_xQueryBox->set_primary_text(SfxResId(bAllowIgnoreLock ? STR_QUERY_OPENASTEMPLATE_ALLOW_IGNORE : STR_QUERY_OPENASTEMPLATE));
m_xQueryBox->set_default_response(RET_YES);
}
short run() { return m_xQueryBox->run(); }