[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-bugs-dist
Subject: [Bug 137618] merge with next paragraph: buggy turning off for several
From: Fredrik Edemar <f_edemar () linux ! se>
Date: 2006-11-20 23:26:07
Message-ID: 20061120232607.11792.qmail () ktown ! kde ! org
[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=137618
f_edemar linux se changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
------- Additional Comments From f_edemar linux se 2006-11-21 00:26 -------
SVN commit 606588 by fedemar:
Setting a border around several paragraphs is done in a simpler way now: apply the \
border to every paragraph, e.g ______
> ____|
> ____|
instead of
______
> >
> ____|
The middle top/bottom border will not be shown when "Merge with next paragraph" is \
set (default).
This caused bug 137618.
BUG: 137618
M +2 -15 KoTextCommand.cpp
M +1 -2 KoTextCommand.h
M +4 -12 KoTextObject.cpp
--- branches/koffice/1.6/koffice/lib/kotext/KoTextCommand.cpp #606587:606588
@ -113,9 +113,9 @
const QValueList<KoParagLayout> \
&oldParagLayouts, KoParagLayout newParagLayout,
int flags,
- QStyleSheetItem::Margin margin, bool \
borderOutline ) + QStyleSheetItem::Margin \
margin )
: KoTextDocCommand( d ), firstParag( fParag ), lastParag( lParag ), \
m_oldParagLayouts( oldParagLayouts ),
- m_newParagLayout( newParagLayout ), m_flags( flags ), m_margin( margin ), \
m_borderOutline( borderOutline ) + m_newParagLayout( newParagLayout ), m_flags( \
flags ), m_margin( margin ) {
Q_ASSERT( fParag >= 0 );
Q_ASSERT( lParag >= 0 );
@ -136,24 +136,11 @
else
{
p->setParagLayout( m_newParagLayout, m_flags );
- if ( (m_flags & KoParagLayout::Borders) && m_borderOutline)
- {
- KoBorder tmpBorder;
- tmpBorder.setPenWidth(0);
- p->setTopBorder(tmpBorder);
- p->setBottomBorder(tmpBorder);
- }
}
if ( p->paragId() == lastParag )
break;
p = p->next();
}
- if ( (m_flags & KoParagLayout::Borders) && m_borderOutline)
- {
- p->setBottomBorder( m_newParagLayout.bottomBorder);
- doc->paragAt( firstParag )->setTopBorder( m_newParagLayout.topBorder);
- }
-
//kdDebug(32500) << "KoTextParagCommand::execute done" << endl;
// Set cursor to end of selection. Like in KoTextFormatCommand::[un]execute...
c->setParag( p );
--- branches/koffice/1.6/koffice/lib/kotext/KoTextCommand.h #606587:606588
@ -90,7 +90,7 @
const QValueList<KoParagLayout> &oldParagLayouts,
KoParagLayout newParagLayout,
int /*KoParagLayout::Flags*/ flags,
- QStyleSheetItem::Margin margin = \
(QStyleSheetItem::Margin)-1, bool borderOutline=false ); + \
QStyleSheetItem::Margin margin = (QStyleSheetItem::Margin)-1 );
// margin is only meaningful if flags==Margins only. -1 \
means all. KoTextCursor *execute( KoTextCursor *c );
KoTextCursor *unexecute( KoTextCursor *c );
@ -100,7 +100,6 @
KoParagLayout m_newParagLayout;
int m_flags;
int m_margin;
- bool m_borderOutline;
};
/**
--- branches/koffice/1.6/koffice/lib/kotext/KoTextObject.cpp #606587:606588
@ -1321,7 +1321,6 @
return 0L; // No change needed.
emit hideCursor();
- bool borderOutline = false;
storeParagUndoRedoInfo( cursor, selectionId );
if ( !textdoc->hasSelection( selectionId, true ) ) {
cursor->parag()->setLeftBorder(leftBorder);
@ -1340,19 +1339,14 @
KoTextParag *start = textdoc->selectionStart( selectionId );
KoTextParag *end = textdoc->selectionEnd( selectionId );
setLastFormattedParag( start );
- KoBorder tmpBorder;
- tmpBorder.setPenWidth(0);
for ( ; start && start != end->next() ; start = start->next() )
{
start->setLeftBorder(leftBorder);
start->setRightBorder(rightBorder);
- //remove border
- start->setTopBorder(tmpBorder);
- start->setBottomBorder(tmpBorder);
+ start->setTopBorder(topBorder);
+ start->setBottomBorder(bottomBorder);
}
- end->setBottomBorder(bottomBorder);
textdoc->selectionStart( selectionId )->setTopBorder(topBorder);
- borderOutline = true;
if ( start && start->prev() )
start->prev()->setChanged( true );
@ -1369,7 +1363,7 @
KoTextParagCommand *cmd = new KoTextParagCommand(
textdoc, undoRedoInfo.id, undoRedoInfo.eid,
undoRedoInfo.oldParagLayouts, undoRedoInfo.newParagLayout,
- KoParagLayout::Borders, (QStyleSheetItem::Margin)-1, borderOutline);
+ KoParagLayout::Borders, (QStyleSheetItem::Margin)-1 );
textdoc->addCommand( cmd );
undoRedoInfo.clear();
@ -1387,7 +1381,6 @
return 0L; // No change needed.
emit hideCursor();
- bool borderOutline = false;
storeParagUndoRedoInfo( cursor, KoTextDocument::Standard );
if ( !textdoc->hasSelection( selectionId, true ) )
{
@ -1409,7 +1402,6 @
start->setJoinBorder( true );
}
end->setJoinBorder ( true );
- borderOutline = true;
if ( start && start->prev() )
start->prev()->setChanged( true );
@ -1424,7 +1416,7 @
KoTextParagCommand *cmd = new KoTextParagCommand(
textdoc, undoRedoInfo.id, undoRedoInfo.eid,
undoRedoInfo.oldParagLayouts, undoRedoInfo.newParagLayout,
- KoParagLayout::Borders, (QStyleSheetItem::Margin)-1, borderOutline);
+ KoParagLayout::Borders, (QStyleSheetItem::Margin)-1 );
textdoc->addCommand( cmd );
undoRedoInfo.clear();
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic