Commit Graph

68 Commits

Author SHA1 Message Date
Jean-Marc Lasgouttes
c075a285a0 * TextClass.cpp (read): do not use istrstream (which is deprecated),
but istringstream instead.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23053 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-18 10:03:30 +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
369d21f4e2 Fix Layout::read() API.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22991 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-14 04:12:15 +00:00
Richard Heck
b76e95b942 Fix TextClass::read API. Also some cleanup.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22988 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-14 03:38:08 +00:00
Abdelrazak Younes
5ed5e01fd7 *TextClass::readStyle(): return true on success!
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22980 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-13 14:39:16 +00:00
Abdelrazak Younes
decc411b6b rev 22973: correct fix.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22974 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-13 12:37:11 +00:00
Abdelrazak Younes
7acb8e3998 Warning fix
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22973 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-13 12:25: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
Abdelrazak Younes
270ca445e5 Tex2lyx Compile fix: use Exception Message instead of frontend::Alert. Richard, please verify that the thrown exceptions are correctly caught by the caller in tex2lyx and in lyx.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22806 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-06 09:46:48 +00:00
Abdelrazak Younes
27edbfb4c8 shutup warning.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22805 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-06 09:37:37 +00:00
Richard Heck
8fec5f512d Partially fix bug 4532: http://bugzilla.lyx.org/show_bug.cgi?id=4532.
See in particular comment 6.

We forcibly load stdinsets.inc unless the TextClass declares:
  Provides stdinsets 1
There isn't really any such package, of course. We're just using this
(per a suggestion by JMarc) to say we've loaded relevant info about the
standard insets.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22802 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-05 22:57:33 +00:00
Richard Heck
2e82ca7198 Tweaks.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22793 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-05 16:20:18 +00:00
Richard Heck
cee09578e6 Cosmetic.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22757 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-03 00:32:02 +00:00
Jean-Marc Lasgouttes
11bea5a763 Use a set<string> instead of a vecctor<string> for list of features. This
allows to simplify the code to some extent.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22734 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-01 15:12:04 +00:00
Jürgen Spitzmüller
926e115e6a * src/TextClass.cpp:
- remove superfluous condition.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22429 a592a061-630c-0410-9148-cb99ea01b6c8
2008-01-08 09:14:44 +00:00
Jürgen Spitzmüller
2c0eaab164 * src/TextClass.cpp:
- allow for multiple subsequent Requires class tags.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22428 a592a061-630c-0410-9148-cb99ea01b6c8
2008-01-08 07:29:47 +00:00
Jürgen Spitzmüller
9e5eebc14c *** Requires tag for classes, layouts and custom insets ***
* src/TextClass{cpp,h}:
	- implement Requires tag for class and InsetLayout.
* src/Layout.{cpp,h}:
	- implement Requires tag for layouts.
	- increase layouts format to 6.
* src/Paragraph.cpp:
	- request required features for paragraph layouts.
* src/LaTeXFeatures.cpp:
	- add some packages needed by modules.
	- remove Preamble method for InsetLayout. This is now done
	  in InsetFlex::validate.
* src/BufferParams.cpp (validate):
	- request required features for the class.
* src/insets/InsetLayout.h:
	- new member "requires".
* src/insets/InsetFlex.{cpp,h}:
	- implement validate method and request required features and preamble snippets.

* lib/layouts/*.{layout,module,inc}:
	- increase layouts format to 6.
	- use Requires tags in some modules (more can be done later).

* lib/doc/Customization.lyx:
	- document Requires tag.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22414 a592a061-630c-0410-9148-cb99ea01b6c8
2008-01-07 16:59:10 +00:00
Abdelrazak Younes
9439b6e6e0 * get rid of support::absolutePath()
* remove FileName.h inclusion from filetools.h


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22188 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-17 16:04:46 +00:00
Abdelrazak Younes
e7bb71ff4e header cleanup.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22178 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-16 22:09:28 +00:00
Abdelrazak Younes
4020357dd2 Transfer tempName() implementation to FileName.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22161 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-16 07:52:38 +00:00
Abdelrazak Younes
7c392af6ea getting rid of superfluous lyx::support:: statements.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22106 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-12 19:57:42 +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
Peter Kümmel
a30f67ed98 fix wrong tex2lyx hack
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22009 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-08 11:07:43 +00:00
Peter Kümmel
2944cdd82a fix wrong tex2lyx hack
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22008 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-08 10:50:30 +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
Abdelrazak Younes
f07105d0e5 * FileName:
- removeFile(): replace unlink
- copyTo(): add 'overwrite' parameter.

* getcwd.cpp: simplify.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21843 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-28 09:01:49 +00:00
Peter Kümmel
75ac7cb3ad fix compile, but it breaks cmake's merged build
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21780 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-25 19:25:05 +00:00
Peter Kümmel
ff78ddc4fc don't declare if already done in a header
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21772 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-25 17:57:08 +00:00
André Pönitz
d95451ae5c s/isFileReadable/isReadableFile;
introduce isReadableDirectory
replace isReadable by either isReadableFile or isReadableDirectory
remove isReadable


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21769 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-25 11:18:16 +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
André Pönitz
48b2b1d329 cosmetics
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21417 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-04 09:51:26 +00:00
Abdelrazak Younes
5b8c4888d7 Also give sane labelfont to modules.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21398 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-03 01:41:27 +00:00
Abdelrazak Younes
85f80979fc Further cleanup of InsetFlex, InsetCollapsable and InsetLayout:
- Getting rid of some unneeded init() methods.
- InsetCollapsable::layout_ is now a const pointer.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21396 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-03 00:35:07 +00:00
Stefan Schimanski
6e043a9c22 * reverting previous workarounds. With Martin's commit 21319 there are not needed.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21320 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-01 09:57:38 +00:00
Stefan Schimanski
1b4345ac31 * and another one. Trying to compile before committing would make sense sometimes :-/
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21318 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-01 09:16:23 +00:00
Martin Vermeer
1d894fd5e3 Fix inset font inheritance mechanism; smaller clean-ups
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21315 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-01 06:25:47 +00:00
Martin Vermeer
50e5d51038 Commit the new parameter ForceLtR before Abdel moves things around again :-)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21261 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-29 14:39:29 +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
eea79637c7 Move Color::color enum to ColorCode.h
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21198 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-25 12:41:02 +00:00
Martin Vermeer
1f07a7f929 Introduce inset parameters keepempty, freespacing, needprotect and rename verbatim->passthru
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21197 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-25 09:19:26 +00:00
Martin Vermeer
25c75f0e37 Forgot this
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21084 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-20 17:07:08 +00:00
André Pönitz
a02653e4dd isome more FileName shuffling
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21048 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-18 23:03:51 +00:00
André Pönitz
0e08bc5e16 start using FileName::exists()
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21044 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-18 19:29:32 +00:00
Martin Vermeer
5a2deb94c3 Fix bug, and introduce MultiPar parameter for flex insets
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20869 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-09 17:07:24 +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
Martin Vermeer
eca79a8a09 Better error signaling
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20104 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-06 14:28:19 +00:00
Martin Vermeer
12e1d4bc8d Name change CharStyle -> Flex
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20072 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-05 15:29:04 +00:00