]> git.lyx.org Git - features.git/commitdiff
Revert r39007 and r38983, since these broke the string freeze. I'll recommit for...
authorRichard Heck <rgheck@comcast.net>
Sun, 12 Jun 2011 18:01:53 +0000 (18:01 +0000)
committerRichard Heck <rgheck@comcast.net>
Sun, 12 Jun 2011 18:01:53 +0000 (18:01 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_2_0_X@39020 a592a061-630c-0410-9148-cb99ea01b6c8

lib/ui/stdtoolbars.inc
src/CutAndPaste.cpp
src/Text.cpp
src/TextClass.cpp
src/TextClass.h
status.20x

index 3bc0f02d5d6ce74db092950193197ecc0a2b2a6e..3db71ce031d6c3b8c36fb0f99c8000cc608e2e45 100644 (file)
@@ -353,15 +353,15 @@ ToolbarSet
        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"
index 2bac66f8a6db2d2fe4d72f078fe13c20f6b10bbd..39b732fea6b2affdec2d3ab6d800c9b1bb010fe3 100644 (file)
@@ -647,25 +647,13 @@ void switchBetweenClasses(DocumentClass const * const oldone,
        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());
index c79b67660dde6c299cac8e1fce1088016a910273..c877e63263b2636e1ab7001b9e6693181cd4a4b0 100644 (file)
@@ -356,13 +356,6 @@ void Text::readParToken(Paragraph & par, Lexer & lex,
                // 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]);
 
index c9cbcae5e0578f62b1326b69d3dae93383569c28..00558d586247ad870eda3fd58dae36306d4c04f6 100644 (file)
@@ -1199,13 +1199,10 @@ bool TextClass::load(string const & path) const
 }
 
 
-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));
 }
 
 
index 6e20650cc23eec130731ecf5d7461f93e0bdc8cf..f3d2197278b4617562ceea27195ef2acd25a94fd 100644 (file)
@@ -373,8 +373,7 @@ public:
        /// 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
index 7e312c8d08005a8da30421026a06c376abf3e362..84cf0bd4670a1402c8ef12fa1b08c5e0bdda0e8c 100644 (file)
@@ -71,8 +71,6 @@ What's new
 
 - 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 @@ What's new
 
 - 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