Add back XExampleAddIn methods

...erroneously removed by 34bcf9b498 "java: remove
dead methods"

Change-Id: I3a6dc7b08af2097f15779a5116d04dd0c80429ec
This commit is contained in:
Stephan Bergmann
2014-09-16 13:02:06 +02:00
parent 31c379041c
commit d3886f8778

View File

@@ -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