Commit 3214307e authored by Mohammad Mahfuzur Rahman Mamun's avatar Mohammad Mahfuzur Rahman Mamun
Browse files

unnecessary changes removed from area.h and cpp textpage.h textpage_p.h

parent da264105
......@@ -166,11 +166,10 @@ class OKULAR_EXPORT NormalizedRect
QRect geometry( int xScale, int yScale ) const;
/**
* same thing, but the output is now rounded before typecasting to int
**/
* Same functionality as geometry, but the output is now rounded before typecasting to int
*/
QRect roundedGeometry( int xScale, int yScale ) const;
/**
* Returns the normalized bounding rectangle of the normalized rectangle
* combined with the @p other normalized rectangle.
......@@ -208,32 +207,44 @@ class OKULAR_EXPORT NormalizedRect
*/
void transform( const QMatrix &matrix );
//mamun.nightcrawler@gmail.com
/**
* The four methods check whether a point is to the Bottom, Top, Left or
* Right of a rectangle
**/
* Returns true if the point pt is located to the bottom of the rectangle
*/
bool isBottom(NormalizedPoint pt) const{
return bottom < pt.y;
}
/**
* Returns true if the point pt is located on the top of the rectangle
*/
bool isTop(NormalizedPoint pt) const{
return top > pt.y;
}
/**
* Returns true if the point pt is located under the top of the rectangle
*/
bool isBottomOrLevel(NormalizedPoint pt) const{
return top < pt.y;
}
/**
* Returns true if the point pt is located above the bottom of the rectangle
*/
bool isTopOrLevel(NormalizedPoint pt) const{
return bottom > pt.y;
}
/**
* Returns true if the point pt is located to the right of the left arm of rectangle
*/
bool isLeft(NormalizedPoint pt) const{
return left < pt.x;
}
/**
* Returns true if the point pt is located to the left of the right arm of rectangle
*/
bool isRight(NormalizedPoint pt) const{
return right > pt.x;
}
......
......@@ -37,9 +37,6 @@
#include <limits>
#include <iostream>
using namespace std;
#ifdef PAGE_PROFILE
#include <QtCore/QTime>
#endif
......@@ -455,10 +452,11 @@ void Page::setTextPage( TextPage * textPage )
if ( d->m_text )
{
d->m_text->d->m_page = d;
// Code for Text Selection
/**
*correct text order for text selection
*/
d->m_text->correctTextOrder();
}
}
void Page::setObjectRects( const QLinkedList< ObjectRect * > & rects )
......
......@@ -167,15 +167,12 @@ class OKULAR_EXPORT TextPage
*/
RegularAreaRect *textArea( TextSelection *selection ) const;
// mamun.nightcrawler@gmail.com
/**
make necessary modifications in the TextList to make the textOrder correct, so
textselection works fine
**/
* make necessary modifications in the TextList to make the text order correct, so
* that textselection works fine
*/
void correctTextOrder();
private:
TextPagePrivate* const d;
......@@ -184,4 +181,4 @@ class OKULAR_EXPORT TextPage
}
#endif
#endif
......@@ -55,58 +55,64 @@ class TextPagePrivate
TextComparisonFunction comparer,
const TextList::ConstIterator &start,
const TextList::ConstIterator &end );
/** prints a line from m_lines **/
/**
* Prints a line from m_lines
*/
void printTextList(int i, TextList list);
/** copy a TextList to m_words **/
/**
* Copy a TextList to m_words
*/
void copyTo(TextList &list);
/** copy m_words to a TextList **/
/**
* Copy m_words to a TextList
*/
void copyFrom(TextList &list);
/**
print the textpage contents with area (text and bounding rect)
**/
* Print the textpage contents with area (text and bounding rect)
*/
void printTextPageContent();
/**
remove odd spaces which are much bigger than normal spaces from m_words
**/
* Remove odd spaces which are much bigger than normal spaces from m_words
*/
void removeSpace();
/**
create words from characters
**/
* Create words from characters
*/
void makeWordFromCharacters();
/**
Create lines from TextList and sort them according to their position
**/
* Create lines from TextList and sort them according to their position
*/
void makeAndSortLines(TextList &words,SortedTextList &lines,LineRect &line_rects, bool debug);
/**
Caluclate statistical info like, word spacing, column spacing, line spacing from the Lines
we made
**/
* Caluclate statistical info like, word spacing, column spacing, line spacing from the Lines
* we made
*/
void calculateStatisticalInformation(SortedTextList &lines, LineRect line_rects,int& word_spacing,
int& line_spacing, int& column_spacing);
/**
Functions necessary for document file segmentation into text regions for document layout
analysis.
**/
* Functions necessary for document file segmentation into text regions for document layout
* analysis.
*/
void XYCutForBoundingBoxes(int tcx,int tcy);
/**
add additional spaces between words, if necessary, which can make the words valuable
while copying after selection
**/
* Add additional spaces between words, if necessary, which can make the words valuable
* while copying after selection
*/
void addNecessarySpace();
/**
break the words into characters, so the text selection wors fine
**/
* Break the words into characters, so the text selection wors fine
*/
void breakWordIntoCharacters();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment