+2000-02-07 Lars Gullik Bjønnes <larsbj@lyx.org>
+
+ * src/support/filetools.C (ChangeExtension): patch from Etienne
+ applied.
+
+ * src/TextCache.C (show): remove const_cast and make second
+ parameter non-const LyXText *.
+
+ * src/TextCache.h: use non const LyXText in show.
+
+ * src/paragraph.C (SimpleTeXSpecialChars): patch to make urls work
+ with hebrew.
+
2000-02-04 Lars Gullik Bjønnes <larsbj@lyx.org>
* src/support/lyxsum.C: rework to be more flexible.
}
-void TextCache::show(ostream & os, LyXText const * lt)
+void TextCache::show(ostream & os, LyXText * lt)
{
show_text st(os);
- st(const_cast<LyXText*>(lt));
+ st(lt);
}
Uses msg as header for the list. */
void show(ostream & o, string const & msg);
/// Gives info on a single LyXText (buffer and width)
- static void show(ostream & o, LyXText const *);
+ static void show(ostream & o, LyXText *);
/** Adds a LyXText to the cache iff its buffer is
present in bufferlist. */
void add(LyXText *);
if (inset) {
bool close = false;
int len = file.length();
- if ( (inset->LyxCode() == Inset::GRAPHICS_CODE
- || inset->LyxCode() == Inset::MATH_CODE)
- && running_font.getFontDirection()
- == LYX_DIR_RIGHT_TO_LEFT) {
+ if ((inset->LyxCode() == Inset::GRAPHICS_CODE
+ || inset->LyxCode() == Inset::MATH_CODE
+ || inset->LyxCode() == Inset::URL_CODE)
+ && running_font.getFontDirection()
+ == LYX_DIR_RIGHT_TO_LEFT) {
file += "\\L{";
close = true;
}
bool no_path)
{
string::size_type last_slash = oldname.rfind('/');
- string::size_type last_dot;
- if (last_slash != string::npos)
- last_dot = oldname.find('.', last_slash);
- else
- last_dot = oldname.rfind('.');
-
+ string::size_type last_dot = oldname.rfind('.');
+ if (last_dot < last_slash && last_slash != string::npos)
+ last_dot = string::npos;
+
string ext;
// Make sure the extension starts with a dot
if (!extension.empty() && extension[0] != '.')