summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-09-16 13:02:06 +0200
committerStephan Bergmann <sbergman@redhat.com>2014-09-16 13:02:06 +0200
commitd3886f87789c880a662eecc5986ac03e76ca13b6 (patch)
treebe6d8da8a2d476fe8df01bea7b336f2de26197c2
parent31c379041c6a40a7ef3862349ccb9f4f9ac23260 (diff)
Add back XExampleAddIn methods
...erroneously removed by 34bcf9b498bccb5c924f4cec850ff15d88df6f07 "java: remove dead methods" Change-Id: I3a6dc7b08af2097f15779a5116d04dd0c80429ec
-rw-r--r--odk/examples/DevelopersGuide/Spreadsheet/ExampleAddIn.java23
1 files changed, 22 insertions, 1 deletions
diff --git a/odk/examples/DevelopersGuide/Spreadsheet/ExampleAddIn.java b/odk/examples/DevelopersGuide/Spreadsheet/ExampleAddIn.java
index 513bfa1517d4..109335f3cbea 100644
--- a/odk/examples/DevelopersGuide/Spreadsheet/ExampleAddIn.java
+++ b/odk/examples/DevelopersGuide/Spreadsheet/ExampleAddIn.java
@@ -163,9 +163,30 @@ public class ExampleAddIn
// XExampleAddIn
+ public int getIncremented( int nValue )
+ {
+ return nValue + 1;
+ }
+ public com.sun.star.sheet.XVolatileResult getCounter(String aName)
+ {
+ if ( aResults == null )
+ {
+ // create the table of results, and start a thread to increment
+ // all counters
+ aResults = new java.util.HashMap<String, ExampleAddInResult>();
+ ExampleAddInThread aThread = new ExampleAddInThread( aResults );
+ aThread.start();
+ }
-
+ ExampleAddInResult aResult = aResults.get(aName);
+ if ( aResult == null )
+ {
+ aResult = new ExampleAddInResult(aName);
+ aResults.put( aName, aResult );
+ }
+ return aResult;
+ }
// XAddIn