Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cypress/e2e/share-link.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const otherUser = new User(randHash(), randHash())

describe.skip('Public sharing of office documents', () => {
before(function() {
cy.nextcloudTestingAppConfigSet('richdocuments', 'doc_format', '')
cy.createUser(shareOwner)
cy.createUser(otherUser)

Expand Down
1 change: 1 addition & 0 deletions cypress/e2e/talk.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ describe('Talk integraiton integration', function() {
cy.nextcloudTestingAppConfigSet('files', 'watermark_text', '{userId}')
cy.nextcloudTestingAppConfigSet('files', 'watermark_shareTalkPublic', 'no')
cy.nextcloudTestingAppConfigSet('richdocuments', 'uiDefaults-UIMode', 'notebookbar')
cy.nextcloudTestingAppConfigSet('richdocuments', 'doc_format', '')
}

before(function() {
Expand Down
1 change: 1 addition & 0 deletions cypress/e2e/templates.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ describe('Global templates', function() {

let randUser
before(function() {
cy.nextcloudTestingAppConfigSet('richdocuments', 'doc_format', '')
cy.createRandomUser().then(user => {
randUser = user
cy.createFolder(randUser, 'Templates-user')
Expand Down
1 change: 1 addition & 0 deletions lib/AppConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ class AppConfig {
'watermark_allTagsList' => [],
'watermark_linkTagsList' => [],
'token_ttl' => 36000, // 10 hours
'doc_format' => 'ooxml',
];

public const WATERMARK_APP_NAMESPACE = 'files';
Expand Down
2 changes: 1 addition & 1 deletion lib/Listener/RegisterTemplateFileCreatorListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function handle(Event $event): void {
}

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

$templateManager->registerTemplateFileCreator(function () use ($ooxml, $appPath) {
Expand Down
2 changes: 1 addition & 1 deletion lib/Service/SlideDeckService.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function __construct(
public function generateSlideDeck(?string $userId, string $presentationText) {
$rawModelOutput = $this->runLLMQuery($userId, $presentationText);

$ooxml = $this->config->getAppValue(Application::APPNAME, 'doc_format', '') === 'ooxml';
$ooxml = $this->config->getAppValue(Application::APPNAME, 'doc_format', 'ooxml') === 'ooxml';
$format = $ooxml ? 'pptx' : 'odp';
$emptyPresentation = $this->getBlankPresentation($format);

Expand Down
2 changes: 1 addition & 1 deletion lib/Settings/Admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function getForm(): TemplateResponse {
'wopi_allowlist' => $this->config->getAppValue('richdocuments', 'wopi_allowlist'),
'edit_groups' => $this->config->getAppValue('richdocuments', 'edit_groups'),
'use_groups' => $this->config->getAppValue('richdocuments', 'use_groups'),
'doc_format' => $this->config->getAppValue('richdocuments', 'doc_format'),
'doc_format' => $this->config->getAppValue('richdocuments', 'doc_format', 'ooxml'),
'external_apps' => $this->config->getAppValue('richdocuments', 'external_apps'),
'canonical_webroot' => $this->config->getAppValue('richdocuments', 'canonical_webroot'),
'disable_certificate_verification' => $this->config->getAppValue('richdocuments', 'disable_certificate_verification', '') === 'yes',
Expand Down
4 changes: 2 additions & 2 deletions lib/TemplateManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ private function getEmptyTemplateDir() {
* @return array
*/
public function formatNodeReturn(File $template) {
$ooxml = $this->config->getAppValue(Application::APPNAME, 'doc_format', '') === 'ooxml';
$ooxml = $this->config->getAppValue(Application::APPNAME, 'doc_format', 'ooxml') === 'ooxml';
$documentType = $this->flipTypes()[$template->getMimeType()];
return [
'id' => $template->getId(),
Expand Down Expand Up @@ -442,7 +442,7 @@ public function isTemplate($fileId) {
}

public function formatEmpty(File $template) {
$ooxml = $this->config->getAppValue(Application::APPNAME, 'doc_format', '') === 'ooxml';
$ooxml = $this->config->getAppValue(Application::APPNAME, 'doc_format', 'ooxml') === 'ooxml';
$documentType = $this->flipTypes()[$template->getMimeType()];
return [
'id' => $template->getId(),
Expand Down
1 change: 1 addition & 0 deletions src/components/AdminSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,7 @@ export default {
fonts: [],
hasSettingIframeSupport: false,
setting_iframe_url: '',
doc_format: null,
},
accessToken: '',
accessTokenTTL: '',
Expand Down
Loading