Commit Graph

14 Commits

Author SHA1 Message Date
Bo Peng
b6a2a76700 Rename insets/insetxxx to insets/InsetXxx, part 1
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17964 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-25 01:24:38 +00:00
Abdelrazak Younes
e841d41a92 Optimisation: remove the inset mailer used in the dtor because it was far from negligible in profile results with Macro (which is a heavy user of thi MathGrid class). This matrix dialog showing/hiding was not working anyway.
* InsetMathGrid::~InsetMathGrid(): deleted.




git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17896 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-21 22:33:07 +00:00
Georg Baum
b0cfb6c53b Fix bug 2932 (non-UI part only)
* src/mathed/InsetMathGrid.[Ch]
	(InsetMathGrid::allow_pagebreak_): New member

	* src/mathed/InsetMathGrid.C
	(InsetMathGrid::eolString): Output \\* if allow_pagebreak_ is false

	* src/mathed/MathParser.C
	(addRow): Set allow_pagebreak_ in rowinfo if needed
	(Parser::parse1): Parse '\\*' correctly


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17484 a592a061-630c-0410-9148-cb99ea01b6c8
2007-03-19 16:08:17 +00:00
Bo Peng
8b56166641 Persistent-selection (and fix bug 3162)
* src/CutAndPaste.h/C: add selectionBuffer to save selected text
	* src/text3.C: proper handling of paste
	* src/lyxfind.C: save selection
	* src/BufferView.C: save selection
	* src/text.C: save selection
	* src/cursor.C: save selection
	* src/insets/insettabular.C: save selection
	* src/mathed/InsetMathGrid.C: save selection
	* src/mathed/InsetMathHull.C: save selection
	* src/mathed/InsetMathNest.C: save selection


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17022 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-02 03:10:15 +00:00
Georg Baum
3500af60ba Fix bug 2138: copy and paste should preserve formatting between different
LyX instances. This re-enables copy/paste from the internal clipboard on
OS X (currently broken since Clipboard::isInternal() always returns false for
some reason).

	* src/insets/insettabular.C
	(InsetTabular::doDispatch): adjust to clipboard interface change
	(InsetTabular::copySelection): ditto

	* src/mathed/InsetMathGrid.C
	(InsetMathGrid::doDispatch): ditto

	* src/mathed/InsetMathNest.C
	(InsetMathNest::doDispatch): ditto

	* src/buffer.[Ch]
	(Buffer::readString): New method: Read document from a string
	(Buffer::readFile): Change return value from bool to enum (needed
	for readString). Return wrongversion if we are reading from a string
	and the version does not match.
	(Buffer::do_writeFile): make public and rename to write

	* src/CutAndPaste.C
	(putClipboard): New helper, put stuff to the system clipboard
	(void copySelectionHelper): Use putClipboard instead of
	theClipboard().put()
	(void copySelection): ditto
	(void pasteClipboard): new method for pasting in text
	(void pasteParagraphList):

	* src/frontends/Clipboard.h
	(Clipboard::get): Rename to getAsText
	(Clipboard::getAsLyX): New method for getting the system clipboard
	in LyX format
	(Clipboard::hasLyXContents): New method telling whether there is LyX
	contents in the clipboard

	* src/frontends/qt4/GuiClipboard.[Ch]: Implement the new methods

	* src/text3.C
	(LyXText::dispatch): Use pasteClipboard for pasting the system
	clipboard


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16669 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-13 18:29:50 +00:00
Georg Baum
8f2243819a Let LFUN_PASTE always paste the most recent clipboard (internal or system)
* src/insets/insettabular.C
	(InsetTabular::doDispatch): Only paste the tabular clipboard if the
	system clipboard is not newer, else let the current cell paste the
	system clipboard
	(InsetTabular::getStatus): Only decide whether to enable LFUN_PASTE
	if the tabular clipboard is not empty and the system clipboard is
	not newer, else let the current cell decide.

	* src/mathed/InsetMathGrid.C
	(InsetMathGrid::doDispatch): Use the system clipboard for LFUN_PASTE
	if it is newer.

	* src/mathed/InsetMathNest.C
	(InsetMathNest::doDispatch): Use the system clipboard for LFUN_PASTE
	if it is newer.

	* src/text3.C
	(doInsertInset): Add a "0" argument to LFUN_PASTE, because we always
	want to use the internal clipboard here
	(LyXText::dispatch): ditto (when handling mouse button 2 press)
	(LyXText::dispatch): Use the system clipboard for LFUN_PASTE if it
	is newer.
	(LyXText::getStatus): Also enable LFUN_PASTE if the system clipboard
	is owned by another application


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16498 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-04 12:05:24 +00:00
Georg Baum
1ca55d1c8f Fix bug 3034
* src/mathed/InsetMathGrid.C: Don't declare mathed_parse_normal,
	include MathParser.h instead
	(InsetMathGrid::doDispatch): remove to_utf8, mathed_parse_normal
	takes now a docstring

	* src/mathed/MathMacroTemplate.C
	(MathMacroTemplate::read): restore the version of 1.4.x, since
	the new one did only work for macros without whitespace

	* src/mathed/MathParser.[Ch]
	(Parser): Add constructor from a docstring
	(mathed_parse_cell): Create the parser directly from the string,
	since the istream variant of tokenize() does only work if reading
	from the .lyx file
	(mathed_parse_normal): ditto
	(mathed_parse_normal): Delete the istream variant (unused)


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16334 a592a061-630c-0410-9148-cb99ea01b6c8
2006-12-19 14:24:25 +00:00
Abdelrazak Younes
e24bf64c68 * dimension.h: new operator!=() and operator=()
* InsetBase and all derivates:
  - metrics(MetricsInfo & mi, Dimension & dim) now returns a bool (true if metrics changed).

* MathData and all derivates:
  - metrics(MetricsInfo & mi, Dimension & dim): ditto.

* RenderBase and all derivates:
  - metrics(MetricsInfo & mi, Dimension & dim): ditto.

* lyxtext.h/text.C:
  - LyXText::metrics(MetricsInfo & mi, Dimension & dim): ditto.
  - LyXText::redoParagraph(): take into account potential change in inset metrics.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16091 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-28 15:15:49 +00:00
André Pönitz
de6418f377 use more unicode in math
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15462 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-22 10:15:23 +00:00
André Pönitz
6c300f72a2 move everything into namespace lyx
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15422 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-21 00:16:43 +00:00
Georg Baum
8b67659646 Use UTF8 for LaTeX export.
Known problems:
- No space is output after a \hfill. I probably broke this with the
  InsetCommand patch. I'll have a look later.
- Although the encoding is now UTF8 the arguments of the inputenc package
  are still the old ones, so LaTeX will not run.
- Labels and references with non-ASCII characters are broken. This needs to
  be fixed in lyx::support::escape(), but this is a file format change.
- Something seems to be wrong with index entries, but this is probably also
  due to the InsetCommand changes.

Have fun!


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15378 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-19 16:51:30 +00:00
Abdelrazak Younes
d37fae169c In order to support multiple LyXView each BufferView needs its own CoordCache. This is what's implemented in this commit.
theCoords is now a thing of the past and all CoordCache accesses are done via BufferView::coordCache() now. I had to modify a number of methods to pass BufferView.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15324 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-13 16:44:44 +00:00
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
André Pönitz
e89625ef28 rename mathed/math_xinset into mathed/InsetMathX
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15026 a592a061-630c-0410-9148-cb99ea01b6c8
2006-09-17 09:14:18 +00:00