diff --git a/CalligraProducts.cmake b/CalligraProducts.cmake
index d63f2f1b79a..4174cd7cee8 100644
--- a/CalligraProducts.cmake
+++ b/CalligraProducts.cmake
@@ -1,728 +1,727 @@
### DEFINITION OF PRODUCTS, FEATURES AND PRODUCTSETS
####################################################
# When building Calligra a lot of different things are created and installed. To
# describe them and their internal dependencies the concepts of "product",
# "feature" and "product set" are used.
# A "product" is the smallest functional unit which can be created in the build
# and which is useful on its own when installed. Examples are e.g. libraries,
# plugins or executables. Products have external and internal required
# dependencies at build-time. Internal dependencies are noted in terms of other
# products or features (see below) and could be e.g. other libraries to link
# against or build tools needed to generate source files.
# A product gets defined by setting an identifier, a descriptive fullname and
# the needed internal build-time requirements. Any other product or feature
# listed as requirement must have been defined before.
# A "feature" is not a standalone product, but adds abilities to one or multiple
# given products. One examples is e.g. scriptability. Features have external and
# internal required dependencies at build-time. Internal dependencies are noted
# in terms of other products or features and could be e.g. other libraries to
# link against or build tools needed to generate source files.
# A feature gets defined by setting an identifier, a descriptive fullname and
# the needed internal build-time requirements. Any other product or feature
# listed as requirement must have been defined before.
# A "productset" is a selection of products and features which should be build
# together. The products and features can be either essential or optional to the
# set. If essential (REQUIRES), the whole productset will not be build if a
# product or feature is missing another internal or external dependency. If
# optional (OPTIONAL), the rest of the set will still be build in that case.
# The products and features to include in a set can be listed directly or
# indirectly: they can be named explicitely, but also by including other
# productsets in a set, whose products and features will then be part of the
# first set as well.
# Products, features and productsets can be listed as dependencies in multiple
# product sets. As with dependencies for products or features, they must have
# been defined before.
# Products, features and product sets are in the same namespace, so a given
# identifier can be only used either for a product or for a feature or for a
# product set.
# The ids of products and features (but not sets) are used to generate cmake
# variables SHOULD_BUILD_${ID}, which then are used to control what is build and
# how.
#############################################
#### Product definitions ####
#############################################
# For defining new products see end of this file, "How to add another product?"
# IDEA: also add headers/sdk for all the libs ("_DEVEL"?)
# IDEA: note external deps for products, so they are only checked if needed
# There can be required or optional external deps, required will also result
# in automatic disabling of product building
# TODO: some products have multiple optional requirements, but need at least one.
# See APP_CONVERTER, FILEMANAGER_*
# 3rd-party libs
calligra_define_product(LIB_KDGANTT "libkdgantt")
calligra_define_product(LIB_KDCHART "libkdchart")
# building tools
calligra_define_product(BUILDTOOL_RNG2CPP "rng2cpp")
# Calligra-independent utility libs
calligra_define_product(LIB_KOVECTORIMAGE "libkovectorimage")
calligra_define_product(LIB_KOPROPERTY "libkoproperty")
calligra_define_product(LIB_CALLIGRADB "libcalligradb")
calligra_define_product(LIB_KOREPORT "libkoreport" REQUIRES LIB_KOPROPERTY LIB_CALLIGRADB)
# calligra libs
calligra_define_product(LIB_CALLIGRA "Calligra core libs" REQUIRES BUILDTOOL_RNG2CPP)
calligra_define_product(LIB_KOPAGEAPP "Lib for paged documents" REQUIRES LIB_CALLIGRA)
calligra_define_product(LIB_KOODF2 "libkoodf2" REQUIRES LIB_CALLIGRA)
calligra_define_product(LIB_KOODFREADER "libkoodfreader" REQUIRES LIB_KOODF2 LIB_CALLIGRA)
calligra_define_product(LIB_MSO "libmso" REQUIRES LIB_CALLIGRA)
calligra_define_product(LIB_KOMSOOXML "libkomsooxml" REQUIRES LIB_KOODF2 LIB_CALLIGRA)
# features
calligra_define_feature(FEATURE_SCRIPTING "Scripting feature") # TODO
calligra_define_feature(FEATURE_RDF "RDF feature")
# plugins
calligra_define_product(PLUGIN_TEXTSHAPE "Text shape plugin" REQUIRES LIB_CALLIGRA)
# parts
calligra_define_product(PART_WORDS "Words engine" REQUIRES LIB_CALLIGRA PLUGIN_TEXTSHAPE)
calligra_define_product(PART_STAGE "Stage engine" REQUIRES LIB_CALLIGRA LIB_KOPAGEAPP)
calligra_define_product(PART_SHEETS "Sheets engine" REQUIRES LIB_CALLIGRA)
calligra_define_product(PART_QTQUICK "QtQuick Plugin that provides Calligra components" REQUIRES PART_WORDS PART_STAGE)# SHEETS_PART)
# apps
calligra_define_product(APP_WORDS "Words app (for Desktop)" REQUIRES PART_WORDS)
calligra_define_product(APP_STAGE "Stage app (for Desktop)" REQUIRES PART_STAGE)
calligra_define_product(APP_SHEETS "Sheets app (for Desktop)" REQUIRES PART_SHEETS)
calligra_define_product(APP_AUTHOR "Author app (for Desktop)" REQUIRES PART_WORDS)
calligra_define_product(APP_KARBON "Karbon app (for Desktop)" REQUIRES LIB_CALLIGRA)
calligra_define_product(APP_KRITA "Krita app (for Desktop)" REQUIRES LIB_CALLIGRA)
calligra_define_product(APP_KEXI "Kexi app (for Desktop)" REQUIRES LIB_CALLIGRA LIB_KOREPORT LIB_CALLIGRADB)
calligra_define_product(APP_FLOW "Flow app (for Desktop)" REQUIRES LIB_CALLIGRA LIB_KOPAGEAPP)
calligra_define_product(APP_PLAN "Plan app (for Desktop)" REQUIRES LIB_CALLIGRA LIB_KOREPORT LIB_KDCHART LIB_KDGANTT)
calligra_define_product(APP_BRAINDUMP "Braindump app (for Desktop)" REQUIRES LIB_CALLIGRA)
calligra_define_product(APP_GEMINI "The Calligra Gemini application" REQUIRES PART_QTQUICK)
# TODO: this needs to be split up by app products
calligra_define_product(DOC "Calligra Documentations")
# extras
calligra_define_product(APP_CONVERTER "Format converter for commandline" REQUIRES LIB_CALLIGRA)
calligra_define_product(FILEMANAGER_PROPERTIES "Plugin for the KDE file properties dialog" REQUIRES LIB_CALLIGRA)
calligra_define_product(FILEMANAGER_THUMBNAIL "Plugins for KDE filesystem thumbnailing" REQUIRES LIB_CALLIGRA)
calligra_define_product(FILEMANAGER_QUICKPRINT "Plugin for the filemanager adding a \"Print\" action")
calligra_define_product(FILEMANAGER_TEMPLATES "File templates for filemanager")
calligra_define_product(OKULAR_GENERATOR_ODP "Plugin for Okular adding support for ODP" REQUIRES PART_STAGE)
calligra_define_product(OKULAR_GENERATOR_ODT "Plugin for Okular adding support for ODT" REQUIRES PART_WORDS)
# more plugins
calligra_define_product(PLUGIN_COLORENGINES "Colorengine plugins" REQUIRES LIB_CALLIGRA)
calligra_define_product(PLUGIN_MUSICSHAPE "Music shape plugin" REQUIRES LIB_CALLIGRA)
calligra_define_product(PLUGIN_SPACENAVIGATOR "SpaceNavigator input plugin" REQUIRES LIB_CALLIGRA)
calligra_define_product(PLUGIN_ARTISTICTEXTSHAPE "Artistic shape plugin" REQUIRES LIB_CALLIGRA)
calligra_define_product(PLUGIN_DOCKERS "Default dockers plugin" REQUIRES LIB_CALLIGRA)
calligra_define_product(PLUGIN_TEXTEDITING "Textediting plugins" REQUIRES LIB_CALLIGRA)
calligra_define_product(PLUGIN_KEXI_SPREADSHEETMIGRATION "Import from ODS plugin for Kexi" REQUIRES APP_KEXI PART_SHEETS)
calligra_define_product(PLUGIN_DEFAULTTOOLS "Default Flake tools plugin" REQUIRES LIB_CALLIGRA)
calligra_define_product(PLUGIN_PATHSHAPES "Path shape plugins" REQUIRES LIB_CALLIGRA)
calligra_define_product(PLUGIN_VARIABLES "Text variables plugin" REQUIRES LIB_CALLIGRA)
calligra_define_product(PLUGIN_CHARTSHAPE "Chart shape plugin" REQUIRES LIB_CALLIGRA LIB_KDCHART)
calligra_define_product(PLUGIN_PICTURESHAPE "Picture shape plugin" REQUIRES LIB_CALLIGRA)
calligra_define_product(PLUGIN_PLUGINSHAPE "Plugin shape plugin" REQUIRES LIB_CALLIGRA)
calligra_define_product(PLUGIN_FORMULASHAPE "Formula shape plugin" REQUIRES LIB_CALLIGRA)
calligra_define_product(PLUGIN_VIDEOSHAPE "Plugin for handling videos in Calligra" REQUIRES LIB_CALLIGRA)
calligra_define_product(PLUGIN_VECTORSHAPE "Vectorgraphic shape plugin" REQUIRES LIB_CALLIGRA LIB_KOVECTORIMAGE)
calligra_define_product(PLUGIN_REPORTING "Renderer plugins for libkoreport" REQUIRES LIB_KOREPORT LIB_KDCHART)
calligra_define_product(PLUGIN_SEMANTICITEMS "Semantic items plugins" REQUIRES FEATURE_RDF LIB_CALLIGRA)
calligra_define_product(PLUGIN_CALLIGRAGEMINI_GIT "Git support plugin for Calligra Gemini")
# staging plugins
-calligra_define_product(PLUGIN_GOOGLEDOCS "Plugin for integration with Google Docs" STAGING REQUIRES LIB_CALLIGRA)
calligra_define_product(PLUGIN_THREEDSHAPE "3D shape plugin" STAGING REQUIRES LIB_CALLIGRA)
# Sheets filters
calligra_define_product(FILTER_XLSX_TO_ODS "XLSX to ODS filter" REQUIRES LIB_KOMSOOXML PART_SHEETS)
calligra_define_product(FILTER_XLS_TO_SHEETS "Sheets XLS import filter" REQUIRES LIB_MSO LIB_KOMSOOXML PART_SHEETS)
calligra_define_product(FILTER_SHEETS_TO_XLS "Sheets XLS export filter" REQUIRES LIB_MSO LIB_KOMSOOXML PART_SHEETS)
calligra_define_product(FILTER_CSV_TO_SHEETS "Sheets CSV import filter" REQUIRES PART_SHEETS)
calligra_define_product(FILTER_SHEETS_TO_CSV "Sheets CSV export filter" REQUIRES PART_SHEETS)
calligra_define_product(FILTER_APPLIXSPREAD_TO_KSPREAD "Applix Spreadsheet to KSpread filter" REQUIRES PART_SHEETS)
calligra_define_product(FILTER_DBASE_TO_KSPREAD "dBASE to KSpread filter" REQUIRES LIB_CALLIGRA)
calligra_define_product(FILTER_GNUMERIC_TO_SHEETS "Sheets GNUMERIC import filter" REQUIRES PART_SHEETS)
calligra_define_product(FILTER_SHEETS_TO_GNUMERIC "Sheets GNUMERIC import filter" REQUIRES PART_SHEETS)
calligra_define_product(FILTER_OPENCALC_TO_SHEETS "Sheets OpenOffice.org Calc import filter" REQUIRES PART_SHEETS)
calligra_define_product(FILTER_SHEETS_TO_OPENCALC "Sheets OpenOffice.org Calc export filter" REQUIRES PART_SHEETS)
calligra_define_product(FILTER_QUATTROPRO_TO_SHEETS "Sheets Quattro Pro import filter" REQUIRES PART_SHEETS)
calligra_define_product(FILTER_HTML_TO_ODS "HTML to ODS filter" REQUIRES LIB_CALLIGRA)
calligra_define_product(FILTER_SHEETS_TO_HTML "Sheets HTML export filter" REQUIRES PART_SHEETS)
calligra_define_product(FILTER_KSPREAD_TO_LATEX "KSpread to LaTeX filter" REQUIRES LIB_CALLIGRA)
# Flow filters
calligra_define_product(FILTER_VISIO_TO_ODG "Visio to ODG filter" REQUIRES LIB_CALLIGRA)
calligra_define_product(FILTER_WPG_TO_ODG "WPG to ODG filter" REQUIRES LIB_CALLIGRA)
# Stage filters
calligra_define_product(FILTER_KEY_TO_ODP "Apple Keynote to ODP filter" REQUIRES LIB_CALLIGRA)
calligra_define_product(FILTER_KPR_TO_ODP "KPresenter to ODP filter" REQUIRES LIB_CALLIGRA)
calligra_define_product(FILTER_PPT_TO_ODP "PPT to OPD filter" REQUIRES LIB_MSO LIB_CALLIGRA)
calligra_define_product(FILTER_PPTX_TO_ODP "PPTX to ODP filter" REQUIRES LIB_KOMSOOXML LIB_KOODF2 LIB_CALLIGRA)
# Words filters
calligra_define_product(FILTER_DOC_TO_ODT "DOC to ODT filter" REQUIRES LIB_MSO LIB_KOMSOOXML LIB_CALLIGRA)
calligra_define_product(FILTER_DOCX_TO_ODT "DOCX to ODT filter" REQUIRES LIB_KOMSOOXML LIB_KOODF2 LIB_CALLIGRA)
calligra_define_product(FILTER_ODT_TO_DOCX "ODT to DOCX filter" REQUIRES LIB_KOODFREADER LIB_KOODF2 LIB_CALLIGRA)
calligra_define_product(FILTER_WORDPERFECT_TO_ODT "Word Perfect to ODT filter" REQUIRES LIB_CALLIGRA)
calligra_define_product(FILTER_WORKS_TO_ODT "MS Works to ODT filter" REQUIRES LIB_CALLIGRA)
calligra_define_product(FILTER_APPLIXWORD_TO_ODT "Applixword to ODT filter" REQUIRES LIB_CALLIGRA)
calligra_define_product(FILTER_ASCII_TO_WORDS "Words ASCII import filter" REQUIRES PART_WORDS LIB_KOODF2)
calligra_define_product(FILTER_ODT_TO_ASCII "ODT to ASCII filter" REQUIRES LIB_KOODFREADER LIB_CALLIGRA)
calligra_define_product(FILTER_RTF_TO_ODT "RTF to ODT filter" REQUIRES LIB_CALLIGRA)
calligra_define_product(FILTER_ODT_TO_MOBI "Mobi export filter" REQUIRES LIB_CALLIGRA)
calligra_define_product(FILTER_ODT_TO_EPUB2 "ODT Epub2 export filter" REQUIRES LIB_KOVECTORIMAGE LIB_CALLIGRA)
calligra_define_product(FILTER_ODT_TO_HTML "ODT HTML export filter" REQUIRES LIB_KOVECTORIMAGE LIB_CALLIGRA)
calligra_define_product(FILTER_ODT_TO_WIKI "ODT Wiki export filter" REQUIRES LIB_KOODFREADER LIB_KOODF2 LIB_CALLIGRA)
# Plan filters
calligra_define_product(FILTER_MPXJ_IMPORT "MS Project import filter" REQUIRES APP_PLAN)
# Karbon filters
calligra_define_product(FILTER_EPS_TO_SVG_AI "EPS to SVG/AI filter" REQUIRES LIB_CALLIGRA)
calligra_define_product(FILTER_XFIG_TO_ODG "XFig to ODG filter" REQUIRES LIB_CALLIGRA)
calligra_define_product(FILTER_PDF_TO_SVG "PDF to SVG filter" REQUIRES LIB_CALLIGRA)
calligra_define_product(FILTER_WPG_TO_SVG "WPG to SVG filter" REQUIRES LIB_CALLIGRA)
calligra_define_product(FILTER_KARBON_TO_IMAGE "Karbon image export filter" REQUIRES APP_KARBON)
calligra_define_product(FILTER_KARBON_TO_SVG "Karbon SVG export filter" REQUIRES APP_KARBON)
calligra_define_product(FILTER_SVG_TO_KARBON "Karbon SVG import filter" REQUIRES APP_KARBON)
calligra_define_product(FILTER_KARBON_TO_WMF "Karbon WMF export filter" REQUIRES APP_KARBON)
calligra_define_product(FILTER_WMF_TO_SVG "WMF to SVG filter" REQUIRES LIB_KOVECTORIMAGE LIB_CALLIGRA)
calligra_define_product(FILTER_KARBON1X_TO_KARBON "Karbon 1.x import filter" REQUIRES APP_KARBON)
# meta apps
calligra_define_product(APP_ACTIVE "Calligra Active app" REQUIRES PART_SHEETS PART_STAGE PART_WORDS)
calligra_define_product(APP_CALLIGRA "General Calligra app starter" REQUIRES LIB_CALLIGRA)
# more extras
calligra_define_product(OKULAR_GENERATOR_PPT "Plugin for Okular extended with support for PPT" REQUIRES OKULAR_GENERATOR_ODP FILTER_PPT_TO_ODP)
calligra_define_product(OKULAR_GENERATOR_PPTX "Plugin for Okular extended with support for PPTX" REQUIRES OKULAR_GENERATOR_ODP FILTER_PPTX_TO_ODP)
calligra_define_product(OKULAR_GENERATOR_DOC "Plugin for Okular extended with support for DOC" REQUIRES OKULAR_GENERATOR_ODT FILTER_DOC_TO_ODT)
calligra_define_product(OKULAR_GENERATOR_DOCX "Plugin for Okular extended with support for DOCX" REQUIRES OKULAR_GENERATOR_ODT FILTER_DOCX_TO_ODT)
calligra_define_product(OKULAR_GENERATOR_WORDPERFECT "Plugin for Okular extended with support for WORDPERFECT" REQUIRES OKULAR_GENERATOR_ODT FILTER_WORDPERFECT_TO_ODT)
# developer utils
calligra_define_product(APP_DEVTOOLS "Tools for developers")
calligra_define_product(APP_CSTESTER "cstester" REQUIRES PART_SHEETS PART_STAGE PART_WORDS)
#############################################
#### Product set definitions ####
#############################################
# For defining new productsets see end of this file,
# "How to add another productset?"
# filter sets
calligra_define_productset(FILTERS_SHEETS_IMPORT "All Sheets import filters"
OPTIONAL
FILTER_XLSX_TO_ODS
FILTER_XLS_TO_SHEETS
FILTER_CSV_TO_SHEETS
FILTER_APPLIXSPREAD_TO_KSPREAD
FILTER_DBASE_TO_KSPREAD
FILTER_GNUMERIC_TO_SHEETS
FILTER_OPENCALC_TO_SHEETS
FILTER_QUATTROPRO_TO_SHEETS
FILTER_HTML_TO_ODS
)
calligra_define_productset(FILTERS_SHEETS_EXPORT "All Sheets export filters"
OPTIONAL
FILTER_SHEETS_TO_XLS
FILTER_SHEETS_TO_CSV
FILTER_SHEETS_TO_GNUMERIC
FILTER_SHEETS_TO_OPENCALC
FILTER_SHEETS_TO_HTML
FILTER_KSPREAD_TO_LATEX
)
calligra_define_productset(FILTERS_SHEETS "All Sheets filters"
OPTIONAL
FILTERS_SHEETS_IMPORT
FILTERS_SHEETS_EXPORT
)
calligra_define_productset(FILTERS_FLOW_IMPORT "All Flow import filters"
OPTIONAL
FILTER_VISIO_TO_ODG
FILTER_WPG_TO_ODG
)
#calligra_define_productset(FILTERS_FLOW_EXPORT "All Flow export filters" OPTIONAL ) noone currently
calligra_define_productset(FILTERS_FLOW "All Flow filters"
OPTIONAL
FILTERS_FLOW_IMPORT
# FILTERS_FLOW_EXPORT
)
calligra_define_productset(FILTERS_STAGE_IMPORT "All Stage import filters"
OPTIONAL
FILTER_KEY_TO_ODP
FILTER_KPR_TO_ODP
FILTER_PPT_TO_ODP
FILTER_PPTX_TO_ODP
)
#calligra_define_productset(FILTERS_STAGE_EXPORT "All Stage export filters" OPTIONAL ) noone currently
calligra_define_productset(FILTERS_STAGE "All Stage filters"
OPTIONAL
FILTERS_STAGE_IMPORT
# FILTERS_STAGE_EXPORT
)
calligra_define_productset(FILTERS_WORDS_IMPORT "All Words import filters"
OPTIONAL
FILTER_DOC_TO_ODT
FILTER_DOCX_TO_ODT
FILTER_WORDPERFECT_TO_ODT
FILTER_WORKS_TO_ODT
FILTER_APPLIXWORD_TO_ODT
FILTER_ASCII_TO_WORDS
FILTER_RTF_TO_ODT
)
calligra_define_productset(FILTERS_WORDS_EXPORT "All Words export filters"
OPTIONAL
FILTER_ODT_TO_ASCII
FILTER_ODT_TO_MOBI
FILTER_ODT_TO_EPUB2
FILTER_ODT_TO_HTML
FILTER_ODT_TO_DOCX
FILTER_ODT_TO_WIKI
)
calligra_define_productset(FILTERS_WORDS "All Words filters"
OPTIONAL
FILTERS_WORDS_IMPORT
FILTERS_WORDS_EXPORT
)
calligra_define_productset(FILTERS_PLAN "All Plan filters"
OPTIONAL
FILTER_MPXJ_IMPORT
)
calligra_define_productset(FILTERS_KARBON_IMPORT "All Karbon import filters"
OPTIONAL
FILTER_EPS_TO_SVG_AI
FILTER_XFIG_TO_ODG
FILTER_PDF_TO_SVG
FILTER_WPG_TO_SVG
FILTER_SVG_TO_KARBON
FILTER_WMF_TO_SVG
FILTER_KARBON1X_TO_KARBON
)
calligra_define_productset(FILTERS_KARBON_EXPORT "All Karbon export filters"
OPTIONAL
FILTER_KARBON_TO_IMAGE
FILTER_KARBON_TO_SVG
FILTER_KARBON_TO_WMF
)
calligra_define_productset(FILTERS_KARBON "All Karbon filters"
OPTIONAL
FILTERS_KARBON_IMPORT
FILTERS_KARBON_EXPORT
)
# filemanager
calligra_define_productset(FILEMANAGER "Extensions for the filemanager"
OPTIONAL
FILEMANAGER_PROPERTIES
FILEMANAGER_QUICKPRINT
FILEMANAGER_TEMPLATES
FILEMANAGER_THUMBNAIL
)
# apps
calligra_define_productset(ACTIVE "Full Calligra Active"
REQUIRES
APP_ACTIVE
OPTIONAL
# extras
FILEMANAGER_PROPERTIES
FILEMANAGER_THUMBNAIL
# plugins
PLUGIN_ARTISTICTEXTSHAPE
PLUGIN_CHARTSHAPE
PLUGIN_DEFAULTTOOLS
PLUGIN_FORMULASHAPE
PLUGIN_PATHSHAPES
PLUGIN_PICTURESHAPE
PLUGIN_PLUGINSHAPE
PLUGIN_TEXTEDITING
PLUGIN_TEXTSHAPE
PLUGIN_VARIABLES
PLUGIN_VECTORSHAPE
PLUGIN_VIDEOSHAPE
# filters
FILTERS_SHEETS_IMPORT
FILTERS_STAGE_IMPORT
FILTERS_WORDS_IMPORT
)
calligra_define_productset(AUTHOR "Full Author (for Desktop)"
REQUIRES
APP_AUTHOR
OPTIONAL
# extras
FILEMANAGER
# plugins
PLUGIN_ARTISTICTEXTSHAPE
PLUGIN_CHARTSHAPE
PLUGIN_DEFAULTTOOLS
PLUGIN_DOCKERS
PLUGIN_FORMULASHAPE
PLUGIN_PATHSHAPES
PLUGIN_PICTURESHAPE
PLUGIN_PLUGINSHAPE
PLUGIN_TEXTEDITING
PLUGIN_TEXTSHAPE
PLUGIN_SEMANTICITEMS
PLUGIN_VARIABLES
PLUGIN_VECTORSHAPE
# filters
FILTERS_WORDS
)
calligra_define_productset(BRAINDUMP "Full Braindump (for Desktop)"
REQUIRES
APP_BRAINDUMP
OPTIONAL
# plugins
PLUGIN_ARTISTICTEXTSHAPE
PLUGIN_CHARTSHAPE
PLUGIN_DEFAULTTOOLS
PLUGIN_DOCKERS
PLUGIN_FORMULASHAPE
PLUGIN_MUSICSHAPE
PLUGIN_PATHSHAPES
PLUGIN_PICTURESHAPE
PLUGIN_PLUGINSHAPE
PLUGIN_TEXTEDITING
PLUGIN_TEXTSHAPE
PLUGIN_THREEDSHAPE
PLUGIN_VARIABLES
PLUGIN_VECTORSHAPE
PLUGIN_VIDEOSHAPE
)
calligra_define_productset(FLOW "Full Flow (for Desktop)"
REQUIRES
APP_FLOW
OPTIONAL
# extras
FILEMANAGER
# plugins
PLUGIN_ARTISTICTEXTSHAPE
PLUGIN_CHARTSHAPE
PLUGIN_DEFAULTTOOLS
PLUGIN_DOCKERS
PLUGIN_FORMULASHAPE
PLUGIN_PATHSHAPES
PLUGIN_PICTURESHAPE
PLUGIN_PLUGINSHAPE
PLUGIN_TEXTEDITING
PLUGIN_TEXTSHAPE
PLUGIN_VARIABLES
PLUGIN_VECTORSHAPE
# filters
FILTERS_FLOW
)
calligra_define_productset(KARBON "Full Karbon (for Desktop)"
REQUIRES
APP_KARBON
OPTIONAL
# extras
FILEMANAGER
# plugins
PLUGIN_ARTISTICTEXTSHAPE
PLUGIN_CHARTSHAPE
PLUGIN_DEFAULTTOOLS
PLUGIN_DOCKERS
PLUGIN_FORMULASHAPE
PLUGIN_PATHSHAPES
PLUGIN_PICTURESHAPE
PLUGIN_PLUGINSHAPE
PLUGIN_TEXTEDITING
PLUGIN_TEXTSHAPE
PLUGIN_VARIABLES
PLUGIN_VECTORSHAPE
# filters
FILTERS_KARBON
)
calligra_define_productset(KEXI "Full Kexi (for Desktop)"
REQUIRES
APP_KEXI
OPTIONAL
FEATURE_SCRIPTING
PLUGIN_KEXI_SPREADSHEETMIGRATION
PLUGIN_REPORTING
)
calligra_define_productset(KRITA "Full Krita"
REQUIRES
APP_KRITA
OPTIONAL
# extras
FILEMANAGER_PROPERTIES
FILEMANAGER_THUMBNAIL
FILEMANAGER_QUICKPRINT
# plugins
PLUGIN_ARTISTICTEXTSHAPE
PLUGIN_COLORENGINES
PLUGIN_DEFAULTTOOLS
PLUGIN_DOCKERS
PLUGIN_PATHSHAPES
PLUGIN_PICTURESHAPE
PLUGIN_TEXTEDITING
PLUGIN_TEXTSHAPE
PLUGIN_SPACENAVIGATOR
PLUGIN_VECTORSHAPE
)
calligra_define_productset(PLAN "Full Plan (for Desktop)"
REQUIRES
APP_PLAN
OPTIONAL
FEATURE_SCRIPTING
FILTERS_PLAN
)
calligra_define_productset(SHEETS "Full Sheets (for Desktop)"
REQUIRES
APP_SHEETS
OPTIONAL
# extras
FILEMANAGER
# feature
FEATURE_SCRIPTING
# plugins
PLUGIN_ARTISTICTEXTSHAPE
PLUGIN_CHARTSHAPE
PLUGIN_DEFAULTTOOLS
PLUGIN_DOCKERS
PLUGIN_FORMULASHAPE
PLUGIN_PATHSHAPES
PLUGIN_PICTURESHAPE
PLUGIN_PLUGINSHAPE
PLUGIN_TEXTEDITING
PLUGIN_TEXTSHAPE
PLUGIN_VARIABLES
PLUGIN_VECTORSHAPE
# filters
FILTERS_SHEETS
)
calligra_define_productset(STAGE "Full Stage (for Desktop)"
REQUIRES
APP_STAGE
OPTIONAL
# extras
FILEMANAGER
# plugins
PLUGIN_ARTISTICTEXTSHAPE
PLUGIN_CHARTSHAPE
PLUGIN_DEFAULTTOOLS
PLUGIN_DOCKERS
PLUGIN_FORMULASHAPE
PLUGIN_PATHSHAPES
PLUGIN_PICTURESHAPE
PLUGIN_PLUGINSHAPE
PLUGIN_TEXTEDITING
PLUGIN_TEXTSHAPE
PLUGIN_VARIABLES
PLUGIN_VECTORSHAPE
PLUGIN_VIDEOSHAPE
# filters
FILTERS_STAGE
)
calligra_define_productset(WORDS "Full Words (for Desktop)"
REQUIRES
APP_WORDS
OPTIONAL
# extras
FILEMANAGER
# plugins
PLUGIN_ARTISTICTEXTSHAPE
PLUGIN_CHARTSHAPE
PLUGIN_DEFAULTTOOLS
PLUGIN_DOCKERS
PLUGIN_FORMULASHAPE
PLUGIN_PATHSHAPES
PLUGIN_PICTURESHAPE
PLUGIN_PLUGINSHAPE
PLUGIN_SEMANTICITEMS
PLUGIN_TEXTEDITING
PLUGIN_TEXTSHAPE
PLUGIN_VARIABLES
PLUGIN_VECTORSHAPE
# filters
FILTERS_WORDS
)
calligra_define_productset(GEMINI "Calligra for 2:1 devices"
REQUIRES
APP_GEMINI
OPTIONAL
# plugins
PLUGIN_ARTISTICTEXTSHAPE
PLUGIN_CALLIGRAGEMINI_GIT
PLUGIN_CHARTSHAPE
PLUGIN_DEFAULTTOOLS
PLUGIN_DOCKERS
PLUGIN_FORMULASHAPE
PLUGIN_PATHSHAPES
PLUGIN_PICTURESHAPE
PLUGIN_PLUGINSHAPE
PLUGIN_TEXTEDITING
PLUGIN_TEXTSHAPE
PLUGIN_VARIABLES
PLUGIN_VECTORSHAPE
PLUGIN_VIDEOSHAPE
# filters
FILTERS_WORDS
FILTERS_STAGE
)
# okular support
calligra_define_productset(OKULAR "Okular generators"
OPTIONAL
OKULAR_GENERATOR_ODP
OKULAR_GENERATOR_PPT
OKULAR_GENERATOR_PPTX
OKULAR_GENERATOR_ODT
OKULAR_GENERATOR_DOC
OKULAR_GENERATOR_DOCX
OKULAR_GENERATOR_WORDPERFECT
)
# How to add another product?
# ===========================
#
# 1. Define the product by a call of calligra_define_product,
# e.g.
#
# calligra_define_product(MYPRODUCT "title of product")
#
# For the product id use a proper prefix (LIB_, PLUGIN_, FILTER_, APP_, PART_,
# ...), whatever is appropriate.
#
# 2. Extend that call with a REQUIRES argument section, if the product has
# hard internal build-time dependencies on other products or features.
# Products/features that are listed as dependencies have to be defined before
# (see also the API doc in cmake/modules/CalligraProductSetMacros.cmake)
# E.g.
#
# calligra_define_product(MYPRODUCT "title of product" REQUIRES P1 P2)
#
# 3. Add a rule when to not build the product, in the section "Detect which
# products/features can be compiled" of the toplevel CMakeLists.txt. Each
# product should have their own boolean expression when to set the build flag
# to FALSE, e.g.
#
# if (PLATFORMX OR NOT EXTERNAL_DEP_X_FOUND)
# set(SHOULD_BUILD_MYPRODUCT FALSE)
# endif ()
#
# 4. Wrap everything belonging to the product with the build flag of the product.
# Ideally this is done around subdirectory inclusions, results in easier code.
# e.g.
#
# if (SHOULD_BUILD_MYPRODUCT)
# add_subdirectory(myproduct)
# endif ()
#
# 5. Tag the product as STAGING, if it is not yet ready for release, but already
# integrated in the master branch, e.g.
#
# calligra_define_product(MYPRODUCT "title of product" STAGING REQUIRES P1)
#
# 6. Add the product to all products, features and product sets which have this
# product as REQUIRED or OPTIONAL dependency.
#
#
# How to add another feature?
# ===========================
#
# 1. Define the feature by a call of calligra_define_feature,
# e.g.
#
# calligra_define_feature(MYFEATURE "title of feature")
#
# For the feature id use a proper prefix (FEATURE_, ...), whatever is
# appropriate.
#
# 2. Extend that call with a REQUIRES argument section, if the feature has
# hard internal build-time dependencies on other products or features.
# Products or features that are listed as dependencies have to be defined
# before
# (see also the API doc in cmake/modules/CalligraProductSetMacros.cmake)
# E.g.
#
# calligra_define_feature(MYFEATURE "title of feature" REQUIRES P1 F1)
#
# 3. Add a rule when to not build the feature, in the section "Detect which
# products/features can be compiled" of the toplevel CMakeLists.txt. Each
# feature should have their own boolean expression when to set the build flag
# to FALSE, e.g.
#
# if (PLATFORMX OR NOT EXTERNAL_DEP_X_FOUND)
# set(SHOULD_BUILD_MYFEATURE FALSE)
# endif ()
#
# 4. Wrap everything belonging to the feature with the build flag of the feature.
# Ideally this is done around subdirectory inclusions, results in easier code.
# e.g.
#
# if (SHOULD_BUILD_MYFEATURE)
# add_subdirectory(myproduct)
# endif ()
#
# 5. Tag the feature as STAGING, if it is not yet ready for release, but already
# integrated in the master branch, e.g.
#
# calligra_define_product(MYFEATURE "title of feature" STAGING REQUIRES P1 F1)
#
# 6. Add the feature to all products, features and product sets which have this
# product as REQUIRED or OPTIONAL dependency.
#
#
# How to add another productset?
# ==============================
#
# There are two possible places to put a productset definition. The first is to
# add it to this file, which should be done for more generic sets that are
# useful for many people. The second is a file of its own, in the directory
# "cmake/productsets", which should be done for more special ones or for those
# which should not be added to the repository.
# The file must be named with the name of the productset in lowercase and have
# the extension ".cmake".
#
# 1. Define the productset by a call of calligra_define_productset,
# e.g.
#
# calligra_define_productset(MYPRODUCTSET "title of productset")
#
# 2. Extend that call with REQUIRES or OPTIONAL argument sections, if the productset
# has hard or soft internal dependencies on other products, features or
# productsets.
# Products, features or productsets that are listed as dependencies have to
# be defined before
# (see also the API doc in cmake/modules/CalligraProductSetMacros.cmake)
# E.g.
#
# calligra_define_productset(MYPRODUCT "title of product"
# REQUIRES P1 P2 F1 PS1
# OPTIONAL P3 F2 PS2)
#
# 3. Add the productset to all product sets which have this product set as
# REQUIRED or OPTIONAL dependency.
#
# Example for a file-based productset definition:
# You want a productset "MYWORDS". For that you add a file named
# "mywords.cmake" into the directory "cmake/productsets", with the content:
# --- 8< ---
# calligra_define_productset(MYWORDS "My Words"
# REQUIRES
# APP_WORDS
# PLUGIN_DEFAULTTOOLS
# PLUGIN_DOCKERS
# PLUGIN_PATHSHAPES
# PLUGIN_VARIABLES
# PLUGIN_TEXTSHAPE
# PLUGIN_PLUGINSHAPE
# PLUGIN_FORMULASHAPE
# )
# --- 8< ---
diff --git a/doc/stage/menus.docbook b/doc/stage/menus.docbook
index 2044bbe4694..56955589e5b 100644
--- a/doc/stage/menus.docbook
+++ b/doc/stage/menus.docbook
@@ -1,1996 +1,1994 @@
diff --git a/plugins/staging/CMakeLists.txt b/plugins/staging/CMakeLists.txt
index 16f36d78d1f..6881c651c95 100644
--- a/plugins/staging/CMakeLists.txt
+++ b/plugins/staging/CMakeLists.txt
@@ -1,7 +1,3 @@
-if(SHOULD_BUILD_PLUGIN_GOOGLEDOCS)
-# add_subdirectory(googledocs)
-endif()
-
if (SHOULD_BUILD_PLUGIN_THREEDSHAPE)
add_subdirectory(threedshape)
endif ()
diff --git a/plugins/staging/googledocs/CMakeLists.txt b/plugins/staging/googledocs/CMakeLists.txt
deleted file mode 100644
index 07a956939a9..00000000000
--- a/plugins/staging/googledocs/CMakeLists.txt
+++ /dev/null
@@ -1,39 +0,0 @@
-include_directories( ${KOMAIN_INCLUDES} ${KOTEXT_INCLUDES} )
-
-#find_package(Qt4 4.5.0 REQUIRED)
-#INCLUDE(${QT_USE_FILE})
-
-########### next target ###############
-
-set(onlinedocs_RCCS onlineservices.qrc)
-qt4_add_resources(onlinedocs_RCC_SRCS ${onlinedocs_RCCS})
-
-set(calligragoogledocs_PART_SRCS
- onlinedocument.cpp
- googlecontenthandler.cpp
- googledocument.cpp
- googledocumentlist.cpp
- googledocumentservice.cpp
- documentlistwindow.cpp
- loginwindow.cpp
- ${onlinedocs_RCC_SRCS}
-)
-
-kde4_add_ui_files( calligragoogledocs_PART_SRCS
- authenticationdialog.ui
- documentlist.ui
-)
-kde4_add_plugin(calligragoogledocs ${calligragoogledocs_PART_SRCS})
-
-target_link_libraries(calligragoogledocs ${QT_LIBRARIES} komain )
-
-install(TARGETS calligragoogledocs DESTINATION ${PLUGIN_INSTALL_DIR})
-
-
-########### install files ###############
-
-install( FILES googledocs-stage.rc DESTINATION ${DATA_INSTALL_DIR}/stage/kpartplugins)
-install( FILES googledocs-sheets.rc DESTINATION ${DATA_INSTALL_DIR}/sheets/kpartplugins)
-install( FILES googledocs-words.rc DESTINATION ${DATA_INSTALL_DIR}/words/kpartplugins)
-
-
diff --git a/plugins/staging/googledocs/Messages.sh b/plugins/staging/googledocs/Messages.sh
deleted file mode 100755
index d6dd433a284..00000000000
--- a/plugins/staging/googledocs/Messages.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-#! /bin/sh
-source ../../../calligra_xgettext.sh
-
-$EXTRACTRC *.rc *.ui >> rc.cpp
-calligra_xgettext googledocs_plugin.pot *.cpp
-rm -f rc.cpp
diff --git a/plugins/staging/googledocs/authenticationdialog.ui b/plugins/staging/googledocs/authenticationdialog.ui
deleted file mode 100644
index b1c18535cc3..00000000000
--- a/plugins/staging/googledocs/authenticationdialog.ui
+++ /dev/null
@@ -1,141 +0,0 @@
-
-
- Dialog
-
-
-
- 0
- 0
- 449
- 175
-
-
-
- -
-
-
- Username:
-
-
-
- -
-
-
- Provide Username and Password
-
-
- Qt::AlignCenter
-
-
- false
-
-
- Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse
-
-
-
- -
-
-
- @gmail.com
-
-
-
- -
-
-
- Password:
-
-
-
- -
-
-
-
-
-
- Qt::Horizontal
-
-
-
- 40
- 20
-
-
-
-
- -
-
-
- Sign In
-
-
-
-
-
- -
-
-
- Service
-
-
-
- -
-
-
- 0
-
-
- 3282
-
-
- true
-
-
- Qt::Horizontal
-
-
- false
-
-
-
- -
-
-
- -
-
-
-
-
-
-
-
-
- QLineEdit::Password
-
-
-
- -
-
-
- Qt::Vertical
-
-
-
- 20
- 40
-
-
-
-
- -
-
-
- Remember Me
-
-
-
-
-
-
-
-
diff --git a/plugins/staging/googledocs/documentlist.ui b/plugins/staging/googledocs/documentlist.ui
deleted file mode 100644
index 7354879db2e..00000000000
--- a/plugins/staging/googledocs/documentlist.ui
+++ /dev/null
@@ -1,80 +0,0 @@
-
-
- ListDialog
-
-
-
- 0
- 0
- 551
- 292
-
-
-
- Google Document List
-
-
-
-
- 1
- 1
- 551
- 291
-
-
-
-
- 6
-
- -
-
-
- -
-
-
-
-
-
-
- 0
- 0
-
-
-
- Download
-
-
-
- :/images/document-import.png:/images/document-import.png
-
-
- false
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
- Close
-
-
-
- :/images/dialog-cancel.png:/images/dialog-cancel.png
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/plugins/staging/googledocs/documentlistwindow.cpp b/plugins/staging/googledocs/documentlistwindow.cpp
deleted file mode 100644
index f72fbe1809d..00000000000
--- a/plugins/staging/googledocs/documentlistwindow.cpp
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright (c) 2010 Mani Chandrasekar
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-#include "documentlistwindow.h"
-
-#include
-#include
-#include
-
-#include "googledocumentservice.h"
-#include "googledocumentlist.h"
-#include "googledocument.h"
-
-DocumentListWindow::DocumentListWindow(GoogleDocumentService *service, GoogleDocumentList *gList)
- : m_docListDialog(new Ui_ListDialog),
- m_gService(service)
-{
- m_docListDialog->setupUi(this);
- connect(m_docListDialog->listView, SIGNAL(clicked(const QModelIndex &)), this, SLOT(getClickedDocument(const QModelIndex &)));
- connect(m_docListDialog->okButton, SIGNAL(clicked()), this, SLOT(fetchDocument()));
- connect(m_docListDialog->closeButton, SIGNAL(clicked()), this, SLOT(hideDialog()));
-
- m_docListDialog->listView->setModel(gList->documentModel());
- m_docListDialog->listView->hideColumn(1);
- m_docListDialog->listView->setItemsExpandable(false);
- show();
- m_docListDialog->listView->setColumnWidth(0, m_docListDialog->listView->rect().width() * 0.75);
-}
-
-DocumentListWindow::~DocumentListWindow()
-{
- delete m_docListDialog;
-}
-
-void DocumentListWindow::fetchDocument()
-{
- int selectedRow = m_docListDialog->listView->currentIndex().row();
- qDebug() << m_docListDialog->listView->model()->index(selectedRow, 2).data();
- m_gService->downloadDocument(m_docListDialog->listView->model()->index(selectedRow, 1).data().toString(),
- m_docListDialog->listView->model()->index(selectedRow, 2).data().toString());
- m_docListDialog->okButton->setEnabled(false);
-}
-
-void DocumentListWindow::getClickedDocument( const QModelIndex & index)
-{
- Q_UNUSED(index);
-}
-
-QString DocumentListWindow::currentDocument()
-{
- int selectedRow = m_docListDialog->listView->currentIndex().row();
- QString name = m_docListDialog->listView->model()->index(selectedRow, 0).data().toString();
- QString type = m_docListDialog->listView->model()->index(selectedRow, 2).data().toString();
- QString ext;
-
- if (QString::compare(type, "document", Qt::CaseInsensitive) == 0 ) {
- ext = ".odt";
- } else if (QString::compare(type, "spreadsheet", Qt::CaseInsensitive) == 0 ) {
- ext = ".ods";
- } else if (QString::compare(type, "presentation", Qt::CaseInsensitive) == 0 ) {
- ext = ".ppt";
- }
-
- return (name + ext);
-}
-
-void DocumentListWindow::hideDialog()
-{
- m_docListDialog->okButton->setEnabled(true);
- hide();
-}
diff --git a/plugins/staging/googledocs/documentlistwindow.h b/plugins/staging/googledocs/documentlistwindow.h
deleted file mode 100644
index 149598dbcd3..00000000000
--- a/plugins/staging/googledocs/documentlistwindow.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 2010 Mani Chandrasekar
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-#ifndef DOCUMENTLISTWINDOW_H
-#define DOCUMENTLISTWINDOW_H
-
-#include
-
-#include "ui_documentlist.h"
-
-class GoogleDocumentService;
-class GoogleDocument;
-class GoogleDocumentList;
-
-class DocumentListWindow : public QDialog
-{
- Q_OBJECT
-
-public:
- DocumentListWindow(GoogleDocumentService *service, GoogleDocumentList *gList);
- ~DocumentListWindow();
- QString currentDocument();
-
-public Q_SLOTS:
- void hideDialog();
-
-private Q_SLOTS:
- void getClickedDocument(const QModelIndex & index);
- void fetchDocument();
-
-private:
- Ui_ListDialog *m_docListDialog;
- GoogleDocumentService *m_gService;
-};
-
-#endif // DOCUMENTLISTWINDOW_H
diff --git a/plugins/staging/googledocs/googlecontenthandler.cpp b/plugins/staging/googledocs/googlecontenthandler.cpp
deleted file mode 100644
index fe27cdfa355..00000000000
--- a/plugins/staging/googledocs/googlecontenthandler.cpp
+++ /dev/null
@@ -1,166 +0,0 @@
-/*
- * Copyright (c) 2010 Mani Chandrasekar
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-
-#include "googledocumentlist.h"
-#include "googledocument.h"
-#include "googlecontenthandler.h"
-#include
-
-GoogleContentHandler::GoogleContentHandler()
- : m_docList(0),
- m_docEntry(0)
-{
- m_docList = new GoogleDocumentList();
-}
-
-GoogleContentHandler::~GoogleContentHandler()
-{
- delete m_docList;
-}
-
-bool GoogleContentHandler::characters ( const QString & ch )
-{
- if (!insideEntry) {
- if (QString::compare(m_nodeStack.top(), "title", Qt::CaseInsensitive) == 0) {
- if (m_nodeStack.count() == 2)
- m_docList->setTitle(ch);
- }
- else if (QString::compare(m_nodeStack.top(), "name", Qt::CaseInsensitive) == 0) {
- if (m_nodeStack.count() == 3)
- m_docList->setAuthor(ch);
- }
- else if (QString::compare(m_nodeStack.top(), "email", Qt::CaseInsensitive) == 0) {
- if (m_nodeStack.count() == 3)
- m_docList->setEmail(ch);
- }
- }
- else
- {
- if (m_docEntry == 0)
- return true;
-
- if (QString::compare(m_nodeStack.top(), "title", Qt::CaseInsensitive) == 0) {
- m_docEntry->setTitle(ch);
- }
- else if (QString::compare(m_nodeStack.top(), "name", Qt::CaseInsensitive) == 0) {
- m_docEntry->setAuthor(ch);
- }
- else if (QString::compare(m_nodeStack.top(), "resourceId", Qt::CaseInsensitive) == 0) {
- m_docEntry->setId(ch);
- }
- }
- return true;
-}
-
-bool GoogleContentHandler::endDocument ()
-{
-// qDebug() << "GoogleContentHandler::endDocument()";
- return true;
-}
-
-bool GoogleContentHandler::endElement ( const QString & /*namespaceURI*/, const QString & /*localName*/, const QString & /*qName */)
-{
-// printName(localName);
- QString element = m_nodeStack.pop();
- if (QString::compare(element, "entry") == 0) {
- insideEntry = false;
- m_docList->append(m_docEntry);
- m_docEntry = 0;
- }
- return true;
-}
-
-bool GoogleContentHandler::endPrefixMapping ( const QString & /*prefix */)
-{
- return true;
-}
-
-QString GoogleContentHandler::errorString () const
-{
- return QString();
-}
-
-bool GoogleContentHandler::ignorableWhitespace ( const QString & /*ch */)
-{
- return true;
-}
-
-bool GoogleContentHandler::processingInstruction ( const QString & /*target*/, const QString & /*data */)
-{
- return true;
-}
-
-void GoogleContentHandler::setDocumentLocator ( QXmlLocator * /*locator*/ )
-{
-}
-
-bool GoogleContentHandler::skippedEntity ( const QString & /*name*/ )
-{
- return true;
-}
-
-bool GoogleContentHandler::startDocument ()
-{
- return true;
-}
-
-bool GoogleContentHandler::startElement ( const QString & /*namespaceURI*/, const QString & localName,
- const QString & /*qName*/, const QXmlAttributes & atts )
-{
- m_nodeStack.push(localName);
-
- if ((m_nodeStack.count() == 1) && (m_docList != 0)) { //Feed element
- m_docList->setEtag(atts.value("gd:etag"));
- }
-
- if (QString::compare(localName, "entry", Qt::CaseInsensitive) == 0 ) {
- m_docEntry = new GoogleDocument();
- m_docEntry->setEtag(atts.value("gd:etag"));
- insideEntry = true;
- }
- if ( insideEntry && (m_docEntry != 0)) {
- if (QString::compare(localName, "content", Qt::CaseInsensitive) == 0 ) {
- m_docEntry->setDocumentUrl(atts.value("src"));
- } else if ((QString::compare(localName, "category", Qt::CaseInsensitive) == 0 ) &&
- QString::compare(atts.value("scheme"), "http://schemas.google.com/g/2005#kind", Qt::CaseInsensitive) == 0){
- m_docEntry->setDocumentType(atts.value("label"));
- }
- }
-
-// printName(localName);
- return true;
-}
-
-bool GoogleContentHandler::startPrefixMapping ( const QString & /*prefix*/, const QString & /*uri */)
-{
- //qDebug() << "GoogleContentHandler::startPrefixMapping() " << prefix << uri;
- return true;
-}
-
-void GoogleContentHandler::printName(const QString & name)
-{
- int count = m_nodeStack.count();
- QString indent;
- for (int i=0; i < count; i++)
- indent.append("\t");
- indent.append(name);
-
- if (insideEntry)
- qDebug() << indent;
-}
diff --git a/plugins/staging/googledocs/googlecontenthandler.h b/plugins/staging/googledocs/googlecontenthandler.h
deleted file mode 100644
index 6bcce67efba..00000000000
--- a/plugins/staging/googledocs/googlecontenthandler.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 2010 Mani Chandrasekar
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-#ifndef GOOGLECONTENTHANDLER_H
-#define GOOGLECONTENTHANDLER_H
-
-#include
-#include
-
-class GoogleDocumentList;
-class GoogleDocument;
-
-class GoogleContentHandler : public QXmlContentHandler
-{
-public:
- GoogleContentHandler();
- virtual ~GoogleContentHandler();
-
- virtual bool characters ( const QString & ch );
- virtual bool endDocument ();
- virtual bool endElement ( const QString & namespaceURI, const QString & localName, const QString & qName );
- virtual bool endPrefixMapping ( const QString & prefix );
- virtual QString errorString () const;
- virtual bool ignorableWhitespace ( const QString & ch );
- virtual bool processingInstruction ( const QString & target, const QString & data );
- virtual void setDocumentLocator ( QXmlLocator * locator );
- virtual bool skippedEntity ( const QString & name );
- virtual bool startDocument ();
- virtual bool startElement ( const QString & namespaceURI, const QString & localName, const QString & qName, const QXmlAttributes & atts );
- virtual bool startPrefixMapping ( const QString & prefix, const QString & uri );
-
- GoogleDocumentList *documentList() { return m_docList; }
-
-private:
- QStack m_nodeStack;
- bool insideEntry;
- GoogleDocumentList *m_docList;
- GoogleDocument *m_docEntry;
-
- void printName(const QString & name);
-};
-
-#endif // GOOGLECONTENTHANDLER_H
diff --git a/plugins/staging/googledocs/googledocs-sheets.rc b/plugins/staging/googledocs/googledocs-sheets.rc
deleted file mode 100644
index 209c84a9d21..00000000000
--- a/plugins/staging/googledocs/googledocs-sheets.rc
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
diff --git a/plugins/staging/googledocs/googledocs-stage.rc b/plugins/staging/googledocs/googledocs-stage.rc
deleted file mode 100644
index 209c84a9d21..00000000000
--- a/plugins/staging/googledocs/googledocs-stage.rc
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
diff --git a/plugins/staging/googledocs/googledocs-words.rc b/plugins/staging/googledocs/googledocs-words.rc
deleted file mode 100644
index 209c84a9d21..00000000000
--- a/plugins/staging/googledocs/googledocs-words.rc
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
diff --git a/plugins/staging/googledocs/googledocument.cpp b/plugins/staging/googledocs/googledocument.cpp
deleted file mode 100644
index 6b0bc42dd79..00000000000
--- a/plugins/staging/googledocs/googledocument.cpp
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright (c) 2010 Mani Chandrasekar
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-#include "googledocument.h"
-
-GoogleDocument::GoogleDocument()
-{
-}
-
-void GoogleDocument::setEtag(const QString & etag)
-{
- m_etag = etag;
-}
-
-QString GoogleDocument::etag () const
-{
- return m_etag;
-}
-
-void GoogleDocument::setId (const QString & id)
-{
- m_id = id;
-
- setDocumentType(id.left(id.indexOf(':')));
-}
-
-QString GoogleDocument::id () const
-{
- return m_id;
-}
-
-void GoogleDocument::setTitle (const QString & title)
-{
- m_title = title;
-}
-
-QString GoogleDocument::title () const
-{
- return m_title;
-}
-
-void GoogleDocument::setAuthor (const QString & author)
-{
- m_author = author;
-}
-
-QString GoogleDocument::author () const
-{
- return m_author;
-}
-
-void GoogleDocument::setDocumentType (const QString & docType)
-{
- m_docType = docType;
-}
-
-QString GoogleDocument::documentType () const
-{
- return m_docType;
-}
-
-void GoogleDocument::setDocumentUrl (const QString & url)
-{
- m_documetUrl = url;
-}
-
-QString GoogleDocument::documentUrl () const
-{
- return m_documetUrl;
-}
-
diff --git a/plugins/staging/googledocs/googledocument.h b/plugins/staging/googledocs/googledocument.h
deleted file mode 100644
index 88b4aaa706d..00000000000
--- a/plugins/staging/googledocs/googledocument.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 2010 Mani Chandrasekar
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-#ifndef GOOGLEDOCUMENT_H
-#define GOOGLEDOCUMENT_H
-
-#include
-
-class GoogleDocument : public QObject
-{
- Q_OBJECT
-
-public:
- GoogleDocument();
-
- void setEtag(const QString & etag);
- QString etag () const;
-
- void setId (const QString & id);
- QString id () const;
-
- void setTitle (const QString & title);
- QString title () const;
-
- void setAuthor (const QString & author);
- QString author () const;
-
- void setDocumentType (const QString & docType);
- QString documentType () const;
-
- void setDocumentUrl (const QString & url);
- QString documentUrl () const;
-
-private:
- QString m_etag;
- QString m_id;
- QString m_title;
- QString m_author;
- QString m_docType;
- QString m_documetUrl;
-};
-
-#endif // GOOGLEDOCUMENT_H
diff --git a/plugins/staging/googledocs/googledocumentlist.cpp b/plugins/staging/googledocs/googledocumentlist.cpp
deleted file mode 100644
index 40b7eceb963..00000000000
--- a/plugins/staging/googledocs/googledocumentlist.cpp
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Copyright (c) 2010 Mani Chandrasekar
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-#include "googledocumentlist.h"
-#include "googledocument.h"
-
-GoogleDocumentList::GoogleDocumentList()
-{
- docModel = new QStandardItemModel(0, 3);
- docModel->setHeaderData(0, Qt::Horizontal, "FileName");
- docModel->setHeaderData(2, Qt::Horizontal, "Type");
-}
-
-void GoogleDocumentList::setEtag(const QString &etag)
-{
- m_etag = etag;
-}
-
-QString GoogleDocumentList::etag ()
-{
- return m_etag;
-}
-
-void GoogleDocumentList::setEmail (const QString &email)
-{
- m_email = email;
-}
-
-QString GoogleDocumentList::email ()
-{
- return m_email;
-}
-
-void GoogleDocumentList::setTitle (const QString &title)
-{
- m_title = title;
-}
-
-QString GoogleDocumentList::title ()
-{
- return m_title;
-}
-
-void GoogleDocumentList::setAuthor (const QString &author)
-{
- m_author = author;
-}
-
-QString GoogleDocumentList::author ()
-{
- return m_author;
-}
-
-void GoogleDocumentList::append(GoogleDocument *entry)
-{
- if (entry != 0 ) {
- QString iconPath;
- if (QString::compare(entry->documentType(), "document", Qt::CaseInsensitive) == 0) {
- iconPath = ":/images/document.png";
- } else if (QString::compare(entry->documentType(), "spreadsheet", Qt::CaseInsensitive) == 0) {
- iconPath = ":/images/spreadsheet.png";
- } else if (QString::compare(entry->documentType(), "presentation", Qt::CaseInsensitive) == 0) {
- iconPath = ":/images/presentation.png";
- } else {
- delete entry;
- return;
- }
-
- int rows = docModel->rowCount();
- docModel->insertRows(rows, 1, QModelIndex());
- docModel->setData(docModel->index(rows, 0, QModelIndex()), entry->title());
- docModel->setData(docModel->index(rows, 0, QModelIndex()),
- QPixmap(iconPath),
- Qt::DecorationRole);
- docModel->setData(docModel->index(rows, 1, QModelIndex()), entry->documentUrl());
- docModel->setData(docModel->index(rows, 2, QModelIndex()), entry->documentType().toUpper());
- }
-}
-
-int GoogleDocumentList::documentsCount()
-{
- return docModel->rowCount();
-}
diff --git a/plugins/staging/googledocs/googledocumentlist.h b/plugins/staging/googledocs/googledocumentlist.h
deleted file mode 100644
index a9299148fb4..00000000000
--- a/plugins/staging/googledocs/googledocumentlist.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (c) 2010 Mani Chandrasekar
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-#ifndef GOOGLEDOCUMENTLIST_H
-#define GOOGLEDOCUMENTLIST_H
-
-#include
-#include
-#include
-
-class GoogleDocument;
-
-class GoogleDocumentList : public QObject
-{
- Q_OBJECT
-
-public:
- GoogleDocumentList();
-
- void setEtag(const QString &etag);
- QString etag ();
-
- void setEmail (const QString &email);
- QString email ();
-
- void setTitle (const QString &title);
- QString title ();
-
- void setAuthor (const QString &author);
- QString author ();
-
- void append(GoogleDocument *entry);
- int documentsCount();
-
- QList entries ();
-
- QStandardItemModel * documentModel() { return docModel; }
-
-private:
- QString m_author;
- QString m_email;
- QString m_title;
- QString m_etag;
-
- QList m_entries;
-
- QStandardItemModel *docModel;
-};
-
-#endif // GOOGLEDOCUMENTLIST_H
diff --git a/plugins/staging/googledocs/googledocumentservice.cpp b/plugins/staging/googledocs/googledocumentservice.cpp
deleted file mode 100644
index e8d377a78c3..00000000000
--- a/plugins/staging/googledocs/googledocumentservice.cpp
+++ /dev/null
@@ -1,226 +0,0 @@
-/*
- * Copyright (c) 2010 Mani Chandrasekar
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-#include
-
-#include "googledocumentservice.h"
-#include "googledocumentlist.h"
-#include "googledocument.h"
-#include "googlecontenthandler.h"
-
-#include
-#include
-#include
-#include
-#include
-#include
-
-GoogleDocumentService::GoogleDocumentService(OnlineDocument::DocumentType type)
- : newInformation(true)
- , waitingForDoc(false)
- , haveDocAuthToken(false)
- , documentList(0)
- , loggedin(false)
- , m_type(type)
-{
- //QNetworkProxy::setApplicationProxy(QNetworkProxy(QNetworkProxy::HttpProxy, "proxy.jf.intel.com", 911));
- connect(&networkManager, SIGNAL(finished(QNetworkReply*)),
- this, SLOT(handleNetworkData(QNetworkReply*)));
-
- gHandler = new GoogleContentHandler();
- xmlReader.setContentHandler(gHandler);
-}
-
-GoogleDocumentService::~GoogleDocumentService()
-{
- delete documentList;
- documentList = 0;
-
- delete gHandler;
- gHandler = 0;
-}
-
-void GoogleDocumentService::clientLogin(const QString & username, const QString & password)
-{
- QByteArray data;
- data.append(QString("accountType=HOSTED_OR_GOOGLE&Email=" + username + "&Passwd=" + password).toUtf8());
-
- if(!haveDocAuthToken) {
- data.append(QString("&service=writely&source=Calligrav2").toUtf8());
- this->username = username;
- this->password = password;
- } else {
- data.append(QString("&service=wise&source=Calligrav2").toUtf8());
- }
-
- QNetworkRequest req(QUrl("https://www.google.com/accounts/ClientLogin"));
- req.setRawHeader("Host", "www.google.com");
- req.setRawHeader("GData-Version", "3.0");
- req.setRawHeader("Content-Type", "application/x-www-form-urlencoded");
- req.setHeader(QNetworkRequest::ContentLengthHeader, data.length());
-
- networkManager.post(req, data);
-}
-
-void GoogleDocumentService::listDocuments()
-{
- authToken = docAuthToken;
- QString url;
- switch (m_type) {
- case OnlineDocument::WORDS:
- url = "https://docs.google.com/feeds/default/private/full/-/document";
- break;
- case OnlineDocument::STAGE:
- url = "https://docs.google.com/feeds/default/private/full/-/presentation";
- break;
- case OnlineDocument::SHEETS:
- url = "https://docs.google.com/feeds/default/private/full/-/spreadsheet";
- break;
- }
-
- QNetworkRequest requestHeader(QUrl(url.toUtf8()));
- requestHeader.setRawHeader("Host", "docs.google.com");
- requestHeader.setRawHeader("User-Agent", "Calligra");
- requestHeader.setRawHeader("GData-Version", "3.0");
- requestHeader.setRawHeader("Content-Type", "application/atom+xml");
- requestHeader.setRawHeader("Authorization", authToken.toUtf8());
-
- networkManager.get(requestHeader);
- emit progressUpdate("Successfully authenticated!!! Retreiving document list...");
-}
-
-void GoogleDocumentService::handleNetworkData(QNetworkReply *networkReply)
-{
- if (!networkReply->error()) {
- if (!loggedin) {
- QString text(networkReply->readAll());
- text = text.right(text.length() - text.indexOf("Auth=") - 5);
- authToken = QString("GoogleLogin auth=") + text.left(text.indexOf('\n'));
- if(authToken.length() > 20) {
- if(!haveDocAuthToken) {
- docAuthToken = authToken;
- haveDocAuthToken = true;
- qDebug() << "Received Doc token = " << docAuthToken;
- clientLogin(this->username, this->password);
- return;
- }
- spreadAuthToken = authToken;
- authToken.clear();
- loggedin = true;
- qDebug() << "Received Spreadsheet token = " << spreadAuthToken;
- listDocuments();
- emit userAuthenticated(loggedin, "");
- }
- }
- else if (waitingForDoc) {
- QByteArray data = networkReply->readAll();
- QFile file(QDir::tempPath() + QLatin1Char('/') + documentList->currentDocument());
- file.open(QIODevice::ReadWrite);
- file.write(data);
- file.close();
- qDebug() << "Received Document!!!!! " << file.fileName();
- emit receivedDocument(file.fileName());
- waitingForDoc = false;
- showDocumentListWindow(false);
- }
- else {
- QByteArray bytAry = networkReply->readAll();
-// qDebug() << bytAry;
-
-// xmlInput.setData(networkReply->readAll());
- xmlInput.setData(bytAry);
- qDebug() << "Part received.........";
- if (newInformation) {
- emit progressUpdate("Parsing document list...");
- newInformation = xmlReader.parse(&xmlInput, true);
- qDebug() << "New Information = " << newInformation;
-// newInformation = false;
- getDocument();
- }
- }
- } else {
- QString errorString(networkReply->readAll());
- qDebug() << "Error occurred !!!! " << errorString;
- errorString = errorString.right(errorString.length() - errorString.indexOf("Error=") - 6);
- if (!loggedin) {
- emit userAuthenticated(loggedin, errorString);
- } else {
- QMessageBox msgBox(QMessageBox::Information, i18n("Online Document Services"),
- "Error occurred !!!! " + errorString);
- msgBox.exec();
- }
- }
-}
-
-void GoogleDocumentService::getDocument()
-{
- if(gHandler->documentList()->documentsCount() > 0) {
- emit showingDocumentList();
- documentList = new DocumentListWindow(this, gHandler->documentList());
- }
- else {
- QMessageBox msgBox(QMessageBox::Information, i18n("Online Document Services"), i18n("No Documents Found !!!"));
- msgBox.exec();
- }
-}
-
-void GoogleDocumentService::downloadDocument(const QString & _url, const QString & _type)
-{
- authToken = docAuthToken;
- QString url = _url;
- QString type = _type;
- url.replace("docId", "docID", Qt::CaseInsensitive);
- QString exportFormat;
-
- if(QString::compare(type, "spreadsheet", Qt::CaseInsensitive) == 0) {
- exportFormat = "&exportFormat=ods&format=ods";
- authToken = spreadAuthToken;
- } else if(QString::compare(type, "presentation", Qt::CaseInsensitive) == 0) {
- exportFormat = "&exportFormat=ppt&format=ppt";
- }
- else if(QString::compare(type, "document", Qt::CaseInsensitive) == 0) {
- exportFormat = "&exportFormat=odt&format=odt";
- }
-
- qDebug() << "URL = " << url + exportFormat;
- QUrl documentUrl(url + exportFormat);
-
- QNetworkRequest requestHeader(documentUrl);
- requestHeader.setRawHeader("User-Agent", "Calligra");
- requestHeader.setRawHeader("GData-Version", "3.0");
- requestHeader.setRawHeader("Authorization", authToken.toUtf8());
-
- QList headerlist = requestHeader.rawHeaderList();
- foreach (const QByteArray &element, headerlist)
- qDebug() << element << requestHeader.rawHeader(element);
-
- networkManager.get(requestHeader);
-
- waitingForDoc = true;
-
-}
-
-void GoogleDocumentService::showDocumentListWindow(bool visible)
-{
- if (visible) {
- if (documentList)
- documentList->show();
- } else {
- documentList->hideDialog();
- }
-}
diff --git a/plugins/staging/googledocs/googledocumentservice.h b/plugins/staging/googledocs/googledocumentservice.h
deleted file mode 100644
index db1f9189c0d..00000000000
--- a/plugins/staging/googledocs/googledocumentservice.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright (c) 2010 Mani Chandrasekar
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-#ifndef GOOGLEDOCUMENTSERVICE_H
-#define GOOGLEDOCUMENTSERVICE_H
-
-#include
-#include
-#include
-
-#include "onlinedocument.h"
-#include "documentlistwindow.h"
-
-class GoogleDocument;
-class GoogleContentHandler;
-class DocumentListWindow;
-
-class GoogleDocumentService : public QObject
-{
- Q_OBJECT
-
-public:
- explicit GoogleDocumentService(OnlineDocument::DocumentType type);
- virtual ~GoogleDocumentService();
- void clientLogin(const QString & username, const QString & password);
- void getDocument();
- void downloadDocument (const QString & url, const QString & type);
- bool alreadyAuthenticated() { return loggedin; }
- void showDocumentListWindow(bool visible);
-
-Q_SIGNALS:
- void receivedDocument(QString path);
- void userAuthenticated(bool success, QString error);
- void progressUpdate(const QString &msg);
- void showingDocumentList();
-
-private Q_SLOTS:
- void handleNetworkData(QNetworkReply *networkReply);
-
-private:
- void listDocuments();
-
- QXmlSimpleReader xmlReader;
- QXmlInputSource xmlInput;
- bool newInformation;
- bool waitingForDoc;
- bool haveDocAuthToken;
- GoogleContentHandler *gHandler;
- QString authToken;
- DocumentListWindow *documentList;
- QString docAuthToken;
- QString spreadAuthToken;
- QString username;
- QString password;
- QNetworkAccessManager networkManager;
- bool loggedin;
- OnlineDocument::DocumentType m_type;
-};
-
-#endif // GOOGLEDOCUMENTSERVICE_H
diff --git a/plugins/staging/googledocs/images/dialog-cancel.png b/plugins/staging/googledocs/images/dialog-cancel.png
deleted file mode 100644
index edc89a82dda..00000000000
Binary files a/plugins/staging/googledocs/images/dialog-cancel.png and /dev/null differ
diff --git a/plugins/staging/googledocs/images/document-import.png b/plugins/staging/googledocs/images/document-import.png
deleted file mode 100644
index 0453157b06f..00000000000
Binary files a/plugins/staging/googledocs/images/document-import.png and /dev/null differ
diff --git a/plugins/staging/googledocs/images/document.png b/plugins/staging/googledocs/images/document.png
deleted file mode 100644
index 8d7b377a561..00000000000
Binary files a/plugins/staging/googledocs/images/document.png and /dev/null differ
diff --git a/plugins/staging/googledocs/images/presentation.png b/plugins/staging/googledocs/images/presentation.png
deleted file mode 100644
index d2a21d90023..00000000000
Binary files a/plugins/staging/googledocs/images/presentation.png and /dev/null differ
diff --git a/plugins/staging/googledocs/images/spreadsheet.png b/plugins/staging/googledocs/images/spreadsheet.png
deleted file mode 100644
index 9f8c807ebeb..00000000000
Binary files a/plugins/staging/googledocs/images/spreadsheet.png and /dev/null differ
diff --git a/plugins/staging/googledocs/loginwindow.cpp b/plugins/staging/googledocs/loginwindow.cpp
deleted file mode 100644
index d1bf86601b7..00000000000
--- a/plugins/staging/googledocs/loginwindow.cpp
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
- * Copyright (c) 2010 Mani Chandrasekar
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-#include "loginwindow.h"
-#include "googledocumentservice.h"
-#include "documentlistwindow.h"
-
-#include
-
-#include
-
-#include
-
-
-LoginWindow::LoginWindow(OnlineDocument::DocumentType type, QWidget *parent)
- : QDialog(parent),
- m_type(type),
- m_authDialog(new Ui_Dialog),
- m_wallet(0)
-{
- m_authDialog->setupUi(this);
-
- QStringList onlineServices;
- onlineServices << "Google Documents";
- // Add services here
- m_authDialog->comboBox->addItems(onlineServices);
-
- connect(m_authDialog->loginButton, SIGNAL(clicked()), this, SLOT(loginService()));
- connect(m_authDialog->comboBox, SIGNAL(activated(int)), this, SLOT(serviceSelected(int)));
-
- const QString settingsGroup = "Google-Documents";
- KConfigGroup interface = KoGlobal::calligraConfig()->group(settingsGroup);
- if (interface.exists()) {
- QString userName = interface.readEntry("userEmailId", "");
- if (!userName.isEmpty()) {
- m_authDialog->userEdit->setText(userName);
-
- QString password;
- if (wallet()) {
- wallet()->readPassword(QString("%1-%2").arg(settingsGroup).arg(userName), password);
- }
-
- if (!password.isEmpty()) {
- m_authDialog->passwordEdit->setText(password);
- }
- }
- }
-
- m_authDialog->userEdit->setFocus();
- showProgressIndicator(false);
- setWindowTitle("Online Document Services");
- show();
-}
-
-LoginWindow::~LoginWindow()
-{
- delete m_authDialog;
- delete m_wallet;
-}
-
-void LoginWindow::loginService()
-{
- if (m_authDialog->saveUserDetails->isChecked()) {
- saveUserDetails();
- }
-
- if (0 == m_authDialog->comboBox->currentIndex()) {
- gdoc = new GoogleDocumentService(m_type);
- showProgressIndicator(true);
- m_authDialog->headerLabel->setText("Signing in...");
- gdoc->clientLogin(m_authDialog->userEdit->text(), m_authDialog->passwordEdit->text());
- connect(gdoc, SIGNAL(userAuthenticated(bool, QString)), this, SLOT(authenticated(bool, QString)));
- connect(gdoc, SIGNAL(progressUpdate(QString)), this, SLOT(updateProgress(QString)));
- connect(gdoc, SIGNAL(showingDocumentList()), this, SLOT(accept()));
- }
-}
-
-void LoginWindow::saveUserDetails()
-{
- const QString settingsGroup = "Google-Documents";
- KConfigGroup interface = KoGlobal::calligraConfig()->group(settingsGroup);
- interface.writeEntry("userEmailId", m_authDialog->userEdit->text());
-
- if (wallet()) {
- wallet()->writePassword(QString("%1-%2").arg(settingsGroup).arg(m_authDialog->userEdit->text()),
- m_authDialog->passwordEdit->text());
- }
-}
-
-void LoginWindow::serviceSelected(int index)
-{
- Q_UNUSED(index);
-// if (index == 0) {
-// m_authDialog->documentBox->setVisible(true);
-// m_authDialog->presentationBox->setVisible(true);
-// m_authDialog->spreadsheetBox->setVisible(true);
-// } else if (index == 1) {
-// m_authDialog->documentBox->setVisible(false);
-// m_authDialog->presentationBox->setVisible(true);
-// m_authDialog->spreadsheetBox->setVisible(false);
-// }
-}
-
-void LoginWindow::authenticated(bool success, QString errorString)
-{
- if (success) {
-// showProgressIndicator(false);
-// m_authDialog->label->setText("Successfully authenticated!!! Retreiving document list...");
-// accept();
- } else {
- QString msg = "Error occurred while signing in ";
- if (!errorString.isEmpty()) {
- msg = msg + "- " + errorString;
- }
- m_authDialog->headerLabel->setText(msg);
- showProgressIndicator(false);
- }
-}
-
-void LoginWindow::showProgressIndicator(bool visible)
-{
- m_authDialog->progressBar->setVisible(visible);
-}
-
-void LoginWindow::updateProgress(QString msg)
-{
- m_authDialog->headerLabel->setText(msg);
-}
-
-KWallet::Wallet *LoginWindow::wallet()
-{
- if (!m_wallet) {
- m_wallet = KWallet::Wallet::openWallet(KWallet::Wallet::NetworkWallet(), winId());
- connect(m_wallet, SIGNAL(walletClosed()), this, SLOT(closeWallet()));
- }
- return m_wallet;
-}
-
-void LoginWindow::closeWallet()
-{
- delete m_wallet;
- m_wallet = 0;
-}
diff --git a/plugins/staging/googledocs/loginwindow.h b/plugins/staging/googledocs/loginwindow.h
deleted file mode 100644
index a96abbfef5f..00000000000
--- a/plugins/staging/googledocs/loginwindow.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright (c) 2010 Mani Chandrasekar
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-#ifndef LOGINWINDOW_H
-#define LOGINWINDOW_H
-
-#include
-
-#include
-
-#include "ui_authenticationdialog.h"
-
-class GoogleDocumentService;
-
-namespace KWallet {
- class Wallet;
-}
-
-class LoginWindow : public QDialog
-{
- Q_OBJECT
-
-public:
- explicit LoginWindow(OnlineDocument::DocumentType docType, QWidget *parent = 0);
- ~LoginWindow();
- GoogleDocumentService * googleService() { return gdoc; }
- void showProgressIndicator(bool visible);
-
-private Q_SLOTS:
- void loginService();
- void serviceSelected(int index);
- void authenticated(bool success, QString errorString);
- void updateProgress(QString msg);
- void closeWallet();
-
-private:
- OnlineDocument::DocumentType m_type;
- Ui_Dialog *m_authDialog;
- GoogleDocumentService *gdoc;
- KWallet::Wallet *m_wallet;
-
- void saveUserDetails();
- KWallet::Wallet *wallet();
-};
-
-#endif // LOGINWINDOW_H
diff --git a/plugins/staging/googledocs/onlinedocument.cpp b/plugins/staging/googledocs/onlinedocument.cpp
deleted file mode 100644
index d6d08727a9a..00000000000
--- a/plugins/staging/googledocs/onlinedocument.cpp
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * Copyright (c) 2010 Mani Chandrasekar
- * Copyright (c) 2012 Gopalakrishna Bhat A
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-#include
-#include
-#include
-#include
-
-#include "loginwindow.h"
-#include "googledocumentservice.h"
-
-K_PLUGIN_FACTORY(OnlineDocumentFactory, registerPlugin();)
-K_EXPORT_PLUGIN(OnlineDocumentFactory("googledocs_plugin"))
-
-OnlineDocument::OnlineDocument(QObject *parent, const QVariantList &)
- : KoParts::Plugin(parent)
- , m_login(0)
-{
- setComponentData(OnlineDocumentFactory::componentData());
-
- KAction *action = new KAction(i18n("&Google Online Document..."), this);
- actionCollection()->addAction("google_docs", action );
- connect(action, SIGNAL(triggered(bool)), SLOT(slotOnlineDocument()));
-
- const KAboutData *about = KCmdLineArgs::aboutData();
- m_type = OnlineDocument::UNKNOWN; // default
- if (about) {
- QString name = about->appName();
-
- if (name.contains("words")) {
- m_type = OnlineDocument::WORDS;
- } else if (name.contains("stage")) {
- m_type = OnlineDocument::STAGE;
- } else if (name.contains("sheets")) {
- m_type = OnlineDocument::SHEETS;
- }
- }
-}
-
-OnlineDocument::~OnlineDocument()
-{
- delete m_login;
-}
-
-void OnlineDocument::slotOnlineDocument()
-{
- if (!m_login) {
- m_login = new LoginWindow(m_type);
- if (QDialog::Accepted == m_login->exec()) {
- connect(m_login->googleService(), SIGNAL(receivedDocument(QString)), this,
- SLOT(receivedOnlineDocument(QString )));
- } else {
- delete m_login;
- m_login = 0;
- }
- } else {
- GoogleDocumentService *service = m_login->googleService();
- if (service) {
- service->showDocumentListWindow(true);
- } else {
- m_login->show();
- m_login->activateWindow();
- m_login->raise();
- }
- }
-}
-
-void OnlineDocument::receivedOnlineDocument(QString path)
-{
- KoView *view = dynamic_cast(parent());
- if (!view) {
- return;
- }
- KUrl url;
- url.setPath(path);
- view->shell()->openDocument(url);
-}
-#include
diff --git a/plugins/staging/googledocs/onlinedocument.h b/plugins/staging/googledocs/onlinedocument.h
deleted file mode 100644
index bdf7666bdd2..00000000000
--- a/plugins/staging/googledocs/onlinedocument.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 2010 Mani Chandrasekar
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-#ifndef ONLINEDOCUMENT_H
-#define ONLINEDOCUMENT_H
-
-#include
-
-class LoginWindow;
-
-class OnlineDocument : public KoParts::Plugin
-{
- Q_OBJECT
-public:
- enum DocumentType {
- WORDS,
- STAGE,
- SHEETS,
- UNKNOWN
- };
-
- OnlineDocument(QObject *parent, const QVariantList &);
- virtual ~OnlineDocument();
-
-private Q_SLOTS:
- void slotOnlineDocument();
- void receivedOnlineDocument(QString path);
-
-private:
- LoginWindow *m_login;
- DocumentType m_type;
-};
-
-#endif
diff --git a/plugins/staging/googledocs/onlineservices.qrc b/plugins/staging/googledocs/onlineservices.qrc
deleted file mode 100644
index 9c329242068..00000000000
--- a/plugins/staging/googledocs/onlineservices.qrc
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
- images/document.png
- images/presentation.png
- images/spreadsheet.png
- images/dialog-cancel.png
- images/document-import.png
-
-