De volta a ativa. :-)
---------- Forwarded message ----------
From: "José Guilherme Vanz (via Code Review)" <gerrit@gerrit.libreoffice.org
Date: Feb 3, 2013 4:13 AM
Subject: [PATCH] String cleanup in oox
To: "Norbert Thiebaud" <nthiebaud@gmail.com>
Cc:
Hi,
I have submitted a patch for review:
https://gerrit.libreoffice.org/1969
To pull it, you can do:
git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/69/1969/1
String cleanup in oox
Change-Id: Ib06b6defdb82c5d62be9cbd59f02827c07a320d8
Signed-off-by: José Guilherme Vanz <guilherme.sft@gmail.com>
---
M oox/source/mathml/importutils.cxx
1 file changed, 12 insertions(+), 13 deletions(-)
diff --git a/oox/source/mathml/importutils.cxx
b/oox/source/mathml/importutils.cxx
index d3c4782..5350d58 100644
--- a/oox/source/mathml/importutils.cxx
+++ b/oox/source/mathml/importutils.cxx
@@ -41,7 +41,6 @@
#define CLOSING( token ) XML_STREAM_CLOSING( token )
using namespace com::sun::star;
-using rtl::OUString;
namespace oox
{
@@ -117,7 +116,7 @@
rtl::OUString XmlStream::AttributeList::attribute( int token, const
rtl::OUString& def ) const
{
- std::map< int, rtl::OUString >::const_iterator find = attrs.find(
token );
+ std::map< int, OUString >::const_iterator find = attrs.find( token );
if( find != attrs.end())
return find->second;
return def;
@@ -125,19 +124,19 @@
bool XmlStream::AttributeList::attribute( int token, bool def ) const
{
- std::map< int, rtl::OUString >::const_iterator find = attrs.find(
token );
+ std::map< int, OUString >::const_iterator find = attrs.find( token );
if( find != attrs.end())
{
- const rtl::OUString sValue = find->second;
- if(
sValue.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("true")) ||
-
sValue.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("on")) ||
-
sValue.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("t")) ||
-
sValue.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("1")) )
+ const OUString sValue = find->second;
+ if( sValue.equalsIgnoreAsciiCaseAscii("true") ||
+ sValue.equalsIgnoreAsciiCaseAscii("on") ||
+ sValue.equalsIgnoreAsciiCaseAscii("t") ||
+ sValue.equalsIgnoreAsciiCaseAscii("1") )
return true;
- if(
sValue.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("false")) ||
-
sValue.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("off")) ||
-
sValue.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("f")) ||
-
sValue.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("0")) )
+ if( sValue.equalsIgnoreAsciiCaseAscii("false") ||
+ sValue.equalsIgnoreAsciiCaseAscii("off") ||
+ sValue.equalsIgnoreAsciiCaseAscii("f") ||
+ sValue.equalsIgnoreAsciiCaseAscii("0") )
return false;
SAL_WARN( "oox.xmlstream", "Cannot convert \'" << sValue << "\' to
bool." );
}
@@ -146,7 +145,7 @@
sal_Unicode XmlStream::AttributeList::attribute( int token, sal_Unicode
def ) const
{
- std::map< int, rtl::OUString >::const_iterator find = attrs.find(
token );
+ std::map< int, OUString >::const_iterator find = attrs.find( token );
if( find != attrs.end())
{
if( !find->second.isEmpty() )
--
To view, visit https://gerrit.libreoffice.org/1969
To unsubscribe, visit https://gerrit.libreoffice.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib06b6defdb82c5d62be9cbd59f02827c07a320d8
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: José Guilherme Vanz <guilherme.sft@gmail.com>
_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice
--
Você está recebendo e-mails da lista dev@pt-br.libreoffice.org
# Informações sobre os comandos disponíveis (em inglês):
mande e-mail vazio para dev+help@pt-br.libreoffice.org
# Cancelar sua assinatura: mande e-mail vazio para:
dev+unsubscribe@pt-br.libreoffice.org
# Arquivo de mensagens: http://listarchives.libreoffice.org/pt-br/dev
Context
- [pt-br-dev] Fwd: [PATCH] String cleanup in oox · José Guilherme Vanz
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.