]> git.lyx.org Git - features.git/commitdiff
some mods I had in my local tree, mostly small stuff, perhaps minus the the Makefile...
authorLars Gullik Bjønnes <larsbj@gullik.org>
Sun, 9 Sep 2001 22:02:19 +0000 (22:02 +0000)
committerLars Gullik Bjønnes <larsbj@gullik.org>
Sun, 9 Sep 2001 22:02:19 +0000 (22:02 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2713 a592a061-630c-0410-9148-cb99ea01b6c8

55 files changed:
config/missing
config/qt2.m4
po/Makefile.in.in
po/POTFILES.in
src/BufferView_pimpl.C
src/ChangeLog
src/CutAndPaste.C
src/Makefile.am
src/WorkArea.C
src/XFormsView.C
src/figureForm.C
src/frontends/gnome/ChangeLog
src/frontends/gnome/Makefile.am
src/frontends/qt2/ChangeLog
src/frontends/qt2/Makefile.am
src/frontends/qt2/QDocument.C
src/frontends/qt2/QThesaurus.C
src/frontends/qt2/QThesaurus.h
src/frontends/xforms/ChangeLog
src/frontends/xforms/FormBase.C
src/frontends/xforms/FormBaseDeprecated.C
src/frontends/xforms/FormFiledialog.C
src/frontends/xforms/FormFiledialog.h
src/frontends/xforms/FormFloat.C
src/frontends/xforms/FormMathsMatrix.C
src/frontends/xforms/FormParagraph.C
src/frontends/xforms/FormPreferences.C
src/frontends/xforms/FormSplash.C
src/frontends/xforms/Makefile.am
src/frontends/xforms/Menubar_pimpl.C
src/frontends/xforms/Timeout_pimpl.C
src/frontends/xforms/Toolbar_pimpl.C
src/frontends/xforms/combox.C
src/frontends/xforms/xforms_helpers.C
src/graphics/ImageLoaderXPM.C
src/insets/figinset.C
src/insets/insetcollapsable.C
src/insets/insettext.C
src/lyx_gui.C
src/lyx_gui_misc.C
src/lyx_gui_misc.h
src/lyx_main.C
src/lyxfunc.C
src/lyxserver.C
src/mathed/Makefile.am
src/mathed/formulabase.C
src/minibuffer.C
src/os2_defines.h
src/paragraph.C
src/paragraph.h
src/tabular-old.C
src/text.C
src/text2.C
src/trans.C
src/undo_funcs.C

index 7789652e877fbc83c770377691249820eebea1f2..d46f79f64da74e24a68d2ec91f952f695afc0e8c 100755 (executable)
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Common stub for a few missing GNU programs while installing.
-# Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 2001 Free Software Foundation, Inc.
 # Franc,ois Pinard <pinard@iro.umontreal.ca>, 1996.
 
 # This program is free software; you can redistribute it and/or modify
@@ -23,6 +23,14 @@ if test $# -eq 0; then
   exit 1
 fi
 
+# In the cases where this matters, `missing' is being run in the
+# srcdir already.
+if test -f configure.in; then
+  configure_ac=configure.ac
+else
+  configure_ac=configure.in
+fi
+
 case "$1" in
 
   -h|--h|--he|--hel|--help)
@@ -61,7 +69,7 @@ Supported PROGRAM values:
   aclocal)
     echo 1>&2 "\
 WARNING: \`$1' is missing on your system.  You should only need it if
-         you modified \`acinclude.m4' or \`configure.in'.  You might want
+         you modified \`acinclude.m4' or \`$configure_ac'.  You might want
          to install the \`Automake' and \`Perl' packages.  Grab them from
          any GNU archive site."
     touch aclocal.m4
@@ -70,7 +78,7 @@ WARNING: \`$1' is missing on your system.  You should only need it if
   autoconf)
     echo 1>&2 "\
 WARNING: \`$1' is missing on your system.  You should only need it if
-         you modified \`configure.in'.  You might want to install the
+         you modified \`$configure_ac'.  You might want to install the
          \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
          archive site."
     touch configure
@@ -79,10 +87,10 @@ WARNING: \`$1' is missing on your system.  You should only need it if
   autoheader)
     echo 1>&2 "\
 WARNING: \`$1' is missing on your system.  You should only need it if
-         you modified \`acconfig.h' or \`configure.in'.  You might want
+         you modified \`acconfig.h' or \`$configure_ac'.  You might want
          to install the \`Autoconf' and \`GNU m4' packages.  Grab them
          from any GNU archive site."
-    files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' configure.in`
+    files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' $configure_ac`
     test -z "$files" && files="config.h"
     touch_files=
     for f in $files; do
@@ -98,7 +106,7 @@ WARNING: \`$1' is missing on your system.  You should only need it if
   automake)
     echo 1>&2 "\
 WARNING: \`$1' is missing on your system.  You should only need it if
-         you modified \`Makefile.am', \`acinclude.m4' or \`configure.in'.
+         you modified \`Makefile.am', \`acinclude.m4' or \`$configure_ac'.
          You might want to install the \`Automake' and \`Perl' packages.
          Grab them from any GNU archive site."
     find . -type f -name Makefile.am -print |
index 6bdd23f9f266d7d2edee06801b8841338ae88869..48b892baaef43c0aa7eaa561d7e7e8c862fc129f 100644 (file)
@@ -222,7 +222,7 @@ if test "$ac_qt2_includes" = NO || test "$ac_qt2_libraries" = NO; then
 AC_CACHE_VAL(ac_cv_have_qt2,
 [#try to guess Qt2 locations
 
-qt2_incdirs="$ac_qt2_includes usr/lib/qt2/include /usr/local/qt2/include /usr/include/qt2 /usr/X11R6/include/X11/qt2 /usr/lib/qt/include /usr/local/qt/include /usr/include/qt /usr/include /usr/X11R6/include/X11/qt $x_includes $QTINC"
+qt2_incdirs="$ac_qt2_includes /usr/lib/qt2/include /usr/local/qt2/include /usr/include/qt2 /usr/X11R6/include/X11/qt2 /usr/lib/qt/include /usr/local/qt/include /usr/include/qt /usr/include /usr/X11R6/include/X11/qt $x_includes $QTINC"
 test -n "$QTDIR" && qt2_incdirs="$QTDIR/include/qt2 $QTDIR/include/qt $QTDIR/include $QTDIR $qt2_incdirs"
 AC_FIND_FILE(qmovie.h, $qt2_incdirs, qt2_incdir)
 ac_qt2_includes="$qt2_incdir"
index 49578dd62ad3558ceb7c3f166fecd1f88e76790f..0012e62d9ad75e09ee4054afa2f2b12bb012242d 100644 (file)
@@ -201,7 +201,7 @@ ${srcdir}/POTFILES.in: $(POTFILE_IN_DEPS)
             grep -l "_(\".*\")" `find src -name \*.[hHC] -print` |\
             grep -v frontends/kde |\
             sed -e '/xforms.forms/d' | \
-            sort -f -d | uniq ) > $@-t \
+            sort -f -n | uniq ) > $@-t \
        && echo "src/ext_l10n.h" >> $@-t \
        && mv $@-t $@
 
index 98016b9a8062b49380f9fcfd22987af6b262546b..d22def5a24391f34fb17de4c75ca18bfb126d3a9 100644 (file)
@@ -10,8 +10,8 @@ src/CutAndPaste.C
 src/debug.C
 src/exporter.C
 src/ext_l10n.h
-src/figureForm.C
 src/figure_form.C
+src/figureForm.C
 src/FontLoader.C
 src/frontends/controllers/biblio.C
 src/frontends/controllers/ButtonController.h
@@ -69,73 +69,73 @@ src/frontends/qt2/QURL.C
 src/frontends/qt2/QVCLog.C
 src/frontends/xforms/combox.C
 src/frontends/xforms/FileDialog.C
-src/frontends/xforms/FormAboutlyx.C
 src/frontends/xforms/form_aboutlyx.C
-src/frontends/xforms/FormBibitem.C
+src/frontends/xforms/FormAboutlyx.C
 src/frontends/xforms/form_bibitem.C
-src/frontends/xforms/FormBibtex.C
+src/frontends/xforms/FormBibitem.C
 src/frontends/xforms/form_bibtex.C
+src/frontends/xforms/FormBibtex.C
 src/frontends/xforms/form_browser.C
-src/frontends/xforms/FormCharacter.C
 src/frontends/xforms/form_character.C
-src/frontends/xforms/FormCitation.C
+src/frontends/xforms/FormCharacter.C
 src/frontends/xforms/form_citation.C
-src/frontends/xforms/FormDocument.C
+src/frontends/xforms/FormCitation.C
 src/frontends/xforms/form_document.C
-src/frontends/xforms/FormError.C
+src/frontends/xforms/FormDocument.C
 src/frontends/xforms/form_error.C
-src/frontends/xforms/FormERT.C
+src/frontends/xforms/FormError.C
 src/frontends/xforms/form_ert.C
-src/frontends/xforms/FormExternal.C
+src/frontends/xforms/FormERT.C
 src/frontends/xforms/form_external.C
-src/frontends/xforms/FormFiledialog.C
+src/frontends/xforms/FormExternal.C
 src/frontends/xforms/form_filedialog.C
-src/frontends/xforms/FormFloat.C
+src/frontends/xforms/FormFiledialog.C
 src/frontends/xforms/form_float.C
-src/frontends/xforms/FormGraphics.C
+src/frontends/xforms/FormFloat.C
 src/frontends/xforms/form_graphics.C
-src/frontends/xforms/FormInclude.C
+src/frontends/xforms/FormGraphics.C
 src/frontends/xforms/form_include.C
-src/frontends/xforms/FormIndex.C
+src/frontends/xforms/FormInclude.C
 src/frontends/xforms/form_index.C
+src/frontends/xforms/FormIndex.C
 src/frontends/xforms/FormLog.C
 src/frontends/xforms/FormMathsBitmap.C
-src/frontends/xforms/FormMathsDeco.C
 src/frontends/xforms/form_maths_deco.C
-src/frontends/xforms/FormMathsDelim.C
+src/frontends/xforms/FormMathsDeco.C
 src/frontends/xforms/form_maths_delim.C
-src/frontends/xforms/FormMathsMatrix.C
+src/frontends/xforms/FormMathsDelim.C
 src/frontends/xforms/form_maths_matrix.C
-src/frontends/xforms/FormMathsPanel.C
+src/frontends/xforms/FormMathsMatrix.C
 src/frontends/xforms/form_maths_panel.C
-src/frontends/xforms/FormMathsSpace.C
+src/frontends/xforms/FormMathsPanel.C
 src/frontends/xforms/form_maths_space.C
-src/frontends/xforms/FormMinipage.C
+src/frontends/xforms/FormMathsSpace.C
 src/frontends/xforms/form_minipage.C
-src/frontends/xforms/FormParagraph.C
+src/frontends/xforms/FormMinipage.C
 src/frontends/xforms/form_paragraph.C
-src/frontends/xforms/FormPreamble.C
+src/frontends/xforms/FormParagraph.C
 src/frontends/xforms/form_preamble.C
-src/frontends/xforms/FormPreferences.C
+src/frontends/xforms/FormPreamble.C
 src/frontends/xforms/form_preferences.C
-src/frontends/xforms/FormPrint.C
+src/frontends/xforms/FormPreferences.C
 src/frontends/xforms/form_print.C
-src/frontends/xforms/FormRef.C
+src/frontends/xforms/FormPrint.C
 src/frontends/xforms/form_ref.C
-src/frontends/xforms/FormSearch.C
+src/frontends/xforms/FormRef.C
 src/frontends/xforms/form_search.C
-src/frontends/xforms/FormSpellchecker.C
+src/frontends/xforms/FormSearch.C
 src/frontends/xforms/form_spellchecker.C
-src/frontends/xforms/FormTabular.C
+src/frontends/xforms/FormSpellchecker.C
 src/frontends/xforms/form_tabular.C
-src/frontends/xforms/FormTabularCreate.C
+src/frontends/xforms/FormTabular.C
 src/frontends/xforms/form_tabular_create.C
-src/frontends/xforms/FormThesaurus.C
+src/frontends/xforms/FormTabularCreate.C
 src/frontends/xforms/form_thesaurus.C
-src/frontends/xforms/FormToc.C
+src/frontends/xforms/FormThesaurus.C
 src/frontends/xforms/form_toc.C
-src/frontends/xforms/FormUrl.C
+src/frontends/xforms/FormToc.C
 src/frontends/xforms/form_url.C
+src/frontends/xforms/FormUrl.C
 src/frontends/xforms/FormVCLog.C
 src/frontends/xforms/input_validators.C
 src/frontends/xforms/Menubar_pimpl.C
index d8532ad1bcba1768de42fddce793ce5de492d6fd..72c561185598a152eec7ec92061d7c6434f425d0 100644 (file)
@@ -3239,6 +3239,8 @@ void BufferView::Pimpl::specialChar(InsetSpecialChar::Kind kind)
                InsetSpecialChar * new_inset = 
                        new InsetSpecialChar(kind);
                insertInset(new_inset);
+               // Ok, what happens here if we are unable to insert
+               // the inset? Leak it?
        }
 }
 
index 7e3267dcee003094cbc09450573802c8f378f3a3..8848e97fb89ea0fc7de47dc95efbb57e0e9a2ab8 100644 (file)
@@ -1,3 +1,22 @@
+2001-09-09  Lars Gullik Bjønnes  <larsbj@birdstep.com>
+
+       * paragraph.h: make the optional constructor arg required instead.
+       some modifications to other files because of this.
+
+       * minibuffer.C (C_MiniBuffer_peek_event): make it static
+
+       * lyxserver.C (C_LyXComm_callback): make it static
+
+       * lyx_main.C (error_handler): make it static
+
+       * lyx_gui.C (LyX_XErrHandler): make it static
+
+       * XFormsView.C (C_XFormsView_atCloseMainFormCB): make it static
+
+       * WorkArea.C: make the extern "C" methods static.
+
+       * Makefile.am (lyx_LDADD): simplify
+
 2001-09-02  Angus Leeming  <a.leeming@ic.ac.uk>
 
        * commandtags.h: removed redundant LFUNs, LFUN_HELP_COPYRIGHT,
index a3c6f64d879a9c235279d93a4ccdaa2dfaed15d5..fbfa1689821e7efea37f047a0f817e834cafb1e7 100644 (file)
@@ -166,13 +166,13 @@ bool CutAndPaste::copySelection(Paragraph * startpar, Paragraph * endpar,
                // copy more than one paragraph
                // clone the paragraphs within the selection
                Paragraph * tmppar = startpar;
-               buf = new Paragraph(*tmppar);
+               buf = new Paragraph(*tmppar, false);
                Paragraph * tmppar2 = buf;
                
                while (tmppar != endpar
                       && tmppar->next()) {
                        tmppar = tmppar->next();
-                       tmppar2->next(new Paragraph(*tmppar));
+                       tmppar2->next(new Paragraph(*tmppar, false));
                        tmppar2->next()->previous(tmppar2);
                        tmppar2 = tmppar2->next();
                }
@@ -209,7 +209,7 @@ bool CutAndPaste::pasteSelection(Paragraph ** par, Paragraph ** endpar,
        // There are two cases: cutbuffer only one paragraph or many
        if (!buf->next()) {
                // only within a paragraph
-               Paragraph * tmpbuf = new Paragraph(*buf);
+               Paragraph * tmpbuf = new Paragraph(*buf, false);
                
                // Some provisions should be done here for checking
                // if we are inserting at the beginning of a
@@ -239,12 +239,12 @@ bool CutAndPaste::pasteSelection(Paragraph ** par, Paragraph ** endpar,
                
                // make a copy of the simple cut_buffer
                Paragraph * tmpbuf = buf;
-               Paragraph * simple_cut_clone = new Paragraph(*tmpbuf);
+               Paragraph * simple_cut_clone = new Paragraph(*tmpbuf, false);
                Paragraph * tmpbuf2 = simple_cut_clone;
                
                while (tmpbuf->next()) {
                        tmpbuf = tmpbuf->next();
-                       tmpbuf2->next(new Paragraph(*tmpbuf));
+                       tmpbuf2->next(new Paragraph(*tmpbuf, false));
                        tmpbuf2->next()->previous(tmpbuf2);
                        tmpbuf2 = tmpbuf2->next();
                }
index be4bb9c2c5d91d000cb811e43b8f9680498ed6ef..70c42bcb06d3f6ab6d0a3e2405bf1d01ff8c5d3c 100644 (file)
@@ -3,17 +3,15 @@ SUBDIRS = mathed insets graphics support frontends
 DISTCLEANFILES= *.orig *.rej *~ *.bak core libintl.h config.h
 MAINTAINERCLEANFILES = $(srcdir)/Makefile.in $(srcdir)/config.h.in
 bin_PROGRAMS = lyx
-## libfrontends is given twice on the link line because it needs stuff
-## from FRONTEND_GUILIB and inversely. If you do not like it, feel
-## free to provide another solution... Maybe signals would solve that
-## magically, but I do not understand them much (JMarc)
+
 lyx_DEPENDENCIES = mathed/libmathed.la insets/libinsets.la \
        graphics/libgraphics.la \
        frontends/libfrontends.la \
        support/libsupport.la \
        @INCLUDED_SIGC@
-lyx_LDADD = $(lyx_DEPENDENCIES) @INTLLIBS@ $(LYX_LIBS) $(SIGC_LIBS) \
-       $(PSPELL_LIBS) @FRONTEND_LDFLAGS@ @FRONTEND_LIBS@ @AIKSAURUS_LIBS@
+lyx_LDADD = $(lyx_DEPENDENCIES) @INTLLIBS@ $(SIGC_LIBS) \
+       $(PSPELL_LIBS) @AIKSAURUS_LIBS@
+
 #lyx_LDFLAGS=-Wl,-O1
 EXTRA_DIST = config.h.in stamp-h.in cheaders ext_l10n.h
 ETAGS_ARGS = --lang=c++
index ea9324e037d1889905e6f870b78d77ec16bdf1cb..1e64810638045d72dad531c92e948228f0124a6e 100644 (file)
@@ -44,15 +44,18 @@ void waitForX()
 
 
 extern "C" {
-// Just a bunch of C wrappers around static members of WorkArea
+       // Just a bunch of C wrappers around static members of WorkArea
+       static
        void C_WorkArea_scroll_cb(FL_OBJECT * ob, long buf)
         {
                WorkArea::scroll_cb(ob, buf);
         }
 
+       
+       static
        int C_WorkArea_work_area_handler(FL_OBJECT * ob, int event,
-                                           FL_Coord, FL_Coord, 
-                                           int key, void * xev)
+                                        FL_Coord, FL_Coord, 
+                                        int key, void * xev)
         {
                return WorkArea::work_area_handler(ob, event,
                                                   0, 0, key, xev);
@@ -485,18 +488,23 @@ namespace {
 string clipboard_selection;
 bool clipboard_read = false;
 
-extern "C"
-int request_clipboard_cb(FL_OBJECT * /*ob*/, long /*type*/,
-                       void const * data, long size) 
-{
-       clipboard_selection.erase();
-
-       if (size > 0)
-               clipboard_selection.reserve(size);
-       for (int i = 0; i < size; ++i)
-               clipboard_selection += static_cast<char const *>(data)[i];
-       clipboard_read = true;
-       return 0;
+extern "C" {
+       
+       static
+       int request_clipboard_cb(FL_OBJECT * /*ob*/, long /*type*/,
+                                void const * data, long size) 
+       {
+               clipboard_selection.erase();
+               
+               if (size > 0)
+                       clipboard_selection.reserve(size);
+               for (int i = 0; i < size; ++i)
+                       clipboard_selection +=
+                               static_cast<char const *>(data)[i];
+               clipboard_read = true;
+               return 0;
+       }
+
 }
 
 } // namespace anon
index 059e174a43e0f6b501d6d129b9cefac135442a4f..8d57aa88f9e329bb2164596a50af3334737aa948 100644 (file)
@@ -15,9 +15,6 @@
 #pragma implementation
 #endif
 
-//#include <sys/time.h>
-//#include <unistd.h>
-
 #include "XFormsView.h"
 #if FL_REVISION < 89 || (FL_REVISION == 89 && FL_FIXLEVEL < 5)
 #include "lyxlookup.h"
@@ -42,7 +39,15 @@ extern void QuitLyX();
 // This is very temporary
 BufferView * current_view;
 
-extern "C" int C_XFormsView_atCloseMainFormCB(FL_FORM *, void *);
+extern "C" {
+       
+static
+int C_XFormsView_atCloseMainFormCB(FL_FORM * form, void * p)
+{
+       return XFormsView::atCloseMainFormCB(form, p);
+}
+       
+}
 
 
 XFormsView::XFormsView(int width, int height)
@@ -87,14 +92,6 @@ int XFormsView::atCloseMainFormCB(FL_FORM *, void *)
 }
 
 
-// Wrapper for the above
-extern "C"
-int C_XFormsView_atCloseMainFormCB(FL_FORM * form, void * p)
-{
-       return XFormsView::atCloseMainFormCB(form, p);
-}
-
-
 void XFormsView::setPosition(int x, int y)
 {
        fl_set_form_position(form_, x, y);
index 320f30c5661c3ee06ee8058b50af101a609e2ba4..b160d0eedc80fa310ab25cfafa28589a71ad8534 100644 (file)
@@ -41,7 +41,8 @@ void Figure()
 
 
 /* callbacks for form form_figure */
-extern "C"
+extern "C" {
+       
 void FigureApplyCB(FL_OBJECT *, long)
 {
        if (!current_view->available())
@@ -103,16 +104,17 @@ void FigureApplyCB(FL_OBJECT *, long)
 }
 
 
-extern "C"
 void FigureCancelCB(FL_OBJECT *, long)
 {
        fl_hide_form(fd_form_figure->form_figure);
 }
 
 
-extern "C"
 void FigureOKCB(FL_OBJECT * ob, long data)
 {
        FigureApplyCB(ob, data);
        FigureCancelCB(ob, data);
 }
+
+}
+
index 5abfa8a23a8687dc5f4296d8ada9ce1fc8115bb9..422155cc165188c8be5b68001657545aa99ae2f1 100644 (file)
@@ -1,3 +1,8 @@
+2001-09-09  Lars Gullik Bjønnes  <larsbj@birdstep.com>
+
+       * Makefile.am (libgnome_la_LIBADD): depend on the gui libs.
+       (libgnome_la_SOURCES): sort
+
 2001-08-27  John Levon  <moz@compsoc.man.ac.uk>
 
        * GUIRunTime.C: initApplication() should take a int & argc, add debug
index 2d0a97679674c1141f821807d157d05a77b14641..e1c28b74b29ac568e5d73d72c0d4e49461912d75 100644 (file)
@@ -1,6 +1,8 @@
 AUTOMAKE_OPTIONS = foreign 1.4
 DISTCLEANFILES= *.orig *.rej *~ *.bak core
 MAINTAINERCLEANFILES = $(srcdir)/Makefile.in
+ETAGS_ARGS = --lang=c++
+
 noinst_LTLIBRARIES = libgnome.la
 BOOST_INCLUDES = -I$(top_srcdir)/boost
 INCLUDES = ${FRONTEND_INCLUDES} -I${top_srcdir}/src/ \
@@ -9,7 +11,7 @@ INCLUDES = ${FRONTEND_INCLUDES} -I${top_srcdir}/src/ \
        -I${top_srcdir}/src/frontends/controllers \
        ${SIGC_CFLAGS} $(BOOST_INCLUDES)
 
-libgnome_la_OBJADD = \
+libgnome_la_LIBADD = \
        ../xforms/xforms_helpers.lo \
        ../xforms/Toolbar_pimpl.lo \
        ../xforms/combox.lo \
@@ -19,7 +21,9 @@ libgnome_la_OBJADD = \
        ../xforms/FormMathsDelim.lo \
        ../xforms/FormMathsMatrix.lo \
        ../xforms/FormMathsPanel.lo \
-       ../xforms/FormMathsSpace.lo 
+       ../xforms/FormMathsSpace.lo \
+       @LYX_LIBS@ @FRONTEND_LDFLAGS@ @FRONTEND_LIBS@
+
 #      ../xforms/FileDialog.lo \
 #      ../xforms/FormFiledialog.lo \
 #      ../xforms/form_filedialog.lo 
@@ -61,32 +65,32 @@ libgnome_la_OBJADD = \
 #      ../xforms/RadioButtonGroup.lo \
 
 LIBS= 
-LDFLAGS= $(libgnome_la_OBJADD)
+#LDFLAGS= $(libgnome_la_OBJADD)
 LYXDATADIRS = 
-#ETAGS_ARGS = --lang=c++
+
 libgnome_la_SOURCES = \
-       gnomeBC.C \
-       gnomeBC.h \
-       gnome_helpers.C \
-       gnome_helpers.h \
-       mainapp.C \
-       mainapp.h \
-       support.c \
-       support.h \
-       pixbutton.h \
        Dialogs.C \
-       GnomeBase.C \
-       GnomeBase.h \
-       GUIRunTime.C \
        FileDialog.C \
-       FormTabularCreate.C \
-       FormTabularCreate.h \
        FormError.C \
        FormError.h \
+       FormTabularCreate.C \
+       FormTabularCreate.h \
        FormUrl.C \
        FormUrl.h \
+       gnome_helpers.C \
+       gnome_helpers.h \
+       GnomeBase.C \
+       GnomeBase.h \
+       gnomeBC.C \
+       gnomeBC.h \
+       GUIRunTime.C \
+       pixbutton.h \
+       mainapp.C \
+       mainapp.h \
        Menubar_pimpl.C \
        Menubar_pimpl.h \
+       support.c \
+       support.h \
        Timeout_pimpl.C \
        Timeout_pimpl.h
 
@@ -98,7 +102,6 @@ libgnome_la_SOURCES = \
 #      GUI_defaults.C \
 #      GUI_initialize.C \
 #      GUI_postlyxrc.C \
-#      GUI_runtime.C \
 #      GUI_applymenu.C
 
 # just copied from old lyx repository
index ad1e03c786296665d10ef3776740b50a2d6e42e8..f0341594a8d2f087f93fc25cf4a2f586535d6441 100644 (file)
@@ -1,3 +1,8 @@
+2001-09-09  Lars Gullik Bjønnes  <larsbj@birdstep.com>
+
+       * Makefile.am (libqt2_la_LIBADD): rename from OBJADD, depend on
+       gui libs
+
 2001-09-06  John Levon  <moz@compsoc.man.ac.uk>
 
        * ui/QMinipageDialog.ui: fix layout, remove old slot
index 6f318ce15a254edcc959b6f717f3b832075df5a1..7ca0ed01329809abfb443401a4aab496d4a117dc 100644 (file)
@@ -15,7 +15,7 @@ include Makefile.dialogs
 
 libqt2_la_DEPENDENCIES = ui/libqt2ui.la moc/libqt2moc.la ui/moc/libqt2uimoc.la
  
-libqt2_la_OBJADD = \
+libqt2_la_LIBADD = \
        ui/libqt2ui.la \
        moc/libqt2moc.la \
        ui/moc/libqt2uimoc.la \
@@ -56,10 +56,11 @@ libqt2_la_OBJADD = \
        ../xforms/form_url.lo \
        ../xforms/input_validators.lo \
        ../xforms/xformsBC.lo \
-       ../xforms/xforms_helpers.lo
+       ../xforms/xforms_helpers.lo \
+       @LYX_LIBS@ @FRONTEND_LDFLAGS@ @FRONTEND_LIBS@
 
 LIBS=
-LDFLAGS= $(libqt2_la_OBJADD)
+#LDFLAGS= $(libqt2_la_OBJADD)
 ETAGS_ARGS = --lang=c++
 
 libqt2_la_SOURCES = \
index c2098c11f84771ffa940d021db69bacdb8e651cb..12be14d60aefd30e18225d92eac20327bdb8e233 100644 (file)
@@ -56,8 +56,6 @@ QDocument::QDocument(LyXView *, Dialogs *)
 
 void QDocument::build_dialog()
 {
-       int n;
-
        // the tabbed folder
        //dialog_.reset(new QDocumentDialog());
 
@@ -119,7 +117,7 @@ void QDocument::build_dialog()
        dialog->docFontSizeCO->insertItem( _( "10" ) );
        dialog->docFontSizeCO->insertItem( _( "11" ) );
        dialog->docFontSizeCO->insertItem( _( "12" ) );
-       for (n=0; tex_fonts[n][0]; ++n) {
+       for (int n=0; tex_fonts[n][0]; ++n) {
                dialog->docFontsCO->insertItem( tex_fonts[n] );
        }
 
@@ -182,7 +180,7 @@ void QDocument::build_dialog()
        dialog->tocDepthSB->setRange( -1, 5 );
        dialog->secNumDepthSB->setSteps( 1, 1 );
        dialog->tocDepthSB->setRange( 1, 1 );
-       for (n=0; tex_graphics[n][0]; ++n) {
+       for (int n=0; tex_graphics[n][0]; ++n) {
                dialog->postscriptDriverCO->insertItem( tex_graphics[n] );
        }
 
index 11cb78849cedc86e73a49dda7c10bdb92d25198e..9b8107bc1d5a902a7314e5d7afc4876ce357838c 100644 (file)
@@ -53,3 +53,8 @@ void QThesaurus::replace()
 {
        controller().replace(dialog_->replaceED->text().latin1());
 }
+
+
+void QThesaurus::apply()
+{
+}
index 9d72b3de674976a6355bd9a8feb7d540c695ea88..c4e4b24136bc50d2b7348b6844adb68ef9a4d42b 100644 (file)
@@ -30,7 +30,7 @@ public:
        QThesaurus(ControlThesaurus &);
 private:
        /// Apply changes
-       virtual void apply() {};
+       virtual void apply();
        /// update
        virtual void update_contents();
        /// build the dialog
index 2f94548ae18a5928003b82ea2eefb77e3a525886..764f3bcf65fc21b932cb81e7acece32696f9d1c9 100644 (file)
@@ -1,3 +1,20 @@
+2001-09-09  Lars Gullik Bjønnes  <larsbj@birdstep.com>
+
+       * combox.C (C_Combox_input_cb): make it static
+       (C_Combox_combo_cb): make it static
+       (C_Combox_peek_event): make it static
+
+       * Toolbar_pimpl.C (C_Toolbar_BubbleTimerCB): make it static
+       (C_Toolbar_BubblePost): make it static
+       (C_Toolbar_ToolbarCB): make it static
+
+       * Timeout_pimpl.C (C_intern_timeout_cb): make it static
+
+       * Menubar_pimpl.C (C_Menubar_Pimpl_MenuCallback): make it static
+
+       * Makefile.am (libxforms_la_LIBADD): add this and depend on the
+       gui libs
+
 2001-09-07  Angus Leeming  <a.leeming@ic.ac.uk>
 
        * FormBaseDeprecated.[Ch]: use the same allow_resize methodology as has
index cd97c3ef83743cc2aa37601258ecd30a68b76986..bfee6f8bd95ddc3bf975362956aef07cc2f37a2d 100644 (file)
 #include "xformsBC.h"
 #include "support/LAssert.h"
 
-// Callback function invoked by xforms when the dialog is closed by the
-// window manager
-extern "C" int C_FormBaseWMHideCB(FL_FORM * form, void *);
+extern "C" {
+       // Callback function invoked by xforms when the dialog is closed by the
+       // window manager
+       static int C_FormBaseWMHideCB(FL_FORM * form, void *);
 
-// To trigger an input event when pasting in an xforms input object
-// using the middle mouse button.
-extern "C" int C_CutandPastePH(FL_OBJECT *, int, FL_Coord, FL_Coord,
-                              int, void *);
+}
 
 
 FormBase::FormBase(ControlButtons & c, string const & t, bool allowResize)
@@ -123,56 +121,60 @@ FormBase * GetForm(FL_OBJECT * ob)
 } // namespace anon
 
 
-extern "C"
-int C_FormBaseWMHideCB(FL_FORM * form, void *)
-{
-       // Close the dialog cleanly, even if the WM is used to do so.
-       lyx::Assert(form && form->u_vdata);
-       FormBase * pre = static_cast<FormBase *>(form->u_vdata);
-       pre->CancelButton();
-       return FL_CANCEL;
-}
+extern "C" {
+       
+       static
+       int C_FormBaseWMHideCB(FL_FORM * form, void *)
+       {
+               // Close the dialog cleanly, even if the WM is used to do so.
+               lyx::Assert(form && form->u_vdata);
+               FormBase * pre = static_cast<FormBase *>(form->u_vdata);
+               pre->CancelButton();
+               return FL_CANCEL;
+       }
 
 
-extern "C" void C_FormBaseApplyCB(FL_OBJECT * ob, long)
-{
-       GetForm(ob)->ApplyButton();
-}
+       void C_FormBaseApplyCB(FL_OBJECT * ob, long)
+       {
+               GetForm(ob)->ApplyButton();
+       }
 
 
-extern "C" void C_FormBaseOKCB(FL_OBJECT * ob, long)
-{
-       GetForm(ob)->OKButton();
-}
+       void C_FormBaseOKCB(FL_OBJECT * ob, long)
+       {
+               GetForm(ob)->OKButton();
+       }
 
 
-extern "C" void C_FormBaseCancelCB(FL_OBJECT * ob, long)
-{
-       FormBase * form = GetForm(ob);
-       form->CancelButton();
-}
+       void C_FormBaseCancelCB(FL_OBJECT * ob, long)
+       {
+               FormBase * form = GetForm(ob);
+               form->CancelButton();
+       }
 
 
-extern "C" void C_FormBaseRestoreCB(FL_OBJECT * ob, long)
-{
-       GetForm(ob)->RestoreButton();
-}
+       void C_FormBaseRestoreCB(FL_OBJECT * ob, long)
+       {
+               GetForm(ob)->RestoreButton();
+       }
 
 
-extern "C" void C_FormBaseInputCB(FL_OBJECT * ob, long d)
-{
-       GetForm(ob)->InputCB(ob, d);
-}
+       void C_FormBaseInputCB(FL_OBJECT * ob, long d)
+       {
+               GetForm(ob)->InputCB(ob, d);
+       }
 
 
-// To trigger an input event when pasting in an xforms input object
-// using the middle mouse button.
-extern "C" int C_CutandPastePH(FL_OBJECT * ob, int event,
-                              FL_Coord, FL_Coord, int key, void *)
-{
-       if ((event == FL_PUSH) && (key == 2) && (ob->objclass == FL_INPUT)) {
-               C_FormBaseInputCB(ob, 0);
+       // To trigger an input event when pasting in an xforms input object
+       // using the middle mouse button.
+       int C_CutandPastePH(FL_OBJECT * ob, int event,
+                           FL_Coord, FL_Coord, int key, void *)
+       {
+               if ((event == FL_PUSH) && (key == 2)
+                   && (ob->objclass == FL_INPUT)) {
+                       C_FormBaseInputCB(ob, 0);
+               }
+               return 0;
        }
 
-       return 0;
 }
index 1e9c294b5c1a422d9e9cb3f0867128f9fd310130..bd661f10c15b9464c502c791f454d82badd2776b 100644 (file)
 
 using SigC::slot;
 
-extern "C" int C_FormBaseDeprecatedWMHideCB(FL_FORM * ob, void * d)
-{
-       return FormBaseDeprecated::WMHideCB(ob, d);
-}
-extern "C" void C_FormBaseDeprecatedApplyCB(FL_OBJECT * ob, long d)
-{
-       FormBaseDeprecated::ApplyCB(ob, d);
-}
-extern "C" void C_FormBaseDeprecatedOKCB(FL_OBJECT * ob, long d)
-{
-       FormBaseDeprecated::OKCB(ob, d);
-}
-extern "C" void C_FormBaseDeprecatedCancelCB(FL_OBJECT * ob, long d)
-{
-       FormBaseDeprecated::CancelCB(ob, d);
-}
-extern "C" void C_FormBaseDeprecatedInputCB(FL_OBJECT * ob, long d)
-{
-       FormBaseDeprecated::InputCB(ob, d);
-}
-extern "C" void C_FormBaseDeprecatedRestoreCB(FL_OBJECT * ob, long d)
-{
-       FormBaseDeprecated::RestoreCB(ob, d);
+extern "C" {
+       
+       static
+       int C_FormBaseDeprecatedWMHideCB(FL_FORM * ob, void * d)
+       {
+               return FormBaseDeprecated::WMHideCB(ob, d);
+       }
+
+       void C_FormBaseDeprecatedApplyCB(FL_OBJECT * ob, long d)
+       {
+               FormBaseDeprecated::ApplyCB(ob, d);
+       }
+
+       void C_FormBaseDeprecatedOKCB(FL_OBJECT * ob, long d)
+       {
+               FormBaseDeprecated::OKCB(ob, d);
+       }
+
+       void C_FormBaseDeprecatedCancelCB(FL_OBJECT * ob, long d)
+       {
+               FormBaseDeprecated::CancelCB(ob, d);
+       }
+
+       void C_FormBaseDeprecatedInputCB(FL_OBJECT * ob, long d)
+       {
+               FormBaseDeprecated::InputCB(ob, d);
+       }
+
+       void C_FormBaseDeprecatedRestoreCB(FL_OBJECT * ob, long d)
+       {
+               FormBaseDeprecated::RestoreCB(ob, d);
+       }
 }
 
 
index bcf77da0a0bc64ab07fb5b8bf201761e9afa4e24..869b5759ca7fd4ae30016667d07cee2d6e54dc76 100644 (file)
@@ -79,6 +79,28 @@ long const SIX_MONTH_SEC = 6L * 30L * 24L * 60L * 60L;
 //static
 long const ONE_HOUR_SEC = 60L * 60L;
 
+extern "C" {
+       
+       static
+       int C_LyXFileDlg_CancelCB(FL_FORM *fl, void *xev)
+       {
+               return FileDialog::Private::CancelCB(fl, xev);
+       }
+       
+       static
+       void C_LyXFileDlg_DoubleClickCB(FL_OBJECT * ob, long data)
+       {
+               FileDialog::Private::DoubleClickCB(ob, data);
+       }
+
+       static
+       void C_LyXFileDlg_FileDlgCB(FL_OBJECT * ob, long data)
+       {
+               FileDialog::Private::FileDlgCB(ob, data);
+       }
+
+}
+
 } // namespace anon
 
 
@@ -545,12 +567,6 @@ void FileDialog::Private::FileDlgCB(FL_OBJECT *, long lArgument)
 }
 
 
-extern "C" void C_LyXFileDlg_FileDlgCB(FL_OBJECT * ob, long data)
-{
-       FileDialog::Private::FileDlgCB(ob, data);
-}
-
-
 // Handle callback from list
 void FileDialog::Private::HandleListHit()
 {
@@ -573,12 +589,6 @@ void FileDialog::Private::DoubleClickCB(FL_OBJECT *, long)
 }
 
 
-extern "C" void C_LyXFileDlg_DoubleClickCB(FL_OBJECT * ob, long data)
-{
-       FileDialog::Private::DoubleClickCB(ob, data);
-}
-
-
 // Handle double click from list
 bool FileDialog::Private::HandleDoubleClick()
 {
@@ -678,12 +688,6 @@ int FileDialog::Private::CancelCB(FL_FORM *, void *)
 }
 
 
-extern "C" int C_LyXFileDlg_CancelCB(FL_FORM *fl, void *xev)
-{
-       return FileDialog::Private::CancelCB(fl, xev);
-}
-
-
 // Simulates a click on OK/Cancel
 void FileDialog::Private::Force(bool cancel)
 {
index 8ba1464a2434fb2820cee67336e3a56b597e8ef3..145f61dbbeb2167b936d106d342df53a70919225 100644 (file)
@@ -37,12 +37,15 @@ public:
        string pszLsEntry;
 };
 
-extern "C" void C_LyXFileDlg_FileDlgCB(FL_OBJECT * ob, long data);
-extern "C" void C_LyXFileDlg_DoubleClickCB(FL_OBJECT * ob, long data);
-extern "C" int C_LyXFileDlg_CancelCB(FL_FORM *fl, void *xev);
 
-class FileDialog::Private : public SigC::Object
-{
+//extern "C" {
+//     void C_LyXFileDlg_FileDlgCB(FL_OBJECT * ob, long data);
+//     void C_LyXFileDlg_DoubleClickCB(FL_OBJECT * ob, long data);
+//     int C_LyXFileDlg_CancelCB(FL_FORM *fl, void *xev);
+//}
+
+
+class FileDialog::Private : public SigC::Object {
 public:
        ///
        Private();
index d9d93d49d906e30039f14939f0a6c3d42b8657f7..f8446144db21a8173bd57327f6af2d69caa7a627 100644 (file)
@@ -29,7 +29,7 @@ FormFloat::FormFloat(ControlFloat & c)
 {}
 
 
-#warning Needs to be implemented. (Lgb)
+// FIX: Needs to be implemented. (Lgb)
 // A way to set to float default is missing.
 // A way to set "force[!]" is missing.
 // Also there are two groups of buttons [Here] and [top,bottom,page,here],
index a16246d67efab941be75e33d0df7531d8655d6c6..186d5b4c7583840faba506d85bab3e1131b7972d 100644 (file)
@@ -31,14 +31,20 @@ using std::strlen;
 static char h_align_str[80] = "c";
 static char v_align_c[] = "tcb";
 
-extern "C"
-int C_FormMathsMatrixAlignFilter(FL_OBJECT * ob, char const *,
-                                           char const * cur, int c)
-{
-       lyx::Assert(ob);
-       FormMathsMatrix * pre = static_cast<FormMathsMatrix *>(ob->u_vdata);
-       lyx::Assert(pre);
-       return pre->AlignFilter(cur, c);
+
+extern "C" {
+       
+       static
+       int C_FormMathsMatrixAlignFilter(FL_OBJECT * ob, char const *,
+                                        char const * cur, int c)
+       {
+               lyx::Assert(ob);
+               FormMathsMatrix * pre =
+                       static_cast<FormMathsMatrix *>(ob->u_vdata);
+               lyx::Assert(pre);
+               return pre->AlignFilter(cur, c);
+       }
+       
 }
 
 
index 2085822a1d504575b8094d2d61bae1ef4b206209..1006f38376fd0a9915fe338d3b5a957b97deb2a6 100644 (file)
@@ -240,7 +240,7 @@ void FormParagraph::apply()
    
     labelwidthstring = fl_get_input(dialog_->input_labelwidth);
     noindent = fl_get_button(dialog_->check_noindent);
-    Spacing::Space linespacing;
+    Spacing::Space linespacing = Spacing::Default;
     string other_linespacing;
     switch (fl_get_choice(dialog_->choice_linespacing)) {
         case 1: linespacing = Spacing::Default; break;
index 33e9d52bdff30c22a626d911c8aef47be270f246..d43c4ef22d9314a1dccc8ca95c50d305ae4f02e5 100644 (file)
@@ -3005,13 +3005,20 @@ void FormPreferences::browse(FL_OBJECT * inpt,
 
 
 // C function wrapper, required by xforms.
-extern "C" int C_FormPreferencesFeedbackCB(FL_OBJECT * ob, int event,
-                                          FL_Coord mx, FL_Coord my,
-                                          int key, void * xev)
-{
-       return FormPreferences::FeedbackCB(ob, event, mx, my, key, xev);
+extern "C" {
+       
+       static
+       int C_FormPreferencesFeedbackCB(FL_OBJECT * ob, int event,
+                                       FL_Coord mx, FL_Coord my,
+                                       int key, void * xev)
+       {
+               return FormPreferences::FeedbackCB(ob, event,
+                                                  mx, my, key, xev);
+       }
+       
 }
 
+
 int FormPreferences::FeedbackCB(FL_OBJECT * ob, int event,
                                FL_Coord, FL_Coord, int, void *)
 {
index 7fac1a161ebeff8a8b75c36f90dbd79f528fae57..7fcef0f8a80354e1be488bc258acd1a92a7e563c 100644 (file)
 #include "form_splash.h"
 #include "support/LAssert.h"
 
-extern "C"
-int C_FormSplashCloseCB(FL_FORM * form, void *)
-{
-       lyx::Assert(form && form->u_vdata);
-       FormSplash * pre = static_cast<FormSplash *>(form->u_vdata);
-       pre->Hide();
-       return FL_CANCEL;
-}
-
-
-extern "C"
-void C_FormSplashCB(FL_OBJECT * ob, long)
-{
-       lyx::Assert(ob && ob->form && ob->form->u_vdata);
-       FormSplash * pre = static_cast<FormSplash*>(ob->form->u_vdata);
-       pre->Hide();
+extern "C" {
+       
+       static
+       int C_FormSplashCloseCB(FL_FORM * form, void *)
+       {
+               lyx::Assert(form && form->u_vdata);
+               FormSplash * pre = static_cast<FormSplash *>(form->u_vdata);
+               pre->Hide();
+               return FL_CANCEL;
+       }
+       
+       void C_FormSplashCB(FL_OBJECT * ob, long)
+       {
+               lyx::Assert(ob && ob->form && ob->form->u_vdata);
+               FormSplash * pre = static_cast<FormSplash*>(ob->form->u_vdata);
+               pre->Hide();
+       }
+       
 }
 
  
index 836eea39a0e2a3109cd7ad9574a6d7b14582006e..f2890307d81ba2dbb3d57ab6473a954d208a1303 100644 (file)
@@ -194,6 +194,8 @@ libxforms_la_SOURCES = \
 #      GUI_runtime.C \
 #      GUI_applymenu.C
 
+libxforms_la_LIBADD = @LYX_LIBS@ @FRONTEND_LDFLAGS@ @FRONTEND_LIBS@
+
 # for convenience only
 updatesrc:
        $(MAKE) -C forms updatesrc
index 0ff7091d880ebd83d9c4afea1ce46aaee9ab849c..b48569185505c3f8b9cb2fd917880d38e0642f95 100644 (file)
@@ -70,9 +70,16 @@ int string_width(string const & str)
 } // namespace anon
 
 
-//Defined later, used in makeMenubar().
-extern "C"
-void C_Menubar_Pimpl_MenuCallback(FL_OBJECT * ob, long button);
+extern "C" {
+
+       //Defined later, used in makeMenubar().
+       static
+       void C_Menubar_Pimpl_MenuCallback(FL_OBJECT * ob, long button)
+       {
+               Menubar::Pimpl::MenuCallback(ob, button);
+       }
+       
+}
 
 
 Menubar::Pimpl::Pimpl(LyXView * view, MenuBackend const & mb) 
@@ -523,13 +530,6 @@ int Menubar::Pimpl::create_submenu(Window win, LyXView * view,
 }
 
 
-extern "C"
-void C_Menubar_Pimpl_MenuCallback(FL_OBJECT * ob, long button)
-{
-       Menubar::Pimpl::MenuCallback(ob, button);
-}
-
-
 void Menubar::Pimpl::MenuCallback(FL_OBJECT * ob, long button)
 {
        ItemInfo * iteminfo = static_cast<ItemInfo *>(ob->u_vdata);
index deefa81da80a67efc101e7e50cfd6025f61c9782..ad96ae2d879642e71069dd4c0fb0436ced4e92f7 100644 (file)
@@ -22,11 +22,15 @@ using std::endl;
 
 namespace {
 
-extern "C" 
-void C_intern_timeout_cb(int, void * data)
-{
-       Timeout * to = static_cast<Timeout *>(data);
-       to->emit();
+extern "C" {
+       
+       static
+       void C_intern_timeout_cb(int, void * data)
+       {
+               Timeout * to = static_cast<Timeout *>(data);
+               to->emit();
+       }
+
 }
 
 } // namespace anon
index 48bad4b157724a6d0c96bd050408fe91395a737d..655fa2a98e808e2865291bed56609b1448e0524d 100644 (file)
@@ -106,7 +106,9 @@ void BubbleTimerCB(FL_OBJECT *, long data)
 }
 
 
-extern "C" void C_Toolbar_BubbleTimerCB(FL_OBJECT * ob, long data)
+extern "C"
+static
+void C_Toolbar_BubbleTimerCB(FL_OBJECT * ob, long data)
 {
        BubbleTimerCB(ob, data);
 }
@@ -114,8 +116,8 @@ extern "C" void C_Toolbar_BubbleTimerCB(FL_OBJECT * ob, long data)
 
 // post_handler for bubble-help (Matthias)
 int BubblePost(FL_OBJECT *ob, int event,
-                       FL_Coord /*mx*/, FL_Coord /*my*/,
-                       int /*key*/, void * /*xev*/)
+              FL_Coord /*mx*/, FL_Coord /*my*/,
+              int /*key*/, void * /*xev*/)
 {
        FL_OBJECT * bubble_timer = reinterpret_cast<FL_OBJECT *>(ob->u_cdata);
        
@@ -134,9 +136,11 @@ int BubblePost(FL_OBJECT *ob, int event,
 }
 
 
-extern "C" int C_Toolbar_BubblePost(FL_OBJECT * ob, int event,
-                                   FL_Coord /*mx*/, FL_Coord /*my*/, 
-                                   int key, void * xev)
+extern "C"
+static
+int C_Toolbar_BubblePost(FL_OBJECT * ob, int event,
+                        FL_Coord /*mx*/, FL_Coord /*my*/, 
+                        int key, void * xev)
 {
        return BubblePost(ob, event, 0, 0, key, xev);
 }
@@ -292,17 +296,18 @@ void ToolbarCB(FL_OBJECT * ob, long ac)
                                   << res << endl;
 }
 
-} // namespace anon
-
 
-extern "C" void C_Toolbar_ToolbarCB(FL_OBJECT * ob, long data)
-{
-       ToolbarCB(ob, data);
+extern "C" {
+       
+       static
+       void C_Toolbar_ToolbarCB(FL_OBJECT * ob, long data)
+       {
+               ToolbarCB(ob, data);
+       }
+       
 }
 
 
-namespace {
-
 void setPixmap(FL_OBJECT * obj, int action, int buttonwidth, int height) {
        string name, arg, xpm_name;
        kb_action act;
index 9f1c54b79c32afece9e1f8961ee964ad3c041713..8509c4b0f3a805e42b9652e221aa82428d88ed78 100644 (file)
@@ -43,9 +43,28 @@ using std::endl;
 
 // These are C wrappers around static members of Combox, used as
 // callbacks for xforms.
-extern "C" void C_Combox_input_cb(FL_OBJECT *ob, long);
-extern "C" void C_Combox_combo_cb(FL_OBJECT *ob, long data) ;
-extern "C" int C_Combox_peek_event(FL_FORM * form, void *xev);
+extern "C" {
+       
+       static
+       void C_Combox_input_cb(FL_OBJECT * ob, long data)
+       {
+               Combox::input_cb(ob, data);
+       }
+       
+       static
+       void C_Combox_combo_cb(FL_OBJECT * ob, long data) 
+       {
+               Combox::combo_cb(ob, data);
+       }
+       
+       static
+       int C_Combox_peek_event(FL_FORM * form, void *xev)
+       {
+               return Combox::peek_event(form, xev);
+       }
+
+}
+
 
 Combox::Combox(combox_type t)
        : type(t), tabfolder1(0), tabfolder2(0)
@@ -364,12 +383,6 @@ void Combox::input_cb(FL_OBJECT * ob, long)
 }
 
 
-extern "C" void C_Combox_input_cb(FL_OBJECT * ob, long data)
-{
-  Combox::input_cb(ob, data);
-}
-
-
 void Combox::combo_cb(FL_OBJECT * ob, long data)
 {
        Combox * combo = static_cast<Combox*>(ob->u_vdata);
@@ -404,11 +417,6 @@ void Combox::combo_cb(FL_OBJECT * ob, long data)
        }
 }
 
-extern "C" void C_Combox_combo_cb(FL_OBJECT * ob, long data) 
-{
-       Combox::combo_cb(ob, data);
-}
-
 
 int Combox::peek_event(FL_FORM * form, void * xev)
 {
@@ -474,11 +482,6 @@ int Combox::peek_event(FL_FORM * form, void * xev)
        }
        return 0;  
 }
-       
-extern "C" int C_Combox_peek_event(FL_FORM * form, void *xev)
-{
-       return Combox::peek_event(form, xev);
-}
 
 
 #ifdef TESTCOMBO
index 839a50acfdd5c3430528b1e1bc822bf6f95f5f48..c9d110da056e253c3173026383b56b1c840d6171 100644 (file)
@@ -38,9 +38,8 @@ void setEnabled(FL_OBJECT * ob, bool enable)
 // Take a string and add breaks so that it fits into a desired label width, w
 string formatted(string const & sin, int w, int size, int style)
 {
-#ifdef WITH_WARNINGS
-#warning Why cant this be done by a one pass algo? (Lgb)
-#endif
+       // FIX: Q: Why cant this be done by a one pass algo? (Lgb)
+
        string sout;
        if (sin.empty()) return sout;
 
index 9cdf6de1e71c71d4ec3eab79e2357a7bf18b68b0..6d1ad4117a08ce2becc4a43915478db879a8e29b 100644 (file)
@@ -60,10 +60,8 @@ ImageLoaderXPM::runImageLoader(string const & filename)
 {
        Display * display = GUIRunTime::x11Display();
 
-//(BE 2000-08-05)
-#ifdef WITH_WARNINGS
-#warning This might be a dirty thing, but I dont know any other solution.
-#endif
+       //(BE 2000-08-05)
+       // This might be a dirty thing, but I dont know any other solution.
        Screen * screen = ScreenOfDisplay(display, GUIRunTime::x11Screen());
 
        Pixmap pixmap;
index a1285e5b624352d31aa33a92146b298df4a1d867..ff49663893252d656dac1a8ba15a43281bdd366e 100644 (file)
@@ -177,7 +177,9 @@ void kill_gs(int pid, int sig)
 }
 
 
-extern "C"
+extern "C" {
+       
+static
 int GhostscriptMsg(XEvent * ev, void *)
 {
        // bin all events not of interest
@@ -313,6 +315,8 @@ int GhostscriptMsg(XEvent * ev, void *)
        return FL_PREEMPT;
 }
 
+}
+
 
 void AllocColors(int num)
 // allocate color cube numxnumxnum, if possible
@@ -388,6 +392,7 @@ void AllocGrays(int num)
        gs_color = true;
 }
 
+
 void InitFigures()
 {
        // if bitmaps and figures are not empty we will leak mem
index 5a9926cff8fa1bd77731f62a4b1c729a2e2024fe..408447e7fb52b5dbe451b83b35de41c20d826f66 100644 (file)
@@ -631,6 +631,8 @@ bool InsetCollapsable::searchForward(BufferView * bv, string const & str,
        first_after_edit = false;
        return found;
 }
+
+
 bool InsetCollapsable::searchBackward(BufferView * bv, string const & str,
                                       bool const & cs, bool const & mw)
 {
@@ -642,9 +644,10 @@ bool InsetCollapsable::searchBackward(BufferView * bv, string const & str,
 }
 
 
-string const InsetCollapsable::selectNextWord(BufferView * bv, float & value) const
+string const InsetCollapsable::selectNextWord(BufferView * bv,
+                                             float & value) const
 {
-       string str = inset.selectNextWord(bv, value);
+       string const str = inset.selectNextWord(bv, value);
        if (first_after_edit && str.empty())
                close(bv);
        first_after_edit = false;
index 9668fea174829122e6df624ca74025aa95f763b8..79ba5e635a83f3389f83754daa192842e03a2975 100644 (file)
@@ -423,8 +423,7 @@ void InsetText::draw(BufferView * bv, LyXFont const & f,
                inset_y = cy(bv) + drawTextYOffset;
        }
        if (!cleared && (need_update == CURSOR)
-               && !getLyXText(bv)->selection.set())
-       {
+           && !getLyXText(bv)->selection.set()) {
                drawFrame(pain, cleared);
                x += last_width; // was width(bv, f);
                need_update = NONE;
@@ -470,9 +469,9 @@ void InsetText::draw(BufferView * bv, LyXFont const & f,
                bv->screen()->update(lt, bv, y_offset, int(x));
        } else {
                locked = false;
-               if (need_update & SELECTION)
+               if (need_update & SELECTION) {
                        bv->screen()->toggleToggle(lt, bv, y_offset, int(x));
-               else if (need_update & CURSOR) {
+               else if (need_update & CURSOR) {
                        bv->screen()->toggleSelection(lt, bv, true, y_offset,int(x));
                        lt->clearSelection();
                        lt->selection.cursor = lt->cursor;
@@ -484,15 +483,20 @@ void InsetText::draw(BufferView * bv, LyXFont const & f,
        lt->refresh_y = 0;
        lt->status(bv, LyXText::UNCHANGED);
        if ((need_update != CURSOR_PAR) &&
-               ((drawFrame_ == ALWAYS) || ((drawFrame_ == LOCKED) && locked)))
+           ((drawFrame_ == ALWAYS) || ((drawFrame_ == LOCKED) && locked))) {
                drawFrame(pain, cleared);
-       else if (need_update & CLEAR_FRAME)
+       } else if (need_update & CLEAR_FRAME) {
                clearFrame(pain, cleared);
+       }
+       
        x += last_width /* was width(bv, f) */ - TEXT_TO_INSET_OFFSET;
+       
        if (bv->text->status() == LyXText::CHANGED_IN_DRAW) {
                need_update |= FULL;
-       } else if (need_update != INIT)
+       } else if (need_update != INIT) {
                need_update = NONE;
+       }
+       
        if (clear)
                lt = 0;
 }
@@ -506,7 +510,8 @@ void InsetText::drawFrame(Painter & pain, bool cleared) const
                frame_y = top_baseline - insetAscent + ttoD2;
                frame_w = last_width - TEXT_TO_INSET_OFFSET;
                frame_h = insetAscent + insetDescent - TEXT_TO_INSET_OFFSET;
-               pain.rectangle(frame_x, frame_y, frame_w, frame_h,
+               pain.rectangle(frame_x, frame_y,
+                              frame_w, frame_h,
                               frame_color);
                frame_is_visible = true;
        }
index 6afd11fb58e8497b445388e826320895b803d008..dcb3b5778cb9620a24a67f360fe995a2e0c07b75 100644 (file)
@@ -75,7 +75,9 @@ FL_resource res[] =
 };
 
 
-extern "C"
+extern "C" {
+       
+static
 int LyX_XErrHandler(Display * display, XErrorEvent * xeev)
 {
        // emergency save
@@ -90,6 +92,8 @@ int LyX_XErrHandler(Display * display, XErrorEvent * xeev)
        lyx::abort();
        return 0; // Solaris CC wants us to return something
 }
+       
+}
 
 
 LyXGUI::LyXGUI(LyX * owner, int * argc, char * argv[], bool GUI)
index 54adb94fe21436aafba27dcabf7813c6c80958df..dc4c6ca53734e13cab33fbfd70e6eb2cfed4863a 100644 (file)
@@ -40,11 +40,15 @@ extern FD_form_sendto * fd_form_sendto;
 
 extern void HideFiguresPopups();
 
+
 // Prevents LyX from being killed when the close box is pressed in a popup.
-extern "C" int CancelCloseBoxCB(FL_FORM *, void *)
+extern "C"
+int CancelCloseBoxCB(FL_FORM *, void *)
 {
        return FL_CANCEL;
 }
+
+
 // Redraw the form (on receipt of a Signal indicating, for example,
 // that the xform colors have been re-mapped).
 void RedrawAllBufferRelatedDialogs()
index 5726d11baa66ac56b48a6d681c21899eb09f7e56..8ce53f9a007752293643fdda0da4ace6f8e2acc6 100644 (file)
@@ -23,7 +23,8 @@
 #include <utility>  /* needed for pair<> definition */
 
 /// Prevents LyX from being killed when the close box is pressed in a popup.
-extern "C" int CancelCloseBoxCB(FL_FORM *, void *);
+extern "C"
+int CancelCloseBoxCB(FL_FORM *, void *);
 
 /** Redraw the form (on receipt of a Signal indicating, for example,
     that the xform colors have been re-mapped). */
index 0197a8a4b38eb4bd1e0b4133817e91dc53df74c0..6993f748a23af0a2c59aa8ffdfda1748d848fb97 100644 (file)
@@ -185,7 +185,52 @@ LyX::~LyX()
 }
 
 
-extern "C" void error_handler(int err_sig);
+extern "C" {
+       
+static
+void error_handler(int err_sig)
+{
+       switch (err_sig) {
+       case SIGHUP:
+               lyxerr << "\nlyx: SIGHUP signal caught" << endl;
+               break;
+       case SIGINT:
+               // no comments
+               break;
+       case SIGFPE:
+               lyxerr << "\nlyx: SIGFPE signal caught" << endl;
+               break;
+       case SIGSEGV:
+               lyxerr << "\nlyx: SIGSEGV signal caught" << endl;
+               lyxerr <<
+                       "Sorry, you have found a bug in LyX."
+                       " If possible, please read 'Known bugs'\n"
+                       "under the Help menu and then send us "
+                       "a full bug report. Thanks!" << endl;
+               break;
+       case SIGTERM:
+               // no comments
+               break;
+       }
+   
+       // Deinstall the signal handlers
+       signal(SIGHUP, SIG_DFL);
+       signal(SIGINT, SIG_DFL);
+       signal(SIGFPE, SIG_DFL);
+       signal(SIGSEGV, SIG_DFL);
+       signal(SIGTERM, SIG_DFL);
+
+       bufferlist.emergencyWriteAll();
+
+       lyxerr << "Bye." << endl;
+       if (err_sig!= SIGHUP && 
+          (!GetEnv("LYXDEBUG").empty() || err_sig == SIGSEGV))
+               lyx::abort();
+       exit(0);
+}
+
+}
+
 
 void LyX::init(bool gui)
 {
@@ -839,44 +884,3 @@ bool LyX::easyParse(int * argc, char * argv[])
 }
 
 
-extern "C"
-void error_handler(int err_sig)
-{
-       switch (err_sig) {
-       case SIGHUP:
-               lyxerr << "\nlyx: SIGHUP signal caught" << endl;
-               break;
-       case SIGINT:
-               // no comments
-               break;
-       case SIGFPE:
-               lyxerr << "\nlyx: SIGFPE signal caught" << endl;
-               break;
-       case SIGSEGV:
-               lyxerr << "\nlyx: SIGSEGV signal caught" << endl;
-               lyxerr <<
-                       "Sorry, you have found a bug in LyX."
-                       " If possible, please read 'Known bugs'\n"
-                       "under the Help menu and then send us "
-                       "a full bug report. Thanks!" << endl;
-               break;
-       case SIGTERM:
-               // no comments
-               break;
-       }
-   
-       // Deinstall the signal handlers
-       signal(SIGHUP, SIG_DFL);
-       signal(SIGINT, SIG_DFL);
-       signal(SIGFPE, SIG_DFL);
-       signal(SIGSEGV, SIG_DFL);
-       signal(SIGTERM, SIG_DFL);
-
-       bufferlist.emergencyWriteAll();
-
-       lyxerr << "Bye." << endl;
-       if (err_sig!= SIGHUP && 
-          (!GetEnv("LYXDEBUG").empty() || err_sig == SIGSEGV))
-               lyx::abort();
-       exit(0);
-}
index dedea4a7a52639843e97cc341a20d5bf4b7c3ce1..d168f41aa57126f1c6d5269be75111f2fce214d3 100644 (file)
@@ -1195,7 +1195,7 @@ string const LyXFunc::dispatch(int ac,
                break;
 #else
 #ifdef WITH_WARNINGS
-#warning Find another implementation here (or another lyxfunc)!
+//#warning Find another implementation here (or another lyxfunc)!
 #endif
 #endif
        case LFUN_HELP_ABOUTLYX:
index 0d6662cd96371c358186f68fddffd025369e8ee5..0133d1abc354a9311bcc112ac2ba55c77a42bd65 100644 (file)
@@ -36,7 +36,6 @@
 
 #include <config.h>
 
-//#include <cstring>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <unistd.h>
@@ -81,14 +80,24 @@ int mkfifo(char const * __path, mode_t __mode) {
 
 extern LyXAction lyxaction;
 
-// C wrapper
-extern "C" void C_LyXComm_callback(int fd, void *v);
+
+extern "C" {
+       
+       // C wrapper
+       static
+       void C_LyXComm_callback(int fd, void *v)
+       {
+               LyXComm::callback(fd, v);
+       }
+
+}
 
 
 // LyXComm class
- // Open pipes
-void LyXComm::openConnection() {
+
+// Open pipes
+void LyXComm::openConnection()
+{
        lyxerr[Debug::LYXSERVER] << "LyXComm: Opening connection" << endl;
        
        // If we are up, that's an error
@@ -113,10 +122,11 @@ void LyXComm::openConnection() {
        // The current emx implementation of access() won't work with pipes.
        rc = DosCreateNPipe(tmp.c_str(), &fd, NP_ACCESS_INBOUND,
                NP_NOWAIT|0x01, 0600, 0600, 0);
-       if (rc == ERROR_PIPE_BUSY) {
+       if (rc == ERROR_PIPE_BUSY)
 #else
-       if (::access(tmp.c_str(), F_OK) == 0) {
+       if (::access(tmp.c_str(), F_OK) == 0)
 #endif
+       {
                lyxerr << "LyXComm: Pipe " << tmp << " already exists.\n"
                       << "If no other LyX program is active, please delete"
                        " the pipe by hand and try again." << endl;
@@ -161,13 +171,14 @@ void LyXComm::openConnection() {
        tmp = pipename + ".out";
        
 #ifndef __EMX__       
-       if (::access(tmp.c_str(), F_OK) == 0) {
+       if (::access(tmp.c_str(), F_OK) == 0)
 #else
        rc = DosCreateNPipe(tmp.c_str(), &fd, NP_ACCESS_DUPLEX,
                NP_NOWAIT|0x01, 0600, 0600, 0);
 
-       if (rc == ERROR_PIPE_BUSY) {
+       if (rc == ERROR_PIPE_BUSY)
 #endif
+       {
                lyxerr << "LyXComm: Pipe " << tmp << " already exists.\n"
                       << "If no other LyX program is active, please delete"
                        " the pipe by hand and try again." << endl;
@@ -216,14 +227,16 @@ void LyXComm::openConnection() {
                lyxerr << "LyXComm: Could not set flags on pipe " << tmp
                       << '\n' << strerror(errno) << endl;
                return;
-       };
+       }
        // We made it!
        ready = true;
        lyxerr[Debug::LYXSERVER] << "LyXComm: Connection established" << endl;
 }
+
+       
 /// Close pipes
-void LyXComm::closeConnection() {
+void LyXComm::closeConnection()
+{
 #ifdef __EMX__
        APIRET rc;
        int errnum;
@@ -287,7 +300,8 @@ void LyXComm::closeConnection() {
        }
        ready = false;
 }
+
+
 // Receives messages and sends then to client
 void LyXComm::callback(int fd, void *v)
 {
@@ -353,13 +367,9 @@ void LyXComm::callback(int fd, void *v)
        errno= 0;
 }
 
-extern "C" void C_LyXComm_callback(int fd, void *v)
-{
-       LyXComm::callback(fd, v);
-}
 
-void LyXComm::send(string const & msg) {
+void LyXComm::send(string const & msg)
+{
        if (msg.empty()) {
                lyxerr << "LyXComm: Request to send empty string. Ignoring."
                       << endl;
index 666ceb7c29a0e0806ec9dd756e2933b73fd0b897..c83aa507ab32b9992b31818215102612e1fd79c0 100644 (file)
@@ -7,8 +7,6 @@ ETAGS_ARGS = --lang=c++
 BOOST_INCLUDES = -I$(top_srcdir)/boost
 INCLUDES = -I${srcdir}/../ $(SIGC_CFLAGS) $(BOOST_INCLUDES)
 
-
-
 libmathed_la_SOURCES = \
        array.C \
        array.h \
index e6421cff7cbce6938f80bb1e0e043264e4126648..cc131a334711f880905bdab7edc927280b48ac6d 100644 (file)
@@ -112,9 +112,7 @@ MathArrayInset * matrixpar(int & idx)
 
 InsetFormulaBase::InsetFormulaBase()
 {
-#ifdef WITH_WARNINGS
-#warning This is needed as long the math parser is not re-entrant
-#endif
+       // This is needed as long the math parser is not re-entrant
        MathMacroTable::builtinMacros();
        //lyxerr << "sizeof MathInset: " << sizeof(MathInset) << "\n";
 }
index 95ebfe3d4a3e16611c77a3c1552f084996299df9..944af290e338f54cbe143514ec0308d25eb40690 100644 (file)
@@ -233,13 +233,17 @@ int MiniBuffer::peek_event(FL_OBJECT * ob, int event, int key)
 }
 
 
-extern "C"
-int C_MiniBuffer_peek_event(FL_OBJECT * ob, int event, 
-                           FL_Coord, FL_Coord,
-                           int key, void * /*xev*/)
-{
-       MiniBuffer * mini = static_cast<MiniBuffer*>(ob->u_vdata);
-       return mini->peek_event(ob, event, key);
+extern "C" {
+       
+       static
+       int C_MiniBuffer_peek_event(FL_OBJECT * ob, int event, 
+                                   FL_Coord, FL_Coord,
+                                   int key, void * /*xev*/)
+       {
+               MiniBuffer * mini = static_cast<MiniBuffer*>(ob->u_vdata);
+               return mini->peek_event(ob, event, key);
+       }
+       
 }
 
 
index 25ffb9903588c4adb9763fffc2a6632e807084c2..aa2b0c785500348f334632bc75d9c302cc46a941 100644 (file)
 #if defined (__cplusplus)
 #include <cctype>
 #include <cstdlib>
-extern "C" inline int readlink(const char *, char *, size_t) {return -1;}
+
+extern "C"
+inline int readlink(const char *, char *, size_t) {return -1;}
+
 #else
 #include <ctype.h>
 #include <stdlib.h>
index 6aabdd620bb1b1659e73c495e30bdfdfaf0f0aed..80745161f20150c9eccb35ee135df76fd12affe2 100644 (file)
@@ -1606,9 +1606,9 @@ bool Paragraph::simpleTeXOnePar(Buffer const * buf,
                }
 #else
 #ifdef WITH_WARNINGS
-#warning For now we ALWAYS have to close the foreign font settings if they are
-#warning there as we start another \selectlanguage with the next paragraph if
-#warning we are in need of this. This should be fixed sometime (Jug)
+//#warning For now we ALWAYS have to close the foreign font settings if they are
+//#warning there as we start another \selectlanguage with the next paragraph if
+//#warning we are in need of this. This should be fixed sometime (Jug)
 #endif
                running_font.latexWriteEndChanges(os, basefont,  basefont);
 #endif
index a01af43b0c859009165604ec9088e3a21f52135d..1b54a1df1a0b858b7c5803c8d8d9995652b7ab5b 100644 (file)
@@ -94,7 +94,7 @@ public:
        explicit
        Paragraph(Paragraph * par);
        ///
-       Paragraph(Paragraph const &, bool same_ids = false);
+       Paragraph(Paragraph const &, bool same_ids);
        /// the destructor removes the new paragraph from the list
        ~Paragraph();
 
@@ -400,6 +400,8 @@ public:
        inset_iterator InsetIterator(size_type pos);
 
 private:
+       /// if anything uses this we don't want it to.
+       Paragraph(Paragraph const &);
        ///
        Paragraph * next_;
        ///
index 6b943119dfac2a30518a302006b407e45740e2af..782d8e71d46fa6488635495ff0bba8bbb55d59eb 100644 (file)
@@ -129,7 +129,7 @@ inline
 void l_getline(istream & is, string & str)
 {
 #ifdef WITH_WARNINGS
-#warning old l_getline
+//#warning old l_getline
 #endif
     getline(is, str);
     while(str.empty())
index 3e8400867af817e380c358e1d875aa2d05b4a971..58cb13af98612f8d1c81e3a3956da9cbb70483c1 100644 (file)
@@ -2281,6 +2281,7 @@ string const LyXText::selectNextWord(BufferView * bview,
                        return str;
                }
 #warning Dekel please have a look on this one RTL? (Jug)
+#warning DEKEL!
                // we have to go on checking so move cusor to the right
                if (cursor.pos() == cursor.par()->size()) {
                        if (!cursor.par()->next())
index b29176a7e8096b94d101830af373526ec8018585..78be2366657e17e677595970d3e17b4fa70b2949 100644 (file)
@@ -2202,8 +2202,8 @@ void LyXText::setCursorIntern(BufferView * bview, Paragraph * par,
                        // and open and lock the inset (bla bla bla)
                        // stuff I don't know... so can you have a look?
                        // (Lgb)
-                       // I moved the lyxerr stuff in here so we can see if this
-                       // is actually really needed and where!
+                       // I moved the lyxerr stuff in here so we can see if
+                       // this is actually really needed and where!
                        // (Jug)
                        it->getLyXText(bview)->setCursorIntern(bview, par, pos, setfont,
                                                               boundary);
index 72e67d5439fc8593e25e858ac0643375014bcde6..6f1e3809f7461ba87cb56d4360c1eef60c64f004 100644 (file)
@@ -221,7 +221,7 @@ void Trans::AddDeadkey(tex_accent accent, string const & keys)
 }
 
 
-int Trans::Load(LyXLex & lex)
+int Trans::Load(LyXLex & lex) 
 {
        bool error = false;
 
@@ -253,7 +253,7 @@ int Trans::Load(LyXLex & lex)
                                return -1;
 
 #if 1
-#warning This code should be removed...
+//#warning This code should be removed...
                        // But we need to fix up all the kmap files first
                        // so that this field is not present anymore.
                        if (lex.next(true)) {
index 64afb1ac196babfbd61a8eb4cb21d78bfc2e7d55..56b53ec745517dd9df85878b2189693875fed901 100644 (file)
@@ -296,7 +296,7 @@ Undo * createUndo(BufferView * bv, Undo::undo_kind kind,
   
                while (tmppar != end && tmppar->next()) {
                        tmppar = tmppar->next();
-                       tmppar2->next(new Paragraph(*tmppar));
+                       tmppar2->next(new Paragraph(*tmppar, false));
                        tmppar2->next()->id(tmppar->id());
                        // a memory optimization: Just store the layout
                        // information when only edit