Skip to content
This repository
Browse code

Cleanup

  • Loading branch information...
commit 2903ee291356053bd01555db0ef17e89951d9e10 1 parent f4f36e9
Peter Forstmeier authored October 07, 2010
1  src/AddIns/Misc/Reports/ICSharpCode.Reports.Core/ICSharpCode.Reports.Core.csproj
@@ -144,7 +144,6 @@
144 144
     <Compile Include="Project\Exporter\Converters\BaseConverter.cs" />
145 145
     <Compile Include="Project\Exporter\Converters\ConverterFactory.cs" />
146 146
     <Compile Include="Project\Exporter\Converters\GroupedRowConverter.cs" />
147  
-    <Compile Include="Project\Exporter\Converters\TableConverter.cs" />
148 147
     <Compile Include="Project\Exporter\Decorators\IBaseStyleDecorator.cs" />
149 148
     <Compile Include="Project\Exporter\Decorators\ILineDecorator.cs" />
150 149
     <Compile Include="Project\Exporter\Decorators\Linedecorator.cs" />
3  src/AddIns/Misc/Reports/ICSharpCode.Reports.Core/Project/Exporter/Converters/GroupedRowConverter.cs
@@ -2,10 +2,7 @@
2 2
 // This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
3 3
 
4 4
 using System;
5  
-using System.Collections.ObjectModel;
6 5
 using System.Drawing;
7  
-using System.Linq;
8  
-
9 6
 using ICSharpCode.Reports.Core.BaseClasses.Printing;
10 7
 using ICSharpCode.Reports.Core.Interfaces;
11 8
 
5  src/AddIns/Misc/Reports/ICSharpCode.Reports.Core/Project/Exporter/Converters/GroupedTableConverter.cs
@@ -2,11 +2,12 @@
2 2
 // This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
3 3
 
4 4
 using System;
  5
+using System.Collections.ObjectModel;
5 6
 using System.Drawing;
  7
+using System.Linq;
  8
+
6 9
 using ICSharpCode.Reports.Core.BaseClasses.Printing;
7 10
 using ICSharpCode.Reports.Core.Interfaces;
8  
-using System.Linq;
9  
-using System.Collections.ObjectModel;
10 11
 
11 12
 namespace ICSharpCode.Reports.Core.Exporter
12 13
 {
193  src/AddIns/Misc/Reports/ICSharpCode.Reports.Core/Project/Exporter/Converters/TableConverter.cs
... ...
@@ -1,193 +0,0 @@
1  
-// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
2  
-// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
3  
-
4  
-using System;
5  
-using System.Drawing;
6  
-using ICSharpCode.Reports.Core.BaseClasses.Printing;
7  
-using ICSharpCode.Reports.Core.Interfaces;
8  
-
9  
-namespace ICSharpCode.Reports.Core.Exporter
10  
-{
11  
-	/// <summary>
12  
-	/// Description of TableConverter.
13  
-	/// </summary>
14  
-	public class TableConverter:BaseConverter
15  
-	{
16  
-
17  
-		private ITableContainer baseTable;
18  
-		
19  
-		public TableConverter(IDataNavigator dataNavigator,
20  
-		                      ExporterPage singlePage, ILayouter layouter ):base(dataNavigator,singlePage,layouter)
21  
-			
22  
-		{
23  
-		}
24  
-		
25  
-		
26  
-		public override ExporterCollection Convert (BaseReportItem parent,BaseReportItem item)
27  
-		{
28  
-			if (parent == null) {
29  
-				throw new ArgumentNullException("parent");
30  
-			}
31  
-			if (item == null) {
32  
-				throw new ArgumentNullException("item");
33  
-			}
34  
-			
35  
-			ExporterCollection mylist = base.Convert(parent,item);
36  
-			this.baseTable = (BaseTableItem)item ;
37  
-			this.baseTable.Parent = parent;
38  
-			this.baseTable.DataNavigator = base.DataNavigator;
39  
-			return ConvertInternal(mylist);
40  
-		}
41  
-		
42  
-		
43  
-		private ExporterCollection ConvertInternal(ExporterCollection mylist)
44  
-		{
45  
-			
46  
-			Point currentPosition = new Point(PrintHelper.DrawingAreaRelativeToParent(this.baseTable.Parent,this.baseTable).Location.X,
47  
-			                                  base.SectionBounds.DetailStart.Y);
48  
-			
49  
-			int defaultLeftPos = currentPosition.X;
50  
-			
51  
-			Point dataAreaStart = new Point(baseTable.Items[0].Location.X,baseTable.Items[0].Location.Y + currentPosition.Y);
52  
-			
53  
-			ISimpleContainer headerContainer = null;
54  
-			
55  
-			
56  
-			
57  
-			this.baseTable.Items.SortByLocation();
58  
-			
59  
-			foreach (ISimpleContainer simpleContainer in this.baseTable.Items)
60  
-			{
61  
-				if (simpleContainer.Items.Count > 0) {
62  
-					simpleContainer.Location = new Point (simpleContainer.Location.X,simpleContainer.Location.Y);
63  
-					simpleContainer.Parent = (BaseReportItem)this.baseTable;
64  
-					base.SaveSize( new Size (simpleContainer.Size.Width,simpleContainer.Size.Height));
65  
-					// Header/FooterRow
66  
-					
67  
-					if (PrintHelper.IsTextOnlyRow(simpleContainer) ) {
68  
-						headerContainer = simpleContainer;
69  
-						currentPosition = BaseConverter.BaseConvert(mylist,headerContainer,defaultLeftPos,currentPosition);
70  
-					}
71  
-					
72  
-					else
73  
-					{
74  
-						// DataRegion
75  
-						base.SaveSize(simpleContainer.Size);
76  
-						do {
77  
-							//
78  
-							BaseSection section = this.baseTable.Parent as BaseSection;
79  
-							PrintHelper.AdjustSectionLocation(section);
80  
-							
81  
-//							base.FillRow(simpleContainer);
82  
-							
83  
-							StandardPrinter.EvaluateRow(base.Evaluator,mylist);
84  
-							
85  
-							base.PrepareContainerForConverting(null,simpleContainer);
86  
-							
87  
-							Rectangle pageBreakRect = PrintHelper.CalculatePageBreakRectangle((BaseReportItem)simpleContainer,currentPosition);
88  
-							
89  
-							if (PrintHelper.IsPageFull(pageBreakRect,base.SectionBounds))
90  
-							{
91  
-								base.BuildNewPage(mylist,section);
92  
-								
93  
-								currentPosition = BaseConverter.BaseConvert(mylist,headerContainer,
94  
-								                                            defaultLeftPos,
95  
-								                                            base.SectionBounds.ReportHeaderRectangle.Location);
96  
-
97  
-							}
98  
-							
99  
-							currentPosition = BaseConverter.BaseConvert(mylist,simpleContainer,defaultLeftPos,currentPosition);
100  
-							
101  
-							simpleContainer.Size = base.RestoreSize;
102  
-						}
103  
-						while (base.DataNavigator.MoveNext());
104  
-						//Allway's reset the DataNavigator
105  
-						base.DataNavigator.Reset();
106  
-						base.DataNavigator.MoveNext();
107  
-						SectionBounds.ReportFooterRectangle =  new Rectangle(SectionBounds.ReportFooterRectangle.Left,
108  
-						                                                     currentPosition.Y,
109  
-						                                                     SectionBounds.ReportFooterRectangle.Width,
110  
-						                                                     SectionBounds.ReportFooterRectangle.Height);
111  
-					}
112  
-				}
113  
-			}
114  
-			return mylist;
115  
-		}
116  
-		
117  
-		
118  
-		
119  
-		private ExporterCollection old_ConvertInternal(ExporterCollection mylist)
120  
-		{
121  
-			
122  
-			Point currentPosition = new Point(PrintHelper.DrawingAreaRelativeToParent(this.baseTable.Parent,this.baseTable).Location.X,
123  
-			                                  base.SectionBounds.DetailStart.Y);
124  
-			
125  
-			int defaultLeftPos = currentPosition.X;
126  
-			
127  
-			Point dataAreaStart = new Point(baseTable.Items[0].Location.X,baseTable.Items[0].Location.Y + currentPosition.Y);
128  
-			
129  
-			ISimpleContainer headerContainer = null;
130  
-			
131  
-			
132  
-			
133  
-			this.baseTable.Items.SortByLocation();
134  
-			
135  
-			foreach (ISimpleContainer simpleContainer in this.baseTable.Items)
136  
-			{
137  
-				if (simpleContainer.Items.Count > 0) {
138  
-					simpleContainer.Location = new Point (simpleContainer.Location.X,simpleContainer.Location.Y);
139  
-					simpleContainer.Parent = (BaseReportItem)this.baseTable;
140  
-					base.SaveSize( new Size (simpleContainer.Size.Width,simpleContainer.Size.Height));
141  
-					// Header/FooterRow
142  
-					
143  
-					if (PrintHelper.IsTextOnlyRow(simpleContainer) ) {
144  
-						headerContainer = simpleContainer;
145  
-						currentPosition = BaseConverter.BaseConvert(mylist,headerContainer,defaultLeftPos,currentPosition);
146  
-					}
147  
-					
148  
-					else
149  
-					{
150  
-						// DataRegion
151  
-						base.SaveSize(simpleContainer.Size);
152  
-						do {
153  
-							//
154  
-							BaseSection section = this.baseTable.Parent as BaseSection;
155  
-							PrintHelper.AdjustSectionLocation(section);
156  
-							
157  
-//							base.FillRow(simpleContainer);
158  
-							
159  
-							StandardPrinter.EvaluateRow(base.Evaluator,mylist);
160  
-							
161  
-							base.PrepareContainerForConverting(null,simpleContainer);
162  
-							
163  
-							Rectangle pageBreakRect = PrintHelper.CalculatePageBreakRectangle((BaseReportItem)simpleContainer,currentPosition);
164  
-							
165  
-							if (PrintHelper.IsPageFull(pageBreakRect,base.SectionBounds))
166  
-							{
167  
-								base.BuildNewPage(mylist,section);
168  
-								
169  
-								currentPosition = BaseConverter.BaseConvert(mylist,headerContainer,
170  
-								                                            defaultLeftPos,
171  
-								                                            base.SectionBounds.ReportHeaderRectangle.Location);
172  
-
173  
-							}
174  
-							
175  
-							currentPosition = BaseConverter.BaseConvert(mylist,simpleContainer,defaultLeftPos,currentPosition);
176  
-							
177  
-							simpleContainer.Size = base.RestoreSize;
178  
-						}
179  
-						while (base.DataNavigator.MoveNext());
180  
-						//Allway's reset the DataNavigator
181  
-						base.DataNavigator.Reset();
182  
-						base.DataNavigator.MoveNext();
183  
-						SectionBounds.ReportFooterRectangle =  new Rectangle(SectionBounds.ReportFooterRectangle.Left,
184  
-						                                                     currentPosition.Y,
185  
-						                                                     SectionBounds.ReportFooterRectangle.Width,
186  
-						                                                     SectionBounds.ReportFooterRectangle.Height);
187  
-					}
188  
-				}
189  
-			}
190  
-			return mylist;
191  
-		}
192  
-	}
193  
-}

Git Notes

build

Build 4.0.0.6728 on reports successful

0 notes on commit 2903ee2

Please sign in to comment.
Something went wrong with that request. Please try again.