Author: rgheck
Date: Sun Jun 12 20:01:53 2011
New Revision: 39020
URL: http://www.lyx.org/trac/changeset/39020

Log:
Revert r39007 and r38983, since these broke the string freeze. I'll recommit 
for 2.0.2.

Modified:
   lyx-devel/branches/BRANCH_2_0_X/lib/ui/stdtoolbars.inc
   lyx-devel/branches/BRANCH_2_0_X/src/CutAndPaste.cpp
   lyx-devel/branches/BRANCH_2_0_X/src/Text.cpp
   lyx-devel/branches/BRANCH_2_0_X/src/TextClass.cpp
   lyx-devel/branches/BRANCH_2_0_X/src/TextClass.h
   lyx-devel/branches/BRANCH_2_0_X/status.20x

Modified: lyx-devel/branches/BRANCH_2_0_X/lib/ui/stdtoolbars.inc
==============================================================================
--- lyx-devel/branches/BRANCH_2_0_X/lib/ui/stdtoolbars.inc      Sun Jun 12 
03:25:26 2011        (r39019)
+++ lyx-devel/branches/BRANCH_2_0_X/lib/ui/stdtoolbars.inc      Sun Jun 12 
20:01:53 2011        (r39020)
@@ -353,15 +353,15 @@
        Toolbar "frac-square" "Fractions"
                Item "Standard  \\frac" "math-insert \frac"
                Item "Nice fraction (3/4)       \\nicefrac" "math-insert 
\nicefrac"
-               Item "Unit (km) \\unitone" "math-insert \unitone"
-               Item "Unit (864 m)      \\unittwo" "math-insert \unittwo"
+               Item "Unit (km) \\unit" "math-insert \unitone"
+               Item "Unit (864 m)      \\unit" "math-insert \unittwo"
                Item "Unit fraction (km/h)      \\unitfrac" "math-insert 
\unitfrac"
-               Item "Unit fraction (20 km/h)   \\unitfracthree" "math-insert 
\unitfracthree"
+               Item "Unit fraction (20 km/h)   \\unitfrac" "math-insert 
\unitfracthree"
                Item "Text fraction     \\tfrac" "math-insert \tfrac"
                Item "Display fraction  \\dfrac" "math-insert \dfrac"
                Item "Continued fraction        \\cfrac" "math-insert \cfrac"
-               Item "Continued fraction (left) \\cfracleft" "math-insert 
\cfracleft"
-               Item "Continued fraction (right)        \\cfracright" 
"math-insert \cfracright"
+               Item "Continued fraction (left) \\cfrac" "math-insert 
\cfracleft"
+               Item "Continued fraction (right)        \\cfrac" "math-insert 
\cfracright"
                Item "Binomial  \\binom" "math-insert \binom"
                Item "Text binomial     \\tbinom" "math-insert \tbinom"
                Item "Display binomial  \\dbinom" "math-insert \dbinom"

Modified: lyx-devel/branches/BRANCH_2_0_X/src/CutAndPaste.cpp
==============================================================================
--- lyx-devel/branches/BRANCH_2_0_X/src/CutAndPaste.cpp Sun Jun 12 03:25:26 
2011        (r39019)
+++ lyx-devel/branches/BRANCH_2_0_X/src/CutAndPaste.cpp Sun Jun 12 20:01:53 
2011        (r39020)
@@ -647,25 +647,13 @@
        DocumentClass const & newtc = *newone;
 
        // layouts
-       ParIterator it = par_iterator_begin(in);
        ParIterator end = par_iterator_end(in);
-       // for remembering which layouts we've had to add
-       set<docstring> newlayouts;
-       for (; it != end; ++it) {
+       for (ParIterator it = par_iterator_begin(in); it != end; ++it) {
                docstring const name = it->layout().name();
 
                // the pasted text will keep their own layout name. If this 
layout does
                // not exist in the new document, it will behave like a 
standard layout.
-               bool const added_one = newtc.addLayoutIfNeeded(name);
-               if (added_one)
-                       newlayouts.insert(name);
-
-               if (added_one || newlayouts.find(name) != newlayouts.end()) {
-                       // Warn the user.
-                       docstring const s = bformat(_("Layout `%1$s' was not 
found."), name);
-                       errorlist.push_back(
-                               ErrorItem(_("Layout Not Found"), s, it->id(), 
0, it->size()));
-               }
+               newtc.addLayoutIfNeeded(name);
 
                if (in.usePlainLayout())
                        it->setLayout(newtc.plainLayout());

Modified: lyx-devel/branches/BRANCH_2_0_X/src/Text.cpp
==============================================================================
--- lyx-devel/branches/BRANCH_2_0_X/src/Text.cpp        Sun Jun 12 03:25:26 
2011        (r39019)
+++ lyx-devel/branches/BRANCH_2_0_X/src/Text.cpp        Sun Jun 12 20:01:53 
2011        (r39020)
@@ -356,13 +356,6 @@
                // of this document. For example, when you apply class article 
to a beamer document,
                // all unknown layouts such as frame will be added to document 
class article so that
                // these layouts can keep their original names.
-               bool const added_one = tclass.addLayoutIfNeeded(layoutname);
-               if (added_one) {
-                       // Warn the user.
-                       docstring const s = bformat(_("Layout `%1$s' was not 
found."), layoutname);
-                       errorList.push_back(
-                               ErrorItem(_("Layout Not Found"), s, par.id(), 
0, par.size()));
-               }
 
                par.setLayout(bp.documentClass()[layoutname]);
 

Modified: lyx-devel/branches/BRANCH_2_0_X/src/TextClass.cpp
==============================================================================
--- lyx-devel/branches/BRANCH_2_0_X/src/TextClass.cpp   Sun Jun 12 03:25:26 
2011        (r39019)
+++ lyx-devel/branches/BRANCH_2_0_X/src/TextClass.cpp   Sun Jun 12 20:01:53 
2011        (r39020)
@@ -1199,13 +1199,10 @@
 }
 
 
-bool DocumentClass::addLayoutIfNeeded(docstring const & n) const
+void DocumentClass::addLayoutIfNeeded(docstring const & n) const
 {
-       if (hasLayout(n))
-               return false;
-
-       layoutlist_.push_back(createBasicLayout(n, true));
-       return true;
+       if (!hasLayout(n))
+               layoutlist_.push_back(createBasicLayout(n, true));
 }
 
 

Modified: lyx-devel/branches/BRANCH_2_0_X/src/TextClass.h
==============================================================================
--- lyx-devel/branches/BRANCH_2_0_X/src/TextClass.h     Sun Jun 12 03:25:26 
2011        (r39019)
+++ lyx-devel/branches/BRANCH_2_0_X/src/TextClass.h     Sun Jun 12 20:01:53 
2011        (r39020)
@@ -373,8 +373,7 @@
        /// a plain inset layout for use as a default
        static InsetLayout const & plainInsetLayout() { return 
plain_insetlayout_; }
        /// add a new layout \c name if it does not exist in layoutlist_
-       /// \return whether we had to add one.
-       bool addLayoutIfNeeded(docstring const & name) const;
+       void addLayoutIfNeeded(docstring const & name) const;
 
        ///////////////////////////////////////////////////////////////////
        // accessors

Modified: lyx-devel/branches/BRANCH_2_0_X/status.20x
==============================================================================
--- lyx-devel/branches/BRANCH_2_0_X/status.20x  Sun Jun 12 03:25:26 2011        
(r39019)
+++ lyx-devel/branches/BRANCH_2_0_X/status.20x  Sun Jun 12 20:01:53 2011        
(r39020)
@@ -71,8 +71,6 @@
 
 - Fix output of decimally aligned columns in unviewed (on screen) tables.
 
-- Inform user of unknown layouts caused by class change (bug 7571).
-
 - Avoid LaTeX errors if font changing commands are used in the wrong mode
   by assuring to switch to the right mode on export.
 
@@ -148,8 +146,6 @@
 
 - Enable OK/Apply in Document>Settings dialog when bullet size is changed.
 
-- Display LyX's internal \unit equivalents in the math toolbar menu (bug 7620).
-
 
 * ADVANCED FIND AND REPLACE
 

Reply via email to