diff options
Diffstat (limited to 'kword/KWTextParag.cpp')
-rw-r--r-- | kword/KWTextParag.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/kword/KWTextParag.cpp b/kword/KWTextParag.cpp index f715298d..d50e98a0 100644 --- a/kword/KWTextParag.cpp +++ b/kword/KWTextParag.cpp @@ -82,15 +82,15 @@ void KWTextParag::drawFormattingChars( TQPainter &painter, int start, int len, //cg2.setColor( TQColorGroup::Base, TQt::green ); // for debug int last = length() - 1; KoTextStringChar &ch = string()->at( last ); - int x = zh->tqlayoutUnitToPixelX( ch.x );// + ch.pixelxadj; + int x = zh->layoutUnitToPixelX( ch.x );// + ch.pixelxadj; KoTextFormat format( *lastFormat ); format.setColor( pen.color() ); // ### A bit slow, maybe pass the color to drawParagStringInternal ? KoTextParag::drawParagStringInternal( painter, str, 0, str.length(), x, lastY_pix, // startX and lastY - zh->tqlayoutUnitToPixelY( ch.ascent() ), // baseline - width, zh->tqlayoutUnitToPixelY( ch.height() ), // bw and h + zh->layoutUnitToPixelY( ch.ascent() ), // baseline + width, zh->layoutUnitToPixelY( ch.height() ), // bw and h drawSelections, &format, selectionStarts, selectionEnds, cg2, rightToLeft, line, zh, false ); // Clear 'paint end of line' flag, we don't want it overwriting the above @@ -280,20 +280,20 @@ TQDomElement KWTextParag::saveFormat( TQDomDocument & doc, KoTextFormat * curFor return formatElem; } -void KWTextParag::save( TQDomElement &tqparentElem, bool saveAnchorsFramesets ) +void KWTextParag::save( TQDomElement &parentElem, bool saveAnchorsFramesets ) { // The TQMAX below ensures that although we don't save the trailing space // in the normal case, we do save it for empty paragraphs (#30336) - save( tqparentElem, 0, TQMAX( 0, length()-2 ), saveAnchorsFramesets ); + save( parentElem, 0, TQMAX( 0, length()-2 ), saveAnchorsFramesets ); } -void KWTextParag::save( TQDomElement &tqparentElem, int from /* default 0 */, +void KWTextParag::save( TQDomElement &parentElem, int from /* default 0 */, int to /* default length()-2 */, bool saveAnchorsFramesets /* default false */ ) { - TQDomDocument doc = tqparentElem.ownerDocument(); + TQDomDocument doc = parentElem.ownerDocument(); TQDomElement paragElem = doc.createElement( "PARAGRAPH" ); - tqparentElem.appendChild( paragElem ); + parentElem.appendChild( paragElem ); TQDomElement textElem = doc.createElement( "TEXT" ); textElem.setAttribute("xml:space", "preserve"); paragElem.appendChild( textElem ); @@ -382,18 +382,18 @@ void KWTextParag::save( TQDomElement &tqparentElem, int from /* default 0 */, paragElem.appendChild( formatsElem ); - TQDomElement tqlayoutElem = doc.createElement( "LAYOUT" ); - paragElem.appendChild( tqlayoutElem ); + TQDomElement layoutElem = doc.createElement( "LAYOUT" ); + paragElem.appendChild( layoutElem ); // save with the real tqalignment (left or right, not auto) - m_layout.saveParagLayout( tqlayoutElem, resolveAlignment() ); + m_layout.saveParagLayout( layoutElem, resolveAlignment() ); // Paragraph's format // ## Maybe we should have a "default format" somewhere and // pass it instead of 0L, to only save the non-default attributes // But this would break all export filters again. TQDomElement paragFormatElement = saveFormat( doc, paragraphFormat(), 0L, 0, to - from + 1 ); - tqlayoutElem.appendChild( paragFormatElement ); + layoutElem.appendChild( paragFormatElement ); } //static @@ -751,7 +751,7 @@ void KWTextParag::setParagLayout( const KoParagLayout & tqlayout, int flags, int ////////// // Create a KoParagLayout from XML. -KoParagLayout KWTextParag::loadParagLayout( TQDomElement & tqparentElem, KWDocument *doc, bool findStyle ) +KoParagLayout KWTextParag::loadParagLayout( TQDomElement & parentElem, KWDocument *doc, bool findStyle ) { KoParagLayout tqlayout; @@ -761,7 +761,7 @@ KoParagLayout KWTextParag::loadParagLayout( TQDomElement & tqparentElem, KWDocum KoParagStyle *style; // Name of the style. If there is no style, then we do not supply // any default! - TQDomElement element = tqparentElem.namedItem( "NAME" ).toElement(); + TQDomElement element = parentElem.namedItem( "NAME" ).toElement(); if ( !element.isNull() ) { TQString styleName = element.attribute( "value" ); @@ -782,7 +782,7 @@ KoParagLayout KWTextParag::loadParagLayout( TQDomElement & tqparentElem, KWDocum tqlayout.style = style; } - KoParagLayout::loadParagLayout( tqlayout, tqparentElem, doc->syntaxVersion() ); + KoParagLayout::loadParagLayout( tqlayout, parentElem, doc->syntaxVersion() ); return tqlayout; } |