summaryrefslogtreecommitdiffstats
path: root/sfx2
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 09:27:54 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 09:27:54 +0000
commitadb203bc05e3e36173cbd46b9951f79821a81799 (patch)
tree6e6739df9b3f0a567330a0dd7ee0e03ae70876a3 /sfx2
parentAdding debian version 4:24.2.0-3. (diff)
downloadlibreoffice-adb203bc05e3e36173cbd46b9951f79821a81799.tar.xz
libreoffice-adb203bc05e3e36173cbd46b9951f79821a81799.zip
Merging upstream version 4:24.2.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/sdi/appslots.sdi4
-rw-r--r--sfx2/sdi/sfx.sdi17
-rw-r--r--sfx2/source/appl/appserv.cxx14
-rw-r--r--sfx2/source/appl/sfxhelp.cxx4
-rw-r--r--sfx2/source/doc/docfile.cxx15
-rw-r--r--sfx2/source/doc/objstor.cxx1
-rw-r--r--sfx2/source/doc/sfxbasemodel.cxx2
-rw-r--r--sfx2/source/view/viewfrm.cxx3
8 files changed, 54 insertions, 6 deletions
diff --git a/sfx2/sdi/appslots.sdi b/sfx2/sdi/appslots.sdi
index 429c48332f..b8d75480fe 100644
--- a/sfx2/sdi/appslots.sdi
+++ b/sfx2/sdi/appslots.sdi
@@ -337,6 +337,10 @@ shell SfxApplication
[
ExecMethod = OfaExec_Impl ;
]
+ SID_OPTIONS_SECURITY
+ [
+ ExecMethod = OfaExec_Impl ;
+ ]
}
shell SfxModule
diff --git a/sfx2/sdi/sfx.sdi b/sfx2/sdi/sfx.sdi
index 5660596a3b..9c2b72d5f4 100644
--- a/sfx2/sdi/sfx.sdi
+++ b/sfx2/sdi/sfx.sdi
@@ -5497,6 +5497,23 @@ SfxVoidItem MoreDictionaries SID_MORE_DICTIONARIES
GroupId = SfxGroupId::Options;
]
+SfxVoidItem OptionsSecurityDialog SID_OPTIONS_SECURITY
+()
+[
+ AutoUpdate = FALSE,
+ FastCall = TRUE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ ToolBoxConfig = TRUE,
+ GroupId = SfxGroupId::Options;
+]
+
SfxVoidItem ActivateStyleApply SID_ACTIVATE_STYLE_APPLY
()
[
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index cccc2abc1a..58963ceed2 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -1483,6 +1483,20 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
break;
}
+ case SID_OPTIONS_SECURITY:
+ {
+ SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
+ VclPtr<AbstractSecurityOptionsDialog> pDlg =
+ pFact->CreateSvxSecurityOptionsDialog(rReq.GetFrameWeld());
+
+ if (pDlg->Execute() == RET_OK) {
+ pDlg->SetSecurityOptions();
+ }
+
+ pDlg.disposeAndClear();
+ break;
+ }
+
case SID_MORE_DICTIONARIES:
{
uno::Sequence<beans::PropertyValue> aArgs{ comphelper::makePropertyValue(
diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx
index b596a4e33e..785872ddee 100644
--- a/sfx2/source/appl/sfxhelp.cxx
+++ b/sfx2/source/appl/sfxhelp.cxx
@@ -665,6 +665,10 @@ OUString SfxHelp::GetHelpText(const OUString& aCommandURL, const weld::Widget* p
OUString SfxHelp::GetURLHelpText(std::u16string_view aURL)
{
+ // hyperlinks are handled differently in Online
+ if (comphelper::LibreOfficeKit::isActive())
+ return OUString();
+
bool bCtrlClickHlink = SvtSecurityOptions::IsOptionSet(SvtSecurityOptions::EOption::CtrlClickHyperlink);
// "ctrl-click to follow link:" for not MacOS
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index 422fa98ac3..c961733d85 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -1980,10 +1980,13 @@ uno::Reference<embed::XStorage> SfxMedium::GetScriptingStorageToSign_Impl()
SAL_WARN_IF(!pImpl->m_xODFDecryptedInnerPackageStream.is(), "sfx.doc", "no inner package stream?");
if (pImpl->m_xODFDecryptedInnerPackageStream.is())
{
+ const SfxBoolItem* pRepairItem = GetItemSet().GetItem(SID_REPAIRPACKAGE, false);
+ const bool bRepairPackage = pRepairItem && pRepairItem->GetValue();
pImpl->m_xODFDecryptedInnerZipStorage =
::comphelper::OStorageHelper::GetStorageOfFormatFromInputStream(
ZIP_STORAGE_FORMAT_STRING,
- pImpl->m_xODFDecryptedInnerPackageStream->getInputStream());
+ pImpl->m_xODFDecryptedInnerPackageStream->getInputStream(), {},
+ bRepairPackage);
}
}
return pImpl->m_xODFDecryptedInnerZipStorage;
@@ -2004,15 +2007,21 @@ uno::Reference< embed::XStorage > const & SfxMedium::GetZipStorageToSign_Impl( b
try
{
+ const SfxBoolItem* pRepairItem = GetItemSet().GetItem(SID_REPAIRPACKAGE, false);
+ const bool bRepairPackage = pRepairItem && pRepairItem->GetValue();
// we can not sign document if there is no stream
// should it be possible at all?
if ( !bReadOnly && pImpl->xStream.is() )
{
- pImpl->m_xZipStorage = ::comphelper::OStorageHelper::GetStorageOfFormatFromStream( ZIP_STORAGE_FORMAT_STRING, pImpl->xStream );
+ pImpl->m_xZipStorage = ::comphelper::OStorageHelper::GetStorageOfFormatFromStream(
+ ZIP_STORAGE_FORMAT_STRING, pImpl->xStream, css::embed::ElementModes::READWRITE,
+ {}, bRepairPackage);
}
else if ( pImpl->xInputStream.is() )
{
- pImpl->m_xZipStorage = ::comphelper::OStorageHelper::GetStorageOfFormatFromInputStream( ZIP_STORAGE_FORMAT_STRING, pImpl->xInputStream );
+ pImpl->m_xZipStorage
+ = ::comphelper::OStorageHelper::GetStorageOfFormatFromInputStream(
+ ZIP_STORAGE_FORMAT_STRING, pImpl->xInputStream, {}, bRepairPackage);
}
}
catch( const uno::Exception& )
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index ea1063ea81..17ee6bf621 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -400,6 +400,7 @@ void SfxObjectShell::PrepareSecondTryLoad_Impl()
{
// only for internal use
pImpl->m_xDocStorage.clear();
+ pImpl->mxObjectContainer.reset();
pImpl->m_bIsInit = false;
ResetError();
}
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index 985af53135..062c594f2c 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -2510,7 +2510,7 @@ void SAL_CALL SfxBaseModel::removeEventListener( const Reference< document::XEve
{
SfxModelGuard aGuard( *this );
- m_pData->m_aEventListeners.removeInterface( aListener );
+ m_pData->m_aDocumentEventListeners1.removeInterface( aListener );
}
// XShapeEventBroadcaster
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index fe0dc0adc7..c6b25637cc 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -1843,8 +1843,7 @@ IMPL_LINK_NOARG(SfxViewFrame, MacroButtonHandler, weld::Button&, void)
IMPL_LINK_NOARG(SfxViewFrame, SecurityButtonHandler, weld::Button&, void)
{
- SfxUInt16Item aPageID(SID_OPTIONS_PAGEID, sal_uInt16(RID_SVXPAGE_INET_SECURITY));
- GetDispatcher()->ExecuteList(SID_OPTIONS_TREEDIALOG, SfxCallMode::SYNCHRON, { &aPageID });
+ GetDispatcher()->Execute(SID_OPTIONS_SECURITY, SfxCallMode::SYNCHRON);
RemoveInfoBar(u"securitywarn");
}