summaryrefslogtreecommitdiff
path: root/sdext/source/pdfimport
diff options
context:
space:
mode:
Diffstat (limited to 'sdext/source/pdfimport')
-rw-r--r--sdext/source/pdfimport/config/description.xml2
-rw-r--r--sdext/source/pdfimport/misc/pwdinteract.cxx7
-rw-r--r--sdext/source/pdfimport/odf/odfemitter.cxx1
-rw-r--r--sdext/source/pdfimport/pdfparse/pdfparse.cxx30
-rw-r--r--sdext/source/pdfimport/sax/emitcontext.cxx31
-rw-r--r--sdext/source/pdfimport/services.cxx1
-rwxr-xr-xsdext/source/pdfimport/test/makefile.mk7
-rwxr-xr-xsdext/source/pdfimport/test/tests.cxx2
-rw-r--r--sdext/source/pdfimport/tree/pdfiprocessor.cxx4
9 files changed, 38 insertions, 47 deletions
diff --git a/sdext/source/pdfimport/config/description.xml b/sdext/source/pdfimport/config/description.xml
index 9feff443b421..08e2f505653a 100644
--- a/sdext/source/pdfimport/config/description.xml
+++ b/sdext/source/pdfimport/config/description.xml
@@ -16,7 +16,7 @@
</simple-license>
</registration>
- <version value="1.0" />
+ <version value="1.0.2" />
<platform value="UPDATED_SUPPORTED_PLATFORM" />
diff --git a/sdext/source/pdfimport/misc/pwdinteract.cxx b/sdext/source/pdfimport/misc/pwdinteract.cxx
index 1545bec51f3d..eb194b36c75b 100644
--- a/sdext/source/pdfimport/misc/pwdinteract.cxx
+++ b/sdext/source/pdfimport/misc/pwdinteract.cxx
@@ -42,7 +42,6 @@
#include <cppuhelper/exc_hlp.hxx>
#include <cppuhelper/compbase2.hxx>
#include <cppuhelper/basemutex.hxx>
-#include <comphelper/anytostring.hxx>
using namespace com::sun::star;
@@ -150,12 +149,6 @@ bool getPassword( const uno::Reference< task::XInteractionHandler >& xHandler,
}
catch( uno::Exception& )
{
-#if 0
- OSL_ENSURE( false,
- rtl::OUStringToOString(
- comphelper::anyToString( cppu::getCaughtException() ),
- RTL_TEXTENCODING_UTF8 ).getStr() );
-#endif
}
OSL_TRACE( "request %s selected\n", pRequest->isSelected() ? "was" : "was not" );
diff --git a/sdext/source/pdfimport/odf/odfemitter.cxx b/sdext/source/pdfimport/odf/odfemitter.cxx
index 12750db201b4..283e0f9500df 100644
--- a/sdext/source/pdfimport/odf/odfemitter.cxx
+++ b/sdext/source/pdfimport/odf/odfemitter.cxx
@@ -35,7 +35,6 @@
#include "odfemitter.hxx"
#include <rtl/ustrbuf.hxx>
-#include <comphelper/anytostring.hxx>
#include <cppuhelper/exc_hlp.hxx>
#include <com/sun/star/io/XInputStream.hpp>
#include <com/sun/star/io/XOutputStream.hpp>
diff --git a/sdext/source/pdfimport/pdfparse/pdfparse.cxx b/sdext/source/pdfimport/pdfparse/pdfparse.cxx
index c9b3b1522cc5..36734cfcbc84 100644
--- a/sdext/source/pdfimport/pdfparse/pdfparse.cxx
+++ b/sdext/source/pdfimport/pdfparse/pdfparse.cxx
@@ -51,6 +51,7 @@
#include <rtl/strbuf.hxx>
#include <rtl/memory.h>
+#include <rtl/alloc.h>
// disable warnings again because someone along the line has enabled them
#if defined __SUNPRO_CC
@@ -573,6 +574,33 @@ PDFEntry* PDFReader::read( const char* pBuffer, unsigned int nLen )
PDFEntry* PDFReader::read( const char* pFileName )
{
+ #ifdef WIN32
+ /* #i106583#
+ since converting to boost 1.39 file_iterator does not work anymore on all Windows systems
+ C++ stdlib istream_iterator does not allow "-" apparently
+ using spirit 2.0 doesn't work in our environment with the MSC
+
+ So for the time being bite the bullet and read the whole file.
+ FIXME: give Spirit 2.x another try when we upgrade boost again.
+ */
+ PDFEntry* pRet = NULL;
+ FILE* fp = fopen( pFileName, "rb" );
+ if( fp )
+ {
+ fseek( fp, 0, SEEK_END );
+ unsigned int nLen = (unsigned int)ftell( fp );
+ fseek( fp, 0, SEEK_SET );
+ char* pBuf = (char*)rtl_allocateMemory( nLen );
+ if( pBuf )
+ {
+ fread( pBuf, 1, nLen, fp );
+ pRet = read( pBuf, nLen );
+ rtl_freeMemory( pBuf );
+ }
+ fclose( fp );
+ }
+ return pRet;
+ #else
file_iterator<> file_start( pFileName );
if( ! file_start )
return NULL;
@@ -629,8 +657,8 @@ PDFEntry* PDFReader::read( const char* pFileName )
}
}
#endif
-
return pRet;
+ #endif // WIN32
}
#if defined __SUNPRO_CC
diff --git a/sdext/source/pdfimport/sax/emitcontext.cxx b/sdext/source/pdfimport/sax/emitcontext.cxx
index fc5809c4f7d5..17ff27e8dfc5 100644
--- a/sdext/source/pdfimport/sax/emitcontext.cxx
+++ b/sdext/source/pdfimport/sax/emitcontext.cxx
@@ -37,7 +37,6 @@
#include "saxattrlist.hxx"
#include <rtl/strbuf.hxx>
-#include <comphelper/anytostring.hxx>
#include <cppuhelper/exc_hlp.hxx>
#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
@@ -62,12 +61,6 @@ SaxEmitter::SaxEmitter( const uno::Reference< xml::sax::XDocumentHandler >& xDoc
}
catch( xml::sax::SAXException& )
{
-#if 0
- OSL_ENSURE( false,
- rtl::OUStringToOString(
- comphelper::anyToString( cppu::getCaughtException() ),
- RTL_TEXTENCODING_UTF8 ).getStr() );
-#endif
}
#if OSL_DEBUG_LEVEL > 1
static const char* pDir = getenv( "DBG_PDFIMPORT_DIR" );
@@ -99,12 +92,6 @@ SaxEmitter::~SaxEmitter()
}
catch( xml::sax::SAXException& )
{
-#if 0
- OSL_ENSURE( false,
- rtl::OUStringToOString(
- comphelper::anyToString( cppu::getCaughtException() ),
- RTL_TEXTENCODING_UTF8 ).getStr() );
-#endif
}
#if OSL_DEBUG_LEVEL > 1
if( pStream )
@@ -127,12 +114,6 @@ void SaxEmitter::beginTag( const char* pTag, const PropertyMap& rProperties )
}
catch( xml::sax::SAXException& )
{
-#if 0
- OSL_ENSURE( false,
- rtl::OUStringToOString(
- comphelper::anyToString( cppu::getCaughtException() ),
- RTL_TEXTENCODING_UTF8 ).getStr() );
-#endif
}
#if OSL_DEBUG_LEVEL > 1
if( pStream )
@@ -167,12 +148,6 @@ void SaxEmitter::write( const rtl::OUString& rText )
}
catch( xml::sax::SAXException& )
{
-#if 0
- OSL_ENSURE( false,
- rtl::OUStringToOString(
- comphelper::anyToString( cppu::getCaughtException() ),
- RTL_TEXTENCODING_UTF8 ).getStr() );
-#endif
}
#if OSL_DEBUG_LEVEL > 1
if( pStream )
@@ -193,12 +168,6 @@ void SaxEmitter::endTag( const char* pTag )
}
catch( xml::sax::SAXException& )
{
-#if 0
- OSL_ENSURE( false,
- rtl::OUStringToOString(
- comphelper::anyToString( cppu::getCaughtException() ),
- RTL_TEXTENCODING_UTF8 ).getStr() );
-#endif
}
#if OSL_DEBUG_LEVEL > 1
if( pStream )
diff --git a/sdext/source/pdfimport/services.cxx b/sdext/source/pdfimport/services.cxx
index d6d79204cef1..548961ace6f2 100644
--- a/sdext/source/pdfimport/services.cxx
+++ b/sdext/source/pdfimport/services.cxx
@@ -38,7 +38,6 @@
#include <cppuhelper/factory.hxx>
#include <cppuhelper/implementationentry.hxx>
-#include <comphelper/servicedecl.hxx>
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
diff --git a/sdext/source/pdfimport/test/makefile.mk b/sdext/source/pdfimport/test/makefile.mk
index 2fb8d3a62417..eea005178ae3 100755
--- a/sdext/source/pdfimport/test/makefile.mk
+++ b/sdext/source/pdfimport/test/makefile.mk
@@ -1,7 +1,7 @@
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
+#
# Copyright 2008 by Sun Microsystems, Inc.
#
# OpenOffice.org - a multi-platform office productivity suite
@@ -70,6 +70,7 @@ SHL1STDLIBS=\
$(COMPHELPERLIB) \
$(CPPUHELPERLIB) \
$(CPPUNITLIB) \
+ $(TESTSHL2LIB) \
$(ZLIB3RDLIB) \
$(CPPULIB) \
$(SALLIB)
@@ -103,6 +104,7 @@ APP1STDLIBS=\
$(COMPHELPERLIB) \
$(CPPUHELPERLIB) \
$(CPPUNITLIB) \
+ $(TESTSHL2LIB) \
$(ZLIB3RDLIB) \
$(CPPULIB) \
$(SALLIB)
@@ -131,6 +133,7 @@ APP2STDLIBS=\
$(COMPHELPERLIB) \
$(CPPUHELPERLIB) \
$(CPPUNITLIB) \
+ $(TESTSHL2LIB) \
$(ZLIB3RDLIB) \
$(CPPULIB) \
$(SALLIB)
@@ -161,5 +164,5 @@ APP2STDLIBS=\
@echo ----------------------------------------------------------
testshl2 -forward $(BIN)$/ $(SHL1TARGETN)
$(TOUCH) $@
-
+
#ALLTAR : $(MISC)$/pdfi_unittest_succeeded
diff --git a/sdext/source/pdfimport/test/tests.cxx b/sdext/source/pdfimport/test/tests.cxx
index b66e1812d9e0..075116e3784a 100755
--- a/sdext/source/pdfimport/test/tests.cxx
+++ b/sdext/source/pdfimport/test/tests.cxx
@@ -48,7 +48,7 @@
#include <rtl/math.hxx>
#include <osl/file.hxx>
#include <osl/process.h>
-#include <cppunit/simpleheader.hxx>
+#include <testshl/simpleheader.hxx>
#include <cppuhelper/compbase1.hxx>
#include <cppuhelper/bootstrap.hxx>
#include <cppuhelper/basemutex.hxx>
diff --git a/sdext/source/pdfimport/tree/pdfiprocessor.cxx b/sdext/source/pdfimport/tree/pdfiprocessor.cxx
index 2a025430b722..997ede16f454 100644
--- a/sdext/source/pdfimport/tree/pdfiprocessor.cxx
+++ b/sdext/source/pdfimport/tree/pdfiprocessor.cxx
@@ -51,6 +51,7 @@
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <basegfx/range/b2irange.hxx>
#include <basegfx/range/b2drectangle.hxx>
+#include <basegfx/matrix/b2dhommatrixtools.hxx>
#include <com/sun/star/rendering/XVolatileBitmap.hpp>
#include <com/sun/star/geometry/RealSize2D.hpp>
@@ -502,8 +503,7 @@ GraphicsContext& PDFIProcessor::getTransformGlyphContext( CharGlyph& rGlyph )
FontAttributes aFontAttrs = m_aIdToFont[ rGlyph.getGC().FontId ];
// add transformation to GC
- basegfx::B2DHomMatrix aFontTransform;
- aFontTransform.translate( -rRect.X1, -rRect.Y1 );
+ basegfx::B2DHomMatrix aFontTransform(basegfx::tools::createTranslateB2DHomMatrix(-rRect.X1, -rRect.Y1));
aFontTransform *= aFontMatrix;
aFontTransform.translate( rRect.X1, rRect.Y1 );