You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by al...@apache.org on 2013/10/08 17:40:16 UTC

svn commit: r1530312 - /openoffice/trunk/main/sd/source/core/sdpage.cxx

Author: alg
Date: Tue Oct  8 15:40:15 2013
New Revision: 1530312

URL: http://svn.apache.org/r1530312
Log:
i119056 Added direct refreshes for objects dependent of HeaderFooterSettings

Modified:
    openoffice/trunk/main/sd/source/core/sdpage.cxx

Modified: openoffice/trunk/main/sd/source/core/sdpage.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sd/source/core/sdpage.cxx?rev=1530312&r1=1530311&r2=1530312&view=diff
==============================================================================
--- openoffice/trunk/main/sd/source/core/sdpage.cxx (original)
+++ openoffice/trunk/main/sd/source/core/sdpage.cxx Tue Oct  8 15:40:15 2013
@@ -2800,20 +2800,67 @@ const HeaderFooterSettings& SdPage::getH
 
 void SdPage::setHeaderFooterSettings( const sd::HeaderFooterSettings& rNewSettings )
 {
-	if( mePageKind == PK_HANDOUT && !mbMaster )
-	{
-		(((SdPage&)TRG_GetMasterPage()).maHeaderFooterSettings) = rNewSettings;
-	}
-	else
-	{
-		maHeaderFooterSettings = rNewSettings;
-	}
+    if( mePageKind == PK_HANDOUT && !mbMaster )
+    {
+        (((SdPage&)TRG_GetMasterPage()).maHeaderFooterSettings) = rNewSettings;
+    }
+    else
+    {
+        maHeaderFooterSettings = rNewSettings;
+    }
+
+    SetChanged();
+
+    if(TRG_HasMasterPage())
+    {
+        TRG_GetMasterPageDescriptorViewContact().ActionChanged();
+
+        // #119056# For HeaderFooterSettings SdrObjects are used, but the properties
+        // used are not part of their model data, but kept in SD. This data is applied
+        // using a 'backdoor' on primitive creation. Thus, the normal mechanism to detect
+        // object changes does not work here. It is neccessary to trigger updates here
+        // directly. BroadcastObjectChange used for PagePreview invalidations, 
+        // flushViewObjectContacts used to invalidate and flush all visualizations in
+        // edit views.
+        SdPage* pMasterPage = dynamic_cast< SdPage* >(&TRG_GetMasterPage());
 
-	SetChanged();
-	if(TRG_HasMasterPage())
-	{
-		TRG_GetMasterPageDescriptorViewContact().ActionChanged();
-	}
+        if(pMasterPage)
+        {
+            SdrObject* pCandidate = 0;
+
+            pCandidate = pMasterPage->GetPresObj( PRESOBJ_HEADER );
+
+            if(pCandidate)
+            {
+                pCandidate->BroadcastObjectChange();
+                pCandidate->GetViewContact().flushViewObjectContacts();
+            }
+
+            pCandidate = pMasterPage->GetPresObj( PRESOBJ_DATETIME );
+
+            if(pCandidate)
+            {
+                pCandidate->BroadcastObjectChange();
+                pCandidate->GetViewContact().flushViewObjectContacts();
+            }
+
+            pCandidate = pMasterPage->GetPresObj( PRESOBJ_FOOTER );
+
+            if(pCandidate)
+            {
+                pCandidate->BroadcastObjectChange();
+                pCandidate->GetViewContact().flushViewObjectContacts();
+            }
+
+            pCandidate = pMasterPage->GetPresObj( PRESOBJ_SLIDENUMBER );
+
+            if(pCandidate)
+            {
+                pCandidate->BroadcastObjectChange();
+                pCandidate->GetViewContact().flushViewObjectContacts();
+            }
+        }
+    }
 }
 
 bool SdPage::checkVisibility(