Skip to content

Commit

Permalink
Fix LibreOffice#51 Automatically add .oxt extension for OXT export
Browse files Browse the repository at this point in the history
  • Loading branch information
shobhanmandal authored and smehrbrodt committed Feb 28, 2018
1 parent ab928e4 commit 277a317
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,12 @@ public void modifyText(ModifyEvent pE) {
@Override
public void widgetSelected(SelectionEvent pE) {
FileDialog dlg = new FileDialog(getShell(), SWT.SAVE);
dlg.setFilterExtensions(new String[] { "*.oxt"});
String path = dlg.open();
if (path != null) {
if(!path.substring(path.length()-4).equalsIgnoreCase(".oxt")){
path += ".oxt";
}
mDestinationCombo.setText(path);
}
}
Expand Down

0 comments on commit 277a317

Please sign in to comment.