From 4018095024104c83cdbd7c9ddec266e2442c659b Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Thu, 16 Jun 2011 17:06:16 +0300 Subject: Link with user32 for Windows --- hwpfilter/Library_hwp.mk | 1 + 1 file changed, 1 insertion(+) (limited to 'hwpfilter') diff --git a/hwpfilter/Library_hwp.mk b/hwpfilter/Library_hwp.mk index 321d4bee411d..d6096a4b4ef8 100644 --- a/hwpfilter/Library_hwp.mk +++ b/hwpfilter/Library_hwp.mk @@ -61,6 +61,7 @@ ifeq ($(OS),WNT) $(eval $(call gb_Library_add_linked_libs,hwp,\ ole32 \ + user32 \ uuid \ )) -- cgit From 4fb5b90d3e3151faf457117af2f2eceeaa7f6b00 Mon Sep 17 00:00:00 2001 From: Hans-Joachim Lankenau Date: Mon, 30 May 2011 18:05:29 +0200 Subject: ause130: #i117218# change .idl handling to gnu make --- hwpfilter/prj/build.lst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hwpfilter') diff --git a/hwpfilter/prj/build.lst b/hwpfilter/prj/build.lst index 3fa47f767bfe..ea3f26894883 100644 --- a/hwpfilter/prj/build.lst +++ b/hwpfilter/prj/build.lst @@ -1,2 +1,2 @@ -hw hwpfilter : offuh cppuhelper ZLIB:zlib LIBXSLT:libxslt ucbhelper ucb ure NULL +hw hwpfilter : offapi cppuhelper ZLIB:zlib LIBXSLT:libxslt ucbhelper ucb ure NULL hw hwpfilter\prj nmake - all hw_prj NULL -- cgit From 169f83bb9c7e9b6c319d68dd7b98b3c981c515af Mon Sep 17 00:00:00 2001 From: David Tardon Date: Fri, 17 Jun 2011 20:28:16 +0200 Subject: use the new way of setting UNO API include dirs --- hwpfilter/CppunitTest_hwpfilter_test_hwpfilter.mk | 6 +++++- hwpfilter/Library_hwp.mk | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'hwpfilter') diff --git a/hwpfilter/CppunitTest_hwpfilter_test_hwpfilter.mk b/hwpfilter/CppunitTest_hwpfilter_test_hwpfilter.mk index 5e053286fc86..02024b707f46 100644 --- a/hwpfilter/CppunitTest_hwpfilter_test_hwpfilter.mk +++ b/hwpfilter/CppunitTest_hwpfilter_test_hwpfilter.mk @@ -46,10 +46,14 @@ $(eval $(call gb_CppunitTest_add_linked_libs,hwpfilter_test_hwpfilter, \ $(eval $(call gb_CppunitTest_set_include,hwpfilter_test_hwpfilter,\ $$(INCLUDE) \ - -I$(OUTDIR)/inc/offuh \ -I$(OUTDIR)/inc \ )) +$(eval $(call gb_CppunitTest_add_api,hwpfilter_test_hwpfilter,\ + offapi \ + udkapi \ +)) + $(eval $(call gb_CppunitTest_uses_ure,hwpfilter_test_hwpfilter)) $(eval $(call gb_CppunitTest_add_type_rdbs,hwpfilter_test_hwpfilter,\ diff --git a/hwpfilter/Library_hwp.mk b/hwpfilter/Library_hwp.mk index d6096a4b4ef8..90685b10a6f3 100644 --- a/hwpfilter/Library_hwp.mk +++ b/hwpfilter/Library_hwp.mk @@ -32,7 +32,11 @@ $(eval $(call gb_Library_add_precompiled_header,hwp,$(SRCDIR)/hwpfilter/inc/pch/ $(eval $(call gb_Library_set_include,hwp,\ $$(INCLUDE) \ -I$(realpath $(SRCDIR)/hwpfilter/inc/pch) \ - -I$(OUTDIR)/inc/offuh \ +)) + +$(eval $(call gb_Library_add_api,hwp,\ + offapi \ + udkapi \ )) $(eval $(call gb_Library_add_linked_libs,hwp,\ -- cgit From e8de073d6336a2a8e170ecb5e1598c8ff4819cef Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 21 Jun 2011 11:33:27 +0100 Subject: use size_t here --- hwpfilter/source/htags.cxx | 7 ++++--- hwpfilter/source/htags.h | 4 ++-- hwpfilter/source/hwpreader.cxx | 6 +++--- 3 files changed, 9 insertions(+), 8 deletions(-) (limited to 'hwpfilter') diff --git a/hwpfilter/source/htags.cxx b/hwpfilter/source/htags.cxx index 30244a83f9b8..94cc05058d7c 100644 --- a/hwpfilter/source/htags.cxx +++ b/hwpfilter/source/htags.cxx @@ -59,9 +59,10 @@ bool HyperText::Read(HWPFile & hwpf) } -EmPicture::EmPicture(int tsize):size(tsize - 32) +EmPicture::EmPicture(size_t tsize) + : size(tsize >= 32 ? tsize - 32 : 0) { - if (size <= 0) + if (size == 0) data = 0; else data = new uchar[size]; @@ -82,7 +83,7 @@ EmPicture::~EmPicture(void) bool EmPicture::Read(HWPFile & hwpf) { - if (size <= 0) + if (size == 0) return false; hwpf.Read1b(name, 16); hwpf.Read1b(type, 16); diff --git a/hwpfilter/source/htags.h b/hwpfilter/source/htags.h index bb244c07dd59..21c610db4e9d 100644 --- a/hwpfilter/source/htags.h +++ b/hwpfilter/source/htags.h @@ -39,12 +39,12 @@ class HWPFile; */ struct EmPicture { - int size; + size_t size; char name[16]; char type[16]; uchar *data; - EmPicture(int size); + EmPicture(size_t size); ~EmPicture(void); bool Read(HWPFile& hwpf); diff --git a/hwpfilter/source/hwpreader.cxx b/hwpfilter/source/hwpreader.cxx index 47e8a50d5cbe..8fe47730a9e9 100644 --- a/hwpfilter/source/hwpreader.cxx +++ b/hwpfilter/source/hwpreader.cxx @@ -538,12 +538,12 @@ void HwpReader::makeDrawMiscStyle( HWPDrawingObject *hdo ) if( (fd = open( filename , O_CREAT | O_WRONLY , 0666)) >= 0 ) #endif { - write( fd, emp->data, emp->size ); + size_t nWritten = write(fd, emp->data, emp->size); + OSL_VERIFY(nWritten == emp->size); close(fd); } #ifdef _WIN32 - int j; - for( j = 0 ; j < (int)strlen( dirname ) ; j++) + for(int j = 0 ; j < (int)strlen( dirname ) ; j++) { if( dirname[j] == '\\' ) buf[j] = '/'; else buf[j] = dirname[j]; -- cgit From 12330bfe5b604a77c8aa27dff8a525cc751877ed Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Mon, 27 Jun 2011 14:06:18 +0300 Subject: Fix Windows build --- hwpfilter/source/hwpreader.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'hwpfilter') diff --git a/hwpfilter/source/hwpreader.cxx b/hwpfilter/source/hwpreader.cxx index 8fe47730a9e9..8bcef10460df 100644 --- a/hwpfilter/source/hwpreader.cxx +++ b/hwpfilter/source/hwpreader.cxx @@ -543,7 +543,8 @@ void HwpReader::makeDrawMiscStyle( HWPDrawingObject *hdo ) close(fd); } #ifdef _WIN32 - for(int j = 0 ; j < (int)strlen( dirname ) ; j++) + int j; + for(j = 0 ; j < (int)strlen( dirname ) ; j++) { if( dirname[j] == '\\' ) buf[j] = '/'; else buf[j] = dirname[j]; -- cgit From 34f6f96ecbc08632da82bc29e7f609b75af51e52 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Thu, 30 Jun 2011 16:18:21 +0100 Subject: add modified unoexceptionprotector for better error msgs from exceptions --- hwpfilter/CppunitTest_hwpfilter_test_hwpfilter.mk | 1 + hwpfilter/prj/build.lst | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'hwpfilter') diff --git a/hwpfilter/CppunitTest_hwpfilter_test_hwpfilter.mk b/hwpfilter/CppunitTest_hwpfilter_test_hwpfilter.mk index 02024b707f46..9f23f1dc062d 100644 --- a/hwpfilter/CppunitTest_hwpfilter_test_hwpfilter.mk +++ b/hwpfilter/CppunitTest_hwpfilter_test_hwpfilter.mk @@ -67,6 +67,7 @@ $(eval $(call gb_CppunitTest_add_service_rdbs,hwpfilter_test_hwpfilter,\ $(eval $(call gb_CppunitTest_set_args,hwpfilter_test_hwpfilter,\ --headless \ --invisible \ + --protector unoexceptionprotector$(gb_Library_PLAINEXT) unoexceptionprotector \ )) $(eval $(call gb_RdbTarget_RdbTarget,hwpfilter_test_hwpfilter)) diff --git a/hwpfilter/prj/build.lst b/hwpfilter/prj/build.lst index ea3f26894883..5eb79927bdd0 100644 --- a/hwpfilter/prj/build.lst +++ b/hwpfilter/prj/build.lst @@ -1,2 +1,2 @@ -hw hwpfilter : offapi cppuhelper ZLIB:zlib LIBXSLT:libxslt ucbhelper ucb ure NULL +hw hwpfilter : offapi cppuhelper ZLIB:zlib LIBXSLT:libxslt ucbhelper ucb ure test NULL hw hwpfilter\prj nmake - all hw_prj NULL -- cgit From 0e334c2bfa7e46f5b3b2a2e7acc47257827fb126 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 1 Jul 2011 14:48:27 +0100 Subject: gb_Library_PLAINEXT->gb_Library_DLLEXT --- hwpfilter/CppunitTest_hwpfilter_test_hwpfilter.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hwpfilter') diff --git a/hwpfilter/CppunitTest_hwpfilter_test_hwpfilter.mk b/hwpfilter/CppunitTest_hwpfilter_test_hwpfilter.mk index 9f23f1dc062d..386e6fa04da3 100644 --- a/hwpfilter/CppunitTest_hwpfilter_test_hwpfilter.mk +++ b/hwpfilter/CppunitTest_hwpfilter_test_hwpfilter.mk @@ -67,7 +67,7 @@ $(eval $(call gb_CppunitTest_add_service_rdbs,hwpfilter_test_hwpfilter,\ $(eval $(call gb_CppunitTest_set_args,hwpfilter_test_hwpfilter,\ --headless \ --invisible \ - --protector unoexceptionprotector$(gb_Library_PLAINEXT) unoexceptionprotector \ + --protector unoexceptionprotector$(gb_Library_DLLEXT) unoexceptionprotector \ )) $(eval $(call gb_RdbTarget_RdbTarget,hwpfilter_test_hwpfilter)) -- cgit From a9137707c4f8e17f97221f958c28a276d0903e16 Mon Sep 17 00:00:00 2001 From: Matúš Kukan Date: Tue, 12 Jul 2011 17:13:08 +0200 Subject: Remove component_getImplementationEnvironment --- hwpfilter/source/hwpreader.hxx | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'hwpfilter') diff --git a/hwpfilter/source/hwpreader.hxx b/hwpfilter/source/hwpreader.hxx index 7676aafe0dc3..6a7ce4faa4de 100644 --- a/hwpfilter/source/hwpreader.hxx +++ b/hwpfilter/source/hwpreader.hxx @@ -338,19 +338,8 @@ Sequence< OUString> HwpImportFilter::getSupportedServiceNames() throw(::com::sun return aRet; } -///////////////////////////////////////////////////////////////////////////////////// -// The below three C functions are nessesary for this shared library is treaded as -// UNO component library. -///////////////////////////////////////////////////////////////////////////////////// extern "C" { - - SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( - const sal_Char ** ppEnvTypeName, uno_Environment ** ) - { - *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; - } - SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * ) { void * pRet = 0; -- cgit