From f008adb5a77e094eaf6abf3fc0f36958e66896a5 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 25 Jun 2011 05:28:35 +0000 Subject: [PATCH] TQt4 port koffice This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- example/example_factory.cc | 10 +- example/example_factory.h | 5 +- example/example_part.cc | 30 +- example/example_part.h | 17 +- example/example_view.cc | 18 +- example/example_view.h | 7 +- filters/generic_wrapper/generic_filter.cc | 26 +- filters/generic_wrapper/generic_filter.h | 17 +- filters/karbon/ai/ai88handler.cc | 34 +- filters/karbon/ai/aicolor.h | 2 +- filters/karbon/ai/aielement.cc | 190 +- filters/karbon/ai/aielement.h | 56 +- filters/karbon/ai/aiimport.cc | 26 +- filters/karbon/ai/aiimport.h | 11 +- filters/karbon/ai/ailexer.cc | 24 +- filters/karbon/ai/ailexer.h | 12 +- filters/karbon/ai/aiparserbase.cc | 156 +- filters/karbon/ai/aiparserbase.h | 52 +- filters/karbon/ai/karbonaiparserbase.cc | 14 +- filters/karbon/ai/karbonaiparserbase.h | 22 +- .../applixgraphics/applixgraphicimport.cc | 78 +- .../applixgraphics/applixgraphicimport.h | 7 +- filters/karbon/eps/epsexport.cc | 54 +- filters/karbon/eps/epsexport.h | 9 +- filters/karbon/eps/epsexportdlg.cc | 28 +- filters/karbon/eps/epsexportdlg.h | 11 +- filters/karbon/eps/epsimport.cc | 28 +- filters/karbon/eps/epsimport.h | 11 +- filters/karbon/eps/pscommentlexer.cc | 28 +- filters/karbon/eps/pscommentlexer.h | 10 +- filters/karbon/kontour/kontourimport.cpp | 52 +- filters/karbon/kontour/kontourimport.h | 15 +- filters/karbon/msod/msod.cc | 402 +- filters/karbon/msod/msod.h | 186 +- filters/karbon/msod/msodimport.cc | 132 +- filters/karbon/msod/msodimport.h | 31 +- filters/karbon/oodraw/oodrawimport.cc | 276 +- filters/karbon/oodraw/oodrawimport.h | 47 +- filters/karbon/png/pngexport.cc | 32 +- filters/karbon/png/pngexport.h | 5 +- filters/karbon/svg/color.h | 4 +- filters/karbon/svg/svgexport.cc | 80 +- filters/karbon/svg/svgexport.h | 29 +- filters/karbon/svg/svggraphiccontext.h | 10 +- filters/karbon/svg/svgimport.cc | 280 +- filters/karbon/svg/svgimport.h | 65 +- filters/karbon/wmf/wmfexport.cc | 24 +- filters/karbon/wmf/wmfexport.h | 19 +- filters/karbon/wmf/wmfimport.cc | 12 +- filters/karbon/wmf/wmfimport.h | 5 +- filters/karbon/wmf/wmfimportparser.cc | 56 +- filters/karbon/wmf/wmfimportparser.h | 48 +- filters/karbon/xaml/color.h | 4 +- filters/karbon/xaml/xamlexport.cc | 60 +- filters/karbon/xaml/xamlexport.h | 23 +- filters/karbon/xaml/xamlgraphiccontext.h | 6 +- filters/karbon/xaml/xamlimport.cc | 234 +- filters/karbon/xaml/xamlimport.h | 55 +- filters/karbon/xcf/xcfexport.cc | 244 +- filters/karbon/xcf/xcfexport.h | 9 +- filters/karbon/xfig/xfigimport.cc | 144 +- filters/karbon/xfig/xfigimport.h | 25 +- filters/karbon/xfig/xfigimport_factory.cc | 16 +- filters/karbon/xfig/xfigimport_factory.h | 5 +- filters/kchart/bmp/bmpexport.cpp | 8 +- filters/kchart/bmp/bmpexport.h | 5 +- filters/kchart/jpeg/jpegexport.cpp | 8 +- filters/kchart/jpeg/jpegexport.h | 5 +- filters/kchart/libimageexport/imageexport.cpp | 18 +- filters/kchart/libimageexport/imageexport.h | 11 +- filters/kchart/mng/mngexport.cpp | 8 +- filters/kchart/mng/mngexport.h | 5 +- filters/kchart/png/pngexport.cpp | 8 +- filters/kchart/png/pngexport.h | 5 +- filters/kchart/svg/svgexport.cc | 20 +- filters/kchart/svg/svgexport.h | 5 +- filters/kchart/xbm/xbmexport.cpp | 8 +- filters/kchart/xbm/xbmexport.h | 5 +- filters/kchart/xpm/xpmexport.cpp | 8 +- filters/kchart/xpm/xpmexport.h | 5 +- filters/kformula/latex/latexexport.cc | 24 +- filters/kformula/latex/latexexport.h | 9 +- filters/kformula/mathml/mathmlexport.cc | 24 +- filters/kformula/mathml/mathmlexport.h | 9 +- filters/kformula/mathml/mathmlimport.cc | 26 +- filters/kformula/mathml/mathmlimport.h | 13 +- filters/kformula/png/pngexport.cc | 14 +- filters/kformula/png/pngexport.h | 9 +- filters/kformula/png/pngexportdia.cc | 124 +- filters/kformula/png/pngexportdia.h | 15 +- filters/kformula/svg/svgexport.cc | 20 +- filters/kformula/svg/svgexport.h | 5 +- .../kivio/imageexport/kivio_imageexport.cpp | 42 +- filters/kivio/imageexport/kivio_imageexport.h | 5 +- .../imageexport/kivio_imageexportdialog.cpp | 12 +- .../imageexport/kivio_imageexportdialog.h | 7 +- .../imageexport/kivio_imageexportwidget.ui | 24 +- filters/kpresenter/bmp/bmpexport.cpp | 8 +- filters/kpresenter/bmp/bmpexport.h | 5 +- filters/kpresenter/jpeg/jpegexport.cpp | 8 +- filters/kpresenter/jpeg/jpegexport.h | 5 +- filters/kpresenter/kword/kprkword.cc | 166 +- filters/kpresenter/kword/kprkword.h | 17 +- .../kpresenter/libimageexport/imageexport.cpp | 20 +- .../kpresenter/libimageexport/imageexport.h | 11 +- filters/kpresenter/magicpoint/mgp2kpr.py | 52 +- filters/kpresenter/mng/mngexport.cpp | 8 +- filters/kpresenter/mng/mngexport.h | 5 +- .../kpresenter/ooimpress/ooimpressexport.cc | 428 +- .../kpresenter/ooimpress/ooimpressexport.h | 77 +- .../kpresenter/ooimpress/ooimpressimport.cc | 790 +- .../kpresenter/ooimpress/ooimpressimport.h | 125 +- filters/kpresenter/ooimpress/status.html | 4 +- filters/kpresenter/ooimpress/stylefactory.cc | 268 +- filters/kpresenter/ooimpress/stylefactory.h | 146 +- filters/kpresenter/png/pngexport.cpp | 8 +- filters/kpresenter/png/pngexport.h | 5 +- .../powerpoint/import/powerpointimport.cc | 430 +- .../powerpoint/import/powerpointimport.h | 15 +- .../kpresenter/powerpoint/libppt/objects.cpp | 12 +- .../kpresenter/powerpoint/libppt/objects.h | 4 +- filters/kpresenter/powerpoint/libppt/pole.cpp | 42 +- .../powerpoint/libppt/powerpoint.cpp | 166 +- .../kpresenter/powerpoint/libppt/powerpoint.h | 32 +- .../kpresenter/powerpoint/libppt/ustring.cpp | 8 +- .../kpresenter/powerpoint/libppt/ustring.h | 10 +- filters/kpresenter/svg/svgexport.cc | 22 +- filters/kpresenter/svg/svgexport.h | 5 +- filters/kpresenter/xbm/xbmexport.cpp | 8 +- filters/kpresenter/xbm/xbmexport.h | 5 +- filters/kpresenter/xpm/xpmexport.cpp | 8 +- filters/kpresenter/xpm/xpmexport.h | 5 +- .../gmagick/kis_image_magick_converter.cc | 148 +- .../gmagick/kis_image_magick_converter.h | 17 +- filters/krita/gmagick/magickexport.cpp | 6 +- filters/krita/gmagick/magickexport.h | 5 +- filters/krita/gmagick/magickimport.cpp | 8 +- filters/krita/gmagick/magickimport.h | 5 +- filters/krita/jpeg/iccjpeg.c | 2 +- filters/krita/jpeg/kis_jpeg_converter.cc | 90 +- filters/krita/jpeg/kis_jpeg_converter.h | 3 +- filters/krita/jpeg/kis_jpeg_export.cc | 12 +- filters/krita/jpeg/kis_jpeg_export.h | 5 +- filters/krita/jpeg/kis_jpeg_import.cc | 6 +- filters/krita/jpeg/kis_jpeg_import.h | 5 +- filters/krita/jpeg/kis_wdg_options_jpeg.ui | 32 +- filters/krita/libkisexif/kis_exif_io.cpp | 4 +- .../magick/kis_image_magick_converter.cc | 134 +- .../krita/magick/kis_image_magick_converter.h | 17 +- filters/krita/magick/magickexport.cpp | 6 +- filters/krita/magick/magickexport.h | 5 +- filters/krita/magick/magickimport.cpp | 8 +- filters/krita/magick/magickimport.h | 5 +- filters/krita/openexr/kis_openexr_export.cpp | 14 +- filters/krita/openexr/kis_openexr_export.h | 5 +- filters/krita/openexr/kis_openexr_import.cpp | 20 +- filters/krita/openexr/kis_openexr_import.h | 5 +- filters/krita/pdf/kis_pdf_import.cpp | 34 +- filters/krita/pdf/kis_pdf_import.h | 5 +- filters/krita/pdf/kis_pdf_import_widget.cpp | 30 +- filters/krita/pdf/kis_pdf_import_widget.h | 7 +- filters/krita/pdf/pdfimportwidgetbase.ui | 50 +- filters/krita/png/kis_png_converter.cc | 108 +- filters/krita/png/kis_png_converter.h | 3 +- filters/krita/png/kis_png_export.cc | 12 +- filters/krita/png/kis_png_export.h | 5 +- filters/krita/png/kis_png_import.cc | 6 +- filters/krita/png/kis_png_import.h | 5 +- filters/krita/png/kis_wdg_options_png.ui | 34 +- filters/krita/raw/dcraw.c | 16 +- filters/krita/raw/kis_raw_import.cpp | 162 +- filters/krita/raw/kis_raw_import.h | 17 +- filters/krita/raw/wdgrawimport.ui | 64 +- filters/krita/tiff/kis_dlg_options_tiff.cpp | 18 +- filters/krita/tiff/kis_dlg_options_tiff.h | 3 +- filters/krita/tiff/kis_tiff_converter.cc | 36 +- filters/krita/tiff/kis_tiff_converter.h | 15 +- filters/krita/tiff/kis_tiff_export.cc | 12 +- filters/krita/tiff/kis_tiff_export.h | 5 +- filters/krita/tiff/kis_tiff_import.cc | 6 +- filters/krita/tiff/kis_tiff_import.h | 5 +- filters/krita/tiff/kis_tiff_reader.cc | 48 +- filters/krita/tiff/kis_tiff_reader.h | 90 +- .../krita/tiff/kis_tiff_writer_visitor.cpp | 36 +- filters/krita/tiff/kis_tiff_writer_visitor.h | 2 +- filters/krita/tiff/kis_tiff_ycbcr_reader.cc | 56 +- filters/krita/tiff/kis_tiff_ycbcr_reader.h | 20 +- filters/krita/tiff/kis_wdg_options_tiff.ui | 110 +- filters/krita/tiff/kis_ycbcr_colorspace.h | 4 +- filters/krita/xcf/xcf/xcf-load.cc | 396 +- filters/krita/xcf/xcf/xcf-private.h | 16 +- filters/krita/xcf/xcf/xcf-read.cc | 44 +- filters/krita/xcf/xcf/xcf-read.h | 22 +- filters/krita/xcf/xcf/xcf-save.cc | 348 +- filters/krita/xcf/xcf/xcf-save.h | 2 +- filters/krita/xcf/xcf/xcf-seek.cc | 2 +- filters/krita/xcf/xcf/xcf-seek.h | 2 +- filters/krita/xcf/xcf/xcf-write.cc | 26 +- filters/krita/xcf/xcf/xcf-write.h | 14 +- filters/krita/xcf/xcfexport.cpp | 6 +- filters/krita/xcf/xcfexport.h | 5 +- filters/krita/xcf/xcfimport.cpp | 8 +- filters/krita/xcf/xcfimport.h | 5 +- .../applixspread/applixspreadimport.cc | 378 +- .../kspread/applixspread/applixspreadimport.h | 41 +- filters/kspread/applixspread/status.html | 20 +- filters/kspread/csv/csvdialog.cpp | 164 +- filters/kspread/csv/csvdialog.h | 29 +- filters/kspread/csv/csvexport.cc | 60 +- filters/kspread/csv/csvexport.h | 11 +- filters/kspread/csv/csvexportdialog.cpp | 122 +- filters/kspread/csv/csvexportdialog.h | 27 +- filters/kspread/csv/csvimport.cc | 40 +- filters/kspread/csv/csvimport.h | 5 +- filters/kspread/csv/dialogui.ui | 84 +- filters/kspread/csv/exportdialogui.ui | 72 +- filters/kspread/csv/status.html | 4 +- filters/kspread/csv/xmltree.cc | 44 +- filters/kspread/csv/xmltree.h | 18 +- filters/kspread/dbase/dbase.cpp | 66 +- filters/kspread/dbase/dbase.h | 26 +- filters/kspread/dbase/dbaseimport.cc | 46 +- filters/kspread/dbase/dbaseimport.h | 5 +- filters/kspread/excel/excelexport.cc | 18 +- filters/kspread/excel/excelexport.h | 19 +- filters/kspread/excel/import/excelimport.cc | 126 +- filters/kspread/excel/import/excelimport.h | 7 +- filters/kspread/excel/sidewinder/excel.cpp | 104 +- filters/kspread/excel/sidewinder/excel.h | 26 +- filters/kspread/excel/sidewinder/format.cpp | 28 +- filters/kspread/excel/sidewinder/format.h | 40 +- filters/kspread/excel/sidewinder/pole.cpp | 42 +- filters/kspread/excel/sidewinder/ustring.cpp | 6 +- filters/kspread/excel/sidewinder/ustring.h | 10 +- filters/kspread/gnumeric/gnumeric.xsd | 20 +- filters/kspread/gnumeric/gnumericexport.cc | 358 +- filters/kspread/gnumeric/gnumericexport.h | 35 +- filters/kspread/gnumeric/gnumericimport.cc | 440 +- filters/kspread/gnumeric/gnumericimport.h | 31 +- filters/kspread/gnumeric/status.html | 14 +- filters/kspread/html/exportdialog.cc | 46 +- filters/kspread/html/exportdialog.h | 13 +- filters/kspread/html/exportwidget.ui | 52 +- filters/kspread/html/htmlexport.cc | 128 +- filters/kspread/html/htmlexport.h | 21 +- filters/kspread/kexi/kspread_kexiimport.cc | 22 +- filters/kspread/kexi/kspread_kexiimport.h | 7 +- .../kspread/kexi/kspread_kexiimportdialog.cc | 36 +- .../kspread/kexi/kspread_kexiimportdialog.h | 17 +- .../kexi/kspread_kexiimportdialogbase.ui | 38 +- filters/kspread/latex/export/cell.cc | 6 +- filters/kspread/latex/export/cell.h | 34 +- filters/kspread/latex/export/column.cc | 4 +- filters/kspread/latex/export/column.h | 6 +- filters/kspread/latex/export/config.cc | 2 +- filters/kspread/latex/export/config.h | 46 +- filters/kspread/latex/export/document.cc | 6 +- filters/kspread/latex/export/document.h | 14 +- filters/kspread/latex/export/fileheader.cc | 26 +- filters/kspread/latex/export/fileheader.h | 18 +- filters/kspread/latex/export/format.cc | 12 +- filters/kspread/latex/export/format.h | 44 +- filters/kspread/latex/export/formula.cc | 24 +- filters/kspread/latex/export/formula.h | 16 +- .../latex/export/kspreadlatexexportdiaImpl.cc | 28 +- .../latex/export/kspreadlatexexportdiaImpl.h | 9 +- filters/kspread/latex/export/latexexport.cc | 8 +- filters/kspread/latex/export/latexexport.h | 13 +- .../kspread/latex/export/latexexportIface.cc | 2 +- .../kspread/latex/export/latexexportdia.ui | 72 +- filters/kspread/latex/export/map.cc | 8 +- filters/kspread/latex/export/map.h | 12 +- filters/kspread/latex/export/pen.cc | 4 +- filters/kspread/latex/export/pen.h | 16 +- filters/kspread/latex/export/row.cc | 4 +- filters/kspread/latex/export/row.h | 6 +- filters/kspread/latex/export/spreadsheet.cc | 12 +- filters/kspread/latex/export/spreadsheet.h | 16 +- filters/kspread/latex/export/table.cc | 30 +- filters/kspread/latex/export/table.h | 42 +- filters/kspread/latex/export/xmlparser.cc | 50 +- filters/kspread/latex/export/xmlparser.h | 38 +- .../libkspreadexport/KSpreadBaseWorker.cc | 14 +- .../libkspreadexport/KSpreadBaseWorker.h | 18 +- .../kspread/libkspreadexport/KSpreadLeader.cc | 140 +- .../kspread/libkspreadexport/KSpreadLeader.h | 10 +- filters/kspread/opencalc/opencalcexport.cc | 364 +- filters/kspread/opencalc/opencalcexport.h | 35 +- filters/kspread/opencalc/opencalcimport.cc | 810 +- filters/kspread/opencalc/opencalcimport.h | 93 +- .../kspread/opencalc/opencalcstyleexport.cc | 106 +- .../kspread/opencalc/opencalcstyleexport.h | 82 +- filters/kspread/opencalc/status.html | 12 +- filters/kspread/qpro/libqpro/qpro/common.h | 12 +- filters/kspread/qpro/libqpro/qpro/formula.h | 8 +- filters/kspread/qpro/libqpro/qpro/record.h | 110 +- .../qpro/libqpro/qpro/record_factory.h | 6 +- filters/kspread/qpro/libqpro/qpro/stream.h | 46 +- .../kspread/qpro/libqpro/qpro/tablenames.h | 6 +- filters/kspread/qpro/libqpro/src/formula.cc | 20 +- filters/kspread/qpro/libqpro/src/record.cc | 150 +- .../qpro/libqpro/src/record_factory.cc | 12 +- filters/kspread/qpro/libqpro/src/stream.cc | 16 +- filters/kspread/qpro/qproformula.h | 6 +- filters/kspread/qpro/qproimport.cc | 24 +- filters/kspread/qpro/qproimport.h | 13 +- filters/kugar/kugarnop/kugarnopimport.cpp | 12 +- filters/kugar/kugarnop/kugarnopimport.h | 9 +- filters/kword/abiword/ImportField.cc | 50 +- filters/kword/abiword/ImportField.h | 8 +- filters/kword/abiword/ImportFormatting.cc | 92 +- filters/kword/abiword/ImportFormatting.h | 52 +- filters/kword/abiword/ImportHelpers.cc | 28 +- filters/kword/abiword/ImportHelpers.h | 20 +- filters/kword/abiword/ImportStyle.cc | 38 +- filters/kword/abiword/ImportStyle.h | 20 +- filters/kword/abiword/abiwordexport.cc | 298 +- filters/kword/abiword/abiwordexport.h | 9 +- filters/kword/abiword/abiwordimport.cc | 400 +- filters/kword/abiword/abiwordimport.h | 11 +- filters/kword/amipro/FileFormat.txt | 10 +- filters/kword/amipro/amiproexport.cc | 54 +- filters/kword/amipro/amiproexport.h | 5 +- filters/kword/amipro/amiproimport.cc | 172 +- filters/kword/amipro/amiproimport.h | 7 +- filters/kword/amipro/amiproparser.cpp | 88 +- filters/kword/amipro/amiproparser.h | 54 +- filters/kword/applixword/applixwordimport.cc | 286 +- filters/kword/applixword/applixwordimport.h | 25 +- filters/kword/ascii/ExportDialog.cc | 42 +- filters/kword/ascii/ExportDialog.h | 9 +- filters/kword/ascii/ExportDialogUI.ui | 22 +- filters/kword/ascii/ImportDialog.cc | 38 +- filters/kword/ascii/ImportDialog.h | 7 +- filters/kword/ascii/ImportDialogUI.ui | 22 +- filters/kword/ascii/asciiexport.cc | 126 +- filters/kword/ascii/asciiexport.h | 5 +- filters/kword/ascii/asciiimport.cc | 260 +- filters/kword/ascii/asciiimport.h | 59 +- filters/kword/ascii/status.html | 2 +- filters/kword/docbook/docbookexport.cc | 98 +- filters/kword/docbook/docbookexport.h | 13 +- filters/kword/hancomword/hancomwordimport.cpp | 66 +- filters/kword/hancomword/hancomwordimport.h | 7 +- filters/kword/hancomword/pole.cpp | 42 +- filters/kword/html/export/ExportBasic.cc | 50 +- filters/kword/html/export/ExportBasic.h | 18 +- filters/kword/html/export/ExportCss.cc | 176 +- filters/kword/html/export/ExportCss.h | 24 +- filters/kword/html/export/ExportDialog.cc | 46 +- filters/kword/html/export/ExportDialog.h | 9 +- filters/kword/html/export/ExportDialogUI.ui | 40 +- filters/kword/html/export/ExportDocStruct.cc | 26 +- filters/kword/html/export/ExportDocStruct.h | 10 +- filters/kword/html/export/ExportFilter.cc | 128 +- filters/kword/html/export/ExportFilter.h | 50 +- filters/kword/html/export/htmlexport.cc | 10 +- filters/kword/html/export/htmlexport.h | 13 +- filters/kword/html/import/htmlimport.cpp | 4 +- filters/kword/html/import/htmlimport.h | 11 +- filters/kword/html/import/khtmlreader.cpp | 164 +- filters/kword/html/import/khtmlreader.h | 31 +- filters/kword/html/import/kwdwriter.cpp | 256 +- filters/kword/html/import/kwdwriter.h | 82 +- .../kword/kword1.3/import/kword13document.cpp | 64 +- .../kword/kword1.3/import/kword13document.h | 50 +- .../kword1.3/import/kword13formatone.cpp | 22 +- .../kword/kword1.3/import/kword13formatone.h | 22 +- .../kword1.3/import/kword13formatother.cpp | 2 +- .../kword1.3/import/kword13formatother.h | 4 +- .../kword/kword1.3/import/kword13frameset.cpp | 16 +- .../kword/kword1.3/import/kword13frameset.h | 30 +- .../kword/kword1.3/import/kword13import.cpp | 50 +- filters/kword/kword1.3/import/kword13import.h | 15 +- .../kword/kword1.3/import/kword13layout.cpp | 28 +- filters/kword/kword1.3/import/kword13layout.h | 18 +- .../kword1.3/import/kword13oasisgenerator.cpp | 158 +- .../kword1.3/import/kword13oasisgenerator.h | 20 +- .../kword1.3/import/kword13paragraph.cpp | 12 +- .../kword/kword1.3/import/kword13paragraph.h | 22 +- .../kword/kword1.3/import/kword13parser.cpp | 102 +- filters/kword/kword1.3/import/kword13parser.h | 64 +- .../kword/kword1.3/import/kword13picture.cpp | 18 +- .../kword/kword1.3/import/kword13picture.h | 6 +- .../kword1.3/import/kword13postparsing.cpp | 6 +- .../kword/kword1.3/import/kword13utils.cpp | 8 +- filters/kword/kword1.3/import/kword13utils.h | 4 +- filters/kword/latex/export/anchor.cc | 4 +- filters/kword/latex/export/anchor.h | 20 +- filters/kword/latex/export/border.h | 2 +- filters/kword/latex/export/config.cc | 2 +- filters/kword/latex/export/config.h | 46 +- filters/kword/latex/export/document.cc | 44 +- filters/kword/latex/export/document.h | 46 +- filters/kword/latex/export/element.cc | 4 +- filters/kword/latex/export/element.h | 18 +- filters/kword/latex/export/fileheader.cc | 26 +- filters/kword/latex/export/fileheader.h | 18 +- filters/kword/latex/export/footnote.cc | 22 +- filters/kword/latex/export/footnote.h | 28 +- filters/kword/latex/export/format.cc | 4 +- filters/kword/latex/export/format.h | 14 +- filters/kword/latex/export/formula.cc | 48 +- filters/kword/latex/export/formula.h | 16 +- filters/kword/latex/export/key.cc | 4 +- filters/kword/latex/export/key.h | 18 +- .../kword/latex/export/kwordlatexexportdia.cc | 28 +- .../kword/latex/export/kwordlatexexportdia.h | 9 +- filters/kword/latex/export/latexexport.cc | 8 +- filters/kword/latex/export/latexexport.h | 13 +- .../kword/latex/export/latexexportIface.cc | 2 +- filters/kword/latex/export/latexexportdia.ui | 72 +- filters/kword/latex/export/layout.cc | 18 +- filters/kword/latex/export/layout.h | 30 +- filters/kword/latex/export/listeformat.h | 2 +- filters/kword/latex/export/listtable.cc | 4 +- filters/kword/latex/export/listtable.h | 6 +- filters/kword/latex/export/para.cc | 52 +- filters/kword/latex/export/para.h | 54 +- filters/kword/latex/export/pixmapFrame.cc | 24 +- filters/kword/latex/export/pixmapFrame.h | 28 +- filters/kword/latex/export/table.cc | 20 +- filters/kword/latex/export/table.h | 26 +- filters/kword/latex/export/texlauncher.cc | 6 +- filters/kword/latex/export/textFrame.cc | 14 +- filters/kword/latex/export/textFrame.h | 16 +- filters/kword/latex/export/textformat.cc | 26 +- filters/kword/latex/export/textformat.h | 36 +- filters/kword/latex/export/textzone.cc | 50 +- filters/kword/latex/export/textzone.h | 34 +- filters/kword/latex/export/variableformat.cc | 14 +- filters/kword/latex/export/variableformat.h | 62 +- filters/kword/latex/export/variablezone.cc | 8 +- filters/kword/latex/export/variablezone.h | 14 +- filters/kword/latex/export/xml2latexparser.cc | 6 +- filters/kword/latex/export/xml2latexparser.h | 14 +- filters/kword/latex/export/xmlparser.cc | 50 +- filters/kword/latex/export/xmlparser.h | 36 +- filters/kword/latex/import/generator/body.cc | 8 +- filters/kword/latex/import/generator/body.h | 10 +- .../kword/latex/import/generator/document.cc | 18 +- .../kword/latex/import/generator/document.h | 8 +- .../latex/import/generator/kwordgenerator.cc | 8 +- .../latex/import/generator/kwordgenerator.h | 4 +- filters/kword/latex/import/generator/latex.cc | 4 +- filters/kword/latex/import/generator/latex.h | 6 +- .../kword/latex/import/generator/paragraph.cc | 10 +- .../kword/latex/import/generator/paragraph.h | 12 +- filters/kword/latex/import/lateximport.cc | 10 +- filters/kword/latex/import/lateximport.h | 13 +- filters/kword/latex/import/lateximportdia.cc | 42 +- filters/kword/latex/import/lateximportdia.h | 29 +- filters/kword/latex/import/parser/command.cc | 26 +- filters/kword/latex/import/parser/command.h | 40 +- filters/kword/latex/import/parser/comment.h | 8 +- filters/kword/latex/import/parser/element.h | 8 +- filters/kword/latex/import/parser/env.cc | 14 +- filters/kword/latex/import/parser/env.h | 16 +- filters/kword/latex/import/parser/group.h | 4 +- .../kword/latex/import/parser/latexparser.cc | 8 +- .../kword/latex/import/parser/latexparser.h | 14 +- filters/kword/latex/import/parser/option.h | 14 +- filters/kword/latex/import/parser/param.cc | 2 +- filters/kword/latex/import/parser/param.h | 16 +- filters/kword/latex/import/parser/stack.h | 6 +- filters/kword/latex/import/parser/text.h | 8 +- filters/kword/latex/status.html | 12 +- filters/kword/libexport/KWEFBaseWorker.cc | 44 +- filters/kword/libexport/KWEFBaseWorker.h | 26 +- filters/kword/libexport/KWEFKWordLeader.cc | 234 +- filters/kword/libexport/KWEFKWordLeader.h | 34 +- filters/kword/libexport/KWEFStructures.cc | 30 +- filters/kword/libexport/KWEFStructures.h | 180 +- filters/kword/libexport/KWEFUtil.cc | 24 +- filters/kword/libexport/KWEFUtil.h | 6 +- filters/kword/libexport/ProcessDocument.cc | 348 +- filters/kword/libexport/ProcessDocument.h | 12 +- filters/kword/libexport/TagProcessing.cc | 52 +- filters/kword/libexport/TagProcessing.h | 50 +- filters/kword/msword/conversion.cpp | 200 +- filters/kword/msword/conversion.h | 44 +- filters/kword/msword/document.cpp | 122 +- filters/kword/msword/document.h | 37 +- filters/kword/msword/graphicshandler.cpp | 8 +- filters/kword/msword/graphicshandler.h | 5 +- filters/kword/msword/mswordimport.cpp | 26 +- filters/kword/msword/mswordimport.h | 11 +- filters/kword/msword/tablehandler.cpp | 12 +- filters/kword/msword/tablehandler.h | 19 +- filters/kword/msword/texthandler.cpp | 218 +- filters/kword/msword/texthandler.h | 43 +- filters/kword/mswrite/ImportDialog.cc | 42 +- filters/kword/mswrite/ImportDialog.h | 7 +- filters/kword/mswrite/ImportDialogUI.ui | 28 +- filters/kword/mswrite/mswriteexport.cc | 200 +- filters/kword/mswrite/mswriteexport.h | 5 +- filters/kword/mswrite/mswriteimport.cc | 94 +- filters/kword/mswrite/mswriteimport.h | 5 +- filters/kword/mswrite/status.html | 6 +- filters/kword/mswrite/structures.h | 2 +- .../kword/mswrite/structures_generated.cpp | 14 +- filters/kword/mswrite/structures_generated.h | 12 +- filters/kword/mswrite/structures_private.cpp | 2 +- filters/kword/oowriter/ExportFilter.cc | 398 +- filters/kword/oowriter/ExportFilter.h | 72 +- filters/kword/oowriter/conversion.cc | 34 +- filters/kword/oowriter/conversion.h | 26 +- filters/kword/oowriter/oowriterexport.cc | 6 +- filters/kword/oowriter/oowriterexport.h | 9 +- filters/kword/oowriter/oowriterimport.cc | 832 +- filters/kword/oowriter/oowriterimport.h | 135 +- filters/kword/palmdoc/palmdb.cpp | 132 +- filters/kword/palmdoc/palmdb.h | 46 +- filters/kword/palmdoc/palmdoc.cpp | 38 +- filters/kword/palmdoc/palmdoc.h | 12 +- filters/kword/palmdoc/palmdocexport.cc | 34 +- filters/kword/palmdoc/palmdocexport.h | 5 +- filters/kword/palmdoc/palmdocimport.cc | 108 +- filters/kword/palmdoc/palmdocimport.h | 13 +- filters/kword/pdf/DESIGN | 4 +- filters/kword/pdf/FilterDevice.cpp | 64 +- filters/kword/pdf/FilterDevice.h | 16 +- filters/kword/pdf/FilterPage.cpp | 88 +- filters/kword/pdf/FilterPage.h | 18 +- filters/kword/pdf/data.cpp | 64 +- filters/kword/pdf/data.h | 34 +- filters/kword/pdf/dialog.cpp | 90 +- filters/kword/pdf/dialog.h | 29 +- .../xpdf_security_integer_overflow_2.diff | 12 +- filters/kword/pdf/fstring.cpp | 18 +- filters/kword/pdf/fstring.h | 20 +- filters/kword/pdf/misc.cpp | 84 +- filters/kword/pdf/misc.h | 44 +- filters/kword/pdf/pdfdocument.cpp | 14 +- filters/kword/pdf/pdfdocument.h | 12 +- filters/kword/pdf/pdfimport.cpp | 46 +- filters/kword/pdf/pdfimport.h | 7 +- filters/kword/pdf/status.html | 2 +- filters/kword/pdf/transform.cpp | 2 +- filters/kword/pdf/transform.h | 4 +- filters/kword/pdf/xpdf/goo/GHash.cc | 12 +- filters/kword/pdf/xpdf/goo/GHash.h | 4 +- filters/kword/pdf/xpdf/xpdf/CMap.cc | 2 +- filters/kword/pdf/xpdf/xpdf/CMap.h | 2 +- filters/kword/pdf/xpdf/xpdf/Catalog.cc | 2 +- filters/kword/pdf/xpdf/xpdf/Dict.cc | 8 +- filters/kword/pdf/xpdf/xpdf/Dict.h | 2 +- filters/kword/pdf/xpdf/xpdf/FTFont.cc | 10 +- filters/kword/pdf/xpdf/xpdf/FontFile.cc | 22 +- filters/kword/pdf/xpdf/xpdf/Gfx.cc | 34 +- filters/kword/pdf/xpdf/xpdf/GfxFont.cc | 2 +- filters/kword/pdf/xpdf/xpdf/GlobalParams.cc | 20 +- filters/kword/pdf/xpdf/xpdf/GlobalParams.h | 6 +- filters/kword/pdf/xpdf/xpdf/ImageOutputDev.cc | 2 +- filters/kword/pdf/xpdf/xpdf/ImageOutputDev.h | 2 +- filters/kword/pdf/xpdf/xpdf/JBIG2Stream.cc | 20 +- filters/kword/pdf/xpdf/xpdf/Link.cc | 2 +- filters/kword/pdf/xpdf/xpdf/Link.h | 2 +- filters/kword/pdf/xpdf/xpdf/OutputDev.cc | 2 +- filters/kword/pdf/xpdf/xpdf/OutputDev.h | 2 +- filters/kword/pdf/xpdf/xpdf/PBMOutputDev.cc | 2 +- filters/kword/pdf/xpdf/xpdf/PDFDoc.h | 2 +- filters/kword/pdf/xpdf/xpdf/PSOutputDev.cc | 22 +- filters/kword/pdf/xpdf/xpdf/PSOutputDev.h | 6 +- filters/kword/pdf/xpdf/xpdf/TTFont.cc | 10 +- filters/kword/pdf/xpdf/xpdf/UnicodeMap.cc | 38 +- filters/kword/pdf/xpdf/xpdf/UnicodeMap.h | 18 +- filters/kword/pdf/xpdf/xpdf/XOutputDev.cc | 42 +- filters/kword/pdf/xpdf/xpdf/XOutputDev.h | 2 +- filters/kword/pdf/xpdf/xpdf/XPDFApp.cc | 14 +- filters/kword/pdf/xpdf/xpdf/XPDFApp.h | 4 +- filters/kword/pdf/xpdf/xpdf/XPDFCore.cc | 18 +- filters/kword/pdf/xpdf/xpdf/XPDFCore.h | 10 +- filters/kword/pdf/xpdf/xpdf/XPDFTree.cc | 176 +- filters/kword/pdf/xpdf/xpdf/XPDFTree.h | 2 +- filters/kword/pdf/xpdf/xpdf/XPDFTreeP.h | 8 +- filters/kword/pdf/xpdf/xpdf/XPDFViewer.cc | 24 +- filters/kword/pdf/xpdf/xpdf/XPDFViewer.h | 4 +- filters/kword/pdf/xpdf/xpdf/xpdf.cc | 6 +- filters/kword/rtf/export/ExportFilter.cc | 612 +- filters/kword/rtf/export/ExportFilter.h | 70 +- filters/kword/rtf/export/rtfexport.cc | 6 +- filters/kword/rtf/export/rtfexport.h | 13 +- filters/kword/rtf/import/rtfimport.cpp | 514 +- filters/kword/rtf/import/rtfimport.h | 101 +- filters/kword/rtf/import/rtfimport_dom.cpp | 54 +- filters/kword/rtf/import/rtfimport_dom.h | 28 +- .../kword/rtf/import/rtfimport_tokenizer.cpp | 2 +- .../kword/rtf/import/rtfimport_tokenizer.h | 14 +- filters/kword/rtf/status.html | 12 +- filters/kword/starwriter/pole.cpp | 50 +- filters/kword/starwriter/starwriterimport.cc | 98 +- filters/kword/starwriter/starwriterimport.h | 29 +- filters/kword/starwriter/status.html | 4 +- filters/kword/wml/wmlexport.cc | 44 +- filters/kword/wml/wmlexport.h | 5 +- filters/kword/wml/wmlimport.cc | 90 +- filters/kword/wml/wmlimport.h | 7 +- filters/kword/wml/wmlparser.cpp | 62 +- filters/kword/wml/wmlparser.h | 12 +- filters/kword/wordperfect/export/wp5.cc | 70 +- filters/kword/wordperfect/export/wp5.h | 18 +- filters/kword/wordperfect/export/wp6.cc | 94 +- filters/kword/wordperfect/export/wp6.h | 18 +- filters/kword/wordperfect/export/wpexport.cc | 22 +- filters/kword/wordperfect/export/wpexport.h | 5 +- filters/kword/wordperfect/import/PageSpan.cxx | 4 +- filters/kword/wordperfect/import/PageSpan.hxx | 2 +- .../kword/wordperfect/import/TextRunStyle.cxx | 2 +- .../import/WordPerfectCollector.cxx | 18 +- .../kword/wordperfect/import/kwordfilter.cpp | 130 +- .../kword/wordperfect/import/kwordfilter.h | 6 +- filters/kword/wordperfect/import/parser.cpp | 124 +- filters/kword/wordperfect/import/parser.h | 46 +- filters/kword/wordperfect/import/wpimport.cc | 24 +- filters/kword/wordperfect/import/wpimport.h | 21 +- filters/kword/wordperfect/status_old.html | 4 +- filters/libdialogfilter/exportsizedia.cpp | 100 +- filters/libdialogfilter/exportsizedia.h | 9 +- filters/liboofilter/liststylestack.cc | 8 +- filters/liboofilter/liststylestack.h | 12 +- filters/liboofilter/ooutils.cc | 188 +- filters/liboofilter/ooutils.h | 36 +- filters/olefilters/lib/filterbase.cc | 30 +- filters/olefilters/lib/filterbase.h | 69 +- filters/olefilters/lib/klaola.cc | 66 +- filters/olefilters/lib/klaola.h | 32 +- filters/olefilters/lib/myfile.h | 6 +- filters/olefilters/olefilter.cc | 160 +- filters/olefilters/olefilter.h | 63 +- filters/olefilters/powerpoint97/powerpoint.cc | 368 +- filters/olefilters/powerpoint97/powerpoint.h | 392 +- .../powerpoint97/powerpointfilter.cc | 16 +- .../powerpoint97/powerpointfilter.h | 3 +- filters/olefilters/powerpoint97/pptSlide.cpp | 18 +- filters/olefilters/powerpoint97/pptSlide.h | 44 +- filters/olefilters/powerpoint97/pptdoc.cc | 6 +- filters/olefilters/powerpoint97/pptdoc.h | 8 +- filters/olefilters/powerpoint97/pptxml.cc | 114 +- filters/olefilters/powerpoint97/pptxml.h | 45 +- .../export/xsl/kword/xslfo/main.xsl | 4 +- filters/xsltfilter/export/xsltdialog.ui | 30 +- filters/xsltfilter/export/xsltexport.cc | 4 +- filters/xsltfilter/export/xsltexport.h | 5 +- filters/xsltfilter/export/xsltexportdia.cc | 74 +- filters/xsltfilter/export/xsltexportdia.h | 19 +- filters/xsltfilter/export/xsltproc.cc | 12 +- filters/xsltfilter/export/xsltproc.h | 12 +- filters/xsltfilter/import/xsltdialog.ui | 30 +- filters/xsltfilter/import/xsltimport.cc | 10 +- filters/xsltfilter/import/xsltimport.h | 15 +- filters/xsltfilter/import/xsltimportdia.cc | 78 +- filters/xsltfilter/import/xsltimportdia.h | 23 +- filters/xsltfilter/import/xsltproc.cc | 12 +- filters/xsltfilter/import/xsltproc.h | 12 +- filters/xsltfilter/kword2xslfo.xsl | 4 +- interfaces/koChart.cc | 12 +- interfaces/koChart.h | 20 +- karbon/commands/valigncmd.cc | 2 +- karbon/commands/valigncmd.h | 2 +- karbon/commands/vbooleancmd.cc | 4 +- karbon/commands/vbooleancmd.h | 8 +- karbon/commands/vclipartcmd.cc | 2 +- karbon/commands/vclipartcmd.h | 2 +- karbon/commands/vcommand.cc | 26 +- karbon/commands/vcommand.h | 23 +- karbon/commands/vdeletenodescmd.cc | 4 +- karbon/commands/vdeletenodescmd.h | 2 +- karbon/commands/vdistributecmd.cc | 6 +- karbon/commands/vdistributecmd.h | 2 +- karbon/commands/vfillcmd.cc | 2 +- karbon/commands/vfillcmd.h | 6 +- karbon/commands/vgroupcmd.cc | 20 +- karbon/commands/vinsertcmd.cc | 2 +- karbon/commands/vinsertcmd.h | 2 +- karbon/commands/vlayercmd.cc | 2 +- karbon/commands/vlayercmd.h | 2 +- karbon/commands/vreplacingcmd.cc | 10 +- karbon/commands/vreplacingcmd.h | 6 +- karbon/commands/vshapecmd.cc | 28 +- karbon/commands/vshapecmd.h | 8 +- karbon/commands/vstrokecmd.cc | 4 +- karbon/commands/vstrokecmd.h | 8 +- karbon/commands/vtextcmd.cc | 2 +- karbon/commands/vtextcmd.h | 10 +- karbon/commands/vtransformcmd.cc | 24 +- karbon/commands/vtransformcmd.h | 18 +- karbon/commands/vungroupcmd.cc | 14 +- karbon/core/vclipgroup.cc | 16 +- karbon/core/vclipgroup.h | 6 +- karbon/core/vcolor.cc | 14 +- karbon/core/vcolor.h | 20 +- karbon/core/vcomposite.cc | 176 +- karbon/core/vcomposite.h | 42 +- karbon/core/vcursor.cc | 54 +- karbon/core/vcursor.h | 18 +- karbon/core/vdashpattern.cc | 16 +- karbon/core/vdashpattern.h | 14 +- karbon/core/vdocument.cc | 56 +- karbon/core/vdocument.h | 34 +- karbon/core/vfill.cc | 40 +- karbon/core/vfill.h | 16 +- karbon/core/vgradient.cc | 88 +- karbon/core/vgradient.h | 22 +- karbon/core/vgroup.cc | 34 +- karbon/core/vgroup.h | 18 +- karbon/core/vgroup_iface.cc | 4 +- karbon/core/vgroup_iface.h | 8 +- karbon/core/vimage.cc | 30 +- karbon/core/vimage.h | 16 +- karbon/core/vkarbonplugin.cc | 2 +- karbon/core/vkarbonplugin.h | 2 +- karbon/core/vlayer.cc | 14 +- karbon/core/vlayer.h | 12 +- karbon/core/vlayer_iface.cc | 4 +- karbon/core/vlayer_iface.h | 6 +- karbon/core/vobject.cc | 46 +- karbon/core/vobject.h | 44 +- karbon/core/vobject_iface.cc | 6 +- karbon/core/vobject_iface.h | 12 +- karbon/core/vpath.cc | 56 +- karbon/core/vpath.h | 12 +- karbon/core/vpattern.cc | 28 +- karbon/core/vpattern.h | 30 +- karbon/core/vsegment.cc | 14 +- karbon/core/vsegment.h | 10 +- karbon/core/vselection.cc | 44 +- karbon/core/vselection.h | 16 +- karbon/core/vstroke.cc | 42 +- karbon/core/vstroke.h | 18 +- karbon/core/vtext.cc | 98 +- karbon/core/vtext.h | 40 +- karbon/core/vtext_iface.cc | 6 +- karbon/core/vtext_iface.h | 4 +- karbon/dialogs/vcolordlg.cc | 4 +- karbon/dialogs/vcolordlg.h | 3 +- karbon/dialogs/vcolortab.cc | 74 +- karbon/dialogs/vcolortab.h | 11 +- karbon/dialogs/vconfiguredlg.cc | 116 +- karbon/dialogs/vconfiguredlg.h | 39 +- karbon/dialogs/vstrokedlg.cc | 64 +- karbon/dialogs/vstrokedlg.h | 15 +- karbon/dockers/vcolordocker.cc | 80 +- karbon/dockers/vcolordocker.h | 25 +- karbon/dockers/vdocumentdocker.cc | 444 +- karbon/dockers/vdocumentdocker.h | 118 +- karbon/dockers/vstrokedocker.cc | 90 +- karbon/dockers/vstrokedocker.h | 13 +- karbon/dockers/vstyledocker.cc | 78 +- karbon/dockers/vstyledocker.h | 30 +- karbon/dockers/vtransformdocker.cc | 94 +- karbon/dockers/vtransformdocker.h | 5 +- karbon/karbon_drag.cpp | 38 +- karbon/karbon_drag.h | 17 +- karbon/karbon_factory.cc | 18 +- karbon/karbon_factory.h | 9 +- karbon/karbon_grid_data.cpp | 10 +- karbon/karbon_grid_data.h | 10 +- karbon/karbon_part.cc | 144 +- karbon/karbon_part.h | 35 +- karbon/karbon_part_iface.cc | 14 +- karbon/karbon_part_iface.h | 8 +- karbon/karbon_resourceserver.cc | 118 +- karbon/karbon_resourceserver.h | 55 +- karbon/karbon_tool_registry.cc | 2 +- karbon/karbon_tool_registry.h | 4 +- karbon/karbon_view.cc | 408 +- karbon/karbon_view.h | 39 +- karbon/karbon_view_iface.cc | 4 +- karbon/karbon_view_iface.h | 4 +- .../plugins/flattenpath/flattenpathplugin.cc | 24 +- .../plugins/flattenpath/flattenpathplugin.h | 6 +- karbon/plugins/imagetool/imagetoolplugin.cc | 6 +- karbon/plugins/imagetool/imagetoolplugin.h | 5 +- karbon/plugins/imagetool/vimagetool.cc | 18 +- karbon/plugins/imagetool/vimagetool.h | 14 +- .../plugins/insertknots/insertknotsplugin.cc | 22 +- .../plugins/insertknots/insertknotsplugin.h | 6 +- .../roundcorners/roundcornersplugin.cc | 26 +- .../plugins/roundcorners/roundcornersplugin.h | 6 +- .../shadoweffect/shadoweffectplugin.cc | 36 +- .../plugins/shadoweffect/shadoweffectplugin.h | 6 +- .../plugins/shadoweffect/vshadowdecorator.cc | 14 +- .../plugins/shadoweffect/vshadowdecorator.h | 6 +- karbon/plugins/whirlpinch/whirlpinchplugin.cc | 30 +- karbon/plugins/whirlpinch/whirlpinchplugin.h | 6 +- karbon/plugins/zoomtool/vzoomtool.cc | 24 +- karbon/plugins/zoomtool/vzoomtool.h | 14 +- karbon/plugins/zoomtool/zoomtoolplugin.cc | 8 +- karbon/plugins/zoomtool/zoomtoolplugin.h | 5 +- karbon/render/art_rgb.c | 6 +- karbon/render/art_rgb_svp.c | 4 +- karbon/render/vkopainter.cc | 78 +- karbon/render/vkopainter.h | 34 +- karbon/render/vpainter.h | 36 +- karbon/render/vpainterfactory.cc | 10 +- karbon/render/vpainterfactory.h | 8 +- karbon/render/vqpainter.cc | 100 +- karbon/render/vqpainter.h | 40 +- .../xrgbrender/gdk-pixbuf-xlib-drawable.c | 14 +- .../xrgbrender/gdk-pixbuf-xlib-render.c | 30 +- karbon/render/xrgbrender/gdk-pixbuf-xlib.h | 4 +- karbon/render/xrgbrender/gdk-pixbuf-xlibrgb.c | 2 +- karbon/shapes/vellipse.cc | 64 +- karbon/shapes/vellipse.h | 12 +- karbon/shapes/vpolygon.cc | 50 +- karbon/shapes/vpolygon.h | 14 +- karbon/shapes/vpolyline.cc | 58 +- karbon/shapes/vpolyline.h | 18 +- karbon/shapes/vrectangle.cc | 50 +- karbon/shapes/vrectangle.h | 12 +- karbon/shapes/vsinus.cc | 30 +- karbon/shapes/vsinus.h | 10 +- karbon/shapes/vspiral.cc | 30 +- karbon/shapes/vspiral.h | 10 +- karbon/shapes/vstar.cc | 30 +- karbon/shapes/vstar.h | 16 +- karbon/tools/vcurvefit.cc | 30 +- karbon/tools/vcurvefit.h | 6 +- karbon/tools/vdefaulttools.cc | 10 +- karbon/tools/vdefaulttools.h | 5 +- karbon/tools/vellipsetool.cc | 32 +- karbon/tools/vellipsetool.h | 17 +- karbon/tools/vgradienttool.cc | 58 +- karbon/tools/vgradienttool.h | 9 +- karbon/tools/vpatterntool.cc | 94 +- karbon/tools/vpatterntool.h | 20 +- karbon/tools/vpenciltool.cc | 60 +- karbon/tools/vpenciltool.h | 35 +- karbon/tools/vpolygontool.cc | 34 +- karbon/tools/vpolygontool.h | 10 +- karbon/tools/vpolylinetool.cc | 46 +- karbon/tools/vpolylinetool.h | 19 +- karbon/tools/vrectangletool.cc | 24 +- karbon/tools/vrectangletool.h | 14 +- karbon/tools/vrotatetool.cc | 14 +- karbon/tools/vrotatetool.h | 4 +- karbon/tools/vroundrecttool.cc | 28 +- karbon/tools/vroundrecttool.h | 10 +- karbon/tools/vselectnodestool.cc | 64 +- karbon/tools/vselectnodestool.h | 6 +- karbon/tools/vselecttool.cc | 94 +- karbon/tools/vselecttool.h | 12 +- karbon/tools/vshapetool.cc | 34 +- karbon/tools/vshapetool.h | 10 +- karbon/tools/vsheartool.cc | 24 +- karbon/tools/vsheartool.h | 4 +- karbon/tools/vsinustool.cc | 28 +- karbon/tools/vsinustool.h | 14 +- karbon/tools/vspiraltool.cc | 36 +- karbon/tools/vspiraltool.h | 10 +- karbon/tools/vstartool.cc | 48 +- karbon/tools/vstartool.h | 15 +- karbon/tools/vtexttool.cc | 258 +- karbon/tools/vtexttool.h | 89 +- karbon/usablity-review.txt | 2 +- karbon/visitors/vdrawselection.cc | 32 +- karbon/visitors/vselectiondesc.h | 10 +- karbon/visitors/vselectnodes.cc | 10 +- karbon/visitors/vselectnodes.h | 4 +- karbon/visitors/vselectobjects.cc | 16 +- karbon/visitors/vtransformnodes.cc | 6 +- karbon/visitors/vtransformnodes.h | 6 +- karbon/vtool.cc | 60 +- karbon/vtool.h | 29 +- karbon/vtoolcontroller.cc | 16 +- karbon/vtoolcontroller.h | 14 +- karbon/widgets/vcanvas.cc | 92 +- karbon/widgets/vcanvas.h | 33 +- karbon/widgets/vcolorslider.cc | 52 +- karbon/widgets/vcolorslider.h | 25 +- karbon/widgets/vgradienttabwidget.cc | 104 +- karbon/widgets/vgradienttabwidget.h | 51 +- karbon/widgets/vgradientwidget.cc | 76 +- karbon/widgets/vgradientwidget.h | 25 +- karbon/widgets/vreference.cc | 38 +- karbon/widgets/vreference.h | 11 +- karbon/widgets/vruler.cc | 78 +- karbon/widgets/vruler.h | 35 +- karbon/widgets/vselecttoolbar.cc | 20 +- karbon/widgets/vselecttoolbar.h | 1 + karbon/widgets/vsmallpreview.cc | 66 +- karbon/widgets/vsmallpreview.h | 21 +- karbon/widgets/vstatebutton.cc | 8 +- karbon/widgets/vstatebutton.h | 16 +- karbon/widgets/vstrokefillpreview.cc | 60 +- karbon/widgets/vstrokefillpreview.h | 27 +- karbon/widgets/vtoolbox.h | 1 + karbon/widgets/vtranslate.cc | 64 +- karbon/widgets/vtranslate.h | 31 +- karbon/widgets/vtypebuttonbox.cc | 40 +- karbon/widgets/vtypebuttonbox.h | 7 +- kchart/KChartParamsIface.cc | 46 +- kchart/KChartParamsIface.h | 48 +- kchart/KChartViewIface.h | 2 +- kchart/csvimportdialog.cc | 166 +- kchart/csvimportdialog.h | 29 +- kchart/csvimportdialogui.ui | 92 +- kchart/kchartBackgroundPixmapConfigPage.cc | 194 +- kchart/kchartBackgroundPixmapConfigPage.h | 47 +- kchart/kchartColorConfigPage.cc | 62 +- kchart/kchartColorConfigPage.h | 129 +- kchart/kchartComboConfigPage.cc | 36 +- kchart/kchartComboConfigPage.h | 17 +- kchart/kchartConfigDialog.cc | 18 +- kchart/kchartConfigDialog.h | 9 +- kchart/kchartDataConfigPage.cc | 60 +- kchart/kchartDataConfigPage.h | 29 +- kchart/kchartDataEditor.cc | 240 +- kchart/kchartDataEditor.h | 53 +- kchart/kchartFontConfigPage.cc | 106 +- kchart/kchartFontConfigPage.h | 43 +- kchart/kchartHeaderFooterConfigPage.cc | 132 +- kchart/kchartHeaderFooterConfigPage.h | 35 +- kchart/kchartLegendConfigPage.cc | 176 +- kchart/kchartLegendConfigPage.h | 35 +- kchart/kchartLine3dConfigPage.cc | 48 +- kchart/kchartLine3dConfigPage.h | 13 +- kchart/kchartPageLayout.cc | 54 +- kchart/kchartPageLayout.h | 13 +- kchart/kchartParameter3dConfigPage.cc | 58 +- kchart/kchartParameter3dConfigPage.h | 13 +- kchart/kchartParameterConfigPage.cc | 140 +- kchart/kchartParameterConfigPage.h | 53 +- kchart/kchartParameterPieConfigPage.cc | 56 +- kchart/kchartParameterPieConfigPage.h | 27 +- kchart/kchartParameterPolarConfigPage.cc | 46 +- kchart/kchartParameterPolarConfigPage.h | 23 +- kchart/kchartPieConfigPage.cc | 84 +- kchart/kchartPieConfigPage.h | 33 +- kchart/kchartPrinterDlg.cc | 36 +- kchart/kchartPrinterDlg.h | 11 +- kchart/kchartSubTypeChartPage.cc | 186 +- kchart/kchartSubTypeChartPage.h | 72 +- kchart/kchartWizard.cc | 38 +- kchart/kchartWizard.h | 9 +- kchart/kchartWizardLabelsLegendPage.cc | 138 +- kchart/kchartWizardLabelsLegendPage.h | 75 +- kchart/kchartWizardSelectChartSubTypePage.cc | 42 +- kchart/kchartWizardSelectChartSubTypePage.h | 21 +- kchart/kchartWizardSelectChartTypePage.cc | 42 +- kchart/kchartWizardSelectChartTypePage.h | 32 +- kchart/kchartWizardSelectDataFormatPage.cc | 58 +- kchart/kchartWizardSelectDataFormatPage.h | 29 +- kchart/kchartWizardSelectDataPage.cc | 24 +- kchart/kchartWizardSelectDataPage.h | 10 +- kchart/kchartWizardSetupAxesPage.cc | 144 +- kchart/kchartWizardSetupAxesPage.h | 57 +- kchart/kchartWizardSetupDataPage.cc | 96 +- kchart/kchartWizardSetupDataPage.h | 21 +- kchart/kchart_factory.cc | 12 +- kchart/kchart_factory.h | 9 +- kchart/kchart_params.cc | 142 +- kchart/kchart_params.h | 28 +- kchart/kchart_part.cc | 400 +- kchart/kchart_part.h | 61 +- kchart/kchart_view.cc | 122 +- kchart/kchart_view.h | 9 +- kchart/kchartcolorarray.h | 6 +- kchart/kdchart/KDChart.cpp | 154 +- kchart/kdchart/KDChart.h | 40 +- kchart/kdchart/KDChartAreaPainter.cpp | 6 +- kchart/kdchart/KDChartAreaPainter.h | 2 +- kchart/kdchart/KDChartAxesPainter.cpp | 788 +- kchart/kdchart/KDChartAxesPainter.h | 66 +- kchart/kdchart/KDChartAxisParams.cpp | 240 +- kchart/kdchart/KDChartAxisParams.h | 205 +- kchart/kdchart/KDChartAxisParamsWrapper.cpp | 34 +- kchart/kdchart/KDChartAxisParamsWrapper.h | 31 +- kchart/kdchart/KDChartBWPainter.cpp | 102 +- kchart/kdchart/KDChartBWPainter.h | 10 +- kchart/kdchart/KDChartBarPainter.cpp | 142 +- kchart/kdchart/KDChartBarPainter.h | 14 +- kchart/kdchart/KDChartCustomBox.cpp | 150 +- kchart/kdchart/KDChartCustomBox.h | 165 +- kchart/kdchart/KDChartCustomBoxWrapper.cpp | 2 +- kchart/kdchart/KDChartCustomBoxWrapper.h | 5 +- kchart/kdchart/KDChartDataIntern.cpp | 34 +- kchart/kdchart/KDChartDataIntern.h | 160 +- kchart/kdchart/KDChartDataRegion.h | 66 +- kchart/kdchart/KDChartEnums.cpp | 8 +- kchart/kdchart/KDChartEnums.h | 57 +- kchart/kdchart/KDChartGlobal.h | 135 +- kchart/kdchart/KDChartHiLoPainter.cpp | 48 +- kchart/kdchart/KDChartHiLoPainter.h | 10 +- kchart/kdchart/KDChartLinesPainter.cpp | 124 +- kchart/kdchart/KDChartLinesPainter.h | 12 +- kchart/kdchart/KDChartListTable.h | 58 +- .../kdchart/KDChartNotEnoughSpaceException.h | 2 +- kchart/kdchart/KDChartObjectFactory.cpp | 196 +- kchart/kdchart/KDChartObjectFactory.h | 50 +- kchart/kdchart/KDChartPainter.cpp | 614 +- kchart/kdchart/KDChartPainter.h | 118 +- kchart/kdchart/KDChartParams.cpp | 784 +- kchart/kdchart/KDChartParams.h | 582 +- kchart/kdchart/KDChartParamsWrapper.cpp | 40 +- kchart/kdchart/KDChartParamsWrapper.h | 43 +- kchart/kdchart/KDChartParams_frame.cpp | 20 +- kchart/kdchart/KDChartParams_io.cpp | 594 +- kchart/kdchart/KDChartPiePainter.cpp | 124 +- kchart/kdchart/KDChartPiePainter.h | 24 +- kchart/kdchart/KDChartPolarPainter.cpp | 178 +- kchart/kdchart/KDChartPolarPainter.h | 26 +- kchart/kdchart/KDChartPropertySet.cpp | 60 +- kchart/kdchart/KDChartPropertySet.h | 99 +- kchart/kdchart/KDChartRingPainter.cpp | 62 +- kchart/kdchart/KDChartRingPainter.h | 8 +- kchart/kdchart/KDChartSeriesCollection.cpp | 26 +- kchart/kdchart/KDChartSeriesCollection.h | 18 +- kchart/kdchart/KDChartTable.h | 4 +- kchart/kdchart/KDChartTableBase.cpp | 178 +- kchart/kdchart/KDChartTableBase.h | 77 +- kchart/kdchart/KDChartTableDataWrapper.cpp | 6 +- kchart/kdchart/KDChartTableDataWrapper.h | 15 +- kchart/kdchart/KDChartTextPiece.cpp | 100 +- kchart/kdchart/KDChartTextPiece.h | 51 +- kchart/kdchart/KDChartUnknownTypeException.h | 8 +- kchart/kdchart/KDChartVectorSeries.cpp | 8 +- kchart/kdchart/KDChartVectorSeries.h | 14 +- kchart/kdchart/KDChartVectorTable.h | 45 +- kchart/kdchart/KDChartWidget.cpp | 72 +- kchart/kdchart/KDChartWidget.h | 53 +- kchart/kdchart/KDChartWrapperFactory.cpp | 12 +- kchart/kdchart/KDChartWrapperFactory.h | 6 +- kchart/kdchart/KDDrawText.cpp | 232 +- kchart/kdchart/KDDrawText.h | 44 +- kchart/kdchart/KDFrame.cpp | 124 +- kchart/kdchart/KDFrame.h | 149 +- kchart/kdchart/KDFrameProfileSection.cpp | 24 +- kchart/kdchart/KDFrameProfileSection.h | 38 +- kchart/kdchart/KDXMLTools.cpp | 330 +- kchart/kdchart/KDXMLTools.h | 128 +- kchart/kdchart/LICENSE | 4 +- kchart/kdchart/kdchart_export.h | 4 +- kchart/templates/BarChart.chrt | Bin 27432 -> 27438 bytes kchart/templates/Empty.chrt | Bin 9031 -> 9033 bytes kdgantt/KDGanttMinimizeSplitter.cpp | 590 +- kdgantt/KDGanttMinimizeSplitter.h | 120 +- kdgantt/KDGanttSemiSizingControl.cpp | 104 +- kdgantt/KDGanttSemiSizingControl.h | 39 +- kdgantt/KDGanttSizingControl.cpp | 10 +- kdgantt/KDGanttSizingControl.h | 11 +- kdgantt/KDGanttView.cpp | 1050 +- kdgantt/KDGanttView.h | 339 +- kdgantt/KDGanttViewEventItem.cpp | 56 +- kdgantt/KDGanttViewEventItem.h | 32 +- kdgantt/KDGanttViewItem.cpp | 590 +- kdgantt/KDGanttViewItem.h | 192 +- kdgantt/KDGanttViewItemDrag.cpp | 42 +- kdgantt/KDGanttViewItemDrag.h | 22 +- kdgantt/KDGanttViewSubwidgets.cpp | 856 +- kdgantt/KDGanttViewSubwidgets.h | 357 +- kdgantt/KDGanttViewSummaryItem.cpp | 52 +- kdgantt/KDGanttViewSummaryItem.h | 38 +- kdgantt/KDGanttViewTaskItem.cpp | 68 +- kdgantt/KDGanttViewTaskItem.h | 32 +- kdgantt/KDGanttViewTaskLink.cpp | 212 +- kdgantt/KDGanttViewTaskLink.h | 72 +- kdgantt/KDGanttViewTaskLinkGroup.cpp | 70 +- kdgantt/KDGanttViewTaskLinkGroup.h | 38 +- kdgantt/KDGanttXMLTools.cpp | 310 +- kdgantt/KDGanttXMLTools.h | 122 +- kdgantt/itemAttributeDialog.ui | 194 +- kdgantt/itemAttributeDialog.ui.h | 122 +- kdgantt/qlayoutengine_p.h | 54 +- kexi/3rdparty/kexisql/src/btree.c | 52 +- kexi/3rdparty/kexisql/src/btree_rb.c | 58 +- kexi/3rdparty/kexisql/src/build.c | 10 +- kexi/3rdparty/kexisql/src/encode.c | 6 +- kexi/3rdparty/kexisql/src/func.c | 18 +- kexi/3rdparty/kexisql/src/insert.c | 12 +- kexi/3rdparty/kexisql/src/main.c | 2 +- kexi/3rdparty/kexisql/src/os.c | 38 +- kexi/3rdparty/kexisql/src/pager.c | 6 +- kexi/3rdparty/kexisql/src/parse.c | 28 +- kexi/3rdparty/kexisql/src/parse.h | 2 +- kexi/3rdparty/kexisql/src/parse.y | 12 +- kexi/3rdparty/kexisql/src/pragma.c | 8 +- kexi/3rdparty/kexisql/src/select.c | 26 +- kexi/3rdparty/kexisql/src/sqlite.h | 2 +- kexi/3rdparty/kexisql/src/sqliteInt.h | 16 +- kexi/3rdparty/kexisql/src/tclsqlite.c | 2 +- kexi/3rdparty/kexisql/src/threadtest.c | 2 +- kexi/3rdparty/kexisql/src/tokenize.c | 2 +- kexi/3rdparty/kexisql/src/util.c | 2 +- kexi/3rdparty/kexisql/src/vdbe.c | 10 +- kexi/3rdparty/kexisql/src/vdbeInt.h | 2 +- kexi/3rdparty/kexisql/src/where.c | 70 +- kexi/3rdparty/kexisql/tool/lemon.c | 36 +- kexi/3rdparty/kexisql/tool/lempar.c | 2 +- kexi/3rdparty/kexisql3/src/alter.c | 8 +- kexi/3rdparty/kexisql3/src/btree.c | 140 +- kexi/3rdparty/kexisql3/src/build.c | 42 +- kexi/3rdparty/kexisql3/src/expr.c | 26 +- kexi/3rdparty/kexisql3/src/func.c | 12 +- kexi/3rdparty/kexisql3/src/insert.c | 12 +- kexi/3rdparty/kexisql3/src/keywordhash.h | 8 +- kexi/3rdparty/kexisql3/src/main.c | 6 +- kexi/3rdparty/kexisql3/src/os_mac.c | 32 +- kexi/3rdparty/kexisql3/src/os_unix.c | 4 +- kexi/3rdparty/kexisql3/src/os_win.c | 8 +- kexi/3rdparty/kexisql3/src/pager.c | 8 +- kexi/3rdparty/kexisql3/src/parse.c | 28 +- kexi/3rdparty/kexisql3/src/parse.h | 4 +- kexi/3rdparty/kexisql3/src/parse.y | 14 +- kexi/3rdparty/kexisql3/src/pragma.c | 16 +- kexi/3rdparty/kexisql3/src/prepare.c | 4 +- kexi/3rdparty/kexisql3/src/select.c | 44 +- kexi/3rdparty/kexisql3/src/sqlite3.h | 2 +- kexi/3rdparty/kexisql3/src/sqliteInt.h | 28 +- kexi/3rdparty/kexisql3/src/tclsqlite.c | 8 +- kexi/3rdparty/kexisql3/src/trigger.c | 6 +- kexi/3rdparty/kexisql3/src/utf.c | 14 +- kexi/3rdparty/kexisql3/src/vacuum.c | 4 +- kexi/3rdparty/kexisql3/src/vdbe.c | 22 +- kexi/3rdparty/kexisql3/src/vdbeInt.h | 6 +- kexi/3rdparty/kexisql3/src/vdbeaux.c | 18 +- kexi/3rdparty/kexisql3/src/vdbemem.c | 2 +- kexi/3rdparty/kexisql3/src/where.c | 192 +- kexi/3rdparty/kolibs/KoPageLayoutColumns.cpp | 24 +- kexi/3rdparty/kolibs/KoPageLayoutColumns.h | 19 +- .../kolibs/KoPageLayoutColumnsBase.ui | 16 +- kexi/3rdparty/kolibs/KoPageLayoutHeader.cpp | 14 +- kexi/3rdparty/kolibs/KoPageLayoutHeader.h | 9 +- .../3rdparty/kolibs/KoPageLayoutHeaderBase.ui | 44 +- kexi/3rdparty/kolibs/KoPageLayoutSize.cpp | 116 +- kexi/3rdparty/kolibs/KoPageLayoutSize.h | 27 +- kexi/3rdparty/kolibs/koGlobal.cc | 68 +- kexi/3rdparty/kolibs/koGlobal.h | 26 +- kexi/3rdparty/kolibs/koPageLayout.cpp | 60 +- kexi/3rdparty/kolibs/koPageLayout.h | 46 +- kexi/3rdparty/kolibs/koPageLayoutDia.cc | 194 +- kexi/3rdparty/kolibs/koPageLayoutDia.h | 70 +- kexi/3rdparty/kolibs/koUnit.cc | 58 +- kexi/3rdparty/kolibs/koUnit.h | 20 +- kexi/3rdparty/kolibs/koUnitWidgets.cc | 142 +- kexi/3rdparty/kolibs/koUnitWidgets.h | 36 +- kexi/Makefile.am | 2 +- kexi/core/kexi.cpp | 118 +- kexi/core/kexi.h | 60 +- kexi/core/kexiaboutdata.cpp | 2 +- kexi/core/kexiactioncategories.cpp | 20 +- kexi/core/kexiactionproxy.cpp | 76 +- kexi/core/kexiactionproxy.h | 58 +- kexi/core/kexiactionproxy_p.h | 5 +- kexi/core/kexiblobbuffer.cpp | 84 +- kexi/core/kexiblobbuffer.h | 55 +- kexi/core/kexicontexthelp.cpp | 12 +- kexi/core/kexicontexthelp.h | 7 +- kexi/core/kexicontexthelp_p.h | 6 +- kexi/core/kexidataiteminterface.cpp | 30 +- kexi/core/kexidataiteminterface.h | 52 +- kexi/core/kexidbconnectionset.cpp | 52 +- kexi/core/kexidbconnectionset.h | 12 +- kexi/core/kexidbshortcutfile.cpp | 66 +- kexi/core/kexidbshortcutfile.h | 18 +- kexi/core/kexidialogbase.cpp | 106 +- kexi/core/kexidialogbase.h | 65 +- kexi/core/kexidragobjects.cpp | 68 +- kexi/core/kexidragobjects.h | 46 +- kexi/core/kexievents.cpp | 16 +- kexi/core/kexievents.h | 60 +- kexi/core/kexiguimsghandler.cpp | 54 +- kexi/core/kexiguimsghandler.h | 26 +- kexi/core/kexiinternalpart.cpp | 52 +- kexi/core/kexiinternalpart.h | 55 +- kexi/core/keximainwindow.h | 27 +- kexi/core/kexipart.cpp | 82 +- kexi/core/kexipart.h | 57 +- kexi/core/kexipartguiclient.h | 6 +- kexi/core/kexipartinfo.cpp | 24 +- kexi/core/kexipartinfo.h | 18 +- kexi/core/kexipartinfo_p.h | 10 +- kexi/core/kexipartitem.h | 44 +- kexi/core/kexipartmanager.cpp | 40 +- kexi/core/kexipartmanager.h | 41 +- kexi/core/kexiproject.cpp | 134 +- kexi/core/kexiproject.h | 47 +- kexi/core/kexiprojectconnectiondata.cpp | 68 +- kexi/core/kexiprojectconnectiondata.h | 28 +- kexi/core/kexiprojectdata.cpp | 40 +- kexi/core/kexiprojectdata.h | 26 +- kexi/core/kexiprojectset.cpp | 10 +- kexi/core/kexiprojectset.h | 2 +- kexi/core/kexisearchandreplaceiface.h | 18 +- kexi/core/kexisharedactionhost.cpp | 58 +- kexi/core/kexisharedactionhost.h | 28 +- kexi/core/kexisharedactionhost_p.h | 19 +- kexi/core/kexistartupdata.cpp | 4 +- kexi/core/kexistartupdata.h | 6 +- kexi/core/kexistaticpart.cpp | 8 +- kexi/core/kexistaticpart.h | 12 +- kexi/core/kexitabledesignerinterface.h | 10 +- kexi/core/kexitemplateloader.cpp | 36 +- kexi/core/kexitemplateloader.h | 12 +- kexi/core/kexitextmsghandler.cpp | 10 +- kexi/core/kexitextmsghandler.h | 6 +- kexi/core/kexiuseraction.cpp | 18 +- kexi/core/kexiuseraction.h | 11 +- kexi/core/kexiuseractionmethod.cpp | 4 +- kexi/core/kexiuseractionmethod.h | 14 +- kexi/core/kexiviewbase.cpp | 82 +- kexi/core/kexiviewbase.h | 57 +- kexi/data/kde34compat/sqlite.magic | 2 +- kexi/doc/common/kde-default.css | 4 +- kexi/doc/common/kde-web.css | 4 +- kexi/doc/dev/kexi_guidelines.txt | 2 +- kexi/doc/dev/kexi_issues.txt | 2 +- kexi/doc/dev/kexidb_issues.txt | 2 +- .../html.tmp/01_02_00_db_spreadsheet.html | 2 +- .../html.tmp/02_04_00_differences.html | 2 +- .../html.tmp/05_01_00_table_designing.html | 2 +- .../html.tmp/05_04_00_form_designing.html | 86 +- kexi/doc/handbook/translation-status.txt | 10 +- kexi/doc/kexidb/kexidb.doxygen | 4 +- kexi/examples/Simple_Database.kexi.sql | 18 +- kexi/formeditor/commands.cpp | 514 +- kexi/formeditor/commands.h | 164 +- kexi/formeditor/connectiondialog.cpp | 128 +- kexi/formeditor/connectiondialog.h | 17 +- kexi/formeditor/container.cpp | 408 +- kexi/formeditor/container.h | 120 +- kexi/formeditor/editlistviewdialog.cpp | 160 +- kexi/formeditor/editlistviewdialog.h | 33 +- kexi/formeditor/events.cpp | 50 +- kexi/formeditor/events.h | 48 +- .../formeditor/factories/containerfactory.cpp | 418 +- kexi/formeditor/factories/containerfactory.h | 132 +- .../formeditor/factories/stdwidgetfactory.cpp | 340 +- kexi/formeditor/factories/stdwidgetfactory.h | 61 +- kexi/formeditor/form.cpp | 123 +- kexi/formeditor/form.h | 93 +- kexi/formeditor/formIO.cpp | 910 +- kexi/formeditor/formIO.h | 122 +- kexi/formeditor/formmanager.cpp | 428 +- kexi/formeditor/formmanager.h | 133 +- .../kdevelop_plugin/kfd_kdev_part.cpp | 248 +- .../kdevelop_plugin/kfd_kdev_part.h | 47 +- kexi/formeditor/kfdpixmapedit.cpp | 10 +- kexi/formeditor/kfdpixmapedit.h | 3 +- kexi/formeditor/libactionwidget.cpp | 8 +- kexi/formeditor/libactionwidget.h | 5 +- kexi/formeditor/objecttree.cpp | 96 +- kexi/formeditor/objecttree.h | 110 +- kexi/formeditor/objecttreeview.cpp | 110 +- kexi/formeditor/objecttreeview.h | 27 +- kexi/formeditor/resizehandle.cpp | 72 +- kexi/formeditor/resizehandle.h | 38 +- kexi/formeditor/richtextdialog.cpp | 58 +- kexi/formeditor/richtextdialog.h | 13 +- kexi/formeditor/scripting/formscript.cpp | 26 +- kexi/formeditor/scripting/formscript.h | 15 +- kexi/formeditor/scripting/scriptIO.cpp | 72 +- kexi/formeditor/scripting/scriptIO.h | 22 +- kexi/formeditor/scripting/scriptmanager.cpp | 8 +- kexi/formeditor/scripting/scriptmanager.h | 11 +- kexi/formeditor/spring.cpp | 60 +- kexi/formeditor/spring.h | 27 +- kexi/formeditor/tabstopdialog.cpp | 50 +- kexi/formeditor/tabstopdialog.h | 13 +- kexi/formeditor/test/kfd_mainwindow.cpp | 6 +- kexi/formeditor/test/kfd_mainwindow.h | 3 +- kexi/formeditor/test/kfd_part.cpp | 288 +- kexi/formeditor/test/kfd_part.h | 47 +- kexi/formeditor/utils.cpp | 103 +- kexi/formeditor/utils.h | 57 +- kexi/formeditor/widgetfactory.cpp | 240 +- kexi/formeditor/widgetfactory.h | 241 +- kexi/formeditor/widgetlibrary.cpp | 286 +- kexi/formeditor/widgetlibrary.h | 103 +- kexi/formeditor/widgetpropertyset.cpp | 374 +- kexi/formeditor/widgetpropertyset.h | 83 +- .../widgetwithsubpropertiesinterface.cpp | 42 +- .../widgetwithsubpropertiesinterface.h | 30 +- kexi/kexi_export.h | 2 +- kexi/kexi_global.h | 12 +- kexi/kexidb/admin.cpp | 2 +- kexi/kexidb/admin.h | 2 +- kexi/kexidb/alter.cpp | 132 +- kexi/kexidb/alter.h | 72 +- kexi/kexidb/connection.cpp | 788 +- kexi/kexidb/connection.h | 209 +- kexi/kexidb/connectiondata.cpp | 30 +- kexi/kexidb/connectiondata.h | 46 +- kexi/kexidb/cursor.cpp | 40 +- kexi/kexidb/cursor.h | 55 +- kexi/kexidb/cursor_p.h | 2 +- kexi/kexidb/dbobjectnamevalidator.cpp | 10 +- kexi/kexidb/dbobjectnamevalidator.h | 12 +- kexi/kexidb/dbproperties.cpp | 86 +- kexi/kexidb/dbproperties.h | 14 +- kexi/kexidb/driver.cpp | 112 +- kexi/kexidb/driver.h | 87 +- kexi/kexidb/driver_p.cpp | 28 +- kexi/kexidb/driver_p.h | 58 +- kexi/kexidb/drivermanager.cpp | 106 +- kexi/kexidb/drivermanager.h | 28 +- kexi/kexidb/drivermanager_p.h | 25 +- kexi/kexidb/drivers/mySQL/mySQL.pro | 6 +- kexi/kexidb/drivers/mySQL/mysqlconnection.cpp | 44 +- kexi/kexidb/drivers/mySQL/mysqlconnection.h | 27 +- .../drivers/mySQL/mysqlconnection_p.cpp | 38 +- kexi/kexidb/drivers/mySQL/mysqlconnection_p.h | 14 +- kexi/kexidb/drivers/mySQL/mysqlcursor.cpp | 32 +- kexi/kexidb/drivers/mySQL/mysqlcursor.h | 12 +- kexi/kexidb/drivers/mySQL/mysqldriver.cpp | 54 +- kexi/kexidb/drivers/mySQL/mysqldriver.h | 17 +- kexi/kexidb/drivers/mySQL/mysqlkeywords.cpp | 8 +- .../drivers/mySQL/mysqlpreparedstatement.cpp | 8 +- .../drivers/mySQL/mysqlpreparedstatement.h | 2 +- kexi/kexidb/drivers/odbc/odbcconnection.cpp | 22 +- kexi/kexidb/drivers/odbc/odbcconnection.h | 19 +- kexi/kexidb/drivers/odbc/odbcdriver.cpp | 22 +- kexi/kexidb/drivers/odbc/odbcdriver.h | 17 +- kexi/kexidb/drivers/pqxx/pqxxconnection.cpp | 66 +- kexi/kexidb/drivers/pqxx/pqxxconnection.h | 31 +- kexi/kexidb/drivers/pqxx/pqxxconnection_p.h | 6 +- kexi/kexidb/drivers/pqxx/pqxxcursor.cpp | 32 +- kexi/kexidb/drivers/pqxx/pqxxcursor.h | 32 +- kexi/kexidb/drivers/pqxx/pqxxdriver.cpp | 44 +- kexi/kexidb/drivers/pqxx/pqxxdriver.h | 29 +- .../drivers/pqxx/pqxxpreparedstatement.h | 4 +- kexi/kexidb/drivers/sqlite/sqlite_common.pro | 2 +- kexi/kexidb/drivers/sqlite/sqliteadmin.cpp | 8 +- kexi/kexidb/drivers/sqlite/sqliteadmin.h | 2 +- kexi/kexidb/drivers/sqlite/sqlitealter.cpp | 10 +- .../drivers/sqlite/sqliteconnection.cpp | 76 +- kexi/kexidb/drivers/sqlite/sqliteconnection.h | 31 +- .../drivers/sqlite/sqliteconnection_p.h | 4 +- kexi/kexidb/drivers/sqlite/sqlitecursor.cpp | 116 +- kexi/kexidb/drivers/sqlite/sqlitecursor.h | 12 +- kexi/kexidb/drivers/sqlite/sqlitedriver.cpp | 36 +- kexi/kexidb/drivers/sqlite/sqlitedriver.h | 21 +- .../sqlite/sqlitepreparedstatement.cpp | 14 +- kexi/kexidb/drivers/sqlite/sqlitevacuum.cpp | 42 +- kexi/kexidb/drivers/sqlite/sqlitevacuum.h | 15 +- kexi/kexidb/drivers/sqlite2/sqlite2.pro | 4 +- kexi/kexidb/error.h | 8 +- kexi/kexidb/expression.cpp | 158 +- kexi/kexidb/expression.h | 70 +- kexi/kexidb/field.cpp | 160 +- kexi/kexidb/field.h | 132 +- kexi/kexidb/fieldlist.cpp | 72 +- kexi/kexidb/fieldlist.h | 62 +- kexi/kexidb/fieldvalidator.cpp | 14 +- kexi/kexidb/fieldvalidator.h | 6 +- kexi/kexidb/global.cpp | 2 +- kexi/kexidb/global.h | 12 +- kexi/kexidb/indexschema.cpp | 34 +- kexi/kexidb/indexschema.h | 26 +- kexi/kexidb/kexidb.pro | 2 +- kexi/kexidb/kexidb_export.h | 2 +- kexi/kexidb/keywords.cpp | 2 +- kexi/kexidb/lookupfieldschema.cpp | 148 +- kexi/kexidb/lookupfieldschema.h | 50 +- kexi/kexidb/msghandler.cpp | 10 +- kexi/kexidb/msghandler.h | 24 +- kexi/kexidb/object.cpp | 34 +- kexi/kexidb/object.h | 42 +- kexi/kexidb/parser/parser.cpp | 10 +- kexi/kexidb/parser/parser.h | 24 +- kexi/kexidb/parser/parser_p.cpp | 100 +- kexi/kexidb/parser/parser_p.h | 20 +- kexi/kexidb/parser/sqlparser.cpp | 84 +- kexi/kexidb/parser/sqlparser.h | 36 +- kexi/kexidb/parser/sqlparser.y | 6 +- kexi/kexidb/parser/sqlscanner.cpp | 16 +- kexi/kexidb/parser/sqltypes.h | 16 +- kexi/kexidb/preparedstatement.cpp | 20 +- kexi/kexidb/preparedstatement.h | 14 +- kexi/kexidb/queryschema.cpp | 362 +- kexi/kexidb/queryschema.h | 108 +- kexi/kexidb/queryschemaparameter.cpp | 30 +- kexi/kexidb/queryschemaparameter.h | 22 +- kexi/kexidb/record.h | 28 +- kexi/kexidb/relationship.cpp | 2 +- kexi/kexidb/relationship.h | 4 +- kexi/kexidb/roweditbuffer.cpp | 24 +- kexi/kexidb/roweditbuffer.h | 30 +- kexi/kexidb/schemadata.cpp | 14 +- kexi/kexidb/schemadata.h | 28 +- kexi/kexidb/simplecommandlineapp.cpp | 18 +- kexi/kexidb/simplecommandlineapp.h | 2 +- kexi/kexidb/tableschema.cpp | 42 +- kexi/kexidb/tableschema.h | 30 +- kexi/kexidb/transaction.cpp | 4 +- kexi/kexidb/transaction.h | 4 +- kexi/kexidb/utils.cpp | 350 +- kexi/kexidb/utils.h | 192 +- kexi/kexidb/utils_p.h | 11 +- kexi/kexiutils/debuggui.cpp | 58 +- kexi/kexiutils/identifier.cpp | 58 +- kexi/kexiutils/identifier.h | 20 +- kexi/kexiutils/longlongvalidator.cpp | 42 +- kexi/kexiutils/longlongvalidator.h | 28 +- kexi/kexiutils/styleproxy.cpp | 12 +- kexi/kexiutils/styleproxy.h | 134 +- kexi/kexiutils/transliteration_table.h | 2 +- kexi/kexiutils/tristate.h | 16 +- kexi/kexiutils/utils.cpp | 210 +- kexi/kexiutils/utils.h | 116 +- kexi/kexiutils/utils_p.h | 19 +- kexi/kexiutils/validator.cpp | 48 +- kexi/kexiutils/validator.h | 62 +- kexi/main.cpp | 8 +- kexi/main/kexifinddialog.cpp | 112 +- kexi/main/kexifinddialog.h | 29 +- kexi/main/kexifinddialogbase.ui | 34 +- kexi/main/keximainwindowimpl.cpp | 938 +- kexi/main/keximainwindowimpl.h | 93 +- kexi/main/keximainwindowimpl_p.h | 144 +- kexi/main/kexinamedialog.cpp | 48 +- kexi/main/kexinamedialog.h | 17 +- kexi/main/kexinamewidget.cpp | 84 +- kexi/main/kexinamewidget.h | 61 +- kexi/main/kexinewstuff.cpp | 20 +- kexi/main/kexinewstuff.h | 6 +- kexi/main/kexistatusbar.cpp | 40 +- kexi/main/kexistatusbar.h | 15 +- kexi/main/ksplitter.h | 47 +- .../printing/kexisimpleprintingengine.cpp | 118 +- kexi/main/printing/kexisimpleprintingengine.h | 41 +- .../printing/kexisimpleprintingpagesetup.cpp | 162 +- .../printing/kexisimpleprintingpagesetup.h | 22 +- .../kexisimpleprintingpagesetupbase.ui | 52 +- kexi/main/printing/kexisimpleprintingpart.cpp | 6 +- kexi/main/printing/kexisimpleprintingpart.h | 5 +- .../printing/kexisimpleprintpreviewwindow.cpp | 130 +- .../printing/kexisimpleprintpreviewwindow.h | 11 +- .../printing/kexisimpleprintpreviewwindow_p.h | 11 +- kexi/main/startup/KexiConnSelector.cpp | 148 +- kexi/main/startup/KexiConnSelector.h | 21 +- kexi/main/startup/KexiConnSelectorBase.ui | 34 +- kexi/main/startup/KexiDBTitlePage.cpp | 6 +- kexi/main/startup/KexiDBTitlePage.h | 5 +- kexi/main/startup/KexiDBTitlePageBase.ui | 12 +- kexi/main/startup/KexiNewPrjTypeSelector.ui | 10 +- kexi/main/startup/KexiNewProjectWizard.cpp | 112 +- kexi/main/startup/KexiNewProjectWizard.h | 21 +- kexi/main/startup/KexiOpenExistingFile.ui | 28 +- kexi/main/startup/KexiProjectSelector.cpp | 58 +- kexi/main/startup/KexiProjectSelector.h | 12 +- kexi/main/startup/KexiProjectSelectorBase.ui | 12 +- kexi/main/startup/KexiServerDBNamePage.ui | 24 +- kexi/main/startup/KexiStartup.cpp | 216 +- kexi/main/startup/KexiStartup.h | 26 +- kexi/main/startup/KexiStartupDialog.cpp | 190 +- kexi/main/startup/KexiStartupDialog.h | 29 +- .../KexiStartupDialogTemplatesPage.cpp | 56 +- .../startup/KexiStartupDialogTemplatesPage.h | 17 +- kexi/main/startup/KexiStartupFileDialog.cpp | 156 +- kexi/main/startup/KexiStartupFileDialog.h | 33 +- .../startup/KexiStartupFileDialogBase_win.h | 36 +- .../startup/KexiStartupFileDialog_win.cpp | 222 +- kexi/main/startup/KexiStartup_p.cpp | 32 +- kexi/main/startup/KexiStartup_p.h | 11 +- kexi/migration/importoptionsdlg.cpp | 36 +- kexi/migration/importoptionsdlg.h | 7 +- kexi/migration/importwizard.cpp | 204 +- kexi/migration/importwizard.h | 43 +- kexi/migration/keximigrate.cpp | 162 +- kexi/migration/keximigrate.h | 73 +- kexi/migration/keximigratedata.h | 4 +- kexi/migration/migratemanager.cpp | 96 +- kexi/migration/migratemanager.h | 24 +- kexi/migration/migratemanager_p.h | 23 +- kexi/migration/mysql/mysqlmigrate.cpp | 94 +- kexi/migration/mysql/mysqlmigrate.h | 27 +- kexi/migration/pqxx/pg_type.h | 4 +- kexi/migration/pqxx/pqxxmigrate.cpp | 66 +- kexi/migration/pqxx/pqxxmigrate.h | 23 +- .../forms/kexiactionselectiondialog.cpp | 288 +- .../plugins/forms/kexiactionselectiondialog.h | 23 +- .../forms/kexiactionselectiondialog_p.h | 9 +- .../plugins/forms/kexidataawarewidgetinfo.cpp | 4 +- kexi/plugins/forms/kexidataawarewidgetinfo.h | 2 +- kexi/plugins/forms/kexidataprovider.cpp | 96 +- kexi/plugins/forms/kexidataprovider.h | 24 +- kexi/plugins/forms/kexidatasourcepage.cpp | 160 +- kexi/plugins/forms/kexidatasourcepage.h | 43 +- kexi/plugins/forms/kexidbfactory.cpp | 132 +- kexi/plugins/forms/kexidbfactory.h | 33 +- .../forms/kexidbtextwidgetinterface.cpp | 18 +- .../plugins/forms/kexidbtextwidgetinterface.h | 12 +- .../forms/kexiformdataiteminterface.cpp | 8 +- .../plugins/forms/kexiformdataiteminterface.h | 28 +- kexi/plugins/forms/kexiformeventhandler.cpp | 44 +- kexi/plugins/forms/kexiformeventhandler.h | 18 +- kexi/plugins/forms/kexiformmanager.cpp | 70 +- kexi/plugins/forms/kexiformmanager.h | 23 +- kexi/plugins/forms/kexiformpart.cpp | 222 +- kexi/plugins/forms/kexiformpart.h | 33 +- kexi/plugins/forms/kexiformscrollview.cpp | 74 +- kexi/plugins/forms/kexiformscrollview.h | 37 +- kexi/plugins/forms/kexiformview.cpp | 360 +- kexi/plugins/forms/kexiformview.h | 41 +- .../plugins/forms/widgets/kexidbautofield.cpp | 298 +- kexi/plugins/forms/widgets/kexidbautofield.h | 107 +- kexi/plugins/forms/widgets/kexidbcheckbox.cpp | 40 +- kexi/plugins/forms/widgets/kexidbcheckbox.h | 33 +- kexi/plugins/forms/widgets/kexidbcombobox.cpp | 248 +- kexi/plugins/forms/widgets/kexidbcombobox.h | 67 +- kexi/plugins/forms/widgets/kexidbdateedit.cpp | 80 +- kexi/plugins/forms/widgets/kexidbdateedit.h | 69 +- .../forms/widgets/kexidbdatetimeedit.cpp | 96 +- .../forms/widgets/kexidbdatetimeedit.h | 47 +- .../forms/widgets/kexidbdoublespinbox.cpp | 18 +- .../forms/widgets/kexidbdoublespinbox.h | 27 +- kexi/plugins/forms/widgets/kexidbform.cpp | 280 +- kexi/plugins/forms/widgets/kexidbform.h | 61 +- kexi/plugins/forms/widgets/kexidbimagebox.cpp | 316 +- kexi/plugins/forms/widgets/kexidbimagebox.h | 123 +- .../forms/widgets/kexidbintspinbox.cpp | 18 +- kexi/plugins/forms/widgets/kexidbintspinbox.h | 27 +- kexi/plugins/forms/widgets/kexidblabel.cpp | 220 +- kexi/plugins/forms/widgets/kexidblabel.h | 75 +- kexi/plugins/forms/widgets/kexidblineedit.cpp | 94 +- kexi/plugins/forms/widgets/kexidblineedit.h | 49 +- kexi/plugins/forms/widgets/kexidbsubform.cpp | 50 +- kexi/plugins/forms/widgets/kexidbsubform.h | 19 +- kexi/plugins/forms/widgets/kexidbtextedit.cpp | 56 +- kexi/plugins/forms/widgets/kexidbtextedit.h | 33 +- kexi/plugins/forms/widgets/kexidbtimeedit.cpp | 46 +- kexi/plugins/forms/widgets/kexidbtimeedit.h | 35 +- kexi/plugins/forms/widgets/kexidbutils.cpp | 14 +- kexi/plugins/forms/widgets/kexidbutils.h | 18 +- kexi/plugins/forms/widgets/kexiframe.cpp | 24 +- kexi/plugins/forms/widgets/kexiframe.h | 47 +- .../forms/widgets/kexiframeutils_p.cpp | 128 +- kexi/plugins/forms/widgets/kexipushbutton.cpp | 4 +- kexi/plugins/forms/widgets/kexipushbutton.h | 15 +- .../csv/kexicsv_importexportpart.cpp | 20 +- .../csv/kexicsv_importexportpart.h | 8 +- .../importexport/csv/kexicsvexport.cpp | 42 +- kexi/plugins/importexport/csv/kexicsvexport.h | 12 +- .../importexport/csv/kexicsvexportwizard.cpp | 112 +- .../importexport/csv/kexicsvexportwizard.h | 29 +- .../importexport/csv/kexicsvimportdialog.cpp | 508 +- .../importexport/csv/kexicsvimportdialog.h | 105 +- .../csv/kexicsvimportoptionsdlg.cpp | 28 +- .../csv/kexicsvimportoptionsdlg.h | 11 +- .../importexport/csv/kexicsvwidgets.cpp | 114 +- .../plugins/importexport/csv/kexicsvwidgets.h | 55 +- .../macros/kexiactions/datatableaction.cpp | 48 +- .../macros/kexiactions/datatableaction.h | 3 +- .../macros/kexiactions/executeaction.cpp | 18 +- .../macros/kexiactions/executeaction.h | 3 +- .../plugins/macros/kexiactions/kexiaction.cpp | 2 +- kexi/plugins/macros/kexiactions/kexiaction.h | 2 +- .../plugins/macros/kexiactions/kexivariable.h | 4 +- .../macros/kexiactions/messageaction.cpp | 8 +- .../macros/kexiactions/messageaction.h | 1 + .../macros/kexiactions/navigateaction.cpp | 12 +- .../macros/kexiactions/navigateaction.h | 3 +- .../macros/kexiactions/objectnamevariable.h | 12 +- .../macros/kexiactions/objectvariable.h | 10 +- .../plugins/macros/kexiactions/openaction.cpp | 48 +- kexi/plugins/macros/kexiactions/openaction.h | 3 +- .../macros/kexipart/keximacrodesignview.cpp | 90 +- .../macros/kexipart/keximacrodesignview.h | 11 +- .../macros/kexipart/keximacroerror.cpp | 22 +- kexi/plugins/macros/kexipart/keximacroerror.h | 9 +- .../macros/kexipart/keximacroerrorbase.ui | 32 +- .../plugins/macros/kexipart/keximacropart.cpp | 22 +- kexi/plugins/macros/kexipart/keximacropart.h | 17 +- .../macros/kexipart/keximacroproperty.cpp | 242 +- .../macros/kexipart/keximacroproperty.h | 44 +- .../macros/kexipart/keximacrotextview.cpp | 20 +- .../macros/kexipart/keximacrotextview.h | 5 +- .../plugins/macros/kexipart/keximacroview.cpp | 34 +- kexi/plugins/macros/kexipart/keximacroview.h | 7 +- kexi/plugins/macros/lib/action.cpp | 54 +- kexi/plugins/macros/lib/action.h | 45 +- kexi/plugins/macros/lib/context.cpp | 52 +- kexi/plugins/macros/lib/context.h | 17 +- kexi/plugins/macros/lib/exception.cpp | 16 +- kexi/plugins/macros/lib/exception.h | 12 +- kexi/plugins/macros/lib/macro.cpp | 26 +- kexi/plugins/macros/lib/macro.h | 29 +- kexi/plugins/macros/lib/macroitem.cpp | 64 +- kexi/plugins/macros/lib/macroitem.h | 24 +- kexi/plugins/macros/lib/manager.cpp | 54 +- kexi/plugins/macros/lib/manager.h | 50 +- kexi/plugins/macros/lib/metamethod.cpp | 130 +- kexi/plugins/macros/lib/metamethod.h | 50 +- kexi/plugins/macros/lib/metaobject.cpp | 44 +- kexi/plugins/macros/lib/metaobject.h | 26 +- kexi/plugins/macros/lib/metaparameter.cpp | 36 +- kexi/plugins/macros/lib/metaparameter.h | 36 +- kexi/plugins/macros/lib/variable.cpp | 76 +- kexi/plugins/macros/lib/variable.h | 86 +- kexi/plugins/macros/lib/xmlhandler.cpp | 52 +- kexi/plugins/macros/lib/xmlhandler.h | 16 +- kexi/plugins/macros/tests/actiontests.cpp | 32 +- kexi/plugins/macros/tests/actiontests.h | 1 + kexi/plugins/macros/tests/commontests.cpp | 246 +- kexi/plugins/macros/tests/commontests.h | 5 +- kexi/plugins/macros/tests/komacrotestbase.h | 18 +- kexi/plugins/macros/tests/macroitemtests.cpp | 26 +- kexi/plugins/macros/tests/macroitemtests.h | 1 + kexi/plugins/macros/tests/macrotests.cpp | 32 +- kexi/plugins/macros/tests/macrotests.h | 1 + kexi/plugins/macros/tests/testaction.cpp | 8 +- kexi/plugins/macros/tests/testaction.h | 3 +- kexi/plugins/macros/tests/testobject.cpp | 28 +- kexi/plugins/macros/tests/testobject.h | 13 +- kexi/plugins/macros/tests/variabletests.cpp | 26 +- kexi/plugins/macros/tests/variabletests.h | 1 + kexi/plugins/macros/tests/xmlhandlertests.cpp | 180 +- kexi/plugins/macros/tests/xmlhandlertests.h | 15 +- .../plugins/macros/tests/xmlhandlertests2.cpp | 232 +- kexi/plugins/macros/tests/xmlhandlertests2.h | 19 +- kexi/plugins/migration/keximigrationpart.cpp | 10 +- kexi/plugins/migration/keximigrationpart.h | 8 +- kexi/plugins/queries/kexiaddparamdialog.cpp | 8 +- kexi/plugins/queries/kexiaddparamdialog.h | 5 +- kexi/plugins/queries/kexiaddparamwidget.ui | 36 +- .../kexidynamicqueryparameterdialog.cpp | 24 +- .../queries/kexidynamicqueryparameterdialog.h | 11 +- .../queries/kexiparameterlisteditor.ui | 10 +- .../queries/kexiquerydesignerguieditor.cpp | 446 +- .../queries/kexiquerydesignerguieditor.h | 43 +- kexi/plugins/queries/kexiquerydesignersql.cpp | 146 +- kexi/plugins/queries/kexiquerydesignersql.h | 17 +- .../queries/kexiquerydesignersqlhistory.cpp | 166 +- .../queries/kexiquerydesignersqlhistory.h | 59 +- kexi/plugins/queries/kexiquerypart.cpp | 50 +- kexi/plugins/queries/kexiquerypart.h | 21 +- kexi/plugins/queries/kexiqueryview.cpp | 18 +- kexi/plugins/queries/kexiqueryview.h | 7 +- .../plugins/relations/kexirelationmaindlg.cpp | 20 +- kexi/plugins/relations/kexirelationmaindlg.h | 9 +- .../relations/kexirelationpartimpl.cpp | 14 +- kexi/plugins/relations/kexirelationpartimpl.h | 13 +- kexi/plugins/reports/kexireportfactory.cpp | 62 +- kexi/plugins/reports/kexireportfactory.h | 29 +- kexi/plugins/reports/kexireportform.cpp | 92 +- kexi/plugins/reports/kexireportform.h | 27 +- kexi/plugins/reports/kexireportpart.cpp | 20 +- kexi/plugins/reports/kexireportpart.h | 23 +- kexi/plugins/reports/kexireportview.cpp | 112 +- kexi/plugins/reports/kexireportview.h | 16 +- kexi/plugins/reports/reportwidgets.cpp | 56 +- kexi/plugins/reports/reportwidgets.h | 58 +- .../scripting/kexiapp/kexiappmainwindow.cpp | 4 +- .../scripting/kexiapp/kexiappmainwindow.h | 8 +- .../scripting/kexiapp/kexiappmodule.cpp | 2 +- .../plugins/scripting/kexiapp/kexiappmodule.h | 6 +- kexi/plugins/scripting/kexiapp/kexiapppart.h | 6 +- kexi/plugins/scripting/kexidb.doxyfile | 4 +- .../scripting/kexidb/kexidbconnection.cpp | 54 +- .../scripting/kexidb/kexidbconnection.h | 34 +- .../scripting/kexidb/kexidbconnectiondata.cpp | 46 +- .../scripting/kexidb/kexidbconnectiondata.h | 48 +- .../plugins/scripting/kexidb/kexidbcursor.cpp | 18 +- kexi/plugins/scripting/kexidb/kexidbcursor.h | 12 +- .../plugins/scripting/kexidb/kexidbdriver.cpp | 20 +- kexi/plugins/scripting/kexidb/kexidbdriver.h | 22 +- .../scripting/kexidb/kexidbdrivermanager.cpp | 46 +- .../scripting/kexidb/kexidbdrivermanager.h | 16 +- kexi/plugins/scripting/kexidb/kexidbfield.cpp | 30 +- kexi/plugins/scripting/kexidb/kexidbfield.h | 36 +- .../scripting/kexidb/kexidbfieldlist.cpp | 12 +- .../scripting/kexidb/kexidbfieldlist.h | 10 +- .../plugins/scripting/kexidb/kexidbmodule.cpp | 4 +- kexi/plugins/scripting/kexidb/kexidbmodule.h | 8 +- .../plugins/scripting/kexidb/kexidbparser.cpp | 12 +- kexi/plugins/scripting/kexidb/kexidbparser.h | 14 +- .../plugins/scripting/kexidb/kexidbschema.cpp | 50 +- kexi/plugins/scripting/kexidb/kexidbschema.h | 26 +- .../scripting/kexidb/kexidbtransaction.cpp | 2 +- .../scripting/kexidb/kexidbtransaction.h | 4 +- .../kexiscripting/kexiscriptdesignview.cpp | 104 +- .../kexiscripting/kexiscriptdesignview.h | 3 +- .../kexiscripting/kexiscripteditor.cpp | 14 +- .../kexiscripting/kexiscripteditor.h | 3 +- .../kexiscripting/kexiscriptpart.cpp | 26 +- .../scripting/kexiscripting/kexiscriptpart.h | 19 +- .../scripts/copycenter/CopyCenter.py | 78 +- .../copycenter/CopyCenterPluginKexiDB.py | 48 +- .../copycenter/CopyCenterPluginQtSQL.py | 36 +- .../scripts/exportxhtml/ExportXHTML.py | 4 +- .../scripts/importxhtml/ImportXHTML.py | 4 +- kexi/plugins/tables/kexilookupcolumnpage.cpp | 108 +- kexi/plugins/tables/kexilookupcolumnpage.h | 21 +- .../tables/kexitabledesigner_dataview.cpp | 6 +- .../tables/kexitabledesigner_dataview.h | 3 +- .../tables/kexitabledesignercommands.cpp | 78 +- .../tables/kexitabledesignercommands.h | 52 +- kexi/plugins/tables/kexitabledesignerview.cpp | 500 +- kexi/plugins/tables/kexitabledesignerview.h | 29 +- .../tables/kexitabledesignerview_p.cpp | 38 +- kexi/plugins/tables/kexitabledesignerview_p.h | 25 +- kexi/plugins/tables/kexitablepart.cpp | 60 +- kexi/plugins/tables/kexitablepart.h | 17 +- kexi/tests/altertable/1.kexi | Bin 49150 -> 49212 bytes kexi/tests/altertable/altertable.cpp | 238 +- kexi/tests/altertable/altertable.h | 23 +- kexi/tests/gui/finddialog/finddialog.pro | 4 +- kexi/tests/gui/finddialog/kexifinddialog.cpp | 10 +- kexi/tests/gui/finddialog/kexifinddialog.h | 15 +- .../gui/finddialog/kexifinddialogbase.ui | 32 +- kexi/tests/newapi/dr_prop_test.h | 10 +- kexi/tests/newapi/main.cpp | 34 +- kexi/tests/newapi/mysqlcursor.cpp | 8 +- kexi/tests/newapi/parser_test.h | 12 +- kexi/tests/newapi/statements.txt | 2 +- kexi/tests/newapi/tables_test.h | 22 +- kexi/tests/newapi/tableview_test.h | 2 +- kexi/tests/parser/main.cpp | 14 +- kexi/tests/startup/main.cpp | 16 +- kexi/tests/widgets/kexidbdrivercombotest.cpp | 12 +- kexi/tools/delete_column/kexi_delete_column | 2 +- kexi/widget/kexibrowser.cpp | 216 +- kexi/widget/kexibrowser.h | 41 +- kexi/widget/kexibrowser_p.h | 7 +- kexi/widget/kexibrowseritem.cpp | 18 +- kexi/widget/kexibrowseritem.h | 18 +- kexi/widget/kexicharencodingcombobox.cpp | 34 +- kexi/widget/kexicharencodingcombobox.h | 12 +- kexi/widget/kexicustompropertyfactory.cpp | 32 +- kexi/widget/kexicustompropertyfactory.h | 4 +- kexi/widget/kexicustompropertyfactory_p.cpp | 38 +- kexi/widget/kexicustompropertyfactory_p.h | 16 +- kexi/widget/kexidataawareview.cpp | 106 +- kexi/widget/kexidataawareview.h | 27 +- kexi/widget/kexidatasourcecombobox.cpp | 60 +- kexi/widget/kexidatasourcecombobox.h | 17 +- kexi/widget/kexidatatable.cpp | 18 +- kexi/widget/kexidatatable.h | 5 +- kexi/widget/kexidbconnectionwidget.cpp | 98 +- kexi/widget/kexidbconnectionwidget.h | 21 +- kexi/widget/kexidbconnectionwidgetbase.ui | 62 +- .../kexidbconnectionwidgetdetailsbase.ui | 30 +- kexi/widget/kexidbdrivercombobox.cpp | 24 +- kexi/widget/kexidbdrivercombobox.h | 19 +- kexi/widget/kexidswelcome.cpp | 28 +- kexi/widget/kexidswelcome.h | 7 +- kexi/widget/kexieditor.cpp | 66 +- kexi/widget/kexieditor.h | 15 +- kexi/widget/kexifieldcombobox.cpp | 72 +- kexi/widget/kexifieldcombobox.h | 19 +- kexi/widget/kexifieldlistview.cpp | 54 +- kexi/widget/kexifieldlistview.h | 23 +- kexi/widget/kexifilterdlg.cpp | 78 +- kexi/widget/kexifilterdlg.h | 23 +- kexi/widget/kexiprjtypeselector.cpp | 8 +- kexi/widget/kexiprjtypeselector.h | 3 +- kexi/widget/kexiprjtypeselectorbase.ui | 24 +- kexi/widget/kexiprjtypeselectorbase.ui.h | 2 +- kexi/widget/kexipropertyeditorview.cpp | 84 +- kexi/widget/kexipropertyeditorview.h | 41 +- kexi/widget/kexiquerydesignersqleditor.cpp | 4 +- kexi/widget/kexiquerydesignersqleditor.h | 7 +- kexi/widget/kexiqueryparameters.cpp | 58 +- kexi/widget/kexiqueryparameters.h | 6 +- kexi/widget/kexiscrollview.cpp | 138 +- kexi/widget/kexiscrollview.h | 39 +- kexi/widget/kexisectionheader.cpp | 88 +- kexi/widget/kexisectionheader.h | 17 +- kexi/widget/kexismalltoolbutton.cpp | 70 +- kexi/widget/kexismalltoolbutton.h | 31 +- kexi/widget/pixmapcollection.cpp | 224 +- kexi/widget/pixmapcollection.h | 84 +- kexi/widget/relations/kexirelationview.cpp | 148 +- kexi/widget/relations/kexirelationview.h | 59 +- .../relations/kexirelationviewconnection.cpp | 80 +- .../relations/kexirelationviewconnection.h | 34 +- .../relations/kexirelationviewtable.cpp | 198 +- kexi/widget/relations/kexirelationviewtable.h | 63 +- kexi/widget/relations/kexirelationwidget.cpp | 154 +- kexi/widget/relations/kexirelationwidget.h | 37 +- kexi/widget/tableview/kexiblobtableedit.cpp | 224 +- kexi/widget/tableview/kexiblobtableedit.h | 57 +- kexi/widget/tableview/kexibooltableedit.cpp | 72 +- kexi/widget/tableview/kexibooltableedit.h | 21 +- .../tableview/kexicelleditorfactory.cpp | 32 +- kexi/widget/tableview/kexicelleditorfactory.h | 24 +- kexi/widget/tableview/kexicomboboxbase.cpp | 130 +- kexi/widget/tableview/kexicomboboxbase.h | 36 +- kexi/widget/tableview/kexicomboboxpopup.cpp | 86 +- kexi/widget/tableview/kexicomboboxpopup.h | 11 +- .../tableview/kexicomboboxtableedit.cpp | 110 +- kexi/widget/tableview/kexicomboboxtableedit.h | 45 +- .../tableview/kexidataawareobjectiface.cpp | 298 +- .../tableview/kexidataawareobjectiface.h | 116 +- .../tableview/kexidataawarepropertyset.cpp | 50 +- .../tableview/kexidataawarepropertyset.h | 25 +- kexi/widget/tableview/kexidatatableview.cpp | 20 +- kexi/widget/tableview/kexidatatableview.h | 9 +- kexi/widget/tableview/kexidatetableedit.cpp | 116 +- kexi/widget/tableview/kexidatetableedit.h | 21 +- .../tableview/kexidatetimetableedit.cpp | 62 +- kexi/widget/tableview/kexidatetimetableedit.h | 19 +- kexi/widget/tableview/kexiinputtableedit.cpp | 116 +- kexi/widget/tableview/kexiinputtableedit.h | 31 +- kexi/widget/tableview/kexitableedit.cpp | 72 +- kexi/widget/tableview/kexitableedit.h | 67 +- kexi/widget/tableview/kexitableitem.cpp | 4 +- kexi/widget/tableview/kexitableitem.h | 8 +- kexi/widget/tableview/kexitableview.cpp | 690 +- kexi/widget/tableview/kexitableview.h | 171 +- kexi/widget/tableview/kexitableview_p.cpp | 8 +- kexi/widget/tableview/kexitableview_p.h | 32 +- kexi/widget/tableview/kexitableviewdata.cpp | 124 +- kexi/widget/tableview/kexitableviewdata.h | 123 +- kexi/widget/tableview/kexitableviewheader.cpp | 108 +- kexi/widget/tableview/kexitableviewheader.h | 31 +- kexi/widget/tableview/kexitextformatter.cpp | 36 +- kexi/widget/tableview/kexitextformatter.h | 14 +- kexi/widget/tableview/kexitimetableedit.cpp | 64 +- kexi/widget/tableview/kexitimetableedit.h | 21 +- kexi/widget/utils/kexiarrowtip.cpp | 68 +- kexi/widget/utils/kexiarrowtip.h | 9 +- .../utils/kexicomboboxdropdownbutton.cpp | 44 +- .../widget/utils/kexicomboboxdropdownbutton.h | 10 +- kexi/widget/utils/kexicontextmenuutils.cpp | 102 +- kexi/widget/utils/kexicontextmenuutils.h | 15 +- kexi/widget/utils/kexidatetimeformatter.cpp | 186 +- kexi/widget/utils/kexidatetimeformatter.h | 80 +- kexi/widget/utils/kexidisplayutils.cpp | 66 +- kexi/widget/utils/kexidisplayutils.h | 18 +- kexi/widget/utils/kexidropdownbutton.cpp | 50 +- kexi/widget/utils/kexidropdownbutton.h | 15 +- kexi/widget/utils/kexiflowlayout.cpp | 329 +- kexi/widget/utils/kexiflowlayout.h | 52 +- kexi/widget/utils/kexigradientwidget.cpp | 134 +- kexi/widget/utils/kexigradientwidget.h | 79 +- kexi/widget/utils/kexirecordmarker.cpp | 86 +- kexi/widget/utils/kexirecordmarker.h | 19 +- kexi/widget/utils/kexirecordnavigator.cpp | 168 +- kexi/widget/utils/kexirecordnavigator.h | 47 +- kexi/widget/utils/kexisharedactionclient.h | 4 +- kexi/widget/utils/kexitooltip.cpp | 46 +- kexi/widget/utils/kexitooltip.h | 19 +- kexi/widget/utils/klistviewitemtemplate.h | 34 +- kformula/DESIGN | 66 +- kformula/formulastring.cc | 50 +- kformula/formulastring.h | 31 +- kformula/fsparser.cc | 228 +- kformula/fsparser.h | 24 +- kformula/kfconfig.cc | 14 +- kformula/kfconfig.h | 3 +- kformula/kformula_doc.cc | 76 +- kformula/kformula_doc.h | 29 +- kformula/kformula_factory.cc | 10 +- kformula/kformula_factory.h | 5 +- kformula/kformula_view.cc | 64 +- kformula/kformula_view.h | 19 +- kformula/kformula_view_iface.cc | 6 +- kformula/kformula_view_iface.h | 10 +- kformula/kformulawidget.cc | 48 +- kformula/kformulawidget.h | 33 +- kivio/LICENSE | 4 +- kivio/kivio.spec | 6 +- kivio/kiviopart/KIvioDocIface.h | 2 +- kivio/kiviopart/KIvioLayerIface.cc | 4 +- kivio/kiviopart/KIvioLayerIface.h | 6 +- kivio/kiviopart/KIvioMapIface.cc | 28 +- kivio/kiviopart/KIvioMapIface.h | 16 +- kivio/kiviopart/KIvioPageIface.cc | 2 +- kivio/kiviopart/KIvioPageIface.h | 4 +- kivio/kiviopart/KIvioStencilIface.cc | 34 +- kivio/kiviopart/KIvioStencilIface.h | 30 +- kivio/kiviopart/KIvioViewIface.cc | 4 +- kivio/kiviopart/KIvioViewIface.h | 8 +- kivio/kiviopart/addstenciltool.cpp | 34 +- kivio/kiviopart/addstenciltool.h | 11 +- kivio/kiviopart/config/kivio.kcfg | 4 +- kivio/kiviopart/config/kivio_config.cpp | 38 +- kivio/kiviopart/config/kivio_config.h | 6 +- kivio/kiviopart/kivio_canvas.cpp | 200 +- kivio/kiviopart/kivio_canvas.h | 105 +- kivio/kiviopart/kivio_command.cc | 72 +- kivio/kiviopart/kivio_command.h | 104 +- kivio/kiviopart/kivio_dlg_pageshow.cpp | 30 +- kivio/kiviopart/kivio_dlg_pageshow.h | 15 +- kivio/kiviopart/kivio_doc.cpp | 236 +- kivio/kiviopart/kivio_doc.h | 75 +- kivio/kiviopart/kivio_factory.cpp | 8 +- kivio/kiviopart/kivio_factory.h | 5 +- kivio/kiviopart/kivio_grid_data.cpp | 10 +- kivio/kiviopart/kivio_grid_data.h | 10 +- kivio/kiviopart/kivio_icon_view.cpp | 42 +- kivio/kiviopart/kivio_icon_view.h | 33 +- kivio/kiviopart/kivio_map.cpp | 52 +- kivio/kiviopart/kivio_map.h | 32 +- kivio/kiviopart/kivio_page.cpp | 176 +- kivio/kiviopart/kivio_page.h | 79 +- kivio/kiviopart/kivio_spawner_drag.cpp | 26 +- kivio/kiviopart/kivio_spawner_drag.h | 20 +- kivio/kiviopart/kivio_stackbar.cpp | 64 +- kivio/kiviopart/kivio_stackbar.h | 33 +- .../kivio_stencil_geometry_panel.cpp | 32 +- .../kiviopart/kivio_stencil_geometry_panel.h | 7 +- kivio/kiviopart/kivio_view.cpp | 502 +- kivio/kiviopart/kivio_view.h | 45 +- kivio/kiviopart/kivio_zoomaction.cpp | 58 +- kivio/kiviopart/kivio_zoomaction.h | 5 +- kivio/kiviopart/kivioarrowheadaction.cpp | 58 +- kivio/kiviopart/kivioarrowheadaction.h | 9 +- kivio/kiviopart/kiviodragobject.cpp | 68 +- kivio/kiviopart/kiviodragobject.h | 25 +- kivio/kiviopart/kivioglobal.cpp | 186 +- kivio/kiviopart/kivioglobal.h | 44 +- kivio/kiviopart/kiviosdk/diapathparser.cpp | 46 +- kivio/kiviopart/kiviosdk/diapathparser.h | 16 +- kivio/kiviopart/kiviosdk/kivio_1d_stencil.cpp | 74 +- kivio/kiviopart/kiviosdk/kivio_1d_stencil.h | 46 +- kivio/kiviopart/kiviosdk/kivio_arrowhead.cpp | 28 +- kivio/kiviopart/kiviosdk/kivio_arrowhead.h | 8 +- .../kiviosdk/kivio_base_connector_stencil.cpp | 44 +- .../kiviosdk/kivio_base_connector_stencil.h | 28 +- .../kiviosdk/kivio_base_target_stencil.cpp | 80 +- .../kiviosdk/kivio_base_target_stencil.h | 48 +- kivio/kiviopart/kiviosdk/kivio_common.cpp | 138 +- kivio/kiviopart/kiviosdk/kivio_common.h | 32 +- .../kiviosdk/kivio_connector_point.cpp | 24 +- .../kiviosdk/kivio_connector_point.h | 6 +- .../kiviosdk/kivio_connector_target.cpp | 12 +- .../kiviosdk/kivio_connector_target.h | 10 +- .../kiviosdk/kivio_dia_stencil_spawner.cpp | 210 +- .../kiviosdk/kivio_dia_stencil_spawner.h | 24 +- kivio/kiviopart/kiviosdk/kivio_fill_style.cpp | 28 +- kivio/kiviopart/kiviosdk/kivio_fill_style.h | 30 +- kivio/kiviopart/kiviosdk/kivio_gradient.cpp | 24 +- kivio/kiviopart/kiviosdk/kivio_gradient.h | 18 +- .../kiviosdk/kivio_group_stencil.cpp | 86 +- .../kiviopart/kiviosdk/kivio_group_stencil.h | 50 +- kivio/kiviopart/kiviosdk/kivio_layer.cpp | 54 +- kivio/kiviopart/kiviosdk/kivio_layer.h | 42 +- kivio/kiviopart/kiviosdk/kivio_line_style.cpp | 26 +- kivio/kiviopart/kiviosdk/kivio_line_style.h | 18 +- kivio/kiviopart/kiviosdk/kivio_painter.cpp | 4 +- kivio/kiviopart/kiviosdk/kivio_painter.h | 64 +- .../kiviosdk/kivio_plugin_stencil_spawner.cpp | 14 +- .../kiviosdk/kivio_plugin_stencil_spawner.h | 20 +- kivio/kiviopart/kiviosdk/kivio_point.cpp | 16 +- kivio/kiviopart/kiviosdk/kivio_point.h | 8 +- kivio/kiviopart/kiviosdk/kivio_py_stencil.cpp | 178 +- kivio/kiviopart/kiviosdk/kivio_py_stencil.h | 46 +- .../kiviosdk/kivio_py_stencil_spawner.cpp | 46 +- .../kiviosdk/kivio_py_stencil_spawner.h | 28 +- .../kiviosdk/kivio_screen_painter.cpp | 204 +- .../kiviopart/kiviosdk/kivio_screen_painter.h | 46 +- kivio/kiviopart/kiviosdk/kivio_shape.cpp | 264 +- kivio/kiviopart/kiviosdk/kivio_shape.h | 42 +- kivio/kiviopart/kiviosdk/kivio_shape_data.cpp | 130 +- kivio/kiviopart/kiviosdk/kivio_shape_data.h | 54 +- .../kiviosdk/kivio_shape_painter.cpp | 8 +- .../kiviopart/kiviosdk/kivio_shape_painter.h | 6 +- .../kiviopart/kiviosdk/kivio_sml_stencil.cpp | 410 +- kivio/kiviopart/kiviosdk/kivio_sml_stencil.h | 64 +- .../kiviosdk/kivio_sml_stencil_spawner.cpp | 82 +- .../kiviosdk/kivio_sml_stencil_spawner.h | 30 +- kivio/kiviopart/kiviosdk/kivio_stencil.cpp | 20 +- kivio/kiviopart/kiviosdk/kivio_stencil.h | 68 +- .../kiviosdk/kivio_stencil_spawner.cpp | 8 +- .../kiviosdk/kivio_stencil_spawner.h | 30 +- .../kiviosdk/kivio_stencil_spawner_info.cpp | 14 +- .../kiviosdk/kivio_stencil_spawner_info.h | 26 +- .../kiviosdk/kivio_stencil_spawner_set.cpp | 90 +- .../kiviosdk/kivio_stencil_spawner_set.h | 50 +- kivio/kiviopart/kiviosdk/kivio_text_style.cpp | 32 +- kivio/kiviopart/kiviosdk/kivio_text_style.h | 30 +- kivio/kiviopart/kiviosdk/kivio_wrap.cpp | 14 +- .../kiviosdk/kiviopolylineconnector.cpp | 60 +- .../kiviosdk/kiviopolylineconnector.h | 12 +- .../kiviopart/kiviosdk/kiviostencilfactory.h | 19 +- .../kiviosdk/polylineconnectorspawner.cpp | 8 +- .../kiviosdk/polylineconnectorspawner.h | 10 +- kivio/kiviopart/kiviostencilsetaction.cpp | 116 +- kivio/kiviopart/kiviostencilsetaction.h | 31 +- kivio/kiviopart/kiviostencilsetinstaller.cpp | 42 +- kivio/kiviopart/kiviostencilsetinstaller.h | 15 +- kivio/kiviopart/stencilbarbutton.cpp | 126 +- kivio/kiviopart/stencilbarbutton.h | 35 +- kivio/kiviopart/stencilbardockmanager.cpp | 192 +- kivio/kiviopart/stencilbardockmanager.h | 68 +- .../stencils/Dia/Assorted/arrow-chevron.shape | 4 +- .../stencils/Dia/Assorted/arrow-down.shape | 4 +- .../Dia/Assorted/arrow-left-notched.shape | 4 +- .../Dia/Assorted/arrow-left-right-up.shape | 4 +- .../Dia/Assorted/arrow-left-right.shape | 4 +- .../stencils/Dia/Assorted/arrow-left-up.shape | 4 +- .../stencils/Dia/Assorted/arrow-left.shape | 4 +- .../Dia/Assorted/arrow-pentagon.shape | 4 +- .../stencils/Dia/Assorted/arrow-quad.shape | 4 +- .../Dia/Assorted/arrow-right-notched.shape | 4 +- .../stencils/Dia/Assorted/arrow-right.shape | 4 +- .../Dia/Assorted/arrow-up-down-left.shape | 4 +- .../stencils/Dia/Assorted/arrow-up-down.shape | 4 +- .../stencils/Dia/Assorted/arrow-up.shape | 4 +- .../stencils/Dia/Assorted/circle.shape | 4 +- .../stencils/Dia/Assorted/cross-maltese.shape | 4 +- .../stencils/Dia/Assorted/cross-swiss.shape | 4 +- .../stencils/Dia/Assorted/diamond.shape | 4 +- .../stencils/Dia/Assorted/heptagon.shape | 4 +- .../stencils/Dia/Assorted/hexagon.shape | 4 +- .../stencils/Dia/Assorted/octagon.shape | 4 +- .../Assorted/parallelogram-horizontal.shape | 6 +- .../Dia/Assorted/parallelogram-vertical.shape | 6 +- .../stencils/Dia/Assorted/pentagon.shape | 4 +- .../stencils/Dia/Assorted/square.shape | 4 +- .../stencils/Dia/Assorted/star4.shape | 4 +- .../stencils/Dia/Assorted/star5.shape | 4 +- .../stencils/Dia/Assorted/star6.shape | 4 +- .../stencils/Dia/Assorted/star7.shape | 4 +- .../stencils/Dia/Assorted/star8.shape | 4 +- .../stencils/Dia/Assorted/star8sharp.shape | 4 +- .../kiviopart/stencils/Dia/Assorted/sun.shape | 6 +- .../stencils/Dia/Assorted/trapezoid.shape | 4 +- .../Dia/Assorted/triangle-isoceles.shape | 4 +- .../Dia/Assorted/triangle-rightangle.shape | 4 +- .../kiviopart/stencils/Dia/Circuit/npn.shape | 4 +- .../stencils/Dia/Circuit/opamp.shape | 4 +- .../kiviopart/stencils/Dia/Circuit/pnp.shape | 4 +- .../Dia/Civil/civil_arrow_right.shape | 4 +- .../stencils/Dia/Civil/civil_arrow_up.shape | 4 +- .../Dia/Civil/civil_backflow_preventer.shape | 4 +- .../stencils/Dia/Civil/civil_basin.shape | 4 +- .../Civil/civil_final-settling_basin.shape | 4 +- .../Dia/Civil/civil_frequency_converter.shape | 4 +- .../Dia/Civil/civil_horizontal_valve.shape | 6 +- .../stencils/Dia/Civil/civil_motor.shape | 4 +- ...civil_preliminary_clarification_tank.shape | 4 +- .../stencils/Dia/Civil/civil_rotor.shape | 4 +- .../stencils/Dia/Civil/civil_soil.shape | 4 +- .../kiviopart/stencils/Dia/Contact/c_if.shape | 4 +- .../stencils/Dia/Contact/c_ifnot.shape | 4 +- .../stencils/Dia/Contact/c_lamp.shape | 4 +- .../stencils/Dia/Contact/c_relay.shape | 4 +- .../stencils/Dia/Contact/l_ifnot.shape | 4 +- .../stencils/Dia/Contact/l_out.shape | 4 +- .../stencils/Dia/Contact/l_outj.shape | 4 +- .../stencils/Dia/Contact/l_outnot.shape | 4 +- .../stencils/Dia/Contact/l_outr.shape | 4 +- .../stencils/Dia/Contact/l_outs.shape | 4 +- .../stencils/Dia/Contact/l_sout.shape | 4 +- .../stencils/Dia/Contact/l_soutnot.shape | 4 +- .../stencils/Dia/Contact/l_soutr.shape | 4 +- .../stencils/Dia/Contact/l_souts.shape | 4 +- .../stencils/Dia/Electric/command.shape | 4 +- .../stencils/Dia/Electric/contact_f.shape | 4 +- .../stencils/Dia/Electric/contact_o.shape | 4 +- .../stencils/Dia/Electric/intpos_f.shape | 4 +- .../stencils/Dia/Electric/intpos_o.shape | 4 +- .../stencils/Dia/Electric/relay.shape | 4 +- .../stencils/Dia/MSE/demultiplexer.shape | 4 +- .../Dia/MSE/large_extension_node.shape | 4 +- .../stencils/Dia/MSE/multiplexer.shape | 4 +- .../stencils/Dia/MSE/node_center.shape | 4 +- .../Dia/MSE/small_extension_node.shape | 4 +- kivio/kiviopart/stencils/Dia/MSE/tacsat.shape | 4 +- .../stencils/Dia/Network/dat_external.shape | 4 +- .../Dia/Network/digitizing_board.shape | 4 +- .../stencils/Dia/Network/diskette.shape | 4 +- .../stencils/Dia/Network/firewall.shape | 4 +- .../kiviopart/stencils/Dia/Network/hub.shape | 4 +- .../stencils/Dia/Network/mobile_phone.shape | 4 +- .../stencils/Dia/Network/monitor.shape | 4 +- .../stencils/Dia/Network/pc_bigtower.shape | 4 +- .../stencils/Dia/Network/pc_desktop.shape | 4 +- .../stencils/Dia/Network/pc_miditower.shape | 4 +- .../stencils/Dia/Network/pc_minitower.shape | 4 +- .../stencils/Dia/Network/plotter.shape | 4 +- .../stencils/Dia/Network/workstation.shape | 4 +- .../stencils/Dia/Network/zip-disk.shape | 4 +- .../stencils/Dia/Pneumatic/dejack.shape | 4 +- .../stencils/Dia/Pneumatic/dist32.shape | 4 +- .../stencils/Dia/Pneumatic/dist42.shape | 4 +- .../stencils/Dia/Pneumatic/dist52.shape | 4 +- kivio/kiviopart/stencils/Dia/SDL/block.shape | 4 +- .../kiviopart/stencils/Dia/SDL/decision.shape | 4 +- .../kiviopart/stencils/Dia/SDL/process.shape | 4 +- .../kiviopart/stencils/Dia/SDL/service.shape | 4 +- .../stencils/Dia/Sybase/client.shape | 4 +- .../stencils/Dia/Sybase/dataserver.shape | 4 +- kivio/kiviopart/stencils/Dia/Sybase/ltm.shape | 4 +- .../stencils/Dia/Sybase/repserver.shape | 4 +- .../Flowcharting/BasicFlowcharting/Card.sml | 2 +- .../Flowcharting/BasicFlowcharting/Data.sml | 2 +- .../BasicFlowcharting/Decision.sml | 2 +- .../BasicFlowcharting/DirectData.sml | 2 +- .../BasicFlowcharting/Display.sml | 2 +- .../BasicFlowcharting/InternalStorage.sml | 2 +- .../BasicFlowcharting/LoopLimit.sml | 2 +- .../BasicFlowcharting/ManualInput.sml | 2 +- .../BasicFlowcharting/ManualOperation.sml | 2 +- .../BasicFlowcharting/PredefinedProcess.sml | 2 +- .../BasicFlowcharting/Preperation.sml | 2 +- .../BasicFlowcharting/Process.sml | 2 +- .../BasicFlowcharting/PyStencil.spy | 14 +- .../BasicFlowcharting/StoredData.sml | 2 +- .../BasicFlowcharting/Terminator.sml | 2 +- .../Flowcharting/Extended/Data_Store.sml | 2 +- .../Flowcharting/Extended/Database.sml | 2 +- .../Flowcharting/Extended/Process.sml | 2 +- .../Flowcharting/Extended/Source_or_Sink.sml | 2 +- .../Hardware/Computer/3FloppyDisk.sml | 2 +- .../stencils/Hardware/Miscellaneous/key.sml | 2 +- .../stencils/Miscellaneous/Arrows/Arrow.sml | 2 +- .../Miscellaneous/Arrows/Multiple_Arrow_1.sml | 2 +- .../Miscellaneous/Arrows/Multiple_Arrow_2.sml | 2 +- .../Miscellaneous/Arrows/Multiple_Arrow_3.sml | 2 +- .../Miscellaneous/Arrows/Sun_Arrow.sml | 2 +- .../Miscellaneous/Buildings/Factory.sml | 2 +- .../Miscellaneous/Buildings/House.sml | 2 +- .../stencils/Miscellaneous/ER/attribute.sml | 2 +- .../Miscellaneous/ER/derivedattribute.sml | 2 +- .../stencils/Miscellaneous/ER/entity.sml | 2 +- .../Miscellaneous/ER/multivaluedattribute.sml | 2 +- .../Miscellaneous/ER/relationship.sml | 2 +- .../stencils/Miscellaneous/ER/weakentity.sml | 2 +- .../Miscellaneous/ER/weakrelationship.sml | 2 +- .../stencils/Miscellaneous/People/Bad.sml | 2 +- .../stencils/Miscellaneous/People/Good.sml | 2 +- .../stencils/Miscellaneous/People/Man.sml | 2 +- .../stencils/Miscellaneous/People/Woman.sml | 2 +- .../Miscellaneous/People/Woman_Shape.sml | 2 +- .../Miscellaneous/Transport/Truck.sml | 2 +- kivio/kiviopart/tools/kivio_mousetool.cpp | 4 +- kivio/kiviopart/tools/kivio_mousetool.h | 9 +- kivio/kiviopart/tools/kivio_plugin.cpp | 2 +- kivio/kiviopart/tools/kivio_plugin.h | 5 +- kivio/kiviopart/tools/kivio_pluginmanager.cpp | 8 +- kivio/kiviopart/tools/kivio_pluginmanager.h | 11 +- kivio/kiviopart/tools/mousetoolaction.cpp | 52 +- kivio/kiviopart/tools/mousetoolaction.h | 55 +- kivio/kiviopart/ui/addstencilsetdialog.cpp | 8 +- kivio/kiviopart/ui/addstencilsetdialog.h | 5 +- kivio/kiviopart/ui/aligndialog.ui | 122 +- kivio/kiviopart/ui/export_page_dialog.cpp | 10 +- kivio/kiviopart/ui/export_page_dialog.h | 3 +- kivio/kiviopart/ui/export_page_dialog_base.ui | 24 +- kivio/kiviopart/ui/kivio_birdeye_panel.cpp | 100 +- kivio/kiviopart/ui/kivio_birdeye_panel.h | 19 +- .../kiviopart/ui/kivio_birdeye_panel_base.ui | 20 +- kivio/kiviopart/ui/kivio_layer_panel.cpp | 58 +- kivio/kiviopart/ui/kivio_layer_panel.h | 17 +- kivio/kiviopart/ui/kivio_layer_panel_base.ui | 32 +- kivio/kiviopart/ui/kivio_protection_panel.cpp | 46 +- kivio/kiviopart/ui/kivio_protection_panel.h | 3 +- .../ui/kivio_protection_panel_base.ui | 22 +- .../kiviopart/ui/kivioaddstencilsetpanel.cpp | 88 +- kivio/kiviopart/ui/kivioaddstencilsetpanel.h | 19 +- kivio/kiviopart/ui/kivioaligndialog.cpp | 8 +- kivio/kiviopart/ui/kivioaligndialog.h | 3 +- .../kiviopart/ui/kivioarrowheadformatdlg.cpp | 64 +- kivio/kiviopart/ui/kivioarrowheadformatdlg.h | 3 +- kivio/kiviopart/ui/kiviooptionsdialog.cpp | 140 +- kivio/kiviopart/ui/kiviooptionsdialog.h | 35 +- kivio/kiviopart/ui/kiviostencilformatdlg.cpp | 90 +- kivio/kiviopart/ui/kiviostencilformatdlg.h | 13 +- kivio/kiviopart/ui/kiviostencilsetwidget.ui | 18 +- kivio/kiviopart/ui/kiviotextformatdlg.cpp | 104 +- kivio/kiviopart/ui/kiviotextformatdlg.h | 25 +- kivio/kiviopart/ui/layerlisttooltip.cpp | 14 +- kivio/kiviopart/ui/layerlisttooltip.h | 12 +- kivio/kiviopart/ui/objectlistpalette.cpp | 32 +- kivio/kiviopart/ui/objectlistpalette.h | 7 +- kivio/plugins/kivioconnectortool/plugin.cpp | 10 +- kivio/plugins/kivioconnectortool/plugin.h | 11 +- .../straight_connector/straight_connector.cpp | 36 +- .../straight_connector/straight_connector.h | 19 +- .../kivioconnectortool/tool_connector.cpp | 66 +- .../kivioconnectortool/tool_connector.h | 29 +- kivio/plugins/kivioselecttool/plugin.cpp | 10 +- kivio/plugins/kivioselecttool/plugin.h | 11 +- kivio/plugins/kivioselecttool/tool_select.cpp | 128 +- kivio/plugins/kivioselecttool/tool_select.h | 57 +- kivio/plugins/kiviosmlconnector/plugin.cpp | 10 +- kivio/plugins/kiviosmlconnector/plugin.h | 11 +- .../sml_connector/sml_connector.cpp | 62 +- .../sml_connector/sml_connector.h | 31 +- .../kiviosmlconnector/tool_connector.cpp | 40 +- .../kiviosmlconnector/tool_connector.h | 27 +- .../kiviotargettool/kiviotargettool.cpp | 26 +- .../plugins/kiviotargettool/kiviotargettool.h | 11 +- .../kiviotargettoolfactory.cpp | 10 +- .../kiviotargettool/kiviotargettoolfactory.h | 11 +- .../kivio_stenciltexteditorui.ui | 18 +- kivio/plugins/kiviotexttool/plugin.cpp | 10 +- kivio/plugins/kiviotexttool/plugin.h | 11 +- .../kiviotexttool/stenciltexteditor.cpp | 80 +- .../plugins/kiviotexttool/stenciltexteditor.h | 25 +- kivio/plugins/kiviotexttool/tool_text.cpp | 120 +- kivio/plugins/kiviotexttool/tool_text.h | 29 +- kivio/plugins/kiviozoomtool/plugin.cpp | 10 +- kivio/plugins/kiviozoomtool/plugin.h | 11 +- kivio/plugins/kiviozoomtool/tool_zoom.cpp | 96 +- kivio/plugins/kiviozoomtool/tool_zoom.h | 19 +- koshell/Makefile.am | 2 +- koshell/iconsidepane.cpp | 170 +- koshell/iconsidepane.h | 102 +- koshell/koshell_shell.cc | 128 +- koshell/koshell_shell.h | 41 +- kounavail/kounavail.cc | 46 +- kounavail/kounavail.h | 53 +- kplato/KPtViewIface.h | 6 +- kplato/intervalitem.h | 18 +- kplato/kptaccount.cc | 92 +- kplato/kptaccount.h | 76 +- kplato/kptaccountsdialog.cc | 4 +- kplato/kptaccountsdialog.h | 5 +- kplato/kptaccountspanel.cc | 138 +- kplato/kptaccountspanel.h | 49 +- kplato/kptaccountspanelbase.ui | 24 +- kplato/kptaccountsview.cc | 186 +- kplato/kptaccountsview.h | 43 +- kplato/kptaccountsviewconfigdialog.cc | 28 +- kplato/kptaccountsviewconfigdialog.h | 16 +- kplato/kptaccountsviewconfigurepanelbase.ui | 12 +- kplato/kptappointment.cc | 120 +- kplato/kptappointment.h | 74 +- kplato/kptcalendar.cc | 266 +- kplato/kptcalendar.h | 156 +- kplato/kptcalendaredit.cc | 60 +- kplato/kptcalendaredit.h | 9 +- kplato/kptcalendareditbase.cc | 110 +- kplato/kptcalendareditbase.h | 69 +- kplato/kptcalendarlistdialog.cc | 108 +- kplato/kptcalendarlistdialog.h | 32 +- kplato/kptcalendarlistdialogbase.cc | 32 +- kplato/kptcalendarlistdialogbase.h | 27 +- kplato/kptcalendarlistpanel.ui | 26 +- kplato/kptcalendarpanel.cc | 242 +- kplato/kptcalendarpanel.h | 65 +- kplato/kptcanvasitem.cc | 446 +- kplato/kptcanvasitem.h | 66 +- kplato/kptcommand.cc | 340 +- kplato/kptcommand.h | 238 +- kplato/kptconfig.cc | 2 +- kplato/kptconfigbehaviorpanel.cc | 10 +- kplato/kptconfigbehaviorpanel.h | 3 +- kplato/kptconfigbehaviorpanelbase.ui | 22 +- kplato/kptconfigbehaviorpanelbase.ui.h | 2 +- kplato/kptconfigdialog.cc | 18 +- kplato/kptconfigdialog.h | 5 +- kplato/kptconfigtaskpanelbase.ui | 36 +- kplato/kptcontext.cc | 46 +- kplato/kptcontext.h | 22 +- kplato/kptdatetable.cc | 336 +- kplato/kptdatetable.h | 151 +- kplato/kptdatetime.cc | 10 +- kplato/kptdatetime.h | 18 +- kplato/kptdoublelistviewbase.cc | 182 +- kplato/kptdoublelistviewbase.h | 65 +- kplato/kptduration.cc | 54 +- kplato/kptduration.h | 42 +- kplato/kptdurationwidget.ui | 84 +- kplato/kptdurationwidget.ui.h | 94 +- kplato/kpteffortcostmap.h | 28 +- kplato/kptfactory.cc | 14 +- kplato/kptfactory.h | 5 +- kplato/kptganttview.cc | 270 +- kplato/kptganttview.h | 61 +- kplato/kptintervaledit.cc | 48 +- kplato/kptintervaledit.h | 20 +- kplato/kptintervaleditbase.ui | 24 +- kplato/kptmainprojectdialog.cc | 12 +- kplato/kptmainprojectdialog.h | 3 +- kplato/kptmainprojectpanel.cc | 72 +- kplato/kptmainprojectpanel.h | 14 +- kplato/kptmainprojectpanelbase.ui | 38 +- kplato/kptmap.h | 64 +- kplato/kptmilestoneprogressdialog.cc | 4 +- kplato/kptmilestoneprogressdialog.h | 3 +- kplato/kptmilestoneprogresspanel.cc | 20 +- kplato/kptmilestoneprogresspanel.h | 6 +- kplato/kptmilestoneprogresspanelbase.ui | 8 +- kplato/kptnode.cc | 200 +- kplato/kptnode.h | 164 +- kplato/kptpart.cc | 72 +- kplato/kptpart.h | 19 +- kplato/kptpertcanvas.cc | 132 +- kplato/kptpertcanvas.h | 43 +- kplato/kptpertview.cc | 36 +- kplato/kptpertview.h | 15 +- kplato/kptproject.cc | 290 +- kplato/kptproject.h | 120 +- kplato/kptprojectdialog.cc | 64 +- kplato/kptprojectdialog.h | 8 +- kplato/kptprojectdialogbase.ui | 44 +- kplato/kptrelation.cc | 40 +- kplato/kptrelation.h | 30 +- kplato/kptrelationdialog.cc | 20 +- kplato/kptrelationdialog.h | 10 +- kplato/kptreportview.cc | 276 +- kplato/kptreportview.h | 61 +- kplato/kptrequestresourcespanel.cc | 64 +- kplato/kptrequestresourcespanel.h | 29 +- kplato/kptresource.cc | 208 +- kplato/kptresource.h | 166 +- kplato/kptresourceappointmentsview.cc | 58 +- kplato/kptresourceappointmentsview.h | 33 +- kplato/kptresourcedialog.cc | 88 +- kplato/kptresourcedialog.h | 22 +- kplato/kptresourcesdialog.cc | 10 +- kplato/kptresourcesdialog.h | 3 +- kplato/kptresourcespanel.cc | 110 +- kplato/kptresourcespanel.h | 39 +- kplato/kptresourceview.cc | 174 +- kplato/kptresourceview.h | 31 +- kplato/kptschedule.cc | 164 +- kplato/kptschedule.h | 90 +- kplato/kptstandardworktimedialog.cc | 64 +- kplato/kptstandardworktimedialog.h | 8 +- kplato/kptsummarytaskdialog.cc | 6 +- kplato/kptsummarytaskdialog.h | 17 +- kplato/kptsummarytaskgeneralpanel.cc | 24 +- kplato/kptsummarytaskgeneralpanel.h | 3 +- kplato/kptsummarytaskgeneralpanelbase.ui | 42 +- kplato/kpttask.cc | 200 +- kplato/kpttask.h | 60 +- kplato/kpttaskappointmentsview.cc | 48 +- kplato/kpttaskappointmentsview.h | 25 +- kplato/kpttaskappointmentsview.ui.h | 16 +- kplato/kpttaskcostpanel.cc | 16 +- kplato/kpttaskcostpanel.h | 10 +- kplato/kpttaskcostpanelbase.ui | 34 +- kplato/kpttaskdefaultpanel.cc | 92 +- kplato/kpttaskdefaultpanel.h | 38 +- kplato/kpttaskdialog.cc | 12 +- kplato/kpttaskdialog.h | 17 +- kplato/kpttaskgeneralpanel.cc | 98 +- kplato/kpttaskgeneralpanel.h | 38 +- kplato/kpttaskgeneralpanelbase.ui | 64 +- kplato/kpttasknotespanelbase.ui | 16 +- kplato/kpttaskprogressdialog.cc | 4 +- kplato/kpttaskprogressdialog.h | 3 +- kplato/kpttaskprogresspanel.cc | 36 +- kplato/kpttaskprogresspanel.h | 6 +- kplato/kpttaskprogresspanelbase.ui | 54 +- kplato/kpttaskresourcespanelbase.ui | 16 +- kplato/kpttaskresourcespanelbase.ui.h | 2 +- kplato/kptview.cc | 322 +- kplato/kptview.h | 35 +- kplato/kptwbsdefinition.cc | 70 +- kplato/kptwbsdefinition.h | 44 +- kplato/kptwbsdefinitiondialog.cc | 4 +- kplato/kptwbsdefinitiondialog.h | 3 +- kplato/kptwbsdefinitionpanel.cc | 56 +- kplato/kptwbsdefinitionpanel.h | 3 +- kplato/kptwbsdefinitionpanelbase.ui | 38 +- kplato/kptxmlloaderobject.h | 32 +- kplato/relationpanel.ui | 46 +- kplato/reports/resourcelist.ktf | 2 +- kplato/reports/tasklist.ktf | 2 +- kplato/resourcedialogbase.ui | 68 +- kplato/resourcespanelbase.ui | 40 +- kplato/standardworktimedialogbase.ui | 26 +- kplato/tests/CalendarTester.cpp | 40 +- kplato/tests/DateTimeTester.cpp | 10 +- kpresenter/KPrAutoFormObjectIface.cpp | 8 +- kpresenter/KPrAutoFormObjectIface.h | 10 +- kpresenter/KPrAutoformObject.cpp | 110 +- kpresenter/KPrAutoformObject.h | 20 +- kpresenter/KPrBackDia.cpp | 162 +- kpresenter/KPrBackDia.h | 56 +- kpresenter/KPrBackground.cpp | 134 +- kpresenter/KPrBackground.h | 54 +- kpresenter/KPrBezierCurveObject.cpp | 38 +- kpresenter/KPrBezierCurveObject.h | 12 +- kpresenter/KPrBgSpellCheck.cpp | 2 +- kpresenter/KPrBrush.cpp | 40 +- kpresenter/KPrBrush.h | 8 +- kpresenter/KPrBrushProperty.cpp | 146 +- kpresenter/KPrBrushProperty.h | 23 +- kpresenter/KPrCanvas.cpp | 1094 +- kpresenter/KPrCanvas.h | 249 +- kpresenter/KPrClosedLineObject.cpp | 80 +- kpresenter/KPrClosedLineObject.h | 22 +- kpresenter/KPrCommand.cpp | 512 +- kpresenter/KPrCommand.h | 318 +- kpresenter/KPrConfig.cpp | 352 +- kpresenter/KPrConfig.h | 93 +- kpresenter/KPrCubicBezierCurveObjectIface.cpp | 8 +- kpresenter/KPrCubicBezierCurveObjectIface.h | 10 +- kpresenter/KPrCustomSlideShowDia.cpp | 178 +- kpresenter/KPrCustomSlideShowDia.h | 68 +- kpresenter/KPrDocument.cpp | 1016 +- kpresenter/KPrDocument.h | 315 +- kpresenter/KPrDocumentIface.cpp | 40 +- kpresenter/KPrDocumentIface.h | 28 +- kpresenter/KPrDuplicateObjDia.cpp | 36 +- kpresenter/KPrDuplicateObjDia.h | 3 +- kpresenter/KPrEffectDia.cpp | 204 +- kpresenter/KPrEffectDia.h | 51 +- kpresenter/KPrEffectHandler.cpp | 302 +- kpresenter/KPrEffectHandler.h | 30 +- kpresenter/KPrEllipseObject.cpp | 34 +- kpresenter/KPrEllipseObject.h | 10 +- kpresenter/KPrFactory.cpp | 10 +- kpresenter/KPrFactory.h | 7 +- kpresenter/KPrFindReplace.cpp | 16 +- kpresenter/KPrFindReplace.h | 15 +- kpresenter/KPrFreehandObject.cpp | 26 +- kpresenter/KPrFreehandObject.h | 10 +- kpresenter/KPrFreehandObjectIface.cpp | 12 +- kpresenter/KPrFreehandObjectIface.h | 10 +- kpresenter/KPrGeneralProperty.cpp | 56 +- kpresenter/KPrGeneralProperty.h | 9 +- kpresenter/KPrGotoPage.cpp | 56 +- kpresenter/KPrGotoPage.h | 20 +- kpresenter/KPrGradient.cpp | 12 +- kpresenter/KPrGradient.h | 24 +- kpresenter/KPrGradientCollection.cpp | 16 +- kpresenter/KPrGradientCollection.h | 12 +- kpresenter/KPrGroupObject.cpp | 110 +- kpresenter/KPrGroupObject.h | 30 +- kpresenter/KPrImageEffectDia.cpp | 200 +- kpresenter/KPrImageEffectDia.h | 23 +- kpresenter/KPrImportStyleDia.cpp | 52 +- kpresenter/KPrImportStyleDia.h | 11 +- kpresenter/KPrLineObject.cpp | 46 +- kpresenter/KPrLineObject.h | 12 +- kpresenter/KPrLineObjectIface.cpp | 8 +- kpresenter/KPrLineObjectIface.h | 10 +- kpresenter/KPrLoadingInfo.h | 20 +- kpresenter/KPrMSPresentationSetup.cpp | 220 +- kpresenter/KPrMSPresentationSetup.h | 66 +- kpresenter/KPrMarginWidget.cpp | 34 +- kpresenter/KPrMarginWidget.h | 7 +- kpresenter/KPrMoveHelpLineDia.cpp | 66 +- kpresenter/KPrMoveHelpLineDia.h | 15 +- kpresenter/KPrNoteBar.cpp | 80 +- kpresenter/KPrNoteBar.h | 19 +- kpresenter/KPrObject.cpp | 498 +- kpresenter/KPrObject.h | 148 +- kpresenter/KPrObject2DIface.cpp | 20 +- kpresenter/KPrObject2DIface.h | 18 +- kpresenter/KPrObjectIface.cpp | 20 +- kpresenter/KPrObjectIface.h | 24 +- kpresenter/KPrObjectProperties.cpp | 14 +- kpresenter/KPrObjectProperties.h | 10 +- kpresenter/KPrPBPreview.cpp | 28 +- kpresenter/KPrPBPreview.h | 41 +- kpresenter/KPrPage.cpp | 486 +- kpresenter/KPrPage.h | 130 +- kpresenter/KPrPageEffects.cpp | 208 +- kpresenter/KPrPageEffects.h | 16 +- kpresenter/KPrPageIface.cpp | 128 +- kpresenter/KPrPageIface.h | 42 +- kpresenter/KPrPartObject.cpp | 50 +- kpresenter/KPrPartObject.h | 13 +- kpresenter/KPrPenStyleWidget.cpp | 50 +- kpresenter/KPrPenStyleWidget.h | 7 +- kpresenter/KPrPgConfDia.cpp | 158 +- kpresenter/KPrPgConfDia.h | 43 +- kpresenter/KPrPicturePreview.cpp | 78 +- kpresenter/KPrPicturePreview.h | 13 +- kpresenter/KPrPictureProperty.cpp | 30 +- kpresenter/KPrPictureProperty.h | 9 +- kpresenter/KPrPieObject.cpp | 64 +- kpresenter/KPrPieObject.h | 16 +- kpresenter/KPrPieObjectIface.cpp | 6 +- kpresenter/KPrPieObjectIface.h | 8 +- kpresenter/KPrPiePreview.cpp | 12 +- kpresenter/KPrPiePreview.h | 27 +- kpresenter/KPrPieProperty.cpp | 16 +- kpresenter/KPrPieProperty.h | 7 +- kpresenter/KPrPixmapObject.cpp | 232 +- kpresenter/KPrPixmapObject.h | 52 +- kpresenter/KPrPixmapObjectIface.cpp | 6 +- kpresenter/KPrPixmapObjectIface.h | 8 +- kpresenter/KPrPointObject.cpp | 46 +- kpresenter/KPrPointObject.h | 8 +- kpresenter/KPrPolyLineObjectIface.cpp | 4 +- kpresenter/KPrPolygonObject.cpp | 74 +- kpresenter/KPrPolygonObject.h | 18 +- kpresenter/KPrPolygonPreview.cpp | 26 +- kpresenter/KPrPolygonPreview.h | 23 +- kpresenter/KPrPolygonProperty.cpp | 22 +- kpresenter/KPrPolygonProperty.h | 7 +- kpresenter/KPrPolylineObject.cpp | 14 +- kpresenter/KPrPolylineObject.h | 10 +- kpresenter/KPrPresDurationDia.cpp | 30 +- kpresenter/KPrPresDurationDia.h | 17 +- kpresenter/KPrPrinterDlg.cpp | 50 +- kpresenter/KPrPrinterDlg.h | 15 +- kpresenter/KPrPropertyEditor.cpp | 10 +- kpresenter/KPrPropertyEditor.h | 9 +- .../KPrQuadricBezierCurveObjectIface.cpp | 8 +- kpresenter/KPrQuadricBezierCurveObjectIface.h | 14 +- kpresenter/KPrRectObject.cpp | 60 +- kpresenter/KPrRectObject.h | 16 +- kpresenter/KPrRectPreview.cpp | 8 +- kpresenter/KPrRectPreview.h | 23 +- kpresenter/KPrRectProperty.cpp | 36 +- kpresenter/KPrRectProperty.h | 7 +- kpresenter/KPrRotationDialogImpl.cpp | 56 +- kpresenter/KPrRotationDialogImpl.h | 31 +- kpresenter/KPrSVGPathParser.cpp | 10 +- kpresenter/KPrSVGPathParser.h | 8 +- kpresenter/KPrShadowDialogImpl.cpp | 24 +- kpresenter/KPrShadowDialogImpl.h | 9 +- kpresenter/KPrSideBar.cpp | 294 +- kpresenter/KPrSideBar.h | 65 +- kpresenter/KPrSlideTransitionDia.cpp | 98 +- kpresenter/KPrSlideTransitionDia.h | 19 +- kpresenter/KPrSoundPlayer.cpp | 10 +- kpresenter/KPrSoundPlayer.h | 9 +- kpresenter/KPrStyleManager.cpp | 6 +- kpresenter/KPrStyleManager.h | 9 +- kpresenter/KPrTextDocument.cpp | 16 +- kpresenter/KPrTextDocument.h | 5 +- kpresenter/KPrTextObject.cpp | 828 +- kpresenter/KPrTextObject.h | 122 +- kpresenter/KPrTextObjectIface.cpp | 50 +- kpresenter/KPrTextObjectIface.h | 38 +- kpresenter/KPrTextPreview.cpp | 28 +- kpresenter/KPrTextPreview.h | 19 +- kpresenter/KPrTextProperty.cpp | 22 +- kpresenter/KPrTextProperty.h | 11 +- kpresenter/KPrTextViewIface.cpp | 8 +- kpresenter/KPrTextViewIface.h | 10 +- kpresenter/KPrTransEffectDia.cpp | 210 +- kpresenter/KPrTransEffectDia.h | 56 +- kpresenter/KPrUtils.cpp | 156 +- kpresenter/KPrUtils.h | 38 +- kpresenter/KPrVariableCollection.cpp | 14 +- kpresenter/KPrVariableCollection.h | 8 +- kpresenter/KPrView.cpp | 1590 +- kpresenter/KPrView.h | 177 +- kpresenter/KPrViewIface.cpp | 26 +- kpresenter/KPrViewIface.h | 22 +- kpresenter/KPrWebPresentation.cpp | 526 +- kpresenter/KPrWebPresentation.h | 110 +- kpresenter/KoPointArray.cpp | 52 +- kpresenter/KoPointArray.h | 12 +- kpresenter/autoformEdit/AFChoose.cpp | 80 +- kpresenter/autoformEdit/AFChoose.h | 35 +- kpresenter/autoformEdit/ATFInterpreter.cpp | 80 +- kpresenter/autoformEdit/ATFInterpreter.h | 52 +- kpresenter/brushpropertyui.ui | 10 +- kpresenter/generalpropertyui.ui | 28 +- kpresenter/global.h | 8 +- kpresenter/gradientpropertyui.ui | 28 +- kpresenter/imageEffectBase.ui | 188 +- kpresenter/insertpagedia.ui | 26 +- kpresenter/kprconverter.pl | 6 +- kpresenter/marginui.ui | 24 +- kpresenter/penstyle.ui | 20 +- kpresenter/picturepropertyui.ui | 24 +- kpresenter/piepropertyui.ui | 16 +- kpresenter/polygonpropertyui.ui | 16 +- kpresenter/rectpropertyui.ui | 28 +- kpresenter/rotationpropertyui.ui | 22 +- kpresenter/shadowdialog.ui | 56 +- kpresenter/slidetransitionwidget.ui | 48 +- .../Screenpresentations/BlueBreezePicture.kpt | Bin 93363 -> 93362 bytes kpresenter/textpropertyui.ui | 6 +- krita/HACKING | 6 +- krita/IMAGE_LIBRARIES | 2 +- krita/colorspaces/cmyk_u16/cmyk_u16_plugin.cc | 8 +- krita/colorspaces/cmyk_u16/cmyk_u16_plugin.h | 3 +- .../cmyk_u16/kis_cmyk_u16_colorspace.cc | 322 +- .../cmyk_u16/kis_cmyk_u16_colorspace.h | 86 +- krita/colorspaces/cmyk_u8/cmyk_plugin.cc | 8 +- krita/colorspaces/cmyk_u8/cmyk_plugin.h | 3 +- krita/colorspaces/cmyk_u8/composite.h | 64 +- .../cmyk_u8/kis_cmyk_colorspace.cc | 320 +- .../colorspaces/cmyk_u8/kis_cmyk_colorspace.h | 90 +- krita/colorspaces/gray_u16/gray_u16_plugin.cc | 8 +- krita/colorspaces/gray_u16/gray_u16_plugin.h | 3 +- .../gray_u16/kis_gray_u16_colorspace.cc | 286 +- .../gray_u16/kis_gray_u16_colorspace.h | 72 +- krita/colorspaces/gray_u8/gray_plugin.cc | 8 +- krita/colorspaces/gray_u8/gray_plugin.h | 3 +- .../gray_u8/kis_gray_colorspace.cc | 550 +- .../colorspaces/gray_u8/kis_gray_colorspace.h | 88 +- ...s_strategy_colorspace_grayscale_tester.cpp | 26 +- .../lms_f32/kis_lms_f32_colorspace.cc | 132 +- .../lms_f32/kis_lms_f32_colorspace.h | 82 +- krita/colorspaces/lms_f32/lms_f32_plugin.cc | 8 +- krita/colorspaces/lms_f32/lms_f32_plugin.h | 3 +- .../rgb_f16half/kis_rgb_f16half_colorspace.cc | 218 +- .../rgb_f16half/kis_rgb_f16half_colorspace.h | 98 +- .../rgb_f16half/rgb_f16half_plugin.cc | 8 +- .../rgb_f16half/rgb_f16half_plugin.h | 3 +- .../kis_rgb_f16half_colorspace_tester.cc | 148 +- .../tests/kis_rgb_f16half_colorspace_tester.h | 6 +- .../rgb_f32/kis_rgb_f32_colorspace.cc | 218 +- .../rgb_f32/kis_rgb_f32_colorspace.h | 100 +- krita/colorspaces/rgb_f32/rgb_f32_plugin.cc | 8 +- krita/colorspaces/rgb_f32/rgb_f32_plugin.h | 3 +- .../kis_strategy_colorspace_rgb_f32_tester.cc | 148 +- .../kis_strategy_colorspace_rgb_f32_tester.h | 6 +- .../rgb_u16/kis_rgb_u16_colorspace.cc | 366 +- .../rgb_u16/kis_rgb_u16_colorspace.h | 90 +- krita/colorspaces/rgb_u16/rgb_u16_plugin.cc | 8 +- krita/colorspaces/rgb_u16/rgb_u16_plugin.h | 3 +- .../kis_strategy_colorspace_rgb_u16_tester.cc | 164 +- .../kis_strategy_colorspace_rgb_u16_tester.h | 6 +- krita/colorspaces/rgb_u8/composite.h | 548 +- .../colorspaces/rgb_u8/kis_rgb_colorspace.cc | 752 +- krita/colorspaces/rgb_u8/kis_rgb_colorspace.h | 90 +- krita/colorspaces/rgb_u8/rgb_plugin.cc | 10 +- krita/colorspaces/rgb_u8/rgb_plugin.h | 3 +- .../kis_strategy_colorspace_rgb_tester.cpp | 38 +- krita/colorspaces/wet/kis_texture_filter.cc | 2 +- krita/colorspaces/wet/kis_texture_filter.h | 8 +- krita/colorspaces/wet/kis_texture_painter.cc | 6 +- krita/colorspaces/wet/kis_texture_painter.h | 2 +- krita/colorspaces/wet/kis_wet_colorspace.cc | 120 +- krita/colorspaces/wet/kis_wet_colorspace.h | 106 +- .../colorspaces/wet/kis_wet_palette_widget.cc | 146 +- .../colorspaces/wet/kis_wet_palette_widget.h | 23 +- .../wet/kis_wetness_visualisation_filter.cc | 2 +- .../wet/kis_wetness_visualisation_filter.h | 9 +- krita/colorspaces/wet/kis_wetop.cc | 32 +- krita/colorspaces/wet/kis_wetop.h | 6 +- krita/colorspaces/wet/wdgpressure.ui | 12 +- krita/colorspaces/wet/wet_plugin.cc | 28 +- krita/colorspaces/wet/wet_plugin.h | 3 +- krita/colorspaces/wet/wetphysicsfilter.cc | 44 +- krita/colorspaces/wet/wetphysicsfilter.h | 12 +- .../wetsticky/brushop/kis_wsbrushop.cc | 32 +- .../wetsticky/brushop/kis_wsbrushop.h | 2 +- .../brushop/wsbrushpaintop_plugin.cc | 6 +- .../wetsticky/brushop/wsbrushpaintop_plugin.h | 3 +- .../wetsticky/kis_wet_sticky_colorspace.cc | 230 +- .../wetsticky/kis_wet_sticky_colorspace.h | 100 +- .../wetsticky/kis_ws_engine_filter.cc | 46 +- .../wetsticky/kis_ws_engine_filter.h | 14 +- .../wetsticky/wet_sticky_plugin.cc | 6 +- .../colorspaces/wetsticky/wet_sticky_plugin.h | 3 +- .../wetsticky/ws/GNU Public Licence.txt | 4 +- krita/colorspaces/wetsticky/ws/anim.c | 6 +- krita/colorspaces/wetsticky/ws/canvas.c | 46 +- krita/colorspaces/wetsticky/ws/canvas.h | 10 +- krita/colorspaces/wetsticky/ws/cmap.c | 12 +- krita/colorspaces/wetsticky/ws/engine.c | 4 +- krita/colorspaces/wetsticky/ws/engine3.c | 4 +- .../colorspaces/wetsticky/ws/ogl_interface.c | 2 +- krita/colorspaces/wetsticky/ws/x_interface.c | 14 +- krita/colorspaces/wetsticky/wstool.ui | 32 +- .../ycbcr_u16/kis_ycbcr_u16_colorspace.cc | 150 +- .../ycbcr_u16/kis_ycbcr_u16_colorspace.h | 100 +- .../colorspaces/ycbcr_u16/ycbcr_u16_plugin.cc | 8 +- .../colorspaces/ycbcr_u16/ycbcr_u16_plugin.h | 3 +- .../ycbcr_u8/kis_ycbcr_u8_colorspace.cc | 148 +- .../ycbcr_u8/kis_ycbcr_u8_colorspace.h | 102 +- krita/colorspaces/ycbcr_u8/ycbcr_u8_plugin.cc | 8 +- krita/colorspaces/ycbcr_u8/ycbcr_u8_plugin.h | 3 +- krita/core/createdcop.py | 28 +- krita/core/kis_adjustment_layer.cc | 68 +- krita/core/kis_adjustment_layer.h | 25 +- krita/core/kis_alpha_mask.cc | 38 +- krita/core/kis_alpha_mask.h | 56 +- krita/core/kis_autobrush_resource.cc | 18 +- krita/core/kis_autobrush_resource.h | 18 +- krita/core/kis_autogradient_resource.cc | 20 +- krita/core/kis_autogradient_resource.h | 6 +- krita/core/kis_background.cc | 68 +- krita/core/kis_background.h | 10 +- krita/core/kis_basic_math_toolbox.cpp | 4 +- krita/core/kis_basic_math_toolbox.h | 4 +- krita/core/kis_boundary.cc | 18 +- krita/core/kis_boundary.h | 12 +- krita/core/kis_brush.cc | 430 +- krita/core/kis_brush.h | 95 +- krita/core/kis_colorspace_convert_visitor.h | 6 +- krita/core/kis_command.cc | 6 +- krita/core/kis_command.h | 8 +- krita/core/kis_convolution_painter.cc | 104 +- krita/core/kis_convolution_painter.h | 18 +- krita/core/kis_crop_visitor.h | 6 +- krita/core/kis_datamanager.h | 68 +- krita/core/kis_exif_info.cc | 14 +- krita/core/kis_exif_info.h | 16 +- krita/core/kis_exif_value.cc | 188 +- krita/core/kis_exif_value.h | 78 +- krita/core/kis_fill_painter.cc | 70 +- krita/core/kis_fill_painter.h | 38 +- krita/core/kis_filter.cc | 20 +- krita/core/kis_filter.h | 39 +- krita/core/kis_filter_config_widget.cc | 4 +- krita/core/kis_filter_config_widget.h | 7 +- krita/core/kis_filter_configuration.cc | 74 +- krita/core/kis_filter_configuration.h | 38 +- krita/core/kis_filter_registry.cc | 10 +- krita/core/kis_filter_registry.h | 9 +- krita/core/kis_filter_strategy.cc | 8 +- krita/core/kis_filter_strategy.h | 14 +- krita/core/kis_gradient.cc | 30 +- krita/core/kis_gradient.h | 31 +- krita/core/kis_gradient_painter.cc | 104 +- krita/core/kis_gradient_painter.h | 10 +- krita/core/kis_group_layer.cc | 62 +- krita/core/kis_group_layer.h | 35 +- krita/core/kis_histogram.cc | 42 +- krita/core/kis_histogram.h | 22 +- krita/core/kis_image.cc | 312 +- krita/core/kis_image.h | 121 +- krita/core/kis_image_iface.cc | 2 +- krita/core/kis_image_iface.h | 4 +- krita/core/kis_imagepipe_brush.cc | 84 +- krita/core/kis_imagepipe_brush.h | 69 +- krita/core/kis_iterator.cc | 36 +- krita/core/kis_iterator.h | 36 +- krita/core/kis_iteratorpixeltrait.h | 8 +- krita/core/kis_iterators_pixel.cc | 6 +- krita/core/kis_iterators_pixel.h | 44 +- krita/core/kis_layer.cc | 98 +- krita/core/kis_layer.h | 93 +- krita/core/kis_math_toolbox.cpp | 48 +- krita/core/kis_math_toolbox.h | 25 +- krita/core/kis_merge_visitor.h | 56 +- krita/core/kis_meta_registry.cc | 10 +- krita/core/kis_nameserver.cc | 10 +- krita/core/kis_nameserver.h | 14 +- krita/core/kis_paint_device.cc | 330 +- krita/core/kis_paint_device.h | 167 +- krita/core/kis_paint_device_action.h | 8 +- krita/core/kis_paint_device_iface.cc | 18 +- krita/core/kis_paint_device_iface.h | 12 +- krita/core/kis_paint_layer.cc | 186 +- krita/core/kis_paint_layer.h | 71 +- krita/core/kis_painter.cc | 176 +- krita/core/kis_painter.h | 68 +- krita/core/kis_paintop.cc | 30 +- krita/core/kis_paintop.h | 18 +- krita/core/kis_paintop_registry.cc | 18 +- krita/core/kis_paintop_registry.h | 17 +- krita/core/kis_palette.cc | 70 +- krita/core/kis_palette.h | 43 +- krita/core/kis_part_layer_iface.h | 8 +- krita/core/kis_pattern.cc | 118 +- krita/core/kis_pattern.h | 29 +- krita/core/kis_perspective_grid.cpp | 8 +- krita/core/kis_perspective_grid.h | 10 +- krita/core/kis_perspective_math.cpp | 6 +- krita/core/kis_perspective_math.h | 6 +- .../core/kis_perspectivetransform_worker.cpp | 2 +- krita/core/kis_perspectivetransform_worker.h | 8 +- krita/core/kis_point.h | 14 +- krita/core/kis_random_accessor.cpp | 10 +- krita/core/kis_random_accessor.h | 24 +- krita/core/kis_random_sub_accessor.cpp | 28 +- krita/core/kis_random_sub_accessor.h | 4 +- krita/core/kis_rect.cc | 4 +- krita/core/kis_rect.h | 14 +- krita/core/kis_resource.cc | 10 +- krita/core/kis_resource.h | 29 +- krita/core/kis_rotate_visitor.cc | 72 +- krita/core/kis_rotate_visitor.h | 10 +- krita/core/kis_scale_visitor.cc | 52 +- krita/core/kis_scale_visitor.h | 10 +- krita/core/kis_selected_transaction.cc | 2 +- krita/core/kis_selected_transaction.h | 6 +- krita/core/kis_selection.cc | 282 +- krita/core/kis_selection.h | 50 +- krita/core/kis_strategy_move.cc | 24 +- krita/core/kis_strategy_move.h | 22 +- krita/core/kis_substrate.h | 14 +- krita/core/kis_thread.h | 8 +- krita/core/kis_thread_pool.cc | 6 +- krita/core/kis_thread_pool.h | 14 +- krita/core/kis_transaction.cc | 18 +- krita/core/kis_transaction.h | 8 +- krita/core/kis_transform_visitor.h | 6 +- krita/core/kis_transform_worker.cc | 108 +- krita/core/kis_transform_worker.h | 14 +- krita/core/kis_types.h | 8 +- krita/core/kis_vec.h | 6 +- .../tests/kis_filter_configuration_tester.cc | 10 +- krita/core/tests/kis_image_tester.cpp | 16 +- krita/core/tiles/kis_memento.cc | 30 +- krita/core/tiles/kis_memento.h | 34 +- krita/core/tiles/kis_tile.cc | 18 +- krita/core/tiles/kis_tile.h | 40 +- krita/core/tiles/kis_tiled_random_accessor.cc | 20 +- krita/core/tiles/kis_tiled_random_accessor.h | 34 +- krita/core/tiles/kis_tileddatamanager.cc | 282 +- krita/core/tiles/kis_tileddatamanager.h | 100 +- krita/core/tiles/kis_tiledhlineiterator.cc | 4 +- krita/core/tiles/kis_tilediterator.cc | 6 +- krita/core/tiles/kis_tilediterator.h | 102 +- krita/core/tiles/kis_tiledrectiterator.cc | 6 +- krita/core/tiles/kis_tiledvlineiterator.cc | 2 +- krita/core/tiles/kis_tilemanager.cc | 52 +- krita/core/tiles/kis_tilemanager.h | 54 +- .../tiles/tests/kis_tiled_data_tester.cpp | 14 +- krita/data/palettes/Named_Colors.gpl | 2 +- krita/data/patterns/nops.pat | Bin 49178 -> 49177 bytes krita/data/profiles/cmyk.icm | Bin 725408 -> 725407 bytes krita/data/profiles/fogra27l.icm | Bin 225824 -> 225823 bytes krita/doc/DESIGN.obsolete | 10 +- krita/doc/background_paper.txt | 4 +- krita/doc/brush.txt | 14 +- krita/doc/channels_masks_selections | 4 +- krita/doc/colorspaces.xmi | 7528 ++++---- krita/doc/colorstrategyAPI | 14 +- krita/doc/controller.xmi | 5668 +++--- krita/doc/doc-outline | 6 +- krita/doc/histograms.xmi | 74 +- krita/doc/hooks | 2 +- krita/doc/howtofilters.txt | 2 +- krita/doc/krita-features | 8 +- krita/doc/krita.pdf | Bin 2701148 -> 2701147 bytes krita/doc/krita.xmi | 14800 ++++++++-------- krita/doc/manual/krita.kwd | Bin 2505240 -> 2505238 bytes krita/doc/paint_device.txt | 2 +- krita/doc/palettedesign.txt | 2 +- krita/doc/sdk | 2 +- krita/doc/selections | 8 +- krita/doc/the preview widget | 2 +- .../colorspaces/kis_alpha_colorspace.cc | 96 +- .../colorspaces/kis_alpha_colorspace.h | 68 +- .../colorspaces/kis_lab_colorspace.cc | 218 +- .../colorspaces/kis_lab_colorspace.h | 114 +- .../colorspaces/kis_xyz_colorspace.cc | 272 +- .../colorspaces/kis_xyz_colorspace.h | 86 +- krita/kritacolor/kis_abstract_colorspace.cc | 260 +- krita/kritacolor/kis_abstract_colorspace.h | 162 +- .../kis_basic_histogram_producers.cc | 98 +- .../kis_basic_histogram_producers.h | 58 +- krita/kritacolor/kis_channelinfo.h | 26 +- krita/kritacolor/kis_color.cc | 66 +- krita/kritacolor/kis_color.h | 26 +- krita/kritacolor/kis_color_conversions.cc | 36 +- krita/kritacolor/kis_color_conversions.h | 10 +- krita/kritacolor/kis_colorspace.h | 138 +- .../kis_colorspace_factory_registry.cc | 36 +- .../kis_colorspace_factory_registry.h | 29 +- krita/kritacolor/kis_colorspace_iface.cc | 10 +- krita/kritacolor/kis_colorspace_iface.h | 6 +- krita/kritacolor/kis_composite_op.cc | 2 +- krita/kritacolor/kis_composite_op.h | 6 +- .../kritacolor/kis_f16half_base_colorspace.cc | 38 +- .../kritacolor/kis_f16half_base_colorspace.h | 26 +- krita/kritacolor/kis_f32_base_colorspace.cc | 38 +- krita/kritacolor/kis_f32_base_colorspace.h | 24 +- krita/kritacolor/kis_histogram_producer.cc | 6 +- krita/kritacolor/kis_histogram_producer.h | 20 +- krita/kritacolor/kis_profile.cc | 26 +- krita/kritacolor/kis_profile.h | 30 +- krita/kritacolor/kis_u16_base_colorspace.cc | 62 +- krita/kritacolor/kis_u16_base_colorspace.h | 34 +- krita/kritacolor/kis_u8_base_colorspace.cc | 42 +- krita/kritacolor/kis_u8_base_colorspace.h | 34 +- .../tests/kis_color_conversions_tester.h | 4 +- krita/plugins/filters/blur/blur.cc | 10 +- krita/plugins/filters/blur/blur.h | 2 +- krita/plugins/filters/blur/kis_blur_filter.cc | 40 +- krita/plugins/filters/blur/kis_blur_filter.h | 6 +- krita/plugins/filters/blur/kis_wdg_blur.cc | 24 +- krita/plugins/filters/blur/kis_wdg_blur.h | 3 +- krita/plugins/filters/blur/wdgblur.ui | 28 +- krita/plugins/filters/bumpmap/bumpmap.cc | 156 +- krita/plugins/filters/bumpmap/bumpmap.h | 27 +- krita/plugins/filters/bumpmap/wdgbumpmap.ui | 48 +- krita/plugins/filters/cimg/CImg.h | 324 +- krita/plugins/filters/cimg/kis_cimg_filter.cc | 94 +- krita/plugins/filters/cimg/kis_cimg_filter.h | 14 +- krita/plugins/filters/cimg/kis_cimg_plugin.cc | 6 +- krita/plugins/filters/cimg/kis_cimg_plugin.h | 2 +- .../filters/cimg/kis_cimgconfig_widget.cc | 34 +- .../filters/cimg/kis_cimgconfig_widget.h | 3 +- krita/plugins/filters/cimg/wdg_cimg.ui | 32 +- krita/plugins/filters/colorify/Colorify.cpp | 38 +- krita/plugins/filters/colorify/Colorify.h | 8 +- .../filters/colorify/KisWdgColorify.cpp | 14 +- .../plugins/filters/colorify/KisWdgColorify.h | 3 +- .../filters/colorify/WdgColorifyBase.ui | 14 +- krita/plugins/filters/colors/colors.cc | 10 +- krita/plugins/filters/colors/colors.h | 2 +- .../filters/colors/kis_color_to_alpha.cc | 24 +- .../filters/colors/kis_color_to_alpha.h | 6 +- .../filters/colors/kis_minmax_filters.cc | 22 +- .../filters/colors/kis_minmax_filters.h | 4 +- .../filters/colors/kis_wdg_color_to_alpha.cc | 16 +- .../filters/colors/kis_wdg_color_to_alpha.h | 3 +- .../filters/colors/wdgcolortoalphabase.ui | 18 +- .../filters/colorsfilters/colorsfilters.cc | 44 +- .../filters/colorsfilters/colorsfilters.h | 6 +- .../kis_brightness_contrast_filter.cc | 132 +- .../kis_brightness_contrast_filter.h | 18 +- .../colorsfilters/kis_perchannel_filter.cc | 144 +- .../colorsfilters/kis_perchannel_filter.h | 25 +- .../colorsfilters/wdg_brightness_contrast.ui | 52 +- .../filters/colorsfilters/wdg_perchannel.ui | 30 +- .../convolutionfilters/convolutionfilters.cc | 24 +- .../convolutionfilters/convolutionfilters.h | 8 +- .../kis_convolution_filter.cc | 52 +- .../kis_convolution_filter.h | 15 +- .../kis_custom_convolution_filter.cc | 12 +- .../kis_custom_convolution_filter.h | 6 +- ...lution_filter_configuration_base_widget.ui | 32 +- ...convolution_filter_configuration_widget.cc | 24 +- ..._convolution_filter_configuration_widget.h | 5 +- .../filters/cubismfilter/kis_cubism_filter.cc | 170 +- .../filters/cubismfilter/kis_cubism_filter.h | 26 +- .../cubismfilter/kis_cubism_filter_plugin.cc | 6 +- .../cubismfilter/kis_cubism_filter_plugin.h | 2 +- .../filters/cubismfilter/kis_polygon.cc | 6 +- .../filters/cubismfilter/kis_polygon.h | 8 +- .../filters/embossfilter/kis_emboss_filter.cc | 38 +- .../filters/embossfilter/kis_emboss_filter.h | 12 +- .../embossfilter/kis_emboss_filter_plugin.cc | 6 +- .../embossfilter/kis_emboss_filter_plugin.h | 2 +- krita/plugins/filters/example/example.cc | 14 +- krita/plugins/filters/example/example.h | 4 +- .../fastcolortransfer/fastcolortransfer.cc | 46 +- .../fastcolortransfer/fastcolortransfer.h | 8 +- .../kis_wdg_fastcolortransfer.cpp | 10 +- .../kis_wdg_fastcolortransfer.h | 2 +- .../fastcolortransfer/wdgfastcolortransfer.ui | 12 +- .../plugins/filters/halftone/kis_halftone.cpp | 32 +- krita/plugins/filters/halftone/kis_halftone.h | 8 +- .../imageenhancement/imageenhancement.cpp | 12 +- .../imageenhancement/imageenhancement.h | 2 +- .../kis_simple_noise_reducer.cpp | 18 +- .../kis_simple_noise_reducer.h | 6 +- .../kis_wavelet_noise_reduction.cpp | 14 +- .../kis_wavelet_noise_reduction.h | 6 +- .../kis_wdg_lens_correction.cpp | 20 +- .../kis_wdg_lens_correction.h | 3 +- .../lenscorrectionfilter.cc | 34 +- .../lenscorrectionfilter.h | 8 +- .../wdglenscorrectionoptions.ui | 26 +- .../filters/levelfilter/kgradientslider.cc | 82 +- .../filters/levelfilter/kgradientslider.h | 25 +- .../filters/levelfilter/kis_level_filter.cc | 84 +- .../filters/levelfilter/kis_level_filter.h | 19 +- .../filters/levelfilter/levelfilter.cc | 14 +- .../plugins/filters/levelfilter/levelfilter.h | 2 +- .../plugins/filters/levelfilter/wdg_level.ui | 66 +- .../filters/noisefilter/kis_wdg_noise.cpp | 14 +- .../filters/noisefilter/kis_wdg_noise.h | 3 +- .../filters/noisefilter/noisefilter.cc | 34 +- .../plugins/filters/noisefilter/noisefilter.h | 8 +- .../filters/noisefilter/wdgnoiseoptions.ui | 12 +- .../oilpaintfilter/kis_oilpaint_filter.cc | 38 +- .../oilpaintfilter/kis_oilpaint_filter.h | 14 +- .../kis_oilpaint_filter_plugin.cc | 6 +- .../kis_oilpaint_filter_plugin.h | 2 +- .../pixelizefilter/kis_pixelize_filter.cc | 52 +- .../pixelizefilter/kis_pixelize_filter.h | 12 +- .../kis_pixelize_filter_plugin.cc | 8 +- .../kis_pixelize_filter_plugin.h | 2 +- .../raindropsfilter/kis_raindrops_filter.cc | 46 +- .../raindropsfilter/kis_raindrops_filter.h | 16 +- .../kis_raindrops_filter_plugin.cc | 6 +- .../kis_raindrops_filter_plugin.h | 2 +- .../randompickfilter/kis_wdg_random_pick.cpp | 16 +- .../randompickfilter/kis_wdg_random_pick.h | 3 +- .../randompickfilter/randompickfilter.cc | 28 +- .../randompickfilter/randompickfilter.h | 8 +- .../randompickfilter/wdgrandompickoptions.ui | 14 +- .../roundcorners/kis_round_corners_filter.cc | 28 +- .../roundcorners/kis_round_corners_filter.h | 10 +- .../kis_round_corners_filter_plugin.cc | 8 +- .../kis_round_corners_filter_plugin.h | 2 +- .../kis_small_tiles_filter.cc | 32 +- .../smalltilesfilter/kis_small_tiles_filter.h | 18 +- .../kis_small_tiles_filter_plugin.cc | 8 +- .../kis_small_tiles_filter_plugin.h | 2 +- .../filters/sobelfilter/kis_sobel_filter.cc | 66 +- .../filters/sobelfilter/kis_sobel_filter.h | 14 +- .../sobelfilter/kis_sobel_filter_plugin.cc | 8 +- .../sobelfilter/kis_sobel_filter_plugin.h | 2 +- .../plugins/filters/threadtest/threadtest.cc | 42 +- krita/plugins/filters/threadtest/threadtest.h | 4 +- .../filters/unsharp/kis_unsharp_filter.cc | 34 +- .../filters/unsharp/kis_unsharp_filter.h | 8 +- .../filters/unsharp/kis_wdg_unsharp.cc | 16 +- .../plugins/filters/unsharp/kis_wdg_unsharp.h | 3 +- krita/plugins/filters/unsharp/unsharp.cc | 10 +- krita/plugins/filters/unsharp/unsharp.h | 2 +- krita/plugins/filters/unsharp/wdgunsharp.ui | 14 +- .../filters/wavefilter/kis_wdg_wave.cpp | 30 +- .../plugins/filters/wavefilter/kis_wdg_wave.h | 3 +- .../plugins/filters/wavefilter/wavefilter.cc | 32 +- krita/plugins/filters/wavefilter/wavefilter.h | 8 +- .../filters/wavefilter/wdgwaveoptions.ui | 28 +- .../defaultpaintops/defaultpaintops_plugin.cc | 8 +- .../defaultpaintops/defaultpaintops_plugin.h | 3 +- .../defaultpaintops/kis_airbrushop.cc | 30 +- .../paintops/defaultpaintops/kis_airbrushop.h | 2 +- .../paintops/defaultpaintops/kis_brushop.cc | 86 +- .../paintops/defaultpaintops/kis_brushop.h | 27 +- .../defaultpaintops/kis_convolveop.cc | 2 +- .../kis_dlgbrushcurvecontrol.ui | 38 +- .../defaultpaintops/kis_duplicateop.cc | 50 +- .../paintops/defaultpaintops/kis_eraseop.cc | 30 +- .../paintops/defaultpaintops/kis_eraseop.h | 2 +- .../paintops/defaultpaintops/kis_penop.cc | 26 +- .../paintops/defaultpaintops/kis_penop.h | 6 +- .../paintops/defaultpaintops/kis_smudgeop.cc | 94 +- .../paintops/defaultpaintops/kis_smudgeop.h | 35 +- .../tools/defaulttools/default_tools.cc | 10 +- .../tools/defaulttools/default_tools.h | 3 +- .../tools/defaulttools/kis_tool_brush.cc | 40 +- .../tools/defaulttools/kis_tool_brush.h | 27 +- .../defaulttools/kis_tool_colorpicker.cc | 68 +- .../tools/defaulttools/kis_tool_colorpicker.h | 11 +- .../tools/defaulttools/kis_tool_duplicate.cc | 64 +- .../tools/defaulttools/kis_tool_duplicate.h | 13 +- .../tools/defaulttools/kis_tool_ellipse.cc | 22 +- .../tools/defaulttools/kis_tool_ellipse.h | 3 +- .../tools/defaulttools/kis_tool_fill.cc | 38 +- .../tools/defaulttools/kis_tool_fill.h | 25 +- .../tools/defaulttools/kis_tool_gradient.cc | 62 +- .../tools/defaulttools/kis_tool_gradient.h | 29 +- .../tools/defaulttools/kis_tool_line.cc | 38 +- .../tools/defaulttools/kis_tool_line.h | 13 +- .../tools/defaulttools/kis_tool_move.cc | 64 +- .../tools/defaulttools/kis_tool_move.h | 17 +- .../tools/defaulttools/kis_tool_pan.cc | 2 +- .../plugins/tools/defaulttools/kis_tool_pan.h | 11 +- .../tools/defaulttools/kis_tool_rectangle.cc | 20 +- .../tools/defaulttools/kis_tool_rectangle.h | 9 +- .../tools/defaulttools/kis_tool_text.cc | 90 +- .../tools/defaulttools/kis_tool_text.h | 19 +- .../tools/defaulttools/kis_tool_zoom.cc | 46 +- .../tools/defaulttools/kis_tool_zoom.h | 19 +- .../tools/defaulttools/wdgcolorpicker.ui | 32 +- .../selectiontools/kis_tool_move_selection.cc | 38 +- .../selectiontools/kis_tool_move_selection.h | 9 +- .../selectiontools/kis_tool_select_brush.cc | 28 +- .../selectiontools/kis_tool_select_brush.h | 11 +- .../kis_tool_select_contiguous.cc | 50 +- .../kis_tool_select_contiguous.h | 13 +- .../kis_tool_select_elliptical.cc | 70 +- .../kis_tool_select_elliptical.h | 13 +- .../selectiontools/kis_tool_select_eraser.cc | 26 +- .../selectiontools/kis_tool_select_eraser.h | 9 +- .../selectiontools/kis_tool_select_outline.cc | 58 +- .../selectiontools/kis_tool_select_outline.h | 15 +- .../kis_tool_select_polygonal.cc | 50 +- .../kis_tool_select_polygonal.h | 11 +- .../kis_tool_select_rectangular.cc | 66 +- .../kis_tool_select_rectangular.h | 11 +- .../tools/selectiontools/selection_tools.cc | 10 +- .../tools/selectiontools/selection_tools.h | 3 +- .../plugins/tools/tool_crop/kis_tool_crop.cc | 200 +- krita/plugins/tools/tool_crop/kis_tool_crop.h | 57 +- krita/plugins/tools/tool_crop/tool_crop.cc | 10 +- krita/plugins/tools/tool_crop/tool_crop.h | 3 +- .../plugins/tools/tool_crop/wdg_tool_crop.ui | 28 +- .../tools/tool_curves/kis_curve_framework.cc | 24 +- .../tools/tool_curves/kis_curve_framework.h | 32 +- .../tools/tool_curves/kis_tool_bezier.cc | 34 +- .../tools/tool_curves/kis_tool_bezier.h | 5 +- .../tool_curves/kis_tool_bezier_paint.cc | 20 +- .../tools/tool_curves/kis_tool_bezier_paint.h | 5 +- .../tool_curves/kis_tool_bezier_select.cc | 24 +- .../tool_curves/kis_tool_bezier_select.h | 5 +- .../tools/tool_curves/kis_tool_curve.cc | 108 +- .../tools/tool_curves/kis_tool_curve.h | 45 +- .../tools/tool_curves/kis_tool_example.cc | 12 +- .../tools/tool_curves/kis_tool_example.h | 3 +- .../tools/tool_curves/kis_tool_moutline.cc | 158 +- .../tools/tool_curves/kis_tool_moutline.h | 35 +- .../plugins/tools/tool_curves/tool_curves.cc | 10 +- krita/plugins/tools/tool_curves/tool_curves.h | 3 +- .../tools/tool_curves/wdg_tool_example.ui | 16 +- .../plugins/tools/tool_filter/kis_filterop.cc | 38 +- .../tools/tool_filter/kis_tool_filter.cc | 22 +- .../tools/tool_filter/kis_tool_filter.h | 13 +- .../plugins/tools/tool_filter/tool_filter.cc | 10 +- krita/plugins/tools/tool_filter/tool_filter.h | 3 +- .../kis_tool_perspectivegrid.cc | 90 +- .../kis_tool_perspectivegrid.h | 17 +- .../tool_perspectivegrid.cc | 10 +- .../tool_perspectivegrid.h | 3 +- .../kis_tool_perspectivetransform.cc | 122 +- .../kis_tool_perspectivetransform.h | 19 +- .../tool_perspectivetransform.cc | 10 +- .../tool_perspectivetransform.h | 3 +- .../tools/tool_polygon/kis_tool_polygon.cc | 32 +- .../tools/tool_polygon/kis_tool_polygon.h | 13 +- .../tools/tool_polygon/tool_polygon.cc | 10 +- .../plugins/tools/tool_polygon/tool_polygon.h | 3 +- .../tools/tool_polyline/kis_tool_polyline.cc | 38 +- .../tools/tool_polyline/kis_tool_polyline.h | 15 +- .../tools/tool_polyline/tool_polyline.cc | 10 +- .../tools/tool_polyline/tool_polyline.h | 3 +- .../kis_tool_selectsimilar.cc | 60 +- .../kis_tool_selectsimilar.h | 21 +- .../tools/tool_selectsimilar/selectsimilar.cc | 12 +- .../tools/tool_selectsimilar/selectsimilar.h | 3 +- .../plugins/tools/tool_star/kis_tool_star.cc | 30 +- krita/plugins/tools/tool_star/kis_tool_star.h | 15 +- krita/plugins/tools/tool_star/tool_star.cc | 10 +- krita/plugins/tools/tool_star/tool_star.h | 3 +- .../plugins/tools/tool_star/wdg_tool_star.ui | 16 +- .../tool_transform/kis_tool_transform.cc | 170 +- .../tools/tool_transform/kis_tool_transform.h | 33 +- .../tools/tool_transform/tool_transform.cc | 10 +- .../tools/tool_transform/tool_transform.h | 3 +- .../tool_transform/wdg_tool_transform.ui | 46 +- .../viewplugins/colorrange/colorrange.cc | 14 +- .../viewplugins/colorrange/colorrange.h | 3 +- .../viewplugins/colorrange/dlg_colorrange.cc | 82 +- .../viewplugins/colorrange/dlg_colorrange.h | 11 +- .../viewplugins/colorrange/wdg_colorrange.ui | 42 +- .../colorspaceconversion.cc | 42 +- .../colorspaceconversion.h | 3 +- .../dlg_colorspaceconversion.cc | 28 +- .../dlg_colorspaceconversion.h | 3 +- .../wdgconvertcolorspace.ui | 18 +- .../viewplugins/dropshadow/dlg_dropshadow.cc | 44 +- .../viewplugins/dropshadow/dlg_dropshadow.h | 15 +- .../viewplugins/dropshadow/kis_dropshadow.cc | 138 +- .../viewplugins/dropshadow/kis_dropshadow.h | 17 +- .../dropshadow/kis_dropshadow_plugin.cc | 12 +- .../dropshadow/kis_dropshadow_plugin.h | 3 +- .../viewplugins/dropshadow/wdg_dropshadow.ui | 34 +- .../filtersgallery/filters_gallery.cc | 28 +- .../filtersgallery/filters_gallery.h | 3 +- .../filtersgallery/kis_dlg_filtersgallery.cc | 36 +- .../filtersgallery/kis_dlg_filtersgallery.h | 17 +- .../filtersgallery/kis_wdg_filtersgallery.ui | 8 +- .../viewplugins/histogram/dlg_histogram.cc | 22 +- .../viewplugins/histogram/dlg_histogram.h | 3 +- .../viewplugins/histogram/histogram.cc | 32 +- .../plugins/viewplugins/histogram/histogram.h | 3 +- .../histogram/kis_histogram_widget.cc | 30 +- .../histogram/kis_histogram_widget.h | 3 +- .../viewplugins/histogram/wdghistogram.ui | 34 +- .../histogram_docker/histogramdocker.cc | 38 +- .../histogram_docker/histogramdocker.h | 16 +- .../kis_accumulating_producer.cc | 16 +- .../kis_accumulating_producer.h | 15 +- .../histogram_docker/kis_cachedhistogram.h | 4 +- .../kis_imagerasteredcache.cc | 22 +- .../histogram_docker/kis_imagerasteredcache.h | 21 +- .../history_docker/historydocker.cc | 6 +- .../history_docker/historydocker.h | 2 +- .../viewplugins/imagesize/dlg_imagesize.cc | 84 +- .../viewplugins/imagesize/dlg_imagesize.h | 21 +- .../viewplugins/imagesize/dlg_layersize.cc | 84 +- .../viewplugins/imagesize/dlg_layersize.h | 19 +- .../viewplugins/imagesize/imagesize.cc | 42 +- .../plugins/viewplugins/imagesize/imagesize.h | 3 +- .../viewplugins/imagesize/wdg_imagesize.ui | 48 +- .../viewplugins/imagesize/wdg_layersize.ui | 28 +- .../viewplugins/imagesize/wdg_resolution.ui | 22 +- .../modify_selection/dlg_border_selection.cc | 20 +- .../modify_selection/dlg_border_selection.h | 7 +- .../modify_selection/dlg_grow_selection.cc | 20 +- .../modify_selection/dlg_grow_selection.h | 7 +- .../modify_selection/dlg_shrink_selection.cc | 20 +- .../modify_selection/dlg_shrink_selection.h | 7 +- .../modify_selection/modify_selection.cc | 36 +- .../modify_selection/modify_selection.h | 3 +- .../modify_selection/wdg_border_selection.ui | 10 +- .../modify_selection/wdg_grow_selection.ui | 10 +- .../modify_selection/wdg_shrink_selection.ui | 12 +- .../performancetest/dlg_perftest.cc | 22 +- .../performancetest/dlg_perftest.h | 3 +- .../viewplugins/performancetest/perftest.cc | 496 +- .../viewplugins/performancetest/perftest.h | 43 +- .../performancetest/wdg_perftest.ui | 50 +- .../rotateimage/dlg_rotateimage.cc | 24 +- .../viewplugins/rotateimage/dlg_rotateimage.h | 3 +- .../viewplugins/rotateimage/rotateimage.cc | 32 +- .../viewplugins/rotateimage/rotateimage.h | 3 +- .../rotateimage/wdg_rotateimage.ui | 44 +- .../viewplugins/screenshot/ksnapshot.cpp | 194 +- .../viewplugins/screenshot/ksnapshot.h | 48 +- .../viewplugins/screenshot/ksnapshotwidget.ui | 34 +- .../screenshot/ksnapshotwidget.ui.h | 6 +- .../viewplugins/screenshot/regiongrabber.cpp | 76 +- .../viewplugins/screenshot/regiongrabber.h | 33 +- .../viewplugins/screenshot/screenshot.cpp | 10 +- .../viewplugins/screenshot/screenshot.h | 3 +- .../scripting/kritacore/kritacoremodule.cpp | 60 +- .../scripting/kritacore/kritacoremodule.h | 16 +- .../scripting/kritacore/krs_color.cpp | 2 +- .../scripting/kritacore/krs_color.h | 10 +- .../scripting/kritacore/krs_doc.cpp | 2 +- .../viewplugins/scripting/kritacore/krs_doc.h | 2 +- .../scripting/kritacore/krs_filter.cpp | 12 +- .../scripting/kritacore/krs_filter.h | 2 +- .../kritacore/krs_filter_configuration.cpp | 12 +- .../kritacore/krs_filter_configuration.h | 2 +- .../scripting/kritacore/krs_histogram.cpp | 2 +- .../scripting/kritacore/krs_histogram.h | 2 +- .../scripting/kritacore/krs_image.cpp | 8 +- .../scripting/kritacore/krs_image.h | 2 +- .../scripting/kritacore/krs_iterator.h | 61 +- .../scripting/kritacore/krs_paint_layer.cpp | 26 +- .../scripting/kritacore/krs_paint_layer.h | 2 +- .../scripting/kritacore/krs_painter.cpp | 50 +- .../scripting/kritacore/krs_painter.h | 6 +- .../scripting/kritacore/krs_wavelet.cpp | 20 +- .../kritascripting/kis_script_monitor.cpp | 4 +- .../kritascripting/kis_script_monitor.h | 5 +- .../kritascripting/kis_script_progress.cpp | 10 +- .../kritascripting/kis_script_progress.h | 14 +- .../scripting/samples/python/reshapehisto.py | 2 +- .../scripting/samples/ruby/randompaint.rb | 16 +- .../samples/ruby/torture-painting.rb | 16 +- .../viewplugins/scripting/scripting.cc | 30 +- .../plugins/viewplugins/scripting/scripting.h | 3 +- .../viewplugins/selectopaque/selectopaque.cc | 20 +- .../viewplugins/selectopaque/selectopaque.h | 3 +- .../separate_channels/dlg_separate.cc | 30 +- .../separate_channels/dlg_separate.h | 7 +- .../kis_channel_separator.cc | 34 +- .../separate_channels/kis_channel_separator.h | 1 + .../kis_separate_channels_plugin.cc | 12 +- .../kis_separate_channels_plugin.h | 3 +- .../separate_channels/wdg_separations.ui | 34 +- .../viewplugins/shearimage/dlg_shearimage.cc | 32 +- .../viewplugins/shearimage/dlg_shearimage.h | 11 +- .../viewplugins/shearimage/shearimage.cc | 28 +- .../viewplugins/shearimage/shearimage.h | 3 +- .../viewplugins/shearimage/wdg_shearimage.ui | 12 +- .../viewplugins/substrate/dlg_substrate.cc | 12 +- .../viewplugins/substrate/dlg_substrate.h | 9 +- .../substrate/kis_repeating_substrate.h | 4 +- .../viewplugins/substrate/substrate.cc | 16 +- .../plugins/viewplugins/substrate/substrate.h | 3 +- .../viewplugins/substrate/wdgsubstrate.ui | 48 +- .../viewplugins/variations/dlg_variations.cc | 12 +- .../viewplugins/variations/dlg_variations.h | 9 +- .../viewplugins/variations/variations.cc | 22 +- .../viewplugins/variations/variations.h | 3 +- .../viewplugins/variations/wdg_variations.ui | 164 +- krita/sdk/kis_annotation.h | 22 +- krita/sdk/kis_canvas_controller.h | 48 +- krita/sdk/kis_canvas_subject.h | 4 +- krita/sdk/kis_generic_registry.h | 16 +- krita/sdk/kis_global.h | 36 +- krita/sdk/kis_id.h | 18 +- krita/sdk/kis_progress_display_interface.h | 24 +- krita/sdk/kis_progress_subject.h | 9 +- krita/sdk/kis_shared_ptr_vector.h | 12 +- krita/sdk/kis_undo_adapter.h | 6 +- krita/ui/imageviewer.cc | 32 +- krita/ui/imageviewer.h | 27 +- krita/ui/kcurve.cc | 126 +- krita/ui/kcurve.h | 45 +- krita/ui/kis_autobrush.cc | 40 +- krita/ui/kis_autobrush.h | 9 +- krita/ui/kis_autogradient.cc | 38 +- krita/ui/kis_autogradient.h | 7 +- krita/ui/kis_birdeye_box.cc | 90 +- krita/ui/kis_birdeye_box.h | 15 +- krita/ui/kis_boundary_painter.cc | 12 +- krita/ui/kis_boundary_painter.h | 2 +- krita/ui/kis_brush_chooser.cc | 28 +- krita/ui/kis_brush_chooser.h | 13 +- krita/ui/kis_button_event.h | 8 +- krita/ui/kis_button_press_event.h | 2 +- krita/ui/kis_button_release_event.h | 2 +- krita/ui/kis_canvas.cc | 324 +- krita/ui/kis_canvas.h | 214 +- krita/ui/kis_canvas_painter.cc | 376 +- krita/ui/kis_canvas_painter.h | 366 +- krita/ui/kis_clipboard.cc | 84 +- krita/ui/kis_clipboard.h | 11 +- krita/ui/kis_cmb_composite.cc | 20 +- krita/ui/kis_cmb_composite.h | 11 +- krita/ui/kis_cmb_idlist.cc | 16 +- krita/ui/kis_cmb_idlist.h | 11 +- krita/ui/kis_color_cup.cc | 68 +- krita/ui/kis_color_cup.h | 38 +- krita/ui/kis_config.cc | 150 +- krita/ui/kis_config.h | 108 +- krita/ui/kis_controlframe.cc | 74 +- krita/ui/kis_controlframe.h | 22 +- krita/ui/kis_cursor.cc | 208 +- krita/ui/kis_cursor.h | 68 +- krita/ui/kis_custom_brush.cc | 38 +- krita/ui/kis_custom_brush.h | 7 +- krita/ui/kis_custom_image_widget.cc | 30 +- krita/ui/kis_custom_image_widget.h | 7 +- krita/ui/kis_custom_palette.cc | 34 +- krita/ui/kis_custom_palette.h | 5 +- krita/ui/kis_custom_pattern.cc | 26 +- krita/ui/kis_custom_pattern.h | 7 +- krita/ui/kis_dlg_adj_layer_props.cc | 40 +- krita/ui/kis_dlg_adj_layer_props.h | 23 +- krita/ui/kis_dlg_adjustment_layer.cc | 46 +- krita/ui/kis_dlg_adjustment_layer.h | 31 +- krita/ui/kis_dlg_apply_profile.cc | 16 +- krita/ui/kis_dlg_apply_profile.h | 3 +- krita/ui/kis_dlg_image_properties.cc | 44 +- krita/ui/kis_dlg_image_properties.h | 9 +- krita/ui/kis_dlg_layer_properties.cc | 30 +- krita/ui/kis_dlg_layer_properties.h | 15 +- krita/ui/kis_dlg_new_layer.cc | 36 +- krita/ui/kis_dlg_new_layer.h | 15 +- krita/ui/kis_dlg_preferences.cc | 162 +- krita/ui/kis_dlg_preferences.h | 93 +- krita/ui/kis_doc.cc | 250 +- krita/ui/kis_doc.h | 93 +- krita/ui/kis_doc_iface.cc | 2 +- krita/ui/kis_doc_iface.h | 4 +- krita/ui/kis_double_click_event.h | 2 +- krita/ui/kis_double_widget.cc | 30 +- krita/ui/kis_double_widget.h | 21 +- krita/ui/kis_event.h | 8 +- krita/ui/kis_factory.cc | 32 +- krita/ui/kis_factory.h | 11 +- krita/ui/kis_filter_manager.cc | 80 +- krita/ui/kis_filter_manager.h | 19 +- krita/ui/kis_filters_listview.cc | 70 +- krita/ui/kis_filters_listview.h | 38 +- krita/ui/kis_gradient_chooser.cc | 22 +- krita/ui/kis_gradient_chooser.h | 14 +- krita/ui/kis_gradient_slider_widget.cc | 98 +- krita/ui/kis_gradient_slider_widget.h | 17 +- krita/ui/kis_grid_drawer.cpp | 70 +- krita/ui/kis_grid_drawer.h | 32 +- krita/ui/kis_grid_manager.cpp | 26 +- krita/ui/kis_grid_manager.h | 9 +- krita/ui/kis_histogram_view.cc | 60 +- krita/ui/kis_histogram_view.h | 33 +- krita/ui/kis_icon_item.cc | 28 +- krita/ui/kis_icon_item.h | 8 +- krita/ui/kis_iconwidget.cc | 26 +- krita/ui/kis_iconwidget.h | 11 +- krita/ui/kis_import_catcher.cc | 16 +- krita/ui/kis_import_catcher.h | 5 +- krita/ui/kis_input_device.cc | 6 +- krita/ui/kis_input_device.h | 20 +- krita/ui/kis_int_spinbox.cc | 60 +- krita/ui/kis_int_spinbox.h | 56 +- krita/ui/kis_itemchooser.cc | 16 +- krita/ui/kis_itemchooser.h | 19 +- krita/ui/kis_label_cursor_pos.cc | 10 +- krita/ui/kis_label_cursor_pos.h | 13 +- krita/ui/kis_label_progress.cc | 52 +- krita/ui/kis_label_progress.h | 21 +- krita/ui/kis_label_zoom.h | 9 +- krita/ui/kis_layerbox.cc | 264 +- krita/ui/kis_layerbox.h | 45 +- krita/ui/kis_layerlist.cc | 74 +- krita/ui/kis_layerlist.h | 25 +- krita/ui/kis_load_visitor.h | 42 +- krita/ui/kis_matrix_widget.ui | 34 +- krita/ui/kis_matrix_widget.ui.h | 2 +- krita/ui/kis_move_event.h | 2 +- krita/ui/kis_multi_bool_filter_widget.cc | 26 +- krita/ui/kis_multi_bool_filter_widget.h | 19 +- krita/ui/kis_multi_double_filter_widget.cc | 34 +- krita/ui/kis_multi_double_filter_widget.h | 20 +- krita/ui/kis_multi_integer_filter_widget.cc | 32 +- krita/ui/kis_multi_integer_filter_widget.h | 26 +- krita/ui/kis_opengl_canvas.cc | 42 +- krita/ui/kis_opengl_canvas.h | 44 +- krita/ui/kis_opengl_canvas_painter.cc | 232 +- krita/ui/kis_opengl_canvas_painter.h | 194 +- krita/ui/kis_opengl_image_context.cc | 46 +- krita/ui/kis_opengl_image_context.h | 33 +- krita/ui/kis_paintop_box.cc | 68 +- krita/ui/kis_paintop_box.h | 31 +- krita/ui/kis_palette_view.cc | 58 +- krita/ui/kis_palette_view.h | 11 +- krita/ui/kis_palette_widget.cc | 72 +- krita/ui/kis_palette_widget.h | 27 +- krita/ui/kis_part_layer.cc | 88 +- krita/ui/kis_part_layer.h | 35 +- krita/ui/kis_part_layer_handler.cc | 22 +- krita/ui/kis_part_layer_handler.h | 17 +- krita/ui/kis_pattern_chooser.cc | 12 +- krita/ui/kis_pattern_chooser.h | 7 +- krita/ui/kis_perspective_grid_manager.cpp | 16 +- krita/ui/kis_perspective_grid_manager.h | 9 +- krita/ui/kis_populate_visitor.h | 6 +- krita/ui/kis_previewdialog.cc | 22 +- krita/ui/kis_previewdialog.h | 9 +- krita/ui/kis_previewwidget.cc | 88 +- krita/ui/kis_previewwidget.h | 23 +- krita/ui/kis_previewwidgetbase.ui | 34 +- krita/ui/kis_qpaintdevice_canvas.cc | 46 +- krita/ui/kis_qpaintdevice_canvas.h | 48 +- krita/ui/kis_qpaintdevice_canvas_painter.cc | 256 +- krita/ui/kis_qpaintdevice_canvas_painter.h | 190 +- krita/ui/kis_resource_mediator.cc | 18 +- krita/ui/kis_resource_mediator.h | 17 +- krita/ui/kis_resourceserver.cc | 42 +- krita/ui/kis_resourceserver.h | 25 +- krita/ui/kis_ruler.cc | 70 +- krita/ui/kis_ruler.h | 39 +- krita/ui/kis_save_visitor.h | 46 +- krita/ui/kis_savexml_visitor.h | 26 +- krita/ui/kis_selection_manager.cc | 368 +- krita/ui/kis_selection_manager.h | 25 +- krita/ui/kis_selection_options.cc | 16 +- krita/ui/kis_selection_options.h | 9 +- krita/ui/kis_text_brush.cc | 32 +- krita/ui/kis_text_brush.h | 15 +- krita/ui/kis_tool.cc | 20 +- krita/ui/kis_tool.h | 45 +- krita/ui/kis_tool_dummy.cc | 18 +- krita/ui/kis_tool_dummy.h | 13 +- krita/ui/kis_tool_freehand.cc | 54 +- krita/ui/kis_tool_freehand.h | 5 +- krita/ui/kis_tool_manager.cc | 28 +- krita/ui/kis_tool_manager.h | 11 +- krita/ui/kis_tool_non_paint.cc | 12 +- krita/ui/kis_tool_non_paint.h | 29 +- krita/ui/kis_tool_paint.cc | 64 +- krita/ui/kis_tool_paint.h | 59 +- krita/ui/kis_tool_registry.cc | 6 +- krita/ui/kis_tool_registry.h | 7 +- krita/ui/kis_tool_shape.cc | 36 +- krita/ui/kis_tool_shape.h | 11 +- krita/ui/kis_view.cc | 924 +- krita/ui/kis_view.h | 177 +- krita/ui/kis_view_iface.h | 2 +- krita/ui/kobirdeyepanel.cpp | 188 +- krita/ui/kobirdeyepanel.h | 61 +- krita/ui/layerlist.cpp | 444 +- krita/ui/layerlist.h | 157 +- krita/ui/squeezedcombobox.cpp | 82 +- krita/ui/squeezedcombobox.h | 59 +- krita/ui/wdgapplyprofile.ui | 22 +- krita/ui/wdgautobrush.ui | 60 +- krita/ui/wdgautogradient.ui | 48 +- krita/ui/wdgbirdeye.ui | 54 +- krita/ui/wdgcolorsettings.ui | 44 +- krita/ui/wdgcustombrush.ui | 40 +- krita/ui/wdgcustompalette.ui | 12 +- krita/ui/wdgcustompattern.ui | 34 +- krita/ui/wdgdisplaysettings.ui | 16 +- krita/ui/wdggeneralsettings.ui | 40 +- krita/ui/wdggridsettings.ui | 58 +- krita/ui/wdglayerbox.ui | 46 +- krita/ui/wdglayerproperties.ui | 16 +- krita/ui/wdgnewimage.ui | 54 +- krita/ui/wdgpalettechooser.ui | 16 +- krita/ui/wdgperformancesettings.ui | 24 +- krita/ui/wdgpressuresettings.ui | 12 +- krita/ui/wdgselectionoptions.ui | 12 +- krita/ui/wdgshapeoptions.ui | 12 +- krita/ui/wdgtabletdevicesettings.ui | 56 +- krita/ui/wdgtabletsettings.ui | 24 +- krita/ui/wdgtextbrush.ui | 32 +- kspread/DESIGN.html | 44 +- kspread/Doxyfile | 6 +- kspread/KSpreadAppIface.cc | 18 +- kspread/KSpreadAppIface.h | 10 +- kspread/KSpreadCellIface.cc | 268 +- kspread/KSpreadCellIface.h | 112 +- kspread/KSpreadColumnIface.cc | 2 +- kspread/KSpreadDocIface.cc | 48 +- kspread/KSpreadDocIface.h | 26 +- kspread/KSpreadLayoutIface.cc | 230 +- kspread/KSpreadLayoutIface.h | 44 +- kspread/KSpreadMapIface.cc | 28 +- kspread/KSpreadMapIface.h | 16 +- kspread/KSpreadRowIface.cc | 2 +- kspread/KSpreadTableIface.cc | 72 +- kspread/KSpreadTableIface.h | 48 +- kspread/KSpreadViewIface.cc | 38 +- kspread/KSpreadViewIface.h | 36 +- kspread/OASIS.txt | 32 +- kspread/commands.cc | 144 +- kspread/commands.h | 104 +- kspread/dependencies.cc | 128 +- kspread/dependencies.h | 6 +- kspread/dialogs/SheetSelectWidget.ui | 4 +- kspread/dialogs/font_cell_format.ui | 36 +- kspread/dialogs/kspread_dlg_angle.cc | 20 +- kspread/dialogs/kspread_dlg_angle.h | 5 +- kspread/dialogs/kspread_dlg_area.cc | 36 +- kspread/dialogs/kspread_dlg_area.h | 15 +- kspread/dialogs/kspread_dlg_comment.cc | 22 +- kspread/dialogs/kspread_dlg_comment.h | 11 +- kspread/dialogs/kspread_dlg_conditional.cc | 140 +- kspread/dialogs/kspread_dlg_conditional.h | 40 +- kspread/dialogs/kspread_dlg_cons.cc | 198 +- kspread/dialogs/kspread_dlg_cons.h | 39 +- kspread/dialogs/kspread_dlg_csv.cc | 218 +- kspread/dialogs/kspread_dlg_csv.h | 89 +- kspread/dialogs/kspread_dlg_database.cc | 436 +- kspread/dialogs/kspread_dlg_database.h | 137 +- kspread/dialogs/kspread_dlg_find.cc | 68 +- kspread/dialogs/kspread_dlg_find.h | 29 +- kspread/dialogs/kspread_dlg_format.cc | 62 +- kspread/dialogs/kspread_dlg_format.h | 33 +- kspread/dialogs/kspread_dlg_formula.cc | 244 +- kspread/dialogs/kspread_dlg_formula.h | 85 +- kspread/dialogs/kspread_dlg_goalseek.cc | 102 +- kspread/dialogs/kspread_dlg_goalseek.h | 69 +- kspread/dialogs/kspread_dlg_goto.cc | 26 +- kspread/dialogs/kspread_dlg_goto.h | 5 +- kspread/dialogs/kspread_dlg_insert.cc | 40 +- kspread/dialogs/kspread_dlg_insert.h | 19 +- kspread/dialogs/kspread_dlg_layout.cc | 1092 +- kspread/dialogs/kspread_dlg_layout.h | 282 +- kspread/dialogs/kspread_dlg_list.cc | 86 +- kspread/dialogs/kspread_dlg_list.h | 31 +- kspread/dialogs/kspread_dlg_paperlayout.cc | 182 +- kspread/dialogs/kspread_dlg_paperlayout.h | 59 +- kspread/dialogs/kspread_dlg_pasteinsert.cc | 28 +- kspread/dialogs/kspread_dlg_pasteinsert.h | 13 +- kspread/dialogs/kspread_dlg_preference.cc | 316 +- kspread/dialogs/kspread_dlg_preference.h | 104 +- kspread/dialogs/kspread_dlg_reference.cc | 138 +- kspread/dialogs/kspread_dlg_reference.h | 46 +- kspread/dialogs/kspread_dlg_resize2.cc | 44 +- kspread/dialogs/kspread_dlg_resize2.h | 6 +- kspread/dialogs/kspread_dlg_series.cc | 70 +- kspread/dialogs/kspread_dlg_series.h | 17 +- kspread/dialogs/kspread_dlg_show.cc | 38 +- kspread/dialogs/kspread_dlg_show.h | 9 +- kspread/dialogs/kspread_dlg_showColRow.cc | 48 +- kspread/dialogs/kspread_dlg_showColRow.h | 13 +- kspread/dialogs/kspread_dlg_sort.cc | 230 +- kspread/dialogs/kspread_dlg_sort.h | 63 +- kspread/dialogs/kspread_dlg_special.cc | 56 +- kspread/dialogs/kspread_dlg_special.h | 11 +- kspread/dialogs/kspread_dlg_styles.cc | 62 +- kspread/dialogs/kspread_dlg_styles.h | 14 +- kspread/dialogs/kspread_dlg_subtotal.cc | 62 +- kspread/dialogs/kspread_dlg_subtotal.h | 15 +- kspread/dialogs/kspread_dlg_validity.cc | 198 +- kspread/dialogs/kspread_dlg_validity.h | 49 +- kspread/dialogs/kspreadsubtotal.ui | 34 +- kspread/dialogs/link.cc | 122 +- kspread/dialogs/link.h | 11 +- kspread/dialogs/position_cell_format.ui | 70 +- kspread/dialogs/protection_cell_format.ui | 32 +- kspread/dialogs/sheet_properties.cc | 16 +- kspread/dialogs/sheet_properties.h | 7 +- kspread/dialogs/sheet_properties_base.ui | 44 +- kspread/digest.cc | 6 +- kspread/digest.h | 6 +- kspread/doc/PAINTING.html | 10 +- kspread/formula.cc | 134 +- kspread/formula.h | 42 +- kspread/functions.cc | 90 +- kspread/functions.h | 70 +- kspread/ksploadinginfo.h | 26 +- kspread/kspread_autofill.cc | 202 +- kspread/kspread_autofill.h | 36 +- kspread/kspread_brush.cc | 42 +- kspread/kspread_brush.h | 26 +- kspread/kspread_canvas.cc | 1214 +- kspread/kspread_canvas.h | 201 +- kspread/kspread_cell.cc | 1388 +- kspread/kspread_cell.h | 252 +- kspread/kspread_cluster.cc | 28 +- kspread/kspread_cluster.h | 18 +- kspread/kspread_condition.cc | 150 +- kspread/kspread_condition.h | 40 +- kspread/kspread_doc.cc | 454 +- kspread/kspread_doc.h | 167 +- kspread/kspread_editors.cc | 372 +- kspread/kspread_editors.h | 95 +- kspread/kspread_events.cc | 2 +- kspread/kspread_events.h | 14 +- kspread/kspread_factory.cc | 8 +- kspread/kspread_factory.h | 5 +- kspread/kspread_format.cc | 485 +- kspread/kspread_format.h | 208 +- kspread/kspread_functions_conversion.cc | 28 +- kspread/kspread_functions_database.cc | 2 +- kspread/kspread_functions_datetime.cc | 94 +- kspread/kspread_functions_engineering.cc | 236 +- kspread/kspread_functions_financial.cc | 42 +- kspread/kspread_functions_helper.cc | 18 +- kspread/kspread_functions_helper.h | 6 +- kspread/kspread_functions_information.cc | 16 +- kspread/kspread_functions_math.cc | 14 +- kspread/kspread_functions_reference.cc | 18 +- kspread/kspread_functions_statistical.cc | 6 +- kspread/kspread_functions_text.cc | 134 +- kspread/kspread_generalProperty.cpp | 56 +- kspread/kspread_generalProperty.h | 9 +- kspread/kspread_genvalidationstyle.cc | 86 +- kspread/kspread_genvalidationstyle.h | 42 +- kspread/kspread_global.h | 14 +- kspread/kspread_handler.cc | 114 +- kspread/kspread_handler.h | 27 +- kspread/kspread_locale.cc | 14 +- kspread/kspread_locale.h | 8 +- kspread/kspread_map.cc | 112 +- kspread/kspread_map.h | 51 +- kspread/kspread_numformat.cc | 256 +- kspread/kspread_object.cc | 520 +- kspread/kspread_object.h | 126 +- kspread/kspread_pen.cc | 14 +- kspread/kspread_pen.h | 12 +- kspread/kspread_propertyEditor.cpp | 14 +- kspread/kspread_propertyEditor.h | 9 +- kspread/kspread_sheet.cc | 1234 +- kspread/kspread_sheet.h | 294 +- kspread/kspread_sheetprint.cc | 344 +- kspread/kspread_sheetprint.h | 135 +- kspread/kspread_style.cc | 526 +- kspread/kspread_style.h | 220 +- kspread/kspread_style_manager.cc | 102 +- kspread/kspread_style_manager.h | 28 +- kspread/kspread_toolbox.cc | 78 +- kspread/kspread_toolbox.h | 38 +- kspread/kspread_undo.cc | 512 +- kspread/kspread_undo.h | 298 +- kspread/kspread_util.cc | 248 +- kspread/kspread_util.h | 124 +- kspread/kspread_value.cc | 70 +- kspread/kspread_value.h | 38 +- kspread/kspread_view.cc | 1470 +- kspread/kspread_view.h | 140 +- kspread/ksprsavinginfo.h | 12 +- kspread/manipulator.cc | 244 +- kspread/manipulator.h | 144 +- kspread/manipulator_data.cc | 18 +- kspread/manipulator_data.h | 8 +- kspread/plugins/calculator/configdlg.cpp | 62 +- kspread/plugins/calculator/configdlg.h | 75 +- kspread/plugins/calculator/dlabel.cpp | 8 +- kspread/plugins/calculator/dlabel.h | 9 +- kspread/plugins/calculator/kcalc.cpp | 576 +- kspread/plugins/calculator/kcalc.h | 207 +- kspread/plugins/calculator/kcalc_core.cpp | 170 +- kspread/plugins/calculator/kcalctype.h | 2 +- kspread/plugins/calculator/main.cpp | 34 +- kspread/plugins/calculator/main.h | 22 +- kspread/plugins/calculator/stats.cpp | 2 +- kspread/plugins/calculator/stats.h | 10 +- .../kspread_insertcalendardialog.cc | 40 +- .../kspread_insertcalendardialog.h | 23 +- .../kspread_insertcalendardialogbase.ui | 18 +- .../kspread_plugininsertcalendar.cc | 48 +- .../kspread_plugininsertcalendar.h | 9 +- .../scripting/kspreadcore/krs_cell.cpp | 72 +- .../plugins/scripting/kspreadcore/krs_cell.h | 36 +- .../plugins/scripting/kspreadcore/krs_doc.cpp | 30 +- .../plugins/scripting/kspreadcore/krs_doc.h | 32 +- .../scripting/kspreadcore/krs_sheet.cpp | 14 +- .../plugins/scripting/kspreadcore/krs_sheet.h | 6 +- .../kspreadcore/kspreadcoremodule.cpp | 8 +- .../scripting/kspreadcore/kspreadcoremodule.h | 8 +- kspread/plugins/scripting/scripting.cc | 26 +- kspread/plugins/scripting/scripting.h | 3 +- .../scripts/exporthtml/ExportHtml.py | 10 +- .../scripts/scripteditor/ScriptEditor.py | 188 +- kspread/region.cc | 164 +- kspread/region.h | 90 +- kspread/selection.cc | 238 +- kspread/selection.h | 67 +- kspread/templates/Business/BalanceSheet.kst | 200 +- kspread/templates/Business/PackingSlip.kst | 212 +- kspread/templates/Business/PriceQuotation.kst | 206 +- .../HomeFamily/CreditCardTracker.kst | 284 +- kspread/templates/HomeFamily/MenuPlan.kst | 72 +- .../HomeFamily/VacationChecklist.kst | 72 +- kspread/tests/formula_tester.cc | 44 +- kspread/tests/formula_tester.h | 14 +- kspread/tests/generate-openformula-tests | 2 +- kspread/tests/inspector.cc | 152 +- kspread/tests/inspector.h | 1 + kspread/tests/test_formula.cc | 6 +- kspread/tests/tester.cc | 12 +- kspread/tests/tester.h | 12 +- kspread/tests/testrunner.cc | 56 +- kspread/tests/testrunner.h | 1 + kspread/tests/value_tester.cc | 38 +- kspread/tests/value_tester.h | 4 +- kspread/valuecalc.cc | 38 +- kspread/valuecalc.h | 40 +- kspread/valueconverter.cc | 28 +- kspread/valueformatter.cc | 240 +- kspread/valueformatter.h | 26 +- kspread/valueparser.cc | 110 +- kspread/valueparser.h | 28 +- kugar/kudesigner/kudesigner_doc.cpp | 76 +- kugar/kudesigner/kudesigner_doc.h | 27 +- kugar/kudesigner/kudesigner_factory.cpp | 14 +- kugar/kudesigner/kudesigner_factory.h | 5 +- kugar/kudesigner/kudesigner_view.cpp | 164 +- kugar/kudesigner/kudesigner_view.h | 25 +- kugar/kudesigner/templates/General/A0.ktm | 2 +- kugar/kudesigner/templates/General/A1.ktm | 2 +- kugar/kudesigner/templates/General/A2.ktm | 2 +- kugar/kudesigner/templates/General/A3.ktm | 2 +- kugar/kudesigner/templates/General/A4.ktm | 2 +- kugar/kudesigner/templates/General/A5.ktm | 2 +- kugar/kudesigner/templates/General/A6.ktm | 2 +- kugar/kudesigner/templates/General/A7.ktm | 2 +- kugar/kudesigner/templates/General/A8.ktm | 2 +- kugar/kudesigner/templates/General/A9.ktm | 2 +- kugar/kudesigner/templates/General/B0.ktm | 2 +- kugar/kudesigner/templates/General/B1.ktm | 2 +- kugar/kudesigner/templates/General/B10.ktm | 2 +- kugar/kudesigner/templates/General/B2.ktm | 2 +- kugar/kudesigner/templates/General/B3.ktm | 2 +- kugar/kudesigner/templates/General/B4.ktm | 2 +- kugar/kudesigner/templates/General/B5.ktm | 2 +- kugar/kudesigner/templates/General/B6.ktm | 2 +- kugar/kudesigner/templates/General/B7.ktm | 2 +- kugar/kudesigner/templates/General/B8.ktm | 2 +- kugar/kudesigner/templates/General/B9.ktm | 2 +- kugar/kudesigner/templates/General/C5E.ktm | 2 +- .../kudesigner/templates/General/Comm10E.ktm | 2 +- kugar/kudesigner/templates/General/DLE.ktm | 2 +- .../templates/General/Executive.ktm | 2 +- kugar/kudesigner/templates/General/Folio.ktm | 2 +- kugar/kudesigner/templates/General/Ledger.ktm | 2 +- kugar/kudesigner/templates/General/Legal.ktm | 2 +- kugar/kudesigner/templates/General/Letter.ktm | 2 +- .../kudesigner/templates/General/Tabloid.ktm | 2 +- kugar/kudesigner_lib/band.cpp | 38 +- kugar/kudesigner_lib/band.h | 20 +- kugar/kudesigner_lib/box.cpp | 6 +- kugar/kudesigner_lib/box.h | 12 +- kugar/kudesigner_lib/calcfield.cpp | 8 +- kugar/kudesigner_lib/calcfield.h | 4 +- kugar/kudesigner_lib/canvas.cpp | 80 +- kugar/kudesigner_lib/canvas.h | 37 +- kugar/kudesigner_lib/command.cpp | 22 +- kugar/kudesigner_lib/command.h | 4 +- kugar/kudesigner_lib/commdefs.cpp | 8 +- kugar/kudesigner_lib/commdefs.h | 8 +- kugar/kudesigner_lib/detail.cpp | 10 +- kugar/kudesigner_lib/detail.h | 4 +- kugar/kudesigner_lib/detailfooter.cpp | 8 +- kugar/kudesigner_lib/detailfooter.h | 4 +- kugar/kudesigner_lib/detailheader.cpp | 8 +- kugar/kudesigner_lib/detailheader.h | 4 +- kugar/kudesigner_lib/field.cpp | 12 +- kugar/kudesigner_lib/field.h | 4 +- kugar/kudesigner_lib/kugartemplate.cpp | 48 +- kugar/kudesigner_lib/kugartemplate.h | 16 +- kugar/kudesigner_lib/label.cpp | 48 +- kugar/kudesigner_lib/label.h | 12 +- kugar/kudesigner_lib/line.cpp | 20 +- kugar/kudesigner_lib/line.h | 6 +- kugar/kudesigner_lib/pagefooter.cpp | 8 +- kugar/kudesigner_lib/pagefooter.h | 4 +- kugar/kudesigner_lib/pageheader.cpp | 8 +- kugar/kudesigner_lib/pageheader.h | 6 +- kugar/kudesigner_lib/plugin.cpp | 4 +- kugar/kudesigner_lib/plugin.h | 19 +- kugar/kudesigner_lib/propertyserializer.cpp | 26 +- kugar/kudesigner_lib/propertyserializer.h | 4 +- kugar/kudesigner_lib/reportfooter.cpp | 8 +- kugar/kudesigner_lib/reportfooter.h | 4 +- kugar/kudesigner_lib/reportheader.cpp | 8 +- kugar/kudesigner_lib/reportheader.h | 6 +- kugar/kudesigner_lib/reportitem.cpp | 104 +- kugar/kudesigner_lib/reportitem.h | 34 +- kugar/kudesigner_lib/section.cpp | 2 +- kugar/kudesigner_lib/section.h | 6 +- kugar/kudesigner_lib/specialfield.cpp | 8 +- kugar/kudesigner_lib/specialfield.h | 4 +- kugar/kudesigner_lib/structurewidget.cpp | 68 +- kugar/kudesigner_lib/structurewidget.h | 11 +- kugar/kudesigner_lib/view.cpp | 184 +- kugar/kudesigner_lib/view.h | 61 +- kugar/lib/inputmask.cpp | 130 +- kugar/lib/inputmask.h | 35 +- kugar/lib/mfieldobject.cpp | 34 +- kugar/lib/mfieldobject.h | 26 +- kugar/lib/mlabelobject.cpp | 44 +- kugar/lib/mlabelobject.h | 26 +- kugar/lib/mlineobject.cpp | 16 +- kugar/lib/mlineobject.h | 16 +- kugar/lib/mpagecollection.cpp | 22 +- kugar/lib/mpagecollection.h | 30 +- kugar/lib/mpagedisplay.cpp | 16 +- kugar/lib/mpagedisplay.h | 27 +- kugar/lib/mreportdetail.cpp | 6 +- kugar/lib/mreportdetail.h | 8 +- kugar/lib/mreportengine.cpp | 230 +- kugar/lib/mreportengine.h | 89 +- kugar/lib/mreportobject.cpp | 22 +- kugar/lib/mreportobject.h | 20 +- kugar/lib/mreportsection.cpp | 36 +- kugar/lib/mreportsection.h | 34 +- kugar/lib/mreportviewer.cpp | 70 +- kugar/lib/mreportviewer.h | 49 +- kugar/lib/mspecialobject.cpp | 2 +- kugar/lib/mspecialobject.h | 4 +- kugar/lib/mutil.cpp | 40 +- kugar/lib/mutil.h | 20 +- kugar/part/Makefile.am | 2 +- kugar/part/kugar_factory.cpp | 18 +- kugar/part/kugar_factory.h | 9 +- kugar/part/kugar_part.cpp | 70 +- kugar/part/kugar_part.h | 25 +- kugar/part/kugar_view.cpp | 26 +- kugar/part/kugar_view.h | 9 +- kugar/samples/sample1.ktf | 2 +- kugar/samples/sample2.ktf | 2 +- kugar/samples/sample3.ktf | 2 +- kword/DESIGN | 12 +- kword/HACKING | 8 +- kword/KWAnchor.cpp | 56 +- kword/KWAnchor.h | 8 +- kword/KWBgSpellCheck.cpp | 2 +- kword/KWBgSpellCheck.h | 2 +- kword/KWCanvas.cpp | 592 +- kword/KWCanvas.h | 123 +- kword/KWCollectFramesetsVisitor.h | 6 +- kword/KWCommand.cpp | 310 +- kword/KWCommand.h | 162 +- kword/KWConfig.cpp | 360 +- kword/KWConfig.h | 91 +- kword/KWConfigFootNoteDia.cpp | 90 +- kword/KWConfigFootNoteDia.h | 17 +- kword/KWCreateBookmarkDia.cpp | 60 +- kword/KWCreateBookmarkDia.h | 32 +- kword/KWCreateBookmarkDiaBase.ui | 14 +- kword/KWDeleteDia.cpp | 32 +- kword/KWDeleteDia.h | 7 +- kword/KWDocStruct.cpp | 232 +- kword/KWDocStruct.h | 78 +- kword/KWDocument.cpp | 1198 +- kword/KWDocument.h | 313 +- kword/KWEditPersonnalExpression.cpp | 192 +- kword/KWEditPersonnalExpression.h | 37 +- kword/KWFactory.cpp | 8 +- kword/KWFactory.h | 5 +- kword/KWFindReplace.cpp | 8 +- kword/KWFindReplace.h | 13 +- kword/KWFootNoteDia.cpp | 50 +- kword/KWFootNoteDia.h | 27 +- kword/KWFormulaFrameSet.cpp | 118 +- kword/KWFormulaFrameSet.h | 46 +- kword/KWFrame.cpp | 74 +- kword/KWFrame.h | 40 +- kword/KWFrameDia.cpp | 562 +- kword/KWFrameDia.h | 121 +- kword/KWFrameLayout.cpp | 54 +- kword/KWFrameLayout.h | 28 +- kword/KWFrameList.cpp | 40 +- kword/KWFrameList.h | 14 +- kword/KWFrameSet.cpp | 272 +- kword/KWFrameSet.h | 121 +- kword/KWFrameSetEdit.cpp | 4 +- kword/KWFrameSetEdit.h | 54 +- kword/KWFrameStyle.cpp | 94 +- kword/KWFrameStyle.h | 28 +- kword/KWFrameStyleManager.cpp | 152 +- kword/KWFrameStyleManager.h | 93 +- kword/KWFrameView.cpp | 84 +- kword/KWFrameView.h | 50 +- kword/KWFrameViewManager.cpp | 137 +- kword/KWFrameViewManager.h | 49 +- kword/KWImportStyleDia.cpp | 112 +- kword/KWImportStyleDia.h | 28 +- kword/KWInsertDia.cpp | 34 +- kword/KWInsertDia.h | 11 +- kword/KWInsertPageDia.cpp | 26 +- kword/KWInsertPageDia.h | 9 +- kword/KWInsertPicDia.cpp | 64 +- kword/KWInsertPicDia.h | 11 +- kword/KWInsertTOCCommand.cpp | 36 +- kword/KWLoadingInfo.h | 30 +- kword/KWMailMergeDataBase.cpp | 240 +- kword/KWMailMergeDataBase.h | 68 +- kword/KWMailMergeDataSource.cpp | 6 +- kword/KWMailMergeDataSource.h | 27 +- kword/KWMailMergeLabelAction.cpp | 50 +- kword/KWMailMergeLabelAction.h | 15 +- kword/KWOasisLoader.cpp | 76 +- kword/KWOasisLoader.h | 20 +- kword/KWOasisSaver.cpp | 18 +- kword/KWOasisSaver.h | 10 +- kword/KWPage.cpp | 10 +- kword/KWPage.h | 8 +- kword/KWPageManager.cpp | 30 +- kword/KWPageManager.h | 8 +- kword/KWPartFrameSet.cpp | 60 +- kword/KWPartFrameSet.h | 34 +- kword/KWPictureFrameSet.cpp | 56 +- kword/KWPictureFrameSet.h | 18 +- kword/KWResizeTableDia.cpp | 26 +- kword/KWResizeTableDia.h | 11 +- kword/KWSelectBookmarkDiaBase.ui | 14 +- kword/KWSortDia.cpp | 24 +- kword/KWSortDia.h | 9 +- kword/KWSplitCellDia.cpp | 28 +- kword/KWSplitCellDia.h | 15 +- kword/KWStartupWidget.cpp | 34 +- kword/KWStartupWidget.h | 7 +- kword/KWStartupWidgetBase.ui | 18 +- kword/KWStatisticsDialog.cpp | 132 +- kword/KWStatisticsDialog.h | 25 +- kword/KWStyleManager.cpp | 6 +- kword/KWStyleManager.h | 7 +- kword/KWTableDia.cpp | 66 +- kword/KWTableDia.h | 56 +- kword/KWTableFrameSet.cpp | 286 +- kword/KWTableFrameSet.h | 111 +- kword/KWTableStyle.cpp | 68 +- kword/KWTableStyle.h | 24 +- kword/KWTableStyleManager.cpp | 170 +- kword/KWTableStyleManager.h | 62 +- kword/KWTableTemplate.cpp | 56 +- kword/KWTableTemplate.h | 32 +- kword/KWTableTemplateSelector.cpp | 112 +- kword/KWTableTemplateSelector.h | 58 +- kword/KWTextDocument.cpp | 70 +- kword/KWTextDocument.h | 15 +- kword/KWTextFrameSet.cpp | 714 +- kword/KWTextFrameSet.h | 170 +- kword/KWTextImage.cpp | 48 +- kword/KWTextImage.h | 10 +- kword/KWTextParag.cpp | 194 +- kword/KWTextParag.h | 30 +- kword/KWVariable.cpp | 144 +- kword/KWVariable.h | 44 +- kword/KWView.cpp | 1868 +- kword/KWView.h | 125 +- kword/KWViewMode.cpp | 226 +- kword/KWViewMode.h | 102 +- kword/KWordDocIface.cpp | 46 +- kword/KWordDocIface.h | 28 +- kword/KWordFootNoteFrameSetIface.cpp | 6 +- kword/KWordFootNoteFrameSetIface.h | 10 +- kword/KWordFormulaFrameSetEditIface.cpp | 4 +- kword/KWordFormulaFrameSetEditIface.h | 8 +- kword/KWordFormulaFrameSetIface.cpp | 2 +- kword/KWordFormulaFrameSetIface.h | 4 +- kword/KWordFrameSetIface.cpp | 118 +- kword/KWordFrameSetIface.h | 38 +- kword/KWordMailMergeDatabaseIface.h | 8 +- kword/KWordPartFrameSetIface.h | 4 +- kword/KWordPictureFrameSetIface.cpp | 2 +- kword/KWordPictureFrameSetIface.h | 6 +- kword/KWordTableFrameSetIface.h | 4 +- kword/KWordTextFrameSetEditIface.cpp | 18 +- kword/KWordTextFrameSetEditIface.h | 18 +- kword/KWordTextFrameSetIface.cpp | 34 +- kword/KWordTextFrameSetIface.h | 36 +- kword/KWordViewIface.cpp | 22 +- kword/KWordViewIface.h | 18 +- kword/OASIS | 4 +- kword/defs.h | 6 +- kword/demos/framestest.kwd | 2 +- kword/demos/mars.kwd | Bin 222700 -> 222699 bytes kword/kwordmailmergedatabaseiface.cpp | 2 +- kword/mailmerge/KWClassicSerialDataSource.cpp | 244 +- kword/mailmerge/KWClassicSerialDataSource.h | 85 +- kword/mailmerge/kabc/KWMailMergeKABC.cpp | 92 +- kword/mailmerge/kabc/KWMailMergeKABC.h | 39 +- .../mailmerge/kabc/KWMailMergeKABCConfig.cpp | 190 +- kword/mailmerge/kabc/KWMailMergeKABCConfig.h | 33 +- kword/mailmerge/kabc/addresspicker.ui | 32 +- .../mailmerge/kspread/kwmailmerge_kspread.cpp | 40 +- kword/mailmerge/kspread/kwmailmerge_kspread.h | 19 +- .../kspread/kwmailmerge_kspread_config.cpp | 40 +- .../kspread/kwmailmerge_kspread_config.h | 5 +- kword/mailmerge/sql/KWMySqlCursor.h | 48 +- kword/mailmerge/sql/KWQtSqlEasyFilter.cpp | 50 +- kword/mailmerge/sql/KWQtSqlEasyFilter.h | 23 +- kword/mailmerge/sql/KWQtSqlMailMergeOpen.cpp | 56 +- kword/mailmerge/sql/KWQtSqlMailMergeOpen.h | 27 +- .../sql/KWQtSqlPowerSerialDataSource.cpp | 164 +- .../sql/KWQtSqlPowerSerialDataSource.h | 54 +- .../mailmerge/sql/KWQtSqlSerialDataSource.cpp | 126 +- kword/mailmerge/sql/KWQtSqlSerialDataSource.h | 53 +- .../sql/KWQtSqlSerialDataSourceBase.cpp | 54 +- .../sql/KWQtSqlSerialDataSourceBase.h | 39 +- kword/mailmerge/sql/kwqtsqlpower.ui | 26 +- kword/mailmerge/sql/qtsqldatasourceeditor.ui | 24 +- .../mailmerge/sql/qtsqldatasourceeditor.ui.h | 4 +- kword/mailmerge/sql/qtsqlopenwidget.ui | 28 +- kword/tests/FrameTester.cpp | 4 +- kword/tests/FrameTester.h | 6 +- kword/tests/FrameViewTester.cpp | 8 +- kword/tests/KWPageManagerTester.cpp | 28 +- lib/kformula/DESIGN | 66 +- lib/kformula/MatrixDialog.cc | 34 +- lib/kformula/MatrixDialog.h | 7 +- lib/kformula/actionelement.cc | 16 +- lib/kformula/actionelement.h | 12 +- lib/kformula/basicelement.cc | 84 +- lib/kformula/basicelement.h | 142 +- lib/kformula/bracketelement.cc | 266 +- lib/kformula/bracketelement.h | 124 +- lib/kformula/config/esstixeight.font | 2 +- lib/kformula/config/esstixeleven.font | 2 +- lib/kformula/config/esstixfifteen.font | 2 +- lib/kformula/config/esstixfive.font | 2 +- lib/kformula/config/esstixfour.font | 2 +- lib/kformula/config/esstixfourteen.font | 2 +- lib/kformula/config/esstixnine.font | 2 +- lib/kformula/config/esstixone.font | 2 +- lib/kformula/config/esstixseven.font | 2 +- lib/kformula/config/esstixseventeen.font | 2 +- lib/kformula/config/esstixsix.font | 2 +- lib/kformula/config/esstixsixteen.font | 2 +- lib/kformula/config/esstixten.font | 2 +- lib/kformula/config/esstixthirteen.font | 2 +- lib/kformula/config/esstixthree.font | 2 +- lib/kformula/config/esstixtwelve.font | 2 +- lib/kformula/config/esstixtwo.font | 2 +- lib/kformula/config/unicode.tbl | 4 +- lib/kformula/contextstyle.cc | 66 +- lib/kformula/contextstyle.h | 184 +- lib/kformula/creationstrategy.cc | 6 +- lib/kformula/creationstrategy.h | 16 +- lib/kformula/elementtype.cc | 72 +- lib/kformula/elementtype.h | 50 +- lib/kformula/encloseelement.cc | 6 +- lib/kformula/encloseelement.h | 10 +- lib/kformula/entities.h | 2 +- lib/kformula/errorelement.cc | 26 +- lib/kformula/errorelement.h | 14 +- lib/kformula/fontstyle.cc | 298 +- lib/kformula/fontstyle.h | 104 +- lib/kformula/formulacursor.cc | 66 +- lib/kformula/formulacursor.h | 28 +- lib/kformula/formulaelement.cc | 64 +- lib/kformula/formulaelement.h | 40 +- lib/kformula/fractionelement.cc | 96 +- lib/kformula/fractionelement.h | 56 +- lib/kformula/glyphelement.cc | 66 +- lib/kformula/glyphelement.h | 26 +- lib/kformula/identifierelement.cc | 42 +- lib/kformula/identifierelement.h | 4 +- lib/kformula/indexelement.cc | 168 +- lib/kformula/indexelement.h | 118 +- lib/kformula/kformulacommand.cc | 110 +- lib/kformula/kformulacommand.h | 66 +- lib/kformula/kformulacompatibility.cc | 116 +- lib/kformula/kformulacompatibility.h | 24 +- lib/kformula/kformulaconfigpage.cc | 220 +- lib/kformula/kformulaconfigpage.h | 68 +- lib/kformula/kformulacontainer.cc | 134 +- lib/kformula/kformulacontainer.h | 65 +- lib/kformula/kformuladefs.h | 60 +- lib/kformula/kformuladocument.cc | 232 +- lib/kformula/kformuladocument.h | 48 +- lib/kformula/kformulainputfilter.h | 9 +- lib/kformula/kformulamathmlread.cc | 498 +- lib/kformula/kformulamathmlread.h | 19 +- lib/kformula/kformulamimesource.cc | 50 +- lib/kformula/kformulamimesource.h | 14 +- lib/kformula/kformulaview.cc | 78 +- lib/kformula/kformulaview.h | 57 +- lib/kformula/kformulawidget.cc | 52 +- lib/kformula/kformulawidget.h | 35 +- lib/kformula/main.cc | 164 +- lib/kformula/matrixelement.cc | 506 +- lib/kformula/matrixelement.h | 124 +- lib/kformula/numberelement.cc | 56 +- lib/kformula/numberelement.h | 4 +- lib/kformula/oasiscreationstrategy.cc | 16 +- lib/kformula/oasiscreationstrategy.h | 10 +- lib/kformula/operatorelement.cc | 88 +- lib/kformula/operatorelement.h | 10 +- lib/kformula/paddedelement.cc | 68 +- lib/kformula/paddedelement.h | 18 +- lib/kformula/phantomelement.cc | 10 +- lib/kformula/phantomelement.h | 14 +- lib/kformula/prototype/engine.py | 266 +- lib/kformula/prototype/gensymbolfontmap.py | 62 +- lib/kformula/prototype/unicode.py | 12 +- lib/kformula/rootelement.cc | 110 +- lib/kformula/rootelement.h | 70 +- lib/kformula/scripts/bycodes.py | 18 +- lib/kformula/scripts/bynames.py | 10 +- lib/kformula/scripts/oper-dict.py | 8 +- lib/kformula/scrollview.h | 7 +- lib/kformula/sequenceelement.cc | 452 +- lib/kformula/sequenceelement.h | 128 +- lib/kformula/sequenceparser.cc | 18 +- lib/kformula/sequenceparser.h | 12 +- lib/kformula/spaceelement.cc | 102 +- lib/kformula/spaceelement.h | 38 +- lib/kformula/stringelement.cc | 10 +- lib/kformula/stringelement.h | 16 +- lib/kformula/styleelement.cc | 58 +- lib/kformula/styleelement.h | 14 +- lib/kformula/symbolaction.cc | 88 +- lib/kformula/symbolaction.h | 22 +- lib/kformula/symbolelement.cc | 134 +- lib/kformula/symbolelement.h | 74 +- lib/kformula/symboltable.cc | 80 +- lib/kformula/symboltable.h | 54 +- lib/kformula/textelement.cc | 174 +- lib/kformula/textelement.h | 72 +- lib/kformula/tokenelement.cc | 18 +- lib/kformula/tokenelement.h | 8 +- lib/kformula/tokenstyleelement.cc | 70 +- lib/kformula/tokenstyleelement.h | 36 +- lib/kformula/unicodetable.cc | 2 +- lib/kofficecore/KoApplication.cpp | 30 +- lib/kofficecore/KoApplication.h | 5 +- lib/kofficecore/KoApplicationIface.cc | 30 +- lib/kofficecore/KoApplicationIface.h | 10 +- lib/kofficecore/KoChild.cpp | 126 +- lib/kofficecore/KoChild.h | 77 +- lib/kofficecore/KoContainerHandler.cpp | 202 +- lib/kofficecore/KoContainerHandler.h | 38 +- lib/kofficecore/KoDetailsPane.cpp | 192 +- lib/kofficecore/KoDetailsPane.h | 48 +- lib/kofficecore/KoDocument.cpp | 636 +- lib/kofficecore/KoDocument.h | 225 +- lib/kofficecore/KoDocumentChild.cpp | 136 +- lib/kofficecore/KoDocumentChild.h | 41 +- lib/kofficecore/KoDocumentIface.cc | 130 +- lib/kofficecore/KoDocumentIface.h | 92 +- lib/kofficecore/KoDocumentInfo.cpp | 242 +- lib/kofficecore/KoDocumentInfo.h | 190 +- lib/kofficecore/KoDocumentInfoDlg.cpp | 214 +- lib/kofficecore/KoDocumentInfoDlg.h | 10 +- lib/kofficecore/KoDocument_p.h | 1 + lib/kofficecore/KoDom.cpp | 6 +- lib/kofficecore/KoDom.h | 22 +- lib/kofficecore/KoFactory.cpp | 4 +- lib/kofficecore/KoFactory.h | 3 +- lib/kofficecore/KoFileDialog.cpp | 26 +- lib/kofficecore/KoFileDialog.h | 15 +- lib/kofficecore/KoFilter.cpp | 38 +- lib/kofficecore/KoFilter.h | 49 +- lib/kofficecore/KoFilterChain.cpp | 206 +- lib/kofficecore/KoFilterChain.h | 102 +- lib/kofficecore/KoFilterManager.cpp | 216 +- lib/kofficecore/KoFilterManager.h | 43 +- lib/kofficecore/KoFilterManager_p.h | 13 +- lib/kofficecore/KoFrame.cpp | 152 +- lib/kofficecore/KoFrame.h | 21 +- lib/kofficecore/KoGenStyles.cpp | 150 +- lib/kofficecore/KoGenStyles.h | 118 +- lib/kofficecore/KoGlobal.cpp | 70 +- lib/kofficecore/KoGlobal.h | 26 +- lib/kofficecore/KoMainWindow.cpp | 300 +- lib/kofficecore/KoMainWindow.h | 23 +- lib/kofficecore/KoMainWindowIface.cc | 12 +- lib/kofficecore/KoMainWindowIface.h | 4 +- lib/kofficecore/KoOasisLoadingContext.cpp | 48 +- lib/kofficecore/KoOasisLoadingContext.h | 26 +- lib/kofficecore/KoOasisSettings.cpp | 82 +- lib/kofficecore/KoOasisSettings.h | 46 +- lib/kofficecore/KoOasisStore.cpp | 50 +- lib/kofficecore/KoOasisStore.h | 10 +- lib/kofficecore/KoOasisStyles.cpp | 348 +- lib/kofficecore/KoOasisStyles.h | 122 +- lib/kofficecore/KoOpenPane.cpp | 120 +- lib/kofficecore/KoOpenPane.h | 29 +- lib/kofficecore/KoPageLayout.cpp | 64 +- lib/kofficecore/KoPageLayout.h | 46 +- lib/kofficecore/KoPicture.cpp | 60 +- lib/kofficecore/KoPicture.h | 70 +- lib/kofficecore/KoPictureBase.cpp | 44 +- lib/kofficecore/KoPictureBase.h | 40 +- lib/kofficecore/KoPictureClipart.cpp | 48 +- lib/kofficecore/KoPictureClipart.h | 34 +- lib/kofficecore/KoPictureCollection.cpp | 62 +- lib/kofficecore/KoPictureCollection.h | 36 +- lib/kofficecore/KoPictureEps.cpp | 108 +- lib/kofficecore/KoPictureEps.h | 48 +- lib/kofficecore/KoPictureImage.cpp | 62 +- lib/kofficecore/KoPictureImage.h | 40 +- lib/kofficecore/KoPictureKey.cpp | 42 +- lib/kofficecore/KoPictureKey.h | 46 +- lib/kofficecore/KoPictureShared.cpp | 126 +- lib/kofficecore/KoPictureShared.h | 76 +- lib/kofficecore/KoPictureWmf.cpp | 44 +- lib/kofficecore/KoPictureWmf.h | 38 +- lib/kofficecore/KoPoint.h | 24 +- lib/kofficecore/KoQueryTrader.cpp | 38 +- lib/kofficecore/KoQueryTrader.h | 46 +- lib/kofficecore/KoRect.cpp | 26 +- lib/kofficecore/KoRect.h | 22 +- lib/kofficecore/KoSetPropCommand.h | 8 +- lib/kofficecore/KoSize.h | 32 +- lib/kofficecore/KoSpeaker.cpp | 294 +- lib/kofficecore/KoSpeaker.h | 39 +- lib/kofficecore/KoStyleStack.cpp | 108 +- lib/kofficecore/KoStyleStack.h | 42 +- lib/kofficecore/KoTemplates.cpp | 130 +- lib/kofficecore/KoTemplates.h | 76 +- lib/kofficecore/KoUnit.cpp | 58 +- lib/kofficecore/KoUnit.h | 20 +- lib/kofficecore/KoView.cpp | 248 +- lib/kofficecore/KoView.h | 72 +- lib/kofficecore/KoViewIface.cc | 14 +- lib/kofficecore/KoViewIface.h | 6 +- lib/kofficecore/KoXmlNS.h | 4 +- lib/kofficecore/KoXmlReader.cpp | 424 +- lib/kofficecore/KoXmlReader.h | 120 +- lib/kofficecore/Koversiondialog.cpp | 54 +- lib/kofficecore/Koversiondialog.h | 24 +- lib/kofficecore/THOUGHTS | 10 +- lib/kofficecore/kkbdaccessextensions.cpp | 276 +- lib/kofficecore/kkbdaccessextensions.h | 48 +- lib/kofficecore/koDetailsPaneBase.ui | 30 +- lib/kofficecore/koDocumentInfoAboutWidget.ui | 70 +- lib/kofficecore/koDocumentInfoAuthorWidget.ui | 48 +- .../koDocumentInfoUserMetadataWidget.ui | 26 +- lib/kofficecore/koOpenPaneBase.ui | 22 +- lib/kofficecore/koffice_export.h | 2 +- lib/kofficecore/priorityqueue.h | 26 +- lib/kofficecore/tests/filter_graph.cpp | 44 +- lib/kofficecore/tests/filterchain_test.cpp | 8 +- lib/kofficecore/tests/kodomtest.cpp | 46 +- lib/kofficecore/tests/kogenstylestest.cpp | 58 +- lib/kofficecore/tests/kooasissettingstest.cpp | 6 +- lib/kofficecore/tests/kooasisstoretest.cpp | 10 +- lib/kofficecore/tests/kopointtest.cpp | 10 +- lib/kofficecore/tests/korecttest.cpp | 8 +- lib/kofficecore/tests/koxmlreadertest.cpp | 820 +- lib/kofficecore/tests/priorityqueue_test.cpp | 8 +- lib/kofficeui/KoBrush.cpp | 6 +- lib/kofficeui/KoBrush.h | 24 +- lib/kofficeui/KoCharSelectDia.cpp | 28 +- lib/kofficeui/KoCharSelectDia.h | 29 +- lib/kofficeui/KoCommandHistory.cpp | 104 +- lib/kofficeui/KoCommandHistory.h | 32 +- lib/kofficeui/KoContextCelp.cpp | 266 +- lib/kofficeui/KoContextCelp.h | 141 +- lib/kofficeui/KoEditPath.cpp | 46 +- lib/kofficeui/KoEditPath.h | 16 +- lib/kofficeui/KoGeneralPropertyUi.ui | 28 +- lib/kofficeui/KoGuideLineDia.cpp | 62 +- lib/kofficeui/KoGuideLineDia.h | 19 +- lib/kofficeui/KoGuides.cpp | 216 +- lib/kofficeui/KoGuides.h | 89 +- lib/kofficeui/KoInsertLink.cpp | 250 +- lib/kofficeui/KoInsertLink.h | 101 +- lib/kofficeui/KoKoolBar.cpp | 74 +- lib/kofficeui/KoKoolBar.h | 72 +- lib/kofficeui/KoPageLayoutColumns.cpp | 24 +- lib/kofficeui/KoPageLayoutColumns.h | 19 +- lib/kofficeui/KoPageLayoutColumnsBase.ui | 16 +- lib/kofficeui/KoPageLayoutDia.cpp | 194 +- lib/kofficeui/KoPageLayoutDia.h | 70 +- lib/kofficeui/KoPageLayoutHeader.cpp | 14 +- lib/kofficeui/KoPageLayoutHeader.h | 11 +- lib/kofficeui/KoPageLayoutHeaderBase.ui | 44 +- lib/kofficeui/KoPageLayoutSize.cpp | 110 +- lib/kofficeui/KoPageLayoutSize.h | 25 +- lib/kofficeui/KoPartSelectAction.cpp | 28 +- lib/kofficeui/KoPartSelectAction.h | 15 +- lib/kofficeui/KoPartSelectDia.cpp | 32 +- lib/kofficeui/KoPartSelectDia.h | 17 +- lib/kofficeui/KoPen.cpp | 14 +- lib/kofficeui/KoPen.h | 12 +- lib/kofficeui/KoPictureFilePreview.cpp | 40 +- lib/kofficeui/KoPictureFilePreview.h | 7 +- lib/kofficeui/KoRuler.cpp | 282 +- lib/kofficeui/KoRuler.h | 71 +- lib/kofficeui/KoSelectAction.cpp | 50 +- lib/kofficeui/KoSelectAction.h | 21 +- lib/kofficeui/KoTabBar.cpp | 248 +- lib/kofficeui/KoTabBar.h | 53 +- lib/kofficeui/KoTabChooser.cpp | 34 +- lib/kofficeui/KoTabChooser.h | 27 +- lib/kofficeui/KoTemplateChooseDia.cpp | 292 +- lib/kofficeui/KoTemplateChooseDia.h | 103 +- lib/kofficeui/KoTemplateCreateDia.cpp | 188 +- lib/kofficeui/KoTemplateCreateDia.h | 23 +- lib/kofficeui/KoToolBox.cpp | 80 +- lib/kofficeui/KoToolBox.h | 51 +- lib/kofficeui/KoTooluButton.cpp | 600 +- lib/kofficeui/KoTooluButton.h | 105 +- lib/kofficeui/KoUnitWidgets.cpp | 154 +- lib/kofficeui/KoUnitWidgets.h | 36 +- lib/kofficeui/KoZoomAction.cpp | 80 +- lib/kofficeui/KoZoomAction.h | 15 +- lib/kofficeui/KoZoomHandler.h | 20 +- lib/kofficeui/KoZoomMode.cpp | 4 +- lib/kofficeui/KoZoomMode.h | 12 +- lib/kofficeui/Kolinestyleaction.cpp | 28 +- lib/kofficeui/Kolinestyleaction.h | 15 +- lib/kofficeui/Kolinewidthaction.cpp | 50 +- lib/kofficeui/Kolinewidthaction.h | 18 +- lib/kofficeui/kcoloractions.cpp | 104 +- lib/kofficeui/kcoloractions.h | 42 +- lib/kofficeui/tests/coloraction_test.cpp | 52 +- lib/kofficeui/tests/coloraction_test.h | 9 +- lib/kofficeui/tkaction.cpp | 96 +- lib/kofficeui/tkaction.h | 35 +- lib/kofficeui/tkcoloractions.cpp | 442 +- lib/kofficeui/tkcoloractions.h | 74 +- lib/kofficeui/tkcombobox.cpp | 52 +- lib/kofficeui/tkcombobox.h | 11 +- lib/kofficeui/tktoolbarbutton.cpp | 210 +- lib/kofficeui/tktoolbarbutton.h | 67 +- lib/kopainter/koColor.cc | 22 +- lib/kopainter/koColor.h | 16 +- lib/kopainter/koColorChooser.cc | 166 +- lib/kopainter/koColorChooser.h | 92 +- lib/kopainter/koColorSlider.cc | 122 +- lib/kopainter/koColorSlider.h | 69 +- lib/kopainter/koFrameButton.cc | 22 +- lib/kopainter/koFrameButton.h | 27 +- lib/kopainter/koIconChooser.cc | 98 +- lib/kopainter/koIconChooser.h | 48 +- lib/kopainter/ko_cmyk_widget.cc | 110 +- lib/kopainter/ko_cmyk_widget.h | 55 +- lib/kopainter/ko_color_wheel.cc | 36 +- lib/kopainter/ko_color_wheel.h | 19 +- lib/kopainter/ko_gray_widget.cc | 70 +- lib/kopainter/ko_gray_widget.h | 39 +- lib/kopainter/ko_hsv_widget.cc | 80 +- lib/kopainter/ko_hsv_widget.h | 39 +- lib/kopainter/ko_rgb_widget.cc | 114 +- lib/kopainter/ko_rgb_widget.h | 49 +- lib/kopainter/kogradientmanager.cc | 120 +- lib/kopainter/kogradientmanager.h | 32 +- lib/kopainter/svgnamedcolors.h | 4 +- lib/kopainter/svgpathparser.cc | 8 +- lib/kopainter/svgpathparser.h | 4 +- lib/kopalette/kopalette.cc | 42 +- lib/kopalette/kopalette.h | 43 +- lib/kopalette/kopalettemanager.cc | 192 +- lib/kopalette/kopalettemanager.h | 71 +- lib/kopalette/kotabpalette.cc | 42 +- lib/kopalette/kotabpalette.h | 23 +- lib/kopalette/kotoolboxpalette.cc | 36 +- lib/kopalette/kotoolboxpalette.h | 25 +- lib/koproperty/customproperty.cpp | 138 +- lib/koproperty/customproperty.h | 46 +- lib/koproperty/editor.cpp | 316 +- lib/koproperty/editor.h | 41 +- lib/koproperty/editoritem.cpp | 216 +- lib/koproperty/editoritem.h | 54 +- lib/koproperty/editors/booledit.cpp | 86 +- lib/koproperty/editors/booledit.h | 32 +- lib/koproperty/editors/coloredit.cpp | 36 +- lib/koproperty/editors/coloredit.h | 11 +- lib/koproperty/editors/combobox.cpp | 62 +- lib/koproperty/editors/combobox.h | 11 +- lib/koproperty/editors/cursoredit.cpp | 102 +- lib/koproperty/editors/cursoredit.h | 13 +- lib/koproperty/editors/dateedit.cpp | 34 +- lib/koproperty/editors/dateedit.h | 17 +- lib/koproperty/editors/datetimeedit.cpp | 34 +- lib/koproperty/editors/datetimeedit.h | 17 +- lib/koproperty/editors/dummywidget.cpp | 14 +- lib/koproperty/editors/dummywidget.h | 13 +- lib/koproperty/editors/fontedit.cpp | 78 +- lib/koproperty/editors/fontedit.h | 13 +- lib/koproperty/editors/linestyledit.cpp | 54 +- lib/koproperty/editors/linestyleedit.h | 13 +- lib/koproperty/editors/pixmapedit.cpp | 130 +- lib/koproperty/editors/pixmapedit.h | 33 +- lib/koproperty/editors/pointedit.cpp | 40 +- lib/koproperty/editors/pointedit.h | 13 +- lib/koproperty/editors/rectedit.cpp | 44 +- lib/koproperty/editors/rectedit.h | 13 +- lib/koproperty/editors/sizeedit.cpp | 38 +- lib/koproperty/editors/sizeedit.h | 13 +- lib/koproperty/editors/sizepolicyedit.cpp | 78 +- lib/koproperty/editors/sizepolicyedit.h | 23 +- lib/koproperty/editors/spinbox.cpp | 138 +- lib/koproperty/editors/spinbox.h | 36 +- lib/koproperty/editors/stringedit.cpp | 24 +- lib/koproperty/editors/stringedit.h | 13 +- lib/koproperty/editors/stringlistedit.cpp | 42 +- lib/koproperty/editors/stringlistedit.h | 21 +- lib/koproperty/editors/symbolcombo.cpp | 52 +- lib/koproperty/editors/symbolcombo.h | 19 +- lib/koproperty/editors/timeedit.cpp | 36 +- lib/koproperty/editors/timeedit.h | 15 +- lib/koproperty/editors/urledit.cpp | 22 +- lib/koproperty/editors/urledit.h | 9 +- lib/koproperty/factory.cpp | 58 +- lib/koproperty/factory.h | 44 +- lib/koproperty/property.cpp | 256 +- lib/koproperty/property.h | 200 +- lib/koproperty/set.cpp | 136 +- lib/koproperty/set.h | 56 +- lib/koproperty/test/test.cpp | 52 +- lib/koproperty/test/test.h | 1 + lib/koproperty/utils.h | 14 +- lib/koproperty/widget.cpp | 36 +- lib/koproperty/widget.h | 21 +- lib/koproperty/widgetproxy.cpp | 32 +- lib/koproperty/widgetproxy.h | 17 +- lib/kotext/DESIGN | 20 +- lib/kotext/DateFormatWidget.cpp | 52 +- lib/kotext/DateFormatWidget.h | 7 +- lib/kotext/IsoDuration.h | 16 +- lib/kotext/KFontDialog_local.cpp | 386 +- lib/kotext/KFontDialog_local.h | 164 +- lib/kotext/KoAutoFormat.cpp | 524 +- lib/kotext/KoAutoFormat.h | 129 +- lib/kotext/KoAutoFormatDia.cpp | 452 +- lib/kotext/KoAutoFormatDia.h | 77 +- lib/kotext/KoBgSpellCheck.cpp | 56 +- lib/kotext/KoBgSpellCheck.h | 11 +- lib/kotext/KoBorder.cpp | 60 +- lib/kotext/KoBorder.h | 36 +- lib/kotext/KoChangeCaseDia.cpp | 30 +- lib/kotext/KoChangeCaseDia.h | 17 +- lib/kotext/KoCommentDia.cpp | 36 +- lib/kotext/KoCommentDia.h | 15 +- lib/kotext/KoCompletionBase.ui | 64 +- lib/kotext/KoCompletionDia.cpp | 58 +- lib/kotext/KoCompletionDia.h | 12 +- lib/kotext/KoComplexText.cpp | 716 +- lib/kotext/KoComplexText.h | 100 +- lib/kotext/KoCreateStyleDia.cpp | 26 +- lib/kotext/KoCreateStyleDia.h | 15 +- lib/kotext/KoCustomVariablesDia.cpp | 158 +- lib/kotext/KoCustomVariablesDia.h | 52 +- lib/kotext/KoDecorationTab.cpp | 30 +- lib/kotext/KoDecorationTab.h | 23 +- lib/kotext/KoFontDia.cpp | 116 +- lib/kotext/KoFontDia.h | 19 +- lib/kotext/KoFontDiaPreview.cpp | 142 +- lib/kotext/KoFontDiaPreview.h | 53 +- lib/kotext/KoFontTab.cpp | 14 +- lib/kotext/KoFontTab.h | 13 +- lib/kotext/KoHighlightingTab.cpp | 36 +- lib/kotext/KoHighlightingTab.h | 11 +- lib/kotext/KoImportStyleDia.cpp | 44 +- lib/kotext/KoImportStyleDia.h | 17 +- lib/kotext/KoLanguageTab.cpp | 24 +- lib/kotext/KoLanguageTab.h | 7 +- lib/kotext/KoLayoutTab.cpp | 18 +- lib/kotext/KoLayoutTab.h | 7 +- lib/kotext/KoListStyleStack.cpp | 12 +- lib/kotext/KoListStyleStack.h | 14 +- lib/kotext/KoOasisContext.cpp | 28 +- lib/kotext/KoOasisContext.h | 22 +- lib/kotext/KoParagCounter.cpp | 238 +- lib/kotext/KoParagCounter.h | 82 +- lib/kotext/KoParagDecorationTab.ui | 32 +- lib/kotext/KoParagDia.cpp | 756 +- lib/kotext/KoParagDia.h | 212 +- lib/kotext/KoParagDia_p.h | 66 +- lib/kotext/KoParagLayout.cpp | 542 +- lib/kotext/KoParagLayout.h | 54 +- lib/kotext/KoParagStyle.cpp | 78 +- lib/kotext/KoParagStyle.h | 24 +- lib/kotext/KoRichText.cpp | 204 +- lib/kotext/KoRichText.h | 288 +- lib/kotext/KoSearchDia.cpp | 298 +- lib/kotext/KoSearchDia.h | 151 +- lib/kotext/KoSpell.cpp | 22 +- lib/kotext/KoSpell.h | 13 +- lib/kotext/KoStyleCollection.cpp | 56 +- lib/kotext/KoStyleCollection.h | 18 +- lib/kotext/KoStyleManager.cpp | 168 +- lib/kotext/KoStyleManager.h | 84 +- lib/kotext/KoTextBookmark.cpp | 4 +- lib/kotext/KoTextBookmark.h | 28 +- lib/kotext/KoTextCommand.cpp | 50 +- lib/kotext/KoTextCommand.h | 34 +- lib/kotext/KoTextCustomItem.cpp | 30 +- lib/kotext/KoTextCustomItem.h | 22 +- lib/kotext/KoTextDocument.cpp | 308 +- lib/kotext/KoTextDocument.h | 147 +- lib/kotext/KoTextFormat.cpp | 354 +- lib/kotext/KoTextFormat.h | 178 +- lib/kotext/KoTextFormatter.cpp | 180 +- lib/kotext/KoTextFormatter.h | 6 +- lib/kotext/KoTextIterator.cpp | 42 +- lib/kotext/KoTextIterator.h | 27 +- lib/kotext/KoTextObject.cpp | 428 +- lib/kotext/KoTextObject.h | 147 +- lib/kotext/KoTextParag.cpp | 680 +- lib/kotext/KoTextParag.h | 134 +- lib/kotext/KoTextView.cpp | 240 +- lib/kotext/KoTextView.h | 75 +- lib/kotext/KoTextViewIface.cc | 106 +- lib/kotext/KoTextViewIface.h | 76 +- lib/kotext/KoTextZoomHandler.cpp | 38 +- lib/kotext/KoTextZoomHandler.h | 72 +- lib/kotext/KoUserStyle.cpp | 6 +- lib/kotext/KoUserStyle.h | 16 +- lib/kotext/KoUserStyleCollection.cpp | 38 +- lib/kotext/KoUserStyleCollection.h | 24 +- lib/kotext/KoVariable.cpp | 768 +- lib/kotext/KoVariable.h | 351 +- lib/kotext/TimeFormatWidget.cpp | 52 +- lib/kotext/TimeFormatWidget.h | 7 +- lib/kotext/kodecorationtabbase.ui | 24 +- lib/kotext/kofonttabbase.ui | 4 +- lib/kotext/kohighlightingtabbase.ui | 14 +- lib/kotext/kohyphen/hyphdicts/hyph_da.dic | 2 +- lib/kotext/kohyphen/hyphdicts/hyph_es.dic | 4 +- lib/kotext/kohyphen/hyphdicts/hyph_hu.dic | 4 +- lib/kotext/kohyphen/hyphdicts/hyph_nl.dic | 2 +- lib/kotext/kohyphen/hyphdicts/hyph_sv.dic | 2 +- lib/kotext/kohyphen/kohyphen.cpp | 84 +- lib/kotext/kohyphen/kohyphen.h | 36 +- lib/kotext/kohyphen/kohyphentest.cpp | 28 +- lib/kotext/kolanguagetabbase.ui | 10 +- lib/kotext/kolayouttabbase.ui | 36 +- lib/kotext/tests/KoUserStyleTester.cpp | 22 +- lib/kotext/tests/KoUserStyleTester.h | 1 + lib/kotext/tests/kobordertest.cpp | 60 +- lib/kotext/tests/kotextformattertest.cpp | 10 +- lib/kotext/tests/kovariabletest.cpp | 10 +- lib/kotext/timedateformatwidget.ui | 40 +- lib/kross/api/callable.cpp | 52 +- lib/kross/api/callable.h | 32 +- lib/kross/api/class.h | 14 +- lib/kross/api/dict.cpp | 14 +- lib/kross/api/dict.h | 14 +- lib/kross/api/event.h | 56 +- lib/kross/api/eventaction.cpp | 8 +- lib/kross/api/eventaction.h | 10 +- lib/kross/api/eventscript.cpp | 8 +- lib/kross/api/eventscript.h | 10 +- lib/kross/api/eventsignal.cpp | 24 +- lib/kross/api/eventsignal.h | 28 +- lib/kross/api/eventslot.cpp | 172 +- lib/kross/api/eventslot.h | 54 +- lib/kross/api/exception.cpp | 20 +- lib/kross/api/exception.h | 20 +- lib/kross/api/function.h | 2 +- lib/kross/api/interpreter.cpp | 22 +- lib/kross/api/interpreter.h | 42 +- lib/kross/api/list.cpp | 20 +- lib/kross/api/list.h | 42 +- lib/kross/api/module.h | 10 +- lib/kross/api/object.cpp | 14 +- lib/kross/api/object.h | 22 +- lib/kross/api/proxy.h | 10 +- lib/kross/api/qtobject.cpp | 116 +- lib/kross/api/qtobject.h | 50 +- lib/kross/api/script.h | 12 +- lib/kross/api/value.h | 4 +- lib/kross/api/variant.cpp | 110 +- lib/kross/api/variant.h | 82 +- lib/kross/main/krossconfig.cpp | 4 +- lib/kross/main/krossconfig.h | 8 +- lib/kross/main/mainmodule.cpp | 22 +- lib/kross/main/mainmodule.h | 46 +- lib/kross/main/manager.cpp | 94 +- lib/kross/main/manager.h | 28 +- lib/kross/main/scriptaction.cpp | 66 +- lib/kross/main/scriptaction.h | 49 +- lib/kross/main/scriptcontainer.cpp | 74 +- lib/kross/main/scriptcontainer.h | 40 +- lib/kross/main/scriptguiclient.cpp | 156 +- lib/kross/main/scriptguiclient.h | 45 +- lib/kross/main/wdgscriptsmanager.cpp | 110 +- lib/kross/main/wdgscriptsmanager.h | 7 +- lib/kross/main/wdgscriptsmanagerbase.ui | 22 +- lib/kross/python/cxx/Objects.hxx | 16 +- lib/kross/python/cxx/PyCXX.html | 14 +- lib/kross/python/cxx/cxxsupport.cxx | 2 +- lib/kross/python/pythonextension.cpp | 154 +- lib/kross/python/pythonextension.h | 54 +- lib/kross/python/pythoninterpreter.cpp | 36 +- lib/kross/python/pythoninterpreter.h | 2 +- lib/kross/python/pythonmodule.cpp | 18 +- lib/kross/python/pythonmodule.h | 2 +- lib/kross/python/pythonobject.cpp | 20 +- lib/kross/python/pythonobject.h | 12 +- lib/kross/python/pythonscript.cpp | 94 +- lib/kross/python/pythonscript.h | 10 +- lib/kross/python/pythonsecurity.cpp | 30 +- lib/kross/python/pythonsecurity.h | 10 +- .../python/scripts/RestrictedPython/Guards.py | 2 +- lib/kross/python/scripts/gui.py | 134 +- lib/kross/ruby/rubyextension.cpp | 92 +- lib/kross/ruby/rubyextension.h | 42 +- lib/kross/ruby/rubyinterpreter.cpp | 14 +- lib/kross/ruby/rubymodule.cpp | 8 +- lib/kross/ruby/rubymodule.h | 4 +- lib/kross/ruby/rubyscript.cpp | 16 +- lib/kross/ruby/rubyscript.h | 8 +- lib/kross/runner/main.cpp | 26 +- lib/kross/test/main.cpp | 36 +- lib/kross/test/testaction.cpp | 6 +- lib/kross/test/testaction.h | 9 +- lib/kross/test/testcase.py | 8 +- lib/kross/test/testgui.py | 28 +- lib/kross/test/testobject.cpp | 46 +- lib/kross/test/testobject.h | 35 +- lib/kross/test/testplugin.cpp | 28 +- lib/kross/test/testplugin.h | 30 +- lib/kross/test/testwindow.cpp | 48 +- lib/kross/test/testwindow.h | 15 +- lib/kwmf/kowmfpaint.cc | 70 +- lib/kwmf/kowmfpaint.h | 46 +- lib/kwmf/kowmfread.cc | 12 +- lib/kwmf/kowmfread.h | 62 +- lib/kwmf/kowmfreadprivate.cc | 354 +- lib/kwmf/kowmfreadprivate.h | 168 +- lib/kwmf/kowmfstack.h | 20 +- lib/kwmf/kowmfstruct.h | 140 +- lib/kwmf/kowmfwrite.cc | 206 +- lib/kwmf/kowmfwrite.h | 66 +- lib/kwmf/kwmf.cc | 176 +- lib/kwmf/kwmf.h | 90 +- lib/kwmf/qwmf.cc | 246 +- lib/kwmf/qwmf.h | 60 +- lib/kwmf/wmfstruct.h | 4 +- lib/store/KoDirectoryStore.cpp | 38 +- lib/store/KoDirectoryStore.h | 22 +- lib/store/KoStore.cpp | 132 +- lib/store/KoStore.h | 86 +- lib/store/KoStoreBase.h | 4 +- lib/store/KoStoreDevice.h | 25 +- lib/store/KoStoreDrag.cpp | 10 +- lib/store/KoStoreDrag.h | 14 +- lib/store/KoTarStore.cpp | 26 +- lib/store/KoTarStore.h | 20 +- lib/store/KoXmlWriter.cpp | 96 +- lib/store/KoXmlWriter.h | 68 +- lib/store/KoZipStore.cpp | 32 +- lib/store/KoZipStore.h | 20 +- lib/store/fix_storage.pl | 8 +- lib/store/tests/storage_test.cpp | 38 +- lib/store/tests/storedroptest.cpp | 72 +- lib/store/tests/xmlwritertest.cpp | 40 +- lib/store/tests/xmlwritertest.h | 20 +- plugins/scan/scan.cpp | 16 +- plugins/scan/scan.h | 7 +- tools/converter/koconverter.cpp | 20 +- tools/converter/koconverter.h | 7 +- tools/kfile-plugins/abiword/kfile_abiword.cpp | 44 +- tools/kfile-plugins/abiword/kfile_abiword.h | 9 +- .../kfile-plugins/gnumeric/kfile_gnumeric.cpp | 40 +- tools/kfile-plugins/gnumeric/kfile_gnumeric.h | 9 +- tools/kfile-plugins/koffice/kfile_koffice.cpp | 38 +- tools/kfile-plugins/koffice/kfile_koffice.h | 11 +- tools/kfile-plugins/ooo/kfile_ooo.cpp | 168 +- tools/kfile-plugins/ooo/kfile_ooo.h | 49 +- tools/kthesaurus/main.cc | 14 +- tools/spell/main.cc | 22 +- tools/spell/main.h | 7 +- tools/thesaurus/main.cc | 338 +- tools/thesaurus/main.h | 105 +- tools/thesaurus/thesaurus.txt | 438 +- tools/thumbnail/clipartcreator.cpp | 18 +- tools/thumbnail/clipartcreator.h | 2 +- tools/thumbnail/kofficecreator.cpp | 28 +- tools/thumbnail/kofficecreator.h | 7 +- 4625 files changed, 147655 insertions(+), 146391 deletions(-) diff --git a/example/example_factory.cc b/example/example_factory.cc index e3b46cf3..eaba7ee4 100644 --- a/example/example_factory.cc +++ b/example/example_factory.cc @@ -30,8 +30,8 @@ K_EXPORT_COMPONENT_FACTORY( libexamplepart, ExampleFactory ) KInstance* ExampleFactory::s_global = 0L; KAboutData* ExampleFactory::s_aboutData = 0L; -ExampleFactory::ExampleFactory( QObject* parent, const char* name ) - : KoFactory( parent, name ) +ExampleFactory::ExampleFactory( TQObject* tqparent, const char* name ) + : KoFactory( tqparent, name ) { global(); } @@ -44,14 +44,14 @@ ExampleFactory::~ExampleFactory() s_global = 0L; } -KParts::Part* ExampleFactory::createPartObject( QWidget *parentWidget, const char *widgetName, QObject* parent, const char* name, const char* classname, const QStringList & ) +KParts::Part* ExampleFactory::createPartObject( TQWidget *tqparentWidget, const char *widgetName, TQObject* tqparent, const char* name, const char* classname, const TQStringList & ) { // If classname is "KoDocument", our host is a koffice application // otherwise, the host wants us as a simple part, so switch to readonly and single view. bool bWantKoDocument = ( strcmp( classname, "KoDocument" ) == 0 ); - // parentWidget and widgetName are used by KoDocument for the "readonly+singleView" case. - ExamplePart *part = new ExamplePart( parentWidget, widgetName, parent, name, !bWantKoDocument ); + // tqparentWidget and widgetName are used by KoDocument for the "readonly+singleView" case. + ExamplePart *part = new ExamplePart( tqparentWidget, widgetName, tqparent, name, !bWantKoDocument ); if ( !bWantKoDocument ) part->setReadWrite( false ); diff --git a/example/example_factory.h b/example/example_factory.h index 1df86325..d7fa0e72 100644 --- a/example/example_factory.h +++ b/example/example_factory.h @@ -28,11 +28,12 @@ class KAboutData; class ExampleFactory : public KoFactory { Q_OBJECT + TQ_OBJECT public: - ExampleFactory( QObject* parent = 0, const char* name = 0 ); + ExampleFactory( TQObject* tqparent = 0, const char* name = 0 ); ~ExampleFactory(); - virtual KParts::Part *createPartObject( QWidget *parentWidget = 0, const char *widgetName = 0, QObject *parent = 0, const char *name = 0, const char *classname = "KoDocument", const QStringList &args = QStringList() ); + virtual KParts::Part *createPartObject( TQWidget *tqparentWidget = 0, const char *widgetName = 0, TQObject *tqparent = 0, const char *name = 0, const char *classname = "KoDocument", const TQStringList &args = TQStringList() ); static KInstance* global(); diff --git a/example/example_part.cc b/example/example_part.cc index e459040a..7d695a9b 100644 --- a/example/example_part.cc +++ b/example/example_part.cc @@ -21,15 +21,15 @@ #include "example_factory.h" #include "example_view.h" -#include +#include -ExamplePart::ExamplePart( QWidget *parentWidget, const char *widgetName, QObject* parent, const char* name, bool singleViewMode ) - : KoDocument( parentWidget, widgetName, parent, name, singleViewMode ) +ExamplePart::ExamplePart( TQWidget *tqparentWidget, const char *widgetName, TQObject* tqparent, const char* name, bool singleViewMode ) + : KoDocument( tqparentWidget, widgetName, tqparent, name, singleViewMode ) { setInstance( ExampleFactory::global(), false ); } -bool ExamplePart::initDoc(InitDocFlags flags, QWidget* parentWidget) +bool ExamplePart::initDoc(InitDocFlags flags, TQWidget* tqparentWidget) { // If nothing is loaded, do initialize here // Most KOffice applications use the template dialog here, with code like: @@ -46,27 +46,27 @@ bool ExamplePart::initDoc(InitDocFlags flags, QWidget* parentWidget) return TRUE; } -KoView* ExamplePart::createViewInstance( QWidget* parent, const char* name ) +KoView* ExamplePart::createViewInstance( TQWidget* tqparent, const char* name ) { - return new ExampleView( this, parent, name ); + return new ExampleView( this, tqparent, name ); } -bool ExamplePart::loadXML( QIODevice *, const QDomDocument & ) +bool ExamplePart::loadXML( TQIODevice *, const TQDomDocument & ) { - // TODO load the document from the QDomDocument + // TODO load the document from the TQDomDocument return true; } -QDomDocument ExamplePart::saveXML() +TQDomDocument ExamplePart::saveXML() { - // TODO save the document into a QDomDocument - return QDomDocument(); + // TODO save the document into a TQDomDocument + return TQDomDocument(); } -bool ExamplePart::loadOasis( const QDomDocument & doc, KoOasisStyles& oasisStyles, - const QDomDocument & settings, KoStore* store ) +bool ExamplePart::loadOasis( const TQDomDocument & doc, KoOasisStyles& oasisStyles, + const TQDomDocument & settings, KoStore* store ) { - // TODO load the document from the QDomDocument + // TODO load the document from the TQDomDocument return true; } @@ -76,7 +76,7 @@ bool ExamplePart::saveOasis( KoStore* store, KoXmlWriter* manifestWriter ) return true; } -void ExamplePart::paintContent( QPainter& painter, const QRect& rect, bool /*transparent*/, +void ExamplePart::paintContent( TQPainter& painter, const TQRect& rect, bool /*transparent*/, double /*zoomX*/, double /*zoomY*/ ) { // ####### handle transparency diff --git a/example/example_part.h b/example/example_part.h index 5945f8e4..4b28e71a 100644 --- a/example/example_part.h +++ b/example/example_part.h @@ -25,22 +25,23 @@ class ExamplePart : public KoDocument { Q_OBJECT + TQ_OBJECT public: - ExamplePart( QWidget *parentWidget = 0, const char *widgetName = 0, QObject* parent = 0, const char* name = 0, bool singleViewMode = false ); + ExamplePart( TQWidget *tqparentWidget = 0, const char *widgetName = 0, TQObject* tqparent = 0, const char* name = 0, bool singleViewMode = false ); - virtual void paintContent( QPainter& painter, const QRect& rect, bool transparent = FALSE, double zoomX = 1.0, double zoomY = 1.0 ); + virtual void paintContent( TQPainter& painter, const TQRect& rect, bool transparent = FALSE, double zoomX = 1.0, double zoomY = 1.0 ); - virtual bool initDoc(InitDocFlags flags, QWidget* parentWidget=0); + virtual bool initDoc(InitDocFlags flags, TQWidget* tqparentWidget=0); - virtual bool loadXML( QIODevice *, const QDomDocument & ); - virtual QDomDocument saveXML(); + virtual bool loadXML( TQIODevice *, const TQDomDocument & ); + virtual TQDomDocument saveXML(); - virtual bool loadOasis( const QDomDocument & doc, KoOasisStyles& oasisStyles, - const QDomDocument & settings, KoStore* store ); + virtual bool loadOasis( const TQDomDocument & doc, KoOasisStyles& oasisStyles, + const TQDomDocument & settings, KoStore* store ); virtual bool saveOasis( KoStore* store, KoXmlWriter* manifestWriter ); protected: - virtual KoView* createViewInstance( QWidget* parent, const char* name ); + virtual KoView* createViewInstance( TQWidget* tqparent, const char* name ); }; #endif diff --git a/example/example_view.cc b/example/example_view.cc index 2e97a206..b23412c6 100644 --- a/example/example_view.cc +++ b/example/example_view.cc @@ -21,31 +21,31 @@ #include "example_factory.h" #include "example_part.h" -#include -#include +#include +#include #include #include #include #include -ExampleView::ExampleView( ExamplePart* part, QWidget* parent, const char* name ) - : KoView( part, parent, name ) +ExampleView::ExampleView( ExamplePart* part, TQWidget* tqparent, const char* name ) + : KoView( part, tqparent, name ) { setInstance( ExampleFactory::global() ); if ( !part->isReadWrite() ) // readonly case, e.g. when embedded into konqueror setXMLFile( "example_readonly.rc" ); // simplified GUI else setXMLFile( "example.rc" ); - KStdAction::copy(this, SLOT( copy() ), actionCollection(), "copy" ); - KStdAction::cut(this, SLOT( cut() ), actionCollection(), "cut" ); + KStdAction::copy(this, TQT_SLOT( copy() ), actionCollection(), "copy" ); + KStdAction::cut(this, TQT_SLOT( cut() ), actionCollection(), "cut" ); // Note: Prefer KStdAction::* to any custom action if possible. - //m_cut = new KAction( i18n("&Cut"), "editcut", 0, this, SLOT( cut() ), + //m_cut = new KAction( i18n("&Cut"), "editcut", 0, this, TQT_SLOT( cut() ), // actionCollection(), "cut"); } -void ExampleView::paintEvent( QPaintEvent* ev ) +void ExampleView::paintEvent( TQPaintEvent* ev ) { - QPainter painter; + TQPainter painter; painter.begin( this ); // ### TODO: Scaling diff --git a/example/example_view.h b/example/example_view.h index 932af33a..3f4866f7 100644 --- a/example/example_view.h +++ b/example/example_view.h @@ -23,22 +23,23 @@ #include class KAction; -class QPaintEvent; +class TQPaintEvent; class ExamplePart; class ExampleView : public KoView { Q_OBJECT + TQ_OBJECT public: - ExampleView( ExamplePart* part, QWidget* parent = 0, const char* name = 0 ); + ExampleView( ExamplePart* part, TQWidget* tqparent = 0, const char* name = 0 ); protected slots: void cut(); void copy(); protected: - void paintEvent( QPaintEvent* ); + void paintEvent( TQPaintEvent* ); virtual void updateReadWrite( bool readwrite ); diff --git a/filters/generic_wrapper/generic_filter.cc b/filters/generic_wrapper/generic_filter.cc index 14830762..f3ae2b13 100644 --- a/filters/generic_wrapper/generic_filter.cc +++ b/filters/generic_wrapper/generic_filter.cc @@ -19,8 +19,8 @@ #include -#include -#include +#include +#include #include #include @@ -37,11 +37,11 @@ typedef KGenericFactory GenericFilterFactory; K_EXPORT_COMPONENT_FACTORY( libgenerickofilter, GenericFilterFactory ) -GenericFilter::GenericFilter(KoFilter *, const char *, const QStringList&) : +GenericFilter::GenericFilter(KoFilter *, const char *, const TQStringList&) : KoFilter() { } -KoFilter::ConversionStatus GenericFilter::convert( const QCString &from, const QCString &to ) +KoFilter::ConversiontqStatus GenericFilter::convert( const TQCString &from, const TQCString &to ) { //find the right script to use @@ -80,14 +80,14 @@ KoFilter::ConversionStatus GenericFilter::convert( const QCString &from, const Q return KoFilter::NotImplemented; } -KoFilter::ConversionStatus GenericFilter::doImport() +KoFilter::ConversiontqStatus GenericFilter::doImport() { - KTempFile temp(QString("genericfilter-")); + KTempFile temp(TQString("genericfilter-")); temp.setAutoDelete(true); - QFile tempFile(temp.name()); + TQFile tempFile(temp.name()); - m_out = KoStore::createStore(&tempFile, KoStore::Write); + m_out = KoStore::createStore(TQT_TQIODEVICE(&tempFile), KoStore::Write); if (!m_out || !m_out->open("root")) { @@ -97,15 +97,15 @@ KoFilter::ConversionStatus GenericFilter::doImport() } else { - QString exec = m_exec + " " + KProcess::quote(m_chain->inputFile()) + " " + TQString exec = m_exec + " " + KProcess::quote(m_chain->inputFile()) + " " + KProcess::quote(m_chain->outputFile()); - system(QFile::encodeName(exec)); + system(TQFile::encodeName(exec)); kdDebug() << "Executing: " << exec << endl; - QFile outFile(m_chain->outputFile()); + TQFile outFile(m_chain->outputFile()); outFile.open(IO_ReadOnly); - QByteArray outData = outFile.readAll(); + TQByteArray outData = outFile.readAll(); if (outData.size()==0) { m_out->close(); return KoFilter::UnexpectedEOF; @@ -119,7 +119,7 @@ KoFilter::ConversionStatus GenericFilter::doImport() return KoFilter::OK; } -KoFilter::ConversionStatus GenericFilter::doExport() +KoFilter::ConversiontqStatus GenericFilter::doExport() { return KoFilter::NotImplemented; } diff --git a/filters/generic_wrapper/generic_filter.h b/filters/generic_wrapper/generic_filter.h index 21cc7311..1fde2b95 100644 --- a/filters/generic_wrapper/generic_filter.h +++ b/filters/generic_wrapper/generic_filter.h @@ -20,8 +20,8 @@ #ifndef __GENERICFILTER_H__ #define __GENERICFILTER_H__ -#include -#include +#include +#include #include #include @@ -30,17 +30,18 @@ class GenericFilter : public KoFilter { Q_OBJECT + TQ_OBJECT public: - GenericFilter(KoFilter *parent, const char *name, const QStringList&); + GenericFilter(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~GenericFilter() {} - virtual KoFilter::ConversionStatus convert( const QCString& from, - const QCString& to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, + const TQCString& to ); private: - KoFilter::ConversionStatus doImport(); - KoFilter::ConversionStatus doExport(); - QString m_to, m_from, m_exec; + KoFilter::ConversiontqStatus doImport(); + KoFilter::ConversiontqStatus doExport(); + TQString m_to, m_from, m_exec; KoStore* m_out; }; diff --git a/filters/karbon/ai/ai88handler.cc b/filters/karbon/ai/ai88handler.cc index f3cf53a7..a271f33f 100644 --- a/filters/karbon/ai/ai88handler.cc +++ b/filters/karbon/ai/ai88handler.cc @@ -326,7 +326,7 @@ void AI88Handler::_handleSetFillPattern() AIElement elem (m_delegate->m_stack.top()); m_delegate->m_stack.pop(); - const QValueVector aval = elem.toElementArray(); + const TQValueVector aval = elem.toElementArray(); double ka = m_delegate->getDoubleValue(); double k = m_delegate->getDoubleValue(); @@ -341,7 +341,7 @@ void AI88Handler::_handleSetFillPattern() AIElement elem2 (m_delegate->m_stack.top()); m_delegate->m_stack.pop(); - const QString &name = elem2.toString(); + const TQString &name = elem2.toString(); if (m_delegate->m_gstateHandler) m_delegate->m_gstateHandler->gotFillPattern (name.latin1(), px, py, sx, sy, angle, rf, r, k, ka, aval); } @@ -350,7 +350,7 @@ void AI88Handler::_handleSetStrokePattern() AIElement elem (m_delegate->m_stack.top()); m_delegate->m_stack.pop(); - const QValueVector aval = elem.toElementArray(); + const TQValueVector aval = elem.toElementArray(); double ka = m_delegate->getDoubleValue(); double k = m_delegate->getDoubleValue(); @@ -365,7 +365,7 @@ void AI88Handler::_handleSetStrokePattern() AIElement elem2 (m_delegate->m_stack.top()); m_delegate->m_stack.pop(); - const QString &name = elem2.toString(); + const TQString &name = elem2.toString(); if (m_delegate->m_gstateHandler) m_delegate->m_gstateHandler->gotStrokePattern (name.latin1(), px, py, sx, sy, angle, rf, r, k, ka, aval); } @@ -406,7 +406,7 @@ void AI88Handler::_handleSetStrokeColorGray() void AI88Handler::_handleSetFillColorCustom() { double g = m_delegate->getDoubleValue(); - const QString name = m_delegate->getStringValue(); + const TQString name = m_delegate->getStringValue(); double k = m_delegate->getDoubleValue(); double y = m_delegate->getDoubleValue(); double m = m_delegate->getDoubleValue(); @@ -426,7 +426,7 @@ void AI88Handler::_handleSetDash() AIElement elem (m_delegate->m_stack.top()); m_delegate->m_stack.pop(); - const QValueVector aval = elem.toElementArray(); + const TQValueVector aval = elem.toElementArray(); if (m_delegate->m_gstateHandler) m_delegate->m_gstateHandler->gotDash (aval, fval); // qDebug ("dash operation finished"); } @@ -436,7 +436,7 @@ void AI88Handler::_handlePatternDefinition() AIElement elem (m_delegate->m_stack.top()); m_delegate->m_stack.pop(); - const QValueVector aval = elem.toElementArray(); + const TQValueVector aval = elem.toElementArray(); double ury = m_delegate->getDoubleValue(); double urx = m_delegate->getDoubleValue(); @@ -446,7 +446,7 @@ void AI88Handler::_handlePatternDefinition() AIElement elem2 (m_delegate->m_stack.top()); m_delegate->m_stack.pop(); - const QString &name = elem2.toString(); + const TQString &name = elem2.toString(); if (m_delegate->m_documentHandler) m_delegate->m_documentHandler->gotPatternDefinition (name.latin1(), aval, llx, lly, urx, ury); } @@ -455,7 +455,7 @@ void AI88Handler::_handleGsaveIncludeDocument() { AIElement elem2 (m_delegate->m_stack.top()); m_delegate->m_stack.pop(); - const QString &name = elem2.toString(); + const TQString &name = elem2.toString(); int ury = m_delegate->getIntValue(); int urx = m_delegate->getIntValue(); @@ -465,7 +465,7 @@ void AI88Handler::_handleGsaveIncludeDocument() { AIElement elem (m_delegate->m_stack.top()); m_delegate->m_stack.pop(); - const QValueVector aval = elem.toElementArray(); + const TQValueVector aval = elem.toElementArray(); if (m_delegate->m_embeddedHandler) m_delegate->m_embeddedHandler->gotGsaveIncludeDocument (aval, llx,lly,urx,ury,name.latin1()); } @@ -491,7 +491,7 @@ void AI88Handler::_handleSetCurrentText() { AIElement elem2 (m_delegate->m_stack.top()); m_delegate->m_stack.pop(); - const QString &fontname = elem2.toReference(); + const TQString &fontname = elem2.toReference(); if (m_delegate->m_textHandler) m_delegate->m_textHandler->gotFontDefinition (fontname.latin1(), size, leading, kerning, ta); @@ -502,7 +502,7 @@ void AI88Handler::_handleTextBlock (TextOperation to) { qDebug ("to element is (%s)",elem.typeName()); m_delegate->m_stack.pop(); - const QValueVector aval = elem.toElementArray(); + const TQValueVector aval = elem.toElementArray(); if (m_delegate->m_textHandler) m_delegate->m_textHandler->gotTextBlockBegin (aval, to); } @@ -511,7 +511,7 @@ void AI88Handler::_handleTextOutput () { AIElement elem (m_delegate->m_stack.top()); m_delegate->m_stack.pop(); - const QString &text = elem.toString(); + const TQString &text = elem.toString(); int length = -1; @@ -535,15 +535,15 @@ void AI88Handler::_handleFontEncoding() AIElement elem (m_delegate->m_stack.top()); m_delegate->m_stack.pop(); - const QString &oldFont = elem.toReference(); + const TQString &oldFont = elem.toReference(); AIElement elem2 (m_delegate->m_stack.top()); m_delegate->m_stack.pop(); - const QString &newFont = elem2.toReference(); + const TQString &newFont = elem2.toReference(); AIElement elem3 (m_delegate->m_stack.top()); m_delegate->m_stack.pop(); - const QValueVector encodingData = elem3.toElementArray(); + const TQValueVector encodingData = elem3.toElementArray(); if (m_delegate->m_textHandler) m_delegate->m_textHandler->gotFontEncoding (encodingData, oldFont.latin1(), newFont.latin1()); } @@ -551,7 +551,7 @@ void AI88Handler::_handleFontEncoding() void AI88Handler::_handleSetStrokeColorCustom() { double g = m_delegate->getDoubleValue(); - const QString name = m_delegate->getStringValue(); + const TQString name = m_delegate->getStringValue(); double k = m_delegate->getDoubleValue(); double y = m_delegate->getDoubleValue(); double m = m_delegate->getDoubleValue(); diff --git a/filters/karbon/ai/aicolor.h b/filters/karbon/ai/aicolor.h index b8cc1414..6e22984c 100644 --- a/filters/karbon/ai/aicolor.h +++ b/filters/karbon/ai/aicolor.h @@ -20,7 +20,7 @@ #ifndef AICOLOR_H #define AICOLOR_H -#include +#include /** *@author diff --git a/filters/karbon/ai/aielement.cc b/filters/karbon/ai/aielement.cc index 13887b50..608bdf61 100644 --- a/filters/karbon/ai/aielement.cc +++ b/filters/karbon/ai/aielement.cc @@ -1,5 +1,5 @@ /* This file is part of the KDE project - Copyright (C) 2002, Dirk Schönberger + Copyright (C) 2002, Dirk Sch�nberger This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public @@ -18,7 +18,7 @@ */ #include "aielement.h" -#include +#include AIElement::Private::Private() { @@ -34,23 +34,23 @@ AIElement::Private::Private( Private* d ) case AIElement::String: case AIElement::Reference: case AIElement::Operator: - value.ptr = new QString( *((QString*)d->value.ptr) ); + value.ptr = new TQString( *((TQString*)d->value.ptr) ); break; case AIElement::CString: - // QCString is explicit shared - value.ptr = new QCString( *((QCString*)d->value.ptr) ); + // TQCString is explicit shared + value.ptr = new TQCString( *((TQCString*)d->value.ptr) ); break; /* case AIElement::List: - value.ptr = new QValueList( *((QValueList*)d->value.ptr) ); + value.ptr = new TQValueList( *((TQValueList*)d->value.ptr) ); break; */ case AIElement::ElementArray: - value.ptr = new QValueVector( *((QValueVector*)d->value.ptr) ); + value.ptr = new TQValueVector( *((TQValueVector*)d->value.ptr) ); break; case AIElement::Block: - value.ptr = new QValueVector( *((QValueVector*)d->value.ptr) ); + value.ptr = new TQValueVector( *((TQValueVector*)d->value.ptr) ); break; case AIElement::ByteArray: - value.ptr = new QByteArray( *((QByteArray*)d->value.ptr) ); + value.ptr = new TQByteArray( *((TQByteArray*)d->value.ptr) ); break; case AIElement::Int: value.i = d->value.i; @@ -83,22 +83,22 @@ void AIElement::Private::clear() case AIElement::String: case AIElement::Operator: case AIElement::Reference: - delete (QString*)value.ptr; + delete (TQString*)value.ptr; break; case AIElement::CString: - delete (QCString*)value.ptr; + delete (TQCString*)value.ptr; break; /* case AIElement::List: - delete (QValueList*)value.ptr; + delete (TQValueList*)value.ptr; break; */ case AIElement::ElementArray: - delete (QValueVector*)value.ptr; + delete (TQValueVector*)value.ptr; break; case AIElement::Block: - delete (QValueVector*)value.ptr; + delete (TQValueVector*)value.ptr; break; case AIElement::ByteArray: - delete (QByteArray*)value.ptr; + delete (TQByteArray*)value.ptr; break; case AIElement::Invalid: case AIElement::Int: @@ -136,7 +136,7 @@ AIElement::~AIElement() /*! Constructs a copy of the aielement, \a p, passed as the argument to this constructor. Usually this is a deep copy, but a shallow copy is made - if the stored data type is explicitly shared, as e.g. QImage is. + if the stored data type is explicitly shared, as e.g. TQImage is. */ AIElement::AIElement( const AIElement& p ) { @@ -147,25 +147,25 @@ AIElement::AIElement( const AIElement& p ) /*! Constructs a new aielement with a string value, \a val. */ -AIElement::AIElement( const QString& val, Type type ) +AIElement::AIElement( const TQString& val, Type type ) { d = new Private; d->typ = type; - d->value.ptr = new QString( val ); + d->value.ptr = new TQString( val ); } /*! Constructs a new aielement with a C-string value, \a val. - If you want to modify the QCString after you've passed it to this + If you want to modify the TQCString after you've passed it to this constructor, we recommend passing a deep copy (see - QCString::copy()). + TQCString::copy()). */ -AIElement::AIElement( const QCString& val ) +AIElement::AIElement( const TQCString& val ) { d = new Private; d->typ = CString; - d->value.ptr = new QCString( val ); + d->value.ptr = new TQCString( val ); } /*! @@ -180,7 +180,7 @@ AIElement::AIElement( const char* val ) if ( val == 0 ) return; d->typ = CString; - d->value.ptr = new QCString( val ); + d->value.ptr = new TQCString( val ); } /*! @@ -227,32 +227,32 @@ AIElement::AIElement( double val ) /*! Constructs a new aielement with a list value, \a val. */ -/* AIElement::AIElement( const QValueList& val ) +/* AIElement::AIElement( const TQValueList& val ) { d = new Private; d->typ = List; - d->value.ptr = new QValueList( val ); + d->value.ptr = new TQValueList( val ); } */ -AIElement::AIElement( const QValueVector& val, Type type ) +AIElement::AIElement( const TQValueVector& val, Type type ) { d = new Private; d->typ = type; - d->value.ptr = new QValueVector( val ); + d->value.ptr = new TQValueVector( val ); } -AIElement::AIElement( const QByteArray& val ) +AIElement::AIElement( const TQByteArray& val ) { d = new Private; d->typ = ByteArray; - d->value.ptr = new QByteArray( val ); + d->value.ptr = new TQByteArray( val ); } /*! Assigns the value of the aielement \a aielement to this aielement. This is a deep copy of the aielement, but note that if the aielement - holds an explicitly shared type such as QImage, a shallow copy + holds an explicitly shared type such as TQImage, a shallow copy is performed. */ AIElement& AIElement::operator= ( const AIElement& aielement ) @@ -283,7 +283,7 @@ void AIElement::detach() /*! Returns the name of the type stored in the aielement. The returned strings describe the C++ datatype used to store the - data: for example, "QFont", "QString", or "QValueList". + data: for example, "TQFont", TQSTRING_OBJECT_NAME_STRING, or "TQValueList". An Invalid aielement returns 0. */ const char* AIElement::typeName() const @@ -310,16 +310,16 @@ static const int ntypes = 11; static const char* const type_map[ntypes] = { 0, -// "QValueList", - "QString", +// "TQValueList", + TQSTRING_OBJECT_NAME_STRING, "int", "uint", "double", - "QCString", + "TQCString", "Operator", "Reference", - "QValueVector", - "QByteArray", + "TQValueVector", + TQBYTEARRAY_OBJECT_NAME_STRING, "uchar", }; @@ -351,59 +351,59 @@ AIElement::Type AIElement::nameToType( const char* name ) } /*! - Returns the aielement as a QString if the aielement has type() + Returns the aielement as a TQString if the aielement has type() String, CString, ByteArray, Int, Uint, Double, - or QString::null otherwise. + or TQString() otherwise. \sa asString() */ -const QString AIElement::toString() const +const TQString AIElement::toString() const { if ( d->typ == CString ) - return QString::fromLatin1( toCString() ); + return TQString::tqfromLatin1( toCString() ); if ( d->typ == Int ) - return QString::number( toInt() ); + return TQString::number( toInt() ); if ( d->typ == UInt ) - return QString::number( toUInt() ); + return TQString::number( toUInt() ); if ( d->typ == Double ) - return QString::number( toDouble() ); + return TQString::number( toDouble() ); if ( d->typ == Byte ) - return QString::number( toByte() ); + return TQString::number( toByte() ); if ( d->typ != String ) - return QString::null; - return *((QString*)d->value.ptr); + return TQString(); + return *((TQString*)d->value.ptr); } -const QString AIElement::toReference() const +const TQString AIElement::toReference() const { if ( d->typ != Reference ) - return QString::null; - return *((QString*)d->value.ptr); + return TQString(); + return *((TQString*)d->value.ptr); } -const QString AIElement::toOperator() const +const TQString AIElement::toOperator() const { if ( d->typ != Operator ) - return QString::null; - return *((QString*)d->value.ptr); + return TQString(); + return *((TQString*)d->value.ptr); } /*! - Returns the aielement as a QCString if the aielement has type() + Returns the aielement as a TQCString if the aielement has type() CString or String, or a 0 otherwise. \sa asCString() */ -const QCString AIElement::toCString() const +const TQCString AIElement::toCString() const { if ( d->typ == CString ) - return *((QCString*)d->value.ptr); + return *((TQCString*)d->value.ptr); if ( d->typ == String ) - return ((QString*)d->value.ptr)->latin1(); + return ((TQString*)d->value.ptr)->latin1(); if ( d->typ == Operator ) - return ((QString*)d->value.ptr)->latin1(); + return ((TQString*)d->value.ptr)->latin1(); if ( d->typ == Reference ) - return ((QString*)d->value.ptr)->latin1(); + return ((TQString*)d->value.ptr)->latin1(); return 0; } @@ -421,9 +421,9 @@ const QCString AIElement::toCString() const int AIElement::toInt( bool * ok ) const { if( d->typ == String ) - return ((QString*)d->value.ptr)->toInt( ok ); + return ((TQString*)d->value.ptr)->toInt( ok ); if ( d->typ == CString ) - return ((QCString*)d->value.ptr)->toInt( ok ); + return ((TQCString*)d->value.ptr)->toInt( ok ); if ( ok ) *ok = canCast( UInt ); if( d->typ == Int ) @@ -440,9 +440,9 @@ int AIElement::toInt( bool * ok ) const uchar AIElement::toByte( bool * ok ) const { if( d->typ == String ) - return ((QString*)d->value.ptr)->toShort( ok ); + return ((TQString*)d->value.ptr)->toShort( ok ); if ( d->typ == CString ) - return ((QCString*)d->value.ptr)->toShort( ok ); + return ((TQCString*)d->value.ptr)->toShort( ok ); if ( ok ) *ok = canCast( UInt ); if( d->typ == Byte ) @@ -469,9 +469,9 @@ uchar AIElement::toByte( bool * ok ) const uint AIElement::toUInt( bool * ok ) const { if( d->typ == String ) - return ((QString*)d->value.ptr)->toUInt( ok ); + return ((TQString*)d->value.ptr)->toUInt( ok ); if ( d->typ == CString ) - return ((QCString*)d->value.ptr)->toUInt( ok ); + return ((TQCString*)d->value.ptr)->toUInt( ok ); if ( ok ) *ok = canCast( UInt ); if( d->typ == Int ) @@ -498,9 +498,9 @@ uint AIElement::toUInt( bool * ok ) const double AIElement::toDouble( bool * ok ) const { if( d->typ == String ) - return ((QString*)d->value.ptr)->toDouble( ok ); + return ((TQString*)d->value.ptr)->toDouble( ok ); if ( d->typ == CString ) - return ((QCString*)d->value.ptr)->toDouble( ok ); + return ((TQCString*)d->value.ptr)->toDouble( ok ); if ( ok ) *ok = canCast( Double ); if ( d->typ == Double ) @@ -515,14 +515,14 @@ double AIElement::toDouble( bool * ok ) const } /*! - Returns the aielement as a QValueList if the aielement has type() + Returns the aielement as a TQValueList if the aielement has type() List or StringList, or an empty list otherwise. Note that if you want to iterate over the list, you should iterate over a copy, e.g. \code - QValueList list = myAIElement.toList(); - QValueList::Iterator it = list.begin(); + TQValueList list = myAIElement.toList(); + TQValueList::Iterator it = list.begin(); while( it != list.end() ) { myProcessing( *it ); ++it; @@ -531,40 +531,40 @@ double AIElement::toDouble( bool * ok ) const \sa asList() */ -/* const QValueList AIElement::toList() const +/* const TQValueList AIElement::toList() const { if ( d->typ == List ) - return *((QValueList*)d->value.ptr); - return QValueList(); + return *((TQValueList*)d->value.ptr); + return TQValueList(); } */ -const QValueVector AIElement::toElementArray() const +const TQValueVector AIElement::toElementArray() const { if ( d->typ == ElementArray ) - return *((QValueVector*)d->value.ptr); - return QValueVector(); + return *((TQValueVector*)d->value.ptr); + return TQValueVector(); } -const QValueVector AIElement::toBlock() const +const TQValueVector AIElement::toBlock() const { if ( d->typ == Block ) - return *((QValueVector*)d->value.ptr); - return QValueVector(); + return *((TQValueVector*)d->value.ptr); + return TQValueVector(); } -const QByteArray AIElement::toByteArray() const +const TQByteArray AIElement::toByteArray() const { if ( d->typ == ByteArray ) - return *((QByteArray*)d->value.ptr); - return QByteArray(); + return *((TQByteArray*)d->value.ptr); + return TQByteArray(); } -#define Q_VARIANT_AS( f ) Q##f& AIElement::as##f() { \ - if ( d->typ != f ) *this = AIElement( to##f() ); else detach(); return *((Q##f*)d->value.ptr);} +#define TQ_VARIANT_AS( f ) TQ##f& AIElement::as##f() { \ + if ( d->typ != f ) *this = AIElement( to##f() ); else detach(); return *((TQ##f*)d->value.ptr);} -Q_VARIANT_AS(String) -Q_VARIANT_AS(CString) +TQ_VARIANT_AS(String) +TQ_VARIANT_AS(CString) /*! Returns the aielement's value as int reference. @@ -632,41 +632,41 @@ uchar& AIElement::asByte() Note that if you want to iterate over the list, you should iterate over a copy, e.g. \code - QValueList list = myAIElement.asList(); - QValueList::Iterator it = list.begin(); + TQValueList list = myAIElement.asList(); + TQValueList::Iterator it = list.begin(); while( it != list.end() ) { myProcessing( *it ); ++it; } \endcode */ -/* QValueList& AIElement::asList() +/* TQValueList& AIElement::asList() { if ( d->typ != List ) *this = AIElement( toList() ); - return *((QValueList*)d->value.ptr); + return *((TQValueList*)d->value.ptr); } */ -QValueVector& AIElement::asElementArray() +TQValueVector& AIElement::asElementArray() { if ( d->typ != ElementArray ) *this = AIElement( toElementArray() ); - return *((QValueVector*)d->value.ptr); + return *((TQValueVector*)d->value.ptr); } -QValueVector& AIElement::asBlock() +TQValueVector& AIElement::asBlock() { if ( d->typ != Block ) *this = AIElement( toBlock() ); - return *((QValueVector*)d->value.ptr); + return *((TQValueVector*)d->value.ptr); } -QByteArray& AIElement::asByteArray() +TQByteArray& AIElement::asByteArray() { if ( d->typ != ByteArray ) *this = AIElement( toByteArray() ); - return *((QByteArray*)d->value.ptr); + return *((TQByteArray*)d->value.ptr); } /*! diff --git a/filters/karbon/ai/aielement.h b/filters/karbon/ai/aielement.h index 5c6ab045..4fdf64a2 100644 --- a/filters/karbon/ai/aielement.h +++ b/filters/karbon/ai/aielement.h @@ -20,11 +20,11 @@ #ifndef AIELEMENT_H #define AIELEMENT_H -// #include -#include +// #include +#include -class QString; -class QCString; +class TQString; +class TQCString; /** *@author @@ -52,15 +52,15 @@ public: AIElement(); ~AIElement(); AIElement( const AIElement& ); - AIElement( const QString&, Type type = String ); - AIElement( const QCString& ); + AIElement( const TQString&, Type type = String ); + AIElement( const TQCString& ); AIElement( const char* ); -// AIElement( const QValueList& ); - AIElement( const QValueVector&, Type type = ElementArray); +// AIElement( const TQValueList& ); + AIElement( const TQValueVector&, Type type = ElementArray); AIElement( int ); AIElement( uint ); AIElement( double ); - AIElement( const QByteArray& ); + AIElement( const TQByteArray& ); AIElement( uchar ); AIElement& operator= ( const AIElement& ); @@ -77,36 +77,36 @@ public: void clear(); - const QString toString() const; - const QCString toCString() const; + const TQString toString() const; + const TQCString toCString() const; int toInt( bool * ok=0 ) const; uint toUInt( bool * ok=0 ) const; double toDouble( bool * ok=0 ) const; -// const QValueList toList() const; - const QValueVector toElementArray() const; - const QValueVector toBlock() const; +// const TQValueList toList() const; + const TQValueVector toElementArray() const; + const TQValueVector toBlock() const; // Custom types - const QString toReference() const; - const QString toOperator() const; - const QByteArray toByteArray() const; + const TQString toReference() const; + const TQString toOperator() const; + const TQByteArray toByteArray() const; uchar toByte( bool * ok=0 ) const; -// QValueListConstIterator listBegin() const; -// QValueListConstIterator listEnd() const; - QString& asString(); - QCString& asCString(); +// TQValueListConstIterator listBegin() const; +// TQValueListConstIterator listEnd() const; + TQString& asString(); + TQCString& asCString(); int& asInt(); uint& asUInt(); double& asDouble(); -// QValueList& asList(); - QValueVector& asElementArray(); - QValueVector& asBlock(); +// TQValueList& asList(); + TQValueVector& asElementArray(); + TQValueVector& asBlock(); // Custom types - QString& asReference(); - QString& asToken(); - QByteArray& asByteArray(); + TQString& asReference(); + TQString& asToken(); + TQByteArray& asByteArray(); uchar& asByte(); static const char* typeToName( Type typ ); @@ -115,7 +115,7 @@ public: private: void detach(); - class Private : public QShared + class Private : public TQShared { public: Private(); diff --git a/filters/karbon/ai/aiimport.cc b/filters/karbon/ai/aiimport.cc index a5e24f5b..4a201ec5 100644 --- a/filters/karbon/ai/aiimport.cc +++ b/filters/karbon/ai/aiimport.cc @@ -1,5 +1,5 @@ /* This file is part of the KDE project - Copyright (C) 2002, Dirk Schönberger + Copyright (C) 2002, Dirk Sch�nberger This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public @@ -17,10 +17,10 @@ * Boston, MA 02110-1301, USA. */ -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -47,7 +47,7 @@ protected: K_EXPORT_COMPONENT_FACTORY( libkarbonaiimport, AiImportFactory() ) -AiImport::AiImport( KoFilter*, const char*, const QStringList& ) +AiImport::AiImport( KoFilter*, const char*, const TQStringList& ) : KoFilter() { } @@ -56,29 +56,29 @@ AiImport::~AiImport() { } -KoFilter::ConversionStatus -AiImport::convert( const QCString& from, const QCString& to ) +KoFilter::ConversiontqStatus +AiImport::convert( const TQCString& from, const TQCString& to ) { if ( from != "application/illustrator" || to != "application/x-karbon" ) { return KoFilter::NotImplemented; } - QFile fileIn( m_chain->inputFile() ); + TQFile fileIn( m_chain->inputFile() ); if( !fileIn.open( IO_ReadOnly ) ) { fileIn.close(); return KoFilter::FileNotFound; } - QDomDocument doc ("DOC"); + TQDomDocument doc ("DOC"); KarbonAIParserBase parser; - if (!parser.parse (fileIn, doc)) + if (!parser.parse (*TQT_TQIODEVICE(&fileIn), doc)) { fileIn.close(); return KoFilter::CreationError; } - QString result = doc.toString(); + TQString result = doc.toString(); kdDebug() << result << endl; KoStoreDevice* storeOut = m_chain->storageFile( "root", KoStore::Write ); @@ -88,7 +88,7 @@ AiImport::convert( const QCString& from, const QCString& to ) return KoFilter::StorageCreationError; } - QCString cStr = result.latin1(); + TQCString cStr = result.latin1(); storeOut->writeBlock( cStr, cStr.size() - 1 ); return KoFilter::OK; diff --git a/filters/karbon/ai/aiimport.h b/filters/karbon/ai/aiimport.h index 2ec2d19b..901eba6d 100644 --- a/filters/karbon/ai/aiimport.h +++ b/filters/karbon/ai/aiimport.h @@ -24,20 +24,21 @@ #include "karbonaiparserbase.h" -class QDomElement; -class QTextStream; +class TQDomElement; +class TQTextStream; class AiImport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - AiImport( KoFilter* parent, const char* name, const QStringList& ); + AiImport( KoFilter* tqparent, const char* name, const TQStringList& ); virtual ~AiImport(); - virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to ); /* private: - QString m_result; */ + TQString m_result; */ }; diff --git a/filters/karbon/ai/ailexer.cc b/filters/karbon/ai/ailexer.cc index 7b660f7f..a1ab4bda 100644 --- a/filters/karbon/ai/ailexer.cc +++ b/filters/karbon/ai/ailexer.cc @@ -19,7 +19,7 @@ #include #include -#include +#include #include "ailexer.h" #define CATEGORY_WHITESPACE -1 @@ -173,7 +173,7 @@ AILexer::AILexer(){ AILexer::~AILexer(){ } -bool AILexer::parse (QIODevice& fin){ +bool AILexer::parse (TQIODevice& fin){ char c; m_buffer.clear(); @@ -350,7 +350,7 @@ void AILexer::gotByte (uchar value) { qDebug ( "got byte %d" , value ); } -void AILexer::gotByteArray (const QByteArray &data) { +void AILexer::gotByteArray (const TQByteArray &data) { qDebug ( "got byte array" ); /* for ( uint i = 0; i < data.size(); i++ ) { @@ -413,11 +413,11 @@ void AILexer::doHandleByteArray () uint strIdx = 0; uint arrayIdx = 0; - QByteArray data (m_buffer.length() >> 1); + TQByteArray data (m_buffer.length() >> 1); while (strIdx < m_buffer.length()) { - const QString &item = m_buffer.mid (strIdx, 2); + const TQString &item = m_buffer.mid (strIdx, 2); uchar val = item.toShort(NULL, 16); data[arrayIdx] = val; strIdx += 2; @@ -431,7 +431,7 @@ uchar AILexer::getByte() { // qDebug ("convert string to byte (%s)", m_buffer.latin1()); - QStringList list = QStringList::split ("#", m_buffer.toString()); + TQStringList list = TQStringList::split ("#", m_buffer.toString()); int radix = list[0].toShort(); uchar value = list[1].toShort (NULL, radix); @@ -471,8 +471,8 @@ void StringBuffer::clear(){ m_length = 0; } -QString StringBuffer::toString() const { - QString ret(m_buffer); +TQString StringBuffer::toString() const { + TQString ret(m_buffer); return ret; } @@ -495,12 +495,12 @@ uint StringBuffer::length() { } double StringBuffer::toFloat() { - QString data = toString(); + TQString data = toString(); return data.toFloat(); } int StringBuffer::toInt() { - QString data = toString(); + TQString data = toString(); return data.toInt(); } @@ -508,7 +508,7 @@ const char *StringBuffer::latin1() { return m_buffer; } -QString StringBuffer::mid( uint index, uint len) const { - QString data = toString(); +TQString StringBuffer::mid( uint index, uint len) const { + TQString data = toString(); return data.mid(index,len); } diff --git a/filters/karbon/ai/ailexer.h b/filters/karbon/ai/ailexer.h index c53aab66..c0aaf022 100644 --- a/filters/karbon/ai/ailexer.h +++ b/filters/karbon/ai/ailexer.h @@ -20,8 +20,8 @@ #ifndef AILEXER_H #define AILEXER_H -#include -#include +#include +#include /** *@author Dirk Schönberger @@ -65,12 +65,12 @@ public: void append (char c); void clear(); - QString toString() const; + TQString toString() const; uint length(); double toFloat(); int toInt(); const char *latin1(); - QString mid( uint index, uint len=0xffffffff) const; + TQString mid( uint index, uint len=0xffffffff) const; private: char *m_buffer; uint m_length; @@ -84,7 +84,7 @@ public: AILexer(); virtual ~AILexer(); - virtual bool parse (QIODevice& fin); + virtual bool parse (TQIODevice& fin); private: State m_curState; StringBuffer m_buffer; @@ -116,7 +116,7 @@ protected: virtual void gotArrayStart (); virtual void gotArrayEnd (); virtual void gotByte (uchar value); - virtual void gotByteArray (const QByteArray &data); + virtual void gotByteArray (const TQByteArray &data); }; #endif diff --git a/filters/karbon/ai/aiparserbase.cc b/filters/karbon/ai/aiparserbase.cc index 63ace734..6e9ff040 100644 --- a/filters/karbon/ai/aiparserbase.cc +++ b/filters/karbon/ai/aiparserbase.cc @@ -20,8 +20,8 @@ #include "aiparserbase.h" #include "ai88handler.h" #include "ai3handler.h" -#include -#include +#include +#include typedef struct { char* op; @@ -204,7 +204,7 @@ AIParserBase::~AIParserBase(){ } -bool AIParserBase::parse (QIODevice& fin){ +bool AIParserBase::parse (TQIODevice& fin){ return AILexer::parse (fin); } @@ -376,13 +376,13 @@ void AIParserBase::handleElement (AIElement &element) if (m_sink == DS_Array) { if (m_debug) qDebug ("in mode array"); - QValueVector &elementArray = m_arrayStack.top(); + TQValueVector &elementArray = m_arrayStack.top(); elementArray.push_back(element); } if (m_sink == DS_Block) { if (m_debug) qDebug ("in mode block"); - QValueVector &elementArray = m_blockStack.top(); + TQValueVector &elementArray = m_blockStack.top(); elementArray.push_back(element); } else @@ -425,7 +425,7 @@ void AIParserBase::gotReference (const char *value) { if (m_ignoring) return; if (value == NULL) value = ""; if (m_debug) qDebug ("reference: %s", value); - QString string(value); + TQString string(value); AIElement element (string, AIElement::Reference); handleElement (element); if (m_debug) qDebug ("/got reference value"); @@ -441,7 +441,7 @@ void AIParserBase::gotByte (uchar value) { if (m_debug) qDebug ("/got byte value"); } -void AIParserBase::gotByteArray (const QByteArray &data) { +void AIParserBase::gotByteArray (const TQByteArray &data) { if (m_ignoring) return; AIElement element (data); handleElement (element); @@ -452,7 +452,7 @@ void AIParserBase::gotArrayStart () { if (m_ignoring) return; if (m_debug) qDebug ("got array start"); - QValueVector array; + TQValueVector array; m_arrayStack.push (array); m_sink = DS_Array; @@ -462,7 +462,7 @@ void AIParserBase::gotBlockStart () { if (m_ignoring) return; if (m_debug) qDebug ("got block start"); - QValueVector array; + TQValueVector array; m_blockStack.push (array); m_sink = DS_Block; @@ -472,7 +472,7 @@ void AIParserBase::gotArrayEnd () { if (m_ignoring) return; if (m_debug) qDebug ("got array end"); - QValueVector stackArray = m_arrayStack.pop(); + TQValueVector stackArray = m_arrayStack.pop(); if (m_arrayStack.empty()) { @@ -491,7 +491,7 @@ void AIParserBase::gotArrayEnd () { else { if (m_debug) qDebug ("put elements to nest stack level"); - QValueVector currentTOS = m_arrayStack.top(); + TQValueVector currentTOS = m_arrayStack.top(); currentTOS.push_back (stackArray); } } @@ -500,7 +500,7 @@ void AIParserBase::gotBlockEnd () { if (m_ignoring) return; if (m_debug) qDebug ("got block end"); - QValueVector stackArray = m_blockStack.pop(); + TQValueVector stackArray = m_blockStack.pop(); if (m_blockStack.empty()) { @@ -519,7 +519,7 @@ void AIParserBase::gotBlockEnd () { else { if (m_debug) qDebug ("put elements to nest stack level"); - QValueVector currentTOS = m_blockStack.top(); + TQValueVector currentTOS = m_blockStack.top(); currentTOS.push_back (stackArray); } } @@ -531,7 +531,7 @@ void AIParserBase::gotBlockEnd () { AIElement elem (m_stack.top()); m_stack.pop(); - const QValueVector aval = elem.toElementArray(); + const TQValueVector aval = elem.toElementArray(); if (m_gstateHandler) m_gstateHandler->gotDash (aval, fval); } */ @@ -553,7 +553,7 @@ void AIParserBase::gotBlockEnd () { AIElement elem (m_stack.top()); m_stack.pop(); - const QValueVector aval = elem.toElementArray(); + const TQValueVector aval = elem.toElementArray(); double ka = getDoubleValue(); double k = getDoubleValue(); @@ -568,7 +568,7 @@ void AIParserBase::gotBlockEnd () { AIElement elem2 (m_stack.top()); m_stack.pop(); - const QString &name = elem2.toString(); + const TQString &name = elem2.toString(); if (m_gstateHandler) m_gstateHandler->gotFillPattern (name.latin1(), px, py, sx, sy, angle, rf, r, k, ka, aval); } */ @@ -577,7 +577,7 @@ void AIParserBase::gotBlockEnd () { AIElement elem (m_stack.top()); m_stack.pop(); - const QValueVector aval = elem.toElementArray(); + const TQValueVector aval = elem.toElementArray(); double ka = getDoubleValue(); double k = getDoubleValue(); @@ -592,7 +592,7 @@ void AIParserBase::gotBlockEnd () { AIElement elem2 (m_stack.top()); m_stack.pop(); - const QString &name = elem2.toString(); + const TQString &name = elem2.toString(); if (m_gstateHandler) m_gstateHandler->gotStrokePattern (name.latin1(), px, py, sx, sy, angle, rf, r, k, ka, aval); } */ @@ -632,7 +632,7 @@ void AIParserBase::gotBlockEnd () { /*Ai88*/ /* void AIParserBase::_handleSetFillColorCustom() { double g = getDoubleValue(); - const QString &name = getStringValue(); + const TQString &name = getStringValue(); double k = getDoubleValue(); double y = getDoubleValue(); double m = getDoubleValue(); @@ -648,7 +648,7 @@ void AIParserBase::_handlePSGet() { m_stack.pop(); m_stack.pop(); - QString name ("xxx"); + TQString name ("xxx"); AIElement ref (name,AIElement::Reference); m_stack.push (ref); } @@ -660,7 +660,7 @@ void AIParserBase::_handlePSExec() { void AIParserBase::_handlePSString() { m_stack.pop(); - QString name ("stringval"); + TQString name ("stringval"); AIElement ref (name,AIElement::Reference); m_stack.push (ref); } @@ -668,13 +668,13 @@ void AIParserBase::_handlePSString() { void AIParserBase::_handlePSBind() { m_stack.pop(); - QString name ("bindentry"); + TQString name ("bindentry"); AIElement ref (name,AIElement::Reference); m_stack.push (ref); } void AIParserBase::_handlePSUserdict() { - QString name ("userdict"); + TQString name ("userdict"); AIElement ref (name,AIElement::Reference); m_stack.push (ref); } @@ -684,7 +684,7 @@ void AIParserBase::_handlePSDict() { m_stack.pop(); m_stack.pop(); - QString name ("dict"); + TQString name ("dict"); AIElement ref (name,AIElement::Reference); m_stack.push (ref); } @@ -699,7 +699,7 @@ void AIParserBase::_handlePSDup() { void AIParserBase::_handlePSBegin() { m_stack.pop(); - QString name ("dictionary begin"); + TQString name ("dictionary begin"); AIElement ref (name,AIElement::Reference); m_stack.push (ref); } @@ -714,7 +714,7 @@ void AIParserBase::_handlePSPut() { AIElement elem (m_stack.top()); m_stack.pop(); - const QValueVector aval = elem.toElementArray(); + const TQValueVector aval = elem.toElementArray(); double ury = getDoubleValue(); double urx = getDoubleValue(); @@ -724,7 +724,7 @@ void AIParserBase::_handlePSPut() { AIElement elem2 (m_stack.top()); m_stack.pop(); - const QString &name = elem2.toString(); + const TQString &name = elem2.toString(); if (m_documentHandler) m_documentHandler->gotPatternDefinition (name.latin1(), aval, llx, lly, urx, ury); } */ @@ -740,7 +740,7 @@ void AIParserBase::_handlePSDef() { /*Ai88*/ /* void AIParserBase::_handleSetStrokeColorCustom() { double g = getDoubleValue(); - const QString &name = getStringValue(); + const TQString &name = getStringValue(); double k = getDoubleValue(); double y = getDoubleValue(); double m = getDoubleValue(); @@ -763,22 +763,22 @@ void AIParserBase::_handleDocumentCustomColors(const char *) { void AIParserBase::_handleDocumentNeededResources(const char *data) { if (!data) return; - QStringList items = QStringList::split (' ', data); + TQStringList items = TQStringList::split (' ', data); - QString itemType = items[1]; - QString name = items[2]; - QString version = items[3]; - QString release = items[4]; + TQString itemType = items[1]; + TQString name = items[2]; + TQString version = items[3]; + TQString release = items[4]; } void AIParserBase::_handleIncludeResource(const char *data) { if (!data) return; - QStringList items = QStringList::split (' ', data); + TQStringList items = TQStringList::split (' ', data); - QString itemType = items[1]; - QString name = items[2]; - QString version = items[3]; - QString release = items[4]; + TQString itemType = items[1]; + TQString name = items[2]; + TQString version = items[3]; + TQString release = items[4]; m_modules.push_back (name); } @@ -787,20 +787,20 @@ void AIParserBase::_handleDocumentProcessColors(const char *data) { if (!data) return; int colorSet = 0; - QString tmp (data); + TQString tmp (data); signed int index; - index = tmp.find ("Cyan"); + index = tmp.tqfind ("Cyan"); if (index > 0) colorSet |= PC_Cyan; - index = tmp.find ("Magenta"); + index = tmp.tqfind ("Magenta"); if (index > 0) colorSet |= PC_Magenta; - index = tmp.find ("Yellow"); + index = tmp.tqfind ("Yellow"); if (index > 0) colorSet |= PC_Yellow; - index = tmp.find ("Black"); + index = tmp.tqfind ("Black"); if (index > 0) colorSet |= PC_Black; if (m_documentHandler) m_documentHandler->gotProcessColors (colorSet); @@ -813,7 +813,7 @@ void AIParserBase::_handleCMYKCustomColor(const char *) { AIElement elem2 (m_stack.top()); m_stack.pop(); - const QString &name = elem2.toString(); + const TQString &name = elem2.toString(); int ury = getIntValue(); int urx = getIntValue(); @@ -823,7 +823,7 @@ void AIParserBase::_handleCMYKCustomColor(const char *) { AIElement elem (m_stack.top()); m_stack.pop(); - const QValueVector aval = elem.toElementArray(); + const TQValueVector aval = elem.toElementArray(); if (m_embeddedHandler) m_embeddedHandler->gotGsaveIncludeDocument (aval, llx,lly,urx,ury,name.latin1()); } */ @@ -849,7 +849,7 @@ void AIParserBase::_handleCMYKCustomColor(const char *) { AIElement elem2 (m_stack.top()); m_stack.pop(); - const QString &fontname = elem2.toReference(); + const TQString &fontname = elem2.toReference(); if (m_textHandler) m_textHandler->gotFontDefinition (fontname.latin1(), size, leading, kerning, ta); } */ @@ -859,7 +859,7 @@ void AIParserBase::_handleCMYKCustomColor(const char *) { qDebug ("to element is (%s)",elem.typeName()); m_stack.pop(); - const QValueVector aval = elem.toElementArray(); + const TQValueVector aval = elem.toElementArray(); if (m_textHandler) m_textHandler->gotTextBlockBegin (aval, to); } */ @@ -868,7 +868,7 @@ void AIParserBase::_handleCMYKCustomColor(const char *) { AIElement elem (m_stack.top()); m_stack.pop(); - const QString &text = elem.toString(); + const TQString &text = elem.toString(); int length = -1; @@ -888,11 +888,11 @@ void AIParserBase::_handleCreationDate (const char *data) { if (!data) return; - QRegExp test ("\\((.+)\\) \\((.+)\\)"); + TQRegExp test ("\\((.+)\\) \\((.+)\\)"); if (test.search (data)) { - QString val1 = test.cap(1); - QString val2 = test.cap(2); + TQString val1 = test.cap(1); + TQString val2 = test.cap(2); if (m_documentHandler) m_documentHandler->gotCreationDate (val1.latin1(),val2.latin1()); } @@ -907,7 +907,7 @@ void AIParserBase::gotToken (const char *value) { if (m_sink == DS_Array) { if (m_debug) qDebug ("token in array"); - QString op (value); + TQString op (value); AIElement realElement (op, AIElement::Operator); handleElement (realElement); @@ -916,7 +916,7 @@ void AIParserBase::gotToken (const char *value) { if (m_sink == DS_Block) { if (m_debug) qDebug ("token in block"); - QString op (value); + TQString op (value); AIElement realElement (op, AIElement::Operator); handleElement (realElement); @@ -943,9 +943,9 @@ void AIParserBase::gotToken (const char *value) { } qWarning ( "unknown operator: %s", value ); - QString string(value); + TQString string(value); - if (m_modules.findIndex(string) != -1) + if (m_modules.tqfindIndex(string) != -1) { AIElement element (string, AIElement::Reference); handleElement (element); @@ -1019,13 +1019,13 @@ const bool AIParserBase::getBoolValue(void) { return getIntValue() == 1; } -const QString AIParserBase::getStringValue(void) { +const TQString AIParserBase::getStringValue(void) { const AIElement &elem = m_stack.pop(); return elem.toString(); } -const QString AIParserBase::getOperatorValue(void) { +const TQString AIParserBase::getOperatorValue(void) { const AIElement &elem = m_stack.pop(); return elem.toOperator(); @@ -1034,7 +1034,7 @@ const QString AIParserBase::getOperatorValue(void) { AIOperation AIParserBase::getAIOperation (const char *operand) { int i=0; - QString cmpValue (operand); + TQString cmpValue (operand); for(;;) { AIOperationMapping map = aiMappings[i]; if (map.op == NULL) return AIO_Other; @@ -1047,7 +1047,7 @@ AIOperation AIParserBase::getAIOperation (const char *operand) PSOperation AIParserBase::getPSOperation (const char *operand) { int i=0; - QString cmpValue (operand); + TQString cmpValue (operand); for(;;) { PSOperationMapping map = psMappings[i]; if (map.op == NULL) return PSO_Other; @@ -1058,7 +1058,7 @@ PSOperation AIParserBase::getPSOperation (const char *operand) } CommentOperation AIParserBase::getCommentOperation (const char *command) { - QString data (command); + TQString data (command); signed int index; @@ -1067,28 +1067,28 @@ CommentOperation AIParserBase::getCommentOperation (const char *command) { for(;;) { CommentOperationMapping map = commentMappings[i]; if (map.op == NULL) return CO_Other; - index = data.find (map.op); + index = data.tqfind (map.op); if (index >= 0) return map.action; i++; } } -void GStateHandlerBase::gotFillPattern (const char *pname, double px, double py, double sx, double sy, double angle, double rf, double r, double k, double ka, const QValueVector& transformData) { +void GStateHandlerBase::gotFillPattern (const char *pname, double px, double py, double sx, double sy, double angle, double rf, double r, double k, double ka, const TQValueVector& transformData) { qDebug ( "got fill pattern %s %f %f %f %f %f %f %f %f %f", pname, px, py, sx, sy, angle, rf, r, k, ka); arraytoa (transformData); qDebug ("/got fill pattern"); } -void GStateHandlerBase::gotStrokePattern (const char *pname, double px, double py, double sx, double sy, double angle, double rf, double r, double k, double ka, const QValueVector& transformData) { +void GStateHandlerBase::gotStrokePattern (const char *pname, double px, double py, double sx, double sy, double angle, double rf, double r, double k, double ka, const TQValueVector& transformData) { qDebug ( "got stroke pattern %s %f %f %f %f %f %f %f %f %f", pname, px, py, sx, sy, angle, rf, r, k, ka); arraytoa (transformData); qDebug ("/got stroke pattern"); } const char *AIParserBase::getValue (const char *input) { - QString data(input); + TQString data(input); - signed int index = data.find (':'); + signed int index = data.tqfind (':'); if (index < 0) return ""; index++; while (data.at(index) == ' ') index++; @@ -1098,9 +1098,9 @@ const char *AIParserBase::getValue (const char *input) { bool AIParserBase::getRectangle (const char* input, int &llx, int &lly, int &urx, int &ury) { if (input == NULL) return false; - QString s(input); - if (s.contains ("(atend)")) return false; - QStringList values = QStringList::split (" ", input); + TQString s(input); + if (s.tqcontains ("(atend)")) return false; + TQStringList values = TQStringList::split (" ", input); if (values.size() < 5) return false; llx = values[1].toInt(); lly = values[2].toInt(); @@ -1113,8 +1113,8 @@ bool AIParserBase::getRectangle (const char* input, int &llx, int &lly, int &urx bool AIParserBase::getPoint (const char* input, int &x, int &y) { if (input == NULL) return false; - QString s(input); - QStringList values = QStringList::split (" ", input); + TQString s(input); + TQStringList values = TQStringList::split (" ", input); if (values.size() < 3) return false; @@ -1139,20 +1139,20 @@ void AIParserBase::cleanupArrays() AIElement elem (m_stack.top()); m_stack.pop(); - const QString &oldFont = elem.toReference(); + const TQString &oldFont = elem.toReference(); AIElement elem2 (m_stack.top()); m_stack.pop(); - const QString &newFont = elem2.toReference(); + const TQString &newFont = elem2.toReference(); AIElement elem3 (m_stack.top()); m_stack.pop(); - const QValueVector encodingData = elem3.toElementArray(); + const TQValueVector encodingData = elem3.toElementArray(); if (m_textHandler) m_textHandler->gotFontEncoding (encodingData, oldFont.latin1(), newFont.latin1()); } */ -void TextHandlerBase::gotFontEncoding (const QValueVector& encodingData, const char*oldFontName, const char*newFontName) +void TextHandlerBase::gotFontEncoding (const TQValueVector& encodingData, const char*oldFontName, const char*newFontName) { qDebug ("font encoding %s to %s",oldFontName, newFontName); arraytoa (encodingData); @@ -1164,7 +1164,7 @@ void TextHandlerBase::gotFontDefinition (const char*fontName, double size, doubl qDebug ("font definition: name %s size %f leading %f kerning %f align %d", fontName, size, leading, kerning, align); } -void TextHandlerBase::gotTextBlockBegin (const QValueVector& transData, TextOperation mode) +void TextHandlerBase::gotTextBlockBegin (const TQValueVector& transData, TextOperation mode) { qDebug ("text block begin %d",mode); arraytoa (transData); @@ -1213,7 +1213,7 @@ const void elementtoa (const AIElement &/*data*/) } */ } -const void arraytoa (const QValueVector &/*data*/) +const void arraytoa (const TQValueVector &/*data*/) { /* qDebug ("array size is %d ",data.size()); if (data.size() > 0) @@ -1227,7 +1227,7 @@ const void arraytoa (const QValueVector &/*data*/) } */ } -const void stacktoa (const QValueStack &/*data*/) +const void stacktoa (const TQValueStack &/*data*/) { /* qDebug ("stack size is %d",data.size()); if (data.size() > 0) @@ -1241,7 +1241,7 @@ const void stacktoa (const QValueStack &/*data*/) qDebug (">>>>>>>>>>>>>>>>>>"); */ } -const void stacktoa2 (const QValueStack >&/*data*/) +const void stacktoa2 (const TQValueStack >&/*data*/) { /* qDebug ("stack size is %d",data.size()); diff --git a/filters/karbon/ai/aiparserbase.h b/filters/karbon/ai/aiparserbase.h index 8d2633f3..14c00a14 100644 --- a/filters/karbon/ai/aiparserbase.h +++ b/filters/karbon/ai/aiparserbase.h @@ -22,19 +22,19 @@ #include "ailexer.h" -#include -#include -#include -#include +#include +#include +#include +#include #include "aielement.h" #include "aicolor.h" -const void arraytoa (const QValueVector &data); +const void arraytoa (const TQValueVector &data); const void elementtoa (const AIElement &data); -const void stacktoa (const QValueStack &data); -const void stacktoa2 (const QValueStack >&data); +const void stacktoa (const TQValueStack &data); +const void stacktoa2 (const TQValueStack >&data); class GStateHandlerBase; class StructureHandlerBase; @@ -209,9 +209,9 @@ typedef enum { #define PatternTileFilledDefiniton "_" #define TextSizeUnknown -1 -/* typedef QValueVector ElementArray; -typedef QValueStack ElementStack; -typedef QValueStack ElementArrayStack; */ +/* typedef TQValueVector ElementArray; +typedef TQValueStack ElementStack; +typedef TQValueStack ElementArrayStack; */ typedef struct { PathElementType petype; @@ -234,19 +234,19 @@ protected: bool m_debug; private: bool m_ignoring; - QValueStack m_stack; - QValueStack > m_arrayStack; - QValueStack > m_blockStack; + TQValueStack m_stack; + TQValueStack > m_arrayStack; + TQValueStack > m_blockStack; DataSink m_sink; - QValueList m_modules; + TQValueList m_modules; ContinuationMode m_continuationMode; const double getDoubleValue(void); const int getIntValue(void); const bool getBoolValue(void); - const QString getStringValue(void); - const QString& getReferenceValue(void); - const QString getOperatorValue(void); + const TQString getStringValue(void); + const TQString& getReferenceValue(void); + const TQString getOperatorValue(void); /*Ai88*/ // void _handleSetDash(); /*Ai88*/ // void _handleGsaveIncludeDocument(); @@ -308,7 +308,7 @@ protected: void gotArrayStart (); void gotArrayEnd (); void gotByte (uchar value); - void gotByteArray (const QByteArray &data); + void gotByteArray (const TQByteArray &data); GStateHandlerBase *m_gstateHandler; StructureHandlerBase *m_structureHandler; @@ -328,7 +328,7 @@ public: AIParserBase(); ~AIParserBase(); - bool parse (QIODevice& fin); + bool parse (TQIODevice& fin); }; const void aiotoa (AIOperation &data); @@ -342,15 +342,15 @@ class GStateHandlerBase virtual void gotFillColor (AIColor &) {} virtual void gotStrokeColor (AIColor &) {} - virtual void gotFillPattern (const char *pname, double px, double py, double sx, double sy, double angle, double rf, double r, double k, double ka, const QValueVector& transformData); - virtual void gotStrokePattern (const char *pname, double px, double py, double sx, double sy, double angle, double rf, double r, double k, double ka, const QValueVector& transformData); + virtual void gotFillPattern (const char *pname, double px, double py, double sx, double sy, double angle, double rf, double r, double k, double ka, const TQValueVector& transformData); + virtual void gotStrokePattern (const char *pname, double px, double py, double sx, double sy, double angle, double rf, double r, double k, double ka, const TQValueVector& transformData); virtual void gotFlatness (double) {} virtual void gotLineWidth (double) {} virtual void gotLineCaps (int) {} virtual void gotLineJoin (int) {} virtual void gotMiterLimit (double) {} virtual void gotWindingOrder (int) {} - virtual void gotDash (const QValueVector& /*dashData*/, double /*phase*/) {} + virtual void gotDash (const TQValueVector& /*dashData*/, double /*phase*/) {} }; class StructureHandlerBase { @@ -401,7 +401,7 @@ class DocumentHandlerBase { virtual void gotTemplate (const char *) {} virtual void gotTitle (const char *) {} virtual void gotCreator (const char *) {} - virtual void gotPatternDefinition (const char */*name*/, const QValueVector& /*layerData*/, double /*llx*/, double /*lly*/, double /*urx*/, double /*ury*/) {} + virtual void gotPatternDefinition (const char */*name*/, const TQValueVector& /*layerData*/, double /*llx*/, double /*lly*/, double /*urx*/, double /*ury*/) {} virtual void gotCreationDate (const char */*val1*/,const char */*val2*/) {} virtual void gotProcessColors (int /*colors*/) {} }; @@ -420,7 +420,7 @@ class EmbeddedHandlerBase { EmbeddedHandlerBase() {} virtual ~EmbeddedHandlerBase() {} - virtual void gotGsaveIncludeDocument (const QValueVector& /*transData*/, int /*llx*/, int /*lly*/, int /*urx*/, int /*ury*/, const char*/*fileName*/) {} + virtual void gotGsaveIncludeDocument (const TQValueVector& /*transData*/, int /*llx*/, int /*lly*/, int /*urx*/, int /*ury*/, const char*/*fileName*/) {} virtual void gotGrestore () {} }; @@ -429,9 +429,9 @@ class TextHandlerBase { TextHandlerBase() {} virtual ~TextHandlerBase() {} - virtual void gotFontEncoding (const QValueVector& encodingData, const char*oldFontName, const char*newFontName); + virtual void gotFontEncoding (const TQValueVector& encodingData, const char*oldFontName, const char*newFontName); virtual void gotFontDefinition (const char*fontName, double size, double leading, double kerning, TextAlign align); - virtual void gotTextBlockBegin (const QValueVector& transData, TextOperation mode); + virtual void gotTextBlockBegin (const TQValueVector& transData, TextOperation mode); virtual void gotTextOutput (const char*text, int length=-1); virtual void gotTextBlockEnd (); }; diff --git a/filters/karbon/ai/karbonaiparserbase.cc b/filters/karbon/ai/karbonaiparserbase.cc index 8c2b5a5f..77945723 100644 --- a/filters/karbon/ai/karbonaiparserbase.cc +++ b/filters/karbon/ai/karbonaiparserbase.cc @@ -25,7 +25,7 @@ #include #include #include "aicolor.h" -#include +#include #include #include @@ -90,7 +90,7 @@ void KarbonAIParserBase::parsingFinished(){ if (m_bbox.height() > 0. ) m_document->setHeight (m_bbox.height()); -/* QWMatrix matrix; +/* TQWMatrix matrix; matrix.translate (-m_bbox.x(),-m_bbox.y()); VTransformNodes translator (matrix); @@ -101,8 +101,8 @@ void KarbonAIParserBase::parsingFinished(){ } // generic -QString KarbonAIParserBase::getParamList(Parameters& params){ - QString data(""); +TQString KarbonAIParserBase::getParamList(Parameters& params){ + TQString data(""); Parameter *param; @@ -450,7 +450,7 @@ void KarbonAIParserBase::doOutputCurrentPath2(PathOutputType type) m_curKarbonPath = new VPath( 0L ); } -bool KarbonAIParserBase::parse (QIODevice& fin, QDomDocument &doc) +bool KarbonAIParserBase::parse (TQIODevice& fin, TQDomDocument &doc) { bool res = AIParserBase::parse (fin); @@ -461,7 +461,7 @@ bool KarbonAIParserBase::parse (QIODevice& fin, QDomDocument &doc) qDebug ("before save document"); doc = m_document->saveXML(); // add paper info, we always need custom for svg (Rob) - QDomElement paper = doc.createElement( "PAPER" ); + TQDomElement paper = doc.createElement( "PAPER" ); doc.documentElement().appendChild( paper ); paper.setAttribute( "format", PG_CUSTOM ); paper.setAttribute( "width", m_document->width() ); @@ -471,7 +471,7 @@ bool KarbonAIParserBase::parse (QIODevice& fin, QDomDocument &doc) } else { - QDomDocument tempDoc; + TQDomDocument tempDoc; doc = tempDoc; } diff --git a/filters/karbon/ai/karbonaiparserbase.h b/filters/karbon/ai/karbonaiparserbase.h index 4b6f05a9..160fdc20 100644 --- a/filters/karbon/ai/karbonaiparserbase.h +++ b/filters/karbon/ai/karbonaiparserbase.h @@ -21,9 +21,9 @@ #define KARBONAIPARSERBASE_H #include -#include -#include -#include +#include +#include +#include #include "aicolor.h" @@ -34,16 +34,16 @@ #include #include #include -#include +#include -#include +#include /** *@author */ -typedef QPair Parameter; -typedef QPtrList Parameters; -typedef QPtrList PathElements; +typedef TQPair Parameter; +typedef TQPtrList Parameters; +typedef TQPtrList PathElements; typedef enum { POT_Filled = 1, POT_Stroked = 2, POT_FilledStroked = 3, POT_Clip = 4, POT_Ignore = 8, POT_Leave = -1, POT_Other = 0 } PathOutputType; typedef enum { PTT_Output = 1, PTT_Combine = 2 } PathTransferType; @@ -132,13 +132,13 @@ public: KarbonAIParserBase(); ~KarbonAIParserBase(); - bool parse (QIODevice& fin, QDomDocument &doc); + bool parse (TQIODevice& fin, TQDomDocument &doc); private: VPath *m_curKarbonPath; VDocument *m_document; VLayer *m_layer; VPath *m_combination; - QPtrStack m_groupStack; + TQPtrStack m_groupStack; FillMode m_fm; PathOutputType m_pot; @@ -171,7 +171,7 @@ protected: void parsingStarted(); void parsingFinished(); - QString getParamList(Parameters& params); + TQString getParamList(Parameters& params); void gotPathElement (PathElement &element); void gotFillPath (bool closed, bool reset, FillMode fm = FM_NonZero); diff --git a/filters/karbon/applixgraphics/applixgraphicimport.cc b/filters/karbon/applixgraphics/applixgraphicimport.cc index 2ee52685..8a433ec9 100644 --- a/filters/karbon/applixgraphics/applixgraphicimport.cc +++ b/filters/karbon/applixgraphics/applixgraphicimport.cc @@ -25,9 +25,9 @@ #endif #include -#include -#include -#include +#include +#include +#include #include #include #include @@ -115,7 +115,7 @@ applixGraphicsRect::applixGraphicsRect() : applixGraphicsLine() * * * * ******************************************************************************/ -APPLIXGRAPHICImport::APPLIXGRAPHICImport (KoFilter *, const char *, const QStringList&) : +APPLIXGRAPHICImport::APPLIXGRAPHICImport (KoFilter *, const char *, const TQStringList&) : KoFilter () { @@ -133,7 +133,7 @@ APPLIXGRAPHICImport::APPLIXGRAPHICImport (KoFilter *, const char *, const QStrin * * * * ******************************************************************************/ -KoFilter::ConversionStatus APPLIXGRAPHICImport::convert( const QCString& from, const QCString& to ) +KoFilter::ConversiontqStatus APPLIXGRAPHICImport::convert( const TQCString& from, const TQCString& to ) { // Check MIME Types @@ -141,7 +141,7 @@ KoFilter::ConversionStatus APPLIXGRAPHICImport::convert( const QCString& from, c return KoFilter::NotImplemented; // Open Inputfile - QFile in (m_chain->inputFile()); + TQFile in (m_chain->inputFile()); if (!in.open (IO_ReadOnly) ) { kdError(30502) << "Unable to open input file!" << endl; @@ -149,21 +149,21 @@ KoFilter::ConversionStatus APPLIXGRAPHICImport::convert( const QCString& from, c return KoFilter::FileNotFound; } - QString str; + TQString str; // Create karbon header str += "\n"; str += "\n"; str += " \n"; // str += " \n"; -// str += " \n"; +// str += " \n"; // str += " \n"; // str += " \n"; // str += " \n"; // str += " \n"; str += " \n"; - QTextStream stream(&in); + TQTextStream stream(&in); int step = in.size()/50; int value = 0; int i = 0; @@ -171,7 +171,7 @@ KoFilter::ConversionStatus APPLIXGRAPHICImport::convert( const QCString& from, c int pos = 0; int vers[3] = { 0, 0, 0 }; int rueck; // Check scanf inputs - QString mystr; + TQString mystr; // Read Headline mystr = stream.readLine (); @@ -186,13 +186,13 @@ KoFilter::ConversionStatus APPLIXGRAPHICImport::convert( const QCString& from, c kdDebug (s_area) << "Header not correkt - May be it is not an applixgraphics file" << endl; kdDebug (s_area) << "Headerline: " << mystr << endl; - QMessageBox::critical (0L, "Applixgraphics header problem", - QString ("The Applixgraphics header is not correct. " + TQMessageBox::critical (0L, "Applixgraphics header problem", + TQString ("The Applixgraphics header is not correct. " "May be it is not an applixgraphics file!
" - "This is the header line I did read:
%1").arg(mystr.latin1()), + "This is the header line I did read:
%1").tqarg(mystr.latin1()), "Comma"); - // i18n( "What is the separator used in this file ? First line is \n%1" ).arg(firstLine), + // i18n( "What is the separator used in this file ? First line is \n%1" ).tqarg(firstLine), return KoFilter::StupidError; } @@ -231,11 +231,11 @@ KoFilter::ConversionStatus APPLIXGRAPHICImport::convert( const QCString& from, c //mystr.remove (0, 7); - //remove_pos = mystr.find ('('); + //remove_pos = mystr.tqfind ('('); //mystr.remove (0, remove_pos); //agLine.offX= mystr.toInt(); - //remove_pos = mystr.find (','); + //remove_pos = mystr.tqfind (','); //mystr.remove (0, remove_pos); //agLine.offY= mystr.toInt(); rueck = sscanf ((const char *) mystr.latin1(), "(%d,%d)", @@ -301,16 +301,16 @@ KoFilter::ConversionStatus APPLIXGRAPHICImport::convert( const QCString& from, c str += " \n"; // str += " "; str += " \n"; // str += " "; str += " \n"; str += " \n"; str += " \n"; @@ -411,8 +411,8 @@ KoFilter::ConversionStatus APPLIXGRAPHICImport::convert( const QCString& from, c b = agLine.ptY[2] / 2; for (int i=0; i\n"; } @@ -514,9 +514,9 @@ KoFilter::ConversionStatus APPLIXGRAPHICImport::convert( const QCString& from, c // Werte in die Struktur einlagern str += " \n"; str += " \n"; @@ -672,38 +672,38 @@ KoFilter::ConversionStatus APPLIXGRAPHICImport::convert( const QCString& from, c // Werte in die Struktur einlagern str += " \n"; str += " \n"; str += " \n"; str += " \n"; str += " \n"; str += " \n"; @@ -818,7 +818,7 @@ KoFilter::ConversionStatus APPLIXGRAPHICImport::convert( const QCString& from, c return KoFilter::StorageCreationError; } - QCString cstring = str.utf8(); + TQCString cstring = str.utf8(); out->writeBlock ( (const char*)cstring, cstring.size() - 1 ); in.close (); diff --git a/filters/karbon/applixgraphics/applixgraphicimport.h b/filters/karbon/applixgraphics/applixgraphicimport.h index a65e26db..4b25471d 100644 --- a/filters/karbon/applixgraphics/applixgraphicimport.h +++ b/filters/karbon/applixgraphics/applixgraphicimport.h @@ -26,12 +26,13 @@ class APPLIXGRAPHICImport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - APPLIXGRAPHICImport (KoFilter *parent, const char *name, const QStringList&); + APPLIXGRAPHICImport (KoFilter *tqparent, const char *name, const TQStringList&); virtual ~APPLIXGRAPHICImport() {} - virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to ); }; @@ -47,7 +48,7 @@ class applixGraphicsLine int thickNess; int ptX[5]; int ptY[5]; - QString str; + TQString str; applixGraphicsLine (); // Constructor }; diff --git a/filters/karbon/eps/epsexport.cc b/filters/karbon/eps/epsexport.cc index 8ded1772..e1bd06a5 100644 --- a/filters/karbon/eps/epsexport.cc +++ b/filters/karbon/eps/epsexport.cc @@ -17,13 +17,13 @@ * Boston, MA 02110-1301, USA. */ -#include -#include -#include // For creation date/time. -#include -#include -#include -#include +#include +#include +#include // For creation date/time. +#include +#include +#include +#include #include #include @@ -82,13 +82,13 @@ protected: K_EXPORT_COMPONENT_FACTORY( libkarbonepsexport, EpsExportFactory() ) -EpsExport::EpsExport( KoFilter*, const char*, const QStringList& ) +EpsExport::EpsExport( KoFilter*, const char*, const TQStringList& ) : KoFilter(), m_exportHidden( true ) { } -KoFilter::ConversionStatus -EpsExport::convert( const QCString& from, const QCString& to ) +KoFilter::ConversiontqStatus +EpsExport::convert( const TQCString& from, const TQCString& to ) { if ( to != "image/x-eps" || from != "application/x-karbon" ) { @@ -102,12 +102,12 @@ EpsExport::convert( const QCString& from, const QCString& to ) return KoFilter::StupidError; - KoFilter::ConversionStatus status = KoFilter::OK; + KoFilter::ConversiontqStatus status = KoFilter::OK; // Ask questions about PS level etc. EpsExportDlg* dialog = new EpsExportDlg(); - QApplication::setOverrideCursor( Qt::arrowCursor ); + TQApplication::setOverrideCursor( TQt::arrowCursor ); if( dialog->exec() ) { @@ -115,20 +115,20 @@ EpsExport::convert( const QCString& from, const QCString& to ) m_psLevel = dialog->psLevel() + 1; m_exportHidden = dialog->exportHidden(); - QFile fileOut( m_chain->outputFile() ); + TQFile fileOut( m_chain->outputFile() ); if( !fileOut.open( IO_WriteOnly ) ) { - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); delete( dialog ); return KoFilter::StupidError; } - QDomDocument domIn; + TQDomDocument domIn; domIn.setContent( storeIn ); - QDomElement docNode = domIn.documentElement(); + TQDomElement docNode = domIn.documentElement(); - m_stream = new QTextStream( &fileOut ); + m_stream = new TQTextStream( &fileOut ); // Load the document. VDocument doc; @@ -146,7 +146,7 @@ EpsExport::convert( const QCString& from, const QCString& to ) status = KoFilter::UserCancelled; } - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); delete( dialog ); return status; @@ -165,11 +165,11 @@ EpsExport::visitVDocument( VDocument& document ) "%!PS-Adobe-3.0 EPSF-3.0\n" "%%BoundingBox: " << // Round down. - qRound( rect.left() - 0.5 ) << " " << - qRound( rect.top() - 0.5 ) << " " << + tqRound( rect.left() - 0.5 ) << " " << + tqRound( rect.top() - 0.5 ) << " " << // Round up. - qRound( rect.right() + 0.5 ) << " " << - qRound( rect.bottom() + 0.5 ) << "\n" << + tqRound( rect.right() + 0.5 ) << " " << + tqRound( rect.bottom() + 0.5 ) << "\n" << "%%HiResBoundingBox: " << rect.left() << " " << rect.top() << " " << @@ -184,7 +184,7 @@ EpsExport::visitVDocument( VDocument& document ) if( storeIn ) { - QDomDocument domIn; + TQDomDocument domIn; domIn.setContent( storeIn ); KoDocumentInfo docInfo; @@ -194,7 +194,7 @@ EpsExport::visitVDocument( VDocument& document ) static_cast( docInfo.page( "author" ) ); // Get creation date/time = "now". - QDateTime now( QDateTime::currentDateTime() ); + TQDateTime now( TQDateTime::tqcurrentDateTime() ); *m_stream << "%%CreationDate: (" << now.toString( Qt::LocalDate ) << ")\n" @@ -333,10 +333,10 @@ EpsExport::getStroke( const VStroke& stroke ) // Dash pattern. *m_stream << "["; - const QValueList& + const TQValueList& array( stroke.dashPattern().array() ); - QValueListConstIterator itr = array.begin(); + TQValueListConstIterator itr = array.begin(); for( ; itr != array.end(); ++itr ) *m_stream << *itr << " "; @@ -385,7 +385,7 @@ EpsExport::getFill( const VFill& fill ) *m_stream << l1_gsave << " "; VGradient grad = fill.gradient(); - QPtrVector ramp = grad.colorStops(); + TQPtrVector ramp = grad.colorStops(); if( ramp.size() < 2 ) { if( ramp.size() == 1 ) diff --git a/filters/karbon/eps/epsexport.h b/filters/karbon/eps/epsexport.h index b2dd4919..939887c9 100644 --- a/filters/karbon/eps/epsexport.h +++ b/filters/karbon/eps/epsexport.h @@ -25,7 +25,7 @@ #include "vvisitor.h" -class QTextStream; +class TQTextStream; class VColor; class VPath; class VDocument; @@ -40,12 +40,13 @@ class VText; class EpsExport : public KoFilter, private VVisitor { Q_OBJECT + TQ_OBJECT public: - EpsExport( KoFilter* parent, const char* name, const QStringList& ); + EpsExport( KoFilter* tqparent, const char* name, const TQStringList& ); virtual ~EpsExport() {} - virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to ); private: virtual void visitVPath( VPath& composite ); @@ -61,7 +62,7 @@ private: bool isVisible( const VObject* object ) const; - QTextStream* m_stream; + TQTextStream* m_stream; uint m_psLevel; bool m_exportHidden; diff --git a/filters/karbon/eps/epsexportdlg.cc b/filters/karbon/eps/epsexportdlg.cc index 2fb34e14..df51b95b 100644 --- a/filters/karbon/eps/epsexportdlg.cc +++ b/filters/karbon/eps/epsexportdlg.cc @@ -17,11 +17,11 @@ * Boston, MA 02110-1301, USA. */ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -29,20 +29,20 @@ #include "epsexportdlg.h" -EpsExportDlg::EpsExportDlg( QWidget* parent, const char* name ) - : KDialogBase( parent, name, true, i18n( "EPS Export" ), Ok | Cancel ) +EpsExportDlg::EpsExportDlg( TQWidget* tqparent, const char* name ) + : KDialogBase( tqparent, name, true, i18n( "EPS Export" ), Ok | Cancel ) { - QVBox* page = makeVBoxMainWidget(); + TQVBox* page = makeVBoxMainWidget(); - m_psLevelButtons = new QButtonGroup( 1, QGroupBox::Horizontal, + m_psLevelButtons = new TQButtonGroup( 1, Qt::Horizontal, i18n( "Options" ), page ); - QRadioButton* radio; - radio = new QRadioButton( i18n( "PostScript level 1" ), m_psLevelButtons ); - radio = new QRadioButton( i18n( "PostScript level 2" ), m_psLevelButtons ); - radio = new QRadioButton( i18n( "PostScript level 3" ), m_psLevelButtons ); + TQRadioButton* radio; + radio = new TQRadioButton( i18n( "PostScript level 1" ), m_psLevelButtons ); + radio = new TQRadioButton( i18n( "PostScript level 2" ), m_psLevelButtons ); + radio = new TQRadioButton( i18n( "PostScript level 3" ), m_psLevelButtons ); - m_hiddenExport = new QCheckBox( i18n( "Export hidden layers" ), page ); + m_hiddenExport = new TQCheckBox( i18n( "Export hidden layers" ), page ); m_hiddenExport->setChecked( true ); m_psLevelButtons->setRadioButtonExclusive( true ); diff --git a/filters/karbon/eps/epsexportdlg.h b/filters/karbon/eps/epsexportdlg.h index 332ca882..6850fc97 100644 --- a/filters/karbon/eps/epsexportdlg.h +++ b/filters/karbon/eps/epsexportdlg.h @@ -23,21 +23,22 @@ #include -class QButtonGroup; -class QCheckBox; +class TQButtonGroup; +class TQCheckBox; class EpsExportDlg : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - EpsExportDlg( QWidget* parent = 0L, const char* name = 0L ); + EpsExportDlg( TQWidget* tqparent = 0L, const char* name = 0L ); uint psLevel() const; bool exportHidden() const; private: - QButtonGroup* m_psLevelButtons; - QCheckBox* m_hiddenExport; + TQButtonGroup* m_psLevelButtons; + TQCheckBox* m_hiddenExport; }; #endif diff --git a/filters/karbon/eps/epsimport.cc b/filters/karbon/eps/epsimport.cc index 2ff34a94..0fefb3e0 100644 --- a/filters/karbon/eps/epsimport.cc +++ b/filters/karbon/eps/epsimport.cc @@ -17,9 +17,9 @@ * Boston, MA 02110-1301, USA. */ -#include -#include -#include +#include +#include +#include #include #include @@ -48,7 +48,7 @@ protected: K_EXPORT_COMPONENT_FACTORY( libkarbonepsimport, EpsImportFactory() ) -EpsImport::EpsImport( KoFilter*, const char*, const QStringList& ) +EpsImport::EpsImport( KoFilter*, const char*, const TQStringList& ) : KoFilter() { } @@ -57,8 +57,8 @@ EpsImport::~EpsImport() { } -KoFilter::ConversionStatus -EpsImport::convert( const QCString& from, const QCString& to ) +KoFilter::ConversiontqStatus +EpsImport::convert( const TQCString& from, const TQCString& to ) { if( to != "application/illustrator" || @@ -70,18 +70,18 @@ EpsImport::convert( const QCString& from, const QCString& to ) } // Copy input filename: - QString input = m_chain->inputFile(); + TQString input = m_chain->inputFile(); // EPS original bounding box int llx = -1, lly = -1, urx = -1, ury = -1; BoundingBoxExtractor extractor; - QFile file (input); + TQFile file (input); if ( file.open(IO_ReadOnly) ) { - extractor.parse (file); + extractor.parse (*TQT_TQIODEVICE(&file)); llx = extractor.llx(); lly = extractor.lly(); urx = extractor.urx(); @@ -92,11 +92,11 @@ EpsImport::convert( const QCString& from, const QCString& to ) qDebug ("file could not be opened"); // sed filter - QString sedFilter = QString ("sed -e \"s/%%BoundingBox: 0 0 612 792/%%BoundingBox: %1 %2 %3 %4/g\""). - arg(llx).arg(lly).arg(urx).arg(ury); + TQString sedFilter = TQString ("sed -e \"s/%%BoundingBox: 0 0 612 792/%%BoundingBox: %1 %2 %3 %4/g\""). + tqarg(llx).tqarg(lly).tqarg(urx).tqarg(ury); // Build ghostscript call to convert ps/eps -> ai: - QString command( + TQString command( "gs -q -P- -dBATCH -dNOPAUSE -dSAFER -dPARANOIDSAFER -dNODISPLAY ps2ai.ps "); command += KProcess::quote(input); command += " | "; @@ -104,10 +104,10 @@ EpsImport::convert( const QCString& from, const QCString& to ) command += " > "; command += KProcess::quote(m_chain->outputFile()); - qDebug ("command to execute is (%s)", QFile::encodeName(command).data()); + qDebug ("command to execute is (%s)", TQFile::encodeName(command).data()); // Execute it: - if( !system( QFile::encodeName(command)) ) + if( !system( TQFile::encodeName(command)) ) return KoFilter::OK; else return KoFilter::StupidError; diff --git a/filters/karbon/eps/epsimport.h b/filters/karbon/eps/epsimport.h index 15673297..f5e17dfb 100644 --- a/filters/karbon/eps/epsimport.h +++ b/filters/karbon/eps/epsimport.h @@ -20,22 +20,23 @@ #ifndef __EPSIMPORT_H__ #define __EPSIMPORT_H__ -#include +#include #include -class QDomElement; -class QTextStream; +class TQDomElement; +class TQTextStream; class EpsImport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - EpsImport( KoFilter* parent, const char* name, const QStringList& ); + EpsImport( KoFilter* tqparent, const char* name, const TQStringList& ); virtual ~EpsImport(); - virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to ); }; #endif diff --git a/filters/karbon/eps/pscommentlexer.cc b/filters/karbon/eps/pscommentlexer.cc index 46d993dc..dc0a67a1 100644 --- a/filters/karbon/eps/pscommentlexer.cc +++ b/filters/karbon/eps/pscommentlexer.cc @@ -19,7 +19,7 @@ #include #include -#include +#include #include "pscommentlexer.h" #define CATEGORY_WHITESPACE -1 @@ -82,7 +82,7 @@ PSCommentLexer::PSCommentLexer(){ PSCommentLexer::~PSCommentLexer(){ } -bool PSCommentLexer::parse (QIODevice& fin){ +bool PSCommentLexer::parse (TQIODevice& fin){ char c; m_buffer.clear(); @@ -249,8 +249,8 @@ void StringBuffer::clear(){ m_length = 0; } -QString StringBuffer::toString() const { - QString ret(m_buffer); +TQString StringBuffer::toString() const { + TQString ret(m_buffer); return ret; } @@ -273,12 +273,12 @@ uint StringBuffer::length() { } double StringBuffer::toFloat() { - QString data = toString(); + TQString data = toString(); return data.toFloat(); } int StringBuffer::toInt() { - QString data = toString(); + TQString data = toString(); return data.toInt(); } @@ -286,8 +286,8 @@ const char *StringBuffer::latin1() { return m_buffer; } -QString StringBuffer::mid( uint index, uint len) const { - QString data = toString(); +TQString StringBuffer::mid( uint index, uint len) const { + TQString data = toString(); return data.mid(index,len); } @@ -297,8 +297,8 @@ BoundingBoxExtractor::~BoundingBoxExtractor() {} void BoundingBoxExtractor::gotComment (const char *value) { - QString data (value); - if (data.find("%BoundingBox:")==-1) return; + TQString data (value); + if (data.tqfind("%BoundingBox:")==-1) return; getRectangle (value, m_llx, m_lly, m_urx, m_ury); } @@ -307,11 +307,11 @@ bool BoundingBoxExtractor::getRectangle (const char* input, int &llx, int &lly, { if (input == NULL) return false; - QString s(input); - if (s.contains ("(atend)")) return false; + TQString s(input); + if (s.tqcontains ("(atend)")) return false; - QString s2 = s.remove("%BoundingBox:"); - QStringList values = QStringList::split (" ", s2.latin1()); + TQString s2 = s.remove("%BoundingBox:"); + TQStringList values = TQStringList::split (" ", s2.latin1()); qDebug("size is %d",values.size()); // if (values.size() < 5) return false; llx = values[0].toInt(); diff --git a/filters/karbon/eps/pscommentlexer.h b/filters/karbon/eps/pscommentlexer.h index bf155211..f5893c75 100644 --- a/filters/karbon/eps/pscommentlexer.h +++ b/filters/karbon/eps/pscommentlexer.h @@ -20,8 +20,8 @@ #ifndef PSCOMMENTLEXER_H #define PSCOMMENTLEXER_H -#include -#include +#include +#include /** *@author Dirk Schönberger @@ -52,12 +52,12 @@ public: void append (char c); void clear(); - QString toString() const; + TQString toString() const; uint length(); double toFloat(); int toInt(); const char *latin1(); - QString mid( uint index, uint len=0xffffffff) const; + TQString mid( uint index, uint len=0xffffffff) const; private: char *m_buffer; uint m_length; @@ -71,7 +71,7 @@ public: PSCommentLexer(); virtual ~PSCommentLexer(); - virtual bool parse (QIODevice& fin); + virtual bool parse (TQIODevice& fin); private: State m_curState; StringBuffer m_buffer; diff --git a/filters/karbon/kontour/kontourimport.cpp b/filters/karbon/kontour/kontourimport.cpp index 88d2fc4b..a260fd50 100644 --- a/filters/karbon/kontour/kontourimport.cpp +++ b/filters/karbon/kontour/kontourimport.cpp @@ -1,5 +1,5 @@ /* This file is part of the KDE project - Copyright (C) 2002, Sven Lüppken + Copyright (C) 2002, Sven L�ppken This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public @@ -30,15 +30,15 @@ #include #include #include -#include -#include +#include +#include #define DPI 90 typedef KGenericFactory KontourImportFactory; K_EXPORT_COMPONENT_FACTORY( libkarbonkontourimport, KontourImportFactory( "kofficefilters" ) ) -KontourImport::KontourImport(KoFilter *, const char *, const QStringList&) : +KontourImport::KontourImport(KoFilter *, const char *, const TQStringList&) : KoFilter(), outdoc( "DOC" ) { @@ -49,7 +49,7 @@ KontourImport::~KontourImport() } -KoFilter::ConversionStatus KontourImport::convert(const QCString& from, const QCString& to) +KoFilter::ConversiontqStatus KontourImport::convert(const TQCString& from, const TQCString& to) { // check for proper conversion if ( to != "application/x-karbon" || ( from != "application/x-kontour" && from != "application/x-killustrator") ) @@ -74,14 +74,14 @@ KoFilter::ConversionStatus KontourImport::convert(const QCString& from, const QC kdError(30502) << "Unable to open output file!" << endl; return KoFilter::StorageCreationError; } - QCString cstring = outdoc.toCString(); // utf-8 already + TQCString cstring = outdoc.toCString(); // utf-8 already out->writeBlock( cstring.data(), cstring.length() ); return KoFilter::OK; // was successful } void -KontourImport::parseGObject( VObject *object, const QDomElement &e ) +KontourImport::parseGObject( VObject *object, const TQDomElement &e ) { if( !e.attribute( "fillstyle" ).isEmpty() ) { @@ -92,7 +92,7 @@ KontourImport::parseGObject( VObject *object, const QDomElement &e ) case 1: { fill.setType( VFill::solid ); - QColor c; + TQColor c; c.setNamedColor( e.attribute( "fillcolor" ) ); VColor color( c ); fill.setColor( color ); @@ -103,7 +103,7 @@ KontourImport::parseGObject( VObject *object, const QDomElement &e ) VGradient grad; // set color stops grad.clearStops(); - QColor c; + TQColor c; c.setNamedColor( e.attribute( "gradcolor1" ) ); VColor color( c ); grad.addStop( color, 0.0, 0.5 ); @@ -132,7 +132,7 @@ KontourImport::parseGObject( VObject *object, const QDomElement &e ) break; case 1: { - QColor c; + TQColor c; c.setNamedColor( e.attribute( "strokecolor" ) ); VColor color( c ); stroke.setColor( color ); @@ -140,12 +140,12 @@ KontourImport::parseGObject( VObject *object, const QDomElement &e ) break; case 2: case 3: case 4: case 5: { - QColor c; + TQColor c; c.setNamedColor( e.attribute( "strokecolor" ) ); VColor color( c ); stroke.setColor( color ); VDashPattern dash; - QValueList list; + TQValueList list; switch ( strokestyle ) { case 2: // dashed line @@ -172,8 +172,8 @@ KontourImport::parseGObject( VObject *object, const QDomElement &e ) object->setStroke( stroke ); } // handle matrix - QDomElement matrix = e.namedItem( "matrix" ).toElement(); - QWMatrix mat( matrix.attribute( "m11" ).toDouble(), + TQDomElement matrix = e.namedItem( "matrix" ).toElement(); + TQWMatrix mat( matrix.attribute( "m11" ).toDouble(), matrix.attribute( "m12" ).toDouble(), matrix.attribute( "m21" ).toDouble(), matrix.attribute( "m22" ).toDouble(), @@ -191,15 +191,15 @@ KontourImport::parseGObject( VObject *object, const QDomElement &e ) void KontourImport::convert() { - QDomElement docElem = inpdoc.documentElement(); - QDomElement lay; + TQDomElement docElem = inpdoc.documentElement(); + TQDomElement lay; double height; double width; if( docElem.attribute( "version" ).toInt() == 2 ) { lay = docElem; - height = lay.firstChild().namedItem( "layout" ).toElement().attribute( "height" ).toDouble(); - width = lay.firstChild().namedItem( "layout" ).toElement().attribute( "width" ).toDouble(); + height = lay.firstChild().namedItem( "tqlayout" ).toElement().attribute( "height" ).toDouble(); + width = lay.firstChild().namedItem( "tqlayout" ).toElement().attribute( "width" ).toDouble(); } else { @@ -217,9 +217,9 @@ KontourImport::convert() } void -KontourImport::parseGroup( const QDomElement &e ) +KontourImport::parseGroup( const TQDomElement &e ) { - QDomElement b = e; + TQDomElement b = e; for( ; !b.isNull(); b = b.nextSibling().toElement() ) { if ( b.tagName() == "rectangle" ) @@ -229,15 +229,15 @@ KontourImport::parseGroup( const QDomElement &e ) int width = b.attribute( "width" ).toInt(); int height = b.attribute( "height" ).toInt(); VObject *rect = new VRectangle( 0L, KoPoint( x, height + y ) , width, height ); - QDomElement object = b.namedItem( "polyline" ).namedItem( "gobject" ).toElement(); + TQDomElement object = b.namedItem( "polyline" ).namedItem( "gobject" ).toElement(); parseGObject( rect, object ); m_document.append( rect ); } else if ( b.tagName() == "ellipse" ) { - QDomElement object = b.namedItem( "gobject" ).toElement(); - QDomElement matrix = object.namedItem( "matrix" ).toElement(); + TQDomElement object = b.namedItem( "gobject" ).toElement(); + TQDomElement matrix = object.namedItem( "matrix" ).toElement(); /** * Kontour uses a quite different way to display ellipses, so we * need to calculate the values for the Karbon ellipse here @@ -259,7 +259,7 @@ KontourImport::parseGroup( const QDomElement &e ) * Kontour is much simpler because it doesn't support curves, so * we're done with connecting points with lines. */ - QDomElement point = b.firstChild().toElement(); + TQDomElement point = b.firstChild().toElement(); VPath *path = new VPath( &m_document ); double x, y; x = point.attribute( "x" ).toDouble(); @@ -277,7 +277,7 @@ KontourImport::parseGroup( const QDomElement &e ) } else if( b.tagName() == "polygon" ) { - QDomElement point = b.namedItem( "polyline" ).firstChild().toElement(); + TQDomElement point = b.namedItem( "polyline" ).firstChild().toElement(); VPath *path = new VPath( &m_document ); double x, y; x = point.attribute( "x" ).toDouble(); @@ -297,7 +297,7 @@ KontourImport::parseGroup( const QDomElement &e ) } else if( b.tagName() == "bezier" ) { - QDomElement point = b.namedItem( "polyline" ).firstChild().toElement(); + TQDomElement point = b.namedItem( "polyline" ).firstChild().toElement(); VPath *path = new VPath( &m_document ); double x, y; x = point.attribute( "x" ).toDouble(); diff --git a/filters/karbon/kontour/kontourimport.h b/filters/karbon/kontour/kontourimport.h index f227f908..9e9bc85a 100644 --- a/filters/karbon/kontour/kontourimport.h +++ b/filters/karbon/kontour/kontourimport.h @@ -21,27 +21,28 @@ #define __KONTOURIMPORT_H__ #include -#include +#include #include class KontourImport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - KontourImport(KoFilter *parent, const char *name, const QStringList&); + KontourImport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~KontourImport(); - virtual KoFilter::ConversionStatus convert(const QCString& from, const QCString& to); + virtual KoFilter::ConversiontqStatus convert(const TQCString& from, const TQCString& to); protected: - QDomDocument inpdoc; - QDomDocument outdoc; + TQDomDocument inpdoc; + TQDomDocument outdoc; void convert(); private: - void parseGObject( VObject *, const QDomElement & ); - void parseGroup( const QDomElement & ); + void parseGObject( VObject *, const TQDomElement & ); + void parseGroup( const TQDomElement & ); VDocument m_document; }; diff --git a/filters/karbon/msod/msod.cc b/filters/karbon/msod/msod.cc index dd848c83..ab48642d 100644 --- a/filters/karbon/msod/msod.cc +++ b/filters/karbon/msod/msod.cc @@ -21,12 +21,12 @@ DESCRIPTION */ #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include @@ -39,20 +39,20 @@ Msod::Msod( m_dpi = dpi; m_images.setAutoDelete(true); m_opt = new Options(*this); - m_shape.data = 0L; - m_shape.length = 0; + m_tqshape.data = 0L; + m_tqshape.length = 0; } Msod::~Msod() { - delete [] m_shape.data; + delete [] m_tqshape.data; delete m_opt; } void Msod::drawShape( - unsigned shapeType, - Q_UINT32 bytes, - QDataStream &operands) + unsigned tqshapeType, + TQ_UINT32 bytes, + TQDataStream &operands) { static const char *funcTab[] = { @@ -77,7 +77,7 @@ void Msod::drawShape( "SEAL", // Seal "ARC", // Arc "LINE", // Line - "PLAQUE", // Plaque + "PLATQUE", // Plaque "CAN", // Can "DONUT", // Donut "TEXTSIMPLE", // Textsimple @@ -132,14 +132,14 @@ void Msod::drawShape( "LIGHTNINGBOLT", // Lightningbolt "HEART", // Heart "PICTUREFRAME", // PictureFrame - "QUADARROW", // Quadarrow + "TQUADARROW", // Quadarrow "LEFTARROWCALLOUT", // Leftarrowcallout "RIGHTARROWCALLOUT", // Rightarrowcallout "UPARROWCALLOUT", // Uparrowcallout "DOWNARROWCALLOUT", // Downarrowcallout "LEFTRIGHTARROWCALLOUT", // Leftrightarrowcallout "UPDOWNARROWCALLOUT", // Updownarrowcallout - "QUADARROWCALLOUT", // Quadarrowcallout + "TQUADARROWCALLOUT", // Quadarrowcallout "BEVEL", // Bevel "LEFTBRACKET", // Leftbracket "RIGHTBRACKET", // Rightbracket @@ -153,8 +153,8 @@ void Msod::drawShape( "NOTCHEDRIGHTARROW", // Notchedrightarrow "BLOCKARC", // Blockarc "SMILEYFACE", // Smileyface - "VERTICALSCROLL", // Verticalscroll - "HORIZONTALSCROLL", // Horizontalscroll + "VERTICALSCROLL", //Qt::Verticalscroll + "HORIZONTALSCROLL", //Qt::Horizontalscroll "CIRCULARARROW", // Circulararrow "NOTCHEDCIRCULARARROW", // Notchedcirculararrow "UTURNARROW", // Uturnarrow @@ -262,26 +262,26 @@ void Msod::drawShape( }; struct { - Q_UINT32 spid; // The shape id + TQ_UINT32 spid; // The tqshape id union { - Q_UINT32 info; + TQ_UINT32 info; struct { - Q_UINT32 fGroup : 1; // This shape is a group shape - Q_UINT32 fChild : 1; // Not a top-level shape - Q_UINT32 fPatriarch : 1; // This is the topmost group shape. + TQ_UINT32 fGroup : 1; // This tqshape is a group tqshape + TQ_UINT32 fChild : 1; // Not a top-level tqshape + TQ_UINT32 fPatriarch : 1; // This is the topmost group tqshape. // Exactly one of these per drawing. - Q_UINT32 fDeleted : 1; // The shape has been deleted - Q_UINT32 fOleShape : 1; // The shape is an OLE object - Q_UINT32 fHaveMaster : 1; // Shape has a hspMaster property - Q_UINT32 fFlipH : 1; // Shape is flipped horizontally - Q_UINT32 fFlipV : 1; // Shape is flipped vertically - Q_UINT32 fConnector : 1; // Connector type of shape - Q_UINT32 fHaveAnchor : 1; // Shape has an anchor of some kind - Q_UINT32 fBackground : 1; // Background shape - Q_UINT32 fHaveSpt : 1; // Shape has a shape type property - Q_UINT32 reserved : 20; // Not yet used + TQ_UINT32 fDeleted : 1; // The shape.has been deleted + TQ_UINT32 fOleShape : 1; // The tqshape is an OLE object + TQ_UINT32 fHaveMaster : 1; // Shape has a hspMaster property + TQ_UINT32 fFlipH : 1; // Shape is flipped horizontally + TQ_UINT32 fFlipV : 1; // Shape is flipped vertically + TQ_UINT32 fConnector : 1; // Connector type of tqshape + TQ_UINT32 fHaveAnchor : 1; // Shape has an anchor of some kind + TQ_UINT32 fBackground : 1; // Background tqshape + TQ_UINT32 fHaveSpt : 1; // Shape has a tqshape type property + TQ_UINT32 reserved : 20; // Not yet used } fields; } grfPersistent; } data; @@ -291,12 +291,12 @@ void Msod::drawShape( operands >> data.spid; operands >> data.grfPersistent.info; bytes -= 8; - kdDebug(s_area) << "shape-id: " << data.spid << " type: " << funcTab[shapeType] << " (" << shapeType << ")" << + kdDebug(s_area) << "tqshape-id: " << data.spid << " type: " << funcTab[tqshapeType] << " (" << tqshapeType << ")" << (data.grfPersistent.fields.fGroup ? " group" : "") << (data.grfPersistent.fields.fChild ? " child" : "") << (data.grfPersistent.fields.fPatriarch ? " patriarch" : "") << (data.grfPersistent.fields.fDeleted ? " deleted" : "") << - (data.grfPersistent.fields.fOleShape ? " oleshape" : "") << + (data.grfPersistent.fields.fOleShape ? " oletqshape" : "") << (data.grfPersistent.fields.fHaveMaster ? " master" : "") << (data.grfPersistent.fields.fFlipH ? " flipv" : "") << (data.grfPersistent.fields.fConnector ? " connector" : "") << @@ -309,9 +309,9 @@ void Msod::drawShape( if ((!m_isRequiredDrawing) && (m_requestedShapeId != data.spid)) return; - // An active shape! Let's draw it... + // An active tqshape! Let's draw it... - switch (shapeType) + switch (tqshapeType) { case 0: if (m_opt->m_pVertices) @@ -322,14 +322,14 @@ void Msod::drawShape( case 1: if (bytes > 7) { - QPoint topLeft; - QSize size; + TQPoint topLeft; + TQSize size; topLeft = normalisePoint(operands); size = normaliseSize(operands); - QRect rect(topLeft, size); - QPointArray points(4); + TQRect rect(topLeft, size); + TQPointArray points(4); points.setPoint(0, topLeft); points.setPoint(1, rect.topRight()); @@ -340,12 +340,12 @@ void Msod::drawShape( case 20: if (bytes > 7) { - QPoint lineFrom; - QPoint lineTo; + TQPoint lineFrom; + TQPoint lineTo; lineTo = normalisePoint(operands); - QPointArray points(2); + TQPointArray points(2); points.setPoint(0, lineFrom); points.setPoint(1, lineTo); @@ -359,15 +359,15 @@ void Msod::drawShape( void Msod::invokeHandler( Header &op, - Q_UINT32 bytes, - QDataStream &operands) + TQ_UINT32 bytes, + TQDataStream &operands) { - typedef void (Msod::*method)(Header &op, Q_UINT32 bytes, QDataStream &operands); + typedef void (Msod::*method)(Header &op, TQ_UINT32 bytes, TQDataStream &operands); typedef struct { const char *name; - Q_UINT16 opcode; + TQ_UINT16 opcode; method handler; } opcodeEntry; @@ -432,7 +432,7 @@ void Msod::invokeHandler( " operands: " << bytes << endl; else kdWarning(s_area) << "invokeHandler: unsupported opcode: 0x" << - QString::number(op.opcode.fields.fbt, 16) << + TQString::number(op.opcode.fields.fbt, 16) << " operands: " << bytes << endl; // Skip data we cannot use. @@ -452,19 +452,19 @@ void Msod::invokeHandler( if (bytes) { - QByteArray *record = new QByteArray(bytes); - QDataStream *body; + TQByteArray *record = new TQByteArray(bytes); + TQDataStream *body; operands.readRawBytes(record->data(), bytes); - body = new QDataStream(*record, IO_ReadOnly); - body->setByteOrder(QDataStream::LittleEndian); + body = new TQDataStream(*record, IO_ReadOnly); + body->setByteOrder(TQDataStream::LittleEndian); (this->*result)(op, bytes, *body); delete body; delete record; } else { - QDataStream *body = new QDataStream(); + TQDataStream *body = new TQDataStream(); (this->*result)(op, bytes, *body); delete body; @@ -472,52 +472,52 @@ void Msod::invokeHandler( } } -QPoint Msod::normalisePoint( - QDataStream &operands) +TQPoint Msod::normalisePoint( + TQDataStream &operands) { - Q_UINT16 x; - Q_UINT16 y; + TQ_UINT16 x; + TQ_UINT16 y; operands >> x >> y; - return QPoint(x / m_dpi, y / m_dpi); + return TQPoint(x / m_dpi, y / m_dpi); } -QSize Msod::normaliseSize( - QDataStream &operands) +TQSize Msod::normaliseSize( + TQDataStream &operands) { - Q_UINT16 width; - Q_UINT16 height; + TQ_UINT16 width; + TQ_UINT16 height; operands >> width >> height; - return QSize(width / m_dpi, height / m_dpi); + return TQSize(width / m_dpi, height / m_dpi); } bool Msod::parse( - unsigned shapeId, - const QString &file, + unsigned tqshapeId, + const TQString &file, const char *delayStream) { - QFile in(file); + TQFile in(file); if (!in.open(IO_ReadOnly)) { kdError(s_area) << "Unable to open input file!" << endl; in.close(); return false; } - QDataStream stream(&in); - bool result = parse(shapeId, stream, in.size(), delayStream); + TQDataStream stream(&in); + bool result = parse(tqshapeId, stream, in.size(), delayStream); in.close(); return result; } bool Msod::parse( - unsigned shapeId, - QDataStream &stream, + unsigned tqshapeId, + TQDataStream &stream, unsigned size, const char *delayStream) { - stream.setByteOrder(QDataStream::LittleEndian); // Great, I love Qt ! - m_requestedShapeId = shapeId; + stream.setByteOrder(TQDataStream::LittleEndian); // Great, I love TQt ! + m_requestedShapeId = tqshapeId; m_isRequiredDrawing = false; m_delayStream = delayStream; @@ -529,26 +529,26 @@ bool Msod::parse( void Msod::opAlignrule( Header &, - Q_UINT32, - QDataStream &) + TQ_UINT32, + TQDataStream &) { } void Msod::opAnchor( Header &, - Q_UINT32, - QDataStream &) + TQ_UINT32, + TQDataStream &) { } void Msod::opArcrule( Header &, - Q_UINT32, - QDataStream &) + TQ_UINT32, + TQDataStream &) { } -void Msod::opBlip(Header &, Q_UINT32 bytes, QDataStream &operands) +void Msod::opBlip(Header &, TQ_UINT32 bytes, TQDataStream &operands) { typedef enum { @@ -568,25 +568,25 @@ void Msod::opBlip(Header &, Q_UINT32 bytes, QDataStream &operands) } MSOBLIPCOMPRESSION; bool hasPrimaryId; - Q_UINT32 length = 0; + TQ_UINT32 length = 0; struct { - Q_UINT32 cb; + TQ_UINT32 cb; struct { - Q_UINT32 x; - Q_UINT32 y; - Q_UINT32 w; - Q_UINT32 h; + TQ_UINT32 x; + TQ_UINT32 y; + TQ_UINT32 w; + TQ_UINT32 h; } bounds; struct { - Q_UINT32 w; - Q_UINT32 h; + TQ_UINT32 w; + TQ_UINT32 h; } ptSize; - Q_UINT32 cbSave; - Q_UINT8 compression; - Q_UINT8 filter; + TQ_UINT32 cbSave; + TQ_UINT8 compression; + TQ_UINT8 filter; } data; // Skip any explicit primary header (m_rgbUidprimary). @@ -684,7 +684,7 @@ void Msod::opBlip(Header &, Q_UINT32 bytes, QDataStream &operands) int result; tmp = new char[data.cb]; - result = uncompress((Q_UINT8 *)tmp, &destLen, (Q_UINT8 *)image->data, image->length); + result = uncompress((TQ_UINT8 *)tmp, &destLen, (TQ_UINT8 *)image->data, image->length); if (result != Z_OK) { kdError(s_area) << "opBlip: uncompress failed: " << result << endl; @@ -703,21 +703,21 @@ void Msod::opBlip(Header &, Q_UINT32 bytes, QDataStream &operands) // FBSE - File Blip Store Entry -void Msod::opBse(Header &op, Q_UINT32, QDataStream &operands) +void Msod::opBse(Header &op, TQ_UINT32, TQDataStream &operands) { struct { - Q_UINT8 btWin32; // Required type on Win32. - Q_UINT8 btMacOS; // Required type on Mac. - Q_UINT8 rgbUid[16]; // Identifier of blip. - Q_UINT16 tag; // currently unused. - Q_UINT32 size; // Blip size in stream. - Q_UINT32 cRef; // Reference count on the blip. - Q_UINT32 foDelay; // File offset in the delay stream. - Q_UINT8 usage; // How this blip is used (MSOBLIPUSAGE). - Q_UINT8 cbName; // length of the blip name. - Q_UINT8 unused2; // for the future. - Q_UINT8 unused3; // for the future. + TQ_UINT8 btWin32; // Required type on Win32. + TQ_UINT8 btMacOS; // Required type on Mac. + TQ_UINT8 rgbUid[16]; // Identifier of blip. + TQ_UINT16 tag; // currently unused. + TQ_UINT32 size; // Blip size in stream. + TQ_UINT32 cRef; // Reference count on the blip. + TQ_UINT32 foDelay; // File offset in the delay stream. + TQ_UINT8 usage; // How this blip is used (MSOBLIPUSAGE). + TQ_UINT8 cbName; // length of the blip name. + TQ_UINT8 unused2; // for the future. + TQ_UINT8 unused3; // for the future. } data; unsigned i; @@ -743,10 +743,10 @@ void Msod::opBse(Header &op, Q_UINT32, QDataStream &operands) if (data.size && data.cRef) { - QByteArray bytes; + TQByteArray bytes; bytes.setRawData(m_delayStream + data.foDelay, data.size); - QDataStream stream(bytes, IO_ReadOnly); - stream.setByteOrder(QDataStream::LittleEndian); + TQDataStream stream(bytes, IO_ReadOnly); + stream.setByteOrder(TQDataStream::LittleEndian); walk(data.size, stream); bytes.resetRawData(m_delayStream + data.foDelay, data.size); } @@ -758,41 +758,41 @@ void Msod::opBse(Header &op, Q_UINT32, QDataStream &operands) } } -void Msod::opBstorecontainer(Header &, Q_UINT32 bytes, QDataStream &operands) +void Msod::opBstorecontainer(Header &, TQ_UINT32 bytes, TQDataStream &operands) { walk(bytes, operands); } void Msod::opCalloutrule( Header &, - Q_UINT32, - QDataStream &) + TQ_UINT32, + TQDataStream &) { } void Msod::opChildanchor( Header &, - Q_UINT32, - QDataStream &) + TQ_UINT32, + TQDataStream &) { } -void Msod::opClientanchor(Header &, Q_UINT32, QDataStream &operands) +void Msod::opClientanchor(Header &, TQ_UINT32, TQDataStream &operands) { struct { - Q_UINT32 unknown; + TQ_UINT32 unknown; } data; operands >> data.unknown; kdDebug(s_area) << "client anchor: " << data.unknown << endl; } -void Msod::opClientdata(Header &, Q_UINT32, QDataStream &operands) +void Msod::opClientdata(Header &, TQ_UINT32, TQDataStream &operands) { struct { - Q_UINT32 unknown; + TQ_UINT32 unknown; } data; operands >> data.unknown; @@ -801,61 +801,61 @@ void Msod::opClientdata(Header &, Q_UINT32, QDataStream &operands) void Msod::opClientrule( Header &, - Q_UINT32, - QDataStream &) + TQ_UINT32, + TQDataStream &) { } void Msod::opClienttextbox( Header &, - Q_UINT32, - QDataStream &operands) + TQ_UINT32, + TQDataStream &operands) { struct { - Q_UINT32 unknown; + TQ_UINT32 unknown; } data; operands >> data.unknown; - kdDebug(s_area) << "client textbox: 0x" << QString::number(data.unknown,16) << endl; + kdDebug(s_area) << "client textbox: 0x" << TQString::number(data.unknown,16) << endl; } void Msod::opClsid( Header &, - Q_UINT32, - QDataStream &) + TQ_UINT32, + TQDataStream &) { } void Msod::opColormru( Header &, - Q_UINT32, - QDataStream &) + TQ_UINT32, + TQDataStream &) { } void Msod::opConnectorrule( Header &, - Q_UINT32, - QDataStream &) + TQ_UINT32, + TQDataStream &) { } void Msod::opDeletedpspl( Header &, - Q_UINT32, - QDataStream &) + TQ_UINT32, + TQDataStream &) { } // FDG - File DG -void Msod::opDg(Header &, Q_UINT32, QDataStream &operands) +void Msod::opDg(Header &, TQ_UINT32, TQDataStream &operands) { struct { - Q_UINT32 csp; // The number of shapes in this drawing. - Q_UINT32 spidCur; // The last shape ID given to an SP in this DG. + TQ_UINT32 csp; // The number of tqshapes in this drawing. + TQ_UINT32 spidCur; // The last tqshape ID given to an SP in this DG. } data; operands >> data.csp >> data.spidCur; @@ -867,36 +867,36 @@ void Msod::opDg(Header &, Q_UINT32, QDataStream &operands) } } -void Msod::opDgcontainer(Header &, Q_UINT32 bytes, QDataStream &operands) +void Msod::opDgcontainer(Header &, TQ_UINT32 bytes, TQDataStream &operands) { walk(bytes, operands); } // FDGG - File DGG -void Msod::opDgg(Header &, Q_UINT32, QDataStream &operands) +void Msod::opDgg(Header &, TQ_UINT32, TQDataStream &operands) { struct { - Q_UINT32 spidMax; // The current maximum shape ID. - Q_UINT32 cidcl; // The number of ID clusters (FIDCLs). - Q_UINT32 cspSaved; // The total number of shapes saved. - // (including deleted shapes, if undo + TQ_UINT32 spidMax; // The current maximum tqshape ID. + TQ_UINT32 cidcl; // The number of ID clusters (FIDCLs). + TQ_UINT32 cspSaved; // The total number of tqshapes saved. + // (including deleted tqshapes, if undo // information was saved). - Q_UINT32 cdgSaved; // The total number of drawings saved. + TQ_UINT32 cdgSaved; // The total number of drawings saved. } data; // File ID Cluster - used to save IDCLs struct { - Q_UINT32 dgid; // DG owning the SPIDs in this cluster - Q_UINT32 cspidCur; // number of SPIDs used so far + TQ_UINT32 dgid; // DG owning the SPIDs in this cluster + TQ_UINT32 cspidCur; // number of SPIDs used so far } data1; unsigned i; operands >> data.spidMax >> data.cidcl >> data.cspSaved >> data.cdgSaved; - kdDebug(s_area) << data.cspSaved << " shapes in " << + kdDebug(s_area) << data.cspSaved << " tqshapes in " << data.cidcl - 1 << " clusters in " << data.cdgSaved << " drawings" << endl; for (i = 0; i < data.cidcl - 1; i++) @@ -905,97 +905,97 @@ void Msod::opDgg(Header &, Q_UINT32, QDataStream &operands) } } -void Msod::opDggcontainer(Header &, Q_UINT32 bytes, QDataStream &operands) +void Msod::opDggcontainer(Header &, TQ_UINT32 bytes, TQDataStream &operands) { walk(bytes, operands); } void Msod::opOleobject( Header &, - Q_UINT32, - QDataStream &) + TQ_UINT32, + TQDataStream &) { } -void Msod::opOpt(Header &, Q_UINT32 bytes, QDataStream &operands) +void Msod::opOpt(Header &, TQ_UINT32 bytes, TQDataStream &operands) { m_opt->walk(bytes, operands); } void Msod::opRegroupitems( Header &, - Q_UINT32, - QDataStream &) + TQ_UINT32, + TQDataStream &) { } void Msod::opSelection( Header &, - Q_UINT32, - QDataStream &) + TQ_UINT32, + TQDataStream &) { } -void Msod::opSolvercontainer(Header &, Q_UINT32 bytes, QDataStream &operands) +void Msod::opSolvercontainer(Header &, TQ_UINT32 bytes, TQDataStream &operands) { walk(bytes, operands); } -void Msod::opSp(Header &op, Q_UINT32 bytes, QDataStream &operands) +void Msod::opSp(Header &op, TQ_UINT32 bytes, TQDataStream &operands) { - // We want to defer the act of drawing a shape until we have seen any options + // We want to defer the act of drawing a tqshape until we have seen any options // that may affect it. Thus, we merely store the data away, and let opSpContainer // do all the ahrd work. - m_shape.type = op.opcode.fields.inst; - m_shape.length = bytes; - m_shape.data = new char [bytes]; - operands.readRawBytes(m_shape.data, bytes); + m_tqshape.type = op.opcode.fields.inst; + m_tqshape.length = bytes; + m_tqshape.data = new char [bytes]; + operands.readRawBytes(m_tqshape.data, bytes); } -void Msod::opSpcontainer(Header &, Q_UINT32 bytes, QDataStream &operands) +void Msod::opSpcontainer(Header &, TQ_UINT32 bytes, TQDataStream &operands) { walk(bytes, operands); - // Having gathered all the information for this shape, we can now draw it. + // Having gathered all the information for this tqshape, we can now draw it. - QByteArray a; + TQByteArray a; - a.setRawData(m_shape.data, m_shape.length); - QDataStream s(a, IO_ReadOnly); - s.setByteOrder(QDataStream::LittleEndian); // Great, I love Qt ! - drawShape(m_shape.type, m_shape.length, s); - a.resetRawData(m_shape.data, m_shape.length); - delete [] m_shape.data; - m_shape.data = 0L; + a.setRawData(m_tqshape.data, m_tqshape.length); + TQDataStream s(a, IO_ReadOnly); + s.setByteOrder(TQDataStream::LittleEndian); // Great, I love TQt ! + drawShape(m_tqshape.type, m_tqshape.length, s); + a.resetRawData(m_tqshape.data, m_tqshape.length); + delete [] m_tqshape.data; + m_tqshape.data = 0L; } -void Msod::opSpgr(Header &, Q_UINT32, QDataStream &operands) +void Msod::opSpgr(Header &, TQ_UINT32, TQDataStream &operands) { struct { - Q_UINT32 x; - Q_UINT32 y; - Q_UINT32 w; - Q_UINT32 h; + TQ_UINT32 x; + TQ_UINT32 y; + TQ_UINT32 w; + TQ_UINT32 h; } data; operands >> data.x >> data.y >> data.w >> data.h; } -void Msod::opSpgrcontainer(Header &, Q_UINT32 bytes, QDataStream &operands) +void Msod::opSpgrcontainer(Header &, TQ_UINT32 bytes, TQDataStream &operands) { walk(bytes, operands); } -void Msod::opSplitmenucolors(Header &, Q_UINT32, QDataStream &operands) +void Msod::opSplitmenucolors(Header &, TQ_UINT32, TQDataStream &operands) { struct { - Q_UINT32 fill; - Q_UINT32 line; - Q_UINT32 shadow; - Q_UINT32 threeDee; + TQ_UINT32 fill; + TQ_UINT32 line; + TQ_UINT32 shadow; + TQ_UINT32 threeDee; } data; operands >> data.fill >> data.line >> data.shadow >> data.threeDee; @@ -1003,12 +1003,12 @@ void Msod::opSplitmenucolors(Header &, Q_UINT32, QDataStream &operands) void Msod::opTextbox( Header &, - Q_UINT32, - QDataStream &) + TQ_UINT32, + TQDataStream &) { } -void Msod::skip(Q_UINT32 bytes, QDataStream &operands) +void Msod::skip(TQ_UINT32 bytes, TQDataStream &operands) { if ((int)bytes < 0) { @@ -1017,8 +1017,8 @@ void Msod::skip(Q_UINT32 bytes, QDataStream &operands) } if (bytes) { - Q_UINT32 i; - Q_UINT8 discard; + TQ_UINT32 i; + TQ_UINT8 discard; kdDebug(s_area) << "skip: " << bytes << endl; for (i = 0; i < bytes; i++) @@ -1028,10 +1028,10 @@ void Msod::skip(Q_UINT32 bytes, QDataStream &operands) } } -void Msod::walk(Q_UINT32 bytes, QDataStream &operands) +void Msod::walk(TQ_UINT32 bytes, TQDataStream &operands) { Header op; - Q_UINT32 length = 0; + TQ_UINT32 length = 0; // Stop parsing when there are no more records. Note that we stop as soon // as we cannot get a complete header. @@ -1061,8 +1061,8 @@ void Msod::walk(Q_UINT32 bytes, QDataStream &operands) } Msod::Options::Options( - Msod &parent) : - m_parent(parent) + Msod &tqparent) : + m_parent(tqparent) { m_pVertices = 0L; initialise(); @@ -1073,7 +1073,7 @@ Msod::Options::~Options() delete m_pVertices; } -double Msod::Options::from1616ToDouble(Q_UINT32 value) +double Msod::Options::from1616ToDouble(TQ_UINT32 value) { return (value >> 16) + 65535.0 / (double)(value & 0xffff); } @@ -1085,7 +1085,7 @@ void Msod::Options::initialise() m_lTxid = 0; m_pib = 0; - m_pibName = QString::null; + m_pibName = TQString(); m_pibFlags = 0; m_pictureId = 0; m_fNoHitTestPicture = false; @@ -1097,7 +1097,7 @@ void Msod::Options::initialise() m_geoTop = 0; m_geoRight = 21600; m_geoBottom = 21600; - m_shapePath = 1; + m_tqshapePath = 1; delete m_pVertices; m_pVertices = 0L; m_fShadowOK = true; @@ -1133,11 +1133,11 @@ void Msod::Options::initialise() m_fBackground = false; } -void Msod::Options::walk(Q_UINT32 bytes, QDataStream &operands) +void Msod::Options::walk(TQ_UINT32 bytes, TQDataStream &operands) { Header op; - Q_UINT16 length = 0; - Q_UINT16 complexLength = 0; + TQ_UINT16 length = 0; + TQ_UINT16 complexLength = 0; // Reset all options to default values. @@ -1145,7 +1145,7 @@ void Msod::Options::walk(Q_UINT32 bytes, QDataStream &operands) // First process all simple options, and add all complex options to a list. - QPtrList
complexOpts; + TQPtrList
complexOpts; complexOpts.setAutoDelete(true); bool unsupported; while (length + complexLength < (int)bytes) @@ -1172,7 +1172,7 @@ void Msod::Options::walk(Q_UINT32 bytes, QDataStream &operands) break; case 128: m_lTxid = op.value; - kdDebug(s_area) << "textbox: 0x" << QString::number(op.value,16) << endl; + kdDebug(s_area) << "textbox: 0x" << TQString::number(op.value,16) << endl; break; case 260: if (op.opcode.fields.fBid) @@ -1187,9 +1187,9 @@ void Msod::Options::walk(Q_UINT32 bytes, QDataStream &operands) if (image->extension == "wmf") { - QByteArray a; + TQByteArray a; a.setRawData(image->data, image->length); - QDataStream s(a, IO_ReadOnly); + TQDataStream s(a, IO_ReadOnly); m_parent.KWmf::parse(s, image->length); a.resetRawData(image->data, image->length); } @@ -1233,7 +1233,7 @@ void Msod::Options::walk(Q_UINT32 bytes, QDataStream &operands) m_geoBottom = op.value; break; case 324: - m_shapePath = op.value; + m_tqshapePath = op.value; break; case 383: m_fShadowOK = (op.value & 0x0020) != 0; @@ -1294,7 +1294,7 @@ void Msod::Options::walk(Q_UINT32 bytes, QDataStream &operands) while (complexOpts.count()) { - Q_INT16 t16; + TQ_INT16 t16; unsigned i; op = *complexOpts.getFirst(); @@ -1308,11 +1308,11 @@ void Msod::Options::walk(Q_UINT32 bytes, QDataStream &operands) operands >> t16; if (!t16) break; - m_pibName += QChar(t16); + m_pibName += TQChar(t16); }; break; case 325: - m_pVertices = new QPointArray(op.value / 4); + m_pVertices = new TQPointArray(op.value / 4); for (i = 0; i < m_pVertices->count(); i++) { m_pVertices->setPoint(i, m_parent.normalisePoint(operands)); diff --git a/filters/karbon/msod/msod.h b/filters/karbon/msod/msod.h index a3dd9efe..a1243aaa 100644 --- a/filters/karbon/msod/msod.h +++ b/filters/karbon/msod/msod.h @@ -28,10 +28,10 @@ DESCRIPTION #ifndef MSOD_H #define MSOD_H -class QString; -class QPointArray; +class TQString; +class TQPointArray; #include -#include +#include class Msod : private KWmf @@ -44,16 +44,16 @@ public: unsigned dpi); virtual ~Msod(); - // Called to parse the given file. We extract a drawing by shapeId. + // Called to parse the given file. We extract a drawing by tqshapeId. // If the drawing is not found, the return value will be false. bool parse( - unsigned shapeId, - const QString &file, + unsigned tqshapeId, + const TQString &file, const char *delayStream = 0L); bool parse( - unsigned shapeId, - QDataStream &stream, + unsigned tqshapeId, + TQDataStream &stream, unsigned size, const char *delayStream = 0L); @@ -74,25 +74,25 @@ protected: virtual void gotEllipse( const DrawContext &dc, - QString type, - QPoint topLeft, - QSize halfAxes, + TQString type, + TQPoint topLeft, + TQSize halfAxes, unsigned startAngle, unsigned stopAngle) = 0; virtual void gotPicture( unsigned id, - QString extension, + TQString extension, unsigned length, const char *data) = 0; virtual void gotPolygon( const DrawContext &dc, - const QPointArray &points) = 0; + const TQPointArray &points) = 0; virtual void gotPolyline( const DrawContext &dc, - const QPointArray &points) = 0; + const TQPointArray &points) = 0; virtual void gotRectangle( const DrawContext &dc, - const QPointArray &points) = 0; + const TQPointArray &points) = 0; private: Msod(const Msod &); @@ -114,16 +114,16 @@ private: unsigned type; char *data; unsigned length; - } m_shape; + } m_tqshape; - QPoint normalisePoint( - QDataStream &operands); - QSize normaliseSize( - QDataStream &operands); + TQPoint normalisePoint( + TQDataStream &operands); + TQSize normaliseSize( + TQDataStream &operands); void drawShape( - unsigned shapeType, - Q_UINT32 bytes, - QDataStream &operands); + unsigned tqshapeType, + TQ_UINT32 bytes, + TQDataStream &operands); public: @@ -132,15 +132,15 @@ public: { union { - Q_UINT32 info; + TQ_UINT32 info; struct { - Q_UINT32 ver: 4; - Q_UINT32 inst: 12; - Q_UINT32 fbt: 16; + TQ_UINT32 ver: 4; + TQ_UINT32 inst: 12; + TQ_UINT32 fbt: 16; } fields; } opcode; - Q_UINT32 cbLength; + TQ_UINT32 cbLength; } Header; private: @@ -163,89 +163,89 @@ private: class Image { public: - QString extension; + TQString extension; unsigned length; const char *data; Image() { data = 0L; } ~Image() { delete [] data; } }; - QPtrVector m_images; + TQPtrVector m_images; // Opcode handling and painter methods. void walk( - Q_UINT32 bytes, - QDataStream &operands); + TQ_UINT32 bytes, + TQDataStream &operands); void skip( - Q_UINT32 bytes, - QDataStream &operands); + TQ_UINT32 bytes, + TQDataStream &operands); void invokeHandler( Header &op, - Q_UINT32 bytes, - QDataStream &operands); - - void opAlignrule(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opAnchor(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opArcrule(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opBlip(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opBse(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opBstorecontainer(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opCalloutrule(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opChildanchor(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opClientanchor(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opClientdata(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opClientrule(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opClienttextbox(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opClsid(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opColormru(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opConnectorrule(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opDeletedpspl(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opDg(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opDgcontainer(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opDgg(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opDggcontainer(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opOleobject(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opOpt(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opRegroupitems(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opSelection(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opSolvercontainer(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opSp(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opSpcontainer(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opSpgr(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opSpgrcontainer(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opSplitmenucolors(Header &op, Q_UINT32 bytes, QDataStream &operands); - void opTextbox(Header &op, Q_UINT32 bytes, QDataStream &operands); + TQ_UINT32 bytes, + TQDataStream &operands); + + void opAlignrule(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opAnchor(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opArcrule(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opBlip(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opBse(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opBstorecontainer(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opCalloutrule(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opChildanchor(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opClientanchor(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opClientdata(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opClientrule(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opClienttextbox(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opClsid(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opColormru(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opConnectorrule(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opDeletedpspl(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opDg(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opDgcontainer(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opDgg(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opDggcontainer(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opOleobject(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opOpt(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opRegroupitems(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opSelection(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opSolvercontainer(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opSp(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opSpcontainer(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opSpgr(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opSpgrcontainer(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opSplitmenucolors(Header &op, TQ_UINT32 bytes, TQDataStream &operands); + void opTextbox(Header &op, TQ_UINT32 bytes, TQDataStream &operands); // Option handling. class Options { public: - Options(Msod &parent); + Options(Msod &tqparent); ~Options(); void walk( - Q_UINT32 bytes, - QDataStream &operands); + TQ_UINT32 bytes, + TQDataStream &operands); double m_rotation; - Q_UINT32 m_lTxid; + TQ_UINT32 m_lTxid; - Q_UINT32 m_pib; - QString m_pibName; - Q_UINT32 m_pibFlags; - Q_UINT32 m_pictureId; + TQ_UINT32 m_pib; + TQString m_pibName; + TQ_UINT32 m_pibFlags; + TQ_UINT32 m_pictureId; bool m_fNoHitTestPicture; bool m_pictureGray; bool m_pictureBiLevel; bool m_pictureActive; - Q_UINT32 m_geoLeft; - Q_UINT32 m_geoTop; - Q_UINT32 m_geoRight; - Q_UINT32 m_geoBottom; - Q_UINT32 m_shapePath; - QPointArray *m_pVertices; + TQ_UINT32 m_geoLeft; + TQ_UINT32 m_geoTop; + TQ_UINT32 m_geoRight; + TQ_UINT32 m_geoBottom; + TQ_UINT32 m_tqshapePath; + TQPointArray *m_pVertices; bool m_fShadowOK; bool m_f3DOK; bool m_fLineOK; @@ -259,10 +259,10 @@ private: bool m_fillUseRect; bool m_fNoFillHitTest; - Q_UINT32 m_lineColor; - Q_UINT32 m_lineBackColor; - Q_UINT32 m_lineType; - Q_UINT32 m_lineWidth; + TQ_UINT32 m_lineColor; + TQ_UINT32 m_lineBackColor; + TQ_UINT32 m_lineType; + TQ_UINT32 m_lineWidth; bool m_fArrowheadsOK; bool m_fLine; @@ -270,7 +270,7 @@ private: bool m_lineFillShape; bool m_fNoLineDrawDash; - Q_UINT32 m_bWMode; + TQ_UINT32 m_bWMode; bool m_fOleIcon; bool m_fPreferRelativeResize; @@ -285,19 +285,19 @@ private: { union { - Q_UINT16 info; + TQ_UINT16 info; struct { - Q_UINT16 pid: 14; - Q_UINT16 fBid: 1; - Q_UINT16 fComplex: 1; + TQ_UINT16 pid: 14; + TQ_UINT16 fBid: 1; + TQ_UINT16 fComplex: 1; } fields; } opcode; - Q_UINT32 value; + TQ_UINT32 value; } Header; void initialise(); - double from1616ToDouble(Q_UINT32 value); + double from1616ToDouble(TQ_UINT32 value); }; friend class Msod::Options; diff --git a/filters/karbon/msod/msodimport.cc b/filters/karbon/msod/msodimport.cc index 9af11181..903d50a2 100644 --- a/filters/karbon/msod/msodimport.cc +++ b/filters/karbon/msod/msodimport.cc @@ -25,9 +25,9 @@ DESCRIPTION #include #include #include -#include +#include #include -#include +#include typedef KGenericFactory MSODImportFactory; K_EXPORT_COMPONENT_FACTORY( libmsodimport, MSODImportFactory( "kofficefilters" ) ) @@ -37,7 +37,7 @@ const int MSODImport::s_area = 30505; MSODImport::MSODImport( KoFilter *, const char *, - const QStringList&) : + const TQStringList&) : KoEmbeddingFilter(), Msod(100) { } @@ -46,31 +46,31 @@ MSODImport::~MSODImport() { } -KoFilter::ConversionStatus MSODImport::convert( const QCString& from, const QCString& to ) +KoFilter::ConversiontqStatus MSODImport::convert( const TQCString& from, const TQCString& to ) { if (to != "application/x-karbon" || from != "image/x-msod") return KoFilter::NotImplemented; - // Get configuration data: the shape id, and any delay stream that we were given. - unsigned shapeId; - emit commSignalShapeID( shapeId ); + // Get configuration data: the tqshape id, and any delay stream that we were given. + unsigned tqshapeId; + emit commSignalShapeID( tqshapeId ); const char *delayStream = 0L; emit commSignalDelayStream( delayStream ); kdDebug( s_area ) << "##################################################################" << endl; - kdDebug( s_area ) << "shape id: " << shapeId << endl; + kdDebug( s_area ) << "tqshape id: " << tqshapeId << endl; kdDebug( s_area ) << "delay stream: " << delayStream << endl; kdDebug( s_area ) << "##################################################################" << endl; /* - QString config = ""; // ###### FIXME: We aren't able to pass config data right now - QStringList args = QStringList::split(";", config); + TQString config = ""; // ###### FIXME: We aren't able to pass config data right now + TQStringList args = TQStringList::split(";", config); unsigned i; kdDebug(s_area) << "MSODImport::filter: config: " << config << endl; for (i = 0; i < args.count(); i++) { - if (args[i].startsWith("shape-id=")) + if (args[i].startsWith("tqshape-id=")) { - shapeId = args[i].mid(9).toUInt(); + tqshapeId = args[i].mid(9).toUInt(); } else if (args[i].startsWith("delay-stream=")) @@ -91,7 +91,7 @@ KoFilter::ConversionStatus MSODImport::convert( const QCString& from, const QCSt m_text += "\n"; m_text += " \n"; - if (!parse(shapeId, m_chain->inputFile(), delayStream)) + if (!parse(tqshapeId, m_chain->inputFile(), delayStream)) return KoFilter::WrongFormat; // close doc @@ -106,7 +106,7 @@ KoFilter::ConversionStatus MSODImport::convert( const QCString& from, const QCSt kdError(s_area) << "Cannot open output file" << endl; return KoFilter::StorageCreationError; } - QCString cstring ( m_text.utf8() ); + TQCString cstring ( m_text.utf8() ); dev->writeBlock(cstring.data(), cstring.size()-1); return KoFilter::OK; @@ -114,27 +114,27 @@ KoFilter::ConversionStatus MSODImport::convert( const QCString& from, const QCSt void MSODImport::gotEllipse( const DrawContext &/*dc*/, - QString /*type*/, - QPoint /*topLeft*/, - QSize /*halfAxes*/, + TQString /*type*/, + TQPoint /*topLeft*/, + TQSize /*halfAxes*/, unsigned /*startAngle*/, unsigned /*stopAngle*/) { // ### TODO #if 0 - m_text += "\n"; - m_text += " \n"; m_text += " \n"; m_text += " \n"; @@ -151,7 +151,7 @@ static void toRGB(int c, double &r, double &g, double &b) void MSODImport::gotPicture( unsigned key, - QString extension, + TQString extension, unsigned length, const char *data) { @@ -163,20 +163,20 @@ void MSODImport::gotPicture( (extension == "emf") || (extension == "pict")) { - int partRef = internalPartReference( QString::number( key ) ); + int partRef = internalPartReference( TQString::number( key ) ); if (partRef == -1) { m_embeddeeData = data; m_embeddeeLength = length; - QString srcMime( KoEmbeddingFilter::mimeTypeByExtension( extension ) ); + TQString srcMime( KoEmbeddingFilter::mimeTypeByExtension( extension ) ); if ( srcMime == KMimeType::defaultMimeType() ) kdWarning( s_area ) << "Couldn't determine the mimetype from the extension" << endl; - QCString destMime; // intentionally empty, the filter manager will do the rest - KoFilter::ConversionStatus status; - partRef = embedPart( srcMime.latin1(), destMime, status, QString::number( key ) ); + TQCString destMime; // intentionally empty, the filter manager will do the rest + KoFilter::ConversiontqStatus status; + partRef = embedPart( srcMime.latin1(), destMime, status, TQString::number( key ) ); m_embeddeeData = 0; m_embeddeeLength = 0; @@ -186,14 +186,14 @@ void MSODImport::gotPicture( return; } } - m_text += "\n"; } else { // We could not import it as a part. Try as an image. - KTempFile tempFile( QString::null, '.' + extension ); + KTempFile tempFile( TQString(), '.' + extension ); tempFile.file()->writeBlock( data, length ); tempFile.close(); @@ -210,26 +210,26 @@ void MSODImport::gotPicture( void MSODImport::gotPolygon( const DrawContext &dc, - const QPointArray &points) + const TQPointArray &points) { kdDebug(s_area) << "MSODImport::gotPolygon" << endl; - kdDebug(s_area) << QString::number(dc.m_penWidth, 16) << endl; + kdDebug(s_area) << TQString::number(dc.m_penWidth, 16) << endl; kdDebug(s_area) << dc.m_penStyle << endl; m_text += "\n"; if( dc.m_penWidth > 0 ) { - m_text += "\n";// + QString::number(dc.m_penWidth, 16) + "\">\n"; + m_text += "\n";// + TQString::number(dc.m_penWidth, 16) + "\">\n"; double r, g, b; toRGB(dc.m_penColour, r, g, b); - m_text += "\n"; + m_text += "\n"; m_text += "\n"; } else m_text += "\n"; - m_text += "\n"; + m_text += "\n"; double r, g, b; toRGB(dc.m_brushColour, r, g, b); - m_text += "\n"; + m_text += "\n"; m_text += "\n"; m_text += "\n"; @@ -241,12 +241,12 @@ void MSODImport::gotPolygon( void MSODImport::gotPolyline( const DrawContext &dc, - const QPointArray &points) + const TQPointArray &points) { kdDebug(s_area) << "MSODImport::gotPolyline" << endl; return; // ### TODO m_text += "\n"; - m_text += "\n"; + m_text += "\n"; m_text += "\n"; m_text += "\n"; pointArray(points); @@ -256,24 +256,24 @@ void MSODImport::gotPolyline( void MSODImport::gotRectangle( const DrawContext &dc, - const QPointArray &points) + const TQPointArray &points) { // ### TODO #if 0 - QRect bounds = points.boundingRect(); + TQRect bounds = points.boundingRect(); - m_text += "\n"; m_text += "\n"; pointArray(points); - m_text += " \n"; m_text += " \n"; m_text += " \n"; @@ -282,29 +282,29 @@ void MSODImport::gotRectangle( #endif } -void MSODImport::savePartContents( QIODevice* file ) +void MSODImport::savePartContents( TQIODevice* file ) { if ( m_embeddeeData != 0 && m_embeddeeLength != 0 ) file->writeBlock( m_embeddeeData, m_embeddeeLength ); } void MSODImport::pointArray( - const QPointArray &points) + const TQPointArray &points) { - m_text += "\n"; - kdDebug(s_area) << "\n" << endl; for (unsigned int i = 1; i < points.count(); i++) { - m_text += "\n"; - kdDebug(s_area) << "" << endl; } diff --git a/filters/karbon/msod/msodimport.h b/filters/karbon/msod/msodimport.h index cb6aec16..ec036bdf 100644 --- a/filters/karbon/msod/msodimport.h +++ b/filters/karbon/msod/msodimport.h @@ -30,54 +30,55 @@ class MSODImport : public KoEmbeddingFilter, protected Msod { Q_OBJECT + TQ_OBJECT public: MSODImport( - KoFilter *parent, + KoFilter *tqparent, const char *name, - const QStringList&); + const TQStringList&); virtual ~MSODImport(); - virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to ); protected: virtual void gotEllipse( const DrawContext &dc, - QString type, - QPoint topLeft, - QSize halfAxes, + TQString type, + TQPoint topLeft, + TQSize halfAxes, unsigned startAngle, unsigned stopAngle); virtual void gotPicture( unsigned id, - QString extension, + TQString extension, unsigned length, const char *data); virtual void gotPolygon( const DrawContext &dc, - const QPointArray &points); + const TQPointArray &points); virtual void gotPolyline( const DrawContext &dc, - const QPointArray &points); + const TQPointArray &points); virtual void gotRectangle( const DrawContext &dc, - const QPointArray &points); + const TQPointArray &points); signals: - // Communication signals to the parent filters + // Communication signals to the tqparent filters void commSignalDelayStream( const char* delay ); - void commSignalShapeID( unsigned int& shapeID ); + void commSignalShapeID( unsigned int& tqshapeID ); private: - virtual void savePartContents( QIODevice* file ); + virtual void savePartContents( TQIODevice* file ); // Debug support. static const int s_area; void pointArray( - const QPointArray &points); - QString m_text; + const TQPointArray &points); + TQString m_text; // Embedded objects. const char* m_embeddeeData; diff --git a/filters/karbon/oodraw/oodrawimport.cc b/filters/karbon/oodraw/oodrawimport.cc index f52ed5b8..a31d80a4 100644 --- a/filters/karbon/oodraw/oodrawimport.cc +++ b/filters/karbon/oodraw/oodrawimport.cc @@ -21,9 +21,9 @@ #include -#include -#include -#include +#include +#include +#include #include #include @@ -50,7 +50,7 @@ typedef KGenericFactory OoDrawImportFactory; K_EXPORT_COMPONENT_FACTORY( liboodrawimport, OoDrawImportFactory( "kofficefilters" ) ) -OoDrawImport::OoDrawImport( KoFilter *, const char *, const QStringList & ) +OoDrawImport::OoDrawImport( KoFilter *, const char *, const TQStringList & ) : KoFilter(), m_styles( 23, true ), m_styleStack( ooNS::style, ooNS::fo ) @@ -62,7 +62,7 @@ OoDrawImport::~OoDrawImport() { } -KoFilter::ConversionStatus OoDrawImport::convert( QCString const & from, QCString const & to ) +KoFilter::ConversiontqStatus OoDrawImport::convert( TQCString const & from, TQCString const & to ) { kdDebug() << "Entering Oodraw Import filter: " << from << " - " << to << endl; @@ -81,42 +81,42 @@ KoFilter::ConversionStatus OoDrawImport::convert( QCString const & from, QCStrin return KoFilter::FileNotFound; } - KoFilter::ConversionStatus preStatus = openFile(); + KoFilter::ConversiontqStatus pretqStatus = openFile(); - if( preStatus != KoFilter::OK ) + if( pretqStatus != KoFilter::OK ) { m_zip->close(); delete m_zip; - return preStatus; + return pretqStatus; } -/*QDomDocument docinfo; +/*TQDomDocument docinfo; createDocumentInfo( docinfo ); // store document info KoStoreDevice* out = m_chain->storageFile( "documentinfo.xml", KoStore::Write ); if( out ) { -QCString info = docinfo.toCString(); +TQCString info = docinfo.toCString(); //kdDebug() << " info :" << info << endl; -// WARNING: we cannot use KoStore::write(const QByteArray&) because it gives an extra NULL character at the end. +// WARNING: we cannot use KoStore::write(const TQByteArray&) because it gives an extra NULL character at the end. out->writeBlock( info , info.length() ); }*/ - QDomDocument docinfo; + TQDomDocument docinfo; createDocumentInfo( docinfo ); // store document info KoStoreDevice* out = m_chain->storageFile( "documentinfo.xml", KoStore::Write ); if( out ) { - QCString info = docinfo.toCString(); + TQCString info = docinfo.toCString(); //kdDebug(30518) << " info :" << info << endl; - // WARNING: we cannot use KoStore::write(const QByteArray&) because it gives an extra NULL character at the end. + // WARNING: we cannot use KoStore::write(const TQByteArray&) because it gives an extra NULL character at the end. out->writeBlock( info , info.length() ); } convert(); - QDomDocument outdoc = m_document.saveXML(); + TQDomDocument outdoc = m_document.saveXML(); // add paper info, we always need custom for svg (Rob) - QDomElement paper = outdoc.createElement( "PAPER" ); + TQDomElement paper = outdoc.createElement( "PAPER" ); outdoc.documentElement().appendChild( paper ); paper.setAttribute( "format", PG_CUSTOM ); paper.setAttribute( "width", m_document.width() ); @@ -126,7 +126,7 @@ out->writeBlock( info , info.length() ); out = m_chain->storageFile( "maindoc.xml", KoStore::Write ); if( out ) { - QCString content = outdoc.toCString(); + TQCString content = outdoc.toCString(); kdDebug() << " content :" << content << endl; out->writeBlock( content , content.length() ); } @@ -139,7 +139,7 @@ out->writeBlock( info , info.length() ); } // Very related to OoWriterImport::createDocumentInfo -void OoDrawImport::createDocumentInfo( QDomDocument &docinfo ) +void OoDrawImport::createDocumentInfo( TQDomDocument &docinfo ) { docinfo = KoDocument::createDomDocument( "document-info" /*DTD name*/, "document-info" /*tag name*/, "1.1" ); @@ -149,9 +149,9 @@ void OoDrawImport::createDocumentInfo( QDomDocument &docinfo ) // Very related to OoWriterImport::openFile() -KoFilter::ConversionStatus OoDrawImport::openFile() +KoFilter::ConversiontqStatus OoDrawImport::openFile() { - KoFilter::ConversionStatus status = loadAndParse( "content.xml", m_content ); + KoFilter::ConversiontqStatus status = loadAndParse( "content.xml", m_content ); if ( status != KoFilter::OK ) { kdError(30518) << "Content.xml could not be parsed correctly! Aborting!" << endl; @@ -159,7 +159,7 @@ KoFilter::ConversionStatus OoDrawImport::openFile() } // We do not stop if the following calls fail. - QDomDocument styles; + TQDomDocument styles; loadAndParse( "styles.xml", styles ); loadAndParse( "meta.xml", m_meta ); loadAndParse( "settings.xml", m_settings ); @@ -174,25 +174,25 @@ void OoDrawImport::convert() { m_document.saveAsPath( false ); - QDomElement content = m_content.documentElement(); + TQDomElement content = m_content.documentElement(); // content.xml contains some automatic-styles that we need to store - QDomNode automaticStyles = KoDom::namedItemNS( content, ooNS::office, "automatic-styles" ); + TQDomNode automaticStyles = KoDom::namedItemNS( content, ooNS::office, "automatic-styles" ); if( !automaticStyles.isNull() ) insertStyles( automaticStyles.toElement() ); - QDomNode body = KoDom::namedItemNS( content, ooNS::office, "body" ); + TQDomNode body = KoDom::namedItemNS( content, ooNS::office, "body" ); if( body.isNull() ) return; // we take the settings of the first slide for the whole document. - QDomElement drawPage = KoDom::namedItemNS( body, ooNS::draw, "page" ); + TQDomElement drawPage = KoDom::namedItemNS( body, ooNS::draw, "page" ); if( drawPage.isNull() ) // no pages? give up. return; - QDomElement *master = m_styles[drawPage.attributeNS( ooNS::draw, "master-page-name", QString::null )]; - QDomElement *style = m_styles[master->attributeNS( ooNS::style, "page-master-name", QString::null )]; - QDomElement properties = KoDom::namedItemNS( *style, ooNS::style, "properties" ).toElement(); + TQDomElement *master = m_styles[drawPage.attributeNS( ooNS::draw, "master-page-name", TQString() )]; + TQDomElement *style = m_styles[master->attributeNS( ooNS::style, "page-master-name", TQString() )]; + TQDomElement properties = KoDom::namedItemNS( *style, ooNS::style, "properties" ).toElement(); if( properties.isNull() ) { @@ -201,20 +201,20 @@ void OoDrawImport::convert() } else { - m_document.setWidth( KoUnit::parseValue(properties.attributeNS( ooNS::fo, "page-width", QString::null ) ) ); - m_document.setHeight( KoUnit::parseValue(properties.attributeNS( ooNS::fo, "page-height", QString::null ) ) ); + m_document.setWidth( KoUnit::parseValue(properties.attributeNS( ooNS::fo, "page-width", TQString() ) ) ); + m_document.setHeight( KoUnit::parseValue(properties.attributeNS( ooNS::fo, "page-height", TQString() ) ) ); } // parse all pages - for( QDomNode drawPage = body.firstChild(); !drawPage.isNull(); drawPage = drawPage.nextSibling() ) + for( TQDomNode drawPage = body.firstChild(); !drawPage.isNull(); drawPage = drawPage.nextSibling() ) { - QDomElement dp = drawPage.toElement(); + TQDomElement dp = drawPage.toElement(); m_styleStack.clear(); // remove all styles fillStyleStack( dp ); //m_styleStack.setPageMark(); // set the pagetitle - //QDomElement titleElement = doc.createElement( "Title" ); + //TQDomElement titleElement = doc.createElement( "Title" ); //titleElement.setAttribute( "title", dp.attributeNS( "name" ) ); //pageTitleElement.appendChild( titleElement ); @@ -223,27 +223,27 @@ void OoDrawImport::convert() } -KoFilter::ConversionStatus OoDrawImport::loadAndParse(const QString& filename, QDomDocument& doc) +KoFilter::ConversiontqStatus OoDrawImport::loadAndParse(const TQString& filename, TQDomDocument& doc) { return OoUtils::loadAndParse( filename, doc, m_zip); } void -OoDrawImport::parseGroup( VGroup *parent, const QDomElement& parentobject ) +OoDrawImport::parseGroup( VGroup *tqparent, const TQDomElement& tqparentobject ) { // parse all objects - for( QDomNode object = parentobject.firstChild(); !object.isNull(); object = object.nextSibling() ) + for( TQDomNode object = tqparentobject.firstChild(); !object.isNull(); object = object.nextSibling() ) { - QDomElement o = object.toElement(); + TQDomElement o = object.toElement(); if( o.namespaceURI() != ooNS::draw ) continue; - QString name = o.localName(); - QString drawID = o.attributeNS( ooNS::draw, "id", QString::null ); + TQString name = o.localName(); + TQString drawID = o.attributeNS( ooNS::draw, "id", TQString() ); VObject *obj = 0L; if( name == "g" ) // polyline { storeObjectStyles( o ); - VGroup *group = new VGroup( parent ); + VGroup *group = new VGroup( tqparent ); appendPen( *group ); appendBrush( *group ); obj = group; @@ -252,12 +252,12 @@ OoDrawImport::parseGroup( VGroup *parent, const QDomElement& parentobject ) else if( name == "rect" ) // rectangle { storeObjectStyles( o ); - double x = KoUnit::parseValue( o.attributeNS( ooNS::svg, "x", QString::null ) ); - double y = ymirror( KoUnit::parseValue( o.attributeNS( ooNS::svg, "y", QString::null ) ) ); - double w = KoUnit::parseValue( o.attributeNS( ooNS::svg, "width", QString::null ) ); - double h = KoUnit::parseValue( o.attributeNS( ooNS::svg, "height", QString::null ) ); - int corner = static_cast( KoUnit::parseValue( o.attributeNS( ooNS::draw, "corner-radius", QString::null ) ) ); - VRectangle *rect = new VRectangle( parent, KoPoint( x, y ), w, h, corner ); + double x = KoUnit::parseValue( o.attributeNS( ooNS::svg, "x", TQString() ) ); + double y = ymirror( KoUnit::parseValue( o.attributeNS( ooNS::svg, "y", TQString() ) ) ); + double w = KoUnit::parseValue( o.attributeNS( ooNS::svg, "width", TQString() ) ); + double h = KoUnit::parseValue( o.attributeNS( ooNS::svg, "height", TQString() ) ); + int corner = static_cast( KoUnit::parseValue( o.attributeNS( ooNS::draw, "corner-radius", TQString() ) ) ); + VRectangle *rect = new VRectangle( tqparent, KoPoint( x, y ), w, h, corner ); appendPen( *rect ); appendBrush( *rect ); obj = rect; @@ -265,13 +265,13 @@ OoDrawImport::parseGroup( VGroup *parent, const QDomElement& parentobject ) else if( name == "circle" || name == "ellipse" ) { storeObjectStyles( o ); - double w = KoUnit::parseValue( o.attributeNS( ooNS::svg, "width", QString::null ) ); - double h = KoUnit::parseValue( o.attributeNS( ooNS::svg, "height", QString::null ) ); - double x = KoUnit::parseValue( o.attributeNS( ooNS::svg, "x", QString::null ) ); - double y = ymirror( KoUnit::parseValue( o.attributeNS( ooNS::svg, "y", QString::null ) ) ) - h; - double start = o.attributeNS( ooNS::draw, "start-angle", QString::null ).toDouble(); - double end = o.attributeNS( ooNS::draw, "end-angle", QString::null ).toDouble(); - QString kind = o.attributeNS( ooNS::draw, "kind", QString::null ); + double w = KoUnit::parseValue( o.attributeNS( ooNS::svg, "width", TQString() ) ); + double h = KoUnit::parseValue( o.attributeNS( ooNS::svg, "height", TQString() ) ); + double x = KoUnit::parseValue( o.attributeNS( ooNS::svg, "x", TQString() ) ); + double y = ymirror( KoUnit::parseValue( o.attributeNS( ooNS::svg, "y", TQString() ) ) ) - h; + double start = o.attributeNS( ooNS::draw, "start-angle", TQString() ).toDouble(); + double end = o.attributeNS( ooNS::draw, "end-angle", TQString() ).toDouble(); + TQString kind = o.attributeNS( ooNS::draw, "kind", TQString() ); VEllipse::VEllipseType type = VEllipse::full; if( !kind.isEmpty() ) { @@ -282,7 +282,7 @@ OoDrawImport::parseGroup( VGroup *parent, const QDomElement& parentobject ) else if( kind == "arc" ) type = VEllipse::arc; } - VEllipse *ellipse = new VEllipse( parent, KoPoint( x, y ), w, h, type, start, end ); + VEllipse *ellipse = new VEllipse( tqparent, KoPoint( x, y ), w, h, type, start, end ); appendPen( *ellipse ); // arc has no brush if( kind != "arc" ) @@ -292,11 +292,11 @@ OoDrawImport::parseGroup( VGroup *parent, const QDomElement& parentobject ) else if( name == "line" ) // line { storeObjectStyles( o ); - VPath *line = new VPath( parent ); - double x1 = KoUnit::parseValue( o.attributeNS( ooNS::svg, "x1", QString::null ) ); - double y1 = ymirror( KoUnit::parseValue( o.attributeNS( ooNS::svg, "y1", QString::null ) ) ); - double x2 = KoUnit::parseValue( o.attributeNS( ooNS::svg, "x2", QString::null ) ); - double y2 = ymirror( KoUnit::parseValue( o.attributeNS( ooNS::svg, "y2", QString::null ) ) ); + VPath *line = new VPath( tqparent ); + double x1 = KoUnit::parseValue( o.attributeNS( ooNS::svg, "x1", TQString() ) ); + double y1 = ymirror( KoUnit::parseValue( o.attributeNS( ooNS::svg, "y1", TQString() ) ) ); + double x2 = KoUnit::parseValue( o.attributeNS( ooNS::svg, "x2", TQString() ) ); + double y2 = ymirror( KoUnit::parseValue( o.attributeNS( ooNS::svg, "y2", TQString() ) ) ); line->moveTo( KoPoint( x1, y1 ) ); line->lineTo( KoPoint( x2, y2 ) ); appendPen( *line ); @@ -306,7 +306,7 @@ OoDrawImport::parseGroup( VGroup *parent, const QDomElement& parentobject ) else if( name == "polyline" ) // polyline { storeObjectStyles( o ); - VPath *polyline = new VPath( parent ); + VPath *polyline = new VPath( tqparent ); appendPoints( *polyline, o); appendPen( *polyline ); appendBrush( *polyline ); @@ -315,9 +315,9 @@ OoDrawImport::parseGroup( VGroup *parent, const QDomElement& parentobject ) else if( name == "polygon" ) // polygon { storeObjectStyles( o ); - //VPolygon *polygon = new VPolygon( parent ); + //VPolygon *polygon = new VPolygon( tqparent ); //polygon->load( o ); - VPath *polygon = new VPath( parent ); + VPath *polygon = new VPath( tqparent ); appendPoints( *polygon, o ); appendPen( *polygon ); appendBrush( *polygon ); @@ -326,14 +326,14 @@ OoDrawImport::parseGroup( VGroup *parent, const QDomElement& parentobject ) else if( name == "path" ) // path { storeObjectStyles( o ); - VPath *path = new VPath( parent ); - path->loadSvgPath( o.attributeNS( ooNS::svg, "d", QString::null ) ); + VPath *path = new VPath( tqparent ); + path->loadSvgPath( o.attributeNS( ooNS::svg, "d", TQString() ) ); KoRect rect = parseViewBox( o ); - double x = KoUnit::parseValue( o.attributeNS( ooNS::svg, "x", QString::null ) ); - double y = ymirror( KoUnit::parseValue( o.attributeNS( ooNS::svg, "y", QString::null ) ) ); - double w = KoUnit::parseValue( o.attributeNS( ooNS::svg, "width", QString::null ) ); - double h = KoUnit::parseValue( o.attributeNS( ooNS::svg, "height", QString::null ) ); - QWMatrix mat; + double x = KoUnit::parseValue( o.attributeNS( ooNS::svg, "x", TQString() ) ); + double y = ymirror( KoUnit::parseValue( o.attributeNS( ooNS::svg, "y", TQString() ) ) ); + double w = KoUnit::parseValue( o.attributeNS( ooNS::svg, "width", TQString() ) ); + double h = KoUnit::parseValue( o.attributeNS( ooNS::svg, "height", TQString() ) ); + TQWMatrix mat; mat.translate( x, y ); mat.scale( w / rect.width(), -h / rect.height() ); path->transform( mat ); @@ -353,8 +353,8 @@ appendImage( doc, e, pictureElement, o ); kdDebug() << "Unsupported object '" << name << "'" << endl; continue; } - if( parent && obj ) - parent->append( obj ); + if( tqparent && obj ) + tqparent->append( obj ); else if( obj ) m_document.append( obj ); } @@ -373,9 +373,9 @@ OoDrawImport::appendPen( VObject &obj ) stroke.setType( VStroke::solid ); else if( m_styleStack.attributeNS( ooNS::draw, "stroke" ) == "dash" ) { - QValueList dashes; + TQValueList dashes; stroke.setType( VStroke::solid ); - QString style = m_styleStack.attributeNS( ooNS::draw, "stroke-dash" ); + TQString style = m_styleStack.attributeNS( ooNS::draw, "stroke-dash" ); if( style == "Ultrafine Dashed" || style == "Fine Dashed (var)" || style == "Dashed (var)" ) stroke.dashPattern().setArray( dashes << 2 << 2 ); @@ -412,7 +412,7 @@ OoDrawImport::appendBrush( VObject &obj ) { if( m_styleStack.hasAttributeNS( ooNS::draw, "fill" ) ) { - const QString fill = m_styleStack.attributeNS( ooNS::draw, "fill" ); + const TQString fill = m_styleStack.attributeNS( ooNS::draw, "fill" ); VFill f; if( fill == "solid" ) @@ -430,25 +430,25 @@ OoDrawImport::appendBrush( VObject &obj ) VGradient gradient; gradient.clearStops(); gradient.setRepeatMethod( VGradient::none ); - QString style = m_styleStack.attributeNS( ooNS::draw, "fill-gradient-name" ); + TQString style = m_styleStack.attributeNS( ooNS::draw, "fill-gradient-name" ); - QDomElement* draw = m_draws[style]; + TQDomElement* draw = m_draws[style]; if( draw ) { double border = 0.0; if( draw->hasAttributeNS( ooNS::draw, "border" ) ) - border += draw->attributeNS( ooNS::draw, "border", QString::null ).remove( '%' ).toDouble() / 100.0; + border += draw->attributeNS( ooNS::draw, "border", TQString() ).remove( '%' ).toDouble() / 100.0; VColor c; - parseColor( c, draw->attributeNS( ooNS::draw, "start-color", QString::null ) ); + parseColor( c, draw->attributeNS( ooNS::draw, "start-color", TQString() ) ); gradient.addStop( c, border, 0.5 ); - parseColor( c, draw->attributeNS( ooNS::draw, "end-color", QString::null ) ); + parseColor( c, draw->attributeNS( ooNS::draw, "end-color", TQString() ) ); gradient.addStop( c, 1.0, 0.5 ); - QString type = draw->attributeNS( ooNS::draw, "style", QString::null ); + TQString type = draw->attributeNS( ooNS::draw, "style", TQString() ); if( type == "linear" || type == "axial" ) { gradient.setType( VGradient::linear ); - int angle = draw->attributeNS( ooNS::draw, "angle", QString::null ).toInt() / 10; + int angle = draw->attributeNS( ooNS::draw, "angle", TQString() ).toInt() / 10; // make sure the angle is between 0 and 359 angle = abs( angle ); @@ -515,12 +515,12 @@ OoDrawImport::appendBrush( VObject &obj ) // and (un-)balanced settings of kpresenter. Let's try it. double x, y; if( draw->hasAttributeNS( ooNS::draw, "cx" ) ) - x = draw->attributeNS( ooNS::draw, "cx", QString::null ).remove( '%' ).toDouble() / 100.0; + x = draw->attributeNS( ooNS::draw, "cx", TQString() ).remove( '%' ).toDouble() / 100.0; else x = 0.5; if( draw->hasAttributeNS( ooNS::draw, "cy" ) ) - y = draw->attributeNS( ooNS::draw, "cy", QString::null ).remove( '%' ).toDouble() / 100.0; + y = draw->attributeNS( ooNS::draw, "cy", TQString() ).remove( '%' ).toDouble() / 100.0; else y = 0.5; @@ -540,8 +540,8 @@ OoDrawImport::appendBrush( VObject &obj ) } /*else if( fill == "hatch" ) { -QDomElement brush = doc.createElement( "BRUSH" ); -QString style = m_styleStack.attributeNS( "fill-hatch-name" ); +TQDomElement brush = doc.createElement( "BRUSH" ); +TQString style = m_styleStack.attributeNS( "fill-hatch-name" ); if( style == "Black 0 Degrees" ) brush.setAttribute( "style", 9 ); else if( style == "Black 90 Degrees" ) @@ -555,7 +555,7 @@ brush.setAttribute( "style", 13 ); else if( style == "Red Crossed 45 Degrees" || style == "Blue Crossed 45 Degrees" ) brush.setAttribute( "style", 14 ); -QDomElement* draw = m_draws[style]; +TQDomElement* draw = m_draws[style]; if( draw && draw->hasAttributeNS( "color" ) ) brush.setAttribute( "color", draw->attributeNS( "color" ) ); e.appendChild( brush ); @@ -563,88 +563,88 @@ e.appendChild( brush ); } void -OoDrawImport::createStyleMap( QDomDocument &docstyles ) +OoDrawImport::createStyleMap( TQDomDocument &docstyles ) { - QDomElement styles = docstyles.documentElement(); + TQDomElement styles = docstyles.documentElement(); if( styles.isNull() ) return; - QDomNode fixedStyles = KoDom::namedItemNS( styles, ooNS::office, "styles" ); + TQDomNode fixedStyles = KoDom::namedItemNS( styles, ooNS::office, "styles" ); if( !fixedStyles.isNull() ) { insertDraws( fixedStyles.toElement() ); insertStyles( fixedStyles.toElement() ); } - QDomNode automaticStyles = KoDom::namedItemNS( styles, ooNS::office, "automatic-styles" ); + TQDomNode automaticStyles = KoDom::namedItemNS( styles, ooNS::office, "automatic-styles" ); if( !automaticStyles.isNull() ) insertStyles( automaticStyles.toElement() ); - QDomNode masterStyles = KoDom::namedItemNS( styles, ooNS::office, "master-styles" ); + TQDomNode masterStyles = KoDom::namedItemNS( styles, ooNS::office, "master-styles" ); if( !masterStyles.isNull() ) insertStyles( masterStyles.toElement() ); } void -OoDrawImport::insertDraws( const QDomElement& styles ) +OoDrawImport::insertDraws( const TQDomElement& styles ) { - for( QDomNode n = styles.firstChild(); !n.isNull(); n = n.nextSibling() ) + for( TQDomNode n = styles.firstChild(); !n.isNull(); n = n.nextSibling() ) { - QDomElement e = n.toElement(); + TQDomElement e = n.toElement(); if( !e.hasAttributeNS( ooNS::draw, "name" ) ) continue; - QString name = e.attributeNS( ooNS::draw, "name", QString::null ); - m_draws.insert( name, new QDomElement( e ) ); + TQString name = e.attributeNS( ooNS::draw, "name", TQString() ); + m_draws.insert( name, new TQDomElement( e ) ); } } void -OoDrawImport::insertStyles( const QDomElement& styles ) +OoDrawImport::insertStyles( const TQDomElement& styles ) { - for ( QDomNode n = styles.firstChild(); !n.isNull(); n = n.nextSibling() ) + for ( TQDomNode n = styles.firstChild(); !n.isNull(); n = n.nextSibling() ) { - QDomElement e = n.toElement(); + TQDomElement e = n.toElement(); if( !e.hasAttributeNS( ooNS::style, "name" ) ) continue; - QString name = e.attributeNS( ooNS::style, "name", QString::null ); - m_styles.insert( name, new QDomElement( e ) ); + TQString name = e.attributeNS( ooNS::style, "name", TQString() ); + m_styles.insert( name, new TQDomElement( e ) ); //kdDebug() << "Style: '" << name << "' loaded " << endl; } } void -OoDrawImport::fillStyleStack( const QDomElement& object ) +OoDrawImport::fillStyleStack( const TQDomElement& object ) { // find all styles associated with an object and push them on the stack if( object.hasAttributeNS( ooNS::presentation, "style-name" ) ) - addStyles( m_styles[object.attributeNS( ooNS::presentation, "style-name", QString::null )] ); + addStyles( m_styles[object.attributeNS( ooNS::presentation, "style-name", TQString() )] ); if( object.hasAttributeNS( ooNS::draw, "style-name" ) ) - addStyles( m_styles[object.attributeNS( ooNS::draw, "style-name", QString::null )] ); + addStyles( m_styles[object.attributeNS( ooNS::draw, "style-name", TQString() )] ); if( object.hasAttributeNS( ooNS::draw, "text-style-name" ) ) - addStyles( m_styles[object.attributeNS( ooNS::draw, "text-style-name", QString::null )] ); + addStyles( m_styles[object.attributeNS( ooNS::draw, "text-style-name", TQString() )] ); if( object.hasAttributeNS( ooNS::text, "style-name" ) ) - addStyles( m_styles[object.attributeNS( ooNS::text, "style-name", QString::null )] ); + addStyles( m_styles[object.attributeNS( ooNS::text, "style-name", TQString() )] ); } void -OoDrawImport::addStyles( const QDomElement* style ) +OoDrawImport::addStyles( const TQDomElement* style ) { - // this function is necessary as parent styles can have parents themself - if( style->hasAttributeNS( ooNS::style, "parent-style-name" ) ) - addStyles( m_styles[style->attributeNS( ooNS::style, "parent-style-name", QString::null )] ); + // this function is necessary as tqparent styles can have tqparents themself + if( style->hasAttributeNS( ooNS::style, "tqparent-style-name" ) ) + addStyles( m_styles[style->attributeNS( ooNS::style, "tqparent-style-name", TQString() )] ); m_styleStack.push( *style ); } void -OoDrawImport::storeObjectStyles( const QDomElement& object ) +OoDrawImport::storeObjectStyles( const TQDomElement& object ) { //m_styleStack.clearPageMark(); // remove styles of previous object fillStyleStack( object ); @@ -652,14 +652,14 @@ OoDrawImport::storeObjectStyles( const QDomElement& object ) } KoRect -OoDrawImport::parseViewBox( const QDomElement& object ) +OoDrawImport::parseViewBox( const TQDomElement& object ) { KoRect rect; - if( !object.attributeNS( ooNS::svg, "viewBox", QString::null ).isEmpty() ) + if( !object.attributeNS( ooNS::svg, "viewBox", TQString() ).isEmpty() ) { // allow for viewbox def with ',' or whitespace - QString viewbox( object.attributeNS( ooNS::svg, "viewBox", QString::null ) ); - QStringList points = QStringList::split( ' ', viewbox.replace( ',', ' ').simplifyWhiteSpace() ); + TQString viewbox( object.attributeNS( ooNS::svg, "viewBox", TQString() ) ); + TQStringList points = TQStringList::split( ' ', viewbox.tqreplace( ',', ' ').simplifyWhiteSpace() ); rect.setX( points[0].toFloat() ); rect.setY( points[1].toFloat() ); @@ -670,24 +670,24 @@ OoDrawImport::parseViewBox( const QDomElement& object ) } void -OoDrawImport::appendPoints(VPath &path, const QDomElement& object) +OoDrawImport::appendPoints(VPath &path, const TQDomElement& object) { - double x = KoUnit::parseValue( object.attributeNS( ooNS::svg, "x", QString::null ) ); - double y = KoUnit::parseValue( object.attributeNS( ooNS::svg, "y", QString::null ) ); - double w = KoUnit::parseValue( object.attributeNS( ooNS::svg, "width", QString::null ) ); - double h = KoUnit::parseValue( object.attributeNS( ooNS::svg, "height", QString::null ) ); + double x = KoUnit::parseValue( object.attributeNS( ooNS::svg, "x", TQString() ) ); + double y = KoUnit::parseValue( object.attributeNS( ooNS::svg, "y", TQString() ) ); + double w = KoUnit::parseValue( object.attributeNS( ooNS::svg, "width", TQString() ) ); + double h = KoUnit::parseValue( object.attributeNS( ooNS::svg, "height", TQString() ) ); KoRect rect = parseViewBox( object ); rect.setX( rect.x() + x ); rect.setY( rect.y() + y ); - QStringList ptList = QStringList::split( ' ', object.attributeNS( ooNS::draw, "points", QString::null ) ); + TQStringList ptList = TQStringList::split( ' ', object.attributeNS( ooNS::draw, "points", TQString() ) ); - QString pt_x, pt_y; + TQString pt_x, pt_y; double tmp_x, tmp_y; KoPoint point; bool bFirst = true; - for( QStringList::Iterator it = ptList.begin(); it != ptList.end(); ++it ) + for( TQStringList::Iterator it = ptList.begin(); it != ptList.end(); ++it ) { tmp_x = rect.x() + ( (*it).section( ',', 0, 0 ).toInt() * w ) / rect.width(); tmp_y = rect.y() + ( (*it).section( ',', 1, 1 ).toInt() * h ) / rect.height(); @@ -705,41 +705,41 @@ OoDrawImport::appendPoints(VPath &path, const QDomElement& object) } void -OoDrawImport::parseColor( VColor &color, const QString &s ) +OoDrawImport::parseColor( VColor &color, const TQString &s ) { if( s.startsWith( "rgb(" ) ) { - QString parse = s.stripWhiteSpace(); - QStringList colors = QStringList::split( ',', parse ); - QString r = colors[0].right( ( colors[0].length() - 4 ) ); - QString g = colors[1]; - QString b = colors[2].left( ( colors[2].length() - 1 ) ); + TQString parse = s.stripWhiteSpace(); + TQStringList colors = TQStringList::split( ',', parse ); + TQString r = colors[0].right( ( colors[0].length() - 4 ) ); + TQString g = colors[1]; + TQString b = colors[2].left( ( colors[2].length() - 1 ) ); - if( r.contains( "%" ) ) + if( r.tqcontains( "%" ) ) { r = r.left( r.length() - 1 ); - r = QString::number( int( ( double( 255 * r.toDouble() ) / 100.0 ) ) ); + r = TQString::number( int( ( double( 255 * r.toDouble() ) / 100.0 ) ) ); } - if( g.contains( "%" ) ) + if( g.tqcontains( "%" ) ) { g = g.left( g.length() - 1 ); - g = QString::number( int( ( double( 255 * g.toDouble() ) / 100.0 ) ) ); + g = TQString::number( int( ( double( 255 * g.toDouble() ) / 100.0 ) ) ); } - if( b.contains( "%" ) ) + if( b.tqcontains( "%" ) ) { b = b.left( b.length() - 1 ); - b = QString::number( int( ( double( 255 * b.toDouble() ) / 100.0 ) ) ); + b = TQString::number( int( ( double( 255 * b.toDouble() ) / 100.0 ) ) ); } - QColor c( r.toInt(), g.toInt(), b.toInt() ); + TQColor c( r.toInt(), g.toInt(), b.toInt() ); color.set( c.red() / 255.0, c.green() / 255.0, c.blue() / 255.0 ); } else { - QString rgbColor = s.stripWhiteSpace(); - QColor c; + TQString rgbColor = s.stripWhiteSpace(); + TQColor c; if( rgbColor.startsWith( "#" ) ) c.setNamedColor( rgbColor ); //else diff --git a/filters/karbon/oodraw/oodrawimport.h b/filters/karbon/oodraw/oodrawimport.h index 06e664ac..ea29b276 100644 --- a/filters/karbon/oodraw/oodrawimport.h +++ b/filters/karbon/oodraw/oodrawimport.h @@ -23,9 +23,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include #include #include @@ -38,38 +38,39 @@ class VGroup; class OoDrawImport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - OoDrawImport( KoFilter *parent, const char *name, const QStringList & ); + OoDrawImport( KoFilter *tqparent, const char *name, const TQStringList & ); virtual ~OoDrawImport(); - virtual KoFilter::ConversionStatus convert( QCString const & from, QCString const & to ); + virtual KoFilter::ConversiontqStatus convert( TQCString const & from, TQCString const & to ); private: - void createDocumentInfo( QDomDocument &docinfo ); - - void createStyleMap( QDomDocument &docstyles ); - void insertStyles( const QDomElement& styles ); - void insertDraws( const QDomElement& styles ); - void fillStyleStack( const QDomElement& object ); - void addStyles( const QDomElement* style ); - void storeObjectStyles( const QDomElement& object ); + void createDocumentInfo( TQDomDocument &docinfo ); + + void createStyleMap( TQDomDocument &docstyles ); + void insertStyles( const TQDomElement& styles ); + void insertDraws( const TQDomElement& styles ); + void fillStyleStack( const TQDomElement& object ); + void addStyles( const TQDomElement* style ); + void storeObjectStyles( const TQDomElement& object ); void appendPen( VObject &obj ); void appendBrush( VObject &obj ); - void appendPoints(VPath &path, const QDomElement& object); + void appendPoints(VPath &path, const TQDomElement& object); void convert(); - void parseGroup( VGroup *parent, const QDomElement& object ); - void parseColor( VColor &color, const QString &s ); + void parseGroup( VGroup *tqparent, const TQDomElement& object ); + void parseColor( VColor &color, const TQString &s ); double ymirror( double y ); - KoRect parseViewBox( const QDomElement& object ); + KoRect parseViewBox( const TQDomElement& object ); - KoFilter::ConversionStatus openFile(); - KoFilter::ConversionStatus loadAndParse(const QString& filename, QDomDocument& doc); + KoFilter::ConversiontqStatus openFile(); + KoFilter::ConversiontqStatus loadAndParse(const TQString& filename, TQDomDocument& doc); VDocument m_document; - QDomDocument m_content; - QDomDocument m_meta; - QDomDocument m_settings; - QDict m_styles, m_draws; + TQDomDocument m_content; + TQDomDocument m_meta; + TQDomDocument m_settings; + TQDict m_styles, m_draws; KoStyleStack m_styleStack; KZip * m_zip; diff --git a/filters/karbon/png/pngexport.cc b/filters/karbon/png/pngexport.cc index 652074e9..4de61a44 100644 --- a/filters/karbon/png/pngexport.cc +++ b/filters/karbon/png/pngexport.cc @@ -17,12 +17,12 @@ * Boston, MA 02110-1301, USA. */ -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include @@ -43,13 +43,13 @@ typedef KGenericFactory PngExportFactory; K_EXPORT_COMPONENT_FACTORY( libkarbonpngexport, PngExportFactory( "kofficefilters" ) ) -PngExport::PngExport( KoFilter*, const char*, const QStringList& ) +PngExport::PngExport( KoFilter*, const char*, const TQStringList& ) : KoFilter() { } -KoFilter::ConversionStatus -PngExport::convert( const QCString& from, const QCString& to ) +KoFilter::ConversiontqStatus +PngExport::convert( const TQCString& from, const TQCString& to ) { if ( to != "image/png" || from != "application/x-karbon" ) { @@ -60,9 +60,9 @@ PngExport::convert( const QCString& from, const QCString& to ) if( !storeIn ) return KoFilter::StupidError; - QDomDocument domIn; + TQDomDocument domIn; domIn.setContent( storeIn ); - QDomElement docNode = domIn.documentElement(); + TQDomElement docNode = domIn.documentElement(); // load the document and export it: VDocument doc; @@ -74,18 +74,18 @@ PngExport::convert( const QCString& from, const QCString& to ) const KoRect &rect = bbox.boundingRect(); // create image with correct width and height - QImage img( int( rect.width() ), int( rect.height() ), 32 ); + TQImage img( int( rect.width() ), int( rect.height() ), 32 ); //img.setAlphaBuffer( true ); // Create painter and set up objects to draw VKoPainter p( img.bits(), rect.width(), rect.height() ); - p.clear( qRgba( 0xFF, 0xFF, 0xFF, 0xFF ) ); - p.setWorldMatrix( QWMatrix().translate( -rect.x(), -rect.y() ) ); + p.clear( tqRgba( 0xFF, 0xFF, 0xFF, 0xFF ) ); + p.setWorldMatrix( TQWMatrix().translate( -rect.x(), -rect.y() ) ); doc.draw( &p, &rect ); - QImage image = img.swapRGB(); - QImage mirrored = image.mirror( false, true ); + TQImage image = img.swapRGB(); + TQImage mirrored = image.mirror( false, true ); // save png mirrored.save( m_chain->outputFile(), "PNG" ); diff --git a/filters/karbon/png/pngexport.h b/filters/karbon/png/pngexport.h index a14e81c8..9fe9f7eb 100644 --- a/filters/karbon/png/pngexport.h +++ b/filters/karbon/png/pngexport.h @@ -27,12 +27,13 @@ class PngExport : public KoFilter, private VVisitor { Q_OBJECT + TQ_OBJECT public: - PngExport( KoFilter* parent, const char* name, const QStringList& ); + PngExport( KoFilter* tqparent, const char* name, const TQStringList& ); virtual ~PngExport() {} - virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to ); }; #endif diff --git a/filters/karbon/svg/color.h b/filters/karbon/svg/color.h index bfdc93c6..49bc2e52 100644 --- a/filters/karbon/svg/color.h +++ b/filters/karbon/svg/color.h @@ -6,7 +6,7 @@ g = green; \ } -void keywordToRGB( QString rgbColor, int &r, int &g, int &b ) +void keywordToRGB( TQString rgbColor, int &r, int &g, int &b ) { if( rgbColor == "aliceblue" ) TORGB( 240, 248, 255) @@ -206,7 +206,7 @@ void keywordToRGB( QString rgbColor, int &r, int &g, int &b ) TORGB( 245, 255, 250 ) else if( rgbColor == "mistyrose" ) TORGB( 255, 228, 225 ) - else if( rgbColor == "moccasin" ) + else if( rgbColor == "tqmoccasin" ) TORGB( 255, 228, 181 ) else if( rgbColor == "navajowhite" ) TORGB( 255, 222, 173 ) diff --git a/filters/karbon/svg/svgexport.cc b/filters/karbon/svg/svgexport.cc index 4f434d4d..2e661039 100644 --- a/filters/karbon/svg/svgexport.cc +++ b/filters/karbon/svg/svgexport.cc @@ -17,11 +17,11 @@ * Boston, MA 02110-1301, USA. */ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -48,10 +48,10 @@ #include -QString INDENT(" "); +TQString INDENT(" "); void -printIndentation( QTextStream *stream, unsigned int indent ) +printIndentation( TQTextStream *stream, unsigned int indent ) { for( unsigned int i = 0; i < indent;++i) *stream << INDENT; @@ -61,14 +61,14 @@ typedef KGenericFactory SvgExportFactory; K_EXPORT_COMPONENT_FACTORY( libkarbonsvgexport, SvgExportFactory( "kofficefilters" ) ) -SvgExport::SvgExport( KoFilter*, const char*, const QStringList& ) +SvgExport::SvgExport( KoFilter*, const char*, const TQStringList& ) : KoFilter(), m_indent( 0 ), m_indent2( 0 ), m_trans( 0L ) { m_gc.setAutoDelete( true ); } -KoFilter::ConversionStatus -SvgExport::convert( const QCString& from, const QCString& to ) +KoFilter::ConversiontqStatus +SvgExport::convert( const TQCString& from, const TQCString& to ) { if ( to != "image/svg+xml" || from != "application/x-karbon" ) { @@ -79,22 +79,22 @@ SvgExport::convert( const QCString& from, const QCString& to ) if( !storeIn ) return KoFilter::StupidError; - QFile fileOut( m_chain->outputFile() ); + TQFile fileOut( m_chain->outputFile() ); if( !fileOut.open( IO_WriteOnly ) ) { delete storeIn; return KoFilter::StupidError; } - QDomDocument domIn; + TQDomDocument domIn; domIn.setContent( storeIn ); - QDomElement docNode = domIn.documentElement(); + TQDomElement docNode = domIn.documentElement(); - m_stream = new QTextStream( &fileOut ); - QString body; - m_body = new QTextStream( &body, IO_ReadWrite ); - QString defs; - m_defs = new QTextStream( &defs, IO_ReadWrite ); + m_stream = new TQTextStream( &fileOut ); + TQString body; + m_body = new TQTextStream( &body, IO_ReadWrite ); + TQString defs; + m_defs = new TQTextStream( &defs, IO_ReadWrite ); // load the document and export it: VDocument doc; @@ -149,7 +149,7 @@ SvgExport::visitVDocument( VDocument& document ) SvgGraphicsContext *gc = new SvgGraphicsContext; m_gc.push( gc ); - QWMatrix mat; + TQWMatrix mat; mat.scale( 1, -1 ); mat.translate( 0, -document.height() ); @@ -167,12 +167,12 @@ SvgExport::visitVDocument( VDocument& document ) *m_body << "" << endl; } -QString +TQString SvgExport::getID( VObject *obj ) { if( obj && !obj->name().isEmpty() ) - return QString( " id=\"%1\"" ).arg( obj->name() ); - return QString(); + return TQString( " id=\"%1\"" ).tqarg( obj->name() ); + return TQString(); } void @@ -213,7 +213,7 @@ SvgExport::visitVLayer( VLayer& layer ) } void -SvgExport::writePathToStream( VPath &composite, const QString &id, QTextStream *stream, unsigned int indent ) +SvgExport::writePathToStream( VPath &composite, const TQString &id, TQTextStream *stream, unsigned int indent ) { if( ! stream ) return; @@ -226,7 +226,7 @@ SvgExport::writePathToStream( VPath &composite, const QString &id, QTextStream * getFill( *( composite.fill() ), stream ); getStroke( *( composite.stroke() ), stream ); - QString d; + TQString d; composite.saveSvgPath( d ); *stream << " d=\"" << d << "\" "; @@ -254,15 +254,15 @@ SvgExport::visitVSubpath( VSubpath& ) { } -QString createUID() +TQString createUID() { static unsigned int nr = 0; - return "defitem" + QString().setNum( nr++ ); + return "defitem" + TQString().setNum( nr++ ); } void -SvgExport::getColorStops( const QPtrVector &colorStops ) +SvgExport::getColorStops( const TQPtrVector &colorStops ) { m_indent2++; for( unsigned int i = 0; i < colorStops.count() ; i++ ) @@ -270,7 +270,7 @@ SvgExport::getColorStops( const QPtrVector &colorStops ) printIndentation( m_defs, m_indent2 ); *m_defs << "color ); - *m_defs << "\" offset=\"" << QString().setNum( colorStops.at( i )->rampPoint ); + *m_defs << "\" offset=\"" << TQString().setNum( colorStops.at( i )->rampPoint ); *m_defs << "\" stop-opacity=\"" << colorStops.at( i )->color.opacity() << "\"" << " />" << endl; } m_indent2--; @@ -279,7 +279,7 @@ SvgExport::getColorStops( const QPtrVector &colorStops ) void SvgExport::getGradient( const VGradient& grad ) { - QString uid = createUID(); + TQString uid = createUID(); if( grad.type() == VGradient::linear ) { printIndentation( m_defs, m_indent2 ); @@ -314,7 +314,7 @@ SvgExport::getGradient( const VGradient& grad ) *m_defs << "fx=\"" << grad.focalPoint().x() << "\" "; *m_defs << "fy=\"" << grad.focalPoint().y() << "\" "; double r = sqrt( pow( grad.vector().x() - grad.origin().x(), 2 ) + pow( grad.vector().y() - grad.origin().y(), 2 ) ); - *m_defs << "r=\"" << QString().setNum( r ) << "\" "; + *m_defs << "r=\"" << TQString().setNum( r ) << "\" "; if( grad.repeatMethod() == VGradient::reflect ) *m_defs << "spreadMethod=\"reflect\" "; else if( grad.repeatMethod() == VGradient::repeat ) @@ -341,7 +341,7 @@ SvgExport::getGradient( const VGradient& grad ) *m_defs << "fx=\"" << grad.focalPoint().x() << "\" "; *m_defs << "fy=\"" << grad.focalPoint().y() << "\" "; double r = sqrt( pow( grad.vector().x() - grad.origin().x(), 2 ) + pow( grad.vector().y() - grad.origin().y(), 2 ) ); - *m_defs << "r=\"" << QString().setNum( r ) << "\" "; + *m_defs << "r=\"" << TQString().setNum( r ) << "\" "; if( grad.repeatMethod() == VGradient::reflect ) *m_defs << "spreadMethod=\"reflect\" "; else if( grad.repeatMethod() == VGradient::repeat ) @@ -361,7 +361,7 @@ SvgExport::getGradient( const VGradient& grad ) void SvgExport::getPattern( const VPattern & ) { - QString uid = createUID(); + TQString uid = createUID(); printIndentation( m_defs, m_indent2 ); *m_defs << "stroke.type() ) { @@ -443,7 +443,7 @@ SvgExport::getStroke( const VStroke& stroke, QTextStream *stream ) *stream << " stroke-dashoffset=\"" << stroke.dashPattern().offset() << "\""; *stream << " stroke-dasharray=\" "; - QValueListConstIterator itr; + TQValueListConstIterator itr; for(itr = stroke.dashPattern().array().begin(); itr != stroke.dashPattern().array().end(); ++itr ) { *stream << *itr << " "; @@ -453,11 +453,11 @@ SvgExport::getStroke( const VStroke& stroke, QTextStream *stream ) } void -SvgExport::getHexColor( QTextStream *stream, const VColor& color ) +SvgExport::getHexColor( TQTextStream *stream, const VColor& color ) { // Convert the various color-spaces to hex - QString Output; + TQString Output; VColor copy( color ); copy.setColorSpace( VColor::rgb ); @@ -475,7 +475,7 @@ SvgExport::visitVText( VText& text ) m_trans->visitVPath( path ); - QString id = createUID(); + TQString id = createUID(); writePathToStream( path, " id=\""+ id + "\"", m_defs, m_indent2 ); printIndentation( m_body, m_indent++ ); @@ -490,9 +490,9 @@ SvgExport::visitVText( VText& text ) *m_body << " font-weight=\"bold\""; if( text.font().italic() ) *m_body << " font-style=\"italic\""; - if( text.alignment() == VText::Center ) + if( text.tqalignment() == VText::Center ) *m_body << " text-anchor=\"middle\""; - else if( text.alignment() == VText::Right ) + else if( text.tqalignment() == VText::Right ) *m_body << " text-anchor=\"end\""; *m_body << ">" << endl; diff --git a/filters/karbon/svg/svgexport.h b/filters/karbon/svg/svgexport.h index 8a4eab63..6a79fb07 100644 --- a/filters/karbon/svg/svgexport.h +++ b/filters/karbon/svg/svgexport.h @@ -27,9 +27,9 @@ #include "svggraphiccontext.h" -#include +#include -class QTextStream; +class TQTextStream; class VColor; class VPath; class VDocument; @@ -46,12 +46,13 @@ class VTransformCmd; class SvgExport : public KoFilter, private VVisitor { Q_OBJECT + TQ_OBJECT public: - SvgExport( KoFilter* parent, const char* name, const QStringList& ); + SvgExport( KoFilter* tqparent, const char* name, const TQStringList& ); virtual ~SvgExport() {} - virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to ); private: virtual void visitVPath( VPath& composite ); @@ -62,21 +63,21 @@ private: virtual void visitVSubpath( VSubpath& path ); virtual void visitVText( VText& text ); - void getStroke( const VStroke& stroke, QTextStream *stream ); - void getColorStops( const QPtrVector &colorStops ); - void getFill( const VFill& fill, QTextStream *stream ); + void getStroke( const VStroke& stroke, TQTextStream *stream ); + void getColorStops( const TQPtrVector &colorStops ); + void getFill( const VFill& fill, TQTextStream *stream ); void getGradient( const VGradient& grad ); void getPattern( const VPattern& patt ); - void getHexColor( QTextStream *, const VColor& color ); - QString getID( VObject *obj ); + void getHexColor( TQTextStream *, const VColor& color ); + TQString getID( VObject *obj ); - void writePathToStream( VPath &composite, const QString &id, QTextStream *stream, unsigned int indent ); + void writePathToStream( VPath &composite, const TQString &id, TQTextStream *stream, unsigned int indent ); - QTextStream* m_stream; - QTextStream* m_defs; - QTextStream* m_body; + TQTextStream* m_stream; + TQTextStream* m_defs; + TQTextStream* m_body; - QPtrStack m_gc; + TQPtrStack m_gc; unsigned int m_indent; unsigned int m_indent2; diff --git a/filters/karbon/svg/svggraphiccontext.h b/filters/karbon/svg/svggraphiccontext.h index 96737fd9..e9d5eb4b 100644 --- a/filters/karbon/svg/svggraphiccontext.h +++ b/filters/karbon/svg/svggraphiccontext.h @@ -33,16 +33,16 @@ public: stroke.setLineWidth( 1.0 ); stroke.setLineCap( VStroke::capButt ); stroke.setLineJoin( VStroke::joinMiter ); - fill.setColor( VColor( Qt::black ) ); + fill.setColor( VColor( TQt::black ) ); fillRule = winding; - color = Qt::black; + color = TQt::black; } VFill fill; VFillRule fillRule; VStroke stroke; - QWMatrix matrix; - QFont font; - QColor color; + TQWMatrix matrix; + TQFont font; + TQColor color; }; #endif diff --git a/filters/karbon/svg/svgimport.cc b/filters/karbon/svg/svgimport.cc index f97546c6..b8b580f7 100644 --- a/filters/karbon/svg/svgimport.cc +++ b/filters/karbon/svg/svgimport.cc @@ -35,15 +35,15 @@ #include #include #include -#include -#include -#include +#include +#include +#include #include typedef KGenericFactory SvgImportFactory; K_EXPORT_COMPONENT_FACTORY( libkarbonsvgimport, SvgImportFactory( "kofficefilters" ) ) -SvgImport::SvgImport(KoFilter *, const char *, const QStringList&) : +SvgImport::SvgImport(KoFilter *, const char *, const TQStringList&) : KoFilter(), outdoc( "DOC" ) { @@ -54,20 +54,20 @@ SvgImport::~SvgImport() { } -KoFilter::ConversionStatus SvgImport::convert(const QCString& from, const QCString& to) +KoFilter::ConversiontqStatus SvgImport::convert(const TQCString& from, const TQCString& to) { // check for proper conversion if( to != "application/x-karbon" || from != "image/svg+xml" ) return KoFilter::NotImplemented; //Find the last extension - QString strExt; - QString fileIn ( m_chain->inputFile() ); - const int result=fileIn.findRev('.'); + TQString strExt; + TQString fileIn ( m_chain->inputFile() ); + const int result=fileIn.tqfindRev('.'); if (result>=0) strExt=fileIn.mid(result).lower(); - QString strMime; // Mime type of the compressor + TQString strMime; // Mime type of the compressor if ((strExt==".gz") //in case of .svg.gz (logical extension) ||(strExt==".svgz")) //in case of .svgz (extension used prioritary) strMime="application/x-gzip"; // Compressed with gzip @@ -78,7 +78,7 @@ KoFilter::ConversionStatus SvgImport::convert(const QCString& from, const QCStri /*kdDebug(30514) << "File extension: -" << strExt << "- Compression: " << strMime << endl;*/ - QIODevice* in = KFilterDev::deviceForFile(fileIn,strMime); + TQIODevice* in = KFilterDev::deviceForFile(fileIn,strMime); if (!in->open(IO_ReadOnly)) { @@ -88,7 +88,7 @@ KoFilter::ConversionStatus SvgImport::convert(const QCString& from, const QCStri } int line, col; - QString errormessage; + TQString errormessage; const bool parsed=inpdoc.setContent( in, &errormessage, &line, &col ); @@ -107,7 +107,7 @@ KoFilter::ConversionStatus SvgImport::convert(const QCString& from, const QCStri // Do the conversion! convert(); // add paper info, we always need custom for svg (Rob) - QDomElement paper = outdoc.createElement( "PAPER" ); + TQDomElement paper = outdoc.createElement( "PAPER" ); outdoc.documentElement().appendChild( paper ); paper.setAttribute( "format", PG_CUSTOM ); paper.setAttribute( "width", m_document.width() ); @@ -119,7 +119,7 @@ KoFilter::ConversionStatus SvgImport::convert(const QCString& from, const QCStri kdError(30514) << "Unable to open output file!" << endl; return KoFilter::StorageCreationError; } - QCString cstring = outdoc.toCString(); // utf-8 already + TQCString cstring = outdoc.toCString(); // utf-8 already out->writeBlock( cstring.data(), cstring.length() ); return KoFilter::OK; // was successful @@ -128,7 +128,7 @@ KoFilter::ConversionStatus SvgImport::convert(const QCString& from, const QCStri void SvgImport::convert() { SvgGraphicsContext *gc = new SvgGraphicsContext; - QDomElement docElem = inpdoc.documentElement(); + TQDomElement docElem = inpdoc.documentElement(); KoRect bbox( 0, 0, 550.0, 841.0 ); double width = !docElem.attribute( "width" ).isEmpty() ? parseUnit( docElem.attribute( "width" ), true, false, bbox ) : 550.0; double height = !docElem.attribute( "height" ).isEmpty() ? parseUnit( docElem.attribute( "height" ), false, true, bbox ) : 841.0; @@ -138,12 +138,12 @@ void SvgImport::convert() m_outerRect = m_document.boundingBox(); // undo y-mirroring - //m_debug->append(QString("%1\tUndo Y-mirroring.").arg(m_time.elapsed())); + //m_debug->append(TQString("%1\tUndo Y-mirroring.").tqarg(m_time.elapsed())); if( !docElem.attribute( "viewBox" ).isEmpty() ) { // allow for viewbox def with ',' or whitespace - QString viewbox( docElem.attribute( "viewBox" ) ); - QStringList points = QStringList::split( ' ', viewbox.replace( ',', ' ').simplifyWhiteSpace() ); + TQString viewbox( docElem.attribute( "viewBox" ) ); + TQStringList points = TQStringList::split( ' ', viewbox.tqreplace( ',', ' ').simplifyWhiteSpace() ); gc->matrix.scale( width / points[2].toFloat() , height / points[3].toFloat() ); m_outerRect.setWidth( m_outerRect.width() * ( points[2].toFloat() / width ) ); @@ -153,7 +153,7 @@ void SvgImport::convert() m_gc.push( gc ); parseGroup( 0L, docElem ); - QWMatrix mat; + TQWMatrix mat; mat.scale( 1, -1 ); mat.translate( 0, -m_document.height() ); VTransformCmd trafo( 0L, mat ); @@ -166,7 +166,7 @@ void SvgImport::convert() // Helper functions // --------------------------------------------------------------------------------------- -double SvgImport::toPercentage( QString s ) +double SvgImport::toPercentage( TQString s ) { if( s.endsWith( "%" ) ) return s.remove( '%' ).toDouble(); @@ -174,7 +174,7 @@ double SvgImport::toPercentage( QString s ) return s.toDouble() * 100.0; } -double SvgImport::fromPercentage( QString s ) +double SvgImport::fromPercentage( TQString s ) { if( s.endsWith( "%" ) ) return s.remove( '%' ).toDouble() / 100.0; @@ -182,7 +182,7 @@ double SvgImport::fromPercentage( QString s ) return s.toDouble(); } -double SvgImport::getScalingFromMatrix( QWMatrix &matrix ) +double SvgImport::getScalingFromMatrix( TQWMatrix &matrix ) { double xscale = matrix.m11() + matrix.m12(); double yscale = matrix.m22() + matrix.m21(); @@ -258,15 +258,15 @@ void SvgImport::addGraphicContext() m_gc.push( gc ); } -void SvgImport::setupTransform( const QDomElement &e ) +void SvgImport::setupTransform( const TQDomElement &e ) { SvgGraphicsContext *gc = m_gc.current(); - QWMatrix mat = VPath::parseTransform( e.attribute( "transform" ) ); + TQWMatrix mat = VPath::parseTransform( e.attribute( "transform" ) ); gc->matrix = mat * gc->matrix; } -VObject* SvgImport::findObject( const QString &name, VGroup* group ) +VObject* SvgImport::findObject( const TQString &name, VGroup* group ) { if( ! group ) return 0L; @@ -290,9 +290,9 @@ VObject* SvgImport::findObject( const QString &name, VGroup* group ) return 0L; } -VObject* SvgImport::findObject( const QString &name ) +VObject* SvgImport::findObject( const TQString &name ) { - QPtrVector vector; + TQPtrVector vector; m_document.layers().toVector( &vector ); for( int i = vector.count() - 1; i >= 0; i-- ) { @@ -307,22 +307,22 @@ VObject* SvgImport::findObject( const QString &name ) return 0L; } -SvgImport::GradientHelper* SvgImport::findGradient( const QString &id, const QString &href) +SvgImport::GradientHelper* SvgImport::findGradient( const TQString &id, const TQString &href) { // check if gradient was already parsed, and return it - if( m_gradients.contains( id ) ) + if( m_gradients.tqcontains( id ) ) return &m_gradients[ id ]; // check if gradient was stored for later parsing - if( !m_defs.contains( id ) ) + if( !m_defs.tqcontains( id ) ) return 0L; - QDomElement e = m_defs[ id ]; + TQDomElement e = m_defs[ id ]; if(e.childNodes().count() == 0) { - QString mhref = e.attribute("xlink:href").mid(1); + TQString mhref = e.attribute("xlink:href").mid(1); - if(m_defs.contains(mhref)) + if(m_defs.tqcontains(mhref)) return findGradient(mhref, id); else return 0L; @@ -334,22 +334,22 @@ SvgImport::GradientHelper* SvgImport::findGradient( const QString &id, const QSt } // return successfully parsed gradient or NULL - QString n; + TQString n; if(href.isEmpty()) n = id; else n = href; - if( m_gradients.contains( n ) ) + if( m_gradients.tqcontains( n ) ) return &m_gradients[ n ]; else return 0L; } -QDomElement SvgImport::mergeStyles( const QDomElement &referencedBy, const QDomElement &referencedElement ) +TQDomElement SvgImport::mergeStyles( const TQDomElement &referencedBy, const TQDomElement &referencedElement ) { // First use all the style attributes of the element being referenced. - QDomElement e = referencedElement; + TQDomElement e = referencedElement; // Now go through the style attributes of the element that is referencing and substitute the original ones. if( !referencedBy.attribute( "color" ).isEmpty() ) @@ -388,7 +388,7 @@ QDomElement SvgImport::mergeStyles( const QDomElement &referencedBy, const QDomE // Parsing functions // --------------------------------------------------------------------------------------- -double SvgImport::parseUnit( const QString &unit, bool horiz, bool vert, KoRect bbox ) +double SvgImport::parseUnit( const TQString &unit, bool horiz, bool vert, KoRect bbox ) { // TODO : percentage? double value = 0; @@ -439,42 +439,42 @@ double SvgImport::parseUnit( const QString &unit, bool horiz, bool vert, KoRect return value; } -QColor SvgImport::parseColor( const QString &rgbColor ) +TQColor SvgImport::parseColor( const TQString &rgbColor ) { int r, g, b; keywordToRGB( rgbColor, r, g, b ); - return QColor( r, g, b ); + return TQColor( r, g, b ); } -void SvgImport::parseColor( VColor &color, const QString &s ) +void SvgImport::parseColor( VColor &color, const TQString &s ) { if( s.startsWith( "rgb(" ) ) { - QString parse = s.stripWhiteSpace(); - QStringList colors = QStringList::split( ',', parse ); - QString r = colors[0].right( ( colors[0].length() - 4 ) ); - QString g = colors[1]; - QString b = colors[2].left( ( colors[2].length() - 1 ) ); + TQString parse = s.stripWhiteSpace(); + TQStringList colors = TQStringList::split( ',', parse ); + TQString r = colors[0].right( ( colors[0].length() - 4 ) ); + TQString g = colors[1]; + TQString b = colors[2].left( ( colors[2].length() - 1 ) ); - if( r.contains( "%" ) ) + if( r.tqcontains( "%" ) ) { r = r.left( r.length() - 1 ); - r = QString::number( int( ( double( 255 * r.toDouble() ) / 100.0 ) ) ); + r = TQString::number( int( ( double( 255 * r.toDouble() ) / 100.0 ) ) ); } - if( g.contains( "%" ) ) + if( g.tqcontains( "%" ) ) { g = g.left( g.length() - 1 ); - g = QString::number( int( ( double( 255 * g.toDouble() ) / 100.0 ) ) ); + g = TQString::number( int( ( double( 255 * g.toDouble() ) / 100.0 ) ) ); } - if( b.contains( "%" ) ) + if( b.tqcontains( "%" ) ) { b = b.left( b.length() - 1 ); - b = QString::number( int( ( double( 255 * b.toDouble() ) / 100.0 ) ) ); + b = TQString::number( int( ( double( 255 * b.toDouble() ) / 100.0 ) ) ); } - QColor c( r.toInt(), g.toInt(), b.toInt() ); + TQColor c( r.toInt(), g.toInt(), b.toInt() ); color.set( c.red() / 255.0, c.green() / 255.0, c.blue() / 255.0 ); } else if( s == "currentColor" ) @@ -484,8 +484,8 @@ void SvgImport::parseColor( VColor &color, const QString &s ) } else { - QString rgbColor = s.stripWhiteSpace(); - QColor c; + TQString rgbColor = s.stripWhiteSpace(); + TQColor c; if( rgbColor.startsWith( "#" ) ) c.setNamedColor( rgbColor ); else @@ -494,17 +494,17 @@ void SvgImport::parseColor( VColor &color, const QString &s ) } } -void SvgImport::parseColorStops( VGradient *gradient, const QDomElement &e ) +void SvgImport::parseColorStops( VGradient *gradient, const TQDomElement &e ) { VColor c; - for( QDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling() ) + for( TQDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling() ) { - QDomElement stop = n.toElement(); + TQDomElement stop = n.toElement(); if( stop.tagName() == "stop" ) { float offset; - QString temp = stop.attribute( "offset" ); - if( temp.contains( '%' ) ) + TQString temp = stop.attribute( "offset" ); + if( temp.tqcontains( '%' ) ) { temp = temp.left( temp.length() - 1 ); offset = temp.toFloat() / 100.0; @@ -517,13 +517,13 @@ void SvgImport::parseColorStops( VGradient *gradient, const QDomElement &e ) else { // try style attr - QString style = stop.attribute( "style" ).simplifyWhiteSpace(); - QStringList substyles = QStringList::split( ';', style ); - for( QStringList::Iterator it = substyles.begin(); it != substyles.end(); ++it ) + TQString style = stop.attribute( "style" ).simplifyWhiteSpace(); + TQStringList substyles = TQStringList::split( ';', style ); + for( TQStringList::Iterator it = substyles.begin(); it != substyles.end(); ++it ) { - QStringList substyle = QStringList::split( ':', (*it) ); - QString command = substyle[0].stripWhiteSpace(); - QString params = substyle[1].stripWhiteSpace(); + TQStringList substyle = TQStringList::split( ':', (*it) ); + TQString command = substyle[0].stripWhiteSpace(); + TQString params = substyle[1].stripWhiteSpace(); if( command == "stop-color" ) parseColor( c, params ); if( command == "stop-opacity" ) @@ -538,7 +538,7 @@ void SvgImport::parseColorStops( VGradient *gradient, const QDomElement &e ) } } -void SvgImport::parseGradient( const QDomElement &e , const QDomElement &referencedBy) +void SvgImport::parseGradient( const TQDomElement &e , const TQDomElement &referencedBy) { // IMPROVEMENTS: // - Store the parsed colorstops in some sort of a cache so they don't need to be parsed again. @@ -555,7 +555,7 @@ void SvgImport::parseGradient( const QDomElement &e , const QDomElement &referen if(e.childNodes().count() == 0) { - QString href = e.attribute("xlink:href").mid(1); + TQString href = e.attribute("xlink:href").mid(1); if(href.isEmpty()) { @@ -572,17 +572,17 @@ void SvgImport::parseGradient( const QDomElement &e , const QDomElement &referen } // Use the gradient that is referencing, or if there isn't one, the original gradient. - QDomElement b; + TQDomElement b; if( !referencedBy.isNull() ) b = referencedBy; else b = e; - QString id = b.attribute("id"); + TQString id = b.attribute("id"); if( !id.isEmpty() ) { // Copy existing gradient if it exists - if( m_gradients.find( id ) != m_gradients.end() ) + if( m_gradients.tqfind( id ) != m_gradients.end() ) gradhelper.gradient = m_gradients[ id ].gradient; } @@ -598,13 +598,13 @@ void SvgImport::parseGradient( const QDomElement &e , const QDomElement &referen else { // try style attr - QString style = b.attribute( "style" ).simplifyWhiteSpace(); - QStringList substyles = QStringList::split( ';', style ); - for( QStringList::Iterator it = substyles.begin(); it != substyles.end(); ++it ) + TQString style = b.attribute( "style" ).simplifyWhiteSpace(); + TQStringList substyles = TQStringList::split( ';', style ); + for( TQStringList::Iterator it = substyles.begin(); it != substyles.end(); ++it ) { - QStringList substyle = QStringList::split( ':', (*it) ); - QString command = substyle[0].stripWhiteSpace(); - QString params = substyle[1].stripWhiteSpace(); + TQStringList substyle = TQStringList::split( ':', (*it) ); + TQString command = substyle[0].stripWhiteSpace(); + TQString params = substyle[1].stripWhiteSpace(); if( command == "color" ) parseColor( c, params ); } @@ -642,7 +642,7 @@ void SvgImport::parseGradient( const QDomElement &e , const QDomElement &referen gradhelper.gradient.setType( VGradient::radial ); } // handle spread method - QString spreadMethod = b.attribute( "spreadMethod" ); + TQString spreadMethod = b.attribute( "spreadMethod" ); if( !spreadMethod.isEmpty() ) { if( spreadMethod == "reflect" ) @@ -663,7 +663,7 @@ void SvgImport::parseGradient( const QDomElement &e , const QDomElement &referen m_gradients.insert( b.attribute( "id" ), gradhelper ); } -void SvgImport::parsePA( VObject *obj, SvgGraphicsContext *gc, const QString &command, const QString ¶ms ) +void SvgImport::parsePA( VObject *obj, SvgGraphicsContext *gc, const TQString &command, const TQString ¶ms ) { VColor fillcolor = gc->fill.color(); VColor strokecolor = gc->stroke.color(); @@ -676,9 +676,9 @@ void SvgImport::parsePA( VObject *obj, SvgGraphicsContext *gc, const QString &co gc->fill.setType( VFill::none ); else if( params.startsWith( "url(" ) ) { - unsigned int start = params.find("#") + 1; - unsigned int end = params.findRev(")"); - QString key = params.mid( start, end - start ); + unsigned int start = params.tqfind("#") + 1; + unsigned int end = params.tqfindRev(")"); + TQString key = params.mid( start, end - start ); GradientHelper *gradHelper = findGradient( key ); if( gradHelper ) { @@ -692,17 +692,17 @@ void SvgImport::parsePA( VObject *obj, SvgGraphicsContext *gc, const QString &co //kdDebug() << "!!!!!!bbox y : " << bbox.y() << endl; //kdDebug() << gc->fill.gradient().origin().x() << endl; //kdDebug() << gc->fill.gradient().vector().x() << endl; - double offsetx = parseUnit( QString( "%1%" ).arg( gc->fill.gradient().origin().x() ), true, false, bbox ); - double offsety = parseUnit( QString( "%1%" ).arg( gc->fill.gradient().origin().y() ), false, true, bbox ); + double offsetx = parseUnit( TQString( "%1%" ).tqarg( gc->fill.gradient().origin().x() ), true, false, bbox ); + double offsety = parseUnit( TQString( "%1%" ).tqarg( gc->fill.gradient().origin().y() ), false, true, bbox ); gc->fill.gradient().setOrigin( KoPoint( bbox.x() + offsetx, bbox.y() + offsety ) ); if(gc->fill.gradient().type() == VGradient::radial) { - offsetx = parseUnit( QString( "%1%" ).arg( gc->fill.gradient().focalPoint().x() ), true, false, bbox ); - offsety = parseUnit( QString( "%1%" ).arg( gc->fill.gradient().focalPoint().y() ), false, true, bbox ); + offsetx = parseUnit( TQString( "%1%" ).tqarg( gc->fill.gradient().focalPoint().x() ), true, false, bbox ); + offsety = parseUnit( TQString( "%1%" ).tqarg( gc->fill.gradient().focalPoint().y() ), false, true, bbox ); gc->fill.gradient().setFocalPoint( KoPoint( bbox.x() + offsetx, bbox.y() + offsety ) ); } - offsetx = parseUnit( QString( "%1%" ).arg( gc->fill.gradient().vector().x() ), true, false, bbox ); - offsety = parseUnit( QString( "%1%" ).arg( gc->fill.gradient().vector().y() ), false, true, bbox ); + offsetx = parseUnit( TQString( "%1%" ).tqarg( gc->fill.gradient().vector().x() ), true, false, bbox ); + offsety = parseUnit( TQString( "%1%" ).tqarg( gc->fill.gradient().vector().y() ), false, true, bbox ); gc->fill.gradient().setVector( KoPoint( bbox.x() + offsetx, bbox.y() + offsety ) ); //kdDebug() << offsety << endl; //kdDebug() << gc->fill.gradient().origin().x() << endl; @@ -739,9 +739,9 @@ void SvgImport::parsePA( VObject *obj, SvgGraphicsContext *gc, const QString &co gc->stroke.setType( VStroke::none ); else if( params.startsWith( "url(" ) ) { - unsigned int start = params.find("#") + 1; - unsigned int end = params.findRev(")"); - QString key = params.mid( start, end - start ); + unsigned int start = params.tqfind("#") + 1; + unsigned int end = params.tqfindRev(")"); + TQString key = params.mid( start, end - start ); GradientHelper *gradHelper = findGradient( key ); if( gradHelper ) @@ -784,13 +784,13 @@ void SvgImport::parsePA( VObject *obj, SvgGraphicsContext *gc, const QString &co gc->stroke.setMiterLimit( params.toFloat() ); else if( command == "stroke-dasharray" ) { - QValueList array; + TQValueList array; if(params != "none") { // with "stroke-dasharray", the separator is a white space // inside style attribute, stroke-dasharray is separated by comma (,) - QStringList dashes = QStringList::split( QRegExp("[\\s,]"), params ); - for( QStringList::Iterator it = dashes.begin(); it != dashes.end(); ++it ) + TQStringList dashes = TQStringList::split( TQRegExp("[\\s,]"), params ); + for( TQStringList::Iterator it = dashes.begin(); it != dashes.end(); ++it ) array.append( (*it).toFloat() ); } gc->stroke.dashPattern().setArray( array ); @@ -809,8 +809,8 @@ void SvgImport::parsePA( VObject *obj, SvgGraphicsContext *gc, const QString &co } else if( command == "font-family" ) { - QString family = params; - family.replace( '\'' , ' ' ); + TQString family = params; + family.tqreplace( '\'' , ' ' ); gc->font.setFamily( family ); } else if( command == "font-size" ) @@ -820,7 +820,7 @@ void SvgImport::parsePA( VObject *obj, SvgGraphicsContext *gc, const QString &co } else if( command == "font-weight" ) { - int weight = QFont::Normal; + int weight = TQFont::Normal; // map svg weight to qt weight // svg value qt value @@ -831,7 +831,7 @@ void SvgImport::parsePA( VObject *obj, SvgGraphicsContext *gc, const QString &co // 800,900 87,99 if( params == "bold" ) - weight = QFont::Bold; + weight = TQFont::Bold; else if( params == "lighter" ) { weight = gc->font.weight(); @@ -915,7 +915,7 @@ void SvgImport::parsePA( VObject *obj, SvgGraphicsContext *gc, const QString &co gc->stroke.setColor( strokecolor ); } -void SvgImport::parseStyle( VObject *obj, const QDomElement &e ) +void SvgImport::parseStyle( VObject *obj, const TQDomElement &e ) { SvgGraphicsContext *gc = m_gc.current(); if( !gc ) return; @@ -949,13 +949,13 @@ void SvgImport::parseStyle( VObject *obj, const QDomElement &e ) parsePA( obj, gc, "opacity", e.attribute( "opacity" ) ); // try style attr - QString style = e.attribute( "style" ).simplifyWhiteSpace(); - QStringList substyles = QStringList::split( ';', style ); - for( QStringList::Iterator it = substyles.begin(); it != substyles.end(); ++it ) + TQString style = e.attribute( "style" ).simplifyWhiteSpace(); + TQStringList substyles = TQStringList::split( ';', style ); + for( TQStringList::Iterator it = substyles.begin(); it != substyles.end(); ++it ) { - QStringList substyle = QStringList::split( ':', (*it) ); - QString command = substyle[0].stripWhiteSpace(); - QString params = substyle[1].stripWhiteSpace(); + TQStringList substyle = TQStringList::split( ':', (*it) ); + TQString command = substyle[0].stripWhiteSpace(); + TQString params = substyle[1].stripWhiteSpace(); parsePA( obj, gc, command, params ); } @@ -972,7 +972,7 @@ void SvgImport::parseStyle( VObject *obj, const QDomElement &e ) gc->stroke.setLineWidth( lineWidth ); } -void SvgImport::parseFont( const QDomElement &e ) +void SvgImport::parseFont( const TQDomElement &e ) { SvgGraphicsContext *gc = m_gc.current(); if( !gc ) return; @@ -987,16 +987,16 @@ void SvgImport::parseFont( const QDomElement &e ) parsePA( 0L, m_gc.current(), "text-decoration", e.attribute( "text-decoration" ) ); } -void SvgImport::parseUse( VGroup *grp, const QDomElement &e ) +void SvgImport::parseUse( VGroup *grp, const TQDomElement &e ) { - QString id = e.attribute( "xlink:href" ); + TQString id = e.attribute( "xlink:href" ); if( !id.isEmpty() ) { addGraphicContext(); setupTransform( e ); - QString key = id.mid( 1 ); + TQString key = id.mid( 1 ); if( !e.attribute( "x" ).isEmpty() && !e.attribute( "y" ).isEmpty() ) { @@ -1006,9 +1006,9 @@ void SvgImport::parseUse( VGroup *grp, const QDomElement &e ) m_gc.current()->matrix.translate(tx,ty); } - if(m_defs.contains(key)) + if(m_defs.tqcontains(key)) { - QDomElement a = m_defs[key]; + TQDomElement a = m_defs[key]; if(a.tagName() == "g" || a.tagName() == "a") parseGroup( grp, a); else @@ -1023,11 +1023,11 @@ void SvgImport::parseUse( VGroup *grp, const QDomElement &e ) } } -void SvgImport::parseGroup( VGroup *grp, const QDomElement &e ) +void SvgImport::parseGroup( VGroup *grp, const TQDomElement &e ) { - for( QDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling() ) + for( TQDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling() ) { - QDomElement b = n.toElement(); + TQDomElement b = n.toElement(); if( b.isNull() ) continue; // treat svg link as group so we don't miss its child elements @@ -1090,17 +1090,17 @@ void SvgImport::parseGroup( VGroup *grp, const QDomElement &e ) } } -void SvgImport::parseDefs( const QDomElement &e ) +void SvgImport::parseDefs( const TQDomElement &e ) { - for( QDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling() ) + for( TQDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling() ) { - QDomElement b = n.toElement(); + TQDomElement b = n.toElement(); if( b.isNull() ) continue; - QString definition = b.attribute( "id" ); + TQString definition = b.attribute( "id" ); if( !definition.isEmpty() ) { - if( !m_defs.contains( definition ) ) + if( !m_defs.tqcontains( definition ) ) m_defs.insert( definition, b ); } } @@ -1110,13 +1110,13 @@ void SvgImport::parseDefs( const QDomElement &e ) // Creating functions // --------------------------------------------------------------------------------------- -void SvgImport::createText( VGroup *grp, const QDomElement &b ) +void SvgImport::createText( VGroup *grp, const TQDomElement &b ) { const double pathLength = 10.0; VText *text = 0L; - QString content; - QString anchor; + TQString content; + TQString anchor; VSubpath base( 0L ); VPath *path = 0L; double offset = 0.0; @@ -1139,9 +1139,9 @@ void SvgImport::createText( VGroup *grp, const QDomElement &b ) base.lineTo( KoPoint( x + pathLength, y ) ); } - for( QDomNode n = b.firstChild(); !n.isNull(); n = n.nextSibling() ) + for( TQDomNode n = b.firstChild(); !n.isNull(); n = n.nextSibling() ) { - QDomElement e = n.toElement(); + TQDomElement e = n.toElement(); if( e.isNull() ) { content += n.toCharacterData().data(); @@ -1151,8 +1151,8 @@ void SvgImport::createText( VGroup *grp, const QDomElement &b ) if( e.attribute( "xlink:href" ).isEmpty() ) continue; - QString key = e.attribute( "xlink:href" ).mid( 1 ); - if( ! m_defs.contains(key) ) + TQString key = e.attribute( "xlink:href" ).mid( 1 ); + if( ! m_defs.tqcontains(key) ) { // try to find referenced object in document VObject* obj = findObject( key ); @@ -1164,7 +1164,7 @@ void SvgImport::createText( VGroup *grp, const QDomElement &b ) } else { - QDomElement p = m_defs[key]; + TQDomElement p = m_defs[key]; createObject( grp, p, VObject::deleted); } if( ! path ) @@ -1174,7 +1174,7 @@ void SvgImport::createText( VGroup *grp, const QDomElement &b ) if( ! e.attribute( "startOffset" ).isEmpty() ) { - QString start = e.attribute( "startOffset" ); + TQString start = e.attribute( "startOffset" ); if( start.endsWith( "%" ) ) offset = 0.01 * start.remove( '%' ).toDouble(); else @@ -1197,8 +1197,8 @@ void SvgImport::createText( VGroup *grp, const QDomElement &b ) content += e.text(); if( base.isEmpty() && ! e.attribute( "x" ).isEmpty() && ! e.attribute( "y" ).isEmpty() ) { - QStringList posX = QStringList::split( ", ", e.attribute( "x" ) ); - QStringList posY = QStringList::split( ", ", e.attribute( "y" ) ); + TQStringList posX = TQStringList::split( ", ", e.attribute( "x" ) ); + TQStringList posY = TQStringList::split( ", ", e.attribute( "y" ) ); if( posX.count() && posY.count() ) { double x = parseUnit( posX.first() ); @@ -1213,8 +1213,8 @@ void SvgImport::createText( VGroup *grp, const QDomElement &b ) if( e.attribute( "xlink:href" ).isEmpty() ) continue; - QString key = e.attribute( "xlink:href" ).mid( 1 ); - if( ! m_defs.contains(key) ) + TQString key = e.attribute( "xlink:href" ).mid( 1 ); + if( ! m_defs.tqcontains(key) ) { // try to find referenced object in document VObject* obj = findObject( key ); @@ -1226,7 +1226,7 @@ void SvgImport::createText( VGroup *grp, const QDomElement &b ) } else { - QDomElement p = m_defs[key]; + TQDomElement p = m_defs[key]; content += p.text(); } } @@ -1263,9 +1263,9 @@ void SvgImport::createText( VGroup *grp, const QDomElement &b ) text->setName( b.attribute("id") ); if( anchor == "middle" ) - text->setAlignment( VText::Center ); + text->tqsetAlignment( VText::Center ); else if( anchor == "end" ) - text->setAlignment( VText::Right ); + text->tqsetAlignment( VText::Right ); if( offset > 0.0 ) text->setOffset( offset ); @@ -1279,7 +1279,7 @@ void SvgImport::createText( VGroup *grp, const QDomElement &b ) delete( m_gc.pop() ); } -void SvgImport::createObject( VGroup *grp, const QDomElement &b, const VObject::VState state, const QDomElement &style ) +void SvgImport::createObject( VGroup *grp, const TQDomElement &b, const VObject::VState state, const TQDomElement &style ) { VObject *obj = 0L; @@ -1327,12 +1327,12 @@ void SvgImport::createObject( VGroup *grp, const QDomElement &b, const VObject:: VPath *path = new VPath( &m_document ); bool bFirst = true; - QString points = b.attribute( "points" ).simplifyWhiteSpace(); - points.replace( ',', ' ' ); + TQString points = b.attribute( "points" ).simplifyWhiteSpace(); + points.tqreplace( ',', ' ' ); points.remove( '\r' ); points.remove( '\n' ); - QStringList pointList = QStringList::split( ' ', points ); - for( QStringList::Iterator it = pointList.begin(); it != pointList.end(); ++it) + TQStringList pointList = TQStringList::split( ' ', points ); + for( TQStringList::Iterator it = pointList.begin(); it != pointList.end(); ++it) { KoPoint point; point.setX( (*it).toDouble() ); @@ -1357,7 +1357,7 @@ void SvgImport::createObject( VGroup *grp, const QDomElement &b, const VObject:: } else if( b.tagName() == "image" ) { - QString fname = b.attribute("xlink:href"); + TQString fname = b.attribute("xlink:href"); obj = new VImage( 0L, fname ); } diff --git a/filters/karbon/svg/svgimport.h b/filters/karbon/svg/svgimport.h index a558c1fc..24857b65 100644 --- a/filters/karbon/svg/svgimport.h +++ b/filters/karbon/svg/svgimport.h @@ -21,9 +21,9 @@ #define __SVGIMPORT_H__ #include -#include -#include -#include +#include +#include +#include #include #include #include @@ -39,12 +39,13 @@ class VPath; class SvgImport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - SvgImport(KoFilter *parent, const char *name, const QStringList&); + SvgImport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~SvgImport(); - virtual KoFilter::ConversionStatus convert(const QCString& from, const QCString& to); + virtual KoFilter::ConversiontqStatus convert(const TQCString& from, const TQCString& to); protected: class GradientHelper @@ -56,46 +57,46 @@ protected: } VGradient gradient; bool bbox; - QWMatrix gradientTransform; + TQWMatrix gradientTransform; }; - void parseGroup( VGroup *, const QDomElement & ); - void parseDefs( const QDomElement & ); - void parseUse( VGroup *, const QDomElement & ); - void parseStyle( VObject *, const QDomElement & ); - void parsePA( VObject *, SvgGraphicsContext *, const QString &, const QString & ); - void parseGradient( const QDomElement &, const QDomElement &referencedBy = QDomElement() ); - void parseColorStops( VGradient *, const QDomElement & ); - double parseUnit( const QString &, bool horiz = false, bool vert = false, KoRect bbox = KoRect() ); - void parseColor( VColor &, const QString & ); - QColor parseColor( const QString & ); - double toPercentage( QString ); - double fromPercentage( QString ); - void setupTransform( const QDomElement & ); + void parseGroup( VGroup *, const TQDomElement & ); + void parseDefs( const TQDomElement & ); + void parseUse( VGroup *, const TQDomElement & ); + void parseStyle( VObject *, const TQDomElement & ); + void parsePA( VObject *, SvgGraphicsContext *, const TQString &, const TQString & ); + void parseGradient( const TQDomElement &, const TQDomElement &referencedBy = TQDomElement() ); + void parseColorStops( VGradient *, const TQDomElement & ); + double parseUnit( const TQString &, bool horiz = false, bool vert = false, KoRect bbox = KoRect() ); + void parseColor( VColor &, const TQString & ); + TQColor parseColor( const TQString & ); + double toPercentage( TQString ); + double fromPercentage( TQString ); + void setupTransform( const TQDomElement & ); void addGraphicContext(); - QDomDocument inpdoc; - QDomDocument outdoc; + TQDomDocument inpdoc; + TQDomDocument outdoc; void convert(); - void createObject( VGroup *grp, const QDomElement &, VObject::VState state = VObject::normal, const QDomElement &style = QDomElement() ); - void createText( VGroup *, const QDomElement & ); - void parseFont( const QDomElement & ); + void createObject( VGroup *grp, const TQDomElement &, VObject::VState state = VObject::normal, const TQDomElement &style = TQDomElement() ); + void createText( VGroup *, const TQDomElement & ); + void parseFont( const TQDomElement & ); // find object with given id in document - VObject* findObject( const QString &name ); + VObject* findObject( const TQString &name ); // find object with given id in given group - VObject* findObject( const QString &name, VGroup * ); + VObject* findObject( const TQString &name, VGroup * ); // find gradient with given id in gradient map - GradientHelper* findGradient( const QString &id, const QString &href = 0 ); + GradientHelper* findGradient( const TQString &id, const TQString &href = 0 ); // Determine scaling factor from given matrix - double getScalingFromMatrix( QWMatrix &matrix ); + double getScalingFromMatrix( TQWMatrix &matrix ); - QDomElement mergeStyles( const QDomElement &, const QDomElement & ); + TQDomElement mergeStyles( const TQDomElement &, const TQDomElement & ); private: VDocument m_document; - QPtrStack m_gc; - QMap m_gradients; - QMap m_defs; + TQPtrStack m_gc; + TQMap m_gradients; + TQMap m_defs; KoRect m_outerRect; }; diff --git a/filters/karbon/wmf/wmfexport.cc b/filters/karbon/wmf/wmfexport.cc index 5f1e94d7..a04dfc11 100644 --- a/filters/karbon/wmf/wmfexport.cc +++ b/filters/karbon/wmf/wmfexport.cc @@ -17,8 +17,8 @@ */ #include -#include -#include +#include +#include #include #include #include @@ -48,7 +48,7 @@ typedef KGenericFactory WmfExportFactory; K_EXPORT_COMPONENT_FACTORY( libwmfexport, WmfExportFactory( "kofficefilters" ) ) -WmfExport::WmfExport( KoFilter *, const char *, const QStringList&) : +WmfExport::WmfExport( KoFilter *, const char *, const TQStringList&) : KoFilter() { } @@ -57,7 +57,7 @@ WmfExport::~WmfExport() { } -KoFilter::ConversionStatus WmfExport::convert( const QCString& from, const QCString& to ) +KoFilter::ConversiontqStatus WmfExport::convert( const TQCString& from, const TQCString& to ) { if( to != "image/x-wmf" || from != "application/x-karbon" ) { return KoFilter::NotImplemented; @@ -76,9 +76,9 @@ KoFilter::ConversionStatus WmfExport::convert( const QCString& from, const QCStr return KoFilter::WrongFormat; } - QDomDocument domIn; + TQDomDocument domIn; domIn.setContent( storeIn ); - QDomElement docNode = domIn.documentElement(); + TQDomElement docNode = domIn.documentElement(); // Load the document. mDoc = new VDocument; @@ -123,8 +123,8 @@ void WmfExport::visitVDocument( VDocument& document ) { void WmfExport::visitVPath( VPath& composite ) { - QPen pen; - QBrush brush; + TQPen pen; + TQBrush brush; getPen( pen, composite.stroke() ); getBrush( brush, composite.fill() ); @@ -133,7 +133,7 @@ void WmfExport::visitVPath( VPath& composite ) { if ( mListPa.count() > 0 ) { mWmf->setPen( pen ); - if( (brush.style() == Qt::NoBrush) + if( (brush.style() == TQt::NoBrush) && (mListPa.count() == 1) ) { mWmf->drawPolyline( *mListPa.first() ); } @@ -158,7 +158,7 @@ void WmfExport::visitVSubpath( VSubpath& path ) { VSubpath *newPath; VSubpathIterator itr( path ); VFlattenCmd cmd( 0L, INCH_TO_POINT(0.3 / (double)mDpi) ); - QPointArray *pa = new QPointArray( path.count() ); + TQPointArray *pa = new TQPointArray( path.count() ); int nbrPoint=0; // number of points in the path for( ; itr.current(); ++itr ) { @@ -221,7 +221,7 @@ void WmfExport::visitVText( VText& text ) { } -void WmfExport::getBrush( QBrush& brush, const VFill *fill ) { +void WmfExport::getBrush( TQBrush& brush, const VFill *fill ) { if( (fill->type() == VFill::solid) || (fill->type() == VFill::grad) || (fill->type() == VFill::patt) ) { if ( fill->color().opacity() < 0.1 ) { @@ -238,7 +238,7 @@ void WmfExport::getBrush( QBrush& brush, const VFill *fill ) { } -void WmfExport::getPen( QPen& pen, const VStroke *stroke ) { +void WmfExport::getPen( TQPen& pen, const VStroke *stroke ) { if( (stroke->type() == VStroke::solid) || (stroke->type() == VStroke::grad) || (stroke->type() == VStroke::patt) ) { // TODO : Dash pattern. diff --git a/filters/karbon/wmf/wmfexport.h b/filters/karbon/wmf/wmfexport.h index 8f107ee0..9d7bf9cb 100644 --- a/filters/karbon/wmf/wmfexport.h +++ b/filters/karbon/wmf/wmfexport.h @@ -19,10 +19,10 @@ #ifndef WMFEXPORT_H #define WMFEXPORT_H -#include -#include -#include -#include +#include +#include +#include +#include #include #include "vvisitor.h" @@ -35,20 +35,21 @@ class VText; class WmfExport : public KoFilter, private VVisitor { Q_OBJECT + TQ_OBJECT public: - WmfExport( KoFilter *parent, const char *name, const QStringList&); + WmfExport( KoFilter *tqparent, const char *name, const TQStringList&); virtual ~WmfExport(); - virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to ); private: void visitVPath( VPath& composite ); void visitVDocument( VDocument& document ); void visitVSubpath( VSubpath& path ); void visitVText( VText& text ); - void getBrush( QBrush& brush, const VFill *fill ); - void getPen( QPen& pen, const VStroke *stroke ); + void getBrush( TQBrush& brush, const VFill *fill ); + void getPen( TQPen& pen, const VStroke *stroke ); // coordinate transformation // translate origin from (left,bottom) to (left,top) -> scale to wmf size @@ -65,7 +66,7 @@ private: int mDpi; double mScaleX; double mScaleY; - QPtrList mListPa; + TQPtrList mListPa; }; #endif diff --git a/filters/karbon/wmf/wmfimport.cc b/filters/karbon/wmf/wmfimport.cc index eadad26b..23eaaa12 100644 --- a/filters/karbon/wmf/wmfimport.cc +++ b/filters/karbon/wmf/wmfimport.cc @@ -21,8 +21,8 @@ DESCRIPTION */ #include -#include -#include +#include +#include #include #include #include @@ -36,7 +36,7 @@ typedef KGenericFactory WMFImportFactory; K_EXPORT_COMPONENT_FACTORY( libwmfimport, WMFImportFactory( "kofficefilters" ) ) -WMFImport::WMFImport( KoFilter *, const char *, const QStringList&) : +WMFImport::WMFImport( KoFilter *, const char *, const TQStringList&) : KoFilter() { } @@ -45,7 +45,7 @@ WMFImport::~WMFImport() { } -KoFilter::ConversionStatus WMFImport::convert( const QCString& from, const QCString& to ) +KoFilter::ConversiontqStatus WMFImport::convert( const TQCString& from, const TQCString& to ) { if( to != "application/x-karbon" || from != "image/x-wmf" ) return KoFilter::NotImplemented; @@ -66,8 +66,8 @@ KoFilter::ConversionStatus WMFImport::convert( const QCString& from, const QCStr kdError(3800) << "Unable to open output file!" << endl; return KoFilter::StorageCreationError; } - QDomDocument outdoc = document.saveXML(); - QCString content = outdoc.toCString(); + TQDomDocument outdoc = document.saveXML(); + TQCString content = outdoc.toCString(); // kdDebug() << " content : " << content << endl; out->writeBlock( content , content.length() ); diff --git a/filters/karbon/wmf/wmfimport.h b/filters/karbon/wmf/wmfimport.h index e1290422..45ddefec 100644 --- a/filters/karbon/wmf/wmfimport.h +++ b/filters/karbon/wmf/wmfimport.h @@ -30,12 +30,13 @@ DESCRIPTION class WMFImport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - WMFImport( KoFilter *parent, const char *name, const QStringList&); + WMFImport( KoFilter *tqparent, const char *name, const TQStringList&); virtual ~WMFImport(); - virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to ); }; diff --git a/filters/karbon/wmf/wmfimportparser.cc b/filters/karbon/wmf/wmfimportparser.cc index 2eb380a4..275490fe 100644 --- a/filters/karbon/wmf/wmfimportparser.cc +++ b/filters/karbon/wmf/wmfimportparser.cc @@ -47,7 +47,7 @@ bool WMFImportParser::play( VDocument& doc ) // Virtual Painter bool WMFImportParser::begin() { - QRect bounding = boundingRect(); + TQRect bounding = boundingRect(); mBackgroundMode = Qt::TransparentMode; mCurrentOrg.setX( bounding.left() ); @@ -87,26 +87,26 @@ void WMFImportParser::restore() { } -void WMFImportParser::setFont( const QFont & ) { +void WMFImportParser::setFont( const TQFont & ) { } -void WMFImportParser::setPen( const QPen &pen ) { +void WMFImportParser::setPen( const TQPen &pen ) { mPen = pen; } -const QPen &WMFImportParser::pen() const { +const TQPen &WMFImportParser::pen() const { return mPen; } -void WMFImportParser::setBrush( const QBrush &brush ) { +void WMFImportParser::setBrush( const TQBrush &brush ) { mBrush = brush; } -void WMFImportParser::setBackgroundColor( const QColor &c ) { +void WMFImportParser::setBackgroundColor( const TQColor &c ) { mBackgroundColor = c; } @@ -116,7 +116,7 @@ void WMFImportParser::setBackgroundMode( Qt::BGMode mode ) { } -void WMFImportParser::setRasterOp( Qt::RasterOp ) { +void WMFImportParser::setRasterOp( TQt::RasterOp ) { } @@ -135,15 +135,15 @@ void WMFImportParser::setWindowExt( int width, int height ) { } -void WMFImportParser::setWorldMatrix( const QWMatrix &, bool ) { +void WMFImportParser::setWorldMatrix( const TQWMatrix &, bool ) { } -void WMFImportParser::setClipRegion( const QRegion & ) { +void WMFImportParser::setClipRegion( const TQRegion & ) { } -QRegion WMFImportParser::clipRegion() { +TQRegion WMFImportParser::clipRegion() { return mClippingRegion; } @@ -241,7 +241,7 @@ void WMFImportParser::drawChord( int x, int y, int w, int h, int aStart, int aLe } -void WMFImportParser::drawPolyline( const QPointArray &pa ) { +void WMFImportParser::drawPolyline( const TQPointArray &pa ) { VPath *polyline = new VPath( mDoc ); appendPen( *polyline ); appendPoints( *polyline, pa ); @@ -250,7 +250,7 @@ void WMFImportParser::drawPolyline( const QPointArray &pa ) { } -void WMFImportParser::drawPolygon( const QPointArray &pa, bool ) { +void WMFImportParser::drawPolygon( const TQPointArray &pa, bool ) { VPath *polygon = new VPath( mDoc ); appendPen( *polygon ); appendBrush( *polygon ); @@ -261,7 +261,7 @@ void WMFImportParser::drawPolygon( const QPointArray &pa, bool ) { } -void WMFImportParser::drawPolyPolygon( QPtrList& listPa, bool ) { +void WMFImportParser::drawPolyPolygon( TQPtrList& listPa, bool ) { VPath *path = new VPath( mDoc ); if ( listPa.count() > 0 ) { @@ -282,10 +282,10 @@ void WMFImportParser::drawPolyPolygon( QPtrList& listPa, bool ) { } -void WMFImportParser::drawImage( int , int , const QImage &, int , int , int , int ) {} +void WMFImportParser::drawImage( int , int , const TQImage &, int , int , int , int ) {} -void WMFImportParser::drawText( int , int , int , int , int , const QString& , double ) {} +void WMFImportParser::drawText( int , int , int , int , int , const TQString& , double ) {} //----------------------------------------------------------------------------- @@ -296,30 +296,30 @@ void WMFImportParser::appendPen( VObject& obj ) VStroke stroke( mDoc ); stroke.setLineCap( VStroke::capRound ); - if ( mPen.style() == Qt::NoPen ) { + if ( mPen.style() == TQt::NoPen ) { stroke.setType( VStroke::none ); } else { - QValueList dashes; + TQValueList dashes; stroke.setType( VStroke::solid ); switch ( mPen.style() ) { - case Qt::DashLine : + case TQt::DashLine : stroke.dashPattern().setArray( dashes << MM_TO_POINT(3) << MM_TO_POINT(2) ); break; - case Qt::DotLine : + case TQt::DotLine : stroke.dashPattern().setArray( dashes << MM_TO_POINT(1) << MM_TO_POINT(1) ); break; - case Qt::DashDotLine : + case TQt::DashDotLine : stroke.dashPattern().setArray( dashes << MM_TO_POINT(3) << MM_TO_POINT(1) << MM_TO_POINT(1) << MM_TO_POINT(1) ); break; - case Qt::DashDotDotLine : + case TQt::DashDotDotLine : stroke.dashPattern().setArray( dashes << MM_TO_POINT(3) << MM_TO_POINT(1) << MM_TO_POINT(1) << MM_TO_POINT(1) << MM_TO_POINT(1) << MM_TO_POINT(1) ); break; default: break; } } - stroke.setColor( mPen.color() ); + stroke.setColor( TQColor(mPen.color()) ); double width = mPen.width() * mScaleX; stroke.setLineWidth( ((width < 0.99) ? 1 : width) ); obj.setStroke( stroke ); @@ -329,23 +329,23 @@ void WMFImportParser::appendPen( VObject& obj ) void WMFImportParser::appendBrush( VObject& obj ) { VFill fill( mBackgroundColor ); - fill.setColor( mBrush.color() ); + fill.setColor( TQColor(mBrush.color()) ); switch ( mBrush.style() ) { - case Qt::NoBrush : + case TQt::NoBrush : fill.setType( VFill::none ); break; - case Qt::SolidPattern : + case TQt::SolidPattern : fill.setType( VFill::solid ); break; - case Qt::CustomPattern : + case TQt::CustomPattern : // TODO: bitmap pattern brush fill.setType( VFill::solid ); //fill.pattern(). break; default : // TODO: pattern brush - if ( mBackgroundMode == Qt::OpaqueMode ) { + if ( mBackgroundMode == TQt::OpaqueMode ) { fill.setColor( mBackgroundColor ); fill.setType( VFill::solid ); } @@ -358,7 +358,7 @@ void WMFImportParser::appendBrush( VObject& obj ) } -void WMFImportParser::appendPoints(VPath &path, const QPointArray& pa) +void WMFImportParser::appendPoints(VPath &path, const TQPointArray& pa) { // list of point array if ( pa.size() > 0 ) { diff --git a/filters/karbon/wmf/wmfimportparser.h b/filters/karbon/wmf/wmfimportparser.h index fcb1fbe2..4e904d7f 100644 --- a/filters/karbon/wmf/wmfimportparser.h +++ b/filters/karbon/wmf/wmfimportparser.h @@ -18,8 +18,8 @@ #ifndef _WMFIMPORTPARSER_H_ #define _WMFIMPORTPARSER_H_ -#include -#include +#include +#include #include #include #include @@ -45,23 +45,23 @@ public: private: // ------------------------------------------------------------------------- - // A virtual QPainter + // A virtual TQPainter bool begin(); bool end(); void save(); void restore(); // Drawing tools - void setFont( const QFont &font ); + void setFont( const TQFont &font ); // the pen : the width of the pen is in logical coordinate - void setPen( const QPen &pen ); - const QPen &pen() const; - void setBrush( const QBrush &brush ); + void setPen( const TQPen &pen ); + const TQPen &pen() const; + void setBrush( const TQBrush &brush ); // Drawing attributes/modes - void setBackgroundColor( const QColor &c ); + void setBackgroundColor( const TQColor &c ); void setBackgroundMode( Qt::BGMode mode ); - void setRasterOp( Qt::RasterOp op ); + void setRasterOp( TQt::RasterOp op ); /** * Change logical Coordinate @@ -75,8 +75,8 @@ private: // Clipping // the 'CoordinateMode' is ommitted : always CoordPainter in wmf // setClipRegion() is often used with save() and restore() => implement all or none - void setClipRegion( const QRegion &rec ); - QRegion clipRegion(); + void setClipRegion( const TQRegion &rec ); + TQRegion clipRegion(); // Graphics drawing functions void moveTo( int x, int y ); @@ -87,29 +87,29 @@ private: void drawArc( int x, int y, int w, int h, int a, int alen ); void drawPie( int x, int y, int w, int h, int a, int alen ); void drawChord( int x, int y, int w, int h, int a, int alen ); - void drawPolyline( const QPointArray &pa ); - void drawPolygon( const QPointArray &pa, bool winding=FALSE ); + void drawPolyline( const TQPointArray &pa ); + void drawPolygon( const TQPointArray &pa, bool winding=FALSE ); /** * drawPolyPolygon draw the XOR of a list of polygons * listPa : list of polygons */ - void drawPolyPolygon( QPtrList& listPa, bool winding=FALSE ); - void drawImage( int x, int y, const QImage &, int sx = 0, int sy = 0, int sw = -1, int sh = -1 ); + void drawPolyPolygon( TQPtrList& listPa, bool winding=FALSE ); + void drawImage( int x, int y, const TQImage &, int sx = 0, int sy = 0, int sw = -1, int sh = -1 ); // Text drawing // rotation = the degrees of rotation in counterclockwise // not yet implemented in KWinMetaFile - void drawText( int x, int y, int w, int h, int flags, const QString &s, double rotation ); + void drawText( int x, int y, int w, int h, int flags, const TQString &s, double rotation ); // matrix transformation : only used in some bitmap manipulation - void setWorldMatrix( const QWMatrix &, bool combine=FALSE ); + void setWorldMatrix( const TQWMatrix &, bool combine=FALSE ); //----------------------------------------------------------------------------- // Utilities // Add pen, brush and points to a path void appendPen( VObject& obj ); void appendBrush( VObject& obj ); - void appendPoints(VPath& path, const QPointArray& pa); + void appendPoints(VPath& path, const TQPointArray& pa); // coordinate transformation // translate wmf to (0,0) -> scale to document size -> translate to karbon (0,0) // Wmf origin is (left,top) corner @@ -125,17 +125,17 @@ private: private: VDocument *mDoc; - QRegion mClippingRegion; - QPen mPen; - QBrush mBrush; + TQRegion mClippingRegion; + TQPen mPen; + TQBrush mBrush; Qt::BGMode mBackgroundMode; - QColor mBackgroundColor; + TQColor mBackgroundColor; // current origin of WMF logical coordinate - QPoint mCurrentOrg; + TQPoint mCurrentOrg; double mScaleX; double mScaleY; // current position in WMF coordinate (INT16) - QPoint mCurrentPoint; + TQPoint mCurrentPoint; }; #endif diff --git a/filters/karbon/xaml/color.h b/filters/karbon/xaml/color.h index bfdc93c6..49bc2e52 100644 --- a/filters/karbon/xaml/color.h +++ b/filters/karbon/xaml/color.h @@ -6,7 +6,7 @@ g = green; \ } -void keywordToRGB( QString rgbColor, int &r, int &g, int &b ) +void keywordToRGB( TQString rgbColor, int &r, int &g, int &b ) { if( rgbColor == "aliceblue" ) TORGB( 240, 248, 255) @@ -206,7 +206,7 @@ void keywordToRGB( QString rgbColor, int &r, int &g, int &b ) TORGB( 245, 255, 250 ) else if( rgbColor == "mistyrose" ) TORGB( 255, 228, 225 ) - else if( rgbColor == "moccasin" ) + else if( rgbColor == "tqmoccasin" ) TORGB( 255, 228, 181 ) else if( rgbColor == "navajowhite" ) TORGB( 255, 222, 173 ) diff --git a/filters/karbon/xaml/xamlexport.cc b/filters/karbon/xaml/xamlexport.cc index c4ccb467..09dda268 100644 --- a/filters/karbon/xaml/xamlexport.cc +++ b/filters/karbon/xaml/xamlexport.cc @@ -20,11 +20,11 @@ // based on the SVG exporter. Not intended for public release // Microsoft WVG renamed to XAML Graphics. Worry about that later. -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -54,14 +54,14 @@ typedef KGenericFactory XAMLExportFactory; K_EXPORT_COMPONENT_FACTORY( libkarbonxamlexport, XAMLExportFactory( "kofficefilters" ) ) -XAMLExport::XAMLExport( KoFilter*, const char*, const QStringList& ) +XAMLExport::XAMLExport( KoFilter*, const char*, const TQStringList& ) : KoFilter() { m_gc.setAutoDelete( true ); } -KoFilter::ConversionStatus -XAMLExport::convert( const QCString& from, const QCString& to ) +KoFilter::ConversiontqStatus +XAMLExport::convert( const TQCString& from, const TQCString& to ) { // TODO: ??? if ( to != "image/wvg+xml" || from != "application/x-karbon" ) @@ -73,22 +73,22 @@ XAMLExport::convert( const QCString& from, const QCString& to ) if( !storeIn ) return KoFilter::StupidError; - QFile fileOut( m_chain->outputFile() ); + TQFile fileOut( m_chain->outputFile() ); if( !fileOut.open( IO_WriteOnly ) ) { delete storeIn; return KoFilter::StupidError; } - QDomDocument domIn; + TQDomDocument domIn; domIn.setContent( storeIn ); - QDomElement docNode = domIn.documentElement(); + TQDomElement docNode = domIn.documentElement(); - m_stream = new QTextStream( &fileOut ); - QString body; - m_body = new QTextStream( &body, IO_ReadWrite ); - QString defs; - m_defs = new QTextStream( &defs, IO_ReadWrite ); + m_stream = new TQTextStream( &fileOut ); + TQString body; + m_body = new TQTextStream( &body, IO_ReadWrite ); + TQString defs; + m_defs = new TQTextStream( &defs, IO_ReadWrite ); // load the document and export it: @@ -157,12 +157,12 @@ XAMLExport::visitVDocument( VDocument& document ) *m_body << "" << endl; } -QString +TQString XAMLExport::getID( VObject *obj ) { if( obj && !obj->name().isEmpty() ) - return QString( " Name=\"%1\"" ).arg( obj->name() ); - return QString(); + return TQString( " Name=\"%1\"" ).tqarg( obj->name() ); + return TQString(); } // which markup to use? Group or Canvas? @@ -185,7 +185,7 @@ XAMLExport::visitVPath( VPath& composite ) getFill( *( composite.fill() ) ); getStroke( *( composite.stroke() ) ); - QString d; + TQString d; composite.saveSvgPath( d ); *m_body << " Data=\"" << d << "\" "; @@ -205,22 +205,22 @@ XAMLExport::visitVSubpath( VSubpath& ) { } -QString createUID() +TQString createUID() { static unsigned int nr = 0; - return "defitem" + QString().setNum( nr++ ); + return "defitem" + TQString().setNum( nr++ ); } void -XAMLExport::getColorStops( const QPtrVector &colorStops ) +XAMLExport::getColorStops( const TQPtrVector &colorStops ) { for( unsigned int i = 0; i < colorStops.count() ; i++ ) { *m_defs << "color ); - *m_defs << "\" Offset=\"" << QString().setNum( colorStops.at( i )->rampPoint ); - // XAML uses ARGB values and other methods such as masks for Transparency/Opacity # aa rrggbb + *m_defs << "\" Offset=\"" << TQString().setNum( colorStops.at( i )->rampPoint ); + // XAML uses ARGB values and other methods such as tqmasks for Transparency/Opacity # aa rrggbb // *m_defs << "\" stop-opacity=\"" << colorStops.at( i )->color.opacity() << "\"" << " />" << endl; // Maybe this only applies to gradients, need to check. } @@ -229,7 +229,7 @@ XAMLExport::getColorStops( const QPtrVector &colorStops ) void XAMLExport::getGradient( const VGradient& grad ) { - QString uid = createUID(); + TQString uid = createUID(); if( grad.type() == VGradient::linear ) { // do linear grad @@ -262,7 +262,7 @@ XAMLExport::getGradient( const VGradient& grad ) *m_defs << "GradientOrigin=\"" << grad.focalPoint().x() << ","; *m_defs << grad.focalPoint().y() << "\" "; double r = sqrt( pow( grad.vector().x() - grad.origin().x(), 2 ) + pow( grad.vector().y() - grad.origin().y(), 2 ) ); - *m_defs << "Radius=\"" << QString().setNum( r ) << "\" "; + *m_defs << "Radius=\"" << TQString().setNum( r ) << "\" "; if( grad.repeatMethod() == VGradient::reflect ) *m_defs << "SpreadMethod=\"Reflect\" "; else if( grad.repeatMethod() == VGradient::repeat ) @@ -343,7 +343,7 @@ XAMLExport::getStroke( const VStroke& stroke ) *m_body << " StrokeDashOffset=\"" << stroke.dashPattern().offset() << "\""; *m_body << " StrokeDashArray=\" "; - QValueListConstIterator itr; + TQValueListConstIterator itr; for(itr = stroke.dashPattern().array().begin(); itr != stroke.dashPattern().array().end(); ++itr ) { *m_body << *itr << " "; @@ -353,11 +353,11 @@ XAMLExport::getStroke( const VStroke& stroke ) } void -XAMLExport::getHexColor( QTextStream *stream, const VColor& color ) +XAMLExport::getHexColor( TQTextStream *stream, const VColor& color ) { // Convert the various color-spaces to hex - QString Output; + TQString Output; VColor copy( color ); copy.setColorSpace( VColor::rgb ); diff --git a/filters/karbon/xaml/xamlexport.h b/filters/karbon/xaml/xamlexport.h index 3d2701c6..cb762a8d 100644 --- a/filters/karbon/xaml/xamlexport.h +++ b/filters/karbon/xaml/xamlexport.h @@ -27,9 +27,9 @@ #include "xamlgraphiccontext.h" -#include +#include -class QTextStream; +class TQTextStream; class VColor; class VPath; class VDocument; @@ -44,12 +44,13 @@ class VText; class XAMLExport : public KoFilter, private VVisitor { Q_OBJECT + TQ_OBJECT public: - XAMLExport( KoFilter* parent, const char* name, const QStringList& ); + XAMLExport( KoFilter* tqparent, const char* name, const TQStringList& ); virtual ~XAMLExport() {} - virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to ); private: virtual void visitVPath( VPath& composite ); @@ -59,17 +60,17 @@ private: //virtual void visitVText( VText& text ); void getStroke( const VStroke& stroke ); - void getColorStops( const QPtrVector &colorStops ); + void getColorStops( const TQPtrVector &colorStops ); void getFill( const VFill& fill ); void getGradient( const VGradient& grad ); - void getHexColor( QTextStream *, const VColor& color ); - QString getID( VObject *obj ); + void getHexColor( TQTextStream *, const VColor& color ); + TQString getID( VObject *obj ); - QTextStream* m_stream; - QTextStream* m_defs; - QTextStream* m_body; + TQTextStream* m_stream; + TQTextStream* m_defs; + TQTextStream* m_body; - QPtrStack m_gc; + TQPtrStack m_gc; }; #endif diff --git a/filters/karbon/xaml/xamlgraphiccontext.h b/filters/karbon/xaml/xamlgraphiccontext.h index db4a8363..8f298138 100644 --- a/filters/karbon/xaml/xamlgraphiccontext.h +++ b/filters/karbon/xaml/xamlgraphiccontext.h @@ -33,14 +33,14 @@ public: stroke.setLineWidth( 1.0 ); stroke.setLineCap( VStroke::capButt ); stroke.setLineJoin( VStroke::joinMiter ); - fill.setColor( VColor( Qt::black ) ); + fill.setColor( VColor( TQt::black ) ); fillRule = winding; } VFill fill; VFillRule fillRule; VStroke stroke; - QWMatrix matrix; - QFont font; + TQWMatrix matrix; + TQFont font; }; #endif diff --git a/filters/karbon/xaml/xamlimport.cc b/filters/karbon/xaml/xamlimport.cc index 297ff68d..b7f68bbb 100644 --- a/filters/karbon/xaml/xamlimport.cc +++ b/filters/karbon/xaml/xamlimport.cc @@ -24,9 +24,9 @@ #include #include #include -#include -#include -#include +#include +#include +#include #include #include #include @@ -34,14 +34,14 @@ #include #include #include -#include -#include +#include +#include #include typedef KGenericFactory XAMLImportFactory; K_EXPORT_COMPONENT_FACTORY( libkarbonxamlimport, XAMLImportFactory( "kofficefilters" ) ) -XAMLImport::XAMLImport(KoFilter *, const char *, const QStringList&) : +XAMLImport::XAMLImport(KoFilter *, const char *, const TQStringList&) : KoFilter(), outdoc( "DOC" ) { @@ -52,22 +52,22 @@ XAMLImport::~XAMLImport() { } -KoFilter::ConversionStatus XAMLImport::convert(const QCString& from, const QCString& to) +KoFilter::ConversiontqStatus XAMLImport::convert(const TQCString& from, const TQCString& to) { // check for proper conversion if( to != "application/x-karbon" || from != "image/wvg+xml" ) return KoFilter::NotImplemented; //Find the last extension - QString strExt; - QString fileIn ( m_chain->inputFile() ); - const int result=fileIn.findRev('.'); + TQString strExt; + TQString fileIn ( m_chain->inputFile() ); + const int result=fileIn.tqfindRev('.'); if (result>=0) { strExt=fileIn.mid(result).lower(); } - QString strMime; // Mime type of the compressor + TQString strMime; // Mime type of the compressor if ((strExt==".gz") //in case of .svg.gz (logical extension) ||(strExt==".wvgz")) //in case of .svgz (extension used prioritary) strMime="application/x-gzip"; // Compressed with gzip @@ -78,7 +78,7 @@ KoFilter::ConversionStatus XAMLImport::convert(const QCString& from, const QCStr kdDebug(30514) << "File extension: -" << strExt << "- Compression: " << strMime << endl; - QIODevice* in = KFilterDev::deviceForFile(fileIn,strMime); + TQIODevice* in = KFilterDev::deviceForFile(fileIn,strMime); if (!in->open(IO_ReadOnly)) { @@ -88,7 +88,7 @@ KoFilter::ConversionStatus XAMLImport::convert(const QCString& from, const QCStr } int line, col; - QString errormessage; + TQString errormessage; const bool parsed=inpdoc.setContent( in, &errormessage, &line, &col ); in->close(); delete in; @@ -110,7 +110,7 @@ KoFilter::ConversionStatus XAMLImport::convert(const QCString& from, const QCStr kdError(30514) << "Unable to open output file!" << endl; return KoFilter::StorageCreationError; } - QCString cstring = outdoc.toCString(); // utf-8 already + TQCString cstring = outdoc.toCString(); // utf-8 already out->writeBlock( cstring.data(), cstring.length() ); return KoFilter::OK; // was successful @@ -120,7 +120,7 @@ void XAMLImport::convert() { XAMLGraphicsContext *gc = new XAMLGraphicsContext; - QDomElement docElem = inpdoc.documentElement(); + TQDomElement docElem = inpdoc.documentElement(); KoRect bbox( 0, 0, 550.0, 841.0 ); double width = !docElem.attribute( "width" ).isEmpty() ? parseUnit( docElem.attribute( "width" ), true, false, bbox ) : 550.0; double height = !docElem.attribute( "height" ).isEmpty() ? parseUnit( docElem.attribute( "height" ), false, true, bbox ) : 841.0; @@ -132,8 +132,8 @@ XAMLImport::convert() if( !docElem.attribute( "viewBox" ).isEmpty() ) { // allow for viewbox def with ',' or whitespace - QString viewbox( docElem.attribute( "viewBox" ) ); - QStringList points = QStringList::split( ' ', viewbox.replace( ',', ' ').simplifyWhiteSpace() ); + TQString viewbox( docElem.attribute( "viewBox" ) ); + TQStringList points = TQStringList::split( ' ', viewbox.tqreplace( ',', ' ').simplifyWhiteSpace() ); gc->matrix.scale( width / points[2].toFloat() , height / points[3].toFloat() ); m_outerRect.setWidth( m_outerRect.width() * ( points[2].toFloat() / width ) ); @@ -142,7 +142,7 @@ XAMLImport::convert() m_gc.push( gc ); parseGroup( 0L, docElem ); - QWMatrix mat; + TQWMatrix mat; mat.scale( 1, -1 ); mat.translate( 0, -m_document.height() ); VTransformCmd trafo( 0L, mat ); @@ -153,7 +153,7 @@ XAMLImport::convert() #define DPI 90 double -XAMLImport::toPercentage( QString s ) +XAMLImport::toPercentage( TQString s ) { if( s.endsWith( "%" ) ) return s.remove( '%' ).toDouble(); @@ -162,7 +162,7 @@ XAMLImport::toPercentage( QString s ) } double -XAMLImport::fromPercentage( QString s ) +XAMLImport::fromPercentage( TQString s ) { if( s.endsWith( "%" ) ) return s.remove( '%' ).toDouble() / 100.0; @@ -233,7 +233,7 @@ getNumber( const char *ptr, double &number ) double -XAMLImport::parseUnit( const QString &unit, bool horiz, bool vert, KoRect bbox ) +XAMLImport::parseUnit( const TQString &unit, bool horiz, bool vert, KoRect bbox ) { // TODO : percentage? double value = 0; @@ -284,50 +284,50 @@ XAMLImport::parseUnit( const QString &unit, bool horiz, bool vert, KoRect bbox ) return value; } -QColor -XAMLImport::parseColor( const QString &rgbColor ) +TQColor +XAMLImport::parseColor( const TQString &rgbColor ) { int r, g, b; keywordToRGB( rgbColor, r, g, b ); - return QColor( r, g, b ); + return TQColor( r, g, b ); } void -XAMLImport::parseColor( VColor &color, const QString &s ) +XAMLImport::parseColor( VColor &color, const TQString &s ) { if( s.startsWith( "rgb(" ) ) { - QString parse = s.stripWhiteSpace(); - QStringList colors = QStringList::split( ',', parse ); - QString r = colors[0].right( ( colors[0].length() - 4 ) ); - QString g = colors[1]; - QString b = colors[2].left( ( colors[2].length() - 1 ) ); + TQString parse = s.stripWhiteSpace(); + TQStringList colors = TQStringList::split( ',', parse ); + TQString r = colors[0].right( ( colors[0].length() - 4 ) ); + TQString g = colors[1]; + TQString b = colors[2].left( ( colors[2].length() - 1 ) ); - if( r.contains( "%" ) ) + if( r.tqcontains( "%" ) ) { r = r.left( r.length() - 1 ); - r = QString::number( int( ( double( 255 * r.toDouble() ) / 100.0 ) ) ); + r = TQString::number( int( ( double( 255 * r.toDouble() ) / 100.0 ) ) ); } - if( g.contains( "%" ) ) + if( g.tqcontains( "%" ) ) { g = g.left( g.length() - 1 ); - g = QString::number( int( ( double( 255 * g.toDouble() ) / 100.0 ) ) ); + g = TQString::number( int( ( double( 255 * g.toDouble() ) / 100.0 ) ) ); } - if( b.contains( "%" ) ) + if( b.tqcontains( "%" ) ) { b = b.left( b.length() - 1 ); - b = QString::number( int( ( double( 255 * b.toDouble() ) / 100.0 ) ) ); + b = TQString::number( int( ( double( 255 * b.toDouble() ) / 100.0 ) ) ); } - QColor c( r.toInt(), g.toInt(), b.toInt() ); + TQColor c( r.toInt(), g.toInt(), b.toInt() ); color.set( c.red() / 255.0, c.green() / 255.0, c.blue() / 255.0 ); } else { - QString rgbColor = s.stripWhiteSpace(); - QColor c; + TQString rgbColor = s.stripWhiteSpace(); + TQColor c; if( rgbColor.startsWith( "#" ) ) c.setNamedColor( rgbColor ); else @@ -337,17 +337,17 @@ XAMLImport::parseColor( VColor &color, const QString &s ) } void -XAMLImport::parseColorStops( VGradient *gradient, const QDomElement &e ) +XAMLImport::parseColorStops( VGradient *gradient, const TQDomElement &e ) { VColor c; - for( QDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling() ) + for( TQDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling() ) { - QDomElement stop = n.toElement(); + TQDomElement stop = n.toElement(); if( stop.tagName() == "stop" ) { float offset; - QString temp = stop.attribute( "offset" ); - if( temp.contains( '%' ) ) + TQString temp = stop.attribute( "offset" ); + if( temp.tqcontains( '%' ) ) { temp = temp.left( temp.length() - 1 ); offset = temp.toFloat() / 100.0; @@ -360,13 +360,13 @@ XAMLImport::parseColorStops( VGradient *gradient, const QDomElement &e ) else { // try style attr - QString style = stop.attribute( "style" ).simplifyWhiteSpace(); - QStringList substyles = QStringList::split( ';', style ); - for( QStringList::Iterator it = substyles.begin(); it != substyles.end(); ++it ) + TQString style = stop.attribute( "style" ).simplifyWhiteSpace(); + TQStringList substyles = TQStringList::split( ';', style ); + for( TQStringList::Iterator it = substyles.begin(); it != substyles.end(); ++it ) { - QStringList substyle = QStringList::split( ':', (*it) ); - QString command = substyle[0].stripWhiteSpace(); - QString params = substyle[1].stripWhiteSpace(); + TQStringList substyle = TQStringList::split( ':', (*it) ); + TQString command = substyle[0].stripWhiteSpace(); + TQString params = substyle[1].stripWhiteSpace(); if( command == "stop-color" ) parseColor( c, params ); if( command == "stop-opacity" ) @@ -382,13 +382,13 @@ XAMLImport::parseColorStops( VGradient *gradient, const QDomElement &e ) } void -XAMLImport::parseGradient( const QDomElement &e ) +XAMLImport::parseGradient( const TQDomElement &e ) { GradientHelper gradhelper; gradhelper.gradient.clearStops(); gradhelper.gradient.setRepeatMethod( VGradient::none ); - QString href = e.attribute( "xlink:href" ).mid( 1 ); + TQString href = e.attribute( "xlink:href" ).mid( 1 ); if( !href.isEmpty() ) { //kdDebug() << "Indexing with href : " << href.latin1() << endl; @@ -428,7 +428,7 @@ XAMLImport::parseGradient( const QDomElement &e ) gradhelper.gradient.setType( VGradient::radial ); } // handle spread method - QString spreadMethod = e.attribute( "spreadMethod" ); + TQString spreadMethod = e.attribute( "spreadMethod" ); if( !spreadMethod.isEmpty() ) { if( spreadMethod == "reflect" ) @@ -443,7 +443,7 @@ XAMLImport::parseGradient( const QDomElement &e ) } void -XAMLImport::parsePA( VObject *obj, XAMLGraphicsContext *gc, const QString &command, const QString ¶ms ) +XAMLImport::parsePA( VObject *obj, XAMLGraphicsContext *gc, const TQString &command, const TQString ¶ms ) { VColor fillcolor = gc->fill.color(); VColor strokecolor = gc->stroke.color(); @@ -454,9 +454,9 @@ XAMLImport::parsePA( VObject *obj, XAMLGraphicsContext *gc, const QString &comma gc->fill.setType( VFill::none ); else if( params.startsWith( "url(" ) ) { - unsigned int start = params.find("#") + 1; - unsigned int end = params.findRev(")"); - QString key = params.mid( start, end - start ); + unsigned int start = params.tqfind("#") + 1; + unsigned int end = params.tqfindRev(")"); + TQString key = params.mid( start, end - start ); gc->fill.gradient() = m_gradients[ key ].gradient; if( m_gradients[ key ].bbox ) { @@ -466,14 +466,14 @@ XAMLImport::parsePA( VObject *obj, XAMLGraphicsContext *gc, const QString &comma //kdDebug() << "!!!!!!bbox y : " << bbox.y() << endl; //kdDebug() << gc->fill.gradient().origin().x() << endl; //kdDebug() << gc->fill.gradient().vector().x() << endl; - double offsetx = parseUnit( QString( "%1%" ).arg( gc->fill.gradient().origin().x() ), true, false, bbox ); - double offsety = parseUnit( QString( "%1%" ).arg( gc->fill.gradient().origin().y() ), false, true, bbox ); + double offsetx = parseUnit( TQString( "%1%" ).tqarg( gc->fill.gradient().origin().x() ), true, false, bbox ); + double offsety = parseUnit( TQString( "%1%" ).tqarg( gc->fill.gradient().origin().y() ), false, true, bbox ); gc->fill.gradient().setOrigin( KoPoint( bbox.x() + offsetx, bbox.y() + offsety ) ); - offsetx = parseUnit( QString( "%1%" ).arg( gc->fill.gradient().focalPoint().x() ), true, false, bbox ); - offsety = parseUnit( QString( "%1%" ).arg( gc->fill.gradient().focalPoint().y() ), false, true, bbox ); + offsetx = parseUnit( TQString( "%1%" ).tqarg( gc->fill.gradient().focalPoint().x() ), true, false, bbox ); + offsety = parseUnit( TQString( "%1%" ).tqarg( gc->fill.gradient().focalPoint().y() ), false, true, bbox ); gc->fill.gradient().setFocalPoint( KoPoint( bbox.x() + offsetx, bbox.y() + offsety ) ); - offsetx = parseUnit( QString( "%1%" ).arg( gc->fill.gradient().vector().x() ), true, false, bbox ); - offsety = parseUnit( QString( "%1%" ).arg( gc->fill.gradient().vector().y() ), false, true, bbox ); + offsetx = parseUnit( TQString( "%1%" ).tqarg( gc->fill.gradient().vector().x() ), true, false, bbox ); + offsety = parseUnit( TQString( "%1%" ).tqarg( gc->fill.gradient().vector().y() ), false, true, bbox ); gc->fill.gradient().setVector( KoPoint( bbox.x() + offsetx, bbox.y() + offsety ) ); //kdDebug() << offsety << endl; //kdDebug() << gc->fill.gradient().origin().x() << endl; @@ -505,9 +505,9 @@ XAMLImport::parsePA( VObject *obj, XAMLGraphicsContext *gc, const QString &comma gc->stroke.setType( VStroke::none ); else if( params.startsWith( "url(" ) ) { - unsigned int start = params.find("#") + 1; - unsigned int end = params.findRev(")"); - QString key = params.mid( start, end - start ); + unsigned int start = params.tqfind("#") + 1; + unsigned int end = params.tqfindRev(")"); + TQString key = params.mid( start, end - start ); gc->stroke.gradient() = m_gradients[ key ].gradient; gc->stroke.gradient().transform( m_gradients[ key ].gradientTransform ); gc->stroke.gradient().transform( gc->matrix ); @@ -543,11 +543,11 @@ XAMLImport::parsePA( VObject *obj, XAMLGraphicsContext *gc, const QString &comma gc->stroke.setMiterLimit( params.toFloat() ); else if( command == "stroke-dasharray" ) { - QValueList array; + TQValueList array; if(params != "none") { - QStringList dashes = QStringList::split( ' ', params ); - for( QStringList::Iterator it = dashes.begin(); it != dashes.end(); ++it ) + TQStringList dashes = TQStringList::split( ' ', params ); + for( TQStringList::Iterator it = dashes.begin(); it != dashes.end(); ++it ) array.append( (*it).toFloat() ); } gc->stroke.dashPattern().setArray( array ); @@ -566,8 +566,8 @@ XAMLImport::parsePA( VObject *obj, XAMLGraphicsContext *gc, const QString &comma } else if( command == "font-family" ) { - QString family = params; - family.replace( '\'' , ' ' ); + TQString family = params; + family.tqreplace( '\'' , ' ' ); gc->font.setFamily( family ); } else if( command == "font-size" ) @@ -600,16 +600,16 @@ XAMLImport::addGraphicContext() } void -XAMLImport::setupTransform( const QDomElement &e ) +XAMLImport::setupTransform( const TQDomElement &e ) { XAMLGraphicsContext *gc = m_gc.current(); - QWMatrix mat = VPath::parseTransform( e.attribute( "transform" ) ); + TQWMatrix mat = VPath::parseTransform( e.attribute( "transform" ) ); gc->matrix = mat * gc->matrix; } void -XAMLImport::parseStyle( VObject *obj, const QDomElement &e ) +XAMLImport::parseStyle( VObject *obj, const TQDomElement &e ) { XAMLGraphicsContext *gc = m_gc.current(); if( !gc ) return; @@ -641,13 +641,13 @@ XAMLImport::parseStyle( VObject *obj, const QDomElement &e ) parsePA( obj, gc, "opacity", e.attribute( "opacity" ) ); // try style attr - QString style = e.attribute( "style" ).simplifyWhiteSpace(); - QStringList substyles = QStringList::split( ';', style ); - for( QStringList::Iterator it = substyles.begin(); it != substyles.end(); ++it ) + TQString style = e.attribute( "style" ).simplifyWhiteSpace(); + TQStringList substyles = TQStringList::split( ';', style ); + for( TQStringList::Iterator it = substyles.begin(); it != substyles.end(); ++it ) { - QStringList substyle = QStringList::split( ':', (*it) ); - QString command = substyle[0].stripWhiteSpace(); - QString params = substyle[1].stripWhiteSpace(); + TQStringList substyle = TQStringList::split( ':', (*it) ); + TQString command = substyle[0].stripWhiteSpace(); + TQString params = substyle[1].stripWhiteSpace(); parsePA( obj, gc, command, params ); } @@ -662,7 +662,7 @@ XAMLImport::parseStyle( VObject *obj, const QDomElement &e ) } void -XAMLImport::parseFont( const QDomElement &e ) +XAMLImport::parseFont( const TQDomElement &e ) { XAMLGraphicsContext *gc = m_gc.current(); if( !gc ) return; @@ -676,15 +676,15 @@ XAMLImport::parseFont( const QDomElement &e ) } void -XAMLImport::parseGroup( VGroup *grp, const QDomElement &e ) +XAMLImport::parseGroup( VGroup *grp, const TQDomElement &e ) { bool isDef = false; if( e.tagName() == "defs" ) isDef = true; - for( QDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling() ) + for( TQDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling() ) { - QDomElement b = n.toElement(); + TQDomElement b = n.toElement(); if( b.isNull() ) continue; VObject *obj = 0L; if( b.tagName() == "g" ) @@ -749,13 +749,13 @@ XAMLImport::parseGroup( VGroup *grp, const QDomElement &e ) if( !b.attribute( "xlink:href" ).isEmpty() ) { - QString params = b.attribute( "xlink:href" ); - unsigned int start = params.find("#") + 1; - unsigned int end = params.findRev(")"); - QString key = params.mid( start, end - start ); - if(m_paths.contains(key)) + TQString params = b.attribute( "xlink:href" ); + unsigned int start = params.tqfind("#") + 1; + unsigned int end = params.tqfindRev(")"); + TQString key = params.mid( start, end - start ); + if(m_paths.tqcontains(key)) { - QDomElement a = m_paths[key]; + TQDomElement a = m_paths[key]; obj = createObject( a ); m_gc.current()->matrix.translate(tx,ty); parsePA( grp, m_gc.current(), "fill", b.attribute( "fill" ) ); @@ -777,7 +777,7 @@ XAMLImport::parseGroup( VGroup *grp, const QDomElement &e ) } } -VObject* XAMLImport::findObject( const QString &name, VGroup* group ) +VObject* XAMLImport::findObject( const TQString &name, VGroup* group ) { if( ! group ) return 0L; @@ -801,9 +801,9 @@ VObject* XAMLImport::findObject( const QString &name, VGroup* group ) return 0L; } -VObject* XAMLImport::findObject( const QString &name ) +VObject* XAMLImport::findObject( const TQString &name ) { - QPtrVector vector; + TQPtrVector vector; m_document.layers().toVector( &vector ); for( int i = vector.count() - 1; i >= 0; i-- ) { @@ -818,10 +818,10 @@ VObject* XAMLImport::findObject( const QString &name ) return 0L; } -void XAMLImport::createText( VGroup *grp, const QDomElement &b ) +void XAMLImport::createText( VGroup *grp, const TQDomElement &b ) { VText *text = 0L; - QString content; + TQString content; VSubpath base( 0L ); VPath *path = 0L; @@ -841,9 +841,9 @@ void XAMLImport::createText( VGroup *grp, const QDomElement &b ) base.lineTo( KoPoint( x + 10, y ) ); } - for( QDomNode n = b.firstChild(); !n.isNull(); n = n.nextSibling() ) + for( TQDomNode n = b.firstChild(); !n.isNull(); n = n.nextSibling() ) { - QDomElement e = n.toElement(); + TQDomElement e = n.toElement(); if( e.isNull() ) { content += n.toCharacterData().data(); @@ -853,11 +853,11 @@ void XAMLImport::createText( VGroup *grp, const QDomElement &b ) if( e.attribute( "xlink:href" ).isEmpty() ) continue; - QString uri = e.attribute( "xlink:href" ); - unsigned int start = uri.find("#") + 1; - unsigned int end = uri.findRev(")"); - QString key = uri.mid( start, end - start ); - if( ! m_paths.contains(key) ) + TQString uri = e.attribute( "xlink:href" ); + unsigned int start = uri.tqfind("#") + 1; + unsigned int end = uri.tqfindRev(")"); + TQString key = uri.mid( start, end - start ); + if( ! m_paths.tqcontains(key) ) { VObject* obj = findObject( key ); if( obj ) @@ -865,7 +865,7 @@ void XAMLImport::createText( VGroup *grp, const QDomElement &b ) } else { - QDomElement p = m_paths[key]; + TQDomElement p = m_paths[key]; path = dynamic_cast( createObject( p ) ); if( path ) path->setState( VObject::deleted ); @@ -882,8 +882,8 @@ void XAMLImport::createText( VGroup *grp, const QDomElement &b ) content += e.text(); if( base.isEmpty() && ! e.attribute( "x" ).isEmpty() && ! e.attribute( "y" ).isEmpty() ) { - QStringList posX = QStringList::split( ", ", e.attribute( "x" ) ); - QStringList posY = QStringList::split( ", ", e.attribute( "y" ) ); + TQStringList posX = TQStringList::split( ", ", e.attribute( "x" ) ); + TQStringList posY = TQStringList::split( ", ", e.attribute( "y" ) ); if( posX.count() && posY.count() ) { double x = parseUnit( posX.first() ); @@ -898,12 +898,12 @@ void XAMLImport::createText( VGroup *grp, const QDomElement &b ) if( e.attribute( "xlink:href" ).isEmpty() ) continue; - QString uri = e.attribute( "xlink:href" ); - unsigned int start = uri.find("#") + 1; - unsigned int end = uri.findRev(")"); - QString key = uri.mid( start, end - start ); + TQString uri = e.attribute( "xlink:href" ); + unsigned int start = uri.tqfind("#") + 1; + unsigned int end = uri.tqfindRev(")"); + TQString key = uri.mid( start, end - start ); - if( ! m_paths.contains(key) ) + if( ! m_paths.tqcontains(key) ) { VObject* obj = findObject( key ); if( obj ) @@ -911,7 +911,7 @@ void XAMLImport::createText( VGroup *grp, const QDomElement &b ) } else { - QDomElement p = m_paths[key]; + TQDomElement p = m_paths[key]; content += p.text(); } } @@ -948,7 +948,7 @@ void XAMLImport::createText( VGroup *grp, const QDomElement &b ) delete( m_gc.pop() ); } -VObject* XAMLImport::createObject( const QDomElement &b ) +VObject* XAMLImport::createObject( const TQDomElement &b ) { if( b.tagName() == "rect" ) { @@ -999,12 +999,12 @@ VObject* XAMLImport::createObject( const QDomElement &b ) VPath *path = new VPath( &m_document ); bool bFirst = true; - QString points = b.attribute( "points" ).simplifyWhiteSpace(); - points.replace( ',', ' ' ); + TQString points = b.attribute( "points" ).simplifyWhiteSpace(); + points.tqreplace( ',', ' ' ); points.remove( '\r' ); points.remove( '\n' ); - QStringList pointList = QStringList::split( ' ', points ); - for( QStringList::Iterator it = pointList.begin(); it != pointList.end(); ++it) + TQStringList pointList = TQStringList::split( ' ', points ); + for( TQStringList::Iterator it = pointList.begin(); it != pointList.end(); ++it) { KoPoint point; point.setX( (*it).toDouble() ); @@ -1032,7 +1032,7 @@ VObject* XAMLImport::createObject( const QDomElement &b ) { addGraphicContext(); setupTransform( b ); - QString fname = b.attribute("xlink:href"); + TQString fname = b.attribute("xlink:href"); return new VImage( 0L, fname ); } diff --git a/filters/karbon/xaml/xamlimport.h b/filters/karbon/xaml/xamlimport.h index 05763419..83f11fc8 100644 --- a/filters/karbon/xaml/xamlimport.h +++ b/filters/karbon/xaml/xamlimport.h @@ -21,9 +21,9 @@ #define __XAMLIMPORT_H__ #include -#include -#include -#include +#include +#include +#include #include #include #include @@ -37,12 +37,13 @@ class VPath; class XAMLImport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - XAMLImport(KoFilter *parent, const char *name, const QStringList&); + XAMLImport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~XAMLImport(); - virtual KoFilter::ConversionStatus convert(const QCString& from, const QCString& to); + virtual KoFilter::ConversiontqStatus convert(const TQCString& from, const TQCString& to); protected: class GradientHelper @@ -54,37 +55,37 @@ protected: } VGradient gradient; bool bbox; - QWMatrix gradientTransform; + TQWMatrix gradientTransform; }; - void parseGroup( VGroup *, const QDomElement & ); - void parseStyle( VObject *, const QDomElement & ); - void parsePA( VObject *, XAMLGraphicsContext *, const QString &, const QString & ); - void parseGradient( const QDomElement & ); - void parseColorStops( VGradient *, const QDomElement & ); - double parseUnit( const QString &, bool horiz = false, bool vert = false, KoRect bbox = KoRect() ); - void parseColor( VColor &, const QString & ); - QColor parseColor( const QString & ); - double toPercentage( QString ); - double fromPercentage( QString ); - void setupTransform( const QDomElement & ); + void parseGroup( VGroup *, const TQDomElement & ); + void parseStyle( VObject *, const TQDomElement & ); + void parsePA( VObject *, XAMLGraphicsContext *, const TQString &, const TQString & ); + void parseGradient( const TQDomElement & ); + void parseColorStops( VGradient *, const TQDomElement & ); + double parseUnit( const TQString &, bool horiz = false, bool vert = false, KoRect bbox = KoRect() ); + void parseColor( VColor &, const TQString & ); + TQColor parseColor( const TQString & ); + double toPercentage( TQString ); + double fromPercentage( TQString ); + void setupTransform( const TQDomElement & ); void addGraphicContext(); - QDomDocument inpdoc; - QDomDocument outdoc; + TQDomDocument inpdoc; + TQDomDocument outdoc; void convert(); - VObject* createObject( const QDomElement & ); - void createText( VGroup *, const QDomElement & ); - void parseFont( const QDomElement & ); + VObject* createObject( const TQDomElement & ); + void createText( VGroup *, const TQDomElement & ); + void parseFont( const TQDomElement & ); // find object with given id in document - VObject* findObject( const QString &name ); + VObject* findObject( const TQString &name ); // find object with given id in given group - VObject* findObject( const QString &name, VGroup * ); + VObject* findObject( const TQString &name, VGroup * ); private: VDocument m_document; - QPtrStack m_gc; - QMap m_gradients; - QMap m_paths; + TQPtrStack m_gc; + TQMap m_gradients; + TQMap m_paths; KoRect m_outerRect; }; diff --git a/filters/karbon/xcf/xcfexport.cc b/filters/karbon/xcf/xcfexport.cc index fde8bbd5..d5a0c71b 100644 --- a/filters/karbon/xcf/xcfexport.cc +++ b/filters/karbon/xcf/xcfexport.cc @@ -17,12 +17,12 @@ * Boston, MA 02110-1301, USA. */ -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include @@ -45,15 +45,15 @@ typedef KGenericFactory XcfExportFactory; K_EXPORT_COMPONENT_FACTORY( libkarbonxcfexport, XcfExportFactory( "kofficefilters" ) ) -XcfExport::XcfExport( KoFilter*, const char*, const QStringList& ) +XcfExport::XcfExport( KoFilter*, const char*, const TQStringList& ) : KoFilter() { m_zoomX = 1.0; m_zoomY = 1.0; } -KoFilter::ConversionStatus -XcfExport::convert( const QCString& from, const QCString& to ) +KoFilter::ConversiontqStatus +XcfExport::convert( const TQCString& from, const TQCString& to ) { if( to != "image/x-xcf-gimp" || from != "application/x-karbon" ) { @@ -67,17 +67,17 @@ XcfExport::convert( const QCString& from, const QCString& to ) return KoFilter::StupidError; - QFile fileOut( m_chain->outputFile() ); + TQFile fileOut( m_chain->outputFile() ); if( !fileOut.open( IO_WriteOnly ) ) return KoFilter::StupidError; - QDomDocument domIn; + TQDomDocument domIn; domIn.setContent( storeIn ); - QDomElement docNode = domIn.documentElement(); + TQDomElement docNode = domIn.documentElement(); - m_stream = new QDataStream( &fileOut ); + m_stream = new TQDataStream( &fileOut ); // Load the document. @@ -98,9 +98,9 @@ void XcfExport::visitVDocument( VDocument& document ) { // Offsets. - QIODevice::Offset current = 0; - QIODevice::Offset start = 0; - QIODevice::Offset end = 0; + TQIODevice::Offset current = 0; + TQIODevice::Offset start = 0; + TQIODevice::Offset end = 0; // Save width and height for layer saving. m_width = static_cast( document.width() * m_zoomX ); @@ -111,27 +111,27 @@ XcfExport::visitVDocument( VDocument& document ) m_stream->writeRawBytes( "gimp xcf file", 14 ); // Image width. - *m_stream << static_cast( m_width ); + *m_stream << static_cast( m_width ); // Image height. - *m_stream << static_cast( m_height ); + *m_stream << static_cast( m_height ); // Image type = RGB. - *m_stream << static_cast( 0 ); + *m_stream << static_cast( 0 ); // Do not save any properties currently. *m_stream // "END". - << static_cast( 0 ) + << static_cast( 0 ) // Property size in bytes. - << static_cast( 0 ); + << static_cast( 0 ); // Save current offset. - current = m_stream->device()->at(); + current = m_stream->tqdevice()->at(); // Leave space for layer and channel offsets. - m_stream->device()->at( + m_stream->tqdevice()->at( // current position + (number layers + number channels + 2) * 4. current + ( document.layers().count() + 3 + 2 ) * 4 ); @@ -142,7 +142,7 @@ XcfExport::visitVDocument( VDocument& document ) for( ; itr.current(); ++itr ) { // Save start offset. - start = m_stream->device()->at(); + start = m_stream->tqdevice()->at(); // Write layer. @@ -150,142 +150,142 @@ XcfExport::visitVDocument( VDocument& document ) // Save end offset. - end = m_stream->device()->at(); + end = m_stream->tqdevice()->at(); // Return to current offset. - m_stream->device()->at( current ); + m_stream->tqdevice()->at( current ); // Save layer offset. *m_stream << start; // Increment offset. - current = m_stream->device()->at(); + current = m_stream->tqdevice()->at(); // Return to end offset. - m_stream->device()->at( end ); + m_stream->tqdevice()->at( end ); } // Return to current offset. - m_stream->device()->at( current ); + m_stream->tqdevice()->at( current ); // Append a zero offset to indicate end of layer offsets. - *m_stream << static_cast( 0 ); + *m_stream << static_cast( 0 ); // Return to end offset. - m_stream->device()->at( end ); + m_stream->tqdevice()->at( end ); // Append a zero offset to indicate end of channel offsets. - *m_stream << static_cast( 0 ); + *m_stream << static_cast( 0 ); } void XcfExport::visitVLayer( VLayer& layer ) { // Layer width = image width. - *m_stream << static_cast( m_width ); + *m_stream << static_cast( m_width ); // Layer height = image height. - *m_stream << static_cast( m_height ); + *m_stream << static_cast( m_height ); // Layer type = RGBA. - *m_stream << static_cast( 1 ); + *m_stream << static_cast( 1 ); // Layer name. *m_stream << layer.name().latin1(); // Layer opacity. - *m_stream << static_cast( 6 ); + *m_stream << static_cast( 6 ); // Property size in bytes. - *m_stream << static_cast( 4 ); + *m_stream << static_cast( 4 ); // Fully opaque = 255. - *m_stream << static_cast( 255 ); + *m_stream << static_cast( 255 ); // Layer visible? - *m_stream << static_cast( 8 ); + *m_stream << static_cast( 8 ); // Property size in bytes. - *m_stream << static_cast( 4 ); + *m_stream << static_cast( 4 ); // True. - *m_stream << static_cast( 1 ); + *m_stream << static_cast( 1 ); // Layer linked? - *m_stream << static_cast( 9 ); + *m_stream << static_cast( 9 ); // Property size in bytes. - *m_stream << static_cast( 4 ); + *m_stream << static_cast( 4 ); // False. - *m_stream << static_cast( 0 ); + *m_stream << static_cast( 0 ); // Preserve transparency? - *m_stream << static_cast( 10 ); + *m_stream << static_cast( 10 ); // Property size in bytes. - *m_stream << static_cast( 4 ); + *m_stream << static_cast( 4 ); // False. - *m_stream << static_cast( 0 ); + *m_stream << static_cast( 0 ); - // Apply mask? - *m_stream << static_cast( 11 ); + // Apply tqmask? + *m_stream << static_cast( 11 ); // Property size in bytes. - *m_stream << static_cast( 4 ); + *m_stream << static_cast( 4 ); // False. - *m_stream << static_cast( 0 ); + *m_stream << static_cast( 0 ); - // Edit mask? - *m_stream << static_cast( 12 ); + // Edit tqmask? + *m_stream << static_cast( 12 ); // Property size in bytes. - *m_stream << static_cast( 4 ); + *m_stream << static_cast( 4 ); // False. - *m_stream << static_cast( 0 ); + *m_stream << static_cast( 0 ); - // Show mask? - *m_stream << static_cast( 13 ); + // Show tqmask? + *m_stream << static_cast( 13 ); // Property size in bytes. - *m_stream << static_cast( 4 ); + *m_stream << static_cast( 4 ); // False. - *m_stream << static_cast( 0 ); + *m_stream << static_cast( 0 ); // Layer offsets. - *m_stream << static_cast( 15 ); + *m_stream << static_cast( 15 ); // Property size in bytes. - *m_stream << static_cast( 8 ); + *m_stream << static_cast( 8 ); // X-Offset. - *m_stream << static_cast( 0 ); + *m_stream << static_cast( 0 ); // Y-Offset. - *m_stream << static_cast( 0 ); + *m_stream << static_cast( 0 ); // Layer mode. - *m_stream << static_cast( 7 ); + *m_stream << static_cast( 7 ); // Property size in bytes. - *m_stream << static_cast( 4 ); + *m_stream << static_cast( 4 ); // Normal mode. - *m_stream << static_cast( 0 ); + *m_stream << static_cast( 0 ); // TODO: Tattoo. - *m_stream << static_cast( 20 ); + *m_stream << static_cast( 20 ); // Property size in bytes. - *m_stream << static_cast( 4 ); + *m_stream << static_cast( 4 ); // False. - *m_stream << static_cast( 0 ); + *m_stream << static_cast( 0 ); // Layer properties end. - *m_stream << static_cast( 0 ); + *m_stream << static_cast( 0 ); // Property size in bytes. - *m_stream << static_cast( 0 ); + *m_stream << static_cast( 0 ); // Offsets. - QIODevice::Offset current = 0; - QIODevice::Offset start = 0; - QIODevice::Offset end = 0; + TQIODevice::Offset current = 0; + TQIODevice::Offset start = 0; + TQIODevice::Offset end = 0; // Save current offset. - current = m_stream->device()->at(); + current = m_stream->tqdevice()->at(); // Leave space for hierarchy offsets. - m_stream->device()->at( current + 8 ); + m_stream->tqdevice()->at( current + 8 ); // Save start offset. - start = m_stream->device()->at(); + start = m_stream->tqdevice()->at(); // Write hierarchy. @@ -293,26 +293,26 @@ XcfExport::visitVLayer( VLayer& layer ) // Save end offset. - end = m_stream->device()->at(); + end = m_stream->tqdevice()->at(); // Return to current offset. - m_stream->device()->at( current ); + m_stream->tqdevice()->at( current ); // Save hierarchy offset. *m_stream << start; - // Append a zero offset to indicate end of layer mask offsets. - *m_stream << static_cast( 0 ); + // Append a zero offset to indicate end of layer tqmask offsets. + *m_stream << static_cast( 0 ); } void XcfExport::writeHierarchy() { // Offsets. - QIODevice::Offset current = 0; - QIODevice::Offset start = 0; - QIODevice::Offset end = 0; + TQIODevice::Offset current = 0; + TQIODevice::Offset start = 0; + TQIODevice::Offset end = 0; // Width (again?). *m_stream << m_width; @@ -321,27 +321,27 @@ XcfExport::writeHierarchy() *m_stream << m_height; // Color depth. - *m_stream << static_cast( 3 ); + *m_stream << static_cast( 3 ); // Calculate level number. int levX = levels( m_width, m_tileWidth ); int levY = levels( m_height, m_tileHeight ); - int levels = QMAX( levX, levY ); + int levels = TQMAX( levX, levY ); int width = m_width; int height = m_height; // Save current offset. - current = m_stream->device()->at(); + current = m_stream->tqdevice()->at(); // Leave space for level offsets. - m_stream->device()->at( current + ( levels + 1 ) * 4 ); + m_stream->tqdevice()->at( current + ( levels + 1 ) * 4 ); for( int i = 0; i < levels; ++i ) { // Save start offset. - start = m_stream->device()->at(); + start = m_stream->tqdevice()->at(); if( i == 0 ) { @@ -354,90 +354,90 @@ XcfExport::writeHierarchy() width /= 2; height /= 2; - *m_stream << static_cast( width ); - *m_stream << static_cast( height ); - *m_stream << static_cast( 0 ); + *m_stream << static_cast( width ); + *m_stream << static_cast( height ); + *m_stream << static_cast( 0 ); } // Save end offset. - end = m_stream->device()->at(); + end = m_stream->tqdevice()->at(); // Return to current offset. - m_stream->device()->at( current ); + m_stream->tqdevice()->at( current ); // Save level offset. *m_stream << start; // Increment offset. - current = m_stream->device()->at(); + current = m_stream->tqdevice()->at(); // Return to end offset. - m_stream->device()->at( end ); + m_stream->tqdevice()->at( end ); } // Return to current offset. - m_stream->device()->at( current ); + m_stream->tqdevice()->at( current ); // Append a zero offset to indicate end of level offsets. - *m_stream << static_cast( 0 ); + *m_stream << static_cast( 0 ); } void XcfExport::writeLevel() { // Offsets. - QIODevice::Offset current = 0; - QIODevice::Offset start = 0; - QIODevice::Offset end = 0; + TQIODevice::Offset current = 0; + TQIODevice::Offset start = 0; + TQIODevice::Offset end = 0; - *m_stream << static_cast( m_width ); - *m_stream << static_cast( m_height ); + *m_stream << static_cast( m_width ); + *m_stream << static_cast( m_height ); int rows = ( m_height + m_tileHeight - 1 ) / m_tileHeight; int cols = ( m_width + m_tileWidth - 1 ) / m_tileWidth; int tiles = rows * cols; // Save current offset. - current = m_stream->device()->at(); + current = m_stream->tqdevice()->at(); // Leave space for tile offsets. - m_stream->device()->at( current + ( tiles + 1 ) * 4 ); + m_stream->tqdevice()->at( current + ( tiles + 1 ) * 4 ); for( int i = 0; i < tiles; ++i ) { // Save start offset. - start = m_stream->device()->at(); + start = m_stream->tqdevice()->at(); // TODO: Save tile. - *m_stream << static_cast( 1 ); - *m_stream << static_cast( 1 ); - *m_stream << static_cast( 1 ); - *m_stream << static_cast( 1 ); - *m_stream << static_cast( 1 ); - *m_stream << static_cast( 1 ); - *m_stream << static_cast( 1 ); - *m_stream << static_cast( 1 ); - *m_stream << static_cast( 1 ); - *m_stream << static_cast( 1 ); - *m_stream << static_cast( 1 ); - *m_stream << static_cast( 1 ); + *m_stream << static_cast( 1 ); + *m_stream << static_cast( 1 ); + *m_stream << static_cast( 1 ); + *m_stream << static_cast( 1 ); + *m_stream << static_cast( 1 ); + *m_stream << static_cast( 1 ); + *m_stream << static_cast( 1 ); + *m_stream << static_cast( 1 ); + *m_stream << static_cast( 1 ); + *m_stream << static_cast( 1 ); + *m_stream << static_cast( 1 ); + *m_stream << static_cast( 1 ); // Save end offset. - end = m_stream->device()->at(); + end = m_stream->tqdevice()->at(); // Return to current offset. - m_stream->device()->at( current ); + m_stream->tqdevice()->at( current ); // Save tile offset. *m_stream << start; // Increment offset. - current = m_stream->device()->at(); + current = m_stream->tqdevice()->at(); // Return to end offset. - m_stream->device()->at( end ); + m_stream->tqdevice()->at( end ); } } diff --git a/filters/karbon/xcf/xcfexport.h b/filters/karbon/xcf/xcfexport.h index 92913cb4..0c60dd4e 100644 --- a/filters/karbon/xcf/xcfexport.h +++ b/filters/karbon/xcf/xcfexport.h @@ -26,7 +26,7 @@ #include "vvisitor.h" -class QDataStream; +class TQDataStream; class VDocument; class VLayer; @@ -34,12 +34,13 @@ class VLayer; class XcfExport : public KoFilter, private VVisitor { Q_OBJECT + TQ_OBJECT public: - XcfExport( KoFilter* parent, const char* name, const QStringList& ); + XcfExport( KoFilter* tqparent, const char* name, const TQStringList& ); virtual ~XcfExport() {} - virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to ); virtual void visitVDocument( VDocument& document ); virtual void visitVLayer( VLayer& layer ); @@ -70,7 +71,7 @@ private: /** * Output stream. */ - QDataStream* m_stream; + TQDataStream* m_stream; /** * Image width. diff --git a/filters/karbon/xfig/xfigimport.cc b/filters/karbon/xfig/xfigimport.cc index 06301e01..2932e05c 100644 --- a/filters/karbon/xfig/xfigimport.cc +++ b/filters/karbon/xfig/xfigimport.cc @@ -37,7 +37,7 @@ DESCRIPTION #include #include -#include +#include #include #include @@ -79,44 +79,44 @@ int arrow_ids[] = { struct PSFont { const char* family; - QFont::Weight weight; + TQFont::Weight weight; bool italic; } psFontTable[] = { - { "times", QFont::Normal, false }, // Times Roman - { "times", QFont::Normal, true }, // Times Italic - { "times", QFont::Bold, false }, // Times Bold - { "times", QFont::Bold, true }, // Times Bold Italic - { "avantgarde", QFont::Normal, false }, // AvantGarde Book - { "avantgarde", QFont::Normal, true }, // AvantGarde Book Oblique - { "avantgarde", QFont::DemiBold, false }, // AvantGarde Demi - { "avantgarde", QFont::DemiBold, true }, // AvantGarde Demi Oblique - { "bookman", QFont::Light, false }, // Bookman Light - { "bookman", QFont::Light, true }, // Bookman Light Italic - { "bookman", QFont::DemiBold, false }, // Bookman Demi - { "bookman", QFont::DemiBold, true }, // Bookman Demi Italic - { "courier", QFont::Normal, false }, // Courier - { "courier", QFont::Normal, true }, // Courier Oblique - { "courier", QFont::Bold, false }, // Courier Bold - { "courier", QFont::Bold, true }, // Courier Bold Oblique - { "helvetica", QFont::Normal, false }, // Helvetica - { "helvetica", QFont::Normal, true }, // Helvetica Oblique - { "helvetica", QFont::Bold, false }, // Helvetica Bold - { "helvetica", QFont::Bold, true }, // Helvetica Bold Oblique - { "helvetica", QFont::Normal, false }, // Helvetica Narrow - { "helvetica", QFont::Normal, true }, // Helvetica Narrow Oblique - { "helvetica", QFont::Bold, false }, // Helvetica Narrow Bold - { "helvetica", QFont::Bold, true }, // Helvetica Narrow Bold Oblique - { "newcenturyschoolbook", QFont::Normal, false },// New Century Schoolbook - { "newcenturyschoolbook", QFont::Normal, true }, // New Century Italic - { "newcenturyschoolbook", QFont::Bold, false }, // New Century Bold - { "newcenturyschoolbook", QFont::Bold, true }, // New Century Bold Italic - { "palatino", QFont::Normal, false }, // Palatino Roman - { "palatino", QFont::Normal, true }, // Palatino Italic - { "palatino", QFont::Bold, false }, // Palatino Bold - { "palatino", QFont::Bold, true }, // Palatino Bold Italic - { "symbol", QFont::Normal, false }, // Symbol - { "zapfchancery", QFont::Normal, false }, // Zapf Chancery Medium Italic - { "zapfdingbats", QFont::Normal, false }, // Zapf Dingbats + { "times", TQFont::Normal, false }, // Times Roman + { "times", TQFont::Normal, true }, // Times Italic + { "times", TQFont::Bold, false }, // Times Bold + { "times", TQFont::Bold, true }, // Times Bold Italic + { "avantgarde", TQFont::Normal, false }, // AvantGarde Book + { "avantgarde", TQFont::Normal, true }, // AvantGarde Book Oblique + { "avantgarde", TQFont::DemiBold, false }, // AvantGarde Demi + { "avantgarde", TQFont::DemiBold, true }, // AvantGarde Demi Oblique + { "bookman", TQFont::Light, false }, // Bookman Light + { "bookman", TQFont::Light, true }, // Bookman Light Italic + { "bookman", TQFont::DemiBold, false }, // Bookman Demi + { "bookman", TQFont::DemiBold, true }, // Bookman Demi Italic + { "courier", TQFont::Normal, false }, // Courier + { "courier", TQFont::Normal, true }, // Courier Oblique + { "courier", TQFont::Bold, false }, // Courier Bold + { "courier", TQFont::Bold, true }, // Courier Bold Oblique + { "helvetica", TQFont::Normal, false }, // Helvetica + { "helvetica", TQFont::Normal, true }, // Helvetica Oblique + { "helvetica", TQFont::Bold, false }, // Helvetica Bold + { "helvetica", TQFont::Bold, true }, // Helvetica Bold Oblique + { "helvetica", TQFont::Normal, false }, // Helvetica Narrow + { "helvetica", TQFont::Normal, true }, // Helvetica Narrow Oblique + { "helvetica", TQFont::Bold, false }, // Helvetica Narrow Bold + { "helvetica", TQFont::Bold, true }, // Helvetica Narrow Bold Oblique + { "newcenturyschoolbook", TQFont::Normal, false },// New Century Schoolbook + { "newcenturyschoolbook", TQFont::Normal, true }, // New Century Italic + { "newcenturyschoolbook", TQFont::Bold, false }, // New Century Bold + { "newcenturyschoolbook", TQFont::Bold, true }, // New Century Bold Italic + { "palatino", TQFont::Normal, false }, // Palatino Roman + { "palatino", TQFont::Normal, true }, // Palatino Italic + { "palatino", TQFont::Bold, false }, // Palatino Bold + { "palatino", TQFont::Bold, true }, // Palatino Bold Italic + { "symbol", TQFont::Normal, false }, // Symbol + { "zapfchancery", TQFont::Normal, false }, // Zapf Chancery Medium Italic + { "zapfdingbats", TQFont::Normal, false }, // Zapf Dingbats }; int hexstrToInt (const char *str) { @@ -134,22 +134,22 @@ int hexstrToInt (const char *str) { return value; } -XFIGImport::XFIGImport( KoFilter *parent, const char *name ) : KoFilter(parent, name) +XFIGImport::XFIGImport( KoFilter *tqparent, const char *name ) : KoFilter(tqparent, name) { fig_resolution = 1200.0 / 72.0; coordinate_system = 2; - colorTable.insert (0, new QColor (Qt::black)); - colorTable.insert (1, new QColor (Qt::blue)); - colorTable.insert (2, new QColor (Qt::green)); - colorTable.insert (3, new QColor (Qt::cyan)); - colorTable.insert (4, new QColor (Qt::red)); - colorTable.insert (5, new QColor (Qt::magenta)); - colorTable.insert (6, new QColor (Qt::yellow)); - colorTable.insert (7, new QColor (Qt::white)); + colorTable.insert (0, new TQColor (TQt::black)); + colorTable.insert (1, new TQColor (TQt::blue)); + colorTable.insert (2, new TQColor (TQt::green)); + colorTable.insert (3, new TQColor (TQt::cyan)); + colorTable.insert (4, new TQColor (TQt::red)); + colorTable.insert (5, new TQColor (TQt::magenta)); + colorTable.insert (6, new TQColor (TQt::yellow)); + colorTable.insert (7, new TQColor (TQt::white)); for (int i = 0; i <= 23; i++) - colorTable.insert (i + 8, new QColor (colors[i])); + colorTable.insert (i + 8, new TQColor (colors[i])); objList.clear (); } @@ -158,16 +158,16 @@ XFIGImport::~XFIGImport() { } -bool XFIGImport::filterImport( const QString &file, KoDocument *doc, - const QString &from, const QString &to, - const QString & ) { +bool XFIGImport::filterImport( const TQString &file, KoDocument *doc, + const TQString &from, const TQString &to, + const TQString & ) { if( to != "application/x-karbon" || from != "image/x-xfig" ) return false; char buf[255]; int value; - KoPageLayout layout; + KoPageLayout tqlayout; ifstream fin( file.local8Bit() ); if (! fin) @@ -177,7 +177,7 @@ bool XFIGImport::filterImport( const QString &file, KoDocument *doc, GDocument *gdoc = kidoc->gdoc(); //GPage *activePage = gdoc->activePage(); - layout = gdoc->activePage()->pageLayout (); + tqlayout = gdoc->activePage()->pageLayout (); fin.getline (buf, 255); if (::strncmp (buf, "#FIG 3", 6)) { @@ -203,9 +203,9 @@ bool XFIGImport::filterImport( const QString &file, KoDocument *doc, // orientation fin.getline (buf, 255); if (::strcmp (buf, "Landscape") == 0) - layout.orientation = PG_LANDSCAPE; + tqlayout.orientation = PG_LANDSCAPE; else if (::strcmp (buf, "Portrait") == 0) - layout.orientation = PG_PORTRAIT; + tqlayout.orientation = PG_PORTRAIT; else kdDebug() << "ERROR: invalid orientation" << endl; @@ -215,9 +215,9 @@ bool XFIGImport::filterImport( const QString &file, KoDocument *doc, // units fin.getline (buf, 255); if (::strcmp (buf, "Metric") == 0) - layout.unit = PG_MM; + tqlayout.unit = PG_MM; else if (::strcmp (buf, "Inches") == 0) - layout.unit = PG_INCH; + tqlayout.unit = PG_INCH; else kdDebug() << "ERROR: invalid units" << endl; @@ -310,7 +310,7 @@ void XFIGImport::parseColorObject (istream& fin) { green = hexstrToInt (green_str); blue = hexstrToInt (blue_str); - colorTable.insert (number, new QColor (red, green, blue)); + colorTable.insert (number, new TQColor (red, green, blue)); } void XFIGImport::parseArc (istream& fin, GDocument* doc) { @@ -473,7 +473,7 @@ void XFIGImport::parsePolyline (istream& fin, GDocument* doc) { int arrow_type, arrow_style; float arrow_thickness, arrow_width, arrow_height; GObject::OutlineInfo oinfo; - oinfo.mask = GObject::OutlineInfo::Custom; + oinfo.tqmask = GObject::OutlineInfo::Custom; oinfo.startArrowId = oinfo.endArrowId = 0; if (forward_arrow > 0) { @@ -537,7 +537,7 @@ void XFIGImport::parseSpline (istream& fin, GDocument* doc) int arrow_type, arrow_style; float arrow_thickness, arrow_width, arrow_height; GObject::OutlineInfo oinfo; - oinfo.mask = GObject::OutlineInfo::Custom; + oinfo.tqmask = GObject::OutlineInfo::Custom; oinfo.startArrowId = oinfo.endArrowId = 0; if (forward_arrow > 0) { @@ -599,8 +599,8 @@ void XFIGImport::parseText (istream& fin, GDocument* doc) char c; char ocode[4]; bool finished = false; - QString text; - QFont qfont; + TQString text; + TQFont qfont; fin >> sub_type >> color >> depth >> pen_style >> font >> font_size >> angle >> font_flags >> height >> length >> x >> y; @@ -609,7 +609,7 @@ void XFIGImport::parseText (istream& fin, GDocument* doc) // PostScript font if (font == -1) font = 0; - qfont = QFont (psFontTable[font].family, qRound (font_size), + qfont = TQFont (psFontTable[font].family, tqRound (font_size), psFontTable[font].weight, psFontTable[font].italic); } else { @@ -634,7 +634,7 @@ void XFIGImport::parseText (istream& fin, GDocument* doc) break; } } - qfont.setPointSize (qRound (font_size)); + qfont.setPointSize (tqRound (font_size)); obj->setFont (qfont); while (! finished) { @@ -670,7 +670,7 @@ void XFIGImport::parseText (istream& fin, GDocument* doc) if (angle != 0) { // rotate the text float nangle = angle * RAD_FACTOR; - QWMatrix m1, m2, m3; + TQWMatrix m1, m2, m3; Coord rotCenter; if (sub_type == 0) { @@ -713,7 +713,7 @@ void XFIGImport::buildDocument (GDocument *doc) { qBubbleSort(objList); // Now all we need to do is insert them in the document, in that order - QValueList::Iterator it=objList.begin(); + TQValueList::Iterator it=objList.begin(); for ( ; it != objList.end() ; ++it ) { //kdDebug() << "Inserting object with depth=" << (*it).depth << endl; @@ -731,11 +731,11 @@ void XFIGImport::setProperties (GObject* obj, int pen_color, int style, obj->setOutlineColor (*colorTable[pen_color]); if (style < 1) - obj->setOutlineStyle (Qt::SolidLine); + obj->setOutlineStyle (TQt::SolidLine); else if (style == 1) - obj->setOutlineStyle (Qt::DashLine); + obj->setOutlineStyle (TQt::DashLine); else if (style == 2) - obj->setOutlineStyle (Qt::DotLine); + obj->setOutlineStyle (TQt::DotLine); obj->setOutlineWidth (thickness * 72.0 / 80.0); @@ -745,13 +745,13 @@ void XFIGImport::setProperties (GObject* obj, int pen_color, int style, obj->setFillStyle (GObject::FillInfo::SolidFill); if (fill_color < 1) { // for BLACK or DEFAULT color - int val = qRound ((20 - area_fill) * 255.0 / 20.0); - obj->setFillColor (QColor (val, val, val)); + int val = tqRound ((20 - area_fill) * 255.0 / 20.0); + obj->setFillColor (TQColor (val, val, val)); } else if (fill_color == 7) { // for WHITE color - int val = qRound ( area_fill * 255.0 / 20.0); - obj->setFillColor (QColor (val, val, val)); + int val = tqRound ( area_fill * 255.0 / 20.0); + obj->setFillColor (TQColor (val, val, val)); } else obj->setFillColor (*colorTable[fill_color]); diff --git a/filters/karbon/xfig/xfigimport.h b/filters/karbon/xfig/xfigimport.h index bf959315..5cf9dddf 100644 --- a/filters/karbon/xfig/xfigimport.h +++ b/filters/karbon/xfig/xfigimport.h @@ -25,29 +25,30 @@ DESCRIPTION #ifndef XFIGIMPORT_H #define XFIGIMPORT_H -#include -#include +#include +#include #include class GDocument; class GObject; -class QColor; +class TQColor; #include -#include -#include +#include +#include class XFIGImport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - XFIGImport( KoFilter *parent, const char *name ); + XFIGImport( KoFilter *tqparent, const char *name ); virtual ~XFIGImport(); - virtual bool filterImport( const QString &file, KoDocument *, - const QString &from, const QString &to, - const QString &config=QString::null ); + virtual bool filterImport( const TQString &file, KoDocument *, + const TQString &from, const TQString &to, + const TQString &config=TQString() ); private: void parseColorObject (istream& fin); @@ -65,13 +66,13 @@ private: float fig_resolution; int coordinate_system; int version; - QIntDict colorTable; + TQIntDict colorTable; // An object and the depth. Used for sorting objects // in the object list struct GObjectListItem { - GObjectListItem() : object(0L) {} // for QValueList + GObjectListItem() : object(0L) {} // for TQValueList GObjectListItem( int d, GObject * obj ) : object(obj), depth(d) {} @@ -88,7 +89,7 @@ private: return depth == item.depth; } }; - QValueList objList; + TQValueList objList; }; #endif diff --git a/filters/karbon/xfig/xfigimport_factory.cc b/filters/karbon/xfig/xfigimport_factory.cc index 7783072d..79fb695c 100644 --- a/filters/karbon/xfig/xfigimport_factory.cc +++ b/filters/karbon/xfig/xfigimport_factory.cc @@ -33,9 +33,9 @@ K_EXPORT_COMPONENT_FACTORY( libxfigimport, XFIGImportFactory ) KInstance *XFIGImportFactory::s_global = 0; XFIGImportFactory::XFIGImportFactory( - QObject *parent, + TQObject *tqparent, const char *name) : - KLibFactory(parent, name) + KLibFactory(tqparent, name) { s_global = new KInstance("xfigimport"); } @@ -46,18 +46,18 @@ XFIGImportFactory::~XFIGImportFactory() s_global = 0L; } -QObject *XFIGImportFactory::createObject( - QObject *parent, +TQObject *XFIGImportFactory::createObject( + TQObject *tqparent, const char *name, const char*, - const QStringList &) + const TQStringList &) { - if (parent && !parent->inherits("KoFilter")) + if (tqparent && !tqparent->inherits("KoFilter")) { - kdDebug(30502) << "XFIGImportFactory: parent does not inherit KoFilter" << endl; + kdDebug(30502) << "XFIGImportFactory: tqparent does not inherit KoFilter" << endl; return 0L; } - XFIGImport *f = new XFIGImport((KoFilter*)parent, name); + XFIGImport *f = new XFIGImport((KoFilter*)tqparent, name); return f; } diff --git a/filters/karbon/xfig/xfigimport_factory.h b/filters/karbon/xfig/xfigimport_factory.h index 8da70040..b4fe1bac 100644 --- a/filters/karbon/xfig/xfigimport_factory.h +++ b/filters/karbon/xfig/xfigimport_factory.h @@ -32,11 +32,12 @@ class XFIGImportFactory : public KLibFactory { Q_OBJECT + TQ_OBJECT public: - XFIGImportFactory(QObject* parent = 0, const char* name = 0); + XFIGImportFactory(TQObject* tqparent = 0, const char* name = 0); virtual ~XFIGImportFactory(); - virtual QObject* createObject(QObject* parent = 0, const char* name = 0, const char* classname = "QObject", const QStringList &args = QStringList()); + virtual TQObject* createObject(TQObject* tqparent = 0, const char* name = 0, const char* classname = TQOBJECT_OBJECT_NAME_STRING, const TQStringList &args = TQStringList()); static KInstance* global(); diff --git a/filters/kchart/bmp/bmpexport.cpp b/filters/kchart/bmp/bmpexport.cpp index 26ff2fe1..5f00bb5e 100644 --- a/filters/kchart/bmp/bmpexport.cpp +++ b/filters/kchart/bmp/bmpexport.cpp @@ -17,8 +17,8 @@ * Boston, MA 02110-1301, USA. */ -#include -#include +#include +#include #include @@ -33,7 +33,7 @@ typedef KGenericFactory bmpExportFactory; K_EXPORT_COMPONENT_FACTORY( libkchartbmpexport, bmpExportFactory( "bmpexport" ) ) -BmpExport::BmpExport(KoFilter *fil, const char *name, const QStringList&lst) +BmpExport::BmpExport(KoFilter *fil, const char *name, const TQStringList&lst) : ImageExport(fil,name,lst) { } @@ -56,7 +56,7 @@ void BmpExport::extraImageAttribute() } -bool BmpExport::saveImage( QString fileName) +bool BmpExport::saveImage( TQString fileName) { bool ret = pixmap.save( fileName, "BMP" ); // Save the image. diff --git a/filters/kchart/bmp/bmpexport.h b/filters/kchart/bmp/bmpexport.h index 89afa941..ebba6b5d 100644 --- a/filters/kchart/bmp/bmpexport.h +++ b/filters/kchart/bmp/bmpexport.h @@ -25,11 +25,12 @@ class BmpExport : public ImageExport { Q_OBJECT + TQ_OBJECT public: - BmpExport(KoFilter *parent, const char *name, const QStringList&); + BmpExport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~BmpExport(); - virtual bool saveImage( QString fileName); + virtual bool saveImage( TQString fileName); virtual void extraImageAttribute(); virtual const char * exportFormat(); }; diff --git a/filters/kchart/jpeg/jpegexport.cpp b/filters/kchart/jpeg/jpegexport.cpp index 709e2d0f..7d2bcec0 100644 --- a/filters/kchart/jpeg/jpegexport.cpp +++ b/filters/kchart/jpeg/jpegexport.cpp @@ -17,8 +17,8 @@ * Boston, MA 02110-1301, USA. */ -#include -#include +#include +#include #include @@ -33,7 +33,7 @@ typedef KGenericFactory jpegExportFactory; K_EXPORT_COMPONENT_FACTORY( libkchartjpegexport, jpegExportFactory( "jpegexport" ) ) -JpegExport::JpegExport(KoFilter *fil, const char *name, const QStringList&lst) +JpegExport::JpegExport(KoFilter *fil, const char *name, const TQStringList&lst) : ImageExport(fil,name,lst) { } @@ -56,7 +56,7 @@ void JpegExport::extraImageAttribute() } -bool JpegExport::saveImage( QString fileName) +bool JpegExport::saveImage( TQString fileName) { bool ret = pixmap.save( fileName, "JPEG" ); // Save the image. diff --git a/filters/kchart/jpeg/jpegexport.h b/filters/kchart/jpeg/jpegexport.h index f167b0a2..2498fb31 100644 --- a/filters/kchart/jpeg/jpegexport.h +++ b/filters/kchart/jpeg/jpegexport.h @@ -25,11 +25,12 @@ class JpegExport : public ImageExport { Q_OBJECT + TQ_OBJECT public: - JpegExport(KoFilter *parent, const char *name, const QStringList&); + JpegExport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~JpegExport(); - virtual bool saveImage( QString fileName); + virtual bool saveImage( TQString fileName); virtual void extraImageAttribute(); virtual const char * exportFormat(); }; diff --git a/filters/kchart/libimageexport/imageexport.cpp b/filters/kchart/libimageexport/imageexport.cpp index 7b9a61c4..5033762b 100644 --- a/filters/kchart/libimageexport/imageexport.cpp +++ b/filters/kchart/libimageexport/imageexport.cpp @@ -17,8 +17,8 @@ * Boston, MA 02110-1301, USA. */ -#include -#include +#include +#include #include @@ -30,7 +30,7 @@ #include "imageexport.h" #include "kchart_part.h" -ImageExport::ImageExport(KoFilter *, const char *, const QStringList&) +ImageExport::ImageExport(KoFilter *, const char *, const TQStringList&) : KoFilter() { } @@ -40,8 +40,8 @@ ImageExport::~ImageExport() } -KoFilter::ConversionStatus -ImageExport::convert(const QCString& from, const QCString& to) +KoFilter::ConversiontqStatus +ImageExport::convert(const TQCString& from, const TQCString& to) { // Check for proper conversion. if ( from != "application/x-kchart" || to != exportFormat() ) @@ -56,9 +56,9 @@ ImageExport::convert(const QCString& from, const QCString& to) } // Get the XML tree. - QDomDocument domIn; + TQDomDocument domIn; domIn.setContent( storeIn ); - QDomElement docNode = domIn.documentElement(); + TQDomElement docNode = domIn.documentElement(); // Read the document from the XML tree. KChart::KChartPart kchartDoc; @@ -70,8 +70,8 @@ ImageExport::convert(const QCString& from, const QCString& to) width = 500; height = 400; extraImageAttribute(); - pixmap = QPixmap(width, height); - QPainter painter(&pixmap); + pixmap = TQPixmap(width, height); + TQPainter painter(&pixmap); kchartDoc.paintContent(painter, pixmap.rect(), false); if(!saveImage( m_chain->outputFile())) return KoFilter::CreationError; diff --git a/filters/kchart/libimageexport/imageexport.h b/filters/kchart/libimageexport/imageexport.h index a8314a08..4aa0e5f4 100644 --- a/filters/kchart/libimageexport/imageexport.h +++ b/filters/kchart/libimageexport/imageexport.h @@ -22,23 +22,24 @@ #include -class QPixmap; +class TQPixmap; class ImageExport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - ImageExport(KoFilter *parent, const char *name, const QStringList&); + ImageExport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~ImageExport(); - virtual KoFilter::ConversionStatus convert(const QCString& from, const QCString& to); + virtual KoFilter::ConversiontqStatus convert(const TQCString& from, const TQCString& to); virtual void extraImageAttribute() {}; - virtual bool saveImage( QString fileName) = 0; + virtual bool saveImage( TQString fileName) = 0; virtual const char* exportFormat() = 0; protected: int width; int height; - QPixmap pixmap; + TQPixmap pixmap; }; #endif // __IMAGEEXPORT_H__ diff --git a/filters/kchart/mng/mngexport.cpp b/filters/kchart/mng/mngexport.cpp index b029beea..e23e870c 100644 --- a/filters/kchart/mng/mngexport.cpp +++ b/filters/kchart/mng/mngexport.cpp @@ -17,8 +17,8 @@ * Boston, MA 02110-1301, USA. */ -#include -#include +#include +#include #include @@ -33,7 +33,7 @@ typedef KGenericFactory mngExportFactory; K_EXPORT_COMPONENT_FACTORY( libkchartmngexport, mngExportFactory( "mngexport" ) ) -MngExport::MngExport(KoFilter *fil, const char *name, const QStringList&lst) +MngExport::MngExport(KoFilter *fil, const char *name, const TQStringList&lst) : ImageExport(fil,name,lst) { } @@ -56,7 +56,7 @@ void MngExport::extraImageAttribute() } -bool MngExport::saveImage( QString fileName) +bool MngExport::saveImage( TQString fileName) { bool ret = pixmap.save( fileName, "MNG" ); // Save the image. diff --git a/filters/kchart/mng/mngexport.h b/filters/kchart/mng/mngexport.h index 38f7830e..025be07c 100644 --- a/filters/kchart/mng/mngexport.h +++ b/filters/kchart/mng/mngexport.h @@ -25,11 +25,12 @@ class MngExport : public ImageExport { Q_OBJECT + TQ_OBJECT public: - MngExport(KoFilter *parent, const char *name, const QStringList&); + MngExport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~MngExport(); - virtual bool saveImage( QString fileName); + virtual bool saveImage( TQString fileName); virtual void extraImageAttribute(); virtual const char * exportFormat(); }; diff --git a/filters/kchart/png/pngexport.cpp b/filters/kchart/png/pngexport.cpp index d0a87154..456ca887 100644 --- a/filters/kchart/png/pngexport.cpp +++ b/filters/kchart/png/pngexport.cpp @@ -17,8 +17,8 @@ * Boston, MA 02110-1301, USA. */ -#include -#include +#include +#include #include @@ -33,7 +33,7 @@ typedef KGenericFactory PngExportFactory; K_EXPORT_COMPONENT_FACTORY( libkchartpngexport, PngExportFactory( "pngexport" ) ) -PngExport::PngExport(KoFilter *fil, const char *name, const QStringList&lst) +PngExport::PngExport(KoFilter *fil, const char *name, const TQStringList&lst) : ImageExport(fil,name,lst) { } @@ -60,7 +60,7 @@ const char * PngExport::exportFormat() return "image/png"; } -bool PngExport::saveImage( QString fileName) +bool PngExport::saveImage( TQString fileName) { bool ret = pixmap.save( fileName, "PNG" ); // Save the image. diff --git a/filters/kchart/png/pngexport.h b/filters/kchart/png/pngexport.h index 34214477..4953f44f 100644 --- a/filters/kchart/png/pngexport.h +++ b/filters/kchart/png/pngexport.h @@ -25,11 +25,12 @@ class PngExport : public ImageExport { Q_OBJECT + TQ_OBJECT public: - PngExport(KoFilter *parent, const char *name, const QStringList&); + PngExport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~PngExport(); - virtual bool saveImage( QString fileName); + virtual bool saveImage( TQString fileName); virtual void extraImageAttribute(); virtual const char * exportFormat(); }; diff --git a/filters/kchart/svg/svgexport.cc b/filters/kchart/svg/svgexport.cc index 204c59db..8d8ad52c 100644 --- a/filters/kchart/svg/svgexport.cc +++ b/filters/kchart/svg/svgexport.cc @@ -17,8 +17,8 @@ Boston, MA 02110-1301 USA. */ -#include -#include +#include +#include #include @@ -35,7 +35,7 @@ typedef KGenericFactory SvgExportFactory; K_EXPORT_COMPONENT_FACTORY( libkchartsvgexport, SvgExportFactory( "svgexport" ) ) -SvgExport::SvgExport(KoFilter *, const char *, const QStringList&) +SvgExport::SvgExport(KoFilter *, const char *, const TQStringList&) : KoFilter() { } @@ -45,8 +45,8 @@ SvgExport::~SvgExport() } -KoFilter::ConversionStatus -SvgExport::convert(const QCString& from, const QCString& to) +KoFilter::ConversiontqStatus +SvgExport::convert(const TQCString& from, const TQCString& to) { // Check for proper conversion. if ( from != "application/x-kchart" || to != "image/svg+xml" ) @@ -61,9 +61,9 @@ SvgExport::convert(const QCString& from, const QCString& to) } // Get the XML tree. - QDomDocument domIn; + TQDomDocument domIn; domIn.setContent( storeIn ); - QDomElement docNode = domIn.documentElement(); + TQDomElement docNode = domIn.documentElement(); // Read the document from the XML tree. KChart::KChartPart kchartDoc; @@ -74,9 +74,9 @@ SvgExport::convert(const QCString& from, const QCString& to) } // Draw the actual bitmap. - QPicture picture; - QPainter painter(&picture); - QRect rect(QPoint(0, 0), QPoint(500, 400)); + TQPicture picture; + TQPainter painter(&picture); + TQRect rect(TQPoint(0, 0), TQPoint(500, 400)); kchartDoc.paintContent(painter, rect, false); painter.end(); diff --git a/filters/kchart/svg/svgexport.h b/filters/kchart/svg/svgexport.h index d2a9823c..1ec2f61e 100644 --- a/filters/kchart/svg/svgexport.h +++ b/filters/kchart/svg/svgexport.h @@ -25,12 +25,13 @@ class SvgExport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - SvgExport(KoFilter *parent, const char *name, const QStringList&); + SvgExport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~SvgExport(); - virtual KoFilter::ConversionStatus convert(const QCString& from, const QCString& to); + virtual KoFilter::ConversiontqStatus convert(const TQCString& from, const TQCString& to); }; #endif // __SVGEXPORT_H__ diff --git a/filters/kchart/xbm/xbmexport.cpp b/filters/kchart/xbm/xbmexport.cpp index f6b6fab0..a0acd648 100644 --- a/filters/kchart/xbm/xbmexport.cpp +++ b/filters/kchart/xbm/xbmexport.cpp @@ -17,8 +17,8 @@ * Boston, MA 02110-1301, USA. */ -#include -#include +#include +#include #include @@ -33,7 +33,7 @@ typedef KGenericFactory xbmExportFactory; K_EXPORT_COMPONENT_FACTORY( libkchartxbmexport, xbmExportFactory( "xbmexport" ) ) -XbmExport::XbmExport(KoFilter *fil, const char *name, const QStringList&lst) +XbmExport::XbmExport(KoFilter *fil, const char *name, const TQStringList&lst) : ImageExport(fil,name,lst) { } @@ -56,7 +56,7 @@ void XbmExport::extraImageAttribute() } -bool XbmExport::saveImage( QString fileName) +bool XbmExport::saveImage( TQString fileName) { bool ret = pixmap.save( fileName, "XBM" ); // Save the image. diff --git a/filters/kchart/xbm/xbmexport.h b/filters/kchart/xbm/xbmexport.h index 1ab779e3..a5b466d9 100644 --- a/filters/kchart/xbm/xbmexport.h +++ b/filters/kchart/xbm/xbmexport.h @@ -25,11 +25,12 @@ class XbmExport : public ImageExport { Q_OBJECT + TQ_OBJECT public: - XbmExport(KoFilter *parent, const char *name, const QStringList&); + XbmExport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~XbmExport(); - virtual bool saveImage( QString fileName); + virtual bool saveImage( TQString fileName); virtual void extraImageAttribute(); virtual const char * exportFormat(); }; diff --git a/filters/kchart/xpm/xpmexport.cpp b/filters/kchart/xpm/xpmexport.cpp index 116fef46..da5832d0 100644 --- a/filters/kchart/xpm/xpmexport.cpp +++ b/filters/kchart/xpm/xpmexport.cpp @@ -17,8 +17,8 @@ * Boston, MA 02110-1301, USA. */ -#include -#include +#include +#include #include @@ -33,7 +33,7 @@ typedef KGenericFactory xpmExportFactory; K_EXPORT_COMPONENT_FACTORY( libkchartxpmexport, xpmExportFactory( "xpmexport" ) ) -XpmExport::XpmExport(KoFilter *fil, const char *name, const QStringList&lst) +XpmExport::XpmExport(KoFilter *fil, const char *name, const TQStringList&lst) : ImageExport(fil,name,lst) { } @@ -56,7 +56,7 @@ void XpmExport::extraImageAttribute() } -bool XpmExport::saveImage( QString fileName) +bool XpmExport::saveImage( TQString fileName) { bool ret = pixmap.save( fileName, "XPM" ); // Save the image. diff --git a/filters/kchart/xpm/xpmexport.h b/filters/kchart/xpm/xpmexport.h index 8fc7e008..67acdc7a 100644 --- a/filters/kchart/xpm/xpmexport.h +++ b/filters/kchart/xpm/xpmexport.h @@ -25,11 +25,12 @@ class XpmExport : public ImageExport { Q_OBJECT + TQ_OBJECT public: - XpmExport(KoFilter *parent, const char *name, const QStringList&); + XpmExport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~XpmExport(); - virtual bool saveImage( QString fileName); + virtual bool saveImage( TQString fileName); virtual void extraImageAttribute(); virtual const char * exportFormat(); }; diff --git a/filters/kformula/latex/latexexport.cc b/filters/kformula/latex/latexexport.cc index 20cecdcf..b280df1c 100644 --- a/filters/kformula/latex/latexexport.cc +++ b/filters/kformula/latex/latexexport.cc @@ -17,9 +17,9 @@ * Boston, MA 02110-1301, USA. */ -#include -#include -#include +#include +#include +#include #include #include @@ -40,34 +40,34 @@ typedef KGenericFactory LATEXExportFactory; K_EXPORT_COMPONENT_FACTORY( libkfolatexexport, LATEXExportFactory( "kofficefilters" ) ) -LATEXExport::LATEXExport( KoFilter */*parent*/, const char */*name*/, const QStringList& ) +LATEXExport::LATEXExport( KoFilter */*tqparent*/, const char */*name*/, const TQStringList& ) : KoFilter() { } -KoFilter::ConversionStatus LATEXExport::convert( const QCString& from, const QCString& to ) +KoFilter::ConversiontqStatus LATEXExport::convert( const TQCString& from, const TQCString& to ) { if ( to != "text/x-tex" || from != "application/x-kformula" ) return KoFilter::NotImplemented; KoStoreDevice* in = m_chain->storageFile( "root", KoStore::Read ); if(!in) { - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); KMessageBox::error( 0, i18n( "Failed to read data." ), i18n( "LaTeX Export Error" ) ); return KoFilter::StorageCreationError; } - QDomDocument dom( "KFORMULA" ); + TQDomDocument dom( "KFORMULA" ); if ( !dom.setContent( in, false ) ) { - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); KMessageBox::error( 0, i18n( "Malformed XML data." ), i18n( "LaTeX Export Error" ) ); return KoFilter::WrongFormat; } - QFile f( m_chain->outputFile() ); + TQFile f( m_chain->outputFile() ); if( !f.open( IO_Truncate | IO_ReadWrite ) ) { - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); KMessageBox::error( 0, i18n( "Failed to write file." ), i18n( "LaTeX Export Error" ) ); return KoFilter::FileNotFound; } @@ -80,8 +80,8 @@ KoFilter::ConversionStatus LATEXExport::convert( const QCString& from, const QCS kdError(30522) << "Failed." << endl; } - QTextStream stream(&f); - //stream.setEncoding(QTextStream::UnicodeUTF8); + TQTextStream stream(&f); + //stream.setEncoding(TQTextStream::UnicodeUTF8); stream << "\\documentclass{article}\n\\usepackage{amsmath}\n\\begin{document}\n\\[\n" << formula->texString() << "\n\\]\n\\end{document}"; diff --git a/filters/kformula/latex/latexexport.h b/filters/kformula/latex/latexexport.h index af24003d..1da761be 100644 --- a/filters/kformula/latex/latexexport.h +++ b/filters/kformula/latex/latexexport.h @@ -20,19 +20,20 @@ #ifndef LATEXEXPORT_H #define LATEXEXPORT_H -class QCString; -class QStringList; +class TQCString; +class TQStringList; #include class LATEXExport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - LATEXExport( KoFilter *parent, const char *name, const QStringList& ); + LATEXExport( KoFilter *tqparent, const char *name, const TQStringList& ); virtual ~LATEXExport() {} - virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to ); }; #endif // LATEXEXPORT_H diff --git a/filters/kformula/mathml/mathmlexport.cc b/filters/kformula/mathml/mathmlexport.cc index cbf8489e..667c18ef 100644 --- a/filters/kformula/mathml/mathmlexport.cc +++ b/filters/kformula/mathml/mathmlexport.cc @@ -17,9 +17,9 @@ * Boston, MA 02110-1301, USA. */ -#include -#include -#include +#include +#include +#include #include #include @@ -40,34 +40,34 @@ typedef KGenericFactory MathMLExportFactory; K_EXPORT_COMPONENT_FACTORY( libkfomathmlexport, MathMLExportFactory( "kofficefilters" ) ) -MathMLExport::MathMLExport( KoFilter */*parent*/, const char */*name*/, const QStringList& ) +MathMLExport::MathMLExport( KoFilter */*tqparent*/, const char */*name*/, const TQStringList& ) : KoFilter() { } -KoFilter::ConversionStatus MathMLExport::convert( const QCString& from, const QCString& to ) +KoFilter::ConversiontqStatus MathMLExport::convert( const TQCString& from, const TQCString& to ) { if ( to != "application/mathml+xml" || from != "application/x-kformula" ) return KoFilter::NotImplemented; KoStoreDevice* in = m_chain->storageFile( "root", KoStore::Read ); if(!in) { - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); KMessageBox::error( 0, i18n( "Failed to read data." ), i18n( "MathML Export Error" ) ); return KoFilter::StorageCreationError; } - QDomDocument dom; + TQDomDocument dom; if ( !dom.setContent( in, false ) ) { - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); KMessageBox::error( 0, i18n( "Malformed XML data." ), i18n( "MathML Export Error" ) ); return KoFilter::WrongFormat; } - QFile f( m_chain->outputFile() ); + TQFile f( m_chain->outputFile() ); if( !f.open( IO_Truncate | IO_ReadWrite ) ) { - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); KMessageBox::error( 0, i18n( "Failed to write file." ), i18n( "MathML Export Error" ) ); return KoFilter::FileNotFound; } @@ -80,8 +80,8 @@ KoFilter::ConversionStatus MathMLExport::convert( const QCString& from, const QC kdError() << "Failed." << endl; } - QTextStream stream(&f); - stream.setEncoding( QTextStream::UnicodeUTF8 ); + TQTextStream stream(&f); + stream.setEncoding( TQTextStream::UnicodeUTF8 ); formula->saveMathML( stream ); f.close(); diff --git a/filters/kformula/mathml/mathmlexport.h b/filters/kformula/mathml/mathmlexport.h index 0e15b7a0..7f3eee19 100644 --- a/filters/kformula/mathml/mathmlexport.h +++ b/filters/kformula/mathml/mathmlexport.h @@ -20,19 +20,20 @@ #ifndef MATHMLEXPORT_H #define MATHMLEXPORT_H -class QCString; -class QStringList; +class TQCString; +class TQStringList; #include class MathMLExport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - MathMLExport( KoFilter *parent, const char *name, const QStringList& ); + MathMLExport( KoFilter *tqparent, const char *name, const TQStringList& ); virtual ~MathMLExport() {} - virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to ); }; #endif // MATHMLEXPORT_H diff --git a/filters/kformula/mathml/mathmlimport.cc b/filters/kformula/mathml/mathmlimport.cc index 9ede69ce..87ce2182 100644 --- a/filters/kformula/mathml/mathmlimport.cc +++ b/filters/kformula/mathml/mathmlimport.cc @@ -25,7 +25,7 @@ #include #include -#include +#include #include #include @@ -39,12 +39,12 @@ typedef KGenericFactory MathMLImportFactory; K_EXPORT_COMPONENT_FACTORY( libkfomathmlimport, MathMLImportFactory( "kofficefilters" ) ) -MathMLImport::MathMLImport(KoFilter *, const char *, const QStringList&) +MathMLImport::MathMLImport(KoFilter *, const char *, const TQStringList&) : KoFilter() { } -KoFilter::ConversionStatus MathMLImport::convert( const QCString& from, const QCString& to ) +KoFilter::ConversiontqStatus MathMLImport::convert( const TQCString& from, const TQCString& to ) { kdDebug( KFormula::DEBUGID ) << "From: " << from << endl; kdDebug( KFormula::DEBUGID ) << "To: " << to << endl; @@ -52,7 +52,7 @@ KoFilter::ConversionStatus MathMLImport::convert( const QCString& from, const QC if(from != "application/mathml+xml" || to != "application/x-kformula") return KoFilter::NotImplemented; - KoStore* out = KoStore::createStore(QString(m_chain->outputFile()), KoStore::Write); + KoStore* out = KoStore::createStore(TQString(m_chain->outputFile()), KoStore::Write); if(!out || !out->open("root")) { KMessageBox::error( 0, i18n( "Unable to open output file." ), i18n( "MathML Import Error" ) ); delete out; @@ -65,26 +65,26 @@ KoFilter::ConversionStatus MathMLImport::convert( const QCString& from, const QC KFormula::Container* formula = doc->createFormula(); //formula->loadMathML( m_chain->inputFile() ); - const QString filename( m_chain->inputFile() ); - QFile f( filename ); + const TQString filename( m_chain->inputFile() ); + TQFile f( filename ); if ( !f.open( IO_ReadOnly ) ) { - KMessageBox::error( 0, i18n( "Failed to open input file: %1" ).arg( filename ), i18n( "MathML Import Error" ) ); + KMessageBox::error( 0, i18n( "Failed to open input file: %1" ).tqarg( filename ), i18n( "MathML Import Error" ) ); delete wrapper; return KoFilter::FileNotFound; } - QDomDocument mathML; - // Error variables for QDomDocument::setContent - QString errorMsg; + TQDomDocument mathML; + // Error variables for TQDomDocument::setContent + TQString errorMsg; int errorLine, errorColumn; if ( !mathML.setContent( &f, true, &errorMsg, &errorLine, &errorColumn ) ) { delete wrapper; - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); kdError(KFormula::DEBUGID) << "Parsing error in " << filename << "! Aborting!" << endl << " In line: " << errorLine << ", column: " << errorColumn << endl << " Error message: " << errorMsg << endl; KMessageBox::error( 0, i18n( "Parsing error in MathML file %4 at line %1, column %2\nError message: %3" ) - .arg( errorLine ).arg( errorColumn ).arg( i18n ( "QXml", errorMsg.utf8() ).arg( filename ) ), i18n( "MathML Import Error" ) ); + .tqarg( errorLine ).tqarg( errorColumn ).tqarg( i18n ( "TQXml", errorMsg.utf8() ).tqarg( filename ) ), i18n( "MathML Import Error" ) ); return KoFilter::WrongFormat; } f.close(); @@ -95,7 +95,7 @@ KoFilter::ConversionStatus MathMLImport::convert( const QCString& from, const QC // taken from KoDocument::saveToStore KoStoreDevice dev( out ); - const QCString s = doc->saveXML().toCString(); // utf8 already + const TQCString s = doc->saveXML().toCString(); // utf8 already const int nwritten = dev.writeBlock( s.data(), s.size()-1 ); if ( nwritten != (int)s.size()-1 ) { kdWarning() << "wrote " << nwritten << " - expected " << s.size()-1 << endl; diff --git a/filters/kformula/mathml/mathmlimport.h b/filters/kformula/mathml/mathmlimport.h index 79f6c052..b1d1152f 100644 --- a/filters/kformula/mathml/mathmlimport.h +++ b/filters/kformula/mathml/mathmlimport.h @@ -20,10 +20,10 @@ #ifndef MATHMLIMPORT_H #define MATHMLIMPORT_H -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -31,11 +31,12 @@ class MathMLImport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - MathMLImport(KoFilter *parent, const char *name, const QStringList&); + MathMLImport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~MathMLImport() {} - virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to ); }; #endif /* MATHMLIMPORT_H */ diff --git a/filters/kformula/png/pngexport.cc b/filters/kformula/png/pngexport.cc index f51bc1f1..b8d0f3d3 100644 --- a/filters/kformula/png/pngexport.cc +++ b/filters/kformula/png/pngexport.cc @@ -17,10 +17,10 @@ * Boston, MA 02110-1301, USA. */ -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -40,13 +40,13 @@ typedef KGenericFactory PNGExportFactory; K_EXPORT_COMPONENT_FACTORY( libkfopngexport, PNGExportFactory( "kofficefilters" ) ) -PNGExport::PNGExport( KoFilter */*parent*/, const char */*name*/, const QStringList& ) +PNGExport::PNGExport( KoFilter */*tqparent*/, const char */*name*/, const TQStringList& ) : KoFilter() { } -KoFilter::ConversionStatus PNGExport::convert( const QCString& from, const QCString& to ) +KoFilter::ConversiontqStatus PNGExport::convert( const TQCString& from, const TQCString& to ) { if ( to != "image/png" || from != "application/x-kformula" ) return KoFilter::NotImplemented; @@ -58,7 +58,7 @@ KoFilter::ConversionStatus PNGExport::convert( const QCString& from, const QCStr return KoFilter::FileNotFound; } - QDomDocument dom( "KFORMULA" ); + TQDomDocument dom( "KFORMULA" ); if ( !dom.setContent( in, false ) ) { kapp->restoreOverrideCursor(); KMessageBox::error( 0, i18n( "Malformed XML data." ), i18n( "PNG Export Error" ) ); diff --git a/filters/kformula/png/pngexport.h b/filters/kformula/png/pngexport.h index b9425439..54c121e3 100644 --- a/filters/kformula/png/pngexport.h +++ b/filters/kformula/png/pngexport.h @@ -20,19 +20,20 @@ #ifndef PNGEXPORT_H #define PNGEXPORT_H -class QCString; -class QStringList; +class TQCString; +class TQStringList; #include class PNGExport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - PNGExport( KoFilter *parent, const char *name, const QStringList& ); + PNGExport( KoFilter *tqparent, const char *name, const TQStringList& ); virtual ~PNGExport() {} - virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to ); }; #endif // PNGEXPORT_H diff --git a/filters/kformula/png/pngexportdia.cc b/filters/kformula/png/pngexportdia.cc index 8de33b75..e366882c 100644 --- a/filters/kformula/png/pngexportdia.cc +++ b/filters/kformula/png/pngexportdia.cc @@ -17,15 +17,15 @@ * Boston, MA 02110-1301, USA. */ -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -39,8 +39,8 @@ #include "pngexportdia.h" #include -PNGExportDia::PNGExportDia( const QDomDocument &dom, const QString &outFile, QWidget *parent, const char *name ) - : KDialogBase( parent, name, true, i18n("PNG Export Filter Parameters" ), Ok|Cancel ), +PNGExportDia::PNGExportDia( const TQDomDocument &dom, const TQString &outFile, TQWidget *tqparent, const char *name ) + : KDialogBase( tqparent, name, true, i18n("PNG Export Filter Parameters" ), Ok|Cancel ), _fileOut( outFile ) { kapp->restoreOverrideCursor(); @@ -54,7 +54,7 @@ PNGExportDia::PNGExportDia( const QDomDocument &dom, const QString &outFile, QWi setupGUI(); - QRect rect = formula->boundingRect(); + TQRect rect = formula->boundingRect(); realWidth = rect.width(); realHeight = rect.height(); widthEdit->setValue( realWidth ); @@ -63,8 +63,8 @@ PNGExportDia::PNGExportDia( const QDomDocument &dom, const QString &outFile, QWi percHeightEdit->setValue( 100 ); connectAll(); - connect( proportional, SIGNAL( clicked() ), - this, SLOT( proportionalClicked() ) ); + connect( proportional, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( proportionalClicked() ) ); } PNGExportDia::~PNGExportDia() @@ -74,33 +74,33 @@ PNGExportDia::~PNGExportDia() void PNGExportDia::connectAll() { - connect( widthEdit, SIGNAL( valueChanged(int) ), - this, SLOT( widthChanged( int ) ) ); - connect( heightEdit, SIGNAL( valueChanged(int) ), - this, SLOT( heightChanged( int ) ) ); - connect( percWidthEdit, SIGNAL( valueChanged(double) ), - this, SLOT( percentWidthChanged( double ) ) ); - connect( percHeightEdit, SIGNAL( valueChanged(double) ), - this, SLOT( percentHeightChanged(double ) ) ); + connect( widthEdit, TQT_SIGNAL( valueChanged(int) ), + this, TQT_SLOT( widthChanged( int ) ) ); + connect( heightEdit, TQT_SIGNAL( valueChanged(int) ), + this, TQT_SLOT( heightChanged( int ) ) ); + connect( percWidthEdit, TQT_SIGNAL( valueChanged(double) ), + this, TQT_SLOT( percentWidthChanged( double ) ) ); + connect( percHeightEdit, TQT_SIGNAL( valueChanged(double) ), + this, TQT_SLOT( percentHeightChanged(double ) ) ); } void PNGExportDia::disconnectAll() { - disconnect( widthEdit, SIGNAL( valueChanged(int) ), - this, SLOT( widthChanged( int ) ) ); - disconnect( heightEdit, SIGNAL( valueChanged(int) ), - this, SLOT( heightChanged( int ) ) ); - disconnect( percWidthEdit, SIGNAL( valueChanged(double) ), - this, SLOT( percentWidthChanged( double ) ) ); - disconnect( percHeightEdit, SIGNAL( valueChanged(double) ), - this, SLOT( percentHeightChanged(double ) ) ); + disconnect( widthEdit, TQT_SIGNAL( valueChanged(int) ), + this, TQT_SLOT( widthChanged( int ) ) ); + disconnect( heightEdit, TQT_SIGNAL( valueChanged(int) ), + this, TQT_SLOT( heightChanged( int ) ) ); + disconnect( percWidthEdit, TQT_SIGNAL( valueChanged(double) ), + this, TQT_SLOT( percentWidthChanged( double ) ) ); + disconnect( percHeightEdit, TQT_SIGNAL( valueChanged(double) ), + this, TQT_SLOT( percentHeightChanged(double ) ) ); } void PNGExportDia::widthChanged( int width ) { disconnectAll(); - width = QMIN( width, realWidth*10 ); - width = QMAX( width, realWidth/10 ); + width = TQMIN( width, realWidth*10 ); + width = TQMAX( width, realWidth/10 ); double percent = 100.*static_cast( width )/static_cast( realWidth ); percWidthEdit->setValue( percent ); if ( proportional->isChecked() ) { @@ -114,8 +114,8 @@ void PNGExportDia::widthChanged( int width ) void PNGExportDia::heightChanged( int height ) { disconnectAll(); - height = QMIN( height, realHeight*10 ); - height = QMAX( height, realHeight/10 ); + height = TQMIN( height, realHeight*10 ); + height = TQMAX( height, realHeight/10 ); double percent = 100.*static_cast( height )/static_cast( realHeight ); percHeightEdit->setValue( percent ); if ( proportional->isChecked() ) { @@ -129,8 +129,8 @@ void PNGExportDia::heightChanged( int height ) void PNGExportDia::percentWidthChanged( double percent ) { disconnectAll(); - percent = QMIN( percent, 1000 ); - percent = QMAX( percent, 10 ); + percent = TQMIN( percent, 1000 ); + percent = TQMAX( percent, 10 ); int width = static_cast( realWidth*percent/100. ); widthEdit->setValue( width ); if ( proportional->isChecked() ) { @@ -144,8 +144,8 @@ void PNGExportDia::percentWidthChanged( double percent ) void PNGExportDia::percentHeightChanged( double percent ) { disconnectAll(); - percent = QMIN( percent, 1000 ); - percent = QMAX( percent, 10 ); + percent = TQMIN( percent, 1000 ); + percent = TQMAX( percent, 10 ); if ( proportional->isChecked() ) { int width = static_cast( realWidth*percent/100. ); widthEdit->setValue( width ); @@ -161,8 +161,8 @@ void PNGExportDia::proportionalClicked() if ( proportional->isChecked() ) { disconnectAll(); int width = widthEdit->value( ); - width = QMIN( width, realWidth*10 ); - width = QMAX( width, realWidth/10 ); + width = TQMIN( width, realWidth*10 ); + width = TQMAX( width, realWidth/10 ); double percent = 100.*static_cast( width )/static_cast( realWidth ); percHeightEdit->setValue( percent ); int height = static_cast( realHeight*percent/100. ); @@ -173,47 +173,47 @@ void PNGExportDia::proportionalClicked() void PNGExportDia::setupGUI() { - QWidget *page = new QWidget( this ); + TQWidget *page = new TQWidget( this ); setMainWidget(page); - QBoxLayout* mainLayout = new QVBoxLayout( page, KDialog::marginHint(), KDialog::spacingHint() ); + TQBoxLayout* mainLayout = new TQVBoxLayout( page, KDialog::marginHint(), KDialog::spacingHint() ); - proportional = new QCheckBox( page, "proportional" ); + proportional = new TQCheckBox( page, "proportional" ); proportional->setText( i18n( "Keep ratio" ) ); proportional->setChecked( true ); mainLayout->addWidget( proportional ); - QLabel* height = new QLabel( page, "Height" ); + TQLabel* height = new TQLabel( page, "Height" ); height->setText( i18n( "Height" ) ); widthEdit = new KIntNumInput( page, "widthEdit" ); - QLabel* width = new QLabel( page, "Width" ); + TQLabel* width = new TQLabel( page, "Width" ); width->setText( i18n( "Width" ) ); heightEdit = new KIntNumInput( page, "heightEdit" ); - QGridLayout* layout1 = new QGridLayout; - layout1->addWidget( height, 1, 0 ); - layout1->addWidget( widthEdit, 0, 1 ); - layout1->addWidget( width, 0, 0 ); - layout1->addWidget( heightEdit, 1, 1 ); + TQGridLayout* tqlayout1 = new TQGridLayout; + tqlayout1->addWidget( height, 1, 0 ); + tqlayout1->addWidget( widthEdit, 0, 1 ); + tqlayout1->addWidget( width, 0, 0 ); + tqlayout1->addWidget( heightEdit, 1, 1 ); - mainLayout->addLayout( layout1 ); + mainLayout->addLayout( tqlayout1 ); - QLabel* percentHeight = new QLabel( page, "PercentHeight" ); + TQLabel* percentHeight = new TQLabel( page, "PercentHeight" ); percentHeight->setText( i18n( "Height (%)" ) ); - QLabel* percentWidth = new QLabel( page, "PercentWidth" ); + TQLabel* percentWidth = new TQLabel( page, "PercentWidth" ); percentWidth->setText( i18n( "Width (%)" ) ); percWidthEdit = new KDoubleNumInput( page, "percWidthEdit" ); percHeightEdit = new KDoubleNumInput( page, "percHeightEdit" ); - QGridLayout* layout2 = new QGridLayout; - layout2->addWidget( percWidthEdit, 0, 1 ); - layout2->addWidget( percHeightEdit, 1, 1 ); - layout2->addWidget( percentHeight, 1, 0 ); - layout2->addWidget( percentWidth, 0, 0 ); + TQGridLayout* tqlayout2 = new TQGridLayout; + tqlayout2->addWidget( percWidthEdit, 0, 1 ); + tqlayout2->addWidget( percHeightEdit, 1, 1 ); + tqlayout2->addWidget( percentHeight, 1, 0 ); + tqlayout2->addWidget( percentWidth, 0, 0 ); - mainLayout->addLayout( layout2 ); + mainLayout->addLayout( tqlayout2 ); - /* Display the main layout */ + /* Display the main tqlayout */ mainLayout->addStretch( 5 ); mainLayout->activate(); } @@ -223,7 +223,7 @@ void PNGExportDia::slotOk() { hide(); //doc->setZoomAndResolution( 100, 600, 600 ); - //doc->setZoomAndResolution( 1000, QPaintDevice::x11AppDpiX(), QPaintDevice::x11AppDpiY() ); + //doc->setZoomAndResolution( 1000, TQPaintDevice::x11AppDpiX(), TQPaintDevice::x11AppDpiY() ); //doc->newZoomAndResolution( false, false ); int width = widthEdit->value(); int height = heightEdit->value(); @@ -232,7 +232,7 @@ void PNGExportDia::slotOk() // << endl; // width = realWidth; // height = realHeight; - QImage image = formula->drawImage( width, height ); + TQImage image = formula->drawImage( width, height ); if ( !image.save( _fileOut, "PNG" ) ) { KMessageBox::error( 0, i18n( "Failed to write file." ), i18n( "PNG Export Error" ) ); } diff --git a/filters/kformula/png/pngexportdia.h b/filters/kformula/png/pngexportdia.h index 3957ef88..4d04d429 100644 --- a/filters/kformula/png/pngexportdia.h +++ b/filters/kformula/png/pngexportdia.h @@ -20,8 +20,8 @@ #ifndef PNGEXPORTDIA_H #define PNGEXPORTDIA_H -class QCheckBox; -class QString; +class TQCheckBox; +class TQString; class KIntNumInput; class KDoubleNumInput; @@ -30,7 +30,7 @@ namespace KFormula { class DocumentWrapper; } -#include +#include #include @@ -38,9 +38,10 @@ namespace KFormula { class PNGExportDia : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - PNGExportDia( const QDomDocument &dom, const QString &outFile, QWidget *parent=0L, const char *name=0L ); + PNGExportDia( const TQDomDocument &dom, const TQString &outFile, TQWidget *tqparent=0L, const char *name=0L ); ~PNGExportDia(); public slots: @@ -65,13 +66,13 @@ private: int realWidth; int realHeight; - QString _fileOut; - QByteArray _arrayOut; + TQString _fileOut; + TQByteArray _arrayOut; KFormula::Container* formula; KFormula::DocumentWrapper* wrapper; - QCheckBox* proportional; + TQCheckBox* proportional; KIntNumInput* widthEdit; KIntNumInput* heightEdit; KDoubleNumInput* percWidthEdit; diff --git a/filters/kformula/svg/svgexport.cc b/filters/kformula/svg/svgexport.cc index 46177a9a..25758e82 100644 --- a/filters/kformula/svg/svgexport.cc +++ b/filters/kformula/svg/svgexport.cc @@ -18,8 +18,8 @@ Boston, MA 02110-1301 USA. */ -#include -#include +#include +#include #include #include @@ -38,7 +38,7 @@ typedef KGenericFactory SvgExportFactory; K_EXPORT_COMPONENT_FACTORY( libkfosvgexport, SvgExportFactory( "svgexport" ) ) -SvgExport::SvgExport(KoFilter *, const char *, const QStringList&) +SvgExport::SvgExport(KoFilter *, const char *, const TQStringList&) : KoFilter() { } @@ -48,8 +48,8 @@ SvgExport::~SvgExport() } -KoFilter::ConversionStatus -SvgExport::convert(const QCString& from, const QCString& to) +KoFilter::ConversiontqStatus +SvgExport::convert(const TQCString& from, const TQCString& to) { // Check for proper conversion. if ( from != "application/x-kformula" || to != "image/svg+xml" ) @@ -64,9 +64,9 @@ SvgExport::convert(const QCString& from, const QCString& to) } // Get the XML tree. - QDomDocument domIn; + TQDomDocument domIn; domIn.setContent( storeIn ); - QDomElement docNode = domIn.documentElement(); + TQDomElement docNode = domIn.documentElement(); // Read the document from the XML tree. KFormula::DocumentWrapper* wrapper = new KFormula::DocumentWrapper( kapp->config(), 0 ); @@ -81,9 +81,9 @@ SvgExport::convert(const QCString& from, const QCString& to) } // Draw the actual bitmap. - QPicture picture; - QPainter painter(&picture); - QRect rect(QPoint(0, 0), QPoint(500, 400)); + TQPicture picture; + TQPainter painter(&picture); + TQRect rect(TQPoint(0, 0), TQPoint(500, 400)); formula->draw( painter, rect, false ); painter.end(); diff --git a/filters/kformula/svg/svgexport.h b/filters/kformula/svg/svgexport.h index 085654a0..98d4d8d4 100644 --- a/filters/kformula/svg/svgexport.h +++ b/filters/kformula/svg/svgexport.h @@ -26,12 +26,13 @@ class SvgExport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - SvgExport(KoFilter *parent, const char *name, const QStringList&); + SvgExport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~SvgExport(); - virtual KoFilter::ConversionStatus convert(const QCString& from, const QCString& to); + virtual KoFilter::ConversiontqStatus convert(const TQCString& from, const TQCString& to); }; #endif // __SVGEXPORT_H__ diff --git a/filters/kivio/imageexport/kivio_imageexport.cpp b/filters/kivio/imageexport/kivio_imageexport.cpp index e5a6600c..cd983fe6 100644 --- a/filters/kivio/imageexport/kivio_imageexport.cpp +++ b/filters/kivio/imageexport/kivio_imageexport.cpp @@ -20,12 +20,12 @@ #include "kivio_imageexport.h" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include @@ -49,19 +49,19 @@ K_EXPORT_COMPONENT_FACTORY( libkivioimageexport, KivioImageExportFactory("KivioI namespace Kivio { -ImageExport::ImageExport(KoFilter *, const char *, const QStringList&) +ImageExport::ImageExport(KoFilter *, const char *, const TQStringList&) : KoFilter() { KGlobal::locale()->insertCatalogue("kofficefilters"); } -KoFilter::ConversionStatus ImageExport::convert(const QCString& from, const QCString& to) +KoFilter::ConversiontqStatus ImageExport::convert(const TQCString& from, const TQCString& to) { if(from != "application/x-kivio") { return KoFilter::BadMimeType; } - QString format; + TQString format; if(to == "image/png") { format = "PNG"; @@ -95,7 +95,7 @@ KoFilter::ConversionStatus ImageExport::convert(const QCString& from, const QCSt } // Get the XML tree. - QDomDocument domIn; + TQDomDocument domIn; domIn.setContent(storeIn); KivioDoc doc; @@ -107,9 +107,9 @@ KoFilter::ConversionStatus ImageExport::convert(const QCString& from, const QCSt ImageExportDialog dlg; - QStringList pageNames; - QPtrList pageList = doc.map()->pageList(); - QPtrListIterator it(pageList); + TQStringList pageNames; + TQPtrList pageList = doc.map()->pageList(); + TQPtrListIterator it(pageList); for(; it.current() != 0; ++it) { pageNames.append(it.current()->pageName()); @@ -120,7 +120,7 @@ KoFilter::ConversionStatus ImageExport::convert(const QCString& from, const QCSt dlg.setInitialDPI(300); dlg.setInitialmargin(10); - if(dlg.exec() != QDialog::Accepted) { + if(dlg.exec() != TQDialog::Accepted) { return KoFilter::UserCancelled; } @@ -133,11 +133,11 @@ KoFilter::ConversionStatus ImageExport::convert(const QCString& from, const QCSt float z = (float)dlg.imageDPI()/(float)KoGlobal::dpiX(); KoZoomHandler zoom; - zoom.setZoomAndResolution(qRound(z * 100), KoGlobal::dpiX(), KoGlobal::dpiY()); + zoom.setZoomAndResolution(tqRound(z * 100), KoGlobal::dpiX(), KoGlobal::dpiY()); - QSize size; + TQSize size; if(dlg.usePageBorders()) { - size = QSize(zoom.zoomItX(page->paperLayout().ptWidth), zoom.zoomItY(page->paperLayout().ptHeight)); + size = TQSize(zoom.zoomItX(page->paperLayout().ptWidth), zoom.zoomItY(page->paperLayout().ptHeight)); } else { size = zoom.zoomSize(page->getRectForAllStencils().size()); } @@ -149,16 +149,16 @@ KoFilter::ConversionStatus ImageExport::convert(const QCString& from, const QCSt size.setWidth(size.width() + (border * 2)); size.setHeight(size.height() + (border * 2)); - QPixmap pixmap = QPixmap(size); - pixmap.fill(Qt::white); + TQPixmap pixmap = TQPixmap(size); + pixmap.fill(TQt::white); KivioScreenPainter kpainter; - kpainter.start(&pixmap); + kpainter.start(TQT_TQPAINTDEVICE(&pixmap)); float translationX = border; float translationY = border; if(!dlg.usePageBorders()) { - QPoint point = zoom.zoomPoint(page->getRectForAllStencils().topLeft()); + TQPoint point = zoom.zoomPoint(page->getRectForAllStencils().topLeft()); translationX -= point.x(); translationY -= point.y(); } diff --git a/filters/kivio/imageexport/kivio_imageexport.h b/filters/kivio/imageexport/kivio_imageexport.h index f538ce24..e1946f0f 100644 --- a/filters/kivio/imageexport/kivio_imageexport.h +++ b/filters/kivio/imageexport/kivio_imageexport.h @@ -28,10 +28,11 @@ namespace Kivio class ImageExport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - ImageExport(KoFilter *, const char *, const QStringList&); + ImageExport(KoFilter *, const char *, const TQStringList&); - virtual KoFilter::ConversionStatus convert(const QCString& from, const QCString& to); + virtual KoFilter::ConversiontqStatus convert(const TQCString& from, const TQCString& to); }; } diff --git a/filters/kivio/imageexport/kivio_imageexportdialog.cpp b/filters/kivio/imageexport/kivio_imageexportdialog.cpp index 0ed61397..b4e8348b 100644 --- a/filters/kivio/imageexport/kivio_imageexportdialog.cpp +++ b/filters/kivio/imageexport/kivio_imageexportdialog.cpp @@ -19,8 +19,8 @@ #include "kivio_imageexportdialog.h" -#include -#include +#include +#include #include #include @@ -31,15 +31,15 @@ namespace Kivio { -ImageExportDialog::ImageExportDialog(QWidget* parent, const char* name) - : KDialogBase(parent, name, false, i18n("Export to Image"), Ok|Cancel) +ImageExportDialog::ImageExportDialog(TQWidget* tqparent, const char* name) + : KDialogBase(tqparent, name, false, i18n("Export to Image"), Ok|Cancel) { kapp->restoreOverrideCursor(); m_mainWidget = new ImageExportWidget(this); setMainWidget(m_mainWidget); } -void ImageExportDialog::setPageList(const QStringList& pages) +void ImageExportDialog::setPageList(const TQStringList& pages) { m_mainWidget->m_pageCombo->clear(); m_mainWidget->m_pageCombo->insertStringList(pages); @@ -61,7 +61,7 @@ void ImageExportDialog::setInitialmargin(const int margin) m_mainWidget->m_marginSpinBox->setValue(margin); } -QString ImageExportDialog::selectedPage() const +TQString ImageExportDialog::selectedPage() const { return m_mainWidget->m_pageCombo->currentText(); } diff --git a/filters/kivio/imageexport/kivio_imageexportdialog.h b/filters/kivio/imageexport/kivio_imageexportdialog.h index 72d1e9ab..da005e0c 100644 --- a/filters/kivio/imageexport/kivio_imageexportdialog.h +++ b/filters/kivio/imageexport/kivio_imageexportdialog.h @@ -30,14 +30,15 @@ class ImageExportWidget; class ImageExportDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - ImageExportDialog(QWidget* parent = 0, const char* name = 0); + ImageExportDialog(TQWidget* tqparent = 0, const char* name = 0); - void setPageList(const QStringList& pages); + void setPageList(const TQStringList& pages); void setInitialDPI(const int dpi); void setInitialmargin(const int margin); - QString selectedPage() const; + TQString selectedPage() const; bool usePageBorders() const; int imageDPI() const; int margin() const; diff --git a/filters/kivio/imageexport/kivio_imageexportwidget.ui b/filters/kivio/imageexport/kivio_imageexportwidget.ui index 00241fcf..86fef7a7 100644 --- a/filters/kivio/imageexport/kivio_imageexportwidget.ui +++ b/filters/kivio/imageexport/kivio_imageexportwidget.ui @@ -1,6 +1,6 @@ Kivio::ImageExportWidget - + Kivio::ImageExportWidget @@ -29,14 +29,14 @@ Expanding - + 20 40 - + m_pageLabel @@ -44,7 +44,7 @@ Page: - + m_exportAreaLabel @@ -52,7 +52,7 @@ Area to export: - + m_DPILabel @@ -63,7 +63,7 @@ Set the resolution of the resulting bitmap image - + m_marginLabel @@ -81,14 +81,14 @@ Expanding - + 60 21 - + m_marginSpinBox @@ -103,14 +103,14 @@ Expanding - + 70 20 - + 72 @@ -194,8 +194,8 @@ - - + + kcombobox.h kcombobox.h diff --git a/filters/kpresenter/bmp/bmpexport.cpp b/filters/kpresenter/bmp/bmpexport.cpp index b2ecfe0f..f7351a10 100644 --- a/filters/kpresenter/bmp/bmpexport.cpp +++ b/filters/kpresenter/bmp/bmpexport.cpp @@ -17,8 +17,8 @@ * Boston, MA 02110-1301, USA. */ -#include -#include +#include +#include #include @@ -36,7 +36,7 @@ typedef KGenericFactory bmpExportFactory; K_EXPORT_COMPONENT_FACTORY( libkpresenterbmpexport, bmpExportFactory( "bmpexport" ) ) -BmpExport::BmpExport(KoFilter *fil, const char *name, const QStringList&lst) +BmpExport::BmpExport(KoFilter *fil, const char *name, const TQStringList&lst) : ImageExport(fil,name,lst) { } @@ -61,7 +61,7 @@ bool BmpExport::extraImageAttribute() } -bool BmpExport::saveImage( QString fileName) +bool BmpExport::saveImage( TQString fileName) { bool ret = pixmap.save( fileName, "BMP" ); // Save the image. diff --git a/filters/kpresenter/bmp/bmpexport.h b/filters/kpresenter/bmp/bmpexport.h index 6e4f29bf..f266f636 100644 --- a/filters/kpresenter/bmp/bmpexport.h +++ b/filters/kpresenter/bmp/bmpexport.h @@ -25,11 +25,12 @@ class BmpExport : public ImageExport { Q_OBJECT + TQ_OBJECT public: - BmpExport(KoFilter *parent, const char *name, const QStringList&); + BmpExport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~BmpExport(); - virtual bool saveImage( QString fileName); + virtual bool saveImage( TQString fileName); virtual bool extraImageAttribute(); virtual const char * exportFormat(); }; diff --git a/filters/kpresenter/jpeg/jpegexport.cpp b/filters/kpresenter/jpeg/jpegexport.cpp index b62d985d..52711188 100644 --- a/filters/kpresenter/jpeg/jpegexport.cpp +++ b/filters/kpresenter/jpeg/jpegexport.cpp @@ -17,8 +17,8 @@ * Boston, MA 02110-1301, USA. */ -#include -#include +#include +#include #include @@ -36,7 +36,7 @@ typedef KGenericFactory jpegExportFactory; K_EXPORT_COMPONENT_FACTORY( libkpresenterjpegexport, jpegExportFactory( "jpegexport" ) ) -JpegExport::JpegExport(KoFilter *fil, const char *name, const QStringList&lst) +JpegExport::JpegExport(KoFilter *fil, const char *name, const TQStringList&lst) : ImageExport(fil,name,lst) { } @@ -62,7 +62,7 @@ bool JpegExport::extraImageAttribute() } -bool JpegExport::saveImage( QString fileName) +bool JpegExport::saveImage( TQString fileName) { bool ret = pixmap.save( fileName, "JPEG" ); // Save the image. diff --git a/filters/kpresenter/jpeg/jpegexport.h b/filters/kpresenter/jpeg/jpegexport.h index 873e463f..518615df 100644 --- a/filters/kpresenter/jpeg/jpegexport.h +++ b/filters/kpresenter/jpeg/jpegexport.h @@ -25,11 +25,12 @@ class JpegExport : public ImageExport { Q_OBJECT + TQ_OBJECT public: - JpegExport(KoFilter *parent, const char *name, const QStringList&); + JpegExport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~JpegExport(); - virtual bool saveImage( QString fileName); + virtual bool saveImage( TQString fileName); virtual bool extraImageAttribute(); virtual const char * exportFormat(); }; diff --git a/filters/kpresenter/kword/kprkword.cc b/filters/kpresenter/kword/kprkword.cc index a0cd7ab4..75042fc3 100644 --- a/filters/kpresenter/kword/kprkword.cc +++ b/filters/kpresenter/kword/kprkword.cc @@ -26,13 +26,13 @@ #include #include #include -#include -#include +#include +#include typedef KGenericFactory KprKwordFactory; K_EXPORT_COMPONENT_FACTORY( libkprkword, KprKwordFactory( "kofficefilters" ) ) -KprKword::KprKword(KoFilter *, const char *, const QStringList&) : +KprKword::KprKword(KoFilter *, const char *, const TQStringList&) : KoFilter(), outdoc( "DOC" ) { @@ -40,8 +40,8 @@ KprKword::KprKword(KoFilter *, const char *, const QStringList&) : // This filter can act as an import filter for KWord and as an export // filter for KPresenter (isn't our architecture really nice ? :) -// This is why we use the file-to-file method, not a QDomDoc one. -KoFilter::ConversionStatus KprKword::convert( const QCString& from, const QCString& to ) +// This is why we use the file-to-file method, not a TQDomDoc one. +KoFilter::ConversiontqStatus KprKword::convert( const TQCString& from, const TQCString& to ) { if(to!="application/x-kword" || from!="application/x-kpresenter") return KoFilter::NotImplemented; @@ -57,32 +57,32 @@ KoFilter::ConversionStatus KprKword::convert( const QCString& from, const QCStri outdoc.appendChild( outdoc.createProcessingInstruction( "xml", "version=\"1.0\" encoding=\"UTF-8\"" ) ); - QDomElement kwdoc = outdoc.createElement( "DOC" ); + TQDomElement kwdoc = outdoc.createElement( "DOC" ); kwdoc.setAttribute( "editor", "KprKword converter" ); kwdoc.setAttribute( "mime", "application/x-kword" ); kwdoc.setAttribute( "syntaxVersion", 1 ); outdoc.appendChild( kwdoc ); - QDomElement paper = outdoc.createElement( "PAPER" ); + TQDomElement paper = outdoc.createElement( "PAPER" ); kwdoc.appendChild( paper ); paper.setAttribute( "format", 1 ); // A4. How on earth could I know what the user really wants ? :) paper.setAttribute( "width", 595 ); paper.setAttribute( "height", 841 ); - QDomElement borders = outdoc.createElement( "PAPERBORDERS" ); + TQDomElement borders = outdoc.createElement( "PAPERBORDERS" ); paper.appendChild( borders ); borders.setAttribute( "left", 28 ); borders.setAttribute( "top", 42 ); borders.setAttribute( "right", 28 ); borders.setAttribute( "bottom", 42 ); - QDomElement framesets = outdoc.createElement( "FRAMESETS" ); + TQDomElement framesets = outdoc.createElement( "FRAMESETS" ); kwdoc.appendChild( framesets ); frameset = outdoc.createElement( "FRAMESET" ); framesets.appendChild( frameset ); frameset.setAttribute( "frameType", 1 ); // text frameset.setAttribute( "frameInfo", 0 ); // body - QDomElement frame = outdoc.createElement( "FRAME" ); + TQDomElement frame = outdoc.createElement( "FRAME" ); frameset.appendChild( frame ); frame.setAttribute( "left", 28 ); frame.setAttribute( "top", 42 ); @@ -99,19 +99,19 @@ KoFilter::ConversionStatus KprKword::convert( const QCString& from, const QCStri // Create a style for the slide titles - QDomElement styles = outdoc.createElement( "STYLES" ); + TQDomElement styles = outdoc.createElement( "STYLES" ); kwdoc.appendChild( styles ); - QDomElement style = outdoc.createElement( "STYLE" ); + TQDomElement style = outdoc.createElement( "STYLE" ); styles.appendChild( style ); - QDomElement elem = outdoc.createElement( "NAME" ); + TQDomElement elem = outdoc.createElement( "NAME" ); style.appendChild( elem ); elem.setAttribute( "value", titleStyleName ); elem = outdoc.createElement( "FOLLOWING" ); style.appendChild( elem ); elem.setAttribute( "name", "Standard" ); // no i18n here! - QDomElement counter = outdoc.createElement( "COUNTER" ); + TQDomElement counter = outdoc.createElement( "COUNTER" ); style.appendChild( counter ); counter.setAttribute( "type", 1 ); // numbered counter.setAttribute( "depth", 0 ); @@ -119,15 +119,15 @@ KoFilter::ConversionStatus KprKword::convert( const QCString& from, const QCStri counter.setAttribute( "numberingtype", 1 ); // chapter counter.setAttribute( "righttext", "." ); - QDomElement format = outdoc.createElement( "FORMAT" ); + TQDomElement format = outdoc.createElement( "FORMAT" ); style.appendChild( format ); - QDomElement font = outdoc.createElement( "FONT" ); + TQDomElement font = outdoc.createElement( "FONT" ); format.appendChild( font ); font.setAttribute( "name", titleFont ); // found when reading the first title - QDomElement size = outdoc.createElement( "SIZE" ); + TQDomElement size = outdoc.createElement( "SIZE" ); format.appendChild( size ); size.setAttribute( "value", 24 ); - QDomElement bold = outdoc.createElement( "WEIGHT" ); + TQDomElement bold = outdoc.createElement( "WEIGHT" ); format.appendChild( bold ); bold.setAttribute( "value", 75 ); @@ -147,7 +147,7 @@ KoFilter::ConversionStatus KprKword::convert( const QCString& from, const QCStri kdError(30502) << "Unable to open output file!" << endl; return KoFilter::StorageCreationError; } - QCString cstring = outdoc.toCString(); // utf-8 already + TQCString cstring = outdoc.toCString(); // utf-8 already out->writeBlock( cstring.data(), cstring.length() ); return KoFilter::OK; } @@ -156,7 +156,7 @@ KoFilter::ConversionStatus KprKword::convert( const QCString& from, const QCStri class KprObject { public: double y; - QDomElement elem; + TQDomElement elem; bool operator < ( const KprObject & c ) const { return y < c.y; @@ -169,25 +169,25 @@ class KprObject { void KprKword::convert() { - QDomElement docElem = inpdoc.documentElement(); - QDomElement paper = docElem.namedItem( "PAPER" ).toElement(); + TQDomElement docElem = inpdoc.documentElement(); + TQDomElement paper = docElem.namedItem( "PAPER" ).toElement(); int ptPageHeight = paper.attribute( "ptHeight" ).toInt(); - QDomElement objects = docElem.namedItem( "OBJECTS" ).toElement(); + TQDomElement objects = docElem.namedItem( "OBJECTS" ).toElement(); if ( objects.isNull() ) return; - QSortedList< KprObject > objList; + TQSortedList< KprObject > objList; objList.setAutoDelete( true ); - QDomNodeList lst = objects.elementsByTagName( "OBJECT" ); + TQDomNodeList lst = objects.elementsByTagName( "OBJECT" ); uint lstcount = lst.count(); for ( uint item = 0 ; item < lstcount ; ++item ) { - QDomElement object = lst.item( item ).toElement(); + TQDomElement object = lst.item( item ).toElement(); if ( object.attribute( "type" ).toInt() == 4 ) // we only care about text objs { - QDomElement orig = object.namedItem( "ORIG" ).toElement(); + TQDomElement orig = object.namedItem( "ORIG" ).toElement(); if ( !orig.isNull() ) { KprObject * obj = new KprObject; @@ -201,9 +201,9 @@ void KprKword::convert() int curPage = -1; //kdDebug() << "found " << objList.count() << " objects" << endl; - for ( QPtrListIterator it(objList); it.current(); ++it ) + for ( TQPtrListIterator it(objList); it.current(); ++it ) { - QDomElement elem = it.current()->elem; + TQDomElement elem = it.current()->elem; // Detect the first object of each page int page = int( it.current()->y / ptPageHeight ); bool isTitle = ( page > curPage ); @@ -211,64 +211,64 @@ void KprKword::convert() // << " isTitle=" << isTitle << endl; curPage = page; - QDomElement textObj = elem.namedItem( "TEXTOBJ" ).toElement(); + TQDomElement textObj = elem.namedItem( "TEXTOBJ" ).toElement(); if (textObj.isNull()) continue; // For each paragraph in this text object... - QDomNodeList lst = textObj.elementsByTagName( "P" ); + TQDomNodeList lst = textObj.elementsByTagName( "P" ); uint lstcount = lst.count(); for ( uint item = 0; item < lstcount ; ++item ) { - QDomElement p = lst.item( item ).toElement(); + TQDomElement p = lst.item( item ).toElement(); // Create paragraph in KWord doc - QDomElement parag = outdoc.createElement( "PARAGRAPH" ); + TQDomElement parag = outdoc.createElement( "PARAGRAPH" ); frameset.appendChild( parag ); - QDomElement outFormatsElem = outdoc.createElement( "FORMATS" ); + TQDomElement outFormatsElem = outdoc.createElement( "FORMATS" ); - QString text; + TQString text; // For each text element in the paragraph... - QDomElement textElem = p.firstChild().toElement(); + TQDomElement textElem = p.firstChild().toElement(); - QDomElement counter = p.namedItem( "COUNTER" ).toElement(); - QDomElement indent=p.namedItem("INDENTS").toElement(); - QDomElement lineSpacing=p.namedItem( "LINESPACING" ).toElement(); - QDomElement offset=p.namedItem("OFFSETS").toElement(); - QDomElement leftBorder = p.namedItem( "LEFTBORDER" ).toElement(); - QDomElement rightBorder = p.namedItem( "RIGHTBORDER" ).toElement(); - QDomElement topBorder = p.namedItem( "TOPBORDER" ).toElement(); - QDomElement bottomBorder = p.namedItem( "BOTTOMBORDER" ).toElement(); + TQDomElement counter = p.namedItem( "COUNTER" ).toElement(); + TQDomElement indent=p.namedItem("INDENTS").toElement(); + TQDomElement lineSpacing=p.namedItem( "LINESPACING" ).toElement(); + TQDomElement offset=p.namedItem("OFFSETS").toElement(); + TQDomElement leftBorder = p.namedItem( "LEFTBORDER" ).toElement(); + TQDomElement rightBorder = p.namedItem( "RIGHTBORDER" ).toElement(); + TQDomElement topBorder = p.namedItem( "TOPBORDER" ).toElement(); + TQDomElement bottomBorder = p.namedItem( "BOTTOMBORDER" ).toElement(); - QDomElement shadow=p.namedItem("SHADOW").toElement(); + TQDomElement shadow=p.namedItem("SHADOW").toElement(); for ( ; !textElem.isNull() ; textElem = textElem.nextSibling().toElement() ) { int oldLen = text.length(); text += textElem.text(); //kdDebug() << "KprKword::convert text now " << text << endl; - QDomElement outFormatElem = outdoc.createElement( "FORMAT" ); + TQDomElement outFormatElem = outdoc.createElement( "FORMAT" ); if ( textElem.attribute( "italic" ).toInt() ) { - QDomElement e = outdoc.createElement("ITALIC"); + TQDomElement e = outdoc.createElement("ITALIC"); e.setAttribute( "value", 1 ); outFormatElem.appendChild( e ); } - QColor underlineColor; + TQColor underlineColor; if ( textElem.hasAttribute("underlinecolor" )) { - underlineColor =QColor(textElem.attribute("underlinecolor" )); + underlineColor =TQColor(textElem.attribute("underlinecolor" )); } - QString underlineStyleLine; + TQString underlineStyleLine; if ( textElem.hasAttribute("underlinestyleline")) { underlineStyleLine = textElem.attribute("underlinestyleline"); } if ( textElem.hasAttribute("underline" )) { - QDomElement e = outdoc.createElement("UNDERLINE"); - QString value = textElem.attribute( "underline" ); + TQDomElement e = outdoc.createElement("UNDERLINE"); + TQString value = textElem.attribute( "underline" ); if ( value == "double" ) { e.setAttribute( "value", "double" ); @@ -291,12 +291,12 @@ void KprKword::convert() } - QString strikeOutStyleLine; + TQString strikeOutStyleLine; if ( textElem.hasAttribute("strikeoutstyleline")) { strikeOutStyleLine = textElem.attribute("strikeoutstyleline"); } - QString strikeOutValue; + TQString strikeOutValue; if ( textElem.hasAttribute("strikeOut")) { strikeOutValue = textElem.attribute("strikeOut"); @@ -304,7 +304,7 @@ void KprKword::convert() if( !strikeOutValue.isEmpty()) { - QDomElement e = outdoc.createElement("STRIKEOUT"); + TQDomElement e = outdoc.createElement("STRIKEOUT"); e.setAttribute( "value", strikeOutValue ); if ( !strikeOutStyleLine.isEmpty()) e.setAttribute("styleline", strikeOutStyleLine); @@ -312,7 +312,7 @@ void KprKword::convert() } /*if ( textElem.attribute( "bold" ).toInt() ) { - QDomElement e = outdoc.createElement("WEIGHT"); + TQDomElement e = outdoc.createElement("WEIGHT"); e.setAttribute( "value", 75 ); outFormatElem.appendChild( e ); }*/ // doesn't look good @@ -322,9 +322,9 @@ void KprKword::convert() // Family and point size are voluntarily NOT passed over. if ( !textElem.attribute( "color" ).isEmpty()) { - QColor col; + TQColor col; col.setNamedColor(textElem.attribute( "color" )); - QDomElement e = outdoc.createElement("COLOR"); + TQDomElement e = outdoc.createElement("COLOR"); e.setAttribute( "red", col.red() ); e.setAttribute( "green", col.green() ); e.setAttribute( "blue", col.blue() ); @@ -332,9 +332,9 @@ void KprKword::convert() } if ( !textElem.attribute("textbackcolor").isEmpty()) { - QColor col; + TQColor col; col.setNamedColor(textElem.attribute( "textbackcolor" )); - QDomElement e = outdoc.createElement("TEXTBACKGROUNDCOLOR"); + TQDomElement e = outdoc.createElement("TEXTBACKGROUNDCOLOR"); e.setAttribute( "red", col.red() ); e.setAttribute( "green", col.green() ); e.setAttribute( "blue", col.blue() ); @@ -351,7 +351,7 @@ void KprKword::convert() if( textElem.attribute("VERTALIGN").toInt()) { - QDomElement e = outdoc.createElement("VERTALIGN"); + TQDomElement e = outdoc.createElement("VERTALIGN"); e.setAttribute( "value", textElem.attribute("VERTALIGN").toInt() ); if ( relative != 0) e.setAttribute( "relativetextsize", relative ); @@ -360,34 +360,34 @@ void KprKword::convert() if( textElem.hasAttribute("shadowtext")) { - QDomElement e = outdoc.createElement("SHADOWTEXT"); + TQDomElement e = outdoc.createElement("SHADOWTEXT"); e.setAttribute( "value", textElem.attribute("shadowtext").toInt() ); outFormatElem.appendChild( e ); } if( textElem.hasAttribute("offsetfrombaseline")) { - QDomElement e = outdoc.createElement("OFFSETFROMBASELINE"); + TQDomElement e = outdoc.createElement("OFFSETFROMBASELINE"); e.setAttribute( "value", textElem.attribute("offsetfrombaseline").toInt() ); outFormatElem.appendChild( e ); } if( textElem.hasAttribute("wordbyword")) { - QDomElement e = outdoc.createElement("WORDBYWORD"); + TQDomElement e = outdoc.createElement("WORDBYWORD"); e.setAttribute( "value", textElem.attribute("wordbyword").toInt() ); outFormatElem.appendChild( e ); } if( textElem.hasAttribute("fontattribute")) { - QDomElement e = outdoc.createElement("FONTATTRIBUTE"); + TQDomElement e = outdoc.createElement("FONTATTRIBUTE"); e.setAttribute( "value", textElem.attribute("fontattribute") ); outFormatElem.appendChild( e ); } if( textElem.hasAttribute("language")) { - QDomElement e = outdoc.createElement("LANGUAGE"); + TQDomElement e = outdoc.createElement("LANGUAGE"); e.setAttribute( "value", textElem.attribute("language") ); outFormatElem.appendChild( e ); } @@ -406,19 +406,19 @@ void KprKword::convert() if ( len > 0 && text[ len - 1 ] == ' ' ) text.truncate( len - 1 ); - QDomElement outTextElem = outdoc.createElement( "TEXT" ); + TQDomElement outTextElem = outdoc.createElement( "TEXT" ); parag.appendChild( outTextElem ); outTextElem.appendChild( outdoc.createTextNode( text ) ); if ( !outFormatsElem.firstChild().isNull() ) // Do we have formats to save ? parag.appendChild( outFormatsElem ); - QDomElement layoutElem = outdoc.createElement( "LAYOUT" ); - parag.appendChild( layoutElem ); - QDomElement nameElem = outdoc.createElement( "NAME" ); - layoutElem.appendChild( nameElem ); - nameElem.setAttribute( "value", isTitle ? titleStyleName : QString("Standard") ); - QDomElement align=outdoc.createElement("FLOW"); + TQDomElement tqlayoutElem = outdoc.createElement( "LAYOUT" ); + parag.appendChild( tqlayoutElem ); + TQDomElement nameElem = outdoc.createElement( "NAME" ); + tqlayoutElem.appendChild( nameElem ); + nameElem.setAttribute( "value", isTitle ? titleStyleName : TQString("Standard") ); + TQDomElement align=outdoc.createElement("FLOW"); if(p.hasAttribute("align")) { switch(p.attribute( "align" ).toInt()) @@ -438,25 +438,25 @@ void KprKword::convert() } } if(!counter.isNull() ) - layoutElem.appendChild( counter ); + tqlayoutElem.appendChild( counter ); if(!indent.isNull()) - layoutElem.appendChild( indent ); + tqlayoutElem.appendChild( indent ); if(!lineSpacing.isNull()) - layoutElem.appendChild( lineSpacing ); + tqlayoutElem.appendChild( lineSpacing ); if(!offset.isNull()) - layoutElem.appendChild( offset); + tqlayoutElem.appendChild( offset); if(!leftBorder.isNull()) - layoutElem.appendChild(leftBorder); + tqlayoutElem.appendChild(leftBorder); if(!rightBorder.isNull()) - layoutElem.appendChild(rightBorder); + tqlayoutElem.appendChild(rightBorder); if(!topBorder.isNull()) - layoutElem.appendChild(topBorder); + tqlayoutElem.appendChild(topBorder); if(!bottomBorder.isNull()) - layoutElem.appendChild(bottomBorder); + tqlayoutElem.appendChild(bottomBorder); if(!align.isNull()) - layoutElem.appendChild(align); + tqlayoutElem.appendChild(align); if(!shadow.isNull()) - layoutElem.appendChild(shadow); + tqlayoutElem.appendChild(shadow); // Only the first parag of the top text object is set to the 'title' style isTitle = false; } diff --git a/filters/kpresenter/kword/kprkword.h b/filters/kpresenter/kword/kprkword.h index 5e0aed2d..0ba4efa5 100644 --- a/filters/kpresenter/kword/kprkword.h +++ b/filters/kpresenter/kword/kprkword.h @@ -21,25 +21,26 @@ #define KPRKWORD_H #include -#include +#include class KprKword : public KoFilter { Q_OBJECT + TQ_OBJECT public: - KprKword(KoFilter *parent, const char *name, const QStringList&); + KprKword(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~KprKword() {} - virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to ); protected: void convert(); - QDomDocument inpdoc; - QDomDocument outdoc; - QDomElement frameset; - QString titleStyleName; - QString titleFont; + TQDomDocument inpdoc; + TQDomDocument outdoc; + TQDomElement frameset; + TQString titleStyleName; + TQString titleFont; }; #endif // KPRKWORD_H diff --git a/filters/kpresenter/libimageexport/imageexport.cpp b/filters/kpresenter/libimageexport/imageexport.cpp index 7611a936..9e933380 100644 --- a/filters/kpresenter/libimageexport/imageexport.cpp +++ b/filters/kpresenter/libimageexport/imageexport.cpp @@ -17,8 +17,8 @@ * Boston, MA 02110-1301, USA. */ -#include -#include +#include +#include #include @@ -32,7 +32,7 @@ #include "KPrCanvas.h" #include "imageexport.h" -ImageExport::ImageExport(KoFilter *, const char *, const QStringList&) +ImageExport::ImageExport(KoFilter *, const char *, const TQStringList&) : KoFilter() { } @@ -42,8 +42,8 @@ ImageExport::~ImageExport() } -KoFilter::ConversionStatus -ImageExport::convert(const QCString& from, const QCString& to) +KoFilter::ConversiontqStatus +ImageExport::convert(const TQCString& from, const TQCString& to) { KoDocument * document = m_chain->inputDocument(); @@ -70,9 +70,9 @@ ImageExport::convert(const QCString& from, const QCString& to) kdWarning() << "Invalid document mimetype " << kpresenterdoc->mimeType() << endl; return KoFilter::NotImplemented; } - KoPageLayout layoutPage= kpresenterdoc->pageLayout(); - width = int( layoutPage.ptWidth ); - height = int( layoutPage.ptHeight ); + KoPageLayout tqlayoutPage= kpresenterdoc->pageLayout(); + width = int( tqlayoutPage.ptWidth ); + height = int( tqlayoutPage.ptHeight ); if (extraImageAttribute()) { KPrView* view = static_cast( kpresenterdoc->views().getFirst()); @@ -83,8 +83,8 @@ ImageExport::convert(const QCString& from, const QCString& to) } else //when it's embedded we use just it. { - pixmap = QPixmap(width, height); - QPainter painter(&pixmap); + pixmap = TQPixmap(width, height); + TQPainter painter(&pixmap); kpresenterdoc->paintContent(painter, pixmap.rect(), false); } if( !saveImage( m_chain->outputFile())) diff --git a/filters/kpresenter/libimageexport/imageexport.h b/filters/kpresenter/libimageexport/imageexport.h index e5dfeb81..641a9010 100644 --- a/filters/kpresenter/libimageexport/imageexport.h +++ b/filters/kpresenter/libimageexport/imageexport.h @@ -22,23 +22,24 @@ #include -class QPixmap; +class TQPixmap; class ImageExport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - ImageExport(KoFilter *parent, const char *name, const QStringList&); + ImageExport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~ImageExport(); - virtual KoFilter::ConversionStatus convert(const QCString& from, const QCString& to); + virtual KoFilter::ConversiontqStatus convert(const TQCString& from, const TQCString& to); virtual bool extraImageAttribute() { return true;}; - virtual bool saveImage( QString fileName) = 0; + virtual bool saveImage( TQString fileName) = 0; virtual const char* exportFormat() = 0; protected: int width; int height; - QPixmap pixmap; + TQPixmap pixmap; }; #endif // __IMAGEEXPORT_H__ diff --git a/filters/kpresenter/magicpoint/mgp2kpr.py b/filters/kpresenter/magicpoint/mgp2kpr.py index 97527471..73751f26 100755 --- a/filters/kpresenter/magicpoint/mgp2kpr.py +++ b/filters/kpresenter/magicpoint/mgp2kpr.py @@ -56,7 +56,7 @@ class MgpImporter: self.__reset() #init properties def __reset(self): - self.alignment="1" #text alignment, left + self.tqalignment="1" #text tqalignment, left self.vgap=1 #line spacing #font properties @@ -84,14 +84,14 @@ class MgpImporter: def __setupDefaultFonts(self,command): tokens=string.split(command,' ') - _key=string.replace(tokens[1], '"', '') - _val=string.replace(tokens[3], '"', '') + _key=string.tqreplace(tokens[1], '"', '') + _val=string.tqreplace(tokens[3], '"', '') self.defFonts[_key]=_val #print self.defFonts def __setFontIndirect(self,command): tokens=string.split(command,' ') - _font=string.replace(tokens[1], '"', '') + _font=string.tqreplace(tokens[1], '"', '') if _font in self.defFonts.keys(): # we have a "default" font, find it in the map self.__setFont(None,self.defFonts[_font]) #print self.defFonts[_font] @@ -99,9 +99,9 @@ class MgpImporter: def __setFont(self,command,font=""): if command: tokens=string.split(command,' ') - font=string.replace(tokens[1], '"', '').strip() #XLFD-like, eg: mincho-medium-r (family-weight-slant) + font=string.tqreplace(tokens[1], '"', '').strip() #XLFD-like, eg: mincho-medium-r (family-weight-slant) - _numDash=string.find(font,"-") #find dashes + _numDash=string.tqfind(font,"-") #find dashes if (_numDash==-1): #mincho self.fontName=font @@ -124,7 +124,7 @@ class MgpImporter: def __setBgColor(self, command): tokens=string.split(command,' ') self.bctype="0" - self.color1=string.replace(tokens[1].strip(),'"', '') #strip quotes and \n + self.color1=string.tqreplace(tokens[1].strip(),'"', '') #strip quotes and \n def __setBgGradient(self, command): tokens=string.split(command,' ') @@ -135,8 +135,8 @@ class MgpImporter: try: dir=tokens[4] - self.color1=string.replace(tokens[6].strip(),'"', '') #strip quotes and \n - self.color2=string.replace(tokens[7].strip(),'"', '') + self.color1=string.tqreplace(tokens[6].strip(),'"', '') #strip quotes and \n + self.color2=string.tqreplace(tokens[7].strip(),'"', '') except: self.bctype="0" self.color1="black" @@ -167,16 +167,16 @@ class MgpImporter: def __setAlign(self,command): tokens=string.split(command,' ') if (tokens[0]=='leftfill'): #justify - self.alignment="8" + self.tqalignment="8" elif (tokens[0]=='right'): - self.alignment="2" + self.tqalignment="2" elif (tokens[0]=='center'): - self.alignment="4" + self.tqalignment="4" else: - self.alignment="1" #left - #print self.alignment + self.tqalignment="1" #left + #print self.tqalignment - def __setBackground(self,parent): + def __setBackground(self,tqparent): pageElem=self.document.createElement("PAGE") elem=self.document.createElement("BACKTYPE") #color @@ -200,9 +200,9 @@ class MgpImporter: elem.setAttribute("color", self.color2) pageElem.appendChild(elem) - parent.appendChild(pageElem) + tqparent.appendChild(pageElem) - def __handlePage(self,parent,bgParent): + def __handlePage(self,tqparent,bgParent): if (self.pageCount!=-1): self.__setBackground(bgParent) #set the background for this page @@ -224,7 +224,7 @@ class MgpImporter: ### para comes here objElem.appendChild(self.textElem) - parent.appendChild(objElem) + tqparent.appendChild(objElem) self.useDefaults=1 self.__reset() @@ -233,7 +233,7 @@ class MgpImporter: indent=-1 pElem=self.document.createElement("P") #paragraph - pElem.setAttribute("align", self.alignment) + pElem.setAttribute("align", self.tqalignment) elem=self.document.createElement("NAME") #style name elem.setAttribute("value", "Standard") ###is this needed at all? @@ -283,7 +283,7 @@ class MgpImporter: if (self.fontItalic!=0): elem.setAttribute("italic", "1") - text=self.document.createTextNode(unicode(line, self.charset, 'ignore')) + text=self.document.createTextNode(tqunicode(line, self.charset, 'ignore')) elem.appendChild(text) pElem.appendChild(elem) self.textElem.appendChild(pElem) @@ -296,14 +296,14 @@ class MgpImporter: def __setTextColor(self,command): tokens=string.split(command,' ') - self.textColor=string.replace(tokens[1].strip(),'"', '') #strip quotes + self.textColor=string.tqreplace(tokens[1].strip(),'"', '') #strip quotes #print self.textColor def __handleBar(self,command): tokens=string.split(command,' ') try: - color=string.replace(tokens[1].strip(),'"', '') #strip quotes and \n + color=string.tqreplace(tokens[1].strip(),'"', '') #strip quotes and \n width=tokens[2].strip()/1000*Y_OFFSET #in per mils of display height start=tokens[3].strip()/100*PAGE_WIDTH #start position percent of display width length=tokens[4].strip()/100*PAGE_WIDTH #length percent of display width @@ -314,7 +314,7 @@ class MgpImporter: length=PAGE_WIDTH - def __setPaper(self,parent): + def __setPaper(self,tqparent): paperElem=self.document.createElement("PAPER") paperElem.setAttribute("ptWidth", str(PAGE_WIDTH)) paperElem.setAttribute("ptHeight", str(Y_OFFSET)) @@ -330,7 +330,7 @@ class MgpImporter: paperElem.appendChild(borderElem) - parent.appendChild(paperElem) + tqparent.appendChild(paperElem) def convert(self, fileIn, fileOut=None): """Parses the Magicpoint document and returns a KPresenter XML document. @@ -357,7 +357,7 @@ class MgpImporter: if (line.startswith('#') or line.startswith('%%')): #skip comments continue elif (line.startswith('%')): #commands - commands=string.split(string.replace(line, '%', ''),',') #list of commands, comma separated, remove '%' + commands=string.split(string.tqreplace(line, '%', ''),',') #list of commands, comma separated, remove '%' for command in commands: command=command.strip().lower() #print command @@ -377,7 +377,7 @@ class MgpImporter: self.__setFontSize(command) elif (command.startswith('left') or command.startswith('center') or - command.startswith('right')): #text alignment + command.startswith('right')): #text tqalignment self.__setAlign(command) elif (command.startswith('charset')): #charset self.__setCharset(command) diff --git a/filters/kpresenter/mng/mngexport.cpp b/filters/kpresenter/mng/mngexport.cpp index f56f4c77..67ff47d5 100644 --- a/filters/kpresenter/mng/mngexport.cpp +++ b/filters/kpresenter/mng/mngexport.cpp @@ -17,8 +17,8 @@ * Boston, MA 02110-1301, USA. */ -#include -#include +#include +#include #include @@ -33,7 +33,7 @@ typedef KGenericFactory mngExportFactory; K_EXPORT_COMPONENT_FACTORY( libkpresentermngexport, mngExportFactory( "mngexport" ) ) -MngExport::MngExport(KoFilter *fil, const char *name, const QStringList&lst) +MngExport::MngExport(KoFilter *fil, const char *name, const TQStringList&lst) : ImageExport(fil,name,lst) { } @@ -58,7 +58,7 @@ bool MngExport::extraImageAttribute() } -bool MngExport::saveImage( QString fileName) +bool MngExport::saveImage( TQString fileName) { bool ret = pixmap.save( fileName, "MNG" ); // Save the image. diff --git a/filters/kpresenter/mng/mngexport.h b/filters/kpresenter/mng/mngexport.h index c479b1e0..6e5f9d4a 100644 --- a/filters/kpresenter/mng/mngexport.h +++ b/filters/kpresenter/mng/mngexport.h @@ -25,11 +25,12 @@ class MngExport : public ImageExport { Q_OBJECT + TQ_OBJECT public: - MngExport(KoFilter *parent, const char *name, const QStringList&); + MngExport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~MngExport(); - virtual bool saveImage( QString fileName); + virtual bool saveImage( TQString fileName); virtual bool extraImageAttribute(); virtual const char * exportFormat(); }; diff --git a/filters/kpresenter/ooimpress/ooimpressexport.cc b/filters/kpresenter/ooimpress/ooimpressexport.cc index 27d0781d..3e54a05f 100644 --- a/filters/kpresenter/ooimpress/ooimpressexport.cc +++ b/filters/kpresenter/ooimpress/ooimpressexport.cc @@ -19,9 +19,9 @@ #include "ooimpressexport.h" -#include -#include -#include +#include +#include +#include #include #include @@ -33,7 +33,7 @@ typedef KGenericFactory OoImpressExportFactory; K_EXPORT_COMPONENT_FACTORY( libooimpressexport, OoImpressExportFactory( "kofficefilters" ) ) -OoImpressExport::OoImpressExport( KoFilter *, const char *, const QStringList & ) +OoImpressExport::OoImpressExport( KoFilter *, const char *, const TQStringList & ) : KoFilter() , m_currentPage( 0 ) , m_objectIndex( 0 ) @@ -54,8 +54,8 @@ OoImpressExport::~OoImpressExport() delete m_storeinp; } -KoFilter::ConversionStatus OoImpressExport::convert( const QCString & from, - const QCString & to ) +KoFilter::ConversiontqStatus OoImpressExport::convert( const TQCString & from, + const TQCString & to ) { kdDebug(30518) << "Entering Ooimpress Export filter: " << from << " - " << to << endl; @@ -66,13 +66,13 @@ KoFilter::ConversionStatus OoImpressExport::convert( const QCString & from, } // read in the KPresenter file - KoFilter::ConversionStatus preStatus = openFile(); + KoFilter::ConversiontqStatus pretqStatus = openFile(); - if ( preStatus != KoFilter::OK ) - return preStatus; + if ( pretqStatus != KoFilter::OK ) + return pretqStatus; - QDomImplementation impl; - QDomDocument meta( impl.createDocumentType( "office:document-meta", + TQDomImplementation impl; + TQDomDocument meta( impl.createDocumentType( "office:document-meta", "-//OpenOffice.org//DTD OfficeDocument 1.0//EN", "office.dtd" ) ); @@ -93,12 +93,12 @@ KoFilter::ConversionStatus OoImpressExport::convert( const QCString & from, return KoFilter::CreationError; } - QCString metaString = meta.toCString(); + TQCString metaString = meta.toCString(); //kdDebug(30518) << "meta :" << metaString << endl; m_storeout->write( metaString , metaString.length() ); m_storeout->close(); - QDomDocument content( impl.createDocumentType( "office:document-content", + TQDomDocument content( impl.createDocumentType( "office:document-content", "-//OpenOffice.org//DTD OfficeDocument 1.0//EN", "office.dtd" ) ); @@ -114,12 +114,12 @@ KoFilter::ConversionStatus OoImpressExport::convert( const QCString & from, return KoFilter::CreationError; } - QCString contentString = content.toCString(); + TQCString contentString = content.toCString(); //kdDebug(30518) << "content :" << contentString << endl; m_storeout->write( contentString , contentString.length() ); m_storeout->close(); - QDomDocument settings( impl.createDocumentType( "office:document-content", + TQDomDocument settings( impl.createDocumentType( "office:document-content", "-//OpenOffice.org//DTD OfficeDocument 1.0//EN", "office.dtd" ) ); @@ -132,13 +132,13 @@ KoFilter::ConversionStatus OoImpressExport::convert( const QCString & from, return KoFilter::CreationError; } - QCString settingsString = settings.toCString(); + TQCString settingsString = settings.toCString(); //kdDebug(30518) << "content :" << settingsString << endl; m_storeout->write( settingsString , settingsString.length() ); m_storeout->close(); - QDomDocument styles( impl.createDocumentType( "office:document-styles", + TQDomDocument styles( impl.createDocumentType( "office:document-styles", "-//OpenOffice.org//DTD OfficeDocument 1.0//EN", "office.dtd" ) ); @@ -151,12 +151,12 @@ KoFilter::ConversionStatus OoImpressExport::convert( const QCString & from, return KoFilter::CreationError; } - QCString stylesString = styles.toCString(); + TQCString stylesString = styles.toCString(); //kdDebug(30518) << "styles :" << stylesString << endl; m_storeout->write( stylesString , stylesString.length() ); m_storeout->close(); - QDomDocument manifest( impl.createDocumentType( "manifest:manifest", + TQDomDocument manifest( impl.createDocumentType( "manifest:manifest", "-//OpenOffice.org//DTD Manifest 1.0//EN", "Manifest.dtd" ) ); @@ -170,7 +170,7 @@ KoFilter::ConversionStatus OoImpressExport::convert( const QCString & from, return KoFilter::CreationError; } - QCString manifestString = manifest.toCString(); + TQCString manifestString = manifest.toCString(); //kdDebug(30518) << "manifest :" << manifestString << endl; m_storeout->write( manifestString , manifestString.length() ); m_storeout->close(); @@ -178,7 +178,7 @@ KoFilter::ConversionStatus OoImpressExport::convert( const QCString & from, return KoFilter::OK; } -KoFilter::ConversionStatus OoImpressExport::openFile() +KoFilter::ConversiontqStatus OoImpressExport::openFile() { m_storeinp = KoStore::createStore( m_chain->inputFile(), KoStore::Read ); @@ -210,31 +210,31 @@ KoFilter::ConversionStatus OoImpressExport::openFile() return KoFilter::OK; } -void OoImpressExport::createDocumentMeta( QDomDocument & docmeta ) +void OoImpressExport::createDocumentMeta( TQDomDocument & docmeta ) { docmeta.appendChild( docmeta.createProcessingInstruction( "xml","version=\"1.0\" encoding=\"UTF-8\"" ) ); - QDomElement content = docmeta.createElement( "office:document-meta" ); + TQDomElement content = docmeta.createElement( "office:document-meta" ); content.setAttribute( "xmlns:office", "http://openoffice.org/2000/office" ); content.setAttribute( "xmlns:xlink", "http://www.w3.org/1999/xlink" ); content.setAttribute( "xmlns:dc", "http://purl.org/dc/elements/1.1/" ); content.setAttribute( "xmlns:meta", "http://openoffice.org/2000/meta" ); content.setAttribute( "office:version", "1.0" ); - QDomNode meta = docmeta.createElement( "office:meta" ); + TQDomNode meta = docmeta.createElement( "office:meta" ); - QDomElement generator = docmeta.createElement( "meta:generator" ); + TQDomElement generator = docmeta.createElement( "meta:generator" ); generator.appendChild( docmeta.createTextNode( "KPresenter 1.5" ) ); meta.appendChild( generator ); - QDomNode i = m_documentinfo.namedItem( "document-info" ); + TQDomNode i = m_documentinfo.namedItem( "document-info" ); if ( !i.isNull() ) { - QDomNode n = i.namedItem( "author" ).namedItem( "full-name" ); + TQDomNode n = i.namedItem( "author" ).namedItem( "full-name" ); if ( !n.isNull() ) { - QDomElement fullName = n.toElement(); - QDomElement creator = docmeta.createElement( "meta:initial-creator" ); + TQDomElement fullName = n.toElement(); + TQDomElement creator = docmeta.createElement( "meta:initial-creator" ); creator.appendChild( docmeta.createTextNode( fullName.text() ) ); meta.appendChild( creator ); @@ -245,16 +245,16 @@ void OoImpressExport::createDocumentMeta( QDomDocument & docmeta ) n = i.namedItem( "about" ).namedItem( "abstract" ); if ( !n.isNull() ) { - QDomElement user = docmeta.createElement( "dc:description" ); + TQDomElement user = docmeta.createElement( "dc:description" ); user.appendChild( n.firstChild() ); meta.appendChild( user ); } n = i.namedItem( "about" ).namedItem( "keyword" ); if ( !n.isNull() ) { - QDomElement text = n.toElement(); - QDomElement key = docmeta.createElement( "meta:keywords" ); - QDomElement keyword = docmeta.createElement( "meta:keyword" ); + TQDomElement text = n.toElement(); + TQDomElement key = docmeta.createElement( "meta:keywords" ); + TQDomElement keyword = docmeta.createElement( "meta:keyword" ); key.appendChild( keyword ); keyword.appendChild( docmeta.createTextNode( text.text() ) ); meta.appendChild( key ); @@ -262,22 +262,22 @@ void OoImpressExport::createDocumentMeta( QDomDocument & docmeta ) n = i.namedItem( "about" ).namedItem( "subject" ); if ( !n.isNull() ) { - QDomElement text = n.toElement(); - QDomElement subjet = docmeta.createElement( "dc:subject" ); + TQDomElement text = n.toElement(); + TQDomElement subjet = docmeta.createElement( "dc:subject" ); subjet.appendChild( docmeta.createTextNode( text.text() ) ); meta.appendChild( subjet ); } n = i.namedItem( "about" ).namedItem( "title" ); if ( !n.isNull() ) { - QDomElement text = n.toElement(); - QDomElement title = docmeta.createElement( "dc:title" ); + TQDomElement text = n.toElement(); + TQDomElement title = docmeta.createElement( "dc:title" ); title.appendChild( docmeta.createTextNode( text.text() ) ); meta.appendChild( title ); } } -// QDomElement statistic = docmeta.createElement( "meta:document-statistic" ); +// TQDomElement statistic = docmeta.createElement( "meta:document-statistic" ); // statistic.setAttribute( "meta:object-count", 0 ); // meta.appendChild( data ); @@ -285,11 +285,11 @@ void OoImpressExport::createDocumentMeta( QDomDocument & docmeta ) docmeta.appendChild( content ); } -void OoImpressExport::createDocumentStyles( QDomDocument & docstyles ) +void OoImpressExport::createDocumentStyles( TQDomDocument & docstyles ) { docstyles.appendChild( docstyles.createProcessingInstruction( "xml","version=\"1.0\" encoding=\"UTF-8\"" ) ); - QDomElement content = docstyles.createElement( "office:document-content" ); + TQDomElement content = docstyles.createElement( "office:document-content" ); content.setAttribute( "xmlns:office", "http://openoffice.org/2000/office" ); content.setAttribute( "xmlns:style", "http://openoffice.org/2000/style" ); content.setAttribute( "xmlns:text", "http://openoffice.org/2000/text" ); @@ -307,45 +307,45 @@ void OoImpressExport::createDocumentStyles( QDomDocument & docstyles ) content.setAttribute( "office:version", "1.0" ); // order important here! - QDomElement styles = docstyles.createElement( "office:styles" ); + TQDomElement styles = docstyles.createElement( "office:styles" ); m_styleFactory.addOfficeStyles( docstyles, styles ); content.appendChild( styles ); - QDomElement automatic = docstyles.createElement( "office:automatic-styles" ); + TQDomElement automatic = docstyles.createElement( "office:automatic-styles" ); m_styleFactory.addOfficeAutomatic( docstyles, automatic ); content.appendChild( automatic ); - QDomElement master = docstyles.createElement( "office:master-styles" ); + TQDomElement master = docstyles.createElement( "office:master-styles" ); m_styleFactory.addOfficeMaster( docstyles, master ); content.appendChild( master ); docstyles.appendChild( content ); } -void OoImpressExport::createDocumentSettings( QDomDocument & docsetting ) +void OoImpressExport::createDocumentSettings( TQDomDocument & docsetting ) { docsetting.appendChild( docsetting.createProcessingInstruction( "xml","version=\"1.0\" encoding=\"UTF-8\"" ) ); - QDomElement setting = docsetting.createElement( "office:document-settings" ); + TQDomElement setting = docsetting.createElement( "office:document-settings" ); setting.setAttribute( "xmlns:office", "http://openoffice.org/2000/office"); setting.setAttribute( "xmlns:config", "http://openoffice.org/2001/config" ); setting.setAttribute( "office:class", "presentation" ); setting.setAttribute( "office:version", "1.0" ); - QDomElement begin = docsetting.createElement( "office:settings" ); + TQDomElement begin = docsetting.createElement( "office:settings" ); - QDomElement configItem = docsetting.createElement("config:config-item-set" ); + TQDomElement configItem = docsetting.createElement("config:config-item-set" ); configItem.setAttribute( "config:name", "view-settings" ); - QDomElement mapIndexed = docsetting.createElement( "config:config-item-map-indexed" ); + TQDomElement mapIndexed = docsetting.createElement( "config:config-item-map-indexed" ); mapIndexed.setAttribute("config:name", "Views" ); configItem.appendChild( mapIndexed ); // - QDomElement mapItem = docsetting.createElement("config:config-item-map-entry" ); + TQDomElement mapItem = docsetting.createElement("config:config-item-map-entry" ); - QDomElement attribute = docsetting.createElement("config:config-item" ); + TQDomElement attribute = docsetting.createElement("config:config-item" ); attribute.setAttribute( "config:name", "SnapLinesDrawing" ); attribute.setAttribute( "config:type", "string" ); attribute.appendChild( docsetting.createTextNode( m_helpLine ) ); @@ -363,7 +363,7 @@ void OoImpressExport::createDocumentSettings( QDomDocument & docsetting ) attribute = docsetting.createElement("config:config-item" ); attribute.setAttribute( "config:name", "GridFineWidth" ); attribute.setAttribute( "config:type", "int" ); - attribute.appendChild( docsetting.createTextNode( QString::number( ( int ) ( KoUnit::toMM( ( m_gridX ) )*100 ) ) ) ); + attribute.appendChild( docsetting.createTextNode( TQString::number( ( int ) ( KoUnit::toMM( ( m_gridX ) )*100 ) ) ) ); mapItem.appendChild( attribute ); } @@ -372,14 +372,14 @@ void OoImpressExport::createDocumentSettings( QDomDocument & docsetting ) attribute = docsetting.createElement("config:config-item" ); attribute.setAttribute( "config:name", "GridFineHeight" ); attribute.setAttribute( "config:type", "int" ); - attribute.appendChild( docsetting.createTextNode( QString::number( ( int ) ( KoUnit::toMM( ( m_gridY ) )*100 ) ) ) ); + attribute.appendChild( docsetting.createTextNode( TQString::number( ( int ) ( KoUnit::toMM( ( m_gridY ) )*100 ) ) ) ); mapItem.appendChild( attribute ); } attribute = docsetting.createElement("config:config-item" ); attribute.setAttribute( "config:name", "SelectedPage" ); attribute.setAttribute( "config:type", "short" ); - attribute.appendChild( docsetting.createTextNode( QString::number( m_activePage ) ) ); + attribute.appendChild( docsetting.createTextNode( TQString::number( m_activePage ) ) ); mapItem.appendChild( attribute ); @@ -394,11 +394,11 @@ void OoImpressExport::createDocumentSettings( QDomDocument & docsetting ) } -void OoImpressExport::createDocumentContent( QDomDocument & doccontent ) +void OoImpressExport::createDocumentContent( TQDomDocument & doccontent ) { doccontent.appendChild( doccontent.createProcessingInstruction( "xml","version=\"1.0\" encoding=\"UTF-8\"" ) ); - QDomElement content = doccontent.createElement( "office:document-content" ); + TQDomElement content = doccontent.createElement( "office:document-content" ); content.setAttribute( "xmlns:office", "http://openoffice.org/2000/office"); content.setAttribute( "xmlns:style", "http://openoffice.org/2000/style" ); content.setAttribute( "xmlns:text", "http://openoffice.org/2000/text" ); @@ -417,32 +417,32 @@ void OoImpressExport::createDocumentContent( QDomDocument & doccontent ) content.setAttribute( "office:class", "presentation" ); content.setAttribute( "office:version", "1.0" ); - QDomElement script = doccontent.createElement( "office:script" ); + TQDomElement script = doccontent.createElement( "office:script" ); content.appendChild( script ); m_styles = doccontent.createElement( "office:automatic-styles" ); content.appendChild( m_styles ); - QDomElement body = doccontent.createElement( "office:body" ); + TQDomElement body = doccontent.createElement( "office:body" ); exportBody( doccontent, body ); content.appendChild( body ); doccontent.appendChild( content ); } -void OoImpressExport::createDocumentManifest( QDomDocument & docmanifest ) +void OoImpressExport::createDocumentManifest( TQDomDocument & docmanifest ) { docmanifest.appendChild( docmanifest.createProcessingInstruction( "xml","version=\"1.0\" encoding=\"UTF-8\"" ) ); - QDomElement manifest = docmanifest.createElement( "manifest:manifest" ); + TQDomElement manifest = docmanifest.createElement( "manifest:manifest" ); manifest.setAttribute( "xmlns:manifest", "http://openoffice.org/2001/manifest" ); - QDomElement entry = docmanifest.createElement( "manifest:file-entry" ); + TQDomElement entry = docmanifest.createElement( "manifest:file-entry" ); entry.setAttribute( "manifest:media-type", "application/vnd.sun.xml.impress" ); entry.setAttribute( "manifest:full-path", "/" ); manifest.appendChild( entry ); - QMap::Iterator it; + TQMap::Iterator it; for ( it = m_pictureLst.begin(); it != m_pictureLst.end(); ++it ) { entry = docmanifest.createElement( "manifest:file-entry" ); @@ -474,7 +474,7 @@ void OoImpressExport::createDocumentManifest( QDomDocument & docmanifest ) docmanifest.appendChild( manifest ); } -QString OoImpressExport::pictureKey( QDomElement &elem ) +TQString OoImpressExport::pictureKey( TQDomElement &elem ) { // Default date/time is the *nix epoch: 1970-01-01 00:00:00,000 int year=1970, month=1, day=1; @@ -496,20 +496,20 @@ QString OoImpressExport::pictureKey( QDomElement &elem ) if( elem.hasAttribute( "msec" ) ) msec=elem.attribute( "msec" ).toInt(); } - QDateTime key; - key.setDate( QDate( year, month, day ) ); - key.setTime( QTime( hour, minute, second, msec ) ); + TQDateTime key; + key.setDate( TQDate( year, month, day ) ); + key.setTime( TQTime( hour, minute, second, msec ) ); return key.toString(); } -void OoImpressExport::createPictureList( QDomNode &pictures ) +void OoImpressExport::createPictureList( TQDomNode &pictures ) { pictures = pictures.firstChild(); for( ; !pictures.isNull(); pictures = pictures.nextSibling() ) { if ( pictures.isElement() ) { - QDomElement element = pictures.toElement(); + TQDomElement element = pictures.toElement(); if ( element.tagName() == "KEY" ) { //kdDebug(30518)<<"element.attribute( name ) :"< + // - QStringList text = QStringList::split( "\n", noteText ); - for ( QStringList::Iterator it = text.begin(); it != text.end(); ++it ) { - QDomElement tmp = doc.createElement( "text:p" ); + TQStringList text = TQStringList::split( "\n", noteText ); + for ( TQStringList::Iterator it = text.begin(); it != text.end(); ++it ) { + TQDomElement tmp = doc.createElement( "text:p" ); tmp.appendChild( doc.createTextNode( *it ) ); noteTextBox.appendChild( tmp ); } @@ -770,64 +770,64 @@ void OoImpressExport::appendNote( QDomDocument & doc, QDomElement & source, QDom target.appendChild( noteElement ); } -void OoImpressExport::appendTextbox( QDomDocument & doc, QDomElement & source, QDomElement & target ) +void OoImpressExport::appendTextbox( TQDomDocument & doc, TQDomElement & source, TQDomElement & target ) { - QDomElement textbox = doc.createElement( "draw:text-box" ); + TQDomElement textbox = doc.createElement( "draw:text-box" ); - QDomNode textobject = source.namedItem( "TEXTOBJ" ); + TQDomNode textobject = source.namedItem( "TEXTOBJ" ); // create the graphic style - QString gs = m_styleFactory.createGraphicStyle( source ); + TQString gs = m_styleFactory.createGraphicStyle( source ); textbox.setAttribute( "draw:style-name", gs ); - // set the geometry + // set the tqgeometry set2DGeometry( source, textbox ); // parse every paragraph - for ( QDomNode paragraph = textobject.firstChild(); !paragraph.isNull(); + for ( TQDomNode paragraph = textobject.firstChild(); !paragraph.isNull(); paragraph = paragraph.nextSibling() ) { - QDomElement p = paragraph.toElement(); + TQDomElement p = paragraph.toElement(); appendParagraph( doc, p, textbox ); } target.appendChild( textbox ); } -void OoImpressExport::appendParagraph( QDomDocument & doc, QDomElement & source, QDomElement & target ) +void OoImpressExport::appendParagraph( TQDomDocument & doc, TQDomElement & source, TQDomElement & target ) { - QDomElement paragraph = doc.createElement( "text:p" ); + TQDomElement paragraph = doc.createElement( "text:p" ); // create the paragraph style - QString ps = m_styleFactory.createParagraphStyle( source ); + TQString ps = m_styleFactory.createParagraphStyle( source ); paragraph.setAttribute( "text:style-name", ps ); // parse every text element - for ( QDomNode text = source.firstChild(); !text.isNull(); + for ( TQDomNode text = source.firstChild(); !text.isNull(); text = text.nextSibling() ) { if ( text.nodeName() == "TEXT" ) { - QDomElement t = text.toElement(); + TQDomElement t = text.toElement(); appendText( doc, t, paragraph ); } } // take care of lists - QDomNode counter = source.namedItem( "COUNTER" ); + TQDomNode counter = source.namedItem( "COUNTER" ); if ( !counter.isNull() ) { - QDomElement c = counter.toElement(); + TQDomElement c = counter.toElement(); int type = c.attribute( "type" ).toInt(); int level = 1; if ( c.hasAttribute( "depth" ) ) level = c.attribute( "depth" ).toInt() + 1; - QDomElement endOfList = target; + TQDomElement endOfList = target; for ( int l = 0; l < level; l++ ) { - QDomElement list; + TQDomElement list; if ( type == 1 ) { list = doc.createElement( "text:ordered-list" ); @@ -839,11 +839,11 @@ void OoImpressExport::appendParagraph( QDomDocument & doc, QDomElement & source, if ( l == 0 ) { // create the list style - QString ls = m_styleFactory.createListStyle( c ); + TQString ls = m_styleFactory.createListStyle( c ); list.setAttribute( "text:style-name", ls ); } - QDomElement item = doc.createElement( "text:list-item" ); + TQDomElement item = doc.createElement( "text:list-item" ); list.appendChild( item ); endOfList.appendChild( list ); endOfList = item; @@ -855,28 +855,28 @@ void OoImpressExport::appendParagraph( QDomDocument & doc, QDomElement & source, target.appendChild( paragraph ); } -void OoImpressExport::appendText( QDomDocument & doc, QDomElement & source, QDomElement & target ) +void OoImpressExport::appendText( TQDomDocument & doc, TQDomElement & source, TQDomElement & target ) { - QDomElement textspan = doc.createElement( "text:span" ); + TQDomElement textspan = doc.createElement( "text:span" ); // create the text style - QString ts = m_styleFactory.createTextStyle( source ); + TQString ts = m_styleFactory.createTextStyle( source ); textspan.setAttribute( "text:style-name", ts ); textspan.appendChild( doc.createTextNode( source.text() ) ); target.appendChild( textspan ); } -void OoImpressExport::appendPicture( QDomDocument & doc, QDomElement & source, QDomElement & target ) +void OoImpressExport::appendPicture( TQDomDocument & doc, TQDomElement & source, TQDomElement & target ) { - QDomElement image = doc.createElement( "draw:image" ); + TQDomElement image = doc.createElement( "draw:image" ); // create the graphic style - QString gs = m_styleFactory.createGraphicStyle( source ); + TQString gs = m_styleFactory.createGraphicStyle( source ); image.setAttribute( "draw:style-name", gs ); - QDomElement key = source.namedItem( "KEY" ).toElement(); + TQDomElement key = source.namedItem( "KEY" ).toElement(); - QString pictureName = QString( "Picture/Picture%1" ).arg( m_pictureIndex ); + TQString pictureName = TQString( "Picture/Picture%1" ).tqarg( m_pictureIndex ); image.setAttribute( "xlink:type", "simple" ); image.setAttribute( "xlink:show", "embed" ); @@ -884,12 +884,12 @@ void OoImpressExport::appendPicture( QDomDocument & doc, QDomElement & source, Q if ( !key.isNull() ) { - QString str = pictureKey( key ); - QString returnstr = m_kpresenterPictureLst[str]; - const int pos=returnstr.findRev('.'); + TQString str = pictureKey( key ); + TQString returnstr = m_kpresenterPictureLst[str]; + const int pos=returnstr.tqfindRev('.'); if (pos!=-1) { - const QString extension( returnstr.mid(pos+1) ); + const TQString extension( returnstr.mid(pos+1) ); pictureName +="."+extension; } @@ -897,7 +897,7 @@ void OoImpressExport::appendPicture( QDomDocument & doc, QDomElement & source, Q { if ( m_storeout->open( pictureName ) ) { - QByteArray data(8*1024); + TQByteArray data(8*1024); uint total = 0; for ( int block = 0; ( block = m_storeinp->read(data.data(), data.size()) ) > 0; total += block ) @@ -909,7 +909,7 @@ void OoImpressExport::appendPicture( QDomDocument & doc, QDomElement & source, Q } image.setAttribute( "xlink:href", "#" + pictureName ); -// set the geometry +// set the tqgeometry set2DGeometry( source, image ); target.appendChild( image ); @@ -919,94 +919,94 @@ void OoImpressExport::appendPicture( QDomDocument & doc, QDomElement & source, Q } -void OoImpressExport::appendLine( QDomDocument & doc, QDomElement & source, QDomElement & target ) +void OoImpressExport::appendLine( TQDomDocument & doc, TQDomElement & source, TQDomElement & target ) { - QDomElement line = doc.createElement( "draw:line" ); + TQDomElement line = doc.createElement( "draw:line" ); // create the graphic style - QString gs = m_styleFactory.createGraphicStyle( source ); + TQString gs = m_styleFactory.createGraphicStyle( source ); line.setAttribute( "draw:style-name", gs ); - // set the geometry + // set the tqgeometry setLineGeometry( source, line ); target.appendChild( line ); } -void OoImpressExport::appendRectangle( QDomDocument & doc, QDomElement & source, QDomElement & target ) +void OoImpressExport::appendRectangle( TQDomDocument & doc, TQDomElement & source, TQDomElement & target ) { - QDomElement rectangle = doc.createElement( "draw:rect" ); + TQDomElement rectangle = doc.createElement( "draw:rect" ); // create the graphic style - QString gs = m_styleFactory.createGraphicStyle( source ); + TQString gs = m_styleFactory.createGraphicStyle( source ); rectangle.setAttribute( "draw:style-name", gs ); - // set the geometry + // set the tqgeometry set2DGeometry( source, rectangle ); target.appendChild( rectangle ); } -void OoImpressExport::appendPolyline( QDomDocument & doc, QDomElement & source, QDomElement & target, bool _poly) +void OoImpressExport::appendPolyline( TQDomDocument & doc, TQDomElement & source, TQDomElement & target, bool _poly) { - QDomElement polyline = doc.createElement( _poly ? "draw:polygon" : "draw:polyline" ); + TQDomElement polyline = doc.createElement( _poly ? "draw:polygon" : "draw:polyline" ); // create the graphic style - QString gs = m_styleFactory.createGraphicStyle( source ); + TQString gs = m_styleFactory.createGraphicStyle( source ); polyline.setAttribute( "draw:style-name", gs ); - // set the geometry + // set the tqgeometry set2DGeometry( source, polyline, false, true /*multipoint*/ ); target.appendChild( polyline ); } -void OoImpressExport::appendEllipse( QDomDocument & doc, QDomElement & source, QDomElement & target, bool pieObject ) +void OoImpressExport::appendEllipse( TQDomDocument & doc, TQDomElement & source, TQDomElement & target, bool pieObject ) { - QDomElement size = source.namedItem( "SIZE" ).toElement(); + TQDomElement size = source.namedItem( "SIZE" ).toElement(); double width = size.attribute( "width" ).toDouble(); double height = size.attribute( "height" ).toDouble(); - QDomElement ellipse = doc.createElement( (width == height) ? "draw:circle" : "draw:ellipse" ); + TQDomElement ellipse = doc.createElement( (width == height) ? "draw:circle" : "draw:ellipse" ); // create the graphic style - QString gs = m_styleFactory.createGraphicStyle( source ); + TQString gs = m_styleFactory.createGraphicStyle( source ); ellipse.setAttribute( "draw:style-name", gs ); - // set the geometry + // set the tqgeometry set2DGeometry( source, ellipse, pieObject ); target.appendChild( ellipse ); } -void OoImpressExport::set2DGeometry( QDomElement & source, QDomElement & target, bool pieObject, bool multiPoint ) +void OoImpressExport::set2DGeometry( TQDomElement & source, TQDomElement & target, bool pieObject, bool multiPoint ) { - QDomElement orig = source.namedItem( "ORIG" ).toElement(); - QDomElement size = source.namedItem( "SIZE" ).toElement(); - QDomElement name = source.namedItem( "OBJECTNAME").toElement(); + TQDomElement orig = source.namedItem( "ORIG" ).toElement(); + TQDomElement size = source.namedItem( "SIZE" ).toElement(); + TQDomElement name = source.namedItem( "OBJECTNAME").toElement(); float y = orig.attribute( "y" ).toFloat(); y -= m_pageHeight * ( m_currentPage - 1 ); - QDomElement angle = source.namedItem( "ANGLE").toElement(); + TQDomElement angle = source.namedItem( "ANGLE").toElement(); if ( !angle.isNull() ) { - QString returnAngle = rotateValue( angle.attribute( "value" ).toDouble() ); + TQString returnAngle = rotateValue( angle.attribute( "value" ).toDouble() ); if ( !returnAngle.isEmpty() ) target.setAttribute("draw:transform",returnAngle ); } - target.setAttribute( "draw:id", QString::number( m_objectIndex ) ); + target.setAttribute( "draw:id", TQString::number( m_objectIndex ) ); target.setAttribute( "svg:x", StyleFactory::toCM( orig.attribute( "x" ) ) ); - target.setAttribute( "svg:y", QString( "%1cm" ).arg( KoUnit::toCM( y ) ) ); + target.setAttribute( "svg:y", TQString( "%1cm" ).tqarg( KoUnit::toCM( y ) ) ); target.setAttribute( "svg:width", StyleFactory::toCM( size.attribute( "width" ) ) ); target.setAttribute( "svg:height", StyleFactory::toCM( size.attribute( "height" ) ) ); - QString nameStr = name.attribute("objectName"); + TQString nameStr = name.attribute("objectName"); if( !nameStr.isEmpty() ) target.setAttribute( "draw:name", nameStr ); if ( pieObject ) { - QDomElement pie = source.namedItem( "PIETYPE").toElement(); + TQDomElement pie = source.namedItem( "PIETYPE").toElement(); if( !pie.isNull() ) { int typePie = pie.attribute("value").toInt(); @@ -1028,7 +1028,7 @@ void OoImpressExport::set2DGeometry( QDomElement & source, QDomElement & target, } else target.setAttribute( "draw:kind", "section");//by default - QDomElement pieAngle = source.namedItem( "PIEANGLE").toElement(); + TQDomElement pieAngle = source.namedItem( "PIEANGLE").toElement(); int startangle = 45; if( !pieAngle.isNull() ) { @@ -1040,7 +1040,7 @@ void OoImpressExport::set2DGeometry( QDomElement & source, QDomElement & target, //default value take it into kppieobject target.setAttribute( "draw:start-angle", 45 ); } - QDomElement pieLength = source.namedItem( "PIELENGTH").toElement(); + TQDomElement pieLength = source.namedItem( "PIELENGTH").toElement(); if( !pieLength.isNull() ) { int value = pieLength.attribute("value").toInt(); @@ -1058,10 +1058,10 @@ void OoImpressExport::set2DGeometry( QDomElement & source, QDomElement & target, if ( multiPoint ) { //loadPoint - QDomElement point = source.namedItem( "POINTS" ).toElement(); + TQDomElement point = source.namedItem( "POINTS" ).toElement(); if ( !point.isNull() ) { - QDomElement elemPoint = point.firstChild().toElement(); - QString listOfPoint; + TQDomElement elemPoint = point.firstChild().toElement(); + TQString listOfPoint; int maxX=0; int maxY=0; while ( !elemPoint.isNull() ) { @@ -1073,42 +1073,42 @@ void OoImpressExport::set2DGeometry( QDomElement & source, QDomElement & target, if( elemPoint.hasAttribute( "point_y" ) ) tmpY = ( int ) ( KoUnit::toMM(elemPoint.attribute( "point_y" ).toDouble() )*100 ); if ( !listOfPoint.isEmpty() ) - listOfPoint += QString( " %1,%2" ).arg( tmpX ).arg( tmpY ); + listOfPoint += TQString( " %1,%2" ).tqarg( tmpX ).tqarg( tmpY ); else - listOfPoint = QString( "%1,%2" ).arg( tmpX ).arg( tmpY ); - maxX = QMAX( maxX, tmpX ); - maxY = QMAX( maxY, tmpY ); + listOfPoint = TQString( "%1,%2" ).tqarg( tmpX ).tqarg( tmpY ); + maxX = TQMAX( maxX, tmpX ); + maxY = TQMAX( maxY, tmpY ); } elemPoint = elemPoint.nextSibling().toElement(); } target.setAttribute( "draw:points", listOfPoint ); - target.setAttribute( "svg:viewBox", QString( "0 0 %1 %2" ).arg( maxX ).arg( maxY ) ); + target.setAttribute( "svg:viewBox", TQString( "0 0 %1 %2" ).tqarg( maxX ).tqarg( maxY ) ); } } } -QString OoImpressExport::rotateValue( double val ) +TQString OoImpressExport::rotateValue( double val ) { - QString str; + TQString str; if ( val!=0.0 ) { double value = -1 * ( ( double )val* M_PI )/180.0; - str=QString( "rotate (%1)" ).arg( value ); + str=TQString( "rotate (%1)" ).tqarg( value ); } return str; } -void OoImpressExport::setLineGeometry( QDomElement & source, QDomElement & target ) +void OoImpressExport::setLineGeometry( TQDomElement & source, TQDomElement & target ) { - QDomElement orig = source.namedItem( "ORIG" ).toElement(); - QDomElement size = source.namedItem( "SIZE" ).toElement(); - QDomElement linetype = source.namedItem( "LINETYPE" ).toElement(); - QDomElement name = source.namedItem( "OBJECTNAME").toElement(); - QDomElement angle = source.namedItem( "ANGLE").toElement(); + TQDomElement orig = source.namedItem( "ORIG" ).toElement(); + TQDomElement size = source.namedItem( "SIZE" ).toElement(); + TQDomElement linetype = source.namedItem( "LINETYPE" ).toElement(); + TQDomElement name = source.namedItem( "OBJECTNAME").toElement(); + TQDomElement angle = source.namedItem( "ANGLE").toElement(); if ( !angle.isNull() ) { - QString returnAngle = rotateValue( angle.attribute( "value" ).toDouble() ); + TQString returnAngle = rotateValue( angle.attribute( "value" ).toDouble() ); if ( !returnAngle.isEmpty() ) target.setAttribute("draw:transform",returnAngle ); } @@ -1123,36 +1123,36 @@ void OoImpressExport::setLineGeometry( QDomElement & source, QDomElement & targe x2 += x1; y2 += y1; - target.setAttribute( "draw:id", QString::number( m_objectIndex ) ); - QString xpos1 = StyleFactory::toCM( orig.attribute( "x" ) ); - QString xpos2 = QString( "%1cm" ).arg( KoUnit::toCM( x2 ) ); + target.setAttribute( "draw:id", TQString::number( m_objectIndex ) ); + TQString xpos1 = StyleFactory::toCM( orig.attribute( "x" ) ); + TQString xpos2 = TQString( "%1cm" ).tqarg( KoUnit::toCM( x2 ) ); if ( type == 0 ) { - target.setAttribute( "svg:y1", QString( "%1cm" ).arg( KoUnit::toCM( y2/2.0 ) ) ); - target.setAttribute( "svg:y2", QString( "%1cm" ).arg( KoUnit::toCM( y2/2.0 ) ) ); + target.setAttribute( "svg:y1", TQString( "%1cm" ).tqarg( KoUnit::toCM( y2/2.0 ) ) ); + target.setAttribute( "svg:y2", TQString( "%1cm" ).tqarg( KoUnit::toCM( y2/2.0 ) ) ); } else if ( type == 1 ) { - target.setAttribute( "svg:y1", QString( "%1cm" ).arg( KoUnit::toCM( y1 ) ) ); - target.setAttribute( "svg:y2", QString( "%1cm" ).arg( KoUnit::toCM( y2 ) ) ); - xpos1 = QString( "%1cm" ).arg( KoUnit::toCM( x1/2.0 ) ); + target.setAttribute( "svg:y1", TQString( "%1cm" ).tqarg( KoUnit::toCM( y1 ) ) ); + target.setAttribute( "svg:y2", TQString( "%1cm" ).tqarg( KoUnit::toCM( y2 ) ) ); + xpos1 = TQString( "%1cm" ).tqarg( KoUnit::toCM( x1/2.0 ) ); xpos2 = xpos1; } else if ( type == 3 ) // from left bottom to right top { - target.setAttribute( "svg:y1", QString( "%1cm" ).arg( KoUnit::toCM( y2 ) ) ); - target.setAttribute( "svg:y2", QString( "%1cm" ).arg( KoUnit::toCM( y1 ) ) ); + target.setAttribute( "svg:y1", TQString( "%1cm" ).tqarg( KoUnit::toCM( y2 ) ) ); + target.setAttribute( "svg:y2", TQString( "%1cm" ).tqarg( KoUnit::toCM( y1 ) ) ); } else // from left top to right bottom { - target.setAttribute( "svg:y1", QString( "%1cm" ).arg( KoUnit::toCM( y1 ) ) ); - target.setAttribute( "svg:y2", QString( "%1cm" ).arg( KoUnit::toCM( y2 ) ) ); + target.setAttribute( "svg:y1", TQString( "%1cm" ).tqarg( KoUnit::toCM( y1 ) ) ); + target.setAttribute( "svg:y2", TQString( "%1cm" ).tqarg( KoUnit::toCM( y2 ) ) ); } target.setAttribute( "svg:x1", xpos1 ); target.setAttribute( "svg:x2", xpos2 ); - QString nameStr = name.attribute("objectName"); + TQString nameStr = name.attribute("objectName"); if( !nameStr.isEmpty() ) target.setAttribute( "draw:name", nameStr ); } diff --git a/filters/kpresenter/ooimpress/ooimpressexport.h b/filters/kpresenter/ooimpress/ooimpressexport.h index 9ab3d153..3b1e7b79 100644 --- a/filters/kpresenter/ooimpress/ooimpressexport.h +++ b/filters/kpresenter/ooimpress/ooimpressexport.h @@ -22,68 +22,69 @@ #include "stylefactory.h" -#include +#include #include -class QDomElement; +class TQDomElement; class KoStore; class OoImpressExport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - OoImpressExport( KoFilter * parent, const char * name, const QStringList & ); + OoImpressExport( KoFilter * tqparent, const char * name, const TQStringList & ); virtual ~OoImpressExport(); - virtual KoFilter::ConversionStatus convert( const QCString & from, - const QCString & to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString & from, + const TQCString & to ); private: - KoFilter::ConversionStatus openFile(); - - void exportBody( QDomDocument & doccontent, QDomElement & body ); - void createDocumentMeta( QDomDocument & docmeta ); - void createDocumentStyles( QDomDocument & docstyles ); - void createDocumentContent( QDomDocument & doccontent ); - void createDocumentManifest( QDomDocument & docmanifest ); - void createDocumentSettings( QDomDocument & docsetting ); - void appendTextbox( QDomDocument & doc, QDomElement & source, QDomElement & target ); - void appendParagraph( QDomDocument & doc, QDomElement & source, QDomElement & target ); - void appendText( QDomDocument & doc, QDomElement & source, QDomElement & target ); - void appendLine( QDomDocument & doc, QDomElement & source, QDomElement & target ); - void appendRectangle( QDomDocument & doc, QDomElement & source, QDomElement & target ); - void appendEllipse( QDomDocument & doc, QDomElement & source, QDomElement & target, bool pieObject = false ); - void set2DGeometry( QDomElement & source, QDomElement & target, bool pieObject = false, bool multiPoint = false ); - void setLineGeometry( QDomElement & source, QDomElement & target ); - void appendPolyline( QDomDocument & doc, QDomElement & source, QDomElement & target, bool polygone = false); - void appendPicture( QDomDocument & doc, QDomElement & source, QDomElement & target ); - void createPictureList( QDomNode &pictures ); - void appendNote( QDomDocument & doc, QDomElement & source, QDomElement & target ); - void appendGroupObject( QDomDocument & doc, QDomElement & source, QDomElement & target ); - QString rotateValue( double val ); - QString pictureKey( QDomElement &element ); - void createHelpLine( QDomNode &helpline ); - void createAttribute( QDomNode &attributeValue ); - void appendObjects(QDomDocument & doccontent, QDomNode &objects, QDomElement &drawPage); + KoFilter::ConversiontqStatus openFile(); + + void exportBody( TQDomDocument & doccontent, TQDomElement & body ); + void createDocumentMeta( TQDomDocument & docmeta ); + void createDocumentStyles( TQDomDocument & docstyles ); + void createDocumentContent( TQDomDocument & doccontent ); + void createDocumentManifest( TQDomDocument & docmanifest ); + void createDocumentSettings( TQDomDocument & docsetting ); + void appendTextbox( TQDomDocument & doc, TQDomElement & source, TQDomElement & target ); + void appendParagraph( TQDomDocument & doc, TQDomElement & source, TQDomElement & target ); + void appendText( TQDomDocument & doc, TQDomElement & source, TQDomElement & target ); + void appendLine( TQDomDocument & doc, TQDomElement & source, TQDomElement & target ); + void appendRectangle( TQDomDocument & doc, TQDomElement & source, TQDomElement & target ); + void appendEllipse( TQDomDocument & doc, TQDomElement & source, TQDomElement & target, bool pieObject = false ); + void set2DGeometry( TQDomElement & source, TQDomElement & target, bool pieObject = false, bool multiPoint = false ); + void setLineGeometry( TQDomElement & source, TQDomElement & target ); + void appendPolyline( TQDomDocument & doc, TQDomElement & source, TQDomElement & target, bool polygone = false); + void appendPicture( TQDomDocument & doc, TQDomElement & source, TQDomElement & target ); + void createPictureList( TQDomNode &pictures ); + void appendNote( TQDomDocument & doc, TQDomElement & source, TQDomElement & target ); + void appendGroupObject( TQDomDocument & doc, TQDomElement & source, TQDomElement & target ); + TQString rotateValue( double val ); + TQString pictureKey( TQDomElement &element ); + void createHelpLine( TQDomNode &helpline ); + void createAttribute( TQDomNode &attributeValue ); + void appendObjects(TQDomDocument & doccontent, TQDomNode &objects, TQDomElement &drawPage); int m_currentPage; int m_objectIndex; float m_pageHeight; StyleFactory m_styleFactory; - QString m_masterPageStyle; - QDomElement m_styles; - QDomDocument m_maindoc; - QDomDocument m_documentinfo; - QMap m_pictureLst; + TQString m_masterPageStyle; + TQDomElement m_styles; + TQDomDocument m_maindoc; + TQDomDocument m_documentinfo; + TQMap m_pictureLst; - QString m_helpLine; + TQString m_helpLine; int m_activePage; double m_gridX, m_gridY; bool m_snapToGrid; //load from kpresenter file format - QMap m_kpresenterPictureLst; + TQMap m_kpresenterPictureLst; int m_pictureIndex; KoStore *m_storeinp; KoStore *m_storeout; diff --git a/filters/kpresenter/ooimpress/ooimpressimport.cc b/filters/kpresenter/ooimpress/ooimpressimport.cc index be6c094d..8ca41b2a 100644 --- a/filters/kpresenter/ooimpress/ooimpressimport.cc +++ b/filters/kpresenter/ooimpress/ooimpressimport.cc @@ -23,10 +23,10 @@ #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -46,7 +46,7 @@ typedef KGenericFactory OoImpressImportFactory; K_EXPORT_COMPONENT_FACTORY( libooimpressimport, OoImpressImportFactory( "kofficefilters" ) ) -OoImpressImport::OoImpressImport( KoFilter *, const char *, const QStringList & ) +OoImpressImport::OoImpressImport( KoFilter *, const char *, const TQStringList & ) : KoFilter(), m_numPicture( 1 ), m_numSound(1), @@ -59,7 +59,7 @@ OoImpressImport::OoImpressImport( KoFilter *, const char *, const QStringList & OoImpressImport::~OoImpressImport() { - QDictIterator it( m_animations ); // See QDictIterator + TQDictIterator it( m_animations ); // See TQDictIterator for( ; it.current(); ++it ) { delete it.current()->element; @@ -67,7 +67,7 @@ OoImpressImport::~OoImpressImport() m_animations.clear(); } -KoFilter::ConversionStatus OoImpressImport::convert( QCString const & from, QCString const & to ) +KoFilter::ConversiontqStatus OoImpressImport::convert( TQCString const & from, TQCString const & to ) { kdDebug(30518) << "Entering Ooimpress Import filter: " << from << " - " << to << endl; @@ -87,36 +87,36 @@ KoFilter::ConversionStatus OoImpressImport::convert( QCString const & from, QCSt return KoFilter::FileNotFound; } - KoFilter::ConversionStatus preStatus = openFile(); + KoFilter::ConversiontqStatus pretqStatus = openFile(); - if ( preStatus != KoFilter::OK ) + if ( pretqStatus != KoFilter::OK ) { m_zip->close(); delete m_zip; - return preStatus; + return pretqStatus; } - QDomDocument docinfo; + TQDomDocument docinfo; createDocumentInfo( docinfo ); // store document info KoStoreDevice* out = m_chain->storageFile( "documentinfo.xml", KoStore::Write ); if( out ) { - QCString info = docinfo.toCString(); + TQCString info = docinfo.toCString(); //kdDebug(30518) << " info :" << info << endl; - // WARNING: we cannot use KoStore::write(const QByteArray&) because it gives an extra NULL character at the end. + // WARNING: we cannot use KoStore::write(const TQByteArray&) because it gives an extra NULL character at the end. out->writeBlock( info , info.length() ); } - QDomDocument doccontent; + TQDomDocument doccontent; createDocumentContent( doccontent ); // store document content out = m_chain->storageFile( "maindoc.xml", KoStore::Write ); if( out ) { - QCString content = doccontent.toCString(); + TQCString content = doccontent.toCString(); kdDebug(30518) << " content :" << content << endl; out->writeBlock( content , content.length() ); } @@ -129,9 +129,9 @@ KoFilter::ConversionStatus OoImpressImport::convert( QCString const & from, QCSt } // Very related to OoWriterImport::openFile() -KoFilter::ConversionStatus OoImpressImport::openFile() +KoFilter::ConversiontqStatus OoImpressImport::openFile() { - KoFilter::ConversionStatus status = loadAndParse( "content.xml", m_content ); + KoFilter::ConversiontqStatus status = loadAndParse( "content.xml", m_content ); if ( status != KoFilter::OK ) { kdError(30518) << "Content.xml could not be parsed correctly! Aborting!" << endl; @@ -139,7 +139,7 @@ KoFilter::ConversionStatus OoImpressImport::openFile() } // We do not stop if the following calls fail. - QDomDocument styles; + TQDomDocument styles; loadAndParse( "styles.xml", styles ); loadAndParse( "meta.xml", m_meta ); loadAndParse( "settings.xml", m_settings ); @@ -150,13 +150,13 @@ KoFilter::ConversionStatus OoImpressImport::openFile() return KoFilter::OK; } -KoFilter::ConversionStatus OoImpressImport::loadAndParse(const QString& filename, QDomDocument& doc) +KoFilter::ConversiontqStatus OoImpressImport::loadAndParse(const TQString& filename, TQDomDocument& doc) { return OoUtils::loadAndParse( filename, doc, m_zip); } // Very related to OoWriterImport::createDocumentInfo -void OoImpressImport::createDocumentInfo( QDomDocument &docinfo ) +void OoImpressImport::createDocumentInfo( TQDomDocument &docinfo ) { docinfo = KoDocument::createDomDocument( "document-info" /*DTD name*/, "document-info" /*tag name*/, "1.1" ); @@ -164,60 +164,60 @@ void OoImpressImport::createDocumentInfo( QDomDocument &docinfo ) //kdDebug(30518) << " meta-info :" << m_meta.toCString() << endl; } -void OoImpressImport::createDocumentContent( QDomDocument &doccontent ) +void OoImpressImport::createDocumentContent( TQDomDocument &doccontent ) { - QDomDocument doc = KoDocument::createDomDocument( "kpresenter", "DOC", "1.2" ); - QDomElement docElement = doc.documentElement(); + TQDomDocument doc = KoDocument::createDomDocument( "kpresenter", "DOC", "1.2" ); + TQDomElement docElement = doc.documentElement(); docElement.setAttribute( "editor", "KPresenter" ); docElement.setAttribute( "mime", "application/x-kpresenter" ); docElement.setAttribute( "syntaxVersion", "2" ); - QDomElement content = m_content.documentElement(); + TQDomElement content = m_content.documentElement(); // content.xml contains some automatic-styles that we need to store - QDomNode automaticStyles = KoDom::namedItemNS( content, ooNS::office, "automatic-styles" ); + TQDomNode automaticStyles = KoDom::namedItemNS( content, ooNS::office, "automatic-styles" ); if ( !automaticStyles.isNull() ) insertStyles( automaticStyles.toElement() ); - QDomNode body = KoDom::namedItemNS( content, ooNS::office, "body" ); + TQDomNode body = KoDom::namedItemNS( content, ooNS::office, "body" ); if ( body.isNull() ) return; - QDomElement customSlideShow = doc.createElement( "CUSTOMSLIDESHOWCONFIG" ); + TQDomElement customSlideShow = doc.createElement( "CUSTOMSLIDESHOWCONFIG" ); // presentation settings - QDomElement settings = KoDom::namedItemNS( body, ooNS::presentation, "settings"); + TQDomElement settings = KoDom::namedItemNS( body, ooNS::presentation, "settings"); if (!settings.isNull()) { - if (settings.attributeNS( ooNS::presentation, "endless", QString::null)=="true") + if (settings.attributeNS( ooNS::presentation, "endless", TQString())=="true") { - QDomElement infElem = doc.createElement("INFINITLOOP"); + TQDomElement infElem = doc.createElement("INFINITLOOP"); infElem.setAttribute("value", 1); docElement.appendChild(infElem); } - if (settings.attributeNS( ooNS::presentation, "show-end-of-presentation-slide", QString::null)=="true") + if (settings.attributeNS( ooNS::presentation, "show-end-of-presentation-slide", TQString())=="true") { - QDomElement infElem = doc.createElement("SHOWENDOFPRESENTATIONSLIDE"); + TQDomElement infElem = doc.createElement("SHOWENDOFPRESENTATIONSLIDE"); infElem.setAttribute("value", 1); docElement.appendChild(infElem); } - if (settings.attributeNS( ooNS::presentation, "force-manual", QString::null)=="true") + if (settings.attributeNS( ooNS::presentation, "force-manual", TQString())=="true") { - QDomElement manualElem = doc.createElement("MANUALSWITCH"); + TQDomElement manualElem = doc.createElement("MANUALSWITCH"); manualElem.setAttribute("value", 1); docElement.appendChild(manualElem); } if ( settings.hasAttributeNS( ooNS::presentation, "show") ) { - QDomElement defaultPage = doc.createElement("DEFAULTCUSTOMSLIDESHOWNAME"); - defaultPage.setAttribute("name", settings.attributeNS( ooNS::presentation, "show", QString::null) ); + TQDomElement defaultPage = doc.createElement("DEFAULTCUSTOMSLIDESHOWNAME"); + defaultPage.setAttribute("name", settings.attributeNS( ooNS::presentation, "show", TQString()) ); docElement.appendChild(defaultPage); } } - QDomElement presentationShow; + TQDomElement presentationShow; forEachElement( presentationShow, settings ) { if ( presentationShow.localName()=="show" && presentationShow.namespaceURI() == ooNS::presentation ) @@ -225,40 +225,40 @@ void OoImpressImport::createDocumentContent( QDomDocument &doccontent ) if ( presentationShow.hasAttributeNS( ooNS::presentation, "pages") && presentationShow.hasAttributeNS( ooNS::presentation, "name")) { - QDomElement slide=doc.createElement("CUSTOMSLIDESHOW"); - slide.setAttribute( "pages", presentationShow.attributeNS( ooNS::presentation, "pages", QString::null )); - slide.setAttribute( "name", presentationShow.attributeNS( ooNS::presentation, "name", QString::null )); + TQDomElement slide=doc.createElement("CUSTOMSLIDESHOW"); + slide.setAttribute( "pages", presentationShow.attributeNS( ooNS::presentation, "pages", TQString() )); + slide.setAttribute( "name", presentationShow.attributeNS( ooNS::presentation, "name", TQString() )); customSlideShow.appendChild( slide ); } } } // it seems that ooimpress has different paper-settings for every slide. // we take the settings of the first slide for the whole document. - QDomElement drawPage = KoDom::namedItemNS( body, ooNS::draw, "page" ); + TQDomElement drawPage = KoDom::namedItemNS( body, ooNS::draw, "page" ); if ( drawPage.isNull() ) // no slides? give up. return; - QDomElement objectElement = doc.createElement( "OBJECTS" ); - QDomElement pictureElement = doc.createElement( "PICTURES" ); - QDomElement pageTitleElement = doc.createElement( "PAGETITLES" ); - QDomElement pageNoteElement = doc.createElement( "PAGENOTES" ); - QDomElement backgroundElement = doc.createElement( "BACKGROUND" ); - QDomElement soundElement = doc.createElement( "SOUNDS" ); - QDomElement selSlideElement = doc.createElement( "SELSLIDES" ); - QDomElement helpLineElement = doc.createElement( "HELPLINES" ); - QDomElement attributeElement = doc.createElement( "ATTRIBUTES" ); - QDomElement *master = m_styles[drawPage.attributeNS( ooNS::draw, "master-page-name", QString::null )]; + TQDomElement objectElement = doc.createElement( "OBJECTS" ); + TQDomElement pictureElement = doc.createElement( "PICTURES" ); + TQDomElement pageTitleElement = doc.createElement( "PAGETITLES" ); + TQDomElement pageNoteElement = doc.createElement( "PAGENOTES" ); + TQDomElement backgroundElement = doc.createElement( "BACKGROUND" ); + TQDomElement soundElement = doc.createElement( "SOUNDS" ); + TQDomElement selSlideElement = doc.createElement( "SELSLIDES" ); + TQDomElement helpLineElement = doc.createElement( "HELPLINES" ); + TQDomElement attributeElement = doc.createElement( "ATTRIBUTES" ); + TQDomElement *master = m_styles[drawPage.attributeNS( ooNS::draw, "master-page-name", TQString() )]; appendObject(*master, doc, soundElement,pictureElement,pageNoteElement,objectElement, 0, true); - QDomElement *style = m_styles[master->attributeNS( ooNS::style, "page-master-name", QString::null )]; - QDomElement properties = KoDom::namedItemNS( *style, ooNS::style, "properties" ); - //kdDebug(30518)<<" master->attribute( draw:style-name ) :"<attributeNS( ooNS::draw, "style-name", QString::null )<attributeNS( ooNS::draw, "style-name", QString::null ).isEmpty() ? "Standard-background" : master->attributeNS( ooNS::draw, "style-name", QString::null ) ]; + TQDomElement *style = m_styles[master->attributeNS( ooNS::style, "page-master-name", TQString() )]; + TQDomElement properties = KoDom::namedItemNS( *style, ooNS::style, "properties" ); + //kdDebug(30518)<<" master->attribute( draw:style-name ) :"<attributeNS( ooNS::draw, "style-name", TQString() )<attributeNS( ooNS::draw, "style-name", TQString() ).isEmpty() ? "Standard-background" : master->attributeNS( ooNS::draw, "style-name", TQString() ) ]; //kdDebug(30518)<<" backgroundStyle :"<=0;--pos ) { @@ -424,10 +424,10 @@ void OoImpressImport::parseHelpLine( QDomDocument &doc,QDomElement &helpLineElem //point str = text.mid( pos+1, ( newPos-pos ) ); - QDomElement point=doc.createElement("HelpPoint"); + TQDomElement point=doc.createElement("HelpPoint"); //kdDebug(30518)<<" point element :"<< str < x2 && y1 > y2 ) ) linetype.setAttribute( "value", 2 ); else @@ -879,18 +879,18 @@ bool OoImpressImport::appendLineGeometry( QDomDocument& doc, QDomElement& e, con return (x1 < x2); } -void OoImpressImport::appendPen( QDomDocument& doc, QDomElement& e ) +void OoImpressImport::appendPen( TQDomDocument& doc, TQDomElement& e ) { if ( m_styleStack.hasAttributeNS( ooNS::draw, "stroke" )) { - QDomElement pen = doc.createElement( "PEN" ); + TQDomElement pen = doc.createElement( "PEN" ); if ( m_styleStack.attributeNS( ooNS::draw, "stroke" ) == "none" ) pen.setAttribute( "style", 0 ); else if ( m_styleStack.attributeNS( ooNS::draw, "stroke" ) == "solid" ) pen.setAttribute( "style", 1 ); else if ( m_styleStack.attributeNS( ooNS::draw, "stroke" ) == "dash" ) { - QString style = m_styleStack.attributeNS( ooNS::draw, "stroke-dash" ); + TQString style = m_styleStack.attributeNS( ooNS::draw, "stroke-dash" ); if ( style == "Ultrafine Dashed" || style == "Fine Dashed" || style == "Fine Dashed (var)" || style == "Dashed (var)" ) pen.setAttribute( "style", 2 ); @@ -911,18 +911,18 @@ void OoImpressImport::appendPen( QDomDocument& doc, QDomElement& e ) } } -void OoImpressImport::appendBrush( QDomDocument& doc, QDomElement& e ) +void OoImpressImport::appendBrush( TQDomDocument& doc, TQDomElement& e ) { if ( m_styleStack.hasAttributeNS( ooNS::draw, "fill" ) ) { - const QString fill = m_styleStack.attributeNS( ooNS::draw, "fill" ); - //kdDebug(30518)<<"void OoImpressImport::appendBrush( QDomDocument& doc, QDomElement& e ) :"<= 94 && value <= 99 ) @@ -962,22 +962,22 @@ void OoImpressImport::appendBrush( QDomDocument& doc, QDomElement& e ) } else if ( fill == "hatch" ) { - QDomElement brush = doc.createElement( "BRUSH" ); - QString style = m_styleStack.attributeNS( ooNS::draw, "fill-hatch-name" ); - QDomElement* draw = m_draws[style]; + TQDomElement brush = doc.createElement( "BRUSH" ); + TQString style = m_styleStack.attributeNS( ooNS::draw, "fill-hatch-name" ); + TQDomElement* draw = m_draws[style]; if ( draw ) { if( draw->hasAttributeNS( ooNS::draw, "color" ) ) - brush.setAttribute( "color", draw->attributeNS( ooNS::draw, "color", QString::null ) ); + brush.setAttribute( "color", draw->attributeNS( ooNS::draw, "color", TQString() ) ); int angle = 0; if( draw->hasAttributeNS( ooNS::draw, "rotation" )) { - angle = (draw->attributeNS( ooNS::draw, "rotation", QString::null ).toInt())/10; + angle = (draw->attributeNS( ooNS::draw, "rotation", TQString() ).toInt())/10; kdDebug(30518)<<"angle :"<hasAttributeNS( ooNS::draw, "style" )) { - QString styleHash = draw->attributeNS( ooNS::draw, "style", QString::null ); + TQString styleHash = draw->attributeNS( ooNS::draw, "style", TQString() ); if( styleHash == "single") { switch( angle ) @@ -1041,24 +1041,24 @@ void OoImpressImport::appendBrush( QDomDocument& doc, QDomElement& e ) // We have to set a brush with brushstyle != no background fill // otherwise the properties dialog for the object won't // display the preview for the gradient. - QDomElement brush = doc.createElement( "BRUSH" ); + TQDomElement brush = doc.createElement( "BRUSH" ); brush.setAttribute( "style", 1 ); e.appendChild( brush ); - QDomElement gradient = doc.createElement( "GRADIENT" ); - QString style = m_styleStack.attributeNS( ooNS::draw, "fill-gradient-name" ); + TQDomElement gradient = doc.createElement( "GRADIENT" ); + TQString style = m_styleStack.attributeNS( ooNS::draw, "fill-gradient-name" ); - QDomElement* draw = m_draws[style]; + TQDomElement* draw = m_draws[style]; if ( draw ) { - gradient.setAttribute( "color1", draw->attributeNS( ooNS::draw, "start-color", QString::null ) ); - gradient.setAttribute( "color2", draw->attributeNS( ooNS::draw, "end-color", QString::null ) ); + gradient.setAttribute( "color1", draw->attributeNS( ooNS::draw, "start-color", TQString() ) ); + gradient.setAttribute( "color2", draw->attributeNS( ooNS::draw, "end-color", TQString() ) ); - QString type = draw->attributeNS( ooNS::draw, "style", QString::null ); + TQString type = draw->attributeNS( ooNS::draw, "style", TQString() ); //kdDebug(30518)<<" type !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! :"<attributeNS( ooNS::draw, "angle", QString::null ).toInt() / 10; + int angle = draw->attributeNS( ooNS::draw, "angle", TQString() ).toInt() / 10; // make sure the angle is between 0 and 359 angle = abs( angle ); @@ -1099,12 +1099,12 @@ void OoImpressImport::appendBrush( QDomDocument& doc, QDomElement& e ) // and (un-)balanced settings of kpresenter. Let's try it. int x, y; if ( draw->hasAttributeNS( ooNS::draw, "cx" ) ) - x = draw->attributeNS( ooNS::draw, "cx", QString::null ).remove( '%' ).toInt(); + x = draw->attributeNS( ooNS::draw, "cx", TQString() ).remove( '%' ).toInt(); else x = 50; if ( draw->hasAttributeNS( ooNS::draw, "cy" ) ) - y = draw->attributeNS( ooNS::draw, "cy", QString::null ).remove( '%' ).toInt(); + y = draw->attributeNS( ooNS::draw, "cy", TQString() ).remove( '%' ).toInt(); else y = 50; @@ -1124,22 +1124,22 @@ void OoImpressImport::appendBrush( QDomDocument& doc, QDomElement& e ) } e.appendChild( gradient ); - QDomElement fillType = doc.createElement( "FILLTYPE" ); + TQDomElement fillType = doc.createElement( "FILLTYPE" ); fillType.setAttribute( "value", 1 ); e.appendChild( fillType ); } } } -void OoImpressImport::appendPie( QDomDocument& doc, QDomElement& e, const QDomElement& object ) +void OoImpressImport::appendPie( TQDomDocument& doc, TQDomElement& e, const TQDomElement& object ) { - QDomElement angle = doc.createElement( "PIEANGLE" ); - int start = (int) ( object.attributeNS( ooNS::draw, "start-angle", QString::null ).toDouble() ); + TQDomElement angle = doc.createElement( "PIEANGLE" ); + int start = (int) ( object.attributeNS( ooNS::draw, "start-angle", TQString() ).toDouble() ); angle.setAttribute( "value", start * 16 ); e.appendChild( angle ); - QDomElement length = doc.createElement( "PIELENGTH" ); - int end = (int) ( object.attributeNS( ooNS::draw, "end-angle", QString::null ).toDouble() ); + TQDomElement length = doc.createElement( "PIELENGTH" ); + int end = (int) ( object.attributeNS( ooNS::draw, "end-angle", TQString() ).toDouble() ); if ( end < start ) length.setAttribute( "value", ( 360 - start + end ) * 16 ); else @@ -1147,16 +1147,16 @@ void OoImpressImport::appendPie( QDomDocument& doc, QDomElement& e, const QDomEl e.appendChild( length ); } -void OoImpressImport::appendImage( QDomDocument& doc, QDomElement& e, QDomElement& p, - const QDomElement& object ) +void OoImpressImport::appendImage( TQDomDocument& doc, TQDomElement& e, TQDomElement& p, + const TQDomElement& object ) { - QString fileName = storeImage( object ); + TQString fileName = storeImage( object ); // create a key for the picture - QTime time = QTime::currentTime(); - QDate date = QDate::currentDate(); + TQTime time = TQTime::currentTime(); + TQDate date = TQDate::tqcurrentDate(); - QDomElement image = doc.createElement( "KEY" ); + TQDomElement image = doc.createElement( "KEY" ); image.setAttribute( "msec", time.msec() ); image.setAttribute( "second", time.second() ); image.setAttribute( "minute", time.minute() ); @@ -1167,7 +1167,7 @@ void OoImpressImport::appendImage( QDomDocument& doc, QDomElement& e, QDomElemen image.setAttribute( "filename", fileName ); e.appendChild( image ); - QDomElement settings = doc.createElement( "PICTURESETTINGS" ); + TQDomElement settings = doc.createElement( "PICTURESETTINGS" ); if ( m_styleStack.hasAttributeNS( ooNS::draw, "color-mode" ) && ( m_styleStack.attributeNS( ooNS::draw, "color-mode" )=="greyscale" ) ) settings.setAttribute( "grayscal", 1 ); else @@ -1175,7 +1175,7 @@ void OoImpressImport::appendImage( QDomDocument& doc, QDomElement& e, QDomElemen if ( m_styleStack.hasAttributeNS( ooNS::draw, "luminance" ) ) { - QString str( m_styleStack.attributeNS( ooNS::draw, "luminance" ) ); + TQString str( m_styleStack.attributeNS( ooNS::draw, "luminance" ) ); str = str.remove( '%' ); settings.setAttribute( "bright", str ); } @@ -1187,36 +1187,36 @@ void OoImpressImport::appendImage( QDomDocument& doc, QDomElement& e, QDomElemen settings.setAttribute( "depth", 0 ); e.appendChild( settings ); - QDomElement effects = doc.createElement( "EFFECTS" ); + TQDomElement effects = doc.createElement( "EFFECTS" ); bool hasEffect = false; if ( m_styleStack.hasAttributeNS( ooNS::draw, "contrast" ) ) { - QString str( m_styleStack.attributeNS( ooNS::draw, "contrast" ) ); + TQString str( m_styleStack.attributeNS( ooNS::draw, "contrast" ) ); str = str.remove( '%' ); int val = str.toInt(); val = ( int )( 255.0 *val/100.0 ); effects.setAttribute( "type", "5" ); - effects.setAttribute( "param1", QString::number( val ) ); + effects.setAttribute( "param1", TQString::number( val ) ); hasEffect = true; } if ( hasEffect ) e.appendChild( effects ); - QDomElement key = image.cloneNode().toElement(); + TQDomElement key = image.cloneNode().toElement(); key.setAttribute( "name", "pictures/" + fileName ); p.appendChild( key ); } -void OoImpressImport::appendBackgroundImage( QDomDocument& doc, QDomElement& e, - QDomElement& p, const QDomElement& object ) +void OoImpressImport::appendBackgroundImage( TQDomDocument& doc, TQDomElement& e, + TQDomElement& p, const TQDomElement& object ) { - QString fileName = storeImage( object ); + TQString fileName = storeImage( object ); // create a key for the picture - QTime time = QTime::currentTime(); - QDate date = QDate::currentDate(); + TQTime time = TQTime::currentTime(); + TQDate date = TQDate::tqcurrentDate(); - QDomElement image = doc.createElement( "BACKPICTUREKEY" ); + TQDomElement image = doc.createElement( "BACKPICTUREKEY" ); image.setAttribute( "msec", time.msec() ); image.setAttribute( "second", time.second() ); image.setAttribute( "minute", time.minute() ); @@ -1227,32 +1227,32 @@ void OoImpressImport::appendBackgroundImage( QDomDocument& doc, QDomElement& e, image.setAttribute( "filename", fileName ); e.appendChild( image ); - QDomElement key = image.cloneNode().toElement(); + TQDomElement key = image.cloneNode().toElement(); key.setTagName( "KEY" ); key.setAttribute( "name", "pictures/" + fileName ); p.appendChild( key ); } -void OoImpressImport::appendBackgroundGradient( QDomDocument& doc, QDomElement& e, - const QDomElement& object ) +void OoImpressImport::appendBackgroundGradient( TQDomDocument& doc, TQDomElement& e, + const TQDomElement& object ) { - QDomElement backColor1 = doc.createElement( "BACKCOLOR1" ); - backColor1.setAttribute( "color", object.attributeNS( ooNS::draw, "start-color", QString::null ) ); + TQDomElement backColor1 = doc.createElement( "BACKCOLOR1" ); + backColor1.setAttribute( "color", object.attributeNS( ooNS::draw, "start-color", TQString() ) ); e.appendChild( backColor1 ); - QDomElement backColor2 = doc.createElement( "BACKCOLOR2" ); - backColor2.setAttribute( "color", object.attributeNS( ooNS::draw, "end-color", QString::null ) ); + TQDomElement backColor2 = doc.createElement( "BACKCOLOR2" ); + backColor2.setAttribute( "color", object.attributeNS( ooNS::draw, "end-color", TQString() ) ); e.appendChild( backColor2 ); - QDomElement backType = doc.createElement( "BACKTYPE" ); + TQDomElement backType = doc.createElement( "BACKTYPE" ); backType.setAttribute( "value", 0 ); // color/gradient e.appendChild( backType ); - QDomElement bcType = doc.createElement( "BCTYPE" ); - QString type = object.attributeNS( ooNS::draw, "style", QString::null ); + TQDomElement bcType = doc.createElement( "BCTYPE" ); + TQString type = object.attributeNS( ooNS::draw, "style", TQString() ); if ( type == "linear" ) { - int angle = object.attributeNS( ooNS::draw, "angle", QString::null ).toInt() / 10; + int angle = object.attributeNS( ooNS::draw, "angle", TQString() ).toInt() / 10; // make sure the angle is between 0 and 359 angle = abs( angle ); @@ -1291,18 +1291,18 @@ void OoImpressImport::appendBackgroundGradient( QDomDocument& doc, QDomElement& e.appendChild( bcType ); - QDomElement bGradient = doc.createElement( "BGRADIENT" ); + TQDomElement bGradient = doc.createElement( "BGRADIENT" ); // Hard to map between x- and y-center settings of ooimpress // and (un-)balanced settings of kpresenter. Let's try it. int x, y; if ( object.hasAttributeNS( ooNS::draw, "cx" ) ) - x = object.attributeNS( ooNS::draw, "cx", QString::null ).remove( '%' ).toInt(); + x = object.attributeNS( ooNS::draw, "cx", TQString() ).remove( '%' ).toInt(); else x = 50; if ( object.hasAttributeNS( ooNS::draw, "cy" ) ) - y = object.attributeNS( ooNS::draw, "cy", QString::null ).remove( '%' ).toInt(); + y = object.attributeNS( ooNS::draw, "cy", TQString() ).remove( '%' ).toInt(); else y = 50; @@ -1323,20 +1323,20 @@ void OoImpressImport::appendBackgroundGradient( QDomDocument& doc, QDomElement& e.appendChild( bGradient ); } -void OoImpressImport::appendRounding( QDomDocument& doc, QDomElement& e, const QDomElement& object ) +void OoImpressImport::appendRounding( TQDomDocument& doc, TQDomElement& e, const TQDomElement& object ) { if ( object.hasAttributeNS( ooNS::draw, "corner-radius" ) ) { // kpresenter uses percent, ooimpress uses cm ... hmm? - QDomElement rounding = doc.createElement( "RNDS" ); - int corner = static_cast(KoUnit::parseValue(object.attributeNS( ooNS::draw, "corner-radius", QString::null))); + TQDomElement rounding = doc.createElement( "RNDS" ); + int corner = static_cast(KoUnit::parseValue(object.attributeNS( ooNS::draw, "corner-radius", TQString()))); rounding.setAttribute( "x", corner ); rounding.setAttribute( "y", corner ); e.appendChild( rounding ); } } -void OoImpressImport::appendShadow( QDomDocument& doc, QDomElement& e ) +void OoImpressImport::appendShadow( TQDomDocument& doc, TQDomElement& e ) { // Note that ooimpress makes a difference between shadowed text and // a shadowed object while kpresenter only knows the attribute 'shadow'. @@ -1351,9 +1351,9 @@ void OoImpressImport::appendShadow( QDomDocument& doc, QDomElement& e ) m_styleStack.attributeNS( ooNS::fo, "text-shadow" ) != "none" ) { // use the shadow attribute to indicate a text-shadow - QDomElement shadow = doc.createElement( "SHADOW" ); - QString distance = m_styleStack.attributeNS( ooNS::fo, "text-shadow" ); - distance.truncate( distance.find( ' ' ) ); + TQDomElement shadow = doc.createElement( "SHADOW" ); + TQString distance = m_styleStack.attributeNS( ooNS::fo, "text-shadow" ); + distance.truncate( distance.tqfind( ' ' ) ); shadow.setAttribute( "distance", KoUnit::parseValue( distance ) ); shadow.setAttribute( "direction", 5 ); shadow.setAttribute( "color", "#a0a0a0" ); @@ -1364,7 +1364,7 @@ void OoImpressImport::appendShadow( QDomDocument& doc, QDomElement& e ) m_styleStack.attributeNS( ooNS::draw, "shadow" ) == "visible" ) { // use the shadow attribute to indicate an object-shadow - QDomElement shadow = doc.createElement( "SHADOW" ); + TQDomElement shadow = doc.createElement( "SHADOW" ); double x = KoUnit::parseValue( m_styleStack.attributeNS( ooNS::draw, "shadow-offset-x" ) ); double y = KoUnit::parseValue( m_styleStack.attributeNS( ooNS::draw, "shadow-offset-y" ) ); @@ -1419,20 +1419,20 @@ void OoImpressImport::appendShadow( QDomDocument& doc, QDomElement& e ) bool b = ( m_styleStack.attributeNS( ooNS::draw, "size-protect" ) == "true" ) || ( m_styleStack.attributeNS( ooNS::draw, "move-protect" ) == "true" ); if ( b ) { - QDomElement protect = doc.createElement( "PROTECT" ); + TQDomElement protect = doc.createElement( "PROTECT" ); protect.setAttribute("state" , b); e.appendChild(protect); } } } -void OoImpressImport::appendLineEnds( QDomDocument& doc, QDomElement& e, bool orderEndStartLine) +void OoImpressImport::appendLineEnds( TQDomDocument& doc, TQDomElement& e, bool orderEndStartLine) { const char* attr = orderEndStartLine ? "marker-start" : "marker-end"; if ( m_styleStack.hasAttributeNS( ooNS::draw, attr ) ) { - QDomElement lineBegin = doc.createElement( "LINEBEGIN" ); - QString type = m_styleStack.attributeNS( ooNS::draw, attr ); + TQDomElement lineBegin = doc.createElement( "LINEBEGIN" ); + TQString type = m_styleStack.attributeNS( ooNS::draw, attr ); if ( type == "Arrow" || type == "Small Arrow" || type == "Rounded short Arrow" || type == "Symmetric Arrow" || type == "Rounded large Arrow" || type == "Arrow concave" ) lineBegin.setAttribute( "value", 1 ); @@ -1451,8 +1451,8 @@ void OoImpressImport::appendLineEnds( QDomDocument& doc, QDomElement& e, bool or attr = orderEndStartLine ? "marker-end" : "marker-start"; if ( m_styleStack.hasAttributeNS( ooNS::draw, attr ) ) { - QDomElement lineEnd = doc.createElement( "LINEEND" ); - QString type = m_styleStack.attributeNS( ooNS::draw, attr ); + TQDomElement lineEnd = doc.createElement( "LINEEND" ); + TQString type = m_styleStack.attributeNS( ooNS::draw, attr ); if ( type == "Arrow" || type == "Small Arrow" || type == "Rounded short Arrow" || type == "Symmetric Arrow" || type == "Rounded large Arrow" || type == "Arrow concave" ) lineEnd.setAttribute( "value", 1 ); @@ -1470,7 +1470,7 @@ void OoImpressImport::appendLineEnds( QDomDocument& doc, QDomElement& e, bool or } } -void OoImpressImport::appendTextObjectMargin( QDomDocument& /*doc*/, QDomElement& e ) +void OoImpressImport::appendTextObjectMargin( TQDomDocument& /*doc*/, TQDomElement& e ) { if ( m_styleStack.hasAttributeNS( ooNS::fo, "padding" ) ) { @@ -1493,20 +1493,20 @@ void OoImpressImport::appendTextObjectMargin( QDomDocument& /*doc*/, QDomElement } } -QDomElement OoImpressImport::parseTextBox( QDomDocument& doc, const QDomElement& textBox ) +TQDomElement OoImpressImport::parseTextBox( TQDomDocument& doc, const TQDomElement& textBox ) { - QDomElement textObjectElement = doc.createElement( "TEXTOBJ" ); + TQDomElement textObjectElement = doc.createElement( "TEXTOBJ" ); appendTextObjectMargin( doc, textObjectElement ); - // vertical alignment + // vertical tqalignment if ( m_styleStack.hasAttributeNS( ooNS::draw, "textarea-vertical-align" ) ) { - QString alignment = m_styleStack.attributeNS( ooNS::draw, "textarea-vertical-align" ); - if ( alignment == "top" ) + TQString tqalignment = m_styleStack.attributeNS( ooNS::draw, "textarea-vertical-align" ); + if ( tqalignment == "top" ) textObjectElement.setAttribute( "verticalAlign", "top" ); - else if ( alignment == "middle" ) + else if ( tqalignment == "middle" ) textObjectElement.setAttribute( "verticalAlign", "center" ); - else if ( alignment == "bottom" ) + else if ( tqalignment == "bottom" ) textObjectElement.setAttribute( "verticalAlign", "bottom" ); textObjectElement.setAttribute("verticalValue", 0.0); @@ -1517,17 +1517,17 @@ QDomElement OoImpressImport::parseTextBox( QDomDocument& doc, const QDomElement& return textObjectElement; } -void OoImpressImport::parseParagraphs( QDomDocument& doc, QDomElement& textObjectElement, const QDomElement& parent ) +void OoImpressImport::parseParagraphs( TQDomDocument& doc, TQDomElement& textObjectElement, const TQDomElement& tqparent ) { - QDomElement t; - forEachElement( t, parent ) + TQDomElement t; + forEachElement( t, tqparent ) { m_styleStack.save(); - const QString localName = t.localName(); - const QString ns = t.namespaceURI(); + const TQString localName = t.localName(); + const TQString ns = t.namespaceURI(); const bool isTextNS = ns == ooNS::text; - QDomElement e; + TQDomElement e; if ( isTextNS && localName == "p" ) // text paragraph e = parseParagraph( doc, t ); else if ( isTextNS && localName == "h" ) // heading - can this happen in ooimpress? @@ -1552,17 +1552,17 @@ void OoImpressImport::parseParagraphs( QDomDocument& doc, QDomElement& textObjec } } -void OoImpressImport::applyListStyle( QDomElement& paragraph ) +void OoImpressImport::applyListStyle( TQDomElement& paragraph ) { // Spec: see 3.3.5 p137 if ( m_listStyleStack.hasListStyle() && m_nextItemIsListItem ) { - //const QDomElement listStyle = m_listStyleStack.currentListStyle(); + //const TQDomElement listStyle = m_listStyleStack.currentListStyle(); //bool heading = paragraph.localName() == "h"; m_nextItemIsListItem = false; - /*int level = heading ? paragraph.attributeNS( ooNS::text, "level", QString::null ).toInt() + /*int level = heading ? paragraph.attributeNS( ooNS::text, "level", TQString() ).toInt() : m_listStyleStack.level();*/ - QDomElement counter = paragraph.ownerDocument().createElement( "COUNTER" ); + TQDomElement counter = paragraph.ownerDocument().createElement( "COUNTER" ); counter.setAttribute( "numberingtype", 0 ); counter.setAttribute( "depth", 0 ); @@ -1574,20 +1574,20 @@ void OoImpressImport::applyListStyle( QDomElement& paragraph ) } } -static QDomElement findListLevelStyle( QDomElement& fullListStyle, int level ) +static TQDomElement findListLevelStyle( TQDomElement& fullListStyle, int level ) { - QDomElement listLevelItem; + TQDomElement listLevelItem; forEachElement( listLevelItem, fullListStyle ) { - if ( listLevelItem.attributeNS( ooNS::text, "level", QString::null ).toInt() == level ) + if ( listLevelItem.attributeNS( ooNS::text, "level", TQString() ).toInt() == level ) return listLevelItem; } - return QDomElement(); + return TQDomElement(); } -bool OoImpressImport::pushListLevelStyle( const QString& listStyleName, int level ) +bool OoImpressImport::pushListLevelStyle( const TQString& listStyleName, int level ) { - QDomElement* fullListStyle = m_listStyles[listStyleName]; + TQDomElement* fullListStyle = m_listStyles[listStyleName]; if ( !fullListStyle ) { kdWarning(30518) << "List style " << listStyleName << " not found!" << endl; return false; @@ -1596,12 +1596,12 @@ bool OoImpressImport::pushListLevelStyle( const QString& listStyleName, int leve return pushListLevelStyle( listStyleName, *fullListStyle, level ); } -bool OoImpressImport::pushListLevelStyle( const QString& listStyleName, // for debug only - QDomElement& fullListStyle, int level ) +bool OoImpressImport::pushListLevelStyle( const TQString& listStyleName, // for debug only + TQDomElement& fullListStyle, int level ) { // Find applicable list-level-style for level int i = level; - QDomElement listLevelStyle; + TQDomElement listLevelStyle; while ( i > 0 && listLevelStyle.isNull() ) { listLevelStyle = findListLevelStyle( fullListStyle, i ); --i; @@ -1615,14 +1615,14 @@ bool OoImpressImport::pushListLevelStyle( const QString& listStyleName, // for d return true; } -void OoImpressImport::parseList( QDomDocument& doc, QDomElement& textObjectElement, const QDomElement& list ) +void OoImpressImport::parseList( TQDomDocument& doc, TQDomElement& textObjectElement, const TQDomElement& list ) { //kdDebug(30518) << k_funcinfo << "parseList"<< endl; m_insideOrderedList = ( list.localName() == "ordered-list" ); - QString oldListStyleName = m_currentListStyleName; + TQString oldListStyleName = m_currentListStyleName; if ( list.hasAttributeNS( ooNS::text, "style-name" ) ) - m_currentListStyleName = list.attributeNS( ooNS::text, "style-name", QString::null ); + m_currentListStyleName = list.attributeNS( ooNS::text, "style-name", TQString() ); bool listOK = !m_currentListStyleName.isEmpty(); const int level = m_listStyleStack.level() + 1; //kdDebug(30518) << k_funcinfo << " listOK=" << listOK << " level=" << level << endl; @@ -1630,14 +1630,14 @@ void OoImpressImport::parseList( QDomDocument& doc, QDomElement& textObjectEleme listOK = pushListLevelStyle( m_currentListStyleName, level ); // Iterate over list items - QDomElement listItem; + TQDomElement listItem; forEachElement( listItem, list ) { // It's either list-header (normal text on top of list) or list-item m_nextItemIsListItem = ( listItem.localName() != "list-header" ); m_restartNumbering = -1; if ( listItem.hasAttributeNS( ooNS::text, "start-value" ) ) - m_restartNumbering = listItem.attributeNS( ooNS::text, "start-value", QString::null ).toInt(); + m_restartNumbering = listItem.attributeNS( ooNS::text, "start-value", TQString() ).toInt(); // ### Oasis: can be p h or list only. parseParagraphs( doc, textObjectElement, listItem ); m_restartNumbering = -1; @@ -1647,26 +1647,26 @@ void OoImpressImport::parseList( QDomDocument& doc, QDomElement& textObjectEleme m_currentListStyleName = oldListStyleName; } -QDomElement OoImpressImport::parseParagraph( QDomDocument& doc, const QDomElement& paragraph ) +TQDomElement OoImpressImport::parseParagraph( TQDomDocument& doc, const TQDomElement& paragraph ) { - QDomElement p = doc.createElement( "P" ); + TQDomElement p = doc.createElement( "P" ); // parse the paragraph-properties fillStyleStack( paragraph ); // Style name - QString styleName = m_styleStack.userStyleName("paragraph"); + TQString styleName = m_styleStack.userStyleName("paragraph"); if ( !styleName.isEmpty() ) { - QDomElement nameElem = doc.createElement("NAME"); + TQDomElement nameElem = doc.createElement("NAME"); nameElem.setAttribute("value", styleName); p.appendChild(nameElem); } - // Paragraph alignment + // Paragraph tqalignment if ( m_styleStack.hasAttributeNS( ooNS::fo, "text-align" ) ) { - QString align = m_styleStack.attributeNS( ooNS::fo, "text-align" ); + TQString align = m_styleStack.attributeNS( ooNS::fo, "text-align" ); if ( align == "center" ) p.setAttribute( "align", 4 ); else if ( align == "justify" ) @@ -1707,19 +1707,19 @@ QDomElement OoImpressImport::parseParagraph( QDomDocument& doc, const QDomElemen return p; } -void OoImpressImport::parseSpanOrSimilar( QDomDocument& doc, const QDomElement& parent, - QDomElement& outputParagraph, uint& pos) +void OoImpressImport::parseSpanOrSimilar( TQDomDocument& doc, const TQDomElement& tqparent, + TQDomElement& outputParagraph, uint& pos) { - // Parse every child node of the parent + // Parse every child node of the tqparent // Can't use forEachElement here since we also care about text nodes - for( QDomNode node = parent.firstChild(); !node.isNull(); node = node.nextSibling() ) + for( TQDomNode node = tqparent.firstChild(); !node.isNull(); node = node.nextSibling() ) { - QDomElement ts = node.toElement(); - QString textData; - const QString localName( ts.localName() ); - const QString ns = ts.namespaceURI(); + TQDomElement ts = node.toElement(); + TQString textData; + const TQString localName( ts.localName() ); + const TQString ns = ts.namespaceURI(); const bool isTextNS = ns == ooNS::text; - QDomText t = node.toText(); + TQDomText t = node.toText(); // Try to keep the order of the tag names by probability of happening if ( isTextNS && localName == "span" ) // text:span @@ -1736,7 +1736,7 @@ void OoImpressImport::parseSpanOrSimilar( QDomDocument& doc, const QDomElement& else if ( isTextNS && localName == "tab-stop" ) // text:tab-stop { // KPresenter currently uses \t. - // Known bug: a line with only \t\t\t\t isn't loaded - XML (QDom) strips out whitespace. + // Known bug: a line with only \t\t\t\t isn't loaded - XML (TQDom) strips out whitespace. // One more good reason to switch to instead... textData = '\t'; } @@ -1752,7 +1752,7 @@ void OoImpressImport::parseSpanOrSimilar( QDomDocument& doc, const QDomElement& else if ( isTextNS && localName == "a" ) { m_styleStack.save(); - QString href( ts.attributeNS( ooNS::xlink, "href", QString::null) ); + TQString href( ts.attributeNS( ooNS::xlink, "href", TQString()) ); if ( href.startsWith("#") ) { // We have a reference to a bookmark (### TODO) @@ -1764,13 +1764,13 @@ void OoImpressImport::parseSpanOrSimilar( QDomDocument& doc, const QDomElement& #if 0 // TODO // The problem is that KPresenter's hyperlink text is not inside the normal text, but for OOWriter it is nearly a // So we have to fake. - QDomElement fakeParagraph, fakeFormats; + TQDomElement fakeParagraph, fakeFormats; uint fakePos=0; - QString text; + TQString text; parseSpanOrSimilar( doc, ts, fakeParagraph, fakeFormats, text, fakePos); textData = '#'; // hyperlink placeholder - QDomElement linkElement (doc.createElement("LINK")); - linkElement.setAttribute("hrefName",ts.attributeNS( ooNS::xlink, "href", QString::null)); + TQDomElement linkElement (doc.createElement("LINK")); + linkElement.setAttribute("hrefName",ts.attributeNS( ooNS::xlink, "href", TQString())); linkElement.setAttribute("linkName",text); appendVariable(doc, ts, pos, "STRING", 9, text, linkElement); #endif @@ -1798,12 +1798,12 @@ void OoImpressImport::parseSpanOrSimilar( QDomDocument& doc, const QDomElement& pos += textData.length(); - QDomElement text = saveHelper(textData, doc); + TQDomElement text = saveHelper(textData, doc); kdDebug(30518) << k_funcinfo << "Para text is: " << textData << endl; if (m_styleStack.hasAttributeNS( ooNS::fo, "language" )) { - QString lang = m_styleStack.attributeNS( ooNS::fo, "language" ); + TQString lang = m_styleStack.attributeNS( ooNS::fo, "language" ); if (lang=="en") text.setAttribute("language", "en_US"); else @@ -1830,7 +1830,7 @@ void OoImpressImport::parseSpanOrSimilar( QDomDocument& doc, const QDomElement& if ( m_styleStack.hasAttributeNS( ooNS::fo, "font-size" ) ) { double pointSize = m_styleStack.fontSize(); - text.setAttribute( "pointSize", qRound(pointSize) ); // KPresenter uses toInt()! + text.setAttribute( "pointSize", tqRound(pointSize) ); // KPresenter uses toInt()! } if ( m_styleStack.hasAttributeNS( ooNS::fo, "font-weight" ) ) // 3.10.24 if ( m_styleStack.attributeNS( ooNS::fo, "font-weight" ) == "bold" ) @@ -1841,9 +1841,9 @@ void OoImpressImport::parseSpanOrSimilar( QDomDocument& doc, const QDomElement& if ( m_styleStack.hasAttributeNS( ooNS::style, "text-position" ) ) // 3.10.17 { - QString text_position = m_styleStack.attributeNS( ooNS::style, "text-position"); - QString value; - QString relativetextsize; + TQString text_position = m_styleStack.attributeNS( ooNS::style, "text-position"); + TQString value; + TQString relativetextsize; OoUtils::importTextPosition( text_position, value, relativetextsize ); text.setAttribute( "VERTALIGN", value ); if ( !relativetextsize.isEmpty() ) @@ -1857,7 +1857,7 @@ void OoImpressImport::parseSpanOrSimilar( QDomDocument& doc, const QDomElement& if ( m_styleStack.hasAttributeNS( ooNS::style, "text-crossing-out")// 3.10.6 && m_styleStack.attributeNS( ooNS::style, "text-crossing-out") != "none") { - QString strikeOutType = m_styleStack.attributeNS( ooNS::style, "text-crossing-out" ); + TQString strikeOutType = m_styleStack.attributeNS( ooNS::style, "text-crossing-out" ); if ( strikeOutType =="double-line" ) { text.setAttribute( "strikeOut", "double" ); @@ -1881,11 +1881,11 @@ void OoImpressImport::parseSpanOrSimilar( QDomDocument& doc, const QDomElement& // underlining if ( m_styleStack.hasAttributeNS( ooNS::style, "text-underline" ) ) // 3.10.22 { - QString underline; - QString styleline; + TQString underline; + TQString styleline; OoUtils::importUnderline( m_styleStack.attributeNS( ooNS::style, "text-underline" ), underline, styleline ); - QString underLineColor = m_styleStack.attributeNS( ooNS::style, "text-underline-color" );// 3.10.23 + TQString underLineColor = m_styleStack.attributeNS( ooNS::style, "text-underline-color" );// 3.10.23 text.setAttribute( "value", underline ); text.setAttribute( "styleline", styleline ); @@ -1900,7 +1900,7 @@ void OoImpressImport::parseSpanOrSimilar( QDomDocument& doc, const QDomElement& if ( m_styleStack.hasAttributeNS( ooNS::fo, "font-variant" ) // 3.10.1 || m_styleStack.hasAttributeNS( ooNS::fo, "text-transform" ) ) // 3.10.2 { - QDomElement fontAttrib( doc.createElement( "FONTATTRIBUTE" ) ); + TQDomElement fontAttrib( doc.createElement( "FONTATTRIBUTE" ) ); bool smallCaps = m_styleStack.attributeNS( ooNS::fo, "font-variant" ) == "small-caps"; if ( smallCaps ) { @@ -1916,7 +1916,7 @@ void OoImpressImport::parseSpanOrSimilar( QDomDocument& doc, const QDomElement& // background color (property of the paragraph in OOo, of the text in kword/kpresenter) if (m_styleStack.hasAttributeNS( ooNS::fo, "background-color" )) { - QString bgColor = m_styleStack.attributeNS( ooNS::fo, "background-color"); + TQString bgColor = m_styleStack.attributeNS( ooNS::fo, "background-color"); if (bgColor != "transparent") text.setAttribute("textbackcolor", bgColor); } @@ -1926,13 +1926,13 @@ void OoImpressImport::parseSpanOrSimilar( QDomDocument& doc, const QDomElement& } // for each text span } -void OoImpressImport::createStyleMap( QDomDocument &docstyles ) +void OoImpressImport::createStyleMap( TQDomDocument &docstyles ) { - QDomElement styles = docstyles.documentElement(); + TQDomElement styles = docstyles.documentElement(); if ( styles.isNull() ) return; - QDomNode fixedStyles = KoDom::namedItemNS( styles, ooNS::office, "styles" ); + TQDomNode fixedStyles = KoDom::namedItemNS( styles, ooNS::office, "styles" ); if ( !fixedStyles.isNull() ) { insertDraws( fixedStyles.toElement() ); @@ -1940,148 +1940,148 @@ void OoImpressImport::createStyleMap( QDomDocument &docstyles ) insertStylesPresentation( fixedStyles.toElement() ); } - QDomNode automaticStyles = KoDom::namedItemNS( styles, ooNS::office, "automatic-styles" ); + TQDomNode automaticStyles = KoDom::namedItemNS( styles, ooNS::office, "automatic-styles" ); if ( !automaticStyles.isNull() ) { insertStyles( automaticStyles.toElement() ); insertStylesPresentation( automaticStyles.toElement() ); } - QDomNode masterStyles = KoDom::namedItemNS( styles, ooNS::office, "master-styles" ); + TQDomNode masterStyles = KoDom::namedItemNS( styles, ooNS::office, "master-styles" ); if ( !masterStyles.isNull() ) insertStyles( masterStyles.toElement() ); } -void OoImpressImport::insertDraws( const QDomElement& styles ) +void OoImpressImport::insertDraws( const TQDomElement& styles ) { - QDomElement e; + TQDomElement e; forEachElement( e, styles ) { if ( !e.hasAttributeNS( ooNS::draw, "name" ) ) continue; - QString name = e.attributeNS( ooNS::draw, "name", QString::null ); - m_draws.insert( name, new QDomElement( e ) ); + TQString name = e.attributeNS( ooNS::draw, "name", TQString() ); + m_draws.insert( name, new TQDomElement( e ) ); } } -void OoImpressImport::insertStyles( const QDomElement& styles ) +void OoImpressImport::insertStyles( const TQDomElement& styles ) { - QDomElement e; + TQDomElement e; forEachElement( e, styles ) { - const QString localName = e.localName(); - const QString ns = e.namespaceURI(); + const TQString localName = e.localName(); + const TQString ns = e.namespaceURI(); if ( !e.hasAttributeNS( ooNS::style, "name" ) ) continue; - const QString name = e.attributeNS( ooNS::style, "name", QString::null ); + const TQString name = e.attributeNS( ooNS::style, "name", TQString() ); if ( localName == "list-style" && ns == ooNS::text ) { - QDomElement* ep = new QDomElement( e ); + TQDomElement* ep = new TQDomElement( e ); m_listStyles.insert( name, ep ); kdDebug(30518) << "List style: '" << name << "' loaded " << endl; } else { - m_styles.insert( name, new QDomElement( e ) ); + m_styles.insert( name, new TQDomElement( e ) ); kdDebug(30518) << "Style: '" << name << "' loaded " << endl; } } } -void OoImpressImport::insertStylesPresentation( const QDomElement& styles ) +void OoImpressImport::insertStylesPresentation( const TQDomElement& styles ) { - QDomElement e; + TQDomElement e; forEachElement( e, styles ) { if ( !e.hasAttributeNS( ooNS::style, "name" ) ) continue; - QString name = e.attributeNS( ooNS::style, "name", QString::null ); - m_stylesPresentation.insert( name, new QDomElement( e ) ); + TQString name = e.attributeNS( ooNS::style, "name", TQString() ); + m_stylesPresentation.insert( name, new TQDomElement( e ) ); //kdDebug(30518) << "Style: '" << name << "' loaded " << endl; } } -void OoImpressImport::fillStyleStack( const QDomElement& object, bool sticky ) +void OoImpressImport::fillStyleStack( const TQDomElement& object, bool sticky ) { // find all styles associated with an object and push them on the stack if ( object.hasAttributeNS( ooNS::presentation, "style-name" ) ) { - kdDebug(30518)<<" presentation:style-name **************************** :"<attributeNS( ooNS::style, "name", QString::null ) <hasAttributeNS( ooNS::style, "parent-style-name" ) ) + kdDebug(30518)<<" addStyle :" << style->attributeNS( ooNS::style, "name", TQString() ) <hasAttributeNS( ooNS::style, "tqparent-style-name" ) ) { - //kdDebug(30518)<<"m_styles[style->attribute( style:parent-style-name )] :"<attributeNS( ooNS::style, "parent-style-name", QString::null )]<attributeNS( ooNS::style, "parent-style-name", QString::null )] ); + //kdDebug(30518)<<"m_styles[style->attribute( style:tqparent-style-name )] :"<attributeNS( ooNS::style, "tqparent-style-name", TQString() )]<attributeNS( ooNS::style, "tqparent-style-name", TQString() )] ); } - //kdDebug(30518)<<" void OoImpressImport::addStyles( const QDomElement* style ) :"<directory()->entry( url ); - QString extension = url.mid( url.find( '.' ) ); - QString fileName = QString( "picture%1" ).arg( m_numPicture++ ) + extension; + TQString extension = url.mid( url.tqfind( '.' ) ); + TQString fileName = TQString( "picture%1" ).tqarg( m_numPicture++ ) + extension; KoStoreDevice* out = m_chain->storageFile( "pictures/" + fileName, KoStore::Write ); if ( file && out ) { - QByteArray buffer = file->data(); + TQByteArray buffer = file->data(); out->writeBlock( buffer.data(), buffer.size() ); } return fileName; } -QString OoImpressImport::storeSound(const QDomElement & object, QDomElement & p, QDomDocument & doc) +TQString OoImpressImport::storeSound(const TQDomElement & object, TQDomElement & p, TQDomDocument & doc) { - QFileInfo fi(m_chain->inputFile()); // handle relative URLs - QDir::setCurrent(fi.dirPath(true)); - fi.setFile(object.attributeNS( ooNS::xlink, "href", QString::null)); - QString url = fi.absFilePath(); + TQFileInfo fi(m_chain->inputFile()); // handle relative URLs + TQDir::setCurrent(fi.dirPath(true)); + fi.setFile(object.attributeNS( ooNS::xlink, "href", TQString())); + TQString url = fi.absFilePath(); //kdDebug(30518) << "Sound URL: " << url << endl; - QFile file(url); + TQFile file(url); if (!file.exists()) - return QString::null; + return TQString(); - QString extension = url.mid( url.find( '.' ) ); - QString fileName = QString( "sound%1" ).arg( m_numSound++ ) + extension; + TQString extension = url.mid( url.tqfind( '.' ) ); + TQString fileName = TQString( "sound%1" ).tqarg( m_numSound++ ) + extension; fileName = "sounds/" + fileName; KoStoreDevice* out = m_chain->storageFile( fileName, KoStore::Write ); if (out) { if (!file.open(IO_ReadOnly)) - return QString::null; + return TQString(); - QByteArray data(8*1024); + TQByteArray data(8*1024); uint total = 0; for ( int block = 0; ( block = file.readBlock(data.data(), data.size()) ) > 0; @@ -2093,9 +2093,9 @@ QString OoImpressImport::storeSound(const QDomElement & object, QDomElement & p, file.close(); } else - return QString::null; + return TQString(); - QDomElement key = doc.createElement("FILE"); + TQDomElement key = doc.createElement("FILE"); key.setAttribute("name", fileName); key.setAttribute("filename", url); p.appendChild(key); @@ -2103,29 +2103,29 @@ QString OoImpressImport::storeSound(const QDomElement & object, QDomElement & p, return url; } -QDomElement OoImpressImport::saveHelper(const QString &tmpText, QDomDocument &doc) +TQDomElement OoImpressImport::saveHelper(const TQString &tmpText, TQDomDocument &doc) { - QDomElement element=doc.createElement("TEXT"); + TQDomElement element=doc.createElement("TEXT"); if(tmpText.stripWhiteSpace().isEmpty()) // ### careful, this also strips \t and \n .... - // working around a bug in QDom + // working around a bug in TQDom element.setAttribute("whitespace", tmpText.length()); element.appendChild(doc.createTextNode(tmpText)); return element; } -void OoImpressImport::appendPoints(QDomDocument& doc, QDomElement& e, const QDomElement& object) +void OoImpressImport::appendPoints(TQDomDocument& doc, TQDomElement& e, const TQDomElement& object) { - QDomElement ptsElem = doc.createElement("POINTS"); + TQDomElement ptsElem = doc.createElement("POINTS"); - QStringList ptList = QStringList::split(' ', object.attributeNS( ooNS::draw, "points", QString::null)); + TQStringList ptList = TQStringList::split(' ', object.attributeNS( ooNS::draw, "points", TQString())); - QString pt_x, pt_y; + TQString pt_x, pt_y; double tmp_x, tmp_y; - for (QStringList::Iterator it = ptList.begin(); it != ptList.end(); ++it) + for (TQStringList::Iterator it = ptList.begin(); it != ptList.end(); ++it) { - QDomElement point = doc.createElement("Point"); + TQDomElement point = doc.createElement("Point"); tmp_x = (*it).section(',',0,0).toInt() / 100; tmp_y = (*it).section(',',1,1).toInt() / 100; @@ -2144,37 +2144,37 @@ void OoImpressImport::appendPoints(QDomDocument& doc, QDomElement& e, const QDom e.appendChild(ptsElem); } -void OoImpressImport::appendField(QDomDocument& doc, QDomElement& e, const QDomElement& object, uint pos) +void OoImpressImport::appendField(TQDomDocument& doc, TQDomElement& e, const TQDomElement& object, uint pos) { - const QString tag = object.localName(); - const QString ns = object.namespaceURI(); + const TQString tag = object.localName(); + const TQString ns = object.namespaceURI(); const bool isTextNS = ns == ooNS::text; - QDomElement custom = doc.createElement("CUSTOM"); + TQDomElement custom = doc.createElement("CUSTOM"); custom.setAttribute("pos", pos); - QDomElement variable = doc.createElement("VARIABLE"); + TQDomElement variable = doc.createElement("VARIABLE"); if (isTextNS && tag == "date") { - QDateTime dt(QDate::fromString(object.attributeNS( ooNS::text, "date-value", QString::null), Qt::ISODate)); + TQDateTime dt(TQDate::fromString(object.attributeNS( ooNS::text, "date-value", TQString()), Qt::ISODate)); - bool fixed = (object.hasAttributeNS( ooNS::text, "fixed") && object.attributeNS( ooNS::text, "fixed", QString::null)=="true"); + bool fixed = (object.hasAttributeNS( ooNS::text, "fixed") && object.attributeNS( ooNS::text, "fixed", TQString())=="true"); if (!dt.isValid()) { - dt = QDateTime::currentDateTime(); // OOo docs say so :) + dt = TQDateTime::tqcurrentDateTime(); // OOo docs say so :) fixed = false; } - QDomElement typeElem = doc.createElement("TYPE"); + TQDomElement typeElem = doc.createElement("TYPE"); typeElem.setAttribute("key", "DATE0locale"); // ### find out the correlation between KOffice and OOo date/time types typeElem.setAttribute("type", 0); // VT_DATE typeElem.setAttribute("text", object.text()); variable.appendChild(typeElem); - const QDate date(dt.date()); - const QTime time(dt.time()); - QDomElement dateElement = doc.createElement("DATE"); + const TQDate date(dt.date()); + const TQTime time(dt.time()); + TQDomElement dateElement = doc.createElement("DATE"); dateElement.setAttribute("subtype", fixed ? 0 : 1); // VST_DATE_FIX, VST_DATE_CURRENT dateElement.setAttribute("fix", fixed ? 1 : 0); dateElement.setAttribute("day", date.day()); @@ -2184,57 +2184,57 @@ void OoImpressImport::appendField(QDomDocument& doc, QDomElement& e, const QDomE dateElement.setAttribute("minute", time.minute()); dateElement.setAttribute("second", time.second()); if (object.hasAttributeNS( ooNS::text, "date-adjust")) - dateElement.setAttribute("correct", object.attributeNS( ooNS::text, "date-adjust", QString::null)); + dateElement.setAttribute("correct", object.attributeNS( ooNS::text, "date-adjust", TQString())); variable.appendChild(dateElement); } else if (isTextNS && tag == "time") { - // Use QDateTime to work around a possible problem of QTime::FromString in Qt 3.2.2 - QDateTime dt(QDateTime::fromString(object.attributeNS( ooNS::text, "time-value", QString::null), Qt::ISODate)); + // Use TQDateTime to work around a possible problem of TQTime::FromString in TQt 3.2.2 + TQDateTime dt(TQDateTime::fromString(object.attributeNS( ooNS::text, "time-value", TQString()), Qt::ISODate)); - bool fixed = (object.hasAttributeNS( ooNS::text, "fixed") && object.attributeNS( ooNS::text, "fixed", QString::null)=="true"); + bool fixed = (object.hasAttributeNS( ooNS::text, "fixed") && object.attributeNS( ooNS::text, "fixed", TQString())=="true"); if (!dt.isValid()) { - dt = QDateTime::currentDateTime(); // OOo docs say so :) + dt = TQDateTime::tqcurrentDateTime(); // OOo docs say so :) fixed = false; } - QDomElement typeElem = doc.createElement("TYPE"); + TQDomElement typeElem = doc.createElement("TYPE"); typeElem.setAttribute("key", "TIMElocale"); // ### find out the correlation between KOffice and OOo date/time types typeElem.setAttribute("type", 2); // VT_TIME typeElem.setAttribute("text", object.text()); variable.appendChild(typeElem); - const QTime time(dt.time()); - QDomElement timeElement = doc.createElement("TIME"); + const TQTime time(dt.time()); + TQDomElement timeElement = doc.createElement("TIME"); timeElement.setAttribute("subtype", fixed ? 0 : 1); // VST_TIME_FIX, VST_TIME_CURRENT timeElement.setAttribute("fix", fixed ? 1 : 0); timeElement.setAttribute("hour", time.hour()); timeElement.setAttribute("minute", time.minute()); timeElement.setAttribute("second", time.second()); /*if (object.hasAttributeNS( ooNS::text, "time-adjust")) - timeElem.setAttribute("correct", object.attributeNS( ooNS::text, "time-adjust", QString::null));*/ // ### TODO + timeElem.setAttribute("correct", object.attributeNS( ooNS::text, "time-adjust", TQString()));*/ // ### TODO variable.appendChild(timeElement); } else if (isTextNS && tag == "page-number") { - QDomElement typeElem = doc.createElement("TYPE"); + TQDomElement typeElem = doc.createElement("TYPE"); typeElem.setAttribute("key", "NUMBER"); typeElem.setAttribute("type", 4); // VT_PGNUM typeElem.setAttribute("text", object.text()); variable.appendChild(typeElem); - QDomElement pgNumElem = doc.createElement("PGNUM"); + TQDomElement pgNumElem = doc.createElement("PGNUM"); int subtype = 0; // VST_PGNUM_CURRENT if (object.hasAttributeNS( ooNS::text, "select-page")) { - const QString select = object.attributeNS( ooNS::text, "select-page", QString::null); + const TQString select = object.attributeNS( ooNS::text, "select-page", TQString()); if (select == "previous") subtype = 3; // VST_PGNUM_PREVIOUS @@ -2251,7 +2251,7 @@ void OoImpressImport::appendField(QDomDocument& doc, QDomElement& e, const QDomE } else if (isTextNS && tag == "file-name") { - QDomElement typeElem = doc.createElement("TYPE"); + TQDomElement typeElem = doc.createElement("TYPE"); typeElem.setAttribute("key", "STRING"); typeElem.setAttribute("type", 8); // VT_FIELD typeElem.setAttribute("text", object.text()); @@ -2262,7 +2262,7 @@ void OoImpressImport::appendField(QDomDocument& doc, QDomElement& e, const QDomE if (object.hasAttributeNS( ooNS::text, "display")) { - const QString display = object.attributeNS( ooNS::text, "display", QString::null); + const TQString display = object.attributeNS( ooNS::text, "display", TQString()); if (display == "path") subtype = 1; // VST_DIRECTORYNAME @@ -2274,7 +2274,7 @@ void OoImpressImport::appendField(QDomDocument& doc, QDomElement& e, const QDomE subtype = 5; // VST_PATHFILENAME } - QDomElement fileNameElem = doc.createElement("FIELD"); + TQDomElement fileNameElem = doc.createElement("FIELD"); fileNameElem.setAttribute("subtype", subtype); fileNameElem.setAttribute("value", object.text()); @@ -2283,7 +2283,7 @@ void OoImpressImport::appendField(QDomDocument& doc, QDomElement& e, const QDomE else if (isTextNS && tag == "author-name" || isTextNS && tag == "author-initials") { - QDomElement typeElem = doc.createElement("TYPE"); + TQDomElement typeElem = doc.createElement("TYPE"); typeElem.setAttribute("key", "STRING"); typeElem.setAttribute("type", 8); // VT_FIELD typeElem.setAttribute("text", object.text()); @@ -2295,7 +2295,7 @@ void OoImpressImport::appendField(QDomDocument& doc, QDomElement& e, const QDomE if (isTextNS && tag == "author-initials") subtype = 16; // VST_INITIAL - QDomElement authorElem = doc.createElement("FIELD"); + TQDomElement authorElem = doc.createElement("FIELD"); authorElem.setAttribute("subtype", subtype); authorElem.setAttribute("value", object.text()); @@ -2306,20 +2306,20 @@ void OoImpressImport::appendField(QDomDocument& doc, QDomElement& e, const QDomE e.appendChild(custom); } -void OoImpressImport::createPresentationAnimation(const QDomElement& element) +void OoImpressImport::createPresentationAnimation(const TQDomElement& element) { int order = 0; - QDomElement e; + TQDomElement e; forEachElement( e, element ) { - const QString localName = e.localName(); - const QString ns = e.namespaceURI(); - if ( ns == ooNS::presentation && localName == "show-shape" && e.hasAttributeNS( ooNS::draw, "shape-id" ) ) + const TQString localName = e.localName(); + const TQString ns = e.namespaceURI(); + if ( ns == ooNS::presentation && localName == "show-tqshape" && e.hasAttributeNS( ooNS::draw, "tqshape-id" ) ) { - QString name = e.attributeNS( ooNS::draw, "shape-id", QString::null ); + TQString name = e.attributeNS( ooNS::draw, "tqshape-id", TQString() ); //kdDebug(30518)<<" insert animation style : name :"<element = ep; lst->order = order; m_animations.insert( name, lst ); @@ -2328,41 +2328,41 @@ void OoImpressImport::createPresentationAnimation(const QDomElement& element) } } -QDomElement OoImpressImport::findAnimationByObjectID(const QString & id, int & order) +TQDomElement OoImpressImport::findAnimationByObjectID(const TQString & id, int & order) { - kdDebug(30518)<<"QDomElement OoImpressImport::findAnimationByObjectID(const QString & id) :"<element ); !node.isNull(); node = node.nextSibling()) + return TQDomElement(); + for (TQDomNode node = *( animation->element ); !node.isNull(); node = node.nextSibling()) { - QDomElement e = node.toElement(); + TQDomElement e = node.toElement(); order = animation->order; - kdDebug(30518)<<"e.tagName() :"< #include -#include -#include -#include +#include +#include +#include #include #include @@ -34,83 +34,84 @@ class KZip; struct animationList { - QDomElement *element; + TQDomElement *element; int order; }; class OoImpressImport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - OoImpressImport( KoFilter * parent, const char * name, const QStringList & ); + OoImpressImport( KoFilter * tqparent, const char * name, const TQStringList & ); virtual ~OoImpressImport(); - virtual KoFilter::ConversionStatus convert( QCString const & from, QCString const & to ); + virtual KoFilter::ConversiontqStatus convert( TQCString const & from, TQCString const & to ); private: - void createDocumentInfo( QDomDocument &docinfo ); - void createDocumentContent( QDomDocument &doccontent ); - void createStyleMap( QDomDocument &docstyles ); - void insertDraws( const QDomElement& styles ); - void insertStyles( const QDomElement& styles ); - void insertStylesPresentation( const QDomElement& styles ); - - void fillStyleStack( const QDomElement& object,bool sticky = false ); - void addStyles( const QDomElement* style ); - void appendName(QDomDocument& doc, QDomElement& e, const QDomElement& object); - void append2DGeometry( QDomDocument& doc, QDomElement& e, const QDomElement& object, int offset ); - bool appendLineGeometry( QDomDocument& doc, QDomElement& e, const QDomElement& object, int offset ); - void appendPoints(QDomDocument& doc, QDomElement& e, const QDomElement& object); - void appendPie( QDomDocument& doc, QDomElement& e, const QDomElement& object ); - void appendImage( QDomDocument& doc, QDomElement& e, QDomElement& p, const QDomElement& object ); - void appendBackgroundImage( QDomDocument& doc, QDomElement& e, QDomElement& p, const QDomElement& object ); - void appendBackgroundGradient( QDomDocument& doc, QDomElement& e, const QDomElement& object ); - void appendRounding( QDomDocument& doc, QDomElement& e, const QDomElement& object ); - void appendPen( QDomDocument& doc, QDomElement& e ); - void appendBrush( QDomDocument& doc, QDomElement& e ); - void appendShadow( QDomDocument& doc, QDomElement& e ); - void appendLineEnds( QDomDocument& doc, QDomElement& e, bool _orderEndStartLine = true ); - void appendTextObjectMargin( QDomDocument& doc, QDomElement& e ); - void appendField(QDomDocument& doc, QDomElement& e, const QDomElement& object, uint pos); - void createPresentationAnimation(const QDomElement& element); - QDomElement findAnimationByObjectID(const QString & id, int & order); - - void appendObjectEffect(QDomDocument& doc, QDomElement& e, const QDomElement& object, QDomElement& sound); - void appendBackgroundPage( QDomDocument &doc, QDomElement &e,QDomElement & pictureElement, QDomElement &soundElement ); - - QDomElement saveHelper(const QString &tmpText, QDomDocument &doc); - void appendObject(QDomNode & drawPage, QDomDocument & doc, QDomElement & soundElement, QDomElement & pictureElement, QDomElement & pageNoteElement, QDomElement &objectElement,double offset, bool sticky = false); - - QString storeImage( const QDomElement& object ); - QString storeSound(const QDomElement & object, QDomElement & p, QDomDocument & doc); - QDomElement parseTextBox( QDomDocument& doc, const QDomElement& textBox ); - bool pushListLevelStyle( const QString& listStyleName, int level ); - bool pushListLevelStyle( const QString& listStyleName, QDomElement& fullListStyle, int level ); - void applyListStyle( QDomElement& paragraph ); - void parseList( QDomDocument& doc, QDomElement& textObjectElement, const QDomElement& list ); - void parseParagraphs( QDomDocument& doc, QDomElement& textObjectElement, const QDomElement& textBox ); - QDomElement parseParagraph( QDomDocument& doc, const QDomElement& paragraph ); - void parseSpanOrSimilar( QDomDocument& doc, const QDomElement& parent, - QDomElement& outputParagraph, uint& pos); - bool parseSettings( QDomDocument &doc, QDomElement &helpLineElement, QDomElement &attributeElement ); - void parseHelpLine( QDomDocument &doc,QDomElement &helpLineElement, const QString &text ); - - KoFilter::ConversionStatus openFile(); - KoFilter::ConversionStatus loadAndParse(const QString& filename, QDomDocument& doc); + void createDocumentInfo( TQDomDocument &docinfo ); + void createDocumentContent( TQDomDocument &doccontent ); + void createStyleMap( TQDomDocument &docstyles ); + void insertDraws( const TQDomElement& styles ); + void insertStyles( const TQDomElement& styles ); + void insertStylesPresentation( const TQDomElement& styles ); + + void fillStyleStack( const TQDomElement& object,bool sticky = false ); + void addStyles( const TQDomElement* style ); + void appendName(TQDomDocument& doc, TQDomElement& e, const TQDomElement& object); + void append2DGeometry( TQDomDocument& doc, TQDomElement& e, const TQDomElement& object, int offset ); + bool appendLineGeometry( TQDomDocument& doc, TQDomElement& e, const TQDomElement& object, int offset ); + void appendPoints(TQDomDocument& doc, TQDomElement& e, const TQDomElement& object); + void appendPie( TQDomDocument& doc, TQDomElement& e, const TQDomElement& object ); + void appendImage( TQDomDocument& doc, TQDomElement& e, TQDomElement& p, const TQDomElement& object ); + void appendBackgroundImage( TQDomDocument& doc, TQDomElement& e, TQDomElement& p, const TQDomElement& object ); + void appendBackgroundGradient( TQDomDocument& doc, TQDomElement& e, const TQDomElement& object ); + void appendRounding( TQDomDocument& doc, TQDomElement& e, const TQDomElement& object ); + void appendPen( TQDomDocument& doc, TQDomElement& e ); + void appendBrush( TQDomDocument& doc, TQDomElement& e ); + void appendShadow( TQDomDocument& doc, TQDomElement& e ); + void appendLineEnds( TQDomDocument& doc, TQDomElement& e, bool _orderEndStartLine = true ); + void appendTextObjectMargin( TQDomDocument& doc, TQDomElement& e ); + void appendField(TQDomDocument& doc, TQDomElement& e, const TQDomElement& object, uint pos); + void createPresentationAnimation(const TQDomElement& element); + TQDomElement findAnimationByObjectID(const TQString & id, int & order); + + void appendObjectEffect(TQDomDocument& doc, TQDomElement& e, const TQDomElement& object, TQDomElement& sound); + void appendBackgroundPage( TQDomDocument &doc, TQDomElement &e,TQDomElement & pictureElement, TQDomElement &soundElement ); + + TQDomElement saveHelper(const TQString &tmpText, TQDomDocument &doc); + void appendObject(TQDomNode & drawPage, TQDomDocument & doc, TQDomElement & soundElement, TQDomElement & pictureElement, TQDomElement & pageNoteElement, TQDomElement &objectElement,double offset, bool sticky = false); + + TQString storeImage( const TQDomElement& object ); + TQString storeSound(const TQDomElement & object, TQDomElement & p, TQDomDocument & doc); + TQDomElement parseTextBox( TQDomDocument& doc, const TQDomElement& textBox ); + bool pushListLevelStyle( const TQString& listStyleName, int level ); + bool pushListLevelStyle( const TQString& listStyleName, TQDomElement& fullListStyle, int level ); + void applyListStyle( TQDomElement& paragraph ); + void parseList( TQDomDocument& doc, TQDomElement& textObjectElement, const TQDomElement& list ); + void parseParagraphs( TQDomDocument& doc, TQDomElement& textObjectElement, const TQDomElement& textBox ); + TQDomElement parseParagraph( TQDomDocument& doc, const TQDomElement& paragraph ); + void parseSpanOrSimilar( TQDomDocument& doc, const TQDomElement& tqparent, + TQDomElement& outputParagraph, uint& pos); + bool parseSettings( TQDomDocument &doc, TQDomElement &helpLineElement, TQDomElement &attributeElement ); + void parseHelpLine( TQDomDocument &doc,TQDomElement &helpLineElement, const TQString &text ); + + KoFilter::ConversiontqStatus openFile(); + KoFilter::ConversiontqStatus loadAndParse(const TQString& filename, TQDomDocument& doc); int m_numPicture; int m_numSound; - QDomDocument m_content; - QDomDocument m_meta; - QDomDocument m_settings; - QDict m_styles, m_draws, m_stylesPresentation; - QDict m_listStyles; - QDict m_animations; + TQDomDocument m_content; + TQDomDocument m_meta; + TQDomDocument m_settings; + TQDict m_styles, m_draws, m_stylesPresentation; + TQDict m_listStyles; + TQDict m_animations; bool m_insideOrderedList; bool m_nextItemIsListItem; // only the first elem inside list-item is numbered int m_restartNumbering; - QString m_currentListStyleName; + TQString m_currentListStyleName; KZip * m_zip; KoStyleStack m_styleStack; diff --git a/filters/kpresenter/ooimpress/status.html b/filters/kpresenter/ooimpress/status.html index b0062c04..f64a38b0 100644 --- a/filters/kpresenter/ooimpress/status.html +++ b/filters/kpresenter/ooimpress/status.html @@ -61,7 +61,7 @@ - Rounding (for rectangles)
- Shadow
- Text margins
- - Vertical alignment for text
+ -Qt::Vertical tqalignment for text
- Text style (underline, sub/super script, bold, italic, strikeout, background color)
- Paragraph style (line spacing, offset before/after paragraph, indent first/right/left, borders)
- Presentation settings
@@ -168,7 +168,7 @@ - Settings element (snap line drawing)
- Export Transparency
- Export Group Object
- - Vertical alignment for text
+ -Qt::Vertical tqalignment for text
- Text margins
- Export title/keyword/subject
- Custom Slide Show
diff --git a/filters/kpresenter/ooimpress/stylefactory.cc b/filters/kpresenter/ooimpress/stylefactory.cc index 0c7d9a2c..18ce339b 100644 --- a/filters/kpresenter/ooimpress/stylefactory.cc +++ b/filters/kpresenter/ooimpress/stylefactory.cc @@ -19,8 +19,8 @@ #include "stylefactory.h" -#include -#include +#include +#include #include #include @@ -55,7 +55,7 @@ StyleFactory::~StyleFactory() { } -void StyleFactory::addOfficeStyles( QDomDocument & doc, QDomElement & styles ) +void StyleFactory::addOfficeStyles( TQDomDocument & doc, TQDomElement & styles ) { StrokeDashStyle * sd; for ( sd = m_strokeDashStyles.first(); sd ; sd = m_strokeDashStyles.next() ) @@ -78,12 +78,12 @@ void StyleFactory::addOfficeStyles( QDomDocument & doc, QDomElement & styles ) gr->toXML( doc, styles ); } -void StyleFactory::addOfficeMaster( QDomDocument & doc, QDomElement & master ) +void StyleFactory::addOfficeMaster( TQDomDocument & doc, TQDomElement & master ) { PageMasterStyle * p; for ( p = m_pageMasterStyles.first(); p ; p = m_pageMasterStyles.next() ) { - QDomElement masterPage = doc.createElement( "style:master-page" ); + TQDomElement masterPage = doc.createElement( "style:master-page" ); masterPage.setAttribute( "style:name", p->style() ); masterPage.setAttribute( "style:page-master-name", p->name() ); masterPage.setAttribute( "draw:style-name", "dp1" ); @@ -91,7 +91,7 @@ void StyleFactory::addOfficeMaster( QDomDocument & doc, QDomElement & master ) } } -void StyleFactory::addOfficeAutomatic( QDomDocument & doc, QDomElement & automatic ) +void StyleFactory::addOfficeAutomatic( TQDomDocument & doc, TQDomElement & automatic ) { PageMasterStyle * p; for ( p = m_pageMasterStyles.first(); p ; p = m_pageMasterStyles.next() ) @@ -100,7 +100,7 @@ void StyleFactory::addOfficeAutomatic( QDomDocument & doc, QDomElement & automat } } -void StyleFactory::addAutomaticStyles( QDomDocument & doc, QDomElement & autoStyles ) +void StyleFactory::addAutomaticStyles( TQDomDocument & doc, TQDomElement & autoStyles ) { ListStyle * l; for ( l = m_listStyles.first(); l ; l = m_listStyles.next() ) @@ -124,7 +124,7 @@ void StyleFactory::addAutomaticStyles( QDomDocument & doc, QDomElement & autoSty pg->toXML( doc, autoStyles ); } -QString StyleFactory::createStrokeDashStyle( int style ) +TQString StyleFactory::createStrokeDashStyle( int style ) { StrokeDashStyle * newStrokeDashStyle, * sd; newStrokeDashStyle = new StrokeDashStyle( style ); @@ -141,7 +141,7 @@ QString StyleFactory::createStrokeDashStyle( int style ) return newStrokeDashStyle->name(); } -QString StyleFactory::createGradientStyle( QDomElement & gradient ) +TQString StyleFactory::createGradientStyle( TQDomElement & gradient ) { GradientStyle * newGradientStyle, * g; newGradientStyle = new GradientStyle( gradient, m_gradientStyles.count() + 1 ); @@ -158,7 +158,7 @@ QString StyleFactory::createGradientStyle( QDomElement & gradient ) return newGradientStyle->name(); } -QString StyleFactory::createMarkerStyle( int style ) +TQString StyleFactory::createMarkerStyle( int style ) { MarkerStyle * newMarkerStyle, * m; newMarkerStyle = new MarkerStyle( style ); @@ -175,7 +175,7 @@ QString StyleFactory::createMarkerStyle( int style ) return newMarkerStyle->name(); } -QString StyleFactory::createHatchStyle( int style, QString & color ) +TQString StyleFactory::createHatchStyle( int style, TQString & color ) { HatchStyle * newHatchStyle, * h; newHatchStyle = new HatchStyle( style, color ); @@ -192,7 +192,7 @@ QString StyleFactory::createHatchStyle( int style, QString & color ) return newHatchStyle->name(); } -QString StyleFactory::createListStyle( QDomElement & e ) +TQString StyleFactory::createListStyle( TQDomElement & e ) { ListStyle * newListStyle, * l; newListStyle = new ListStyle( e, m_listStyles.count() + 1 ); @@ -209,7 +209,7 @@ QString StyleFactory::createListStyle( QDomElement & e ) return newListStyle->name(); } -QString StyleFactory::createPageStyle( QDomElement & e ) +TQString StyleFactory::createPageStyle( TQDomElement & e ) { PageStyle * newPageStyle, * p; newPageStyle = new PageStyle( this, e, m_pageStyles.count() + 1 ); @@ -226,7 +226,7 @@ QString StyleFactory::createPageStyle( QDomElement & e ) return newPageStyle->name(); } -QString StyleFactory::createTextStyle( QDomElement & e ) +TQString StyleFactory::createTextStyle( TQDomElement & e ) { TextStyle * newTextStyle, * t; newTextStyle = new TextStyle( e, m_textStyles.count() + 1 ); @@ -243,7 +243,7 @@ QString StyleFactory::createTextStyle( QDomElement & e ) return newTextStyle->name(); } -QString StyleFactory::createGraphicStyle( QDomElement & e ) +TQString StyleFactory::createGraphicStyle( TQDomElement & e ) { GraphicStyle * newGraphicStyle, * g; newGraphicStyle = new GraphicStyle( this, e, m_graphicStyles.count() ); @@ -260,7 +260,7 @@ QString StyleFactory::createGraphicStyle( QDomElement & e ) return newGraphicStyle->name(); } -QString StyleFactory::createParagraphStyle( QDomElement & e ) +TQString StyleFactory::createParagraphStyle( TQDomElement & e ) { ParagraphStyle * newParagraphStyle, * p; newParagraphStyle = new ParagraphStyle( e, m_paragraphStyles.count() + 1 ); @@ -277,7 +277,7 @@ QString StyleFactory::createParagraphStyle( QDomElement & e ) return newParagraphStyle->name(); } -QString StyleFactory::createPageMasterStyle( QDomElement & e ) +TQString StyleFactory::createPageMasterStyle( TQDomElement & e ) { PageMasterStyle * newPMStyle, * p; newPMStyle = new PageMasterStyle( e, m_pageMasterStyles.count() ); @@ -294,11 +294,11 @@ QString StyleFactory::createPageMasterStyle( QDomElement & e ) return newPMStyle->style(); } -QString StyleFactory::toCM( const QString & point ) +TQString StyleFactory::toCM( const TQString & point ) { double pt = point.toFloat(); double cm = KoUnit::toCM( pt ); - return QString( "%1cm" ).arg ( cm ); + return TQString( "%1cm" ).arg ( cm ); } StrokeDashStyle::StrokeDashStyle( int style ) @@ -340,9 +340,9 @@ StrokeDashStyle::StrokeDashStyle( int style ) } } -void StrokeDashStyle::toXML( QDomDocument & doc, QDomElement & e ) const +void StrokeDashStyle::toXML( TQDomDocument & doc, TQDomElement & e ) const { - QDomElement strokeDash = doc.createElement( "draw:stroke-dash" ); + TQDomElement strokeDash = doc.createElement( "draw:stroke-dash" ); strokeDash.setAttribute( "draw:name", m_name ); if ( !m_style.isNull() ) strokeDash.setAttribute( "draw:style", m_style ); @@ -360,9 +360,9 @@ void StrokeDashStyle::toXML( QDomDocument & doc, QDomElement & e ) const e.appendChild( strokeDash ); } -GradientStyle::GradientStyle( QDomElement & gradient, int index ) +GradientStyle::GradientStyle( TQDomElement & gradient, int index ) { - m_name = QString( "Gradient %1" ).arg( index ); + m_name = TQString( "Gradient %1" ).tqarg( index ); m_start_intensity = "100%"; m_end_intensity = "100%"; m_border = "0%"; @@ -371,10 +371,10 @@ GradientStyle::GradientStyle( QDomElement & gradient, int index ) if ( gradient.nodeName() == "PAGE" ) { // gradient from page background - QDomElement backColor1 = gradient.namedItem( "BACKCOLOR1" ).toElement(); - QDomElement backColor2 = gradient.namedItem( "BACKCOLOR2" ).toElement(); - QDomElement bcType = gradient.namedItem( "BCTYPE" ).toElement(); - QDomElement bGradient = gradient.namedItem( "BGRADIENT" ).toElement(); + TQDomElement backColor1 = gradient.namedItem( "BACKCOLOR1" ).toElement(); + TQDomElement backColor2 = gradient.namedItem( "BACKCOLOR2" ).toElement(); + TQDomElement bcType = gradient.namedItem( "BCTYPE" ).toElement(); + TQDomElement bGradient = gradient.namedItem( "BGRADIENT" ).toElement(); if ( !backColor1.isNull() ) m_start_color = backColor1.attribute( "color" ); @@ -393,8 +393,8 @@ GradientStyle::GradientStyle( QDomElement & gradient, int index ) { int cx = bGradient.attribute( "xfactor" ).toInt(); int cy = bGradient.attribute( "yfactor" ).toInt(); - m_cx = QString( "%1%" ).arg( cx / 4 + 50 ); - m_cy = QString( "%1%" ).arg( cy / 4 + 50 ); + m_cx = TQString( "%1%" ).tqarg( cx / 4 + 50 ); + m_cy = TQString( "%1%" ).tqarg( cy / 4 + 50 ); } } @@ -419,8 +419,8 @@ GradientStyle::GradientStyle( QDomElement & gradient, int index ) { int cx = gradient.attribute( "xfactor" ).toInt(); int cy = gradient.attribute( "yfactor" ).toInt(); - m_cx = QString( "%1%" ).arg( cx / 4 + 50 ); - m_cy = QString( "%1%" ).arg( cy / 4 + 50 ); + m_cx = TQString( "%1%" ).tqarg( cx / 4 + 50 ); + m_cy = TQString( "%1%" ).tqarg( cy / 4 + 50 ); } } @@ -459,9 +459,9 @@ GradientStyle::GradientStyle( QDomElement & gradient, int index ) } } -void GradientStyle::toXML( QDomDocument & doc, QDomElement & e ) const +void GradientStyle::toXML( TQDomDocument & doc, TQDomElement & e ) const { - QDomElement gradient = doc.createElement( "draw:gradient" ); + TQDomElement gradient = doc.createElement( "draw:gradient" ); gradient.setAttribute( "draw:name", m_name ); if ( !m_style.isNull() ) gradient.setAttribute( "draw:style", m_style ); @@ -527,9 +527,9 @@ MarkerStyle::MarkerStyle( int style ) } } -void MarkerStyle::toXML( QDomDocument & doc, QDomElement & e ) const +void MarkerStyle::toXML( TQDomDocument & doc, TQDomElement & e ) const { - QDomElement marker = doc.createElement( "draw:marker" ); + TQDomElement marker = doc.createElement( "draw:marker" ); marker.setAttribute( "draw:name", m_name ); if ( !m_viewBox.isNull() ) marker.setAttribute( "svg:viewBox", m_viewBox ); @@ -539,7 +539,7 @@ void MarkerStyle::toXML( QDomDocument & doc, QDomElement & e ) const e.appendChild( marker ); } -HatchStyle::HatchStyle( int style, QString & color ) +HatchStyle::HatchStyle( int style, TQString & color ) { m_color = color; @@ -584,9 +584,9 @@ HatchStyle::HatchStyle( int style, QString & color ) } } -void HatchStyle::toXML( QDomDocument & doc, QDomElement & e ) const +void HatchStyle::toXML( TQDomDocument & doc, TQDomElement & e ) const { - QDomElement hatch = doc.createElement( "draw:hatch" ); + TQDomElement hatch = doc.createElement( "draw:hatch" ); hatch.setAttribute( "draw:name", m_name ); if ( !m_style.isNull() ) hatch.setAttribute( "draw:style", m_style ); @@ -600,23 +600,23 @@ void HatchStyle::toXML( QDomDocument & doc, QDomElement & e ) const e.appendChild( hatch ); } -FillImageStyle::FillImageStyle( QString & name ) +FillImageStyle::FillImageStyle( TQString & name ) { } -void FillImageStyle::toXML( QDomDocument & doc, QDomElement & e ) const +void FillImageStyle::toXML( TQDomDocument & doc, TQDomElement & e ) const { } -PageMasterStyle::PageMasterStyle( QDomElement & e, const uint index ) +PageMasterStyle::PageMasterStyle( TQDomElement & e, const uint index ) { - QDomNode borders = e.namedItem( "PAPERBORDERS" ); - QDomElement b = borders.toElement(); + TQDomNode borders = e.namedItem( "PAPERBORDERS" ); + TQDomElement b = borders.toElement(); - m_name = QString( "PM%1" ).arg( index ); - m_style = QString( "Default%1" ).arg( index ); + m_name = TQString( "PM%1" ).tqarg( index ); + m_style = TQString( "Default%1" ).tqarg( index ); m_margin_top = StyleFactory::toCM( b.attribute( "ptTop" ) ); m_margin_bottom = StyleFactory::toCM( b.attribute( "ptBottom" ) ); m_margin_left = StyleFactory::toCM( b.attribute( "ptLeft" ) ); @@ -626,12 +626,12 @@ PageMasterStyle::PageMasterStyle( QDomElement & e, const uint index ) m_orientation = "landscape"; } -void PageMasterStyle::toXML( QDomDocument & doc, QDomElement & e ) const +void PageMasterStyle::toXML( TQDomDocument & doc, TQDomElement & e ) const { - QDomElement style = doc.createElement( "style:page-master" ); + TQDomElement style = doc.createElement( "style:page-master" ); style.setAttribute( "style:name", "PM0" ); - QDomElement properties = doc.createElement( "style:properties" ); + TQDomElement properties = doc.createElement( "style:properties" ); properties.setAttribute( "fo:margin-top", m_margin_top ); properties.setAttribute( "fo:margin-bottom", m_margin_bottom ); properties.setAttribute( "fo:margin-left", m_margin_left ); @@ -655,9 +655,9 @@ bool PageMasterStyle::operator==( const PageMasterStyle & pageMasterStyle ) cons m_orientation == pageMasterStyle.m_orientation ); } -PageStyle::PageStyle( StyleFactory * styleFactory, QDomElement & e, const uint index ) +PageStyle::PageStyle( StyleFactory * styleFactory, TQDomElement & e, const uint index ) { - QDomElement backMaster = e.namedItem( "BACKMASTER" ).toElement(); + TQDomElement backMaster = e.namedItem( "BACKMASTER" ).toElement(); if( !backMaster.isNull()) { int tmp=0; @@ -675,21 +675,21 @@ PageStyle::PageStyle( StyleFactory * styleFactory, QDomElement & e, const uint i m_bg_objects_visible = "true"; } - m_name = QString( "dp%1" ).arg( index ); + m_name = TQString( "dp%1" ).tqarg( index ); // check if this is an empty page tag if ( !e.hasChildNodes() ) return; - QDomElement backType = e.namedItem( "BACKTYPE" ).toElement(); + TQDomElement backType = e.namedItem( "BACKTYPE" ).toElement(); if ( backType.isNull() || backType.attribute( "value" ) == "0" ) { // color - QDomElement bcType = e.namedItem( "BCTYPE" ).toElement(); + TQDomElement bcType = e.namedItem( "BCTYPE" ).toElement(); if ( bcType.isNull() || bcType.attribute( "value" ) == "0" ) { // plain - QDomElement backColor = e.namedItem( "BACKCOLOR1" ).toElement(); + TQDomElement backColor = e.namedItem( "BACKCOLOR1" ).toElement(); m_fill = "solid"; m_fill_color = backColor.attribute( "color" ); } @@ -705,23 +705,23 @@ PageStyle::PageStyle( StyleFactory * styleFactory, QDomElement & e, const uint i // picture } - QDomElement pageDuration = e.namedItem( "PGTIMER" ).toElement(); + TQDomElement pageDuration = e.namedItem( "PGTIMER" ).toElement(); if ( !pageDuration.isNull() ) { - QTime time; + TQTime time; time = time.addSecs( pageDuration.attribute("timer").toInt() ); - QString hours( QString::number( time.hour() ).rightJustify( 2, '0' ) ); - QString ms( QString::number( time.minute() ).rightJustify( 2, '0' ) ); - QString sec( QString::number( time.second() ).rightJustify( 2, '0' ) ); + TQString hours( TQString::number( time.hour() ).rightJustify( 2, '0' ) ); + TQString ms( TQString::number( time.minute() ).rightJustify( 2, '0' ) ); + TQString sec( TQString::number( time.second() ).rightJustify( 2, '0' ) ); //ISO8601 chapter 5.5.3.2 - //QDate doesn't encode it as this format. - m_page_duration = QString( "PT%1H%2M%3S" ).arg( hours ).arg( ms ).arg( sec ); + //TQDate doesn't encode it as this format. + m_page_duration = TQString( "PT%1H%2M%3S" ).tqarg( hours ).tqarg( ms ).tqarg( sec ); } - QDomElement pageEffect = e.namedItem( "PGEFFECT" ).toElement(); + TQDomElement pageEffect = e.namedItem( "PGEFFECT" ).toElement(); if ( !pageEffect.isNull() ) { int tmp=0; @@ -842,13 +842,13 @@ PageStyle::PageStyle( StyleFactory * styleFactory, QDomElement & e, const uint i } } -void PageStyle::toXML( QDomDocument & doc, QDomElement & e ) const +void PageStyle::toXML( TQDomDocument & doc, TQDomElement & e ) const { - QDomElement style = doc.createElement( "style:style" ); + TQDomElement style = doc.createElement( "style:style" ); style.setAttribute( "style:name", m_name ); style.setAttribute( "style:family", "drawing-page" ); - QDomElement properties = doc.createElement( "style:properties" ); + TQDomElement properties = doc.createElement( "style:properties" ); properties.setAttribute( "presentation:background-visible", m_bg_visible ); properties.setAttribute( "presentation:background-objects-visible", m_bg_objects_visible ); @@ -897,13 +897,13 @@ bool PageStyle::operator==( const PageStyle & pageStyle ) const m_page_duration == pageStyle.m_page_duration ); } -TextStyle::TextStyle( QDomElement & e, const uint index ) +TextStyle::TextStyle( TQDomElement & e, const uint index ) { - m_name = QString( "T%1" ).arg( index ); + m_name = TQString( "T%1" ).tqarg( index ); if ( e.hasAttribute( "family" ) ) m_font_family = e.attribute( "family" ); if ( e.hasAttribute( "pointSize" ) ) - m_font_size = QString( "%1pt" ).arg( e.attribute( "pointSize" ) ); + m_font_size = TQString( "%1pt" ).tqarg( e.attribute( "pointSize" ) ); if ( e.hasAttribute( "color" ) ) m_color = e.attribute( "color" ); if ( e.hasAttribute( "bold" ) && e.attribute( "bold" ) == "1" ) @@ -921,8 +921,8 @@ TextStyle::TextStyle( QDomElement & e, const uint index ) } if ( e.hasAttribute( "underline" ) ) { - QString underline = e.attribute( "underline" ); - QString style = e.attribute( "underlinestyleline" ); + TQString underline = e.attribute( "underline" ); + TQString style = e.attribute( "underlinestyleline" ); m_text_underline_color = e.attribute( "underlinecolor" ); if ( style == "solid" ) @@ -948,13 +948,13 @@ TextStyle::TextStyle( QDomElement & e, const uint index ) } } -void TextStyle::toXML( QDomDocument & doc, QDomElement & e ) const +void TextStyle::toXML( TQDomDocument & doc, TQDomElement & e ) const { - QDomElement style = doc.createElement( "style:style" ); + TQDomElement style = doc.createElement( "style:style" ); style.setAttribute( "style:name", m_name ); style.setAttribute( "style:family", "text" ); - QDomElement properties = doc.createElement( "style:properties" ); + TQDomElement properties = doc.createElement( "style:properties" ); if ( !m_font_size.isNull() ) properties.setAttribute( "fo:font-size", m_font_size ); if ( !m_font_family.isNull() ) @@ -997,18 +997,18 @@ bool TextStyle::operator==( const TextStyle & textStyle ) const m_text_crossing_out == textStyle.m_text_crossing_out ); } -GraphicStyle::GraphicStyle( StyleFactory * styleFactory, QDomElement & e, const uint index ) +GraphicStyle::GraphicStyle( StyleFactory * styleFactory, TQDomElement & e, const uint index ) { - QDomNode pen = e.namedItem( "PEN" ); - QDomNode brush = e.namedItem( "BRUSH" ); - QDomNode linebegin = e.namedItem( "LINEBEGIN" ); - QDomNode lineend = e.namedItem( "LINEEND" ); - QDomNode gradient = e.namedItem( "GRADIENT" ); - QDomNode shadow = e.namedItem( "SHADOW" ); - QDomNode textObject = e.namedItem( "TEXTOBJ" ); + TQDomNode pen = e.namedItem( "PEN" ); + TQDomNode brush = e.namedItem( "BRUSH" ); + TQDomNode linebegin = e.namedItem( "LINEBEGIN" ); + TQDomNode lineend = e.namedItem( "LINEEND" ); + TQDomNode gradient = e.namedItem( "GRADIENT" ); + TQDomNode shadow = e.namedItem( "SHADOW" ); + TQDomNode textObject = e.namedItem( "TEXTOBJ" ); if ( !textObject.isNull() ) { - QDomElement textObjectElement = textObject.toElement(); + TQDomElement textObjectElement = textObject.toElement(); if ( textObjectElement.hasAttribute( "verticalAlign" ) ) { m_textAlignment = textObjectElement.attribute("verticalAlign"); @@ -1017,28 +1017,28 @@ GraphicStyle::GraphicStyle( StyleFactory * styleFactory, QDomElement & e, const } if ( textObjectElement.hasAttribute( "bleftpt" ) ) { - m_textMarginLeft = QString( "%1pt" ).arg( textObjectElement.attribute( "bleftpt" ) ); + m_textMarginLeft = TQString( "%1pt" ).tqarg( textObjectElement.attribute( "bleftpt" ) ); } if ( textObjectElement.hasAttribute( "bbottompt" ) ) { - m_textMarginBottom = QString( "%1pt" ).arg( textObjectElement.attribute( "bbottompt" ) ); + m_textMarginBottom = TQString( "%1pt" ).tqarg( textObjectElement.attribute( "bbottompt" ) ); } if ( textObjectElement.hasAttribute( "btoppt" ) ) { - m_textMarginTop = QString( "%1pt" ).arg( textObjectElement.attribute( "btoppt" ) ); + m_textMarginTop = TQString( "%1pt" ).tqarg( textObjectElement.attribute( "btoppt" ) ); } if ( textObjectElement.hasAttribute( "brightpt" ) ) { - m_textMarginRight = QString( "%1pt" ).arg( textObjectElement.attribute( "brightpt" ) ); + m_textMarginRight = TQString( "%1pt" ).tqarg( textObjectElement.attribute( "brightpt" ) ); } } - kdDebug(30518)<<" alignment :"<createGradientStyle( g ); } @@ -1096,7 +1096,7 @@ GraphicStyle::GraphicStyle( StyleFactory * styleFactory, QDomElement & e, const if ( !linebegin.isNull() ) { - QDomElement lb = linebegin.toElement(); + TQDomElement lb = linebegin.toElement(); m_marker_start_width = "0.25cm"; int style = lb.attribute( "value" ).toInt(); @@ -1105,7 +1105,7 @@ GraphicStyle::GraphicStyle( StyleFactory * styleFactory, QDomElement & e, const if ( !lineend.isNull() ) { - QDomElement le = lineend.toElement(); + TQDomElement le = lineend.toElement(); m_marker_end_width = "0.25cm"; int style = le.attribute( "value" ).toInt(); @@ -1114,12 +1114,12 @@ GraphicStyle::GraphicStyle( StyleFactory * styleFactory, QDomElement & e, const if ( !shadow.isNull() ) { - QDomElement s = shadow.toElement(); + TQDomElement s = shadow.toElement(); m_shadow = "visible"; m_shadow_color = s.attribute( "color" ); int direction = s.attribute( "direction" ).toInt(); - QString distance = StyleFactory::toCM( s.attribute( "distance" ) ); + TQString distance = StyleFactory::toCM( s.attribute( "distance" ) ); switch ( direction ) { case 1: @@ -1202,15 +1202,15 @@ GraphicStyle::GraphicStyle( const char * name, } -void GraphicStyle::toXML( QDomDocument & doc, QDomElement & e ) const +void GraphicStyle::toXML( TQDomDocument & doc, TQDomElement & e ) const { - QDomElement style = doc.createElement( "style:style" ); + TQDomElement style = doc.createElement( "style:style" ); style.setAttribute( "style:name", m_name ); style.setAttribute( "style:family", "graphics" ); if ( m_name != "standard" ) - style.setAttribute( "style:parent-style-name", "standard" ); + style.setAttribute( "style:tqparent-style-name", "standard" ); - QDomElement properties = doc.createElement( "style:properties" ); + TQDomElement properties = doc.createElement( "style:properties" ); if ( !m_stroke.isNull() ) properties.setAttribute( "draw:stroke", m_stroke ); if ( !m_stroke_dash.isNull() ) @@ -1335,24 +1335,24 @@ bool GraphicStyle::operator==( const GraphicStyle & graphicStyle ) const m_textMarginRight == graphicStyle.m_textMarginRight); } -ParagraphStyle::ParagraphStyle( QDomElement & e, const uint index ) +ParagraphStyle::ParagraphStyle( TQDomElement & e, const uint index ) { // some defaults that may be overwritten m_margin_left = "0cm"; m_margin_right = "0cm"; m_text_indent = "0cm"; - QDomNode shadow = e.namedItem( "SHADOW" ); - QDomNode indents = e.namedItem( "INDENTS" ); - QDomNode offsets = e.namedItem( "OFFSETS" ); - QDomNode leftBorder = e.namedItem( "LEFTBORDER" ); - QDomNode rightBorder = e.namedItem( "RIGHTBORDER" ); - QDomNode topBorder = e.namedItem( "TOPBORDER" ); - QDomNode bottomBorder = e.namedItem( "BOTTOMBORDER" ); - QDomNode lineSpacing = e.namedItem( "LINESPACING" ); - QDomNode counter = e.namedItem( "COUNTER" ); - - m_name = QString( "P%1" ).arg( index ); + TQDomNode shadow = e.namedItem( "SHADOW" ); + TQDomNode indents = e.namedItem( "INDENTS" ); + TQDomNode offsets = e.namedItem( "OFFSETS" ); + TQDomNode leftBorder = e.namedItem( "LEFTBORDER" ); + TQDomNode rightBorder = e.namedItem( "RIGHTBORDER" ); + TQDomNode topBorder = e.namedItem( "TOPBORDER" ); + TQDomNode bottomBorder = e.namedItem( "BOTTOMBORDER" ); + TQDomNode lineSpacing = e.namedItem( "LINESPACING" ); + TQDomNode counter = e.namedItem( "COUNTER" ); + + m_name = TQString( "P%1" ).tqarg( index ); if ( e.hasAttribute( "align" ) ) { int align = e.attribute( "align" ).toInt(); @@ -1375,14 +1375,14 @@ ParagraphStyle::ParagraphStyle( QDomElement & e, const uint index ) if ( !shadow.isNull() ) { - QDomElement s = shadow.toElement(); - QString distance = QString( "%1pt" ).arg( s.attribute( "distance" ) ); + TQDomElement s = shadow.toElement(); + TQString distance = TQString( "%1pt" ).tqarg( s.attribute( "distance" ) ); m_text_shadow = distance + " " + distance; } if ( !indents.isNull() ) { - QDomElement i = indents.toElement(); + TQDomElement i = indents.toElement(); m_margin_left = StyleFactory::toCM( i.attribute( "left" ) ); m_margin_right = StyleFactory::toCM( i.attribute( "right" ) ); m_text_indent = StyleFactory::toCM( i.attribute( "first" ) ); @@ -1390,7 +1390,7 @@ ParagraphStyle::ParagraphStyle( QDomElement & e, const uint index ) if ( !offsets.isNull() ) { - QDomElement o = offsets.toElement(); + TQDomElement o = offsets.toElement(); m_margin_top = StyleFactory::toCM( o.attribute( "before" ) ); m_margin_bottom = StyleFactory::toCM( o.attribute( "after" ) ); } @@ -1406,8 +1406,8 @@ ParagraphStyle::ParagraphStyle( QDomElement & e, const uint index ) if ( !lineSpacing.isNull() ) { - QDomElement l = lineSpacing.toElement(); - QString type = l.attribute( "type" ); + TQDomElement l = lineSpacing.toElement(); + TQString type = l.attribute( "type" ); if ( type == "single" ) m_line_height = "100%"; @@ -1416,7 +1416,7 @@ ParagraphStyle::ParagraphStyle( QDomElement & e, const uint index ) else if ( type == "double" ) m_line_height = "200%"; else if ( type == "multiple" ) - m_line_height = QString( "%1%" ).arg( l.attribute( "spacingvalue" ).toInt() * 100 ); + m_line_height = TQString( "%1%" ).tqarg( l.attribute( "spacingvalue" ).toInt() * 100 ); else if ( type == "custom" ) m_line_spacing = StyleFactory::toCM( l.attribute( "spacingvalue" ) ); else if ( type == "atleast" ) @@ -1427,13 +1427,13 @@ ParagraphStyle::ParagraphStyle( QDomElement & e, const uint index ) m_enable_numbering = "true"; } -void ParagraphStyle::toXML( QDomDocument & doc, QDomElement & e ) const +void ParagraphStyle::toXML( TQDomDocument & doc, TQDomElement & e ) const { - QDomElement style = doc.createElement( "style:style" ); + TQDomElement style = doc.createElement( "style:style" ); style.setAttribute( "style:name", m_name ); style.setAttribute( "style:family", "paragraph" ); - QDomElement properties = doc.createElement( "style:properties" ); + TQDomElement properties = doc.createElement( "style:properties" ); if ( !m_margin_left.isNull() ) properties.setAttribute( "fo:margin-left", m_margin_left ); if ( !m_margin_right.isNull() ) @@ -1488,32 +1488,32 @@ bool ParagraphStyle::operator==( const ParagraphStyle & paragraphStyle ) const m_line_spacing == paragraphStyle.m_line_spacing ); } -QString ParagraphStyle::parseBorder( QDomElement e ) +TQString ParagraphStyle::parseBorder( TQDomElement e ) { - QString style; + TQString style; int _style = e.attribute( "style" ).toInt(); if ( _style == 5 ) style = "double"; else style = "solid"; - QString width = StyleFactory::toCM( e.attribute( "width" ) ); + TQString width = StyleFactory::toCM( e.attribute( "width" ) ); - QColor color( e.attribute( "red" ).toInt(), + TQColor color( e.attribute( "red" ).toInt(), e.attribute( "green" ).toInt(), e.attribute( "blue" ).toInt() ); - return QString( "%1 %2 %3" ).arg( width ).arg( style ).arg( color.name() ); + return TQString( "%1 %2 %3" ).tqarg( width ).tqarg( style ).tqarg( color.name() ); } -ListStyle::ListStyle( QDomElement & e, const uint index ) +ListStyle::ListStyle( TQDomElement & e, const uint index ) { // setting some default values m_min_label_width = 0.6; m_color = "#000000"; m_font_size = "100%"; - m_name = QString( "L%1" ).arg( index ); + m_name = TQString( "L%1" ).tqarg( index ); if ( e.hasAttribute( "type" ) ) { @@ -1569,14 +1569,14 @@ ListStyle::ListStyle( QDomElement & e, const uint index ) m_font_family = e.attribute( "bulletfont" ); } -void ListStyle::toXML( QDomDocument & doc, QDomElement & e ) const +void ListStyle::toXML( TQDomDocument & doc, TQDomElement & e ) const { - QDomElement style = doc.createElement( "text:list-style" ); + TQDomElement style = doc.createElement( "text:list-style" ); style.setAttribute( "style:name", m_name ); for ( int level = 1; level <= 10; level++ ) { - QDomElement listLevelStyle; + TQDomElement listLevelStyle; if ( m_listLevelStyle == LLS_NUMBER ) { listLevelStyle = doc.createElement( "text:list-level-style-number" ); @@ -1594,13 +1594,13 @@ void ListStyle::toXML( QDomDocument & doc, QDomElement & e ) const listLevelStyle.setAttribute( "text:bullet-char", m_bullet_char ); } - QDomElement properties = doc.createElement( "style:properties" ); + TQDomElement properties = doc.createElement( "style:properties" ); if ( level > 1 ) { properties.setAttribute( "text:min-label-width", - QString( "%1cm" ).arg( m_min_label_width ) ); + TQString( "%1cm" ).tqarg( m_min_label_width ) ); properties.setAttribute( "text:space-before", - QString( "%1cm" ).arg( m_min_label_width * ( level - 1 ) ) ); + TQString( "%1cm" ).tqarg( m_min_label_width * ( level - 1 ) ) ); } if ( !m_color.isNull() ) diff --git a/filters/kpresenter/ooimpress/stylefactory.h b/filters/kpresenter/ooimpress/stylefactory.h index 9de6a548..86ee1089 100644 --- a/filters/kpresenter/ooimpress/stylefactory.h +++ b/filters/kpresenter/ooimpress/stylefactory.h @@ -21,10 +21,10 @@ #ifndef STYLEFACTORY_H #define STYLEFACTORY_H -#include -#include +#include +#include -#include +#include class StyleFactory; @@ -34,29 +34,29 @@ public: StrokeDashStyle( int style ); ~StrokeDashStyle() {}; - void toXML( QDomDocument & doc, QDomElement & e ) const; - QString name() const { return m_name; }; + void toXML( TQDomDocument & doc, TQDomElement & e ) const; + TQString name() const { return m_name; }; private: StrokeDashStyle() {}; - QString m_name, m_style, m_dots1, m_dots2, m_dots1_length, m_dots2_length, + TQString m_name, m_style, m_dots1, m_dots2, m_dots1_length, m_dots2_length, m_distance; }; class GradientStyle { public: - GradientStyle( QDomElement & gradient, int index ); + GradientStyle( TQDomElement & gradient, int index ); ~GradientStyle() {}; - void toXML( QDomDocument & doc, QDomElement & e ) const; - QString name() const { return m_name; }; + void toXML( TQDomDocument & doc, TQDomElement & e ) const; + TQString name() const { return m_name; }; private: GradientStyle() {}; - QString m_name, m_style, m_cx, m_cy, m_start_color, m_end_color, + TQString m_name, m_style, m_cx, m_cy, m_start_color, m_end_color, m_start_intensity, m_end_intensity, m_angle, m_border; }; @@ -66,76 +66,76 @@ public: MarkerStyle( int style ); ~MarkerStyle() {}; - void toXML( QDomDocument & doc, QDomElement & e ) const; - QString name() const { return m_name; }; + void toXML( TQDomDocument & doc, TQDomElement & e ) const; + TQString name() const { return m_name; }; private: MarkerStyle() {}; - QString m_name, m_viewBox, m_d; + TQString m_name, m_viewBox, m_d; }; class HatchStyle { public: - HatchStyle( int style, QString & color ); + HatchStyle( int style, TQString & color ); ~HatchStyle() {}; - void toXML( QDomDocument & doc, QDomElement & e ) const; - QString name() const { return m_name; }; + void toXML( TQDomDocument & doc, TQDomElement & e ) const; + TQString name() const { return m_name; }; private: HatchStyle() {}; - QString m_name, m_style, m_color, m_distance, m_rotation; + TQString m_name, m_style, m_color, m_distance, m_rotation; }; class FillImageStyle { public: - FillImageStyle( QString & name ); + FillImageStyle( TQString & name ); ~FillImageStyle() {}; - void toXML( QDomDocument & doc, QDomElement & e ) const; + void toXML( TQDomDocument & doc, TQDomElement & e ) const; private: FillImageStyle() {}; - QString m_name, m_href, m_type, m_show, m_actuate; + TQString m_name, m_href, m_type, m_show, m_actuate; }; class PageMasterStyle { public: - PageMasterStyle( QDomElement & e, const uint index ); + PageMasterStyle( TQDomElement & e, const uint index ); ~PageMasterStyle() {}; - void toXML( QDomDocument & doc, QDomElement & e ) const; + void toXML( TQDomDocument & doc, TQDomElement & e ) const; bool operator==( const PageMasterStyle & pageMasterStyle ) const; - QString name() const { return m_name; }; - QString style() const { return m_style; }; + TQString name() const { return m_name; }; + TQString style() const { return m_style; }; private: PageMasterStyle() {}; - QString m_name, m_page_width, m_page_height, m_orientation, m_style; - QString m_margin_top, m_margin_bottom, m_margin_left, m_margin_right; + TQString m_name, m_page_width, m_page_height, m_orientation, m_style; + TQString m_margin_top, m_margin_bottom, m_margin_left, m_margin_right; }; class PageStyle { public: - PageStyle( StyleFactory * styleFactory, QDomElement & e, const uint index ); + PageStyle( StyleFactory * styleFactory, TQDomElement & e, const uint index ); ~PageStyle() {}; - void toXML( QDomDocument & doc, QDomElement & e ) const; + void toXML( TQDomDocument & doc, TQDomElement & e ) const; bool operator==( const PageStyle & pageStyle ) const; - QString name() const { return m_name; }; + TQString name() const { return m_name; }; private: PageStyle() {}; - QString m_name, m_bg_visible, m_bg_objects_visible, m_fill, m_fill_color, + TQString m_name, m_bg_visible, m_bg_objects_visible, m_fill, m_fill_color, m_fill_image_name, m_fill_image_width, m_fill_image_height, m_fill_image_ref_point, m_fill_gradient_name, m_repeat, m_page_effect, m_page_duration; @@ -144,17 +144,17 @@ private: class TextStyle { public: - TextStyle( QDomElement & e, const uint index ); + TextStyle( TQDomElement & e, const uint index ); ~TextStyle() {}; - void toXML( QDomDocument & doc, QDomElement & e ) const; + void toXML( TQDomDocument & doc, TQDomElement & e ) const; bool operator==( const TextStyle & textStyle ) const; - QString name() const { return m_name; }; + TQString name() const { return m_name; }; private: TextStyle() {}; - QString m_name, m_font_size, m_font_family, m_font_family_generic, + TQString m_name, m_font_size, m_font_family, m_font_family_generic, m_color, m_font_pitch, m_font_style, m_font_weight, m_text_shadow, m_text_underline, m_text_underline_color, m_text_crossing_out; }; @@ -162,7 +162,7 @@ private: class GraphicStyle { public: - GraphicStyle( StyleFactory * styleFactory, QDomElement & e, const uint index ); + GraphicStyle( StyleFactory * styleFactory, TQDomElement & e, const uint index ); GraphicStyle( const char * name, const char * stroke, const char * stroke_color, const char * stroke_width, const char * shadow, @@ -179,14 +179,14 @@ public: const char * enable_numbering ); ~GraphicStyle() {}; - void toXML( QDomDocument & doc, QDomElement & e ) const; + void toXML( TQDomDocument & doc, TQDomElement & e ) const; bool operator==( const GraphicStyle & graphicStyle ) const; - QString name() const { return m_name; }; + TQString name() const { return m_name; }; private: GraphicStyle() {}; - QString m_name, m_stroke, m_stroke_color, m_stroke_width, m_shadow, + TQString m_name, m_stroke, m_stroke_color, m_stroke_width, m_shadow, m_shadow_offset_x, m_shadow_offset_y, m_shadow_color, m_margin_left, m_margin_right, m_margin_top, m_margin_bottom, m_color, m_text_outline, m_text_crossing_out, m_font_family, m_font_size, m_font_style, @@ -200,18 +200,18 @@ private: class ParagraphStyle { public: - ParagraphStyle( QDomElement & e, const uint index ); + ParagraphStyle( TQDomElement & e, const uint index ); ~ParagraphStyle() {}; - void toXML( QDomDocument & doc, QDomElement & e ) const; + void toXML( TQDomDocument & doc, TQDomElement & e ) const; bool operator==( const ParagraphStyle & paragraphStyle ) const; - QString name() const { return m_name; }; + TQString name() const { return m_name; }; private: ParagraphStyle() {}; - QString parseBorder( QDomElement e ); + TQString parseBorder( TQDomElement e ); - QString m_name, m_margin_left, m_margin_right, m_text_indent, m_text_align, + TQString m_name, m_margin_left, m_margin_right, m_text_indent, m_text_align, m_enable_numbering, m_text_shadow, m_margin_top, m_margin_bottom, m_border_left, m_border_right, m_border_top, m_border_bottom, m_line_height, m_line_height_at_least, m_line_spacing; @@ -220,12 +220,12 @@ private: class ListStyle { public: - ListStyle( QDomElement & e, const uint index ); + ListStyle( TQDomElement & e, const uint index ); ~ListStyle() {}; - void toXML( QDomDocument & doc, QDomElement & e ) const; + void toXML( TQDomDocument & doc, TQDomElement & e ) const; bool operator==( const ListStyle & listStyle ) const; - QString name() const { return m_name; }; + TQString name() const { return m_name; }; private: ListStyle() {}; @@ -237,7 +237,7 @@ private: float m_min_label_width; list_level_style_t m_listLevelStyle; - QString m_name, m_num_suffix, m_num_format, m_bullet_char, m_color, + TQString m_name, m_num_suffix, m_num_format, m_bullet_char, m_color, m_font_size, m_font_family; }; @@ -247,36 +247,36 @@ public: StyleFactory(); ~StyleFactory(); - void addOfficeStyles( QDomDocument & doc, QDomElement & styles ); - void addOfficeMaster( QDomDocument & doc, QDomElement & master ); - void addOfficeAutomatic( QDomDocument & doc, QDomElement & automatic ); - void addAutomaticStyles( QDomDocument & doc, QDomElement & autoStyles ); + void addOfficeStyles( TQDomDocument & doc, TQDomElement & styles ); + void addOfficeMaster( TQDomDocument & doc, TQDomElement & master ); + void addOfficeAutomatic( TQDomDocument & doc, TQDomElement & automatic ); + void addAutomaticStyles( TQDomDocument & doc, TQDomElement & autoStyles ); - QString createStrokeDashStyle( int style ); - QString createGradientStyle( QDomElement & gradient ); - QString createMarkerStyle( int style ); - QString createHatchStyle( int style, QString & color ); - QString createListStyle( QDomElement & e ); - QString createPageStyle( QDomElement & e ); - QString createTextStyle( QDomElement & e ); - QString createGraphicStyle( QDomElement & e ); - QString createParagraphStyle( QDomElement & e ); - QString createPageMasterStyle( QDomElement & e ); + TQString createStrokeDashStyle( int style ); + TQString createGradientStyle( TQDomElement & gradient ); + TQString createMarkerStyle( int style ); + TQString createHatchStyle( int style, TQString & color ); + TQString createListStyle( TQDomElement & e ); + TQString createPageStyle( TQDomElement & e ); + TQString createTextStyle( TQDomElement & e ); + TQString createGraphicStyle( TQDomElement & e ); + TQString createParagraphStyle( TQDomElement & e ); + TQString createPageMasterStyle( TQDomElement & e ); - static QString toCM( const QString & point ); + static TQString toCM( const TQString & point ); private: - QPtrList m_strokeDashStyles; - QPtrList m_gradientStyles; - QPtrList m_hatchStyles; - QPtrList m_markerStyles; - QPtrList m_fillImageStyles; - QPtrList m_listStyles; - QPtrList m_pageStyles; - QPtrList m_textStyles; - QPtrList m_graphicStyles; - QPtrList m_paragraphStyles; - QPtrList m_pageMasterStyles; + TQPtrList m_strokeDashStyles; + TQPtrList m_gradientStyles; + TQPtrList m_hatchStyles; + TQPtrList m_markerStyles; + TQPtrList m_fillImageStyles; + TQPtrList m_listStyles; + TQPtrList m_pageStyles; + TQPtrList m_textStyles; + TQPtrList m_graphicStyles; + TQPtrList m_paragraphStyles; + TQPtrList m_pageMasterStyles; }; #endif diff --git a/filters/kpresenter/png/pngexport.cpp b/filters/kpresenter/png/pngexport.cpp index 571e7864..8bb6b054 100644 --- a/filters/kpresenter/png/pngexport.cpp +++ b/filters/kpresenter/png/pngexport.cpp @@ -17,8 +17,8 @@ * Boston, MA 02110-1301, USA. */ -#include -#include +#include +#include #include @@ -33,7 +33,7 @@ typedef KGenericFactory PngExportFactory; K_EXPORT_COMPONENT_FACTORY( libkpresenterpngexport, PngExportFactory( "pngexport" ) ) -PngExport::PngExport(KoFilter *fil, const char *name, const QStringList&lst) +PngExport::PngExport(KoFilter *fil, const char *name, const TQStringList&lst) : ImageExport(fil,name,lst) { } @@ -62,7 +62,7 @@ const char * PngExport::exportFormat() return "image/png"; } -bool PngExport::saveImage( QString fileName) +bool PngExport::saveImage( TQString fileName) { bool ret = pixmap.save( fileName, "PNG" ); // Save the image. diff --git a/filters/kpresenter/png/pngexport.h b/filters/kpresenter/png/pngexport.h index 8856dbd8..692aa76a 100644 --- a/filters/kpresenter/png/pngexport.h +++ b/filters/kpresenter/png/pngexport.h @@ -25,11 +25,12 @@ class PngExport : public ImageExport { Q_OBJECT + TQ_OBJECT public: - PngExport(KoFilter *parent, const char *name, const QStringList&); + PngExport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~PngExport(); - virtual bool saveImage( QString fileName); + virtual bool saveImage( TQString fileName); virtual bool extraImageAttribute(); virtual const char * exportFormat(); }; diff --git a/filters/kpresenter/powerpoint/import/powerpointimport.cc b/filters/kpresenter/powerpoint/import/powerpointimport.cc index 761e4f0d..6afdc659 100644 --- a/filters/kpresenter/powerpoint/import/powerpointimport.cc +++ b/filters/kpresenter/powerpoint/import/powerpointimport.cc @@ -26,11 +26,11 @@ #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -52,9 +52,9 @@ K_EXPORT_COMPONENT_FACTORY( libpowerpointimport, namespace Libppt { -inline QConstString string( const Libppt::UString& str ) +inline TQConstString string( const Libppt::UString& str ) { - return QConstString( reinterpret_cast( str.data() ), str.length() ); + return TQConstString( reinterpret_cast( str.data() ), str.length() ); } } @@ -62,14 +62,14 @@ inline QConstString string( const Libppt::UString& str ) class PowerPointImport::Private { public: - QString inputFile; - QString outputFile; + TQString inputFile; + TQString outputFile; Presentation *presentation; }; -PowerPointImport::PowerPointImport ( QObject*, const char*, const QStringList& ) +PowerPointImport::PowerPointImport ( TQObject*, const char*, const TQStringList& ) : KoFilter() { d = new Private; @@ -80,7 +80,7 @@ PowerPointImport::~PowerPointImport() delete d; } -KoFilter::ConversionStatus PowerPointImport::convert( const QCString& from, const QCString& to ) +KoFilter::ConversiontqStatus PowerPointImport::convert( const TQCString& from, const TQCString& to ) { if ( from != "application/mspowerpoint" ) return KoFilter::NotImplemented; @@ -143,21 +143,21 @@ KoFilter::ConversionStatus PowerPointImport::convert( const QCString& from, cons // we are done! delete d->presentation; delete storeout; - d->inputFile = QString::null; - d->outputFile = QString::null; + d->inputFile = TQString(); + d->outputFile = TQString(); d->presentation = 0; return KoFilter::OK; } -QByteArray PowerPointImport::createStyles() +TQByteArray PowerPointImport::createStyles() { KoXmlWriter* stylesWriter; - QByteArray stylesData; - QBuffer stylesBuffer( stylesData ); + TQByteArray stylesData; + TQBuffer stylesBuffer( stylesData ); - QString pageWidth = QString("%1pt").arg( d->presentation->masterSlide()->pageWidth() ); - QString pageHeight = QString("%1pt").arg( d->presentation->masterSlide()->pageHeight() ); + TQString pageWidth = TQString("%1pt").tqarg( d->presentation->masterSlide()->pageWidth() ); + TQString pageHeight = TQString("%1pt").tqarg( d->presentation->masterSlide()->pageHeight() ); stylesBuffer.open( IO_WriteOnly ); stylesWriter = new KoXmlWriter( &stylesBuffer ); @@ -178,10 +178,10 @@ QByteArray PowerPointImport::createStyles() // office:automatic-styles stylesWriter->startElement( "office:automatic-styles" ); - stylesWriter->startElement( "style:page-layout" ); + stylesWriter->startElement( "style:page-tqlayout" ); stylesWriter->addAttribute( "style:name","pm1" ); stylesWriter->addAttribute( "style:page-usage","all" ); - stylesWriter->startElement( "style:page-layout-properties" ); + stylesWriter->startElement( "style:page-tqlayout-properties" ); stylesWriter->addAttribute( "fo:margin-bottom","0pt" ); stylesWriter->addAttribute( "fo:margin-left","0pt" ); stylesWriter->addAttribute( "fo:margin-right","0pt" ); @@ -189,8 +189,8 @@ QByteArray PowerPointImport::createStyles() stylesWriter->addAttribute( "fo:page-height", pageHeight ); stylesWriter->addAttribute( "fo:page-width", pageWidth ); stylesWriter->addAttribute( "style:print-orientation","landscape" ); - stylesWriter->endElement(); // style:page-layout-properties - stylesWriter->endElement(); // style:page-layout + stylesWriter->endElement(); // style:page-tqlayout-properties + stylesWriter->endElement(); // style:page-tqlayout stylesWriter->startElement( "style:style" ); stylesWriter->addAttribute( "style:name","dp1" ); @@ -237,7 +237,7 @@ QByteArray PowerPointImport::createStyles() stylesWriter->startElement( "office:master-styles" ); stylesWriter->startElement( "style:master-page" ); stylesWriter->addAttribute( "style:name", "Standard" ); - stylesWriter->addAttribute( "style:page-layout-name", "pm1" ); + stylesWriter->addAttribute( "style:page-tqlayout-name", "pm1" ); stylesWriter->addAttribute( "draw:style-name", "dp1" ); stylesWriter->endElement(); stylesWriter->endElement(); @@ -247,7 +247,7 @@ QByteArray PowerPointImport::createStyles() delete stylesWriter; // for troubleshooting only !! - QString dbg; + TQString dbg; for( unsigned i=0; iwidth() ); - QString heightStr = QString("%1mm").arg( drawObject->height() ); - QString xStr = QString("%1mm").arg( drawObject->left() ); - QString yStr = QString("%1mm").arg( drawObject->top() ); - QString styleName = QString("gr%1").arg( drawingObjectCounter ); + TQString widthStr = TQString("%1mm").tqarg( drawObject->width() ); + TQString heightStr = TQString("%1mm").tqarg( drawObject->height() ); + TQString xStr = TQString("%1mm").tqarg( drawObject->left() ); + TQString yStr = TQString("%1mm").tqarg( drawObject->top() ); + TQString styleName = TQString("gr%1").tqarg( drawingObjectCounter ); xmlWriter->startElement( "draw:ellipse" ); xmlWriter->addAttribute( "draw:style-name", styleName ); @@ -363,7 +363,7 @@ void PowerPointImport::processEllipse (DrawObject* drawObject, KoXmlWriter* xmlW xmlWriter->addAttribute( "svg:height", heightStr ); xmlWriter->addAttribute( "svg:x", xStr ); xmlWriter->addAttribute( "svg:y", yStr ); - xmlWriter->addAttribute( "draw:layer", "layout" ); + xmlWriter->addAttribute( "draw:layer", "tqlayout" ); xmlWriter->endElement(); // draw:ellipse } @@ -372,11 +372,11 @@ void PowerPointImport::processRectangle (DrawObject* drawObject, KoXmlWriter* xm if( !drawObject ) return; if( !xmlWriter ) return; - QString widthStr = QString("%1mm").arg( drawObject->width() ); - QString heightStr = QString("%1mm").arg( drawObject->height() ); - QString xStr = QString("%1mm").arg( drawObject->left() ); - QString yStr = QString("%1mm").arg( drawObject->top() ); - QString styleName = QString("gr%1").arg( drawingObjectCounter ); + TQString widthStr = TQString("%1mm").tqarg( drawObject->width() ); + TQString heightStr = TQString("%1mm").tqarg( drawObject->height() ); + TQString xStr = TQString("%1mm").tqarg( drawObject->left() ); + TQString yStr = TQString("%1mm").tqarg( drawObject->top() ); + TQString styleName = TQString("gr%1").tqarg( drawingObjectCounter ); xmlWriter->startElement( "draw:rect" ); xmlWriter->addAttribute( "draw:style-name", styleName ); @@ -393,7 +393,7 @@ void PowerPointImport::processRectangle (DrawObject* drawObject, KoXmlWriter* xm double xNew = xVec*cos(rotAngle) - yVec*sin(rotAngle); double yNew = xVec*sin(rotAngle) + yVec*cos(rotAngle); - QString rot = QString("rotate (%1) translate (%2mm %3mm)").arg(rotAngle).arg(xNew+xMid).arg(yMid-yNew); + TQString rot = TQString("rotate (%1) translate (%2mm %3mm)").tqarg(rotAngle).tqarg(xNew+xMid).tqarg(yMid-yNew); xmlWriter->addAttribute( "draw:transform", rot ); } else @@ -401,7 +401,7 @@ void PowerPointImport::processRectangle (DrawObject* drawObject, KoXmlWriter* xm xmlWriter->addAttribute( "svg:x", xStr ); xmlWriter->addAttribute( "svg:y", yStr ); } - xmlWriter->addAttribute( "draw:layer", "layout" ); + xmlWriter->addAttribute( "draw:layer", "tqlayout" ); xmlWriter->endElement(); // draw:rect } @@ -409,13 +409,13 @@ void PowerPointImport::processRoundRectangle (DrawObject* drawObject, KoXmlWrite { if( !drawObject || !xmlWriter ) return; - QString widthStr = QString("%1mm").arg( drawObject->width() ); - QString heightStr = QString("%1mm").arg( drawObject->height() ); - QString xStr = QString("%1mm").arg( drawObject->left() ); - QString yStr = QString("%1mm").arg( drawObject->top() ); - QString styleName = QString("gr%1").arg( drawingObjectCounter ); + TQString widthStr = TQString("%1mm").tqarg( drawObject->width() ); + TQString heightStr = TQString("%1mm").tqarg( drawObject->height() ); + TQString xStr = TQString("%1mm").tqarg( drawObject->left() ); + TQString yStr = TQString("%1mm").tqarg( drawObject->top() ); + TQString styleName = TQString("gr%1").tqarg( drawingObjectCounter ); - xmlWriter->startElement( "draw:custom-shape" ); + xmlWriter->startElement( "draw:custom-tqshape" ); xmlWriter->addAttribute( "draw:style-name", styleName ); @@ -435,7 +435,7 @@ void PowerPointImport::processRoundRectangle (DrawObject* drawObject, KoXmlWrite double xNew = xVec*cos(rotAngle) - yVec*sin(rotAngle); double yNew = xVec*sin(rotAngle) + yVec*cos(rotAngle); - QString rot = QString("rotate (%1) translate (%2mm %3mm)").arg(rotAngle).arg(xNew+xMid).arg(yMid+yNew); + TQString rot = TQString("rotate (%1) translate (%2mm %3mm)").tqarg(rotAngle).tqarg(xNew+xMid).tqarg(yMid+yNew); xmlWriter->addAttribute( "draw:transform", rot ); } else @@ -448,7 +448,7 @@ void PowerPointImport::processRoundRectangle (DrawObject* drawObject, KoXmlWrite double xNew = xVec*cos(rotAngle) - yVec*sin(rotAngle); double yNew = xVec*sin(rotAngle) + yVec*cos(rotAngle); - QString rot = QString("rotate (%1) translate (%2mm %3mm)").arg(rotAngle).arg(xNew+xMid).arg(yMid-yNew); + TQString rot = TQString("rotate (%1) translate (%2mm %3mm)").tqarg(rotAngle).tqarg(xNew+xMid).tqarg(yMid-yNew); xmlWriter->addAttribute( "draw:transform", rot ); } @@ -463,8 +463,8 @@ void PowerPointImport::processRoundRectangle (DrawObject* drawObject, KoXmlWrite // xmlWriter->addAttribute( "svg:x", xStr ); // xmlWriter->addAttribute( "svg:y", yStr ); - xmlWriter->addAttribute( "draw:layer", "layout" ); - xmlWriter->startElement( "draw:enhanced-geometry" ); + xmlWriter->addAttribute( "draw:layer", "tqlayout" ); + xmlWriter->startElement( "draw:enhanced-tqgeometry" ); xmlWriter->addAttribute( "draw:type", "round-rectangle"); xmlWriter->startElement( "draw:equation" ); xmlWriter->addAttribute( "draw:formula", "$0 /3" ); @@ -486,21 +486,21 @@ void PowerPointImport::processRoundRectangle (DrawObject* drawObject, KoXmlWrite xmlWriter->addAttribute( "draw:formula", "top+?f0 " ); xmlWriter->addAttribute( "draw:name", "f4" ); xmlWriter->endElement(); // draw:equation - xmlWriter->endElement(); // draw:enhanced-geometry - xmlWriter->endElement(); // draw:custom-shape + xmlWriter->endElement(); // draw:enhanced-tqgeometry + xmlWriter->endElement(); // draw:custom-tqshape } void PowerPointImport::processDiamond (DrawObject* drawObject, KoXmlWriter* xmlWriter ) { if( !drawObject || !xmlWriter ) return; - QString widthStr = QString("%1mm").arg( drawObject->width() ); - QString heightStr = QString("%1mm").arg( drawObject->height() ); - QString xStr = QString("%1mm").arg( drawObject->left() ); - QString yStr = QString("%1mm").arg( drawObject->top() ); - QString styleName = QString("gr%1").arg( drawingObjectCounter ); + TQString widthStr = TQString("%1mm").tqarg( drawObject->width() ); + TQString heightStr = TQString("%1mm").tqarg( drawObject->height() ); + TQString xStr = TQString("%1mm").tqarg( drawObject->left() ); + TQString yStr = TQString("%1mm").tqarg( drawObject->top() ); + TQString styleName = TQString("gr%1").tqarg( drawingObjectCounter ); - xmlWriter->startElement( "draw:custom-shape" ); + xmlWriter->startElement( "draw:custom-tqshape" ); xmlWriter->addAttribute( "draw:style-name", styleName ); xmlWriter->addAttribute( "svg:width", widthStr ); xmlWriter->addAttribute( "svg:height", heightStr ); @@ -522,10 +522,10 @@ void PowerPointImport::processDiamond (DrawObject* drawObject, KoXmlWriter* xmlW xmlWriter->addAttribute( "svg:x", 10 ); xmlWriter->addAttribute( "svg:y", 5 ); xmlWriter->endElement(); - xmlWriter->startElement( "draw:enhanced-geometry" ); + xmlWriter->startElement( "draw:enhanced-tqgeometry" ); xmlWriter->addAttribute( "draw:type", "diamond"); xmlWriter->endElement(); - xmlWriter->addAttribute( "draw:layer", "layout" ); + xmlWriter->addAttribute( "draw:layer", "tqlayout" ); xmlWriter->endElement(); } @@ -533,20 +533,20 @@ void PowerPointImport::processTriangle (DrawObject* drawObject, KoXmlWriter* xml { if( !drawObject || !xmlWriter ) return; - QString widthStr = QString("%1mm").arg( drawObject->width() ); - QString heightStr = QString("%1mm").arg( drawObject->height() ); - QString xStr = QString("%1mm").arg( drawObject->left() ); - QString yStr = QString("%1mm").arg( drawObject->top() ); - QString styleName = QString("gr%1").arg( drawingObjectCounter ); + TQString widthStr = TQString("%1mm").tqarg( drawObject->width() ); + TQString heightStr = TQString("%1mm").tqarg( drawObject->height() ); + TQString xStr = TQString("%1mm").tqarg( drawObject->left() ); + TQString yStr = TQString("%1mm").tqarg( drawObject->top() ); + TQString styleName = TQString("gr%1").tqarg( drawingObjectCounter ); /* draw IsocelesTriangle or RightTriangle */ - xmlWriter->startElement( "draw:custom-shape" ); + xmlWriter->startElement( "draw:custom-tqshape" ); xmlWriter->addAttribute( "draw:style-name", styleName ); xmlWriter->addAttribute( "svg:width", widthStr ); xmlWriter->addAttribute( "svg:height", heightStr ); xmlWriter->addAttribute( "svg:x", xStr ); xmlWriter->addAttribute( "svg:y", yStr ); - xmlWriter->addAttribute( "draw:layer", "layout" ); + xmlWriter->addAttribute( "draw:layer", "tqlayout" ); xmlWriter->startElement( "draw:glue-point" ); xmlWriter->addAttribute( "svg:x", 5 ); xmlWriter->addAttribute( "svg:y", 0 ); @@ -572,7 +572,7 @@ void PowerPointImport::processTriangle (DrawObject* drawObject, KoXmlWriter* xml xmlWriter->addAttribute( "svg:y", 5 ); xmlWriter->endElement(); - xmlWriter->startElement( "draw:enhanced-geometry" ); + xmlWriter->startElement( "draw:enhanced-tqgeometry" ); if (drawObject->hasProperty("draw:mirror-vertical")) { @@ -588,14 +588,14 @@ void PowerPointImport::processTriangle (DrawObject* drawObject, KoXmlWriter* xml double rotAngle = drawObject->getDoubleProperty("libppt:rotation" ); double xMid = ( drawObject->left() + 0.5*drawObject->width() ); double yMid = ( drawObject->top() + 0.5*drawObject->height() ); - QString rot = QString("rotate (%1) translate (%2cm %3cm)").arg(rotAngle).arg(xMid).arg(yMid); + TQString rot = TQString("rotate (%1) translate (%2cm %3cm)").tqarg(rotAngle).tqarg(xMid).tqarg(yMid); xmlWriter->addAttribute( "draw:transform", rot ); } - if (drawObject->shape() == DrawObject::RightTriangle) + if (drawObject->tqshape() == DrawObject::RightTriangle) { xmlWriter->addAttribute( "draw:type", "right-triangle"); } - else if (drawObject->shape() == DrawObject::IsoscelesTriangle) + else if (drawObject->tqshape() == DrawObject::IsoscelesTriangle) { xmlWriter->addAttribute( "draw:type", "isosceles-triangle"); xmlWriter->startElement( "draw:equation" ); @@ -637,27 +637,27 @@ void PowerPointImport::processTriangle (DrawObject* drawObject, KoXmlWriter* xml xmlWriter->endElement(); } - xmlWriter->endElement(); // enhanced-geometry - xmlWriter->endElement(); // custom-shape + xmlWriter->endElement(); // enhanced-tqgeometry + xmlWriter->endElement(); // custom-tqshape } void PowerPointImport::processTrapezoid (DrawObject* drawObject, KoXmlWriter* xmlWriter ) { if( !drawObject || !xmlWriter ) return; - QString widthStr = QString("%1mm").arg( drawObject->width() ); - QString heightStr = QString("%1mm").arg( drawObject->height() ); - QString xStr = QString("%1mm").arg( drawObject->left() ); - QString yStr = QString("%1mm").arg( drawObject->top() ); - QString styleName = QString("gr%1").arg( drawingObjectCounter ); + TQString widthStr = TQString("%1mm").tqarg( drawObject->width() ); + TQString heightStr = TQString("%1mm").tqarg( drawObject->height() ); + TQString xStr = TQString("%1mm").tqarg( drawObject->left() ); + TQString yStr = TQString("%1mm").tqarg( drawObject->top() ); + TQString styleName = TQString("gr%1").tqarg( drawingObjectCounter ); - xmlWriter->startElement( "draw:custom-shape" ); + xmlWriter->startElement( "draw:custom-tqshape" ); xmlWriter->addAttribute( "draw:style-name", styleName ); xmlWriter->addAttribute( "svg:width", widthStr ); xmlWriter->addAttribute( "svg:height", heightStr ); xmlWriter->addAttribute( "svg:x", xStr ); xmlWriter->addAttribute( "svg:y", yStr ); - xmlWriter->addAttribute( "draw:layer", "layout" ); + xmlWriter->addAttribute( "draw:layer", "tqlayout" ); xmlWriter->startElement( "draw:glue-point" ); xmlWriter->addAttribute( "svg:x", 5 ); @@ -675,7 +675,7 @@ void PowerPointImport::processTrapezoid (DrawObject* drawObject, KoXmlWriter* xm xmlWriter->addAttribute( "svg:x", 5 ); xmlWriter->addAttribute( "svg:y", 10 ); xmlWriter->endElement(); - xmlWriter->startElement( "draw:enhanced-geometry" ); + xmlWriter->startElement( "draw:enhanced-tqgeometry" ); if ( drawObject->hasProperty("draw:mirror-vertical") ) { xmlWriter->addAttribute("draw:mirror-vertical","true"); @@ -718,27 +718,27 @@ void PowerPointImport::processTrapezoid (DrawObject* drawObject, KoXmlWriter* xm xmlWriter->addAttribute( "draw:handle-range-x-minimum", 0); xmlWriter->addAttribute("draw:handle-position","$0 bottom"); xmlWriter->endElement(); - xmlWriter->endElement(); // enhanced-geometry - xmlWriter->endElement(); // custom-shape + xmlWriter->endElement(); // enhanced-tqgeometry + xmlWriter->endElement(); // custom-tqshape } void PowerPointImport::processParallelogram (DrawObject* drawObject, KoXmlWriter* xmlWriter ) { if( !drawObject || !xmlWriter ) return; - QString widthStr = QString("%1mm").arg( drawObject->width() ); - QString heightStr = QString("%1mm").arg( drawObject->height() ); - QString xStr = QString("%1mm").arg( drawObject->left() ); - QString yStr = QString("%1mm").arg( drawObject->top() ); - QString styleName = QString("gr%1").arg( drawingObjectCounter ); + TQString widthStr = TQString("%1mm").tqarg( drawObject->width() ); + TQString heightStr = TQString("%1mm").tqarg( drawObject->height() ); + TQString xStr = TQString("%1mm").tqarg( drawObject->left() ); + TQString yStr = TQString("%1mm").tqarg( drawObject->top() ); + TQString styleName = TQString("gr%1").tqarg( drawingObjectCounter ); - xmlWriter->startElement( "draw:custom-shape" ); + xmlWriter->startElement( "draw:custom-tqshape" ); xmlWriter->addAttribute( "draw:style-name", styleName ); xmlWriter->addAttribute( "svg:width", widthStr ); xmlWriter->addAttribute( "svg:height", heightStr ); xmlWriter->addAttribute( "svg:x", xStr ); xmlWriter->addAttribute( "svg:y", yStr ); - xmlWriter->addAttribute( "draw:layer", "layout" ); + xmlWriter->addAttribute( "draw:layer", "tqlayout" ); xmlWriter->startElement( "draw:glue-point" ); xmlWriter->addAttribute( "svg:x", 6.25 ); xmlWriter->addAttribute( "svg:y", 0 ); @@ -763,7 +763,7 @@ void PowerPointImport::processParallelogram (DrawObject* drawObject, KoXmlWriter xmlWriter->addAttribute( "svg:x", 1.25 ); xmlWriter->addAttribute( "svg:y", 5 ); xmlWriter->endElement(); - xmlWriter->startElement( "draw:enhanced-geometry" ); + xmlWriter->startElement( "draw:enhanced-tqgeometry" ); if (drawObject->hasProperty("draw:mirror-vertical")) { xmlWriter->addAttribute("draw:mirror-vertical","true"); @@ -834,27 +834,27 @@ void PowerPointImport::processParallelogram (DrawObject* drawObject, KoXmlWriter xmlWriter->addAttribute( "draw:handle-range-x-minimum", 0); xmlWriter->addAttribute("draw:handle-position","$0 top"); xmlWriter->endElement(); - xmlWriter->endElement(); // enhanced-geometry - xmlWriter->endElement(); // custom-shape + xmlWriter->endElement(); // enhanced-tqgeometry + xmlWriter->endElement(); // custom-tqshape } void PowerPointImport::processHexagon (DrawObject* drawObject, KoXmlWriter* xmlWriter ) { if( !drawObject || !xmlWriter ) return; - QString widthStr = QString("%1mm").arg( drawObject->width() ); - QString heightStr = QString("%1mm").arg( drawObject->height() ); - QString xStr = QString("%1mm").arg( drawObject->left() ); - QString yStr = QString("%1mm").arg( drawObject->top() ); - QString styleName = QString("gr%1").arg( drawingObjectCounter ); + TQString widthStr = TQString("%1mm").tqarg( drawObject->width() ); + TQString heightStr = TQString("%1mm").tqarg( drawObject->height() ); + TQString xStr = TQString("%1mm").tqarg( drawObject->left() ); + TQString yStr = TQString("%1mm").tqarg( drawObject->top() ); + TQString styleName = TQString("gr%1").tqarg( drawingObjectCounter ); - xmlWriter->startElement( "draw:custom-shape" ); + xmlWriter->startElement( "draw:custom-tqshape" ); xmlWriter->addAttribute( "draw:style-name", styleName ); xmlWriter->addAttribute( "svg:width", widthStr ); xmlWriter->addAttribute( "svg:height", heightStr ); xmlWriter->addAttribute( "svg:x", xStr ); xmlWriter->addAttribute( "svg:y", yStr ); - xmlWriter->addAttribute( "draw:layer", "layout" ); + xmlWriter->addAttribute( "draw:layer", "tqlayout" ); xmlWriter->startElement( "draw:glue-point" ); xmlWriter->addAttribute( "svg:x", 5 ); xmlWriter->addAttribute( "svg:y", 0 ); @@ -871,7 +871,7 @@ void PowerPointImport::processHexagon (DrawObject* drawObject, KoXmlWriter* xmlW xmlWriter->addAttribute( "svg:x", 10 ); xmlWriter->addAttribute( "svg:y", 5 ); xmlWriter->endElement(); - xmlWriter->startElement( "draw:enhanced-geometry" ); + xmlWriter->startElement( "draw:enhanced-tqgeometry" ); xmlWriter->addAttribute( "draw:type", "hexagon" ); xmlWriter->startElement( "draw:equation" ); xmlWriter->addAttribute( "draw:formula", "$0 " ); @@ -898,27 +898,27 @@ void PowerPointImport::processHexagon (DrawObject* drawObject, KoXmlWriter* xmlW xmlWriter->addAttribute( "draw:handle-range-x-minimum", 0); xmlWriter->addAttribute("draw:handle-position","$0 top"); xmlWriter->endElement(); - xmlWriter->endElement(); // enhanced-geometry - xmlWriter->endElement(); // custom-shape + xmlWriter->endElement(); // enhanced-tqgeometry + xmlWriter->endElement(); // custom-tqshape } void PowerPointImport::processOctagon (DrawObject* drawObject, KoXmlWriter* xmlWriter ) { if( !drawObject || !xmlWriter ) return; - QString widthStr = QString("%1mm").arg( drawObject->width() ); - QString heightStr = QString("%1mm").arg( drawObject->height() ); - QString xStr = QString("%1mm").arg( drawObject->left() ); - QString yStr = QString("%1mm").arg( drawObject->top() ); - QString styleName = QString("gr%1").arg( drawingObjectCounter ); + TQString widthStr = TQString("%1mm").tqarg( drawObject->width() ); + TQString heightStr = TQString("%1mm").tqarg( drawObject->height() ); + TQString xStr = TQString("%1mm").tqarg( drawObject->left() ); + TQString yStr = TQString("%1mm").tqarg( drawObject->top() ); + TQString styleName = TQString("gr%1").tqarg( drawingObjectCounter ); - xmlWriter->startElement( "draw:custom-shape" ); + xmlWriter->startElement( "draw:custom-tqshape" ); xmlWriter->addAttribute( "draw:style-name", styleName ); xmlWriter->addAttribute( "svg:width", widthStr ); xmlWriter->addAttribute( "svg:height", heightStr ); xmlWriter->addAttribute( "svg:x", xStr ); xmlWriter->addAttribute( "svg:y", yStr ); - xmlWriter->addAttribute( "draw:layer", "layout" ); + xmlWriter->addAttribute( "draw:layer", "tqlayout" ); xmlWriter->startElement( "draw:glue-point" ); xmlWriter->addAttribute( "svg:x", 5 ); xmlWriter->addAttribute( "svg:y", 0 ); @@ -935,7 +935,7 @@ void PowerPointImport::processOctagon (DrawObject* drawObject, KoXmlWriter* xmlW xmlWriter->addAttribute( "svg:x", 10 ); xmlWriter->addAttribute( "svg:y", 4.782 ); xmlWriter->endElement(); - xmlWriter->startElement( "draw:enhanced-geometry" ); + xmlWriter->startElement( "draw:enhanced-tqgeometry" ); xmlWriter->addAttribute( "draw:type", "octagon" ); xmlWriter->startElement( "draw:equation" ); xmlWriter->addAttribute( "draw:formula", "left+$0 " ); @@ -978,36 +978,36 @@ void PowerPointImport::processOctagon (DrawObject* drawObject, KoXmlWriter* xmlW xmlWriter->addAttribute( "draw:handle-range-x-minimum", 0); xmlWriter->addAttribute("draw:handle-position","$0 top"); xmlWriter->endElement(); - xmlWriter->endElement(); // enhanced-geometry - xmlWriter->endElement(); // custom-shape + xmlWriter->endElement(); // enhanced-tqgeometry + xmlWriter->endElement(); // custom-tqshape } void PowerPointImport::processArrow (DrawObject* drawObject, KoXmlWriter* xmlWriter ) { if( !drawObject || !xmlWriter ) return; - QString widthStr = QString("%1mm").arg( drawObject->width() ); - QString heightStr = QString("%1mm").arg( drawObject->height() ); - QString xStr = QString("%1mm").arg( drawObject->left() ); - QString yStr = QString("%1mm").arg( drawObject->top() ); - QString styleName = QString("gr%1").arg( drawingObjectCounter ); + TQString widthStr = TQString("%1mm").tqarg( drawObject->width() ); + TQString heightStr = TQString("%1mm").tqarg( drawObject->height() ); + TQString xStr = TQString("%1mm").tqarg( drawObject->left() ); + TQString yStr = TQString("%1mm").tqarg( drawObject->top() ); + TQString styleName = TQString("gr%1").tqarg( drawingObjectCounter ); - xmlWriter->startElement( "draw:custom-shape" ); + xmlWriter->startElement( "draw:custom-tqshape" ); xmlWriter->addAttribute( "draw:style-name", styleName ); xmlWriter->addAttribute( "svg:width", widthStr ); xmlWriter->addAttribute( "svg:height", heightStr ); xmlWriter->addAttribute( "svg:x", xStr ); xmlWriter->addAttribute( "svg:y", yStr ); - xmlWriter->addAttribute( "draw:layer", "layout" ); - xmlWriter->startElement( "draw:enhanced-geometry" ); + xmlWriter->addAttribute( "draw:layer", "tqlayout" ); + xmlWriter->startElement( "draw:enhanced-tqgeometry" ); - if (drawObject->shape() == DrawObject::RightArrow) + if (drawObject->tqshape() == DrawObject::RightArrow) xmlWriter->addAttribute( "draw:type", "right-arrow" ); - else if (drawObject->shape() == DrawObject::LeftArrow) + else if (drawObject->tqshape() == DrawObject::LeftArrow) xmlWriter->addAttribute( "draw:type", "left-arrow" ); - else if (drawObject->shape() == DrawObject::UpArrow) + else if (drawObject->tqshape() == DrawObject::UpArrow) xmlWriter->addAttribute( "draw:type", "up-arrow" ); - else if (drawObject->shape() == DrawObject::DownArrow) + else if (drawObject->tqshape() == DrawObject::DownArrow) xmlWriter->addAttribute( "draw:type", "down-arrow" ); xmlWriter->startElement( "draw:equation" ); xmlWriter->addAttribute( "draw:formula","$1"); @@ -1042,7 +1042,7 @@ void PowerPointImport::processArrow (DrawObject* drawObject, KoXmlWriter* xmlWri xmlWriter->addAttribute( "draw:name","f7"); xmlWriter->endElement(); // draw:equation xmlWriter->startElement( "draw:handle" ); - if ( drawObject->shape() == DrawObject::RightArrow | drawObject->shape() == DrawObject::LeftArrow ) + if ( drawObject->tqshape() == DrawObject::RightArrow | drawObject->tqshape() == DrawObject::LeftArrow ) { xmlWriter->addAttribute( "draw:handle-range-x-maximum", 21600); xmlWriter->addAttribute( "draw:handle-range-x-minimum", 0); @@ -1050,7 +1050,7 @@ void PowerPointImport::processArrow (DrawObject* drawObject, KoXmlWriter* xmlWri xmlWriter->addAttribute("draw:handle-range-y-maximum",10800); xmlWriter->addAttribute("draw:handle-range-y-minimum",0); } - else if ( drawObject->shape() == DrawObject::UpArrow | drawObject->shape() == DrawObject::DownArrow ) + else if ( drawObject->tqshape() == DrawObject::UpArrow | drawObject->tqshape() == DrawObject::DownArrow ) { xmlWriter->addAttribute( "draw:handle-range-x-maximum", 10800); xmlWriter->addAttribute( "draw:handle-range-x-minimum", 0); @@ -1059,27 +1059,27 @@ void PowerPointImport::processArrow (DrawObject* drawObject, KoXmlWriter* xmlWri xmlWriter->addAttribute("draw:handle-range-y-minimum",0); } xmlWriter->endElement(); // draw:handle - xmlWriter->endElement(); // draw:enhanced-geometry - xmlWriter->endElement(); // draw:custom-shape + xmlWriter->endElement(); // draw:enhanced-tqgeometry + xmlWriter->endElement(); // draw:custom-tqshape } void PowerPointImport::processLine (DrawObject* drawObject, KoXmlWriter* xmlWriter ) { if( !drawObject || !xmlWriter) return; - QString x1Str = QString("%1mm").arg( drawObject->left() ); - QString y1Str = QString("%1mm").arg( drawObject->top() ); - QString x2Str = QString("%1mm").arg( drawObject->left() + drawObject->width() ); - QString y2Str = QString("%1mm").arg( drawObject->top() + drawObject->height() ); - QString styleName = QString("gr%1").arg( drawingObjectCounter ); + TQString x1Str = TQString("%1mm").tqarg( drawObject->left() ); + TQString y1Str = TQString("%1mm").tqarg( drawObject->top() ); + TQString x2Str = TQString("%1mm").tqarg( drawObject->left() + drawObject->width() ); + TQString y2Str = TQString("%1mm").tqarg( drawObject->top() + drawObject->height() ); + TQString styleName = TQString("gr%1").tqarg( drawingObjectCounter ); if ( drawObject->hasProperty("draw:mirror-vertical") ) - { QString temp = y1Str; + { TQString temp = y1Str; y1Str = y2Str; y2Str = temp; } if ( drawObject->hasProperty("draw:mirror-horizontal") ) - { QString temp = x1Str; + { TQString temp = x1Str; x1Str = x2Str; x2Str = temp; } @@ -1090,7 +1090,7 @@ void PowerPointImport::processLine (DrawObject* drawObject, KoXmlWriter* xmlWrit xmlWriter->addAttribute( "svg:y2", y2Str ); xmlWriter->addAttribute( "svg:x1", x1Str ); xmlWriter->addAttribute( "svg:x2", x2Str ); - xmlWriter->addAttribute( "draw:layer", "layout" ); + xmlWriter->addAttribute( "draw:layer", "tqlayout" ); xmlWriter->endElement(); } @@ -1099,19 +1099,19 @@ void PowerPointImport::processSmiley (DrawObject* drawObject, KoXmlWriter* xmlWr { if( !drawObject ||!xmlWriter ) return; - QString widthStr = QString("%1mm").arg( drawObject->width() ); - QString heightStr = QString("%1mm").arg( drawObject->height() ); - QString xStr = QString("%1mm").arg( drawObject->left() ); - QString yStr = QString("%1mm").arg( drawObject->top() ); - QString styleName = QString("gr%1").arg( drawingObjectCounter ); + TQString widthStr = TQString("%1mm").tqarg( drawObject->width() ); + TQString heightStr = TQString("%1mm").tqarg( drawObject->height() ); + TQString xStr = TQString("%1mm").tqarg( drawObject->left() ); + TQString yStr = TQString("%1mm").tqarg( drawObject->top() ); + TQString styleName = TQString("gr%1").tqarg( drawingObjectCounter ); - xmlWriter->startElement( "draw:custom-shape" ); + xmlWriter->startElement( "draw:custom-tqshape" ); xmlWriter->addAttribute( "draw:style-name", styleName ); xmlWriter->addAttribute( "svg:width", widthStr ); xmlWriter->addAttribute( "svg:height", heightStr ); xmlWriter->addAttribute( "svg:x", xStr ); xmlWriter->addAttribute( "svg:y", yStr ); - xmlWriter->addAttribute( "draw:layer", "layout" ); + xmlWriter->addAttribute( "draw:layer", "tqlayout" ); xmlWriter->startElement( "draw:glue-point" ); xmlWriter->addAttribute( "svg:x", 5 ); xmlWriter->addAttribute( "svg:y", 0 ); @@ -1136,7 +1136,7 @@ void PowerPointImport::processSmiley (DrawObject* drawObject, KoXmlWriter* xmlWr xmlWriter->addAttribute( "svg:x", 8.536 ); xmlWriter->addAttribute( "svg:y", 1.461 ); xmlWriter->endElement(); - xmlWriter->startElement( "draw:enhanced-geometry" ); + xmlWriter->startElement( "draw:enhanced-tqgeometry" ); xmlWriter->addAttribute( "draw:type", "smiley" ); xmlWriter->startElement( "draw:equation" ); xmlWriter->addAttribute( "draw:formula", "$0-15510 " ); @@ -1156,27 +1156,27 @@ void PowerPointImport::processSmiley (DrawObject* drawObject, KoXmlWriter* xmlWr xmlWriter->addAttribute( "draw:handle-range-y-minimum", 15510); xmlWriter->addAttribute("draw:handle-position","$0 top"); xmlWriter->endElement(); - xmlWriter->endElement(); // enhanced-geometry - xmlWriter->endElement(); // custom-shape + xmlWriter->endElement(); // enhanced-tqgeometry + xmlWriter->endElement(); // custom-tqshape } void PowerPointImport::processHeart (DrawObject* drawObject, KoXmlWriter* xmlWriter ) { if( !drawObject || !xmlWriter ) return; - QString widthStr = QString("%1mm").arg( drawObject->width() ); - QString heightStr = QString("%1mm").arg( drawObject->height() ); - QString xStr = QString("%1mm").arg( drawObject->left() ); - QString yStr = QString("%1mm").arg( drawObject->top() ); - QString styleName = QString("gr%1").arg( drawingObjectCounter ); + TQString widthStr = TQString("%1mm").tqarg( drawObject->width() ); + TQString heightStr = TQString("%1mm").tqarg( drawObject->height() ); + TQString xStr = TQString("%1mm").tqarg( drawObject->left() ); + TQString yStr = TQString("%1mm").tqarg( drawObject->top() ); + TQString styleName = TQString("gr%1").tqarg( drawingObjectCounter ); - xmlWriter->startElement( "draw:custom-shape" ); + xmlWriter->startElement( "draw:custom-tqshape" ); xmlWriter->addAttribute( "draw:style-name", styleName ); xmlWriter->addAttribute( "svg:width", widthStr ); xmlWriter->addAttribute( "svg:height", heightStr ); xmlWriter->addAttribute( "svg:x", xStr ); xmlWriter->addAttribute( "svg:y", yStr ); - xmlWriter->addAttribute( "draw:layer", "layout" ); + xmlWriter->addAttribute( "draw:layer", "tqlayout" ); xmlWriter->startElement( "draw:glue-point" ); xmlWriter->addAttribute( "svg:x", 5 ); xmlWriter->addAttribute( "svg:y", 1 ); @@ -1193,22 +1193,22 @@ void PowerPointImport::processHeart (DrawObject* drawObject, KoXmlWriter* xmlWri xmlWriter->addAttribute( "svg:x", 8.553 ); xmlWriter->addAttribute( "svg:y", 5 ); xmlWriter->endElement(); - xmlWriter->startElement( "draw:enhanced-geometry" ); + xmlWriter->startElement( "draw:enhanced-tqgeometry" ); xmlWriter->addAttribute( "draw:type", "heart" ); - xmlWriter->endElement(); // enhanced-geometry - xmlWriter->endElement(); // custom-shape + xmlWriter->endElement(); // enhanced-tqgeometry + xmlWriter->endElement(); // custom-tqshape } void PowerPointImport::processFreeLine (DrawObject* drawObject, KoXmlWriter* xmlWriter) { if( !drawObject ||!xmlWriter ) return; - QString widthStr = QString("%1mm").arg( drawObject->width() ); - QString heightStr = QString("%1mm").arg( drawObject->height() ); - QString xStr = QString("%1mm").arg( drawObject->left() ); - QString yStr = QString("%1mm").arg( drawObject->top() ); - QString styleName = QString("gr%1").arg( drawingObjectCounter ); + TQString widthStr = TQString("%1mm").tqarg( drawObject->width() ); + TQString heightStr = TQString("%1mm").tqarg( drawObject->height() ); + TQString xStr = TQString("%1mm").tqarg( drawObject->left() ); + TQString yStr = TQString("%1mm").tqarg( drawObject->top() ); + TQString styleName = TQString("gr%1").tqarg( drawingObjectCounter ); xmlWriter->startElement( "draw:path" ); xmlWriter->addAttribute( "draw:style-name", styleName ); @@ -1216,7 +1216,7 @@ void PowerPointImport::processFreeLine (DrawObject* drawObject, KoXmlWriter* xml xmlWriter->addAttribute( "svg:height", heightStr ); xmlWriter->addAttribute( "svg:x", xStr ); xmlWriter->addAttribute( "svg:y", yStr ); - xmlWriter->addAttribute( "draw:layer", "layout" ); + xmlWriter->addAttribute( "draw:layer", "tqlayout" ); xmlWriter->endElement(); // path } @@ -1228,63 +1228,63 @@ void PowerPointImport::processDrawingObjectForBody( DrawObject* drawObject, KoXm drawingObjectCounter++; - if (drawObject->shape() == DrawObject::Ellipse) + if (drawObject->tqshape() == DrawObject::Ellipse) { processEllipse (drawObject, xmlWriter ); } - else if (drawObject->shape() == DrawObject::Rectangle) + else if (drawObject->tqshape() == DrawObject::Rectangle) { processRectangle (drawObject, xmlWriter ); } - else if (drawObject->shape() == DrawObject::RoundRectangle) + else if (drawObject->tqshape() == DrawObject::RoundRectangle) { processRoundRectangle (drawObject, xmlWriter ); } - else if (drawObject->shape() == DrawObject::Diamond) + else if (drawObject->tqshape() == DrawObject::Diamond) { processDiamond (drawObject, xmlWriter ); } - else if (drawObject->shape() == DrawObject::IsoscelesTriangle | - drawObject->shape() == DrawObject::RightTriangle) + else if (drawObject->tqshape() == DrawObject::IsoscelesTriangle | + drawObject->tqshape() == DrawObject::RightTriangle) { processTriangle (drawObject, xmlWriter ); } - else if (drawObject->shape() == DrawObject::Trapezoid) + else if (drawObject->tqshape() == DrawObject::Trapezoid) { processTrapezoid (drawObject, xmlWriter ); } - else if (drawObject->shape() == DrawObject::Parallelogram) + else if (drawObject->tqshape() == DrawObject::Parallelogram) { processParallelogram( drawObject, xmlWriter); } - else if (drawObject->shape() == DrawObject::Hexagon) + else if (drawObject->tqshape() == DrawObject::Hexagon) { processHexagon ( drawObject, xmlWriter ); } - else if (drawObject->shape() == DrawObject::Octagon) + else if (drawObject->tqshape() == DrawObject::Octagon) { processOctagon ( drawObject, xmlWriter ); } - else if (drawObject->shape() == DrawObject::RightArrow | - drawObject->shape() == DrawObject::LeftArrow | - drawObject->shape() == DrawObject::UpArrow | - drawObject->shape() == DrawObject::DownArrow ) + else if (drawObject->tqshape() == DrawObject::RightArrow | + drawObject->tqshape() == DrawObject::LeftArrow | + drawObject->tqshape() == DrawObject::UpArrow | + drawObject->tqshape() == DrawObject::DownArrow ) { processArrow ( drawObject, xmlWriter ); } - else if (drawObject->shape() == DrawObject::Line) + else if (drawObject->tqshape() == DrawObject::Line) { processLine ( drawObject, xmlWriter ); } - else if (drawObject->shape() == DrawObject::Smiley) + else if (drawObject->tqshape() == DrawObject::Smiley) { processSmiley (drawObject, xmlWriter ); } - else if (drawObject->shape() == DrawObject::Heart) + else if (drawObject->tqshape() == DrawObject::Heart) { processHeart (drawObject, xmlWriter ); } - else if (drawObject->shape() == DrawObject::FreeLine) + else if (drawObject->tqshape() == DrawObject::FreeLine) { processFreeLine (drawObject, xmlWriter ); } @@ -1311,20 +1311,20 @@ void PowerPointImport::processTextObjectForBody( TextObject* textObject, KoXmlWr { if( !textObject || !xmlWriter ) return; - QString classStr = "subtitle"; + TQString classStr = "subtitle"; if( textObject->type() == TextObject::Title ) classStr = "title"; -// QString pStr = string( textObject->text() ).string(); - QString pStr; +// TQString pStr = string( textObject->text() ).string(); + TQString pStr; - QString widthStr = QString("%1mm").arg( textObject->width() ); - QString heightStr = QString("%1mm").arg( textObject->height() ); - QString xStr = QString("%1mm").arg( textObject->left() ); - QString yStr = QString("%1mm").arg( textObject->top() ); + TQString widthStr = TQString("%1mm").tqarg( textObject->width() ); + TQString heightStr = TQString("%1mm").tqarg( textObject->height() ); + TQString xStr = TQString("%1mm").tqarg( textObject->left() ); + TQString yStr = TQString("%1mm").tqarg( textObject->top() ); xmlWriter->startElement( "draw:frame" ); xmlWriter->addAttribute( "presentation:style-name", "pr1" ); - xmlWriter->addAttribute( "draw:layer", "layout" ); + xmlWriter->addAttribute( "draw:layer", "tqlayout" ); xmlWriter->addAttribute( "svg:width", widthStr ); xmlWriter->addAttribute( "svg:height", heightStr ); xmlWriter->addAttribute( "svg:x", xStr ); @@ -1379,17 +1379,17 @@ void PowerPointImport::processSlideForBody( unsigned slideNo, Slide* slide, KoXm { if( !slide || !xmlWriter ) return; - QString nameStr = Libppt::string( slide->title() ).string(); + TQString nameStr = Libppt::string( slide->title() ).string(); if( nameStr.isEmpty() ) - nameStr = QString("page%1").arg(slideNo+1); + nameStr = TQString("page%1").tqarg(slideNo+1); - QString styleNameStr = QString("dp%1").arg(slideNo+1); + TQString styleNameStr = TQString("dp%1").tqarg(slideNo+1); xmlWriter->startElement( "draw:page" ); xmlWriter->addAttribute( "draw:master-page-name", "Default" ); xmlWriter->addAttribute( "draw:name", nameStr ); xmlWriter->addAttribute( "draw:style-name", styleNameStr ); - xmlWriter->addAttribute( "presentation:presentation-page-layout-name", "AL1T0"); + xmlWriter->addAttribute( "presentation:presentation-page-tqlayout-name", "AL1T0"); GroupObject* root = slide->rootObject(); if( root ) @@ -1439,9 +1439,9 @@ void PowerPointImport::processGroupObjectForStyle( GroupObject* groupObject, KoX if( !groupObject ||!xmlWriter ) return; } -QString hexname( const Color &c ) +TQString hexname( const Color &c ) { - QColor qc( c.red, c.green, c.blue ); + TQColor qc( c.red, c.green, c.blue ); return qc.name(); } @@ -1450,12 +1450,12 @@ void PowerPointImport::processDrawingObjectForStyle( DrawObject* drawObject, KoX if( !drawObject || !xmlWriter) return; drawingObjectCounter++; - QString styleName = QString("gr%1").arg( drawingObjectCounter ); + TQString styleName = TQString("gr%1").tqarg( drawingObjectCounter ); xmlWriter->startElement( "style:style" ); xmlWriter->addAttribute( "style:name", styleName ); xmlWriter->addAttribute( "style:family", "graphic" ); - xmlWriter->addAttribute( "style:parent-style-name", "standard" ); + xmlWriter->addAttribute( "style:tqparent-style-name", "standard" ); xmlWriter->startElement( "style:graphic-properties" ); /* @@ -1463,7 +1463,7 @@ void PowerPointImport::processDrawingObjectForStyle( DrawObject* drawObject, KoX { xmlWriter->addAttribute( "draw:stroke", "dash" ); std::string s = drawObject->getStrProperty("draw:stroke-dash"); - QString ss( s.c_str() ); + TQString ss( s.c_str() ); xmlWriter->addAttribute( "draw:stroke-dash", ss ); } else xmlWriter->addAttribute( "draw:stroke", "dash" ); */ @@ -1477,7 +1477,7 @@ void PowerPointImport::processDrawingObjectForStyle( DrawObject* drawObject, KoX { xmlWriter->addAttribute( "draw:stroke", "dash" ); std::string s = drawObject->getStrProperty("draw:stroke-dash"); - QString ss( s.c_str() ); + TQString ss( s.c_str() ); xmlWriter->addAttribute( "draw:stroke-dash", ss ); qDebug("=============stroke dash==================="); // qDebug("test %g\n",angka); @@ -1490,7 +1490,7 @@ void PowerPointImport::processDrawingObjectForStyle( DrawObject* drawObject, KoX if( drawObject->hasProperty( "svg:stroke-width" ) ) { double strokeWidth = drawObject->getDoubleProperty("svg:stroke-width" ); - xmlWriter->addAttribute( "svg:stroke-width",QString("%1mm").arg( strokeWidth ) ); + xmlWriter->addAttribute( "svg:stroke-width",TQString("%1mm").tqarg( strokeWidth ) ); } if( drawObject->hasProperty( "svg:stroke-color" ) ) @@ -1502,25 +1502,25 @@ void PowerPointImport::processDrawingObjectForStyle( DrawObject* drawObject, KoX if( drawObject->hasProperty( "draw:marker-start" ) ) { std::string s = drawObject->getStrProperty("draw:marker-start"); - QString ss( s.c_str() ); + TQString ss( s.c_str() ); xmlWriter->addAttribute( "draw:marker-start", ss ); } if( drawObject->hasProperty( "draw:marker-end" ) ) { std::string s = drawObject->getStrProperty("draw:marker-end"); - QString ss( s.c_str() ); + TQString ss( s.c_str() ); xmlWriter->addAttribute( "draw:marker-end", ss); } /* if( drawObject->hasProperty( "draw:marker-start-length" ) ) { std::string s = drawObject->getStrProperty("draw:marker-start-length"); - QString ss( s.c_str() ); + TQString ss( s.c_str() ); xmlWriter->addAttribute("draw:marker-start-length", ss ); } if( drawObject->hasProperty( "draw:marker-end-length" ) ) { std::string s = drawObject->getStrProperty("draw:marker-end-length"); - QString ss( s.c_str() ); + TQString ss( s.c_str() ); xmlWriter->addAttribute( "draw:marker-end-length", ss); } */ @@ -1528,14 +1528,14 @@ void PowerPointImport::processDrawingObjectForStyle( DrawObject* drawObject, KoX { double strokeWidth = drawObject->getDoubleProperty("svg:stroke-width" ); double arrowWidth = (drawObject->getDoubleProperty("draw:marker-start-width") * strokeWidth); - xmlWriter->addAttribute( "draw:marker-start-width",QString("%1cm").arg( arrowWidth ) ); + xmlWriter->addAttribute( "draw:marker-start-width",TQString("%1cm").tqarg( arrowWidth ) ); } if( drawObject->hasProperty( "draw:marker-end-width" ) ) { double strokeWidth = drawObject->getDoubleProperty("svg:stroke-width" ); double arrowWidth = (drawObject->getDoubleProperty("draw:marker-end-width") * strokeWidth); - xmlWriter->addAttribute( "draw:marker-end-width",QString("%1cm").arg( arrowWidth ) ); + xmlWriter->addAttribute( "draw:marker-end-width",TQString("%1cm").tqarg( arrowWidth ) ); } @@ -1543,7 +1543,7 @@ void PowerPointImport::processDrawingObjectForStyle( DrawObject* drawObject, KoX if( drawObject->hasProperty( "draw:fill" ) ) { std::string s = drawObject->getStrProperty("draw:fill"); - QString ss( s.c_str() ); + TQString ss( s.c_str() ); xmlWriter->addAttribute( "draw:fill", ss); } @@ -1569,19 +1569,19 @@ void PowerPointImport::processDrawingObjectForStyle( DrawObject* drawObject, KoX if( drawObject->hasProperty( "draw:shadow-opacity" ) ) { double opacity = drawObject->getDoubleProperty("draw:shadow-opacity") ; - xmlWriter->addAttribute( "draw:shadow-opacity",QString("%1%").arg( opacity ) ); + xmlWriter->addAttribute( "draw:shadow-opacity",TQString("%1%").tqarg( opacity ) ); } if( drawObject->hasProperty( "draw:shadow-offset-x" ) ) { double offset = drawObject->getDoubleProperty("draw:shadow-offset-x") ; - xmlWriter->addAttribute( "draw:shadow-offset-x",QString("%1cm").arg( offset ) ); + xmlWriter->addAttribute( "draw:shadow-offset-x",TQString("%1cm").tqarg( offset ) ); } if( drawObject->hasProperty( "draw:shadow-offset-y" ) ) { double offset = drawObject->getDoubleProperty("draw:shadow-offset-y"); - xmlWriter->addAttribute( "draw:shadow-offset-y",QString("%1cm").arg( offset ) ); + xmlWriter->addAttribute( "draw:shadow-offset-y",TQString("%1cm").tqarg( offset ) ); } diff --git a/filters/kpresenter/powerpoint/import/powerpointimport.h b/filters/kpresenter/powerpoint/import/powerpointimport.h index 6c6774ab..5c3a73bc 100644 --- a/filters/kpresenter/powerpoint/import/powerpointimport.h +++ b/filters/kpresenter/powerpoint/import/powerpointimport.h @@ -23,7 +23,7 @@ #include #include -#include +#include #include "libppt.h" @@ -34,20 +34,21 @@ class KoXmlWriter; class PowerPointImport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - PowerPointImport ( QObject *parent, const char* name, const QStringList& ); + PowerPointImport ( TQObject *tqparent, const char* name, const TQStringList& ); virtual ~PowerPointImport(); - virtual KoFilter::ConversionStatus convert( const QCString& from, - const QCString& to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, + const TQCString& to ); private: class Private; Private* d; - QByteArray createManifest(); - QByteArray createStyles(); - QByteArray createContent(); + TQByteArray createManifest(); + TQByteArray createStyles(); + TQByteArray createContent(); int drawingObjectCounter; diff --git a/filters/kpresenter/powerpoint/libppt/objects.cpp b/filters/kpresenter/powerpoint/libppt/objects.cpp index 29870cbd..82359d15 100644 --- a/filters/kpresenter/powerpoint/libppt/objects.cpp +++ b/filters/kpresenter/powerpoint/libppt/objects.cpp @@ -139,7 +139,7 @@ void Object::setBackground( bool bg ) bool Object::hasProperty( std::string name ) { std::map::const_iterator i; - i = d->properties.find( name ); + i = d->properties.tqfind( name ); if( i == d->properties.end() ) return false; else @@ -379,7 +379,7 @@ void GroupObject::takeObject( Object* object ) class DrawObject::Private { public: - unsigned shape; + unsigned tqshape; bool isVerFlip; bool isHorFlip; }; @@ -387,7 +387,7 @@ public: DrawObject::DrawObject() { d = new Private; - d->shape = None; + d->tqshape = None; } DrawObject::~DrawObject() @@ -395,14 +395,14 @@ DrawObject::~DrawObject() delete d; } -unsigned DrawObject::shape() const +unsigned DrawObject::tqshape() const { - return d->shape; + return d->tqshape; } void DrawObject::setShape( unsigned s ) { - d->shape = s; + d->tqshape = s; } bool DrawObject::isVerFlip() const diff --git a/filters/kpresenter/powerpoint/libppt/objects.h b/filters/kpresenter/powerpoint/libppt/objects.h index 823e2a75..a9160897 100644 --- a/filters/kpresenter/powerpoint/libppt/objects.h +++ b/filters/kpresenter/powerpoint/libppt/objects.h @@ -103,7 +103,7 @@ public: Body = 1, Notes = 2, NotUsed = 3, - Other = 4, // text in a shape + Other = 4, // text in a tqshape CenterBody = 5, // subtitle in title slide CenterTitle = 6, // title in title slide HalfBody = 7, // body in two-column slide @@ -184,7 +184,7 @@ public: virtual ~DrawObject(); virtual bool isDrawing() const { return true; } - unsigned shape() const; + unsigned tqshape() const; void setShape( unsigned s ); bool isVerFlip() const; diff --git a/filters/kpresenter/powerpoint/libppt/pole.cpp b/filters/kpresenter/powerpoint/libppt/pole.cpp index 2a78b79f..daab8ff9 100644 --- a/filters/kpresenter/powerpoint/libppt/pole.cpp +++ b/filters/kpresenter/powerpoint/libppt/pole.cpp @@ -94,7 +94,7 @@ class DirEntry { public: bool valid; // false if invalid (should be skipped) - std::string name; // the name, not in unicode anymore + std::string name; // the name, not in tqunicode anymore bool dir; // true if directory unsigned long size; // size (not valid if directory) unsigned long start; // starting block @@ -113,9 +113,9 @@ class DirTree DirEntry* entry( unsigned index ); DirEntry* entry( const std::string& name, bool create=false ); int indexOf( DirEntry* e ); - int parent( unsigned index ); + int tqparent( unsigned index ); std::string fullName( unsigned index ); - std::vector children( unsigned index ); + std::vector tqchildren( unsigned index ); void load( unsigned char* buffer, unsigned len ); void save( unsigned char* buffer ); unsigned size(); @@ -503,13 +503,13 @@ int DirTree::indexOf( DirEntry* e ) return -1; } -int DirTree::parent( unsigned index ) +int DirTree::tqparent( unsigned index ) { - // brute-force, basically we iterate for each entries, find its children - // and check if one of the children is 'index' + // brute-force, basically we iterate for each entries, find its tqchildren + // and check if one of the tqchildren is 'index' for( unsigned j=0; j chi = children( j ); + std::vector chi = tqchildren( j ); for( unsigned i=0; iname; result.insert( 0, "/" ); - int p = parent( index ); + int p = tqparent( index ); DirEntry * _entry = 0; while( p > 0 ) { @@ -573,8 +573,8 @@ DirEntry* DirTree::entry( const std::string& name, bool create ) for( it = names.begin(); it != names.end(); ++it ) { - // find among the children of index - std::vector chi = children( index ); + // find among the tqchildren of index + std::vector chi = tqchildren( index ); unsigned child = 0; for( unsigned i = 0; i < chi.size(); i++ ) { @@ -589,11 +589,11 @@ DirEntry* DirTree::entry( const std::string& name, bool create ) if( child > 0 ) index = child; else { - // not found among children + // not found among tqchildren if( !create ) return (DirEntry*)0; // create a new entry - unsigned parent = index; + unsigned tqparent = index; entries.push_back( DirEntry() ); index = entryCount()-1; DirEntry* e = entry( index ); @@ -604,8 +604,8 @@ DirEntry* DirTree::entry( const std::string& name, bool create ) e->start = 0; e->child = End; e->prev = End; - e->next = entry(parent)->child; - entry(parent)->child = index; + e->next = entry(tqparent)->child; + entry(tqparent)->child = index; } } @@ -646,7 +646,7 @@ void dirtree_find_siblings( DirTree* dirtree, std::vector& result, } } -std::vector DirTree::children( unsigned index ) +std::vector DirTree::tqchildren( unsigned index ) { std::vector result; @@ -1102,7 +1102,7 @@ StreamIO::StreamIO( StorageIO* s, DirEntry* e) updateCache(); } -// FIXME tell parent we're gone +// FIXME tell tqparent we're gone StreamIO::~StreamIO() { delete[] cache_data; @@ -1248,10 +1248,10 @@ std::list Storage::entries( const std::string& path ) DirEntry* e = dt->entry( path, false ); if( e && e->dir ) { - unsigned parent = dt->indexOf( e ); - std::vector children = dt->children( parent ); - for( unsigned i = 0; i < children.size(); i++ ) - result.push_back( dt->entry( children[i] )->name ); + unsigned tqparent = dt->indexOf( e ); + std::vector tqchildren = dt->tqchildren( tqparent ); + for( unsigned i = 0; i < tqchildren.size(); i++ ) + result.push_back( dt->entry( tqchildren[i] )->name ); } return result; @@ -1270,7 +1270,7 @@ Stream::Stream( Storage* storage, const std::string& name ) io = storage->io->streamIO( name ); } -// FIXME tell parent we're gone +// FIXME tell tqparent we're gone Stream::~Stream() { delete io; diff --git a/filters/kpresenter/powerpoint/libppt/powerpoint.cpp b/filters/kpresenter/powerpoint/libppt/powerpoint.cpp index af035c69..eceb3411 100644 --- a/filters/kpresenter/powerpoint/libppt/powerpoint.cpp +++ b/filters/kpresenter/powerpoint/libppt/powerpoint.cpp @@ -394,12 +394,12 @@ Record* Record::create( unsigned type ) return record; } -void Record::setParent( Record* parent ) +void Record::setParent( Record* tqparent ) { - record_parent = parent; + record_parent = tqparent; } -const Record* Record::parent() const +const Record* Record::tqparent() const { return record_parent; } @@ -3088,10 +3088,10 @@ void StyleTextPropAtom::setData( unsigned /*size*/, const unsigned char* data, u atomData.charCount = charCount; atomData.depth = readU16(data+k); k += 2; - unsigned mask = readU32(data+6); + unsigned tqmask = readU32(data+6); k += 4; - if ( mask & 0xF ) + if ( tqmask & 0xF ) { int bulletFlag = readU16(data+k); k += 2; @@ -3100,99 +3100,99 @@ void StyleTextPropAtom::setData( unsigned /*size*/, const unsigned char* data, u atomData.bulletHardColor = ( bulletFlag & 4 ) ? 1 : 0; } - if ( mask & 0x0080 ) + if ( tqmask & 0x0080 ) { atomData.bulletChar = readU16(data+k); k += 2; } - if ( mask & 0x0010 ) + if ( tqmask & 0x0010 ) { atomData.bulletFont = readU16(data+k); k += 2; } - if ( mask & 0x0040 ) + if ( tqmask & 0x0040 ) { atomData.bulletHeight = readU16(data+k); k += 2; } - if ( mask & 0x0020 ) + if ( tqmask & 0x0020 ) { atomData.bulletColor = readU32(data+k); k += 4; } - if ( mask & 0x0F00 ) + if ( tqmask & 0x0F00 ) { - if ( mask & 0x800 ) + if ( tqmask & 0x800 ) { unsigned dummy = readU16(data+k); atomData.align = ( dummy & 3 ); k += 2; } - if ( mask & 0x400 ) + if ( tqmask & 0x400 ) { /*unsigned dummy =*/ readU16(data+k); k += 2; } - if ( mask & 0x200 ) + if ( tqmask & 0x200 ) { /*unsigned dummy =*/ readU16(data+k); k += 2; } - if ( mask & 0x100 ) + if ( tqmask & 0x100 ) { /*unsigned dummy =*/ readU16(data+k); k += 2; } } - if ( mask & 0x1000 ) + if ( tqmask & 0x1000 ) { atomData.lineFeed = readU16(data+k); k += 2; } - if ( mask & 0x2000 ) + if ( tqmask & 0x2000 ) { atomData.upperDist = readU16(data+k); k += 2; } - if ( mask & 0x4000 ) + if ( tqmask & 0x4000 ) { atomData.lowerDist = readU16(data+k); k += 2; } - if ( mask & 0x8000 ) + if ( tqmask & 0x8000 ) { /*unsigned dummy =*/ readU16(data+k); k += 2; } - if ( mask & 0x10000 ) + if ( tqmask & 0x10000 ) { /*unsigned dummy =*/ readU16(data+k); k += 2; } - if ( mask & 0xe0000 ) + if ( tqmask & 0xe0000 ) { unsigned dummy = readU16(data+k); - if ( mask & 0x20000 ) + if ( tqmask & 0x20000 ) atomData.asianLB1 = dummy & 1; - if ( mask & 0x40000 ) + if ( tqmask & 0x40000 ) atomData.asianLB2 = (dummy >> 1) & 1; - if ( mask & 0x80000 ) + if ( tqmask & 0x80000 ) atomData.asianLB3 = (dummy >> 2) & 1; k += 2; } - if ( mask & 0x200000 ) + if ( tqmask & 0x200000 ) { atomData.biDi = readU16(data+k); k += 2; @@ -3537,15 +3537,15 @@ const unsigned int SlideAtom::id = 1007; class SlideAtom::Private { public: - int layoutGeom; - int layoutPlaceholderId1; - int layoutPlaceholderId2; - int layoutPlaceholderId3; - int layoutPlaceholderId4; - int layoutPlaceholderId5; - int layoutPlaceholderId6; - int layoutPlaceholderId7; - int layoutPlaceholderId8; + int tqlayoutGeom; + int tqlayoutPlaceholderId1; + int tqlayoutPlaceholderId2; + int tqlayoutPlaceholderId3; + int tqlayoutPlaceholderId4; + int tqlayoutPlaceholderId5; + int tqlayoutPlaceholderId6; + int tqlayoutPlaceholderId7; + int tqlayoutPlaceholderId8; int masterId; int notesId; int flags; @@ -3554,15 +3554,15 @@ public: SlideAtom::SlideAtom() { d = new Private; - d->layoutGeom = 0; - d->layoutPlaceholderId1 = 0; - d->layoutPlaceholderId2 = 0; - d->layoutPlaceholderId3 = 0; - d->layoutPlaceholderId4 = 0; - d->layoutPlaceholderId5 = 0; - d->layoutPlaceholderId6 = 0; - d->layoutPlaceholderId7 = 0; - d->layoutPlaceholderId8 = 0; + d->tqlayoutGeom = 0; + d->tqlayoutPlaceholderId1 = 0; + d->tqlayoutPlaceholderId2 = 0; + d->tqlayoutPlaceholderId3 = 0; + d->tqlayoutPlaceholderId4 = 0; + d->tqlayoutPlaceholderId5 = 0; + d->tqlayoutPlaceholderId6 = 0; + d->tqlayoutPlaceholderId7 = 0; + d->tqlayoutPlaceholderId8 = 0; d->masterId = 0; d->notesId = 0; d->flags = 0; @@ -3573,39 +3573,39 @@ SlideAtom::~SlideAtom() delete d; } -int SlideAtom::layoutGeom() const +int SlideAtom::tqlayoutGeom() const { - return d->layoutGeom; + return d->tqlayoutGeom; } -void SlideAtom::setLayoutGeom(int layoutGeom ) +void SlideAtom::setLayoutGeom(int tqlayoutGeom ) { - d->layoutGeom = layoutGeom; + d->tqlayoutGeom = tqlayoutGeom; } -int SlideAtom::layoutPlaceholderId() const +int SlideAtom::tqlayoutPlaceholderId() const { - return d->layoutPlaceholderId1; - return d->layoutPlaceholderId2; - return d->layoutPlaceholderId3; - return d->layoutPlaceholderId4; - return d->layoutPlaceholderId5; - return d->layoutPlaceholderId6; - return d->layoutPlaceholderId7; - return d->layoutPlaceholderId8; + return d->tqlayoutPlaceholderId1; + return d->tqlayoutPlaceholderId2; + return d->tqlayoutPlaceholderId3; + return d->tqlayoutPlaceholderId4; + return d->tqlayoutPlaceholderId5; + return d->tqlayoutPlaceholderId6; + return d->tqlayoutPlaceholderId7; + return d->tqlayoutPlaceholderId8; } -void SlideAtom::setLayoutPlaceholderId(int layoutPlaceholderId1, int layoutPlaceholderId2,int layoutPlaceholderId3,int layoutPlaceholderId4,int layoutPlaceholderId5,int layoutPlaceholderId6,int layoutPlaceholderId7,int layoutPlaceholderId8) +void SlideAtom::setLayoutPlaceholderId(int tqlayoutPlaceholderId1, int tqlayoutPlaceholderId2,int tqlayoutPlaceholderId3,int tqlayoutPlaceholderId4,int tqlayoutPlaceholderId5,int tqlayoutPlaceholderId6,int tqlayoutPlaceholderId7,int tqlayoutPlaceholderId8) { - d->layoutPlaceholderId1 = layoutPlaceholderId1; - d->layoutPlaceholderId2 = layoutPlaceholderId2; - d->layoutPlaceholderId3 = layoutPlaceholderId3; - d->layoutPlaceholderId4 = layoutPlaceholderId4; - d->layoutPlaceholderId5 = layoutPlaceholderId5; - d->layoutPlaceholderId6 = layoutPlaceholderId6; - d->layoutPlaceholderId7 = layoutPlaceholderId7; - d->layoutPlaceholderId8 = layoutPlaceholderId8; + d->tqlayoutPlaceholderId1 = tqlayoutPlaceholderId1; + d->tqlayoutPlaceholderId2 = tqlayoutPlaceholderId2; + d->tqlayoutPlaceholderId3 = tqlayoutPlaceholderId3; + d->tqlayoutPlaceholderId4 = tqlayoutPlaceholderId4; + d->tqlayoutPlaceholderId5 = tqlayoutPlaceholderId5; + d->tqlayoutPlaceholderId6 = tqlayoutPlaceholderId6; + d->tqlayoutPlaceholderId7 = tqlayoutPlaceholderId7; + d->tqlayoutPlaceholderId8 = tqlayoutPlaceholderId8; } int SlideAtom::masterId() const @@ -3650,16 +3650,16 @@ void SlideAtom::setData( unsigned , const unsigned char* data ) void SlideAtom::dump( std::ostream& out ) const { out << "SlideAtom" << std::endl; - out << "layoutGeom " << layoutGeom() << std::endl; - // out << "layoutPlaceholderId " << layoutPlaceholderId() <layoutPlaceholderId1 <layoutPlaceholderId2 <layoutPlaceholderId3 <layoutPlaceholderId4 <layoutPlaceholderId5 <layoutPlaceholderId6 <layoutPlaceholderId7 <layoutPlaceholderId8 <tqlayoutPlaceholderId1 <tqlayoutPlaceholderId2 <tqlayoutPlaceholderId3 <tqlayoutPlaceholderId4 <tqlayoutPlaceholderId5 <tqlayoutPlaceholderId6 <tqlayoutPlaceholderId7 <tqlayoutPlaceholderId8 <shapeId = 0; + d->tqshapeId = 0; d->persistentFlag = 0; d->background = false; d->hFlip = false; @@ -4127,17 +4127,17 @@ msofbtSpAtom ::~msofbtSpAtom () delete d; } -unsigned long msofbtSpAtom::shapeId() const +unsigned long msofbtSpAtom::tqshapeId() const { - return d->shapeId; + return d->tqshapeId; } void msofbtSpAtom::setShapeId( unsigned long id ) { - d->shapeId = id; + d->tqshapeId = id; } -const char* msofbtSpAtom::shapeTypeAsString() const +const char* msofbtSpAtom::tqshapeTypeAsString() const { switch( instance() ) { @@ -5453,7 +5453,7 @@ int PPTReader::indexPersistence( unsigned long ofs ) return 0; } -void PPTReader::loadRecord( Record* parent ) +void PPTReader::loadRecord( Record* tqparent ) { // FIXME unsigned char buffer[65536]; @@ -5472,7 +5472,7 @@ void PPTReader::loadRecord( Record* parent ) Record* record = Record::create( type ); if( record ) { - record->setParent( parent ); + record->setParent( tqparent ); record->setPosition( pos ); record->setInstance( instance ); @@ -5821,7 +5821,7 @@ void PPTReader::handleEscherGroupAtom( msofbtSpgrAtom* atom ) // set rect bound of current group - // this is shape for the group, no need to + // this is tqshape for the group, no need to d->isShapeGroup = true; } diff --git a/filters/kpresenter/powerpoint/libppt/powerpoint.h b/filters/kpresenter/powerpoint/libppt/powerpoint.h index 49950817..ea293ae5 100644 --- a/filters/kpresenter/powerpoint/libppt/powerpoint.h +++ b/filters/kpresenter/powerpoint/libppt/powerpoint.h @@ -63,9 +63,9 @@ public: */ virtual bool isContainer() const { return false; } - void setParent( Record* parent ); + void setParent( Record* tqparent ); - const Record* parent() const; + const Record* tqparent() const; /** Sets the data for this record. @@ -1262,12 +1262,12 @@ public: SlideAtom(); ~SlideAtom(); - int layoutGeom() const; - void setLayoutGeom( int layoutGeom ); + int tqlayoutGeom() const; + void setLayoutGeom( int tqlayoutGeom ); // see OEPlaceHolderAtom - int layoutPlaceholderId() const; - // void setLayoutPlaceholderId(int layoutPlaceholderId); - void setLayoutPlaceholderId(int layoutPlaceholderId1, int layoutPlaceholderId2,int layoutPlaceholderId3,int layoutPlaceholderId4,int layoutPlaceholderId5,int layoutPlaceholderId6,int layoutPlaceholderId7,int layoutPlaceholderId8); + int tqlayoutPlaceholderId() const; + // void setLayoutPlaceholderId(int tqlayoutPlaceholderId); + void setLayoutPlaceholderId(int tqlayoutPlaceholderId1, int tqlayoutPlaceholderId2,int tqlayoutPlaceholderId3,int tqlayoutPlaceholderId4,int tqlayoutPlaceholderId5,int tqlayoutPlaceholderId6,int tqlayoutPlaceholderId7,int tqlayoutPlaceholderId8); int masterId() const; void setMasterId( int masterId ); int notesId() const; @@ -1901,9 +1901,9 @@ public: msofbtSpAtom (); ~msofbtSpAtom (); - unsigned long shapeId() const; + unsigned long tqshapeId() const; void setShapeId( unsigned long id ); - const char* shapeTypeAsString() const; + const char* tqshapeTypeAsString() const; unsigned long persistentFlag() const; void setPersistentFlag( unsigned long persistentFlag ); @@ -1957,10 +1957,10 @@ public: FillSolid, // Fill with a solid color FillPattern, // Fill with a pattern (bitmap) FillTexture, // A texture (pattern with its own color map) - FillPicture, // Center a picture in the shape + FillPicture, // Center a picture in the tqshape FillShade, // Shade from start to end points FillShadeCenter, // Shade from bounding rectangle to end point - FillShadeShape, // Shade from shape outline to end point + FillShadeShape, // Shade from tqshape outline to end point FillShadeScale, // Similar to msofillShade, but the fillAngle FillShadeTitle, // special type - shade to title --- for PP FillBackground // Use the background fill color/pattern @@ -2095,8 +2095,8 @@ public: NotesBody, CenteredTitle, Subtitle, - VerticalTextTitle, - VerticalTextBody, + Qt::VerticalTextTitle, + Qt::VerticalTextBody, NotesSlideImage, Object, Graph, @@ -2385,9 +2385,9 @@ public: int ruid() const; // rule ID void setRuid( int ruid ); int align() const; - void setAlign( int align );// alignment + void setAlign( int align );// tqalignment int cProxies() const; - void setCProxies( int cProxies );// number of shapes governed by rule + void setCProxies( int cProxies );// number of tqshapes governed by rule void setData( unsigned size, const unsigned char* data ); const char* name(){ return "msofbtAlignRuleAtom "; } @@ -2497,7 +2497,7 @@ protected: void loadDocument(); int indexPersistence( unsigned long offset ); - void loadRecord( Record* parent ); + void loadRecord( Record* tqparent ); void handleRecord( Record* record, int type ); void handleContainer( Container* container, int type, unsigned size ); diff --git a/filters/kpresenter/powerpoint/libppt/ustring.cpp b/filters/kpresenter/powerpoint/libppt/ustring.cpp index b0a44e56..b574d7de 100644 --- a/filters/kpresenter/powerpoint/libppt/ustring.cpp +++ b/filters/kpresenter/powerpoint/libppt/ustring.cpp @@ -216,13 +216,13 @@ UString UString::null; static char *statBuffer = 0L; UChar::UChar(const UCharReference &c) - : uc( c.unicode() ) + : uc( c.tqunicode() ) { } UChar UChar::toLower() const { - // ### properly support unicode tolower + // ### properly support tqunicode tolower if (uc >= 256 || islower(uc)) return *this; @@ -526,7 +526,7 @@ unsigned long UString::toULong(bool *ok) const return static_cast(d); } -int UString::find(const UString &f, int pos) const +int UString::tqfind(const UString &f, int pos) const { if (isNull()) return -1; @@ -644,7 +644,7 @@ bool Libppt::operator<(const UString& s1, const UString& s2) l++; } if (l < lmin) - return (c1->unicode() < c2->unicode()); + return (c1->tqunicode() < c2->tqunicode()); return (l1 < l2); } diff --git a/filters/kpresenter/powerpoint/libppt/ustring.h b/filters/kpresenter/powerpoint/libppt/ustring.h index dfadbc7d..087aff50 100644 --- a/filters/kpresenter/powerpoint/libppt/ustring.h +++ b/filters/kpresenter/powerpoint/libppt/ustring.h @@ -40,8 +40,8 @@ namespace Libppt { * @short Unicode character. * * UChar represents a 16 bit Unicode character. It's internal data - * representation is compatible to XChar2b and QChar. It's therefore - * possible to exchange data with X and Qt with shallow copies. + * representation is compatible to XChar2b and TQChar. It's therefore + * possible to exchange data with X and TQt with shallow copies. */ struct UChar { /** @@ -71,7 +71,7 @@ namespace Libppt { /** * @return the 16 bit Unicode value of the character */ - unsigned short unicode() const { return uc; } + unsigned short tqunicode() const { return uc; } public: /** * @return The character converted to lower case. @@ -128,7 +128,7 @@ namespace Libppt { /** * @return Unicode value. */ - unsigned short unicode() const { return ref().unicode(); } + unsigned short tqunicode() const { return ref().tqunicode(); } /** * @return Lower byte. */ @@ -334,7 +334,7 @@ namespace Libppt { * @return Position of first occurence of f starting at position pos. * -1 if the search was not successful. */ - int find(const UString &f, int pos = 0) const; + int tqfind(const UString &f, int pos = 0) const; /** * @return Position of first occurence of f searching backwards from * position pos. diff --git a/filters/kpresenter/svg/svgexport.cc b/filters/kpresenter/svg/svgexport.cc index 2be6eea1..20cff46d 100644 --- a/filters/kpresenter/svg/svgexport.cc +++ b/filters/kpresenter/svg/svgexport.cc @@ -18,8 +18,8 @@ Boston, MA 02110-1301 USA. */ -#include -#include +#include +#include #include @@ -38,7 +38,7 @@ typedef KGenericFactory SvgExportFactory; K_EXPORT_COMPONENT_FACTORY( libkpresentersvgexport, SvgExportFactory( "svgexport" ) ) -SvgExport::SvgExport(KoFilter *, const char *, const QStringList&) +SvgExport::SvgExport(KoFilter *, const char *, const TQStringList&) : KoFilter() { } @@ -48,8 +48,8 @@ SvgExport::~SvgExport() } -KoFilter::ConversionStatus -SvgExport::convert(const QCString& from, const QCString& to) +KoFilter::ConversiontqStatus +SvgExport::convert(const TQCString& from, const TQCString& to) { KoDocument * document = m_chain->inputDocument(); @@ -76,13 +76,13 @@ SvgExport::convert(const QCString& from, const QCString& to) kdWarning() << "Invalid document mimetype " << kpresenterdoc->mimeType() << endl; return KoFilter::NotImplemented; } - KoPageLayout layoutPage= kpresenterdoc->pageLayout(); - int width = int( layoutPage.ptWidth ); - int height = int( layoutPage.ptHeight ); + KoPageLayout tqlayoutPage= kpresenterdoc->pageLayout(); + int width = int( tqlayoutPage.ptWidth ); + int height = int( tqlayoutPage.ptHeight ); - QPicture picture; - QPainter painter(&picture); - QRect rect(QPoint(0, 0), QPoint(width, height)); + TQPicture picture; + TQPainter painter(&picture); + TQRect rect(TQPoint(0, 0), TQPoint(width, height)); kpresenterdoc->paintContent(painter, rect, false); painter.end(); diff --git a/filters/kpresenter/svg/svgexport.h b/filters/kpresenter/svg/svgexport.h index 7b4583b3..a11b20c2 100644 --- a/filters/kpresenter/svg/svgexport.h +++ b/filters/kpresenter/svg/svgexport.h @@ -26,12 +26,13 @@ class SvgExport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - SvgExport(KoFilter *parent, const char *name, const QStringList&); + SvgExport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~SvgExport(); - virtual KoFilter::ConversionStatus convert(const QCString& from, const QCString& to); + virtual KoFilter::ConversiontqStatus convert(const TQCString& from, const TQCString& to); }; #endif // __SVGEXPORT_H__ diff --git a/filters/kpresenter/xbm/xbmexport.cpp b/filters/kpresenter/xbm/xbmexport.cpp index 148288dc..16a0818a 100644 --- a/filters/kpresenter/xbm/xbmexport.cpp +++ b/filters/kpresenter/xbm/xbmexport.cpp @@ -17,8 +17,8 @@ * Boston, MA 02110-1301, USA. */ -#include -#include +#include +#include #include @@ -33,7 +33,7 @@ typedef KGenericFactory xbmExportFactory; K_EXPORT_COMPONENT_FACTORY( libkpresenterxbmexport, xbmExportFactory( "xbmexport" ) ) -XbmExport::XbmExport(KoFilter *fil, const char *name, const QStringList&lst) +XbmExport::XbmExport(KoFilter *fil, const char *name, const TQStringList&lst) : ImageExport(fil,name,lst) { } @@ -58,7 +58,7 @@ bool XbmExport::extraImageAttribute() } -bool XbmExport::saveImage( QString fileName) +bool XbmExport::saveImage( TQString fileName) { bool ret = pixmap.save( fileName, "XBM" ); // Save the image. diff --git a/filters/kpresenter/xbm/xbmexport.h b/filters/kpresenter/xbm/xbmexport.h index 065e52d5..9079f950 100644 --- a/filters/kpresenter/xbm/xbmexport.h +++ b/filters/kpresenter/xbm/xbmexport.h @@ -25,11 +25,12 @@ class XbmExport : public ImageExport { Q_OBJECT + TQ_OBJECT public: - XbmExport(KoFilter *parent, const char *name, const QStringList&); + XbmExport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~XbmExport(); - virtual bool saveImage( QString fileName); + virtual bool saveImage( TQString fileName); virtual bool extraImageAttribute(); virtual const char * exportFormat(); }; diff --git a/filters/kpresenter/xpm/xpmexport.cpp b/filters/kpresenter/xpm/xpmexport.cpp index 1456504e..87097f5f 100644 --- a/filters/kpresenter/xpm/xpmexport.cpp +++ b/filters/kpresenter/xpm/xpmexport.cpp @@ -17,8 +17,8 @@ * Boston, MA 02110-1301, USA. */ -#include -#include +#include +#include #include @@ -33,7 +33,7 @@ typedef KGenericFactory xpmExportFactory; K_EXPORT_COMPONENT_FACTORY( libkpresenterxpmexport, xpmExportFactory( "xpmexport" ) ) -XpmExport::XpmExport(KoFilter *fil, const char *name, const QStringList&lst) +XpmExport::XpmExport(KoFilter *fil, const char *name, const TQStringList&lst) : ImageExport(fil,name,lst) { } @@ -58,7 +58,7 @@ bool XpmExport::extraImageAttribute() } -bool XpmExport::saveImage( QString fileName) +bool XpmExport::saveImage( TQString fileName) { bool ret = pixmap.save( fileName, "XPM" ); // Save the image. diff --git a/filters/kpresenter/xpm/xpmexport.h b/filters/kpresenter/xpm/xpmexport.h index 8ccec46c..14b14b6c 100644 --- a/filters/kpresenter/xpm/xpmexport.h +++ b/filters/kpresenter/xpm/xpmexport.h @@ -25,11 +25,12 @@ class XpmExport : public ImageExport { Q_OBJECT + TQ_OBJECT public: - XpmExport(KoFilter *parent, const char *name, const QStringList&); + XpmExport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~XpmExport(); - virtual bool saveImage( QString fileName); + virtual bool saveImage( TQString fileName); virtual bool extraImageAttribute(); virtual const char * exportFormat(); }; diff --git a/filters/krita/gmagick/kis_image_magick_converter.cc b/filters/krita/gmagick/kis_image_magick_converter.cc index c94895f8..7d61515d 100644 --- a/filters/krita/gmagick/kis_image_magick_converter.cc +++ b/filters/krita/gmagick/kis_image_magick_converter.cc @@ -24,9 +24,9 @@ #include -#include -#include -#include +#include +#include +#include #include #include @@ -35,7 +35,7 @@ #include #include -#include +#include #include "kis_types.h" #include "kis_global.h" @@ -58,25 +58,25 @@ namespace { - const Q_UINT8 PIXEL_BLUE = 0; - const Q_UINT8 PIXEL_GREEN = 1; - const Q_UINT8 PIXEL_RED = 2; - const Q_UINT8 PIXEL_ALPHA = 3; + const TQ_UINT8 PIXEL_BLUE = 0; + const TQ_UINT8 PIXEL_GREEN = 1; + const TQ_UINT8 PIXEL_RED = 2; + const TQ_UINT8 PIXEL_ALPHA = 3; - static const Q_UINT8 PIXEL_CYAN = 0; - static const Q_UINT8 PIXEL_MAGENTA = 1; - static const Q_UINT8 PIXEL_YELLOW = 2; - static const Q_UINT8 PIXEL_BLACK = 3; - static const Q_UINT8 PIXEL_CMYK_ALPHA = 4; + static const TQ_UINT8 PIXEL_CYAN = 0; + static const TQ_UINT8 PIXEL_MAGENTA = 1; + static const TQ_UINT8 PIXEL_YELLOW = 2; + static const TQ_UINT8 PIXEL_BLACK = 3; + static const TQ_UINT8 PIXEL_CMYK_ALPHA = 4; - static const Q_UINT8 PIXEL_GRAY = 0; - static const Q_UINT8 PIXEL_GRAY_ALPHA = 1; + static const TQ_UINT8 PIXEL_GRAY = 0; + static const TQ_UINT8 PIXEL_GRAY_ALPHA = 1; /** * Make this more flexible -- although... ImageMagick * isn't that flexible either. */ - QString getColorSpaceName(ColorspaceType type, unsigned long imageDepth = 8) + TQString getColorSpaceName(ColorspaceType type, unsigned long imageDepth = 8) { if (type == GRAYColorspace) { @@ -125,7 +125,7 @@ namespace { const unsigned char * profiledata = GetImageProfile(image, "ICM", &length); if( profiledata == NULL ) return 0; - QByteArray rawdata; + TQByteArray rawdata; rawdata.resize(length); memcpy(rawdata.data(), profiledata, length); @@ -151,8 +151,8 @@ namespace { continue; // XXX: Hardcoded for icc type -- is that correct for us? - if (QString::compare(name, "icc") == 0) { - QByteArray rawdata; + if (TQString::compare(name, "icc") == 0) { + TQByteArray rawdata; rawdata.resize(profile->length); memcpy(rawdata.data(), profile->datum, profile->length); @@ -173,22 +173,22 @@ namespace { const unsigned char * profiledata = GetImageProfile(src, "IPTC", &length); if( profiledata != NULL ) { - QByteArray rawdata; + TQByteArray rawdata; rawdata.resize(length); memcpy(rawdata.data(), profiledata, length); - KisAnnotation* annotation = new KisAnnotation(QString("IPTC"), "", rawdata); + KisAnnotation* annotation = new KisAnnotation(TQString("IPTC"), "", rawdata); Q_CHECK_PTR(annotation); image -> addAnnotation(annotation); } for(int i = 0; i < src->generic_profiles; i++) { - QByteArray rawdata; + TQByteArray rawdata; rawdata.resize(length); memcpy(rawdata.data(), src->generic_profile[i].info, src->generic_profile[i].length); - KisAnnotation* annotation = new KisAnnotation(QString(src->generic_profile[i].name), "", rawdata); + KisAnnotation* annotation = new KisAnnotation(TQString(src->generic_profile[i].name), "", rawdata); Q_CHECK_PTR(annotation); image -> addAnnotation(annotation); @@ -197,12 +197,12 @@ namespace { const ImageAttribute* imgAttr = GetImageAttribute(src, NULL); while(imgAttr) { - QByteArray rawdata; + TQByteArray rawdata; int len = strlen(imgAttr -> value) + 1; rawdata.resize(len); memcpy(rawdata.data(), imgAttr -> value, len); - KisAnnotation* annotation = new KisAnnotation( QString("krita_attribute:%1").arg(QString(imgAttr -> key)), "", rawdata ); + KisAnnotation* annotation = new KisAnnotation( TQString("krita_attribute:%1").tqarg(TQString(imgAttr -> key)), "", rawdata ); Q_CHECK_PTR(annotation); image -> addAnnotation(annotation); @@ -226,14 +226,14 @@ namespace { continue; // XXX: icc will be written seperately? - if (QString::compare(name, "icc") == 0) + if (TQString::compare(name, "icc") == 0) continue; - QByteArray rawdata; + TQByteArray rawdata; rawdata.resize(profile->length); memcpy(rawdata.data(), profile->datum, profile->length); - annotation = new KisAnnotation(QString(name), "", rawdata); + annotation = new KisAnnotation(TQString(name), "", rawdata); Q_CHECK_PTR(annotation); image -> addAnnotation(annotation); @@ -252,13 +252,13 @@ namespace { ImageAttribute * attr = src -> attributes; while (attr) { #endif - QByteArray rawdata; + TQByteArray rawdata; int len = strlen(attr -> value) + 1; rawdata.resize(len); memcpy(rawdata.data(), attr -> value, len); annotation = new KisAnnotation( - QString("krita_attribute:%1").arg(QString(attr -> key)), "", rawdata); + TQString("krita_attribute:%1").tqarg(TQString(attr -> key)), "", rawdata); Q_CHECK_PTR(annotation); image -> addAnnotation(annotation); @@ -274,7 +274,7 @@ namespace { void exportAnnotationsForImage(Image * dst, vKisAnnotationSP_it& it, vKisAnnotationSP_it& annotationsEnd) { while(it != annotationsEnd) { - if (!(*it) || (*it) -> type() == QString()) { + if (!(*it) || (*it) -> type() == TQString()) { kdDebug(41008) << "Warning: empty annotation" << endl; ++it; continue; @@ -388,7 +388,7 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB images = BlobToImage(ii, &m_data[0], m_data.size(), &ei); } else { - qstrncpy(ii -> filename, QFile::encodeName(uri.path()), MaxTextExtent - 1); + qstrncpy(ii -> filename, TQFile::encodeName(uri.path()), MaxTextExtent - 1); if (ii -> filename[MaxTextExtent - 1]) { emit notifyProgressError(); @@ -426,7 +426,7 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB unsigned long imageDepth = image->depth; kdDebug(41008) << "Image depth: " << imageDepth << "\n"; - QString csName; + TQString csName; KisColorSpace * cs = 0; ColorspaceType colorspaceType; @@ -477,10 +477,10 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB if (image -> columns && image -> rows) { // Opacity (set by the photoshop import filter) - Q_UINT8 opacity = OPACITY_OPAQUE; + TQ_UINT8 opacity = OPACITY_OPAQUE; const ImageAttribute * attr = GetImageAttribute(image, "[layer-opacity]"); if (attr != 0) { - opacity = Q_UINT8_MAX - Downscale(QString(attr->value).toInt()); + opacity = TQ_UINT8_MAX - Downscale(TQString(attr->value).toInt()); } KisPaintLayerSP layer = 0; @@ -496,21 +496,21 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB Q_ASSERT(layer); // Layerlocation (set by the photoshop import filter) - Q_INT32 x_offset = 0; - Q_INT32 y_offset = 0; + TQ_INT32 x_offset = 0; + TQ_INT32 y_offset = 0; attr = GetImageAttribute(image, "[layer-xpos]"); if (attr != 0) { - x_offset = QString(attr->value).toInt(); + x_offset = TQString(attr->value).toInt(); } attr = GetImageAttribute(image, "[layer-ypos]"); if (attr != 0) { - y_offset = QString(attr->value).toInt(); + y_offset = TQString(attr->value).toInt(); } - for (Q_UINT32 y = 0; y < image->rows; y ++) + for (TQ_UINT32 y = 0; y < image->rows; y ++) { const PixelPacket *pp = AcquireCacheView(vi, 0, y, image->columns, 1, &ei); @@ -533,7 +533,7 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB int x = 0; while (!hiter.isDone()) { - Q_UINT8 *ptr= hiter.rawData(); + TQ_UINT8 *ptr= hiter.rawData(); *(ptr++) = Downscale(pp->red); // cyan *(ptr++) = Downscale(pp->green); // magenta *(ptr++) = Downscale(pp->blue); // yellow @@ -558,7 +558,7 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB else if (colorspaceType == LABColorspace) { while(! hiter.isDone()) { - Q_UINT16 *ptr = reinterpret_cast(hiter.rawData()); + TQ_UINT16 *ptr = reinterpret_cast(hiter.rawData()); *(ptr++) = ScaleQuantumToShort(pp->red); *(ptr++) = ScaleQuantumToShort(pp->green); @@ -576,7 +576,7 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB if (imageDepth == 8) { while(! hiter.isDone()) { - Q_UINT8 *ptr= hiter.rawData(); + TQ_UINT8 *ptr= hiter.rawData(); // XXX: not colorstrategy and bitdepth independent *(ptr++) = Downscale(pp->blue); *(ptr++) = Downscale(pp->green); @@ -590,7 +590,7 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB else if (imageDepth == 16) { while(! hiter.isDone()) { - Q_UINT16 *ptr = reinterpret_cast(hiter.rawData()); + TQ_UINT16 *ptr = reinterpret_cast(hiter.rawData()); // XXX: not colorstrategy independent *(ptr++) = ScaleQuantumToShort(pp->blue); *(ptr++) = ScaleQuantumToShort(pp->green); @@ -606,7 +606,7 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB if (imageDepth == 8) { while(! hiter.isDone()) { - Q_UINT8 *ptr= hiter.rawData(); + TQ_UINT8 *ptr= hiter.rawData(); // XXX: not colorstrategy and bitdepth independent *(ptr++) = Downscale(pp->blue); *(ptr++) = OPACITY_OPAQUE - Downscale(pp->opacity); @@ -618,7 +618,7 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB else if (imageDepth == 16) { while(! hiter.isDone()) { - Q_UINT16 *ptr = reinterpret_cast(hiter.rawData()); + TQ_UINT16 *ptr = reinterpret_cast(hiter.rawData()); // XXX: not colorstrategy independent *(ptr++) = ScaleQuantumToShort(pp->blue); *(ptr++) = 65535/*OPACITY_OPAQUE*/ - ScaleQuantumToShort(pp->opacity); @@ -662,14 +662,14 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB if (uri.isEmpty()) return KisImageBuilder_RESULT_NO_URI; - if (!KIO::NetAccess::exists(uri, false, qApp -> mainWidget())) { + if (!KIO::NetAccess::exists(uri, false, tqApp -> mainWidget())) { return KisImageBuilder_RESULT_NOT_EXIST; } KisImageBuilder_Result result = KisImageBuilder_RESULT_FAILURE; - QString tmpFile; + TQString tmpFile; - if (KIO::NetAccess::download(uri, tmpFile, qApp -> mainWidget())) { + if (KIO::NetAccess::download(uri, tmpFile, tqApp -> mainWidget())) { KURL uriTF; uriTF.setPath( tmpFile ); result = decode(uriTF, false); @@ -712,13 +712,13 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB return KisImageBuilder_RESULT_NOT_LOCAL; - Q_UINT32 layerBytesPerChannel = layer->paintDevice()->pixelSize() / layer->paintDevice()->nChannels(); + TQ_UINT32 layerBytesPerChannel = layer->paintDevice()->pixelSize() / layer->paintDevice()->nChannels(); GetExceptionInfo(&ei); ii = CloneImageInfo(0); - qstrncpy(ii -> filename, QFile::encodeName(uri.path()), MaxTextExtent - 1); + qstrncpy(ii -> filename, TQFile::encodeName(uri.path()), MaxTextExtent - 1); if (ii -> filename[MaxTextExtent - 1]) { emit notifyProgressError(); @@ -755,13 +755,13 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB image -> matte = true; #endif - Q_INT32 y, height, width; + TQ_INT32 y, height, width; height = img -> height(); width = img -> width(); bool alpha = true; - QString ext = QFileInfo(QFile::encodeName(uri.path())).extension(false).upper(); + TQString ext = TQFileInfo(TQFile::encodeName(uri.path())).extension(false).upper(); if (ext == "BMP") { alpha = false; qstrncpy(ii->magick, "BMP2", MaxTextExtent - 1); @@ -796,7 +796,7 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB if (layerBytesPerChannel == 2) { while (!it.isDone()) { - const Q_UINT16 *d = reinterpret_cast(it.rawData()); + const TQ_UINT16 *d = reinterpret_cast(it.rawData()); pp -> red = ScaleShortToQuantum(d[PIXEL_CYAN]); pp -> green = ScaleShortToQuantum(d[PIXEL_MAGENTA]); pp -> blue = ScaleShortToQuantum(d[PIXEL_YELLOW]); @@ -811,7 +811,7 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB else { while (!it.isDone()) { - Q_UINT8 * d = it.rawData(); + TQ_UINT8 * d = it.rawData(); pp -> red = Upscale(d[PIXEL_CYAN]); pp -> green = Upscale(d[PIXEL_MAGENTA]); pp -> blue = Upscale(d[PIXEL_YELLOW]); @@ -833,7 +833,7 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB if (layerBytesPerChannel == 2) { while (!it.isDone()) { - const Q_UINT16 *d = reinterpret_cast(it.rawData()); + const TQ_UINT16 *d = reinterpret_cast(it.rawData()); pp -> red = ScaleShortToQuantum(d[PIXEL_RED]); pp -> green = ScaleShortToQuantum(d[PIXEL_GREEN]); pp -> blue = ScaleShortToQuantum(d[PIXEL_BLUE]); @@ -847,7 +847,7 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB else { while (!it.isDone()) { - Q_UINT8 * d = it.rawData(); + TQ_UINT8 * d = it.rawData(); pp -> red = Upscale(d[PIXEL_RED]); pp -> green = Upscale(d[PIXEL_GREEN]); pp -> blue = Upscale(d[PIXEL_BLUE]); @@ -865,7 +865,7 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB if (layerBytesPerChannel == 2) { while (!it.isDone()) { - const Q_UINT16 *d = reinterpret_cast(it.rawData()); + const TQ_UINT16 *d = reinterpret_cast(it.rawData()); pp -> red = ScaleShortToQuantum(d[PIXEL_GRAY]); pp -> green = ScaleShortToQuantum(d[PIXEL_GRAY]); pp -> blue = ScaleShortToQuantum(d[PIXEL_GRAY]); @@ -878,7 +878,7 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB } else { while (!it.isDone()) { - Q_UINT8 * d = it.rawData(); + TQ_UINT8 * d = it.rawData(); pp -> red = Upscale(d[PIXEL_GRAY]); pp -> green = Upscale(d[PIXEL_GRAY]); pp -> blue = Upscale(d[PIXEL_GRAY]); @@ -919,7 +919,7 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB return KisImageBuilder_RESULT_OK; } - void KisImageMagickConverter::ioData(KIO::Job *job, const QByteArray& data) + void KisImageMagickConverter::ioData(KIO::Job *job, const TQByteArray& data) { if (data.isNull() || data.isEmpty()) { emit notifyProgressStage(i18n("Loading..."), 0); @@ -984,12 +984,12 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB * @name readFilters * @return Provide a list of file formats the application can read. */ - QString KisImageMagickConverter::readFilters() + TQString KisImageMagickConverter::readFilters() { - QString s; - QString all; - QString name; - QString description; + TQString s; + TQString all; + TQString name; + TQString description; unsigned long matches; /*#ifdef HAVE_MAGICK6 @@ -1025,7 +1025,7 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB description = info -> description; kdDebug(41008) << "Found import filter for: " << name << "\n"; - if (!description.isEmpty() && !description.contains('/')) { + if (!description.isEmpty() && !description.tqcontains('/')) { all += "*." + name.lower() + " *." + name + " "; s += "*." + name.lower() + " *." + name + "|"; s += i18n(description.utf8()); @@ -1042,7 +1042,7 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB description = mi -> description; kdDebug(41008) << "Found import filter for: " << name << "\n"; - if (!description.isEmpty() && !description.contains('/')) { + if (!description.isEmpty() && !description.tqcontains('/')) { all += "*." + name.lower() + " *." + name + " "; s += "*." + name.lower() + " *." + name + "|"; s += i18n(description.utf8()); @@ -1058,12 +1058,12 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB return all + s; } - QString KisImageMagickConverter::writeFilters() + TQString KisImageMagickConverter::writeFilters() { - QString s; - QString all; - QString name; - QString description; + TQString s; + TQString all; + TQString name; + TQString description; unsigned long matches; /*#ifdef HAVE_MAGICK6 @@ -1102,7 +1102,7 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB description = info -> description; - if (!description.isEmpty() && !description.contains('/')) { + if (!description.isEmpty() && !description.tqcontains('/')) { all += "*." + name.lower() + " *." + name + " "; s += "*." + name.lower() + " *." + name + "|"; s += i18n(description.utf8()); @@ -1121,7 +1121,7 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB description = mi -> description; - if (!description.isEmpty() && !description.contains('/')) { + if (!description.isEmpty() && !description.tqcontains('/')) { all += "*." + name.lower() + " *." + name + " "; s += "*." + name.lower() + " *." + name + "|"; s += i18n(description.utf8()); diff --git a/filters/krita/gmagick/kis_image_magick_converter.h b/filters/krita/gmagick/kis_image_magick_converter.h index 9b3b6bc0..28bd94ce 100644 --- a/filters/krita/gmagick/kis_image_magick_converter.h +++ b/filters/krita/gmagick/kis_image_magick_converter.h @@ -19,8 +19,8 @@ #ifndef KIS_IMAGE_MAGICK_CONVERTER_H_ #define KIS_IMAGE_MAGICK_CONVERTER_H_ -#include -#include +#include +#include #include @@ -28,7 +28,7 @@ #include "kis_global.h" #include "kis_progress_subject.h" -class QString; +class TQString; class KURL; class KisDoc; class KisNameServer; @@ -59,8 +59,9 @@ enum KisImageBuilder_Result { * Build a KisImage representation of an image file. */ class KisImageMagickConverter : public KisProgressSubject { - typedef QObject super; + typedef TQObject super; Q_OBJECT + TQ_OBJECT public: KisImageMagickConverter(KisDoc *doc, KisUndoAdapter *adapter); @@ -75,11 +76,11 @@ public: KisImageSP image(); public: - static QString readFilters(); - static QString writeFilters(); + static TQString readFilters(); + static TQString writeFilters(); private slots: - void ioData(KIO::Job *job, const QByteArray& data); + void ioData(KIO::Job *job, const TQByteArray& data); void ioResult(KIO::Job *job); void ioTotalSize(KIO::Job *job, KIO::filesize_t size); @@ -93,7 +94,7 @@ private: KisImageSP m_img; KisDoc *m_doc; KisUndoAdapter *m_adapter; - QValueVector m_data; + TQValueVector m_data; KIO::TransferJob *m_job; KIO::filesize_t m_size; bool m_stop; diff --git a/filters/krita/gmagick/magickexport.cpp b/filters/krita/gmagick/magickexport.cpp index b47f198c..83965d65 100644 --- a/filters/krita/gmagick/magickexport.cpp +++ b/filters/krita/gmagick/magickexport.cpp @@ -31,7 +31,7 @@ typedef KGenericFactory MagickExportFactory; K_EXPORT_COMPONENT_FACTORY(libkritagmagickexport, MagickExportFactory("kofficefilters")) -MagickExport::MagickExport(KoFilter *, const char *, const QStringList&) : KoFilter() +MagickExport::MagickExport(KoFilter *, const char *, const TQStringList&) : KoFilter() { } @@ -39,7 +39,7 @@ MagickExport::~MagickExport() { } -KoFilter::ConversionStatus MagickExport::convert(const QCString& from, const QCString& to) +KoFilter::ConversiontqStatus MagickExport::convert(const TQCString& from, const TQCString& to) { kdDebug(41008) << "magick export! From: " << from << ", To: " << to << "\n"; @@ -49,7 +49,7 @@ KoFilter::ConversionStatus MagickExport::convert(const QCString& from, const QCS // XXX: Add dialog about flattening layers here KisDoc *output = dynamic_cast(m_chain->inputDocument()); - QString filename = m_chain->outputFile(); + TQString filename = m_chain->outputFile(); if (!output) return KoFilter::CreationError; diff --git a/filters/krita/gmagick/magickexport.h b/filters/krita/gmagick/magickexport.h index 3c499ebd..6ea7e238 100644 --- a/filters/krita/gmagick/magickexport.h +++ b/filters/krita/gmagick/magickexport.h @@ -23,13 +23,14 @@ class MagickExport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - MagickExport(KoFilter *parent, const char *name, const QStringList&); + MagickExport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~MagickExport(); public: - virtual KoFilter::ConversionStatus convert(const QCString& from, const QCString& to); + virtual KoFilter::ConversiontqStatus convert(const TQCString& from, const TQCString& to); }; #endif // MAGICKEXPORT_H_ diff --git a/filters/krita/gmagick/magickimport.cpp b/filters/krita/gmagick/magickimport.cpp index 5b04d6ff..c1f922db 100644 --- a/filters/krita/gmagick/magickimport.cpp +++ b/filters/krita/gmagick/magickimport.cpp @@ -16,7 +16,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ -#include +#include #include #include @@ -33,7 +33,7 @@ typedef KGenericFactory MagickImportFactory; K_EXPORT_COMPONENT_FACTORY(libkritagmagickimport, MagickImportFactory("kofficefilters")) -MagickImport::MagickImport(KoFilter *, const char *, const QStringList&) : KoFilter() +MagickImport::MagickImport(KoFilter *, const char *, const TQStringList&) : KoFilter() { } @@ -41,7 +41,7 @@ MagickImport::~MagickImport() { } -KoFilter::ConversionStatus MagickImport::convert(const QCString&, const QCString& to) +KoFilter::ConversiontqStatus MagickImport::convert(const TQCString&, const TQCString& to) { kdDebug(41008) << "Importing using MagickImport!\n"; @@ -51,7 +51,7 @@ KoFilter::ConversionStatus MagickImport::convert(const QCString&, const QCString KisDoc * doc = dynamic_cast(m_chain -> outputDocument()); KisView * view = static_cast(doc -> views().getFirst()); - QString filename = m_chain -> inputFile(); + TQString filename = m_chain -> inputFile(); if (!doc) return KoFilter::CreationError; diff --git a/filters/krita/gmagick/magickimport.h b/filters/krita/gmagick/magickimport.h index 01156642..3373f129 100644 --- a/filters/krita/gmagick/magickimport.h +++ b/filters/krita/gmagick/magickimport.h @@ -23,13 +23,14 @@ class MagickImport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - MagickImport(KoFilter *parent, const char *name, const QStringList&); + MagickImport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~MagickImport(); public: - virtual KoFilter::ConversionStatus convert(const QCString& from, const QCString& to); + virtual KoFilter::ConversiontqStatus convert(const TQCString& from, const TQCString& to); }; #endif // MAGICKIMPORT_H_ diff --git a/filters/krita/jpeg/iccjpeg.c b/filters/krita/jpeg/iccjpeg.c index fefa9509..7abe1ff4 100644 --- a/filters/krita/jpeg/iccjpeg.c +++ b/filters/krita/jpeg/iccjpeg.c @@ -133,7 +133,7 @@ write_icc_profile (j_compress_ptr cinfo, void setup_read_icc_profile (j_decompress_ptr cinfo) { - /* Tell the library to keep any APP2 data it may find */ + /* Tell the library to keep any APP2 data it may tqfind */ jpeg_save_markers(cinfo, ICC_MARKER, 0xFFFF); } diff --git a/filters/krita/jpeg/kis_jpeg_converter.cc b/filters/krita/jpeg/kis_jpeg_converter.cc index 2ceaa68c..c60d90f0 100644 --- a/filters/krita/jpeg/kis_jpeg_converter.cc +++ b/filters/krita/jpeg/kis_jpeg_converter.cc @@ -25,7 +25,7 @@ extern "C" { #include } -#include +#include #include #include @@ -73,11 +73,11 @@ namespace { { return JCS_CMYK; } - KMessageBox::error(0, i18n("Cannot export images in %1.\n").arg(cs->id().name()) ) ; + KMessageBox::error(0, i18n("Cannot export images in %1.\n").tqarg(cs->id().name()) ) ; return JCS_UNKNOWN; } - QString getColorSpaceForColorType(J_COLOR_SPACE color_type) { + TQString getColorSpaceForColorType(J_COLOR_SPACE color_type) { kdDebug(41008) << "color_type = " << color_type << endl; if(color_type == JCS_GRAYSCALE) { @@ -113,7 +113,7 @@ KisImageBuilder_Result KisJPEGConverter::decode(const KURL& uri) jpeg_create_decompress(&cinfo); // open the file - FILE *fp = fopen(QFile::encodeName(uri.path()), "rb"); + FILE *fp = fopen(TQFile::encodeName(uri.path()), "rb"); if (!fp) { return (KisImageBuilder_RESULT_NOT_EXIST); @@ -134,7 +134,7 @@ KisImageBuilder_Result KisJPEGConverter::decode(const KURL& uri) jpeg_start_decompress(&cinfo); // Get the colorspace - QString csName = getColorSpaceForColorType(cinfo.out_color_space); + TQString csName = getColorSpaceForColorType(cinfo.out_color_space); if(csName.isEmpty()) { kdDebug(41008) << "unsupported colorspace : " << cinfo.out_color_space << endl; jpeg_destroy_decompress(&cinfo); @@ -144,7 +144,7 @@ KisImageBuilder_Result KisJPEGConverter::decode(const KURL& uri) uchar* profile_data; uint profile_len; KisProfile* profile = 0; - QByteArray profile_rawdata; + TQByteArray profile_rawdata; if( read_icc_profile (&cinfo, &profile_data, &profile_len)) { profile_rawdata.resize(profile_len); @@ -200,7 +200,7 @@ KisImageBuilder_Result KisJPEGConverter::decode(const KURL& uri) } } - KisPaintLayerSP layer = new KisPaintLayer(m_img, m_img -> nextLayerName(), Q_UINT8_MAX); + KisPaintLayerSP layer = new KisPaintLayer(m_img, m_img -> nextLayerName(), TQ_UINT8_MAX); // Read exif information if any @@ -210,38 +210,38 @@ KisImageBuilder_Result KisJPEGConverter::decode(const KURL& uri) for (; cinfo.output_scanline < cinfo.image_height;) { KisHLineIterator it = layer->paintDevice()->createHLineIterator(0, cinfo.output_scanline, cinfo.image_width, true); jpeg_read_scanlines(&cinfo, &row_pointer, 1); - Q_UINT8 *src = row_pointer; + TQ_UINT8 *src = row_pointer; switch(cinfo.out_color_space) { case JCS_GRAYSCALE: while (!it.isDone()) { - Q_UINT8 *d = it.rawData(); + TQ_UINT8 *d = it.rawData(); d[0] = *(src++); if(transform) cmsDoTransform(transform, d, d, 1); - d[1] = Q_UINT8_MAX; + d[1] = TQ_UINT8_MAX; ++it; } break; case JCS_RGB: while (!it.isDone()) { - Q_UINT8 *d = it.rawData(); + TQ_UINT8 *d = it.rawData(); d[2] = *(src++); d[1] = *(src++); d[0] = *(src++); if(transform) cmsDoTransform(transform, d, d, 1); - d[3] = Q_UINT8_MAX; + d[3] = TQ_UINT8_MAX; ++it; } break; case JCS_CMYK: while (!it.isDone()) { - Q_UINT8 *d = it.rawData(); - d[0] = Q_UINT8_MAX - *(src++); - d[1] = Q_UINT8_MAX - *(src++); - d[2] = Q_UINT8_MAX - *(src++); - d[3] = Q_UINT8_MAX - *(src++); + TQ_UINT8 *d = it.rawData(); + d[0] = TQ_UINT8_MAX - *(src++); + d[1] = TQ_UINT8_MAX - *(src++); + d[2] = TQ_UINT8_MAX - *(src++); + d[3] = TQ_UINT8_MAX - *(src++); if(transform) cmsDoTransform(transform, d, d, 1); - d[4] = Q_UINT8_MAX; + d[4] = TQ_UINT8_MAX; ++it; } break; @@ -274,7 +274,7 @@ KisImageBuilder_Result KisJPEGConverter::decode(const KURL& uri) exifIO.readExifFromMem( marker->data , marker->data_length ); // Interpret orientation tag ExifValue v; - if( layer->paintDevice()->exifInfo()->getValue("Orientation", v) && v.type() == ExifValue::EXIF_TYPE_SHORT) + if( layer->paintDevice()->exifInfo()->getValue("Qt::Orientation", v) && v.type() == ExifValue::EXIF_TYPE_SHORT) { switch(v.asShort(0)) // { @@ -304,8 +304,8 @@ KisImageBuilder_Result KisJPEGConverter::decode(const KURL& uri) default: break; } - v.setValue(0, (Q_UINT16)1); - layer->paintDevice()->exifInfo()->setValue("Orientation", v); + v.setValue(0, (TQ_UINT16)1); + layer->paintDevice()->exifInfo()->setValue("Qt::Orientation", v); } break; } @@ -325,15 +325,15 @@ KisImageBuilder_Result KisJPEGConverter::buildImage(const KURL& uri) if (uri.isEmpty()) return KisImageBuilder_RESULT_NO_URI; - if (!KIO::NetAccess::exists(uri, false, qApp -> mainWidget())) { + if (!KIO::NetAccess::exists(uri, false, tqApp -> mainWidget())) { return KisImageBuilder_RESULT_NOT_EXIST; } // We're not set up to handle asynchronous loading at the moment. KisImageBuilder_Result result = KisImageBuilder_RESULT_FAILURE; - QString tmpFile; + TQString tmpFile; - if (KIO::NetAccess::download(uri, tmpFile, qApp -> mainWidget())) { + if (KIO::NetAccess::download(uri, tmpFile, tqApp -> mainWidget())) { KURL uriTF; uriTF.setPath( tmpFile ); result = decode(uriTF); @@ -365,7 +365,7 @@ KisImageBuilder_Result KisJPEGConverter::buildFile(const KURL& uri, KisPaintLaye if (!uri.isLocalFile()) return KisImageBuilder_RESULT_NOT_LOCAL; // Open file for writing - FILE *fp = fopen(QFile::encodeName(uri.path()), "wb"); + FILE *fp = fopen(TQFile::encodeName(uri.path()), "wb"); if (!fp) { return (KisImageBuilder_RESULT_FAILURE); @@ -426,7 +426,7 @@ KisImageBuilder_Result KisJPEGConverter::buildFile(const KURL& uri, KisPaintLaye // Save annotation vKisAnnotationSP_it it = annotationsStart; while(it != annotationsEnd) { - if (!(*it) || (*it) -> type() == QString()) { + if (!(*it) || (*it) -> type() == TQString()) { kdDebug(41008) << "Warning: empty annotation" << endl; ++it; continue; @@ -452,20 +452,20 @@ KisImageBuilder_Result KisJPEGConverter::buildFile(const KURL& uri, KisPaintLaye for (; cinfo.next_scanline < height;) { KisHLineIterator it = layer->paintDevice()->createHLineIterator(0, cinfo.next_scanline, width, false); - Q_UINT8 *dst = row_pointer; + TQ_UINT8 *dst = row_pointer; switch(color_type) { case JCS_GRAYSCALE: if(color_nb_bits == 16) { while (!it.isDone()) { - const Q_UINT16 *d = reinterpret_cast(it.rawData()); - *(dst++) = d[0] / Q_UINT8_MAX; + const TQ_UINT16 *d = reinterpret_cast(it.rawData()); + *(dst++) = d[0] / TQ_UINT8_MAX; ++it; } } else { while (!it.isDone()) { - const Q_UINT8 *d = it.rawData(); + const TQ_UINT8 *d = it.rawData(); *(dst++) = d[0]; ++it; } @@ -475,15 +475,15 @@ KisImageBuilder_Result KisJPEGConverter::buildFile(const KURL& uri, KisPaintLaye if(color_nb_bits == 16) { while (!it.isDone()) { - const Q_UINT16 *d = reinterpret_cast(it.rawData()); - *(dst++) = d[2] / Q_UINT8_MAX; - *(dst++) = d[1] / Q_UINT8_MAX; - *(dst++) = d[0] / Q_UINT8_MAX; + const TQ_UINT16 *d = reinterpret_cast(it.rawData()); + *(dst++) = d[2] / TQ_UINT8_MAX; + *(dst++) = d[1] / TQ_UINT8_MAX; + *(dst++) = d[0] / TQ_UINT8_MAX; ++it; } } else { while (!it.isDone()) { - const Q_UINT8 *d = it.rawData(); + const TQ_UINT8 *d = it.rawData(); *(dst++) = d[2]; *(dst++) = d[1]; *(dst++) = d[0]; @@ -495,20 +495,20 @@ KisImageBuilder_Result KisJPEGConverter::buildFile(const KURL& uri, KisPaintLaye if(color_nb_bits == 16) { while (!it.isDone()) { - const Q_UINT16 *d = reinterpret_cast(it.rawData()); - *(dst++) = Q_UINT8_MAX - d[0] / Q_UINT8_MAX; - *(dst++) = Q_UINT8_MAX - d[1] / Q_UINT8_MAX; - *(dst++) = Q_UINT8_MAX - d[2] / Q_UINT8_MAX; - *(dst++) = Q_UINT8_MAX - d[3] / Q_UINT8_MAX; + const TQ_UINT16 *d = reinterpret_cast(it.rawData()); + *(dst++) = TQ_UINT8_MAX - d[0] / TQ_UINT8_MAX; + *(dst++) = TQ_UINT8_MAX - d[1] / TQ_UINT8_MAX; + *(dst++) = TQ_UINT8_MAX - d[2] / TQ_UINT8_MAX; + *(dst++) = TQ_UINT8_MAX - d[3] / TQ_UINT8_MAX; ++it; } } else { while (!it.isDone()) { - const Q_UINT8 *d = it.rawData(); - *(dst++) = Q_UINT8_MAX - d[0]; - *(dst++) = Q_UINT8_MAX - d[1]; - *(dst++) = Q_UINT8_MAX - d[2]; - *(dst++) = Q_UINT8_MAX - d[3]; + const TQ_UINT8 *d = it.rawData(); + *(dst++) = TQ_UINT8_MAX - d[0]; + *(dst++) = TQ_UINT8_MAX - d[1]; + *(dst++) = TQ_UINT8_MAX - d[2]; + *(dst++) = TQ_UINT8_MAX - d[3]; ++it; } } diff --git a/filters/krita/jpeg/kis_jpeg_converter.h b/filters/krita/jpeg/kis_jpeg_converter.h index 99b7eadf..8500d146 100644 --- a/filters/krita/jpeg/kis_jpeg_converter.h +++ b/filters/krita/jpeg/kis_jpeg_converter.h @@ -26,7 +26,7 @@ extern "C" { #include } -#include +#include #include @@ -66,6 +66,7 @@ struct KisJPEGOptions { class KisJPEGConverter : public KisProgressSubject { Q_OBJECT + TQ_OBJECT public: KisJPEGConverter(KisDoc *doc, KisUndoAdapter *adapter); virtual ~KisJPEGConverter(); diff --git a/filters/krita/jpeg/kis_jpeg_export.cc b/filters/krita/jpeg/kis_jpeg_export.cc index 39419833..58d906bc 100644 --- a/filters/krita/jpeg/kis_jpeg_export.cc +++ b/filters/krita/jpeg/kis_jpeg_export.cc @@ -19,8 +19,8 @@ #include "kis_jpeg_export.h" -#include -#include +#include +#include #include #include @@ -77,7 +77,7 @@ class KisExifInfoVisitor : public KisLayerVisitor typedef KGenericFactory KisJPEGExportFactory; K_EXPORT_COMPONENT_FACTORY(libkritajpegexport, KisJPEGExportFactory("kofficefilters")) -KisJPEGExport::KisJPEGExport(KoFilter *, const char *, const QStringList&) : KoFilter() +KisJPEGExport::KisJPEGExport(KoFilter *, const char *, const TQStringList&) : KoFilter() { } @@ -85,7 +85,7 @@ KisJPEGExport::~KisJPEGExport() { } -KoFilter::ConversionStatus KisJPEGExport::convert(const QCString& from, const QCString& to) +KoFilter::ConversiontqStatus KisJPEGExport::convert(const TQCString& from, const TQCString& to) { kdDebug(41008) << "JPEG export! From: " << from << ", To: " << to << "\n"; @@ -98,7 +98,7 @@ KoFilter::ConversionStatus KisJPEGExport::convert(const QCString& from, const QC KisWdgOptionsJPEG* wdg = new KisWdgOptionsJPEG(kdb); kdb->setMainWidget(wdg); kapp->restoreOverrideCursor(); - if(kdb->exec() == QDialog::Rejected) + if(kdb->exec() == TQDialog::Rejected) { return KoFilter::OK; // FIXME Cancel doesn't exist :( } @@ -110,7 +110,7 @@ KoFilter::ConversionStatus KisJPEGExport::convert(const QCString& from, const QC // XXX: Add dialog about flattening layers here KisDoc *output = dynamic_cast(m_chain->inputDocument()); - QString filename = m_chain->outputFile(); + TQString filename = m_chain->outputFile(); if (!output) return KoFilter::CreationError; diff --git a/filters/krita/jpeg/kis_jpeg_export.h b/filters/krita/jpeg/kis_jpeg_export.h index 38e04b20..a0f47351 100644 --- a/filters/krita/jpeg/kis_jpeg_export.h +++ b/filters/krita/jpeg/kis_jpeg_export.h @@ -24,11 +24,12 @@ class KisJPEGExport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - KisJPEGExport(KoFilter *parent, const char *name, const QStringList&); + KisJPEGExport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~KisJPEGExport(); public: - virtual KoFilter::ConversionStatus convert(const QCString& from, const QCString& to); + virtual KoFilter::ConversiontqStatus convert(const TQCString& from, const TQCString& to); }; #endif diff --git a/filters/krita/jpeg/kis_jpeg_import.cc b/filters/krita/jpeg/kis_jpeg_import.cc index e9b867e0..537be19a 100644 --- a/filters/krita/jpeg/kis_jpeg_import.cc +++ b/filters/krita/jpeg/kis_jpeg_import.cc @@ -33,7 +33,7 @@ typedef KGenericFactory JPEGImportFactory; K_EXPORT_COMPONENT_FACTORY(libkritajpegimport, JPEGImportFactory("kofficefilters")) -KisJPEGImport::KisJPEGImport(KoFilter *, const char *, const QStringList&) : KoFilter() +KisJPEGImport::KisJPEGImport(KoFilter *, const char *, const TQStringList&) : KoFilter() { } @@ -41,7 +41,7 @@ KisJPEGImport::~KisJPEGImport() { } -KoFilter::ConversionStatus KisJPEGImport::convert(const QCString&, const QCString& to) +KoFilter::ConversiontqStatus KisJPEGImport::convert(const TQCString&, const TQCString& to) { kdDebug(41008) << "Importing using JPEGImport!\n"; @@ -51,7 +51,7 @@ KoFilter::ConversionStatus KisJPEGImport::convert(const QCString&, const QCStrin KisDoc * doc = dynamic_cast(m_chain -> outputDocument()); KisView * view = static_cast(doc -> views().getFirst()); - QString filename = m_chain -> inputFile(); + TQString filename = m_chain -> inputFile(); if (!doc) return KoFilter::CreationError; diff --git a/filters/krita/jpeg/kis_jpeg_import.h b/filters/krita/jpeg/kis_jpeg_import.h index 6e60c84b..4cfb62c2 100644 --- a/filters/krita/jpeg/kis_jpeg_import.h +++ b/filters/krita/jpeg/kis_jpeg_import.h @@ -23,11 +23,12 @@ class KisJPEGImport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - KisJPEGImport(KoFilter *parent, const char *name, const QStringList&); + KisJPEGImport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~KisJPEGImport(); public: - virtual KoFilter::ConversionStatus convert(const QCString& from, const QCString& to); + virtual KoFilter::ConversiontqStatus convert(const TQCString& from, const TQCString& to); }; #endif diff --git a/filters/krita/jpeg/kis_wdg_options_jpeg.ui b/filters/krita/jpeg/kis_wdg_options_jpeg.ui index 17f5eb36..06c39edc 100644 --- a/filters/krita/jpeg/kis_wdg_options_jpeg.ui +++ b/filters/krita/jpeg/kis_wdg_options_jpeg.ui @@ -1,6 +1,6 @@ KisWdgOptionsJPEG - + KisWdgOptionsJPEG @@ -19,34 +19,34 @@ 0 - + - layout4 + tqlayout4 unnamed - + textLabel1 Quality: - + AlignTop - + - layout5 + tqlayout5 unnamed - + qualityLevel @@ -78,15 +78,15 @@ These settings determine how much information is lost during compression
- + - layout4 + tqlayout4 unnamed - + textLabel3 @@ -94,14 +94,14 @@ Smallest
- + textLabel4 Best - + AlignVCenter|AlignRight @@ -111,7 +111,7 @@
- + progressive @@ -136,7 +136,7 @@ Enabling progressive will cause the image to be displayed by the browser even wh Expanding - + 20 61 @@ -145,5 +145,5 @@ Enabling progressive will cause the image to be displayed by the browser even wh - +
diff --git a/filters/krita/libkisexif/kis_exif_io.cpp b/filters/krita/libkisexif/kis_exif_io.cpp index a5e5dbd7..f02b49b7 100644 --- a/filters/krita/libkisexif/kis_exif_io.cpp +++ b/filters/krita/libkisexif/kis_exif_io.cpp @@ -102,9 +102,9 @@ void KisExifIO::readExifData( ExifData* exifData) for (uint i = 0; i < content->count; i++) { ExifEntry* entry = content->entries[i]; - QString tagname = exif_tag_get_name ( entry->tag ); + TQString tagname = exif_tag_get_name ( entry->tag ); // kdDebug() << "found tag : " << tagname << endl; - // QString tagname = exif_tag_get_name_in_ifd ( entry->tag, EXIF_IFD_0 ); TODO: would be better to rely on 0.6.13 when it becomes more common, as it supports better other IFD (GPS and interoperrabilibity) + // TQString tagname = exif_tag_get_name_in_ifd ( entry->tag, EXIF_IFD_0 ); TODO: would be better to rely on 0.6.13 when it becomes more common, as it supports better other IFD (GPS and interoperrabilibity) ExifValue value( format2type(entry->format), entry->data, entry->size, ifds[ifd], entry->components, bO ); // exif_entry_dump( entry, 4); // kdDebug() << "value = " << value.toString() << endl; diff --git a/filters/krita/magick/kis_image_magick_converter.cc b/filters/krita/magick/kis_image_magick_converter.cc index e5407037..e632b1a7 100644 --- a/filters/krita/magick/kis_image_magick_converter.cc +++ b/filters/krita/magick/kis_image_magick_converter.cc @@ -23,9 +23,9 @@ #include -#include -#include -#include +#include +#include +#include #include #include @@ -34,7 +34,7 @@ #include #include -#include +#include #include "kis_types.h" #include "kis_global.h" @@ -57,25 +57,25 @@ namespace { - const Q_UINT8 PIXEL_BLUE = 0; - const Q_UINT8 PIXEL_GREEN = 1; - const Q_UINT8 PIXEL_RED = 2; - const Q_UINT8 PIXEL_ALPHA = 3; + const TQ_UINT8 PIXEL_BLUE = 0; + const TQ_UINT8 PIXEL_GREEN = 1; + const TQ_UINT8 PIXEL_RED = 2; + const TQ_UINT8 PIXEL_ALPHA = 3; - static const Q_UINT8 PIXEL_CYAN = 0; - static const Q_UINT8 PIXEL_MAGENTA = 1; - static const Q_UINT8 PIXEL_YELLOW = 2; - static const Q_UINT8 PIXEL_BLACK = 3; - static const Q_UINT8 PIXEL_CMYK_ALPHA = 4; + static const TQ_UINT8 PIXEL_CYAN = 0; + static const TQ_UINT8 PIXEL_MAGENTA = 1; + static const TQ_UINT8 PIXEL_YELLOW = 2; + static const TQ_UINT8 PIXEL_BLACK = 3; + static const TQ_UINT8 PIXEL_CMYK_ALPHA = 4; - static const Q_UINT8 PIXEL_GRAY = 0; - static const Q_UINT8 PIXEL_GRAY_ALPHA = 1; + static const TQ_UINT8 PIXEL_GRAY = 0; + static const TQ_UINT8 PIXEL_GRAY_ALPHA = 1; /** * Make this more flexible -- although... ImageMagick * isn't that flexible either. */ - QString getColorSpaceName(ColorspaceType type, unsigned long imageDepth = 8) + TQString getColorSpaceName(ColorspaceType type, unsigned long imageDepth = 8) { if (type == GRAYColorspace) { @@ -139,8 +139,8 @@ namespace { continue; // XXX: Hardcoded for icc type -- is that correct for us? - if (QString::compare(name, "icc") == 0) { - QByteArray rawdata; + if (TQString::compare(name, "icc") == 0) { + TQByteArray rawdata; rawdata.resize(profile->length); memcpy(rawdata.data(), profile->datum, profile->length); @@ -174,14 +174,14 @@ namespace { continue; // XXX: icc will be written seperately? - if (QString::compare(name, "icc") == 0) + if (TQString::compare(name, "icc") == 0) continue; - QByteArray rawdata; + TQByteArray rawdata; rawdata.resize(profile->length); memcpy(rawdata.data(), profile->datum, profile->length); - annotation = new KisAnnotation(QString(name), "", rawdata); + annotation = new KisAnnotation(TQString(name), "", rawdata); Q_CHECK_PTR(annotation); image -> addAnnotation(annotation); @@ -200,13 +200,13 @@ namespace { ImageAttribute * attr = src -> attributes; while (attr) { #endif - QByteArray rawdata; + TQByteArray rawdata; int len = strlen(attr -> value) + 1; rawdata.resize(len); memcpy(rawdata.data(), attr -> value, len); annotation = new KisAnnotation( - QString("krita_attribute:%1").arg(QString(attr -> key)), "", rawdata); + TQString("krita_attribute:%1").tqarg(TQString(attr -> key)), "", rawdata); Q_CHECK_PTR(annotation); image -> addAnnotation(annotation); @@ -225,7 +225,7 @@ namespace { return; #else while(it != annotationsEnd) { - if (!(*it) || (*it) -> type() == QString()) { + if (!(*it) || (*it) -> type() == TQString()) { kdDebug(41008) << "Warning: empty annotation" << endl; ++it; continue; @@ -339,7 +339,7 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB images = BlobToImage(ii, &m_data[0], m_data.size(), &ei); } else { - qstrncpy(ii -> filename, QFile::encodeName(uri.path()), MaxTextExtent - 1); + qstrncpy(ii -> filename, TQFile::encodeName(uri.path()), MaxTextExtent - 1); if (ii -> filename[MaxTextExtent - 1]) { emit notifyProgressError(); @@ -371,7 +371,7 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB unsigned long imageDepth = image->depth; kdDebug(41008) << "Image depth: " << imageDepth << "\n"; - QString csName; + TQString csName; KisColorSpace * cs = 0; ColorspaceType colorspaceType; @@ -422,10 +422,10 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB if (image -> columns && image -> rows) { // Opacity (set by the photoshop import filter) - Q_UINT8 opacity = OPACITY_OPAQUE; + TQ_UINT8 opacity = OPACITY_OPAQUE; const ImageAttribute * attr = GetImageAttribute(image, "[layer-opacity]"); if (attr != 0) { - opacity = Q_UINT8_MAX - Downscale(QString(attr->value).toInt()); + opacity = TQ_UINT8_MAX - Downscale(TQString(attr->value).toInt()); } KisPaintLayerSP layer = 0; @@ -441,21 +441,21 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB Q_ASSERT(layer); // Layerlocation (set by the photoshop import filter) - Q_INT32 x_offset = 0; - Q_INT32 y_offset = 0; + TQ_INT32 x_offset = 0; + TQ_INT32 y_offset = 0; attr = GetImageAttribute(image, "[layer-xpos]"); if (attr != 0) { - x_offset = QString(attr->value).toInt(); + x_offset = TQString(attr->value).toInt(); } attr = GetImageAttribute(image, "[layer-ypos]"); if (attr != 0) { - y_offset = QString(attr->value).toInt(); + y_offset = TQString(attr->value).toInt(); } - for (Q_UINT32 y = 0; y < image->rows; y ++) + for (TQ_UINT32 y = 0; y < image->rows; y ++) { const PixelPacket *pp = AcquireCacheView(vi, 0, y, image->columns, 1, &ei); @@ -478,7 +478,7 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB int x = 0; while (!hiter.isDone()) { - Q_UINT8 *ptr= hiter.rawData(); + TQ_UINT8 *ptr= hiter.rawData(); *(ptr++) = Downscale(pp->red); // cyan *(ptr++) = Downscale(pp->green); // magenta *(ptr++) = Downscale(pp->blue); // yellow @@ -503,7 +503,7 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB else if (colorspaceType == LABColorspace) { while(! hiter.isDone()) { - Q_UINT16 *ptr = reinterpret_cast(hiter.rawData()); + TQ_UINT16 *ptr = reinterpret_cast(hiter.rawData()); *(ptr++) = ScaleQuantumToShort(pp->red); *(ptr++) = ScaleQuantumToShort(pp->green); @@ -521,7 +521,7 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB if (imageDepth == 8) { while(! hiter.isDone()) { - Q_UINT8 *ptr= hiter.rawData(); + TQ_UINT8 *ptr= hiter.rawData(); // XXX: not colorstrategy and bitdepth independent *(ptr++) = Downscale(pp->blue); *(ptr++) = Downscale(pp->green); @@ -535,7 +535,7 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB else if (imageDepth == 16) { while(! hiter.isDone()) { - Q_UINT16 *ptr = reinterpret_cast(hiter.rawData()); + TQ_UINT16 *ptr = reinterpret_cast(hiter.rawData()); // XXX: not colorstrategy independent *(ptr++) = ScaleQuantumToShort(pp->blue); *(ptr++) = ScaleQuantumToShort(pp->green); @@ -551,7 +551,7 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB if (imageDepth == 8) { while(! hiter.isDone()) { - Q_UINT8 *ptr= hiter.rawData(); + TQ_UINT8 *ptr= hiter.rawData(); // XXX: not colorstrategy and bitdepth independent *(ptr++) = Downscale(pp->blue); *(ptr++) = OPACITY_OPAQUE - Downscale(pp->opacity); @@ -563,7 +563,7 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB else if (imageDepth == 16) { while(! hiter.isDone()) { - Q_UINT16 *ptr = reinterpret_cast(hiter.rawData()); + TQ_UINT16 *ptr = reinterpret_cast(hiter.rawData()); // XXX: not colorstrategy independent *(ptr++) = ScaleQuantumToShort(pp->blue); *(ptr++) = 65535/*OPACITY_OPAQUE*/ - ScaleQuantumToShort(pp->opacity); @@ -607,14 +607,14 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB if (uri.isEmpty()) return KisImageBuilder_RESULT_NO_URI; - if (!KIO::NetAccess::exists(uri, false, qApp -> mainWidget())) { + if (!KIO::NetAccess::exists(uri, false, tqApp -> mainWidget())) { return KisImageBuilder_RESULT_NOT_EXIST; } KisImageBuilder_Result result = KisImageBuilder_RESULT_FAILURE; - QString tmpFile; + TQString tmpFile; - if (KIO::NetAccess::download(uri, tmpFile, qApp -> mainWidget())) { + if (KIO::NetAccess::download(uri, tmpFile, tqApp -> mainWidget())) { KURL uriTF; uriTF.setPath( tmpFile ); result = decode(uriTF, false); @@ -657,13 +657,13 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB return KisImageBuilder_RESULT_NOT_LOCAL; - Q_UINT32 layerBytesPerChannel = layer->paintDevice()->pixelSize() / layer->paintDevice()->nChannels(); + TQ_UINT32 layerBytesPerChannel = layer->paintDevice()->pixelSize() / layer->paintDevice()->nChannels(); GetExceptionInfo(&ei); ii = CloneImageInfo(0); - qstrncpy(ii -> filename, QFile::encodeName(uri.path()), MaxTextExtent - 1); + qstrncpy(ii -> filename, TQFile::encodeName(uri.path()), MaxTextExtent - 1); if (ii -> filename[MaxTextExtent - 1]) { emit notifyProgressError(); @@ -700,13 +700,13 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB image -> matte = true; #endif - Q_INT32 y, height, width; + TQ_INT32 y, height, width; height = img -> height(); width = img -> width(); bool alpha = true; - QString ext = QFileInfo(QFile::encodeName(uri.path())).extension(false).upper(); + TQString ext = TQFileInfo(TQFile::encodeName(uri.path())).extension(false).upper(); if (ext == "BMP") { alpha = false; qstrncpy(ii->magick, "BMP2", MaxTextExtent - 1); @@ -741,7 +741,7 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB if (layerBytesPerChannel == 2) { while (!it.isDone()) { - const Q_UINT16 *d = reinterpret_cast(it.rawData()); + const TQ_UINT16 *d = reinterpret_cast(it.rawData()); pp -> red = ScaleShortToQuantum(d[PIXEL_CYAN]); pp -> green = ScaleShortToQuantum(d[PIXEL_MAGENTA]); pp -> blue = ScaleShortToQuantum(d[PIXEL_YELLOW]); @@ -756,7 +756,7 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB else { while (!it.isDone()) { - Q_UINT8 * d = it.rawData(); + TQ_UINT8 * d = it.rawData(); pp -> red = Upscale(d[PIXEL_CYAN]); pp -> green = Upscale(d[PIXEL_MAGENTA]); pp -> blue = Upscale(d[PIXEL_YELLOW]); @@ -778,7 +778,7 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB if (layerBytesPerChannel == 2) { while (!it.isDone()) { - const Q_UINT16 *d = reinterpret_cast(it.rawData()); + const TQ_UINT16 *d = reinterpret_cast(it.rawData()); pp -> red = ScaleShortToQuantum(d[PIXEL_RED]); pp -> green = ScaleShortToQuantum(d[PIXEL_GREEN]); pp -> blue = ScaleShortToQuantum(d[PIXEL_BLUE]); @@ -792,7 +792,7 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB else { while (!it.isDone()) { - Q_UINT8 * d = it.rawData(); + TQ_UINT8 * d = it.rawData(); pp -> red = Upscale(d[PIXEL_RED]); pp -> green = Upscale(d[PIXEL_GREEN]); pp -> blue = Upscale(d[PIXEL_BLUE]); @@ -810,7 +810,7 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB if (layerBytesPerChannel == 2) { while (!it.isDone()) { - const Q_UINT16 *d = reinterpret_cast(it.rawData()); + const TQ_UINT16 *d = reinterpret_cast(it.rawData()); pp -> red = ScaleShortToQuantum(d[PIXEL_GRAY]); pp -> green = ScaleShortToQuantum(d[PIXEL_GRAY]); pp -> blue = ScaleShortToQuantum(d[PIXEL_GRAY]); @@ -823,7 +823,7 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB } else { while (!it.isDone()) { - Q_UINT8 * d = it.rawData(); + TQ_UINT8 * d = it.rawData(); pp -> red = Upscale(d[PIXEL_GRAY]); pp -> green = Upscale(d[PIXEL_GRAY]); pp -> blue = Upscale(d[PIXEL_GRAY]); @@ -864,7 +864,7 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB return KisImageBuilder_RESULT_OK; } - void KisImageMagickConverter::ioData(KIO::Job *job, const QByteArray& data) + void KisImageMagickConverter::ioData(KIO::Job *job, const TQByteArray& data) { if (data.isNull() || data.isEmpty()) { emit notifyProgressStage(i18n("Loading..."), 0); @@ -929,12 +929,12 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB * @name readFilters * @return Provide a list of file formats the application can read. */ - QString KisImageMagickConverter::readFilters() + TQString KisImageMagickConverter::readFilters() { - QString s; - QString all; - QString name; - QString description; + TQString s; + TQString all; + TQString name; + TQString description; unsigned long matches; #ifdef HAVE_MAGICK6 @@ -970,7 +970,7 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB description = info -> description; kdDebug(41008) << "Found import filter for: " << name << "\n"; - if (!description.isEmpty() && !description.contains('/')) { + if (!description.isEmpty() && !description.tqcontains('/')) { all += "*." + name.lower() + " *." + name + " "; s += "*." + name.lower() + " *." + name + "|"; s += i18n(description.utf8()); @@ -987,7 +987,7 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB description = mi -> description; kdDebug(41008) << "Found import filter for: " << name << "\n"; - if (!description.isEmpty() && !description.contains('/')) { + if (!description.isEmpty() && !description.tqcontains('/')) { all += "*." + name.lower() + " *." + name + " "; s += "*." + name.lower() + " *." + name + "|"; s += i18n(description.utf8()); @@ -1003,12 +1003,12 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB return all + s; } - QString KisImageMagickConverter::writeFilters() + TQString KisImageMagickConverter::writeFilters() { - QString s; - QString all; - QString name; - QString description; + TQString s; + TQString all; + TQString name; + TQString description; unsigned long matches; #ifdef HAVE_MAGICK6 @@ -1047,7 +1047,7 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB description = info -> description; - if (!description.isEmpty() && !description.contains('/')) { + if (!description.isEmpty() && !description.tqcontains('/')) { all += "*." + name.lower() + " *." + name + " "; s += "*." + name.lower() + " *." + name + "|"; s += i18n(description.utf8()); @@ -1066,7 +1066,7 @@ KisImageBuilder_Result KisImageMagickConverter::decode(const KURL& uri, bool isB description = mi -> description; - if (!description.isEmpty() && !description.contains('/')) { + if (!description.isEmpty() && !description.tqcontains('/')) { all += "*." + name.lower() + " *." + name + " "; s += "*." + name.lower() + " *." + name + "|"; s += i18n(description.utf8()); diff --git a/filters/krita/magick/kis_image_magick_converter.h b/filters/krita/magick/kis_image_magick_converter.h index 9b3b6bc0..28bd94ce 100644 --- a/filters/krita/magick/kis_image_magick_converter.h +++ b/filters/krita/magick/kis_image_magick_converter.h @@ -19,8 +19,8 @@ #ifndef KIS_IMAGE_MAGICK_CONVERTER_H_ #define KIS_IMAGE_MAGICK_CONVERTER_H_ -#include -#include +#include +#include #include @@ -28,7 +28,7 @@ #include "kis_global.h" #include "kis_progress_subject.h" -class QString; +class TQString; class KURL; class KisDoc; class KisNameServer; @@ -59,8 +59,9 @@ enum KisImageBuilder_Result { * Build a KisImage representation of an image file. */ class KisImageMagickConverter : public KisProgressSubject { - typedef QObject super; + typedef TQObject super; Q_OBJECT + TQ_OBJECT public: KisImageMagickConverter(KisDoc *doc, KisUndoAdapter *adapter); @@ -75,11 +76,11 @@ public: KisImageSP image(); public: - static QString readFilters(); - static QString writeFilters(); + static TQString readFilters(); + static TQString writeFilters(); private slots: - void ioData(KIO::Job *job, const QByteArray& data); + void ioData(KIO::Job *job, const TQByteArray& data); void ioResult(KIO::Job *job); void ioTotalSize(KIO::Job *job, KIO::filesize_t size); @@ -93,7 +94,7 @@ private: KisImageSP m_img; KisDoc *m_doc; KisUndoAdapter *m_adapter; - QValueVector m_data; + TQValueVector m_data; KIO::TransferJob *m_job; KIO::filesize_t m_size; bool m_stop; diff --git a/filters/krita/magick/magickexport.cpp b/filters/krita/magick/magickexport.cpp index 30113503..b052ab10 100644 --- a/filters/krita/magick/magickexport.cpp +++ b/filters/krita/magick/magickexport.cpp @@ -31,7 +31,7 @@ typedef KGenericFactory MagickExportFactory; K_EXPORT_COMPONENT_FACTORY(libkritamagickexport, MagickExportFactory("kofficefilters")) -MagickExport::MagickExport(KoFilter *, const char *, const QStringList&) : KoFilter() +MagickExport::MagickExport(KoFilter *, const char *, const TQStringList&) : KoFilter() { } @@ -39,7 +39,7 @@ MagickExport::~MagickExport() { } -KoFilter::ConversionStatus MagickExport::convert(const QCString& from, const QCString& to) +KoFilter::ConversiontqStatus MagickExport::convert(const TQCString& from, const TQCString& to) { kdDebug(41008) << "magick export! From: " << from << ", To: " << to << "\n"; @@ -49,7 +49,7 @@ KoFilter::ConversionStatus MagickExport::convert(const QCString& from, const QCS // XXX: Add dialog about flattening layers here KisDoc *output = dynamic_cast(m_chain->inputDocument()); - QString filename = m_chain->outputFile(); + TQString filename = m_chain->outputFile(); if (!output) return KoFilter::CreationError; diff --git a/filters/krita/magick/magickexport.h b/filters/krita/magick/magickexport.h index 3c499ebd..6ea7e238 100644 --- a/filters/krita/magick/magickexport.h +++ b/filters/krita/magick/magickexport.h @@ -23,13 +23,14 @@ class MagickExport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - MagickExport(KoFilter *parent, const char *name, const QStringList&); + MagickExport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~MagickExport(); public: - virtual KoFilter::ConversionStatus convert(const QCString& from, const QCString& to); + virtual KoFilter::ConversiontqStatus convert(const TQCString& from, const TQCString& to); }; #endif // MAGICKEXPORT_H_ diff --git a/filters/krita/magick/magickimport.cpp b/filters/krita/magick/magickimport.cpp index 33177723..0502e51a 100644 --- a/filters/krita/magick/magickimport.cpp +++ b/filters/krita/magick/magickimport.cpp @@ -16,7 +16,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ -#include +#include #include #include @@ -33,7 +33,7 @@ typedef KGenericFactory MagickImportFactory; K_EXPORT_COMPONENT_FACTORY(libkritamagickimport, MagickImportFactory("kofficefilters")) -MagickImport::MagickImport(KoFilter *, const char *, const QStringList&) : KoFilter() +MagickImport::MagickImport(KoFilter *, const char *, const TQStringList&) : KoFilter() { } @@ -41,7 +41,7 @@ MagickImport::~MagickImport() { } -KoFilter::ConversionStatus MagickImport::convert(const QCString&, const QCString& to) +KoFilter::ConversiontqStatus MagickImport::convert(const TQCString&, const TQCString& to) { kdDebug(41008) << "Importing using MagickImport!\n"; @@ -51,7 +51,7 @@ KoFilter::ConversionStatus MagickImport::convert(const QCString&, const QCString KisDoc * doc = dynamic_cast(m_chain -> outputDocument()); KisView * view = static_cast(doc -> views().getFirst()); - QString filename = m_chain -> inputFile(); + TQString filename = m_chain -> inputFile(); if (!doc) return KoFilter::CreationError; diff --git a/filters/krita/magick/magickimport.h b/filters/krita/magick/magickimport.h index 01156642..3373f129 100644 --- a/filters/krita/magick/magickimport.h +++ b/filters/krita/magick/magickimport.h @@ -23,13 +23,14 @@ class MagickImport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - MagickImport(KoFilter *parent, const char *name, const QStringList&); + MagickImport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~MagickImport(); public: - virtual KoFilter::ConversionStatus convert(const QCString& from, const QCString& to); + virtual KoFilter::ConversiontqStatus convert(const TQCString& from, const TQCString& to); }; #endif // MAGICKIMPORT_H_ diff --git a/filters/krita/openexr/kis_openexr_export.cpp b/filters/krita/openexr/kis_openexr_export.cpp index 724d07d0..c753bf48 100644 --- a/filters/krita/openexr/kis_openexr_export.cpp +++ b/filters/krita/openexr/kis_openexr_export.cpp @@ -17,7 +17,7 @@ * Boston, MA 02110-1301, USA. */ -#include +#include #include @@ -49,7 +49,7 @@ using namespace Imath; typedef KGenericFactory KisOpenEXRExportFactory; K_EXPORT_COMPONENT_FACTORY(libkrita_openexr_export, KisOpenEXRExportFactory("kofficefilters")) -KisOpenEXRExport::KisOpenEXRExport(KoFilter *, const char *, const QStringList&) : KoFilter() +KisOpenEXRExport::KisOpenEXRExport(KoFilter *, const char *, const TQStringList&) : KoFilter() { } @@ -57,7 +57,7 @@ KisOpenEXRExport::~KisOpenEXRExport() { } -KoFilter::ConversionStatus KisOpenEXRExport::convert(const QCString& from, const QCString& to) +KoFilter::ConversiontqStatus KisOpenEXRExport::convert(const TQCString& from, const TQCString& to) { if (to != "image/x-exr" || from != "application/x-krita") { return KoFilter::NotImplemented; @@ -68,7 +68,7 @@ KoFilter::ConversionStatus KisOpenEXRExport::convert(const QCString& from, const // XXX: Add dialog about flattening layers here KisDoc *doc = dynamic_cast(m_chain -> inputDocument()); - QString filename = m_chain -> outputFile(); + TQString filename = m_chain -> outputFile(); if (!doc) { return KoFilter::CreationError; @@ -110,15 +110,15 @@ KoFilter::ConversionStatus KisOpenEXRExport::convert(const QCString& from, const Box2i displayWindow(V2i(0, 0), V2i(img -> width() - 1, img -> height() - 1)); - QRect dataExtent = layer -> exactBounds(); + TQRect dataExtent = layer -> exactBounds(); int dataWidth = dataExtent.width(); int dataHeight = dataExtent.height(); Box2i dataWindow(V2i(dataExtent.left(), dataExtent.top()), V2i(dataExtent.right(), dataExtent.bottom())); - RgbaOutputFile file(QFile::encodeName(filename), displayWindow, dataWindow, WRITE_RGBA); + RgbaOutputFile file(TQFile::encodeName(filename), displayWindow, dataWindow, WRITE_RGBA); - QMemArray pixels(dataWidth); + TQMemArray pixels(dataWidth); for (int y = 0; y < dataHeight; ++y) { diff --git a/filters/krita/openexr/kis_openexr_export.h b/filters/krita/openexr/kis_openexr_export.h index 059a799d..56568e57 100644 --- a/filters/krita/openexr/kis_openexr_export.h +++ b/filters/krita/openexr/kis_openexr_export.h @@ -24,13 +24,14 @@ class KisOpenEXRExport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - KisOpenEXRExport(KoFilter *parent, const char *name, const QStringList&); + KisOpenEXRExport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~KisOpenEXRExport(); public: - virtual KoFilter::ConversionStatus convert(const QCString& from, const QCString& to); + virtual KoFilter::ConversiontqStatus convert(const TQCString& from, const TQCString& to); }; #endif // KIS_OPENEXR_EXPORT_H_ diff --git a/filters/krita/openexr/kis_openexr_import.cpp b/filters/krita/openexr/kis_openexr_import.cpp index c2db3385..069a0059 100644 --- a/filters/krita/openexr/kis_openexr_import.cpp +++ b/filters/krita/openexr/kis_openexr_import.cpp @@ -17,8 +17,8 @@ * Boston, MA 02110-1301, USA. */ -#include -#include +#include +#include #include #include @@ -54,7 +54,7 @@ using namespace Imath; typedef KGenericFactory KisOpenEXRImportFactory; K_EXPORT_COMPONENT_FACTORY(libkrita_openexr_import, KisOpenEXRImportFactory("kofficefilters")) -KisOpenEXRImport::KisOpenEXRImport(KoFilter *, const char *, const QStringList&) : KoFilter() +KisOpenEXRImport::KisOpenEXRImport(KoFilter *, const char *, const TQStringList&) : KoFilter() { } @@ -62,7 +62,7 @@ KisOpenEXRImport::~KisOpenEXRImport() { } -KoFilter::ConversionStatus KisOpenEXRImport::convert(const QCString& from, const QCString& to) +KoFilter::ConversiontqStatus KisOpenEXRImport::convert(const TQCString& from, const TQCString& to) { if (from != "image/x-exr" || to != "application/x-krita") { return KoFilter::NotImplemented; @@ -77,23 +77,23 @@ KoFilter::ConversionStatus KisOpenEXRImport::convert(const QCString& from, const doc -> prepareForImport(); - QString filename = m_chain -> inputFile(); + TQString filename = m_chain -> inputFile(); if (filename.isEmpty()) { return KoFilter::FileNotFound; } - RgbaInputFile file(QFile::encodeName(filename)); + RgbaInputFile file(TQFile::encodeName(filename)); Box2i dataWindow = file.dataWindow(); Box2i displayWindow = file.displayWindow(); - kdDebug(41008) << "Data window: " << QRect(dataWindow.min.x, dataWindow.min.y, dataWindow.max.x - dataWindow.min.x + 1, dataWindow.max.y - dataWindow.min.y + 1) << endl; - kdDebug(41008) << "Display window: " << QRect(displayWindow.min.x, displayWindow.min.y, displayWindow.max.x - displayWindow.min.x + 1, displayWindow.max.y - displayWindow.min.y + 1) << endl; + kdDebug(41008) << "Data window: " << TQRect(dataWindow.min.x, dataWindow.min.y, dataWindow.max.x - dataWindow.min.x + 1, dataWindow.max.y - dataWindow.min.y + 1) << endl; + kdDebug(41008) << "Display window: " << TQRect(displayWindow.min.x, displayWindow.min.y, displayWindow.max.x - displayWindow.min.x + 1, displayWindow.max.y - displayWindow.min.y + 1) << endl; int imageWidth = displayWindow.max.x - displayWindow.min.x + 1; int imageHeight = displayWindow.max.y - displayWindow.min.y + 1; - QString imageName = "Imported from OpenEXR"; + TQString imageName = "Imported from OpenEXR"; int dataWidth = dataWindow.max.x - dataWindow.min.x + 1; int dataHeight = dataWindow.max.y - dataWindow.min.y + 1; @@ -118,7 +118,7 @@ KoFilter::ConversionStatus KisOpenEXRImport::convert(const QCString& from, const return KoFilter::CreationError; } - QMemArray pixels(dataWidth); + TQMemArray pixels(dataWidth); for (int y = 0; y < dataHeight; ++y) { diff --git a/filters/krita/openexr/kis_openexr_import.h b/filters/krita/openexr/kis_openexr_import.h index 98858537..f8cd5144 100644 --- a/filters/krita/openexr/kis_openexr_import.h +++ b/filters/krita/openexr/kis_openexr_import.h @@ -24,13 +24,14 @@ class KisOpenEXRImport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - KisOpenEXRImport(KoFilter *parent, const char *name, const QStringList&); + KisOpenEXRImport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~KisOpenEXRImport(); public: - virtual KoFilter::ConversionStatus convert(const QCString& from, const QCString& to); + virtual KoFilter::ConversiontqStatus convert(const TQCString& from, const TQCString& to); }; #endif // KIS_OPENEXR_IMPORT_H_ diff --git a/filters/krita/pdf/kis_pdf_import.cpp b/filters/krita/pdf/kis_pdf_import.cpp index ad200414..5249afb4 100644 --- a/filters/krita/pdf/kis_pdf_import.cpp +++ b/filters/krita/pdf/kis_pdf_import.cpp @@ -22,10 +22,10 @@ // poppler's headers #include -// Qt's headers -#include -#include // TODO that too -#include +// TQt's headers +#include +#include // TODO that too +#include // KDE's headers #include @@ -55,7 +55,7 @@ typedef KGenericFactory PDFImportFactory; K_EXPORT_COMPONENT_FACTORY(libkritapdfimport, PDFImportFactory("kofficefilters")) -KisPDFImport::KisPDFImport(KoFilter *, const char *, const QStringList&) : KoFilter() +KisPDFImport::KisPDFImport(KoFilter *, const char *, const TQStringList&) : KoFilter() { } @@ -63,9 +63,9 @@ KisPDFImport::~KisPDFImport() { } -KisPDFImport::ConversionStatus KisPDFImport::convert(const QCString& , const QCString& ) +KisPDFImport::ConversiontqStatus KisPDFImport::convert(const TQCString& , const TQCString& ) { - QString filename = m_chain -> inputFile(); + TQString filename = m_chain -> inputFile(); kdDebug(41008) << "Importing using PDFImport!" << filename << endl; if (filename.isEmpty()) @@ -75,17 +75,17 @@ KisPDFImport::ConversionStatus KisPDFImport::convert(const QCString& , const QCS KURL url; url.setPath(filename); - if (!KIO::NetAccess::exists(url, false, qApp -> mainWidget())) { + if (!KIO::NetAccess::exists(url, false, tqApp -> mainWidget())) { return KoFilter::FileNotFound; } // We're not set up to handle asynchronous loading at the moment. - QString tmpFile; - if (KIO::NetAccess::download(url, tmpFile, qApp -> mainWidget())) { + TQString tmpFile; + if (KIO::NetAccess::download(url, tmpFile, tqApp -> mainWidget())) { url.setPath( tmpFile ); } - Poppler::Document* pdoc = Poppler::Document::load( QFile::encodeName(url.path() ) ); + Poppler::Document* pdoc = Poppler::Document::load( TQFile::encodeName(url.path() ) ); if ( !pdoc) @@ -97,7 +97,7 @@ KisPDFImport::ConversionStatus KisPDFImport::convert(const QCString& , const QCS while( pdoc->isLocked() ) { - QCString password; + TQCString password; int result = KPasswordDialog::getPassword(password, i18n("A password is required to read that pdf")); if (result == KPasswordDialog::Accepted) { @@ -113,7 +113,7 @@ KisPDFImport::ConversionStatus KisPDFImport::convert(const QCString& , const QCS KisPDFImportWidget* wdg = new KisPDFImportWidget(pdoc, kdb); kdb->setMainWidget(wdg); kapp->restoreOverrideCursor(); - if(kdb->exec() == QDialog::Rejected) + if(kdb->exec() == TQDialog::Rejected) { delete pdoc; delete kdb; @@ -138,11 +138,11 @@ KisPDFImport::ConversionStatus KisPDFImport::convert(const QCString& , const QCS img->blockSignals(true); // Don't send out signals while we're building the image // create a layer - QValueList pages = wdg->pages(); - for(QValueList::const_iterator it = pages.begin(); it != pages.end(); ++it) + TQValueList pages = wdg->pages(); + for(TQValueList::const_iterator it = pages.begin(); it != pages.end(); ++it) { - KisPaintLayer* layer = new KisPaintLayer(img, QString(i18n("Page %1")).arg( QString::number(*it) + 1), Q_UINT8_MAX); - layer->paintDevice()->convertFromQImage( pdoc->getPage( *it )->renderToImage(wdg->intHorizontal->value(), wdg->intVertical->value() ), ""); + KisPaintLayer* layer = new KisPaintLayer(img, TQString(i18n("Page %1")).tqarg( TQString::number(*it) + 1), TQ_UINT8_MAX); + layer->paintDevice()->convertFromTQImage( pdoc->getPage( *it )->renderToImage(wdg->intHorizontal->value(), wdg->intVertical->value() ), ""); img->addLayer(layer, img->rootLayer(), 0); } diff --git a/filters/krita/pdf/kis_pdf_import.h b/filters/krita/pdf/kis_pdf_import.h index 217319db..ab4535b9 100644 --- a/filters/krita/pdf/kis_pdf_import.h +++ b/filters/krita/pdf/kis_pdf_import.h @@ -24,11 +24,12 @@ class KisPDFImport : public KoFilter{ Q_OBJECT + TQ_OBJECT public: - KisPDFImport(KoFilter *parent, const char *name, const QStringList&); + KisPDFImport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~KisPDFImport(); public: - virtual KoFilter::ConversionStatus convert(const QCString& from, const QCString& to); + virtual KoFilter::ConversiontqStatus convert(const TQCString& from, const TQCString& to); }; #endif diff --git a/filters/krita/pdf/kis_pdf_import_widget.cpp b/filters/krita/pdf/kis_pdf_import_widget.cpp index b3d37015..6919876f 100644 --- a/filters/krita/pdf/kis_pdf_import_widget.cpp +++ b/filters/krita/pdf/kis_pdf_import_widget.cpp @@ -22,33 +22,33 @@ // poppler's headers #include -// Qt's headers -#include +// TQt's headers +#include // KDE's headers #include #include #include -KisPDFImportWidget::KisPDFImportWidget(Poppler::Document* pdfDoc, QWidget * parent, const char * name) - : PDFImportWidgetBase(parent, name), m_pdfDoc(pdfDoc) +KisPDFImportWidget::KisPDFImportWidget(Poppler::Document* pdfDoc, TQWidget * tqparent, const char * name) + : PDFImportWidgetBase(tqparent, name), m_pdfDoc(pdfDoc) { m_pages.push_back(0); // The first page is selected updateMaxCanvasSize(); for(int i = 1; i <= m_pdfDoc->getNumPages(); i++) { - listPages->insertItem(QString::number( i ) ); + listPages->insertItem(TQString::number( i ) ); } - connect(intWidth, SIGNAL( valueChanged ( int ) ), this, SLOT( updateHRes() ) ); - connect(intHeight, SIGNAL( valueChanged ( int ) ), this, SLOT( updateHVer() ) ); - connect(intHorizontal, SIGNAL( valueChanged ( int ) ), this, SLOT( updateWidth() ) ); - connect(intVertical, SIGNAL( valueChanged ( int ) ), this, SLOT( updateHeight() ) ); - connect(boolAllPages, SIGNAL( toggled ( bool ) ), this, SLOT( selectAllPages( bool ) ) ); - connect(boolFirstPage, SIGNAL( toggled ( bool ) ), this, SLOT( selectFirstPage( bool ) ) ); - connect(boolSelectionPage, SIGNAL( toggled ( bool ) ), this, SLOT( selectSelectionOfPages( bool ) ) ); - connect(listPages, SIGNAL(selectionChanged () ), this, SLOT(updateSelectionOfPages())); + connect(intWidth, TQT_SIGNAL( valueChanged ( int ) ), this, TQT_SLOT( updateHRes() ) ); + connect(intHeight, TQT_SIGNAL( valueChanged ( int ) ), this, TQT_SLOT( updateHVer() ) ); + connect(intHorizontal, TQT_SIGNAL( valueChanged ( int ) ), this, TQT_SLOT( updateWidth() ) ); + connect(intVertical, TQT_SIGNAL( valueChanged ( int ) ), this, TQT_SLOT( updateHeight() ) ); + connect(boolAllPages, TQT_SIGNAL( toggled ( bool ) ), this, TQT_SLOT( selectAllPages( bool ) ) ); + connect(boolFirstPage, TQT_SIGNAL( toggled ( bool ) ), this, TQT_SLOT( selectFirstPage( bool ) ) ); + connect(boolSelectionPage, TQT_SIGNAL( toggled ( bool ) ), this, TQT_SLOT( selectSelectionOfPages( bool ) ) ); + connect(listPages, TQT_SIGNAL(selectionChanged () ), this, TQT_SLOT(updateSelectionOfPages())); } @@ -99,10 +99,10 @@ void KisPDFImportWidget::updateSelectionOfPages() void KisPDFImportWidget::updateMaxCanvasSize() { m_maxWidthInch = 0., m_maxHeightInch =0.; - for(QValueList::const_iterator it = m_pages.begin(); it != m_pages.end(); ++it) + for(TQValueList::const_iterator it = m_pages.begin(); it != m_pages.end(); ++it) { Poppler::Page *p = m_pdfDoc->getPage(*it ); - QSize size = p->pageSize(); + TQSize size = p->pageSize(); if(size.width() > m_maxWidthInch) { m_maxWidthInch = size.width(); diff --git a/filters/krita/pdf/kis_pdf_import_widget.h b/filters/krita/pdf/kis_pdf_import_widget.h index debc0f0e..8fe806a8 100644 --- a/filters/krita/pdf/kis_pdf_import_widget.h +++ b/filters/krita/pdf/kis_pdf_import_widget.h @@ -29,12 +29,13 @@ class Document; class KisPDFImportWidget : public PDFImportWidgetBase { Q_OBJECT + TQ_OBJECT public: - KisPDFImportWidget(Poppler::Document* pdfDoc, QWidget * parent, const char * name = ""); + KisPDFImportWidget(Poppler::Document* pdfDoc, TQWidget * tqparent, const char * name = ""); ~KisPDFImportWidget(); public: - inline QValueList pages() { return m_pages; } + inline TQValueList pages() { return m_pages; } private slots: void selectAllPages(bool v); void selectFirstPage(bool v); @@ -47,7 +48,7 @@ class KisPDFImportWidget : public PDFImportWidgetBase void updateMaxCanvasSize(); private: Poppler::Document* m_pdfDoc; - QValueList m_pages; + TQValueList m_pages; double m_maxWidthInch, m_maxHeightInch; }; diff --git a/filters/krita/pdf/pdfimportwidgetbase.ui b/filters/krita/pdf/pdfimportwidgetbase.ui index 148e72a2..19da5d15 100644 --- a/filters/krita/pdf/pdfimportwidgetbase.ui +++ b/filters/krita/pdf/pdfimportwidgetbase.ui @@ -1,6 +1,6 @@ PDFImportWidgetBase - + PDFImportWidgetBase @@ -19,7 +19,7 @@ unnamed - + groupBox1 @@ -30,7 +30,7 @@ unnamed - + textLabel1 @@ -38,9 +38,9 @@ Resolution: - + - layout6 + tqlayout6 @@ -56,22 +56,22 @@ Fixed - + 20 20 - + - layout2 + tqlayout2 unnamed - + intVerticalqsdf @@ -111,7 +111,7 @@ 72 - + textLabel5 @@ -141,7 +141,7 @@ Expanding - + 31 20 @@ -150,7 +150,7 @@ - + textLabel2 @@ -158,9 +158,9 @@ Size: - + - layout4 + tqlayout4 @@ -176,16 +176,16 @@ Fixed - + 20 20 - + - layout3 + tqlayout3 @@ -199,7 +199,7 @@ 99999 - + intWidthzqffs @@ -215,7 +215,7 @@ 99999 - + intHeightqsdfq @@ -235,7 +235,7 @@ Expanding - + 51 20 @@ -246,7 +246,7 @@ - + buttonGroup1 @@ -257,7 +257,7 @@ unnamed - + boolAllPages @@ -265,7 +265,7 @@ &All pages - + boolFirstPage @@ -276,7 +276,7 @@ true - + boolSelectionPage @@ -308,7 +308,7 @@ intWidth intHeight - + kcombobox.h knuminput.h diff --git a/filters/krita/png/kis_png_converter.cc b/filters/krita/png/kis_png_converter.cc index 0beb0b74..12da2098 100644 --- a/filters/krita/png/kis_png_converter.cc +++ b/filters/krita/png/kis_png_converter.cc @@ -22,7 +22,7 @@ #include -#include +#include #include #include @@ -45,10 +45,10 @@ namespace { - const Q_UINT8 PIXEL_BLUE = 0; - const Q_UINT8 PIXEL_GREEN = 1; - const Q_UINT8 PIXEL_RED = 2; - const Q_UINT8 PIXEL_ALPHA = 3; + const TQ_UINT8 PIXEL_BLUE = 0; + const TQ_UINT8 PIXEL_GREEN = 1; + const TQ_UINT8 PIXEL_RED = 2; + const TQ_UINT8 PIXEL_ALPHA = 3; int getColorTypeforColorSpace( KisColorSpace * cs , bool alpha) @@ -62,13 +62,13 @@ namespace { return alpha ? PNG_COLOR_TYPE_RGB_ALPHA : PNG_COLOR_TYPE_RGB; } - KMessageBox::error(0, i18n("Cannot export images in %1.\n").arg(cs->id().name()) ) ; + KMessageBox::error(0, i18n("Cannot export images in %1.\n").tqarg(cs->id().name()) ) ; return -1; } - QString getColorSpaceForColorType(int color_type,int color_nb_bits) { + TQString getColorSpaceForColorType(int color_type,int color_nb_bits) { if(color_type == PNG_COLOR_TYPE_GRAY || color_type == PNG_COLOR_TYPE_GRAY_ALPHA) { switch(color_nb_bits) @@ -93,7 +93,7 @@ namespace { } - void fillText(png_text* p_text, char* key, QString& text) + void fillText(png_text* p_text, char* key, TQString& text) { p_text->compression = PNG_TEXT_COMPRESSION_zTXt; p_text->key = key; @@ -123,7 +123,7 @@ KisPNGConverter::~KisPNGConverter() class KisPNGStream { public: - KisPNGStream(Q_UINT8* buf, Q_UINT32 depth ) : m_posinc(8),m_depth(depth), m_buf(buf) { *m_buf = 0;}; + KisPNGStream(TQ_UINT8* buf, TQ_UINT32 depth ) : m_posinc(8),m_depth(depth), m_buf(buf) { *m_buf = 0;}; int nextValue() { if( m_posinc == 0) @@ -146,16 +146,16 @@ class KisPNGStream { *m_buf = (v << m_posinc) | *m_buf; } private: - Q_UINT32 m_posinc, m_depth; - Q_UINT8* m_buf; + TQ_UINT32 m_posinc, m_depth; + TQ_UINT8* m_buf; }; KisImageBuilder_Result KisPNGConverter::decode(const KURL& uri) { kdDebug(41008) << "Start decoding PNG File" << endl; // open the file - kdDebug(41008) << QFile::encodeName(uri.path()) << " " << uri.path() << " " << uri << endl; - FILE *fp = fopen(QFile::encodeName(uri.path()), "rb"); + kdDebug(41008) << TQFile::encodeName(uri.path()) << " " << uri.path() << " " << uri << endl; + FILE *fp = fopen(TQFile::encodeName(uri.path()), "rb"); if (!fp) { return (KisImageBuilder_RESULT_NOT_EXIST); @@ -213,7 +213,7 @@ KisImageBuilder_Result KisPNGConverter::decode(const KURL& uri) #endif // Determine the colorspace - QString csName = getColorSpaceForColorType(color_type, color_nb_bits); + TQString csName = getColorSpaceForColorType(color_type, color_nb_bits); if(csName.isEmpty()) { png_destroy_read_struct(&png_ptr, &info_ptr, &end_info); return KisImageBuilder_RESULT_UNSUPPORTED_COLORSPACE; @@ -232,9 +232,9 @@ KisImageBuilder_Result KisPNGConverter::decode(const KURL& uri) KisProfile* profile = 0; if(png_get_iCCP(png_ptr, info_ptr, &profile_name, &compression_type, &profile_data, &proflen)) { - QByteArray profile_rawdata; + TQByteArray profile_rawdata; // XXX: Hardcoded for icc type -- is that correct for us? - if (QString::compare(profile_name, "icc") == 0) { + if (TQString::compare(profile_name, "icc") == 0) { profile_rawdata.resize(proflen); memcpy(profile_rawdata.data(), profile_data, proflen); profile = new KisProfile(profile_rawdata); @@ -285,13 +285,13 @@ KisImageBuilder_Result KisPNGConverter::decode(const KURL& uri) for(int i = 0; i < num_comments; i++) { kdDebug(41008) << "key is " << text_ptr[i].key << " containing " << text_ptr[i].text << endl; - if(QString::compare(text_ptr[i].key, "title") == 0) + if(TQString::compare(text_ptr[i].key, "title") == 0) { aboutPage->setTitle(text_ptr[i].text); - } else if(QString::compare(text_ptr[i].key, "abstract") == 0) + } else if(TQString::compare(text_ptr[i].key, "abstract") == 0) { aboutPage->setAbstract(text_ptr[i].text); - } else if(QString::compare(text_ptr[i].key, "author") == 0) + } else if(TQString::compare(text_ptr[i].key, "author") == 0) { authorPage->setFullName(text_ptr[i].text); } @@ -339,7 +339,7 @@ KisImageBuilder_Result KisPNGConverter::decode(const KURL& uri) } } - KisPaintLayer* layer = new KisPaintLayer(m_img, m_img -> nextLayerName(), Q_UINT8_MAX); + KisPaintLayer* layer = new KisPaintLayer(m_img, m_img -> nextLayerName(), TQ_UINT8_MAX); for (int i = 0; i < number_of_passes; i++) { for (png_uint_32 y = 0; y < height; y++) { @@ -352,23 +352,23 @@ KisImageBuilder_Result KisPNGConverter::decode(const KURL& uri) case PNG_COLOR_TYPE_GRAY_ALPHA: if(color_nb_bits == 16) { - Q_UINT16 *src = reinterpret_cast(row_pointer); + TQ_UINT16 *src = reinterpret_cast(row_pointer); while (!it.isDone()) { - Q_UINT16 *d = reinterpret_cast(it.rawData()); + TQ_UINT16 *d = reinterpret_cast(it.rawData()); d[0] = *(src++); if(transform) cmsDoTransform(transform, d, d, 1); if(hasalpha) d[1] = *(src++); - else d[1] = Q_UINT16_MAX; + else d[1] = TQ_UINT16_MAX; ++it; } } else { - Q_UINT8 *src = row_pointer; + TQ_UINT8 *src = row_pointer; while (!it.isDone()) { - Q_UINT8 *d = it.rawData(); + TQ_UINT8 *d = it.rawData(); d[0] = *(src++); if(transform) cmsDoTransform(transform, d, d, 1); if(hasalpha) d[1] = *(src++); - else d[1] = Q_UINT8_MAX; + else d[1] = TQ_UINT8_MAX; ++it; } } @@ -378,27 +378,27 @@ KisImageBuilder_Result KisPNGConverter::decode(const KURL& uri) case PNG_COLOR_TYPE_RGB_ALPHA: if(color_nb_bits == 16) { - Q_UINT16 *src = reinterpret_cast(row_pointer); + TQ_UINT16 *src = reinterpret_cast(row_pointer); while (!it.isDone()) { - Q_UINT16 *d = reinterpret_cast(it.rawData()); + TQ_UINT16 *d = reinterpret_cast(it.rawData()); d[2] = *(src++); d[1] = *(src++); d[0] = *(src++); if(transform) cmsDoTransform(transform, d, d, 1); if(hasalpha) d[3] = *(src++); - else d[3] = Q_UINT16_MAX; + else d[3] = TQ_UINT16_MAX; ++it; } } else { - Q_UINT8 *src = row_pointer; + TQ_UINT8 *src = row_pointer; while (!it.isDone()) { - Q_UINT8 *d = it.rawData(); + TQ_UINT8 *d = it.rawData(); d[2] = *(src++); d[1] = *(src++); d[0] = *(src++); if(transform) cmsDoTransform(transform, d, d, 1); if(hasalpha) d[3] = *(src++); - else d[3] = Q_UINT8_MAX; + else d[3] = TQ_UINT8_MAX; ++it; } } @@ -407,12 +407,12 @@ KisImageBuilder_Result KisPNGConverter::decode(const KURL& uri) { KisPNGStream stream(row_pointer, color_nb_bits); while (!it.isDone()) { - Q_UINT8 *d = it.rawData(); + TQ_UINT8 *d = it.rawData(); png_color c = palette[ stream.nextValue() ]; d[2] = c.red; d[1] = c.green; d[0] = c.blue; - d[3] = Q_UINT8_MAX; + d[3] = TQ_UINT8_MAX; ++it; } } @@ -438,19 +438,19 @@ KisImageBuilder_Result KisPNGConverter::decode(const KURL& uri) KisImageBuilder_Result KisPNGConverter::buildImage(const KURL& uri) { - kdDebug(41008) << QFile::encodeName(uri.path()) << " " << uri.path() << " " << uri << endl; + kdDebug(41008) << TQFile::encodeName(uri.path()) << " " << uri.path() << " " << uri << endl; if (uri.isEmpty()) return KisImageBuilder_RESULT_NO_URI; - if (!KIO::NetAccess::exists(uri, false, qApp -> mainWidget())) { + if (!KIO::NetAccess::exists(uri, false, tqApp -> mainWidget())) { return KisImageBuilder_RESULT_NOT_EXIST; } // We're not set up to handle asynchronous loading at the moment. KisImageBuilder_Result result = KisImageBuilder_RESULT_FAILURE; - QString tmpFile; + TQString tmpFile; - if (KIO::NetAccess::download(uri, tmpFile, qApp -> mainWidget())) { + if (KIO::NetAccess::download(uri, tmpFile, tqApp -> mainWidget())) { KURL uriTF; uriTF.setPath( tmpFile ); result = decode(uriTF); @@ -482,7 +482,7 @@ KisImageBuilder_Result KisPNGConverter::buildFile(const KURL& uri, KisPaintLayer if (!uri.isLocalFile()) return KisImageBuilder_RESULT_NOT_LOCAL; // Open file for writing - FILE *fp = fopen(QFile::encodeName(uri.path()), "wb"); + FILE *fp = fopen(TQFile::encodeName(uri.path()), "wb"); if (!fp) { return (KisImageBuilder_RESULT_FAILURE); @@ -548,7 +548,7 @@ KisImageBuilder_Result KisPNGConverter::buildFile(const KURL& uri, KisPaintLayer bool toomuchcolor = false; while( !it.isDone() ) { - const Q_UINT8* c = it.rawData(); + const TQ_UINT8* c = it.rawData(); bool findit = false; for(int i = 0; i < num_palette; i++) { @@ -613,7 +613,7 @@ KisImageBuilder_Result KisPNGConverter::buildFile(const KURL& uri, KisPaintLayer // Save annotation vKisAnnotationSP_it it = annotationsStart; while(it != annotationsEnd) { - if (!(*it) || (*it) -> type() == QString()) { + if (!(*it) || (*it) -> type() == TQString()) { kdDebug(41008) << "Warning: empty annotation" << endl; ++it; continue; @@ -637,20 +637,20 @@ KisImageBuilder_Result KisPNGConverter::buildFile(const KURL& uri, KisPaintLayer int nbtexts = 0; KoDocumentInfo * info = m_doc->documentInfo(); KoDocumentInfoAbout * aboutPage = static_cast(info->page( "about" )); - QString title = aboutPage->title(); + TQString title = aboutPage->title(); if(!title.isEmpty()) { fillText(texts+nbtexts, "title", title); nbtexts++; } - QString abstract = aboutPage->abstract(); + TQString abstract = aboutPage->abstract(); if(!abstract.isEmpty()) { fillText(texts+nbtexts, "abstract", abstract); nbtexts++; } KoDocumentInfoAuthor * authorPage = static_cast(info->page( "author" )); - QString author = authorPage->fullName(); + TQString author = authorPage->fullName(); if(!author.isEmpty()) { fillText(texts+nbtexts, "author", author); @@ -684,17 +684,17 @@ KisImageBuilder_Result KisPNGConverter::buildFile(const KURL& uri, KisPaintLayer case PNG_COLOR_TYPE_GRAY_ALPHA: if(color_nb_bits == 16) { - Q_UINT16 *dst = reinterpret_cast(row_pointers[y]); + TQ_UINT16 *dst = reinterpret_cast(row_pointers[y]); while (!it.isDone()) { - const Q_UINT16 *d = reinterpret_cast(it.rawData()); + const TQ_UINT16 *d = reinterpret_cast(it.rawData()); *(dst++) = d[0]; if(alpha) *(dst++) = d[1]; ++it; } } else { - Q_UINT8 *dst = row_pointers[y]; + TQ_UINT8 *dst = row_pointers[y]; while (!it.isDone()) { - const Q_UINT8 *d = it.rawData(); + const TQ_UINT8 *d = it.rawData(); *(dst++) = d[0]; if(alpha) *(dst++) = d[1]; ++it; @@ -705,9 +705,9 @@ KisImageBuilder_Result KisPNGConverter::buildFile(const KURL& uri, KisPaintLayer case PNG_COLOR_TYPE_RGB_ALPHA: if(color_nb_bits == 16) { - Q_UINT16 *dst = reinterpret_cast(row_pointers[y]); + TQ_UINT16 *dst = reinterpret_cast(row_pointers[y]); while (!it.isDone()) { - const Q_UINT16 *d = reinterpret_cast(it.rawData()); + const TQ_UINT16 *d = reinterpret_cast(it.rawData()); *(dst++) = d[2]; *(dst++) = d[1]; *(dst++) = d[0]; @@ -715,9 +715,9 @@ KisImageBuilder_Result KisPNGConverter::buildFile(const KURL& uri, KisPaintLayer ++it; } } else { - Q_UINT8 *dst = row_pointers[y]; + TQ_UINT8 *dst = row_pointers[y]; while (!it.isDone()) { - const Q_UINT8 *d = it.rawData(); + const TQ_UINT8 *d = it.rawData(); *(dst++) = d[2]; *(dst++) = d[1]; *(dst++) = d[0]; @@ -728,10 +728,10 @@ KisImageBuilder_Result KisPNGConverter::buildFile(const KURL& uri, KisPaintLayer break; case PNG_COLOR_TYPE_PALETTE: { - Q_UINT8 *dst = row_pointers[y]; + TQ_UINT8 *dst = row_pointers[y]; KisPNGStream writestream(dst, color_nb_bits); while (!it.isDone()) { - const Q_UINT8 *d = it.rawData(); + const TQ_UINT8 *d = it.rawData(); int i; for(i = 0; i < num_palette; i++) { diff --git a/filters/krita/png/kis_png_converter.h b/filters/krita/png/kis_png_converter.h index 6fd8b207..a4f1140b 100644 --- a/filters/krita/png/kis_png_converter.h +++ b/filters/krita/png/kis_png_converter.h @@ -22,7 +22,7 @@ #include -#include +#include #include @@ -56,6 +56,7 @@ enum KisImageBuilder_Result { class KisPNGConverter : public KisProgressSubject { Q_OBJECT + TQ_OBJECT public: KisPNGConverter(KisDoc *doc, KisUndoAdapter *adapter); virtual ~KisPNGConverter(); diff --git a/filters/krita/png/kis_png_export.cc b/filters/krita/png/kis_png_export.cc index b1df098c..46524b46 100644 --- a/filters/krita/png/kis_png_export.cc +++ b/filters/krita/png/kis_png_export.cc @@ -19,8 +19,8 @@ #include "kis_png_export.h" -#include -#include +#include +#include #include #include @@ -41,7 +41,7 @@ typedef KGenericFactory KisPNGExportFactory; K_EXPORT_COMPONENT_FACTORY(libkritapngexport, KisPNGExportFactory("kofficefilters")) -KisPNGExport::KisPNGExport(KoFilter *, const char *, const QStringList&) : KoFilter() +KisPNGExport::KisPNGExport(KoFilter *, const char *, const TQStringList&) : KoFilter() { } @@ -49,12 +49,12 @@ KisPNGExport::~KisPNGExport() { } -KoFilter::ConversionStatus KisPNGExport::convert(const QCString& from, const QCString& to) +KoFilter::ConversiontqStatus KisPNGExport::convert(const TQCString& from, const TQCString& to) { kdDebug(41008) << "Png export! From: " << from << ", To: " << to << "\n"; KisDoc *output = dynamic_cast(m_chain->inputDocument()); - QString filename = m_chain->outputFile(); + TQString filename = m_chain->outputFile(); if (!output) return KoFilter::CreationError; @@ -90,7 +90,7 @@ KoFilter::ConversionStatus KisPNGExport::convert(const QCString& from, const QCS wdg->alpha->setEnabled(isThereAlpha); kdb->setMainWidget(wdg); kapp->restoreOverrideCursor(); - if(kdb->exec() == QDialog::Rejected) + if(kdb->exec() == TQDialog::Rejected) { return KoFilter::OK; // FIXME Cancel doesn't exist :( } diff --git a/filters/krita/png/kis_png_export.h b/filters/krita/png/kis_png_export.h index 1c99d7c9..d962523d 100644 --- a/filters/krita/png/kis_png_export.h +++ b/filters/krita/png/kis_png_export.h @@ -24,11 +24,12 @@ class KisPNGExport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - KisPNGExport(KoFilter *parent, const char *name, const QStringList&); + KisPNGExport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~KisPNGExport(); public: - virtual KoFilter::ConversionStatus convert(const QCString& from, const QCString& to); + virtual KoFilter::ConversiontqStatus convert(const TQCString& from, const TQCString& to); }; #endif diff --git a/filters/krita/png/kis_png_import.cc b/filters/krita/png/kis_png_import.cc index 5b824081..de0b7676 100644 --- a/filters/krita/png/kis_png_import.cc +++ b/filters/krita/png/kis_png_import.cc @@ -33,7 +33,7 @@ typedef KGenericFactory PNGImportFactory; K_EXPORT_COMPONENT_FACTORY(libkritapngimport, PNGImportFactory("kofficefilters")) -KisPNGImport::KisPNGImport(KoFilter *, const char *, const QStringList&) : KoFilter() +KisPNGImport::KisPNGImport(KoFilter *, const char *, const TQStringList&) : KoFilter() { } @@ -41,7 +41,7 @@ KisPNGImport::~KisPNGImport() { } -KoFilter::ConversionStatus KisPNGImport::convert(const QCString&, const QCString& to) +KoFilter::ConversiontqStatus KisPNGImport::convert(const TQCString&, const TQCString& to) { kdDebug(41008) << "Importing using PNGImport!\n"; @@ -51,7 +51,7 @@ KoFilter::ConversionStatus KisPNGImport::convert(const QCString&, const QCString KisDoc * doc = dynamic_cast(m_chain -> outputDocument()); KisView * view = static_cast(doc -> views().getFirst()); - QString filename = m_chain -> inputFile(); + TQString filename = m_chain -> inputFile(); if (!doc) return KoFilter::CreationError; diff --git a/filters/krita/png/kis_png_import.h b/filters/krita/png/kis_png_import.h index 8c952c96..d0b8502a 100644 --- a/filters/krita/png/kis_png_import.h +++ b/filters/krita/png/kis_png_import.h @@ -23,11 +23,12 @@ class KisPNGImport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - KisPNGImport(KoFilter *parent, const char *name, const QStringList&); + KisPNGImport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~KisPNGImport(); public: - virtual KoFilter::ConversionStatus convert(const QCString& from, const QCString& to); + virtual KoFilter::ConversiontqStatus convert(const TQCString& from, const TQCString& to); }; #endif diff --git a/filters/krita/png/kis_wdg_options_png.ui b/filters/krita/png/kis_wdg_options_png.ui index b8d11c3a..405db2fe 100644 --- a/filters/krita/png/kis_wdg_options_png.ui +++ b/filters/krita/png/kis_wdg_options_png.ui @@ -1,6 +1,6 @@ KisWdgOptionsPNG - + KisWdgOptionsPNG @@ -22,22 +22,22 @@ 0 - + - layout6 + tqlayout6 unnamed - + textLabel1 Compress: - + AlignTop @@ -48,15 +48,15 @@ <br>Note: the compression level does not change the quality of the result.</p> - + - layout5 + tqlayout5 unnamed - + compressionLevel @@ -86,15 +86,15 @@ <br>Note: the compression level doesn't change the quality of the result.</p> - + - layout4 + tqlayout4 unnamed - + textLabel3 @@ -106,14 +106,14 @@ <br>Note: the compression level doesn't change the quality of the result.</p> - + textLabel4 Small - + AlignVCenter|AlignRight @@ -137,14 +137,14 @@ Expanding - + 20 5 - + interlacing @@ -159,7 +159,7 @@ Enabling interlacing will cause the image to be displayed by the browser even while downloading.</p> - + alpha @@ -179,5 +179,5 @@ You can uncheck the box if you are not using transparency and you want to make t - + diff --git a/filters/krita/raw/dcraw.c b/filters/krita/raw/dcraw.c index b562dd74..e92c1d3c 100644 --- a/filters/krita/raw/dcraw.c +++ b/filters/krita/raw/dcraw.c @@ -1146,12 +1146,12 @@ void CLASS rollei_load_raw() void CLASS phase_one_load_raw() { int row, col, a, b; - ushort *pixel, akey, bkey, mask; + ushort *pixel, akey, bkey, tqmask; fseek (ifp, nikon_curve_offset, SEEK_SET); akey = get2(); bkey = get2(); - mask = tiff_data_compression == 1 ? 0x5555:0x1354; + tqmask = tiff_data_compression == 1 ? 0x5555:0x1354; fseek (ifp, data_offset + top_margin*raw_width*2, SEEK_SET); pixel = calloc (raw_width, sizeof *pixel); merror (pixel, "phase_one_load_raw()"); @@ -1160,8 +1160,8 @@ void CLASS phase_one_load_raw() for (col=0; col < raw_width; col+=2) { a = pixel[col+0] ^ akey; b = pixel[col+1] ^ bkey; - pixel[col+0] = (a & mask) | (b & ~mask); - pixel[col+1] = (b & mask) | (a & ~mask); + pixel[col+0] = (a & tqmask) | (b & ~tqmask); + pixel[col+1] = (b & tqmask) | (a & ~tqmask); } for (col=0; col < width; col++) BAYER(row,col) = pixel[col+left_margin]; @@ -2147,7 +2147,7 @@ void CLASS foveon_interpolate() foveon_fixed (chroma_dq, 3, "ChromaDQ"); foveon_fixed (color_dq, 3, foveon_camf_param ("IncludeBlocks", "ColorDQ") ? - "ColorDQ" : "ColorDQCamRGB"); + "ColorDQ" : "ColorDTQCamRGB"); if (foveon_camf_param ("IncludeBlocks", "ColumnFilter")) foveon_fixed (&cfilt, 1, "ColumnFilter"); @@ -3281,7 +3281,7 @@ void CLASS parse_makernote() !strcmp (buf,"EPSON")) fseek (ifp, -2, SEEK_CUR); else if (!strcmp (buf,"AOC") || - !strcmp (buf,"QVC")) + !strcmp (buf,"TQVC")) fseek (ifp, -4, SEEK_CUR); else fseek (ifp, -10, SEEK_CUR); @@ -3514,7 +3514,7 @@ int CLASS parse_tiff_ifd (int base, int level) case 0x111: /* StripOffset */ data_offset = get4(); break; - case 0x112: /* Orientation */ + case 0x112: /* Qt::Orientation */ flip = flip_map[(get2()-1) & 7]; break; case 0x115: /* SamplesPerPixel */ @@ -5731,7 +5731,7 @@ void CLASS write_psd (FILE *ofp) 0,3, /* mode (1=grey, 3=rgb) */ 0,0,0,0, /* color mode data */ 0,0,0,0, /* image resources */ - 0,0,0,0, /* layer/mask info */ + 0,0,0,0, /* layer/tqmask info */ 0,0 /* no compression */ }; int hw[2], psize, row, col, c; diff --git a/filters/krita/raw/kis_raw_import.cpp b/filters/krita/raw/kis_raw_import.cpp index f9c1f5ea..62cd3e82 100644 --- a/filters/krita/raw/kis_raw_import.cpp +++ b/filters/krita/raw/kis_raw_import.cpp @@ -25,20 +25,20 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -74,7 +74,7 @@ typedef KGenericFactory KisRawImportFactory; K_EXPORT_COMPONENT_FACTORY(libkrita_raw_import, KisRawImportFactory("kofficefilters")) -KisRawImport::KisRawImport(KoFilter *, const char *, const QStringList&) +KisRawImport::KisRawImport(KoFilter *, const char *, const TQStringList&) : KoFilter() , m_data(0) , m_process(0) @@ -86,12 +86,12 @@ KisRawImport::KisRawImport(KoFilter *, const char *, const QStringList&) m_page = new WdgRawImport(m_dialog); m_dialog -> setMainWidget(m_page); - connect(m_page->bnPreview, SIGNAL(clicked()), this, SLOT(slotUpdatePreview())); - connect(m_page->grpColorSpace, SIGNAL(clicked( int )), this, SLOT(slotFillCmbProfiles())); - connect(m_page->grpChannelDepth, SIGNAL(clicked( int )), this, SLOT(slotFillCmbProfiles())); + connect(m_page->bnPreview, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotUpdatePreview())); + connect(m_page->grpColorSpace, TQT_SIGNAL(clicked( int )), this, TQT_SLOT(slotFillCmbProfiles())); + connect(m_page->grpChannelDepth, TQT_SIGNAL(clicked( int )), this, TQT_SLOT(slotFillCmbProfiles())); KisConfig cfg; - QString monitorProfileName = cfg.monitorProfile(); + TQString monitorProfileName = cfg.monitorProfile(); m_monitorProfile = KisMetaRegistry::instance()->csRegistry()->getProfileByName(monitorProfileName); slotFillCmbProfiles(); @@ -103,7 +103,7 @@ KisRawImport::~KisRawImport() delete m_process; } -KoFilter::ConversionStatus KisRawImport::convert(const QCString& from, const QCString& to) +KoFilter::ConversiontqStatus KisRawImport::convert(const TQCString& from, const TQCString& to) { if (from != "image/x-raw" || to != "application/x-krita") { return KoFilter::NotImplemented; @@ -122,7 +122,7 @@ KoFilter::ConversionStatus KisRawImport::convert(const QCString& from, const QCS doc -> prepareForImport(); - QString filename = m_chain -> inputFile(); + TQString filename = m_chain -> inputFile(); if (filename.isEmpty()) { return KoFilter::FileNotFound; @@ -131,8 +131,8 @@ KoFilter::ConversionStatus KisRawImport::convert(const QCString& from, const QCS slotUpdatePreview(); // Show dialog - m_dialog->setCursor(Qt::ArrowCursor); - QApplication::setOverrideCursor(Qt::ArrowCursor); + m_dialog->setCursor(TQt::ArrowCursor); + TQApplication::setOverrideCursor(TQt::ArrowCursor); KConfig * cfg = KGlobal::config(); cfg->setGroup("rawimport"); @@ -157,7 +157,7 @@ KoFilter::ConversionStatus KisRawImport::convert(const QCString& from, const QCS m_page->dblRed->setValue(cfg->readDoubleNumEntry("red", 1.0)); m_page->dblBlue->setValue(cfg->readDoubleNumEntry("blue", 1.0)); - if (m_dialog->exec() == QDialog::Accepted) { + if (m_dialog->exec() == TQDialog::Accepted) { cfg->writeEntry("gray", m_page->radioGray->isChecked()); cfg->writeEntry("rgb", m_page->radioRGB->isChecked()); @@ -179,13 +179,13 @@ KoFilter::ConversionStatus KisRawImport::convert(const QCString& from, const QCS cfg->writeEntry("red", m_page->dblRed->value()); cfg->writeEntry("blue", m_page->dblBlue->value()); - QApplication::setOverrideCursor(Qt::waitCursor); + TQApplication::setOverrideCursor(TQt::waitCursor); // Create a busy indicator to show that we didn't die or so - m_progress = new QProgressDialog(); + m_progress = new TQProgressDialog(); m_progress -> setTotalSteps(0); m_progress -> setCancelButton(0); - QTimer timer; - connect(&timer, SIGNAL(timeout()), this, SLOT(incrementProgress())); + TQTimer timer; + connect(&timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(incrementProgress())); timer.start(200); doc -> undoAdapter() -> setUndo(false); @@ -196,7 +196,7 @@ KoFilter::ConversionStatus KisRawImport::convert(const QCString& from, const QCS KisPaintLayerSP layer = 0; KisPaintDeviceSP device = 0; - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); delete m_progress; m_progress = 0; @@ -204,7 +204,7 @@ KoFilter::ConversionStatus KisRawImport::convert(const QCString& from, const QCS if (m_page->radio8->isChecked()) { // 8 bits - QImage img; + TQImage img; img.loadFromData(*m_data); KisColorSpace * cs = 0; @@ -226,13 +226,13 @@ KoFilter::ConversionStatus KisRawImport::convert(const QCString& from, const QCS device = layer->paintDevice(); if (device == 0) return KoFilter::CreationError; - device->convertFromQImage(img, ""); + device->convertFromTQImage(img, ""); } else { // 16 bits - Q_UINT32 startOfImagedata = 0; - QSize sz = determineSize(startOfImagedata); + TQ_UINT32 startOfImagedata = 0; + TQSize sz = determineSize(startOfImagedata); kdDebug(41008) << "Total bytes: " << m_data->size() << "\n start of image data: " << startOfImagedata @@ -271,26 +271,26 @@ KoFilter::ConversionStatus KisRawImport::convert(const QCString& from, const QCS while (!it.isDone()) { if (m_page->radioGray->isChecked()) { - Q_UINT16 d = (Q_INT16)*(data + pos); + TQ_UINT16 d = (TQ_INT16)*(data + pos); d = ntohs(d); memcpy(it.rawData(), &d, 2); pos += 2; } else { // Red - Q_UINT16 d = (Q_INT16)*(data + pos); + TQ_UINT16 d = (TQ_INT16)*(data + pos); d = ntohs(d); memcpy(it.rawData() + 4, &d, 2); // Green pos += 2; - d = (Q_INT16)*(data + pos ); + d = (TQ_INT16)*(data + pos ); d = ntohs(d); memcpy(it.rawData() + 2, &d, 2); // Blue pos += 2; - d = (Q_INT16)*(data + pos ); + d = (TQ_INT16)*(data + pos ); d = ntohs(d); memcpy(it.rawData(), &d, 2); @@ -308,11 +308,11 @@ KoFilter::ConversionStatus KisRawImport::convert(const QCString& from, const QCS doc -> setModified(false); kdDebug() << "everything ok\n"; - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); return KoFilter::OK; } - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); return KoFilter::UserCancelled; } @@ -324,14 +324,14 @@ void KisRawImport::incrementProgress() void KisRawImport::slotUpdatePreview() { - QApplication::setOverrideCursor(Qt::waitCursor); + TQApplication::setOverrideCursor(TQt::waitCursor); getImageData(createArgumentList(true)); kdDebug(41008) << "Retrieved " << m_data->size() << " bytes of image data\n"; if (m_data->isNull()) return; - QImage img; + TQImage img; if (m_page->radio8->isChecked()) { // 8 bits @@ -340,8 +340,8 @@ void KisRawImport::slotUpdatePreview() } else { // 16 bits - Q_UINT32 startOfImagedata = 0; - QSize sz = determineSize(startOfImagedata); + TQ_UINT32 startOfImagedata = 0; + TQSize sz = determineSize(startOfImagedata); kdDebug(41008) << "Total bytes: " << m_data->size() << "\n start of image data: " << startOfImagedata @@ -369,26 +369,26 @@ void KisRawImport::slotUpdatePreview() while (!it.isDone()) { if (m_page->radioGray->isChecked()) { - Q_UINT16 d = (Q_INT16)*(data + pos); + TQ_UINT16 d = (TQ_INT16)*(data + pos); d = ntohs(d); memcpy(it.rawData(), &d, 2); pos += 2; } else { // Red - Q_UINT16 d = (Q_INT16)*(data + pos); + TQ_UINT16 d = (TQ_INT16)*(data + pos); d = ntohs(d); memcpy(it.rawData() + 4, &d, 2); // Green pos += 2; - d = (Q_INT16)*(data + pos ); + d = (TQ_INT16)*(data + pos ); d = ntohs(d); memcpy(it.rawData() + 2, &d, 2); // Blue pos += 2; - d = (Q_INT16)*(data + pos ); + d = (TQ_INT16)*(data + pos ); d = ntohs(d); memcpy(it.rawData(), &d, 2); @@ -399,31 +399,31 @@ void KisRawImport::slotUpdatePreview() } } - img = dev->convertToQImage(m_monitorProfile); + img = dev->convertToTQImage(m_monitorProfile); } m_page->lblPreview->setImage(img); - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); } -void KisRawImport::getImageData( QStringList arguments ) +void KisRawImport::getImageData( TQStringList arguments ) { // delete m_process; delete m_data; kdDebug(41008) << "getImageData " << arguments.join(" ") << "\n"; KProcess process (this); - m_data = new QByteArray(0); + m_data = new TQByteArray(0); - for (QStringList::iterator it = arguments.begin(); it != arguments.end(); ++it) { + for (TQStringList::iterator it = arguments.begin(); it != arguments.end(); ++it) { process << *it; } process.setUseShell(true); - connect(&process, SIGNAL(receivedStdout(KProcess *, char *, int)), this, SLOT(slotReceivedStdout(KProcess *, char *, int))); - connect(&process, SIGNAL(receivedStderr(KProcess *, char *, int)), this, SLOT(slotReceivedStderr(KProcess *, char *, int))); - connect(&process, SIGNAL(processExited(KProcess *)), this, SLOT(slotProcessDone())); + connect(&process, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), this, TQT_SLOT(slotReceivedStdout(KProcess *, char *, int))); + connect(&process, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), this, TQT_SLOT(slotReceivedStderr(KProcess *, char *, int))); + connect(&process, TQT_SIGNAL(processExited(KProcess *)), this, TQT_SLOT(slotProcessDone())); kdDebug(41008) << "Starting process\n"; @@ -433,7 +433,7 @@ void KisRawImport::getImageData( QStringList arguments ) } while (process.isRunning()) { //kdDebug(41008) << "Waiting...\n"; - qApp->eventLoop()->processEvents(QEventLoop::ExcludeUserInput); + tqApp->eventLoop()->processEvents(TQEventLoop::ExcludeUserInput); //process.wait(2); } @@ -456,25 +456,25 @@ void KisRawImport::slotProcessDone() void KisRawImport::slotReceivedStdout(KProcess *, char *buffer, int buflen) { //kdDebug(41008) << "stdout received " << buflen << " bytes on stdout.\n"; - //kdDebug(41008) << QString::fromAscii(buffer, buflen) << "\n"; + //kdDebug(41008) << TQString::fromAscii(buffer, buflen) << "\n"; int oldSize = m_data->size(); - m_data->resize(oldSize + buflen, QGArray::SpeedOptim); + m_data->resize(oldSize + buflen, TQGArray::SpeedOptim); memcpy(m_data->data() + oldSize, buffer, buflen); } void KisRawImport::slotReceivedStderr(KProcess *, char *buffer, int buflen) { - QByteArray b(buflen); + TQByteArray b(buflen); memcpy(b.data(), buffer, buflen); - kdDebug(41008) << QString(b) << "\n"; - KMessageBox::error(0, i18n("Error: Dcraw cannot load this image. Message: ") + QString(b)); + kdDebug(41008) << TQString(b) << "\n"; + KMessageBox::error(0, i18n("Error: Dcraw cannot load this image. Message: ") + TQString(b)); m_err = true; } -QStringList KisRawImport::createArgumentList(bool forPreview) +TQStringList KisRawImport::createArgumentList(bool forPreview) { - QStringList args; + TQStringList args; args.append("dcraw"); // XXX: Create a kritadcraw so we can count on it being available @@ -518,19 +518,19 @@ QStringList KisRawImport::createArgumentList(bool forPreview) } if (m_page->chkBrightness->isChecked()) { - args.append("-b " + QString::number(m_page->dblBrightness->value())); + args.append("-b " + TQString::number(m_page->dblBrightness->value())); } if (m_page->chkBlackpoint->isChecked()) { - args.append("-k " + QString::number(m_page->dblBlackpoint->value())); + args.append("-k " + TQString::number(m_page->dblBlackpoint->value())); } if (m_page->chkRed->isChecked()) { - args.append("-r " + QString::number(m_page->dblRed->value())); + args.append("-r " + TQString::number(m_page->dblRed->value())); } if (m_page->chkBlue->isChecked()) { - args.append("-l " + QString::number(m_page->dblBlue->value())); + args.append("-l " + TQString::number(m_page->dblBlue->value())); } @@ -550,23 +550,23 @@ QStringList KisRawImport::createArgumentList(bool forPreview) return args; } -QSize KisRawImport::determineSize(Q_UINT32& startOfImageData) +TQSize KisRawImport::determineSize(TQ_UINT32& startOfImageData) { if (m_data->isNull() || m_data->size() < 2048) { startOfImageData = 0; - return QSize(0,0); + return TQSize(0,0); } - QString magick = QString::fromAscii(m_data->data(), 2); + TQString magick = TQString::fromAscii(m_data->data(), 2); if (magick != "P6") { kdDebug(41008) << " Bad magick! " << magick << "\n"; startOfImageData = 0; - return QSize(0,0); + return TQSize(0,0); } // Find the third newline that marks the header end in a dcraw generated ppm. - Q_UINT32 i = 0; - Q_UINT32 counter = 0; + TQ_UINT32 i = 0; + TQ_UINT32 counter = 0; while (true) { if (counter == 3) break; @@ -576,14 +576,14 @@ QSize KisRawImport::determineSize(Q_UINT32& startOfImageData) ++i; } - QString size = QStringList::split("\n", QString::fromAscii(m_data->data(), i))[1]; - kdDebug(41008) << "Header: " << QString::fromAscii(m_data->data(), i) << "\n"; - QStringList sizelist = QStringList::split(" ", size); - Q_INT32 w = sizelist[0].toInt(); - Q_INT32 h = sizelist[1].toInt(); + TQString size = TQStringList::split("\n", TQString::fromAscii(m_data->data(), i))[1]; + kdDebug(41008) << "Header: " << TQString::fromAscii(m_data->data(), i) << "\n"; + TQStringList sizelist = TQStringList::split(" ", size); + TQ_INT32 w = sizelist[0].toInt(); + TQ_INT32 h = sizelist[1].toInt(); startOfImageData = i; - return QSize(w, h); + return TQSize(w, h); } @@ -602,8 +602,8 @@ void KisRawImport::slotFillCmbProfiles() KisColorSpaceFactory * csf = KisMetaRegistry::instance()->csRegistry() -> get(s); m_page -> cmbProfile -> clear(); - QValueVector profileList = KisMetaRegistry::instance()->csRegistry()->profilesFor( csf ); - QValueVector ::iterator it; + TQValueVector profileList = KisMetaRegistry::instance()->csRegistry()->profilesFor( csf ); + TQValueVector ::iterator it; for ( it = profileList.begin(); it != profileList.end(); ++it ) { m_page -> cmbProfile -> insertItem((*it) -> productName()); } diff --git a/filters/krita/raw/kis_raw_import.h b/filters/krita/raw/kis_raw_import.h index cff059f7..35adb6e1 100644 --- a/filters/krita/raw/kis_raw_import.h +++ b/filters/krita/raw/kis_raw_import.h @@ -26,17 +26,18 @@ class KProcess; class KDialogBase; class WdgRawImport; class KisProfile; -class QProgressDialog; +class TQProgressDialog; class KisRawImport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - KisRawImport(KoFilter *parent, const char *name, const QStringList&); + KisRawImport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~KisRawImport(); public: - virtual KoFilter::ConversionStatus convert(const QCString& from, const QCString& to); + virtual KoFilter::ConversiontqStatus convert(const TQCString& from, const TQCString& to); private slots: @@ -50,19 +51,19 @@ private slots: private: - QStringList createArgumentList(bool forPreview = false); - QSize determineSize(Q_UINT32& startOfImageData); - void getImageData(QStringList arguments); + TQStringList createArgumentList(bool forPreview = false); + TQSize determineSize(TQ_UINT32& startOfImageData); + void getImageData(TQStringList arguments); KisProfile * profile(); KisID getColorSpace(); private: - QByteArray * m_data; + TQByteArray * m_data; KDialogBase * m_dialog; WdgRawImport * m_page; KisProfile * m_monitorProfile; KProcess * m_process; - QProgressDialog* m_progress; + TQProgressDialog* m_progress; bool m_err; // Set to true when slotReceivedStderr is called }; diff --git a/filters/krita/raw/wdgrawimport.ui b/filters/krita/raw/wdgrawimport.ui index af2163ad..d6080a01 100644 --- a/filters/krita/raw/wdgrawimport.ui +++ b/filters/krita/raw/wdgrawimport.ui @@ -1,6 +1,6 @@ WdgRawImport - + WdgRawImport @@ -16,7 +16,7 @@ unnamed - + bnPreview @@ -36,22 +36,22 @@ 0 - + 200 150 - + - layout2 + tqlayout2 unnamed - + grpColorSettings @@ -62,7 +62,7 @@ unnamed - + chkBlackpoint @@ -70,7 +70,7 @@ Blackpoint: - + chkRed @@ -89,7 +89,7 @@ 1 - + chkBlue @@ -127,7 +127,7 @@ Brightness. 1.0 is default - + grpWhiteBalance @@ -141,7 +141,7 @@ unnamed - + radioFixed @@ -152,7 +152,7 @@ true - + radioAutomatic @@ -169,7 +169,7 @@ Automatic color balance. The default is to use a fixed color balance based on a white card photographed in sunlight. - + radioCamera @@ -186,7 +186,7 @@ - + chkBrightness @@ -196,7 +196,7 @@ - + grpColorSpace @@ -210,7 +210,7 @@ unnamed - + radioGray @@ -218,7 +218,7 @@ &Document mode - + radioRGB @@ -231,7 +231,7 @@ - + grpChannelDepth @@ -251,7 +251,7 @@ unnamed - + radio16 @@ -265,7 +265,7 @@ true - + radio8 @@ -281,7 +281,7 @@ - + chkFourColorRGB @@ -304,7 +304,7 @@ Expanding - + 500 20 @@ -321,22 +321,22 @@ Expanding - + 20 120 - + - layout4 + tqlayout4 unnamed - + chkClip @@ -353,15 +353,15 @@ By default, dcraw clips all colors to prevent pink hues in the highlights. Combine this option with -b 0.25 to leave the image data completely unclipped. - + - layout10 + tqlayout10 unnamed - + chkProfile @@ -390,7 +390,7 @@ - + chkCameraColors @@ -408,7 +408,7 @@ Expanding - + 41 20 @@ -492,5 +492,5 @@ bnPreview radioAutomatic - + diff --git a/filters/krita/tiff/kis_dlg_options_tiff.cpp b/filters/krita/tiff/kis_dlg_options_tiff.cpp index 6b9f3027..345f7e7e 100644 --- a/filters/krita/tiff/kis_dlg_options_tiff.cpp +++ b/filters/krita/tiff/kis_dlg_options_tiff.cpp @@ -19,10 +19,10 @@ #include "kis_dlg_options_tiff.h" -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -30,16 +30,16 @@ #include "kis_wdg_options_tiff.h" -KisDlgOptionsTIFF::KisDlgOptionsTIFF(QWidget *parent, const char *name) - : KDialogBase(parent, name, false, i18n("TIFF Export Options"), KDialogBase::Ok | KDialogBase::Cancel) +KisDlgOptionsTIFF::KisDlgOptionsTIFF(TQWidget *tqparent, const char *name) + : KDialogBase(tqparent, name, false, i18n("TIFF Export Options"), KDialogBase::Ok | KDialogBase::Cancel) { optionswdg = new KisWdgOptionsTIFF(this); activated(0); - connect(optionswdg->kComboBoxCompressionType, SIGNAL(activated ( int )), this, SLOT(activated ( int ) )); - connect(optionswdg->flatten, SIGNAL(toggled(bool)), this, SLOT(flattenToggled( bool) ) ); + connect(optionswdg->kComboBoxCompressionType, TQT_SIGNAL(activated ( int )), this, TQT_SLOT(activated ( int ) )); + connect(optionswdg->flatten, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(flattenToggled( bool) ) ); setMainWidget(optionswdg); kapp->restoreOverrideCursor(); - setSizePolicy(QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum) ); + tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Minimum) ); } KisDlgOptionsTIFF::~KisDlgOptionsTIFF() diff --git a/filters/krita/tiff/kis_dlg_options_tiff.h b/filters/krita/tiff/kis_dlg_options_tiff.h index a81bd65f..5fd1e48e 100644 --- a/filters/krita/tiff/kis_dlg_options_tiff.h +++ b/filters/krita/tiff/kis_dlg_options_tiff.h @@ -30,8 +30,9 @@ class KisWdgOptionsTIFF; class KisDlgOptionsTIFF : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - KisDlgOptionsTIFF(QWidget *parent=0, const char *name=0); + KisDlgOptionsTIFF(TQWidget *tqparent=0, const char *name=0); ~KisDlgOptionsTIFF(); public slots: void activated ( int index ); diff --git a/filters/krita/tiff/kis_tiff_converter.cc b/filters/krita/tiff/kis_tiff_converter.cc index 955ab9ef..229111ea 100644 --- a/filters/krita/tiff/kis_tiff_converter.cc +++ b/filters/krita/tiff/kis_tiff_converter.cc @@ -24,7 +24,7 @@ #include #include LCMS_HEADER -#include +#include #include #include @@ -49,7 +49,7 @@ namespace { - QString getColorSpaceForColorType(uint16 color_type, uint16 color_nb_bits, TIFF *image, uint16 &nbchannels, uint16 &extrasamplescount, uint8 &destDepth, uint16 sampletype) { + TQString getColorSpaceForColorType(uint16 color_type, uint16 color_nb_bits, TIFF *image, uint16 &nbchannels, uint16 &extrasamplescount, uint8 &destDepth, uint16 sampletype) { if(color_type == PHOTOMETRIC_MINISWHITE || color_type == PHOTOMETRIC_MINISBLACK) { if(nbchannels == 0) nbchannels = 1; @@ -171,7 +171,7 @@ KisImageBuilder_Result KisTIFFConverter::decode(const KURL& uri) kdDebug(41008) << "Start decoding TIFF File" << endl; // Opent the TIFF file TIFF *image = 0; - if((image = TIFFOpen(QFile::encodeName(uri.path()), "r")) == NULL){ + if((image = TIFFOpen(TQFile::encodeName(uri.path()), "r")) == NULL){ kdDebug(41008) << "Could not open the file, either it doesn't exist, either it is not a TIFF : " << uri.path() << endl; return (KisImageBuilder_RESULT_BAD_FETCH); @@ -231,7 +231,7 @@ KisImageBuilder_Result KisTIFFConverter::readTIFFDirectory( TIFF* image) color_type = PHOTOMETRIC_MINISWHITE; } uint8 dstDepth; - QString csName = getColorSpaceForColorType(color_type, depth, image, nbchannels, extrasamplescount, dstDepth,sampletype); + TQString csName = getColorSpaceForColorType(color_type, depth, image, nbchannels, extrasamplescount, dstDepth,sampletype); if(csName.isEmpty()) { kdDebug(41008) << "Image has an unsupported colorspace : " << color_type << " for this depth : "<< depth << endl; TIFFClose(image); @@ -247,7 +247,7 @@ KisImageBuilder_Result KisTIFFConverter::readTIFFDirectory( TIFF* image) if (TIFFGetField(image, TIFFTAG_ICCPROFILE, &EmbedLen, &EmbedBuffer)) { kdDebug(41008) << "Profile found" << endl; - QByteArray rawdata; + TQByteArray rawdata; rawdata.resize(EmbedLen); memcpy(rawdata.data(), EmbedBuffer, EmbedLen); profile = new KisProfile(rawdata); @@ -340,21 +340,21 @@ KisImageBuilder_Result KisTIFFConverter::readTIFFDirectory( TIFF* image) m_img -> addAnnotation( profile->annotation() ); } } else { - if( m_img->width() < (Q_INT32)width || m_img->height() < (Q_INT32)height) + if( m_img->width() < (TQ_INT32)width || m_img->height() < (TQ_INT32)height) { - Q_UINT32 newwidth = (m_img->width() < (Q_INT32)width) ? width : m_img->width(); - Q_UINT32 newheight = (m_img->height() < (Q_INT32)height) ? height : m_img->height(); + TQ_UINT32 newwidth = (m_img->width() < (TQ_INT32)width) ? width : m_img->width(); + TQ_UINT32 newheight = (m_img->height() < (TQ_INT32)height) ? height : m_img->height(); m_img->resize(newwidth, newheight, false); } } - KisPaintLayer* layer = new KisPaintLayer(m_img, m_img -> nextLayerName(), Q_UINT8_MAX); + KisPaintLayer* layer = new KisPaintLayer(m_img, m_img -> nextLayerName(), TQ_UINT8_MAX); tdata_t buf = 0; tdata_t* ps_buf = 0; // used only for planar configuration seperated TIFFStreamBase* tiffstream; KisTIFFReaderBase* tiffReader = 0; - Q_UINT8 poses[5]; + TQ_UINT8 poses[5]; KisTIFFPostProcessor* postprocessor = 0; // Configure poses @@ -509,7 +509,7 @@ KisImageBuilder_Result KisTIFFConverter::readTIFFDirectory( TIFF* image) uint32 rowsPerStrip; TIFFGetFieldDefaulted(image, TIFFTAG_ROWSPERSTRIP, &rowsPerStrip); kdDebug() << rowsPerStrip << " " << height << endl; - rowsPerStrip = QMIN(rowsPerStrip, height); // when TIFFNumberOfStrips(image) == 1 it might happen that rowsPerStrip is incorrectly set + rowsPerStrip = TQMIN(rowsPerStrip, height); // when TIFFNumberOfStrips(image) == 1 it might happen that rowsPerStrip is incorrectly set if(planarconfig == PLANARCONFIG_CONTIG) { buf = _TIFFmalloc(stripsize); @@ -584,15 +584,15 @@ KisImageBuilder_Result KisTIFFConverter::buildImage(const KURL& uri) if (uri.isEmpty()) return KisImageBuilder_RESULT_NO_URI; - if (!KIO::NetAccess::exists(uri, false, qApp -> mainWidget())) { + if (!KIO::NetAccess::exists(uri, false, tqApp -> mainWidget())) { return KisImageBuilder_RESULT_NOT_EXIST; } // We're not set up to handle asynchronous loading at the moment. KisImageBuilder_Result result = KisImageBuilder_RESULT_FAILURE; - QString tmpFile; + TQString tmpFile; - if (KIO::NetAccess::download(uri, tmpFile, qApp -> mainWidget())) { + if (KIO::NetAccess::download(uri, tmpFile, tqApp -> mainWidget())) { KURL uriTF; uriTF.setPath( tmpFile ); result = decode(uriTF); @@ -623,7 +623,7 @@ KisImageBuilder_Result KisTIFFConverter::buildFile(const KURL& uri, KisImageSP i // Open file for writing TIFF *image; - if((image = TIFFOpen(QFile::encodeName(uri.path()), "w")) == NULL){ + if((image = TIFFOpen(TQFile::encodeName(uri.path()), "w")) == NULL){ kdDebug(41008) << "Could not open the file for writting " << uri.path() << endl; TIFFClose(image); return (KisImageBuilder_RESULT_FAILURE); @@ -632,18 +632,18 @@ KisImageBuilder_Result KisTIFFConverter::buildFile(const KURL& uri, KisImageSP i // Set the document informations KoDocumentInfo * info = m_doc->documentInfo(); KoDocumentInfoAbout * aboutPage = static_cast(info->page( "about" )); - QString title = aboutPage->title(); + TQString title = aboutPage->title(); if(!title.isEmpty()) { TIFFSetField(image, TIFFTAG_DOCUMENTNAME, title.ascii()); } - QString abstract = aboutPage->abstract(); + TQString abstract = aboutPage->abstract(); if(!abstract.isEmpty()) { TIFFSetField(image, TIFFTAG_IMAGEDESCRIPTION, abstract.ascii()); } KoDocumentInfoAuthor * authorPage = static_cast(info->page( "author" )); - QString author = authorPage->fullName(); + TQString author = authorPage->fullName(); if(!author.isEmpty()) { TIFFSetField(image, TIFFTAG_ARTIST, author.ascii()); diff --git a/filters/krita/tiff/kis_tiff_converter.h b/filters/krita/tiff/kis_tiff_converter.h index fbda4abd..7d7176b7 100644 --- a/filters/krita/tiff/kis_tiff_converter.h +++ b/filters/krita/tiff/kis_tiff_converter.h @@ -23,7 +23,7 @@ #include #include -#include +#include #include @@ -56,18 +56,19 @@ enum KisImageBuilder_Result { }; struct KisTIFFOptions { - Q_UINT16 compressionType; - Q_UINT16 predictor; + TQ_UINT16 compressionType; + TQ_UINT16 predictor; bool alpha; bool flatten; - Q_UINT16 jpegQuality; - Q_UINT16 deflateCompress; - Q_UINT16 faxMode; - Q_UINT16 pixarLogCompress; + TQ_UINT16 jpegQuality; + TQ_UINT16 deflateCompress; + TQ_UINT16 faxMode; + TQ_UINT16 pixarLogCompress; }; class KisTIFFConverter : public KisProgressSubject { Q_OBJECT + TQ_OBJECT public: KisTIFFConverter(KisDoc *doc, KisUndoAdapter *adapter); virtual ~KisTIFFConverter(); diff --git a/filters/krita/tiff/kis_tiff_export.cc b/filters/krita/tiff/kis_tiff_export.cc index ee715c6a..d2b39977 100644 --- a/filters/krita/tiff/kis_tiff_export.cc +++ b/filters/krita/tiff/kis_tiff_export.cc @@ -19,8 +19,8 @@ #include "kis_tiff_export.h" -#include -#include +#include +#include #include #include @@ -42,7 +42,7 @@ typedef KGenericFactory KisTIFFExportFactory; K_EXPORT_COMPONENT_FACTORY(libkritatiffexport, KisTIFFExportFactory("kofficefilters")) -KisTIFFExport::KisTIFFExport(KoFilter *, const char *, const QStringList&) : KoFilter() +KisTIFFExport::KisTIFFExport(KoFilter *, const char *, const TQStringList&) : KoFilter() { } @@ -50,7 +50,7 @@ KisTIFFExport::~KisTIFFExport() { } -KoFilter::ConversionStatus KisTIFFExport::convert(const QCString& from, const QCString& to) +KoFilter::ConversiontqStatus KisTIFFExport::convert(const TQCString& from, const TQCString& to) { kdDebug(41008) << "Tiff export! From: " << from << ", To: " << to << "\n"; @@ -71,7 +71,7 @@ KoFilter::ConversionStatus KisTIFFExport::convert(const QCString& from, const QC kdb->optionswdg->kComboBoxPredictor->removeItem(2); } - if(kdb->exec() == QDialog::Rejected) + if(kdb->exec() == TQDialog::Rejected) { return KoFilter::OK; // FIXME Cancel doesn't exist :( } @@ -84,7 +84,7 @@ KoFilter::ConversionStatus KisTIFFExport::convert(const QCString& from, const QC } delete kdb; - QString filename = m_chain->outputFile(); + TQString filename = m_chain->outputFile(); if (!output) return KoFilter::CreationError; diff --git a/filters/krita/tiff/kis_tiff_export.h b/filters/krita/tiff/kis_tiff_export.h index 586c2390..113747c7 100644 --- a/filters/krita/tiff/kis_tiff_export.h +++ b/filters/krita/tiff/kis_tiff_export.h @@ -24,11 +24,12 @@ class KisTIFFExport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - KisTIFFExport(KoFilter *parent, const char *name, const QStringList&); + KisTIFFExport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~KisTIFFExport(); public: - virtual KoFilter::ConversionStatus convert(const QCString& from, const QCString& to); + virtual KoFilter::ConversiontqStatus convert(const TQCString& from, const TQCString& to); }; #endif diff --git a/filters/krita/tiff/kis_tiff_import.cc b/filters/krita/tiff/kis_tiff_import.cc index 155cf67d..7c157846 100644 --- a/filters/krita/tiff/kis_tiff_import.cc +++ b/filters/krita/tiff/kis_tiff_import.cc @@ -33,7 +33,7 @@ typedef KGenericFactory TIFFImportFactory; K_EXPORT_COMPONENT_FACTORY(libkritatiffimport, TIFFImportFactory("kofficefilters")) -KisTIFFImport::KisTIFFImport(KoFilter *, const char *, const QStringList&) : KoFilter() +KisTIFFImport::KisTIFFImport(KoFilter *, const char *, const TQStringList&) : KoFilter() { } @@ -41,7 +41,7 @@ KisTIFFImport::~KisTIFFImport() { } -KoFilter::ConversionStatus KisTIFFImport::convert(const QCString&, const QCString& to) +KoFilter::ConversiontqStatus KisTIFFImport::convert(const TQCString&, const TQCString& to) { kdDebug(41008) << "Importing using TIFFImport!\n"; @@ -51,7 +51,7 @@ KoFilter::ConversionStatus KisTIFFImport::convert(const QCString&, const QCStrin KisDoc * doc = dynamic_cast(m_chain -> outputDocument()); KisView * view = static_cast(doc -> views().getFirst()); - QString filename = m_chain -> inputFile(); + TQString filename = m_chain -> inputFile(); if (!doc) return KoFilter::CreationError; diff --git a/filters/krita/tiff/kis_tiff_import.h b/filters/krita/tiff/kis_tiff_import.h index 75953edc..9fef7755 100644 --- a/filters/krita/tiff/kis_tiff_import.h +++ b/filters/krita/tiff/kis_tiff_import.h @@ -23,11 +23,12 @@ class KisTIFFImport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - KisTIFFImport(KoFilter *parent, const char *name, const QStringList&); + KisTIFFImport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~KisTIFFImport(); public: - virtual KoFilter::ConversionStatus convert(const QCString& from, const QCString& to); + virtual KoFilter::ConversiontqStatus convert(const TQCString& from, const TQCString& to); }; #endif diff --git a/filters/krita/tiff/kis_tiff_reader.cc b/filters/krita/tiff/kis_tiff_reader.cc index bec7f184..f2eabd87 100644 --- a/filters/krita/tiff/kis_tiff_reader.cc +++ b/filters/krita/tiff/kis_tiff_reader.cc @@ -26,25 +26,25 @@ #include "kis_tiff_stream.h" - uint KisTIFFReaderTarget8bit::copyDataToChannels( Q_UINT32 x, Q_UINT32 y, Q_UINT32 dataWidth, TIFFStreamBase* tiffstream) + uint KisTIFFReaderTarget8bit::copyDataToChannels( TQ_UINT32 x, TQ_UINT32 y, TQ_UINT32 dataWidth, TIFFStreamBase* tiffstream) { KisHLineIterator it = paintDevice() -> createHLineIterator(x, y, dataWidth, true); - double coeff = Q_UINT8_MAX / (double)( pow(2, sourceDepth() ) - 1 ); + double coeff = TQ_UINT8_MAX / (double)( pow(2, sourceDepth() ) - 1 ); // kdDebug(41008) << " depth expension coefficient : " << coeff << endl; while (!it.isDone()) { - Q_UINT8 *d = it.rawData(); - Q_UINT8 i; + TQ_UINT8 *d = it.rawData(); + TQ_UINT8 i; for(i = 0; i < nbColorsSamples() ; i++) { - d[poses()[i]] = (Q_UINT8)( tiffstream->nextValue() * coeff ); + d[poses()[i]] = (TQ_UINT8)( tiffstream->nextValue() * coeff ); } postProcessor()->postProcess8bit( d); if(transform()) cmsDoTransform(transform(), d, d, 1); - d[poses()[i]] = Q_UINT8_MAX; + d[poses()[i]] = TQ_UINT8_MAX; for(int k = 0; k < nbExtraSamples(); k++) { if(k == alphaPos()) - d[poses()[i]] = (Q_UINT32) ( tiffstream->nextValue() * coeff ); + d[poses()[i]] = (TQ_UINT32) ( tiffstream->nextValue() * coeff ); else tiffstream->nextValue(); } @@ -52,25 +52,25 @@ } return 1; } - uint KisTIFFReaderTarget16bit::copyDataToChannels( Q_UINT32 x, Q_UINT32 y, Q_UINT32 dataWidth, TIFFStreamBase* tiffstream) + uint KisTIFFReaderTarget16bit::copyDataToChannels( TQ_UINT32 x, TQ_UINT32 y, TQ_UINT32 dataWidth, TIFFStreamBase* tiffstream) { KisHLineIterator it = paintDevice() -> createHLineIterator(x, y, dataWidth, true); - double coeff = Q_UINT16_MAX / (double)( pow(2, sourceDepth() ) - 1 ); + double coeff = TQ_UINT16_MAX / (double)( pow(2, sourceDepth() ) - 1 ); // kdDebug(41008) << " depth expension coefficient : " << coeff << endl; while (!it.isDone()) { - Q_UINT16 *d = reinterpret_cast(it.rawData()); - Q_UINT8 i; + TQ_UINT16 *d = reinterpret_cast(it.rawData()); + TQ_UINT8 i; for(i = 0; i < nbColorsSamples(); i++) { - d[poses()[i]] = (Q_UINT16)( tiffstream->nextValue() * coeff ); + d[poses()[i]] = (TQ_UINT16)( tiffstream->nextValue() * coeff ); } postProcessor()->postProcess16bit( d); if(transform()) cmsDoTransform(transform(), d, d, 1); - d[poses()[i]] = Q_UINT16_MAX; + d[poses()[i]] = TQ_UINT16_MAX; for(int k = 0; k < nbExtraSamples(); k++) { if(k == alphaPos()) - d[poses()[i]] = (Q_UINT16) ( tiffstream->nextValue() * coeff ); + d[poses()[i]] = (TQ_UINT16) ( tiffstream->nextValue() * coeff ); else tiffstream->nextValue(); } @@ -79,25 +79,25 @@ return 1; } - uint KisTIFFReaderTarget32bit::copyDataToChannels( Q_UINT32 x, Q_UINT32 y, Q_UINT32 dataWidth, TIFFStreamBase* tiffstream) + uint KisTIFFReaderTarget32bit::copyDataToChannels( TQ_UINT32 x, TQ_UINT32 y, TQ_UINT32 dataWidth, TIFFStreamBase* tiffstream) { KisHLineIterator it = paintDevice() -> createHLineIterator(x, y, dataWidth, true); - double coeff = Q_UINT32_MAX / (double)( pow(2, sourceDepth() ) - 1 ); + double coeff = TQ_UINT32_MAX / (double)( pow(2, sourceDepth() ) - 1 ); // kdDebug(41008) << " depth expension coefficient : " << coeff << endl; while (!it.isDone()) { - Q_UINT32 *d = reinterpret_cast(it.rawData()); - Q_UINT8 i; + TQ_UINT32 *d = reinterpret_cast(it.rawData()); + TQ_UINT8 i; for(i = 0; i < nbColorsSamples(); i++) { - d[poses()[i]] = (Q_UINT32)( tiffstream->nextValue() * coeff ); + d[poses()[i]] = (TQ_UINT32)( tiffstream->nextValue() * coeff ); } postProcessor()->postProcess32bit( d); if(transform()) cmsDoTransform(transform(), d, d, 1); - d[poses()[i]] = Q_UINT32_MAX; + d[poses()[i]] = TQ_UINT32_MAX; for(int k = 0; k < nbExtraSamples(); k++) { if(k == alphaPos()) - d[poses()[i]] = (Q_UINT32) ( tiffstream->nextValue() * coeff ); + d[poses()[i]] = (TQ_UINT32) ( tiffstream->nextValue() * coeff ); else tiffstream->nextValue(); } @@ -105,16 +105,16 @@ } return 1; } - uint KisTIFFReaderFromPalette::copyDataToChannels(Q_UINT32 x, Q_UINT32 y, Q_UINT32 dataWidth, TIFFStreamBase* tiffstream) + uint KisTIFFReaderFromPalette::copyDataToChannels(TQ_UINT32 x, TQ_UINT32 y, TQ_UINT32 dataWidth, TIFFStreamBase* tiffstream) { KisHLineIterator it = paintDevice() -> createHLineIterator(x, y, dataWidth, true); while (!it.isDone()) { - Q_UINT16* d = reinterpret_cast(it.rawData()); + TQ_UINT16* d = reinterpret_cast(it.rawData()); uint32 index = tiffstream->nextValue(); d[2] = m_red[index]; d[1] = m_green[index]; d[0] = m_blue[index]; - d[3] = Q_UINT16_MAX; + d[3] = TQ_UINT16_MAX; ++it; } return 1; diff --git a/filters/krita/tiff/kis_tiff_reader.h b/filters/krita/tiff/kis_tiff_reader.h index d107d21e..2ab573dd 100644 --- a/filters/krita/tiff/kis_tiff_reader.h +++ b/filters/krita/tiff/kis_tiff_reader.h @@ -26,7 +26,7 @@ #include #include -// #include +// #include // #include // #include @@ -39,7 +39,7 @@ #include #include -#define Q_UINT32_MAX 4294967295u +#define TQ_UINT32_MAX 4294967295u class TIFFStreamBase; @@ -47,9 +47,9 @@ class KisTIFFPostProcessor { public: KisTIFFPostProcessor(uint8 nbcolorssamples) : m_nbcolorssamples(nbcolorssamples) { } public: - virtual void postProcess8bit( Q_UINT8* ) { }; - virtual void postProcess16bit( Q_UINT16* ) { }; - virtual void postProcess32bit( Q_UINT32* ) { }; + virtual void postProcess8bit( TQ_UINT8* ) { }; + virtual void postProcess16bit( TQ_UINT16* ) { }; + virtual void postProcess32bit( TQ_UINT32* ) { }; protected: inline uint8 nbColorsSamples() { return m_nbcolorssamples; } private: @@ -60,27 +60,27 @@ class KisTIFFPostProcessorInvert : public KisTIFFPostProcessor { public: KisTIFFPostProcessorInvert(uint8 nbcolorssamples) : KisTIFFPostProcessor(nbcolorssamples) {} public: - virtual void postProcess8bit( Q_UINT8* data ) + virtual void postProcess8bit( TQ_UINT8* data ) { for(int i = 0; i < nbColorsSamples(); i++) { - data[i] = Q_UINT8_MAX - data[i]; + data[i] = TQ_UINT8_MAX - data[i]; } } - virtual void postProcess16bit( Q_UINT16* data ) + virtual void postProcess16bit( TQ_UINT16* data ) { - Q_UINT16* d = (Q_UINT16*) data; + TQ_UINT16* d = (TQ_UINT16*) data; for(int i = 0; i < nbColorsSamples(); i++) { - d[i] = Q_UINT16_MAX - d[i]; + d[i] = TQ_UINT16_MAX - d[i]; } } - virtual void postProcess32bit( Q_UINT32* data ) + virtual void postProcess32bit( TQ_UINT32* data ) { - Q_UINT32* d = (Q_UINT32*) data; + TQ_UINT32* d = (TQ_UINT32*) data; for(int i = 0; i < nbColorsSamples(); i++) { - d[i] = Q_UINT32_MAX - d[i]; + d[i] = TQ_UINT32_MAX - d[i]; } } }; @@ -89,30 +89,30 @@ class KisTIFFPostProcessorICCLABtoCIELAB : public KisTIFFPostProcessor { public: KisTIFFPostProcessorICCLABtoCIELAB(uint8 nbcolorssamples) : KisTIFFPostProcessor(nbcolorssamples) {} public: - void postProcess8bit(Q_UINT8* data) + void postProcess8bit(TQ_UINT8* data) { - Q_INT8* ds = (Q_INT8*) data; + TQ_INT8* ds = (TQ_INT8*) data; for(int i = 1; i < nbColorsSamples(); i++) { - ds[i] = data[i] - Q_UINT8_MAX/2; + ds[i] = data[i] - TQ_UINT8_MAX/2; } } - void postProcess16bit(Q_UINT16* data) + void postProcess16bit(TQ_UINT16* data) { - Q_UINT16* d = (Q_UINT16*) data; - Q_INT16* ds = (Q_INT16*) data; + TQ_UINT16* d = (TQ_UINT16*) data; + TQ_INT16* ds = (TQ_INT16*) data; for(int i = 1; i < nbColorsSamples(); i++) { - ds[i] = d[i] - Q_UINT16_MAX /2; + ds[i] = d[i] - TQ_UINT16_MAX /2; } } - void postProcess32bit(Q_UINT32* data) + void postProcess32bit(TQ_UINT32* data) { - Q_UINT32* d = (Q_UINT32*) data; - Q_INT32* ds = (Q_INT32*) data; + TQ_UINT32* d = (TQ_UINT32*) data; + TQ_INT32* ds = (TQ_INT32*) data; for(int i = 1; i < nbColorsSamples(); i++) { - ds[i] = d[i] - Q_UINT32_MAX /2; + ds[i] = d[i] - TQ_UINT32_MAX /2; } } }; @@ -120,7 +120,7 @@ class KisTIFFPostProcessorICCLABtoCIELAB : public KisTIFFPostProcessor { class KisTIFFReaderBase { public: - KisTIFFReaderBase( KisPaintDeviceSP device, Q_UINT8* poses, int8 alphapos, uint8 sourceDepth, uint8 nbcolorssamples, uint8 extrasamplescount, cmsHTRANSFORM transformProfile, KisTIFFPostProcessor* postprocessor) : m_device(device), m_alphapos(alphapos), m_sourceDepth(sourceDepth), m_nbcolorssamples(nbcolorssamples), m_nbextrasamples(extrasamplescount), m_poses(poses), m_transformProfile(transformProfile), m_postprocess(postprocessor) + KisTIFFReaderBase( KisPaintDeviceSP device, TQ_UINT8* poses, int8 alphapos, uint8 sourceDepth, uint8 nbcolorssamples, uint8 extrasamplescount, cmsHTRANSFORM transformProfile, KisTIFFPostProcessor* postprocessor) : m_device(device), m_alphapos(alphapos), m_sourceDepth(sourceDepth), m_nbcolorssamples(nbcolorssamples), m_nbextrasamples(extrasamplescount), m_poses(poses), m_transformProfile(transformProfile), m_postprocess(postprocessor) { } @@ -134,71 +134,71 @@ class KisTIFFReaderBase { * * @return the number of line which were copied */ - virtual uint copyDataToChannels( Q_UINT32 x, Q_UINT32 y, Q_UINT32 dataWidth, TIFFStreamBase* tiffstream) =0; + virtual uint copyDataToChannels( TQ_UINT32 x, TQ_UINT32 y, TQ_UINT32 dataWidth, TIFFStreamBase* tiffstream) =0; /** * This function is called when all data has been read and should be used for any postprocessing. */ virtual void finalize() { }; protected: inline KisPaintDeviceSP paintDevice() { return m_device; } - inline Q_UINT8 alphaPos() { return m_alphapos; } - inline Q_UINT8 sourceDepth() { return m_sourceDepth; } - inline Q_UINT8 nbColorsSamples() { return m_nbcolorssamples; } - inline Q_UINT8 nbExtraSamples() { return m_nbextrasamples; } - inline Q_UINT8* poses() { return m_poses; } + inline TQ_UINT8 alphaPos() { return m_alphapos; } + inline TQ_UINT8 sourceDepth() { return m_sourceDepth; } + inline TQ_UINT8 nbColorsSamples() { return m_nbcolorssamples; } + inline TQ_UINT8 nbExtraSamples() { return m_nbextrasamples; } + inline TQ_UINT8* poses() { return m_poses; } inline cmsHTRANSFORM transform() { return m_transformProfile; } inline KisTIFFPostProcessor* postProcessor() { return m_postprocess; } private: KisPaintDeviceSP m_device; - Q_UINT8 m_alphapos; - Q_UINT8 m_sourceDepth; - Q_UINT8 m_nbcolorssamples; - Q_UINT8 m_nbextrasamples; - Q_UINT8* m_poses; + TQ_UINT8 m_alphapos; + TQ_UINT8 m_sourceDepth; + TQ_UINT8 m_nbcolorssamples; + TQ_UINT8 m_nbextrasamples; + TQ_UINT8* m_poses; cmsHTRANSFORM m_transformProfile; KisTIFFPostProcessor* m_postprocess; - Q_UINT32 m_tiffDataWidth; + TQ_UINT32 m_tiffDataWidth; }; class KisTIFFReaderTarget8bit : public KisTIFFReaderBase { public: - KisTIFFReaderTarget8bit( KisPaintDeviceSP device, Q_UINT8* poses, int8 alphapos, uint8 sourceDepth, uint8 nbcolorssamples, uint8 extrasamplescount, cmsHTRANSFORM transformProfile, KisTIFFPostProcessor* postprocessor) : KisTIFFReaderBase(device, poses, alphapos, sourceDepth, nbcolorssamples, extrasamplescount, transformProfile, postprocessor ) + KisTIFFReaderTarget8bit( KisPaintDeviceSP device, TQ_UINT8* poses, int8 alphapos, uint8 sourceDepth, uint8 nbcolorssamples, uint8 extrasamplescount, cmsHTRANSFORM transformProfile, KisTIFFPostProcessor* postprocessor) : KisTIFFReaderBase(device, poses, alphapos, sourceDepth, nbcolorssamples, extrasamplescount, transformProfile, postprocessor ) { } public: - virtual uint copyDataToChannels( Q_UINT32 x, Q_UINT32 y, Q_UINT32 dataWidth, TIFFStreamBase* tiffstream); + virtual uint copyDataToChannels( TQ_UINT32 x, TQ_UINT32 y, TQ_UINT32 dataWidth, TIFFStreamBase* tiffstream); }; class KisTIFFReaderTarget16bit : public KisTIFFReaderBase { public: - KisTIFFReaderTarget16bit( KisPaintDeviceSP device, Q_UINT8* poses, int8 alphapos, uint8 sourceDepth, uint8 nbcolorssamples, uint8 extrasamplescount, cmsHTRANSFORM transformProfile, KisTIFFPostProcessor* postprocessor) : KisTIFFReaderBase(device, poses, alphapos, sourceDepth, nbcolorssamples, extrasamplescount, transformProfile, postprocessor ) + KisTIFFReaderTarget16bit( KisPaintDeviceSP device, TQ_UINT8* poses, int8 alphapos, uint8 sourceDepth, uint8 nbcolorssamples, uint8 extrasamplescount, cmsHTRANSFORM transformProfile, KisTIFFPostProcessor* postprocessor) : KisTIFFReaderBase(device, poses, alphapos, sourceDepth, nbcolorssamples, extrasamplescount, transformProfile, postprocessor ) { } public: - virtual uint copyDataToChannels( Q_UINT32 x, Q_UINT32 y, Q_UINT32 dataWidth, TIFFStreamBase* tiffstream) ; + virtual uint copyDataToChannels( TQ_UINT32 x, TQ_UINT32 y, TQ_UINT32 dataWidth, TIFFStreamBase* tiffstream) ; }; class KisTIFFReaderTarget32bit : public KisTIFFReaderBase { public: - KisTIFFReaderTarget32bit( KisPaintDeviceSP device, Q_UINT8* poses, int8 alphapos, uint8 sourceDepth, uint8 nbcolorssamples, uint8 extrasamplescount, cmsHTRANSFORM transformProfile, KisTIFFPostProcessor* postprocessor) : KisTIFFReaderBase(device, poses, alphapos, sourceDepth, nbcolorssamples, extrasamplescount, transformProfile, postprocessor ) + KisTIFFReaderTarget32bit( KisPaintDeviceSP device, TQ_UINT8* poses, int8 alphapos, uint8 sourceDepth, uint8 nbcolorssamples, uint8 extrasamplescount, cmsHTRANSFORM transformProfile, KisTIFFPostProcessor* postprocessor) : KisTIFFReaderBase(device, poses, alphapos, sourceDepth, nbcolorssamples, extrasamplescount, transformProfile, postprocessor ) { } public: - virtual uint copyDataToChannels( Q_UINT32 x, Q_UINT32 y, Q_UINT32 dataWidth, TIFFStreamBase* tiffstream) ; + virtual uint copyDataToChannels( TQ_UINT32 x, TQ_UINT32 y, TQ_UINT32 dataWidth, TIFFStreamBase* tiffstream) ; }; class KisTIFFReaderFromPalette : public KisTIFFReaderBase { public: - KisTIFFReaderFromPalette( KisPaintDeviceSP device, uint16 *red, uint16 *green, uint16 *blue, Q_UINT8* poses, int8 alphapos, uint8 sourceDepth, uint8 nbcolorssamples, uint8 extrasamplescount, cmsHTRANSFORM transformProfile, KisTIFFPostProcessor* postprocessor) : KisTIFFReaderBase(device, poses, alphapos, sourceDepth, nbcolorssamples, extrasamplescount, transformProfile, postprocessor ), m_red(red), m_green(green), m_blue(blue) + KisTIFFReaderFromPalette( KisPaintDeviceSP device, uint16 *red, uint16 *green, uint16 *blue, TQ_UINT8* poses, int8 alphapos, uint8 sourceDepth, uint8 nbcolorssamples, uint8 extrasamplescount, cmsHTRANSFORM transformProfile, KisTIFFPostProcessor* postprocessor) : KisTIFFReaderBase(device, poses, alphapos, sourceDepth, nbcolorssamples, extrasamplescount, transformProfile, postprocessor ), m_red(red), m_green(green), m_blue(blue) { } public: - virtual uint copyDataToChannels( Q_UINT32 x, Q_UINT32 y, Q_UINT32 dataWidth, TIFFStreamBase* tiffstream) ; + virtual uint copyDataToChannels( TQ_UINT32 x, TQ_UINT32 y, TQ_UINT32 dataWidth, TIFFStreamBase* tiffstream) ; private: uint16 *m_red, *m_green, *m_blue; }; diff --git a/filters/krita/tiff/kis_tiff_writer_visitor.cpp b/filters/krita/tiff/kis_tiff_writer_visitor.cpp index 64f7e252..76617534 100644 --- a/filters/krita/tiff/kis_tiff_writer_visitor.cpp +++ b/filters/krita/tiff/kis_tiff_writer_visitor.cpp @@ -63,7 +63,7 @@ namespace { return true; } - KMessageBox::error(0, i18n("Cannot export images in %1.\n").arg(cs->id().name()) ) ; + KMessageBox::error(0, i18n("Cannot export images in %1.\n").tqarg(cs->id().name()) ) ; return false; } @@ -79,13 +79,13 @@ KisTIFFWriterVisitor::~KisTIFFWriterVisitor() bool KisTIFFWriterVisitor::saveAlpha() { return m_options->alpha; } -bool KisTIFFWriterVisitor::copyDataToStrips( KisHLineIterator it, tdata_t buff, uint8 depth, uint8 nbcolorssamples, Q_UINT8* poses) +bool KisTIFFWriterVisitor::copyDataToStrips( KisHLineIterator it, tdata_t buff, uint8 depth, uint8 nbcolorssamples, TQ_UINT8* poses) { if(depth == 32) { - Q_UINT32 *dst = reinterpret_cast(buff); + TQ_UINT32 *dst = reinterpret_cast(buff); while (!it.isDone()) { - const Q_UINT32 *d = reinterpret_cast(it.rawData()); + const TQ_UINT32 *d = reinterpret_cast(it.rawData()); int i; for(i = 0; i < nbcolorssamples; i++) { @@ -97,9 +97,9 @@ bool KisTIFFWriterVisitor::copyDataToStrips( KisHLineIterator it, tdata_t buff, return true; } else if(depth == 16) { - Q_UINT16 *dst = reinterpret_cast(buff); + TQ_UINT16 *dst = reinterpret_cast(buff); while (!it.isDone()) { - const Q_UINT16 *d = reinterpret_cast(it.rawData()); + const TQ_UINT16 *d = reinterpret_cast(it.rawData()); int i; for(i = 0; i < nbcolorssamples; i++) { @@ -110,9 +110,9 @@ bool KisTIFFWriterVisitor::copyDataToStrips( KisHLineIterator it, tdata_t buff, } return true; } else if(depth == 8) { - Q_UINT8 *dst = reinterpret_cast(buff); + TQ_UINT8 *dst = reinterpret_cast(buff); while (!it.isDone()) { - const Q_UINT8 *d = it.rawData(); + const TQ_UINT8 *d = it.rawData(); int i; for(i = 0; i < nbcolorssamples; i++) { @@ -159,9 +159,9 @@ bool KisTIFFWriterVisitor::visit(KisPaintLayer *layer) // Set the compression options TIFFSetField(image(), TIFFTAG_COMPRESSION, m_options->compressionType); TIFFSetField(image(), TIFFTAG_FAXMODE, m_options->faxMode); - TIFFSetField(image(), TIFFTAG_JPEGQUALITY, m_options->jpegQuality); - TIFFSetField(image(), TIFFTAG_ZIPQUALITY, m_options->deflateCompress); - TIFFSetField(image(), TIFFTAG_PIXARLOGQUALITY, m_options->pixarLogCompress); + TIFFSetField(image(), TIFFTAG_JPEGTQUALITY, m_options->jpegQuality); + TIFFSetField(image(), TIFFTAG_ZIPTQUALITY, m_options->deflateCompress); + TIFFSetField(image(), TIFFTAG_PIXARLOGTQUALITY, m_options->pixarLogCompress); // Set the predictor TIFFSetField(image(), TIFFTAG_PREDICTOR, m_options->predictor); @@ -175,13 +175,13 @@ bool KisTIFFWriterVisitor::visit(KisPaintLayer *layer) KisProfile* profile = pd->colorSpace()->getProfile(); if(profile) { - QByteArray ba = profile->annotation()->annotation(); + TQByteArray ba = profile->annotation()->annotation(); TIFFSetField(image(), TIFFTAG_ICCPROFILE, ba.size(),ba.data()); } tsize_t stripsize = TIFFStripSize(image()); tdata_t buff = _TIFFmalloc(stripsize); - Q_INT32 height = layer->image()->height(); - Q_INT32 width = layer->image()->width(); + TQ_INT32 height = layer->image()->height(); + TQ_INT32 width = layer->image()->width(); bool r = true; for (int y = 0; y < height; y++) { KisHLineIterator it = layer->paintDevice()->createHLineIterator(0, y, width, false); @@ -189,25 +189,25 @@ bool KisTIFFWriterVisitor::visit(KisPaintLayer *layer) { case PHOTOMETRIC_MINISBLACK: { - Q_UINT8 poses[]={ 0,1 }; + TQ_UINT8 poses[]={ 0,1 }; r = copyDataToStrips(it, buff, depth, 1, poses); } break; case PHOTOMETRIC_RGB: { - Q_UINT8 poses[]={ 2, 1, 0, 3}; + TQ_UINT8 poses[]={ 2, 1, 0, 3}; r = copyDataToStrips(it, buff, depth, 3, poses); } break; case PHOTOMETRIC_SEPARATED: { - Q_UINT8 poses[]={ 0, 1, 2, 3, 4 }; + TQ_UINT8 poses[]={ 0, 1, 2, 3, 4 }; r = copyDataToStrips(it, buff, depth, 4, poses); } break; case PHOTOMETRIC_CIELAB: { - Q_UINT8 poses[]={ 0, 1, 2, 3 }; + TQ_UINT8 poses[]={ 0, 1, 2, 3 }; r = copyDataToStrips(it, buff, depth, 3, poses); } break; diff --git a/filters/krita/tiff/kis_tiff_writer_visitor.h b/filters/krita/tiff/kis_tiff_writer_visitor.h index c05c8d78..abd1aec7 100644 --- a/filters/krita/tiff/kis_tiff_writer_visitor.h +++ b/filters/krita/tiff/kis_tiff_writer_visitor.h @@ -44,7 +44,7 @@ class KisTIFFWriterVisitor : public KisLayerVisitor private: inline TIFF* image() { return m_image; } inline bool saveAlpha(); - bool copyDataToStrips( KisHLineIterator it, tdata_t buff, uint8 depth, uint8 nbcolorssamples, Q_UINT8* poses); + bool copyDataToStrips( KisHLineIterator it, tdata_t buff, uint8 depth, uint8 nbcolorssamples, TQ_UINT8* poses); private: TIFF* m_image; KisTIFFOptions* m_options; diff --git a/filters/krita/tiff/kis_tiff_ycbcr_reader.cc b/filters/krita/tiff/kis_tiff_ycbcr_reader.cc index 5609f887..ce5e4ae9 100644 --- a/filters/krita/tiff/kis_tiff_ycbcr_reader.cc +++ b/filters/krita/tiff/kis_tiff_ycbcr_reader.cc @@ -25,17 +25,17 @@ #include "kis_tiff_stream.h" -KisTIFFYCbCrReaderTarget8Bit::KisTIFFYCbCrReaderTarget8Bit( KisPaintDeviceSP device, Q_UINT8* poses, int8 alphapos, uint8 sourceDepth, uint8 nbcolorssamples, uint8 extrasamplescount, cmsHTRANSFORM transformProfile, KisTIFFPostProcessor* postprocessor, uint16 hsub, uint16 vsub, KisTIFFYCbCr::Position position ) : KisTIFFReaderBase(device, poses, alphapos, sourceDepth, nbcolorssamples, extrasamplescount, transformProfile, postprocessor), m_hsub(hsub), m_vsub(vsub), m_position(position) +KisTIFFYCbCrReaderTarget8Bit::KisTIFFYCbCrReaderTarget8Bit( KisPaintDeviceSP device, TQ_UINT8* poses, int8 alphapos, uint8 sourceDepth, uint8 nbcolorssamples, uint8 extrasamplescount, cmsHTRANSFORM transformProfile, KisTIFFPostProcessor* postprocessor, uint16 hsub, uint16 vsub, KisTIFFYCbCr::Position position ) : KisTIFFReaderBase(device, poses, alphapos, sourceDepth, nbcolorssamples, extrasamplescount, transformProfile, postprocessor), m_hsub(hsub), m_vsub(vsub), m_position(position) { // Initialize the buffer - Q_INT32 imagewidth = device->image()->width(); + TQ_INT32 imagewidth = device->image()->width(); if(2*(imagewidth / 2) != imagewidth) imagewidth++; m_bufferWidth = imagewidth / m_hsub; - Q_INT32 imageheight = device->image()->height(); + TQ_INT32 imageheight = device->image()->height(); if(2*(imageheight / 2) != imageheight) imageheight++; m_bufferHeight = imageheight / m_vsub; - m_bufferCb = new Q_UINT8[ m_bufferWidth * m_bufferHeight ]; - m_bufferCr = new Q_UINT8[ m_bufferWidth * m_bufferHeight ]; + m_bufferCb = new TQ_UINT8[ m_bufferWidth * m_bufferHeight ]; + m_bufferCr = new TQ_UINT8[ m_bufferWidth * m_bufferHeight ]; } KisTIFFYCbCrReaderTarget8Bit::~KisTIFFYCbCrReaderTarget8Bit() @@ -44,10 +44,10 @@ KisTIFFYCbCrReaderTarget8Bit::~KisTIFFYCbCrReaderTarget8Bit() delete[] m_bufferCr; } -uint KisTIFFYCbCrReaderTarget8Bit::copyDataToChannels( Q_UINT32 x, Q_UINT32 y, Q_UINT32 dataWidth, TIFFStreamBase* tiffstream) +uint KisTIFFYCbCrReaderTarget8Bit::copyDataToChannels( TQ_UINT32 x, TQ_UINT32 y, TQ_UINT32 dataWidth, TIFFStreamBase* tiffstream) { int numcols = dataWidth / m_hsub; - double coeff = Q_UINT8_MAX / (double)( pow(2, sourceDepth() ) - 1 ); + double coeff = TQ_UINT8_MAX / (double)( pow(2, sourceDepth() ) - 1 ); // kdDebug(41008) << " depth expension coefficient : " << coeff << endl; // kdDebug(41008) << " y = " << y << endl; uint buffPos = y / m_vsub * m_bufferWidth + x / m_hsub ; @@ -58,13 +58,13 @@ uint KisTIFFYCbCrReaderTarget8Bit::copyDataToChannels( Q_UINT32 x, Q_UINT32 y, Q { while( !it.isDone() ) { - Q_UINT8 *d = it.rawData(); - d[0] = (Q_UINT8)( tiffstream->nextValue() * coeff ); - d[3] = Q_UINT8_MAX; + TQ_UINT8 *d = it.rawData(); + d[0] = (TQ_UINT8)( tiffstream->nextValue() * coeff ); + d[3] = TQ_UINT8_MAX; for(int k = 0; k < nbExtraSamples(); k++) { if(k == alphaPos()) - d[3] = (Q_UINT32) ( tiffstream->nextValue() * coeff ); + d[3] = (TQ_UINT32) ( tiffstream->nextValue() * coeff ); else tiffstream->nextValue(); } @@ -72,8 +72,8 @@ uint KisTIFFYCbCrReaderTarget8Bit::copyDataToChannels( Q_UINT32 x, Q_UINT32 y, Q } it.nextRow(); } - m_bufferCb[ buffPos ] = (Q_UINT8)(tiffstream->nextValue() * coeff); - m_bufferCr[ buffPos ] = (Q_UINT8)(tiffstream->nextValue() * coeff); + m_bufferCb[ buffPos ] = (TQ_UINT8)(tiffstream->nextValue() * coeff); + m_bufferCr[ buffPos ] = (TQ_UINT8)(tiffstream->nextValue() * coeff); buffPos ++; } return m_vsub; @@ -87,7 +87,7 @@ void KisTIFFYCbCrReaderTarget8Bit::finalize() int x = 0; while(!it.isDone()) { - Q_UINT8 *d = it.rawData(); + TQ_UINT8 *d = it.rawData(); int index = x/m_hsub + y/m_vsub * m_bufferWidth; d[1] = m_bufferCb[ index ]; d[2] = m_bufferCr[ index ]; @@ -97,17 +97,17 @@ void KisTIFFYCbCrReaderTarget8Bit::finalize() } } -KisTIFFYCbCrReaderTarget16Bit::KisTIFFYCbCrReaderTarget16Bit( KisPaintDeviceSP device, Q_UINT8* poses, int8 alphapos, uint8 sourceDepth, uint8 nbcolorssamples, uint8 extrasamplescount, cmsHTRANSFORM transformProfile, KisTIFFPostProcessor* postprocessor, uint16 hsub, uint16 vsub, KisTIFFYCbCr::Position position ) : KisTIFFReaderBase(device, poses, alphapos, sourceDepth, nbcolorssamples, extrasamplescount, transformProfile, postprocessor), m_hsub(hsub), m_vsub(vsub), m_position(position) +KisTIFFYCbCrReaderTarget16Bit::KisTIFFYCbCrReaderTarget16Bit( KisPaintDeviceSP device, TQ_UINT8* poses, int8 alphapos, uint8 sourceDepth, uint8 nbcolorssamples, uint8 extrasamplescount, cmsHTRANSFORM transformProfile, KisTIFFPostProcessor* postprocessor, uint16 hsub, uint16 vsub, KisTIFFYCbCr::Position position ) : KisTIFFReaderBase(device, poses, alphapos, sourceDepth, nbcolorssamples, extrasamplescount, transformProfile, postprocessor), m_hsub(hsub), m_vsub(vsub), m_position(position) { // Initialize the buffer - Q_INT32 imagewidth = device->image()->width(); + TQ_INT32 imagewidth = device->image()->width(); if(2*(imagewidth / 2) != imagewidth) imagewidth++; m_bufferWidth = imagewidth / m_hsub; - Q_INT32 imageheight = device->image()->height(); + TQ_INT32 imageheight = device->image()->height(); if(2*(imageheight / 2) != imageheight) imageheight++; m_bufferHeight = imageheight / m_vsub; - m_bufferCb = new Q_UINT16[ m_bufferWidth * m_bufferHeight ]; - m_bufferCr = new Q_UINT16[ m_bufferWidth * m_bufferHeight ]; + m_bufferCb = new TQ_UINT16[ m_bufferWidth * m_bufferHeight ]; + m_bufferCr = new TQ_UINT16[ m_bufferWidth * m_bufferHeight ]; } KisTIFFYCbCrReaderTarget16Bit::~KisTIFFYCbCrReaderTarget16Bit() @@ -116,10 +116,10 @@ KisTIFFYCbCrReaderTarget16Bit::~KisTIFFYCbCrReaderTarget16Bit() delete[] m_bufferCr; } -uint KisTIFFYCbCrReaderTarget16Bit::copyDataToChannels( Q_UINT32 x, Q_UINT32 y, Q_UINT32 dataWidth, TIFFStreamBase* tiffstream) +uint KisTIFFYCbCrReaderTarget16Bit::copyDataToChannels( TQ_UINT32 x, TQ_UINT32 y, TQ_UINT32 dataWidth, TIFFStreamBase* tiffstream) { int numcols = dataWidth / m_hsub; - double coeff = Q_UINT16_MAX / (double)( pow(2, sourceDepth() ) - 1 ); + double coeff = TQ_UINT16_MAX / (double)( pow(2, sourceDepth() ) - 1 ); // kdDebug(41008) << " depth expension coefficient : " << coeff << endl; // kdDebug(41008) << " y = " << y << endl; uint buffPos = y / m_vsub * m_bufferWidth + x / m_hsub ; @@ -130,13 +130,13 @@ uint KisTIFFYCbCrReaderTarget16Bit::copyDataToChannels( Q_UINT32 x, Q_UINT32 y, { while( !it.isDone() ) { - Q_UINT16 *d = reinterpret_cast(it.rawData()); - d[0] = (Q_UINT16)( tiffstream->nextValue() * coeff ); - d[3] = Q_UINT16_MAX; + TQ_UINT16 *d = reinterpret_cast(it.rawData()); + d[0] = (TQ_UINT16)( tiffstream->nextValue() * coeff ); + d[3] = TQ_UINT16_MAX; for(int k = 0; k < nbExtraSamples(); k++) { if(k == alphaPos()) - d[3] = (Q_UINT32) ( tiffstream->nextValue() * coeff ); + d[3] = (TQ_UINT32) ( tiffstream->nextValue() * coeff ); else tiffstream->nextValue(); } @@ -144,8 +144,8 @@ uint KisTIFFYCbCrReaderTarget16Bit::copyDataToChannels( Q_UINT32 x, Q_UINT32 y, } it.nextRow(); } - m_bufferCb[ buffPos ] = (Q_UINT16)(tiffstream->nextValue() * coeff); - m_bufferCr[ buffPos ] = (Q_UINT16)(tiffstream->nextValue() * coeff); + m_bufferCb[ buffPos ] = (TQ_UINT16)(tiffstream->nextValue() * coeff); + m_bufferCr[ buffPos ] = (TQ_UINT16)(tiffstream->nextValue() * coeff); buffPos ++; } return m_vsub; @@ -159,7 +159,7 @@ void KisTIFFYCbCrReaderTarget16Bit::finalize() int x = 0; while(!it.isDone()) { - Q_UINT16 *d = reinterpret_cast(it.rawData()); + TQ_UINT16 *d = reinterpret_cast(it.rawData()); int index = x/m_hsub + y/m_vsub * m_bufferWidth; d[1] = m_bufferCb[ index ]; d[2] = m_bufferCr[ index ]; diff --git a/filters/krita/tiff/kis_tiff_ycbcr_reader.h b/filters/krita/tiff/kis_tiff_ycbcr_reader.h index b640228c..e81e8893 100644 --- a/filters/krita/tiff/kis_tiff_ycbcr_reader.h +++ b/filters/krita/tiff/kis_tiff_ycbcr_reader.h @@ -35,14 +35,14 @@ class KisTIFFYCbCrReaderTarget8Bit : public KisTIFFReaderBase { * @param hsub horizontal subsampling of Cb and Cr * @param hsub vertical subsampling of Cb and Cr */ - KisTIFFYCbCrReaderTarget8Bit( KisPaintDeviceSP device, Q_UINT8* poses, int8 alphapos, uint8 sourceDepth, uint8 nbcolorssamples, uint8 extrasamplescount, cmsHTRANSFORM transformProfile, KisTIFFPostProcessor* postprocessor, uint16 hsub, uint16 vsub, KisTIFFYCbCr::Position position ); + KisTIFFYCbCrReaderTarget8Bit( KisPaintDeviceSP device, TQ_UINT8* poses, int8 alphapos, uint8 sourceDepth, uint8 nbcolorssamples, uint8 extrasamplescount, cmsHTRANSFORM transformProfile, KisTIFFPostProcessor* postprocessor, uint16 hsub, uint16 vsub, KisTIFFYCbCr::Position position ); ~KisTIFFYCbCrReaderTarget8Bit(); - virtual uint copyDataToChannels( Q_UINT32 x, Q_UINT32 y, Q_UINT32 dataWidth, TIFFStreamBase* tiffstream); + virtual uint copyDataToChannels( TQ_UINT32 x, TQ_UINT32 y, TQ_UINT32 dataWidth, TIFFStreamBase* tiffstream); virtual void finalize(); private: - Q_UINT8* m_bufferCb; - Q_UINT8* m_bufferCr; - Q_UINT32 m_bufferWidth, m_bufferHeight; + TQ_UINT8* m_bufferCb; + TQ_UINT8* m_bufferCr; + TQ_UINT32 m_bufferWidth, m_bufferHeight; uint16 m_hsub; uint16 m_vsub; KisTIFFYCbCr::Position m_position; @@ -55,14 +55,14 @@ class KisTIFFYCbCrReaderTarget16Bit : public KisTIFFReaderBase { * @param hsub horizontal subsampling of Cb and Cr * @param hsub vertical subsampling of Cb and Cr */ - KisTIFFYCbCrReaderTarget16Bit( KisPaintDeviceSP device, Q_UINT8* poses, int8 alphapos, uint8 sourceDepth, uint8 nbcolorssamples, uint8 extrasamplescount, cmsHTRANSFORM transformProfile, KisTIFFPostProcessor* postprocessor, uint16 hsub, uint16 vsub, KisTIFFYCbCr::Position position ); + KisTIFFYCbCrReaderTarget16Bit( KisPaintDeviceSP device, TQ_UINT8* poses, int8 alphapos, uint8 sourceDepth, uint8 nbcolorssamples, uint8 extrasamplescount, cmsHTRANSFORM transformProfile, KisTIFFPostProcessor* postprocessor, uint16 hsub, uint16 vsub, KisTIFFYCbCr::Position position ); ~KisTIFFYCbCrReaderTarget16Bit(); - virtual uint copyDataToChannels( Q_UINT32 x, Q_UINT32 y, Q_UINT32 dataWidth, TIFFStreamBase* tiffstream); + virtual uint copyDataToChannels( TQ_UINT32 x, TQ_UINT32 y, TQ_UINT32 dataWidth, TIFFStreamBase* tiffstream); virtual void finalize(); private: - Q_UINT16* m_bufferCb; - Q_UINT16* m_bufferCr; - Q_UINT32 m_bufferWidth, m_bufferHeight; + TQ_UINT16* m_bufferCb; + TQ_UINT16* m_bufferCr; + TQ_UINT32 m_bufferWidth, m_bufferHeight; uint16 m_hsub; uint16 m_vsub; KisTIFFYCbCr::Position m_position; diff --git a/filters/krita/tiff/kis_wdg_options_tiff.ui b/filters/krita/tiff/kis_wdg_options_tiff.ui index 2e1f1c80..3ffc1bd4 100644 --- a/filters/krita/tiff/kis_wdg_options_tiff.ui +++ b/filters/krita/tiff/kis_wdg_options_tiff.ui @@ -1,6 +1,6 @@ KisWdgOptionsTIFF - + KisWdgOptionsTIFF @@ -30,7 +30,7 @@ 0 - + groupBox1 @@ -49,15 +49,15 @@ unnamed - + - layout10 + tqlayout10 unnamed - + textLabel1 @@ -117,15 +117,15 @@ - + - layout7 + tqlayout7 unnamed - + textLabel1_3 @@ -146,7 +146,7 @@ - Floating Point Horizontal Differencing + Floating PointQt::Horizontal Differencing @@ -161,7 +161,7 @@ - + alpha @@ -179,7 +179,7 @@ You can uncheck the box if you are not using transparancy and you want to make the resulting file smaller .<br>Always saving the alpha channel is recommended.</p> - + flatten @@ -203,14 +203,14 @@ You can uncheck the box if you are not using transparancy and you want to make t - + codecsOptionsStack NoFrame - + WStackPage @@ -227,7 +227,7 @@ You can uncheck the box if you are not using transparancy and you want to make t 0 - + frame4 @@ -240,7 +240,7 @@ You can uncheck the box if you are not using transparancy and you want to make t - + WStackPage @@ -257,7 +257,7 @@ You can uncheck the box if you are not using transparancy and you want to make t 0 - + groupBoxJPEG @@ -276,26 +276,26 @@ You can uncheck the box if you are not using transparancy and you want to make t unnamed - + textLabel1_2 Quality: - + AlignTop - + - layout5 + tqlayout5 unnamed - + qualityLevel @@ -327,15 +327,15 @@ You can uncheck the box if you are not using transparancy and you want to make t These settings determine how much information is lost during compression - + - layout4_2 + tqlayout4_2 unnamed - + textLabel3 @@ -343,14 +343,14 @@ You can uncheck the box if you are not using transparancy and you want to make t Smallest - + textLabel4 Best - + AlignVCenter|AlignRight @@ -362,7 +362,7 @@ You can uncheck the box if you are not using transparancy and you want to make t - + WStackPage @@ -379,7 +379,7 @@ You can uncheck the box if you are not using transparancy and you want to make t 0 - + groupBoxDeflate @@ -398,14 +398,14 @@ You can uncheck the box if you are not using transparancy and you want to make t unnamed - + textLabel1_4 Compress: - + AlignTop @@ -416,15 +416,15 @@ You can uncheck the box if you are not using transparancy and you want to make t <br>Note: the compression level does not change the quality of the result.</p> - + - layout5_2 + tqlayout5_2 unnamed - + compressionLevelDeflate @@ -454,15 +454,15 @@ You can uncheck the box if you are not using transparancy and you want to make t <br>Note: the compression level doesn't change the quality of the result.</p> - + - layout4 + tqlayout4 unnamed - + textLabel3_2 @@ -474,14 +474,14 @@ You can uncheck the box if you are not using transparancy and you want to make t <br>Note: the compression level doesn't change the quality of the result.</p> - + textLabel4_2 Small - + AlignVCenter|AlignRight @@ -497,7 +497,7 @@ You can uncheck the box if you are not using transparancy and you want to make t - + WStackPage @@ -514,7 +514,7 @@ You can uncheck the box if you are not using transparancy and you want to make t 0 - + groupBoxCCITGroupCCITG3 @@ -533,7 +533,7 @@ You can uncheck the box if you are not using transparancy and you want to make t unnamed - + textLabel2 @@ -565,7 +565,7 @@ You can uncheck the box if you are not using transparancy and you want to make t - + WStackPage @@ -582,7 +582,7 @@ You can uncheck the box if you are not using transparancy and you want to make t 0 - + groupBoxPixarLog @@ -601,14 +601,14 @@ You can uncheck the box if you are not using transparancy and you want to make t unnamed - + textLabel1_4_2 Compress: - + AlignTop @@ -619,15 +619,15 @@ You can uncheck the box if you are not using transparancy and you want to make t <br>Note: the compression level does not change the quality of the result.</p> - + - layout5_2_2 + tqlayout5_2_2 unnamed - + compressionLevelPixarLog @@ -657,15 +657,15 @@ You can uncheck the box if you are not using transparancy and you want to make t <br>Note: the compression level doesn't change the quality of the result.</p> - + - layout4_3 + tqlayout4_3 unnamed - + textLabel3_2_2 @@ -677,14 +677,14 @@ You can uncheck the box if you are not using transparancy and you want to make t <br>Note: the compression level doesn't change the quality of the result.</p> - + textLabel4_2_2 Small - + AlignVCenter|AlignRight @@ -711,7 +711,7 @@ You can uncheck the box if you are not using transparancy and you want to make t Expanding - + 20 16 @@ -732,7 +732,7 @@ You can uncheck the box if you are not using transparancy and you want to make t kComboBoxFaxMode compressionLevelPixarLog - + kcombobox.h kcombobox.h diff --git a/filters/krita/tiff/kis_ycbcr_colorspace.h b/filters/krita/tiff/kis_ycbcr_colorspace.h index 0b4ece87..05220127 100644 --- a/filters/krita/tiff/kis_ycbcr_colorspace.h +++ b/filters/krita/tiff/kis_ycbcr_colorspace.h @@ -20,8 +20,8 @@ #ifndef KIS_YCBCR_COLORSPACE_H #define KIS_YCBCR_COLORSPACE_H namespace { - const Q_INT32 MAX_CHANNEL_YCbCr = 3; - const Q_INT32 MAX_CHANNEL_YCbCrA = 4; + const TQ_INT32 MAX_CHANNEL_YCbCr = 3; + const TQ_INT32 MAX_CHANNEL_YCbCrA = 4; } #endif diff --git a/filters/krita/xcf/xcf/xcf-load.cc b/filters/krita/xcf/xcf/xcf-load.cc index dded6883..07b6a145 100644 --- a/filters/krita/xcf/xcf/xcf-load.cc +++ b/filters/krita/xcf/xcf/xcf-load.cc @@ -43,7 +43,7 @@ //#include "core/gimpimage-guides.h" //#include "core/gimplayer.h" //#include "core/gimplayer-floating-sel.h" -//#include "core/gimplayermask.h" +//#include "core/gimplayertqmask.h" //#include "core/gimpparasitelist.h" //#include "core/gimpselection.h" //#include "core/gimptemplate.h" @@ -69,25 +69,25 @@ static bool xcf_load_image_props (XcfInfo * info, KisImage * gimage); static bool xcf_load_layer_props (XcfInfo * info, KisImage * gimage, KisLayer * layer, - bool * apply_mask, - bool * edit_mask, - bool * show_mask, - Q_INT32 * text_layer_flags); + bool * apply_tqmask, + bool * edit_tqmask, + bool * show_tqmask, + TQ_INT32 * text_layer_flags); static bool xcf_load_channel_props (XcfInfo * info, KisImage * gimage, GimpChannel ** channel); static bool xcf_load_prop (XcfInfo * info, - PropType * prop_type, Q_INT32 * prop_size); + PropType * prop_type, TQ_INT32 * prop_size); static KisLayer *xcf_load_layer (XcfInfo * info, KisImage * gimage); //static GimpChannel * xcf_load_channel (XcfInfo *info, // KisImage *gimage); -//static GimpLayerMask * xcf_load_layer_mask (XcfInfo *info, +//static GimpLayerMask * xcf_load_layer_tqmask (XcfInfo *info, // KisImage *gimage); static bool xcf_load_hierarchy (XcfInfo * info, TileManager * tiles); static bool xcf_load_level (XcfInfo * info, TileManager * tiles); static bool xcf_load_tile (XcfInfo * info, Tile * tile); static bool xcf_load_tile_rle (XcfInfo * info, - Tile * tile, Q_INT32 data_length); + Tile * tile, TQ_INT32 data_length); //static GimpParasite * xcf_load_parasite (XcfInfo *info); static bool xcf_load_old_paths (XcfInfo * info, KisImage * gimage); static bool xcf_load_old_path (XcfInfo * info, KisImage * gimage); @@ -95,8 +95,8 @@ static bool xcf_load_vectors (XcfInfo * info, KisImage * gimage); static bool xcf_load_vector (XcfInfo * info, KisImage * gimage); #ifdef SWAP_FROM_FILE -static bool xcf_swap_func (Q_INT32 fd, - Tile * tile, Q_INT32 cmd, gpointer user_data); +static bool xcf_swap_func (TQ_INT32 fd, + Tile * tile, TQ_INT32 cmd, gpointer user_data); #endif @@ -107,17 +107,17 @@ xcf_load_image (XcfInfo * info) KisLayer *layer; //GimpChannel *channel; //KisAnnotation *parasite; - Q_INT32 saved_pos; - Q_INT32 offset; - Q_INT32 width; - Q_INT32 height; - Q_INT32 image_type; - Q_INT32 num_successful_elements = 0; + TQ_INT32 saved_pos; + TQ_INT32 offset; + TQ_INT32 width; + TQ_INT32 height; + TQ_INT32 image_type; + TQ_INT32 num_successful_elements = 0; /* read in the image width, height and type */ - info->cp += xcf_read_int32 (info->fp, (Q_INT32 *) & width, 1); - info->cp += xcf_read_int32 (info->fp, (Q_INT32 *) & height, 1); - info->cp += xcf_read_int32 (info->fp, (Q_INT32 *) & image_type, 1); + info->cp += xcf_read_int32 (info->fp, (TQ_INT32 *) & width, 1); + info->cp += xcf_read_int32 (info->fp, (TQ_INT32 *) & height, 1); + info->cp += xcf_read_int32 (info->fp, (TQ_INT32 *) & image_type, 1); gimage = gimp_create_image (gimp, width, height, image_type, FALSE); @@ -128,7 +128,7 @@ xcf_load_image (XcfInfo * info) goto hard_error; /* check for a GimpGrid parasite */ - parasite = gimp_image_parasite_find (GIMP_IMAGE (gimage), + parasite = gimp_image_parasite_tqfind (GIMP_IMAGE (gimage), gimp_grid_parasite_name ()); if (parasite) { @@ -173,7 +173,7 @@ xcf_load_image (XcfInfo * info) /* add the layer to the image if its not the floating selection */ if (layer != info->floating_sel) gimp_image_add_layer (gimage, layer, - gimp_container_num_children (gimage->layers)); + gimp_container_num_tqchildren (gimage->layers)); /* restore the saved position so we'll be ready to * read the next offset. @@ -210,7 +210,7 @@ xcf_load_image (XcfInfo * info) num_successful_elements++; /* add the channel to the image if its not the selection */ - if (channel != gimage->selection_mask) + if (channel != gimage->selection_tqmask) gimp_image_add_channel (gimage, channel, -1); /* restore the saved position so we'll be ready to @@ -262,7 +262,7 @@ static bool xcf_load_image_props (XcfInfo * info, KisImage * gimage) { PropType prop_type; - Q_INT32 prop_size; + TQ_INT32 prop_size; while (TRUE) { @@ -277,13 +277,13 @@ xcf_load_image_props (XcfInfo * info, KisImage * gimage) case PROP_COLORMAP: if (info->file_version == 0) { - Q_INT32 i; + TQ_INT32 i; g_message (_("XCF warning: version 0 of XCF file format\n" "did not save indexed colormaps correctly.\n" "Substituting grayscale map.")); info->cp += - xcf_read_int32 (info->fp, (Q_INT32 *) & gimage->num_cols, 1); + xcf_read_int32 (info->fp, (TQ_INT32 *) & gimage->num_cols, 1); gimage->cmap = g_new (guchar, gimage->num_cols * 3); if (!xcf_seek_pos (info, info->cp + gimage->num_cols, NULL)) return FALSE; @@ -298,11 +298,11 @@ xcf_load_image_props (XcfInfo * info, KisImage * gimage) else { info->cp += - xcf_read_int32 (info->fp, (Q_INT32 *) & gimage->num_cols, 1); + xcf_read_int32 (info->fp, (TQ_INT32 *) & gimage->num_cols, 1); gimage->cmap = g_new (guchar, gimage->num_cols * 3); info->cp += xcf_read_int8 (info->fp, - (Q_UINT8 *) gimage->cmap, + (TQ_UINT8 *) gimage->cmap, gimage->num_cols * 3); } @@ -320,10 +320,10 @@ xcf_load_image_props (XcfInfo * info, KisImage * gimage) case PROP_COMPRESSION: { - Q_UINT8 compression; + TQ_UINT8 compression; info->cp += - xcf_read_int8 (info->fp, (Q_UINT8 *) & compression, 1); + xcf_read_int8 (info->fp, (TQ_UINT8 *) & compression, 1); if ((compression != COMPRESS_NONE) && (compression != COMPRESS_RLE) && @@ -340,17 +340,17 @@ xcf_load_image_props (XcfInfo * info, KisImage * gimage) case PROP_GUIDES: { - Q_INT3232 position; - Q_INT328 orientation; - Q_INT32 i, nguides; + TQ_INT3232 position; + TQ_INT328 orientation; + TQ_INT32 i, nguides; nguides = prop_size / (4 + 1); for (i = 0; i < nguides; i++) { info->cp += - xcf_read_int32 (info->fp, (Q_INT32 *) & position, 1); + xcf_read_int32 (info->fp, (TQ_INT32 *) & position, 1); info->cp += - xcf_read_int8 (info->fp, (Q_UINT8 *) & orientation, 1); + xcf_read_int8 (info->fp, (TQ_UINT8 *) & orientation, 1); /* skip -1 guides from old XCFs */ if (position < 0) @@ -422,7 +422,7 @@ xcf_load_image_props (XcfInfo * info, KisImage * gimage) case PROP_UNIT: { - Q_INT32 unit; + TQ_INT32 unit; info->cp += xcf_read_int32 (info->fp, &unit, 1); @@ -445,12 +445,12 @@ xcf_load_image_props (XcfInfo * info, KisImage * gimage) case PROP_USER_UNIT: { - QCString *unit_strings[5]; + TQCString *unit_strings[5]; float factor; - Q_INT32 digits; + TQ_INT32 digits; GimpUnit unit; - Q_INT32 num_units; - Q_INT32 i; + TQ_INT32 num_units; + TQ_INT32 i; info->cp += xcf_read_float (info->fp, &factor, 1); info->cp += xcf_read_int32 (info->fp, &digits, 1); @@ -498,7 +498,7 @@ xcf_load_image_props (XcfInfo * info, KisImage * gimage) case PROP_VECTORS: { - Q_INT32 base = info->cp; + TQ_INT32 base = info->cp; if (xcf_load_vectors (info, gimage)) { @@ -526,8 +526,8 @@ xcf_load_image_props (XcfInfo * info, KisImage * gimage) prop_type); #endif { - Q_UINT8 buf[16]; - Q_UINT32 amount; + TQ_UINT8 buf[16]; + TQ_UINT32 amount; while (prop_size > 0) { @@ -547,12 +547,12 @@ static bool xcf_load_layer_props (XcfInfo * info, KisImage * gimage, KisLayer * layer, - bool * apply_mask, - bool * edit_mask, - bool * show_mask, Q_INT32 * text_layer_flags) + bool * apply_tqmask, + bool * edit_tqmask, + bool * show_tqmask, TQ_INT32 * text_layer_flags) { PropType prop_type; - Q_INT32 prop_size; + TQ_INT32 prop_size; while (TRUE) { @@ -572,12 +572,12 @@ xcf_load_layer_props (XcfInfo * info, info->floating_sel = layer; info->cp += xcf_read_int32 (info->fp, - (Q_INT32 *) & info->floating_sel_offset, 1); + (TQ_INT32 *) & info->floating_sel_offset, 1); break; case PROP_OPACITY: { - Q_INT32 opacity; + TQ_INT32 opacity; info->cp += xcf_read_int32 (info->fp, &opacity, 1); layer->opacity = CLAMP ((gdouble) opacity / 255.0, @@ -590,7 +590,7 @@ xcf_load_layer_props (XcfInfo * info, { bool visible; - info->cp += xcf_read_int32 (info->fp, (Q_INT32 *) & visible, 1); + info->cp += xcf_read_int32 (info->fp, (TQ_INT32 *) & visible, 1); gimp_item_set_visible (GIMP_ITEM (layer), visible ? TRUE : FALSE, FALSE); } @@ -600,7 +600,7 @@ xcf_load_layer_props (XcfInfo * info, { bool linked; - info->cp += xcf_read_int32 (info->fp, (Q_INT32 *) & linked, 1); + info->cp += xcf_read_int32 (info->fp, (TQ_INT32 *) & linked, 1); gimp_item_set_linked (GIMP_ITEM (layer), linked ? TRUE : FALSE, FALSE); } @@ -608,37 +608,37 @@ xcf_load_layer_props (XcfInfo * info, case PROP_LOCK_ALPHA: info->cp += - xcf_read_int32 (info->fp, (Q_INT32 *) & layer->lock_alpha, 1); + xcf_read_int32 (info->fp, (TQ_INT32 *) & layer->lock_alpha, 1); break; case PROP_APPLY_MASK: - info->cp += xcf_read_int32 (info->fp, (Q_INT32 *) apply_mask, 1); + info->cp += xcf_read_int32 (info->fp, (TQ_INT32 *) apply_tqmask, 1); break; case PROP_EDIT_MASK: - info->cp += xcf_read_int32 (info->fp, (Q_INT32 *) edit_mask, 1); + info->cp += xcf_read_int32 (info->fp, (TQ_INT32 *) edit_tqmask, 1); break; case PROP_SHOW_MASK: - info->cp += xcf_read_int32 (info->fp, (Q_INT32 *) show_mask, 1); + info->cp += xcf_read_int32 (info->fp, (TQ_INT32 *) show_tqmask, 1); break; case PROP_OFFSETS: info->cp += xcf_read_int32 (info->fp, - (Q_INT32 *) & GIMP_ITEM (layer)->offset_x, 1); + (TQ_INT32 *) & GIMP_ITEM (layer)->offset_x, 1); info->cp += xcf_read_int32 (info->fp, - (Q_INT32 *) & GIMP_ITEM (layer)->offset_y, 1); + (TQ_INT32 *) & GIMP_ITEM (layer)->offset_y, 1); break; case PROP_MODE: - info->cp += xcf_read_int32 (info->fp, (Q_INT32 *) & layer->mode, 1); + info->cp += xcf_read_int32 (info->fp, (TQ_INT32 *) & layer->mode, 1); break; case PROP_TATTOO: info->cp += xcf_read_int32 (info->fp, - (Q_INT32 *) & GIMP_ITEM (layer)->tattoo, + (TQ_INT32 *) & GIMP_ITEM (layer)->tattoo, 1); break; @@ -664,8 +664,8 @@ xcf_load_layer_props (XcfInfo * info, default: { - Q_UINT8 buf[16]; - Q_UINT32 amount; + TQ_UINT8 buf[16]; + TQ_UINT32 amount; #ifdef GIMP_UNSTABLE g_printerr ("unexpected/unknown layer property: %d (skipping)", @@ -690,7 +690,7 @@ xcf_load_channel_props (XcfInfo * info, KisImage * gimage, GimpChannel ** channel) { PropType prop_type; - Q_INT32 prop_size; + TQ_INT32 prop_size; while (TRUE) { @@ -707,27 +707,27 @@ xcf_load_channel_props (XcfInfo * info, break; case PROP_SELECTION: - g_object_unref (gimage->selection_mask); - gimage->selection_mask = + g_object_unref (gimage->selection_tqmask); + gimage->selection_tqmask = gimp_selection_new (gimage, gimp_item_width (GIMP_ITEM (*channel)), gimp_item_height (GIMP_ITEM (*channel))); - g_object_ref (gimage->selection_mask); - gimp_item_sink (GIMP_ITEM (gimage->selection_mask)); + g_object_ref (gimage->selection_tqmask); + gimp_item_sink (GIMP_ITEM (gimage->selection_tqmask)); - tile_manager_unref (GIMP_DRAWABLE (gimage->selection_mask)->tiles); - GIMP_DRAWABLE (gimage->selection_mask)->tiles = + tile_manager_unref (GIMP_DRAWABLE (gimage->selection_tqmask)->tiles); + GIMP_DRAWABLE (gimage->selection_tqmask)->tiles = GIMP_DRAWABLE (*channel)->tiles; GIMP_DRAWABLE (*channel)->tiles = NULL; g_object_unref (*channel); - *channel = gimage->selection_mask; + *channel = gimage->selection_tqmask; (*channel)->boundary_known = FALSE; (*channel)->bounds_known = FALSE; break; case PROP_OPACITY: { - Q_INT32 opacity; + TQ_INT32 opacity; info->cp += xcf_read_int32 (info->fp, &opacity, 1); (*channel)->color.a = opacity / 255.0; @@ -738,7 +738,7 @@ xcf_load_channel_props (XcfInfo * info, { bool visible; - info->cp += xcf_read_int32 (info->fp, (Q_INT32 *) & visible, 1); + info->cp += xcf_read_int32 (info->fp, (TQ_INT32 *) & visible, 1); gimp_item_set_visible (GIMP_ITEM (*channel), visible ? TRUE : FALSE, FALSE); } @@ -748,7 +748,7 @@ xcf_load_channel_props (XcfInfo * info, { bool linked; - info->cp += xcf_read_int32 (info->fp, (Q_INT32 *) & linked, 1); + info->cp += xcf_read_int32 (info->fp, (TQ_INT32 *) & linked, 1); gimp_item_set_linked (GIMP_ITEM (*channel), linked ? TRUE : FALSE, FALSE); } @@ -756,11 +756,11 @@ xcf_load_channel_props (XcfInfo * info, case PROP_SHOW_MASKED: { - bool show_masked; + bool show_tqmasked; info->cp += - xcf_read_int32 (info->fp, (Q_INT32 *) & show_masked, 1); - gimp_channel_set_show_masked (*channel, show_masked); + xcf_read_int32 (info->fp, (TQ_INT32 *) & show_tqmasked, 1); + gimp_channel_set_show_tqmasked (*channel, show_tqmasked); } break; @@ -768,7 +768,7 @@ xcf_load_channel_props (XcfInfo * info, { guchar col[3]; - info->cp += xcf_read_int8 (info->fp, (Q_UINT8 *) col, 3); + info->cp += xcf_read_int8 (info->fp, (TQ_UINT8 *) col, 3); gimp_rgb_set_uchar (&(*channel)->color, col[0], col[1], col[2]); } @@ -802,8 +802,8 @@ xcf_load_channel_props (XcfInfo * info, #endif { - Q_UINT8 buf[16]; - Q_UINT32 amount; + TQ_UINT8 buf[16]; + TQ_UINT32 amount; while (prop_size > 0) { @@ -820,10 +820,10 @@ xcf_load_channel_props (XcfInfo * info, } static bool -xcf_load_prop (XcfInfo * info, PropType * prop_type, Q_INT32 * prop_size) +xcf_load_prop (XcfInfo * info, PropType * prop_type, TQ_INT32 * prop_size) { - info->cp += xcf_read_int32 (info->fp, (Q_INT32 *) prop_type, 1); - info->cp += xcf_read_int32 (info->fp, (Q_INT32 *) prop_size, 1); + info->cp += xcf_read_int32 (info->fp, (TQ_INT32 *) prop_type, 1); + info->cp += xcf_read_int32 (info->fp, (TQ_INT32 *) prop_size, 1); return TRUE; } @@ -831,20 +831,20 @@ static KisLayer * xcf_load_layer (XcfInfo * info, KisImage * gimage) { KisLayer *layer; - GimpLayerMask *layer_mask; - Q_INT32 hierarchy_offset; - Q_INT32 layer_mask_offset; - bool apply_mask = TRUE; - bool edit_mask = FALSE; - bool show_mask = FALSE; + GimpLayerMask *layer_tqmask; + TQ_INT32 hierarchy_offset; + TQ_INT32 layer_tqmask_offset; + bool apply_tqmask = TRUE; + bool edit_tqmask = FALSE; + bool show_tqmask = FALSE; bool active; bool floating; - Q_INT32 text_layer_flags = 0; - Q_INT32 width; - Q_INT32 height; - Q_INT32 type; + TQ_INT32 text_layer_flags = 0; + TQ_INT32 width; + TQ_INT32 height; + TQ_INT32 type; bool is_fs_drawable; - QCString *name; + TQCString *name; /* check and see if this is the drawable the floating selection * is attached to. if it is then we'll do the attachment in our caller. @@ -852,9 +852,9 @@ xcf_load_layer (XcfInfo * info, KisImage * gimage) is_fs_drawable = (info->cp == info->floating_sel_offset); /* read in the layer width, height, type and name */ - info->cp += xcf_read_int32 (info->fp, (Q_INT32 *) & width, 1); - info->cp += xcf_read_int32 (info->fp, (Q_INT32 *) & height, 1); - info->cp += xcf_read_int32 (info->fp, (Q_INT32 *) & type, 1); + info->cp += xcf_read_int32 (info->fp, (TQ_INT32 *) & width, 1); + info->cp += xcf_read_int32 (info->fp, (TQ_INT32 *) & height, 1); + info->cp += xcf_read_int32 (info->fp, (TQ_INT32 *) & type, 1); info->cp += xcf_read_string (info->fp, &name, 1); /* create a new layer */ @@ -866,7 +866,7 @@ xcf_load_layer (XcfInfo * info, KisImage * gimage) /* read in the layer properties */ if (!xcf_load_layer_props (info, gimage, layer, - &apply_mask, &edit_mask, &show_mask, + &apply_tqmask, &edit_tqmask, &show_tqmask, &text_layer_flags)) goto error; @@ -885,9 +885,9 @@ xcf_load_layer (XcfInfo * info, KisImage * gimage) info->floating_sel = layer; } - /* read the hierarchy and layer mask offsets */ + /* read the hierarchy and layer tqmask offsets */ info->cp += xcf_read_int32 (info->fp, &hierarchy_offset, 1); - info->cp += xcf_read_int32 (info->fp, &layer_mask_offset, 1); + info->cp += xcf_read_int32 (info->fp, &layer_tqmask_offset, 1); /* read in the hierarchy */ if (!xcf_seek_pos (info, hierarchy_offset, NULL)) @@ -896,21 +896,21 @@ xcf_load_layer (XcfInfo * info, KisImage * gimage) if (!xcf_load_hierarchy (info, GIMP_DRAWABLE (layer)->tiles)) goto error; - /* read in the layer mask */ - if (layer_mask_offset != 0) + /* read in the layer tqmask */ + if (layer_tqmask_offset != 0) { - if (!xcf_seek_pos (info, layer_mask_offset, NULL)) + if (!xcf_seek_pos (info, layer_tqmask_offset, NULL)) goto error; - layer_mask = xcf_load_layer_mask (info, gimage); - if (!layer_mask) + layer_tqmask = xcf_load_layer_tqmask (info, gimage); + if (!layer_tqmask) goto error; - layer_mask->apply_mask = apply_mask; - layer_mask->edit_mask = edit_mask; - layer_mask->show_mask = show_mask; + layer_tqmask->apply_tqmask = apply_tqmask; + layer_tqmask->edit_tqmask = edit_tqmask; + layer_tqmask->show_tqmask = show_tqmask; - gimp_layer_add_mask (layer, layer_mask, FALSE); + gimp_layer_add_tqmask (layer, layer_tqmask, FALSE); } /* attach the floating selection... */ @@ -928,11 +928,11 @@ static GimpChannel * xcf_load_channel (XcfInfo * info, KisImage * gimage) { GimpChannel *channel; - Q_INT32 hierarchy_offset; - Q_INT32 width; - Q_INT32 height; + TQ_INT32 hierarchy_offset; + TQ_INT32 width; + TQ_INT32 height; bool is_fs_drawable; - QCString *name; + TQCString *name; GimpRGB color = { 0.0, 0.0, 0.0, GIMP_OPACITY_OPAQUE }; /* check and see if this is the drawable the floating selection @@ -941,8 +941,8 @@ xcf_load_channel (XcfInfo * info, KisImage * gimage) is_fs_drawable = (info->cp == info->floating_sel_offset); /* read in the layer width, height and name */ - info->cp += xcf_read_int32 (info->fp, (Q_INT32 *) & width, 1); - info->cp += xcf_read_int32 (info->fp, (Q_INT32 *) & height, 1); + info->cp += xcf_read_int32 (info->fp, (TQ_INT32 *) & width, 1); + info->cp += xcf_read_int32 (info->fp, (TQ_INT32 *) & height, 1); info->cp += xcf_read_string (info->fp, &name, 1); /* create a new channel */ @@ -955,7 +955,7 @@ xcf_load_channel (XcfInfo * info, KisImage * gimage) if (!xcf_load_channel_props (info, gimage, &channel)) goto error; - /* read the hierarchy and layer mask offsets */ + /* read the hierarchy and layer tqmask offsets */ info->cp += xcf_read_int32 (info->fp, &hierarchy_offset, 1); /* read in the hierarchy */ @@ -976,15 +976,15 @@ error: } static GimpLayerMask * -xcf_load_layer_mask (XcfInfo * info, KisImage * gimage) +xcf_load_layer_tqmask (XcfInfo * info, KisImage * gimage) { - GimpLayerMask *layer_mask; + GimpLayerMask *layer_tqmask; GimpChannel *channel; - Q_INT32 hierarchy_offset; - Q_INT32 width; - Q_INT32 height; + TQ_INT32 hierarchy_offset; + TQ_INT32 width; + TQ_INT32 height; bool is_fs_drawable; - QCString *name; + TQCString *name; GimpRGB color = { 0.0, 0.0, 0.0, GIMP_OPACITY_OPAQUE }; /* check and see if this is the drawable the floating selection @@ -993,55 +993,55 @@ xcf_load_layer_mask (XcfInfo * info, KisImage * gimage) is_fs_drawable = (info->cp == info->floating_sel_offset); /* read in the layer width, height and name */ - info->cp += xcf_read_int32 (info->fp, (Q_INT32 *) & width, 1); - info->cp += xcf_read_int32 (info->fp, (Q_INT32 *) & height, 1); + info->cp += xcf_read_int32 (info->fp, (TQ_INT32 *) & width, 1); + info->cp += xcf_read_int32 (info->fp, (TQ_INT32 *) & height, 1); info->cp += xcf_read_string (info->fp, &name, 1); - /* create a new layer mask */ - layer_mask = gimp_layer_mask_new (gimage, width, height, name, &color); + /* create a new layer tqmask */ + layer_tqmask = gimp_layer_tqmask_new (gimage, width, height, name, &color); g_free (name); - if (!layer_mask) + if (!layer_tqmask) return NULL; - /* read in the layer_mask properties */ - channel = GIMP_CHANNEL (layer_mask); + /* read in the layer_tqmask properties */ + channel = GIMP_CHANNEL (layer_tqmask); if (!xcf_load_channel_props (info, gimage, &channel)) goto error; - /* read the hierarchy and layer mask offsets */ + /* read the hierarchy and layer tqmask offsets */ info->cp += xcf_read_int32 (info->fp, &hierarchy_offset, 1); /* read in the hierarchy */ if (!xcf_seek_pos (info, hierarchy_offset, NULL)) goto error; - if (!xcf_load_hierarchy (info, GIMP_DRAWABLE (layer_mask)->tiles)) + if (!xcf_load_hierarchy (info, GIMP_DRAWABLE (layer_tqmask)->tiles)) goto error; /* attach the floating selection... */ if (is_fs_drawable) - info->floating_sel_drawable = GIMP_DRAWABLE (layer_mask); + info->floating_sel_drawable = GIMP_DRAWABLE (layer_tqmask); - return layer_mask; + return layer_tqmask; error: - g_object_unref (layer_mask); + g_object_unref (layer_tqmask); return NULL; } static bool xcf_load_hierarchy (XcfInfo * info, TileManager * tiles) { - Q_INT32 saved_pos; - Q_INT32 offset; - Q_INT32 junk; - Q_INT32 width; - Q_INT32 height; - Q_INT32 bpp; + TQ_INT32 saved_pos; + TQ_INT32 offset; + TQ_INT32 junk; + TQ_INT32 width; + TQ_INT32 height; + TQ_INT32 bpp; - info->cp += xcf_read_int32 (info->fp, (Q_INT32 *) & width, 1); - info->cp += xcf_read_int32 (info->fp, (Q_INT32 *) & height, 1); - info->cp += xcf_read_int32 (info->fp, (Q_INT32 *) & bpp, 1); + info->cp += xcf_read_int32 (info->fp, (TQ_INT32 *) & width, 1); + info->cp += xcf_read_int32 (info->fp, (TQ_INT32 *) & height, 1); + info->cp += xcf_read_int32 (info->fp, (TQ_INT32 *) & bpp, 1); /* make sure the values in the file correspond to the values * calculated when the TileManager was created. @@ -1092,18 +1092,18 @@ xcf_load_hierarchy (XcfInfo * info, TileManager * tiles) static bool xcf_load_level (XcfInfo * info, TileManager * tiles) { - Q_INT32 saved_pos; - Q_INT32 offset, offset2; - Q_UINT32 ntiles; - Q_INT32 width; - Q_INT32 height; - Q_INT32 i; - Q_INT32 fail; + TQ_INT32 saved_pos; + TQ_INT32 offset, offset2; + TQ_UINT32 ntiles; + TQ_INT32 width; + TQ_INT32 height; + TQ_INT32 i; + TQ_INT32 fail; Tile *previous; Tile *tile; - info->cp += xcf_read_int32 (info->fp, (Q_INT32 *) & width, 1); - info->cp += xcf_read_int32 (info->fp, (Q_INT32 *) & height, 1); + info->cp += xcf_read_int32 (info->fp, (TQ_INT32 *) & width, 1); + info->cp += xcf_read_int32 (info->fp, (TQ_INT32 *) & height, 1); if (width != tile_manager_width (tiles) || height != tile_manager_height (tiles)) @@ -1252,12 +1252,12 @@ xcf_load_tile_rle (XcfInfo * info, Tile * tile, int data_length) { guchar *data; guchar val; - Q_INT32 size; - Q_INT32 count; - Q_INT32 length; - Q_INT32 bpp; - Q_INT32 i, j; - Q_INT32 nmemb_read_successfully; + TQ_INT32 size; + TQ_INT32 count; + TQ_INT32 length; + TQ_INT32 bpp; + TQ_INT32 i, j; + TQ_INT32 nmemb_read_successfully; guchar *xcfdata, *xcfodata, *xcfdatalimit; data = tile_data_pointer (tile, 0, 0); @@ -1267,7 +1267,7 @@ xcf_load_tile_rle (XcfInfo * info, Tile * tile, int data_length) /* we have to use fread instead of xcf_read_* because we may be reading past the end of the file here */ - nmemb_read_successfully = fread ((QCString *) xcfdata, sizeof (QCString), + nmemb_read_successfully = fread ((TQCString *) xcfdata, sizeof (TQCString), data_length, info->fp); info->cp += nmemb_read_successfully; @@ -1377,7 +1377,7 @@ xcf_load_parasite (XcfInfo * info) info->cp += xcf_read_string (info->fp, &p->name, 1); info->cp += xcf_read_int32 (info->fp, &p->flags, 1); info->cp += xcf_read_int32 (info->fp, &p->size, 1); - p->data = g_new (QCString, p->size); + p->data = g_new (TQCString, p->size); info->cp += xcf_read_int8 (info->fp, p->data, p->size); return p; @@ -1386,8 +1386,8 @@ xcf_load_parasite (XcfInfo * info) static bool xcf_load_old_paths (XcfInfo * info, KisImage * gimage) { - Q_INT32 num_paths; - Q_INT32 last_selected_row; + TQ_INT32 num_paths; + TQ_INT32 last_selected_row; GimpVectors *active_vectors; info->cp += xcf_read_int32 (info->fp, &last_selected_row, 1); @@ -1408,16 +1408,16 @@ xcf_load_old_paths (XcfInfo * info, KisImage * gimage) static bool xcf_load_old_path (XcfInfo * info, KisImage * gimage) { - QCString *name; - Q_INT32 locked; - Q_UINT8 state; - Q_INT32 closed; - Q_INT32 num_points; - Q_INT32 version; /* changed from num_paths */ + TQCString *name; + TQ_INT32 locked; + TQ_UINT8 state; + TQ_INT32 closed; + TQ_INT32 num_points; + TQ_INT32 version; /* changed from num_paths */ GimpTattoo tattoo = 0; GimpVectors *vectors; GimpVectorsCompatPoint *points; - Q_INT32 i; + TQ_INT32 i; info->cp += xcf_read_string (info->fp, &name, 1); info->cp += xcf_read_int32 (info->fp, &locked, 1); @@ -1428,18 +1428,18 @@ xcf_load_old_path (XcfInfo * info, KisImage * gimage) if (version == 2) { - Q_INT32 dummy; + TQ_INT32 dummy; /* Had extra type field and points are stored as doubles */ - info->cp += xcf_read_int32 (info->fp, (Q_INT32 *) & dummy, 1); + info->cp += xcf_read_int32 (info->fp, (TQ_INT32 *) & dummy, 1); } else if (version == 3) { - Q_INT32 dummy; + TQ_INT32 dummy; /* Has extra tatto field */ - info->cp += xcf_read_int32 (info->fp, (Q_INT32 *) & dummy, 1); - info->cp += xcf_read_int32 (info->fp, (Q_INT32 *) & tattoo, 1); + info->cp += xcf_read_int32 (info->fp, (TQ_INT32 *) & dummy, 1); + info->cp += xcf_read_int32 (info->fp, (TQ_INT32 *) & tattoo, 1); } else if (version != 1) { @@ -1458,12 +1458,12 @@ xcf_load_old_path (XcfInfo * info, KisImage * gimage) { if (version == 1) { - Q_INT3232 x; - Q_INT3232 y; + TQ_INT3232 x; + TQ_INT3232 y; info->cp += xcf_read_int32 (info->fp, &points[i].type, 1); - info->cp += xcf_read_int32 (info->fp, (Q_INT32 *) & x, 1); - info->cp += xcf_read_int32 (info->fp, (Q_INT32 *) & y, 1); + info->cp += xcf_read_int32 (info->fp, (TQ_INT32 *) & x, 1); + info->cp += xcf_read_int32 (info->fp, (TQ_INT32 *) & y, 1); points[i].x = x; points[i].y = y; @@ -1494,7 +1494,7 @@ xcf_load_old_path (XcfInfo * info, KisImage * gimage) GIMP_ITEM (vectors)->tattoo = tattoo; gimp_image_add_vectors (gimage, vectors, - gimp_container_num_children (gimage->vectors)); + gimp_container_num_tqchildren (gimage->vectors)); return TRUE; } @@ -1502,11 +1502,11 @@ xcf_load_old_path (XcfInfo * info, KisImage * gimage) static bool xcf_load_vectors (XcfInfo * info, KisImage * gimage) { - Q_INT32 version; - Q_INT32 active_index; - Q_INT32 num_paths; + TQ_INT32 version; + TQ_INT32 active_index; + TQ_INT32 num_paths; GimpVectors *active_vectors; - Q_INT32 base; + TQ_INT32 base; #ifdef GIMP_XCF_PATH_DEBUG g_printerr ("xcf_load_vectors\n"); @@ -1548,14 +1548,14 @@ xcf_load_vectors (XcfInfo * info, KisImage * gimage) static bool xcf_load_vector (XcfInfo * info, KisImage * gimage) { - QCString *name; + TQCString *name; GimpTattoo tattoo = 0; - Q_INT32 visible; - Q_INT32 linked; - Q_INT32 num_parasites; - Q_INT32 num_strokes; + TQ_INT32 visible; + TQ_INT32 linked; + TQ_INT32 num_parasites; + TQ_INT32 num_strokes; GimpVectors *vectors; - Q_INT32 i; + TQ_INT32 i; #ifdef GIMP_XCF_PATH_DEBUG g_printerr ("xcf_load_vector\n"); @@ -1598,14 +1598,14 @@ xcf_load_vector (XcfInfo * info, KisImage * gimage) for (i = 0; i < num_strokes; i++) { - Q_INT32 stroke_type_id; - Q_INT32 closed; - Q_INT32 num_axes; - Q_INT32 num_control_points; - Q_INT32 type; + TQ_INT32 stroke_type_id; + TQ_INT32 closed; + TQ_INT32 num_axes; + TQ_INT32 num_control_points; + TQ_INT32 type; float coords[6] = { 0.0, 0.0, 1.0, 0.5, 0.5, 0.5 }; GimpStroke *stroke; - Q_INT32 j; + TQ_INT32 j; GValueArray *control_points; GValue value = { 0, }; @@ -1674,7 +1674,7 @@ xcf_load_vector (XcfInfo * info, KisImage * gimage) } gimp_image_add_vectors (gimage, vectors, - gimp_container_num_children (gimage->vectors)); + gimp_container_num_tqchildren (gimage->vectors)); return TRUE; } @@ -1682,12 +1682,12 @@ xcf_load_vector (XcfInfo * info, KisImage * gimage) #ifdef SWAP_FROM_FILE static bool -xcf_swap_func (Q_INT32 fd, Tile * tile, Q_INT32 cmd, gpointer user_data) +xcf_swap_func (TQ_INT32 fd, Tile * tile, TQ_INT32 cmd, gpointer user_data) { - Q_INT32 bytes; - Q_INT32 err; - Q_INT32 nleft; - Q_INT32 *ref_count; + TQ_INT32 bytes; + TQ_INT32 err; + TQ_INT32 nleft; + TQ_INT32 *ref_count; switch (cmd) { diff --git a/filters/krita/xcf/xcf/xcf-private.h b/filters/krita/xcf/xcf/xcf-private.h index d568f052..3a832fbd 100644 --- a/filters/krita/xcf/xcf/xcf-private.h +++ b/filters/krita/xcf/xcf/xcf-private.h @@ -19,7 +19,7 @@ #ifndef __XCF_PRIVATE_H__ #define __XCF_PRIVATE_H__ -#include +#include typedef enum { @@ -64,7 +64,7 @@ typedef enum { XCF_ORIENTATION_HORIZONTAL = 1, XCF_ORIENTATION_VERTICAL = 2 -} XcfOrientationType; +} XcfQt::OrientationType; typedef enum { @@ -77,18 +77,18 @@ typedef struct _XcfInfo XcfInfo; struct _XcfInfo { FILE *fp; - Q_UINT32 cp; - const QCString filename; + TQ_UINT32 cp; + const TQCString filename; //GimpTattoo tattoo_state; KisLayer *active_layer; //GimpChannel *active_channel; //GimpDrawable *floating_sel_drawable; KisLayer *floating_sel; - Q_UINT32 floating_sel_offset; - Q_INT32 swap_num; - Q_INT32 *ref_count; + TQ_UINT32 floating_sel_offset; + TQ_INT32 swap_num; + TQ_INT32 *ref_count; XcfCompressionType compression; - Q_INT32 file_version; + TQ_INT32 file_version; }; diff --git a/filters/krita/xcf/xcf/xcf-read.cc b/filters/krita/xcf/xcf/xcf-read.cc index 04972294..314daa90 100644 --- a/filters/krita/xcf/xcf/xcf-read.cc +++ b/filters/krita/xcf/xcf/xcf-read.cc @@ -29,17 +29,17 @@ #include "gimp-intl.h" -Q_UINT32 +TQ_UINT32 xcf_read_int32 (FILE *fp, - Q_INT32 *data, - Q_INT32 count) + TQ_INT32 *data, + TQ_INT32 count) { - Q_UINT32 total; + TQ_UINT32 total; total = count; if (count > 0) { - xcf_read_int8 (fp, (Q_UINT8 *) data, count * 4); + xcf_read_int8 (fp, (TQ_UINT8 *) data, count * 4); while (count--) { @@ -51,21 +51,21 @@ xcf_read_int32 (FILE *fp, return total * 4; } -Q_UINT32 +TQ_UINT32 xcf_read_float (FILE *fp, float *data, - Q_INT32 count) + TQ_INT32 count) { - return xcf_read_int32 (fp, (Q_INT32 *) ((void *) data), count); + return xcf_read_int32 (fp, (TQ_INT32 *) ((void *) data), count); } -Q_UINT32 +TQ_UINT32 xcf_read_int8 (FILE *fp, - Q_UINT8 *data, - Q_INT32 count) + TQ_UINT8 *data, + TQ_INT32 count) { - Q_UINT32 total; - Q_INT32 bytes; + TQ_UINT32 total; + TQ_INT32 bytes; total = count; while (count > 0) @@ -80,14 +80,14 @@ xcf_read_int8 (FILE *fp, return total; } -Q_UINT32 +TQ_UINT32 xcf_read_string (FILE *fp, - QCString **data, - Q_INT32 count) + TQCString **data, + TQ_INT32 count) { - Q_INT32 tmp; - Q_UINT32 total; - Q_INT32 i; + TQ_INT32 tmp; + TQ_UINT32 total; + TQ_INT32 i; total = 0; for (i = 0; i < count; i++) @@ -95,10 +95,10 @@ xcf_read_string (FILE *fp, total += xcf_read_int32 (fp, &tmp, 1); if (tmp > 0) { - QCString *str; + TQCString *str; - str = g_new (QCString, tmp); - total += xcf_read_int8 (fp, (Q_UINT8*) str, tmp); + str = g_new (TQCString, tmp); + total += xcf_read_int8 (fp, (TQ_UINT8*) str, tmp); if (str[tmp - 1] != '\0') str[tmp - 1] = '\0'; diff --git a/filters/krita/xcf/xcf/xcf-read.h b/filters/krita/xcf/xcf/xcf-read.h index 3038ca44..b90b8a41 100644 --- a/filters/krita/xcf/xcf/xcf-read.h +++ b/filters/krita/xcf/xcf/xcf-read.h @@ -20,18 +20,18 @@ #define __XCF_READ_H__ -Q_UINT32 xcf_read_int32 (FILE *fp, - Q_INT32 *data, - Q_INT32 count); -Q_UINT32 xcf_read_float (FILE *fp, +TQ_UINT32 xcf_read_int32 (FILE *fp, + TQ_INT32 *data, + TQ_INT32 count); +TQ_UINT32 xcf_read_float (FILE *fp, float *data, - Q_INT32 count); -Q_UINT32 xcf_read_int8 (FILE *fp, - Q_UINT8 *data, - Q_INT32 count); -Q_UINT32 xcf_read_string (FILE *fp, - QCString **data, - Q_INT32 count); + TQ_INT32 count); +TQ_UINT32 xcf_read_int8 (FILE *fp, + TQ_UINT8 *data, + TQ_INT32 count); +TQ_UINT32 xcf_read_string (FILE *fp, + TQCString **data, + TQ_INT32 count); #endif /* __XCF_READ_H__ */ diff --git a/filters/krita/xcf/xcf/xcf-save.cc b/filters/krita/xcf/xcf/xcf-save.cc index 420578c7..50e5fb17 100644 --- a/filters/krita/xcf/xcf/xcf-save.cc +++ b/filters/krita/xcf/xcf/xcf-save.cc @@ -40,7 +40,7 @@ #include "core/gimpimage-guides.h" #include "core/gimplayer.h" #include "core/gimplayer-floating-sel.h" -#include "core/gimplayermask.h" +#include "core/gimplayertqmask.h" #include "core/gimplist.h" #include "core/gimpparasitelist.h" #include "core/gimpunit.h" @@ -191,12 +191,12 @@ static bool xcf_save_vectors (XcfInfo *info, } G_STMT_END #define xcf_write_prop_type_check_error(info, prop_type) G_STMT_START { \ - Q_INT32 _prop_int32 = prop_type; \ + TQ_INT32 _prop_int32 = prop_type; \ xcf_write_int32_check_error (info, &_prop_int32, 1); \ } G_STMT_END #define xcf_write_prop_type_print_error(info, prop_type) G_STMT_START { \ - Q_INT32 _prop_int32 = prop_type; \ + TQ_INT32 _prop_int32 = prop_type; \ xcf_write_int32_print_error (info, &_prop_int32, 1); \ } G_STMT_END @@ -222,7 +222,7 @@ xcf_save_choose_format (XcfInfo *info, KisLayer *layer; GList *list; - Q_INT32 save_version = 0; /* default to oldest */ + TQ_INT32 save_version = 0; /* default to oldest */ if (gimage->cmap) save_version = 1; /* need version 1 for colormaps */ @@ -251,21 +251,21 @@ xcf_save_choose_format (XcfInfo *info, info->file_version = save_version; } -Q_INT32 +TQ_INT32 xcf_save_image (XcfInfo *info, KisImage *gimage) { KisLayer *layer; KisLayer *floating_layer; GimpChannel *channel; - Q_INT32 saved_pos; - Q_INT32 offset; - Q_UINT32 nlayers; - Q_UINT32 nchannels; + TQ_INT32 saved_pos; + TQ_INT32 offset; + TQ_UINT32 nlayers; + TQ_UINT32 nchannels; GList *list; bool have_selection; - Q_INT32 t1, t2, t3, t4; - QCString version_tag[14]; + TQ_INT32 t1, t2, t3, t4; + TQCString version_tag[14]; GError *error = NULL; floating_layer = gimp_image_floating_sel (gimage); @@ -281,19 +281,19 @@ xcf_save_image (XcfInfo *info, { strcpy (version_tag, "gimp xcf file"); } - xcf_write_int8_print_error (info, (Q_UINT8 *) version_tag, 14); + xcf_write_int8_print_error (info, (TQ_UINT8 *) version_tag, 14); /* write out the width, height and image type information for the image */ - xcf_write_int32_print_error (info, (Q_INT32 *) &gimage->width, 1); - xcf_write_int32_print_error (info, (Q_INT32 *) &gimage->height, 1); - xcf_write_int32_print_error (info, (Q_INT32 *) &gimage->base_type, 1); + xcf_write_int32_print_error (info, (TQ_INT32 *) &gimage->width, 1); + xcf_write_int32_print_error (info, (TQ_INT32 *) &gimage->height, 1); + xcf_write_int32_print_error (info, (TQ_INT32 *) &gimage->base_type, 1); /* determine the number of layers and channels in the image */ - nlayers = (Q_UINT32) gimp_container_num_children (gimage->layers); - nchannels = (Q_UINT32) gimp_container_num_children (gimage->channels); + nlayers = (TQ_UINT32) gimp_container_num_tqchildren (gimage->layers); + nchannels = (TQ_UINT32) gimp_container_num_tqchildren (gimage->channels); /* check and see if we have to save out the selection */ - have_selection = gimp_channel_bounds (gimp_image_get_mask (gimage), + have_selection = gimp_channel_bounds (gimp_image_get_tqmask (gimage), &t1, &t2, &t3, &t4); if (have_selection) nchannels += 1; @@ -365,7 +365,7 @@ xcf_save_image (XcfInfo *info, } else { - channel = gimage->selection_mask; + channel = gimage->selection_tqmask; have_selection = FALSE; } @@ -442,7 +442,7 @@ xcf_save_image_props (XcfInfo *info, if (unit < _gimp_unit_get_number_of_built_in_units (gimage->gimp)) xcf_check_error (xcf_save_prop (info, gimage, PROP_UNIT, error, unit)); - if (gimp_container_num_children (gimage->vectors) > 0) + if (gimp_container_num_tqchildren (gimage->vectors) > 0) { if (gimp_vectors_compat_is_compatible (gimage)) xcf_check_error (xcf_save_prop (info, gimage, PROP_PATHS, error)); @@ -506,14 +506,14 @@ xcf_save_layer_props (XcfInfo *info, xcf_check_error (xcf_save_prop (info, gimage, PROP_LOCK_ALPHA, error, layer->lock_alpha)); - if (layer->mask) + if (layer->tqmask) { xcf_check_error (xcf_save_prop (info, gimage, PROP_APPLY_MASK, - error, layer->mask->apply_mask)); + error, layer->tqmask->apply_tqmask)); xcf_check_error (xcf_save_prop (info, gimage, PROP_EDIT_MASK, - error, layer->mask->edit_mask)); + error, layer->tqmask->edit_tqmask)); xcf_check_error (xcf_save_prop (info, gimage, PROP_SHOW_MASK, - error, layer->mask->show_mask)); + error, layer->tqmask->show_tqmask)); } else { @@ -536,7 +536,7 @@ xcf_save_layer_props (XcfInfo *info, if (GIMP_IS_TEXT_LAYER (layer) && GIMP_TEXT_LAYER (layer)->text) { GimpTextLayer *text_layer = GIMP_TEXT_LAYER (layer); - Q_INT32 flags = gimp_text_layer_get_xcf_flags (text_layer); + TQ_INT32 flags = gimp_text_layer_get_xcf_flags (text_layer); gimp_text_layer_xcf_save_prepare (text_layer); @@ -575,7 +575,7 @@ xcf_save_channel_props (XcfInfo *info, if (channel == gimp_image_get_active_channel (gimage)) xcf_check_error (xcf_save_prop (info, gimage, PROP_ACTIVE_CHANNEL, error)); - if (channel == gimage->selection_mask) + if (channel == gimage->selection_tqmask) xcf_check_error (xcf_save_prop (info, gimage, PROP_SELECTION, error)); xcf_check_error (xcf_save_prop (info, gimage, PROP_OPACITY, error, @@ -585,7 +585,7 @@ xcf_save_channel_props (XcfInfo *info, xcf_check_error (xcf_save_prop (info, gimage, PROP_LINKED, error, gimp_item_get_linked (GIMP_ITEM (channel)))); xcf_check_error (xcf_save_prop (info, gimage, PROP_SHOW_MASKED, error, - channel->show_masked)); + channel->show_tqmasked)); gimp_rgb_get_uchar (&channel->color, &col[0], &col[1], &col[2]); xcf_check_error (xcf_save_prop (info, gimage, PROP_COLOR, error, col)); @@ -609,7 +609,7 @@ xcf_save_prop (XcfInfo *info, GError **error, ...) { - Q_INT32 size; + TQ_INT32 size; va_list args; GError *tmp_error = NULL; @@ -627,10 +627,10 @@ xcf_save_prop (XcfInfo *info, case PROP_COLORMAP: { - Q_INT32 ncolors; + TQ_INT32 ncolors; guchar *colors; - ncolors = va_arg (args, Q_INT32); + ncolors = va_arg (args, TQ_INT32); colors = va_arg (args, guchar*); size = 4 + ncolors * 3; @@ -652,7 +652,7 @@ xcf_save_prop (XcfInfo *info, case PROP_FLOATING_SELECTION: { - Q_INT32 dummy; + TQ_INT32 dummy; dummy = 0; size = 4; @@ -667,7 +667,7 @@ xcf_save_prop (XcfInfo *info, case PROP_OPACITY: { gdouble opacity; - Q_INT32 uint_opacity; + TQ_INT32 uint_opacity; opacity = va_arg (args, gdouble); @@ -683,22 +683,22 @@ xcf_save_prop (XcfInfo *info, case PROP_MODE: { - Q_INT3232 mode; + TQ_INT3232 mode; - mode = va_arg (args, Q_INT3232); + mode = va_arg (args, TQ_INT3232); size = 4; xcf_write_prop_type_check_error (info, prop_type); xcf_write_int32_check_error (info, &size, 1); - xcf_write_int32_check_error (info, (Q_INT32 *) &mode, 1); + xcf_write_int32_check_error (info, (TQ_INT32 *) &mode, 1); } break; case PROP_VISIBLE: { - Q_INT32 visible; + TQ_INT32 visible; - visible = va_arg (args, Q_INT32); + visible = va_arg (args, TQ_INT32); size = 4; xcf_write_prop_type_check_error (info, prop_type); @@ -709,9 +709,9 @@ xcf_save_prop (XcfInfo *info, case PROP_LINKED: { - Q_INT32 linked; + TQ_INT32 linked; - linked = va_arg (args, Q_INT32); + linked = va_arg (args, TQ_INT32); size = 4; xcf_write_prop_type_check_error (info, prop_type); @@ -722,9 +722,9 @@ xcf_save_prop (XcfInfo *info, case PROP_LOCK_ALPHA: { - Q_INT32 lock_alpha; + TQ_INT32 lock_alpha; - lock_alpha = va_arg (args, Q_INT32); + lock_alpha = va_arg (args, TQ_INT32); size = 4; xcf_write_prop_type_check_error (info, prop_type); @@ -735,67 +735,67 @@ xcf_save_prop (XcfInfo *info, case PROP_APPLY_MASK: { - Q_INT32 apply_mask; + TQ_INT32 apply_tqmask; - apply_mask = va_arg (args, Q_INT32); + apply_tqmask = va_arg (args, TQ_INT32); size = 4; xcf_write_prop_type_check_error (info, prop_type); xcf_write_int32_check_error (info, &size, 1); - xcf_write_int32_check_error (info, &apply_mask, 1); + xcf_write_int32_check_error (info, &apply_tqmask, 1); } break; case PROP_EDIT_MASK: { - Q_INT32 edit_mask; + TQ_INT32 edit_tqmask; - edit_mask = va_arg (args, Q_INT32); + edit_tqmask = va_arg (args, TQ_INT32); size = 4; xcf_write_prop_type_check_error (info, prop_type); xcf_write_int32_check_error (info, &size, 1); - xcf_write_int32_check_error (info, &edit_mask, 1); + xcf_write_int32_check_error (info, &edit_tqmask, 1); } break; case PROP_SHOW_MASK: { - Q_INT32 show_mask; + TQ_INT32 show_tqmask; - show_mask = va_arg (args, Q_INT32); + show_tqmask = va_arg (args, TQ_INT32); size = 4; xcf_write_prop_type_check_error (info, prop_type); xcf_write_int32_check_error (info, &size, 1); - xcf_write_int32_check_error (info, &show_mask, 1); + xcf_write_int32_check_error (info, &show_tqmask, 1); } break; case PROP_SHOW_MASKED: { - Q_INT32 show_masked; + TQ_INT32 show_tqmasked; - show_masked = va_arg (args, Q_INT32); + show_tqmasked = va_arg (args, TQ_INT32); size = 4; xcf_write_prop_type_check_error (info, prop_type); xcf_write_int32_check_error (info, &size, 1); - xcf_write_int32_check_error (info, &show_masked, 1); + xcf_write_int32_check_error (info, &show_tqmasked, 1); } break; case PROP_OFFSETS: { - Q_INT3232 offsets[2]; + TQ_INT3232 offsets[2]; - offsets[0] = va_arg (args, Q_INT3232); - offsets[1] = va_arg (args, Q_INT3232); + offsets[0] = va_arg (args, TQ_INT3232); + offsets[1] = va_arg (args, TQ_INT3232); size = 8; xcf_write_prop_type_check_error (info, prop_type); xcf_write_int32_check_error (info, &size, 1); - xcf_write_int32_check_error (info, (Q_INT32 *) offsets, 2); + xcf_write_int32_check_error (info, (TQ_INT32 *) offsets, 2); } break; @@ -814,9 +814,9 @@ xcf_save_prop (XcfInfo *info, case PROP_COMPRESSION: { - Q_UINT8 compression; + TQ_UINT8 compression; - compression = (Q_UINT8) va_arg (args, Q_INT32); + compression = (TQ_UINT8) va_arg (args, TQ_INT32); size = 1; xcf_write_prop_type_check_error (info, prop_type); @@ -829,9 +829,9 @@ xcf_save_prop (XcfInfo *info, { GList *guides; GimpGuide *guide; - Q_INT3232 position; - Q_INT328 orientation; - Q_INT32 nguides; + TQ_INT3232 position; + TQ_INT328 orientation; + TQ_INT32 nguides; guides = va_arg (args, GList *); nguides = g_list_length (guides); @@ -863,8 +863,8 @@ xcf_save_prop (XcfInfo *info, continue; } - xcf_write_int32_check_error (info, (Q_INT32 *) &position, 1); - xcf_write_int8_check_error (info, (Q_UINT8 *) &orientation, 1); + xcf_write_int32_check_error (info, (TQ_INT32 *) &position, 1); + xcf_write_int8_check_error (info, (TQ_UINT8 *) &orientation, 1); } } break; @@ -890,9 +890,9 @@ xcf_save_prop (XcfInfo *info, case PROP_TATTOO: { - Q_INT32 tattoo; + TQ_INT32 tattoo; - tattoo = va_arg (args, Q_INT32); + tattoo = va_arg (args, TQ_INT32); size = 4; xcf_write_prop_type_check_error (info, prop_type); @@ -904,7 +904,7 @@ xcf_save_prop (XcfInfo *info, case PROP_PARASITES: { KisAnnotationList *list; - Q_INT32 base, length; + TQ_INT32 base, length; long pos; list = va_arg (args, KisAnnotationList *); @@ -939,9 +939,9 @@ xcf_save_prop (XcfInfo *info, case PROP_UNIT: { - Q_INT32 unit; + TQ_INT32 unit; - unit = va_arg (args, Q_INT32); + unit = va_arg (args, TQ_INT32); size = 4; @@ -953,7 +953,7 @@ xcf_save_prop (XcfInfo *info, case PROP_PATHS: { - Q_INT32 base, length; + TQ_INT32 base, length; glong pos; xcf_write_prop_type_check_error (info, prop_type); @@ -986,11 +986,11 @@ xcf_save_prop (XcfInfo *info, case PROP_USER_UNIT: { GimpUnit unit; - const QCString *unit_strings[5]; + const TQCString *unit_strings[5]; float factor; - Q_INT32 digits; + TQ_INT32 digits; - unit = va_arg (args, Q_INT32); + unit = va_arg (args, TQ_INT32); /* write the entire unit definition */ unit_strings[0] = _gimp_unit_get_identifier (gimage->gimp, unit); @@ -1013,13 +1013,13 @@ xcf_save_prop (XcfInfo *info, xcf_write_int32_check_error (info, &size, 1); xcf_write_float_check_error (info, &factor, 1); xcf_write_int32_check_error (info, &digits, 1); - xcf_write_string_check_error (info, (QCString **) unit_strings, 5); + xcf_write_string_check_error (info, (TQCString **) unit_strings, 5); } break; case PROP_VECTORS: { - Q_INT32 base, length; + TQ_INT32 base, length; glong pos; xcf_write_prop_type_check_error (info, prop_type); @@ -1051,9 +1051,9 @@ xcf_save_prop (XcfInfo *info, case PROP_TEXT_LAYER_FLAGS: { - Q_INT32 flags; + TQ_INT32 flags; - flags = va_arg (args, Q_INT32); + flags = va_arg (args, TQ_INT32); size = 4; xcf_write_prop_type_check_error (info, prop_type); @@ -1074,8 +1074,8 @@ xcf_save_layer (XcfInfo *info, KisLayer *layer, GError **error) { - Q_INT32 saved_pos; - Q_INT32 offset; + TQ_INT32 saved_pos; + TQ_INT32 offset; GError *tmp_error = NULL; @@ -1092,11 +1092,11 @@ xcf_save_layer (XcfInfo *info, /* write out the width, height and image type information for the layer */ xcf_write_int32_check_error (info, - (Q_INT32 *) &GIMP_ITEM (layer)->width, 1); + (TQ_INT32 *) &GIMP_ITEM (layer)->width, 1); xcf_write_int32_check_error (info, - (Q_INT32 *) &GIMP_ITEM (layer)->height, 1); + (TQ_INT32 *) &GIMP_ITEM (layer)->height, 1); xcf_write_int32_check_error (info, - (Q_INT32 *) &GIMP_DRAWABLE (layer)->type, 1); + (TQ_INT32 *) &GIMP_DRAWABLE (layer)->type, 1); /* write out the layers name */ xcf_write_string_check_error (info, &GIMP_OBJECT (layer)->name, 1); @@ -1120,14 +1120,14 @@ xcf_save_layer (XcfInfo *info, xcf_write_int32_check_error (info, &offset, 1); saved_pos = info->cp; - /* write out the layer mask */ - if (layer->mask) + /* write out the layer tqmask */ + if (layer->tqmask) { xcf_check_error (xcf_seek_end (info, error)); offset = info->cp; xcf_check_error (xcf_save_channel (info, - gimage, GIMP_CHANNEL(layer->mask), + gimage, GIMP_CHANNEL(layer->tqmask), error)); } else @@ -1145,8 +1145,8 @@ xcf_save_channel (XcfInfo *info, GimpChannel *channel, GError **error) { - Q_INT32 saved_pos; - Q_INT32 offset; + TQ_INT32 saved_pos; + TQ_INT32 offset; GError *tmp_error = NULL; @@ -1163,9 +1163,9 @@ xcf_save_channel (XcfInfo *info, /* write out the width and height information for the channel */ xcf_write_int32_check_error (info, - (Q_INT32 *) &GIMP_ITEM (channel)->width, 1); + (TQ_INT32 *) &GIMP_ITEM (channel)->width, 1); xcf_write_int32_check_error (info, - (Q_INT32 *) &GIMP_ITEM (channel)->height, 1); + (TQ_INT32 *) &GIMP_ITEM (channel)->height, 1); /* write out the channels name */ xcf_write_string_check_error (info, &GIMP_OBJECT (channel)->name, 1); @@ -1192,9 +1192,9 @@ xcf_save_channel (XcfInfo *info, return TRUE; } -static Q_INT32 -xcf_calc_levels (Q_INT32 size, - Q_INT32 tile_size) +static TQ_INT32 +xcf_calc_levels (TQ_INT32 size, + TQ_INT32 tile_size) { int levels; @@ -1214,14 +1214,14 @@ xcf_save_hierarchy (XcfInfo *info, TileManager *tiles, GError **error) { - Q_INT32 saved_pos; - Q_INT32 offset; - Q_INT32 width; - Q_INT32 height; - Q_INT32 bpp; - Q_INT32 i; - Q_INT32 nlevels; - Q_INT32 tmp1, tmp2; + TQ_INT32 saved_pos; + TQ_INT32 offset; + TQ_INT32 width; + TQ_INT32 height; + TQ_INT32 bpp; + TQ_INT32 i; + TQ_INT32 nlevels; + TQ_INT32 tmp1, tmp2; GError *tmp_error = NULL; @@ -1229,9 +1229,9 @@ xcf_save_hierarchy (XcfInfo *info, height = tile_manager_height (tiles); bpp = tile_manager_bpp (tiles); - xcf_write_int32_check_error (info, (Q_INT32 *) &width, 1); - xcf_write_int32_check_error (info, (Q_INT32 *) &height, 1); - xcf_write_int32_check_error (info, (Q_INT32 *) &bpp, 1); + xcf_write_int32_check_error (info, (TQ_INT32 *) &width, 1); + xcf_write_int32_check_error (info, (TQ_INT32 *) &height, 1); + xcf_write_int32_check_error (info, (TQ_INT32 *) &bpp, 1); saved_pos = info->cp; @@ -1256,9 +1256,9 @@ xcf_save_hierarchy (XcfInfo *info, tmp1 = 0; width /= 2; height /= 2; - xcf_write_int32_check_error (info, (Q_INT32 *) &width, 1); - xcf_write_int32_check_error (info, (Q_INT32 *) &height, 1); - xcf_write_int32_check_error (info, (Q_INT32 *) &tmp1, 1); + xcf_write_int32_check_error (info, (TQ_INT32 *) &width, 1); + xcf_write_int32_check_error (info, (TQ_INT32 *) &height, 1); + xcf_write_int32_check_error (info, (TQ_INT32 *) &tmp1, 1); } /* seek back to where we are to write out the next @@ -1293,12 +1293,12 @@ xcf_save_level (XcfInfo *info, TileManager *level, GError **error) { - Q_INT32 saved_pos; - Q_INT32 offset; - Q_INT32 width; - Q_INT32 height; - Q_UINT32 ntiles; - Q_INT32 i; + TQ_INT32 saved_pos; + TQ_INT32 offset; + TQ_INT32 width; + TQ_INT32 height; + TQ_UINT32 ntiles; + TQ_INT32 i; guchar *rlebuf; GError *tmp_error = NULL; @@ -1306,8 +1306,8 @@ xcf_save_level (XcfInfo *info, width = tile_manager_width (level); height = tile_manager_height (level); - xcf_write_int32_check_error (info, (Q_INT32 *) &width, 1); - xcf_write_int32_check_error (info, (Q_INT32 *) &height, 1); + xcf_write_int32_check_error (info, (TQ_INT32 *) &width, 1); + xcf_write_int32_check_error (info, (TQ_INT32 *) &height, 1); saved_pos = info->cp; @@ -1400,13 +1400,13 @@ xcf_save_tile_rle (XcfInfo *info, { guchar *data, *t; unsigned int last; - Q_INT32 state; - Q_INT32 length; - Q_INT32 count; - Q_INT32 size; - Q_INT32 bpp; - Q_INT32 i, j; - Q_INT32 len = 0; + TQ_INT32 state; + TQ_INT32 length; + TQ_INT32 count; + TQ_INT32 size; + TQ_INT32 bpp; + TQ_INT32 i, j; + TQ_INT32 len = 0; GError *tmp_error = NULL; @@ -1533,7 +1533,7 @@ typedef struct } XcfParasiteData; static void -xcf_save_parasite_func (QCString *key, +xcf_save_parasite_func (TQCString *key, KisAnnotation *parasite, XcfParasiteData *data) { @@ -1568,20 +1568,20 @@ xcf_save_old_paths (XcfInfo *info, GError **error) { GimpVectors *active_vectors; - Q_INT32 num_paths; - Q_INT32 active_index = 0; + TQ_INT32 num_paths; + TQ_INT32 active_index = 0; GList *list; GError *tmp_error = NULL; /* Write out the following:- * - * last_selected_row (Q_INT32) - * number_of_paths (Q_INT32) + * last_selected_row (TQ_INT32) + * number_of_paths (TQ_INT32) * * then each path:- */ - num_paths = gimp_container_num_children (gimage->vectors); + num_paths = gimp_container_num_tqchildren (gimage->vectors); active_vectors = gimp_image_get_active_vectors (gimage); @@ -1597,26 +1597,26 @@ xcf_save_old_paths (XcfInfo *info, list = g_list_next (list)) { GimpVectors *vectors = list->data; - QCString *name; - Q_INT32 locked; - Q_UINT8 state; - Q_INT32 version; - Q_INT32 pathtype; - Q_INT32 tattoo; + TQCString *name; + TQ_INT32 locked; + TQ_UINT8 state; + TQ_INT32 version; + TQ_INT32 pathtype; + TQ_INT32 tattoo; GimpVectorsCompatPoint *points; - Q_INT3232 num_points; - Q_INT3232 closed; - Q_INT32 i; + TQ_INT3232 num_points; + TQ_INT3232 closed; + TQ_INT32 i; /* * name (string) - * locked (Q_INT32) - * state (QCString) - * closed (Q_INT32) - * number points (Q_INT32) - * version (Q_INT32) - * pathtype (Q_INT32) - * tattoo (Q_INT32) + * locked (TQ_INT32) + * state (TQCString) + * closed (TQ_INT32) + * number points (TQ_INT32) + * version (TQ_INT32) + * pathtype (TQ_INT32) + * tattoo (TQ_INT32) * then each point. */ @@ -1627,7 +1627,7 @@ xcf_save_old_paths (XcfInfo *info, * we already saved the number of paths and I wont start seeking * around to fix that cruft */ - name = (QCString *) gimp_object_get_name (GIMP_OBJECT (vectors)); + name = (TQCString *) gimp_object_get_name (GIMP_OBJECT (vectors)); locked = gimp_item_get_linked (GIMP_ITEM (vectors)); state = closed ? 4 : 2; /* EDIT : ADD (editing state, 1.2 compat) */ version = 3; @@ -1652,7 +1652,7 @@ xcf_save_old_paths (XcfInfo *info, y = points[i].y; /* - * type (Q_INT32) + * type (TQ_INT32) * x (float) * y (float) */ @@ -1674,18 +1674,18 @@ xcf_save_vectors (XcfInfo *info, GError **error) { GimpVectors *active_vectors; - Q_INT32 version = 1; - Q_INT32 active_index = 0; - Q_INT32 num_paths; + TQ_INT32 version = 1; + TQ_INT32 active_index = 0; + TQ_INT32 num_paths; GList *list; GList *stroke_list; GError *tmp_error = NULL; /* Write out the following:- * - * version (Q_INT32) - * active_index (Q_INT32) - * num_paths (Q_INT32) + * version (TQ_INT32) + * active_index (TQ_INT32) + * num_paths (TQ_INT32) * * then each path:- */ @@ -1696,7 +1696,7 @@ xcf_save_vectors (XcfInfo *info, active_index = gimp_container_get_child_index (gimage->vectors, GIMP_OBJECT (active_vectors)); - num_paths = gimp_container_num_children (gimage->vectors); + num_paths = gimp_container_num_tqchildren (gimage->vectors); xcf_write_int32_check_error (info, &version, 1); xcf_write_int32_check_error (info, &active_index, 1); @@ -1708,20 +1708,20 @@ xcf_save_vectors (XcfInfo *info, { GimpVectors *vectors = list->data; KisAnnotationList *parasites; - QCString *name; - Q_INT32 tattoo; - Q_INT32 visible; - Q_INT32 linked; - Q_INT32 num_parasites; - Q_INT32 num_strokes; + TQCString *name; + TQ_INT32 tattoo; + TQ_INT32 visible; + TQ_INT32 linked; + TQ_INT32 num_parasites; + TQ_INT32 num_strokes; /* * name (string) - * tattoo (Q_INT32) - * visible (Q_INT32) - * linked (Q_INT32) - * num_parasites (Q_INT32) - * num_strokes (Q_INT32) + * tattoo (TQ_INT32) + * visible (TQ_INT32) + * linked (TQ_INT32) + * num_parasites (TQ_INT32) + * num_strokes (TQ_INT32) * * then each parasite * then each stroke @@ -1729,7 +1729,7 @@ xcf_save_vectors (XcfInfo *info, parasites = GIMP_ITEM (vectors)->parasites; - name = (QCString *) gimp_object_get_name (GIMP_OBJECT (vectors)); + name = (TQCString *) gimp_object_get_name (GIMP_OBJECT (vectors)); visible = gimp_item_get_visible (GIMP_ITEM (vectors)); linked = gimp_item_get_linked (GIMP_ITEM (vectors)); tattoo = gimp_item_get_tattoo (GIMP_ITEM (vectors)); @@ -1750,20 +1750,20 @@ xcf_save_vectors (XcfInfo *info, stroke_list = g_list_next (stroke_list)) { GimpStroke *stroke; - Q_INT32 stroke_type; - Q_INT32 closed; - Q_INT32 num_axes; + TQ_INT32 stroke_type; + TQ_INT32 closed; + TQ_INT32 num_axes; GArray *control_points; - Q_INT32 i; + TQ_INT32 i; - Q_INT32 type; + TQ_INT32 type; float coords[6]; /* - * stroke_type (Q_INT32) - * closed (Q_INT32) - * num_axes (Q_INT32) - * num_control_points (Q_INT32) + * stroke_type (TQ_INT32) + * closed (TQ_INT32) + * num_axes (TQ_INT32) + * num_control_points (TQ_INT32) * * then each control point. */ @@ -1803,7 +1803,7 @@ xcf_save_vectors (XcfInfo *info, coords[5] = anchor->position.wheel; /* - * type (Q_INT32) + * type (TQ_INT32) * * the first num_axis elements of: * [0] x (float) diff --git a/filters/krita/xcf/xcf/xcf-save.h b/filters/krita/xcf/xcf/xcf-save.h index 74c5278c..cc49d2d3 100644 --- a/filters/krita/xcf/xcf/xcf-save.h +++ b/filters/krita/xcf/xcf/xcf-save.h @@ -22,7 +22,7 @@ void xcf_save_choose_format (XcfInfo *info, KisImage *gimage); -Q_INT32 xcf_save_image (XcfInfo *info, +TQ_INT32 xcf_save_image (XcfInfo *info, KisImage *gimage); diff --git a/filters/krita/xcf/xcf/xcf-seek.cc b/filters/krita/xcf/xcf/xcf-seek.cc index 25e9e344..a24271f5 100644 --- a/filters/krita/xcf/xcf/xcf-seek.cc +++ b/filters/krita/xcf/xcf/xcf-seek.cc @@ -32,7 +32,7 @@ bool xcf_seek_pos (XcfInfo *info, - Q_UINT32 pos, + TQ_UINT32 pos, GError **error) { if (info->cp != pos) diff --git a/filters/krita/xcf/xcf/xcf-seek.h b/filters/krita/xcf/xcf/xcf-seek.h index 99f961bd..1bb7b7a9 100644 --- a/filters/krita/xcf/xcf/xcf-seek.h +++ b/filters/krita/xcf/xcf/xcf-seek.h @@ -21,7 +21,7 @@ bool xcf_seek_pos (XcfInfo *info, - Q_UINT32 pos, + TQ_UINT32 pos, GError **error); bool xcf_seek_end (XcfInfo *info, GError **error); diff --git a/filters/krita/xcf/xcf/xcf-write.cc b/filters/krita/xcf/xcf/xcf-write.cc index 89aa2889..4010ab18 100644 --- a/filters/krita/xcf/xcf/xcf-write.cc +++ b/filters/krita/xcf/xcf/xcf-write.cc @@ -33,17 +33,17 @@ #include "xcf-write.h" -Q_UINT32 xcf_write_int32 (FILE *fp, Q_INT32 *data, Q_INT32 count); +TQ_UINT32 xcf_write_int32 (FILE *fp, TQ_INT32 *data, TQ_INT32 count); { - Q_INT32 tmp; - Q_INT32 i; + TQ_INT32 tmp; + TQ_INT32 i; if (count > 0) { for (i = 0; i < count; i++) { tmp = htonl (data[i]); - xcf_write_int8 (fp, (Q_UINT8*) &tmp, 4); + xcf_write_int8 (fp, (TQ_UINT8*) &tmp, 4); if (fp->status() != IO_Ok) { @@ -55,24 +55,24 @@ Q_UINT32 xcf_write_int32 (FILE *fp, Q_INT32 *data, Q_INT32 count); return count * 4; } -Q_UINT32 xcf_write_float (FILE *fp, float *data, Q_INT32 count); +TQ_UINT32 xcf_write_float (FILE *fp, float *data, TQ_INT32 count); { - return xcf_write_int32 (fp, (Q_INT32 *)((void *)data), count, error); + return xcf_write_int32 (fp, (TQ_INT32 *)((void *)data), count, error); } -Q_UINT32 xcf_write_int8 (FILE *fp, Q_UINT8 *data, Q_INT32 count); +TQ_UINT32 xcf_write_int8 (FILE *fp, TQ_UINT8 *data, TQ_INT32 count); { - Q_INT32 bytes; + TQ_INT32 bytes; bytes = fp->writeBlock( data, count ); return bytes; } -Q_UINT32 xcf_write_string (FILE *fp, QCString *data, Q_INT32 count); +TQ_UINT32 xcf_write_string (FILE *fp, TQCString *data, TQ_INT32 count); { GError *tmp_error = NULL; - Q_INT32 tmp; - Q_UINT32 total; - Q_INT32 i; + TQ_INT32 tmp; + TQ_UINT32 total; + TQ_INT32 i; total = 0; for (i = 0; i < count; i++) @@ -90,7 +90,7 @@ Q_UINT32 xcf_write_string (FILE *fp, QCString *data, Q_INT32 count); } if (tmp > 0) - xcf_write_int8 (fp, (Q_UINT8*) data[i], tmp, &tmp_error); + xcf_write_int8 (fp, (TQ_UINT8*) data[i], tmp, &tmp_error); if (tmp_error) { g_propagate_error (error, tmp_error); diff --git a/filters/krita/xcf/xcf/xcf-write.h b/filters/krita/xcf/xcf/xcf-write.h index 5e470d45..8e21a08e 100644 --- a/filters/krita/xcf/xcf/xcf-write.h +++ b/filters/krita/xcf/xcf/xcf-write.h @@ -19,21 +19,21 @@ #ifndef __XCF_WRITE_H__ #define __XCF_WRITE_H__ -#include -#include -#include +#include +#include +#include // Write count integers to the file -Q_UINT32 xcf_write_int32 (QFile *fp, Q_INT32 *data, Q_INT32 count); +TQ_UINT32 xcf_write_int32 (TQFile *fp, TQ_INT32 *data, TQ_INT32 count); // Write count of floats to the file -Q_UINT32 xcf_write_float (QFile *fp, float *data, Q_INT32 count); +TQ_UINT32 xcf_write_float (TQFile *fp, float *data, TQ_INT32 count); // Write count chars to the file -Q_UINT32 xcf_write_int8 (QFile *fp, Q_UINT8 *data, Q_INT32 count); +TQ_UINT32 xcf_write_int8 (TQFile *fp, TQ_UINT8 *data, TQ_INT32 count); // Write count zero-terminated strings to the file, each string preceded by its length as an integer -Q_UINT32 xcf_write_string (QFile *fp, QCString *data, Q_INT32 count); +TQ_UINT32 xcf_write_string (TQFile *fp, TQCString *data, TQ_INT32 count); #endif /* __XCF_WRITE_H__ */ diff --git a/filters/krita/xcf/xcfexport.cpp b/filters/krita/xcf/xcfexport.cpp index 8274e2b2..99aaa556 100644 --- a/filters/krita/xcf/xcfexport.cpp +++ b/filters/krita/xcf/xcfexport.cpp @@ -33,7 +33,7 @@ typedef KGenericFactory XCFExportFactory; K_EXPORT_COMPONENT_FACTORY(libkritaxcfexport, XCFExportFactory("kofficefilters")) -XCFExport::XCFExport(KoFilter *, const char *, const QStringList&) : KoFilter() +XCFExport::XCFExport(KoFilter *, const char *, const TQStringList&) : KoFilter() { } @@ -41,7 +41,7 @@ XCFExport::~XCFExport() { } -KoFilter::ConversionStatus XCFExport::convert(const QCString& from, const QCString& to) +KoFilter::ConversiontqStatus XCFExport::convert(const TQCString& from, const TQCString& to) { kdDebug(41008) << "xcf export! From: " << from << ", To: " << to << "\n"; @@ -49,7 +49,7 @@ KoFilter::ConversionStatus XCFExport::convert(const QCString& from, const QCStri return KoFilter::NotImplemented; KisDoc *output = dynamic_cast(m_chain->inputDocument()); - QString filename = m_chain->outputFile(); + TQString filename = m_chain->outputFile(); if (!output) return KoFilter::CreationError; diff --git a/filters/krita/xcf/xcfexport.h b/filters/krita/xcf/xcfexport.h index e2efe6af..b6acf737 100644 --- a/filters/krita/xcf/xcfexport.h +++ b/filters/krita/xcf/xcfexport.h @@ -23,13 +23,14 @@ class XCFExport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - XCFExport(KoFilter *parent, const char *name, const QStringList&); + XCFExport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~XCFExport(); public: - virtual KoFilter::ConversionStatus convert(const QCString& from, const QCString& to); + virtual KoFilter::ConversiontqStatus convert(const TQCString& from, const TQCString& to); }; #endif // XCFEXPORT_H_ diff --git a/filters/krita/xcf/xcfimport.cpp b/filters/krita/xcf/xcfimport.cpp index da63f041..1a7d7947 100644 --- a/filters/krita/xcf/xcfimport.cpp +++ b/filters/krita/xcf/xcfimport.cpp @@ -16,7 +16,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ -#include +#include #include #include @@ -31,7 +31,7 @@ typedef KGenericFactory XCFImportFactory; K_EXPORT_COMPONENT_FACTORY(libkritaxcfimport, XCFImportFactory("kofficefilters")) -XCFImport::XCFImport(KoFilter *, const char *, const QStringList&) : KoFilter() +XCFImport::XCFImport(KoFilter *, const char *, const TQStringList&) : KoFilter() { } @@ -39,7 +39,7 @@ XCFImport::~XCFImport() { } -KoFilter::ConversionStatus XCFImport::convert(const QCString&, const QCString& to) +KoFilter::ConversiontqStatus XCFImport::convert(const TQCString&, const TQCString& to) { kdDebug(41008) << "Importing using XCFImport!\n"; @@ -49,7 +49,7 @@ KoFilter::ConversionStatus XCFImport::convert(const QCString&, const QCString& t KisDoc * doc = dynamic_cast(m_chain -> outputDocument()); KisView * view = static_cast(doc -> views().getFirst()); - QString filename = m_chain -> inputFile(); + TQString filename = m_chain -> inputFile(); if (!doc) return KoFilter::CreationError; diff --git a/filters/krita/xcf/xcfimport.h b/filters/krita/xcf/xcfimport.h index 22ef6a8f..038e7604 100644 --- a/filters/krita/xcf/xcfimport.h +++ b/filters/krita/xcf/xcfimport.h @@ -23,13 +23,14 @@ class XCFImport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - XCFImport(KoFilter *parent, const char *name, const QStringList&); + XCFImport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~XCFImport(); public: - virtual KoFilter::ConversionStatus convert(const QCString& from, const QCString& to); + virtual KoFilter::ConversiontqStatus convert(const TQCString& from, const TQCString& to); }; #endif // XCFIMPORT_H_ diff --git a/filters/kspread/applixspread/applixspreadimport.cc b/filters/kspread/applixspread/applixspreadimport.cc index 57baedeb..16ea0d8f 100644 --- a/filters/kspread/applixspread/applixspreadimport.cc +++ b/filters/kspread/applixspread/applixspreadimport.cc @@ -23,10 +23,10 @@ #include #endif -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include @@ -37,14 +37,14 @@ typedef KGenericFactory APPLIXSPREADImportFactory; K_EXPORT_COMPONENT_FACTORY( libapplixspreadimport, APPLIXSPREADImportFactory( "kofficefilters" ) ) -APPLIXSPREADImport::APPLIXSPREADImport ( QObject */*parent*/, const char* /*name*/, const QStringList& ) +APPLIXSPREADImport::APPLIXSPREADImport ( TQObject */*tqparent*/, const char* /*name*/, const TQStringList& ) : KoFilter() { } -QString APPLIXSPREADImport::nextLine( QTextStream & stream ) +TQString APPLIXSPREADImport::nextLine( TQTextStream & stream ) { - QString s = stream.readLine(); + TQString s = stream.readLine(); m_instep += s.length(); if (m_instep > m_stepsize) { @@ -55,13 +55,13 @@ QString APPLIXSPREADImport::nextLine( QTextStream & stream ) return s; } -KoFilter::ConversionStatus APPLIXSPREADImport::convert( const QCString& from, const QCString& to ) +KoFilter::ConversiontqStatus APPLIXSPREADImport::convert( const TQCString& from, const TQCString& to ) { if (to != "application/x-kspread" || from != "application/x-applixspread") return KoFilter::NotImplemented; - QFile in (m_chain->inputFile()); + TQFile in (m_chain->inputFile()); if (!in.open(IO_ReadOnly)) { kdError(30502) << "Unable to open input file!" << endl; @@ -69,8 +69,8 @@ KoFilter::ConversionStatus APPLIXSPREADImport::convert( const QCString& from, co return KoFilter::FileNotFound; } - QString str; - QPtrList mcol; + TQString str; + TQPtrList mcol; str += "\n"; str += "\n"; @@ -85,19 +85,19 @@ KoFilter::ConversionStatus APPLIXSPREADImport::convert( const QCString& from, co // str += " \n"; - // QTextStream - QTextStream stream (&in); + // TQTextStream + TQTextStream stream (&in); m_stepsize = in.size()/50; m_instep = 0; m_progress = 0; int pos; char ccol; int irow, icol; - QString tabctr ; // Tab control - QString mystr, typestr, cellnostr, tabnostr; - QStringList typefacetab; + TQString tabctr ; // Tab control + TQString mystr, typestr, cellnostr, tabnostr; + TQStringList typefacetab; - // QStringList rclist; + // TQStringList rclist; t_rc my_rc; @@ -152,7 +152,7 @@ KoFilter::ConversionStatus APPLIXSPREADImport::convert( const QCString& from, co mystr.remove (0, 1); int alllenght; - QString mystrn; + TQString mystrn; // Remember lenght of the string alllenght = mystr.length (); @@ -181,7 +181,7 @@ KoFilter::ConversionStatus APPLIXSPREADImport::convert( const QCString& from, co // Search for ')' - pos = mystr.find (')'); + pos = mystr.tqfind (')'); typestr = mystr.left (pos); @@ -190,7 +190,7 @@ KoFilter::ConversionStatus APPLIXSPREADImport::convert( const QCString& from, co // alllenght = alllenght - pos - 1; // Search for ':' - pos = mystr.find (':'); + pos = mystr.tqfind (':'); // Copy cellnumber informations cellnostr = mystr.left (pos); @@ -201,7 +201,7 @@ KoFilter::ConversionStatus APPLIXSPREADImport::convert( const QCString& from, co // Split Table and Cell Number - pos = cellnostr.find ('!'); + pos = cellnostr.tqfind ('!'); // Copy tabnumber informations tabnostr = cellnostr.left (pos); @@ -215,12 +215,12 @@ KoFilter::ConversionStatus APPLIXSPREADImport::convert( const QCString& from, co - pos = cellnostr.find (QRegExp ("[0-9]")); + pos = cellnostr.tqfind (TQRegExp ("[0-9]")); kdDebug()<<" findpos :"<, & - mystr.replace (QRegExp ("&"), "&"); - mystr.replace (QRegExp ("<"), "<"); - mystr.replace (QRegExp (">"), ">"); + mystr.tqreplace (TQRegExp ("&"), "&"); + mystr.tqreplace (TQRegExp ("<"), "<"); + mystr.tqreplace (TQRegExp (">"), ">"); // Replace part for Applix Characters int foundSpecialCharakter; - QChar newchar; + TQChar newchar; do { // initialize foundSpecialCharakter = false; - pos = mystr.find ("^"); + pos = mystr.tqfind ("^"); // is there a special character ? if (pos > -1 ) @@ -277,7 +277,7 @@ KoFilter::ConversionStatus APPLIXSPREADImport::convert( const QCString& from, co newchar = specCharfind (mystr[pos+1], mystr[pos+2]); // replace the character - mystr.replace (pos, 3, newchar); + mystr.tqreplace (pos, 3, newchar); } } @@ -286,12 +286,12 @@ KoFilter::ConversionStatus APPLIXSPREADImport::convert( const QCString& from, co // examine the typestring // splitt typestring in 3 parts by an | - QString typeFormStr; - QString typeCharStr; - QString typeCellStr; + TQString typeFormStr; + TQString typeCharStr; + TQString typeCellStr; - int pos1 = typestr.find ("|"); - int pos2 = typestr.findRev ("|"); + int pos1 = typestr.tqfind ("|"); + int pos2 = typestr.tqfindRev ("|"); typeFormStr = typestr.left (pos1); @@ -313,7 +313,7 @@ KoFilter::ConversionStatus APPLIXSPREADImport::convert( const QCString& from, co tabctr = tabnostr; // Searching for the rowcol part and adding to the hole string - pos = my_rc.tabname.findIndex (tabnostr); + pos = my_rc.tabname.tqfindIndex (tabnostr); if (pos > -1) str += my_rc.rc[pos]; } @@ -323,12 +323,12 @@ KoFilter::ConversionStatus APPLIXSPREADImport::convert( const QCString& from, co /******************************************************************** * examine charakter format String, splitt it up in basic parts * ********************************************************************/ - QStringList typeCharList; + TQStringList typeCharList; int bold=0, italic=0, underline=0, nn=0, fontsize=12, fontnr=-1; - typeCharList = QStringList::split (',', typeCharStr); + typeCharList = TQStringList::split (',', typeCharStr); - for (QStringList::Iterator it = typeCharList.begin(); + for (TQStringList::Iterator it = typeCharList.begin(); it != typeCharList.end(); ++it ) { // Output @@ -379,18 +379,18 @@ KoFilter::ConversionStatus APPLIXSPREADImport::convert( const QCString& from, co /******************************************************************** * examine pos format String, splitt it up in basic parts * ********************************************************************/ - QStringList typeFormList; + TQStringList typeFormList; int align = 0, valign=0; - typeFormList = QStringList::split (',', typeFormStr); + typeFormList = TQStringList::split (',', typeFormStr); nn=0; - for (QStringList::Iterator it = typeFormList.begin(); it != typeFormList.end(); ++it ) + for (TQStringList::Iterator it = typeFormList.begin(); it != typeFormList.end(); ++it ) { // Output //kdDebug()<< " Type (%2d) >%s< ", // nn, (*it).latin1() ); nn++; - // Grep horizontal alignment + // Grep horizontal tqalignment if ( (*it) == "1") { kdDebug()<< " = left align\n"; @@ -407,7 +407,7 @@ KoFilter::ConversionStatus APPLIXSPREADImport::convert( const QCString& from, co align = 2; // center } - // Grep verticale alignment + // Grep verticale tqalignment else if ( (*it) == "VT") { kdDebug()<<" = top valign\n"; @@ -433,7 +433,7 @@ KoFilter::ConversionStatus APPLIXSPREADImport::convert( const QCString& from, co /******************************************************************** * examine cell format String, splitt it up in basic parts * ********************************************************************/ - QStringList typeCellList; + TQStringList typeCellList; int topPenWidth=0, bottomPenWidth=0, leftPenWidth = 0, rightPenWidth = 0, fg_bg=-1; int topPenStyle=0, bottomPenStyle=0, leftPenStyle = 0, rightPenStyle = 0; int brushstyle=0, brushcolor=1; @@ -442,9 +442,9 @@ KoFilter::ConversionStatus APPLIXSPREADImport::convert( const QCString& from, co int rightbrushstyle=0, rightbrushcolor=1, rightfg_bg=1; int bottombrushstyle=0, bottombrushcolor=1, bottomfg_bg=1; - typeCellList = QStringList::split (',', typeCellStr); + typeCellList = TQStringList::split (',', typeCellStr); nn=0; - for ( QStringList::Iterator it = typeCellList.begin(); it != typeCellList.end(); ++it ) + for ( TQStringList::Iterator it = typeCellList.begin(); it != typeCellList.end(); ++it ) { // Output printf (" Cell (%2d) >%s< ", @@ -518,11 +518,11 @@ KoFilter::ConversionStatus APPLIXSPREADImport::convert( const QCString& from, co - QString col; + TQString col; // create kspread fileformat output - str += " \n"; + str += " \n"; if (bold == 1 || italic == 1 || underline == 1 || align != 0 || valign != 0 || topPenStyle != 0 || bottomPenStyle != 0 || @@ -532,14 +532,14 @@ KoFilter::ConversionStatus APPLIXSPREADImport::convert( const QCString& from, co str += " writeBlock ( cstring, cstring.length() ); in.close (); @@ -656,174 +656,174 @@ KoFilter::ConversionStatus APPLIXSPREADImport::convert( const QCString& from, co /****************************************************************************** * function: specCharfind * ******************************************************************************/ -QChar -APPLIXSPREADImport::specCharfind (QChar a, QChar b) +TQChar +APPLIXSPREADImport::specCharfind (TQChar a, TQChar b) { - QChar chr; + TQChar chr; - if ( (a == 'n') && (b == 'p') ) chr = 'ß'; + if ( (a == 'n') && (b == 'p') ) chr = '�'; - else if ( (a == 'n') && (b == 'c') ) chr = 'Ò'; - else if ( (a == 'p') && (b == 'c') ) chr = 'ò'; + else if ( (a == 'n') && (b == 'c') ) chr = '�'; + else if ( (a == 'p') && (b == 'c') ) chr = '�'; - else if ( (a == 'n') && (b == 'd') ) chr = 'Ó'; - else if ( (a == 'p') && (b == 'd') ) chr = 'ó'; + else if ( (a == 'n') && (b == 'd') ) chr = '�'; + else if ( (a == 'p') && (b == 'd') ) chr = '�'; - else if ( (a == 'n') && (b == 'e') ) chr = 'Ô'; - else if ( (a == 'p') && (b == 'e') ) chr = 'ô'; + else if ( (a == 'n') && (b == 'e') ) chr = '�'; + else if ( (a == 'p') && (b == 'e') ) chr = '�'; - else if ( (a == 'n') && (b == 'f') ) chr = 'Õ'; - else if ( (a == 'p') && (b == 'f') ) chr = 'õ'; + else if ( (a == 'n') && (b == 'f') ) chr = '�'; + else if ( (a == 'p') && (b == 'f') ) chr = '�'; - else if ( (a == 'p') && (b == 'g') ) chr = 'ö'; - else if ( (a == 'n') && (b == 'g') ) chr = 'Ö'; + else if ( (a == 'p') && (b == 'g') ) chr = '�'; + else if ( (a == 'n') && (b == 'g') ) chr = '�'; - else if ( (a == 'n') && (b == 'j') ) chr = 'Ù'; - else if ( (a == 'p') && (b == 'j') ) chr = 'ù'; + else if ( (a == 'n') && (b == 'j') ) chr = '�'; + else if ( (a == 'p') && (b == 'j') ) chr = '�'; - else if ( (a == 'n') && (b == 'k') ) chr = 'Ú'; - else if ( (a == 'p') && (b == 'k') ) chr = 'ú'; + else if ( (a == 'n') && (b == 'k') ) chr = '�'; + else if ( (a == 'p') && (b == 'k') ) chr = '�'; - else if ( (a == 'n') && (b == 'l') ) chr = 'Û'; - else if ( (a == 'p') && (b == 'l') ) chr = 'û'; + else if ( (a == 'n') && (b == 'l') ) chr = '�'; + else if ( (a == 'p') && (b == 'l') ) chr = '�'; - else if ( (a == 'p') && (b == 'm') ) chr = 'ü'; - else if ( (a == 'n') && (b == 'm') ) chr = 'Ü'; + else if ( (a == 'p') && (b == 'm') ) chr = '�'; + else if ( (a == 'n') && (b == 'm') ) chr = '�'; - else if ( (a == 'm') && (b == 'a') ) chr = 'À'; - else if ( (a == 'o') && (b == 'a') ) chr = 'à'; + else if ( (a == 'm') && (b == 'a') ) chr = '�'; + else if ( (a == 'o') && (b == 'a') ) chr = '�'; - else if ( (a == 'm') && (b == 'b') ) chr = 'Á'; - else if ( (a == 'o') && (b == 'b') ) chr = 'á'; + else if ( (a == 'm') && (b == 'b') ) chr = '�'; + else if ( (a == 'o') && (b == 'b') ) chr = '�'; - else if ( (a == 'm') && (b == 'c') ) chr = 'Â'; - else if ( (a == 'o') && (b == 'c') ) chr = 'â'; + else if ( (a == 'm') && (b == 'c') ) chr = '�'; + else if ( (a == 'o') && (b == 'c') ) chr = '�'; - else if ( (a == 'm') && (b == 'd') ) chr = 'Ã'; - else if ( (a == 'o') && (b == 'd') ) chr = 'ã'; + else if ( (a == 'm') && (b == 'd') ) chr = '�'; + else if ( (a == 'o') && (b == 'd') ) chr = '�'; - else if ( (a == 'm') && (b == 'e') ) chr = 'Ä'; - else if ( (a == 'o') && (b == 'e') ) chr = 'ä'; + else if ( (a == 'm') && (b == 'e') ) chr = '�'; + else if ( (a == 'o') && (b == 'e') ) chr = '�'; - else if ( (a == 'm') && (b == 'f') ) chr = 'Å'; - else if ( (a == 'o') && (b == 'f') ) chr = 'å'; + else if ( (a == 'm') && (b == 'f') ) chr = '�'; + else if ( (a == 'o') && (b == 'f') ) chr = '�'; - else if ( (a == 'm') && (b == 'g') ) chr = 'Æ'; - else if ( (a == 'o') && (b == 'g') ) chr = 'æ'; + else if ( (a == 'm') && (b == 'g') ) chr = '�'; + else if ( (a == 'o') && (b == 'g') ) chr = '�'; - else if ( (a == 'm') && (b == 'i') ) chr = 'È'; - else if ( (a == 'o') && (b == 'i') ) chr = 'è'; + else if ( (a == 'm') && (b == 'i') ) chr = '�'; + else if ( (a == 'o') && (b == 'i') ) chr = '�'; - else if ( (a == 'm') && (b == 'j') ) chr = 'É'; - else if ( (a == 'o') && (b == 'j') ) chr = 'é'; + else if ( (a == 'm') && (b == 'j') ) chr = '�'; + else if ( (a == 'o') && (b == 'j') ) chr = '�'; - else if ( (a == 'm') && (b == 'k') ) chr = 'Ê'; - else if ( (a == 'o') && (b == 'k') ) chr = 'ê'; + else if ( (a == 'm') && (b == 'k') ) chr = '�'; + else if ( (a == 'o') && (b == 'k') ) chr = '�'; - else if ( (a == 'm') && (b == 'l') ) chr = 'Ë'; - else if ( (a == 'o') && (b == 'l') ) chr = 'ë'; + else if ( (a == 'm') && (b == 'l') ) chr = '�'; + else if ( (a == 'o') && (b == 'l') ) chr = '�'; - else if ( (a == 'm') && (b == 'm') ) chr = 'Ì'; - else if ( (a == 'o') && (b == 'm') ) chr = 'ì'; + else if ( (a == 'm') && (b == 'm') ) chr = '�'; + else if ( (a == 'o') && (b == 'm') ) chr = '�'; - else if ( (a == 'm') && (b == 'n') ) chr = 'Í'; - else if ( (a == 'o') && (b == 'n') ) chr = 'í'; + else if ( (a == 'm') && (b == 'n') ) chr = '�'; + else if ( (a == 'o') && (b == 'n') ) chr = '�'; - else if ( (a == 'm') && (b == 'o') ) chr = 'Î'; - else if ( (a == 'o') && (b == 'o') ) chr = 'î'; + else if ( (a == 'm') && (b == 'o') ) chr = '�'; + else if ( (a == 'o') && (b == 'o') ) chr = '�'; - else if ( (a == 'm') && (b == 'p') ) chr = 'Ï'; - else if ( (a == 'o') && (b == 'p') ) chr = 'ï'; + else if ( (a == 'm') && (b == 'p') ) chr = '�'; + else if ( (a == 'o') && (b == 'p') ) chr = '�'; - else if ( (a == 'n') && (b == 'b') ) chr = 'Ñ'; - else if ( (a == 'p') && (b == 'b') ) chr = 'ñ'; + else if ( (a == 'n') && (b == 'b') ) chr = '�'; + else if ( (a == 'p') && (b == 'b') ) chr = '�'; - else if ( (a == 'k') && (b == 'c') ) chr = '¢'; - else if ( (a == 'k') && (b == 'j') ) chr = '©'; - else if ( (a == 'l') && (b == 'f') ) chr = 'µ'; - else if ( (a == 'n') && (b == 'i') ) chr = 'Ø'; - else if ( (a == 'p') && (b == 'i') ) chr = 'ø'; + else if ( (a == 'k') && (b == 'c') ) chr = '�'; + else if ( (a == 'k') && (b == 'j') ) chr = '�'; + else if ( (a == 'l') && (b == 'f') ) chr = '�'; + else if ( (a == 'n') && (b == 'i') ) chr = '�'; + else if ( (a == 'p') && (b == 'i') ) chr = '�'; - else if ( (a == 'l') && (b == 'j') ) chr = '¹'; - else if ( (a == 'l') && (b == 'c') ) chr = '²'; - else if ( (a == 'l') && (b == 'd') ) chr = '³'; + else if ( (a == 'l') && (b == 'j') ) chr = '�'; + else if ( (a == 'l') && (b == 'c') ) chr = '�'; + else if ( (a == 'l') && (b == 'd') ) chr = '�'; - else if ( (a == 'l') && (b == 'm') ) chr = '¼'; - else if ( (a == 'l') && (b == 'n') ) chr = '½'; - else if ( (a == 'l') && (b == 'o') ) chr = '¾'; + else if ( (a == 'l') && (b == 'm') ) chr = '�'; + else if ( (a == 'l') && (b == 'n') ) chr = '�'; + else if ( (a == 'l') && (b == 'o') ) chr = '�'; - else if ( (a == 'l') && (b == 'a') ) chr = '°'; + else if ( (a == 'l') && (b == 'a') ) chr = '�'; - else if ( (a == 'k') && (b == 'o') ) chr = '®'; - else if ( (a == 'k') && (b == 'h') ) chr = '§'; - else if ( (a == 'k') && (b == 'd') ) chr = '£'; + else if ( (a == 'k') && (b == 'o') ) chr = '�'; + else if ( (a == 'k') && (b == 'h') ) chr = '�'; + else if ( (a == 'k') && (b == 'd') ) chr = '�'; - else if ( (a == 'p') && (b == 'a') ) chr = 'ð'; - else if ( (a == 'n') && (b == 'a') ) chr = 'Ð'; + else if ( (a == 'p') && (b == 'a') ) chr = '�'; + else if ( (a == 'n') && (b == 'a') ) chr = '�'; - else if ( (a == 'l') && (b == 'l') ) chr = '»'; - else if ( (a == 'k') && (b == 'l') ) chr = '«'; + else if ( (a == 'l') && (b == 'l') ) chr = '�'; + else if ( (a == 'k') && (b == 'l') ) chr = '�'; - else if ( (a == 'l') && (b == 'k') ) chr = 'º'; + else if ( (a == 'l') && (b == 'k') ) chr = '�'; - else if ( (a == 'l') && (b == 'h') ) chr = '·'; + else if ( (a == 'l') && (b == 'h') ) chr = '�'; - else if ( (a == 'k') && (b == 'b') ) chr = '¡'; + else if ( (a == 'k') && (b == 'b') ) chr = '�'; - else if ( (a == 'k') && (b == 'e') ) chr = '¤'; + else if ( (a == 'k') && (b == 'e') ) chr = '�'; - else if ( (a == 'l') && (b == 'b') ) chr = '±'; + else if ( (a == 'l') && (b == 'b') ) chr = '�'; - else if ( (a == 'l') && (b == 'p') ) chr = '¿'; + else if ( (a == 'l') && (b == 'p') ) chr = '�'; - else if ( (a == 'k') && (b == 'f') ) chr = '¥'; + else if ( (a == 'k') && (b == 'f') ) chr = '�'; - else if ( (a == 'p') && (b == 'o') ) chr = 'þ'; - else if ( (a == 'n') && (b == 'o') ) chr = 'Þ'; + else if ( (a == 'p') && (b == 'o') ) chr = '�'; + else if ( (a == 'n') && (b == 'o') ) chr = '�'; - else if ( (a == 'n') && (b == 'n') ) chr = 'Ý'; - else if ( (a == 'p') && (b == 'n') ) chr = 'ý'; - else if ( (a == 'p') && (b == 'p') ) chr = 'ÿ'; + else if ( (a == 'n') && (b == 'n') ) chr = '�'; + else if ( (a == 'p') && (b == 'n') ) chr = '�'; + else if ( (a == 'p') && (b == 'p') ) chr = '�'; - else if ( (a == 'k') && (b == 'k') ) chr = 'ª'; + else if ( (a == 'k') && (b == 'k') ) chr = '�'; - else if ( (a == 'k') && (b == 'm') ) chr = '¬'; - else if ( (a == 'p') && (b == 'h') ) chr = '÷'; + else if ( (a == 'k') && (b == 'm') ) chr = '�'; + else if ( (a == 'p') && (b == 'h') ) chr = '�'; else if ( (a == 'k') && (b == 'g') ) chr = '|'; else if ( (a == 'l') && (b == 'e') ) chr = '\''; - else if ( (a == 'k') && (b == 'i') ) chr = '¨'; + else if ( (a == 'k') && (b == 'i') ) chr = '�'; - else if ( (a == 'k') && (b == 'n') ) chr = '­'; + else if ( (a == 'k') && (b == 'n') ) chr = '�'; - else if ( (a == 'k') && (b == 'p') ) chr = '¯'; + else if ( (a == 'k') && (b == 'p') ) chr = '�'; - else if ( (a == 'l') && (b == 'g') ) chr = '¶'; + else if ( (a == 'l') && (b == 'g') ) chr = '�'; - else if ( (a == 'l') && (b == 'i') ) chr = '¸'; + else if ( (a == 'l') && (b == 'i') ) chr = '�'; - else if ( (a == 'm') && (b == 'h') ) chr = 'Ç'; - else if ( (a == 'o') && (b == 'h') ) chr = 'ç'; + else if ( (a == 'm') && (b == 'h') ) chr = '�'; + else if ( (a == 'o') && (b == 'h') ) chr = '�'; - else if ( (a == 'n') && (b == 'h') ) chr = '×'; + else if ( (a == 'n') && (b == 'h') ) chr = '�'; - else if ( (a == 'k') && (b == 'a') ) chr = ' '; + else if ( (a == 'k') && (b == 'a') ) chr = '�'; else if ( (a == 'a') && (b == 'j') ) chr = '!'; @@ -838,16 +838,16 @@ APPLIXSPREADImport::specCharfind (QChar a, QChar b) * function: writePen * ******************************************************************************/ void -APPLIXSPREADImport::writePen (QString &str, int penwidth, int penstyle, QString framecolor) +APPLIXSPREADImport::writePen (TQString &str, int penwidth, int penstyle, TQString framecolor) { str += " c, mc->m, mc->y, mc->k); sprintf (rgb, "#%02X%02X%02X", mc->r, mc->g, mc->b); - QString bla = rgb; + TQString bla = rgb; return bla; @@ -884,10 +884,10 @@ APPLIXSPREADImport::writeColor (t_mycolor *mc) * function: readTypefaceTable * ******************************************************************************/ void -APPLIXSPREADImport::readTypefaceTable (QTextStream &stream, QStringList &typefacetab) +APPLIXSPREADImport::readTypefaceTable (TQTextStream &stream, TQStringList &typefacetab) { int tftabCounter=0, ok; - QString mystr; + TQString mystr; // Read the colormap kdDebug()<<"Reading typeface table: \n"; @@ -915,11 +915,11 @@ APPLIXSPREADImport::readTypefaceTable (QTextStream &stream, QStringList &typefa * function: readColormap * ******************************************************************************/ void -APPLIXSPREADImport::readColormap (QTextStream &stream, QPtrList &mcol) +APPLIXSPREADImport::readColormap (TQTextStream &stream, TQPtrList &mcol) { int contcount, ok, pos; - QString colstr, mystr; + TQString colstr, mystr; kdDebug ()<<"Reading colormap: \n"; ok = true; @@ -936,12 +936,12 @@ APPLIXSPREADImport::readColormap (QTextStream &stream, QPtrList &mco kdDebug()<<" -> "<< mystr< &mco * function: readColormap * ******************************************************************************/ void -APPLIXSPREADImport::readView (QTextStream &stream, QString instr, t_rc &rc) +APPLIXSPREADImport::readView (TQTextStream &stream, TQString instr, t_rc &rc) { - QString rowcolstr; - QString mystr, tabname; + TQString rowcolstr; + TQString mystr, tabname; int ok; kdDebug()<<"Reading View\n"; @@ -1027,15 +1027,15 @@ APPLIXSPREADImport::readView (QTextStream &stream, QString instr, t_rc &rc) char ccolumn; // loop - QStringList ColumnList; - ColumnList = QStringList::split (' ', mystr); + TQStringList ColumnList; + ColumnList = TQStringList::split (' ', mystr); - for ( QStringList::Iterator it = ColumnList.begin(); it != ColumnList.end(); ++it ) + for ( TQStringList::Iterator it = ColumnList.begin(); it != ColumnList.end(); ++it ) { sscanf ((*it).latin1(), "%c:%d", &ccolumn, &colwidth); int len = (*it).length (); - int pos = (*it).find (":"); + int pos = (*it).tqfind (":"); (*it).remove (pos, len-pos); printf( " >%s<- -<%c><%d> \n", (*it).latin1(), ccolumn, colwidth); @@ -1049,9 +1049,9 @@ APPLIXSPREADImport::readView (QTextStream &stream, QString instr, t_rc &rc) rowcolstr += " \n"; rowcolstr += " \n"; rowcolstr += " \n"; @@ -1068,10 +1068,10 @@ APPLIXSPREADImport::readView (QTextStream &stream, QString instr, t_rc &rc) int irow, rowheight; // loop - QStringList RowList; - RowList = QStringList::split (' ', mystr); + TQStringList RowList; + RowList = TQStringList::split (' ', mystr); - for ( QStringList::Iterator it = RowList.begin(); it != RowList.end(); ++it ) + for ( TQStringList::Iterator it = RowList.begin(); it != RowList.end(); ++it ) { sscanf ((*it).latin1(), " %d:%d", &irow, &rowheight); @@ -1079,9 +1079,9 @@ APPLIXSPREADImport::readView (QTextStream &stream, QString instr, t_rc &rc) if (rowheight > 32768) rowheight -= 32768; printf (" height: %2d\n", rowheight); rowcolstr += " \n"; rowcolstr += " \n"; rowcolstr += " \n"; @@ -1112,15 +1112,15 @@ APPLIXSPREADImport::readView (QTextStream &stream, QString instr, t_rc &rc) * function: filterSHFGBG * ******************************************************************************/ void -APPLIXSPREADImport::filterSHFGBG (QString it, int *style, int *bgcolor, +APPLIXSPREADImport::filterSHFGBG (TQString it, int *style, int *bgcolor, int *fgcolor) { - QString tmpstr; + TQString tmpstr; int pos; int m2=0, m3=0; // filter SH = Brushstyle Background - pos = it.find ("SH"); + pos = it.tqfind ("SH"); if (pos > -1) { tmpstr = it; @@ -1134,7 +1134,7 @@ APPLIXSPREADImport::filterSHFGBG (QString it, int *style, int *bgcolor, // filter FG = FGCOLOR - pos = it.find ("FG"); + pos = it.tqfind ("FG"); if (pos > -1) { tmpstr = it; @@ -1148,7 +1148,7 @@ APPLIXSPREADImport::filterSHFGBG (QString it, int *style, int *bgcolor, // filter BG = BGCOLOR - pos = it.find ("BG"); + pos = it.tqfind ("BG"); if (pos > -1) { tmpstr = it; @@ -1202,7 +1202,7 @@ APPLIXSPREADImport::filterSHFGBG (QString it, int *style, int *bgcolor, * function: filterSHFGBG * ******************************************************************************/ void -APPLIXSPREADImport::transPenFormat (QString it, int *PenWidth, int *PenStyle) +APPLIXSPREADImport::transPenFormat (TQString it, int *PenWidth, int *PenStyle) { if ( it[1] == '1' ) @@ -1245,9 +1245,9 @@ APPLIXSPREADImport::transPenFormat (QString it, int *PenWidth, int *PenStyle) * function: readHeader * ******************************************************************************/ int -APPLIXSPREADImport::readHeader (QTextStream &stream) +APPLIXSPREADImport::readHeader (TQTextStream &stream) { - QString mystr; + TQString mystr; int vers[3] = { 0, 0, 0 }; int rueck; @@ -1265,10 +1265,10 @@ APPLIXSPREADImport::readHeader (QTextStream &stream) printf ("Header not correkt - May be it is not an applixspreadsheet file\n"); printf ("Headerline: <%s>\n", mystr.latin1()); - QMessageBox::critical (0L, "Applix spreadsheet header problem", - QString ("The Applix Spreadsheet header is not correct. " + TQMessageBox::critical (0L, "Applix spreadsheet header problem", + TQString ("The Applix Spreadsheet header is not correct. " "May be it is not an applix spreadsheet file!
" - "This is the header line I did read:
%1").arg(mystr.latin1()), + "This is the header line I did read:
%1").tqarg(mystr.latin1()), "Okay"); @@ -1286,7 +1286,7 @@ APPLIXSPREADImport::readHeader (QTextStream &stream) * function: translateRowNumber * ******************************************************************************/ int -APPLIXSPREADImport::translateColumnNumber (QString colstr) +APPLIXSPREADImport::translateColumnNumber (TQString colstr) { int icol=0; int p, x, len; diff --git a/filters/kspread/applixspread/applixspreadimport.h b/filters/kspread/applixspread/applixspreadimport.h index 31452e00..048a22e7 100644 --- a/filters/kspread/applixspread/applixspreadimport.h +++ b/filters/kspread/applixspread/applixspreadimport.h @@ -20,11 +20,11 @@ #ifndef APPLIXSPREADIMPORT_H #define APPLIXSPREADIMPORT_H -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -43,33 +43,34 @@ typedef struct typedef struct { - QStringList tabname; - QStringList rc; + TQStringList tabname; + TQStringList rc; } t_rc; class APPLIXSPREADImport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - APPLIXSPREADImport ( QObject *parent, const char* name, const QStringList& ); + APPLIXSPREADImport ( TQObject *tqparent, const char* name, const TQStringList& ); virtual ~APPLIXSPREADImport() {} - virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to ); protected: - QString nextLine (QTextStream &); - QChar specCharfind (QChar , QChar ); - void writePen (QString &, int, int, QString); - QString writeColor (t_mycolor *); - void readTypefaceTable (QTextStream &, QStringList &); - void readColormap (QTextStream &, QPtrList &); - void readView (QTextStream &, QString, t_rc &); - void filterSHFGBG (QString, int *, int *, int *); - void transPenFormat (QString, int *, int *); - int readHeader (QTextStream &); - int translateColumnNumber (QString); + TQString nextLine (TQTextStream &); + TQChar specCharfind (TQChar , TQChar ); + void writePen (TQString &, int, int, TQString); + TQString writeColor (t_mycolor *); + void readTypefaceTable (TQTextStream &, TQStringList &); + void readColormap (TQTextStream &, TQPtrList &); + void readView (TQTextStream &, TQString, t_rc &); + void filterSHFGBG (TQString, int *, int *, int *); + void transPenFormat (TQString, int *, int *); + int readHeader (TQTextStream &); + int translateColumnNumber (TQString); private: int m_stepsize; diff --git a/filters/kspread/applixspread/status.html b/filters/kspread/applixspread/status.html index c944ef5c..968bf333 100644 --- a/filters/kspread/applixspread/status.html +++ b/filters/kspread/applixspread/status.html @@ -53,7 +53,7 @@ - tests the headline of the document
- converts <, >, &, to &lt; &gt; &amp;
- converts all applix special characters
- - converts fontsize, fontcolor, horizontal and vertical alignment, bold, italic, underline
+ - converts fontsize, fontcolor, horizontal and vertical tqalignment, bold, italic, underline
- eats long text strings (more than one row in inputfile)
- converts different tables inside of one document
- cellformat: background color, brushstyles, brushcolor
@@ -352,43 +352,43 @@ 6.1.1. Part 1 - Alignment format
- This is the alignment format for vertical, horizontal alignment
+ This is the tqalignment format for vertical, horizontal tqalignment
- + - + - + - + - + - + @@ -402,7 +402,7 @@ 6.1.2. Part 2 - Text format
- This is the alignment format for the text
+ This is the tqalignment format for the text
6.1.1.1   1horizontal alignmenthorizontal tqalignment left
6.1.1.2   2horizontal alignmenthorizontal tqalignment right
6.1.1.3   3horizontal alignmenthorizontal tqalignment center
6.1.1.4   VTvertical alignmentvertical tqalignment top
6.1.1.5   VCvertical alignmentvertical tqalignment center
6.1.1.5   VBvertical alignmentvertical tqalignment bottom
@@ -441,7 +441,7 @@ 6.1.3. Part 3 - Cell format
- This is the alignment format for the text
+ This is the tqalignment format for the text
diff --git a/filters/kspread/csv/csvdialog.cpp b/filters/kspread/csv/csvdialog.cpp index 2757e72b..f6fae839 100644 --- a/filters/kspread/csv/csvdialog.cpp +++ b/filters/kspread/csv/csvdialog.cpp @@ -21,17 +21,17 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -41,8 +41,8 @@ #include #include -CSVDialog::CSVDialog(QWidget* parent, QByteArray& fileArray, const QString /*seperator*/) - : KDialogBase(parent, 0, true, QString::null, Ok|Cancel, No, true), +CSVDialog::CSVDialog(TQWidget* tqparent, TQByteArray& fileArray, const TQString /*seperator*/) + : KDialogBase(tqparent, 0, true, TQString(), Ok|Cancel, No, true), m_adjustRows(false), m_adjustCols(false), m_startRow(0), @@ -54,20 +54,20 @@ CSVDialog::CSVDialog(QWidget* parent, QByteArray& fileArray, const QString /*sep m_ignoreDups(false), m_fileArray(fileArray), m_dialog(new DialogUI(this)), - m_codec( QTextCodec::codecForName( "UTF-8" ) ) + m_codec( TQTextCodec::codecForName( "UTF-8" ) ) { setCaption( i18n( "Import" ) ); kapp->restoreOverrideCursor(); - QStringList encodings; - encodings << i18n( "Descriptive encoding name", "Recommended ( %1 )" ).arg( "UTF-8" ); - encodings << i18n( "Descriptive encoding name", "Locale ( %1 )" ).arg( QTextCodec::codecForLocale()->name() ); + TQStringList encodings; + encodings << i18n( "Descriptive encoding name", "Recommended ( %1 )" ).tqarg( "UTF-8" ); + encodings << i18n( "Descriptive encoding name", "Locale ( %1 )" ).tqarg( TQTextCodec::codecForLocale()->name() ); encodings += KGlobal::charsets()->descriptiveEncodingNames(); // Add a few non-standard encodings, which might be useful for text files - const QString description(i18n("Descriptive encoding name","Other ( %1 )")); - encodings << description.arg("Apple Roman"); // Apple - encodings << description.arg("IBM 850") << description.arg("IBM 866"); // MS DOS - encodings << description.arg("CP 1258"); // Windows + const TQString description(i18n("Descriptive encoding name","Other ( %1 )")); + encodings << description.tqarg("Apple Roman"); // Apple + encodings << description.tqarg("IBM 850") << description.tqarg("IBM 866"); // MS DOS + encodings << description.tqarg("CP 1258"); // Windows m_dialog->comboBoxEncoding->insertStringList(encodings); m_formatList << i18n( "Text" ); @@ -84,36 +84,36 @@ CSVDialog::CSVDialog(QWidget* parent, QByteArray& fileArray, const QString /*sep fillTable(); - //resize(sizeHint()); + //resize(tqsizeHint()); resize( 600, 400 ); // Try to show as much as possible of the table view setMainWidget(m_dialog); - m_dialog->m_sheet->setSelectionMode( QTable::Multi ); - - connect(m_dialog->m_formatComboBox, SIGNAL(activated( const QString& )), - this, SLOT(formatChanged( const QString& ))); - connect(m_dialog->m_delimiterBox, SIGNAL(clicked(int)), - this, SLOT(delimiterClicked(int))); - connect(m_dialog->m_delimiterEdit, SIGNAL(returnPressed()), - this, SLOT(returnPressed())); - connect(m_dialog->m_delimiterEdit, SIGNAL(textChanged ( const QString & )), - this, SLOT(formatChanged ( const QString & ) )); - connect(m_dialog->m_comboQuote, SIGNAL(activated(const QString &)), - this, SLOT(textquoteSelected(const QString &))); - connect(m_dialog->m_sheet, SIGNAL(currentChanged(int, int)), - this, SLOT(currentCellChanged(int, int))); - connect(m_dialog->m_ignoreDuplicates, SIGNAL(stateChanged(int)), - this, SLOT(ignoreDuplicatesChanged(int))); - connect(m_dialog->m_updateButton, SIGNAL(clicked()), - this, SLOT(updateClicked())); - connect(m_dialog->comboBoxEncoding, SIGNAL(textChanged ( const QString & )), - this, SLOT(encodingChanged ( const QString & ) )); + m_dialog->m_sheet->setSelectionMode( TQTable::Multi ); + + connect(m_dialog->m_formatComboBox, TQT_SIGNAL(activated( const TQString& )), + this, TQT_SLOT(formatChanged( const TQString& ))); + connect(m_dialog->m_delimiterBox, TQT_SIGNAL(clicked(int)), + this, TQT_SLOT(delimiterClicked(int))); + connect(m_dialog->m_delimiterEdit, TQT_SIGNAL(returnPressed()), + this, TQT_SLOT(returnPressed())); + connect(m_dialog->m_delimiterEdit, TQT_SIGNAL(textChanged ( const TQString & )), + this, TQT_SLOT(formatChanged ( const TQString & ) )); + connect(m_dialog->m_comboQuote, TQT_SIGNAL(activated(const TQString &)), + this, TQT_SLOT(textquoteSelected(const TQString &))); + connect(m_dialog->m_sheet, TQT_SIGNAL(currentChanged(int, int)), + this, TQT_SLOT(currentCellChanged(int, int))); + connect(m_dialog->m_ignoreDuplicates, TQT_SIGNAL(stateChanged(int)), + this, TQT_SLOT(ignoreDuplicatesChanged(int))); + connect(m_dialog->m_updateButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(updateClicked())); + connect(m_dialog->comboBoxEncoding, TQT_SIGNAL(textChanged ( const TQString & )), + this, TQT_SLOT(encodingChanged ( const TQString & ) )); } CSVDialog::~CSVDialog() { saveSettings(); - kapp->setOverrideCursor(Qt::waitCursor); + kapp->setOverrideCursor(TQt::waitCursor); } void CSVDialog::loadSettings() @@ -123,7 +123,7 @@ void CSVDialog::loadSettings() m_textquote = config->readEntry("textquote", "\"")[0]; m_delimiter = config->readEntry("delimiter", ","); m_ignoreDups = config->readBoolEntry("ignoreDups", false); - const QString codecText = config->readEntry("codec", ""); + const TQString codecText = config->readEntry("codec", ""); // update widgets if (!codecText.isEmpty()) { @@ -147,7 +147,7 @@ void CSVDialog::saveSettings() { KConfig *config = kapp->config(); config->setGroup("CSVDialog Settings"); - QString q = m_textquote; + TQString q = m_textquote; config->writeEntry("textquote", q); config->writeEntry("delimiter", m_delimiter); config->writeEntry("ignoreDups", m_ignoreDups); @@ -159,13 +159,13 @@ void CSVDialog::fillTable( ) { int row, column; bool lastCharDelimiter = false; - enum { S_START, S_QUOTED_FIELD, S_MAYBE_END_OF_QUOTED_FIELD, S_END_OF_QUOTED_FIELD, + enum { S_START, S_TQUOTED_FIELD, S_MAYBE_END_OF_TQUOTED_FIELD, S_END_OF_TQUOTED_FIELD, S_MAYBE_NORMAL_FIELD, S_NORMAL_FIELD } state = S_START; - QChar x; - QString field; + TQChar x; + TQString field; - kapp->setOverrideCursor(Qt::waitCursor); + kapp->setOverrideCursor(TQt::waitCursor); for (row = 0; row < m_dialog->m_sheet->numRows(); ++row) for (column = 0; column < m_dialog->m_sheet->numCols(); ++column) @@ -173,7 +173,7 @@ void CSVDialog::fillTable( ) int maxColumn = 1; row = column = 1; - QTextStream inputStream(m_fileArray, IO_ReadOnly); + TQTextStream inputStream(m_fileArray, IO_ReadOnly); kdDebug(30501) << "Encoding: " << m_codec->name() << endl; inputStream.setCodec( m_codec ); @@ -195,7 +195,7 @@ void CSVDialog::fillTable( ) lastCharWasCr = false; continue; } - else if ( x == QChar( 0xc ) ) + else if ( x == TQChar( 0xc ) ) { // We have a FormFeed, skip it lastCharWasCr = false; @@ -214,7 +214,7 @@ void CSVDialog::fillTable( ) case S_START : if (x == m_textquote) { - state = S_QUOTED_FIELD; + state = S_TQUOTED_FIELD; } else if (x == m_delimiter) { @@ -235,26 +235,26 @@ void CSVDialog::fillTable( ) state = S_MAYBE_NORMAL_FIELD; } break; - case S_QUOTED_FIELD : + case S_TQUOTED_FIELD : if (x == m_textquote) { - state = S_MAYBE_END_OF_QUOTED_FIELD; + state = S_MAYBE_END_OF_TQUOTED_FIELD; } else { field += x; } break; - case S_MAYBE_END_OF_QUOTED_FIELD : + case S_MAYBE_END_OF_TQUOTED_FIELD : if (x == m_textquote) { field += x; - state = S_QUOTED_FIELD; + state = S_TQUOTED_FIELD; } else if (x == m_delimiter || x == '\n') { setText(row - m_startRow, column - m_startCol, field); - field = QString::null; + field = TQString(); if (x == '\n') { ++row; @@ -272,14 +272,14 @@ void CSVDialog::fillTable( ) } else { - state = S_END_OF_QUOTED_FIELD; + state = S_END_OF_TQUOTED_FIELD; } break; - case S_END_OF_QUOTED_FIELD : + case S_END_OF_TQUOTED_FIELD : if (x == m_delimiter || x == '\n') { setText(row - m_startRow, column - m_startCol, field); - field = QString::null; + field = TQString(); if (x == '\n') { ++row; @@ -299,15 +299,15 @@ void CSVDialog::fillTable( ) case S_MAYBE_NORMAL_FIELD : if (x == m_textquote) { - field = QString::null; - state = S_QUOTED_FIELD; + field = TQString(); + state = S_TQUOTED_FIELD; break; } case S_NORMAL_FIELD : if (x == m_delimiter || x == '\n') { setText(row - m_startRow, column - m_startCol, field); - field = QString::null; + field = TQString(); if (x == '\n') { ++row; @@ -337,7 +337,7 @@ void CSVDialog::fillTable( ) // the last line of the file had not any line end setText(row - m_startRow, column - m_startCol, field); ++row; - field = QString::null; + field = TQString(); } m_adjustCols = true; @@ -350,8 +350,8 @@ void CSVDialog::fillTable( ) for (column = 0; column < m_dialog->m_sheet->numCols(); ++column) { - const QString header = m_dialog->m_sheet->horizontalHeader()->label(column); - if ( m_formatList.find( header ) == m_formatList.end() ) + const TQString header = m_dialog->m_sheet->horizontalHeader()->label(column); + if ( m_formatList.tqfind( header ) == m_formatList.end() ) m_dialog->m_sheet->horizontalHeader()->setLabel(column, i18n("Text")); m_dialog->m_sheet->adjustColumn(column); @@ -410,7 +410,7 @@ int CSVDialog::getCols() int CSVDialog::getHeader(int col) { - QString header = m_dialog->m_sheet->horizontalHeader()->label(col); + TQString header = m_dialog->m_sheet->horizontalHeader()->label(col); if (header == i18n("Text")) return TEXT; @@ -428,12 +428,12 @@ int CSVDialog::getHeader(int col) return TEXT; // Should not happen } -QString CSVDialog::getText(int row, int col) +TQString CSVDialog::getText(int row, int col) { return m_dialog->m_sheet->text( row, col ); } -void CSVDialog::setText(int row, int col, const QString& text) +void CSVDialog::setText(int row, int col, const TQString& text) { if ( row < 1 || col < 1 ) // skipped by the user return; @@ -494,18 +494,18 @@ void CSVDialog::returnPressed() fillTable(); } -void CSVDialog::textChanged ( const QString & ) +void CSVDialog::textChanged ( const TQString & ) { m_dialog->m_radioOther->setChecked ( true ); delimiterClicked(4); // other } -void CSVDialog::formatChanged( const QString& newValue ) +void CSVDialog::formatChanged( const TQString& newValue ) { //kdDebug(30501) << "CSVDialog::formatChanged:" << newValue << endl; for ( int i = 0; i < m_dialog->m_sheet->numSelections(); ++i ) { - QTableSelection select ( m_dialog->m_sheet->selection( i ) ); + TQTableSelection select ( m_dialog->m_sheet->selection( i ) ); for ( int j = select.leftCol(); j <= select.rightCol() ; ++j ) { m_dialog->m_sheet->horizontalHeader()->setLabel( j, newValue ); @@ -538,7 +538,7 @@ void CSVDialog::delimiterClicked(int id) fillTable(); } -void CSVDialog::textquoteSelected(const QString& mark) +void CSVDialog::textquoteSelected(const TQString& mark) { if (mark == i18n("None")) m_textquote = 0; @@ -576,7 +576,7 @@ bool CSVDialog::checkUpdateRange() void CSVDialog::currentCellChanged(int, int col) { - const QString header = m_dialog->m_sheet->horizontalHeader()->label(col); + const TQString header = m_dialog->m_sheet->horizontalHeader()->label(col); m_dialog->m_formatComboBox->setCurrentText( header ); } @@ -589,15 +589,15 @@ void CSVDialog::ignoreDuplicatesChanged(int) fillTable(); } -QTextCodec* CSVDialog::getCodec(void) const +TQTextCodec* CSVDialog::getCodec(void) const { - const QString strCodec( KGlobal::charsets()->encodingForName( m_dialog->comboBoxEncoding->currentText() ) ); + const TQString strCodec( KGlobal::charsets()->encodingForName( m_dialog->comboBoxEncoding->currentText() ) ); kdDebug(30502) << "Encoding: " << strCodec << endl; bool ok = false; - QTextCodec* codec = QTextCodec::codecForName( strCodec.utf8() ); + TQTextCodec* codec = TQTextCodec::codecForName( strCodec.utf8() ); - // If QTextCodec has not found a valid encoding, so try with KCharsets. + // If TQTextCodec has not found a valid encoding, so try with KCharsets. if ( codec ) { ok = true; @@ -612,17 +612,17 @@ QTextCodec* CSVDialog::getCodec(void) const { // Default: UTF-8 kdWarning(30502) << "Cannot find encoding:" << strCodec << endl; - // ### TODO: what parent to use? - KMessageBox::error( 0, i18n("Cannot find encoding: %1").arg( strCodec ) ); + // ### TODO: what tqparent to use? + KMessageBox::error( 0, i18n("Cannot find encoding: %1").tqarg( strCodec ) ); return 0; } return codec; } -void CSVDialog::encodingChanged ( const QString & ) +void CSVDialog::encodingChanged ( const TQString & ) { - QTextCodec* codec = getCodec(); + TQTextCodec* codec = getCodec(); if ( codec ) { diff --git a/filters/kspread/csv/csvdialog.h b/filters/kspread/csv/csvdialog.h index e73976e6..685bbf37 100644 --- a/filters/kspread/csv/csvdialog.h +++ b/filters/kspread/csv/csvdialog.h @@ -21,7 +21,7 @@ #ifndef CSVDIALOG_H #define CSVDIALOG_H -#include +#include #include @@ -30,6 +30,7 @@ class DialogUI; class CSVDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: enum Header { @@ -41,24 +42,24 @@ public: POINTNUMBER ///< Number, which decimal symbol is a point/dot }; - CSVDialog(QWidget* parent, QByteArray& fileArray, const QString seperator); + CSVDialog(TQWidget* tqparent, TQByteArray& fileArray, const TQString seperator); ~CSVDialog(); int getRows(); int getCols(); int getHeader(int col); - QString getText(int row, int col); + TQString getText(int row, int col); private: void loadSettings(); void saveSettings(); void fillTable(); void fillComboBox(); - void setText(int row, int col, const QString& text); + void setText(int row, int col, const TQString& text); void adjustRows(int iRows); void adjustCols(int iCols); bool checkUpdateRange(); - QTextCodec* getCodec(void) const; + TQTextCodec* getCodec(void) const; bool m_adjustRows; bool m_adjustCols; @@ -66,24 +67,24 @@ private: int m_startCol; int m_endRow; int m_endCol; - QChar m_textquote; - QString m_delimiter; + TQChar m_textquote; + TQString m_delimiter; bool m_ignoreDups; - QByteArray m_fileArray; + TQByteArray m_fileArray; DialogUI * m_dialog; - QTextCodec* m_codec; - QStringList m_formatList; ///< List of the column formats + TQTextCodec* m_codec; + TQStringList m_formatList; ///< List of the column formats private slots: void returnPressed(); - void formatChanged( const QString& ); + void formatChanged( const TQString& ); void delimiterClicked(int id); - void textquoteSelected(const QString& mark); + void textquoteSelected(const TQString& mark); void currentCellChanged(int, int col); - void textChanged ( const QString & ); + void textChanged ( const TQString & ); void ignoreDuplicatesChanged( int ); void updateClicked(); - void encodingChanged ( const QString & ); + void encodingChanged ( const TQString & ); }; #endif diff --git a/filters/kspread/csv/csvexport.cc b/filters/kspread/csv/csvexport.cc index c2b99c2b..4e54a071 100644 --- a/filters/kspread/csv/csvexport.cc +++ b/filters/kspread/csv/csvexport.cc @@ -20,8 +20,8 @@ #include -#include -#include +#include +#include #include #include @@ -46,7 +46,7 @@ class Cell { public: int row, col; - QString text; + TQString text; bool operator < ( const Cell & c ) const { @@ -59,12 +59,12 @@ class Cell }; -CSVExport::CSVExport( KoFilter *, const char *, const QStringList & ) +CSVExport::CSVExport( KoFilter *, const char *, const TQStringList & ) : KoFilter(), m_eol("\n") { } -QString CSVExport::exportCSVCell( Sheet const * const sheet, int col, int row, QChar const & textQuote, QChar csvDelimiter ) +TQString CSVExport::exportCSVCell( Sheet const * const sheet, int col, int row, TQChar const & textQuote, TQChar csvDelimiter ) { // This function, given a cell, returns a string corresponding to its export in CSV format // It proceeds by: @@ -73,7 +73,7 @@ QString CSVExport::exportCSVCell( Sheet const * const sheet, int col, int row, Q // - enclosing the cell in quotes if the cell is non empty KSpread::Cell const * const cell = sheet->cellAt( col, row ); - QString text; + TQString text; if ( !cell->isDefault() && !cell->isEmpty() ) { @@ -93,18 +93,18 @@ QString CSVExport::exportCSVCell( Sheet const * const sheet, int col, int row, Q bool quote = false; if ( !text.isEmpty() ) { - if ( text.find( textQuote ) != -1 ) + if ( text.tqfind( textQuote ) != -1 ) { - QString doubleTextQuote(textQuote); + TQString doubleTextQuote(textQuote); doubleTextQuote.append(textQuote); - text.replace(textQuote, doubleTextQuote); + text.tqreplace(textQuote, doubleTextQuote); quote = true; } else if ( text[0].isSpace() || text[text.length()-1].isSpace() ) quote = true; - else if ( text.find( csvDelimiter ) != -1 ) + else if ( text.tqfind( csvDelimiter ) != -1 ) quote = true; - else if ( text.find( "\n" ) != -1 || text.find( "\r" ) != -1 ) + else if ( text.tqfind( "\n" ) != -1 || text.tqfind( "\r" ) != -1 ) quote = true; } @@ -116,9 +116,9 @@ QString CSVExport::exportCSVCell( Sheet const * const sheet, int col, int row, Q return text; } -// The reason why we use the KoDocument* approach and not the QDomDocument +// The reason why we use the KoDocument* approach and not the TQDomDocument // approach is because we don't want to export formulas but values ! -KoFilter::ConversionStatus CSVExport::convert( const QCString & from, const QCString & to ) +KoFilter::ConversiontqStatus CSVExport::convert( const TQCString & from, const TQCString & to ) { kdDebug(30501) << "CSVExport::convert" << endl; KoDocument* document = m_chain->inputDocument(); @@ -126,7 +126,7 @@ KoFilter::ConversionStatus CSVExport::convert( const QCString & from, const QCSt if ( !document ) return KoFilter::StupidError; - if ( !::qt_cast( document ) ) + if ( !::tqqt_cast( document ) ) { kdWarning(30501) << "document isn't a KSpread::Doc but a " << document->className() << endl; return KoFilter::NotImplemented; @@ -164,8 +164,8 @@ KoFilter::ConversionStatus CSVExport::convert( const QCString & from, const QCSt } } - QTextCodec* codec = 0; - QChar csvDelimiter; + TQTextCodec* codec = 0; + TQChar csvDelimiter; if (expDialog) { codec = expDialog->getCodec(); @@ -179,7 +179,7 @@ KoFilter::ConversionStatus CSVExport::convert( const QCString & from, const QCSt } else { - codec = QTextCodec::codecForName("UTF-8"); + codec = TQTextCodec::codecForName("UTF-8"); csvDelimiter = ','; } @@ -190,8 +190,8 @@ KoFilter::ConversionStatus CSVExport::convert( const QCString & from, const QCSt // Ok, for now we'll use the first sheet - my document has only one sheet anyway ;-))) bool first = true; - QString str; - QChar textQuote; + TQString str; + TQChar textQuote; if (expDialog) textQuote = expDialog->getTextQuote(); else @@ -210,7 +210,7 @@ KoFilter::ConversionStatus CSVExport::convert( const QCString & from, const QCSt Sheet const * const sheet = view->activeSheet(); - QRect selection = view->selectionInfo()->lastRange(); + TQRect selection = view->selectionInfo()->lastRange(); // Compute the highest row and column indexes (within the selection) // containing non-empty cells, respectively called CSVMaxRow CSVMaxCol. // The CSV will have CSVMaxRow rows, all with CSVMaxCol columns @@ -257,7 +257,7 @@ KoFilter::ConversionStatus CSVExport::convert( const QCString & from, const QCSt else { kdDebug(30501) << "Export as full mode" << endl; - QPtrListIterator it( ksdoc->map()->sheetList() ); + TQPtrListIterator it( ksdoc->map()->sheetList() ); for( ; it.current(); ++it ) { Sheet const * const sheet = it.current(); @@ -302,16 +302,16 @@ KoFilter::ConversionStatus CSVExport::convert( const QCString & from, const QCSt if ( !first) str += m_eol; - QString name; + TQString name; if (expDialog) name = expDialog->getSheetDelimiter(); else name = "****************"; - const QString tname( i18n("") ); - int pos = name.find( tname ); + const TQString tname( i18n("") ); + int pos = name.tqfind( tname ); if ( pos != -1 ) { - name.replace( pos, tname.length(), sheet->sheetName() ); + name.tqreplace( pos, tname.length(), sheet->sheetName() ); } str += name; str += m_eol; @@ -336,16 +336,16 @@ KoFilter::ConversionStatus CSVExport::convert( const QCString & from, const QCSt i = 0; } - QString collect; // buffer delimiters while reading empty cells + TQString collect; // buffer delimiters while reading empty cells for ( int col = 1 ; col <= CSVMaxCol ; col++ ) { - const QString txt = exportCSVCell( sheet, col, row, textQuote, csvDelimiter ); + const TQString txt = exportCSVCell( sheet, col, row, textQuote, csvDelimiter ); // if we encounter a non-empty cell, commit the buffered delimiters if (!txt.isEmpty()) { str += collect + txt; - collect = QString(); + collect = TQString(); } collect += csvDelimiter; @@ -360,7 +360,7 @@ KoFilter::ConversionStatus CSVExport::convert( const QCString & from, const QCSt emit sigProgress(100); - QFile out(m_chain->outputFile()); + TQFile out(m_chain->outputFile()); if ( !out.open( IO_WriteOnly ) ) { kdError(30501) << "Unable to open output file!" << endl; @@ -369,7 +369,7 @@ KoFilter::ConversionStatus CSVExport::convert( const QCString & from, const QCSt return KoFilter::StupidError; } - QTextStream outStream( &out ); + TQTextStream outStream( &out ); outStream.setCodec( codec ); outStream << str; diff --git a/filters/kspread/csv/csvexport.h b/filters/kspread/csv/csvexport.h index 05ce65a0..53fd9efe 100644 --- a/filters/kspread/csv/csvexport.h +++ b/filters/kspread/csv/csvexport.h @@ -21,7 +21,7 @@ #ifndef CSVEXPORT_H #define CSVEXPORT_H -#include +#include #include namespace KSpread @@ -32,18 +32,19 @@ class Sheet; class CSVExport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - CSVExport(KoFilter * parent, const char * name, const QStringList &); + CSVExport(KoFilter * tqparent, const char * name, const TQStringList &); virtual ~CSVExport() {} - virtual KoFilter::ConversionStatus convert( const QCString & from, const QCString & to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString & from, const TQCString & to ); private: - QString exportCSVCell( KSpread::Sheet const * const sheet, int col, int row, QChar const & textQuote, QChar delimiter ); + TQString exportCSVCell( KSpread::Sheet const * const sheet, int col, int row, TQChar const & textQuote, TQChar delimiter ); private: - QString m_eol; ///< End of line (LF, CR or CRLF) + TQString m_eol; ///< End of line (LF, CR or CRLF) }; #endif // CSVEXPORT_H diff --git a/filters/kspread/csv/csvexportdialog.cpp b/filters/kspread/csv/csvexportdialog.cpp index d095a9af..268f322b 100644 --- a/filters/kspread/csv/csvexportdialog.cpp +++ b/filters/kspread/csv/csvexportdialog.cpp @@ -24,19 +24,19 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -48,47 +48,47 @@ using namespace KSpread; -CSVExportDialog::CSVExportDialog( QWidget * parent ) - : KDialogBase( parent, 0, true, QString::null, Ok | Cancel, No, true ), +CSVExportDialog::CSVExportDialog( TQWidget * tqparent ) + : KDialogBase( tqparent, 0, true, TQString(), Ok | Cancel, No, true ), m_dialog( new ExportDialogUI( this ) ), m_delimiter( "," ), m_textquote('"') { kapp->restoreOverrideCursor(); - QStringList encodings; - encodings << i18n( "Descriptive encoding name", "Recommended ( %1 )" ).arg( "UTF-8" ); - encodings << i18n( "Descriptive encoding name", "Locale ( %1 )" ).arg( QTextCodec::codecForLocale()->name() ); + TQStringList encodings; + encodings << i18n( "Descriptive encoding name", "Recommended ( %1 )" ).tqarg( "UTF-8" ); + encodings << i18n( "Descriptive encoding name", "Locale ( %1 )" ).tqarg( TQTextCodec::codecForLocale()->name() ); encodings += KGlobal::charsets()->descriptiveEncodingNames(); // Add a few non-standard encodings, which might be useful for text files - const QString description(i18n("Descriptive encoding name","Other ( %1 )")); - encodings << description.arg("Apple Roman"); // Apple - encodings << description.arg("IBM 850") << description.arg("IBM 866"); // MS DOS - encodings << description.arg("CP 1258"); // Windows + const TQString description(i18n("Descriptive encoding name","Other ( %1 )")); + encodings << description.tqarg("Apple Roman"); // Apple + encodings << description.tqarg("IBM 850") << description.tqarg("IBM 866"); // MS DOS + encodings << description.tqarg("CP 1258"); // Windows m_dialog->comboBoxEncoding->insertStringList(encodings); - setButtonBoxOrientation ( Vertical ); + setButtonBoxOrientation (Qt::Vertical ); setMainWidget(m_dialog); // Invalid 'Other' delimiters // - Quotes // - CR,LF,Vetical-tab,Formfeed,ASCII bel - QRegExp rx( "^[^\"'\r\n\v\f\a]{0,1}$" ); - m_delimiterValidator = new QRegExpValidator( rx, m_dialog->m_delimiterBox ); + TQRegExp rx( "^[^\"'\r\n\v\f\a]{0,1}$" ); + m_delimiterValidator = new TQRegExpValidator( rx, TQT_TQOBJECT(m_dialog->m_delimiterBox) ); m_dialog->m_delimiterEdit->setValidator( m_delimiterValidator ); - connect( m_dialog->m_delimiterBox, SIGNAL( clicked(int) ), - this, SLOT( delimiterClicked( int ) ) ); - connect( m_dialog->m_delimiterEdit, SIGNAL( returnPressed() ), - this, SLOT( returnPressed() ) ); - connect( m_dialog->m_delimiterEdit, SIGNAL( textChanged ( const QString & ) ), - this, SLOT(textChanged ( const QString & ) ) ); - connect( m_dialog->m_comboQuote, SIGNAL( activated( const QString & ) ), - this, SLOT( textquoteSelected( const QString & ) ) ); - connect( m_dialog->m_selectionOnly, SIGNAL( toggled( bool ) ), - this, SLOT( selectionOnlyChanged( bool ) ) ); + connect( m_dialog->m_delimiterBox, TQT_SIGNAL( clicked(int) ), + this, TQT_SLOT( delimiterClicked( int ) ) ); + connect( m_dialog->m_delimiterEdit, TQT_SIGNAL( returnPressed() ), + this, TQT_SLOT( returnPressed() ) ); + connect( m_dialog->m_delimiterEdit, TQT_SIGNAL( textChanged ( const TQString & ) ), + this, TQT_SLOT(textChanged ( const TQString & ) ) ); + connect( m_dialog->m_comboQuote, TQT_SIGNAL( activated( const TQString & ) ), + this, TQT_SLOT( textquoteSelected( const TQString & ) ) ); + connect( m_dialog->m_selectionOnly, TQT_SIGNAL( toggled( bool ) ), + this, TQT_SLOT( selectionOnlyChanged( bool ) ) ); loadSettings(); } @@ -96,7 +96,7 @@ CSVExportDialog::CSVExportDialog( QWidget * parent ) CSVExportDialog::~CSVExportDialog() { saveSettings(); - kapp->setOverrideCursor(Qt::waitCursor); + kapp->setOverrideCursor(TQt::waitCursor); delete m_delimiterValidator; } @@ -106,11 +106,11 @@ void CSVExportDialog::loadSettings() config->setGroup("CSVDialog Settings"); m_textquote = config->readEntry("textquote", "\"")[0]; m_delimiter = config->readEntry("delimiter", ","); - const QString codecText = config->readEntry("codec", ""); + const TQString codecText = config->readEntry("codec", ""); bool selectionOnly = config->readBoolEntry("selectionOnly", false); - const QString sheetDelim = config->readEntry("sheetDelimiter", m_dialog->m_sheetDelimiter->text()); + const TQString sheetDelim = config->readEntry("sheetDelimiter", m_dialog->m_sheetDelimiter->text()); bool delimAbove = config->readBoolEntry("sheetDelimiterAbove", false); - const QString eol = config->readEntry("eol", "\r\n"); + const TQString eol = config->readEntry("eol", "\r\n"); // update widgets if (!codecText.isEmpty()) { @@ -138,7 +138,7 @@ void CSVExportDialog::saveSettings() { KConfig *config = kapp->config(); config->setGroup("CSVDialog Settings"); - QString q = m_textquote; + TQString q = m_textquote; config->writeEntry("textquote", q); config->writeEntry("delimiter", m_delimiter); config->writeEntry("codec", m_dialog->comboBoxEncoding->currentText()); @@ -152,14 +152,14 @@ void CSVExportDialog::saveSettings() void CSVExportDialog::fillSheet( Map * map ) { m_dialog->m_sheetList->clear(); - QCheckListItem * item; + TQCheckListItem * item; - QPtrListIterator it( map->sheetList() ); + TQPtrListIterator it( map->sheetList() ); for( ; it.current(); ++it ) { - item = new QCheckListItem( m_dialog->m_sheetList, + item = new TQCheckListItem( m_dialog->m_sheetList, it.current()->sheetName(), - QCheckListItem::CheckBox ); + TQCheckListItem::CheckBox ); item->setOn(true); m_dialog->m_sheetList->insertItem( item ); } @@ -169,12 +169,12 @@ void CSVExportDialog::fillSheet( Map * map ) m_dialog->m_sheetList->setSorting( -1 ); } -QChar CSVExportDialog::getDelimiter() const +TQChar CSVExportDialog::getDelimiter() const { return m_delimiter[0]; } -QChar CSVExportDialog::getTextQuote() const +TQChar CSVExportDialog::getTextQuote() const { return m_textquote; } @@ -184,18 +184,18 @@ bool CSVExportDialog::printAlwaysSheetDelimiter() const return m_dialog->m_delimiterAboveAll->isChecked(); } -QString CSVExportDialog::getSheetDelimiter() const +TQString CSVExportDialog::getSheetDelimiter() const { return m_dialog->m_sheetDelimiter->text(); } -bool CSVExportDialog::exportSheet(QString const & sheetName) const +bool CSVExportDialog::exportSheet(TQString const & sheetName) const { - for (QListViewItem * item = m_dialog->m_sheetList->firstChild(); item; item = item->nextSibling()) + for (TQListViewItem * item = m_dialog->m_sheetList->firstChild(); item; item = item->nextSibling()) { - if (((QCheckListItem * ) item)->isOn()) + if (((TQCheckListItem * ) item)->isOn()) { - if ( ((QCheckListItem * ) item)->text() == sheetName ) + if ( ((TQCheckListItem * ) item)->text() == sheetName ) return true; } } @@ -220,7 +220,7 @@ void CSVExportDialog::returnPressed() m_delimiter = m_dialog->m_delimiterEdit->text(); } -void CSVExportDialog::textChanged ( const QString & ) +void CSVExportDialog::textChanged ( const TQString & ) { if ( m_dialog->m_delimiterEdit->text().isEmpty() ) @@ -263,7 +263,7 @@ void CSVExportDialog::delimiterClicked( int id ) } } -void CSVExportDialog::textquoteSelected( const QString & mark ) +void CSVExportDialog::textquoteSelected( const TQString & mark ) { m_textquote = mark[0]; } @@ -282,15 +282,15 @@ bool CSVExportDialog::exportSelectionOnly() const return m_dialog->m_selectionOnly->isChecked(); } -QTextCodec* CSVExportDialog::getCodec(void) const +TQTextCodec* CSVExportDialog::getCodec(void) const { - const QString strCodec( KGlobal::charsets()->encodingForName( m_dialog->comboBoxEncoding->currentText() ) ); + const TQString strCodec( KGlobal::charsets()->encodingForName( m_dialog->comboBoxEncoding->currentText() ) ); kdDebug(30502) << "Encoding: " << strCodec << endl; bool ok = false; - QTextCodec* codec = QTextCodec::codecForName( strCodec.utf8() ); + TQTextCodec* codec = TQTextCodec::codecForName( strCodec.utf8() ); - // If QTextCodec has not found a valid encoding, so try with KCharsets. + // If TQTextCodec has not found a valid encoding, so try with KCharsets. if ( codec ) { ok = true; @@ -305,17 +305,17 @@ QTextCodec* CSVExportDialog::getCodec(void) const { // Default: UTF-8 kdWarning(30502) << "Cannot find encoding:" << strCodec << endl; - // ### TODO: what parent to use? - KMessageBox::error( 0, i18n("Cannot find encoding: %1").arg( strCodec ) ); + // ### TODO: what tqparent to use? + KMessageBox::error( 0, i18n("Cannot find encoding: %1").tqarg( strCodec ) ); return 0; } return codec; } -QString CSVExportDialog::getEndOfLine(void) const +TQString CSVExportDialog::getEndOfLine(void) const { - QString strReturn; + TQString strReturn; if (m_dialog->radioEndOfLineLF==m_dialog->buttonGroupEndOfLine->selected()) strReturn="\n"; else if (m_dialog->radioEndOfLineCRLF==m_dialog->buttonGroupEndOfLine->selected()) diff --git a/filters/kspread/csv/csvexportdialog.h b/filters/kspread/csv/csvexportdialog.h index 0ca1f5ba..aa350f01 100644 --- a/filters/kspread/csv/csvexportdialog.h +++ b/filters/kspread/csv/csvexportdialog.h @@ -24,7 +24,7 @@ #include class ExportDialogUI; -class QValidator; +class TQValidator; namespace KSpread { @@ -34,29 +34,30 @@ class Map; class CSVExportDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - CSVExportDialog(QWidget * parent); + CSVExportDialog(TQWidget * tqparent); ~CSVExportDialog(); - QChar getDelimiter() const; - QChar getTextQuote() const; - bool exportSheet( QString const & sheetName ) const; + TQChar getDelimiter() const; + TQChar getTextQuote() const; + bool exportSheet( TQString const & sheetName ) const; bool printAlwaysSheetDelimiter() const; - QString getSheetDelimiter() const; + TQString getSheetDelimiter() const; bool exportSelectionOnly() const; void fillSheet( KSpread::Map * map ); - QString getEndOfLine(void) const; - QTextCodec* getCodec(void) const; + TQString getEndOfLine(void) const; + TQTextCodec* getCodec(void) const; private: void loadSettings(); void saveSettings(); ExportDialogUI * m_dialog; - QValidator* m_delimiterValidator; - QString m_delimiter; - QChar m_textquote; + TQValidator* m_delimiterValidator; + TQString m_delimiter; + TQChar m_textquote; private slots: void slotOk(); @@ -64,8 +65,8 @@ class CSVExportDialog : public KDialogBase void returnPressed(); void delimiterClicked( int id ); - void textChanged ( const QString & ); - void textquoteSelected( const QString & mark ); + void textChanged ( const TQString & ); + void textquoteSelected( const TQString & mark ); void selectionOnlyChanged( bool ); }; diff --git a/filters/kspread/csv/csvimport.cc b/filters/kspread/csv/csvimport.cc index 49792406..c05c075c 100644 --- a/filters/kspread/csv/csvimport.cc +++ b/filters/kspread/csv/csvimport.cc @@ -20,8 +20,8 @@ #include -#include -#include +#include +#include #include #include @@ -53,13 +53,13 @@ using namespace KSpread; typedef KGenericFactory CSVImportFactory; K_EXPORT_COMPONENT_FACTORY( libcsvimport, CSVImportFactory( "kofficefilters" ) ) -CSVFilter::CSVFilter(KoFilter *, const char*, const QStringList&) : +CSVFilter::CSVFilter(KoFilter *, const char*, const TQStringList&) : KoFilter() { } -KoFilter::ConversionStatus CSVFilter::convert( const QCString& from, const QCString& to ) +KoFilter::ConversiontqStatus CSVFilter::convert( const TQCString& from, const TQCString& to ) { - QString file( m_chain->inputFile() ); + TQString file( m_chain->inputFile() ); KoDocument* document = m_chain->outputDocument(); if ( !document ) @@ -67,7 +67,7 @@ KoFilter::ConversionStatus CSVFilter::convert( const QCString& from, const QCStr kdDebug(30501) << "here we go... " << document->className() << endl; - if ( !::qt_cast( document ) ) + if ( !::tqqt_cast( document ) ) { kdWarning(30501) << "document isn't a KSpread::Doc but a " << document->className() << endl; return KoFilter::NotImplemented; @@ -88,19 +88,19 @@ KoFilter::ConversionStatus CSVFilter::convert( const QCString& from, const QCStr return KoFilter::NotImplemented; } - QFile in(file); + TQFile in(file); if(!in.open(IO_ReadOnly)) { KMessageBox::sorry( 0L, i18n("CSV filter cannot open input file - please report.") ); in.close(); return KoFilter::FileNotFound; } - QString csv_delimiter; + TQString csv_delimiter; // ###### FIXME: disabled for now //if (!config.isNull()) // csv_delimiter = config[0]; - QByteArray inputFile( in.readAll() ); + TQByteArray inputFile( in.readAll() ); in.close(); CSVDialog *dialog = new CSVDialog(0L, inputFile, csv_delimiter ); @@ -123,16 +123,16 @@ KoFilter::ConversionStatus CSVFilter::convert( const QCString& from, const QCStr int value = 0; emit sigProgress(value); - QApplication::setOverrideCursor(Qt::waitCursor); + TQApplication::setOverrideCursor(TQt::waitCursor); int i; double init = sheet->nonDefaultColumnFormat( 1 )->dblWidth(); - QMemArray widths( numCols ); + TQMemArray widths( numCols ); for ( i = 0; i < numCols; ++i ) widths[i] = init; Cell* c = sheet->nonDefaultCell( 1, 1 ); - QFontMetrics fm( c->format()->textFont( 1, 1 ) ); + TQFontMetrics fm( c->format()->textFont( 1, 1 ) ); Style * s = ksdoc->styleManager()->defaultStyle(); @@ -142,7 +142,7 @@ KoFilter::ConversionStatus CSVFilter::convert( const QCString& from, const QCStr { value += step; emit sigProgress(value); - const QString text( dialog->getText( row, col ) ); + const TQString text( dialog->getText( row, col ) ); // ### FIXME: how to calculate the width of numbers (as they might not be in the right format) const double len = fm.width( text ); @@ -191,9 +191,9 @@ KoFilter::ConversionStatus CSVFilter::convert( const QCString& from, const QCStr case CSVDialog::COMMANUMBER: { bool ok = false; - QString tmp ( text ); - tmp.remove ( QRegExp( "[^0-9,Ee+-]" ) ); // Keep only 0 to 9, comma, E, e, plus, minus - tmp.replace ( ',', '.' ); + TQString tmp ( text ); + tmp.remove ( TQRegExp( "[^0-9,Ee+-]" ) ); // Keep only 0 to 9, comma, E, e, plus, minus + tmp.tqreplace ( ',', '.' ); kdDebug(30501) << "Comma: " << text << " => " << tmp << endl; const double d = tmp.toDouble( &ok ); if ( !ok ) @@ -212,9 +212,9 @@ KoFilter::ConversionStatus CSVFilter::convert( const QCString& from, const QCStr case CSVDialog::POINTNUMBER: { bool ok = false; - QString tmp ( text ); - tmp.remove ( QRegExp( "[^0-9\\.EeD+-]" ) ); // Keep only 0 to 9, dot, E, e, D, plus, minus - tmp.replace ( 'D', 'E' ); // double from FORTRAN use D instead of E + TQString tmp ( text ); + tmp.remove ( TQRegExp( "[^0-9\\.EeD+-]" ) ); // Keep only 0 to 9, dot, E, e, D, plus, minus + tmp.tqreplace ( 'D', 'E' ); // double from FORTRAN use D instead of E kdDebug(30501) << "Point: " << text << " => " << tmp << endl; const double d = tmp.toDouble( &ok ); if ( !ok ) @@ -255,7 +255,7 @@ KoFilter::ConversionStatus CSVFilter::convert( const QCString& from, const QCStr } emit sigProgress( 100 ); - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); delete dialog; return KoFilter::OK; diff --git a/filters/kspread/csv/csvimport.h b/filters/kspread/csv/csvimport.h index f89f16e6..6f01a734 100644 --- a/filters/kspread/csv/csvimport.h +++ b/filters/kspread/csv/csvimport.h @@ -25,11 +25,12 @@ class CSVFilter : public KoFilter { Q_OBJECT + TQ_OBJECT public: - CSVFilter(KoFilter *parent, const char *name, const QStringList&); + CSVFilter(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~CSVFilter() {} - virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to ); }; #endif // CSVFILTER_H diff --git a/filters/kspread/csv/dialogui.ui b/filters/kspread/csv/dialogui.ui index 9381676c..7cf0d28c 100644 --- a/filters/kspread/csv/dialogui.ui +++ b/filters/kspread/csv/dialogui.ui @@ -1,6 +1,6 @@ DialogUI - + DialogUI @@ -30,7 +30,7 @@ 6 - + m_sheet @@ -49,11 +49,11 @@ 0 - + tabWidget2 - + TabPage @@ -64,15 +64,15 @@ unnamed - + - layout3 + tqlayout3 unnamed - + textLabel1_3 @@ -104,7 +104,7 @@ Expanding - + 106 20 @@ -123,7 +123,7 @@ Expanding - + 20 60 @@ -132,7 +132,7 @@ - + tab @@ -143,7 +143,7 @@ unnamed - + m_delimiterBox @@ -168,7 +168,7 @@ 6 - + m_radioComma @@ -179,7 +179,7 @@ true - + m_radioSemicolon @@ -187,7 +187,7 @@ Semicolon - + m_radioTab @@ -195,7 +195,7 @@ Tabulator - + m_radioSpace @@ -203,7 +203,7 @@ Space - + m_radioOther @@ -211,7 +211,7 @@ Other - + m_delimiterEdit @@ -223,7 +223,7 @@ 0 - + 30 32767 @@ -232,7 +232,7 @@ - + m_ignoreDuplicates @@ -240,7 +240,7 @@ Ignore duplicate delimiters - + TextLabel2 @@ -259,7 +259,7 @@ m_comboQuote - + textLabel1_4 @@ -275,7 +275,7 @@ m_formatComboBox - + " @@ -313,7 +313,7 @@ Expanding - + 51 21 @@ -330,7 +330,7 @@ Expanding - + 51 21 @@ -339,7 +339,7 @@ - + tab @@ -350,7 +350,7 @@ unnamed - + frame3 @@ -364,12 +364,12 @@ unnamed - + m_rowEnd - + textLabel1 @@ -379,11 +379,11 @@ AutoText - + WordBreak|AlignCenter - + TextLabel3 @@ -405,12 +405,12 @@ Import lines: - + m_colEnd - + m_colStart @@ -418,7 +418,7 @@ 1 - + textLabel1_2 @@ -428,11 +428,11 @@ AutoText - + WordBreak|AlignCenter - + m_rowStart @@ -440,7 +440,7 @@ 1 - + TextLabel3_2 @@ -472,7 +472,7 @@ Expanding - + 468 20 @@ -489,7 +489,7 @@ Expanding - + 468 20 @@ -506,7 +506,7 @@ Expanding - + 611 20 @@ -523,14 +523,14 @@ Expanding - + 71 20 - + m_updateButton @@ -545,7 +545,7 @@ - + kcombobox.h klineedit.h diff --git a/filters/kspread/csv/exportdialogui.ui b/filters/kspread/csv/exportdialogui.ui index 5bb78dea..9b38a41f 100644 --- a/filters/kspread/csv/exportdialogui.ui +++ b/filters/kspread/csv/exportdialogui.ui @@ -1,6 +1,6 @@ ExportDialogUI - + ExportDialogUI @@ -22,7 +22,7 @@ 6 - + m_tabWidget @@ -34,7 +34,7 @@ 0 - + encodingPage @@ -45,15 +45,15 @@ unnamed - + - layout3 + tqlayout3 unnamed - + textLabel1 @@ -85,7 +85,7 @@ Expanding - + 106 20 @@ -94,7 +94,7 @@ - + buttonGroupEndOfLine @@ -111,7 +111,7 @@ 6 - + radioEndOfLineLF @@ -122,7 +122,7 @@ true - + radioEndOfLineCRLF @@ -133,7 +133,7 @@ false - + radioEndOfLineCR @@ -156,7 +156,7 @@ Expanding - + 20 96 @@ -165,7 +165,7 @@ - + tab @@ -182,7 +182,7 @@ 6 - + Available Sheets @@ -198,7 +198,7 @@ m_sheetList - + TextLabel4 @@ -206,7 +206,7 @@ Select sheets to export: - + m_delimiterLineBox @@ -231,7 +231,7 @@ 6 - + m_sheetDelimiter @@ -239,7 +239,7 @@ ********<SHEETNAME>******** - + TextLabel6 @@ -254,11 +254,11 @@ <SHEETNAME> gets replaced by the name of the next sheet. - + WordBreak|AlignVCenter - + m_delimiterAboveAll @@ -278,7 +278,7 @@ - + tab2 @@ -295,7 +295,7 @@ 6 - + m_delimiterBox @@ -320,7 +320,7 @@ 6 - + m_radioComma @@ -331,7 +331,7 @@ true - + m_radioSemicolon @@ -339,7 +339,7 @@ Semicolon - + m_radioTab @@ -347,7 +347,7 @@ Tabulator - + m_radioSpace @@ -355,7 +355,7 @@ Space - + m_radioOther @@ -363,7 +363,7 @@ Other: - + m_delimiterEdit @@ -375,7 +375,7 @@ 0 - + 30 32767 @@ -387,7 +387,7 @@ - + GroupBox1 @@ -412,7 +412,7 @@ 6 - + m_quotesLabel @@ -431,7 +431,7 @@ Quotes: - + " @@ -469,7 +469,7 @@ Expanding - + 0 81 @@ -479,7 +479,7 @@ - + buttonGroup2 @@ -490,7 +490,7 @@ unnamed - + m_selectionOnly @@ -502,7 +502,7 @@ - + kcombobox.h klineedit.h diff --git a/filters/kspread/csv/status.html b/filters/kspread/csv/status.html index c4379ade..497ee00a 100644 --- a/filters/kspread/csv/status.html +++ b/filters/kspread/csv/status.html @@ -98,11 +98,11 @@ Let's try to draw the graph of the state machine using ascii-art. /--\ | | | v " - /--[START]-------->[QUOTED_FIELD] (**) + /--[START]-------->[TQUOTED_FIELD] (**) other| ^ ^ | ^ (*) | | | DEL or | " | " (*) | | | EOL v | other - | | \----[MAYBE_END_OF_QUOTED_FIELD]--------> Error + | | \----[MAYBE_END_OF_TQUOTED_FIELD]--------> Error | | | | DEL or | | EOL diff --git a/filters/kspread/csv/xmltree.cc b/filters/kspread/csv/xmltree.cc index e6fdf124..f5c56373 100644 --- a/filters/kspread/csv/xmltree.cc +++ b/filters/kspread/csv/xmltree.cc @@ -19,13 +19,13 @@ #include -#include +#include #include -XMLTree::XMLTree(QDomDocument &qdoc) : root(qdoc) +XMLTree::XMLTree(TQDomDocument &qdoc) : root(qdoc) { - root=QDomDocument("spreadsheet"); + root=TQDomDocument("spreadsheet"); root.appendChild( root.createProcessingInstruction( "xml", "version=\"1.0\" encoding=\"UTF-8\"" ) ); doc = root.createElement( "spreadsheet" ); @@ -33,10 +33,10 @@ XMLTree::XMLTree(QDomDocument &qdoc) : root(qdoc) doc.setAttribute("mime", "application/x-kspread"); root.appendChild(doc); - QDomElement paper = root.createElement("paper"); + TQDomElement paper = root.createElement("paper"); paper.setAttribute("format", "A4"); paper.setAttribute("orientation", "Portrait"); - QDomElement borders = root.createElement( "borders" ); + TQDomElement borders = root.createElement( "borders" ); borders.setAttribute( "left", 20 ); borders.setAttribute( "top", 20 ); borders.setAttribute( "right", 20 ); @@ -63,25 +63,25 @@ XMLTree::~XMLTree() } // Not needed anymore (Werner) -//const QString XMLTree::part() +//const TQString XMLTree::part() //{ -// QString s; -// QTextStream t(s, IO_WriteOnly); +// TQString s; +// TQTextStream t(s, IO_WriteOnly); -// QTime tmr; +// TQTime tmr; // tmr.start(); // kdDebug(30501) << "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" << endl; // root.save(t); // Why does this take sooooo long (approx. 8s on my Athlon 500 with a // quite small file :( ) -// David: gdb says that QString::replace calls itself recursively an enormous amount of time -// This is called by QStringBuffer::writeBlock (), called by QTextStream::writeBlock () -// called by QTextStream::operator<< () in QDOM_AttrPrivate::save (). +// David: gdb says that TQString::replace calls itself recursively an enormous amount of time +// This is called by TQStringBuffer::writeBlock (), called by TQTextStream::writeBlock () +// called by TQTextStream::operator<< () in TQDOM_AttrPrivate::save (). // // And this looks related to the UTF 8 encoding ... -// kdDebug(30501) << (const char*)QString::number((int)tmr.elapsed()) << endl; +// kdDebug(30501) << (const char*)TQString::number((int)tmr.elapsed()) << endl; // kdDebug(30501) << "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" << endl; // t << '\0'; @@ -89,16 +89,16 @@ XMLTree::~XMLTree() // return s; //} -bool XMLTree::cell( const QString & contents ) +bool XMLTree::cell( const TQString & contents ) { - QDomElement e = root.createElement("cell"); + TQDomElement e = root.createElement("cell"); //e.appendChild(getFormat(xf)); //e.appendChild(getFont(xf)); e.setAttribute("row", row); e.setAttribute("column", column++); - QDomElement format=root.createElement("format"); + TQDomElement format=root.createElement("format"); format.setAttribute("float", "3"); format.setAttribute("alignY", "2"); format.setAttribute("floatcolor", "2"); @@ -106,12 +106,12 @@ bool XMLTree::cell( const QString & contents ) format.setAttribute("precision", "-1"); format.setAttribute("align", "4"); - QDomElement pen=root.createElement("pen"); + TQDomElement pen=root.createElement("pen"); pen.setAttribute("width", "1"); pen.setAttribute("style", "0"); pen.setAttribute("color", "#000000"); - QDomElement lborder=root.createElement("left-border"); + TQDomElement lborder=root.createElement("left-border"); lborder.appendChild(pen); format.appendChild(lborder); @@ -120,7 +120,7 @@ bool XMLTree::cell( const QString & contents ) pen.setAttribute("style", "0"); pen.setAttribute("color", "#000000"); - QDomElement tborder=root.createElement("top-border"); + TQDomElement tborder=root.createElement("top-border"); tborder.appendChild(pen); format.appendChild(tborder); @@ -129,7 +129,7 @@ bool XMLTree::cell( const QString & contents ) pen.setAttribute("style", "0"); pen.setAttribute("color", "#000000"); - QDomElement fdia=root.createElement("fall-diagonal"); + TQDomElement fdia=root.createElement("fall-diagonal"); fdia.appendChild(pen); format.appendChild(fdia); @@ -138,13 +138,13 @@ bool XMLTree::cell( const QString & contents ) pen.setAttribute("style", "0"); pen.setAttribute("color", "#000000"); - QDomElement udia=root.createElement("up-diagonal"); + TQDomElement udia=root.createElement("up-diagonal"); udia.appendChild(pen); format.appendChild(udia); e.appendChild(format); - QDomElement text=root.createElement("text"); + TQDomElement text=root.createElement("text"); text.appendChild(root.createTextNode(contents)); e.appendChild(text); diff --git a/filters/kspread/csv/xmltree.h b/filters/kspread/csv/xmltree.h index 919acc8f..247af4e5 100644 --- a/filters/kspread/csv/xmltree.h +++ b/filters/kspread/csv/xmltree.h @@ -20,9 +20,9 @@ #ifndef XMLTREE_H #define XMLTREE_H -#include -#include -#include +#include +#include +#include class XMLTree { @@ -30,14 +30,14 @@ class XMLTree public: // Create a tree. // inputFileName is only used in order to name the sheet - XMLTree(QDomDocument &qdoc); + XMLTree(TQDomDocument &qdoc); ~XMLTree(); - // Return the whole XML as QString - //const QString part(); + // Return the whole XML as TQString + //const TQString part(); // Create a new cell - bool cell( const QString & contents ); + bool cell( const TQString & contents ); // Tell about an empty cell (doesn't create it, just skips) void emptycell() { column ++; } // easy heh ? ;) @@ -47,7 +47,7 @@ public: private: int row, column; - QDomDocument &root; - QDomElement doc, map, sheet; + TQDomDocument &root; + TQDomElement doc, map, sheet; }; #endif // XMLTREE_H diff --git a/filters/kspread/dbase/dbase.cpp b/filters/kspread/dbase/dbase.cpp index 67780f33..acc1e27d 100644 --- a/filters/kspread/dbase/dbase.cpp +++ b/filters/kspread/dbase/dbase.cpp @@ -19,12 +19,12 @@ */ -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include @@ -51,7 +51,7 @@ DBase::~DBase() // unsigned char reserved[20] 12-31 reserverd info from dBase // -bool DBase::load( const QString& filename ) +bool DBase::load( const TQString& filename ) { m_file.setName( filename ); @@ -59,12 +59,12 @@ bool DBase::load( const QString& filename ) return false; m_stream.setDevice( &m_file ); - m_stream.setByteOrder( QDataStream::LittleEndian ); + m_stream.setByteOrder( TQDataStream::LittleEndian ); unsigned filesize = m_file.size(); // read dBASE version - Q_UINT8 ver; + TQ_UINT8 ver; m_stream >> ver; m_version = ver & 0x7f; // bit 7: has memo ? @@ -73,7 +73,7 @@ bool DBase::load( const QString& filename ) return false; // date of last update - Q_UINT8 y, m, d; + TQ_UINT8 y, m, d; m_stream >> y >> m >> d; // because dBASE saves 102 instead of 2002 (very Y2K-save ;-) m_lastUpdate.setYMD( y+1900, m, d ); @@ -82,22 +82,22 @@ bool DBase::load( const QString& filename ) if( !m_lastUpdate.isValid() ) return false; // number of records - Q_UINT32 norec; + TQ_UINT32 norec; m_stream >> norec; m_recordCount = norec; // header-length - Q_UINT16 header_length; + TQ_UINT16 header_length; m_stream >> header_length; m_headerLength = header_length; // record-length - Q_UINT16 record_length; + TQ_UINT16 record_length; m_stream >> record_length; m_recordLength = record_length; // read the remaining chars - Q_UINT8 dummy; + TQ_UINT8 dummy; for (int foo = 0; foo < 20; ++foo) m_stream >> dummy; @@ -122,14 +122,14 @@ bool DBase::load( const QString& filename ) DBaseField* field = new DBaseField; // columnn-name - Q_UINT8 colname[12]; + TQ_UINT8 colname[12]; for ( int j = 0; j < 11; ++j) m_stream >> colname[j]; colname[11] = '\0'; - field->name = QString( (const char*) &colname[0] ); + field->name = TQString( (const char*) &colname[0] ); // type of column - Q_UINT8 coltype; + TQ_UINT8 coltype; m_stream >> coltype; switch( coltype ) { @@ -142,21 +142,21 @@ bool DBase::load( const QString& filename ) } // fileddataaddress - Q_UINT32 addr; + TQ_UINT32 addr; m_stream >> addr; // columnlength - Q_UINT8 colsize; + TQ_UINT8 colsize; m_stream >> colsize; field->length = colsize; // decimals - Q_UINT8 decimals; + TQ_UINT8 decimals; m_stream >> decimals; field->decimals = decimals; // read remaining chars - Q_UINT8 dummy; + TQ_UINT8 dummy; for ( int foo = 0; foo < 14; ++foo ) m_stream >> dummy; @@ -165,14 +165,14 @@ bool DBase::load( const QString& filename ) } // set the index to the first record - m_stream.device()->at( m_headerLength ); + m_stream.tqdevice()->at( m_headerLength ); return true; } -QStringList DBase::readRecord( unsigned recno ) +TQStringList DBase::readRecord( unsigned recno ) { - QStringList result; + TQStringList result; // out of range ? return empty strings if( recno >= m_recordCount ) @@ -184,11 +184,11 @@ QStringList DBase::readRecord( unsigned recno ) // seek to where the record is unsigned filepos = m_headerLength + recno * m_recordLength; - m_stream.device()->at( filepos ); + m_stream.tqdevice()->at( filepos ); // first char == '*' means the record is deleted // so we just skip it - Q_UINT8 delmarker; + TQ_UINT8 delmarker; m_stream >> delmarker; if( delmarker == 0x2a ) return result; @@ -201,17 +201,17 @@ QStringList DBase::readRecord( unsigned recno ) case DBaseField::Numeric: case DBaseField::Character: { - QString str; - Q_UINT8 ch; + TQString str; + TQ_UINT8 ch; for( unsigned j=0; jlength; j++ ) - { m_stream >> ch; str += QChar(ch); } + { m_stream >> ch; str += TQChar(ch); } result.append( str ); } break; // Logical case DBaseField::Logical: { - Q_UINT8 ch; + TQ_UINT8 ch; m_stream >> ch; switch( ch ) { @@ -225,10 +225,10 @@ QStringList DBase::readRecord( unsigned recno ) // Note: convert it to YYYY-MM-DD case DBaseField::Date: { - QString str; - Q_UINT8 ch; + TQString str; + TQ_UINT8 ch; for( unsigned j=0; jlength; j++ ) - { m_stream >> ch; str += QChar(ch); } + { m_stream >> ch; str += TQChar(ch); } str.insert( 6, '-' ); str.insert( 4, '-' ); result.append( str ); diff --git a/filters/kspread/dbase/dbase.h b/filters/kspread/dbase/dbase.h index 022d2ba1..efc909b4 100644 --- a/filters/kspread/dbase/dbase.h +++ b/filters/kspread/dbase/dbase.h @@ -21,16 +21,16 @@ #ifndef DBASE_H #define DBASE_H -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include class DBaseField { public: - QString name; + TQString name; enum { Unknown, Character, Date, Numeric, Logical, Memo } type; unsigned length; unsigned decimals; @@ -43,22 +43,22 @@ class DBase DBase(); ~DBase(); - QPtrList fields; + TQPtrList fields; - bool load( const QString& filename ); - QStringList readRecord( unsigned recno ); + bool load( const TQString& filename ); + TQStringList readRecord( unsigned recno ); void close(); unsigned recordCount(){ return m_recordCount; } int version(){ return m_version; } - QDate lastUpdate(){ return m_lastUpdate; } + TQDate lastUpdate(){ return m_lastUpdate; } private: - QFile m_file; - QDataStream m_stream; + TQFile m_file; + TQDataStream m_stream; int m_version; - QDate m_lastUpdate; + TQDate m_lastUpdate; unsigned m_recordCount; unsigned m_headerLength; unsigned m_recordLength; diff --git a/filters/kspread/dbase/dbaseimport.cc b/filters/kspread/dbase/dbaseimport.cc index 1c167cd0..bcbc98b8 100644 --- a/filters/kspread/dbase/dbaseimport.cc +++ b/filters/kspread/dbase/dbaseimport.cc @@ -27,10 +27,10 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -43,17 +43,17 @@ typedef KGenericFactory DBaseImportFactory; K_EXPORT_COMPONENT_FACTORY( libdbaseimport, DBaseImportFactory( "kofficefilters" ) ) -DBaseImport::DBaseImport ( QObject*, const char*, const QStringList& ) +DBaseImport::DBaseImport ( TQObject*, const char*, const TQStringList& ) : KoFilter() { } -KoFilter::ConversionStatus DBaseImport::convert( const QCString& from, const QCString& to ) +KoFilter::ConversiontqStatus DBaseImport::convert( const TQCString& from, const TQCString& to ) { if (to != "application/x-kspread" || from != "application/x-dbase") return KoFilter::NotImplemented; - QString inputFile = m_chain->inputFile(); + TQString inputFile = m_chain->inputFile(); DBase dbase; bool result = dbase.load( inputFile ); @@ -70,7 +70,7 @@ KoFilter::ConversionStatus DBaseImport::convert( const QCString& from, const QCS return KoFilter::StupidError; } - QString root, documentInfo; + TQString root, documentInfo; root = "\n"; root += "\n"; @@ -96,33 +96,33 @@ KoFilter::ConversionStatus DBaseImport::convert( const QCString& from, const QCS root += " formular=\"0\" lcmode=\"0\" >\n"; // KOffice default font - QFont font = KoGlobal::defaultFont(); + TQFont font = KoGlobal::defaultFont(); // define columns - QFontMetrics fm( font ); + TQFontMetrics fm( font ); for( unsigned i=0; ilength, dbase.fields.at(i)->name.length()); + int mw = TQMAX( dbase.fields.at(i)->length, dbase.fields.at(i)->name.length()); double w = POINT_TO_MM( fm.maxWidth() * mw ); - root += "\n"; + root += "\n"; } // define rows double h = POINT_TO_MM( 5 + fm.height() + fm.leading() ); for( unsigned j=0; j\n"; + root += "\n"; } // field names come as first row for( unsigned i=0; i\n"; + root += "\n"; root += ""; root += ""; root += "\n"; root += "" + dbase.fields.at(i)->name + "\n"; @@ -132,17 +132,17 @@ KoFilter::ConversionStatus DBaseImport::convert( const QCString& from, const QCS unsigned row = 1; for( unsigned j=0; j\n"; + root += "\n"; root += ""; root += ""; root += "\n"; root += "" + rec[i] + "\n"; @@ -162,7 +162,7 @@ KoFilter::ConversionStatus DBaseImport::convert( const QCString& from, const QCS // store output document if( out ) { - QCString cstring = root.utf8(); + TQCString cstring = root.utf8(); cstring.prepend( "\n" ); out->writeBlock( (const char*) cstring, cstring.length() ); } @@ -171,7 +171,7 @@ KoFilter::ConversionStatus DBaseImport::convert( const QCString& from, const QCS out = m_chain->storageFile( "documentinfo.xml", KoStore::Write ); if ( out ) { - QCString cstring = documentInfo.utf8(); + TQCString cstring = documentInfo.utf8(); cstring.prepend( "\n" ); out->writeBlock( (const char*) cstring, cstring.length() ); diff --git a/filters/kspread/dbase/dbaseimport.h b/filters/kspread/dbase/dbaseimport.h index b51a7138..8d074f1e 100644 --- a/filters/kspread/dbase/dbaseimport.h +++ b/filters/kspread/dbase/dbaseimport.h @@ -26,13 +26,14 @@ class DBaseImport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - DBaseImport ( QObject *parent, const char* name, const QStringList& ); + DBaseImport ( TQObject *tqparent, const char* name, const TQStringList& ); virtual ~DBaseImport() {} - virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to ); }; #endif // __DBASEIMPORT_H diff --git a/filters/kspread/excel/excelexport.cc b/filters/kspread/excel/excelexport.cc index 74ad7758..2e2c50e7 100644 --- a/filters/kspread/excel/excelexport.cc +++ b/filters/kspread/excel/excelexport.cc @@ -9,11 +9,11 @@ typedef KGenericFactory ExcelExportFactory; //K_EXPORT_COMPONENT_FACTORY(libkspreadexcelexport, ExcelExportFactory("excelexport")) -ExcelExport::ExcelExport(KoFilter *, const char *, const QStringList&) : KoFilter() { +ExcelExport::ExcelExport(KoFilter *, const char *, const TQStringList&) : KoFilter() { } -KoFilter::ConversionStatus ExcelExport::convert(const QCString& from, const QCString& to) { +KoFilter::ConversiontqStatus ExcelExport::convert(const TQCString& from, const TQCString& to) { // Double check that's we really what we want to do if ( ( (to != "application/excel") && (to != "application/msexcel") ) || from != "application/x-kspread") { kdWarning(0) << "Invalid mimetypes " << to << ", " << from << endl; @@ -28,37 +28,37 @@ KoFilter::ConversionStatus ExcelExport::convert(const QCString& from, const QCSt /* -KoFilter::ConversionStatus ExcelWorker::startDocument(KSpreadFilterProperty property) { +KoFilter::ConversiontqStatus ExcelWorker::startDocument(KSpreadFilterProperty property) { return KoFilter::OK; } -KoFilter::ConversionStatus ExcelWorker::startInfoLog(KSpreadFilterProperty property) { +KoFilter::ConversiontqStatus ExcelWorker::startInfoLog(KSpreadFilterProperty property) { return KoFilter::OK; } -KoFilter::ConversionStatus ExcelWorker::startInfoAuthor(KSpreadFilterProperty property) { +KoFilter::ConversiontqStatus ExcelWorker::startInfoAuthor(KSpreadFilterProperty property) { return KoFilter::OK; } -KoFilter::ConversionStatus ExcelWorker::startInfoAbout(KSpreadFilterProperty property) { +KoFilter::ConversiontqStatus ExcelWorker::startInfoAbout(KSpreadFilterProperty property) { return KoFilter::OK; } -KoFilter::ConversionStatus ExcelWorker::startSpreadBook(KSpreadFilterProperty property) { +KoFilter::ConversiontqStatus ExcelWorker::startSpreadBook(KSpreadFilterProperty property) { return KoFilter::OK; } -KoFilter::ConversionStatus ExcelWorker::startSpreadSheet(KSpreadFilterProperty property) { +KoFilter::ConversiontqStatus ExcelWorker::startSpreadSheet(KSpreadFilterProperty property) { return KoFilter::OK; } -KoFilter::ConversionStatus ExcelWorker::startSpreadCell(KSpreadFilterProperty property) { +KoFilter::ConversiontqStatus ExcelWorker::startSpreadCell(KSpreadFilterProperty property) { return KoFilter::OK; } */ diff --git a/filters/kspread/excel/excelexport.h b/filters/kspread/excel/excelexport.h index 28e1b41e..946a1b09 100644 --- a/filters/kspread/excel/excelexport.h +++ b/filters/kspread/excel/excelexport.h @@ -10,25 +10,26 @@ class ExcelExport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - ExcelExport(KoFilter *parent, const char*name, const QStringList&); + ExcelExport(KoFilter *tqparent, const char*name, const TQStringList&); virtual ~ExcelExport() {} - virtual KoFilter::ConversionStatus convert(const QCString& from, const QCString& to); + virtual KoFilter::ConversiontqStatus convert(const TQCString& from, const TQCString& to); }; class ExcelWorker : public KSpreadBaseWorker { public: // Implement those - //KoFilter::ConversionStatus startDocument(KSpreadFilterProperty property); - //KoFilter::ConversionStatus startInfoLog(KSpreadFilterProperty property); - //KoFilter::ConversionStatus startInfoAuthor(KSpreadFilterProperty property); - //KoFilter::ConversionStatus startInfoAbout(KSpreadFilterProperty property); - //KoFilter::ConversionStatus startSpreadBook(KSpreadFilterProperty property); - //KoFilter::ConversionStatus startSpreadSheet(KSpreadFilterProperty property); - //KoFilter::ConversionStatus startSpreadCell(KSpreadFilterProperty property); + //KoFilter::ConversiontqStatus startDocument(KSpreadFilterProperty property); + //KoFilter::ConversiontqStatus startInfoLog(KSpreadFilterProperty property); + //KoFilter::ConversiontqStatus startInfoAuthor(KSpreadFilterProperty property); + //KoFilter::ConversiontqStatus startInfoAbout(KSpreadFilterProperty property); + //KoFilter::ConversiontqStatus startSpreadBook(KSpreadFilterProperty property); + //KoFilter::ConversiontqStatus startSpreadSheet(KSpreadFilterProperty property); + //KoFilter::ConversiontqStatus startSpreadCell(KSpreadFilterProperty property); }; #endif diff --git a/filters/kspread/excel/import/excelimport.cc b/filters/kspread/excel/import/excelimport.cc index 3ff38717..88a20e33 100644 --- a/filters/kspread/excel/import/excelimport.cc +++ b/filters/kspread/excel/import/excelimport.cc @@ -27,13 +27,13 @@ #include #include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -51,11 +51,11 @@ typedef KGenericFactory ExcelImportFactory; K_EXPORT_COMPONENT_FACTORY( libexcelimport, ExcelImportFactory( "kofficefilters" ) ) -// UString -> QConstString conversion. Use .string() to get the QString. -// Always store the QConstString into a variable first, to avoid a deep copy. -inline QConstString string( const Swinder::UString& str ) { - // Let's hope there's no copying of the QConstString happening... - return QConstString( reinterpret_cast( str.data() ), str.length() ); +// UString -> TQConstString conversion. Use .string() to get the TQString. +// Always store the TQConstString into a variable first, to avoid a deep copy. +inline TQConstString string( const Swinder::UString& str ) { + // Let's hope there's no copying of the TQConstString happening... + return TQConstString( reinterpret_cast( str.data() ), str.length() ); } using namespace Swinder; @@ -63,8 +63,8 @@ using namespace Swinder; class ExcelImport::Private { public: - QString inputFile; - QString outputFile; + TQString inputFile; + TQString outputFile; Workbook *workbook; @@ -76,10 +76,10 @@ public: int columnFormatIndex; int rowFormatIndex; - QMap styleFormats; - QMap isPercentageStyle; - QMap isDateStyle; - QMap isTimeStyle; + TQMap styleFormats; + TQMap isPercentageStyle; + TQMap isDateStyle; + TQMap isTimeStyle; void processWorkbookForBody( Workbook* workbook, KoXmlWriter* xmlWriter ); void processWorkbookForStyle( Workbook* workbook, KoXmlWriter* xmlWriter ); @@ -92,11 +92,11 @@ public: void processCellForBody( Cell* cell, KoXmlWriter* xmlWriter ); void processCellForStyle( Cell* cell, KoXmlWriter* xmlWriter ); void processFormat( const Format* format, KoXmlWriter* xmlWriter ); - void processValueFormat( QString valueFormat, QString refName, KoXmlWriter* xmlWriter ); + void processValueFormat( TQString valueFormat, TQString refName, KoXmlWriter* xmlWriter ); }; -ExcelImport::ExcelImport ( QObject*, const char*, const QStringList& ) +ExcelImport::ExcelImport ( TQObject*, const char*, const TQStringList& ) : KoFilter() { d = new Private; @@ -107,7 +107,7 @@ ExcelImport::~ExcelImport() delete d; } -KoFilter::ConversionStatus ExcelImport::convert( const QCString& from, const QCString& to ) +KoFilter::ConversiontqStatus ExcelImport::convert( const TQCString& from, const TQCString& to ) { if ( from != "application/msexcel" ) return KoFilter::NotImplemented; @@ -118,7 +118,7 @@ KoFilter::ConversionStatus ExcelImport::convert( const QCString& from, const QCS d->inputFile = m_chain->inputFile(); d->outputFile = m_chain->outputFile(); - QTime time; + TQTime time; time.start(); // open inputFile @@ -194,8 +194,8 @@ KoFilter::ConversionStatus ExcelImport::convert( const QCString& from, const QCS // we are done! delete d->workbook; delete storeout; - d->inputFile = QString::null; - d->outputFile = QString::null; + d->inputFile = TQString(); + d->outputFile = TQString(); d->workbook = 0; @@ -348,7 +348,7 @@ void ExcelImport::Private::processSheetForBody( Sheet* sheet, KoXmlWriter* xmlWr xmlWriter->addAttribute( "table:name", string( sheet->name() ).string() ); xmlWriter->addAttribute( "table:print", "false" ); xmlWriter->addAttribute( "table:protected", "false" ); - xmlWriter->addAttribute( "table:style-name", QString("ta%1").arg(sheetFormatIndex)); + xmlWriter->addAttribute( "table:style-name", TQString("ta%1").tqarg(sheetFormatIndex)); sheetFormatIndex++; unsigned ci = 0; @@ -397,7 +397,7 @@ void ExcelImport::Private::processSheetForStyle( Sheet* sheet, KoXmlWriter* xmlW xmlWriter->startElement( "style:style" ); xmlWriter->addAttribute( "style:family", "table" ); xmlWriter->addAttribute( "style:master-page-name", "Default" ); - xmlWriter->addAttribute( "style:name", QString("ta%1").arg(sheetFormatIndex) ); + xmlWriter->addAttribute( "style:name", TQString("ta%1").tqarg(sheetFormatIndex) ); sheetFormatIndex++; xmlWriter->startElement( "style:table-properties" ); @@ -450,7 +450,7 @@ void ExcelImport::Private::processColumnForBody( Column* column, int repeat, KoX xmlWriter->addAttribute( "table:default-style-name", "Default" ); xmlWriter->addAttribute( "table:visibility", column->visible() ? "visible" : "collapse" ); if(repeat > 1) xmlWriter->addAttribute( "table:number-columns-repeated", repeat ); - xmlWriter->addAttribute( "table:style-name", QString("co%1").arg(columnFormatIndex) ); + xmlWriter->addAttribute( "table:style-name", TQString("co%1").tqarg(columnFormatIndex) ); columnFormatIndex++; xmlWriter->endElement(); // table:table-column @@ -463,12 +463,12 @@ void ExcelImport::Private::processColumnForStyle( Column* column, int /*repeat*/ xmlWriter->startElement( "style:style" ); xmlWriter->addAttribute( "style:family", "table-column" ); - xmlWriter->addAttribute( "style:name", QString("co%1").arg(columnFormatIndex) ); + xmlWriter->addAttribute( "style:name", TQString("co%1").tqarg(columnFormatIndex) ); columnFormatIndex++; xmlWriter->startElement( "style:table-column-properties" ); xmlWriter->addAttribute( "fo:break-before", "auto" ); - xmlWriter->addAttribute( "style:column-width", QString("%1in").arg(column->width()/27) ); + xmlWriter->addAttribute( "style:column-width", TQString("%1in").tqarg(column->width()/27) ); xmlWriter->endElement(); // style:table-column-properties xmlWriter->endElement(); // style:style @@ -494,7 +494,7 @@ void ExcelImport::Private::processRowForBody( Row* row, int /*repeat*/, KoXmlWri xmlWriter->startElement( "table:table-row" ); xmlWriter->addAttribute( "table:visibility", row->visible() ? "visible" : "collapse" ); - xmlWriter->addAttribute( "table:style-name", QString("ro%1").arg(rowFormatIndex) ); + xmlWriter->addAttribute( "table:style-name", TQString("ro%1").tqarg(rowFormatIndex) ); rowFormatIndex++; for( int i = 0; i <= lastCol; i++ ) @@ -530,12 +530,12 @@ void ExcelImport::Private::processRowForStyle( Row* row, int repeat, KoXmlWriter xmlWriter->startElement( "style:style" ); xmlWriter->addAttribute( "style:family", "table-row" ); if(repeat > 1) xmlWriter->addAttribute( "table:number-rows-repeated", repeat ); - xmlWriter->addAttribute( "style:name", QString("ro%1").arg(rowFormatIndex) ); + xmlWriter->addAttribute( "style:name", TQString("ro%1").tqarg(rowFormatIndex) ); rowFormatIndex++; xmlWriter->startElement( "style:table-row-properties" ); xmlWriter->addAttribute( "fo:break-before", "auto" ); - xmlWriter->addAttribute( "style:row-height", QString("%1pt").arg(row->height()) ); + xmlWriter->addAttribute( "style:row-height", TQString("%1pt").tqarg(row->height()) ); xmlWriter->endElement(); // style:table-row-properties xmlWriter->endElement(); // style:style @@ -548,16 +548,16 @@ void ExcelImport::Private::processRowForStyle( Row* row, int repeat, KoXmlWriter } } -static bool isPercentageFormat( const QString& valueFormat ) +static bool isPercentageFormat( const TQString& valueFormat ) { if( valueFormat.isEmpty() ) return false; if( valueFormat.length() < 1 ) return false; - return valueFormat[valueFormat.length()-1] == QChar('%'); + return valueFormat[valueFormat.length()-1] == TQChar('%'); } -static bool isDateFormat( const QString& valueFormat ) +static bool isDateFormat( const TQString& valueFormat ) { - QString vfu = valueFormat.upper(); + TQString vfu = valueFormat.upper(); if( vfu == "M/D/YY" ) return true; if( vfu == "M/D/YYYY" ) return true; @@ -587,9 +587,9 @@ static bool isDateFormat( const QString& valueFormat ) return false; } -static bool isTimeFormat( const QString& valueFormat ) +static bool isTimeFormat( const TQString& valueFormat ) { - QString vf = valueFormat; + TQString vf = valueFormat; if( vf == "h:mm AM/PM" ) return true; if( vf == "h:mm:ss AM/PM" ) return true; @@ -608,19 +608,19 @@ static bool isTimeFormat( const QString& valueFormat ) return false; } -static QString convertDate( double serialNo ) +static TQString convertDate( double serialNo ) { // reference is midnight 30 Dec 1899 - QDate dd( 1899, 12, 30 ); + TQDate dd( 1899, 12, 30 ); dd = dd.addDays( (int) serialNo ); return dd.toString( "yyyy-MM-dd" ); } -static QString convertTime( double serialNo ) +static TQString convertTime( double serialNo ) { // reference is midnight 30 Dec 1899 - QTime tt; - tt = tt.addMSecs( qRound( (serialNo-(int)serialNo) * 86400 * 1000 ) ); + TQTime tt; + tt = tt.addMSecs( tqRound( (serialNo-(int)serialNo) * 86400 * 1000 ) ); return tt.toString( "PThhHmmMss,zzz0S" ); } @@ -631,14 +631,14 @@ void ExcelImport::Private::processCellForBody( Cell* cell, KoXmlWriter* xmlWrite int formatIndex = cell->formatIndex(); - QString styleName("ce"); - styleName.append( QString::number( formatIndex ) ); + TQString styleName("ce"); + styleName.append( TQString::number( formatIndex ) ); xmlWriter->startElement( "table:table-cell" ); xmlWriter->addAttribute( "table:style-name", styleName ); if( !cell->formula().isEmpty() ) { - QString formula = string( cell->formula() ).string(); + TQString formula = string( cell->formula() ).string(); xmlWriter->addAttribute( "table:formula", formula.prepend("=") ); } @@ -654,7 +654,7 @@ void ExcelImport::Private::processCellForBody( Cell* cell, KoXmlWriter* xmlWrite if( isPercentageStyle[formatIndex] ) { xmlWriter->addAttribute( "office:value-type", "percentage" ); - xmlWriter->addAttribute( "office:value", QString::number( value.asFloat(), 'g', 15 ) ); + xmlWriter->addAttribute( "office:value", TQString::number( value.asFloat(), 'g', 15 ) ); } else if( isDateStyle[formatIndex] ) { @@ -670,12 +670,12 @@ void ExcelImport::Private::processCellForBody( Cell* cell, KoXmlWriter* xmlWrite { // fallback, just write as normal number xmlWriter->addAttribute( "office:value-type", "float" ); - xmlWriter->addAttribute( "office:value", QString::number( value.asFloat(), 'g', 15 ) ); + xmlWriter->addAttribute( "office:value", TQString::number( value.asFloat(), 'g', 15 ) ); } } else if( value.isString() ) { - QString str = string( value.asString() ).string(); + TQString str = string( value.asString() ).string(); xmlWriter->addAttribute( "office:value-type", "string" ); xmlWriter->addAttribute( "office:string-value", str ); xmlWriter->startElement( "text:p" ); @@ -692,24 +692,24 @@ void ExcelImport::Private::processCellForStyle( Cell* cell, KoXmlWriter* xmlWrit if( !xmlWriter ) return; // only IF automatic style for this format has not been already created yet - if( !styleFormats.contains( cell->formatIndex() ) ) + if( !styleFormats.tqcontains( cell->formatIndex() ) ) { styleFormats[ cell->formatIndex() ] = true; const Format& format = cell->sheet()->workbook()->format( cell->formatIndex() ); // handle data format, e.g. number style - QString refName; + TQString refName; const UString& valueFormat = format.valueFormat(); if( !valueFormat.isEmpty() ) { - refName = QString("N%1").arg(cell->formatIndex()); - QString numformat = string( valueFormat ).string(); + refName = TQString("N%1").tqarg(cell->formatIndex()); + TQString numformat = string( valueFormat ).string(); processValueFormat( numformat, refName, xmlWriter ); } // later for writing the value - QString numformat = string( valueFormat ).string(); + TQString numformat = string( valueFormat ).string(); isPercentageStyle[ cell->formatIndex() ] = isPercentageFormat( numformat ); isDateStyle[ cell->formatIndex() ] = isDateFormat( numformat ); isTimeStyle[ cell->formatIndex() ] = isTimeFormat( numformat ); @@ -717,7 +717,7 @@ void ExcelImport::Private::processCellForStyle( Cell* cell, KoXmlWriter* xmlWrit // now the real table-cell xmlWriter->startElement( "style:style" ); xmlWriter->addAttribute( "style:family", "table-cell" ); - xmlWriter->addAttribute( "style:name", QString("ce%1").arg( cell->formatIndex() ) ); + xmlWriter->addAttribute( "style:name", TQString("ce%1").tqarg( cell->formatIndex() ) ); if( !refName.isEmpty() ) xmlWriter->addAttribute( "style:data-style-name", refName ); @@ -727,18 +727,18 @@ void ExcelImport::Private::processCellForStyle( Cell* cell, KoXmlWriter* xmlWrit } } -QString convertColor( const Color& color ) +TQString convertColor( const Color& color ) { char buf[8]; sprintf( buf, "#%02x%02x%02x", color.red, color.green, color.blue ); - return QString( buf ); + return TQString( buf ); } -QString convertBorder( const Pen& pen ) +TQString convertBorder( const Pen& pen ) { if( pen.style == Pen::NoLine || pen.width == 0 ) return "none"; - QString result = QString::number( pen.width ); + TQString result = TQString::number( pen.width ); result += "pt "; switch( pen.style ) @@ -759,7 +759,7 @@ void ExcelImport::Private::processFormat( const Format* format, KoXmlWriter* xml if( !xmlWriter ) return; const FormatFont& font = format->font(); - const FormatAlignment& align = format->alignment(); + const FormatAlignment& align = format->tqalignment(); const FormatBackground& back = format->background(); const FormatBorders& borders = format->borders(); @@ -792,7 +792,7 @@ void ExcelImport::Private::processFormat( const Format* format, KoXmlWriter* xml if( !font.fontFamily().isEmpty() ) xmlWriter->addAttribute( "style:font-name", string(font.fontFamily()).string() ); - xmlWriter->addAttribute( "fo:font-size", QString("%1pt").arg(font.fontSize()) ); + xmlWriter->addAttribute( "fo:font-size", TQString("%1pt").tqarg(font.fontSize()) ); xmlWriter->addAttribute( "fo:color", convertColor( font.color() ) ); @@ -844,12 +844,12 @@ void ExcelImport::Private::processFormat( const Format* format, KoXmlWriter* xml } if( align.indentLevel() != 0 ) - xmlWriter->addAttribute( "fo:margin-left", QString::number( align.indentLevel() ) + "0pt" ); + xmlWriter->addAttribute( "fo:margin-left", TQString::number( align.indentLevel() ) + "0pt" ); } xmlWriter->endElement(); // style:paragraph-properties } -void ExcelImport::Private::processValueFormat( QString valueFormat, QString refName, +void ExcelImport::Private::processValueFormat( TQString valueFormat, TQString refName, KoXmlWriter* xmlWriter ) { /*int decimalPlaces = 2; diff --git a/filters/kspread/excel/import/excelimport.h b/filters/kspread/excel/import/excelimport.h index e3cc3f0e..77e7b747 100644 --- a/filters/kspread/excel/import/excelimport.h +++ b/filters/kspread/excel/import/excelimport.h @@ -23,18 +23,19 @@ #include #include -#include +#include class ExcelImport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - ExcelImport ( QObject *parent, const char* name, const QStringList& ); + ExcelImport ( TQObject *tqparent, const char* name, const TQStringList& ); virtual ~ExcelImport(); - virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to ); private: class Private; diff --git a/filters/kspread/excel/sidewinder/excel.cpp b/filters/kspread/excel/sidewinder/excel.cpp index e7c57972..99ac0eaa 100644 --- a/filters/kspread/excel/sidewinder/excel.cpp +++ b/filters/kspread/excel/sidewinder/excel.cpp @@ -185,7 +185,7 @@ static Value errorAsValue( int errorCode ) class EString::Private { public: - bool unicode; + bool tqunicode; bool richText; UString str; unsigned size; @@ -194,7 +194,7 @@ public: EString::EString() { d = new EString::Private(); - d->unicode = false; + d->tqunicode = false; d->richText = false; d->str = UString::null; d->size = 0; @@ -208,7 +208,7 @@ EString::EString( const EString& es ) EString& EString::operator=( const EString& es ) { - d->unicode = es.d->unicode; + d->tqunicode = es.d->tqunicode; d->richText = es.d->richText; d->size = es.d->size; d->str = es.d->str; @@ -220,14 +220,14 @@ EString::~EString() delete d; } -bool EString::unicode() const +bool EString::tqunicode() const { - return d->unicode; + return d->tqunicode; } void EString::setUnicode( bool u ) { - d->unicode = u; + d->tqunicode = u; } bool EString::richText() const @@ -271,7 +271,7 @@ EString EString::fromUnicodeString( const void* p, bool longString, unsigned /* unsigned char flag = data[ offset ]; offset++; // for flag (1 byte) - bool unicode = flag & 0x01; + bool tqunicode = flag & 0x01; bool richText = flag & 0x08; unsigned formatRuns = 0; @@ -283,10 +283,10 @@ EString EString::fromUnicodeString( const void* p, bool longString, unsigned /* // find out total bytes used in this string unsigned size = offset + len; // string data - if( unicode ) size += len; // because unicode takes 2-bytes char + if( tqunicode ) size += len; // because tqunicode takes 2-bytes char if( richText ) size += (formatRuns*4); - if( !unicode ) + if( !tqunicode ) { char* buffer = new char[ len+1 ]; memcpy( buffer, data + offset, len ); @@ -303,7 +303,7 @@ EString EString::fromUnicodeString( const void* p, bool longString, unsigned /* } EString result; - result.setUnicode( unicode ); + result.setUnicode( tqunicode ); result.setRichText( richText ); result.setSize( size ); result.setStr( str ); @@ -351,14 +351,14 @@ EString EString::fromSheetName( const void* p, unsigned datasize ) unsigned len = data[0]; unsigned flag = data[1]; - bool unicode = flag & 1; + bool tqunicode = flag & 1; if( len > datasize-2 ) len = datasize-2; if( len == 0 ) return EString(); unsigned offset = 2; - if( !unicode ) + if( !tqunicode ) { char* buffer = new char[ len+1 ]; memcpy( buffer, data + offset, len ); @@ -376,7 +376,7 @@ EString EString::fromSheetName( const void* p, unsigned datasize ) } EString result; - result.setUnicode( unicode ); + result.setUnicode( tqunicode ); result.setRichText( richText ); result.setSize( datasize ); result.setStr( str ); @@ -1005,7 +1005,7 @@ static const FunctionEntry FunctionEntries[] = { "ZTEST", 0 }, // 324 { "LARGE", 2 }, // 325 { "SMALL", 2 }, // 326 - { "QUARTILE", 2 }, // 327 + { "TQUARTILE", 2 }, // 327 { "PERCENTILE", 2 }, // 328 { "PERCENTRANK", 0 }, // 329 { "MODALVALUE", 0 }, // 330 @@ -2012,7 +2012,7 @@ void BoundSheetRecord::setData( unsigned size, const unsigned char* data ) d->visibility = data[4]; d->type = data[5]; - /* FIXME: it turned out that sheet name is not normal unicode string + /* FIXME: it turned out that sheet name is not normal tqunicode string where the first two bytes specifies string length, but instead only the first specifies it. the next byte could be correctly interpreted as flag. @@ -4175,7 +4175,7 @@ public: unsigned formatIndex; bool locked; bool formulaHidden; - unsigned parentStyle; + unsigned tqparentStyle; unsigned horizontalAlignment; unsigned verticalAlignment; bool textWrap; @@ -4207,7 +4207,7 @@ XFRecord::XFRecord(): Record() d->formatIndex = 0; d->locked = false; d->formulaHidden = false; - d->parentStyle = 0; + d->tqparentStyle = 0; d->horizontalAlignment = Left; d->verticalAlignment = VCentered; d->textWrap = false; @@ -4249,7 +4249,7 @@ XFRecord& XFRecord::operator=( const XFRecord& xf ) d->formatIndex = xf.formatIndex(); d->locked = xf.locked(); d->formulaHidden = xf.formulaHidden(); - d->parentStyle = xf.parentStyle(); + d->tqparentStyle = xf.tqparentStyle(); d->horizontalAlignment = xf.horizontalAlignment(); d->verticalAlignment = xf.verticalAlignment(); d->textWrap = xf.textWrap(); @@ -4315,14 +4315,14 @@ void XFRecord::setFormulaHidden( bool f ) d->formulaHidden = f; } -unsigned XFRecord::parentStyle() const +unsigned XFRecord::tqparentStyle() const { - return d->parentStyle; + return d->tqparentStyle; } void XFRecord::setParentStyle( unsigned p ) { - d->parentStyle = p; + d->tqparentStyle = p; } unsigned XFRecord::horizontalAlignment() const @@ -4657,13 +4657,13 @@ void XFRecord::setData( unsigned size, const unsigned char* data ) void XFRecord::dump( std::ostream& out ) const { out << "XF" << std::endl; - out << " Parent Style : " << parentStyle() << std::endl; + out << " Parent Style : " << tqparentStyle() << std::endl; out << " Font Index : " << fontIndex() << std::endl; out << " Format Index : " << formatIndex() << std::endl; out << " Locked : " << (locked()?"Yes":"No") << std::endl; out << " Formula Visibility : " << (formulaHidden()?"Hidden":"Visible") << std::endl; - out << " Horizontal Align : " << horizontalAlignmentAsString() << std::endl; - out << " Vertical Align : " << verticalAlignmentAsString() << std::endl; + out << " Qt::Horizontal Align : " << horizontalAlignmentAsString() << std::endl; + out << " Qt::Vertical Align : " << verticalAlignmentAsString() << std::endl; out << " Text Wrap : " << ( textWrap() ? "yes" : "no" ) << std::endl; out << " Rotation : " << rotationAngle() << std::endl; out << " Stacked Letters : " << ( stackedLetters() ? "yes" : "no" ) << std::endl; @@ -5113,31 +5113,31 @@ bool ExcelReader::load( Workbook* workbook, const char* filename ) format.setFont( convertFont( xf.fontIndex() ) ); - FormatAlignment alignment; + FormatAlignment tqalignment; switch( xf.horizontalAlignment() ) { case XFRecord::Left: - alignment.setAlignX( Format::Left ); break; + tqalignment.setAlignX( Format::Left ); break; case XFRecord::Right: - alignment.setAlignX( Format::Right ); break; + tqalignment.setAlignX( Format::Right ); break; case XFRecord::Centered: - alignment.setAlignX( Format::Center ); break; + tqalignment.setAlignX( Format::Center ); break; default: break; // FIXME still unsupported: Repeat, Justified, Filled, Distributed }; switch( xf.verticalAlignment() ) { case XFRecord::Top: - alignment.setAlignY( Format::Top ); break; + tqalignment.setAlignY( Format::Top ); break; case XFRecord::VCentered: - alignment.setAlignY( Format::Middle ); break; + tqalignment.setAlignY( Format::Middle ); break; case XFRecord::Bottom: - alignment.setAlignY( Format::Bottom ); break; + tqalignment.setAlignY( Format::Bottom ); break; default: break; // FIXME still unsupported: Justified, Distributed } - alignment.setWrap( xf.textWrap() ); - format.setAlignment( alignment ); + tqalignment.setWrap( xf.textWrap() ); + format.tqsetAlignment( tqalignment ); FormatBorders borders; @@ -5520,11 +5520,11 @@ void ExcelReader::handleFooter( FooterRecord* record ) int pos = -1, len = 0; // left part - pos = footer.find( UString("&L") ); + pos = footer.tqfind( UString("&L") ); if( pos >= 0 ) { pos += 2; - len = footer.find( UString("&C") ) - pos; + len = footer.tqfind( UString("&C") ) - pos; if( len > 0 ) { left = footer.substr( pos, len ); @@ -5533,11 +5533,11 @@ void ExcelReader::handleFooter( FooterRecord* record ) } // center part - pos = footer.find( UString("&C") ); + pos = footer.tqfind( UString("&C") ); if( pos >= 0 ) { pos += 2; - len = footer.find( UString("&R") ) - pos; + len = footer.tqfind( UString("&R") ) - pos; if( len > 0 ) { center = footer.substr( pos, len ); @@ -5546,7 +5546,7 @@ void ExcelReader::handleFooter( FooterRecord* record ) } // right part - pos = footer.find( UString("&R") ); + pos = footer.tqfind( UString("&R") ); if( pos >= 0 ) { pos += 2; @@ -5569,11 +5569,11 @@ void ExcelReader::handleHeader( HeaderRecord* record ) int pos = -1, len = 0; // left part of the header - pos = header.find( UString("&L") ); + pos = header.tqfind( UString("&L") ); if( pos >= 0 ) { pos += 2; - len = header.find( UString("&C") ) - pos; + len = header.tqfind( UString("&C") ) - pos; if( len > 0 ) { left = header.substr( pos, len ); @@ -5582,11 +5582,11 @@ void ExcelReader::handleHeader( HeaderRecord* record ) } // center part of the header - pos = header.find( UString("&C") ); + pos = header.tqfind( UString("&C") ); if( pos >= 0 ) { pos += 2; - len = header.find( UString("&R") ) - pos; + len = header.tqfind( UString("&R") ) - pos; if( len > 0 ) { center = header.substr( pos, len ); @@ -5595,7 +5595,7 @@ void ExcelReader::handleHeader( HeaderRecord* record ) } // right part of the header - pos = header.find( UString("&R") ); + pos = header.tqfind( UString("&R") ); if( pos >= 0 ) { pos += 2; @@ -5929,31 +5929,31 @@ Format ExcelReader::convertFormat( unsigned xfIndex ) format.setFont( convertFont( xf.fontIndex() ) ); - FormatAlignment alignment; + FormatAlignment tqalignment; switch( xf.horizontalAlignment() ) { case XFRecord::Left: - alignment.setAlignX( Format::Left ); break; + tqalignment.setAlignX( Format::Left ); break; case XFRecord::Right: - alignment.setAlignX( Format::Right ); break; + tqalignment.setAlignX( Format::Right ); break; case XFRecord::Centered: - alignment.setAlignX( Format::Center ); break; + tqalignment.setAlignX( Format::Center ); break; default: break; // FIXME still unsupported: Repeat, Justified, Filled, Distributed }; switch( xf.verticalAlignment() ) { case XFRecord::Top: - alignment.setAlignY( Format::Top ); break; + tqalignment.setAlignY( Format::Top ); break; case XFRecord::VCentered: - alignment.setAlignY( Format::Middle ); break; + tqalignment.setAlignY( Format::Middle ); break; case XFRecord::Bottom: - alignment.setAlignY( Format::Bottom ); break; + tqalignment.setAlignY( Format::Bottom ); break; default: break; // FIXME still unsupported: Justified, Distributed } - alignment.setWrap( xf.textWrap() ); - format.setAlignment( alignment ); + tqalignment.setWrap( xf.textWrap() ); + format.tqsetAlignment( tqalignment ); FormatBorders borders; diff --git a/filters/kspread/excel/sidewinder/excel.h b/filters/kspread/excel/sidewinder/excel.h index 5221b518..51c9efcd 100644 --- a/filters/kspread/excel/sidewinder/excel.h +++ b/filters/kspread/excel/sidewinder/excel.h @@ -36,7 +36,7 @@ enum { UnknownExcel = 0, Excel95, Excel97, Excel2000 }; class Record; -// rich-text, unicode, far-east support Excel string +// rich-text, tqunicode, far-east support Excel string class EString { @@ -50,7 +50,7 @@ public: ~EString(); - bool unicode() const; + bool tqunicode() const; void setUnicode( bool u ); @@ -1838,7 +1838,7 @@ private: /** - Class MergedCellsRecord represents MergedCells record, which contains + Class MergedCellsRecord represents MergedCells record, which tqcontains a list of all merged cells in the current sheets. Each entry in this list define the range of cells that should be merged, namely firstRow, lastRow, firstColumn and lastColumn. @@ -2777,20 +2777,20 @@ public: void setFormulaHidden( bool f ); /** - * Returns the index of the parent stlye of this format. + * Returns the index of the tqparent stlye of this format. * This refers to the index of the XFormat table which is constructed * from a series of XFormat records. * * \sa setParentStyle */ - unsigned parentStyle() const; + unsigned tqparentStyle() const; /** - * Sets the index of the parent stlye of this format. + * Sets the index of the tqparent stlye of this format. * This refers to the index of the XFormat table which is constructed * from a series of XFormat records. * - * \sa parentStyle + * \sa tqparentStyle */ void setParentStyle( unsigned ps ); @@ -2805,17 +2805,17 @@ public: Distributed }; /** - * Gets the horizontal alignment, e.g Left. + * Gets the horizontal tqalignment, e.g Left. */ unsigned horizontalAlignment() const; /** - * Sets the horizontal alignment, e.g Left. + * Sets the horizontal tqalignment, e.g Left. */ void setHorizontalAlignment( unsigned ha ); /** - * Returns human-readable string representation of the horizontal alignment. + * Returns human-readable string representation of the horizontal tqalignment. For example, XFRecord::Left will return "Left". */ const char* horizontalAlignmentAsString() const; @@ -2828,21 +2828,21 @@ public: VDistributed = 4 }; /** - * Gets the vertical alignment, e.g Bottom. + * Gets the vertical tqalignment, e.g Bottom. * * \sa setVerticalAlignment */ unsigned verticalAlignment() const; /** - * Sets the vertical alignment, e.g Top. + * Sets the vertical tqalignment, e.g Top. * * \sa verticalAlignment */ void setVerticalAlignment( unsigned va ); /** - * Returns human-readable string representation of the vertical alignment. + * Returns human-readable string representation of the vertical tqalignment. For example, XFRecord::Top will return "Top". */ const char* verticalAlignmentAsString() const; diff --git a/filters/kspread/excel/sidewinder/format.cpp b/filters/kspread/excel/sidewinder/format.cpp index 8ce69f24..29481fd0 100644 --- a/filters/kspread/excel/sidewinder/format.cpp +++ b/filters/kspread/excel/sidewinder/format.cpp @@ -271,7 +271,7 @@ FormatAlignment& FormatAlignment::operator=( const FormatAlignment& align ) return assign( align ); } -// assign from another alignment +// assign from another tqalignment FormatAlignment& FormatAlignment::assign( const FormatAlignment& align ) { d->null = align.isNull(); @@ -398,7 +398,7 @@ FormatBackground& FormatBackground::operator=( const FormatBackground& backgroun return assign( background ); } -// assign from another alignment +// assign from another tqalignment FormatBackground& FormatBackground::assign( const FormatBackground& background ) { d->null = background.isNull(); @@ -498,7 +498,7 @@ FormatBorders& FormatBorders::operator=( const FormatBorders& border ) return assign( border ); } -// assign from another alignment +// assign from another tqalignment FormatBorders& FormatBorders::assign( const FormatBorders& border ) { d->null = border.isNull(); @@ -581,7 +581,7 @@ class Format::Private { public: FormatFont font; - FormatAlignment alignment; + FormatAlignment tqalignment; FormatBorders borders; FormatBackground background; UString valueFormat; @@ -617,7 +617,7 @@ Format& Format::operator=( const Format& f ) Format& Format::assign( const Format& f ) { d->font = f.font(); - d->alignment = f.alignment(); + d->tqalignment = f.tqalignment(); d->borders = f.borders(); d->valueFormat = f.valueFormat(); d->background = f.background(); @@ -626,7 +626,7 @@ Format& Format::assign( const Format& f ) bool Format::isNull() const { - return d->font.isNull() && d->alignment.isNull() && d->borders.isNull(); + return d->font.isNull() && d->tqalignment.isNull() && d->borders.isNull(); } FormatFont& Format::font() const @@ -639,14 +639,14 @@ void Format::setFont( const FormatFont& font ) d->font = font; } -FormatAlignment& Format::alignment() const +FormatAlignment& Format::tqalignment() const { - return d->alignment; + return d->tqalignment; } -void Format::setAlignment( const FormatAlignment& alignment ) +void Format::tqsetAlignment( const FormatAlignment& tqalignment ) { - d->alignment = alignment; + d->tqalignment = tqalignment; } FormatBorders& Format::borders() const @@ -682,8 +682,8 @@ void Format::setValueFormat( const UString& valueFormat ) // merge f into current format Format& Format::apply( const Format& f ) { - if( !f.alignment().isNull() ) - alignment() = f.alignment(); + if( !f.tqalignment().isNull() ) + tqalignment() = f.tqalignment(); if( !f.font().isNull() ) font() = f.font(); if( !f.borders().isNull() ) @@ -700,7 +700,7 @@ bool Format::operator==(const Format& format) const { return d->font == format.d->font && - d->alignment == format.d->alignment && + d->tqalignment == format.d->tqalignment && d->borders == format.d->borders && d->background == format.d->background && d->valueFormat == format.d->valueFormat; @@ -710,7 +710,7 @@ bool Format::operator!=(const Format& format) const { return d->font != format.d->font || - d->alignment != format.d->alignment || + d->tqalignment != format.d->tqalignment || d->borders != format.d->borders || d->background != format.d->background || d->valueFormat != format.d->valueFormat; diff --git a/filters/kspread/excel/sidewinder/format.h b/filters/kspread/excel/sidewinder/format.h index 55fab762..dcadc1c2 100644 --- a/filters/kspread/excel/sidewinder/format.h +++ b/filters/kspread/excel/sidewinder/format.h @@ -266,9 +266,9 @@ private: /** - * Defines alignment information for cell format. + * Defines tqalignment information for cell format. * - * Class FormatAlignment defines the horizontal and vertical alignment + * Class FormatAlignment defines the horizontal and vertical tqalignment * for the text inside a cell. * */ @@ -278,37 +278,37 @@ class FormatAlignment public: /** - * Creates a default alignment information. + * Creates a default tqalignment information. */ FormatAlignment(); /** - * Destroys the alignment information + * Destroys the tqalignment information */ ~FormatAlignment(); /** - * Creates a copy of alignment information. + * Creates a copy of tqalignment information. */ FormatAlignment( const FormatAlignment& ); /** - * Assigns from another alignment information. + * Assigns from another tqalignment information. */ FormatAlignment& operator=( const FormatAlignment& ); /** - * Assigns from another alignment information. + * Assigns from another tqalignment information. */ FormatAlignment& assign( const FormatAlignment& ); /** - * Returns true if it is a default alignment information. + * Returns true if it is a default tqalignment information. */ bool isNull() const; /** - * Returns horizontal alignment. Possible values are + * Returns horizontal tqalignment. Possible values are * Format::Left, Format::Right and Format::Center. * * \sa setAlignX @@ -316,14 +316,14 @@ public: unsigned alignX() const; /** - * Sets the horizontal alignment. + * Sets the horizontal tqalignment. * * \sa alignX */ void setAlignX( unsigned xa ); /** - * Returns horizontal alignment. Possible values are + * Returns horizontal tqalignment. Possible values are * Format::Top, Format::Middle and Format::Bottom. * * \sa setAlignY @@ -331,7 +331,7 @@ public: unsigned alignY() const; /** - * Sets the horizontal alignment. + * Sets the horizontal tqalignment. * * \sa alignY */ @@ -380,12 +380,12 @@ public: void setRotationAngle( unsigned r ); /** - * Returns true if this alignment is equal to f; otherwise returns false. + * Returns true if this tqalignment is equal to f; otherwise returns false. */ bool operator==(const FormatAlignment& f) const; /** - * Returns true if this alignment is not equal to f; otherwise returns false. + * Returns true if this tqalignment is not equal to f; otherwise returns false. */ bool operator!=(const FormatAlignment& f) const; @@ -441,8 +441,8 @@ public: Dense6Pattern, Dense7Pattern, HorPattern, // Horizonatal lines - VerPattern, // Vertical lines - CrossPattern, // Horizontal and Vertical lines + VerPattern, //Qt::Vertical lines + CrossPattern, //Qt::Horizontal andQt::Vertical lines BDiagPattern, // Left-bottom to right-top diagonal lines FDiagPattern, // Left-top to right-bottom diagonal lines DiagCrossPattern, // Crossing diagonal lines @@ -683,14 +683,14 @@ public: void setFont( const FormatFont& font ); /** - * Returns a constant reference to the alignment information of this format. + * Returns a constant reference to the tqalignment information of this format. */ - FormatAlignment& alignment() const; + FormatAlignment& tqalignment() const; /** - * Sets new alignment information for this format. + * Sets new tqalignment information for this format. */ - void setAlignment( const FormatAlignment& alignment ); + void tqsetAlignment( const FormatAlignment& tqalignment ); /** * Returns a reference to the borders information of this format. diff --git a/filters/kspread/excel/sidewinder/pole.cpp b/filters/kspread/excel/sidewinder/pole.cpp index e4090cd9..fac4aa62 100644 --- a/filters/kspread/excel/sidewinder/pole.cpp +++ b/filters/kspread/excel/sidewinder/pole.cpp @@ -95,7 +95,7 @@ class DirEntry { public: bool valid; // false if invalid (should be skipped) - std::string name; // the name, not in unicode anymore + std::string name; // the name, not in tqunicode anymore bool dir; // true if directory unsigned long size; // size (not valid if directory) unsigned long start; // starting block @@ -114,9 +114,9 @@ class DirTree DirEntry* entry( unsigned index ); DirEntry* entry( const std::string& name, bool create=false ); int indexOf( DirEntry* e ); - int parent( unsigned index ); + int tqparent( unsigned index ); std::string fullName( unsigned index ); - std::vector children( unsigned index ); + std::vector tqchildren( unsigned index ); void load( unsigned char* buffer, unsigned len ); void save( unsigned char* buffer ); unsigned size(); @@ -507,13 +507,13 @@ int DirTree::indexOf( DirEntry* e ) return -1; } -int DirTree::parent( unsigned index ) +int DirTree::tqparent( unsigned index ) { - // brute-force, basically we iterate for each entries, find its children - // and check if one of the children is 'index' + // brute-force, basically we iterate for each entries, find its tqchildren + // and check if one of the tqchildren is 'index' for( unsigned j=0; j chi = children( j ); + std::vector chi = tqchildren( j ); for( unsigned i=0; iname; result.insert( 0, "/" ); - int p = parent( index ); + int p = tqparent( index ); DirEntry * _entry = 0; while( p > 0 ) { @@ -577,8 +577,8 @@ DirEntry* DirTree::entry( const std::string& name, bool create ) for( it = names.begin(); it != names.end(); ++it ) { - // find among the children of index - std::vector chi = children( index ); + // find among the tqchildren of index + std::vector chi = tqchildren( index ); unsigned child = 0; for( unsigned i = 0; i < chi.size(); i++ ) { @@ -593,11 +593,11 @@ DirEntry* DirTree::entry( const std::string& name, bool create ) if( child > 0 ) index = child; else { - // not found among children + // not found among tqchildren if( !create ) return (DirEntry*)0; // create a new entry - unsigned parent = index; + unsigned tqparent = index; entries.push_back( DirEntry() ); index = entryCount()-1; DirEntry* e = entry( index ); @@ -608,8 +608,8 @@ DirEntry* DirTree::entry( const std::string& name, bool create ) e->start = 0; e->child = End; e->prev = End; - e->next = entry(parent)->child; - entry(parent)->child = index; + e->next = entry(tqparent)->child; + entry(tqparent)->child = index; } } @@ -650,7 +650,7 @@ void dirtree_find_siblings( DirTree* dirtree, std::vector& result, } } -std::vector DirTree::children( unsigned index ) +std::vector DirTree::tqchildren( unsigned index ) { std::vector result; @@ -1138,7 +1138,7 @@ StreamIO::StreamIO( StorageIO* s, DirEntry* e) updateCache(); } -// FIXME tell parent we're gone +// FIXME tell tqparent we're gone StreamIO::~StreamIO() { delete[] cache_data; @@ -1285,10 +1285,10 @@ std::list Storage::entries( const std::string& path ) DirEntry* e = dt->entry( path, false ); if( e && e->dir ) { - unsigned parent = dt->indexOf( e ); - std::vector children = dt->children( parent ); - for( unsigned i = 0; i < children.size(); i++ ) - result.push_back( dt->entry( children[i] )->name ); + unsigned tqparent = dt->indexOf( e ); + std::vector tqchildren = dt->tqchildren( tqparent ); + for( unsigned i = 0; i < tqchildren.size(); i++ ) + result.push_back( dt->entry( tqchildren[i] )->name ); } return result; @@ -1307,7 +1307,7 @@ Stream::Stream( Storage* storage, const std::string& name ) io = storage->io->streamIO( name ); } -// FIXME tell parent we're gone +// FIXME tell tqparent we're gone Stream::~Stream() { delete io; diff --git a/filters/kspread/excel/sidewinder/ustring.cpp b/filters/kspread/excel/sidewinder/ustring.cpp index 304fed18..497bc586 100644 --- a/filters/kspread/excel/sidewinder/ustring.cpp +++ b/filters/kspread/excel/sidewinder/ustring.cpp @@ -39,7 +39,7 @@ UString UString::null; static char *statBuffer = 0L; UChar::UChar(const UCharReference &c) - : uc( c.unicode() ) + : uc( c.tqunicode() ) { } @@ -492,7 +492,7 @@ UString UString::substr(int pos, int len) const return result; } -int UString::find(const UString &f, int pos) const +int UString::tqfind(const UString &f, int pos) const { if (isNull()) return -1; @@ -579,7 +579,7 @@ bool Swinder::operator<(const UString& s1, const UString& s2) l++; } if (l < lmin) - return (c1->unicode() < c2->unicode()); + return (c1->tqunicode() < c2->tqunicode()); return (l1 < l2); } diff --git a/filters/kspread/excel/sidewinder/ustring.h b/filters/kspread/excel/sidewinder/ustring.h index 04600003..0643400d 100644 --- a/filters/kspread/excel/sidewinder/ustring.h +++ b/filters/kspread/excel/sidewinder/ustring.h @@ -32,8 +32,8 @@ namespace Swinder { * @short Unicode character. * * UChar represents a 16 bit Unicode character. It's internal data - * representation is compatible to XChar2b and QChar. It's therefore - * possible to exchange data with X and Qt with shallow copies. + * representation is compatible to XChar2b and TQChar. It's therefore + * possible to exchange data with X and TQt with shallow copies. */ struct UChar { /** @@ -68,7 +68,7 @@ namespace Swinder { /** * @return the 16 bit Unicode value of the character */ - unsigned short unicode() const { return uc; } + unsigned short tqunicode() const { return uc; } public: /** * A static instance of UChar(0). @@ -120,7 +120,7 @@ namespace Swinder { /** * @return Unicode value. */ - unsigned short unicode() const { return ref().uc; } + unsigned short tqunicode() const { return ref().uc; } /** * @return Lower byte. */ @@ -333,7 +333,7 @@ namespace Swinder { * @return Position of first occurence of f starting at position pos. * -1 if the search was not successful. */ - int find(const UString &f, int pos = 0) const; + int tqfind(const UString &f, int pos = 0) const; /** * Static instance of a null string. diff --git a/filters/kspread/gnumeric/gnumeric.xsd b/filters/kspread/gnumeric/gnumeric.xsd index 3ff04ff1..d9ab545b 100644 --- a/filters/kspread/gnumeric/gnumeric.xsd +++ b/filters/kspread/gnumeric/gnumeric.xsd @@ -427,8 +427,8 @@ - - + + @@ -492,7 +492,7 @@ - + @@ -801,7 +801,7 @@ - diff --git a/filters/kspread/gnumeric/gnumericexport.cc b/filters/kspread/gnumeric/gnumericexport.cc index 443353f4..beb78879 100644 --- a/filters/kspread/gnumeric/gnumericexport.cc +++ b/filters/kspread/gnumeric/gnumericexport.cc @@ -27,11 +27,11 @@ #include #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -46,7 +46,7 @@ using namespace KSpread; typedef KGenericFactory GNUMERICExportFactory; K_EXPORT_COMPONENT_FACTORY( libgnumericexport, GNUMERICExportFactory( "kofficefilters" ) ) -GNUMERICExport::GNUMERICExport(KoFilter *, const char *, const QStringList&) : +GNUMERICExport::GNUMERICExport(KoFilter *, const char *, const TQStringList&) : KoFilter() { isLink = false; @@ -60,39 +60,39 @@ KoFilter() bool GNUMERICExport::hasBorder(Cell *cell, int currentcolumn, int currentrow) { if ( ( (cell->format()->leftBorderWidth(currentcolumn, currentrow) != 0) && - (cell->format()->leftBorderStyle(currentcolumn, currentrow) != Qt::NoPen ) ) || + (cell->format()->leftBorderStyle(currentcolumn, currentrow) != TQt::NoPen ) ) || ( (cell->format()->rightBorderWidth(currentcolumn, currentrow) != 0) && - (cell->format()->rightBorderStyle(currentcolumn, currentrow) != Qt::NoPen ) ) || + (cell->format()->rightBorderStyle(currentcolumn, currentrow) != TQt::NoPen ) ) || ( (cell->format()->topBorderWidth(currentcolumn, currentrow) != 0) && - (cell->format()->topBorderStyle(currentcolumn, currentrow) != Qt::NoPen ) ) || + (cell->format()->topBorderStyle(currentcolumn, currentrow) != TQt::NoPen ) ) || ( (cell->format()->bottomBorderWidth(currentcolumn, currentrow) != 0) && - (cell->format()->bottomBorderStyle(currentcolumn, currentrow) != Qt::NoPen ) ) || + (cell->format()->bottomBorderStyle(currentcolumn, currentrow) != TQt::NoPen ) ) || ( (cell->format()->fallDiagonalWidth(currentcolumn, currentrow) != 0) && - (cell->format()->fallDiagonalStyle(currentcolumn, currentrow) != Qt::NoPen ) ) || + (cell->format()->fallDiagonalStyle(currentcolumn, currentrow) != TQt::NoPen ) ) || ( (cell->format()->goUpDiagonalWidth(currentcolumn, currentrow) != 0) && - (cell->format()->goUpDiagonalStyle(currentcolumn, currentrow) != Qt::NoPen ) ) ) + (cell->format()->goUpDiagonalStyle(currentcolumn, currentrow) != TQt::NoPen ) ) ) return true; else return false; } -const QString GNUMERICExport::ColorToString(int red, int green, int blue) +const TQString GNUMERICExport::ColorToString(int red, int green, int blue) { - return QString::number(red,16)+":"+QString::number(green,16)+":"+QString::number(blue,16); + return TQString::number(red,16)+":"+TQString::number(green,16)+":"+TQString::number(blue,16); } -QDomElement GNUMERICExport::GetBorderStyle(QDomDocument gnumeric_doc,Cell * cell, int currentcolumn, int currentrow) +TQDomElement GNUMERICExport::GetBorderStyle(TQDomDocument gnumeric_doc,Cell * cell, int currentcolumn, int currentrow) { - QDomElement border_style; - QDomElement border; + TQDomElement border_style; + TQDomElement border; int red, green, blue; - QColor color; + TQColor color; border_style = gnumeric_doc.createElement("gmr:StyleBorder"); if ( (cell->format()->leftBorderWidth(currentcolumn, currentrow) != 0) && - (cell->format()->leftBorderStyle(currentcolumn, currentrow) != Qt::NoPen ) ) + (cell->format()->leftBorderStyle(currentcolumn, currentrow) != TQt::NoPen ) ) { border = gnumeric_doc.createElement("gmr:Left"); border.setAttribute("Style","1"); @@ -102,7 +102,7 @@ QDomElement GNUMERICExport::GetBorderStyle(QDomDocument gnumeric_doc,Cell * cell green = color.green()<<8; blue = color.blue()<<8; - border.setAttribute("Color", QString::number(red,16)+":"+QString::number(green,16) +":"+QString::number(blue,16)); + border.setAttribute("Color", TQString::number(red,16)+":"+TQString::number(green,16) +":"+TQString::number(blue,16)); } else { @@ -113,7 +113,7 @@ QDomElement GNUMERICExport::GetBorderStyle(QDomDocument gnumeric_doc,Cell * cell border_style.appendChild(border); if ( (cell->format()->rightBorderWidth(currentcolumn, currentrow) != 0) && - (cell->format()->rightBorderStyle(currentcolumn, currentrow) != Qt::NoPen ) ) + (cell->format()->rightBorderStyle(currentcolumn, currentrow) != TQt::NoPen ) ) { border = gnumeric_doc.createElement("gmr:Right"); border.setAttribute("Style","1"); @@ -123,7 +123,7 @@ QDomElement GNUMERICExport::GetBorderStyle(QDomDocument gnumeric_doc,Cell * cell green = color.green()<<8; blue = color.blue()<<8; - border.setAttribute("Color", QString::number(red,16)+":"+QString::number(green,16) +":"+QString::number(blue,16)); + border.setAttribute("Color", TQString::number(red,16)+":"+TQString::number(green,16) +":"+TQString::number(blue,16)); } else { @@ -134,7 +134,7 @@ QDomElement GNUMERICExport::GetBorderStyle(QDomDocument gnumeric_doc,Cell * cell border_style.appendChild(border); if ( (cell->format()->topBorderWidth(currentcolumn, currentrow) != 0) && - (cell->format()->topBorderStyle(currentcolumn, currentrow) != Qt::NoPen ) ) + (cell->format()->topBorderStyle(currentcolumn, currentrow) != TQt::NoPen ) ) { border = gnumeric_doc.createElement("gmr:Top"); border.setAttribute("Style","1"); @@ -144,7 +144,7 @@ QDomElement GNUMERICExport::GetBorderStyle(QDomDocument gnumeric_doc,Cell * cell green = color.green()<<8; blue = color.blue()<<8; - border.setAttribute("Color", QString::number(red,16)+":"+QString::number(green,16) +":"+QString::number(blue,16)); + border.setAttribute("Color", TQString::number(red,16)+":"+TQString::number(green,16) +":"+TQString::number(blue,16)); } else { @@ -155,7 +155,7 @@ QDomElement GNUMERICExport::GetBorderStyle(QDomDocument gnumeric_doc,Cell * cell border_style.appendChild(border); if ( (cell->format()->bottomBorderWidth(currentcolumn, currentrow) != 0) && - (cell->format()->bottomBorderStyle(currentcolumn, currentrow) != Qt::NoPen ) ) + (cell->format()->bottomBorderStyle(currentcolumn, currentrow) != TQt::NoPen ) ) { border = gnumeric_doc.createElement("gmr:Bottom"); border.setAttribute("Style","1"); @@ -165,7 +165,7 @@ QDomElement GNUMERICExport::GetBorderStyle(QDomDocument gnumeric_doc,Cell * cell green = color.green()<<8; blue = color.blue()<<8; - border.setAttribute("Color", QString::number(red,16)+":"+QString::number(green,16) +":"+QString::number(blue,16)); + border.setAttribute("Color", TQString::number(red,16)+":"+TQString::number(green,16) +":"+TQString::number(blue,16)); } else { @@ -176,7 +176,7 @@ QDomElement GNUMERICExport::GetBorderStyle(QDomDocument gnumeric_doc,Cell * cell border_style.appendChild(border); if ( (cell->format()->fallDiagonalWidth(currentcolumn, currentrow) != 0) && - (cell->format()->fallDiagonalStyle(currentcolumn, currentrow) != Qt::NoPen ) ) + (cell->format()->fallDiagonalStyle(currentcolumn, currentrow) != TQt::NoPen ) ) { border = gnumeric_doc.createElement("gmr:Diagonal"); border.setAttribute("Style","1"); @@ -186,7 +186,7 @@ QDomElement GNUMERICExport::GetBorderStyle(QDomDocument gnumeric_doc,Cell * cell green = color.green()<<8; blue = color.blue()<<8; - border.setAttribute("Color", QString::number(red,16)+":"+QString::number(green,16) +":"+QString::number(blue,16)); + border.setAttribute("Color", TQString::number(red,16)+":"+TQString::number(green,16) +":"+TQString::number(blue,16)); } else { @@ -197,7 +197,7 @@ QDomElement GNUMERICExport::GetBorderStyle(QDomDocument gnumeric_doc,Cell * cell border_style.appendChild(border); if ( (cell->format()->goUpDiagonalWidth(currentcolumn, currentrow) != 0) && - (cell->format()->goUpDiagonalStyle(currentcolumn, currentrow) != Qt::NoPen ) ) + (cell->format()->goUpDiagonalStyle(currentcolumn, currentrow) != TQt::NoPen ) ) { border = gnumeric_doc.createElement("gmr:Rev-Diagonal"); border.setAttribute("Style","1"); @@ -207,7 +207,7 @@ QDomElement GNUMERICExport::GetBorderStyle(QDomDocument gnumeric_doc,Cell * cell green = color.green()<<8; blue = color.blue()<<8; - border.setAttribute("Color", QString::number(red,16)+":"+QString::number(green,16) +":"+QString::number(blue,16)); + border.setAttribute("Color", TQString::number(red,16)+":"+TQString::number(green,16) +":"+TQString::number(blue,16)); } else { @@ -220,13 +220,13 @@ QDomElement GNUMERICExport::GetBorderStyle(QDomDocument gnumeric_doc,Cell * cell return border_style; } -QDomElement GNUMERICExport::GetValidity( QDomDocument gnumeric_doc, Cell * cell ) +TQDomElement GNUMERICExport::GetValidity( TQDomDocument gnumeric_doc, Cell * cell ) { // // 45 // Validity *kspread_validity = cell->getValidity(); - QDomElement val = gnumeric_doc.createElement( "gmr:Validation" ); + TQDomElement val = gnumeric_doc.createElement( "gmr:Validation" ); val.setAttribute( "Title", kspread_validity->title ); val.setAttribute( "Message", kspread_validity->message ); val.setAttribute( "AllowBlank", kspread_validity->allowEmptyCell ? "true":"false" ); @@ -300,19 +300,19 @@ QDomElement GNUMERICExport::GetValidity( QDomDocument gnumeric_doc, Cell * cell case Conditional::InferiorEqual: case Conditional::Different: { - QDomElement tmp = gnumeric_doc.createElement( "gmr:Expression0" ); - tmp.appendChild( gnumeric_doc.createTextNode( QString::number( kspread_validity->valMin ) ) ); + TQDomElement tmp = gnumeric_doc.createElement( "gmr:Expression0" ); + tmp.appendChild( gnumeric_doc.createTextNode( TQString::number( kspread_validity->valMin ) ) ); val.appendChild( tmp ); } break; case Conditional::Between: case Conditional::DifferentTo: { - QDomElement tmp = gnumeric_doc.createElement( "gmr:Expression0" ); - tmp.appendChild( gnumeric_doc.createTextNode( QString::number(kspread_validity->valMin ) ) ); + TQDomElement tmp = gnumeric_doc.createElement( "gmr:Expression0" ); + tmp.appendChild( gnumeric_doc.createTextNode( TQString::number(kspread_validity->valMin ) ) ); val.appendChild( tmp ); tmp = gnumeric_doc.createElement( "gmr:Expression1" ); - tmp.appendChild( gnumeric_doc.createTextNode( QString::number(kspread_validity->valMax ) ) ); + tmp.appendChild( gnumeric_doc.createTextNode( TQString::number(kspread_validity->valMax ) ) ); val.appendChild( tmp ); } break; @@ -338,7 +338,7 @@ QDomElement GNUMERICExport::GetValidity( QDomDocument gnumeric_doc, Cell * cell case Conditional::InferiorEqual: case Conditional::Different: { - QDomElement tmp = gnumeric_doc.createElement( "gmr:Expression0" ); + TQDomElement tmp = gnumeric_doc.createElement( "gmr:Expression0" ); tmp.appendChild( gnumeric_doc.createTextNode( kspread_validity->timeMin.toString() ) ); val.appendChild( tmp ); } @@ -346,7 +346,7 @@ QDomElement GNUMERICExport::GetValidity( QDomDocument gnumeric_doc, Cell * cell case Conditional::Between: case Conditional::DifferentTo: { - QDomElement tmp = gnumeric_doc.createElement( "gmr:Expression0" ); + TQDomElement tmp = gnumeric_doc.createElement( "gmr:Expression0" ); tmp.appendChild( gnumeric_doc.createTextNode( kspread_validity->timeMin.toString() ) ); val.appendChild( tmp ); tmp = gnumeric_doc.createElement( "gmr:Expression1" ); @@ -371,7 +371,7 @@ QDomElement GNUMERICExport::GetValidity( QDomDocument gnumeric_doc, Cell * cell case Conditional::InferiorEqual: case Conditional::Different: { - QDomElement tmp = gnumeric_doc.createElement( "gmr:Expression0" ); + TQDomElement tmp = gnumeric_doc.createElement( "gmr:Expression0" ); tmp.appendChild( gnumeric_doc.createTextNode( kspread_validity->dateMin.toString() ) ); val.appendChild( tmp ); } @@ -379,7 +379,7 @@ QDomElement GNUMERICExport::GetValidity( QDomDocument gnumeric_doc, Cell * cell case Conditional::Between: case Conditional::DifferentTo: { - QDomElement tmp = gnumeric_doc.createElement( "gmr:Expression0" ); + TQDomElement tmp = gnumeric_doc.createElement( "gmr:Expression0" ); tmp.appendChild( gnumeric_doc.createTextNode( kspread_validity->dateMin.toString() ) ); val.appendChild( tmp ); tmp = gnumeric_doc.createElement( "gmr:Expression1" ); @@ -404,19 +404,19 @@ QDomElement GNUMERICExport::GetValidity( QDomDocument gnumeric_doc, Cell * cell case Conditional::InferiorEqual: case Conditional::Different: { - QDomElement tmp = gnumeric_doc.createElement( "gmr:Expression0" ); - tmp.appendChild( gnumeric_doc.createTextNode( QString::number(kspread_validity->valMin ) ) ); + TQDomElement tmp = gnumeric_doc.createElement( "gmr:Expression0" ); + tmp.appendChild( gnumeric_doc.createTextNode( TQString::number(kspread_validity->valMin ) ) ); val.appendChild( tmp ); } break; case Conditional::Between: case Conditional::DifferentTo: { - QDomElement tmp = gnumeric_doc.createElement( "gmr:Expression0" ); - tmp.appendChild( gnumeric_doc.createTextNode( QString::number(kspread_validity->valMin ) ) ); + TQDomElement tmp = gnumeric_doc.createElement( "gmr:Expression0" ); + tmp.appendChild( gnumeric_doc.createTextNode( TQString::number(kspread_validity->valMin ) ) ); val.appendChild( tmp ); tmp = gnumeric_doc.createElement( "gmr:Expression1" ); - tmp.appendChild( gnumeric_doc.createTextNode( QString::number(kspread_validity->valMax ) ) ); + tmp.appendChild( gnumeric_doc.createTextNode( TQString::number(kspread_validity->valMax ) ) ); val.appendChild( tmp ); } break; @@ -436,19 +436,19 @@ QDomElement GNUMERICExport::GetValidity( QDomDocument gnumeric_doc, Cell * cell case Conditional::InferiorEqual: case Conditional::Different: { - QDomElement tmp = gnumeric_doc.createElement( "gmr:Expression0" ); - tmp.appendChild( gnumeric_doc.createTextNode( QString::number(kspread_validity->valMin ) ) ); + TQDomElement tmp = gnumeric_doc.createElement( "gmr:Expression0" ); + tmp.appendChild( gnumeric_doc.createTextNode( TQString::number(kspread_validity->valMin ) ) ); val.appendChild( tmp ); } break; case Conditional::Between: case Conditional::DifferentTo: { - QDomElement tmp = gnumeric_doc.createElement( "gmr:Expression0" ); - tmp.appendChild( gnumeric_doc.createTextNode( QString::number(kspread_validity->valMin ) ) ); + TQDomElement tmp = gnumeric_doc.createElement( "gmr:Expression0" ); + tmp.appendChild( gnumeric_doc.createTextNode( TQString::number(kspread_validity->valMin ) ) ); val.appendChild( tmp ); tmp = gnumeric_doc.createElement( "gmr:Expression1" ); - tmp.appendChild( gnumeric_doc.createTextNode( QString::number(kspread_validity->valMax ) ) ); + tmp.appendChild( gnumeric_doc.createTextNode( TQString::number(kspread_validity->valMax ) ) ); val.appendChild( tmp ); } break; @@ -478,9 +478,9 @@ QDomElement GNUMERICExport::GetValidity( QDomDocument gnumeric_doc, Cell * cell return val; } -QDomElement GNUMERICExport::GetFontStyle( QDomDocument gnumeric_doc,Cell * cell, int currentcolumn, int currentrow) +TQDomElement GNUMERICExport::GetFontStyle( TQDomDocument gnumeric_doc,Cell * cell, int currentcolumn, int currentrow) { - QDomElement font_style; + TQDomElement font_style; kdDebug()<<" currentcolumn :"<format()->textFontFamily(currentcolumn, currentrow))); @@ -503,19 +503,19 @@ QDomElement GNUMERICExport::GetFontStyle( QDomDocument gnumeric_doc,Cell * cell, } if (cell->format()->textFontSize(currentcolumn,currentrow)) { - font_style.setAttribute("Unit",QString::number(cell->format()->textFontSize(currentcolumn,currentrow))); + font_style.setAttribute("Unit",TQString::number(cell->format()->textFontSize(currentcolumn,currentrow))); } return font_style; } -QDomElement GNUMERICExport::GetLinkStyle(QDomDocument gnumeric_doc) +TQDomElement GNUMERICExport::GetLinkStyle(TQDomDocument gnumeric_doc) { - QDomElement link_style; + TQDomElement link_style; link_style = gnumeric_doc.createElement("gmr:HyperLink"); - QString path; + TQString path; path = linkUrl; @@ -538,93 +538,93 @@ QDomElement GNUMERICExport::GetLinkStyle(QDomDocument gnumeric_doc) return link_style; } -QDomElement GNUMERICExport::GetCellStyle(QDomDocument gnumeric_doc,Cell * cell, int currentcolumn, int currentrow) +TQDomElement GNUMERICExport::GetCellStyle(TQDomDocument gnumeric_doc,Cell * cell, int currentcolumn, int currentrow) { - QColorGroup defaultColorGroup = QApplication::palette().active(); + TQColorGroup defaultColorGroup = TQApplication::tqpalette().active(); - QDomElement cell_style; + TQDomElement cell_style; cell_style = gnumeric_doc.createElement("gmr:Style"); int red, green, blue; - QColor bgColor = cell->bgColor(currentcolumn, currentrow); + TQColor bgColor = cell->bgColor(currentcolumn, currentrow); red = bgColor.red()<<8; green = bgColor.green()<<8; blue = bgColor.blue()<<8; switch (cell->format()->backGroundBrushStyle(currentcolumn, currentrow)) { - case Qt::NoBrush: + case TQt::NoBrush: cell_style.setAttribute("Shade","0"); break; - case Qt::SolidPattern: + case TQt::SolidPattern: // 100% cell_style.setAttribute("Shade","1"); break; - case Qt::Dense1Pattern: + case TQt::Dense1Pattern: // 87.5% cell_style.setAttribute("Shade","25"); break; - case Qt::Dense2Pattern: + case TQt::Dense2Pattern: // 75% cell_style.setAttribute("Shade","2"); break; - case Qt::Dense3Pattern: + case TQt::Dense3Pattern: // 62.5% // Not supported by GNumeric // Fall back to 50% cell_style.setAttribute("Shade","3"); break; - case Qt::Dense4Pattern: + case TQt::Dense4Pattern: // 50% cell_style.setAttribute("Shade","3"); break; - case Qt::Dense5Pattern: + case TQt::Dense5Pattern: // 25% cell_style.setAttribute("Shade","4"); break; - case Qt::Dense6Pattern: + case TQt::Dense6Pattern: // 12.5% cell_style.setAttribute("Shade","5"); break; - case Qt::Dense7Pattern: + case TQt::Dense7Pattern: // 6.25% cell_style.setAttribute("Shade","6"); break; - case Qt::HorPattern: + case TQt::HorPattern: cell_style.setAttribute("Shade","13"); break; - case Qt::VerPattern: + case TQt::VerPattern: cell_style.setAttribute("Shade","14"); break; - case Qt::CrossPattern: + case TQt::CrossPattern: cell_style.setAttribute("Shade","17"); break; - case Qt::BDiagPattern: + case TQt::BDiagPattern: cell_style.setAttribute("Shade","16"); break; - case Qt::FDiagPattern: + case TQt::FDiagPattern: cell_style.setAttribute("Shade","15"); break; - case Qt::DiagCrossPattern: + case TQt::DiagCrossPattern: cell_style.setAttribute("Shade","18"); break; - case Qt::CustomPattern: + case TQt::CustomPattern: // Not supported by Gnumeric cell_style.setAttribute("Shade","0"); break; } - cell_style.setAttribute("Back",QString::number(red,16)+":"+QString::number(green,16) +":"+QString::number(blue,16) ); + cell_style.setAttribute("Back",TQString::number(red,16)+":"+TQString::number(green,16) +":"+TQString::number(blue,16) ); - QColor textColor = cell->format()->textColor(currentcolumn, currentrow); + TQColor textColor = cell->format()->textColor(currentcolumn, currentrow); red = textColor.red()<<8; green = textColor.green()<<8; blue = textColor.blue()<<8; - cell_style.setAttribute("Fore",QString::number(red,16)+":"+QString::number(green,16) +":"+QString::number(blue,16) ); + cell_style.setAttribute("Fore",TQString::number(red,16)+":"+TQString::number(green,16) +":"+TQString::number(blue,16) ); if (cell->format()->align(currentcolumn,currentrow) == Format::Undefined) { @@ -666,12 +666,12 @@ QDomElement GNUMERICExport::GetCellStyle(QDomDocument gnumeric_doc,Cell * cell, // I'm not sure about the rotation values. // I never got it to work in GNumeric. - cell_style.setAttribute("Rotation", QString::number(-1*cell->format()->getAngle(currentcolumn,currentrow))); + cell_style.setAttribute("Rotation", TQString::number(-1*cell->format()->getAngle(currentcolumn,currentrow))); // The indentation in GNumeric is an integer value. In KSpread, it's a double. // Save the double anyway, makes it even better when importing the document back in KSpread. // TODO verify if it's correct, in import we "* 10.0" - cell_style.setAttribute("Indent", QString::number(cell->format()->getIndent(currentcolumn,currentrow))); + cell_style.setAttribute("Indent", TQString::number(cell->format()->getIndent(currentcolumn,currentrow))); cell_style.setAttribute("Locked", !cell->format()->notProtected(currentcolumn,currentrow)); @@ -680,12 +680,12 @@ QDomElement GNUMERICExport::GetCellStyle(QDomDocument gnumeric_doc,Cell * cell, // Gnumeric hides everything or nothing. cell_style.setAttribute("Hidden", cell->format()->isHideAll(currentcolumn,currentrow)); - QColor patColor = cell->format()->backGroundBrushColor(currentcolumn, currentrow); + TQColor patColor = cell->format()->backGroundBrushColor(currentcolumn, currentrow); red = patColor.red()<<8; green = patColor.green()<<8; blue = patColor.blue()<<8; - cell_style.setAttribute("PatternColor", QString::number(red,16)+":"+QString::number(green,16) +":"+QString::number(blue,16)); + cell_style.setAttribute("PatternColor", TQString::number(red,16)+":"+TQString::number(green,16) +":"+TQString::number(blue,16)); if (isLink) cell_style.appendChild(GetLinkStyle(gnumeric_doc)); @@ -697,7 +697,7 @@ QDomElement GNUMERICExport::GetCellStyle(QDomDocument gnumeric_doc,Cell * cell, cell_style.appendChild( GetValidity( gnumeric_doc, cell ) ); } - QString stringFormat; + TQString stringFormat; Format::Currency c; Currency currency; @@ -722,11 +722,11 @@ QDomElement GNUMERICExport::GetCellStyle(QDomDocument gnumeric_doc,Cell * cell, stringFormat = "0.00"; else if (currency.getCurrencyCode(c.type) == "$") stringFormat = "$0.00"; - else if (currency.getCurrencyCode(c.type) == QString::fromUtf8("€")) + else if (currency.getCurrencyCode(c.type) == TQString::fromUtf8("€")) stringFormat = "[$€-2]0.00"; - else if (currency.getCurrencyCode(c.type) == QString::fromUtf8("£")) + else if (currency.getCurrencyCode(c.type) == TQString::fromUtf8("£")) stringFormat = "£0.00"; - else if (currency.getCurrencyCode(c.type) == QString::fromUtf8("¥")) + else if (currency.getCurrencyCode(c.type) == TQString::fromUtf8("¥")) stringFormat = "¥0.00"; else stringFormat="[$" + currency.getCurrencyCode(c.type) + "]0.00"; @@ -892,9 +892,9 @@ QDomElement GNUMERICExport::GetCellStyle(QDomDocument gnumeric_doc,Cell * cell, } -void GNUMERICExport::addAttributeItem(QDomDocument gnumeric_doc, QDomElement attributes, const QString& type, const QString& name, bool value) +void GNUMERICExport::addAttributeItem(TQDomDocument gnumeric_doc, TQDomElement attributes, const TQString& type, const TQString& name, bool value) { - QDomElement gmr_attribute, gmr_type, gmr_name, gmr_value; + TQDomElement gmr_attribute, gmr_type, gmr_name, gmr_value; gmr_attribute = gnumeric_doc.createElement("gmr:Attribute"); attributes.appendChild(gmr_attribute); @@ -907,7 +907,7 @@ void GNUMERICExport::addAttributeItem(QDomDocument gnumeric_doc, QDomElement att gmr_name.appendChild(gnumeric_doc.createTextNode(name)); gmr_attribute.appendChild(gmr_name); - QString txtValue; + TQString txtValue; if (value) txtValue = "true"; else @@ -918,11 +918,11 @@ void GNUMERICExport::addAttributeItem(QDomDocument gnumeric_doc, QDomElement att gmr_attribute.appendChild(gmr_value); } -void GNUMERICExport::addSummaryItem(QDomDocument gnumeric_doc, QDomElement summary, const QString& name, const QString& value) +void GNUMERICExport::addSummaryItem(TQDomDocument gnumeric_doc, TQDomElement summary, const TQString& name, const TQString& value) { if ( value.isEmpty() ) return; - QDomElement gmr_item, gmr_name, gmr_val_string; + TQDomElement gmr_item, gmr_name, gmr_val_string; gmr_item = gnumeric_doc.createElement("gmr:Item"); summary.appendChild(gmr_item); @@ -936,13 +936,13 @@ void GNUMERICExport::addSummaryItem(QDomDocument gnumeric_doc, QDomElement summa gmr_item.appendChild(gmr_val_string); } -// The reason why we use the KoDocument* approach and not the QDomDocument +// The reason why we use the KoDocument* approach and not the TQDomDocument // approach is because we don't want to export formulas but values ! -KoFilter::ConversionStatus GNUMERICExport::convert( const QCString& from, const QCString& to ) +KoFilter::ConversiontqStatus GNUMERICExport::convert( const TQCString& from, const TQCString& to ) { kdDebug(30521) << "Exporting GNUmeric" << endl; - QDomDocument gnumeric_doc=QDomDocument(); + TQDomDocument gnumeric_doc=TQDomDocument(); Sheet* table; KoDocument* document = m_chain->inputDocument(); @@ -950,7 +950,7 @@ KoFilter::ConversionStatus GNUMERICExport::convert( const QCString& from, const if (!document) return KoFilter::StupidError; - if ( !::qt_cast( document ) ) // it's safer that way :) + if ( !::tqqt_cast( document ) ) // it's safer that way :) { kdWarning(30521) << "document isn't a KSpread::Doc but a " << document->className() << endl; return KoFilter::NotImplemented; @@ -973,7 +973,7 @@ KoFilter::ConversionStatus GNUMERICExport::convert( const QCString& from, const gnumeric_doc.appendChild( gnumeric_doc.createProcessingInstruction( "xml", "version=\"1.0\" encoding=\"UTF-8\"" ) ); - QDomElement workbook = gnumeric_doc.createElement("gmr:Workbook"); + TQDomElement workbook = gnumeric_doc.createElement("gmr:Workbook"); workbook.setAttribute("xmlns:gmr","http://www.gnumeric.org/v10.dtd"); workbook.setAttribute("xmlns:xsi","http://www.w3.org/2001/XMLSchema-instance"); workbook.setAttribute("xmlns:schemaLocation", "http://www.gnumeric.org/v8.xsd"); @@ -981,7 +981,7 @@ KoFilter::ConversionStatus GNUMERICExport::convert( const QCString& from, const /* End Made into a function */ - QDomElement sheets,sheet,tmp,cells,selections, cols,rows,styles,merged, margins, top, left, bottom, right, orientation, paper, header, footer, customSize, cellComment, objects, repeatColumns, repeatRows; + TQDomElement sheets,sheet,tmp,cells,selections, cols,rows,styles,merged, margins, top, left, bottom, right, orientation, paper, header, footer, customSize, cellComment, objects, repeatColumns, repeatRows; KoDocumentInfo *DocumentInfo = document->documentInfo(); KoDocumentInfoAbout *aboutPage = static_cast(DocumentInfo->page( "about" )); @@ -991,7 +991,7 @@ KoFilter::ConversionStatus GNUMERICExport::convert( const QCString& from, const /* * Attributes */ - QDomElement attributes = gnumeric_doc.createElement("gmr:Attributes"); + TQDomElement attributes = gnumeric_doc.createElement("gmr:Attributes"); workbook.appendChild(attributes); addAttributeItem(gnumeric_doc, attributes, "4", "WorkbookView::show_horizontal_scrollbar", ksdoc->showHorizontalScrollBar()); @@ -1006,7 +1006,7 @@ KoFilter::ConversionStatus GNUMERICExport::convert( const QCString& from, const /* * Doccument summary */ - QDomElement summary = gnumeric_doc.createElement("gmr:Summary"); + TQDomElement summary = gnumeric_doc.createElement("gmr:Summary"); workbook.appendChild(summary); addSummaryItem(gnumeric_doc, summary, "title", aboutPage->title()); @@ -1020,12 +1020,12 @@ KoFilter::ConversionStatus GNUMERICExport::convert( const QCString& from, const /* * Sheet name index (necessary for the gnumeric xml_sax importer) */ - QDomElement sheetNameIndex = gnumeric_doc.createElement("gmr:SheetNameIndex"); + TQDomElement sheetNameIndex = gnumeric_doc.createElement("gmr:SheetNameIndex"); workbook.appendChild(sheetNameIndex); for (table = ksdoc->map()->firstSheet(); table != 0L; table =ksdoc->map()->nextSheet()) { - QDomElement sheetName = gnumeric_doc.createElement("gmr:SheetName"); + TQDomElement sheetName = gnumeric_doc.createElement("gmr:SheetName"); sheetName.appendChild(gnumeric_doc.createTextNode(table->tableName())); sheetNameIndex.appendChild(sheetName); } @@ -1049,17 +1049,17 @@ KoFilter::ConversionStatus GNUMERICExport::convert( const QCString& from, const */ if ( ksdoc->listArea().count()>0 ) { - QDomElement areaNames = gnumeric_doc.createElement("gmr:Names"); - const QValueList &area = ksdoc->listArea(); // copying by value is slow! - QValueList::ConstIterator it = area.begin(); - QValueList::ConstIterator end = area.end(); + TQDomElement areaNames = gnumeric_doc.createElement("gmr:Names"); + const TQValueList &area = ksdoc->listArea(); // copying by value is slow! + TQValueList::ConstIterator it = area.begin(); + TQValueList::ConstIterator end = area.end(); for ( ; it != end; ++it ) { - QDomElement areaName = gnumeric_doc.createElement("gmr:Name"); - QDomElement areaNameElement = gnumeric_doc.createElement("gmr:name"); + TQDomElement areaName = gnumeric_doc.createElement("gmr:Name"); + TQDomElement areaNameElement = gnumeric_doc.createElement("gmr:name"); areaNameElement.appendChild(gnumeric_doc.createTextNode(( *it ).ref_name) ); areaName.appendChild( areaNameElement ); - QDomElement areaNameValue = gnumeric_doc.createElement("gmr:value"); + TQDomElement areaNameValue = gnumeric_doc.createElement("gmr:value"); areaNameValue.appendChild(gnumeric_doc.createTextNode( convertRefToRange( ( *it ).sheet_name, ( *it ).rect ) ) ); areaName.appendChild( areaNameValue ); areaNames.appendChild( areaName ); @@ -1075,11 +1075,11 @@ KoFilter::ConversionStatus GNUMERICExport::convert( const QCString& from, const sheets = gnumeric_doc.createElement("gmr:Sheets"); workbook.appendChild(sheets); - QString str; + TQString str; View * view = static_cast( ksdoc->views().getFirst()); Canvas * canvas=0L; - QString activeTableName; + TQString activeTableName; if (view) { canvas = view->canvasWidget(); @@ -1123,19 +1123,19 @@ KoFilter::ConversionStatus GNUMERICExport::convert( const QCString& from, const sheet.appendChild(tmp); tmp = gnumeric_doc.createElement("gmr:MaxCol"); - tmp.appendChild(gnumeric_doc.createTextNode(QString::number(table->maxColumn()))); + tmp.appendChild(gnumeric_doc.createTextNode(TQString::number(table->maxColumn()))); sheet.appendChild(tmp); tmp = gnumeric_doc.createElement("gmr:MaxRow"); - tmp.appendChild(gnumeric_doc.createTextNode(QString::number(table->maxRow()))); + tmp.appendChild(gnumeric_doc.createTextNode(TQString::number(table->maxRow()))); sheet.appendChild(tmp); // Zoom value doesn't appear to be correct // KSpread 200% gives zoom() = 2.5, this in GNumeric = 250% tmp = gnumeric_doc.createElement("gmr:Zoom"); if (view) - tmp.appendChild(gnumeric_doc.createTextNode(QString::number(canvas->zoom()))); + tmp.appendChild(gnumeric_doc.createTextNode(TQString::number(canvas->zoom()))); else tmp.appendChild(gnumeric_doc.createTextNode("1.0")); sheet.appendChild(tmp); @@ -1168,7 +1168,7 @@ KoFilter::ConversionStatus GNUMERICExport::convert( const QCString& from, const sheet.appendChild(tmp); orientation = gnumeric_doc.createElement( "gmr:orientation" ); - QString orientString = table->print()->orientation() == PG_LANDSCAPE ? "landscape" : "portrait"; + TQString orientString = table->print()->orientation() == PG_LANDSCAPE ? "landscape" : "portrait"; orientation.appendChild( gnumeric_doc.createTextNode(orientString) ); tmp.appendChild( orientation ); @@ -1181,7 +1181,7 @@ KoFilter::ConversionStatus GNUMERICExport::convert( const QCString& from, const if ( _tmpRepeatColumnStart!=0 ) { repeatColumns = gnumeric_doc.createElement( "gmr:repeat_left" ); - QString value = Cell::columnName( _tmpRepeatColumnStart )+"1:"+Cell::columnName(_tmpRepeatColumnEnd )+"65536"; + TQString value = Cell::columnName( _tmpRepeatColumnStart )+"1:"+Cell::columnName(_tmpRepeatColumnEnd )+"65536"; repeatColumns.setAttribute( "value", value ); tmp.appendChild( repeatColumns ); } @@ -1190,7 +1190,7 @@ KoFilter::ConversionStatus GNUMERICExport::convert( const QCString& from, const if ( _tmpRepeatRowStart!=0 ) { repeatRows = gnumeric_doc.createElement( "gmr:repeat_top" ); - QString value = "A"+ QString::number(_tmpRepeatRowStart ) +":IV"+QString::number( _tmpRepeatRowEnd ); + TQString value = "A"+ TQString::number(_tmpRepeatRowStart ) +":IV"+TQString::number( _tmpRepeatRowEnd ); repeatRows.setAttribute( "value", value ); tmp.appendChild( repeatRows ); } @@ -1249,24 +1249,24 @@ KoFilter::ConversionStatus GNUMERICExport::convert( const QCString& from, const int step=iMaxRow > 50 ? iMaxRow/50 : 1; int i=1; - QString emptyLines; + TQString emptyLines; /* Save selection info. */ /* can't save selection anymore -- part of the view, not table */ /* - QDomElement selection = gnumeric_doc.createElement("gmr:Selection"); - QRect table_selection(table->selection()); + TQDomElement selection = gnumeric_doc.createElement("gmr:Selection"); + TQRect table_selection(table->selection()); selections.appendChild(selection); */ /* */ /* - selection.setAttribute("startCol", QString::number(table_selection.left()-1)); - selection.setAttribute("startRow", QString::number(table_selection.top()-1)); + selection.setAttribute("startCol", TQString::number(table_selection.left()-1)); + selection.setAttribute("startRow", TQString::number(table_selection.top()-1)); - selection.setAttribute("endCol", QString::number(table_selection.right()-1)); - selection.setAttribute("endRow", QString::number(table_selection.bottom()-1)); + selection.setAttribute("endCol", TQString::number(table_selection.right()-1)); + selection.setAttribute("endRow", TQString::number(table_selection.bottom()-1)); */ /* End selection info. */ @@ -1275,11 +1275,11 @@ KoFilter::ConversionStatus GNUMERICExport::convert( const QCString& from, const ColumnFormat *cl=table->firstCol(); while (cl) { - QDomElement colinfo = gnumeric_doc.createElement("gmr:ColInfo"); + TQDomElement colinfo = gnumeric_doc.createElement("gmr:ColInfo"); cols.appendChild(colinfo); - colinfo.setAttribute("No", QString::number(cl->column()-1)); - colinfo.setAttribute("Hidden", QString::number(cl->isHide())); - colinfo.setAttribute("Unit", QString::number(cl->dblWidth())); + colinfo.setAttribute("No", TQString::number(cl->column()-1)); + colinfo.setAttribute("Hidden", TQString::number(cl->isHide())); + colinfo.setAttribute("Unit", TQString::number(cl->dblWidth())); cl=cl->next(); } @@ -1293,11 +1293,11 @@ KoFilter::ConversionStatus GNUMERICExport::convert( const QCString& from, const RowFormat *rl=table->firstRow(); while (rl) { - QDomElement rowinfo = gnumeric_doc.createElement("gmr:RowInfo"); + TQDomElement rowinfo = gnumeric_doc.createElement("gmr:RowInfo"); rows.appendChild(rowinfo); - rowinfo.setAttribute("No", QString::number(rl->row()-1)); - rowinfo.setAttribute("Hidden", QString::number(rl->isHide())); - rowinfo.setAttribute("Unit", QString::number(rl->dblHeight())); + rowinfo.setAttribute("No", TQString::number(rl->row()-1)); + rowinfo.setAttribute("Hidden", TQString::number(rl->isHide())); + rowinfo.setAttribute("Unit", TQString::number(rl->dblHeight())); rl=rl->next(); } @@ -1323,25 +1323,25 @@ KoFilter::ConversionStatus GNUMERICExport::convert( const QCString& from, const i=0; } - QString line; + TQString line; for (int currentcolumn = 1; currentcolumn <= iMaxColumn; currentcolumn++) { - QDomElement cell_contents; + TQDomElement cell_contents; Cell * cell = table->cellAt( currentcolumn, currentrow, false ); - QString text, style; - QDomDocument domLink; - QDomElement domRoot; - QDomNode domNode; - QDomNodeList childNodes; + TQString text, style; + TQDomDocument domLink; + TQDomElement domRoot; + TQDomNode domNode; + TQDomNodeList childNodes; if (!cell->isDefault() && !cell->isEmpty()) { if ( cell->isFormula() ) { - QString tmp = cell->text(); - if ( tmp.contains( "==" ) ) - tmp=tmp.replace( "==", "=" ); + TQString tmp = cell->text(); + if ( tmp.tqcontains( "==" ) ) + tmp=tmp.tqreplace( "==", "=" ); text = tmp; isLink = false; } @@ -1404,9 +1404,9 @@ KoFilter::ConversionStatus GNUMERICExport::convert( const QCString& from, const break; case Cell::Formula: isLink = false; - QString tmp = cell->text(); + TQString tmp = cell->text(); if ( tmp =="==" ) - tmp=replace( "==", "=" ); + tmp=tqreplace( "==", "=" ); /* cell->calc( TRUE ); // Incredible, cells are not calculated if the document was just opened text = cell->valueString(); */ text = tmp; break; @@ -1424,14 +1424,14 @@ KoFilter::ConversionStatus GNUMERICExport::convert( const QCString& from, const if (cell->doesMergeCells()) { // The cell is forced to occupy other cells - QDomElement merge = gnumeric_doc.createElement("gmr:Merge"); + TQDomElement merge = gnumeric_doc.createElement("gmr:Merge"); // Set up the range - QString fromCol, toCol, fromRow, toRow; + TQString fromCol, toCol, fromRow, toRow; fromCol = cell->columnName(currentcolumn); - fromRow = QString::number(currentrow); + fromRow = TQString::number(currentrow); toCol = cell->columnName(currentcolumn + cell->mergedXCells()); - toRow = QString::number(currentrow + cell->mergedYCells()); + toRow = TQString::number(currentrow + cell->mergedYCells()); merge.appendChild(gnumeric_doc.createTextNode(fromCol + fromRow + ":" + toCol + toRow)); mergedCells = true; @@ -1443,31 +1443,31 @@ KoFilter::ConversionStatus GNUMERICExport::convert( const QCString& from, const // cellComment = gnumeric_doc.createElement("gmr:CellComment"); cellComment.setAttribute( "Text", cell->format()->comment( currentcolumn, currentrow ) ); - QString sCell=QString( "%1%2" ).arg( Cell::columnName(currentcolumn ) ).arg( currentrow ); + TQString sCell=TQString( "%1%2" ).tqarg( Cell::columnName(currentcolumn ) ).tqarg( currentrow ); cellComment.setAttribute("ObjectBound", sCell ); objects.appendChild(cellComment); } - QDomElement gnumeric_cell = gnumeric_doc.createElement("gmr:Cell"); - QDomElement cell_style; + TQDomElement gnumeric_cell = gnumeric_doc.createElement("gmr:Cell"); + TQDomElement cell_style; - QDomElement style_region = gnumeric_doc.createElement("gmr:StyleRegion"); + TQDomElement style_region = gnumeric_doc.createElement("gmr:StyleRegion"); cells.appendChild(gnumeric_cell); - gnumeric_cell.setAttribute("Col", QString::number(currentcolumn-1)); - gnumeric_cell.setAttribute("Row", QString::number(currentrow-1)); + gnumeric_cell.setAttribute("Col", TQString::number(currentcolumn-1)); + gnumeric_cell.setAttribute("Row", TQString::number(currentrow-1)); /* Right now, we create a single region for each cell.. This is inefficient, * but the implementation is quicker.. Probably later we will have to * consolidate styles into style regions. */ - style_region.setAttribute("startCol", QString::number(currentcolumn-1)); - style_region.setAttribute("startRow", QString::number(currentrow-1)); - style_region.setAttribute("endCol", QString::number(currentcolumn-1)); - style_region.setAttribute("endRow", QString::number(currentrow-1)); + style_region.setAttribute("startCol", TQString::number(currentcolumn-1)); + style_region.setAttribute("startRow", TQString::number(currentrow-1)); + style_region.setAttribute("endCol", TQString::number(currentcolumn-1)); + style_region.setAttribute("endRow", TQString::number(currentrow-1)); cell_style = GetCellStyle(gnumeric_doc,cell,currentcolumn,currentrow); @@ -1488,7 +1488,7 @@ KoFilter::ConversionStatus GNUMERICExport::convert( const QCString& from, const if (mergedCells) sheet.appendChild(merged); } - QDomElement uidata = gnumeric_doc.createElement("gmr:UIData"); + TQDomElement uidata = gnumeric_doc.createElement("gmr:UIData"); uidata.setAttribute( "SelectedTab", indexActiveTable ); workbook.appendChild(uidata); @@ -1498,7 +1498,7 @@ KoFilter::ConversionStatus GNUMERICExport::convert( const QCString& from, const // Ok, now write to export file - QIODevice* out = KFilterDev::deviceForFile(m_chain->outputFile(),"application/x-gzip"); + TQIODevice* out = KFilterDev::deviceForFile(m_chain->outputFile(),"application/x-gzip"); if (!out) { @@ -1513,7 +1513,7 @@ KoFilter::ConversionStatus GNUMERICExport::convert( const QCString& from, const return KoFilter::FileNotFound; } - QTextStream streamOut(out); + TQTextStream streamOut(out); streamOut << str; @@ -1524,49 +1524,49 @@ KoFilter::ConversionStatus GNUMERICExport::convert( const QCString& from, const } -QString GNUMERICExport::convertRefToRange( const QString & table, const QRect & rect ) +TQString GNUMERICExport::convertRefToRange( const TQString & table, const TQRect & rect ) { - QPoint topLeft( rect.topLeft() ); - QPoint bottomRight( rect.bottomRight() ); + TQPoint topLeft( rect.topLeft() ); + TQPoint bottomRight( rect.bottomRight() ); if ( topLeft == bottomRight ) return convertRefToBase( table, rect ); - QString s; + TQString s; s += table; s += "!$"; s += Cell::columnName( topLeft.x() ); s += '$'; - s += QString::number( topLeft.y() ); + s += TQString::number( topLeft.y() ); s += ":$"; s += Cell::columnName( bottomRight.x() ); s += '$'; - s += QString::number( bottomRight.y() ); + s += TQString::number( bottomRight.y() ); return s; } -QString GNUMERICExport::convertRefToBase( const QString & table, const QRect & rect ) +TQString GNUMERICExport::convertRefToBase( const TQString & table, const TQRect & rect ) { - QPoint bottomRight( rect.bottomRight() ); + TQPoint bottomRight( rect.bottomRight() ); - QString s; + TQString s; s = table; s += "!$"; s += Cell::columnName( bottomRight.x() ); s += '$'; - s += QString::number( bottomRight.y() ); + s += TQString::number( bottomRight.y() ); return s; } -QString GNUMERICExport::convertVariable( QString headerFooter ) +TQString GNUMERICExport::convertVariable( TQString headerFooter ) { - headerFooter = headerFooter.replace( "", "&[TAB]" ); - headerFooter = headerFooter.replace( "", "&[DATE]" ); - headerFooter = headerFooter.replace( "", "&[PAGE]" ); - headerFooter = headerFooter.replace( "", "&[PAGES]" ); - headerFooter = headerFooter.replace( " - - -
FeaturesVertical & Horizontal Alignment, text wrapping, indention +Vertical &Qt::Horizontal Alignment, text wrapping, indention
Background, Patter & Foreground color
Fonts:
                @@ -61,7 +61,7 @@ Family
Page: size, orientation, borders, header and footer
Border: color, style, width for all 6 types
Background pattern: style, color -
Cell Size: Horizontal & Vertical  +
Cell Size:Qt::Horizontal &Qt::Vertical 
Hidden Columns
Default row heights and column widths
Area name @@ -81,7 +81,7 @@ Family
TodoCell Size: Horizontal & Vertical (Export) (kspread  doesn't +Cell Size:Qt::Horizontal &Qt::Vertical (Export) (kspread  doesn't support retriving the first "rowFormat" and colFormat".)
               
                       @@ -128,7 +128,7 @@ support it.)
Jul 15, 2001 - Preliminary support for background patterns.
Aug 21, 2002 - text/number formats, border, patters, page/print info, comments
Aug 21, 2002 - font family, wrap text, number formating, precisions -
Sep 05, 2002 - bugfixes, default sizes, row and column layouts +
Sep 05, 2002 - bugfixes, default sizes, row and column tqlayouts
Sep 07, 2002 - bugfixes, preliminery date/time support
Feb 03, 2005 - export area name
Feb 06, 2005 - cells merged @@ -194,7 +194,7 @@ Faure   Werner Trobin
FeaturesVertical & Horizontal Alignment +Vertical &Qt::Horizontal Alignment
Background & Foreground color
Fonts:
                @@ -208,10 +208,10 @@ Bold
Multiple Sheets (Tables)
Formulas!!! (ExprID)
Selections -
Cell Size: Horizontal & Vertical +
Cell Size:Qt::Horizontal &Qt::Vertical
Hidden columns/rows 
Selected Tab -
Paper layout +
Paper tqlayout
area name
Cell comment
Text Rotation diff --git a/filters/kspread/html/exportdialog.cc b/filters/kspread/html/exportdialog.cc index 78276def..37720d6e 100644 --- a/filters/kspread/html/exportdialog.cc +++ b/filters/kspread/html/exportdialog.cc @@ -17,12 +17,12 @@ * Boston, MA 02110-1301, USA. */ -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include @@ -32,19 +32,19 @@ #include #include -ExportDialog::ExportDialog( QWidget *parent, const char *name ) - : KDialogBase( parent, name, true, i18n("Export Sheet to HTML"), Ok|Cancel, No, true ), m_mainwidget( new ExportWidget( this ) ) +ExportDialog::ExportDialog( TQWidget *tqparent, const char *name ) + : KDialogBase( tqparent, name, true, i18n("Export Sheet to HTML"), Ok|Cancel, No, true ), m_mainwidget( new ExportWidget( this ) ) { kapp->restoreOverrideCursor(); - connect( m_mainwidget->mCustomButton, SIGNAL( toggled( bool ) ), - m_mainwidget->mCustomURL, SLOT( setEnabled( bool ) ) ); - connect( m_mainwidget->mSelectAllButton, SIGNAL( clicked() ), SLOT( selectAll() ) ); - connect( m_mainwidget->mDeselectAllButton, SIGNAL( clicked() ), - m_mainwidget->mSheets, SLOT( clearSelection() ) ); + connect( m_mainwidget->mCustomButton, TQT_SIGNAL( toggled( bool ) ), + m_mainwidget->mCustomURL, TQT_SLOT( setEnabled( bool ) ) ); + connect( m_mainwidget->mSelectAllButton, TQT_SIGNAL( clicked() ), TQT_SLOT( selectAll() ) ); + connect( m_mainwidget->mDeselectAllButton, TQT_SIGNAL( clicked() ), + m_mainwidget->mSheets, TQT_SLOT( clearSelection() ) ); m_mainwidget->mEncodingBox->insertItem( i18n( "Recommended: UTF-8" ) ); - m_mainwidget->mEncodingBox->insertItem( i18n( "Locale (%1)" ).arg( KGlobal::locale()->codecForEncoding()->name() ) ); + m_mainwidget->mEncodingBox->insertItem( i18n( "Locale (%1)" ).tqarg( KGlobal::locale()->codecForEncoding()->name() ) ); m_mainwidget->mCustomURL->setMode( KFile::ExistingOnly ); @@ -58,15 +58,15 @@ void ExportDialog::selectAll() ExportDialog::~ExportDialog() { - kapp->setOverrideCursor(Qt::waitCursor); + kapp->setOverrideCursor(TQt::waitCursor); } -QTextCodec *ExportDialog::encoding() const +TQTextCodec *ExportDialog::encoding() const { if( m_mainwidget->mEncodingBox->currentItem() == 1 ) // locale selected return KGlobal::locale()->codecForEncoding(); - return QTextCodec::codecForName( "utf8" ); // utf8 is default + return TQTextCodec::codecForName( "utf8" ); // utf8 is default } bool ExportDialog::useBorders() const @@ -79,24 +79,24 @@ bool ExportDialog::separateFiles() const return m_mainwidget->mSeparateFiles->isChecked(); } -QString ExportDialog::customStyleURL() const +TQString ExportDialog::customStyleURL() const { - QString url = m_mainwidget->mCustomURL->url(); + TQString url = m_mainwidget->mCustomURL->url(); if( m_mainwidget->mCustomButton->isChecked() && KURL( url ).isValid() ) return url; - return QString::null; + return TQString(); } -void ExportDialog::setSheets( const QStringList &list ) +void ExportDialog::setSheets( const TQStringList &list ) { m_mainwidget->mSheets->insertStringList( list ); selectAll(); } -QStringList ExportDialog::sheets() const +TQStringList ExportDialog::sheets() const { - QStringList list; + TQStringList list; for( uint i = 0; i < m_mainwidget->mSheets->count() ; i++ ) { if( m_mainwidget->mSheets->isSelected( i ) ) diff --git a/filters/kspread/html/exportdialog.h b/filters/kspread/html/exportdialog.h index 4a460554..38cac112 100644 --- a/filters/kspread/html/exportdialog.h +++ b/filters/kspread/html/exportdialog.h @@ -27,23 +27,24 @@ class ExportWidget; class ExportDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - ExportDialog( QWidget *parent = 0, const char *name = 0 ); + ExportDialog( TQWidget *tqparent = 0, const char *name = 0 ); ~ExportDialog(); - void setSheets( const QStringList & ); - QStringList sheets() const; + void setSheets( const TQStringList & ); + TQStringList sheets() const; /** Returns preferred encoding. Defaults to UTF-8. */ - QTextCodec *encoding() const; + TQTextCodec *encoding() const; /** Returns a valid URL if the custom button was selected. - Else, it will return QString::null. + Else, it will return TQString(). */ - QString customStyleURL() const; + TQString customStyleURL() const; /** Returns true if borders should be shown, false if borders diff --git a/filters/kspread/html/exportwidget.ui b/filters/kspread/html/exportwidget.ui index d81ef40b..0c92ae60 100644 --- a/filters/kspread/html/exportwidget.ui +++ b/filters/kspread/html/exportwidget.ui @@ -1,6 +1,6 @@ ExportWidget - + ExportWidget @@ -19,15 +19,15 @@ 0 - + - layout1 + tqlayout1 unnamed - + textLabel1 @@ -38,7 +38,7 @@ mEncodingBox - + mEncodingBox @@ -56,7 +56,7 @@ Expanding - + 40 20 @@ -65,7 +65,7 @@ - + groupBox3 @@ -76,7 +76,7 @@ unnamed - + mSheets @@ -84,15 +84,15 @@ Multi - + - layout7 + tqlayout7 unnamed - + mSelectAllButton @@ -103,7 +103,7 @@ Click here to select all sheets in the list. - + mDeselectAllButton @@ -124,7 +124,7 @@ Expanding - + 330 20 @@ -133,7 +133,7 @@ - + mSeparateFiles @@ -146,7 +146,7 @@ - + buttonGroup4 @@ -157,7 +157,7 @@ unnamed - + mDefaultButton @@ -171,7 +171,7 @@ Select this option to use the default fonts and colors for the HTML page. - + mCustomButton @@ -195,7 +195,7 @@ - + groupBox2 @@ -206,7 +206,7 @@ unnamed - + mUseBorders @@ -220,15 +220,15 @@ Use this option to enable or disable borders around the cells. - + - layout4 + tqlayout4 unnamed - + textLabel1_2 @@ -242,7 +242,7 @@ Use this option to define how many pixels there should be between the cells. This effect is better visible if you check <b>Use borders</b> too. - + mPixelsBetweenCells @@ -271,7 +271,7 @@ Expanding - + 16 20 @@ -292,7 +292,7 @@ Expanding - + 20 16 @@ -301,7 +301,7 @@ - + kurlrequester.h klineedit.h diff --git a/filters/kspread/html/htmlexport.cc b/filters/kspread/html/htmlexport.cc index 76c6ee83..3360c593 100644 --- a/filters/kspread/html/htmlexport.cc +++ b/filters/kspread/html/htmlexport.cc @@ -22,8 +22,8 @@ #include #include -#include -#include +#include +#include #include #include @@ -41,24 +41,24 @@ using namespace KSpread; typedef KGenericFactory HTMLExportFactory; K_EXPORT_COMPONENT_FACTORY( libkspreadhtmlexport, HTMLExportFactory( "kofficefilters" ) ) -const QString html_table_tag = "table"; -const QString html_table_options = QString(" border=\"%1\" cellspacing=\"%2\""); -const QString html_row_tag = "tr"; -const QString html_row_options = ""; -const QString html_cell_tag = "td"; -const QString html_cell_options = ""; -const QString html_bold = "b"; -const QString html_italic = "i"; -const QString html_underline = "u"; -const QString html_right= "right"; -const QString html_left= "left"; -const QString html_center= "center"; -const QString html_top="top"; -const QString html_bottom="bottom"; -const QString html_middle="middle"; -const QString html_h1="h1"; - -HTMLExport::HTMLExport(KoFilter *, const char *, const QStringList&) : +const TQString html_table_tag = "table"; +const TQString html_table_options = TQString(" border=\"%1\" cellspacing=\"%2\""); +const TQString html_row_tag = "tr"; +const TQString html_row_options = ""; +const TQString html_cell_tag = "td"; +const TQString html_cell_options = ""; +const TQString html_bold = "b"; +const TQString html_italic = "i"; +const TQString html_underline = "u"; +const TQString html_right= "right"; +const TQString html_left= "left"; +const TQString html_center= "center"; +const TQString html_top="top"; +const TQString html_bottom="bottom"; +const TQString html_middle="middle"; +const TQString html_h1="h1"; + +HTMLExport::HTMLExport(KoFilter *, const char *, const TQStringList&) : KoFilter(), m_dialog( new ExportDialog() ) { } @@ -69,14 +69,14 @@ HTMLExport::~HTMLExport() } // HTML enitities, AFAIK we don't need to escape " to " (dnaber): -const QString strAmp ("&"); -const QString nbsp (" "); -const QString strLt ("<"); -const QString strGt (">"); +const TQString strAmp ("&"); +const TQString nbsp (" "); +const TQString strLt ("<"); +const TQString strGt (">"); -// The reason why we use the KoDocument* approach and not the QDomDocument +// The reason why we use the KoDocument* approach and not the TQDomDocument // approach is because we don't want to export formulas but values ! -KoFilter::ConversionStatus HTMLExport::convert( const QCString& from, const QCString& to ) +KoFilter::ConversiontqStatus HTMLExport::convert( const TQCString& from, const TQCString& to ) { if(to!="text/html" || from!="application/x-kspread") { @@ -89,7 +89,7 @@ KoFilter::ConversionStatus HTMLExport::convert( const QCString& from, const QCSt if ( !document ) return KoFilter::StupidError; - if( !::qt_cast( document ) ) // it's safer that way :) + if( !::tqqt_cast( document ) ) // it's safer that way :) { kdWarning(30501) << "document isn't a KSpread::Doc but a " << document->className() << endl; return KoFilter::NotImplemented; @@ -104,10 +104,10 @@ KoFilter::ConversionStatus HTMLExport::convert( const QCString& from, const QCSt } Sheet *sheet = ksdoc->map()->firstSheet(); - QString filenameBase = m_chain->outputFile(); - filenameBase = filenameBase.left( filenameBase.findRev( '.' ) ); + TQString filenameBase = m_chain->outputFile(); + filenameBase = filenameBase.left( filenameBase.tqfindRev( '.' ) ); - QStringList sheets; + TQStringList sheets; while( sheet != 0 ) { int rows = 0; @@ -124,20 +124,20 @@ KoFilter::ConversionStatus HTMLExport::convert( const QCString& from, const QCSt } m_dialog->setSheets( sheets ); - if( m_dialog->exec() == QDialog::Rejected ) + if( m_dialog->exec() == TQDialog::Rejected ) return KoFilter::UserCancelled; sheets = m_dialog->sheets(); - QString str; + TQString str; for( uint i = 0; i < sheets.count() ; ++i ) { sheet = ksdoc->map()->findSheet( sheets[i] ); - QString file = fileName( filenameBase, sheet->sheetName(), sheets.count() > 1 ); + TQString file = fileName( filenameBase, sheet->sheetName(), sheets.count() > 1 ); if( m_dialog->separateFiles() || sheets[i] == sheets.first() ) { - str = QString::null; + str = TQString(); openPage( sheet, document, str ); writeTOC( sheets, filenameBase, str ); } @@ -147,13 +147,13 @@ KoFilter::ConversionStatus HTMLExport::convert( const QCString& from, const QCSt if( m_dialog->separateFiles() || sheets[i] == sheets.last() ) { closePage( str ); - QFile out(file); + TQFile out(file); if(!out.open(IO_WriteOnly)) { kdError(30501) << "Unable to open output file!" << endl; out.close(); return KoFilter::FileNotFound; } - QTextStream streamOut(&out); + TQTextStream streamOut(&out); streamOut.setCodec( m_dialog->encoding() ); streamOut << str << endl; out.close(); @@ -170,9 +170,9 @@ KoFilter::ConversionStatus HTMLExport::convert( const QCString& from, const QCSt return KoFilter::OK; } -void HTMLExport::openPage( Sheet *sheet, KoDocument *document, QString &str ) +void HTMLExport::openPage( Sheet *sheet, KoDocument *document, TQString &str ) { - QString title; + TQString title; KoDocumentInfo *info = document->documentInfo(); KoDocumentInfoAbout *aboutPage = static_cast(info->page( "about" )); if ( aboutPage && !aboutPage->title().isEmpty() ) @@ -186,7 +186,7 @@ void HTMLExport::openPage( Sheet *sheet, KoDocument *document, QString &str ) str += "\n"; str += "\n"; str += "\n").arg( m_dialog->encoding()->mimeName() ); + str += TQString("content=\"text/html; charset=%1\">\n").tqarg( m_dialog->encoding()->mimeName() ); str += "" + title + "\n"; str += "\n"; - str += QString("\n").arg( + str += TQString("\n").tqarg( sheet->isRightToLeft()?"rtl":"ltr"); str += "\n"; } -void HTMLExport::closePage( QString &str ) +void HTMLExport::closePage( TQString &str ) { str += "

" + i18n("Top") + "

\n"; str += "\n"; str += "\n\n"; } -void HTMLExport::convertSheet( Sheet *sheet, QString &str, int iMaxUsedRow, int iMaxUsedColumn ) +void HTMLExport::convertSheet( Sheet *sheet, TQString &str, int iMaxUsedRow, int iMaxUsedColumn ) { - QString emptyLines; + TQString emptyLines; // Either we get hold of KSpreadTable::m_dctCells and apply the old method below (for sorting) // or, cleaner and already sorted, we use KSpreadTable's API (slower probably, though) @@ -234,8 +234,8 @@ void HTMLExport::convertSheet( Sheet *sheet, QString &str, int iMaxUsedRow, int int step=iMaxRow > 50 ? iMaxRow/50 : 1; int i=1; - str += "<" + html_table_tag + html_table_options.arg( m_dialog->useBorders() ? "1" : "0" ).arg( m_dialog->pixelsBetweenCells() ) + - QString("dir=\"%1\">\n").arg(sheet->isRightToLeft()?"rtl":"ltr"); + str += "<" + html_table_tag + html_table_options.tqarg( m_dialog->useBorders() ? "1" : "0" ).tqarg( m_dialog->pixelsBetweenCells() ) + + TQString("dir=\"%1\">\n").tqarg(sheet->isRightToLeft()?"rtl":"ltr"); unsigned int nonempty_cells_prev=0; @@ -247,8 +247,8 @@ void HTMLExport::convertSheet( Sheet *sheet, QString &str, int iMaxUsedRow, int i=0; } - QString separators; - QString line; + TQString separators; + TQString line; unsigned int nonempty_cells=0; unsigned int colspan_cells=0; @@ -258,8 +258,8 @@ void HTMLExport::convertSheet( Sheet *sheet, QString &str, int iMaxUsedRow, int colspan_cells=cell->extraXCells(); if (cell->needsPrinting()) nonempty_cells++; - QString text; - QColor bgcolor = cell->bgColor(currentcolumn,currentrow); + TQString text; + TQColor bgcolor = cell->bgColor(currentcolumn,currentrow); // FIXME: some formatting seems to be missing with cell->text(), e.g. // "208.00" in KSpread will be "208" in HTML (not always?!) bool link = false; @@ -297,7 +297,7 @@ void HTMLExport::convertSheet( Sheet *sheet, QString &str, int iMaxUsedRow, int #endif line += " <" + html_cell_tag + html_cell_options; if (text.isRightToLeft() != sheet->isRightToLeft()) - line += QString(" dir=\"%1\" ").arg(text.isRightToLeft()?"rtl":"ltr"); + line += TQString(" dir=\"%1\" ").tqarg(text.isRightToLeft()?"rtl":"ltr"); if (bgcolor.isValid() && bgcolor.name()!="#ffffff") // change color only for non-white cells line += " bgcolor=\"" + bgcolor.name() + "\""; @@ -329,12 +329,12 @@ void HTMLExport::convertSheet( Sheet *sheet, QString &str, int iMaxUsedRow, int case Format::UndefinedY: break; } - line+=" width=\""+QString::number(cell->width())+"\""; - line+=" height=\""+QString::number(cell->height())+"\""; + line+=" width=\""+TQString::number(cell->width())+"\""; + line+=" height=\""+TQString::number(cell->height())+"\""; if (cell->extraXCells()>0) { - QString tmp; + TQString tmp; int extra_cells=cell->extraXCells(); line += " colspan=\"" + tmp.setNum(extra_cells+1) + "\""; currentcolumn += extra_cells; @@ -345,10 +345,10 @@ void HTMLExport::convertSheet( Sheet *sheet, QString &str, int iMaxUsedRow, int text = text.right(text.length()-1); } else if ( !link ) { // Escape HTML characters. - text.replace ('&' , strAmp) - .replace ('<' , strLt) - .replace ('>' , strGt) - .replace (' ' , nbsp); + text.tqreplace ('&' , strAmp) + .tqreplace ('<' , strLt) + .tqreplace ('>' , strGt) + .tqreplace (' ' , nbsp); } line += ">\n"; @@ -367,7 +367,7 @@ void HTMLExport::convertSheet( Sheet *sheet, QString &str, int iMaxUsedRow, int text.insert(0, "<" + html_underline + ">"); text.append(""); } - QColor textColor = cell->format()->textColor(currentcolumn,currentrow); + TQColor textColor = cell->format()->textColor(currentcolumn,currentrow); if (textColor.isValid() && textColor.name()!="#000000") // change color only for non-default text { text.insert(0, ""); @@ -387,7 +387,7 @@ void HTMLExport::convertSheet( Sheet *sheet, QString &str, int iMaxUsedRow, int str += "<" + html_row_tag + html_row_options + ">\n"; str += line; str += ""; - emptyLines = QString::null; + emptyLines = TQString(); // Append a CR, but in a temp string -> if no other real line, // then those will be dropped emptyLines += "\n"; @@ -396,13 +396,13 @@ void HTMLExport::convertSheet( Sheet *sheet, QString &str, int iMaxUsedRow, int str += "\n\n
\n"; } -void HTMLExport::createSheetSeparator( QString &str ) +void HTMLExport::createSheetSeparator( TQString &str ) { str += ("

" + i18n("Top") + "

\n" ); str += "
\n"; } -void HTMLExport::writeTOC( const QStringList &sheets, const QString &base, QString &str ) +void HTMLExport::writeTOC( const TQStringList &sheets, const TQString &base, TQString &str ) { // don't create TOC for 1 sheet if( sheets.count() == 1 ) @@ -431,9 +431,9 @@ void HTMLExport::writeTOC( const QStringList &sheets, const QString &base, QStri str += "


\n"; } -QString HTMLExport::fileName( const QString &base, const QString &sheetName, bool multipleFiles ) +TQString HTMLExport::fileName( const TQString &base, const TQString &sheetName, bool multipleFiles ) { - QString fileName = base; + TQString fileName = base; if( m_dialog->separateFiles() && multipleFiles ) { fileName += "-" + sheetName; @@ -457,7 +457,7 @@ void HTMLExport::detectFilledCells( Sheet *sheet, int &rows, int &columns ) for ( int currentcolumn = 1 ; currentcolumn <= iMaxColumn ; currentcolumn++ ) { cell = sheet->cellAt( currentcolumn, currentrow, false ); - QString text; + TQString text; if ( !cell->isDefault() && !cell->isEmpty() ) { iUsedColumn = currentcolumn; diff --git a/filters/kspread/html/htmlexport.h b/filters/kspread/html/htmlexport.h index 1952c9af..afb20883 100644 --- a/filters/kspread/html/htmlexport.h +++ b/filters/kspread/html/htmlexport.h @@ -34,34 +34,35 @@ class Sheet; class HTMLExport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - HTMLExport(KoFilter *parent, const char*name, const QStringList&); + HTMLExport(KoFilter *tqparent, const char*name, const TQStringList&); virtual ~HTMLExport(); - virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to ); private: /** Writes the top of the page in HTML to @par str */ - void openPage( KSpread::Sheet *sheet,KoDocument *document, QString &str); + void openPage( KSpread::Sheet *sheet,KoDocument *document, TQString &str); /** Closes a page in HTML */ - void closePage( QString &); + void closePage( TQString &); /** Converts @par sheet to HTML and writes to @par str. */ - void convertSheet( KSpread::Sheet *sheet, QString &str, int, int); + void convertSheet( KSpread::Sheet *sheet, TQString &str, int, int); /** Writes a bar and a link to the top to @par str. */ - void createSheetSeparator( QString & ); + void createSheetSeparator( TQString & ); /** Writes the table of contents */ - void writeTOC( const QStringList &, const QString &, QString & ); + void writeTOC( const TQStringList &, const TQString &, TQString & ); /** Returns a filename based on the @par base filename and the options defined in the dialog. */ - QString fileName( const QString &base, const QString &, bool ); + TQString fileName( const TQString &base, const TQString &, bool ); /** Detects which rows and columsn of the given @par sheet are used and @@ -71,9 +72,9 @@ public: private: ExportDialog *m_dialog; - typedef QMap Rows; + typedef TQMap Rows; Rows m_rowmap; - typedef QMap Columns; + typedef TQMap Columns; Columns m_columnmap; }; diff --git a/filters/kspread/kexi/kspread_kexiimport.cc b/filters/kspread/kexi/kspread_kexiimport.cc index 11feea71..76a44e9a 100644 --- a/filters/kspread/kexi/kspread_kexiimport.cc +++ b/filters/kspread/kexi/kspread_kexiimport.cc @@ -53,7 +53,7 @@ #include #include #include -#include +#include typedef KGenericFactory KSpreadKexiImportFactory; K_EXPORT_COMPONENT_FACTORY( libkspreadkexiimport, KSpreadKexiImportFactory( "kofficefilters" ) ) @@ -61,7 +61,7 @@ K_EXPORT_COMPONENT_FACTORY( libkspreadkexiimport, KSpreadKexiImportFactory( "kof //============================================================================= -KSpreadKexiImport::KSpreadKexiImport(KoFilter *parent, const char *name, const QStringList&) +KSpreadKexiImport::KSpreadKexiImport(KoFilter *tqparent, const char *name, const TQStringList&) { } @@ -74,10 +74,10 @@ KSpreadKexiImport::~KSpreadKexiImport() //============================================================================= -KoFilter::ConversionStatus KSpreadKexiImport::convert( const QCString& from, const QCString& to ) +KoFilter::ConversiontqStatus KSpreadKexiImport::convert( const TQCString& from, const TQCString& to ) { - QPtrList objects; - QString file( m_chain->inputFile() ); + TQPtrList objects; + TQString file( m_chain->inputFile() ); //Create dialog m_dialog = new KSpreadKexiImportDialog(); @@ -99,7 +99,7 @@ KoFilter::ConversionStatus KSpreadKexiImport::convert( const QCString& from, con kdDebug() << "here we go... " << document->className() << endl; - if ( !::qt_cast( document ) ) + if ( !::tqqt_cast( document ) ) { kdWarning() << "document isn't a KSpread::Doc but a " << document->className() << endl; return KoFilter::NotImplemented; @@ -120,7 +120,7 @@ KoFilter::ConversionStatus KSpreadKexiImport::convert( const QCString& from, con document->emitBeginOperation(); - QListViewItem *itm; + TQListViewItem *itm; for(itm = objects.first(); itm ; itm = objects.next()) { if (!insertObject(itm->text(1), itm->text(0))) @@ -141,9 +141,9 @@ KoFilter::ConversionStatus KSpreadKexiImport::convert( const QCString& from, con return KoFilter::OK; } -bool KSpreadKexiImport::insertObject(const QString& object, const QString& type) +bool KSpreadKexiImport::insertObject(const TQString& object, const TQString& type) { - QStringList fieldNames; + TQStringList fieldNames; KSpread::Sheet *sheet; KexiDB::Parser *parser; KexiDB::QuerySchema *query; @@ -189,13 +189,13 @@ bool KSpreadKexiImport::insertObject(const QString& object, const QString& type) } //Insert the field headings - QStringList::iterator it; + TQStringList::iterator it; int i = 1; for (it = fieldNames.begin(); it != fieldNames.end(); ++it, ++i) { KSpread::Cell *c = sheet->nonDefaultCell(i ,1); c->setCellText(*it, true); - c->format()->setBgColor(QColor(200,200,200)); + c->format()->setBgColor(TQColor(200,200,200)); c->format()->setTextFontBold(true); } diff --git a/filters/kspread/kexi/kspread_kexiimport.h b/filters/kspread/kexi/kspread_kexiimport.h index 8c03473f..7da8d20f 100644 --- a/filters/kspread/kexi/kspread_kexiimport.h +++ b/filters/kspread/kexi/kspread_kexiimport.h @@ -58,6 +58,7 @@ class KSpreadKexiImportDialog; class KSpreadKexiImport : public KoFilter { Q_OBJECT + TQ_OBJECT protected: @@ -68,18 +69,18 @@ class KSpreadKexiImport : public KoFilter /** * Constructor. This constructor is usable with KGenericFactory. */ - KSpreadKexiImport(KoFilter *parent, const char *name, const QStringList&); + KSpreadKexiImport(KoFilter *tqparent, const char *name, const TQStringList&); /** * Virtual destructor. */ virtual ~KSpreadKexiImport(); - virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to ); private: KSpread::Doc *ksdoc; - bool insertObject(const QString&,const QString&); + bool insertObject(const TQString&,const TQString&); }; #endif diff --git a/filters/kspread/kexi/kspread_kexiimportdialog.cc b/filters/kspread/kexi/kspread_kexiimportdialog.cc index 1c2a912a..9d30ee38 100644 --- a/filters/kspread/kexi/kspread_kexiimportdialog.cc +++ b/filters/kspread/kexi/kspread_kexiimportdialog.cc @@ -34,9 +34,9 @@ #include #include #include -#include -#include -#include +#include +#include +#include #include //Kexi Includes @@ -54,15 +54,15 @@ /** * Constructor - * @param parent Pointer to kspread view + * @param tqparent Pointer to kspread view * @param name Name of the dialog * @return None */ - KSpreadKexiImportDialog::KSpreadKexiImportDialog(QWidget* parent, const char* name) - : KSpreadKexiImportDialogBase(parent,name) + KSpreadKexiImportDialog::KSpreadKexiImportDialog(TQWidget* tqparent, const char* name) + : KSpreadKexiImportDialogBase(tqparent,name) { - connect(this->m_insertButton,SIGNAL(clicked()),this,SLOT(accept())); - connect(this->m_cancelButton,SIGNAL(clicked()),this,SLOT(reject())); + connect(this->m_insertButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(accept())); + connect(this->m_cancelButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(reject())); } /** @@ -78,7 +78,7 @@ KSpreadKexiImportDialog::~KSpreadKexiImportDialog() void KSpreadKexiImportDialog::accept() { kdDebug() << "insert kexi data dialog accepted (insert button clicked)" << endl; - done(QDialog::Accepted); + done(TQDialog::Accepted); emit insertKexi(); } @@ -88,7 +88,7 @@ void KSpreadKexiImportDialog::accept() void KSpreadKexiImportDialog::reject() { kdDebug() << "insert kexi data dialog rejected (cancel button clicked)" << endl; - done(QDialog::Rejected); + done(TQDialog::Rejected); } /** @@ -96,7 +96,7 @@ void KSpreadKexiImportDialog::reject() * @param fileName name of file to open if cdata is null * @param cdata connection data to server based database...not implemented though */ -void KSpreadKexiImportDialog::openDatabase( QString fileName , KexiDB::ConnectionData *cdata) +void KSpreadKexiImportDialog::openDatabase( TQString fileName , KexiDB::ConnectionData *cdata) { kdDebug() << "openDatabase" << endl; KexiDB::Driver *dr; @@ -163,8 +163,8 @@ void KSpreadKexiImportDialog::openDatabase( QString fileName , KexiDB::Connectio */ void KSpreadKexiImportDialog::populateTables() { - QValueList tids; - QValueList qids; + TQValueList tids; + TQValueList qids; kdDebug() << "Getting Tables and Queries" << endl; tids = conn->objectIds(KexiDB::TableObjectType); @@ -172,7 +172,7 @@ void KSpreadKexiImportDialog::populateTables() kdDebug() << qids.count() << " queries " << tids.count() << " tables" << endl; - QValueList::iterator it; + TQValueList::iterator it; for ( it = tids.begin(); it != tids.end(); ++it ) { @@ -198,15 +198,15 @@ void KSpreadKexiImportDialog::populateTables() * * @return the custom query that has been entered */ -QString KSpreadKexiImportDialog::customQueryString() +TQString KSpreadKexiImportDialog::customQueryString() { return m_CustomQueryText->text(); } -QPtrList KSpreadKexiImportDialog::selectedItems() +TQPtrList KSpreadKexiImportDialog::selectedItems() { - QPtrList lst; - QListViewItemIterator it( m_sourceList ); + TQPtrList lst; + TQListViewItemIterator it( m_sourceList ); while ( it.current() ) { if ( it.current()->isSelected() ) diff --git a/filters/kspread/kexi/kspread_kexiimportdialog.h b/filters/kspread/kexi/kspread_kexiimportdialog.h index 12b7a740..81948f34 100644 --- a/filters/kspread/kexi/kspread_kexiimportdialog.h +++ b/filters/kspread/kexi/kspread_kexiimportdialog.h @@ -51,6 +51,7 @@ class KListViewItem; class KSpreadKexiImportDialog : public KSpreadKexiImportDialogBase { Q_OBJECT + TQ_OBJECT private: @@ -67,46 +68,46 @@ public: * The dates in the dialog initialize to a complete calendar for the * current month. */ - KSpreadKexiImportDialog(QWidget* parent = 0, const char* name = 0); + KSpreadKexiImportDialog(TQWidget* tqparent = 0, const char* name = 0); /** * Virtual destructor. */ virtual ~KSpreadKexiImportDialog(); - void openDatabase(QString,KexiDB::ConnectionData *cdata); + void openDatabase(TQString,KexiDB::ConnectionData *cdata); KexiDB::Connection *connection() { return conn; }; bool customQuery(); - QString customQueryString(); + TQString customQueryString(); int conversion(); //1: kspread 2: text ..... possibly add more option - QPtrList selectedItems(); + TQPtrList selectedItems(); protected slots: /** - * This slot is reimplemented from QDialog and + * This slot is reimplemented from TQDialog and * is connected to the insert button. * It also emits a insertCalendar signal. * * The dialog is closed (not deleted) when * this slot is called. * - * @see insertCalendar, reject, QDialog::done + * @see insertCalendar, reject, TQDialog::done */ virtual void accept(); /** - * This slot is reimplemented from QDialog and + * This slot is reimplemented from TQDialog and * is connected to the cancel button. * * The dialog is closed (not deleted) when * this slot is called. * - * @see accept, QDialog::done + * @see accept, TQDialog::done */ virtual void reject(); diff --git a/filters/kspread/kexi/kspread_kexiimportdialogbase.ui b/filters/kspread/kexi/kspread_kexiimportdialogbase.ui index ad9756ef..043e3ce6 100644 --- a/filters/kspread/kexi/kspread_kexiimportdialogbase.ui +++ b/filters/kspread/kexi/kspread_kexiimportdialogbase.ui @@ -1,6 +1,6 @@ KSpreadKexiImportDialogBase - + KSpreadKexiImportDialogBase @@ -26,22 +26,22 @@ unnamed - + splitter4 Horizontal - + - layout5 + tqlayout5 unnamed - + textLabel1 @@ -85,7 +85,7 @@ true - + m_customQueryCheck @@ -93,7 +93,7 @@ Custom quer&y - + m_CustomQueryText @@ -108,15 +108,15 @@ - + - layout8 + tqlayout8 unnamed - + textLabel1_2 @@ -132,7 +132,7 @@ Data Conversion - + m_convGroup @@ -151,7 +151,7 @@ unnamed - + m_convKSRadio @@ -162,7 +162,7 @@ true - + m_convTextRadio @@ -178,9 +178,9 @@ - + - layout4 + tqlayout4 @@ -196,14 +196,14 @@ Expanding - + 145 0 - + m_insertButton @@ -219,7 +219,7 @@ What's this for the insert button of the insert calendar plugin - + m_cancelButton @@ -237,7 +237,7 @@ - + klistview.h diff --git a/filters/kspread/latex/export/cell.cc b/filters/kspread/latex/export/cell.cc index 81e2e7fd..74eb95bb 100644 --- a/filters/kspread/latex/export/cell.cc +++ b/filters/kspread/latex/export/cell.cc @@ -44,7 +44,7 @@ Cell::~Cell() { } -void Cell::analyse(const QDomNode balise) +void Cell::analyse(const TQDomNode balise) { _row = getAttr(balise, "row").toLong(); _col = getAttr(balise, "column").toLong(); @@ -53,7 +53,7 @@ void Cell::analyse(const QDomNode balise) analyseText(balise); } -void Cell::analyseText(const QDomNode balise) +void Cell::analyseText(const TQDomNode balise) { setTextDataType( getAttr(getChild(balise, "text"), "dataType")); setText(getData(balise, "text")); @@ -63,7 +63,7 @@ void Cell::analyseText(const QDomNode balise) /*******************************************/ /* generate */ /*******************************************/ -void Cell::generate(QTextStream& out, Table* table) +void Cell::generate(TQTextStream& out, Table* table) { /*if(getMulticol() > 0) out << "\\multicol{" << getMulticol() << "}{"; diff --git a/filters/kspread/latex/export/cell.h b/filters/kspread/latex/export/cell.h index 96482978..fadf30a1 100644 --- a/filters/kspread/latex/export/cell.h +++ b/filters/kspread/latex/export/cell.h @@ -21,7 +21,7 @@ #ifndef __KSPREAD_LATEX_CELL_H__ #define __KSPREAD_LATEX_CELL_H__ -#include +#include #include "config.h" #include "format.h" @@ -43,10 +43,10 @@ class Cell: public Format /* USEFULL DATA */ long _row; long _col; - QString _text; - QString _textDataType; - QString _result; - QString _resultDataType; + TQString _text; + TQString _textDataType; + TQString _result; + TQString _resultDataType; public: @@ -78,26 +78,26 @@ class Cell: public Format long getRow() const { return _row; } long getCol() const { return _col; } - QString getText() const { return _text; } - QString getTextDataType() const { return _textDataType; } - QString getResult() const { return _result; } - QString getResultDataType() const { return _resultDataType; } + TQString getText() const { return _text; } + TQString getTextDataType() const { return _textDataType; } + TQString getResult() const { return _result; } + TQString getResultDataType() const { return _resultDataType; } /* ==== setters ==== */ void setRow(int r) { _row = r; } void setCol(int c) { _col = c; } - void setText(QString text) { _text = text; } - void setTextDataType(QString dt) { _textDataType = dt; } - void setResult(QString result) { _result = result; } - void setResultDataType(QString dt) { _resultDataType = dt; } + void setText(TQString text) { _text = text; } + void setTextDataType(TQString dt) { _textDataType = dt; } + void setResult(TQString result) { _result = result; } + void setResultDataType(TQString dt) { _resultDataType = dt; } /** * Helpfull functions */ - void analyse (const QDomNode); - void analyseText (const QDomNode); - void analyseResult (const QDomNode); - void generate (QTextStream&, Table*); + void analyse (const TQDomNode); + void analyseText (const TQDomNode); + void analyseResult (const TQDomNode); + void generate (TQTextStream&, Table*); private: diff --git a/filters/kspread/latex/export/column.cc b/filters/kspread/latex/export/column.cc index 198f7595..fece8cb8 100644 --- a/filters/kspread/latex/export/column.cc +++ b/filters/kspread/latex/export/column.cc @@ -38,7 +38,7 @@ Column::~Column() { } -void Column::analyse(const QDomNode balise) +void Column::analyse(const TQDomNode balise) { _col = getAttr(balise, "column").toLong(); _width = getAttr(balise, "width").toDouble(); @@ -48,7 +48,7 @@ void Column::analyse(const QDomNode balise) /*******************************************/ /* generate */ /*******************************************/ -void Column::generate(QTextStream& out) +void Column::generate(TQTextStream& out) { //generateLeftBorder(out); if(getBrushStyle() >= 1) diff --git a/filters/kspread/latex/export/column.h b/filters/kspread/latex/export/column.h index 41b6386b..a591cc77 100644 --- a/filters/kspread/latex/export/column.h +++ b/filters/kspread/latex/export/column.h @@ -21,7 +21,7 @@ #ifndef __KSPREAD_LATEX_COLUMN_H__ #define __KSPREAD_LATEX_COLUMN_H__ -#include +#include #include "config.h" #include "format.h" @@ -76,8 +76,8 @@ class Column: public Format /** * Helpfull functions */ - void analyse (const QDomNode); - void generate (QTextStream&); + void analyse (const TQDomNode); + void generate (TQTextStream&); private: diff --git a/filters/kspread/latex/export/config.cc b/filters/kspread/latex/export/config.cc index a79296ca..8460aae4 100644 --- a/filters/kspread/latex/export/config.cc +++ b/filters/kspread/latex/export/config.cc @@ -76,7 +76,7 @@ void Config::desindent() } } -void Config::writeIndent(QTextStream& out) +void Config::writeIndent(TQTextStream& out) { for(int index = 0; index < _tabulation; index++) { diff --git a/filters/kspread/latex/export/config.h b/filters/kspread/latex/export/config.h index 05eba575..6e35bd1c 100644 --- a/filters/kspread/latex/export/config.h +++ b/filters/kspread/latex/export/config.h @@ -22,8 +22,8 @@ #ifndef __LATEX_CONFIG_H__ #define __LATEX_CONFIG_H__ -#include -#include +#include +#include /***********************************************************************/ /* Class: Config */ @@ -39,20 +39,20 @@ class Config /* Document tab */ bool _useLatexStyle; bool _isEmbeded; - QString _class; - QString _quality; + TQString _class; + TQString _quality; unsigned int _defaultFontSize; /* Pictures tab */ bool _convertPictures; - QString _picturesDir; + TQString _picturesDir; /* Language tab */ //bool _useUnicode; //bool _useLatin1; - QString _encoding; - QStringList _languagesList; - QString _defaultLanguage; + TQString _encoding; + TQStringList _languagesList; + TQString _defaultLanguage; int _tabSize; /* Size of the para indentation. */ int _tabulation; /* Total size of the indentation. */ @@ -77,18 +77,18 @@ class Config */ bool isKwordStyleUsed() const { return (_useLatexStyle == false); } bool isEmbeded() const { return _isEmbeded; } - QString getClass() const { return _class; } - QString getQuality() const { return _quality; } + TQString getClass() const { return _class; } + TQString getQuality() const { return _quality; } unsigned int getDefaultFontSize() const { return _defaultFontSize; } bool convertPictures() const { return _convertPictures; } - QString getPicturesDir() const { return _picturesDir; } + TQString getPicturesDir() const { return _picturesDir; } - bool mustUseUnicode() const { return (_encoding == "unicode"); } - bool mustUseLatin1() const { return (_encoding != "unicode"); } - QString getEncoding() const { return _encoding; } - QStringList getLanguagesList() const { return _languagesList; } - QString getDefaultLanguage() const { return _defaultLanguage; } + bool mustUseUnicode() const { return (_encoding == "tqunicode"); } + bool mustUseLatin1() const { return (_encoding != "tqunicode"); } + TQString getEncoding() const { return _encoding; } + TQStringList getLanguagesList() const { return _languagesList; } + TQString getDefaultLanguage() const { return _defaultLanguage; } int getTabSize() const { return _tabSize; } int getIndentation() const { return _tabulation; } @@ -110,16 +110,16 @@ class Config void setEmbeded(bool emb) { _isEmbeded = emb; } /** The class can be article, book, letter, report or slides. It's the type of the * latex document. */ - void setClass(const QString &lclass) { _class = lclass; } - void setQuality(const QString &quality) { _quality = quality; } + void setClass(const TQString &lclass) { _class = lclass; } + void setQuality(const TQString &quality) { _quality = quality; } void setDefaultFontSize(int size) { _defaultFontSize = size; } void convertPictures(bool state) { _convertPictures = state; } - void setPicturesDir(const QString &dir) { _picturesDir = dir; } + void setPicturesDir(const TQString &dir) { _picturesDir = dir; } - void setEncoding(const QString &enc) { _encoding = enc; } - void addLanguage( const QString &l) { _languagesList.append(l); } - void setDefaultLanguage(const QString &l) { _defaultLanguage = l; } + void setEncoding(const TQString &enc) { _encoding = enc; } + void addLanguage( const TQString &l) { _languagesList.append(l); } + void setDefaultLanguage(const TQString &l) { _defaultLanguage = l; } void setIndentation(int indent) { _tabulation = indent; } @@ -127,7 +127,7 @@ class Config void indent(); void desindent(); - void writeIndent(QTextStream& out); + void writeIndent(TQTextStream& out); protected: /** diff --git a/filters/kspread/latex/export/document.cc b/filters/kspread/latex/export/document.cc index a992af2b..45cdbb73 100644 --- a/filters/kspread/latex/export/document.cc +++ b/filters/kspread/latex/export/document.cc @@ -25,7 +25,7 @@ #include "document.h" -Document::Document(const KoStore* in, QString fileOut): +Document::Document(const KoStore* in, TQString fileOut): XmlParser(in), _file(fileOut), _in( in ) { //kdDebug(30522) << fileIn.latin1() << endl; @@ -44,7 +44,7 @@ Document::~Document() void Document::analyse() { - QDomNode balise; + TQDomNode balise; balise = init(); kdDebug(30522) << "ANALYSE A DOC" << endl; _document.analyse(balise); @@ -56,7 +56,7 @@ void Document::generate() if(_file.open(IO_WriteOnly)) { kdDebug(30522) << "GENERATION" << endl; - _out.setDevice(&_file); + _out.setDevice(TQT_TQIODEVICE(&_file)); _document.generate(_out, !isEmbeded()); //_out << getDocument(); _file.close(); diff --git a/filters/kspread/latex/export/document.h b/filters/kspread/latex/export/document.h index cbe53087..b8f0296c 100644 --- a/filters/kspread/latex/export/document.h +++ b/filters/kspread/latex/export/document.h @@ -23,9 +23,9 @@ #ifndef __KSPREAD_LATEX_DOCUMENT_H__ #define __KSPREAD_LATEX_DOCUMENT_H__ -#include /* for QFile class */ -#include /* for QTextStream class */ -#include /* for QString class */ +#include /* for TQFile class */ +#include /* for TQTextStream class */ +#include /* for TQString class */ #include "xmlparser.h" #include "config.h" @@ -33,9 +33,9 @@ class Document : public XmlParser, Config { - QFile _file; - QTextStream _out; - QString _filename; + TQFile _file; + TQTextStream _out; + TQString _filename; const KoStore* _in; //FileHeader _header; @@ -49,7 +49,7 @@ class Document : public XmlParser, Config * @param in tar file. * @param fileOut Output latex filename. */ - Document(const KoStore* in, QString fileOut); + Document(const KoStore* in, TQString fileOut); virtual ~Document(); diff --git a/filters/kspread/latex/export/fileheader.cc b/filters/kspread/latex/export/fileheader.cc index 57d30fed..8ee9eee0 100644 --- a/filters/kspread/latex/export/fileheader.cc +++ b/filters/kspread/latex/export/fileheader.cc @@ -56,7 +56,7 @@ FileHeader::~FileHeader() /*******************************************/ /* AnalysePaperParam */ /*******************************************/ -void FileHeader::analysePaperParam(const QDomNode balise) +void FileHeader::analysePaperParam(const TQDomNode balise) { setFormat(getAttr(balise, "format").toInt()); _width = getAttr(balise, "width").toInt(); @@ -74,13 +74,13 @@ void FileHeader::analysePaperParam(const QDomNode balise) /*******************************************/ /* AnalysePaper */ /*******************************************/ -void FileHeader::analysePaper(const QDomNode balise) +void FileHeader::analysePaper(const TQDomNode balise) { analysePaperParam(balise); //setTokenCurrent(balise_initiale->pContent); - // Analyse children markups --> PAPERBORDERS - QDomNode fils = getChild(balise, "PAPERSBORDERS"); + // Analyse tqchildren markups --> PAPERBORDERS + TQDomNode fils = getChild(balise, "PAPERSBORDERS"); _leftBorder = getAttr(fils, "left").toInt(); _rightBorder = getAttr(fils, "right").toInt(); _bottomBorder = getAttr(fils, "bottom").toInt(); @@ -90,7 +90,7 @@ void FileHeader::analysePaper(const QDomNode balise) /*******************************************/ /* AnalyseAttributs */ /*******************************************/ -void FileHeader::analyseAttributs(const QDomNode balise) +void FileHeader::analyseAttributs(const TQDomNode balise) { setProcessing(getAttr(balise, "processing").toInt()); setStandardPge(getAttr(balise, "standardpage").toInt()); @@ -103,7 +103,7 @@ void FileHeader::analyseAttributs(const QDomNode balise) /*******************************************/ /* Generate */ /*******************************************/ -void FileHeader::generate(QTextStream &out) +void FileHeader::generate(TQTextStream &out) { kdDebug(30522) << "GENERATION OF THE FILE HEADER" << endl; if(Config::instance()->mustUseLatin1()) @@ -120,9 +120,9 @@ void FileHeader::generate(QTextStream &out) /*******************************************/ /* GeneratePaper */ /*******************************************/ -void FileHeader::generatePaper(QTextStream &out) +void FileHeader::generatePaper(TQTextStream &out) { - QString unit; + TQString unit; out << "% Format of paper" << endl; kdDebug(30522) << "Generate custom size paper" << endl; @@ -141,7 +141,7 @@ void FileHeader::generatePaper(QTextStream &out) /*******************************************/ /* GenerateLatinPreambule */ /*******************************************/ -void FileHeader::generateLatinPreambule(QTextStream &out) +void FileHeader::generateLatinPreambule(TQTextStream &out) { out << "%% Generated by KSpread. Don't modify this file but the file *.ksp." << endl; out << "%% Send an email to rjacolin@ifrance.com for bugs, wishes, .... Thank you." << endl; @@ -207,7 +207,7 @@ void FileHeader::generateLatinPreambule(QTextStream &out) /*******************************************/ /* GenerateUnicodePreambule */ /*******************************************/ -void FileHeader::generateUnicodePreambule(QTextStream &out) +void FileHeader::generateUnicodePreambule(TQTextStream &out) { out << "%% Generated by KSpread. Don't modify this file but the file *.ksp." << endl; out << "%% Send an email to rjacolin@ifrance.com for bugs, wishes, .... Thank you." << endl; @@ -276,13 +276,13 @@ void FileHeader::generateUnicodePreambule(QTextStream &out) /*******************************************/ /* GeneratePackage */ /*******************************************/ -void FileHeader::generatePackage(QTextStream &out) +void FileHeader::generatePackage(TQTextStream &out) { out << "% Package(s) to include" << endl; if(Config::instance()->mustUseUnicode()) out << "\\usepackage{omega}" << endl; if(getFormat() == TF_A4) - out << "\\usepackage[a4paper]{geometry}" << endl; + out << "\\usepackage[a4paper]{tqgeometry}" << endl; if(hasFooter() || hasHeader()) out << "\\usepackage{fancyhdr}" << endl; if(hasColor()) @@ -298,7 +298,7 @@ void FileHeader::generatePackage(QTextStream &out) out << "\\usepackage{textcomp}" << endl; out << "\\usepackage{rotating}" << endl; out << endl; - QStringList langs = Config::instance()->getLanguagesList(); + TQStringList langs = Config::instance()->getLanguagesList(); if(langs.count() > 0) { out << "\\usepackage[" << langs.join( ", " ) << "]{babel}" << endl; diff --git a/filters/kspread/latex/export/fileheader.h b/filters/kspread/latex/export/fileheader.h index e5f5b51a..5c4e7774 100644 --- a/filters/kspread/latex/export/fileheader.h +++ b/filters/kspread/latex/export/fileheader.h @@ -22,7 +22,7 @@ #ifndef __KSPREAD_LATEX_FILEHEADER_H__ #define __KSPREAD_LATEX_FILEHEADER_H__ -#include +#include #include "xmlparser.h" @@ -134,10 +134,10 @@ class FileHeader: public XmlParser void useGraphics () { _hasGraphics = true; } void useTable () { _hasTable = true; } - void analysePaper (const QDomNode); - void analyseAttributs (const QDomNode); + void analysePaper (const TQDomNode); + void analyseAttributs (const TQDomNode); - void generate (QTextStream &); + void generate (TQTextStream &); protected: /** @@ -149,12 +149,12 @@ class FileHeader: public XmlParser private: - void analysePaperParam(const QDomNode); + void analysePaperParam(const TQDomNode); - void generatePaper (QTextStream&); - void generateLatinPreambule(QTextStream&); - void generateUnicodePreambule(QTextStream&); - void generatePackage (QTextStream&); + void generatePaper (TQTextStream&); + void generateLatinPreambule(TQTextStream&); + void generateUnicodePreambule(TQTextStream&); + void generatePackage (TQTextStream&); }; diff --git a/filters/kspread/latex/export/format.cc b/filters/kspread/latex/export/format.cc index 473c63b4..96f2ad08 100644 --- a/filters/kspread/latex/export/format.cc +++ b/filters/kspread/latex/export/format.cc @@ -80,7 +80,7 @@ bool Format::hasRightBorder() const } /* Get the set of info. about a text format */ -void Format::analyse(const QDomNode balise) +void Format::analyse(const TQDomNode balise) { /* */ if( !getAttr(balise, "brushstyle").isEmpty() ) @@ -125,7 +125,7 @@ void Format::analyse(const QDomNode balise) } } -void Format::analysePen(const QDomNode balise) +void Format::analysePen(const TQDomNode balise) { /* */ _isValidFormat = true; @@ -134,7 +134,7 @@ void Format::analysePen(const QDomNode balise) setPenColor(getAttr(balise, "color")); } -void Format::analyseFont(const QDomNode balise) +void Format::analyseFont(const TQDomNode balise) { /* */ setFontSize(getAttr(balise, "size").toInt()); @@ -142,7 +142,7 @@ void Format::analyseFont(const QDomNode balise) setFontWeight(getAttr(balise, "weight").toInt()); } -void Format::generate(QTextStream& out, Column* col, Row* row) +void Format::generate(TQTextStream& out, Column* col, Row* row) { if(hasLeftBorder()) out << "|"; @@ -176,7 +176,7 @@ void Format::generate(QTextStream& out, Column* col, Row* row) out << "|"; } -void Format::generateTextFormat(QTextStream& out, QString text) +void Format::generateTextFormat(TQTextStream& out, TQString text) { if(getPenStyle() > 0) { @@ -189,7 +189,7 @@ void Format::generateTextFormat(QTextStream& out, QString text) } } -void Format::generateColor(QTextStream& out) +void Format::generateColor(TQTextStream& out) { if(getBrushStyle() >= 1) { diff --git a/filters/kspread/latex/export/format.h b/filters/kspread/latex/export/format.h index 5eb94eef..c0ab61aa 100644 --- a/filters/kspread/latex/export/format.h +++ b/filters/kspread/latex/export/format.h @@ -23,9 +23,9 @@ #ifndef __KSPREAD_LATEX_FORMAT_H__ #define __KSPREAD_LATEX_FORMAT_H__ -#include -#include -#include +#include +#include +#include #include "xmlparser.h" #include "pen.h" @@ -43,11 +43,11 @@ class Format: public XmlParser { long _align; long _alignY; - QColor _bgColor; + TQColor _bgColor; long _multirow; bool _verticalText; double _angle; - QColor _brushColor; + TQColor _brushColor; int _brushStyle; int _indent; bool _dontprinttext; @@ -55,11 +55,11 @@ class Format: public XmlParser /* pen */ double _penWidth; int _penStyle; - QColor _penColor; + TQColor _penColor; /* font */ int _size; - QString _family; + TQString _family; int _weight; /* borders */ @@ -77,7 +77,7 @@ class Format: public XmlParser * * Creates a new instance of Format. * - * @param Para the parent class of the format. + * @param Para the tqparent class of the format. */ Format(); @@ -94,10 +94,10 @@ class Format: public XmlParser long getMultirow() const { return _multirow; } long getAlign() const { return _align; } long getAlignY() const { return _alignY; } - QColor getBgColor() const { return _bgColor; } + TQColor getBgColor() const { return _bgColor; } bool getVerticalText() const { return _verticalText; } double getAngle() const { return _angle; } - QColor getBrushColor() const { return _brushColor; } + TQColor getBrushColor() const { return _brushColor; } int getBrushStyle() const { return _brushStyle; } int getIndent() const { return _indent; } bool getDontPrintText() const { return _dontprinttext; } @@ -115,11 +115,11 @@ class Format: public XmlParser /* pen */ double getPenWidth() const { return _penWidth; } int getPenStyle() const { return _penStyle; } - QColor getPenColor() const { return _penColor; } + TQColor getPenColor() const { return _penColor; } /* font */ int getFontSize() const { return _size; } - QString getFontFamily() const { return _family; } + TQString getFontFamily() const { return _family; } int getFontWeight() const { return _weight; } bool isValidFormat() const { return _isValidFormat; } @@ -128,11 +128,11 @@ class Format: public XmlParser */ void setAlign(long a) { _align = a; } void setAlignY(long a) { _alignY = a; } - void setBgColor(QColor b) { _bgColor = b; } + void setBgColor(TQColor b) { _bgColor = b; } void setMultirow(long mr) { _multirow = mr; } void setVerticalText(bool vt) { _verticalText = vt; } void setAngle(double a) { _angle = a; } - void setBrushColor(QString bc) { _brushColor.setNamedColor(bc); } + void setBrushColor(TQString bc) { _brushColor.setNamedColor(bc); } void setBrushStyle(int bs) { _brushStyle = bs; } void setIndent(int indent) { _indent = indent; } void setDontPrintText(bool dpt) { _dontprinttext = dpt; } @@ -140,11 +140,11 @@ class Format: public XmlParser /* pen */ void setPenWidth(double pw) { _penWidth = pw; } void setPenStyle(int ps) { _penStyle = ps; } - void setPenColor(QString pc) { _penColor.setNamedColor(pc); } + void setPenColor(TQString pc) { _penColor.setNamedColor(pc); } /* font */ void setFontSize(int s) { _size = s; } - void setFontFamily(QString f) { _family = f; } + void setFontFamily(TQString f) { _family = f; } void setFontWeight(int w) { _weight = w; } /** @@ -154,9 +154,9 @@ class Format: public XmlParser /** * Get informations from a markup tree (only param of a format). */ - virtual void analyse(const QDomNode); - virtual void analysePen(const QDomNode); - virtual void analyseFont(const QDomNode); + virtual void analyse(const TQDomNode); + virtual void analysePen(const TQDomNode); + virtual void analyseFont(const TQDomNode); /** * Generate the cell format inherited from the row or the colum format or @@ -166,12 +166,12 @@ class Format: public XmlParser * @param col The column of this cell. * @param row The row of this cell. */ - void generate(QTextStream& out, Column* col = NULL, Row* row = NULL); + void generate(TQTextStream& out, Column* col = NULL, Row* row = NULL); /** * Generate the text cell format (color and font). */ - void generateTextFormat(QTextStream& out, QString text); + void generateTextFormat(TQTextStream& out, TQString text); /** * Generate the color format for a column or a row. @@ -180,7 +180,7 @@ class Format: public XmlParser * * @param out The output stream */ - void generateColor(QTextStream& out); + void generateColor(TQTextStream& out); }; #endif /* __KSPREAD_LATEX_FORMAT_H__ */ diff --git a/filters/kspread/latex/export/formula.cc b/filters/kspread/latex/export/formula.cc index 15a0af93..98af4251 100644 --- a/filters/kspread/latex/export/formula.cc +++ b/filters/kspread/latex/export/formula.cc @@ -21,8 +21,8 @@ #include /* for atoi function */ #include /* for kdDebug() stream */ -#include /* for getFormula() */ -#include +#include /* for getFormula() */ +#include #include "formula.h" #include @@ -48,7 +48,7 @@ Formula::Formula() /*******************************************/ /* analyse */ /*******************************************/ -void Formula::analyse(const QDomNode balise) +void Formula::analyse(const TQDomNode balise) { /* MARKUP TYPE : FRAMESET INFO = TEXTE, ENTETE CONNUE */ @@ -80,14 +80,14 @@ void Formula::analyse(const QDomNode balise) /*******************************************/ /* Get back the xml markup tree. */ /*******************************************/ -void Formula::getFormula(QDomNode p, int indent) +void Formula::getFormula(TQDomNode p, int indent) { /* while( p.) {*/ switch( p.nodeType() ) { - case QDomNode::TextNode: - _formula = _formula + QString(p.toText().data()) + " "; + case TQDomNode::TextNode: + _formula = _formula + TQString(p.toText().data()) + " "; break; /* case TT_Space: _formula = _formula + p->zText; @@ -97,9 +97,9 @@ void Formula::getFormula(QDomNode p, int indent) _formula = _formula + "\n"; //printf("%*s\n", indent, ""); break;*/ - case QDomNode::ElementNode: + case TQDomNode::ElementNode: _formula = _formula + "<" + p.nodeName(); - QDomNamedNodeMap attr = p.attributes(); + TQDomNamedNodeMap attr = p.attributes(); for(unsigned int index = 0; index < attr.length(); index++) { // The attributes _formula = _formula + " " + attr.item(index).nodeName(); @@ -110,7 +110,7 @@ void Formula::getFormula(QDomNode p, int indent) else { _formula = _formula + ">\n"; - QDomNodeList child = p.childNodes(); + TQDomNodeList child = p.childNodes(); for(unsigned int index = 0; index < child.length(); index++) { getFormula(child.item(index), indent+3); // The child elements @@ -129,7 +129,7 @@ void Formula::getFormula(QDomNode p, int indent) /*******************************************/ /* analyseParamFrame */ /*******************************************/ -void Formula::analyseParamFrame(const QDomNode balise) +void Formula::analyseParamFrame(const TQDomNode balise) { /**/ @@ -147,10 +147,10 @@ void Formula::analyseParamFrame(const QDomNode balise) /*******************************************/ /* generate */ /*******************************************/ -void Formula::generate(QTextStream &out) +void Formula::generate(TQTextStream &out) { kdDebug(30522) << "FORMULA GENERATION" << endl; - QDomDocument doc; + TQDomDocument doc; doc.setContent(_formula); // a new KFormula::Document for every formula is not the best idea. diff --git a/filters/kspread/latex/export/formula.h b/filters/kspread/latex/export/formula.h index bc6dcfed..03ba4bd6 100644 --- a/filters/kspread/latex/export/formula.h +++ b/filters/kspread/latex/export/formula.h @@ -24,8 +24,8 @@ #define __KWORD_LATEXFORMULA__ #include "element.h" -#include -#include +#include +#include /***********************************************************************/ /* Class: Formula */ @@ -49,7 +49,7 @@ class Formula: public Element TSide _sheetSide; /* CHILDREN MARKUPS */ - QString _formula; + TQString _formula; public: /** @@ -78,7 +78,7 @@ class Formula: public Element TNFrame getNewFrame () const { return _newFrameBehaviour; } TSide getSheetSide () const { return _sheetSide; } - void getFormula(QDomNode, int); + void getFormula(TQDomNode, int); /** * Modifiers @@ -95,17 +95,17 @@ class Formula: public Element /** * Get informations from a markup tree and put the formula - * in a QString. + * in a TQString. */ - void analyse(const QDomNode); + void analyse(const TQDomNode); /** * Write the formula in a file. */ - void generate(QTextStream&); + void generate(TQTextStream&); private: - void analyseParamFrame(const QDomNode); + void analyseParamFrame(const TQDomNode); }; #endif /* __KWORD_LATEXFORMULA_H__ */ diff --git a/filters/kspread/latex/export/kspreadlatexexportdiaImpl.cc b/filters/kspread/latex/export/kspreadlatexexportdiaImpl.cc index 050c86ba..479bb547 100644 --- a/filters/kspread/latex/export/kspreadlatexexportdiaImpl.cc +++ b/filters/kspread/latex/export/kspreadlatexexportdiaImpl.cc @@ -20,11 +20,11 @@ #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -49,15 +49,15 @@ #endif*/ /* - * Constructs a KSpreadLatexExportDiaImpl which is a child of 'parent', with the + * Constructs a KSpreadLatexExportDiaImpl which is a child of 'tqparent', with the * name 'name' and widget flags set to 'f'. * * The dialog will by default be modeless, unless you set 'modal' to * TRUE to construct a modal dialog. */ -KSpreadLatexExportDiaImpl::KSpreadLatexExportDiaImpl(KoStore* in, QWidget* parent, +KSpreadLatexExportDiaImpl::KSpreadLatexExportDiaImpl(KoStore* in, TQWidget* tqparent, const char* name_, bool modal, WFlags fl ) - : LatexExportDia( parent, name_, modal, fl ), _in( in ) + : LatexExportDia( tqparent, name_, modal, fl ), _in( in ) { int i = 0; @@ -66,10 +66,10 @@ KSpreadLatexExportDiaImpl::KSpreadLatexExportDiaImpl(KoStore* in, QWidget* paren /* Recent files */ _config = new KConfig("kspreadlatexexportdialog"); _config->setGroup( "KSpread latex export filter" ); - QString value; + TQString value; while(i < 10) { - /*value = _config->readPathEntry( QString("Recent%1").arg(i) ); + /*value = _config->readPathEntry( TQString("Recent%1").tqarg(i) ); kdDebug(30522) << "recent : " << value << endl; if(!value.isEmpty()) { @@ -99,7 +99,7 @@ KSpreadLatexExportDiaImpl::KSpreadLatexExportDiaImpl(KoStore* in, QWidget* paren classComboBox->insertItem("report"); classComboBox->insertItem("slides"); - encodingComboBox->insertItem("unicode"); + encodingComboBox->insertItem("tqunicode"); encodingComboBox->insertItem("ansinew"); encodingComboBox->insertItem("applemac"); encodingComboBox->insertItem("ascii"); @@ -166,7 +166,7 @@ KSpreadLatexExportDiaImpl::~KSpreadLatexExportDiaImpl() void KSpreadLatexExportDiaImpl::reject() { kdDebug(30522) << "Export cancelled" << endl; - QDialog::reject(); + TQDialog::reject(); } /** @@ -230,7 +230,7 @@ void KSpreadLatexExportDiaImpl::accept() void KSpreadLatexExportDiaImpl::addLanguage() { kdDebug(30522) << "add a new language supported" << languagesList->currentText() << endl; - QString text = languagesList->currentText(); + TQString text = languagesList->currentText(); languagesList->removeItem(languagesList->currentItem()); langUsedList->insertItem(text); } @@ -238,7 +238,7 @@ void KSpreadLatexExportDiaImpl::addLanguage() void KSpreadLatexExportDiaImpl::removeLanguage() { kdDebug(30522) << "remove a lanugage" << langUsedList->currentText() << endl; - QString text = langUsedList->currentText(); + TQString text = langUsedList->currentText(); langUsedList->removeItem(langUsedList->currentItem()); languagesList->insertItem(text); } diff --git a/filters/kspread/latex/export/kspreadlatexexportdiaImpl.h b/filters/kspread/latex/export/kspreadlatexexportdiaImpl.h index 4073c2ca..33bb6222 100644 --- a/filters/kspread/latex/export/kspreadlatexexportdiaImpl.h +++ b/filters/kspread/latex/export/kspreadlatexexportdiaImpl.h @@ -21,7 +21,7 @@ #define __KSPREADLATEXEXPORTDIA_H__ #include -#include +#include #include #include "latexexportIface.h" @@ -32,19 +32,20 @@ class KConfig; class KSpreadLatexExportDiaImpl : public LatexExportDia { Q_OBJECT + TQ_OBJECT private: - QString _fileOut; + TQString _fileOut; KoStore* _in; KConfig* _config; LatexExportIface* _iface; public: - KSpreadLatexExportDiaImpl( KoStore*, QWidget* parent = 0, + KSpreadLatexExportDiaImpl( KoStore*, TQWidget* tqparent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); virtual ~KSpreadLatexExportDiaImpl(); - void setOutputFile(QString file) { _fileOut = file; } + void setOutputFile(TQString file) { _fileOut = file; } public slots: virtual void reject(); diff --git a/filters/kspread/latex/export/latexexport.cc b/filters/kspread/latex/export/latexexport.cc index 37fb56d9..66927728 100644 --- a/filters/kspread/latex/export/latexexport.cc +++ b/filters/kspread/latex/export/latexexport.cc @@ -24,20 +24,20 @@ #include #include #include -#include +#include #include "kspreadlatexexportdiaImpl.h" typedef KGenericFactory LATEXExportFactory; K_EXPORT_COMPONENT_FACTORY( libkspreadlatexexport, LATEXExportFactory( "kofficefilters" ) ) -LATEXExport::LATEXExport(KoFilter *, const char *, const QStringList&) : +LATEXExport::LATEXExport(KoFilter *, const char *, const TQStringList&) : KoFilter() { } -KoFilter::ConversionStatus LATEXExport::convert( const QCString& from, const QCString& to ) +KoFilter::ConversiontqStatus LATEXExport::convert( const TQCString& from, const TQCString& to ) { - QString config; + TQString config; if(to != "text/x-tex" || from != "application/x-kspread") return KoFilter::NotImplemented; diff --git a/filters/kspread/latex/export/latexexport.h b/filters/kspread/latex/export/latexexport.h index 3b743000..5812d316 100644 --- a/filters/kspread/latex/export/latexexport.h +++ b/filters/kspread/latex/export/latexexport.h @@ -20,10 +20,10 @@ #ifndef __LATEXEXPORT_H__ #define __LATEXEXPORT_H__ -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -32,12 +32,13 @@ class LATEXExport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - LATEXExport(KoFilter *parent, const char *name, const QStringList&); + LATEXExport(KoFilter *tqparent, const char *name, const TQStringList&); virtual ~LATEXExport() {} - virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to ); }; #endif /* __LATEXExport_H__ */ diff --git a/filters/kspread/latex/export/latexexportIface.cc b/filters/kspread/latex/export/latexexportIface.cc index f99e6745..80ca013d 100644 --- a/filters/kspread/latex/export/latexexportIface.cc +++ b/filters/kspread/latex/export/latexexportIface.cc @@ -22,7 +22,7 @@ #include "kspreadlatexexportdiaImpl.h" /* - * Constructs a KWordLatexExportDia which is a child of 'parent', with the + * Constructs a KWordLatexExportDia which is a child of 'tqparent', with the * name 'name' and widget flags set to 'f'. * * The dialog will by default be modeless, unless you set 'modal' to diff --git a/filters/kspread/latex/export/latexexportdia.ui b/filters/kspread/latex/export/latexexportdia.ui index 3e62df55..677329da 100644 --- a/filters/kspread/latex/export/latexexportdia.ui +++ b/filters/kspread/latex/export/latexexportdia.ui @@ -2,7 +2,7 @@ LatexExportDia This dialog box is used for all latex filter in koffice. Robert Jacolin <rjacolin@ifrance.com> - + LatexExportDia @@ -30,14 +30,14 @@ 6 - + _tab true - + Widget2 @@ -66,7 +66,7 @@ 1000 - + styleGroup @@ -81,7 +81,7 @@ Document Style - + kwordStyleButton @@ -100,7 +100,7 @@ true - + latexStyleButton @@ -117,7 +117,7 @@ - + typeGroup @@ -132,7 +132,7 @@ Document Type - + fullDocButton @@ -157,7 +157,7 @@ The document will be generated as a full latex document since all the include will be generated before the \begin[document} and \end{document} commands. - + embededButton @@ -180,7 +180,7 @@ - + TextLabel1_2 @@ -196,7 +196,7 @@ Document class: - + TextLabel2 @@ -212,7 +212,7 @@ Quality: - + defaultFontSizeTextZone @@ -228,7 +228,7 @@ Default font size: - + classComboBox @@ -265,7 +265,7 @@ - + Widget3 @@ -288,7 +288,7 @@ This directory will contains the eps pictures of your document. - + pictureCheckBox @@ -307,7 +307,7 @@ true - + TextLabel1 @@ -324,14 +324,14 @@ - + tab Language - + ButtonGroup3 @@ -360,7 +360,7 @@ - + GroupBox4 @@ -378,7 +378,7 @@ Language - + rmLanguageBtn @@ -394,7 +394,7 @@ Remove - + addLanguageBtn @@ -438,14 +438,14 @@ - + tab Contents - + exportAuthor @@ -467,7 +467,7 @@ false - + tableContents @@ -486,7 +486,7 @@ Add a table of content - + note @@ -504,7 +504,7 @@ Notes - + RadioButton7 @@ -520,7 +520,7 @@ Don't export - + RadioButton6 @@ -536,7 +536,7 @@ Export notes in comments - + RadioButton5 @@ -555,7 +555,7 @@ - + Layout1 @@ -569,7 +569,7 @@ 6 - + buttonHelp @@ -593,14 +593,14 @@ Expanding - + 20 0 - + buttonOk @@ -614,7 +614,7 @@ true - + buttonCancel @@ -655,11 +655,11 @@ removeLanguage() - + addLanguage() removeLanguage() - - + + knuminput.h knuminput.h diff --git a/filters/kspread/latex/export/map.cc b/filters/kspread/latex/export/map.cc index d0252d85..a2256d5e 100644 --- a/filters/kspread/latex/export/map.cc +++ b/filters/kspread/latex/export/map.cc @@ -41,12 +41,12 @@ Map::~Map() /*******************************************/ /* Analyse */ /*******************************************/ -void Map::analyse(const QDomNode balise) +void Map::analyse(const TQDomNode balise) { /* Analyse of the parameters */ kdDebug(30522) << "ANALYSE A MAP" << endl; - /* Analyse of the children markups */ + /* Analyse of the tqchildren markups */ for(int index = 0; index < getNbChild(balise); index++) { // Only tables @@ -63,11 +63,11 @@ void Map::analyse(const QDomNode balise) /* Generate each text zone with the parag. */ /* markup. */ /*******************************************/ -void Map::generate(QTextStream &out) +void Map::generate(TQTextStream &out) { Table *table = NULL; kdDebug(30522) << " MAP GENERATION" << endl; - QPtrListIterator it(_tables); + TQPtrListIterator
it(_tables); while ( (table = it.current()) != 0 ) { ++it; diff --git a/filters/kspread/latex/export/map.h b/filters/kspread/latex/export/map.h index 5f6a38c0..a342bb24 100644 --- a/filters/kspread/latex/export/map.h +++ b/filters/kspread/latex/export/map.h @@ -22,9 +22,9 @@ #ifndef __KSPREAD_LATEX_MAP_H__ #define __KSPREAD_LATEX_MAP_H__ -#include -#include /* historic list */ -#include /* for list of format */ +#include +#include /* historic list */ +#include /* for list of format */ #include "xmlparser.h" #include "config.h" @@ -41,7 +41,7 @@ */ class Map: public XmlParser, Config { - QPtrList
_tables; + TQPtrList
_tables; public: /** @@ -75,12 +75,12 @@ class Map: public XmlParser, Config /** * Get informations from a markup tree. */ - void analyse (const QDomNode); + void analyse (const TQDomNode); /** * Write the paragraph in a file. */ - void generate (QTextStream&); + void generate (TQTextStream&); private: diff --git a/filters/kspread/latex/export/pen.cc b/filters/kspread/latex/export/pen.cc index e005c31c..03a87bd8 100644 --- a/filters/kspread/latex/export/pen.cc +++ b/filters/kspread/latex/export/pen.cc @@ -31,7 +31,7 @@ Pen::Pen() } /* Get the set of info. about a text format */ -void Pen::analyse(const QDomNode balise) +void Pen::analyse(const TQDomNode balise) { /* */ setWidth(getAttr(balise, "width").toDouble()); @@ -39,7 +39,7 @@ void Pen::analyse(const QDomNode balise) setColor(getAttr(balise, "color")); } -void Pen::generate(QTextStream&) +void Pen::generate(TQTextStream&) { } diff --git a/filters/kspread/latex/export/pen.h b/filters/kspread/latex/export/pen.h index d1fa8de6..49da17e0 100644 --- a/filters/kspread/latex/export/pen.h +++ b/filters/kspread/latex/export/pen.h @@ -23,9 +23,9 @@ #ifndef __KSPREAD_LATEX_PEN_H__ #define __KSPREAD_LATEX_PEN_H__ -#include -#include -#include +#include +#include +#include #include "xmlparser.h" /***********************************************************************/ @@ -39,7 +39,7 @@ class Pen: public XmlParser { double _width; int _style; - QColor _color; + TQColor _color; public: /** @@ -61,14 +61,14 @@ class Pen: public XmlParser */ double getWidth() const { return _width; } int getStyle() const { return _style; } - QColor getColor() const { return _color; } + TQColor getColor() const { return _color; } /** * setters */ void setWidth(double w) { _width = w; } void setStyle(int s) { _style = s; } - void setColor(QString color) { _color.setNamedColor(color); } + void setColor(TQString color) { _color.setNamedColor(color); } /** * Helpfull functions @@ -77,9 +77,9 @@ class Pen: public XmlParser /** * Get informations from a markup tree (only param of a format). */ - virtual void analyse(const QDomNode); + virtual void analyse(const TQDomNode); - virtual void generate(QTextStream&); + virtual void generate(TQTextStream&); }; diff --git a/filters/kspread/latex/export/row.cc b/filters/kspread/latex/export/row.cc index 2ee05ac0..3aaaaaba 100644 --- a/filters/kspread/latex/export/row.cc +++ b/filters/kspread/latex/export/row.cc @@ -38,7 +38,7 @@ Row::~Row() { } -void Row::analyse(const QDomNode balise) +void Row::analyse(const TQDomNode balise) { _row = getAttr(balise, "row").toLong(); _height = getAttr(balise, "height").toDouble(); @@ -48,7 +48,7 @@ void Row::analyse(const QDomNode balise) /*******************************************/ /* generate */ /*******************************************/ -void Row::generate(QTextStream& out) +void Row::generate(TQTextStream& out) { //generateTopBorder(out); if(getBrushStyle() >= 1) diff --git a/filters/kspread/latex/export/row.h b/filters/kspread/latex/export/row.h index 1d6bf28e..bd183f0c 100644 --- a/filters/kspread/latex/export/row.h +++ b/filters/kspread/latex/export/row.h @@ -21,7 +21,7 @@ #ifndef __KSPREAD_LATEX_ROW_H__ #define __KSPREAD_LATEX_ROW_H__ -#include +#include #include "config.h" #include "format.h" @@ -76,8 +76,8 @@ class Row: public Format /** * Helpfull functions */ - void analyse (const QDomNode); - void generate (QTextStream&); + void analyse (const TQDomNode); + void generate (TQTextStream&); private: diff --git a/filters/kspread/latex/export/spreadsheet.cc b/filters/kspread/latex/export/spreadsheet.cc index d40998fc..afb02cad 100644 --- a/filters/kspread/latex/export/spreadsheet.cc +++ b/filters/kspread/latex/export/spreadsheet.cc @@ -45,7 +45,7 @@ Spreadsheet::~Spreadsheet() /*******************************************/ /* Analyse */ /*******************************************/ -void Spreadsheet::analyse(const QDomNode balise) +void Spreadsheet::analyse(const TQDomNode balise) { kdDebug(30522) << getChildName(balise, 0) << endl; analyse_attr(balise); @@ -60,7 +60,7 @@ void Spreadsheet::analyse(const QDomNode balise) /*******************************************/ /* AnalysePixmaps */ /*******************************************/ -void Spreadsheet::analyse_attr(const QDomNode balise) +void Spreadsheet::analyse_attr(const TQDomNode balise) { } @@ -68,7 +68,7 @@ void Spreadsheet::analyse_attr(const QDomNode balise) /*******************************************/ /* Generate */ /*******************************************/ -void Spreadsheet::generate(QTextStream &out, bool hasPreambule) +void Spreadsheet::generate(TQTextStream &out, bool hasPreambule) { kdDebug(30522) << "DOC. GENERATION." << endl; @@ -95,7 +95,7 @@ void Spreadsheet::generate(QTextStream &out, bool hasPreambule) /*******************************************/ /* GeneratePreambule */ /*******************************************/ -void Spreadsheet::generatePreambule(QTextStream &out) +void Spreadsheet::generatePreambule(TQTextStream &out) { FileHeader::instance()->generate(out); /* For each header */ @@ -135,7 +135,7 @@ void Spreadsheet::generatePreambule(QTextStream &out) /*******************************************/ /* GenerateTypeHeader */ /*******************************************/ -void Spreadsheet::generateTypeHeader(QTextStream &out) +void Spreadsheet::generateTypeHeader(TQTextStream &out) { /*kdDebug(30522) << "generate header" << endl; if((_fileHeader->getHeadType() == TH_ALL || @@ -181,7 +181,7 @@ void Spreadsheet::generateTypeHeader(QTextStream &out) /*******************************************/ /* GenerateTypeFooter */ /*******************************************/ -void Spreadsheet::generateTypeFooter(QTextStream &out) +void Spreadsheet::generateTypeFooter(TQTextStream &out) { /*if(_fileHeader->getFootType() == TH_ALL && footer->getInfo() == SI_EVEN) { diff --git a/filters/kspread/latex/export/spreadsheet.h b/filters/kspread/latex/export/spreadsheet.h index 1a8b8f62..03984105 100644 --- a/filters/kspread/latex/export/spreadsheet.h +++ b/filters/kspread/latex/export/spreadsheet.h @@ -22,8 +22,8 @@ #ifndef __KSPREAD_LATEX_SPREADSHEET_H__ #define __KSPREAD_LATEX_SPREADSHEET_H__ -#include -#include +#include +#include #include "map.h" #include "config.h" @@ -70,26 +70,26 @@ class Spreadsheet: public XmlParser, Config * Accessors */ - void analyse(const QDomNode); - void analyse_attr(const QDomNode); + void analyse(const TQDomNode); + void analyse_attr(const TQDomNode); - void generate(QTextStream&, bool); + void generate(TQTextStream&, bool); private: /** * Generate the second part of the preambule */ - void generatePreambule(QTextStream&); + void generatePreambule(TQTextStream&); /** * Generate the header */ - void generateTypeHeader(QTextStream&); + void generateTypeHeader(TQTextStream&); /** * Generate the footer */ - void generateTypeFooter(QTextStream&); + void generateTypeFooter(TQTextStream&); }; #endif /* __KSPREAD_LATEX_SPREADSHEET_H__ */ diff --git a/filters/kspread/latex/export/table.cc b/filters/kspread/latex/export/table.cc index e7bcc14b..0f300356 100644 --- a/filters/kspread/latex/export/table.cc +++ b/filters/kspread/latex/export/table.cc @@ -20,7 +20,7 @@ */ #include /* for kdDebug stream */ -#include +#include #include "cell.h" #include "column.h" #include "row.h" @@ -52,7 +52,7 @@ void Table::setMaxRow(int row) if(_maxRow < row) _maxRow = row; } -void Table::analyse(const QDomNode balise) +void Table::analyse(const TQDomNode balise) { kdDebug(30522) << "New table" << endl; if(getAttr(balise, "columnnumber") == "1") @@ -86,7 +86,7 @@ void Table::analyse(const QDomNode balise) int max = getNbChild(balise); for(int index = 0; index < max; index++) { - QString name = getChildName(balise, index); + TQString name = getChildName(balise, index); if(name == "cell") { kdDebug(30522) << "----- cell -----" << endl; @@ -115,13 +115,13 @@ void Table::analyse(const QDomNode balise) } } -void Table::analysePaper(const QDomNode balise) +void Table::analysePaper(const TQDomNode balise) { setFormat(getAttr(balise, "format")); setOrientation(getAttr(balise, "orientation")); /* borders */ - QDomNode border = getChild(balise, "borders"); + TQDomNode border = getChild(balise, "borders"); setBorderRight(getAttr(balise, "right").toLong()); setBorderLeft(getAttr(balise, "left").toLong()); setBorderBottom(getAttr(balise, "bottom").toLong()); @@ -130,7 +130,7 @@ void Table::analysePaper(const QDomNode balise) Cell* Table::searchCell(int col, int row) { - QPtrListIterator it(_cells); + TQPtrListIterator it(_cells); kdDebug(30522) << "search in list of " << _cells.count() << " cells" << endl; Cell *cell = 0; @@ -146,7 +146,7 @@ Cell* Table::searchCell(int col, int row) Column* Table::searchColumn(int col) { - QPtrListIterator it(_columns); + TQPtrListIterator it(_columns); Column *column; while ( (column = it.current()) != 0 ) @@ -160,7 +160,7 @@ Column* Table::searchColumn(int col) Row* Table::searchRow(int rowNumber) { - QPtrListIterator it(_rows); + TQPtrListIterator it(_rows); Row *row; while ( (row = it.current()) != 0 ) @@ -175,7 +175,7 @@ Row* Table::searchRow(int rowNumber) /*******************************************/ /* generate */ /*******************************************/ -void Table::generate(QTextStream& out) +void Table::generate(TQTextStream& out) { kdDebug(30522) << "GENERATION OF A TABLE " << getMaxRow() << " - " << getMaxColumn() << endl; @@ -266,11 +266,11 @@ void Table::generate(QTextStream& out) /*******************************************/ /* generateTopLineBorder */ /*******************************************/ -void Table::generateTopLineBorder(QTextStream& out, int row) +void Table::generateTopLineBorder(TQTextStream& out, int row) { Cell* cell = 0; - QBitArray border( getMaxColumn() ); + TQBitArray border( getMaxColumn() ); bool fullLine = true; for(int index = 1; index <= getMaxColumn(); index++) { @@ -323,10 +323,10 @@ void Table::generateTopLineBorder(QTextStream& out, int row) /*******************************************/ /* generateBottomLineBorder */ /*******************************************/ -void Table::generateBottomLineBorder(QTextStream& out, int row) +void Table::generateBottomLineBorder(TQTextStream& out, int row) { Cell* cell = 0; - QBitArray border( getMaxColumn() ); + TQBitArray border( getMaxColumn() ); bool fullLine = true; for(int index = 1; index <= getMaxColumn(); index++) @@ -374,7 +374,7 @@ void Table::generateBottomLineBorder(QTextStream& out, int row) /*******************************************/ /* generateCell */ /*******************************************/ -void Table::generateCell(QTextStream& out, int row, int col) +void Table::generateCell(TQTextStream& out, int row, int col) { kdDebug(30522) << "GENERATE CELL : " << row << "," << col << endl; @@ -392,7 +392,7 @@ void Table::generateCell(QTextStream& out, int row, int col) /*******************************************/ /* generateTableHeader */ /*******************************************/ -void Table::generateTableHeader(QTextStream& out) +void Table::generateTableHeader(TQTextStream& out) { Column* column = 0; diff --git a/filters/kspread/latex/export/table.h b/filters/kspread/latex/export/table.h index 3f1fa53e..b0e99f49 100644 --- a/filters/kspread/latex/export/table.h +++ b/filters/kspread/latex/export/table.h @@ -23,8 +23,8 @@ #ifndef __KSPREAD_LATEX_TABLE_H__ #define __KSPREAD_LATEX_TABLE_H__ -#include -#include +#include +#include #include "xmlparser.h" #include "config.h" @@ -45,9 +45,9 @@ class Row; */ class Table: public XmlParser, Config { - QPtrList _rows; - QPtrList _columns; - QPtrList _cells; + TQPtrList _rows; + TQPtrList _columns; + TQPtrList _cells; /* USEFULL DATA */ int _maxRow, _maxCol; /* Size of the table (nb of cell) */ @@ -63,11 +63,11 @@ class Table: public XmlParser, Config bool _showFormula; bool _showFormulaIndicator; bool _lcMode; - QString _name; + TQString _name; /** PAPER DATA */ - QString _format; - QString _orientation; + TQString _format; + TQString _orientation; long _borderRight; long _borderLeft; long _borderBottom; @@ -98,9 +98,9 @@ class Table: public XmlParser, Config int getMaxRow() const { return _maxRow; } int getMaxColumn() const { return _maxCol; } - QString getName() const { return _name; } - QString getFormat() const { return _format; } - QString getOrientation() const { return _orientation; } + TQString getName() const { return _name; } + TQString getFormat() const { return _format; } + TQString getOrientation() const { return _orientation; } long getBorderRight() const { return _borderRight; } long getBorderLeft() const { return _borderLeft; } long getBorderBottom() const { return _borderBottom; } @@ -124,9 +124,9 @@ class Table: public XmlParser, Config */ void setMaxRow(int r); void setMaxColumn(int c); - void setName(QString name) { _name = name; } - void setFormat(QString format) { _format = format; } - void setOrientation(QString orient) { _orientation = orient; } + void setName(TQString name) { _name = name; } + void setFormat(TQString format) { _format = format; } + void setOrientation(TQString orient) { _orientation = orient; } void setBorderRight(long br) { _borderRight = br; } void setBorderLeft(long bl) { _borderLeft = bl; } void setBorderBottom(long bb) { _borderBottom = bb; } @@ -171,15 +171,15 @@ class Table: public XmlParser, Config */ Row* searchRow(int row); - void analyse (const QDomNode); - void analysePaper (const QDomNode); - void generate (QTextStream&); + void analyse (const TQDomNode); + void analysePaper (const TQDomNode); + void generate (TQTextStream&); private: - void generateCell(QTextStream&, int, int); - void generateTableHeader(QTextStream&); - void generateTopLineBorder(QTextStream&, int); - void generateBottomLineBorder(QTextStream&, int); + void generateCell(TQTextStream&, int, int); + void generateTableHeader(TQTextStream&); + void generateTopLineBorder(TQTextStream&, int); + void generateBottomLineBorder(TQTextStream&, int); }; #endif /* __KSPREAD_LATEX_TABLE_H__ */ diff --git a/filters/kspread/latex/export/xmlparser.cc b/filters/kspread/latex/export/xmlparser.cc index e93160e6..6b85f243 100644 --- a/filters/kspread/latex/export/xmlparser.cc +++ b/filters/kspread/latex/export/xmlparser.cc @@ -23,16 +23,16 @@ #include #include "xmlparser.h" -#include "qfile.h" +#include "tqfile.h" /* Init static data */ FileHeader* XmlParser::_fileHeader = 0; Document* XmlParser::_root = 0; KoStore* XmlParser::_in = NULL; -XmlParser::XmlParser(QString filename): _filename(filename) +XmlParser::XmlParser(TQString filename): _filename(filename) { - QFile f(filename); + TQFile f(filename); if(!f.open(IO_ReadOnly)) return; if(!_document.setContent(&f)) @@ -44,7 +44,7 @@ XmlParser::XmlParser(QString filename): _filename(filename) //_eltCurrent = _document.documentElement(); } -XmlParser::XmlParser(QByteArray in) +XmlParser::XmlParser(TQByteArray in) { _document.setContent(in); } @@ -58,7 +58,7 @@ XmlParser::XmlParser(const KoStore* in) return; } /* input file Reading */ - QByteArray array = _in->read(_in->size()); + TQByteArray array = _in->read(_in->size()); _document.setContent(array); } @@ -72,68 +72,68 @@ XmlParser::~XmlParser() _in->close(); } -QDomNode XmlParser::getChild(QDomNode balise, QString name) +TQDomNode XmlParser::getChild(TQDomNode balise, TQString name) { - QDomNode node = getChild(balise, name, 0); + TQDomNode node = getChild(balise, name, 0); kdDebug(30522) << node.nodeName() << endl; return node; } -bool XmlParser::isChild(QDomNode balise, QString name) +bool XmlParser::isChild(TQDomNode balise, TQString name) { if(balise.isElement()) return balise.toElement().elementsByTagName(name).count(); return false; } -QDomNode XmlParser::getChild(QDomNode balise, QString name, int index) +TQDomNode XmlParser::getChild(TQDomNode balise, TQString name, int index) { if(balise.isElement()) { - QDomNodeList children = balise.toElement().elementsByTagName(name); - if ( children.count() ) - return children.item(index); + TQDomNodeList tqchildren = balise.toElement().elementsByTagName(name); + if ( tqchildren.count() ) + return tqchildren.item(index); } - return QDomNode(); + return TQDomNode(); } -QDomNode XmlParser::getChild(QDomNode balise, int index) +TQDomNode XmlParser::getChild(TQDomNode balise, int index) { - QDomNodeList children = balise.childNodes(); - if ( children.count() ) - return children.item(index); - return QDomNode(); + TQDomNodeList tqchildren = balise.childNodes(); + if ( tqchildren.count() ) + return tqchildren.item(index); + return TQDomNode(); } -QString XmlParser::getData(QDomNode balise, int index) +TQString XmlParser::getData(TQDomNode balise, int index) { return getChild(getChild(balise, index), 0).nodeValue(); } -QString XmlParser::getData(QDomNode balise, QString name) +TQString XmlParser::getData(TQDomNode balise, TQString name) { return getChild(getChild(balise, name), 0).nodeValue(); } -int XmlParser::getNbChild(QDomNode balise) +int XmlParser::getNbChild(TQDomNode balise) { return balise.childNodes().count(); } -int XmlParser::getNbChild(QDomNode balise, QString name) +int XmlParser::getNbChild(TQDomNode balise, TQString name) { if(balise.isElement()) return balise.toElement().elementsByTagName(name).count(); return -1; } -QString XmlParser::getChildName(QDomNode balise, int index) +TQString XmlParser::getChildName(TQDomNode balise, int index) { return balise.childNodes().item(index).nodeName(); } -QString XmlParser::getAttr(QDomNode balise, QString name) const +TQString XmlParser::getAttr(TQDomNode balise, TQString name) const { if(balise.isElement()) return balise.toElement().attributeNode(name).value(); - return QString(); + return TQString(); } diff --git a/filters/kspread/latex/export/xmlparser.h b/filters/kspread/latex/export/xmlparser.h index 10e2609d..7e6e2995 100644 --- a/filters/kspread/latex/export/xmlparser.h +++ b/filters/kspread/latex/export/xmlparser.h @@ -23,8 +23,8 @@ #ifndef __LATEX_XMLPARSER_H__ #define __LATEX_XMLPARSER_H__ -#include "qstring.h" -#include "qdom.h" +#include "tqstring.h" +#include "tqdom.h" class FileHeader; class Document; @@ -33,9 +33,9 @@ class KoStore; class XmlParser { /** Latex output file */ - QString _filename; + TQString _filename; /** The Koffice app document stored in a XML DOM Tree. */ - QDomDocument _document; + TQDomDocument _document; /** The koffice document (maindoc, picture, ...). */ static KoStore* _in; @@ -47,31 +47,31 @@ class XmlParser static Document *_root; public: - XmlParser(QString); - XmlParser(QByteArray); /* deprecated */ + XmlParser(TQString); + XmlParser(TQByteArray); /* deprecated */ XmlParser(const KoStore*); XmlParser(); virtual ~XmlParser(); - QString getFilename () const { return _filename; } - QString getDocument () const { return _document.toString(); } + TQString getFilename () const { return _filename; } + TQString getDocument () const { return _document.toString(); } Document* getRoot () const { return _root; } FileHeader* getFileHeader () const { return _fileHeader; } - QString getChildName(QDomNode, int); - QDomNode getChild(QDomNode, QString); - QDomNode getChild(QDomNode, QString, int); - QDomNode getChild(QDomNode, int); - QString getData(QDomNode, int); - QString getData(QDomNode, QString); - int getNbChild(QDomNode, QString); - int getNbChild(QDomNode); - QString getAttr(QDomNode, QString) const; - bool isChild(QDomNode, QString); + TQString getChildName(TQDomNode, int); + TQDomNode getChild(TQDomNode, TQString); + TQDomNode getChild(TQDomNode, TQString, int); + TQDomNode getChild(TQDomNode, int); + TQString getData(TQDomNode, int); + TQString getData(TQDomNode, TQString); + int getNbChild(TQDomNode, TQString); + int getNbChild(TQDomNode); + TQString getAttr(TQDomNode, TQString) const; + bool isChild(TQDomNode, TQString); void setFileHeader(FileHeader* h) { _fileHeader = h; } void setRoot (Document* r) { _root = r; } - QDomNode init() { return _document.documentElement(); } + TQDomNode init() { return _document.documentElement(); } }; diff --git a/filters/kspread/libkspreadexport/KSpreadBaseWorker.cc b/filters/kspread/libkspreadexport/KSpreadBaseWorker.cc index cc7b2b46..ba56c229 100644 --- a/filters/kspread/libkspreadexport/KSpreadBaseWorker.cc +++ b/filters/kspread/libkspreadexport/KSpreadBaseWorker.cc @@ -31,7 +31,7 @@ KSpreadBaseWorker::~KSpreadBaseWorker() { } -KoFilter::ConversionStatus KSpreadBaseWorker::startDocument(KSpreadFilterProperty property) { +KoFilter::ConversiontqStatus KSpreadBaseWorker::startDocument(KSpreadFilterProperty property) { KSpreadFilterProperty::Iterator it; for (it = property.begin(); it != property.end(); ++it) { kdDebug(30508) << "startDocument: " << it.key() << "->" << it.data() << endl; @@ -40,7 +40,7 @@ KoFilter::ConversionStatus KSpreadBaseWorker::startDocument(KSpreadFilterPropert } -KoFilter::ConversionStatus KSpreadBaseWorker::startInfoLog(KSpreadFilterProperty property) { +KoFilter::ConversiontqStatus KSpreadBaseWorker::startInfoLog(KSpreadFilterProperty property) { KSpreadFilterProperty::Iterator it; for (it = property.begin(); it != property.end(); ++it) { kdDebug(30508) << "startInfoLog: " << it.key() << "->" << it.data() << endl; @@ -49,7 +49,7 @@ KoFilter::ConversionStatus KSpreadBaseWorker::startInfoLog(KSpreadFilterProperty } -KoFilter::ConversionStatus KSpreadBaseWorker::startInfoAuthor(KSpreadFilterProperty property) { +KoFilter::ConversiontqStatus KSpreadBaseWorker::startInfoAuthor(KSpreadFilterProperty property) { KSpreadFilterProperty::Iterator it; for (it = property.begin(); it != property.end(); ++it) { kdDebug(30508) << "startInfoAuthor: " << it.key() << "->" << it.data() << endl; @@ -58,7 +58,7 @@ KoFilter::ConversionStatus KSpreadBaseWorker::startInfoAuthor(KSpreadFilterPrope } -KoFilter::ConversionStatus KSpreadBaseWorker::startInfoAbout(KSpreadFilterProperty property) { +KoFilter::ConversiontqStatus KSpreadBaseWorker::startInfoAbout(KSpreadFilterProperty property) { KSpreadFilterProperty::Iterator it; for (it = property.begin(); it != property.end(); ++it) { kdDebug(30508) << "startInfoAbout: " << it.key() << "->" << it.data() << endl; @@ -67,7 +67,7 @@ KoFilter::ConversionStatus KSpreadBaseWorker::startInfoAbout(KSpreadFilterProper } -KoFilter::ConversionStatus KSpreadBaseWorker::startSpreadBook(KSpreadFilterProperty property) { +KoFilter::ConversiontqStatus KSpreadBaseWorker::startSpreadBook(KSpreadFilterProperty property) { KSpreadFilterProperty::Iterator it; for (it = property.begin(); it != property.end(); ++it) { kdDebug(30508) << "startSpreadBook: " << it.key() << "->" << it.data() << endl; @@ -76,7 +76,7 @@ KoFilter::ConversionStatus KSpreadBaseWorker::startSpreadBook(KSpreadFilterPrope } -KoFilter::ConversionStatus KSpreadBaseWorker::startSpreadSheet(KSpreadFilterProperty property) { +KoFilter::ConversiontqStatus KSpreadBaseWorker::startSpreadSheet(KSpreadFilterProperty property) { KSpreadFilterProperty::Iterator it; for (it = property.begin(); it != property.end(); ++it) { kdDebug(30508) << "startSpreadSheet: " << it.key() << "->" << it.data() << endl; @@ -85,7 +85,7 @@ KoFilter::ConversionStatus KSpreadBaseWorker::startSpreadSheet(KSpreadFilterProp } -KoFilter::ConversionStatus KSpreadBaseWorker::startSpreadCell(KSpreadFilterProperty property) { +KoFilter::ConversiontqStatus KSpreadBaseWorker::startSpreadCell(KSpreadFilterProperty property) { KSpreadFilterProperty::Iterator it; for (it = property.begin(); it != property.end(); ++it) { kdDebug(30508) << "startSpreadCell: " << it.key() << "->" << it.data() << endl; diff --git a/filters/kspread/libkspreadexport/KSpreadBaseWorker.h b/filters/kspread/libkspreadexport/KSpreadBaseWorker.h index d2322402..4ba82383 100644 --- a/filters/kspread/libkspreadexport/KSpreadBaseWorker.h +++ b/filters/kspread/libkspreadexport/KSpreadBaseWorker.h @@ -22,10 +22,10 @@ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, #define KSPREAD_BASE_WORKER_H #include -#include +#include -typedef QMap KSpreadFilterProperty; +typedef TQMap KSpreadFilterProperty; class KSpreadBaseWorker { @@ -33,13 +33,13 @@ public: KSpreadBaseWorker(); virtual ~KSpreadBaseWorker(); - virtual KoFilter::ConversionStatus startDocument(KSpreadFilterProperty property); - virtual KoFilter::ConversionStatus startInfoLog(KSpreadFilterProperty property); - virtual KoFilter::ConversionStatus startInfoAuthor(KSpreadFilterProperty property); - virtual KoFilter::ConversionStatus startInfoAbout(KSpreadFilterProperty property); - virtual KoFilter::ConversionStatus startSpreadBook(KSpreadFilterProperty property); - virtual KoFilter::ConversionStatus startSpreadSheet(KSpreadFilterProperty property); - virtual KoFilter::ConversionStatus startSpreadCell(KSpreadFilterProperty property); + virtual KoFilter::ConversiontqStatus startDocument(KSpreadFilterProperty property); + virtual KoFilter::ConversiontqStatus startInfoLog(KSpreadFilterProperty property); + virtual KoFilter::ConversiontqStatus startInfoAuthor(KSpreadFilterProperty property); + virtual KoFilter::ConversiontqStatus startInfoAbout(KSpreadFilterProperty property); + virtual KoFilter::ConversiontqStatus startSpreadBook(KSpreadFilterProperty property); + virtual KoFilter::ConversiontqStatus startSpreadSheet(KSpreadFilterProperty property); + virtual KoFilter::ConversiontqStatus startSpreadCell(KSpreadFilterProperty property); }; #endif /* KSPREAD_BASE_WORKER_H */ diff --git a/filters/kspread/libkspreadexport/KSpreadLeader.cc b/filters/kspread/libkspreadexport/KSpreadLeader.cc index c321a515..9ba2d874 100644 --- a/filters/kspread/libkspreadexport/KSpreadLeader.cc +++ b/filters/kspread/libkspreadexport/KSpreadLeader.cc @@ -48,8 +48,8 @@ void Leader::setWorker(KSpreadBaseWorker *newWorker) { } -KoFilter::ConversionStatus Leader::convert() { - KoFilter::ConversionStatus status; +KoFilter::ConversiontqStatus Leader::convert() { + KoFilter::ConversiontqStatus status; // Validate the filter chain and the worker if (!m_filterChain) { @@ -74,7 +74,7 @@ KoFilter::ConversionStatus Leader::convert() { kdWarning(30508) << "the KSpreadDoc is NULL!" << endl; return KoFilter::StupidError; } - if ( !::qt_cast( document ) ) { + if ( !::tqqt_cast( document ) ) { kdWarning(30508) << "the document is not a KSpreadDoc!" << endl; return KoFilter::StupidError; } @@ -122,8 +122,8 @@ KoFilter::ConversionStatus Leader::convert() { } -KoFilter::ConversionStatus Leader::doInfo(KoDocumentInfo *info) { - KoFilter::ConversionStatus status; +KoFilter::ConversiontqStatus Leader::doInfo(KoDocumentInfo *info) { + KoFilter::ConversiontqStatus status; #if 0 // this was never used, it's been removed now // Gather data about the document log @@ -164,9 +164,9 @@ KoFilter::ConversionStatus Leader::doInfo(KoDocumentInfo *info) { } -KoFilter::ConversionStatus Leader::doSpreadBook(KSpreadDoc *document) { +KoFilter::ConversiontqStatus Leader::doSpreadBook(KSpreadDoc *document) { KSpreadFilterProperty docSpreadBookProperty; - docSpreadBookProperty["spreadsheetcount"] = QString::number(document->map()->count()); + docSpreadBookProperty["spreadsheetcount"] = TQString::number(document->map()->count()); docSpreadBookProperty["decimalsymbol"] = document->locale()->decimalSymbol(); docSpreadBookProperty["thousandsseparator"] = document->locale()->thousandsSeparator(); docSpreadBookProperty["currencysymbol"] = document->locale()->currencySymbol(); @@ -174,12 +174,12 @@ KoFilter::ConversionStatus Leader::doSpreadBook(KSpreadDoc *document) { docSpreadBookProperty["monetarythousandsseparator"] = document->locale()->monetaryThousandsSeparator(); docSpreadBookProperty["positivesign"] = document->locale()->positiveSign(); docSpreadBookProperty["negativesign"] = document->locale()->negativeSign(); - docSpreadBookProperty["fracdigits"] = QString::number(document->locale()->fracDigits()); + docSpreadBookProperty["fracdigits"] = TQString::number(document->locale()->fracDigits()); docSpreadBookProperty["positiveprefixcurrencysymbol"] = (document->locale()->positivePrefixCurrencySymbol()==0?"false":"true"); docSpreadBookProperty["negativeprefixcurrencysymbol"] = (document->locale()->negativePrefixCurrencySymbol()==0?"false":"true"); docSpreadBookProperty["use12clock"] = (document->locale()->use12Clock()==0?"false":"true"); docSpreadBookProperty["weekstartsmonday"] = (document->locale()->weekStartsMonday()==0?"false":"true"); - docSpreadBookProperty["weekstartday"] = QString::number(document->locale()->weekStartDay()); + docSpreadBookProperty["weekstartday"] = TQString::number(document->locale()->weekStartDay()); docSpreadBookProperty["language"] = document->locale()->language(); docSpreadBookProperty["country"] = document->locale()->country(); docSpreadBookProperty["encoding"] = document->locale()->encoding(); @@ -189,38 +189,38 @@ KoFilter::ConversionStatus Leader::doSpreadBook(KSpreadDoc *document) { docSpreadBookProperty["defaultlanguage"] = KLocale::defaultLanguage(); docSpreadBookProperty["defaultcountry"] = KLocale::defaultCountry(); docSpreadBookProperty["defaultgridpencolorname"] = document->defaultGridPen().color().name(); - docSpreadBookProperty["defaultgridpencolorred"] = QString::number(document->defaultGridPen().color().red()); - docSpreadBookProperty["defaultgridpencolorgreen"] = QString::number(document->defaultGridPen().color().green()); - docSpreadBookProperty["defaultgridpencolorblue"] = QString::number(document->defaultGridPen().color().blue()); - docSpreadBookProperty["defaultgridpenwidth"] = QString::number(document->defaultGridPen().width()); + docSpreadBookProperty["defaultgridpencolorred"] = TQString::number(document->defaultGridPen().color().red()); + docSpreadBookProperty["defaultgridpencolorgreen"] = TQString::number(document->defaultGridPen().color().green()); + docSpreadBookProperty["defaultgridpencolorblue"] = TQString::number(document->defaultGridPen().color().blue()); + docSpreadBookProperty["defaultgridpenwidth"] = TQString::number(document->defaultGridPen().width()); docSpreadBookProperty["showverticalscrollbar"] = (document->getShowVerticalScrollBar()==0?"false":"true"); docSpreadBookProperty["showhorizontalscrollbar"] = (document->getShowHorizontalScrollBar()==0?"false":"true"); docSpreadBookProperty["showcolheader"] = (document->getShowColHeader()==0?"false":"true"); docSpreadBookProperty["showrowheader"] = (document->getShowRowHeader()==0?"false":"true"); - docSpreadBookProperty["indentvalue"] = QString::number(document->getIndentValue()); - docSpreadBookProperty["movetovalue"] = QString::number(document->getMoveToValue()); + docSpreadBookProperty["indentvalue"] = TQString::number(document->getIndentValue()); + docSpreadBookProperty["movetovalue"] = TQString::number(document->getMoveToValue()); docSpreadBookProperty["showmessageerror"] = (document->getShowMessageError()==0?"false":"true"); docSpreadBookProperty["showtabbar"] = (document->getShowTabBar()==0?"false":"true"); docSpreadBookProperty["pagebordercolorname"] = document->pageBorderColor().name(); - docSpreadBookProperty["pagebordercolorred"] = QString::number(document->pageBorderColor().red()); - docSpreadBookProperty["pagebordercolorgreen"] = QString::number(document->pageBorderColor().green()); - docSpreadBookProperty["pagebordercolorblue"] = QString::number(document->pageBorderColor().blue()); + docSpreadBookProperty["pagebordercolorred"] = TQString::number(document->pageBorderColor().red()); + docSpreadBookProperty["pagebordercolorgreen"] = TQString::number(document->pageBorderColor().green()); + docSpreadBookProperty["pagebordercolorblue"] = TQString::number(document->pageBorderColor().blue()); docSpreadBookProperty["showcommentindicator"] = (document->getShowCommentIndicator()==0?"false":"true"); docSpreadBookProperty["showformulabar"] = (document->getShowFormulaBar()==0?"false":"true"); docSpreadBookProperty["dontcheckupperword"] = (document->dontCheckUpperWord()==0?"false":"true"); docSpreadBookProperty["dontchecktitlecase"] = (document->dontCheckTitleCase()==0?"false":"true"); docSpreadBookProperty["showstatusbar"] = (document->getShowStatusBar()==0?"false":"true"); docSpreadBookProperty["unitname"] = document->getUnitName(); - docSpreadBookProperty["syntaxversion"] = QString::number(document->syntaxVersion()); + docSpreadBookProperty["syntaxversion"] = TQString::number(document->syntaxVersion()); return m_worker->startSpreadBook(docSpreadBookProperty); } -KoFilter::ConversionStatus Leader::doSpreadSheet(KSpreadSheet *spreadSheet) { +KoFilter::ConversiontqStatus Leader::doSpreadSheet(KSpreadSheet *spreadSheet) { KSpreadFilterProperty docSpreadSheetProperty; docSpreadSheetProperty["name"] = spreadSheet->tableName(); - docSpreadSheetProperty["sizemaxx"] = QString::number(spreadSheet->sizeMaxX()); - docSpreadSheetProperty["sizemaxy"] = QString::number(spreadSheet->sizeMaxY()); + docSpreadSheetProperty["sizemaxx"] = TQString::number(spreadSheet->sizeMaxX()); + docSpreadSheetProperty["sizemaxy"] = TQString::number(spreadSheet->sizeMaxY()); docSpreadSheetProperty["showgrid"] = (spreadSheet->getShowGrid()==0?"false":"true"); docSpreadSheetProperty["showformula"] = (spreadSheet->getShowFormula()==0?"false":"true"); docSpreadSheetProperty["showformulaindicator"] = (spreadSheet->getShowFormulaIndicator()==0?"false":"true"); @@ -231,14 +231,14 @@ KoFilter::ConversionStatus Leader::doSpreadSheet(KSpreadSheet *spreadSheet) { docSpreadSheetProperty["firstletterupper"] = (spreadSheet->getFirstLetterUpper()==0?"false":"true"); docSpreadSheetProperty["ishidden"] = (spreadSheet->isHidden()==0?"false":"true"); docSpreadSheetProperty["showpageborders"] = (spreadSheet->isShowPageBorders()==0?"false":"true"); - docSpreadSheetProperty["printablewidth"] = QString::number(spreadSheet->printableWidth()); - docSpreadSheetProperty["printableheight"] = QString::number(spreadSheet->printableHeight()); - docSpreadSheetProperty["paperwidth"] = QString::number(spreadSheet->paperWidth()); - docSpreadSheetProperty["paperheight"] = QString::number(spreadSheet->paperHeight()); - docSpreadSheetProperty["leftborder"] = QString::number(spreadSheet->leftBorder()); - docSpreadSheetProperty["rightborder"] = QString::number(spreadSheet->rightBorder()); - docSpreadSheetProperty["topborder"] = QString::number(spreadSheet->topBorder()); - docSpreadSheetProperty["bottomborder"] = QString::number(spreadSheet->bottomBorder()); + docSpreadSheetProperty["printablewidth"] = TQString::number(spreadSheet->printableWidth()); + docSpreadSheetProperty["printableheight"] = TQString::number(spreadSheet->printableHeight()); + docSpreadSheetProperty["paperwidth"] = TQString::number(spreadSheet->paperWidth()); + docSpreadSheetProperty["paperheight"] = TQString::number(spreadSheet->paperHeight()); + docSpreadSheetProperty["leftborder"] = TQString::number(spreadSheet->leftBorder()); + docSpreadSheetProperty["rightborder"] = TQString::number(spreadSheet->rightBorder()); + docSpreadSheetProperty["topborder"] = TQString::number(spreadSheet->topBorder()); + docSpreadSheetProperty["bottomborder"] = TQString::number(spreadSheet->bottomBorder()); docSpreadSheetProperty["headleft"] = spreadSheet->headLeft(); docSpreadSheetProperty["headmid"] = spreadSheet->headMid(); docSpreadSheetProperty["headright"] = spreadSheet->headRight(); @@ -251,18 +251,18 @@ KoFilter::ConversionStatus Leader::doSpreadSheet(KSpreadSheet *spreadSheet) { docSpreadSheetProperty["printcomment"] = (spreadSheet->getPrintCommentIndicator()==0?"false":"true"); docSpreadSheetProperty["printformula"] = (spreadSheet->getPrintFormulaIndicator()==0?"false":"true"); updateMaxCells(spreadSheet); - docSpreadSheetProperty["maxcellrow"] = QString::number(m_maxCellRow); - docSpreadSheetProperty["maxcellcolumn"] = QString::number(m_maxCellColumn); + docSpreadSheetProperty["maxcellrow"] = TQString::number(m_maxCellRow); + docSpreadSheetProperty["maxcellcolumn"] = TQString::number(m_maxCellColumn); return m_worker->startSpreadSheet(docSpreadSheetProperty); } -KoFilter::ConversionStatus Leader::doSpreadCell(Cell*spreadCell, int column, int row) { +KoFilter::ConversiontqStatus Leader::doSpreadCell(Cell*spreadCell, int column, int row) { KSpreadFilterProperty docSpreadCellProperty; - docSpreadCellProperty["column"] = QString::number(column); - docSpreadCellProperty["row"] = QString::number(row); - docSpreadCellProperty["width"] = QString::number(spreadCell->dblWidth()); - docSpreadCellProperty["height"] = QString::number(spreadCell->dblHeight()); + docSpreadCellProperty["column"] = TQString::number(column); + docSpreadCellProperty["row"] = TQString::number(row); + docSpreadCellProperty["width"] = TQString::number(spreadCell->dblWidth()); + docSpreadCellProperty["height"] = TQString::number(spreadCell->dblHeight()); docSpreadCellProperty["empty"] = (spreadCell->isEmpty()==0?"false":"true"); if (!spreadCell->isEmpty()) { docSpreadCellProperty["text"] = spreadCell->text(); @@ -270,49 +270,49 @@ KoFilter::ConversionStatus Leader::doSpreadCell(Cell*spreadCell, int column, int docSpreadCellProperty["action"] = spreadCell->action(); docSpreadCellProperty["date"] = (spreadCell->isDate()==0?"false":"true"); docSpreadCellProperty["time"] = (spreadCell->isTime()==0?"false":"true"); - docSpreadCellProperty["textwidth"] = QString::number(spreadCell->textWidth()); - docSpreadCellProperty["textheight"] = QString::number(spreadCell->textHeight()); + docSpreadCellProperty["textwidth"] = TQString::number(spreadCell->textWidth()); + docSpreadCellProperty["textheight"] = TQString::number(spreadCell->textHeight()); docSpreadCellProperty["forceextracells"] = (spreadCell->isForceExtraCells()==0?"false":"true"); - docSpreadCellProperty["mergedxcells"] = QString::number(spreadCell->mergedXCells()); - docSpreadCellProperty["mergedycells"] = QString::number(spreadCell->mergedYCells()); - docSpreadCellProperty["extraxcells"] = QString::number(spreadCell->extraXCells()); - docSpreadCellProperty["extraycells"] = QString::number(spreadCell->extraYCells()); - docSpreadCellProperty["extrawidth"] = QString::number(spreadCell->extraWidth()); - docSpreadCellProperty["extraheight"] = QString::number(spreadCell->extraHeight()); + docSpreadCellProperty["mergedxcells"] = TQString::number(spreadCell->mergedXCells()); + docSpreadCellProperty["mergedycells"] = TQString::number(spreadCell->mergedYCells()); + docSpreadCellProperty["extraxcells"] = TQString::number(spreadCell->extraXCells()); + docSpreadCellProperty["extraycells"] = TQString::number(spreadCell->extraYCells()); + docSpreadCellProperty["extrawidth"] = TQString::number(spreadCell->extraWidth()); + docSpreadCellProperty["extraheight"] = TQString::number(spreadCell->extraHeight()); docSpreadCellProperty["formula"] = (spreadCell->isFormula()==0?"false":"true"); docSpreadCellProperty["haserror"] = (spreadCell->hasError()==0?"false":"true"); - docSpreadCellProperty["alignx"] = QString::number(spreadCell->defineAlignX()); + docSpreadCellProperty["alignx"] = TQString::number(spreadCell->defineAlignX()); docSpreadCellProperty["name"] = spreadCell->name(); docSpreadCellProperty["fullname"] = spreadCell->fullName(); - docSpreadCellProperty["content"] = QString::number(spreadCell->content()); - docSpreadCellProperty["style"] = QString::number(spreadCell->style()); + docSpreadCellProperty["content"] = TQString::number(spreadCell->content()); + docSpreadCellProperty["style"] = TQString::number(spreadCell->style()); docSpreadCellProperty["valuedate"] = spreadCell->valueDate().toString(); docSpreadCellProperty["valuetime"] = spreadCell->valueTime().toString(); - docSpreadCellProperty["leftborderwidth"] = QString::number(spreadCell->leftBorderPen(column, row).width()); + docSpreadCellProperty["leftborderwidth"] = TQString::number(spreadCell->leftBorderPen(column, row).width()); docSpreadCellProperty["leftbordercolorname"] = spreadCell->leftBorderPen(column, row).color().name(); - docSpreadCellProperty["leftbordercolorred"] = QString::number(spreadCell->leftBorderPen(column, row).color().red()); - docSpreadCellProperty["leftbordercolorgreen"] = QString::number(spreadCell->leftBorderPen(column, row).color().green()); - docSpreadCellProperty["leftbordercolorblue"] = QString::number(spreadCell->leftBorderPen(column, row).color().blue()); - docSpreadCellProperty["topborderwidth"] = QString::number(spreadCell->topBorderPen(column, row).width()); + docSpreadCellProperty["leftbordercolorred"] = TQString::number(spreadCell->leftBorderPen(column, row).color().red()); + docSpreadCellProperty["leftbordercolorgreen"] = TQString::number(spreadCell->leftBorderPen(column, row).color().green()); + docSpreadCellProperty["leftbordercolorblue"] = TQString::number(spreadCell->leftBorderPen(column, row).color().blue()); + docSpreadCellProperty["topborderwidth"] = TQString::number(spreadCell->topBorderPen(column, row).width()); docSpreadCellProperty["topbordercolorname"] = spreadCell->topBorderPen(column, row).color().name(); - docSpreadCellProperty["topbordercolorred"] = QString::number(spreadCell->topBorderPen(column, row).color().red()); - docSpreadCellProperty["topbordercolorgreen"] = QString::number(spreadCell->topBorderPen(column, row).color().green()); - docSpreadCellProperty["topbordercolorblue"] = QString::number(spreadCell->topBorderPen(column, row).color().blue()); - docSpreadCellProperty["rightborderwidth"] = QString::number(spreadCell->rightBorderPen(column, row).width()); + docSpreadCellProperty["topbordercolorred"] = TQString::number(spreadCell->topBorderPen(column, row).color().red()); + docSpreadCellProperty["topbordercolorgreen"] = TQString::number(spreadCell->topBorderPen(column, row).color().green()); + docSpreadCellProperty["topbordercolorblue"] = TQString::number(spreadCell->topBorderPen(column, row).color().blue()); + docSpreadCellProperty["rightborderwidth"] = TQString::number(spreadCell->rightBorderPen(column, row).width()); docSpreadCellProperty["rightbordercolorname"] = spreadCell->rightBorderPen(column, row).color().name(); - docSpreadCellProperty["rightbordercolorred"] = QString::number(spreadCell->rightBorderPen(column, row).color().red()); - docSpreadCellProperty["rightbordercolorgreen"] = QString::number(spreadCell->rightBorderPen(column, row).color().green()); - docSpreadCellProperty["rightbordercolorblue"] = QString::number(spreadCell->rightBorderPen(column, row).color().blue()); - docSpreadCellProperty["bottomborderwidth"] = QString::number(spreadCell->bottomBorderPen(column, row).width()); + docSpreadCellProperty["rightbordercolorred"] = TQString::number(spreadCell->rightBorderPen(column, row).color().red()); + docSpreadCellProperty["rightbordercolorgreen"] = TQString::number(spreadCell->rightBorderPen(column, row).color().green()); + docSpreadCellProperty["rightbordercolorblue"] = TQString::number(spreadCell->rightBorderPen(column, row).color().blue()); + docSpreadCellProperty["bottomborderwidth"] = TQString::number(spreadCell->bottomBorderPen(column, row).width()); docSpreadCellProperty["bottombordercolorname"] = spreadCell->bottomBorderPen(column, row).color().name(); - docSpreadCellProperty["bottombordercolorred"] = QString::number(spreadCell->bottomBorderPen(column, row).color().red()); - docSpreadCellProperty["bottombordercolorgreen"] = QString::number(spreadCell->bottomBorderPen(column, row).color().green()); - docSpreadCellProperty["bottombordercolorblue"] = QString::number(spreadCell->bottomBorderPen(column, row).color().blue()); + docSpreadCellProperty["bottombordercolorred"] = TQString::number(spreadCell->bottomBorderPen(column, row).color().red()); + docSpreadCellProperty["bottombordercolorgreen"] = TQString::number(spreadCell->bottomBorderPen(column, row).color().green()); + docSpreadCellProperty["bottombordercolorblue"] = TQString::number(spreadCell->bottomBorderPen(column, row).color().blue()); docSpreadCellProperty["bgcolorname"] = spreadCell->bgColor(column, row).name(); - docSpreadCellProperty["bgcolorred"] = QString::number(spreadCell->bgColor(column, row).red()); - docSpreadCellProperty["bgcolorgreen"] = QString::number(spreadCell->bgColor(column, row).green()); - docSpreadCellProperty["bgcolorblue"] = QString::number(spreadCell->bgColor(column, row).blue()); - docSpreadCellProperty["bgbrushstyle"] = QString::number(spreadCell->backGroundBrush(column, row).style()); + docSpreadCellProperty["bgcolorred"] = TQString::number(spreadCell->bgColor(column, row).red()); + docSpreadCellProperty["bgcolorgreen"] = TQString::number(spreadCell->bgColor(column, row).green()); + docSpreadCellProperty["bgcolorblue"] = TQString::number(spreadCell->bgColor(column, row).blue()); + docSpreadCellProperty["bgbrushstyle"] = TQString::number(spreadCell->backGroundBrush(column, row).style()); docSpreadCellProperty["valueempty"] = (spreadCell->value().isEmpty()==0?"false":"true"); docSpreadCellProperty["valueboolean"] = (spreadCell->value().isBoolean()==0?"false":"true"); docSpreadCellProperty["valueinteger"] = (spreadCell->value().isInteger()==0?"false":"true"); @@ -321,8 +321,8 @@ KoFilter::ConversionStatus Leader::doSpreadCell(Cell*spreadCell, int column, int docSpreadCellProperty["valuestring"] = (spreadCell->value().isString()==0?"false":"true"); docSpreadCellProperty["valueerror"] = (spreadCell->value().isError()==0?"false":"true"); docSpreadCellProperty["valueasboolean"] = (spreadCell->value().asBoolean()==0?"false":"true"); - docSpreadCellProperty["valueasinteger"] = QString::number(spreadCell->value().asInteger()); - docSpreadCellProperty["valueasfloat"] = QString::number(spreadCell->value().asFloat()); + docSpreadCellProperty["valueasinteger"] = TQString::number(spreadCell->value().asInteger()); + docSpreadCellProperty["valueasfloat"] = TQString::number(spreadCell->value().asFloat()); docSpreadCellProperty["valueasstring"] = spreadCell->value().asString(); docSpreadCellProperty["valueasdatetime"] = spreadCell->value().asDateTime().toString(); docSpreadCellProperty["valueaserror"] = spreadCell->value().errorMessage(); diff --git a/filters/kspread/libkspreadexport/KSpreadLeader.h b/filters/kspread/libkspreadexport/KSpreadLeader.h index eee950b9..7e9abfed 100644 --- a/filters/kspread/libkspreadexport/KSpreadLeader.h +++ b/filters/kspread/libkspreadexport/KSpreadLeader.h @@ -78,10 +78,10 @@ private: protected: KSpreadBaseWorker *getWorker() const; - KoFilter::ConversionStatus doSpreadCell(Cell *spreadCell, int column, int row); - KoFilter::ConversionStatus doSpreadSheet(Sheet *spreadSheet); - KoFilter::ConversionStatus doSpreadBook(Doc *document); - KoFilter::ConversionStatus doInfo(KoDocumentInfo *info); + KoFilter::ConversiontqStatus doSpreadCell(Cell *spreadCell, int column, int row); + KoFilter::ConversiontqStatus doSpreadSheet(Sheet *spreadSheet); + KoFilter::ConversiontqStatus doSpreadBook(Doc *document); + KoFilter::ConversiontqStatus doInfo(KoDocumentInfo *info); public: /** @@ -97,7 +97,7 @@ public: * * @return status of the conversion. */ - KoFilter::ConversionStatus convert(); + KoFilter::ConversiontqStatus convert(); }; } // namespace KSpread diff --git a/filters/kspread/opencalc/opencalcexport.cc b/filters/kspread/opencalc/opencalcexport.cc index 20915b51..f38b0bb8 100644 --- a/filters/kspread/opencalc/opencalcexport.cc +++ b/filters/kspread/opencalc/opencalcexport.cc @@ -24,11 +24,11 @@ #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -55,7 +55,7 @@ using namespace KSpread; -typedef QValueList AreaList; +typedef TQValueList AreaList; class OpenCalcExportFactory : KGenericFactory { @@ -78,20 +78,20 @@ K_EXPORT_COMPONENT_FACTORY( libopencalcexport, OpenCalcExportFactory() ) return false; \ } while(0) -OpenCalcExport::OpenCalcExport( KoFilter *, const char *, const QStringList & ) +OpenCalcExport::OpenCalcExport( KoFilter *, const char *, const TQStringList & ) : KoFilter(), m_locale( 0 ) { } -KoFilter::ConversionStatus OpenCalcExport::convert( const QCString & from, - const QCString & to ) +KoFilter::ConversiontqStatus OpenCalcExport::convert( const TQCString & from, + const TQCString & to ) { /* later... KSpreadLeader * leader = new KSpreadLeader( m_chain ); OpenCalcWorker * worker = new OpenCalcWorker(); leader->setWorker( worker ); - KoFilter::ConversionStatus status = leader->convert(); + KoFilter::ConversiontqStatus status = leader->convert(); delete worker; delete leader; @@ -104,7 +104,7 @@ KoFilter::ConversionStatus OpenCalcExport::convert( const QCString & from, if ( !document ) return KoFilter::StupidError; - if ( !::qt_cast( document ) ) + if ( !::tqqt_cast( document ) ) { kdWarning(30518) << "document isn't a KSpread::Doc but a " << document->className() << endl; @@ -183,20 +183,20 @@ bool OpenCalcExport::exportDocInfo( KoStore * store, const Doc* ksdoc ) KoDocumentInfoAbout * aboutPage = static_cast( docInfo->page( "about" ) ); KoDocumentInfoAuthor * authorPage = static_cast( docInfo->page( "author" ) ); - QDomDocument meta; + TQDomDocument meta; meta.appendChild( meta.createProcessingInstruction( "xml","version=\"1.0\" encoding=\"UTF-8\"" ) ); - QDomElement content = meta.createElement( "office:document-meta" ); + TQDomElement content = meta.createElement( "office:document-meta" ); content.setAttribute( "xmlns:office", "http://openoffice.org/2000/office"); content.setAttribute( "xmlns:xlink", "http://www.w3.org/1999/xlink" ); content.setAttribute( "xmlns:dc", "http://purl.org/dc/elements/1.1/" ); content.setAttribute( "xmlns:meta", "http://openoffice.org/2000/meta" ); content.setAttribute( "office:version", "1.0" ); - QDomNode officeMeta = meta.createElement( "office:meta" ); + TQDomNode officeMeta = meta.createElement( "office:meta" ); - QDomElement data = meta.createElement( "meta:generator" ); - QString app( "KSpread " ); + TQDomElement data = meta.createElement( "meta:generator" ); + TQString app( "KSpread " ); app += KSpread::version; data.appendChild( meta.createTextNode( app ) ); officeMeta.appendChild( data ); @@ -214,7 +214,7 @@ bool OpenCalcExport::exportDocInfo( KoStore * store, const Doc* ksdoc ) officeMeta.appendChild( data ); data = meta.createElement( "meta:keywords" ); - QDomElement dataItem = meta.createElement( "meta:keyword" ); + TQDomElement dataItem = meta.createElement( "meta:keyword" ); dataItem.appendChild( meta.createTextNode( aboutPage->keywords() ) ); data.appendChild( dataItem ); officeMeta.appendChild( data ); @@ -227,7 +227,7 @@ bool OpenCalcExport::exportDocInfo( KoStore * store, const Doc* ksdoc ) data.appendChild( meta.createTextNode( aboutPage->subject() ) ); officeMeta.appendChild( data ); - const QDateTime dt ( QDateTime::currentDateTime() ); + const TQDateTime dt ( TQDateTime::tqcurrentDateTime() ); if ( dt.isValid() ) { data = meta.createElement( "dc:date" ); @@ -245,14 +245,14 @@ bool OpenCalcExport::exportDocInfo( KoStore * store, const Doc* ksdoc ) */ data = meta.createElement( "meta:document-statistic" ); - data.setAttribute( "meta:table-count", QString::number( ksdoc->map()->count() ) ); + data.setAttribute( "meta:table-count", TQString::number( ksdoc->map()->count() ) ); // TODO: data.setAttribute( "meta:cell-count", ); officeMeta.appendChild( data ); content.appendChild( officeMeta ); meta.appendChild( content ); - QCString doc( meta.toCString() ); + TQCString doc( meta.toCString() ); kdDebug(30518) << "Meta: " << doc << endl; store->write( doc, doc.length() ); @@ -268,32 +268,32 @@ bool OpenCalcExport::exportSettings( KoStore * store, const Doc * ksdoc ) if ( !store->open( "settings.xml" ) ) return false; - QDomDocument doc; + TQDomDocument doc; doc.appendChild( doc.createProcessingInstruction( "xml","version=\"1.0\" encoding=\"UTF-8\"" ) ); - QDomElement settings = doc.createElement( "office:document-settings" ); + TQDomElement settings = doc.createElement( "office:document-settings" ); settings.setAttribute( "xmlns:office", "http://openoffice.org/2000/office"); settings.setAttribute( "xmlns:xlink", "http://www.w3.org/1999/xlink" ); settings.setAttribute( "xmlns:config", "http://openoffice.org/2001/config" ); settings.setAttribute( "office:version", "1.0" ); - QDomElement begin = doc.createElement( "office:settings" ); + TQDomElement begin = doc.createElement( "office:settings" ); - QDomElement configItem = doc.createElement("config:config-item-set" ); + TQDomElement configItem = doc.createElement("config:config-item-set" ); configItem.setAttribute( "config:name", "view-settings" ); - QDomElement mapIndexed = doc.createElement( "config:config-item-map-indexed" ); + TQDomElement mapIndexed = doc.createElement( "config:config-item-map-indexed" ); mapIndexed.setAttribute("config:name", "Views" ); configItem.appendChild( mapIndexed ); - QDomElement mapItem = doc.createElement("config:config-item-map-entry" ); + TQDomElement mapItem = doc.createElement("config:config-item-map-entry" ); - QDomElement attribute = doc.createElement("config:config-item" ); + TQDomElement attribute = doc.createElement("config:config-item" ); attribute.setAttribute( "config:name", "ActiveTable" ); attribute.setAttribute( "config:type", "string" ); View * view = static_cast( ksdoc->views().getFirst()); - QString activeTable; + TQString activeTable; if ( view ) // no view if embedded document { Canvas * canvas = view->canvasWidget(); @@ -304,30 +304,30 @@ bool OpenCalcExport::exportSettings( KoStore * store, const Doc * ksdoc ) attribute.appendChild( doc.createTextNode( activeTable ) ); mapItem.appendChild( attribute ); - QDomElement configmaped = doc.createElement( "config:config-item-map-named" ); + TQDomElement configmaped = doc.createElement( "config:config-item-map-named" ); configmaped.setAttribute( "config:name","Tables" ); - QPtrListIterator it( ksdoc->map()->sheetList() ); + TQPtrListIterator it( ksdoc->map()->sheetList() ); for( ; it.current(); ++it ) { - QPoint marker; + TQPoint marker; if ( view ) { marker = view->markerFromSheet( *it ); } - QDomElement tmpItemMapNamed = doc.createElement( "config:config-item-map-entry" ); + TQDomElement tmpItemMapNamed = doc.createElement( "config:config-item-map-entry" ); tmpItemMapNamed.setAttribute( "config:name", ( *it )->tableName() ); - QDomElement sheetAttribute = doc.createElement( "config:config-item" ); + TQDomElement sheetAttribute = doc.createElement( "config:config-item" ); sheetAttribute.setAttribute( "config:name", "CursorPositionX" ); sheetAttribute.setAttribute( "config:type", "int" ); - sheetAttribute.appendChild( doc.createTextNode( QString::number(marker.x() ) ) ); + sheetAttribute.appendChild( doc.createTextNode( TQString::number(marker.x() ) ) ); tmpItemMapNamed.appendChild( sheetAttribute ); sheetAttribute = doc.createElement( "config:config-item" ); sheetAttribute.setAttribute( "config:name", "CursorPositionY" ); sheetAttribute.setAttribute( "config:type", "int" ); - sheetAttribute.appendChild( doc.createTextNode( QString::number(marker.y() ) ) ); + sheetAttribute.appendChild( doc.createTextNode( TQString::number(marker.y() ) ) ); tmpItemMapNamed.appendChild( sheetAttribute ); configmaped.appendChild( tmpItemMapNamed ); @@ -344,7 +344,7 @@ bool OpenCalcExport::exportSettings( KoStore * store, const Doc * ksdoc ) doc.appendChild( settings ); - QCString f( doc.toCString() ); + TQCString f( doc.toCString() ); kdDebug(30518) << "Settings: " << (char const * ) f << endl; store->write( f, f.length() ); @@ -362,10 +362,10 @@ bool OpenCalcExport::exportContent( KoStore * store, const Doc * ksdoc ) createDefaultStyles(); - QDomDocument doc; + TQDomDocument doc; doc.appendChild( doc.createProcessingInstruction( "xml","version=\"1.0\" encoding=\"UTF-8\"" ) ); - QDomElement content = doc.createElement( "office:document-content" ); + TQDomElement content = doc.createElement( "office:document-content" ); content.setAttribute( "xmlns:office", "http://openoffice.org/2000/office"); content.setAttribute( "xmlns:style", "http://openoffice.org/2000/style" ); content.setAttribute( "xmlns:text", "http://openoffice.org/2000/text" ); @@ -383,7 +383,7 @@ bool OpenCalcExport::exportContent( KoStore * store, const Doc * ksdoc ) content.setAttribute( "office:class", "spreadsheet" ); content.setAttribute( "office:version", "1.0" ); - QDomElement data = doc.createElement( "office:script" ); + TQDomElement data = doc.createElement( "office:script" ); content.appendChild( data ); if ( !exportBody( doc, content, ksdoc ) ) @@ -391,7 +391,7 @@ bool OpenCalcExport::exportContent( KoStore * store, const Doc * ksdoc ) doc.appendChild( content ); - QCString f( doc.toCString() ); + TQCString f( doc.toCString() ); kdDebug(30518) << "Content: " << (char const * ) f << endl; store->write( f, f.length() ); @@ -402,7 +402,7 @@ bool OpenCalcExport::exportContent( KoStore * store, const Doc * ksdoc ) return true; } -void exportNamedExpr( QDomDocument & doc, QDomElement & parent, +void exportNamedExpr( TQDomDocument & doc, TQDomElement & tqparent, AreaList const & namedAreas ) { AreaList::const_iterator it = namedAreas.begin(); @@ -410,7 +410,7 @@ void exportNamedExpr( QDomDocument & doc, QDomElement & parent, while ( it != end ) { - QDomElement namedRange = doc.createElement( "table:named-range" ); + TQDomElement namedRange = doc.createElement( "table:named-range" ); Reference ref = *it; @@ -418,34 +418,34 @@ void exportNamedExpr( QDomDocument & doc, QDomElement & parent, namedRange.setAttribute( "table:base-cell-address", convertRefToBase( ref.sheet_name, ref.rect ) ); namedRange.setAttribute( "table:cell-range-address", convertRefToRange( ref.sheet_name, ref.rect ) ); - parent.appendChild( namedRange ); + tqparent.appendChild( namedRange ); ++it; } } -bool OpenCalcExport::exportBody( QDomDocument & doc, QDomElement & content, const Doc * ksdoc ) +bool OpenCalcExport::exportBody( TQDomDocument & doc, TQDomElement & content, const Doc * ksdoc ) { - QDomElement fontDecls = doc.createElement( "office:font-decls" ); - QDomElement autoStyles = doc.createElement( "office:automatic-styles" ); - QDomElement body = doc.createElement( "office:body" ); + TQDomElement fontDecls = doc.createElement( "office:font-decls" ); + TQDomElement autoStyles = doc.createElement( "office:automatic-styles" ); + TQDomElement body = doc.createElement( "office:body" ); if ( ksdoc->map()->isProtected() ) { body.setAttribute( "table:structure-protected", "true" ); - QCString passwd; + TQCString passwd; ksdoc->map()->password( passwd ); if ( passwd.length() > 0 ) { - QCString str( KCodecs::base64Encode( passwd ) ); - body.setAttribute( "table:protection-key", QString( str.data() ) ); + TQCString str( KCodecs::base64Encode( passwd ) ); + body.setAttribute( "table:protection-key", TQString( str.data() ) ); } } - QPtrListIterator it( ksdoc->map()->sheetList() ); + TQPtrListIterator it( ksdoc->map()->sheetList() ); for( it.toFirst(); it.current(); ++it ) { @@ -456,37 +456,37 @@ bool OpenCalcExport::exportBody( QDomDocument & doc, QDomElement & content, cons ts.visible = !sheet->isHidden(); - QDomElement tabElem = doc.createElement( "table:table" ); + TQDomElement tabElem = doc.createElement( "table:table" ); tabElem.setAttribute( "table:style-name", m_styles.sheetStyle( ts ) ); if ( sheet->isProtected() ) { tabElem.setAttribute( "table:protected", "true" ); - QCString passwd; + TQCString passwd; sheet->password( passwd ); if ( passwd.length() > 0 ) { - QCString str( KCodecs::base64Encode( passwd ) ); - tabElem.setAttribute( "table:protection-key", QString( str.data() ) ); + TQCString str( KCodecs::base64Encode( passwd ) ); + tabElem.setAttribute( "table:protection-key", TQString( str.data() ) ); } } - QString name( sheet->tableName() ); + TQString name( sheet->tableName() ); - int n = name.find( ' ' ); + int n = name.tqfind( ' ' ); if ( n != -1 ) { kdDebug(30518) << "Sheet name converting: " << name << endl; name[n] == '_'; kdDebug(30518) << "Sheet name converted: " << name << endl; } - name = name.replace( ' ', "_" ); + name = name.tqreplace( ' ', "_" ); - QRect _printRange = sheet->print()->printRange(); - if ( _printRange != ( QRect( QPoint( 1, 1 ), QPoint( KS_colMax, KS_rowMax ) ) ) ) + TQRect _printRange = sheet->print()->printRange(); + if ( _printRange != ( TQRect( TQPoint( 1, 1 ), TQPoint( KS_colMax, KS_rowMax ) ) ) ) { - QString range= convertRangeToRef( name, _printRange ); + TQString range= convertRangeToRef( name, _printRange ); //kdDebug(30518)<<" range : "<listArea(); if ( namedAreas.count() > 0 ) { - QDomElement namedExpr = doc.createElement( "table:named-expressions" ); + TQDomElement namedExpr = doc.createElement( "table:named-expressions" ); exportNamedExpr( doc, namedExpr, namedAreas ); body.appendChild( namedExpr ); @@ -523,7 +523,7 @@ bool OpenCalcExport::exportBody( QDomDocument & doc, QDomElement & content, cons return true; } -void OpenCalcExport::exportSheet( QDomDocument & doc, QDomElement & tabElem, +void OpenCalcExport::exportSheet( TQDomDocument & doc, TQDomElement & tabElem, const Sheet * sheet, int maxCols, int maxRows ) { kdDebug(30518) << "exportSheet: " << sheet->tableName() << endl; @@ -553,14 +553,14 @@ void OpenCalcExport::exportSheet( QDomDocument & doc, QDomElement & tabElem, ++j; } - QDomElement colElem = doc.createElement( "table:table-column" ); + TQDomElement colElem = doc.createElement( "table:table-column" ); colElem.setAttribute( "table:style-name", m_styles.columnStyle( cs ) ); colElem.setAttribute( "table:default-cell-style-name", "Default" );//todo fixme create style from cell if ( hide ) colElem.setAttribute( "table:visibility", "collapse" ); if ( repeated > 1 ) - colElem.setAttribute( "table:number-columns-repeated", QString::number( repeated ) ); + colElem.setAttribute( "table:number-columns-repeated", TQString::number( repeated ) ); tabElem.appendChild( colElem ); i += repeated; @@ -573,7 +573,7 @@ void OpenCalcExport::exportSheet( QDomDocument & doc, QDomElement & tabElem, rs.breakB = ::Style::automatic; rs.size = row->mmHeight() / 10; - QDomElement rowElem = doc.createElement( "table:table-row" ); + TQDomElement rowElem = doc.createElement( "table:table-row" ); rowElem.setAttribute( "table:style-name", m_styles.rowStyle( rs ) ); if ( row->isHide() ) rowElem.setAttribute( "table:visibility", "collapse" ); @@ -584,7 +584,7 @@ void OpenCalcExport::exportSheet( QDomDocument & doc, QDomElement & tabElem, } } -void OpenCalcExport::exportCells( QDomDocument & doc, QDomElement & rowElem, +void OpenCalcExport::exportCells( TQDomDocument & doc, TQDomElement & rowElem, const Sheet *sheet, int row, int maxCols ) { int i = 1; @@ -593,14 +593,14 @@ void OpenCalcExport::exportCells( QDomDocument & doc, QDomElement & rowElem, int repeated = 1; bool hasComment = false; const Cell* cell = sheet->cellAt( i, row ); - QDomElement cellElem; + TQDomElement cellElem; if ( !cell->isPartOfMerged() ) cellElem = doc.createElement( "table:table-cell" ); else cellElem = doc.createElement( "table:covered-table-cell" ); - QFont font; + TQFont font; Value const value( cell->value() ); if ( !cell->isDefault() ) { @@ -635,7 +635,7 @@ void OpenCalcExport::exportCells( QDomDocument & doc, QDomElement & rowElem, ++j; } if ( repeated > 1 ) - cellElem.setAttribute( "table:number-columns-repeated", QString::number( repeated ) ); + cellElem.setAttribute( "table:number-columns-repeated", TQString::number( repeated ) ); } if ( value.isBoolean() ) @@ -654,7 +654,7 @@ void OpenCalcExport::exportCells( QDomDocument & doc, QDomElement & rowElem, else cellElem.setAttribute( "table:value-type", "float" ); - cellElem.setAttribute( "table:value", QString::number( value.asFloat() ) ); + cellElem.setAttribute( "table:value", TQString::number( value.asFloat() ) ); } else { @@ -665,15 +665,15 @@ void OpenCalcExport::exportCells( QDomDocument & doc, QDomElement & rowElem, { kdDebug(30518) << "Formula found" << endl; - QString formula( convertFormula( cell->text() ) ); + TQString formula( convertFormula( cell->text() ) ); cellElem.setAttribute( "table:formula", formula ); } else if ( !cell->link().isEmpty() ) { - QDomElement link = doc.createElement( "text:p" ); - QDomElement linkref = doc.createElement( "text:a" ); + TQDomElement link = doc.createElement( "text:p" ); + TQDomElement linkref = doc.createElement( "text:a" ); - QString tmp = cell->link(); + TQString tmp = cell->link(); if ( localReferenceAnchor( tmp ) ) linkref.setAttribute( "xlink:href", ( "#"+tmp ) ); else @@ -686,7 +686,7 @@ void OpenCalcExport::exportCells( QDomDocument & doc, QDomElement & rowElem, } else if ( !cell->isEmpty() ) { - QDomElement textElem = doc.createElement( "text:p" ); + TQDomElement textElem = doc.createElement( "text:p" ); textElem.appendChild( doc.createTextNode( cell->strOutText() ) ); cellElem.appendChild( textElem ); @@ -699,17 +699,17 @@ void OpenCalcExport::exportCells( QDomDocument & doc, QDomElement & rowElem, int rowSpan = cell->mergedYCells() + 1; if ( colSpan > 1 ) - cellElem.setAttribute( "table:number-columns-spanned", QString::number( colSpan ) ); + cellElem.setAttribute( "table:number-columns-spanned", TQString::number( colSpan ) ); if ( rowSpan > 1 ) - cellElem.setAttribute( "table:number-rows-spanned", QString::number( rowSpan ) ); + cellElem.setAttribute( "table:number-rows-spanned", TQString::number( rowSpan ) ); } if ( hasComment ) { - QString comment( cell->format()->comment( i, row ) ); - QDomElement annotation = doc.createElement( "office:annotation" ); - QDomElement text = doc.createElement( "text:p" ); + TQString comment( cell->format()->comment( i, row ) ); + TQDomElement annotation = doc.createElement( "office:annotation" ); + TQDomElement text = doc.createElement( "text:p" ); text.appendChild( doc.createTextNode( comment ) ); annotation.appendChild( text ); @@ -764,10 +764,10 @@ bool OpenCalcExport::exportStyles( KoStore * store, const Doc *ksdoc ) if ( !store->open( "styles.xml" ) ) return false; - QDomDocument doc; + TQDomDocument doc; doc.appendChild( doc.createProcessingInstruction( "xml","version=\"1.0\" encoding=\"UTF-8\"" ) ); - QDomElement content = doc.createElement( "office:document-styles" ); + TQDomElement content = doc.createElement( "office:document-styles" ); content.setAttribute( "xmlns:office", "http://openoffice.org/2000/office" ); content.setAttribute( "xmlns:style", "http://openoffice.org/2000/style" ); content.setAttribute( "xmlns:text", "http://openoffice.org/2000/text" ); @@ -785,24 +785,24 @@ bool OpenCalcExport::exportStyles( KoStore * store, const Doc *ksdoc ) content.setAttribute( "office:version", "1.0" ); // order important here! - QDomElement officeStyles = doc.createElement( "office:styles" ); + TQDomElement officeStyles = doc.createElement( "office:styles" ); exportDefaultCellStyle( doc, officeStyles ); - QDomElement fontDecls = doc.createElement( "office:font-decls" ); + TQDomElement fontDecls = doc.createElement( "office:font-decls" ); m_styles.writeFontDecl( doc, fontDecls ); // TODO: needs in new number/date/time parser... // exportDefaultNumberStyles( doc, officeStyles ); - QDomElement defaultStyle = doc.createElement( "style:style" ); + TQDomElement defaultStyle = doc.createElement( "style:style" ); defaultStyle.setAttribute( "style:name", "Default" ); defaultStyle.setAttribute( "style:family", "table-cell" ); officeStyles.appendChild( defaultStyle ); - QDomElement autoStyles = doc.createElement( "office:automatic-styles" ); + TQDomElement autoStyles = doc.createElement( "office:automatic-styles" ); exportPageAutoStyles( doc, autoStyles, ksdoc ); - QDomElement masterStyles = doc.createElement( "office:master-styles" ); + TQDomElement masterStyles = doc.createElement( "office:master-styles" ); exportMasterStyles( doc, masterStyles, ksdoc ); content.appendChild( fontDecls ); @@ -812,7 +812,7 @@ bool OpenCalcExport::exportStyles( KoStore * store, const Doc *ksdoc ) doc.appendChild( content ); - QCString f( doc.toCString() ); + TQCString f( doc.toCString() ); kdDebug(30518) << "Content: " << (char const * ) f << endl; store->write( f, f.length() ); @@ -823,9 +823,9 @@ bool OpenCalcExport::exportStyles( KoStore * store, const Doc *ksdoc ) return true; } -void OpenCalcExport::exportDefaultCellStyle( QDomDocument & doc, QDomElement & officeStyles ) +void OpenCalcExport::exportDefaultCellStyle( TQDomDocument & doc, TQDomElement & officeStyles ) { - QDomElement defStyle = doc.createElement( "style:default-style" ); + TQDomElement defStyle = doc.createElement( "style:default-style" ); defStyle.setAttribute( "style:family", "table-cell" ); KoDocument * document = m_chain->inputDocument(); @@ -833,19 +833,19 @@ void OpenCalcExport::exportDefaultCellStyle( QDomDocument & doc, QDomElement & o Format * format = new Format( 0, ksdoc->styleManager()->defaultStyle() ); const KLocale *locale = ksdoc->locale(); - QString language; - QString country; - QString charSet; + TQString language; + TQString country; + TQString charSet; - QString l( locale->language() ); + TQString l( locale->language() ); KLocale::splitLocale( l, language, country, charSet ); - QFont font( format->font() ); + TQFont font( format->font() ); m_styles.addFont( font, true ); - QDomElement style = doc.createElement( "style:properties" ); + TQDomElement style = doc.createElement( "style:properties" ); style.setAttribute( "style:font-name", font.family() ); - style.setAttribute( "fo:font-size", QString( "%1pt" ).arg( font.pointSize() ) ); - style.setAttribute( "style:decimal-places", QString::number( locale->fracDigits() ) ); + style.setAttribute( "fo:font-size", TQString( "%1pt" ).tqarg( font.pointSize() ) ); + style.setAttribute( "style:decimal-places", TQString::number( locale->fracDigits() ) ); style.setAttribute( "fo:language", language ); style.setAttribute( "fo:country", country ); style.setAttribute( "style:font-name-asian", "HG Mincho Light J" ); @@ -866,10 +866,10 @@ void OpenCalcExport::createDefaultStyles() // TODO: default number styles, currency styles,... } -void OpenCalcExport::exportPageAutoStyles( QDomDocument & doc, QDomElement & autoStyles, +void OpenCalcExport::exportPageAutoStyles( TQDomDocument & doc, TQDomElement & autoStyles, const Doc *ksdoc ) { - QPtrListIterator it( ksdoc->map()->sheetList() ); + TQPtrListIterator it( ksdoc->map()->sheetList() ); const Sheet * sheet = it.toFirst(); float width = 20.999; @@ -881,13 +881,13 @@ void OpenCalcExport::exportPageAutoStyles( QDomDocument & doc, QDomElement & aut height = sheet->print()->paperHeight() / 10; } - QString sWidth = QString( "%1cm" ).arg( width ); - QString sHeight = QString( "%1cm" ).arg( height ); + TQString sWidth = TQString( "%1cm" ).tqarg( width ); + TQString sHeight = TQString( "%1cm" ).tqarg( height ); - QDomElement pageMaster = doc.createElement( "style:page-master" ); + TQDomElement pageMaster = doc.createElement( "style:page-master" ); pageMaster.setAttribute( "style:name", "pm1" ); - QDomElement properties = doc.createElement( "style:properties" ); + TQDomElement properties = doc.createElement( "style:properties" ); properties.setAttribute( "fo:page-width", sWidth ); properties.setAttribute( "fo:page-height", sHeight ); properties.setAttribute( "fo:border", "0.002cm solid #000000" ); @@ -896,7 +896,7 @@ void OpenCalcExport::exportPageAutoStyles( QDomDocument & doc, QDomElement & aut pageMaster.appendChild( properties ); - QDomElement header = doc.createElement( "style:header-style" ); + TQDomElement header = doc.createElement( "style:header-style" ); properties = doc.createElement( "style:properties" ); properties.setAttribute( "fo:min-height", "0.75cm" ); properties.setAttribute( "fo:margin-left", "0cm" ); @@ -905,7 +905,7 @@ void OpenCalcExport::exportPageAutoStyles( QDomDocument & doc, QDomElement & aut header.appendChild( properties ); - QDomElement footer = doc.createElement( "style:header-style" ); + TQDomElement footer = doc.createElement( "style:header-style" ); properties = doc.createElement( "style:properties" ); properties.setAttribute( "fo:min-height", "0.75cm" ); properties.setAttribute( "fo:margin-left", "0cm" ); @@ -920,22 +920,22 @@ void OpenCalcExport::exportPageAutoStyles( QDomDocument & doc, QDomElement & aut autoStyles.appendChild( pageMaster ); } -void OpenCalcExport::exportMasterStyles( QDomDocument & doc, QDomElement & masterStyles, +void OpenCalcExport::exportMasterStyles( TQDomDocument & doc, TQDomElement & masterStyles, const Doc * ksdoc ) { - QDomElement masterPage = doc.createElement( "style:master-page" ); + TQDomElement masterPage = doc.createElement( "style:master-page" ); masterPage.setAttribute( "style:name", "Default" ); masterPage.setAttribute( "style:page-master-name", "pm1" ); - QPtrListIterator it( ksdoc->map()->sheetList() ); + TQPtrListIterator it( ksdoc->map()->sheetList() ); const Sheet * sheet = it.toFirst(); - QString headerLeft; - QString headerCenter; - QString headerRight; - QString footerLeft; - QString footerCenter; - QString footerRight; + TQString headerLeft; + TQString headerCenter; + TQString headerRight; + TQString footerLeft; + TQString footerCenter; + TQString footerRight; if ( sheet ) { @@ -950,19 +950,19 @@ void OpenCalcExport::exportMasterStyles( QDomDocument & doc, QDomElement & maste if ( ( headerLeft.length() > 0 ) || ( headerCenter.length() > 0 ) || ( headerRight.length() > 0 ) ) { - QDomElement header = doc.createElement( "style:header" ); - QDomElement left = doc.createElement( "style:region-left" ); - QDomElement text = doc.createElement( "text:p" ); + TQDomElement header = doc.createElement( "style:header" ); + TQDomElement left = doc.createElement( "style:region-left" ); + TQDomElement text = doc.createElement( "text:p" ); convertPart( headerLeft, doc, text, ksdoc ); left.appendChild( text ); - QDomElement center = doc.createElement( "style:region-center" ); - QDomElement text1 = doc.createElement( "text:p" ); + TQDomElement center = doc.createElement( "style:region-center" ); + TQDomElement text1 = doc.createElement( "text:p" ); convertPart( headerCenter, doc, text1, ksdoc ); center.appendChild( text1 ); - QDomElement right = doc.createElement( "style:region-right" ); - QDomElement text2 = doc.createElement( "text:p" ); + TQDomElement right = doc.createElement( "style:region-right" ); + TQDomElement text2 = doc.createElement( "text:p" ); convertPart( headerRight, doc, text2, ksdoc ); right.appendChild( text2 ); @@ -974,9 +974,9 @@ void OpenCalcExport::exportMasterStyles( QDomDocument & doc, QDomElement & maste } else { - QDomElement header = doc.createElement( "style:header" ); - QDomElement text = doc.createElement( "text:p" ); - QDomElement name = doc.createElement( "text:sheet-name" ); + TQDomElement header = doc.createElement( "style:header" ); + TQDomElement text = doc.createElement( "text:p" ); + TQDomElement name = doc.createElement( "text:sheet-name" ); name.appendChild( doc.createTextNode( "???" ) ); text.appendChild( name ); header.appendChild( text ); @@ -987,19 +987,19 @@ void OpenCalcExport::exportMasterStyles( QDomDocument & doc, QDomElement & maste if ( ( footerLeft.length() > 0 ) || ( footerCenter.length() > 0 ) || ( footerRight.length() > 0 ) ) { - QDomElement footer = doc.createElement( "style:footer" ); - QDomElement left = doc.createElement( "style:region-left" ); - QDomElement text = doc.createElement( "text:p" ); + TQDomElement footer = doc.createElement( "style:footer" ); + TQDomElement left = doc.createElement( "style:region-left" ); + TQDomElement text = doc.createElement( "text:p" ); convertPart( footerLeft, doc, text, ksdoc ); left.appendChild( text ); - QDomElement center = doc.createElement( "style:region-center" ); - QDomElement text1 = doc.createElement( "text:p" ); + TQDomElement center = doc.createElement( "style:region-center" ); + TQDomElement text1 = doc.createElement( "text:p" ); convertPart( footerCenter, doc, text1, ksdoc ); center.appendChild( text1 ); - QDomElement right = doc.createElement( "style:region-right" ); - QDomElement text2 = doc.createElement( "text:p" ); + TQDomElement right = doc.createElement( "style:region-right" ); + TQDomElement text2 = doc.createElement( "text:p" ); convertPart( footerRight, doc, text2, ksdoc ); right.appendChild( text2 ); @@ -1011,10 +1011,10 @@ void OpenCalcExport::exportMasterStyles( QDomDocument & doc, QDomElement & maste } else { - QDomElement footer = doc.createElement( "style:footer" ); - QDomElement text = doc.createElement( "text:p" ); + TQDomElement footer = doc.createElement( "style:footer" ); + TQDomElement text = doc.createElement( "text:p" ); text.appendChild( doc.createTextNode( i18n( "Page " ) ) ); - QDomElement number = doc.createElement( "text:page-number" ); + TQDomElement number = doc.createElement( "text:page-number" ); number.appendChild( doc.createTextNode( "1" ) ); text.appendChild( number ); footer.appendChild( text ); @@ -1025,18 +1025,18 @@ void OpenCalcExport::exportMasterStyles( QDomDocument & doc, QDomElement & maste masterStyles.appendChild( masterPage ); } -void OpenCalcExport::addText( QString const & text, QDomDocument & doc, - QDomElement & parent ) +void OpenCalcExport::addText( TQString const & text, TQDomDocument & doc, + TQDomElement & tqparent ) { if (text.length() > 0 ) - parent.appendChild( doc.createTextNode( text ) ); + tqparent.appendChild( doc.createTextNode( text ) ); } -void OpenCalcExport::convertPart( QString const & part, QDomDocument & doc, - QDomElement & parent, const Doc * ksdoc ) +void OpenCalcExport::convertPart( TQString const & part, TQDomDocument & doc, + TQDomElement & tqparent, const Doc * ksdoc ) { - QString text; - QString var; + TQString text; + TQString var; bool inVar = false; uint i = 0; @@ -1052,54 +1052,54 @@ void OpenCalcExport::convertPart( QString const & part, QDomDocument & doc, inVar = false; if ( var == "" ) { - addText( text, doc, parent ); + addText( text, doc, tqparent ); - QDomElement page = doc.createElement( "text:page-number" ); + TQDomElement page = doc.createElement( "text:page-number" ); page.appendChild( doc.createTextNode( "1" ) ); - parent.appendChild( page ); + tqparent.appendChild( page ); } else if ( var == "" ) { - addText( text, doc, parent ); + addText( text, doc, tqparent ); - QDomElement page = doc.createElement( "text:page-count" ); + TQDomElement page = doc.createElement( "text:page-count" ); page.appendChild( doc.createTextNode( "99" ) ); - parent.appendChild( page ); + tqparent.appendChild( page ); } else if ( var == "" ) { - addText( text, doc, parent ); + addText( text, doc, tqparent ); - QDomElement t = doc.createElement( "text:date" ); + TQDomElement t = doc.createElement( "text:date" ); t.setAttribute( "text:date-value", "0-00-00" ); // todo: "style:data-style-name", "N2" - t.appendChild( doc.createTextNode( QDate::currentDate().toString() ) ); - parent.appendChild( t ); + t.appendChild( doc.createTextNode( TQDate::tqcurrentDate().toString() ) ); + tqparent.appendChild( t ); } else if ( var == "
Jan 12, 2003 - Initial Revision
- Jan 18, 2003 - page layout, header, footer
+ Jan 18, 2003 - page tqlayout, header, footer
Jan 19, 2003 - Added support for fonts, text color, background color, formula conversion
- Jan 19, 2003 - text alignment, indents, comments, NoPrint, Merged Cells
+ Jan 19, 2003 - text tqalignment, indents, comments, NoPrint, Merged Cells
Jan 19, 2003 - angle, vertical text, text wrap
Jan 19, 2003 - named area, hidden columns and rows
Jan 20, 2003 - cell borders
diff --git a/filters/kspread/qpro/libqpro/qpro/common.h b/filters/kspread/qpro/libqpro/qpro/common.h index a312d632..644ab1ce 100644 --- a/filters/kspread/qpro/libqpro/qpro/common.h +++ b/filters/kspread/qpro/libqpro/qpro/common.h @@ -1,11 +1,11 @@ -#ifndef QPRO_COMMON_H -#define QPRO_COMMON_H +#ifndef TQPRO_COMMON_H +#define TQPRO_COMMON_H -#ifdef QP_TRACE -#define QP_DEBUG(x) cerr << x +#ifdef TQP_TRACE +#define TQP_DEBUG(x) cerr << x #else -#define QP_DEBUG(x) +#define TQP_DEBUG(x) #endif -#endif // QPRO_COMMON_H +#endif // TQPRO_COMMON_H diff --git a/filters/kspread/qpro/libqpro/qpro/formula.h b/filters/kspread/qpro/libqpro/qpro/formula.h index 6edd52b5..a0af2af6 100644 --- a/filters/kspread/qpro/libqpro/qpro/formula.h +++ b/filters/kspread/qpro/libqpro/qpro/formula.h @@ -1,5 +1,5 @@ -#ifndef QPRO_FORMULA_H -#define QPRO_FORMULA_H +#ifndef TQPRO_FORMULA_H +#define TQPRO_FORMULA_H #include #include @@ -35,7 +35,7 @@ protected: struct QpFormulaConv { - QP_INT8 cOperand; + TQP_INT8 cOperand; void (*cFunc)(QpFormula& pThis, const char* pArg); const char* cArg; }; @@ -125,4 +125,4 @@ protected: void unaryOperandReal(const char* pOper); }; -#endif // QPRO_FORMULA_H +#endif // TQPRO_FORMULA_H diff --git a/filters/kspread/qpro/libqpro/qpro/record.h b/filters/kspread/qpro/libqpro/qpro/record.h index a7aeb505..37321d30 100644 --- a/filters/kspread/qpro/libqpro/qpro/record.h +++ b/filters/kspread/qpro/libqpro/qpro/record.h @@ -1,5 +1,5 @@ -#ifndef QPRO_RECORD_H -#define QPRO_RECORD_H +#ifndef TQPRO_RECORD_H +#define TQPRO_RECORD_H #include #include @@ -29,28 +29,28 @@ public: QpRec(QpRecType pType); ~QpRec(); - QP_INT16 type(); + TQP_INT16 type(); protected: - QP_INT16 cType; + TQP_INT16 cType; }; // ----------------------------------------------------------------------- -//class QP_CELL_REF +//class TQP_CELL_REF //{ //public: -// QP_CELL_REF(QpIStream& pIn); -// ~QP_CELL_REF(); +// TQP_CELL_REF(QpIStream& pIn); +// ~TQP_CELL_REF(); // -// QP_UINT8 Column(); -// QP_INT16 Row(); +// TQP_UINT8 Column(); +// TQP_INT16 Row(); // //protected: -// QP_UINT8 cColumn; -// QP_INT16 cNoteBook; -// QP_INT8 cPage; -// QP_INT16 cRow; +// TQP_UINT8 cColumn; +// TQP_INT16 cNoteBook; +// TQP_INT8 cPage; +// TQP_INT16 cRow; //}; // ----------------------------------------------------------------------- @@ -61,26 +61,26 @@ public: QpRecCell(QpRecType pType); ~QpRecCell(); - void attributes(QP_INT16 pAttributes); - QP_INT16 attributes(); + void attributes(TQP_INT16 pAttributes); + TQP_INT16 attributes(); // const char* cellRef(); - void cellRef(char* pText, QpTableNames& pTable, QP_INT16 pNoteBook, QP_UINT8 pPage, QP_UINT8 pColumn, QP_INT16 pRow); + void cellRef(char* pText, QpTableNames& pTable, TQP_INT16 pNoteBook, TQP_UINT8 pPage, TQP_UINT8 pColumn, TQP_INT16 pRow); void cellRef(char* pText, QpTableNames& pTable, QpIStream& pFormulaRef); - void column(QP_UINT8 pColumn); - QP_UINT8 column(); + void column(TQP_UINT8 pColumn); + TQP_UINT8 column(); - void row(QP_INT16 pRow); - QP_INT16 row(); + void row(TQP_INT16 pRow); + TQP_INT16 row(); protected: int loadCellInfo(QpIStream& pIn); - QP_INT16 cAttributes; - QP_UINT8 cColumn; - QP_UINT8 cPage; - QP_INT16 cRow; + TQP_INT16 cAttributes; + TQP_UINT8 cColumn; + TQP_UINT8 cPage; + TQP_INT16 cRow; char* cCellRef; }; @@ -89,14 +89,14 @@ protected: class QpRecBof : public QpRec { public: - QpRecBof(QP_INT16 pLen, QpIStream& pIn); + QpRecBof(TQP_INT16 pLen, QpIStream& pIn); ~QpRecBof(); - void fileFormat(QP_INT16 pFileFormat); - QP_INT16 fileFormat(); + void fileFormat(TQP_INT16 pFileFormat); + TQP_INT16 fileFormat(); protected: - QP_INT16 cFileFormat; + TQP_INT16 cFileFormat; }; // ----------------------------------------------------------------------- @@ -104,7 +104,7 @@ protected: class QpRecEof : public QpRec { public: - QpRecEof(QP_INT16 pLen, QpIStream& pIn); + QpRecEof(TQP_INT16 pLen, QpIStream& pIn); ~QpRecEof(); }; @@ -116,7 +116,7 @@ class QpRecRecalcMode : public QpRec public: enum MODE{Manual=0, Background=1, Automatic=255}; - QpRecRecalcMode(QP_INT16 pLen, QpIStream& pIn); + QpRecRecalcMode(TQP_INT16 pLen, QpIStream& pIn); ~QpRecRecalcMode(); void mode(MODE pMode); @@ -134,7 +134,7 @@ class QpRecRecalcOrder : public QpRec public: enum ORDER { Natural=0, Column=1, Row=255 }; - QpRecRecalcOrder(QP_INT16 pLen, QpIStream& pIn); + QpRecRecalcOrder(TQP_INT16 pLen, QpIStream& pIn); ~QpRecRecalcOrder(); void order(ORDER pOrder); @@ -157,7 +157,7 @@ protected: class QpRecEmptyCell : public QpRecCell { public: - QpRecEmptyCell(QP_INT16 pLen, QpIStream& pIn); + QpRecEmptyCell(TQP_INT16 pLen, QpIStream& pIn); ~QpRecEmptyCell(); }; @@ -167,13 +167,13 @@ public: class QpRecIntegerCell : public QpRecCell { public: - QpRecIntegerCell(QP_INT16 pLen, QpIStream& pIn); + QpRecIntegerCell(TQP_INT16 pLen, QpIStream& pIn); ~QpRecIntegerCell(); - QP_INT16 integer(); + TQP_INT16 integer(); protected: - QP_INT16 cInt; + TQP_INT16 cInt; }; // ----------------------------------------------------------------------- @@ -181,12 +181,12 @@ protected: class QpRecFloatingPointCell : public QpRecCell { public: - QpRecFloatingPointCell(QP_INT16 pLen, QpIStream& pIn); + QpRecFloatingPointCell(TQP_INT16 pLen, QpIStream& pIn); ~QpRecFloatingPointCell(); - QP_INT64 value(); + TQP_INT64 value(); protected: - QP_INT64 cValue; + TQP_INT64 cValue; }; // ----------------------------------------------------------------------- @@ -194,19 +194,19 @@ protected: class QpRecFormulaCell : public QpRecCell { public: - QpRecFormulaCell(QP_INT16 pLen, QpIStream& pIn); + QpRecFormulaCell(TQP_INT16 pLen, QpIStream& pIn); ~QpRecFormulaCell(); const char* formula(); - QP_INT16 formulaReferences(); - QP_INT16 formulaLen(); + TQP_INT16 formulaReferences(); + TQP_INT16 formulaLen(); protected: - QP_INT16 cCellRef; + TQP_INT16 cCellRef; char* cFormula; - QP_INT64 cLastValue; - QP_INT16 cLen; - QP_INT16 cState; + TQP_INT64 cLastValue; + TQP_INT16 cLen; + TQP_INT16 cState; }; // ----------------------------------------------------------------------- @@ -214,7 +214,7 @@ protected: class QpRecLabelCell : public QpRecCell { public: - QpRecLabelCell(QP_INT16 pLen, QpIStream& pIn); + QpRecLabelCell(TQP_INT16 pLen, QpIStream& pIn); ~QpRecLabelCell(); char labelPrefix(); @@ -230,7 +230,7 @@ protected: class QpRecUnknown : public QpRec { public: - QpRecUnknown(QP_INT16 pType, QP_INT16 pLen, QpIStream& pIn); + QpRecUnknown(TQP_INT16 pType, TQP_INT16 pLen, QpIStream& pIn); ~QpRecUnknown(); }; @@ -239,13 +239,13 @@ public: class QpRecBop : public QpRec { public: - QpRecBop(QP_INT16 pLen, QpIStream& pIn); + QpRecBop(TQP_INT16 pLen, QpIStream& pIn); ~QpRecBop(); - QP_UINT8 pageIndex(); + TQP_UINT8 pageIndex(); protected: - QP_UINT8 cPageIndex; + TQP_UINT8 cPageIndex; }; // ----------------------------------------------------------------------- @@ -253,7 +253,7 @@ protected: class QpRecPageName : public QpRec { public: - QpRecPageName(QP_INT16 pLen, QpIStream& pIn); + QpRecPageName(TQP_INT16 pLen, QpIStream& pIn); ~QpRecPageName(); const char* pageName(); @@ -267,14 +267,14 @@ protected: class QpRecPassword : public QpRec { public: - QpRecPassword(QP_INT16 pLen, QpIStream& pIn); + QpRecPassword(TQP_INT16 pLen, QpIStream& pIn); ~QpRecPassword(); - const QP_UINT8* password(); + const TQP_UINT8* password(); protected: - QP_UINT8* cPassword; + TQP_UINT8* cPassword; }; -#endif // QPRO_RECORD_H +#endif // TQPRO_RECORD_H diff --git a/filters/kspread/qpro/libqpro/qpro/record_factory.h b/filters/kspread/qpro/libqpro/qpro/record_factory.h index b6f9cc23..ea567d52 100644 --- a/filters/kspread/qpro/libqpro/qpro/record_factory.h +++ b/filters/kspread/qpro/libqpro/qpro/record_factory.h @@ -1,5 +1,5 @@ -#ifndef QPRO_RECORD_FACTORY_H -#define QPRO_RECORD_FACTORY_H +#ifndef TQPRO_RECORD_FACTORY_H +#define TQPRO_RECORD_FACTORY_H #include #include @@ -15,5 +15,5 @@ protected: QpIStream& cIn; }; -#endif // QPRO_RECORD_FACTORY_H +#endif // TQPRO_RECORD_FACTORY_H diff --git a/filters/kspread/qpro/libqpro/qpro/stream.h b/filters/kspread/qpro/libqpro/qpro/stream.h index a112bdb6..0b101268 100644 --- a/filters/kspread/qpro/libqpro/qpro/stream.h +++ b/filters/kspread/qpro/libqpro/qpro/stream.h @@ -1,27 +1,27 @@ -#ifndef QPRO_STREAM_H -#define QPRO_STREAM_H +#ifndef TQPRO_STREAM_H +#define TQPRO_STREAM_H //#define USE_QT #ifdef USE_QT -#include -#include +#include +#include -typedef Q_UINT8 QP_UINT8; -typedef Q_INT8 QP_INT8; -typedef Q_INT16 QP_INT16; -typedef Q_INT32 QP_INT32; +typedef TQ_UINT8 TQP_UINT8; +typedef TQ_INT8 TQP_INT8; +typedef TQ_INT16 TQP_INT16; +typedef TQ_INT32 TQP_INT32; -class QpStream : public QDataStream +class QpStream : public TQDataStream { public: QpStream(unsigned char* pBuffer, unsigned int pLen); ~QpStream(); protected: - QBuffer cBuf; - QByteArray cByteArray; + TQBuffer cBuf; + TQByteArray cByteArray; unsigned char* cBuffer; unsigned int cLen; @@ -34,11 +34,11 @@ using namespace std; // ??? sort out how to do sizes -typedef char QP_INT8 ; -typedef unsigned char QP_UINT8 ; -typedef short QP_INT16 ; -typedef int QP_INT32 ; -typedef double QP_INT64 ; +typedef char TQP_INT8 ; +typedef unsigned char TQP_UINT8 ; +typedef short TQP_INT16 ; +typedef int TQP_INT32 ; +typedef double TQP_INT64 ; class QpIStream { @@ -49,16 +49,16 @@ public: int get(); - QpIStream& read(char* pBuf, QP_INT16 pLen); + QpIStream& read(char* pBuf, TQP_INT16 pLen); operator void* (); int operator !(); - QpIStream& operator >> (QP_INT8 &pI8); - QpIStream& operator >> (QP_UINT8 &pI8); - QpIStream& operator >> (QP_INT16 &pI16); - QpIStream& operator >> (QP_INT32 &pI32); - QpIStream& operator >> (QP_INT64 &pI64); + QpIStream& operator >> (TQP_INT8 &pI8); + QpIStream& operator >> (TQP_UINT8 &pI8); + QpIStream& operator >> (TQP_INT16 &pI16); + QpIStream& operator >> (TQP_INT32 &pI32); + QpIStream& operator >> (TQP_INT64 &pI64); QpIStream& operator >> (char*& pStr); protected: @@ -69,4 +69,4 @@ protected: #endif -#endif // QPRO_STREAM_H +#endif // TQPRO_STREAM_H diff --git a/filters/kspread/qpro/libqpro/qpro/tablenames.h b/filters/kspread/qpro/libqpro/qpro/tablenames.h index 286cbb64..d8208f64 100644 --- a/filters/kspread/qpro/libqpro/qpro/tablenames.h +++ b/filters/kspread/qpro/libqpro/qpro/tablenames.h @@ -1,5 +1,5 @@ -#ifndef QPRO_TABLENAMES_H -#define QPRO_TABLENAMES_H +#ifndef TQPRO_TABLENAMES_H +#define TQPRO_TABLENAMES_H // ----------------------------------------------------------------------- @@ -19,5 +19,5 @@ protected: char* cName[cNameCnt]; }; -#endif // QPRO_TABLENAMES_H +#endif // TQPRO_TABLENAMES_H diff --git a/filters/kspread/qpro/libqpro/src/formula.cc b/filters/kspread/qpro/libqpro/src/formula.cc index 14630a50..bd250048 100644 --- a/filters/kspread/qpro/libqpro/src/formula.cc +++ b/filters/kspread/qpro/libqpro/src/formula.cc @@ -214,7 +214,7 @@ static const QpFormulaConv gConv[] = {73, QpFormula::func3, "@mid("}, {74, QpFormula::func1, "@char("}, {75, QpFormula::func1, "@code("}, - {76, QpFormula::func3, "@find("}, + {76, QpFormula::func3, "@tqfind("}, {77, QpFormula::func1, "@dateVal("}, {78, QpFormula::func1, "@timeVal("}, {79, QpFormula::func1, "@cellPtr("}, @@ -244,7 +244,7 @@ static const QpFormulaConv gConv[] = {103, QpFormula::func1, "@lower("}, {104, QpFormula::func2, "@left("}, {105, QpFormula::func2, "@right("}, - {106, QpFormula::func4, "@replace("}, + {106, QpFormula::func4, "@tqreplace("}, {107, QpFormula::func1, "@proper("}, {108, QpFormula::func2, "@cell("}, {109, QpFormula::func1, "@trim("}, @@ -329,7 +329,7 @@ QpFormula::argSeparator(const char* pArg) char* QpFormula::formula() { - QP_INT8 lOperand; + TQP_INT8 lOperand; cStack.push(cFormulaStart); @@ -349,7 +349,7 @@ QpFormula::formula() if( cReplaceFunc[lIdx].cOperand == lOperand ) { lFound = -1; - QP_DEBUG("Processing " << (int)lOperand << endl); + TQP_DEBUG("Processing " << (int)lOperand << endl); (*cReplaceFunc[lIdx].cFunc)(*this, cReplaceFunc[lIdx].cArg); } } @@ -364,17 +364,17 @@ QpFormula::formula() if( gConv[lIdx].cOperand == lOperand ) { lFound = -1; - QP_DEBUG("Processing " << (int)lOperand << endl); + TQP_DEBUG("Processing " << (int)lOperand << endl); (*gConv[lIdx].cFunc)(*this, gConv[lIdx].cArg); } } - QP_DEBUG("Top = " << cStack.top() << endl); + TQP_DEBUG("Top = " << cStack.top() << endl); } cStack.join(2, ""); - QP_DEBUG("Formula = " << cStack.top() << endl); + TQP_DEBUG("Formula = " << cStack.top() << endl); return strcpy(new char[strlen(cStack.top())+1], cStack.top()); } @@ -461,7 +461,7 @@ QpFormula::func4Real(const char* pFunc) void QpFormula::funcVReal(const char* pFunc) { - QP_INT8 lCnt; + TQP_INT8 lCnt; const char* lFunc = (cDropLeadingAt && pFunc[0] == '@' ? &pFunc[1] : pFunc); cFormula >> lCnt; @@ -473,7 +473,7 @@ QpFormula::funcVReal(const char* pFunc) void QpFormula::floatFuncReal(const char*) { - QP_INT64 lFloat; + TQP_INT64 lFloat; std::ostrstream lNum; cFormula >> lFloat; @@ -488,7 +488,7 @@ QpFormula::floatFuncReal(const char*) void QpFormula::intFuncReal(const char*) { - QP_INT16 lInt; + TQP_INT16 lInt; std::ostrstream lNum; cFormula >> lInt; diff --git a/filters/kspread/qpro/libqpro/src/record.cc b/filters/kspread/qpro/libqpro/src/record.cc index 5d26df7b..8aa877c6 100644 --- a/filters/kspread/qpro/libqpro/src/record.cc +++ b/filters/kspread/qpro/libqpro/src/record.cc @@ -77,7 +77,7 @@ QpRec::~QpRec() { } -QP_INT16 +TQP_INT16 QpRec::type() { return cType; @@ -90,7 +90,7 @@ QpRec::type() //{ // pIn >> cNoteBook >> cColumn >> cPage >> cRow; // -//QP_DEBUG("CellRef: NoteBook" << cNoteBook << ", col " +//TQP_DEBUG("CellRef: NoteBook" << cNoteBook << ", col " // << cColumn << ", Page " << (int)cPage << ", Row " // << cRow << endl // ); @@ -100,13 +100,13 @@ QpRec::type() //{ //} // -//QP_UINT8 +//TQP_UINT8 //QpCellRef::column() //{ // return cColumn; //} // -//QP_INT16 +//TQP_INT16 //QpCellRef::row() //{ // return cRow; @@ -132,36 +132,36 @@ QpRecCell::~QpRecCell() void -QpRecCell::attributes(QP_INT16 pAttributes) +QpRecCell::attributes(TQP_INT16 pAttributes) { cAttributes = pAttributes; } -QP_INT16 +TQP_INT16 QpRecCell::attributes() { return cAttributes; } void -QpRecCell::column(QP_UINT8 pColumn) +QpRecCell::column(TQP_UINT8 pColumn) { cColumn = pColumn; } -QP_UINT8 +TQP_UINT8 QpRecCell::column() { return cColumn; } void -QpRecCell::row(QP_INT16 pRow) +QpRecCell::row(TQP_INT16 pRow) { cRow = pRow; } -QP_INT16 +TQP_INT16 QpRecCell::row() { return cRow; @@ -172,7 +172,7 @@ QpRecCell::loadCellInfo(QpIStream& pIn) { pIn >> cColumn >> cPage >> cRow >> cAttributes; - QP_DEBUG(" col " << (unsigned)cColumn << ", Page " << (unsigned)cPage + TQP_DEBUG(" col " << (unsigned)cColumn << ", Page " << (unsigned)cPage << ", Row " << cRow << ", Ref " << /*???cellRef() <<*/ ", Attr " << cAttributes @@ -196,7 +196,7 @@ QpRecCell::loadCellInfo(QpIStream& pIn) // void -QpRecCell::cellRef(char* pText, QpTableNames& pTable, QP_INT16 /*pNoteBook*/, QP_UINT8 pPage, QP_UINT8 pColumn, QP_INT16 pRow) +QpRecCell::cellRef(char* pText, QpTableNames& pTable, TQP_INT16 /*pNoteBook*/, TQP_UINT8 pPage, TQP_UINT8 pColumn, TQP_INT16 pRow) { //??? cope with relative/absolute references @@ -204,10 +204,10 @@ QpRecCell::cellRef(char* pText, QpTableNames& pTable, QP_INT16 /*pNoteBook*/, QP int lPageRelative = pRow & 0x8000; int lColRelative = pRow & 0x4000; int lRowRelative = pRow & 0x2000; - QP_UINT8 lCol = (lColRelative ? cColumn + pColumn : pColumn); + TQP_UINT8 lCol = (lColRelative ? cColumn + pColumn : pColumn); // Sign bit for row is in bit 0x1000, so either set all top bits or lose all top bits - QP_INT16 lRow = (lRowRelative ? cRow + (pRow & 0x1000 ? pRow | 0xE000 : pRow & 0x1FFF) + TQP_INT16 lRow = (lRowRelative ? cRow + (pRow & 0x1000 ? pRow | 0xE000 : pRow & 0x1FFF) : pRow & 0x1FFF ); @@ -222,11 +222,11 @@ QpRecCell::cellRef(char* pText, QpTableNames& pTable, QP_INT16 /*pNoteBook*/, QP { // yes - not relative & page is a different one - QP_UINT8 lPage = ( lPageRelative ? pPage + cPage : pPage ); + TQP_UINT8 lPage = ( lPageRelative ? pPage + cPage : pPage ); - QP_DEBUG("pTable.name((unsigned)lPage) = " << pTable.name((unsigned)lPage) << endl); + TQP_DEBUG("pTable.name((unsigned)lPage) = " << pTable.name((unsigned)lPage) << endl); - lOut << pTable.name((unsigned)lPage) << '!'; // is '!' compat with QPRO??? + lOut << pTable.name((unsigned)lPage) << '!'; // is '!' compat with TQPRO??? } if( !lColRelative ) @@ -254,19 +254,19 @@ QpRecCell::cellRef(char* pText, QpTableNames& pTable, QP_INT16 /*pNoteBook*/, QP void QpRecCell::cellRef(char* pText, QpTableNames& pTable, QpIStream& pFormulaRef) { - QP_INT16 lNoteBook; + TQP_INT16 lNoteBook; pFormulaRef >> lNoteBook; // block references (eg. A1..A9) have bit 0x1000 set if( lNoteBook & 0x1000 ) { - QP_UINT8 lFirstColumn; - QP_UINT8 lFirstPage; - QP_INT16 lFirstRow; - QP_UINT8 lLastColumn; - QP_UINT8 lLastPage; - QP_INT16 lLastRow; + TQP_UINT8 lFirstColumn; + TQP_UINT8 lFirstPage; + TQP_INT16 lFirstRow; + TQP_UINT8 lLastColumn; + TQP_UINT8 lLastPage; + TQP_INT16 lLastRow; pFormulaRef >> lFirstColumn >> lFirstPage @@ -275,7 +275,7 @@ QpRecCell::cellRef(char* pText, QpTableNames& pTable, QpIStream& pFormulaRef) >> lLastPage >> lLastRow; - QP_DEBUG("BlockRef: NoteBook " << lNoteBook + TQP_DEBUG("BlockRef: NoteBook " << lNoteBook << ", 1st col " << lFirstColumn << ", 1st page " << (unsigned)lFirstPage << ", 1st row " << lFirstRow @@ -292,13 +292,13 @@ QpRecCell::cellRef(char* pText, QpTableNames& pTable, QpIStream& pFormulaRef) } else { - QP_UINT8 lColumn; - QP_UINT8 lPage; - QP_INT16 lRow; + TQP_UINT8 lColumn; + TQP_UINT8 lPage; + TQP_INT16 lRow; pFormulaRef >> lColumn >> lPage >> lRow; - QP_DEBUG("FormulaRef: NoteBook " << lNoteBook << ", Col " << (unsigned)lColumn + TQP_DEBUG("FormulaRef: NoteBook " << lNoteBook << ", Col " << (unsigned)lColumn << ", Page " << (unsigned)lPage << ", Row " << lRow << endl ); @@ -310,12 +310,12 @@ QpRecCell::cellRef(char* pText, QpTableNames& pTable, QpIStream& pFormulaRef) // ----------------------------------------------------------------------- -QpRecBof::QpRecBof(QP_INT16, QpIStream& pIn) +QpRecBof::QpRecBof(TQP_INT16, QpIStream& pIn) : QpRec( QpBof ) { pIn >> cFileFormat; - QP_DEBUG("BOF fileformat=" << cFileFormat << endl); + TQP_DEBUG("BOF fileformat=" << cFileFormat << endl); } QpRecBof::~QpRecBof() @@ -324,10 +324,10 @@ QpRecBof::~QpRecBof() // ----------------------------------------------------------------------- -QpRecEof::QpRecEof(QP_INT16, QpIStream&) +QpRecEof::QpRecEof(TQP_INT16, QpIStream&) : QpRec( QpEof ) { - QP_DEBUG("EOF" << endl); + TQP_DEBUG("EOF" << endl); } QpRecEof::~QpRecEof() @@ -337,16 +337,16 @@ QpRecEof::~QpRecEof() // ----------------------------------------------------------------------- -QpRecRecalcMode::QpRecRecalcMode(QP_INT16, QpIStream& pIn) +QpRecRecalcMode::QpRecRecalcMode(TQP_INT16, QpIStream& pIn) : QpRec( QpRecalcMode ) { - QP_INT8 lMode; + TQP_INT8 lMode; pIn >> lMode; cMode = (MODE)(unsigned char) lMode; - QP_DEBUG("Recalc Mode = " + TQP_DEBUG("Recalc Mode = " << (int)lMode << ( cMode == Manual ? " (Manual)" : cMode == Background ? " (Background)" : cMode == Automatic ? " (Automatic)" @@ -376,16 +376,16 @@ QpRecRecalcMode::mode() // ----------------------------------------------------------------------- -QpRecRecalcOrder::QpRecRecalcOrder(QP_INT16, QpIStream& pIn) +QpRecRecalcOrder::QpRecRecalcOrder(TQP_INT16, QpIStream& pIn) : QpRec( QpRecalcOrder ) { - QP_INT8 lOrder; + TQP_INT8 lOrder; pIn >> lOrder; cOrder = (ORDER)(unsigned char) lOrder; - QP_DEBUG("Recalc Order = " + TQP_DEBUG("Recalc Order = " << (int)lOrder << ( cOrder == Natural ? " (Natural)" : cOrder == Column ? " (Column)" : cOrder == Row ? " (Row)" @@ -415,14 +415,14 @@ QpRecRecalcOrder::order() // ----------------------------------------------------------------------- -QpRecEmptyCell::QpRecEmptyCell(QP_INT16, QpIStream& pIn) +QpRecEmptyCell::QpRecEmptyCell(TQP_INT16, QpIStream& pIn) : QpRecCell( QpEmptyCell ) { - QP_DEBUG("Empty Cell - "); + TQP_DEBUG("Empty Cell - "); loadCellInfo(pIn); - QP_DEBUG(endl); + TQP_DEBUG(endl); } QpRecEmptyCell::~QpRecEmptyCell() @@ -432,23 +432,23 @@ QpRecEmptyCell::~QpRecEmptyCell() // ----------------------------------------------------------------------- -QpRecIntegerCell::QpRecIntegerCell(QP_INT16, QpIStream& pIn) +QpRecIntegerCell::QpRecIntegerCell(TQP_INT16, QpIStream& pIn) : QpRecCell( QpIntegerCell ) { - QP_DEBUG("Integer Cell - "); + TQP_DEBUG("Integer Cell - "); loadCellInfo(pIn); pIn >> cInt; - QP_DEBUG(", Int " << cInt << endl); + TQP_DEBUG(", Int " << cInt << endl); } QpRecIntegerCell::~QpRecIntegerCell() { } -QP_INT16 +TQP_INT16 QpRecIntegerCell::integer() { return cInt; @@ -456,23 +456,23 @@ QpRecIntegerCell::integer() // ----------------------------------------------------------------------- -QpRecFloatingPointCell::QpRecFloatingPointCell(QP_INT16, QpIStream& pIn) +QpRecFloatingPointCell::QpRecFloatingPointCell(TQP_INT16, QpIStream& pIn) : QpRecCell( QpFloatingPointCell ) { - QP_DEBUG("Float Cell - "); + TQP_DEBUG("Float Cell - "); loadCellInfo(pIn); pIn >> cValue; - QP_DEBUG(", Value " << cValue << endl); + TQP_DEBUG(", Value " << cValue << endl); } QpRecFloatingPointCell::~QpRecFloatingPointCell() { } -QP_INT64 +TQP_INT64 QpRecFloatingPointCell::value() { return cValue; @@ -480,10 +480,10 @@ QpRecFloatingPointCell::value() // ----------------------------------------------------------------------- -QpRecLabelCell::QpRecLabelCell(QP_INT16 pLen, QpIStream& pIn) +QpRecLabelCell::QpRecLabelCell(TQP_INT16 pLen, QpIStream& pIn) : QpRecCell( QpLabelCell ) { - QP_DEBUG("Label Cell - "); + TQP_DEBUG("Label Cell - "); int lLabelLen = pLen - loadCellInfo(pIn) - 1; pIn >> cLabelPrefix; @@ -492,7 +492,7 @@ QpRecLabelCell::QpRecLabelCell(QP_INT16 pLen, QpIStream& pIn) pIn.read( cLabel, lLabelLen ); - QP_DEBUG(", Prefix " << cLabelPrefix << ", Label " << cLabel << endl); + TQP_DEBUG(", Prefix " << cLabelPrefix << ", Label " << cLabel << endl); } QpRecLabelCell::~QpRecLabelCell() @@ -515,11 +515,11 @@ QpRecLabelCell::label() // ----------------------------------------------------------------------- -QpRecFormulaCell::QpRecFormulaCell(QP_INT16 pLen, QpIStream& pIn) +QpRecFormulaCell::QpRecFormulaCell(TQP_INT16 pLen, QpIStream& pIn) : QpRecCell( QpFormulaCell ) , cFormula(0) { - QP_DEBUG("Formula Cell - "); + TQP_DEBUG("Formula Cell - "); int lFormulaLen = pLen - loadCellInfo(pIn); @@ -539,12 +539,12 @@ QpRecFormulaCell::QpRecFormulaCell(QP_INT16 pLen, QpIStream& pIn) pIn.read( cFormula, lFormulaLen ); - QP_DEBUG(", LastValue " << cLastValue << ", State " << cState << endl); - QP_DEBUG(" FormulaLen " << cLen << ", CellRef " << cCellRef << ", Formula" << endl); -#ifdef QP_TRACE + TQP_DEBUG(", LastValue " << cLastValue << ", State " << cState << endl); + TQP_DEBUG(" FormulaLen " << cLen << ", CellRef " << cCellRef << ", Formula" << endl); +#ifdef TQP_TRACE Hexout( cFormula, lFormulaLen ); #endif - QP_DEBUG(endl); + TQP_DEBUG(endl); } QpRecFormulaCell::~QpRecFormulaCell() @@ -559,13 +559,13 @@ QpRecFormulaCell::formula() return cFormula; } -QP_INT16 +TQP_INT16 QpRecFormulaCell::formulaLen() { return cLen; } -QP_INT16 +TQP_INT16 QpRecFormulaCell::formulaReferences() { return cCellRef; @@ -573,10 +573,10 @@ QpRecFormulaCell::formulaReferences() // ----------------------------------------------------------------------- -QpRecUnknown::QpRecUnknown(QP_INT16 /*pType*/, QP_INT16 pLen, QpIStream& pIn) +QpRecUnknown::QpRecUnknown(TQP_INT16 /*pType*/, TQP_INT16 pLen, QpIStream& pIn) : QpRec( QpUnknown ) { - QP_DEBUG("Unknown Type " << pType << ", len " << pLen << endl); + TQP_DEBUG("Unknown Type " << pType << ", len " << pLen << endl); if( pLen > 0 ) { @@ -595,11 +595,11 @@ QpRecUnknown::~QpRecUnknown() // ----------------------------------------------------------------------- -QpRecBop::QpRecBop(QP_INT16, QpIStream& pIn) +QpRecBop::QpRecBop(TQP_INT16, QpIStream& pIn) : QpRec( QpBop ) { pIn >> cPageIndex; - QP_DEBUG("BOP: " << (unsigned)cPageIndex << endl); + TQP_DEBUG("BOP: " << (unsigned)cPageIndex << endl); } QpRecBop::~QpRecBop() @@ -607,7 +607,7 @@ QpRecBop::~QpRecBop() } -QP_UINT8 +TQP_UINT8 QpRecBop::pageIndex() { return cPageIndex; @@ -616,12 +616,12 @@ QpRecBop::pageIndex() // ----------------------------------------------------------------------- -QpRecPageName::QpRecPageName(QP_INT16, QpIStream& pIn) +QpRecPageName::QpRecPageName(TQP_INT16, QpIStream& pIn) : QpRec( QpPageName ) { pIn >> cPageName; - QP_DEBUG("Page Name: " << cPageName << endl); + TQP_DEBUG("Page Name: " << cPageName << endl); } QpRecPageName::~QpRecPageName() @@ -635,20 +635,20 @@ QpRecPageName::pageName() } // ----------------------------------------------------------------------- -QpRecPassword::QpRecPassword(QP_INT16 pLen, QpIStream& pIn) +QpRecPassword::QpRecPassword(TQP_INT16 pLen, QpIStream& pIn) : QpRec( QpPassword ) { - QP_DEBUG("Password len = " << pLen << endl); + TQP_DEBUG("Password len = " << pLen << endl); - cPassword = new QP_UINT8[pLen]; + cPassword = new TQP_UINT8[pLen]; pIn.read( (char*)cPassword, pLen ); - QP_DEBUG("Password(Hex) = "); -#ifdef QP_TRACE + TQP_DEBUG("Password(Hex) = "); +#ifdef TQP_TRACE Hexout( (char*)cPassword, pLen ); #endif - QP_DEBUG(endl); + TQP_DEBUG(endl); } QpRecPassword::~QpRecPassword() @@ -657,7 +657,7 @@ QpRecPassword::~QpRecPassword() cPassword = 0; } -const QP_UINT8* +const TQP_UINT8* QpRecPassword::password() { return cPassword; diff --git a/filters/kspread/qpro/libqpro/src/record_factory.cc b/filters/kspread/qpro/libqpro/src/record_factory.cc index cec01dd4..ed6e8617 100644 --- a/filters/kspread/qpro/libqpro/src/record_factory.cc +++ b/filters/kspread/qpro/libqpro/src/record_factory.cc @@ -4,7 +4,7 @@ #include -#define NEWFUNC(x) static QpRec* NEW_##x (QP_INT16 pLen, QpIStream& pIn) { return new x (pLen, pIn); } +#define NEWFUNC(x) static QpRec* NEW_##x (TQP_INT16 pLen, QpIStream& pIn) { return new x (pLen, pIn); } NEWFUNC(QpRecBof) NEWFUNC(QpRecBop) @@ -21,9 +21,9 @@ NEWFUNC(QpRecRecalcOrder) struct Record { - QP_INT16 Type; - QP_INT16 Len; - QpRec* (*Func)(QP_INT16, QpIStream&); + TQP_INT16 Type; + TQP_INT16 Len; + QpRec* (*Func)(TQP_INT16, QpIStream&); }; @@ -59,8 +59,8 @@ QpRecFactory::~QpRecFactory() QpRec* QpRecFactory::nextRecord() { - QP_INT16 lType; - QP_INT16 lLen; + TQP_INT16 lType; + TQP_INT16 lLen; QpRec* lResult=0; cIn >> lType >> lLen; diff --git a/filters/kspread/qpro/libqpro/src/stream.cc b/filters/kspread/qpro/libqpro/src/stream.cc index 3142a272..5b96eb8a 100644 --- a/filters/kspread/qpro/libqpro/src/stream.cc +++ b/filters/kspread/qpro/libqpro/src/stream.cc @@ -10,7 +10,7 @@ #ifdef USE_QT -#include +#include QpIStream::QpIStream(unsigned char* pBuffer, unsigned int pLen) : cBuffer(pBuffer), cLen(pLen) @@ -21,7 +21,7 @@ QpIStream::QpIStream(unsigned char* pBuffer, unsigned int pLen) cBuf.open( IO_ReadOnly ); setDevice( &cBuf ); - setByteOrder(QDataStream::LittleEndian); + setByteOrder(TQDataStream::LittleEndian); } QpIStream::~QpIStream() @@ -99,7 +99,7 @@ QpIStream::get() } QpIStream& -QpIStream::read(char* pBuf, QP_INT16 pLen) +QpIStream::read(char* pBuf, TQP_INT16 pLen) { if( cIn ) { @@ -125,7 +125,7 @@ QpIStream::operator !() QpIStream& -QpIStream::operator >> (QP_INT8 &pI8) +QpIStream::operator >> (TQP_INT8 &pI8) { pI8 = get(); @@ -133,7 +133,7 @@ QpIStream::operator >> (QP_INT8 &pI8) } QpIStream& -QpIStream::operator >> (QP_UINT8 &pI8) +QpIStream::operator >> (TQP_UINT8 &pI8) { pI8 = get(); @@ -141,7 +141,7 @@ QpIStream::operator >> (QP_UINT8 &pI8) } QpIStream& -QpIStream::operator >> (QP_INT16 &pI16) +QpIStream::operator >> (TQP_INT16 &pI16) { pI16 = get(); pI16 = pI16 | (get() << 8); @@ -150,7 +150,7 @@ QpIStream::operator >> (QP_INT16 &pI16) } QpIStream& -QpIStream::operator >> (QP_INT32 &pI32) +QpIStream::operator >> (TQP_INT32 &pI32) { pI32 = get(); pI32 = pI32 | (get() << 8); @@ -161,7 +161,7 @@ QpIStream::operator >> (QP_INT32 &pI32) } QpIStream& -QpIStream::operator >> (QP_INT64 &pI64) +QpIStream::operator >> (TQP_INT64 &pI64) { // ??? sort out this /****** diff --git a/filters/kspread/qpro/qproformula.h b/filters/kspread/qpro/qproformula.h index bc115a80..77380e08 100644 --- a/filters/kspread/qpro/qproformula.h +++ b/filters/kspread/qpro/qproformula.h @@ -1,5 +1,5 @@ -#ifndef QPROFORMULA_H -#define QPROFORMULA_H +#ifndef TQPROFORMULA_H +#define TQPROFORMULA_H #include @@ -15,4 +15,4 @@ public: } -#endif // QPROFORMULA_H +#endif // TQPROFORMULA_H diff --git a/filters/kspread/qpro/qproimport.cc b/filters/kspread/qpro/qproimport.cc index 72309275..31a3ac43 100644 --- a/filters/kspread/qpro/qproimport.cc +++ b/filters/kspread/qpro/qproimport.cc @@ -33,12 +33,12 @@ #include #include #include -#include +#include using namespace KSpread; -typedef KGenericFactory QPROImportFactory; -K_EXPORT_COMPONENT_FACTORY( libqproimport, QPROImportFactory( "kofficefilters" ) ) +typedef KGenericFactory TQPROImportFactory; +K_EXPORT_COMPONENT_FACTORY( libqproimport, TQPROImportFactory( "kofficefilters" ) ) // --------------------------------------------------------------- @@ -74,14 +74,14 @@ QpTableList::table(unsigned pIdx) // --------------------------------------------------------------- -QpImport::QpImport( KoFilter*, const char*, const QStringList& ) +QpImport::QpImport( KoFilter*, const char*, const TQStringList& ) : KoFilter() { //cout << "Hooray - in QpImport::QpImport" << endl; // ??? } void -QpImport::InitTableName(int pIdx, QString& pResult) +QpImport::InitTableName(int pIdx, TQString& pResult) { if( pIdx < 26 ) { @@ -94,7 +94,7 @@ QpImport::InitTableName(int pIdx, QString& pResult) } } -KoFilter::ConversionStatus QpImport::convert( const QCString& from, const QCString& to ) +KoFilter::ConversiontqStatus QpImport::convert( const TQCString& from, const TQCString& to ) { bool bSuccess=true; @@ -104,7 +104,7 @@ KoFilter::ConversionStatus QpImport::convert( const QCString& from, const QCStri kdDebug(30523) << "here we go... " << document->className() << endl; - if( !::qt_cast( document ) ) // it's safer that way :) + if( !::tqqt_cast( document ) ) // it's safer that way :) { kdWarning(30501) << "document isn't a KSpread::Doc but a " << document->className() << endl; return KoFilter::NotImplemented; @@ -117,7 +117,7 @@ KoFilter::ConversionStatus QpImport::convert( const QCString& from, const QCStri kdDebug(30523) << "...still here..." << endl; - // No need for a dynamic cast here, since we use Qt's moc magic + // No need for a dynamic cast here, since we use TQt's tqmoc magic Doc *ksdoc=(Doc*)document; if(ksdoc->mimeType()!="application/x-kspread") @@ -126,23 +126,23 @@ KoFilter::ConversionStatus QpImport::convert( const QCString& from, const QCStri return KoFilter::NotImplemented; } - QpIStream lIn( QFile::encodeName(m_chain->inputFile()) ); + QpIStream lIn( TQFile::encodeName(m_chain->inputFile()) ); if( !lIn ) { - KMessageBox::sorry( 0L, i18n("QPRO filter cannot open input file - please report.") ); + KMessageBox::sorry( 0L, i18n("TQPRO filter cannot open input file - please report.") ); return KoFilter::FileNotFound; } Sheet *table=0; - QString field; + TQString field; int value=0; emit sigProgress(value); QpRecFactory lFactory(lIn); QpTableList lTableNames; - QP_UINT8 lPageIdx = 0; + TQP_UINT8 lPageIdx = 0; QpRec* lRec = 0; QpRecBop* lRecBop = 0; diff --git a/filters/kspread/qpro/qproimport.h b/filters/kspread/qpro/qproimport.h index b0ba0fc8..031f5cdf 100644 --- a/filters/kspread/qpro/qproimport.h +++ b/filters/kspread/qpro/qproimport.h @@ -17,8 +17,8 @@ * Boston, MA 02110-1301, USA. */ -#ifndef QPROIMPORT_H -#define QPROIMPORT_H +#ifndef TQPROIMPORT_H +#define TQPROIMPORT_H #include #include @@ -31,13 +31,14 @@ class Sheet; class QpImport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - QpImport(KoFilter* parent, const char* name, const QStringList&); + QpImport(KoFilter* tqparent, const char* name, const TQStringList&); virtual ~QpImport() {} - virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to ); - void InitTableName(int pIdx, QString& pResult); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to ); + void InitTableName(int pIdx, TQString& pResult); }; class QpTableList : public QpTableNames @@ -52,4 +53,4 @@ protected: KSpread::Sheet* cTable[cNameCnt]; }; -#endif // QPROIMPORT_H +#endif // TQPROIMPORT_H diff --git a/filters/kugar/kugarnop/kugarnopimport.cpp b/filters/kugar/kugarnop/kugarnopimport.cpp index 43efc2a5..f8ad242c 100644 --- a/filters/kugar/kugarnop/kugarnopimport.cpp +++ b/filters/kugar/kugarnop/kugarnopimport.cpp @@ -18,23 +18,23 @@ #include #include #include -#include +#include #include "KoDocument.h" -#include +#include typedef KGenericFactory KugarNOPImportFactory; K_EXPORT_COMPONENT_FACTORY( libkugarnopimport, KugarNOPImportFactory( "kugarnopimport" ) ) -KugarNOPImport::KugarNOPImport( KoFilter *, const char *, const QStringList& ) +KugarNOPImport::KugarNOPImport( KoFilter *, const char *, const TQStringList& ) : KoFilter() { } -KoFilter::ConversionStatus KugarNOPImport::convert( const QCString& /*from*/, const QCString& /*to*/ ) +KoFilter::ConversiontqStatus KugarNOPImport::convert( const TQCString& /*from*/, const TQCString& /*to*/ ) { - QFile in( m_chain->inputFile()); + TQFile in( m_chain->inputFile()); if (!in.open( IO_ReadOnly )) { kdError() << "Unable to open input file!" << endl; @@ -43,7 +43,7 @@ KoFilter::ConversionStatus KugarNOPImport::convert( const QCString& /*from*/, co } KoDocument *doc=m_chain->outputDocument(); - doc->loadXML(&in,QDomDocument()); + doc->loadXML(TQT_TQIODEVICE(&in),TQDomDocument()); in.close(); doc->resetURL(); diff --git a/filters/kugar/kugarnop/kugarnopimport.h b/filters/kugar/kugarnop/kugarnopimport.h index de2c84bf..acb77e95 100644 --- a/filters/kugar/kugarnop/kugarnopimport.h +++ b/filters/kugar/kugarnop/kugarnopimport.h @@ -17,17 +17,18 @@ #define __KUGARNOPIMPORT_H__ #include -#include -#include +#include +#include class KugarNOPImport : public KoFilter { Q_OBJECT + TQ_OBJECT public: - KugarNOPImport( KoFilter *parent, const char *name, const QStringList& ); + KugarNOPImport( KoFilter *tqparent, const char *name, const TQStringList& ); - virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to ); }; diff --git a/filters/kword/abiword/ImportField.cc b/filters/kword/abiword/ImportField.cc index bfcc5a8c..dfba826d 100644 --- a/filters/kword/abiword/ImportField.cc +++ b/filters/kword/abiword/ImportField.cc @@ -17,27 +17,27 @@ * Boston, MA 02110-1301, USA. */ -#include -#include +#include +#include #include #include "ImportField.h" -QString getFootnoteFramesetName(const QString& id) +TQString getFootnoteFramesetName(const TQString& id) { - return i18n("Frameset name","Footnote %1").arg(id); + return i18n("Frameset name","Footnote %1").tqarg(id); } -static void InsertTimeVariable(QDomDocument& mainDocument, - QDomElement& variableElement, QString strKey) +static void InsertTimeVariable(TQDomDocument& mainDocument, + TQDomElement& variableElement, TQString strKey) { - QDomElement typeElement=mainDocument.createElement("TYPE"); + TQDomElement typeElement=mainDocument.createElement("TYPE"); typeElement.setAttribute("key",strKey); typeElement.setAttribute("type",2); // Time typeElement.setAttribute("text","-"); // Dummy, we let KWord do the work! variableElement.appendChild(typeElement); //Append to - QDomElement timeElement=mainDocument.createElement("TIME"); + TQDomElement timeElement=mainDocument.createElement("TIME"); // We cannot calculate the time, so default to midnight timeElement.setAttribute("hour",0); timeElement.setAttribute("minute",0); @@ -46,15 +46,15 @@ static void InsertTimeVariable(QDomDocument& mainDocument, variableElement.appendChild(timeElement); //Append to } -static void InsertDateVariable(QDomDocument& mainDocument, - QDomElement& variableElement, QString strKey) +static void InsertDateVariable(TQDomDocument& mainDocument, + TQDomElement& variableElement, TQString strKey) { - QDomElement typeElement=mainDocument.createElement("TYPE"); + TQDomElement typeElement=mainDocument.createElement("TYPE"); typeElement.setAttribute("key",strKey); typeElement.setAttribute("type",0); // date typeElement.setAttribute("text","-"); // Just a dummy, KWord will do the work variableElement.appendChild(typeElement); //Append to - QDomElement dateElement=mainDocument.createElement("DATE"); + TQDomElement dateElement=mainDocument.createElement("DATE"); // As we have no idea about the current date, use the *nix epoch 1970-01-01 dateElement.setAttribute("year",1970); dateElement.setAttribute("month",1); @@ -63,8 +63,8 @@ static void InsertDateVariable(QDomDocument& mainDocument, variableElement.appendChild(dateElement); //Append to } -static bool ProcessTimeField(QDomDocument& mainDocument, - QDomElement& variableElement, QString strType) +static bool ProcessTimeField(TQDomDocument& mainDocument, + TQDomElement& variableElement, TQString strType) // strType: AbiWord's type { if (strType=="time") @@ -89,8 +89,8 @@ static bool ProcessTimeField(QDomDocument& mainDocument, return true; } -static bool ProcessDateField(QDomDocument& mainDocument, - QDomElement& variableElement, QString strType) +static bool ProcessDateField(TQDomDocument& mainDocument, + TQDomElement& variableElement, TQString strType) // strType: AbiWord's type // Help for the % formats: // man date @@ -137,8 +137,8 @@ static bool ProcessDateField(QDomDocument& mainDocument, return true; } -bool ProcessField(QDomDocument& mainDocument, - QDomElement& variableElement, QString strType, const QXmlAttributes& attributes) +bool ProcessField(TQDomDocument& mainDocument, + TQDomElement& variableElement, TQString strType, const TQXmlAttributes& attributes) { // In AbiWord: // field names are in the file: src/text/fmt/xp/fp_Fields.h @@ -155,12 +155,12 @@ bool ProcessField(QDomDocument& mainDocument, } else if ((strType=="page_number")||(strType=="page_count")) { - QDomElement typeElement=mainDocument.createElement("TYPE"); + TQDomElement typeElement=mainDocument.createElement("TYPE"); typeElement.setAttribute("key","NUMBER"); typeElement.setAttribute("type",4); // page number/count typeElement.setAttribute("text",1); // We cannot count the pages, so give a default value variableElement.appendChild(typeElement); //Append to - QDomElement pgnumElement=mainDocument.createElement("PGNUM"); + TQDomElement pgnumElement=mainDocument.createElement("PGNUM"); pgnumElement.setAttribute("subtype",(strType=="page_count")?1:0); pgnumElement.setAttribute("value",1); variableElement.appendChild(pgnumElement); //Append to @@ -168,12 +168,12 @@ bool ProcessField(QDomDocument& mainDocument, } else if (strType=="file_name") { - QDomElement typeElement=mainDocument.createElement("TYPE"); + TQDomElement typeElement=mainDocument.createElement("TYPE"); typeElement.setAttribute("key","STRING"); typeElement.setAttribute("type",8); typeElement.setAttribute("text","?"); // TODO: do we need this information right now? variableElement.appendChild(typeElement); //Append to - QDomElement fieldElement=mainDocument.createElement("FIELD"); + TQDomElement fieldElement=mainDocument.createElement("FIELD"); fieldElement.setAttribute("subtype",0); fieldElement.setAttribute("value","?"); // Should be the same as the text attribute variableElement.appendChild(fieldElement); //Append to @@ -181,15 +181,15 @@ bool ProcessField(QDomDocument& mainDocument, } else if (strType=="endnote_ref") { - QDomElement typeElement=mainDocument.createElement("TYPE"); + TQDomElement typeElement=mainDocument.createElement("TYPE"); typeElement.setAttribute("key","STRING"); typeElement.setAttribute("type",11); typeElement.setAttribute("text","?"); // ### TODO: do we need this information right now? variableElement.appendChild(typeElement); //Append to - QDomElement element=mainDocument.createElement("FOOTNOTE"); + TQDomElement element=mainDocument.createElement("FOOTNOTE"); element.setAttribute("numberingtype","auto"); // ### TODO: support other types element.setAttribute("notetype","footnote"); - QString reference(attributes.value("endnote-id").stripWhiteSpace()); + TQString reference(attributes.value("endnote-id").stripWhiteSpace()); element.setAttribute("frameset", getFootnoteFramesetName(reference)); // ### TODO: better name element.setAttribute("value","?"); // Should be the same as the text attribute variableElement.appendChild(element); //Append to diff --git a/filters/kword/abiword/ImportField.h b/filters/kword/abiword/ImportField.h index e357754d..2e660d41 100644 --- a/filters/kword/abiword/ImportField.h +++ b/filters/kword/abiword/ImportField.h @@ -20,11 +20,11 @@ #ifndef IMPORTFIELD_H #define IMPORTFIELD_H -#include +#include -QString getFootnoteFramesetName(const QString& id); -bool ProcessField(QDomDocument& mainDocument, - QDomElement& variableElement, QString strType, const QXmlAttributes& attributes); +TQString getFootnoteFramesetName(const TQString& id); +bool ProcessField(TQDomDocument& mainDocument, + TQDomElement& variableElement, TQString strType, const TQXmlAttributes& attributes); #endif /* IMPORTFIELD_H */ diff --git a/filters/kword/abiword/ImportFormatting.cc b/filters/kword/abiword/ImportFormatting.cc index 950d41cc..14a059eb 100644 --- a/filters/kword/abiword/ImportFormatting.cc +++ b/filters/kword/abiword/ImportFormatting.cc @@ -32,14 +32,14 @@ StackItem::~StackItem() { } -void PopulateProperties(StackItem* stackItem, const QString& strStyleProps, - const QXmlAttributes& attributes, AbiPropsMap& abiPropsMap, +void PopulateProperties(StackItem* stackItem, const TQString& strStyleProps, + const TQXmlAttributes& attributes, AbiPropsMap& abiPropsMap, const bool allowInit) // TODO: find a better name for this function { if (allowInit) { - // Initialize the QStrings with the previous values of the properties + // Initialize the TQStrings with the previous values of the properties // TODO: any others needed? if (stackItem->italic) { @@ -71,11 +71,11 @@ void PopulateProperties(StackItem* stackItem, const QString& strStyleProps, stackItem->italic=(abiPropsMap["font-style"].getValue()=="italic"); stackItem->bold=(abiPropsMap["font-weight"].getValue()=="bold"); - QString strDecoration=abiPropsMap["text-decoration"].getValue(); + TQString strDecoration=abiPropsMap["text-decoration"].getValue(); stackItem->underline=(strDecoration=="underline"); stackItem->strikeout=(strDecoration=="line-through"); - QString strTextPosition=abiPropsMap["text-position"].getValue(); + TQString strTextPosition=abiPropsMap["text-position"].getValue(); if (strTextPosition=="subscript") { stackItem->textPosition=1; @@ -90,14 +90,14 @@ void PopulateProperties(StackItem* stackItem, const QString& strStyleProps, stackItem->textPosition=0; } - QString strColour=abiPropsMap["color"].getValue(); + TQString strColour=abiPropsMap["color"].getValue(); if (!strColour.isEmpty()) { // The colour information is *not* lead by a hash (#) stackItem->fgColor.setNamedColor("#"+strColour); } - QString strBackgroundTextColor=abiPropsMap["bgcolor"].getValue(); + TQString strBackgroundTextColor=abiPropsMap["bgcolor"].getValue(); if (strBackgroundTextColor=="transparent") { // KWord has no idea what transparency is, so we use white @@ -109,7 +109,7 @@ void PopulateProperties(StackItem* stackItem, const QString& strStyleProps, stackItem->bgColor.setNamedColor("#"+strBackgroundTextColor); } - QString strFontSize=abiPropsMap["font-size"].getValue(); + TQString strFontSize=abiPropsMap["font-size"].getValue(); if (!strFontSize.isEmpty()) { const int size=int(ValueWithLengthUnit(strFontSize)); @@ -119,7 +119,7 @@ void PopulateProperties(StackItem* stackItem, const QString& strStyleProps, } } - QString strFontFamily=abiPropsMap["font-family"].getValue(); + TQString strFontFamily=abiPropsMap["font-family"].getValue(); if (!strFontFamily.isEmpty() && (strFontFamily!="(null)")) { // TODO: transform the font-family in a font that we have on the system on which KWord runs. @@ -127,9 +127,9 @@ void PopulateProperties(StackItem* stackItem, const QString& strStyleProps, } } -void AddFormat(QDomElement& formatElementOut, StackItem* stackItem, QDomDocument& mainDocument) +void AddFormat(TQDomElement& formatElementOut, StackItem* stackItem, TQDomDocument& mainDocument) { - QDomElement element; + TQDomElement element; if (!stackItem->fontName.isEmpty()) { element=mainDocument.createElement("FONT"); @@ -186,17 +186,17 @@ void AddFormat(QDomElement& formatElementOut, StackItem* stackItem, QDomDocument } } -void AddLayout(const QString& strStyleName, QDomElement& layoutElement, - StackItem* stackItem, QDomDocument& mainDocument, +void AddLayout(const TQString& strStyleName, TQDomElement& tqlayoutElement, + StackItem* stackItem, TQDomDocument& mainDocument, const AbiPropsMap& abiPropsMap, const int level, const bool isStyle) { - QDomElement element; + TQDomElement element; element=mainDocument.createElement("NAME"); element.setAttribute("value",strStyleName); - layoutElement.appendChild(element); + tqlayoutElement.appendChild(element); - QString strFollowing=abiPropsMap["followedby"].getValue(); - QDomElement followingElement=mainDocument.createElement("FOLLOWING"); + TQString strFollowing=abiPropsMap["followedby"].getValue(); + TQDomElement followingElement=mainDocument.createElement("FOLLOWING"); followingElement.setAttribute("name",strFollowing); if ((strFollowing.isEmpty()) || (strFollowing=="Current Settings")) // "Current Settings" is only a pseudo-style! @@ -206,18 +206,18 @@ void AddLayout(const QString& strStyleName, QDomElement& layoutElement, { // We are a style, so we need a default followingElement.setAttribute("name","Normal"); - layoutElement.appendChild(followingElement); + tqlayoutElement.appendChild(followingElement); } - // Else: we are a layout, so we leave the work to KWord (from the style) + // Else: we are a tqlayout, so we leave the work to KWord (from the style) } else { // Following style is defined // TODO: we should be sure that this style is defined! - layoutElement.appendChild(followingElement); + tqlayoutElement.appendChild(followingElement); } - QString strFlow=abiPropsMap["text-align"].getValue(); + TQString strFlow=abiPropsMap["text-align"].getValue(); element=mainDocument.createElement("FLOW"); if ((strFlow=="left") || (strFlow=="center") || (strFlow=="right") || (strFlow=="justify")) { @@ -227,12 +227,12 @@ void AddLayout(const QString& strStyleName, QDomElement& layoutElement, { element.setAttribute("align","left"); } - layoutElement.appendChild(element); + tqlayoutElement.appendChild(element); int kwordDepth; int kwordNumberingType; int kwordType; - QString kwordRightText; + TQString kwordRightText; // level is 1 based like AbiWord, any value lower than 1 means no level! if ((level<=0) || (level>=15)) { @@ -258,11 +258,11 @@ void AddLayout(const QString& strStyleName, QDomElement& layoutElement, element.setAttribute("bullet",64); element.setAttribute("bulletfont","Symbol"); element.setAttribute("customdef",""); - layoutElement.appendChild(element); + tqlayoutElement.appendChild(element); - QString strLeftMargin=abiPropsMap["margin-left"].getValue(); - QString strRightMargin=abiPropsMap["margin-right"].getValue(); - QString strTextIndent=abiPropsMap["text-indent"].getValue(); + TQString strLeftMargin=abiPropsMap["margin-left"].getValue(); + TQString strRightMargin=abiPropsMap["margin-right"].getValue(); + TQString strTextIndent=abiPropsMap["text-indent"].getValue(); if ( !strLeftMargin.isEmpty() || !strRightMargin.isEmpty() @@ -275,11 +275,11 @@ void AddLayout(const QString& strStyleName, QDomElement& layoutElement, element.setAttribute("right",ValueWithLengthUnit(strRightMargin)); if (!strTextIndent.isEmpty()) element.setAttribute("first",ValueWithLengthUnit(strTextIndent)); - layoutElement.appendChild(element); + tqlayoutElement.appendChild(element); } - QString strTopMargin=abiPropsMap["margin-top"].getValue(); - QString strBottomMargin=abiPropsMap["margin-bottom"].getValue(); + TQString strTopMargin=abiPropsMap["margin-top"].getValue(); + TQString strBottomMargin=abiPropsMap["margin-bottom"].getValue(); if (!strTopMargin.isEmpty() || !strBottomMargin.isEmpty() ) { element=mainDocument.createElement("OFFSETS"); @@ -290,10 +290,10 @@ void AddLayout(const QString& strStyleName, QDomElement& layoutElement, element.setAttribute("after",margin_bottom); if (!strTopMargin.isEmpty()) element.setAttribute("before",margin_top); - layoutElement.appendChild(element); + tqlayoutElement.appendChild(element); } - QString strLineHeight=abiPropsMap["line-height"].getValue(); + TQString strLineHeight=abiPropsMap["line-height"].getValue(); if(!strLineHeight.isEmpty()) { element=mainDocument.createElement("LINESPACING"); @@ -351,18 +351,18 @@ void AddLayout(const QString& strStyleName, QDomElement& layoutElement, element.setAttribute( "spacingvalue", lineHeight ); } } - layoutElement.appendChild(element); + tqlayoutElement.appendChild(element); } - QString strTab=abiPropsMap["tabstops"].getValue(); + TQString strTab=abiPropsMap["tabstops"].getValue(); if(!strTab.isEmpty()) { - QStringList listTab=QStringList::split(",",strTab); - for ( QStringList::Iterator it = listTab.begin(); it != listTab.end(); ++it ) + TQStringList listTab=TQStringList::split(",",strTab); + for ( TQStringList::Iterator it = listTab.begin(); it != listTab.end(); ++it ) { - QStringList tab=QStringList::split("/",*it); - const QChar tabType=tab[1].at(0); - const QChar tabFilling=tab[1].at(1); // Might be empty in old AbiWord files + TQStringList tab=TQStringList::split("/",*it); + const TQChar tabType=tab[1].at(0); + const TQChar tabFilling=tab[1].at(1); // Might be empty in old AbiWord files int type; if (tabType=='L') // left type=0; @@ -376,7 +376,7 @@ void AddLayout(const QString& strStyleName, QDomElement& layoutElement, type=0; else { - kdWarning(30506)<<"Unknown tabulator type: " << QString(tabType) << endl; + kdWarning(30506)<<"Unknown tabulator type: " << TQString(tabType) << endl; type=0; } int filling; @@ -397,23 +397,23 @@ void AddLayout(const QString& strStyleName, QDomElement& layoutElement, element.setAttribute("type",type); element.setAttribute("filling",filling); element.setAttribute("width",width); - layoutElement.appendChild(element); + tqlayoutElement.appendChild(element); } } - QDomElement formatElementOut=mainDocument.createElement("FORMAT"); - layoutElement.appendChild(formatElementOut); + TQDomElement formatElementOut=mainDocument.createElement("FORMAT"); + tqlayoutElement.appendChild(formatElementOut); AddFormat(formatElementOut, stackItem, mainDocument); } -void AddStyle(QDomElement& styleElement, const QString& strStyleName, - const StyleData& styleData, QDomDocument& mainDocument) +void AddStyle(TQDomElement& styleElement, const TQString& strStyleName, + const StyleData& styleData, TQDomDocument& mainDocument) { // NOTE; styleElement is - if ( s1.getPropertyValue("text-align").string() != QString() && s1.getPropertyValue("text-align").string() != QString("left") ) + 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()); + state()->tqlayout=_writer->setLayout(state()->paragraph,state()->tqlayout); + _writer->tqlayoutAttribute(state()->paragraph, "FLOW","align",s1.getPropertyValue("text-align").string()); } // done @@ -520,11 +520,11 @@ void KHTMLReader::parseStyle(DOM::Element e) // debugging code. kdDebug(30503) << "e.style()" << endl; for (unsigned int i=0;iframeset=_writer->createTableCell(tableno,nrow,ncol,1,colrect); state()->frameset.firstChild().toElement().setAttribute("bkRed",bgcolor.red()); state()->frameset.firstChild().toElement().setAttribute("bkGreen",bgcolor.green()); @@ -614,7 +614,7 @@ bool KHTMLReader::parse_table(DOM::Element e) bool KHTMLReader::parse_img(DOM::Element /*e*/) { - //QRect e=e.getRect(); + //TQRect e=e.getRect(); return true; } @@ -628,19 +628,19 @@ bool KHTMLReader::parse_pre(DOM::Element e) _writer->addText(state()->paragraph,htmlelement.innerHTML().string(),1); startNewParagraph(); //popState(); - return false; // children are already handled. + return false; // tqchildren are already handled. #else pushNewState(); state()->in_pre_mode=true; - QString face=e.getAttribute("face").string(); - _writer->formatAttribute(state()->paragraph,"FONT","name",QString("Courier")); + 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. + return false; // tqchildren are already handled. #endif } @@ -653,11 +653,11 @@ bool KHTMLReader::parse_font(DOM::Element e) { kdDebug(30503) << "Entering parse_font" << endl; // fixme don't hardcode 12 font size ... - QString face=e.getAttribute("face").string(); - QColor color=parsecolor("#000000"); + TQString face=e.getAttribute("face").string(); + TQColor color=parsecolor("#000000"); if (!e.getAttribute("color").string().isEmpty()) color=parsecolor(e.getAttribute("color").string()); - QString size=e.getAttribute("size").string(); + TQString size=e.getAttribute("size").string(); int isize=-1; if (size.startsWith("+")) isize=12+size.right(size.length()-1).toInt(); @@ -668,11 +668,11 @@ bool KHTMLReader::parse_font(DOM::Element e) _writer->formatAttribute(state()->paragraph,"FONT","name",face); if ((isize>=0) && (isize != 12)) - _writer->formatAttribute(state()->paragraph,"SIZE","value",QString("%1").arg(isize)); + _writer->formatAttribute(state()->paragraph,"SIZE","value",TQString("%1").tqarg(isize)); - _writer->formatAttribute(state()->paragraph,"COLOR","red",QString("%1").arg(color.red())); - _writer->formatAttribute(state()->paragraph,"COLOR","green",QString("%1").arg(color.green())); - _writer->formatAttribute(state()->paragraph,"COLOR","blue",QString("%1").arg(color.blue())); + _writer->formatAttribute(state()->paragraph,"COLOR","red",TQString("%1").tqarg(color.red())); + _writer->formatAttribute(state()->paragraph,"COLOR","green",TQString("%1").tqarg(color.green())); + _writer->formatAttribute(state()->paragraph,"COLOR","blue",TQString("%1").tqarg(color.blue())); return true; } @@ -684,7 +684,7 @@ bool KHTMLReader::parse_ul(DOM::Element e) _list_depth++; if (e.firstChild().nodeName().string().lower() == "#text") // e.g.
    this is indented
  • first listitem
{ - _writer->layoutAttribute(state()->paragraph,"COUNTER","depth",QString("%1").arg(_list_depth-1)); // indent + _writer->tqlayoutAttribute(state()->paragraph,"COUNTER","depth",TQString("%1").tqarg(_list_depth-1)); // indent startNewLayout(); } for (DOM::Node items=e.firstChild();!items.isNull();items=items.nextSibling()) @@ -692,21 +692,21 @@ bool KHTMLReader::parse_ul(DOM::Element e) 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","."); + _writer->tqlayoutAttribute(state()->paragraph,"COUNTER","numberingtype","1"); + _writer->tqlayoutAttribute(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","."); + _writer->tqlayoutAttribute(state()->paragraph,"COUNTER","type","1"); + _writer->tqlayoutAttribute(state()->paragraph,"COUNTER","numberingtype","1"); + _writer->tqlayoutAttribute(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->tqlayoutAttribute(state()->paragraph,"COUNTER","type","10"); + _writer->tqlayoutAttribute(state()->paragraph,"COUNTER","numberingtype",""); + _writer->tqlayoutAttribute(state()->paragraph,"COUNTER","righttext",""); } - _writer->layoutAttribute(state()->paragraph,"COUNTER","depth",QString("%1").arg(_list_depth-1)); // indent + _writer->tqlayoutAttribute(state()->paragraph,"COUNTER","depth",TQString("%1").tqarg(_list_depth-1)); // indent } parseNode(items); } diff --git a/filters/kword/html/import/khtmlreader.h b/filters/kword/html/import/khtmlreader.h index c5b4c6b6..9987a589 100644 --- a/filters/kword/html/import/khtmlreader.h +++ b/filters/kword/html/import/khtmlreader.h @@ -20,11 +20,11 @@ #define KHTMLREADER_H #include // fixme speedup compile time by moving these into the cpp file. -#include -#include +#include +#include #include -//#include +//#include /** *@author Frank Dekervel @@ -36,16 +36,17 @@ namespace DOM { } struct HTMLReader_state { - QDomElement format; - QDomElement frameset; - QDomElement paragraph; - QDomElement layout; + TQDomElement format; + TQDomElement frameset; + TQDomElement paragraph; + TQDomElement tqlayout; bool in_pre_mode; // keep formatting as is. }; -class KHTMLReader: public QObject { +class KHTMLReader: public TQObject { Q_OBJECT + TQ_OBJECT public: KHTMLReader(KWDWriter *writer); @@ -66,18 +67,18 @@ private: void popState(); - /* void stateSetFormat(QDomElement f); - void stateSetFrameset(QDomElement f); - void stateSetLayout(QDomElement l); - void stateSetParagraph(QDomElement p);*/ + /* void stateSetFormat(TQDomElement f); + void stateSetFrameset(TQDomElement f); + void stateSetLayout(TQDomElement l); + void stateSetParagraph(TQDomElement p);*/ - QPtrStack _state; + TQPtrStack _state; KHTMLPart *_html; KWDWriter *_writer; void startNewLayout(bool startNewFormat=false); - void startNewLayout(bool startNewFormat, QDomElement layout); - void startNewParagraph(bool startnewformat=true, bool startnewlayout=true); + void startNewLayout(bool startNewFormat, TQDomElement tqlayout); + void startNewParagraph(bool startnewformat=true, bool startnewtqlayout=true); bool _it_worked; // ----------------------------------------------------- int _list_depth; diff --git a/filters/kword/html/import/kwdwriter.cpp b/filters/kword/html/import/kwdwriter.cpp index 3a7e0aea..d2e4c450 100644 --- a/filters/kword/html/import/kwdwriter.cpp +++ b/filters/kword/html/import/kwdwriter.cpp @@ -18,32 +18,32 @@ #include "kwdwriter.h" #include -#include "qrect.h" +#include "tqrect.h" #include -#include +#include KWDWriter::KWDWriter(KoStore *store){ _zoomhandler = new KoTextZoomHandler(); _store=store; - _doc= new QDomDocument("DOC"); - _docinfo = new QDomDocument("document-info"); + _doc= new TQDomDocument("DOC"); + _docinfo = new TQDomDocument("document-info"); _doc->appendChild( _doc->createProcessingInstruction( "xml", "version=\"1.0\" encoding=\"UTF-8\"" ) ); _docinfo->appendChild( _docinfo->createProcessingInstruction( "xml", "version=\"1.0\" encoding=\"UTF-8\"" ) ); - QDomElement infodoc = _docinfo->createElement( "document-info" ); + TQDomElement infodoc = _docinfo->createElement( "document-info" ); _docinfoMain=infodoc; _docinfo->appendChild(infodoc); tableNo=1; insidetable = false; - QDomElement kwdoc = _doc->createElement( "DOC" ); + TQDomElement kwdoc = _doc->createElement( "DOC" ); kwdoc.setAttribute( "editor", "HTML Import Filter" ); kwdoc.setAttribute( "mime", "application/x-kword" ); _doc->appendChild( kwdoc ); - QDomElement paper = _doc->createElement( "PAPER" ); + TQDomElement paper = _doc->createElement( "PAPER" ); kwdoc.appendChild( paper ); paper.setAttribute( "format", 1 ); paper.setAttribute( "width", 595 ); @@ -54,14 +54,14 @@ KWDWriter::KWDWriter(KoStore *store){ paper.setAttribute( "hType", 0 ); paper.setAttribute( "fType", 0 ); - QDomElement borders = _doc->createElement( "PAPERBORDERS" ); + TQDomElement borders = _doc->createElement( "PAPERBORDERS" ); paper.appendChild( borders ); borders.setAttribute( "left", 20 ); borders.setAttribute( "top", 10 ); borders.setAttribute( "right", 10 ); borders.setAttribute( "bottom", 10 ); - QDomElement docattrs = _doc->createElement( "ATTRIBUTES" ); + TQDomElement docattrs = _doc->createElement( "ATTRIBUTES" ); kwdoc.appendChild( docattrs ); docattrs.setAttribute( "processing", 0 ); docattrs.setAttribute( "standardpage", 1 ); @@ -69,19 +69,19 @@ KWDWriter::KWDWriter(KoStore *store){ docattrs.setAttribute( "hasFooter", 0 ); //docattrs.setAttribute( "unit", "mm" ); // use KWord default instead - QDomElement framesets = _doc->createElement("FRAMESETS"); + TQDomElement framesets = _doc->createElement("FRAMESETS"); kwdoc.appendChild(framesets); - QDomElement rootframeset = addFrameSet(framesets); + TQDomElement rootframeset = addFrameSet(framesets); _mainFrameset=rootframeset; - QDomElement mainframe= addFrame(rootframeset,QRect(28,28,539,757)); + TQDomElement mainframe= addFrame(rootframeset,TQRect(28,28,539,757)); - QDomElement styles=_doc->createElement("STYLES"); + TQDomElement styles=_doc->createElement("STYLES"); kwdoc.appendChild(styles); - QDomElement standard=_doc->createElement("STYLE"); + TQDomElement standard=_doc->createElement("STYLE"); styles.appendChild(standard); - QDomElement tmp; + TQDomElement tmp; tmp=_doc->createElement("NAME"); tmp.setAttribute("value","Standard"); standard.appendChild(tmp); @@ -89,7 +89,7 @@ KWDWriter::KWDWriter(KoStore *store){ tmp=_doc->createElement("FOLLOWING"); tmp.setAttribute("name","Standard"); standard.appendChild(tmp); - QDomElement fmt; + TQDomElement fmt; fmt=_doc->createElement("FORMAT"); fmt.setAttribute("id","1"); @@ -134,15 +134,15 @@ int KWDWriter::createTable() { return tableNo++; } -void KWDWriter::createDocInfo(QString author, QString title) { - QDomElement authorTag=_docinfo->createElement("author"); - QDomElement aboutTag=_docinfo->createElement("about"); - QDomElement fullNameTag=_docinfo->createElement("full-name"); - QDomText titleText=_docinfo->createTextNode(title); - QDomText authorText=_docinfo->createTextNode(author); +void KWDWriter::createDocInfo(TQString author, TQString title) { + TQDomElement authorTag=_docinfo->createElement("author"); + TQDomElement aboutTag=_docinfo->createElement("about"); + TQDomElement fullNameTag=_docinfo->createElement("full-name"); + TQDomText titleText=_docinfo->createTextNode(title); + TQDomText authorText=_docinfo->createTextNode(author); fullNameTag.appendChild(authorText); authorTag.appendChild(fullNameTag); - QDomElement titleTag=_docinfo->createElement("title"); + TQDomElement titleTag=_docinfo->createElement("title"); titleTag.appendChild(titleText); aboutTag.appendChild(titleTag); _docinfoMain.appendChild(authorTag); @@ -150,7 +150,7 @@ void KWDWriter::createDocInfo(QString author, QString title) { } -void KWDWriter::createInline(QDomElement paragraph, QDomElement toInline) { +void KWDWriter::createInline(TQDomElement paragraph, TQDomElement toInline) { if (toInline.tagName() == "FRAMESET") { formatAttribute(paragraph,"ANCHOR","type","frameset"); // fixme: support other kinds of inlines. @@ -162,20 +162,20 @@ void KWDWriter::createInline(QDomElement paragraph, QDomElement toInline) { } -QDomElement KWDWriter::currentLayout(QDomElement paragraph) { +TQDomElement KWDWriter::currentLayout(TQDomElement paragraph) { return paragraph.elementsByTagName("LAYOUT").item(0).toElement(); } -QDomElement KWDWriter::createTableCell(int tableno, int nrow, - int ncol, int colspan, QRect rect) { - QDomElement parent=docroot().elementsByTagName("FRAMESETS").item(0).toElement(); +TQDomElement KWDWriter::createTableCell(int tableno, int nrow, + int ncol, int colspan, TQRect rect) { + TQDomElement tqparent=docroot().elementsByTagName("FRAMESETS").item(0).toElement(); - QDomElement fs=addFrameSet(parent,1,0, - QString("Table %1 - %2,%3").arg(tableno).arg(nrow).arg(ncol), + TQDomElement fs=addFrameSet(tqparent,1,0, + TQString("Table %1 - %2,%3").tqarg(tableno).tqarg(nrow).tqarg(ncol), 1); - fs.setAttribute("grpMgr",QString("Table %1").arg(tableno)); + fs.setAttribute("grpMgr",TQString("Table %1").tqarg(tableno)); fs.setAttribute("row",nrow); fs.setAttribute("col",ncol); fs.setAttribute("cols",colspan); // FIXME do colspan in finishTable @@ -185,16 +185,16 @@ QDomElement KWDWriter::createTableCell(int tableno, int nrow, return fs; } -QDomElement KWDWriter::fetchTableCell(int tableno, int rowno, int colno) { - QDomNodeList e=docroot().elementsByTagName("FRAMESET"); +TQDomElement KWDWriter::fetchTableCell(int tableno, int rowno, int colno) { + TQDomNodeList e=docroot().elementsByTagName("FRAMESET"); for (unsigned int i=0;icreateElement("FRAMESET"); - parent.appendChild(frameset); + TQDomElement frameset=_doc->createElement("FRAMESET"); + tqparent.appendChild(frameset); frameset.setAttribute("frameType",frametype); frameset.setAttribute("frameInfo",frameinfo); @@ -295,17 +295,17 @@ QDomElement KWDWriter::addFrameSet(QDomElement parent, int frametype, return frameset; } -QDomElement KWDWriter::addParagraph(QDomElement parent) { - QDomElement k; - return addParagraph(parent,k); +TQDomElement KWDWriter::addParagraph(TQDomElement tqparent) { + TQDomElement k; + return addParagraph(tqparent,k); } -void KWDWriter::appendKWordVariable(QDomDocument& doc, QDomElement& format, - const QString& text, const QString& key, int type, QDomElement& child) { +void KWDWriter::appendKWordVariable(TQDomDocument& doc, TQDomElement& format, + const TQString& text, const TQString& key, int type, TQDomElement& child) { - QDomElement variableElement ( doc.createElement("VARIABLE") ); + TQDomElement variableElement ( doc.createElement("VARIABLE") ); - QDomElement typeElement ( doc.createElement("TYPE") ); + TQDomElement typeElement ( doc.createElement("TYPE") ); typeElement.setAttribute("key",key); typeElement.setAttribute("type",type); typeElement.setAttribute("text",text); @@ -316,11 +316,11 @@ void KWDWriter::appendKWordVariable(QDomDocument& doc, QDomElement& format, format.appendChild(variableElement); } -QDomElement KWDWriter::createLink(QDomElement paragraph, QString linkName, QString hrefName) { - QDomElement linkElement = _doc->createElement("LINK"); +TQDomElement KWDWriter::createLink(TQDomElement paragraph, TQString linkName, TQString hrefName) { + TQDomElement linkElement = _doc->createElement("LINK"); linkElement.setAttribute( "linkName", linkName ); linkElement.setAttribute( "hrefName", hrefName ); - QDomElement format = currentFormat(paragraph,true); + TQDomElement format = currentFormat(paragraph,true); format.setAttribute("id", 4); // change Variable appendKWordVariable(*_doc, format, linkName, "STRING", 9, linkElement); @@ -328,23 +328,23 @@ QDomElement KWDWriter::createLink(QDomElement paragraph, QString linkName, QStri } -QDomElement KWDWriter::setLayout(QDomElement paragraph, QDomElement layout) { - QDomElement theLayout; - if (layout.isNull()) +TQDomElement KWDWriter::setLayout(TQDomElement paragraph, TQDomElement tqlayout) { + TQDomElement theLayout; + if (tqlayout.isNull()) theLayout=_doc->createElement("LAYOUT"); else - theLayout=layout.cloneNode().toElement(); - QDomElement oldLayout=currentLayout(paragraph); + theLayout=tqlayout.cloneNode().toElement(); + TQDomElement oldLayout=currentLayout(paragraph); paragraph.removeChild(oldLayout); paragraph.appendChild(theLayout); return theLayout; } -QRect getRect(QDomElement frameset) { +TQRect getRect(TQDomElement frameset) { // returns the rect of the first frame. - QDomElement frame=frameset.elementsByTagName("FRAME").item(0).toElement(); - return QRect(frame.attribute("left").toInt(), + TQDomElement frame=frameset.elementsByTagName("FRAME").item(0).toElement(); + return TQRect(frame.attribute("left").toInt(), frame.attribute("top").toInt(), frame.attribute("right").toInt()-frame.attribute("left").toInt(), frame.attribute("bottom").toInt()-frame.attribute("top").toInt() @@ -353,39 +353,39 @@ QRect getRect(QDomElement frameset) { } -QDomElement KWDWriter::addParagraph(QDomElement parent, QDomElement layoutToClone) { +TQDomElement KWDWriter::addParagraph(TQDomElement tqparent, TQDomElement tqlayoutToClone) { - QDomElement paragraph=_doc->createElement("PARAGRAPH"); - QDomElement formats=_doc->createElement("FORMATS"); - QDomElement layout; - if (layoutToClone.isNull()) { - layout=_doc->createElement("LAYOUT"); + TQDomElement paragraph=_doc->createElement("PARAGRAPH"); + TQDomElement formats=_doc->createElement("FORMATS"); + TQDomElement tqlayout; + if (tqlayoutToClone.isNull()) { + tqlayout=_doc->createElement("LAYOUT"); } else { - layout=layoutToClone.cloneNode().toElement(); + tqlayout=tqlayoutToClone.cloneNode().toElement(); } - QDomElement text=_doc->createElement("TEXT"); - QDomText t=_doc->createTextNode(QString("")); + TQDomElement text=_doc->createElement("TEXT"); + TQDomText t=_doc->createTextNode(TQString("")); text.appendChild(t); paragraph.appendChild(formats); paragraph.appendChild(text); - parent.appendChild(paragraph); - paragraph.appendChild(layout); - layoutAttribute(paragraph,"NAME","value","Standard"); + tqparent.appendChild(paragraph); + paragraph.appendChild(tqlayout); + tqlayoutAttribute(paragraph,"NAME","value","Standard"); return paragraph; } -QDomElement KWDWriter::formatAttribute(QDomElement paragraph, QString name, QString attrName, QString attr) { +TQDomElement KWDWriter::formatAttribute(TQDomElement paragraph, TQString name, TQString attrName, TQString attr) { kdDebug() << "Entering KWDWriter::formatAttribute" << endl; - QDomElement lastformat=currentFormat(paragraph,true); - QDomNodeList qdnl= lastformat.elementsByTagName(name); + TQDomElement lastformat=currentFormat(paragraph,true); + TQDomNodeList qdnl= lastformat.elementsByTagName(name); if (qdnl.length()) { - QDomElement el; + TQDomElement el; el=qdnl.item(0).toElement(); el.setAttribute(attrName,attr); return el; } else { - QDomElement al=_doc->createElement(name); + TQDomElement al=_doc->createElement(name); lastformat.appendChild(al); al.setAttribute(attrName,attr); return al; @@ -393,43 +393,43 @@ QDomElement KWDWriter::formatAttribute(QDomElement paragraph, QString name, QStr } -QString KWDWriter::getLayoutAttribute(QDomElement paragraph, QString name, QString attrName) { - QDomElement currentLayout=paragraph.elementsByTagName("LAYOUT").item(0).toElement(); - QDomNodeList qdnl= currentLayout.elementsByTagName(name); +TQString KWDWriter::getLayoutAttribute(TQDomElement paragraph, TQString name, TQString attrName) { + TQDomElement currentLayout=paragraph.elementsByTagName("LAYOUT").item(0).toElement(); + TQDomNodeList qdnl= currentLayout.elementsByTagName(name); if (qdnl.length()) { - QDomElement el=qdnl.item(0).toElement(); + TQDomElement el=qdnl.item(0).toElement(); return el.attribute(attrName); } - return QString::null; + return TQString(); } -QDomElement KWDWriter::layoutAttribute(QDomElement paragraph, QString name, QString attrName, QString attr) +TQDomElement KWDWriter::tqlayoutAttribute(TQDomElement paragraph, TQString name, TQString attrName, TQString attr) { - kdDebug() << "Entering KWDWriter::layoutAttribute name=" << name << " attrName=" << attrName << " attr=" << attr << endl; - QDomElement currentLayout=paragraph.elementsByTagName("LAYOUT").item(0).toElement(); - QDomNodeList qdnl= currentLayout.elementsByTagName(name); + kdDebug() << "Entering KWDWriter::tqlayoutAttribute name=" << name << " attrName=" << attrName << " attr=" << attr << endl; + TQDomElement currentLayout=paragraph.elementsByTagName("LAYOUT").item(0).toElement(); + TQDomNodeList qdnl= currentLayout.elementsByTagName(name); if (qdnl.length()) { - QDomElement el; + TQDomElement el; el=qdnl.item(0).toElement(); el.setAttribute(attrName,attr); return el; } else { - QDomElement al=_doc->createElement(name); + TQDomElement al=_doc->createElement(name); currentLayout.appendChild(al); al.setAttribute(attrName,attr); return al; } } -void KWDWriter::addText(QDomElement paragraph, QString text, int format_id, bool keep_formatting) { - QDomNode temp=paragraph.elementsByTagName("TEXT").item(0).firstChild(); - QDomText currentText=temp.toText(); +void KWDWriter::addText(TQDomElement paragraph, TQString text, int format_id, bool keep_formatting) { + TQDomNode temp=paragraph.elementsByTagName("TEXT").item(0).firstChild(); + TQDomText currentText=temp.toText(); if (temp.isNull()) { kdDebug(30503) << "no text" << endl; return; } - QString oldtext=currentText.data(); + TQString oldtext=currentText.data(); int oldLength=oldtext.length(); if (keep_formatting) { @@ -445,7 +445,7 @@ void KWDWriter::addText(QDomElement paragraph, QString text, int format_id, bool ++oldLength; // add new trailing space char text=text.simplifyWhiteSpace(); // drop all unprintable chars } - QString newtext; + TQString newtext; if (keep_formatting) newtext=oldtext + text; else @@ -457,38 +457,38 @@ void KWDWriter::addText(QDomElement paragraph, QString text, int format_id, bool } currentText.setData(newtext); int newLength=text.length(); - QDomElement lastformat=currentFormat(paragraph,true); + TQDomElement lastformat=currentFormat(paragraph,true); if (lastformat.attribute("id").isEmpty()) // keep old id value, e.g. for LINK URL lastformat.setAttribute("id",format_id); - lastformat.setAttribute("pos",QString("%1").arg(oldLength)); - lastformat.setAttribute("len",QString("%1").arg(newLength)); + lastformat.setAttribute("pos",TQString("%1").tqarg(oldLength)); + lastformat.setAttribute("len",TQString("%1").tqarg(newLength)); } -QString KWDWriter::getText(QDomElement paragraph) { - QDomNode temp=paragraph.elementsByTagName("TEXT").item(0).firstChild(); - QDomText currentText=temp.toText(); +TQString KWDWriter::getText(TQDomElement paragraph) { + TQDomNode temp=paragraph.elementsByTagName("TEXT").item(0).firstChild(); + TQDomText currentText=temp.toText(); if (temp.isNull()) { kdWarning(30503) << "no text" << endl; } return currentText.data(); } -QDomElement KWDWriter::startFormat(QDomElement paragraph) { +TQDomElement KWDWriter::startFormat(TQDomElement paragraph) { if (paragraph.isNull()) { kdWarning(30503) << "startFormat on empty paragraph" << endl; } - QDomElement format=_doc->createElement("FORMAT"); + TQDomElement format=_doc->createElement("FORMAT"); paragraph.elementsByTagName("FORMATS").item(0).appendChild(format); return format; } -QDomElement KWDWriter::startFormat(QDomElement paragraph, QDomElement formatToClone) { - QDomElement format=formatToClone.cloneNode().toElement(); +TQDomElement KWDWriter::startFormat(TQDomElement paragraph, TQDomElement formatToClone) { + TQDomElement format=formatToClone.cloneNode().toElement(); if (format.isNull()) { kdWarning(30503) << "startFormat: null format cloned" << endl; } if (paragraph.isNull()) { kdWarning(30503) << "startFormat on empty paragraph" << endl; } format.removeAttribute("len"); format.removeAttribute("pos"); format.removeAttribute("id"); - for (QDomElement a=format.firstChild().toElement();!a.isNull();a=a.nextSibling().toElement()) { + for (TQDomElement a=format.firstChild().toElement();!a.isNull();a=a.nextSibling().toElement()) { if (a.tagName() == "ANCHOR") { format.removeChild(a); } @@ -497,9 +497,9 @@ QDomElement KWDWriter::startFormat(QDomElement paragraph, QDomElement formatToCl return format; } -QDomElement KWDWriter::currentFormat(QDomElement paragraph, bool start_new_one) { +TQDomElement KWDWriter::currentFormat(TQDomElement paragraph, bool start_new_one) { - QDomElement e=paragraph.elementsByTagName("FORMATS").item(0).lastChild().toElement(); + TQDomElement e=paragraph.elementsByTagName("FORMATS").item(0).lastChild().toElement(); if (e.isNull()) { // no current format, start a new one if (start_new_one) return startFormat(paragraph); @@ -513,11 +513,11 @@ QDomElement KWDWriter::currentFormat(QDomElement paragraph, bool start_new_one) } -void KWDWriter::cleanUpParagraph(QDomElement paragraph) { - QDomElement e=paragraph.elementsByTagName("FORMATS").item(0).toElement(); +void KWDWriter::cleanUpParagraph(TQDomElement paragraph) { + TQDomElement e=paragraph.elementsByTagName("FORMATS").item(0).toElement(); if (e.isNull()) { kdWarning(30503) << "cleanup : no valid paragraph" << endl; return; } - for (QDomElement k=e.firstChild().toElement();!k.isNull();k=k.nextSibling().toElement()) { - if (k.attribute("len",QString::null).isNull()) { + for (TQDomElement k=e.firstChild().toElement();!k.isNull();k=k.nextSibling().toElement()) { + if (k.attribute("len",TQString()).isNull()) { e.removeChild(k); cleanUpParagraph(paragraph); return; @@ -526,10 +526,10 @@ void KWDWriter::cleanUpParagraph(QDomElement paragraph) { } -QDomElement KWDWriter::addFrame(QDomElement frameset, QRect rect, int runaround, int copy, +TQDomElement KWDWriter::addFrame(TQDomElement frameset, TQRect rect, int runaround, int copy, int newFrameBehaviour, int runaroundGap ) { - QDomElement frame = _doc->createElement("FRAME"); + TQDomElement frame = _doc->createElement("FRAME"); frameset.appendChild(frame); frame.setAttribute("runaround",runaround); frame.setAttribute("copy",copy); @@ -539,12 +539,12 @@ QDomElement KWDWriter::addFrame(QDomElement frameset, QRect rect, int runaround, return frame; } -QDomElement KWDWriter::docroot() { +TQDomElement KWDWriter::docroot() { return _doc->elementsByTagName("DOC").item(0).toElement(); } bool KWDWriter::writeDoc() { - QCString str=_doc->toCString(); + TQCString str=_doc->toCString(); kdWarning(30503) << str << endl; if (!_store->open("root")) { @@ -566,12 +566,12 @@ bool KWDWriter::writeDoc() { } -QDomElement KWDWriter::mainFrameset() { +TQDomElement KWDWriter::mainFrameset() { return _mainFrameset; } -void KWDWriter::addRect(QDomElement e,QRect rect) { +void KWDWriter::addRect(TQDomElement e,TQRect rect) { e.setAttribute("top",_zoomhandler->pixelYToPt( rect.top())); e.setAttribute("left",_zoomhandler->pixelXToPt(rect.left())); e.setAttribute("bottom",_zoomhandler->pixelYToPt(rect.bottom())); diff --git a/filters/kword/html/import/kwdwriter.h b/filters/kword/html/import/kwdwriter.h index 5b800c7a..2fc888c4 100644 --- a/filters/kword/html/import/kwdwriter.h +++ b/filters/kword/html/import/kwdwriter.h @@ -20,9 +20,9 @@ #define KWDWRITER_H -#include +#include #include -#include +#include /** *@author Frank Dekervel @@ -44,10 +44,10 @@ public: /** - * adds a frameset to parent FIXME + * adds a frameset to tqparent FIXME **/ - QDomElement addFrameSet(QDomElement parent, int frametype=1, - int frameinfo=0, QString name=QString::null, + TQDomElement addFrameSet(TQDomElement tqparent, int frametype=1, + int frameinfo=0, TQString name=TQString(), int visible=1); /** @@ -65,15 +65,15 @@ public: /** * creates a table cell **/ - QDomElement createTableCell(int tableno, int nrow, - int ncol, int colspan, QRect rect); + TQDomElement createTableCell(int tableno, int nrow, + int ncol, int colspan, TQRect rect); /** * fetches the cell of a table **/ - QDomElement fetchTableCell(int tableno, int rowno, int colno); + TQDomElement fetchTableCell(int tableno, int rowno, int colno); /** @@ -81,7 +81,7 @@ public: * if the arguments x,y,w,h are given, each cell is resized to have a 'right' * table. otherwise, the cell sizes are not touched. **/ - void finishTable(int tableno, QRect rect); + void finishTable(int tableno, TQRect rect); void finishTable(int tableno); /** @@ -89,23 +89,23 @@ public: * @param paragraph: the paragraph the anchor should be placed in * @param toInLline: the element that should be inlined **/ - void createInline(QDomElement paragraph, QDomElement toInline); + void createInline(TQDomElement paragraph, TQDomElement toInline); /** - * create a horizontal ruler layout + * create a horizontal ruler tqlayout **/ - void createHR(QDomElement paragraph, int width=1); + void createHR(TQDomElement paragraph, int width=1); /** * **/ - QDomElement currentLayout(QDomElement paragraph); + TQDomElement currentLayout(TQDomElement paragraph); /** * adds a frame to frameset FIXME **/ - QDomElement addFrame(QDomElement frameset, QRect rect, int runaround=0, int copy=0, + TQDomElement addFrame(TQDomElement frameset, TQRect rect, int runaround=0, int copy=0, //int top=42, int left=28, int bottom=799, int right=567, int newFrameBehaviour=0, int runaroundGap=2 ); @@ -114,104 +114,104 @@ public: /** * adds a paragraph **/ - QDomElement addParagraph(QDomElement parent); - QDomElement addParagraph(QDomElement parent, QDomElement layout); + TQDomElement addParagraph(TQDomElement tqparent); + TQDomElement addParagraph(TQDomElement tqparent, TQDomElement tqlayout); /** * adds/changes an attribute to/of the current format **/ - QDomElement formatAttribute(QDomElement paragraph, QString name, QString attrName, QString attr); + TQDomElement formatAttribute(TQDomElement paragraph, TQString name, TQString attrName, TQString attr); /** - * get a layout attribute + * get a tqlayout attribute **/ - QString getLayoutAttribute(QDomElement paragraph, QString name, QString attrName); + TQString getLayoutAttribute(TQDomElement paragraph, TQString name, TQString attrName); /** - * adds/changes an attribute to/of the current layout + * adds/changes an attribute to/of the current tqlayout **/ - QDomElement layoutAttribute(QDomElement paragraph, QString name, QString attrName, QString attr); + TQDomElement tqlayoutAttribute(TQDomElement paragraph, TQString name, TQString attrName, TQString attr); /** * creates a new format in the current paragraph. do this before adding text * FIXME: you can only do addText once per format **/ - QDomElement startFormat(QDomElement paragraph); - QDomElement startFormat(QDomElement paragraph, QDomElement formatToClone); + TQDomElement startFormat(TQDomElement paragraph); + TQDomElement startFormat(TQDomElement paragraph, TQDomElement formatToClone); /** * cleans up the current paragraph (throw away unused formats) * FIXME: find a better solution **/ - void cleanUpParagraph(QDomElement paragraph); + void cleanUpParagraph(TQDomElement paragraph); /** * adds some text to the current format in this paragraph **/ - void addText(QDomElement paragraph, QString text, int format_id, bool keep_formatting=false); + void addText(TQDomElement paragraph, TQString text, int format_id, bool keep_formatting=false); /** * returns the current format * if start_new_one is true, a new format will be started if needed **/ - QDomElement currentFormat(QDomElement paragraph, bool start_new_one=false); + TQDomElement currentFormat(TQDomElement paragraph, bool start_new_one=false); /** * create a Link (URL) **/ - QDomElement createLink(QDomElement paragraph, QString linkName, QString hrefName); + TQDomElement createLink(TQDomElement paragraph, TQString linkName, TQString hrefName); /** - * copy the given layout, and set it as layout of the given paragraph + * copy the given tqlayout, and set it as tqlayout of the given paragraph **/ - QDomElement setLayout(QDomElement paragraph, QDomElement layout); + TQDomElement setLayout(TQDomElement paragraph, TQDomElement tqlayout); /** * returns the text of this paragraph. **/ - QString getText(QDomElement paragraph); + TQString getText(TQDomElement paragraph); /** * returns the rectangle of the first frame of this frameset **/ - QRect getRect(QDomElement frameset); + TQRect getRect(TQDomElement frameset); /** * returns the 'main' frameset of this document. **/ - QDomElement mainFrameset(); + TQDomElement mainFrameset(); /** * mark document as being written by author, and having title title **/ - void createDocInfo(QString author, QString title); + void createDocInfo(TQString author, TQString title); /** * returns the document root **/ - QDomElement docroot(); + TQDomElement docroot(); /** * creates a KWord Variable (Link, ...) **/ - void appendKWordVariable(QDomDocument& doc, QDomElement& format, - const QString& text, const QString& key, int type, QDomElement& child); + void appendKWordVariable(TQDomDocument& doc, TQDomElement& format, + const TQString& text, const TQString& key, int type, TQDomElement& child); private: /** * creates a rectangle **/ - void addRect(QDomElement e, QRect rect); + void addRect(TQDomElement e, TQRect rect); protected: KoStore *_store; - QDomElement _mainFrameset; - QDomDocument *_doc; - QDomDocument *_docinfo; - QDomElement _docinfoMain; + TQDomElement _mainFrameset; + TQDomDocument *_doc; + TQDomDocument *_docinfo; + TQDomElement _docinfoMain; KoTextZoomHandler *_zoomhandler; int tableNo; bool insidetable; diff --git a/filters/kword/kword1.3/import/kword13document.cpp b/filters/kword/kword1.3/import/kword13document.cpp index 697bb366..fcf8e60c 100644 --- a/filters/kword/kword1.3/import/kword13document.cpp +++ b/filters/kword/kword1.3/import/kword13document.cpp @@ -18,7 +18,7 @@ * Boston, MA 02110-1301, USA. */ -#include +#include #include #include @@ -44,15 +44,15 @@ KWord13Document::~KWord13Document( void ) delete m_previewFile; } -void KWord13Document::xmldump( QIODevice* io ) +void KWord13Document::xmldump( TQIODevice* io ) { - QTextStream iostream( io ); - iostream.setEncoding( QTextStream::UnicodeUTF8 ); + TQTextStream iostream( io ); + iostream.setEncoding( TQTextStream::UnicodeUTF8 ); iostream << "\n"; iostream << "\n"; - for ( QMap::ConstIterator it = m_documentProperties.begin(); + for ( TQMap::ConstIterator it = m_documentProperties.begin(); it != m_documentProperties.end(); ++it) { @@ -60,7 +60,7 @@ void KWord13Document::xmldump( QIODevice* io ) } iostream << " \n"; - for ( QMap::ConstIterator it11 = m_documentInfo.begin(); + for ( TQMap::ConstIterator it11 = m_documentInfo.begin(); it11 != m_documentInfo.end(); ++it11) { @@ -124,7 +124,7 @@ void KWord13Document::xmldump( QIODevice* io ) iostream << " \n"; - for ( QValueList::Iterator it2 = m_styles.begin(); + for ( TQValueList::Iterator it2 = m_styles.begin(); it2 != m_styles.end(); ++it2) { @@ -135,7 +135,7 @@ void KWord13Document::xmldump( QIODevice* io ) iostream << " \n"; - for ( QDictIterator it3( m_pictureDict ) ; it3.current(); ++it3 ) + for ( TQDictIterator it3( m_pictureDict ) ; it3.current(); ++it3 ) { iostream << " " << it3.currentKey() << "" << endl; } @@ -145,13 +145,13 @@ void KWord13Document::xmldump( QIODevice* io ) iostream << "\n"; } -QString KWord13Document::getDocumentInfo( const QString& name ) const +TQString KWord13Document::getDocumentInfo( const TQString& name ) const { - QMap::ConstIterator it ( m_documentInfo.find( name ) ); + TQMap::ConstIterator it ( m_documentInfo.tqfind( name ) ); if ( it == m_documentInfo.end() ) { // Property does not exist - return QString::null; + return TQString(); } else { @@ -159,9 +159,9 @@ QString KWord13Document::getDocumentInfo( const QString& name ) const } } -QString KWord13Document::getProperty( const QString& name, const QString& oldName ) const +TQString KWord13Document::getProperty( const TQString& name, const TQString& oldName ) const { - const QString result ( getPropertyInternal( name ) ); + const TQString result ( getPropertyInternal( name ) ); if ( result.isEmpty() && !oldName.isEmpty() ) { @@ -174,13 +174,13 @@ QString KWord13Document::getProperty( const QString& name, const QString& oldNam } } -QString KWord13Document::getPropertyInternal( const QString& name ) const +TQString KWord13Document::getPropertyInternal( const TQString& name ) const { - QMap::ConstIterator it ( m_documentProperties.find( name ) ); + TQMap::ConstIterator it ( m_documentProperties.tqfind( name ) ); if ( it == m_documentProperties.end() ) { // Property does not exist - return QString::null; + return TQString(); } else { @@ -188,11 +188,11 @@ QString KWord13Document::getPropertyInternal( const QString& name ) const } } -QDateTime KWord13Document::lastPrintingDate( void ) const +TQDateTime KWord13Document::lastPrintingDate( void ) const { - const QString strDate( getPropertyInternal( "VARIABLESETTINGS:lastPrintingDate" ) ); + const TQString strDate( getPropertyInternal( "VARIABLESETTINGS:lastPrintingDate" ) ); - QDateTime dt; + TQDateTime dt; if ( strDate.isEmpty() ) { @@ -201,16 +201,16 @@ QDateTime KWord13Document::lastPrintingDate( void ) const } else { - dt = QDateTime::fromString( strDate, Qt::ISODate ); + dt = TQDateTime::fromString( strDate, Qt::ISODate ); } return dt; } -QDateTime KWord13Document::creationDate( void ) const +TQDateTime KWord13Document::creationDate( void ) const { - const QString strDate( getPropertyInternal( "VARIABLESETTINGS:creationDate" ) ); + const TQString strDate( getPropertyInternal( "VARIABLESETTINGS:creationDate" ) ); - QDateTime dt; + TQDateTime dt; if ( strDate.isEmpty() ) { @@ -219,9 +219,9 @@ QDateTime KWord13Document::creationDate( void ) const const int month = getPropertyInternal( "VARIABLESETTINGS:createFileMonth" ).toInt(); const int day = getPropertyInternal( "VARIABLESETTINGS:createFileDay" ).toInt(); - if ( QDate::isValid( year, month, day) ) + if ( TQDate::isValid( year, month, day) ) { - dt.setDate( QDate ( year, month, day) ); + dt.setDate( TQDate ( year, month, day) ); } else { @@ -230,16 +230,16 @@ QDateTime KWord13Document::creationDate( void ) const } else { - dt = QDateTime::fromString( strDate, Qt::ISODate ); + dt = TQDateTime::fromString( strDate, Qt::ISODate ); } return dt; } -QDateTime KWord13Document::modificationDate( void ) const +TQDateTime KWord13Document::modificationDate( void ) const { - const QString strDate( getPropertyInternal( "VARIABLESETTINGS:modificationDate" ) ); + const TQString strDate( getPropertyInternal( "VARIABLESETTINGS:modificationDate" ) ); - QDateTime dt; + TQDateTime dt; if ( strDate.isEmpty() ) { @@ -247,9 +247,9 @@ QDateTime KWord13Document::modificationDate( void ) const const int year = getPropertyInternal( "VARIABLESETTINGS:modifyFileYear" ).toInt(); const int month = getPropertyInternal( "VARIABLESETTINGS:modifyFileMonth" ).toInt(); const int day = getPropertyInternal( "VARIABLESETTINGS:modifyFileDay" ).toInt(); - if ( QDate::isValid( year, month, day) ) + if ( TQDate::isValid( year, month, day) ) { - dt.setDate( QDate ( year, month, day) ); + dt.setDate( TQDate ( year, month, day) ); } else { @@ -258,7 +258,7 @@ QDateTime KWord13Document::modificationDate( void ) const } else { - dt = QDateTime::fromString( strDate, Qt::ISODate ); + dt = TQDateTime::fromString( strDate, Qt::ISODate ); } return dt; } diff --git a/filters/kword/kword1.3/import/kword13document.h b/filters/kword/kword1.3/import/kword13document.h index dad59be9..79d4d971 100644 --- a/filters/kword/kword1.3/import/kword13document.h +++ b/filters/kword/kword1.3/import/kword13document.h @@ -21,16 +21,16 @@ #ifndef KWORD_1_3_DOCUMENT_H #define KWORD_1_3_DOCUMENT_H -class QIODevice; +class TQIODevice; class KTempFile; class KWord13Picture; -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include "kword13frameset.h" @@ -41,40 +41,40 @@ public: ~KWord13Document( void ); public: - void xmldump( QIODevice* io ); + void xmldump( TQIODevice* io ); /// Get the "last printed" date/time - QDateTime lastPrintingDate( void ) const; + TQDateTime lastPrintingDate( void ) const; /// Get the "creation" date/time - QDateTime creationDate( void ) const; + TQDateTime creationDate( void ) const; /// Get the "modification" date/time - QDateTime modificationDate( void ) const; + TQDateTime modificationDate( void ) const; /** * Get a document info * \param name name of the document info */ - QString getDocumentInfo( const QString& name ) const; + TQString getDocumentInfo( const TQString& name ) const; /** * Get a document property * \param name name of the property * \param oldName alternative name of the property (in old KWord syntax) */ - QString getProperty( const QString& name, const QString& oldName = QString::null ) const; + TQString getProperty( const TQString& name, const TQString& oldName = TQString() ) const; protected: /// Get a document property \internal - QString getPropertyInternal( const QString& name ) const; + TQString getPropertyInternal( const TQString& name ) const; public: - QMap m_documentProperties; - QMap m_documentInfo; ///< From documentinfo.xml - QValueList m_styles; - QPtrList m_normalTextFramesetList; ///< List of \ having normal text - QPtrList m_tableFramesetList; ///< List of \ being part of tables - QPtrList m_headerFooterFramesetList; ///< List of \ having footer/header - QPtrList m_footEndNoteFramesetList; ///< List of \ having footnotes or endnotes - QPtrList m_pictureFramesetList; ///< List of \ having pictures - QPtrList m_otherFramesetList; ///< List of \ of other types - QDict m_pictureDict; ///< "Dictionnary" of all pictures' data + TQMap m_documentProperties; + TQMap m_documentInfo; ///< From documentinfo.xml + TQValueList m_styles; + TQPtrList m_normalTextFramesetList; ///< List of \ having normal text + TQPtrList m_tableFramesetList; ///< List of \ being part of tables + TQPtrList m_headerFooterFramesetList; ///< List of \ having footer/header + TQPtrList m_footEndNoteFramesetList; ///< List of \ having footnotes or endnotes + TQPtrList m_pictureFramesetList; ///< List of \ having pictures + TQPtrList m_otherFramesetList; ///< List of \ of other types + TQDict m_pictureDict; ///< "Dictionnary" of all pictures' data KTempFile* m_previewFile; - QStringList m_anchoredFramesetNames; ///< List of framesets that are anchored + TQStringList m_anchoredFramesetNames; ///< List of framesets that are anchored }; #endif // KWORD_1_3_DOCUMENT_H diff --git a/filters/kword/kword1.3/import/kword13formatone.cpp b/filters/kword/kword1.3/import/kword13formatone.cpp index 00a7d173..5f4dca5f 100644 --- a/filters/kword/kword1.3/import/kword13formatone.cpp +++ b/filters/kword/kword1.3/import/kword13formatone.cpp @@ -1,4 +1,4 @@ -#include +#include #include "kword13utils.h" #include "kword13formatone.h" @@ -11,11 +11,11 @@ KWord13FormatOneData::~KWord13FormatOneData( void ) { } -void KWord13FormatOneData::xmldump( QTextStream& iostream ) +void KWord13FormatOneData::xmldump( TQTextStream& iostream ) { iostream << " " << "\">\n"; - for ( QMap::ConstIterator it = m_properties.begin(); + for ( TQMap::ConstIterator it = m_properties.begin(); it != m_properties.end(); ++it) { @@ -25,16 +25,16 @@ void KWord13FormatOneData::xmldump( QTextStream& iostream ) iostream << " \n"; } -QString KWord13FormatOneData::key( void ) const +TQString KWord13FormatOneData::key( void ) const { - QString strKey; + TQString strKey; // At first, use the number of properties as it is an easy sorting value - strKey += QString::number( m_properties.count(), 16 ); + strKey += TQString::number( m_properties.count(), 16 ); strKey += ':'; - // use the worst key: the whole QMap (### FIXME) - for ( QMap::const_iterator it = m_properties.constBegin() ; + // use the worst key: the whole TQMap (### FIXME) + for ( TQMap::const_iterator it = m_properties.constBegin() ; it != m_properties.constEnd(); ++it ) { strKey += it.key(); @@ -46,13 +46,13 @@ QString KWord13FormatOneData::key( void ) const return strKey; } -QString KWord13FormatOneData::getProperty( const QString& name ) const +TQString KWord13FormatOneData::getProperty( const TQString& name ) const { - QMap::ConstIterator it ( m_properties.find( name ) ); + TQMap::ConstIterator it ( m_properties.tqfind( name ) ); if ( it == m_properties.end() ) { // Property does not exist - return QString::null; + return TQString(); } else { diff --git a/filters/kword/kword1.3/import/kword13formatone.h b/filters/kword/kword1.3/import/kword13formatone.h index 9f2e16d1..e4cc7f38 100644 --- a/filters/kword/kword1.3/import/kword13formatone.h +++ b/filters/kword/kword1.3/import/kword13formatone.h @@ -21,16 +21,16 @@ #ifndef KWORD_1_3_FORMAT_ONE #define KWORD_1_3_FORMAT_ONE -class QTextStream; +class TQTextStream; -#include -#include +#include +#include #include "kword13format.h" /** - * Contains the data of the \ children - * also the grand-children of \ and \ + * Contains the data of the \ tqchildren + * also the grand-tqchildren of \ and \ */ class KWord13FormatOneData { @@ -39,21 +39,21 @@ public: ~KWord13FormatOneData( void ); public: - void xmldump( QTextStream& iostream ); + void xmldump( TQTextStream& iostream ); /** * @brief Get a key representating the properties * * This key helps to categorize the automatic styles */ - QString key( void ) const; + TQString key( void ) const; - QString getProperty( const QString& name ) const; + TQString getProperty( const TQString& name ) const; public: - QMap m_properties; + TQMap m_properties; public: // OASIS-specific - QString m_autoStyleName; ///< Name of the OASIS automatic style + TQString m_autoStyleName; ///< Name of the OASIS automatic style }; /** @@ -75,7 +75,7 @@ public: virtual KWord13FormatOneData* getFormatOneData(void); public: int m_length; ///< Length of format - KWord13FormatOneData m_formatOne; ///< Data of children of \ + KWord13FormatOneData m_formatOne; ///< Data of tqchildren of \ }; #endif // KWORD_1_3_FORMAT_ONE diff --git a/filters/kword/kword1.3/import/kword13formatother.cpp b/filters/kword/kword1.3/import/kword13formatother.cpp index 2ed48f6f..f1ee8cf0 100644 --- a/filters/kword/kword1.3/import/kword13formatother.cpp +++ b/filters/kword/kword1.3/import/kword13formatother.cpp @@ -18,7 +18,7 @@ * Boston, MA 02110-1301, USA. */ -#include +#include #include "kword13formatother.h" diff --git a/filters/kword/kword1.3/import/kword13formatother.h b/filters/kword/kword1.3/import/kword13formatother.h index 66eb1356..01181363 100644 --- a/filters/kword/kword1.3/import/kword13formatother.h +++ b/filters/kword/kword1.3/import/kword13formatother.h @@ -34,7 +34,7 @@ public: KWord13FormatFour(void); virtual ~KWord13FormatFour(void); public: - QString m_text; ///< replacement text + TQString m_text; ///< replacement text }; /** @@ -48,7 +48,7 @@ public: KWord13FormatSix(void); virtual ~KWord13FormatSix(void); public: - QString m_anchorName; ///< name of anchor + TQString m_anchorName; ///< name of anchor }; diff --git a/filters/kword/kword1.3/import/kword13frameset.cpp b/filters/kword/kword1.3/import/kword13frameset.cpp index 783546d4..6ab0f99c 100644 --- a/filters/kword/kword1.3/import/kword13frameset.cpp +++ b/filters/kword/kword1.3/import/kword13frameset.cpp @@ -24,7 +24,7 @@ #include "kword13frameset.h" -KWord13Frameset::KWord13Frameset( int frameType, int frameInfo, const QString& name ) +KWord13Frameset::KWord13Frameset( int frameType, int frameInfo, const TQString& name ) : m_numFrames(0), m_frameType( frameType ), m_frameInfo( frameInfo ), m_name( name ) { } @@ -39,13 +39,13 @@ bool KWord13Frameset::addParagraph(const KWord13Paragraph&) return false; } -bool KWord13Frameset::setKey(const QString&) +bool KWord13Frameset::setKey(const TQString&) { kdWarning(30520) << "Cannot set a key! Not a picture frameset!" << endl; return false; } -void KWord13Frameset::xmldump( QTextStream& iostream ) +void KWord13Frameset::xmldump( TQTextStream& iostream ) { iostream << " \n"; } -KWord13PictureFrameset::KWord13PictureFrameset( int frameType, int frameInfo, const QString& name ) +KWord13PictureFrameset::KWord13PictureFrameset( int frameType, int frameInfo, const TQString& name ) : KWord13Frameset( frameType, frameInfo, name ) { } @@ -86,13 +86,13 @@ KWord13PictureFrameset::~KWord13PictureFrameset( void ) { } -bool KWord13PictureFrameset::setKey(const QString& key) +bool KWord13PictureFrameset::setKey(const TQString& key) { m_pictureKey = key; return true; } -void KWord13PictureFrameset::xmldump( QTextStream& iostream ) +void KWord13PictureFrameset::xmldump( TQTextStream& iostream ) { iostream << " -#include +#include +#include #include "kword13paragraph.h" class KWord13Frameset { public: - KWord13Frameset( int frameType, int frameInfo, const QString& name ); + KWord13Frameset( int frameType, int frameInfo, const TQString& name ); virtual ~KWord13Frameset( void ); public: virtual bool addParagraph(const KWord13Paragraph& para); - virtual bool setKey( const QString& key ); - virtual void xmldump( QTextStream& iostream ); + virtual bool setKey( const TQString& key ); + virtual void xmldump( TQTextStream& iostream ); public: int m_numFrames; ///< Number of frames - QMap m_frameData; ///< Data of frames (### TODO: do better!) + TQMap m_frameData; ///< Data of frames (### TODO: do better!) protected: int m_frameType; int m_frameInfo; - QString m_name; ///< Name of frameset + TQString m_name; ///< Name of frameset }; class KWordTextFrameset : public KWord13Frameset { public: - KWordTextFrameset( int frameType, int frameInfo, const QString& name ); + KWordTextFrameset( int frameType, int frameInfo, const TQString& name ); virtual ~KWordTextFrameset( void ); public: virtual bool addParagraph(const KWord13Paragraph& para); - virtual void xmldump( QTextStream& iostream ); + virtual void xmldump( TQTextStream& iostream ); public: KWord13ParagraphGroup m_paragraphGroup; }; @@ -62,13 +62,13 @@ public: class KWord13PictureFrameset : public KWord13Frameset { public: - KWord13PictureFrameset( int frameType, int frameInfo, const QString& name ); + KWord13PictureFrameset( int frameType, int frameInfo, const TQString& name ); virtual ~KWord13PictureFrameset( void ); public: - virtual bool setKey( const QString& key ); - virtual void xmldump( QTextStream& iostream ); + virtual bool setKey( const TQString& key ); + virtual void xmldump( TQTextStream& iostream ); public: - QString m_pictureKey; + TQString m_pictureKey; }; #endif // _FILTER_KWORD_1_3__KWORDFRAMESET_H diff --git a/filters/kword/kword1.3/import/kword13import.cpp b/filters/kword/kword1.3/import/kword13import.cpp index a27a39c3..58349af8 100644 --- a/filters/kword/kword1.3/import/kword13import.cpp +++ b/filters/kword/kword1.3/import/kword13import.cpp @@ -17,8 +17,8 @@ * Boston, MA 02110-1301, USA. */ -#include -#include +#include +#include #include #include @@ -38,17 +38,17 @@ typedef KGenericFactory KWord13ImportFactory; K_EXPORT_COMPONENT_FACTORY( libkwordkword1dot3import, KWord13ImportFactory( "kofficefilters" ) ) -KWord13Import::KWord13Import(KoFilter */*parent*/, const char */*name*/, const QStringList &) +KWord13Import::KWord13Import(KoFilter */*tqparent*/, const char */*name*/, const TQStringList &) : KoFilter() { } -bool KWord13Import::parseInfo( QIODevice* io, KWord13Document& kwordDocument ) +bool KWord13Import::parseInfo( TQIODevice* io, KWord13Document& kwordDocument ) { kdDebug(30520) << "Starting KWord13Import::parseInfo" << endl; - QDomDocument doc; - // Error variables for QDomDocument::setContent - QString errorMsg; + TQDomDocument doc; + // Error variables for TQDomDocument::setContent + TQString errorMsg; int errorLine, errorColumn; if ( ! doc.setContent( io, &errorMsg, &errorLine, &errorColumn ) ) { @@ -58,21 +58,21 @@ bool KWord13Import::parseInfo( QIODevice* io, KWord13Document& kwordDocument ) // ### TODO: user message return false; } - QDomElement docElement( doc.documentElement() ); - // In documentinfo.xml, the text data is in the grand-children of the document element - for ( QDomNode node = docElement.firstChild(); !node.isNull(); node = node.nextSibling() ) + TQDomElement docElement( doc.documentElement() ); + // In documentinfo.xml, the text data is in the grand-tqchildren of the document element + for ( TQDomNode node = docElement.firstChild(); !node.isNull(); node = node.nextSibling() ) { kdDebug(30520) << "Child " << node.nodeName() << endl; if ( !node.isElement() ) continue; // Comment, PI... - const QString nodeName( node.nodeName() ); - for ( QDomNode node2 = node.firstChild(); !node2.isNull(); node2 = node2.nextSibling() ) + const TQString nodeName( node.nodeName() ); + for ( TQDomNode node2 = node.firstChild(); !node2.isNull(); node2 = node2.nextSibling() ) { kdDebug(30520) << "Grand-child " << node2.nodeName() << endl; if ( !node2.isElement() ) continue; - const QString nodeName2 ( nodeName + ':' + node2.nodeName() ); - QDomElement element( node2.toElement() ); + const TQString nodeName2 ( nodeName + ':' + node2.nodeName() ); + TQDomElement element( node2.toElement() ); kwordDocument.m_documentInfo[ nodeName2 ] = element.text(); } } @@ -80,15 +80,15 @@ bool KWord13Import::parseInfo( QIODevice* io, KWord13Document& kwordDocument ) return true; } -bool KWord13Import::parseRoot( QIODevice* io, KWord13Document& kwordDocument ) +bool KWord13Import::parseRoot( TQIODevice* io, KWord13Document& kwordDocument ) { KWord13Parser handler( &kwordDocument ); - QXmlSimpleReader reader; + TQXmlSimpleReader reader; reader.setContentHandler( &handler ); reader.setErrorHandler( &handler ); - QXmlInputSource source( io ); // Read the file + TQXmlInputSource source( io ); // Read the file if (!reader.parse( source )) { @@ -104,7 +104,7 @@ bool KWord13Import::postParse( KoStore* store, KWord13Document& doc ) return post.postParse( store, doc ); } -KoFilter::ConversionStatus KWord13Import::convert( const QCString& from, const QCString& to ) +KoFilter::ConversiontqStatus KWord13Import::convert( const TQCString& from, const TQCString& to ) { if ( to != "application/vnd.oasis.opendocument.text" || from != "application/x-kword" ) @@ -117,7 +117,7 @@ KoFilter::ConversionStatus KWord13Import::convert( const QCString& from, const Q KWord13Document kwordDocument; - const QString fileName( m_chain->inputFile() ); + const TQString fileName( m_chain->inputFile() ); if ( fileName.isEmpty() ) { kdError(30520) << "No input file name!" << endl; @@ -166,17 +166,17 @@ KoFilter::ConversionStatus KWord13Import::convert( const QCString& from, const Q kdDebug(30520) << "Preview found!" << endl; KoStoreDevice ioPreview( store ); ioPreview.open( IO_ReadOnly ); - const QByteArray image ( ioPreview.readAll() ); + const TQByteArray image ( ioPreview.readAll() ); if ( image.isNull() ) { kdWarning(30520) << "Loading of preview failed! Ignoring!" << endl; } else { - kwordDocument.m_previewFile = new KTempFile( QString::null, ".png" ); + kwordDocument.m_previewFile = new KTempFile( TQString(), ".png" ); // ### TODO check KTempFile kwordDocument.m_previewFile->setAutoDelete( true ); - QFile file( kwordDocument.m_previewFile->name() ); + TQFile file( kwordDocument.m_previewFile->name() ); // ### TODO: check if file is correctly written file.open( IO_WriteOnly ); file.writeBlock( image ); @@ -197,9 +197,9 @@ KoFilter::ConversionStatus KWord13Import::convert( const QCString& from, const Q delete store; store = 0; - QFile file( fileName ); + TQFile file( fileName ); file.open( IO_ReadOnly ); - if ( ! parseRoot( &file, kwordDocument ) ) + if ( ! parseRoot( TQT_TQIODEVICE(&file), kwordDocument ) ) { kdError(30520) << "Could not process document! Aborting!" << endl; file.close(); @@ -230,7 +230,7 @@ KoFilter::ConversionStatus KWord13Import::convert( const QCString& from, const Q return KoFilter::StupidError; } - const QString filenameOut ( m_chain->outputFile() ); + const TQString filenameOut ( m_chain->outputFile() ); if ( filenameOut.isEmpty() ) { diff --git a/filters/kword/kword1.3/import/kword13import.h b/filters/kword/kword1.3/import/kword13import.h index bf58a7d7..d5bebeb3 100644 --- a/filters/kword/kword1.3/import/kword13import.h +++ b/filters/kword/kword1.3/import/kword13import.h @@ -21,27 +21,28 @@ #ifndef KWORD_1_3_IMPORT_H #define KWORD_1_3_IMPORT_H -#include -#include +#include +#include #include -class QIODevice; +class TQIODevice; class KoStore; class KWord13Document; class KWord13Import : public KoFilter { Q_OBJECT + TQ_OBJECT public: - KWord13Import(KoFilter *parent, const char *name, const QStringList &); + KWord13Import(KoFilter *tqparent, const char *name, const TQStringList &); virtual ~KWord13Import() {} - virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to ); + virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to ); protected: - bool parseInfo( QIODevice* io, KWord13Document& kwordDocument ); - bool parseRoot( QIODevice* io, KWord13Document& kwordDocument ); + bool parseInfo( TQIODevice* io, KWord13Document& kwordDocument ); + bool parseRoot( TQIODevice* io, KWord13Document& kwordDocument ); bool postParse( KoStore* store, KWord13Document& doc ); }; #endif // KWORD_1_3_IMPORT_H diff --git a/filters/kword/kword1.3/import/kword13layout.cpp b/filters/kword/kword1.3/import/kword13layout.cpp index b6344f9c..4ec4c59d 100644 --- a/filters/kword/kword1.3/import/kword13layout.cpp +++ b/filters/kword/kword1.3/import/kword13layout.cpp @@ -1,4 +1,4 @@ -#include +#include #include "kword13utils.h" #include "kword13layout.h" @@ -11,12 +11,12 @@ KWord13Layout::~KWord13Layout( void ) { } -void KWord13Layout::xmldump( QTextStream& iostream ) +void KWord13Layout::xmldump( TQTextStream& iostream ) { - iostream << " \n"; + iostream << " \n"; - for ( QMap::ConstIterator it = m_layoutProperties.begin(); + for ( TQMap::ConstIterator it = m_layoutProperties.begin(); it != m_layoutProperties.end(); ++it) { @@ -25,18 +25,18 @@ void KWord13Layout::xmldump( QTextStream& iostream ) m_format.xmldump( iostream ); - iostream << " \n"; + iostream << " \n"; } -QString KWord13Layout::key( void ) const +TQString KWord13Layout::key( void ) const { - QString strKey; + TQString strKey; strKey += m_name; strKey += '@'; // Use the number of properties as it is an easy sorting value - strKey += QString::number( m_layoutProperties.count(), 16 ); + strKey += TQString::number( m_layoutProperties.count(), 16 ); strKey += ':'; if ( m_outline ) @@ -44,8 +44,8 @@ QString KWord13Layout::key( void ) const else strKey += "O0,"; - // use the worst key: the whole QMap (### FIXME) - for ( QMap::const_iterator it = m_layoutProperties.constBegin() ; + // use the worst key: the whole TQMap (### FIXME) + for ( TQMap::const_iterator it = m_layoutProperties.constBegin() ; it != m_layoutProperties.constEnd(); ++it ) { strKey += it.key(); @@ -61,13 +61,13 @@ QString KWord13Layout::key( void ) const return strKey; } -QString KWord13Layout::getProperty( const QString& name ) const +TQString KWord13Layout::getProperty( const TQString& name ) const { - QMap::ConstIterator it ( m_layoutProperties.find( name ) ); + TQMap::ConstIterator it ( m_layoutProperties.tqfind( name ) ); if ( it == m_layoutProperties.end() ) { // Property does not exist - return QString::null; + return TQString(); } else { diff --git a/filters/kword/kword1.3/import/kword13layout.h b/filters/kword/kword1.3/import/kword13layout.h index ee8a2010..2ca1a8b1 100644 --- a/filters/kword/kword1.3/import/kword13layout.h +++ b/filters/kword/kword1.3/import/kword13layout.h @@ -2,10 +2,10 @@ #ifndef _KWORD13LAYOUT #define _KWORD13LAYOUT -class QTextStream; +class TQTextStream; -#include -#include +#include +#include #include "kword13formatone.h" @@ -19,25 +19,25 @@ public: ~KWord13Layout( void ); public: - void xmldump( QTextStream& iostream ); + void xmldump( TQTextStream& iostream ); /** * @brief Get a key representating the properties * * This key helps to categorize the automatic styles */ - QString key( void ) const; + TQString key( void ) const; - QString getProperty( const QString& name ) const; + TQString getProperty( const TQString& name ) const; public: KWord13FormatOneData m_format; ///< Character format properties - QMap m_layoutProperties; + TQMap m_layoutProperties; bool m_outline; - QString m_name; ///< Name of the style (either the used one or the one currently being defined) + TQString m_name; ///< Name of the style (either the used one or the one currently being defined) public: // OASIS-specific - QString m_autoStyleName; ///< Name of the OASIS automatic style + TQString m_autoStyleName; ///< Name of the OASIS automatic style }; #endif // _KWORD13LAYOUT diff --git a/filters/kword/kword1.3/import/kword13oasisgenerator.cpp b/filters/kword/kword1.3/import/kword13oasisgenerator.cpp index 58ef032e..00b899f9 100644 --- a/filters/kword/kword1.3/import/kword13oasisgenerator.cpp +++ b/filters/kword/kword1.3/import/kword13oasisgenerator.cpp @@ -17,12 +17,12 @@ * Boston, MA 02110-1301, USA. */ -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include @@ -57,7 +57,7 @@ void KWord13OasisGenerator::prepareTextFrameset( KWordTextFrameset* frameset ) return; } - for ( QValueList::Iterator it = frameset->m_paragraphGroup.begin(); + for ( TQValueList::Iterator it = frameset->m_paragraphGroup.begin(); it != frameset->m_paragraphGroup.end(); ++it) { declareLayout( (*it).m_layout ); @@ -105,9 +105,9 @@ void KWord13OasisGenerator::preparePageLayout( void ) if ( ok && columns > 1 ) { // ### TODO: test - QBuffer buffer; + TQBuffer buffer; buffer.open( IO_WriteOnly ); - KoXmlWriter element ( &buffer ); + KoXmlWriter element ( TQT_TQIODEVICE(&buffer) ); element.startElement("style:columns"); element.addAttribute( "fo:column-count", columns ); element.addAttributePt( "fo:column-gap", positiveNumberOrNull( m_kwordDocument->getProperty( "PAPER:columnspacing", "PAPER:ptColumnspc" ) ) ); @@ -123,10 +123,10 @@ void KWord13OasisGenerator::preparePageLayout( void ) element.endElement(); buffer.close(); - const QString strElement( QString::fromUtf8( buffer.buffer(), buffer.buffer().size() ) ); + const TQString strElement( TQString::fromUtf8( buffer.buffer(), buffer.buffer().size() ) ); style.addChildElement( "style:columns", strElement ); } - const QString automaticPageStyle ( m_oasisGenStyles.lookup( style, "pm" ) ); + const TQString automaticPageStyle ( m_oasisGenStyles.lookup( style, "pm" ) ); kdDebug(30520) << "Automatic page style: " << automaticPageStyle << endl; } @@ -143,7 +143,7 @@ bool KWord13OasisGenerator::prepare( KWord13Document& kwordDocument ) preparePageLayout(); // Declare styles - for ( QValueList::Iterator it = m_kwordDocument->m_styles.begin(); + for ( TQValueList::Iterator it = m_kwordDocument->m_styles.begin(); it != m_kwordDocument->m_styles.end(); ++it) { declareStyle( *it ); @@ -157,7 +157,7 @@ bool KWord13OasisGenerator::prepare( KWord13Document& kwordDocument ) return true; } -double KWord13OasisGenerator::numberOrNull( const QString& str ) const +double KWord13OasisGenerator::numberOrNull( const TQString& str ) const { bool ok = false; const double d = str.toDouble( &ok ); @@ -167,7 +167,7 @@ double KWord13OasisGenerator::numberOrNull( const QString& str ) const return 0.0; } -double KWord13OasisGenerator::positiveNumberOrNull( const QString& str ) const +double KWord13OasisGenerator::positiveNumberOrNull( const TQString& str ) const { bool ok = false; const double d = str.toDouble( &ok ); @@ -178,11 +178,11 @@ double KWord13OasisGenerator::positiveNumberOrNull( const QString& str ) const } // Inspired by KoParagStyle::saveStyle -void KWord13OasisGenerator::declareLayout( KWord13Layout& layout ) +void KWord13OasisGenerator::declareLayout( KWord13Layout& tqlayout ) { - KoGenStyle gs( KoGenStyle::STYLE_AUTO, "paragraph", layout.m_name ); + KoGenStyle gs( KoGenStyle::STYLE_AUTO, "paragraph", tqlayout.m_name ); - // ### TODO: any display name? gs.addAttribute( "style:display-name", layout.m_name ); + // ### TODO: any display name? gs.addAttribute( "style:display-name", tqlayout.m_name ); #if 0 // TODO: check that this is correct if ( m_paragLayout.counter && m_paragLayout.counter->depth() ) { @@ -192,21 +192,21 @@ void KWord13OasisGenerator::declareLayout( KWord13Layout& layout ) gs.addAttribute( "style:default-level", (int)m_paragLayout.counter->depth() + 1 ); } #endif - fillGenStyleWithLayout( layout, gs, false ); - fillGenStyleWithFormatOne( layout.m_format , gs, false ); + fillGenStyleWithLayout( tqlayout, gs, false ); + fillGenStyleWithFormatOne( tqlayout.m_format , gs, false ); - layout.m_autoStyleName = m_oasisGenStyles.lookup( gs, "P", true ); + tqlayout.m_autoStyleName = m_oasisGenStyles.lookup( gs, "P", true ); - kdDebug(30520) << "Layout: Parent " << layout.m_name << " => " << layout.m_autoStyleName << endl; + kdDebug(30520) << "Layout: Parent " << tqlayout.m_name << " => " << tqlayout.m_autoStyleName << endl; } // Inspired by KoParagStyle::saveStyle -void KWord13OasisGenerator::declareStyle( KWord13Layout& layout ) +void KWord13OasisGenerator::declareStyle( KWord13Layout& tqlayout ) { - KoGenStyle gs( KoGenStyle::STYLE_USER, "paragraph", QString::null ); + KoGenStyle gs( KoGenStyle::STYLE_USER, "paragraph", TQString() ); - gs.addAttribute( "style:display-name", layout.m_name ); + gs.addAttribute( "style:display-name", tqlayout.m_name ); #if 0 // TODO: check that this is correct if ( m_paragLayout.counter && m_paragLayout.counter->depth() ) { @@ -216,23 +216,23 @@ void KWord13OasisGenerator::declareStyle( KWord13Layout& layout ) gs.addAttribute( "style:default-level", (int)m_paragLayout.counter->depth() + 1 ); } #endif - fillGenStyleWithLayout( layout, gs, true ); - fillGenStyleWithFormatOne( layout.m_format , gs, true ); + fillGenStyleWithLayout( tqlayout, gs, true ); + fillGenStyleWithFormatOne( tqlayout.m_format , gs, true ); - layout.m_autoStyleName = m_oasisGenStyles.lookup( gs, layout.m_name, false ); + tqlayout.m_autoStyleName = m_oasisGenStyles.lookup( gs, tqlayout.m_name, false ); - kdDebug(30520) << "Style: " << layout.m_name << " => " << layout.m_autoStyleName << endl; + kdDebug(30520) << "Style: " << tqlayout.m_name << " => " << tqlayout.m_autoStyleName << endl; } // Inspired from KoTextFormat::save but we have not the same data to start with. void KWord13OasisGenerator::fillGenStyleWithFormatOne( const KWord13FormatOneData& one, KoGenStyle& gs, const bool style ) const { - QString str; // helper string + TQString str; // helper string KoGenStyle::PropertyType tt = KoGenStyle::TextType; bool redok = false, greenok = false, blueok = false, ok = false; - const QColor color( + const TQColor color( one.getProperty( "COLOR:red" ).toInt( &redok ), one.getProperty( "COLOR:green" ).toInt( &greenok ), one.getProperty( "COLOR:blue" ).toInt( &blueok ) ); @@ -273,7 +273,7 @@ void KWord13OasisGenerator::fillGenStyleWithFormatOne( const KWord13FormatOneDat } else { - gs.addProperty( "fo:font-weight", QString::number( weight * 10 ), tt ); + gs.addProperty( "fo:font-weight", TQString::number( weight * 10 ), tt ); } } else if ( style ) @@ -298,7 +298,7 @@ void KWord13OasisGenerator::fillGenStyleWithFormatOne( const KWord13FormatOneDat gs.addProperty( "style:text-underline-mode", d->m_bWordByWord ? "skip-white-space" : "continuous", tt ); gs.addProperty( "style:text-underline-type", m_underlineType == U_NONE ? "none" : m_underlineType == U_DOUBLE ? "double" : "single", tt ); - QString styleline; + TQString styleline; if ( m_underlineType == U_WAVE ) styleline = "wave"; else @@ -314,14 +314,14 @@ void KWord13OasisGenerator::fillGenStyleWithFormatOne( const KWord13FormatOneDat gs.addProperty( "style:text-line-through-style", styleline, tt ); //gs.addProperty( "style:text-line-through-color", ...) TODO in kotext - QString textPos; + TQString textPos; if ( d->m_offsetFromBaseLine != 0 ) - textPos = QString::number( 100 * d->m_offsetFromBaseLine / fn.pointSizeFloat() ) + '%'; + textPos = TQString::number( 100 * d->m_offsetFromBaseLine / fn.pointSizeFloat() ) + '%'; else if ( va == AlignSuperScript ) textPos = "super"; else if ( va == AlignSubScript ) textPos = "sub"; else textPos = "0%"; textPos += ' '; - textPos += QString::number( d->m_relativeTextSize * 100 ); + textPos += TQString::number( d->m_relativeTextSize * 100 ); textPos += '%'; gs.addProperty( "style:text-position", textPos, tt ); @@ -332,7 +332,7 @@ void KWord13OasisGenerator::fillGenStyleWithFormatOne( const KWord13FormatOneDat else if ( m_attributeFont == ATT_LOWER ) gs.addProperty( "fo:text-transform", "lowercase", tt ); - gs.addProperty( "fo:language", m_language == "en_US" ? QString("en") : m_language, tt ); + gs.addProperty( "fo:language", m_language == "en_US" ? TQString("en") : m_language, tt ); gs.addProperty( "fo:background-color", m_textBackColor.isValid() ? m_textBackColor.name() : "transparent", tt ); gs.addProperty( "fo:text-shadow", shadowAsCss(), tt ); @@ -341,13 +341,13 @@ void KWord13OasisGenerator::fillGenStyleWithFormatOne( const KWord13FormatOneDat } // Inspired from KoParagLayout::saveOasis but we have not the same data to start with. -void KWord13OasisGenerator::fillGenStyleWithLayout( const KWord13Layout& layout, KoGenStyle& gs, const bool style ) const +void KWord13OasisGenerator::fillGenStyleWithLayout( const KWord13Layout& tqlayout, KoGenStyle& gs, const bool style ) const { // ### TODO syntaxVersion < 3 - QString str; // Help string to store each KWord 1.3 layout property + TQString str; // Help string to store each KWord 1.3 tqlayout property - str = layout.getProperty( "FLOW:align" ); + str = tqlayout.getProperty( "FLOW:align" ); if ( str.isEmpty() && ! style) { // Nothing to do! @@ -361,7 +361,7 @@ void KWord13OasisGenerator::fillGenStyleWithLayout( const KWord13Layout& layout, gs.addProperty( "fo:text-align", "start" ); // i.e. direction-dependent } - str = layout.getProperty( "FLOW:dir" ); + str = tqlayout.getProperty( "FLOW:dir" ); if ( str == "R" ) // ### TODO: check the right value { gs.addProperty( "style:writing-mode", "rl-tb" ); // right-to-left, top-to-bottom @@ -372,11 +372,11 @@ void KWord13OasisGenerator::fillGenStyleWithLayout( const KWord13Layout& layout, } // ### TODO: do not define if it does not exist and ! style - gs.addPropertyPt( "fo:margin-left", numberOrNull( layout.getProperty( "INDENTS:left" ) ) ); - gs.addPropertyPt( "fo:margin-right", numberOrNull( layout.getProperty( "INDENTS:right" ) ) ); - gs.addPropertyPt( "fo:text-indent", numberOrNull( layout.getProperty( "INDENTS:first" ) ) ); - gs.addPropertyPt( "fo:margin-top", numberOrNull( layout.getProperty( "OFFSETS:before" ) ) ); - gs.addPropertyPt( "fo:margin-bottom", numberOrNull( layout.getProperty( "OFFSETS:after" ) ) ); + gs.addPropertyPt( "fo:margin-left", numberOrNull( tqlayout.getProperty( "INDENTS:left" ) ) ); + gs.addPropertyPt( "fo:margin-right", numberOrNull( tqlayout.getProperty( "INDENTS:right" ) ) ); + gs.addPropertyPt( "fo:text-indent", numberOrNull( tqlayout.getProperty( "INDENTS:first" ) ) ); + gs.addPropertyPt( "fo:margin-top", numberOrNull( tqlayout.getProperty( "OFFSETS:before" ) ) ); + gs.addPropertyPt( "fo:margin-bottom", numberOrNull( tqlayout.getProperty( "OFFSETS:after" ) ) ); #if 0 switch ( lineSpacingType ) { @@ -390,7 +390,7 @@ void KWord13OasisGenerator::fillGenStyleWithLayout( const KWord13Layout& layout, gs.addProperty( "fo:line-height", "200%" ); break; case KoParagLayout::LS_MULTIPLE: - gs.addProperty( "fo:line-height", QString::number( lineSpacing * 100.0 ) + '%' ); + gs.addProperty( "fo:line-height", TQString::number( lineSpacing * 100.0 ) + '%' ); break; case KoParagLayout::LS_FIXED: gs.addPropertyPt( "fo:line-height", lineSpacing ); @@ -405,7 +405,7 @@ void KWord13OasisGenerator::fillGenStyleWithLayout( const KWord13Layout& layout, #endif #if 0 - QBuffer buffer; + TQBuffer buffer; buffer.open( IO_WriteOnly ); KoXmlWriter tabsWriter( &buffer, 4 ); // indent==4: root,autostyle,style,parag-props tabsWriter.startElement( "style:tab-stops" ); @@ -425,9 +425,9 @@ void KWord13OasisGenerator::fillGenStyleWithLayout( const KWord13Layout& layout, case T_RIGHT: tabsWriter.addAttribute( "style:type", "right" ); break; - case T_DEC_PNT: // "alignment on decimal point" + case T_DEC_PNT: // "tqalignment on decimal point" tabsWriter.addAttribute( "style:type", "char" ); - tabsWriter.addAttribute( "style:char", QString( (*it).alignChar ) ); + tabsWriter.addAttribute( "style:char", TQString( (*it).alignChar ) ); break; case T_INVALID: // keep compiler happy, this can't happen break; @@ -474,7 +474,7 @@ void KWord13OasisGenerator::fillGenStyleWithLayout( const KWord13Layout& layout, } tabsWriter.endElement(); buffer.close(); - QString elementContents = QString::fromUtf8( buffer.buffer(), buffer.buffer().size() ); + TQString elementContents = TQString::fromUtf8( buffer.buffer(), buffer.buffer().size() ); gs.addChildElement( "style:tab-stops", elementContents ); #endif @@ -516,14 +516,14 @@ void KWord13OasisGenerator::generateTextFrameset( KoXmlWriter& writer, KWordText return; } - for ( QValueList::Iterator it = frameset->m_paragraphGroup.begin(); + for ( TQValueList::Iterator it = frameset->m_paragraphGroup.begin(); it != frameset->m_paragraphGroup.end(); ++it) { // Write rawly the paragrapgh (see KoTextParag::saveOasis) writer.startElement( "text:p", false ); // No indent inside! writer.addAttribute( "text:style-name", (*it).m_layout.m_autoStyleName ); #if 1 - const QString paragraphText( (*it).text() ); + const TQString paragraphText( (*it).text() ); int currentPos = 0; // Current position where the next character has to be written for ( KWord13Format* format = (*it).m_formats.first(); format; format = (*it).m_formats.next() ) @@ -553,7 +553,7 @@ void KWord13OasisGenerator::generateTextFrameset( KoXmlWriter& writer, KWordText else if ( format->m_id == 4 ) { // Variable // ### TEMPORARY - const QString text ( ( (KWord13FormatFour*) format ) -> m_text ); + const TQString text ( ( (KWord13FormatFour*) format ) -> m_text ); if ( text.isEmpty() ) writer.addTextNode( "#" ); // Placeholder else @@ -567,7 +567,7 @@ void KWord13OasisGenerator::generateTextFrameset( KoXmlWriter& writer, KWordText currentPos += length; } // We might have still something to write out - const QString tailText( paragraphText.mid( currentPos ) ); + const TQString tailText( paragraphText.mid( currentPos ) ); if ( ! tailText.isEmpty() ) writer.addTextSpan( tailText ); #else @@ -593,8 +593,8 @@ void KWord13OasisGenerator::writeStylesXml( void ) KoXmlWriter *stylesWriter = KoDocument::createOasisXmlWriter( &io, "office:document-styles" ); stylesWriter->startElement( "office:styles" ); - QValueList styles = m_oasisGenStyles.styles( KoGenStyle::STYLE_USER ); - QValueList::const_iterator it = styles.begin(); + TQValueList styles = m_oasisGenStyles.styles( KoGenStyle::STYLE_USER ); + TQValueList::const_iterator it = styles.begin(); for ( ; it != styles.end() ; ++it ) { (*it).style->writeStyle( stylesWriter, m_oasisGenStyles, "style:style", (*it).name, "style:paragraph-properties" ); } @@ -609,12 +609,12 @@ void KWord13OasisGenerator::writeStylesXml( void ) } #endif - QString pageLayoutName; + TQString pageLayoutName; styles = m_oasisGenStyles.styles( KoGenStyle::STYLE_PAGELAYOUT ); Q_ASSERT( styles.count() == 1 ); it = styles.begin(); for ( ; it != styles.end() ; ++it ) { - (*it).style->writeStyle( stylesWriter, m_oasisGenStyles, "style:page-layout", (*it).name, "style:page-layout-properties", false /*don't close*/ ); + (*it).style->writeStyle( stylesWriter, m_oasisGenStyles, "style:page-tqlayout", (*it).name, "style:page-tqlayout-properties", false /*don't close*/ ); //if ( m_pageLayout.columns > 1 ) TODO add columns element. This is a bit of a hack, // which only works as long as we have only one page master stylesWriter->endElement(); @@ -629,7 +629,7 @@ void KWord13OasisGenerator::writeStylesXml( void ) stylesWriter->startElement( "office:master-styles" ); stylesWriter->startElement( "style:master-page" ); stylesWriter->addAttribute( "style:name", "Standard" ); - stylesWriter->addAttribute( "style:page-layout-name", pageLayoutName ); + stylesWriter->addAttribute( "style:page-tqlayout-name", pageLayoutName ); stylesWriter->endElement(); stylesWriter->endElement(); // office:master-styles @@ -664,8 +664,8 @@ void KWord13OasisGenerator::writeContentXml(void) // Automatic styles writer->startElement( "office:automatic-styles" ); - QValueList styles = m_oasisGenStyles.styles( KoGenStyle::STYLE_AUTO ); - QValueList::const_iterator it; + TQValueList styles = m_oasisGenStyles.styles( KoGenStyle::STYLE_AUTO ); + TQValueList::const_iterator it; for ( it = styles.begin(); it != styles.end() ; ++it ) { (*it).style->writeStyle( writer, m_oasisGenStyles, "style:style", (*it).name, "style:paragraph-properties" ); } @@ -718,15 +718,15 @@ void KWord13OasisGenerator::writeMetaXml(void) // Tell who we are in case that we have a bug in our filter output! // According to OASIS spec section 3.1.1, it has to follow section 14.43 of RFC 2616 writer->startElement( "meta:generator" ); - QString strVersion; + TQString strVersion; strVersion += "KWord-OneDotThree-Import-Filter/"; - strVersion += QString( "$Revision: 515673 $" ).mid( 10 ).remove( '$' ).stripWhiteSpace(); + strVersion += TQString( "$Revision: 515673 $" ).mid( 10 ).remove( '$' ).stripWhiteSpace(); strVersion += " KOffice/"; strVersion += KOFFICE_VERSION_STRING; writer->addTextSpan( strVersion ); writer->endElement(); - QString str; // Helper string + TQString str; // Helper string str = m_kwordDocument->getDocumentInfo( "about:title" ); if ( !str.isEmpty() ) @@ -754,7 +754,7 @@ void KWord13OasisGenerator::writeMetaXml(void) // ### TODO: what about the other document info of KWord 1.3? - QDateTime dt; + TQDateTime dt; dt = m_kwordDocument->creationDate(); if ( dt.isValid() ) @@ -794,7 +794,7 @@ void KWord13OasisGenerator::writeMetaXml(void) #if 1 zipWriteData( "0" ); // ### TODO #else - zipWriteData( QString::number ( m_pictureNumber ) ); + zipWriteData( TQString::number ( m_pictureNumber ) ); #endif zipWriteData( "\"" ); @@ -802,7 +802,7 @@ void KWord13OasisGenerator::writeMetaXml(void) #if 1 zipWriteData( "0" ); // ### TODO #else - zipWriteData( QString::number ( m_tableNumber ) ); + zipWriteData( TQString::number ( m_tableNumber ) ); #endif zipWriteData( "\"" ); #endif @@ -831,7 +831,7 @@ void KWord13OasisGenerator::writePreviewFile(void) } // Load image - QImage image( m_kwordDocument->m_previewFile->name() ); + TQImage image( m_kwordDocument->m_previewFile->name() ); if ( image.isNull() ) { kdWarning(30520) << "Could not re-read preview from temp file!" << endl; @@ -839,7 +839,7 @@ void KWord13OasisGenerator::writePreviewFile(void) } // We have a 256x256x8 preview and we need a 128x128x32 preview with alpha channel - QImage preview( image.convertDepth( 32, Qt::ColorOnly ).smoothScale( 128, 128 ) ); + TQImage preview( image.convertDepth( 32, Qt::ColorOnly ).smoothScale( 128, 128 ) ); if ( preview.isNull() ) { kdWarning(30520) << "Could not create preview!" << endl; @@ -867,23 +867,23 @@ void KWord13OasisGenerator::writePictures( void ) return; } - for ( QDictIterator it( m_kwordDocument->m_pictureDict ) ; it.current(); ++it ) + for ( TQDictIterator it( m_kwordDocument->m_pictureDict ) ; it.current(); ++it ) { if ( !it.current()->m_valid || !it.current()->m_tempFile ) { kdDebug(30520) << "No data for picture: " << it.currentKey() << endl; continue; } - const QString fileName( it.current()->m_tempFile->name() ); - const QString oasisName( it.current()->getOasisPictureName() ); + const TQString fileName( it.current()->m_tempFile->name() ); + const TQString oasisName( it.current()->getOasisPictureName() ); kdDebug(30520) << "Copying... " << it.currentKey() << endl << " => " << oasisName << endl; - QFile file( fileName ); + TQFile file( fileName ); if ( !file.open( IO_ReadOnly ) ) { kdWarning(30520) << "Cannot open: " << fileName << endl; continue; } - QByteArray array( file.readAll() ); + TQByteArray array( file.readAll() ); if ( array.isNull() ) { kdWarning(30520) << "Null picture for " << fileName << endl; @@ -898,7 +898,7 @@ void KWord13OasisGenerator::writePictures( void ) if ( m_manifestWriter ) { - const QString mimeType ( KMimeType::findByContent( array, 0 )->name() ); + const TQString mimeType ( KMimeType::findByContent( array, 0 )->name() ); if ( mimeType == "application/octet-stream" ) { kdWarning(30520) << "Generic mime type for " << it.currentKey() << endl; @@ -911,7 +911,7 @@ void KWord13OasisGenerator::writePictures( void ) } -bool KWord13OasisGenerator::generate ( const QString& fileName, KWord13Document& kwordDocument ) +bool KWord13OasisGenerator::generate ( const TQString& fileName, KWord13Document& kwordDocument ) { if ( m_kwordDocument && ( (void*) m_kwordDocument ) != ( (void*) &kwordDocument ) ) { @@ -929,10 +929,10 @@ bool KWord13OasisGenerator::generate ( const QString& fileName, KWord13Document& m_store->disallowNameExpansion(); // Prepare manifest file - in memory (inspired by KoDocument::saveNativeFormat) - QByteArray manifestData; - QBuffer manifestBuffer( manifestData ); + TQByteArray manifestData; + TQBuffer manifestBuffer( manifestData ); manifestBuffer.open( IO_WriteOnly ); - m_manifestWriter = new KoXmlWriter( &manifestBuffer ); + m_manifestWriter = new KoXmlWriter( TQT_TQIODEVICE(&manifestBuffer) ); m_manifestWriter->startDocument( "manifest:manifest" ); m_manifestWriter->startElement( "manifest:manifest" ); m_manifestWriter->addAttribute( "xmlns:manifest", "urn:oasis:names:tc:openoffice:xmlns:manifest:1.0" ); diff --git a/filters/kword/kword1.3/import/kword13oasisgenerator.h b/filters/kword/kword1.3/import/kword13oasisgenerator.h index 3c9ae245..39bc232a 100644 --- a/filters/kword/kword1.3/import/kword13oasisgenerator.h +++ b/filters/kword/kword1.3/import/kword13oasisgenerator.h @@ -22,8 +22,8 @@ #define STRICT_OOWRITER_VERSION_1 -class QString; -class QTextStream; +class TQString; +class TQTextStream; class KZip; class KoStore; class KoGenStyle; @@ -39,7 +39,7 @@ public: ~KWord13OasisGenerator( void ); bool prepare( KWord13Document& kwordDocument ); - bool generate( const QString& fileName, KWord13Document& kwordDocument ); + bool generate( const TQString& fileName, KWord13Document& kwordDocument ); protected: // Generating phase /// @param main Is it the main frameset? void generateTextFrameset( KoXmlWriter& writer, KWordTextFrameset* frameset, bool main ); @@ -49,21 +49,21 @@ protected: // Generating phase void writePreviewFile(void); void writePictures( void ); protected: // Preparing phase - /// Preparing page layout + /// Preparing page tqlayout void preparePageLayout( void ); void prepareTextFrameset( KWordTextFrameset* frameset ); /// Also sets the name of the automatical style - void declareLayout( KWord13Layout& layout ); + void declareLayout( KWord13Layout& tqlayout ); /// Also sets the name of the automatical style - void declareStyle( KWord13Layout& layout ); - double numberOrNull( const QString& str ) const; - double positiveNumberOrNull( const QString& str ) const; + void declareStyle( KWord13Layout& tqlayout ); + double numberOrNull( const TQString& str ) const; + double positiveNumberOrNull( const TQString& str ) const; void fillGenStyleWithFormatOne( const KWord13FormatOneData& one, KoGenStyle& gs, const bool style ) const; - void fillGenStyleWithLayout( const KWord13Layout& layout, KoGenStyle& gs, const bool style ) const; + void fillGenStyleWithLayout( const KWord13Layout& tqlayout, KoGenStyle& gs, const bool style ) const; protected: KWord13Document* m_kwordDocument; KoStore* m_store; - QString m_contentAutomaticStyles; ///< Automatic styles for content.xml (in OO format) + TQString m_contentAutomaticStyles; ///< Automatic styles for content.xml (in OO format) KoGenStyles m_oasisGenStyles; ///< OASIS styles KoXmlWriter* m_manifestWriter; ///< Manifest file writer }; diff --git a/filters/kword/kword1.3/import/kword13paragraph.cpp b/filters/kword/kword1.3/import/kword13paragraph.cpp index d22372b3..f26bee46 100644 --- a/filters/kword/kword1.3/import/kword13paragraph.cpp +++ b/filters/kword/kword1.3/import/kword13paragraph.cpp @@ -10,7 +10,7 @@ KWord13Paragraph::~KWord13Paragraph( void ) { } -void KWord13Paragraph::xmldump( QTextStream& iostream ) +void KWord13Paragraph::xmldump( TQTextStream& iostream ) { iostream << " \n"; iostream << " " << m_text << "\n"; @@ -18,27 +18,27 @@ void KWord13Paragraph::xmldump( QTextStream& iostream ) iostream << " \n"; } -void KWord13Paragraph::setText( const QString& str) +void KWord13Paragraph::setText( const TQString& str) { m_text = str; } -void KWord13Paragraph::appendText( const QString& str) +void KWord13Paragraph::appendText( const TQString& str) { m_text += str; } -QString KWord13Paragraph::text( void ) const +TQString KWord13Paragraph::text( void ) const { return m_text; } -void KWord13ParagraphGroup::xmldump( QTextStream& iostream ) +void KWord13ParagraphGroup::xmldump( TQTextStream& iostream ) { iostream << " \n"; - for( QValueList ::Iterator it = begin(); + for( TQValueList ::Iterator it = begin(); it != end(); ++it ) { (*it).xmldump( iostream ); diff --git a/filters/kword/kword1.3/import/kword13paragraph.h b/filters/kword/kword1.3/import/kword13paragraph.h index 269e4821..0855aaec 100644 --- a/filters/kword/kword1.3/import/kword13paragraph.h +++ b/filters/kword/kword1.3/import/kword13paragraph.h @@ -2,9 +2,9 @@ #ifndef _FILTER_KWORD_1_3__KWORDPARAGRAPH_H #define _FILTER_KWORD_1_3__KWORDPARAGRAPH_H -#include -#include -#include +#include +#include +#include #include "kword13layout.h" @@ -19,27 +19,27 @@ public: KWord13Paragraph( void ); ~KWord13Paragraph( void ); public: - void xmldump( QTextStream& iostream ); - void setText( const QString& str); - void appendText( const QString& str); - QString text( void ) const; + void xmldump( TQTextStream& iostream ); + void setText( const TQString& str); + void appendText( const TQString& str); + TQString text( void ) const; public: /// \ KWord13Layout m_layout; /// \ - QPtrList m_formats; + TQPtrList m_formats; private: - QString m_text; ///< Text + TQString m_text; ///< Text }; /** * Group of paragraphs * (Mostly all paragraphs of a text frameset) */ -class KWord13ParagraphGroup : public QValueList +class KWord13ParagraphGroup : public TQValueList { public: - void xmldump( QTextStream& iostream ); + void xmldump( TQTextStream& iostream ); }; #endif // _FILTER_KWORD_1_3__KWORDPARAGRAPH_H diff --git a/filters/kword/kword1.3/import/kword13parser.cpp b/filters/kword/kword1.3/import/kword13parser.cpp index 61dd9d00..c6dce3d5 100644 --- a/filters/kword/kword1.3/import/kword13parser.cpp +++ b/filters/kword/kword1.3/import/kword13parser.cpp @@ -53,7 +53,7 @@ KWord13Parser::~KWord13Parser( void ) delete m_currentFormat; } -bool KWord13Parser::startElementFormatOneProperty( const QString& name, const QXmlAttributes& attributes, KWord13StackItem *stackItem) +bool KWord13Parser::startElementFormatOneProperty( const TQString& name, const TQXmlAttributes& attributes, KWord13StackItem *stackItem) { // ### TODO: check status if ( stackItem->elementType == KWord13TypeLayoutFormatOne ) @@ -65,7 +65,7 @@ bool KWord13Parser::startElementFormatOneProperty( const QString& name, const QX } for (int i = 0; i < attributes.count(); ++i ) { - QString attrName ( name ); + TQString attrName ( name ); attrName += ':'; attrName += attributes.qName( i ); m_currentLayout->m_format.m_properties[ attrName ] = attributes.value( i ); @@ -91,7 +91,7 @@ bool KWord13Parser::startElementFormatOneProperty( const QString& name, const QX for (int i = 0; i < attributes.count(); ++i ) { - QString attrName ( name ); + TQString attrName ( name ); attrName += ':'; attrName += attributes.qName( i ); data->m_properties[ attrName ] = attributes.value( i ); @@ -106,12 +106,12 @@ bool KWord13Parser::startElementFormatOneProperty( const QString& name, const QX } else { - kdError(30520) << "Wrong parents for FORMAT property: " << name << endl; + kdError(30520) << "Wrong tqparents for FORMAT property: " << name << endl; return false; } } -bool KWord13Parser::startElementLayoutProperty( const QString& name, const QXmlAttributes& attributes, KWord13StackItem *stackItem) +bool KWord13Parser::startElementLayoutProperty( const TQString& name, const TQXmlAttributes& attributes, KWord13StackItem *stackItem) { // ### TODO: check status if ( stackItem->elementType == KWord13TypeIgnore ) @@ -122,7 +122,7 @@ bool KWord13Parser::startElementLayoutProperty( const QString& name, const QXmlA { for (int i = 0; i < attributes.count(); ++i ) { - QString attrName ( name ); + TQString attrName ( name ); attrName += ':'; attrName += attributes.qName( i ); m_currentLayout->m_layoutProperties[ attrName ] = attributes.value( i ); @@ -133,12 +133,12 @@ bool KWord13Parser::startElementLayoutProperty( const QString& name, const QXmlA } else { - kdError(30520) << "No current layout for storing property: " << name << endl; + kdError(30520) << "No current tqlayout for storing property: " << name << endl; return false; } } -bool KWord13Parser::startElementName( const QString&, const QXmlAttributes& attributes, KWord13StackItem *stackItem ) +bool KWord13Parser::startElementName( const TQString&, const TQXmlAttributes& attributes, KWord13StackItem *stackItem ) { if ( stackItem->elementType != KWord13TypeLayout ) { @@ -156,9 +156,9 @@ bool KWord13Parser::startElementName( const QString&, const QXmlAttributes& attr return true; } -bool KWord13Parser::startElementFormat( const QString&, const QXmlAttributes& attributes, KWord13StackItem *stackItem ) +bool KWord13Parser::startElementFormat( const TQString&, const TQXmlAttributes& attributes, KWord13StackItem *stackItem ) { - // ### TODO: check parent? + // ### TODO: check tqparent? if ( stackItem->elementType == KWord13TypeIgnore ) { return true; @@ -166,7 +166,7 @@ bool KWord13Parser::startElementFormat( const QString&, const QXmlAttributes& at else if ( stackItem->elementType == KWord13TypeLayout ) { stackItem->elementType = KWord13TypeLayoutFormatOne; - return true; // Everything is done directly on the layout + return true; // Everything is done directly on the tqlayout } else if ( stackItem->elementType != KWord13TypeFormatsPlural ) { @@ -228,9 +228,9 @@ bool KWord13Parser::startElementFormat( const QString&, const QXmlAttributes& at return true; } -bool KWord13Parser::startElementLayout( const QString&, const QXmlAttributes& attributes, KWord13StackItem *stackItem ) +bool KWord13Parser::startElementLayout( const TQString&, const TQXmlAttributes& attributes, KWord13StackItem *stackItem ) { - // ### TODO: check parent? + // ### TODO: check tqparent? if ( stackItem->elementType == KWord13TypeIgnore ) { return true; @@ -247,7 +247,7 @@ bool KWord13Parser::startElementLayout( const QString&, const QXmlAttributes& at if ( m_currentLayout ) { // Delete an eventually already existing paragraph (should not happen) - kdWarning(30520) << "Current layout already defined!" << endl; + kdWarning(30520) << "Current tqlayout already defined!" << endl; delete m_currentLayout; } @@ -257,7 +257,7 @@ bool KWord13Parser::startElementLayout( const QString&, const QXmlAttributes& at return true; } -bool KWord13Parser::startElementParagraph( const QString&, const QXmlAttributes&, KWord13StackItem *stackItem ) +bool KWord13Parser::startElementParagraph( const TQString&, const TQXmlAttributes&, KWord13StackItem *stackItem ) { if ( stackItem->elementType == KWord13TypeUnknownFrameset ) { @@ -279,7 +279,7 @@ bool KWord13Parser::startElementParagraph( const QString&, const QXmlAttributes& return true; } -bool KWord13Parser::startElementFrame( const QString& name, const QXmlAttributes& attributes, KWord13StackItem *stackItem ) +bool KWord13Parser::startElementFrame( const TQString& name, const TQXmlAttributes& attributes, KWord13StackItem *stackItem ) { if ( stackItem->elementType == KWord13TypeFrameset || stackItem->elementType == KWord13TypePictureFrameset ) { @@ -289,9 +289,9 @@ bool KWord13Parser::startElementFrame( const QString& name, const QXmlAttributes const int num = ++stackItem->m_currentFrameset->m_numFrames; for (int i = 0; i < attributes.count(); ++i ) { - QString attrName ( name ); + TQString attrName ( name ); attrName += ':'; - attrName += QString::number( num ); + attrName += TQString::number( num ); attrName += ':'; attrName += attributes.qName( i ); stackItem->m_currentFrameset->m_frameData[ attrName ] = attributes.value( i ); @@ -313,10 +313,10 @@ bool KWord13Parser::startElementFrame( const QString& name, const QXmlAttributes return true; } -bool KWord13Parser::startElementFrameset( const QString& name, const QXmlAttributes& attributes, KWord13StackItem *stackItem ) +bool KWord13Parser::startElementFrameset( const TQString& name, const TQXmlAttributes& attributes, KWord13StackItem *stackItem ) { - const QString frameTypeStr( attributes.value( "frameType" ) ); - const QString frameInfoStr( attributes.value( "frameInfo" ) ); + const TQString frameTypeStr( attributes.value( "frameType" ) ); + const TQString frameInfoStr( attributes.value( "frameInfo" ) ); if ( frameTypeStr.isEmpty() || frameInfoStr.isEmpty() ) { @@ -390,7 +390,7 @@ bool KWord13Parser::startElementFrameset( const QString& name, const QXmlAttribu } -bool KWord13Parser::startElementDocumentAttributes( const QString& name, const QXmlAttributes& attributes, KWord13StackItem *stackItem, +bool KWord13Parser::startElementDocumentAttributes( const TQString& name, const TQXmlAttributes& attributes, KWord13StackItem *stackItem, const KWord13StackItemType& allowedParentType, const KWord13StackItemType& newType ) { if ( parserStack.current()->elementType == allowedParentType ) @@ -398,7 +398,7 @@ bool KWord13Parser::startElementDocumentAttributes( const QString& name, const Q stackItem->elementType = newType; for (int i = 0; i < attributes.count(); ++i ) { - QString attrName ( name ); + TQString attrName ( name ); attrName += ':'; attrName += attributes.qName( i ); m_kwordDocument->m_documentProperties[ attrName ] = attributes.value( i ); @@ -408,14 +408,14 @@ bool KWord13Parser::startElementDocumentAttributes( const QString& name, const Q } else { - kdError(30520) << "Wrong parent!" << endl; + kdError(30520) << "Wrong tqparent!" << endl; return false; } } -bool KWord13Parser::startElementKey( const QString& name, const QXmlAttributes& attributes, KWord13StackItem *stackItem ) +bool KWord13Parser::startElementKey( const TQString& name, const TQXmlAttributes& attributes, KWord13StackItem *stackItem ) { - const QString key( calculatePictureKey( attributes.value( "filename" ), + const TQString key( calculatePictureKey( attributes.value( "filename" ), attributes.value( "year" ), attributes.value( "month" ), attributes.value( "day" ), attributes.value( "hour" ), attributes.value( "minute" ), attributes.value( "second" ), attributes.value( "msec" ) ) ); @@ -450,11 +450,11 @@ bool KWord13Parser::startElementKey( const QString& name, const QXmlAttributes& return true; } -bool KWord13Parser::startElementAnchor( const QString& name, const QXmlAttributes& attributes, KWord13StackItem *stackItem ) +bool KWord13Parser::startElementAnchor( const TQString& name, const TQXmlAttributes& attributes, KWord13StackItem *stackItem ) { if ( stackItem->elementType == KWord13TypeAnchor ) { - const QString anchorType ( attributes.value( "type" ) ); + const TQString anchorType ( attributes.value( "type" ) ); if ( anchorType == "grpMgr" ) kdWarning(30520) << "Anchor of type grpMgr! Not tested!" << endl; // ### TODO else if ( anchorType != "frameset" ) @@ -462,7 +462,7 @@ bool KWord13Parser::startElementAnchor( const QString& name, const QXmlAttribute kdError(30520) << "Unsupported anchor type: " << anchorType << endl; return false; } - const QString frameset ( attributes.value( "instance" ) ); + const TQString frameset ( attributes.value( "instance" ) ); if ( frameset.isEmpty() ) { kdError(30520) << "Anchor to an empty frameset name! Aborting!" << endl; @@ -474,7 +474,7 @@ bool KWord13Parser::startElementAnchor( const QString& name, const QXmlAttribute six->m_anchorName = frameset; } // add frameset name to the list of anchored framesets - if ( m_kwordDocument->m_anchoredFramesetNames.find( frameset ) == m_kwordDocument->m_anchoredFramesetNames.end() ) + if ( m_kwordDocument->m_anchoredFramesetNames.tqfind( frameset ) == m_kwordDocument->m_anchoredFramesetNames.end() ) { m_kwordDocument->m_anchoredFramesetNames.append( frameset ); } @@ -488,7 +488,7 @@ bool KWord13Parser::startElementAnchor( const QString& name, const QXmlAttribute } -bool KWord13Parser::startElement( const QString&, const QString&, const QString& name, const QXmlAttributes& attributes ) +bool KWord13Parser::startElement( const TQString&, const TQString&, const TQString& name, const TQXmlAttributes& attributes ) { kdDebug(30520) << indent << "<" << name << ">" << endl; // DEBUG indent += "*"; //DEBUG @@ -532,7 +532,7 @@ bool KWord13Parser::startElement( const QString&, const QString&, const QString& if ( stackItem->elementType == KWord13TypeParagraph && m_currentParagraph ) { stackItem->elementType = KWord13TypeText; - m_currentParagraph->setText( QString::null ); + m_currentParagraph->setText( TQString() ); } else { @@ -625,13 +625,13 @@ bool KWord13Parser::startElement( const QString&, const QString&, const QString& } else if ( name == "FRAMESTYLE" ) { - // ### TODO, but some of the