]> git.lyx.org Git - features.git/commitdiff
Remove method that is now unneeded.
authorRichard Kimberly Heck <rikiheck@lyx.org>
Sun, 26 Apr 2020 02:27:09 +0000 (22:27 -0400)
committerRichard Kimberly Heck <rikiheck@lyx.org>
Sun, 26 Apr 2020 02:27:09 +0000 (22:27 -0400)
src/Buffer.cpp
src/insets/InsetInclude.cpp
src/insets/InsetInclude.h

index 8b5fae18020f4faa929f5c08f18cf3add3e07c13..0cc1d23f066749c0baad840f23d0bd1f8b790258 100644 (file)
@@ -3017,7 +3017,7 @@ void Buffer::dispatch(FuncRequest const & func, DispatchResult & dr)
                                // get buffer of external file
                                InsetInclude const & ins =
                                        static_cast<InsetInclude const &>(*it);
-                               Buffer * child = ins.getChildBuffer();
+                               Buffer * child = ins.loadIfNeeded();
                                if (!child)
                                        continue;
                                child->dispatch(func, dr);
@@ -3805,7 +3805,7 @@ void Buffer::Impl::updateMacros(DocIterator & it, DocIterator & scope)
                                InsetInclude const & incinset =
                                        static_cast<InsetInclude const &>(*insit.inset);
                                macro_lock = true;
-                               Buffer * child = incinset.getChildBuffer();
+                               Buffer * child = incinset.loadIfNeeded();
                                macro_lock = false;
                                if (!child)
                                        continue;
@@ -3900,7 +3900,7 @@ void Buffer::getUsedBranches(std::list<docstring> & result, bool const from_mast
                        // get buffer of external file
                        InsetInclude const & ins =
                                static_cast<InsetInclude const &>(*it);
-                       Buffer * child = ins.getChildBuffer();
+                       Buffer * child = ins.loadIfNeeded();
                        if (!child)
                                continue;
                        child->getUsedBranches(result, true);
index be823a77d56e243f7092fa31fe9de4b640c108af..6dca350078518ccf827e8a69d95dfce314e70eec 100644 (file)
@@ -446,12 +446,6 @@ docstring InsetInclude::screenLabel() const
 }
 
 
-Buffer * InsetInclude::getChildBuffer() const
-{
-       return loadIfNeeded();
-}
-
-
 Buffer * InsetInclude::loadIfNeeded() const
 {
        // This is for background export and preview. We don't even want to
@@ -1330,7 +1324,7 @@ void InsetInclude::addToToc(DocIterator const & cpit, bool output_active,
                b.pushItem(cpit, screenLabel(), output_active);
                b.pop();
        } else {
-               Buffer const * const childbuffer = getChildBuffer();
+               Buffer const * const childbuffer = loadIfNeeded();
 
                TocBuilder & b = backend.builder("child");
                docstring str = childbuffer ? childbuffer->fileName().displayName()
@@ -1386,7 +1380,7 @@ void InsetInclude::updateCommand()
 void InsetInclude::updateBuffer(ParIterator const & it, UpdateType utype, bool const deleted)
 {
        file_exist_ = includedFileExist();
-       Buffer const * const childbuffer = getChildBuffer();
+       Buffer const * const childbuffer = loadIfNeeded();
        if (childbuffer) {
                if (!checkForRecursiveInclude(childbuffer))
                        childbuffer->updateBuffer(Buffer::UpdateChildOnly, utype);
index 6636583e6cd4d446daa1a9d05873c38944029a27..66487bc934c45a805dab92965da823aef0c36be2 100644 (file)
@@ -48,8 +48,9 @@ public:
 
        ///
        void setChildBuffer(Buffer * buffer);
-       /// \return the child buffer if the file is a LyX doc and could be loaded
-       Buffer * getChildBuffer() const;
+
+       /// \return loaded Buffer or zero if the file loading did not proceed.
+       Buffer * loadIfNeeded() const;
 
        /** Update the cache with all bibfiles in use of the child buffer
         *  (including bibfiles of grandchild documents).
@@ -131,8 +132,6 @@ private:
         *  and the preview should be regenerated.
         */
        void fileChanged() const;
-       /// \return loaded Buffer or zero if the file loading did not proceed.
-       Buffer * loadIfNeeded() const;
        /// launch external application
        void editIncluded(std::string const & file);
        ///