{
m_aDetailLabel = SectionLabel.create(aFixedText);
}
else
{
XFormattedField aFormattedField = (XFormattedField) UnoRuntime.queryInterface(XFormattedField.class, aObj);
if (aFormattedField != null &&
m_aDetailTextField == null)
{
m_aDetailTextField = SectionTextField.create(aFormattedField);
}
}
int dummy = 0;
}
catch (com.sun.star.lang.IndexOutOfBoundsException ex)
{
}
catch (com.sun.star.lang.WrappedTargetException ex)
{
}
}
final XGroups xGroups = m_xReportDefinition.getGroups();
final int nGroupCount = xGroups.getCount();
// create a m_aGroupLabel_FD[]
// create a m_aGroupTextField_FD[]
m_aGroupLabel = new SectionObject[nGroupCount];
m_aGroupTextField = new SectionObject[nGroupCount];
for (int nGroup = 0; nGroup < nGroupCount; nGroup++)
{
try
{
Object aGroup = xGroups.getByIndex(nGroup);
XGroup xGroup = (XGroup) UnoRuntime.queryInterface(XGroup.class, aGroup);
XSection xGroupSection = xGroup.getHeader();
final int nCount = xGroupSection.getCount();
for (int i = 0; i < nCount; i++)
{
try
{
Object aObj = xGroupSection.getByIndex(i);
XFixedText aFixedText = (XFixedText) UnoRuntime.queryInterface(XFixedText.class, aObj);
// is aObj a label
// is aObj a textfield
if (aFixedText != null &&
m_aGroupLabel[nGroup] == null)
{
m_aGroupLabel[nGroup] = SectionLabel.create(aFixedText);
}
else
{
XFormattedField aFormattedField = (XFormattedField) UnoRuntime.queryInterface(XFormattedField.class, aObj);
if (aFormattedField != null &&
m_aGroupTextField[nGroup] == null)
{
m_aGroupTextField[nGroup] = SectionTextField.create(aFormattedField);
}