Compare commits

..

2 Commits

Author SHA1 Message Date
Juergen Spitzmueller
ab79a915ca Quote file name to table style in LFUN_TABULAR_STYLE_INSERT
This might fix the woes with table styles on windows, where the path
to the system directory has blanks IIRC (C:\Program Files\...)

(cherry picked from commit d42a300dfe)
2024-11-18 16:46:33 +01:00
Juergen Spitzmueller
16902f6584 Remove unused variables
Probably relicts from development

(cherry picked from commit 7016f0c676)
2024-11-18 10:31:16 +01:00
4 changed files with 5 additions and 6 deletions

View File

@ -5625,10 +5625,11 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
FileName const tabstyle = libFileSearch("tabletemplates",
style + suffix + ".lyx", "lyx");
if (tabstyle.empty())
break;
break;
UndoGroupHelper ugh(cur.buffer());
cur.recordUndo();
FuncRequest cmd2(LFUN_FILE_INSERT, tabstyle.absFileName() + " ignorelang");
FuncRequest cmd2(LFUN_FILE_INSERT,
quoteName(tabstyle.absFileName()) + " ignorelang");
lyx::dispatch(cmd2);
// go into table
cur.backwardPos();

View File

@ -3571,8 +3571,6 @@ void GuiDocument::getTableStyles()
QString data = fn.left(fn.lastIndexOf(".lyx"));
QString guiname = data;
guiname = toqstr(translateIfPossible(qstring_to_ucs4(guiname.replace('_', ' '))));
QString relpath = toqstr(makeRelPath(qstring_to_ucs4(fn),
qstring_to_ucs4(dir)));
if (textLayoutModule->tableStyleCO->findData(data) == -1)
textLayoutModule->tableStyleCO->addItem(guiname, data);
}

View File

@ -63,8 +63,6 @@ void GuiTabularCreate::getFiles()
QString data = fn.left(fn.lastIndexOf(".lyx"));
QString guiname = data;
guiname = toqstr(translateIfPossible(qstring_to_ucs4(guiname.replace('_', ' '))));
QString relpath = toqstr(makeRelPath(qstring_to_ucs4(fn),
qstring_to_ucs4(dir)));
if (styleCO->findData(data) == -1)
styleCO->addItem(guiname, data);
}

View File

@ -77,6 +77,8 @@ What's new
- Fix spacing problems in previews with math macros under specific
circumstances (bug 13120).
- Fix tabular styles on systems with blanks in system directory path.
* USER INTERFACE