Commit Graph

660 Commits

Author SHA1 Message Date
Jean-Marc Lasgouttes
759849aa42 * text.C (setCursorFromCoordinates):
* text2.C (setCursorIntern): add an assertion.

	* BufferView_pimpl.C (scrollDocView): reset cursor before setting
	it from coordinates (bug 2830).



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15004 a592a061-630c-0410-9148-cb99ea01b6c8
2006-09-15 09:51:41 +00:00
Abdelrazak Younes
a6444784dc A bunch of conversion to docstring.
- bformat(): contributed by Georg Beaum
- Alert::XXX
- error(): in SpellBase, ispell, psell, aspell, buffer, etc.
- message(), message signal
- displayMessage(), setMessage,
- ErrorItems
- prettyName()
- makeDisplayPath()

and maybe some more...


- etc... 

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14970 a592a061-630c-0410-9148-cb99ea01b6c8
2006-09-11 08:54:10 +00:00
Lars Gullik Bjønnes
43b77ba2d7 Change _() to return a docstring. Fixup callers with the help of lyx::to_utf8.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14952 a592a061-630c-0410-9148-cb99ea01b6c8
2006-09-09 15:27:44 +00:00
Jean-Marc Lasgouttes
45808381d0 Fix bug 2251 (from G Baum)
* src/mathed/math_hullinset.h (displayMargin): new static method.
	* src/mathed/math_hullinset.C (metrics): use displayMargin().

	* src/text2.C (cursorUp, cursorDown): use MathHullInset::displayMargin.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14939 a592a061-630c-0410-9148-cb99ea01b6c8
2006-09-08 13:52:41 +00:00
Georg Baum
e33bac93cd Fix clipboard/selection encoding
* src/frontends/qt[34]/qt_helpers.[Ch]
	(toqstr): add variant for docstring
	(qstring_to_ucs4): Use docstring and port from qt4 to qt3

	* Many other files: Many std::string -> lyx::docstring conversions

	* src/support/lstrings.[Ch]
	(subst): Add variant for docstring and char_type
	(externalLineEnding): std::string -> lyx::docstring
	(internalLineEnding): std::string -> lyx::docstring


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14871 a592a061-630c-0410-9148-cb99ea01b6c8
2006-09-03 07:02:38 +00:00
Jean-Marc Lasgouttes
2669c51d1a * text2.C (init): do not reset curent font (bug 2664)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14698 a592a061-630c-0410-9148-cb99ea01b6c8
2006-08-16 10:09:23 +00:00
Jean-Marc Lasgouttes
91ea3b5438 * text2.C (changeDepthAllowed): exit early when selection spans
several cells (bug 2630)



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14678 a592a061-630c-0410-9148-cb99ea01b6c8
2006-08-14 19:14:44 +00:00
Lars Gullik Bjønnes
c46b7d8955 Merge the unicode branch into trunk.
- src/support/unicode.[Ch]: new files with functions for converting
  to and fro ucs4, ucs2 and utf8.
- src/support/docstring.h: specialization of basic_string that
  holds a uint32_t internally.
- Several functions changed to use char_type instead of char or unsigned char.
- Qt3 and Qt4 sends ucs2 on to core
- Gtk sends ucs4 on to core
- Read and write utf-8 .lyx files.
- font_metrics and painter updated to handle ucs4 chars as input.
- Quite a bit of ugly compability code, conversion string->docstring, etc.
- Have fun...


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14661 a592a061-630c-0410-9148-cb99ea01b6c8
2006-08-13 22:54:59 +00:00
Lars Gullik Bjønnes
1afb2a6b05 Remove quite a few compiler warnings:
- Change unsigned -> signed
	- Change signed -> unsigned
        - Add a cast or two (really few of those)
	- Remove/comment out unused variables
	- Comment out unused arguments
	- Add missing cases to switches.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14344 a592a061-630c-0410-9148-cb99ea01b6c8
2006-07-06 08:18:51 +00:00
Jürgen Spitzmüller
54acb900ad The Grand Font Selection Redesign:
* lib/lyx2lyx/LyX.py (format_relation): add file format 247 (from Georg BAUM).

        * lib/lyx2lyx/lyx_1_5.py: add convert_font_settings, revert_font_settings (from Georg BAUM).

        * lib/chkconfig.ltx: Test for newly supported font packages

        * lib/doc/LaTeXConfig.lyx.in: document newly supported font packages

        * lib/doc/UserGuide.lyx: document new UI.

        * lib/doc/Extended.lyx: update PostScript font documentation

        * development/FORMAT: document file format change 246->247.

        * src/tex-strings.[Ch]: new strings tex_fonts_roman, tex_fonts_sans, 
           tex_fonts_monospaced (with GUI equivalents).

        * src/buffer.C: Format up to 247.

        * src/bufferparams.C:
        new params fontsRoman, fontsSans, fontsTypewriter, fontsDefaultFamily,    
        fontsSC, fontsOSF, fontsSansScale and fontsTypewriterScale
        (LyXFont const BufferParams::getFont): consider switch of default family.
        (string const BufferParams::loadFonts): new method to get all the LaTeX 
        font stuff done.

        * src/paragraph.C
        (LyXFont const Paragraph::getFont):
        (LyXFont const Paragraph::getLabelFont):
        (LyXFont const Paragraph::getLayoutFont): user buffer's not textclass's 
        default font

        * src/text.C
        (int LyXText::leftMargin):
        (int LyXText::rightMargin): user buffer's not textclass's default font

        * src/text2.C
        (LyXFont LyXText::getFont):
        (LyXFont LyXText::getLayoutFont):
        (LyXFont LyXText::getLabelFont): check if the family of the default document 
        font has been customized.

        * src/frontends/gtk/GDocument.[Ch]: implement new font ui (from Georg BAUM).

        * src/frontends/gtk/glade/document.glade: implement new font ui (from Georg BAUM). 

        * src/frontends/qt3/Makefile.dialogs: add new FontModuleBase

        * src/frontends/qt3/ui/FontModuleBase.ui: new File

        * src/frontends/qt3/ui/TextLayoutModuleBase.ui: remove font widgets

        * src/frontends/qt3/QDocument.C
        * src/frontends/qt3/QDocumentDialog.[Ch]: implement new font ui

        * src/frontends/qt4/Makefile.dialogs: add new FontUi

        * src/frontends/qt4/QDocumentDialog.[Ch]: implement new font ui

        * src/frontends/qt4/ui/FontUi.ui: new File

        * src/frontends/qt4/ui/TextLayoutUi.ui: remove font widgets

        * src/frontends/qt4/ui/compile_uic.sh: add new FontUi

        * src/frontends/xforms/FormDocument.[Ch]: implement new font ui

        * src/frontends/xforms/forms/form_document.fd: add new font tab.

        * src/frontends/controllers/ControlDocument.[Ch]
        (char ControlDocument::fontfamilies):
        (char ControlDocument::fontfamilies_gui):
        (bool ControlDocument::isFontAvailable):
        (bool ControlDocument::providesSC):
        (bool ControlDocument::providesOSF):
        (bool ControlDocument::providesScale): new methods, providing font info.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14143 a592a061-630c-0410-9148-cb99ea01b6c8
2006-06-19 08:10:17 +00:00
Michael Schmitt
1396ade8b1 fix LFUN enum values (some of them were broken by r13801)
adjust some commands according to the LyX naming conventions
(toggle-tooltip => tooltip-toggle, *-change(s) => change(s)-*) 


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13811 a592a061-630c-0410-9148-cb99ea01b6c8
2006-05-08 18:09:19 +00:00
André Pönitz
da65e2b7fb rename LFUN enum values according to their command (as used in th minibuffer/bind files
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13801 a592a061-630c-0410-9148-cb99ea01b6c8
2006-05-05 20:23:12 +00:00
Abdelrazak Younes
f6bcac7285 * src/buffer_funcs.[Ch]
- updateCounters renamed to updateLabels
 - void updateLabels(Buffer const & buf,
   ParIterator & it): new convenience function
 - void updateLabels(Buffer const & buf,
   ParIterator & from, ParIterator & to): new convenience function
 - setCounter renamed to setLabel
 - bool tryToUpdateCurrentLabel(Buffer const & buf,
   ParIterator & it): new method
 - needsUpdateCounters: deleted

* src/BufferView_pimpl.C
* src/CutAndPaste.C
* src/frontends/controllers/ControlDocument.C
* src/lyxfunc.C
* src/text.C
* src/text2.C
* src/text3.C
 - fixed the calls to updateLabels


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13689 a592a061-630c-0410-9148-cb99ea01b6c8
2006-04-16 14:19:25 +00:00
André Pönitz
1f5c5a06ee support/textutils.h:
support/filetools.h: rename IsDirWriteable IsFileReadable IsLyXFilename
IsSGMLFilename IsLineSeparatorChar IsLetterChar IsPrintable
IsPrintableNonspace IsDigit to lower case initial

lyxvc.C:
LaTeXFeatures.C:
lyx_cb.C:
insets/insetbibtex.C:
insets/insetexternal.C:
insets/insetgraphics.C:
insets/ExternalSupport.C:
insets/insetinclude.C:
BufferView_pimpl.C:
graphics/GraphicsCacheItem.C:
text2.C:
converter.C:
buffer.C:
lyxfunc.C:
frontends/gtk/ghelpers.C:
frontends/controllers/ControlGraphics.C:
frontends/controllers/ControlInclude.C:
frontends/controllers/ControlSpellchecker.C:
support/filetools.C:
support/filetools.h: adjust


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13595 a592a061-630c-0410-9148-cb99ea01b6c8
2006-04-08 09:09:57 +00:00
Abdelrazak Younes
4b0a5549b1 * buffer_funcs.[Ch]: new needsUpdateCounters function
* text.C:
 - LyXText::breakParagraph(): test if needsUpdateCounters() is enough before a full updateCounter
 - LyXText::backspacePos0(): ditto

* text2.C:
 - LyXText::deleteEmptyParagraphMechanism(): ditto


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13593 a592a061-630c-0410-9148-cb99ea01b6c8
2006-04-07 22:16:09 +00:00
Lars Gullik Bjønnes
3b9338a3a8 Whitespace cleanup.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13565 a592a061-630c-0410-9148-cb99ea01b6c8
2006-04-05 23:56:29 +00:00
Lars Gullik Bjønnes
9d6cad3fe6 * output_latex.h:
* buffer.h:
        * CutAndPaste.h:
        * pariterator.h:
        * paragraph_funcs.h:
        * output_linuxdoc.h:
        * output_docbook.h:
        * insets/insettext.h: get forward declaration of ParagraphList

        * output_plaintext.C:
        * bufferlist.C:
        * undo.C:
        * lyxtext.h:
        * undo.h:
        * buffer_funcs.C:
        * insets/insetbibitem.C: get proper ParagraphList decls

        * output_linuxdoc.C (linuxdocParagraphs):
        * output_latex.C (TeXOnePar):
        * insets/insettext.C (appendParagraphs):
        * insets/insetcharstyle.C (docbook): use std::distance

        * CutAndPaste.C (pasteSelectionHelper, copySelectionHelper):
        * paragraph_funcs.C (breakParagraph,
        breakParagraphConservative, mergeParagraph):
        * text.C (acceptChange, rejectChange):
        * text2.C (deleteEmptyParagraphMechanism): use boost::next

        * output_docbook.C (several places): use boost::next and
        std::distance

        * ParagraphList_fwd.h: modify to provid a forward declaratoin
        of the new ParagraphList.

        * RandomAccessList.h: New container for Paragraphs from
        Abdelrazak Younes

        * ParagraphList.h: new file, setup user of RandomAccessList

        * paragraph.C: remove ParagraphList constructor from this file



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13467 a592a061-630c-0410-9148-cb99ea01b6c8
2006-03-23 20:11:06 +00:00
Jean-Marc Lasgouttes
08604e3519 bug 2298: cursorTop/Bottom/Home/End does not redraw after dEPM
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13395 a592a061-630c-0410-9148-cb99ea01b6c8
2006-03-16 14:24:53 +00:00
Georg Baum
5d3008ac51 fix bug 2273
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10814 a592a061-630c-0410-9148-cb99ea01b6c8
2006-02-06 17:57:49 +00:00
Martin Vermeer
6688a55908 Fix bug 2115 ("blueline bug")
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10808 a592a061-630c-0410-9148-cb99ea01b6c8
2006-02-05 13:20:16 +00:00
Jürgen Spitzmüller
0fa599cf52 fix crash when undoing DEPM in last paragraph (bug 2022).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10799 a592a061-630c-0410-9148-cb99ea01b6c8
2006-01-30 16:34:30 +00:00
Martin Vermeer
429c5d7160 Fix 2019: take inset's own font settings into account when defining font to
reduce to


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10784 a592a061-630c-0410-9148-cb99ea01b6c8
2006-01-28 12:39:22 +00:00
Martin Vermeer
2fc3845c4e Fix bug 2015: on screen fonts in nested environments can be wrong
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10767 a592a061-630c-0410-9148-cb99ea01b6c8
2006-01-23 10:25:41 +00:00
Jean-Marc Lasgouttes
86d8a57443 fix bug 2155: crash when undoing dEPM
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10707 a592a061-630c-0410-9148-cb99ea01b6c8
2006-01-04 14:24:40 +00:00
Jean-Marc Lasgouttes
d0cb16c256 fix bug 2146
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10645 a592a061-630c-0410-9148-cb99ea01b6c8
2005-12-06 14:54:23 +00:00
Georg Baum
dd6c706cef restore 1.3 behaviour when changing tabular columns to variable width
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10625 a592a061-630c-0410-9148-cb99ea01b6c8
2005-11-28 11:52:03 +00:00
Jean-Marc Lasgouttes
8679982264 fix crash with DEPM when the cursor goes in a deeper inset
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10573 a592a061-630c-0410-9148-cb99ea01b6c8
2005-10-25 09:14:11 +00:00
Jean-Marc Lasgouttes
20af9e8555 fix two crashes related to dEPM. Some crashes remain
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10551 a592a061-630c-0410-9148-cb99ea01b6c8
2005-10-13 14:48:27 +00:00
Angus Leeming
2eca6adcad Just whitespace
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10487 a592a061-630c-0410-9148-cb99ea01b6c8
2005-09-26 22:54:12 +00:00
Jean-Marc Lasgouttes
16c957358a incluse boost/current_function.hpp when needed
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10482 a592a061-630c-0410-9148-cb99ea01b6c8
2005-09-26 09:20:15 +00:00
Jean-Marc Lasgouttes
68a101a8ae more fixing of bug 2010
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10471 a592a061-630c-0410-9148-cb99ea01b6c8
2005-09-21 10:38:24 +00:00
Jean-Marc Lasgouttes
81efcd9cf6 fix compiler warnings (bug 1927)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10465 a592a061-630c-0410-9148-cb99ea01b6c8
2005-09-20 08:31:37 +00:00
Jean-Marc Lasgouttes
6572d0d661 fix bug 2010 (boundary effects at the end of text insets)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10445 a592a061-630c-0410-9148-cb99ea01b6c8
2005-09-15 13:53:38 +00:00
Georg Baum
c8acdbb7c5 fix bug 1998
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10410 a592a061-630c-0410-9148-cb99ea01b6c8
2005-09-05 06:50:42 +00:00
Jürgen Spitzmüller
a9ec2ab3df fix bug 1254 (handling of blanks in change tracking mode)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10380 a592a061-630c-0410-9148-cb99ea01b6c8
2005-08-01 12:37:25 +00:00
Jürgen Spitzmüller
7bc6a713a2 fix insertStringAsLines assert (bug 1939), John's version.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10373 a592a061-630c-0410-9148-cb99ea01b6c8
2005-07-29 10:00:43 +00:00
Angus Leeming
83ce5ac33e Consistent variable defintions don't need explicit conversion with picky compilers...
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10335 a592a061-630c-0410-9148-cb99ea01b6c8
2005-07-18 20:34:55 +00:00
André Pönitz
af5acb6dc7 ~4% speedup by inlining a few one-line accessors
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10320 a592a061-630c-0410-9148-cb99ea01b6c8
2005-07-18 11:00:15 +00:00
André Pönitz
6768d3a148 fix counters on depm
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10290 a592a061-630c-0410-9148-cb99ea01b6c8
2005-07-17 15:22:15 +00:00
Jürgen Vigna
4126b3f828 Add parameter boundary for getRow() function
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10276 a592a061-630c-0410-9148-cb99ea01b6c8
2005-07-17 12:02:48 +00:00
Jürgen Vigna
a31c518b42 Fixed one of problem
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10268 a592a061-630c-0410-9148-cb99ea01b6c8
2005-07-17 09:52:52 +00:00
Jürgen Vigna
41021dce94 More fixes to cursor handling with boundary
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10263 a592a061-630c-0410-9148-cb99ea01b6c8
2005-07-16 23:54:32 +00:00
Jean-Marc Lasgouttes
5be1c17c7c Check if we are on column 0 for special case
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10260 a592a061-630c-0410-9148-cb99ea01b6c8
2005-07-16 21:19:36 +00:00
Jean-Marc Lasgouttes
83bf606e60 handle special case Newline Inset
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10258 a592a061-630c-0410-9148-cb99ea01b6c8
2005-07-16 18:21:50 +00:00
Jean-Marc Lasgouttes
868ab452a5 fix cursor movement with boundary
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10252 a592a061-630c-0410-9148-cb99ea01b6c8
2005-07-16 16:34:54 +00:00
Lars Gullik Bjønnes
ef8e527612 drop reLyX like it is hot, and setup to use tex2lyx instead (and remerged po files + no.po small update)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10244 a592a061-630c-0410-9148-cb99ea01b6c8
2005-07-16 15:18:14 +00:00
Jean-Marc Lasgouttes
f0492e4ba3 Consider rows without trailing blank
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10237 a592a061-630c-0410-9148-cb99ea01b6c8
2005-07-16 11:03:01 +00:00
André Pönitz
41ecabf519 make boundary property an iterator property instead of a CursorSlice property
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10214 a592a061-630c-0410-9148-cb99ea01b6c8
2005-07-15 15:49:40 +00:00
Lars Gullik Bjønnes
8355663e97 bug 1825 make sure that we do not return a pos that is not on the row
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10206 a592a061-630c-0410-9148-cb99ea01b6c8
2005-07-15 12:56:23 +00:00
André Pönitz
97a158fd8e small cosmetic fix and removing some debug output
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10198 a592a061-630c-0410-9148-cb99ea01b6c8
2005-07-15 08:51:34 +00:00