summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-10-21 12:23:14 +0100
committerCaolán McNamara <caolanm@redhat.com>2013-10-21 14:26:32 +0100
commit91e181ea585855bea97a07823f7334d0b98b20d5 (patch)
tree2578b79ddca097390802b5d2f5d5676d6a7821ff /sfx2
parent958f7b512cff932f7f2d52d128c297d0f0ab6354 (diff)
remove uses of COMPARE_*
Change-Id: Icdc36b4b24d2f399f481065df3200feb98025135
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/appl/appuno.cxx5
-rw-r--r--sfx2/source/appl/shutdownicon.cxx2
-rw-r--r--sfx2/source/dialog/templdlg.cxx4
-rw-r--r--sfx2/source/doc/objstor.cxx8
-rw-r--r--sfx2/source/menu/mnuitem.cxx2
5 files changed, 10 insertions, 11 deletions
diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx
index 2f25eec9f03b..f8fa84a60016 100644
--- a/sfx2/source/appl/appuno.cxx
+++ b/sfx2/source/appl/appuno.cxx
@@ -2053,14 +2053,13 @@ Reference < XDispatch > SAL_CALL SfxAppDispatchProvider::queryDispatch(
Reference < XDispatch > xDisp;
const SfxSlot* pSlot = 0;
SfxDispatcher* pAppDisp = SFX_APP()->GetAppDispatcher_Impl();
- if ( aURL.Protocol.compareToAscii( "slot:" ) == COMPARE_EQUAL ||
- aURL.Protocol.compareToAscii( "commandId:" ) == COMPARE_EQUAL )
+ if ( aURL.Protocol == "slot:" || aURL.Protocol == "commandId:" )
{
nId = (sal_uInt16) aURL.Path.toInt32();
SfxShell* pShell;
pAppDisp->GetShellAndSlot_Impl( nId, &pShell, &pSlot, sal_True, sal_True );
}
- else if ( aURL.Protocol.compareToAscii( ".uno:" ) == COMPARE_EQUAL )
+ else if ( aURL.Protocol == ".uno:" )
{
// Support ".uno" commands. Map commands to slotid
bMasterCommand = SfxOfficeDispatch::IsMasterUnoCommand( aURL );
diff --git a/sfx2/source/appl/shutdownicon.cxx b/sfx2/source/appl/shutdownicon.cxx
index d0948c164ec1..bafa7c2c4038 100644
--- a/sfx2/source/appl/shutdownicon.cxx
+++ b/sfx2/source/appl/shutdownicon.cxx
@@ -344,7 +344,7 @@ void ShutdownIcon::FromTemplate()
Reference < ::com::sun::star::frame::XDispatch > xDisp;
if ( xProv.is() )
{
- if ( aTargetURL.Protocol.compareToAscii("slot:") == COMPARE_EQUAL )
+ if (aTargetURL.Protocol == "slot:")
xDisp = xProv->queryDispatch( aTargetURL, OUString(), 0 );
else
xDisp = xProv->queryDispatch( aTargetURL, OUString("_blank"), 0 );
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index 3d067e28ed3e..0c0869c1105b 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -635,8 +635,8 @@ sal_Bool StyleTreeListBox_Impl::NotifyMoving(SvTreeListEntry* pTarget,
IntlWrapper aIntlWrapper( Application::GetSettings().GetLanguageTag() );
const CollatorWrapper* pCollator = aIntlWrapper.getCaseCollator();
for(SvTreeListEntry *pTmpEntry=FirstChild(pTarget);
- pTmpEntry && COMPARE_LESS==pCollator->compareString(
- GetEntryText(pTmpEntry),GetEntryText(pEntry));
+ pTmpEntry && pCollator->compareString(
+ GetEntryText(pTmpEntry),GetEntryText(pEntry)) < 0;
pTmpEntry=NextSibling(pTmpEntry),lPos++) ;
return bRet? (sal_Bool)2: sal_False;
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index b426eb8e5753..165c680b6f31 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -2183,7 +2183,7 @@ sal_Bool SfxObjectShell::ImportFrom( SfxMedium& rMedium, bool bInsert )
for ( sal_Int32 nFilterProp = 0; nFilterProp<nFilterProps; nFilterProp++ )
{
const beans::PropertyValue& rFilterProp = aProps[nFilterProp];
- if ( rFilterProp.Name.compareToAscii("FilterService") == COMPARE_EQUAL )
+ if (rFilterProp.Name == "FilterService")
{
rFilterProp.Value >>= aFilterImplName;
break;
@@ -2312,7 +2312,7 @@ sal_Bool SfxObjectShell::ExportTo( SfxMedium& rMedium )
for ( sal_Int32 nFilterProp = 0; nFilterProp<nFilterProps; nFilterProp++ )
{
const beans::PropertyValue& rFilterProp = aProps[nFilterProp];
- if ( rFilterProp.Name.compareToAscii("FilterService") == COMPARE_EQUAL )
+ if (rFilterProp.Name == "FilterService")
{
rFilterProp.Value >>= aFilterImplName;
break;
@@ -3313,7 +3313,7 @@ sal_Bool StoragesOfUnknownMediaTypeAreCopied_Impl( const uno::Reference< embed::
// TODO/LATER: there should be a way to detect whether an object with such a MediaType can exist
// probably it should be placed in the MimeType-ClassID table or in standalone table
if ( !aMediaType.isEmpty()
- && aMediaType.compareToAscii( "application/vnd.sun.star.oleobject" ) != COMPARE_EQUAL )
+ && aMediaType != "application/vnd.sun.star.oleobject" )
{
::com::sun::star::datatransfer::DataFlavor aDataFlavor;
aDataFlavor.MimeType = aMediaType;
@@ -3455,7 +3455,7 @@ sal_Bool SfxObjectShell::CopyStoragesOfUnknownMediaType( const uno::Reference< e
// TODO/LATER: there should be a way to detect whether an object with such a MediaType can exist
// probably it should be placed in the MimeType-ClassID table or in standalone table
if ( !aMediaType.isEmpty()
- && aMediaType.compareToAscii( "application/vnd.sun.star.oleobject" ) != COMPARE_EQUAL )
+ && aMediaType != "application/vnd.sun.star.oleobject" )
{
::com::sun::star::datatransfer::DataFlavor aDataFlavor;
aDataFlavor.MimeType = aMediaType;
diff --git a/sfx2/source/menu/mnuitem.cxx b/sfx2/source/menu/mnuitem.cxx
index 5b3f08447c9b..962a67ad7fc5 100644
--- a/sfx2/source/menu/mnuitem.cxx
+++ b/sfx2/source/menu/mnuitem.cxx
@@ -427,7 +427,7 @@ long Select_Impl( void* /*pHdl*/, void* pVoid )
xTrans->parseStrict( aTargetURL );
Reference < XDispatch > xDisp;
- if ( aTargetURL.Protocol.compareToAscii("slot:") == COMPARE_EQUAL )
+ if (aTargetURL.Protocol == "slot:")
xDisp = xDesktop->queryDispatch( aTargetURL, OUString(), 0 );
else
{