https://bugs.documentfoundation.org/show_bug.cgi?id=125093
Mike Kaganski <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |WONTFIX --- Comment #4 from Mike Kaganski <[email protected]> --- FTR: IInternetSecurityManager handles everything required itself: mapping both the location, the Zone.Identifier stream, and even something called "Mark of the Web", itself. So this function would suffice: static bool IsRestrictedZone(const OUString& sURL) { #ifdef _WIN32 if (sURL.isEmpty()) return false; try { DWORD dwZone; sal::systools::COMReference<IInternetSecurityManager> ism(CLSID_InternetSecurityManager); sal::systools::ThrowIfFailed( ism->MapUrlToZone(o3tl::toW(sURL.getStr()), &dwZone, MUTZ_DONT_UNESCAPE), "IInternetSecurityManager::MapUrlToZone failed"); if (dwZone >= URLZONE_INTERNET) return true; } catch (const sal::systools::ComError&) { // No problem; assume no zone information == no restriction } #else (void)sURL; #endif return false; } Using it as another condition to SetReadOnlyUI() in SfxObjectShell::DoLoad would do - except the infobar would not hint why the read-only happened. So I put it all here, because I don't have energy to do deeper modifications in UI myself. Also there seem to be no similar requests - so maybe it's just me, and not needed to users actually. So - WF; but if someone decides to implement, please reopen and do it. -- You are receiving this mail because: You are the assignee for the bug.
