EPdfFilter PdfFilterFactory::FilterNameToType( const PdfName & name, bool bSupportShortNames ) { int i = 0; while( aszFilters[i] ) { if( name == aszFilters[i] ) return static_cast<EPdfFilter>(i); ++i; } if( bSupportShortNames ) { i = 0; while( aszShortFilters[i] ) { if( name == aszShortFilters[i] ) return static_cast<EPdfFilter>(i); ++i; } } PODOFO_RAISE_ERROR_INFO( ePdfError_UnsupportedFilter, name.GetName().c_str() ); }
void NameTest::TestFromEscape( const char* pszName1, const char* pszName2 ) { PdfName name = PdfName::FromEscaped( pszName1, strlen( pszName1 ) ); CPPUNIT_ASSERT_EQUAL( name.GetName() == pszName2, true ); }