[Libreoffice-commits] core.git: chart2/source

Ouyang Leyan (via logerrit) logerrit at kemper.freedesktop.org
Wed Mar 3 09:46:17 UTC 2021


 chart2/source/tools/InternalData.cxx |   14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

New commits:
commit e0c00f30fcc970e838672f58a4027155a2de74dc
Author:     Ouyang Leyan <ouyang.leyan at hotmail.com>
AuthorDate: Sat Jan 30 23:52:22 2021 +0100
Commit:     Michael Stahl <michael.stahl at allotropia.de>
CommitDate: Wed Mar 3 10:45:32 2021 +0100

    Chart debug dump: Support for several lines of headers
    
    Currently, the dump() function used to debug charts only displays the
    first line of headers, but actually headers can span several lines, so
    some data is hidden.
    
    Change-Id: Icbffa1d4dbaf8bb393504d2497f605a4e8f6b51d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110190
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.stahl at allotropia.de>

diff --git a/chart2/source/tools/InternalData.cxx b/chart2/source/tools/InternalData.cxx
index 9808b237f4b7..c5f9490f01f7 100644
--- a/chart2/source/tools/InternalData.cxx
+++ b/chart2/source/tools/InternalData.cxx
@@ -518,15 +518,15 @@ void InternalData::dump() const
     // Header
     if (!m_aColumnLabels.empty())
     {
-        svl::GridPrinter aPrinter(1, m_aColumnLabels.size(), true);
+        svl::GridPrinter aPrinter(m_aColumnLabels[0].size(), m_aColumnLabels.size(), true);
         for (size_t nCol = 0; nCol < m_aColumnLabels.size(); ++nCol)
         {
-            if (m_aColumnLabels[nCol].empty())
-                continue;
-
-            OUString aStr;
-            if (m_aColumnLabels[nCol][0] >>= aStr)
-                aPrinter.set(0, nCol, aStr);
+            for (size_t nRow = 0; nRow < m_aColumnLabels[nCol].size(); ++nRow)
+            {
+                OUString aStr;
+                if (m_aColumnLabels[nCol].at(nRow) >>= aStr)
+                    aPrinter.set(nRow, nCol, aStr);
+            }
         }
         aPrinter.print("Header");
     }


More information about the Libreoffice-commits mailing list