Move string for macro security denied from basctl to sfx2

That way it can be used by other modules in later patches.

Change-Id: I5ea8ab0d835276e68de761d7e9b8924753388e6d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207213
Tested-by: Jenkins
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
This commit is contained in:
Neil Roberts
2026-06-24 14:28:25 +02:00
parent 85fba20b32
commit ff9899db6e
4 changed files with 8 additions and 4 deletions
-1
View File
@@ -37,7 +37,6 @@
#define RID_STR_SBXNAMEALLREADYUSED NC_("RID_STR_SBXNAMEALLREADYUSED", "Name already exists")
#define RID_STR_SIGNED NC_("RID_STR_SIGNED", "(Signed)")
#define RID_STR_SBXNAMEALLREADYUSED2 NC_("RID_STR_SBXNAMEALLREADYUSED2", "Object with same name already exists")
#define RID_STR_CANNOTRUNMACRO NC_("RID_STR_CANNOTRUNMACRO", "For security reasons, you cannot run this macro.\n\nFor more information, check the security settings.")
#define RID_STR_SEARCHNOTFOUND NC_("RID_STR_SEARCHNOTFOUND", "Search key not found")
#define RID_STR_SEARCHFROMSTART NC_("RID_STR_SEARCHFROMSTART", "Search to last module complete. Continue at first module?")
#define RID_STR_SEARCHREPLACES NC_("RID_STR_SEARCHREPLACES", "Search key replaced XX times")
+3 -1
View File
@@ -51,6 +51,8 @@
#include <sfx2/docfile.hxx>
#include <sfx2/filedlghelper.hxx>
#include <sfx2/request.hxx>
#include <sfx2/sfxresid.hxx>
#include <sfx2/strings.hrc>
#include <sfx2/viewfrm.hxx>
#include <sot/exchange.hxx>
#include <svl/eitem.hxx>
@@ -324,7 +326,7 @@ void ModulWindow::BasicExecute()
{
std::unique_ptr<weld::MessageDialog> xBox(
Application::CreateMessageDialog(GetFrameWeld(), VclMessageType::Warning,
VclButtonsType::Ok, IDEResId(RID_STR_CANNOTRUNMACRO)));
VclButtonsType::Ok, SfxResId(STR_CANNOTRUNMACRO)));
xBox->run();
return;
}
+4 -2
View File
@@ -40,7 +40,9 @@
#include <sfx2/frame.hxx>
#include <sfx2/minfitem.hxx>
#include <sfx2/request.hxx>
#include <sfx2/sfxresid.hxx>
#include <sfx2/sfxsids.hrc>
#include <sfx2/strings.hrc>
#include <tools/debug.hxx>
#include <vcl/commandevent.hxx>
#include <vcl/svapp.hxx>
@@ -466,7 +468,7 @@ IMPL_LINK_NOARG(MacroChooser, MacroDoubleClickHdl, const weld::TreeIter&, bool)
{
std::unique_ptr<weld::MessageDialog> xError(
Application::CreateMessageDialog(m_xDialog.get(), VclMessageType::Warning,
VclButtonsType::Ok, IDEResId(RID_STR_CANNOTRUNMACRO)));
VclButtonsType::Ok, SfxResId(STR_CANNOTRUNMACRO)));
xError->run();
return true;
}
@@ -599,7 +601,7 @@ IMPL_LINK(MacroChooser, ButtonHdl, weld::Button&, rButton, void)
if ( aDocument.isDocument() && !aDocument.allowMacros() )
{
std::unique_ptr<weld::MessageDialog> xError(Application::CreateMessageDialog(m_xDialog.get(),
VclMessageType::Warning, VclButtonsType::Ok, IDEResId(RID_STR_CANNOTRUNMACRO)));
VclMessageType::Warning, VclButtonsType::Ok, SfxResId(STR_CANNOTRUNMACRO)));
xError->run();
return;
}
+1
View File
@@ -325,6 +325,7 @@
#define STR_MACROS_DISABLED_SIGNATURE_INVALID NC_("STR_MACROS_DISABLED_SIGNATURE_INVALID", "Macros are signed, but at least one signature has problems.")
#define STR_MACROS_DISABLED_CONTENT_UNSIGNED NC_("STR_MACROS_DISABLED_CONTENT_UNSIGNED", "Macros are signed, but the document (containing document events) is not signed.")
#define STR_MACROS NC_("STR_MACROS", "Show Macros")
#define STR_CANNOTRUNMACRO NC_("STR_CANNOTRUNMACRO", "For security reasons, you cannot run this macro.\n\nFor more information, check the security settings.")
#define STR_SECURITY_OPTIONS NC_("STR_MACROS", "Show Security Options")
#define STR_EVENTS NC_("STR_EVENTS", "Show Events")
#define STR_VCLGEN_TITLE NC_("STR_VCLGEN_TITLE", "Fallback UI controls in use")