]> git.lyx.org Git - features.git/commitdiff
bug fixes
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 7 Sep 2001 15:41:36 +0000 (15:41 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 7 Sep 2001 15:41:36 +0000 (15:41 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2707 a592a061-630c-0410-9148-cb99ea01b6c8

15 files changed:
boost/ChangeLog
boost/boost/crc.hpp
lib/ChangeLog
lib/layouts/dinbrief.layout
lib/layouts/egs.layout
lib/layouts/iletter.layout
lib/layouts/stdletter.inc
src/ChangeLog
src/frontends/xforms/ChangeLog
src/frontends/xforms/Toolbar_pimpl.C
src/insets/ChangeLog
src/insets/insetquotes.C
src/lyxfont.h
src/paragraph.C
src/text.C

index 88c05a6ad747366ccbcee578dac206c5dad1a08d..ab5d913d0ae26a915571993016ce5a21eae49e78 100644 (file)
@@ -1,3 +1,7 @@
+2001-09-07  Jean-Marc Lasgouttes  <Jean-Marc.Lasgouttes@inria.fr>
+
+       * boost/crc.hpp (detail): re-apply the cxx patch from 2001-06-07.
+
 2001-07-07  Lars Gullik Bjønnes  <larsbj@birdstep.com>
 
        * boost/config.hpp: update
index 4658ae4abe83a95b43a26b664a3806486841ac4d..d7bff778f8cd1a719583a84c066d25a465c1937f 100644 (file)
@@ -280,10 +280,15 @@ namespace detail
         typedef typename base_type::least  least;
         typedef typename base_type::fast   fast;
 
+#ifdef __DECCXX
+           static const least high_bit = 1ul << (Bits - 1u);
+           static const fast high_bit_fast = 1ul << (Bits - 1u);
+#else
         BOOST_STATIC_CONSTANT( least, high_bit = (least( 1u ) << ( Bits
          - 1u )) );
         BOOST_STATIC_CONSTANT( fast, high_bit_fast = (fast( 1u ) << ( Bits
          - 1u )) );
+#endif
 
     };  // boost::detail::high_uint_t
 
@@ -340,7 +345,11 @@ namespace detail
         BOOST_STATIC_CONSTANT( fast, high_bit_fast = base_type::high_bit_fast );
         #endif
 
+#ifdef __DECCXX
+           static const least sig_bits = (~( ~(0ul) << Bits));
+#else
         BOOST_STATIC_CONSTANT( least, sig_bits = (~( ~(least( 0u )) << Bits )) );
+#endif
         BOOST_STATIC_CONSTANT( fast, sig_bits_fast = fast(sig_bits) );
 
     };  // boost::detail::mask_uint_t
index a4dcb4cfa5919dacc2ac9e41d0dd271cc6555a86..bb088258a4067ab27ccf30db28fa68b58ec89753 100644 (file)
@@ -1,3 +1,11 @@
+2001-09-07  Jean-Marc Lasgouttes  <Jean-Marc.Lasgouttes@inria.fr>
+
+       * layouts/dinbrief.layout: 
+       * layouts/egs.layout: 
+       * layouts/iletter.layout: 
+       * layouts/stdletter.inc: remove bogus use of the now defunct Latex
+       tag
+
 2001-09-06  Jean-Marc Lasgouttes  <Jean-Marc.Lasgouttes@inria.fr>
 
        * examples/da_splash.lyx: new translation from Claus Hindsgaul
index 21e857aa867b76d31190950632dbf6beec6250fa..614cdf0b4599fbeef9ee74477551f792553cb678 100644 (file)
@@ -54,7 +54,6 @@ Style Opening
     Shape              Italic
     Size                Small
     Color               blue
-    Latex              no_latex
   EndFont
 End
 
@@ -68,7 +67,6 @@ Style Signature
     Shape              Italic
     Size                Small
     Color               blue
-    Latex              no_latex
   EndFont
 End
 
@@ -82,7 +80,6 @@ Style Closing
     Shape              Italic
     Size                Small
     Color               blue
-    Latex              no_latex
   EndFont
 End
 
index deb6afa01eb4f95d717fa6ced5a59baa11b0612d..2fe7efb1f08fb289546067f8e21317ba1a3f6b89 100644 (file)
@@ -353,7 +353,7 @@ Style Author
   LabelFont 
     Series             Bold
     Shape              Italic
-    Latex              Latex
+    Color              red
   EndFont
 
 End
@@ -379,7 +379,7 @@ Style Affil
   LabelFont 
     Series             Bold
     Shape              Italic
-    Latex              Latex
+    Color              red
   EndFont
 
 End
@@ -405,7 +405,7 @@ Style Journal
   LabelFont 
     Series             Bold
     Shape              Italic
-    Latex              Latex
+    Color              red
   EndFont
 
 End
@@ -432,7 +432,7 @@ Style msnumber
   LabelFont 
     Series             Bold
     Shape              Italic
-    Latex              Latex
+    Color              red
   EndFont
 
 End
@@ -459,7 +459,7 @@ Style FirstAuthor
   LabelFont 
     Series             Bold
     Shape              Italic
-    Latex              Latex
+    Color              red
   EndFont
 
 End
@@ -485,7 +485,7 @@ Style Received
   LabelFont 
     Series             Bold
     Shape              Italic
-    Latex              Latex
+    Color              red
   EndFont
 
 End
@@ -511,7 +511,7 @@ Style Accepted
   LabelFont 
     Series             Bold
     Shape              Italic
-    Latex              Latex
+    Color              red
   EndFont
 
 End
@@ -539,7 +539,7 @@ Style Offsets
   LabelFont 
     Series             Bold
     Shape              Italic
-    Latex              Latex
+    Color              red
   EndFont
 
 End
@@ -738,7 +738,7 @@ Style LaTeX
 
   # standard font definition
   Font 
-    Latex              Latex
+    Color              red
   EndFont
 
 End
index 6941546428fe082a8beeda273fbe29f252ff7936..d6d4968280d1cfbc268420d7ce64539a930d0202 100644 (file)
@@ -62,7 +62,7 @@ Style Oggetto
   LabelFont 
     Series             Bold
     Shape              Italic
-    Latex              Latex
+    Color              red
   EndFont
 End
 
@@ -84,7 +84,7 @@ Style Citta
   LabelFont 
     Series             Bold
     Shape              Italic
-    Latex              Latex
+    Color              red
   EndFont
 End
 
@@ -106,6 +106,6 @@ Style Data
   LabelFont 
     Series             Bold
     Shape              Italic
-    Latex              Latex
+    Color              red
   EndFont
 End
index 9f60e64dc704704990179cbbf289cecc570ca8f6..9bb39cf3994f6f2e8807252b8f33d51bc04cbd7a 100644 (file)
@@ -75,7 +75,7 @@ Style Opening
   LabelFont 
     Series             Bold
     Shape              Italic
-    Latex              Latex
+    Color              red
   EndFont
 End
 
@@ -98,7 +98,7 @@ Style Signature
   LabelFont 
     Series             Bold
     Shape              Italic
-    Latex              Latex
+    Color              red
   EndFont
 End
 
@@ -121,7 +121,7 @@ Style Closing
   LabelFont 
     Series             Bold
     Shape              Italic
-    Latex              Latex
+    Color              red
   EndFont
 End
 
index 0764dcce31e58c97d0e4af28aff04efaa6f41bc7..c9e4b7bc9efa20775ed954f04aa56cbd4b0bee07 100644 (file)
@@ -1,3 +1,11 @@
+2001-09-07  Jean-Marc Lasgouttes  <Jean-Marc.Lasgouttes@inria.fr>
+
+       * lyxfont.h (isSymbolFont): shut off warning
+
+       * text.C (setHeightOfRow):
+       (getVisibleRow): fix crash with empty paragraphs which have a
+       bottom line
+
 2001-09-07  Rob Lahaye  <lahaye@users.sourceforge.net>
 
        * lyxrc.[Ch]: added dialogs_iconify_with_main variable and associated
index e18b1b832c9d56b1beb643220111ec7e16f5ca0a..64dd00872877ccda18f02958f24934c6a2e0e953 100644 (file)
@@ -1,3 +1,9 @@
+2001-09-07  Jean-Marc Lasgouttes  <Jean-Marc.Lasgouttes@inria.fr>
+
+       * Toolbar_pimpl.C (setLayout): 
+       (layoutSelected): make them work even when gettext has been
+       translating the interface.
+
 2001-09-07  Angus Leeming  <a.leeming@ic.ac.uk>
 
        * FormPreferences.C (build): Fix bug: if you start LyX and open the
index 11896ca64138010c75cac5ba4aaa6e9b18b4dd56..48bad4b157724a6d0c96bd050408fe91395a737d 100644 (file)
@@ -145,21 +145,6 @@ extern "C" int C_Toolbar_BubblePost(FL_OBJECT * ob, int event,
 } // namespace anon
 
 
-// this one is not "C" because combox callbacks are really C++ %-|
-void Toolbar::Pimpl::layoutSelectedCB(int, void * arg, Combox *)
-{
-       Toolbar::Pimpl * tb = reinterpret_cast<Toolbar::Pimpl *>(arg);
-
-       tb->layoutSelected();
-}
-
-
-void Toolbar::Pimpl::layoutSelected()
-{
-       owner->getLyXFunc()->dispatch(LFUN_LAYOUT, combox->getline());
-}
-
 void Toolbar::Pimpl::activate()
 {
        ToolbarList::const_iterator p = toollist.begin();
@@ -216,12 +201,41 @@ void Toolbar::Pimpl::update()
 }
 
 
+// this one is not "C" because combox callbacks are really C++ %-|
+void Toolbar::Pimpl::layoutSelectedCB(int, void * arg, Combox *)
+{
+       Toolbar::Pimpl * tb = reinterpret_cast<Toolbar::Pimpl *>(arg);
+
+       tb->layoutSelected();
+}
+
+
+void Toolbar::Pimpl::layoutSelected()
+{
+       string const & layoutguiname = combox->getline();
+       LyXTextClass const & tc =
+               textclasslist.TextClass(owner->buffer()->
+                                       params.textclass);
+       
+       LyXTextClass::const_iterator end = tc.end();
+       for (LyXTextClass::const_iterator cit = tc.begin();
+            cit != end; ++cit) {
+               if (_(cit->name()) == layoutguiname) {
+                       owner->getLyXFunc()->dispatch(LFUN_LAYOUT, cit->name());
+                       return;
+               }
+       }
+       lyxerr << "ERROR (Toolbar::Pimpl::layoutSelected): layout not found!"
+              << endl;
+}
+
 void Toolbar::Pimpl::setLayout(int layout) {
        if (combox) {
                LyXTextClass const & tc =
                        textclasslist.TextClass(owner->buffer()->
                                                params.textclass);
-               combox->select(tc[layout].name());
+               combox->select(_(tc[layout].name()));
        }
 }
 
index a3499d693d0415d934a2629732fa02b0145c65cd..a94fe6342194c6a7e5b329c78f3f7a36514dcd9a 100644 (file)
@@ -1,3 +1,8 @@
+2001-09-07  Jean-Marc Lasgouttes  <Jean-Marc.Lasgouttes@inria.fr>
+
+       * insetquotes.C (InsetQuotes): when trying to decide the side of
+       the quote, choose `left' only after a space or '('
+
 2001-09-04  José Matos  <jamatos@fep.up.pt>
        * figinset.C
        * figinset.h
index 0ad0d96b203b2d2567d7b81efdda340f16499f35..e4937eff2e7984ebf2fc5fc33f24db8422ce4544 100644 (file)
@@ -85,7 +85,7 @@ InsetQuotes::InsetQuotes(char c, BufferParams const & params)
 {
        // Decide whether left or right 
        switch (c) {
-       case ' ': case '(': case '{': case '[': case '-': case ':':
+       case ' ': case '(': 
        case Paragraph::META_HFILL:
        case Paragraph::META_NEWLINE: 
                side_ = LeftQ;   // left quote 
index 4bd9ad0e9549fadcf6305dc6eec08f510d6ecfd4..601a430ce4abab3fff9efa6e7694781355aa94d6 100644 (file)
@@ -434,7 +434,6 @@ bool LyXFont::isSymbolFont() const
        default:
                return false;
        }
-       return false;
 }
 
 ///
index 6823dbadf6a9654497df53e7fb93a063c62b7aae..6aabdd620bb1b1659e73c495e30bdfdfaf0f0aed 100644 (file)
@@ -537,7 +537,7 @@ Inset * Paragraph::getInset(Paragraph::size_type pos)
        if (it != insetlist.end() && it->pos == pos)
                return it->inset;
 
-       lyxerr << "ERROR (Paragraph::GetInset): "
+       lyxerr << "ERROR (Paragraph::getInset): "
                "Inset does not exist: " << pos << endl;
        //::raise(SIGSTOP);
        
index feac08041ddbdbbe0dd62e5f99cb0d25e60dda8a..3e8400867af817e380c358e1d875aa2d05b4a971 100644 (file)
@@ -1429,7 +1429,8 @@ void LyXText::setHeightOfRow(BufferView * bview, Row * row_ptr) const
                if (firstpar->params().lineBottom())
                        maxdesc += 2 * lyxfont::ascent('x',
                                                       getFont(bview->buffer(),
-                                                      par, par->size() - 1));
+                                                              par,
+                                                              max(Paragraph::size_type(0), par->size() - 1)));
          
                // and now the pagebreaks
                if (firstpar->params().pagebreakBottom())
@@ -3423,7 +3424,7 @@ void LyXText::getVisibleRow(BufferView * bview, int y_offset, int x_offset,
                        y_bottom -= lyxfont::ascent('x',
                                                    getFont(bview->buffer(),
                                                            par,
-                                                           par->size() - 1));
+                                                           max(Paragraph::size_type(0), par->size() - 1)));
                        int const w = (inset_owner ?
                                       inset_owner->width(bview, font) : ww);
                        int const xp = static_cast<int>(inset_owner ? x : 0);
@@ -3434,7 +3435,7 @@ void LyXText::getVisibleRow(BufferView * bview, int y_offset, int x_offset,
                        y_bottom -= lyxfont::ascent('x',
                                                    getFont(bview->buffer(),
                                                            par,
-                                                           par->size() - 1));
+                                                           max(Paragraph::size_type(0), par->size() - 1)));
                }
 
                // draw an endlabel