Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wip: feat(impress): Add legacy export types #10149

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
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
6 changes: 6 additions & 0 deletions browser/src/control/Control.Menubar.js
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,12 @@ L.Control.Menubar = L.Control.extend({
{name: _('PowerPoint 2003 Presentation (.ppt)'), id: 'downloadas-ppt', type: 'action'},
{name: _('PowerPoint Presentation (.pptx)'), id: 'downloadas-pptx', type: 'action'},
{name: _('HTML Document (.html)'), id: 'downloadas-html', type: 'action'},
{name: _('Shockwave Flash (.swf)'), id: 'downloadas-swf', type: 'action'},
{name: _('Scalable Vector Graphics (.svg)'), id: 'downloadas-svg', type: 'action'},
{name: _('Current slide as Bitmap (.bmp)'), id: 'downloadas-bmp', type: 'action'},
{name: _('Current slide as Graphics Interchange Format (.gif)'), id: 'downloadas-gif', type: 'action'},
{name: _('Current slide as Portable Network Graphics (.png)'), id: 'downloadas-png', type: 'action'},
{name: _('Current slide as Tag Image File Format (.tiff)'), id: 'downloadas-tiff', type: 'action'},
]},
{name: _UNO('.uno:SetDocumentProperties', 'presentation'), uno: '.uno:SetDocumentProperties', id: 'properties'},
{type: 'separator'},
Expand Down
24 changes: 24 additions & 0 deletions browser/src/control/Control.NotebookbarBuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,30 @@ L.Control.NotebookbarBuilder = L.Control.JSDialogBuilder.extend({
'action': 'downloadas-html',
'text': _('HTML Document (.html)')
},
{
'action': 'downloadas-swf',
'text': _('Shockwave Flash (.swf)')
},
{
'action': 'downloadas-svg',
'text': _('Scalable Vector Graphics (.svg)')
},
{
'action': 'downloadas-bmp',
'text': _('Current slide as Bitmap (.bmp)')
},
{
'action': 'downloadas-gif',
'text': _('Current slide as Graphics Interchange Format (.gif)')
},
{
'action': 'downloadas-png',
'text': _('Current slide as Portable Network Graphics (.png)')
},
{
'action': 'downloadas-tiff',
'text': _('Current slide as Tag Image File Format (.tiff)')
},
{
'action': !window.ThisIsAMobileApp ? 'exportdirectpdf' : 'downloadas-pdf',
'text': _('PDF Document (.pdf)'),
Expand Down
5 changes: 4 additions & 1 deletion browser/src/map/handler/Map.SlideShow.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,10 @@ L.Map.SlideShow = L.Handler.extend({
e.url = window.processCoolUrl({ url: e.url, type: 'slideshow' });
}

this._slideURL = e.url;
const embedURL = new URL(e.url);
embedURL.searchParams.append('attachment', 0);

this._slideURL = embedURL.toString();
window.app.console.debug('slide file url : ', this._slideURL);

if ('processCoolUrl' in window) {
Expand Down
2 changes: 1 addition & 1 deletion wsd/ClientRequestDispatcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1697,7 +1697,7 @@ bool ClientRequestDispatcher::handlePostRequest(const RequestDetails& requestDet
// actually show it.
const std::string contentType = getContentType(fileName);
response.setContentType(contentType);
if (serveAsAttachment && contentType != "image/svg+xml")
if (serveAsAttachment)
response.set("Content-Disposition", "attachment; filename=\"" + fileName + '"');

#if !MOBILEAPP
Expand Down
Loading