Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


On 02/12/2013 05:36 PM, julien2412 wrote:
Hello,

Getting this with cppcheck:
sc/source/core/data/document.cxx
760     syntaxError     error   syntax error

Here are the lines:
     755 bool ScDocument::RenameTab( SCTAB nTab, const rtl::OUString& rName,
bool /* bUpdateRef */,
     756         bool bExternalDocument )
     757 {
     758     bool    bValid = false;
     759     SCTAB   i;
     760     if VALIDTAB(nTab)

Then I get this:
http://opengrok.libreoffice.org/xref/core/sc/inc/address.hxx#126
     124 #define VALIDCOL(nCol)                  (ValidCol(nCol))
     125 #define VALIDROW(nRow)                  (ValidRow(nRow))
     126 #define VALIDTAB(nTab)                  (ValidTab(nTab))
     127 #define VALIDCOLROW(nCol,nRow)          (ValidColRow(nCol,nRow))

I suppose there's a reason for these macros but I must recognize I don't get
it :-(

Actually I don't get the purpose of those macros either. Anyway, I'm pretty sure that those macros are there for none other than some weird historical reasons. I don't use them when writing new code, and try to replace them with the real methods whenever I can. I hope that eventually we can totally get rid of them.

Kohei

--
Kohei Yoshida, LibreOffice hacker, Calc

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.