summaryrefslogtreecommitdiffstats
path: root/lib/kotext/KoTextParag.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/kotext/KoTextParag.cpp')
-rw-r--r--lib/kotext/KoTextParag.cpp66
1 files changed, 33 insertions, 33 deletions
diff --git a/lib/kotext/KoTextParag.cpp b/lib/kotext/KoTextParag.cpp
index aba58abc..cc1aecb9 100644
--- a/lib/kotext/KoTextParag.cpp
+++ b/lib/kotext/KoTextParag.cpp
@@ -1296,7 +1296,7 @@ int KoTextParag::rightMargin() const
return zh->ptToLayoutUnitPixX(
m_layout.margins[ TQStyleSheetItem::MarginRight ]
+ m_layout.rightBorder.width() )
- + cw; /* in tqlayout units already */
+ + cw; /* in layout units already */
}
int KoTextParag::firstLineMargin() const
@@ -1597,7 +1597,7 @@ void KoTextParag::paintLines( TQPainter &painter, const TQColorGroup &cg, KoText
// we flush before and after tabs
flush = flush || ( chr->c == '\t' || nextchr->c == '\t' );
// we flush on soft hypens
- flush = flush || ( chr->c.tqunicode() == 0xad );
+ flush = flush || ( chr->c.unicode() == 0xad );
// we flush on custom items
flush = flush || chr->isCustom();
// we flush before custom items
@@ -1847,7 +1847,7 @@ void KoTextParag::drawParagStringInternal( TQPainter &painter, const TQString &s
// 3) Paint
TQString str( s );
- if ( str[ (int)str.length() - 1 ].tqunicode() == 0xad )
+ if ( str[ (int)str.length() - 1 ].unicode() == 0xad )
str.remove( str.length() - 1, 1 );
painter.setPen( TQPen( textColor ) );
painter.setFont( font );
@@ -1877,7 +1877,7 @@ void KoTextParag::drawParagStringInternal( TQPainter &painter, const TQString &s
}
KoTextParag::drawFontEffects( &painter, format, zh, font, textColor, startX, baseLine, bw, lastY, h, str[start] );
- if ( str[ start ] != '\t' && str[ start ].tqunicode() != 0xad ) {
+ if ( str[ start ] != '\t' && str[ start ].unicode() != 0xad ) {
str = format->displayedString( str ); // #### This converts the whole string, instead of from start to start+len!
if ( format->vAlign() == KoTextFormat::AlignNormal ) {
int posY = lastY + baseLine;
@@ -1965,7 +1965,7 @@ void KoTextParag::drawParagStringInternal( TQPainter &painter, const TQString &s
#ifdef DEBUG_PAINT
//kdDebug(32500) << "we are drawing the end of line " << line << ". Auto-hyphenated: " << lineHyphenated( line ) << endl;
#endif
- bool drawHyphen = at( start+len-1 )->c.tqunicode() == 0xad;
+ bool drawHyphen = at( start+len-1 )->c.unicode() == 0xad;
drawHyphen = drawHyphen || lineHyphenated( line );
if ( drawHyphen ) {
#ifdef DEBUG_PAINT
@@ -2059,7 +2059,7 @@ void KoTextParag::copyParagData( KoTextParag *parag )
//else
// kdWarning() << "Paragraph has no style " << paragId() << endl;
- // No "following style" setting, or same style -> copy tqlayout & format of previous paragraph
+ // No "following style" setting, or same style -> copy layout & format of previous paragraph
if (!styleApplied)
{
setParagLayout( parag->paragLayout() );
@@ -2082,7 +2082,7 @@ void KoTextParag::copyParagData( KoTextParag *parag )
// Note: we don't call the original KoTextParag::copyParagData on purpose.
// We don't want setListStyle to get called - it ruins our stylesheetitems
// And we don't care about copying the stylesheetitems directly,
- // applying the parag tqlayout will create them
+ // applying the parag layout will create them
}
void KoTextParag::setTabList( const KoTabulatorList &tabList )
@@ -2240,43 +2240,43 @@ void KoTextParag::applyStyle( KoParagStyle *style )
setFormat( newFormat );
}
-void KoTextParag::setParagLayout( const KoParagLayout & tqlayout, int flags, int marginIndex )
+void KoTextParag::setParagLayout( const KoParagLayout & layout, int flags, int marginIndex )
{
//kdDebug(32500) << "KoTextParag::setParagLayout flags=" << flags << endl;
if ( flags & KoParagLayout::Alignment )
- setAlign( tqlayout.alignment );
+ setAlign( layout.alignment );
if ( flags & KoParagLayout::Margins ) {
if ( marginIndex == -1 )
- setMargins( tqlayout.margins );
+ setMargins( layout.margins );
else
- setMargin( (TQStyleSheetItem::Margin)marginIndex, tqlayout.margins[marginIndex] );
+ setMargin( (TQStyleSheetItem::Margin)marginIndex, layout.margins[marginIndex] );
}
if ( flags & KoParagLayout::LineSpacing )
{
- setLineSpacingType( tqlayout.lineSpacingType );
- setLineSpacing( tqlayout.lineSpacingValue() );
+ setLineSpacingType( layout.lineSpacingType );
+ setLineSpacing( layout.lineSpacingValue() );
}
if ( flags & KoParagLayout::Borders )
{
- setLeftBorder( tqlayout.leftBorder );
- setRightBorder( tqlayout.rightBorder );
- setTopBorder( tqlayout.topBorder );
- setBottomBorder( tqlayout.bottomBorder );
- setJoinBorder( tqlayout.joinBorder );
+ setLeftBorder( layout.leftBorder );
+ setRightBorder( layout.rightBorder );
+ setTopBorder( layout.topBorder );
+ setBottomBorder( layout.bottomBorder );
+ setJoinBorder( layout.joinBorder );
}
if ( flags & KoParagLayout::BackgroundColor )
{
- setBackgroundColor( tqlayout.backgroundColor );
+ setBackgroundColor( layout.backgroundColor );
}
if ( flags & KoParagLayout::BulletNumber )
- setCounter( tqlayout.counter );
+ setCounter( layout.counter );
if ( flags & KoParagLayout::Tabulator )
- setTabList( tqlayout.tabList() );
+ setTabList( layout.tabList() );
if ( flags == KoParagLayout::All )
{
- setDirection( static_cast<TQChar::Direction>(tqlayout.direction) );
+ setDirection( static_cast<TQChar::Direction>(layout.direction) );
// Don't call applyStyle from here, it would overwrite any paragraph-specific settings
- setStyle( tqlayout.style );
+ setStyle( layout.style );
}
}
@@ -2421,7 +2421,7 @@ void KoTextParag::printRTDebug( int info )
attrs.truncate( attrs.length() - 1 );
kdDebug(32500) << i << ": '" << TQString(ch.c).rightJustify(2)
- << "' (" << TQString::number( ch.c.tqunicode() ).rightJustify(3) << ")"
+ << "' (" << TQString::number( ch.c.unicode() ).rightJustify(3) << ")"
<< " x(LU)=" << ch.x
<< " w(LU)=" << ch.width//s->width(i)
<< " x(PIX)=" << pixelx
@@ -2849,7 +2849,7 @@ void KoTextParag::loadOasisSpan( const TQDomElement& parent, KoOasisContext& con
KoParagLayout KoTextParag::loadParagLayout( KoOasisContext& context, KoStyleCollection *styleCollection, bool findStyle )
{
- KoParagLayout tqlayout;
+ KoParagLayout layout;
// Only when loading paragraphs, not when loading styles
if ( findStyle )
@@ -2877,17 +2877,17 @@ KoParagLayout KoTextParag::loadParagLayout( KoOasisContext& context, KoStyleColl
style = styleCollection->findStyle( "Standard" );
}
Q_ASSERT(style);
- tqlayout.style = style;
+ layout.style = style;
}
- KoParagLayout::loadOasisParagLayout( tqlayout, context );
+ KoParagLayout::loadOasisParagLayout( layout, context );
- return tqlayout;
+ return layout;
}
void KoTextParag::loadOasis( const TQDomElement& parent, KoOasisContext& context, KoStyleCollection *styleCollection, uint& pos )
{
- // First load tqlayout from style
+ // First load layout from style
KoParagLayout paragLayout = loadParagLayout( context, styleCollection, true );
setParagLayout( paragLayout );
@@ -2915,7 +2915,7 @@ void KoTextParag::saveOasis( KoXmlWriter& writer, KoSavingContext& context,
{
KoGenStyles& mainStyles = context.mainStyles();
- // Write paragtqlayout to styles (with parent == the parag's style)
+ // Write paraglayout to styles (with parent == the parag's style)
TQString parentStyleName;
if ( m_layout.style )
parentStyleName = m_layout.style->name();
@@ -2924,11 +2924,11 @@ void KoTextParag::saveOasis( KoXmlWriter& writer, KoSavingContext& context,
paragFormat()->save( autoStyle, context );
m_layout.saveOasis( autoStyle, context, false );
- // First paragraph is special, it includes page-tqlayout info (for word-processing at least)
+ // First paragraph is special, it includes page-layout info (for word-processing at least)
if ( !prev() ) {
if ( context.variableSettings() )
autoStyle.addProperty( "style:page-number", context.variableSettings()->startingPageNumber() );
- // Well we support only one page tqlayout, so the first parag always points to "Standard".
+ // Well we support only one page layout, so the first parag always points to "Standard".
autoStyle.addAttribute( "style:master-page-name", "Standard" );
}
@@ -3212,7 +3212,7 @@ void KoTextParag::drawFormattingChars( TQPainter &painter, int start, int len,
#endif
if ( ch.isCustom() )
continue;
- if ( (ch.c == ' ' || ch.c.tqunicode() == 0x00a0U)
+ if ( (ch.c == ' ' || ch.c.unicode() == 0x00a0U)
&& (whichFormattingChars & FormattingSpace))
{
// Don't use ch.pixelwidth here. We want a square with