Commit 4ade1161 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Move lib into libs directory (make more sense and

cmake stored generated lib into "lib" directory)

svn path=/trunk/koffice/; revision=523188
parent dd86b7a8
......@@ -41,33 +41,33 @@ include_directories( ${CMAKE_SOURCE_DIR}/lib/kofficecore/ ${CMAKE_CURRENT_SOURCE
# TODO remove this (wrong order) once we have per-lib variables to use like in kdelibs.
include_directories( ${KDE4_INCLUDE_DIRS} )
add_subdirectory(lib)
#add_subdirectory(ascend)
add_subdirectory(autocorrect)
add_subdirectory(doc)
add_subdirectory(libs)
#add_subdirectory(example)
#add_subdirectory(filters)
add_subdirectory(interfaces)
#add_subdirectory(karbon)
#add_subdirectory(kchart)
add_subdirectory(kdgantt)
#add_subdirectory(kchart)
#add_subdirectory(kexi)
#add_subdirectory(kformula)
#add_subdirectory(kivio)
#add_subdirectory(koshell)
#add_subdirectory(kounavail)
add_subdirectory(kounavail)
#add_subdirectory(kplato)
#add_subdirectory(kpresenter)
#add_subdirectory(krita)
#add_subdirectory(kspread)
#add_subdirectory(kugar)
#add_subdirectory(kword)
#add_subdirectory(ascend)
add_subdirectory(mimetypes)
add_subdirectory(pics)
#add_subdirectory(plugins)
add_subdirectory(plugins)
add_subdirectory(servicetypes)
add_subdirectory(templates)
#add_subdirectory(tools)
add_subdirectory(tools)
add_subdirectory(filters)
add_subdirectory(autocorrect)
add_subdirectory(doc)
MESSAGE(STATUS "Perhaps not install FindKDE4. It will conflict when we install with rpm/deb package")
add_subdirectory( cmake )
......
Changes after KOffice-1.4 (other than those done in branch too)
=========================
- Made OpenDocument the default format in kword and kpresenter
- Removed support for saving in the koffice-1.1 format.
Changes after KOffice-1.4-beta1
===============================
KOfficeCore:
- Create backup file faster for local files
- OASIS: fix memleak during loading (styles dom elements)
- OASIS: correct handling of default styles (per-family)
Changes after KOffice-1.3
=========================
KOfficeUI:
- Fix overwriting of templates (#73537)
- Fix loading of icons when creating templates
- Allow template icons up to 64x64 instead of 60x60 and scale better if too big
KOfficeCore:
- Support MS-DOS EPS files directly without stripping them internally.
- Add new info in document properties (Subject/Keywords/home-work phone)
KoText:
- Add new variable (statistic, Subject/Keywords/home-work phone/Position)
Changes after KOffice-1.3-rc1
=============================
KOfficeCore:
- Fixed doc/window association which led to closing all windows when closing only one.
KoText:
- Fixed rare crash when applying a format to a selection
- Fixed painting bug in text view mode (the right side was being erased).
- Fixed saving of left-to-right direction in RTL paragraphs
KOSpell:
- Fixed bug where the dialog wouldn't show the spell client from the config file
Changes after KOffice-1.3-beta4
===============================
KOfficeCore:
- Restart autosave timer when saving
- Fixes for remote documents (authentication dialog not on top, error handling)
- Restore ability to detect documents without extension (was broken by KDE-3.2-alpha's KZip)
KOSpell:
- Many stability fixes
KoText:
- Fixed missed hit during search-replace backwards with a single paragraph
Changes after KOffice-1.3-beta3
===============================
KOfficeCore:
- Fixed saving of the window size when closing
- Cache the configuration object around kofficerc, to improve startup performance
KoText:
- Improve hierarchical numbering - doesn't require using a suffix of '.' anymore,
and doesn't copy over the prefix and suffix from parent levels anymore (#40911).
- PgUp/PgDown works better than before when "move the caret" is enabled (#45246)
- Fixed painting of non-breakable-spaces (could show up as a visible square)
- Implemented painting of non-breakable-spaces when "draw formatting characters" is on
- Fixed crash (e.g. happening with 'section title' variable, #61735)
- Fixed pasting of plain text (so that it creates new pages if necessary, #58651)
Changes after KOffice-1.3-beta2
===============================
- Support for EPS images: works again for gs interpreters without the png16m device
- KoText:
Paragraph borders now support variable width (e.g. being inside
DTP frames of different widths).
Changes after KOffice-1.3-beta1
===============================
- Support for opening backup files (e.g. foo.kwd~)
- Page Layout Dialog: validate user input to prevent nonsense (e.g. margins wider than page)
- KoText:
Fixed drawing of word-by-word underline and strikeout
Repainting fixes (in multiline paragraphs)
Linespacing fixes (at-least and multiple work as advertised, added "fixed")
Major reduction of the memory usage per paragraph
Hyphenation fixes (support for breaking the same words more than once)
Shadow is now a character property (instead of a paragraph property)
More precise painting of paragraph borders
Changes after KOffice-1.2
=======================
- New command line option: --print. Prints the document(s) passed on the command
line, without showing a window. Useful for scripts and servicemenus.
kde4_header()
include_directories(
${CMAKE_SOURCE_DIR}/lib/kofficeui/
${CMAKE_SOURCE_DIR}/lib/store/
${KDE4_INCLUDE_DIR}
${QT_INCLUDES} )
add_subdirectory( store )
add_subdirectory( kwmf )
add_subdirectory( kofficecore )
add_subdirectory( kofficeui )
add_subdirectory( koproperty )
add_subdirectory( kotext )
add_subdirectory( kformula )
add_subdirectory( kopalette )
message(STATUS "${CMAKE_CURRENT_SOURCE_DIR}: skipped subdir $(KROSSDIR)")
message(STATUS "${CMAKE_CURRENT_SOURCE_DIR}: skipped subdir $(KOPAINTERDIR)")
message(STATUS "${CMAKE_CURRENT_SOURCE_DIR}: skipped subdir $(KROSSDIR)")
########### install files ###############
kde4_create_doxygen_docs( REFERENCES dcop kprint kdeui kparts )
kde4_footer()
#original Makefile.am contents follow:
#if compile_lib_KOPAINTER
#KOPAINTERDIR = kopainter
#endif
#
#if compile_kross
#KROSSDIR = kross
#endif
#
#if compile_kexionly
#SUBDIRS = store kwmf kofficecore kofficeui koproperty $(KROSSDIR)
#else
#SUBDIRS = store kwmf kofficecore kofficeui kotext \
# $(KOPAINTERDIR) kformula koproperty kopalette $(KROSSDIR)
#endif
#
#messages:
## $(MAKE) -C kformula -f Makefile.am symbolnames.cc
# EXCLUDE="-path ./koproperty"; \
# LIST=`find . \( \( $$EXCLUDE \) -prune -o -name \*.ui -o -name \*.rc \) -type f | grep -v -e '/\.'`; \
# $(EXTRACTRC) $$LIST > rc.cpp; \
# LIST=`find . \( \( $$EXCLUDE \) -prune -o -name \*.cpp -o -name \*.cc \) -type f | grep -v -e '/\.'`; \
# $(XGETTEXT) $$LIST -o $(podir)/koffice.pot
## $(EXTRACTRC) */*.rc */*.ui > rc.cpp
## $(XGETTEXT) kotext/kohyphen/*.cpp */*.cc */*.cpp -o $(podir)/koffice.pot
## rm -f kformula/symbolnames.cc
#
#DOXYGEN_REFERENCES = dcop kprint kdeui kparts
#include ../admin/Doxyfile.am
if compile_lib_KOPAINTER
KOPAINTERDIR = kopainter
endif
if compile_kross
KROSSDIR = kross
endif
if compile_kexionly
SUBDIRS = store kwmf kofficecore kofficeui koproperty $(KROSSDIR)
else
SUBDIRS = store kwmf kofficecore kofficeui kotext \
$(KOPAINTERDIR) kformula koproperty kopalette $(KROSSDIR)
endif
messages:
# $(MAKE) -C kformula -f Makefile.am symbolnames.cc
EXCLUDE="-path ./koproperty"; \
LIST=`find . \( \( $$EXCLUDE \) -prune -o -name \*.ui -o -name \*.rc \) -type f | grep -v -e '/\.'`; \
$(EXTRACTRC) $$LIST > rc.cpp; \
LIST=`find . \( \( $$EXCLUDE \) -prune -o -name \*.cpp -o -name \*.cc \) -type f | grep -v -e '/\.'`; \
$(XGETTEXT) $$LIST -o $(podir)/koffice.pot
# $(EXTRACTRC) */*.rc */*.ui > rc.cpp
# $(XGETTEXT) kotext/kohyphen/*.cpp */*.cc */*.cpp -o $(podir)/koffice.pot
# rm -f kformula/symbolnames.cc
DOXYGEN_REFERENCES = dcop kprint kdeui kparts
include ../admin/Doxyfile.am
Please use all-lowercase for new file names.
The current mixed casing used in kofficecore and kofficeui is too confusing
(koDocumentInfoDlg vs KoDocumentInfoDlg, the difference is hard to see),
inconsistent with the rest of KDE, and breaks the emacs shortcut for auto-inserting
#include statements.
Maybe one day we'll rename all the current mixed-case files...
AC_SUBST(KWMF_INCLUDES, '-I$(top_srcdir)/lib/kwmf -I$(top_builddir)/lib/kwmf')
AC_SUBST(KSTORE_INCLUDES, '-I$(top_srcdir)/lib/store -I$(top_builddir)/lib/store')
AC_SUBST(KOTEXT_INCLUDES, '-I$(top_srcdir)/lib/kotext -I$(top_builddir)/lib/kotext')
AC_SUBST(KOPAINTER_INCLUDES, '-I$(top_srcdir)/lib/kopainter -I$(top_builddir)/lib/kopainter')
AC_SUBST(KOPALETTE_INCLUDES, '-I$(top_srcdir)/lib/kopalette -I$(top_builddir)/lib/kopalette')
AC_SUBST(KOFFICECORE_INCLUDES, '-I$(top_srcdir)/lib/kofficecore -I$(top_builddir)/lib/kofficecore')
AC_SUBST(KOFFICEUI_INCLUDES, '-I$(top_srcdir)/lib/kofficeui -I$(top_builddir)/lib/kofficeui')
AC_SUBST(KFORMULA_INCLUDES, '-I$(top_srcdir)/lib/kformula -I$(top_builddir)/lib/kformula')
dnl those are included with e.g. <koproperty/set.h>
AC_SUBST(KOPROPERTY_INCLUDES, '-I$(top_srcdir)/lib -I$(top_builddir)/lib')
AC_SUBST(KROSS_INCLUDES, '-I$(top_srcdir)/lib/kross -I$(top_builddir)/lib/kross')
AC_SUBST(LIB_KOFFICEUI, '$(top_builddir)/lib/kofficeui/libkofficeui.la')
AC_SUBST(LIB_KOFFICECORE, '$(top_builddir)/lib/kofficecore/libkofficecore.la')
AC_SUBST(LIB_KSTORE, '$(top_builddir)/lib/store/libkstore.la')
AC_SUBST(LIB_KOTEXT, '$(top_builddir)/lib/kotext/libkotext.la')
AC_SUBST(LIB_KOPAINTER, '$(top_builddir)/lib/kopainter/libkopainter.la')
AC_SUBST(LIB_KOPALETTE, '$(top_builddir)/lib/kopalette/libkopalette.la')
AC_SUBST(LIB_KWMF, '$(top_builddir)/lib/kwmf/libkwmf.la')
AC_SUBST(LIB_KOWMF, '$(top_builddir)/lib/kwmf/libkowmf.la')
AC_SUBST(LIB_KFORMULA, '$(top_builddir)/lib/kformula/libkformulalib.la')
AC_SUBST(LIB_KOPROPERTY, '$(top_builddir)/lib/koproperty/libkoproperty.la')
AC_SUBST(LIB_KROSS_API, '$(top_builddir)/lib/kross/api/libkrossapi.la')
AC_SUBST(LIB_KROSS_MAIN, '$(top_builddir)/lib/kross/main/libkrossmain.la')
AC_SUBST(interfacedir, '$(top_srcdir)/lib/interfaces')
AC_SUBST(KOFFICE_LIBS, '$(LIB_KOFFICEUI) $(LIB_KOFFICECORE) $(LIB_KSTORE)')
AC_SUBST(KOFFICE_INCLUDES, '$(KOFFICEUI_INCLUDES) $(KOFFICECORE_INCLUDES) $(KSTORE_INCLUDES) $(KWMF_INCLUDES) $(KOPALETTE_INCLUDES)')
AC_DEFINE_UNQUOTED(PREFIX,"$prefix",[Define the PREFIX where to install this package])
if test -s $srcdir/inst-apps ; then
SUBDIRLIST=`cat $srcdir/inst-apps`
else
SUBDIRLIST=`cat $srcdir/subdirs`
fi
# fallback (KDE_CREATE_SUBDIRLIST has this fallback, so I have put it here too.)
if test -z "$SUBDIRLIST" ; then
SUBDIRLIST=`ls -1 $srcdir`
fi
AC_MSG_CHECKING([whether only Kexi is being built])
KEXI_ONLY=yes
for args in $SUBDIRLIST ; do
case $args in
lib) ;;
kexi) ;;
*) if test -d $srcdir/$args ; then
KEXI_ONLY=no
fi
;;
esac
done
AC_MSG_RESULT([$KEXI_ONLY])
AM_CONDITIONAL(compile_kexionly, test "$KEXI_ONLY" = "yes" )
AC_MSG_CHECKING([whether kopainter should be compiled])
# first check which main application we could compile
for args in $SUBDIRLIST ; do
case $args in
krita) COMPILE_LIB_FOR_KRITA="$args " ;;
karbon) COMPILE_LIB_FOR_KARBON="$args " ;;
kivio) COMPILE_LIB_FOR_KIVIO="$args " ;;
esac
done
# now remove the applications the user has asked not to compile
for args in $DO_NOT_COMPILE ; do
case $args in
krita) COMPILE_LIB_FOR_KRITA= ;;
karbon) COMPILE_LIB_FOR_KARBON= ;;
kivio) COMPILE_LIB_FOR_KIVIO= ;;
esac
done
if test -n "$COMPILE_LIB_FOR_KRITA$COMPILE_LIB_FOR_KARBON$COMPILE_LIB_FOR_KIVIO" ; then
USERFEEDBACKCOMPILELIB="yes"
else
USERFEEDBACKCOMPILELIB="no"
fi
AC_MSG_RESULT([$USERFEEDBACKCOMPILELIB])
AM_CONDITIONAL(compile_lib_KOPAINTER, test "$USERFEEDBACKCOMPILELIB" = "yes" )
# These are the rules used by makekdedoc to generate the kdelibs
# documentation with KDOC. Please update them if I forget any
# dependencies.
#
# -Taj (Apr 1999)
kde_MODULES = store kofficecore kofficeui kotext
store_FILES = *.h
store_LIBS = -lkdecore -lqt
kofficecore_FILES = *.h
kofficecore_LIBS = -lkparts -lkdecore -lqt
kofficeui_FILES = *.h
kofficeui_LIBS = -lkofficecore -lkdeui -lkdecore -lqt
kotext_FILES = *.h
kotext_LIBS = -lkofficecore -lkdeui -lkdecore -lqt
Andrea Rizzi <rizzi@kde.org>
Ulrich Kuettler <ulrich.kuettler@mailbox.tu-dresden.de>
Claus O. Wilke <wilke@caltech.edu>
Alfredo Beaumont <alfredo.beaumont@gmail.com>
kde4_header()
add_subdirectory( pics )
add_subdirectory( fonts )
add_subdirectory( dtd )
include_directories(
${CMAKE_SOURCE_DIR}/lib/kotext/
${CMAKE_SOURCE_DIR}/lib//kofficeui/
${KDE4_INCLUDE_DIR} ${QT_INCLUDES} )
########### next target ###############
set(kformulalib_LIB_SRCS
basicelement.cc
contextstyle.cc
formulacursor.cc
formulaelement.cc
indexelement.cc
kformulacontainer.cc
sequenceelement.cc
textelement.cc
bracketelement.cc
matrixelement.cc
fractionelement.cc
rootelement.cc
symbolelement.cc
kformulacommand.cc
kformulamimesource.cc
MatrixDialog.cc
sequenceparser.cc
elementtype.cc
kformuladocument.cc
symboltable.cc
kformulamathmlread.cc
kformulainputfilter.cc
kformulaview.cc
spaceelement.cc
kformulaconfigpage.cc
symbolaction.cc
cmstyle.cc
fontstyle.cc
symbolfontstyle.cc
esstixfontstyle.cc
creationstrategy.cc )
kde4_automoc(${kformulalib_LIB_SRCS})
kde4_add_library(kformulalib SHARED ${kformulalib_LIB_SRCS})
target_link_libraries(kformulalib ${KDE4_KDECORE_LIBS} ${KDE4_KDEUI_LIBS} )
set_target_properties(kformulalib PROPERTIES VERSION 4.0.0 SOVERSION 4 )
install_targets(${LIB_INSTALL_DIR} kformulalib )
########### next target ###############
set(kformulatest_SRCS main.cc kformulawidget.cc )
kde4_automoc(${kformulatest_SRCS})
if(KDE4_BUILD_TESTS)
kde4_add_executable(kformulatest ${kformulatest_SRCS})
target_link_libraries(kformulatest ${KDE4_KDECORE_LIBS} kformulalib )
endif(KDE4_BUILD_TESTS)
########### install files ###############
kde4_footer()
#original Makefile.am contents follow:
#
#INCLUDES= $(KOFFICE_INCLUDES) $(KOTEXT_INCLUDES) $(all_includes)
#
#SUBDIRS = pics fonts dtd
#
########
## We have to name it kformulalib, not just kformula, since that's the name of the kdeinit module for kformula.
#lib_LTLIBRARIES = libkformulalib.la
#
#libkformulalib_la_SOURCES = basicelement.cc contextstyle.cc formulacursor.cc \
# formulaelement.cc indexelement.cc kformulacontainer.cc \
# sequenceelement.cc textelement.cc bracketelement.cc \
# matrixelement.cc fractionelement.cc rootelement.cc symbolelement.cc \
# kformulacommand.cc kformulamimesource.cc \
# MatrixDialog.cc sequenceparser.cc elementtype.cc kformuladocument.cc \
# symboltable.cc kformulamathmlread.cc \
# kformulainputfilter.cc kformulaview.cc \
# spaceelement.cc kformulaconfigpage.cc \
# symbolaction.cc cmstyle.cc \
# fontstyle.cc symbolfontstyle.cc esstixfontstyle.cc creationstrategy.cc
#
##include_HEADERS = kformulacontainer.h kformuladocument.h kformulaview.h \
## kformuladefs.h kformulaconfigpage.h
#
#libkformulalib_la_LDFLAGS = $(all_libraries) -version-info 4:0 -no-undefined $(KDE_RPATH)
#libkformulalib_la_LIBADD = $(LIB_KDEUI) $(LIB_KOTEXT)
#
#libkformulalib_la_METASOURCES = AUTO
#
#check_PROGRAMS = kformulatest
#
#kformulatest_SOURCES = main.cc kformulawidget.cc
#kformulatest_LDADD = libkformulalib.la
#
##symbolnames.cc:
## awk -F, '$$1 !~ "#" {if (split($$3,a," ")>0) print "i18n(\"" a[1] "\");"}' config/unicode.tbl > symbolnames.cc
The design of kformula
(as we imagine it)
The core of kformula is a tree of element objects that make up the
formula which is beeing edited.
The element tree itself
#######################
BasicElement
------------
All element classes are derived from this one.
So it provides the interface that is common to all elements.
BasicElement itself is an abstract class. You never want to create
objects from it.
Responsebilities
(This goes for every derived element and therefore for each one.)
- knows its children. Actually BasicElement doesn't have any. But it
already defines that children must be known by their parent.
- knows its bounding rectangle (its size.) The children are included
in this rect. (The position is relative to the parent.)
//- knows its middle line. (for alignment)
- knows it's zero point for midline (vertical alignment) and
keep open the possibility of negative positions (out of bounding rect)
- draws itself (given a painter); children are drawn, too
- knows all positions where the cursor is allowed to be. (see below)
- knows its parent; The topmost element has no parent; there is a
implicit guaranty that the topmost element is always a
SequenceElement.
- can save and load itself. different formates. (see below)
- all children must be a SequenceElement. Except for SequenceElement's
children that might be of any type.
- might have its own color.
- might have its own font size (see below).
SequenceElement from BasicElement
---------------
Manages a list of children. The children are aligned horizontally at
one middle line. No gaps, no overlaps.
Has no own look. It just draws all its children and is done. Except if
its empty. It looks like an empty space then (i.e. a little square)
Has n+1 valid cursor positions where n is the number of
children. These are before, between and after the children.
May contain any (type of) element as child
except SequenceElements if they contains a SequenceElement they merge
it in the list
They can handle splitting of the sequence to allow "select an put selected item
between parenthesis" i.e. as content child of a delimiterelement)
FormulaElement from SequenceElement
--------------
The only element those parent is null. The root of the element object
tree.
This is the element that is created by the KFormulaDoc and that knows
about it. As every other element knows its parent and therefore the
FormulaElement we get a chance to pass messages to the outside world.
RootElement from BasicElement
-----------
contains two children. content and index. index is optional.
IndexElement from BasicElement
------------
contains five children. content and four indexes. all indexes are
optional. If there is no index the element might be replaced by its content.
TextElement from BasicElement
-----------
contains one char and no children at all.
Might have its own font and size. But preferes to use a reasonalbe
font and size that are calculated from its parents font and a given
scheme (see below).
DelimiterElement from BasicElement
----------------
contains one child and draws delimiters around it. You are free to
choose with.
FractionElement from BasicElement
---------------
2 children: numerator, denominator
DecorationElement from BasicElement
-----------------
A piece of art. It has one child and decorates it above (or below or
both) with some nice decor. Some decor might be required to be as
width as the content. There is a way to guarantee this.
We could even add yet another child that can optionally be shown at
the other side of the decoration.
SumIntegralElement from BasicElement //PrefixedElement
------------------
draws all sorts of mathematical symbols with three children. Above,
below (or whereever the indices and limits go)and to the right.
GeometryElement from BasicElement
---------------
One child.
Draw it at a fixed position relative to parent or absolute.
This is to do dirty things.
This element must not be used, kformula will provide you everything
without the use of this kind of element, any way for strange reasons
you want to do things that are not usually allowed and that are not
typical of a math formula.
[We will decide if implement this element or not]
MatrixElement from BasicElement
-------------
A matrix of children.
With all align stuff, internal borders etc, matrix dots handling (i.e.
those dots or lines that complete the matrix, not well handled in TeX),
etc..
SpaceElement from BasicElement
------------
No children at all. Provides the facility to insert horizontal spaces
in the formula. (therefore it is similar to TextElement.)
OperatorElement from TextElement
---------------
The element to be used for all kinds of operators. It needed because
operators require some space before and after and are therefore no
simple text.
They can you pixamps inestead of fonts, the use of pixmaps is needed only
to give the user the possibilty of introduce its strange operator that we
do not provide as a font. There problems with the scalability but we will
include as fonts (or vectorial images) in kformula all TeX operators so we
hope there is no need to use pixamps for a standard use of KFormula
Navigation
##########
There is a class Cursor that implements a pointer to a valid cursor
position inside the formula structure. Each kformula view needs to
have its own object of this class.
The Cursor class uses the elements facility to travel throught the
structure. (It gives the key to the current element and asks for the
new position.)
If the cursor points into an element this element is said to own the
cursor. There are a few rules that describe how new cursor positions