move deleteTextSelections() to the private class

svn path=/trunk/KDE/kdegraphics/okular/; revision=708155
This commit is contained in:
Pino Toscano 2007-09-03 23:47:12 +00:00
parent d81d4aedd9
commit bf9af4433d
4 changed files with 12 additions and 12 deletions

View file

@ -1967,7 +1967,7 @@ void Document::setPageTextSelection( int page, RegularAreaRect * rect, const QCo
if ( rect )
kp->d->setTextSelections( rect, color );
else
kp->deleteTextSelections();
kp->d->deleteTextSelections();
// notify observers about the change
foreachObserver( notifyPageChanged( page, DocumentObserver::TextSelection ) );

View file

@ -130,7 +130,7 @@ Page::~Page()
deleteRects();
d->deleteHighlights();
deleteAnnotations();
deleteTextSelections();
d->deleteTextSelections();
deleteSourceReferences();
delete d;
@ -274,7 +274,7 @@ void PagePrivate::rotateAt( Rotation orientation )
return;
deleteHighlights();
m_page->deleteTextSelections();
deleteTextSelections();
if ( ( (int)m_orientation + (int)m_rotation ) % 2 != ( (int)m_orientation + (int)orientation ) % 2 )
qSwap( m_width, m_height );
@ -432,7 +432,7 @@ void PagePrivate::setHighlight( int s_id, RegularAreaRect *rect, const QColor &
void PagePrivate::setTextSelections( RegularAreaRect *r, const QColor & color )
{
m_page->deleteTextSelections();
deleteTextSelections();
if ( r )
{
HighlightAreaRect * hr = new HighlightAreaRect( r );
@ -637,10 +637,10 @@ void PagePrivate::deleteHighlights( int s_id )
}
}
void Page::deleteTextSelections()
void PagePrivate::deleteTextSelections()
{
delete d->m_textSelections;
d->m_textSelections = 0;
delete m_textSelections;
m_textSelections = 0;
}
void Page::deleteSourceReferences()

View file

@ -288,11 +288,6 @@ class OKULAR_EXPORT Page
*/
void deleteRects();
/**
* Deletes all text selection objects of the page.
*/
void deleteTextSelections();
/**
* Deletes all source reference objects of the page.
*/

View file

@ -91,6 +91,11 @@ class PagePrivate
*/
void deleteHighlights( int id = -1 );
/**
* Deletes all text selection objects of the page.
*/
void deleteTextSelections();
class PixmapObject
{
public: