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

lvdocview: fix getDocFormatName implementation #609

Merged
merged 1 commit into from
Nov 23, 2024
Merged
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
14 changes: 10 additions & 4 deletions crengine/src/lvdocview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4838,7 +4838,10 @@ bool LVDocView::LoadDocument(LVStreamRef stream, bool metadataOnly) {
}

const lChar32 * getDocFormatName(doc_format_t fmt) {
assert((unsigned)fmt <= doc_format_max);
switch (fmt) {
case doc_format_none:
break;
case doc_format_fb2:
return U"FictionBook (FB2)";
case doc_format_fb3:
Expand All @@ -4849,23 +4852,26 @@ const lChar32 * getDocFormatName(doc_format_t fmt) {
return U"Rich text (RTF)";
case doc_format_epub:
return U"EPUB";
case doc_format_chm:
return U"CHM";
case doc_format_html:
return U"HTML";
case doc_format_txt_bookmark:
return U"CR3 TXT Bookmark";
case doc_format_chm:
return U"CHM";
case doc_format_doc:
return U"DOC";
case doc_format_docx:
return U"DOCX";
case doc_format_pdb:
return U"PDB";
case doc_format_odt:
return U"OpenDocument (ODT)";
case doc_format_svg:
return U"SVG";
default:
return U"Unknown format";
case doc_format_md:
return U"Markdown";
}
return U"Unknown format";
benoit-pierre marked this conversation as resolved.
Show resolved Hide resolved
}

/// sets current document format
Expand Down
Loading