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

New commits:
commit e0c00f30fcc970e838672f58a4027155a2de74dc
Author:     Ouyang Leyan <[email protected]>
AuthorDate: Sat Jan 30 23:52:22 2021 +0100
Commit:     Michael Stahl <[email protected]>
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 <[email protected]>

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");
     }
_______________________________________________
Libreoffice-commits mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to