Skip to content

Commit 0535cc3

Browse files
committed
enh: set ooxml as default doc_format
Signed-off-by: grnd-alt <github@belakkaf.net>
1 parent 6502c46 commit 0535cc3

6 files changed

Lines changed: 6 additions & 1 deletion

File tree

cypress/e2e/share-link.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ const otherUser = new User(randHash(), randHash())
1010

1111
describe('Public sharing of office documents', () => {
1212
before(function() {
13+
cy.nextcloudTestingAppConfigSet('richdocuments', 'doc_format', '')
1314
cy.createUser(shareOwner)
1415
cy.createUser(otherUser)
1516

cypress/e2e/talk.spec.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ describe('Talk integraiton integration', function() {
1111
cy.nextcloudTestingAppConfigSet('files', 'watermark_text', '{userId}')
1212
cy.nextcloudTestingAppConfigSet('files', 'watermark_shareTalkPublic', 'no')
1313
cy.nextcloudTestingAppConfigSet('richdocuments', 'uiDefaults-UIMode', 'notebookbar')
14+
cy.nextcloudTestingAppConfigSet('richdocuments', 'doc_format', '')
1415
}
1516

1617
before(function() {

cypress/e2e/templates.spec.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ describe('Global templates', function() {
99

1010
let randUser
1111
before(function() {
12+
cy.nextcloudTestingAppConfigSet('richdocuments', 'doc_format', '')
1213
cy.createRandomUser().then(user => {
1314
randUser = user
1415
cy.createFolder(randUser, 'Templates-user')

lib/AppConfig.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ class AppConfig {
3939
'watermark_allTagsList' => [],
4040
'watermark_linkTagsList' => [],
4141
'token_ttl' => 36000, // 10 hours
42+
'doc_format' => 'ooxml',
4243
];
4344

4445
public const WATERMARK_APP_NAMESPACE = 'files';

lib/Listener/RegisterTemplateFileCreatorListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function handle(Event $event): void {
3939
}
4040

4141
$templateManager = $event->getTemplateManager();
42-
$ooxml = $this->config->getAppValue(Application::APPNAME, 'doc_format', '') === 'ooxml';
42+
$ooxml = $this->config->getAppValue(Application::APPNAME, 'doc_format', 'ooxml') === 'ooxml';
4343
$appPath = $this->appManager->getAppPath('richdocuments');
4444

4545
$templateManager->registerTemplateFileCreator(function () use ($ooxml, $appPath) {

src/components/AdminSettings.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -532,6 +532,7 @@ export default {
532532
fonts: [],
533533
hasSettingIframeSupport: false,
534534
setting_iframe_url: '',
535+
doc_format: null,
535536
},
536537
accessToken: '',
537538
accessTokenTTL: '',

0 commit comments

Comments
 (0)