Author: jghali Date: Sat Mar 10 13:31:59 2018 New Revision: 22428 URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=22428 Log: #15175: Adding a "Link annotation" with no contents generates a "Empty text frame" error in preflight verifier
Modified: trunk/Scribus/scribus/documentchecker.cpp Modified: trunk/Scribus/scribus/documentchecker.cpp URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22428&path=/trunk/Scribus/scribus/documentchecker.cpp ============================================================================== --- trunk/Scribus/scribus/documentchecker.cpp (original) +++ trunk/Scribus/scribus/documentchecker.cpp Sat Mar 10 13:31:59 2018 @@ -368,9 +368,13 @@ if ( currItem->frameOverflows() && (checkerSettings.checkOverflow) && (!((currItem->isAnnotation()) && ((currItem->annotation().Type() == Annotation::Combobox) || (currItem->annotation().Type() == Annotation::Listbox))))) itemError.insert(TextOverflow, 0); - if (checkerSettings.checkEmptyTextFrames && (currItem->itemText.length()==0 || currItem->frameUnderflows())) - itemError.insert(EmptyTextFrame, 0); - + if (checkerSettings.checkEmptyTextFrames && (currItem->itemText.length() == 0 || currItem->frameUnderflows())) + { + bool isLinkAnnotation = (currItem->isAnnotation() && (currItem->annotation().Type() == Annotation::Link)); + if (!isLinkAnnotation) + itemError.insert(EmptyTextFrame, 0); + } + if (currItem->isAnnotation()) { ScFace::FontFormat fformat = currItem->itemText.defaultStyle().charStyle().font().format(); @@ -614,7 +618,11 @@ itemError.insert(TextOverflow, 0); if (checkerSettings.checkEmptyTextFrames && (currItem->itemText.length()==0 || currItem->frameUnderflows())) - itemError.insert(EmptyTextFrame, 0); + { + bool isLinkAnnotation = (currItem->isAnnotation() && (currItem->annotation().Type() == Annotation::Link)); + if (!isLinkAnnotation) + itemError.insert(EmptyTextFrame, 0); + } if (currItem->isAnnotation()) { _______________________________________________ scribus-commit mailing list scribus-commit@lists.scribus.net http://lists.scribus.net/mailman/listinfo/scribus-commit