diff options
Diffstat (limited to 'lib/kotext/KoParagLayout.cpp')
-rw-r--r-- | lib/kotext/KoParagLayout.cpp | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/lib/kotext/KoParagLayout.cpp b/lib/kotext/KoParagLayout.cpp index fd1a9453..8e5178a5 100644 --- a/lib/kotext/KoParagLayout.cpp +++ b/lib/kotext/KoParagLayout.cpp @@ -46,7 +46,7 @@ KoParagLayout::KoParagLayout() void KoParagLayout::operator=( const KoParagLayout &tqlayout ) { - tqalignment = tqlayout.tqalignment; + alignment = tqlayout.alignment; for ( int i = 0 ; i < 5 ; ++i ) margins[i] = tqlayout.margins[i]; pageBreaking = tqlayout.pageBreaking; @@ -70,7 +70,7 @@ void KoParagLayout::operator=( const KoParagLayout &tqlayout ) int KoParagLayout::compare( const KoParagLayout & tqlayout ) const { int flags = 0; - if ( tqalignment != tqlayout.tqalignment ) + if ( alignment != tqlayout.alignment ) flags |= Alignment; for ( int i = 0 ; i < 5 ; ++i ) if ( margins[i] != tqlayout.margins[i] ) @@ -119,7 +119,7 @@ int KoParagLayout::compare( const KoParagLayout & tqlayout ) const void KoParagLayout::initialise() { - tqalignment = TQt::AlignAuto; + alignment = TQt::AlignAuto; for ( int i = 0 ; i < 5 ; ++i ) // use memset ? margins[i] = 0; lineSpacingType = LS_SINGLE; @@ -172,14 +172,14 @@ void KoParagLayout::loadParagLayout( KoParagLayout& tqlayout, const TQDomElement } qHeapSort( tabList ); tqlayout.setTabList( tabList ); - tqlayout.tqalignment = TQt::AlignAuto; - element = parentElem.namedItem( "FLOW" ).toElement(); // Flow is what is now called tqalignment internally + tqlayout.alignment = TQt::AlignAuto; + element = parentElem.namedItem( "FLOW" ).toElement(); // Flow is what is now called alignment internally if ( !element.isNull() ) { TQString flow = element.attribute( "align" ); // KWord-1.0 DTD if ( !flow.isEmpty() ) { - tqlayout.tqalignment = flow=="right" ? TQt::AlignRight : + tqlayout.alignment = flow=="right" ? TQt::AlignRight : flow=="center" ? TQt::AlignHCenter : flow=="justify" ? TQt::AlignJustify : flow=="left" ? TQt::AlignLeft : TQt::AlignAuto; @@ -197,7 +197,7 @@ void KoParagLayout::loadParagLayout( KoParagLayout& tqlayout, const TQDomElement flow = element.attribute( "value" ); // KWord-0.8 static const int flow2align[] = { TQt::AlignAuto, TQt::AlignRight, TQt::AlignHCenter, TQt::AlignJustify }; if ( !flow.isEmpty() && flow.toInt() < 4 ) - tqlayout.tqalignment = flow2align[flow.toInt()]; + tqlayout.alignment = flow2align[flow.toInt()]; } } @@ -425,12 +425,12 @@ TQt::AlignmentFlags KoParagLayout::loadOasisAlignment( const TQCString& str ) } //static -TQCString KoParagLayout::saveOasisAlignment( TQt::AlignmentFlags tqalignment ) +TQCString KoParagLayout::saveOasisAlignment( TQt::AlignmentFlags alignment ) { - return tqalignment == TQt::AlignLeft ? "left" : - tqalignment == TQt::AlignRight ? "right" : - tqalignment == TQt::AlignHCenter ? "center" : - tqalignment == TQt::AlignJustify ? "justify" : + return alignment == TQt::AlignLeft ? "left" : + alignment == TQt::AlignRight ? "right" : + alignment == TQt::AlignHCenter ? "center" : + alignment == TQt::AlignJustify ? "justify" : "start"; // i.e. direction-dependent } @@ -443,7 +443,7 @@ void KoParagLayout::loadOasisParagLayout( KoParagLayout& tqlayout, KoOasisContex // code from OoWriterImport::writeLayout if ( context.styleStack().hasAttributeNS( KoXmlNS::fo, "text-align" ) ) { TQCString align = context.styleStack().attributeNS( KoXmlNS::fo, "text-align" ).latin1(); - tqlayout.tqalignment = loadOasisAlignment( align ); + tqlayout.alignment = loadOasisAlignment( align ); } if ( context.styleStack().hasAttributeNS( KoXmlNS::style, "writing-mode" ) ) { // http://web4.w3.org/TR/xsl/slice7.html#writing-mode @@ -549,7 +549,7 @@ void KoParagLayout::loadOasisParagLayout( KoParagLayout& tqlayout, KoOasisContex TQString delimiterChar = tabStop.attributeNS( KoXmlNS::style, "char", TQString() ); // single character if ( !delimiterChar.isEmpty() ) tab.alignChar = delimiterChar[0]; - tab.type = T_DEC_PNT; // "tqalignment on decimal point" + tab.type = T_DEC_PNT; // "alignment on decimal point" } else //if ( type == "left" ) tab.type = T_LEFT; @@ -658,7 +658,7 @@ void KoParagLayout::loadOasisParagLayout( KoParagLayout& tqlayout, KoOasisContex } } -void KoParagLayout::saveParagLayout( TQDomElement & parentElem, int tqalignment ) const +void KoParagLayout::saveParagLayout( TQDomElement & parentElem, int alignment ) const { const KoParagLayout& tqlayout = *this; // code moved from somewhere else;) TQDomDocument doc = parentElem.ownerDocument(); @@ -672,10 +672,10 @@ void KoParagLayout::saveParagLayout( TQDomElement & parentElem, int tqalignment element = doc.createElement( "FLOW" ); parentElem.appendChild( element ); - element.setAttribute( "align", tqalignment==TQt::AlignRight ? "right" : - tqalignment==TQt::AlignHCenter ? "center" : - tqalignment==TQt::AlignJustify ? "justify" : - tqalignment==TQt::AlignAuto ? "auto" : "left" ); // Note: styles can have AlignAuto. Not paragraphs. + element.setAttribute( "align", alignment==TQt::AlignRight ? "right" : + alignment==TQt::AlignHCenter ? "center" : + alignment==TQt::AlignJustify ? "justify" : + alignment==TQt::AlignAuto ? "auto" : "left" ); // Note: styles can have AlignAuto. Not paragraphs. if ( static_cast<TQChar::Direction>(tqlayout.direction) == TQChar::DirR ) element.setAttribute( "dir", "R" ); @@ -806,7 +806,7 @@ void KoParagLayout::saveParagLayout( TQDomElement & parentElem, int tqalignment void KoParagLayout::saveOasis( KoGenStyle& gs, KoSavingContext& context, bool savingStyle ) const { - gs.addProperty( "fo:text-align", saveOasisAlignment( (TQt::AlignmentFlags)tqalignment ).data() ); + gs.addProperty( "fo:text-align", saveOasisAlignment( (TQt::AlignmentFlags)alignment ).data() ); // Don't save the direction for a style, if "auto", so that the // auto-determination of direction based on first char, works. if ( !savingStyle || (TQChar::Direction) direction != TQChar::DirON ) @@ -863,7 +863,7 @@ void KoParagLayout::saveOasis( KoGenStyle& gs, KoSavingContext& context, bool sa case T_RIGHT: tabsWriter.addAttribute( "style:type", "right" ); break; - case T_DEC_PNT: // "tqalignment on decimal point" + case T_DEC_PNT: // "alignment on decimal point" tabsWriter.addAttribute( "style:type", "char" ); if ( !(*it).alignChar.isNull() ) tabsWriter.addAttribute( "style:char", TQString( (*it).alignChar ) ); |