Remove trailing whitespace (#3668)

This commit is contained in:
John Vandenberg
2022-07-07 17:18:20 +08:00
committed by GitHub
parent 0af9524e16
commit 0e6e16645c
1330 changed files with 23570 additions and 23571 deletions

View File

@@ -30,7 +30,7 @@ namespace PDF {
Document::Document(const std::string fileName,
Poco::UInt32 pageCount,
Page::Size pageSize,
Page::Orientation orientation):
Page::Orientation orientation):
_pdf(HPDF_New(HPDF_Error_Handler, 0)),
_fileName(fileName),
_pRawData(0),
@@ -42,7 +42,7 @@ Document::Document(const std::string fileName,
Document::Document(Poco::UInt32 pageCount,
Page::Size pageSize,
Page::Orientation orientation):
Page::Orientation orientation):
_pdf(HPDF_New(HPDF_Error_Handler, 0)),
_pRawData(0),
_size(0)
@@ -142,7 +142,7 @@ const Page& Document::getCurrentPage()
const Font& Document::loadFont(const std::string& name, const std::string& encoding)
{
Font font(&_pdf, HPDF_GetFont(_pdf, name.c_str(), encoding.empty() ? 0 : encoding.c_str()));
std::pair<FontContainer::iterator, bool> ret =
std::pair<FontContainer::iterator, bool> ret =
_fonts.insert(FontContainer::value_type(name, font));
if (ret.second) return ret.first->second;
@@ -176,9 +176,9 @@ std::string Document::loadTTFont(const std::string& fileName, bool embed, int in
}
else if (index >= 0)
{
return HPDF_LoadTTFontFromFile2(_pdf,
fileName.c_str(),
static_cast<HPDF_UINT>(index),
return HPDF_LoadTTFontFromFile2(_pdf,
fileName.c_str(),
static_cast<HPDF_UINT>(index),
embed ? HPDF_TRUE : HPDF_FALSE);
}
else
@@ -206,7 +206,7 @@ const Image& Document::loadPNGImageImpl(const std::string& fileName, bool doLoad
if (it.second) return it.first->second;
else throw IllegalStateException("Could not insert image.");
}
else
else
throw NotFoundException("File not found: " + fileName);
}
@@ -223,7 +223,7 @@ const Image& Document::loadJPEGImage(const std::string& fileName)
if (it.second) return it.first->second;
else throw IllegalStateException("Could not insert image.");
}
else
else
throw NotFoundException("File not found: " + fileName);
}
@@ -245,7 +245,7 @@ const Encoder& Document::loadEncoder(const std::string& name)
if (_encoders.end() == it) return it->second;
Encoder enc(&_pdf, HPDF_GetEncoder(_pdf, name.c_str()), name);
std::pair<EncoderContainer::iterator, bool> ret =
std::pair<EncoderContainer::iterator, bool> ret =
_encoders.insert(EncoderContainer::value_type(name, enc));
if (ret.second) return ret.first->second;
@@ -266,7 +266,7 @@ const Encoder& Document::getCurrentEncoder()
if (ret.second) return ret.first->second;
}
return it->second;
}
@@ -318,7 +318,7 @@ void Document::setInfo(Info info, const std::string& value)
{
if (INFO_CREATION_DATE == info || INFO_MOD_DATE == info)
throw InvalidArgumentException("Can not set document date.");
HPDF_SetInfoAttr(_pdf, static_cast<HPDF_InfoType>(info), value.c_str());
}