From 7422cac1a18dca897d3830a267eb91683d05a95b Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sat, 26 Jan 2013 13:10:41 -0600 Subject: Rename a number of libraries and executables to avoid conflicts with KDE4 --- filters/chalk/gmagick/Makefile.am | 4 +- filters/chalk/jpeg/Makefile.am | 6 +- filters/chalk/libkisexif/Makefile.am | 2 +- filters/chalk/magick/Makefile.am | 4 +- filters/chalk/openexr/Makefile.am | 4 +- filters/chalk/pdf/Makefile.am | 2 +- filters/chalk/png/Makefile.am | 4 +- filters/chalk/raw/Makefile.am | 2 +- filters/chalk/tiff/Makefile.am | 6 +- filters/chalk/xcf/Makefile.am | 4 +- filters/karbon/eps/Makefile.am | 4 +- filters/karbon/kontour/Makefile.am | 2 +- filters/karbon/png/Makefile.am | 2 +- filters/karbon/svg/Makefile.am | 4 +- filters/karbon/wmf/Makefile.am | 4 +- filters/karbon/xcf/Makefile.am | 2 +- filters/kchart/bmp/Makefile.am | 2 +- filters/kchart/jpeg/Makefile.am | 2 +- filters/kchart/mng/Makefile.am | 2 +- filters/kchart/png/Makefile.am | 2 +- filters/kchart/svg/Makefile.am | 2 +- filters/kchart/xbm/Makefile.am | 2 +- filters/kchart/xpm/Makefile.am | 2 +- filters/kformula/latex/Makefile.am | 2 +- filters/kformula/png/Makefile.am | 2 +- filters/kformula/svg/Makefile.am | 2 +- filters/kivio/imageexport/Makefile.am | 2 +- filters/kpresenter/bmp/Makefile.am | 2 +- filters/kpresenter/jpeg/Makefile.am | 2 +- filters/kpresenter/mng/Makefile.am | 2 +- filters/kpresenter/png/Makefile.am | 2 +- filters/kpresenter/svg/Makefile.am | 2 +- filters/kpresenter/xbm/Makefile.am | 2 +- filters/kpresenter/xpm/Makefile.am | 2 +- filters/kspread/applixspread/Makefile.am | 2 +- filters/kspread/dbase/Makefile.am | 2 +- filters/kspread/excel/import/Makefile.am | 2 +- filters/kspread/latex/export/Makefile.am | 2 +- filters/kugar/kugarnop/Makefile.am | 2 +- filters/kword/hancomword/Makefile.am | 2 +- filters/kword/html/import/Makefile.am | 4 +- filters/kword/html/import/htmlimport.cpp | 2 +- filters/kword/html/import/khtmlreader.cpp | 717 -------------------------- filters/kword/html/import/khtmlreader.h | 103 ---- filters/kword/html/import/tdehtmlreader.cpp | 717 ++++++++++++++++++++++++++ filters/kword/html/import/tdehtmlreader.h | 103 ++++ filters/kword/html/status.html | 6 +- filters/kword/latex/export/Makefile.am | 2 +- filters/kword/latex/import/Makefile.am | 2 +- filters/kword/latex/import/parser/Makefile.am | 2 +- filters/kword/msword/Makefile.am | 2 +- filters/kword/mswrite/Makefile.am | 4 +- filters/kword/pdf/Makefile.am | 2 +- filters/xsltfilter/export/Makefile.am | 2 +- filters/xsltfilter/import/Makefile.am | 2 +- 55 files changed, 887 insertions(+), 887 deletions(-) delete mode 100644 filters/kword/html/import/khtmlreader.cpp delete mode 100644 filters/kword/html/import/khtmlreader.h create mode 100644 filters/kword/html/import/tdehtmlreader.cpp create mode 100644 filters/kword/html/import/tdehtmlreader.h (limited to 'filters') diff --git a/filters/chalk/gmagick/Makefile.am b/filters/chalk/gmagick/Makefile.am index dc567042..d8867c1d 100644 --- a/filters/chalk/gmagick/Makefile.am +++ b/filters/chalk/gmagick/Makefile.am @@ -1,6 +1,6 @@ kde_module_LTLIBRARIES = libchalkgmagickimport.la libchalkgmagickexport.la -libchalkgmagickexport_la_LDFLAGS = $(KDE_PLUGIN) $(LIBGMAGICK_LDFLAGS) $(KDE_RPATH) $(LIBGMAGICK_RPATH) $(all_libraries) -module -avoid-version -no-undefined -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -lkparts \ +libchalkgmagickexport_la_LDFLAGS = $(KDE_PLUGIN) $(LIBGMAGICK_LDFLAGS) $(KDE_RPATH) $(LIBGMAGICK_RPATH) $(all_libraries) -module -avoid-version -no-undefined -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -ltdeparts \ -llcms libchalkgmagickexport_la_LIBADD = \ $(KOFFICE_LIBS) \ @@ -10,7 +10,7 @@ libchalkgmagickexport_la_LIBADD = \ ../../../chalk/ui/libchalkui.la \ ../../../chalk/chalkcolor/libchalkcolor.la -libchalkgmagickimport_la_LDFLAGS = $(KDE_PLUGIN) $(LIBGMAGICK_LDFLAGS) $(KDE_RPATH) $(LIBGMAGICK_RPATH) $(all_libraries) -module -avoid-version -no-undefined -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -lkparts \ +libchalkgmagickimport_la_LDFLAGS = $(KDE_PLUGIN) $(LIBGMAGICK_LDFLAGS) $(KDE_RPATH) $(LIBGMAGICK_RPATH) $(all_libraries) -module -avoid-version -no-undefined -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -ltdeparts \ -llcms libchalkgmagickimport_la_LIBADD = \ $(KOFFICE_LIBS) \ diff --git a/filters/chalk/jpeg/Makefile.am b/filters/chalk/jpeg/Makefile.am index 7cefb8a2..3270eaa9 100644 --- a/filters/chalk/jpeg/Makefile.am +++ b/filters/chalk/jpeg/Makefile.am @@ -1,7 +1,7 @@ noinst_LTLIBRARIES = libchalkconverter.la kde_module_LTLIBRARIES = libchalkjpegimport.la libchalkjpegexport.la -libchalkconverter_la_LDFLAGS = $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -lkparts \ +libchalkconverter_la_LDFLAGS = $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -ltdeparts \ -llcms libchalkconverter_la_SOURCES = kis_jpeg_converter.cc iccjpeg.c libchalkconverter_la_LIBADD = $(KOFFICE_LIBS) $(top_builddir)/filters/chalk/libkisexif/libkisexif.la \ @@ -10,7 +10,7 @@ libchalkconverter_la_LIBADD = $(KOFFICE_LIBS) $(top_builddir)/filters/chalk/libk ../../../chalk/chalkcolor/libchalkcolor.la libchalkjpegexport_la_LDFLAGS = -avoid-version -module -no-undefined \ - $(KDE_PLUGIN) $(KDE_RPATH) $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -lkparts \ + $(KDE_PLUGIN) $(KDE_RPATH) $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -ltdeparts \ -llcms libchalkjpegexport_la_LIBADD = $(top_builddir)/chalk/libchalkcommon.la \ libchalkconverter.la $(KOFFICE_LIBS) \ @@ -20,7 +20,7 @@ libchalkjpegexport_la_LIBADD = $(top_builddir)/chalk/libchalkcommon.la \ -ljpeg -lexif libchalkjpegimport_la_LDFLAGS = -avoid-version -module -no-undefined \ - $(KDE_PLUGIN) $(KDE_RPATH) $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -lkparts \ + $(KDE_PLUGIN) $(KDE_RPATH) $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -ltdeparts \ -llcms libchalkjpegimport_la_LIBADD = $(top_builddir)/chalk/libchalkcommon.la \ libchalkconverter.la $(KOFFICE_LIBS) \ diff --git a/filters/chalk/libkisexif/Makefile.am b/filters/chalk/libkisexif/Makefile.am index d8f40fa3..b248468b 100644 --- a/filters/chalk/libkisexif/Makefile.am +++ b/filters/chalk/libkisexif/Makefile.am @@ -11,7 +11,7 @@ INCLUDES = \ $(KOPAINTER_INCLUDES) \ $(all_includes) METASOURCES = AUTO -libkisexif_la_LDFLAGS = $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -lkparts \ +libkisexif_la_LDFLAGS = $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -ltdeparts \ -llcms libkisexif_la_LIBADD = $(KOFFICE_LIBS) \ ../../../chalk/core/libchalkimage.la \ diff --git a/filters/chalk/magick/Makefile.am b/filters/chalk/magick/Makefile.am index 745ad6b1..8c03b55c 100644 --- a/filters/chalk/magick/Makefile.am +++ b/filters/chalk/magick/Makefile.am @@ -1,6 +1,6 @@ kde_module_LTLIBRARIES = libchalkmagickimport.la libchalkmagickexport.la -libchalkmagickexport_la_LDFLAGS = $(KDE_PLUGIN) $(LIBMAGICK_LDFLAGS) $(KDE_RPATH) $(LIBMAGICK_RPATH) $(all_libraries) -module -avoid-version -no-undefined -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -lkparts \ +libchalkmagickexport_la_LDFLAGS = $(KDE_PLUGIN) $(LIBMAGICK_LDFLAGS) $(KDE_RPATH) $(LIBMAGICK_RPATH) $(all_libraries) -module -avoid-version -no-undefined -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -ltdeparts \ -llcms libchalkmagickexport_la_LIBADD = \ $(KOFFICE_LIBS) \ @@ -10,7 +10,7 @@ libchalkmagickexport_la_LIBADD = \ ../../../chalk/ui/libchalkui.la \ ../../../chalk/chalkcolor/libchalkcolor.la -libchalkmagickimport_la_LDFLAGS = $(KDE_PLUGIN) $(LIBMAGICK_LDFLAGS) $(KDE_RPATH) $(LIBMAGICK_RPATH) $(all_libraries) -module -avoid-version -no-undefined -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -lkparts \ +libchalkmagickimport_la_LDFLAGS = $(KDE_PLUGIN) $(LIBMAGICK_LDFLAGS) $(KDE_RPATH) $(LIBMAGICK_RPATH) $(all_libraries) -module -avoid-version -no-undefined -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -ltdeparts \ -llcms libchalkmagickimport_la_LIBADD = \ $(KOFFICE_LIBS) \ diff --git a/filters/chalk/openexr/Makefile.am b/filters/chalk/openexr/Makefile.am index 4c3ff9e2..a73e64f9 100644 --- a/filters/chalk/openexr/Makefile.am +++ b/filters/chalk/openexr/Makefile.am @@ -15,7 +15,7 @@ AM_CPPFLAGS= \ kde_module_LTLIBRARIES = libchalk_openexr_import.la libchalk_openexr_export.la -libchalk_openexr_export_la_LDFLAGS = $(KDE_PLUGIN) $(KDE_RPATH) $(all_libraries) -module -avoid-version -no-undefined $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -lkparts +libchalk_openexr_export_la_LDFLAGS = $(KDE_PLUGIN) $(KDE_RPATH) $(all_libraries) -module -avoid-version -no-undefined $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -ltdeparts libchalk_openexr_export_la_LIBADD = \ $(KOFFICE_LIBS) \ $(OPENEXR_LIBS) \ @@ -27,7 +27,7 @@ libchalk_openexr_export_la_LIBADD = \ ../../../chalk/chalkcolor/libchalkcolor.la -libchalk_openexr_import_la_LDFLAGS = $(KDE_PLUGIN) $(KDE_RPATH) $(all_libraries) -module -avoid-version -no-undefined $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -lkparts +libchalk_openexr_import_la_LDFLAGS = $(KDE_PLUGIN) $(KDE_RPATH) $(all_libraries) -module -avoid-version -no-undefined $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -ltdeparts libchalk_openexr_import_la_LIBADD = \ $(KOFFICE_LIBS) \ $(OPENEXR_LIBS) \ diff --git a/filters/chalk/pdf/Makefile.am b/filters/chalk/pdf/Makefile.am index 89d02811..10a309dd 100644 --- a/filters/chalk/pdf/Makefile.am +++ b/filters/chalk/pdf/Makefile.am @@ -17,7 +17,7 @@ kdelnkdir = $(kde_appsdir)/.hidden METASOURCES = AUTO kde_module_LTLIBRARIES = libchalkpdfimport.la -libchalkpdfimport_la_LDFLAGS = -avoid-version -module -no-undefined $(KDE_PLUGIN) $(KDE_RPATH) $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -lkparts \ +libchalkpdfimport_la_LDFLAGS = -avoid-version -module -no-undefined $(KDE_PLUGIN) $(KDE_RPATH) $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -ltdeparts \ -llcms libchalkpdfimport_la_LIBADD = $(top_builddir)/chalk/libchalkcommon.la \ -lpoppler-tqt $(KOFFICE_LIBS) $(POPPLER_LIBS) \ diff --git a/filters/chalk/png/Makefile.am b/filters/chalk/png/Makefile.am index 857c368b..6a94f325 100644 --- a/filters/chalk/png/Makefile.am +++ b/filters/chalk/png/Makefile.am @@ -1,6 +1,6 @@ kde_module_LTLIBRARIES = libchalkpngimport.la libchalkpngexport.la -libchalkpngexport_la_LDFLAGS = $(KDE_PLUGIN) $(KDE_RPATH) $(all_libraries) -module -avoid-version -no-undefined -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -lkparts \ +libchalkpngexport_la_LDFLAGS = $(KDE_PLUGIN) $(KDE_RPATH) $(all_libraries) -module -avoid-version -no-undefined -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -ltdeparts \ -llcms libchalkpngexport_la_LIBADD = \ $(KOFFICE_LIBS) \ @@ -10,7 +10,7 @@ libchalkpngexport_la_LIBADD = \ ../../../chalk/chalkcolor/libchalkcolor.la \ -lpng -libchalkpngimport_la_LDFLAGS = $(KDE_PLUGIN) $(KDE_RPATH) $(all_libraries) -module -avoid-version -no-undefined -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -lkparts \ +libchalkpngimport_la_LDFLAGS = $(KDE_PLUGIN) $(KDE_RPATH) $(all_libraries) -module -avoid-version -no-undefined -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -ltdeparts \ -llcms libchalkpngimport_la_LIBADD = \ $(KOFFICE_LIBS) \ diff --git a/filters/chalk/raw/Makefile.am b/filters/chalk/raw/Makefile.am index f48bb940..01b97189 100644 --- a/filters/chalk/raw/Makefile.am +++ b/filters/chalk/raw/Makefile.am @@ -11,7 +11,7 @@ AM_CPPFLAGS= \ kde_module_LTLIBRARIES = libchalk_raw_import.la -libchalk_raw_import_la_LDFLAGS = $(KDE_PLUGIN) $(KDE_RPATH) $(all_libraries) -module -avoid-version -no-undefined -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -lkparts \ +libchalk_raw_import_la_LDFLAGS = $(KDE_PLUGIN) $(KDE_RPATH) $(all_libraries) -module -avoid-version -no-undefined -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -ltdeparts \ -llcms libchalk_raw_import_la_LIBADD = \ $(KOFFICE_LIBS) \ diff --git a/filters/chalk/tiff/Makefile.am b/filters/chalk/tiff/Makefile.am index c16e7f1e..553db2bd 100644 --- a/filters/chalk/tiff/Makefile.am +++ b/filters/chalk/tiff/Makefile.am @@ -1,7 +1,7 @@ kde_module_LTLIBRARIES = libchalktiffimport.la libchalktiffexport.la libchalktiffexport_la_LDFLAGS = -avoid-version -module -no-undefined \ - $(KDE_PLUGIN) $(KDE_RPATH) $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -lkparts \ + $(KDE_PLUGIN) $(KDE_RPATH) $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -ltdeparts \ -llcms libchalktiffexport_la_LIBADD = $(top_builddir)/chalk/libchalkcommon.la \ libchalktiffconverter.la $(KOFFICE_LIBS) \ @@ -11,7 +11,7 @@ libchalktiffexport_la_LIBADD = $(top_builddir)/chalk/libchalkcommon.la \ -ltiff libchalktiffimport_la_LDFLAGS = -avoid-version -module -no-undefined \ - $(KDE_PLUGIN) $(KDE_RPATH) $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -lkparts \ + $(KDE_PLUGIN) $(KDE_RPATH) $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -ltdeparts \ -llcms libchalktiffimport_la_LIBADD = $(top_builddir)/chalk/libchalkcommon.la \ libchalktiffconverter.la $(KOFFICE_LIBS) \ @@ -53,7 +53,7 @@ service_DATA = chalk_tiff_export.desktop chalk_tiff_import.desktop kdelnk_DATA = chalk_tiff.desktop noinst_HEADERS = kis_dlg_options_tiff.h kis_tiff_writer_visitor.h \ kis_tiff_ycbcr_reader.h -libchalktiffconverter_la_LDFLAGS = -no-undefined $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -lkparts \ +libchalktiffconverter_la_LDFLAGS = -no-undefined $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -ltdeparts \ -llcms libchalktiffconverter_la_LIBADD = $(KOFFICE_LIBS) \ ../../../chalk/core/libchalkimage.la \ diff --git a/filters/chalk/xcf/Makefile.am b/filters/chalk/xcf/Makefile.am index 5415f09f..9ee67fd0 100644 --- a/filters/chalk/xcf/Makefile.am +++ b/filters/chalk/xcf/Makefile.am @@ -1,6 +1,6 @@ kde_module_LTLIBRARIES = libchalkxcfimport.la libchalkxcfexport.la -libchalkxcfexport_la_LDFLAGS = $(KDE_PLUGIN) $(LIBMAGICK_LDFLAGS) $(KDE_RPATH) $(LIBMAGICK_RPATH) $(all_libraries) -module -avoid-version -no-undefined -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -lkparts \ +libchalkxcfexport_la_LDFLAGS = $(KDE_PLUGIN) $(LIBMAGICK_LDFLAGS) $(KDE_RPATH) $(LIBMAGICK_RPATH) $(all_libraries) -module -avoid-version -no-undefined -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -ltdeparts \ -llcms libchalkxcfexport_la_LIBADD = \ $(KOFFICE_LIBS) \ @@ -10,7 +10,7 @@ libchalkxcfexport_la_LIBADD = \ ../../../chalk/ui/libchalkui.la \ ../../../chalk/chalkcolor/libchalkcolor.la -libchalkxcfimport_la_LDFLAGS = $(KDE_PLUGIN) $(LIBMAGICK_LDFLAGS) $(KDE_RPATH) $(LIBMAGICK_RPATH) $(all_libraries) -module -avoid-version -no-undefined -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -lkparts \ +libchalkxcfimport_la_LDFLAGS = $(KDE_PLUGIN) $(LIBMAGICK_LDFLAGS) $(KDE_RPATH) $(LIBMAGICK_RPATH) $(all_libraries) -module -avoid-version -no-undefined -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -ltdeparts \ -llcms libchalkxcfimport_la_LIBADD = \ $(KOFFICE_LIBS) \ diff --git a/filters/karbon/eps/Makefile.am b/filters/karbon/eps/Makefile.am index 47b01351..e48d7b9c 100644 --- a/filters/karbon/eps/Makefile.am +++ b/filters/karbon/eps/Makefile.am @@ -6,11 +6,11 @@ libkarbonepsexport_la_SOURCES = \ epsexport.cc \ epsexportdlg.cc -libkarbonepsexport_la_LDFLAGS = $(KDE_PLUGIN) $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -lkparts +libkarbonepsexport_la_LDFLAGS = $(KDE_PLUGIN) $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -ltdeparts libkarbonepsexport_la_LIBADD = $(KOFFICE_LIBS) ../../../karbon/libkarboncommon.la libkarbonepsimport_la_SOURCES = epsimport.cc pscommentlexer.cc -libkarbonepsimport_la_LDFLAGS = $(KDE_PLUGIN) $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -lkparts +libkarbonepsimport_la_LDFLAGS = $(KDE_PLUGIN) $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -ltdeparts libkarbonepsimport_la_LIBADD = $(KOFFICE_LIBS) INCLUDES = \ diff --git a/filters/karbon/kontour/Makefile.am b/filters/karbon/kontour/Makefile.am index 29202e83..c39e7748 100644 --- a/filters/karbon/kontour/Makefile.am +++ b/filters/karbon/kontour/Makefile.am @@ -10,7 +10,7 @@ INCLUDES= -I$(srcdir) $(KOFFICE_INCLUDES) $(KOPAINTER_INCLUDES) -I$(top_srcdir)/ kde_module_LTLIBRARIES = libkarbonkontourimport.la libkarbonkontourimport_la_SOURCES = kontourimport.cpp -libkarbonkontourimport_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -lkparts +libkarbonkontourimport_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -ltdeparts libkarbonkontourimport_la_LIBADD = $(KOFFICE_LIBS) ../../../karbon/libkarboncommon.la METASOURCES = AUTO diff --git a/filters/karbon/png/Makefile.am b/filters/karbon/png/Makefile.am index d997484e..e7df2e38 100644 --- a/filters/karbon/png/Makefile.am +++ b/filters/karbon/png/Makefile.am @@ -1,6 +1,6 @@ kde_module_LTLIBRARIES = libkarbonpngexport.la -libkarbonpngexport_la_LDFLAGS = $(KDE_PLUGIN) $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -lkparts +libkarbonpngexport_la_LDFLAGS = $(KDE_PLUGIN) $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -ltdeparts libkarbonpngexport_la_LIBADD = \ $(KOFFICE_LIBS) \ ../../../karbon/libkarboncommon.la diff --git a/filters/karbon/svg/Makefile.am b/filters/karbon/svg/Makefile.am index 72eaf15e..115c0afc 100644 --- a/filters/karbon/svg/Makefile.am +++ b/filters/karbon/svg/Makefile.am @@ -1,11 +1,11 @@ kde_module_LTLIBRARIES = libkarbonsvgexport.la libkarbonsvgimport.la -libkarbonsvgexport_la_LDFLAGS = $(KDE_PLUGIN) $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -lkparts +libkarbonsvgexport_la_LDFLAGS = $(KDE_PLUGIN) $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -ltdeparts libkarbonsvgexport_la_LIBADD = \ $(KOFFICE_LIBS) \ ../../../karbon/libkarboncommon.la -libkarbonsvgimport_la_LDFLAGS = $(KDE_PLUGIN) $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -lkparts +libkarbonsvgimport_la_LDFLAGS = $(KDE_PLUGIN) $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -ltdeparts libkarbonsvgimport_la_LIBADD = \ $(KOFFICE_LIBS) \ ../../../karbon/libkarboncommon.la diff --git a/filters/karbon/wmf/Makefile.am b/filters/karbon/wmf/Makefile.am index 82d0c0a0..ade8bf3e 100644 --- a/filters/karbon/wmf/Makefile.am +++ b/filters/karbon/wmf/Makefile.am @@ -11,11 +11,11 @@ INCLUDES= \ kde_module_LTLIBRARIES = libwmfimport.la libwmfexport.la -libwmfimport_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -lkparts +libwmfimport_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -ltdeparts libwmfimport_la_LIBADD = $(KOFFICE_LIBS) $(LIB_KOWMF) ../../../karbon/libkarboncommon.la libwmfimport_la_SOURCES = wmfimport.cc wmfimportparser.cc -libwmfexport_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -lkparts +libwmfexport_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -ltdeparts libwmfexport_la_LIBADD = $(KOFFICE_LIBS) $(LIB_KOWMF) ../../../karbon/libkarboncommon.la libwmfexport_la_SOURCES = wmfexport.cc diff --git a/filters/karbon/xcf/Makefile.am b/filters/karbon/xcf/Makefile.am index 49e51937..1de9ce76 100644 --- a/filters/karbon/xcf/Makefile.am +++ b/filters/karbon/xcf/Makefile.am @@ -1,6 +1,6 @@ kde_module_LTLIBRARIES = libkarbonxcfexport.la -libkarbonxcfexport_la_LDFLAGS = $(KDE_PLUGIN) $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -lkparts +libkarbonxcfexport_la_LDFLAGS = $(KDE_PLUGIN) $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -ltdeparts libkarbonxcfexport_la_LIBADD = \ $(KOFFICE_LIBS) \ ../../../karbon/libkarboncommon.la diff --git a/filters/kchart/bmp/Makefile.am b/filters/kchart/bmp/Makefile.am index 260601f0..4fcbae2b 100644 --- a/filters/kchart/bmp/Makefile.am +++ b/filters/kchart/bmp/Makefile.am @@ -12,7 +12,7 @@ INCLUDES= -I$(srcdir) $(KOFFICE_INCLUDES) \ kde_module_LTLIBRARIES = libkchartbmpexport.la libkchartbmpexport_la_SOURCES = bmpexport.cpp -libkchartbmpexport_la_LDFLAGS = -module $(KDE_PLUGIN) -no-undefined $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -lkparts +libkchartbmpexport_la_LDFLAGS = -module $(KDE_PLUGIN) -no-undefined $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -ltdeparts libkchartbmpexport_la_LIBADD = ../../../kchart/libkchartcommon.la ../libimageexport/libkchartimageexport.la ../../../filters/libdialogfilter/libdialogfilter.la $(KOFFICE_LIBS) noinst_HEADERS = \ bmpexport.h diff --git a/filters/kchart/jpeg/Makefile.am b/filters/kchart/jpeg/Makefile.am index 3907a5d6..6710e075 100644 --- a/filters/kchart/jpeg/Makefile.am +++ b/filters/kchart/jpeg/Makefile.am @@ -13,7 +13,7 @@ INCLUDES= -I$(srcdir) $(KOFFICE_INCLUDES) \ kde_module_LTLIBRARIES = libkchartjpegexport.la libkchartjpegexport_la_SOURCES = jpegexport.cpp -libkchartjpegexport_la_LDFLAGS = -module $(KDE_PLUGIN) -no-undefined $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -lkparts +libkchartjpegexport_la_LDFLAGS = -module $(KDE_PLUGIN) -no-undefined $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -ltdeparts libkchartjpegexport_la_LIBADD = ../../../kchart/libkchartcommon.la ../libimageexport/libkchartimageexport.la ../../../filters/libdialogfilter/libdialogfilter.la $(KOFFICE_LIBS) noinst_HEADERS = \ diff --git a/filters/kchart/mng/Makefile.am b/filters/kchart/mng/Makefile.am index 22d611f9..9bfe1de7 100644 --- a/filters/kchart/mng/Makefile.am +++ b/filters/kchart/mng/Makefile.am @@ -12,7 +12,7 @@ INCLUDES= -I$(srcdir) $(KOFFICE_INCLUDES) \ kde_module_LTLIBRARIES = libkchartmngexport.la libkchartmngexport_la_SOURCES = mngexport.cpp -libkchartmngexport_la_LDFLAGS = -module $(KDE_PLUGIN) -no-undefined $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -lkparts +libkchartmngexport_la_LDFLAGS = -module $(KDE_PLUGIN) -no-undefined $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -ltdeparts libkchartmngexport_la_LIBADD = ../../../kchart/libkchartcommon.la ../libimageexport/libkchartimageexport.la ../../../filters/libdialogfilter/libdialogfilter.la $(KOFFICE_LIBS) noinst_HEADERS = \ mngexport.h diff --git a/filters/kchart/png/Makefile.am b/filters/kchart/png/Makefile.am index 7af0f163..a41554e8 100644 --- a/filters/kchart/png/Makefile.am +++ b/filters/kchart/png/Makefile.am @@ -13,7 +13,7 @@ INCLUDES= -I$(srcdir) $(KOFFICE_INCLUDES) \ kde_module_LTLIBRARIES = libkchartpngexport.la libkchartpngexport_la_SOURCES = pngexport.cpp -libkchartpngexport_la_LDFLAGS = -module $(KDE_PLUGIN) -no-undefined $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -lkparts +libkchartpngexport_la_LDFLAGS = -module $(KDE_PLUGIN) -no-undefined $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -ltdeparts libkchartpngexport_la_LIBADD = ../../../kchart/libkchartcommon.la ../libimageexport/libkchartimageexport.la ../../../filters/libdialogfilter/libdialogfilter.la $(KOFFICE_LIBS) noinst_HEADERS = \ pngexport.h diff --git a/filters/kchart/svg/Makefile.am b/filters/kchart/svg/Makefile.am index c5025f37..54e0e07d 100644 --- a/filters/kchart/svg/Makefile.am +++ b/filters/kchart/svg/Makefile.am @@ -10,7 +10,7 @@ INCLUDES= -I$(srcdir) $(KOFFICE_INCLUDES) \ kde_module_LTLIBRARIES = libkchartsvgexport.la libkchartsvgexport_la_SOURCES = svgexport.cc -libkchartsvgexport_la_LDFLAGS = -module $(KDE_PLUGIN) -no-undefined $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -lkparts +libkchartsvgexport_la_LDFLAGS = -module $(KDE_PLUGIN) -no-undefined $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -ltdeparts libkchartsvgexport_la_LIBADD = ../../../kchart/libkchartcommon.la $(KOFFICE_LIBS) noinst_HEADERS = \ svgexport.h diff --git a/filters/kchart/xbm/Makefile.am b/filters/kchart/xbm/Makefile.am index 7a1a859b..647d257d 100644 --- a/filters/kchart/xbm/Makefile.am +++ b/filters/kchart/xbm/Makefile.am @@ -13,7 +13,7 @@ INCLUDES= -I$(srcdir) $(KOFFICE_INCLUDES) \ kde_module_LTLIBRARIES = libkchartxbmexport.la libkchartxbmexport_la_SOURCES = xbmexport.cpp -libkchartxbmexport_la_LDFLAGS = -module $(KDE_PLUGIN) -no-undefined $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -lkparts +libkchartxbmexport_la_LDFLAGS = -module $(KDE_PLUGIN) -no-undefined $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -ltdeparts libkchartxbmexport_la_LIBADD = ../../../kchart/libkchartcommon.la ../libimageexport/libkchartimageexport.la ../../../filters/libdialogfilter/libdialogfilter.la $(KOFFICE_LIBS) noinst_HEADERS = \ xbmexport.h diff --git a/filters/kchart/xpm/Makefile.am b/filters/kchart/xpm/Makefile.am index 3cb421d2..09143efd 100644 --- a/filters/kchart/xpm/Makefile.am +++ b/filters/kchart/xpm/Makefile.am @@ -13,7 +13,7 @@ INCLUDES= -I$(srcdir) $(KOFFICE_INCLUDES) \ kde_module_LTLIBRARIES = libkchartxpmexport.la libkchartxpmexport_la_SOURCES = xpmexport.cpp -libkchartxpmexport_la_LDFLAGS = -module $(KDE_PLUGIN) -no-undefined $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -lkparts +libkchartxpmexport_la_LDFLAGS = -module $(KDE_PLUGIN) -no-undefined $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -ltdeparts libkchartxpmexport_la_LIBADD = ../../../kchart/libkchartcommon.la ../libimageexport/libkchartimageexport.la ../../../filters/libdialogfilter/libdialogfilter.la $(KOFFICE_LIBS) noinst_HEADERS = \ xpmexport.h diff --git a/filters/kformula/latex/Makefile.am b/filters/kformula/latex/Makefile.am index 8e2168de..e00b285d 100644 --- a/filters/kformula/latex/Makefile.am +++ b/filters/kformula/latex/Makefile.am @@ -16,7 +16,7 @@ noinst_HEADERS = latexexport.h #check_PROGRAMS = texlauncher #texlauncher_SOURCES = texlauncher.cc #texlauncher_LDADD = liblatexexport.la -#texlauncher_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -lktexteditor +#texlauncher_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor METASOURCES = AUTO diff --git a/filters/kformula/png/Makefile.am b/filters/kformula/png/Makefile.am index cf35f8f3..29bcceb5 100644 --- a/filters/kformula/png/Makefile.am +++ b/filters/kformula/png/Makefile.am @@ -16,7 +16,7 @@ noinst_HEADERS = pngexport.h pngexportdia.h #check_PROGRAMS = texlauncher #texlauncher_SOURCES = texlauncher.cc #texlauncher_LDADD = liblatexexport.la -#texlauncher_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -lktexteditor +#texlauncher_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor METASOURCES = AUTO diff --git a/filters/kformula/svg/Makefile.am b/filters/kformula/svg/Makefile.am index ee606211..e1edf773 100644 --- a/filters/kformula/svg/Makefile.am +++ b/filters/kformula/svg/Makefile.am @@ -16,7 +16,7 @@ noinst_HEADERS = svgexport.h #check_PROGRAMS = texlauncher #texlauncher_SOURCES = texlauncher.cc #texlauncher_LDADD = liblatexexport.la -#texlauncher_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -lktexteditor +#texlauncher_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor METASOURCES = AUTO diff --git a/filters/kivio/imageexport/Makefile.am b/filters/kivio/imageexport/Makefile.am index 04d03c53..d6f22eeb 100644 --- a/filters/kivio/imageexport/Makefile.am +++ b/filters/kivio/imageexport/Makefile.am @@ -11,7 +11,7 @@ kde_module_LTLIBRARIES = libkivioimageexport.la libkivioimageexport_la_SOURCES = kivio_imageexport.cpp \ kivio_imageexportwidget.ui kivio_imageexportdialog.cpp -libkivioimageexport_la_LDFLAGS = -module $(KDE_PLUGIN) -no-undefined $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -lkparts +libkivioimageexport_la_LDFLAGS = -module $(KDE_PLUGIN) -no-undefined $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -ltdeparts libkivioimageexport_la_LIBADD = $(top_builddir)/kivio/kiviopart/libkiviocommon.la $(KOFFICE_LIBS) service_DATA = kivio_image_export.desktop diff --git a/filters/kpresenter/bmp/Makefile.am b/filters/kpresenter/bmp/Makefile.am index 2d85478e..f2edb150 100644 --- a/filters/kpresenter/bmp/Makefile.am +++ b/filters/kpresenter/bmp/Makefile.am @@ -12,7 +12,7 @@ INCLUDES= -I$(srcdir) $(KOFFICE_INCLUDES) \ kde_module_LTLIBRARIES = libkpresenterbmpexport.la libkpresenterbmpexport_la_SOURCES = bmpexport.cpp -libkpresenterbmpexport_la_LDFLAGS = -module $(KDE_PLUGIN) -no-undefined $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -lkparts +libkpresenterbmpexport_la_LDFLAGS = -module $(KDE_PLUGIN) -no-undefined $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -ltdeparts libkpresenterbmpexport_la_LIBADD = ../../../kpresenter/libkpresenterprivate.la ../../../filters/libdialogfilter/libdialogfilter.la ../libimageexport/libkpresenterimageexport.la $(KOFFICE_LIBS) noinst_HEADERS = \ bmpexport.h diff --git a/filters/kpresenter/jpeg/Makefile.am b/filters/kpresenter/jpeg/Makefile.am index 40a3109e..c3ea71e9 100644 --- a/filters/kpresenter/jpeg/Makefile.am +++ b/filters/kpresenter/jpeg/Makefile.am @@ -12,7 +12,7 @@ INCLUDES= -I$(srcdir) $(KOFFICE_INCLUDES) \ kde_module_LTLIBRARIES = libkpresenterjpegexport.la libkpresenterjpegexport_la_SOURCES = jpegexport.cpp -libkpresenterjpegexport_la_LDFLAGS = -module $(KDE_PLUGIN) -no-undefined $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -lkparts +libkpresenterjpegexport_la_LDFLAGS = -module $(KDE_PLUGIN) -no-undefined $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -ltdeparts libkpresenterjpegexport_la_LIBADD = ../../../kpresenter/libkpresenterprivate.la ../../../filters/libdialogfilter/libdialogfilter.la ../libimageexport/libkpresenterimageexport.la $(KOFFICE_LIBS) noinst_HEADERS = \ jpegexport.h diff --git a/filters/kpresenter/mng/Makefile.am b/filters/kpresenter/mng/Makefile.am index e51e8000..bd32a949 100644 --- a/filters/kpresenter/mng/Makefile.am +++ b/filters/kpresenter/mng/Makefile.am @@ -12,7 +12,7 @@ INCLUDES= -I$(srcdir) $(KOFFICE_INCLUDES) \ kde_module_LTLIBRARIES = libkpresentermngexport.la libkpresentermngexport_la_SOURCES = mngexport.cpp -libkpresentermngexport_la_LDFLAGS = -module $(KDE_PLUGIN) -no-undefined $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -lkparts +libkpresentermngexport_la_LDFLAGS = -module $(KDE_PLUGIN) -no-undefined $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -ltdeparts libkpresentermngexport_la_LIBADD = ../../../kpresenter/libkpresenterprivate.la ../../../filters/libdialogfilter/libdialogfilter.la ../libimageexport/libkpresenterimageexport.la $(KOFFICE_LIBS) noinst_HEADERS = \ mngexport.h diff --git a/filters/kpresenter/png/Makefile.am b/filters/kpresenter/png/Makefile.am index 0872168a..bbe350bf 100644 --- a/filters/kpresenter/png/Makefile.am +++ b/filters/kpresenter/png/Makefile.am @@ -12,7 +12,7 @@ INCLUDES= -I$(srcdir) $(KOFFICE_INCLUDES) \ kde_module_LTLIBRARIES = libkpresenterpngexport.la libkpresenterpngexport_la_SOURCES = pngexport.cpp -libkpresenterpngexport_la_LDFLAGS = -module $(KDE_PLUGIN) -no-undefined $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -lkparts +libkpresenterpngexport_la_LDFLAGS = -module $(KDE_PLUGIN) -no-undefined $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -ltdeparts libkpresenterpngexport_la_LIBADD = ../../../kpresenter/libkpresenterprivate.la ../../../filters/libdialogfilter/libdialogfilter.la ../libimageexport/libkpresenterimageexport.la $(KOFFICE_LIBS) noinst_HEADERS = \ pngexport.h diff --git a/filters/kpresenter/svg/Makefile.am b/filters/kpresenter/svg/Makefile.am index d4b0b854..20547032 100644 --- a/filters/kpresenter/svg/Makefile.am +++ b/filters/kpresenter/svg/Makefile.am @@ -9,7 +9,7 @@ INCLUDES= -I$(srcdir) $(KOFFICE_INCLUDES) \ kde_module_LTLIBRARIES = libkpresentersvgexport.la libkpresentersvgexport_la_SOURCES = svgexport.cc -libkpresentersvgexport_la_LDFLAGS = -module $(KDE_PLUGIN) -no-undefined $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -lkparts +libkpresentersvgexport_la_LDFLAGS = -module $(KDE_PLUGIN) -no-undefined $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -ltdeparts libkpresentersvgexport_la_LIBADD = ../../../kpresenter/libkpresenterprivate.la $(KOFFICE_LIBS) noinst_HEADERS = \ svgexport.h diff --git a/filters/kpresenter/xbm/Makefile.am b/filters/kpresenter/xbm/Makefile.am index b57ad5fc..ee2f8ff4 100644 --- a/filters/kpresenter/xbm/Makefile.am +++ b/filters/kpresenter/xbm/Makefile.am @@ -12,7 +12,7 @@ INCLUDES= -I$(srcdir) $(KOFFICE_INCLUDES) \ kde_module_LTLIBRARIES = libkpresenterxbmexport.la libkpresenterxbmexport_la_SOURCES = xbmexport.cpp -libkpresenterxbmexport_la_LDFLAGS = -module $(KDE_PLUGIN) -no-undefined $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -lkparts +libkpresenterxbmexport_la_LDFLAGS = -module $(KDE_PLUGIN) -no-undefined $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -ltdeparts libkpresenterxbmexport_la_LIBADD = ../../../kpresenter/libkpresenterprivate.la ../../../filters/libdialogfilter/libdialogfilter.la ../libimageexport/libkpresenterimageexport.la $(KOFFICE_LIBS) noinst_HEADERS = \ xbmexport.h diff --git a/filters/kpresenter/xpm/Makefile.am b/filters/kpresenter/xpm/Makefile.am index 5ce1efaf..c09b6b2c 100644 --- a/filters/kpresenter/xpm/Makefile.am +++ b/filters/kpresenter/xpm/Makefile.am @@ -12,7 +12,7 @@ INCLUDES= -I$(srcdir) $(KOFFICE_INCLUDES) \ kde_module_LTLIBRARIES = libkpresenterxpmexport.la libkpresenterxpmexport_la_SOURCES = xpmexport.cpp -libkpresenterxpmexport_la_LDFLAGS = -module $(KDE_PLUGIN) -no-undefined $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -lkparts +libkpresenterxpmexport_la_LDFLAGS = -module $(KDE_PLUGIN) -no-undefined $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -ltdeparts libkpresenterxpmexport_la_LIBADD = ../../../kpresenter/libkpresenterprivate.la ../../../filters/libdialogfilter/libdialogfilter.la ../libimageexport/libkpresenterimageexport.la $(KOFFICE_LIBS) noinst_HEADERS = \ xpmexport.h diff --git a/filters/kspread/applixspread/Makefile.am b/filters/kspread/applixspread/Makefile.am index f85c2ac4..e1b88601 100644 --- a/filters/kspread/applixspread/Makefile.am +++ b/filters/kspread/applixspread/Makefile.am @@ -8,7 +8,7 @@ kde_module_LTLIBRARIES = libapplixspreadimport.la libapplixspreadimport_la_SOURCES = applixspreadimport.cc libapplixspreadimport_la_LIBADD = $(KOFFICE_LIBS) -libapplixspreadimport_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -lkparts +libapplixspreadimport_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -ltdeparts noinst_HEADERS = applixspreadimport.h METASOURCES = AUTO diff --git a/filters/kspread/dbase/Makefile.am b/filters/kspread/dbase/Makefile.am index cea95e51..30914190 100644 --- a/filters/kspread/dbase/Makefile.am +++ b/filters/kspread/dbase/Makefile.am @@ -8,7 +8,7 @@ kde_module_LTLIBRARIES = libdbaseimport.la libdbaseimport_la_SOURCES = dbaseimport.cc dbase.cpp libdbaseimport_la_LIBADD = $(KOFFICE_LIBS) -libdbaseimport_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -lkparts +libdbaseimport_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -ltdeparts noinst_HEADERS = dbaseimport.h dbase.h METASOURCES = AUTO diff --git a/filters/kspread/excel/import/Makefile.am b/filters/kspread/excel/import/Makefile.am index fffd45e9..9af3bab7 100644 --- a/filters/kspread/excel/import/Makefile.am +++ b/filters/kspread/excel/import/Makefile.am @@ -8,7 +8,7 @@ kde_module_LTLIBRARIES = libexcelimport.la libexcelimport_la_SOURCES = excelimport.cc libexcelimport_la_LIBADD = $(KOFFICE_LIBS) ../sidewinder/libsidewinder.la -libexcelimport_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -lkparts +libexcelimport_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -ltdeparts noinst_HEADERS = excelimport.h METASOURCES = AUTO diff --git a/filters/kspread/latex/export/Makefile.am b/filters/kspread/latex/export/Makefile.am index f16a130b..2a968628 100644 --- a/filters/kspread/latex/export/Makefile.am +++ b/filters/kspread/latex/export/Makefile.am @@ -22,7 +22,7 @@ noinst_HEADERS = cell.h column.h config.h document.h fileheader.h format.h \ #check_PROGRAMS = texlauncher #texlauncher_SOURCES = texlauncher.cc #texlauncher_LDADD = liblatexexport.la -#texlauncher_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -lktexteditor +#texlauncher_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor METASOURCES = AUTO diff --git a/filters/kugar/kugarnop/Makefile.am b/filters/kugar/kugarnop/Makefile.am index bf5bac0e..c0870cf6 100644 --- a/filters/kugar/kugarnop/Makefile.am +++ b/filters/kugar/kugarnop/Makefile.am @@ -5,7 +5,7 @@ INCLUDES= -I$(srcdir) $(KOFFICE_INCLUDES) $(all_includes) kde_module_LTLIBRARIES = libkugarnopimport.la libkugarnopimport_la_SOURCES = kugarnopimport.cpp -libkugarnopimport_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -lkparts +libkugarnopimport_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -ltdeparts libkugarnopimport_la_LIBADD = $(KOFFICE_LIBS) noinst_HEADERS = kugarnopimport.h diff --git a/filters/kword/hancomword/Makefile.am b/filters/kword/hancomword/Makefile.am index 535abf08..b6689866 100644 --- a/filters/kword/hancomword/Makefile.am +++ b/filters/kword/hancomword/Makefile.am @@ -8,7 +8,7 @@ kde_module_LTLIBRARIES = libhancomwordimport.la libhancomwordimport_la_SOURCES = pole.cpp hancomwordimport.cpp libhancomwordimport_la_LIBADD = $(KOFFICE_LIBS) -libhancomwordimport_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -lkparts +libhancomwordimport_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -ltdeparts noinst_HEADERS = pole.h hancomwordimport.h METASOURCES = AUTO diff --git a/filters/kword/html/import/Makefile.am b/filters/kword/html/import/Makefile.am index 6bed13c6..69281581 100644 --- a/filters/kword/html/import/Makefile.am +++ b/filters/kword/html/import/Makefile.am @@ -10,9 +10,9 @@ libhtmlimport_la_LIBADD = $(LIB_KHTML) $(KOFFICE_LIBS) $(LIB_KOTEXT) kde_module_LTLIBRARIES = libhtmlimport.la -libhtmlimport_la_SOURCES = htmlimport.cpp khtmlreader.cpp kwdwriter.cpp +libhtmlimport_la_SOURCES = htmlimport.cpp tdehtmlreader.cpp kwdwriter.cpp -noinst_HEADERS = htmlimport.h khtmlreader.h kwdwriter.h +noinst_HEADERS = htmlimport.h tdehtmlreader.h kwdwriter.h METASOURCES = AUTO diff --git a/filters/kword/html/import/htmlimport.cpp b/filters/kword/html/import/htmlimport.cpp index 9b29320d..f5d9d08c 100644 --- a/filters/kword/html/import/htmlimport.cpp +++ b/filters/kword/html/import/htmlimport.cpp @@ -27,7 +27,7 @@ #include -#include +#include #include typedef KGenericFactory HTMLImportFactory; diff --git a/filters/kword/html/import/khtmlreader.cpp b/filters/kword/html/import/khtmlreader.cpp deleted file mode 100644 index ab68e9f3..00000000 --- a/filters/kword/html/import/khtmlreader.cpp +++ /dev/null @@ -1,717 +0,0 @@ -/*************************************************************************** - khtmlreader.cpp - description - ------------------- - begin : Sun Sep 9 2001 - copyright : (C) 2001 by Frank Dekervel - email : Frank.Dekervel@student.kuleuven.ac.be - ***************************************************************************/ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU lesser General Public License as * - * published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - -#include "khtmlreader.h" - -#include "khtmlreader.moc" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -KHTMLReader::KHTMLReader(KWDWriter *w) -{ - _html=new KHTMLPart(); - _writer=w; - _it_worked=false; -} - -// if a troll ever sees this, he can't kill me anyway. (and he should kill dfaure first) -void tqt_enter_modal( TQWidget *widget ); -void tqt_leave_modal( TQWidget *widget ); - - -bool KHTMLReader::filter(KURL url) -{ - kdDebug(30503) << "KHTMLReader::filter" << endl; - TQObject::connect(_html,TQT_SIGNAL(completed()),this,TQT_SLOT(completed())); - - _state.clear(); - _list_depth=0; - - _html->view()->resize(600,530); - _html->setAutoloadImages(false); - _html->setJScriptEnabled(false); - _html->setPluginsEnabled(false); - _html->setJavaEnabled(false); - _html->setMetaRefreshEnabled(false); - if (_html->openURL(url) == false) - { - kdWarning(30503) << "openURL returned false" << endl; - return false; - } - - //FIXME use synchronous IO instead of this hack if possible. - TQWidget dummy(0,0,WType_Dialog | WShowModal); - tqt_enter_modal(&dummy); - tqApp->enter_loop(); - tqt_leave_modal(&dummy); - return _it_worked; -} - -HTMLReader_state *KHTMLReader::state() -{ - if (_state.count() == 0) - { - HTMLReader_state *s=new HTMLReader_state; - s->frameset=_writer->mainFrameset(); - s->paragraph = _writer->addParagraph(s->frameset); - s->format=_writer->currentFormat(s->paragraph,true); - s->layout=_writer->currentLayout(s->paragraph); - s->in_pre_mode = false; - _state.push(s); - } - return _state.top(); -} - -HTMLReader_state *KHTMLReader::pushNewState() -{ - HTMLReader_state *s=new HTMLReader_state; - s->frameset=state()->frameset; - s->paragraph=state()->paragraph; - s->format=state()->format; - s->layout=state()->layout; - s->in_pre_mode=state()->in_pre_mode; - _writer->cleanUpParagraph(s->paragraph); - _state.push(s); - return s; -} - - -void KHTMLReader::popState() -{ - kdDebug(30503) << "Entering popState" << endl; - - HTMLReader_state *s=_state.pop(); - - /** - the recursion trough html is somewhat clumsy still, i'm working on a better method. - popState gets called when a tag is closed, but since a closed tag doesn't mean the end - of a (kword) "tag" we have to copy some things over from the closed tag: - - the paragraph (after a , we still are in the same paragraph, but - inside the , there might have been a
) - if we go back into another frameset, we start a new paragraph. - **/ - if (s->frameset == state()->frameset) - { - state()->paragraph=s->paragraph; - if ((state()->layout != s->layout)) - { - if (_writer->getText(state()->paragraph).length()!=0) startNewLayout(false,state()->layout); - } - state()->format=_writer->startFormat(state()->paragraph, state()->format); - } - delete(s); -} - -void KHTMLReader::startNewLayout(bool startNewFormat) -{ - TQDomElement layout; - startNewLayout(startNewFormat,layout); -} - -void KHTMLReader::startNewLayout(bool startNewFormat, TQDomElement layout) -{ - kdDebug() << "entering startNewLayout" << endl; - startNewParagraph(startNewFormat,true); - state()->layout=_writer->setLayout(state()->paragraph,layout); -} - -void KHTMLReader::completed() -{ - kdDebug(30503) << "KHTMLReader::completed" << endl; - tqApp->exit_loop(); - DOM::Document doc=_html->document(); // FIXME parse too - DOM::NodeList list=doc.getElementsByTagName("body"); - DOM::Node docbody=list.item(0); - - if (docbody.isNull()) - { - kdWarning(30503) << "no , giving up" << endl; - _it_worked=false; - return; - } - - - parseNode(docbody); // start here (keyword: main) - - list = doc.getElementsByTagName("head"); - DOM::Node dochead=list.item(0); - if (!dochead.isNull()) - parse_head(dochead); - else - kdWarning(30503) << "WARNING: no html section" << endl; - - _writer->cleanUpParagraph(state()->paragraph); - _it_worked=_writer->writeDoc(); -} - - -void KHTMLReader::parseNode(DOM::Node node) -{ - kdDebug(30503) << "Entering parseNode" << endl; - // check if this is a text node. - DOM::Text t=node; - if (!t.isNull()) - { - _writer->addText(state()->paragraph,t.data().string(),1,state()->in_pre_mode); - return; // no children anymore... - } - - // is this really needed ? it can't do harm anyway. - state()->format=_writer->currentFormat(state()->paragraph,true); - state()->layout=_writer->currentLayout(state()->paragraph); - pushNewState(); - - DOM::Element e=node; - - bool go_recursive=true; - - if (!e.isNull()) - { - // get the CSS information - parseStyle(e); - // get the tag information - go_recursive=parseTag(e); - } - if (go_recursive) - { - for (DOM::Node q=node.firstChild(); !q.isNull(); q=q.nextSibling()) - { - parseNode(q); - } - } - popState(); -} - -void KHTMLReader::parse_head(DOM::Element e) -{ - for (DOM::Element items=e.firstChild();!items.isNull();items=items.nextSibling()) { - if (items.tagName().string().lower() == "title") { - DOM::Text t=items.firstChild(); - if (!t.isNull()) { - _writer->createDocInfo("HTML import filter",t.data().string()); - } - } - } -} - -#define _PF(x,a,b,c) { \ - if (e.tagName().lower() == #x) \ - { \ - _writer->formatAttribute(state()->paragraph, #a,#b,#c); \ - return true; \ - } \ - } - -// the state->layout=_writer->setLayout is meant to tell popState something changed in the layout, and a new -// layout should probably be started after closing. - -#define _PL(x,a,b,c) { \ - if (e.tagName().lower() == #x) \ - { \ - state()->layout=_writer->setLayout(state()->paragraph,state()->layout);\ - if (!(_writer->getText(state()->paragraph).isEmpty())) \ - startNewParagraph(false,false); \ - _writer->layoutAttribute(state()->paragraph, #a,#b,#c); \ - return true; \ - } \ - } - - -bool KHTMLReader::parseTag(DOM::Element e) -{ - kdDebug(30503) << "Entering parseTag for " << e.tagName().lower() << endl; - if (e.tagName().lower()=="a") { return parse_a(e); } - if (e.tagName().lower()=="p") { return parse_p(e); } - if (e.tagName().lower()=="br") { return parse_br(e); } - if (e.tagName().lower()=="ul") { return parse_ul(e); } - if (e.tagName().lower()=="ol") { return parse_ol(e); } - if (e.tagName().lower()=="hr") { return parse_hr(e); } - if (e.tagName().lower()=="pre") { return parse_pre(e); } - if (e.tagName().lower()=="font") { return parse_font(e); } - if (e.tagName().lower()=="table") { return parse_table(e); } - - // FIXME we can get rid of these, make things tons more simple - // when khtml finally implements getComputedStyle - _PF(b,WEIGHT,value,75); - _PF(strong,WEIGHT,value,75); - _PF(u,UNDERLINE,value,1); - _PF(i,ITALIC,value,1); - - _PL(center,FLOW,align,center); - _PL(right,FLOW,align,right); - _PL(left,FLOW,align,left); - - _PL(h1,NAME,value,h1); - _PL(h2,NAME,value,h2); - _PL(h3,NAME,value,h3); - _PL(h4,NAME,value,h4); - _PL(h5,NAME,value,h5); - _PL(h6,NAME,value,h6); - kdDebug(30503) << "Leaving parseTag" << endl; - - // Don't handle the content of comment- or script-nodes. - if(e.nodeType() == DOM::Node::COMMENT_NODE || e.tagName().lower() == "script") - { - return false; - } - - return true; -} - -void KHTMLReader::startNewParagraph(bool startnewformat, bool startnewlayout) -{ - kdDebug() << "Entering startNewParagraph" << endl; - - TQDomElement qf=state()->format; - TQDomElement ql=state()->layout; - - _writer->cleanUpParagraph(state()->paragraph); - - if ((startnewlayout==true) || ql.isNull()) - {state()->paragraph=_writer->addParagraph(state()->frameset);} - else - {state()->paragraph= - _writer->addParagraph(state()->frameset,state()->layout);} - - - - if (qf.isNull() || (startnewformat==true)) - { - state()->format=_writer->startFormat(state()->paragraph/*,state()->format*/); - } - else - { - state()->format=_writer->startFormat(state()->paragraph,qf); - } - - /** - support lists: if we are in a list, and we start a new paragraph, - we don't want to start a new item, but we want to retain the list state. - we do this by incrementing the 'environment depth' and changing the numbering type to 'no numbering' - **/ - TQString ct=_writer->getLayoutAttribute(state()->paragraph,"COUNTER","type"); - if ((!ct.isNull()) && (ct != "0")) - { - _writer->layoutAttribute(state()->paragraph,"COUNTER","type","0"); - _writer->layoutAttribute(state()->paragraph,"COUNTER","numberingtype","0"); - _writer->layoutAttribute(state()->paragraph,"COUNTER","righttext",""); - int currdepth=(_writer->getLayoutAttribute(state()->paragraph,"COUNTER","depth")).toInt(); - _writer->layoutAttribute(state()->paragraph,"COUNTER","depth",TQString("%1").arg(currdepth+1)); - } -} - -KHTMLReader::~KHTMLReader(){ - delete _html; -} - - - - - - -//============================================================== -// tag parsing -//============================================================== - - -bool KHTMLReader::parse_CommonAttributes(DOM::Element e) -{ - kdDebug(30503) << "entering KHTMLReader::parse_CommonAttributes" << endl; - kdDebug(30503) << "tagName is " << e.tagName().string() << endl; - TQString s=e.getAttribute("align").string(); - if (!s.isEmpty()) - { - _writer->formatAttribute(state()->paragraph,"FLOW","align",s); - } - TQRegExp rx( "h[0-9]+" ); - if ( 0 == rx.search( e.getAttribute("class").string() ) ) - // example:

- { - kdDebug(30503) << "laying out with " << e.getAttribute("class").string() << endl; - _writer->layoutAttribute(state()->paragraph,"NAME","value",e.getAttribute("class").string()); - } - if ( e.getAttribute("class").string()=="Standard" ) - { - kdDebug(30503) << "laying out with " << e.getAttribute("class").string() << endl; - _writer->layoutAttribute(state()->paragraph,"NAME","value",e.getAttribute("class").string()); - } - kdDebug(30503) << "leaving parse_CommonAttributes" << endl; - return true; -} - -bool KHTMLReader::parse_a(DOM::Element e) { - TQString url = e.getAttribute("href").string(); - if (!url.isEmpty()) - { - TQString linkName; - DOM::Text t = e.firstChild(); - if (t.isNull()) { - /* Link without text -> just drop it*/ - return false; /* stop parsing recursively */ - } - linkName = t.data().string().simplifyWhiteSpace(); - t.setData(DOM::DOMString("#")); // replace with '#' - _writer->createLink(state()->paragraph, linkName, url); - } - return true; /* stop parsing recursively */ -} - -bool KHTMLReader::parse_p(DOM::Element e) -{ - // For every starting paragraph, a line break has to be inserted. - // exception: the first paragraph, e.g. if the starts with a

. - kdDebug() << "entering parse_p" << endl; - if (!(_writer->getText(state()->paragraph).isEmpty())) - startNewParagraph(false,false); - parse_CommonAttributes(e); - kdDebug() << "leaving parse_p" << endl; - return true; -} - -bool KHTMLReader::parse_hr(DOM::Element /*e*/) -{ - startNewParagraph(); - _writer->createHR(state()->paragraph); - startNewParagraph(); - return true; -} - -bool KHTMLReader::parse_br(DOM::Element /*e*/) -{ - startNewParagraph(false,false); //keep the current format and layout - return false; // a BR tag has no childs. -} - -static const TQColor parsecolor(const TQString& colorstring) -{ - TQColor color; - if (colorstring[0]=='#') - { - color.setRgb( - colorstring.mid(1,2).toInt(0,16), - colorstring.mid(3,2).toInt(0,16), - colorstring.mid(5,2).toInt(0,16) - ); - } - else - { - TQString colorlower=colorstring.lower(); - // Grays - if (colorlower=="black") - color.setRgb(0,0,0); - else if (colorlower=="white") - color.setRgb(255,255,255); - else if (colorlower=="silver") - color.setRgb(0xc0,0xc0,0xc0); - else if (colorlower=="gray") - color.setRgb(128,128,128); - // "full" colors - else if (colorlower=="red") - color.setRgb(255,0,0); - else if (colorlower=="lime") - color.setRgb(0,255,0); - else if (colorlower=="blue") - color.setRgb(0,0,255); - else if (colorlower=="yellow") - color.setRgb(255,255,0); - else if (colorlower=="fuchsia") - color.setRgb(255,0,255); - else if (colorlower=="aqua") - color.setRgb(0,255,255); - // "half" colors - else if (colorlower=="maroon") - color.setRgb(128,0,0); - else if (colorlower=="green") - color.setRgb(0,128,0); - else if (colorlower=="navy") - color.setRgb(0,0,128); - else if (colorlower=="olive") - color.setRgb(128,128,0); - else if (colorlower=="purple") - color.setRgb(128,0,128); - else if (colorlower=="teal") - color.setRgb(0,128,128); - else - { - // H'm, we have still not found the color! - // Let us see if QT can do better! - color.setNamedColor(colorstring); - } - } - return colorstring; -} - -void KHTMLReader::parseStyle(DOM::Element e) -{ - // styles are broken broken broken broken broken broken. - //FIXME: wait until getComputedStyle is more than - // 'return 0' in khtml - kdDebug(30503) << "entering parseStyle" << endl; - DOM::CSSStyleDeclaration s1=e.style(); - DOM::Document doc=_html->document(); - DOM::CSSStyleDeclaration s2=doc.defaultView().getComputedStyle(e,""); - kdDebug(30503) << "font-weight=" << s1.getPropertyValue("font-weight").string() << endl; - if ( s1.getPropertyValue("font-weight").string() == "bolder" ) - { - _writer->formatAttribute(state()->paragraph,"WEIGHT","value","75"); - } - if ( s1.getPropertyValue("font-weight").string() == "bold" ) - { - _writer->formatAttribute(state()->paragraph,"WEIGHT","value","75"); - } - - // process e.g. - if ( s1.getPropertyValue("color").string() != TQString() ) - { - TQColor c=parsecolor(s1.getPropertyValue("color").string()); - _writer->formatAttribute(state()->paragraph,"COLOR","red",TQString::number(c.red())); - _writer->formatAttribute(state()->paragraph,"COLOR","green",TQString::number(c.green())); - _writer->formatAttribute(state()->paragraph,"COLOR","blue",TQString::number(c.blue())); - } - // done - // process e.g. - if ( s1.getPropertyValue("font-size").string() != TQString() ) - { - TQString size=s1.getPropertyValue("font-size").string(); - if (size.endsWith("pt")) - { - size=size.left(size.length()-2); - } - _writer->formatAttribute(state()->paragraph,"SIZE","value",size); - } - // done - // process e.g. this is in the center - if ( s1.getPropertyValue("text-align").string() != TQString() && s1.getPropertyValue("text-align").string() != TQString("left") ) - { - state()->layout=_writer->setLayout(state()->paragraph,state()->layout); - _writer->layoutAttribute(state()->paragraph, "FLOW","align",s1.getPropertyValue("text-align").string()); - } - // done - - /*if (DOM::PROPV("font-weight") == "bolder") - _writer->formatAttribute(state()->paragraph,"WEIGHT","value","75"); - */ -/* - // debugging code. - kdDebug(30503) << "e.style()" << endl; - for (unsigned int i=0;iisInTable()) { - // We are already inside of a table. Tables in tables are not supported - // yet. So, just add that table-content as text. - for (DOM::Node rows=e.firstChild().firstChild();!rows.isNull();rows=rows.nextSibling()) - if (!rows.isNull() && rows.nodeName().string().lower() == "tr") - for (DOM::Node cols=rows.firstChild();!cols.isNull();cols=cols.nextSibling()) - if (!cols.isNull()) - parseNode(cols); - return false; - } - - DOM::Element table_body=e.firstChild(); - if(table_body.isNull()) { - // If the table_body is empty, we don't continue cause else - // KHTML will throw a DOM::DOMException if we try to access - // the null element. - return true; - } - - int tableno=_writer->createTable(); - int nrow=0; - int ncol=0; - bool has_borders=false; - TQColor bgcolor=parsecolor("#FFFFFF"); - - if (!table_body.getAttribute("bgcolor").string().isEmpty()) - bgcolor=parsecolor(table_body.getAttribute("bgcolor").string()); - if ((e.getAttribute("border").string().toInt() > 0)) - has_borders=true; - - // fixme rewrite this proper - //(maybe using computed sizes from khtml if thats once exported) - for (DOM::Node rowsnode=table_body.firstChild();!rowsnode.isNull();rowsnode=rowsnode.nextSibling()) { - DOM::Element rows = rowsnode; - if (!rows.isNull() && rows.tagName().string().lower() == "tr") { - TQColor obgcolor=bgcolor; - if (!rows.getAttribute("bgcolor").string().isEmpty()) - bgcolor=parsecolor(rows.getAttribute("bgcolor").string()); - - ncol=0; - for (DOM::Node colsnode=rows.firstChild();!colsnode.isNull();colsnode=colsnode.nextSibling()) { - DOM::Element cols = colsnode; - const TQString nodename = cols.isNull() ? TQString() : cols.nodeName().string().lower(); - if (nodename == "td" || nodename == "th") { - TQColor bbgcolor=bgcolor; - if (!cols.getAttribute("bgcolor").string().isEmpty()) - bgcolor=parsecolor(cols.getAttribute("bgcolor").string()); - - pushNewState(); - TQRect colrect=cols.getRect(); - state()->frameset=_writer->createTableCell(tableno,nrow,ncol,1,colrect); - state()->frameset.firstChild().toElement().setAttribute("bkRed",bgcolor.red()); - state()->frameset.firstChild().toElement().setAttribute("bkGreen",bgcolor.green()); - state()->frameset.firstChild().toElement().setAttribute("bkBlue",bgcolor.blue()); - if (has_borders) { - state()->frameset.firstChild().toElement().setAttribute("lWidth",1); - state()->frameset.firstChild().toElement().setAttribute("rWidth",1); - state()->frameset.firstChild().toElement().setAttribute("bWidth",1); - state()->frameset.firstChild().toElement().setAttribute("tWidth",1); - } - - // fixme don't guess. get it right. - state()->paragraph=_writer->addParagraph(state()->frameset); - parseNode(cols); - _writer->cleanUpParagraph(state()->paragraph); - popState(); - ncol++; - bgcolor=bbgcolor; - } - } - nrow++; - bgcolor=obgcolor; - } - } - _writer->finishTable(tableno/*,0,0,r.right()-r.left(),r.bottom()-r.top()*/); // FIXME find something better. - startNewParagraph(false,false); - _writer->createInline(state()->paragraph,_writer->fetchTableCell(tableno,0,0)); - startNewParagraph(false,false); - return false; // we do our own recursion -} - -bool KHTMLReader::parse_img(DOM::Element /*e*/) -{ - //TQRect e=e.getRect(); - return true; -} - -bool KHTMLReader::parse_pre(DOM::Element e) -{ -#if 0 // see Bug #74601 (normal): kword doesn't recognize PRE-tags in HTML - //pushNewState(); - /// \todo set fixed width font - DOM::HTMLElement htmlelement(e); - if(! htmlelement.isNull()) - _writer->addText(state()->paragraph,htmlelement.innerHTML().string(),1); - startNewParagraph(); - //popState(); - return false; // children are already handled. -#else - pushNewState(); - state()->in_pre_mode=true; - TQString face=e.getAttribute("face").string(); - _writer->formatAttribute(state()->paragraph,"FONT","name",TQString("Courier")); - for (DOM::Node q=e.firstChild(); !q.isNull(); q=q.nextSibling()) - { - parseNode(q); // parse everything... - } - popState(); - _writer->formatAttribute(state()->paragraph,"FONT","name",face); - return false; // children are already handled. -#endif -} - -bool KHTMLReader::parse_ol(DOM::Element e) -{ - return parse_ul(e); -} - -bool KHTMLReader::parse_font(DOM::Element e) -{ - kdDebug(30503) << "Entering parse_font" << endl; - // fixme don't hardcode 12 font size ... - TQString face=e.getAttribute("face").string(); - TQColor color=parsecolor("#000000"); - if (!e.getAttribute("color").string().isEmpty()) - color=parsecolor(e.getAttribute("color").string()); - TQString size=e.getAttribute("size").string(); - int isize=-1; - if (size.startsWith("+")) - isize=12+size.right(size.length()-1).toInt(); - else if (size.startsWith("-")) - isize=12-size.right(size.length()-1).toInt(); - else - isize=12+size.toInt(); - - _writer->formatAttribute(state()->paragraph,"FONT","name",face); - if ((isize>=0) && (isize != 12)) - _writer->formatAttribute(state()->paragraph,"SIZE","value",TQString("%1").arg(isize)); - - _writer->formatAttribute(state()->paragraph,"COLOR","red",TQString("%1").arg(color.red())); - _writer->formatAttribute(state()->paragraph,"COLOR","green",TQString("%1").arg(color.green())); - _writer->formatAttribute(state()->paragraph,"COLOR","blue",TQString("%1").arg(color.blue())); - return true; -} - -bool KHTMLReader::parse_ul(DOM::Element e) -{ -// Parse the tag ul and all its subnodes. Take special care for the li tag. - kdDebug(30503) << "Entering KHTMLReader::parse_ul" << endl; - kdDebug(30503) << "_writer->getText(state()->paragraph)=" << _writer->getText(state()->paragraph) << endl; - _list_depth++; - if (e.firstChild().nodeName().string().lower() == "#text") // e.g.

    this is indented
  • first listitem
- { - _writer->layoutAttribute(state()->paragraph,"COUNTER","depth",TQString("%1").arg(_list_depth-1)); // indent - startNewLayout(); - } - for (DOM::Node items=e.firstChild();!items.isNull();items=items.nextSibling()) - { - if (items.nodeName().string().lower() == "li") - { - if (!(_writer->getText(state()->paragraph).isEmpty())) startNewLayout(); - _writer->layoutAttribute(state()->paragraph,"COUNTER","numberingtype","1"); - _writer->layoutAttribute(state()->paragraph,"COUNTER","righttext","."); - if (e.tagName().string().lower() == "ol") - { - _writer->layoutAttribute(state()->paragraph,"COUNTER","type","1"); - _writer->layoutAttribute(state()->paragraph,"COUNTER","numberingtype","1"); - _writer->layoutAttribute(state()->paragraph,"COUNTER","righttext","."); - } - else - { - _writer->layoutAttribute(state()->paragraph,"COUNTER","type","10"); - _writer->layoutAttribute(state()->paragraph,"COUNTER","numberingtype",""); - _writer->layoutAttribute(state()->paragraph,"COUNTER","righttext",""); - } - _writer->layoutAttribute(state()->paragraph,"COUNTER","depth",TQString("%1").arg(_list_depth-1)); // indent - } - parseNode(items); - } - _list_depth--; - kdDebug(30503) << "Leaving KHTMLReader::parse_ul" << endl; - return false; -} - diff --git a/filters/kword/html/import/khtmlreader.h b/filters/kword/html/import/khtmlreader.h deleted file mode 100644 index dbca8a87..00000000 --- a/filters/kword/html/import/khtmlreader.h +++ /dev/null @@ -1,103 +0,0 @@ -/*************************************************************************** - khtmlreader.h - description - ------------------- - begin : Sun Sep 9 2001 - copyright : (C) 2001 by Frank Dekervel - email : Frank.Dekervel@student.kuleuven.ac.be - ***************************************************************************/ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU Lesser General Public License as * - * published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - -#ifndef KHTMLREADER_H -#define KHTMLREADER_H - -#include // fixme speedup compile time by moving these into the cpp file. -#include -#include -#include - -//#include - -/** - *@author Frank Dekervel - */ - -namespace DOM { - class Node; - class Element; -} - -struct HTMLReader_state { - TQDomElement format; - TQDomElement frameset; - TQDomElement paragraph; - TQDomElement layout; - bool in_pre_mode; // keep formatting as is. -}; - -class KHTMLReader: public TQObject { - -Q_OBJECT - - -public: - KHTMLReader(KWDWriter *writer); - ~KHTMLReader(); - - bool filter(KURL url); - -private slots: - void completed(); - -private: - void parseNode(DOM::Node n); - bool parseTag(DOM::Element e); - void parseStyle(DOM::Element e); - void parse_head(DOM::Element e); - HTMLReader_state *state(); - HTMLReader_state *pushNewState(); - void popState(); - - - /* void stateSetFormat(TQDomElement f); - void stateSetFrameset(TQDomElement f); - void stateSetLayout(TQDomElement l); - void stateSetParagraph(TQDomElement p);*/ - - TQPtrStack _state; - KHTMLPart *_html; - KWDWriter *_writer; - - void startNewLayout(bool startNewFormat=false); - void startNewLayout(bool startNewFormat, TQDomElement layout); - void startNewParagraph(bool startnewformat=true, bool startnewlayout=true); - bool _it_worked; -// ----------------------------------------------------- - int _list_depth; -// ----------------------------------------------------- - bool parse_CommonAttributes(DOM::Element e); - bool parse_a(DOM::Element e); - bool parse_p(DOM::Element e); - bool parse_br(DOM::Element e); - bool parse_table(DOM::Element e); - bool parse_pre(DOM::Element e); - bool parse_font(DOM::Element e); - bool parse_ol(DOM::Element e); - bool parse_ul(DOM::Element e); - bool parse_hr(DOM::Element e); - bool parse_img(DOM::Element e); - - -// ------------------------------------------------------- - -}; - -#endif diff --git a/filters/kword/html/import/tdehtmlreader.cpp b/filters/kword/html/import/tdehtmlreader.cpp new file mode 100644 index 00000000..06aa69ea --- /dev/null +++ b/filters/kword/html/import/tdehtmlreader.cpp @@ -0,0 +1,717 @@ +/*************************************************************************** + tdehtmlreader.cpp - description + ------------------- + begin : Sun Sep 9 2001 + copyright : (C) 2001 by Frank Dekervel + email : Frank.Dekervel@student.kuleuven.ac.be + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU lesser General Public License as * + * published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#include "tdehtmlreader.h" + +#include "tdehtmlreader.moc" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +KHTMLReader::KHTMLReader(KWDWriter *w) +{ + _html=new KHTMLPart(); + _writer=w; + _it_worked=false; +} + +// if a troll ever sees this, he can't kill me anyway. (and he should kill dfaure first) +void tqt_enter_modal( TQWidget *widget ); +void tqt_leave_modal( TQWidget *widget ); + + +bool KHTMLReader::filter(KURL url) +{ + kdDebug(30503) << "KHTMLReader::filter" << endl; + TQObject::connect(_html,TQT_SIGNAL(completed()),this,TQT_SLOT(completed())); + + _state.clear(); + _list_depth=0; + + _html->view()->resize(600,530); + _html->setAutoloadImages(false); + _html->setJScriptEnabled(false); + _html->setPluginsEnabled(false); + _html->setJavaEnabled(false); + _html->setMetaRefreshEnabled(false); + if (_html->openURL(url) == false) + { + kdWarning(30503) << "openURL returned false" << endl; + return false; + } + + //FIXME use synchronous IO instead of this hack if possible. + TQWidget dummy(0,0,WType_Dialog | WShowModal); + tqt_enter_modal(&dummy); + tqApp->enter_loop(); + tqt_leave_modal(&dummy); + return _it_worked; +} + +HTMLReader_state *KHTMLReader::state() +{ + if (_state.count() == 0) + { + HTMLReader_state *s=new HTMLReader_state; + s->frameset=_writer->mainFrameset(); + s->paragraph = _writer->addParagraph(s->frameset); + s->format=_writer->currentFormat(s->paragraph,true); + s->layout=_writer->currentLayout(s->paragraph); + s->in_pre_mode = false; + _state.push(s); + } + return _state.top(); +} + +HTMLReader_state *KHTMLReader::pushNewState() +{ + HTMLReader_state *s=new HTMLReader_state; + s->frameset=state()->frameset; + s->paragraph=state()->paragraph; + s->format=state()->format; + s->layout=state()->layout; + s->in_pre_mode=state()->in_pre_mode; + _writer->cleanUpParagraph(s->paragraph); + _state.push(s); + return s; +} + + +void KHTMLReader::popState() +{ + kdDebug(30503) << "Entering popState" << endl; + + HTMLReader_state *s=_state.pop(); + + /** + the recursion trough html is somewhat clumsy still, i'm working on a better method. + popState gets called when a tag is closed, but since a closed tag doesn't mean the end + of a (kword) "tag" we have to copy some things over from the closed tag: + - the paragraph (after a , we still are in the same paragraph, but + inside the , there might have been a
) + if we go back into another frameset, we start a new paragraph. + **/ + if (s->frameset == state()->frameset) + { + state()->paragraph=s->paragraph; + if ((state()->layout != s->layout)) + { + if (_writer->getText(state()->paragraph).length()!=0) startNewLayout(false,state()->layout); + } + state()->format=_writer->startFormat(state()->paragraph, state()->format); + } + delete(s); +} + +void KHTMLReader::startNewLayout(bool startNewFormat) +{ + TQDomElement layout; + startNewLayout(startNewFormat,layout); +} + +void KHTMLReader::startNewLayout(bool startNewFormat, TQDomElement layout) +{ + kdDebug() << "entering startNewLayout" << endl; + startNewParagraph(startNewFormat,true); + state()->layout=_writer->setLayout(state()->paragraph,layout); +} + +void KHTMLReader::completed() +{ + kdDebug(30503) << "KHTMLReader::completed" << endl; + tqApp->exit_loop(); + DOM::Document doc=_html->document(); // FIXME parse too + DOM::NodeList list=doc.getElementsByTagName("body"); + DOM::Node docbody=list.item(0); + + if (docbody.isNull()) + { + kdWarning(30503) << "no , giving up" << endl; + _it_worked=false; + return; + } + + + parseNode(docbody); // start here (keyword: main) + + list = doc.getElementsByTagName("head"); + DOM::Node dochead=list.item(0); + if (!dochead.isNull()) + parse_head(dochead); + else + kdWarning(30503) << "WARNING: no html section" << endl; + + _writer->cleanUpParagraph(state()->paragraph); + _it_worked=_writer->writeDoc(); +} + + +void KHTMLReader::parseNode(DOM::Node node) +{ + kdDebug(30503) << "Entering parseNode" << endl; + // check if this is a text node. + DOM::Text t=node; + if (!t.isNull()) + { + _writer->addText(state()->paragraph,t.data().string(),1,state()->in_pre_mode); + return; // no children anymore... + } + + // is this really needed ? it can't do harm anyway. + state()->format=_writer->currentFormat(state()->paragraph,true); + state()->layout=_writer->currentLayout(state()->paragraph); + pushNewState(); + + DOM::Element e=node; + + bool go_recursive=true; + + if (!e.isNull()) + { + // get the CSS information + parseStyle(e); + // get the tag information + go_recursive=parseTag(e); + } + if (go_recursive) + { + for (DOM::Node q=node.firstChild(); !q.isNull(); q=q.nextSibling()) + { + parseNode(q); + } + } + popState(); +} + +void KHTMLReader::parse_head(DOM::Element e) +{ + for (DOM::Element items=e.firstChild();!items.isNull();items=items.nextSibling()) { + if (items.tagName().string().lower() == "title") { + DOM::Text t=items.firstChild(); + if (!t.isNull()) { + _writer->createDocInfo("HTML import filter",t.data().string()); + } + } + } +} + +#define _PF(x,a,b,c) { \ + if (e.tagName().lower() == #x) \ + { \ + _writer->formatAttribute(state()->paragraph, #a,#b,#c); \ + return true; \ + } \ + } + +// the state->layout=_writer->setLayout is meant to tell popState something changed in the layout, and a new +// layout should probably be started after closing. + +#define _PL(x,a,b,c) { \ + if (e.tagName().lower() == #x) \ + { \ + state()->layout=_writer->setLayout(state()->paragraph,state()->layout);\ + if (!(_writer->getText(state()->paragraph).isEmpty())) \ + startNewParagraph(false,false); \ + _writer->layoutAttribute(state()->paragraph, #a,#b,#c); \ + return true; \ + } \ + } + + +bool KHTMLReader::parseTag(DOM::Element e) +{ + kdDebug(30503) << "Entering parseTag for " << e.tagName().lower() << endl; + if (e.tagName().lower()=="a") { return parse_a(e); } + if (e.tagName().lower()=="p") { return parse_p(e); } + if (e.tagName().lower()=="br") { return parse_br(e); } + if (e.tagName().lower()=="ul") { return parse_ul(e); } + if (e.tagName().lower()=="ol") { return parse_ol(e); } + if (e.tagName().lower()=="hr") { return parse_hr(e); } + if (e.tagName().lower()=="pre") { return parse_pre(e); } + if (e.tagName().lower()=="font") { return parse_font(e); } + if (e.tagName().lower()=="table") { return parse_table(e); } + + // FIXME we can get rid of these, make things tons more simple + // when tdehtml finally implements getComputedStyle + _PF(b,WEIGHT,value,75); + _PF(strong,WEIGHT,value,75); + _PF(u,UNDERLINE,value,1); + _PF(i,ITALIC,value,1); + + _PL(center,FLOW,align,center); + _PL(right,FLOW,align,right); + _PL(left,FLOW,align,left); + + _PL(h1,NAME,value,h1); + _PL(h2,NAME,value,h2); + _PL(h3,NAME,value,h3); + _PL(h4,NAME,value,h4); + _PL(h5,NAME,value,h5); + _PL(h6,NAME,value,h6); + kdDebug(30503) << "Leaving parseTag" << endl; + + // Don't handle the content of comment- or script-nodes. + if(e.nodeType() == DOM::Node::COMMENT_NODE || e.tagName().lower() == "script") + { + return false; + } + + return true; +} + +void KHTMLReader::startNewParagraph(bool startnewformat, bool startnewlayout) +{ + kdDebug() << "Entering startNewParagraph" << endl; + + TQDomElement qf=state()->format; + TQDomElement ql=state()->layout; + + _writer->cleanUpParagraph(state()->paragraph); + + if ((startnewlayout==true) || ql.isNull()) + {state()->paragraph=_writer->addParagraph(state()->frameset);} + else + {state()->paragraph= + _writer->addParagraph(state()->frameset,state()->layout);} + + + + if (qf.isNull() || (startnewformat==true)) + { + state()->format=_writer->startFormat(state()->paragraph/*,state()->format*/); + } + else + { + state()->format=_writer->startFormat(state()->paragraph,qf); + } + + /** + support lists: if we are in a list, and we start a new paragraph, + we don't want to start a new item, but we want to retain the list state. + we do this by incrementing the 'environment depth' and changing the numbering type to 'no numbering' + **/ + TQString ct=_writer->getLayoutAttribute(state()->paragraph,"COUNTER","type"); + if ((!ct.isNull()) && (ct != "0")) + { + _writer->layoutAttribute(state()->paragraph,"COUNTER","type","0"); + _writer->layoutAttribute(state()->paragraph,"COUNTER","numberingtype","0"); + _writer->layoutAttribute(state()->paragraph,"COUNTER","righttext",""); + int currdepth=(_writer->getLayoutAttribute(state()->paragraph,"COUNTER","depth")).toInt(); + _writer->layoutAttribute(state()->paragraph,"COUNTER","depth",TQString("%1").arg(currdepth+1)); + } +} + +KHTMLReader::~KHTMLReader(){ + delete _html; +} + + + + + + +//============================================================== +// tag parsing +//============================================================== + + +bool KHTMLReader::parse_CommonAttributes(DOM::Element e) +{ + kdDebug(30503) << "entering KHTMLReader::parse_CommonAttributes" << endl; + kdDebug(30503) << "tagName is " << e.tagName().string() << endl; + TQString s=e.getAttribute("align").string(); + if (!s.isEmpty()) + { + _writer->formatAttribute(state()->paragraph,"FLOW","align",s); + } + TQRegExp rx( "h[0-9]+" ); + if ( 0 == rx.search( e.getAttribute("class").string() ) ) + // example:

+ { + kdDebug(30503) << "laying out with " << e.getAttribute("class").string() << endl; + _writer->layoutAttribute(state()->paragraph,"NAME","value",e.getAttribute("class").string()); + } + if ( e.getAttribute("class").string()=="Standard" ) + { + kdDebug(30503) << "laying out with " << e.getAttribute("class").string() << endl; + _writer->layoutAttribute(state()->paragraph,"NAME","value",e.getAttribute("class").string()); + } + kdDebug(30503) << "leaving parse_CommonAttributes" << endl; + return true; +} + +bool KHTMLReader::parse_a(DOM::Element e) { + TQString url = e.getAttribute("href").string(); + if (!url.isEmpty()) + { + TQString linkName; + DOM::Text t = e.firstChild(); + if (t.isNull()) { + /* Link without text -> just drop it*/ + return false; /* stop parsing recursively */ + } + linkName = t.data().string().simplifyWhiteSpace(); + t.setData(DOM::DOMString("#")); // replace with '#' + _writer->createLink(state()->paragraph, linkName, url); + } + return true; /* stop parsing recursively */ +} + +bool KHTMLReader::parse_p(DOM::Element e) +{ + // For every starting paragraph, a line break has to be inserted. + // exception: the first paragraph, e.g. if the starts with a

. + kdDebug() << "entering parse_p" << endl; + if (!(_writer->getText(state()->paragraph).isEmpty())) + startNewParagraph(false,false); + parse_CommonAttributes(e); + kdDebug() << "leaving parse_p" << endl; + return true; +} + +bool KHTMLReader::parse_hr(DOM::Element /*e*/) +{ + startNewParagraph(); + _writer->createHR(state()->paragraph); + startNewParagraph(); + return true; +} + +bool KHTMLReader::parse_br(DOM::Element /*e*/) +{ + startNewParagraph(false,false); //keep the current format and layout + return false; // a BR tag has no childs. +} + +static const TQColor parsecolor(const TQString& colorstring) +{ + TQColor color; + if (colorstring[0]=='#') + { + color.setRgb( + colorstring.mid(1,2).toInt(0,16), + colorstring.mid(3,2).toInt(0,16), + colorstring.mid(5,2).toInt(0,16) + ); + } + else + { + TQString colorlower=colorstring.lower(); + // Grays + if (colorlower=="black") + color.setRgb(0,0,0); + else if (colorlower=="white") + color.setRgb(255,255,255); + else if (colorlower=="silver") + color.setRgb(0xc0,0xc0,0xc0); + else if (colorlower=="gray") + color.setRgb(128,128,128); + // "full" colors + else if (colorlower=="red") + color.setRgb(255,0,0); + else if (colorlower=="lime") + color.setRgb(0,255,0); + else if (colorlower=="blue") + color.setRgb(0,0,255); + else if (colorlower=="yellow") + color.setRgb(255,255,0); + else if (colorlower=="fuchsia") + color.setRgb(255,0,255); + else if (colorlower=="aqua") + color.setRgb(0,255,255); + // "half" colors + else if (colorlower=="maroon") + color.setRgb(128,0,0); + else if (colorlower=="green") + color.setRgb(0,128,0); + else if (colorlower=="navy") + color.setRgb(0,0,128); + else if (colorlower=="olive") + color.setRgb(128,128,0); + else if (colorlower=="purple") + color.setRgb(128,0,128); + else if (colorlower=="teal") + color.setRgb(0,128,128); + else + { + // H'm, we have still not found the color! + // Let us see if QT can do better! + color.setNamedColor(colorstring); + } + } + return colorstring; +} + +void KHTMLReader::parseStyle(DOM::Element e) +{ + // styles are broken broken broken broken broken broken. + //FIXME: wait until getComputedStyle is more than + // 'return 0' in tdehtml + kdDebug(30503) << "entering parseStyle" << endl; + DOM::CSSStyleDeclaration s1=e.style(); + DOM::Document doc=_html->document(); + DOM::CSSStyleDeclaration s2=doc.defaultView().getComputedStyle(e,""); + kdDebug(30503) << "font-weight=" << s1.getPropertyValue("font-weight").string() << endl; + if ( s1.getPropertyValue("font-weight").string() == "bolder" ) + { + _writer->formatAttribute(state()->paragraph,"WEIGHT","value","75"); + } + if ( s1.getPropertyValue("font-weight").string() == "bold" ) + { + _writer->formatAttribute(state()->paragraph,"WEIGHT","value","75"); + } + + // process e.g. + if ( s1.getPropertyValue("color").string() != TQString() ) + { + TQColor c=parsecolor(s1.getPropertyValue("color").string()); + _writer->formatAttribute(state()->paragraph,"COLOR","red",TQString::number(c.red())); + _writer->formatAttribute(state()->paragraph,"COLOR","green",TQString::number(c.green())); + _writer->formatAttribute(state()->paragraph,"COLOR","blue",TQString::number(c.blue())); + } + // done + // process e.g. + if ( s1.getPropertyValue("font-size").string() != TQString() ) + { + TQString size=s1.getPropertyValue("font-size").string(); + if (size.endsWith("pt")) + { + size=size.left(size.length()-2); + } + _writer->formatAttribute(state()->paragraph,"SIZE","value",size); + } + // done + // process e.g. this is in the center + if ( s1.getPropertyValue("text-align").string() != TQString() && s1.getPropertyValue("text-align").string() != TQString("left") ) + { + state()->layout=_writer->setLayout(state()->paragraph,state()->layout); + _writer->layoutAttribute(state()->paragraph, "FLOW","align",s1.getPropertyValue("text-align").string()); + } + // done + + /*if (DOM::PROPV("font-weight") == "bolder") + _writer->formatAttribute(state()->paragraph,"WEIGHT","value","75"); + */ +/* + // debugging code. + kdDebug(30503) << "e.style()" << endl; + for (unsigned int i=0;iisInTable()) { + // We are already inside of a table. Tables in tables are not supported + // yet. So, just add that table-content as text. + for (DOM::Node rows=e.firstChild().firstChild();!rows.isNull();rows=rows.nextSibling()) + if (!rows.isNull() && rows.nodeName().string().lower() == "tr") + for (DOM::Node cols=rows.firstChild();!cols.isNull();cols=cols.nextSibling()) + if (!cols.isNull()) + parseNode(cols); + return false; + } + + DOM::Element table_body=e.firstChild(); + if(table_body.isNull()) { + // If the table_body is empty, we don't continue cause else + // KHTML will throw a DOM::DOMException if we try to access + // the null element. + return true; + } + + int tableno=_writer->createTable(); + int nrow=0; + int ncol=0; + bool has_borders=false; + TQColor bgcolor=parsecolor("#FFFFFF"); + + if (!table_body.getAttribute("bgcolor").string().isEmpty()) + bgcolor=parsecolor(table_body.getAttribute("bgcolor").string()); + if ((e.getAttribute("border").string().toInt() > 0)) + has_borders=true; + + // fixme rewrite this proper + //(maybe using computed sizes from tdehtml if thats once exported) + for (DOM::Node rowsnode=table_body.firstChild();!rowsnode.isNull();rowsnode=rowsnode.nextSibling()) { + DOM::Element rows = rowsnode; + if (!rows.isNull() && rows.tagName().string().lower() == "tr") { + TQColor obgcolor=bgcolor; + if (!rows.getAttribute("bgcolor").string().isEmpty()) + bgcolor=parsecolor(rows.getAttribute("bgcolor").string()); + + ncol=0; + for (DOM::Node colsnode=rows.firstChild();!colsnode.isNull();colsnode=colsnode.nextSibling()) { + DOM::Element cols = colsnode; + const TQString nodename = cols.isNull() ? TQString() : cols.nodeName().string().lower(); + if (nodename == "td" || nodename == "th") { + TQColor bbgcolor=bgcolor; + if (!cols.getAttribute("bgcolor").string().isEmpty()) + bgcolor=parsecolor(cols.getAttribute("bgcolor").string()); + + pushNewState(); + TQRect colrect=cols.getRect(); + state()->frameset=_writer->createTableCell(tableno,nrow,ncol,1,colrect); + state()->frameset.firstChild().toElement().setAttribute("bkRed",bgcolor.red()); + state()->frameset.firstChild().toElement().setAttribute("bkGreen",bgcolor.green()); + state()->frameset.firstChild().toElement().setAttribute("bkBlue",bgcolor.blue()); + if (has_borders) { + state()->frameset.firstChild().toElement().setAttribute("lWidth",1); + state()->frameset.firstChild().toElement().setAttribute("rWidth",1); + state()->frameset.firstChild().toElement().setAttribute("bWidth",1); + state()->frameset.firstChild().toElement().setAttribute("tWidth",1); + } + + // fixme don't guess. get it right. + state()->paragraph=_writer->addParagraph(state()->frameset); + parseNode(cols); + _writer->cleanUpParagraph(state()->paragraph); + popState(); + ncol++; + bgcolor=bbgcolor; + } + } + nrow++; + bgcolor=obgcolor; + } + } + _writer->finishTable(tableno/*,0,0,r.right()-r.left(),r.bottom()-r.top()*/); // FIXME find something better. + startNewParagraph(false,false); + _writer->createInline(state()->paragraph,_writer->fetchTableCell(tableno,0,0)); + startNewParagraph(false,false); + return false; // we do our own recursion +} + +bool KHTMLReader::parse_img(DOM::Element /*e*/) +{ + //TQRect e=e.getRect(); + return true; +} + +bool KHTMLReader::parse_pre(DOM::Element e) +{ +#if 0 // see Bug #74601 (normal): kword doesn't recognize PRE-tags in HTML + //pushNewState(); + /// \todo set fixed width font + DOM::HTMLElement htmlelement(e); + if(! htmlelement.isNull()) + _writer->addText(state()->paragraph,htmlelement.innerHTML().string(),1); + startNewParagraph(); + //popState(); + return false; // children are already handled. +#else + pushNewState(); + state()->in_pre_mode=true; + TQString face=e.getAttribute("face").string(); + _writer->formatAttribute(state()->paragraph,"FONT","name",TQString("Courier")); + for (DOM::Node q=e.firstChild(); !q.isNull(); q=q.nextSibling()) + { + parseNode(q); // parse everything... + } + popState(); + _writer->formatAttribute(state()->paragraph,"FONT","name",face); + return false; // children are already handled. +#endif +} + +bool KHTMLReader::parse_ol(DOM::Element e) +{ + return parse_ul(e); +} + +bool KHTMLReader::parse_font(DOM::Element e) +{ + kdDebug(30503) << "Entering parse_font" << endl; + // fixme don't hardcode 12 font size ... + TQString face=e.getAttribute("face").string(); + TQColor color=parsecolor("#000000"); + if (!e.getAttribute("color").string().isEmpty()) + color=parsecolor(e.getAttribute("color").string()); + TQString size=e.getAttribute("size").string(); + int isize=-1; + if (size.startsWith("+")) + isize=12+size.right(size.length()-1).toInt(); + else if (size.startsWith("-")) + isize=12-size.right(size.length()-1).toInt(); + else + isize=12+size.toInt(); + + _writer->formatAttribute(state()->paragraph,"FONT","name",face); + if ((isize>=0) && (isize != 12)) + _writer->formatAttribute(state()->paragraph,"SIZE","value",TQString("%1").arg(isize)); + + _writer->formatAttribute(state()->paragraph,"COLOR","red",TQString("%1").arg(color.red())); + _writer->formatAttribute(state()->paragraph,"COLOR","green",TQString("%1").arg(color.green())); + _writer->formatAttribute(state()->paragraph,"COLOR","blue",TQString("%1").arg(color.blue())); + return true; +} + +bool KHTMLReader::parse_ul(DOM::Element e) +{ +// Parse the tag ul and all its subnodes. Take special care for the li tag. + kdDebug(30503) << "Entering KHTMLReader::parse_ul" << endl; + kdDebug(30503) << "_writer->getText(state()->paragraph)=" << _writer->getText(state()->paragraph) << endl; + _list_depth++; + if (e.firstChild().nodeName().string().lower() == "#text") // e.g.

    this is indented
  • first listitem
+ { + _writer->layoutAttribute(state()->paragraph,"COUNTER","depth",TQString("%1").arg(_list_depth-1)); // indent + startNewLayout(); + } + for (DOM::Node items=e.firstChild();!items.isNull();items=items.nextSibling()) + { + if (items.nodeName().string().lower() == "li") + { + if (!(_writer->getText(state()->paragraph).isEmpty())) startNewLayout(); + _writer->layoutAttribute(state()->paragraph,"COUNTER","numberingtype","1"); + _writer->layoutAttribute(state()->paragraph,"COUNTER","righttext","."); + if (e.tagName().string().lower() == "ol") + { + _writer->layoutAttribute(state()->paragraph,"COUNTER","type","1"); + _writer->layoutAttribute(state()->paragraph,"COUNTER","numberingtype","1"); + _writer->layoutAttribute(state()->paragraph,"COUNTER","righttext","."); + } + else + { + _writer->layoutAttribute(state()->paragraph,"COUNTER","type","10"); + _writer->layoutAttribute(state()->paragraph,"COUNTER","numberingtype",""); + _writer->layoutAttribute(state()->paragraph,"COUNTER","righttext",""); + } + _writer->layoutAttribute(state()->paragraph,"COUNTER","depth",TQString("%1").arg(_list_depth-1)); // indent + } + parseNode(items); + } + _list_depth--; + kdDebug(30503) << "Leaving KHTMLReader::parse_ul" << endl; + return false; +} + diff --git a/filters/kword/html/import/tdehtmlreader.h b/filters/kword/html/import/tdehtmlreader.h new file mode 100644 index 00000000..bee84c60 --- /dev/null +++ b/filters/kword/html/import/tdehtmlreader.h @@ -0,0 +1,103 @@ +/*************************************************************************** + tdehtmlreader.h - description + ------------------- + begin : Sun Sep 9 2001 + copyright : (C) 2001 by Frank Dekervel + email : Frank.Dekervel@student.kuleuven.ac.be + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU Lesser General Public License as * + * published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef KHTMLREADER_H +#define KHTMLREADER_H + +#include // fixme speedup compile time by moving these into the cpp file. +#include +#include +#include + +//#include + +/** + *@author Frank Dekervel + */ + +namespace DOM { + class Node; + class Element; +} + +struct HTMLReader_state { + TQDomElement format; + TQDomElement frameset; + TQDomElement paragraph; + TQDomElement layout; + bool in_pre_mode; // keep formatting as is. +}; + +class KHTMLReader: public TQObject { + +Q_OBJECT + + +public: + KHTMLReader(KWDWriter *writer); + ~KHTMLReader(); + + bool filter(KURL url); + +private slots: + void completed(); + +private: + void parseNode(DOM::Node n); + bool parseTag(DOM::Element e); + void parseStyle(DOM::Element e); + void parse_head(DOM::Element e); + HTMLReader_state *state(); + HTMLReader_state *pushNewState(); + void popState(); + + + /* void stateSetFormat(TQDomElement f); + void stateSetFrameset(TQDomElement f); + void stateSetLayout(TQDomElement l); + void stateSetParagraph(TQDomElement p);*/ + + TQPtrStack _state; + KHTMLPart *_html; + KWDWriter *_writer; + + void startNewLayout(bool startNewFormat=false); + void startNewLayout(bool startNewFormat, TQDomElement layout); + void startNewParagraph(bool startnewformat=true, bool startnewlayout=true); + bool _it_worked; +// ----------------------------------------------------- + int _list_depth; +// ----------------------------------------------------- + bool parse_CommonAttributes(DOM::Element e); + bool parse_a(DOM::Element e); + bool parse_p(DOM::Element e); + bool parse_br(DOM::Element e); + bool parse_table(DOM::Element e); + bool parse_pre(DOM::Element e); + bool parse_font(DOM::Element e); + bool parse_ol(DOM::Element e); + bool parse_ul(DOM::Element e); + bool parse_hr(DOM::Element e); + bool parse_img(DOM::Element e); + + +// ------------------------------------------------------- + +}; + +#endif diff --git a/filters/kword/html/status.html b/filters/kword/html/status.html index b2587f2f..96fdfb1f 100644 --- a/filters/kword/html/status.html +++ b/filters/kword/html/status.html @@ -52,7 +52,7 @@ - Crude!
- HTML: basic formatting, simple tables.
- No stylesheets yet, no table size calculating yet
- - uses khtml
+ - uses tdehtml
@@ -62,7 +62,7 @@ - <font>
- table size calculation
- images
- - implement CSS2, integrate with khtml's css implementation
+ - implement CSS2, integrate with tdehtml's css implementation
- many other tags
@@ -91,7 +91,7 @@ HTML 4.01
XHTML 1.0
Cascaded Style Sheets Level 2 (CSS2)
- KHTML Documentation
+ KHTML Documentation
diff --git a/filters/kword/latex/export/Makefile.am b/filters/kword/latex/export/Makefile.am index 83ec0683..21328967 100644 --- a/filters/kword/latex/export/Makefile.am +++ b/filters/kword/latex/export/Makefile.am @@ -20,7 +20,7 @@ libkwordlatexexport_la_SOURCES = anchor.cc config.cc document.cc element.cc file #check_PROGRAMS = texlauncher #texlauncher_SOURCES = texlauncher.cc #texlauncher_LDADD = liblatexexport.la -#texlauncher_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -lktexteditor +#texlauncher_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor METASOURCES = AUTO diff --git a/filters/kword/latex/import/Makefile.am b/filters/kword/latex/import/Makefile.am index 6f91f004..34d0d8a4 100644 --- a/filters/kword/latex/import/Makefile.am +++ b/filters/kword/latex/import/Makefile.am @@ -19,7 +19,7 @@ noinst_HEADERS = config.h lateximport.h lateximportdia.h #check_PROGRAMS = texlauncher #texlauncher_SOURCES = texlauncher.cc #texlauncher_LDADD = liblatexexport.la -#texlauncher_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -lktexteditor +#texlauncher_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor METASOURCES = AUTO diff --git a/filters/kword/latex/import/parser/Makefile.am b/filters/kword/latex/import/parser/Makefile.am index b6352c75..01fcec66 100644 --- a/filters/kword/latex/import/parser/Makefile.am +++ b/filters/kword/latex/import/parser/Makefile.am @@ -25,7 +25,7 @@ texscaner.cc: $(srcdir)/texscaner.y check_PROGRAMS = texlauncher texlauncher_SOURCES = texlauncher.cc texlauncher_LDADD = liblatexexport.la -texlauncher_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -lktexteditor +texlauncher_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor METASOURCES = AUTO diff --git a/filters/kword/msword/Makefile.am b/filters/kword/msword/Makefile.am index deb88875..c0b7be5d 100644 --- a/filters/kword/msword/Makefile.am +++ b/filters/kword/msword/Makefile.am @@ -8,7 +8,7 @@ kde_module_LTLIBRARIES = libmswordimport.la libmswordimport_la_SOURCES = mswordimport.cpp document.cpp conversion.cpp \ texthandler.cpp tablehandler.cpp graphicshandler.cpp -libmswordimport_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -lkparts +libmswordimport_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -ltdeparts libmswordimport_la_LIBADD = $(KOFFICE_LIBS) $(LIBWV2_LIBS) METASOURCES = AUTO diff --git a/filters/kword/mswrite/Makefile.am b/filters/kword/mswrite/Makefile.am index 596315fe..cb42ef9d 100644 --- a/filters/kword/mswrite/Makefile.am +++ b/filters/kword/mswrite/Makefile.am @@ -9,12 +9,12 @@ kde_module_LTLIBRARIES = libmswriteimport.la libmswriteexport.la libmswriteimport_la_SOURCES = mswriteimport.cc \ libmswrite_defs.cpp structures_generated.cpp structures_private.cpp structures.cpp libmswrite.cpp ImportDialogUI.ui ImportDialog.cc -libmswriteimport_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -lkparts +libmswriteimport_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -ltdeparts libmswriteimport_la_LIBADD = $(KOFFICE_LIBS) libmswriteexport_la_SOURCES = mswriteexport.cc \ libmswrite_defs.cpp structures_generated.cpp structures_private.cpp structures.cpp libmswrite.cpp -libmswriteexport_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -lkparts +libmswriteexport_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -ltdeparts libmswriteexport_la_LIBADD = $(KOFFICE_LIBS) $(LIB_KOWMF) ../libexport/libkwordexportfilters.la noinst_HEADERS = mswriteimport.h mswriteexport.h \ diff --git a/filters/kword/pdf/Makefile.am b/filters/kword/pdf/Makefile.am index afcf4431..73e838cf 100644 --- a/filters/kword/pdf/Makefile.am +++ b/filters/kword/pdf/Makefile.am @@ -9,7 +9,7 @@ kde_module_LTLIBRARIES = libpdfimport.la libpdfimport_la_SOURCES = misc.cpp transform.cpp data.cpp fstring.cpp \ FilterPage.cpp FilterDevice.cpp \ pdfdocument.cpp dialog.cpp pdfimport.cpp -libpdfimport_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -lkparts +libpdfimport_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -ltdeparts libpdfimport_la_LIBADD = $(KOFFICE_LIBS) $(LIBPAPER) ./xpdf/xpdf/libxpdf.la ./xpdf/goo/libgoo.la METASOURCES = dialog.moc pdfimport.moc diff --git a/filters/xsltfilter/export/Makefile.am b/filters/xsltfilter/export/Makefile.am index d5bb41e1..ee6caaa5 100644 --- a/filters/xsltfilter/export/Makefile.am +++ b/filters/xsltfilter/export/Makefile.am @@ -8,7 +8,7 @@ INCLUDES= -I$(srcdir) $(KOFFICE_INCLUDES) $(all_includes) $(LIBXML_CFLAGS) $(LIB kde_module_LTLIBRARIES = libxsltexport.la libxsltexport_la_SOURCES = xsltexport.cc xsltexportdia.cc xsltproc.cc xsltdialog.ui -libxsltexport_la_LDFLAGS = $(KDE_RPATH) $(LIBXML_RPATH) $(LIBXSLT_RPATH) $(all_libraries) -module $(KDE_PLUGIN) $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -lkparts +libxsltexport_la_LDFLAGS = $(KDE_RPATH) $(LIBXML_RPATH) $(LIBXSLT_RPATH) $(all_libraries) -module $(KDE_PLUGIN) $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -ltdeparts libxsltexport_la_LIBADD = $(KOFFICE_LIBS) $(LIBXSLT_LIBS) $(LIBXML_LIBS) noinst_HEADERS = xsltexport.h xsltexportdia.h xsltproc.h diff --git a/filters/xsltfilter/import/Makefile.am b/filters/xsltfilter/import/Makefile.am index c1e58a4c..01f90229 100644 --- a/filters/xsltfilter/import/Makefile.am +++ b/filters/xsltfilter/import/Makefile.am @@ -7,7 +7,7 @@ INCLUDES= -I$(srcdir) $(KOFFICE_INCLUDES) $(all_includes) $(LIBXML_CFLAGS) $(LI kde_module_LTLIBRARIES = libxsltimport.la libxsltimport_la_SOURCES = xsltimport.cc xsltimportdia.cc xsltproc.cc xsltdialog.ui -libxsltimport_la_LDFLAGS = $(KDE_RPATH) $(LIBXML_RPATH) $(LIBXSLT_RPATH) $(all_libraries) -module $(KDE_PLUGIN) $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -lkparts +libxsltimport_la_LDFLAGS = $(KDE_RPATH) $(LIBXML_RPATH) $(LIBXSLT_RPATH) $(all_libraries) -module $(KDE_PLUGIN) $(all_libraries) -ltdecore -ltdeui $(LIB_QT) -lkjs -ltdefx -lkio -ltdeparts libxsltimport_la_LIBADD = $(KOFFICE_LIBS) $(LIBXSLT_LIBS) $(LIBXML_LIBS) noinst_HEADERS = xsltimport.h xsltimportdia.h xsltproc.h -- cgit v1.2.1