[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    koffice/kword/part
From:       Thomas Zander <zander () kde ! org>
Date:       2010-12-27 13:15:18
Message-ID: 20101227131518.A5D4CAC8B5 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1209601 by zander:

Make page properties changes be effective

 M  +5 -1      KWDocument.cpp  
 M  +3 -0      KWDocument.h  
 M  +2 -0      commands/KWPageStylePropertiesCommand.cpp  


--- trunk/koffice/kword/part/KWDocument.cpp #1209600:1209601
@@ -780,8 +780,12 @@
 {
     // find all pages that have the page style set and re-layout them.
     Q_ASSERT(tfs->pageStyle().isValid());
+    updatePagesForStyle(tfs->pageStyle());
+}
+
+void KWDocument::updatePagesForStyle(const KWPageStyle &style)
+{
     PageProcessingQueue *ppq = 0;
-    const KWPageStyle style = tfs->pageStyle();
     foreach (KWPage page, pageManager()->pages()) {
         if (page.pageStyle() == style) {
             if (ppq == 0)
--- trunk/koffice/kword/part/KWDocument.h #1209600:1209601
@@ -166,6 +166,9 @@
 
     bool layoutFinishedAtleastOnce() const { return m_mainFramesetEverFinished; }
 
+    /// request a relayout of auto-generated frames on all pages of this argument style.
+    void updatePagesForStyle(const KWPageStyle &style);
+
 public slots:
     /// Register new frameset
     void addFrameSet(KWFrameSet *f);
--- trunk/koffice/kword/part/commands/KWPageStylePropertiesCommand.cpp #1209600:1209601
@@ -137,6 +137,7 @@
 {
     QUndoCommand::redo();
     m_style.priv()->copyProperties(m_styleAfter.priv());
+    m_document->updatePagesForStyle(m_style);
 #if 0
     m_document->m_frameLayout.createNewFramesForPage(m_page.pageNumber());
     m_document->firePageSetupChanged();
@@ -147,6 +148,7 @@
 {
     QUndoCommand::undo();
     m_style.priv()->copyProperties(m_styleBefore.priv());
+    m_document->updatePagesForStyle(m_style);
 #if 0
     m_document->m_frameLayout.createNewFramesForPage(m_page.pageNumber());
     m_document->firePageSetupChanged();
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic