diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-07-09 02:23:29 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-07-09 02:23:29 +0000 |
commit | 7c71ab86d1f7e387fc3df63b48df07231f111862 (patch) | |
tree | 30ba2d2f840ff5fd458b6113e9c3f2e8a71d510d /filters/kword | |
parent | afbfdc507bfaafc8824a9808311d57a9ece87510 (diff) | |
download | koffice-7c71ab86d1f7e387fc3df63b48df07231f111862.tar.gz koffice-7c71ab86d1f7e387fc3df63b48df07231f111862.zip |
Remove the tq in front of these incorrectly TQt4-converted methods/data members:
tqrepaint[...]
tqinvalidate[...]
tqparent[...]
tqmask[...]
tqlayout[...]
tqalignment[...]
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1240522 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'filters/kword')
58 files changed, 282 insertions, 282 deletions
diff --git a/filters/kword/abiword/ImportFormatting.cc b/filters/kword/abiword/ImportFormatting.cc index 14a059eb..1687e958 100644 --- a/filters/kword/abiword/ImportFormatting.cc +++ b/filters/kword/abiword/ImportFormatting.cc @@ -186,14 +186,14 @@ void AddFormat(TQDomElement& formatElementOut, StackItem* stackItem, TQDomDocume } } -void AddLayout(const TQString& strStyleName, TQDomElement& tqlayoutElement, +void AddLayout(const TQString& strStyleName, TQDomElement& layoutElement, StackItem* stackItem, TQDomDocument& mainDocument, const AbiPropsMap& abiPropsMap, const int level, const bool isStyle) { TQDomElement element; element=mainDocument.createElement("NAME"); element.setAttribute("value",strStyleName); - tqlayoutElement.appendChild(element); + layoutElement.appendChild(element); TQString strFollowing=abiPropsMap["followedby"].getValue(); TQDomElement followingElement=mainDocument.createElement("FOLLOWING"); @@ -206,7 +206,7 @@ void AddLayout(const TQString& strStyleName, TQDomElement& tqlayoutElement, { // We are a style, so we need a default followingElement.setAttribute("name","Normal"); - tqlayoutElement.appendChild(followingElement); + layoutElement.appendChild(followingElement); } // Else: we are a tqlayout, so we leave the work to KWord (from the style) } @@ -214,7 +214,7 @@ void AddLayout(const TQString& strStyleName, TQDomElement& tqlayoutElement, { // Following style is defined // TODO: we should be sure that this style is defined! - tqlayoutElement.appendChild(followingElement); + layoutElement.appendChild(followingElement); } TQString strFlow=abiPropsMap["text-align"].getValue(); @@ -227,7 +227,7 @@ void AddLayout(const TQString& strStyleName, TQDomElement& tqlayoutElement, { element.setAttribute("align","left"); } - tqlayoutElement.appendChild(element); + layoutElement.appendChild(element); int kwordDepth; int kwordNumberingType; @@ -258,7 +258,7 @@ void AddLayout(const TQString& strStyleName, TQDomElement& tqlayoutElement, element.setAttribute("bullet",64); element.setAttribute("bulletfont","Symbol"); element.setAttribute("customdef",""); - tqlayoutElement.appendChild(element); + layoutElement.appendChild(element); TQString strLeftMargin=abiPropsMap["margin-left"].getValue(); TQString strRightMargin=abiPropsMap["margin-right"].getValue(); @@ -275,7 +275,7 @@ void AddLayout(const TQString& strStyleName, TQDomElement& tqlayoutElement, element.setAttribute("right",ValueWithLengthUnit(strRightMargin)); if (!strTextIndent.isEmpty()) element.setAttribute("first",ValueWithLengthUnit(strTextIndent)); - tqlayoutElement.appendChild(element); + layoutElement.appendChild(element); } TQString strTopMargin=abiPropsMap["margin-top"].getValue(); @@ -290,7 +290,7 @@ void AddLayout(const TQString& strStyleName, TQDomElement& tqlayoutElement, element.setAttribute("after",margin_bottom); if (!strTopMargin.isEmpty()) element.setAttribute("before",margin_top); - tqlayoutElement.appendChild(element); + layoutElement.appendChild(element); } TQString strLineHeight=abiPropsMap["line-height"].getValue(); @@ -351,7 +351,7 @@ void AddLayout(const TQString& strStyleName, TQDomElement& tqlayoutElement, element.setAttribute( "spacingvalue", lineHeight ); } } - tqlayoutElement.appendChild(element); + layoutElement.appendChild(element); } TQString strTab=abiPropsMap["tabstops"].getValue(); @@ -397,12 +397,12 @@ void AddLayout(const TQString& strStyleName, TQDomElement& tqlayoutElement, element.setAttribute("type",type); element.setAttribute("filling",filling); element.setAttribute("width",width); - tqlayoutElement.appendChild(element); + layoutElement.appendChild(element); } } TQDomElement formatElementOut=mainDocument.createElement("FORMAT"); - tqlayoutElement.appendChild(formatElementOut); + layoutElement.appendChild(formatElementOut); AddFormat(formatElementOut, stackItem, mainDocument); } diff --git a/filters/kword/abiword/ImportFormatting.h b/filters/kword/abiword/ImportFormatting.h index 31b26b3f..f26f5f01 100644 --- a/filters/kword/abiword/ImportFormatting.h +++ b/filters/kword/abiword/ImportFormatting.h @@ -103,7 +103,7 @@ public: */ /** * for tables (\<table\>, \<cell\>): defines the widths of the columns. - * Be careful: we are using the shallow copy mechanism of TQt. Use TQMemArray::detach when needed to avoid modifying the tqparents + * Be careful: we are using the shallow copy mechanism of TQt. Use TQMemArray::detach when needed to avoid modifying the parents */ TQMemArray<double> m_doubleArray; }; @@ -122,7 +122,7 @@ void PopulateProperties(StackItem* stackItem, const TQString& strStyleProps, const bool allowInit); void AddFormat(TQDomElement& formatElementOut, StackItem* stackItem, TQDomDocument& mainDocument); -void AddLayout(const TQString& strStyleName, TQDomElement& tqlayoutElement, +void AddLayout(const TQString& strStyleName, TQDomElement& layoutElement, StackItem* stackItem, TQDomDocument& mainDocument, const AbiPropsMap& abiPropsMap, const int level, const bool isStyle); void AddStyle(TQDomElement& styleElement, const TQString& strStyleName, diff --git a/filters/kword/abiword/abiwordexport.cc b/filters/kword/abiword/abiwordexport.cc index 281f5d7e..c48b3c27 100644 --- a/filters/kword/abiword/abiwordexport.cc +++ b/filters/kword/abiword/abiwordexport.cc @@ -115,7 +115,7 @@ private: const FormatData& formatData); TQString textFormatToAbiProps(const TextFormatting& formatOrigin, const TextFormatting& formatData, const bool force) const; - TQString tqlayoutToCss(const LayoutData& tqlayoutOrigin, + TQString layoutToCss(const LayoutData& layoutOrigin, const LayoutData& tqlayout, const bool force) const; TQString escapeAbiWordText(const TQString& strText) const; bool makeTable(const FrameAnchor& anchor); @@ -718,12 +718,12 @@ void AbiWordWorker::processParagraphData ( const TQString ¶Text, } } -TQString AbiWordWorker::tqlayoutToCss(const LayoutData& tqlayoutOrigin, +TQString AbiWordWorker::layoutToCss(const LayoutData& layoutOrigin, const LayoutData& tqlayout, const bool force) const { TQString props; - if (force || (tqlayoutOrigin.tqalignment!=tqlayout.tqalignment)) + if (force || (layoutOrigin.tqalignment!=tqlayout.tqalignment)) { // Check if the current tqalignment is a valid one for AbiWord. if ((tqlayout.tqalignment == "left") || (tqlayout.tqalignment == "right") @@ -748,7 +748,7 @@ TQString AbiWordWorker::tqlayoutToCss(const LayoutData& tqlayoutOrigin, #if 0 // DEPRECATED! if (!tqlayout.tabulator.isEmpty() - && (force || (tqlayoutOrigin.tabulator!=tqlayout.tabulator))) + && (force || (layoutOrigin.tabulator!=tqlayout.tabulator))) { props += "tabstops:"; props += tqlayout.tabulator; @@ -756,7 +756,7 @@ TQString AbiWordWorker::tqlayoutToCss(const LayoutData& tqlayoutOrigin, } #endif if (!tqlayout.tabulatorList.isEmpty() - && (force || (tqlayoutOrigin.tabulatorList!=tqlayout.tabulatorList) )) + && (force || (layoutOrigin.tabulatorList!=tqlayout.tabulatorList) )) { props += "tabstops:"; bool first=true; @@ -790,18 +790,18 @@ TQString AbiWordWorker::tqlayoutToCss(const LayoutData& tqlayoutOrigin, } if ((tqlayout.indentLeft>=0.0) - && (force || (tqlayoutOrigin.indentLeft!=tqlayout.indentLeft))) + && (force || (layoutOrigin.indentLeft!=tqlayout.indentLeft))) { props += TQString("margin-left:%1pt; ").tqarg(tqlayout.indentLeft); } if ((tqlayout.indentRight>=0.0) - && (force || (tqlayoutOrigin.indentRight!=tqlayout.indentRight))) + && (force || (layoutOrigin.indentRight!=tqlayout.indentRight))) { props += TQString("margin-right:%1pt; ").tqarg(tqlayout.indentRight); } - if (force || (tqlayoutOrigin.indentLeft!=tqlayout.indentLeft)) + if (force || (layoutOrigin.indentLeft!=tqlayout.indentLeft)) { props += "text-indent: "; props += TQString::number(tqlayout.indentFirst); @@ -809,20 +809,20 @@ TQString AbiWordWorker::tqlayoutToCss(const LayoutData& tqlayoutOrigin, } if ((tqlayout.marginBottom>=0.0) - && ( force || ( tqlayoutOrigin.marginBottom != tqlayout.marginBottom ) ) ) + && ( force || ( layoutOrigin.marginBottom != tqlayout.marginBottom ) ) ) { props += TQString("margin-bottom:%1pt; ").tqarg(tqlayout.marginBottom); } if ((tqlayout.marginTop>=0.0) - && ( force || ( tqlayoutOrigin.marginTop != tqlayout.marginTop ) ) ) + && ( force || ( layoutOrigin.marginTop != tqlayout.marginTop ) ) ) { props += TQString("margin-top:%1pt; ").tqarg(tqlayout.marginTop); } if (force - || ( tqlayoutOrigin.lineSpacingType != tqlayout.lineSpacingType ) - || ( tqlayoutOrigin.lineSpacing != tqlayout.lineSpacing ) ) + || ( layoutOrigin.lineSpacingType != tqlayout.lineSpacingType ) + || ( layoutOrigin.lineSpacing != tqlayout.lineSpacing ) ) { switch ( tqlayout.lineSpacingType ) { @@ -881,7 +881,7 @@ TQString AbiWordWorker::tqlayoutToCss(const LayoutData& tqlayoutOrigin, } // Add all AbiWord properties collected in the <FORMAT> element - props += textFormatToAbiProps(tqlayoutOrigin.formatData.text,tqlayout.formatData.text,force); + props += textFormatToAbiProps(layoutOrigin.formatData.text,tqlayout.formatData.text,force); return props; } @@ -893,7 +893,7 @@ bool AbiWordWorker::doFullParagraph(const TQString& paraText, const LayoutData& const LayoutData& styleLayout=m_styleMap[style]; - TQString props=tqlayoutToCss(styleLayout,tqlayout,false); + TQString props=layoutToCss(styleLayout,tqlayout,false); *m_streamOut << "<p"; if (!style.isEmpty()) @@ -954,7 +954,7 @@ bool AbiWordWorker::doFullDefineStyle(LayoutData& tqlayout) *m_streamOut << "\""; } - TQString abiprops=tqlayoutToCss(tqlayout,tqlayout,true); + TQString abiprops=layoutToCss(tqlayout,tqlayout,true); const int result=abiprops.tqfindRev(";"); if (result>=0) diff --git a/filters/kword/abiword/abiwordimport.cc b/filters/kword/abiword/abiwordimport.cc index 9533d5df..2d0697ba 100644 --- a/filters/kword/abiword/abiwordimport.cc +++ b/filters/kword/abiword/abiwordimport.cc @@ -364,10 +364,10 @@ bool StartElementP(StackItem* stackItem, StackItem* stackCurrent, stackItem->pos=0; // No text characters yet // Now we populate the tqlayout - TQDomElement tqlayoutElement=mainDocument.createElement("LAYOUT"); - paragraphElementOut.appendChild(tqlayoutElement); + TQDomElement layoutElement=mainDocument.createElement("LAYOUT"); + paragraphElementOut.appendChild(layoutElement); - AddLayout(strStyle,tqlayoutElement, stackItem, mainDocument, abiPropsMap, level, false); + AddLayout(strStyle,layoutElement, stackItem, mainDocument, abiPropsMap, level, false); return true; } @@ -1114,7 +1114,7 @@ bool StructureParser::StartElementTable(StackItem* stackItem, StackItem* stackCu TQStringList widthList; widthList.split('/', attributes.value("table-column-props"), false); const uint columns = widthList.size(); - stackItem->m_doubleArray.detach(); // Be sure not to modify tqparents + stackItem->m_doubleArray.detach(); // Be sure not to modify parents stackItem->m_doubleArray.resize(columns+1); // All left positions but the last right one stackItem->m_doubleArray[0] = 0.0; TQStringList::ConstIterator it; @@ -1160,12 +1160,12 @@ bool StructureParser::StartElementTable(StackItem* stackItem, StackItem* stackCu stackItem->pos=1; // Just # // Now we populate the tqlayout - TQDomElement tqlayoutElement=mainDocument.createElement("LAYOUT"); - paragraphElementOut.appendChild(tqlayoutElement); + TQDomElement layoutElement=mainDocument.createElement("LAYOUT"); + paragraphElementOut.appendChild(layoutElement); AbiPropsMap abiPropsMap; styleDataMap.useOrCreateStyle("Normal"); // We might have to create the "Normal" style. - AddLayout("Normal", tqlayoutElement, stackItem, mainDocument, abiPropsMap, 0, false); + AddLayout("Normal", layoutElement, stackItem, mainDocument, abiPropsMap, 0, false); #else stackItem->elementType=ElementTypeIgnore; #endif diff --git a/filters/kword/ascii/ExportDialogUI.ui b/filters/kword/ascii/ExportDialogUI.ui index 2cef87d5..8f66942c 100644 --- a/filters/kword/ascii/ExportDialogUI.ui +++ b/filters/kword/ascii/ExportDialogUI.ui @@ -152,7 +152,7 @@ <tabstop>radioEndOfLineCRLF</tabstop> <tabstop>radioEndOfLineCR</tabstop> </tabstops> -<tqlayoutdefaults spacing="6" margin="11"/> +<layoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kcombobox.h</includehint> <includehint>klineedit.h</includehint> diff --git a/filters/kword/ascii/ImportDialogUI.ui b/filters/kword/ascii/ImportDialogUI.ui index a67a43c2..fd124062 100644 --- a/filters/kword/ascii/ImportDialogUI.ui +++ b/filters/kword/ascii/ImportDialogUI.ui @@ -141,7 +141,7 @@ </spacer> </vbox> </widget> -<tqlayoutdefaults spacing="6" margin="11"/> +<layoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kcombobox.h</includehint> <includehint>klineedit.h</includehint> diff --git a/filters/kword/ascii/asciiimport.cc b/filters/kword/ascii/asciiimport.cc index ceb93582..a04da78f 100644 --- a/filters/kword/ascii/asciiimport.cc +++ b/filters/kword/ascii/asciiimport.cc @@ -370,7 +370,7 @@ void ASCIIImport::sentenceConvert(TQTextStream& stream, TQDomDocument& mainDocum TQDomElement& mainFramesetElement) // Strategy: // - end a paragraph when a line ends with a point or similar punctuation. -// - search the punctuation at the end of the line, even if the sentence is quoted or in tqparentheses. +// - search the punctuation at the end of the line, even if the sentence is quoted or in parentheses. // - an empty line also ends the paragraph // TODO/FIXME: we have a little problem with empty lines. Perhaps we should not allow empty paragraphs! { @@ -471,13 +471,13 @@ void ASCIIImport::writeOutParagraph(TQDomDocument& mainDocument, paragraphElementOut.appendChild(textElement); //TQDomElement formatsPluralElementOut=mainDocument.createElement("FORMATS"); //paragraphElementOut.appendChild(formatsPluralElementOut); - TQDomElement tqlayoutElement=mainDocument.createElement("LAYOUT"); - paragraphElementOut.appendChild(tqlayoutElement); + TQDomElement layoutElement=mainDocument.createElement("LAYOUT"); + paragraphElementOut.appendChild(layoutElement); TQDomElement element; element=mainDocument.createElement("NAME"); element.setAttribute("value",name); - tqlayoutElement.appendChild(element); + layoutElement.appendChild(element); double size; element=mainDocument.createElement("INDENTS"); diff --git a/filters/kword/ascii/status.html b/filters/kword/ascii/status.html index e8af7c5d..6b53717d 100644 --- a/filters/kword/ascii/status.html +++ b/filters/kword/ascii/status.html @@ -98,7 +98,7 @@ (Recommended strategy)<br> <b>Sentence:</b><br> - a paragraph ends when a line ends with a point or similar punctuation.<br> - - the punctuation is searched at the end of the line, even if the sentence is quoted or in tqparentheses.<br> + - the punctuation is searched at the end of the line, even if the sentence is quoted or in parentheses.<br> - an empty line also ends the paragraph.<br> <b>Old Way: (similar to KOffice 1.1.x)</b><br> - a paragraph ends at an empty line.<br> diff --git a/filters/kword/html/export/ExportCss.cc b/filters/kword/html/export/ExportCss.cc index 51c4da91..057cdd86 100644 --- a/filters/kword/html/export/ExportCss.cc +++ b/filters/kword/html/export/ExportCss.cc @@ -308,12 +308,12 @@ TQString HtmlCssWorker::getStartOfListOpeningTag(const CounterData::Style typeLi return strResult; } -TQString HtmlCssWorker::tqlayoutToCss(const LayoutData& tqlayoutOrigin, +TQString HtmlCssWorker::layoutToCss(const LayoutData& layoutOrigin, const LayoutData& tqlayout, const bool force) const { TQString strLayout; - if (force || (tqlayoutOrigin.tqalignment!=tqlayout.tqalignment)) + if (force || (layoutOrigin.tqalignment!=tqlayout.tqalignment)) { if ( (tqlayout.tqalignment=="left") || (tqlayout.tqalignment== "right") || (tqlayout.tqalignment=="center") || (tqlayout.tqalignment=="justify")) @@ -331,37 +331,37 @@ TQString HtmlCssWorker::tqlayoutToCss(const LayoutData& tqlayoutOrigin, } if ((tqlayout.indentLeft>=0.0) - && (force || (tqlayoutOrigin.indentLeft!=tqlayout.indentLeft))) + && (force || (layoutOrigin.indentLeft!=tqlayout.indentLeft))) { strLayout += TQString("margin-left:%1pt; ").tqarg(tqlayout.indentLeft); } if ((tqlayout.indentRight>=0.0) - && (force || (tqlayoutOrigin.indentRight!=tqlayout.indentRight))) + && (force || (layoutOrigin.indentRight!=tqlayout.indentRight))) { strLayout += TQString("margin-right:%1pt; ").tqarg(tqlayout.indentRight); } - if (force || (tqlayoutOrigin.indentLeft!=tqlayout.indentLeft)) + if (force || (layoutOrigin.indentLeft!=tqlayout.indentLeft)) { strLayout += TQString("text-indent:%1pt; ").tqarg(tqlayout.indentFirst); } if ((tqlayout.marginBottom>=0.0) - && ( force || ( tqlayoutOrigin.marginBottom != tqlayout.marginBottom ) ) ) + && ( force || ( layoutOrigin.marginBottom != tqlayout.marginBottom ) ) ) { strLayout += TQString("margin-bottom:%1pt; ").tqarg(tqlayout.marginBottom); } if ((tqlayout.marginTop>=0.0) - && ( force || ( tqlayoutOrigin.marginTop != tqlayout.marginTop ) ) ) + && ( force || ( layoutOrigin.marginTop != tqlayout.marginTop ) ) ) { strLayout += TQString("margin-top:%1pt; ").tqarg(tqlayout.marginTop); } if (force - || ( tqlayoutOrigin.lineSpacingType != tqlayout.lineSpacingType ) - || ( tqlayoutOrigin.lineSpacing != tqlayout.lineSpacing ) ) + || ( layoutOrigin.lineSpacingType != tqlayout.lineSpacingType ) + || ( layoutOrigin.lineSpacing != tqlayout.lineSpacing ) ) { switch ( tqlayout.lineSpacingType ) { @@ -430,8 +430,8 @@ TQString HtmlCssWorker::tqlayoutToCss(const LayoutData& tqlayoutOrigin, // TODO: Konqueror/KHTML does not support "text-shadow" if (!force - && ( tqlayoutOrigin.shadowDirection == tqlayout.shadowDirection ) - && ( tqlayoutOrigin.shadowDistance == tqlayout.shadowDistance ) ) + && ( layoutOrigin.shadowDirection == tqlayout.shadowDirection ) + && ( layoutOrigin.shadowDistance == tqlayout.shadowDistance ) ) { // Do nothing! } @@ -518,7 +518,7 @@ TQString HtmlCssWorker::tqlayoutToCss(const LayoutData& tqlayoutOrigin, // TODO: borders // This must remain last, as the last property does not have a semi-colon - strLayout+=textFormatToCss(tqlayoutOrigin.formatData.text, + strLayout+=textFormatToCss(layoutOrigin.formatData.text, tqlayout.formatData.text,force); return strLayout; @@ -535,7 +535,7 @@ void HtmlCssWorker::openParagraph(const TQString& strTag, *m_streamOut << " class=\"" << escapeCssIdentifier(tqlayout.styleName); *m_streamOut << "\""; - TQString strStyle=tqlayoutToCss(styleLayout,tqlayout,false); + TQString strStyle=layoutToCss(styleLayout,tqlayout,false); if (!strStyle.isEmpty()) { *m_streamOut << " style=\"" << strStyle; @@ -689,7 +689,7 @@ bool HtmlCssWorker::doFullDefineStyle(LayoutData& tqlayout) // the style could be forced on <p> by the tqlayout. *m_streamOut << "." << escapeCssIdentifier(tqlayout.styleName); - *m_streamOut << "\n{\n " << tqlayoutToCss(tqlayout,tqlayout,true) << "\n}\n"; + *m_streamOut << "\n{\n " << layoutToCss(tqlayout,tqlayout,true) << "\n}\n"; return true; } diff --git a/filters/kword/html/export/ExportCss.h b/filters/kword/html/export/ExportCss.h index acbf20cc..358ea688 100644 --- a/filters/kword/html/export/ExportCss.h +++ b/filters/kword/html/export/ExportCss.h @@ -54,7 +54,7 @@ protected: virtual void openSpan(const FormatData& formatOrigin, const FormatData& format); virtual void closeSpan(const FormatData& formatOrigin, const FormatData& format); private: - TQString tqlayoutToCss(const LayoutData& tqlayoutOrigin,const LayoutData& tqlayout, + TQString layoutToCss(const LayoutData& layoutOrigin,const LayoutData& tqlayout, const bool force) const; TQString escapeCssIdentifier(const TQString& strText) const; TQString textFormatToCss(const TextFormatting& formatOrigin, diff --git a/filters/kword/html/export/ExportDialogUI.ui b/filters/kword/html/export/ExportDialogUI.ui index 474d2912..cbdc4fc2 100644 --- a/filters/kword/html/export/ExportDialogUI.ui +++ b/filters/kword/html/export/ExportDialogUI.ui @@ -279,7 +279,7 @@ <tabstop>radioModeLight</tabstop> <tabstop>radioModeEnhanced</tabstop> </tabstops> -<tqlayoutdefaults spacing="6" margin="11"/> +<layoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kcombobox.h</includehint> <includehint>klineedit.h</includehint> diff --git a/filters/kword/html/export/ExportFilter.cc b/filters/kword/html/export/ExportFilter.cc index 225a51ea..4a4cd64d 100644 --- a/filters/kword/html/export/ExportFilter.cc +++ b/filters/kword/html/export/ExportFilter.cc @@ -384,22 +384,22 @@ bool HtmlWorker::doFullParagraph(const TQString& paraText, if ( tqlayout.counter.numbering == CounterData::NUM_LIST ) { - const uint tqlayoutDepth=tqlayout.counter.depth+1; // Word's depth starts at 0! + const uint layoutDepth=tqlayout.counter.depth+1; // Word's depth starts at 0! const uint listDepth=m_listStack.size(); // We are in a list, but has it the right depth? - if (tqlayoutDepth>listDepth) + if (layoutDepth>listDepth) { ListInfo newList; newList.m_typeList=tqlayout.counter.style; - for (uint i=listDepth; i<tqlayoutDepth; i++) + for (uint i=listDepth; i<layoutDepth; i++) { *m_streamOut << getStartOfListOpeningTag(tqlayout.counter.style,newList.m_orderedList); m_listStack.push(newList); } } - else if (tqlayoutDepth<listDepth) + else if (layoutDepth<listDepth) { - for (uint i=listDepth; i>tqlayoutDepth; i--) + for (uint i=listDepth; i>layoutDepth; i--) { ListInfo oldList=m_listStack.pop(); if (oldList.m_orderedList) diff --git a/filters/kword/html/import/khtmlreader.cpp b/filters/kword/html/import/khtmlreader.cpp index 1df58edf..6e134e38 100644 --- a/filters/kword/html/import/khtmlreader.cpp +++ b/filters/kword/html/import/khtmlreader.cpp @@ -236,7 +236,7 @@ void KHTMLReader::parse_head(DOM::Element e) state()->tqlayout=_writer->setLayout(state()->paragraph,state()->tqlayout);\ if (!(_writer->getText(state()->paragraph).isEmpty())) \ startNewParagraph(false,false); \ - _writer->tqlayoutAttribute(state()->paragraph, #a,#b,#c); \ + _writer->layoutAttribute(state()->paragraph, #a,#b,#c); \ return true; \ } \ } @@ -317,11 +317,11 @@ void KHTMLReader::startNewParagraph(bool startnewformat, bool startnewtqlayout) TQString ct=_writer->getLayoutAttribute(state()->paragraph,"COUNTER","type"); if ((!ct.isNull()) && (ct != "0")) { - _writer->tqlayoutAttribute(state()->paragraph,"COUNTER","type","0"); - _writer->tqlayoutAttribute(state()->paragraph,"COUNTER","numberingtype","0"); - _writer->tqlayoutAttribute(state()->paragraph,"COUNTER","righttext",""); + _writer->layoutAttribute(state()->paragraph,"COUNTER","type","0"); + _writer->layoutAttribute(state()->paragraph,"COUNTER","numberingtype","0"); + _writer->layoutAttribute(state()->paragraph,"COUNTER","righttext",""); int currdepth=(_writer->getLayoutAttribute(state()->paragraph,"COUNTER","depth")).toInt(); - _writer->tqlayoutAttribute(state()->paragraph,"COUNTER","depth",TQString("%1").tqarg(currdepth+1)); + _writer->layoutAttribute(state()->paragraph,"COUNTER","depth",TQString("%1").tqarg(currdepth+1)); } } @@ -353,12 +353,12 @@ bool KHTMLReader::parse_CommonAttributes(DOM::Element e) // example: <p class="h1" style="text-align:left; "> { kdDebug(30503) << "laying out with " << e.getAttribute("class").string() << endl; - _writer->tqlayoutAttribute(state()->paragraph,"NAME","value",e.getAttribute("class").string()); + _writer->layoutAttribute(state()->paragraph,"NAME","value",e.getAttribute("class").string()); } if ( e.getAttribute("class").string()=="Standard" ) { kdDebug(30503) << "laying out with " << e.getAttribute("class").string() << endl; - _writer->tqlayoutAttribute(state()->paragraph,"NAME","value",e.getAttribute("class").string()); + _writer->layoutAttribute(state()->paragraph,"NAME","value",e.getAttribute("class").string()); } kdDebug(30503) << "leaving parse_CommonAttributes" << endl; return true; @@ -509,7 +509,7 @@ void KHTMLReader::parseStyle(DOM::Element e) if ( s1.getPropertyValue("text-align").string() != TQString() && s1.getPropertyValue("text-align").string() != TQString("left") ) { state()->tqlayout=_writer->setLayout(state()->paragraph,state()->tqlayout); - _writer->tqlayoutAttribute(state()->paragraph, "FLOW","align",s1.getPropertyValue("text-align").string()); + _writer->layoutAttribute(state()->paragraph, "FLOW","align",s1.getPropertyValue("text-align").string()); } // done @@ -684,7 +684,7 @@ bool KHTMLReader::parse_ul(DOM::Element e) _list_depth++; if (e.firstChild().nodeName().string().lower() == "#text") // e.g. <ul>this is indented<li>first listitem</li></ul> { - _writer->tqlayoutAttribute(state()->paragraph,"COUNTER","depth",TQString("%1").tqarg(_list_depth-1)); // indent + _writer->layoutAttribute(state()->paragraph,"COUNTER","depth",TQString("%1").tqarg(_list_depth-1)); // indent startNewLayout(); } for (DOM::Node items=e.firstChild();!items.isNull();items=items.nextSibling()) @@ -692,21 +692,21 @@ bool KHTMLReader::parse_ul(DOM::Element e) if (items.nodeName().string().lower() == "li") { if (!(_writer->getText(state()->paragraph).isEmpty())) startNewLayout(); - _writer->tqlayoutAttribute(state()->paragraph,"COUNTER","numberingtype","1"); - _writer->tqlayoutAttribute(state()->paragraph,"COUNTER","righttext","."); + _writer->layoutAttribute(state()->paragraph,"COUNTER","numberingtype","1"); + _writer->layoutAttribute(state()->paragraph,"COUNTER","righttext","."); if (e.tagName().string().lower() == "ol") { - _writer->tqlayoutAttribute(state()->paragraph,"COUNTER","type","1"); - _writer->tqlayoutAttribute(state()->paragraph,"COUNTER","numberingtype","1"); - _writer->tqlayoutAttribute(state()->paragraph,"COUNTER","righttext","."); + _writer->layoutAttribute(state()->paragraph,"COUNTER","type","1"); + _writer->layoutAttribute(state()->paragraph,"COUNTER","numberingtype","1"); + _writer->layoutAttribute(state()->paragraph,"COUNTER","righttext","."); } else { - _writer->tqlayoutAttribute(state()->paragraph,"COUNTER","type","10"); - _writer->tqlayoutAttribute(state()->paragraph,"COUNTER","numberingtype",""); - _writer->tqlayoutAttribute(state()->paragraph,"COUNTER","righttext",""); + _writer->layoutAttribute(state()->paragraph,"COUNTER","type","10"); + _writer->layoutAttribute(state()->paragraph,"COUNTER","numberingtype",""); + _writer->layoutAttribute(state()->paragraph,"COUNTER","righttext",""); } - _writer->tqlayoutAttribute(state()->paragraph,"COUNTER","depth",TQString("%1").tqarg(_list_depth-1)); // indent + _writer->layoutAttribute(state()->paragraph,"COUNTER","depth",TQString("%1").tqarg(_list_depth-1)); // indent } parseNode(items); } diff --git a/filters/kword/html/import/kwdwriter.cpp b/filters/kword/html/import/kwdwriter.cpp index d2e4c450..23211ecc 100644 --- a/filters/kword/html/import/kwdwriter.cpp +++ b/filters/kword/html/import/kwdwriter.cpp @@ -207,7 +207,7 @@ void KWDWriter::finishTable(int tableno) { void KWDWriter::createHR(TQDomElement paragraph, int width) { - tqlayoutAttribute(paragraph,"BOTTOMBORDER","width",TQString("%1").tqarg(width)); + layoutAttribute(paragraph,"BOTTOMBORDER","width",TQString("%1").tqarg(width)); } void KWDWriter::finishTable(int tableno,TQRect rect) { @@ -353,16 +353,16 @@ TQRect getRect(TQDomElement frameset) { } -TQDomElement KWDWriter::addParagraph(TQDomElement tqparent, TQDomElement tqlayoutToClone) { +TQDomElement KWDWriter::addParagraph(TQDomElement tqparent, TQDomElement layoutToClone) { TQDomElement paragraph=_doc->createElement("PARAGRAPH"); TQDomElement formats=_doc->createElement("FORMATS"); TQDomElement tqlayout; - if (tqlayoutToClone.isNull()) { + if (layoutToClone.isNull()) { tqlayout=_doc->createElement("LAYOUT"); } else { - tqlayout=tqlayoutToClone.cloneNode().toElement(); + tqlayout=layoutToClone.cloneNode().toElement(); } TQDomElement text=_doc->createElement("TEXT"); TQDomText t=_doc->createTextNode(TQString("")); @@ -371,7 +371,7 @@ TQDomElement KWDWriter::addParagraph(TQDomElement tqparent, TQDomElement tqlayou paragraph.appendChild(text); tqparent.appendChild(paragraph); paragraph.appendChild(tqlayout); - tqlayoutAttribute(paragraph,"NAME","value","Standard"); + layoutAttribute(paragraph,"NAME","value","Standard"); return paragraph; } @@ -403,9 +403,9 @@ TQString KWDWriter::getLayoutAttribute(TQDomElement paragraph, TQString name, TQ return TQString(); } -TQDomElement KWDWriter::tqlayoutAttribute(TQDomElement paragraph, TQString name, TQString attrName, TQString attr) +TQDomElement KWDWriter::layoutAttribute(TQDomElement paragraph, TQString name, TQString attrName, TQString attr) { - kdDebug() << "Entering KWDWriter::tqlayoutAttribute name=" << name << " attrName=" << attrName << " attr=" << attr << endl; + kdDebug() << "Entering KWDWriter::layoutAttribute name=" << name << " attrName=" << attrName << " attr=" << attr << endl; TQDomElement currentLayout=paragraph.elementsByTagName("LAYOUT").item(0).toElement(); TQDomNodeList qdnl= currentLayout.elementsByTagName(name); diff --git a/filters/kword/html/import/kwdwriter.h b/filters/kword/html/import/kwdwriter.h index 2fc888c4..59694e8d 100644 --- a/filters/kword/html/import/kwdwriter.h +++ b/filters/kword/html/import/kwdwriter.h @@ -131,7 +131,7 @@ public: /** * adds/changes an attribute to/of the current tqlayout **/ - TQDomElement tqlayoutAttribute(TQDomElement paragraph, TQString name, TQString attrName, TQString attr); + TQDomElement layoutAttribute(TQDomElement paragraph, TQString name, TQString attrName, TQString attr); /** * creates a new format in the current paragraph. do this before adding text diff --git a/filters/kword/kword1.3/import/kword13parser.cpp b/filters/kword/kword1.3/import/kword13parser.cpp index c6dce3d5..00d8290d 100644 --- a/filters/kword/kword1.3/import/kword13parser.cpp +++ b/filters/kword/kword1.3/import/kword13parser.cpp @@ -106,7 +106,7 @@ bool KWord13Parser::startElementFormatOneProperty( const TQString& name, const T } else { - kdError(30520) << "Wrong tqparents for FORMAT property: " << name << endl; + kdError(30520) << "Wrong parents for FORMAT property: " << name << endl; return false; } } diff --git a/filters/kword/latex/export/latexexportdia.ui b/filters/kword/latex/export/latexexportdia.ui index 677329da..8c3835ed 100644 --- a/filters/kword/latex/export/latexexportdia.ui +++ b/filters/kword/latex/export/latexexportdia.ui @@ -659,7 +659,7 @@ <slot>addLanguage()</slot> <slot>removeLanguage()</slot> </Q_SLOTS> -<tqlayoutdefaults spacing="6" margin="11"/> +<layoutdefaults spacing="6" margin="11"/> <includehints> <includehint>knuminput.h</includehint> <includehint>knuminput.h</includehint> diff --git a/filters/kword/libexport/TagProcessing.cc b/filters/kword/libexport/TagProcessing.cc index ca47f1ef..b70d58d9 100644 --- a/filters/kword/libexport/TagProcessing.cc +++ b/filters/kword/libexport/TagProcessing.cc @@ -42,15 +42,15 @@ // #define DEBUG_KWORD_IGNORED_TAGS -void ProcessSubtags ( const TQDomNode &tqparentNode, +void ProcessSubtags ( const TQDomNode &parentNode, TQValueList<TagProcessing> &tagProcessingList, KWEFKWordLeader *leader) { - //kdDebug(30508) << "Starting ProcessSubtags for node: " << tqparentNode.nodeName() << endl; + //kdDebug(30508) << "Starting ProcessSubtags for node: " << parentNode.nodeName() << endl; TQDomNode childNode; - for ( childNode = tqparentNode.firstChild (); !childNode.isNull (); childNode = childNode.nextSibling () ) + for ( childNode = parentNode.firstChild (); !childNode.isNull (); childNode = childNode.nextSibling () ) { if ( childNode.isElement () ) { @@ -74,7 +74,7 @@ void ProcessSubtags ( const TQDomNode &tqparentNode, else { kdDebug(30508) << "Ignoring " << childNode.nodeName () - << " tag in " << tqparentNode.nodeName () << endl; + << " tag in " << parentNode.nodeName () << endl; } #endif break; @@ -84,11 +84,11 @@ void ProcessSubtags ( const TQDomNode &tqparentNode, if ( !found ) { kdDebug(30508) << "Unexpected tag " << childNode.nodeName () - << " in " << tqparentNode.nodeName () << "!" << endl; + << " in " << parentNode.nodeName () << "!" << endl; } } } - //kdDebug(30508) << "Ending ProcessSubtags for node: " << tqparentNode.nodeName() << endl; + //kdDebug(30508) << "Ending ProcessSubtags for node: " << parentNode.nodeName() << endl; } void AllowNoSubtags ( const TQDomNode& myNode, KWEFKWordLeader *leader ) diff --git a/filters/kword/libexport/TagProcessing.h b/filters/kword/libexport/TagProcessing.h index 01080d50..27512bfd 100644 --- a/filters/kword/libexport/TagProcessing.h +++ b/filters/kword/libexport/TagProcessing.h @@ -76,7 +76,7 @@ class TagProcessing void *data; }; -void ProcessSubtags ( const TQDomNode &tqparentNode, +void ProcessSubtags ( const TQDomNode &parentNode, TQValueList<TagProcessing> &tagProcessingList, KWEFKWordLeader *leader); diff --git a/filters/kword/msword/conversion.cpp b/filters/kword/msword/conversion.cpp index 4b221051..83dae4ab 100644 --- a/filters/kword/msword/conversion.cpp +++ b/filters/kword/msword/conversion.cpp @@ -81,7 +81,7 @@ int Conversion::fillPatternStyle( int ipat ) { // See $TQTDIR/doc/html/qbrush.html#setStyle switch( ipat ) { - case 0: // Automatic (Aptqparently it means Solid from background color instead of foreground) + case 0: // Automatic (Apparently it means Solid from background color instead of foreground) case 1: // Solid return TQt::SolidPattern; case 2: // 5% diff --git a/filters/kword/msword/document.cpp b/filters/kword/msword/document.cpp index f5737200..5044f023 100644 --- a/filters/kword/msword/document.cpp +++ b/filters/kword/msword/document.cpp @@ -371,9 +371,9 @@ void Document::slotTableCellEnd() m_textHandler->setFrameSetElement( TQDomElement() ); } -TQDomElement Document::createInitialFrame( TQDomElement& tqparentFramesetElem, double left, double right, double top, double bottom, bool autoExtend, NewFrameBehavior nfb ) +TQDomElement Document::createInitialFrame( TQDomElement& parentFramesetElem, double left, double right, double top, double bottom, bool autoExtend, NewFrameBehavior nfb ) { - TQDomElement frameElementOut = tqparentFramesetElem.ownerDocument().createElement("FRAME"); + TQDomElement frameElementOut = parentFramesetElem.ownerDocument().createElement("FRAME"); frameElementOut.setAttribute( "left", left ); frameElementOut.setAttribute( "right", right ); frameElementOut.setAttribute( "top", top ); @@ -382,7 +382,7 @@ TQDomElement Document::createInitialFrame( TQDomElement& tqparentFramesetElem, d // AutoExtendFrame for header/footer/footnote/endnote, AutoCreateNewFrame for body text frameElementOut.setAttribute( "autoCreateNewFrame", autoExtend ? 0 : 1 ); frameElementOut.setAttribute( "newFrameBehavior", nfb ); - tqparentFramesetElem.appendChild( frameElementOut ); + parentFramesetElem.appendChild( frameElementOut ); return frameElementOut; } @@ -405,7 +405,7 @@ void Document::generateFrameBorder( TQDomElement& frameElementOut, const wvWare: // If ipat = 0 (solid fill), icoBack is the background color. // But otherwise, icoFore is the one we need to set as bkColor // (and icoBack is usually white; it's the other colour of the pattern, - // something that we can't set in TQt aptqparently). + // something that we can't set in TQt apparently). int bkColor = shd.ipat ? shd.cvFore : shd.cvBack; kdDebug(30513) << "generateFrameBorder: " << " icoFore=" << shd.cvFore << " icoBack=" << shd.cvBack << " ipat=" << shd.ipat << " -> bkColor=" << bkColor << endl; diff --git a/filters/kword/msword/document.h b/filters/kword/msword/document.h index 0e79065a..af527e2a 100644 --- a/filters/kword/msword/document.h +++ b/filters/kword/msword/document.h @@ -113,7 +113,7 @@ private: void processStyles(); void processAssociatedStrings(); enum NewFrameBehavior { Reconnect=0, NoFollowup=1, Copy=2 }; - TQDomElement createInitialFrame( TQDomElement& tqparentFramesetElem, double left, double right, double top, double bottom, bool autoExtend, NewFrameBehavior nfb ); + TQDomElement createInitialFrame( TQDomElement& parentFramesetElem, double left, double right, double top, double bottom, bool autoExtend, NewFrameBehavior nfb ); void generateFrameBorder( TQDomElement& frameElementOut, const wvWare::Word97::BRC& brcTop, const wvWare::Word97::BRC& brcBottom, const wvWare::Word97::BRC& brcLeft, const wvWare::Word97::BRC& brcRight, const wvWare::Word97::SHD& shd ); TQDomDocument& m_mainDocument; diff --git a/filters/kword/msword/texthandler.cpp b/filters/kword/msword/texthandler.cpp index 0dcffdbb..e58ffead 100644 --- a/filters/kword/msword/texthandler.cpp +++ b/filters/kword/msword/texthandler.cpp @@ -315,7 +315,7 @@ void KWordTextHandler::runOfText( const wvWare::UString& text, wvWare::SharedPtr } -void KWordTextHandler::writeFormat( TQDomElement& tqparentElement, const wvWare::Word97::CHP* chp, const wvWare::Word97::CHP* refChp, int pos, int len, int formatId, TQDomElement* pChildElement ) +void KWordTextHandler::writeFormat( TQDomElement& parentElement, const wvWare::Word97::CHP* chp, const wvWare::Word97::CHP* refChp, int pos, int len, int formatId, TQDomElement* pChildElement ) { TQDomElement format( mainDocument().createElement( "FORMAT" ) ); format.setAttribute( "id", formatId ); @@ -471,7 +471,7 @@ void KWordTextHandler::writeFormat( TQDomElement& tqparentElement, const wvWare: } if ( pChildElement || !format.firstChild().isNull() ) // Don't save an empty format tag, unless the caller asked for it - tqparentElement.appendChild( format ); + parentElement.appendChild( format ); if ( pChildElement ) *pChildElement = format; } @@ -551,34 +551,34 @@ void KWordTextHandler::writeOutParagraph( const TQString& styleName, const TQStr textElement.setAttribute( "xml:space", "preserve" ); paragraphElementOut.appendChild(textElement); paragraphElementOut.appendChild( m_formats ); - TQDomElement tqlayoutElement=mainDocument().createElement("LAYOUT"); - paragraphElementOut.appendChild(tqlayoutElement); + TQDomElement layoutElement=mainDocument().createElement("LAYOUT"); + paragraphElementOut.appendChild(layoutElement); TQDomElement nameElement = mainDocument().createElement("NAME"); nameElement.setAttribute("value", styleName); - tqlayoutElement.appendChild(nameElement); + layoutElement.appendChild(nameElement); if ( m_paragraphProperties ) { // Write out the properties of the paragraph - writeLayout( tqlayoutElement, *m_paragraphProperties, m_currentStyle ); + writeLayout( layoutElement, *m_paragraphProperties, m_currentStyle ); } textElement.appendChild(mainDocument().createTextNode(text)); m_paragraph = TQString( "" ); m_index = 0; - m_oldLayout = tqlayoutElement; // Keep a reference to the old tqlayout for some hacks + m_oldLayout = layoutElement; // Keep a reference to the old tqlayout for some hacks } -void KWordTextHandler::writeLayout( TQDomElement& tqparentElement, const wvWare::ParagraphProperties& paragraphProperties, const wvWare::Style* style ) +void KWordTextHandler::writeLayout( TQDomElement& parentElement, const wvWare::ParagraphProperties& paragraphProperties, const wvWare::Style* style ) { const wvWare::Word97::PAP& pap = paragraphProperties.pap(); // Always write out the tqalignment, it's required TQDomElement flowElement = mainDocument().createElement("FLOW"); TQString tqalignment = Conversion::tqalignment( pap.jc ); flowElement.setAttribute( "align", tqalignment ); - tqparentElement.appendChild( flowElement ); + parentElement.appendChild( flowElement ); //kdDebug(30513) << k_funcinfo << " dxaLeft1=" << pap.dxaLeft1 << " dxaLeft=" << pap.dxaLeft << " dxaRight=" << pap.dxaRight << " dyaBefore=" << pap.dyaBefore << " dyaAfter=" << pap.dyaAfter << " lspd=" << pap.lspd.dyaLine << "/" << pap.lspd.fMultLinespace << endl; @@ -589,14 +589,14 @@ void KWordTextHandler::writeLayout( TQDomElement& tqparentElement, const wvWare: indentsElement.setAttribute( "first", (double)pap.dxaLeft1 / 20.0 ); indentsElement.setAttribute( "left", (double)pap.dxaLeft / 20.0 ); indentsElement.setAttribute( "right", (double)pap.dxaRight / 20.0 ); - tqparentElement.appendChild( indentsElement ); + parentElement.appendChild( indentsElement ); } if ( pap.dyaBefore || pap.dyaAfter ) { TQDomElement offsetsElement = mainDocument().createElement("OFFSETS"); offsetsElement.setAttribute( "before", (double)pap.dyaBefore / 20.0 ); offsetsElement.setAttribute( "after", (double)pap.dyaAfter / 20.0 ); - tqparentElement.appendChild( offsetsElement ); + parentElement.appendChild( offsetsElement ); } // Linespacing @@ -605,7 +605,7 @@ void KWordTextHandler::writeLayout( TQDomElement& tqparentElement, const wvWare: { TQDomElement lineSpacingElem = mainDocument().createElement( "LINESPACING" ); lineSpacingElem.setAttribute("value", lineSpacing ); - tqparentElement.appendChild( lineSpacingElem ); + parentElement.appendChild( lineSpacingElem ); } if ( pap.fKeep || pap.fKeepFollow || pap.fPageBreakBefore ) @@ -617,7 +617,7 @@ void KWordTextHandler::writeLayout( TQDomElement& tqparentElement, const wvWare: pageBreak.setAttribute("hardFrameBreak", "true" ); if ( pap.fKeepFollow ) pageBreak.setAttribute("keepWithNext", "true" ); - tqparentElement.appendChild( pageBreak ); + parentElement.appendChild( pageBreak ); } // Borders @@ -625,25 +625,25 @@ void KWordTextHandler::writeLayout( TQDomElement& tqparentElement, const wvWare: { TQDomElement borderElement = mainDocument().createElement( "TOPBORDER" ); Conversion::setBorderAttributes( borderElement, pap.brcTop ); - tqparentElement.appendChild( borderElement ); + parentElement.appendChild( borderElement ); } if ( pap.brcBottom.brcType ) { TQDomElement borderElement = mainDocument().createElement( "BOTTOMBORDER" ); Conversion::setBorderAttributes( borderElement, pap.brcBottom ); - tqparentElement.appendChild( borderElement ); + parentElement.appendChild( borderElement ); } if ( pap.brcLeft.brcType ) { TQDomElement borderElement = mainDocument().createElement( "LEFTBORDER" ); Conversion::setBorderAttributes( borderElement, pap.brcLeft ); - tqparentElement.appendChild( borderElement ); + parentElement.appendChild( borderElement ); } if ( pap.brcRight.brcType ) { TQDomElement borderElement = mainDocument().createElement( "RIGHTBORDER" ); Conversion::setBorderAttributes( borderElement, pap.brcRight ); - tqparentElement.appendChild( borderElement ); + parentElement.appendChild( borderElement ); } // Tabulators @@ -674,17 +674,17 @@ void KWordTextHandler::writeLayout( TQDomElement& tqparentElement, const wvWare: } tabElement.setAttribute( "filling", filling ); tabElement.setAttribute( "width", width ); - tqparentElement.appendChild( tabElement ); + parentElement.appendChild( tabElement ); } } if ( pap.ilfo > 0 ) { - writeCounter( tqparentElement, paragraphProperties, style ); + writeCounter( parentElement, paragraphProperties, style ); } } -void KWordTextHandler::writeCounter( TQDomElement& tqparentElement, const wvWare::ParagraphProperties& paragraphProperties, const wvWare::Style* style ) +void KWordTextHandler::writeCounter( TQDomElement& parentElement, const wvWare::ParagraphProperties& paragraphProperties, const wvWare::Style* style ) { const wvWare::ListInfo* listInfo = paragraphProperties.listInfo(); if ( !listInfo ) @@ -820,7 +820,7 @@ void KWordTextHandler::writeCounter( TQDomElement& tqparentElement, const wvWare else m_previousEnumLSID = listInfo->lsid(); counterElement.setAttribute( "numberingtype", numberingType ); - tqparentElement.appendChild( counterElement ); + parentElement.appendChild( counterElement ); } void KWordTextHandler::setFrameSetElement( const TQDomElement& frameset ) diff --git a/filters/kword/msword/texthandler.h b/filters/kword/msword/texthandler.h index 3075803b..ebea5202 100644 --- a/filters/kword/msword/texthandler.h +++ b/filters/kword/msword/texthandler.h @@ -86,10 +86,10 @@ public: // Write a <FORMAT> tag from the given CHP // Returns that element into pChildElement if set (in that case even an empty FORMAT can be appended) - void writeFormat( TQDomElement& tqparentElement, const wvWare::Word97::CHP* chp, const wvWare::Word97::CHP* refChp, int pos, int len, int formatId, TQDomElement* pChildElement ); + void writeFormat( TQDomElement& parentElement, const wvWare::Word97::CHP* chp, const wvWare::Word97::CHP* refChp, int pos, int len, int formatId, TQDomElement* pChildElement ); // Write the _contents_ (tqchildren) of a <LAYOUT> or <STYLE> tag, from the given parag props - void writeLayout( TQDomElement& tqparentElement, const wvWare::ParagraphProperties& paragraphProperties, const wvWare::Style* style ); + void writeLayout( TQDomElement& parentElement, const wvWare::ParagraphProperties& paragraphProperties, const wvWare::Style* style ); // Communication with Document, without having to know about Document signals: @@ -100,7 +100,7 @@ signals: protected: void writeOutParagraph( const TQString& styleName, const TQString& text ); - void writeCounter( TQDomElement& tqparentElement, const wvWare::ParagraphProperties& paragraphProperties, const wvWare::Style* style ); + void writeCounter( TQDomElement& parentElement, const wvWare::ParagraphProperties& paragraphProperties, const wvWare::Style* style ); TQDomElement insertVariable( int type, wvWare::SharedPtr<const wvWare::Word97::CHP> chp, const TQString& format ); TQDomElement insertAnchor( const TQString& fsname ); TQString getFont(unsigned fc) const; diff --git a/filters/kword/mswrite/ImportDialogUI.ui b/filters/kword/mswrite/ImportDialogUI.ui index 953caac6..db7dcc20 100644 --- a/filters/kword/mswrite/ImportDialogUI.ui +++ b/filters/kword/mswrite/ImportDialogUI.ui @@ -252,5 +252,5 @@ <tabstop>checkBoxLinespacing</tabstop> <tabstop>checkBoxImageOffset</tabstop> </tabstops> -<tqlayoutdefaults spacing="6" margin="11"/> +<layoutdefaults spacing="6" margin="11"/> </UI> diff --git a/filters/kword/mswrite/structures_generated.h b/filters/kword/mswrite/structures_generated.h index 6ee59103..0ee985ce 100644 --- a/filters/kword/mswrite/structures_generated.h +++ b/filters/kword/mswrite/structures_generated.h @@ -730,7 +730,7 @@ namespace MSWrite static const Byte numDataBytesDefault = Byte (0); static const Byte magic0_60_or_61Default = Byte (60); - static const Byte tqalignmentDefault = Byte (0); + static const Byte alignmentDefault = Byte (0); static const Word magic30Default = Word (30); static const Word rightIndentDefault = Word (0); static const Word leftIndentDefault = Word (0); diff --git a/filters/kword/oowriter/ExportFilter.cc b/filters/kword/oowriter/ExportFilter.cc index 3432d611..36485105 100644 --- a/filters/kword/oowriter/ExportFilter.cc +++ b/filters/kword/oowriter/ExportFilter.cc @@ -1728,7 +1728,7 @@ void OOWriterWorker::processParagraphData ( const TQString ¶Text, } } -TQString OOWriterWorker::tqlayoutToParagraphStyle(const LayoutData& tqlayoutOrigin, +TQString OOWriterWorker::layoutToParagraphStyle(const LayoutData& layoutOrigin, const LayoutData& tqlayout, const bool force, TQString& styleKey) { TQString props; // Props has to remain empty, if there is no difference. @@ -1736,7 +1736,7 @@ TQString OOWriterWorker::tqlayoutToParagraphStyle(const LayoutData& tqlayoutOrig styleKey += tqlayout.styleName; styleKey += ','; - if (force || (tqlayoutOrigin.tqalignment!=tqlayout.tqalignment)) + if (force || (layoutOrigin.tqalignment!=tqlayout.tqalignment)) { // NOTE: OO 1.0.x uses start and end like left and right (section 3.11.4) // Unfortunately in XSL-FO's text-align, they are really supposed to be the start and the end. @@ -1777,7 +1777,7 @@ TQString OOWriterWorker::tqlayoutToParagraphStyle(const LayoutData& tqlayoutOrig styleKey += ','; if ((tqlayout.indentLeft>=0.0) - && (force || (tqlayoutOrigin.indentLeft!=tqlayout.indentLeft))) + && (force || (layoutOrigin.indentLeft!=tqlayout.indentLeft))) { props += TQString("fo:margin-left=\"%1pt\" ").tqarg(tqlayout.indentLeft); styleKey += TQString::number(tqlayout.indentLeft); @@ -1786,7 +1786,7 @@ TQString OOWriterWorker::tqlayoutToParagraphStyle(const LayoutData& tqlayoutOrig styleKey += ','; if ((tqlayout.indentRight>=0.0) - && (force || (tqlayoutOrigin.indentRight!=tqlayout.indentRight))) + && (force || (layoutOrigin.indentRight!=tqlayout.indentRight))) { props += TQString("fo:margin-right=\"%1pt\" ").tqarg(tqlayout.indentRight); styleKey += TQString::number(tqlayout.indentRight); @@ -1794,7 +1794,7 @@ TQString OOWriterWorker::tqlayoutToParagraphStyle(const LayoutData& tqlayoutOrig styleKey += ','; - if (force || (tqlayoutOrigin.indentLeft!=tqlayout.indentLeft)) + if (force || (layoutOrigin.indentLeft!=tqlayout.indentLeft)) { props += "fo:text-indent=\""; props += TQString::number(tqlayout.indentFirst); @@ -1805,7 +1805,7 @@ TQString OOWriterWorker::tqlayoutToParagraphStyle(const LayoutData& tqlayoutOrig styleKey += ','; if ((tqlayout.marginBottom>=0.0) - && ( force || ( tqlayoutOrigin.marginBottom != tqlayout.marginBottom ) ) ) + && ( force || ( layoutOrigin.marginBottom != tqlayout.marginBottom ) ) ) { props += TQString("fo:margin-bottom=\"%1pt\" ").tqarg(tqlayout.marginBottom); styleKey += TQString::number(tqlayout.marginBottom); @@ -1814,7 +1814,7 @@ TQString OOWriterWorker::tqlayoutToParagraphStyle(const LayoutData& tqlayoutOrig styleKey += ','; if ((tqlayout.marginTop>=0.0) - && ( force || ( tqlayoutOrigin.marginTop != tqlayout.marginTop ) ) ) + && ( force || ( layoutOrigin.marginTop != tqlayout.marginTop ) ) ) { props += TQString("fo:margin-top=\"%1pt\" ").tqarg(tqlayout.marginTop); styleKey += TQString::number(tqlayout.marginTop); @@ -1823,8 +1823,8 @@ TQString OOWriterWorker::tqlayoutToParagraphStyle(const LayoutData& tqlayoutOrig styleKey += ','; if (force - || ( tqlayoutOrigin.lineSpacingType != tqlayout.lineSpacingType ) - || ( tqlayoutOrigin.lineSpacing != tqlayout.lineSpacing ) ) + || ( layoutOrigin.lineSpacingType != tqlayout.lineSpacingType ) + || ( layoutOrigin.lineSpacing != tqlayout.lineSpacing ) ) { switch ( tqlayout.lineSpacingType ) { @@ -1918,7 +1918,7 @@ TQString OOWriterWorker::tqlayoutToParagraphStyle(const LayoutData& tqlayoutOrig styleKey += '@'; // A more visible seperator - props += textFormatToStyle(tqlayoutOrigin.formatData.text,tqlayout.formatData.text,force,styleKey); + props += textFormatToStyle(layoutOrigin.formatData.text,tqlayout.formatData.text,force,styleKey); props += ">"; @@ -1926,7 +1926,7 @@ TQString OOWriterWorker::tqlayoutToParagraphStyle(const LayoutData& tqlayoutOrig // ### TODO/FIXME: what if all tabulators must be erased? if (!tqlayout.tabulatorList.isEmpty() - && (force || (tqlayoutOrigin.tabulatorList!=tqlayout.tabulatorList) )) + && (force || (layoutOrigin.tabulatorList!=tqlayout.tabulatorList) )) { props += "\n <style:tab-stops>\n"; TabulatorList::ConstIterator it; @@ -1984,7 +1984,7 @@ bool OOWriterWorker::doFullParagraph(const TQString& paraText, const LayoutData& const LayoutData& styleLayout=m_styleMap[tqlayout.styleName]; TQString styleKey; - const TQString props(tqlayoutToParagraphStyle(styleLayout,tqlayout,false,styleKey)); + const TQString props(layoutToParagraphStyle(styleLayout,tqlayout,false,styleKey)); TQString actualStyle(tqlayout.styleName); if (!props.isEmpty()) @@ -2068,7 +2068,7 @@ bool OOWriterWorker::doFullDefineStyle(LayoutData& tqlayout) m_styles += " <style:properties "; TQString debugKey; // Not needed - m_styles += tqlayoutToParagraphStyle(tqlayout,tqlayout,true,debugKey); + m_styles += layoutToParagraphStyle(tqlayout,tqlayout,true,debugKey); kdDebug(30518) << "Defining style: " << debugKey << endl; m_styles += "</style:properties>\n"; diff --git a/filters/kword/oowriter/ExportFilter.h b/filters/kword/oowriter/ExportFilter.h index 4e7a567e..0a898227 100644 --- a/filters/kword/oowriter/ExportFilter.h +++ b/filters/kword/oowriter/ExportFilter.h @@ -106,7 +106,7 @@ private: const FormatData& formatData); TQString textFormatToStyle(const TextFormatting& formatOrigin, const TextFormatting& formatData, const bool force, TQString& key); - TQString tqlayoutToParagraphStyle(const LayoutData& tqlayoutOrigin, + TQString layoutToParagraphStyle(const LayoutData& layoutOrigin, const LayoutData& tqlayout, const bool force, TQString& styleKey); TQString escapeOOText(const TQString& strText) const; TQString escapeOOSpan(const TQString& strText) const; diff --git a/filters/kword/oowriter/oowriterimport.cc b/filters/kword/oowriter/oowriterimport.cc index fa831de2..4304f346 100644 --- a/filters/kword/oowriter/oowriterimport.cc +++ b/filters/kword/oowriter/oowriterimport.cc @@ -520,9 +520,9 @@ void OoWriterImport::prepareDocument( TQDomDocument& mainDocument, TQDomElement& } // Copied from the msword importer -TQDomElement OoWriterImport::createInitialFrame( TQDomElement& tqparentFramesetElem, double left, double right, double top, double bottom, bool autoExtend, NewFrameBehavior nfb ) +TQDomElement OoWriterImport::createInitialFrame( TQDomElement& parentFramesetElem, double left, double right, double top, double bottom, bool autoExtend, NewFrameBehavior nfb ) { - TQDomElement frameElementOut = tqparentFramesetElem.ownerDocument().createElement("FRAME"); + TQDomElement frameElementOut = parentFramesetElem.ownerDocument().createElement("FRAME"); frameElementOut.setAttribute( "left", left ); frameElementOut.setAttribute( "right", right ); frameElementOut.setAttribute( "top", top ); @@ -531,7 +531,7 @@ TQDomElement OoWriterImport::createInitialFrame( TQDomElement& tqparentFramesetE // AutoExtendFrame for header/footer/footnote/endnote, AutoCreateNewFrame for body text frameElementOut.setAttribute( "autoCreateNewFrame", autoExtend ? 0 : 1 ); frameElementOut.setAttribute( "newFrameBehavior", nfb ); - tqparentFramesetElem.appendChild( frameElementOut ); + parentFramesetElem.appendChild( frameElementOut ); return frameElementOut; } @@ -552,7 +552,7 @@ KoFilter::ConversiontqStatus OoWriterImport::openFile() //kdDebug(30518)<<" m_content.toCString() :"<<m_content.toCString()<<endl; // We need to keep the TQDomDocument for styles too, unfortunately. - // Otherwise styleElement.tqparentNode() returns a null node + // Otherwise styleElement.parentNode() returns a null node // (see StyleStack::isUserStyle). Most of styles.xml is in m_styles // anyway, so this doesn't make a big difference. // We now also rely on this in createStyles. @@ -814,14 +814,14 @@ void OoWriterImport::addStyles( const TQDomElement* style ) { Q_ASSERT( style ); if ( !style ) return; - // this recursive function is necessary as tqparent styles can have tqparents themselves + // this recursive function is necessary as tqparent styles can have parents themselves if ( style->hasAttributeNS( ooNS::style, "tqparent-style-name" ) ) { - const TQString tqparentStyleName = style->attributeNS( ooNS::style, "tqparent-style-name", TQString() ); - TQDomElement* tqparentStyle = m_styles[ tqparentStyleName ]; - if ( tqparentStyle ) - addStyles( tqparentStyle ); + const TQString parentStyleName = style->attributeNS( ooNS::style, "tqparent-style-name", TQString() ); + TQDomElement* parentStyle = m_styles[ parentStyleName ]; + if ( parentStyle ) + addStyles( parentStyle ); else - kdWarning(30518) << "Parent style not found: " << tqparentStyleName << endl; + kdWarning(30518) << "Parent style not found: " << parentStyleName << endl; } else if ( !m_defaultStyle.isNull() ) // on top of all, the default style m_styleStack.push( m_defaultStyle ); @@ -830,18 +830,18 @@ void OoWriterImport::addStyles( const TQDomElement* style ) m_styleStack.push( *style ); } -void OoWriterImport::applyListStyle( TQDomDocument& doc, TQDomElement& tqlayoutElement, const TQDomElement& paragraph ) +void OoWriterImport::applyListStyle( TQDomDocument& doc, TQDomElement& layoutElement, const TQDomElement& paragraph ) { // Spec: see 3.3.5 p137 if ( m_listStyleStack.hasListStyle() && m_nextItemIsListItem ) { bool heading = paragraph.localName() == "h"; m_nextItemIsListItem = false; int level = heading ? paragraph.attributeNS( ooNS::text, "level", TQString() ).toInt() : m_listStyleStack.level(); - writeCounter( doc, tqlayoutElement, heading, level, m_insideOrderedList ); + writeCounter( doc, layoutElement, heading, level, m_insideOrderedList ); } } -void OoWriterImport::writeCounter( TQDomDocument& doc, TQDomElement& tqlayoutElement, bool heading, int level, bool ordered ) +void OoWriterImport::writeCounter( TQDomDocument& doc, TQDomElement& layoutElement, bool heading, int level, bool ordered ) { const TQDomElement listStyle = m_listStyleStack.currentListStyle(); //const TQDomElement listStyleProperties = m_listStyleStack.currentListStyleProperties(); @@ -914,7 +914,7 @@ void OoWriterImport::writeCounter( TQDomDocument& doc, TQDomElement& tqlayoutEle } } - tqlayoutElement.appendChild(counter); + layoutElement.appendChild(counter); } static TQDomElement findListLevelStyle( TQDomElement& fullListStyle, int level ) @@ -1189,8 +1189,8 @@ TQDomElement OoWriterImport::parseParagraph( TQDomDocument& doc, const TQDomElem //kdDebug(30518) << k_funcinfo << "Para text is: " << paragraphText << endl; p.appendChild( formats ); - TQDomElement tqlayoutElement = doc.createElement( "LAYOUT" ); - p.appendChild( tqlayoutElement ); + TQDomElement layoutElement = doc.createElement( "LAYOUT" ); + p.appendChild( layoutElement ); // Style name TQString styleName = m_styleStack.userStyleName("paragraph"); @@ -1198,13 +1198,13 @@ TQDomElement OoWriterImport::parseParagraph( TQDomDocument& doc, const TQDomElem { TQDomElement nameElement = doc.createElement("NAME"); nameElement.setAttribute( "value", kWordStyleName(styleName) ); - tqlayoutElement.appendChild(nameElement); + layoutElement.appendChild(nameElement); } - writeLayout( doc, tqlayoutElement ); - writeFormat( doc, tqlayoutElement, 1, 0, 0 ); // paragraph format, useful for empty parags + writeLayout( doc, layoutElement ); + writeFormat( doc, layoutElement, 1, 0, 0 ); // paragraph format, useful for empty parags - applyListStyle( doc, tqlayoutElement, paragraph ); + applyListStyle( doc, layoutElement, paragraph ); TQDomElement* paragraphStyle = m_styles[paragraph.attributeNS( ooNS::text, "style-name", TQString() )]; TQString masterPageName = paragraphStyle ? paragraphStyle->attributeNS( ooNS::style, "master-page-name", TQString() ) : TQString(); @@ -1222,10 +1222,10 @@ TQDomElement OoWriterImport::parseParagraph( TQDomDocument& doc, const TQDomElem else { m_currentMasterPage = masterPageName; - TQDomElement pageBreakElem = tqlayoutElement.namedItem( "PAGEBREAKING" ).toElement(); + TQDomElement pageBreakElem = layoutElement.namedItem( "PAGEBREAKING" ).toElement(); if ( !pageBreakElem.isNull() ) { pageBreakElem = doc.createElement( "PAGEBREAKING" ); - tqlayoutElement.appendChild( pageBreakElem ); + layoutElement.appendChild( pageBreakElem ); } pageBreakElem.setAttribute( "hardFrameBreak", "true" ); // We have no way to store the new page tqlayout, KWord doesn't have sections. @@ -1454,9 +1454,9 @@ void OoWriterImport::writeFormat( TQDomDocument& doc, TQDomElement& formats, int formats.appendChild( format ); } -void OoWriterImport::writeLayout( TQDomDocument& doc, TQDomElement& tqlayoutElement ) +void OoWriterImport::writeLayout( TQDomDocument& doc, TQDomElement& layoutElement ) { - Q_ASSERT( tqlayoutElement.ownerDocument() == doc ); + Q_ASSERT( layoutElement.ownerDocument() == doc ); // Always write out the tqalignment, it's required TQDomElement flowElement = doc.createElement("FLOW"); @@ -1476,7 +1476,7 @@ void OoWriterImport::writeLayout( TQDomDocument& doc, TQDomElement& tqlayoutElem else flowElement.setAttribute( "align", "auto" ); } - tqlayoutElement.appendChild( flowElement ); + layoutElement.appendChild( flowElement ); if ( m_styleStack.hasAttributeNS( ooNS::fo, "writing-mode" ) ) // http://web4.w3.org/TR/xsl/slice7.html#writing-mode { @@ -1486,19 +1486,19 @@ void OoWriterImport::writeLayout( TQDomDocument& doc, TQDomElement& tqlayoutElem } // Indentation (margins) - OoUtils::importIndents( tqlayoutElement, m_styleStack ); + OoUtils::importIndents( layoutElement, m_styleStack ); // Offset before and after paragraph - OoUtils::importTopBottomMargin( tqlayoutElement, m_styleStack ); + OoUtils::importTopBottomMargin( layoutElement, m_styleStack ); // Line spacing - OoUtils::importLineSpacing( tqlayoutElement, m_styleStack ); + OoUtils::importLineSpacing( layoutElement, m_styleStack ); // Tabulators - OoUtils::importTabulators( tqlayoutElement, m_styleStack ); + OoUtils::importTabulators( layoutElement, m_styleStack ); // Borders - OoUtils::importBorders( tqlayoutElement, m_styleStack ); + OoUtils::importBorders( layoutElement, m_styleStack ); // Page breaking. This isn't in OoUtils since it doesn't apply to KPresenter if( m_styleStack.hasAttributeNS( ooNS::fo, "break-before") || @@ -1528,7 +1528,7 @@ void OoWriterImport::writeLayout( TQDomDocument& doc, TQDomElement& tqlayoutElem TQString val = m_styleStack.attributeNS( ooNS::fo, "keep-with-next" ); pageBreak.setAttribute("keepWithNext", ( val == "true" || val == "always" ) ? "true" : "false"); } - tqlayoutElement.appendChild( pageBreak ); + layoutElement.appendChild( pageBreak ); } // TODO in KWord: padding @@ -1566,7 +1566,7 @@ void OoWriterImport::writeLayout( TQDomDocument& doc, TQDomElement& tqlayoutElem vertical tqalignment - a bit like offsetfrombaseline (but not for subscript/superscript, in general) Michael said those are in fact parag properties: style:text-autospace, 3.10.32 - not implemented in kotext - style:line-break, 3.10.37 - aptqparently that's for some Asian languages + style:line-break, 3.10.37 - apparently that's for some Asian languages */ } diff --git a/filters/kword/oowriter/oowriterimport.h b/filters/kword/oowriter/oowriterimport.h index 1b646c2e..18f57e68 100644 --- a/filters/kword/oowriter/oowriterimport.h +++ b/filters/kword/oowriter/oowriterimport.h @@ -47,16 +47,16 @@ private: void parseList( TQDomDocument& doc, const TQDomElement& list, TQDomElement& currentFramesetElement ); bool pushListLevelStyle( const TQString& listStyleName, int level ); bool pushListLevelStyle( const TQString& listStyleName, TQDomElement& fullListStyle, int level ); - void applyListStyle( TQDomDocument& doc, TQDomElement& tqlayoutElement, const TQDomElement& paragraph ); - void writeCounter( TQDomDocument& doc, TQDomElement& tqlayoutElement, bool heading, int level, bool ordered ); + void applyListStyle( TQDomDocument& doc, TQDomElement& layoutElement, const TQDomElement& paragraph ); + void writeCounter( TQDomDocument& doc, TQDomElement& layoutElement, bool heading, int level, bool ordered ); TQDomElement parseParagraph( TQDomDocument& doc, const TQDomElement& paragraph ); void parseSpanOrSimilar( TQDomDocument& doc, const TQDomElement& tqparent, TQDomElement& kwordParagraph, TQDomElement& kwordFormats, TQString& paragraphText, uint& pos); - // Reads from m_styleStack, writes the text properties to tqparentElement - void writeFormat( TQDomDocument& doc, TQDomElement& tqparentElement, int id, int pos, int length ); - // Reads from m_styleStack, writes the paragraph properties to tqlayoutElement - void writeLayout( TQDomDocument& doc, TQDomElement& tqlayoutElement ); + // Reads from m_styleStack, writes the text properties to parentElement + void writeFormat( TQDomDocument& doc, TQDomElement& parentElement, int id, int pos, int length ); + // Reads from m_styleStack, writes the paragraph properties to layoutElement + void writeLayout( TQDomDocument& doc, TQDomElement& layoutElement ); enum NewFrameBehavior { Reconnect=0, NoFollowup=1, Copy=2 }; - TQDomElement createInitialFrame( TQDomElement& tqparentFramesetElem, double left, double right, double top, double bottom, bool autoExtend, NewFrameBehavior nfb ); + TQDomElement createInitialFrame( TQDomElement& parentFramesetElem, double left, double right, double top, double bottom, bool autoExtend, NewFrameBehavior nfb ); void createStyles( TQDomDocument &doc ); void createDocumentInfo( TQDomDocument &docinfo ); void createDocumentContent( TQDomDocument &doccontent, TQDomElement& mainFramesetElement ); diff --git a/filters/kword/pdf/DESIGN b/filters/kword/pdf/DESIGN index 1208b8db..d2d5bb08 100644 --- a/filters/kword/pdf/DESIGN +++ b/filters/kword/pdf/DESIGN @@ -59,7 +59,7 @@ PDFImport::convert | | | | | |- associate links | | | - | | |- Page::initParagraph: compute tabs, indents and tqalignments + | | |- Page::initParagraph: compute tabs, indents and alignments | | | | | |- Page::fillParagrap: remove hyphen/eol, add tabs, add text | | | diff --git a/filters/kword/pdf/FilterDevice.cpp b/filters/kword/pdf/FilterDevice.cpp index 0d840fc3..b47770c6 100644 --- a/filters/kword/pdf/FilterDevice.cpp +++ b/filters/kword/pdf/FilterDevice.cpp @@ -295,14 +295,14 @@ uint Device::initImage(GfxState *state, int width, int height, void Device::drawImage(GfxState *state, Object *, Stream *str, int width, int height, GfxImageColorMap *colorMap, - int *tqmaskColors, GBool inlineImg) + int *maskColors, GBool inlineImg) { kdDebug(30516) << "image kind=" << str->getKind() << " inline=" << inlineImg - << " tqmaskColors=" << (tqmaskColors!=0) << endl; + << " maskColors=" << (maskColors!=0) << endl; if ( !_data.options().importImages ) return; - uint offset = initImage(state, width, height, tqmaskColors!=0); + uint offset = initImage(state, width, height, maskColors!=0); // read pixels int nbComps = colorMap->getNumPixelComps(); @@ -316,9 +316,9 @@ void Device::drawImage(GfxState *state, Object *, Stream *str, GfxRGB rgb; colorMap->getRGB(p, &rgb); int alpha = 255; - if (tqmaskColors) { + if (maskColors) { for (int k=0; k<nbComps; k++) - if ( p[k]<tqmaskColors[2*k] || p[k]>tqmaskColors[2*k+1] ) { + if ( p[k]<maskColors[2*k] || p[k]>maskColors[2*k+1] ) { alpha = 0; break; } diff --git a/filters/kword/pdf/FilterDevice.h b/filters/kword/pdf/FilterDevice.h index 3318b4ac..7c4590fa 100644 --- a/filters/kword/pdf/FilterDevice.h +++ b/filters/kword/pdf/FilterDevice.h @@ -86,7 +86,7 @@ public: GBool inlineImg); virtual void drawImage(GfxState *, Object *ref, Stream *, int width, int height, GfxImageColorMap *colorMap, - int *tqmaskColors, GBool inlineImg); + int *maskColors, GBool inlineImg); //----- path painting virtual void stroke(GfxState *state); diff --git a/filters/kword/pdf/FilterPage.cpp b/filters/kword/pdf/FilterPage.cpp index aefa2acc..5391cb24 100644 --- a/filters/kword/pdf/FilterPage.cpp +++ b/filters/kword/pdf/FilterPage.cpp @@ -530,13 +530,13 @@ void Page::prepare() void Page::dump(const Paragraph &par) { - TQValueVector<TQDomElement> tqlayouts; + TQValueVector<TQDomElement> layouts; TQValueVector<TQDomElement> formats; // tabulations for (uint k=0; k<par.tabs.size(); k++) { TQDomElement element = par.tabs[k].createElement(_data); - tqlayouts.push_back(element); + layouts.push_back(element); } // indents @@ -545,14 +545,14 @@ void Page::dump(const Paragraph &par) element.setAttribute("left", par.leftIndent); double delta = par.firstIndent - par.leftIndent; if ( !equal(delta, 0) ) element.setAttribute("first", delta); - tqlayouts.push_back(element); + layouts.push_back(element); } // offset before if ( par.offset>0 ) { TQDomElement element = _data.createElement("OFFSETS"); element.setAttribute("before", par.offset); - tqlayouts.push_back(element); + layouts.push_back(element); } // flow @@ -568,7 +568,7 @@ void Page::dump(const Paragraph &par) if ( !flow.isEmpty() ) { TQDomElement element = _data.createElement("FLOW"); element.setAttribute("align", TQString(flow.utf8())); - tqlayouts.push_back(element); + layouts.push_back(element); } } @@ -587,7 +587,7 @@ void Page::dump(const Paragraph &par) pos += len; } - _data.createParagraph(text, par.type, tqlayouts, formats); + _data.createParagraph(text, par.type, layouts, formats); } void Page::dump() diff --git a/filters/kword/pdf/data.cpp b/filters/kword/pdf/data.cpp index 90fdc731..a6abf929 100644 --- a/filters/kword/pdf/data.cpp +++ b/filters/kword/pdf/data.cpp @@ -179,7 +179,7 @@ void Data::initPage(const TQValueVector<DRect> &rects, } void Data::createParagraph(const TQString &text, ParagraphType type, - const TQValueVector<TQDomElement> &tqlayouts, + const TQValueVector<TQDomElement> &layouts, const TQValueVector<TQDomElement> &formats) { TQDomElement paragraph = _document.createElement("PARAGRAPH"); @@ -194,8 +194,8 @@ void Data::createParagraph(const TQString &text, ParagraphType type, TQDomElement element = _document.createElement("NAME"); element.setAttribute("value", "Standard"); tqlayout.appendChild(element); - for (uint i=0; i<tqlayouts.size(); i++) - tqlayout.appendChild(tqlayouts[i]); + for (uint i=0; i<layouts.size(); i++) + tqlayout.appendChild(layouts[i]); if ( formats.size() ) { TQDomElement format = _document.createElement("FORMATS"); diff --git a/filters/kword/pdf/data.h b/filters/kword/pdf/data.h index d7ac0ba9..12c8a716 100644 --- a/filters/kword/pdf/data.h +++ b/filters/kword/pdf/data.h @@ -45,7 +45,7 @@ public: TQDomElement createElement(const TQString &name) { return _document.createElement(name); } void createParagraph(const TQString &text, ParagraphType type, - const TQValueVector<TQDomElement> &tqlayouts, + const TQValueVector<TQDomElement> &layouts, const TQValueVector<TQDomElement> &formats); KoFilterChain *chain() const { return _chain; } diff --git a/filters/kword/pdf/diffs/xpdf_security_integer_overflow_2.diff b/filters/kword/pdf/diffs/xpdf_security_integer_overflow_2.diff index 6257d287..e6464612 100644 --- a/filters/kword/pdf/diffs/xpdf_security_integer_overflow_2.diff +++ b/filters/kword/pdf/diffs/xpdf_security_integer_overflow_2.diff @@ -104,14 +104,14 @@ diff -u -p -r1.3 -r1.3.2.1 +++ xpdf/Gfx.cc 22 Dec 2004 12:07:12 -0000 1.3.2.1 @@ -2379,7 +2379,9 @@ void Gfx::doImage(Object *ref, Stream *s haveMask = gFalse; - dict->lookup("Mask", &tqmaskObj); - if (tqmaskObj.isArray()) { -- for (i = 0; i < tqmaskObj.arrayGetLength(); ++i) { + dict->lookup("Mask", &maskObj); + if (maskObj.isArray()) { +- for (i = 0; i < maskObj.arrayGetLength(); ++i) { + for (i = 0; -+ i < tqmaskObj.arrayGetLength() && i < 2*gfxColorMaxComps; ++ i < maskObj.arrayGetLength() && i < 2*gfxColorMaxComps; + ++i) { - tqmaskObj.arrayGet(i, &obj1); - tqmaskColors[i] = obj1.getInt(); + maskObj.arrayGet(i, &obj1); + maskColors[i] = obj1.getInt(); obj1.free(); Index: xpdf/GfxState.cc =================================================================== diff --git a/filters/kword/pdf/fstring.cpp b/filters/kword/pdf/fstring.cpp index 88a79a94..1dd953aa 100644 --- a/filters/kword/pdf/fstring.cpp +++ b/filters/kword/pdf/fstring.cpp @@ -36,7 +36,7 @@ TQDomElement Tabulator::createElement(Data &data) const element.setAttribute("ptpos", pos); element.setAttribute("filling", filling); if ( tqalignment==Character ) - element.setAttribute("alignchar", TQString(tqalignmentChar)); + element.setAttribute("alignchar", TQString(alignmentChar)); return element; } diff --git a/filters/kword/pdf/fstring.h b/filters/kword/pdf/fstring.h index f860b92f..6e4d0b6a 100644 --- a/filters/kword/pdf/fstring.h +++ b/filters/kword/pdf/fstring.h @@ -47,7 +47,7 @@ public: double pos; Alignment tqalignment; Filling filling; - TQChar tqalignmentChar; + TQChar alignmentChar; }; inline bool operator <(const Tabulator &t1, const Tabulator &t2) diff --git a/filters/kword/pdf/status.html b/filters/kword/pdf/status.html index 4e6c263c..946c3df4 100644 --- a/filters/kword/pdf/status.html +++ b/filters/kword/pdf/status.html @@ -50,7 +50,7 @@ <td><ul> <li>import text with formatting. <li>import links. - <li>import images (image tqmasks cannot be handled correctly thought). + <li>import images (image masks cannot be handled correctly thought). </ul></td> </tr> diff --git a/filters/kword/pdf/transform.h b/filters/kword/pdf/transform.h index 8f8ae7f1..c7fe3bc3 100644 --- a/filters/kword/pdf/transform.h +++ b/filters/kword/pdf/transform.h @@ -75,7 +75,7 @@ namespace PDFImport CharType checkSpecial(Unicode, Unicode &res); // detect some letter/accent combinations - // (latex tqlayouts them separately) + // (latex layouts them separately) Unicode checkCombi(Unicode letter, Unicode accent); } diff --git a/filters/kword/pdf/xpdf/xpdf/Catalog.cc b/filters/kword/pdf/xpdf/xpdf/Catalog.cc index 4a68d3b3..8f7e6b04 100644 --- a/filters/kword/pdf/xpdf/xpdf/Catalog.cc +++ b/filters/kword/pdf/xpdf/xpdf/Catalog.cc @@ -25,7 +25,7 @@ #include "Catalog.h" // This define is used to limit the depth of recursive readPageTree calls -// This is needed because the page tree nodes can reference their tqparents +// This is needed because the page tree nodes can reference their parents // leaving us in an infinite loop // Most sane pdf documents don't have a call depth higher than 10 #define MAX_CALL_DEPTH 1000 diff --git a/filters/kword/pdf/xpdf/xpdf/Gfx.cc b/filters/kword/pdf/xpdf/xpdf/Gfx.cc index d357ba94..53999975 100644 --- a/filters/kword/pdf/xpdf/xpdf/Gfx.cc +++ b/filters/kword/pdf/xpdf/xpdf/Gfx.cc @@ -2263,9 +2263,9 @@ void Gfx::doImage(Object *ref, Stream *str, GBool inlineImg) { GBool invert; GfxColorSpace *colorSpace; GfxImageColorMap *colorMap; - Object tqmaskObj; + Object maskObj; GBool haveMask; - int tqmaskColors[2*gfxColorMaxComps]; + int maskColors[2*gfxColorMaxComps]; Object obj1, obj2; int i; @@ -2377,13 +2377,13 @@ void Gfx::doImage(Object *ref, Stream *str, GBool inlineImg) { // get the tqmask haveMask = gFalse; - dict->lookup("Mask", &tqmaskObj); - if (tqmaskObj.isArray()) { + dict->lookup("Mask", &maskObj); + if (maskObj.isArray()) { for (i = 0; - i < tqmaskObj.arrayGetLength() && i < 2*gfxColorMaxComps; + i < maskObj.arrayGetLength() && i < 2*gfxColorMaxComps; ++i) { - tqmaskObj.arrayGet(i, &obj1); - tqmaskColors[i] = obj1.getInt(); + maskObj.arrayGet(i, &obj1); + maskColors[i] = obj1.getInt(); obj1.free(); } haveMask = gTrue; @@ -2391,10 +2391,10 @@ void Gfx::doImage(Object *ref, Stream *str, GBool inlineImg) { // draw it out->drawImage(state, ref, str, width, height, colorMap, - haveMask ? tqmaskColors : (int *)NULL, inlineImg); + haveMask ? maskColors : (int *)NULL, inlineImg); delete colorMap; - tqmaskObj.free(); + maskObj.free(); } if ((i = width * height) > 1000) { diff --git a/filters/kword/pdf/xpdf/xpdf/GfxFont.cc b/filters/kword/pdf/xpdf/xpdf/GfxFont.cc index 7886ae69..1ed21174 100644 --- a/filters/kword/pdf/xpdf/xpdf/GfxFont.cc +++ b/filters/kword/pdf/xpdf/xpdf/GfxFont.cc @@ -738,7 +738,7 @@ Gfx8BitFont::Gfx8BitFont(XRef *xref, const char *tagA, Ref idA, GString *nameA, } else { // this is technically an error -- the Widths entry is required // for all but the Base-14 fonts -- but certain PDF generators - // aptqparently don't include widths for Arial and TimesNewRoman + // apparently don't include widths for Arial and TimesNewRoman if (isFixedWidth()) { i = 0; } else if (isSerif()) { diff --git a/filters/kword/pdf/xpdf/xpdf/ImageOutputDev.cc b/filters/kword/pdf/xpdf/xpdf/ImageOutputDev.cc index 43bfc793..1a6d87e1 100644 --- a/filters/kword/pdf/xpdf/xpdf/ImageOutputDev.cc +++ b/filters/kword/pdf/xpdf/xpdf/ImageOutputDev.cc @@ -96,7 +96,7 @@ void ImageOutputDev::drawImageMask(GfxState *state, Object *ref, Stream *str, void ImageOutputDev::drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, - int *tqmaskColors, GBool inlineImg) { + int *maskColors, GBool inlineImg) { FILE *f; ImageStream *imgStr; Guchar *p; diff --git a/filters/kword/pdf/xpdf/xpdf/ImageOutputDev.h b/filters/kword/pdf/xpdf/xpdf/ImageOutputDev.h index 4f317150..c3eb36e0 100644 --- a/filters/kword/pdf/xpdf/xpdf/ImageOutputDev.h +++ b/filters/kword/pdf/xpdf/xpdf/ImageOutputDev.h @@ -62,7 +62,7 @@ public: GBool inlineImg); virtual void drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, - int *tqmaskColors, GBool inlineImg); + int *maskColors, GBool inlineImg); private: diff --git a/filters/kword/pdf/xpdf/xpdf/OutputDev.cc b/filters/kword/pdf/xpdf/xpdf/OutputDev.cc index fbef8c17..34ec5683 100644 --- a/filters/kword/pdf/xpdf/xpdf/OutputDev.cc +++ b/filters/kword/pdf/xpdf/xpdf/OutputDev.cc @@ -81,7 +81,7 @@ void OutputDev::drawImageMask(GfxState */*state*/, Object */*ref*/, void OutputDev::drawImage(GfxState */*state*/, Object */*ref*/, Stream *str, int width, int height, GfxImageColorMap *colorMap, - int */*tqmaskColors*/, GBool inlineImg) { + int */*maskColors*/, GBool inlineImg) { int i, j; if (inlineImg) { diff --git a/filters/kword/pdf/xpdf/xpdf/OutputDev.h b/filters/kword/pdf/xpdf/xpdf/OutputDev.h index 0e29c40c..a7e1f0ab 100644 --- a/filters/kword/pdf/xpdf/xpdf/OutputDev.h +++ b/filters/kword/pdf/xpdf/xpdf/OutputDev.h @@ -135,7 +135,7 @@ public: GBool inlineImg); virtual void drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, - int *tqmaskColors, GBool inlineImg); + int *maskColors, GBool inlineImg); #ifdef OPI_SUPPORT //----- OPI functions diff --git a/filters/kword/pdf/xpdf/xpdf/PSOutputDev.cc b/filters/kword/pdf/xpdf/xpdf/PSOutputDev.cc index 700c4829..671d0599 100644 --- a/filters/kword/pdf/xpdf/xpdf/PSOutputDev.cc +++ b/filters/kword/pdf/xpdf/xpdf/PSOutputDev.cc @@ -862,7 +862,7 @@ void PSOutputDev::setupFonts(Dict *resDict) { fontDict.free(); } -void PSOutputDev::setupFont(GfxFont *font, Dict *tqparentResDict) { +void PSOutputDev::setupFont(GfxFont *font, Dict *parentResDict) { Ref fontFileID; GString *name; PSFontParam *fontParam; @@ -960,7 +960,7 @@ void PSOutputDev::setupFont(GfxFont *font, Dict *tqparentResDict) { sprintf(type3Name, "T3_%d_%d", font->getID()->num, font->getID()->gen); psName = type3Name; - setupType3Font(font, psName, tqparentResDict); + setupType3Font(font, psName, parentResDict); // do 8-bit font substitution } else if (!font->isCIDFont()) { @@ -1477,7 +1477,7 @@ void PSOutputDev::setupEmbeddedCIDTrueTypeFont(GfxFont *font, Ref *id, } void PSOutputDev::setupType3Font(GfxFont *font, char *psName, - Dict *tqparentResDict) { + Dict *parentResDict) { Dict *resDict; Dict *charProcs; Object charProc; @@ -1491,7 +1491,7 @@ void PSOutputDev::setupType3Font(GfxFont *font, char *psName, if ((resDict = ((Gfx8BitFont *)font)->getResources())) { setupResources(resDict); } else { - resDict = tqparentResDict; + resDict = parentResDict; } // beginning comment @@ -2217,7 +2217,7 @@ void PSOutputDev::drawImageMask(GfxState *state, Object *ref, Stream *str, void PSOutputDev::drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, - int *tqmaskColors, GBool inlineImg) { + int *maskColors, GBool inlineImg) { int len; len = height * ((width * colorMap->getNumPixelComps() * diff --git a/filters/kword/pdf/xpdf/xpdf/PSOutputDev.h b/filters/kword/pdf/xpdf/xpdf/PSOutputDev.h index 245ff0b4..fbfc3a5c 100644 --- a/filters/kword/pdf/xpdf/xpdf/PSOutputDev.h +++ b/filters/kword/pdf/xpdf/xpdf/PSOutputDev.h @@ -131,7 +131,7 @@ public: GBool inlineImg); virtual void drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, - int *tqmaskColors, GBool inlineImg); + int *maskColors, GBool inlineImg); #if OPI_SUPPORT //----- OPI functions @@ -155,7 +155,7 @@ private: int firstPage, int lastPage, PSOutMode modeA); void setupResources(Dict *resDict); void setupFonts(Dict *resDict); - void setupFont(GfxFont *font, Dict *tqparentResDict); + void setupFont(GfxFont *font, Dict *parentResDict); void setupEmbeddedType1Font(Ref *id, char *psName); void setupExternalType1Font(GString *fileName, char *psName); void setupEmbeddedType1CFont(GfxFont *font, Ref *id, char *psName); @@ -163,7 +163,7 @@ private: void setupExternalTrueTypeFont(GfxFont *font, char *psName); void setupEmbeddedCIDType0Font(GfxFont *font, Ref *id, char *psName); void setupEmbeddedCIDTrueTypeFont(GfxFont *font, Ref *id, char *psName); - void setupType3Font(GfxFont *font, char *psName, Dict *tqparentResDict); + void setupType3Font(GfxFont *font, char *psName, Dict *parentResDict); void setupImages(Dict *resDict); void setupImage(Ref id, Stream *str); void addProcessColor(double c, double m, double y, double k); diff --git a/filters/kword/pdf/xpdf/xpdf/XOutputDev.cc b/filters/kword/pdf/xpdf/xpdf/XOutputDev.cc index f172ac41..dc37ee21 100644 --- a/filters/kword/pdf/xpdf/xpdf/XOutputDev.cc +++ b/filters/kword/pdf/xpdf/xpdf/XOutputDev.cc @@ -3294,7 +3294,7 @@ void XOutputDev::drawImageMask(GfxState *state, Object *ref, Stream *str, void XOutputDev::drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, - int *tqmaskColors, GBool inlineImg) { + int *maskColors, GBool inlineImg) { ImageStream *imgStr; XImage *image; int nComps, nVals, nBits; @@ -3464,7 +3464,7 @@ void XOutputDev::drawImage(GfxState *state, Object *ref, Stream *str, // allocate pixel buffer pixBuf = (GfxRGB *)gmalloc((yp + 1) * width * sizeof(GfxRGB)); - if (tqmaskColors) { + if (maskColors) { alphaBuf = (Guchar *)gmalloc((yp + 1) * width * sizeof(Guchar)); } else { alphaBuf = NULL; @@ -3475,11 +3475,11 @@ void XOutputDev::drawImage(GfxState *state, Object *ref, Stream *str, image->data = (char *)gmalloc(bh * image->bytes_per_line); // if the transform is anything other than a 0/90/180/270 degree - // rotation/flip, or if there is color key tqmasking, read the + // rotation/flip, or if there is color key masking, read the // backgound pixmap to fill in the corners if (!((ulx == llx && uly == ury) || (uly == lly && ulx == urx)) || - tqmaskColors) { + maskColors) { XGetSubImage(display, pixmap, cx0, cy0, cw, ch, (1 << depth) - 1, ZPixmap, image, cx1, cy1); } @@ -3540,8 +3540,8 @@ void XOutputDev::drawImage(GfxState *state, Object *ref, Stream *str, if (q) { *q = 1; for (k = 0; k < nComps; ++k) { - if (p2[k] < tqmaskColors[2*k] || - p2[k] > tqmaskColors[2*k]) { + if (p2[k] < maskColors[2*k] || + p2[k] > maskColors[2*k]) { *q = 0; break; } @@ -3657,7 +3657,7 @@ void XOutputDev::drawImage(GfxState *state, Object *ref, Stream *str, // free memory delete imgStr; gfree(pixBuf); - if (tqmaskColors) { + if (maskColors) { gfree(alphaBuf); } gfree(image->data); diff --git a/filters/kword/pdf/xpdf/xpdf/XOutputDev.h b/filters/kword/pdf/xpdf/xpdf/XOutputDev.h index 0d97af89..e4974f31 100644 --- a/filters/kword/pdf/xpdf/xpdf/XOutputDev.h +++ b/filters/kword/pdf/xpdf/xpdf/XOutputDev.h @@ -569,7 +569,7 @@ public: GBool inlineImg); virtual void drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, - int *tqmaskColors, GBool inlineImg); + int *maskColors, GBool inlineImg); //----- Type 3 font operators virtual void type3D0(GfxState *state, double wx, double wy); diff --git a/filters/kword/pdf/xpdf/xpdf/XPDFCore.cc b/filters/kword/pdf/xpdf/xpdf/XPDFCore.cc index a7897358..2aa620d6 100644 --- a/filters/kword/pdf/xpdf/xpdf/XPDFCore.cc +++ b/filters/kword/pdf/xpdf/xpdf/XPDFCore.cc @@ -106,16 +106,16 @@ XPDFCore *XPDFCore::currentSelectionOwner = NULL; // XPDFCore //------------------------------------------------------------------------ -XPDFCore::XPDFCore(Widget shellA, Widget tqparentWidgetA, +XPDFCore::XPDFCore(Widget shellA, Widget parentWidgetA, Gulong paperColorA, GBool fullScreenA, GBool reverseVideo, GBool installCmap, int rgbCubeSize) { GString *initialZoom; int i; shell = shellA; - tqparentWidget = tqparentWidgetA; - display = XtDisplay(tqparentWidget); - screenNum = XScreenNumberOfScreen(XtScreen(tqparentWidget)); + parentWidget = parentWidgetA; + display = XtDisplay(parentWidget); + screenNum = XScreenNumberOfScreen(XtScreen(parentWidget)); paperColor = paperColorA; fullScreen = fullScreenA; @@ -1364,7 +1364,7 @@ void XPDFCore::initWindow() { n = 0; XtSetArg(args[n], XmNscrollingPolicy, XmAPPLICATION_DEFINED); ++n; XtSetArg(args[n], XmNvisualPolicy, XmVARIABLE); ++n; - scrolledWin = XmCreateScrolledWindow(tqparentWidget, "scroll", args, n); + scrolledWin = XmCreateScrolledWindow(parentWidget, "scroll", args, n); XtManageChild(scrolledWin); n = 0; XtSetArg(args[n], XmNorientation, XmHORIZONTAL); ++n; diff --git a/filters/kword/pdf/xpdf/xpdf/XPDFCore.h b/filters/kword/pdf/xpdf/xpdf/XPDFCore.h index 25c26f6b..4c250704 100644 --- a/filters/kword/pdf/xpdf/xpdf/XPDFCore.h +++ b/filters/kword/pdf/xpdf/xpdf/XPDFCore.h @@ -84,8 +84,8 @@ typedef GString *(*XPDFReqPasswordCbk)(void *data, GBool again); class XPDFCore { public: - // Create viewer core inside <tqparentWidgetA>. - XPDFCore(Widget shellA, Widget tqparentWidgetA, + // Create viewer core inside <parentWidgetA>. + XPDFCore(Widget shellA, Widget parentWidgetA, Gulong paperColorA, GBool fullScreenA, GBool reverseVideo, GBool installCmap, int rgbCubeSize); @@ -229,7 +229,7 @@ private: Visual *visual; Colormap colormap; Widget shell; // top-level shell containing the widget - Widget tqparentWidget; // tqparent widget (not created by XPDFCore) + Widget parentWidget; // tqparent widget (not created by XPDFCore) Widget scrolledWin; Widget hScrollBar; Widget vScrollBar; diff --git a/filters/kword/pdf/xpdf/xpdf/XPDFTree.cc b/filters/kword/pdf/xpdf/xpdf/XPDFTree.cc index 1ead3a27..3440bf1c 100644 --- a/filters/kword/pdf/xpdf/xpdf/XPDFTree.cc +++ b/filters/kword/pdf/xpdf/xpdf/XPDFTree.cc @@ -57,7 +57,7 @@ static void deleteChildFromList(XPDFTreeEntry *e, XPDFTreeEntry **listHead); static void createGC(Widget widget); static void destroyGC(Widget widget); static void tqlayout(Widget widget, Widget instigator); -static int tqlayoutSubtree(XPDFTreeWidget w, Widget instigator, +static int layoutSubtree(XPDFTreeWidget w, Widget instigator, XPDFTreeEntry *e, Position x, Position y, Boolean visible); static void calcSize(Widget widget, Widget instigator, @@ -189,7 +189,7 @@ externaldef(xpdftreeclassrec) XPDFTreeClassRec xpdfTreeClassRec = { #endif NULL, // syn_constraint_resources 0, // num_syn_constraint_res's - XmInheritParentProcess, // tqparent_process + XmInheritParentProcess, // parent_process NULL // extension }, { // XPDFTree @@ -446,7 +446,7 @@ static XtGeometryResult tqgeometryManager(Widget widget, XPDFTreeWidget w = (XPDFTreeWidget)XtParent(widget); XPDFTreeWidgetClass cls = (XPDFTreeWidgetClass)XtClass(w); Dimension curWidth, curHeight, curBW; - XtWidgetGeometry tqparentReq; + XtWidgetGeometry parentReq; XtGeometryResult result; // deny any requests for a new position @@ -471,21 +471,21 @@ static XtGeometryResult tqgeometryManager(Widget widget, } // calculate the new ideal size - tqparentReq.width = 0; - tqparentReq.height = 0; + parentReq.width = 0; + parentReq.height = 0; if (cls->treeClass.calcSize) { (*cls->treeClass.calcSize)((Widget)w, widget, - &tqparentReq.width, &reply->height); + &parentReq.width, &reply->height); } else { - calcSize((Widget)w, widget, &tqparentReq.width, &reply->height); + calcSize((Widget)w, widget, &parentReq.width, &reply->height); } // send tqgeometry request to our tqparent - tqparentReq.request_mode = CWWidth | CWHeight; + parentReq.request_mode = CWWidth | CWHeight; if (request->request_mode & XtCWQueryOnly) { - tqparentReq.request_mode |= XtCWQueryOnly; + parentReq.request_mode |= XtCWQueryOnly; } - result = XtMakeGeometryRequest((Widget)w, &tqparentReq, NULL); + result = XtMakeGeometryRequest((Widget)w, &parentReq, NULL); if (result == XtGeometryAlmost) { result = XtGeometryNo; } @@ -709,11 +709,11 @@ static void tqlayout(Widget widget, Widget instigator) { x = w->tree.marginWidth + xpdfTreeIndent; y = w->tree.marginHeight; for (e = w->tree.root; e; e = e->next) { - y = tqlayoutSubtree(w, instigator, e, x, y, True); + y = layoutSubtree(w, instigator, e, x, y, True); } } -static int tqlayoutSubtree(XPDFTreeWidget w, Widget instigator, +static int layoutSubtree(XPDFTreeWidget w, Widget instigator, XPDFTreeEntry *e, Position x, Position y, Boolean visible) { Widget ew; @@ -748,7 +748,7 @@ static int tqlayoutSubtree(XPDFTreeWidget w, Widget instigator, // place this entry's tqchildren x += xpdfTreeIndent; for (child = e->tqchildren; child; child = child->next) { - y = tqlayoutSubtree(w, instigator, child, x, y, + y = layoutSubtree(w, instigator, child, x, y, visible && (!c || c->entryExpanded)); } diff --git a/filters/kword/pdf/xpdf/xpdf/XPDFTreeP.h b/filters/kword/pdf/xpdf/xpdf/XPDFTreeP.h index fecc2572..9f31f9e2 100644 --- a/filters/kword/pdf/xpdf/xpdf/XPDFTreeP.h +++ b/filters/kword/pdf/xpdf/xpdf/XPDFTreeP.h @@ -16,20 +16,20 @@ typedef void (*XPDFLayoutProc)(Widget widget, Widget instigator); typedef void (*XPDFCalcSizeProc)(Widget widget, Widget instigator, Dimension *totalWidth, Dimension *totalHeight); -typedef Boolean (*XPDFNeedRetqlayoutProc)(Widget oldWidget, Widget newWidget); +typedef Boolean (*XPDFNeedRelayoutProc)(Widget oldWidget, Widget newWidget); #define XPDFInheritCreateGC ((XtWidgetProc)_XtInherit) #define XPDFInheritDestroyGC ((XtWidgetProc)_XtInherit) #define XPDFInheritLayout ((XPDFLayoutProc)_XtInherit) #define XPDFInheritCalcSize ((XPDFCalcSizeProc)_XtInherit) -#define XPDFInheritNeedRetqlayout ((XPDFNeedRetqlayoutProc)_XtInherit) +#define XPDFInheritNeedRetqlayout ((XPDFNeedRelayoutProc)_XtInherit) typedef struct { XtWidgetProc createGC; XtWidgetProc destroyGC; XPDFLayoutProc tqlayout; XPDFCalcSizeProc calcSize; - XPDFNeedRetqlayoutProc needRetqlayout; + XPDFNeedRelayoutProc needRetqlayout; XtPointer extension; } XPDFTreeClassPart; diff --git a/filters/kword/rtf/export/ExportFilter.cc b/filters/kword/rtf/export/ExportFilter.cc index da43d2a4..67df3fd1 100644 --- a/filters/kword/rtf/export/ExportFilter.cc +++ b/filters/kword/rtf/export/ExportFilter.cc @@ -528,7 +528,7 @@ TQString RTFWorker::ProcessParagraphData ( const TQString ¶Text, LayoutData styleLayout; markup += lookupStyle(tqlayout.styleName, styleLayout); - markup += tqlayoutToRtf(styleLayout,tqlayout,true); + markup += layoutToRtf(styleLayout,tqlayout,true); if ( 1==tqlayout.formatData.text.verticalAlignment ) { @@ -1035,7 +1035,7 @@ void RTFWorker::writeStyleData(void) if (count>0) // \s0 is not written out *m_streamOut << "\\s" << count; - *m_streamOut << tqlayoutToRtf((*it),(*it),true); + *m_streamOut << layoutToRtf((*it),(*it),true); // \snext must be the last keyword before the style name // Find the number of the following style @@ -1458,13 +1458,13 @@ TQString RTFWorker::textFormatToRtf(const TextFormatting& formatOrigin, return strElement; } -TQString RTFWorker::tqlayoutToRtf(const LayoutData& tqlayoutOrigin, +TQString RTFWorker::layoutToRtf(const LayoutData& layoutOrigin, const LayoutData& tqlayout, const bool force) { TQString strLayout; - if (force || (tqlayoutOrigin.tqalignment!=tqlayout.tqalignment)) + if (force || (layoutOrigin.tqalignment!=tqlayout.tqalignment)) { if (tqlayout.tqalignment=="left") strLayout += "\\ql"; @@ -1486,40 +1486,40 @@ TQString RTFWorker::tqlayoutToRtf(const LayoutData& tqlayoutOrigin, } if ((tqlayout.indentLeft>=0.0) - && (force || (tqlayoutOrigin.indentLeft!=tqlayout.indentLeft))) + && (force || (layoutOrigin.indentLeft!=tqlayout.indentLeft))) { strLayout += "\\li"; strLayout += TQString::number(int(tqlayout.indentLeft)*20, 10); } if ((tqlayout.indentRight>=0.0) - && (force || (tqlayoutOrigin.indentRight!=tqlayout.indentRight))) + && (force || (layoutOrigin.indentRight!=tqlayout.indentRight))) { strLayout += "\\ri"; strLayout += TQString::number(int(tqlayout.indentRight)*20, 10); } - if (force || (tqlayoutOrigin.indentFirst!=tqlayout.indentFirst)) + if (force || (layoutOrigin.indentFirst!=tqlayout.indentFirst)) { strLayout += "\\fi"; strLayout += TQString::number(int(tqlayout.indentFirst)*20, 10); } if ((tqlayout.marginBottom>=0.0) - && (force || (tqlayoutOrigin.marginBottom!=tqlayout.marginBottom))) + && (force || (layoutOrigin.marginBottom!=tqlayout.marginBottom))) { strLayout += "\\sa"; strLayout += TQString::number(int(tqlayout.marginBottom)*20 ,10); } if ((tqlayout.marginTop>=0.0) - && (force || (tqlayoutOrigin.marginTop!=tqlayout.marginTop))) + && (force || (layoutOrigin.marginTop!=tqlayout.marginTop))) { strLayout += "\\sb"; strLayout += TQString::number(int(tqlayout.marginTop)*20, 10); } - if (force || (tqlayoutOrigin.keepLinesTogether!=tqlayout.keepLinesTogether)) + if (force || (layoutOrigin.keepLinesTogether!=tqlayout.keepLinesTogether)) { if(tqlayout.keepLinesTogether) strLayout += "\\keep"; } @@ -1529,22 +1529,22 @@ TQString RTFWorker::tqlayoutToRtf(const LayoutData& tqlayoutOrigin, // - AbiWord's RTF import does not like \*\pgbrk // ### TODO: decide if we really remove this code #if 0 - if (force || (tqlayoutOrigin.pageBreakBefore!=tqlayout.pageBreakBefore)) + if (force || (layoutOrigin.pageBreakBefore!=tqlayout.pageBreakBefore)) { if(tqlayout.pageBreakBefore) strLayout += "\\pagebb"; } // Note: RTF doesn't specify "page break after" // \*\pgbrk0 is used after OpenOffice.org Writer - if (force || (tqlayoutOrigin.pageBreakAfter!=tqlayout.pageBreakAfter)) + if (force || (layoutOrigin.pageBreakAfter!=tqlayout.pageBreakAfter)) { if(tqlayout.pageBreakAfter) strLayout += "\\*\\pgbrk0"; } #endif if (force - || ( tqlayoutOrigin.lineSpacingType != tqlayout.lineSpacingType ) - || ( tqlayoutOrigin.lineSpacing != tqlayout.lineSpacing ) ) + || ( layoutOrigin.lineSpacingType != tqlayout.lineSpacingType ) + || ( layoutOrigin.lineSpacing != tqlayout.lineSpacing ) ) { if ( tqlayout.lineSpacingType==LayoutData::LS_SINGLE ) ;// do nothing, single linespace is default in RTF @@ -1570,7 +1570,7 @@ TQString RTFWorker::tqlayoutToRtf(const LayoutData& tqlayoutOrigin, } if (!tqlayout.tabulatorList.isEmpty() - && (force || (tqlayoutOrigin.tabulatorList!=tqlayout.tabulatorList) )) + && (force || (layoutOrigin.tabulatorList!=tqlayout.tabulatorList) )) { TabulatorList::ConstIterator it; for (it=tqlayout.tabulatorList.begin();it!=tqlayout.tabulatorList.end();++it) @@ -1614,7 +1614,7 @@ TQString RTFWorker::tqlayoutToRtf(const LayoutData& tqlayoutOrigin, // TODO: borders // This must remain last, as it adds a terminating space. - strLayout+=textFormatToRtf(tqlayoutOrigin.formatData.text, + strLayout+=textFormatToRtf(layoutOrigin.formatData.text, tqlayout.formatData.text,force); return strLayout; diff --git a/filters/kword/rtf/export/ExportFilter.h b/filters/kword/rtf/export/ExportFilter.h index 77567980..88158efe 100644 --- a/filters/kword/rtf/export/ExportFilter.h +++ b/filters/kword/rtf/export/ExportFilter.h @@ -80,7 +80,7 @@ private: void writeStyleData(void); TQString textFormatToRtf(const TextFormatting& formatOrigin, const TextFormatting& formatData, const bool force); - TQString tqlayoutToRtf(const LayoutData& tqlayoutOrigin, + TQString layoutToRtf(const LayoutData& layoutOrigin, const LayoutData& tqlayout, const bool force); TQString lookupFont(const TQString& markup, const TQString& fontName); TQString lookupColor(const TQString& markup, const TQColor& color); |