summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorVishv Brahmbhatt <vishvbrahmbhatt19@gmail.com>2013-07-10 20:25:43 +0530
committerThorsten Behrens <tbehrens@suse.com>2013-08-26 14:47:21 +0200
commitda5bca5b530521d75c4907b59c0b47ac1cc84a4b (patch)
tree40d754254efcd705d9a4d2a42bf2552489741997 /sd
parent2fd74b3b155160e73045298bc61ba8707cac2933 (diff)
Adding new Slide Layouts Samples to "layoutlist.xml".
Have added new "Slide Layouts" samples.So commented out the code related to existing slide layouts in "sdpage.cxx" and also added some code for XML parsing of the new layouts. Change-Id: I8f5fdcab5f2eb41e37fa522a7801b388cbfefed5
Diffstat (limited to 'sd')
-rw-r--r--sd/source/core/sdpage.cxx75
-rw-r--r--sd/xml/layoutlist.xml2
2 files changed, 64 insertions, 13 deletions
diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx
index e8f012a91712..4ad39f10f428 100644
--- a/sd/source/core/sdpage.cxx
+++ b/sd/source/core/sdpage.cxx
@@ -1417,34 +1417,83 @@ static void CalcAutoLayoutRectangles( SdPage& rPage, int nLayout, Rectangle* rRe
break;
case 5: // title, 2 shapes above shape
- aLayoutSize.Height() = long (aLayoutSize.Height() * 0.477);
- aLayoutSize.Width() = long (aLayoutSize.Width() * 0.488);
+ // aLayoutSize.Height() = long (aLayoutSize.Height() * 0.477);
+ // aLayoutSize.Width() = long (aLayoutSize.Width() * 0.488);
+ // rRectangle[1] = Rectangle (aLayoutPos, aLayoutSize);
+
+ // aTempPnt = aLayoutPos;
+ // aLayoutPos.X() = long (aLayoutPos.X() + aLayoutSize.Width() * 1.05);
+ // rRectangle[2] = Rectangle (aLayoutPos, aLayoutSize);
+
+ // aLayoutPos.X() = aTempPnt.X();
+ // aLayoutPos.Y() = long (aLayoutPos.Y() + aLayoutSize.Height() * 1.095);
+ // aLayoutSize.Width() = long (aLayoutSize.Width() / 0.488);
+ // rRectangle[3] = Rectangle (aLayoutPos, aLayoutSize);
+ // break;
+ readLayoutPropFromFile(root, "AUTOLAYOUT_TITLE_CONTENT_2CONTENT" ,"PRESOBJ_OUTLINE1" ,propvalue);
+ aLayoutPos.X() = propvalue[0];
+ aLayoutPos.Y() = propvalue[1];
+ aLayoutSize.Height() = propvalue[2];
+ aLayoutSize.Width() = propvalue[3];
rRectangle[1] = Rectangle (aLayoutPos, aLayoutSize);
- aTempPnt = aLayoutPos;
- aLayoutPos.X() = long (aLayoutPos.X() + aLayoutSize.Width() * 1.05);
+ readLayoutPropFromFile(root, "AUTOLAYOUT_TITLE_CONTENT_2CONTENT" ,"PRESOBJ_OUTLINE2" ,propvalue);
+ aLayoutPos.X() = propvalue[0];
+ aLayoutPos.Y() = propvalue[1];
+ aLayoutSize.Height() = propvalue[2];
+ aLayoutSize.Width() = propvalue[3];
rRectangle[2] = Rectangle (aLayoutPos, aLayoutSize);
- aLayoutPos.X() = aTempPnt.X();
- aLayoutPos.Y() = long (aLayoutPos.Y() + aLayoutSize.Height() * 1.095);
- aLayoutSize.Width() = long (aLayoutSize.Width() / 0.488);
+ readLayoutPropFromFile(root, "AUTOLAYOUT_TITLE_CONTENT_2CONTENT" ,"PRESOBJ_OUTLINE3" ,propvalue);
+ aLayoutPos.X() = propvalue[0];
+ aLayoutPos.Y() = propvalue[1];
+ aLayoutSize.Height() = propvalue[2];
+ aLayoutSize.Width() = propvalue[3];
rRectangle[3] = Rectangle (aLayoutPos, aLayoutSize);
break;
case 6: // title, 4 shapes
{
- sal_uLong nX = long (aLayoutPos.X());
+ // sal_uLong nX = long (aLayoutPos.X());
- aLayoutSize.Height() = long (aLayoutSize.Height() * 0.477);
- aLayoutSize.Width() = long (aLayoutSize.Width() * 0.488);
+ // aLayoutSize.Height() = long (aLayoutSize.Height() * 0.477);
+ // aLayoutSize.Width() = long (aLayoutSize.Width() * 0.488);
+ // rRectangle[1] = Rectangle (aLayoutPos, aLayoutSize);
+
+ // aLayoutPos.X() = long (nX + aLayoutSize.Width() * 1.05);
+ // rRectangle[2] = Rectangle (aLayoutPos, aLayoutSize);
+
+ // aLayoutPos.Y() = long (aLayoutPos.Y() + aLayoutSize.Height() * 1.095);
+ // rRectangle[3] = Rectangle (aLayoutPos, aLayoutSize);
+
+ // aLayoutPos.X() = nX;
+ // rRectangle[4] = Rectangle (aLayoutPos, aLayoutSize);
+ // break;
+ readLayoutPropFromFile(root, "AUTOLAYOUT_TITLE_4SCONTENT" ,"PRESOBJ_OUTLINE1" ,propvalue);
+ aLayoutPos.X() = propvalue[0];
+ aLayoutPos.Y() = propvalue[1];
+ aLayoutSize.Height() = propvalue[2];
+ aLayoutSize.Width() = propvalue[3];
rRectangle[1] = Rectangle (aLayoutPos, aLayoutSize);
- aLayoutPos.X() = long (nX + aLayoutSize.Width() * 1.05);
+ readLayoutPropFromFile(root, "AUTOLAYOUT_TITLE_4SCONTENT" ,"PRESOBJ_OUTLINE2" ,propvalue);
+ aLayoutPos.X() = propvalue[0];
+ aLayoutPos.Y() = propvalue[1];
+ aLayoutSize.Height() = propvalue[2];
+ aLayoutSize.Width() = propvalue[3];
rRectangle[2] = Rectangle (aLayoutPos, aLayoutSize);
- aLayoutPos.Y() = long (aLayoutPos.Y() + aLayoutSize.Height() * 1.095);
+ readLayoutPropFromFile(root, "AUTOLAYOUT_TITLE_4SCONTENT" ,"PRESOBJ_OUTLINE3" ,propvalue);
+ aLayoutPos.X() = propvalue[0];
+ aLayoutPos.Y() = propvalue[1];
+ aLayoutSize.Height() = propvalue[2];
+ aLayoutSize.Width() = propvalue[3];
rRectangle[3] = Rectangle (aLayoutPos, aLayoutSize);
- aLayoutPos.X() = nX;
+ readLayoutPropFromFile(root, "AUTOLAYOUT_TITLE_4SCONTENT" ,"PRESOBJ_OUTLINE4" ,propvalue);
+ aLayoutPos.X() = propvalue[0];
+ aLayoutPos.Y() = propvalue[1];
+ aLayoutSize.Height() = propvalue[2];
+ aLayoutSize.Width() = propvalue[3];
rRectangle[4] = Rectangle (aLayoutPos, aLayoutSize);
break;
}
diff --git a/sd/xml/layoutlist.xml b/sd/xml/layoutlist.xml
index 61b863d4b743..6695c530e41a 100644
--- a/sd/xml/layoutlist.xml
+++ b/sd/xml/layoutlist.xml
@@ -5,4 +5,6 @@
<layout type="AUTOLAYOUT_TITLE_CONTENT"><presobj kind="PRESOBJ_TITLE" layout-pos-x="1400" layout-pos-y="837" layout-size-height="4400" layout-size-width="25600"/><presobj kind="PRESOBJ_OUTLINE1" layout-pos-x="1400" layout-pos-y="4914" layout-size-height="25200" layout-size-width="12180"/></layout>
<layout type="AUTOLAYOUT_TITLE_2VTEXT"><presobj kind="PRESOBJ_TITLE" layout-pos-x="1400" layout-pos-y="837" layout-size-height="4400" layout-size-width="25600"/><presobj kind="PRESOBJ_OUTLINE1" layout-pos-x="1400" layout-pos-y="4914" layout-size-height="12297" layout-size-width="12180"/><presobj kind="PRESOBJ_OUTLINE2" layout-pos-x="14311" layout-pos-y="4914" layout-size-height="12297" layout-size-width="12180"/></layout>
<layout type="AUTOLAYOUT_TITLE_CONTENT_OVER_CONTENT"><presobj kind="PRESOBJ_TITLE" layout-pos-x="1400" layout-pos-y="837" layout-size-height="4400" layout-size-width="25600"/><presobj kind="PRESOBJ_OUTLINE1" layout-pos-x="1400" layout-pos-y="4914" layout-size-height="25200" layout-size-width="5809"/><presobj kind="PRESOBJ_OUTLINE2" layout-pos-x="1400" layout-pos-y="11274" layout-size-height="25200" layout-size-width="5809"/></layout>
+<layout type="AUTOLAYOUT_TITLE_CONTENT_2CONTENT"><presobj kind="PRESOBJ_TITLE" layout-pos-x="1400" layout-pos-y="837" layout-size-height="4400" layout-size-width="25600"/><presobj kind="PRESOBJ_OUTLINE1" layout-pos-x="1400" layout-pos-y="4914" layout-size-height="5809" layout-size-width="25198"/><presobj kind="PRESOBJ_OUTLINE2" layout-pos-x="1400" layout-pos-y="11274" layout-size-height="5809" layout-size-width="12297"/><presobj kind="PRESOBJ_OUTLINE3" layout-pos-x="14311" layout-pos-y="11274" layout-size-height="5809" layout-size-width="12297"/></layout>
+<layout type="AUTOLAYOUT_TITLE_4SCONTENT"><presobj kind="PRESOBJ_TITLE" layout-pos-x="1400" layout-pos-y="837" layout-size-height="4400" layout-size-width="25600"/><presobj kind="PRESOBJ_OUTLINE1" layout-pos-x="1400" layout-pos-y="4914" layout-size-height="5809" layout-size-width="12297"/><presobj kind="PRESOBJ_OUTLINE2" layout-pos-x="14311" layout-pos-y="5914" layout-size-height="4509" layout-size-width="12297"/><presobj kind="PRESOBJ_OUTLINE3" layout-pos-x="14311" layout-pos-y="12274" layout-size-height="4509" layout-size-width="12297"/><presobj kind="PRESOBJ_OUTLINE4" layout-pos-x="1400" layout-pos-y="11274" layout-size-height="5809" layout-size-width="12297"/></layout>
</layout-list> \ No newline at end of file