Commit Graph

65 Commits

Author SHA1 Message Date
Jürgen Spitzmüller
9bfc1c9d46 final final touch.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26208 a592a061-630c-0410-9148-cb99ea01b6c8
2008-08-19 07:51:40 +00:00
Jürgen Spitzmüller
a2906cb877 ** proper implementation of pLaTeX by Tetsuya Makimura and me, fixes many remaining problems and bugs with language "japanese" (bugs 4863, 4290, 4700 and partially 4697) **
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26200 a592a061-630c-0410-9148-cb99ea01b6c8
2008-08-18 17:26:09 +00:00
Richard Heck
cca78e3c8a Change the "empty layout" to the "plain layout", to try to avoid confusion.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26025 a592a061-630c-0410-9148-cb99ea01b6c8
2008-08-01 20:57:27 +00:00
Jürgen Spitzmüller
af9305f4ac *** sanitize listing's encoding handling ***
* src/Encoding.h:
	- new member hasFixedWidth()
* src/output_latex.{cpp,h} (switchEncoding):
	- add option to force encoding switch
* src/insets/InsetListing.cpp (latex):
	- force encoding switch only in multibyte context, switch the encoding properly,
	  and add some error messages.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25730 a592a061-630c-0410-9148-cb99ea01b6c8
2008-07-20 17:14:10 +00:00
Richard Heck
780bce0f96 Rename empty layout stuff to plain layout stuff.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25541 a592a061-630c-0410-9148-cb99ea01b6c8
2008-07-10 17:41:52 +00:00
Jürgen Spitzmüller
612e52b093 Back to CJK sanity I: Fix bug 4698 and 4696.
* lib/encodings:
* src/support/docstream.h:
	- JIS is not a valid iconv name. Rename to ISO-2022-JP

* src/output_latex.cpp:
	- fix wrong encoding switch.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25510 a592a061-630c-0410-9148-cb99ea01b6c8
2008-07-09 07:21:02 +00:00
Pavel Sanda
20b9e0ba93 Remove InsetEnvironment. This is unfinished decade old stuff.
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg141609.html


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25479 a592a061-630c-0410-9148-cb99ea01b6c8
2008-07-07 16:34:55 +00:00
Jürgen Spitzmüller
35e14de706 * src/output_latex.cpp:
- no blank lines before environments (bug 4993).

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25416 a592a061-630c-0410-9148-cb99ea01b6c8
2008-07-02 08:34:55 +00:00
Jürgen Spitzmüller
d7eaaba900 ** support for CJK font argument. File Format change **
* src/BufferParams.{cpp,h}:
	- new param fontsCJK (font_cjk).

* src/output_latex.cpp:
	- use fontsCJK param.

* src/Buffer.cpp:
	- increase file format

* src/frontends/qt4/GuiDocument.cpp:
* src/frontends/qt4/ui/FontUi.ui:
	- GUI for the CJK font param

* lib/lyx2lyx/lyx_1_6.py:
	- remove font_cjk param on reversion.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25135 a592a061-630c-0410-9148-cb99ea01b6c8
2008-06-05 06:18:34 +00:00
Jürgen Spitzmüller
b607d70eb4 * src/output_latex.cpp:
- handle CJK nesting correctly with nested insets (bug 4913).

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25093 a592a061-630c-0410-9148-cb99ea01b6c8
2008-06-03 07:51:14 +00:00
Jean-Marc Lasgouttes
9b4a26a252 rename assert.h to lassert.h
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24559 a592a061-630c-0410-9148-cb99ea01b6c8
2008-04-30 08:26:40 +00:00
Richard Heck
2b77c5d4af Now fix the cosmetics.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24455 a592a061-630c-0410-9148-cb99ea01b6c8
2008-04-22 18:33:07 +00:00
Richard Heck
4b33a37c97 Whoops.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24454 a592a061-630c-0410-9148-cb99ea01b6c8
2008-04-22 18:32:00 +00:00
Richard Heck
8c99d7227e Fix bug 4576. Bug was mixed up with Empty Layout stuff. It was not always easy for me to know then which test I needed to do, but if there are more of these, they'll be similar. Anyway, the right test here would have been:
if (!par->forceEmptyLayout())
but in fact things can be simplified more.

Cosmetics will follow. This patch makes the action more obvious.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24453 a592a061-630c-0410-9148-cb99ea01b6c8
2008-04-22 18:30:43 +00:00
André Pönitz
7f461f4392 infrastructure for 'graceful asserts'
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24216 a592a061-630c-0410-9148-cb99ea01b6c8
2008-04-10 21:49:34 +00:00
Enrico Forestieri
958b6b7069 Fix bug 4665:
http://bugzilla.lyx.org/show_bug.cgi?id=4665


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23989 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-26 22:38:41 +00:00
André Pönitz
62d5a54ae7 small optimization
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23893 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-21 22:51:36 +00:00
Richard Heck
a01cb111a0 Change the interface to a paragraph's layout. We still store a LayoutPtr, but now privately, and make a Layout const & available to clients.
The need for a LayoutPtr arises from the fact that (a) we do not want to give our clients a Layout &, since we do not want them to be able to change our Layout; but (b) we also need to be able to change which layout is ours. So we cannot store a Layout const &. Or so it seems to the compiler.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23522 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-06 21:31:27 +00:00
Richard Heck
f401ce5d29 Changes LayoutList from a vector<LayoutPtr> to a vector<Layout>.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23519 a592a061-630c-0410-9148-cb99ea01b6c8
2008-03-06 20:01:30 +00:00
Richard Heck
d8a6b5bfd0 Remove TextClassPtr without losing the type safety it provided.
See these threads:
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg136112.html
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg136062.html
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg135997.html
for some background.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23299 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-28 01:42:02 +00:00
André Pönitz
db8c16d554 progress on buffer-reference-in-insets. beware of instabilities...
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23289 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-27 20:43:16 +00:00
Richard Heck
c7afa2d658 More cleanup from Andre.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23194 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-24 15:44:11 +00:00
Richard Heck
0362c6aae7 Andre's s/getTextClass/textClass/ cleanup.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23190 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-24 15:06:35 +00:00
Richard Heck
2e7d1199df Revert 23154.
Sorry, Andre, but this broke not only the modules stuff but the general handling of TextClasses. I'm not opposed to doing this sort of thing, but it's going to be a little more complicated. I'll do it when I get a bit of time, or I can explain what the issue is here if you want to do it.

I'll separately re-commit some of the cleanup here.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23189 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-24 14:59:23 +00:00
André Pönitz
b306e9a2e1 Replace the text class shared ptr by good old index-into-global-list.
Also a few cosmetical changes where I xould not resist.

Would be nice if the 'modules people' could verify that their baby 
is strill alive... 



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23154 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-23 11:36:15 +00:00
Abdelrazak Younes
2bf1c09376 header cleanup
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23049 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-18 07:14:42 +00:00
Richard Heck
040f3431e7 Fix bug 4037 and related problems. The patch has been cleaned up a bit
from the one posted to the list.

The basic idea has two parts. First, we hard code an "empty layout"
(called PlainLayout, for want of a better name) in TextClass and read it
before doing anything else. It can therefore be customized by classes,
if they want---say, to make it left-aligned. Second, InsetText's are
divided into three types: (i) normal ones, that use the "default" layout
defined by the text class; (ii) highly restrictive ones, such as ERT and
(not quite an inset) table cells, which demand the empty layout; (iii)
middling ones, which default to an empty layout and use the empty layout
in place of the default. (This is so we don't get the same problem we
had with ERT in e.g. footnotes.) The type of inset is signaled by new
methods InsetText::forceEmptyLayout() and InsetText::useEmptyLayout().
(The latter might better be called: useEmptyLayoutInsteadOfDefault(),
but that's silly.) The old InsetText::forceDefaultParagraphs() has been
split into these, plus a new method InsetText::allowParagraphCustomization(). 
A lot of the changes just adapt to this change.

The other big change is in GuiToolbar: We want to show LyXDefault and
the "default" layout only when they're active.

There are a handful of places where I'm not entirely sure whether we
should be using forceEmptyLayout or !allowParagraphCustomization() or
both. The InsetCaption is one of these. These places, and some others,
are marked with FIXMEs, so I'd appreciate it if people would search
through the patch and let me know whether these need changing. If they
don't, the FIXMEs can be deleted.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22966 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-12 17:31:07 +00:00
Jürgen Spitzmüller
cbf599b911 ** Fix language switch issue introduced by the CJK patch **
* src/output_latex.{cpp,h}:
	- (latexParagraphs, TeXEnvironment, TeXOnePar, TeXDeeper): pass Text element 
	   instead of ParagraphList. This is necessary to detect whether we are in the main text.
	- check if we are in the main text for language switches, if needed.
* src/Buffer.cpp:
* src/insets/InsetEnvironment.cpp:
* src/insets/InsetText.cpp:
* src/mathed/InsetMathMBox.cpp:
	- adapt to new latexParagraphs definition.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22666 a592a061-630c-0410-9148-cb99ea01b6c8
2008-01-25 13:27:08 +00:00
Jean-Marc Lasgouttes
3d8828fa14 * src/Spacing.cpp (writeBeginEnv, writeEndEnv): add a bool parameter
directing to use memoir's capitalized latex macros.
	* src/LaTeXFeatures.cpp (getPackages): act on feature "SetSpace".
	* src/output_latex.cpp (TeXOnePar): ditto

	* lib/layouts/memoir.layout: provide feature SetSpace, indicating that
	memoir provides the setspace functionality, but with a different syntax.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22551 a592a061-630c-0410-9148-cb99ea01b6c8
2008-01-14 14:53:29 +00:00
Jürgen Spitzmüller
908a119973 * src/output_latex.{cpp,h}:
* src/Font.cpp:
* src/Paragraph.cpp:
	- simplify switchEncoding.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22184 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-17 10:53:38 +00:00
Abdelrazak Younes
9abb7db468 getting rid of superfluous std:: statements.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22104 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-12 19:28:07 +00:00
Abdelrazak Younes
b89cc942eb 'using namespace lyx::support' instead of 'using support::xxx'
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22103 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-12 18:57:56 +00:00
Abdelrazak Younes
9383f4c3c6 'using namespace std' instead of 'using std::xxx'
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22097 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-12 10:16:00 +00:00
Jürgen Spitzmüller
dc75c0f793 Sanitize CJK support (fix bug 3561, 4349 and 4337):
* src/output_latex.{cpp, h}:
	- Many changes in order to allow CJK in a mulitlingual context.
* src/Paragraph.cpp:
	- Fix file encoding switch and language nesting with CJK.
* src/Buffer.cpp:
	- Move the opening and closing CJK and lanaguage tags to ouput_latex.cpp.
* src/Font.cpp:
	- switchEncoding call now takes runparams as argument.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22011 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-08 11:21:00 +00:00
André Pönitz
9d0ea8aeff Move debug.{cpp,h}, Messages.{cpp,h} and gettext.{cpp,h} to support/.
Now support/* should have no dependencies on src/* anymore.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21851 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-29 07:04:28 +00:00
Jürgen Spitzmüller
04574322f6 * src/output_latex.cpp:
- prevent wrong whitespace by trailing '%' on line endings.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21742 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-23 14:59:35 +00:00
André Pönitz
e1ce2f92db reduce line noise
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21631 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-15 20:04:51 +00:00
Abdelrazak Younes
cdf1378200 Introducing TextClassPtr.h to minimize header dependencies.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21506 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-07 23:25:08 +00:00
Martin Vermeer
fa2bec7440 const, sorry
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21295 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-30 16:27:31 +00:00
Martin Vermeer
af84c0957d Fix line count off-by-one for single-par verbatims
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21293 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-30 16:22:56 +00:00
Abdelrazak Younes
5ddc612b73 Splitup Font in saner bits:
* Font::FontBits -> FontInfo
* Font::FONT_XXX -> all enums transfered to FontEnums.h and renamed to FontXxx

I've replaced Font uses with FontInfo were the language() member was not needed, basically all draw() and metrics methods. There's one problematic cases with InsetQuotes which I solved by taking the Buffer main language.




git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21240 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-28 18:51:54 +00:00
Abdelrazak Younes
5ebafb3ba7 fix warning.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21165 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-24 07:13:20 +00:00
Martin Vermeer
6da13bd888 Improve verbatim for RTL
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21153 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-23 18:23:03 +00:00
Martin Vermeer
5ab6d5bf65 Simplify ERT by using verbatim
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21121 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-22 18:01:21 +00:00
Abdelrazak Younes
e6f059a132 * Paragraph:
- simpleTeXOnePar(): renamed to latex(), beginning of de-spaghettization by truly splitting inset and character cases.
- appendChar(), appendString(): new method for buffer reading.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21117 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-22 13:09:16 +00:00
Abdelrazak Younes
6725b2db59 Reduce header dependencies in Paragraph.h
- Move Changes.h out of Paragraph.h
- pimpl the inset list.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21033 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-18 15:29:51 +00:00
Abdelrazak Younes
f7b1c86393 Move Inset::Code to InsetCode.h
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20936 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-13 09:04:52 +00:00
André Pönitz
b847b8c7df the delegate patch
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20667 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-02 18:27:20 +00:00
André Pönitz
cd72af583f cosmetics
(maily move layout related enums into a header of there own to remov
include dependencies, alos rename a few things)


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20598 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-29 20:02:32 +00:00
Lars Gullik Bjønnes
26f336769a Remove warnings reported with gcc 4.3:
- Modifier on return type ignored
	- Ambigous else
	- Ambigous logical operators
	- Semi-colon instead of empty block
	- Missing header files
	- Missing using std::XX
	- Initialization out of order


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20304 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-16 10:36:57 +00:00