[Libreoffice] [PATCH] EasyHacks 4.13 - get rid of macros from svarray.hxx

Kohei Yoshida kyoshida at novell.com
Fri Jan 28 07:50:31 PST 2011


On Fri, 2011-01-28 at 14:09 +0000, Nigel Hawkins wrote:
> Hi,
> 
> I've started looking at the easy hack for removing the macro-defined
> "vectors" in svl/avarray. Chose an easy one to start with. First
> attached patch removes all usage of SvShorts from sc (only place it was
> used), and the second removes the declaration of it from svl.

Hi Nigel,

Your 1st patch looks good overall, except...

-        TheTabs.Insert( sal::static_int_cast<short>(nTab+i), TheTabs.Count() );
+        TheTabs.push_back(i);

Here, you've changed the semantics of the code.  I've fixed that to
push_back(nTab+i) which is probably what we need to do here.

Your second patch is pretty small & reasonable.  It should be okay as
the only other places where SvShorts is used is in binfilter, and
binfilter itself contains its own SvShorts declaration.

I tried to build-test binfilter with this change, but I'm getting lots
of other build errors in that module (something related to ::std::min
calls).  So, I'll risk pushing this change to svl without verifying the
binfilter buildability.  If someone comes across any build issues in
bilfilter related to this commit in svl, please let us know.

Thanks for your patches.

Kohei

-- 
Kohei Yoshida, LibreOffice hacker, Calc
<kyoshida at novell.com>



More information about the LibreOffice mailing list