[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - sfx2/Library_sfx.mk sfx2/source
Tor Lillqvist (via logerrit)
logerrit at kemper.freedesktop.org
Tue Apr 6 10:42:46 UTC 2021
sfx2/Library_sfx.mk | 3 ---
sfx2/source/appl/sfxhelp.cxx | 42 +-----------------------------------------
2 files changed, 1 insertion(+), 44 deletions(-)
New commits:
commit 17be30744b0d5528ac062b580d3e6bde23a1e313
Author: Tor Lillqvist <tml at collabora.com>
AuthorDate: Tue Jul 21 13:30:42 2020 +0300
Commit: Tor Lillqvist <tml at iki.fi>
CommitDate: Tue Apr 6 13:26:59 2021 +0300
Revert "tdf#125578 force webhelp as workaround for Safari sandboxing..."
That change also prevented local help from being displayed in the
built-in viewer on macOS. But we do want local help in Collabora
Office on macOS from this branch. At least for now. Do not revert the
part of 44893662d510c4173e55ba27af02d0258a697a5d that fixed the error
in the meta element.
Also: Revert "loplugin:nullptr (macOS)".
This partially reverts commit
44893662d510c4173e55ba27af02d0258a697a5d. This reverts commit
ffed2de3e412ff35979ecea92c3d49eefe0fcc5d.
Change-Id: I98805b4c39dc01c7d8e9d7f8f09abc61a103480c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99134
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Tor Lillqvist <tml at collabora.com>
diff --git a/sfx2/Library_sfx.mk b/sfx2/Library_sfx.mk
index cf3eaed6f81a..9103e633e104 100644
--- a/sfx2/Library_sfx.mk
+++ b/sfx2/Library_sfx.mk
@@ -324,9 +324,6 @@ $(eval $(call gb_Library_add_defs,sfx,\
endif
ifeq ($(OS),MACOSX)
-$(eval $(call gb_Library_add_cxxflags,sfx,\
- $(gb_OBJCXXFLAGS) \
-))
$(eval $(call gb_Library_add_objcxxobjects,sfx,\
sfx2/source/appl/shutdowniconaqua \
))
diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx
index 7d81085fa651..6c8fe3d8211e 100644
--- a/sfx2/source/appl/sfxhelp.cxx
+++ b/sfx2/source/appl/sfxhelp.cxx
@@ -23,13 +23,6 @@
#include <string_view>
#include <algorithm>
#include <cassert>
-#ifdef MACOSX
-#include <premac.h>
-#include <Foundation/NSString.h>
-#include <CoreFoundation/CFURL.h>
-#include <CoreServices/CoreServices.h>
-#include <postmac.h>
-#endif
#include <sal/log.hxx>
#include <com/sun/star/uno/Reference.h>
@@ -735,16 +728,7 @@ static bool impl_showOnlineHelp( const OUString& rURL )
try
{
-#ifdef MACOSX
- LSOpenCFURLRef(CFURLCreateWithString(kCFAllocatorDefault,
- CFStringCreateWithCString(kCFAllocatorDefault,
- aHelpLink.toUtf8().getStr(),
- kCFStringEncodingUTF8),
- nullptr),
- nullptr);
-#else
sfx2::openUriExternally(aHelpLink, false);
-#endif
return true;
}
catch (const Exception&)
@@ -965,18 +949,10 @@ static bool impl_showOfflineHelp( const OUString& rURL )
pStream->WriteUnicodeOrByteText(aTempStr);
aTempFile.CloseStream();
+
try
{
-#ifdef MACOSX
- LSOpenCFURLRef(CFURLCreateWithString(kCFAllocatorDefault,
- CFStringCreateWithCString(kCFAllocatorDefault,
- aTempFile.GetURL().toUtf8().getStr(),
- kCFStringEncodingUTF8),
- nullptr),
- nullptr);
-#else
sfx2::openUriExternally(aTempFile.GetURL(), false);
-#endif
return true;
}
catch (const Exception&)
@@ -1099,22 +1075,6 @@ bool SfxHelp::Start_Impl(const OUString& rURL, const vcl::Window* pWindow, const
impl_showOnlineHelp( aHelpURL );
return true;
}
-#ifdef MACOSX
- if (@available(macOS 10.14, *)) {
- // Workaround: Safari sandboxing prevents it from accessing files in the LibreOffice.app folder
- // force online-help instead if Safari is default browser.
- CFURLRef pBrowser = LSCopyDefaultApplicationURLForURL(
- CFURLCreateWithString(
- kCFAllocatorDefault,
- static_cast<CFStringRef>(@"https://www.libreoffice.org"),
- nullptr),
- kLSRolesAll, nullptr);
- if([static_cast<NSString*>(CFURLGetString(pBrowser)) isEqualToString:@"file:///Applications/Safari.app/"]) {
- impl_showOnlineHelp( aHelpURL );
- return true;
- }
- }
-#endif
// If the HTML or no help is installed, but aHelpURL nevertheless references valid help content,
// that implies that this help content belongs to an extension (and thus would not be available
More information about the Libreoffice-commits
mailing list