You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by wa...@apache.org on 2012/09/07 07:16:44 UTC

svn commit: r1381876 - /incubator/ooo/trunk/main/sd/source/core/sdpage.cxx

Author: wangzcdl
Date: Fri Sep  7 05:16:44 2012
New Revision: 1381876

URL: http://svn.apache.org/viewvc?rev=1381876&view=rev
Log:
   Fix issue #i120345#: Textbox's position in template file(only title) is displayed incorrectly 
   * subversion/main/sd/source/core/sdpage.cxx 
   []Should check the subtitle in master page firstly, and set it to layout if exist

   Patch by: Ma Bingbing <ji...@gmail.com>
   Suggested by: Wang Zhe <ki...@gmail.com>
   Found by: Ma Bingbing <ji...@gmail.com>
   Review by: Wang Zhe <ki...@gmail.com>

Modified:
    incubator/ooo/trunk/main/sd/source/core/sdpage.cxx

Modified: incubator/ooo/trunk/main/sd/source/core/sdpage.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sd/source/core/sdpage.cxx?rev=1381876&r1=1381875&r2=1381876&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sd/source/core/sdpage.cxx (original)
+++ incubator/ooo/trunk/main/sd/source/core/sdpage.cxx Fri Sep  7 05:16:44 2012
@@ -1188,6 +1188,7 @@ static void CalcAutoLayoutRectangles( Sd
 	{
 		SdPage& rMasterPage = static_cast<SdPage&>(rPage.TRG_GetMasterPage());
 		SdrObject* pMasterTitle = rMasterPage.GetPresObj( PRESOBJ_TITLE );
+		SdrObject* pMasterSubTitle = rMasterPage.GetPresObj( PRESOBJ_TEXT );        
 		SdrObject* pMasterOutline = rMasterPage.GetPresObj( rPage.GetPageKind()==PK_NOTES ? PRESOBJ_NOTES : PRESOBJ_OUTLINE );
 
 		if( pMasterTitle )
@@ -1195,8 +1196,9 @@ static void CalcAutoLayoutRectangles( Sd
 
 		if (aTitleRect.IsEmpty() )
 			aTitleRect = rPage.GetTitleRect();
-
-		if( pMasterOutline )
+		if( pMasterSubTitle )                                           
+			aLayoutRect = pMasterSubTitle->GetLogicRect();
+		else if( pMasterOutline )
 			aLayoutRect = pMasterOutline->GetLogicRect();
 
 		if (aLayoutRect.IsEmpty() )