summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2023-09-04 12:06:06 +0200
committerMiklos Vajna <vmiklos@collabora.com>2023-09-06 08:07:15 +0200
commit6629f794c9ac6a14ac1331608511af98f2b74f89 (patch)
tree21737c51a61f1d249a5dc402a2e4894d5e4832e1 /xmloff
parentc7437983e838d39f050ff842a42cda497af1b6ac (diff)
xmloff: rename m_aObject in XMLThemeContext and clarify
Clarify what m_aObject is in the theme import (XMLThemeContext) and rename to a better name. It is refering to an object that has the "Theme" property, which is usually found in on XPage (master page) or XModel, but technically could be any object that has the property (for getting and setting the XTheme type). Change-Id: If15a8c42a0c516cd0566f4ee9e81f7315ef1651e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156511 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit ca120667c3855fbfc1e3579d4cf4ed0e3b93770a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156545 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/inc/XMLThemeContext.hxx5
-rw-r--r--xmloff/source/style/XMLThemeContext.cxx11
2 files changed, 9 insertions, 7 deletions
diff --git a/xmloff/inc/XMLThemeContext.hxx b/xmloff/inc/XMLThemeContext.hxx
index f8ee08d5d4e8..c3056fa74216 100644
--- a/xmloff/inc/XMLThemeContext.hxx
+++ b/xmloff/inc/XMLThemeContext.hxx
@@ -24,13 +24,14 @@ class Theme;
/// Imports the theme
class XMLThemeContext : public SvXMLImportContext
{
- css::uno::Reference<css::uno::XInterface> m_xObject;
+ // Any UNO object that has the "Theme" property - usually XPage (master page) or XModel
+ css::uno::Reference<css::uno::XInterface> m_xObjectWithThemeProperty;
std::shared_ptr<model::Theme> mpTheme;
public:
XMLThemeContext(SvXMLImport& rImport,
css::uno::Reference<css::xml::sax::XFastAttributeList> const& xAttrList,
- css::uno::Reference<css::uno::XInterface> const& xObject);
+ css::uno::Reference<css::uno::XInterface> const& xObjectWithThemeProperty);
~XMLThemeContext();
css::uno::Reference<css::xml::sax::XFastContextHandler> SAL_CALL createFastChildContext(
diff --git a/xmloff/source/style/XMLThemeContext.cxx b/xmloff/source/style/XMLThemeContext.cxx
index 5c210c7a48dc..564d934ff8fb 100644
--- a/xmloff/source/style/XMLThemeContext.cxx
+++ b/xmloff/source/style/XMLThemeContext.cxx
@@ -31,11 +31,11 @@
using namespace css;
using namespace xmloff::token;
-XMLThemeContext::XMLThemeContext(SvXMLImport& rImport,
- const uno::Reference<xml::sax::XFastAttributeList>& xAttrList,
- css::uno::Reference<css::uno::XInterface> const& xObject)
+XMLThemeContext::XMLThemeContext(
+ SvXMLImport& rImport, const uno::Reference<xml::sax::XFastAttributeList>& xAttrList,
+ css::uno::Reference<css::uno::XInterface> const& xObjectWithThemeProperty)
: SvXMLImportContext(rImport)
- , m_xObject(xObject)
+ , m_xObjectWithThemeProperty(xObjectWithThemeProperty)
, mpTheme(new model::Theme)
{
for (const auto& rAttribute : sax_fastparser::castToFastAttributeList(xAttrList))
@@ -56,7 +56,8 @@ XMLThemeContext::~XMLThemeContext()
{
if (mpTheme && mpTheme->getColorSet())
{
- uno::Reference<beans::XPropertySet> xPropertySet(m_xObject, uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xPropertySet(m_xObjectWithThemeProperty,
+ uno::UNO_QUERY);
auto xTheme = model::theme::createXTheme(mpTheme);
xPropertySet->setPropertyValue("Theme", uno::Any(xTheme));
}