summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2016-08-10 17:33:22 +0300
committerTor Lillqvist <tml@collabora.com>2016-08-10 17:42:52 +0300
commit38a3743e0c5d52f9386f74097fd512d3133fbbe3 (patch)
tree8ca68d90da62a062681a4e7ccb4981c071b56adb
parent2c76fd1e04441889fbc416d4e5815ef31b474193 (diff)
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 5334ff287c65f028753171c7b38da7ffbcebc1cc.
-rw-r--r--framework/source/loadenv/loadenv.cxx18
1 files changed, 3 insertions, 15 deletions
diff --git a/framework/source/loadenv/loadenv.cxx b/framework/source/loadenv/loadenv.cxx
index a7fcf579c609..b6f6f4c92178 100644
--- a/framework/source/loadenv/loadenv.cxx
+++ b/framework/source/loadenv/loadenv.cxx
@@ -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());