Hi folks, I finally found some time again for PoDoFo. I first wanted to look in the PdfTable crash reported by lap_junior on the mailing list.
Later I wanted to look into Craigs changes regarding pdf_long (which I really
appreciated!). Maybe I can be of some help in this issues later.
Well, first I fixed some casting issues - mainly changing "long long" to
pdf_uint64 - to make current trunk compile for me (patch for this changes is
attached). While libpodofo compiles now, I am not able to link any of our
testcases or examples. Please find the error log below.
Does compiling and linking for you? Is this a problem of my local setup or did
I miss some important change last week?
Sorry again for beeing so inactive - I had a busy week.
Best regards,
Dom
domi...@dom2duo:~/Desktop/Programming/podofo/podofo-build (38)>
_LANG=C VERBOSE=1 make
/usr/local/bin/cmake -H/home/dominik/Desktop/Programming/podofo/podofo
-B/home/dominik/Desktop/Programming/podofo/podofo-build --check-build-system
CMakeFiles/Makefile.cmake 0
/usr/local/bin/cmake -E
cmake_progress_start
/home/dominik/Desktop/Programming/podofo/podofo-build/CMakeFiles
/home/dominik/Desktop/Programming/podofo/podofo-build/CMakeFiles/progress.make
make -f CMakeFiles/Makefile2 all
make[1]: Entering directory
`/home/dominik/Desktop/Programming/podofo/podofo-build'
make -f src/CMakeFiles/podofo_static.dir/build.make
src/CMakeFiles/podofo_static.dir/depend
make[2]: Entering directory
`/home/dominik/Desktop/Programming/podofo/podofo-build'
cd /home/dominik/Desktop/Programming/podofo/podofo-build
&& /usr/local/bin/cmake -E cmake_depends "Unix
Makefiles" /home/dominik/Desktop/Programming/podofo/podofo
/home/dominik/Desktop/Programming/podofo/podofo/src
/home/dominik/Desktop/Programming/podofo/podofo-build
/home/dominik/Desktop/Programming/podofo/podofo-build/src
/home/dominik/Desktop/Programming/podofo/podofo-build/src/CMakeFiles/podofo_static.dir/DependInfo.cmake
--color=
make[2]: Leaving directory
`/home/dominik/Desktop/Programming/podofo/podofo-build'
make -f src/CMakeFiles/podofo_static.dir/build.make
src/CMakeFiles/podofo_static.dir/build
make[2]: Entering directory
`/home/dominik/Desktop/Programming/podofo/podofo-build'
make[2]: Nothing to be done for `src/CMakeFiles/podofo_static.dir/build'.
make[2]: Leaving directory
`/home/dominik/Desktop/Programming/podofo/podofo-build'
/usr/local/bin/cmake -E
cmake_progress_report
/home/dominik/Desktop/Programming/podofo/podofo-build/CMakeFiles
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
56 57 58 59 60 61 62 63 64
[ 64%] Built target podofo_static
make -f test/ContentParser/CMakeFiles/ContentParser.dir/build.make
test/ContentParser/CMakeFiles/ContentParser.dir/depend
make[2]: Entering directory
`/home/dominik/Desktop/Programming/podofo/podofo-build'
cd /home/dominik/Desktop/Programming/podofo/podofo-build
&& /usr/local/bin/cmake -E cmake_depends "Unix
Makefiles" /home/dominik/Desktop/Programming/podofo/podofo
/home/dominik/Desktop/Programming/podofo/podofo/test/ContentParser
/home/dominik/Desktop/Programming/podofo/podofo-build
/home/dominik/Desktop/Programming/podofo/podofo-build/test/ContentParser
/home/dominik/Desktop/Programming/podofo/podofo-build/test/ContentParser/CMakeFiles/ContentParser.dir/DependInfo.cmake
--color=
make[2]: Leaving directory
`/home/dominik/Desktop/Programming/podofo/podofo-build'
make -f test/ContentParser/CMakeFiles/ContentParser.dir/build.make
test/ContentParser/CMakeFiles/ContentParser.dir/build
make[2]: Entering directory
`/home/dominik/Desktop/Programming/podofo/podofo-build'
Linking CXX executable ContentParser
cd /home/dominik/Desktop/Programming/podofo/podofo-build/test/ContentParser
&& /usr/local/bin/cmake -E cmake_link_script
CMakeFiles/ContentParser.dir/link.txt --verbose=1
/usr/bin/c++ -g -fPIC CMakeFiles/ContentParser.dir/main.cpp.o -o
ContentParser -rdynamic
-L/home/dominik/Desktop/Programming/podofo/podofo-build/src
-L/home/dominik/Desktop/Programming/podofo/podofo-build/src/util -lpodofo
-lfontconfig -lz -lfreetype -ljpeg -ltiff -lpthread -lfontconfig -lz -lfreetype
-ljpeg -ltiff -lpthread
-Wl,-rpath,/home/dominik/Desktop/Programming/podofo/podofo-build/src:/home/dominik/Desktop/Programming/podofo/podofo-build/src/util
CMakeFiles/ContentParser.dir/main.cpp.o: In function
`parse_contents(PoDoFo::PdfContentsTokenizer*)':
/home/dominik/Desktop/Programming/podofo/podofo/test/ContentParser/main.cpp:19:
undefined reference to `PoDoFo::PdfVariant::PdfVariant()'
/home/dominik/Desktop/Programming/podofo/podofo/test/ContentParser/main.cpp:59:
undefined reference to `PoDoFo::PdfVariant::ToString(std::basic_string<char,
std::char_traits<char>, std::allocator<char> >&) const'
/home/dominik/Desktop/Programming/podofo/podofo/test/ContentParser/main.cpp:79:
undefined reference to `PoDoFo::PdfError::PdfError(PoDoFo::EPdfError const&,
char const*, int, char const*)'
/home/dominik/Desktop/Programming/podofo/podofo/test/ContentParser/main.cpp:79:
undefined reference to `PoDoFo::PdfError::~PdfError()'
/home/dominik/Desktop/Programming/podofo/podofo/test/ContentParser/main.cpp:79:
undefined reference to `typeinfo for PoDoFo::PdfError'
/home/dominik/Desktop/Programming/podofo/podofo/test/ContentParser/main.cpp:28:
undefined reference to
`PoDoFo::PdfContentsTokenizer::ReadNext(PoDoFo::EPdfContentsType&, char
const*&, PoDoFo::PdfVariant&)'
/home/dominik/Desktop/Programming/podofo/podofo/test/ContentParser/main.cpp:82:
undefined reference to `PoDoFo::PdfVariant::~PdfVariant()'
/home/dominik/Desktop/Programming/podofo/podofo/test/ContentParser/main.cpp:82:
undefined reference to `PoDoFo::PdfVariant::~PdfVariant()'
CMakeFiles/ContentParser.dir/main.cpp.o: In function
`parse_page(PoDoFo::PdfMemDocument*, PoDoFo::PdfPage*)':
/home/dominik/Desktop/Programming/podofo/podofo/test/ContentParser/main.cpp:87:
undefined reference to
`PoDoFo::PdfContentsTokenizer::PdfContentsTokenizer(PoDoFo::PdfCanvas*)'
CMakeFiles/ContentParser.dir/main.cpp.o: In function `main':
/home/dominik/Desktop/Programming/podofo/podofo/test/ContentParser/main.cpp:157:
undefined reference to `PoDoFo::PdfMemDocument::PdfMemDocument(char const*)'
/home/dominik/Desktop/Programming/podofo/podofo/test/ContentParser/main.cpp:158:
undefined reference to `PoDoFo::PdfDocument::GetPageCount() const'
/home/dominik/Desktop/Programming/podofo/podofo/test/ContentParser/main.cpp:164:
undefined reference to `PoDoFo::PdfDocument::GetPageCount() const'
/home/dominik/Desktop/Programming/podofo/podofo/test/ContentParser/main.cpp:168:
undefined reference to `PoDoFo::PdfDocument::GetPage(int) const'
/home/dominik/Desktop/Programming/podofo/podofo/test/ContentParser/main.cpp:169:
undefined reference to `PoDoFo::PdfError::PdfError(PoDoFo::EPdfError const&,
char const*, int, char const*)'
/home/dominik/Desktop/Programming/podofo/podofo/test/ContentParser/main.cpp:169:
undefined reference to `PoDoFo::PdfError::~PdfError()'
/home/dominik/Desktop/Programming/podofo/podofo/test/ContentParser/main.cpp:169:
undefined reference to `typeinfo for PoDoFo::PdfError'
/home/dominik/Desktop/Programming/podofo/podofo/test/ContentParser/main.cpp:174:
undefined reference to `PoDoFo::PdfMemDocument::~PdfMemDocument()'
/home/dominik/Desktop/Programming/podofo/podofo/test/ContentParser/main.cpp:174:
undefined reference to `PoDoFo::PdfMemDocument::~PdfMemDocument()'
/home/dominik/Desktop/Programming/podofo/podofo/test/ContentParser/main.cpp:178:
undefined reference to `PoDoFo::PdfError::PrintErrorMsg() const'
CMakeFiles/ContentParser.dir/main.cpp.o:(.gcc_except_table+0x234): undefined
reference to `typeinfo for PoDoFo::PdfError'
CMakeFiles/ContentParser.dir/main.cpp.o: In function
`PoDoFo::PdfVariant::GetReal() const':
/home/dominik/Desktop/Programming/podofo/podofo/src/PdfVariant.h:630:
undefined reference to `PoDoFo::PdfError::PdfError(PoDoFo::EPdfError const&,
char const*, int, char const*)'
/home/dominik/Desktop/Programming/podofo/podofo/src/PdfVariant.h:630:
undefined reference to `PoDoFo::PdfError::~PdfError()'
/home/dominik/Desktop/Programming/podofo/podofo/src/PdfVariant.h:630:
undefined reference to `typeinfo for PoDoFo::PdfError'
CMakeFiles/ContentParser.dir/main.cpp.o: In function
`PoDoFo::PdfVariant::GetRawData()':
/home/dominik/Desktop/Programming/podofo/podofo/src/PdfVariant.h:659:
undefined reference to `PoDoFo::PdfError::PdfError(PoDoFo::EPdfError const&,
char const*, int, char const*)'
/home/dominik/Desktop/Programming/podofo/podofo/src/PdfVariant.h:659:
undefined reference to `PoDoFo::PdfError::~PdfError()'
/home/dominik/Desktop/Programming/podofo/podofo/src/PdfVariant.h:659:
undefined reference to `typeinfo for PoDoFo::PdfError'
CMakeFiles/ContentParser.dir/main.cpp.o: In function
`PoDoFo::PdfRefCountedBuffer::DerefBuffer()':
/home/dominik/Desktop/Programming/podofo/podofo/src/PdfRefCountedBuffer.h:303:
undefined reference to `PoDoFo::PdfRefCountedBuffer::FreeBuffer()'
CMakeFiles/ContentParser.dir/main.cpp.o: In function `~PdfContentsTokenizer':
/home/dominik/Desktop/Programming/podofo/podofo/src/PdfContentsTokenizer.h:74:
undefined reference to `PoDoFo::PdfTokenizer::~PdfTokenizer()'
/home/dominik/Desktop/Programming/podofo/podofo/src/PdfContentsTokenizer.h:74:
undefined reference to `PoDoFo::PdfTokenizer::~PdfTokenizer()'
/home/dominik/Desktop/Programming/podofo/podofo/src/PdfContentsTokenizer.h:74:
undefined reference to `PoDoFo::PdfTokenizer::~PdfTokenizer()'
/home/dominik/Desktop/Programming/podofo/podofo/src/PdfContentsTokenizer.h:74:
undefined reference to `PoDoFo::PdfTokenizer::~PdfTokenizer()'
CMakeFiles/ContentParser.dir/main.cpp.o: In function `void
std::_Construct<PoDoFo::PdfVariant, PoDoFo::PdfVariant>(PoDoFo::PdfVariant*,
PoDoFo::PdfVariant const&)':
/usr/include/c++/4.2/bits/stl_construct.h:81: undefined reference to
`PoDoFo::PdfVariant::PdfVariant(PoDoFo::PdfVariant const&)'
CMakeFiles/ContentParser.dir/main.cpp.o: In function
`__gnu_cxx::new_allocator<PoDoFo::PdfVariant>::construct(PoDoFo::PdfVariant*,
PoDoFo::PdfVariant const&)':
/usr/include/c++/4.2/ext/new_allocator.h:107: undefined reference to
`PoDoFo::PdfVariant::PdfVariant(PoDoFo::PdfVariant const&)'
CMakeFiles/ContentParser.dir/main.cpp.o: In function
`std::deque<PoDoFo::PdfVariant, std::allocator<PoDoFo::PdfVariant>
>::_M_push_back_aux(PoDoFo::PdfVariant const&)':
/usr/include/c++/4.2/bits/deque.tcc:307: undefined reference to
`PoDoFo::PdfVariant::PdfVariant(PoDoFo::PdfVariant const&)'
/usr/include/c++/4.2/bits/deque.tcc:320: undefined reference to
`PoDoFo::PdfVariant::~PdfVariant()'
/usr/include/c++/4.2/bits/deque.tcc:320: undefined reference to
`PoDoFo::PdfVariant::~PdfVariant()'
CMakeFiles/ContentParser.dir/main.cpp.o:
(.rodata._ZTIN6PoDoFo20PdfContentsTokenizerE[typeinfo for
PoDoFo::PdfContentsTokenizer]+0x10): undefined reference to `typeinfo for
PoDoFo::PdfTokenizer'
collect2: ld returned 1 exit status
make[2]: *** [test/ContentParser/ContentParser] Error 1
make[2]: Leaving directory
`/home/dominik/Desktop/Programming/podofo/podofo-build'
make[1]: *** [test/ContentParser/CMakeFiles/ContentParser.dir/all] Error 2
make[1]: Leaving directory
`/home/dominik/Desktop/Programming/podofo/podofo-build'
make: *** [all] Error 2
--
**********************************************************************
Dominik Seichter - [email protected]
KRename - http://www.krename.net - Powerful batch renamer for KDE
KBarcode - http://www.kbarcode.net - Barcode and label printing
PoDoFo - http://podofo.sf.net - PDF generation and parsing library
SchafKopf - http://schafkopf.berlios.de - Schafkopf, a card game, for KDE
Alan - http://alan.sf.net - A Turing Machine in Java
**********************************************************************
Index: src/PdfObject.cpp
===================================================================
--- src/PdfObject.cpp (Revision 1091)
+++ src/PdfObject.cpp (Arbeitskopie)
@@ -70,7 +70,7 @@
InitPdfObject();
}
-PdfObject::PdfObject( long long l )
+PdfObject::PdfObject( pdf_int64 l )
: PdfVariant( l )
{
InitPdfObject();
Index: src/PdfCanvas.cpp
===================================================================
--- src/PdfCanvas.cpp (Revision 1091)
+++ src/PdfCanvas.cpp (Arbeitskopie)
@@ -69,31 +69,31 @@
// Build color-spaces for separation
PdfObject* csTintFunc = GetContents()->GetOwner()->CreateObject();
- csTintFunc->GetDictionary().AddKey( "BitsPerSample", 8LL );
+ csTintFunc->GetDictionary().AddKey( "BitsPerSample", static_cast<pdf_int64>(8LL) );
PdfArray decode;
- decode.push_back( 0LL );
- decode.push_back( 1LL );
- decode.push_back( 0LL );
- decode.push_back( 1LL );
- decode.push_back( 0LL );
- decode.push_back( 1LL );
- decode.push_back( 0LL );
- decode.push_back( 1LL );
+ decode.push_back( static_cast<pdf_int64>(0LL) );
+ decode.push_back( static_cast<pdf_int64>(1LL) );
+ decode.push_back( static_cast<pdf_int64>(0LL) );
+ decode.push_back( static_cast<pdf_int64>(1LL) );
+ decode.push_back( static_cast<pdf_int64>(0LL) );
+ decode.push_back( static_cast<pdf_int64>(1LL) );
+ decode.push_back( static_cast<pdf_int64>(0LL) );
+ decode.push_back( static_cast<pdf_int64>(1LL) );
csTintFunc->GetDictionary().AddKey( "Decode", decode );
PdfArray domain;
- domain.push_back( 0LL );
- domain.push_back( 1LL );
+ domain.push_back( static_cast<pdf_int64>(0LL) );
+ domain.push_back( static_cast<pdf_int64>(1LL) );
csTintFunc->GetDictionary().AddKey( "Domain", domain );
PdfArray encode;
- encode.push_back( 0LL );
- encode.push_back( 1LL );
+ encode.push_back( static_cast<pdf_int64>(0LL) );
+ encode.push_back( static_cast<pdf_int64>(1LL) );
csTintFunc->GetDictionary().AddKey( "Encode", encode );
csTintFunc->GetDictionary().AddKey( "Filter", PdfName( "FlateDecode" ) );
- csTintFunc->GetDictionary().AddKey( "FunctionType", PdfVariant( static_cast<long long>(ePdfFunctionType_Sampled) ) );
+ csTintFunc->GetDictionary().AddKey( "FunctionType", PdfVariant( static_cast<pdf_int64>(ePdfFunctionType_Sampled) ) );
char data[4*2];
data[0] =
@@ -109,18 +109,18 @@
csTintFunc->GetStream()->Set( &stream );
PdfArray range;
- range.push_back( 0LL );
- range.push_back( 1LL );
- range.push_back( 0LL );
- range.push_back( 1LL );
- range.push_back( 0LL );
- range.push_back( 1LL );
- range.push_back( 0LL );
- range.push_back( 1LL );
+ range.push_back( static_cast<pdf_int64>(0LL) );
+ range.push_back( static_cast<pdf_int64>(1LL) );
+ range.push_back( static_cast<pdf_int64>(0LL) );
+ range.push_back( static_cast<pdf_int64>(1LL) );
+ range.push_back( static_cast<pdf_int64>(0LL) );
+ range.push_back( static_cast<pdf_int64>(1LL) );
+ range.push_back( static_cast<pdf_int64>(0LL) );
+ range.push_back( static_cast<pdf_int64>(1LL) );
csTintFunc->GetDictionary().AddKey( "Range", range );
PdfArray size;
- size.push_back( 2LL );
+ size.push_back( static_cast<pdf_int64>(2LL) );
csTintFunc->GetDictionary().AddKey( "Size", size );
PdfArray csArr;
@@ -155,10 +155,10 @@
// Range for A,B, L is implicit 0..100
PdfArray rangeArr;
- rangeArr.push_back( -128LL );
- rangeArr.push_back( 127LL );
- rangeArr.push_back( -128LL );
- rangeArr.push_back( 127LL );
+ rangeArr.push_back( static_cast<pdf_int64>(-128LL) );
+ rangeArr.push_back( static_cast<pdf_int64>(127LL) );
+ rangeArr.push_back( static_cast<pdf_int64>(-128LL) );
+ rangeArr.push_back( static_cast<pdf_int64>(127LL) );
labDict.AddKey( PdfName("Range" ), rangeArr );
PdfArray labArr;
Index: src/PdfPagesTree.cpp
===================================================================
--- src/PdfPagesTree.cpp (Revision 1091)
+++ src/PdfPagesTree.cpp (Arbeitskopie)
@@ -35,12 +35,12 @@
m_cache( 0 )
{
GetObject()->GetDictionary().AddKey( "Kids", PdfArray() ); // kids->Reference()
- GetObject()->GetDictionary().AddKey( "Count", PdfObject( 0LL ) );
+ GetObject()->GetDictionary().AddKey( "Count", PdfObject( static_cast<pdf_int64>(0LL) ) );
}
PdfPagesTree::PdfPagesTree( PdfObject* pPagesRoot )
: PdfElement( "Pages", pPagesRoot ),
- m_cache( static_cast<int>(pPagesRoot->GetDictionary().GetKeyAsLong( "Count", 0LL )) )
+ m_cache( static_cast<int>(pPagesRoot->GetDictionary().GetKeyAsLong( "Count", static_cast<pdf_int64>(0LL) )) )
{
if( !m_pObject )
{
@@ -545,7 +545,7 @@
if( 0 != nDelta )
{
cnt += nDelta ;
- pPageObj->GetDictionary().AddKey( "Count", PdfVariant( static_cast<long long>(cnt) ) );
+ pPageObj->GetDictionary().AddKey( "Count", PdfVariant( static_cast<pdf_int64>(cnt) ) );
}
return cnt ;
@@ -553,7 +553,7 @@
bool PdfPagesTree::IsEmptyPageNode( PdfObject* pPageNode )
{
- long lCount = static_cast<long>(pPageNode->GetDictionary().GetKeyAsLong( PdfName("Count"), 0LL ));
+ long lCount = static_cast<long>(pPageNode->GetDictionary().GetKeyAsLong( PdfName("Count"), static_cast<pdf_int64>(0LL) ));
bool bKidsEmpty = true;
if( pPageNode->GetDictionary().HasKey( PdfName("Kids") ) )
Index: src/PdfImage.cpp
===================================================================
--- src/PdfImage.cpp (Revision 1091)
+++ src/PdfImage.cpp (Arbeitskopie)
@@ -105,7 +105,7 @@
// Create a colorspace object
PdfObject* pIccObject = this->GetObject()->GetOwner()->CreateObject();
pIccObject->GetDictionary().AddKey( PdfName("Alternate"), PdfName( ColorspaceToName( eAlternateColorSpace ) ) );
- pIccObject->GetDictionary().AddKey( PdfName("N"), static_cast<long long>(lColorComponents) );
+ pIccObject->GetDictionary().AddKey( PdfName("N"), static_cast<pdf_int64>(lColorComponents) );
pIccObject->GetStream()->Set( pStream );
// Add the colorspace to our image
@@ -131,9 +131,9 @@
m_rRect.SetWidth( nWidth );
m_rRect.SetHeight( nHeight );
- m_pObject->GetDictionary().AddKey( "Width", PdfVariant( static_cast<long long>(nWidth) ) );
- m_pObject->GetDictionary().AddKey( "Height", PdfVariant( static_cast<long long>(nHeight) ) );
- m_pObject->GetDictionary().AddKey( "BitsPerComponent", PdfVariant( static_cast<long long>(nBitsPerComponent) ) );
+ m_pObject->GetDictionary().AddKey( "Width", PdfVariant( static_cast<pdf_int64>(nWidth) ) );
+ m_pObject->GetDictionary().AddKey( "Height", PdfVariant( static_cast<pdf_int64>(nHeight) ) );
+ m_pObject->GetDictionary().AddKey( "BitsPerComponent", PdfVariant( static_cast<pdf_int64>(nBitsPerComponent) ) );
PdfVariant var;
m_rRect.ToVariant( var );
@@ -148,9 +148,9 @@
m_rRect.SetWidth( nWidth );
m_rRect.SetHeight( nHeight );
- m_pObject->GetDictionary().AddKey( "Width", PdfVariant( static_cast<long long>(nWidth) ) );
- m_pObject->GetDictionary().AddKey( "Height", PdfVariant( static_cast<long long>(nHeight) ) );
- m_pObject->GetDictionary().AddKey( "BitsPerComponent", PdfVariant( static_cast<long long>(nBitsPerComponent) ) );
+ m_pObject->GetDictionary().AddKey( "Width", PdfVariant( static_cast<pdf_int64>(nWidth) ) );
+ m_pObject->GetDictionary().AddKey( "Height", PdfVariant( static_cast<pdf_int64>(nHeight) ) );
+ m_pObject->GetDictionary().AddKey( "BitsPerComponent", PdfVariant( static_cast<pdf_int64>(nBitsPerComponent) ) );
PdfVariant var;
m_rRect.ToVariant( var );
@@ -394,8 +394,8 @@
if( bitsPixel == 1 )
{
PdfArray decode;
- decode.insert( decode.end(), PdfVariant( static_cast<long long>(0) ) );
- decode.insert( decode.end(), PdfVariant( static_cast<long long>(1) ) );
+ decode.insert( decode.end(), PdfVariant( static_cast<pdf_int64>(0) ) );
+ decode.insert( decode.end(), PdfVariant( static_cast<pdf_int64>(1) ) );
m_pObject->GetDictionary().AddKey( PdfName("Decode"), decode );
m_pObject->GetDictionary().AddKey( PdfName("ImageMask"), PdfVariant( true ) );
m_pObject->GetDictionary().RemoveKey( PdfName("ColorSpace") );
@@ -415,8 +415,8 @@
if( bitsPixel == 1 )
{
PdfArray decode;
- decode.insert( decode.end(), PdfVariant( static_cast<long long>(1) ) );
- decode.insert( decode.end(), PdfVariant( static_cast<long long>(0) ) );
+ decode.insert( decode.end(), PdfVariant( static_cast<pdf_int64>(1) ) );
+ decode.insert( decode.end(), PdfVariant( static_cast<pdf_int64>(0) ) );
m_pObject->GetDictionary().AddKey( PdfName("Decode"), decode );
m_pObject->GetDictionary().AddKey( PdfName("ImageMask"), PdfVariant( true ) );
m_pObject->GetDictionary().RemoveKey( PdfName("ColorSpace") );
Index: src/PdfEncrypt.cpp
===================================================================
--- src/PdfEncrypt.cpp (Revision 1091)
+++ src/PdfEncrypt.cpp (Arbeitskopie)
@@ -1146,14 +1146,14 @@
{
rDictionary.AddKey( PdfName("Filter"), PdfName("Standard") );
- rDictionary.AddKey( PdfName("V"), 4LL );
- rDictionary.AddKey( PdfName("R"), 4LL );
- rDictionary.AddKey( PdfName("Length"), 128LL );
+ rDictionary.AddKey( PdfName("V"), static_cast<pdf_int64>(4LL) );
+ rDictionary.AddKey( PdfName("R"), static_cast<pdf_int64>(4LL) );
+ rDictionary.AddKey( PdfName("Length"), static_cast<pdf_int64>(128LL) );
PdfDictionary cf;
PdfDictionary stdCf;
stdCf.AddKey( PdfName("CFM"), PdfName("AESV2") );
- stdCf.AddKey( PdfName("Length"), 16LL );
+ stdCf.AddKey( PdfName("Length"), static_cast<pdf_int64>(16LL) );
stdCf.AddKey( PdfName("AuthEvent"), PdfName("DocOpen") );
cf.AddKey( PdfName("StdCF"), stdCf );
@@ -1163,7 +1163,7 @@
rDictionary.AddKey( PdfName("O"), PdfString( reinterpret_cast<const char*>(this->GetOValue()), 32, true ) );
rDictionary.AddKey( PdfName("U"), PdfString( reinterpret_cast<const char*>(this->GetUValue()), 32, true ) );
- rDictionary.AddKey( PdfName("P"), PdfVariant( static_cast<long long>(this->GetPValue()) ) );
+ rDictionary.AddKey( PdfName("P"), PdfVariant( static_cast<pdf_int64>(this->GetPValue()) ) );
}
@@ -1265,13 +1265,13 @@
switch( m_eAlgorithm )
{
case ePdfEncryptAlgorithm_RC4V1:
- rDictionary.AddKey( PdfName("V"), 1LL );
- rDictionary.AddKey( PdfName("R"), 2LL );
+ rDictionary.AddKey( PdfName("V"), static_cast<pdf_int64>(1LL) );
+ rDictionary.AddKey( PdfName("R"), static_cast<pdf_int64>(2LL) );
break;
case ePdfEncryptAlgorithm_RC4V2:
- rDictionary.AddKey( PdfName("V"), 2LL );
- rDictionary.AddKey( PdfName("R"), 3LL );
- rDictionary.AddKey( PdfName("Length"), PdfVariant( static_cast<long long>(m_eKeyLength) ) );
+ rDictionary.AddKey( PdfName("V"), static_cast<pdf_int64>(2LL) );
+ rDictionary.AddKey( PdfName("R"), static_cast<pdf_int64>(3LL) );
+ rDictionary.AddKey( PdfName("Length"), PdfVariant( static_cast<pdf_int64>(m_eKeyLength) ) );
break;
default:
case ePdfEncryptAlgorithm_AESV2:
@@ -1280,7 +1280,7 @@
rDictionary.AddKey( PdfName("O"), PdfString( reinterpret_cast<const char*>(this->GetOValue()), 32, true ) );
rDictionary.AddKey( PdfName("U"), PdfString( reinterpret_cast<const char*>(this->GetUValue()), 32, true ) );
- rDictionary.AddKey( PdfName("P"), PdfVariant( static_cast<long long>(this->GetPValue()) ) );
+ rDictionary.AddKey( PdfName("P"), PdfVariant( static_cast<pdf_int64>(this->GetPValue()) ) );
}
Index: src/PdfFunction.cpp
===================================================================
--- src/PdfFunction.cpp (Revision 1091)
+++ src/PdfFunction.cpp (Arbeitskopie)
@@ -45,7 +45,7 @@
void PdfFunction::Init( EPdfFunctionType eType, const PdfArray & rDomain )
{
- m_pObject->GetDictionary().AddKey( PdfName("FunctionType"), static_cast<long long>(eType) );
+ m_pObject->GetDictionary().AddKey( PdfName("FunctionType"), static_cast<pdf_int64>(eType) );
m_pObject->GetDictionary().AddKey( PdfName("Domain"), rDomain );
}
@@ -67,13 +67,13 @@
{
PdfArray Size;
for( unsigned i = 0; i < rDomain.GetSize() / 2; i++ )
- Size.push_back( PdfObject( (long long) (rDomain.GetSize()) / 2L ) );
+ Size.push_back( PdfObject( static_cast<pdf_int64>(rDomain.GetSize() / 2L )) );
this->GetObject()->GetDictionary().AddKey( PdfName("Domain"), rDomain );
this->GetObject()->GetDictionary().AddKey( PdfName("Range"), rRange );
this->GetObject()->GetDictionary().AddKey( PdfName("Size"), Size );
- this->GetObject()->GetDictionary().AddKey( PdfName("Order"), PdfObject( 1LL ) );
- this->GetObject()->GetDictionary().AddKey( PdfName("BitsPerSample"), PdfObject( 8LL ) );
+ this->GetObject()->GetDictionary().AddKey( PdfName("Order"), PdfObject( static_cast<pdf_int64>(1LL) ) );
+ this->GetObject()->GetDictionary().AddKey( PdfName("BitsPerSample"), PdfObject( static_cast<pdf_int64>(8LL) ) );
this->GetObject()->GetStream()->BeginAppend();
PdfFunction::Sample::const_iterator it = rlstSamples.begin();
Index: src/PdfShadingPattern.cpp
===================================================================
--- src/PdfShadingPattern.cpp (Revision 1091)
+++ src/PdfShadingPattern.cpp (Arbeitskopie)
@@ -161,9 +161,9 @@
// keys common to all shading directories
PdfDictionary shading;
- shading.AddKey( PdfName("ShadingType"), static_cast<long long>(eShadingType) );
+ shading.AddKey( PdfName("ShadingType"), static_cast<pdf_int64>(eShadingType) );
- m_pObject->GetDictionary().AddKey( PdfName("PatternType"), 2LL ); // Shading pattern
+ m_pObject->GetDictionary().AddKey( PdfName("PatternType"), static_cast<pdf_int64>(2LL) ); // Shading pattern
m_pObject->GetDictionary().AddKey( PdfName("Shading"), shading );
}
Index: src/PdfField.cpp
===================================================================
--- src/PdfField.cpp (Revision 1091)
+++ src/PdfField.cpp (Arbeitskopie)
@@ -167,7 +167,7 @@
void PdfField::SetFieldFlag( long lValue, bool bSet )
{
- long long lCur = 0;
+ pdf_int64 lCur = 0;
if( m_pObject->GetDictionary().HasKey( PdfName("Ff") ) )
lCur = m_pObject->GetDictionary().GetKey( PdfName("Ff") )->GetNumber();
@@ -704,7 +704,7 @@
void PdfTextField::SetMaxLen( pdf_long nMaxLen )
{
- m_pObject->GetDictionary().AddKey( PdfName("MaxLen"), static_cast<long long>(nMaxLen) );
+ m_pObject->GetDictionary().AddKey( PdfName("MaxLen"), static_cast<pdf_int64>(nMaxLen) );
}
pdf_long PdfTextField::GetMaxLen() const
Index: src/PdfFileSpec.cpp
===================================================================
--- src/PdfFileSpec.cpp (Revision 1091)
+++ src/PdfFileSpec.cpp (Arbeitskopie)
@@ -100,7 +100,7 @@
// Add additional information about the embedded file to the stream
PdfDictionary params;
- params.AddKey( "Size", static_cast<long long>(stream.GetFileLength()) );
+ params.AddKey( "Size", static_cast<pdf_int64>(stream.GetFileLength()) );
// TODO: CreationDate and ModDate
pStream->GetDictionary().AddKey("Params", params );
}
Index: src/PdfExtGState.cpp
===================================================================
--- src/PdfExtGState.cpp (Revision 1091)
+++ src/PdfExtGState.cpp (Arbeitskopie)
@@ -101,7 +101,7 @@
void PdfExtGState::SetNonZeroOverprint( bool enable )
{
- m_pObject->GetDictionary().AddKey( "OPM", PdfVariant( (enable ? 1LL : 0LL) ) );
+ m_pObject->GetDictionary().AddKey( "OPM", PdfVariant( static_cast<pdf_int64>(enable ? 1LL : 0LL) ) );
}
void PdfExtGState::SetRenderingIntent( char* intent )
@@ -112,7 +112,7 @@
void PdfExtGState::SetFrequency( double frequency )
{
PdfDictionary halftoneDict;
- halftoneDict.AddKey( "HalftoneType", PdfVariant( 1LL ) );
+ halftoneDict.AddKey( "HalftoneType", PdfVariant( static_cast<pdf_int64>(1LL) ) );
halftoneDict.AddKey( "Frequency", PdfVariant( frequency ) );
halftoneDict.AddKey( "Angle", PdfVariant( 45.0 ) );
halftoneDict.AddKey( "SpotFunction", PdfName( "SimpleDot" ) );
Index: src/PdfMemStream.cpp
===================================================================
--- src/PdfMemStream.cpp (Revision 1091)
+++ src/PdfMemStream.cpp (Arbeitskopie)
@@ -91,7 +91,7 @@
}
if( m_pParent )
- m_pParent->GetDictionary().AddKey( PdfName::KeyLength, PdfVariant(static_cast<long long>(m_lLength) ) );
+ m_pParent->GetDictionary().AddKey( PdfName::KeyLength, PdfVariant(static_cast<pdf_int64>(m_lLength) ) );
}
void PdfMemStream::GetCopy( char** pBuffer, pdf_long* lLen ) const
@@ -241,7 +241,7 @@
m_lLength = rhs.GetLength();
if( m_pParent )
- m_pParent->GetDictionary().AddKey( PdfName::KeyLength, PdfVariant( static_cast<long long>(m_lLength) ) );
+ m_pParent->GetDictionary().AddKey( PdfName::KeyLength, PdfVariant( static_cast<pdf_int64>(m_lLength) ) );
return *this;
}
Index: src/PdfFileStream.cpp
===================================================================
--- src/PdfFileStream.cpp (Revision 1091)
+++ src/PdfFileStream.cpp (Arbeitskopie)
@@ -31,7 +31,7 @@
: PdfStream( pParent ), m_pDevice( pDevice ), m_pStream( NULL ), m_pDeviceStream( NULL ),
m_pEncryptStream( NULL ), m_lLenInitial( 0 ), m_lLength( 0 ), m_pCurEncrypt( NULL )
{
- m_pLength = pParent->GetOwner()->CreateObject( PdfVariant(0LL) );
+ m_pLength = pParent->GetOwner()->CreateObject( PdfVariant(static_cast<pdf_int64>(0LL)) );
m_pParent->GetDictionary().AddKey( PdfName::KeyLength, m_pLength->Reference() );
}
Index: src/PdfDifferenceEncoding.cpp
===================================================================
--- src/PdfDifferenceEncoding.cpp (Revision 1091)
+++ src/PdfDifferenceEncoding.cpp (Arbeitskopie)
@@ -2268,7 +2268,7 @@
void PdfEncodingDifference::ToArray( PdfArray & rArray )
{
- long long nLastCode = -2;
+ pdf_int64 nLastCode = -2;
rArray.Clear();
Index: src/PdfFontTrueType.cpp
===================================================================
--- src/PdfFontTrueType.cpp (Revision 1091)
+++ src/PdfFontTrueType.cpp (Arbeitskopie)
@@ -77,7 +77,7 @@
lSize = stream.GetFileLength();
}
- pContents->GetDictionary().AddKey( "Length1", PdfVariant( static_cast<long long>(lSize) ) );
+ pContents->GetDictionary().AddKey( "Length1", PdfVariant( static_cast<pdf_int64>(lSize) ) );
}
Index: src/PdfTokenizer.cpp
===================================================================
--- src/PdfTokenizer.cpp (Revision 1091)
+++ src/PdfTokenizer.cpp (Arbeitskopie)
@@ -398,9 +398,9 @@
else if( eDataType == ePdfDataType_Number )
{
#ifdef _WIN64
- rVariant = PdfVariant( static_cast<long long>(_strtoui64( pszToken, NULL, 10 )) );
+ rVariant = PdfVariant( static_cast<pdf_int64>(_strtoui64( pszToken, NULL, 10 )) );
#else
- rVariant = PdfVariant( static_cast<long long>(strtol( pszToken, NULL, 10 )) );
+ rVariant = PdfVariant( static_cast<pdf_int64>(strtol( pszToken, NULL, 10 )) );
#endif
// read another two tokens to see if it is a reference
// we cannot be sure that there is another token
Index: src/PdfXObject.cpp
===================================================================
--- src/PdfXObject.cpp (Revision 1091)
+++ src/PdfXObject.cpp (Arbeitskopie)
@@ -68,18 +68,18 @@
m_pObject->GetDictionary().AddKey( "BBox", var );
PdfArray matrix;
- matrix.push_back( PdfVariant( 1LL ) );
- matrix.push_back( PdfVariant( 0LL ) );
- matrix.push_back( PdfVariant( 0LL ) );
- matrix.push_back( PdfVariant( 1LL ) );
+ matrix.push_back( PdfVariant( static_cast<pdf_int64>(1LL) ) );
+ matrix.push_back( PdfVariant( static_cast<pdf_int64>(0LL) ) );
+ matrix.push_back( PdfVariant( static_cast<pdf_int64>(0LL) ) );
+ matrix.push_back( PdfVariant( static_cast<pdf_int64>(1LL) ) );
if( m_rRect.GetLeft() != 0 )
matrix.push_back( PdfVariant( m_rRect.GetLeft() * (-1.0) ) );
else
- matrix.push_back( PdfVariant( 0LL ) );
+ matrix.push_back( PdfVariant( static_cast<pdf_int64>(0LL) ) );
if( m_rRect.GetBottom() != 0 )
matrix.push_back( PdfVariant( m_rRect.GetBottom() * (-1.0) ) );
else
- matrix.push_back( PdfVariant( 0LL ) );
+ matrix.push_back( PdfVariant( static_cast<pdf_int64>(0LL) ) );
m_pObject->GetDictionary().AddKey( "Matrix", matrix );
}
@@ -109,18 +109,18 @@
if( s_matrix.empty() )
{
// This matrix is the same for all PdfXObjects so cache it
- s_matrix.push_back( PdfVariant( 1LL ) );
- s_matrix.push_back( PdfVariant( 0LL ) );
- s_matrix.push_back( PdfVariant( 0LL ) );
- s_matrix.push_back( PdfVariant( 1LL ) );
- s_matrix.push_back( PdfVariant( 0LL ) );
- s_matrix.push_back( PdfVariant( 0LL ) );
+ s_matrix.push_back( PdfVariant( static_cast<pdf_int64>(1LL) ) );
+ s_matrix.push_back( PdfVariant( static_cast<pdf_int64>(0LL) ) );
+ s_matrix.push_back( PdfVariant( static_cast<pdf_int64>(0LL) ) );
+ s_matrix.push_back( PdfVariant( static_cast<pdf_int64>(1LL) ) );
+ s_matrix.push_back( PdfVariant( static_cast<pdf_int64>(0LL) ) );
+ s_matrix.push_back( PdfVariant( static_cast<pdf_int64>(0LL) ) );
}
rRect.ToVariant( var );
m_pObject->GetDictionary().AddKey( "BBox", var );
m_pObject->GetDictionary().AddKey( PdfName::KeySubtype, PdfName("Form") );
- m_pObject->GetDictionary().AddKey( "FormType", PdfVariant( 1LL ) ); // only 1 is only defined in the specification.
+ m_pObject->GetDictionary().AddKey( "FormType", PdfVariant( static_cast<pdf_int64>(1LL) ) ); // only 1 is only defined in the specification.
m_pObject->GetDictionary().AddKey( "Matrix", s_matrix );
// The PDF specification suggests that we send all available PDF Procedure sets
Index: src/PdfOutlines.cpp
===================================================================
--- src/PdfOutlines.cpp (Revision 1091)
+++ src/PdfOutlines.cpp (Arbeitskopie)
@@ -273,7 +273,7 @@
void PdfOutlineItem::SetTextFormat( EPdfOutlineFormat eFormat )
{
- m_pObject->GetDictionary().AddKey( "F", static_cast<long long>(eFormat) );
+ m_pObject->GetDictionary().AddKey( "F", static_cast<pdf_int64>(eFormat) );
}
EPdfOutlineFormat PdfOutlineItem::GetTextFormat() const
Index: src/PdfObject.h
===================================================================
--- src/PdfObject.h (Revision 1091)
+++ src/PdfObject.h (Arbeitskopie)
@@ -88,11 +88,11 @@
PdfObject( bool b );
/** Construct a PdfObject with object and generation number -1
- * and a long as value.
+ * and a pdf_int64 as value.
*
* \param l the long value of this PdfObject
*/
- PdfObject( long long l );
+ PdfObject( pdf_int64 l );
/** Construct a PdfObject with object and generation number -1
* and a double as value.
Index: src/PdfXRefStream.cpp
===================================================================
--- src/PdfXRefStream.cpp (Revision 1091)
+++ src/PdfXRefStream.cpp (Arbeitskopie)
@@ -81,8 +81,8 @@
{
PdfError::DebugMessage("Writing XRef section: %u %u\n", nFirst, nCount );
- m_indeces.push_back( static_cast<long long>(nFirst) );
- m_indeces.push_back( static_cast<long long>(nCount) );
+ m_indeces.push_back( static_cast<pdf_int64>(nFirst) );
+ m_indeces.push_back( static_cast<pdf_int64>(nCount) );
}
void PdfXRefStream::WriteXRefEntry( PdfOutputDevice*, size_t lOffset, unsigned long lGeneration,
@@ -114,9 +114,9 @@
{
PdfArray w;
- w.push_back( static_cast<long long>(1) );
- w.push_back( static_cast<long long>(sizeof(STREAM_OFFSET_TYPE)) );
- w.push_back( static_cast<long long>(1) );
+ w.push_back( static_cast<pdf_int64>(1) );
+ w.push_back( static_cast<pdf_int64>(sizeof(STREAM_OFFSET_TYPE)) );
+ w.push_back( static_cast<pdf_int64>(1) );
// Add our self to the XRef table
this->WriteXRefEntry( pDevice, pDevice->Tell(), 0, 'n' );
Index: src/PdfFontSimple.cpp
===================================================================
--- src/PdfFontSimple.cpp (Revision 1091)
+++ src/PdfFontSimple.cpp (Arbeitskopie)
@@ -64,8 +64,8 @@
m_pObject->GetDictionary().AddKey( PdfName::KeySubtype, rsSubType );
m_pObject->GetDictionary().AddKey("BaseFont", this->GetBaseFont() );
- m_pObject->GetDictionary().AddKey("FirstChar", PdfVariant( static_cast<long long>(m_pEncoding->GetFirstChar()) ) );
- m_pObject->GetDictionary().AddKey("LastChar", PdfVariant( static_cast<long long>(m_pEncoding->GetLastChar()) ) );
+ m_pObject->GetDictionary().AddKey("FirstChar", PdfVariant( static_cast<pdf_int64>(m_pEncoding->GetFirstChar()) ) );
+ m_pObject->GetDictionary().AddKey("LastChar", PdfVariant( static_cast<pdf_int64>(m_pEncoding->GetLastChar()) ) );
m_pEncoding->AddToDictionary( m_pObject->GetDictionary() ); // Add encoding key
m_pObject->GetDictionary().AddKey("Widths", pWidth->Reference() );
@@ -75,13 +75,13 @@
pDescriptor->GetDictionary().AddKey( "FontName", this->GetBaseFont() );
//pDescriptor->GetDictionary().AddKey( "FontWeight", (long)m_pMetrics->Weight() );
- pDescriptor->GetDictionary().AddKey( PdfName::KeyFlags, PdfVariant( 32LL ) ); // TODO: 0 ????
+ pDescriptor->GetDictionary().AddKey( PdfName::KeyFlags, PdfVariant( static_cast<pdf_int64>(32LL) ) ); // TODO: 0 ????
pDescriptor->GetDictionary().AddKey( "FontBBox", array );
- pDescriptor->GetDictionary().AddKey( "ItalicAngle", PdfVariant( static_cast<long long>(m_pMetrics->GetItalicAngle()) ) );
+ pDescriptor->GetDictionary().AddKey( "ItalicAngle", PdfVariant( static_cast<pdf_int64>(m_pMetrics->GetItalicAngle()) ) );
pDescriptor->GetDictionary().AddKey( "Ascent", m_pMetrics->GetPdfAscent() );
pDescriptor->GetDictionary().AddKey( "Descent", m_pMetrics->GetPdfDescent() );
pDescriptor->GetDictionary().AddKey( "CapHeight", m_pMetrics->GetPdfAscent() ); // m_pMetrics->CapHeight() );
- pDescriptor->GetDictionary().AddKey( "StemV", PdfVariant( 1LL ) ); // m_pMetrics->StemV() );
+ pDescriptor->GetDictionary().AddKey( "StemV", PdfVariant( static_cast<pdf_int64>(1LL) ) ); // m_pMetrics->StemV() );
// Peter Petrov 24 September 2008
m_pDescriptor = pDescriptor;
Index: src/PdfFontType1.cpp
===================================================================
--- src/PdfFontType1.cpp (Revision 1091)
+++ src/PdfFontType1.cpp (Arbeitskopie)
@@ -61,10 +61,10 @@
void PdfFontType1::EmbedFontFile( PdfObject* pDescriptor )
{
- pdf_long lSize = 0;
- pdf_long lLength1 = 0L;
- pdf_long lLength2 = 0L;
- pdf_long lLength3 = 0L;
+ pdf_long lSize = 0;
+ pdf_int64 lLength1 = 0L;
+ pdf_int64 lLength2 = 0L;
+ pdf_int64 lLength3 = 0L;
PdfObject* pContents;
const char* pBuffer;
char* pAllocated = NULL;
@@ -150,9 +150,9 @@
if( pAllocated )
free( pAllocated );
- pContents->GetDictionary().AddKey( "Length1", PdfVariant( static_cast<long long>(lLength1) ) );
- pContents->GetDictionary().AddKey( "Length2", PdfVariant( static_cast<long long>(lLength2) ) );
- pContents->GetDictionary().AddKey( "Length3", PdfVariant( static_cast<long long>(lLength3) ) );
+ pContents->GetDictionary().AddKey( "Length1", PdfVariant( lLength1 ) );
+ pContents->GetDictionary().AddKey( "Length2", PdfVariant( lLength2 ) );
+ pContents->GetDictionary().AddKey( "Length3", PdfVariant( lLength3 ) );
return;
default:
@@ -183,9 +183,9 @@
if( pAllocated )
free( pAllocated );
- pContents->GetDictionary().AddKey( "Length1", PdfVariant( static_cast<long long>(lLength1) ) );
- pContents->GetDictionary().AddKey( "Length2", PdfVariant( static_cast<long long>(lLength2) ) );
- pContents->GetDictionary().AddKey( "Length3", PdfVariant( static_cast<long long>(lLength3) ) );
+ pContents->GetDictionary().AddKey( "Length1", PdfVariant( lLength1 ) );
+ pContents->GetDictionary().AddKey( "Length2", PdfVariant( lLength2 ) );
+ pContents->GetDictionary().AddKey( "Length3", PdfVariant( lLength3 ) );
}
pdf_long PdfFontType1::FindInBuffer( const char* pszNeedle, const char* pszHaystack, pdf_long lLen ) const
Index: src/PdfWriter.cpp
===================================================================
--- src/PdfWriter.cpp (Revision 1091)
+++ src/PdfWriter.cpp (Arbeitskopie)
@@ -349,7 +349,7 @@
pLinearize->GetDictionary().AddKey( "H", array ); // Hint stream offset and length as PdfArray
pLinearize->GetDictionary().AddKey( "E", place_holder ); // Offset of end of first page
pLinearize->GetDictionary().AddKey( "N", // Number of pages in the document
- static_cast<long long>(m_pPagesTree->GetTotalNumberOfPages()) );
+ static_cast<pdf_int64>(m_pPagesTree->GetTotalNumberOfPages()) );
pLinearize->GetDictionary().AddKey( "O", place_holder ); // Object number of the first page
pLinearize->GetDictionary().AddKey( "T", place_holder ); // Offset of first entry in main cross reference table
@@ -453,7 +453,7 @@
// this will be overwritten later with valid data
PdfVariant place_holder( PdfData( LINEARIZATION_PADDING ) );
- pTrailer->GetDictionary().AddKey( PdfName::KeySize, static_cast<long long>(lSize) );
+ pTrailer->GetDictionary().AddKey( PdfName::KeySize, static_cast<pdf_int64>(lSize) );
if( !bOnlySizeKey )
{
Index: src/PdfFontCID.cpp
===================================================================
--- src/PdfFontCID.cpp (Revision 1091)
+++ src/PdfFontCID.cpp (Arbeitskopie)
@@ -103,7 +103,7 @@
// Setting the CIDSystemInfo paras:
pCIDSystemInfo->GetDictionary().AddKey( "Registry", PdfString("Adobe") );
pCIDSystemInfo->GetDictionary().AddKey( "Ordering", PdfString("Identity") );
- pCIDSystemInfo->GetDictionary().AddKey( "Supplement", PdfVariant(0LL) );
+ pCIDSystemInfo->GetDictionary().AddKey( "Supplement", PdfVariant(static_cast<pdf_int64>(0LL)) );
// Setting the FontDescriptor paras:
@@ -111,13 +111,13 @@
m_pMetrics->GetBoundingBox( array );
pDescriptor->GetDictionary().AddKey( "FontName", this->GetBaseFont() );
- pDescriptor->GetDictionary().AddKey( PdfName::KeyFlags, PdfVariant( 32LL ) ); // TODO: 0 ????
+ pDescriptor->GetDictionary().AddKey( PdfName::KeyFlags, PdfVariant( static_cast<pdf_int64>(32LL) ) ); // TODO: 0 ????
pDescriptor->GetDictionary().AddKey( "FontBBox", array );
- pDescriptor->GetDictionary().AddKey( "ItalicAngle", PdfVariant( static_cast<long long>(m_pMetrics->GetItalicAngle()) ) );
+ pDescriptor->GetDictionary().AddKey( "ItalicAngle", PdfVariant( static_cast<pdf_int64>(m_pMetrics->GetItalicAngle()) ) );
pDescriptor->GetDictionary().AddKey( "Ascent", m_pMetrics->GetPdfAscent() );
pDescriptor->GetDictionary().AddKey( "Descent", m_pMetrics->GetPdfDescent() );
pDescriptor->GetDictionary().AddKey( "CapHeight", m_pMetrics->GetPdfAscent() ); // m_pMetrics->CapHeight() );
- pDescriptor->GetDictionary().AddKey( "StemV", PdfVariant( 1LL ) ); // m_pMetrics->StemV() );
+ pDescriptor->GetDictionary().AddKey( "StemV", PdfVariant( static_cast<pdf_int64>(1LL) ) ); // m_pMetrics->StemV() );
// Peter Petrov 24 September 2008
m_pDescriptor = pDescriptor;
@@ -171,7 +171,7 @@
lSize = stream.GetFileLength();
}
- pContents->GetDictionary().AddKey( "Length1", PdfVariant( static_cast<long long>(lSize) ) );
+ pContents->GetDictionary().AddKey( "Length1", PdfVariant( static_cast<pdf_int64>(lSize) ) );
}
void PdfFontCID::CreateWidth( PdfObject* pFontDict ) const
@@ -220,9 +220,9 @@
array.reserve( nMax - nMin + 1 );
i = nMin;
- double dCurWidth = pdWidth[i];
- long long lCurIndex = i++;
- long long lCurLength = 1L;
+ double dCurWidth = pdWidth[i];
+ pdf_int64 lCurIndex = i++;
+ pdf_int64 lCurLength = 1L;
for( ;i<=nMax;i++ )
{
@@ -233,7 +233,7 @@
if( lCurLength > 1 )
{
array.push_back( lCurIndex );
- long long temp = lCurIndex + lCurLength - 1;
+ pdf_int64 temp = lCurIndex + lCurLength - 1;
array.push_back( temp );
array.push_back( dCurWidth );
}
Index: src/PdfStream.cpp
===================================================================
--- src/PdfStream.cpp (Revision 1091)
+++ src/PdfStream.cpp (Arbeitskopie)
@@ -96,7 +96,7 @@
if( m_pParent )
m_pParent->GetDictionary().AddKey( PdfName::KeyLength,
- PdfVariant(static_cast<long long>(rhs.GetInternalBufferSize())));
+ PdfVariant(static_cast<pdf_int64>(rhs.GetInternalBufferSize())));
return (*this);
}
signature.asc
Description: This is a digitally signed message part.
------------------------------------------------------------------------------
_______________________________________________ Podofo-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/podofo-users
