nHeight = LayoutConstants.MemoFieldHeight; // special case for memo
}
}
_aRect.Height = nHeight;
final XReportControlModel xReportControlModel = (XReportControlModel) UnoRuntime.queryInterface(XReportControlModel.class, aField);
if (xReportControlModel != null)
{
// #i86907# not documented right in idl description.
xReportControlModel.setDataField(_sFormattedfield);
if (_aSO != null)
{
// TODO: there seems to be some problems with copy all properties from the design template to the current design
final FontDescriptor aFD = _aSO.getFontDescriptor();
if (aFD != null)
{
xReportControlModel.setFontDescriptor(aFD);
copyProperties(_aSO.getParent(), xReportControlModel);
}
nHeight = _aSO.getHeight(nHeight);
}
xReportControlModel.setPositionX(_aRect.X);
xReportControlModel.setPositionY(_aRect.Y);
xReportControlModel.setWidth(_nWidth);
_aRect.X += _nWidth;
xReportControlModel.setHeight(nHeight);
if (nType == DataType.BINARY ||
nType == DataType.VARBINARY ||
nType == DataType.LONGVARBINARY)
{
// aField = getMSFofReportDefinition().createInstance("com.sun.star.report.ImageControl");
final XImageControl xImageControl = (XImageControl) UnoRuntime.queryInterface(XImageControl.class, xReportControlModel);
if (xImageControl != null)
{
// xImageControl.setScaleImage(true);
xImageControl.setScaleMode(com.sun.star.awt.ImageScaleMode.Isotropic);
}
}
else
{
try
{
xReportControlModel.setParaAdjust(_nAlignment);
// if (nType == DataType.LONGVARCHAR)
// {
// xReportControlModel.???
// }
}