[Libreoffice-commits] core.git: 2 commits - chart2/source
Ouyang Leyan (via logerrit)
logerrit at kemper.freedesktop.org
Tue Mar 2 06:21:17 UTC 2021
chart2/source/controller/accessibility/AccessibleBase.cxx | 2 +-
chart2/source/controller/accessibility/ChartElementFactory.cxx | 3 ++-
chart2/source/controller/accessibility/ChartElementFactory.hxx | 4 +++-
chart2/source/tools/InternalData.cxx | 5 +++--
4 files changed, 9 insertions(+), 5 deletions(-)
New commits:
commit 8ab75c40e349463c89988680c0a194a00018e420
Author: Ouyang Leyan <ouyang.leyan at hotmail.com>
AuthorDate: Fri Jan 22 21:44:05 2021 +0100
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Tue Mar 2 07:20:42 2021 +0100
Correct arguments to create a svl::GridPrinter
Otherwise, the application does not compile with the DEBUG_CHART2_TOOLS
flag
Change-Id: I3c481f09502e810eb8b641bc1e2ff2ac87425596
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109834
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/chart2/source/tools/InternalData.cxx b/chart2/source/tools/InternalData.cxx
index 91a9fbaa16fa..9808b237f4b7 100644
--- a/chart2/source/tools/InternalData.cxx
+++ b/chart2/source/tools/InternalData.cxx
@@ -23,6 +23,7 @@
#include <osl/diagnose.h>
#include <rtl/math.hxx>
+
#ifdef DEBUG_CHART2_TOOLS
#define DEBUG_INTERNAL_DATA 1
#endif
@@ -532,7 +533,7 @@ void InternalData::dump() const
if (!m_aRowLabels.empty())
{
- svl::GridPrinter aPrinter(m_aRowLabels.size(), m_aRowLabels[0].size());
+ svl::GridPrinter aPrinter(m_aRowLabels.size(), m_aRowLabels[0].size(), true);
for (size_t nRow = 0; nRow < m_aRowLabels.size(); ++nRow)
{
for (size_t nCol = 0; nCol < m_aRowLabels[nRow].size(); ++nCol)
@@ -545,7 +546,7 @@ void InternalData::dump() const
aPrinter.print("Row labels");
}
- svl::GridPrinter aPrinter(m_nRowCount, m_nColumnCount);
+ svl::GridPrinter aPrinter(m_nRowCount, m_nColumnCount, true);
for (sal_Int32 nRow = 0; nRow < m_nRowCount; ++nRow)
{
commit 6bc3539336a947553f51c3537284e39d4cff04bd
Author: Noel <noel.grandin at collabora.co.uk>
AuthorDate: Mon Mar 1 13:37:10 2021 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Tue Mar 2 07:20:19 2021 +0100
loplugin:refcounting in chart2
Change-Id: I7f49a25fccf853b6e61c37f35c116888163153f8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111746
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/chart2/source/controller/accessibility/AccessibleBase.cxx b/chart2/source/controller/accessibility/AccessibleBase.cxx
index 9e05f896b422..e5ca33bff4be 100644
--- a/chart2/source/controller/accessibility/AccessibleBase.cxx
+++ b/chart2/source/controller/accessibility/AccessibleBase.cxx
@@ -237,7 +237,7 @@ bool AccessibleBase::ImplUpdateChildren()
aAccInfo.m_aOID = childToAdd;
if ( childToAdd.isAutoGeneratedObject() )
{
- AddChild( ChartElementFactory::CreateChartElement( aAccInfo ) );
+ AddChild( ChartElementFactory::CreateChartElement( aAccInfo ).get() );
}
else if ( childToAdd.isAdditionalShape() )
{
diff --git a/chart2/source/controller/accessibility/ChartElementFactory.cxx b/chart2/source/controller/accessibility/ChartElementFactory.cxx
index cd6c4eed340d..a173ac0f4b18 100644
--- a/chart2/source/controller/accessibility/ChartElementFactory.cxx
+++ b/chart2/source/controller/accessibility/ChartElementFactory.cxx
@@ -23,7 +23,8 @@
namespace chart
{
-AccessibleBase* ChartElementFactory::CreateChartElement(const AccessibleElementInfo& rAccInfo)
+rtl::Reference<AccessibleBase>
+ChartElementFactory::CreateChartElement(const AccessibleElementInfo& rAccInfo)
{
ObjectIdentifier aOID(rAccInfo.m_aOID);
ObjectType eType(aOID.getObjectType());
diff --git a/chart2/source/controller/accessibility/ChartElementFactory.hxx b/chart2/source/controller/accessibility/ChartElementFactory.hxx
index 0177809c40cf..08ae64598bc7 100644
--- a/chart2/source/controller/accessibility/ChartElementFactory.hxx
+++ b/chart2/source/controller/accessibility/ChartElementFactory.hxx
@@ -18,6 +18,8 @@
*/
#pragma once
+#include <rtl/ref.hxx>
+
namespace chart
{
class AccessibleBase;
@@ -29,7 +31,7 @@ public:
/** @return a newly created object (using the new operator) that corresponds
to the given unique id
*/
- static AccessibleBase* CreateChartElement(const AccessibleElementInfo& rAccInfo);
+ static rtl::Reference<AccessibleBase> CreateChartElement(const AccessibleElementInfo& rAccInfo);
};
} // namespace chart
More information about the Libreoffice-commits
mailing list