Need hint about finding the relevant code in "chart2"

walt w41ter at gmail.com
Sat May 26 17:21:11 PDT 2012


On 05/25/2012 08:22 AM, Kohei Yoshida wrote:
> Hi Walt,
> 
> On Fri, May 25, 2012 at 9:00 AM, walt <w41ter at gmail.com> wrote:
> 
>> I need to find the code that parses my choice of "Data Ranges" for
>> the horizontal axis of a stock chart -- and now refuses to let me
>> do what I've always done -- leave blank space at the right end of
>> the chart, to allow for fresh samples to be added each day as I get
>> them.
> 
> I assume you are doing this in Calc?  If yes, then the code that
> handles data range parsing is actually not in chart2, but in sc.  Go
> search for chart2uno.hxx and chart2uno.cxx inside sc, and that's
> probably the code you are looking for.

Thank you!  I could never find that code without your help.

I was hoping that my patch (below) would fix my problem while honoring
the spirit of your code, but it turns out to have no effect at all,
either good or bad.

I hope you can see what I was trying to do and explain why it fails.

Keep in mind that I'm not a c(++) programmer, so my error might be as
trivial as incorrect syntax.  (I can't afford the hours it took me to
test the patch, just to experiment with syntax :)

Many thanks!

diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx
index 03028fc..2060b5a 100644
--- a/sc/source/ui/unoobj/chart2uno.cxx
+++ b/sc/source/ui/unoobj/chart2uno.cxx
@@ -1426,8 +1426,8 @@ public:
             s.nCol = nMinCol;
         if (s.nRow < nMinRow)
             s.nRow = nMinRow;
-        if (e.nCol > nMaxCol)
-            e.nCol = nMaxCol;
+        if (e.nCol > nMaxCol + 100)
+            e.nCol = nMaxCol + 100;
         if (e.nRow > nMaxRow)
             e.nRow = nMaxRow;
     }






More information about the LibreOffice mailing list