[Libreoffice-commits] libcdr.git: 4 commits - build/win32 configure.ac libcdr.spec.in libcdr-zip.in src/conv src/lib
Fridrich Å trba
fridrich.strba at bluewin.ch
Fri Apr 5 02:43:57 PDT 2013
build/win32/cdr2text.dsp | 102 ++++++++++++++++++
build/win32/cdr2text.vcproj | 230 +++++++++++++++++++++++++++++++++++++++++
build/win32/cdr2text.vcxproj | 146 ++++++++++++++++++++++++++
build/win32/cmx2text.dsp | 102 ++++++++++++++++++
build/win32/cmx2text.vcproj | 230 +++++++++++++++++++++++++++++++++++++++++
build/win32/cmx2text.vcxproj | 146 ++++++++++++++++++++++++++
build/win32/libcdr.dsw | 30 +++++
build/win32/libcdr.vcproj.sln | 18 +++
build/win32/libcdr.vcxproj.sln | 12 ++
configure.ac | 9 +
libcdr-zip.in | 22 +++
libcdr.spec.in | 1
src/conv/Makefile.am | 2
src/conv/text/.gitignore | 10 +
src/conv/text/Makefile.am | 49 ++++++++
src/conv/text/cdr2text.cpp | 131 +++++++++++++++++++++++
src/conv/text/cdr2text.rc.in | 31 +++++
src/conv/text/cmx2text.cpp | 131 +++++++++++++++++++++++
src/conv/text/cmx2text.rc.in | 31 +++++
src/lib/libcdr_utils.cpp | 19 ++-
20 files changed, 1443 insertions(+), 9 deletions(-)
New commits:
commit 636256807d96fc2262157ac23df0909883bb3f39
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date: Fri Apr 5 11:43:32 2013 +0200
Some little fixes
diff --git a/libcdr-zip.in b/libcdr-zip.in
index d834af6..feb1d08 100644
--- a/libcdr-zip.in
+++ b/libcdr-zip.in
@@ -15,12 +15,20 @@ DLLDIR=bin
@STRIP@ --strip-all \
$DLLDIR/libcdr- at CDR_MAJOR_VERSION@. at CDR_MINOR_VERSION@.dll \
bin/cdr2raw.exe \
-bin/cdr2xhtml.exe
+bin/cdr2text.exe \
+bin/cdr2xhtml.exe \
+bin/cmx2raw.exe \
+bin/cmx2text.exe \
+bin/cmx2xhtml.exe
upx -qqq --best \
$DLLDIR/libcdr- at CDR_MAJOR_VERSION@. at CDR_MINOR_VERSION@.dll \
bin/cdr2raw.exe \
-bin/cdr2xhtml.exe
+bin/cdr2text.exe \
+bin/cdr2xhtml.exe \
+bin/cmx2raw.exe \
+bin/cmx2text.exe \
+bin/cmx2xhtml.exe
rm -f $ZIP
zip -q -r $ZIP -@ <<EOF
@@ -38,13 +46,19 @@ EOF
rm -f $TOOLSZIP
zip -q -r -j $TOOLSZIP -@ <<EOF
bin/cdr2raw.exe
+bin/cdr2text.exe
bin/cdr2xhtml.exe
-bin/cdr2xhtmlbatch.exe
+bin/cmx2raw.exe
+bin/cmx2text.exe
+bin/cmx2xhtml.exe
EOF
rm -f $TOOLSZIP
zip -q -r -j $TOOLSZIP -@ <<EOF
bin/cdr2raw.exe
+bin/cdr2text.exe
bin/cdr2xhtml.exe
-bin/cdr2xhtmlbatch.pl
+bin/cmx2raw.exe
+bin/cmx2text.exe
+bin/cmx2xhtml.exe
EOF
diff --git a/libcdr.spec.in b/libcdr.spec.in
index aaa4560..6cbc54e 100644
--- a/libcdr.spec.in
+++ b/libcdr.spec.in
@@ -75,6 +75,7 @@ umask 022
%files tools
%defattr(755,root,root,755)
%{_bindir}/cdr2*
+%{_bindir}/cmx2*
%files devel
%defattr(644,root,root,755)
commit d1720863f294630d6c233fdeb0049c0a0f3300af
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date: Fri Apr 5 11:37:06 2013 +0200
Adapt the MSVC build to the new c??2text tools
diff --git a/build/win32/cdr2text.dsp b/build/win32/cdr2text.dsp
new file mode 100644
index 0000000..6f38f3c
--- /dev/null
+++ b/build/win32/cdr2text.dsp
@@ -0,0 +1,102 @@
+# Microsoft Developer Studio Project File - Name="cdr2text" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=cdr2text - Win32 Release
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "cdr2text.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "cdr2text.mak" CFG="cdr2text - Win32 Release"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "cdr2text - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "cdr2text - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "cdr2text - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+MTL=midl.exe
+# ADD BASE MTL /nologo /win32
+# ADD MTL /nologo /win32
+# ADD BASE CPP /nologo /MT /W3 /GX /Zi /I "..\..\src\lib" /I "libwpd-0.9" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /c
+# ADD CPP /nologo /MT /W3 /GX /I "..\..\src\lib" /I "libwpd-0.9" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /c
+# ADD BASE RSC /l 0x409
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 libcdr-0.0.lib libwpd-stream-0.9.lib libwpd-0.9.lib /nologo /subsystem:console /machine:IX86 /out:"Release\bin\cdr2text.exe" /libpath:"Release\lib"
+# ADD LINK32 libcdr-0.0.lib libwpd-stream-0.9.lib libwpd-0.9.lib /nologo /subsystem:console /machine:IX86 /out:"Release\bin\cdr2text.exe" /libpath:"Release\lib"
+# SUBTRACT LINK32 /nodefaultlib
+
+!ELSEIF "$(CFG)" == "cdr2text - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+MTL=midl.exe
+# ADD BASE MTL /nologo /win32
+# ADD MTL /nologo /win32
+# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "\..\..\src\lib" /I "libwpd-0.9" /D "WIN32" /D "_DEBUG" /D "DEBUG" /D "_CONSOLE" /GZ /c
+# ADD CPP /nologo /MTd /W3 /GX /ZI /Od /I "..\..\src\lib" /I "libwpd-0.9" /D "_DEBUG" /D "DEBUG" /D "WIN32" /D "_CONSOLE" /GZ /c
+# ADD BASE RSC /l 0x409
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 libcdr-0.0.lib libwpd-stream-0.9.lib libwpd-0.9.lib /nologo /subsystem:console /debug /machine:IX86 /out:"Debug\bin\cdr2text.exe" /libpath:"Debug\lib"
+# ADD LINK32 libcdr-0.0.lib libwpd-stream-0.9.lib libwpd-0.9.lib kernel32.lib /nologo /subsystem:console /debug /machine:IX86 /out:"Debug\bin\cdr2text.exe" /libpath:"Debug\lib"
+# SUBTRACT LINK32 /nodefaultlib
+
+!ENDIF
+
+# Begin Target
+
+# Name "cdr2text - Win32 Release"
+# Name "cdr2text - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+# Begin Source File
+
+SOURCE=..\..\src\conv\text\cdr2text.cpp
+# End Source File
+# End Group
+# End Target
+# End Project
diff --git a/build/win32/cdr2text.vcproj b/build/win32/cdr2text.vcproj
new file mode 100755
index 0000000..0718fa3
--- /dev/null
+++ b/build/win32/cdr2text.vcproj
@@ -0,0 +1,230 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="cdr2text"
+ ProjectGUID="{FCC850C4-B104-46B4-9EE0-812CDA637009}"
+ TargetFrameworkVersion="0"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Debug/cdr2text.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\src\lib,$(LIBWPD_INCLUDE_DIR),$(LIBWPG_INCLUDE_DIR)"
+ PreprocessorDefinitions="_DEBUG;DEBUG;WIN32;_CONSOLE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ TreatWChar_tAsBuiltInType="false"
+ PrecompiledHeaderFile=".\Debug/cdr2text.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="libcdr-0.0.lib libwpd-stream-0.9.lib libwpd-0.9.lib"
+ OutputFile="Debug\bin\cdr2text.exe"
+ LinkIncremental="2"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="Debug\lib,$(LIBWPD_LIB_DIR),$(LCMS2_LIB_DIR),$(ZLIB_LIB_DIR),$(ICU_LIB_DIR)"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\Debug/cdr2text.pdb"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile=".\Debug/cdr2text.bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\Release"
+ IntermediateDirectory=".\Release"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Release/cdr2text.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="4"
+ AdditionalIncludeDirectories="..\..\src\lib,$(LIBWPD_INCLUDE_DIR),$(LIBWPG_INCLUDE_DIR)"
+ PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE"
+ RuntimeLibrary="2"
+ TreatWChar_tAsBuiltInType="false"
+ PrecompiledHeaderFile=".\Release/cdr2text.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="libcdr-0.0.lib libwpd-stream-0.9.lib libwpd-0.9.lib"
+ OutputFile="Release\bin\cdr2text.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="Release\lib,$(LIBWPD_LIB_DIR),$(LCMS2_LIB_DIR),$(ZLIB_LIB_DIR),$(ICU_LIB_DIR)"
+ ProgramDatabaseFile=".\Release/cdr2text.pdb"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile=".\Release/cdr2text.bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ >
+ <File
+ RelativePath="..\..\src\conv\text\cdr2text.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/build/win32/cdr2text.vcxproj b/build/win32/cdr2text.vcxproj
new file mode 100755
index 0000000..81ee004
--- /dev/null
+++ b/build/win32/cdr2text.vcxproj
@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{FCC850C4-B104-46B4-9EE0-812CDA637009}</ProjectGuid>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\Debug\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\Debug\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\Release\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\Release\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>.\Debug/cdr2text.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\src\lib;$(LIBWPD_INCLUDE_DIR);$(LIBWPG_INCLUDE_DIR);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;DEBUG;WIN32;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeaderOutputFile>.\Debug/cdr2text.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>.\Debug/</AssemblerListingLocation>
+ <ObjectFileName>.\Debug/</ObjectFileName>
+ <ProgramDataBaseFileName>.\Debug/</ProgramDataBaseFileName>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <TreatWChar_tAsBuiltInType>false</TreatWChar_tAsBuiltInType>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>libcdr-0.0.lib;libwpd-stream-0.9.lib;libwpd-0.9.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>Debug\bin\cdr2text.exe</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <AdditionalLibraryDirectories>Debug\lib;$(LIBWPD_LIB_DIR);$(LCMS2_LIB_DIR);$(ZLIB_LIB_DIR);$(ICU_LIB_DIR);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>.\Debug/cdr2text.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ <Bscmake>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <OutputFile>.\Debug/cdr2text.bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>.\Release/cdr2text.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\src\lib;$(LIBWPD_INCLUDE_DIR);$(LIBWPG_INCLUDE_DIR);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;WIN32;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <PrecompiledHeaderOutputFile>.\Release/cdr2text.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>.\Release/</AssemblerListingLocation>
+ <ObjectFileName>.\Release/</ObjectFileName>
+ <ProgramDataBaseFileName>.\Release/</ProgramDataBaseFileName>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TreatWChar_tAsBuiltInType>false</TreatWChar_tAsBuiltInType>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>libcdr-0.0.lib;libwpd-stream-0.9.lib;libwpd-0.9.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>Release\bin\cdr2text.exe</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <AdditionalLibraryDirectories>Release\lib;$(LIBWPD_LIB_DIR);$(LCMS2_LIB_DIR);$(ZLIB_LIB_DIR);$(ICU_LIB_DIR);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <ProgramDatabaseFile>.\Release/cdr2text.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ <Bscmake>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <OutputFile>.\Release/cdr2text.bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\src\conv\text\cdr2text.cpp">
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="libcdr.vcxproj">
+ <Project>{b9a4eabd-ab21-4b52-800f-4c86ea9d640d}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
diff --git a/build/win32/cmx2text.dsp b/build/win32/cmx2text.dsp
new file mode 100644
index 0000000..ca7afe9
--- /dev/null
+++ b/build/win32/cmx2text.dsp
@@ -0,0 +1,102 @@
+# Microsoft Developer Studio Project File - Name="cmx2text" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=cmx2text - Win32 Release
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "cmx2text.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "cmx2text.mak" CFG="cmx2text - Win32 Release"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "cmx2text - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "cmx2text - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "cmx2text - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+MTL=midl.exe
+# ADD BASE MTL /nologo /win32
+# ADD MTL /nologo /win32
+# ADD BASE CPP /nologo /MT /W3 /GX /Zi /I "..\..\src\lib" /I "libwpd-0.9" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /c
+# ADD CPP /nologo /MT /W3 /GX /I "..\..\src\lib" /I "libwpd-0.9" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /c
+# ADD BASE RSC /l 0x409
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 libcdr-0.0.lib libwpd-stream-0.9.lib libwpd-0.9.lib /nologo /subsystem:console /machine:IX86 /out:"Release\bin\cmx2text.exe" /libpath:"Release\lib"
+# ADD LINK32 libcdr-0.0.lib libwpd-stream-0.9.lib libwpd-0.9.lib /nologo /subsystem:console /machine:IX86 /out:"Release\bin\cmx2text.exe" /libpath:"Release\lib"
+# SUBTRACT LINK32 /nodefaultlib
+
+!ELSEIF "$(CFG)" == "cmx2text - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+MTL=midl.exe
+# ADD BASE MTL /nologo /win32
+# ADD MTL /nologo /win32
+# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "\..\..\src\lib" /I "libwpd-0.9" /D "WIN32" /D "_DEBUG" /D "DEBUG" /D "_CONSOLE" /GZ /c
+# ADD CPP /nologo /MTd /W3 /GX /ZI /Od /I "..\..\src\lib" /I "libwpd-0.9" /D "_DEBUG" /D "DEBUG" /D "WIN32" /D "_CONSOLE" /GZ /c
+# ADD BASE RSC /l 0x409
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 libcdr-0.0.lib libwpd-stream-0.9.lib libwpd-0.9.lib /nologo /subsystem:console /debug /machine:IX86 /out:"Debug\bin\cmx2text.exe" /libpath:"Debug\lib"
+# ADD LINK32 libcdr-0.0.lib libwpd-stream-0.9.lib libwpd-0.9.lib kernel32.lib /nologo /subsystem:console /debug /machine:IX86 /out:"Debug\bin\cmx2text.exe" /libpath:"Debug\lib"
+# SUBTRACT LINK32 /nodefaultlib
+
+!ENDIF
+
+# Begin Target
+
+# Name "cmx2text - Win32 Release"
+# Name "cmx2text - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+# Begin Source File
+
+SOURCE=..\..\src\conv\text\cmx2text.cpp
+# End Source File
+# End Group
+# End Target
+# End Project
diff --git a/build/win32/cmx2text.vcproj b/build/win32/cmx2text.vcproj
new file mode 100755
index 0000000..1c3d3bc
--- /dev/null
+++ b/build/win32/cmx2text.vcproj
@@ -0,0 +1,230 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="cmx2text"
+ ProjectGUID="{764B7C1F-2B8A-46C7-BB4A-22CF41160E22}"
+ TargetFrameworkVersion="0"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Debug/cmx2text.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\src\lib,$(LIBWPD_INCLUDE_DIR),$(LIBWPG_INCLUDE_DIR)"
+ PreprocessorDefinitions="_DEBUG;DEBUG;WIN32;_CONSOLE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ TreatWChar_tAsBuiltInType="false"
+ PrecompiledHeaderFile=".\Debug/cmx2text.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="libcdr-0.0.lib libwpd-stream-0.9.lib libwpd-0.9.lib"
+ OutputFile="Debug\bin\cmx2text.exe"
+ LinkIncremental="2"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="Debug\lib,$(LIBWPD_LIB_DIR),$(LCMS2_LIB_DIR),$(ZLIB_LIB_DIR),$(ICU_LIB_DIR)"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\Debug/cmx2text.pdb"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile=".\Debug/cmx2text.bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\Release"
+ IntermediateDirectory=".\Release"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Release/cmx2text.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="4"
+ AdditionalIncludeDirectories="..\..\src\lib,$(LIBWPD_INCLUDE_DIR),$(LIBWPG_INCLUDE_DIR),$(ZLIB_LIB_DIR),$(ICU_LIB_DIR)"
+ PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE"
+ RuntimeLibrary="2"
+ TreatWChar_tAsBuiltInType="false"
+ PrecompiledHeaderFile=".\Release/cmx2text.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="libcdr-0.0.lib libwpd-stream-0.9.lib libwpd-0.9.lib"
+ OutputFile="Release\bin\cmx2text.exe"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ AdditionalLibraryDirectories="Release\lib,$(LIBWPD_LIB_DIR),$(LCMS2_LIB_DIR),$(ZLIB_LIB_DIR),$(ICU_LIB_DIR)"
+ ProgramDatabaseFile=".\Release/cmx2text.pdb"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile=".\Release/cmx2text.bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ >
+ <File
+ RelativePath="..\..\src\conv\text\cmx2text.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/build/win32/cmx2text.vcxproj b/build/win32/cmx2text.vcxproj
new file mode 100755
index 0000000..1c07c9d
--- /dev/null
+++ b/build/win32/cmx2text.vcxproj
@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{764B7C1F-2B8A-46C7-BB4A-22CF41160E22}</ProjectGuid>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\Debug\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\Debug\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\Release\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\Release\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>.\Debug/cmx2text.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\src\lib;$(LIBWPD_INCLUDE_DIR);$(LIBWPG_INCLUDE_DIR);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;DEBUG;WIN32;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeaderOutputFile>.\Debug/cmx2text.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>.\Debug/</AssemblerListingLocation>
+ <ObjectFileName>.\Debug/</ObjectFileName>
+ <ProgramDataBaseFileName>.\Debug/</ProgramDataBaseFileName>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <TreatWChar_tAsBuiltInType>false</TreatWChar_tAsBuiltInType>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>libcdr-0.0.lib;libwpd-stream-0.9.lib;libwpd-0.9.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>Debug\bin\cmx2text.exe</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <AdditionalLibraryDirectories>Debug\lib;$(LIBWPD_LIB_DIR);$(LCMS2_LIB_DIR);$(ZLIB_LIB_DIR);$(ICU_LIB_DIR);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>.\Debug/cmx2text.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ <Bscmake>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <OutputFile>.\Debug/cmx2text.bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>.\Release/cmx2text.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\src\lib;$(LIBWPD_INCLUDE_DIR);$(LIBWPG_INCLUDE_DIR);$(ZLIB_LIB_DIR);$(ICU_LIB_DIR);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;WIN32;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <PrecompiledHeaderOutputFile>.\Release/cmx2text.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>.\Release/</AssemblerListingLocation>
+ <ObjectFileName>.\Release/</ObjectFileName>
+ <ProgramDataBaseFileName>.\Release/</ProgramDataBaseFileName>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TreatWChar_tAsBuiltInType>false</TreatWChar_tAsBuiltInType>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>libcdr-0.0.lib;libwpd-stream-0.9.lib;libwpd-0.9.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>Release\bin\cmx2text.exe</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <AdditionalLibraryDirectories>Release\lib;$(LIBWPD_LIB_DIR);$(LCMS2_LIB_DIR);$(ZLIB_LIB_DIR);$(ICU_LIB_DIR);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <ProgramDatabaseFile>.\Release/cmx2text.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ <Bscmake>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <OutputFile>.\Release/cmx2text.bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\src\conv\text\cmx2text.cpp">
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="libcdr.vcxproj">
+ <Project>{b9a4eabd-ab21-4b52-800f-4c86ea9d640d}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
diff --git a/build/win32/libcdr.dsw b/build/win32/libcdr.dsw
index 3c8084e..b047d44 100644
--- a/build/win32/libcdr.dsw
+++ b/build/win32/libcdr.dsw
@@ -30,6 +30,21 @@ Package=<4>
###############################################################################
+Project: "cdr2text"=.\cdr2text.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name libcdr
+ End Project Dependency
+}}}
+
+###############################################################################
+
Project: "cdr2raw"=.\cdr2raw.dsp - Package Owner=<4>
Package=<5>
@@ -60,6 +75,21 @@ Package=<4>
###############################################################################
+Project: "cmx2text"=.\cmx2text.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name libcdr
+ End Project Dependency
+}}}
+
+###############################################################################
+
Project: "cmx2raw"=.\cmx2raw.dsp - Package Owner=<4>
Package=<5>
diff --git a/build/win32/libcdr.vcproj.sln b/build/win32/libcdr.vcproj.sln
index d541d70..3a20b36 100755
--- a/build/win32/libcdr.vcproj.sln
+++ b/build/win32/libcdr.vcproj.sln
@@ -8,6 +8,11 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cdr2xhtml", "cdr2xhtml.vcpr
{B9A4EABD-AB21-4B52-800F-4C86EA9D640D} = {B9A4EABD-AB21-4B52-800F-4C86EA9D640D}
EndProjectSection
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cdr2text", "cdr2text.vcproj", "{FCC850C4-B104-46B4-9EE0-812CDA637009}"
+ ProjectSection(ProjectDependencies) = postProject
+ {B9A4EABD-AB21-4B52-800F-4C86EA9D640D} = {B9A4EABD-AB21-4B52-800F-4C86EA9D640D}
+ EndProjectSection
+EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cdr2raw", "cdr2raw.vcproj", "{D039073D-C42E-4171-B9B7-1A888E548EDE}"
ProjectSection(ProjectDependencies) = postProject
{B9A4EABD-AB21-4B52-800F-4C86EA9D640D} = {B9A4EABD-AB21-4B52-800F-4C86EA9D640D}
@@ -18,6 +23,11 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cmx2xhtml", "cmx2xhtml.vcpr
{B9A4EABD-AB21-4B52-800F-4C86EA9D640D} = {B9A4EABD-AB21-4B52-800F-4C86EA9D640D}
EndProjectSection
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cmx2text", "cmx2text.vcproj", "{764B7C1F-2B8A-46C7-BB4A-22CF41160E22}"
+ ProjectSection(ProjectDependencies) = postProject
+ {B9A4EABD-AB21-4B52-800F-4C86EA9D640D} = {B9A4EABD-AB21-4B52-800F-4C86EA9D640D}
+ EndProjectSection
+EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cmx2raw", "cmx2raw.vcproj", "{24319810-8FE4-4400-A1C7-E1672C4FC8FC}"
ProjectSection(ProjectDependencies) = postProject
{B9A4EABD-AB21-4B52-800F-4C86EA9D640D} = {B9A4EABD-AB21-4B52-800F-4C86EA9D640D}
@@ -37,6 +47,10 @@ Global
{8229C9F9-D44E-44BD-A206-182C217C6BDF}.Debug|Win32.Build.0 = Debug|Win32
{8229C9F9-D44E-44BD-A206-182C217C6BDF}.Release|Win32.ActiveCfg = Release|Win32
{8229C9F9-D44E-44BD-A206-182C217C6BDF}.Release|Win32.Build.0 = Release|Win32
+ {FCC850C4-B104-46B4-9EE0-812CDA637009}.Debug|Win32.ActiveCfg = Debug|Win32
+ {FCC850C4-B104-46B4-9EE0-812CDA637009}.Debug|Win32.Build.0 = Debug|Win32
+ {FCC850C4-B104-46B4-9EE0-812CDA637009}.Release|Win32.ActiveCfg = Release|Win32
+ {FCC850C4-B104-46B4-9EE0-812CDA637009}.Release|Win32.Build.0 = Release|Win32
{D039073D-C42E-4171-B9B7-1A888E548EDE}.Debug|Win32.ActiveCfg = Debug|Win32
{D039073D-C42E-4171-B9B7-1A888E548EDE}.Debug|Win32.Build.0 = Debug|Win32
{D039073D-C42E-4171-B9B7-1A888E548EDE}.Release|Win32.ActiveCfg = Release|Win32
@@ -45,6 +59,10 @@ Global
{EC0136D6-0275-4CB5-A7FF-FDEC6A799ADA}.Debug|Win32.Build.0 = Debug|Win32
{EC0136D6-0275-4CB5-A7FF-FDEC6A799ADA}.Release|Win32.ActiveCfg = Release|Win32
{EC0136D6-0275-4CB5-A7FF-FDEC6A799ADA}.Release|Win32.Build.0 = Release|Win32
+ {764B7C1F-2B8A-46C7-BB4A-22CF41160E22}.Debug|Win32.ActiveCfg = Debug|Win32
+ {764B7C1F-2B8A-46C7-BB4A-22CF41160E22}.Debug|Win32.Build.0 = Debug|Win32
+ {764B7C1F-2B8A-46C7-BB4A-22CF41160E22}.Release|Win32.ActiveCfg = Release|Win32
+ {764B7C1F-2B8A-46C7-BB4A-22CF41160E22}.Release|Win32.Build.0 = Release|Win32
{24319810-8FE4-4400-A1C7-E1672C4FC8FC}.Debug|Win32.ActiveCfg = Debug|Win32
{24319810-8FE4-4400-A1C7-E1672C4FC8FC}.Debug|Win32.Build.0 = Debug|Win32
{24319810-8FE4-4400-A1C7-E1672C4FC8FC}.Release|Win32.ActiveCfg = Release|Win32
diff --git a/build/win32/libcdr.vcxproj.sln b/build/win32/libcdr.vcxproj.sln
index 178d6e7..950c9d6 100755
--- a/build/win32/libcdr.vcxproj.sln
+++ b/build/win32/libcdr.vcxproj.sln
@@ -4,10 +4,14 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcdr", "libcdr.vcxproj",
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cdr2xhtml", "cdr2xhtml.vcxproj", "{8229C9F9-D44E-44BD-A206-182C217C6BDF}"
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cdr2text", "cdr2text.vcxproj", "{FCC850C4-B104-46B4-9EE0-812CDA637009}"
+EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cdr2raw", "cdr2raw.vcxproj", "{D039073D-C42E-4171-B9B7-1A888E548EDE}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cmx2xhtml", "cmx2xhtml.vcxproj", "{EC0136D6-0275-4CB5-A7FF-FDEC6A799ADA}"
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cmx2text", "cmx2text.vcxproj", "{764B7C1F-2B8A-46C7-BB4A-22CF41160E22}"
+EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cmx2raw", "cmx2raw.vcxproj", "{24319810-8FE4-4400-A1C7-E1672C4FC8FC}"
EndProject
Global
@@ -24,6 +28,10 @@ Global
{8229C9F9-D44E-44BD-A206-182C217C6BDF}.Debug|Win32.Build.0 = Debug|Win32
{8229C9F9-D44E-44BD-A206-182C217C6BDF}.Release|Win32.ActiveCfg = Release|Win32
{8229C9F9-D44E-44BD-A206-182C217C6BDF}.Release|Win32.Build.0 = Release|Win32
+ {FCC850C4-B104-46B4-9EE0-812CDA637009}.Debug|Win32.ActiveCfg = Debug|Win32
+ {FCC850C4-B104-46B4-9EE0-812CDA637009}.Debug|Win32.Build.0 = Debug|Win32
+ {FCC850C4-B104-46B4-9EE0-812CDA637009}.Release|Win32.ActiveCfg = Release|Win32
+ {FCC850C4-B104-46B4-9EE0-812CDA637009}.Release|Win32.Build.0 = Release|Win32
{D039073D-C42E-4171-B9B7-1A888E548EDE}.Debug|Win32.ActiveCfg = Debug|Win32
{D039073D-C42E-4171-B9B7-1A888E548EDE}.Debug|Win32.Build.0 = Debug|Win32
{D039073D-C42E-4171-B9B7-1A888E548EDE}.Release|Win32.ActiveCfg = Release|Win32
@@ -32,6 +40,10 @@ Global
{EC0136D6-0275-4CB5-A7FF-FDEC6A799ADA}.Debug|Win32.Build.0 = Debug|Win32
{EC0136D6-0275-4CB5-A7FF-FDEC6A799ADA}.Release|Win32.ActiveCfg = Release|Win32
{EC0136D6-0275-4CB5-A7FF-FDEC6A799ADA}.Release|Win32.Build.0 = Release|Win32
+ {764B7C1F-2B8A-46C7-BB4A-22CF41160E22}.Debug|Win32.ActiveCfg = Debug|Win32
+ {764B7C1F-2B8A-46C7-BB4A-22CF41160E22}.Debug|Win32.Build.0 = Debug|Win32
+ {764B7C1F-2B8A-46C7-BB4A-22CF41160E22}.Release|Win32.ActiveCfg = Release|Win32
+ {764B7C1F-2B8A-46C7-BB4A-22CF41160E22}.Release|Win32.Build.0 = Release|Win32
{24319810-8FE4-4400-A1C7-E1672C4FC8FC}.Debug|Win32.ActiveCfg = Debug|Win32
{24319810-8FE4-4400-A1C7-E1672C4FC8FC}.Debug|Win32.Build.0 = Debug|Win32
{24319810-8FE4-4400-A1C7-E1672C4FC8FC}.Release|Win32.ActiveCfg = Release|Win32
commit f4b09293154df756478213c638508421488bd520
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date: Fri Apr 5 11:09:10 2013 +0200
Add cdr2text and cmx2text utilities for the purposes of debugging text related issues
diff --git a/configure.ac b/configure.ac
index de4bbbf..715ed61 100644
--- a/configure.ac
+++ b/configure.ac
@@ -115,15 +115,19 @@ AS_CASE([$host],
native_win32=yes
LIBCDR_WIN32_RESOURCE=libcdr-win32res.lo
CDR2RAW_WIN32_RESOURCE=cdr2raw-win32res.lo
+ CDR2TEXT_WIN32_RESOURCE=cdr2raw-win32res.lo
CDR2XHTML_WIN32_RESOURCE=cdr2xhtml-win32res.lo
CMX2RAW_WIN32_RESOURCE=cmx2raw-win32res.lo
+ CMX2TEXT_WIN32_RESOURCE=cmx2raw-win32res.lo
CMX2XHTML_WIN32_RESOURCE=cmx2xhtml-win32res.lo
], [
native_win32=no
LIBCDR_WIN32_RESOURCE=
CDR2RAW_WIN32_RESOURCE=
+ CDR2TEXT_WIN32_RESOURCE=
CDR2XHTML_WIN32_RESOURCE=
CMX2RAW_WIN32_RESOURCE=
+ CMX2TEXT_WIN32_RESOURCE=
CMX2XHTML_WIN32_RESOURCE=
]
)
@@ -131,8 +135,10 @@ AC_MSG_RESULT([$native_win32])
AM_CONDITIONAL(OS_WIN32, [test "x$native_win32" = "xyes"])
AC_SUBST(LIBCDR_WIN32_RESOURCE)
AC_SUBST(CDR2RAW_WIN32_RESOURCE)
+AC_SUBST(CDR2TEXT_WIN32_RESOURCE)
AC_SUBST(CDR2XHTML_WIN32_RESOURCE)
AC_SUBST(CMX2RAW_WIN32_RESOURCE)
+AC_SUBST(CMX2TEXT_WIN32_RESOURCE)
AC_SUBST(CMX2XHTML_WIN32_RESOURCE)
AC_MSG_CHECKING([for Win32 platform in general])
@@ -280,6 +286,9 @@ src/conv/raw/cmx2raw.rc
src/conv/svg/Makefile
src/conv/svg/cdr2xhtml.rc
src/conv/svg/cmx2xhtml.rc
+src/conv/text/Makefile
+src/conv/text/cdr2text.rc
+src/conv/text/cmx2text.rc
src/lib/Makefile
src/lib/libcdr.rc
build/Makefile
diff --git a/src/conv/Makefile.am b/src/conv/Makefile.am
index f43c908..eb88fe3 100644
--- a/src/conv/Makefile.am
+++ b/src/conv/Makefile.am
@@ -1,2 +1,2 @@
-SUBDIRS = raw svg
+SUBDIRS = raw svg text
diff --git a/src/conv/text/.gitignore b/src/conv/text/.gitignore
new file mode 100644
index 0000000..1166ddd
--- /dev/null
+++ b/src/conv/text/.gitignore
@@ -0,0 +1,10 @@
+.deps
+.libs
+*.lo
+*.la
+*.o
+Makefile
+Makefile.in
+cdr2text
+cmx2text
+*.rc
diff --git a/src/conv/text/Makefile.am b/src/conv/text/Makefile.am
new file mode 100644
index 0000000..e663a7d
--- /dev/null
+++ b/src/conv/text/Makefile.am
@@ -0,0 +1,49 @@
+bin_PROGRAMS = cdr2text cmx2text
+
+AM_CXXFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib $(WPD_CFLAGS) $(WPG_CFLAGS) $(DEBUG_CXXFLAGS)
+
+cdr2text_DEPENDENCIES = @CDR2TEXT_WIN32_RESOURCE@
+
+if STATIC_TOOLS
+cdr2text_LDADD = ../../lib/@CDR_OBJDIR@/libcdr- at CDR_MAJOR_VERSION@. at CDR_MINOR_VERSION@.a $(WPD_LIBS) @CDR2TEXT_WIN32_RESOURCE@
+cdr2text_LDFLAGS = -all-static
+else
+cdr2text_LDADD = ../../lib/libcdr- at CDR_MAJOR_VERSION@. at CDR_MINOR_VERSION@.la $(WPD_LIBS) @CDR2TEXT_WIN32_RESOURCE@
+endif
+
+cdr2text_SOURCES = \
+ cdr2text.cpp
+
+cmx2text_DEPENDENCIES = @CMX2TEXT_WIN32_RESOURCE@
+
+if STATIC_TOOLS
+cmx2text_LDADD = ../../lib/@CDR_OBJDIR@/libcdr- at CDR_MAJOR_VERSION@. at CDR_MINOR_VERSION@.a $(WPD_LIBS) @CMX2TEXT_WIN32_RESOURCE@
+cmx2text_LDFLAGS = -all-static
+else
+cmx2text_LDADD = ../../lib/libcdr- at CDR_MAJOR_VERSION@. at CDR_MINOR_VERSION@.la $(WPD_LIBS) @CMX2TEXT_WIN32_RESOURCE@
+endif
+
+cmx2text_SOURCES = \
+ cmx2text.cpp
+
+if OS_WIN32
+
+ at CDR2TEXT_WIN32_RESOURCE@ : cdr2text.rc $(cdr2text_OBJECTS)
+ chmod +x $(top_srcdir)/build/win32/*compile-resource
+ WINDRES=@WINDRES@ $(top_srcdir)/build/win32/lt-compile-resource cdr2text.rc @CDR2TEXT_WIN32_RESOURCE@
+
+ at CMX2TEXT_WIN32_RESOURCE@ : cmx2text.rc $(cmx2text_OBJECTS)
+ chmod +x $(top_srcdir)/build/win32/*compile-resource
+ WINDRES=@WINDRES@ $(top_srcdir)/build/win32/lt-compile-resource cmx2text.rc @CMX2TEXT_WIN32_RESOURCE@
+endif
+
+EXTRA_DIST = \
+ $(cdr2text_SOURCES) \
+ $(cmx2text_SOURCES) \
+ cdr2text.rc.in \
+ cmx2text.rc.in
+
+# These may be in the builddir too
+BUILD_EXTRA_DIST = \
+ cdr2text.rc \
+ cmx2text.rc
diff --git a/src/conv/text/cdr2text.cpp b/src/conv/text/cdr2text.cpp
new file mode 100644
index 0000000..0c5de24
--- /dev/null
+++ b/src/conv/text/cdr2text.cpp
@@ -0,0 +1,131 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* libcdr
+ * Version: MPL 1.1 / GPLv2+ / LGPLv2+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License or as specified alternatively below. You may obtain a copy of
+ * the License at http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * Major Contributor(s):
+ * Copyright (C) 2011 Fridrich Strba <fridrich.strba at bluewin.ch>
+ * Copyright (C) 2011 Eilidh McAdam <tibbylickle at gmail.com>
+ *
+ *
+ * All Rights Reserved.
+ *
+ * For minor contributions see the git repository.
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPLv2+"), or
+ * the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"),
+ * in which case the provisions of the GPLv2+ or the LGPLv2+ are applicable
+ * instead of those above.
+ */
+
+#include <stdio.h>
+#include <string.h>
+
+#include "libcdr.h"
+#include <libwpd-stream/libwpd-stream.h>
+#include <libwpd/libwpd.h>
+
+class TextPainter : public libwpg::WPGPaintInterface
+{
+public:
+ TextPainter();
+
+ void startGraphics(const ::WPXPropertyList &) {}
+ void endGraphics() {}
+ void startLayer(const ::WPXPropertyList &) {}
+ void endLayer() {}
+ void startEmbeddedGraphics(const ::WPXPropertyList &) {}
+ void endEmbeddedGraphics() {}
+
+ void setStyle(const ::WPXPropertyList &, const ::WPXPropertyListVector &) {}
+
+ void drawRectangle(const ::WPXPropertyList &) {}
+ void drawEllipse(const ::WPXPropertyList &) {}
+ void drawPolyline(const ::WPXPropertyListVector &) {}
+ void drawPolygon(const ::WPXPropertyListVector &) {}
+ void drawPath(const ::WPXPropertyListVector &) {}
+ void drawGraphicObject(const ::WPXPropertyList &, const ::WPXBinaryData &) {}
+ void startTextObject(const ::WPXPropertyList &, const ::WPXPropertyListVector &) {}
+ void endTextObject() {}
+ void startTextLine(const ::WPXPropertyList &) {}
+ void endTextLine();
+ void startTextSpan(const ::WPXPropertyList &) {}
+ void endTextSpan() {}
+ void insertText(const ::WPXString &str);
+};
+
+TextPainter::TextPainter(): libwpg::WPGPaintInterface()
+{
+}
+
+void TextPainter::insertText(const ::WPXString &str)
+{
+ printf("%s", str.cstr());
+}
+
+void TextPainter::endTextLine()
+{
+ printf("\n");
+}
+
+namespace
+{
+
+int printUsage()
+{
+ printf("Usage: cdr2text [OPTION] <Corel Draw Document>\n");
+ printf("\n");
+ printf("Options:\n");
+ printf("--help Shows this help message\n");
+ return -1;
+}
+
+} // anonymous namespace
+
+int main(int argc, char *argv[])
+{
+ if (argc < 2)
+ return printUsage();
+
+ char *file = 0;
+
+ for (int i = 1; i < argc; i++)
+ {
+ if (!file && strncmp(argv[i], "--", 2))
+ file = argv[i];
+ else
+ return printUsage();
+ }
+
+ if (!file)
+ return printUsage();
+
+ WPXFileStream input(file);
+
+ if (!libcdr::CDRDocument::isSupported(&input))
+ {
+ fprintf(stderr, "ERROR: Unsupported file format (unsupported version) or file is encrypted!\n");
+ return 1;
+ }
+
+ TextPainter painter;
+ if (!libcdr::CDRDocument::parse(&input, &painter))
+ {
+ fprintf(stderr, "ERROR: Parsing of document failed!\n");
+ return 1;
+ }
+
+ return 0;
+}
+
+/* vim:set shiftwidth=2 softtabstop=2 expandtab: */
diff --git a/src/conv/text/cdr2text.rc.in b/src/conv/text/cdr2text.rc.in
new file mode 100644
index 0000000..93b8be9
--- /dev/null
+++ b/src/conv/text/cdr2text.rc.in
@@ -0,0 +1,31 @@
+#include <winver.h>
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION @CDR_MAJOR_VERSION@, at CDR_MINOR_VERSION@, at CDR_MICRO_VERSION@,BUILDNUMBER
+ PRODUCTVERSION @CDR_MAJOR_VERSION@, at CDR_MINOR_VERSION@, at CDR_MICRO_VERSION@,0
+ FILEFLAGSMASK 0
+ FILEFLAGS 0
+ FILEOS VOS__WINDOWS32
+ FILETYPE VFT_APP
+ FILESUBTYPE VFT2_UNKNOWN
+ BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904B0"
+ BEGIN
+ VALUE "CompanyName", "The libcdr developer community"
+ VALUE "FileDescription", "cdr2text"
+ VALUE "FileVersion", "@CDR_MAJOR_VERSION at .@CDR_MINOR_VERSION at .@CDR_MICRO_VERSION at .BUILDNUMBER"
+ VALUE "InternalName", "cdr2text"
+ VALUE "LegalCopyright", "Copyright (C) 2011 Fridrich Strba, other contribut0rs"
+ VALUE "OriginalFilename", "cdr2text.exe"
+ VALUE "ProductName", "libcdr"
+ VALUE "ProductVersion", "@CDR_MAJOR_VERSION at .@CDR_MINOR_VERSION at .@CDR_MICRO_VERSION@"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x409, 1200
+ END
+ END
+
diff --git a/src/conv/text/cmx2text.cpp b/src/conv/text/cmx2text.cpp
new file mode 100644
index 0000000..622f233
--- /dev/null
+++ b/src/conv/text/cmx2text.cpp
@@ -0,0 +1,131 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* libcdr
+ * Version: MPL 1.1 / GPLv2+ / LGPLv2+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License or as specified alternatively below. You may obtain a copy of
+ * the License at http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * Major Contributor(s):
+ * Copyright (C) 2011 Fridrich Strba <fridrich.strba at bluewin.ch>
+ * Copyright (C) 2011 Eilidh McAdam <tibbylickle at gmail.com>
+ *
+ *
+ * All Rights Reserved.
+ *
+ * For minor contributions see the git repository.
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPLv2+"), or
+ * the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"),
+ * in which case the provisions of the GPLv2+ or the LGPLv2+ are applicable
+ * instead of those above.
+ */
+
+#include <stdio.h>
+#include <string.h>
+
+#include "libcdr.h"
+#include <libwpd-stream/libwpd-stream.h>
+#include <libwpd/libwpd.h>
+
+class TextPainter : public libwpg::WPGPaintInterface
+{
+public:
+ TextPainter();
+
+ void startGraphics(const ::WPXPropertyList &) {}
+ void endGraphics() {}
+ void startLayer(const ::WPXPropertyList &) {}
+ void endLayer() {}
+ void startEmbeddedGraphics(const ::WPXPropertyList &) {}
+ void endEmbeddedGraphics() {}
+
+ void setStyle(const ::WPXPropertyList &, const ::WPXPropertyListVector &) {}
+
+ void drawRectangle(const ::WPXPropertyList &) {}
+ void drawEllipse(const ::WPXPropertyList &) {}
+ void drawPolyline(const ::WPXPropertyListVector &) {}
+ void drawPolygon(const ::WPXPropertyListVector &) {}
+ void drawPath(const ::WPXPropertyListVector &) {}
+ void drawGraphicObject(const ::WPXPropertyList &, const ::WPXBinaryData &) {}
+ void startTextObject(const ::WPXPropertyList &, const ::WPXPropertyListVector &) {}
+ void endTextObject() {}
+ void startTextLine(const ::WPXPropertyList &) {}
+ void endTextLine();
+ void startTextSpan(const ::WPXPropertyList &) {}
+ void endTextSpan() {}
+ void insertText(const ::WPXString &str);
+};
+
+TextPainter::TextPainter(): libwpg::WPGPaintInterface()
+{
+}
+
+void TextPainter::insertText(const ::WPXString &str)
+{
+ printf("%s", str.cstr());
+}
+
+void TextPainter::endTextLine()
+{
+ printf("\n");
+}
+
+namespace
+{
+
+int printUsage()
+{
+ printf("Usage: cmx2text [OPTION] <Corel Binary Metafile>\n");
+ printf("\n");
+ printf("Options:\n");
+ printf("--help Shows this help message\n");
+ return -1;
+}
+
+} // anonymous namespace
+
+int main(int argc, char *argv[])
+{
+ if (argc < 2)
+ return printUsage();
+
+ char *file = 0;
+
+ for (int i = 1; i < argc; i++)
+ {
+ if (!file && strncmp(argv[i], "--", 2))
+ file = argv[i];
+ else
+ return printUsage();
+ }
+
+ if (!file)
+ return printUsage();
+
+ WPXFileStream input(file);
+
+ if (!libcdr::CDRDocument::isSupported(&input))
+ {
+ fprintf(stderr, "ERROR: Unsupported file format (unsupported version) or file is encrypted!\n");
+ return 1;
+ }
+
+ TextPainter painter;
+ if (!libcdr::CDRDocument::parse(&input, &painter))
+ {
+ fprintf(stderr, "ERROR: Parsing of document failed!\n");
+ return 1;
+ }
+
+ return 0;
+}
+
+/* vim:set shiftwidth=2 softtabstop=2 expandtab: */
diff --git a/src/conv/text/cmx2text.rc.in b/src/conv/text/cmx2text.rc.in
new file mode 100644
index 0000000..ee6d540
--- /dev/null
+++ b/src/conv/text/cmx2text.rc.in
@@ -0,0 +1,31 @@
+#include <winver.h>
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION @CDR_MAJOR_VERSION@, at CDR_MINOR_VERSION@, at CDR_MICRO_VERSION@,BUILDNUMBER
+ PRODUCTVERSION @CDR_MAJOR_VERSION@, at CDR_MINOR_VERSION@, at CDR_MICRO_VERSION@,0
+ FILEFLAGSMASK 0
+ FILEFLAGS 0
+ FILEOS VOS__WINDOWS32
+ FILETYPE VFT_APP
+ FILESUBTYPE VFT2_UNKNOWN
+ BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904B0"
+ BEGIN
+ VALUE "CompanyName", "The libcdr developer community"
+ VALUE "FileDescription", "cmx2text"
+ VALUE "FileVersion", "@CDR_MAJOR_VERSION at .@CDR_MINOR_VERSION at .@CDR_MICRO_VERSION at .BUILDNUMBER"
+ VALUE "InternalName", "cmx2text"
+ VALUE "LegalCopyright", "Copyright (C) 2011 Fridrich Strba, other contribut0rs"
+ VALUE "OriginalFilename", "cmx2text.exe"
+ VALUE "ProductName", "libcdr"
+ VALUE "ProductVersion", "@CDR_MAJOR_VERSION at .@CDR_MINOR_VERSION at .@CDR_MICRO_VERSION@"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x409, 1200
+ END
+ END
+
commit b4fddc0074b5751108302c2331c7e134bf469554
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date: Fri Apr 5 11:08:28 2013 +0200
Try to be as accurate as possible with guessed encodings
diff --git a/src/lib/libcdr_utils.cpp b/src/lib/libcdr_utils.cpp
index 7ea24a4..00f9193 100644
--- a/src/lib/libcdr_utils.cpp
+++ b/src/lib/libcdr_utils.cpp
@@ -115,10 +115,7 @@ static unsigned short getEncodingFromICUName(const char *name)
static unsigned short getEncoding(const unsigned char *buffer, unsigned bufferLength)
{
- if (!buffer || bufferLength < 30)
- // Under 30, we get a lot of bogus information
- // Eventually first verify whether the encoding 0 is plausible
- // and only if not continue guessing ????
+ if (!buffer)
return 0;
UErrorCode status = U_ZERO_ERROR;
UCharsetDetector *csd = 0;
@@ -138,8 +135,22 @@ static unsigned short getEncoding(const unsigned char *buffer, unsigned bufferLe
const char *name = ucsdet_getName(csm, &status);
if (U_FAILURE(status) || !name)
throw libcdr::EncodingException();
+ int32_t confidence = ucsdet_getConfidence(csm, &status);
+ if (U_FAILURE(status))
+ throw libcdr::EncodingException();
+ CDR_DEBUG_MSG(("UCSDET: getEncoding name %s, confidence %i\n", name, confidence));
unsigned short encoding = getEncodingFromICUName(name);
ucsdet_close(csd);
+ /* From ICU documentation
+ * A confidence value of ten does have a general meaning - it is used
+ * for charsets that can represent the input data, but for which there
+ * is no other indication that suggests that the charset is the correct
+ * one. Pure 7 bit ASCII data, for example, is compatible with a great
+ * many charsets, most of which will appear as possible matches with
+ * a confidence of 10.
+ */
+ if (confidence == 10)
+ return 0;
return encoding;
}
catch (const libcdr::EncodingException &)
More information about the Libreoffice-commits
mailing list