[PATCH] Change compareTo -> == in dbaccess module
Paulo Henrique Cuchi (via Code Review)
gerrit at gerrit.libreoffice.org
Sat May 18 12:33:03 PDT 2013
Hi,
I have submitted a patch for review:
https://gerrit.libreoffice.org/3957
To pull it, you can do:
git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/57/3957/1
Change compareTo -> == in dbaccess module
Change-Id: I4708c043713a4ae9f9e0656fddf60b0888fed96e
---
M dbaccess/source/ui/app/AppController.cxx
M dbaccess/source/ui/control/opendoccontrols.cxx
M dbaccess/source/ui/misc/UITools.cxx
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx
index a8d32fa..326a3c2 100644
--- a/dbaccess/source/ui/app/AppController.cxx
+++ b/dbaccess/source/ui/app/AppController.cxx
@@ -2562,7 +2562,7 @@
OUString sName = xContent->getIdentifier()->getContentIdentifier();
sal_Int32 nIndex = 0;
sName = sName.copy(sName.getToken(0,'/',nIndex).getLength() + 1);
- if ( m_aAsyncDrop.aUrl.Len() >= sName.getLength() && 0 == sName.compareTo(m_aAsyncDrop.aUrl,sName.getLength()) )
+ if ( m_aAsyncDrop.aUrl.Len() >= sName.getLength() && sName == m_aAsyncDrop.aUrl)
{
m_aAsyncDrop.aDroppedData.clear();
return DND_ACTION_NONE;
diff --git a/dbaccess/source/ui/control/opendoccontrols.cxx b/dbaccess/source/ui/control/opendoccontrols.cxx
index 5723af6..98cc4e8 100644
--- a/dbaccess/source/ui/control/opendoccontrols.cxx
+++ b/dbaccess/source/ui/control/opendoccontrols.cxx
@@ -242,7 +242,7 @@
::comphelper::SequenceAsHashMap aFilterProperties( aProps );
OUString sDocumentService = aFilterProperties.getUnpackedValueOrDefault(
OUString( "DocumentService" ), OUString() );
- if ( sDocumentService.equalsAscii( _pAsciiModuleName ) )
+ if ( sDocumentService == *_pAsciiModuleName )
{
// yes, it's a Base document
INetURLObject aURL;
diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx
index 2aeae40..fdcc940 100644
--- a/dbaccess/source/ui/misc/UITools.cxx
+++ b/dbaccess/source/ui/misc/UITools.cxx
@@ -943,7 +943,7 @@
if(pBegin->indexOf('%') != -1)
{
sal_Int32 nLen;
- if((nLen = pBegin->lastIndexOf('.')) != -1 && !pBegin->compareTo(_sName,nLen))
+ if((nLen = pBegin->lastIndexOf('.')) != -1 && *pBegin == _sName)
bHasToInsert = sal_False;
else if(pBegin->getLength() == 1)
bHasToInsert = sal_False;
--
To view, visit https://gerrit.libreoffice.org/3957
To unsubscribe, visit https://gerrit.libreoffice.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I4708c043713a4ae9f9e0656fddf60b0888fed96e
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Paulo Henrique Cuchi <paulo.cuchi at gmail.com>
More information about the LibreOffice
mailing list