summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFridrich Štrba <fridrich.strba@bluewin.ch>2013-04-22 09:53:49 +0200
committerFridrich Štrba <fridrich.strba@bluewin.ch>2013-04-22 09:53:49 +0200
commitff4464659ec54732c45729ace964d60e77d19eb2 (patch)
tree8c63d1214e66dff745cc9477e8cd93bf5d06ddea
parent97f6625d9a49f62f09b0f9ddab8fa4935de45ae5 (diff)
Revert "fdo#62096: Replaced some compareTo with =="
-rw-r--r--sal/inc/rtl/string.hxx8
-rw-r--r--sal/qa/rtl_strings/rtl_OString.cxx6
-rw-r--r--writerfilter/source/ooxml/OOXMLStreamImpl.cxx14
3 files changed, 14 insertions, 14 deletions
diff --git a/sal/inc/rtl/string.hxx b/sal/inc/rtl/string.hxx
index 815126284aaa..e3d5afbc895a 100644
--- a/sal/inc/rtl/string.hxx
+++ b/sal/inc/rtl/string.hxx
@@ -782,25 +782,25 @@ public:
template< typename T >
friend typename internal::CharPtrDetector< T, bool >::Type operator==( const OString& rStr1, const T& value ) SAL_THROW(())
{
- return (rStr1 == value);
+ return rStr1.compareTo( value ) == 0;
}
template< typename T >
friend typename internal::NonConstCharArrayDetector< T, bool >::Type operator==( const OString& rStr1, T& value ) SAL_THROW(())
{
- return (rStr1 == value);
+ return rStr1.compareTo( value ) == 0;
}
template< typename T >
friend typename internal::CharPtrDetector< T, bool >::Type operator==( const T& value, const OString& rStr2 ) SAL_THROW(())
{
- return (rStr2 == value);
+ return rStr2.compareTo( value ) == 0;
}
template< typename T >
friend typename internal::NonConstCharArrayDetector< T, bool >::Type operator==( T& value, const OString& rStr2 ) SAL_THROW(())
{
- return (rStr2 == value);
+ return rStr2.compareTo( value ) == 0;
}
/**
diff --git a/sal/qa/rtl_strings/rtl_OString.cxx b/sal/qa/rtl_strings/rtl_OString.cxx
index 293381cd2a7c..1934f0625248 100644
--- a/sal/qa/rtl_strings/rtl_OString.cxx
+++ b/sal/qa/rtl_strings/rtl_OString.cxx
@@ -1929,7 +1929,7 @@ sal_Bool test_valueOf( const char** resArray, int n, sal_Int16 radix,
bRes &= c_rtl_tres_state
(
hRtlTestResult,
- aStr2 == aStr1,
+ aStr2.compareTo(aStr1) == 0,
(sal_Char*)resArray[i],
createName( pMeth, "valueOf", i )
);
@@ -2163,7 +2163,7 @@ sal_Bool SAL_CALL test_rtl_OString_valueOf_Int32_WrongRadix(
bRes = c_rtl_tres_state
(
hRtlTestResult,
- aStr2 == aStr1,
+ aStr2.compareTo( aStr1 ) == 0,
"if radix not valid then radix must be 10",
"valueOf(sal_Int32, sal_Int32 radix): radix = -5"
);
@@ -2411,7 +2411,7 @@ sal_Bool SAL_CALL test_rtl_OString_valueOf_Int64_WrongRadix(
bRes = c_rtl_tres_state
(
hRtlTestResult,
- aStr2 == aStr1,
+ aStr2.compareTo(aStr1) == 0,
"if radix not valid then radix must be 10",
"valueOf(sal_Int64, sal_Int32 radix): radix = -5"
);
diff --git a/writerfilter/source/ooxml/OOXMLStreamImpl.cxx b/writerfilter/source/ooxml/OOXMLStreamImpl.cxx
index 3305e7c41d78..96f37bdfbacd 100644
--- a/writerfilter/source/ooxml/OOXMLStreamImpl.cxx
+++ b/writerfilter/source/ooxml/OOXMLStreamImpl.cxx
@@ -169,16 +169,16 @@ bool OOXMLStreamImpl::lcl_getTarget(uno::Reference<embed::XRelationshipAccess>
{
beans::StringPair aPair = aSeq[i];
- if (aPair.First == sType &&
- aPair.Second == sStreamType)
+ if (aPair.First.compareTo(sType) == 0 &&
+ aPair.Second.compareTo(sStreamType) == 0)
bFound = true;
- else if (aPair.First == sId &&
- aPair.Second == rId)
+ else if (aPair.First.compareTo(sId) == 0 &&
+ aPair.Second.compareTo(rId) == 0)
bFound = true;
- else if (aPair.First == sTarget)
+ else if (aPair.First.compareTo(sTarget) == 0)
sMyTarget = aPair.Second;
- else if (aPair.First == sTargetMode &&
- aPair.Second == sExternal)
+ else if (aPair.First.compareTo(sTargetMode) == 0 &&
+ aPair.Second.compareTo(sExternal) == 0)
bExternalTarget = true;
}