Commit Graph

84 Commits

Author SHA1 Message Date
Georg Baum
34b7650cbb Introduce wide streams. This fixes the remaining problems of plain text
export (e.g. the ToC) and the navigate menu.

	* src/insets/insetbase.h
	(InsetBase::plaintext): output to a docstream
	(InsetBase::textString): ditto

	* src/mathed/TextPainter.h
	(TextPainter::show): ditto

	* src/support/docstream.[Ch] New file and string streams for
	docstring. The file streams convert to UTF8 on the fly.

	* many more files: Adjust to the changes above


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15301 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-11 19:40:50 +00:00
Abdelrazak Younes
055b0390dc * insetCollapsable:
- setLabel(), getNewLabel(), floatName(): converted to unicode


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15273 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-08 09:36:16 +00:00
Abdelrazak Younes
d81ffbdc23 Fix linking issue with MacOSX.
* insetcollapsable: new floatName method.

* insetfloat.C: floatname function deleted.

* insetwrap.C: floatname function deleted.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15272 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-08 08:47:26 +00:00
Lars Gullik Bjønnes
edd81011ce Change editMessage to return a docstring, change functions to not use to_utf8.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14953 a592a061-630c-0410-9148-cb99ea01b6c8
2006-09-09 18:52:00 +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
Georg Baum
1fc0c01877 convert lfun arguments to docstring
* src/support/docstring.[Ch]
	(from_ascii): new conversion function
	(from_utf8): new conversion function
	(to_utf8): new conversion function
	(operator==) new, compare docstring and ASCII C string
	(operator!=) new, compare docstring and ASCII C string

	* src/support/Makefile.am: add new file docstring.C

	* development/scons/scons_manifest.py: ditto

	* src/funcrequest.[Ch]
	(argument): change name to argument_ and type to docstring,
	add an accessor
	(FuncRequest): Add two new constructors taking a docstring argument

	* all other files: adjust to the FuncRequest changes above


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14861 a592a061-630c-0410-9148-cb99ea01b6c8
2006-09-01 15:41:38 +00:00
Abdelrazak Younes
8c0bd3a77b * TocBackend.[Ch]: new files defining class TocBackend. This class contains adapted code from former toc.C
* toc.[Ch]:
    - rewritten to take advantage of new TocBackend class. The toc
    cache is implemented as a static variable:
    static map<Buffer const *, lyx::TocBackend> toc_backend_;

* buffer_funcs.C:
    updateLabels(Buffer const & buf) now calls
    "lyx::toc::updateToc(buf);"

* pariterator.h: added default constructor
    ParConstIterator(): DocIterator() {}

* insetfloat.C: added pit parameter to TocItem construction

* insetwrap.C: added pit parameter to TocItem construction

* MenuBackend.C: use a const ref instead of a copy of TocList

* ControlToc.[Ch]: optimisation of the API by using const reference instead of copy.

* qt4/TocPanel.[Ch]:
    - optimisation of the API by using const reference instead of
    copy
    - directly use of TocBackend::TocIterator instead of identification by paragraph contents.

* qt4/QToc.C:
    - optimisation of the API by using const reference instead of
    copy
    - makes use of TocBackend::Item::uid()

* qt2/QToc.C:
    - use TocItem::depth() and TocItem::str() instead of public member access.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13713 a592a061-630c-0410-9148-cb99ea01b6c8
2006-04-22 18:48:28 +00:00
Jürgen Spitzmüller
7d978a119f Do not use localized strings internally (bug 1870)
Someone please check the gtk TOC dialog.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10363 a592a061-630c-0410-9148-cb99ea01b6c8
2005-07-27 15:22:08 +00:00
Georg Baum
92379230ff remove unneeded calls to BufferView::update() in insets
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9925 a592a061-630c-0410-9148-cb99ea01b6c8
2005-05-09 17:29:22 +00:00
Georg Baum
323cafa18c implement missing getStatus methods
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9853 a592a061-630c-0410-9148-cb99ea01b6c8
2005-04-22 08:57:22 +00:00
Jean-Marc Lasgouttes
e609bd9925 remove harcoding for Caption layout
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9828 a592a061-630c-0410-9148-cb99ea01b6c8
2005-04-19 08:55:19 +00:00
Jean-Marc Lasgouttes
27a238c271 fix display of label when inserting a new float
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9814 a592a061-630c-0410-9148-cb99ea01b6c8
2005-04-14 10:19:39 +00:00
Lars Gullik Bjønnes
9c2ba3c4ff rename tostr.[Ch] to convert.[Ch]
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9448 a592a061-630c-0410-9148-cb99ea01b6c8
2005-01-06 16:39:35 +00:00
Lars Gullik Bjønnes
6a55be9506 tostr -> convert and some bformat work
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9446 a592a061-630c-0410-9148-cb99ea01b6c8
2005-01-06 15:40:49 +00:00
Lars Gullik Bjønnes
686f1e276f InsetOld -> InsetBase renaming
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9310 a592a061-630c-0410-9148-cb99ea01b6c8
2004-11-25 19:13:07 +00:00
Lars Gullik Bjønnes
183239b7de rename priv_dispatch to doDispatch
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9301 a592a061-630c-0410-9148-cb99ea01b6c8
2004-11-24 21:58:42 +00:00
Lars Gullik Bjønnes
59413be9a0 clone NVI, other small stuff
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9295 a592a061-630c-0410-9148-cb99ea01b6c8
2004-11-23 23:04:52 +00:00
Lars Gullik Bjønnes
7c15014ec2 change "support/std_sstream.h" to <sstream>
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8849 a592a061-630c-0410-9148-cb99ea01b6c8
2004-07-24 10:55:30 +00:00
Lars Gullik Bjønnes
68b7ef25fb simple ws changes only
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8594 a592a061-630c-0410-9148-cb99ea01b6c8
2004-04-03 08:37:12 +00:00
Jürgen Spitzmüller
071120c767 fix the float fix and apply the fixed float fix to insetwrap
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8589 a592a061-630c-0410-9148-cb99ea01b6c8
2004-04-02 08:54:37 +00:00
Alfredo Braunstein
3e80b0b318 the pariterator stuff
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8554 a592a061-630c-0410-9148-cb99ea01b6c8
2004-03-28 22:00:22 +00:00
André Pönitz
0d43ba149a the stuff from the sneak preview:
For one, it still contains a few things that are already in CVS (the
'brown paperbag' changes).

Secondly, this changes the ParagraphList to a std::vector but does not
yet take full advantage of it except removing LyXText::parOffset() and
similar.

I had an extensive talk with my profiler and we are happy nevertheless.

This also moves almost all Cut&Paste specific stuff from text.C to
CutAndPaste.C. Much smaller interface now... Namespace CutAndPaste is
now  lyx::cap::. Was inconsistent with the rest....

Make ParagraphList a proper class. We'll need this later for a
specialized erase/insert.

Remove some unneeded prototypes and function declarations

Use ParameterStruct directly instead of ShareContainer<ParameterStruct>

Inline a few accesses to CursorSlice members as suggested by the profiler.

Fix commandline conversion crash reported by Kayvan.

Replace PosIterator by DocumentIterator. The latter can also iterate
through math and nested text in math...

Remove math specific hack from Documentiterator

Derive InsetCollapsable from InsetText instead of using an InsetText
member. This give us the opportunity to get rid of the InsetOld::owner_
backpointer.

Cosmetics in CutAndPaste.C and cursor.C. Fix nasty crash (popping slices
off an empty selection anchor). Add a few asserts.

Remove all 'manual' update calls. We do now one per user interaction which
is completely sufficient.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8527 a592a061-630c-0410-9148-cb99ea01b6c8
2004-03-25 09:16:36 +00:00
André Pönitz
5198e1d9a3 The Buffer::LyXText -> Buffer::InsetText patch
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8498 a592a061-630c-0410-9148-cb99ea01b6c8
2004-03-18 12:53:43 +00:00
André Pönitz
357a3741c0 * insettabular.[Ch]: remove remains of the 'update' mechanism,
simplify cursor moving function,
	  re-enable horizontal scrolling for large tables

	* insetbase.C:
	* insetbase.[Ch]: remove explicit 'DispatchResult' return type and
	  implicitly assume 'DispatchResult(true, true) with exception of
	  InsetBase::priv_dispatch which does the equivalent of
	  'retrun DispatchResult(false)'

	* inset*.[Ch] (priv_dispatch): adjust


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8435 a592a061-630c-0410-9148-cb99ea01b6c8
2004-02-16 11:58:51 +00:00
André Pönitz
ccc5d55764 Part of IU.
####################################################################

          1.4.0cvs is now NOT fit for any serious use

####################################################################


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8363 a592a061-630c-0410-9148-cb99ea01b6c8
2004-01-20 14:25:24 +00:00
André Pönitz
70d0ba9001 the monster patch
mathed is completely broken, but it's difficult to imprevo with such a
big patch in the tree.

If things don't improve until tomorrow evening, I'll revert this.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8357 a592a061-630c-0410-9148-cb99ea01b6c8
2004-01-15 17:34:44 +00:00
Angus Leeming
fd355bbb2f Remove a whole heap of redundant functions from classes derived from
InsetCommand.
Clean-up many Mailer::string2params functions.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8233 a592a061-630c-0410-9148-cb99ea01b6c8
2003-12-11 15:23:15 +00:00
André Pönitz
4b2c271e23 * buffer.[Ch]:
* lyxtext.h: move ParagraphList member to LyXText
	rename LyXText::ownerParagraphs to LyXText::paragraph

	* CutAndPaste.C:
	* bufferview_funcs.C:
	* iterators.[Ch]:
	* lyx_cb.C:
	* paragraph.C:
	* rowpainter.C:
	* tabular.C:
	* text.C:
	* text2.C:
	* text3.C: adjust

	* lyxfunc.C: move LFUN_INSET_TOGGLE handling to insets.

	* undo.C: fix cursor positioning
	* insetbase.h: whitespace

	* inset.[Ch]: remove latexTextWidth
	make setBackgroundColor virtual

	* insettext.[Ch]:  move ParagraphList member to LyXText

	* insetcollapsable.[Ch]: handle LFUN_INSET_TOGGLE

	* insetcharstyle.C:
	* insetenv.C:
	* insetert.[Ch]:
	* insetfloat.[Ch]:
	* insetminipage.[Ch]:
	* insettabular.C:
	* insetwrap.[Ch]: adjust paragraphs and background color handling,


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8166 a592a061-630c-0410-9148-cb99ea01b6c8
2003-12-01 13:35:49 +00:00
André Pönitz
de49e02934 the update/updateInset merge
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8069 a592a061-630c-0410-9148-cb99ea01b6c8
2003-11-10 13:23:14 +00:00
André Pönitz
b0cffd9fc0 The deed is done.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8064 a592a061-630c-0410-9148-cb99ea01b6c8
2003-11-10 09:06:48 +00:00
José Matox
cd424d7853 Rename ascii to plaintext and LatexRunParams to OutputParams.
Create new files for each output format.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8046 a592a061-630c-0410-9148-cb99ea01b6c8
2003-11-05 12:06:20 +00:00
Lars Gullik Bjønnes
c1319d2c67 Change DispatchResult semantics a bit.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8021 a592a061-630c-0410-9148-cb99ea01b6c8
2003-11-03 19:52:47 +00:00
Lars Gullik Bjønnes
cc719fe0ce more dispatchresult changes
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8013 a592a061-630c-0410-9148-cb99ea01b6c8
2003-11-01 15:45:19 +00:00
José Matox
15c913fe5a unify API for insets export
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8008 a592a061-630c-0410-9148-cb99ea01b6c8
2003-10-31 18:45:43 +00:00
Lars Gullik Bjønnes
a7060da197 make dispatch_result_t ctor of DispatchResult explicit
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8004 a592a061-630c-0410-9148-cb99ea01b6c8
2003-10-29 19:19:27 +00:00
Lars Gullik Bjønnes
b0eb70e869 dispatchresult -> DispatchResult
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7998 a592a061-630c-0410-9148-cb99ea01b6c8
2003-10-29 10:47:21 +00:00
Lars Gullik Bjønnes
87ca6fbbeb the dispatch patch
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7931 a592a061-630c-0410-9148-cb99ea01b6c8
2003-10-17 18:01:15 +00:00
Lars Gullik Bjønnes
44cd0fc9a1 The std::string mammoth path.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7862 a592a061-630c-0410-9148-cb99ea01b6c8
2003-10-06 15:43:21 +00:00
Angus Leeming
fa837efdd6 Remove unused LColor::color framecolor variable from insetcollabsable.h
Remove #include "LColor.h" from insetcollabsable.h (final remaining instance).


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7769 a592a061-630c-0410-9148-cb99ea01b6c8
2003-09-16 10:54:23 +00:00
Lars Gullik Bjønnes
cd03e2b7db Get rid of lyxstring, remove usage of STRCONV.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7751 a592a061-630c-0410-9148-cb99ea01b6c8
2003-09-15 11:00:00 +00:00
Angus Leeming
e835c9477b Pimpl Buffer.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7719 a592a061-630c-0410-9148-cb99ea01b6c8
2003-09-09 11:24:33 +00:00
Angus Leeming
fd36f5ad76 Make buffer's member variables private; use accessor functions.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7717 a592a061-630c-0410-9148-cb99ea01b6c8
2003-09-09 09:47:59 +00:00
Angus Leeming
f3bff9d5d8 Move depth_type to support/types.h.
Remove paragraph.h from buffer.h, paragraph_funcs.h.
Add paragraph.h to a heap of .C files.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7694 a592a061-630c-0410-9148-cb99ea01b6c8
2003-09-06 17:23:08 +00:00
Angus Leeming
f239801ae3 Changes due to the removal of using directives from support/std_sstream.h.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7686 a592a061-630c-0410-9148-cb99ea01b6c8
2003-09-05 18:02:24 +00:00
Angus Leeming
236ea81bc5 Replace LString.h with support/std_string.h,
Lsstream.h with support/std_sstream.h,
support/LIstream.h with support/std_istream.h,
support/LOstream.h with support/std_ostream.h.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7685 a592a061-630c-0410-9148-cb99ea01b6c8
2003-09-05 17:23:11 +00:00
Angus Leeming
c5c7a9e568 Strip out redundant includes (193 of 'em).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7670 a592a061-630c-0410-9148-cb99ea01b6c8
2003-09-05 09:01:27 +00:00
Angus Leeming
1dffc5cfe4 Move #includes out of header files.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7659 a592a061-630c-0410-9148-cb99ea01b6c8
2003-09-04 03:54:04 +00:00
Lars Gullik Bjønnes
b881ed2d5a Use Buffer const reference in most placees possible.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7623 a592a061-630c-0410-9148-cb99ea01b6c8
2003-08-28 07:41:31 +00:00
Alfredo Braunstein
7338f3b980 Add In nsetOld * argument to updateInset to rebreak the correct par.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7615 a592a061-630c-0410-9148-cb99ea01b6c8
2003-08-27 13:51:18 +00:00
Angus Leeming
0be0fcfd59 If I ever see another licence blurb again, it'll be too soon...
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7598 a592a061-630c-0410-9148-cb99ea01b6c8
2003-08-23 00:17:00 +00:00