mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-27 19:10:20 +01:00
GH #416: PDF::Page::createTextAnnotation bad comparison
This commit is contained in:
@@ -131,7 +131,7 @@ void Page::setRotation(int angle)
|
||||
const Destination& Page::createDestination(const std::string& name)
|
||||
{
|
||||
DestinationContainer::iterator it = _destinations.find(name);
|
||||
if (_destinations.end() == it)
|
||||
if (_destinations.end() != it)
|
||||
throw InvalidArgumentException("Destination already exists.");
|
||||
|
||||
Destination dest(_pPDF, HPDF_Page_CreateDestination(_page), name);
|
||||
@@ -150,7 +150,7 @@ const TextAnnotation& Page::createTextAnnotation(const std::string& name,
|
||||
const Encoder& encoder)
|
||||
{
|
||||
TextAnnotationContainer::iterator it = _textAnnotations.find(name);
|
||||
if (_textAnnotations.end() == it)
|
||||
if (_textAnnotations.end() != it)
|
||||
throw InvalidArgumentException("Annotation already exists.");
|
||||
|
||||
TextAnnotation ann(_pPDF,
|
||||
@@ -171,7 +171,7 @@ const LinkAnnotation& Page::createLinkAnnotation(const std::string& name,
|
||||
const Destination& dest)
|
||||
{
|
||||
LinkAnnotationContainer::iterator it = _linkAnnotations.find(name);
|
||||
if (_linkAnnotations.end() == it)
|
||||
if (_linkAnnotations.end() != it)
|
||||
throw InvalidArgumentException("Annotation already exists.");
|
||||
|
||||
LinkAnnotation ann(_pPDF,
|
||||
@@ -191,7 +191,7 @@ const LinkAnnotation& Page::createURILinkAnnotation(const std::string& name,
|
||||
const std::string& uri)
|
||||
{
|
||||
LinkAnnotationContainer::iterator it = _linkAnnotations.find(name);
|
||||
if (_linkAnnotations.end() == it)
|
||||
if (_linkAnnotations.end() != it)
|
||||
throw InvalidArgumentException("Annotation already exists.");
|
||||
|
||||
LinkAnnotation ann(_pPDF,
|
||||
|
||||
Reference in New Issue
Block a user