]> git.lyx.org Git - features.git/commitdiff
small fixes
authorLars Gullik Bjønnes <larsbj@gullik.org>
Mon, 7 Feb 2000 20:17:03 +0000 (20:17 +0000)
committerLars Gullik Bjønnes <larsbj@gullik.org>
Mon, 7 Feb 2000 20:17:03 +0000 (20:17 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@530 a592a061-630c-0410-9148-cb99ea01b6c8

ChangeLog
src/TextCache.C
src/TextCache.h
src/paragraph.C
src/support/filetools.C

index cac3a5c7d3ec5207a886e0fdcea05885a75c3438..500d63fc3d5c9037f4b3db03db5042a921e40bd7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+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.
index 1b62b691c1f3305d1c764288d127840425db505a..3a2795417f2a998b6db8483246776d2d07ba364a 100644 (file)
@@ -73,10 +73,10 @@ void TextCache::show(ostream & os, string const & str)
 }
 
 
-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);
 }
 
 
index 457108540b9bf481aa73f66feb4403bebc2ae8d6..256d49bca17e70f0e0bbb8eff89faf13a3f840bc 100644 (file)
@@ -122,7 +122,7 @@ public:
            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 *);
index 5ddf306f3c6f01a85c71f55eba88354f0a59315a..3378476339cdce5fea461e0e3c03a7bceb42436a 100644 (file)
@@ -2923,10 +2923,11 @@ void LyXParagraph::SimpleTeXSpecialChars(string & file, TexRow & texrow,
                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;
                        }
index 2c816a913c1dc509b101926897ca8a62229acbd4..0c3cd19f2403783ea11327de2ee2e96fdb212e35 100644 (file)
@@ -904,12 +904,10 @@ string ChangeExtension(string const & oldname, string const & extension,
                        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] != '.')