You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openoffice.apache.org by Dick Groskamp <di...@apache.org> on 2021/03/05 11:33:23 UTC

Re: <code> Is this a typo or is it intentional?

Rigo / Matthias,

thanks for the info. Now I know that I saw it right then.
I'm not touching the code as I have no idea how to fix it.

On 2021/03/05 09:51:58, Matthias Seidel <ma...@hamburg.de> wrote: 
> Hi all,
> 
> It really seems to be a typo and OpenGrok can only find two instances of it:
> 
> http://opengrok.openoffice.org/search?project=trunk&full=%22_earArray%22&defs=&refs=&path=&hist=&type=&si=full
> 
> So I think it would be without risk to correct this.
> 
> Regards,
> 
>    Matthias
> 
> Am 05.03.21 um 08:31 schrieb Arrigo Marchiori:
> > Hello Dick,
> >
> > On Thu, Mar 04, 2021 at 06:25:10PM -0000, Dick Groskamp wrote:
> >
> >> I'm definitely no developer but when I added the new Japanse era Reiwa to the file
> >> openoffice-trunk/main/i18npool/source/calendar/calendar_gregorian.cxx,
> >> I noticed this code:
> >> ________________________________________
> >> 132   Calendar_gregorian::Calendar_gregorian()
> >> 133   {
> >> 134      init(NULL);
> >> 135   }
> >> 136  Calendar_gregorian::Calendar_gregorian(Era *_earArray)
> >> 137  {
> >> 138      init(_earArray);
> >> 139  }
> >> _________________________________________
> >> on line 140 it says however: Calendar_gregorian::init(Era *_eraArray)
> >>
> >> It seems to me that _eraArray is right because it is used further on in the code.
> >>
> >> QUESTION:
> >> Are the *_earArray on line 136 and _earArray on line 138 intentional or are they typo's ?
> > I think that "ear" instead of "era" is a typo.
> >
> > If you look at the corresponding include file
> > main/i18npool/inc/calendar_gregorian.hxx at line 51:
> >
> > 45 class Calendar_gregorian : public CalendarImpl
> > 46 {
> > 47 public:
> > 48
> > 49    // Constructors
> > 50    Calendar_gregorian();
> > 51    Calendar_gregorian(Era *_eraArray);
> > 52    void SAL_CALL init(Era *_eraArray);
> >
> > The parameter is spelled correctly there.
> >
> > However the code compiles and works fine, because the typo is ``used
> > consistently'' inside Calendar_gregorian::Calendar_gregorian(Era *)
> >
> > If you don't like to have that typo in the code, I believe you can fix
> > it straight away as it is a ``trivial edit'' (i.e. no need to review
> > before committing), as I think you did for the new Japanese era.
> >
> > I hope this helps.
> >
> > Best regards,
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
For additional commands, e-mail: dev-help@openoffice.apache.org


Re: <code> Is this a typo or is it intentional?

Posted by Matthias Seidel <ma...@hamburg.de>.
Hi Dick,

I just created a Pull Request for it and asked Arrigo for review:

https://github.com/apache/openoffice/pull/123

Regards,

   Matthias

Am 05.03.21 um 12:33 schrieb Dick Groskamp:
> Rigo / Matthias,
>
> thanks for the info. Now I know that I saw it right then.
> I'm not touching the code as I have no idea how to fix it.
>
> On 2021/03/05 09:51:58, Matthias Seidel <ma...@hamburg.de> wrote: 
>> Hi all,
>>
>> It really seems to be a typo and OpenGrok can only find two instances of it:
>>
>> http://opengrok.openoffice.org/search?project=trunk&full=%22_earArray%22&defs=&refs=&path=&hist=&type=&si=full
>>
>> So I think it would be without risk to correct this.
>>
>> Regards,
>>
>>    Matthias
>>
>> Am 05.03.21 um 08:31 schrieb Arrigo Marchiori:
>>> Hello Dick,
>>>
>>> On Thu, Mar 04, 2021 at 06:25:10PM -0000, Dick Groskamp wrote:
>>>
>>>> I'm definitely no developer but when I added the new Japanse era Reiwa to the file
>>>> openoffice-trunk/main/i18npool/source/calendar/calendar_gregorian.cxx,
>>>> I noticed this code:
>>>> ________________________________________
>>>> 132   Calendar_gregorian::Calendar_gregorian()
>>>> 133   {
>>>> 134      init(NULL);
>>>> 135   }
>>>> 136  Calendar_gregorian::Calendar_gregorian(Era *_earArray)
>>>> 137  {
>>>> 138      init(_earArray);
>>>> 139  }
>>>> _________________________________________
>>>> on line 140 it says however: Calendar_gregorian::init(Era *_eraArray)
>>>>
>>>> It seems to me that _eraArray is right because it is used further on in the code.
>>>>
>>>> QUESTION:
>>>> Are the *_earArray on line 136 and _earArray on line 138 intentional or are they typo's ?
>>> I think that "ear" instead of "era" is a typo.
>>>
>>> If you look at the corresponding include file
>>> main/i18npool/inc/calendar_gregorian.hxx at line 51:
>>>
>>> 45 class Calendar_gregorian : public CalendarImpl
>>> 46 {
>>> 47 public:
>>> 48
>>> 49    // Constructors
>>> 50    Calendar_gregorian();
>>> 51    Calendar_gregorian(Era *_eraArray);
>>> 52    void SAL_CALL init(Era *_eraArray);
>>>
>>> The parameter is spelled correctly there.
>>>
>>> However the code compiles and works fine, because the typo is ``used
>>> consistently'' inside Calendar_gregorian::Calendar_gregorian(Era *)
>>>
>>> If you don't like to have that typo in the code, I believe you can fix
>>> it straight away as it is a ``trivial edit'' (i.e. no need to review
>>> before committing), as I think you did for the new Japanese era.
>>>
>>> I hope this helps.
>>>
>>> Best regards,
>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
> For additional commands, e-mail: dev-help@openoffice.apache.org
>
>