return;
}
// TODO: Do we need to wait?
TimeHelper.waitInSeconds(1, "wait after loadFromURL.");
XServiceInfo xServiceInfo = (XServiceInfo) UnoRuntime.queryInterface( XServiceInfo.class, aDoc );
// String sFilter = getFilterName_forExcel(xServiceInfo);
// System.out.println("Filter is " + sFilter);
// store the document in an other directory
XStorable xStorable = (XStorable) UnoRuntime.queryInterface( XStorable.class, aDoc);
if (xStorable == null)
{
GlobalLogWriter.get().println("com.sun.star.frame.XStorable is null");
return;
}
String sFilterName = _aGTA.getExportFilterName();
// check how many Properties should initialize
int nPropertyCount = 0;
// if (sFilterName != null && sFilterName.length() > 0)
// {
// nPropertyCount ++;
// }
// initialize PropertyArray
// PropertyValue [] aStoreProps = new PropertyValue[ nPropertyCount ];
// int nPropertyIndex = 0;
ArrayList aPropertyList = new ArrayList();
String sExtension = "";
if (sFilterName != null && sFilterName.length() > 0)
{
String sInternalFilterName = getInternalFilterName(sFilterName, xMSF);
String sServiceName = getServiceNameFromFilterName(sFilterName, xMSF);
GlobalLogWriter.get().println("Filter detection:");
// check if service name from file filter is the same as from the loaded document
boolean bServiceFailed = false;
if (sServiceName == null || sInternalFilterName == null)
{
GlobalLogWriter.get().println("Given FilterName '" + sFilterName + "' seems to be unknown.");
bServiceFailed = true;
}
if (! xServiceInfo.supportsService(sServiceName))
{
GlobalLogWriter.get().println("Service from FilterName '" + sServiceName + "' is not supported by loaded document.");
bServiceFailed = true;
}
if (bServiceFailed == true)