diff options
author | Michele Calgaro <[email protected]> | 2024-06-22 21:28:13 +0900 |
---|---|---|
committer | Michele Calgaro <[email protected]> | 2024-06-22 21:28:13 +0900 |
commit | cd87a41ab9bfa2207b41a6117e6fe9aea2075143 (patch) | |
tree | 21f426dfe48428c677eb245428a87ec06a034213 | |
parent | 17b259df9cb6b28779d4881b2b6c805ee2e48eea (diff) | |
download | tde-ebook-reader-cd87a41ab9bfa2207b41a6117e6fe9aea2075143.tar.gz tde-ebook-reader-cd87a41ab9bfa2207b41a6117e6fe9aea2075143.zip |
Add tde-ebook-reader package
Signed-off-by: Michele Calgaro <[email protected]>
228 files changed, 106 insertions, 2198 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index ce91642..5568df4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,6 +12,7 @@ include( TDEVersion ) cmake_minimum_required( VERSION ${TDE_CMAKE_MINIMUM_VERSION} ) tde_set_project_version( ) +set( PACKAGE_VERSION 0.99.4 ) #### general package setup @@ -69,7 +70,7 @@ set( CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined" ##### directories add_subdirectory( zlibrary ) -#add_subdirectory( tde-ebook-reader ) +add_subdirectory( reader ) ##### write configure files diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index a69a3c7..478f610 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -56,6 +56,13 @@ if( NOT FRIBIDI_FOUND ) endif( ) +##### check for sqlite3 +pkg_search_module( SQLITE sqlite3 ) +if( NOT SQLITE_FOUND ) + tde_message_fatal( "sqlite3 is required, but not found on your system" ) +endif( ) + + ##### check for unibreak pkg_search_module( UNIBREAK libunibreak ) if( NOT UNIBREAK_FOUND ) diff --git a/config.h.cmake b/config.h.cmake index 5edc539..d0eb046 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -1,4 +1,4 @@ -#define VERSION "@VERSION@" +#define VERSION "@PACKAGE_VERSION@" // Defined if you have fvisibility and fvisibility-inlines-hidden support. #cmakedefine __KDE_HAVE_GCC_VISIBILITY 1 diff --git a/debian/control b/debian/control index 97e81ed..3ffd947 100644 --- a/debian/control +++ b/debian/control @@ -4,8 +4,8 @@ Priority: optional Maintainer: TDE Debian Team <[email protected]> XSBC-Original-Maintainer: Debian QA Group <[email protected]> Build-Depends: cdbs, debhelper (>= 10~), quilt, tde-cmake, ninja-build, libtqtinterface-dev, - libbz2-dev, libcurl4-gnutls-dev, libexpat1-dev, libfribidi-dev, - libjpeg-dev, libsqlite3-dev, libunibreak-dev, libz-dev, pkgconf + libbz2-dev, libexpat1-dev, libfribidi-dev, + libsqlite3-dev, libunibreak-dev, libz-dev, pkgconf Standards-Version: 4.7.0 Package: tde-ebook-reader diff --git a/debian/tde-ebook-reader.install b/debian/tde-ebook-reader.install index 0a08ffe..59065ad 100644 --- a/debian/tde-ebook-reader.install +++ b/debian/tde-ebook-reader.install @@ -1 +1,2 @@ -#usr/lib +/opt/trinity/bin +/opt/trinity/share diff --git a/reader/CMakeLists.txt b/reader/CMakeLists.txt new file mode 100644 index 0000000..0fd2489 --- /dev/null +++ b/reader/CMakeLists.txt @@ -0,0 +1,3 @@ +add_subdirectory( data ) +add_subdirectory( desktop ) +add_subdirectory( src ) diff --git a/reader/data/CMakeLists.txt b/reader/data/CMakeLists.txt new file mode 100644 index 0000000..bbd3519 --- /dev/null +++ b/reader/data/CMakeLists.txt @@ -0,0 +1,49 @@ +##### default files + +file( GLOB _default_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/default/*.xml ) +install( + FILES ${_default_files} + DESTINATION ${DATA_INSTALL_DIR}/tde-ebook-reader/default +) + + +##### format files + +file( GLOB _formats_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/formats/fb2/* ) +install( + FILES ${_formats_files} + DESTINATION ${DATA_INSTALL_DIR}/tde-ebook-reader/formats/fb2 +) + +file( GLOB _formats_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/formats/html/* ) +install( + FILES ${_formats_files} + DESTINATION ${DATA_INSTALL_DIR}/tde-ebook-reader/formats/html +) + + +##### help files + +file( GLOB _help_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/help/*.fb2 ) +install( + FILES ${_help_files} + DESTINATION ${DATA_INSTALL_DIR}/tde-ebook-reader/help +) + + +##### icons files + +file( GLOB_RECURSE _icon_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/icons/*) +install( + FILES ${_icon_files} + DESTINATION ${DATA_INSTALL_DIR}/tde-ebook-reader/icons +) + + +##### resource files + +file( GLOB _xml_resource_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/resources/*.xml ) +install( + FILES ${_xml_resource_files} + DESTINATION ${DATA_INSTALL_DIR}/tde-ebook-reader/resources +) diff --git a/reader/data/default/config.desktop.xml b/reader/data/default/config.xml index 670a4eb..670a4eb 100644 --- a/reader/data/default/config.desktop.xml +++ b/reader/data/default/config.xml diff --git a/reader/data/default/external.desktop.xml b/reader/data/default/external.xml index 424e676..424e676 100644 --- a/reader/data/default/external.desktop.xml +++ b/reader/data/default/external.xml diff --git a/reader/data/default/fullscreen_toolbar.desktop.xml b/reader/data/default/fullscreen_toolbar.xml index 72da2c2..72da2c2 100644 --- a/reader/data/default/fullscreen_toolbar.desktop.xml +++ b/reader/data/default/fullscreen_toolbar.xml diff --git a/reader/data/default/keymap.desktop.xml b/reader/data/default/keymap.xml index b795bd8..b795bd8 100644 --- a/reader/data/default/keymap.desktop.xml +++ b/reader/data/default/keymap.xml diff --git a/reader/data/default/menubar.xml b/reader/data/default/menubar.xml deleted file mode 100644 index bbe89f5..0000000 --- a/reader/data/default/menubar.xml +++ /dev/null @@ -1,39 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<menubar> - <item id="bookInfo"/> - <item id="toc"/> - <submenu id="library"> - <item id="showLibrary"/> - <item id="previousBook"/> - <item id="showRecent"/> - <item id="addBook"/> - <item id="showHelp"/> - </submenu> - <submenu id="navigate"> - <item id="gotoHome"/> - <item id="gotoPageNumber"/> - <item id="gotoSectionStart"/> - <item id="gotoSectionEnd"/> - <item id="nextTOCSection"/> - <item id="previousTOCSection"/> - <item id="undo"/> - <item id="redo"/> - </submenu> - <submenu id="selection"> - <item id="copyToClipboard"/> - <item id="openInDictionary"/> - <item id="clearSelection"/> - </submenu> - <submenu id="search"> - <item id="search"/> - <item id="findPrevious"/> - <item id="findNext"/> - </submenu> - <submenu id="view"> - <item id="rotate"/> - <item id="toggleFullscreen"/> - <item id="toggleIndicator"/> - </submenu> - <item id="preferences"/> - <item id="quit"/> -</menubar> diff --git a/reader/data/default/styles.desktop.xml b/reader/data/default/styles.xml index b12fbeb..b12fbeb 100644 --- a/reader/data/default/styles.desktop.xml +++ b/reader/data/default/styles.xml diff --git a/reader/data/default/toolbar.full.xml b/reader/data/default/toolbar.full.xml deleted file mode 100644 index 99cb8a0..0000000 --- a/reader/data/default/toolbar.full.xml +++ /dev/null @@ -1,25 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<toolbar> - <button id="showReading"/> - <separator/> - <button id="showLibrary"/> - <button id="showRecent"/> - <button id="addBook"/> - <separator/> - <button id="gotoHome"/> - <button id="undo"/> - <button id="redo"/> - <separator/> - <button id="toc"/> - <separator/> - <button id="search"/> - <button id="findPrevious"/> - <button id="findNext"/> - <separator/> - <button id="bookInfo"/> - <button id="preferences"/> - <separator/> - <button id="rotate"/> - <separator/> - <button id="showHelp"/> -</toolbar> diff --git a/reader/data/default/toolbar.short.xml b/reader/data/default/toolbar.short.xml deleted file mode 100644 index 4950710..0000000 --- a/reader/data/default/toolbar.short.xml +++ /dev/null @@ -1,23 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<toolbar> - <button id="showReading"/> - <separator/> - <button id="showLibrary"/> - <button id="showRecent"/> - <button id="addBook"/> - <separator/> - <button id="gotoHome"/> - <button id="undo"/> - <button id="redo"/> - <separator/> - <button id="toc"/> - <separator/> - <button id="search"/> - <button id="findPrevious"/> - <button id="findNext"/> - <separator/> - <button id="bookInfo"/> - <button id="preferences"/> - <separator/> - <button id="rotate"/> -</toolbar> diff --git a/reader/data/default/toolbar.desktop.xml b/reader/data/default/toolbar.xml index 822d9ee..822d9ee 100644 --- a/reader/data/default/toolbar.desktop.xml +++ b/reader/data/default/toolbar.xml diff --git a/reader/data/icons/application/16x16.png b/reader/data/icons/application/16x16.png Binary files differdeleted file mode 100644 index 42baa62..0000000 --- a/reader/data/icons/application/16x16.png +++ /dev/null diff --git a/reader/data/icons/application/26x26.png b/reader/data/icons/application/26x26.png Binary files differdeleted file mode 100644 index c0b254b..0000000 --- a/reader/data/icons/application/26x26.png +++ /dev/null diff --git a/reader/data/icons/application/32x24.png b/reader/data/icons/application/32x24.png Binary files differdeleted file mode 100644 index 9b353ee..0000000 --- a/reader/data/icons/application/32x24.png +++ /dev/null diff --git a/reader/data/icons/application/32x32.png b/reader/data/icons/application/32x32.png Binary files differdeleted file mode 100644 index 7c5ad30..0000000 --- a/reader/data/icons/application/32x32.png +++ /dev/null diff --git a/reader/data/icons/application/48x48.png b/reader/data/icons/application/48x48.png Binary files differdeleted file mode 100644 index d1b42d0..0000000 --- a/reader/data/icons/application/48x48.png +++ /dev/null diff --git a/reader/data/icons/application/64x43.png b/reader/data/icons/application/64x43.png Binary files differdeleted file mode 100644 index 1c117e7..0000000 --- a/reader/data/icons/application/64x43.png +++ /dev/null diff --git a/reader/data/icons/application/Reader.icns b/reader/data/icons/application/Reader.icns Binary files differdeleted file mode 100644 index 95de917..0000000 --- a/reader/data/icons/application/Reader.icns +++ /dev/null diff --git a/reader/data/icons/application/desktop.png b/reader/data/icons/application/desktop.png deleted file mode 120000 index b463b00..0000000 --- a/reader/data/icons/application/desktop.png +++ /dev/null @@ -1 +0,0 @@ -48x48.png
\ No newline at end of file diff --git a/reader/data/icons/application/64x64.png b/reader/data/icons/application/tde-ebook-reader.png Binary files differindex 4fa52c4..4fa52c4 100644 --- a/reader/data/icons/application/64x64.png +++ b/reader/data/icons/application/tde-ebook-reader.png diff --git a/reader/data/icons/booktree/22x22-transparent-png/tree-authorinfo.png b/reader/data/icons/booktree/22x22-transparent-png/tree-authorinfo.png Binary files differdeleted file mode 100644 index 6dc0485..0000000 --- a/reader/data/icons/booktree/22x22-transparent-png/tree-authorinfo.png +++ /dev/null diff --git a/reader/data/icons/booktree/22x22-transparent-png/tree-bookinfo.png b/reader/data/icons/booktree/22x22-transparent-png/tree-bookinfo.png Binary files differdeleted file mode 100644 index d9949ea..0000000 --- a/reader/data/icons/booktree/22x22-transparent-png/tree-bookinfo.png +++ /dev/null diff --git a/reader/data/icons/booktree/22x22-transparent-png/tree-download-demo.png b/reader/data/icons/booktree/22x22-transparent-png/tree-download-demo.png Binary files differdeleted file mode 100644 index 91ed9f2..0000000 --- a/reader/data/icons/booktree/22x22-transparent-png/tree-download-demo.png +++ /dev/null diff --git a/reader/data/icons/booktree/22x22-transparent-png/tree-download-epub.png b/reader/data/icons/booktree/22x22-transparent-png/tree-download-epub.png Binary files differdeleted file mode 100644 index a23e6aa..0000000 --- a/reader/data/icons/booktree/22x22-transparent-png/tree-download-epub.png +++ /dev/null diff --git a/reader/data/icons/booktree/22x22-transparent-png/tree-download-fb2.png b/reader/data/icons/booktree/22x22-transparent-png/tree-download-fb2.png Binary files differdeleted file mode 100644 index 7c19f1e..0000000 --- a/reader/data/icons/booktree/22x22-transparent-png/tree-download-fb2.png +++ /dev/null diff --git a/reader/data/icons/booktree/22x22-transparent-png/tree-download-mobi.png b/reader/data/icons/booktree/22x22-transparent-png/tree-download-mobi.png Binary files differdeleted file mode 100644 index 9282d6d..0000000 --- a/reader/data/icons/booktree/22x22-transparent-png/tree-download-mobi.png +++ /dev/null diff --git a/reader/data/icons/booktree/22x22-transparent-png/tree-local-demo.png b/reader/data/icons/booktree/22x22-transparent-png/tree-local-demo.png Binary files differdeleted file mode 100644 index 3cbdda9..0000000 --- a/reader/data/icons/booktree/22x22-transparent-png/tree-local-demo.png +++ /dev/null diff --git a/reader/data/icons/booktree/22x22-transparent-png/tree-local-epub.png b/reader/data/icons/booktree/22x22-transparent-png/tree-local-epub.png Binary files differdeleted file mode 100644 index d36c7c9..0000000 --- a/reader/data/icons/booktree/22x22-transparent-png/tree-local-epub.png +++ /dev/null diff --git a/reader/data/icons/booktree/22x22-transparent-png/tree-local-fb2.png b/reader/data/icons/booktree/22x22-transparent-png/tree-local-fb2.png Binary files differdeleted file mode 100644 index 212c446..0000000 --- a/reader/data/icons/booktree/22x22-transparent-png/tree-local-fb2.png +++ /dev/null diff --git a/reader/data/icons/booktree/22x22-transparent-png/tree-local-mobi.png b/reader/data/icons/booktree/22x22-transparent-png/tree-local-mobi.png Binary files differdeleted file mode 100644 index 11bc581..0000000 --- a/reader/data/icons/booktree/22x22-transparent-png/tree-local-mobi.png +++ /dev/null diff --git a/reader/data/icons/booktree/22x22-transparent-png/tree-open-in-browser.png b/reader/data/icons/booktree/22x22-transparent-png/tree-open-in-browser.png Binary files differdeleted file mode 100644 index 83fc6a0..0000000 --- a/reader/data/icons/booktree/22x22-transparent-png/tree-open-in-browser.png +++ /dev/null diff --git a/reader/data/icons/booktree/22x22-transparent-png/tree-order-series.png b/reader/data/icons/booktree/22x22-transparent-png/tree-order-series.png Binary files differdeleted file mode 100644 index bf9db9b..0000000 --- a/reader/data/icons/booktree/22x22-transparent-png/tree-order-series.png +++ /dev/null diff --git a/reader/data/icons/booktree/22x22-transparent-png/tree-purchase.png b/reader/data/icons/booktree/22x22-transparent-png/tree-purchase.png Binary files differdeleted file mode 100644 index 6d9af32..0000000 --- a/reader/data/icons/booktree/22x22-transparent-png/tree-purchase.png +++ /dev/null diff --git a/reader/data/icons/booktree/22x22-transparent-png/tree-removebook.png b/reader/data/icons/booktree/22x22-transparent-png/tree-removebook.png Binary files differdeleted file mode 100644 index 9b73cb6..0000000 --- a/reader/data/icons/booktree/22x22-transparent-png/tree-removebook.png +++ /dev/null diff --git a/reader/data/icons/booktree/22x22-transparent-png/tree-removetag.png b/reader/data/icons/booktree/22x22-transparent-png/tree-removetag.png Binary files differdeleted file mode 100644 index 5154445..0000000 --- a/reader/data/icons/booktree/22x22-transparent-png/tree-removetag.png +++ /dev/null diff --git a/reader/data/icons/booktree/22x22-transparent-png/tree-strut.png b/reader/data/icons/booktree/22x22-transparent-png/tree-strut.png Binary files differdeleted file mode 100644 index 54ac724..0000000 --- a/reader/data/icons/booktree/22x22-transparent-png/tree-strut.png +++ /dev/null diff --git a/reader/data/icons/booktree/22x22-transparent-png/tree-taginfo.png b/reader/data/icons/booktree/22x22-transparent-png/tree-taginfo.png Binary files differdeleted file mode 100644 index 982f154..0000000 --- a/reader/data/icons/booktree/22x22-transparent-png/tree-taginfo.png +++ /dev/null diff --git a/reader/data/icons/booktree/28x28-transparent-png/tree-authorinfo.png b/reader/data/icons/booktree/28x28-transparent-png/tree-authorinfo.png Binary files differdeleted file mode 100644 index 1c56ba9..0000000 --- a/reader/data/icons/booktree/28x28-transparent-png/tree-authorinfo.png +++ /dev/null diff --git a/reader/data/icons/booktree/28x28-transparent-png/tree-bookinfo.png b/reader/data/icons/booktree/28x28-transparent-png/tree-bookinfo.png Binary files differdeleted file mode 100644 index fa6b0f2..0000000 --- a/reader/data/icons/booktree/28x28-transparent-png/tree-bookinfo.png +++ /dev/null diff --git a/reader/data/icons/booktree/28x28-transparent-png/tree-download-epub.png b/reader/data/icons/booktree/28x28-transparent-png/tree-download-epub.png Binary files differdeleted file mode 100644 index cc83f5a..0000000 --- a/reader/data/icons/booktree/28x28-transparent-png/tree-download-epub.png +++ /dev/null diff --git a/reader/data/icons/booktree/28x28-transparent-png/tree-download-fb2.png b/reader/data/icons/booktree/28x28-transparent-png/tree-download-fb2.png Binary files differdeleted file mode 100644 index 0b63cb3..0000000 --- a/reader/data/icons/booktree/28x28-transparent-png/tree-download-fb2.png +++ /dev/null diff --git a/reader/data/icons/booktree/28x28-transparent-png/tree-download-mobi.png b/reader/data/icons/booktree/28x28-transparent-png/tree-download-mobi.png Binary files differdeleted file mode 100644 index 7840bc7..0000000 --- a/reader/data/icons/booktree/28x28-transparent-png/tree-download-mobi.png +++ /dev/null diff --git a/reader/data/icons/booktree/28x28-transparent-png/tree-local-epub.png b/reader/data/icons/booktree/28x28-transparent-png/tree-local-epub.png Binary files differdeleted file mode 100644 index e41c1e1..0000000 --- a/reader/data/icons/booktree/28x28-transparent-png/tree-local-epub.png +++ /dev/null diff --git a/reader/data/icons/booktree/28x28-transparent-png/tree-local-fb2.png b/reader/data/icons/booktree/28x28-transparent-png/tree-local-fb2.png Binary files differdeleted file mode 100644 index 834f75a..0000000 --- a/reader/data/icons/booktree/28x28-transparent-png/tree-local-fb2.png +++ /dev/null diff --git a/reader/data/icons/booktree/28x28-transparent-png/tree-local-mobi.png b/reader/data/icons/booktree/28x28-transparent-png/tree-local-mobi.png Binary files differdeleted file mode 100644 index aa64a3b..0000000 --- a/reader/data/icons/booktree/28x28-transparent-png/tree-local-mobi.png +++ /dev/null diff --git a/reader/data/icons/booktree/28x28-transparent-png/tree-open-in-browser.png b/reader/data/icons/booktree/28x28-transparent-png/tree-open-in-browser.png Binary files differdeleted file mode 100644 index 87d8e7a..0000000 --- a/reader/data/icons/booktree/28x28-transparent-png/tree-open-in-browser.png +++ /dev/null diff --git a/reader/data/icons/booktree/28x28-transparent-png/tree-orderseries.png b/reader/data/icons/booktree/28x28-transparent-png/tree-orderseries.png Binary files differdeleted file mode 100644 index 026d07a..0000000 --- a/reader/data/icons/booktree/28x28-transparent-png/tree-orderseries.png +++ /dev/null diff --git a/reader/data/icons/booktree/28x28-transparent-png/tree-removebook.png b/reader/data/icons/booktree/28x28-transparent-png/tree-removebook.png Binary files differdeleted file mode 100644 index f1fcc5c..0000000 --- a/reader/data/icons/booktree/28x28-transparent-png/tree-removebook.png +++ /dev/null diff --git a/reader/data/icons/booktree/28x28-transparent-png/tree-removetag.png b/reader/data/icons/booktree/28x28-transparent-png/tree-removetag.png Binary files differdeleted file mode 100644 index 2d0c29f..0000000 --- a/reader/data/icons/booktree/28x28-transparent-png/tree-removetag.png +++ /dev/null diff --git a/reader/data/icons/booktree/28x28-transparent-png/tree-strut.png b/reader/data/icons/booktree/28x28-transparent-png/tree-strut.png Binary files differdeleted file mode 100644 index 6e05713..0000000 --- a/reader/data/icons/booktree/28x28-transparent-png/tree-strut.png +++ /dev/null diff --git a/reader/data/icons/booktree/28x28-transparent-png/tree-taginfo.png b/reader/data/icons/booktree/28x28-transparent-png/tree-taginfo.png Binary files differdeleted file mode 100644 index 9dab5ad..0000000 --- a/reader/data/icons/booktree/28x28-transparent-png/tree-taginfo.png +++ /dev/null diff --git a/reader/data/icons/booktree/new/booktree-author.png b/reader/data/icons/booktree/booktree-author.png Binary files differindex 2e403d7..2e403d7 100644 --- a/reader/data/icons/booktree/new/booktree-author.png +++ b/reader/data/icons/booktree/booktree-author.png diff --git a/reader/data/icons/booktree/new/booktree-book.png b/reader/data/icons/booktree/booktree-book.png Binary files differindex 3082f5a..3082f5a 100644 --- a/reader/data/icons/booktree/new/booktree-book.png +++ b/reader/data/icons/booktree/booktree-book.png diff --git a/reader/data/icons/booktree/new/booktree-catalog.png b/reader/data/icons/booktree/booktree-catalog.png Binary files differindex 0b246be..0b246be 100644 --- a/reader/data/icons/booktree/new/booktree-catalog.png +++ b/reader/data/icons/booktree/booktree-catalog.png diff --git a/reader/data/icons/booktree/new/booktree-tag.png b/reader/data/icons/booktree/booktree-tag.png Binary files differindex 289b717..289b717 100644 --- a/reader/data/icons/booktree/new/booktree-tag.png +++ b/reader/data/icons/booktree/booktree-tag.png diff --git a/reader/data/icons/booktree/desktop b/reader/data/icons/booktree/desktop deleted file mode 120000 index 5524476..0000000 --- a/reader/data/icons/booktree/desktop +++ /dev/null @@ -1 +0,0 @@ -22x22-transparent-png
\ No newline at end of file diff --git a/reader/data/icons/booktree/new/searchresult.png b/reader/data/icons/booktree/searchresult.png Binary files differindex 92604a0..92604a0 100644 --- a/reader/data/icons/booktree/new/searchresult.png +++ b/reader/data/icons/booktree/searchresult.png diff --git a/reader/data/icons/filetree/12x12-png/fb2.png b/reader/data/icons/filetree/12x12-png/fb2.png Binary files differdeleted file mode 100644 index 77d70d4..0000000 --- a/reader/data/icons/filetree/12x12-png/fb2.png +++ /dev/null diff --git a/reader/data/icons/filetree/12x12-png/folder.png b/reader/data/icons/filetree/12x12-png/folder.png Binary files differdeleted file mode 100644 index f0c1cf8..0000000 --- a/reader/data/icons/filetree/12x12-png/folder.png +++ /dev/null diff --git a/reader/data/icons/filetree/12x12-png/html.png b/reader/data/icons/filetree/12x12-png/html.png Binary files differdeleted file mode 100644 index 686ac26..0000000 --- a/reader/data/icons/filetree/12x12-png/html.png +++ /dev/null diff --git a/reader/data/icons/filetree/12x12-png/mobipocket.png b/reader/data/icons/filetree/12x12-png/mobipocket.png Binary files differdeleted file mode 100644 index 77d70d4..0000000 --- a/reader/data/icons/filetree/12x12-png/mobipocket.png +++ /dev/null diff --git a/reader/data/icons/filetree/12x12-png/oeb.png b/reader/data/icons/filetree/12x12-png/oeb.png Binary files differdeleted file mode 100644 index 77d70d4..0000000 --- a/reader/data/icons/filetree/12x12-png/oeb.png +++ /dev/null diff --git a/reader/data/icons/filetree/12x12-png/openreader.png b/reader/data/icons/filetree/12x12-png/openreader.png Binary files differdeleted file mode 100644 index 77d70d4..0000000 --- a/reader/data/icons/filetree/12x12-png/openreader.png +++ /dev/null diff --git a/reader/data/icons/filetree/12x12-png/palm.png b/reader/data/icons/filetree/12x12-png/palm.png Binary files differdeleted file mode 100644 index 77d70d4..0000000 --- a/reader/data/icons/filetree/12x12-png/palm.png +++ /dev/null diff --git a/reader/data/icons/filetree/12x12-png/plucker.png b/reader/data/icons/filetree/12x12-png/plucker.png Binary files differdeleted file mode 100644 index 77d70d4..0000000 --- a/reader/data/icons/filetree/12x12-png/plucker.png +++ /dev/null diff --git a/reader/data/icons/filetree/12x12-png/rtf.png b/reader/data/icons/filetree/12x12-png/rtf.png Binary files differdeleted file mode 100644 index 77d70d4..0000000 --- a/reader/data/icons/filetree/12x12-png/rtf.png +++ /dev/null diff --git a/reader/data/icons/filetree/12x12-png/tcr.png b/reader/data/icons/filetree/12x12-png/tcr.png Binary files differdeleted file mode 100644 index 77d70d4..0000000 --- a/reader/data/icons/filetree/12x12-png/tcr.png +++ /dev/null diff --git a/reader/data/icons/filetree/12x12-png/unknown.png b/reader/data/icons/filetree/12x12-png/unknown.png Binary files differdeleted file mode 100644 index 77d70d4..0000000 --- a/reader/data/icons/filetree/12x12-png/unknown.png +++ /dev/null diff --git a/reader/data/icons/filetree/12x12-png/upfolder.png b/reader/data/icons/filetree/12x12-png/upfolder.png Binary files differdeleted file mode 100644 index f0c1cf8..0000000 --- a/reader/data/icons/filetree/12x12-png/upfolder.png +++ /dev/null diff --git a/reader/data/icons/filetree/12x12-png/weasel.png b/reader/data/icons/filetree/12x12-png/weasel.png Binary files differdeleted file mode 100644 index 77d70d4..0000000 --- a/reader/data/icons/filetree/12x12-png/weasel.png +++ /dev/null diff --git a/reader/data/icons/filetree/12x12-png/zipfolder.png b/reader/data/icons/filetree/12x12-png/zipfolder.png Binary files differdeleted file mode 100644 index 985e826..0000000 --- a/reader/data/icons/filetree/12x12-png/zipfolder.png +++ /dev/null diff --git a/reader/data/icons/filetree/22x22-transparent-ico/fb2.ico b/reader/data/icons/filetree/22x22-transparent-ico/fb2.ico Binary files differdeleted file mode 100644 index 31d71c6..0000000 --- a/reader/data/icons/filetree/22x22-transparent-ico/fb2.ico +++ /dev/null diff --git a/reader/data/icons/filetree/22x22-transparent-ico/folder.ico b/reader/data/icons/filetree/22x22-transparent-ico/folder.ico Binary files differdeleted file mode 100644 index b7c3313..0000000 --- a/reader/data/icons/filetree/22x22-transparent-ico/folder.ico +++ /dev/null diff --git a/reader/data/icons/filetree/22x22-transparent-ico/html.ico b/reader/data/icons/filetree/22x22-transparent-ico/html.ico Binary files differdeleted file mode 100644 index 4bda4b7..0000000 --- a/reader/data/icons/filetree/22x22-transparent-ico/html.ico +++ /dev/null diff --git a/reader/data/icons/filetree/22x22-transparent-ico/mobipocket.ico b/reader/data/icons/filetree/22x22-transparent-ico/mobipocket.ico Binary files differdeleted file mode 100644 index 31d71c6..0000000 --- a/reader/data/icons/filetree/22x22-transparent-ico/mobipocket.ico +++ /dev/null diff --git a/reader/data/icons/filetree/22x22-transparent-ico/oeb.ico b/reader/data/icons/filetree/22x22-transparent-ico/oeb.ico Binary files differdeleted file mode 100644 index 31d71c6..0000000 --- a/reader/data/icons/filetree/22x22-transparent-ico/oeb.ico +++ /dev/null diff --git a/reader/data/icons/filetree/22x22-transparent-ico/openreader.ico b/reader/data/icons/filetree/22x22-transparent-ico/openreader.ico Binary files differdeleted file mode 100644 index 31d71c6..0000000 --- a/reader/data/icons/filetree/22x22-transparent-ico/openreader.ico +++ /dev/null diff --git a/reader/data/icons/filetree/22x22-transparent-ico/palm.ico b/reader/data/icons/filetree/22x22-transparent-ico/palm.ico Binary files differdeleted file mode 100644 index 31d71c6..0000000 --- a/reader/data/icons/filetree/22x22-transparent-ico/palm.ico +++ /dev/null diff --git a/reader/data/icons/filetree/22x22-transparent-ico/plucker.ico b/reader/data/icons/filetree/22x22-transparent-ico/plucker.ico Binary files differdeleted file mode 100644 index 31d71c6..0000000 --- a/reader/data/icons/filetree/22x22-transparent-ico/plucker.ico +++ /dev/null diff --git a/reader/data/icons/filetree/22x22-transparent-ico/rtf.ico b/reader/data/icons/filetree/22x22-transparent-ico/rtf.ico Binary files differdeleted file mode 100644 index 31d71c6..0000000 --- a/reader/data/icons/filetree/22x22-transparent-ico/rtf.ico +++ /dev/null diff --git a/reader/data/icons/filetree/22x22-transparent-ico/tcr.ico b/reader/data/icons/filetree/22x22-transparent-ico/tcr.ico Binary files differdeleted file mode 100644 index 31d71c6..0000000 --- a/reader/data/icons/filetree/22x22-transparent-ico/tcr.ico +++ /dev/null diff --git a/reader/data/icons/filetree/22x22-transparent-ico/unknown.ico b/reader/data/icons/filetree/22x22-transparent-ico/unknown.ico Binary files differdeleted file mode 100644 index 31d71c6..0000000 --- a/reader/data/icons/filetree/22x22-transparent-ico/unknown.ico +++ /dev/null diff --git a/reader/data/icons/filetree/22x22-transparent-ico/upfolder.ico b/reader/data/icons/filetree/22x22-transparent-ico/upfolder.ico Binary files differdeleted file mode 100644 index 6f2caf7..0000000 --- a/reader/data/icons/filetree/22x22-transparent-ico/upfolder.ico +++ /dev/null diff --git a/reader/data/icons/filetree/22x22-transparent-ico/weasel.ico b/reader/data/icons/filetree/22x22-transparent-ico/weasel.ico Binary files differdeleted file mode 100644 index 31d71c6..0000000 --- a/reader/data/icons/filetree/22x22-transparent-ico/weasel.ico +++ /dev/null diff --git a/reader/data/icons/filetree/22x22-transparent-ico/zipfolder.ico b/reader/data/icons/filetree/22x22-transparent-ico/zipfolder.ico Binary files differdeleted file mode 100644 index b9cc03b..0000000 --- a/reader/data/icons/filetree/22x22-transparent-ico/zipfolder.ico +++ /dev/null diff --git a/reader/data/icons/filetree/22x22-transparent-png/fb2.png b/reader/data/icons/filetree/22x22-transparent-png/fb2.png Binary files differdeleted file mode 100644 index d68a56c..0000000 --- a/reader/data/icons/filetree/22x22-transparent-png/fb2.png +++ /dev/null diff --git a/reader/data/icons/filetree/22x22-transparent-png/folder.png b/reader/data/icons/filetree/22x22-transparent-png/folder.png Binary files differdeleted file mode 100644 index 45f71b1..0000000 --- a/reader/data/icons/filetree/22x22-transparent-png/folder.png +++ /dev/null diff --git a/reader/data/icons/filetree/22x22-transparent-png/html.png b/reader/data/icons/filetree/22x22-transparent-png/html.png Binary files differdeleted file mode 100644 index 51beaff..0000000 --- a/reader/data/icons/filetree/22x22-transparent-png/html.png +++ /dev/null diff --git a/reader/data/icons/filetree/22x22-transparent-png/mobipocket.png b/reader/data/icons/filetree/22x22-transparent-png/mobipocket.png Binary files differdeleted file mode 100644 index d68a56c..0000000 --- a/reader/data/icons/filetree/22x22-transparent-png/mobipocket.png +++ /dev/null diff --git a/reader/data/icons/filetree/22x22-transparent-png/oeb.png b/reader/data/icons/filetree/22x22-transparent-png/oeb.png Binary files differdeleted file mode 100644 index d68a56c..0000000 --- a/reader/data/icons/filetree/22x22-transparent-png/oeb.png +++ /dev/null diff --git a/reader/data/icons/filetree/22x22-transparent-png/openreader.png b/reader/data/icons/filetree/22x22-transparent-png/openreader.png Binary files differdeleted file mode 100644 index d68a56c..0000000 --- a/reader/data/icons/filetree/22x22-transparent-png/openreader.png +++ /dev/null diff --git a/reader/data/icons/filetree/22x22-transparent-png/palm.png b/reader/data/icons/filetree/22x22-transparent-png/palm.png Binary files differdeleted file mode 100644 index d68a56c..0000000 --- a/reader/data/icons/filetree/22x22-transparent-png/palm.png +++ /dev/null diff --git a/reader/data/icons/filetree/22x22-transparent-png/plucker.png b/reader/data/icons/filetree/22x22-transparent-png/plucker.png Binary files differdeleted file mode 100644 index d68a56c..0000000 --- a/reader/data/icons/filetree/22x22-transparent-png/plucker.png +++ /dev/null diff --git a/reader/data/icons/filetree/22x22-transparent-png/rtf.png b/reader/data/icons/filetree/22x22-transparent-png/rtf.png Binary files differdeleted file mode 100644 index c9baeda..0000000 --- a/reader/data/icons/filetree/22x22-transparent-png/rtf.png +++ /dev/null diff --git a/reader/data/icons/filetree/22x22-transparent-png/tcr.png b/reader/data/icons/filetree/22x22-transparent-png/tcr.png Binary files differdeleted file mode 100644 index d68a56c..0000000 --- a/reader/data/icons/filetree/22x22-transparent-png/tcr.png +++ /dev/null diff --git a/reader/data/icons/filetree/22x22-transparent-png/unknown.png b/reader/data/icons/filetree/22x22-transparent-png/unknown.png Binary files differdeleted file mode 100644 index d68a56c..0000000 --- a/reader/data/icons/filetree/22x22-transparent-png/unknown.png +++ /dev/null diff --git a/reader/data/icons/filetree/22x22-transparent-png/upfolder.png b/reader/data/icons/filetree/22x22-transparent-png/upfolder.png Binary files differdeleted file mode 100644 index 27d1214..0000000 --- a/reader/data/icons/filetree/22x22-transparent-png/upfolder.png +++ /dev/null diff --git a/reader/data/icons/filetree/22x22-transparent-png/weasel.png b/reader/data/icons/filetree/22x22-transparent-png/weasel.png Binary files differdeleted file mode 100644 index d68a56c..0000000 --- a/reader/data/icons/filetree/22x22-transparent-png/weasel.png +++ /dev/null diff --git a/reader/data/icons/filetree/22x22-transparent-png/zipfolder.png b/reader/data/icons/filetree/22x22-transparent-png/zipfolder.png Binary files differdeleted file mode 100644 index dc76287..0000000 --- a/reader/data/icons/filetree/22x22-transparent-png/zipfolder.png +++ /dev/null diff --git a/reader/data/icons/filetree/desktop b/reader/data/icons/filetree/desktop deleted file mode 120000 index 5524476..0000000 --- a/reader/data/icons/filetree/desktop +++ /dev/null @@ -1 +0,0 @@ -22x22-transparent-png
\ No newline at end of file diff --git a/reader/data/icons/filetree/32x32-transparent-png/fb2.png b/reader/data/icons/filetree/fb2.png Binary files differindex 928a679..928a679 100644 --- a/reader/data/icons/filetree/32x32-transparent-png/fb2.png +++ b/reader/data/icons/filetree/fb2.png diff --git a/reader/data/icons/filetree/32x32-transparent-png/folder.png b/reader/data/icons/filetree/folder.png Binary files differindex 0171b09..0171b09 100644 --- a/reader/data/icons/filetree/32x32-transparent-png/folder.png +++ b/reader/data/icons/filetree/folder.png diff --git a/reader/data/icons/filetree/32x32-transparent-png/html.png b/reader/data/icons/filetree/html.png Binary files differindex a896697..a896697 100644 --- a/reader/data/icons/filetree/32x32-transparent-png/html.png +++ b/reader/data/icons/filetree/html.png diff --git a/reader/data/icons/filetree/32x32-transparent-png/mobipocket.png b/reader/data/icons/filetree/mobipocket.png Binary files differindex 928a679..928a679 100644 --- a/reader/data/icons/filetree/32x32-transparent-png/mobipocket.png +++ b/reader/data/icons/filetree/mobipocket.png diff --git a/reader/data/icons/filetree/32x32-transparent-png/oeb.png b/reader/data/icons/filetree/oeb.png Binary files differindex 928a679..928a679 100644 --- a/reader/data/icons/filetree/32x32-transparent-png/oeb.png +++ b/reader/data/icons/filetree/oeb.png diff --git a/reader/data/icons/filetree/32x32-transparent-png/openreader.png b/reader/data/icons/filetree/openreader.png Binary files differindex 928a679..928a679 100644 --- a/reader/data/icons/filetree/32x32-transparent-png/openreader.png +++ b/reader/data/icons/filetree/openreader.png diff --git a/reader/data/icons/filetree/32x32-transparent-png/palm.png b/reader/data/icons/filetree/palm.png Binary files differindex 928a679..928a679 100644 --- a/reader/data/icons/filetree/32x32-transparent-png/palm.png +++ b/reader/data/icons/filetree/palm.png diff --git a/reader/data/icons/filetree/32x32-transparent-png/plucker.png b/reader/data/icons/filetree/plucker.png Binary files differindex 928a679..928a679 100644 --- a/reader/data/icons/filetree/32x32-transparent-png/plucker.png +++ b/reader/data/icons/filetree/plucker.png diff --git a/reader/data/icons/filetree/32x32-transparent-png/rtf.png b/reader/data/icons/filetree/rtf.png Binary files differindex 928a679..928a679 100644 --- a/reader/data/icons/filetree/32x32-transparent-png/rtf.png +++ b/reader/data/icons/filetree/rtf.png diff --git a/reader/data/icons/filetree/32x32-transparent-png/tcr.png b/reader/data/icons/filetree/tcr.png Binary files differindex 928a679..928a679 100644 --- a/reader/data/icons/filetree/32x32-transparent-png/tcr.png +++ b/reader/data/icons/filetree/tcr.png diff --git a/reader/data/icons/filetree/32x32-transparent-png/unknown.png b/reader/data/icons/filetree/unknown.png Binary files differindex 928a679..928a679 100644 --- a/reader/data/icons/filetree/32x32-transparent-png/unknown.png +++ b/reader/data/icons/filetree/unknown.png diff --git a/reader/data/icons/filetree/32x32-transparent-png/upfolder.png b/reader/data/icons/filetree/upfolder.png Binary files differindex 2fa4b0d..2fa4b0d 100644 --- a/reader/data/icons/filetree/32x32-transparent-png/upfolder.png +++ b/reader/data/icons/filetree/upfolder.png diff --git a/reader/data/icons/filetree/32x32-transparent-png/weasel.png b/reader/data/icons/filetree/weasel.png Binary files differindex 928a679..928a679 100644 --- a/reader/data/icons/filetree/32x32-transparent-png/weasel.png +++ b/reader/data/icons/filetree/weasel.png diff --git a/reader/data/icons/filetree/32x32-transparent-png/zipfolder.png b/reader/data/icons/filetree/zipfolder.png Binary files differindex 4b55b50..4b55b50 100644 --- a/reader/data/icons/filetree/32x32-transparent-png/zipfolder.png +++ b/reader/data/icons/filetree/zipfolder.png diff --git a/reader/data/icons/toolbar/14x15-png/addBook.png b/reader/data/icons/toolbar/14x15-png/addBook.png Binary files differdeleted file mode 100644 index 40364ca..0000000 --- a/reader/data/icons/toolbar/14x15-png/addBook.png +++ /dev/null diff --git a/reader/data/icons/toolbar/14x15-png/bookInfo.png b/reader/data/icons/toolbar/14x15-png/bookInfo.png Binary files differdeleted file mode 100644 index 3def30e..0000000 --- a/reader/data/icons/toolbar/14x15-png/bookInfo.png +++ /dev/null diff --git a/reader/data/icons/toolbar/14x15-png/findNext.png b/reader/data/icons/toolbar/14x15-png/findNext.png Binary files differdeleted file mode 100644 index 022c235..0000000 --- a/reader/data/icons/toolbar/14x15-png/findNext.png +++ /dev/null diff --git a/reader/data/icons/toolbar/14x15-png/findPrevious.png b/reader/data/icons/toolbar/14x15-png/findPrevious.png Binary files differdeleted file mode 100644 index a56aa4b..0000000 --- a/reader/data/icons/toolbar/14x15-png/findPrevious.png +++ /dev/null diff --git a/reader/data/icons/toolbar/14x15-png/gotoHome.png b/reader/data/icons/toolbar/14x15-png/gotoHome.png Binary files differdeleted file mode 100644 index bbca77a..0000000 --- a/reader/data/icons/toolbar/14x15-png/gotoHome.png +++ /dev/null diff --git a/reader/data/icons/toolbar/14x15-png/preferences.png b/reader/data/icons/toolbar/14x15-png/preferences.png Binary files differdeleted file mode 100644 index af981f3..0000000 --- a/reader/data/icons/toolbar/14x15-png/preferences.png +++ /dev/null diff --git a/reader/data/icons/toolbar/14x15-png/redo.png b/reader/data/icons/toolbar/14x15-png/redo.png Binary files differdeleted file mode 100644 index 1311212..0000000 --- a/reader/data/icons/toolbar/14x15-png/redo.png +++ /dev/null diff --git a/reader/data/icons/toolbar/14x15-png/rotate.png b/reader/data/icons/toolbar/14x15-png/rotate.png Binary files differdeleted file mode 100644 index 0a69733..0000000 --- a/reader/data/icons/toolbar/14x15-png/rotate.png +++ /dev/null diff --git a/reader/data/icons/toolbar/14x15-png/search.png b/reader/data/icons/toolbar/14x15-png/search.png Binary files differdeleted file mode 100644 index b9b735b..0000000 --- a/reader/data/icons/toolbar/14x15-png/search.png +++ /dev/null diff --git a/reader/data/icons/toolbar/14x15-png/showLibrary.png b/reader/data/icons/toolbar/14x15-png/showLibrary.png Binary files differdeleted file mode 100644 index 9a30429..0000000 --- a/reader/data/icons/toolbar/14x15-png/showLibrary.png +++ /dev/null diff --git a/reader/data/icons/toolbar/14x15-png/showReading.png b/reader/data/icons/toolbar/14x15-png/showReading.png Binary files differdeleted file mode 100644 index 5e0f6c3..0000000 --- a/reader/data/icons/toolbar/14x15-png/showReading.png +++ /dev/null diff --git a/reader/data/icons/toolbar/14x15-png/showRecent.png b/reader/data/icons/toolbar/14x15-png/showRecent.png Binary files differdeleted file mode 100644 index 9165f11..0000000 --- a/reader/data/icons/toolbar/14x15-png/showRecent.png +++ /dev/null diff --git a/reader/data/icons/toolbar/14x15-png/toc.png b/reader/data/icons/toolbar/14x15-png/toc.png Binary files differdeleted file mode 100644 index 575f378..0000000 --- a/reader/data/icons/toolbar/14x15-png/toc.png +++ /dev/null diff --git a/reader/data/icons/toolbar/14x15-png/undo.png b/reader/data/icons/toolbar/14x15-png/undo.png Binary files differdeleted file mode 100644 index 5e0f6c3..0000000 --- a/reader/data/icons/toolbar/14x15-png/undo.png +++ /dev/null diff --git a/reader/data/icons/toolbar/22x18-png/addBook.png b/reader/data/icons/toolbar/22x18-png/addBook.png Binary files differdeleted file mode 100644 index 7f4f02e..0000000 --- a/reader/data/icons/toolbar/22x18-png/addBook.png +++ /dev/null diff --git a/reader/data/icons/toolbar/22x18-png/bookInfo.png b/reader/data/icons/toolbar/22x18-png/bookInfo.png Binary files differdeleted file mode 100644 index 25eb5cb..0000000 --- a/reader/data/icons/toolbar/22x18-png/bookInfo.png +++ /dev/null diff --git a/reader/data/icons/toolbar/22x18-png/findNext.png b/reader/data/icons/toolbar/22x18-png/findNext.png Binary files differdeleted file mode 100644 index 45294b1..0000000 --- a/reader/data/icons/toolbar/22x18-png/findNext.png +++ /dev/null diff --git a/reader/data/icons/toolbar/22x18-png/findPrevious.png b/reader/data/icons/toolbar/22x18-png/findPrevious.png Binary files differdeleted file mode 100644 index c336d2b..0000000 --- a/reader/data/icons/toolbar/22x18-png/findPrevious.png +++ /dev/null diff --git a/reader/data/icons/toolbar/22x18-png/gotoHome.png b/reader/data/icons/toolbar/22x18-png/gotoHome.png Binary files differdeleted file mode 100644 index 4ff73d7..0000000 --- a/reader/data/icons/toolbar/22x18-png/gotoHome.png +++ /dev/null diff --git a/reader/data/icons/toolbar/22x18-png/preferences.png b/reader/data/icons/toolbar/22x18-png/preferences.png Binary files differdeleted file mode 100644 index 143fb28..0000000 --- a/reader/data/icons/toolbar/22x18-png/preferences.png +++ /dev/null diff --git a/reader/data/icons/toolbar/22x18-png/redo.png b/reader/data/icons/toolbar/22x18-png/redo.png Binary files differdeleted file mode 100644 index b2f128b..0000000 --- a/reader/data/icons/toolbar/22x18-png/redo.png +++ /dev/null diff --git a/reader/data/icons/toolbar/22x18-png/rotate.png b/reader/data/icons/toolbar/22x18-png/rotate.png Binary files differdeleted file mode 100644 index 9d4f128..0000000 --- a/reader/data/icons/toolbar/22x18-png/rotate.png +++ /dev/null diff --git a/reader/data/icons/toolbar/22x18-png/search.png b/reader/data/icons/toolbar/22x18-png/search.png Binary files differdeleted file mode 100644 index dfd2127..0000000 --- a/reader/data/icons/toolbar/22x18-png/search.png +++ /dev/null diff --git a/reader/data/icons/toolbar/22x18-png/showLibrary.png b/reader/data/icons/toolbar/22x18-png/showLibrary.png Binary files differdeleted file mode 100644 index aa56dcb..0000000 --- a/reader/data/icons/toolbar/22x18-png/showLibrary.png +++ /dev/null diff --git a/reader/data/icons/toolbar/22x18-png/showReading.png b/reader/data/icons/toolbar/22x18-png/showReading.png Binary files differdeleted file mode 100644 index fae13ca..0000000 --- a/reader/data/icons/toolbar/22x18-png/showReading.png +++ /dev/null diff --git a/reader/data/icons/toolbar/22x18-png/showRecent.png b/reader/data/icons/toolbar/22x18-png/showRecent.png Binary files differdeleted file mode 100644 index 0ffe21f..0000000 --- a/reader/data/icons/toolbar/22x18-png/showRecent.png +++ /dev/null diff --git a/reader/data/icons/toolbar/22x18-png/toc.png b/reader/data/icons/toolbar/22x18-png/toc.png Binary files differdeleted file mode 100644 index aa9e4c3..0000000 --- a/reader/data/icons/toolbar/22x18-png/toc.png +++ /dev/null diff --git a/reader/data/icons/toolbar/22x18-png/undo.png b/reader/data/icons/toolbar/22x18-png/undo.png Binary files differdeleted file mode 100644 index fae13ca..0000000 --- a/reader/data/icons/toolbar/22x18-png/undo.png +++ /dev/null diff --git a/reader/data/icons/toolbar/32x32-transparent-ico/addBook.ico b/reader/data/icons/toolbar/32x32-transparent-ico/addBook.ico Binary files differdeleted file mode 100644 index 4d4f007..0000000 --- a/reader/data/icons/toolbar/32x32-transparent-ico/addBook.ico +++ /dev/null diff --git a/reader/data/icons/toolbar/32x32-transparent-ico/advancedSearchOnNetwork.ico b/reader/data/icons/toolbar/32x32-transparent-ico/advancedSearchOnNetwork.ico Binary files differdeleted file mode 100644 index 25e82d3..0000000 --- a/reader/data/icons/toolbar/32x32-transparent-ico/advancedSearchOnNetwork.ico +++ /dev/null diff --git a/reader/data/icons/toolbar/32x32-transparent-ico/bookInfo.ico b/reader/data/icons/toolbar/32x32-transparent-ico/bookInfo.ico Binary files differdeleted file mode 100644 index dd9f4db..0000000 --- a/reader/data/icons/toolbar/32x32-transparent-ico/bookInfo.ico +++ /dev/null diff --git a/reader/data/icons/toolbar/32x32-transparent-ico/byAuthor.ico b/reader/data/icons/toolbar/32x32-transparent-ico/byAuthor.ico Binary files differdeleted file mode 100644 index 5adf345..0000000 --- a/reader/data/icons/toolbar/32x32-transparent-ico/byAuthor.ico +++ /dev/null diff --git a/reader/data/icons/toolbar/32x32-transparent-ico/byTag.ico b/reader/data/icons/toolbar/32x32-transparent-ico/byTag.ico Binary files differdeleted file mode 100644 index e2467b4..0000000 --- a/reader/data/icons/toolbar/32x32-transparent-ico/byTag.ico +++ /dev/null diff --git a/reader/data/icons/toolbar/32x32-transparent-ico/findNext.ico b/reader/data/icons/toolbar/32x32-transparent-ico/findNext.ico Binary files differdeleted file mode 100644 index 1556227..0000000 --- a/reader/data/icons/toolbar/32x32-transparent-ico/findNext.ico +++ /dev/null diff --git a/reader/data/icons/toolbar/32x32-transparent-ico/findPrevious.ico b/reader/data/icons/toolbar/32x32-transparent-ico/findPrevious.ico Binary files differdeleted file mode 100644 index 7f933db..0000000 --- a/reader/data/icons/toolbar/32x32-transparent-ico/findPrevious.ico +++ /dev/null diff --git a/reader/data/icons/toolbar/32x32-transparent-ico/gotoHome.ico b/reader/data/icons/toolbar/32x32-transparent-ico/gotoHome.ico Binary files differdeleted file mode 100644 index 41a406a..0000000 --- a/reader/data/icons/toolbar/32x32-transparent-ico/gotoHome.ico +++ /dev/null diff --git a/reader/data/icons/toolbar/32x32-transparent-ico/preferences.ico b/reader/data/icons/toolbar/32x32-transparent-ico/preferences.ico Binary files differdeleted file mode 100644 index 878df5c..0000000 --- a/reader/data/icons/toolbar/32x32-transparent-ico/preferences.ico +++ /dev/null diff --git a/reader/data/icons/toolbar/32x32-transparent-ico/redo.ico b/reader/data/icons/toolbar/32x32-transparent-ico/redo.ico Binary files differdeleted file mode 100644 index dfd3c93..0000000 --- a/reader/data/icons/toolbar/32x32-transparent-ico/redo.ico +++ /dev/null diff --git a/reader/data/icons/toolbar/32x32-transparent-ico/rotate.ico b/reader/data/icons/toolbar/32x32-transparent-ico/rotate.ico Binary files differdeleted file mode 100644 index 0727596..0000000 --- a/reader/data/icons/toolbar/32x32-transparent-ico/rotate.ico +++ /dev/null diff --git a/reader/data/icons/toolbar/32x32-transparent-ico/search.ico b/reader/data/icons/toolbar/32x32-transparent-ico/search.ico Binary files differdeleted file mode 100644 index 8fa3102..0000000 --- a/reader/data/icons/toolbar/32x32-transparent-ico/search.ico +++ /dev/null diff --git a/reader/data/icons/toolbar/32x32-transparent-ico/showHelp.ico b/reader/data/icons/toolbar/32x32-transparent-ico/showHelp.ico Binary files differdeleted file mode 100644 index 6221e6e..0000000 --- a/reader/data/icons/toolbar/32x32-transparent-ico/showHelp.ico +++ /dev/null diff --git a/reader/data/icons/toolbar/32x32-transparent-ico/showLibrary.ico b/reader/data/icons/toolbar/32x32-transparent-ico/showLibrary.ico Binary files differdeleted file mode 100644 index ac83cf4..0000000 --- a/reader/data/icons/toolbar/32x32-transparent-ico/showLibrary.ico +++ /dev/null diff --git a/reader/data/icons/toolbar/32x32-transparent-ico/showNetLibrary.ico b/reader/data/icons/toolbar/32x32-transparent-ico/showNetLibrary.ico Binary files differdeleted file mode 100644 index a0d0614..0000000 --- a/reader/data/icons/toolbar/32x32-transparent-ico/showNetLibrary.ico +++ /dev/null diff --git a/reader/data/icons/toolbar/32x32-transparent-ico/showReading.ico b/reader/data/icons/toolbar/32x32-transparent-ico/showReading.ico Binary files differdeleted file mode 100644 index f3f58bb..0000000 --- a/reader/data/icons/toolbar/32x32-transparent-ico/showReading.ico +++ /dev/null diff --git a/reader/data/icons/toolbar/32x32-transparent-ico/showRecent.ico b/reader/data/icons/toolbar/32x32-transparent-ico/showRecent.ico Binary files differdeleted file mode 100644 index 273774c..0000000 --- a/reader/data/icons/toolbar/32x32-transparent-ico/showRecent.ico +++ /dev/null diff --git a/reader/data/icons/toolbar/32x32-transparent-ico/toc.ico b/reader/data/icons/toolbar/32x32-transparent-ico/toc.ico Binary files differdeleted file mode 100644 index cc75cd9..0000000 --- a/reader/data/icons/toolbar/32x32-transparent-ico/toc.ico +++ /dev/null diff --git a/reader/data/icons/toolbar/32x32-transparent-ico/undo.ico b/reader/data/icons/toolbar/32x32-transparent-ico/undo.ico Binary files differdeleted file mode 100644 index 3910a73..0000000 --- a/reader/data/icons/toolbar/32x32-transparent-ico/undo.ico +++ /dev/null diff --git a/reader/data/icons/toolbar/32x32-transparent-png/addBook.png b/reader/data/icons/toolbar/addBook.png Binary files differindex e7046fd..e7046fd 100644 --- a/reader/data/icons/toolbar/32x32-transparent-png/addBook.png +++ b/reader/data/icons/toolbar/addBook.png diff --git a/reader/data/icons/toolbar/32x32-transparent-png/advancedSearchOnNetwork.png b/reader/data/icons/toolbar/advancedSearchOnNetwork.png Binary files differindex f2e8fd0..f2e8fd0 100644 --- a/reader/data/icons/toolbar/32x32-transparent-png/advancedSearchOnNetwork.png +++ b/reader/data/icons/toolbar/advancedSearchOnNetwork.png diff --git a/reader/data/icons/toolbar/32x32-transparent-png/bookInfo.png b/reader/data/icons/toolbar/bookInfo.png Binary files differindex 929a71d..929a71d 100644 --- a/reader/data/icons/toolbar/32x32-transparent-png/bookInfo.png +++ b/reader/data/icons/toolbar/bookInfo.png diff --git a/reader/data/icons/toolbar/32x32-transparent-png/byAuthor.png b/reader/data/icons/toolbar/byAuthor.png Binary files differindex 4b5ef82..4b5ef82 100644 --- a/reader/data/icons/toolbar/32x32-transparent-png/byAuthor.png +++ b/reader/data/icons/toolbar/byAuthor.png diff --git a/reader/data/icons/toolbar/32x32-transparent-png/byTag.png b/reader/data/icons/toolbar/byTag.png Binary files differindex 9df9113..9df9113 100644 --- a/reader/data/icons/toolbar/32x32-transparent-png/byTag.png +++ b/reader/data/icons/toolbar/byTag.png diff --git a/reader/data/icons/toolbar/desktop b/reader/data/icons/toolbar/desktop deleted file mode 120000 index a98d612..0000000 --- a/reader/data/icons/toolbar/desktop +++ /dev/null @@ -1 +0,0 @@ -32x32-transparent-png
\ No newline at end of file diff --git a/reader/data/icons/toolbar/32x32-transparent-png/findNext.png b/reader/data/icons/toolbar/findNext.png Binary files differindex a784e80..a784e80 100644 --- a/reader/data/icons/toolbar/32x32-transparent-png/findNext.png +++ b/reader/data/icons/toolbar/findNext.png diff --git a/reader/data/icons/toolbar/32x32-transparent-png/findPrevious.png b/reader/data/icons/toolbar/findPrevious.png Binary files differindex 4734693..4734693 100644 --- a/reader/data/icons/toolbar/32x32-transparent-png/findPrevious.png +++ b/reader/data/icons/toolbar/findPrevious.png diff --git a/reader/data/icons/toolbar/32x32-transparent-png/gotoHome.png b/reader/data/icons/toolbar/gotoHome.png Binary files differindex e3fb36b..e3fb36b 100644 --- a/reader/data/icons/toolbar/32x32-transparent-png/gotoHome.png +++ b/reader/data/icons/toolbar/gotoHome.png diff --git a/reader/data/icons/toolbar/32x32-transparent-png/preferences.png b/reader/data/icons/toolbar/preferences.png Binary files differindex 5fd04b9..5fd04b9 100644 --- a/reader/data/icons/toolbar/32x32-transparent-png/preferences.png +++ b/reader/data/icons/toolbar/preferences.png diff --git a/reader/data/icons/toolbar/32x32-transparent-png/redo.png b/reader/data/icons/toolbar/redo.png Binary files differindex f822240..f822240 100644 --- a/reader/data/icons/toolbar/32x32-transparent-png/redo.png +++ b/reader/data/icons/toolbar/redo.png diff --git a/reader/data/icons/toolbar/32x32-transparent-png/rotate.png b/reader/data/icons/toolbar/rotate.png Binary files differindex 4492032..4492032 100644 --- a/reader/data/icons/toolbar/32x32-transparent-png/rotate.png +++ b/reader/data/icons/toolbar/rotate.png diff --git a/reader/data/icons/toolbar/32x32-transparent-png/search.png b/reader/data/icons/toolbar/search.png Binary files differindex 4fe48ab..4fe48ab 100644 --- a/reader/data/icons/toolbar/32x32-transparent-png/search.png +++ b/reader/data/icons/toolbar/search.png diff --git a/reader/data/icons/toolbar/32x32-transparent-png/showHelp.png b/reader/data/icons/toolbar/showHelp.png Binary files differindex a65ca1b..a65ca1b 100644 --- a/reader/data/icons/toolbar/32x32-transparent-png/showHelp.png +++ b/reader/data/icons/toolbar/showHelp.png diff --git a/reader/data/icons/toolbar/32x32-transparent-png/showLibrary.png b/reader/data/icons/toolbar/showLibrary.png Binary files differindex e244cd2..e244cd2 100644 --- a/reader/data/icons/toolbar/32x32-transparent-png/showLibrary.png +++ b/reader/data/icons/toolbar/showLibrary.png diff --git a/reader/data/icons/toolbar/32x32-transparent-png/showNetLibrary.png b/reader/data/icons/toolbar/showNetLibrary.png Binary files differindex 54e3d0a..54e3d0a 100644 --- a/reader/data/icons/toolbar/32x32-transparent-png/showNetLibrary.png +++ b/reader/data/icons/toolbar/showNetLibrary.png diff --git a/reader/data/icons/toolbar/32x32-transparent-png/showNetworkLibrary.png b/reader/data/icons/toolbar/showNetworkLibrary.png index 9e64d17..9e64d17 120000 --- a/reader/data/icons/toolbar/32x32-transparent-png/showNetworkLibrary.png +++ b/reader/data/icons/toolbar/showNetworkLibrary.png diff --git a/reader/data/icons/toolbar/32x32-transparent-png/showReading.png b/reader/data/icons/toolbar/showReading.png Binary files differindex cbafa6b..cbafa6b 100644 --- a/reader/data/icons/toolbar/32x32-transparent-png/showReading.png +++ b/reader/data/icons/toolbar/showReading.png diff --git a/reader/data/icons/toolbar/32x32-transparent-png/showRecent.png b/reader/data/icons/toolbar/showRecent.png Binary files differindex f4ad292..f4ad292 100644 --- a/reader/data/icons/toolbar/32x32-transparent-png/showRecent.png +++ b/reader/data/icons/toolbar/showRecent.png diff --git a/reader/data/icons/toolbar/32x32-transparent-png/toc.png b/reader/data/icons/toolbar/toc.png Binary files differindex d7c9227..d7c9227 100644 --- a/reader/data/icons/toolbar/32x32-transparent-png/toc.png +++ b/reader/data/icons/toolbar/toc.png diff --git a/reader/data/icons/toolbar/32x32-transparent-png/undo.png b/reader/data/icons/toolbar/undo.png Binary files differindex cbbf8b0..cbbf8b0 100644 --- a/reader/data/icons/toolbar/32x32-transparent-png/undo.png +++ b/reader/data/icons/toolbar/undo.png diff --git a/reader/desktop/CMakeLists.txt b/reader/desktop/CMakeLists.txt new file mode 100644 index 0000000..eb69a2a --- /dev/null +++ b/reader/desktop/CMakeLists.txt @@ -0,0 +1,6 @@ +INSTALL( + FILES tde-ebook-reader.1 + DESTINATION ${MAN_INSTALL_DIR}/man1 +) + +tde_create_translated_desktop( tde-ebook-reader.desktop ) diff --git a/reader/desktop/desktop b/reader/desktop/tde-ebook-reader.desktop index 8bdf367..8bdf367 100644 --- a/reader/desktop/desktop +++ b/reader/desktop/tde-ebook-reader.desktop diff --git a/reader/src/CMakeLists.txt b/reader/src/CMakeLists.txt new file mode 100644 index 0000000..1ffca05 --- /dev/null +++ b/reader/src/CMakeLists.txt @@ -0,0 +1,19 @@ +include_directories( + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_BINARY_DIR} + ${CMAKE_SOURCE_DIR}/zlibrary/core/include + ${CMAKE_SOURCE_DIR}/zlibrary/text/include + ${CMAKE_BINARY_DIR}/zlibrary/core/include + ${CMAKE_BINARY_DIR}/zlibrary/text/include +) + + +##### libzlcore-tqt (shared) + +file( GLOB_RECURSE _src_cpp_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.cpp) +tde_add_executable( tde-ebook-reader AUTOMOC + SOURCES ${_src_cpp_files} + LINK zlcore-tqt-shared zltext-tqt-shared ${SQLITE_LIBRARIES} + DESTINATION ${BIN_INSTALL_DIR} +) diff --git a/reader/src/formats/docbook/DocBookBookReader.cpp b/reader/src/formats/docbook/DocBookBookReader.cpp deleted file mode 100644 index eada90c..0000000 --- a/reader/src/formats/docbook/DocBookBookReader.cpp +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Copyright (C) 2004-2012 Geometer Plus <[email protected]> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. - */ - -#include <ZLInputStream.h> - -#include "DocBookBookReader.h" - -#include "../../bookmodel/BookModel.h" -#include "../../model/Paragraph.h" - -DocBookBookReader::DocBookBookReader(BookModel &model) : BookReader(model) { - setMainTextModel(); - - myReadText = false; -} - -void DocBookBookReader::characterDataHandler(const char *text, std::size_t len) { - addDataToBuffer(text, len); -} - -void DocBookBookReader::startElementHandler(int tag, const char **) { - switch (tag) { - case _SECT1: - myReadText = true; - pushKind(REGULAR); - beginContentsParagraph(); - break; - case _PARA: - if (myReadText) { - beginParagraph(); - } - break; - case _TITLE: - enterTitle(); - pushKind(SECTION_TITLE); - if (myReadText) { - beginParagraph(); - } - break; - case _EMPHASIS: - addControl(EMPHASIS, true); - break; - case _CITETITLE: - addControl(CITE, true); - break; - case _ULINK: - case _EMAIL: - addControl(CODE, true); - break; - case _BLOCKQUOTE: - pushKind(STRONG); - break; - default: - break; - } -} - -void DocBookBookReader::endElementHandler(int tag) { - switch (tag) { - case _SECT1: - myReadText = false; - popKind(); - endContentsParagraph(); - insertEndOfSectionParagraph(); - break; - case _PARA: - endParagraph(); - break; - case _TITLE: - endParagraph(); - popKind(); - endContentsParagraph(); - exitTitle(); - break; - case _EMPHASIS: - addControl(EMPHASIS, false); - break; - case _CITETITLE: - addControl(CITE, false); - break; - case _ULINK: - case _EMAIL: - addControl(CODE, false); - break; - case _BLOCKQUOTE: - popKind(); - break; - default: - break; - } -} - -void DocBookBookReader::readBook(shared_ptr<ZLInputStream> stream) { - readDocument(stream); -} diff --git a/reader/src/formats/docbook/DocBookBookReader.h b/reader/src/formats/docbook/DocBookBookReader.h deleted file mode 100644 index c226184..0000000 --- a/reader/src/formats/docbook/DocBookBookReader.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (C) 2004-2012 Geometer Plus <[email protected]> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. - */ - -#ifndef __DOCBOOKBOOKREADER_H__ -#define __DOCBOOKBOOKREADER_H__ - -#include "DocBookReader.h" -#include "../../bookmodel/BookReader.h" - -class BookModel; - -class DocBookBookReader : public BookReader, public DocBookReader { - -public: - DocBookBookReader(BookModel &model); - ~DocBookBookReader(); - void readBook(shared_ptr<ZLInputStream> stream); - - void startElementHandler(int tag, const char **attributes); - void endElementHandler(int tag); - void characterDataHandler(const char *text, std::size_t len); - -private: - bool myReadText; -}; - -inline DocBookBookReader::~DocBookBookReader() {} - -#endif /* __DOCBOOKBOOKREADER_H__ */ diff --git a/reader/src/formats/docbook/DocBookDescriptionReader.cpp b/reader/src/formats/docbook/DocBookDescriptionReader.cpp deleted file mode 100644 index bcd4ae4..0000000 --- a/reader/src/formats/docbook/DocBookDescriptionReader.cpp +++ /dev/null @@ -1,137 +0,0 @@ -/* - * Copyright (C) 2004-2012 Geometer Plus <[email protected]> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. - */ - -#include <ZLInputStream.h> -#include <ZLUnicodeUtil.h> - -#include "DocBookDescriptionReader.h" - -#include "../../library/Book.h" -#include "../../library/Author.h" - -DocBookDescriptionReader::DocBookDescriptionReader(Book &book) : myBook(book) { - myReadTitle = false; - myReadAuthor = false; - for (int i = 0; i < 3; ++i) { - myReadAuthorName[i] = false; - } - myBook.setLanguage("en"); - myDepth = 0; -} - -void DocBookDescriptionReader::characterDataHandler(const char *text, std::size_t len) { - if (myReadTitle) { - myBook.setTitle(myBook.title() + std::string(text, len)); - } else { - for (int i = 0; i < 3; ++i) { - if (myReadAuthorName[i]) { - myAuthorNames[i].append(text, len); - break; - } - } - } -} - -void DocBookDescriptionReader::startElementHandler(int tag, const char **) { - ++myDepth; - switch (tag) { - case _SECT1: - myReturnCode = true; - myDoBreak = true; - break; - case _TITLE: - if (myDepth == 2) { - myReadTitle = true; - } - break; - case _AUTHOR: - if (myDepth == 3) { - myReadAuthor = true; - } - break; - case _FIRSTNAME: - if (myReadAuthor) { - myReadAuthorName[0] = true; - } - break; - case _OTHERNAME: - if (myReadAuthor) { - myReadAuthorName[1] = true; - } - break; - case _SURNAME: - if (myReadAuthor) { - myReadAuthorName[2] = true; - } - break; - default: - break; - } -} - -void DocBookDescriptionReader::endElementHandler(int tag) { - --myDepth; - switch (tag) { - case _TITLE: - myReadTitle = false; - break; - case _AUTHOR: { - ZLUnicodeUtil::utf8Trim(myAuthorNames[0]); - ZLUnicodeUtil::utf8Trim(myAuthorNames[1]); - ZLUnicodeUtil::utf8Trim(myAuthorNames[2]); - std::string fullName = myAuthorNames[0]; - if (!fullName.empty() && !myAuthorNames[1].empty()) { - fullName += ' '; - } - fullName += myAuthorNames[1]; - if (!fullName.empty() && !myAuthorNames[2].empty()) { - fullName += ' '; - } - fullName += myAuthorNames[2]; - shared_ptr<Author> author = Author::create(fullName, myAuthorNames[2]); - if (!author.isNull()) { - myBook.authors().add( author ); - } - } - myAuthorNames[0].erase(); - myAuthorNames[1].erase(); - myAuthorNames[2].erase(); - myReadAuthor = false; - break; - case _FIRSTNAME: - myReadAuthorName[0] = false; - break; - case _OTHERNAME: - myReadAuthorName[1] = false; - break; - case _SURNAME: - myReadAuthorName[2] = false; - break; - default: - break; - } -} - -bool DocBookDescriptionReader::readMetaInfo(shared_ptr<ZLInputStream> stream) { - bool code = readDocument(stream); - if (myBook.authors().empty()) { - myBook.authors().push_back( new Author() ); - } - return code; -} diff --git a/reader/src/formats/docbook/DocBookDescriptionReader.h b/reader/src/formats/docbook/DocBookDescriptionReader.h deleted file mode 100644 index d9f4aa3..0000000 --- a/reader/src/formats/docbook/DocBookDescriptionReader.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (C) 2004-2012 Geometer Plus <[email protected]> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. - */ - -#ifndef __DOCBOOKDESCRIPTIONREADER_H__ -#define __DOCBOOKDESCRIPTIONREADER_H__ - -#include <string> - -#include "DocBookReader.h" - -class Book; - -class DocBookDescriptionReader : public DocBookReader { - -public: - DocBookDescriptionReader(Book &book); - ~DocBookDescriptionReader(); - bool readMetaInfo(shared_ptr<ZLInputStream> stream); - - void startElementHandler(int tag, const char **attributes); - void endElementHandler(int tag); - void characterDataHandler(const char *text, std::size_t len); - -private: - Book &myBook; - - bool myReturnCode; - - bool myReadTitle; - bool myReadAuthor; - bool myReadAuthorName[3]; - - std::string myAuthorNames[3]; - - int myDepth; -}; - -inline DocBookDescriptionReader::~DocBookDescriptionReader() {} - -#endif /* __DOCBOOKDESCRIPTIONREADER_H__ */ diff --git a/reader/src/formats/docbook/DocBookPlugin.cpp b/reader/src/formats/docbook/DocBookPlugin.cpp deleted file mode 100644 index 1b890a6..0000000 --- a/reader/src/formats/docbook/DocBookPlugin.cpp +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (C) 2004-2012 Geometer Plus <[email protected]> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. - */ - -#include <ZLFile.h> -#include <ZLInputStream.h> - -#include "DocBookPlugin.h" -#include "DocBookDescriptionReader.h" -#include "DocBookBookReader.h" -#include "../../library/Book.h" - -bool DocBookPlugin::acceptsFile(const std::string &extension) const { - return extension == "xml"; -} - -bool DocBookPlugin::readMetaInfo(Book &book) const { - return DocBookDescriptionReader(book).readMetaInfo(ZLFile(path).inputStream()); -} - -bool DocBookPlugin::readLanguageAndEncoding(Book &book) const { - (void)book; - return true; -} - -bool DocBookPlugin::readModel(BookModel &model) const { - return DocBookBookReader(model).readDocument(ZLFile(book.fileName()).inputStream()); -} diff --git a/reader/src/formats/docbook/DocBookPlugin.h b/reader/src/formats/docbook/DocBookPlugin.h deleted file mode 100644 index 324b2be..0000000 --- a/reader/src/formats/docbook/DocBookPlugin.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (C) 2004-2012 Geometer Plus <[email protected]> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. - */ - -#ifndef __DOCBOOKPLUGIN_H__ -#define __DOCBOOKPLUGIN_H__ - -#include "../FormatPlugin.h" - -class DocBookPlugin : public FormatPlugin { - -public: - DocBookPlugin(); - ~DocBookPlugin(); - bool providesMetaInfo() const; - bool acceptsFile(const std::string &extension) const; - bool readMetaInfo(Book &book) const; - bool readLanguageAndEncoding(Book &book) const; - bool readModel(BookModel &model) const; -}; - -inline DocBookPlugin::DocBookPlugin() {} -inline DocBookPlugin::~DocBookPlugin() {} -inline bool DocBookPlugin::providesMetaInfo() const { return true; } - -#endif /* __DOCBOOKPLUGIN_H__ */ diff --git a/reader/src/formats/docbook/DocBookReader.cpp b/reader/src/formats/docbook/DocBookReader.cpp deleted file mode 100644 index 73c17d1..0000000 --- a/reader/src/formats/docbook/DocBookReader.cpp +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (C) 2004-2012 Geometer Plus <[email protected]> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. - */ - -#include <ZLStringUtil.h> -#include <ZLFile.h> -#include <ZLDir.h> - -#include "DocBookReader.h" - -static const DocBookReader::Tag TAGS[] = { - {"article", DocBookReader::_ARTICLE}, - {"title", DocBookReader::_TITLE}, - {"articleinfo", DocBookReader::_ARTICLEINFO}, - {"author", DocBookReader::_AUTHOR}, - {"firstname", DocBookReader::_FIRSTNAME}, - {"othername", DocBookReader::_OTHERNAME}, - {"surname", DocBookReader::_SURNAME}, - {"affiliation", DocBookReader::_AFFILIATION}, - {"orgname", DocBookReader::_ORGNAME}, - {"ulink", DocBookReader::_ULINK}, - {"address", DocBookReader::_ADDRESS}, - {"email", DocBookReader::_EMAIL}, - {"pubdate", DocBookReader::_PUBDATE}, - {"releaseinfo", DocBookReader::_RELEASEINFO}, - {"copyright", DocBookReader::_COPYRIGHT}, - {"year", DocBookReader::_YEAR}, - {"holder", DocBookReader::_HOLDER}, - {"legalnotice", DocBookReader::_LEGALNOTICE}, - {"para", DocBookReader::_PARA}, - {"revhistory", DocBookReader::_REVHISTORY}, - {"revision", DocBookReader::_REVISION}, - {"revnumber", DocBookReader::_REVNUMBER}, - {"date", DocBookReader::_DATE}, - {"authorinitials", DocBookReader::_AUTHORINITIALS}, - {"revremark", DocBookReader::_REVREMARK}, - {"abstract", DocBookReader::_ABSTRACT}, - {"sect1", DocBookReader::_SECT1}, - {"emphasis", DocBookReader::_EMPHASIS}, - {"blockquote", DocBookReader::_BLOCKQUOTE}, - {"citetitle", DocBookReader::_CITETITLE}, - {"link", DocBookReader::_LINK}, - {"foreignphrase", DocBookReader::_FOREIGNPHRASE}, - {"part", DocBookReader::_PART}, - {"preface", DocBookReader::_PREFACE}, - {"chapter", DocBookReader::_CHAPTER}, - {0, DocBookReader::_UNKNOWN} -}; - -const DocBookReader::Tag *DocBookReader::tags() const { - return TAGS; -} - -const std::vector<std::string> &DocBookReader::externalDTDs() const { - return EntityFilesCollector::Instance().externalDTDs("docbook"); -} diff --git a/reader/src/formats/docbook/DocBookReader.h b/reader/src/formats/docbook/DocBookReader.h deleted file mode 100644 index a18f358..0000000 --- a/reader/src/formats/docbook/DocBookReader.h +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright (C) 2004-2012 Geometer Plus <[email protected]> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. - */ - -#ifndef __DOCBOOKREADER_H__ -#define __DOCBOOKREADER_H__ - -#include <ZLXMLReader.h> - -class DocBookReader : public ZLXMLReader { - -public: - static std::string DTDDirectory; - -public: - struct Tag { - const char *tagName; - int tagCode; - }; - -public: -//protected: - enum TagCode { - _ARTICLE, - _TITLE, - _ARTICLEINFO, - _AUTHOR, - _FIRSTNAME, - _OTHERNAME, - _SURNAME, - _AFFILIATION, - _ORGNAME, - _ULINK, - _ADDRESS, - _EMAIL, - _PUBDATE, - _RELEASEINFO, - _COPYRIGHT, - _YEAR, - _HOLDER, - _LEGALNOTICE, - _PARA, - _REVHISTORY, - _REVISION, - _REVNUMBER, - _DATE, - _AUTHORINITIALS, - _REVREMARK, - _ABSTRACT, - _SECT1, - _EMPHASIS, - _BLOCKQUOTE, - _CITETITLE, - _LINK, - _FOREIGNPHRASE, - _FIRSTTERM, - _FILENAME, - _ITEMIZEDLIST, - _LISTITEM, - _PART, - _PREFACE, - _CHAPTER, - _UNKNOWN - }; - -protected: - DocBookReader(); - -public: - ~DocBookReader(); - const Tag *tags() const; - -protected: - const std::vector<std::string> &externalDTDs() const; -}; - -inline DocBookReader::DocBookReader() {} -inline DocBookReader::~DocBookReader() {} - -#endif /* __DOCBOOKREADER_H__ */ diff --git a/reader/src/formats/dummy/DummyBookReader.cpp b/reader/src/formats/dummy/DummyBookReader.cpp deleted file mode 100644 index 2684ebf..0000000 --- a/reader/src/formats/dummy/DummyBookReader.cpp +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (C) 2004-2012 Geometer Plus <[email protected]> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. - */ - -#include <ZLInputStream.h> - -#include "DummyBookReader.h" -#include "../../bookmodel/BookModel.h" - -DummyBookReader::DummyBookReader(BookModel &model) : myModelReader(model) { -} - -/* -void DummyBookReader::characterDataHandler(const char *text, std::size_t len) { -} - -void DummyBookReader::startElementHandler(int tag, const char **xmlattributes) { -} - -void DummyBookReader::endElementHandler(int tag) { -} -*/ - -bool DummyBookReader::readBook(shared_ptr<ZLInputStream> stream) { - //return readDocument(stream); - return true; -} diff --git a/reader/src/formats/dummy/DummyBookReader.h b/reader/src/formats/dummy/DummyBookReader.h deleted file mode 100644 index ba6bcf8..0000000 --- a/reader/src/formats/dummy/DummyBookReader.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (C) 2004-2012 Geometer Plus <[email protected]> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. - */ - -#ifndef __DUMMYBOOKREADER_H__ -#define __DUMMYBOOKREADER_H__ - -#include "../../bookmodel/BookReader.h" - -class DummyBookReader { - -public: - DummyBookReader(BookModel &model); - ~DummyBookReader(); - bool readBook(shared_ptr<ZLInputStream> stream); - - /* - void startElementHandler(int tag, const char **attributes); - void endElementHandler(int tag); - void characterDataHandler(const char *text, std::size_t len); - */ - -private: - BookReader myModelReader; -}; - -inline DummyBookReader::~DummyBookReader() {} - -#endif /* __DUMMYBOOKREADER_H__ */ diff --git a/reader/src/formats/dummy/DummyMetaInfoReader.cpp b/reader/src/formats/dummy/DummyMetaInfoReader.cpp deleted file mode 100644 index 5dd13c5..0000000 --- a/reader/src/formats/dummy/DummyMetaInfoReader.cpp +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (C) 2004-2012 Geometer Plus <[email protected]> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. - */ - -#include <ZLInputStream.h> - -#include "DummyMetaInfoReader.h" - -DummyMetaInfoReader::DummyMetaInfoReader(Book &book) : myBook(book) { -} - -/* -void DummyMetaInfoReader::characterDataHandler(const char *text, std::size_t len) { -} - -void DummyMetaInfoReader::startElementHandler(int tag, const char **) { -} - -void DummyMetaInfoReader::endElementHandler(int tag) { -} -*/ - -bool DummyMetaInfoReader::readMetaInfo(shared_ptr<ZLInputStream> stream) { - return false; -} diff --git a/reader/src/formats/dummy/DummyMetaInfoReader.h b/reader/src/formats/dummy/DummyMetaInfoReader.h deleted file mode 100644 index 818d996..0000000 --- a/reader/src/formats/dummy/DummyMetaInfoReader.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (C) 2004-2012 Geometer Plus <[email protected]> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. - */ - -#ifndef __DUMMYMETAINFOREADER_H__ -#define __DUMMYMETAINFOREADER_H__ - -#include <string> - -class Book; - -class DummyMetaInfoReader { - -public: - DummyMetaInfoReader(Book &book); - ~DummyMetaInfoReader(); - bool readMetaInfo(shared_ptr<ZLInputStream> stream); - - /* - void startElementHandler(int tag, const char **attributes); - void endElementHandler(int tag); - void characterDataHandler(const char *text, std::size_t len); - */ - -private: - Book &myBook; -}; - -inline DummyMetaInfoReader::~DummyMetaInfoReader() {} - -#endif /* __DUMMYMETAINFOREADER_H__ */ diff --git a/reader/src/formats/dummy/DummyPlugin.cpp b/reader/src/formats/dummy/DummyPlugin.cpp deleted file mode 100644 index bfe0662..0000000 --- a/reader/src/formats/dummy/DummyPlugin.cpp +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (C) 2004-2012 Geometer Plus <[email protected]> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. - */ - -#include <ZLFile.h> -#include <ZLInputStream.h> - -#include "DummyPlugin.h" -#include "DummyMetaInfoReader.h" -#include "DummyBookReader.h" -#include "../../library/Book.h" - -DummyPlugin::DummyPlugin() { -} - -DummyPlugin::~DummyPlugin() { -} - -bool DummyPlugin::providesMetaInfo() const { - return true; -} - -bool DummyPlugin::acceptsFile(const ZLFile &file) const { - return file.extension() == "dummy"; -} - -bool DummyPlugin::readMetaInfo(Book &book) const { - return DummyMetaInfoReader(book).readMetaInfo(ZLFile(path).inputStream()); -} - -bool DummyPlugin::readLanguageAndEncoding(Book &book) const { - (void)book; - return true; -} - -bool DummyPlugin::readModel(BookModel &model) const { - return DummyBookReader(model).readBook(ZLFile(book.fileName()).inputStream()); -} - -shared_ptr<const ZLImage> DummyPlugin::coverImage(const ZLFile &file) const { - return DummyCoverReader(file).readCover(); -} diff --git a/reader/src/formats/dummy/DummyPlugin.h b/reader/src/formats/dummy/DummyPlugin.h deleted file mode 100644 index 073449c..0000000 --- a/reader/src/formats/dummy/DummyPlugin.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (C) 2004-2012 Geometer Plus <[email protected]> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. - */ - -#ifndef __DUMMYPLUGIN_H__ -#define __DUMMYPLUGIN_H__ - -#include "../FormatPlugin.h" - -class DummyPlugin : public FormatPlugin { - -public: - DummyPlugin(); - ~DummyPlugin(); - bool providesMetaInfo() const; - bool acceptsFile(const ZLFile &file) const; - bool readMetaInfo(Book &book) const; - bool readLanguageAndEncoding(Book &book) const; - bool readModel(BookModel &model) const; - shared_ptr<const ZLImage> coverImage(const ZLFile &file) const; -}; - -#endif /* __DUMMYPLUGIN_H__ */ diff --git a/reader/src/formats/dummy/createPlugin.sh b/reader/src/formats/dummy/createPlugin.sh deleted file mode 100755 index aacc3d4..0000000 --- a/reader/src/formats/dummy/createPlugin.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh - -if [ $# != 3 ]; then - echo "usage: $0 <short_format_name> <camel_cased_format_name> <upper_cased_format_name>"; - exit 0; -fi; - -if mkdir ../$1; then - for file in Dummy*.h Dummy*.cpp; do - sed "s/Dummy/$2/g" $file | sed "s/DUMMY/$3/g" > ../$1/`echo $file | sed "s/Dummy/$2/"`; - done -fi; diff --git a/reader/src/formats/pdf/PdfBookReader.cpp b/reader/src/formats/pdf/PdfBookReader.cpp deleted file mode 100644 index bd84452..0000000 --- a/reader/src/formats/pdf/PdfBookReader.cpp +++ /dev/null @@ -1,261 +0,0 @@ -/* - * Copyright (C) 2004-2012 Geometer Plus <[email protected]> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. - */ - -#include <cstdlib> -#include <iostream> - -#include <ZLStringUtil.h> -#include <ZLInputStream.h> - -#include "PdfBookReader.h" -#include "PdfObject.h" -#include "../../bookmodel/BookModel.h" - -static void readLine(ZLInputStream &stream, std::string &buffer) { - buffer.clear(); - char ch; - while (1) { - if (stream.read(&ch, 1) != 1) { - return; - } - if ((ch == 10) || (ch == 13)) { - if (!buffer.empty()) { - return; - } - } else { - buffer += ch; - } - } -} - -PdfBookReader::PdfBookReader(BookModel &model) : myModelReader(model) { -} - -PdfBookReader::~PdfBookReader() { -} - -shared_ptr<PdfObject> PdfBookReader::readObjectFromLocation(ZLInputStream &stream, const std::pair<int,int> &address) { - std::map<std::pair<int,int>,int>::const_iterator jt = myObjectLocationMap.find(address); - if (jt == myObjectLocationMap.end()) { - return 0; - } - stream.seek(jt->second, true); - char ch = 0; - PdfObject::readToken(stream, myBuffer, ch); - if (address.first != atoi(myBuffer.c_str())) { - return 0; - } - PdfObject::readToken(stream, myBuffer, ch); - if (address.second != atoi(myBuffer.c_str())) { - return 0; - } - PdfObject::readToken(stream, myBuffer, ch); - if (myBuffer != "obj") { - return 0; - } - return PdfObject::readObject(stream, ch); -} - -shared_ptr<PdfObject> PdfBookReader::resolveReference(shared_ptr<PdfObject> ref, ZLInputStream &stream) { - if (ref.isNull() || (ref->type() != PdfObject::REFERENCE)) { - return ref; - } - const PdfObjectReference &reference = (const PdfObjectReference&)*ref; - const std::pair<int,int> address(reference.number(), reference.generation()); - std::map<std::pair<int,int>,shared_ptr<PdfObject> >::const_iterator it = myObjectMap.find(address); - if (it != myObjectMap.end()) { - return it->second; - } - std::map<std::pair<int,int>,int>::const_iterator jt = myObjectLocationMap.find(address); - shared_ptr<PdfObject> object = readObjectFromLocation(stream, address); - myObjectMap.insert(std::make_pair(address, object)); - return object; -} - -static void stripBuffer(std::string &buffer) { - int index = buffer.find('%'); - if (index >= 0) { - buffer.erase(index); - } - ZLStringUtil::stripWhiteSpaces(buffer); -} - -bool PdfBookReader::readReferenceTable(ZLInputStream &stream, int xrefOffset) { - while (true) { - stream.seek(xrefOffset, true); - readLine(stream, myBuffer); - stripBuffer(myBuffer); - if (myBuffer != "xref") { - return false; - } - - while (true) { - readLine(stream, myBuffer); - stripBuffer(myBuffer); - if (myBuffer == "trailer") { - break; - } - const int index = myBuffer.find(' '); - const int start = atoi(myBuffer.c_str()); - const int len = atoi(myBuffer.c_str() + index + 1); - for (int i = 0; i < len; ++i) { - readLine(stream, myBuffer); - stripBuffer(myBuffer); - if (myBuffer.length() != 18) { - return false; - } - const int objectOffset = atoi(myBuffer.c_str()); - const int objectGeneration = atoi(myBuffer.c_str() + 11); - const bool objectInUse = myBuffer[17] == 'n'; - if (objectInUse) { - myObjectLocationMap[std::make_pair(start + i, objectGeneration)] = objectOffset; - } - } - } - char ch = 0; - shared_ptr<PdfObject> trailer = PdfObject::readObject(stream, ch); - if (trailer.isNull() || (trailer->type() != PdfObject::DICTIONARY)) { - return false; - } - if (myTrailer.isNull()) { - myTrailer = trailer; - } - PdfDictionaryObject &trailerDictionary = (PdfDictionaryObject&)*trailer; - shared_ptr<PdfObject> previous = trailerDictionary["Prev"]; - if (previous.isNull()) { - return true; - } - - if (previous->type() != PdfObject::INTEGER_NUMBER) { - return false; - } - xrefOffset = ((PdfIntegerObject&)*previous).value(); - } -} - -bool PdfBookReader::readBook(shared_ptr<ZLInputStream> stream) { - if (stream.isNull() || !stream->open()) { - return false; - } - - readLine(*stream, myBuffer); - if (!ZLStringUtil::stringStartsWith(myBuffer, "%PDF-")) { - return false; - } - - std::string version = myBuffer.substr(5); - std::cerr << "version = " << version << "\n"; - - std::size_t eofOffset = stream->sizeOfOpened(); - if (eofOffset < 100) { - return false; - } - - stream->seek(eofOffset - 100, true); - bool readXrefOffset = false; - std::size_t xrefOffset = (std::size_t)-1; - while (true) { - readLine(*stream, myBuffer); - if (myBuffer.empty()) { - break; - } - stripBuffer(myBuffer); - if (readXrefOffset) { - if (!myBuffer.empty()) { - xrefOffset = atoi(myBuffer.c_str()); - break; - } - } else if (myBuffer == "startxref") { - readXrefOffset = true; - } - } - - if (!readReferenceTable(*stream, xrefOffset)) { - return false; - } - - PdfDictionaryObject &trailerDictionary = (PdfDictionaryObject&)*myTrailer; - shared_ptr<PdfObject> root = resolveReference(trailerDictionary["Root"], *stream); - if (root.isNull() || (root->type() != PdfObject::DICTIONARY)) { - return false; - } - - PdfDictionaryObject &rootDictionary = (PdfDictionaryObject&)*root; - if (rootDictionary["Type"] != PdfNameObject::nameObject("Catalog")) { - return false; - } - shared_ptr<PdfObject> pageRootNode = resolveReference(rootDictionary["Pages"], *stream); - if (pageRootNode.isNull() || (pageRootNode->type() != PdfObject::DICTIONARY)) { - return false; - } - PdfDictionaryObject &pageRootNodeDictionary = (PdfDictionaryObject&)*pageRootNode; - if (pageRootNodeDictionary["Type"] != PdfNameObject::nameObject("Pages")) { - return false; - } - - /* - shared_ptr<PdfObject> count = pageRootNodeDictionary["Count"]; - if (!count.isNull() && (count->type() == PdfObject::INTEGER_NUMBER)) { - std::cerr << "count = " << ((PdfIntegerObject&)*count).value() << "\n"; - } - */ - shared_ptr<PdfObject> pages = pageRootNodeDictionary["Kids"]; - if (pages.isNull() || (pages->type() != PdfObject::ARRAY)) { - return false; - } - const PdfArrayObject& pagesArray = (const PdfArrayObject&)*pages; - const std::size_t pageNumber = pagesArray.size(); - for (std::size_t i = 0; i < pageNumber; ++i) { - processPage(pagesArray[i], *stream); - } - - return true; -} - -void PdfBookReader::processContents(shared_ptr<PdfObject> contentsObject, ZLInputStream &stream) { - contentsObject = resolveReference(contentsObject, stream); -} - -void PdfBookReader::processPage(shared_ptr<PdfObject> pageObject, ZLInputStream &stream) { - pageObject = resolveReference(pageObject, stream); - if (pageObject.isNull() || pageObject->type() != PdfObject::DICTIONARY) { - return; - } - const PdfDictionaryObject &pageDictionary = (const PdfDictionaryObject&)*pageObject; - shared_ptr<PdfObject> contents = pageDictionary["Contents"]; - if (contents.isNull()) { - return; - } - switch (contents->type()) { - default: - break; - case PdfObject::REFERENCE: - processContents(contents, stream); - break; - case PdfObject::ARRAY: - { - const PdfArrayObject &array = (const PdfArrayObject&)*contents; - const std::size_t len = array.size(); - for (std::size_t i = 0; i < len; ++i) { - processContents(array[i], stream); - } - break; - } - } -} diff --git a/reader/src/formats/pdf/PdfBookReader.h b/reader/src/formats/pdf/PdfBookReader.h deleted file mode 100644 index 9488dcf..0000000 --- a/reader/src/formats/pdf/PdfBookReader.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (C) 2004-2012 Geometer Plus <[email protected]> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. - */ - -#ifndef __PdfBOOKREADER_H__ -#define __PdfBOOKREADER_H__ - -#include <map> - -#include "../../bookmodel/BookReader.h" - -class PdfObject; -class PdfObjectReference; - -class PdfBookReader { - -public: - PdfBookReader(BookModel &model); - ~PdfBookReader(); - bool readBook(shared_ptr<ZLInputStream> stream); - -private: - bool readReferenceTable(ZLInputStream &stream, int offset); - shared_ptr<PdfObject> resolveReference(shared_ptr<PdfObject> reference, ZLInputStream &stream); - shared_ptr<PdfObject> readObjectFromLocation(ZLInputStream &stream, const std::pair<int,int> &address); - void processPage(shared_ptr<PdfObject> pageObject, ZLInputStream &stream); - void processContents(shared_ptr<PdfObject> contentsObject, ZLInputStream &stream); - -private: - BookReader myModelReader; - std::string myBuffer; - std::map<std::pair<int,int>,int> myObjectLocationMap; - std::map<std::pair<int,int>,shared_ptr<PdfObject> > myObjectMap; - shared_ptr<PdfObject> myTrailer; -}; - -#endif /* __PdfBOOKREADER_H__ */ diff --git a/reader/src/formats/pdf/PdfDescriptionReader.cpp b/reader/src/formats/pdf/PdfDescriptionReader.cpp deleted file mode 100644 index 98937fa..0000000 --- a/reader/src/formats/pdf/PdfDescriptionReader.cpp +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (C) 2004-2012 Geometer Plus <[email protected]> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. - */ - -#include <ZLInputStream.h> - -#include "PdfDescriptionReader.h" - -PdfDescriptionReader::PdfDescriptionReader(Book &book) : myBook(book) { -} - -bool PdfDescriptionReader::readMetaInfo(shared_ptr<ZLInputStream> stream) { - return true; -} diff --git a/reader/src/formats/pdf/PdfDescriptionReader.h b/reader/src/formats/pdf/PdfDescriptionReader.h deleted file mode 100644 index 004cdfa..0000000 --- a/reader/src/formats/pdf/PdfDescriptionReader.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (C) 2004-2012 Geometer Plus <[email protected]> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. - */ - -#ifndef __PDFDESCRIPTIONREADER_H__ -#define __PDFDESCRIPTIONREADER_H__ - -#include <string> - -class Book; - -class PdfDescriptionReader { - -public: - PdfDescriptionReader(Book &book); - ~PdfDescriptionReader(); - bool readMetaInfo(shared_ptr<ZLInputStream> stream); - -private: - Book &myBook; -}; - -inline PdfDescriptionReader::~PdfDescriptionReader() {} - -#endif /* __PDFDESCRIPTIONREADER_H__ */ diff --git a/reader/src/formats/pdf/PdfObject.cpp b/reader/src/formats/pdf/PdfObject.cpp deleted file mode 100644 index 374a618..0000000 --- a/reader/src/formats/pdf/PdfObject.cpp +++ /dev/null @@ -1,450 +0,0 @@ -/* - * Copyright (C) 2004-2012 Geometer Plus <[email protected]> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. - */ - -#include <iostream> - -#include <ZLInputStream.h> -#include <ZLZDecompressor.h> - -#include "PdfObject.h" - -PdfObject::~PdfObject() { -} - -shared_ptr<PdfObject> PdfIntegerObject::integerObject(int value) { - if ((value < 0) || (value >= 256)) { - return new PdfIntegerObject(value); - } else { - static shared_ptr<PdfObject>* table = new shared_ptr<PdfObject>[256]; - if (table[value].isNull()) { - table[value] = new PdfIntegerObject(value); - } - return table[value]; - } -} - -PdfIntegerObject::PdfIntegerObject(int value) : myValue(value) { - std::cerr << "PdfIntegerObject " << value << "\n"; -} - -int PdfIntegerObject::value() const { - return myValue; -} - -PdfObject::Type PdfIntegerObject::type() const { - return INTEGER_NUMBER; -} - -shared_ptr<PdfObject> PdfBooleanObject::TRUE() { - static shared_ptr<PdfObject> value = new PdfBooleanObject(true); - return value; -} - -shared_ptr<PdfObject> PdfBooleanObject::FALSE() { - static shared_ptr<PdfObject> value = new PdfBooleanObject(false); - return value; -} - -PdfBooleanObject::PdfBooleanObject(bool value) : myValue(value) { - std::cerr << "PdfBooleanObject " << value << "\n"; -} - -bool PdfBooleanObject::value() const { - return myValue; -} - -PdfObject::Type PdfBooleanObject::type() const { - return BOOLEAN; -} - -PdfStringObject::PdfStringObject(const std::string &value) : myValue(value) { - std::cerr << "PdfStringObject " << value << "\n"; -} - -PdfObject::Type PdfStringObject::type() const { - return STRING; -} - -std::map<std::string,shared_ptr<PdfObject> > PdfNameObject::ourObjectMap; - -shared_ptr<PdfObject> PdfNameObject::nameObject(const std::string &id) { - // TODO: process escaped characters - std::map<std::string,shared_ptr<PdfObject> >::const_iterator it = ourObjectMap.find(id); - if (it != ourObjectMap.end()) { - return it->second; - } - std::cerr << "PdfNameObject " << id << "\n"; - shared_ptr<PdfObject> object = new PdfNameObject(); - ourObjectMap.insert(std::make_pair(id, object)); - return object; -} - -PdfNameObject::PdfNameObject() { -} - -PdfObject::Type PdfNameObject::type() const { - return NAME; -} - -PdfDictionaryObject::PdfDictionaryObject() { -} - -void PdfDictionaryObject::setObject(shared_ptr<PdfObject> id, shared_ptr<PdfObject> object) { - myMap[id] = object; -} - -shared_ptr<PdfObject> PdfDictionaryObject::operator[](shared_ptr<PdfObject> id) const { - std::map<shared_ptr<PdfObject>,shared_ptr<PdfObject> >::const_iterator it = myMap.find(id); - return (it != myMap.end()) ? it->second : 0; -} - -shared_ptr<PdfObject> PdfDictionaryObject::operator[](const std::string &id) const { - return operator[](PdfNameObject::nameObject(id)); -} - -PdfObject::Type PdfDictionaryObject::type() const { - return DICTIONARY; -} - -PdfArrayObject::PdfArrayObject() { -} - -void PdfArrayObject::addObject(shared_ptr<PdfObject> object) { - myVector.push_back(object); -} - -shared_ptr<PdfObject> PdfArrayObject::popLast() { - if (!myVector.empty()) { - shared_ptr<PdfObject> last = myVector.back(); - myVector.pop_back(); - return last; - } - return 0; -} - -int PdfArrayObject::size() const { - return myVector.size(); -} - -shared_ptr<PdfObject> PdfArrayObject::operator[](int index) const { - return myVector[index]; -} - -PdfObject::Type PdfArrayObject::type() const { - return ARRAY; -} - -PdfObjectReference::PdfObjectReference(int number, int generation) : myNumber(number), myGeneration(generation) { -} - -int PdfObjectReference::number() const { - return myNumber; -} - -int PdfObjectReference::generation() const { - return myGeneration; -} - -PdfObject::Type PdfObjectReference::type() const { - return REFERENCE; -} - -PdfStreamObject::PdfStreamObject(const PdfDictionaryObject &dictionary, ZLInputStream &dataStream) { - char ch; - skipWhiteSpaces(dataStream, ch); - - shared_ptr<PdfObject> length = dictionary["Length"]; - if (!length.isNull() && (length->type() == INTEGER_NUMBER)) { - int value = ((PdfIntegerObject&)*length).value(); - if (value > 0) { - shared_ptr<PdfObject> filter = dictionary["Filter"]; - if (filter == PdfNameObject::nameObject("FlateDecode")) { - dataStream.seek(1, false); - ZLZDecompressor decompressor(value - 2); - char buffer[2048]; - while (true) { - std::size_t size = decompressor.decompress(dataStream, buffer, 2048); - if (size == 0) { - break; - } - myData.append(buffer, size); - } - std::cerr << myData << "\n"; - } else { - myData.append(value, '\0'); - myData[0] = ch; - dataStream.read((char*)myData.data() + 1, value - 1); - } - } - } - - /* - shared_ptr<PdfObject> filter = dictionary["Filter"]; - if (!filter.isNull()) { - switch (filter->type()) { - default: - break; - case NAME: - myFilters.push_back( - (filter == PdfNameObject::nameObject("FlateDecode")) ? - FLATE : UNKNOWN - ); - break; - case ARRAY: - { - // TODO: process filters array - } - } - } - */ -} - -PdfObject::Type PdfStreamObject::type() const { - return STREAM; -} - -enum PdfCharacterType { - PDF_CHAR_REGULAR, - PDF_CHAR_WHITESPACE, - PDF_CHAR_DELIMITER -}; - -static PdfCharacterType *PdfCharacterTypeTable = 0; - -void PdfObject::skipWhiteSpaces(ZLInputStream &stream, char &ch) { - if (PdfCharacterTypeTable == 0) { - PdfCharacterTypeTable = new PdfCharacterType[256]; - for (int i = 0; i < 256; ++i) { - PdfCharacterTypeTable[i] = PDF_CHAR_REGULAR; - } - PdfCharacterTypeTable[0] = PDF_CHAR_WHITESPACE; - PdfCharacterTypeTable[9] = PDF_CHAR_WHITESPACE; - PdfCharacterTypeTable[10] = PDF_CHAR_WHITESPACE; - PdfCharacterTypeTable[12] = PDF_CHAR_WHITESPACE; - PdfCharacterTypeTable[13] = PDF_CHAR_WHITESPACE; - PdfCharacterTypeTable[32] = PDF_CHAR_WHITESPACE; - PdfCharacterTypeTable['('] = PDF_CHAR_DELIMITER; - PdfCharacterTypeTable[')'] = PDF_CHAR_DELIMITER; - PdfCharacterTypeTable['<'] = PDF_CHAR_DELIMITER; - PdfCharacterTypeTable['>'] = PDF_CHAR_DELIMITER; - PdfCharacterTypeTable['['] = PDF_CHAR_DELIMITER; - PdfCharacterTypeTable[']'] = PDF_CHAR_DELIMITER; - PdfCharacterTypeTable['{'] = PDF_CHAR_DELIMITER; - PdfCharacterTypeTable['}'] = PDF_CHAR_DELIMITER; - PdfCharacterTypeTable['/'] = PDF_CHAR_DELIMITER; - PdfCharacterTypeTable['%'] = PDF_CHAR_DELIMITER; - } - - while ((PdfCharacterTypeTable[(unsigned char)ch] == PDF_CHAR_WHITESPACE) && - (stream.read(&ch, 1) == 1)) { - } -} - -void PdfObject::readToken(ZLInputStream &stream, std::string &buffer, char &ch) { - buffer.clear(); - skipWhiteSpaces(stream, ch); - while (PdfCharacterTypeTable[(unsigned char)ch] == PDF_CHAR_REGULAR) { - buffer += ch; - if (stream.read(&ch, 1) != 1) { - break; - } - } -} - -shared_ptr<PdfObject> PdfObject::readObject(ZLInputStream &stream, char &ch) { - skipWhiteSpaces(stream, ch); - - PdfObject::Type type = PdfObject::NIL; - bool hexString = false; - switch (ch) { - case '(': - hexString = false; - type = PdfObject::STRING; - break; - case '<': - stream.read(&ch, 1); - hexString = true; - type = (ch == '<') ? PdfObject::DICTIONARY : PdfObject::STRING; - break; - case '>': // end of dictionary - stream.read(&ch, 1); - if (ch == '>') { - stream.read(&ch, 1); - } - return 0; - case '/': - type = PdfObject::NAME; - break; - case '[': - type = PdfObject::ARRAY; - break; - case ']': // end of array - stream.read(&ch, 1); - return 0; - case '+': - case '-': - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - type = PdfObject::INTEGER_NUMBER; - break; - case 't': - case 'f': - type = PdfObject::BOOLEAN; - break; - } - - switch (type) { - case PdfObject::DICTIONARY: - { - ch = 0; - shared_ptr<PdfObject> name; - shared_ptr<PdfObject> value; - shared_ptr<PdfObject> next; - PdfDictionaryObject *dictionary = new PdfDictionaryObject(); - while (true) { - next = readObject(stream, ch); - if (next.isNull()) { - break; - } - PdfObject::Type oType = next->type(); - if (oType == PdfObject::NAME) { - name = next; - value = readObject(stream, ch); - if (value.isNull()) { - break; - } - dictionary->setObject(name, value); - } else if (oType == PdfObject::INTEGER_NUMBER) { - if (value.isNull() || (value->type() != PdfObject::INTEGER_NUMBER)) { - break; - } - skipWhiteSpaces(stream, ch); - if (ch != 'R') { - break; - } - const int number = ((PdfIntegerObject&)*value).value(); - const int generation = ((PdfIntegerObject&)*next).value(); - dictionary->setObject(name, new PdfObjectReference(number, generation)); - value = 0; - ch = 0; - } else { - break; - } - } - std::string token; - readToken(stream, token, ch); - if (token == "stream") { - shared_ptr<PdfObject> d = dictionary; - return new PdfStreamObject(*dictionary, stream); - } else { - return dictionary; - } - } - case PdfObject::NAME: - { - std::string name; - stream.read(&ch, 1); - readToken(stream, name, ch); - return PdfNameObject::nameObject(name); - } - case PdfObject::BOOLEAN: - { - std::string name; - readToken(stream, name, ch); - return (name == "true") ? PdfBooleanObject::TRUE() : PdfBooleanObject::FALSE(); - } - case PdfObject::INTEGER_NUMBER: - { - std::string str; - if ((ch == '+') || (ch == '-')) { - str += ch; - stream.read(&ch, 1); - } - while ((ch >= '0') && (ch <= '9')) { - str += ch; - stream.read(&ch, 1); - } - return PdfIntegerObject::integerObject(atoi(str.c_str())); - } - case PdfObject::STRING: - { - std::string value; - if (hexString) { - char num[3]; - num[2] = '\0'; - while (ch != '>') { - num[0] = ch; - stream.read(num + 1, 1); - value += (char)strtol(num, 0, 16); - stream.read(&ch, 1); - } - ch = 0; - } else { - // TODO: implement - } - return new PdfStringObject(value); - } - case PdfObject::ARRAY: - { - PdfArrayObject *array = new PdfArrayObject(); - ch = 0; - while (true) { - skipWhiteSpaces(stream, ch); - if (ch == 'R') { - const int size = array->size(); - if ((size >= 2) && - ((*array)[size - 1]->type() == PdfObject::INTEGER_NUMBER) && - ((*array)[size - 2]->type() == PdfObject::INTEGER_NUMBER)) { - const int generation = ((PdfIntegerObject&)*array->popLast()).value(); - const int number = ((PdfIntegerObject&)*array->popLast()).value(); - array->addObject(new PdfObjectReference(number, generation)); - ch = 0; - } - } - shared_ptr<PdfObject> object = readObject(stream, ch); - if (object.isNull()) { - break; - } - array->addObject(object); - } - std::cerr << "PdfArrayObject " << array->size() << "\n"; - return array; - } - default: - break; - } - - std::string buffer; - stream.read(&ch, 1); - while (PdfCharacterTypeTable[(unsigned char)ch] == PDF_CHAR_REGULAR) { - buffer += ch; - stream.read(&ch, 1); - } - std::cerr << "buffer = " << buffer << "\n"; - - return 0; -} diff --git a/reader/src/formats/pdf/PdfObject.h b/reader/src/formats/pdf/PdfObject.h deleted file mode 100644 index 76b8528..0000000 --- a/reader/src/formats/pdf/PdfObject.h +++ /dev/null @@ -1,201 +0,0 @@ -/* - * Copyright (C) 2004-2012 Geometer Plus <[email protected]> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. - */ - -#ifndef __PDFOBJECT_H__ -#define __PDFOBJECT_H__ - -#include <string> -#include <vector> -#include <map> - -#include <shared_ptr.h> - -class ZLInputStream; - -class PdfObject { - -public: - static shared_ptr<PdfObject> readObject(ZLInputStream &stream, char &ch); - static void readToken(ZLInputStream &stream, std::string &buffer, char &ch); - -protected: - static void skipWhiteSpaces(ZLInputStream &stream, char &ch); - -public: - enum Type { - BOOLEAN, - INTEGER_NUMBER, - REAL_NUMBER, - STRING, - NAME, - ARRAY, - DICTIONARY, - STREAM, - NIL, - REFERENCE - }; - - virtual ~PdfObject(); - - virtual Type type() const = 0; -}; - -class PdfBooleanObject : public PdfObject { - -public: - static shared_ptr<PdfObject> TRUE(); - static shared_ptr<PdfObject> FALSE(); - -private: - PdfBooleanObject(bool value); - -public: - bool value() const; - -private: - Type type() const; - -private: - const bool myValue; -}; - -class PdfIntegerObject : public PdfObject { - -public: - static shared_ptr<PdfObject> integerObject(int value); - -private: - PdfIntegerObject(int value); - -public: - int value() const; - -private: - Type type() const; - -private: - const int myValue; -}; - -class PdfStringObject : public PdfObject { - -private: - PdfStringObject(const std::string &value); - -private: - Type type() const; - -private: - std::string myValue; - -friend shared_ptr<PdfObject> PdfObject::readObject(ZLInputStream &stream, char &ch); -}; - -class PdfNameObject : public PdfObject { - -public: - static shared_ptr<PdfObject> nameObject(const std::string &id); - -private: - static std::map<std::string,shared_ptr<PdfObject> > ourObjectMap; - -private: - PdfNameObject(); - -private: - Type type() const; -}; - -class PdfDictionaryObject : public PdfObject { - -private: - PdfDictionaryObject(); - void setObject(shared_ptr<PdfObject> id, shared_ptr<PdfObject> object); - -public: - shared_ptr<PdfObject> operator [] (shared_ptr<PdfObject> id) const; - shared_ptr<PdfObject> operator [] (const std::string &id) const; - -private: - Type type() const; - -private: - std::map<shared_ptr<PdfObject>,shared_ptr<PdfObject> > myMap; - -friend shared_ptr<PdfObject> PdfObject::readObject(ZLInputStream &stream, char &ch); -}; - -class PdfStreamObject : public PdfObject { - -private: - PdfStreamObject(const PdfDictionaryObject &dictionary, ZLInputStream &dataStream); - -private: - Type type() const; - -private: - std::string myData; - /* - enum EncodingType { - UNKNOWN, - FLATE, - }; - std::vector<EncodingType> myFilters; - */ - -friend shared_ptr<PdfObject> PdfObject::readObject(ZLInputStream &stream, char &ch); -}; - -class PdfArrayObject : public PdfObject { - -private: - PdfArrayObject(); - void addObject(shared_ptr<PdfObject> object); - shared_ptr<PdfObject> popLast(); - -public: - int size() const; - shared_ptr<PdfObject> operator [] (int index) const; - -private: - Type type() const; - -private: - std::vector<shared_ptr<PdfObject> > myVector; - -friend shared_ptr<PdfObject> PdfObject::readObject(ZLInputStream &stream, char &ch); -}; - -class PdfObjectReference : public PdfObject { - -public: - PdfObjectReference(int number, int generation); - - int number() const; - int generation() const; - -private: - Type type() const; - -private: - const int myNumber; - const int myGeneration; -}; - -#endif /* __PDFOBJECT_H__ */ diff --git a/reader/src/formats/pdf/PdfPlugin.cpp b/reader/src/formats/pdf/PdfPlugin.cpp deleted file mode 100644 index 06325d4..0000000 --- a/reader/src/formats/pdf/PdfPlugin.cpp +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (C) 2004-2012 Geometer Plus <[email protected]> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. - */ - -#include <ZLFile.h> -#include <ZLInputStream.h> - -#include "PdfPlugin.h" -#include "PdfDescriptionReader.h" -#include "PdfBookReader.h" -#include "../../library/Book.h" - -bool PdfPlugin::acceptsFile(const ZLFile &file) const { - return file.extension() == "pdf"; -} - -bool PdfPlugin::readMetaInfo(Book &book) const { - return PdfDescriptionReader(book).readMetaInfo(ZLFile(path).inputStream()); -} - -bool PdfPlugin::readLanguageAndEncoding(Book &book) const { - return true; -} - -bool PdfPlugin::readModel(BookModel &model) const { - return PdfBookReader(model).readBook(ZLFile(book.fileName()).inputStream()); -} diff --git a/reader/src/formats/pdf/PdfPlugin.h b/reader/src/formats/pdf/PdfPlugin.h deleted file mode 100644 index 9c330f6..0000000 --- a/reader/src/formats/pdf/PdfPlugin.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (C) 2004-2012 Geometer Plus <[email protected]> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. - */ - -#ifndef __PdfPLUGIN_H__ -#define __PdfPLUGIN_H__ - -#include "../FormatPlugin.h" - -class PdfPlugin : public FormatPlugin { - -public: - PdfPlugin(); - ~PdfPlugin(); - bool providesMetaInfo() const; - bool acceptsFile(const ZLFile &file) const; - bool readMetaInfo(Book &book) const; - bool readLanguageAndEncoding(Book &book) const; - bool readModel(BookModel &model) const; -}; - -inline PdfPlugin::PdfPlugin() {} -inline PdfPlugin::~PdfPlugin() {} -inline bool PdfPlugin::providesMetaInfo() const { return true; } - -#endif /* __PdfPLUGIN_H__ */ diff --git a/reader/src/formats/pdf/StringStream.cpp b/reader/src/formats/pdf/StringStream.cpp deleted file mode 100644 index b2369df..0000000 --- a/reader/src/formats/pdf/StringStream.cpp +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (C) 2008-2012 Geometer Plus <[email protected]> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. - */ - -#include <algorithm> - -#include "StringStream.h" - -StringStream::StringStream(const std::string &data) : myData(data), myOffset(0) { -} - -bool StringStream::open() { - myOffset = 0; - return true; -} - -std::size_t StringStream::read(char *buffer, std::size_t maxSize) { - std::size_t size = std::min(maxSize, myData.length() - myOffset); - memcpy(buffer, myData.data() + myOffset, size); - myOffset += size; - return size; -} - -void StringStream::close() { -} - -void StringStream::seek(int offset, bool absoluteOffset) { - if (!absoluteOffset) { - offset += myOffset; - } - myOffset = std::min((std::size_t)std::max(0, offset), myData.length()); -} - -std::size_t StringStream::offset() const { - return myOffset; -} - -std::size_t StringStream::sizeOfOpened() { - return myData.length(); -} diff --git a/reader/src/formats/pdf/StringStream.h b/reader/src/formats/pdf/StringStream.h deleted file mode 100644 index f46c038..0000000 --- a/reader/src/formats/pdf/StringStream.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (C) 2008-2012 Geometer Plus <[email protected]> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. - */ - -#ifndef __STRINGSTREAM_H__ -#define __STRINGSTREAM_H__ - -#include <ZLInputStream.h> - -class StringStream : public ZLInputStream { - -public: - StringStream(const std::string &data); - -public: - bool open(); - std::size_t read(char *buffer, std::size_t maxSize); - void close(); - - void seek(int offset, bool absoluteOffset); - std::size_t offset() const; - std::size_t sizeOfOpened(); - -private: - const std::string &myData; - std::size_t myOffset; -}; - -#endif /* __STRINGSTREAM_H__ */ diff --git a/reader/src/migration/migrate.cpp b/reader/src/migration/migrate.cpp index af411f0..67cd485 100644 --- a/reader/src/migration/migrate.cpp +++ b/reader/src/migration/migrate.cpp @@ -17,6 +17,8 @@ * 02110-1301, USA. */ +#include "config.h" + #include "../options/FBCategoryKey.h" #include "Migration.h" diff --git a/reader/src/optionsDialog/lookAndFeel/LookAndFeelOptionsDialog.cpp b/reader/src/optionsDialog/lookAndFeel/LookAndFeelOptionsDialog.cpp index ca740c6..1147574 100644 --- a/reader/src/optionsDialog/lookAndFeel/LookAndFeelOptionsDialog.cpp +++ b/reader/src/optionsDialog/lookAndFeel/LookAndFeelOptionsDialog.cpp @@ -32,7 +32,7 @@ #include "StyleOptionsPage.h" #include "../../reader/Reader.h" -#include "../../reader/FBView.h" +#include "../../reader/View.h" #include "../../options/FBOptions.h" diff --git a/reader/src/optionsDialog/reading/IndicatorTab.cpp b/reader/src/optionsDialog/reading/IndicatorTab.cpp index 6d288c6..2da592c 100644 --- a/reader/src/optionsDialog/reading/IndicatorTab.cpp +++ b/reader/src/optionsDialog/reading/IndicatorTab.cpp @@ -26,7 +26,7 @@ #include "ReadingOptionsDialog.h" #include "../../reader/Reader.h" -#include "../../reader/FBView.h" +#include "../../reader/View.h" #include "../../reader/BookTextView.h" class StateOptionEntry : public ZLToggleBooleanOptionEntry { diff --git a/reader/src/optionsDialog/reading/ReadingOptionsDialog.cpp b/reader/src/optionsDialog/reading/ReadingOptionsDialog.cpp index 29528c6..d209fc3 100644 --- a/reader/src/optionsDialog/reading/ReadingOptionsDialog.cpp +++ b/reader/src/optionsDialog/reading/ReadingOptionsDialog.cpp @@ -26,7 +26,7 @@ #include "ReadingOptionsDialog.h" #include "../../reader/Reader.h" -#include "../../reader/FBView.h" +#include "../../reader/View.h" class RotationTypeEntry : public ZLComboOptionEntry { diff --git a/reader/src/reader/BookTextView.h b/reader/src/reader/BookTextView.h index c98aa93..91a4bce 100644 --- a/reader/src/reader/BookTextView.h +++ b/reader/src/reader/BookTextView.h @@ -26,7 +26,7 @@ #include <ZLOptions.h> -#include "FBView.h" +#include "View.h" class Book; diff --git a/reader/src/reader/ContentsView.h b/reader/src/reader/ContentsView.h index f6cec1a..ba7a093 100644 --- a/reader/src/reader/ContentsView.h +++ b/reader/src/reader/ContentsView.h @@ -20,7 +20,7 @@ #ifndef __CONTENTSVIEW_H__ #define __CONTENTSVIEW_H__ -#include "FBView.h" +#include "View.h" class ContentsView : public FBView { diff --git a/reader/src/reader/FootnoteView.h b/reader/src/reader/FootnoteView.h index 76a6b77..45a17bb 100644 --- a/reader/src/reader/FootnoteView.h +++ b/reader/src/reader/FootnoteView.h @@ -20,7 +20,7 @@ #ifndef __FOOTNOTEVIEW_H__ #define __FOOTNOTEVIEW_H__ -#include "FBView.h" +#include "View.h" class FootnoteView : public FBView { diff --git a/reader/src/reader/Reader.cpp b/reader/src/reader/Reader.cpp index 7f42623..0c15b9d 100644 --- a/reader/src/reader/Reader.cpp +++ b/reader/src/reader/Reader.cpp @@ -17,6 +17,8 @@ * 02110-1301, USA. */ +#include "config.h" + #include <queue> #include <ZLibrary.h> diff --git a/reader/src/reader/SearchActions.cpp b/reader/src/reader/SearchActions.cpp index ab80705..77e3e70 100644 --- a/reader/src/reader/SearchActions.cpp +++ b/reader/src/reader/SearchActions.cpp @@ -25,7 +25,7 @@ #include <ZLTextView.h> #include "Reader.h" -#include "FBView.h" +#include "View.h" #include "ReaderActions.h" #include "../options/FBCategoryKey.h" diff --git a/reader/src/reader/TimeUpdater.cpp b/reader/src/reader/TimeUpdater.cpp index 14952a2..4fea7d1 100644 --- a/reader/src/reader/TimeUpdater.cpp +++ b/reader/src/reader/TimeUpdater.cpp @@ -22,7 +22,7 @@ #include <ZLTextStyle.h> -#include "FBView.h" +#include "View.h" #include "TimeUpdater.h" TimeUpdater::TimeUpdater() : myTime(-1) { diff --git a/reader/src/reader/View.cpp b/reader/src/reader/View.cpp index 8296a72..ebf72a1 100644 --- a/reader/src/reader/View.cpp +++ b/reader/src/reader/View.cpp @@ -24,7 +24,7 @@ #include <ZLTimeManager.h> #include <ZLTextSelectionModel.h> -#include "FBView.h" +#include "View.h" #include "Reader.h" #include "ReaderActions.h" #include "../options/FBOptions.h" diff --git a/zlibrary/core/include/ZLZDecompressor.h b/zlibrary/core/include/ZLZDecompressor.h index f656a6e..e1318c2 100644 --- a/zlibrary/core/include/ZLZDecompressor.h +++ b/zlibrary/core/include/ZLZDecompressor.h @@ -20,6 +20,8 @@ #ifndef __ZLZDECOMPRESSOR_H__ #define __ZLZDECOMPRESSOR_H__ +#include "core_export.h" + #include <zlib.h> #include <string> |