From: "Hub Figuière" <hfiguiere@teaser.fr>
Subject: Re: ib - r30529 - abiword/trunk/plugins/mswrite/xp
>
> On 24/12/11 02:32 AM, cvs@abisource.com wrote:
>>
>> Author: ib
>> Date: 2011-12-24 11:32:44 +0100 (Sat, 24 Dec 2011)
>> New Revision: 30529
>>
>> Modified:
>> abiword/trunk/plugins/mswrite/xp/ie_imp_MSWrite.cpp
>> Log:
>> Revert r30527.
>>
>> There is no error.
>>
>> The property exists as long as the importer class exists.
>
>> @@ -296,10 +294,7 @@
>> setProps(AP_Args::m_impProps);
>> const std::string propCP = getProperty("mswrite-codepage");
>>
>> - if (!propCP.empty()) {
>> - strncpy(s_cpbuffer,propCP.c_str(),30);
>> - default_codepage = s_cpbuffer;
>> - }
>> + if (!propCP.empty()) default_codepage = propCP.c_str();
>
> There is a bug. But the way it was addressed by Urmarstl was not good.
>
> when propCP goes out of scope (ie when the constructor ends), the string
> that c_str() returns becomes invalid making "default_codepage" invalid.
>
> Using a global static string buffer is bad too.
>
> The best fix at that point is to make "default_codepage" a std::string.
> And while we are at it, rename it "m_default_codepage", because it is a
> member variable.
> And the statement after the if() goes on the next line, possibly with
> curly braces.
>
AP_Args::m_impProps is a static buffer too, so it's rather equivalent.
Also I don't understand why mr. Bruekl constantly lies about problems with plugin, makes voluntary decisions and generally behaves like a churl.
He was asked for proofs of my patches having anything to do with his alleged problems, but provided none. I don't understand why does he treats that plugin as his personal property. I propose to stop believing in his mythical stories about hundreds important Write documents which open correctly only if code was personally committed with Brueckl's copyright.
Received on Sun Dec 25 01:16:00 2011
This archive was generated by hypermail 2.1.8 : Sun Dec 25 2011 - 01:16:00 CET