Skip to content

Commit c099782

Browse files
committed
fix docx editing
1 parent f1f4c5b commit c099782

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/odr/internal/odf/odf_document.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,12 @@ Document::Document(const FileType file_type, const DocumentType document_type,
3131
m_styles_xml.document_element());
3232
}
3333

34-
bool Document::is_editable() const noexcept { return true; }
34+
bool Document::is_editable() const noexcept {
35+
// TODO fix spreadsheet editability
36+
return m_document_type == DocumentType::text ||
37+
m_document_type == DocumentType::presentation ||
38+
m_document_type == DocumentType::drawing;
39+
}
3540

3641
bool Document::is_savable(const bool encrypted) const noexcept {
3742
return !encrypted;

src/odr/internal/ooxml/text/ooxml_text_document.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Document::Document(std::shared_ptr<abstract::ReadableFilesystem> filesystem)
3131
m_style_registry = StyleRegistry(m_styles_xml.document_element());
3232
}
3333

34-
bool Document::is_editable() const noexcept { return false; }
34+
bool Document::is_editable() const noexcept { return true; }
3535

3636
bool Document::is_savable(const bool encrypted) const noexcept {
3737
return !encrypted;

0 commit comments

Comments
 (0)