summaryrefslogtreecommitdiffstats
path: root/kviewshell
diff options
context:
space:
mode:
Diffstat (limited to 'kviewshell')
-rw-r--r--kviewshell/CMakeLists.txt110
-rw-r--r--kviewshell/pics/CMakeLists.txt14
-rw-r--r--kviewshell/pics/icons/CMakeLists.txt12
-rw-r--r--kviewshell/plugins/CMakeLists.txt12
-rw-r--r--kviewshell/plugins/djvu/CMakeLists.txt47
-rw-r--r--kviewshell/plugins/djvu/libdjvu/CMakeLists.txt41
-rw-r--r--kviewshell/plugins/djvu/libdjvu/ConfigureChecks.cmake25
-rw-r--r--kviewshell/plugins/djvu/libdjvu/DjVuAnno.cpp8
-rw-r--r--kviewshell/plugins/djvu/libdjvu/DjVuToPS.cpp2
-rw-r--r--kviewshell/plugins/djvu/libdjvu/GOS.cpp1
-rw-r--r--kviewshell/plugins/djvu/libdjvu/IFFByteStream.cpp4
11 files changed, 269 insertions, 7 deletions
diff --git a/kviewshell/CMakeLists.txt b/kviewshell/CMakeLists.txt
new file mode 100644
index 00000000..7361af84
--- /dev/null
+++ b/kviewshell/CMakeLists.txt
@@ -0,0 +1,110 @@
+#################################################
+#
+# (C) 2010-2011 Serghei Amelian
+# serghei (DOT) amelian (AT) gmail.com
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+project( kviewshell )
+
+add_subdirectory( pics )
+add_subdirectory( plugins )
+
+include_directories(
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${CMAKE_BINARY_DIR}
+ ${TDE_INCLUDE_DIR}
+ ${TQT_INCLUDE_DIRS}
+)
+
+link_directories(
+ ${TQT_LIBRARY_DIRS}
+)
+
+
+##### headers ###################################
+
+install( FILES
+ kmultipageInterface.h
+ DESTINATION ${INCLUDE_INSTALL_DIR} )
+
+install( FILES
+ anchor.h bookmark.h pageView.h documentPageCache.h
+ documentRenderer.h documentWidget.h history.h hyperlink.h
+ kmultipage.h length.h pageNumber.h pageSize.h renderedDocumentPage.h
+ renderedDocumentPagePixmap.h renderedDocumentPagePrinter.h
+ selection.h simplePageSize.h textBox.h zoom.h zoomlimits.h
+ DESTINATION ${INCLUDE_INSTALL_DIR}/kviewshell )
+
+
+##### other data ################################
+
+install( FILES kviewshell.rc DESTINATION ${DATA_INSTALL_DIR}/kviewshell )
+install( FILES kviewerpart.rc DESTINATION ${DATA_INSTALL_DIR}/kviewerpart )
+install( FILES kmultipage.desktop DESTINATION ${SERVICETYPES_INSTALL_DIR} )
+install( FILES emptymultipage.desktop DESTINATION ${SERVICES_INSTALL_DIR} )
+install( FILES kviewshell.kcfg DESTINATION ${KCFG_INSTALL_DIR} )
+
+
+##### ifaces (static) ###########################
+
+tde_add_library( ifaces STATIC_PIC AUTOMOC
+ SOURCES
+ kviewpart_iface.cpp
+)
+
+
+##### kviewshell (static) #######################
+
+tde_add_library( kviewshell STATIC_PIC AUTOMOC
+ SOURCES
+ kviewshell.cpp
+)
+
+
+##### kmultipage (shared) #######################
+
+tde_add_library( kmultipage SHARED AUTOMOC
+ SOURCES
+ kmultipage.cpp pageView.cpp marklist.cpp kmultipageInterface.skel
+ units.cpp pageSize.cpp simplePageSize.cpp renderedDocumentPage.cpp
+ renderedDocumentPagePixmap.cpp renderedDocumentPagePrinter.cpp
+ documentPageCache.cpp documentWidget.cpp searchWidget.cpp
+ selection.cpp documentRenderer.cpp history.cpp kvsprefs.kcfgc
+ tableOfContents.cpp kprintDialogPage_pageoptions.cpp
+ LINK kparts-shared kdeprint-shared
+ DESTINATION ${LIB_INSTALL_DIR}
+)
+
+
+##### kviewerpart (module) ######################
+
+tde_add_kpart( kviewerpart AUTOMOC
+ SOURCES
+ kviewpart.cpp pageSizeWidget_base.ui pageSizeWidget.cpp
+ pageSizeDialog.cpp pageSize.cpp sizePreview.cpp zoom.cpp
+ units.cpp kvsprefs.kcfgc optionDialogGUIWidget_base.ui
+ optionDialogAccessibilityWidget.ui simplePageSize.cpp
+ LINK ifaces-static kparts-shared
+ DESTINATION ${PLUGIN_INSTALL_DIR}
+)
+
+
+##### emptymultipagepart (module) ###############
+
+tde_add_kpart( emptymultipagepart AUTOMOC
+ SOURCES
+ empty_multipage.cpp emptyRenderer.cpp
+ LINK kmultipage-shared
+ DESTINATION ${PLUGIN_INSTALL_DIR}
+)
+
+
+##### install import cmake modules ###############
+
+tde_install_export( )
diff --git a/kviewshell/pics/CMakeLists.txt b/kviewshell/pics/CMakeLists.txt
new file mode 100644
index 00000000..ea5b4c56
--- /dev/null
+++ b/kviewshell/pics/CMakeLists.txt
@@ -0,0 +1,14 @@
+#################################################
+#
+# (C) 2010-2011 Serghei Amelian
+# serghei (DOT) amelian (AT) gmail.com
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+add_subdirectory( icons )
+
+tde_install_icons( kviewshell )
diff --git a/kviewshell/pics/icons/CMakeLists.txt b/kviewshell/pics/icons/CMakeLists.txt
new file mode 100644
index 00000000..dc54ed2e
--- /dev/null
+++ b/kviewshell/pics/icons/CMakeLists.txt
@@ -0,0 +1,12 @@
+#################################################
+#
+# (C) 2010-2011 Serghei Amelian
+# serghei (DOT) amelian (AT) gmail.com
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+tde_install_icons( DESTINATION ${DATA_INSTALL_DIR}/kviewerpart/icons )
diff --git a/kviewshell/plugins/CMakeLists.txt b/kviewshell/plugins/CMakeLists.txt
new file mode 100644
index 00000000..9efe72f9
--- /dev/null
+++ b/kviewshell/plugins/CMakeLists.txt
@@ -0,0 +1,12 @@
+#################################################
+#
+# (C) 2010-2011 Serghei Amelian
+# serghei (DOT) amelian (AT) gmail.com
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+add_subdirectory( djvu )
diff --git a/kviewshell/plugins/djvu/CMakeLists.txt b/kviewshell/plugins/djvu/CMakeLists.txt
new file mode 100644
index 00000000..2d6ba936
--- /dev/null
+++ b/kviewshell/plugins/djvu/CMakeLists.txt
@@ -0,0 +1,47 @@
+#################################################
+#
+# (C) 2010-2011 Serghei Amelian
+# serghei (DOT) amelian (AT) gmail.com
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+add_subdirectory( libdjvu )
+
+include_directories(
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}/../..
+ ${CMAKE_CURRENT_SOURCE_DIR}/libdjvu
+ ${CMAKE_CURRENT_SOURCE_DIR}/../..
+ ${CMAKE_BINARY_DIR}
+ ${TDE_INCLUDE_DIR}
+ ${TQT_INCLUDE_DIRS}
+)
+
+link_directories(
+ ${TQT_LIBRARY_DIRS}
+)
+
+
+##### other data ################################
+
+install( FILES djvumultipage.desktop DESTINATION ${SERVICES_INSTALL_DIR} )
+install( FILES djvumultipage.kcfg DESTINATION ${KCFG_INSTALL_DIR} )
+install( FILES djvumultipage.rc DESTINATION ${DATA_INSTALL_DIR} )
+
+
+##### djvuviewpart (module) #####################
+
+tde_add_kpart( djvuviewpart
+ SOURCES
+ djvumultipage.cpp djvurenderer.cpp
+ kprintDialogPage_DJVUpageoptions.cpp
+ kprintDialogPage_DJVUconversionoptions.cpp
+ kprintDialogPage_DJVUconversionoptions_basewidget.ui
+ pageRangeWidget_base.ui pageRangeWidget.cpp prefs.kcfgc
+ LINK djvu-shared kmultipage-shared
+ DESTINATION ${PLUGIN_INSTALL_DIR}
+)
diff --git a/kviewshell/plugins/djvu/libdjvu/CMakeLists.txt b/kviewshell/plugins/djvu/libdjvu/CMakeLists.txt
new file mode 100644
index 00000000..6426c975
--- /dev/null
+++ b/kviewshell/plugins/djvu/libdjvu/CMakeLists.txt
@@ -0,0 +1,41 @@
+#################################################
+#
+# (C) 2010-2011 Serghei Amelian
+# serghei (DOT) amelian (AT) gmail.com
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+include( ConfigureChecks.cmake )
+
+add_definitions(
+ -DUNIX
+ -DHAVE_STDINCLUDES
+)
+
+include_directories(
+ ${CMAKE_BINARY_DIR}
+ ${TQT_INCLUDE_DIRS}
+)
+
+
+##### djvu (shared) #############################
+
+tde_add_library( djvu SHARED
+ SOURCES
+ Arrays.cpp DjVuDocEditor.cpp DjVuMessageLite.cpp GOS.cpp IW44Image.cpp
+ BSByteStream.cpp DjVuDocument.cpp DjVuNavDir.cpp GPixmap.cpp JB2EncodeCodec.cpp
+ BSEncodeByteStream.cpp DjVuDumpHelper.cpp DjVuPalette.cpp GRect.cpp
+ JB2Image.cpp ByteStream.cpp DjVuErrorList.cpp DjVuPort.cpp GScaler.cpp
+ JPEGDecoder.cpp DataPool.cpp DjVuFileCache.cpp DjVuText.cpp GSmartPointer.cpp
+ MMRDecoder.cpp DjVuFile.cpp DjVuToPS.cpp GString.cpp MMX.cpp DjVmNav.cpp
+ debug.cpp DjVuGlobal.cpp GBitmap.cpp GThreads.cpp UnicodeByteStream.cpp
+ DjVmDir0.cpp DjVuGlobalMemory.cpp GContainer.cpp GUnicode.cpp XMLParser.cpp
+ DjVmDir.cpp DjVuImage.cpp GException.cpp GURL.cpp XMLTags.cpp DjVmDoc.cpp
+ DjVuInfo.cpp GIFFManager.cpp IFFByteStream.cpp ZPCodec.cpp DjVuAnno.cpp
+ DjVuMessage.cpp GMapAreas.cpp IW44EncodeCodec.cpp
+ DESTINATION ${LIB_INSTALL_DIR}
+)
diff --git a/kviewshell/plugins/djvu/libdjvu/ConfigureChecks.cmake b/kviewshell/plugins/djvu/libdjvu/ConfigureChecks.cmake
new file mode 100644
index 00000000..50f708f1
--- /dev/null
+++ b/kviewshell/plugins/djvu/libdjvu/ConfigureChecks.cmake
@@ -0,0 +1,25 @@
+#################################################
+#
+# (C) 2010-2011 Serghei Amelian
+# serghei (DOT) amelian (AT) gmail.com
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+include( CheckFunctionExists )
+
+check_type_size( wchar_t WCHAR_T )
+
+if( HAVE_WCHAR_T )
+ tde_save( CMAKE_EXTRA_INCLUDE_FILES )
+ set( CMAKE_EXTRA_INCLUDE_FILES wchar.h )
+ check_type_size( mbstate_t MBSTATE_T )
+ tde_restore( CMAKE_EXTRA_INCLUDE_FILES )
+ check_function_exists( iswspace HAVE_ISWSPACE )
+ if( HAVE_MBSTATE_T )
+ check_function_exists( wcrtomb HAVE_WCRTOMB )
+ endif( )
+endif( )
diff --git a/kviewshell/plugins/djvu/libdjvu/DjVuAnno.cpp b/kviewshell/plugins/djvu/libdjvu/DjVuAnno.cpp
index a6772e61..7cece60b 100644
--- a/kviewshell/plugins/djvu/libdjvu/DjVuAnno.cpp
+++ b/kviewshell/plugins/djvu/libdjvu/DjVuAnno.cpp
@@ -241,8 +241,8 @@ GLObject::print(ByteStream & str, int compact, int indent, int * cur_pos) const
else
{
char buf[8];
- static char *tr1 = "\"\\tnrbf";
- static char *tr2 = "\"\\\t\n\r\b\f";
+ static const char *tr1 = "\"\\tnrbf";
+ static const char *tr2 = "\"\\\t\n\r\b\f";
sprintf(buf,"\\%03o", (int)(((unsigned char*)data)[span]));
for (int i=0; tr2[i]; i++)
if (data[span] == tr2[i])
@@ -472,8 +472,8 @@ GLParser::get_token(const char * & start)
}
else
{
- static char *tr1 = "tnrbfva";
- static char *tr2 = "\t\n\r\b\f\013\007";
+ const static char *tr1 = "tnrbfva";
+ const static char *tr2 = "\t\n\r\b\f\013\007";
for (int i=0; tr1[i]; i++)
if (c == tr1[i])
c = tr2[i];
diff --git a/kviewshell/plugins/djvu/libdjvu/DjVuToPS.cpp b/kviewshell/plugins/djvu/libdjvu/DjVuToPS.cpp
index beaa01bc..d18c7801 100644
--- a/kviewshell/plugins/djvu/libdjvu/DjVuToPS.cpp
+++ b/kviewshell/plugins/djvu/libdjvu/DjVuToPS.cpp
@@ -267,7 +267,7 @@ DjVuToPS::DjVuToPS(void)
DEBUG_MAKE_INDENT(3);
DEBUG_MSG("Initializing dig2hex[]\n");
// Creating tables for bin=>text translation
- static char * dig2hex="0123456789ABCDEF";
+ static const char * dig2hex="0123456789ABCDEF";
int i;
for(i=0;i<256;i++)
{
diff --git a/kviewshell/plugins/djvu/libdjvu/GOS.cpp b/kviewshell/plugins/djvu/libdjvu/GOS.cpp
index 35aa8997..94449512 100644
--- a/kviewshell/plugins/djvu/libdjvu/GOS.cpp
+++ b/kviewshell/plugins/djvu/libdjvu/GOS.cpp
@@ -66,6 +66,7 @@
#include "GOS.h"
#include "GURL.h"
+#include <errno.h>
#include <stdlib.h>
#include <stdio.h>
#include <ctype.h>
diff --git a/kviewshell/plugins/djvu/libdjvu/IFFByteStream.cpp b/kviewshell/plugins/djvu/libdjvu/IFFByteStream.cpp
index 9bf184bd..c8b79809 100644
--- a/kviewshell/plugins/djvu/libdjvu/IFFByteStream.cpp
+++ b/kviewshell/plugins/djvu/libdjvu/IFFByteStream.cpp
@@ -145,12 +145,12 @@ IFFByteStream::check_id(const char *id)
if (id[i]<0x20 || id[i]>0x7e)
return -1;
// check composite chunks
- static char *szComposite[] = { "FORM", "LIST", "PROP", "CAT ", 0 };
+ static const char *szComposite[] = { "FORM", "LIST", "PROP", "CAT ", 0 };
for (i=0; szComposite[i]; i++)
if (!memcmp(id, szComposite[i], 4))
return 1;
// check reserved chunks
- static char *szReserved[] = { "FOR", "LIS", "CAT", 0 };
+ static const char *szReserved[] = { "FOR", "LIS", "CAT", 0 };
for (i=0; szReserved[i]; i++)
if (!memcmp(id, szReserved[i], 3) && id[3]>='1' && id[3]<='9')
return -1;