Change the poppler test from 0.60 to 0.58

because the relevant code changes are related to 0.58

Signed-off-by: Ray Vine <ray-v@inbox.lv>
(cherry picked from commit 594387b4f3)
r14.0.x
Ray Vine 7 years ago committed by Slávek Banko
parent 7849cd4016
commit 8063c4fe47
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

@ -1,7 +1,7 @@
#cmakedefine VERSION "@VERSION@" #cmakedefine VERSION "@VERSION@"
// poppler-tqt // poppler-tqt
#cmakedefine HAVE_POPPLER_060 #cmakedefine HAVE_POPPLER_058
#cmakedefine HAVE_POPPLER_030 #cmakedefine HAVE_POPPLER_030
#cmakedefine HAVE_POPPLER_020 #cmakedefine HAVE_POPPLER_020
#cmakedefine HAVE_POPPLER_016 #cmakedefine HAVE_POPPLER_016

@ -24,13 +24,13 @@ check_cxx_source_compiles("
HAVE_POPPLER_030 ) HAVE_POPPLER_030 )
tde_restore( CMAKE_REQUIRED_INCLUDES CMAKE_REQUIRED_LIBRARIES ) tde_restore( CMAKE_REQUIRED_INCLUDES CMAKE_REQUIRED_LIBRARIES )
if( NOT DEFINED HAVE_POPPLER_060 ) if( NOT DEFINED HAVE_POPPLER_058 )
message( STATUS "Performing Test HAVE_POPPLER_060" ) message( STATUS "Performing Test HAVE_POPPLER_058" )
if( NOT POPPLER_VERSION VERSION_LESS "0.60" ) if( NOT POPPLER_VERSION VERSION_LESS "0.58" )
set( HAVE_POPPLER_060 1 CACHE INTERNAL "" FORCE ) set( HAVE_POPPLER_058 1 CACHE INTERNAL "" FORCE )
message( STATUS "Performing Test HAVE_POPPLER_060 - Success" ) message( STATUS "Performing Test HAVE_POPPLER_058 - Success" )
else( ) else( )
set( HAVE_POPPLER_060 "" CACHE INTERNAL "" FORCE ) set( HAVE_POPPLER_058 "" CACHE INTERNAL "" FORCE )
message( STATUS "Performing Test HAVE_POPPLER_060 - Failed" ) message( STATUS "Performing Test HAVE_POPPLER_058 - Failed" )
endif( ) endif( )
endif( ) endif( )

@ -153,7 +153,7 @@ TQString Document::getInfo( const TQString & type ) const
if ( data->locked ) if ( data->locked )
return NULL; return NULL;
# if defined(HAVE_POPPLER_060) # if defined(HAVE_POPPLER_058)
info = data->doc.getDocInfo(); info = data->doc.getDocInfo();
# else # else
data->doc.getDocInfo( &info ); data->doc.getDocInfo( &info );
@ -170,7 +170,7 @@ TQString Document::getInfo( const TQString & type ) const
Dict *infoDict = info.getDict(); Dict *infoDict = info.getDict();
if ( if (
# if defined(HAVE_POPPLER_060) # if defined(HAVE_POPPLER_058)
infoDict->lookup( (char*)type.latin1() ).isString() infoDict->lookup( (char*)type.latin1() ).isString()
# else # else
infoDict->lookup( (char*)type.latin1(), &obj )->isString() infoDict->lookup( (char*)type.latin1(), &obj )->isString()
@ -202,13 +202,13 @@ TQString Document::getInfo( const TQString & type ) const
} }
result += unicodeToTQString( &u, 1 ); result += unicodeToTQString( &u, 1 );
} }
# if !defined(HAVE_POPPLER_060) # if !defined(HAVE_POPPLER_058)
obj.free(); obj.free();
info.free(); info.free();
# endif # endif
return result; return result;
} }
# if !defined(HAVE_POPPLER_060) # if !defined(HAVE_POPPLER_058)
obj.free(); obj.free();
info.free(); info.free();
# endif # endif
@ -223,13 +223,13 @@ TQDateTime Document::getDate( const TQString & type ) const
return TQDateTime(); return TQDateTime();
Object info; Object info;
# if defined(HAVE_POPPLER_060) # if defined(HAVE_POPPLER_058)
info = data->doc.getDocInfo(); info = data->doc.getDocInfo();
# else # else
data->doc.getDocInfo( &info ); data->doc.getDocInfo( &info );
# endif # endif
if ( !info.isDict() ) { if ( !info.isDict() ) {
# if !defined(HAVE_POPPLER_060) # if !defined(HAVE_POPPLER_058)
info.free(); info.free();
# endif # endif
return TQDateTime(); return TQDateTime();
@ -242,7 +242,7 @@ TQDateTime Document::getDate( const TQString & type ) const
TQString result; TQString result;
if ( if (
# if defined(HAVE_POPPLER_060) # if defined(HAVE_POPPLER_058)
infoDict->lookup( (char*)type.latin1() ).isString() infoDict->lookup( (char*)type.latin1() ).isString()
# else # else
infoDict->lookup( (char*)type.latin1(), &obj )->isString() infoDict->lookup( (char*)type.latin1(), &obj )->isString()
@ -256,7 +256,7 @@ TQDateTime Document::getDate( const TQString & type ) const
TQDate d( year, mon, day ); //CHECK: it was mon-1, Jan->0 (??) TQDate d( year, mon, day ); //CHECK: it was mon-1, Jan->0 (??)
TQTime t( hour, min, sec ); TQTime t( hour, min, sec );
if ( d.isValid() && t.isValid() ) { if ( d.isValid() && t.isValid() ) {
# if !defined(HAVE_POPPLER_060) # if !defined(HAVE_POPPLER_058)
obj.free(); obj.free();
info.free(); info.free();
# endif # endif
@ -264,7 +264,7 @@ TQDateTime Document::getDate( const TQString & type ) const
} }
} }
} }
# if !defined(HAVE_POPPLER_060) # if !defined(HAVE_POPPLER_058)
obj.free(); obj.free();
info.free(); info.free();
# endif # endif
@ -347,7 +347,7 @@ bool Document::print(const TQString &fileName, TQValueList<int> pageList, double
bool Document::print(const TQString &file, TQValueList<int> pageList, double hDPI, double vDPI, int rotate, int paperWidth, int paperHeight) bool Document::print(const TQString &file, TQValueList<int> pageList, double hDPI, double vDPI, int rotate, int paperWidth, int paperHeight)
{ {
#if defined(HAVE_POPPLER_060) || defined(HAVE_POPPLER_030) #if defined(HAVE_POPPLER_058) || defined(HAVE_POPPLER_030)
std::vector<int> pages; std::vector<int> pages;
TQValueList<int>::iterator it; TQValueList<int>::iterator it;
for (it = pageList.begin(); it != pageList.end(); ++it ) { for (it = pageList.begin(); it != pageList.end(); ++it ) {

@ -129,7 +129,7 @@ TQString Page::getText(const Rectangle &r) const
TQString result; TQString result;
::Page *p; ::Page *p;
#if defined(HAVE_POPPLER_060) || defined(HAVE_POPPLER_030) || defined(HAVE_POPPLER_020) #if defined(HAVE_POPPLER_058) || defined(HAVE_POPPLER_030) || defined(HAVE_POPPLER_020)
output_dev = new TextOutputDev(0, gFalse, 0, gFalse, gFalse); output_dev = new TextOutputDev(0, gFalse, 0, gFalse, gFalse);
#else #else
output_dev = new TextOutputDev(0, gFalse, gFalse, gFalse); output_dev = new TextOutputDev(0, gFalse, gFalse, gFalse);
@ -164,7 +164,7 @@ TQValueList<TextBox*> Page::textList() const
TQValueList<TextBox*> output_list; TQValueList<TextBox*> output_list;
#if defined(HAVE_POPPLER_060) || defined(HAVE_POPPLER_030) || defined(HAVE_POPPLER_020) #if defined(HAVE_POPPLER_058) || defined(HAVE_POPPLER_030) || defined(HAVE_POPPLER_020)
output_dev = new TextOutputDev(0, gFalse, 0, gFalse, gFalse); output_dev = new TextOutputDev(0, gFalse, 0, gFalse, gFalse);
#else #else
output_dev = new TextOutputDev(0, gFalse, gFalse, gFalse); output_dev = new TextOutputDev(0, gFalse, gFalse, gFalse);
@ -205,14 +205,14 @@ PageTransition *Page::getTransition() const
{ {
Object o; Object o;
PageTransitionParams params; PageTransitionParams params;
# if defined(HAVE_POPPLER_060) # if defined(HAVE_POPPLER_058)
o = data->doc->data->doc.getCatalog()->getPage(data->index + 1)->getTrans(); o = data->doc->data->doc.getCatalog()->getPage(data->index + 1)->getTrans();
# else # else
data->doc->data->doc.getCatalog()->getPage(data->index + 1)->getTrans(&o); data->doc->data->doc.getCatalog()->getPage(data->index + 1)->getTrans(&o);
# endif # endif
params.dictObj = &o; params.dictObj = &o;
data->transition = new PageTransition(params); data->transition = new PageTransition(params);
# if !defined(HAVE_POPPLER_060) # if !defined(HAVE_POPPLER_058)
o.free(); o.free();
# endif # endif
} }

Loading…
Cancel
Save