Kaydet (Commit) a983fb0f authored tarafından Lionel Elie Mamane's avatar Lionel Elie Mamane

Revert "fdo#87301 don't rely on the shape to get the control"

This reverts commit 89b3af722cc13a0af06822afe248cdec3b63cfeb.
üst ffd3388d
...@@ -62,17 +62,22 @@ public class TimeStampControl extends DatabaseControl ...@@ -62,17 +62,22 @@ public class TimeStampControl extends DatabaseControl
nreltimewidth = 1.0 - nreldatewidth; nreltimewidth = 1.0 - nreldatewidth;
} }
public XPropertySet getControlByIndex(int _i) public XPropertySet getControlofGroupShapeByIndex(int _i)
{ {
switch (_i) try
{
if (_i < xShapes.getCount())
{
Object oControl = xShapes.getByIndex(_i);
XControlShape xControlShape = UnoRuntime.queryInterface(XControlShape.class, oControl);
return UnoRuntime.queryInterface(XPropertySet.class, xControlShape.getControl());
}
}
catch (Exception e)
{ {
case 0: e.printStackTrace(System.err);
return oDateControl.xPropertySet;
case 1:
return oTimeControl.xPropertySet;
default:
return null;
} }
return null;
} }
public TimeStampControl(Resource _oResource, GridControl _oGridControl, FieldColumn _curfieldcolumn) public TimeStampControl(Resource _oResource, GridControl _oGridControl, FieldColumn _curfieldcolumn)
......
...@@ -271,7 +271,7 @@ public class StyleApplier ...@@ -271,7 +271,7 @@ public class StyleApplier
TimeStampControl oTimeStampControl = (TimeStampControl) DBControls[n]; TimeStampControl oTimeStampControl = (TimeStampControl) DBControls[n];
for (int i = 0; i < 2; i++) for (int i = 0; i < 2; i++)
{ {
XPropertySet xPropertySet = oTimeStampControl.getControlByIndex(i); XPropertySet xPropertySet = oTimeStampControl.getControlofGroupShapeByIndex(i);
if (xPropertySet.getPropertySetInfo().hasPropertyByName(PropertyNames.PROPERTY_BORDER)) if (xPropertySet.getPropertySetInfo().hasPropertyByName(PropertyNames.PROPERTY_BORDER))
{ {
xPropertySet.setPropertyValue(PropertyNames.PROPERTY_BORDER, IBorderValue); xPropertySet.setPropertyValue(PropertyNames.PROPERTY_BORDER, IBorderValue);
...@@ -405,7 +405,7 @@ public class StyleApplier ...@@ -405,7 +405,7 @@ public class StyleApplier
TimeStampControl oTimeStampControl = (TimeStampControl) aDBControl; TimeStampControl oTimeStampControl = (TimeStampControl) aDBControl;
for (int i = 0; i < 2; i++) for (int i = 0; i < 2; i++)
{ {
XPropertySet xPropertySet = oTimeStampControl.getControlByIndex(i); XPropertySet xPropertySet = oTimeStampControl.getControlofGroupShapeByIndex(i);
setDBControlColors(xPropertySet, _iStyleColors); setDBControlColors(xPropertySet, _iStyleColors);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment