Commit cf64996f authored by David Faure's avatar David Faure
Browse files

Forwardport: pass QDomNode parent by reference

svn path=/trunk/koffice/; revision=547657
parent 8dea6122
......@@ -153,7 +153,7 @@ QDomElement BasicElement::getElementDom( QDomDocument& doc)
}
void BasicElement::writeMathML( QDomDocument& doc, QDomNode parent, bool /*oasisFormat*/ )
void BasicElement::writeMathML( QDomDocument& doc, QDomNode& parent, bool /*oasisFormat*/ )
{
parent.appendChild( doc.createComment( QString( "MathML Error in %1" )
.arg( getTagName() ) ) );
......
......@@ -359,7 +359,7 @@ public:
/**
* Same as above, just MathML.
*/
virtual void writeMathML( QDomDocument& doc, QDomNode parent, bool oasisFormat = false );
virtual void writeMathML( QDomDocument& doc, QDomNode& parent, bool oasisFormat = false );
/**
* Set this element attribute, build children and
......
......@@ -189,7 +189,7 @@ bool SingleContentElement::readContentFromDom(QDomNode& node)
return true;
}
void SingleContentElement::writeMathML( QDomDocument& doc, QDomNode parent, bool oasisFormat )
void SingleContentElement::writeMathML( QDomDocument& doc, QDomNode& parent, bool oasisFormat )
{
content->writeMathML( doc, parent, oasisFormat );
}
......@@ -454,7 +454,7 @@ QString BracketElement::formulaString()
return "(" + getContent()->formulaString() + ")";
}
void BracketElement::writeMathML( QDomDocument& doc, QDomNode parent, bool oasisFormat )
void BracketElement::writeMathML( QDomDocument& doc, QDomNode& parent, bool oasisFormat )
{
QDomElement de = doc.createElement( oasisFormat ? "math:mfenced" : "mfenced" );
if ( left->getType() != LeftRoundBracket ||
......@@ -553,7 +553,7 @@ QString OverlineElement::formulaString()
return getContent()->formulaString();
}
void OverlineElement::writeMathML( QDomDocument& doc, QDomNode parent, bool oasisFormat )
void OverlineElement::writeMathML( QDomDocument& doc, QDomNode& parent, bool oasisFormat )
{
QDomElement de = doc.createElement( oasisFormat ? "math:mover" : "mover" );
SingleContentElement::writeMathML( doc, de, oasisFormat );
......@@ -653,7 +653,7 @@ QString UnderlineElement::formulaString()
return getContent()->formulaString();
}
void UnderlineElement::writeMathML( QDomDocument& doc, QDomNode parent, bool oasisFormat )
void UnderlineElement::writeMathML( QDomDocument& doc, QDomNode& parent, bool oasisFormat )
{
QDomElement de = doc.createElement( oasisFormat ? "math:munder" : "munder" );
SingleContentElement::writeMathML( doc, de, oasisFormat );
......
......@@ -121,7 +121,7 @@ public:
*/
virtual void selectChild(FormulaCursor* cursor, BasicElement* child);
virtual void writeMathML( QDomDocument& doc, QDomNode parent, bool oasisFormat = false );
virtual void writeMathML( QDomDocument& doc, QDomNode& parent, bool oasisFormat = false );
protected:
......@@ -207,7 +207,7 @@ public:
ContextStyle::IndexStyle istyle,
const LuPixelPoint& parentOrigin );
virtual void writeMathML( QDomDocument& doc, QDomNode parent, bool oasisFormat = false );
virtual void writeMathML( QDomDocument& doc, QDomNode& parent, bool oasisFormat = false );
protected:
......@@ -301,7 +301,7 @@ public:
virtual QString formulaString();
virtual void writeMathML( QDomDocument& doc, QDomNode parent, bool oasisFormat = false );
virtual void writeMathML( QDomDocument& doc, QDomNode& parent, bool oasisFormat = false );
protected:
......@@ -364,7 +364,7 @@ public:
virtual QString formulaString();
virtual void writeMathML( QDomDocument& doc, QDomNode parent, bool oasisFormat = false );
virtual void writeMathML( QDomDocument& doc, QDomNode& parent, bool oasisFormat = false );
protected:
......
......@@ -312,7 +312,7 @@ QString FormulaElement::toLatex()
return inherited::toLatex(); //Consider $$ sorround
}
void FormulaElement::writeMathML( QDomDocument& doc, QDomNode parent, bool oasisFormat )
void FormulaElement::writeMathML( QDomDocument& doc, QDomNode& parent, bool oasisFormat )
{
QDomElement de;
if ( !oasisFormat )
......
......@@ -169,7 +169,7 @@ public:
virtual KCommand* input( Container* container, QKeyEvent* event );
virtual void writeMathML( QDomDocument& doc, QDomNode parent, bool oasisFormat = false );
virtual void writeMathML( QDomDocument& doc, QDomNode& parent, bool oasisFormat = false );
/**
* Appends our attributes to the dom element.
......
......@@ -460,7 +460,7 @@ QString FractionElement::formulaString()
return "(" + numerator->formulaString() + ")/(" + denominator->formulaString() + ")";
}
void FractionElement::writeMathML( QDomDocument& doc, QDomNode parent, bool oasisFormat )
void FractionElement::writeMathML( QDomDocument& doc, QDomNode& parent, bool oasisFormat )
{
QDomElement de = doc.createElement( oasisFormat ? "math:mfrac": "mfrac" );
if ( !withLine ) // why is this no function?
......
......@@ -177,7 +177,7 @@ public:
virtual QString formulaString();
virtual void writeMathML( QDomDocument& doc, QDomNode parent, bool oasisFormat = false );
virtual void writeMathML( QDomDocument& doc, QDomNode& parent, bool oasisFormat = false );
protected:
......
......@@ -1373,7 +1373,7 @@ QString IndexElement::formulaString()
return index;
}
void IndexElement::writeMathML( QDomDocument& doc, QDomNode parent, bool oasisFormat )
void IndexElement::writeMathML( QDomDocument& doc, QDomNode& parent, bool oasisFormat )
{
QDomElement de;
QDomElement uo;
......
......@@ -263,7 +263,7 @@ public:
// the upper right index is the only one we show
virtual QString formulaString();
virtual void writeMathML( QDomDocument& doc, QDomNode parent, bool oasisFormat = false );
virtual void writeMathML( QDomDocument& doc, QDomNode& parent, bool oasisFormat = false );
protected:
......
......@@ -874,7 +874,7 @@ SequenceElement* MatrixElement::elementAt(int row, int column)
}
void MatrixElement::writeMathML( QDomDocument& doc, QDomNode parent, bool oasisFormat )
void MatrixElement::writeMathML( QDomDocument& doc, QDomNode& parent, bool oasisFormat )
{
QDomElement de = doc.createElement( oasisFormat ? "math:mtable" : "mtable" );
QDomElement row;
......@@ -956,7 +956,7 @@ public:
/// Return the position of tab i.
int tabPos( int i );
virtual void writeMathML( QDomDocument& doc, QDomNode parent, bool oasisFormat = false );
virtual void writeMathML( QDomDocument& doc, QDomNode& parent, bool oasisFormat = false );
private:
......@@ -1220,7 +1220,7 @@ int MultilineSequenceElement::tabPos( int i )
void MultilineSequenceElement::writeMathML( QDomDocument& doc,
QDomNode parent, bool oasisFormat )
QDomNode& parent, bool oasisFormat )
{
// parent is required to be a <mtr> tag
......@@ -1697,7 +1697,7 @@ void MultilineElement::writeDom(QDomElement element)
}
}
void MultilineElement::writeMathML( QDomDocument& doc, QDomNode parent, bool oasisFormat )
void MultilineElement::writeMathML( QDomDocument& doc, QDomNode& parent, bool oasisFormat )
{
QDomElement de = doc.createElement( oasisFormat ? "math:mtable" : "mtable" );
QDomElement row; QDomElement cell;
......
......@@ -192,7 +192,7 @@ public:
SequenceElement* elementAt( int row, int column );
virtual void writeMathML( QDomDocument& doc, QDomNode parent, bool oasisFormat = false );
virtual void writeMathML( QDomDocument& doc, QDomNode& parent, bool oasisFormat = false );
protected:
......@@ -357,7 +357,7 @@ public:
virtual QString formulaString();
virtual void writeMathML( QDomDocument& doc, QDomNode parent, bool oasisFormat = false );
virtual void writeMathML( QDomDocument& doc, QDomNode& parent, bool oasisFormat = false );
protected:
......
......@@ -604,7 +604,7 @@ QString RootElement::formulaString()
return "sqrt(" + content->formulaString() + ")";
}
void RootElement::writeMathML( QDomDocument& doc, QDomNode parent, bool oasisFormat )
void RootElement::writeMathML( QDomDocument& doc, QDomNode& parent, bool oasisFormat )
{
QDomElement de;
......
......@@ -178,7 +178,7 @@ public:
virtual QString formulaString();
virtual void writeMathML( QDomDocument& doc, QDomNode parent, bool oasisFormat = false );
virtual void writeMathML( QDomDocument& doc, QDomNode& parent, bool oasisFormat = false );
protected:
......
......@@ -1452,7 +1452,7 @@ QString SequenceElement::formulaString()
}
void SequenceElement::writeMathML( QDomDocument& doc, QDomNode parent, bool oasisFormat )
void SequenceElement::writeMathML( QDomDocument& doc, QDomNode& parent, bool oasisFormat )
{
QDomElement de = doc.createElement( oasisFormat ? "math:mrow" : "mrow" );
......@@ -1699,7 +1699,7 @@ bool NameSequence::isValidSelection( FormulaCursor* cursor )
return sequence->onlyTextSelected( cursor );
}
void NameSequence::writeMathML( QDomDocument& doc, QDomNode parent,bool oasisFormat )
void NameSequence::writeMathML( QDomDocument& doc, QDomNode& parent,bool oasisFormat )
{
QDomElement de = doc.createElement( oasisFormat ? "math:mi" : "mi" );
QString value;
......
......@@ -300,7 +300,7 @@ public:
virtual QString formulaString();
virtual void writeMathML( QDomDocument& doc, QDomNode parent, bool oasisFormat = false );
virtual void writeMathML( QDomDocument& doc, QDomNode& parent, bool oasisFormat = false );
/**
* @returns the child at position i.
......@@ -537,7 +537,7 @@ public:
*/
static bool isValidSelection( FormulaCursor* cursor );
virtual void writeMathML( QDomDocument& doc, QDomNode parent, bool oasisFormat = false );
virtual void writeMathML( QDomDocument& doc, QDomNode& parent, bool oasisFormat = false );
protected:
......
......@@ -163,7 +163,7 @@ bool SpaceElement::readContentFromDom(QDomNode& node)
return BasicElement::readContentFromDom( node );
}
void SpaceElement::writeMathML( QDomDocument& doc, QDomNode parent, bool oasisFormat )
void SpaceElement::writeMathML( QDomDocument& doc, QDomNode& parent, bool oasisFormat )
{
QDomElement de = doc.createElement( oasisFormat ? "math:mspace" : "mspace" );
......
......@@ -97,7 +97,7 @@ public:
*/
virtual QString toLatex();
virtual void writeMathML( QDomDocument& doc, QDomNode parent, bool oasisFormat = false );
virtual void writeMathML( QDomDocument& doc, QDomNode& parent, bool oasisFormat = false );
protected:
......
......@@ -847,7 +847,7 @@ QString SymbolElement::formulaString()
return sym + ")";
}
void SymbolElement::writeMathML( QDomDocument& doc, QDomNode parent, bool oasisFormat )
void SymbolElement::writeMathML( QDomDocument& doc, QDomNode& parent, bool oasisFormat )
{
QDomElement de = doc.createElement( oasisFormat ? "math:mrow" : "mrow" );
QDomElement mo = doc.createElement( oasisFormat ? "math:mo" : "mo" );
......
......@@ -224,7 +224,7 @@ public:
virtual QString formulaString();
virtual void writeMathML( QDomDocument& doc, QDomNode parent, bool oasisFormat = false );
virtual void writeMathML( QDomDocument& doc, QDomNode& parent, bool oasisFormat = false );
protected:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment