Rename all the "FIXME"s to "TODO"s.

For better visibility on Visual Studio.
This commit is contained in:
2019-12-06 11:13:28 +01:00
parent c651a22209
commit 3108d03a75
4 changed files with 57 additions and 33 deletions

View File

@@ -38,26 +38,50 @@ namespace VAR.PdfTools
private static void ApplyFilterToStream(PdfStream stream, string filter) private static void ApplyFilterToStream(PdfStream stream, string filter)
{ {
if (filter == "FlateDecode") if(filter == "ASCIIHexDecode")
{
// TODO: Implement ASCIIHexDecode Filter
}
else if (filter == "ASCII85Decode" || filter == "A85")
{
// TODO: Implement ASCII85Decode Filter
}
else if (filter == "LZWDecode")
{
// TODO: Implement LZWDecode Filter
}
else if (filter == "FlateDecode")
{ {
byte[] decodedStreamData = PdfFilters.FlateDecode.Decode(stream.Data); byte[] decodedStreamData = PdfFilters.FlateDecode.Decode(stream.Data);
stream.Data = decodedStreamData; stream.Data = decodedStreamData;
} }
else if (filter == "ASCII85Decode" || filter == "A85") else if (filter == "RunLengthDecode")
{ {
// FIXME: Implement this filter // TODO: Implement RunLengthDecode Filter
} }
else if (filter == "CCITTFaxDecode") else if (filter == "CCITTFaxDecode")
{ {
// FIXME: Implement this filter // TODO: Implement CCITTFaxDecode Filter
}
else if (filter == "JBIG2Decode")
{
// TODO: Implement JBIG2Decode Filter
} }
else if (filter == "DCTDecode") else if (filter == "DCTDecode")
{ {
// FIXME: Implement this filter // TODO: Implement DCTDecode Filter
}
else if (filter == "JPXDecode")
{
// TODO: Implement JPXDecode Filter
}
else if (filter == "Crypt")
{
// TODO: Implement Crypt Filter
} }
else else
{ {
// FIXME: Implement the rest of filters // TODO: Handle unknown filters
} }
} }

View File

@@ -79,7 +79,7 @@ namespace VAR.PdfTools
private void ParseSizes() private void ParseSizes()
{ {
double glyphSpaceToTextSpace = 1000.0; // FIXME: SubType:Type3 Uses a FontMatrix that may not correspond to 1/1000th double glyphSpaceToTextSpace = 1000.0; // TODO: PdfFont.ParseSizes: SubType:Type3 Uses a FontMatrix that may not correspond to 1/1000th
_widths = new Dictionary<char, double>(); _widths = new Dictionary<char, double>();
char firstChar = (char)_baseData.GetParamAsInt("FirstChar"); char firstChar = (char)_baseData.GetParamAsInt("FirstChar");
char lastChar = (char)_baseData.GetParamAsInt("LastChar"); char lastChar = (char)_baseData.GetParamAsInt("LastChar");
@@ -177,7 +177,7 @@ namespace VAR.PdfTools
{ {
if (_toUnicode == null) if (_toUnicode == null)
{ {
// FIXME: use standar tables // TODO: PdfFont.ToUnicode: use standar tables
return new string(character, 1); return new string(character, 1);
} }

View File

@@ -852,7 +852,7 @@ namespace VAR.PdfTools
string token = ParseToken(); string token = ParseToken();
if (token == "startxref") if (token == "startxref")
{ {
// FIXME: Ignoring startxref for now // TODO: PdfParser: Ignoring startxref for now
SkipEndOfLine(); SkipEndOfLine();
SkipToEndOfLine(); SkipToEndOfLine();
SkipEndOfLine(); SkipEndOfLine();
@@ -863,7 +863,7 @@ namespace VAR.PdfTools
} }
if (token == "xref") if (token == "xref")
{ {
// FIXME: Ignoring xref for now // TODO: PdfParser: Ignoring xref for now
SkipToEndOfLine(); SkipToEndOfLine();
SkipEndOfLine(); SkipEndOfLine();
do do
@@ -891,7 +891,7 @@ namespace VAR.PdfTools
} }
if (token == "trailer") if (token == "trailer")
{ {
// FIXME: Ignoring trailer for now // TODO: PdfParser: Ignoring trailer for now
SkipEndOfLine(); SkipEndOfLine();
ParseElement(); ParseElement();
SkipWhitespace(); SkipWhitespace();

View File

@@ -370,7 +370,7 @@ namespace VAR.PdfTools
} }
else if (action.Token == "Tz") else if (action.Token == "Tz")
{ {
// FIXME: Horizontal Scale // TODO: PdfTextExtractor: Horizontal Scale
} }
else if (action.Token == "Tf") else if (action.Token == "Tf")
{ {
@@ -385,11 +385,11 @@ namespace VAR.PdfTools
} }
else if (action.Token == "Tr") else if (action.Token == "Tr")
{ {
// FIXME: Rendering mode // TODO: PdfTextExtractor: Rendering mode
} }
else if (action.Token == "Ts") else if (action.Token == "Ts")
{ {
// FIXME: Text rise // TODO: PdfTextExtractor: Text rise
} }
else if (action.Token == "Td") else if (action.Token == "Td")
{ {
@@ -444,82 +444,82 @@ namespace VAR.PdfTools
} }
else if (action.Token == "re") else if (action.Token == "re")
{ {
// FIXME: Interpret this // TODO: PdfTextExtractor: Interpret this
} }
else if (action.Token == "f") else if (action.Token == "f")
{ {
// FIXME: Interpret this // TODO: PdfTextExtractor: Interpret this
} }
else if (action.Token == "g") else if (action.Token == "g")
{ {
// FIXME: Interpret this // TODO: PdfTextExtractor: Interpret this
} }
else if (action.Token == "rg") else if (action.Token == "rg")
{ {
// FIXME: Interpret this // TODO: PdfTextExtractor: Interpret this
} }
else if (action.Token == "BI") else if (action.Token == "BI")
{ {
// FIXME: Interpret this // TODO: PdfTextExtractor: Interpret this
} }
else if (action.Token == "ID") else if (action.Token == "ID")
{ {
// FIXME: Interpret this // TODO: PdfTextExtractor: Interpret this
} }
else if (action.Token == "EI") else if (action.Token == "EI")
{ {
// FIXME: Interpret this // TODO: PdfTextExtractor: Interpret this
} }
else if (action.Token == "W") else if (action.Token == "W")
{ {
// FIXME: Interpret this // TODO: PdfTextExtractor: Interpret this
} }
else if (action.Token == "n") else if (action.Token == "n")
{ {
// FIXME: Interpret this // TODO: PdfTextExtractor: Interpret this
} }
else if (action.Token == "Do") else if (action.Token == "Do")
{ {
// FIXME: Interpret this // TODO: PdfTextExtractor: Interpret this
} }
else if (action.Token == "m") else if (action.Token == "m")
{ {
// FIXME: Interpret this "moveto: Begin new subpath" // TODO: PdfTextExtractor: Interpret this "moveto: Begin new subpath"
} }
else if (action.Token == "l") else if (action.Token == "l")
{ {
// FIXME: Interpret this "lineto: Append straight line segment to path" // TODO: PdfTextExtractor: Interpret this "lineto: Append straight line segment to path"
lineCount++; lineCount++;
} }
else if (action.Token == "h") else if (action.Token == "h")
{ {
// FIXME: Interpret this "closepath: Close subpath" // TODO: PdfTextExtractor: Interpret this "closepath: Close subpath"
pathCount++; pathCount++;
} }
else if (action.Token == "W") else if (action.Token == "W")
{ {
// FIXME: Interpret this "clip: Set clipping path using nonzero winding number rule" // TODO: PdfTextExtractor: Interpret this "clip: Set clipping path using nonzero winding number rule"
} }
else if (action.Token == "W*") else if (action.Token == "W*")
{ {
// FIXME: Interpret this "eoclip: Set clipping path using even-odd rule" // TODO: PdfTextExtractor: Interpret this "eoclip: Set clipping path using even-odd rule"
} }
else if (action.Token == "w") else if (action.Token == "w")
{ {
// FIXME: Interpret this "setlinewidth: Set line width" // TODO: PdfTextExtractor: Interpret this "setlinewidth: Set line width"
} }
else if (action.Token == "G") else if (action.Token == "G")
{ {
// FIXME: Interpret this "setgray: Set gray level for stroking operations" // TODO: PdfTextExtractor: Interpret this "setgray: Set gray level for stroking operations"
} }
else if (action.Token == "S") else if (action.Token == "S")
{ {
// FIXME: Interpret this "stroke: Stroke path" // TODO: PdfTextExtractor: Interpret this "stroke: Stroke path"
strokeCount++; strokeCount++;
} }
else if (action.Token == "M") else if (action.Token == "M")
{ {
// FIXME: Interpret this "setmiterlimit: Set miter limit" // TODO: PdfTextExtractor: Interpret this "setmiterlimit: Set miter limit"
} }
else else
{ {