summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/unocore/unoobj.cxx4
-rw-r--r--sw/source/ui/uno/unotxdoc.cxx2
-rw-r--r--sw/source/ui/vba/vbaparagraphformat.cxx2
3 files changed, 4 insertions, 4 deletions
diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx
index 5fc9a010b62c..7644261ba126 100644
--- a/sw/source/core/unocore/unoobj.cxx
+++ b/sw/source/core/unocore/unoobj.cxx
@@ -2834,7 +2834,7 @@ sal_Bool SwUnoCursorHelper::ConvertSortProperties(
bRet = sal_False;
}
}
- else if (0 == rPropName.indexOf("IsSortNumeric") &&
+ else if (rPropName.startsWith("IsSortNumeric") &&
rPropName.getLength() == 14 &&
(rPropName.getStr()[13] >= '0' && rPropName.getStr()[13] <= '9'))
{
@@ -2851,7 +2851,7 @@ sal_Bool SwUnoCursorHelper::ConvertSortProperties(
bRet = sal_False;
}
}
- else if (0 == rPropName.indexOf("IsSortAscending") &&
+ else if (rPropName.startsWith("IsSortAscending") &&
rPropName.getLength() == 16 &&
(rPropName.getStr()[15] >= '0' && rPropName.getStr()[15] <= '9'))
{
diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx
index c658b8598a79..3ca1c8b6d804 100644
--- a/sw/source/ui/uno/unotxdoc.cxx
+++ b/sw/source/ui/uno/unotxdoc.cxx
@@ -1702,7 +1702,7 @@ Reference< XInterface > SwXTextDocument::createInstance(const OUString& rServic
//! adding the shapes to the draw page).
//! For inserting OLE objects the proper way is to use
//! "com.sun.star.text.TextEmbeddedObject"!
- if (rServiceName.lastIndexOf( ".OLE2Shape" ) == rServiceName.getLength() - 10)
+ if (rServiceName.endsWith( ".OLE2Shape" ))
throw ServiceNotRegisteredException(); // declare service to be not registered with this factory
//
diff --git a/sw/source/ui/vba/vbaparagraphformat.cxx b/sw/source/ui/vba/vbaparagraphformat.cxx
index 196240e49ab9..e47ddcc153f1 100644
--- a/sw/source/ui/vba/vbaparagraphformat.cxx
+++ b/sw/source/ui/vba/vbaparagraphformat.cxx
@@ -185,7 +185,7 @@ sal_Int32 SAL_CALL SwVbaParagraphFormat::getOutlineLevel() throw (uno::RuntimeEx
OUString aHeading;
const OUString HEADING = OUString("Heading");
mxParaProps->getPropertyValue("ParaStyleName") >>= aHeading;
- if( aHeading.indexOf( HEADING ) == 0 )
+ if( aHeading.startsWith( HEADING ) )
{
// get the sub string after "Heading"
nLevel = aHeading.copy( HEADING.getLength() ).toInt32();