summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2017-02-21 00:14:01 +0200
committerTor Lillqvist <tml@collabora.com>2017-02-21 00:14:14 +0200
commitc72a91512caceec6b47ab397bc3514945af462d8 (patch)
tree6feab09dbf0538a030550082efef953a3a420a89 /xmloff
parent1b3aa39339f0cf01ad5bd45806b18ea33faad5c4 (diff)
Use symbolic AUTOLAYOUT_* names
Change-Id: I76a23c99bf92f33ebea1e138ccb3e948dee5ab84
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/draw/sdxmlexp.cxx43
-rw-r--r--xmloff/source/draw/ximpstyl.cxx42
2 files changed, 42 insertions, 43 deletions
diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx
index dec026c3089c..5fb48ca00edf 100644
--- a/xmloff/source/draw/sdxmlexp.cxx
+++ b/xmloff/source/draw/sdxmlexp.cxx
@@ -326,7 +326,7 @@ ImpXMLAutoLayoutInfo::ImpXMLAutoLayoutInfo(sal_uInt16 nTyp, ImpXMLEXPPageMasterI
aLayoutSize.Width() = long( aLayoutSize.Width() * 0.854 );
aLayoutSize.Height() = long( aLayoutSize.Height() * 0.444 );
}
- else if((mnType >= 22 && mnType <= 26) || (mnType == 31)) // AUTOLAYOUT_HANDOUT
+ 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
@@ -366,9 +366,8 @@ ImpXMLAutoLayoutInfo::ImpXMLAutoLayoutInfo(sal_uInt16 nTyp, ImpXMLEXPPageMasterI
- (aClassicTSize.Height() + (aClassicLPos.Y() - (aClassicTPos.Y() + aClassicTSize.Height())));
aLayoutSize.Height() = (aClassicLPos.Y() + aClassicLSize.Height()) - aClassicTPos.Y();
}
- else if( mnType == 32 )
+ else if( mnType == AUTOLAYOUT_ONLY_TEXT )
{
- // AUTOLAYOUT_ONLY_TEXT
aLayoutPos = aTitlePos;
aLayoutSize.Width() = aTitleSize.Width();
aLayoutSize.Height() = long( aLayoutSize.Height() * 0.825 );
@@ -794,7 +793,7 @@ void SdXMLExport::ImpWriteAutoLayoutInfos()
// write presentation placeholders
switch(pInfo->GetLayoutType())
{
- case 0 : // AUTOLAYOUT_TITLE
+ case AUTOLAYOUT_TITLE :
{
ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
ImpWriteAutoLayoutPlaceholder(XmlPlaceholderSubtitle, pInfo->GetPresRectangle());
@@ -806,7 +805,7 @@ void SdXMLExport::ImpWriteAutoLayoutInfos()
ImpWriteAutoLayoutPlaceholder(XmlPlaceholderOutline, pInfo->GetPresRectangle());
break;
}
- case 2 : // AUTOLAYOUT_CHART
+ case AUTOLAYOUT_CHART :
{
ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
ImpWriteAutoLayoutPlaceholder(XmlPlaceholderChart, pInfo->GetPresRectangle());
@@ -824,7 +823,7 @@ void SdXMLExport::ImpWriteAutoLayoutInfos()
ImpWriteAutoLayoutPlaceholder(XmlPlaceholderOutline, aRight);
break;
}
- case 4 : // AUTOLAYOUT_TEXTCHART
+ case AUTOLAYOUT_TEXTCHART :
{
Rectangle aLeft(pInfo->GetPresRectangle());
aLeft.setWidth(long(aLeft.GetWidth() * 0.488));
@@ -836,7 +835,7 @@ void SdXMLExport::ImpWriteAutoLayoutInfos()
ImpWriteAutoLayoutPlaceholder(XmlPlaceholderChart, aRight);
break;
}
- case 6 : // AUTOLAYOUT_TEXTCLIP
+ case AUTOLAYOUT_TEXTCLIP :
{
Rectangle aLeft(pInfo->GetPresRectangle());
aLeft.setWidth(long(aLeft.GetWidth() * 0.488));
@@ -848,7 +847,7 @@ void SdXMLExport::ImpWriteAutoLayoutInfos()
ImpWriteAutoLayoutPlaceholder(XmlPlaceholderGraphic, aRight);
break;
}
- case 7 : // AUTOLAYOUT_CHARTTEXT
+ case AUTOLAYOUT_CHARTTEXT :
{
Rectangle aLeft(pInfo->GetPresRectangle());
aLeft.setWidth(long(aLeft.GetWidth() * 0.488));
@@ -860,13 +859,13 @@ void SdXMLExport::ImpWriteAutoLayoutInfos()
ImpWriteAutoLayoutPlaceholder(XmlPlaceholderOutline, aRight);
break;
}
- case 8 : // AUTOLAYOUT_TAB
+ case AUTOLAYOUT_TAB :
{
ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTable, pInfo->GetPresRectangle());
break;
}
- case 9 : // AUTOLAYOUT_CLIPTEXT
+ case AUTOLAYOUT_CLIPTEXT :
{
Rectangle aLeft(pInfo->GetPresRectangle());
aLeft.setWidth(long(aLeft.GetWidth() * 0.488));
@@ -878,7 +877,7 @@ void SdXMLExport::ImpWriteAutoLayoutInfos()
ImpWriteAutoLayoutPlaceholder(XmlPlaceholderOutline, aRight);
break;
}
- case 10 : // AUTOLAYOUT_TEXTOBJ
+ case AUTOLAYOUT_TEXTOBJ :
{
Rectangle aLeft(pInfo->GetPresRectangle());
aLeft.setWidth(long(aLeft.GetWidth() * 0.488));
@@ -890,7 +889,7 @@ void SdXMLExport::ImpWriteAutoLayoutInfos()
ImpWriteAutoLayoutPlaceholder(XmlPlaceholderObject, aRight);
break;
}
- case 11 : // AUTOLAYOUT_OBJ
+ case AUTOLAYOUT_OBJ :
{
ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
ImpWriteAutoLayoutPlaceholder(XmlPlaceholderObject, pInfo->GetPresRectangle());
@@ -912,7 +911,7 @@ void SdXMLExport::ImpWriteAutoLayoutInfos()
ImpWriteAutoLayoutPlaceholder(XmlPlaceholderObject, aRightBottom);
break;
}
- case 13 : // AUTOLAYOUT_OBJTEXT
+ case AUTOLAYOUT_OBJTEXT :
{
Rectangle aLeft(pInfo->GetPresRectangle());
aLeft.setWidth(long(aLeft.GetWidth() * 0.488));
@@ -968,7 +967,7 @@ void SdXMLExport::ImpWriteAutoLayoutInfos()
ImpWriteAutoLayoutPlaceholder(XmlPlaceholderOutline, aBottom);
break;
}
- case 17 : // AUTOLAYOUT_TEXTOVEROBJ
+ case AUTOLAYOUT_TEXTOVEROBJ :
{
Rectangle aTop(pInfo->GetPresRectangle());
aTop.setHeight(long(aTop.GetHeight() * 0.477));
@@ -1004,18 +1003,18 @@ void SdXMLExport::ImpWriteAutoLayoutInfos()
ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
break;
}
- case 21 : // AUTOLAYOUT_NOTES
+ case 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
+ case AUTOLAYOUT_HANDOUT1 :
+ case AUTOLAYOUT_HANDOUT2 :
+ case AUTOLAYOUT_HANDOUT3 :
+ case AUTOLAYOUT_HANDOUT4 :
+ case AUTOLAYOUT_HANDOUT6 :
+ case AUTOLAYOUT_HANDOUT9 :
{
sal_Int32 nColCnt, nRowCnt;
sal_Int32 nGapX = pInfo->GetGapX();
@@ -1102,7 +1101,7 @@ void SdXMLExport::ImpWriteAutoLayoutInfos()
ImpWriteAutoLayoutPlaceholder(XmlPlaceholderVerticalOutline, aRight);
break;
}
- case 32 : // AUTOLAYOUT_TITLE
+ case AUTOLAYOUT_ONLY_TEXT :
{
ImpWriteAutoLayoutPlaceholder(XmlPlaceholderSubtitle, pInfo->GetPresRectangle());
break;
diff --git a/xmloff/source/draw/ximpstyl.cxx b/xmloff/source/draw/ximpstyl.cxx
index 68c95c0984e1..88efe5bb46c0 100644
--- a/xmloff/source/draw/ximpstyl.cxx
+++ b/xmloff/source/draw/ximpstyl.cxx
@@ -423,7 +423,7 @@ SdXMLPresentationPageLayoutContext::SdXMLPresentationPageLayoutContext(
const OUString& rLName,
const uno::Reference< xml::sax::XAttributeList >& xAttrList)
: SvXMLStyleContext(rImport, nPrfx, rLName, xAttrList, XML_STYLE_FAMILY_SD_PRESENTATIONPAGELAYOUT_ID),
- mnTypeId( 20 ) // AUTOLAYOUT_NONE
+ mnTypeId( AUTOLAYOUT_NONE )
{
// set family to something special at SvXMLStyleContext
// for differences in search-methods
@@ -480,22 +480,22 @@ void SdXMLPresentationPageLayoutContext::EndElement()
switch( maList.size() )
{
case 1:
- mnTypeId = 22; // AUTOLAYOUT_HANDOUT1
+ mnTypeId = AUTOLAYOUT_HANDOUT1;
break;
case 2:
- mnTypeId = 23; // AUTOLAYOUT_HANDOUT2
+ mnTypeId = AUTOLAYOUT_HANDOUT2;
break;
case 3:
- mnTypeId = 24; // AUTOLAYOUT_HANDOUT3
+ mnTypeId = AUTOLAYOUT_HANDOUT3;
break;
case 4:
- mnTypeId = 25; // AUTOLAYOUT_HANDOUT4
+ mnTypeId = AUTOLAYOUT_HANDOUT4;
break;
case 9:
- mnTypeId = 31; // AUTOLAYOUT_HANDOUT9
+ mnTypeId = AUTOLAYOUT_HANDOUT9;
break;
default:
- mnTypeId = 26; // AUTOLAYOUT_HANDOUT6
+ mnTypeId = AUTOLAYOUT_HANDOUT6;
}
}
else
@@ -510,7 +510,7 @@ void SdXMLPresentationPageLayoutContext::EndElement()
}
else
{
- mnTypeId = 32; // AUTOLAYOUT_ONLY_TEXT
+ mnTypeId = AUTOLAYOUT_ONLY_TEXT;
}
break;
}
@@ -520,7 +520,7 @@ void SdXMLPresentationPageLayoutContext::EndElement()
if( pObj1->GetName() == "subtitle" )
{
- mnTypeId = 0; // AUTOLAYOUT_TITLE
+ mnTypeId = AUTOLAYOUT_TITLE;
}
else if( pObj1->GetName() == "outline" )
{
@@ -528,15 +528,15 @@ void SdXMLPresentationPageLayoutContext::EndElement()
}
else if( pObj1->GetName() == "chart" )
{
- mnTypeId = 2; // AUTOLAYOUT_CHART
+ mnTypeId = AUTOLAYOUT_CHART;
}
else if( pObj1->GetName() == "table" )
{
- mnTypeId = 8; // AUTOLAYOUT_TAB
+ mnTypeId = AUTOLAYOUT_TAB;
}
else if( pObj1->GetName() == "object" )
{
- mnTypeId = 11; // AUTOLAYOUT_OBJ
+ mnTypeId = AUTOLAYOUT_OBJ;
}
else if( pObj1->GetName() == "vertical_outline" )
{
@@ -551,7 +551,7 @@ void SdXMLPresentationPageLayoutContext::EndElement()
}
else
{
- mnTypeId = 21; // AUTOLAYOUT_NOTES
+ mnTypeId = AUTOLAYOUT_NOTES;
}
break;
}
@@ -568,27 +568,27 @@ void SdXMLPresentationPageLayoutContext::EndElement()
}
else if( pObj2->GetName() == "chart" )
{
- mnTypeId = 4; // AUTOLAYOUT_TEXTCHART
+ mnTypeId = AUTOLAYOUT_TEXTCHART;
}
else if( pObj2->GetName() == "graphic" )
{
- mnTypeId = 6; // AUTOLAYOUT_TEXTCLIP
+ mnTypeId = AUTOLAYOUT_TEXTCLIP;
}
else
{
if(pObj1->GetX() < pObj2->GetX())
{
- mnTypeId = 10; // AUTOLAYOUT_TEXTOBJ -> outline left, object right
+ mnTypeId = AUTOLAYOUT_TEXTOBJ; // outline left, object right
}
else
{
- mnTypeId = 17; // AUTOLAYOUT_TEXTOVEROBJ -> outline top, object right
+ mnTypeId = AUTOLAYOUT_TEXTOVEROBJ; // outline top, object right
}
}
}
else if( pObj1->GetName() == "chart" )
{
- mnTypeId = 7; // AUTOLAYOUT_CHARTTEXT
+ mnTypeId = AUTOLAYOUT_CHARTTEXT;
}
else if( pObj1->GetName() == "graphic" )
{
@@ -598,7 +598,7 @@ void SdXMLPresentationPageLayoutContext::EndElement()
}
else
{
- mnTypeId = 9; // AUTOLAYOUT_CLIPTEXT
+ mnTypeId = AUTOLAYOUT_CLIPTEXT;
}
}
else if( pObj1->GetName() == "vertical_outline" )
@@ -609,7 +609,7 @@ void SdXMLPresentationPageLayoutContext::EndElement()
{
if(pObj1->GetX() < pObj2->GetX())
{
- mnTypeId = 13; // AUTOLAYOUT_OBJTEXT -> left, right
+ mnTypeId = AUTOLAYOUT_OBJTEXT; // left, right
}
else
{
@@ -662,7 +662,7 @@ void SdXMLPresentationPageLayoutContext::EndElement()
}
default:
{
- mnTypeId = 20; // AUTOLAYOUT_NONE
+ mnTypeId = AUTOLAYOUT_NONE;
break;
}
}