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
35 changes: 34 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,35 @@ Rules:
`Unreleased`.
- Add the date and the compare link once the version tag exists.

## Unreleased

### Added

- Text, spreadsheet, presentation and PDF files show their own icons in the
file browser, and OpenDocument files no longer show as zip archives.
- Legacy Word (.doc) documents show their page size and margins, and their
paragraph styles, alignment, indents and spacing.
- A spreadsheet's grid goes on past its content, and editing reaches the empty
cells there.
- While editing a slide, its text boxes show their outline, and an empty one
says "Tap to add text".

### Fixed

- Picking a keyboard suggestion while editing puts the word in instead of
deleting the one being typed.
- Printing a PDF no longer adds a blank sheet after each page.
- Deleting a spreadsheet column shrinks the sheet by the column's width.
- Word tables with a fixed layout keep their column widths, and Word text uses
the document's theme fonts.
- Excel cell borders show their weight and pattern.
- PowerPoint placeholders take their position, size and font from their slide
layout.

### Changed

- The engine is odrcore 7.10.0, up from 7.8.0.

## [1.52]

### Added
Expand Down Expand Up @@ -440,7 +469,11 @@ submitted.
- An incorrect password is now reported as such instead of a generic failure.
- Page handling and decryption fixes when opening protected documents.

[Unreleased]: https://github.com/opendocument-app/OpenDocument.ios/compare/v1.48...HEAD
[Unreleased]: https://github.com/opendocument-app/OpenDocument.ios/compare/v1.52...HEAD
[1.52]: https://github.com/opendocument-app/OpenDocument.ios/compare/v1.51...v1.52
[1.51]: https://github.com/opendocument-app/OpenDocument.ios/compare/v1.50...v1.51
[1.50]: https://github.com/opendocument-app/OpenDocument.ios/compare/v1.49...v1.50
[1.49]: https://github.com/opendocument-app/OpenDocument.ios/compare/v1.48...v1.49
[1.48]: https://github.com/opendocument-app/OpenDocument.ios/compare/v1.47...v1.48
[1.47]: https://github.com/opendocument-app/OpenDocument.ios/compare/v1.46...v1.47
[1.46]: https://github.com/opendocument-app/OpenDocument.ios/compare/v1.45...v1.46
Expand Down
2 changes: 1 addition & 1 deletion OpenDocumentReader.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -830,7 +830,7 @@
repositoryURL = "https://github.com/opendocument-app/OpenDocument.core.git";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 7.8.0;
minimumVersion = 7.10.0;
};
};
AD584FCD41577C8CDEE974AA /* XCRemoteSwiftPackageReference "swift-package-manager-google-mobile-ads" */ = {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions OpenDocumentReader/DocumentViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -823,6 +823,21 @@ class DocumentViewController: UIViewController, DocumentDelegate, UISearchBarDel

let isPlainText = document?.isPlainText == true

// an empty text box on a slide says what it is for in the reader's
// language, not the page's English one
webview.callAsyncJavaScript(
"""
if (typeof odr === 'object' && odr.editing && typeof odr.editing.setFramePrompt === 'function') {
odr.editing.setFramePrompt(prompt);
}
""",
arguments: ["prompt": NSLocalizedString("edit_frame_prompt", comment: "")], in: nil, in: .page
) { result in
if case .failure(let error) = result {
CrashManager.shared.log(error)
}
}

let script = """
odr.editing.enable();
if (typeof odr.sheet === 'object' && typeof odr.editing.loadFormulas === 'function') {
Expand Down
1 change: 1 addition & 0 deletions OpenDocumentReader/ca.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@
"edit_delete_columns" = "Suprimeix la columna";
"edit_undo" = "Desfés";
"edit_redo" = "Refés";
"edit_frame_prompt" = "Toca per afegir text";

/* The marks a PDF takes */
"mark_pdf" = "Marca aquest PDF";
Expand Down
1 change: 1 addition & 0 deletions OpenDocumentReader/cs.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@
"edit_delete_columns" = "Odstranit sloupec";
"edit_undo" = "Zpět";
"edit_redo" = "Znovu";
"edit_frame_prompt" = "Klepnutím přidáte text";

/* The marks a PDF takes */
"mark_pdf" = "Označit tento PDF";
Expand Down
1 change: 1 addition & 0 deletions OpenDocumentReader/da.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@
"edit_delete_columns" = "Slet kolonne";
"edit_undo" = "Fortryd";
"edit_redo" = "Gentag";
"edit_frame_prompt" = "Tryk for at tilføje tekst";

/* The marks a PDF takes */
"mark_pdf" = "Markér denne PDF";
Expand Down
1 change: 1 addition & 0 deletions OpenDocumentReader/de.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@
"edit_delete_columns" = "Spalte löschen";
"edit_undo" = "Rückgängig";
"edit_redo" = "Wiederholen";
"edit_frame_prompt" = "Tippen, um Text hinzuzufügen";

/* The marks a PDF takes */
"mark_pdf" = "Dieses PDF markieren";
Expand Down
2 changes: 2 additions & 0 deletions OpenDocumentReader/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@
"edit_delete_columns" = "Delete column";
"edit_undo" = "Undo";
"edit_redo" = "Redo";
/* What an empty text box on a slide shows while editing */
"edit_frame_prompt" = "Tap to add text";

/* The marks a PDF takes */
"mark_pdf" = "Mark up this PDF";
Expand Down
1 change: 1 addition & 0 deletions OpenDocumentReader/es.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@
"edit_delete_columns" = "Eliminar columna";
"edit_undo" = "Deshacer";
"edit_redo" = "Rehacer";
"edit_frame_prompt" = "Toca para añadir texto";

/* The marks a PDF takes */
"mark_pdf" = "Marcar este PDF";
Expand Down
1 change: 1 addition & 0 deletions OpenDocumentReader/fr.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@
"edit_delete_columns" = "Supprimer la colonne";
"edit_undo" = "Annuler";
"edit_redo" = "Rétablir";
"edit_frame_prompt" = "Touchez pour ajouter du texte";

/* The marks a PDF takes */
"mark_pdf" = "Annoter ce PDF";
Expand Down
1 change: 1 addition & 0 deletions OpenDocumentReader/ga.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@
"edit_delete_columns" = "Scrios an colún";
"edit_undo" = "Cealaigh";
"edit_redo" = "Athdhéan";
"edit_frame_prompt" = "Tapáil chun téacs a chur leis";

/* The marks a PDF takes */
"mark_pdf" = "Marcáil an PDF seo";
Expand Down
1 change: 1 addition & 0 deletions OpenDocumentReader/it.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@
"edit_delete_columns" = "Elimina colonna";
"edit_undo" = "Annulla";
"edit_redo" = "Ripeti";
"edit_frame_prompt" = "Tocca per aggiungere testo";

/* The marks a PDF takes */
"mark_pdf" = "Annota questo PDF";
Expand Down
1 change: 1 addition & 0 deletions OpenDocumentReader/ja.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@
"edit_delete_columns" = "列を削除";
"edit_undo" = "元に戻す";
"edit_redo" = "やり直す";
"edit_frame_prompt" = "タップしてテキストを追加";

/* The marks a PDF takes */
"mark_pdf" = "このPDFにマークを付ける";
Expand Down
1 change: 1 addition & 0 deletions OpenDocumentReader/pl.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@
"edit_delete_columns" = "Usuń kolumnę";
"edit_undo" = "Cofnij";
"edit_redo" = "Ponów";
"edit_frame_prompt" = "Stuknij, aby dodać tekst";

/* The marks a PDF takes */
"mark_pdf" = "Oznacz ten PDF";
Expand Down
1 change: 1 addition & 0 deletions OpenDocumentReader/pt-BR.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@
"edit_delete_columns" = "Excluir coluna";
"edit_undo" = "Desfazer";
"edit_redo" = "Refazer";
"edit_frame_prompt" = "Toque para adicionar texto";

/* The marks a PDF takes */
"mark_pdf" = "Marcar este PDF";
Expand Down
1 change: 1 addition & 0 deletions OpenDocumentReader/ru.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@
"edit_delete_columns" = "Удалить столбец";
"edit_undo" = "Отменить";
"edit_redo" = "Повторить";
"edit_frame_prompt" = "Коснитесь, чтобы добавить текст";

/* The marks a PDF takes */
"mark_pdf" = "Разметить этот PDF";
Expand Down
1 change: 1 addition & 0 deletions OpenDocumentReader/sl.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@
"edit_delete_columns" = "Izbriši stolpec";
"edit_undo" = "Razveljavi";
"edit_redo" = "Ponovi";
"edit_frame_prompt" = "Tapnite za dodajanje besedila";

/* The marks a PDF takes */
"mark_pdf" = "Označi ta PDF";
Expand Down
1 change: 1 addition & 0 deletions OpenDocumentReader/tr.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@
"edit_delete_columns" = "Sütunu sil";
"edit_undo" = "Geri al";
"edit_redo" = "Yinele";
"edit_frame_prompt" = "Metin eklemek için dokunun";

/* The marks a PDF takes */
"mark_pdf" = "Bu PDF’i işaretle";
Expand Down
1 change: 1 addition & 0 deletions OpenDocumentReader/zh-Hans.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@
"edit_delete_columns" = "删除列";
"edit_undo" = "撤销";
"edit_redo" = "重做";
"edit_frame_prompt" = "轻点以添加文本";

/* The marks a PDF takes */
"mark_pdf" = "标注此 PDF";
Expand Down
24 changes: 23 additions & 1 deletion OpenDocumentReaderTests/EditWorkflowTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,8 @@ class EditWorkflowTests: XCTestCase {
openDocument(where: "document.querySelectorAll('td').length > 0")

XCTAssertTrue(controller.document?.isEditable ?? false)
XCTAssertTrue(barContains(controller.editButton))
// the pencil comes with the page's load, a moment after its first cells
waitUntil { self.barContains(self.controller.editButton) }

controller.toggleEdit(controller.editButton)
waitForTools()
Expand Down Expand Up @@ -340,6 +341,27 @@ class EditWorkflowTests: XCTestCase {
XCTAssertTrue(barContains(controller.saveButton))
}

/// A slide's text boxes are outlined while editing, and an empty one asks
/// for text in the reader's language.
func testASlideOutlinesItsTextBoxesAndPromptsInTheReadersLanguage() throws {
documentURL = try copyFixture(ofType: "odp")
try present(documentURL)
openDocument()

controller.toggleEdit(controller.editButton)
waitForEditablePage()
waitForTools()

let prompt = NSLocalizedString("edit_frame_prompt", comment: "")
XCTAssertNotEqual(prompt, "edit_frame_prompt")
waitForPage(where: "document.querySelectorAll('.odr-text-frame').length > 0")
let property = "getComputedStyle(document.body).getPropertyValue('--odr-frame-prompt').trim()"
waitForPage(where: "\(property) !== ''")
// the page holds the text as a quoted css string
let shown = evaluate("JSON.parse(\(property))") as? String
XCTAssertEqual(shown, prompt)
}

// MARK: - formulas

/// A3 is the sum of A1 and A2, and computes again as they change.
Expand Down
Loading