summaryrefslogtreecommitdiff
path: root/odk/examples/DevelopersGuide/OfficeDev
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-06-04 11:43:58 +0200
committerNoel Grandin <noel@peralex.com>2014-06-04 11:52:34 +0200
commitcc25f70ef1e9fa7637b4bfd332ebdc33844a41c2 (patch)
tree76fe846c5b4ec24faa6ee53d34c49554eac3d4a8 /odk/examples/DevelopersGuide/OfficeDev
parentadc20c3937f3119d39af5a0c8e4a439d8127fe63 (diff)
compareTo -> equals
convert OUString::compareTo usage to equals to startsWith where it is more appropriate Change-Id: I6f5b5b7942429c0099ad082ba4984fd18e422121
Diffstat (limited to 'odk/examples/DevelopersGuide/OfficeDev')
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/Desk.java2
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/DocumentView.java8
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/FunctionHelper.java2
3 files changed, 6 insertions, 6 deletions
diff --git a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/Desk.java b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/Desk.java
index 101540ee748f..7b20bb4e56a6 100644
--- a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/Desk.java
+++ b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/Desk.java
@@ -75,7 +75,7 @@ public class Desk
sFile = lArguments[i].substring(5);
}
- ViewContainer.mbInplace = (sMode.compareTo("inplace")==0);
+ ViewContainer.mbInplace = sMode.equals("inplace");
// Connect to remote office.
OfficeConnect.createConnection();
diff --git a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/DocumentView.java b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/DocumentView.java
index 0fb4ecb6c578..b72f30ac755c 100644
--- a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/DocumentView.java
+++ b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/DocumentView.java
@@ -390,7 +390,7 @@ public class DocumentView extends JFrame
String sCommand = aEvent.getActionCommand();
// open any file from disk
- if( sCommand.compareTo(COMMAND_OPEN) == 0 )
+ if( sCommand.equals(COMMAND_OPEN) )
{
String sURL = FunctionHelper.askUserForFileURL(DocumentView.this,true);
if(sURL!=null)
@@ -399,14 +399,14 @@ public class DocumentView extends JFrame
else
// save current document
- if( sCommand.compareTo(COMMAND_SAVE) == 0 )
+ if( sCommand.equals(COMMAND_SAVE) )
{
DocumentView.this.save();
}
else
// export current document to html
- if( sCommand.compareTo(COMMAND_EXPORT) == 0 )
+ if( sCommand.equals(COMMAND_EXPORT))
{
String sURL = FunctionHelper.askUserForFileURL(DocumentView.this,false);
if(sURL!=null)
@@ -415,7 +415,7 @@ public class DocumentView extends JFrame
else
// exit application
- if( sCommand.compareTo(COMMAND_EXIT) == 0 )
+ if( sCommand.equals(COMMAND_EXIT) )
{
// This will force deleting of this and
// all other currently opened views automatically!
diff --git a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/FunctionHelper.java b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/FunctionHelper.java
index 43f98d232d83..2f9b8e153bee 100644
--- a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/FunctionHelper.java
+++ b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/FunctionHelper.java
@@ -958,7 +958,7 @@ public class FunctionHelper
{
com.sun.star.frame.XFrame xFrame = (com.sun.star.frame.XFrame)AnyConverter.toObject(new com.sun.star.uno.Type(com.sun.star.frame.XFrame.class), xContainer.getByIndex(i));
sName = new String(BASEFRAMENAME+mnViewCount);
- while(sName.compareTo(xFrame.getName())==0)
+ while(sName.equals(xFrame.getName()))
{
++mnViewCount;
sName = new String(BASEFRAMENAME+mnViewCount);