incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wangz...@apache.org
Subject svn commit: r1381876 - /incubator/ooo/trunk/main/sd/source/core/sdpage.cxx
Date Fri, 07 Sep 2012 05:16:44 GMT
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 <jiazema@gmail.com>
   Suggested by: Wang Zhe <kingwisemmx@gmail.com>
   Found by: Ma Bingbing <jiazema@gmail.com>
   Review by: Wang Zhe <kingwisemmx@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() )



Mime
View raw message