diff --git a/CMakeLists.txt b/CMakeLists.txt index ab4e3a4e1ad..b705b4ba0e4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,1218 +1,1206 @@ cmake_minimum_required(VERSION 2.8.12) project(calligra) message(STATUS "Using CMake version: ${CMAKE_VERSION}") if (POLICY CMP0002) cmake_policy(SET CMP0002 OLD) endif() if (POLICY CMP0017) cmake_policy(SET CMP0017 NEW) endif () if (POLICY CMP0022) cmake_policy(SET CMP0022 OLD) endif () if (POLICY CMP0026) cmake_policy(SET CMP0026 OLD) endif() if (POLICY CMP0046) cmake_policy(SET CMP0046 OLD) endif () if (POLICY CMP0059) cmake_policy(SET CMP0059 OLD) endif() if (POLICY CMP0063) cmake_policy(SET CMP0063 NEW) endif() # ensure out-of-source build string(COMPARE EQUAL "${CMAKE_SOURCE_DIR}" "${CMAKE_BINARY_DIR}" isBuildInSource) if(isBuildInSource) message(FATAL_ERROR "Compiling Calligra inside the source folder is not possible.\nPlease refer to the build instruction: https://community.kde.org/Calligra/Building/3\nYou need to clean up the source folder from all build artifacts just created, otherwise further building attempts will fail again: With a git repo, you can use \"git clean -df\" in the toplevel source folder (attention! will remove also uncommited changes to the source code). With sources from a file bundle (like a zip file), delete the source folder and unbundle the sources again.") endif() ###################### ####################### ## Constants defines ## ####################### ###################### # define common versions of Calligra applications, used to generate calligraversion.h # update these version for every release: -set(CALLIGRA_VERSION_STRING "3.0.1") +set(CALLIGRA_VERSION_STRING "3.0.89") set(CALLIGRA_STABLE_VERSION_MAJOR 3) # 3 for 3.x, 4 for 4.x, etc. set(CALLIGRA_STABLE_VERSION_MINOR 0) # 0 for 3.0, 1 for 3.1, etc. -set(CALLIGRA_VERSION_RELEASE 1) # 89 for Alpha, increase for next test releases, set 0 for first Stable, etc. -#set(CALLIGRA_ALPHA 1) # uncomment only for Alpha +set(CALLIGRA_VERSION_RELEASE 89) # 89 for Alpha, increase for next test releases, set 0 for first Stable, etc. +set(CALLIGRA_ALPHA 1) # uncomment only for Alpha #set(CALLIGRA_BETA 1) # uncomment only for Beta #set(CALLIGRA_RC 1) # uncomment only for RC set(CALLIGRA_YEAR 2017) # update every year if(NOT DEFINED CALLIGRA_ALPHA AND NOT DEFINED CALLIGRA_BETA AND NOT DEFINED CALLIGRA_RC) set(CALLIGRA_STABLE 1) # do not edit endif() message(STATUS "Calligra version: ${CALLIGRA_VERSION_STRING}") # Define the generic version of the Calligra libraries here # This makes it easy to advance it when the next Calligra release comes. # 14 was the last GENERIC_CALLIGRA_LIB_VERSION_MAJOR of the previous Calligra series # (2.x) so we're starting with 15 in 3.x series. if(CALLIGRA_STABLE_VERSION_MAJOR EQUAL 3) math(EXPR GENERIC_CALLIGRA_LIB_VERSION_MAJOR "${CALLIGRA_STABLE_VERSION_MINOR} + 15") else() # let's make sure we won't forget to update the "15" message(FATAL_ERROR "Reminder: please update offset == 15 used to compute GENERIC_CALLIGRA_LIB_VERSION_MAJOR to something bigger") endif() set(GENERIC_CALLIGRA_LIB_VERSION "${GENERIC_CALLIGRA_LIB_VERSION_MAJOR}.0.0") set(GENERIC_CALLIGRA_LIB_SOVERSION "${GENERIC_CALLIGRA_LIB_VERSION_MAJOR}") set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/modules") message("Module path:" ${CMAKE_MODULE_PATH}) # fetch git revision for the current build set(CALLIGRA_GIT_SHA1_STRING "") set(CALLIGRA_GIT_BRANCH_STRING "") include(GetGitRevisionDescription) get_git_head_revision(GIT_REFSPEC GIT_SHA1) get_git_branch(GIT_BRANCH) if(GIT_SHA1 AND GIT_BRANCH) string(SUBSTRING ${GIT_SHA1} 0 7 GIT_SHA1) set(CALLIGRA_GIT_SHA1_STRING ${GIT_SHA1}) set(CALLIGRA_GIT_BRANCH_STRING ${GIT_BRANCH}) endif() if(NOT DEFINED RELEASE_BUILD) # estimate mode by CMAKE_BUILD_TYPE content if not set on cmdline string(TOLOWER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_TOLOWER) set(RELEASE_BUILD_TYPES "release" "relwithdebinfo" "minsizerel") list(FIND RELEASE_BUILD_TYPES "${CMAKE_BUILD_TYPE_TOLOWER}" INDEX) if (INDEX EQUAL -1) set(RELEASE_BUILD FALSE) else() set(RELEASE_BUILD TRUE) endif() endif() message(STATUS "Release build: ${RELEASE_BUILD}") ############ ############# ## Options ## ############# ############ option(GHNS "support Get Hot New Stuff" OFF) option(PACKAGERS_BUILD "Build support of multiple CPU architectures in one binary. Should be used by packagers only." ON) ####################### ######################## ## Productset setting ## ######################## ####################### # For predefined productsets see the definitions in CalligraProducts.cmake and # in the files in the folder cmake/productsets. # Finding out the products & features to build is done in 5 steps: # 1. have the user define the products/features wanted, by giving a productset # 2. estimate all additional required products/features # 3. estimate which of the products/features can be build by external deps # 4. find which products/features have been temporarily disabled due to problems # 5. estimate which of the products/features can be build by internal deps # get the special macros include(CalligraProductSetMacros) # get the definitions of products, features and product sets include(CalligraProducts.cmake) set(PRODUCTSET_DEFAULT "ALL") if(NOT PRODUCTSET) set(PRODUCTSET ${PRODUCTSET_DEFAULT} CACHE STRING "Set of products/features to build" FORCE) endif() if (RELEASE_BUILD) set(CALLIGRA_SHOULD_BUILD_STAGING FALSE) if(BUILD_UNMAINTAINED) set(CALLIGRA_SHOULD_BUILD_UNMAINTAINED TRUE) else() set(CALLIGRA_SHOULD_BUILD_UNMAINTAINED FALSE) endif() else () set(CALLIGRA_SHOULD_BUILD_STAGING TRUE) set(CALLIGRA_SHOULD_BUILD_UNMAINTAINED TRUE) endif () # finally choose products/features to build calligra_set_productset(${PRODUCTSET}) ########################## ########################### ## Look for ECM, Qt, KF5 ## ########################### ########################## find_package(ECM 1.7.0 REQUIRED NO_MODULE) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR}) # ECM KDE macros (include first, to have their policies and settings effect all other macros) include(KDEInstallDirs) include(KDECMakeSettings NO_POLICY_SCOPE) include(KDECompilerSettings NO_POLICY_SCOPE) # CMake macros include(CMakePackageConfigHelpers) include(WriteBasicConfigVersionFile) include(CheckFunctionExists) include(CheckTypeSize) include(CheckIncludeFile) include(GenerateExportHeader) include(FeatureSummary) # ECM macros include(ECMOptionalAddSubdirectory) include(ECMInstallIcons) include(ECMAddAppIcon) include(ECMSetupVersion) include(ECMAddTests) include(ECMMarkAsTest) include(ECMMarkNonGuiExecutable) include(ECMGenerateHeaders) # own macros include(MacroBoolTo01) include(MacroOptionalFindPackage) include(MacroEnsureVersion) include(MacroJPEG) include(MacroDesktopToJson) set(REQUIRED_KF5_VERSION "5.7.0") find_package(KF5 ${REQUIRED_KF5_VERSION} REQUIRED COMPONENTS Archive Codecs Completion Config ConfigWidgets CoreAddons DBusAddons DocTools GuiAddons I18n IconThemes ItemViews JobWidgets KCMUtils KDELibs4Support KIO Kross Notifications NotifyConfig Parts Sonnet TextWidgets Wallet WidgetsAddons WindowSystem XmlGui ) find_package(KF5Activities) find_package(KF5KHtml) set_package_properties(KF5Activities PROPERTIES TYPE OPTIONAL ) set_package_properties(KF5KHtml PROPERTIES PURPOSE "Required for HTML2ODS import filter" TYPE OPTIONAL ) if(KF5Activities_FOUND) set(HAVE_KACTIVITIES TRUE) endif() if(${KF5_VERSION} VERSION_LESS "5.16.0") set(CALLIGRA_OLD_PLUGIN_METADATA TRUE) endif() set(REQUIRED_QT_VERSION "5.3.0") find_package(Qt5 ${REQUIRED_QT_VERSION} REQUIRED COMPONENTS Core Gui Network PrintSupport Svg Test Widgets Xml ) find_package(Qt5 ${REQUIRED_QT_VERSION} QUIET COMPONENTS DBus OpenGL Quick QuickWidgets Sql WebKit # WebKitWidgets ) message("**********************************************************************************************************************") message("**********************************************************************************************************************") message("Qt WebKitWidgets is required for Stage's html export preview. This will need porting, as that module no longer exists.") message("**********************************************************************************************************************") message("**********************************************************************************************************************") # Qt5Declarative was removed in Qt 5.6.0 so search for it in a separate call # Including it in a collected find_package(Qt5 ...) call can lead to a fatal not-found error: # * Qt5 (required version >= 5.3.0) find_package(Qt5Declarative ${REQUIRED_QT_VERSION} QUIET) set_package_properties(Qt5DBus PROPERTIES TYPE RECOMMENDED ) set_package_properties(Qt5Declarative PROPERTIES PURPOSE "Required for QtQuick1 components" TYPE RECOMMENDED ) set_package_properties(Qt5OpenGL PROPERTIES PURPOSE "Required for QtQuick1 components" TYPE RECOMMENDED ) set_package_properties(Qt5Quick PROPERTIES PURPOSE "Required for QtQuick2 components" TYPE RECOMMENDED ) set_package_properties(Qt5QuickWidgets PROPERTIES PURPOSE "Required for Calligra Gemini" TYPE RECOMMENDED ) set_package_properties(Qt5Sql PROPERTIES PURPOSE "Optional for Sheets' database connection" TYPE OPTIONAL ) set_package_properties(Qt5WebKit PROPERTIES PURPOSE "Required for Braindump's Web shape" TYPE OPTIONAL ) set_package_properties(Qt5WebKitWidget PROPERTIES PURPOSE "Required for Stage" TYPE RECOMMENDED ) if(Qt5WebKit_FOUND) add_definitions( -DCAN_USE_QTWEBKIT ) endif() set(HAVE_OPENGL ${Qt5OpenGL_FOUND}) if (GHNS) find_package(Attica 3.0) find_package(NewStuff) set_package_properties(Attica PROPERTIES DESCRIPTION "Attica is used for Get Hot New Stuff." URL "https://projects.kde.org/projects/kdesupport/attica" TYPE OPTIONAL ) if (NOT LIBATTICA_FOUND) set(GHNS FALSE) else () message(STATUS "WARNING: You are compiling with Get Hot New Stuff enabled. Do not do that when building distribution packages. GHNS is unusable these days until someone starts maintaining it again.") endif () endif () find_package(X11) if(X11_FOUND) find_package(Qt5 ${REQUIRED_QT_VERSION} REQUIRED COMPONENTS X11Extras ) set(HAVE_X11 TRUE) add_definitions(-DHAVE_X11) else() set(HAVE_X11 FALSE) endif() # use sane compile flags add_definitions( -DQT_USE_QSTRINGBUILDER -DQT_STRICT_ITERATORS -DQT_NO_SIGNALS_SLOTS_KEYWORDS -DQT_USE_FAST_OPERATOR_PLUS -DQT_USE_FAST_CONCATENATION -DQT_NO_URL_CAST_FROM_STRING -DQT_NO_CAST_TO_ASCII ) # only with this definition will all the FOO_TEST_EXPORT macro do something # TODO: check if this can be moved to only those places which make use of it, # to reduce global compiler definitions that would trigger a recompile of # everything on a change (like adding/removing tests to/from the build) if(BUILD_TESTING) add_definitions(-DCOMPILING_TESTS) endif() # overcome some platform incompatibilities if(WIN32) if(NOT MINGW) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/winquirks) add_definitions(-D_USE_MATH_DEFINES) add_definitions(-DNOMINMAX) endif() set(WIN32_PLATFORM_NET_LIBS ws2_32.lib netapi32.lib) endif() ########################### ############################ ## Required dependencies ## ############################ ########################### find_package(Perl REQUIRED) find_package(ZLIB REQUIRED) add_definitions(-DBOOST_ALL_NO_LIB) find_package(Boost REQUIRED COMPONENTS system) # for pigment and stage if (NOT Boost_FOUND) message(FATAL_ERROR "Did not find Boost. Boost is required for the core libraries, stage, sheets.") endif () ########################### ############################ ## Optional dependencies ## ############################ ########################### ## ## Check for OpenEXR ## macro_optional_find_package(OpenEXR) macro_bool_to_01(OPENEXR_FOUND HAVE_OPENEXR) ## ## Test for GNU Scientific Library ## macro_optional_find_package(GSL 1.7) set_package_properties(GSL_FOUND PROPERTIES DESCRIPTION "GNU Scientific Library" URL "https://www.gnu.org/software/gsl" PURPOSE "Required by Sheets' solver plugin" TYPE OPTIONAL ) macro_bool_to_01(GSL_FOUND HAVE_GSL) configure_file(config-gsl.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-gsl.h ) ## ## Test for Phonon4Qt5 ## find_package(Phonon4Qt5 QUIET) set_package_properties(Phonon4Qt5 PROPERTIES DESCRIPTION "Abstraction lib for multimedia applications" URL "https://www.kde.org/" PURPOSE "Required by Stage event actions and Videoshape plugin" TYPE OPTIONAL ) ## ## Test for KF5CalendarCore ## find_package(KF5CalendarCore CONFIG QUIET) set_package_properties(KF5CalendarCore PROPERTIES DESCRIPTION "KDE Calendar Library" URL "https://www.kde.org/" PURPOSE "Required by Plan Ical export and optionally used by semantic item Event" TYPE OPTIONAL ) ## ## Test for KF5Contacts ## find_package(KF5Contacts CONFIG QUIET) set_package_properties(KF5Contacts PROPERTIES DESCRIPTION "KDE Address book Library" URL "https://www.kde.org/" PURPOSE "Optionally used by semantic item Contact" TYPE OPTIONAL ) ## ## Test for KF5AkonadiContact ## find_package(KF5AkonadiContact CONFIG QUIET) set_package_properties(KF5AkonadiContact PROPERTIES DESCRIPTION "Library for Accessing Contacts stored in Akonadi" URL "https://www.kde.org/" PURPOSE "Optionally used by Plan" TYPE OPTIONAL ) ## ## Test for KF5AkonadiCore ## find_package(KF5Akonadi CONFIG QUIET) set_package_properties(KF5Akonadi PROPERTIES DESCRIPTION "Library for general Access to Akonadi" URL "https://www.kde.org/" PURPOSE "Optionally used by semantic items Event and Contact" TYPE OPTIONAL ) ## ## Test for KGantt ## macro_optional_find_package(KGantt 2.6.0 QUIET) set_package_properties(KGantt PROPERTIES DESCRIPTION "Library for creating Gantt diagrams (part of KDiagram)" URL "https://www.kde.org/" PURPOSE "Required by Plan" TYPE RECOMMENDED ) ## ## Test for KChart ## macro_optional_find_package(KChart 2.6.0 QUIET) set_package_properties(KChart PROPERTIES DESCRIPTION "Library for creating business charts (part of KDiagram)" URL "https://www.kde.org/" PURPOSE "Required by Chart shape and Plan" TYPE RECOMMENDED ) ## ## Test for KReport ## macro_optional_find_package(KReport 3.0 QUIET) -## Test if the package is a stable version -## This is a temporary measure to avoid that the whole calligra build fails on build.kde.org -if (KReport_FOUND AND KReport_VERSION_PATCH GREATER 80) - message(WARNING "KReport version found is not stable: ${KReport_VERSION}") - set(KReport_FOUND FALSE) -endif() set_package_properties(KReport PROPERTIES DESCRIPTION "A framework for the creation and generation of reports in multiple formats" URL "https://community.kde.org/KReport" PURPOSE "Required by Plan" TYPE RECOMMENDED ) ## ## Test for KPropertyWidgets ## macro_optional_find_package(KPropertyWidgets 3.0 QUIET) -## Test if the package is a stable version -## This is a temporary measure to avoid that the whole calligra build fails on build.kde.org -if (KPropertyWidgets_FOUND AND KPropertyWidgets_VERSION_PATCH GREATER 80) - message(WARNING "KPropertyWidgets version found is not stable: ${KPropertyWidgets_VERSION}") - set(KPropertyWidgets_FOUND FALSE) -endif() set_package_properties(KPropertyWidgets PROPERTIES DESCRIPTION "A property editing framework with editor widget" URL "https://community.kde.org/KProperty" PURPOSE "Required by Plan" TYPE RECOMMENDED ) ## ## Test for eigen3 ## macro_optional_find_package(Eigen3) set_package_properties(Eigen3 PROPERTIES DESCRIPTION "C++ template library for linear algebra" URL "http://eigen.tuxfamily.org" PURPOSE "Required by Calligra Sheets" TYPE RECOMMENDED ) ## ## Test for QCA2 ## macro_optional_find_package(Qca-qt5 2.1.0 QUIET) set_package_properties(Qca-qt5 PROPERTIES DESCRIPTION "Qt Cryptographic Architecture" URL "http:/download.kde.org/stable/qca-qt5" PURPOSE "Required for encrypted OpenDocument files and encrypted xls files support (available as a module in kdesupport)" TYPE OPTIONAL ) ## ## Test for soprano ## # QT5TODO: push for released (and maintained) Qt5 version of Soprano, T462, T461 # macro_optional_find_package(Soprano) set(Soprano_FOUND FALSE) set_package_properties(Soprano PROPERTIES DESCRIPTION "RDF handling library" URL "http://soprano.sourceforge.net/" PURPOSE "Required to handle RDF metadata in ODF" TYPE OPTIONAL ) if(NOT Soprano_FOUND) set(SOPRANO_INCLUDE_DIR "") endif() ## ## Test for marble ## macro_optional_find_package(Marble CONFIG) set_package_properties(Marble PROPERTIES DESCRIPTION "World Globe Widget library" URL "https://marble.kde.org/" PURPOSE "Required by RDF to show locations on a map" TYPE OPTIONAL ) ## ## Test for lcms ## macro_optional_find_package(LCMS2) set_package_properties(LCMS2 PROPERTIES DESCRIPTION "LittleCMS, a color management engine" URL "http://www.littlecms.com" PURPOSE "Will be used for color management" TYPE OPTIONAL ) if(LCMS2_FOUND) if(NOT ${LCMS2_VERSION} VERSION_LESS 2040 ) set(HAVE_LCMS24 TRUE) endif() set(HAVE_REQUIRED_LCMS_VERSION TRUE) set(HAVE_LCMS2 TRUE) endif() ## ## Test for Vc ## set(OLD_CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ) set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules ) set(HAVE_VC FALSE) if( NOT MSVC) macro_optional_find_package(Vc 1.1.0) set_package_properties(Vc PROPERTIES DESCRIPTION "Portable, zero-overhead SIMD library for C++" URL "https://github.com/VcDevel/Vc" PURPOSE "Required by the pigment for vectorization" TYPE OPTIONAL ) macro_bool_to_01(Vc_FOUND HAVE_VC) macro_bool_to_01(PACKAGERS_BUILD DO_PACKAGERS_BUILD) endif() configure_file(config-vc.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-vc.h ) if(HAVE_VC) message(STATUS "Vc found!") set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/vc") include (VcMacros) if(Vc_COMPILER_IS_CLANG) set(ADDITIONAL_VC_FLAGS "-Wabi -ffp-contract=fast -fPIC") elseif (NOT MSVC) set(ADDITIONAL_VC_FLAGS "-Wabi -fabi-version=0 -ffp-contract=fast -fPIC") endif() #Handle Vc master if(Vc_COMPILER_IS_GCC OR Vc_COMPILER_IS_CLANG) AddCompilerFlag("-std=c++11" _ok) if(NOT _ok) AddCompilerFlag("-std=c++0x" _ok) endif() endif() macro(ko_compile_for_all_implementations_no_scalar _objs _src) if(PACKAGERS_BUILD) vc_compile_for_all_implementations(${_objs} ${_src} FLAGS ${ADDITIONAL_VC_FLAGS} ONLY SSE2 SSSE3 SSE4_1 AVX AVX2+FMA+BMI2) else() set(${_objs} ${_src}) endif() endmacro() macro(ko_compile_for_all_implementations _objs _src) if(PACKAGERS_BUILD) vc_compile_for_all_implementations(${_objs} ${_src} FLAGS ${ADDITIONAL_VC_FLAGS} ONLY Scalar SSE2 SSSE3 SSE4_1 AVX AVX2+FMA+BMI2) else() set(${_objs} ${_src}) endif() endmacro() if (NOT PACKAGERS_BUILD) # Optimize the whole Calligra for current architecture set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Vc_DEFINITIONS}") endif () endif() set(CMAKE_MODULE_PATH ${OLD_CMAKE_MODULE_PATH} ) if(WIN32) set(LIB_INSTALL_DIR ${LIB_INSTALL_DIR} RUNTIME DESTINATION ${BIN_INSTALL_DIR} LIBRARY ${INSTALL_TARGETS_DEFAULT_ARGS} ARCHIVE ${INSTALL_TARGETS_DEFAULT_ARGS} ) endif() ## ## Test for Fontconfig ## ## Only test if on non-Windows system if(NOT WIN32 AND NOT APPLE) macro_optional_find_package(Fontconfig) set_package_properties(Fontconfig PROPERTIES DESCRIPTION "Library for configuring and customizing font access" URL "http://fontconfig.org" PURPOSE "Required to handle exact font size" TYPE RECOMMENDED ) endif() ## ## Test for Freetype ## ## Only test if on non-Windows system if(NOT WIN32 AND NOT APPLE) macro_optional_find_package(Freetype) set_package_properties(Freetype PROPERTIES DESCRIPTION "A Free, High-Quality, and Portable Font Engine" URL "http://www.freetype.org/" PURPOSE "Required to handle exact font size" TYPE RECOMMENDED ) endif() if(NOT FONTCONFIG_FOUND OR NOT FREETYPE_FOUND) set(FONTCONFIG_INCLUDE_DIR "") set(FREETYPE_INCLUDE_DIRS "") else() add_definitions( -DSHOULD_BUILD_FONT_CONVERSION ) endif() ## ## Test endianess ## include (TestBigEndian) test_big_endian(CMAKE_WORDS_BIGENDIAN) ## ## Test SharedMimeInfo ## macro_optional_find_package(SharedMimeInfo) set_package_properties(SharedMimeInfo PROPERTIES DESCRIPTION "Shared Mime Info" URL "http://freedesktop.org/wiki/Software/shared-mime-info" PURPOSE "Required to determine file types SVM or all of MSOOXML." TYPE RECOMMENDED ) ## ## Test for Okular ## macro_optional_find_package(Okular5 0.99.60 QUIET) set_package_properties(Okular5 PROPERTIES DESCRIPTION "A unified document viewer" URL "https://okular.kde.org/" PURPOSE "Required to build the plugins for Okular" TYPE OPTIONAL ) ## ## Test for librevenge ## macro_optional_find_package(LibRevenge) set_package_properties(LibRevenge PROPERTIES DESCRIPTION "A base library for writing document import filters" URL "http://sf.net/p/libwpd/librevenge/" PURPOSE "Required by various import filters" TYPE OPTIONAL ) ## ## Test for libodfgen ## macro_optional_find_package(LibOdfGen) set_package_properties(LibOdfGen PROPERTIES DESCRIPTION "Open Document Format Generation Library" URL "http://sf.net/p/libwpd/libodfgen/" PURPOSE "Required by various import filters" TYPE OPTIONAL ) ## ## Test for WordPerfect Document Library ## macro_optional_find_package(LibWpd) set_package_properties(LibWpd PROPERTIES DESCRIPTION "WordPerfect Document Library" URL "http://libwpd.sourceforge.net/" PURPOSE "Required by the Words WPD import filter" TYPE OPTIONAL ) ## ## Test for WordPerfect Graphics Library ## macro_optional_find_package(LibWpg) set_package_properties(LibWpg PROPERTIES DESCRIPTION "WordPerfect Graphics Library" URL "http://libwpg.sourceforge.net/" PURPOSE "Required by the Karbon WPG import filter" TYPE OPTIONAL ) ## ## Test for Microsoft Works Document Library ## macro_optional_find_package(LibWps) set_package_properties(LibWps PROPERTIES DESCRIPTION "Microsoft Works Document Library" URL "http://libwps.sourceforge.net/" PURPOSE "Required by the Words WPS import filter" TYPE OPTIONAL ) ## ## Test for Microsoft Visio Document Library ## macro_optional_find_package(LibVisio) set_package_properties(LibVisio PROPERTIES DESCRIPTION "Visio Import Filter Library" URL "https://wiki.documentfoundation.org/DLP/Libraries/libvisio" PURPOSE "Required by the Flow visio import filter" TYPE OPTIONAL ) ## ## Test for Apple Keynote Document Library ## macro_optional_find_package(LibEtonyek) set_package_properties(LibEtonyek PROPERTIES DESCRIPTION "Apple Keynote Document Library" URL "https://wiki.documentfoundation.org/DLP/Libraries/libetonyek" PURPOSE "Required by the Stage keynote import filter" TYPE OPTIONAL ) ## ## Test for qt-poppler ## macro_optional_find_package(Poppler) set_package_properties(Poppler PROPERTIES DESCRIPTION "A PDF rendering library" URL "http://poppler.freedesktop.org" PURPOSE "Required by the Karbon PDF import filter and CSTester PDF feature" TYPE OPTIONAL ) ## ## Test for qt-poppler not-officially-supported XPDF Headers ## Installing these is off by default in poppler sources, so lets make ## sure they're really there before trying to build the pdf import ## macro_optional_find_package(PopplerXPDFHeaders) set_package_properties(PopplerXPDFHeaders PROPERTIES DESCRIPTION "XPDF headers in the Poppler Qt5 interface library" URL "http://poppler.freedesktop.org" PURPOSE "Required by the Karbon PDF import filter" TYPE OPTIONAL ) ## ## Test for libgit2 ## macro_optional_find_package(Libgit2) ## ## Generate a file for prefix information ## ############################### ################################ ## Add Calligra helper macros ## ################################ ############################### include(MacroCalligraAddBenchmark) #################### ##################### ## Define includes ## ##################### #################### # WARNING: make sure that QT_INCLUDES is the first directory to be added to include_directory before # any other include directory # for config.h and includes (if any?) include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}/interfaces ) set(KOVERSION_INCLUDES ${CMAKE_SOURCE_DIR}/libs/version ${CMAKE_BINARY_DIR}/libs/version ) include_directories(${KOVERSION_INCLUDES}) # koplugin is at the bottom of the stack set(KOPLUGIN_INCLUDES ${CMAKE_SOURCE_DIR}/libs/plugin) set(KUNDO2_INCLUDES ${CMAKE_SOURCE_DIR}/libs/kundo2 ${CMAKE_BINARY_DIR}/libs/kundo2) # koodf is at the bottom of the stack set(KOODF_INCLUDES ${CMAKE_SOURCE_DIR}/libs/odf ${CMAKE_SOURCE_DIR}/libs/store ${CMAKE_BINARY_DIR}/libs/odf ${CMAKE_BINARY_DIR}/libs/store ${KOVERSION_INCLUDES} ) # pigment depends on koplugin and lcms set(PIGMENT_INCLUDES ${KOPLUGIN_INCLUDES} ${KOVERSION_INCLUDES} ${CMAKE_SOURCE_DIR}/libs/pigment ${CMAKE_BINARY_DIR}/libs/pigment ${CMAKE_SOURCE_DIR}/libs/pigment/compositeops ${CMAKE_SOURCE_DIR}/libs/pigment/resources ${Boost_INCLUDE_DIRS} ) # flake depends on koodf and pigment set(FLAKE_INCLUDES ${CMAKE_SOURCE_DIR}/libs/flake ${KOODF_INCLUDES} ${PIGMENT_INCLUDES} ${KUNDO2_INCLUDES} ${CMAKE_SOURCE_DIR}/libs/widgetutils ${CMAKE_SOURCE_DIR}/libs/flake/commands ${CMAKE_SOURCE_DIR}/libs/flake/tools ${CMAKE_SOURCE_DIR}/libs/flake/svg ${CMAKE_BINARY_DIR}/libs/flake) # vectorimage set(VECTORIMAGE_INCLUDES ${CMAKE_SOURCE_DIR}/libs/vectorimage ${CMAKE_SOURCE_DIR}/libs/vectorimage/libemf ${CMAKE_SOURCE_DIR}/libs/vectorimage/libsvm ${CMAKE_SOURCE_DIR}/libs/vectorimage/libwmf) # KoText depends on koplugin, odf set(KOTEXT_INCLUDES ${CMAKE_SOURCE_DIR}/libs/text ${CMAKE_BINARY_DIR}/libs/text ${CMAKE_SOURCE_DIR}/libs/text/changetracker ${CMAKE_SOURCE_DIR}/libs/text/styles ${CMAKE_SOURCE_DIR}/libs/text/opendocument ${SOPRANO_INCLUDE_DIR} ${FLAKE_INCLUDES} ${KOODF_INCLUDES}) # TextLayout depends on kotext set(TEXTLAYOUT_INCLUDES ${KOTEXT_INCLUDES} ${CMAKE_SOURCE_DIR}/libs/textlayout ${CMAKE_BINARY_DIR}/libs/textlayout) # Widgets depends on kotext and flake set(KOWIDGETS_INCLUDES ${KOTEXT_INCLUDES} ${CMAKE_SOURCE_DIR}/libs/widgetutils ${CMAKE_BINARY_DIR}/libs/widgetutils ${CMAKE_SOURCE_DIR}/libs/widgets ${CMAKE_BINARY_DIR}/libs/widgets) # BasicFlakes depends on flake, widgets set(BASICFLAKES_INCLUDES ${KOWIDGETS_INCLUDES} ${CMAKE_SOURCE_DIR}/libs/basicflakes ${CMAKE_SOURCE_DIR}/libs/basicflakes/tools) # komain depends on kotext & flake set(KOMAIN_INCLUDES ${KOWIDGETS_INCLUDES} ${TEXTLAYOUT_INCLUDES} ${CMAKE_SOURCE_DIR}/libs/main ${CMAKE_BINARY_DIR}/libs/main ${CMAKE_SOURCE_DIR}/libs/main/config) set(KORDF_INCLUDES ${KOMAIN_INCLUDES} ${CMAKE_SOURCE_DIR}/libs/rdf ) set(KORDF_LIBS kordf) if(SHOULD_BUILD_FEATURE_SCRIPTING) set(KOKROSS_INCLUDES ${CMAKE_SOURCE_DIR}/libs/kross ${CMAKE_BINARY_DIR}/libs/kross) endif() # kopageapp set(KOPAGEAPP_INCLUDES ${TEXTLAYOUT_INCLUDES} ${PIGMENT_INCLUDES} ${KOMAIN_INCLUDES} ${CMAKE_SOURCE_DIR}/libs/widgets ${CMAKE_SOURCE_DIR}/libs/pageapp ${CMAKE_SOURCE_DIR}/libs/pageapp/commands ${CMAKE_BINARY_DIR}/libs/pageapp ) ############################################# #### filter libraries #### ############################################# # libodf2 set(KOODF2_INCLUDES ${CMAKE_SOURCE_DIR}/filters/libodf2 ${CMAKE_SOURCE_DIR}/filters/libodf2/chart ) # libodfreader set(KOODFREADER_INCLUDES ${CMAKE_SOURCE_DIR}/filters/libodfreader ) ################################################### #################################################### ## Detect which products/features can be compiled ## #################################################### ################################################### if (NOT WIN32) set(NOT_WIN TRUE) endif() if (NOT QT_MAC_USE_COCOA) set(NOT_COCOA TRUE) endif() if (KReport_FOUND AND KREPORT_SCRIPTING) set(KReport_WithScripting_FOUND TRUE) endif() calligra_drop_product_on_bad_condition( FEATURE_RDF Soprano_FOUND "Soprano not found" ) # calligra_drop_product_on_bad_condition( PART_STAGE # Qt5WebKitWidgets_FOUND "Qt5WebKitWidgets devel not found" # ) calligra_drop_product_on_bad_condition( PART_SHEETS EIGEN3_FOUND "Eigen devel not found" ) calligra_drop_product_on_bad_condition( OKULAR_GENERATOR_ODP Okular5_FOUND "Okular devel not found" ) calligra_drop_product_on_bad_condition( OKULAR_GENERATOR_ODT Okular5_FOUND "Okular devel not found" ) calligra_drop_product_on_bad_condition( PLUGIN_CHARTSHAPE KChart_FOUND "KChart devel not found" ) calligra_drop_product_on_bad_condition( PLUGIN_VIDEOSHAPE Phonon4Qt5_FOUND "Phonon4Qt5 devel not found" ) calligra_drop_product_on_bad_condition( FILTER_KEY_TO_ODP LIBODFGEN_FOUND "libodfgen devel not found" LIBETONYEK_FOUND "libetonyek devel not found" LIBREVENGE_FOUND "librevenge devel not found" ) calligra_drop_product_on_bad_condition( FILTER_VISIO_TO_ODG LIBODFGEN_FOUND "libodfgen devel not found" LIBVISIO_FOUND "libvisio devel not found" LIBREVENGE_FOUND "librevenge devel not found" ) calligra_drop_product_on_bad_condition( FILTER_WORDPERFECT_TO_ODT LIBODFGEN_FOUND "libodfgen devel not found" LIBWPD_FOUND "libwpd devel not found" LIBWPG_FOUND "libwpg devel not found" LIBREVENGE_FOUND "librevenge devel not found" ) calligra_drop_product_on_bad_condition( FILTER_WORKS_TO_ODT LIBODFGEN_FOUND "libodfgen devel not found" LIBWPS_FOUND "libwps devel not found" LIBREVENGE_FOUND "librevenge devel not found" ) calligra_drop_product_on_bad_condition( FILTER_WPG_TO_SVG LIBWPG_FOUND "libwpg devel not found" LIBREVENGE_FOUND "librevenge devel not found" ) calligra_drop_product_on_bad_condition( FILTER_WPG_TO_ODG LIBODFGEN_FOUND "libodfgen devel not found" LIBWPG_FOUND "libwpg devel not found" LIBREVENGE_FOUND "librevenge devel not found" ) calligra_drop_product_on_bad_condition( FILTER_PDF_TO_SVG NOT_WIN "not supported on Windows" PopplerXPDFHeaders_FOUND "poppler xpdf headers not found" ) calligra_drop_product_on_bad_condition( FILTER_HTML_TO_ODS NOT_WIN "not supported on Windows" NOT_COCOA "not supported with Qt Cocoa" KF5KHtml_FOUND "KF5KHtml devel not found" ) calligra_drop_product_on_bad_condition( FILTER_SHEETS_TO_HTML NOT_WIN "not supported on Windows" NOT_COCOA "not supported with Qt Cocoa" ) calligra_drop_product_on_bad_condition( FILTER_KSPREAD_TO_LATEX NOT_WIN "not supported on Windows" NOT_COCOA "not supported with Qt Cocoa" ) calligra_drop_product_on_bad_condition( APP_BRAINDUMP NOT_WIN "unmaintained on Windows" ) calligra_drop_product_on_bad_condition( APP_PLAN KGantt_FOUND "KGantt devel not found" KChart_FOUND "KChart devel not found" KReport_WithScripting_FOUND "KReport with scripting support not found" KPropertyWidgets_FOUND "KPropertyWidgets not found" ) calligra_drop_product_on_bad_condition( PLUGIN_CALLIGRAGEMINI_GIT LIBGIT2_FOUND "libgit2 devel not found" ) calligra_drop_product_on_bad_condition( PART_QTQUICK Qt5OpenGL_FOUND "Qt OpenGL not found" Qt5Declarative_FOUND "QtDeclarative not found" ) calligra_drop_product_on_bad_condition( PART_COMPONENTS Qt5Quick_FOUND "QtQuick not found" ) calligra_drop_product_on_bad_condition( APP_SLIDECOMPARE Qt5OpenGL_FOUND "Qt OpenGL not found" ) ############################################# #### Backward compatibility BUILD_x=off #### ############################################# # workaround: disable directly all products which might be activated by internal # dependencies, but belong to scope of old flag calligra_drop_products_on_old_flag(braindump APP_BRAINDUMP) calligra_drop_products_on_old_flag(flow APP_FLOW) calligra_drop_products_on_old_flag(karbon APP_KARBON) calligra_drop_products_on_old_flag(plan APP_PLAN) calligra_drop_products_on_old_flag(sheets PART_SHEETS APP_SHEETS) calligra_drop_products_on_old_flag(stage PART_STAGE APP_STAGE) calligra_drop_products_on_old_flag(words PART_WORDS APP_WORDS) ############################################# #### Temporarily broken products #### ############################################# # If a product does not build due to some temporary brokeness disable it here, # by calling calligra_disable_product with the product id and the reason, # e.g.: # calligra_disable_product(APP_FOO "isn't buildable at the moment") ############################################# #### Calculate buildable products #### ############################################# calligra_drop_unbuildable_products() ############################################# #### Setup product-depending vars #### ############################################# if(SHOULD_BUILD_FEATURE_RDF) add_definitions( -DSHOULD_BUILD_RDF ) endif() ################### #################### ## Subdirectories ## #################### ################### add_subdirectory(words) if (SHOULD_BUILD_APP_FLOW) add_subdirectory(flow) endif () add_subdirectory(stage) if(SHOULD_BUILD_APP_PLAN) add_subdirectory(plan) endif() add_subdirectory(sheets) if(SHOULD_BUILD_APP_KARBON) add_subdirectory(karbon) endif() if(SHOULD_BUILD_APP_BRAINDUMP) add_subdirectory(braindump) endif() if(SHOULD_BUILD_DOC) add_subdirectory(doc) endif() if(SHOULD_BUILD_PART_QTQUICK) add_subdirectory(qtquick) endif() if(SHOULD_BUILD_PART_COMPONENTS) add_subdirectory(components) endif() if(SHOULD_BUILD_GEMINI) add_subdirectory(gemini) endif() # non-app directories are moved here because they can depend on SHOULD_BUILD_{appname} variables set above add_subdirectory(libs) add_subdirectory(interfaces) add_subdirectory(pics) add_subdirectory(plugins) add_subdirectory(servicetypes) add_subdirectory(devtools) add_subdirectory(extras) add_subdirectory(filters) add_subdirectory(data) feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES) calligra_product_deps_report("product_deps") calligra_log_should_build() add_custom_target(apidox doc/api/gendocs.pl WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) configure_file(KoConfig.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/KoConfig.h ) if (SHOULD_BUILD_DEVEL_HEADERS) install( FILES ${CMAKE_CURRENT_BINARY_DIR}/KoConfig.h DESTINATION ${INCLUDE_INSTALL_DIR}/calligra COMPONENT Devel) endif() if (BUILD_TESTING) add_subdirectory(tests) endif(BUILD_TESTING) diff --git a/braindump/data/braindumpui.rc b/braindump/data/braindumpui.rc index ecb6106243b..94c68d31bc6 100644 --- a/braindump/data/braindumpui.rc +++ b/braindump/data/braindumpui.rc @@ -1,18 +1,18 @@ - + - + Shapes - + diff --git a/braindump/data/braindumpview.rc b/braindump/data/braindumpview.rc index 951afe61b9d..edf65406065 100644 --- a/braindump/data/braindumpview.rc +++ b/braindump/data/braindumpview.rc @@ -1,51 +1,51 @@ - + - + Shapes - + diff --git a/braindump/data/org.kde.braindump.appdata.xml b/braindump/data/org.kde.braindump.appdata.xml index d2231ac6741..05b420f148b 100644 --- a/braindump/data/org.kde.braindump.appdata.xml +++ b/braindump/data/org.kde.braindump.appdata.xml @@ -1,71 +1,84 @@ org.kde.braindump.desktop CC0-1.0 GPL-2.0+ Braindump Braindump Braindump Braindump Braindump Braindump Braindump Braindump Braindump Braindump Braindump Braindump Braindump Braindump Braindump Braindump Braindump Braindump Braindump BrainDump Braindump Braindump Braindump Braindump Braindump xxBraindumpxx 脑图 + Notes and ideas gathering + Notes i recull d'idees + Notes i recull d'idees + Shromažďování nápadů poznámek + Notizen und Ideen sammeln + Recopilación de notas e ideas + Note e raccolta di idee + Notities en ideeën verzamelen + Zbieranie uwag i pomysłów + Recolha de notas e ideias + Anteckningar och idéinsamling + Програма для впорядковування нотаток та ідей + xxNotes and ideas gatheringxx

Braindump is a tool to dump and organize the content of your brain (ideas, drawings, images, texts…) to your computer. It works by allowing to create and edit whiteboards, which are infinite canvas on which you can add texts, images, charts, drawings, etc.

Braindump je alat za slanje i organizaciju sadržaja vašeg mozga (ideja, crteža, slika, teksta...) na računar. Radi tako što vam dopušta da kreirate i uređujete table koja su beskonačna platna na koje možete dodati tekstove, slike, dijagrame, crteže itd.

El Braindump és una eina per a bolcar i organitzar el contingut del cervell (idees, dibuixos, imatges, texts…) a l'ordinador. Funciona permetent crear i editar pissarres, que tenen llenços infinits en els quals es pot afegir texts, imatges, diagrames, dibuixos, etc.

El Braindump és una eina per a bolcar i organitzar el contingut del cervell (idees, dibuixos, imatges, texts…) a l'ordinador. Funciona permetent crear i editar pissarres, que tenen llenços infinits en els quals es pot afegir texts, imatges, diagrames, dibuixos, etc.

Braindump is a tool to dump and organise the content of your brain (ideas, drawings, images, texts…) to your computer. It works by allowing to create and edit whiteboards, which are infinite canvas on which you can add texts, images, charts, drawings, etc.

Braindump es una herramienta para volcar y organizar el contenido de su cerebro (ideas, dibujos, imágenes, texto...) en su equipo. Permite crear y editar pizarras en blanco, es decir, lienzos infinitos en los que puede añadir textos, imágenes, diagramas, dibujos, etc.

Braindump on tööriist sinu ajus peituva sisu (mõtted, joonised, pildid, tekst jms) esitamiseks ja korraldamiseks arvutis. See võimaldab luua ja muuta nõndanimetatud valgetahvleid, mis kujutavad endast piiramata lõuendeid, kuhu lisada teksti, pilte, skeeme, diagramme, joonistusi ja kõike muud vajalikku.

Braindump on työkalu aivojesi sisällön (ajatusten, piirrosten, kuvien, tekstin…) purkamiseksi ja järjestämiseksi. Se toimii antamalla sinun luoda ja muokata valkotauluja, jotka ovat rajaton kangas tekstillesi, kuvillesi, kaavioillesi, piirroksillesi jne.

Braindump est un outil pour mettre en ordre le contenu de votre cerveau (idées, dessins, images, textes…) sur votre ordinateur. Il vous permet de créer et d'éditer des tableaux blancs illimités sur lesquels vous pouvez ajouter des textes, des images, des graphiques, des dessins, etc.

Braindump é unha ferramenta para envorcar e organizar o que pasa pola súa cabeza (ideas, debuxos, imaxes, textos…) no seu computador. Permítelle crear e editar encerados, que son lenzos infinitos nos que pode engadir textos, imaxes, gráficos, debuxos, etc.

Braindump es un instrumento pro discargar e organizar le contento de tu cerebro (ideas, designos, imagines, textos...) in tu computator. Illo functiona per permitter crear e modificar tabula blanc, que es telas infinite sur le qual on pote adder textos, imagines, diagrammas, designos, etc.

Braindump è uno strumento per estrarre e organizzare il contenuto del tuo cervello (idee, disegni, immagini, testi...) sul tuo computer. Ti consente di creare e modificare lavagne bianche, che sono tele infinite sulle quali puoi aggiungere testi, immagini, grafici, disegni, ecc.

Braindump is een hulpmiddel om de inhoud van uw brein te dumpen en te organiseren (ideeën, tekeningen, afbeeldingen, teksten…) naar uw computer. Het werkt door u instaat te stellen whiteboards te bewerken, die oneindige werkvelden zijn waarop u teksten, afbeeldingen, grafieken, tekeningen, etc. kunt toevoegen.

Braindump jest narzędziem do zrzucania i porządkowania zawartości twojego umysłu (pomysły, rysunki, obrazy, teksty...) na komputer. Działa przez umożliwianie tworzenia i edytowania białych tablic, które są bezgranicznym płótnem, na które można dodawać teksty, obrazy, wykresy, rysunki, itp.

O Braindump é uma ferramenta para descarregar e organizar o conteúdo do seu cérebro (ideias, desenhos, imagens, textos, ...) para o seu computador. Permite criar e editar quadros, que são uma "tela" infinita onde poderá adicionar textos, imagens, gráficos, desenhos, etc.

Braindump é uma ferramenta para descarregar e organizar o conteúdo do seu cérebro (ideias, desenhos, imagens, textos, ...) para o seu computador. Permite-lhe criar e editar quadros, que são uma espécie de "tela infinita" onde poderá adicionar textos, imagens, gráficos, desenhos, etc.

Braindump je nástroj na prenos a organizáciu obsahu vášho mozgu (nápady, kresby, obrázky, texty...) do vášho počítača. Umožňuje vytvárať a upravovať tabule, ktoré sú neurčitým plátnom, kam môžete pridávať texty, obrázky, grafy, kresby atď.

Braindump är ett verktyg för att hämta och organisera innehållet i din hjärna (idéer, ritningar, bilder, texter …) på datorn. Det fungerar genom att låta dig skapa och redigera skrivtavlor, som är oändliga ytor där du kan lägga till texter, bilder, diagram, ritningar, etc.

Braindump, aklınızdaki içerikleri (fikirler, çizimler, resimler, metinler...) bilgisayarına dökmenize ve organize etmenize yardımcı olan bir araçtır. Metin, resim, çizelge, çizimler, vb. ekleyebileceğiniz sonsuz tuval olan beyaz tahtalar oluşturul düzenlemenize izin vererek çalışır.

Braindump — програма для запису та упорядкування ваших думок (ідей, креслень, зображень, фрагментів тексту…) за допомогою вашого комп’ютера. У цій програмі ви можете створювати та редагувати так звані «дошки» — нескінченні полотна, на які можна додавати фрагменти тексту, зображення, діаграми, креслення тощо.

xxBraindump is a tool to dump and organize the content of your brain (ideas, drawings, images, texts…) to your computer. It works by allowing to create and edit whiteboards, which are infinite canvas on which you can add texts, images, charts, drawings, etc.xx

脑图是一个在计算机中记录和组织大脑内容的工具。可以创建和编辑白板,有无限的大小,可以添加文字、图片、图表和绘画等。

http://www.calligra.org/braindump/ https://bugs.kde.org/enter_bug.cgi?format=guided&product=braindump http://www.calligra.org/wp-content/uploads/2011/03/projection-900x548.png KDE braindump
diff --git a/braindump/plugins/quickstates/quickstates.rc b/braindump/plugins/quickstates/quickstates.rc index 3349c8acf8c..a7e1d66847f 100644 --- a/braindump/plugins/quickstates/quickstates.rc +++ b/braindump/plugins/quickstates/quickstates.rc @@ -1,7 +1,7 @@ - - + + - + diff --git a/extras/okularodpgenerator/libokularGenerator_odp.json b/extras/okularodpgenerator/libokularGenerator_odp.json index 1c5c1ab2bee..a0b4e6181a2 100644 --- a/extras/okularodpgenerator/libokularGenerator_odp.json +++ b/extras/okularodpgenerator/libokularGenerator_odp.json @@ -1,71 +1,71 @@ { "KPlugin": { "Authors": [ { - "Email": "sven.langkamp@gmail.com", - "Name": "Sven Langkamp", + "Email": "sven.langkamp@gmail.com", + "Name": "Sven Langkamp", "Name[x-test]": "xxSven Langkampxx" - }, + }, { - "Email": "kossebau@kde.org", - "Name": "Friedrich W. H. Kossebau", + "Email": "kossebau@kde.org", + "Name": "Friedrich W. H. Kossebau", "Name[x-test]": "xxFriedrich W. H. Kossebauxx" } - ], - "Copyright": "Copyright 2010-2016 Sven Langkamp, Friedrich W. H. Kossebau", - "Copyright[fi]": "Copyright 2010–2016 Sven Langkamp, Friedrich W. H. Kossebau", - "Copyright[gl]": "© 2010-2016 Sven Langkamp, Friedrich W. H. Kossebau", - "Copyright[uk]": "© Sven Langkamp, Friedrich W. H. Kossebau, 2010–2016", - "Copyright[x-test]": "xxCopyright 2010-2016 Sven Langkamp, Friedrich W. H. Kossebauxx", - "Description": "OpenDocument Presentation file renderer", - "Description[ca@valencia]": "Representació de fitxers de presentacions d'OpenDocument", - "Description[ca]": "Representació de fitxers de presentacions d'OpenDocument", - "Description[de]": "Renderer für OpenDocument-Präsentations-Dokumente", - "Description[es]": "Motor de visualización para archivos de presentaciones de OpenDocument", - "Description[fi]": "OpenDocument Presentation -tiedostohahmonnin", - "Description[fr]": "Rendu de fichiers de présentation OpenDocument", - "Description[gl]": "Renderizador de ficheiros de presentación de OpenDocument", - "Description[it]": "Presentatore file OpenDocument Presentation", - "Description[nl]": "OpenDocument presentatiebestandsweergave", - "Description[pl]": "Wyświetlanie pliku prezentacji OpenDocument", - "Description[pt]": "Visualizador de ficheiros de Apresentações em OpenDocument", - "Description[pt_BR]": "Renderização de arquivos de Apresentação OpenDocument", - "Description[sk]": "Zobrazovač prezentácií OpenDocument", - "Description[sv]": "OpenDocument presentationsfilåtergivning", - "Description[uk]": "Засіб показу вмісту файлів ODP", - "Description[x-test]": "xxOpenDocument Presentation file rendererxx", - "Description[zh_CN]": "OpenDocument 演示文件渲染器", - "Id": "okularGenerator_odp_calligra", - "License": "GPL", + ], + "Copyright": "Copyright 2010-2016 Sven Langkamp, Friedrich W. H. Kossebau", + "Copyright[fi]": "Copyright 2010–2016 Sven Langkamp, Friedrich W. H. Kossebau", + "Copyright[gl]": "© 2010-2016 Sven Langkamp, Friedrich W. H. Kossebau", + "Copyright[uk]": "© Sven Langkamp, Friedrich W. H. Kossebau, 2010–2016", + "Copyright[x-test]": "xxCopyright 2010-2016 Sven Langkamp, Friedrich W. H. Kossebauxx", + "Description": "OpenDocument Presentation file renderer", + "Description[ca@valencia]": "Representació de fitxers de presentacions d'OpenDocument", + "Description[ca]": "Representació de fitxers de presentacions d'OpenDocument", + "Description[de]": "Renderer für OpenDocument-Präsentations-Dokumente", + "Description[es]": "Motor de visualización para archivos de presentaciones de OpenDocument", + "Description[fi]": "OpenDocument Presentation -tiedostohahmonnin", + "Description[fr]": "Rendu de fichiers de présentation OpenDocument", + "Description[gl]": "Renderizador de ficheiros de presentación de OpenDocument", + "Description[it]": "Presentatore file OpenDocument Presentation", + "Description[nl]": "OpenDocument presentatiebestandsweergave", + "Description[pl]": "Wyświetlanie pliku prezentacji OpenDocument", + "Description[pt]": "Visualizador de ficheiros de Apresentações em OpenDocument", + "Description[pt_BR]": "Renderização de arquivos de Apresentação OpenDocument", + "Description[sk]": "Zobrazovač prezentácií OpenDocument", + "Description[sv]": "OpenDocument presentationsfilåtergivning", + "Description[uk]": "Засіб показу вмісту файлів ODP", + "Description[x-test]": "xxOpenDocument Presentation file rendererxx", + "Description[zh_CN]": "OpenDocument 演示文件渲染器", + "Id": "okularGenerator_odp_calligra", + "License": "GPL", "MimeTypes": [ - "application/vnd.oasis.opendocument.presentation", + "application/vnd.oasis.opendocument.presentation", "application/vnd.oasis.opendocument.presentation-template" - ], - "Name": "ODP Backend", - "Name[ca@valencia]": "Dorsal pels ODP", - "Name[ca]": "Dorsal pels ODP", - "Name[cs]": "Podpůrná vrstva ODP", - "Name[de]": "ODP-Backend", - "Name[es]": "Motor ODP", - "Name[fi]": "ODP-taustaosa", - "Name[fr]": "Moteur ODP", - "Name[gl]": "Infraestrutura ODP", - "Name[ia]": "Retro administration de ODP", - "Name[it]": "Motore ODP", - "Name[nl]": "ODP-backend", - "Name[pl]": "Silnik ODP", - "Name[pt]": "Infra-Estrutura para ODP", - "Name[pt_BR]": "Infraestrutura ODP", - "Name[sv]": "ODP-gränssnitt", - "Name[uk]": "Модуль обробки ODP", - "Name[x-test]": "xxODP Backendxx", - "Name[zh_CN]": "ODP 后端", + ], + "Name": "ODP Backend", + "Name[ca@valencia]": "Dorsal pels ODP", + "Name[ca]": "Dorsal pels ODP", + "Name[cs]": "Podpůrná vrstva ODP", + "Name[de]": "ODP-Backend", + "Name[es]": "Motor ODP", + "Name[fi]": "ODP-taustaosa", + "Name[fr]": "Moteur ODP", + "Name[gl]": "Infraestrutura ODP", + "Name[ia]": "Retro administration de ODP", + "Name[it]": "Motore ODP", + "Name[nl]": "ODP-backend", + "Name[pl]": "Silnik ODP", + "Name[pt]": "Infra-Estrutura para ODP", + "Name[pt_BR]": "Infraestrutura ODP", + "Name[sv]": "ODP-gränssnitt", + "Name[uk]": "Модуль обробки ODP", + "Name[x-test]": "xxODP Backendxx", + "Name[zh_CN]": "ODP 后端", "ServiceTypes": [ "okular/Generator" - ], + ], "Version": "2.99.5" - }, - "X-KDE-Priority": 1, - "X-KDE-okularAPIVersion": 1, + }, + "X-KDE-Priority": 1, + "X-KDE-okularAPIVersion": 1, "X-KDE-okularHasInternalSettings": false } diff --git a/extras/okularodtgenerator/libokularGenerator_odt.json b/extras/okularodtgenerator/libokularGenerator_odt.json index 345b08147fe..f4108cdf8d9 100644 --- a/extras/okularodtgenerator/libokularGenerator_odt.json +++ b/extras/okularodtgenerator/libokularGenerator_odt.json @@ -1,70 +1,70 @@ { "KPlugin": { "Authors": [ { - "Email": "sven.langkamp@gmail.com", - "Name": "Sven Langkamp", + "Email": "sven.langkamp@gmail.com", + "Name": "Sven Langkamp", "Name[x-test]": "xxSven Langkampxx" - }, + }, { - "Email": "kossebau@kde.org", - "Name": "Friedrich W. H. Kossebau", + "Email": "kossebau@kde.org", + "Name": "Friedrich W. H. Kossebau", "Name[x-test]": "xxFriedrich W. H. Kossebauxx" } - ], - "Copyright": "Copyright 2012-2016 Sven Langkamp, Friedrich W. H. Kossebau", - "Copyright[fi]": "Copyright 2012–2016 Sven Langkamp, Friedrich W. H. Kossebau", - "Copyright[gl]": "© 2012-2016 Sven Langkamp, Friedrich W. H. Kossebau", - "Copyright[uk]": "© Sven Langkamp, Friedrich W. H. Kossebau, 2012–2016", - "Copyright[x-test]": "xxCopyright 2012-2016 Sven Langkamp, Friedrich W. H. Kossebauxx", - "Description": "OpenDocument Text file renderer", - "Description[ca@valencia]": "Representació de fitxers de text d'OpenDocument", - "Description[ca]": "Representació de fitxers de text d'OpenDocument", - "Description[de]": "Renderer für OpenDocument-Text-Dokumente", - "Description[es]": "Motor de visualización para archivos de texto de OpenDocument", - "Description[fi]": "OpenDocument Text -tiedostohahmonnin", - "Description[fr]": "Rendu de fichiers de texte OpenDocument", - "Description[gl]": "Renderizador de ficheiros de texto de OpenDocument", - "Description[it]": "Presentatore file OpenDocument Text", - "Description[nl]": "OpenDocument tekstbestandsweergave", - "Description[pl]": "Wyświetlanie pliku tekstowego OpenDocument", - "Description[pt]": "Visualizador de ficheiros de Texto em OpenDocument", - "Description[pt_BR]": "Renderização de arquivos de Texto OpenDocument", - "Description[sk]": "Zobrazovač textov OpenDocument", - "Description[sv]": "OpenDocument textfilåtergivning", - "Description[uk]": "Засіб показу вмісту файлів ODT", - "Description[x-test]": "xxOpenDocument Text file rendererxx", - "Description[zh_CN]": "OpenDocument 文本文件渲染器", - "Id": "okularGenerator_odt_calligra", - "License": "GPL", + ], + "Copyright": "Copyright 2012-2016 Sven Langkamp, Friedrich W. H. Kossebau", + "Copyright[fi]": "Copyright 2012–2016 Sven Langkamp, Friedrich W. H. Kossebau", + "Copyright[gl]": "© 2012-2016 Sven Langkamp, Friedrich W. H. Kossebau", + "Copyright[uk]": "© Sven Langkamp, Friedrich W. H. Kossebau, 2012–2016", + "Copyright[x-test]": "xxCopyright 2012-2016 Sven Langkamp, Friedrich W. H. Kossebauxx", + "Description": "OpenDocument Text file renderer", + "Description[ca@valencia]": "Representació de fitxers de text d'OpenDocument", + "Description[ca]": "Representació de fitxers de text d'OpenDocument", + "Description[de]": "Renderer für OpenDocument-Text-Dokumente", + "Description[es]": "Motor de visualización para archivos de texto de OpenDocument", + "Description[fi]": "OpenDocument Text -tiedostohahmonnin", + "Description[fr]": "Rendu de fichiers de texte OpenDocument", + "Description[gl]": "Renderizador de ficheiros de texto de OpenDocument", + "Description[it]": "Presentatore file OpenDocument Text", + "Description[nl]": "OpenDocument tekstbestandsweergave", + "Description[pl]": "Wyświetlanie pliku tekstowego OpenDocument", + "Description[pt]": "Visualizador de ficheiros de Texto em OpenDocument", + "Description[pt_BR]": "Renderização de arquivos de Texto OpenDocument", + "Description[sk]": "Zobrazovač textov OpenDocument", + "Description[sv]": "OpenDocument textfilåtergivning", + "Description[uk]": "Засіб показу вмісту файлів ODT", + "Description[x-test]": "xxOpenDocument Text file rendererxx", + "Description[zh_CN]": "OpenDocument 文本文件渲染器", + "Id": "okularGenerator_odt_calligra", + "License": "GPL", "MimeTypes": [ - "application/vnd.oasis.opendocument.text", + "application/vnd.oasis.opendocument.text", "application/vnd.oasis.opendocument.text-template" - ], - "Name": "ODT Backend", - "Name[ca@valencia]": "Dorsal pels ODT", - "Name[ca]": "Dorsal pels ODT", - "Name[cs]": "Podpůrná vrstva ODT", - "Name[de]": "ODT-Backend", - "Name[es]": "Motor ODT", - "Name[fi]": "ODT-taustaosa", - "Name[fr]": "Moteur ODT", - "Name[gl]": "Infraestrutura de ODT", - "Name[it]": "Motore ODT", - "Name[nl]": "ODT-backend", - "Name[pl]": "Silnik ODT", - "Name[pt]": "Infra-Estrutura para ODT", - "Name[pt_BR]": "Infraestrutura ODT", - "Name[sv]": "ODT-gränssnitt", - "Name[uk]": "Модуль обробки ODT", - "Name[x-test]": "xxODT Backendxx", - "Name[zh_CN]": "ODT 后端", + ], + "Name": "ODT Backend", + "Name[ca@valencia]": "Dorsal pels ODT", + "Name[ca]": "Dorsal pels ODT", + "Name[cs]": "Podpůrná vrstva ODT", + "Name[de]": "ODT-Backend", + "Name[es]": "Motor ODT", + "Name[fi]": "ODT-taustaosa", + "Name[fr]": "Moteur ODT", + "Name[gl]": "Infraestrutura de ODT", + "Name[it]": "Motore ODT", + "Name[nl]": "ODT-backend", + "Name[pl]": "Silnik ODT", + "Name[pt]": "Infra-Estrutura para ODT", + "Name[pt_BR]": "Infraestrutura ODT", + "Name[sv]": "ODT-gränssnitt", + "Name[uk]": "Модуль обробки ODT", + "Name[x-test]": "xxODT Backendxx", + "Name[zh_CN]": "ODT 后端", "ServiceTypes": [ "okular/Generator" - ], + ], "Version": "2.99.5" - }, - "X-KDE-Priority": 1, - "X-KDE-okularAPIVersion": 1, + }, + "X-KDE-Priority": 1, + "X-KDE-okularAPIVersion": 1, "X-KDE-okularHasInternalSettings": false } diff --git a/filters/flow/wpg/import/calligra_filter_wpg2odg.desktop b/filters/flow/wpg/import/calligra_filter_wpg2odg.desktop index c602cd9c9ae..fdc289b88fb 100644 --- a/filters/flow/wpg/import/calligra_filter_wpg2odg.desktop +++ b/filters/flow/wpg/import/calligra_filter_wpg2odg.desktop @@ -1,36 +1,36 @@ [Desktop Entry] Type=Service Name=Flow WPG Import Filter Name[bs]=Flow WPG uvozni filter Name[ca]=Filtre d'importació WPG per al Flow Name[ca@valencia]=Filtre d'importació WPG per al Flow -Name[cs]=Importní filtr formátu SPG pro Flow +Name[cs]=Importní filtr formátu WPG pro Flow Name[da]=WPG-importfilter til Flow Name[de]=Flow WPG-Importfilter Name[el]=Φίλτρο εισαγωγής WPG του Flow Name[en_GB]=Flow WPG Import Filter Name[es]=Filtro de Flow de importación de WPG Name[et]=Flow WPG impordifilter Name[eu]=Flow-ren WPG inportazio-iragazkia Name[fi]=Flow’n WPG-tuontisuodatin Name[fr]=Filtre d'importation WPG Name[gl]=Filtro para Flow de importación de WPG Name[hu]=Flow WPG importszűrő Name[it]=Filtro di importazione WPG per Flow Name[ja]=Flow WPG インポートフィルタ Name[ko]=Flow용 WPG 가져오기 필터 Name[nb]=Flow WPG-importfilter Name[nl]=WPG-importfilter voor Flow Name[pl]=Filtr importu WPG do Schematów Name[pt]=Filtro de Importação de WPG para o Flow Name[pt_BR]=Filtro de importação de WPG para Flow Name[sk]=Importný filter Flow WPG Name[sv]=Flow WPG-importfilter Name[tr]=Flow WPG İçe Aktarma Filtresi Name[uk]=Фільтр імпортування WPG до Flow Name[x-test]=xxFlow WPG Import Filterxx X-KDE-Export=application/vnd.oasis.opendocument.graphics X-KDE-Import=application/x-wpg X-KDE-Weight=1 X-KDE-Library=calligra_filter_wpg2odg X-KDE-ServiceTypes=Calligra/Filter diff --git a/filters/sheets/applixspread/calligra_filter_applixspread2kspread.desktop b/filters/sheets/applixspread/calligra_filter_applixspread2kspread.desktop index 7d4bcc16c22..788980fa74f 100644 --- a/filters/sheets/applixspread/calligra_filter_applixspread2kspread.desktop +++ b/filters/sheets/applixspread/calligra_filter_applixspread2kspread.desktop @@ -1,68 +1,68 @@ [Desktop Entry] Type=Service Name=KSpread Applix Spreadsheet Import Filter Name[af]=Kspread Applix Spreiblad In voer Filter Name[bg]=Филтър за внасяне от Applix Spreadsheet в KSpread Name[br]=Sil enporzh al loger Applix evit KSpread Name[bs]=Unosni filter KSpread Applix proračunske tabele Name[ca]=Filtre d'importació per a fulls de càlcul Applix per al KSpread Name[ca@valencia]=Filtre d'importació per a fulls de càlcul Applix per al KSpread -Name[cs]=KSpread Applix Spreadsheet importní filtr +Name[cs]=Importní filtr tabulek KSpread Applix Name[cy]=Hidlen Fewnforio Taenlen Applix KSpread Name[da]=KSpread Applix regnearks-importfilter Name[de]=KSpread Applix-Spreadsheet-Importfilter Name[el]=Φίλτρο εισαγωγής φύλλου εργασίας Applix του KSpread Name[en_GB]=KSpread Applix Spreadsheet Import Filter Name[eo]=Appliks-tabelo-import-filtrilo por KSpread Name[es]=Filtro de KSpread de importación de hojas de cálculo de Applix Name[et]=KSpreadi Applixi tabelite impordifilter Name[eu]=KSpread-en Applix kalkulu-orrien inportazio-iragazkia Name[fa]=پالایه واردات صفحه گسترده KSpread Applix Name[fi]=KSpreadin Applix-laskentataulukkotuontisuodatin Name[fr]=Filtre d'importation Applix Spreadsheet de KSpread Name[fy]=KSpread Applix Spreadsheet Ymportfilter Name[ga]=Scagaire Iompórtála Scarbhileog Applix le haghaidh KSpread Name[gl]=Filtro para KSpread de importación de Applix Spreadsheet Name[he]=מסנן לייבוא גיליונות אלקטרוניים של Applix ל־KSpread Name[hi]=केस्प्रेड एप्लिक्स स्प्रेडशीट आयात फ़िल्टर Name[hne]=केस्प्रेड एप्लिक्स स्प्रेडसीट आयात फिल्टर Name[hr]=KSpread Applix Spreadsheet filtar uvoza Name[hu]=KSpread Applix munkafüzetek importszűrő Name[is]=KSpread Applix töflureiknis innflutningssía Name[it]=Filtro di importazione Applix Spreadsheet per KSpread Name[ja]=KSpread Applix スプレッドシート インポートフィルタ Name[kk]=Applix Spreadsheet -> KSpread импорт сүзгісі Name[ko]=KSpread용 Applix 스프레드시트 가져오기 필터 Name[lt]=KWord Applix elektroninės lentelės importo filtras Name[lv]=KSpread Applix tabullapu importa filtrs Name[mr]=के-स्प्रेड एप्लिक्स स्प्रेडशीट आयात गाळणी Name[ms]=Penapis Import KSpread Applix Spreadsheet Name[nb]=Applix-regnearkimportfilter for KSpread Name[nds]="Applix-Tabellenutreken"-Importfilter för KSpread Name[ne]=केडीई स्प्रेड एप्लिक्स स्प्रेडसिट आयात फिल्टर Name[nl]=Applix Spreadsheet-importfilter voor KSpread Name[pl]=Filtr importu arkusza kalkulacyjnego Applix do KSpread Name[pt]=Filtro de Importação de Applix Spreadsheet para o KSpread Name[pt_BR]=Filtro de importação de Applix Spreadsheet para KSpread Name[ro]=Filtru importare KSpread pentru Applix Name[ru]=Фильтр импорта таблиц Applix Spreadsheet в KSpread Name[se]=KSpread:a Applix Spreadsheet-sisafievrridansilli Name[sk]=Applix Spreadsheet filter pre import pre KSpread Name[sl]=Uvozni filter Applix Spreadsheet za KSpread Name[sv]=Kspread-importfilter för Applix-kalkylark Name[ta]=கேஸ்பெரட் ஆப்பிலிக்ஸின் தாள்விரிப்பு இறக்குமதி வடிகட்டி Name[tg]=Филтри воридотии ҷадвалҳои KSpread Applix Name[tr]=KSpread Applix Hesap Tablosu Alma Filtresi Name[uk]=Фільтр імпортування Applix Spreadsheet для KSpread Name[uz]=KSpread Applix elektron jadval import filteri Name[uz@cyrillic]=KSpread Applix электрон жадвал импорт филтери Name[wa]=Passete d' abagaedje des tåveas Applix di KSpread Name[xh]=Isihluzi Sokurhweba se KSpread Applix Spreadsheet Name[x-test]=xxKSpread Applix Spreadsheet Import Filterxx Name[zh_CN]=KSpread Applix 电子表格导入过滤器 Name[zh_TW]=KSpread Applix 電子表單匯入過濾程式 X-KDE-Export=application/x-kspread X-KDE-Import=application/x-applix-spreadsheet X-KDE-Weight=1 X-KDE-Library=calligra_filter_applixspread2kspread X-KDE-ServiceTypes=Calligra/Filter diff --git a/filters/sheets/gnumeric/status.html b/filters/sheets/gnumeric/status.html index 123dc91dee0..d43111d4098 100644 --- a/filters/sheets/gnumeric/status.html +++ b/filters/sheets/gnumeric/status.html @@ -1,304 +1,304 @@ Calligra filters status: HTML FILTER

Calligra filters status:   GNUmeric (GNOME spreadsheet)


Import | Export
 
 

Up
Import GNUmeric for Kspread
Last update February 6, 2005
Features Vertical & Horizontal Alignment, text wrapping, indention
Background, Patter & Foreground color
Fonts:
                Size
                Underline
                Italic
                Bold
                Family
Multiple Sheets (Tables)
Formulas!!! (ExprID)
Selections: selected cells, last selected table
Cell Formats (e.g. Date, Time, Percent, different currencies ...) -
Number formating (in brackets, red colored) +
Number formatting (in brackets, red colored)
Comments
Page: size, orientation, borders, header and footer
Border: color, style, width for all 6 types
Background pattern: style, color
Cell Size: Horizontal & Vertical 
Hidden Columns
Default row heights and column widths
Area name
Links
merge cells
Text Rotation
Print repeate col/row
Cell validation
Document Information
           Author
           Company
           Comments
           Title
           Keywords
Todo Cell Size: Horizontal & Vertical (Export) (kspread  doesn't support retriving the first "rowFormat" and colFormat".)
               
                       19 Applix small circle
                       20 Applix semicircle
                       21 Applix small thatch
                       22 Applix round thatch
                       23 Applix Brick => all unsupported by KSpread
(a=b) for gnumeric vs. (a==b) for kspread
if(a,b,c) for gnumeric vs. if(a;b;c) for kspread
GNUmeric version differentiation
border style: double, hair (KSpread doesn't support them)
charts
exact number, time and date formats (need the upcoming style engine)
pictures (unsupported by KSpread)
Alignment: fill, justify, center across selection (not supported by kspread)
Accurate progress bar

Document Information
          Application (kspread  doesn't support it.)
          Category (kspread  doesn't support it.)
          Manager (kspread  doesn't support it.)

Vertical Text        (gnumeric doesn't support it.)
Zoom                    (kspread  doesn't support it.)
Multiple Selections (kspread  doesn't support it.)
Double Underline    (kspread  doesn't support it.)

History Jun/Jul 2001 - Initial Revision
Jul 10, 2001 - Support for hidden columns
Jul 12, 2001 - Support for Document Information
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 +
Aug 21, 2002 - font family, wrap text, number formatting, precisions
Sep 05, 2002 - bugfixes, default sizes, row and column layouts
Sep 07, 2002 - bugfixes, preliminery date/time support
Feb 03, 2005 - export area name
Feb 06, 2005 - cells merged
Feb 08, 2005 - Text Rotation
Feb 19, 2005 - Cell validation
Authors Phillip Ezolt
Norbert Andres
Laurent Montel
This filter is based on the CSV filter by David Faure   Werner Trobin
Links www.calligra.org 
www.gnumeric.org
Progress report  This has been tested against GNUmeric v0.70 and calligra v1.3-alpha. 

I've tried to keep the import/export filters pretty much in sync. 

Up
 



 
 

Up
Export Kspread to GNUmeric
Last update February 14, 2005
Features Vertical & Horizontal Alignment
Background & Foreground color
Fonts:
                Size
                Underline
                Italic
                Bold
Multiple Sheets (Tables)
Formulas!!! (ExprID)
Selections
Cell Size: Horizontal & Vertical
Hidden columns/rows 
Selected Tab
Paper layout
area name
Cell comment
Text Rotation
Borders
Repeate print column/row
Cell validation
(a=b) for gnumeric vs. (a==b) for kspread
Document Information
           Author
           Company
           Comments
           Title
           Keywords
Todo Formats:
                Percentages
                Money
Background patterns & Colors
              If color is the default color do NOT set it in the export file. 
Font:
                Face Name
if(a,b,c) for gnumeric vs. if(a;b;c) for kspread
GNUmeric version differentiation
Accurate progress bar

Document Information
          Application (kspread  doesn't support it.)
          Category (kspread  doesn't support it.)
          Manager (kspread  doesn't support it.)
Vertical Text       (gnumeric doesn't support it.)
Zoom                (kspread  doesn't support it.)
Multiple Selections (kspread  doesn't support it.)
Double Underline    (kspread  doesn't support it.)

History Jun/Jul 2001 - Initial Revision
Jul 10, 2001 - Support for hidden columns
Jul 12, 2001 - Document Information
Feb 5, 2005 - Cell comment
Feb 8, 2005 - Text Rotation
Feb 10, 2005 - Repeate print col/row
Feb 14, 2005 - Cell Validation
Authors Phillip Ezolt
Laurent Montel
This filter is based on the CSV filter by David Faure   Werner Trobin
Links www.calligra.org
www.gnumeric.org
Progress report  This has been tested against GNUmeric v1.4.2 and calligra v1.4cvs.

I've tried to keep the import/export filters pretty much in sync. 

Up diff --git a/filters/sheets/opencalc/opencalcimport.cc b/filters/sheets/opencalc/opencalcimport.cc index 15c6b90c6ae..647addab660 100644 --- a/filters/sheets/opencalc/opencalcimport.cc +++ b/filters/sheets/opencalc/opencalcimport.cc @@ -1,2367 +1,2367 @@ /* This file is part of the KDE project Copyright (C) 2002 Norbert Andres Copyright (C) 2004 - 2005 Laurent Montel This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ #include "opencalcimport.h" #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 #include #include #include #define SECSPERDAY (24 * 60 * 60) using namespace Calligra::Sheets; K_PLUGIN_FACTORY_WITH_JSON(OpenCalcImportFactory, "calligra_filter_opencalc2sheets.json", registerPlugin();) OpenCalcImport::OpenCalcPoint::OpenCalcPoint(QString const & str) : isRange(false) { bool inQuote = false; int l = str.length(); int colonPos = -1; QString range; // replace '.' with '!' for (int i = 0; i < l; ++i) { if (str[i] == '$') continue; if (str[i] == '\'') { inQuote = !inQuote; } else if (str[i] == '.') { if (!inQuote) { if (i != 0 && i != (colonPos + 1)) // no empty table names range += '!'; } else range += '.'; } else if (str[i] == ':') { if (!inQuote) { isRange = true; colonPos = i; } range += ':'; } else range += str[i]; } translation = range; const Calligra::Sheets::Region region(range); table = region.firstSheet()->sheetName(); topLeft = region.firstRange().topLeft(); botRight = region.firstRange().bottomRight(); } OpenCalcImport::OpenCalcImport(QObject* parent, const QVariantList &) : KoFilter(parent) { } OpenCalcImport::~OpenCalcImport() { foreach(KoXmlElement* style, m_styles) delete style; foreach(Calligra::Sheets::Style* style, m_defaultStyles) delete style; foreach(QString* format, m_formats) delete format; } double timeToNum(int h, int m, int s) { int secs = h * 3600 + m * 60 + s; return (double) secs / (double) SECSPERDAY; } bool OpenCalcImport::readRowFormat(KoXmlElement & rowNode, KoXmlElement * rowStyle, Sheet * table, int & row, int & number, bool isLast) { if (rowNode.isNull()) return false; KoXmlNode node; if (rowStyle) { node = rowStyle->firstChild(); kDebug(30518) << "RowStyle:" << rowStyle << "," << rowStyle->tagName(); } double height = -1.0; bool insertPageBreak = false; Style layout; while (!node.isNull()) { KoXmlElement property = node.toElement(); kDebug(30518) << "Row: Child exists:" << property.tagName(); if (!property.isNull() && property.localName() == "properties" && property.namespaceURI() == ooNS::style) { if (property.hasAttributeNS(ooNS::style, "row-height")) { height = KoUnit::parseValue(property.attributeNS(ooNS::style, "row-height", QString()) , -1); } if (property.hasAttributeNS(ooNS::fo, "break-before")) { if (property.attributeNS(ooNS::fo, "break-before", QString()) == "page") { insertPageBreak = true; } } loadStyleProperties(&layout, property); } node = node.nextSibling(); } if (rowNode.hasAttributeNS(ooNS::table, "number-rows-repeated")) { bool ok = true; int n = rowNode.attributeNS(ooNS::table, "number-rows-repeated", QString()).toInt(&ok); if (ok) number = n; kDebug(30518) << "Row repeated:" << number; } if (isLast) { if (number > 30) number = 30; } else { if (number > 256) number = 256; } if (height != -1) table->rowFormats()->setRowHeight(row, row+number-1, height); for (int i = 0; i < number; ++i) { table->cellStorage()->setStyle(Calligra::Sheets::Region(QRect(1, row, KS_colMax, 1)), layout); Q_UNUSED(insertPageBreak); //for now, as long as below code is commented. // if ( insertPageBreak ) TODO: // rowL->setPageBreak( true ) // kDebug(30518) <<"Added RowFormat:" << row; ++row; } return true; } QString OpenCalcImport::translatePar(QString & par) const { OpenCalcPoint point(par); kDebug(30518) << " Parameter:" << par << ", Translation:" << point.translation; return point.translation; } void OpenCalcImport::checkForNamedAreas(QString & formula) const { int l = formula.length(); int i = 0; QString word; int start = 0; while (i < l) { if (formula[i].isLetterOrNumber()) { word += formula[i]; ++i; continue; } if (word.length() > 0) { if (m_namedAreas.contains(word)) { formula.replace(start, word.length(), '\'' + word + '\''); l = formula.length(); ++i; kDebug(30518) << "Formula:" << formula << ", L:" << l << ", i:" << i + 1; } } ++i; word = ""; start = i; } if (word.length() > 0) { if (m_namedAreas.contains(word)) { formula.replace(start, word.length(), '\'' + word + '\''); l = formula.length(); ++i; kDebug(30518) << "Formula:" << formula << ", L:" << l << ", i:" << i + 1; } } } void OpenCalcImport::convertFormula(QString & text, QString const & f) const { // TODO Stefan: Check if Oasis::decodeFormula could be used instead kDebug(30518) << "Parsing formula:" << f; QString formula; QString parameter; int l = f.length(); int p = 0; while (p < l) { if (f[p] == '(' || f[p] == '[') { break; } formula += f[p]; ++p; } if (parameter.isEmpty()) { checkForNamedAreas(formula); } kDebug(30518) << "Formula:" << formula << ", Parameter:" << parameter << ", P:" << p; // replace formula names here if (formula == "=MULTIPLE.OPERATIONS") formula = "=MULTIPLEOPERATIONS"; QString par; bool isPar = false; bool inQuote = false; while (p < l) { if (f[p] == '"') { inQuote = !inQuote; parameter += '"'; } else if (f[p] == '[') { if (!inQuote) isPar = true; else parameter += '['; } else if (f[p] == ']') { if (inQuote) { parameter += ']'; continue; } isPar = false; parameter += translatePar(par); par.clear(); } else if (isPar) { par += f[p]; } else if (f[p] == '=') { // TODO: check if StarCalc has a '==' sometimes if (inQuote) parameter += '='; else parameter += "=="; } else if (f[p] == ')') { if (!inQuote) parameter += ')'; } else parameter += f[p]; ++p; if (p == l) checkForNamedAreas(parameter); } text = formula + parameter; kDebug(30518) << "New formula:" << text; } bool OpenCalcImport::readCells(KoXmlElement & rowNode, Sheet * table, int row, int & columns) { ValueParser *const parser = table->map()->parser(); bool ok = true; int spanC = 1; int spanR = 1; //Cell* defCell = table->defaultCell(); KoXmlNode cellNode = KoXml::namedItemNS(rowNode, ooNS::table, "table-cell"); while (!cellNode.isNull()) { spanR = 1; spanC = 1; KoXmlElement e = cellNode.toElement(); if (e.isNull()) { ++columns; cellNode = cellNode.nextSibling(); continue; } Cell cell; kDebug(30518) << " Cell:" << columns << "," << row; // ="3" table:number-rows-spanned="1" if (e.hasAttributeNS(ooNS::table, "number-columns-spanned")) { int span = e.attributeNS(ooNS::table, "number-columns-spanned", QString()).toInt(&ok); if (ok) spanC = span; } if (e.hasAttributeNS(ooNS::table, "number-rows-spanned")) { int span = e.attributeNS(ooNS::table, "number-rows-spanned", QString()).toInt(&ok); if (ok) spanR = span; } QString text; KoXmlElement textP = KoXml::namedItemNS(e, ooNS::text, "p"); if (!textP.isNull()) { KoXmlElement subText = textP.firstChild().toElement(); // ## wrong if (!subText.isNull()) { // something in , e.g. links text = subText.text(); if (subText.hasAttributeNS(ooNS::xlink, "href")) { QString link = subText.attributeNS(ooNS::xlink, "href", QString()); if (link[0] == '#') link = link.remove(0, 1); if (!cell) cell = Cell(table, columns, row); cell.setLink(link); } } else - text = textP.text(); // our text, could contain formating for value or result of formula + text = textP.text(); // our text, could contain formatting for value or result of formula } KoXmlElement annotation = KoXml::namedItemNS(e, ooNS::office, "annotation"); if (!annotation.isNull()) { QString comment; KoXmlNode node = annotation.firstChild(); while (!node.isNull()) { KoXmlElement commentElement = node.toElement(); if (!commentElement.isNull()) if (commentElement.localName() == "p" && e.namespaceURI() == ooNS::text) { if (!comment.isEmpty()) comment.append('\n'); comment.append(commentElement.text()); } node = node.nextSibling(); } if (!comment.isEmpty()) { kDebug(30518) << " columns :" << columns << " row :" << row; Cell(table, columns, row).setComment(comment); } } kDebug(30518) << "Contains:" << text; bool isFormula = false; if (e.hasAttributeNS(ooNS::table, "style-name")) { if (!cell) cell = Cell(table, columns, row); Style style = cell.style(); QString psName("Default"); if (e.hasAttributeNS(ooNS::style, "parent-style-name")) psName = e.attributeNS(ooNS::style, "parent-style-name", QString()); kDebug(30518) << "Default style:" << psName; Style * layout = m_defaultStyles[psName]; if (layout) style = *layout; KoXmlElement * st = 0; if (e.hasAttributeNS(ooNS::table, "style-name")) { kDebug(30518) << "Style:" << e.attributeNS(ooNS::table, "style-name", QString()); st = m_styles[ e.attributeNS(ooNS::table, "style-name", QString())]; } if (st) { kDebug(30518) << "Style: adapting"; KoXmlNode node = st->firstChild(); bool foundValidation = false; while (!node.isNull()) { KoXmlElement property = node.toElement(); if (!property.isNull()) { kDebug(30518) << "property.tagName() :" << property.tagName(); if (property.localName() == "map" && property.namespaceURI() == ooNS::style && !foundValidation) { loadCondition(cell, property); foundValidation = true; } if (property.localName() == "properties" && property.namespaceURI() == ooNS::style) { loadStyleProperties(&style, property); if (style.angle() != 0) { QFontMetrics fm(style.font()); int tmpAngle = style.angle(); int textHeight = static_cast(cos(tmpAngle * M_PI / 180) * (fm.ascent() + fm.descent()) + abs((int)(fm.width(cell.displayText()) * sin(tmpAngle * M_PI / 180)))); /* int textWidth = static_cast( abs ( ( int ) ( sin( tmpAngle * M_PI / 180 ) * ( fm.ascent() + fm.descent() ) ) ) + fm.width( cell.displayText() ) * cos( tmpAngle * M_PI / 180 ) ); */ kDebug(30518) << "Rotation: height:" << textHeight; if (table->rowFormats()->rowHeight(row) < textHeight) table->rowFormats()->setRowHeight(row, row, textHeight + 2); } } } node = node.nextSibling(); } } } else { QString psName("Default"); kDebug(30518) << "Default style:" << psName; Style * layout = m_defaultStyles[psName]; if (layout) table->cellStorage()->setStyle(Calligra::Sheets::Region(QPoint(columns, row)), *layout); } if (e.hasAttributeNS(ooNS::table, "formula")) { isFormula = true; QString formula; convertFormula(formula, e.attributeNS(ooNS::table, "formula", QString())); if (!cell) cell = Cell(table, columns, row); cell.setUserInput(formula); } if (e.hasAttributeNS(ooNS::table, "validation-name")) { kDebug(30518) << " Celle has a validation :" << e.attributeNS(ooNS::table, "validation-name", QString()); loadOasisValidation(Cell(table, columns, row).validity(), e.attributeNS(ooNS::table, "validation-name", QString()), parser); } if (e.hasAttributeNS(ooNS::table, "value-type")) { if (!cell) cell = Cell(table, columns, row); Style style; cell.setUserInput(text); QString value = e.attributeNS(ooNS::table, "value", QString()); QString type = e.attributeNS(ooNS::table, "value-type", QString()); kDebug(30518) << "Value:" << value << ", type:" << type; bool ok = false; double dv = 0.0; if ((type == "float") || (type == "currency")) { dv = value.toDouble(&ok); if (ok) { if (!isFormula) cell.setValue(Value(dv)); if (type == "currency") { Currency currency(e.attributeNS(ooNS::table, "currency", QString())); style.setCurrency(currency); style.setFormatType(Format::Money); } } } else if (type == "percentage") { dv = value.toDouble(&ok); if (ok) { if (!isFormula) cell.setValue(Value(dv)); //TODO fixme //cell.setFactor( 100 ); // TODO: replace with custom... style.setFormatType(Format::Percentage); } } else if (type == "boolean") { if (value.isEmpty()) value = e.attributeNS(ooNS::table, "boolean-value", QString()); kDebug(30518) << "Type: boolean"; if (value == "true") cell.setValue(Value(true)); else cell.setValue(Value(false)); ok = true; style.setFormatType(Format::Custom); } else if (type == "date") { if (value.isEmpty()) value = e.attributeNS(ooNS::table, "date-value", QString()); kDebug(30518) << "Type: date, value:" << value; // "1980-10-15" int year = 0, month = 0, day = 0; ok = false; int p1 = value.indexOf('-'); if (p1 > 0) year = value.left(p1).toInt(&ok); kDebug(30518) << "year:" << value.left(p1); int p2 = value.indexOf('-', ++p1); if (ok) month = value.mid(p1, p2 - p1).toInt(&ok); kDebug(30518) << "month:" << value.mid(p1, p2 - p1); if (ok) day = value.right(value.length() - p2 - 1).toInt(&ok); kDebug(30518) << "day:" << value.right(value.length() - p2); if (ok) { QDateTime dt(QDate(year, month, day)); // KSpreadValue kval( dt ); // cell.setValue( kval ); cell.setValue(Value(QDate(year, month, day), cell.sheet()->map()->calculationSettings())); kDebug(30518) << "Set QDate:" << year << " -" << month << " -" << day; } } else if (type == "time") { if (value.isEmpty()) value = e.attributeNS(ooNS::table, "time-value", QString()); kDebug(30518) << "Type: time:" << value; // "PT15H10M12S" int hours = 0, minutes = 0, seconds = 0; int l = value.length(); QString num; for (int i = 0; i < l; ++i) { if (value[i].isNumber()) { num += value[i]; continue; } else if (value[i] == 'H') hours = num.toInt(&ok); else if (value[i] == 'M') minutes = num.toInt(&ok); else if (value[i] == 'S') seconds = num.toInt(&ok); else continue; kDebug(30518) << "Num:" << num; num.clear(); if (!ok) break; } kDebug(30518) << "Hours:" << hours << "," << minutes << "," << seconds; if (ok) { // KSpreadValue kval( timeToNum( hours, minutes, seconds ) ); // cell.setValue( kval ); cell.setValue(Value(QTime(hours % 24, minutes, seconds))); style.setFormatType(Format::Custom); } } cell.setStyle(style); if (!ok) // just in case we couldn't set the value directly cell.parseUserInput(text); } else if (!text.isEmpty()) { if (!cell) cell = Cell(table, columns, row); cell.parseUserInput(text); } if (spanR > 1 || spanC > 1) { if (!cell) cell = Cell(table, columns, row); cell.mergeCells(columns, row, spanC - 1, spanR - 1); } cellNode = cellNode.nextSibling(); if (e.hasAttributeNS(ooNS::table, "number-columns-repeated")) { // copy cell from left bool ok = false; int number = e.attributeNS(ooNS::table, "number-columns-repeated", QString()).toInt(&ok); Cell cellDest; // don't repeat more than 10 if it is the last cell and empty if (!ok || cellNode.isNull()) { if (number > 10) number = 10; } for (int i = 1; i < number; ++i) { ++columns; if (!cell.isNull()) { cellDest = Cell(table, columns, row); cellDest.copyAll(cell); } } } ++columns; } return true; } void OpenCalcImport::loadCondition(const Cell& cell, const KoXmlElement &property) { kDebug(30518) << "void OpenCalcImport::loadCondition( Cell*cell,const KoXmlElement &property )*******"; loadOasisCondition(cell, property); } void OpenCalcImport::loadOasisCondition(const Cell& cell, const KoXmlElement &property) { KoXmlElement elementItem(property); Map *const map = cell.sheet()->map(); ValueParser *const parser = map->parser(); QLinkedList cond; while (!elementItem.isNull()) { kDebug(30518) << "elementItem.tagName() :" << elementItem.tagName(); if (elementItem.localName() == "map" && property.namespaceURI() == ooNS::style) { bool ok = true; kDebug(30518) << "elementItem.attribute(style:condition ) :" << elementItem.attributeNS(ooNS::style, "condition", QString()); Conditional newCondition; loadOasisConditionValue(elementItem.attributeNS(ooNS::style, "condition", QString()), newCondition, parser); if (elementItem.hasAttributeNS(ooNS::style, "apply-style-name")) { kDebug(30518) << "elementItem.attribute( style:apply-style-name ) :" << elementItem.attributeNS(ooNS::style, "apply-style-name", QString()); newCondition.styleName = elementItem.attributeNS(ooNS::style, "apply-style-name", QString()); ok = !newCondition.styleName.isEmpty(); } if (ok) cond.append(newCondition); else kDebug(30518) << "Error loading condition" << elementItem.nodeName(); } elementItem = elementItem.nextSibling().toElement(); } if (!cond.isEmpty()) { Conditions conditions; conditions.setConditionList(cond); Cell(cell).setConditions(conditions); } } void OpenCalcImport::loadOasisConditionValue(const QString &styleCondition, Conditional &newCondition, const ValueParser *parser) { QString val(styleCondition); if (val.contains("cell-content()")) { val = val.remove("cell-content()"); loadOasisCondition(val, newCondition, parser); } //GetFunction ::= cell-content-is-between(Value, Value) | cell-content-is-not-between(Value, Value) //for the moment we support just int/double value, not text/date/time :( if (val.contains("cell-content-is-between(")) { val.remove("cell-content-is-between("); val.remove(')'); QStringList listVal = val.split(','); kDebug(30518) << " listVal[0] :" << listVal[0] << " listVal[1] :" << listVal[1]; newCondition.value1 = parser->parse(listVal[0]); newCondition.value2 = parser->parse(listVal[1]); newCondition.cond = Conditional::Between; } if (val.contains("cell-content-is-not-between(")) { val.remove("cell-content-is-not-between("); val.remove(')'); QStringList listVal = val.split(','); kDebug(30518) << " listVal[0] :" << listVal[0] << " listVal[1] :" << listVal[1]; newCondition.value1 = parser->parse(listVal[0]); newCondition.value2 = parser->parse(listVal[1]); newCondition.cond = Conditional::Different; } } void OpenCalcImport::loadOasisCondition(QString &valExpression, Conditional &newCondition, const ValueParser *parser) { QString value; if (valExpression.indexOf("<=") == 0) { value = valExpression.remove(0, 2); newCondition.cond = Conditional::InferiorEqual; } else if (valExpression.indexOf(">=") == 0) { value = valExpression.remove(0, 2); newCondition.cond = Conditional::SuperiorEqual; } else if (valExpression.indexOf("!=") == 0) { //add Differentto attribute value = valExpression.remove(0, 2); newCondition.cond = Conditional::DifferentTo; } else if (valExpression.indexOf('<') == 0) { value = valExpression.remove(0, 1); newCondition.cond = Conditional::Inferior; } else if (valExpression.indexOf('>') == 0) { value = valExpression.remove(0, 1); newCondition.cond = Conditional::Superior; } else if (valExpression.indexOf('=') == 0) { value = valExpression.remove(0, 1); newCondition.cond = Conditional::Equal; } else kDebug(30518) << " I don't know how to parse it :" << valExpression; kDebug(30518) << " value :" << value; newCondition.value1 = parser->parse(value); } bool OpenCalcImport::readRowsAndCells(KoXmlElement & content, Sheet * table) { kDebug(30518) << "Reading in rows"; int i = 1; int row = 1; int columns = 1; int backupRow = 1; KoXmlElement * rowStyle = 0; //Cell cell; //Cell cellDest; //Cell defCell = table->defaultCell(); KoXmlNode rowNode = KoXml::namedItemNS(content, ooNS::table, "table-row"); while (!rowNode.isNull()) { bool collapsed = false; int number = 1; KoXmlElement r = rowNode.toElement(); if (r.isNull()) return false; if (r.hasAttributeNS(ooNS::table, "style-name")) { QString style = r.attributeNS(ooNS::table, "style-name", QString()); rowStyle = m_styles[ style ]; kDebug(30518) << "Row style:" << style; } collapsed = (r.attributeNS(ooNS::table, "visibility", QString()) == "collapse"); backupRow = row; rowNode = rowNode.nextSibling(); if (!readRowFormat(r, rowStyle, table, row, number, rowNode.isNull())) // updates "row" return false; if (!readCells(r, table, backupRow, columns)) return false; // RowFormat * srcLayout = table->nonDefaultRowFormat(backupRow); // RowFormat * layout = 0; if (collapsed) table->rowFormats()->setHidden(backupRow, backupRow, true); for (i = 1; i < number; ++i) { // FIXME CALLIGRA_SHEETS_NEW_STYLE_STORAGE // layout = table->nonDefaultRowFormat( backupRow + i ); // // table->setStyle( Calligra::Sheets::Region(QRect(1,backupRow + i,KS_colMax,1)), srcLayout ); /* * TODO: Test: do we need to copy the cells, too? * if so we will probably also need to copy them for repeated col layouts. for ( j = 1; j <= columns; ++j ) { Cell cell( table, j, backupRow ); kDebug(30518) <<"Cell:" << cell <<"DefCell:" << defCell; if ( cell && (cell != defCell) ) { cellDest = Cell( table, j, backupRow + i ); cellDest->copyAll( cell ); } } */ } rowStyle = 0; columns = 1; } kDebug(30518) << "Reading in rows done"; return true; } bool OpenCalcImport::readColLayouts(KoXmlElement & content, Sheet * table) { kDebug(30518) << "Reading in columns..."; KoXmlNode colLayout = KoXml::namedItemNS(content, ooNS::table, "table-column"); int column = 1; while (!colLayout.isNull()) { if (colLayout.nodeName() != "table:table-column") return true; // all cols read in. KoXmlElement e = colLayout.toElement(); if (e.isNull()) return false; // error, that's it... kDebug(30518) << "New column:" << column; int number = 1; double width = -1.0; bool collapsed = (e.attributeNS(ooNS::table, "visibility", QString()) == "collapse"); bool insertPageBreak = false; Style styleLayout; kDebug(30518) << "Check table:number-columns-repeated"; if (e.hasAttributeNS(ooNS::table, "number-columns-repeated")) { bool ok = true; number = e.attributeNS(ooNS::table, "number-columns-repeated", QString()).toInt(&ok); if (!ok) number = 1; kDebug(30518) << "Repeated:" << number; } kDebug(30518) << "Checking table:default-cell-style-name"; if (e.hasAttributeNS(ooNS::table, "default-cell-style-name")) { QString n(e.attributeNS(ooNS::table, "default-cell-style-name", QString())); kDebug(30518) << "Has attribute default-cell-style-name:" << n; Style * defaultStyle = m_defaultStyles[ n ]; if (!defaultStyle) { QString name = e.attributeNS(ooNS::table, "default-cell-style-name", QString()); KoXmlElement * st = m_styles[ name ]; kDebug(30518) << "Default cell style:" << name; if (st && !st->isNull()) { Style * layout = new Style(); readInStyle(layout, *st); m_defaultStyles.insert(name, layout); kDebug(30518) << "Insert default cell style:" << name; defaultStyle = layout; } } if (defaultStyle) { // kDebug(30518) <<"Copying default style, Font:" << defaultStyle->font().toString(); styleLayout = *defaultStyle; } } KoXmlElement * colStyle = 0; if (e.hasAttributeNS(ooNS::table, "style-name")) { QString style = e.attributeNS(ooNS::table, "style-name", QString()); colStyle = m_styles[ style ]; kDebug(30518) << "Col Style:" << style; } KoXmlNode node; if (colStyle) node = colStyle->firstChild(); while (!node.isNull()) { KoXmlElement property = node.toElement(); if (!property.isNull() && property.localName() == "properties" && property.namespaceURI() == ooNS::style) { if (property.hasAttributeNS(ooNS::style, "column-width")) { QString sWidth = property.attributeNS(ooNS::style, "column-width", QString()); width = KoUnit::parseValue(property.attributeNS(ooNS::style, "column-width", QString()), width); kDebug(30518) << "Col Width:" << sWidth; } if (property.hasAttributeNS(ooNS::fo, "break-before")) { if (property.attributeNS(ooNS::fo, "break-before", QString()) == "page") { insertPageBreak = true; } } loadStyleProperties(&styleLayout, property); } node = node.nextSibling(); } colLayout = colLayout.nextSibling(); if (colLayout.isNull() && (number > 30)) number = 30; for (int i = 0; i < number; ++i) { kDebug(30518) << "Inserting colLayout:" << column; ColumnFormat * col = new ColumnFormat(); col->setSheet(table); col->setColumn(column); table->cellStorage()->setStyle(Calligra::Sheets::Region(QRect(column, 1, 1, KS_rowMax)), styleLayout); if (width != -1.0) col->setWidth(width); Q_UNUSED(insertPageBreak); //TODO // if ( insertPageBreak ) // col->setPageBreak( true ) if (collapsed) col->setHidden(true); table->insertColumnFormat(col); ++column; } } return true; } void replaceMacro(QString & text, QString const & old, QString const & newS) { int n = text.indexOf(old); if (n != -1) text.replace(n, old.length(), newS); } QString getPart(KoXmlNode const & part) { QString result; KoXmlElement e = KoXml::namedItemNS(part, ooNS::text, "p"); while (!e.isNull()) { QString text = e.text(); kDebug(30518) << "PART:" << text; KoXmlElement macro = KoXml::namedItemNS(e, ooNS::text, "time"); if (!macro.isNull()) replaceMacro(text, macro.text(), "