[ooo-build-commit] patches/dev300

Radek Doulík rodo at kemper.freedesktop.org
Thu Jul 30 23:19:27 PDT 2009


 patches/dev300/offapi-layoutcode.diff |   33 +++++
 patches/dev300/sd-layoutcode.diff     |  135 +++++++++++++++---------
 patches/dev300/xmloff-layoutcode.diff |  190 ++++++++++------------------------
 3 files changed, 176 insertions(+), 182 deletions(-)

New commits:
commit 813ebc200cbec9ae14d61c49daa3e562a1dd97b8
Author: Dona Hertel <cocofan at mailbolt.com>
Date:   Thu Jul 30 01:15:10 2009 -0700

    beginning of xmloff functionality.
    
    * patches/dev300/offapi-layoutcode.diff:
    * patches/dev300/sd-layoutcode.diff:
    * patches/dev300/xmloff-layoutcode.diff:

diff --git a/patches/dev300/offapi-layoutcode.diff b/patches/dev300/offapi-layoutcode.diff
index 39f21b0..fc175b0 100644
--- a/patches/dev300/offapi-layoutcode.diff
+++ b/patches/dev300/offapi-layoutcode.diff
@@ -13,8 +13,8 @@ diff -Nrup offapi-m16/com/sun/star/presentation/makefile.mk offapi/com/sun/star/
  
 diff -Nrup offapi-m16/com/sun/star/presentation/XLayoutList.idl offapi/com/sun/star/presentation/XLayoutList.idl
 --- offapi-m16/com/sun/star/presentation/XLayoutList.idl	1969-12-31 16:00:00.000000000 -0800
-+++ offapi/com/sun/star/presentation/XLayoutList.idl	2009-07-26 20:00:46.000000000 -0700
-@@ -0,0 +1,109 @@
++++ offapi/com/sun/star/presentation/XLayoutList.idl	2009-07-29 22:58:25.000000000 -0700
+@@ -0,0 +1,138 @@
 +/*************************************************************************
 + *
 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -64,6 +64,9 @@ diff -Nrup offapi-m16/com/sun/star/presentation/XLayoutList.idl offapi/com/sun/s
 +
 +module com {  module sun {  module star {  module presentation {
 +
++//============================================================================
++/** for determining autolayout builtins */
++
 +enum UnoAutoLayout
 +{
 +   TITLE,
@@ -103,7 +106,33 @@ diff -Nrup offapi-m16/com/sun/star/presentation/XLayoutList.idl offapi/com/sun/s
 +};
 +
 +//=============================================================================
++/** for determining type of presentation object
++ */
++enum UnoPresKind {
++    NONE,
++	TITLE,
++	OUTLINE,
++	TEXT,
++	GRAPHIC,
++	OBJECT,
++	CHART,
++	ORGCHART,
++    TABLE,
++	IMAGE,
++	BACKGROUND,
++	PAGE,
++	HANDOUT,
++	NOTES,
++	HEADER,
++    FOOTER,
++	DATETIME,
++	SLIDENUMBER,
++	MAX
++};
 +
++
++
++//=============================================================================
 +/** The interface for the layout list.  Layout list stores information
 + *  on autolayouts (builtin and custom).
 + */
diff --git a/patches/dev300/sd-layoutcode.diff b/patches/dev300/sd-layoutcode.diff
index 00c2fa4..5cc5529 100644
--- a/patches/dev300/sd-layoutcode.diff
+++ b/patches/dev300/sd-layoutcode.diff
@@ -1,6 +1,6 @@
 diff -Nrup sd-m16/inc/drawdoc.hxx sd/inc/drawdoc.hxx
 --- sd-m16/inc/drawdoc.hxx	2009-07-25 19:24:39.000000000 -0700
-+++ sd/inc/drawdoc.hxx	2009-07-25 19:36:23.000000000 -0700
++++ sd/inc/drawdoc.hxx	2009-07-29 00:02:13.000000000 -0700
 @@ -57,6 +57,11 @@
  #endif
  #include "sddllapi.h"
@@ -679,8 +679,16 @@ diff -Nrup sd-m16/source/core/drawdoc3.cxx sd/source/core/drawdoc3.cxx
  			SdPresentationLayoutUndoAction * pPLUndoAction =
 diff -Nrup sd-m16/source/core/drawdoc.cxx sd/source/core/drawdoc.cxx
 --- sd-m16/source/core/drawdoc.cxx	2009-07-25 19:25:13.000000000 -0700
-+++ sd/source/core/drawdoc.cxx	2009-07-25 19:36:23.000000000 -0700
-@@ -97,6 +97,10 @@
++++ sd/source/core/drawdoc.cxx	2009-07-30 00:55:23.000000000 -0700
+@@ -34,6 +34,7 @@
+ #include "PageListWatcher.hxx"
+ #include <com/sun/star/text/WritingMode.hpp>
+ #include <com/sun/star/document/PrinterIndependentLayout.hpp>
++#include <com/sun/star/presentation/XLayoutList.hpp>
+ #include <svx/forbiddencharacterstable.hxx>
+ 
+ #include <svx/svxids.hrc>
+@@ -97,6 +98,10 @@
  #include "../ui/inc/optsitem.hxx"
  #include "../ui/inc/FrameView.hxx"
  
@@ -691,49 +699,43 @@ diff -Nrup sd-m16/source/core/drawdoc.cxx sd/source/core/drawdoc.cxx
  // #90477#
  #include <tools/tenccvt.hxx>
  
-@@ -107,6 +111,30 @@ using namespace ::com::sun::star::uno;
+@@ -107,6 +112,26 @@ using namespace ::com::sun::star::uno;
  using namespace ::com::sun::star::lang;
  using namespace ::com::sun::star::linguistic2;
  
 +
-+// to be placed here until decided where to do
-+LayoutList* autolayoutList=NULL;
++rtl::Reference< ::presentation::XLayoutList > autolayoutList;
 +
-+sd::LayoutList* GetLayoutList()
++LayoutList* GetLayoutList()
 +{
-+	if(autolayoutList) return autolayoutList;
-+	autolayoutList = new LayoutList();
-+	return autolayoutList;
-+}
-+
-+void DeleteLayoutList()
-+{
-+    if(autolayoutList)
-+    {
-+         delete autolayoutList;
-+         autolayoutList = NULL;
-+     }
++   if(!autolayoutList.is())
++   {
++       LayoutList* pList = new LayoutList();
++       if(pList)
++       {
++           pList->readFromFile();
++           autolayoutList.set(pList);
++       }
++       
++   }
++   return (LayoutList*) autolayoutList.get();
 +}
 +
 +
 +
-+
-+
  //////////////////////////////////////////////////////////////////////////////
  
  TYPEINIT1( SdDrawDocument, FmFormModel );
-@@ -374,6 +402,52 @@ SdDrawDocument::SdDrawDocument(DocumentT
+@@ -373,6 +398,55 @@ SdDrawDocument::SdDrawDocument(DocumentT
+ 
  		rLayerAdmin.SetControlLayerName(aControlLayerName);
  	}
- 
-+    // THIS IS HERE FOR TESTING THE LAYOUTLIST CLASSES
++    
++  LayoutList* list = GetLayoutList();
++	LayoutType* test;
 +	
-+//	LayoutList* list = GetLayoutList();
-+//	LayoutType* test;
-+/*	
 +	test = new LayoutType();
 +	test->setName(LString::CreateFromAscii("testing1..."));
-+	test->setLayoutNumber(0);
 +    test->setStrId(-1);  // no string resource id
 +	test->setWritingMode(WritingMode_LR_TB);
 +	test->setHBitmapId(BMP_FOIL_02_H);
@@ -746,12 +748,18 @@ diff -Nrup sd-m16/source/core/drawdoc.cxx sd/source/core/drawdoc.cxx
 +    test->setFactorWt(1,.5);
 +	test->setRecttype(1, RT_LAYOUT);
 +	
-+	if(list->addLayout(test, 3, PK_STANDARD)) OSL_TRACE("added to list");
-+*/	 
++	if(list->addLayout(test, 3, PK_STANDARD)) OSL_TRACE("layout1 added to list");
++	 
 +	// another one
-+/*	test = new LayoutType();
++    test = new LayoutType();
 +    if(test)
 +    {
++       test->setName(LString::CreateFromAscii("testing2..."));
++       test->setStrId(-1);  // no string resource id
++	   test->setWritingMode(WritingMode_LR_TB);
++	   test->setHBitmapId(BMP_FOIL_05_H);
++	   test->setLBitmapId(BMP_FOIL_05);
++     
 +	   test->createDefaultElement(); // title
 +	   test->createDefaultElement();
 +       test->setKind(1, PRESOBJ_CHART); // chart 
@@ -765,29 +773,39 @@ diff -Nrup sd-m16/source/core/drawdoc.cxx sd/source/core/drawdoc.cxx
 +	   test->setFactorHt(2,.333);
 +	   test->setFactorWt(2,.333);
 +	   test->setRecttype(2, RT_LAYOUT);
-+	
++	   // put at end of menu (-1)
 +       if(!list->addLayout(test, -1, PK_STANDARD))
 +	   { OSL_TRACE("Layout2 not added"); }
 +   } else
 +   { OSL_TRACE("Cannot create layout2"); }
-+*/
 +
  
+ 
  }
+@@ -403,6 +477,10 @@ SdDrawDocument::~SdDrawDocument()
+ 	CloseBookmarkDoc();
+ 	SetAllocDocSh(FALSE);
  
-@@ -457,6 +531,8 @@ SdDrawDocument::~SdDrawDocument()
++    // need to write any autolayout changes to file
++    sd::LayoutList* llist = GetLayoutList();
++    llist->writeToFile();
++    
+ 	// #116168#
+ 	ClearModel(sal_True);
+ 
+@@ -457,6 +535,8 @@ SdDrawDocument::~SdDrawDocument()
  
  	delete mpCharClass;
  	mpCharClass = NULL;
 +    
-+    DeleteLayoutList(); // needed to write autolayouts to the config file
++
  }
  
  /*************************************************************************
 diff -Nrup sd-m16/source/core/layoutlist.cxx sd/source/core/layoutlist.cxx
 --- sd-m16/source/core/layoutlist.cxx	1969-12-31 16:00:00.000000000 -0800
-+++ sd/source/core/layoutlist.cxx	2009-07-26 00:09:58.000000000 -0700
-@@ -0,0 +1,1310 @@
++++ sd/source/core/layoutlist.cxx	2009-07-29 20:57:40.000000000 -0700
+@@ -0,0 +1,1311 @@
 +/*************************************************************************
 + *
 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -877,19 +895,18 @@ diff -Nrup sd-m16/source/core/layoutlist.cxx sd/source/core/layoutlist.cxx
 +	maStandard.reserve(50);
 +	maHandout.reserve(50);
 +	maNotes.reserve(50);
-+    if(!mbTesting)  readFromFile();
++   
 +}
 +
 +LayoutList::~LayoutList()
 +{
 +    sal_uInt32 size = length();
 +    LayoutType* layout;
++    
++    OSL_TRACE("Deleting LayoutList class");
 +  
 +    if(size == 0) return; // empty list
 +  
-+  //first, save information to the config file
-+    if(!mbTesting) writeToFile();
-+  
 +  // delete objects in the list if
 +  // they are there.
 +    for(sal_uInt32 i = 0; i < size; i++)
@@ -935,6 +952,7 @@ diff -Nrup sd-m16/source/core/layoutlist.cxx sd/source/core/layoutlist.cxx
 +    StreamMode eMode = (STREAM_WRITE | STREAM_TRUNC);
 +    SvFileStream fs(*psFileName, eMode);
 +    
++    OSL_TRACE("Writing AutoLayout info to config file."); 
 +    if(fs.IsOpen())
 +    {
 +        LayoutType* layout;
@@ -1007,6 +1025,7 @@ diff -Nrup sd-m16/source/core/layoutlist.cxx sd/source/core/layoutlist.cxx
 +    StreamMode eMode = STREAM_READ;
 +    SvFileStream fs(*psFileName, eMode);
 +    
++    OSL_TRACE("Reading AutoLayout info from config file."); 
 +     if(!fs.IsOpen())
 +     {
 +       OSL_TRACE("readFromFile: Cannot open autolayout config file %s", STRTOCHAR(*psFileName));
@@ -1043,7 +1062,7 @@ diff -Nrup sd-m16/source/core/layoutlist.cxx sd/source/core/layoutlist.cxx
 +               llistsize = sNum.toInt32();
 +           }
 +     }
-+     OSL_TRACE("SIZE OF LIST %d", llistsize);
++     //OSL_TRACE("SIZE OF LIST %d", llistsize);
 +     // create enough entries
 +     maLayoutList.resize(llistsize, NULL);
 +      
@@ -3863,7 +3882,7 @@ diff -Nrup sd-m16/source/ui/toolpanel/LayoutMenu.hxx sd/source/ui/toolpanel/Layo
      */
 diff -Nrup sd-m16/source/ui/unoidl/unopage.cxx sd/source/ui/unoidl/unopage.cxx
 --- sd-m16/source/ui/unoidl/unopage.cxx	2009-07-25 19:25:14.000000000 -0700
-+++ sd/source/ui/unoidl/unopage.cxx	2009-07-26 22:05:47.000000000 -0700
++++ sd/source/ui/unoidl/unopage.cxx	2009-07-28 22:33:08.000000000 -0700
 @@ -36,6 +36,7 @@
  #include <com/sun/star/presentation/AnimationEffect.hpp>
  #include <com/sun/star/presentation/PresentationRange.hpp>
@@ -3885,20 +3904,38 @@ diff -Nrup sd-m16/source/ui/unoidl/unopage.cxx sd/source/ui/unoidl/unopage.cxx
  		{ MAP_CHAR_LEN("TransitionDuration"),			WID_TRANSITION_DURATION, &::getCppuType((const double*)0),			0,	0},
  		{ MAP_CHAR_LEN("LoopSound"),					WID_LOOP_SOUND, &::getBooleanCppuType(),					0, 0},
  		{ MAP_CHAR_LEN("NavigationOrder"),				WID_NAVORDER, &::com::sun::star::container::XIndexAccess::static_type(),0,	0},
-+        { MAP_CHAR_LEN("AutoLayoutList"),               WID_AUTOLAYOUT_LIST, &::getCppuType((const Reference< ::com::sun::star::presentation::XLayoutList >*)0), 0, 0},
++        { MAP_CHAR_LEN("AutoLayoutList"),               WID_AUTOLAYOUT_LIST, &::getCppuType((const Reference< ::com::sun::star::presentation::XLayoutList >*)0), beans::PropertyAttribute::READONLY, 0},
  		{0,0,0,0,0,0}
  	};
  
-@@ -265,7 +267,7 @@ const SfxItemPropertyMap* ImplGetMasterP
+@@ -206,7 +208,7 @@ const SfxItemPropertyMap* ImplGetDrawPag
+ 		{ MAP_CHAR_LEN("DateTimeText"),					WID_PAGE_DATETIMETEXT, &::getCppuType((const OUString*)0),				0,	0},
+ 		{ MAP_CHAR_LEN("DateTimeFormat"),				WID_PAGE_DATETIMEFORMAT, &::getCppuType((const sal_Int32*)0),			0,	0},
+ 		{ MAP_CHAR_LEN("NavigationOrder"),				WID_NAVORDER, &::com::sun::star::container::XIndexAccess::static_type(),0,	0},
+-
++        { MAP_CHAR_LEN("AutoLayoutList"),               WID_AUTOLAYOUT_LIST, &::getCppuType((const Reference< ::com::sun::star::presentation::XLayoutList >*)0), beans::PropertyAttribute::READONLY, 0},
+ 		{0,0,0,0,0,0}
+ 	};
+ 
+@@ -265,7 +267,8 @@ const SfxItemPropertyMap* ImplGetMasterP
  		{ MAP_CHAR_LEN(UNO_NAME_PAGE_WIDTH),			WID_PAGE_WIDTH,		&::getCppuType((const sal_Int32*)0),			0,	0},
  		{ MAP_CHAR_LEN("BackgroundFullSize"),			WID_PAGE_BACKFULL,	&::getBooleanCppuType(),						0, 0},
  		{ MAP_CHAR_LEN(sUNO_Prop_UserDefinedAttributes),WID_PAGE_USERATTRIBS, &::getCppuType((const Reference< ::com::sun::star::container::XNameContainer >*)0)  , 		0,     0},
 -		{ MAP_CHAR_LEN("IsBackgroundDark" ),			WID_PAGE_ISDARK,	&::getBooleanCppuType(),						beans::PropertyAttribute::READONLY, 0},
-+		{ MAP_CHAR_LEN("IsBackgroundDark" ),			WID_PAGE_ISDARK,	&::getBooleanCppuType(),                        beans::PropertyAttribute::READONLY,             0},
++		{ MAP_CHAR_LEN("IsBackgroundDark" ),			WID_PAGE_ISDARK,	&::getBooleanCppuType(),     beans::PropertyAttribute::READONLY,             0},
++        { MAP_CHAR_LEN("AutoLayoutList"),               WID_AUTOLAYOUT_LIST, &::getCppuType((const Reference< ::com::sun::star::presentation::XLayoutList >*)0), beans::PropertyAttribute::READONLY, 0},
+ 		{0,0,0,0,0,0}
+ 	};
+ 
+@@ -290,6 +293,7 @@ const SfxItemPropertyMap* ImplGetMasterP
+ 		{ MAP_CHAR_LEN("IsDateTimeFixed"),				WID_PAGE_DATETIMEFIXED, &::getBooleanCppuType(),					0, 0},
+ 		{ MAP_CHAR_LEN("DateTimeText"),					WID_PAGE_DATETIMETEXT, &::getCppuType((const OUString*)0),				0,	0},
+ 		{ MAP_CHAR_LEN("DateTimeFormat"),				WID_PAGE_DATETIMEFORMAT, &::getCppuType((const sal_Int32*)0),			0,	0},
++        { MAP_CHAR_LEN("AutoLayoutList"),               WID_AUTOLAYOUT_LIST, &::getCppuType((const Reference< ::com::sun::star::presentation::XLayoutList >*)0), beans::PropertyAttribute::READONLY, 0},
  		{0,0,0,0,0,0}
  	};
  
-@@ -506,6 +508,8 @@ void SAL_CALL SdGenericDrawPage::setProp
+@@ -506,6 +510,8 @@ void SAL_CALL SdGenericDrawPage::setProp
  		case WID_NAVORDER:
  			setNavigationOrder( aValue );
  			break;
@@ -3907,7 +3944,7 @@ diff -Nrup sd-m16/source/ui/unoidl/unopage.cxx sd/source/ui/unoidl/unopage.cxx
  		case WID_PAGE_LEFT:
  		case WID_PAGE_RIGHT:
  		case WID_PAGE_TOP:
-@@ -536,7 +540,7 @@ void SAL_CALL SdGenericDrawPage::setProp
+@@ -536,7 +542,7 @@ void SAL_CALL SdGenericDrawPage::setProp
  				GetPage()->SetPresChange( (PresChange)nValue );
  				break;
  			case WID_PAGE_LAYOUT:
@@ -3916,7 +3953,7 @@ diff -Nrup sd-m16/source/ui/unoidl/unopage.cxx sd/source/ui/unoidl/unopage.cxx
  				break;
  			case WID_PAGE_DURATION:
  				GetPage()->SetTime((sal_uInt32)nValue);
-@@ -899,6 +903,9 @@ Any SAL_CALL SdGenericDrawPage::getPrope
+@@ -899,6 +905,9 @@ Any SAL_CALL SdGenericDrawPage::getPrope
  
  	switch( pMap ? pMap->nWID : -1 )
  	{
diff --git a/patches/dev300/xmloff-layoutcode.diff b/patches/dev300/xmloff-layoutcode.diff
index 04fb7e7..1fda328 100644
--- a/patches/dev300/xmloff-layoutcode.diff
+++ b/patches/dev300/xmloff-layoutcode.diff
@@ -1,153 +1,81 @@
 diff -Nrup xmloff-m16/source/draw/sdxmlexp.cxx xmloff/source/draw/sdxmlexp.cxx
 --- xmloff-m16/source/draw/sdxmlexp.cxx	2009-07-27 00:38:42.000000000 -0700
-+++ xmloff/source/draw/sdxmlexp.cxx	2009-07-27 00:36:22.000000000 -0700
-@@ -39,6 +39,10 @@
- #include <com/sun/star/lang/ServiceNotRegisteredException.hpp>
- #include <com/sun/star/presentation/XPresentationSupplier.hpp>
- #include <com/sun/star/presentation/XCustomPresentationSupplier.hpp>
++++ xmloff/source/draw/sdxmlexp.cxx	2009-07-29 15:37:06.000000000 -0700
+@@ -47,6 +47,10 @@
+ #include <com/sun/star/drawing/XMasterPagesSupplier.hpp>
+ #include <com/sun/star/presentation/XHandoutMasterSupplier.hpp>
+ #include <com/sun/star/container/XIndexContainer.hpp>
 +#include <com/sun/star/presentation/XLayoutList.hpp>
-+#include <com/sun/star/presentation/UnoAutoLayout.hpp>
++#include <com/sun/star/presentation/AutoLayoutBuiltin.hpp>
 +#include <com/sun/star/awt/Rectangle.hpp>
 +#include <com/sun/star/awt/Size.hpp>
- #include <com/sun/star/task/XStatusIndicatorSupplier.hpp>
- #include <com/sun/star/lang/Locale.hpp>
- #include <com/sun/star/uno/Any.hxx>
-@@ -92,6 +96,8 @@
- 
- using ::rtl::OUString;
- using ::rtl::OUStringBuffer;
-+using ::com::sun::star::presentation::UnoAutoLayout;
-+using ::com::sun::star::presentation::XLayoutList;
- 
- using namespace ::com::sun::star;
- using namespace ::com::sun::star::uno;
-@@ -115,6 +121,7 @@ class ImpXMLEXPPageMasterInfo
- 	view::PaperOrientation		meOrientation;
- 	OUString					msName;
- 	OUString					msMasterPageName;
-+    Reference<XLayoutList>      maLayoutlist;
+ #include <com/sun/star/view/PaperOrientation.hpp>
+ #include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
+ #include <com/sun/star/style/XStyle.hpp>
+@@ -221,7 +225,7 @@ class ImpXMLAutoLayoutInfo
+ 	sal_Int32					mnGapY;
  
  public:
- 	ImpXMLEXPPageMasterInfo(const SdXMLExport& rExp, const Reference<XDrawPage>& xPage);
-@@ -131,6 +138,7 @@ public:
- 	sal_Int32 GetWidth() const { return mnWidth; }
- 	sal_Int32 GetHeight() const { return mnHeight; }
- 	view::PaperOrientation GetOrientation() const { return meOrientation; }
-+    Reference<XLayoutList> GetLayoutList() const { return maLayoutlist; }
- };
- 
- ImpXMLEXPPageMasterInfo::ImpXMLEXPPageMasterInfo(
-@@ -148,8 +156,15 @@ ImpXMLEXPPageMasterInfo::ImpXMLEXPPageMa
- 	if(xPropSet.is())
- 	{
- 		Any aAny;
-+        
-+        
- 
- 		Reference< beans::XPropertySetInfo > xPropsInfo( xPropSet->getPropertySetInfo() );
-+        if( xPropsInfo.is() && xPropsInfo->hasPropertyByName(OUString(RTL_CONSTASCII_USTRINGPARAM("AutoLayoutList") )))
-+		{
-+            aAny = xPropSet->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("AutoLayoutList")));
-+			aAny >>= maLayoutlist;
-+        }
- 		if( xPropsInfo.is() && xPropsInfo->hasPropertyByName(OUString(RTL_CONSTASCII_USTRINGPARAM("BorderBottom") )))
- 		{
- 			aAny = xPropSet->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("BorderBottom")));
-@@ -240,15 +255,17 @@ public:
+-	ImpXMLAutoLayoutInfo(sal_uInt16 nTyp, ImpXMLEXPPageMasterInfo* pInf);
++	ImpXMLAutoLayoutInfo(sal_uInt16 nTyp, ImpXMLEXPPageMasterInfo* pInf, Reference< XLayoutList > rLList);
  
- BOOL ImpXMLAutoLayoutInfo::IsCreateNecessary(sal_uInt16 nTyp)
- {
--	if(nTyp == 5 /* AUTOLAYOUT_ORG */
--		|| nTyp == 20 /* AUTOLAYOUT_NONE */
--		|| nTyp >= IMP_AUTOLAYOUT_INFO_MAX)
-+
-+	if( nTyp == (sal_uInt16) UnoAutoLayout_ORG  
-+		|| nTyp == (sal_uInt16) UnoAutoLayout_NONE
-+		|| nTyp >= (sal_uInt16) UnoAutoLayout_NUM_OF_BUILTINS)
- 		return FALSE;
- 	return TRUE;
- }
+ 	BOOL operator==(const ImpXMLAutoLayoutInfo& rInfo) const;
  
- BOOL ImpXMLAutoLayoutInfo::operator==(const ImpXMLAutoLayoutInfo& rInfo) const
- {
-+
- 	return ((mnType == rInfo.mnType
+@@ -253,7 +257,7 @@ BOOL ImpXMLAutoLayoutInfo::operator==(co
  		&& mpPageMasterInfo == rInfo.mpPageMasterInfo));
  }
-@@ -257,25 +274,52 @@ ImpXMLAutoLayoutInfo::ImpXMLAutoLayoutIn
+ 
+-ImpXMLAutoLayoutInfo::ImpXMLAutoLayoutInfo(sal_uInt16 nTyp, ImpXMLEXPPageMasterInfo* pInf)
++ImpXMLAutoLayoutInfo::ImpXMLAutoLayoutInfo(sal_uInt16 nTyp, ImpXMLEXPPageMasterInfo* pInf, Reference< XLayoutList > rLList)
  :	mnType(nTyp),
  	mpPageMasterInfo(pInf)
  {
-+    //debug code only
-+    ::awt::Size unopage;
-+    ::awt::Rectangle unotitle;
-+    ::awt::Rectangle unolayout;
-+    
-+    unopage.Width = 1000L;
-+    unopage.Height = 1000L;
-+    
-+    unotitle.X = 10L;
-+    unotitle.Y = 10L;
-+    unolayout.X = 10L;
-+    unolayout.Y = 60L;
-+    unotitle.Width = 800L;
-+    unotitle.Height = 40L;
-+    unolayout.Width = 800L;
-+    unolayout.Height = 940L;
-+    
-+    Reference< XLayoutList > layoutlist(mpPageMasterInfo->GetLayoutList());
-+        
-+    Sequence< ::awt::Rectangle >  rects = layoutlist->getAutoLayoutRectangles((sal_uInt32) 0,
-+                                    unotitle, unolayout, unopage, false);
-+    
-+   // end of debug code.
-+    
- 	// create full info (initialze with typical values)
+@@ -261,6 +265,25 @@ ImpXMLAutoLayoutInfo::ImpXMLAutoLayoutIn
  	Point aPagePos(0,0);
  	Size aPageSize(28000, 21000);
  	Size aPageInnerSize(28000, 21000);
- 
-+
- 	if(mpPageMasterInfo)
- 	{
 +    
- 		aPagePos = Point(mpPageMasterInfo->GetBorderLeft(), mpPageMasterInfo->GetBorderTop());
- 		aPageSize = Size(mpPageMasterInfo->GetWidth(), mpPageMasterInfo->GetHeight());
- 		aPageInnerSize = aPageSize;
- 		aPageInnerSize.Width() -= mpPageMasterInfo->GetBorderLeft() + mpPageMasterInfo->GetBorderRight();
- 		aPageInnerSize.Height() -= mpPageMasterInfo->GetBorderTop() + mpPageMasterInfo->GetBorderBottom();
++    if(rLList.is())
++    {
++      ::uno::Sequence< ::awt::Rectangle >  rectlist;
++      ::awt::Rectangle  awtrect;
++      ::awt::Size  awtsize;
 +    
- 	}
++      awtrect.X = 0;
++      awtrect.Y = 0;
++      awtrect.Width = 28000;
++      awtrect.Height = 2100;
++      awtsize.Width = 28000;
++      awtsize.Height = 21000;
++      
++      rectlist = rLList->getAutoLayoutRectangles((sal_uInt32) nTyp, awtrect, awtrect, awtsize, false);
++        
++      sal_uInt32 r = (sal_uInt32) nTyp;
++        
++    }
  
- 	// title rectangle aligning
- 	Point aTitlePos(aPagePos);
- 	Size aTitleSize(aPageInnerSize);
--
--	if(mnType == 21 /* AUTOLAYOUT_NOTES */)
-+    
-+	if(mnType == (sal_uInt16) UnoAutoLayout_NOTES)
- 	{
- 		aTitleSize.Height() = (long) (aTitleSize.Height() / 2.5);
- 		Point aPos = aTitlePos;
-@@ -298,10 +342,9 @@ ImpXMLAutoLayoutInfo::ImpXMLAutoLayoutIn
- 		aTitlePos = aPos;
- 		aTitleSize = aSize;
- 	}
--	else if(mnType == 27 || mnType == 28)
-+	else if(mnType == (sal_uInt16) UnoAutoLayout_VERTICAL_TITLE_TEXT_CHART  
-+           || mnType == (sal_uInt16) UnoAutoLayout_VERTICAL_TITLE_VERTICAL_OUTLINE)
+ 	if(mpPageMasterInfo)
  	{
--		// AUTOLAYOUT_VERTICAL_TITLE_TEXT_CHART or
--		// AUTOLAYOUT_VERTICAL_TITLE_VERTICAL_OUTLINE
- 		Point aClassicTPos(
- 			aTitlePos.X() + long( aTitleSize.Width() * 0.0735 ),
- 			aTitlePos.Y() + long( aTitleSize.Height() * 0.083 ));
-@@ -337,7 +380,7 @@ ImpXMLAutoLayoutInfo::ImpXMLAutoLayoutIn
- 	Point aLayoutPos(aPagePos);
- 	Size aLayoutSize(aPageInnerSize);
+@@ -886,9 +909,21 @@ BOOL SdXMLExport::ImpPrepAutoLayoutInfo(
+ 						}
+ 					}
+ 				}
++                
++                Reference< XLayoutList > llist;
++                
++                Reference< beans::XPropertySetInfo > xPropsInfo( xPropSet->getPropertySetInfo() );
++                if( xPropsInfo.is() )
++		        {
++                    if(xPropsInfo->hasPropertyByName(OUString(RTL_CONSTASCII_USTRINGPARAM("AutoLayoutList") )))
++                    {                
++                       aAny = xPropSet->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("AutoLayoutList")));
++                       aAny >>= llist;
++                    }
++                }    
  
--	if(mnType == 21 /* AUTOLAYOUT_NOTES */)
-+	if(mnType == (sal_uInt16) UnoAutoLayout_NOTES)
- 	{
- 		aLayoutPos.X() += long( aLayoutSize.Width() * 0.0735 );
- 		aLayoutPos.Y() += long( aLayoutSize.Height() * 0.472 );
+ 				// create entry and look for existance
+-				ImpXMLAutoLayoutInfo* pNew = new ImpXMLAutoLayoutInfo(nType, pInfo);
++				ImpXMLAutoLayoutInfo* pNew = new ImpXMLAutoLayoutInfo(nType, pInfo, llist);
+ 				BOOL bDidExist(FALSE);
+ 
+ 				for(sal_uInt32 nCnt = 0L; !bDidExist && nCnt < mpAutoLayoutInfoList->Count(); nCnt++)


More information about the ooo-build-commit mailing list