]> git.lyx.org Git - lyx.git/blobdiff - src/ParagraphMetrics.cpp
Two more icon scale fixes
[lyx.git] / src / ParagraphMetrics.cpp
index 1d3ce0db5cfe196c718e632629dffa21f7276265..31b31a2d0158a156117835fb3af784369c398acd 100644 (file)
 #include "Buffer.h"
 #include "BufferParams.h"
 #include "BufferView.h"
-#include "Counters.h"
-#include "Encoding.h"
-#include "Language.h"
-#include "LaTeXFeatures.h"
-#include "Layout.h"
 #include "Font.h"
-#include "LyXRC.h"
-#include "Row.h"
-#include "OutputParams.h"
-#include "sgml.h"
+#include "Layout.h"
+#include "LayoutEnums.h"
+#include "Paragraph.h"
 #include "TextClass.h"
-#include "TexRow.h"
 
 #include "frontends/FontMetrics.h"
 
-#include "insets/InsetBibitem.h"
-#include "insets/InsetArgument.h"
-
 #include "support/lassert.h"
 #include "support/debug.h"
-#include "support/ExceptionMessage.h"
-#include "support/gettext.h"
-#include "support/lstrings.h"
-#include "support/textutils.h"
-
-#include <algorithm>
-#include <list>
-#include <stack>
+
 #include <sstream>
 
 using namespace std;
@@ -59,7 +42,7 @@ namespace lyx {
 
 
 ParagraphMetrics::ParagraphMetrics(Paragraph const & par) :
-       position_(-1), par_(&par)
+       position_(-1), id_(par.id()), par_(&par)
 {}
 
 
@@ -88,25 +71,6 @@ void ParagraphMetrics::setPosition(int position)
 }
 
 
-Row & ParagraphMetrics::getRow(pos_type pos, bool boundary)
-{
-       LBUFERR(!rows().empty());
-
-       // If boundary is set we should return the row on which
-       // the character before is inside.
-       if (pos > 0 && boundary)
-               --pos;
-
-       RowList::iterator rit = rows_.end();
-       RowList::iterator const begin = rows_.begin();
-
-       for (--rit; rit != begin && rit->pos() > pos; --rit)
-               ;
-
-       return *rit;
-}
-
-
 Row const & ParagraphMetrics::getRow(pos_type pos, bool boundary) const
 {
        LBUFERR(!rows().empty());