PP_PropertyVetctor (was: Re: hub - r35337 - abiword/trunk/src/wp/impexp/xp)

Hubert Figuière <[email protected]> Sun, 16 Oct 2016 01:12:05 -0400
Newsgroups gmane.editors.abiword.devel
Message-ID <[email protected]>


> Fix revision 35336 - was generating an invalid document.
> 
> Modified: abiword/trunk/src/wp/impexp/xp/ie_imp_MsWord_97.cpp
> ===================================================================
> --- abiword/trunk/src/wp/impexp/xp/ie_imp_MsWord_97.cpp	2016-10-14 22:14:14 UTC (rev 35336)
> +++ abiword/trunk/src/wp/impexp/xp/ie_imp_MsWord_97.cpp	2016-10-16 05:06:52 UTC (rev 35337)
> @@ -6827,9 +6827,7 @@
>  			attribsB.push_back(m_paraStyle.c_str());
>  		}
>  
> -		PP_PropertyVector attribsC = {"", "",
> -									   "", "",
> -									   ""};
> +		PP_PropertyVector attribsC;
>  		if(m_charProps.size())
>  		{
>  			attribsC.push_back("props");

Just to explain.

The previous change was that attribsC was initialised wrongly with NULL.
This is something that escaped me when I did the changes to
PP_PropertyVector from the char**.

Albeit the rest of the code will set the properties with "push_back()",
ie add them. So we should just create an empty PP_PropertyVector. Like
attribsB a few lines above.

Creating it with FIVE empty items cause this to be generated on export:

<c lang:-none-;font-size:10pt;font-family:times new roman="style" ="props">


Cheers,

Hub