avmedia/source/gstreamer/gstframegrabber.cxx | 14 ++- connectivity/source/inc/java/tools.hxx | 2 dbaccess/source/core/dataaccess/ModelImpl.cxx | 3 extensions/source/propctrlr/handlerhelper.hxx | 1 external/gpgmepp/UnpackedTarball_gpgmepp.mk | 1 external/gpgmepp/gpgme.git-4b64774b6d13ffa4f59dddf947a97d61bcfa2f2e.patch.1 | 32 ++++++++ external/liborcus/include.patch.0 | 10 ++ external/libpagemaker/UnpackedTarball_libpagemaker.mk | 6 + external/libpagemaker/cstdint.patch.0 | 10 ++ filter/source/xsltdialog/xmlfilterjar.hxx | 1 forms/source/component/EventThread.hxx | 1 forms/source/xforms/propertysetbase.hxx | 1 fpicker/source/office/contentenumeration.hxx | 1 include/oox/crypto/StrongEncryptionDataSpace.hxx | 1 include/sfx2/docmacromode.hxx | 4 - include/sfx2/objsh.hxx | 6 + include/sfx2/strings.hrc | 1 include/svtools/imageresourceaccess.hxx | 1 include/tools/urlobj.hxx | 5 + include/vcl/BitmapBuffer.hxx | 1 include/vcl/font/Feature.hxx | 1 io/source/acceptor/acc_pipe.cxx | 1 io/source/acceptor/acc_socket.cxx | 1 io/source/connector/connector.cxx | 1 sc/source/core/data/global.cxx | 7 + sd/source/ui/app/sdmod1.cxx | 29 ++++--- sfx2/source/doc/docmacromode.cxx | 8 +- sfx2/source/doc/iframe.cxx | 6 + sfx2/source/doc/objmisc.cxx | 35 ++++++++- sfx2/source/doc/objxtor.cxx | 1 sfx2/source/inc/objshimp.hxx | 3 sot/source/unoolestorage/xolesimplestorage.hxx | 1 starmath/inc/token.hxx | 1 svx/source/unodialogs/textconversiondlgs/chinese_translation_unodialog.hxx | 2 sw/source/filter/html/htmlplug.cxx | 2 sw/source/filter/xml/xmltexti.cxx | 2 sw/source/uibase/docvw/OverlayRanges.hxx | 1 sw/source/uibase/docvw/ShadowOverlayObject.hxx | 1 sw/source/uibase/shells/drwtxtex.cxx | 8 -- sw/source/uibase/wrtsh/wrtsh2.cxx | 38 ++++++---- tools/source/fsys/urlobj.cxx | 9 ++ xmloff/source/draw/ximpshap.cxx | 2 xmlsecurity/source/gpg/SecurityEnvironment.hxx | 1 xmlsecurity/source/helper/ooxmlsecparser.hxx | 1 xmlsecurity/source/helper/xsecparser.hxx | 1 45 files changed, 216 insertions(+), 49 deletions(-)
New commits: commit 5aa0ae5fffe3a6f98e2ae4a677a20a8f95d3eed3 Author: Caolán McNamara <[email protected]> AuthorDate: Wed Nov 22 21:14:41 2023 +0000 Commit: Caolán McNamara <[email protected]> CommitDate: Wed Nov 29 15:03:34 2023 +0000 reuse AllowedLinkProtocolFromDocument in impress/draw Change-Id: I73ca4f087946a45dbf92d69a0dc1e769de9b5690 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159843 Tested-by: Jenkins Reviewed-by: Caolán McNamara <[email protected]> (cherry picked from commit f0942eed2eb328b04856f20613f5226d66b66a20) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159759 Reviewed-by: Michael Stahl <[email protected]> Signed-off-by: Xisco Fauli <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159884 Reviewed-by: Miklos Vajna <[email protected]> (cherry picked from commit 569fa7f755718a06f23d25b2132bf0400cec7a0f) (cherry picked from commit b60bd2dddc4b9d6d60615d61051a9f9ee5410851) (cherry picked from commit 8b244a0ce8a9170a1fd61e19a0c943230a741fbe) (cherry picked from commit 87535988868baac08173fc826dbb6c6cbdf91dd4) (cherry picked from commit fd809982a280218046ab7e6e6d24492420143e6c) (cherry picked from commit 56dd18f55d14939a1d5697e8580efd580bae0da7) diff --git a/sd/source/ui/app/sdmod1.cxx b/sd/source/ui/app/sdmod1.cxx index 35bf5ebfb5ea..7234a340c187 100644 --- a/sd/source/ui/app/sdmod1.cxx +++ b/sd/source/ui/app/sdmod1.cxx @@ -33,6 +33,7 @@ #include <sfx2/docfile.hxx> #include <sfx2/request.hxx> #include <sfx2/templatedlg.hxx> +#include <svl/stritem.hxx> #include <editeng/eeitem.hxx> #include <svx/svxids.hrc> @@ -193,26 +194,32 @@ void SdModule::Execute(SfxRequest& rReq) { bool bIntercept = false; ::sd::DrawDocShell* pDocShell = dynamic_cast< ::sd::DrawDocShell *>( SfxObjectShell::Current() ); - if (pDocShell) + ::sd::ViewShell* pViewShell = pDocShell ? pDocShell->GetViewShell() : nullptr; + if (pViewShell) { - ::sd::ViewShell* pViewShell = pDocShell->GetViewShell(); - if (pViewShell) + if( sd::SlideShow::IsRunning( pViewShell->GetViewShellBase() ) ) { - if( sd::SlideShow::IsRunning( pViewShell->GetViewShellBase() ) ) + // Prevent documents from opening while the slide + // show is running, except when this request comes + // from a shape interaction. + if (rReq.GetArgs() == nullptr) { - // Prevent documents from opening while the slide - // show is running, except when this request comes - // from a shape interaction. - if (rReq.GetArgs() == nullptr) - { - bIntercept = true; - } + bIntercept = true; } } } if (!bIntercept) { + if (const SfxStringItem* pURLItem = rReq.GetArg<SfxStringItem>(SID_FILE_NAME)) + { + if (!pViewShell || !SfxObjectShell::AllowedLinkProtocolFromDocument(pURLItem->GetValue(), + pViewShell->GetObjectShell(), + pViewShell->GetFrameWeld())) + { + return; + } + } SfxGetpApp()->ExecuteSlot(rReq, SfxGetpApp()->GetInterface()); } else commit 782f9422888322f9ec54d98b6f31b5f372170ff7 Author: Caolán McNamara <[email protected]> AuthorDate: Wed Nov 15 11:39:24 2023 +0000 Commit: Caolán McNamara <[email protected]> CommitDate: Wed Nov 29 15:03:34 2023 +0000 reuse AllowedLinkProtocolFromDocument in writer reorg calc hyperlink check to reuse elsewhere Change-Id: I20ae3c5df15502c3a0a366fb4a2924c06ffac3d0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159487 Tested-by: Jenkins Reviewed-by: Caolán McNamara <[email protected]> (cherry picked from commit e6a7537762e19fde446441edd10d301f9b37ce75) reuse AllowedLinkProtocolFromDocument in writer Change-Id: Iacf5e313fc6ca5f7d69ca6986a036f0e1ab1f2a0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159488 Tested-by: Caolán McNamara <[email protected]> Reviewed-by: Caolán McNamara <[email protected]> (cherry picked from commit 32535dfa82200b54296838b52285c054fbe5e51d) combine these hyperlink dispatchers into one call Change-Id: Icb7822e811013de648ccf2fbb23a5f0be9e29bb0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159489 Tested-by: Caolán McNamara <[email protected]> Reviewed-by: Caolán McNamara <[email protected]> (cherry picked from commit 0df175ccc6ea542bc5801f631ff72bed187042eb) we can have just one LoadURL for writer Change-Id: Ia0162ee1c275292fcf200bad4662e4c2c6b7b972 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159557 Tested-by: Jenkins Reviewed-by: Caolán McNamara <[email protected]> (cherry picked from commit 521ca9cf6acbae96cf95d9740859c9682212013d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159858 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Miklos Vajna <[email protected]> (cherry picked from commit e32b8601dbd63cf01497889601d6c9c1241106d6) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159883 (cherry picked from commit 6d29ee15039a567ad5f70a3e51289fea93c1f64e) (cherry picked from commit 6708272c15941d94ab828a188e06a0addca1dd15) (cherry picked from commit 8423af18d7b8b82d106acede33720457071e79e9) (cherry picked from commit 6aa0be1d2905b77e567ca32446b61ab2e9bef0b1) (cherry picked from commit 583a30728042993d7fcacccf49c8e338150f2f44) (cherry picked from commit dd7e7a8b0004dc24c9880cc91368ed8512c35f01) diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx index b9bd0dc82f25..00296b4f92f0 100644 --- a/include/sfx2/objsh.hxx +++ b/include/sfx2/objsh.hxx @@ -206,6 +206,9 @@ private: SAL_DLLPRIVATE bool SaveTo_Impl(SfxMedium &rMedium, const SfxItemSet* pSet ); + // true if the document had macros (or similar) on load to trigger warning user + SAL_DLLPRIVATE bool GetHadCheckedMacrosOnLoad() const; + protected: SfxObjectShell(SfxObjectCreateMode); SfxObjectShell(SfxModelFlags); // see sfxmodelfactory.hxx @@ -433,8 +436,8 @@ public: void SetMacroCallsSeenWhileLoading(); bool GetMacroCallsSeenWhileLoading() const; - // true if the document had macros (or similar) on load to trigger warning user - bool GetHadCheckedMacrosOnLoad() const; + // true if this type of link, from a document, is allowed by the user to be passed to uno:OpenDoc + static bool AllowedLinkProtocolFromDocument(const OUString& rUrl, SfxObjectShell* pObjShell, weld::Window* pDialogParent); const css::uno::Sequence< css::beans::PropertyValue >& GetModifyPasswordInfo() const; bool SetModifyPasswordInfo( const css::uno::Sequence< css::beans::PropertyValue >& aInfo ); diff --git a/include/sfx2/strings.hrc b/include/sfx2/strings.hrc index 317dd88061df..b1bfa6902793 100644 --- a/include/sfx2/strings.hrc +++ b/include/sfx2/strings.hrc @@ -101,6 +101,7 @@ #define STR_GB NC_("STR_GB", "GB") #define STR_QUERY_LASTVERSION NC_("STR_QUERY_LASTVERSION", "Cancel all changes?") #define STR_NO_WEBBROWSER_FOUND NC_("STR_NO_WEBBROWSER_FOUND", "Opening \"$(ARG1)\" failed with error code $(ARG2) and message: \"$(ARG3)\"\nMaybe no web browser could be found on your system. In that case, please check your Desktop Preferences or install a web browser (for example, Firefox) in the default location requested during the browser installation.") +#define STR_DANGEROUS_TO_OPEN NC_("STR_DANGEROUS_TO_OPEN", "It might be dangerous to open \"$(ARG1)\".\nDo you really want to open it?") #define STR_NO_ABS_URI_REF NC_("STR_NO_ABS_URI_REF", "\"$(ARG1)\" cannot be passed to an external application to open it (e.g., it might not be an absolute URL, or might denote no existing file).") #define STR_GID_INTERN NC_("STR_GID_INTERN", "Internal") #define STR_GID_APPLICATION NC_("STR_GID_APPLICATION", "Application") diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx index b7967414fd40..bcc65c71c0f5 100644 --- a/sc/source/core/data/global.cxx +++ b/sc/source/core/data/global.cxx @@ -26,9 +26,7 @@ #include <sfx2/docfile.hxx> #include <sfx2/dispatch.hxx> #include <sfx2/objsh.hxx> -#include <sfx2/sfxresid.hxx> #include <sfx2/sfxsids.hrc> -#include <sfx2/strings.hrc> #include <sfx2/viewfrm.hxx> #include <sfx2/viewsh.hxx> #include <svl/intitem.hxx> @@ -38,6 +36,7 @@ #include <vcl/keycodes.hxx> #include <vcl/virdev.hxx> #include <vcl/weld.hxx> +#include <vcl/window.hxx> #include <vcl/settings.hxx> #include <vcl/svapp.hxx> #include <unotools/charclass.hxx> @@ -809,34 +808,8 @@ void ScGlobal::OpenURL(const OUString& rURL, const OUString& rTarget, bool bIgno aUrlName = aNewUrlName; } - if (INetURLObject(aUrlName).IsExoticProtocol()) - { - // Default to ignoring exotic protocols - bool bAllow = false; - if (pObjShell) - { - // If the document had macros when loaded then follow the allowed macro-mode - if (pObjShell->GetHadCheckedMacrosOnLoad()) - bAllow = pObjShell->AdjustMacroMode(); - else // otherwise ask the user, defaulting to cancel - { - assert(pFrame && "if we have pObjShell we have pFrame"); - //Reuse URITools::onOpenURI warning string - std::unique_ptr<weld::MessageDialog> xQueryBox(Application::CreateMessageDialog(pFrame->GetFrameWeld(), - VclMessageType::Warning, VclButtonsType::YesNo, - SfxResId(STR_DANGEROUS_TO_OPEN))); - xQueryBox->set_primary_text(xQueryBox->get_primary_text().replaceFirst("$(ARG1)", - INetURLObject::decode(aUrlName, INetURLObject::DecodeMechanism::Unambiguous))); - xQueryBox->set_default_response(RET_NO); - bAllow = xQueryBox->run() == RET_YES; - } - } - if (!bAllow) - { - SAL_WARN("sc", "ScGlobal::OpenURL ignoring: " << aUrlName); - return; - } - } + if (!SfxObjectShell::AllowedLinkProtocolFromDocument(aUrlName, pObjShell, pFrame ? pFrame->GetWindow().GetFrameWeld() : nullptr)) + return; SfxStringItem aUrl( SID_FILE_NAME, aUrlName ); SfxStringItem aTarget( SID_TARGETNAME, rTarget ); diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx index 518d9dd11132..ca6995fb55c4 100644 --- a/sfx2/source/doc/objmisc.cxx +++ b/sfx2/source/doc/objmisc.cxx @@ -954,6 +954,33 @@ bool SfxObjectShell::GetHadCheckedMacrosOnLoad() const return pImpl->m_bHadCheckedMacrosOnLoad; } +bool SfxObjectShell::AllowedLinkProtocolFromDocument(const OUString& rUrl, SfxObjectShell* pObjShell, weld::Window* pDialogParent) +{ + if (!INetURLObject(rUrl).IsExoticProtocol()) + return true; + // Default to ignoring exotic protocols + bool bAllow = false; + if (pObjShell) + { + // If the document had macros when loaded then follow the allowed macro-mode + if (pObjShell->GetHadCheckedMacrosOnLoad()) + bAllow = pObjShell->AdjustMacroMode(); + else // otherwise ask the user, defaulting to cancel + { + //Reuse URITools::onOpenURI warning string + std::unique_ptr<weld::MessageDialog> xQueryBox(Application::CreateMessageDialog(pDialogParent, + VclMessageType::Warning, VclButtonsType::YesNo, + SfxResId(STR_DANGEROUS_TO_OPEN))); + xQueryBox->set_primary_text(xQueryBox->get_primary_text().replaceFirst("$(ARG1)", + INetURLObject::decode(rUrl, INetURLObject::DecodeMechanism::Unambiguous))); + xQueryBox->set_default_response(RET_NO); + bAllow = xQueryBox->run() == RET_YES; + } + } + SAL_WARN_IF(!bAllow, "sfx.appl", "SfxObjectShell::AllowedLinkProtocolFromDocument ignoring: " << rUrl); + return bAllow; +} + void SfxObjectShell::CheckEncryption_Impl( const uno::Reference< task::XInteractionHandler >& xHandler ) { OUString aVersion; diff --git a/sw/source/uibase/shells/drwtxtex.cxx b/sw/source/uibase/shells/drwtxtex.cxx index 9f754443d68d..139e85fd0f19 100644 --- a/sw/source/uibase/shells/drwtxtex.cxx +++ b/sw/source/uibase/shells/drwtxtex.cxx @@ -525,12 +525,8 @@ void SwDrawTextShell::Execute( SfxRequest &rReq ) const SvxFieldData* pField = pOLV->GetFieldAtCursor(); if (const SvxURLField* pURLField = dynamic_cast<const SvxURLField*>(pField)) { - SfxStringItem aUrl(SID_FILE_NAME, pURLField->GetURL()); - SfxStringItem aTarget(SID_TARGETNAME, pURLField->GetTargetFrame()); - SfxBoolItem aNewView(SID_OPEN_NEW_VIEW, false); - SfxBoolItem aBrowsing(SID_BROWSE, true); - GetView().GetViewFrame()->GetDispatcher()->ExecuteList( - SID_OPENDOC, SfxCallMode::SYNCHRON, { &aUrl, &aTarget, &aNewView, &aBrowsing }); + ::LoadURL(GetShell(), pURLField->GetURL(), LoadUrlFlags::NONE, + pURLField->GetTargetFrame()); } } break; diff --git a/sw/source/uibase/wrtsh/wrtsh2.cxx b/sw/source/uibase/wrtsh/wrtsh2.cxx index 93cd532781ff..ea4219ef981e 100644 --- a/sw/source/uibase/wrtsh/wrtsh2.cxx +++ b/sw/source/uibase/wrtsh/wrtsh2.cxx @@ -476,30 +476,24 @@ bool SwWrtShell::ClickToINetGrf( const Point& rDocPt, LoadUrlFlags nFilter ) return bRet; } -void LoadURL( SwViewShell& rVSh, const OUString& rURL, LoadUrlFlags nFilter, - const OUString& rTargetFrameName ) +static void LoadURL(SwView& rView, const OUString& rURL, LoadUrlFlags nFilter, + const OUString& rTargetFrameName) { - OSL_ENSURE( !rURL.isEmpty(), "what should be loaded here?" ); - if( rURL.isEmpty() ) - return ; + SwDocShell* pDShell = rView.GetDocShell(); + OSL_ENSURE( pDShell, "No DocShell?!"); + SfxViewFrame* pViewFrame = rView.GetViewFrame(); - // The shell could be 0 also!!!!! - if ( dynamic_cast<const SwCursorShell*>( &rVSh) == nullptr ) + if (!SfxObjectShell::AllowedLinkProtocolFromDocument(rURL, pDShell, rView.GetFrameWeld())) return; // We are doing tiledRendering, let the client handles the URL loading, // unless we are jumping to a TOC mark. if (comphelper::LibreOfficeKit::isActive() && !rURL.startsWith("#")) { - rVSh.GetSfxViewShell()->libreOfficeKitViewCallback(LOK_CALLBACK_HYPERLINK_CLICKED, rURL.toUtf8().getStr()); + rView.libreOfficeKitViewCallback(LOK_CALLBACK_HYPERLINK_CLICKED, rURL.toUtf8().getStr()); return; } - //A CursorShell is always a WrtShell - SwWrtShell &rSh = static_cast<SwWrtShell&>(rVSh); - - SwDocShell* pDShell = rSh.GetView().GetDocShell(); - OSL_ENSURE( pDShell, "No DocShell?!"); OUString sTargetFrame(rTargetFrameName); if (sTargetFrame.isEmpty() && pDShell) { @@ -514,7 +508,6 @@ void LoadURL( SwViewShell& rVSh, const OUString& rURL, LoadUrlFlags nFilter, OUString sReferer; if( pDShell && pDShell->GetMedium() ) sReferer = pDShell->GetMedium()->GetName(); - SfxViewFrame* pViewFrame = rSh.GetView().GetViewFrame(); SfxFrameItem aView( SID_DOCFRAME, pViewFrame ); SfxStringItem aName( SID_FILE_NAME, rURL ); SfxStringItem aTargetFrameName( SID_TARGETNAME, sTargetFrame ); @@ -540,6 +533,23 @@ void LoadURL( SwViewShell& rVSh, const OUString& rURL, LoadUrlFlags nFilter, SfxCallMode::ASYNCHRON|SfxCallMode::RECORD ); } +void LoadURL( SwViewShell& rVSh, const OUString& rURL, LoadUrlFlags nFilter, + const OUString& rTargetFrameName ) +{ + OSL_ENSURE( !rURL.isEmpty(), "what should be loaded here?" ); + if( rURL.isEmpty() ) + return ; + + // The shell could be 0 also!!!!! + if ( dynamic_cast<const SwCursorShell*>( &rVSh) == nullptr ) + return; + + //A CursorShell is always a WrtShell + SwWrtShell &rSh = static_cast<SwWrtShell&>(rVSh); + + ::LoadURL(rSh.GetView(), rURL, nFilter, rTargetFrameName); +} + void SwWrtShell::NavigatorPaste( const NaviContentBookmark& rBkmk, const sal_uInt16 nAction ) { commit 1a30b62ac7c23dd12aee88f0b90d8a715c652475 Author: Caolán McNamara <[email protected]> AuthorDate: Fri Nov 3 17:26:25 2023 +0000 Commit: Caolán McNamara <[email protected]> CommitDate: Wed Nov 29 15:03:34 2023 +0000 default to ignoring libreoffice special-purpose protocols in calc hyperlink Change-Id: Ib9f62be3acc05f24ca234dec0fec21e24579e9de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158911 Tested-by: Jenkins Tested-by: Caolán McNamara <[email protected]> Reviewed-by: Caolán McNamara <[email protected]> (cherry picked from commit b6062623b4d69c79e90e9365ac7c5e7f11986793) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159046 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Miklos Vajna <[email protected]> (cherry picked from commit cfe5672c069d6ed3a62dfc3370fdfbc80b6de434) (cherry picked from commit 5109649b65206ca6abd823fe2ccf07925e36d71b) (cherry picked from commit 01e7c1682b544266f7b85d58127e878484ea46b0) (cherry picked from commit ee4849d06b7db4dbb0bed9696c548ace8f8d8313) (cherry picked from commit 1b0c07506acadd615c560cbaa67f4bcb17132c24) diff --git a/dbaccess/source/core/dataaccess/ModelImpl.cxx b/dbaccess/source/core/dataaccess/ModelImpl.cxx index c24e2376e41a..60c467af5ccc 100644 --- a/dbaccess/source/core/dataaccess/ModelImpl.cxx +++ b/dbaccess/source/core/dataaccess/ModelImpl.cxx @@ -1133,7 +1133,8 @@ bool ODatabaseModelImpl::checkMacrosOnLoading() { Reference< XInteractionHandler > xInteraction; xInteraction = m_aMediaDescriptor.getOrDefault( "InteractionHandler", xInteraction ); - return m_aMacroMode.checkMacrosOnLoading( xInteraction ); + const bool bHasMacros = m_aMacroMode.hasMacros(); + return m_aMacroMode.checkMacrosOnLoading(xInteraction, false /*HasValidContentSignature*/, bHasMacros); } void ODatabaseModelImpl::resetMacroExecutionMode() diff --git a/include/sfx2/docmacromode.hxx b/include/sfx2/docmacromode.hxx index aa120240688e..c11601a40ae4 100644 --- a/include/sfx2/docmacromode.hxx +++ b/include/sfx2/docmacromode.hxx @@ -261,6 +261,8 @@ namespace sfx2 */ static bool storageHasMacros( const css::uno::Reference< css::embed::XStorage >& _rxStorage ); + bool hasMacros() const; + static bool containerHasBasicMacros( const css::uno::Reference< css::script::XLibraryContainer >& xContainer ); /** checks the macro execution mode while loading the document. @@ -288,7 +290,7 @@ namespace sfx2 bool checkMacrosOnLoading( const css::uno::Reference< css::task::XInteractionHandler >& _rxInteraction, - bool bHasValidContentSignature = false + bool bHasValidContentSignature, bool bHasMacros ); private: diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx index ee3d3d6eefb7..b9bd0dc82f25 100644 --- a/include/sfx2/objsh.hxx +++ b/include/sfx2/objsh.hxx @@ -433,6 +433,9 @@ public: void SetMacroCallsSeenWhileLoading(); bool GetMacroCallsSeenWhileLoading() const; + // true if the document had macros (or similar) on load to trigger warning user + bool GetHadCheckedMacrosOnLoad() const; + const css::uno::Sequence< css::beans::PropertyValue >& GetModifyPasswordInfo() const; bool SetModifyPasswordInfo( const css::uno::Sequence< css::beans::PropertyValue >& aInfo ); diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx index 221e1d31eb50..b7967414fd40 100644 --- a/sc/source/core/data/global.cxx +++ b/sc/source/core/data/global.cxx @@ -26,7 +26,9 @@ #include <sfx2/docfile.hxx> #include <sfx2/dispatch.hxx> #include <sfx2/objsh.hxx> +#include <sfx2/sfxresid.hxx> #include <sfx2/sfxsids.hrc> +#include <sfx2/strings.hrc> #include <sfx2/viewfrm.hxx> #include <sfx2/viewsh.hxx> #include <svl/intitem.hxx> @@ -35,6 +37,7 @@ #include <svl/zformat.hxx> #include <vcl/keycodes.hxx> #include <vcl/virdev.hxx> +#include <vcl/weld.hxx> #include <vcl/settings.hxx> #include <vcl/svapp.hxx> #include <unotools/charclass.hxx> @@ -772,7 +775,7 @@ void ScGlobal::OpenURL(const OUString& rURL, const OUString& rTarget, bool bIgno OUString aUrlName( rURL ); SfxViewFrame* pFrame = nullptr; - const SfxObjectShell* pObjShell = nullptr; + SfxObjectShell* pObjShell = nullptr; OUString aReferName; if ( pScActiveViewShell ) { @@ -806,6 +809,35 @@ void ScGlobal::OpenURL(const OUString& rURL, const OUString& rTarget, bool bIgno aUrlName = aNewUrlName; } + if (INetURLObject(aUrlName).IsExoticProtocol()) + { + // Default to ignoring exotic protocols + bool bAllow = false; + if (pObjShell) + { + // If the document had macros when loaded then follow the allowed macro-mode + if (pObjShell->GetHadCheckedMacrosOnLoad()) + bAllow = pObjShell->AdjustMacroMode(); + else // otherwise ask the user, defaulting to cancel + { + assert(pFrame && "if we have pObjShell we have pFrame"); + //Reuse URITools::onOpenURI warning string + std::unique_ptr<weld::MessageDialog> xQueryBox(Application::CreateMessageDialog(pFrame->GetFrameWeld(), + VclMessageType::Warning, VclButtonsType::YesNo, + SfxResId(STR_DANGEROUS_TO_OPEN))); + xQueryBox->set_primary_text(xQueryBox->get_primary_text().replaceFirst("$(ARG1)", + INetURLObject::decode(aUrlName, INetURLObject::DecodeMechanism::Unambiguous))); + xQueryBox->set_default_response(RET_NO); + bAllow = xQueryBox->run() == RET_YES; + } + } + if (!bAllow) + { + SAL_WARN("sc", "ScGlobal::OpenURL ignoring: " << aUrlName); + return; + } + } + SfxStringItem aUrl( SID_FILE_NAME, aUrlName ); SfxStringItem aTarget( SID_TARGETNAME, rTarget ); if ( nScClickMouseModifier & KEY_SHIFT ) // control-click -> into new window diff --git a/sfx2/source/doc/docmacromode.cxx b/sfx2/source/doc/docmacromode.cxx index c49f7cec00c6..919033cbaf5d 100644 --- a/sfx2/source/doc/docmacromode.cxx +++ b/sfx2/source/doc/docmacromode.cxx @@ -403,8 +403,12 @@ namespace sfx2 return bHasMacros; } + bool DocumentMacroMode::hasMacros() const + { + return m_xData->m_rDocumentAccess.documentStorageHasMacros() || hasMacroLibrary() || m_xData->m_rDocumentAccess.macroCallsSeenWhileLoading(); + } - bool DocumentMacroMode::checkMacrosOnLoading( const Reference< XInteractionHandler >& rxInteraction, bool bHasValidContentSignature ) + bool DocumentMacroMode::checkMacrosOnLoading( const Reference< XInteractionHandler >& rxInteraction, bool bHasValidContentSignature, bool bHasMacros ) { bool bAllow = false; if ( SvtSecurityOptions().IsMacroDisabled() ) @@ -414,7 +418,7 @@ namespace sfx2 } else { - if (m_xData->m_rDocumentAccess.documentStorageHasMacros() || hasMacroLibrary() || m_xData->m_rDocumentAccess.macroCallsSeenWhileLoading()) + if (bHasMacros) { if (m_xData->m_rDocumentAccess.macroCallsSeenWhileLoading()) m_bNeedsContentSigned = true; diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx index 75d8e1505987..518d9dd11132 100644 --- a/sfx2/source/doc/objmisc.cxx +++ b/sfx2/source/doc/objmisc.cxx @@ -944,9 +944,15 @@ void SfxObjectShell::CheckSecurityOnLoading_Impl() // check macro security const bool bHasValidContentSignature = HasValidSignatures(); - pImpl->aMacroMode.checkMacrosOnLoading( xInteraction, bHasValidContentSignature ); + const bool bHasMacros = pImpl->aMacroMode.hasMacros(); + pImpl->aMacroMode.checkMacrosOnLoading( xInteraction, bHasValidContentSignature, bHasMacros ); + pImpl->m_bHadCheckedMacrosOnLoad = bHasMacros; } +bool SfxObjectShell::GetHadCheckedMacrosOnLoad() const +{ + return pImpl->m_bHadCheckedMacrosOnLoad; +} void SfxObjectShell::CheckEncryption_Impl( const uno::Reference< task::XInteractionHandler >& xHandler ) { diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx index a746d1ac89fb..e6cfcf473524 100644 --- a/sfx2/source/doc/objxtor.cxx +++ b/sfx2/source/doc/objxtor.cxx @@ -211,6 +211,7 @@ SfxObjectShell_Impl::SfxObjectShell_Impl( SfxObjectShell& _rDocShell ) ,m_bAllowShareControlFileClean( true ) ,m_bConfigOptionsChecked( false ) ,m_bMacroCallsSeenWhileLoading( false ) + ,m_bHadCheckedMacrosOnLoad( false ) ,lErr(ERRCODE_NONE) ,nEventId ( SfxEventHintId::NONE ) ,nLoadedFlags ( SfxLoadedFlags::ALL ) diff --git a/sfx2/source/inc/objshimp.hxx b/sfx2/source/inc/objshimp.hxx index 21799f7cad49..d98a6d0673d5 100644 --- a/sfx2/source/inc/objshimp.hxx +++ b/sfx2/source/inc/objshimp.hxx @@ -90,7 +90,8 @@ struct SfxObjectShell_Impl : public ::sfx2::IMacroDocumentAccess m_bSharedXMLFlag:1, // whether the document should be edited in shared mode m_bAllowShareControlFileClean:1, // whether the flag should be stored in xml file m_bConfigOptionsChecked:1, // whether or not the user options are checked after the Options dialog is closed. - m_bMacroCallsSeenWhileLoading:1; // whether or not the user options are checked after the Options dialog is closed. + m_bMacroCallsSeenWhileLoading:1, // whether or not macro calls were seen when loading document. + m_bHadCheckedMacrosOnLoad:1; // if document contained macros (or calls) when loaded IndexBitSet aBitSet; ErrCode lErr; commit 13c0bdee068ad4af1f4e03461580ec7bddeb0d63 Author: Caolán McNamara <[email protected]> AuthorDate: Sat Nov 4 19:57:51 2023 +0000 Commit: Caolán McNamara <[email protected]> CommitDate: Wed Nov 29 15:03:34 2023 +0000 warn about exotic protocols as well Change-Id: I50dcf4f36cd20d75f5ad3876353143268740a50f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158902 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Miklos Vajna <[email protected]> (cherry picked from commit aafe05584e601236e84a165f2816b187189cfb77) (cherry picked from commit 799f0225d7171e6c04324ace1f31c7fe976662a4) (cherry picked from commit ae06669597e5a485676ba4394822cba8bb88d394) (cherry picked from commit a7138808fbb8eb263af436ee4227cbe9c829b676) (cherry picked from commit 19316aacbb9f1774565a157d21e70c88c490cef6) diff --git a/sw/source/filter/html/htmlplug.cxx b/sw/source/filter/html/htmlplug.cxx index 90036cfac67a..424b7d10b159 100644 --- a/sw/source/filter/html/htmlplug.cxx +++ b/sw/source/filter/html/htmlplug.cxx @@ -1092,7 +1092,7 @@ void SwHTMLParser::InsertFloatingFrame() OUString sHRef = aFrameDesc.GetURL().GetMainURL( INetURLObject::DecodeMechanism::NONE ); - if (INetURLObject(sHRef).GetProtocol() == INetProtocol::Macro) + if (INetURLObject(sHRef).IsExoticProtocol()) NotifyMacroEventRead(); xSet->setPropertyValue("FrameURL", uno::makeAny( sHRef ) ); diff --git a/sw/source/filter/xml/xmltexti.cxx b/sw/source/filter/xml/xmltexti.cxx index eaf45dd91cd4..267f4cad960f 100644 --- a/sw/source/filter/xml/xmltexti.cxx +++ b/sw/source/filter/xml/xmltexti.cxx @@ -860,7 +860,7 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertFloatingFra OUString sHRef = URIHelper::SmartRel2Abs( INetURLObject( GetXMLImport().GetBaseURL() ), rHRef ); - if (INetURLObject(sHRef).GetProtocol() == INetProtocol::Macro) + if (INetURLObject(sHRef).IsExoticProtocol()) GetXMLImport().NotifyMacroEventRead(); xSet->setPropertyValue("FrameURL", diff --git a/tools/source/fsys/urlobj.cxx b/tools/source/fsys/urlobj.cxx index 23a1e757d590..a7efc3fc363d 100644 --- a/tools/source/fsys/urlobj.cxx +++ b/tools/source/fsys/urlobj.cxx @@ -4767,7 +4767,8 @@ bool INetURLObject::IsExoticProtocol() const return m_eScheme == INetProtocol::Slot || m_eScheme == INetProtocol::Macro || m_eScheme == INetProtocol::Uno || - isSchemeEqualTo(u"vnd.sun.star.script"); + isSchemeEqualTo(u"vnd.sun.star.script") || + isSchemeEqualTo(u"service"); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx index 3885f3b9219f..a51a5bc90024 100644 --- a/xmloff/source/draw/ximpshap.cxx +++ b/xmloff/source/draw/ximpshap.cxx @@ -3257,7 +3257,7 @@ void SdXMLFloatingFrameShapeContext::StartElement( const css::uno::Reference< cs if( !maHref.isEmpty() ) { - if (INetURLObject(maHref).GetProtocol() == INetProtocol::Macro) + if (INetURLObject(maHref).IsExoticProtocol()) GetImport().NotifyMacroEventRead(); xProps->setPropertyValue("FrameURL", Any(maHref) ); commit eb42c9ad6473fb84fb5c02e522efe01e68e3ce43 Author: Caolán McNamara <[email protected]> AuthorDate: Fri Nov 3 17:14:26 2023 +0000 Commit: Caolán McNamara <[email protected]> CommitDate: Wed Nov 29 15:03:34 2023 +0000 add some protocols that don't make sense as floating frame targets Change-Id: Id900a5eef248731d1184c1df501a2cf7a2de7eb9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158910 Tested-by: Jenkins Reviewed-by: Caolán McNamara <[email protected]> (cherry picked from commit 11ebdfef16501c6d35c3e3d0d62507f706557c71) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158901 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Miklos Vajna <[email protected]> (cherry picked from commit 73e90d15c48a8f148e4e8f024cdf1b397efbcc53) (cherry picked from commit b35aa37a5d1f32a419e7f311e415615808731acd) (cherry picked from commit 421be99a6b101ac4ec91ad95b48c50fa17e47d36) (cherry picked from commit fa390145228c9b9a044698fe4b7636c05210fda3) (cherry picked from commit e549b65636b31971d8fb7fafc92e683bdef35cb6) diff --git a/include/tools/urlobj.hxx b/include/tools/urlobj.hxx index 1fb5f4e86aea..66c562f90062 100644 --- a/include/tools/urlobj.hxx +++ b/include/tools/urlobj.hxx @@ -920,6 +920,11 @@ public: void changeScheme(INetProtocol eTargetScheme); + // INetProtocol::Macro, INetProtocol::Uno, INetProtocol::Slot, + // vnd.sun.star.script, etc. All the types of URLs which shouldn't + // be accepted from an outside controlled source + bool IsExoticProtocol() const; + private: // General Structure: diff --git a/sfx2/source/doc/iframe.cxx b/sfx2/source/doc/iframe.cxx index e73fb1f1f2d1..dec4ac8dc3f7 100644 --- a/sfx2/source/doc/iframe.cxx +++ b/sfx2/source/doc/iframe.cxx @@ -37,6 +37,7 @@ #include <cppuhelper/implbase.hxx> #include <cppuhelper/supportsservice.hxx> #include <officecfg/Office/Common.hxx> +#include <sal/log.hxx> #include <svl/itemprop.hxx> #include <sfx2/docfile.hxx> #include <sfx2/frmdescr.hxx> @@ -167,8 +168,11 @@ sal_Bool SAL_CALL IFrameObject::load( xTrans->parseStrict( aTargetURL ); INetURLObject aURLObject(aTargetURL.Complete); - if (aURLObject.GetProtocol() == INetProtocol::Macro || aURLObject.isSchemeEqualTo(u"vnd.sun.star.script")) + if (aURLObject.IsExoticProtocol()) + { + SAL_WARN("sfx", "IFrameObject::load ignoring: " << aTargetURL.Complete); return false; + } uno::Reference<frame::XFramesSupplier> xParentFrame = xFrame->getCreator(); SfxObjectShell* pDoc = SfxMacroLoader::GetObjectShell(xParentFrame); diff --git a/tools/source/fsys/urlobj.cxx b/tools/source/fsys/urlobj.cxx index d52edb1d2f2a..23a1e757d590 100644 --- a/tools/source/fsys/urlobj.cxx +++ b/tools/source/fsys/urlobj.cxx @@ -4762,4 +4762,12 @@ OUString INetURLObject::CutExtension() ? aTheExtension : OUString(); } +bool INetURLObject::IsExoticProtocol() const +{ + return m_eScheme == INetProtocol::Slot || + m_eScheme == INetProtocol::Macro || + m_eScheme == INetProtocol::Uno || + isSchemeEqualTo(u"vnd.sun.star.script"); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ commit 714e464631533901314f3189ce293dca47bec20e Author: Caolán McNamara <[email protected]> AuthorDate: Fri Nov 3 14:20:07 2023 +0000 Commit: Caolán McNamara <[email protected]> CommitDate: Wed Nov 29 15:03:34 2023 +0000 escape url passed to gstreamer Change-Id: I3c93ee34800cc8563370f75ef3ef6f8a9220e6ec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158895 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Miklos Vajna <[email protected]> (cherry picked from commit 2ee1167da1952b133280db2ae26eed6bf0303bc2) (cherry picked from commit a77d9c151f043f070512488d84f0b839f4ed4553) (cherry picked from commit 2b896a0ba8818804b89735bd7c8991fa8eb3d7b5) (cherry picked from commit 0f14350fe70907d4466bcef15bfe05865b37babd) (cherry picked from commit 9b7df77e3491add0919d8de993df0f40d7c58a70) diff --git a/avmedia/source/gstreamer/gstframegrabber.cxx b/avmedia/source/gstreamer/gstframegrabber.cxx index 7da1917a019b..c49528496e25 100644 --- a/avmedia/source/gstreamer/gstframegrabber.cxx +++ b/avmedia/source/gstreamer/gstframegrabber.cxx @@ -51,11 +51,9 @@ void FrameGrabber::disposePipeline() FrameGrabber::FrameGrabber( const OUString &rURL ) : FrameGrabber_BASE() { - gchar *pPipelineStr; - pPipelineStr = g_strdup_printf( - "uridecodebin uri=%s ! videoconvert ! videoscale ! appsink " - "name=sink caps=\"video/x-raw,format=RGB,pixel-aspect-ratio=1/1\"", - OUStringToOString( rURL, RTL_TEXTENCODING_UTF8 ).getStr() ); + const char pPipelineStr[] = + "uridecodebin name=source ! videoconvert ! videoscale ! appsink " + "name=sink caps=\"video/x-raw,format=RGB,pixel-aspect-ratio=1/1\""; GError *pError = nullptr; mpPipeline = gst_parse_launch( pPipelineStr, &pError ); @@ -66,6 +64,12 @@ FrameGrabber::FrameGrabber( const OUString &rURL ) : } if( mpPipeline ) { + + if (GstElement *pUriDecode = gst_bin_get_by_name(GST_BIN(mpPipeline), "source")) + g_object_set(pUriDecode, "uri", OUStringToOString(rURL, RTL_TEXTENCODING_UTF8).getStr(), nullptr); + else + g_warning("Missing 'source' element in gstreamer pipeline"); + // pre-roll switch( gst_element_set_state( mpPipeline, GST_STATE_PAUSED ) ) { case GST_STATE_CHANGE_FAILURE: commit 579215d60f5e721837f7ba0ac43686b0592e0e1f Author: Caolán McNamara <[email protected]> AuthorDate: Wed Nov 29 13:05:22 2023 +0000 Commit: Caolán McNamara <[email protected]> CommitDate: Wed Nov 29 15:03:34 2023 +0000 fix build for recent gcc Change-Id: I0da00c17ca5959d6845b5d006fec17fe16b17cfe diff --git a/connectivity/source/inc/java/tools.hxx b/connectivity/source/inc/java/tools.hxx index aa7cb20cad9b..b267459b1dd8 100644 --- a/connectivity/source/inc/java/tools.hxx +++ b/connectivity/source/inc/java/tools.hxx @@ -27,7 +27,7 @@ #include <com/sun/star/container/XNameAccess.hpp> #include <com/sun/star/io/XInputStream.hpp> - +#include <memory> namespace connectivity { diff --git a/extensions/source/propctrlr/handlerhelper.hxx b/extensions/source/propctrlr/handlerhelper.hxx index 9e40dab0a79d..9d7838bf2018 100644 --- a/extensions/source/propctrlr/handlerhelper.hxx +++ b/extensions/source/propctrlr/handlerhelper.hxx @@ -27,6 +27,7 @@ #include <com/sun/star/beans/PropertyAttribute.hpp> #include <com/sun/star/beans/Optional.hpp> +#include <memory> #include <vector> namespace weld { class Builder; class Widget; class Window; } diff --git a/external/gpgmepp/UnpackedTarball_gpgmepp.mk b/external/gpgmepp/UnpackedTarball_gpgmepp.mk index 2e9eb3d826ff..b314357734ab 100644 --- a/external/gpgmepp/UnpackedTarball_gpgmepp.mk +++ b/external/gpgmepp/UnpackedTarball_gpgmepp.mk @@ -34,5 +34,6 @@ $(eval $(call gb_UnpackedTarball_add_patches,gpgmepp, \ external/gpgmepp/c++20.patch \ external/gpgmepp/clang-cl.patch \ external/gpgmepp/configure.patch \ + external/gpgmepp/gpgme.git-4b64774b6d13ffa4f59dddf947a97d61bcfa2f2e.patch.1 \ )) # vim: set noet sw=4 ts=4: diff --git a/external/gpgmepp/gpgme.git-4b64774b6d13ffa4f59dddf947a97d61bcfa2f2e.patch.1 b/external/gpgmepp/gpgme.git-4b64774b6d13ffa4f59dddf947a97d61bcfa2f2e.patch.1 new file mode 100644 index 000000000000..8b12c1785ccf --- /dev/null +++ b/external/gpgmepp/gpgme.git-4b64774b6d13ffa4f59dddf947a97d61bcfa2f2e.patch.1 @@ -0,0 +1,32 @@ +From 4b64774b6d13ffa4f59dddf947a97d61bcfa2f2e Mon Sep 17 00:00:00 2001 +From: Jiri Kucera <[email protected]> +Date: Sun, 25 Jul 2021 11:35:54 +0200 +Subject: [PATCH] core: Support closefrom also for glibc. + +* src/posix-io.c (_gpgme_io_spawn): Use glibc's closefrom. +-- + +Since 2.34, glibc introduces closefrom (the implementation +follows *BSD standard). + +Signed-off-by: Werner Koch <[email protected]> +--- + src/posix-io.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/posix-io.c b/src/posix-io.c +index e712ef28..2a3a81fc 100644 +--- a/src/posix-io.c ++++ b/src/posix-io.c +@@ -570,7 +570,7 @@ _gpgme_io_spawn (const char *path, char *const argv[], unsigned int flags, + if (fd_list[i].fd > fd) + fd = fd_list[i].fd; + fd++; +-#if defined(__sun) || defined(__FreeBSD__) ++#if defined(__sun) || defined(__FreeBSD__) || defined(__GLIBC__) + closefrom (fd); + max_fds = fd; + #else /*!__sun */ +-- +2.11.0 + diff --git a/external/liborcus/include.patch.0 b/external/liborcus/include.patch.0 index a3275b1b13fa..ee7dfd57372c 100644 --- a/external/liborcus/include.patch.0 +++ b/external/liborcus/include.patch.0 @@ -28,3 +28,13 @@ using namespace std; +--- include/orcus/types.hpp ++++ include/orcus/types.hpp +@@ -16,6 +16,7 @@ + #pragma GCC diagnostic ignored "-Wshadow" + #endif + ++#include <cstdint> + #include <cstdlib> + #include <vector> + #include <string> diff --git a/external/libpagemaker/UnpackedTarball_libpagemaker.mk b/external/libpagemaker/UnpackedTarball_libpagemaker.mk index 752d5c0ebe21..abe62a7e1045 100644 --- a/external/libpagemaker/UnpackedTarball_libpagemaker.mk +++ b/external/libpagemaker/UnpackedTarball_libpagemaker.mk @@ -11,6 +11,12 @@ $(eval $(call gb_UnpackedTarball_UnpackedTarball,libpagemaker)) $(eval $(call gb_UnpackedTarball_set_tarball,libpagemaker,$(PAGEMAKER_TARBALL))) +$(eval $(call gb_UnpackedTarball_set_patchlevel,libpagemaker,1)) + $(eval $(call gb_UnpackedTarball_update_autoconf_configs,libpagemaker)) +$(eval $(call gb_UnpackedTarball_add_patches,libpagemaker,\ + external/libpagemaker/cstdint.patch.0 \ +)) + # vim: set noet sw=4 ts=4: diff --git a/external/libpagemaker/cstdint.patch.0 b/external/libpagemaker/cstdint.patch.0 new file mode 100644 index 000000000000..f8fba20e6046 --- /dev/null +++ b/external/libpagemaker/cstdint.patch.0 @@ -0,0 +1,10 @@ +--- src/lib/Units.h 2023-05-29 10:21:08.022718509 +0100 ++++ src/lib/Units.h 2023-05-29 10:21:16.838724433 +0100 +@@ -10,6 +10,7 @@ + #ifndef LIBPAGEMAKER_UNITS_H + #define LIBPAGEMAKER_UNITS_H + ++#include <cstdint> + #include <string> + + // TODO: remove this pointless abstraction. diff --git a/filter/source/xsltdialog/xmlfilterjar.hxx b/filter/source/xsltdialog/xmlfilterjar.hxx index 7e469fb202fb..1e36221b0110 100644 --- a/filter/source/xsltdialog/xmlfilterjar.hxx +++ b/filter/source/xsltdialog/xmlfilterjar.hxx @@ -23,6 +23,7 @@ #include <com/sun/star/lang/XSingleServiceFactory.hpp> #include <com/sun/star/uno/XComponentContext.hpp> +#include <memory> #include <vector> class filter_info_impl; diff --git a/forms/source/component/EventThread.hxx b/forms/source/component/EventThread.hxx index be9e9696734e..20aff73113db 100644 --- a/forms/source/component/EventThread.hxx +++ b/forms/source/component/EventThread.hxx @@ -21,6 +21,7 @@ #include <sal/config.h> +#include <memory> #include <vector> #include <com/sun/star/lang/XEventListener.hpp> diff --git a/forms/source/xforms/propertysetbase.hxx b/forms/source/xforms/propertysetbase.hxx index d6ba2efda2eb..a69ad487d4ea 100644 --- a/forms/source/xforms/propertysetbase.hxx +++ b/forms/source/xforms/propertysetbase.hxx @@ -27,6 +27,7 @@ #include <com/sun/star/beans/PropertyAttribute.hpp> #include <map> +#include <memory> namespace com::sun::star::uno { class Any; diff --git a/fpicker/source/office/contentenumeration.hxx b/fpicker/source/office/contentenumeration.hxx index f6a48c5c3360..9c36f0372ee7 100644 --- a/fpicker/source/office/contentenumeration.hxx +++ b/fpicker/source/office/contentenumeration.hxx @@ -25,6 +25,7 @@ #include <ucbhelper/content.hxx> #include <rtl/ustring.hxx> #include <tools/datetime.hxx> +#include <memory> namespace svt { diff --git a/include/oox/crypto/StrongEncryptionDataSpace.hxx b/include/oox/crypto/StrongEncryptionDataSpace.hxx index f3fcff9edaab..0399d03b6eee 100644 --- a/include/oox/crypto/StrongEncryptionDataSpace.hxx +++ b/include/oox/crypto/StrongEncryptionDataSpace.hxx @@ -17,6 +17,7 @@ #include <com/sun/star/packages/XPackageEncryption.hpp> #include <com/sun/star/io/XInputStream.hpp> #include <oox/crypto/CryptoEngine.hxx> +#include <memory> namespace com::sun::star::uno { diff --git a/include/svtools/imageresourceaccess.hxx b/include/svtools/imageresourceaccess.hxx index d7e8a5629b11..7699a51a164a 100644 --- a/include/svtools/imageresourceaccess.hxx +++ b/include/svtools/imageresourceaccess.hxx @@ -21,6 +21,7 @@ #include <config_options.h> #include <svtools/svtdllapi.h> +#include <memory> #include <com/sun/star/uno/Reference.hxx> diff --git a/include/vcl/BitmapBuffer.hxx b/include/vcl/BitmapBuffer.hxx index 4a4ec8404a08..3a68ef06dcc6 100644 --- a/include/vcl/BitmapBuffer.hxx +++ b/include/vcl/BitmapBuffer.hxx @@ -24,6 +24,7 @@ #include <vcl/BitmapPalette.hxx> #include <vcl/ColorMask.hxx> #include <vcl/Scanline.hxx> +#include <memory> struct SalTwoRect; diff --git a/include/vcl/font/Feature.hxx b/include/vcl/font/Feature.hxx index 13c798fbcf32..65992a309c17 100644 --- a/include/vcl/font/Feature.hxx +++ b/include/vcl/font/Feature.hxx @@ -12,6 +12,7 @@ #include <vcl/dllapi.h> #include <rtl/ustring.hxx> +#include <cstdint> #include <vector> namespace vcl::font diff --git a/io/source/acceptor/acc_pipe.cxx b/io/source/acceptor/acc_pipe.cxx index 69f1cad79206..c671e2a278a8 100644 --- a/io/source/acceptor/acc_pipe.cxx +++ b/io/source/acceptor/acc_pipe.cxx @@ -26,6 +26,7 @@ #include <osl/diagnose.h> #include <osl/mutex.hxx> #include <cppuhelper/implbase.hxx> +#include <memory> using namespace ::osl; using namespace ::cppu; diff --git a/io/source/acceptor/acc_socket.cxx b/io/source/acceptor/acc_socket.cxx index 9700cd566bb8..41722235ff21 100644 --- a/io/source/acceptor/acc_socket.cxx +++ b/io/source/acceptor/acc_socket.cxx @@ -19,6 +19,7 @@ #include "acceptor.hxx" +#include <memory> #include <unordered_set> #include <osl/mutex.hxx> diff --git a/io/source/connector/connector.cxx b/io/source/connector/connector.cxx index c6f01e130814..b828c228e9da 100644 --- a/io/source/connector/connector.cxx +++ b/io/source/connector/connector.cxx @@ -30,6 +30,7 @@ #include <com/sun/star/connection/NoConnectException.hpp> #include <com/sun/star/connection/XConnector.hpp> #include <com/sun/star/uno/XComponentContext.hpp> +#include <memory> #include "connector.hxx" diff --git a/sot/source/unoolestorage/xolesimplestorage.hxx b/sot/source/unoolestorage/xolesimplestorage.hxx index ef0214ba61c3..3169c9ccc1be 100644 --- a/sot/source/unoolestorage/xolesimplestorage.hxx +++ b/sot/source/unoolestorage/xolesimplestorage.hxx @@ -27,6 +27,7 @@ #include <cppuhelper/implbase.hxx> #include <osl/mutex.hxx> +#include <memory> namespace com::sun::star::container { class XNameAccess; } namespace com::sun::star::io { class XInputStream; } diff --git a/starmath/inc/token.hxx b/starmath/inc/token.hxx index cc295cc5fe28..555799b6bee8 100644 --- a/starmath/inc/token.hxx +++ b/starmath/inc/token.hxx @@ -34,6 +34,7 @@ #include <rtl/ustring.hxx> #include <o3tl/typed_flags_set.hxx> #include <tools/color.hxx> +#include <memory> // TokenGroups enum class TG diff --git a/svx/source/unodialogs/textconversiondlgs/chinese_translation_unodialog.hxx b/svx/source/unodialogs/textconversiondlgs/chinese_translation_unodialog.hxx index e31765478cf0..97ead05604d0 100644 --- a/svx/source/unodialogs/textconversiondlgs/chinese_translation_unodialog.hxx +++ b/svx/source/unodialogs/textconversiondlgs/chinese_translation_unodialog.hxx @@ -27,7 +27,7 @@ #include <com/sun/star/uno/XComponentContext.hpp> #include <cppuhelper/implbase.hxx> #include <comphelper/interfacecontainer2.hxx> - +#include <memory> namespace textconversiondlgs { diff --git a/sw/source/uibase/docvw/OverlayRanges.hxx b/sw/source/uibase/docvw/OverlayRanges.hxx index e086b8462ea2..829f0c4001dc 100644 --- a/sw/source/uibase/docvw/OverlayRanges.hxx +++ b/sw/source/uibase/docvw/OverlayRanges.hxx @@ -22,6 +22,7 @@ #include <svx/sdr/overlay/overlayobject.hxx> #include <basegfx/range/b2drange.hxx> +#include <memory> #include <vector> class SwView; diff --git a/sw/source/uibase/docvw/ShadowOverlayObject.hxx b/sw/source/uibase/docvw/ShadowOverlayObject.hxx index df8e27009f5e..4d43849cbbe8 100644 --- a/sw/source/uibase/docvw/ShadowOverlayObject.hxx +++ b/sw/source/uibase/docvw/ShadowOverlayObject.hxx @@ -20,6 +20,7 @@ #pragma once #include <svx/sdr/overlay/overlayobject.hxx> +#include <memory> class SwView; diff --git a/xmlsecurity/source/gpg/SecurityEnvironment.hxx b/xmlsecurity/source/gpg/SecurityEnvironment.hxx index c815e0e1f5d2..d02cd1b3d430 100644 --- a/xmlsecurity/source/gpg/SecurityEnvironment.hxx +++ b/xmlsecurity/source/gpg/SecurityEnvironment.hxx @@ -17,6 +17,7 @@ #include <com/sun/star/uno/Reference.hxx> #include <com/sun/star/xml/crypto/XSecurityEnvironment.hpp> #include <com/sun/star/lang/XUnoTunnel.hpp> +#include <memory> namespace com::sun::star::security { class XCertificate; } namespace GpgME { class Context; } diff --git a/xmlsecurity/source/helper/ooxmlsecparser.hxx b/xmlsecurity/source/helper/ooxmlsecparser.hxx index 4c6d06caaa31..a72c5d4cc8e9 100644 --- a/xmlsecurity/source/helper/ooxmlsecparser.hxx +++ b/xmlsecurity/source/helper/ooxmlsecparser.hxx @@ -17,6 +17,7 @@ #include <xmloff/namespacemap.hxx> +#include <memory> #include <stack> class XSecController; diff --git a/xmlsecurity/source/helper/xsecparser.hxx b/xmlsecurity/source/helper/xsecparser.hxx index 6dcc29985c85..f58a030138b2 100644 --- a/xmlsecurity/source/helper/xsecparser.hxx +++ b/xmlsecurity/source/helper/xsecparser.hxx @@ -27,6 +27,7 @@ #include <xmloff/namespacemap.hxx> +#include <memory> #include <stack> class XMLSignatureHelper;
