Kaydet (Commit) 38a3743e authored tarafından Tor Lillqvist's avatar Tor Lillqvist

Revert "tdf#98837 - Fail loading a new document with read only property set to true"

There was not really a good enough reason for the change, and it
causes unfortunate regressions in 3rd-party code that previously
worked fine. (It also caused two regressions in LO's own code, but
those were already fixed.)

This reverts commit 5334ff28.
üst 2c76fd1e
......@@ -552,25 +552,13 @@ LoadEnv::EContentType LoadEnv::classifyContent(const OUString&
in a special way .-)
*/
utl::MediaDescriptor stlMediaDescriptor(lMediaDescriptor);
utl::MediaDescriptor::const_iterator pIt;
// creation of new documents
if (ProtocolCheck::isProtocol(sURL,ProtocolCheck::E_PRIVATE_FACTORY))
{
//tdf#98837 - check if read only prop is set to true for a new document
//if yes then fail loading as doc needs to be saved before being opened
//in read only mode
pIt = stlMediaDescriptor.find(utl::MediaDescriptor::PROP_READONLY());
if( pIt == stlMediaDescriptor.end() ||
pIt->second == uno::Any(false)
)
return E_CAN_BE_LOADED;
SAL_INFO("fwk", "LoadEnv::classifyContent(): new document can not be loaded in read only mode");
return E_UNSUPPORTED_CONTENT;
}
return E_CAN_BE_LOADED;
// using of an existing input stream
utl::MediaDescriptor stlMediaDescriptor(lMediaDescriptor);
utl::MediaDescriptor::const_iterator pIt;
if (ProtocolCheck::isProtocol(sURL,ProtocolCheck::E_PRIVATE_STREAM))
{
pIt = stlMediaDescriptor.find(utl::MediaDescriptor::PROP_INPUTSTREAM());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment