[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-bugs-dist
Subject: [Bug 41346] paragraph formating - increase/decrease numbering depth
From: David Faure <faure () kde ! org>
Date: 2003-02-25 20:55:08
[Download RAW message or body]
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
http://bugs.kde.org/show_bug.cgi?id=41346
------- Additional Comments From faure@kde.org 2003-02-25 21:55 -------
Subject: koffice/lib/kotext
CVS commit by faure:
Fixed paragraph numbering preview widget, so that it shows 1.1.1 if
depth=2 and display-levels=3
CCMAIL: 41346@bugs.kde.org
M +8 -3 koparagcounter.cc 1.29
--- koffice/lib/kotext/koparagcounter.cc #1.28:1.29
@@ -500,7 +500,7 @@ QString KoParagCounter::text( const KoTe
// If necessary, grab the text of the preceeding levels.
- if ( m_displayLevels > 1 && parent( paragraph ) )
+ if ( m_displayLevels > 1 )
{
- KoTextParag* p = m_cache.parent; // calculated by parent() above
+ KoTextParag* p = parent( paragraph );
int displayLevels = QMIN( m_displayLevels, m_depth+1 ); // can't be >depth+1
for ( int level = 1 ; level < displayLevels ; ++level ) {
@@ -529,4 +529,9 @@ QString KoParagCounter::text( const KoTe
else // toplevel parents are missing
{
+ // Special case for one-paragraph-documents like preview widgets
+ KoTextDocument* textdoc = paragraph->textDocument();
+ if ( paragraph == textdoc->firstParag() && paragraph == textdoc->lastParag() )
+ m_cache.text.prepend( "1." );
+ else
m_cache.text.prepend( "0." );
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic