Jean-Marc Lasgouttes wrote:
> OK. You can apply it, then.

Now that I have applied it, I have detected a little glitch (sorry). Inserting 
sets the language to english, which gives blue underlines in documents with 
other languages. A fix is attached (the code is copied from the similar 
method in InsetTabular::insertAsciiString()

OK to apply?

Jürgen
Index: src/insets/insettabular.C
===================================================================
--- src/insets/insettabular.C	(Revision 13519)
+++ src/insets/insettabular.C	(Arbeitskopie)
@@ -705,20 +705,26 @@ void InsetTabular::doDispatch(LCursor & 
 				if (p == string::npos || p >= len)
 					break;
 				switch (clip[p]) {
-				case '\t':
-					paste_tabular->getCellInset(cell)->
-						setText(clip.substr(op, p - op), font);
+				case '\t': {
+					shared_ptr<InsetText> inset = paste_tabular->getCellInset(cell);
+					Paragraph & par = inset->text_.getPar(0);
+					font = inset->text_.getFont(par, 0);
+					inset->setText(clip.substr(op, p - op), font);
 					++cols;
 					++cell;
 					break;
-				case '\n':
-					paste_tabular->getCellInset(cell)->
-						setText(clip.substr(op, p - op), font);
+				}
+				case '\n': {
+					shared_ptr<InsetText> inset = paste_tabular->getCellInset(cell);
+					Paragraph & par = inset->text_.getPar(0);
+					font = inset->text_.getFont(par, 0);
+					inset->setText(clip.substr(op, p - op), font);
 					while (cols++ < maxCols)
 						++cell;
 					cols = 0;
 					break;
 				}
+				}
 				op = p + 1;
 			}
 			// check for the last cell if there is no trailing '\n'

Reply via email to