]> git.lyx.org Git - lyx.git/commitdiff
fix latex output for graphics file names containing "."; partly fix 381
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Mon, 1 Jul 2002 14:31:57 +0000 (14:31 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Mon, 1 Jul 2002 14:31:57 +0000 (14:31 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4508 a592a061-630c-0410-9148-cb99ea01b6c8

po/POTFILES.in
src/BufferView_pimpl.C
src/ChangeLog
src/graphics/ChangeLog
src/graphics/GraphicsConverter.C
src/paragraph.C
src/paragraph.h

index b6d704dc55afde0814027f3e7ee2410324cd5aa3..ab2b31bb8c3cc73d52d48ddded7b79aa2fb4b8a5 100644 (file)
@@ -8,6 +8,7 @@ src/converter.C
 src/CutAndPaste.C
 src/debug.C
 src/exporter.C
+src/ext_l10n.h
 src/FloatList.C
 src/frontends/controllers/biblio.C
 src/frontends/controllers/ButtonController.h
@@ -161,7 +162,6 @@ src/mathed/formulamacro.C
 src/mathed/math_cursor.C
 src/mathed/ref_inset.C
 src/MenuBackend.C
-src/minibuffer.C
 src/paragraph.C
 src/support/filetools.C
 src/tabular.C
index 261d8b3fcf44414cc03032458e8f913dd9fc0604..22c56172912d47def75885c3105aae1025bdbec7 100644 (file)
@@ -888,7 +888,7 @@ Inset * BufferView::Pimpl::checkInsetHit(LyXText * text, int & x, int & y)
 void BufferView::Pimpl::workAreaResize()
 {
        static int work_area_width;
-       static unsigned int work_area_height;
+       static int work_area_height;
 
        bool const widthChange = workarea().workWidth() != work_area_width;
        bool const heightChange = workarea().workHeight() != work_area_height;
index 18852488da337ac129ca7b999974d2f774ca5f03..7f253e82b43df997d0a59264931ef7d6fc732cd3 100644 (file)
@@ -1,3 +1,12 @@
+2002-07-01  Jean-Marc Lasgouttes  <lasgouttes@freesurf.fr>
+
+       * paragraph.C (startTeXParParams):
+       (endTeXParParams): add \protect when necessary
+
+2002-06-19  Jean-Marc Lasgouttes  <lasgouttes@freesurf.fr>
+
+       * BufferView_pimpl.C (workAreaExpose): remove warning
+
 2002-06-27  Angus Leeming  <leeming@lyx.org>
 
        * Makefile.am: add lyxlayout_ptr_fwd.h.
index 7058c9c33f14fcbab37a1ea8a363bebd926249e5..3f4056bce54a0ab07695fc5dd559da04089616a5 100644 (file)
@@ -1,3 +1,8 @@
+2002-07-01  Jean-Marc Lasgouttes  <lasgouttes@freesurf.fr>
+
+       * GraphicsConverter.C (convert): do not use ChangeExtension
+       because to_file_base may contain a dot.
+
 2002-06-28  Angus Leeming  <leeming@lyx.org>
 
        * GraphicsCacheItem.[Ch]: refactor some of the more convoluted logic
index 841d6d189103cc3c168dad0922c921125eeca2bc..a1f45e1280f7579cdd0adc5a3174ac98a15a72fd 100644 (file)
@@ -150,7 +150,9 @@ Converter::Impl::Impl(Converter & p,
        fs.close();
 
        // The converted image is to be stored in this file
-       to_file_ = ChangeExtension(to_file_base, formats.extension(to_format));
+       // We do not use ChangeExtension here because this is a
+       // basename, which may nevertheless contain a dot
+       to_file_ = to_file_base + '.' + formats.extension(to_format);
 
        // The command needed to run the conversion process
        // We create a dummy command for ease of understanding of the
index f92968bac2cf75f008b6f518700e99fcd21928cd..97405c5e9421c23753a5fece4d9da068c975a67b 100644 (file)
@@ -1461,7 +1461,7 @@ Paragraph * Paragraph::TeXOnePar(Buffer const * buf,
 
 // This could go to ParagraphParameters if we want to
 int Paragraph::startTeXParParams(BufferParams const & bparams,
-                                ostream & os) const
+                                ostream & os, bool moving_arg) const
 {
        int column = 0;
 
@@ -1470,6 +1470,22 @@ int Paragraph::startTeXParParams(BufferParams const & bparams,
                column += 10;
        }
 
+       switch (params().align()) {
+       case LYX_ALIGN_NONE:
+       case LYX_ALIGN_BLOCK:
+       case LYX_ALIGN_LAYOUT:
+       case LYX_ALIGN_SPECIAL:
+               break;
+       case LYX_ALIGN_LEFT:
+       case LYX_ALIGN_RIGHT:
+       case LYX_ALIGN_CENTER:
+               if (moving_arg) {
+                       os << "\\protect";
+                       column = 8;
+               }
+               break;
+       }
+       
        switch (params().align()) {
        case LYX_ALIGN_NONE:
        case LYX_ALIGN_BLOCK:
@@ -1505,10 +1521,26 @@ int Paragraph::startTeXParParams(BufferParams const & bparams,
 
 // This could go to ParagraphParameters if we want to
 int Paragraph::endTeXParParams(BufferParams const & bparams,
-                              ostream & os) const
+                              ostream & os, bool moving_arg) const
 {
        int column = 0;
 
+       switch (params().align()) {
+       case LYX_ALIGN_NONE:
+       case LYX_ALIGN_BLOCK:
+       case LYX_ALIGN_LAYOUT:
+       case LYX_ALIGN_SPECIAL:
+               break;
+       case LYX_ALIGN_LEFT:
+       case LYX_ALIGN_RIGHT:
+       case LYX_ALIGN_CENTER:
+               if (moving_arg) {
+                       os << "\\protect";
+                       column = 8;
+               }
+               break;
+       }
+       
        switch (params().align()) {
        case LYX_ALIGN_NONE:
        case LYX_ALIGN_BLOCK:
@@ -1602,7 +1634,7 @@ bool Paragraph::simpleTeXOnePar(Buffer const * buf,
                        ++column;
                }
                if (!asdefault)
-                       column += startTeXParParams(bparams, os);
+                       column += startTeXParParams(bparams, os, moving_arg);
 
        }
 
@@ -1626,7 +1658,8 @@ bool Paragraph::simpleTeXOnePar(Buffer const * buf,
                        }
 
                        if (!asdefault)
-                               column += startTeXParParams(bparams, os);
+                               column += startTeXParParams(bparams, os,
+                                                           moving_arg);
                }
 
                value_type c = getChar(i);
@@ -1741,7 +1774,7 @@ bool Paragraph::simpleTeXOnePar(Buffer const * buf,
        }
 
        if (!asdefault) {
-               column += endTeXParParams(bparams, os);
+               column += endTeXParParams(bparams, os, moving_arg);
        }
 
        lyxerr[Debug::LATEX] << "SimpleTeXOnePar...done " << this << endl;
index b555faa37686129bc719be17b9fc016207c863fe..f7fc207b2b1fe21b0da7842e1c4471d4ef8e24c6 100644 (file)
@@ -123,10 +123,10 @@ public:
                                 bool moving_arg);
 
        ///
-       int startTeXParParams(BufferParams const &, std::ostream &) const;
+       int startTeXParParams(BufferParams const &, std::ostream &, bool) const;
 
        ///
-       int endTeXParParams(BufferParams const &, std::ostream &) const;
+       int endTeXParParams(BufferParams const &, std::ostream &, bool) const;
 
 
        ///