diff options
Diffstat (limited to 'lib/kotext/KoParagLayout.cpp')
-rw-r--r-- | lib/kotext/KoParagLayout.cpp | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/lib/kotext/KoParagLayout.cpp b/lib/kotext/KoParagLayout.cpp index 8cb9682f..129c4d4a 100644 --- a/lib/kotext/KoParagLayout.cpp +++ b/lib/kotext/KoParagLayout.cpp @@ -141,7 +141,7 @@ KoParagLayout::~KoParagLayout() delete counter; } -void KoParagLayout::loadParagLayout( KoParagLayout& tqlayout, const TQDomElement& tqparentElem, int docVersion ) +void KoParagLayout::loadParagLayout( KoParagLayout& tqlayout, const TQDomElement& parentElem, int docVersion ) { // tqlayout is an input and output parameter // It can have been initialized already, e.g. by copying from a style @@ -152,7 +152,7 @@ void KoParagLayout::loadParagLayout( KoParagLayout& tqlayout, const TQDomElement // there is no way to differentiate between "I want no tabs in the parag" // and "use default from style". KoTabulatorList tabList; - TQDomElement element = tqparentElem.firstChild().toElement(); + TQDomElement element = parentElem.firstChild().toElement(); for ( ; !element.isNull() ; element = element.nextSibling().toElement() ) { if ( element.tagName() == "TABULATOR" ) @@ -173,7 +173,7 @@ void KoParagLayout::loadParagLayout( KoParagLayout& tqlayout, const TQDomElement qHeapSort( tabList ); tqlayout.setTabList( tabList ); tqlayout.tqalignment = TQt::AlignAuto; - element = tqparentElem.namedItem( "FLOW" ).toElement(); // Flow is what is now called tqalignment internally + element = parentElem.namedItem( "FLOW" ).toElement(); // Flow is what is now called tqalignment internally if ( !element.isNull() ) { TQString flow = element.attribute( "align" ); // KWord-1.0 DTD @@ -203,32 +203,32 @@ void KoParagLayout::loadParagLayout( KoParagLayout& tqlayout, const TQDomElement if ( docVersion < 2 ) { - element = tqparentElem.namedItem( "OHEAD" ).toElement(); // used by KWord-0.8 + element = parentElem.namedItem( "OHEAD" ).toElement(); // used by KWord-0.8 if ( !element.isNull() ) tqlayout.margins[TQStyleSheetItem::MarginTop] = getAttribute( element, "pt", 0.0 ); - element = tqparentElem.namedItem( "OFOOT" ).toElement(); // used by KWord-0.8 + element = parentElem.namedItem( "OFOOT" ).toElement(); // used by KWord-0.8 if ( !element.isNull() ) tqlayout.margins[TQStyleSheetItem::MarginBottom] = getAttribute( element, "pt", 0.0 ); - element = tqparentElem.namedItem( "IFIRST" ).toElement(); // used by KWord-0.8 + element = parentElem.namedItem( "IFIRST" ).toElement(); // used by KWord-0.8 if ( !element.isNull() ) tqlayout.margins[TQStyleSheetItem::MarginFirstLine] = getAttribute( element, "pt", 0.0 ); - element = tqparentElem.namedItem( "ILEFT" ).toElement(); // used by KWord-0.8 + element = parentElem.namedItem( "ILEFT" ).toElement(); // used by KWord-0.8 if ( !element.isNull() ) tqlayout.margins[TQStyleSheetItem::MarginLeft] = getAttribute( element, "pt", 0.0 ); } // KWord-1.0 DTD - element = tqparentElem.namedItem( "INDENTS" ).toElement(); + element = parentElem.namedItem( "INDENTS" ).toElement(); if ( !element.isNull() ) { tqlayout.margins[TQStyleSheetItem::MarginFirstLine] = getAttribute( element, "first", 0.0 ); tqlayout.margins[TQStyleSheetItem::MarginLeft] = getAttribute( element, "left", 0.0 ); tqlayout.margins[TQStyleSheetItem::MarginRight] = getAttribute( element, "right", 0.0 ); } - element = tqparentElem.namedItem( "OFFSETS" ).toElement(); + element = parentElem.namedItem( "OFFSETS" ).toElement(); if ( !element.isNull() ) { tqlayout.margins[TQStyleSheetItem::MarginTop] = getAttribute( element, "before", 0.0 ); @@ -237,7 +237,7 @@ void KoParagLayout::loadParagLayout( KoParagLayout& tqlayout, const TQDomElement if ( docVersion < 2 ) { - element = tqparentElem.namedItem( "LINESPACE" ).toElement(); // used by KWord-0.8 + element = parentElem.namedItem( "LINESPACE" ).toElement(); // used by KWord-0.8 if ( !element.isNull() ) { tqlayout.lineSpacingType = KoParagLayout::LS_CUSTOM; @@ -245,7 +245,7 @@ void KoParagLayout::loadParagLayout( KoParagLayout& tqlayout, const TQDomElement } } - element = tqparentElem.namedItem( "LINESPACING" ).toElement(); // KWord-1.0 DTD + element = parentElem.namedItem( "LINESPACING" ).toElement(); // KWord-1.0 DTD if ( !element.isNull() ) { //compatibility with koffice 1.1 @@ -307,7 +307,7 @@ void KoParagLayout::loadParagLayout( KoParagLayout& tqlayout, const TQDomElement } int pageBreaking = 0; - element = tqparentElem.namedItem( "PAGEBREAKING" ).toElement(); + element = parentElem.namedItem( "PAGEBREAKING" ).toElement(); if ( !element.isNull() ) { if ( element.attribute( "linesTogether" ) == "true" ) @@ -319,37 +319,37 @@ void KoParagLayout::loadParagLayout( KoParagLayout& tqlayout, const TQDomElement } if ( docVersion < 2 ) { - element = tqparentElem.namedItem( "HARDBRK" ).toElement(); // KWord-0.8 + element = parentElem.namedItem( "HARDBRK" ).toElement(); // KWord-0.8 if ( !element.isNull() ) pageBreaking |= KoParagLayout::HardFrameBreakBefore; } tqlayout.pageBreaking = pageBreaking; - element = tqparentElem.namedItem( "LEFTBORDER" ).toElement(); + element = parentElem.namedItem( "LEFTBORDER" ).toElement(); if ( !element.isNull() ) tqlayout.leftBorder = KoBorder::loadBorder( element ); else tqlayout.leftBorder.setPenWidth(0); - element = tqparentElem.namedItem( "RIGHTBORDER" ).toElement(); + element = parentElem.namedItem( "RIGHTBORDER" ).toElement(); if ( !element.isNull() ) tqlayout.rightBorder = KoBorder::loadBorder( element ); else tqlayout.rightBorder.setPenWidth(0); - element = tqparentElem.namedItem( "TOPBORDER" ).toElement(); + element = parentElem.namedItem( "TOPBORDER" ).toElement(); if ( !element.isNull() ) tqlayout.topBorder = KoBorder::loadBorder( element ); else tqlayout.topBorder.setPenWidth(0); - element = tqparentElem.namedItem( "BOTTOMBORDER" ).toElement(); + element = parentElem.namedItem( "BOTTOMBORDER" ).toElement(); if ( !element.isNull() ) tqlayout.bottomBorder = KoBorder::loadBorder( element ); else tqlayout.bottomBorder.setPenWidth(0); - element = tqparentElem.namedItem( "COUNTER" ).toElement(); + element = parentElem.namedItem( "COUNTER" ).toElement(); if ( !element.isNull() ) { tqlayout.counter = new KoParagCounter; @@ -357,7 +357,7 @@ void KoParagLayout::loadParagLayout( KoParagLayout& tqlayout, const TQDomElement } // Compatibility with KOffice-1.2 - element = tqparentElem.namedItem( "SHADOW" ).toElement(); + element = parentElem.namedItem( "SHADOW" ).toElement(); if ( !element.isNull() && element.hasAttribute("direction") ) { int shadowDistance = element.attribute("distance").toInt(); @@ -658,19 +658,19 @@ void KoParagLayout::loadOasisParagLayout( KoParagLayout& tqlayout, KoOasisContex } } -void KoParagLayout::saveParagLayout( TQDomElement & tqparentElem, int tqalignment ) const +void KoParagLayout::saveParagLayout( TQDomElement & parentElem, int tqalignment ) const { const KoParagLayout& tqlayout = *this; // code moved from somewhere else;) - TQDomDocument doc = tqparentElem.ownerDocument(); + TQDomDocument doc = parentElem.ownerDocument(); TQDomElement element = doc.createElement( "NAME" ); - tqparentElem.appendChild( element ); + parentElem.appendChild( element ); if ( tqlayout.style ) element.setAttribute( "value", tqlayout.style->displayName() ); //else // kdWarning() << "KoParagLayout::saveParagLayout: style==0!" << endl; element = doc.createElement( "FLOW" ); - tqparentElem.appendChild( element ); + parentElem.appendChild( element ); element.setAttribute( "align", tqalignment==TQt::AlignRight ? "right" : tqalignment==TQt::AlignHCenter ? "center" : @@ -688,7 +688,7 @@ void KoParagLayout::saveParagLayout( TQDomElement & tqparentElem, int tqalignmen tqlayout.margins[TQStyleSheetItem::MarginRight] != 0 ) { element = doc.createElement( "INDENTS" ); - tqparentElem.appendChild( element ); + parentElem.appendChild( element ); if ( tqlayout.margins[TQStyleSheetItem::MarginFirstLine] != 0 ) element.setAttribute( "first", tqlayout.margins[TQStyleSheetItem::MarginFirstLine] ); if ( tqlayout.margins[TQStyleSheetItem::MarginLeft] != 0 ) @@ -701,7 +701,7 @@ void KoParagLayout::saveParagLayout( TQDomElement & tqparentElem, int tqalignmen tqlayout.margins[TQStyleSheetItem::MarginBottom] != 0 ) { element = doc.createElement( "OFFSETS" ); - tqparentElem.appendChild( element ); + parentElem.appendChild( element ); if ( tqlayout.margins[TQStyleSheetItem::MarginTop] != 0 ) element.setAttribute( "before", tqlayout.margins[TQStyleSheetItem::MarginTop] ); if ( tqlayout.margins[TQStyleSheetItem::MarginBottom] != 0 ) @@ -710,7 +710,7 @@ void KoParagLayout::saveParagLayout( TQDomElement & tqparentElem, int tqalignmen if ( tqlayout.lineSpacingType != LS_SINGLE ) { element = doc.createElement( "LINESPACING" ); - tqparentElem.appendChild( element ); + parentElem.appendChild( element ); if ( tqlayout.lineSpacingType == KoParagLayout::LS_ONEANDHALF ) { element.setAttribute( "type", "oneandhalf" ); element.setAttribute( "value", "oneandhalf" ); //compatibility with koffice 1.2 @@ -747,7 +747,7 @@ void KoParagLayout::saveParagLayout( TQDomElement & tqparentElem, int tqalignmen if ( tqlayout.pageBreaking != 0 ) { element = doc.createElement( "PAGEBREAKING" ); - tqparentElem.appendChild( element ); + parentElem.appendChild( element ); if ( tqlayout.pageBreaking & KoParagLayout::KeepLinesTogether ) element.setAttribute( "linesTogether", "true" ); if ( tqlayout.pageBreaking & KoParagLayout::HardFrameBreakBefore ) @@ -759,31 +759,31 @@ void KoParagLayout::saveParagLayout( TQDomElement & tqparentElem, int tqalignmen if ( tqlayout.leftBorder.penWidth() > 0 ) { element = doc.createElement( "LEFTBORDER" ); - tqparentElem.appendChild( element ); + parentElem.appendChild( element ); tqlayout.leftBorder.save( element ); } if ( tqlayout.rightBorder.penWidth() > 0 ) { element = doc.createElement( "RIGHTBORDER" ); - tqparentElem.appendChild( element ); + parentElem.appendChild( element ); tqlayout.rightBorder.save( element ); } if ( tqlayout.topBorder.penWidth() > 0 ) { element = doc.createElement( "TOPBORDER" ); - tqparentElem.appendChild( element ); + parentElem.appendChild( element ); tqlayout.topBorder.save( element ); } if ( tqlayout.bottomBorder.penWidth() > 0 ) { element = doc.createElement( "BOTTOMBORDER" ); - tqparentElem.appendChild( element ); + parentElem.appendChild( element ); tqlayout.bottomBorder.save( element ); } if ( tqlayout.counter && tqlayout.counter->numbering() != KoParagCounter::NUM_NONE ) { element = doc.createElement( "COUNTER" ); - tqparentElem.appendChild( element ); + parentElem.appendChild( element ); if ( tqlayout.counter ) tqlayout.counter->save( element ); } @@ -793,7 +793,7 @@ void KoParagLayout::saveParagLayout( TQDomElement & tqparentElem, int tqalignmen for ( ; it != tabList.end() ; it++ ) { element = doc.createElement( "TABULATOR" ); - tqparentElem.appendChild( element ); + parentElem.appendChild( element ); element.setAttribute( "type", (*it).type ); element.setAttribute( "ptpos", (*it).ptPos ); element.setAttribute( "filling", (*it).filling ); |