summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-11-28 15:13:42 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-11-29 07:17:37 +0100
commit21de55596c0fdc2be736c6d0369bd9d3783020be (patch)
tree07d0f0cd54690e54405fe574c572cb2be74a3336 /xmloff
parentda9fb5d6d9ebf9363981c370ce937d8848989fcb (diff)
remove unnecessary "if (!empty()" checks before loops
found with git grep -n -A4 'if.*!.*empty' | grep -B3 -P '(\bfor)|(\bwhile)|(\bdo)' Change-Id: I582235b7cf977a0f9fb4099eb306fdb4a07b5334 Reviewed-on: https://gerrit.libreoffice.org/64169 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/draw/sdxmlexp.cxx719
-rw-r--r--xmloff/source/draw/shapeimport.cxx67
-rw-r--r--xmloff/source/table/XMLTableImport.cxx21
-rw-r--r--xmloff/source/text/txtparai.cxx2
4 files changed, 400 insertions, 409 deletions
diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx
index 3f09010adfd0..2383e4344321 100644
--- a/xmloff/source/draw/sdxmlexp.cxx
+++ b/xmloff/source/draw/sdxmlexp.cxx
@@ -746,386 +746,383 @@ bool SdXMLExport::ImpPrepAutoLayoutInfo(const Reference<XDrawPage>& xPage, OUStr
void SdXMLExport::ImpWriteAutoLayoutInfos()
{
- if( !mvAutoLayoutInfoList.empty() )
+ for(auto & pInfo : mvAutoLayoutInfoList)
{
- for(auto & pInfo : mvAutoLayoutInfoList)
+ if(pInfo)
{
- if(pInfo)
- {
- // prepare presentation-page layout attributes, style-name
- AddAttribute(XML_NAMESPACE_STYLE, XML_NAME, pInfo->GetLayoutName());
+ // prepare presentation-page layout attributes, style-name
+ AddAttribute(XML_NAMESPACE_STYLE, XML_NAME, pInfo->GetLayoutName());
- // write draw-style attributes
- SvXMLElementExport aDSE(*this, XML_NAMESPACE_STYLE, XML_PRESENTATION_PAGE_LAYOUT, true, true);
+ // write draw-style attributes
+ SvXMLElementExport aDSE(*this, XML_NAMESPACE_STYLE, XML_PRESENTATION_PAGE_LAYOUT, true, true);
- // write presentation placeholders
- switch(pInfo->GetLayoutType())
+ // write presentation placeholders
+ switch(pInfo->GetLayoutType())
+ {
+ case AUTOLAYOUT_TITLE :
{
- case AUTOLAYOUT_TITLE :
- {
- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderSubtitle, pInfo->GetPresRectangle());
- break;
- }
- case AUTOLAYOUT_TITLE_CONTENT :
- {
- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderOutline, pInfo->GetPresRectangle());
- break;
- }
- case AUTOLAYOUT_CHART :
- {
- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderChart, pInfo->GetPresRectangle());
- break;
- }
- case AUTOLAYOUT_TITLE_2CONTENT :
- {
- tools::Rectangle aLeft(pInfo->GetPresRectangle());
- aLeft.setWidth(long(aLeft.GetWidth() * 0.488));
- tools::Rectangle aRight(aLeft);
- aRight.SetLeft(long(aRight.Left() + aRight.GetWidth() * 1.05));
-
- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderOutline, aLeft);
- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderOutline, aRight);
- break;
- }
- case AUTOLAYOUT_TEXTCHART :
- {
- tools::Rectangle aLeft(pInfo->GetPresRectangle());
- aLeft.setWidth(long(aLeft.GetWidth() * 0.488));
- tools::Rectangle aRight(aLeft);
- aRight.SetLeft( long(aRight.Left() + aRight.GetWidth() * 1.05) );
-
- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderOutline, aLeft);
- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderChart, aRight);
- break;
- }
- case AUTOLAYOUT_TEXTCLIP :
- {
- tools::Rectangle aLeft(pInfo->GetPresRectangle());
- aLeft.setWidth(long(aLeft.GetWidth() * 0.488));
- tools::Rectangle aRight(aLeft);
- aRight.SetLeft(long(aRight.Left() + aRight.GetWidth() * 1.05));
-
- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderOutline, aLeft);
- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderGraphic, aRight);
- break;
- }
- case AUTOLAYOUT_CHARTTEXT :
- {
- tools::Rectangle aLeft(pInfo->GetPresRectangle());
- aLeft.setWidth(long(aLeft.GetWidth() * 0.488));
- tools::Rectangle aRight(aLeft);
- aRight.SetLeft(long(aRight.Left() + aRight.GetWidth() * 1.05));
-
- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderChart, aLeft);
- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderOutline, aRight);
- break;
- }
- case AUTOLAYOUT_TAB :
- {
- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTable, pInfo->GetPresRectangle());
- break;
- }
- case AUTOLAYOUT_CLIPTEXT :
- {
- tools::Rectangle aLeft(pInfo->GetPresRectangle());
- aLeft.setWidth(long(aLeft.GetWidth() * 0.488));
- tools::Rectangle aRight(aLeft);
- aRight.SetLeft(long(aRight.Left() + aRight.GetWidth() * 1.05));
-
- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderGraphic, aLeft);
- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderOutline, aRight);
- break;
- }
- case AUTOLAYOUT_TEXTOBJ :
- {
- tools::Rectangle aLeft(pInfo->GetPresRectangle());
- aLeft.setWidth(long(aLeft.GetWidth() * 0.488));
- tools::Rectangle aRight(aLeft);
- aRight.SetLeft(long(aRight.Left() + aRight.GetWidth() * 1.05));
-
- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderOutline, aLeft);
- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderObject, aRight);
- break;
- }
- case AUTOLAYOUT_OBJ :
- {
- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderObject, pInfo->GetPresRectangle());
- break;
- }
- case AUTOLAYOUT_TITLE_CONTENT_2CONTENT :
- {
- tools::Rectangle aLeft(pInfo->GetPresRectangle());
- aLeft.setWidth(long(aLeft.GetWidth() * 0.488));
- tools::Rectangle aRightTop(aLeft);
- aRightTop.SetLeft(long(aRightTop.Left() + aRightTop.GetWidth() * 1.05));
- aRightTop.setHeight(long(aRightTop.GetHeight() * 0.477));
- tools::Rectangle aRightBottom(aRightTop);
- aRightBottom.SetTop(long(aRightBottom.Top() + aRightBottom.GetHeight() * 1.095));
-
- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderOutline, aLeft);
- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderObject, aRightTop);
- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderObject, aRightBottom);
- break;
- }
- case AUTOLAYOUT_OBJTEXT :
- {
- tools::Rectangle aLeft(pInfo->GetPresRectangle());
- aLeft.setWidth(long(aLeft.GetWidth() * 0.488));
- tools::Rectangle aRight(aLeft);
- aRight.SetLeft(long(aRight.Left() + aRight.GetWidth() * 1.05));
-
- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderObject, aLeft);
- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderOutline, aRight);
- break;
- }
- case AUTOLAYOUT_TITLE_CONTENT_OVER_CONTENT :
- {
- tools::Rectangle aTop(pInfo->GetPresRectangle());
- aTop.setHeight(long(aTop.GetHeight() * 0.477));
- tools::Rectangle aBottom(aTop);
- aBottom.SetTop(long(aBottom.Top() + aBottom.GetHeight() * 1.095));
-
- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderObject, aTop);
- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderOutline, aBottom);
- break;
- }
- case AUTOLAYOUT_TITLE_2CONTENT_CONTENT :
- {
- tools::Rectangle aLeftTop(pInfo->GetPresRectangle());
- aLeftTop.setWidth(long(aLeftTop.GetWidth() * 0.488));
- tools::Rectangle aRight(aLeftTop);
- aRight.SetLeft(long(aRight.Left() + aRight.GetWidth() * 1.05));
- aLeftTop.setHeight(long(aLeftTop.GetHeight() * 0.477));
- tools::Rectangle aLeftBottom(aLeftTop);
- aLeftBottom.SetTop(long(aLeftBottom.Top() + aLeftBottom.GetHeight() * 1.095));
-
- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderObject, aLeftTop);
- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderObject, aLeftBottom);
- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderOutline, aRight);
- break;
- }
- case AUTOLAYOUT_TITLE_2CONTENT_OVER_CONTENT :
- {
- tools::Rectangle aTopLeft(pInfo->GetPresRectangle());
- aTopLeft.setHeight(long(aTopLeft.GetHeight() * 0.477));
- tools::Rectangle aBottom(aTopLeft);
- aBottom.SetTop(long(aBottom.Top() + aBottom.GetHeight() * 1.095));
- aTopLeft.setWidth(long(aTopLeft.GetWidth() * 0.488));
- tools::Rectangle aTopRight(aTopLeft);
- aTopRight.SetLeft(long(aTopRight.Left() + aTopRight.GetWidth() * 1.05));
-
- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderObject, aTopLeft);
- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderObject, aTopRight);
- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderOutline, aBottom);
- break;
- }
- case AUTOLAYOUT_TEXTOVEROBJ :
- {
- tools::Rectangle aTop(pInfo->GetPresRectangle());
- aTop.setHeight(long(aTop.GetHeight() * 0.477));
- tools::Rectangle aBottom(aTop);
- aBottom.SetTop(long(aBottom.Top() + aBottom.GetHeight() * 1.095));
-
- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderOutline, aTop);
- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderObject, aBottom);
- break;
- }
- case AUTOLAYOUT_TITLE_4CONTENT :
- {
- tools::Rectangle aTopLeft(pInfo->GetPresRectangle());
- aTopLeft.setHeight(long(aTopLeft.GetHeight() * 0.477));
- aTopLeft.setWidth(long(aTopLeft.GetWidth() * 0.488));
- tools::Rectangle aBottomLeft(aTopLeft);
- aBottomLeft.SetTop(long(aBottomLeft.Top() + aBottomLeft.GetHeight() * 1.095));
- tools::Rectangle aTopRight(aTopLeft);
- aTopRight.SetLeft(long(aTopRight.Left() + aTopRight.GetWidth() * 1.05));
- tools::Rectangle aBottomRight(aTopRight);
- aBottomRight.SetTop(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 AUTOLAYOUT_TITLE_ONLY :
- {
- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
- break;
- }
- case AUTOLAYOUT_NOTES :
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderSubtitle, pInfo->GetPresRectangle());
+ break;
+ }
+ case AUTOLAYOUT_TITLE_CONTENT :
+ {
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderOutline, pInfo->GetPresRectangle());
+ break;
+ }
+ case AUTOLAYOUT_CHART :
+ {
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderChart, pInfo->GetPresRectangle());
+ break;
+ }
+ case AUTOLAYOUT_TITLE_2CONTENT :
+ {
+ tools::Rectangle aLeft(pInfo->GetPresRectangle());
+ aLeft.setWidth(long(aLeft.GetWidth() * 0.488));
+ tools::Rectangle aRight(aLeft);
+ aRight.SetLeft(long(aRight.Left() + aRight.GetWidth() * 1.05));
+
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderOutline, aLeft);
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderOutline, aRight);
+ break;
+ }
+ case AUTOLAYOUT_TEXTCHART :
+ {
+ tools::Rectangle aLeft(pInfo->GetPresRectangle());
+ aLeft.setWidth(long(aLeft.GetWidth() * 0.488));
+ tools::Rectangle aRight(aLeft);
+ aRight.SetLeft( long(aRight.Left() + aRight.GetWidth() * 1.05) );
+
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderOutline, aLeft);
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderChart, aRight);
+ break;
+ }
+ case AUTOLAYOUT_TEXTCLIP :
+ {
+ tools::Rectangle aLeft(pInfo->GetPresRectangle());
+ aLeft.setWidth(long(aLeft.GetWidth() * 0.488));
+ tools::Rectangle aRight(aLeft);
+ aRight.SetLeft(long(aRight.Left() + aRight.GetWidth() * 1.05));
+
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderOutline, aLeft);
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderGraphic, aRight);
+ break;
+ }
+ case AUTOLAYOUT_CHARTTEXT :
+ {
+ tools::Rectangle aLeft(pInfo->GetPresRectangle());
+ aLeft.setWidth(long(aLeft.GetWidth() * 0.488));
+ tools::Rectangle aRight(aLeft);
+ aRight.SetLeft(long(aRight.Left() + aRight.GetWidth() * 1.05));
+
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderChart, aLeft);
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderOutline, aRight);
+ break;
+ }
+ case AUTOLAYOUT_TAB :
+ {
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTable, pInfo->GetPresRectangle());
+ break;
+ }
+ case AUTOLAYOUT_CLIPTEXT :
+ {
+ tools::Rectangle aLeft(pInfo->GetPresRectangle());
+ aLeft.setWidth(long(aLeft.GetWidth() * 0.488));
+ tools::Rectangle aRight(aLeft);
+ aRight.SetLeft(long(aRight.Left() + aRight.GetWidth() * 1.05));
+
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderGraphic, aLeft);
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderOutline, aRight);
+ break;
+ }
+ case AUTOLAYOUT_TEXTOBJ :
+ {
+ tools::Rectangle aLeft(pInfo->GetPresRectangle());
+ aLeft.setWidth(long(aLeft.GetWidth() * 0.488));
+ tools::Rectangle aRight(aLeft);
+ aRight.SetLeft(long(aRight.Left() + aRight.GetWidth() * 1.05));
+
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderOutline, aLeft);
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderObject, aRight);
+ break;
+ }
+ case AUTOLAYOUT_OBJ :
+ {
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderObject, pInfo->GetPresRectangle());
+ break;
+ }
+ case AUTOLAYOUT_TITLE_CONTENT_2CONTENT :
+ {
+ tools::Rectangle aLeft(pInfo->GetPresRectangle());
+ aLeft.setWidth(long(aLeft.GetWidth() * 0.488));
+ tools::Rectangle aRightTop(aLeft);
+ aRightTop.SetLeft(long(aRightTop.Left() + aRightTop.GetWidth() * 1.05));
+ aRightTop.setHeight(long(aRightTop.GetHeight() * 0.477));
+ tools::Rectangle aRightBottom(aRightTop);
+ aRightBottom.SetTop(long(aRightBottom.Top() + aRightBottom.GetHeight() * 1.095));
+
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderOutline, aLeft);
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderObject, aRightTop);
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderObject, aRightBottom);
+ break;
+ }
+ case AUTOLAYOUT_OBJTEXT :
+ {
+ tools::Rectangle aLeft(pInfo->GetPresRectangle());
+ aLeft.setWidth(long(aLeft.GetWidth() * 0.488));
+ tools::Rectangle aRight(aLeft);
+ aRight.SetLeft(long(aRight.Left() + aRight.GetWidth() * 1.05));
+
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderObject, aLeft);
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderOutline, aRight);
+ break;
+ }
+ case AUTOLAYOUT_TITLE_CONTENT_OVER_CONTENT :
+ {
+ tools::Rectangle aTop(pInfo->GetPresRectangle());
+ aTop.setHeight(long(aTop.GetHeight() * 0.477));
+ tools::Rectangle aBottom(aTop);
+ aBottom.SetTop(long(aBottom.Top() + aBottom.GetHeight() * 1.095));
+
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderObject, aTop);
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderOutline, aBottom);
+ break;
+ }
+ case AUTOLAYOUT_TITLE_2CONTENT_CONTENT :
+ {
+ tools::Rectangle aLeftTop(pInfo->GetPresRectangle());
+ aLeftTop.setWidth(long(aLeftTop.GetWidth() * 0.488));
+ tools::Rectangle aRight(aLeftTop);
+ aRight.SetLeft(long(aRight.Left() + aRight.GetWidth() * 1.05));
+ aLeftTop.setHeight(long(aLeftTop.GetHeight() * 0.477));
+ tools::Rectangle aLeftBottom(aLeftTop);
+ aLeftBottom.SetTop(long(aLeftBottom.Top() + aLeftBottom.GetHeight() * 1.095));
+
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderObject, aLeftTop);
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderObject, aLeftBottom);
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderOutline, aRight);
+ break;
+ }
+ case AUTOLAYOUT_TITLE_2CONTENT_OVER_CONTENT :
+ {
+ tools::Rectangle aTopLeft(pInfo->GetPresRectangle());
+ aTopLeft.setHeight(long(aTopLeft.GetHeight() * 0.477));
+ tools::Rectangle aBottom(aTopLeft);
+ aBottom.SetTop(long(aBottom.Top() + aBottom.GetHeight() * 1.095));
+ aTopLeft.setWidth(long(aTopLeft.GetWidth() * 0.488));
+ tools::Rectangle aTopRight(aTopLeft);
+ aTopRight.SetLeft(long(aTopRight.Left() + aTopRight.GetWidth() * 1.05));
+
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderObject, aTopLeft);
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderObject, aTopRight);
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderOutline, aBottom);
+ break;
+ }
+ case AUTOLAYOUT_TEXTOVEROBJ :
+ {
+ tools::Rectangle aTop(pInfo->GetPresRectangle());
+ aTop.setHeight(long(aTop.GetHeight() * 0.477));
+ tools::Rectangle aBottom(aTop);
+ aBottom.SetTop(long(aBottom.Top() + aBottom.GetHeight() * 1.095));
+
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderOutline, aTop);
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderObject, aBottom);
+ break;
+ }
+ case AUTOLAYOUT_TITLE_4CONTENT :
+ {
+ tools::Rectangle aTopLeft(pInfo->GetPresRectangle());
+ aTopLeft.setHeight(long(aTopLeft.GetHeight() * 0.477));
+ aTopLeft.setWidth(long(aTopLeft.GetWidth() * 0.488));
+ tools::Rectangle aBottomLeft(aTopLeft);
+ aBottomLeft.SetTop(long(aBottomLeft.Top() + aBottomLeft.GetHeight() * 1.095));
+ tools::Rectangle aTopRight(aTopLeft);
+ aTopRight.SetLeft(long(aTopRight.Left() + aTopRight.GetWidth() * 1.05));
+ tools::Rectangle aBottomRight(aTopRight);
+ aBottomRight.SetTop(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 AUTOLAYOUT_TITLE_ONLY :
+ {
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
+ break;
+ }
+ case AUTOLAYOUT_NOTES :
+ {
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderPage, pInfo->GetTitleRectangle());
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderNotes, pInfo->GetPresRectangle());
+ break;
+ }
+ 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();
+ sal_Int32 nGapY = pInfo->GetGapY();
+
+ switch(pInfo->GetLayoutType())
{
- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderPage, pInfo->GetTitleRectangle());
- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderNotes, pInfo->GetPresRectangle());
- break;
+ 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?
}
- 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();
- 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());
- Size aPartSize(pInfo->GetTitleRectangle().GetSize());
- Point aPartPos(pInfo->GetTitleRectangle().TopLeft());
+ if(aPartSize.Width() > aPartSize.Height())
+ {
+ sal_Int32 nZwi(nColCnt);
+ nColCnt = nRowCnt;
+ nRowCnt = nZwi;
+ }
- if(aPartSize.Width() > aPartSize.Height())
- {
- sal_Int32 nZwi(nColCnt);
- nColCnt = nRowCnt;
- nRowCnt = nZwi;
- }
+ if (nColCnt == 0 || nRowCnt == 0)
+ break;
- if (nColCnt == 0 || nRowCnt == 0)
- break;
+ aPartSize.setWidth( (aPartSize.Width() - ((nColCnt - 1) * nGapX)) / nColCnt );
+ aPartSize.setHeight( (aPartSize.Height() - ((nRowCnt - 1) * nGapY)) / nRowCnt );
- aPartSize.setWidth( (aPartSize.Width() - ((nColCnt - 1) * nGapX)) / nColCnt );
- aPartSize.setHeight( (aPartSize.Height() - ((nRowCnt - 1) * nGapY)) / nRowCnt );
+ Point aTmpPos(aPartPos);
- Point aTmpPos(aPartPos);
+ for (sal_Int32 a = 0; a < nRowCnt; a++)
+ {
+ aTmpPos.setX(aPartPos.X());
- for (sal_Int32 a = 0; a < nRowCnt; a++)
+ for (sal_Int32 b = 0; b < nColCnt; b++)
{
- aTmpPos.setX(aPartPos.X());
-
- for (sal_Int32 b = 0; b < nColCnt; b++)
- {
- tools::Rectangle aTmpRect(aTmpPos, aPartSize);
+ tools::Rectangle aTmpRect(aTmpPos, aPartSize);
- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderHandout, aTmpRect);
- aTmpPos.AdjustX( aPartSize.Width() + nGapX );
- }
-
- aTmpPos.AdjustY( aPartSize.Height() + nGapY );
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderHandout, aTmpRect);
+ aTmpPos.AdjustX( aPartSize.Width() + nGapX );
}
- break;
- }
- case AUTOLAYOUT_VTITLE_VCONTENT_OVER_VCONTENT :
- {
- tools::Rectangle aTop(pInfo->GetPresRectangle());
- aTop.setHeight(long(aTop.GetHeight() * 0.488));
- tools::Rectangle aBottom(aTop);
- aBottom.SetTop(long(aBottom.Top() + aBottom.GetHeight() * 1.05));
-
- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderVerticalTitle, pInfo->GetTitleRectangle());
- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderVerticalOutline, aTop);
- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderChart, aBottom);
- break;
- }
- case AUTOLAYOUT_VTITLE_VCONTENT :
- {
- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderVerticalTitle, pInfo->GetTitleRectangle());
- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderVerticalOutline, pInfo->GetPresRectangle());
- break;
- }
- case AUTOLAYOUT_TITLE_VCONTENT :
- {
- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderVerticalOutline, pInfo->GetPresRectangle());
- break;
- }
- case AUTOLAYOUT_TITLE_2VTEXT :
- {
- tools::Rectangle aLeft(pInfo->GetPresRectangle());
- aLeft.setWidth(long(aLeft.GetWidth() * 0.488));
- tools::Rectangle aRight(aLeft);
- aRight.SetLeft(long(aRight.Left() + aRight.GetWidth() * 1.05));
-
- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderGraphic, aLeft);
- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderVerticalOutline, aRight);
- break;
- }
- case AUTOLAYOUT_ONLY_TEXT :
- {
- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderSubtitle, pInfo->GetPresRectangle());
- break;
- }
- case AUTOLAYOUT_4CLIPART :
- {
- tools::Rectangle aTopLeft(pInfo->GetPresRectangle());
- aTopLeft.setHeight(long(aTopLeft.GetHeight() * 0.477));
- aTopLeft.setWidth(long(aTopLeft.GetWidth() * 0.488));
- tools::Rectangle aBottomLeft(aTopLeft);
- aBottomLeft.SetTop(long(aBottomLeft.Top() + aBottomLeft.GetHeight() * 1.095));
- tools::Rectangle aTopRight(aTopLeft);
- aTopRight.SetLeft(long(aTopRight.Left() + aTopRight.GetWidth() * 1.05));
- tools::Rectangle aBottomRight(aTopRight);
- aBottomRight.SetTop(long(aBottomRight.Top() + aBottomRight.GetHeight() * 1.095));
-
- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderGraphic, aTopLeft);
- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderGraphic, aTopRight);
- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderGraphic, aBottomLeft);
- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderGraphic, aBottomRight);
- break;
+ aTmpPos.AdjustY( aPartSize.Height() + nGapY );
}
+ break;
+ }
+ case AUTOLAYOUT_VTITLE_VCONTENT_OVER_VCONTENT :
+ {
+ tools::Rectangle aTop(pInfo->GetPresRectangle());
+ aTop.setHeight(long(aTop.GetHeight() * 0.488));
+ tools::Rectangle aBottom(aTop);
+ aBottom.SetTop(long(aBottom.Top() + aBottom.GetHeight() * 1.05));
+
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderVerticalTitle, pInfo->GetTitleRectangle());
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderVerticalOutline, aTop);
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderChart, aBottom);
+ break;
+ }
+ case AUTOLAYOUT_VTITLE_VCONTENT :
+ {
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderVerticalTitle, pInfo->GetTitleRectangle());
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderVerticalOutline, pInfo->GetPresRectangle());
+ break;
+ }
+ case AUTOLAYOUT_TITLE_VCONTENT :
+ {
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderVerticalOutline, pInfo->GetPresRectangle());
+ break;
+ }
+ case AUTOLAYOUT_TITLE_2VTEXT :
+ {
+ tools::Rectangle aLeft(pInfo->GetPresRectangle());
+ aLeft.setWidth(long(aLeft.GetWidth() * 0.488));
+ tools::Rectangle aRight(aLeft);
+ aRight.SetLeft(long(aRight.Left() + aRight.GetWidth() * 1.05));
+
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderGraphic, aLeft);
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderVerticalOutline, aRight);
+ break;
+ }
+ case AUTOLAYOUT_ONLY_TEXT :
+ {
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderSubtitle, pInfo->GetPresRectangle());
+ break;
+ }
- case AUTOLAYOUT_TITLE_6CONTENT :
- {
- tools::Rectangle aTopLeft(pInfo->GetPresRectangle());
- aTopLeft.setHeight(long(aTopLeft.GetHeight() * 0.477));
- aTopLeft.setWidth(long(aTopLeft.GetWidth() * 0.322));
- tools::Rectangle aTopCenter(aTopLeft);
- aTopCenter.SetLeft(long(aTopCenter.Left() + aTopCenter.GetWidth() * 1.05));
- tools::Rectangle aTopRight(aTopLeft);
- aTopRight.SetLeft(long(aTopRight.Left() + aTopRight.GetWidth() * 2 * 1.05));
-
- tools::Rectangle aBottomLeft(aTopLeft);
- aBottomLeft.SetTop(long(aBottomLeft.Top() + aBottomLeft.GetHeight() * 1.095));
- tools::Rectangle aBottomCenter(aTopCenter);
- aBottomCenter.SetTop(long(aBottomCenter.Top() + aBottomCenter.GetHeight() * 1.095));
- tools::Rectangle aBottomRight(aTopRight);
- aBottomRight.SetTop(long(aBottomRight.Top() + aBottomRight.GetHeight() * 1.095));
-
- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderGraphic, aTopLeft);
- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderGraphic, aTopCenter);
- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderGraphic, aTopRight);
- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderGraphic, aBottomLeft);
- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderGraphic, aBottomCenter);
- ImpWriteAutoLayoutPlaceholder(XmlPlaceholderGraphic, aBottomRight);
- break;
- }
- default:
- {
- OSL_FAIL("XMLEXP: unknown autolayout export");
- break;
- }
+ case AUTOLAYOUT_4CLIPART :
+ {
+ tools::Rectangle aTopLeft(pInfo->GetPresRectangle());
+ aTopLeft.setHeight(long(aTopLeft.GetHeight() * 0.477));
+ aTopLeft.setWidth(long(aTopLeft.GetWidth() * 0.488));
+ tools::Rectangle aBottomLeft(aTopLeft);
+ aBottomLeft.SetTop(long(aBottomLeft.Top() + aBottomLeft.GetHeight() * 1.095));
+ tools::Rectangle aTopRight(aTopLeft);
+ aTopRight.SetLeft(long(aTopRight.Left() + aTopRight.GetWidth() * 1.05));
+ tools::Rectangle aBottomRight(aTopRight);
+ aBottomRight.SetTop(long(aBottomRight.Top() + aBottomRight.GetHeight() * 1.095));
+
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderGraphic, aTopLeft);
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderGraphic, aTopRight);
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderGraphic, aBottomLeft);
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderGraphic, aBottomRight);
+ break;
+ }
+
+ case AUTOLAYOUT_TITLE_6CONTENT :
+ {
+ tools::Rectangle aTopLeft(pInfo->GetPresRectangle());
+ aTopLeft.setHeight(long(aTopLeft.GetHeight() * 0.477));
+ aTopLeft.setWidth(long(aTopLeft.GetWidth() * 0.322));
+ tools::Rectangle aTopCenter(aTopLeft);
+ aTopCenter.SetLeft(long(aTopCenter.Left() + aTopCenter.GetWidth() * 1.05));
+ tools::Rectangle aTopRight(aTopLeft);
+ aTopRight.SetLeft(long(aTopRight.Left() + aTopRight.GetWidth() * 2 * 1.05));
+
+ tools::Rectangle aBottomLeft(aTopLeft);
+ aBottomLeft.SetTop(long(aBottomLeft.Top() + aBottomLeft.GetHeight() * 1.095));
+ tools::Rectangle aBottomCenter(aTopCenter);
+ aBottomCenter.SetTop(long(aBottomCenter.Top() + aBottomCenter.GetHeight() * 1.095));
+ tools::Rectangle aBottomRight(aTopRight);
+ aBottomRight.SetTop(long(aBottomRight.Top() + aBottomRight.GetHeight() * 1.095));
+
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderTitle, pInfo->GetTitleRectangle());
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderGraphic, aTopLeft);
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderGraphic, aTopCenter);
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderGraphic, aTopRight);
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderGraphic, aBottomLeft);
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderGraphic, aBottomCenter);
+ ImpWriteAutoLayoutPlaceholder(XmlPlaceholderGraphic, aBottomRight);
+ break;
+ }
+ default:
+ {
+ OSL_FAIL("XMLEXP: unknown autolayout export");
+ break;
}
}
}
@@ -1320,7 +1317,7 @@ void SdXMLExport::ImpWritePageMasterInfos()
ImpXMLEXPPageMasterInfo* SdXMLExport::ImpGetPageMasterInfoByName(const OUString& rName)
{
- if(!rName.isEmpty() && !mvPageMasterInfoList.empty())
+ if(!rName.isEmpty())
{
for(auto & pInfo : mvPageMasterInfoList)
{
diff --git a/xmloff/source/draw/shapeimport.cxx b/xmloff/source/draw/shapeimport.cxx
index c55cd25411a9..14b5e5acc2a6 100644
--- a/xmloff/source/draw/shapeimport.cxx
+++ b/xmloff/source/draw/shapeimport.cxx
@@ -911,47 +911,44 @@ void XMLShapeImportHelper::addShapeConnection( css::uno::Reference< css::drawing
void XMLShapeImportHelper::restoreConnections()
{
- if( !mpImpl->maConnections.empty() )
+ const vector<ConnectionHint>::size_type nCount = mpImpl->maConnections.size();
+ for( vector<ConnectionHint>::size_type i = 0; i < nCount; i++ )
{
- const vector<ConnectionHint>::size_type nCount = mpImpl->maConnections.size();
- for( vector<ConnectionHint>::size_type i = 0; i < nCount; i++ )
+ ConnectionHint& rHint = mpImpl->maConnections[i];
+ uno::Reference< beans::XPropertySet > xConnector( rHint.mxConnector, uno::UNO_QUERY );
+ if( xConnector.is() )
{
- ConnectionHint& rHint = mpImpl->maConnections[i];
- uno::Reference< beans::XPropertySet > xConnector( rHint.mxConnector, uno::UNO_QUERY );
- if( xConnector.is() )
+ // #86637# remember line deltas
+ uno::Any aLine1Delta;
+ uno::Any aLine2Delta;
+ uno::Any aLine3Delta;
+ OUString aStr1("EdgeLine1Delta");
+ OUString aStr2("EdgeLine2Delta");
+ OUString aStr3("EdgeLine3Delta");
+ aLine1Delta = xConnector->getPropertyValue(aStr1);
+ aLine2Delta = xConnector->getPropertyValue(aStr2);
+ aLine3Delta = xConnector->getPropertyValue(aStr3);
+
+ // #86637# simply setting these values WILL force the connector to do
+ // an new layout promptly. So the line delta values have to be rescued
+ // and restored around connector changes.
+ uno::Reference< drawing::XShape > xShape(
+ mrImporter.getInterfaceToIdentifierMapper().getReference( rHint.aDestShapeId ), uno::UNO_QUERY );
+ if( xShape.is() )
{
- // #86637# remember line deltas
- uno::Any aLine1Delta;
- uno::Any aLine2Delta;
- uno::Any aLine3Delta;
- OUString aStr1("EdgeLine1Delta");
- OUString aStr2("EdgeLine2Delta");
- OUString aStr3("EdgeLine3Delta");
- aLine1Delta = xConnector->getPropertyValue(aStr1);
- aLine2Delta = xConnector->getPropertyValue(aStr2);
- aLine3Delta = xConnector->getPropertyValue(aStr3);
-
- // #86637# simply setting these values WILL force the connector to do
- // an new layout promptly. So the line delta values have to be rescued
- // and restored around connector changes.
- uno::Reference< drawing::XShape > xShape(
- mrImporter.getInterfaceToIdentifierMapper().getReference( rHint.aDestShapeId ), uno::UNO_QUERY );
- if( xShape.is() )
- {
- xConnector->setPropertyValue( rHint.bStart ? gsStartShape : gsEndShape, uno::Any(xShape) );
-
- sal_Int32 nGlueId = rHint.nDestGlueId < 4 ? rHint.nDestGlueId : getGluePointId( xShape, rHint.nDestGlueId );
- xConnector->setPropertyValue( rHint.bStart ? gsStartGluePointIndex : gsEndGluePointIndex, uno::Any(nGlueId) );
- }
-
- // #86637# restore line deltas
- xConnector->setPropertyValue(aStr1, aLine1Delta );
- xConnector->setPropertyValue(aStr2, aLine2Delta );
- xConnector->setPropertyValue(aStr3, aLine3Delta );
+ xConnector->setPropertyValue( rHint.bStart ? gsStartShape : gsEndShape, uno::Any(xShape) );
+
+ sal_Int32 nGlueId = rHint.nDestGlueId < 4 ? rHint.nDestGlueId : getGluePointId( xShape, rHint.nDestGlueId );
+ xConnector->setPropertyValue( rHint.bStart ? gsStartGluePointIndex : gsEndGluePointIndex, uno::Any(nGlueId) );
}
+
+ // #86637# restore line deltas
+ xConnector->setPropertyValue(aStr1, aLine1Delta );
+ xConnector->setPropertyValue(aStr2, aLine2Delta );
+ xConnector->setPropertyValue(aStr3, aLine3Delta );
}
- mpImpl->maConnections.clear();
}
+ mpImpl->maConnections.clear();
}
SvXMLImportPropertyMapper* XMLShapeImportHelper::CreateShapePropMapper( const uno::Reference< frame::XModel>& rModel, SvXMLImport& rImport )
diff --git a/xmloff/source/table/XMLTableImport.cxx b/xmloff/source/table/XMLTableImport.cxx
index 5cc315c73efd..7bfe87b96ed9 100644
--- a/xmloff/source/table/XMLTableImport.cxx
+++ b/xmloff/source/table/XMLTableImport.cxx
@@ -594,20 +594,17 @@ void XMLTableImportContext::StartElement( const Reference< XAttributeList >& /*x
void XMLTableImportContext::EndElement()
{
- if( !maMergeInfos.empty() )
+ for( const std::shared_ptr< MergeInfo >& xInfo : maMergeInfos )
{
- for( const std::shared_ptr< MergeInfo >& xInfo : maMergeInfos )
+ if( xInfo.get() ) try
{
- if( xInfo.get() ) try
- {
- Reference< XCellRange > xRange( mxTable->getCellRangeByPosition( xInfo->mnStartColumn, xInfo->mnStartRow, xInfo->mnEndColumn, xInfo->mnEndRow ) );
- Reference< XMergeableCellRange > xCursor( mxTable->createCursorByRange( xRange ), UNO_QUERY_THROW );
- xCursor->merge();
- }
- catch( Exception& )
- {
- OSL_FAIL("XMLTableImportContext::EndElement(), exception caught while merging cells!");
- }
+ Reference< XCellRange > xRange( mxTable->getCellRangeByPosition( xInfo->mnStartColumn, xInfo->mnStartRow, xInfo->mnEndColumn, xInfo->mnEndRow ) );
+ Reference< XMergeableCellRange > xCursor( mxTable->createCursorByRange( xRange ), UNO_QUERY_THROW );
+ xCursor->merge();
+ }
+ catch( Exception& )
+ {
+ OSL_FAIL("XMLTableImportContext::EndElement(), exception caught while merging cells!");
}
}
}
diff --git a/xmloff/source/text/txtparai.cxx b/xmloff/source/text/txtparai.cxx
index 562a7def9a69..565f4bdd2891 100644
--- a/xmloff/source/text/txtparai.cxx
+++ b/xmloff/source/text/txtparai.cxx
@@ -2013,7 +2013,7 @@ void XMLParaContext::EndElement()
}
}
- if (m_xHints && !m_xHints->GetHints().empty())
+ if (m_xHints)
{
for (const auto & i : m_xHints->GetHints())
{