From 22ba9b2833a1ec11b97f1e1440b8d59be317e463 Mon Sep 17 00:00:00 2001
From: uhensler <urs.hensler@frentix.com>
Date: Wed, 9 Sep 2020 08:18:38 +0200
Subject: [PATCH] OO-4801. Enable all OnlyOffice read only formats in embedded
 view

---
 .../commons/services/doceditor/onlyoffice/manager/Formats.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main/java/org/olat/core/commons/services/doceditor/onlyoffice/manager/Formats.java b/src/main/java/org/olat/core/commons/services/doceditor/onlyoffice/manager/Formats.java
index 4cf41526c90..8b528498eba 100644
--- a/src/main/java/org/olat/core/commons/services/doceditor/onlyoffice/manager/Formats.java
+++ b/src/main/java/org/olat/core/commons/services/doceditor/onlyoffice/manager/Formats.java
@@ -93,7 +93,7 @@ public class Formats {
 		if (TEXT_EDIT.contains(lowerSuffix))         return true;
 		if (SPREADSHEET_EDIT.contains(lowerSuffix))  return true;
 		if (PRESENTATION_EDIT.contains(lowerSuffix)) return true;
-		if (Mode.VIEW.equals(mode)) {
+		if (Mode.VIEW == mode || Mode.EMBEDDED == mode) {
 			if (TEXT_VIEW.contains(lowerSuffix))         return true;
 			if (SPREADSHEET_VIEW.contains(lowerSuffix))  return true;
 			if (PRESENTATION_VIEW.contains(lowerSuffix)) return true;
-- 
GitLab