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
This commit is contained in:
Vishv Brahmbhatt 2013-07-10 20:25:43 +05:30 committed by Thorsten Behrens
parent 2fd74b3b15
commit da5bca5b53
3 changed files with 66 additions and 13 deletions

View file

@ -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;
}

View file

@ -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>

View file

@ -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>