Skip to content

Commit

Permalink
Merge pull request #105 from MurakamiShinyu/master
Browse files Browse the repository at this point in the history
Fix "#ifndef PDFHUMMUS_NO_PNG" scopes
  • Loading branch information
galkahana committed Sep 12, 2017
2 parents 4c2b633 + 8f67fcd commit cc35d8b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion PDFWriter/DocumentContext.cpp
Expand Up @@ -2973,8 +2973,8 @@ EStatusCode DocumentContext::WriteFormForImage(
{
status = eFailure;
}
}
#endif
}
return status;
}

Expand Down
3 changes: 2 additions & 1 deletion PDFWriter/PDFWriter.cpp
Expand Up @@ -263,6 +263,7 @@ PDFFormXObject* PDFWriter::CreateFormXObjectFromTIFFStream(IByteReaderWithPositi

#endif

#ifndef PDFHUMMUS_NO_PNG
PDFFormXObject* PDFWriter::CreateFormXObjectFromPNGFile(const std::string& inPNGFilePath) {
return CreateFormXObjectFromPNGFile(inPNGFilePath, mObjectsContext.GetInDirectObjectsRegistry().AllocateNewObjectID());
}
Expand All @@ -285,7 +286,7 @@ PDFFormXObject* PDFWriter::CreateFormXObjectFromPNGStream(IByteReaderWithPositio
return mDocumentContext.CreateFormXObjectFromPNGStream(inPNGStream, inFormXObjectId);
}


#endif

PDFImageXObject* PDFWriter::CreateImageXObjectFromJPGFile(const std::string& inJPGFilePath,ObjectIDType inImageXObjectID)
{
Expand Down
5 changes: 5 additions & 0 deletions PDFWriterTestPlayground/PNGImageTest.cpp
Expand Up @@ -18,6 +18,9 @@
*/

#ifndef PDFHUMMUS_NO_PNG

#include "PNGImageTest.h"
#include "TestsRunner.h"
#include "PDFWriter.h"
Expand Down Expand Up @@ -138,3 +141,5 @@ EStatusCode PNGImageTest::Run(const TestConfiguration& inTestConfiguration)
}

ADD_CATEGORIZED_TEST(PNGImageTest,"PDF Images")

#endif

0 comments on commit cc35d8b

Please sign in to comment.