[ooo-build-commit] 2 commits - patches/dev300
Radek DoulÃk
rodo at kemper.freedesktop.org
Mon Aug 3 06:52:51 PDT 2009
patches/dev300/offapi-layoutcode.diff | 45 +-
patches/dev300/sd-layoutcode.diff | 650 ++++++++++++++++++-----------
patches/dev300/xmloff-layoutcode.diff | 760 +++++++++++++++++++++++++++++++++-
3 files changed, 1181 insertions(+), 274 deletions(-)
New commits:
commit 756a99c1db3a6f3625aa23ece687dd1a1a15143d
Author: Dona Hertel <cocofan at mailbolt.com>
Date: Sun Aug 2 23:58:46 2009 -0700
bug fixes and efficiency fixes to sd.
* patches/dev300/sd-layoutcode.diff:
diff --git a/patches/dev300/sd-layoutcode.diff b/patches/dev300/sd-layoutcode.diff
index 7e32349..4919aa6 100644
--- a/patches/dev300/sd-layoutcode.diff
+++ b/patches/dev300/sd-layoutcode.diff
@@ -48,8 +48,8 @@ diff -Nrup sd-m16/inc/drawdoc.hxx sd/inc/drawdoc.hxx
diff -Nrup sd-m16/inc/layoutlist.hxx sd/inc/layoutlist.hxx
--- sd-m16/inc/layoutlist.hxx 1969-12-31 16:00:00.000000000 -0800
-+++ sd/inc/layoutlist.hxx 2009-07-31 20:03:19.000000000 -0700
-@@ -0,0 +1,266 @@
++++ sd/inc/layoutlist.hxx 2009-08-02 21:57:23.000000000 -0700
+@@ -0,0 +1,270 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -98,6 +98,7 @@ diff -Nrup sd-m16/inc/layoutlist.hxx sd/inc/layoutlist.hxx
+#include <com/sun/star/presentation/UnoAutoLayout.hpp>
+#include <com/sun/star/presentation/UnoPageKind.hpp>
+#include <com/sun/star/presentation/UnoPresKind.hpp>
++#include <com/sun/star/xml/dom/XDocumentBuilder.hpp>
+#include "layouttype.hxx"
+#include "sal/types.h"
+#include "tools/string.hxx"
@@ -139,10 +140,10 @@ diff -Nrup sd-m16/inc/layoutlist.hxx sd/inc/layoutlist.hxx
+ AUTOLAYOUT_ONLY_TITLE,
+ AUTOLAYOUT_NONE,
+ AUTOLAYOUT_NOTES,
-+ AUTOLAYOUT_HANDOUT1,
++ AUTOLAYOUT_HANDOUT1,
+ AUTOLAYOUT_HANDOUT2,
+ AUTOLAYOUT_HANDOUT3,
-+ AUTOLAYOUT_HANDOUT4,
++ AUTOLAYOUT_HANDOUT4,
+ AUTOLAYOUT_HANDOUT6,
+ AUTOLAYOUT_VERTICAL_TITLE_TEXT_CHART,
+ AUTOLAYOUT_VERTICAL_TITLE_VERTICAL_OUTLINE,
@@ -175,6 +176,7 @@ diff -Nrup sd-m16/inc/layoutlist.hxx sd/inc/layoutlist.hxx
+ /** write entire layout information to a config file
+ */
+ void writeToFile();
++
+
+ /** read entire layout information to a config file
+ */
@@ -307,9 +309,11 @@ diff -Nrup sd-m16/inc/layoutlist.hxx sd/inc/layoutlist.hxx
+
+ void initializeList();
+ void initializeMenuOrder();
-+
-+
-+
++ void writeMenuListToFile(FastSerializerHelper& fsh,
++ MEListImpl& list, const char* sTag);
++ void readMenuListFromFile(
++ const ::com::sun::star::uno::Reference< ::com::sun::star::xml::dom::XNodeList >& nodelist,
++ MEListImpl& list);
+
+ }; // Class LayoutList
+
@@ -728,7 +732,7 @@ 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-31 00:10:16.000000000 -0700
++++ sd/source/core/drawdoc.cxx 2009-08-02 19:55:45.000000000 -0700
@@ -34,6 +34,7 @@
#include "PageListWatcher.hxx"
#include <com/sun/star/text/WritingMode.hpp>
@@ -775,30 +779,54 @@ diff -Nrup sd-m16/source/core/drawdoc.cxx sd/source/core/drawdoc.cxx
//////////////////////////////////////////////////////////////////////////////
TYPEINIT1( SdDrawDocument, FmFormModel );
-@@ -373,6 +398,55 @@ SdDrawDocument::SdDrawDocument(DocumentT
+@@ -373,6 +398,75 @@ SdDrawDocument::SdDrawDocument(DocumentT
rLayerAdmin.SetControlLayerName(aControlLayerName);
}
+
++ // Testing code for layoutlist. To be deleted later.
++
+ LayoutList* list = GetLayoutList();
+ LayoutType* test;
+
+ test = new LayoutType();
-+ test->setName(LString::CreateFromAscii("testing1..."));
-+ test->setStrId(-1); // no string resource id
-+ test->setWritingMode(WritingMode_LR_TB);
-+ test->setHBitmapId(BMP_FOIL_02_H);
-+ test->setLBitmapId(BMP_FOIL_02);
-+
-+ test->createDefaultElement(); // for title
-+ test->createDefaultElement();
-+ test->setPresKind(1,PRESOBJ_OUTLINE); // for outline
-+ test->setFactorHt(1,.5); // change to new settings
-+ test->setFactorWt(1,.5);
-+ test->setRecttype(1, RT_LAYOUT);
-+
-+ if(list->addLayout(test, 3, PK_STANDARD)) OSL_TRACE("layout1 added to list");
-+
++ if(test)
++ {
++ test->setName(LString::CreateFromAscii("testing1..."));
++ 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(); // for title
++ test->createDefaultElement();
++ test->setPresKind(1,PRESOBJ_TEXT); // top left
++ test->setFactorHt(1,.488); // set size
++ test->setFactorWt(1,.488);
++ test->createDefaultElement();
++ test->setPresKind(2, PRESOBJ_GRAPHIC); // top right
++ test->setFactorHt(2,.488); // set size
++ test->setFactorWt(2,.488);
++ test->setFactorX(2, .5124); // move to the left
++ test->createDefaultElement();
++ test->setPresKind(3, PRESOBJ_TEXT); // bottom right
++ test->setFactorHt(3, .488);
++ test->setFactorWt(3, .488);
++ test->setFactorX(3, .5124); // move left
++ test->setFactorY(3, .5223); // move down
++ test->createDefaultElement();
++ test->setPresKind(4,PRESOBJ_TEXT); // bottom left
++ test->setFactorHt(4,.488); // set size
++ test->setFactorWt(4,.488);
++ test->setFactorY(4, .5223); // move down
++ test->setRecttype(1, RT_LAYOUT);
++ test->setRecttype(2, RT_LAYOUT);
++ test->setRecttype(3, RT_LAYOUT);
++ test->setRecttype(4, RT_LAYOUT);
++
++ if(list->addLayout(test, 3, PK_STANDARD)) OSL_TRACE("layout1 added to list");
++ } else { OSL_TRACE("Cannot create layout1"); }
++
+ // another one
+ test = new LayoutType();
+ if(test)
@@ -812,26 +840,22 @@ diff -Nrup sd-m16/source/core/drawdoc.cxx sd/source/core/drawdoc.cxx
+ test->createDefaultElement(); // title
+ test->createDefaultElement();
+ test->setPresKind(1, PRESOBJ_CHART); // chart
-+ test->setFactorX(1,.5);
-+ test->setFactorY(1,.5);
-+ test->setFactorHt(1,.333);
-+ test->setFactorWt(1,.333);
++ test->setFactorY(1,.5223);
++ test->setFactorHt(1,.488);
+ test->setRecttype(1, RT_LAYOUT);
+ test->createDefaultElement();
+ test->setPresKind(2,PRESOBJ_OUTLINE);
-+ test->setFactorHt(2,.333);
-+ test->setFactorWt(2,.333);
++ test->setFactorHt(2,.488);
+ 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"); }
++ if(list->addLayout(test, -1, PK_STANDARD))
++ { OSL_TRACE("Layout2 added to the list"); }
++ } else { OSL_TRACE("Cannot create layout2"); }
+
}
-@@ -403,6 +477,10 @@ SdDrawDocument::~SdDrawDocument()
+@@ -403,6 +497,10 @@ SdDrawDocument::~SdDrawDocument()
CloseBookmarkDoc();
SetAllocDocSh(FALSE);
@@ -842,7 +866,7 @@ diff -Nrup sd-m16/source/core/drawdoc.cxx sd/source/core/drawdoc.cxx
// #116168#
ClearModel(sal_True);
-@@ -457,6 +535,8 @@ SdDrawDocument::~SdDrawDocument()
+@@ -457,6 +555,8 @@ SdDrawDocument::~SdDrawDocument()
delete mpCharClass;
mpCharClass = NULL;
@@ -853,8 +877,8 @@ diff -Nrup sd-m16/source/core/drawdoc.cxx sd/source/core/drawdoc.cxx
/*************************************************************************
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-31 20:03:09.000000000 -0700
-@@ -0,0 +1,1387 @@
++++ sd/source/core/layoutlist.cxx 2009-08-02 21:57:24.000000000 -0700
+@@ -0,0 +1,1373 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -965,11 +989,12 @@ diff -Nrup sd-m16/source/core/layoutlist.cxx sd/source/core/layoutlist.cxx
+ if(layout)
+ {
+ // need to do clean up
-+ // in the layout class
++ // in the layout type class
+ delete layout;
+ }
+ }
+
++ // not sure if this is needed:
+ maLayoutList.clear();
+ maStandard.clear();
+ maNotes.clear();
@@ -977,6 +1002,10 @@ diff -Nrup sd-m16/source/core/layoutlist.cxx sd/source/core/layoutlist.cxx
+
+}
+
++/** Passes back the path with file name for the configuration
++ * file where autolayout information is stored.
++ */
++
+String* LayoutList::getConfigFile()
+{
+ rtl::OUString ousFilePath(rtl::OUString::createFromAscii(""));
@@ -987,7 +1016,7 @@ diff -Nrup sd-m16/source/core/layoutlist.cxx sd/source/core/layoutlist.cxx
+
+ sec.getConfigDir(ousConfigURL);
+
-+ OSL_TRACE("AUTOLAYOUT CONFIG URL: %s", OUSTRTOCHAR(ousConfigURL ));
++ //OSL_TRACE("AUTOLAYOUT CONFIG URL: %s", OUSTRTOCHAR(ousConfigURL ));
+ ousConfigURL += ousFileName;
+ convert.getSystemPathFromFileURL(ousConfigURL, ousFilePath);
+ String* psFilePath = new String(ousFilePath);
@@ -996,8 +1025,13 @@ diff -Nrup sd-m16/source/core/layoutlist.cxx sd/source/core/layoutlist.cxx
+ return psFilePath;
+}
+
++/** This writes the autolayout information (the layout list and
++ * all menu lists) to the configuration file.
++ */
++
+void LayoutList::writeToFile()
+{
++ // open config file for writing
+ String* psFileName = getConfigFile();
+ StreamMode eMode = (STREAM_WRITE | STREAM_TRUNC);
+ SvFileStream fs(*psFileName, eMode);
@@ -1007,65 +1041,72 @@ diff -Nrup sd-m16/source/core/layoutlist.cxx sd/source/core/layoutlist.cxx
+ {
+ LayoutType* layout;
+ static char sCountValue[4];
-+ static char sNum[10];
-+
-+ sal_Int32 size = (sal_Int32) length();
++
++ // set fast serial parser
+ utl::OOutputStreamWrapper* osw = new utl::OOutputStreamWrapper(fs);
+ Reference< XOutputStream > xos(osw);
+ FastSerializerHelper fsh(xos);
+
-+ sprintf(sCountValue, "%d", (int) length());
-+
++ // get number of layouts
++ sal_Int32 count = numberOfLayouts();
++ sprintf(sCountValue, "%d", (int) count);
++
++ //<AutoLayoutInfo><layoutList count="35">
+ fsh.startElement(sTopTag,NULL);
+ fsh.startElement(sLListTag, sCountTag, sCountValue, NULL);
+
++ // get actual size of list
++ sal_Int32 size = (sal_Int32) length();
++ sal_Int32 cnt = 0; // needed to eliminate holes in the list when
++ // read in.
+ for(sal_Int32 i=0; i < size; i++)
+ {
+ layout = getLayoutByIndex(i);
+ if(layout)
+ {
-+ layout->writeLayoutToFile(fsh, i);
++ // write each layout type to the file
++ // see layouttype.cxx for details.
++ layout->writeLayoutToFile(fsh, cnt);
++ cnt++;
+ }
+ }
+
++ // </layoutList>
+ fsh.endElement(sLListTag);
+
-+ fsh.startElement(sStandardTag, NULL);
-+
-+ for(sal_uInt32 i=0; i < maStandard.size(); i++)
-+ {
-+ sprintf(sNum,"%d", (int) maStandard[i]);
-+ fsh.singleElement(sStandardTag, sNumTag, sNum, NULL);
-+ }
-+
-+ fsh.endElement(sStandardTag);
-+
-+ fsh.startElement(sNotesTag,NULL);
-+
-+ for(sal_uInt32 i=0; i < maNotes.size(); i++)
-+ {
-+ sprintf(sNum,"%d", (int) maNotes[i]);
-+ fsh.singleElement(sNotesTag, sNumTag, sNum, NULL);
-+ }
-+
-+ fsh.endElement(sNotesTag);
-+
-+ fsh.startElement(sHandoutTag,NULL);
-+
-+ for(sal_uInt32 i=0; i < maHandout.size(); i++)
-+ {
-+ sprintf(sNum,"%d", (int) maHandout[i]);
-+ fsh.singleElement(sHandoutTag, sNumTag, sNum, NULL);
-+ }
-+
-+ fsh.endElement(sHandoutTag);
++ // Start of menu order list. The layout's index in the list
++ // is used to identify where in the layout menu the autolayout
++ // is placed.
++
++ writeMenuListToFile(fsh, maStandard, sStandardTag);
++ writeMenuListToFile(fsh, maNotes, sNotesTag);
++ writeMenuListToFile(fsh, maHandout, sHandoutTag);
+
++ // </AutoLayoutInfo>
+ fsh.endElement(sTopTag);
+ }
+ fs.Close();
+ delete psFileName;
+
-+}
++}
++
++void LayoutList::writeMenuListToFile(FastSerializerHelper& fsh,
++ MEListImpl& list, const char* sTag)
++{
++ static char sNum[10];
++ // <Menu...>
++ fsh.startElement(sTag,NULL);
++
++ for(sal_uInt32 i=0; i < list.size(); i++)
++ {
++ // <Menu... number="..."/>
++ sprintf(sNum,"%d", (int) list[i]);
++ fsh.singleElement(sTag, sNumTag, sNum, NULL);
++ }
++ // </Menu...>
++ fsh.endElement(sTag);
++
++}
+
+
+void LayoutList::readFromFile()
@@ -1100,8 +1141,9 @@ diff -Nrup sd-m16/source/core/layoutlist.cxx sd/source/core/layoutlist.cxx
+ const Reference<XNodeList> layouts = llist->getChildNodes();
+ size = layouts->getLength();
+ sal_Int32 llistsize = 0;
-+ // need to get size of layout list (not necessarily size of
-+ // layout).
++
++ // need to get size of layout list (not necessarily the count of
++ // layouts).
+ if(llist->hasAttributes())
+ {
+ Reference<dom::XNamedNodeMap> attrlist = llist->getAttributes();
@@ -1125,20 +1167,40 @@ diff -Nrup sd-m16/source/core/layoutlist.cxx sd/source/core/layoutlist.cxx
+ // Put into list where indicated
+ maLayoutList[index] = layout;
+ }
++
++
+
+ // get the menu order lists
+ // Standard menu list
+ const Reference<XNodeList> topStandardlist(xElem->getElementsByTagName(CHARTOOUSTR(sStandardTag)));
-+
-+ size = topStandardlist->getLength()-1;
++ readMenuListFromFile(topStandardlist, maStandard);
++
++ const Reference<XNodeList> topNoteslist(xElem->getElementsByTagName(CHARTOOUSTR(sNotesTag)));
++ readMenuListFromFile(topNoteslist, maNotes);
++
++ const Reference<XNodeList> topHandoutlist(xElem->getElementsByTagName(CHARTOOUSTR(sHandoutTag)));
++ readMenuListFromFile(topHandoutlist, maHandout);
++
++
++ fs.Close();
++
++ delete psFileName;
++
++
++}
++
++void LayoutList::readMenuListFromFile(const Reference< XNodeList >& nodelist, MEListImpl& list)
++{
++ sal_Int32 size = nodelist->getLength()-1;
++ sal_Int32 index;
+ //OSL_TRACE("SIZE OF MENU LIST %d", size);
+
-+ maStandard.resize(size, 0);
++ list.resize(size, 0);
+
+ // i = 1 because we need to skip 1st tag
+ for(sal_Int32 i=1; i < size+1; i++)
+ {
-+ const Reference<XNode> entry = topStandardlist->item(i);
++ const Reference<XNode> entry = nodelist->item(i);
+ if(entry->hasAttributes())
+ {
+ Reference<dom::XNamedNodeMap> attrlist = entry->getAttributes();
@@ -1147,67 +1209,15 @@ diff -Nrup sd-m16/source/core/layoutlist.cxx sd/source/core/layoutlist.cxx
+ {
+ rtl::OUString sNum = enode->getNodeValue();
+ index = sNum.toInt32();
-+ maStandard[i-1] = (AutoLayout) index;
++ list[i-1] = (AutoLayout) index;
+ }
+
+ }
-+ // OSL_TRACE("menu standard: %d = %d", i-1, (int) maStandard[i-1]);
++ // OSL_TRACE("menu standard: %d = %d", i-1, (int) list[i-1]);
+
-+ }
-+
-+ const Reference<XNodeList> topNoteslist(xElem->getElementsByTagName(CHARTOOUSTR(sNotesTag)));
-+ size = topNoteslist->getLength()-1;
-+ maNotes.resize(size, 0);
++ }
+
-+ for(sal_Int32 i=1; i < size+1; i++)
-+ {
-+ const Reference<XNode> entry = topNoteslist->item(i);
-+ if(entry->hasAttributes())
-+ {
-+ Reference<dom::XNamedNodeMap> attrlist = entry->getAttributes();
-+ Reference<dom::XNode> enode = attrlist->getNamedItem(CHARTOOUSTR(sNumTag));
-+ if(enode.is())
-+ {
-+ rtl::OUString sNum = enode->getNodeValue();
-+ index = sNum.toInt32();
-+ maNotes[i-1] = (AutoLayout) index;
-+ }
-+
-+ }
-+ // OSL_TRACE("menu notes: %d = %d", i-1, (int) maNotes[i-1]);
-+
-+ }
-+
-+ const Reference<XNodeList> topHandoutlist(xElem->getElementsByTagName(CHARTOOUSTR(sHandoutTag)));
-+ size = topHandoutlist->getLength()-1;
-+ maHandout.resize(size, 0);
-+
-+ for(sal_Int32 i=1; i < size+1; i++)
-+ {
-+ const Reference<XNode> entry = topHandoutlist->item(i);
-+ if(entry->hasAttributes())
-+ {
-+ Reference<dom::XNamedNodeMap> attrlist = entry->getAttributes();
-+ Reference<dom::XNode> enode = attrlist->getNamedItem(CHARTOOUSTR(sNumTag));
-+ if(enode.is())
-+ {
-+ rtl::OUString sNum = enode->getNodeValue();
-+ index = sNum.toInt32();
-+ maHandout[i-1] = (AutoLayout) index;
-+ }
-+
-+ }
-+ // OSL_TRACE("menu handout: %d = %d", i-1, (int) maHandout[i-1]);
-+
-+ }
-+
-+ fs.Close();
-+
-+ delete psFileName;
-+
-+
-+}
-+
++}
+
+/** used for adding new custom layouts. */
+
@@ -2132,7 +2142,7 @@ diff -Nrup sd-m16/source/core/layoutlist.cxx sd/source/core/layoutlist.cxx
+ // and outline with chart)
+ pLayout = new LayoutType();
+ pLayout->setName(LString(SdResId(STR_AL_VERT_TITLE_TEXT_CHART)));
-+ pLayout->setStrId(STR_AL_VERT_TITLE_TEXT_CHART);
++ pLayout->setStrId(STR_AL_VERT_TITLE_TEXT_CHART);
+ pLayout->setWritingMode(WritingMode_TB_RL);
+ pLayout->setHBitmapId(BMP_FOIL_21_H);
+ pLayout->setLBitmapId(BMP_FOIL_21);
commit 13fb5221b5a34f0722c495228ccf7963c42ffc63
Author: Dona Hertel <cocofan at mailbolt.com>
Date: Fri Jul 31 23:54:48 2009 -0700
xmlcode is done.
* 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 fc175b0..a79ab37 100644
--- a/patches/dev300/offapi-layoutcode.diff
+++ b/patches/dev300/offapi-layoutcode.diff
@@ -1,20 +1,20 @@
diff -Nrup offapi-m16/com/sun/star/presentation/makefile.mk offapi/com/sun/star/presentation/makefile.mk
--- offapi-m16/com/sun/star/presentation/makefile.mk 2009-07-26 00:58:11.000000000 -0700
-+++ offapi/com/sun/star/presentation/makefile.mk 2009-07-26 00:58:57.000000000 -0700
++++ offapi/com/sun/star/presentation/makefile.mk 2009-07-31 00:10:17.000000000 -0700
@@ -92,7 +92,8 @@ IDLFILES=\
XSlideShowView.idl\
XPresentation2.idl\
XTransition.idl\
- XTransitionFactory.idl
+ XTransitionFactory.idl\
-+ XLayoutList.idl
++ XLayoutList.idl
# ------------------------------------------------------------------
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-29 22:58:25.000000000 -0700
-@@ -0,0 +1,138 @@
++++ offapi/com/sun/star/presentation/XLayoutList.idl 2009-07-31 19:56:10.000000000 -0700
+@@ -0,0 +1,171 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -65,7 +65,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 */
++/** for determining autolayout builtins. This should
++ * match the enum AutoLayoutBuiltins in the sd/inc/layoutlist.hxx
++ */
+
+enum UnoAutoLayout
+{
@@ -107,7 +109,8 @@ diff -Nrup offapi-m16/com/sun/star/presentation/XLayoutList.idl offapi/com/sun/s
+
+//=============================================================================
+/** for determining type of presentation object
-+ */
++ * This should match the enum PresObjKind in sd/inc/pres.hxx
++ */
+enum UnoPresKind {
+ NONE,
+ TITLE,
@@ -130,6 +133,16 @@ diff -Nrup offapi-m16/com/sun/star/presentation/XLayoutList.idl offapi/com/sun/s
+ MAX
+};
+
++//============================================================================
++/** For determining the page kind.
++ * This should match the enum PageKind in sd/inc/pres.hxx
++ */
++
++enum UnoPageKind {
++ STANDARD,
++ NOTES,
++ HANDOUT
++};
+
+
+//=============================================================================
@@ -140,11 +153,31 @@ diff -Nrup offapi-m16/com/sun/star/presentation/XLayoutList.idl offapi/com/sun/s
+interface XLayoutList : ::com::sun::star::uno::XInterface
+{
+
++ /** gets bounding rectangles for an autolayout (one rect for each elem) */
++
+ sequence< ::com::sun::star::awt::Rectangle > getAutoLayoutRectangles( [in] long Index,
+ [in] ::com::sun::star::awt::Rectangle title,
+ [in] ::com::sun::star::awt::Rectangle layout,
+ [in] ::com::sun::star::awt::Size page,
+ [in] boolean bRightToLeft);
++ /** gets the page kind (PK_STANDARD, PK_NOTES, PK_HANDOUT) for an autolayout */
++
++ UnoPageKind getPageKind( [in] long Index);
++
++ /** gets the number of elements for the given autolayout */
++
++ long getElementCount( [in] long Index );
++
++ /** gets the presentation object kind for the given layout's nth element */
++
++ UnoPresKind getPresKind( [in] long Index,
++ [in] long ElemIdx );
++
++ /** gets whether the presentation object is vertical */
++
++ boolean isVertical( [in] long Index,
++ [in] long ElemIdx );
++
+
+};
+
diff --git a/patches/dev300/sd-layoutcode.diff b/patches/dev300/sd-layoutcode.diff
index 5cc5529..7e32349 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-29 00:02:13.000000000 -0700
++++ sd/inc/drawdoc.hxx 2009-07-31 00:10:16.000000000 -0700
@@ -57,6 +57,11 @@
#endif
#include "sddllapi.h"
@@ -48,8 +48,8 @@ diff -Nrup sd-m16/inc/drawdoc.hxx sd/inc/drawdoc.hxx
diff -Nrup sd-m16/inc/layoutlist.hxx sd/inc/layoutlist.hxx
--- sd-m16/inc/layoutlist.hxx 1969-12-31 16:00:00.000000000 -0800
-+++ sd/inc/layoutlist.hxx 2009-07-25 23:57:34.000000000 -0700
-@@ -0,0 +1,239 @@
++++ sd/inc/layoutlist.hxx 2009-07-31 20:03:19.000000000 -0700
+@@ -0,0 +1,266 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -95,6 +95,9 @@ diff -Nrup sd-m16/inc/layoutlist.hxx sd/inc/layoutlist.hxx
+#include <com/sun/star/awt/Size.hpp>
+#include <com/sun/star/awt/Point.hpp>
+#include <com/sun/star/presentation/XLayoutList.hpp>
++#include <com/sun/star/presentation/UnoAutoLayout.hpp>
++#include <com/sun/star/presentation/UnoPageKind.hpp>
++#include <com/sun/star/presentation/UnoPresKind.hpp>
+#include "layouttype.hxx"
+#include "sal/types.h"
+#include "tools/string.hxx"
@@ -107,6 +110,12 @@ diff -Nrup sd-m16/inc/layoutlist.hxx sd/inc/layoutlist.hxx
+// among other files. Also, for calculating
+// handouts and notes.
+
++/** There's is a corresponding UnoAutoLayout in
++ * /offapi/com/sun/star/presentation/XLayoutList.idl
++ * If you change anything below, please change the corresponding
++ * Uno code.
++ */
++
+enum AutoLayoutBuiltin {
+ AUTOLAYOUT_TITLE = 0,
+ AUTOLAYOUT_ENUM,
@@ -215,7 +224,7 @@ diff -Nrup sd-m16/inc/layoutlist.hxx sd/inc/layoutlist.hxx
+ * cast this value to a sal_uInt32 to use as an
+ * index into the list. */
+ sal_uInt32 getLayoutIndex(const LString& sName);
-+
++
+ /** get the layout object for the given layoutMenu
+ * index.
+ */
@@ -258,7 +267,25 @@ diff -Nrup sd-m16/inc/layoutlist.hxx sd/inc/layoutlist.hxx
+ throw (::com::sun::star::uno::RuntimeException);
+ Rectangle UNORectToRect(const ::com::sun::star::awt::Rectangle& rect);
+ ::com::sun::star::awt::Rectangle RectToUNORect(const Rectangle& rect);
-+
++
++
++ /** UNO implementation for getting the Page Kind of a layout
++ * and the PresObjKind of an element in a layout
++ */
++ virtual ::com::sun::star::presentation::UnoPageKind SAL_CALL getPageKind( ::sal_Int32 Index )
++ throw (::com::sun::star::uno::RuntimeException);
++
++
++ virtual ::sal_Int32 SAL_CALL getElementCount( ::sal_Int32 Index)
++ throw (::com::sun::star::uno::RuntimeException);
++
++ virtual ::com::sun::star::presentation::UnoPresKind SAL_CALL getPresKind( ::sal_Int32 Index,
++ ::sal_Int32 ElemIdx )
++ throw (::com::sun::star::uno::RuntimeException);
++
++ virtual ::sal_Bool SAL_CALL isVertical( ::sal_Int32 Index, ::sal_Int32 ElemIdx)
++ throw (::com::sun::star::uno::RuntimeException);
++
+
+ private:
+
@@ -291,8 +318,8 @@ diff -Nrup sd-m16/inc/layoutlist.hxx sd/inc/layoutlist.hxx
+#endif // _LAYOUTLIST_HXX
diff -Nrup sd-m16/inc/layouttype.hxx sd/inc/layouttype.hxx
--- sd-m16/inc/layouttype.hxx 1969-12-31 16:00:00.000000000 -0800
-+++ sd/inc/layouttype.hxx 2009-07-25 19:36:23.000000000 -0700
-@@ -0,0 +1,223 @@
++++ sd/inc/layouttype.hxx 2009-07-31 00:10:16.000000000 -0700
+@@ -0,0 +1,226 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -415,13 +442,14 @@ diff -Nrup sd-m16/inc/layouttype.hxx sd/inc/layouttype.hxx
+ WritingMode getWritingMode();
+ sal_uInt32 getHBitmapId();
+ sal_uInt32 getLBitmapId();
++ PageKind getPageKind();
+
+ /** get functions for elements by index
+ * and element list functions
+ */
+ ElemType* getElemByIndex(const sal_uInt32& nIndex);
+ sal_uInt32 length();
-+ PresObjKind getKind(const sal_uInt32& nIndex);
++ PresObjKind getPresKind(const sal_uInt32& nIndex);
+ bool isVertical(const sal_uInt32& nIndex);
+ double factorX(const sal_uInt32& nIndex);
+ double factorY(const sal_uInt32& nIndex);
@@ -438,13 +466,14 @@ diff -Nrup sd-m16/inc/layouttype.hxx sd/inc/layouttype.hxx
+ void setWritingMode(const WritingMode& wmode);
+ void setHBitmapId(const sal_uInt32& id);
+ void setLBitmapId(const sal_uInt32& id);
++ void setPageKind(const PageKind& kind);
+
+
+ /** set functions for elements and list
+ */
+
+ void createDefaultElement();
-+ void setKind(const sal_uInt32& nIndex, PresObjKind nKind);
++ void setPresKind(const sal_uInt32& nIndex, PresObjKind nKind);
+ void setVertical(const sal_uInt32& nIndex, bool bVertical);
+ void setFactorX(const sal_uInt32& nIndex, double fx);
+ void setFactorY(const sal_uInt32& nIndex, double fy);
@@ -503,6 +532,7 @@ diff -Nrup sd-m16/inc/layouttype.hxx sd/inc/layouttype.hxx
+ WritingMode nWritingMode; // righttoleft or toptobottom
+ sal_uInt32 nHBitmapId; // resource id for the High Contrast Bitmap
+ sal_uInt32 nLBitmapId; // resource id for the Low contrast Bitmap
++ PageKind nPageKind; // the page kind for this layout (PK_STANDARD, PK_NOTES, PK_HANDOUT)
+
+ // list of elements whicht the pres. objects will be
+ // created from for this layout.
@@ -518,8 +548,21 @@ diff -Nrup sd-m16/inc/layouttype.hxx sd/inc/layouttype.hxx
+
diff -Nrup sd-m16/inc/pres.hxx sd/inc/pres.hxx
--- sd-m16/inc/pres.hxx 2009-07-25 19:24:39.000000000 -0700
-+++ sd/inc/pres.hxx 2009-07-25 19:36:23.000000000 -0700
-@@ -54,44 +54,6 @@ enum PresObjKind
++++ sd/inc/pres.hxx 2009-07-31 00:10:17.000000000 -0700
+@@ -30,6 +30,12 @@
+ #ifndef _PRESENTATION_HXX
+ #define _PRESENTATION_HXX
+
++
++/** There's is a corresponding UnoPresKind in
++ * /offapi/com/sun/star/presentation/XLayoutList.idl
++ * If you change anything below, please change the corresponding
++ * Uno code
++ */
+ enum PresObjKind
+ {
+ PRESOBJ_NONE = 0,
+@@ -54,45 +60,11 @@ enum PresObjKind
PRESOBJ_MAX
};
@@ -561,12 +604,18 @@ diff -Nrup sd-m16/inc/pres.hxx sd/inc/pres.hxx
- AUTOLAYOUT_ONLY_TEXT,
- AUTOLAYOUT__END
-};
-
+-
++/** There's is a corresponding UnoPageKind in
++ * /offapi/com/sun/star/presentation/XLayoutList.idl
++ * If you change anything below, please change the corresponding
++ * Uno code
++ */
enum PageKind
{
+ PK_STANDARD,
diff -Nrup sd-m16/inc/sdpage.hxx sd/inc/sdpage.hxx
--- sd-m16/inc/sdpage.hxx 2009-07-25 19:24:39.000000000 -0700
-+++ sd/inc/sdpage.hxx 2009-07-25 19:36:23.000000000 -0700
++++ sd/inc/sdpage.hxx 2009-07-31 00:10:16.000000000 -0700
@@ -45,6 +45,8 @@
#include <list>
#include <functional>
@@ -609,7 +658,7 @@ diff -Nrup sd-m16/inc/sdpage.hxx sd/inc/sdpage.hxx
*/
diff -Nrup sd-m16/inc/Test.hxx sd/inc/Test.hxx
--- sd-m16/inc/Test.hxx 1969-12-31 16:00:00.000000000 -0800
-+++ sd/inc/Test.hxx 2009-07-25 19:36:23.000000000 -0700
++++ sd/inc/Test.hxx 2009-07-31 00:10:17.000000000 -0700
@@ -0,0 +1,43 @@
+/*************************************************************************
+ *
@@ -656,7 +705,7 @@ diff -Nrup sd-m16/inc/Test.hxx sd/inc/Test.hxx
+
diff -Nrup sd-m16/source/core/drawdoc3.cxx sd/source/core/drawdoc3.cxx
--- sd-m16/source/core/drawdoc3.cxx 2009-07-25 19:25:13.000000000 -0700
-+++ sd/source/core/drawdoc3.cxx 2009-07-25 19:36:23.000000000 -0700
++++ sd/source/core/drawdoc3.cxx 2009-07-31 00:10:17.000000000 -0700
@@ -1756,7 +1756,7 @@ void SdDrawDocument::SetMasterPage(USHOR
pPage = (SdPage*)pPageList->First();
while (pPage)
@@ -679,7 +728,7 @@ 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-30 00:55:23.000000000 -0700
++++ sd/source/core/drawdoc.cxx 2009-07-31 00:10:16.000000000 -0700
@@ -34,6 +34,7 @@
#include "PageListWatcher.hxx"
#include <com/sun/star/text/WritingMode.hpp>
@@ -731,7 +780,7 @@ diff -Nrup sd-m16/source/core/drawdoc.cxx sd/source/core/drawdoc.cxx
rLayerAdmin.SetControlLayerName(aControlLayerName);
}
+
-+ LayoutList* list = GetLayoutList();
++ LayoutList* list = GetLayoutList();
+ LayoutType* test;
+
+ test = new LayoutType();
@@ -743,7 +792,7 @@ diff -Nrup sd-m16/source/core/drawdoc.cxx sd/source/core/drawdoc.cxx
+
+ test->createDefaultElement(); // for title
+ test->createDefaultElement();
-+ test->setKind(1,PRESOBJ_OUTLINE); // for outline
++ test->setPresKind(1,PRESOBJ_OUTLINE); // for outline
+ test->setFactorHt(1,.5); // change to new settings
+ test->setFactorWt(1,.5);
+ test->setRecttype(1, RT_LAYOUT);
@@ -762,14 +811,14 @@ diff -Nrup sd-m16/source/core/drawdoc.cxx sd/source/core/drawdoc.cxx
+
+ test->createDefaultElement(); // title
+ test->createDefaultElement();
-+ test->setKind(1, PRESOBJ_CHART); // chart
++ test->setPresKind(1, PRESOBJ_CHART); // chart
+ test->setFactorX(1,.5);
+ test->setFactorY(1,.5);
+ test->setFactorHt(1,.333);
+ test->setFactorWt(1,.333);
+ test->setRecttype(1, RT_LAYOUT);
+ test->createDefaultElement();
-+ test->setKind(2,PRESOBJ_OUTLINE);
++ test->setPresKind(2,PRESOBJ_OUTLINE);
+ test->setFactorHt(2,.333);
+ test->setFactorWt(2,.333);
+ test->setRecttype(2, RT_LAYOUT);
@@ -804,8 +853,8 @@ diff -Nrup sd-m16/source/core/drawdoc.cxx sd/source/core/drawdoc.cxx
/*************************************************************************
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-29 20:57:40.000000000 -0700
-@@ -0,0 +1,1311 @@
++++ sd/source/core/layoutlist.cxx 2009-07-31 20:03:09.000000000 -0700
+@@ -0,0 +1,1387 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -870,6 +919,7 @@ diff -Nrup sd-m16/source/core/layoutlist.cxx sd/source/core/layoutlist.cxx
+using ::io::XInputStream;
+using namespace ::xml::dom;
+using namespace ::xml::sax;
++using namespace ::presentation;
+using namespace ::lang;
+using namespace ::sax_fastparser;
+
@@ -1195,6 +1245,8 @@ diff -Nrup sd-m16/source/core/layoutlist.cxx sd/source/core/layoutlist.cxx
+ maLayoutList.push_back(pLayout);
+ }
+
++ //need to set page kind (eMenu is page kind)
++ pLayout->setPageKind(eMenu);
+ //now, find where it was put
+ idx = getLayoutIndex(name);
+ // add this value to the given menu at the given location
@@ -1491,6 +1543,71 @@ diff -Nrup sd-m16/source/core/layoutlist.cxx sd/source/core/layoutlist.cxx
+ return list;
+}
+
++
++
++
++::UnoPageKind SAL_CALL LayoutList::getPageKind(sal_Int32 Index)
++ throw (::uno::RuntimeException)
++{
++ UnoPageKind kind = UnoPageKind_STANDARD;
++ LayoutType* alayout;
++
++ alayout = getLayoutByIndex(Index);
++ if(alayout)
++ {
++ kind = (UnoPageKind) alayout->getPageKind();
++ }
++
++ return kind;
++}
++
++sal_Int32 SAL_CALL LayoutList::getElementCount(sal_Int32 Index)
++ throw (::uno::RuntimeException)
++{
++ sal_Int32 count = 0;
++ LayoutType* alayout;
++
++ alayout = getLayoutByIndex(Index);
++ if(alayout)
++ {
++ count = alayout->length();
++ }
++
++ return count;
++}
++
++sal_Bool SAL_CALL LayoutList::isVertical(sal_Int32 Index, sal_Int32 ElemIdx)
++ throw (::uno::RuntimeException)
++{
++ sal_Bool bVertical = false;
++ LayoutType* alayout;
++
++ alayout = getLayoutByIndex(Index);
++ if(alayout)
++ {
++ bVertical = alayout->isVertical(ElemIdx);
++ }
++
++ return bVertical;
++}
++
++
++::UnoPresKind SAL_CALL LayoutList::getPresKind(sal_Int32 Index, sal_Int32 ElemIdx)
++ throw (::uno::RuntimeException)
++{
++ UnoPresKind kind = UnoPresKind_NONE;
++ LayoutType* alayout;
++
++ alayout = getLayoutByIndex(Index);
++ if(alayout)
++ {
++ kind = (UnoPresKind) alayout->getPresKind(ElemIdx);
++ }
++
++ return kind;
++}
++
++
+void LayoutList::initializeMenuOrder()
+{
+ // this probably would be best store in a file too.
@@ -1561,7 +1678,7 @@ diff -Nrup sd-m16/source/core/layoutlist.cxx sd/source/core/layoutlist.cxx
+ pLayout->createDefaultElement(); // title element
+
+ pLayout->createDefaultElement(); // text element
-+ pLayout->setKind(1,PRESOBJ_TEXT);
++ pLayout->setPresKind(1,PRESOBJ_TEXT);
+ pLayout->initializeRectInfo(0); // initialize each element
+
+ maLayoutList[AUTOLAYOUT_TITLE] = pLayout;
@@ -1573,10 +1690,11 @@ diff -Nrup sd-m16/source/core/layoutlist.cxx sd/source/core/layoutlist.cxx
+ pLayout->setWritingMode(WritingMode_LR_TB);
+ pLayout->setHBitmapId(BMP_FOIL_01_H);
+ pLayout->setLBitmapId(BMP_FOIL_01);
++
+ pLayout->createDefaultElement(); // title element
+
+ pLayout->createDefaultElement(); // outline element
-+ pLayout->setKind(1,PRESOBJ_OUTLINE);
++ pLayout->setPresKind(1,PRESOBJ_OUTLINE);
+ pLayout->initializeRectInfo(0); // initialize each element
+
+ maLayoutList[AUTOLAYOUT_ENUM] = pLayout;
@@ -1592,7 +1710,7 @@ diff -Nrup sd-m16/source/core/layoutlist.cxx sd/source/core/layoutlist.cxx
+ pLayout->createDefaultElement(); // title element
+
+ pLayout->createDefaultElement(); // chart element
-+ pLayout->setKind(1,PRESOBJ_CHART);
++ pLayout->setPresKind(1,PRESOBJ_CHART);
+ pLayout->initializeRectInfo(0); // initialize each element
+
+ maLayoutList[AUTOLAYOUT_CHART] = pLayout;
@@ -1608,10 +1726,10 @@ diff -Nrup sd-m16/source/core/layoutlist.cxx sd/source/core/layoutlist.cxx
+ pLayout->createDefaultElement(); // title element
+
+ pLayout->createDefaultElement(); // outline1 element
-+ pLayout->setKind(1,PRESOBJ_OUTLINE);
++ pLayout->setPresKind(1,PRESOBJ_OUTLINE);
+
+ pLayout->createDefaultElement(); // outline2 element
-+ pLayout->setKind(2,PRESOBJ_OUTLINE);
++ pLayout->setPresKind(2,PRESOBJ_OUTLINE);
+ pLayout->initializeRectInfo(1); // initialize each element
+
+ maLayoutList[AUTOLAYOUT_2TEXT] = pLayout;
@@ -1627,10 +1745,10 @@ diff -Nrup sd-m16/source/core/layoutlist.cxx sd/source/core/layoutlist.cxx
+ pLayout->createDefaultElement(); // title element
+
+ pLayout->createDefaultElement(); // outline element
-+ pLayout->setKind(1,PRESOBJ_OUTLINE);
++ pLayout->setPresKind(1,PRESOBJ_OUTLINE);
+
+ pLayout->createDefaultElement(); // chart element
-+ pLayout->setKind(2,PRESOBJ_CHART);
++ pLayout->setPresKind(2,PRESOBJ_CHART);
+ pLayout->initializeRectInfo(1); // initialize each element
+
+ maLayoutList[AUTOLAYOUT_TEXTCHART] = pLayout;
@@ -1649,7 +1767,7 @@ diff -Nrup sd-m16/source/core/layoutlist.cxx sd/source/core/layoutlist.cxx
+ pLayout->createDefaultElement(); // title element
+
+ pLayout->createDefaultElement(); // organ. chart element
-+ pLayout->setKind(1,PRESOBJ_ORGCHART);
++ pLayout->setPresKind(1,PRESOBJ_ORGCHART);
+ pLayout->initializeRectInfo(0); // initialize each element
+
+ maLayoutList[AUTOLAYOUT_ORG] = pLayout;
@@ -1665,10 +1783,10 @@ diff -Nrup sd-m16/source/core/layoutlist.cxx sd/source/core/layoutlist.cxx
+ pLayout->createDefaultElement(); // title element
+
+ pLayout->createDefaultElement(); // outline element
-+ pLayout->setKind(1,PRESOBJ_OUTLINE);
++ pLayout->setPresKind(1,PRESOBJ_OUTLINE);
+
+ pLayout->createDefaultElement(); // picture element
-+ pLayout->setKind(2,PRESOBJ_GRAPHIC);
++ pLayout->setPresKind(2,PRESOBJ_GRAPHIC);
+ pLayout->initializeRectInfo(1); // initialize each element
+
+ maLayoutList[AUTOLAYOUT_TEXTCLIP] = pLayout;
@@ -1684,10 +1802,10 @@ diff -Nrup sd-m16/source/core/layoutlist.cxx sd/source/core/layoutlist.cxx
+ pLayout->createDefaultElement(); // title element
+
+ pLayout->createDefaultElement(); // chart element
-+ pLayout->setKind(1,PRESOBJ_CHART);
++ pLayout->setPresKind(1,PRESOBJ_CHART);
+
+ pLayout->createDefaultElement(); // outline element
-+ pLayout->setKind(2,PRESOBJ_OUTLINE);
++ pLayout->setPresKind(2,PRESOBJ_OUTLINE);
+ pLayout->initializeRectInfo(1); // initialize each element
+
+ maLayoutList[AUTOLAYOUT_CHARTTEXT] = pLayout;
@@ -1703,7 +1821,7 @@ diff -Nrup sd-m16/source/core/layoutlist.cxx sd/source/core/layoutlist.cxx
+ pLayout->createDefaultElement(); // title element
+
+ pLayout->createDefaultElement(); // table element
-+ pLayout->setKind(1,PRESOBJ_TABLE);
++ pLayout->setPresKind(1,PRESOBJ_TABLE);
+ pLayout->initializeRectInfo(0); // initialize each element
+
+ maLayoutList[AUTOLAYOUT_TAB] = pLayout;
@@ -1719,10 +1837,10 @@ diff -Nrup sd-m16/source/core/layoutlist.cxx sd/source/core/layoutlist.cxx
+ pLayout->createDefaultElement(); // title element
+
+ pLayout->createDefaultElement(); // picture element
-+ pLayout->setKind(1,PRESOBJ_GRAPHIC);
++ pLayout->setPresKind(1,PRESOBJ_GRAPHIC);
+
+ pLayout->createDefaultElement(); // outline element
-+ pLayout->setKind(2,PRESOBJ_OUTLINE);
++ pLayout->setPresKind(2,PRESOBJ_OUTLINE);
+ pLayout->initializeRectInfo(1); // initialize each element
+
+ maLayoutList[AUTOLAYOUT_CLIPTEXT] = pLayout;
@@ -1738,10 +1856,10 @@ diff -Nrup sd-m16/source/core/layoutlist.cxx sd/source/core/layoutlist.cxx
+ pLayout->createDefaultElement(); // title element
+
+ pLayout->createDefaultElement(); // outline1 element
-+ pLayout->setKind(1,PRESOBJ_OUTLINE);
++ pLayout->setPresKind(1,PRESOBJ_OUTLINE);
+
+ pLayout->createDefaultElement(); // object element
-+ pLayout->setKind(2,PRESOBJ_OBJECT);
++ pLayout->setPresKind(2,PRESOBJ_OBJECT);
+ pLayout->initializeRectInfo(1); // initialize each element
+
+ maLayoutList[AUTOLAYOUT_TEXTOBJ] = pLayout;
@@ -1757,7 +1875,7 @@ diff -Nrup sd-m16/source/core/layoutlist.cxx sd/source/core/layoutlist.cxx
+ pLayout->createDefaultElement(); // title element
+
+ pLayout->createDefaultElement(); // object element
-+ pLayout->setKind(1,PRESOBJ_OBJECT);
++ pLayout->setPresKind(1,PRESOBJ_OBJECT);
+ pLayout->initializeRectInfo(0); // initialize each element
+
+ maLayoutList[AUTOLAYOUT_OBJ] = pLayout;
@@ -1774,13 +1892,13 @@ diff -Nrup sd-m16/source/core/layoutlist.cxx sd/source/core/layoutlist.cxx
+ pLayout->createDefaultElement(); // title element
+
+ pLayout->createDefaultElement(); // outline element
-+ pLayout->setKind(1,PRESOBJ_OUTLINE);
++ pLayout->setPresKind(1,PRESOBJ_OUTLINE);
+
+ pLayout->createDefaultElement(); // object1 element
-+ pLayout->setKind(2,PRESOBJ_OBJECT);
++ pLayout->setPresKind(2,PRESOBJ_OBJECT);
+
+ pLayout->createDefaultElement(); // object2 element
-+ pLayout->setKind(3,PRESOBJ_OBJECT);
++ pLayout->setPresKind(3,PRESOBJ_OBJECT);
+ pLayout->initializeRectInfo(2); // initialize each element
+
+ maLayoutList[AUTOLAYOUT_TEXT2OBJ] = pLayout;
@@ -1796,10 +1914,10 @@ diff -Nrup sd-m16/source/core/layoutlist.cxx sd/source/core/layoutlist.cxx
+ pLayout->createDefaultElement(); // title element
+
+ pLayout->createDefaultElement(); // object element
-+ pLayout->setKind(1,PRESOBJ_OBJECT);
++ pLayout->setPresKind(1,PRESOBJ_OBJECT);
+
+ pLayout->createDefaultElement(); // outline element
-+ pLayout->setKind(2,PRESOBJ_OUTLINE);
++ pLayout->setPresKind(2,PRESOBJ_OUTLINE);
+ pLayout->initializeRectInfo(1); // initialize each element
+
+ maLayoutList[AUTOLAYOUT_OBJTEXT] = pLayout;
@@ -1815,10 +1933,10 @@ diff -Nrup sd-m16/source/core/layoutlist.cxx sd/source/core/layoutlist.cxx
+ pLayout->createDefaultElement(); // title element
+
+ pLayout->createDefaultElement(); // object element
-+ pLayout->setKind(1,PRESOBJ_OBJECT);
++ pLayout->setPresKind(1,PRESOBJ_OBJECT);
+
+ pLayout->createDefaultElement(); // outline element
-+ pLayout->setKind(2,PRESOBJ_OUTLINE);
++ pLayout->setPresKind(2,PRESOBJ_OUTLINE);
+ pLayout->initializeRectInfo(4); // initialize each element
+
+ maLayoutList[AUTOLAYOUT_OBJOVERTEXT] = pLayout;
@@ -1834,13 +1952,13 @@ diff -Nrup sd-m16/source/core/layoutlist.cxx sd/source/core/layoutlist.cxx
+ pLayout->createDefaultElement(); // title element
+
+ pLayout->createDefaultElement(); // object1 element
-+ pLayout->setKind(1,PRESOBJ_OBJECT);
++ pLayout->setPresKind(1,PRESOBJ_OBJECT);
+
+ pLayout->createDefaultElement(); // object2 element
-+ pLayout->setKind(2,PRESOBJ_OBJECT);
++ pLayout->setPresKind(2,PRESOBJ_OBJECT);
+
+ pLayout->createDefaultElement(); // outline element
-+ pLayout->setKind(3,PRESOBJ_OUTLINE);
++ pLayout->setPresKind(3,PRESOBJ_OUTLINE);
+ pLayout->initializeRectInfo(3); // initialize each element
+
+ maLayoutList[AUTOLAYOUT_2OBJTEXT] = pLayout;
@@ -1857,13 +1975,13 @@ diff -Nrup sd-m16/source/core/layoutlist.cxx sd/source/core/layoutlist.cxx
+ pLayout->createDefaultElement(); // title element
+
+ pLayout->createDefaultElement(); // object1 element
-+ pLayout->setKind(1,PRESOBJ_OBJECT);
++ pLayout->setPresKind(1,PRESOBJ_OBJECT);
+
+ pLayout->createDefaultElement(); // object2 element
-+ pLayout->setKind(2,PRESOBJ_OBJECT);
++ pLayout->setPresKind(2,PRESOBJ_OBJECT);
+
+ pLayout->createDefaultElement(); // outline element
-+ pLayout->setKind(3,PRESOBJ_OUTLINE);
++ pLayout->setPresKind(3,PRESOBJ_OUTLINE);
+ pLayout->initializeRectInfo(5); // initialize each element
+
+ maLayoutList[AUTOLAYOUT_2OBJOVERTEXT] = pLayout;
@@ -1879,10 +1997,10 @@ diff -Nrup sd-m16/source/core/layoutlist.cxx sd/source/core/layoutlist.cxx
+ pLayout->createDefaultElement(); // title element
+
+ pLayout->createDefaultElement(); // outline element
-+ pLayout->setKind(1,PRESOBJ_OUTLINE);
++ pLayout->setPresKind(1,PRESOBJ_OUTLINE);
+
+ pLayout->createDefaultElement(); // object element
-+ pLayout->setKind(2,PRESOBJ_OBJECT);
++ pLayout->setPresKind(2,PRESOBJ_OBJECT);
+
+ pLayout->initializeRectInfo(4); // initialize each element
+
@@ -1899,16 +2017,16 @@ diff -Nrup sd-m16/source/core/layoutlist.cxx sd/source/core/layoutlist.cxx
+ pLayout->createDefaultElement(); // title element
+
+ pLayout->createDefaultElement(); // object1 element
-+ pLayout->setKind(1,PRESOBJ_OBJECT);
++ pLayout->setPresKind(1,PRESOBJ_OBJECT);
+
+ pLayout->createDefaultElement(); // object2 element
-+ pLayout->setKind(2,PRESOBJ_OBJECT);
++ pLayout->setPresKind(2,PRESOBJ_OBJECT);
+
+ pLayout->createDefaultElement(); // object3 element
-+ pLayout->setKind(3,PRESOBJ_OBJECT);
++ pLayout->setPresKind(3,PRESOBJ_OBJECT);
+
+ pLayout->createDefaultElement(); // object4 element
-+ pLayout->setKind(4,PRESOBJ_OBJECT);
++ pLayout->setPresKind(4,PRESOBJ_OBJECT);
+ pLayout->initializeRectInfo(6); // initialize each element
+
+ maLayoutList[AUTOLAYOUT_4OBJ] = pLayout;
@@ -1943,13 +2061,14 @@ diff -Nrup sd-m16/source/core/layoutlist.cxx sd/source/core/layoutlist.cxx
+ pLayout->setWritingMode(WritingMode_LR_TB);
+ pLayout->setHBitmapId(BMP_FOILN_01_H);
+ pLayout->setLBitmapId(BMP_FOILN_01);
++ pLayout->setPageKind(PK_NOTES);
+
+ pLayout->createDefaultElement(); // page element
-+ pLayout->setKind(0,PRESOBJ_PAGE);
++ pLayout->setPresKind(0,PRESOBJ_PAGE);
+ pLayout->setRecttype(0, RT_TITLE);
+
+ pLayout->createDefaultElement(); // notes element
-+ pLayout->setKind(1,PRESOBJ_NOTES);
++ pLayout->setPresKind(1,PRESOBJ_NOTES);
+ pLayout->setRecttype(1,RT_LAYOUT);
+
+ maLayoutList[AUTOLAYOUT_NOTES] = pLayout;
@@ -1961,6 +2080,7 @@ diff -Nrup sd-m16/source/core/layoutlist.cxx sd/source/core/layoutlist.cxx
+ pLayout->setWritingMode(WritingMode_LR_TB);
+ pLayout->setHBitmapId(BMP_FOILH_01_H);
+ pLayout->setLBitmapId(BMP_FOILH_01);
++ pLayout->setPageKind(PK_HANDOUT);
+
+ maLayoutList[AUTOLAYOUT_HANDOUT1] = pLayout;
+
@@ -1971,6 +2091,7 @@ diff -Nrup sd-m16/source/core/layoutlist.cxx sd/source/core/layoutlist.cxx
+ pLayout->setWritingMode(WritingMode_LR_TB);
+ pLayout->setHBitmapId(BMP_FOILH_02_H);
+ pLayout->setLBitmapId(BMP_FOILH_02);
++ pLayout->setPageKind(PK_HANDOUT);
+
+ maLayoutList[AUTOLAYOUT_HANDOUT2] = pLayout;
+
@@ -1981,6 +2102,7 @@ diff -Nrup sd-m16/source/core/layoutlist.cxx sd/source/core/layoutlist.cxx
+ pLayout->setWritingMode(WritingMode_LR_TB);
+ pLayout->setHBitmapId(BMP_FOILH_03_H);
+ pLayout->setLBitmapId(BMP_FOILH_03);
++ pLayout->setPageKind(PK_HANDOUT);
+
+ maLayoutList[AUTOLAYOUT_HANDOUT3] = pLayout;
+
@@ -1991,6 +2113,7 @@ diff -Nrup sd-m16/source/core/layoutlist.cxx sd/source/core/layoutlist.cxx
+ pLayout->setWritingMode(WritingMode_LR_TB);
+ pLayout->setHBitmapId(BMP_FOILH_04_H);
+ pLayout->setLBitmapId(BMP_FOILH_04);
++ pLayout->setPageKind(PK_HANDOUT);
+
+ maLayoutList[AUTOLAYOUT_HANDOUT4] = pLayout;
+
@@ -2001,6 +2124,7 @@ diff -Nrup sd-m16/source/core/layoutlist.cxx sd/source/core/layoutlist.cxx
+ pLayout->setWritingMode(WritingMode_LR_TB);
+ pLayout->setHBitmapId(BMP_FOILH_06_H);
+ pLayout->setLBitmapId(BMP_FOILH_06);
++ pLayout->setPageKind(PK_HANDOUT);
+
+ maLayoutList[AUTOLAYOUT_HANDOUT6] = pLayout;
+
@@ -2018,12 +2142,12 @@ diff -Nrup sd-m16/source/core/layoutlist.cxx sd/source/core/layoutlist.cxx
+ pLayout->setRecttype(0, RT_VERTICAL_TITLE);
+
+ pLayout->createDefaultElement(); // outline1 element
-+ pLayout->setKind(1,PRESOBJ_OUTLINE);
++ pLayout->setPresKind(1,PRESOBJ_OUTLINE);
+ pLayout->setVertical(1, true);
+ pLayout->setRecttype(1, RT_VERTICAL_LAYOUT);
+
+ pLayout->createDefaultElement(); // chart element
-+ pLayout->setKind(2,PRESOBJ_CHART);
++ pLayout->setPresKind(2,PRESOBJ_CHART);
+ pLayout->setRecttype(2, RT_VERTICAL_LAYOUT);
+ pLayout->initializeRectInfo(7); // initialize each element
+
@@ -2042,7 +2166,7 @@ diff -Nrup sd-m16/source/core/layoutlist.cxx sd/source/core/layoutlist.cxx
+ pLayout->setRecttype(0,RT_VERTICAL_TITLE);
+
+ pLayout->createDefaultElement(); // outline1 element
-+ pLayout->setKind(1,PRESOBJ_OUTLINE);
++ pLayout->setPresKind(1,PRESOBJ_OUTLINE);
+ pLayout->setVertical(1, true);
+ pLayout->setRecttype(1, RT_VERTICAL_LAYOUT);
+ pLayout->initializeRectInfo(8); // initialize each element
@@ -2060,7 +2184,7 @@ diff -Nrup sd-m16/source/core/layoutlist.cxx sd/source/core/layoutlist.cxx
+ pLayout->createDefaultElement(); // title element
+
+ pLayout->createDefaultElement(); // outline element
-+ pLayout->setKind(1,PRESOBJ_OUTLINE);
++ pLayout->setPresKind(1,PRESOBJ_OUTLINE);
+ pLayout->setVertical(1, true);
+ pLayout->setRecttype(1,RT_VERTICAL_LAYOUT);
+ pLayout->initializeRectInfo(0); // initialize each element
@@ -2079,11 +2203,11 @@ diff -Nrup sd-m16/source/core/layoutlist.cxx sd/source/core/layoutlist.cxx
+ pLayout->createDefaultElement(); // title element
+
+ pLayout->createDefaultElement(); // picture element
-+ pLayout->setKind(1,PRESOBJ_GRAPHIC);
++ pLayout->setPresKind(1,PRESOBJ_GRAPHIC);
+ pLayout->setRecttype(1,RT_LAYOUT);
+
+ pLayout->createDefaultElement(); // outline element
-+ pLayout->setKind(2,PRESOBJ_OUTLINE);
++ pLayout->setPresKind(2,PRESOBJ_OUTLINE);
+ pLayout->setRecttype(2, RT_LAYOUT);
+ pLayout->setVertical(2, true);
+ pLayout->initializeRectInfo(9); // initialize each element
@@ -2097,6 +2221,7 @@ diff -Nrup sd-m16/source/core/layoutlist.cxx sd/source/core/layoutlist.cxx
+ pLayout->setWritingMode(WritingMode_LR_TB);
+ pLayout->setHBitmapId(BMP_FOILH_09_H);
+ pLayout->setLBitmapId(BMP_FOILH_09);
++ pLayout->setPageKind(PK_HANDOUT);
+
+ maLayoutList[AUTOLAYOUT_HANDOUT9] = pLayout;
+
@@ -2109,7 +2234,7 @@ diff -Nrup sd-m16/source/core/layoutlist.cxx sd/source/core/layoutlist.cxx
+ pLayout->setLBitmapId(BMP_FOIL_25);
+
+ pLayout->createDefaultElement(); // text element
-+ pLayout->setKind(0,PRESOBJ_TEXT);
++ pLayout->setPresKind(0,PRESOBJ_TEXT);
+ pLayout->setRecttype(0,RT_TEXT_ONLY);
+ pLayout->initializeRectInfo(10);
+
@@ -2119,8 +2244,8 @@ diff -Nrup sd-m16/source/core/layoutlist.cxx sd/source/core/layoutlist.cxx
+
diff -Nrup sd-m16/source/core/layouttype.cxx sd/source/core/layouttype.cxx
--- sd-m16/source/core/layouttype.cxx 1969-12-31 16:00:00.000000000 -0800
-+++ sd/source/core/layouttype.cxx 2009-07-25 19:36:23.000000000 -0700
-@@ -0,0 +1,840 @@
++++ sd/source/core/layouttype.cxx 2009-07-31 00:10:16.000000000 -0700
+@@ -0,0 +1,859 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -2191,6 +2316,7 @@ diff -Nrup sd-m16/source/core/layouttype.cxx sd/source/core/layouttype.cxx
+static char sWmTag[] = "WritingMode";
+static char sHBitmapTag[] = "HBitmapId";
+static char sLBitmapTag[] = "LBitmapId";
++static char sPageKindTag[] = "PageKind";
+static char sElemListTag[] = "ElementList";
+
+
@@ -2200,7 +2326,8 @@ diff -Nrup sd-m16/source/core/layouttype.cxx sd/source/core/layouttype.cxx
+ nStrId(-1),
+ nWritingMode(WritingMode_LR_TB),
+ nHBitmapId(BMP_FOIL_01_H),
-+ nLBitmapId(BMP_FOIL_01)
++ nLBitmapId(BMP_FOIL_01),
++ nPageKind(PK_STANDARD)
+{
+ elemList.reserve(20);
+}
@@ -2269,6 +2396,7 @@ diff -Nrup sd-m16/source/core/layouttype.cxx sd/source/core/layouttype.cxx
+ static char sWm[10];
+ static char sHBitmap[10];
+ static char sLBitmap[10];
++ static char sPageKind[10];
+
+ // write out layout information
+ sprintf(sNumber,"%d", (int) autolayout);
@@ -2277,6 +2405,7 @@ diff -Nrup sd-m16/source/core/layouttype.cxx sd/source/core/layouttype.cxx
+ sprintf(sWm, "%d", (int) nWritingMode);
+ sprintf(sHBitmap, "%d", (int) nHBitmapId);
+ sprintf(sLBitmap, "%d", (int) nLBitmapId);
++ sprintf(sPageKind, "%d", (int) nPageKind);
+
+ fsh.startElement(sLayoutTag, NULL);
+
@@ -2285,7 +2414,8 @@ diff -Nrup sd-m16/source/core/layouttype.cxx sd/source/core/layouttype.cxx
+ sStrIdTag, sStrId,
+ sWmTag, sWm,
+ sHBitmapTag, sHBitmap,
-+ sLBitmapTag, sLBitmap, NULL);
++ sLBitmapTag, sLBitmap,
++ sPageKindTag, sPageKind, NULL);
+
+
+ // write out element list
@@ -2377,6 +2507,10 @@ diff -Nrup sd-m16/source/core/layouttype.cxx sd/source/core/layouttype.cxx
+ anode = attrlist->getNamedItem(CHARTOOUSTR(sLBitmapTag));
+ nLBitmapId = getIntValue(anode);
+ //OSL_TRACE(" LBitmap ID: %d", (int) nLBitmapId);
++
++ anode = attrlist->getNamedItem(CHARTOOUSTR(sPageKindTag));
++ nPageKind = (PageKind) getIntValue(anode);
++ //OSL_TRACE(" PageKind: %d", (int) nPageKind);
+
+ }
+
@@ -2397,7 +2531,7 @@ diff -Nrup sd-m16/source/core/layouttype.cxx sd/source/core/layouttype.cxx
+ createDefaultElement();
+ Reference<dom::XNode> anode = attrlist->getNamedItem(CHARTOOUSTR(sKindTag));
+ num = getIntValue(anode);
-+ setKind(i, (PresObjKind) num);
++ setPresKind(i, (PresObjKind) num);
+ //OSL_TRACE(" Kind = %l", (long) getKind(i));
+
+ anode = attrlist->getNamedItem(CHARTOOUSTR(sVerticalTag));
@@ -2488,6 +2622,11 @@ diff -Nrup sd-m16/source/core/layouttype.cxx sd/source/core/layouttype.cxx
+ return nLBitmapId;
+}
+
++PageKind LayoutType::getPageKind()
++{
++ return nPageKind;
++}
++
+
+/** gets the element at the given index
+ * into the elem list
@@ -2513,7 +2652,7 @@ diff -Nrup sd-m16/source/core/layouttype.cxx sd/source/core/layouttype.cxx
+ * the element is located in the list
+ */
+
-+ PresObjKind LayoutType::getKind(const sal_uInt32& nIndex)
++ PresObjKind LayoutType::getPresKind(const sal_uInt32& nIndex)
+ {
+ ElemType* elem;
+ elem = getElemByIndex(nIndex);
@@ -2598,13 +2737,18 @@ diff -Nrup sd-m16/source/core/layouttype.cxx sd/source/core/layouttype.cxx
+ nLBitmapId = id;
+}
+
++void LayoutType::setPageKind(const PageKind& kind)
++{
++ nPageKind = kind;
++}
++
+/** set functions for the elements in the
+ * list. Requires passing in the index
+ * in the list where the element is
+ * located
+ */
+
-+void LayoutType::setKind(const sal_uInt32& nIndex, PresObjKind nKind)
++void LayoutType::setPresKind(const sal_uInt32& nIndex, PresObjKind nKind)
+{
+ ElemType* elem;
+ elem = getElemByIndex(nIndex);
@@ -2963,7 +3107,7 @@ diff -Nrup sd-m16/source/core/layouttype.cxx sd/source/core/layouttype.cxx
+
diff -Nrup sd-m16/source/core/makefile.mk sd/source/core/makefile.mk
--- sd-m16/source/core/makefile.mk 2009-07-25 19:25:13.000000000 -0700
-+++ sd/source/core/makefile.mk 2009-07-25 19:36:23.000000000 -0700
++++ sd/source/core/makefile.mk 2009-07-31 00:10:17.000000000 -0700
@@ -57,6 +57,8 @@ SLOFILES = $(SLO)$/stlsheet.obj \
$(SLO)$/drawdoc3.obj \
$(SLO)$/drawdoc4.obj \
@@ -2975,7 +3119,7 @@ diff -Nrup sd-m16/source/core/makefile.mk sd/source/core/makefile.mk
$(SLO)$/sdattr.obj \
diff -Nrup sd-m16/source/core/sdpage.cxx sd/source/core/sdpage.cxx
--- sd-m16/source/core/sdpage.cxx 2009-07-25 19:25:13.000000000 -0700
-+++ sd/source/core/sdpage.cxx 2009-07-25 19:36:23.000000000 -0700
++++ sd/source/core/sdpage.cxx 2009-07-31 00:10:16.000000000 -0700
@@ -1058,261 +1058,10 @@ Rectangle SdPage::GetLayoutRect() const
|*
\*************************************************************************/
@@ -3253,7 +3397,7 @@ diff -Nrup sd-m16/source/core/sdpage.cxx sd/source/core/sdpage.cxx
+ // for each entry in the element list, arrange a presentation shape
+ for( i = 0; i < elemcount ; i++ )
+ {
-+ eKind = layout->getKind(i);
++ eKind = layout->getPresKind(i);
+ if (eKind == PRESOBJ_NONE)
+ {
+ continue;
@@ -3271,7 +3415,7 @@ diff -Nrup sd-m16/source/core/sdpage.cxx sd/source/core/sdpage.cxx
+ // for each entry in the element list, look for an alternative shape
+ for( i = 0; i < elemcount; i++ )
+ {
-+ eKind = layout->getKind(i);
++ eKind = layout->getPresKind(i);
+ if(eKind == PRESOBJ_NONE)
+ {
+ continue;
@@ -3327,8 +3471,12 @@ diff -Nrup sd-m16/source/core/sdpage.cxx sd/source/core/sdpage.cxx
}
void SdPage::SetAutoLayout(AutoLayout eLayout, BOOL bInit, BOOL bCreate )
-@@ -1472,64 +1231,107 @@ void SdPage::SetAutoLayout(AutoLayout eL
- // MasterPage or no layout and no presentation shapes available, noting to do
+@@ -1469,67 +1228,110 @@ void SdPage::SetAutoLayout(AutoLayout eL
+
+ if((meAutoLayout == AUTOLAYOUT_NONE && maPresentationShapeList.isEmpty()) || mbMaster)
+ {
+- // MasterPage or no layout and no presentation shapes available, noting to do
++ // MasterPage or no layout and no presentation shapes available, nothing to do
return;
}
-
@@ -3438,7 +3586,7 @@ diff -Nrup sd-m16/source/core/sdpage.cxx sd/source/core/sdpage.cxx
+ // for each entry in the element list, arrange a presentation shape
+ for( i = 0; i < elemcount; i++ )
+ {
-+ eKind = layout->getKind(i);
++ eKind = layout->getPresKind(i);
+ if (eKind == PRESOBJ_NONE)
+ {
+ continue;
@@ -3495,7 +3643,7 @@ diff -Nrup sd-m16/source/core/sdpage.cxx sd/source/core/sdpage.cxx
/*************************************************************************
diff -Nrup sd-m16/source/filter/ppt/pptin.cxx sd/source/filter/ppt/pptin.cxx
--- sd-m16/source/filter/ppt/pptin.cxx 2009-07-25 19:25:17.000000000 -0700
-+++ sd/source/filter/ppt/pptin.cxx 2009-07-25 19:36:23.000000000 -0700
++++ sd/source/filter/ppt/pptin.cxx 2009-07-31 00:10:17.000000000 -0700
@@ -1097,7 +1097,7 @@ sal_Bool ImplSdPPTImport::Import()
////////////////////
SetPageNum( i, PPT_SLIDEPAGE );
@@ -3507,7 +3655,7 @@ diff -Nrup sd-m16/source/filter/ppt/pptin.cxx sd/source/filter/ppt/pptin.cxx
{
diff -Nrup sd-m16/source/filter/ppt/pptin.hxx sd/source/filter/ppt/pptin.hxx
--- sd-m16/source/filter/ppt/pptin.hxx 2009-07-25 19:25:17.000000000 -0700
-+++ sd/source/filter/ppt/pptin.hxx 2009-07-25 19:36:23.000000000 -0700
++++ sd/source/filter/ppt/pptin.hxx 2009-07-31 00:10:17.000000000 -0700
@@ -38,6 +38,7 @@
#include <svx/msfiltertracer.hxx>
#include <com/sun/star/uno/Any.h>
@@ -3518,7 +3666,7 @@ diff -Nrup sd-m16/source/filter/ppt/pptin.hxx sd/source/filter/ppt/pptin.hxx
class SfxMedium;
diff -Nrup sd-m16/source/ui/func/unprlout.cxx sd/source/ui/func/unprlout.cxx
--- sd-m16/source/ui/func/unprlout.cxx 2009-07-25 19:25:15.000000000 -0700
-+++ sd/source/ui/func/unprlout.cxx 2009-07-25 19:36:23.000000000 -0700
++++ sd/source/ui/func/unprlout.cxx 2009-07-31 00:10:17.000000000 -0700
@@ -54,8 +54,8 @@ SdPresentationLayoutUndoAction::SdPresen
SdDrawDocument* pTheDoc,
String aTheOldLayoutName,
@@ -3532,7 +3680,7 @@ diff -Nrup sd-m16/source/ui/func/unprlout.cxx sd/source/ui/func/unprlout.cxx
SdUndoAction(pTheDoc)
diff -Nrup sd-m16/source/ui/inc/unmodpg.hxx sd/source/ui/inc/unmodpg.hxx
--- sd-m16/source/ui/inc/unmodpg.hxx 2009-07-25 19:25:15.000000000 -0700
-+++ sd/source/ui/inc/unmodpg.hxx 2009-07-25 19:36:23.000000000 -0700
++++ sd/source/ui/inc/unmodpg.hxx 2009-07-31 00:10:17.000000000 -0700
@@ -33,6 +33,7 @@
#include "sdundo.hxx"
@@ -3563,7 +3711,7 @@ diff -Nrup sd-m16/source/ui/inc/unmodpg.hxx sd/source/ui/inc/unmodpg.hxx
diff -Nrup sd-m16/source/ui/inc/unprlout.hxx sd/source/ui/inc/unprlout.hxx
--- sd-m16/source/ui/inc/unprlout.hxx 2009-07-25 19:25:15.000000000 -0700
-+++ sd/source/ui/inc/unprlout.hxx 2009-07-25 19:36:23.000000000 -0700
++++ sd/source/ui/inc/unprlout.hxx 2009-07-31 00:10:17.000000000 -0700
@@ -32,7 +32,8 @@
#define _SD_UNPRLOUT_HXX
@@ -3598,7 +3746,7 @@ diff -Nrup sd-m16/source/ui/inc/unprlout.hxx sd/source/ui/inc/unprlout.hxx
diff -Nrup sd-m16/source/ui/inc/ViewShellImplementation.hxx sd/source/ui/inc/ViewShellImplementation.hxx
--- sd-m16/source/ui/inc/ViewShellImplementation.hxx 2009-07-25 19:25:15.000000000 -0700
-+++ sd/source/ui/inc/ViewShellImplementation.hxx 2009-07-25 19:36:23.000000000 -0700
++++ sd/source/ui/inc/ViewShellImplementation.hxx 2009-07-31 00:10:17.000000000 -0700
@@ -34,6 +34,7 @@
#include "ViewShell.hxx"
#include "ViewShellManager.hxx"
@@ -3618,7 +3766,7 @@ diff -Nrup sd-m16/source/ui/inc/ViewShellImplementation.hxx sd/source/ui/inc/Vie
view id stored in the SfxViewFrame class.
diff -Nrup sd-m16/source/ui/slidesorter/controller/SlsSlotManager.cxx sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
--- sd-m16/source/ui/slidesorter/controller/SlsSlotManager.cxx 2009-07-25 19:25:16.000000000 -0700
-+++ sd/source/ui/slidesorter/controller/SlsSlotManager.cxx 2009-07-25 19:36:23.000000000 -0700
++++ sd/source/ui/slidesorter/controller/SlsSlotManager.cxx 2009-07-31 00:10:17.000000000 -0700
@@ -248,7 +248,7 @@ void SlotManager::FuTemporary (SfxReques
pShell->mpImpl->AssignLayout(
pDocument->GetSdPage((USHORT)pWhatPage->GetValue(),
@@ -3630,7 +3778,7 @@ diff -Nrup sd-m16/source/ui/slidesorter/controller/SlsSlotManager.cxx sd/source/
break;
diff -Nrup sd-m16/source/ui/toolpanel/LayoutMenu.cxx sd/source/ui/toolpanel/LayoutMenu.cxx
--- sd-m16/source/ui/toolpanel/LayoutMenu.cxx 2009-07-25 19:25:16.000000000 -0700
-+++ sd/source/ui/toolpanel/LayoutMenu.cxx 2009-07-25 19:36:23.000000000 -0700
++++ sd/source/ui/toolpanel/LayoutMenu.cxx 2009-07-31 00:10:16.000000000 -0700
@@ -129,99 +129,6 @@ SFX_IMPL_INTERFACE(LayoutMenu, SfxShell,
TYPEINIT1(LayoutMenu, SfxShell);
@@ -3786,7 +3934,7 @@ diff -Nrup sd-m16/source/ui/toolpanel/LayoutMenu.cxx sd/source/ui/toolpanel/Layo
+ WritingMode wm;
+ AutoLayout lnum;
+ sal_uInt32 index;
-+ sal_uInt32 resId;
++ sal_Int32 resId;
+ sal_uInt32 Hbitmap, Lbitmap;
+ LString name;
+
@@ -3844,7 +3992,7 @@ diff -Nrup sd-m16/source/ui/toolpanel/LayoutMenu.cxx sd/source/ui/toolpanel/Layo
for (USHORT nId=1; nId<=nItemCount; nId++)
diff -Nrup sd-m16/source/ui/toolpanel/LayoutMenu.hxx sd/source/ui/toolpanel/LayoutMenu.hxx
--- sd-m16/source/ui/toolpanel/LayoutMenu.hxx 2009-07-25 19:25:16.000000000 -0700
-+++ sd/source/ui/toolpanel/LayoutMenu.hxx 2009-07-25 19:36:23.000000000 -0700
++++ sd/source/ui/toolpanel/LayoutMenu.hxx 2009-07-31 00:10:16.000000000 -0700
@@ -39,6 +39,7 @@
#include "glob.hxx"
@@ -3882,7 +4030,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-28 22:33:08.000000000 -0700
++++ sd/source/ui/unoidl/unopage.cxx 2009-07-31 00:10:17.000000000 -0700
@@ -36,6 +36,7 @@
#include <com/sun/star/presentation/AnimationEffect.hpp>
#include <com/sun/star/presentation/PresentationRange.hpp>
@@ -3965,7 +4113,7 @@ diff -Nrup sd-m16/source/ui/unoidl/unopage.cxx sd/source/ui/unoidl/unopage.cxx
break;
diff -Nrup sd-m16/source/ui/view/unmodpg.cxx sd/source/ui/view/unmodpg.cxx
--- sd-m16/source/ui/view/unmodpg.cxx 2009-07-25 19:25:13.000000000 -0700
-+++ sd/source/ui/view/unmodpg.cxx 2009-07-25 19:36:23.000000000 -0700
++++ sd/source/ui/view/unmodpg.cxx 2009-07-31 00:10:17.000000000 -0700
@@ -63,7 +63,7 @@ ModifyPageUndoAction::ModifyPageUndoActi
SdDrawDocument* pTheDoc,
SdPage* pThePage,
@@ -3977,7 +4125,7 @@ diff -Nrup sd-m16/source/ui/view/unmodpg.cxx sd/source/ui/view/unmodpg.cxx
: SdUndoAction(pTheDoc),
diff -Nrup sd-m16/source/ui/view/viewshe3.cxx sd/source/ui/view/viewshe3.cxx
--- sd-m16/source/ui/view/viewshe3.cxx 2009-07-25 19:25:13.000000000 -0700
-+++ sd/source/ui/view/viewshe3.cxx 2009-07-25 19:36:23.000000000 -0700
++++ sd/source/ui/view/viewshe3.cxx 2009-07-31 00:10:17.000000000 -0700
@@ -293,33 +293,20 @@ SdPage* ViewShell::CreateOrDuplicatePage
SFX_REQUEST_ARG (rRequest, pIsPageBack, SfxBoolItem, ID_VAL_ISPAGEBACK, FALSE);
SFX_REQUEST_ARG (rRequest, pIsPageObj, SfxBoolItem, ID_VAL_ISPAGEOBJ, FALSE);
@@ -4023,7 +4171,7 @@ diff -Nrup sd-m16/source/ui/view/viewshe3.cxx sd/source/ui/view/viewshe3.cxx
// 2. Create a new page or duplicate an existing one.
diff -Nrup sd-m16/source/ui/view/ViewShellImplementation.cxx sd/source/ui/view/ViewShellImplementation.cxx
--- sd-m16/source/ui/view/ViewShellImplementation.cxx 2009-07-25 19:25:13.000000000 -0700
-+++ sd/source/ui/view/ViewShellImplementation.cxx 2009-07-25 19:36:23.000000000 -0700
++++ sd/source/ui/view/ViewShellImplementation.cxx 2009-07-31 00:10:17.000000000 -0700
@@ -227,20 +227,12 @@ void ViewShell::Implementation::ProcessM
SFX_REQUEST_ARG (rRequest, pBVisible, SfxBoolItem, ID_VAL_ISPAGEBACK, FALSE);
SFX_REQUEST_ARG (rRequest, pBObjsVisible, SfxBoolItem, ID_VAL_ISPAGEOBJ, FALSE);
@@ -4053,7 +4201,7 @@ diff -Nrup sd-m16/source/ui/view/ViewShellImplementation.cxx sd/source/ui/view/V
bHandoutMode = TRUE;
diff -Nrup sd-m16/test/export.map sd/test/export.map
--- sd-m16/test/export.map 1969-12-31 16:00:00.000000000 -0800
-+++ sd/test/export.map 2009-07-25 19:36:23.000000000 -0700
++++ sd/test/export.map 2009-07-31 00:10:17.000000000 -0700
@@ -0,0 +1,38 @@
+#*************************************************************************
+#
@@ -4095,7 +4243,7 @@ diff -Nrup sd-m16/test/export.map sd/test/export.map
+};
diff -Nrup sd-m16/test/layouttest.cxx sd/test/layouttest.cxx
--- sd-m16/test/layouttest.cxx 1969-12-31 16:00:00.000000000 -0800
-+++ sd/test/layouttest.cxx 2009-07-25 19:36:23.000000000 -0700
++++ sd/test/layouttest.cxx 2009-07-31 12:47:28.000000000 -0700
@@ -0,0 +1,323 @@
+/*************************************************************************
+ *
@@ -4165,6 +4313,7 @@ diff -Nrup sd-m16/test/layouttest.cxx sd/test/layouttest.cxx
+ double fx, fy, ht, wt;
+ RectType rt;
+ WritingMode wm;
++ PageKind pg;
+ sal_uInt32 Hbitmap;
+ sal_uInt32 Lbitmap;
+
@@ -4190,6 +4339,11 @@ diff -Nrup sd-m16/test/layouttest.cxx sd/test/layouttest.cxx
+ aTestType->setWritingMode(WritingMode_LR_TB);
+ wm = aTestType->getWritingMode();
+ CPPUNIT_ASSERT_MESSAGE("setwritemode/getwritemode", WritingMode_LR_TB == wm);
++
++ // set and get PageKind for layout
++ aTestType->setPageKind(PK_HANDOUT);
++ pg = aTestType->getPageKind();
++ CPPUNIT_ASSERT_MESSAGE("setpagekind/getpagekind", PK_HANDOUT == pg);
+
+ // set and get High Bitmap
+ aTestType->setHBitmapId(170);
@@ -4205,9 +4359,9 @@ diff -Nrup sd-m16/test/layouttest.cxx sd/test/layouttest.cxx
+ aTestType->addElemToList(*elem1);
+
+ // set and get kind of 1st element in list
-+ aTestType->setKind(0,PRESOBJ_CHART);
-+ kind = aTestType->getKind(0);
-+ CPPUNIT_ASSERT_MESSAGE("getKind/setKind", PRESOBJ_CHART == kind);
++ aTestType->setPresKind(0,PRESOBJ_CHART);
++ kind = aTestType->getPresKind(0);
++ CPPUNIT_ASSERT_MESSAGE("getPresKind/setPresKind", PRESOBJ_CHART == kind);
+
+ // set and get isvertical for 1st element
+ aTestType->setVertical(0,true);
@@ -4296,7 +4450,7 @@ diff -Nrup sd-m16/test/layouttest.cxx sd/test/layouttest.cxx
+
+ alayout1->createDefaultElement();
+ alayout1->createDefaultElement();
-+ alayout1->setKind(1, PRESOBJ_OUTLINE);
++ alayout1->setPresKind(1, PRESOBJ_OUTLINE);
+
+ // add the layout to the list at menu index 0
+ aTestList->addLayout(alayout1, 0, PK_STANDARD);
@@ -4306,14 +4460,15 @@ diff -Nrup sd-m16/test/layouttest.cxx sd/test/layouttest.cxx
+ {
+ CPPUNIT_ASSERT_MESSAGE("addlayout/getbyname/samelayout", alayout1 == alayout2);
+ }
-+
-+ // get the layout out of the list
++
++ // get the layout out of the list
+ alayout2 = aTestList->getLayoutByIndex(start_size);
+ CPPUNIT_ASSERT_MESSAGE("getbyindex/nolayout", alayout2);
+ if(alayout2)
+ {
+ CPPUNIT_ASSERT_MESSAGE("getbyindex/samelayout", alayout2->getName() == name1);
+ }
++
+
+ // make sure a layout with the same name can't be added
+ alayout3 = new LayoutType();
@@ -4386,13 +4541,6 @@ diff -Nrup sd-m16/test/layouttest.cxx sd/test/layouttest.cxx
+ aTestList->addToMenuList(0, 6, PK_STANDARD);
+ CPPUNIT_ASSERT_MESSAGE("addtoMenu", idx = 1);
+
-+ // add a default layout to list
-+ aTestList->createDefaultLayout(name3, PK_HANDOUT);
-+ alayout2 = aTestList->getLayoutByIndex(2);
-+ CPPUNIT_ASSERT_MESSAGE("createDefault/nolayoutback", alayout2);
-+ if(alayout2)
-+ { CPPUNIT_ASSERT_MESSAGE("createDefault/notsame", (alayout2->getName() == name3) ); }
-+
+
+
+ }
@@ -4422,7 +4570,7 @@ diff -Nrup sd-m16/test/layouttest.cxx sd/test/layouttest.cxx
+
diff -Nrup sd-m16/test/makefile.mk sd/test/makefile.mk
--- sd-m16/test/makefile.mk 1969-12-31 16:00:00.000000000 -0800
-+++ sd/test/makefile.mk 2009-07-25 19:36:23.000000000 -0700
++++ sd/test/makefile.mk 2009-07-31 00:10:17.000000000 -0700
@@ -0,0 +1,91 @@
+#*************************************************************************
+#
@@ -4517,7 +4665,7 @@ diff -Nrup sd-m16/test/makefile.mk sd/test/makefile.mk
+ALLTAR : $(MISC)$/unittest_succeeded
diff -Nrup sd-m16/util/makefile.mk sd/util/makefile.mk
--- sd-m16/util/makefile.mk 2009-07-25 19:24:39.000000000 -0700
-+++ sd/util/makefile.mk 2009-07-25 19:36:23.000000000 -0700
++++ sd/util/makefile.mk 2009-07-31 00:10:17.000000000 -0700
@@ -90,7 +90,8 @@ SHL1STDLIBS+= \
$(VOSLIB) \
$(CANVASLIB) \
diff --git a/patches/dev300/xmloff-layoutcode.diff b/patches/dev300/xmloff-layoutcode.diff
index 1fda328..5fb2b08 100644
--- a/patches/dev300/xmloff-layoutcode.diff
+++ b/patches/dev300/xmloff-layoutcode.diff
@@ -1,18 +1,35 @@
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-29 15:37:06.000000000 -0700
-@@ -47,6 +47,10 @@
++++ xmloff/source/draw/sdxmlexp.cxx 2009-07-31 21:56:48.000000000 -0700
+@@ -47,6 +47,11 @@
#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/AutoLayoutBuiltin.hpp>
++#include <com/sun/star/presentation/UnoAutoLayout.hpp>
++#include <com/sun/star/presentation/UnoPresKind.hpp>
+#include <com/sun/star/awt/Rectangle.hpp>
+#include <com/sun/star/awt/Size.hpp>
#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
+@@ -208,11 +213,13 @@ DECLARE_LIST(ImpXMLEXPPageMasterList, Im
+
+ //////////////////////////////////////////////////////////////////////////////
+
+-#define IMP_AUTOLAYOUT_INFO_MAX (33L)
+-
+ class ImpXMLAutoLayoutInfo
+ {
+ sal_uInt16 mnType;
++ UnoPresKind* mpKinds;
++ Rectangle* mpRects;
++ bool* mpVertical;
++ sal_Int32 mnElemCount;
+ ImpXMLEXPPageMasterInfo* mpPageMasterInfo;
+ OUString msLayoutName;
+ Rectangle maTitleRect;
+@@ -221,7 +228,7 @@ class ImpXMLAutoLayoutInfo
sal_Int32 mnGapY;
public:
@@ -21,7 +38,31 @@ diff -Nrup xmloff-m16/source/draw/sdxmlexp.cxx xmloff/source/draw/sdxmlexp.cxx
BOOL operator==(const ImpXMLAutoLayoutInfo& rInfo) const;
-@@ -253,7 +257,7 @@ BOOL ImpXMLAutoLayoutInfo::operator==(co
+@@ -234,18 +241,13 @@ public:
+
+ const Rectangle& GetTitleRectangle() const { return maTitleRect; }
+ const Rectangle& GetPresRectangle() const { return maPresRect; }
+-
+- static BOOL IsCreateNecessary(sal_uInt16 nTyp);
++ Rectangle* GetRects() const { return mpRects; }
++ UnoPresKind* GetKinds() const { return mpKinds; }
++ bool* GetVerticalList() const { return mpVertical; }
++ sal_Int32 GetElemCount() const { return mnElemCount; }
+ };
+
+-BOOL ImpXMLAutoLayoutInfo::IsCreateNecessary(sal_uInt16 nTyp)
+-{
+- if(nTyp == 5 /* AUTOLAYOUT_ORG */
+- || nTyp == 20 /* AUTOLAYOUT_NONE */
+- || nTyp >= IMP_AUTOLAYOUT_INFO_MAX)
+- return FALSE;
+- return TRUE;
+-}
++
+
+ BOOL ImpXMLAutoLayoutInfo::operator==(const ImpXMLAutoLayoutInfo& rInfo) const
+ {
+@@ -253,15 +255,28 @@ BOOL ImpXMLAutoLayoutInfo::operator==(co
&& mpPageMasterInfo == rInfo.mpPageMasterInfo));
}
@@ -30,33 +71,258 @@ diff -Nrup xmloff-m16/source/draw/sdxmlexp.cxx xmloff/source/draw/sdxmlexp.cxx
: mnType(nTyp),
mpPageMasterInfo(pInf)
{
-@@ -261,6 +265,25 @@ ImpXMLAutoLayoutInfo::ImpXMLAutoLayoutIn
++ Size titlesize;
++ Point titlepos;
++ Size layoutsize;
++ Point layoutpos;
++ UnoPageKind kind;
++
+ // create full info (initialze with typical values)
Point aPagePos(0,0);
Size aPageSize(28000, 21000);
Size aPageInnerSize(28000, 21000);
+-
++
+
-+ if(rLList.is())
++ if(!rLList.is())
+ {
-+ ::uno::Sequence< ::awt::Rectangle > rectlist;
-+ ::awt::Rectangle awtrect;
-+ ::awt::Size awtsize;
++ DBG_ERROR("ImpXMLAutoLayoutInfo::const: No uno layout list!");
++ return;
++ }
+
-+ 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);
+ if(mpPageMasterInfo)
+ {
+ aPagePos = Point(mpPageMasterInfo->GetBorderLeft(), mpPageMasterInfo->GetBorderTop());
+@@ -269,86 +284,87 @@ ImpXMLAutoLayoutInfo::ImpXMLAutoLayoutIn
+ aPageInnerSize = aPageSize;
+ aPageInnerSize.Width() -= mpPageMasterInfo->GetBorderLeft() + mpPageMasterInfo->GetBorderRight();
+ aPageInnerSize.Height() -= mpPageMasterInfo->GetBorderTop() + mpPageMasterInfo->GetBorderBottom();
+
-+ sal_uInt32 r = (sal_uInt32) nTyp;
+ }
+-
+- // title rectangle aligning
+- Point aTitlePos(aPagePos);
+- Size aTitleSize(aPageInnerSize);
+-
+- if(mnType == 21 /* AUTOLAYOUT_NOTES */)
+- {
+- aTitleSize.Height() = (long) (aTitleSize.Height() / 2.5);
+- Point aPos = aTitlePos;
+- aPos.Y() += long( aTitleSize.Height() * 0.083 );
+- Size aPartArea = aTitleSize;
+- Size aSize;
+-
+- // tatsaechliche Seitengroesse in das Handout-Rechteck skalieren
+- double fH = (double) aPartArea.Width() / aPageSize.Width();
+- double fV = (double) aPartArea.Height() / aPageSize.Height();
+-
+- if ( fH > fV )
+- fH = fV;
+- aSize.Width() = (long) (fH * aPageSize.Width());
+- aSize.Height() = (long) (fH * aPageSize.Height());
+-
+- aPos.X() += (aPartArea.Width() - aSize.Width()) / 2;
+- aPos.Y() += (aPartArea.Height()- aSize.Height())/ 2;
+-
+- aTitlePos = aPos;
+- aTitleSize = aSize;
+- }
+- else if(mnType == 27 || mnType == 28)
+- {
+- // 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 ));
+- Size aClassicTSize(
+- long( aTitleSize.Width() * 0.854 ),
+- long( aTitleSize.Height() * 0.167 ));
+- Point aLPos(aPagePos);
+- Size aLSize(aPageInnerSize);
+- Point aClassicLPos(
+- aLPos.X() + long( aLSize.Width() * 0.0735 ),
+- aLPos.Y() + long( aLSize.Height() * 0.472 ));
+- Size aClassicLSize(
+- long( aLSize.Width() * 0.854 ),
+- long( aLSize.Height() * 0.444 ));
+-
+- aTitlePos.X() = (aClassicTPos.X() + aClassicTSize.Width()) - aClassicTSize.Height();
+- aTitlePos.Y() = aClassicTPos.Y();
+- aTitleSize.Width() = aClassicTSize.Height();
+- aTitleSize.Height() = (aClassicLPos.Y() + aClassicLSize.Height()) - aClassicTPos.Y();
+- }
+- else
+- {
+- aTitlePos.X() += long( aTitleSize.Width() * 0.0735 );
+- aTitlePos.Y() += long( aTitleSize.Height() * 0.083 );
+- aTitleSize.Width() = long( aTitleSize.Width() * 0.854 );
+- aTitleSize.Height() = long( aTitleSize.Height() * 0.167 );
+- }
+-
+- maTitleRect.SetPos(aTitlePos);
+- maTitleRect.SetSize(aTitleSize);
+-
+- // layout rectangle aligning
+- Point aLayoutPos(aPagePos);
+- Size aLayoutSize(aPageInnerSize);
+-
+- if(mnType == 21 /* AUTOLAYOUT_NOTES */)
+- {
+- aLayoutPos.X() += long( aLayoutSize.Width() * 0.0735 );
+- aLayoutPos.Y() += long( aLayoutSize.Height() * 0.472 );
+- aLayoutSize.Width() = long( aLayoutSize.Width() * 0.854 );
+- aLayoutSize.Height() = long( aLayoutSize.Height() * 0.444 );
+- }
+- else if((mnType >= 22 && mnType <= 26) || (mnType == 31)) // AUTOLAYOUT_HANDOUT
+- {
+- // keep info for inner area in maPresRect, put info for gap size
+- // to maTitleRect position
+- mnGapX = (aPageSize.Width() - aPageInnerSize.Width()) / 2;
++
++ Size aTitleSize(aPageSize);
++ Point aTitlePos(aPagePos);
++
++ // taken from SdPage::getTitleRect and getLayoutRect
++ kind = rLList->getPageKind(nTyp);
++ if(kind == UnoPageKind_STANDARD)
++ {
++ titlesize.setWidth( long(aPageInnerSize.Width()*.9));
++ layoutsize.setWidth( long(aPageInnerSize.Width()*.9));
++ titlesize.setHeight( long(aPageInnerSize.Height()*.167));
++ layoutsize.setHeight( long(aPageInnerSize.Height()*.66));
++ titlepos.X() = aPagePos.X() + long(aPageInnerSize.Width()*.05);
++ layoutpos.X() = aPagePos.X() + long(aPageInnerSize.Width()*.05);
++ titlepos.Y() = aPagePos.Y() + long(aPageInnerSize.Height()*.0399);
++ layoutpos.Y() = aPagePos.Y() + long(aPageInnerSize.Height()*.234);
++
++ }
++ else if(kind == UnoPageKind_NOTES)
++ {
++ titlepos.X() = aPagePos.X();
++ titlepos.Y() = aPagePos.Y() + long(aPageInnerSize.Height()*.076);
++ titlesize.setWidth(aPageInnerSize.Width());
++ titlesize.setHeight( long(aPageInnerSize.Height()*.375));
++ layoutpos.X() = aPagePos.X() + long(aPageInnerSize.Width()*.1);
++ layoutpos.Y() = aPagePos.Y() + long(aPageInnerSize.Height()*.475);
++ layoutsize.setWidth( long(aPageInnerSize.Width()*.8));
++ layoutsize.setHeight( long(aPageInnerSize.Height()*.45));
+
+ }
++ else // HANDOUT (or other)
++ {
++ // use pagesize and pos for title
++ titlepos = aPagePos;
++ layoutpos = aPagePos;
++ titlesize = aPageInnerSize;
++ layoutsize = aPageInnerSize;
++ }
++
++ if(kind != UnoPageKind_HANDOUT)
++ {
++ ::uno::Sequence< ::awt::Rectangle > rectlist;
++ ::awt::Rectangle titlerect;
++ ::awt::Rectangle layoutrect;
++ ::awt::Rectangle arect;
++ ::awt::Size pagesize;
++
++ titlerect.X = titlepos.X();
++ titlerect.Y = titlepos.Y();
++ titlerect.Width = titlesize.Width();
++ titlerect.Height = titlesize.Height();
++
++ layoutrect.X = layoutpos.X();
++ layoutrect.Y = layoutpos.Y();
++ layoutrect.Width = layoutsize.Width();
++ layoutrect.Height = layoutsize.Height();
++
++ pagesize.Width = aPageInnerSize.Width();
++ pagesize.Height = aPageInnerSize.Height();
++
++ rectlist = rLList->getAutoLayoutRectangles((sal_uInt32) nTyp, titlerect, layoutrect, pagesize, false);
++
++ mnElemCount = rLList->getElementCount((sal_Int32) nTyp);
++ mpKinds = new UnoPresKind[mnElemCount];
++ mpVertical = new bool[mnElemCount];
++ mpRects = new Rectangle[mnElemCount];
++
++ for(sal_Int32 i=0; i < mnElemCount; i++)
++ {
++ mpKinds[i] = rLList->getPresKind((sal_Int32) nTyp, i);
++ mpVertical[i] = rLList->isVertical((sal_Int32) nTyp, i);
++ arect = rectlist[i];
++ mpRects[i] = Rectangle( Point(arect.X, arect.Y), Size(arect.Width, arect.Height) );
++ }
++
++ }
++ else // for HANDOUT, calculate gaps and use just the title rect
++ {
++ mnGapX = (aPageSize.Width() - aPageInnerSize.Width()) / 2;
+ mnGapY = (aPageSize.Height() - aPageInnerSize.Height()) / 2;
- if(mpPageMasterInfo)
- {
-@@ -886,9 +909,21 @@ BOOL SdXMLExport::ImpPrepAutoLayoutInfo(
+ if(!mnGapX)
+@@ -362,47 +378,12 @@ ImpXMLAutoLayoutInfo::ImpXMLAutoLayoutIn
+
+ if(mnGapY < aPageInnerSize.Height() / 10)
+ mnGapY = aPageInnerSize.Height() / 10;
+- }
+- else if(mnType == 27 || mnType == 28)
+- {
+- // 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 ));
+- Size aClassicTSize(
+- long( aTitleSize.Width() * 0.854 ),
+- long( aTitleSize.Height() * 0.167 ));
+- Point aClassicLPos(
+- aLayoutPos.X() + long( aLayoutSize.Width() * 0.0735 ),
+- aLayoutPos.Y() + long( aLayoutSize.Height() * 0.472 ));
+- Size aClassicLSize(
+- long( aLayoutSize.Width() * 0.854 ),
+- long( aLayoutSize.Height() * 0.444 ));
+-
+- aLayoutPos.X() = aClassicLPos.X();
+- aLayoutPos.Y() = aClassicTPos.Y();
+- aLayoutSize.Width() = (aClassicLPos.X() + aClassicLSize.Width())
+- - (aClassicTSize.Height() + (aClassicLPos.Y() - (aClassicTPos.Y() + aClassicTSize.Height())));
+- aLayoutSize.Height() = (aClassicLPos.Y() + aClassicLSize.Height()) - aClassicTPos.Y();
+- }
+- else if( mnType == 32 )
+- {
+- // AUTOLAYOUT_ONLY_TEXT
+- aLayoutPos = aTitlePos;
+- aLayoutSize.Width() = aTitleSize.Width();
+- aLayoutSize.Height() = long( aLayoutSize.Height() * 0.825 );
++
++ mpRects = new Rectangle(aPagePos, aPageInnerSize);
++ mpVertical = new bool(false);
++ mpKinds = new UnoPresKind(UnoPresKind_HANDOUT);
+ }
+- else
+- {
+- aLayoutPos.X() += long( aLayoutSize.Width() * 0.0735 );
+- aLayoutPos.Y() += long( aLayoutSize.Height() * 0.278 );
+- aLayoutSize.Width() = long( aLayoutSize.Width() * 0.854 );
+- aLayoutSize.Height() = long( aLayoutSize.Height() * 0.630 );
+- }
+-
+- maPresRect.SetPos(aLayoutPos);
+- maPresRect.SetSize(aLayoutSize);
++
+ }
+
+ DECLARE_LIST(ImpXMLAutoLayoutInfoList, ImpXMLAutoLayoutInfo*)
+@@ -867,8 +848,6 @@ BOOL SdXMLExport::ImpPrepAutoLayoutInfo(
+ aAny = xPropSet->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("Layout")));
+ if(aAny >>= nType)
+ {
+- if(ImpXMLAutoLayoutInfo::IsCreateNecessary(nType))
+- {
+ ImpXMLEXPPageMasterInfo* pInfo = 0L;
+
+ // get master-page info
+@@ -886,9 +865,21 @@ BOOL SdXMLExport::ImpPrepAutoLayoutInfo(
}
}
}
@@ -79,3 +345,453 @@ diff -Nrup xmloff-m16/source/draw/sdxmlexp.cxx xmloff/source/draw/sdxmlexp.cxx
BOOL bDidExist(FALSE);
for(sal_uInt32 nCnt = 0L; !bDidExist && nCnt < mpAutoLayoutInfoList->Count(); nCnt++)
+@@ -914,7 +905,7 @@ BOOL SdXMLExport::ImpPrepAutoLayoutInfo(
+ rName = pNew->GetLayoutName();
+ bRetval = TRUE;
+ }
+- }
++
+ }
+
+ return bRetval;
+@@ -924,6 +915,17 @@ BOOL SdXMLExport::ImpPrepAutoLayoutInfo(
+
+ void SdXMLExport::ImpWriteAutoLayoutInfos()
+ {
++ Rectangle* pRects;
++ UnoPresKind* pKinds;
++ bool* pVertical;
++ sal_Int32 nType, nCount;
++ sal_Int32 nColCnt, nRowCnt;
++ sal_Int32 nGapX;
++ sal_Int32 nGapY;
++ Size aPartSize;
++ Point aPartPos, aTmpPos;
++
++
+ if(mpAutoLayoutInfoList->Count())
+ {
+ for(sal_uInt32 nCnt = 0L; nCnt < mpAutoLayoutInfoList->Count(); nCnt++)
+@@ -937,328 +939,100 @@ void SdXMLExport::ImpWriteAutoLayoutInfo
+ // write draw-style attributes
+ SvXMLElementExport aDSE(*this, XML_NAMESPACE_STYLE, XML_PRESENTATION_PAGE_LAYOUT, sal_True, sal_True);
+
+- // write presentation placeholders
+- switch(pInfo->GetLayoutType())
+- {
+- case 0 : // AUTOLAYOUT_TITLE
+- {
+- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
+- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderSubtitle, pInfo->GetPresRectangle());
+- break;
+- }
+- case 1 : // AUTOLAYOUT_ENUM
+- {
+- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
+- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderOutline, pInfo->GetPresRectangle());
+- break;
+- }
+- case 2 : // AUTOLAYOUT_CHART
+- {
+- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
+- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderChart, pInfo->GetPresRectangle());
+- break;
+- }
+- case 3 : // AUTOLAYOUT_2TEXT
+- {
+- Rectangle aLeft(pInfo->GetPresRectangle());
+- aLeft.setWidth(long(aLeft.GetWidth() * 0.488));
+- Rectangle aRight(aLeft);
+- aRight.Left() = long(aRight.Left() + aRight.GetWidth() * 1.05);
+-
+- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
+- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderOutline, aLeft);
+- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderOutline, aRight);
+- break;
+- }
+- case 4 : // AUTOLAYOUT_TEXTCHART
+- {
+- Rectangle aLeft(pInfo->GetPresRectangle());
+- aLeft.setWidth(long(aLeft.GetWidth() * 0.488));
+- Rectangle aRight(aLeft);
+- aRight.Left() = long(aRight.Left() + aRight.GetWidth() * 1.05);
+-
+- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
+- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderOutline, aLeft);
+- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderChart, aRight);
+- break;
+- }
+- case 6 : // AUTOLAYOUT_TEXTCLIP
+- {
+- Rectangle aLeft(pInfo->GetPresRectangle());
+- aLeft.setWidth(long(aLeft.GetWidth() * 0.488));
+- Rectangle aRight(aLeft);
+- aRight.Left() = long(aRight.Left() + aRight.GetWidth() * 1.05);
+-
+- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
+- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderOutline, aLeft);
+- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderGraphic, aRight);
+- break;
+- }
+- case 7 : // AUTOLAYOUT_CHARTTEXT
+- {
+- Rectangle aLeft(pInfo->GetPresRectangle());
+- aLeft.setWidth(long(aLeft.GetWidth() * 0.488));
+- Rectangle aRight(aLeft);
+- aRight.Left() = long(aRight.Left() + aRight.GetWidth() * 1.05);
+-
+- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
+- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderChart, aLeft);
+- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderOutline, aRight);
+- break;
+- }
+- case 8 : // AUTOLAYOUT_TAB
+- {
+- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
+- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTable, pInfo->GetPresRectangle());
+- break;
+- }
+- case 9 : // AUTOLAYOUT_CLIPTEXT
+- {
+- Rectangle aLeft(pInfo->GetPresRectangle());
+- aLeft.setWidth(long(aLeft.GetWidth() * 0.488));
+- Rectangle aRight(aLeft);
+- aRight.Left() = long(aRight.Left() + aRight.GetWidth() * 1.05);
+-
+- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
+- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderGraphic, aLeft);
+- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderOutline, aRight);
+- break;
+- }
+- case 10 : // AUTOLAYOUT_TEXTOBJ
+- {
+- Rectangle aLeft(pInfo->GetPresRectangle());
+- aLeft.setWidth(long(aLeft.GetWidth() * 0.488));
+- Rectangle aRight(aLeft);
+- aRight.Left() = long(aRight.Left() + aRight.GetWidth() * 1.05);
+-
+- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
+- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderOutline, aLeft);
+- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderObject, aRight);
+- break;
+- }
+- case 11 : // AUTOLAYOUT_OBJ
+- {
+- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
+- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderObject, pInfo->GetPresRectangle());
+- break;
+- }
+- case 12 : // AUTOLAYOUT_TEXT2OBJ
+- {
+- Rectangle aLeft(pInfo->GetPresRectangle());
+- aLeft.setWidth(long(aLeft.GetWidth() * 0.488));
+- Rectangle aRightTop(aLeft);
+- aRightTop.Left() = long(aRightTop.Left() + aRightTop.GetWidth() * 1.05);
+- aRightTop.setHeight(long(aRightTop.GetHeight() * 0.477));
+- Rectangle aRightBottom(aRightTop);
+- aRightBottom.Top() = long(aRightBottom.Top() + aRightBottom.GetHeight() * 1.095);
+-
+- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
+- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderOutline, aLeft);
+- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderObject, aRightTop);
+- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderObject, aRightBottom);
+- break;
+- }
+- case 13 : // AUTOLAYOUT_OBJTEXT
+- {
+- Rectangle aLeft(pInfo->GetPresRectangle());
+- aLeft.setWidth(long(aLeft.GetWidth() * 0.488));
+- Rectangle aRight(aLeft);
+- aRight.Left() = long(aRight.Left() + aRight.GetWidth() * 1.05);
+-
+- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
+- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderObject, aLeft);
+- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderOutline, aRight);
+- break;
+- }
+- case 14 : // AUTOLAYOUT_OBJOVERTEXT
+- {
+- Rectangle aTop(pInfo->GetPresRectangle());
+- aTop.setHeight(long(aTop.GetHeight() * 0.477));
+- Rectangle aBottom(aTop);
+- aBottom.Top() = long(aBottom.Top() + aBottom.GetHeight() * 1.095);
+-
+- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
+- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderObject, aTop);
+- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderOutline, aBottom);
+- break;
+- }
+- case 15 : // AUTOLAYOUT_2OBJTEXT
+- {
+- Rectangle aLeftTop(pInfo->GetPresRectangle());
+- aLeftTop.setWidth(long(aLeftTop.GetWidth() * 0.488));
+- Rectangle aRight(aLeftTop);
+- aRight.Left() = long(aRight.Left() + aRight.GetWidth() * 1.05);
+- aLeftTop.setHeight(long(aLeftTop.GetHeight() * 0.477));
+- Rectangle aLeftBottom(aLeftTop);
+- aLeftBottom.Top() = long(aLeftBottom.Top() + aLeftBottom.GetHeight() * 1.095);
+-
+- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
+- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderObject, aLeftTop);
+- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderObject, aLeftBottom);
+- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderOutline, aRight);
+- break;
+- }
+- case 16 : // AUTOLAYOUT_2OBJOVERTEXT
+- {
+- Rectangle aTopLeft(pInfo->GetPresRectangle());
+- aTopLeft.setHeight(long(aTopLeft.GetHeight() * 0.477));
+- Rectangle aBottom(aTopLeft);
+- aBottom.Top() = long(aBottom.Top() + aBottom.GetHeight() * 1.095);
+- aTopLeft.setWidth(long(aTopLeft.GetWidth() * 0.488));
+- Rectangle aTopRight(aTopLeft);
+- aTopRight.Left() = long(aTopRight.Left() + aTopRight.GetWidth() * 1.05);
+-
+- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
+- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderObject, aTopLeft);
+- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderObject, aTopRight);
+- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderOutline, aBottom);
+- break;
+- }
+- case 17 : // AUTOLAYOUT_TEXTOVEROBJ
+- {
+- Rectangle aTop(pInfo->GetPresRectangle());
+- aTop.setHeight(long(aTop.GetHeight() * 0.477));
+- Rectangle aBottom(aTop);
+- aBottom.Top() = long(aBottom.Top() + aBottom.GetHeight() * 1.095);
+-
+- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
+- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderOutline, aTop);
+- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderObject, aBottom);
+- break;
+- }
+- case 18 : // AUTOLAYOUT_4OBJ
+- {
+- Rectangle aTopLeft(pInfo->GetPresRectangle());
+- aTopLeft.setHeight(long(aTopLeft.GetHeight() * 0.477));
+- aTopLeft.setWidth(long(aTopLeft.GetWidth() * 0.488));
+- Rectangle aBottomLeft(aTopLeft);
+- aBottomLeft.Top() = long(aBottomLeft.Top() + aBottomLeft.GetHeight() * 1.095);
+- Rectangle aTopRight(aTopLeft);
+- aTopRight.Left() = long(aTopRight.Left() + aTopRight.GetWidth() * 1.05);
+- Rectangle aBottomRight(aTopRight);
+- aBottomRight.Top() = long(aBottomRight.Top() + aBottomRight.GetHeight() * 1.095);
+-
+- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
+- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderObject, aTopLeft);
+- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderObject, aTopRight);
+- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderObject, aBottomLeft);
+- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderObject, aBottomRight);
+- break;
+- }
+- case 19 : // AUTOLAYOUT_ONLY_TITLE
+- {
+- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
+- break;
+- }
+- case 21 : // AUTOLAYOUT_NOTES
+- {
+- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderPage, pInfo->GetTitleRectangle());
+- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderNotes, pInfo->GetPresRectangle());
+- break;
+- }
+- case 22 : // AUTOLAYOUT_HANDOUT1
+- case 23 : // AUTOLAYOUT_HANDOUT2
+- case 24 : // AUTOLAYOUT_HANDOUT3
+- case 25 : // AUTOLAYOUT_HANDOUT4
+- case 26 : // AUTOLAYOUT_HANDOUT6
+- case 31 : // AUTOLAYOUT_HANDOUT9
+- {
+- sal_Int32 nColCnt, nRowCnt;
+- sal_Int32 nGapX = pInfo->GetGapX();
+- sal_Int32 nGapY = pInfo->GetGapY();
+-
+- switch(pInfo->GetLayoutType())
+- {
+- case 22 : nColCnt = 1; nRowCnt = 1; break;
+- case 23 : nColCnt = 1; nRowCnt = 2; break;
+- case 24 : nColCnt = 1; nRowCnt = 3; break;
+- case 25 : nColCnt = 2; nRowCnt = 2; break;
+- case 26 : nColCnt = 3; nRowCnt = 2; break;
+- case 31 : nColCnt = 3; nRowCnt = 3; break;
+- default: nColCnt = 0; nRowCnt = 0; break; // FIXME - What is correct values?
+- }
+-
+- Size aPartSize(pInfo->GetTitleRectangle().GetSize());
+- Point aPartPos(pInfo->GetTitleRectangle().TopLeft());
+-
+- if(aPartSize.Width() > aPartSize.Height())
+- {
+- sal_Int32 nZwi(nColCnt);
+- nColCnt = nRowCnt;
+- nRowCnt = nZwi;
+- }
+-
+- aPartSize.Width() = (aPartSize.Width() - ((nColCnt - 1) * nGapX)) / nColCnt;
+- aPartSize.Height() = (aPartSize.Height() - ((nRowCnt - 1) * nGapY)) / nRowCnt;
+-
+- Point aTmpPos(aPartPos);
+-
+- for(sal_Int32 a = 0L; a < nRowCnt; a++)
+- {
+- aTmpPos.X() = aPartPos.X();
+-
+- for(sal_Int32 b = 0L; b < nColCnt; b++)
+- {
+- Rectangle aTmpRect(aTmpPos, aPartSize);
+-
+- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderHandout, aTmpRect);
+- aTmpPos.X() += aPartSize.Width() + nGapX;
+- }
+-
+- aTmpPos.Y() += aPartSize.Height() + nGapY;
+- }
+- break;
+- }
+- case 27 : // AUTOLAYOUT_VERTICAL_TITLE_TEXT_CHART
+- {
+- Rectangle aTop(pInfo->GetPresRectangle());
+- aTop.setHeight(long(aTop.GetHeight() * 0.488));
+- Rectangle aBottom(aTop);
+- aBottom.Top() = long(aBottom.Top() + aBottom.GetHeight() * 1.05);
+-
+- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderVerticalTitle, pInfo->GetTitleRectangle());
+- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderVerticalOutline, aTop);
+- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderChart, aBottom);
+- break;
+- }
+- case 28 : // AUTOLAYOUT_VERTICAL_TITLE_VERTICAL_OUTLINE
+- {
+- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderVerticalTitle, pInfo->GetTitleRectangle());
+- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderVerticalOutline, pInfo->GetPresRectangle());
+- break;
+- }
+- case 29 : // AUTOLAYOUT_TITLE_VERTICAL_OUTLINE
+- {
+- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
+- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderVerticalOutline, pInfo->GetPresRectangle());
+- break;
+- }
+- case 30 : // AUTOLAYOUT_TITLE_VERTICAL_OUTLINE_CLIPART
+- {
+- Rectangle aLeft(pInfo->GetPresRectangle());
+- aLeft.setWidth(long(aLeft.GetWidth() * 0.488));
+- Rectangle aRight(aLeft);
+- aRight.Left() = long(aRight.Left() + aRight.GetWidth() * 1.05);
+-
+- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
+- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderGraphic, aLeft);
+- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderVerticalOutline, aRight);
+- break;
+- }
+- case 32 : // AUTOLAYOUT_TITLE
+- {
+- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderSubtitle, pInfo->GetPresRectangle());
+- break;
+- }
+- default:
+- {
+- DBG_ERROR("XMLEXP: unknown autolayout export");
+- break;
+- }
+- }
+- }
+- }
+- }
++ pRects = pInfo->GetRects();
++ pKinds = pInfo->GetKinds();
++ pVertical = pInfo->GetVerticalList();
++ nType = pInfo->GetLayoutType();
++ nCount = pInfo->GetElemCount();
++ nGapX = pInfo->GetGapX();
++ nGapY = pInfo->GetGapY();
++
++ for(sal_Int32 i=0; i < nCount; i++)
++ {
++ switch (pKinds[i])
++ {
++ case UnoPresKind_TITLE: if(pVertical[i])
++ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderVerticalTitle, pRects[i]);
++ else
++ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pRects[i]);
++ break;
++ case UnoPresKind_TEXT: ImpWriteAutoLayoutPlaceholder(XmlPlaceholderText, pRects[i]);
++ break;
++ case UnoPresKind_OUTLINE: if(pVertical[i])
++ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderVerticalOutline, pRects[i]);
++ else
++ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderOutline, pRects[i]);
++ break;
++ case UnoPresKind_CHART: ImpWriteAutoLayoutPlaceholder(XmlPlaceholderChart, pRects[i]);
++ break;
++ case UnoPresKind_TABLE: ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTable, pRects[i]);
++ break;
++ case UnoPresKind_IMAGE:
++ case UnoPresKind_GRAPHIC: ImpWriteAutoLayoutPlaceholder(XmlPlaceholderGraphic, pRects[i]);
++ break;
++ case UnoPresKind_OBJECT: ImpWriteAutoLayoutPlaceholder(XmlPlaceholderObject, pRects[i]);
++ break;
++ case UnoPresKind_NOTES: ImpWriteAutoLayoutPlaceholder(XmlPlaceholderNotes, pRects[i]);
++ break;
++ case UnoPresKind_PAGE: ImpWriteAutoLayoutPlaceholder(XmlPlaceholderPage, pRects[i]);
++ break;
++ case UnoPresKind_HANDOUT:
++ switch(nType)
++ {
++ case UnoAutoLayout_HANDOUT1 : nColCnt = 1; nRowCnt = 1; break;
++ case UnoAutoLayout_HANDOUT2 : nColCnt = 1; nRowCnt = 2; break;
++ case UnoAutoLayout_HANDOUT3 : nColCnt = 1; nRowCnt = 3; break;
++ case UnoAutoLayout_HANDOUT4 : nColCnt = 2; nRowCnt = 2; break;
++ case UnoAutoLayout_HANDOUT6 : nColCnt = 3; nRowCnt = 2; break;
++ case UnoAutoLayout_HANDOUT9 : nColCnt = 3; nRowCnt = 3; break;
++ default: nColCnt = 0; nRowCnt = 0; break;
++ }
++
++ aPartSize = pRects->GetSize();
++ aPartPos = pRects->TopLeft();
++
++ if(aPartSize.Width() > aPartSize.Height())
++ {
++ sal_Int32 nZwi(nColCnt);
++ nColCnt = nRowCnt;
++ nRowCnt = nZwi;
++ }
++
++ aPartSize.Width() = (aPartSize.Width() - ((nColCnt - 1) * nGapX)) / nColCnt;
++ aPartSize.Height() = (aPartSize.Height() - ((nRowCnt - 1) * nGapY)) / nRowCnt;
++
++ aTmpPos = aPartPos;
++
++ for(sal_Int32 a = 0L; a < nRowCnt; a++)
++ {
++ aTmpPos.X() = aPartPos.X();
++
++ for(sal_Int32 b = 0L; b < nColCnt; b++)
++ {
++ Rectangle aTmpRect(aTmpPos, aPartSize);
++
++ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderHandout, aTmpRect);
++ aTmpPos.X() += aPartSize.Width() + nGapX;
++ }
++
++ aTmpPos.Y() += aPartSize.Height() + nGapY;
++ }
++ break;
++ case UnoPresKind_NONE:
++ case UnoPresKind_ORGCHART:
++ case UnoPresKind_BACKGROUND:
++ case UnoPresKind_FOOTER:
++ case UnoPresKind_HEADER:
++ case UnoPresKind_DATETIME:
++ case UnoPresKind_SLIDENUMBER:
++ default: break; /* do nothing */
++
++ } // switch (kinds[i]...
++
++ } // for each elem..
++ } //if pInfo
++ } // for each layout...
++ } // if (mpAutoLayoutInfo...
+ }
+
+ //////////////////////////////////////////////////////////////////////////////
More information about the ooo-build-commit
mailing list