David Hislop wrote:
> Also quickly hacked together an MS VC version of the lib and wpd2text
> and it also works fine. Minimal changes: just added the new files to
> the VC project, and created a simple CLR wpd2text app.
I gladly accept patch that will build wpd2* CLR apps into libwpd:-)
:-)
I got my brain unwrapped from the axle and generated a Win Console app. Much better. Don't know why I was mucking around with CLR ... probably left it that way from something else I was working on.
Anyway, summary:
1. created project files for wpd2* and built on MS VC; only one minor header change required, and a project file #define to avoid deprecated function warnings;
2. built the same source on MinGW; only minor changes to some .am files, don't affect MSVC
3. built the same source as MinGW on Linux (Fedore Core 6); no changes required
Detail of the changes:
1. src/conv/text/TextListenerImpl.h
28a29
> #ifndef _MSC_VER
29a31
> #endif // _MSC_VER
2. src/conv/*/Makefile.am
(changes to each of the three files identical to this one for the wpd2raw file - for some reason MinGW broke with the trailing /, but Linux didn't mind it not being present, so I removed it)
9c9
< AM_CXXFLAGS = $(LIBWPD_CXXFLAGS) $(DEBUG_CXXFLAGS) -I$(top_srcdir)/src/lib/
---
> AM_CXXFLAGS = $(LIBWPD_CXXFLAGS) $(DEBUG_CXXFLAGS) -I$(top_srcdir)/src/lib
11c11
< wpd2raw_LDFLAGS = -L../../lib/
---
> wpd2raw_LDFLAGS = -L../../lib
3. MS VC Project files
How do you want me to send these to you? Zipped with paths?
One possible drawback: they are for MS Visual Studio 2005, which is what I've used, so they won't work with VC6 for example.
Errors and warnings
Only one lot of warnings in MS VC. In two places in WPXStreamImplementation.cpp the following code caused the warnings below due to curpos and streamSize being long and numBytes size_t (and g++ on Linux and MinGW do not produce the warning):
Compiling...
WPXStreamImplementation.cpp
..\..\src\lib\WPXStreamImplementation.cpp(106) : warning C4018: '<' : signed/unsigned mismatch
..\..\src\lib\WPXStreamImplementation.cpp(107) : warning C4018: '>' : signed/unsigned mismatch
..\..\src\lib\WPXStreamImplementation.cpp(239) : warning C4018: '<' : signed/unsigned mismatch
..\..\src\lib\WPXStreamImplementation.cpp(240) : warning C4018: '>' : signed/unsigned mismatch
You don't have to modify the code, we could just live with it. If you do modify it, let me know how you've done it and I'll run it through modified.
The warning re the deprecated function was:
WPXString.cpp
c:\documents and settings\tdh\my documents\visual studio 2005\projects\libwpd2-fs-exp\src\lib\wpxstring.cpp(153) : warning C4996: '_vsnprintf' was declared deprecated
c:\program files\microsoft visual studio 8\vc\include\stdio.h(339) : see declaration of '_vsnprintf'
Message: 'This function or variable may be unsafe. Consider using _vsnprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
Fixed it by defining _CRT_SECURE_NO_DEPRECATE in the project file.
Only one very minor difference in my tests of OLE and non-OLE wpd files on all three platforms, and it occurred in the output from wpd2raw as below. One 0.0008 inch difference in the second column width, also reflected in the overall table width. Is this normal? Or does it indicate that there might be a problem?
51c51
< openTable(fo:margin-left: 0.0000inch, fo:margin-right: 0.0000inch, style:width: 6.2683inch, table:align: margins, columns: ((style:column-width: 2.0000inch), (style:column-width: 4.2683inch)))
---
> openTable(fo:margin-left: 0.0000inch, fo:margin-right: 0.0000inch, style:width: 6.2675inch, table:align: margins, columns: ((style:column-width: 2.0000inch), (style:column-width: 4.2675inch)))
regards - David
------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/
_______________________________________________ Libwpd-devel mailing list Libwpd-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libwpd-devel