[ooo-build-commit] patches/dev300
Thorsten Behrens
thorsten at kemper.freedesktop.org
Mon Jul 27 01:52:10 PDT 2009
patches/dev300/apply | 1
patches/dev300/offapi-layoutcode.diff | 42 ++++++++-
patches/dev300/sd-layoutcode.diff | 57 ++++++++++++
patches/dev300/xmloff-layoutcode.diff | 153 ++++++++++++++++++++++++++++++++++
4 files changed, 249 insertions(+), 4 deletions(-)
New commits:
commit 3888c179e3b8e1420d0ff0564c528a3615b0aadb
Author: Thorsten Behrens <tbehrens at novell.com>
Date: Mon Jul 27 10:49:52 2009 +0200
Cocofan changed layoutcode patches
* patches/dev300/apply: added xmloff-layoutcode.diff
* patches/dev300/offapi-layoutcode.diff: cleanup makefile, added enums
* patches/dev300/sd-layoutcode.diff: added XLayoutList as page property
* patches/dev300/xmloff-layoutcode.diff: newly added
diff --git a/patches/dev300/apply b/patches/dev300/apply
index 9b61df7..a31a2cb 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -3372,4 +3372,5 @@ statusbar-fancy-modified-status-sw.diff, kohei
[ AutoLayout ]
sd-layoutcode.diff, cocofan
offapi-layoutcode.diff, cocofan
+xmloff-layoutcode.diff, cocofan
diff --git a/patches/dev300/offapi-layoutcode.diff b/patches/dev300/offapi-layoutcode.diff
index c12e7fd..39f21b0 100644
--- a/patches/dev300/offapi-layoutcode.diff
+++ b/patches/dev300/offapi-layoutcode.diff
@@ -13,8 +13,8 @@ diff -Nrup offapi-m16/com/sun/star/presentation/makefile.mk offapi/com/sun/star/
diff -Nrup offapi-m16/com/sun/star/presentation/XLayoutList.idl offapi/com/sun/star/presentation/XLayoutList.idl
--- offapi-m16/com/sun/star/presentation/XLayoutList.idl 1969-12-31 16:00:00.000000000 -0800
-+++ offapi/com/sun/star/presentation/XLayoutList.idl 2009-07-26 00:59:28.000000000 -0700
-@@ -0,0 +1,71 @@
++++ offapi/com/sun/star/presentation/XLayoutList.idl 2009-07-26 20:00:46.000000000 -0700
+@@ -0,0 +1,109 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -64,6 +64,44 @@ diff -Nrup offapi-m16/com/sun/star/presentation/XLayoutList.idl offapi/com/sun/s
+
+module com { module sun { module star { module presentation {
+
++enum UnoAutoLayout
++{
++ TITLE,
++ ENUM,
++ CHART,
++ 2TEXT,
++ TEXTCHART,
++ ORG,
++ TEXTCLIP,
++ CHARTTEXT,
++ TAB,
++ CLIPTEXT,
++ TEXTOBJ,
++ OBJ,
++ TEXT2OBJ,
++ OBJTEXT,
++ OBJOVERTEXT,
++ 2OBJTEXT,
++ 2OBJOVERTEXT,
++ TEXTOVEROBJ,
++ 4OBJ,
++ ONLY_TITLE,
++ NONE,
++ NOTES,
++ HANDOUT1,
++ HANDOUT2,
++ HANDOUT3,
++ HANDOUT4,
++ HANDOUT6,
++ VERTICAL_TITLE_TEXT_CHART,
++ VERTICAL_TITLE_VERTICAL_OUTLINE,
++ TITLE_VERTICAL_OUTLINE,
++ TITLE_VERTICAL_OUTLINE_CLIPART,
++ HANDOUT9,
++ ONLY_TEXT,
++ NUM_OF_BUILTINS
++};
++
+//=============================================================================
+
+/** The interface for the layout list. Layout list stores information
diff --git a/patches/dev300/sd-layoutcode.diff b/patches/dev300/sd-layoutcode.diff
index f1e7808..00c2fa4 100644
--- a/patches/dev300/sd-layoutcode.diff
+++ b/patches/dev300/sd-layoutcode.diff
@@ -3863,8 +3863,51 @@ 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-25 19:36:23.000000000 -0700
-@@ -536,7 +536,7 @@ void SAL_CALL SdGenericDrawPage::setProp
++++ sd/source/ui/unoidl/unopage.cxx 2009-07-26 22:05:47.000000000 -0700
+@@ -36,6 +36,7 @@
+ #include <com/sun/star/presentation/AnimationEffect.hpp>
+ #include <com/sun/star/presentation/PresentationRange.hpp>
+ #include <com/sun/star/presentation/AnimationSpeed.hpp>
++#include <com/sun/star/presentation/XLayoutList.hpp>
+ #include <com/sun/star/view/PaperOrientation.hpp>
+ #include <com/sun/star/animations/AnimationNodeType.hpp>
+ #include <com/sun/star/presentation/EffectNodeType.hpp>
+@@ -119,7 +120,7 @@ enum WID_PAGE
+ WID_PAGE_PAGENUMBERVISIBLE, WID_PAGE_DATETIMEVISIBLE, WID_PAGE_DATETIMEFIXED,
+ WID_PAGE_DATETIMETEXT, WID_PAGE_DATETIMEFORMAT, WID_TRANSITION_TYPE, WID_TRANSITION_SUBTYPE,
+ WID_TRANSITION_DIRECTION, WID_TRANSITION_FADE_COLOR, WID_TRANSITION_DURATION, WID_LOOP_SOUND,
+- WID_NAVORDER
++ WID_NAVORDER, WID_AUTOLAYOUT_LIST
+ };
+
+ #ifndef SEQTYPE
+@@ -176,6 +177,7 @@ const SfxItemPropertyMap* ImplGetDrawPag
+ { MAP_CHAR_LEN("TransitionDuration"), WID_TRANSITION_DURATION, &::getCppuType((const double*)0), 0, 0},
+ { MAP_CHAR_LEN("LoopSound"), WID_LOOP_SOUND, &::getBooleanCppuType(), 0, 0},
+ { MAP_CHAR_LEN("NavigationOrder"), WID_NAVORDER, &::com::sun::star::container::XIndexAccess::static_type(),0, 0},
++ { MAP_CHAR_LEN("AutoLayoutList"), WID_AUTOLAYOUT_LIST, &::getCppuType((const Reference< ::com::sun::star::presentation::XLayoutList >*)0), 0, 0},
+ {0,0,0,0,0,0}
+ };
+
+@@ -265,7 +267,7 @@ const SfxItemPropertyMap* ImplGetMasterP
+ { MAP_CHAR_LEN(UNO_NAME_PAGE_WIDTH), WID_PAGE_WIDTH, &::getCppuType((const sal_Int32*)0), 0, 0},
+ { MAP_CHAR_LEN("BackgroundFullSize"), WID_PAGE_BACKFULL, &::getBooleanCppuType(), 0, 0},
+ { MAP_CHAR_LEN(sUNO_Prop_UserDefinedAttributes),WID_PAGE_USERATTRIBS, &::getCppuType((const Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},
+- { MAP_CHAR_LEN("IsBackgroundDark" ), WID_PAGE_ISDARK, &::getBooleanCppuType(), beans::PropertyAttribute::READONLY, 0},
++ { MAP_CHAR_LEN("IsBackgroundDark" ), WID_PAGE_ISDARK, &::getBooleanCppuType(), beans::PropertyAttribute::READONLY, 0},
+ {0,0,0,0,0,0}
+ };
+
+@@ -506,6 +508,8 @@ void SAL_CALL SdGenericDrawPage::setProp
+ case WID_NAVORDER:
+ setNavigationOrder( aValue );
+ break;
++ case WID_AUTOLAYOUT_LIST:
++ break; // do nothing for now
+ case WID_PAGE_LEFT:
+ case WID_PAGE_RIGHT:
+ case WID_PAGE_TOP:
+@@ -536,7 +540,7 @@ void SAL_CALL SdGenericDrawPage::setProp
GetPage()->SetPresChange( (PresChange)nValue );
break;
case WID_PAGE_LAYOUT:
@@ -3873,6 +3916,16 @@ diff -Nrup sd-m16/source/ui/unoidl/unopage.cxx sd/source/ui/unoidl/unopage.cxx
break;
case WID_PAGE_DURATION:
GetPage()->SetTime((sal_uInt32)nValue);
+@@ -899,6 +903,9 @@ Any SAL_CALL SdGenericDrawPage::getPrope
+
+ switch( pMap ? pMap->nWID : -1 )
+ {
++ case WID_AUTOLAYOUT_LIST:
++ aAny <<= Reference< ::com::sun::star::presentation::XLayoutList >( GetLayoutList() ) ;
++ break;
+ case WID_NAVORDER:
+ aAny = getNavigationOrder();
+ 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
diff --git a/patches/dev300/xmloff-layoutcode.diff b/patches/dev300/xmloff-layoutcode.diff
new file mode 100644
index 0000000..04fb7e7
--- /dev/null
+++ b/patches/dev300/xmloff-layoutcode.diff
@@ -0,0 +1,153 @@
+diff -Nrup xmloff-m16/source/draw/sdxmlexp.cxx xmloff/source/draw/sdxmlexp.cxx
+--- xmloff-m16/source/draw/sdxmlexp.cxx 2009-07-27 00:38:42.000000000 -0700
++++ xmloff/source/draw/sdxmlexp.cxx 2009-07-27 00:36:22.000000000 -0700
+@@ -39,6 +39,10 @@
+ #include <com/sun/star/lang/ServiceNotRegisteredException.hpp>
+ #include <com/sun/star/presentation/XPresentationSupplier.hpp>
+ #include <com/sun/star/presentation/XCustomPresentationSupplier.hpp>
++#include <com/sun/star/presentation/XLayoutList.hpp>
++#include <com/sun/star/presentation/UnoAutoLayout.hpp>
++#include <com/sun/star/awt/Rectangle.hpp>
++#include <com/sun/star/awt/Size.hpp>
+ #include <com/sun/star/task/XStatusIndicatorSupplier.hpp>
+ #include <com/sun/star/lang/Locale.hpp>
+ #include <com/sun/star/uno/Any.hxx>
+@@ -92,6 +96,8 @@
+
+ using ::rtl::OUString;
+ using ::rtl::OUStringBuffer;
++using ::com::sun::star::presentation::UnoAutoLayout;
++using ::com::sun::star::presentation::XLayoutList;
+
+ using namespace ::com::sun::star;
+ using namespace ::com::sun::star::uno;
+@@ -115,6 +121,7 @@ class ImpXMLEXPPageMasterInfo
+ view::PaperOrientation meOrientation;
+ OUString msName;
+ OUString msMasterPageName;
++ Reference<XLayoutList> maLayoutlist;
+
+ public:
+ ImpXMLEXPPageMasterInfo(const SdXMLExport& rExp, const Reference<XDrawPage>& xPage);
+@@ -131,6 +138,7 @@ public:
+ sal_Int32 GetWidth() const { return mnWidth; }
+ sal_Int32 GetHeight() const { return mnHeight; }
+ view::PaperOrientation GetOrientation() const { return meOrientation; }
++ Reference<XLayoutList> GetLayoutList() const { return maLayoutlist; }
+ };
+
+ ImpXMLEXPPageMasterInfo::ImpXMLEXPPageMasterInfo(
+@@ -148,8 +156,15 @@ ImpXMLEXPPageMasterInfo::ImpXMLEXPPageMa
+ if(xPropSet.is())
+ {
+ Any aAny;
++
++
+
+ Reference< beans::XPropertySetInfo > xPropsInfo( xPropSet->getPropertySetInfo() );
++ if( xPropsInfo.is() && xPropsInfo->hasPropertyByName(OUString(RTL_CONSTASCII_USTRINGPARAM("AutoLayoutList") )))
++ {
++ aAny = xPropSet->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("AutoLayoutList")));
++ aAny >>= maLayoutlist;
++ }
+ if( xPropsInfo.is() && xPropsInfo->hasPropertyByName(OUString(RTL_CONSTASCII_USTRINGPARAM("BorderBottom") )))
+ {
+ aAny = xPropSet->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("BorderBottom")));
+@@ -240,15 +255,17 @@ public:
+
+ BOOL ImpXMLAutoLayoutInfo::IsCreateNecessary(sal_uInt16 nTyp)
+ {
+- if(nTyp == 5 /* AUTOLAYOUT_ORG */
+- || nTyp == 20 /* AUTOLAYOUT_NONE */
+- || nTyp >= IMP_AUTOLAYOUT_INFO_MAX)
++
++ if( nTyp == (sal_uInt16) UnoAutoLayout_ORG
++ || nTyp == (sal_uInt16) UnoAutoLayout_NONE
++ || nTyp >= (sal_uInt16) UnoAutoLayout_NUM_OF_BUILTINS)
+ return FALSE;
+ return TRUE;
+ }
+
+ BOOL ImpXMLAutoLayoutInfo::operator==(const ImpXMLAutoLayoutInfo& rInfo) const
+ {
++
+ return ((mnType == rInfo.mnType
+ && mpPageMasterInfo == rInfo.mpPageMasterInfo));
+ }
+@@ -257,25 +274,52 @@ ImpXMLAutoLayoutInfo::ImpXMLAutoLayoutIn
+ : mnType(nTyp),
+ mpPageMasterInfo(pInf)
+ {
++ //debug code only
++ ::awt::Size unopage;
++ ::awt::Rectangle unotitle;
++ ::awt::Rectangle unolayout;
++
++ unopage.Width = 1000L;
++ unopage.Height = 1000L;
++
++ unotitle.X = 10L;
++ unotitle.Y = 10L;
++ unolayout.X = 10L;
++ unolayout.Y = 60L;
++ unotitle.Width = 800L;
++ unotitle.Height = 40L;
++ unolayout.Width = 800L;
++ unolayout.Height = 940L;
++
++ Reference< XLayoutList > layoutlist(mpPageMasterInfo->GetLayoutList());
++
++ Sequence< ::awt::Rectangle > rects = layoutlist->getAutoLayoutRectangles((sal_uInt32) 0,
++ unotitle, unolayout, unopage, false);
++
++ // end of debug code.
++
+ // create full info (initialze with typical values)
+ Point aPagePos(0,0);
+ Size aPageSize(28000, 21000);
+ Size aPageInnerSize(28000, 21000);
+
++
+ if(mpPageMasterInfo)
+ {
++
+ aPagePos = Point(mpPageMasterInfo->GetBorderLeft(), mpPageMasterInfo->GetBorderTop());
+ aPageSize = Size(mpPageMasterInfo->GetWidth(), mpPageMasterInfo->GetHeight());
+ aPageInnerSize = aPageSize;
+ aPageInnerSize.Width() -= mpPageMasterInfo->GetBorderLeft() + mpPageMasterInfo->GetBorderRight();
+ aPageInnerSize.Height() -= mpPageMasterInfo->GetBorderTop() + mpPageMasterInfo->GetBorderBottom();
++
+ }
+
+ // title rectangle aligning
+ Point aTitlePos(aPagePos);
+ Size aTitleSize(aPageInnerSize);
+-
+- if(mnType == 21 /* AUTOLAYOUT_NOTES */)
++
++ if(mnType == (sal_uInt16) UnoAutoLayout_NOTES)
+ {
+ aTitleSize.Height() = (long) (aTitleSize.Height() / 2.5);
+ Point aPos = aTitlePos;
+@@ -298,10 +342,9 @@ ImpXMLAutoLayoutInfo::ImpXMLAutoLayoutIn
+ aTitlePos = aPos;
+ aTitleSize = aSize;
+ }
+- else if(mnType == 27 || mnType == 28)
++ else if(mnType == (sal_uInt16) UnoAutoLayout_VERTICAL_TITLE_TEXT_CHART
++ || mnType == (sal_uInt16) UnoAutoLayout_VERTICAL_TITLE_VERTICAL_OUTLINE)
+ {
+- // AUTOLAYOUT_VERTICAL_TITLE_TEXT_CHART or
+- // AUTOLAYOUT_VERTICAL_TITLE_VERTICAL_OUTLINE
+ Point aClassicTPos(
+ aTitlePos.X() + long( aTitleSize.Width() * 0.0735 ),
+ aTitlePos.Y() + long( aTitleSize.Height() * 0.083 ));
+@@ -337,7 +380,7 @@ ImpXMLAutoLayoutInfo::ImpXMLAutoLayoutIn
+ Point aLayoutPos(aPagePos);
+ Size aLayoutSize(aPageInnerSize);
+
+- if(mnType == 21 /* AUTOLAYOUT_NOTES */)
++ if(mnType == (sal_uInt16) UnoAutoLayout_NOTES)
+ {
+ aLayoutPos.X() += long( aLayoutSize.Width() * 0.0735 );
+ aLayoutPos.Y() += long( aLayoutSize.Height() * 0.472 );
More information about the ooo-build-commit
mailing list