summaryrefslogtreecommitdiffstats
path: root/sd/source
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 09:44:04 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 09:44:04 +0000
commiteb358d77291eba677141bab113dc27d7aabb0f3e (patch)
tree2e96f3b5d0c79beaeb536bbf05c3b8564846e65f /sd/source
parentAdding debian version 4:24.2.1-4. (diff)
downloadlibreoffice-eb358d77291eba677141bab113dc27d7aabb0f3e.tar.xz
libreoffice-eb358d77291eba677141bab113dc27d7aabb0f3e.zip
Merging upstream version 4:24.2.2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'sd/source')
-rw-r--r--sd/source/filter/eppt/pptx-epptooxml.cxx38
-rw-r--r--sd/source/ui/animations/CustomAnimationList.cxx8
2 files changed, 36 insertions, 10 deletions
diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx
index 2148653dcd..96f135ecf5 100644
--- a/sd/source/filter/eppt/pptx-epptooxml.cxx
+++ b/sd/source/filter/eppt/pptx-epptooxml.cxx
@@ -63,6 +63,7 @@
#include "../ppt/pptanimations.hxx"
#include <i18nlangtag/languagetag.hxx>
+#include <svx/sdrmasterpagedescriptor.hxx>
#include <svx/svdpage.hxx>
#include <svx/unoapi.hxx>
#include <svx/svdogrp.hxx>
@@ -1515,23 +1516,48 @@ void PowerPointExport::ImplWriteSlideMaster(sal_uInt32 nPageNum, Reference< XPro
// use master's id type as they have same range, mso does that as well
pFS->startElementNS(XML_p, XML_sldLayoutIdLst);
- sal_Int32 nLayout = 0;
- OUString aSlideName;
- css::uno::Reference< css::beans::XPropertySet >xPagePropSet;
+ auto getLayoutsUsedForMaster = [](SdrPage* pMaster) -> std::unordered_set<sal_Int32>
+ {
+ if (!pMaster)
+ return {};
+
+ std::unordered_set<sal_Int32> aUsedLayouts{};
+ for (const auto* pPageUser : pMaster->GetPageUsers())
+ {
+ const auto* pMasterPageDescriptor
+ = dynamic_cast<const sdr::MasterPageDescriptor*>(pPageUser);
+
+ if (!pMasterPageDescriptor)
+ continue;
+
+ AutoLayout eLayout
+ = static_cast<SdPage&>(pMasterPageDescriptor->GetOwnerPage()).GetAutoLayout();
+ aUsedLayouts.insert(eLayout);
+ }
+ return aUsedLayouts;
+ };
+
+ std::unordered_set<sal_Int32> aLayouts = getLayoutsUsedForMaster(pMasterPage);
+
+ css::uno::Reference< css::beans::XPropertySet > xPagePropSet;
xPagePropSet.set(mXDrawPage, UNO_QUERY);
if (xPagePropSet.is())
{
uno::Any aAny;
if (GetPropertyValue(aAny, xPagePropSet, "SlideLayout"))
- aAny >>= nLayout;
+ aLayouts.insert(aAny.get<sal_Int32>());
}
+ OUString aSlideName;
Reference< XNamed > xNamed(mXDrawPage, UNO_QUERY);
if (xNamed.is())
aSlideName = xNamed->getName();
- ImplWritePPTXLayout(nLayout, nPageNum, aSlideName);
- AddLayoutIdAndRelation(pFS, GetLayoutFileId(nLayout, nPageNum));
+ for (auto nLayout : aLayouts)
+ {
+ ImplWritePPTXLayout(nLayout, nPageNum, aSlideName);
+ AddLayoutIdAndRelation(pFS, GetLayoutFileId(nLayout, nPageNum));
+ }
pFS->endElementNS(XML_p, XML_sldLayoutIdLst);
diff --git a/sd/source/ui/animations/CustomAnimationList.cxx b/sd/source/ui/animations/CustomAnimationList.cxx
index 39b3d488d2..bb08f33c44 100644
--- a/sd/source/ui/animations/CustomAnimationList.cxx
+++ b/sd/source/ui/animations/CustomAnimationList.cxx
@@ -310,12 +310,10 @@ void CustomAnimationListEntryItem::PaintTrigger(vcl::RenderContext& rRenderConte
::tools::Rectangle aOutRect(rRect);
- // fill the background
- Color aColor(rRenderContext.GetSettings().GetStyleSettings().GetDialogColor());
-
rRenderContext.Push();
- rRenderContext.SetFillColor(aColor);
+ rRenderContext.SetFillColor(rRenderContext.GetSettings().GetStyleSettings().GetDialogColor());
rRenderContext.SetLineColor();
+ // fill the background with the dialog bg color
rRenderContext.DrawRect(aOutRect);
// Erase the four corner pixels to make the rectangle appear rounded.
@@ -335,6 +333,8 @@ void CustomAnimationListEntryItem::PaintTrigger(vcl::RenderContext& rRenderConte
aOutRect.AdjustTop( nVertBorder );
aOutRect.AdjustBottom( -nVertBorder );
+ // Draw the text with the dialog text color
+ rRenderContext.SetTextColor(rRenderContext.GetSettings().GetStyleSettings().GetDialogTextColor());
rRenderContext.DrawText(aOutRect, rRenderContext.GetEllipsisString(msDescription, aOutRect.GetWidth()));
rRenderContext.Pop();
}