diff options
Diffstat (limited to 'kword/KWDocument.cpp')
-rw-r--r-- | kword/KWDocument.cpp | 78 |
1 files changed, 39 insertions, 39 deletions
diff --git a/kword/KWDocument.cpp b/kword/KWDocument.cpp index 271359ba..55f5f351 100644 --- a/kword/KWDocument.cpp +++ b/kword/KWDocument.cpp @@ -483,8 +483,8 @@ void KWDocument::newZoomAndResolution( bool updateViews, bool forPrint ) // First recalc all frames (including the kotextdocument width) updateAllFrames(); - // Then retqlayout the text inside the frames - tqlayout(); + // Then relayout the text inside the frames + layout(); if ( updateViews ) { emit newContentsSize(); @@ -617,9 +617,9 @@ KoPageLayout KWDocument::pageLayout(int pageNumber /* = 0 */) const return pageManager()->pageLayout(pageNumber); } -void KWDocument::setPageLayout( const KoPageLayout& tqlayout, const KoColumns& cl, const KoKWHeaderFooter& hf, bool updateViews ) +void KWDocument::setPageLayout( const KoPageLayout& layout, const KoColumns& cl, const KoKWHeaderFooter& hf, bool updateViews ) { - m_pageLayout = tqlayout; + m_pageLayout = layout; if ( m_processingType == WP ) { m_pageColumns = cl; } @@ -643,8 +643,8 @@ void KWDocument::setPageLayout( const KoPageLayout& tqlayout, const KoColumns& c if ( updateViews ) { - // Invalidate document tqlayout, for proper repaint - this->tqlayout(); + // Invalidate document layout, for proper repaint + this->layout(); emit pageLayoutChanged( m_pageLayout ); updateContentsSize(); } @@ -953,10 +953,10 @@ void KWDocument::recalcFrames( int fromPage, int toPage /*-1 for all*/, uint fla if ( fromPage > toPage ) // this can happen with "endnotes only" pages :) // ### really? fromPage = toPage; // ie. start at the last real page KWFrameLayout frameLayout( this, headerFooterList, footnotesHFList, endnotesHFList ); - frameLayout.tqlayout( frameset, m_pageColumns.columns, fromPage, toPage, flags ); + frameLayout.layout( frameset, m_pageColumns.columns, fromPage, toPage, flags ); // If the number of pages changed, update views and variables etc. - // (now that the frame tqlayout has been done) + // (now that the frame layout has been done) if ( pageCount() != oldPages && !m_bGeneratingPreview ) { // Very much like the end of appendPage, but we don't want to call recalcFrames ;) @@ -1072,7 +1072,7 @@ bool KWDocument::loadOasis( const TQDomDocument& doc, KoOasisStyles& oasisStyles // In theory the page format is the style:master-page-name of the first paragraph... // But, hmm, in a doc with only a table there was no reference to the master page at all... - // So we load the standard page tqlayout to start with, and in KWTextParag + // So we load the standard page layout to start with, and in KWTextParag // we might overwrite it with another one. m_loadingInfo->m_currentMasterPage = "Standard"; if ( !loadOasisPageLayout( m_loadingInfo->m_currentMasterPage, context ) ) @@ -1133,12 +1133,12 @@ bool KWDocument::loadOasis( const TQDomDocument& doc, KoOasisStyles& oasisStyles // load padding, background and borders for the main frame const TQDomElement* masterPage = context.oasisStyles().masterPages()[ m_loadingInfo->m_currentMasterPage ]; - const TQDomElement *masterPageStyle = masterPage ? context.oasisStyles().findStyle(masterPage->attributeNS( KoXmlNS::style, "page-tqlayout-name", TQString() ) ) : 0; + const TQDomElement *masterPageStyle = masterPage ? context.oasisStyles().findStyle(masterPage->attributeNS( KoXmlNS::style, "page-layout-name", TQString() ) ) : 0; if ( masterPageStyle ) { KoStyleStack styleStack; styleStack.push( *masterPageStyle ); - styleStack.setTypeProperties( "page-tqlayout" ); + styleStack.setTypeProperties( "page-layout" ); frame->loadBorderProperties( styleStack ); } fs->renumberFootNotes( false /*no repaint*/ ); @@ -1152,7 +1152,7 @@ bool KWDocument::loadOasis( const TQDomDocument& doc, KoOasisStyles& oasisStyles const TQString localName = tag.localName(); if ( localName == "page-sequence" && tag.namespaceURI() == KoXmlNS::text ) { - // We don't have support for changing the page tqlayout yet, so just take the + // We don't have support for changing the page layout yet, so just take the // number of pages int pages=1; TQDomElement page; @@ -1205,14 +1205,14 @@ bool KWDocument::loadOasisPageLayout( const TQString& masterPageName, KoOasisCon const KoOasisStyles& oasisStyles = context.oasisStyles(); const TQDomElement* masterPage = oasisStyles.masterPages()[ masterPageName ]; Q_ASSERT( masterPage ); - const TQDomElement *masterPageStyle = masterPage ? oasisStyles.findStyle( masterPage->attributeNS( KoXmlNS::style, "page-tqlayout-name", TQString() ) ) : 0; + const TQDomElement *masterPageStyle = masterPage ? oasisStyles.findStyle( masterPage->attributeNS( KoXmlNS::style, "page-layout-name", TQString() ) ) : 0; Q_ASSERT( masterPageStyle ); if ( masterPageStyle ) { m_pageLayout.loadOasis( *masterPageStyle ); pageManager()->setDefaultPage(m_pageLayout); - const TQDomElement properties( KoDom::namedItemNS( *masterPageStyle, KoXmlNS::style, "page-tqlayout-properties" ) ); + const TQDomElement properties( KoDom::namedItemNS( *masterPageStyle, KoXmlNS::style, "page-layout-properties" ) ); const TQDomElement footnoteSep = KoDom::namedItemNS( properties, KoXmlNS::style, "footnote-sep" ); if ( !footnoteSep.isNull() ) { // style:width="0.018cm" style:distance-before-sep="0.101cm" @@ -1292,19 +1292,19 @@ bool KWDocument::loadMasterPageStyle( const TQString& masterPageName, KoOasisCon const KoOasisStyles& oasisStyles = context.oasisStyles(); const TQDomElement* masterPage = oasisStyles.masterPages()[ masterPageName ]; Q_ASSERT( masterPage ); - const TQDomElement *masterPageStyle = masterPage ? oasisStyles.findStyle( masterPage->attributeNS( KoXmlNS::style, "page-tqlayout-name", TQString() ) ) : 0; + const TQDomElement *masterPageStyle = masterPage ? oasisStyles.findStyle( masterPage->attributeNS( KoXmlNS::style, "page-layout-name", TQString() ) ) : 0; Q_ASSERT( masterPageStyle ); // This check is done here and not in loadOasisPageLayout in case the Standard master-page // has no page information but the first paragraph points to a master-page that does (#129585) if ( m_pageLayout.ptWidth <= 1e-13 || m_pageLayout.ptHeight <= 1e-13 ) { - // Loading page tqlayout failed, try to see why. - TQDomElement properties( KoDom::namedItemNS( *masterPageStyle, KoXmlNS::style, "page-tqlayout-properties" ) ); + // Loading page layout failed, try to see why. + TQDomElement properties( KoDom::namedItemNS( *masterPageStyle, KoXmlNS::style, "page-layout-properties" ) ); //if ( properties.isNull() ) - // setErrorMessage( i18n( "Invalid document. No page tqlayout properties were found. The application which produced this document isn't OASIS-compliant." ) ); + // setErrorMessage( i18n( "Invalid document. No page layout properties were found. The application which produced this document isn't OASIS-compliant." ) ); //else if ( properties.hasAttributeNS( KoXmlNS::fo, "page-width" ) ) - // setErrorMessage( i18n( "Invalid document. Page tqlayout has no page width. The application which produced this document isn't OASIS-compliant." ) ); + // setErrorMessage( i18n( "Invalid document. Page layout has no page width. The application which produced this document isn't OASIS-compliant." ) ); //else if ( properties.hasAttributeNS( "http://www.w3.org/1999/XSL/Format", "page-width" ) ) setErrorMessage( i18n( "Invalid document. 'fo' has the wrong namespace. The application which produced this document is not OASIS-compliant." ) ); @@ -2705,7 +2705,7 @@ void KWDocument::completePasting() processAnchorRequests(); if ( processFootNoteRequests() ) { - // We pasted footnotes. Retqlayout frames. + // We pasted footnotes. Relayout frames. recalcFrames(); } @@ -2837,7 +2837,7 @@ bool KWDocument::saveOasisHelper( KoStore* store, KoXmlWriter* manifestWriter, S } // Header and footers save their content into master-styles/master-page, and their - // styles into the page-tqlayout automatic-style. + // styles into the page-layout automatic-style. // However the paragraph styles used by header/footers need to be known before // hand, to promote them to styles.xml. So we collect them first, which means // storing the content into a buffer. @@ -3251,8 +3251,8 @@ void KWDocument::saveOasisDocumentStyles( KoStore* store, KoGenStyles& mainStyle // if there's more than one pagemaster we need to rethink all this pageLayoutName = mainStyles.lookup( pageLayout, "pm" ); - pageLayout.writeStyle( stylesWriter, mainStyles, "style:page-tqlayout", pageLayoutName, - "style:page-tqlayout-properties", false /*don't close*/ ); + pageLayout.writeStyle( stylesWriter, mainStyles, "style:page-layout", pageLayoutName, + "style:page-layout-properties", false /*don't close*/ ); // Ouch another problem: there is only one header style in oasis // ##### can't have different borders for even/odd headers... @@ -3301,7 +3301,7 @@ void KWDocument::saveOasisDocumentStyles( KoStore* store, KoGenStyles& mainStyle stylesWriter->endElement(); // header-style } } - stylesWriter->endElement(); // style:page-tqlayout + stylesWriter->endElement(); // style:page-layout // Headers and footers might have created new automatic parag/text styles -> save those KWOasisSaver::writeAutomaticStyles( *stylesWriter, mainStyles, true ); @@ -3313,7 +3313,7 @@ void KWDocument::saveOasisDocumentStyles( KoStore* store, KoGenStyles& mainStyle stylesWriter->startElement( "office:master-styles" ); stylesWriter->startElement( "style:master-page" ); stylesWriter->addAttribute( "style:name", "Standard" ); - stylesWriter->addAttribute( "style:page-tqlayout-name", pageLayoutName ); + stylesWriter->addAttribute( "style:page-layout-name", pageLayoutName ); if ( isHeaderVisible() || isFooterVisible() ) { // ### TODO save them even when hidden (and not empty)? stylesWriter->addCompleteElement( headerFooterContent.data() ); @@ -3779,7 +3779,7 @@ void KWDocument::paintContent( TQPainter& painter, const TQRect& rectangle, bool viewMode->setDrawFrameBackground( !transparent ); viewMode->setDrawSelections( false ); - TQColorGroup cg = TQApplication::tqpalette().active(); + TQColorGroup cg = TQApplication::palette().active(); if (!transparent) { @@ -3810,7 +3810,7 @@ TQPixmap KWDocument::generatePreview( const TQSize& size ) double oldZoomX = zoomedResolutionX(); double oldZoomY = zoomedResolutionY(); - // Sometimes (due to the different resolution?) the tqlayout creates a new page + // Sometimes (due to the different resolution?) the layout creates a new page // while saving the preview. If this happens, we don't want to repaint the real views // (due to KWCanvas::slotNewContentsSize) // ##### One day when we have real doc/view separation in kotextparag, we shouldn't mess with @@ -4364,7 +4364,7 @@ void KWDocument::setHeaderVisible( bool h ) m_headerVisible = h; recalcFrames(); updateAllFrames(); - tqlayout(); + layout(); setModified(true); repaintAllViews( true ); } @@ -4374,7 +4374,7 @@ void KWDocument::setFooterVisible( bool f ) m_footerVisible = f; recalcFrames(); updateAllFrames(); - tqlayout(); + layout(); setModified(true); repaintAllViews( true ); } @@ -4457,9 +4457,9 @@ void KWDocument::setMailMergeRecord( int r ) slRecordNum = r; } -void KWDocument::getPageLayout( KoPageLayout& tqlayout, KoColumns& cl, KoKWHeaderFooter& hf ) +void KWDocument::getPageLayout( KoPageLayout& layout, KoColumns& cl, KoKWHeaderFooter& hf ) { - tqlayout = m_pageLayout; + layout = m_pageLayout; cl = m_pageColumns; hf = m_pageHeaderFooter; } @@ -4560,12 +4560,12 @@ void KWDocument::printDebug() } #endif -void KWDocument::tqlayout() +void KWDocument::layout() { TQPtrListIterator<KWFrameSet> it = framesetsIterator(); for (; it.current(); ++it ) if ( it.current()->isVisible() ) - it.current()->tqlayout(); + it.current()->layout(); } void KWDocument::invalidate(const KWFrameSet *skipThisFrameSet) @@ -5083,7 +5083,7 @@ void KWDocument::setTabStopValue ( double tabStop ) KWTextFrameSet *frm; for ( frm=textFramesets.first(); frm != 0; frm=textFramesets.next() ){ frm->textDocument()->setTabStops( ptToLayoutUnitPixX( tabStop )); - frm->tqlayout(); + frm->layout(); } repaintAllViews(); } @@ -5120,11 +5120,11 @@ void KWDocument::switchViewMode( const TQString& newViewModeType ) (*it)->switchModeView(); emit newContentsSize(); - // Since the text tqlayout depends on the view mode, we need to redo it + // Since the text layout depends on the view mode, we need to redo it // But after telling the canvas about the new viewmode, otherwise stuff like // slotNewContentsSize will crash. updateAllFrames(); - tqlayout(); + layout(); repaintAllViews( true ); for( TQValueList<KWView *>::Iterator it = m_lstViews.begin(); it != m_lstViews.end(); ++it ) @@ -5466,15 +5466,15 @@ void KWDocument::FramesChangedHandler::execute() { KWFrameSet *fs = *iter; fs->updateFrames(); if(!m_needLayout) - fs->tqlayout(); + fs->layout(); } KWFrameList::recalcAllFrames(m_parent); } - // If frame with text flowing around it -> re-tqlayout all frames + // If frame with text flowing around it -> re-layout all frames if ( m_needLayout) - m_parent->tqlayout(); + m_parent->layout(); //m_parent->repaintAllViewsExcept( 0 ); m_parent->repaintAllViews(); m_parent->updateRulerFrameStartEnd(); |