diff options
author | Pranav Kant <pranavk@collabora.co.uk> | 2016-11-10 23:06:15 +0530 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2016-11-10 22:57:52 +0100 |
commit | 9d798cd6f4f0f37156dc9c22e87de82fbbdd4c6f (patch) | |
tree | 5340e1b766a5e8a54e575798d4bc9fe5ae18e3dd | |
parent | b74e4d65ef431da6727a136b63f644a3e103fee8 (diff) |
tdf#103671: 'true' -> true2.0-rc11.9.8
Treat booleans as booleans, not string
Change-Id: Id0d3bee44b42461671379754e64e5e2f9b318045
(cherry picked from commit dacf16f2d85d2fb5a4de8da52ce64b6409a7dbcd)
-rw-r--r-- | loolwsd/Storage.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/loolwsd/Storage.cpp b/loolwsd/Storage.cpp index dcaa0a7ea..c58b1bf23 100644 --- a/loolwsd/Storage.cpp +++ b/loolwsd/Storage.cpp @@ -346,17 +346,17 @@ WopiStorage::WOPIFileInfo WopiStorage::getWOPIFileInfo(const Poco::URI& uriPubli const auto userNameVar = getOrWarn(object,"UserFriendlyName"); userName = (userNameVar.isString() ? userNameVar.toString() : "anonymous"); const auto canWriteVar = getOrWarn(object, "UserCanWrite"); - canWrite = canWriteVar.isString() ? (canWriteVar.toString() == "true") : false; + canWrite = canWriteVar.isBoolean() ? canWriteVar.convert<bool>() : false; const auto postMessageOriginVar = getOrWarn(object, "PostMessageOrigin"); postMessageOrigin = postMessageOriginVar.isString() ? postMessageOriginVar.toString() : ""; const auto hidePrintOptionVar = getOrWarn(object, "HidePrintOption"); - hidePrintOption = hidePrintOptionVar.isString() ? (hidePrintOptionVar.toString() == "true") : false; + hidePrintOption = hidePrintOptionVar.isBoolean() ? hidePrintOptionVar.convert<bool>() : false; const auto hideSaveOptionVar = getOrWarn(object, "HideSaveOption"); - hideSaveOption = hideSaveOptionVar.isString() ? (hideSaveOptionVar.toString() == "true") : false; + hideSaveOption = hideSaveOptionVar.isBoolean() ? hideSaveOptionVar.convert<bool>() : false; const auto hideExportOptionVar = getOrWarn(object, "HideExportOption"); - hideExportOption = hideExportOptionVar.isString() ? (hideExportOptionVar.toString() == "true") : false; + hideExportOption = hideExportOptionVar.isBoolean() ? hideExportOptionVar.convert<bool>() : false; const auto enableOwnerTerminationVar = getOrWarn(object, "EnableOwnerTermination"); - enableOwnerTermination = enableOwnerTerminationVar.isString() ? (enableOwnerTerminationVar.toString() == "true") : false; + enableOwnerTermination = enableOwnerTerminationVar.isBoolean() ? enableOwnerTerminationVar.convert<bool>() : false; } else Log::error("WOPI::CheckFileInfo is missing JSON payload"); |