|
|
@ -159,92 +159,6 @@ namespace ICSharpCode.Reports.Core.Exporter |
|
|
|
if (currentBottom.Y > Offset.Y) { |
|
|
|
if (currentBottom.Y > Offset.Y) { |
|
|
|
Offset = new Point (Offset.X,currentBottom.Y); |
|
|
|
Offset = new Point (Offset.X,currentBottom.Y); |
|
|
|
} |
|
|
|
} |
|
|
|
// Offset = new Point (Offset.X,Offset.Y + gapCalculator.LastGap);
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
SectionBounds.Offset = Offset; |
|
|
|
|
|
|
|
return convertedSection; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected ExporterCollection old_ConvertSection (BaseSection section,int dataRow) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
Point currentBottom = Point.Empty; |
|
|
|
|
|
|
|
FireSectionRenderEvent (section ,dataRow); |
|
|
|
|
|
|
|
PrintHelper.AdjustParent(section,section.Items); |
|
|
|
|
|
|
|
PrintHelper.AdjustSectionLocation(section); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var convertedSection = new ExporterCollection(); |
|
|
|
|
|
|
|
Offset = SectionBounds.Offset; |
|
|
|
|
|
|
|
Point startOffset = Offset; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (section.Items.Count > 0) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
Size sectionSize = section.Size; |
|
|
|
|
|
|
|
IExpressionEvaluatorFacade evaluator = EvaluationHelper.CreateEvaluator(this.SinglePage,this.SinglePage.IDataNavigator); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Rectangle desiredRectangle = LayoutHelper.CalculateSectionLayout(this.Graphics,section); |
|
|
|
|
|
|
|
LayoutHelper.FixSectionLayout(desiredRectangle,section); |
|
|
|
|
|
|
|
section.Items.SortByLocation(); |
|
|
|
|
|
|
|
GapList gapCalculator = new GapList(); |
|
|
|
|
|
|
|
gapCalculator.CalculateGapList(section); |
|
|
|
|
|
|
|
int i = 0; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
foreach (BaseReportItem item in section.Items) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
ISimpleContainer simpleContainer = item as ISimpleContainer; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (simpleContainer != null) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
Offset = new Point(Offset.X,Offset.Y + gapCalculator.GapBetweenItems[i] ); |
|
|
|
|
|
|
|
var containerSize = simpleContainer.Size; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
EvaluationHelper.EvaluateReportItems(evaluator,simpleContainer.Items); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var layouter = (ILayouter)ServiceContainer.GetService(typeof(ILayouter)); |
|
|
|
|
|
|
|
LayoutHelper.SetLayoutForRow(Graphics,layouter, simpleContainer); |
|
|
|
|
|
|
|
/* |
|
|
|
|
|
|
|
* */ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* |
|
|
|
|
|
|
|
section.Items.ForEach(delegate(BaseReportItem aitem) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
// Console.WriteLine(item.Location);
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
var h = section.Items.FindHighestElement(); |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
section.MeasureOverride(section.Size); |
|
|
|
|
|
|
|
/** */ |
|
|
|
|
|
|
|
Offset = BaseConverter.ConvertContainer(convertedSection,simpleContainer,Offset.X,Offset); |
|
|
|
|
|
|
|
simpleContainer.Size = containerSize; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
var converteditem = ExportHelper.ConvertLineItem(item,Offset); |
|
|
|
|
|
|
|
if (converteditem != null) { |
|
|
|
|
|
|
|
if (converteditem.StyleDecorator.DisplayRectangle.Bottom > currentBottom.Y) { |
|
|
|
|
|
|
|
currentBottom = new Point(converteditem.StyleDecorator.Location.X,converteditem.StyleDecorator.DisplayRectangle.Bottom); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
convertedSection.Add((BaseExportColumn)converteditem ); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
// if (converteditem.StyleDecorator.DisplayRectangle.Bottom > currentBottom.Y) {
|
|
|
|
|
|
|
|
// currentBottom = new Point(converteditem.StyleDecorator.Location.X,converteditem.StyleDecorator.DisplayRectangle.Bottom);
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// convertedSection.Add((BaseExportColumn)converteditem );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
i ++; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
Offset = new Point (Offset.X,Offset.Y + gapCalculator.LastGap); |
|
|
|
|
|
|
|
// Offset = new Point (Offset.X,Offset.Y + 5);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (currentBottom.Y > Offset.Y) { |
|
|
|
|
|
|
|
Offset = new Point (Offset.X,currentBottom.Y); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
// Offset = new Point (Offset.X,Offset.Y + gapCalculator.LastGap);
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
SectionBounds.Offset = Offset; |
|
|
|
SectionBounds.Offset = Offset; |
|
|
|
return convertedSection; |
|
|
|
return convertedSection; |
|
|
|