]> git.lyx.org Git - lyx.git/blobdiff - src/Paragraph.cpp
Get rid of Paragraph::ownerCode().
[lyx.git] / src / Paragraph.cpp
index 33bd22b5abddec0b399ce712c1649639260dd64b..36d40edcc59e7cbef83dfaa011312ae8e640e648 100644 (file)
@@ -173,6 +173,12 @@ public:
 
        /// match a string against a particular point in the paragraph
        bool isTextAt(string const & str, pos_type pos) const;
+
+
+       InsetCode Private::ownerCode() const
+       {
+               return inset_owner_ ? inset_owner_->lyxCode() : NO_CODE;
+       }
        
        /// Which Paragraph owns us?
        Paragraph * owner_;
@@ -288,12 +294,12 @@ void Paragraph::addChangesToToc(DocIterator const & cdit,
 }
 
 
-bool Paragraph::isFullyDeleted(pos_type start, pos_type end) const
+bool Paragraph::isDeleted(pos_type start, pos_type end) const
 {
        LASSERT(start >= 0 && start <= size(), /**/);
        LASSERT(end > start && end <= size() + 1, /**/);
 
-       return d->changes_.isFullyDeleted(start, end);
+       return d->changes_.isDeleted(start, end);
 }
 
 
@@ -759,7 +765,7 @@ void Paragraph::Private::latexInset(
                column = 0;
        }
 
-       if (owner_->lookupChange(i).deleted()) {
+       if (owner_->isDeleted(i)) {
                if( ++runparams.inDeletedInset == 1)
                        runparams.changeOfDeletedInset = owner_->lookupChange(i);
        }
@@ -848,7 +854,7 @@ void Paragraph::Private::latexInset(
                column += os.tellp() - len;
        }
 
-       if (owner_->lookupChange(i).deleted())
+       if (owner_->isDeleted(i))
                --runparams.inDeletedInset;
 }
 
@@ -1807,7 +1813,7 @@ int Paragraph::Private::startTeXParParams(BufferParams const & bparams,
        }
 
        string const begin_tag = "\\begin";
-       InsetCode code = owner_->ownerCode();
+       InsetCode code = ownerCode();
        bool const lastpar = runparams.isLastPar;
 
        switch (curAlign) {
@@ -1875,7 +1881,7 @@ int Paragraph::Private::endTeXParParams(BufferParams const & bparams,
        }
 
        string const end_tag = "\n\\par\\end";
-       InsetCode code = owner_->ownerCode();
+       InsetCode code = ownerCode();
        bool const lastpar = runparams.isLastPar;
 
        switch (curAlign) {
@@ -2641,12 +2647,6 @@ Inset const & Paragraph::inInset() const
 }
 
 
-InsetCode Paragraph::ownerCode() const
-{
-       return d->inset_owner_ ? d->inset_owner_->lyxCode() : NO_CODE;
-}
-
-
 ParagraphParameters & Paragraph::params()
 {
        return d->params_;