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

List:       kde-commits
Subject:    koffice/libs/kopageapp
From:       Thorsten Zachmann <t.zachmann () zagge ! de>
Date:       2008-05-26 4:52:56
Message-ID: 1211777576.317762.19869.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 812690 by zachmann:

o Create a new master page with the same page layout as the currently
  active master page.


 M  +9 -2      KoPAView.cpp  


--- trunk/koffice/libs/kopageapp/KoPAView.cpp #812689:812690
@@ -1,5 +1,5 @@
 /* This file is part of the KDE project
-   Copyright (C) 2006-2007 Thorsten Zachmann <zachmann@kde.org>
+   Copyright (C) 2006-2008 Thorsten Zachmann <zachmann@kde.org>
    Copyright (C) 2007 Thomas Zander <zander@kde.org>
 
    This library is free software; you can redistribute it and/or
@@ -498,7 +498,14 @@
 {
     KoPAPageBase * page = 0;
     if ( m_viewMode->masterMode() ) {
-        page = m_doc->newMasterPage();
+        KoPAMasterPage * masterPage = m_doc->newMasterPage();
+        // use the layout of the current active page for the new page
+        KoPageLayout & layout = masterPage->pageLayout();
+        KoPAMasterPage * activeMasterPage = dynamic_cast<KoPAMasterPage *>( m_activePage );
+        if ( activeMasterPage ) {
+            layout = activeMasterPage->pageLayout();
+        }
+        page = masterPage;
     }
     else {
         KoPAPage * activePage = dynamic_cast<KoPAPage*>( m_activePage );
[prev in list] [next in list] [prev in thread] [next in thread] 

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