summaryrefslogtreecommitdiffstats
path: root/filters/liboofilter/ooutils.cc
diff options
context:
space:
mode:
Diffstat (limited to 'filters/liboofilter/ooutils.cc')
-rw-r--r--filters/liboofilter/ooutils.cc50
1 files changed, 25 insertions, 25 deletions
diff --git a/filters/liboofilter/ooutils.cc b/filters/liboofilter/ooutils.cc
index 0e023618..9a4ac58b 100644
--- a/filters/liboofilter/ooutils.cc
+++ b/filters/liboofilter/ooutils.cc
@@ -92,7 +92,7 @@ bool OoUtils::parseBorder(const TQString & tag, double * width, int * style, TQC
return true;
}
-void OoUtils::importIndents( TQDomElement& tqparentElement, const KoStyleStack& styleStack )
+void OoUtils::importIndents( TQDomElement& parentElement, const KoStyleStack& styleStack )
{
if ( styleStack.hasAttributeNS( ooNS::fo, "margin-left" ) || // 3.11.19
styleStack.hasAttributeNS( ooNS::fo, "margin-right" ) )
@@ -111,19 +111,19 @@ void OoUtils::importIndents( TQDomElement& tqparentElement, const KoStyleStack&
if ( marginLeft != 0 || marginRight != 0 || first != 0 )
{
- TQDomElement indent = tqparentElement.ownerDocument().createElement( "INDENTS" );
+ TQDomElement indent = parentElement.ownerDocument().createElement( "INDENTS" );
if( marginLeft != 0 )
indent.setAttribute( "left", marginLeft );
if( marginRight != 0 )
indent.setAttribute( "right", marginRight );
if( first != 0 )
indent.setAttribute( "first", first );
- tqparentElement.appendChild( indent );
+ parentElement.appendChild( indent );
}
}
}
-void OoUtils::importLineSpacing( TQDomElement& tqparentElement, const KoStyleStack& styleStack )
+void OoUtils::importLineSpacing( TQDomElement& parentElement, const KoStyleStack& styleStack )
{
if( styleStack.hasAttributeNS( ooNS::fo, "line-height") )
{
@@ -131,7 +131,7 @@ void OoUtils::importLineSpacing( TQDomElement& tqparentElement, const KoStyleSta
TQString value = styleStack.attributeNS( ooNS::fo, "line-height" ); // 3.11.1
if ( value != "normal" )
{
- TQDomElement lineSpacing = tqparentElement.ownerDocument().createElement( "LINESPACING" );
+ TQDomElement lineSpacing = parentElement.ownerDocument().createElement( "LINESPACING" );
if ( value.endsWith("%" ) )
{
@@ -153,7 +153,7 @@ void OoUtils::importLineSpacing( TQDomElement& tqparentElement, const KoStyleSta
kdWarning(30519) << "Unhandled value for fo:line-height: " << value << endl;
lineSpacing.setAttribute("type","single"); // fallback
}
- tqparentElement.appendChild( lineSpacing );
+ parentElement.appendChild( lineSpacing );
}
}
// Line-height-at-least is mutually exclusive with line-height
@@ -165,10 +165,10 @@ void OoUtils::importLineSpacing( TQDomElement& tqparentElement, const KoStyleSta
// Did we make the wrong choice in kotext?
//kdWarning(30519) << "Unimplemented support for style:line-height-at-least: " << value << endl;
// Well let's see if this makes a big difference.
- TQDomElement lineSpacing = tqparentElement.ownerDocument().createElement("LINESPACING");
+ TQDomElement lineSpacing = parentElement.ownerDocument().createElement("LINESPACING");
lineSpacing.setAttribute("type", "atleast");
lineSpacing.setAttribute("spacingvalue", KoUnit::parseValue(value));
- tqparentElement.appendChild(lineSpacing);
+ parentElement.appendChild(lineSpacing);
}
// Line-spacing is mutually exclusive with line-height and line-height-at-least
else if ( styleStack.hasAttributeNS( ooNS::style, "line-spacing") ) // 3.11.3
@@ -176,16 +176,16 @@ void OoUtils::importLineSpacing( TQDomElement& tqparentElement, const KoStyleSta
double value = KoUnit::parseValue( styleStack.attributeNS( ooNS::style, "line-spacing" ) );
if ( value != 0.0 )
{
- TQDomElement lineSpacing = tqparentElement.ownerDocument().createElement( "LINESPACING" );
+ TQDomElement lineSpacing = parentElement.ownerDocument().createElement( "LINESPACING" );
lineSpacing.setAttribute( "type", "custom" );
lineSpacing.setAttribute( "spacingvalue", value );
- tqparentElement.appendChild( lineSpacing );
+ parentElement.appendChild( lineSpacing );
}
}
}
-void OoUtils::importTopBottomMargin( TQDomElement& tqparentElement, const KoStyleStack& styleStack )
+void OoUtils::importTopBottomMargin( TQDomElement& parentElement, const KoStyleStack& styleStack )
{
if( styleStack.hasAttributeNS( ooNS::fo, "margin-top") || // 3.11.22
styleStack.hasAttributeNS( ooNS::fo, "margin-bottom"))
@@ -194,17 +194,17 @@ void OoUtils::importTopBottomMargin( TQDomElement& tqparentElement, const KoStyl
double mbottom = KoUnit::parseValue( styleStack.attributeNS( ooNS::fo, "margin-bottom" ) );
if( mtop != 0 || mbottom != 0 )
{
- TQDomElement offset = tqparentElement.ownerDocument().createElement( "OFFSETS" );
+ TQDomElement offset = parentElement.ownerDocument().createElement( "OFFSETS" );
if( mtop != 0 )
offset.setAttribute( "before", mtop );
if( mbottom != 0 )
offset.setAttribute( "after", mbottom );
- tqparentElement.appendChild( offset );
+ parentElement.appendChild( offset );
}
}
}
-void OoUtils::importTabulators( TQDomElement& tqparentElement, const KoStyleStack& styleStack )
+void OoUtils::importTabulators( TQDomElement& parentElement, const KoStyleStack& styleStack )
{
if ( !styleStack.hasChildNodeNS( ooNS::style, "tab-stops" ) ) // 3.11.10
return;
@@ -216,7 +216,7 @@ void OoUtils::importTabulators( TQDomElement& tqparentElement, const KoStyleStac
Q_ASSERT( tabStop.tagName() == "style:tab-stop" );
TQString type = tabStop.attributeNS( ooNS::style, "type", TQString() ); // left, right, center or char
- TQDomElement elem = tqparentElement.ownerDocument().createElement( "TABULATOR" );
+ TQDomElement elem = parentElement.ownerDocument().createElement( "TABULATOR" );
int kOfficeType = 0;
if ( type == "left" )
kOfficeType = 0;
@@ -255,12 +255,12 @@ void OoUtils::importTabulators( TQDomElement& tqparentElement, const KoStyleStac
}
elem.setAttribute( "filling", filling );
}
- tqparentElement.appendChild( elem );
+ parentElement.appendChild( elem );
}
}
-void OoUtils::importBorders( TQDomElement& tqparentElement, const KoStyleStack& styleStack )
+void OoUtils::importBorders( TQDomElement& parentElement, const KoStyleStack& styleStack )
{
if (styleStack.hasAttributeNS( ooNS::fo, "border","left"))
{
@@ -269,7 +269,7 @@ void OoUtils::importBorders( TQDomElement& tqparentElement, const KoStyleStack&
TQColor color;
if (OoUtils::parseBorder(styleStack.attributeNS( ooNS::fo, "border", "left"), &width, &style, &color))
{
- TQDomElement lbElem = tqparentElement.ownerDocument().createElement("LEFTBORDER");
+ TQDomElement lbElem = parentElement.ownerDocument().createElement("LEFTBORDER");
lbElem.setAttribute("width", width);
lbElem.setAttribute("style", style);
if (color.isValid()) {
@@ -277,7 +277,7 @@ void OoUtils::importBorders( TQDomElement& tqparentElement, const KoStyleStack&
lbElem.setAttribute("green", color.green());
lbElem.setAttribute("blue", color.blue());
}
- tqparentElement.appendChild(lbElem);
+ parentElement.appendChild(lbElem);
}
}
@@ -288,7 +288,7 @@ void OoUtils::importBorders( TQDomElement& tqparentElement, const KoStyleStack&
TQColor color;
if (OoUtils::parseBorder(styleStack.attributeNS( ooNS::fo, "border", "right"), &width, &style, &color))
{
- TQDomElement lbElem = tqparentElement.ownerDocument().createElement("RIGHTBORDER");
+ TQDomElement lbElem = parentElement.ownerDocument().createElement("RIGHTBORDER");
lbElem.setAttribute("width", width);
lbElem.setAttribute("style", style);
if (color.isValid()) {
@@ -296,7 +296,7 @@ void OoUtils::importBorders( TQDomElement& tqparentElement, const KoStyleStack&
lbElem.setAttribute("green", color.green());
lbElem.setAttribute("blue", color.blue());
}
- tqparentElement.appendChild(lbElem);
+ parentElement.appendChild(lbElem);
}
}
@@ -307,7 +307,7 @@ void OoUtils::importBorders( TQDomElement& tqparentElement, const KoStyleStack&
TQColor color;
if (OoUtils::parseBorder(styleStack.attributeNS( ooNS::fo, "border", "top"), &width, &style, &color))
{
- TQDomElement lbElem = tqparentElement.ownerDocument().createElement("TOPBORDER");
+ TQDomElement lbElem = parentElement.ownerDocument().createElement("TOPBORDER");
lbElem.setAttribute("width", width);
lbElem.setAttribute("style", style);
if (color.isValid()) {
@@ -315,7 +315,7 @@ void OoUtils::importBorders( TQDomElement& tqparentElement, const KoStyleStack&
lbElem.setAttribute("green", color.green());
lbElem.setAttribute("blue", color.blue());
}
- tqparentElement.appendChild(lbElem);
+ parentElement.appendChild(lbElem);
}
}
@@ -326,7 +326,7 @@ void OoUtils::importBorders( TQDomElement& tqparentElement, const KoStyleStack&
TQColor color;
if (OoUtils::parseBorder(styleStack.attributeNS( ooNS::fo, "border", "bottom"), &width, &style, &color))
{
- TQDomElement lbElem = tqparentElement.ownerDocument().createElement("BOTTOMBORDER");
+ TQDomElement lbElem = parentElement.ownerDocument().createElement("BOTTOMBORDER");
lbElem.setAttribute("width", width);
lbElem.setAttribute("style", style);
if (color.isValid()) {
@@ -334,7 +334,7 @@ void OoUtils::importBorders( TQDomElement& tqparentElement, const KoStyleStack&
lbElem.setAttribute("green", color.green());
lbElem.setAttribute("blue", color.blue());
}
- tqparentElement.appendChild(lbElem);
+ parentElement.appendChild(lbElem);
}
}
}