diff options
Diffstat (limited to 'lib')
40 files changed, 1023 insertions, 51 deletions
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt new file mode 100644 index 000000000..645b05fce --- /dev/null +++ b/lib/CMakeLists.txt @@ -0,0 +1,25 @@ +############################################################################### +# Trinity KOffice # +# --------------- # +# This file is licensed under the terms of GNU GPL v3 or later. # +# Improvements and feedback are welcome. # +############################################################################### + +add_subdirectory(store) +add_subdirectory(kwmf) +add_subdirectory(kofficecore) +add_subdirectory(kofficeui) +add_subdirectory(koproperty) +tde_conditional_add_subdirectory(BUILD_KROSS kross) + +# All applications except for Kexi need the following components +if (BUILD_CHALK OR BUILD_KARBON OR BUILD_KCHART OR BUILD_KGANTT OR + BUILD_KFORMULA OR BUILD_KIVIO OR BUILD_KOSHELL OR BUILD_KPLATO OR + BUILD_KPRESENTER OR BUILD_KSPREAD OR BUILD_KUGAR OR BUILD_KWORD) + add_subdirectory(kotext) + add_subdirectory(kformula) + add_subdirectory(kopalette) + tde_conditional_add_subdirectory(BUILD_KOPAINTER kopainter) +endif() + +# kate: indent-width 2; replace-tabs true;
\ No newline at end of file diff --git a/lib/ConfigureChecks.cmake b/lib/ConfigureChecks.cmake new file mode 100644 index 000000000..5dc7d7566 --- /dev/null +++ b/lib/ConfigureChecks.cmake @@ -0,0 +1,15 @@ +############################################################################### +# Trinity KOffice # +# --------------- # +# This file is licensed under the terms of GNU GPL v3 or later. # +# Improvements and feedback are welcome. # +############################################################################### + +find_program(HAVE_MAKETDEWIDGETS maketdewidgets) +if (NOT HAVE_MAKETDEWIDGETS) + message(WARNING "maketdewidgets not found, won't generate Designer widgets") +endif() + +if (BUILD_KROSS) + include(lib/kross/ConfigureChecks.cmake) +endif()
\ No newline at end of file diff --git a/lib/kformula/CMakeLists.txt b/lib/kformula/CMakeLists.txt new file mode 100644 index 000000000..ee3df6cc4 --- /dev/null +++ b/lib/kformula/CMakeLists.txt @@ -0,0 +1,70 @@ +############################################################################### +# Trinity KOffice # +# --------------- # +# This file is licensed under the terms of GNU GPL v3 or later. # +# Improvements and feedback are welcome. # +############################################################################### + +include_directories( + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_SOURCE_DIR}/lib/kofficecore + ${CMAKE_SOURCE_DIR}/lib/kofficeui + ${CMAKE_SOURCE_DIR}/lib/store + ${CMAKE_SOURCE_DIR}/lib/kwmf + ${CMAKE_SOURCE_DIR}/lib/kopalette + ${CMAKE_SOURCE_DIR}/lib/kotext + ${CMAKE_BINARY_DIR} + ${TDE_INCLUDE_DIR} + ${TQT_INCLUDE_DIRS} +) + +link_directories( + ${TQT_LIBRARY_DIRS} +) + +### Libraries ################################################################# +# We have to name it kformulalib, not just kformula, since that's the name of +# the tdeinit module for kformula. +tde_add_library(kformulalib SHARED AUTOMOC + SOURCES + basicelement.cpp contextstyle.cpp formulacursor.cpp + formulaelement.cpp indexelement.cpp kformulacontainer.cpp + sequenceelement.cpp textelement.cpp bracketelement.cpp + matrixelement.cpp fractionelement.cpp rootelement.cpp symbolelement.cpp + kformulacommand.cpp kformulamimesource.cpp + MatrixDialog.cpp sequenceparser.cpp elementtype.cpp kformuladocument.cpp + symboltable.cpp kformulainputfilter.cpp kformulaview.cpp + spaceelement.cpp kformulaconfigpage.cpp + symbolaction.cpp fontstyle.cpp creationstrategy.cpp + oasiscreationstrategy.cpp tokenstyleelement.cpp tokenelement.cpp + identifierelement.cpp operatorelement.cpp glyphelement.cpp styleelement.cpp + stringelement.cpp paddedelement.cpp errorelement.cpp phantomelement.cpp + actionelement.cpp encloseelement.cpp entities.cpp operatordictionary.cpp + numberelement.cpp + LINK tdeui-shared kotext-shared + DESTINATION ${LIB_INSTALL_DIR} +) + +### Programs ################################################################## +if (BUILD_TESTS) + tde_add_executable(koformulatest AUTOMOC + SOURCES main.cpp kformulawidget.cpp + LINK kformulalib-shared + ) +endif() + +### Headers ################################################################### +# install( +# FILES +# kformulacontainer.h kformuladocument.h kformulaview.h +# kformuladefs.h kformulaconfigpage.h +# DESTINATION ${INCLUDE_INSTALL_DIR}/KOffice +# ) + +### Data ###################################################################### +add_subdirectory(pics) +add_subdirectory(fonts) +add_subdirectory(dtd) + +# kate: indent-width 2; replace-tabs true;
\ No newline at end of file diff --git a/lib/kformula/dtd/CMakeLists.txt b/lib/kformula/dtd/CMakeLists.txt new file mode 100644 index 000000000..b8bf11ee4 --- /dev/null +++ b/lib/kformula/dtd/CMakeLists.txt @@ -0,0 +1,11 @@ +############################################################################### +# Trinity KOffice # +# --------------- # +# This file is licensed under the terms of GNU GPL v3 or later. # +# Improvements and feedback are welcome. # +############################################################################### + +### Data ###################################################################### +install(FILES kformula.dtd DESTINATION ${DATA_INSTALL_DIR}/kformula/dtd) + +# kate: indent-width 2; replace-tabs true;
\ No newline at end of file diff --git a/lib/kformula/entities.cpp b/lib/kformula/entities.cpp index c6696e1ff..174878e33 100644 --- a/lib/kformula/entities.cpp +++ b/lib/kformula/entities.cpp @@ -1150,8 +1150,8 @@ const entityMap entities[] = { {"jscr", 0x1D4BF} , {"jsercy", 0x00458} , {"jukcy", 0x00454} , - {"kappa", 0x003BA} , - {"kappav", 0x003F0} , + {"tdeAppa", 0x003BA} , + {"tdeAppav", 0x003F0} , {"kcedil", 0x00137} , {"kcy", 0x0043A} , {"kfr", 0x1D528} , @@ -1848,7 +1848,7 @@ const entityMap entities[] = { {"therefore", 0x02234} , {"theta", 0x003B8} , {"thetav", 0x003D1} , - {"thickapprox", 0x02248} , + {"thictdeApprox", 0x02248} , {"thicksim", 0x0223C} , {"thinsp", 0x02009} , {"thkap", 0x02248} , @@ -1942,7 +1942,7 @@ const entityMap entities[] = { {"vDash", 0x022A8} , {"vangrt", 0x0299C} , {"varepsilon", 0x003B5} , - {"varkappa", 0x003F0} , + {"vartdeAppa", 0x003F0} , {"varnothing", 0x02205} , {"varphi", 0x003C6} , {"varpi", 0x003D6} , diff --git a/lib/kformula/fonts/CMakeLists.txt b/lib/kformula/fonts/CMakeLists.txt new file mode 100644 index 000000000..74379d976 --- /dev/null +++ b/lib/kformula/fonts/CMakeLists.txt @@ -0,0 +1,18 @@ +############################################################################### +# Trinity KOffice # +# --------------- # +# This file is licensed under the terms of GNU GPL v3 or later. # +# Improvements and feedback are welcome. # +############################################################################### + +### Data ###################################################################### +set(FONTDIR "${DATA_INSTALL_DIR}/kformula/fonts") +install( + FILES cmex10.ttf Arev.ttf ArevIt.ttf ArevBd.ttf ArevBI.ttf + DESTINATION ${FONTDIR} +) + +install(CODE "execute_process(COMMAND mkfontscale \$ENV{DESTDIR}${FONTDIR})") +install(CODE "execute_process(COMMAND mkfontdir \$ENV{DESTDIR}${FONTDIR})") + +# kate: indent-width 2; replace-tabs true;
\ No newline at end of file diff --git a/lib/kformula/kformulacontainer.cpp b/lib/kformula/kformulacontainer.cpp index a6123154d..5499fe915 100644 --- a/lib/kformula/kformulacontainer.cpp +++ b/lib/kformula/kformulacontainer.cpp @@ -528,7 +528,7 @@ void Container::saveMathML( TQTextStream& stream, bool oasisFormat ) { TQDomDocument doc; if ( !oasisFormat ) { - doc = document()->createMathMLDomDocument(); + doc = document()->createMathMLDomDocument(); } rootElement()->writeMathML( doc, doc, oasisFormat ); stream << doc; diff --git a/lib/kformula/kformuladocument.cpp b/lib/kformula/kformuladocument.cpp index 24d7c6504..6d954d66c 100644 --- a/lib/kformula/kformuladocument.cpp +++ b/lib/kformula/kformuladocument.cpp @@ -125,7 +125,7 @@ int Document::formulaCount() bool Document::loadXML( const TQDomDocument& doc ) { setCreationStrategy( "Ordinary" ); - + //clear(); TQDomElement root = doc.documentElement(); @@ -205,12 +205,12 @@ TQDomDocument Document::createDomDocument() */ TQDomDocument Document::createMathMLDomDocument() { - TQDomDocumentType dt = + TQDomDocumentType dt = TQDomImplementation().createDocumentType( "math", "-//W3C//DTD MathML 2.0//EN", "http://www.w3.org/TR/MathML2/dtd/mathml2.dtd"); TQDomDocument doc( dt ); - doc.insertBefore( doc.createProcessingInstruction( "xml", + doc.insertBefore( doc.createProcessingInstruction( "xml", "version=\"1.0\" encoding=\"UTF-8\"" ), doc.documentElement() ); return doc; @@ -1212,10 +1212,10 @@ void DocumentWrapper::setEnabled( bool enabled ) getAddLowerLeftAction()->setEnabled( enabled ); getAddUpperRightAction()->setEnabled( enabled ); getAddLowerRightAction()->setEnabled( enabled ); - + getAddGenericUpperAction()->setEnabled( enabled ); getAddGenericLowerAction()->setEnabled( enabled ); - + if ( enabled ) { getAddGenericUpperAction()-> @@ -1277,6 +1277,7 @@ void DocumentWrapper::setEnabled( bool enabled ) void DocumentWrapper::enableMatrixActions( bool b) { + if (!m_hasActions) return; getAppendColumnAction()->setEnabled( b ); getInsertColumnAction()->setEnabled( b ); getRemoveColumnAction()->setEnabled( b ); diff --git a/lib/kformula/pics/CMakeLists.txt b/lib/kformula/pics/CMakeLists.txt new file mode 100644 index 000000000..bb28270cf --- /dev/null +++ b/lib/kformula/pics/CMakeLists.txt @@ -0,0 +1,11 @@ +############################################################################### +# Trinity KOffice # +# --------------- # +# This file is licensed under the terms of GNU GPL v3 or later. # +# Improvements and feedback are welcome. # +############################################################################### + +### Data ###################################################################### +add_subdirectory(crystalsvg) + +# kate: indent-width 2; replace-tabs true;
\ No newline at end of file diff --git a/lib/kformula/pics/crystalsvg/CMakeLists.txt b/lib/kformula/pics/crystalsvg/CMakeLists.txt new file mode 100644 index 000000000..f3304540b --- /dev/null +++ b/lib/kformula/pics/crystalsvg/CMakeLists.txt @@ -0,0 +1,11 @@ +############################################################################### +# Trinity KOffice # +# --------------- # +# This file is licensed under the terms of GNU GPL v3 or later. # +# Improvements and feedback are welcome. # +############################################################################### + +### Data ###################################################################### +tde_install_icons() + +# kate: indent-width 2; replace-tabs true;
\ No newline at end of file diff --git a/lib/kformula/unicodetable.cpp b/lib/kformula/unicodetable.cpp index 23dc8636e..faf5a3628 100644 --- a/lib/kformula/unicodetable.cpp +++ b/lib/kformula/unicodetable.cpp @@ -33,8 +33,8 @@ static UnicodeNameTable greekTable[] = { { 0x03B8, "theta" }, { 0x03D1, "vartheta" }, { 0x03B9, "iota" }, - { 0x03BA, "kappa" }, - { 0x03F0, "varkappa" }, + { 0x03BA, "tdeAppa" }, + { 0x03F0, "vartdeAppa" }, { 0x03BB, "lambda" }, { 0x03BC, "mu" }, { 0x03BD, "nu" }, diff --git a/lib/kofficecore/CMakeLists.txt b/lib/kofficecore/CMakeLists.txt new file mode 100644 index 000000000..c3868bdf8 --- /dev/null +++ b/lib/kofficecore/CMakeLists.txt @@ -0,0 +1,87 @@ +############################################################################### +# Trinity KOffice # +# --------------- # +# This file is licensed under the terms of GNU GPL v3 or later. # +# Improvements and feedback are welcome. # +############################################################################### + +include_directories( + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_SOURCE_DIR}/lib/store + ${CMAKE_SOURCE_DIR}/lib/kwmf + ${CMAKE_BINARY_DIR} + ${TDE_INCLUDE_DIR} + ${TQT_INCLUDE_DIRS} +) + +link_directories( + ${TQT_LIBRARY_DIRS} +) + +### Libraries ################################################################# +tde_add_library(kofficecore SHARED AUTOMOC + SOURCES + KoDocument.cpp KoGlobal.cpp KoUnit.cpp KoFilterManager.cpp + KoMainWindow.cpp KoApplication.cpp KoQueryTrader.cpp + KoFilter.cpp KoFilterChain.cpp KoDocumentInfo.cpp + KoPictureKey.cpp KoPictureBase.cpp KoPicture.cpp KoPictureShared.cpp + KoPictureImage.cpp KoPictureClipart.cpp KoPictureCollection.cpp + KoPictureEps.cpp KoPictureWmf.cpp + KoView.cpp KoFrame.cpp KoContainerHandler.cpp KoDocumentChild.cpp + KoDocumentInfoDlg.cpp KoFactory.cpp KoChild.cpp + koDocumentInfoAboutWidget.ui koDocumentInfoAuthorWidget.ui + koDocumentInfoUserMetadataWidget.ui + KoApplicationIface.cpp KoApplicationIface.skel + KoDocumentIface.cpp KoDocumentIface.skel KoViewIface.cpp KoViewIface.skel + KoMainWindowIface.cpp KoMainWindowIface.skel kofficeversion.cpp + KoOasisStyles.cpp KoOasisSettings.cpp KoOasisLoadingContext.cpp + KoStyleStack.cpp KoGenStyles.cpp KoPageLayout.cpp + KoFileDialog.cpp KoXmlNS.cpp KoDom.cpp Koversiondialog.cpp KoOasisStore.cpp + kkbdaccessextensions.cpp koDetailsPaneBase.ui koOpenPaneBase.ui + KoOpenPane.cpp KoTemplates.cpp KoDetailsPane.cpp KoSpeaker.cpp KoRect.cpp + LINK + tdeio-shared tdefx-shared tdeabc-shared tdeprint-shared tdeparts-shared + kstore-shared kwmf-shared kowmf-shared + DESTINATION ${LIB_INSTALL_DIR} +) + +tde_add_kpart(kodocinfopropspage SHARED AUTOMOC + SOURCES KoDocInfoPropsFactory.cpp + LINK tdecore-shared tdeio-shared tdefx-shared kjs-shared kofficecore-shared + DESTINATION ${PLUGIN_INSTALL_DIR} +) + +### Headers ################################################################### +install( + FILES + KoContainerHandler.h + KoFilter.h KoFilterChain.h + KoGlobal.h KoUnit.h KoDocument.h + KoMainWindow.h + KoApplication.h KoQueryTrader.h + KoFilterManager.h + KoDocumentInfo.h + KoView.h KoFrame.h KoDocumentChild.h + KoDocumentInfoDlg.h KoFactory.h KoChild.h + KoApplicationIface.h KoDocumentIface.h KoViewIface.h KoMainWindowIface.h + KoPictureKey.h KoPicture.h KoPictureCollection.h kofficeversion.h + KoOasisStyles.h KoStyleStack.h KoGenStyles.h KoOasisSettings.h + KoPageLayout.h KoXmlNS.h KoDom.h Koversiondialog.h + kkbdaccessextensions.h + koffice_export.h KoOpenPane.h + KoSpeaker.h KoOasisLoadingContext.h + KoPoint.h + + DESTINATION ${INCLUDE_INSTALL_DIR}/KOffice +) + +### Data ###################################################################### +install(FILES koffice_shell.rc DESTINATION ${DATA_INSTALL_DIR}/koffice) +tde_create_translated_desktop( + SOURCE kodocinfopropspage.desktop + DESTINATION ${SERVICES_INSTALL_DIR} + PO_DIR koffice-desktops +) + +# kate: indent-width 2; replace-tabs true;
\ No newline at end of file diff --git a/lib/kofficecore/KoDocument.cpp b/lib/kofficecore/KoDocument.cpp index 59d160e74..fd26f2e02 100644 --- a/lib/kofficecore/KoDocument.cpp +++ b/lib/kofficecore/KoDocument.cpp @@ -376,9 +376,9 @@ bool KoDocument::exp0rt( const KURL & _url ) bool KoDocument::saveFile() { kdDebug(30003) << "KoDocument::saveFile() doc='" << url().url() <<"'"<< endl; - + // set local again as it can happen that it gets resetted - // so that all saved numbers have a . and not e.g a , as a + // so that all saved numbers have a . and not e.g a , as a // decimal seperator setlocale( LC_NUMERIC, "C" ); @@ -1266,7 +1266,7 @@ TQPixmap KoDocument::generatePreview( const TQSize& size ) TQString KoDocument::autoSaveFile( const TQString & path ) const { // set local again as it can happen that it gets resetted - // so that all saved numbers have a . and not e.g a , as a + // so that all saved numbers have a . and not e.g a , as a // decimal seperator setlocale( LC_NUMERIC, "C" ); diff --git a/lib/kofficecore/KoMainWindow.cpp b/lib/kofficecore/KoMainWindow.cpp index 747a21e4a..65792b648 100644 --- a/lib/kofficecore/KoMainWindow.cpp +++ b/lib/kofficecore/KoMainWindow.cpp @@ -1636,9 +1636,9 @@ void KoMainWindow::slotEmailFile() if (!fileURL.isEmpty()) { tdeApp->invokeMailer(TQString(), TQString(), TQString(), theSubject, - TQString(), //body - TQString(), - urls); // attachments + TQString(), //body + TQString(), + urls); // attachments } } diff --git a/lib/kofficecore/KoSpeaker.cpp b/lib/kofficecore/KoSpeaker.cpp index 3637b90b8..83c0de179 100644 --- a/lib/kofficecore/KoSpeaker.cpp +++ b/lib/kofficecore/KoSpeaker.cpp @@ -1,4 +1,4 @@ -/* +/* * This file is part of the KDE/KOffice project. * Copyright (C) 2005, Gary Cramblitt <garycramblitt@comcast.net> * @@ -371,10 +371,10 @@ bool KoSpeaker::maybeSayWidget(TQWidget* w, const TQPoint& pos /*=TQPoint()*/) else if (w->inherits("TQComboBox")) text = dynamic_cast<TQComboBox *>(w)->currentText(); - else + else if (w->inherits("TQLineEdit")) text = dynamic_cast<TQLineEdit *>(w)->text(); - else + else if (w->inherits("TQTextEdit")) text = dynamic_cast<TQTextEdit *>(w)->text(); else diff --git a/lib/kofficeui/CMakeLists.txt b/lib/kofficeui/CMakeLists.txt new file mode 100644 index 000000000..868ed2305 --- /dev/null +++ b/lib/kofficeui/CMakeLists.txt @@ -0,0 +1,77 @@ +############################################################################### +# Trinity KOffice # +# --------------- # +# This file is licensed under the terms of GNU GPL v3 or later. # +# Improvements and feedback are welcome. # +############################################################################### + +include_directories( + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_SOURCE_DIR}/lib/store + ${CMAKE_SOURCE_DIR}/lib/kofficecore + ${CMAKE_BINARY_DIR} + ${TDE_INCLUDE_DIR} + ${TQT_INCLUDE_DIRS} +) + +link_directories( + ${TQT_LIBRARY_DIRS} +) + +### Libraries ################################################################# +tde_add_library(kofficeui SHARED AUTOMOC + SOURCES + KoPageLayoutDia.cpp KoZoomAction.cpp KoTabBar.cpp + KoPartSelectDia.cpp KoPartSelectAction.cpp + KoRuler.cpp KoTemplateChooseDia.cpp KoTabChooser.cpp + KoKoolBar.cpp KoTemplateCreateDia.cpp KoContextCelp.cpp + kcoloractions.cpp KoPictureFilePreview.cpp KoUnitWidgets.cpp + ttdeaction.cpp tkcoloractions.cpp tkcombobox.cpp ttdetoolbarbutton.cpp + KoCharSelectDia.cpp KoInsertLink.cpp KoEditPath.cpp KoCommandHistory.cpp + KoSelectAction.cpp Kolinewidthaction.cpp Kolinestyleaction.cpp + KoTooluButton.cpp KoBrush.cpp KoImageResource.cpp KoToolBox.cpp + KoZoomHandler.cpp KoGuideLineDia.cpp KoGuides.cpp KoZoomMode.cpp + KoGeneralPropertyUi.ui KoPageLayoutColumns.cpp KoPageLayoutColumnsBase.ui + KoPageLayoutSize.cpp KoPageLayoutHeaderBase.ui KoPageLayoutHeader.cpp + KoPen.cpp + LINK kofficecore-shared + DESTINATION ${LIB_INSTALL_DIR} +) + +### Headers ################################################################### +install( + FILES + KoPageLayoutDia.h KoZoomAction.h KoTabBar.h + KoPartSelectDia.h KoPartSelectAction.h + KoRuler.h KoTemplateChooseDia.h KoTabChooser.h + KoKoolBar.h KoTemplateCreateDia.h KoContextCelp.h + kcoloractions.h KoPictureFilePreview.h KoUnitWidgets.h + ttdeaction.h tkcoloractions.h ttdetoolbarbutton.h tkcombobox.h + KoCharSelectDia.h KoInsertLink.h KoTooluButton.h KoEditPath.h + KoCommandHistory.h KoImageResource.h + KoSelectAction.h Kolinewidthaction.h Kolinestyleaction.h + KoZoomHandler.h KoGuideLineDia.h KoGuides.h + KoPageLayoutHeader.h KoPageLayoutSize.h + KoPageLayoutColumns.h KoBrush.h KoPen.h KoZoomMode.h + DESTINATION ${INCLUDE_INSTALL_DIR}/KOffice +) + +### Widgets ################################################################### +if (HAVE_MAKETDEWIDGETS) + add_custom_command(OUTPUT kofficewidgets.cpp + COMMAND maketdewidgets -o kofficewidgets.cpp ${CMAKE_CURRENT_SOURCE_DIR}/koffice.widgets + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/koffice.widgets + ) + + tde_add_kpart(kofficewidgets AUTOMOC + SOURCES kofficewidgets.cpp + LINK tdeio-shared + DESTINATION ${PLUGIN_INSTALL_DIR}/plugins/designer + ) +endif() + +### Data ###################################################################### +add_subdirectory(pics) + +# kate: indent-width 2; replace-tabs true;
\ No newline at end of file diff --git a/lib/kofficeui/KoInsertLink.cpp b/lib/kofficeui/KoInsertLink.cpp index 94a2ffb75..a836b8de2 100644 --- a/lib/kofficeui/KoInsertLink.cpp +++ b/lib/kofficeui/KoInsertLink.cpp @@ -242,7 +242,7 @@ internetLinkPage::internetLinkPage( TQWidget *parent , char *name ) lay2->addWidget(m_hrefName); lay2->addStretch( 1 ); - + m_linkName->setFocus(); connect(m_linkName,TQ_SIGNAL(textChanged ( const TQString & )),this,TQ_SLOT(textChanged ( const TQString & ))); @@ -315,7 +315,7 @@ bookmarkLinkPage::bookmarkLinkPage( TQWidget *parent , char *name ) lay2->addWidget(m_hrefName); lay2->addStretch( 1 ); - + m_linkName->setFocus(); connect(m_linkName,TQ_SIGNAL(textChanged ( const TQString & )),this,TQ_SLOT(textChanged ( const TQString & ))); @@ -396,7 +396,7 @@ mailLinkPage::mailLinkPage( TQWidget *parent , char *name ) lay2->addWidget(m_hrefName); lay2->addStretch( 1 ); - + connect(m_linkName,TQ_SIGNAL(textChanged ( const TQString & )),this,TQ_SLOT(textChanged ( const TQString & ))); connect(m_hrefName,TQ_SIGNAL(textChanged ( const TQString & )),this,TQ_SLOT(textChanged ( const TQString & ))); KSeparator* bar1 = new KSeparator( KSeparator::HLine, this); @@ -483,9 +483,9 @@ fileLinkPage::fileLinkPage( TQWidget *parent , char *name ) } else recentFile->insertStringList( lst); - + recentFile->setSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ); - + connect( recentFile , TQ_SIGNAL(highlighted ( const TQString &)), this, TQ_SLOT( slotSelectRecentFile( const TQString & ))); tmpTQLabel = new TQLabel( this); diff --git a/lib/kofficeui/KoSelectAction.cpp b/lib/kofficeui/KoSelectAction.cpp index d8542ec5c..3cc02db3a 100644 --- a/lib/kofficeui/KoSelectAction.cpp +++ b/lib/kofficeui/KoSelectAction.cpp @@ -40,13 +40,13 @@ class KoSelectAction::KoSelectActionPrivate m_popup = new TDEPopupMenu(0L,"KoLineStyleAction::popup"); m_currentSelection = 0; } - + ~KoSelectActionPrivate() { delete m_popup; m_popup = 0; } - + TDEPopupMenu* m_popup; int m_currentSelection; }; @@ -56,7 +56,7 @@ KoSelectAction::KoSelectAction(const TQString &text, const TQString& icon, { d = new KoSelectActionPrivate; setShowCurrentSelection(true); - + connect(popupMenu(), TQ_SIGNAL(activated(int)), this, TQ_SLOT(execute(int))); } @@ -64,7 +64,7 @@ KoSelectAction::KoSelectAction(const TQString &text, const TQString& icon, const const char* slot, TQObject* parent, const char* name) : TDEAction(text, icon, 0, parent, name) { d = new KoSelectActionPrivate; - + connect(this, TQ_SIGNAL(selectionChanged(int)), receiver, slot); connect(popupMenu(), TQ_SIGNAL(activated(int)), this, TQ_SLOT(execute(int))); } diff --git a/lib/kofficeui/KoTemplateChooseDia.cpp b/lib/kofficeui/KoTemplateChooseDia.cpp index 8ce383a9d..6a89cbe77 100644 --- a/lib/kofficeui/KoTemplateChooseDia.cpp +++ b/lib/kofficeui/KoTemplateChooseDia.cpp @@ -472,7 +472,7 @@ void KoTemplateChooseDia::setupTemplateDialog(TQWidget * widgetbase, TQGridLayou d->m_jwidget->showPage(templateNum); else if ( defaultTemplateGroup != -1) d->m_jwidget->showPage(defaultTemplateGroup); - + // Set the initially selected template, possibly from the last usage of the dialog currentChanged(itemtoselect); diff --git a/lib/kofficeui/koffice.widgets b/lib/kofficeui/koffice.widgets index 9a3f0ba10..336d60562 100644 --- a/lib/kofficeui/koffice.widgets +++ b/lib/kofficeui/koffice.widgets @@ -1,32 +1,26 @@ [Global] PluginName=KOfficeWidgets -[KoBuggyUnitDoubleSpinBox] +[KoUnitDoubleSpinBox] ToolTip=KOffice Spin box for double precision numbers with unit display WhatsThis=KOffice Spin box for double precision numbers with unit display -IncludeFile=koUnitWidgets.h -Group=Input (KOffice) - -[KoUnitDoubleSpinBox2] -ToolTip=KOffice Spin box for double precision numbers with unit display -WhatsThis=KOffice Spin box for double precision numbers with unit display -IncludeFile=koUnitWidgets.h +IncludeFile=KoUnitWidgets.h Group=Input (KOffice) [KoUnitDoubleLineEdit] ToolTip=KOffice Line edit for double precision numbers with unit display WhatsThis=KOffice Line edit for double precision numbers with unit display -IncludeFile=koUnitWidgets.h +IncludeFile=KoUnitWidgets.h Group=Input (KOffice) [KoUnitDoubleComboBox] ToolTip=KOffice Combo box for double precision numbers with unit display WhatsThis=KOffice Combo box for double precision numbers with unit display -IncludeFile=koUnitWidgets.h +IncludeFile=KoUnitWidgets.h Group=Input (KOffice) [KoUnitDoubleSpinComboBox] ToolTip=KOffice Combo box (with spin control) for double precision numbers with unit display WhatsThis=KOffice Combo box (with spin control) for double precision numbers with unit display -IncludeFile=koUnitWidgets.h +IncludeFile=KoUnitWidgets.h Group=Input (KOffice) diff --git a/lib/kofficeui/pics/CMakeLists.txt b/lib/kofficeui/pics/CMakeLists.txt new file mode 100644 index 000000000..1d14be12e --- /dev/null +++ b/lib/kofficeui/pics/CMakeLists.txt @@ -0,0 +1,23 @@ +############################################################################### +# Trinity KOffice # +# --------------- # +# This file is licensed under the terms of GNU GPL v3 or later. # +# Improvements and feedback are welcome. # +############################################################################### + +install( + FILES + koRulerFirst.png koRulerLeft.png koffice-logo.png + koKoolBarDown.png koKoolBarUp.png + koPortrait.png koLandscape.png + DESTINATION ${DATA_INSTALL_DIR}/koffice/pics +) + +install( + FILES + kounitdoublecombobox.png kounitdoublelineedit.png + kounitdoublespinbox2.png kounitdoublespincombobox.png + DESTINATION ${DATA_INSTALL_DIR}/kofficewidgets/pics +) + +# kate: indent-width 2; replace-tabs true;
\ No newline at end of file diff --git a/lib/kopainter/CMakeLists.txt b/lib/kopainter/CMakeLists.txt new file mode 100644 index 000000000..0bb476ce7 --- /dev/null +++ b/lib/kopainter/CMakeLists.txt @@ -0,0 +1,33 @@ +############################################################################### +# Trinity KOffice # +# --------------- # +# This file is licensed under the terms of GNU GPL v3 or later. # +# Improvements and feedback are welcome. # +############################################################################### + +include_directories( + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_SOURCE_DIR}/lib/kofficecore + ${CMAKE_SOURCE_DIR}/lib/kofficeui + ${CMAKE_BINARY_DIR} + ${TDE_INCLUDE_DIR} + ${TQT_INCLUDE_DIRS} +) + +link_directories( + ${TQT_LIBRARY_DIRS} +) + +### Libraries ################################################################# +tde_add_library(kopainter SHARED AUTOMOC + SOURCES + svgpathparser.cpp koColor.cpp koFrameButton.cpp koColorSlider.cpp + koColorChooser.cpp koIconChooser.cpp kogradientmanager.cpp + ko_color_wheel.cpp ko_gray_widget.cpp ko_hsv_widget.cpp + ko_rgb_widget.cpp ko_cmyk_widget.cpp + LINK kofficeui-shared + DESTINATION ${LIB_INSTALL_DIR} +) + +# kate: indent-width 2; replace-tabs true;
\ No newline at end of file diff --git a/lib/kopalette/CMakeLists.txt b/lib/kopalette/CMakeLists.txt new file mode 100644 index 000000000..3ac6edde9 --- /dev/null +++ b/lib/kopalette/CMakeLists.txt @@ -0,0 +1,33 @@ +############################################################################### +# Trinity KOffice # +# --------------- # +# This file is licensed under the terms of GNU GPL v3 or later. # +# Improvements and feedback are welcome. # +############################################################################### + +include_directories( + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_SOURCE_DIR}/lib/kofficecore + ${CMAKE_BINARY_DIR} + ${TDE_INCLUDE_DIR} + ${TQT_INCLUDE_DIRS} +) + +link_directories( + ${TQT_LIBRARY_DIRS} +) + +### Libraries ################################################################# +tde_add_library(kopalette SHARED AUTOMOC + SOURCES + kopalette.cpp kopalettemanager.cpp + kotoolboxpalette.cpp kotabpalette.cpp + LINK kofficecore-shared + DESTINATION ${LIB_INSTALL_DIR} +) + +### Headers ################################################################### +install(FILES kopalettemanager.h DESTINATION ${INCLUDE_INSTALL_DIR}/KOffice) + +# kate: indent-width 2; replace-tabs true;
\ No newline at end of file diff --git a/lib/koproperty/CMakeLists.txt b/lib/koproperty/CMakeLists.txt new file mode 100644 index 000000000..a22303efa --- /dev/null +++ b/lib/koproperty/CMakeLists.txt @@ -0,0 +1,36 @@ +############################################################################### +# Trinity KOffice # +# --------------- # +# This file is licensed under the terms of GNU GPL v3 or later. # +# Improvements and feedback are welcome. # +############################################################################### + +include_directories( + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_SOURCE_DIR}/lib/kofficecore + ${CMAKE_SOURCE_DIR}/lib/koproperty/editors + ${CMAKE_BINARY_DIR} + ${TDE_INCLUDE_DIR} + ${TQT_INCLUDE_DIRS} +) + +link_directories( + ${TQT_LIBRARY_DIRS} +) + +### Libraries ################################################################# +tde_add_library(koproperty SHARED AUTOMOC + SOURCES + property.cpp customproperty.cpp set.cpp editor.cpp + editoritem.cpp factory.cpp widget.cpp + LINK tdecore-shared tdeui-shared kopropertyeditors-shared + DESTINATION ${LIB_INSTALL_DIR} +) + +add_subdirectory(editors) + +### Data ###################################################################### +tde_install_icons() + +# kate: indent-width 2; replace-tabs true;
\ No newline at end of file diff --git a/lib/koproperty/editors/CMakeLists.txt b/lib/koproperty/editors/CMakeLists.txt new file mode 100644 index 000000000..b201dc53f --- /dev/null +++ b/lib/koproperty/editors/CMakeLists.txt @@ -0,0 +1,33 @@ +############################################################################### +# Trinity KOffice # +# --------------- # +# This file is licensed under the terms of GNU GPL v3 or later. # +# Improvements and feedback are welcome. # +############################################################################### + +include_directories( + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_SOURCE_DIR}/lib/kofficecore + ${CMAKE_SOURCE_DIR}/lib/koproperty/editors + ${CMAKE_BINARY_DIR} + ${TDE_INCLUDE_DIR} + ${TQT_INCLUDE_DIRS} +) + +link_directories( + ${TQT_LIBRARY_DIRS} +) + +### Libraries ################################################################# +tde_add_library(kopropertyeditors SHARED AUTOMOC + SOURCES + booledit.cpp coloredit.cpp combobox.cpp cursoredit.cpp dateedit.cpp + datetimeedit.cpp dummywidget.cpp fontedit.cpp linestyledit.cpp + pixmapedit.cpp pointedit.cpp rectedit.cpp sizeedit.cpp sizepolicyedit.cpp + spinbox.cpp stringedit.cpp stringlistedit.cpp symbolcombo.cpp timeedit.cpp + urledit.cpp + LINK tdeui-shared tdeio-shared +) + +# kate: indent-width 2; replace-tabs true;
\ No newline at end of file diff --git a/lib/kotext/CMakeLists.txt b/lib/kotext/CMakeLists.txt new file mode 100644 index 000000000..afc0688c9 --- /dev/null +++ b/lib/kotext/CMakeLists.txt @@ -0,0 +1,57 @@ +############################################################################### +# Trinity KOffice # +# --------------- # +# This file is licensed under the terms of GNU GPL v3 or later. # +# Improvements and feedback are welcome. # +############################################################################### + +include_directories( + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_SOURCE_DIR}/lib/store + ${CMAKE_SOURCE_DIR}/lib/kofficecore + ${CMAKE_SOURCE_DIR}/lib/kofficeui + ${CMAKE_BINARY_DIR} + ${TDE_INCLUDE_DIR} + ${TQT_INCLUDE_DIRS} +) + +link_directories( + ${TQT_LIBRARY_DIRS} +) + +### Libraries ################################################################# +tde_add_library(kotext SHARED AUTOMOC + SOURCES + KoComplexText.cpp KoRichText.cpp + KoTextZoomHandler.cpp KoBorder.cpp + KoTextFormat.cpp KoParagCounter.cpp KoStyleCollection.cpp KoTextCommand.cpp + KoTextParag.cpp KoTextDocument.cpp KoTextFormatter.cpp KoParagLayout.cpp + KoTextObject.cpp KoTextView.cpp KoAutoFormat.cpp KoAutoFormatDia.cpp + KoParagDia.cpp KoVariable.cpp KoCustomVariablesDia.cpp + KoChangeCaseDia.cpp KoStyleManager.cpp KoSearchDia.cpp + timedateformatwidget.ui TimeFormatWidget.cpp DateFormatWidget.cpp + kofonttabbase.ui KoFontTab.cpp KoTextBookmark.cpp + kohighlightingtabbase.ui KoHighlightingTab.cpp + kodecorationtabbase.ui KoDecorationTab.cpp + kolayouttabbase.ui KoLayoutTab.cpp kolanguagetabbase.ui KoLanguageTab.cpp + KoFontDiaPreview.cpp KoCompletionDia.cpp KoCompletionBase.ui + KoTextViewIface.skel KoTextViewIface.cpp KoFontDia.cpp KoBgSpellCheck.cpp + KoCommentDia.cpp KoSpell.cpp KoCreateStyleDia.cpp KoTextCustomItem.cpp + KoImportStyleDia.cpp KoTextIterator.cpp KoOasisContext.cpp KoListStyleStack.cpp + KoUserStyle.cpp KoUserStyleCollection.cpp KoParagStyle.cpp KoParagDecorationTab.ui + LINK kofficeui-shared kohyphen-static tdespell2-shared tdeutils-shared + DESTINATION ${LIB_INSTALL_DIR} +) + +add_subdirectory(kohyphen) + +### Headers ################################################################### +# install( +# FILES +# KoTextZoomHandler.h KoTextFormat.h KoParagCounter.h KoStyleCollection.h +# KoTextDocument.h KoBgSpellCheck.h KoCommentDia.h KoCreateStyleDia.h +# DESTINATION ${INCLUDE_INSTALL_DIR}/KOffice +# ) + +# kate: indent-width 2; replace-tabs true;
\ No newline at end of file diff --git a/lib/kotext/KoAutoFormat.cpp b/lib/kotext/KoAutoFormat.cpp index 3306798d1..46d601208 100644 --- a/lib/kotext/KoAutoFormat.cpp +++ b/lib/kotext/KoAutoFormat.cpp @@ -335,7 +335,7 @@ void KoAutoFormat::readConfig(bool force) if( beginDoubleQuote.isEmpty()) { if( m_typographicDefaultDoubleQuotes.begin.isNull()) - m_typographicDoubleQuotes.begin = TQChar(''); + m_typographicDoubleQuotes.begin = TQChar('�'); else m_typographicDoubleQuotes.begin = m_typographicDefaultDoubleQuotes.begin; } @@ -345,7 +345,7 @@ void KoAutoFormat::readConfig(bool force) if( endDoubleQuote.isEmpty() ) { if( m_typographicDefaultDoubleQuotes.end.isNull()) - m_typographicDoubleQuotes.end = TQChar(''); + m_typographicDoubleQuotes.end = TQChar('�'); else m_typographicDoubleQuotes.end = m_typographicDefaultDoubleQuotes.end; } @@ -1654,11 +1654,11 @@ KCommand * KoAutoFormat::doAutoReplaceNumber( KoTextCursor* textEditCursor, KoTe textdoc->setSelectionEnd( KoTextDocument::HighlightSelection, &cursor ); TQString replacement; if( word == TQString("1/2") ) - replacement=TQString(""); + replacement=TQString("�"); else if (word == TQString("1/4") ) - replacement=TQString(""); + replacement=TQString("�"); else if (word == TQString("3/4") ) - replacement=TQString(""); + replacement=TQString("�"); TQString cmdName = i18n("Autocorrect for Fraction"); KCommand *cmd =txtObj->replaceSelectionCommand( textEditCursor, replacement, cmdName, diff --git a/lib/kotext/KoAutoFormatDia.cpp b/lib/kotext/KoAutoFormatDia.cpp index 248415023..1383bec54 100644 --- a/lib/kotext/KoAutoFormatDia.cpp +++ b/lib/kotext/KoAutoFormatDia.cpp @@ -286,7 +286,7 @@ void KoAutoFormatDia::setupTab1() cbAutoReplaceNumber=new TQCheckBox( tab1 ); cbAutoReplaceNumber->setText( i18n( "We add the 1/2 char at the %1", "Re&place 1/2... with %1..." ) - .arg( TQString( "" ) ) ); + .arg( TQString( "�" ) ) ); TQWhatsThis::add( cbAutoReplaceNumber, i18n( "Most standard fraction notations will be converted when available" ) ); diff --git a/lib/kotext/kohyphen/CMakeLists.txt b/lib/kotext/kohyphen/CMakeLists.txt new file mode 100644 index 000000000..a9718a46c --- /dev/null +++ b/lib/kotext/kohyphen/CMakeLists.txt @@ -0,0 +1,41 @@ +############################################################################### +# Trinity KOffice # +# --------------- # +# This file is licensed under the terms of GNU GPL v3 or later. # +# Improvements and feedback are welcome. # +############################################################################### + +include_directories( + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_SOURCE_DIR}/lib/kofficecore + ${CMAKE_SOURCE_DIR}/lib/kofficeui + ${CMAKE_BINARY_DIR} + ${TDE_INCLUDE_DIR} + ${TQT_INCLUDE_DIRS} +) + +link_directories( + ${TQT_LIBRARY_DIRS} +) + +### Libraries ################################################################# +tde_add_library(kohyphen STATIC_PIC AUTOMOC + SOURCES hnjalloc.c hyphen.c kohyphen.cpp + LINK tdecore-shared +) + +### Programs ################################################################## +if (BUILD_TESTS) + tde_add_executable(kohyphentest AUTOMOC + SOURCES kohyphentest.cpp + LINK + tdecore-shared tdeui-shared tdefx-shared tdeio-shared + tdetexteditor kohyphen-static + ) +endif() + +### Data ###################################################################### +add_subdirectory(hyphdicts) + +# kate: indent-width 2; replace-tabs true;
\ No newline at end of file diff --git a/lib/kotext/kohyphen/hyphdicts/CMakeLists.txt b/lib/kotext/kohyphen/hyphdicts/CMakeLists.txt new file mode 100644 index 000000000..95f8bb963 --- /dev/null +++ b/lib/kotext/kohyphen/hyphdicts/CMakeLists.txt @@ -0,0 +1,18 @@ +############################################################################### +# Trinity KOffice # +# --------------- # +# This file is licensed under the terms of GNU GPL v3 or later. # +# Improvements and feedback are welcome. # +############################################################################### + +### Data ###################################################################### +install( + FILES + dicts.xml + hyph_cs.dic hyph_en.dic hyph_hu.dic hyph_uk.dic hyph_da.dic hyph_de.dic + hyph_en_CA.dic hyph_es.dic hyph_fr.dic hyph_it.dic hyph_nl.dic hyph_pt_BR.dic + hyph_pt.dic hyph_pt_PT.dic hyph_ru.dic hyph_sk.dic hyph_sv.dic hyph_sl.dic + DESTINATION ${DATA_INSTALL_DIR}/koffice/hyphdicts +) + +# kate: indent-width 2; replace-tabs true;
\ No newline at end of file diff --git a/lib/kotext/kohyphen/kohyphentest.cpp b/lib/kotext/kohyphen/kohyphentest.cpp index 0f083631e..5a0d3ac0e 100644 --- a/lib/kotext/kohyphen/kohyphentest.cpp +++ b/lib/kotext/kohyphen/kohyphentest.cpp @@ -6,6 +6,7 @@ #include <tqstringlist.h> #include <tdeapplication.h> +#include <tdecmdlineargs.h> #include "kohyphen.h" #include <kdebug.h> @@ -40,7 +41,8 @@ void check_hyphenation( const TQStringList& tests, const TQStringList& results, int main (int argc, char ** argv) { - TDEApplication app(argc, argv, "KoHyphenator test"); + TDECmdLineArgs::init(argc, argv, "kohyphentest", "KoHyphenator test", 0, 0, true); + TDEApplication app; try { hypher = KoHyphenator::self(); @@ -54,8 +56,12 @@ int main (int argc, char ** argv) TQStringList::ConstIterator it, itres; //testing Czech language, this text is in UTF-8! - TQStringList cs_tests = TQStringList() << "Žluťoučký" << "kůň" << "úpěl" << - "ďábelské" << "ódy"; + TQStringList cs_tests; + cs_tests << TQString::fromLocal8Bit("Žluťoučký") + << TQString::fromLocal8Bit("kůň") + << TQString::fromLocal8Bit("úpěl") + << TQString::fromLocal8Bit("ďábelské") + << TQString::fromLocal8Bit("ódy"); for ( it = cs_tests.begin(); it != cs_tests.end() ; ++it ) kdDebug() << (*it) << " hyphenates like this: " << hypher->hyphenate((*it), "cs") << endl; diff --git a/lib/kross/CMakeLists.txt b/lib/kross/CMakeLists.txt new file mode 100644 index 000000000..e083e027c --- /dev/null +++ b/lib/kross/CMakeLists.txt @@ -0,0 +1,17 @@ +############################################################################### +# Trinity KOffice # +# --------------- # +# This file is licensed under the terms of GNU GPL v3 or later. # +# Improvements and feedback are welcome. # +############################################################################### + +tde_conditional_add_subdirectory(WITH_KROSS_PYTHON python) +tde_conditional_add_subdirectory(WITH_KROSS_RUBY ruby) + +add_subdirectory(api) +add_subdirectory(main) +add_subdirectory(runner) + +if (BUILD_TESTS) + add_subdirectory(test) +endif()
\ No newline at end of file diff --git a/lib/kross/ConfigureChecks.cmake b/lib/kross/ConfigureChecks.cmake new file mode 100644 index 000000000..5949ee220 --- /dev/null +++ b/lib/kross/ConfigureChecks.cmake @@ -0,0 +1,119 @@ +############################################################################### +# Trinity KOffice # +# --------------- # +# This file is licensed under the terms of GNU GPL v3 or later. # +# Improvements and feedback are welcome. # +############################################################################### + +### Python #################################################################### +if (WITH_KROSS_PYTHON) +# find_package(Python3 COMPONENTS Interpreter Development) +# if (NOT Python3_FOUND) +# message(WARNING "Python developement files were not found, Python scripting support for " +# "KOffice will not be built. If you don't need Python scripting, you " +# "can ignore this message.") + message(WARNING "The Python bindings of Kross don't support Python3." + "Python scripting support for KOffice will not be built. If you don't " + "need Python scripting, you can ignore this message.") + set(WITH_KROSS_PYTHON OFF) +# endif() +endif() + + +if (WITH_KROSS_RUBY) + find_program(RUBY ruby) + if (NOT RUBY) + message(WARNING "The Ruby executable was not found. " + "Ruby scripting support for KOffice will not be built. If you don't " + "need Ruby scripting, you can ignore this message.") + set(WITH_KROSS_RUBY OFF) + else() + execute_process(COMMAND ${RUBY} -r rbconfig -e "puts RbConfig::CONFIG.fetch(%q(MAJOR))" + OUTPUT_VARIABLE RUBY_MAJOR OUTPUT_STRIP_TRAILING_WHITESPACE) + execute_process(COMMAND ${RUBY} -r rbconfig -e "puts RbConfig::CONFIG.fetch(%q(MINOR))" + OUTPUT_VARIABLE RUBY_MINOR OUTPUT_STRIP_TRAILING_WHITESPACE) + + execute_process(COMMAND ${RUBY} -r rbconfig -e "puts RbConfig::CONFIG.fetch(%q(archdir))" + OUTPUT_VARIABLE RUBY_ARCHDIR OUTPUT_STRIP_TRAILING_WHITESPACE) + execute_process(COMMAND ${RUBY} -r rbconfig -e "puts RbConfig::CONFIG.fetch(%q(sitearchdir))" + OUTPUT_VARIABLE RUBY_SITEARCHDIR OUTPUT_STRIP_TRAILING_WHITESPACE) + execute_process(COMMAND ${RUBY} -r rbconfig -e "puts RbConfig::CONFIG.fetch(%q(sitedir))" + OUTPUT_VARIABLE RUBY_SITEDIR OUTPUT_STRIP_TRAILING_WHITESPACE) + execute_process(COMMAND ${RUBY} -r rbconfig -e "puts RbConfig::CONFIG.fetch(%q(libdir))" + OUTPUT_VARIABLE RUBY_LIBDIR OUTPUT_STRIP_TRAILING_WHITESPACE) + execute_process(COMMAND ${RUBY} -r rbconfig -e "puts RbConfig::CONFIG.fetch(%q(sitelibdir))" + OUTPUT_VARIABLE RUBY_SITELIBDIR OUTPUT_STRIP_TRAILING_WHITESPACE) + execute_process(COMMAND ${RUBY} -r rbconfig -e "puts RbConfig::CONFIG.fetch(%q(rubylibdir))" + OUTPUT_VARIABLE RUBY_RUBYLIBDIR OUTPUT_STRIP_TRAILING_WHITESPACE) + execute_process(COMMAND ${RUBY} -r rbconfig -e "puts RbConfig::CONFIG.fetch(%q(LIBRUBYARG_SHARED))" + OUTPUT_VARIABLE RUBY_LIBRUBYARG OUTPUT_STRIP_TRAILING_WHITESPACE) + + ### + if (RUBY_LIBRUBYARG) + set(RUBY_ENABLESHARED ON) + else() + set(RUBY_ENABLESHARED OFF) + endif() + + ### + set(RUBY_SERIES "${RUBY_MAJOR}.${RUBY_MINOR}") + set(RUBY_VERSION_DEFS "") + + if (RUBY_SERIES VERSION_GREATER_EQUAL "1.9") + set(HAVE_RUBY_1_9 1) + set(RUBY_VERSION_DEFS "${RUBY_VERSION_DEFS} -DHAVE_RUBY_1_9") + endif() + + if (RUBY_SERIES VERSION_GREATER_EQUAL "3.0") + set(HAVE_RUBY_3 1) + set(RUBY_VERSION_DEFS "${RUBY_VERSION_DEFS} -DHAVE_RUBY_3") + endif() + + ### + execute_process(COMMAND ${RUBY} -r rbconfig -e "puts RbConfig::CONFIG.key?(%q(rubyhdrdir))" + OUTPUT_VARIABLE RUBY_HAS_INCLUDEDIR OUTPUT_STRIP_TRAILING_WHITESPACE) + + if (RUBY_HAS_INCLUDEDIR STREQUAL "true") + execute_process(COMMAND ${RUBY} -r rbconfig -e "puts RbConfig::CONFIG.fetch(%q(rubyhdrdir))" + OUTPUT_VARIABLE RUBY_INCLUDEDIR OUTPUT_STRIP_TRAILING_WHITESPACE) + + execute_process(COMMAND ${RUBY} -r rbconfig -e "puts RbConfig::CONFIG.key?(%q(rubyarchhdrdir))" + OUTPUT_VARIABLE RUBY_HAS_ARCHINCLUDEDIR OUTPUT_STRIP_TRAILING_WHITESPACE) + + if (RUBY_HAS_ARCHINCLUDEDIR STREQUAL "true") + execute_process(COMMAND ${RUBY} -r rbconfig -e "puts RbConfig::CONFIG.fetch(%q(rubyarchhdrdir))" + OUTPUT_VARIABLE RUBY_ARCHINCLUDEDIR OUTPUT_STRIP_TRAILING_WHITESPACE) + else() + execute_process(COMMAND ${RUBY} -r rbconfig -e "puts RbConfig::CONFIG.fetch(%q(arch))" + OUTPUT_VARIABLE RUBY_ARCH OUTPUT_STRIP_TRAILING_WHITESPACE) + set(RUBY_ARCHINCLUDEDIR "${RUBY_INCLUDEDIR}/${RUBY_ARCH}") + endif() + + set(RUBY_CFLAGS "-I${RUBY_INCLUDEDIR} -I${RUBY_ARCHINCLUDEDIR}") + else() + execute_process(COMMAND ${RUBY} -r rbconfig -e "puts RbConfig::CONFIG.fetch(%q(archdir))" + OUTPUT_VARIABLE RUBY_INCLUDEDIR OUTPUT_STRIP_TRAILING_WHITESPACE) + set(RUBY_CFLAGS "-I${RUBY_INCLUDEDIR}") + message("set RUBY_CFLAGS 2 ${RUBY_CFLAGS}") + endif() + endif() + + ### + if (NOT EXISTS "${RUBY_INCLUDEDIR}/ruby/config.h" AND + NOT EXISTS "${RUBY_ARCHINCLUDEDIR}/ruby/config.h") + message(WARNING "Ruby development files were not found, or Ruby <= 1.8.1 was found, " + "Ruby scripting support for KOffice will not be built. If you don't " + "need Ruby scripting, you can ignore this message.") + set(WITH_KROSS_RUBY OFF) + else() + message(STATUS "Ruby executable: ${RUBY}") + message(STATUS "Ruby archdir: ${RUBY_ARCHDIR}") + message(STATUS "Ruby sitearchdir: ${RUBY_SITEARCHDIR}") + message(STATUS "Ruby sitedir: ${RUBY_SITEDIR}") + message(STATUS "Ruby sitelibdir: ${RUBY_SITELIBDIR}") + message(STATUS "Ruby libdir: ${RUBY_LIBDIR}") + message(STATUS "Ruby includedir: ${RUBY_INCLUDEDIR}") + message(STATUS "Ruby librubyarg: ${RUBY_LIBRUBYARG}") + message(STATUS "Ruby cflags: ${RUBY_CFLAGS}") + endif() +endif()
\ No newline at end of file diff --git a/lib/kross/api/CMakeLists.txt b/lib/kross/api/CMakeLists.txt new file mode 100644 index 000000000..077b3bebf --- /dev/null +++ b/lib/kross/api/CMakeLists.txt @@ -0,0 +1,38 @@ +############################################################################### +# Trinity KOffice # +# --------------- # +# This file is licensed under the terms of GNU GPL v3 or later. # +# Improvements and feedback are welcome. # +############################################################################### + +include_directories( + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_BINARY_DIR} + ${TDE_INCLUDE_DIR} + ${TQT_INCLUDE_DIRS} +) + +link_directories( + ${TQT_LIBRARY_DIRS} +) + +### Libraries ################################################################# +tde_add_library(libkrossapi SHARED AUTOMOC + SOURCES + object.cpp variant.cpp list.cpp dict.cpp exception.cpp callable.cpp + eventaction.cpp eventsignal.cpp eventslot.cpp eventscript.cpp + qtobject.cpp script.cpp interpreter.cpp + LINK + tdecore-shared + DESTINATION ${LIB_INSTALL_DIR} +) + +### Headers ################################################################### +install( + FILES + callable.h class.h dict.h eventaction.h event.h eventscript.h eventsignal.h + eventslot.h exception.h function.h interpreter.h list.h module.h object.h + proxy.h qtobject.h script.h value.h variant.h + DESTINATION ${INCLUDE_INSTALL_DIR}/kross/api +)
\ No newline at end of file diff --git a/lib/kross/main/CMakeLists.txt b/lib/kross/main/CMakeLists.txt new file mode 100644 index 000000000..3eee58de6 --- /dev/null +++ b/lib/kross/main/CMakeLists.txt @@ -0,0 +1,39 @@ +############################################################################### +# Trinity KOffice # +# --------------- # +# This file is licensed under the terms of GNU GPL v3 or later. # +# Improvements and feedback are welcome. # +############################################################################### + +include_directories( + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_SOURCE_DIR}/lib/kross/ + ${CMAKE_BINARY_DIR}/lib/kross/ + ${TDE_INCLUDE_DIR} + ${TQT_INCLUDE_DIRS} +) + +link_directories( + ${TQT_LIBRARY_DIRS} +) + +### Libraries ################################################################# +tde_add_library(libkrossmain SHARED AUTOMOC + SOURCES + krossconfig.cpp mainmodule.cpp scriptcontainer.cpp manager.cpp + scriptaction.cpp scriptguiclient.cpp wdgscriptsmanagerbase.ui + wdgscriptsmanager.cpp + LINK + tdecore-shared tdeio-shared tdeui-shared tdenewstuff-shared + libkrossapi-shared + DESTINATION ${LIB_INSTALL_DIR} +) + +### Headers ################################################################### +install( + FILES + krossconfig.h mainmodule.h manager.h scriptaction.h scriptcontainer.h + scriptguiclient.h wdgscriptsmanager.h + DESTINATION ${INCLUDE_INSTALL_DIR}/KOffice +)
\ No newline at end of file diff --git a/lib/kross/ruby/CMakeLists.txt b/lib/kross/ruby/CMakeLists.txt new file mode 100644 index 000000000..4ec25f67d --- /dev/null +++ b/lib/kross/ruby/CMakeLists.txt @@ -0,0 +1,35 @@ +############################################################################### +# Trinity KOffice # +# --------------- # +# This file is licensed under the terms of GNU GPL v3 or later. # +# Improvements and feedback are welcome. # +############################################################################### + +include_directories( + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_SOURCE_DIR}/lib/kross + ${CMAKE_BINARY_DIR} + ${TDE_INCLUDE_DIR} + ${TQT_INCLUDE_DIRS} + ${RUBY_INCLUDEDIR} + ${RUBY_INCLUDEDIR}/ruby + ${RUBY_ARCHINCLUDEDIR} + ${RUBY_ARCHINCLUDEDIR}/ruby +) + +link_directories( + ${TQT_LIBRARY_DIRS} +) + +add_compile_options(${RUBY_LIBRUBYARG}) + +### Libraries ################################################################# +tde_add_kpart(krossruby SHARED AUTOMOC + SOURCES + rubyinterpreter.cpp rubyextension.cpp rubyscript.cpp rubymodule.cpp + rubywrapper.c + LINK + tdecore-shared libkrossapi-shared libkrossmain-shared + DESTINATION ${PLUGIN_INSTALL_DIR} +)
\ No newline at end of file diff --git a/lib/kross/runner/CMakeLists.txt b/lib/kross/runner/CMakeLists.txt new file mode 100644 index 000000000..7577d32e4 --- /dev/null +++ b/lib/kross/runner/CMakeLists.txt @@ -0,0 +1,27 @@ +############################################################################### +# Trinity KOffice # +# --------------- # +# This file is licensed under the terms of GNU GPL v3 or later. # +# Improvements and feedback are welcome. # +############################################################################### + +include_directories( + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_BINARY_DIR} + ${TDE_INCLUDE_DIR} + ${TQT_INCLUDE_DIRS} +) + +link_directories( + ${TQT_LIBRARY_DIRS} +) + +### Programs ################################################################## +tde_add_executable(krossrunner AUTOMOC + SOURCES main.cpp + LINK + tdecore-shared tdeui-shared tdefx-shared tdeio-shared + tdetexteditor-shared libkrossapi-shared libkrossmain-shared + DESTINATION ${BIN_INSTALL_DIR} +)
\ No newline at end of file diff --git a/lib/kross/test/CMakeLists.txt b/lib/kross/test/CMakeLists.txt new file mode 100644 index 000000000..7068c6f54 --- /dev/null +++ b/lib/kross/test/CMakeLists.txt @@ -0,0 +1,27 @@ +############################################################################### +# Trinity KOffice # +# --------------- # +# This file is licensed under the terms of GNU GPL v3 or later. # +# Improvements and feedback are welcome. # +############################################################################### + +include_directories( + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_BINARY_DIR} + ${TDE_INCLUDE_DIR} + ${TQT_INCLUDE_DIRS} +) + +link_directories( + ${TQT_LIBRARY_DIRS} +) + +### Programs ################################################################## +tde_add_executable(krosstest AUTOMOC + SOURCES + testobject.cpp testaction.cpp testplugin.cpp testwindow.cpp main.cpp + LINK + tdecore-shared tdeui-shared tdefx-shared dcop-shared tdetexteditor-shared + libkrossapi-shared libkrossmain-shared +)
\ No newline at end of file diff --git a/lib/kwmf/CMakeLists.txt b/lib/kwmf/CMakeLists.txt new file mode 100644 index 000000000..6a4c9a5f3 --- /dev/null +++ b/lib/kwmf/CMakeLists.txt @@ -0,0 +1,36 @@ +############################################################################### +# Trinity KOffice # +# --------------- # +# This file is licensed under the terms of GNU GPL v3 or later. # +# Improvements and feedback are welcome. # +############################################################################### + +include_directories( + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_SOURCE_DIR}/lib/kofficecore + ${CMAKE_BINARY_DIR} + ${TDE_INCLUDE_DIR} + ${TQT_INCLUDE_DIRS} +) + +link_directories( + ${TQT_LIBRARY_DIRS} +) + +### Libraries ################################################################# +tde_add_library(kwmf SHARED AUTOMOC + SOURCES kwmf.cpp qwmf.cpp + LINK tdecore-shared + DESTINATION ${LIB_INSTALL_DIR} +) + +tde_add_library(kowmf SHARED AUTOMOC + SOURCES + kowmfreadprivate.cpp kowmfstack.cpp + kowmfread.cpp kowmfwrite.cpp kowmfpaint.cpp + LINK tdecore-shared + DESTINATION ${LIB_INSTALL_DIR} +) + +# kate: indent-width 2; replace-tabs true;
\ No newline at end of file diff --git a/lib/store/CMakeLists.txt b/lib/store/CMakeLists.txt new file mode 100644 index 000000000..6d8459081 --- /dev/null +++ b/lib/store/CMakeLists.txt @@ -0,0 +1,34 @@ +############################################################################### +# Trinity KOffice # +# --------------- # +# This file is licensed under the terms of GNU GPL v3 or later. # +# Improvements and feedback are welcome. # +############################################################################### + +include_directories( + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_SOURCE_DIR}/lib/kofficecore + ${CMAKE_BINARY_DIR} + ${TDE_INCLUDE_DIR} + ${TQT_INCLUDE_DIRS} +) + +link_directories( + ${TQT_LIBRARY_DIRS} +) + +tde_add_library(kstore SHARED AUTOMOC + SOURCES + KoStore.cpp KoTarStore.cpp KoDirectoryStore.cpp KoZipStore.cpp + KoStoreDrag.cpp KoStoreBase.cpp KoXmlWriter.cpp + LINK tdecore-shared tdeui-shared tdeio-shared + DESTINATION ${LIB_INSTALL_DIR} +) + +install( + FILES KoStore.h KoStoreDevice.h KoXmlWriter.h + DESTINATION ${INCLUDE_INSTALL_DIR}/KOffice +) + +# kate: indent-width 2; replace-tabs true;
\ No newline at end of file |