The Fastest Reports in the Wild West — and a Handful of Bugs…

What was checked?

Tpyos and whatnot

public override string ToString() {
if (_value == null) return null;
return this.String;
}
Variant varObj = new Variant();
varObj.ToString().Contains(character);
/// <summary>
/// Returns <see cref="String"/> property unless the value
on the right
/// is null. If the value on the right is null, returns "".
/// </summary>
/// <returns></returns>
public FastString()
{
Init(initCapacity);
}
private void Init(int iniCapacity)
{
sb = new StringBuilder(iniCapacity);
//chars = new char[iniCapacity];
//capacity = iniCapacity;
}
public StringBuilder StringBuilder
{
get { return sb; }
}
public FastString();
public FastString(int iniCapacity);
public FastString(string initValue);
FastString fs = new FastString(256);
Console.WriteLine(fs.StringBuilder.Capacity);
public FastString(int iniCapacity)
{
Init(initCapacity);
}
private const int initCapacity = 32;
static void Main(string[] args)
{
TextObject textObj = new TextObject();
textObj.ParagraphFormat = null;
Console.WriteLine("Ok");
}
public ParagraphFormat ParagraphFormat
{
get { return paragraphFormat; }
set { ParagraphFormat = value; }
}
public override Run Split(float availableWidth, out Run secondPart)
{
....
if (r.Width > availableWidth)
{
List<CharWithIndex> list = new List<CharWithIndex>();
for (int i = point; i < size; i++)
list.Add(chars[i]);
secondPart = new RunText(renderer, word, style, list,
left + r.Width, charIndex);
list.Clear();
for (int i = 0; i < point; i++)
list.Add(chars[i]);
r = new RunText(renderer, word, style, list, left, charIndex);
return r;
}
else
{
List<CharWithIndex> list = new List<CharWithIndex>();
for (int i = point; i < size; i++)
list.Add(chars[i]);
secondPart = new RunText(renderer, word, style, list,
left + r.Width, charIndex);
list.Clear();
for (int i = 0; i < point; i++)
list.Add(chars[i]);
r = new RunText(renderer, word, style, list, left, charIndex);
return r;
}
....
}
public static string GetExpression(FindTextArgs args, 
bool skipStrings)
{
while (args.StartIndex < args.Text.Length)
{
if (!FindMatchingBrackets(args, skipStrings))
break;
return args.FoundText;
}
return "";
}
private int FindBarItem(string c)
{
for (int i = 0; i < tabelle_cb.Length; i++)
{
if (c == tabelle_cb[i].c)
return i;
}
return -1;
}
internal override string GetPattern()
{
string result = tabelle_cb[FindBarItem("A")].data + "0";
foreach (char c in text)
{
int idx = FindBarItem(c.ToString());
result += tabelle_cb[idx].data + "0";
}

result += tabelle_cb[FindBarItem("B")].data;
return result;
}
protected override void Finish()
{
....
if (saveStreams)
{
FinishSaveStreams();
}
else
{
if (singlePage)
{
if (saveStreams)
{
int fileIndex = GeneratedFiles.IndexOf(singlePageFileName);
DoPageEnd(generatedStreams[fileIndex]);
}
else { .... }
....
}
....
}
....
}

Conclusion

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store