From calligra-devel Mon Mar 19 10:42:41 2012 From: Sebastian Sauer Date: Mon, 19 Mar 2012 10:42:41 +0000 To: calligra-devel Subject: Re: warning C4129: '%' : unrecognized character escape sequence Message-Id: <4F670DA1.4020001 () dipe ! org> X-MARC-Message: https://marc.info/?l=calligra-devel&m=133215395804190 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--===============0384441067139947843==" This is a multi-part message in MIME format. --===============0384441067139947843== Content-Type: multipart/alternative; boundary="------------050104070108050402080305" This is a multi-part message in MIME format. --------------050104070108050402080305 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 03/19/2012 11:21 AM, Matus Uzak wrote: > Hi, > > I did not catch the irc conversation. The backslash in "\%" seems to > be ignored internally. I don't think it's an undocumented escape > sequence understood by QString, so I would remove it. > Any objections from sebsauer and LukasT who were using those? The code that uses it is not from me but from Bjoern (commit 648de6ad). Don't know why it was added... That sayed: no objections :) > > -matus > > On Sun, Mar 18, 2012 at 4:52 AM, Andrius da Costa Ribas > > wrote: > > Please find attached the patch for 2.4 branch (Either reviewboard > does not accept patches for non-master or I don't know how to). > > 2012/3/17 Andrius da Costa Ribas > > > Hello, > > As discussed on IRC, some sources contains "\%" invalid escape > sequence: > > filters/libmso/ODrawToOdf.cpp(625): > style.addAttribute("svg:x1", QString("%1\%").arg(x1)); > filters/libmso/ODrawToOdf.cpp(626): > style.addAttribute("svg:y1", QString("%1\%").arg(y1)); > filters/libmso/ODrawToOdf.cpp(627): > style.addAttribute("svg:x2", QString("%1\%").arg(x2)); > filters/libmso/ODrawToOdf.cpp(628): > style.addAttribute("svg:y2", QString("%1\%").arg(y2)); > filters/libmso/ODrawToOdf.cpp(680): > style.addAttribute("svg:x1", QString("%1\%").arg(x1)); > filters/libmso/ODrawToOdf.cpp(681): > style.addAttribute("svg:y1", QString("%1\%").arg(y1)); > filters/libmso/ODrawToOdf.cpp(682): > style.addAttribute("svg:x2", QString("%1\%").arg(x2)); > filters/libmso/ODrawToOdf.cpp(683): > style.addAttribute("svg:y2", QString("%1\%").arg(y2)); > filters/sheets/xlsx/ChartExport.cpp(240): > style.addProperty( "draw:opacity", QString( "%1\%" ).arg( > chart()->m_areaFormat->m_foreground.alphaF() * 100.0 ), > KoGenStyle::GraphicType ); > filters/sheets/xlsx/ChartExport.cpp(302): > style.addProperty( "draw:opacity", QString( "%1\%" ).arg( > areaFormat->m_foreground.alphaF() * 100.0 ), > KoGenStyle::GraphicType ); > > Is it okay to just replace "\%" by "%" ? > > Thanks, > Andrius. > > > > _______________________________________________ > calligra-devel mailing list > calligra-devel@kde.org > https://mail.kde.org/mailman/listinfo/calligra-devel > > > _______________________________________________ > calligra-devel mailing list > calligra-devel@kde.org > https://mail.kde.org/mailman/listinfo/calligra-devel --------------050104070108050402080305 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On 03/19/2012 11:21 AM, Matus Uzak wrote:
Hi,

I did not catch the irc conversation.  The backslash in "\%" seems to be ignored internally.  I don't think it's an undocumented escape sequence understood by QString, so I would remove it.
Any objections from sebsauer and LukasT who were using those?

The code that uses it is not from me but from Bjoern (commit 648de6ad). Don't know why it was added...
That sayed: no objections :)


-matus

On Sun, Mar 18, 2012 at 4:52 AM, Andrius da Costa Ribas <andriusmao@gmail.com> wrote:
Please find attached the patch for 2.4 branch (Either reviewboard does not accept patches for non-master or I don't know how to).

2012/3/17 Andrius da Costa Ribas <andriusmao@gmail.com>
Hello,

As discussed on IRC, some sources contains "\%" invalid escape sequence:

filters/libmso/ODrawToOdf.cpp(625):         style.addAttribute("svg:x1", QString("%1\%").arg(x1));
filters/libmso/ODrawToOdf.cpp(626):         style.addAttribute("svg:y1", QString("%1\%").arg(y1));
filters/libmso/ODrawToOdf.cpp(627):         style.addAttribute("svg:x2", QString("%1\%").arg(x2));
filters/libmso/ODrawToOdf.cpp(628):         style.addAttribute("svg:y2", QString("%1\%").arg(y2));
filters/libmso/ODrawToOdf.cpp(680):         style.addAttribute("svg:x1", QString("%1\%").arg(x1));
filters/libmso/ODrawToOdf.cpp(681):         style.addAttribute("svg:y1", QString("%1\%").arg(y1));
filters/libmso/ODrawToOdf.cpp(682):         style.addAttribute("svg:x2", QString("%1\%").arg(x2));
filters/libmso/ODrawToOdf.cpp(683):         style.addAttribute("svg:y2", QString("%1\%").arg(y2));
filters/sheets/xlsx/ChartExport.cpp(240):                 style.addProperty( "draw:opacity", QString( "%1\%" ).arg( chart()->m_areaFormat->m_foreground.alphaF() * 100.0 ), KoGenStyle::GraphicType );
filters/sheets/xlsx/ChartExport.cpp(302):                 style.addProperty( "draw:opacity", QString( "%1\%" ).arg( areaFormat->m_foreground.alphaF() * 100.0 ), KoGenStyle::GraphicType );

Is it okay to just replace "\%" by "%" ?

Thanks,
Andrius.


_______________________________________________
calligra-devel mailing list
calligra-devel@kde.org
https://mail.kde.org/mailman/listinfo/calligra-devel

_______________________________________________ calligra-devel mailing list calligra-devel@kde.org https://mail.kde.org/mailman/listinfo/calligra-devel

--------------050104070108050402080305-- --===============0384441067139947843== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ calligra-devel mailing list calligra-devel@kde.org https://mail.kde.org/mailman/listinfo/calligra-devel --===============0384441067139947843==--