mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 17:07:35 +00:00
Applications: Add a very simple PDFViewer
This commit is contained in:
parent
309105678b
commit
f7ea1eb610
13 changed files with 264 additions and 18 deletions
|
@ -115,23 +115,6 @@ Value Document::resolve(const Value& value)
|
|||
return obj;
|
||||
}
|
||||
|
||||
template<IsValueType T>
|
||||
UnwrappedValueType<T> Document::resolve_to(const Value& value)
|
||||
{
|
||||
auto resolved = resolve(value);
|
||||
|
||||
if constexpr (IsSame<T, bool>)
|
||||
return resolved.as_bool();
|
||||
if constexpr (IsSame<T, int>)
|
||||
return resolved.as_int();
|
||||
if constexpr (IsSame<T, float>)
|
||||
return resolved.as_float();
|
||||
if constexpr (IsObject<T>)
|
||||
return object_cast<T>(resolved.as_object());
|
||||
|
||||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
|
||||
void Document::build_page_tree()
|
||||
{
|
||||
auto page_tree = m_catalog->get_dict(this, "Pages");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue