Commit e5d9ef30 authored by Elen.Subbotina's avatar Elen.Subbotina Committed by Alexander Trofimov

TxtFile2 win x64 build

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@62392 954022d7-b5bf-4e40-9824-e11837661b57
parent 2bb19410
......@@ -21,7 +21,7 @@ const std::wstring Encoding::ansi2unicode(const std::string& line)
const std::wstring Encoding::cp2unicode(const std::string& sline, const unsigned int nCodepage)
{
#if defined (_WIN32) || defined (_WIN64)
const int nSize = MultiByteToWideChar(codePage, 0, sline.c_str(), sline.size(), NULL, 0);
const int nSize = MultiByteToWideChar(nCodepage, 0, sline.c_str(), sline.size(), NULL, 0);
wchar_t *sTemp = new wchar_t[nSize];
if (!sTemp)
......@@ -198,7 +198,7 @@ const std::string Encoding::unicode2utf8(const std::wstring& line)
const std::string Encoding::unicode2cp(const std::wstring& sLine, const unsigned int nCodepage)
{
#if defined (_WIN32) || defined (_WIN64)
const int nSize = WideCharToMultiByte(codePage, 0, sLine.c_str(), sLine.length(), NULL, 0, NULL, NULL);
const int nSize = WideCharToMultiByte(nCodepage, 0, sLine.c_str(), sLine.length(), NULL, 0, NULL, NULL);
char *sTemp = new char[nSize];
if (!sTemp)
return std::string();
......
......@@ -11,7 +11,7 @@ namespace StlUtils
{
#if defined(_WIN32) || defined(_WIN64)
wchar_t strValue[256];
_itow_s(value, strValue, 256, radix);
_itow_s(value, strValue, 256, 10);
return std::wstring(strValue);
#else
return std::to_wstring(value);
......@@ -33,7 +33,7 @@ namespace StlUtils
{
#if defined(_WIN32) || defined(_WIN64)
char strValue[256];
_itoa_s(value, strValue, 256, radix);
_itoa_s(value, strValue, 256, 10);
return std::string(strValue);
#else
return std::to_string(value);
......
#pragma once
#include "../../../../Common/DocxFormat/Source/XML/stringcommon.h"
#include "../Common/Encoding.h"
#include <vector>
template<typename Out, typename In>
static const std::vector<Out> _transform(const std::vector<In>& lines, const Out(*func)(const In&))
......
......@@ -2,7 +2,8 @@
#ifndef TXT_2_DOCX_CONVERTER_INCLUDE_H_
#define TXT_2_DOCX_CONVERTER_INCLUDE_H_
#include "../../../../Common/DocxFormat/Source/XML/Utils.h"
#include "../../../Common/DocxFormat/Source/XML/Utils.h"
#include <string>
namespace TxtXml
{
......
#include "Converter.h"
#include "../Common/Encoding.h"
#include "../TxtXmlEvent.h"
#include "../TxtFormat/TxtFormat.h"
#include "../../../../Common/DocxFormat/Source/DocxFormat/Docx.h"
#include "../Common//ToString.h"
namespace Docx2Txt
{
static bool IsUnicodeSymbol( static wchar_t symbol )
{
bool result = false;
if ( ( 0x0009 == symbol ) || ( 0x000A == symbol ) || ( 0x000D == symbol ) ||
( ( 0x0020 <= symbol ) && ( 0xD7FF >= symbol ) ) || ( ( 0xE000 <= symbol ) && ( symbol <= 0xFFFD ) ) ||
( ( 0x10000 <= symbol ) && symbol ) )
{
result = true;
}
return result;
}
class Converter_Impl
{
public:
Converter_Impl();
~Converter_Impl();
void convert(TxtXml::ITxtXmlEvent& Event);
void writeUtf8 (const std::wstring& path) const;
void writeUnicode (const std::wstring& path) const;
void writeBigEndian (const std::wstring& path) const;
void writeAnsi (const std::wstring& path) const;
Txt::File m_outputFile;
OOX::CDocx m_inputFile;
private:
void convert(std::vector<OOX::WritingElement *> & items, std::list<std::wstring>& textOut, TxtXml::ITxtXmlEvent& Event, bool isFirstLevel,
OOX::CDocument *pDocument, OOX::CNumbering* pNumbering, OOX::CStyles *pStyles);
int m_lPercent;
int m_lAddition;
bool m_bCancelled;
int ListCount;
int* Lists;
std::wstring convert(OOX::Logic::CParagraph * pParagraph, TxtXml::ITxtXmlEvent& Event,
OOX::CDocument *pDocument, OOX::CNumbering* pNumbering, OOX::CStyles *pStyles);
size_t NoteCount;
std::list<std::wstring> Notes;
static std::wstring IntToLowerLetter (int number);
static std::wstring IntToUpperLetter (int number);
static std::wstring IntToLowerRoman (int number);
static std::wstring IntToUpperRoman (int number);
static const std::wstring m_letters;
};
Converter::Converter() : converter_(new Converter_Impl)
{}
Converter::~Converter()
{
delete converter_;
}
void Converter::convert(TxtXml::ITxtXmlEvent& Event)
{
return converter_->convert(Event);
}
void Converter::read(const std::wstring& path)
{
BOOL res = converter_->m_inputFile.Read(std_string2string(path));
return;
}
void Converter::write(const std::wstring& path)
{
return converter_->m_outputFile.write(path);
}
void Converter::writeUtf8(const std::wstring& path) const
{
return converter_->writeUtf8(path);
}
void Converter::writeUnicode(const std::wstring& path) const
{
return converter_->writeUnicode(path);
}
void Converter::writeBigEndian(const std::wstring path) const
{
return converter_->writeBigEndian(path);
}
void Converter::writeAnsi(const std::wstring path) const
{
return converter_->writeAnsi(path);
}
const std::wstring Converter_Impl::m_letters = _T("abcdefghijklmnopqrstuvwxyz");
Converter_Impl::Converter_Impl()
: m_lPercent(0), m_lAddition(0), m_bCancelled(false), ListCount(0), Lists(NULL), NoteCount(0)
{
}
Converter_Impl::~Converter_Impl()
{
if(Lists != NULL)
{
delete []Lists;
Lists = NULL;
}
}
void Converter_Impl::convert(TxtXml::ITxtXmlEvent& Event)
{
OOX::CDocument *pDocument = NULL;
OOX::CStyles *pStyles = NULL;
OOX::CNumbering *pNumbering = NULL;
m_lPercent = 100000;
m_bCancelled = Event.Progress(0, m_lPercent);
if(m_bCancelled)
return;
smart_ptr<OOX::File> pFileD = m_inputFile.Find(OOX::FileTypes::Document);
if (pFileD.IsInit() && OOX::FileTypes::Document == pFileD->type())
pDocument = (OOX::CDocument*)pFileD.operator->();
smart_ptr<OOX::File> pFileS = pDocument->Find(OOX::FileTypes::Style);
if (pFileS.IsInit() && OOX::FileTypes::Style == pFileS->type())
pStyles = (OOX::CStyles*)pFileS.operator->();
smart_ptr<OOX::File> pFileN = pDocument->Find(OOX::FileTypes::Numbering);
if (pFileN.IsInit() && OOX::FileTypes::Numbering == pFileN->type())
{
pNumbering = (OOX::CNumbering*)pFileN.operator->();
ListCount = pNumbering->m_arrNum.size();
Lists = new int[9 * ListCount];
if(Lists == NULL)
return;
for(int i = 0; i < 9 * ListCount; i++)
Lists[i] = 0;
}
if(pDocument->m_arrItems.size() > 0)
{
m_lAddition = 800000;
Notes.clear();
convert(pDocument->m_arrItems, m_outputFile.m_listContent, Event, true, pDocument, pNumbering, pStyles);
if(NoteCount != 0)
{
m_outputFile.m_listContent.push_back(_T("---------------------------"));
for(std::list<std::wstring>::const_iterator iter = Notes.begin(); iter != Notes.end(); iter++)
{
m_outputFile.m_listContent.push_back(*iter);
}
}
}
if(Lists != NULL)
{
delete []Lists;
Lists = NULL;
}
Event.Progress(0, 900000);
}
void Converter_Impl::writeUtf8(const std::wstring& path) const
{
m_outputFile.writeUtf8(path);
}
void Converter_Impl::writeUnicode(const std::wstring& path) const
{
m_outputFile.writeUnicode(path);
}
void Converter_Impl::writeBigEndian(const std::wstring& path) const
{
m_outputFile.writeBigEndian(path);
}
void Converter_Impl::writeAnsi(const std::wstring& path) const
{
m_outputFile.writeAnsi(path);
}
void Converter_Impl::convert(std::vector<OOX::WritingElement *> & items, std::list<std::wstring>& textOut, TxtXml::ITxtXmlEvent& Event,
bool isFirstLevel, OOX::CDocument *pDocument, OOX::CNumbering* pNumbering, OOX::CStyles *pStyles)
{
if(items.size() > 0)
{
if(isFirstLevel)
m_lAddition = m_lAddition / items.size();
for (int i=0 ; i< items.size(); i++)
{
OOX::WritingElement * item = items[i];
if (item->getType() == OOX::et_w_p)
{
textOut.push_back(convert((dynamic_cast<OOX::Logic::CParagraph*>(item)), Event, pDocument, pNumbering, pStyles));
}
/*else if (item.is<OOX::Logic::List>())
{
BOOST_FOREACH(const OOX::Logic::ListItem& listItem, *item.as<OOX::Logic::List>().m_arrItems)
{
convert(listItem.m_arrItems);
}
}*/
//else if (item->getType() == OOX::et_w_tbl)
//{
// OOX::Logic::CTbl* tbl = dynamic_cast<OOX::Logic::CTbl*>(item);
// for (int r = 0 ; r < tbl->m_arrItems.size(); r++)
// {
// OOX::WritingElement * item = tbl->m_arrItems[r];
// if (item->getType() == OOX::et_w_tr)
// {
// OOX::Logic::CTr* tr = dynamic_cast<OOX::Logic::CTr*>(item);
// for (int c = 0 ; c < tr->m_arrItems.size(); c++)
// {
// OOX::WritingElement * item = tr->m_arrItems[c];
// if (item->getType() == OOX::et_w_tc)
// {
// OOX::Logic::CTc* tc = dynamic_cast<OOX::Logic::CTc*>(item);
// convert(tc->m_arrItems, Event, false, pDocument, pStyles);
// }
// }
// }
// }
//}
//else if (item->getType() == OOX::et_w_sdt)
//{
// convert((dynamic_cast<OOX::Logic::CSdt*>(item))->m_arrItems, text, Event, false, pDocument, pNumbering, pStyles);
//}
else
{
//todoooo - - CSdt ... Tbl
OOX::WritingElementWithChilds<OOX::WritingElement> *item_with_items = dynamic_cast<OOX::WritingElementWithChilds<OOX::WritingElement>*>(item);
if (item_with_items)
{
convert(item_with_items->m_arrItems, textOut, Event, false, pDocument, pNumbering, pStyles);
}
}
if(isFirstLevel)
{
m_lPercent += m_lAddition;
m_bCancelled = Event.Progress(0, m_lPercent);
if(m_bCancelled)
return;
}
}
}
}
std::wstring Converter_Impl::convert(OOX::Logic::CParagraph* pParagraph, TxtXml::ITxtXmlEvent& Event,
OOX::CDocument *pDocument, OOX::CNumbering* pNumbering, OOX::CStyles* pStyles)
{
if (pParagraph == NULL) return _T("");
std::wstring line = _T("");
int level = 0;
int listNum = 0;
if (pParagraph->m_oParagraphProperty)
{
if (pParagraph->m_oParagraphProperty->m_oNumPr.IsInit())
{
if (pParagraph->m_oParagraphProperty->m_oNumPr->m_oIlvl.IsInit())
{
level = pParagraph->m_oParagraphProperty->m_oNumPr->m_oIlvl->m_oVal.IsInit() ?
pParagraph->m_oParagraphProperty->m_oNumPr->m_oIlvl->m_oVal->GetValue() + 1 : 0;
}
if (pParagraph->m_oParagraphProperty->m_oNumPr->m_oNumID.IsInit())
{
listNum = pParagraph->m_oParagraphProperty->m_oNumPr->m_oNumID->m_oVal.IsInit() ?
pParagraph->m_oParagraphProperty->m_oNumPr->m_oNumID->m_oVal->GetValue() : 0;
}
}
}
if((listNum == 0) || (level == 0))
{
if(pParagraph->m_oParagraphProperty)
{
CString styleName;
if (pParagraph->m_oParagraphProperty->m_oPStyle.IsInit())
pParagraph->m_oParagraphProperty->m_oPStyle->m_sVal.IsInit() ? pParagraph->m_oParagraphProperty->m_oPStyle->m_sVal.get() : _T("");
if(styleName != "" && pStyles)
{
std::map<CString, int>::iterator pPair = pStyles->m_arrStyleNamesMap.find(styleName);
if (pPair != pStyles->m_arrStyleNamesMap.end())
{
OOX::CStyle* style = pStyles->m_arrStyle[pPair->second];
if((style) && (style->m_oParPr.IsInit()))
{
if((style->m_oParPr->m_oNumPr.IsInit()) && (style->m_oParPr->m_oNumPr->m_oIlvl.IsInit()))
{
listNum = style->m_oParPr->m_oNumPr->m_oIlvl->m_oVal.IsInit() ? style->m_oParPr->m_oNumPr->m_oIlvl->m_oVal->GetValue() + 1 : 0;
}
}
}
}
}
}
if((listNum > 0) && (level > 0) && pNumbering)
{
level--;
int start = (listNum - 1) * 9;
for(int i = level + 1; i < 9; i++)
{
Lists[start + i] = 0;
}
listNum--;
if ((pNumbering->m_arrNum[listNum]) && (pNumbering->m_arrNum[listNum]->m_oNumId.IsInit()))
{
int abstractNumId = 0;
if ((pNumbering->m_arrNum[listNum]) && (pNumbering->m_arrNum[listNum]->m_oAbstractNumId.IsInit()) &&
(pNumbering->m_arrNum[listNum]->m_oAbstractNumId->m_oVal.IsInit()))
abstractNumId = pNumbering->m_arrNum[listNum]->m_oAbstractNumId->m_oVal->GetValue();
OOX::Numbering::CAbstractNum* abstractNum = NULL;
if (abstractNumId < pNumbering->m_arrAbstractNum.size())
abstractNum = pNumbering->m_arrAbstractNum[abstractNumId];
if (abstractNum)
{
Lists[start + level]++;
int ind_level = -1;
for (long i=0; i< abstractNum->m_arrLvl.size(); i++)//??? ???
{
if ((abstractNum->m_arrLvl[i]) && (abstractNum->m_arrLvl[i]->m_oIlvl.IsInit()) && (abstractNum->m_arrLvl[i]->m_oIlvl->GetValue() == level))
{
ind_level = i;
break;
}
}
if (( ind_level >= 0 ) && ( abstractNum->m_arrLvl[ind_level] ))
{
if ((abstractNum->m_arrLvl[ind_level]->m_oNumFmt.IsInit()) && (abstractNum->m_arrLvl[ind_level]->m_oNumFmt->m_oVal.IsInit()))
{
std::wstring strLevelText;
if ((abstractNum->m_arrLvl[ind_level]->m_oLvlText.IsInit()) && (abstractNum->m_arrLvl[ind_level]->m_oLvlText->m_sVal.IsInit()))
{
strLevelText = string2std_string(abstractNum->m_arrLvl[ind_level]->m_oLvlText->m_sVal.get());
}
if (abstractNum->m_arrLvl[ind_level]->m_oNumFmt->m_oVal->GetValue() == SimpleTypes::numberformatBullet)
{
// -
if ((strLevelText.length() > 0) && (IsUnicodeSymbol(strLevelText[0]))) line += strLevelText + _T(" ");
else line += _T("* ");
}
else
{
std::wstring example = strLevelText;
for(int i = 0; i < 9; i++)
{
std::wstring num = _T("%") + ToWString(i + 1);
while(example.find(num) != example.npos)
{
switch(abstractNum->m_arrLvl[ind_level]->m_oNumFmt->m_oVal->GetValue())
{
case SimpleTypes::numberformatLowerLetter:
example.replace(example.find(num), 2, IntToLowerLetter(Lists[start + i]));
break;
case SimpleTypes::numberformatUpperLetter:
example.replace(example.find(num), 2, IntToUpperLetter(Lists[start + i]));
break;
case SimpleTypes::numberformatLowerRoman:
example.replace(example.find(num), 2, IntToLowerRoman(Lists[start + i]));
break;
case SimpleTypes::numberformatUpperRoman:
example.replace(example.find(num), 2, IntToUpperRoman(Lists[start + i]));
break;
default:
example.replace(example.find(num), 2, ToWString(Lists[start + i]));
break;
}
}
}
line += example + _T(" ");
}
}
}
}
}
}
bool inField = false;
for (long i=0; i < pParagraph->m_arrItems.size(); i++)
{
if (pParagraph->m_arrItems[i]->getType() == OOX::et_w_r)
{
OOX::Logic::CRun *run = dynamic_cast<OOX::Logic::CRun*>(pParagraph->m_arrItems[i]);
for (long j = 0 ; j < run->m_arrItems.size();j++)
{
if (run->m_arrItems[j]->getType() == OOX::et_w_fldChar)
{
OOX::Logic::CFldChar *fldChar = dynamic_cast<OOX::Logic::CFldChar*>(run->m_arrItems[j]);
if ((fldChar) && (fldChar->m_oFldCharType.IsInit()))
{
if (fldChar->m_oFldCharType->GetValue() == SimpleTypes::fldchartypeBegin) inField = true;
else inField = false;
}
}
else if (inField == false)
{
bool caps = false;
if ((run->m_oRunProperty) && (run->m_oRunProperty->m_oCaps.Init()) && (run->m_oRunProperty->m_oCaps->m_oVal.ToBool())) caps = true;
std::wstring wstr;
if (run->m_arrItems[j]->getType() == OOX::et_w_t)
{
OOX::Logic::CText* text = dynamic_cast<OOX::Logic::CText*>(run->m_arrItems[j]);
wstr = string2std_string(text->m_sText);
if(caps)
{
//std::locale loc;
//str = Encoding::unicode2utf8(std::toupper(wstr,loc));
}
}
if (run->m_arrItems[j]->getType() == OOX::et_w_footnoteReference || run->m_arrItems[j]->getType() == OOX::et_w_endnoteReference)
{// todooo Ref ????
NoteCount++;
std::wstring s = _T("[") + ToWString(NoteCount) + _T("]");
Notes.push_back(s);
if(run->m_arrItems[j]->getType() == OOX::et_w_footnoteReference)
{
smart_ptr<OOX::File> pFile = pDocument->Find(OOX::FileTypes::FootNote);
if (pFile.IsInit())
{
OOX::CFootnotes *pFootnotes = (OOX::CFootnotes*)pFile.operator->();
for (long r =0 ;r < pFootnotes->m_arrFootnote.size(); r++)
convert(pFootnotes->m_arrFootnote[r]->m_arrItems, Notes, Event, false, pDocument, pNumbering, pStyles);
}
}
else if(run->m_arrItems[j]->getType() == OOX::et_w_endnoteReference)
{
smart_ptr<OOX::File> pFile = pDocument->Find(OOX::FileTypes::EndNote);
if (pFile.IsInit())
{
OOX::CEndnotes *pEndnotes = (OOX::CEndnotes*)pFile.operator->();
for (long r =0 ;r < pEndnotes->m_arrEndnote.size(); r++)
convert(pEndnotes->m_arrEndnote[r]->m_arrItems, Notes, Event, false, pDocument, pNumbering, pStyles);
}
}
wstr.replace(wstr.find(_T("_")), 1 , ToWString(NoteCount));
}
line += wstr;
}
}
}
else
{
// ..
//line += pItem.toTxt();
}
}
return line;
}
std::wstring Converter_Impl::IntToLowerLetter(int number)
{
std::wstring result(number / 26 + 1, m_letters[(number % 26) - 1]);
return result;
}
std::wstring Converter_Impl::IntToUpperLetter(int number)
{
//std::locale loc;
std::wstring result(number / 26 + 1, m_letters[(number % 26) - 1]);
//result = std::toupper(result,loc);
return result;
}
std::wstring Converter_Impl::IntToLowerRoman(int number)
{
std::wstring result;
const std::wstring ixcm = _T("ixcm");
const std::wstring vxlcdm = _T("vxlcdm");
const std::wstring vld = _T("vld");
std::wstring str_num = ToWString(number);
int len = str_num.size();
int digit;
for(int i = 0; i < len; i++)
{
digit = str_num[len - i - 1] - '0';
if(i > 2)
{
std::wstring m(digit + 10 * (i - 3), 'm');
result = m + result;
}
else
{
if(((digit + 1) % 5) == 0)
{
result.insert(0, 1, vxlcdm[i * 2 + (digit + 1) / 5 - 1]);
result.insert(0, 1, ixcm[i]);
//result = ixcm[i] + vxlcdm[i * 2 + (digit + 1) / 5 - 1] + result;
}
else
{
std::wstring m(digit % 5, ixcm[i]);
if(digit >= 5)
result = vld[i] + m + result;
else
result = m + result;
}
}
}
return result;
}
std::wstring Converter_Impl::IntToUpperRoman(int number)
{
//std::locale loc;
std::wstring result = IntToLowerRoman(number);
//result = std::toupper(result,loc);
return result;
}
} // namespace Docx2Txt
#pragma once
#ifndef DOCX_2_TXT_CONVERTER_INCLUDE_H_
#define DOCX_2_TXT_CONVERTER_INCLUDE_H_
#include <vector>
#include <string>
namespace TxtXml
{
class ITxtXmlEvent;
}
namespace Docx2Txt
{
class Converter_Impl;
class Converter
{
public:
Converter();
~Converter();
void convert(TxtXml::ITxtXmlEvent& Event);
void read (const std::wstring& path);
void write (const std::wstring& path);
void writeUtf8 (const std::wstring& path) const;
void writeUnicode (const std::wstring& path) const;
void writeBigEndian (const std::wstring& path) const;
void writeAnsi (const std::wstring& path) const;
private:
Converter_Impl * converter_;
};
} // namespace Docx2Txt
#endif // DOCX_2_TXT_CONVERTER_INCLUDE_H_
#include "Converter.h"
#include "../../../../Common/DocxFormat/Source/DocxFormat/Docx.h"
#include "../TxtFormat/TxtFormat.h"
#include "../TxtXmlEvent.h"
namespace Txt2Docx
{
class Converter_Impl
{
public:
Converter_Impl(int encoding);
void convert(TxtXml::ITxtXmlEvent& Event);
Txt::File m_inputFile;
OOX::CDocument m_outputFile;
};
Converter::Converter(int encoding) : converter_( new Converter_Impl(encoding) )
{
}
Converter::~Converter()
{
delete converter_;
}
void Converter::convert(TxtXml::ITxtXmlEvent& Event)
{
return converter_->convert(Event);
}
void Converter::read(const std::wstring& path)
{
return converter_->m_inputFile.read(path);
}
void Converter::write(/*const std::wstring& path*/XmlUtils::CStringWriter & stringWriter)
{
for (long i=0;i < converter_->m_outputFile.m_arrItems.size(); i++)
{
if (converter_->m_outputFile.m_arrItems[i] != NULL)
stringWriter.WriteString(converter_->m_outputFile.m_arrItems[i]->toXML());
}
//BOOL res = converter_->m_outputFile.Write(std_string2string(path.string()));
return;
}
Converter_Impl::Converter_Impl(int encoding)
{
m_inputFile.m_nEncoding = encoding;
}
void Converter_Impl::convert(TxtXml::ITxtXmlEvent& Event)
{
//smart_ptr<OOX::File> pFile = m_outputFile.Find(OOX::FileTypes::Document);
OOX::CDocument *pDocument = &m_outputFile;//NULL;
if (!m_inputFile.m_listContent.empty() /*&& pFile.IsInit() && OOX::FileTypes::Document == pFile->type()*/)
{
//pDocument = (OOX::CDocument*)pFile.operator->();
//pDocument->ClearItems();
int percent = 100000;
int step = 800000 / m_inputFile.m_listContentSize; // !!!!!
bool cancel = Event.Progress(0, 100000);
if(cancel)
return;
/*
OOX::Logic::ParagraphProperty pPr;
OOX::Logic::Spacing space;
space.After = 0;
space.Line = 240;
space.LineRule = "auto";
pPr.Spacing = space;
OOX::Logic::RFonts rFont;
rFont.Ascii = "Courier New";
rFont.HAnsi = "Courier New";
rFont.Cs = "Courier New";
OOX::Logic::RunProperty rPr;
rPr.RFonts = rFont;
pPr.RunProperty = rPr;
OOX::Logic::Paragraph paragraph;
paragraph.Property = pPr;
*/
for (std::list<std::wstring>::iterator line = m_inputFile.m_listContent.begin(); line != m_inputFile.m_listContent.end(); line++)
{
//OOX::Logic::ParagraphProperty pPr;
//OOX::Logic::Spacing space;
//space.After = 0;
//space.Line = 240;
//space.LineRule = "auto";
//pPr.Spacing = space;
//OOX::Logic::RFonts rFont;
//rFont.Ascii = "Courier New";
//rFont.HAnsi = "Courier New";
//rFont.Cs = "Courier New";
//OOX::Logic::RunProperty rPr;
//rPr.RFonts = rFont;
//pPr.RunProperty = rPr;
//OOX::Logic::Paragraph paragraph;
//paragraph.Property = pPr;
OOX::Logic::CParagraph *temp = new OOX::Logic::CParagraph();
while(line->find(_T("\x08")) != line->npos)
{
line->erase(line->find(_T("\x08")), 1);//, "");
}
if(line->length() > 0)
{
CString s = std_string2string(*line);
temp->AddText(s);//, rPr);
}
pDocument->m_arrItems.push_back(temp);
percent += step;
cancel = Event.Progress(0, percent);
if(cancel)
return;
}
}
Event.Progress(0, 900000);
}
} // namespace Txt2Docx
#pragma once
#ifndef TXT_2_DOCX_CONVERTER_INCLUDE_H_
#define TXT_2_DOCX_CONVERTER_INCLUDE_H_
#include "../../../../Common/DocxFormat/Source/XML/Utils.h"
namespace TxtXml
{
class ITxtXmlEvent;
}
namespace Txt2Docx
{
class Converter_Impl;
class Converter
{
public:
Converter (int encoding);
~Converter ();
void convert(TxtXml::ITxtXmlEvent& Event);
void read (const std::wstring& path);
void write (XmlUtils::CStringWriter & stringWriter/*const std::wstring& path*/);
private:
Converter_Impl * converter_;
};
} // namespace Txt2Docx
#endif // TXT_2_DOCX_CONVERTER_INCLUDE_H_
......@@ -22,7 +22,7 @@ namespace Txt
if (filename.empty())
return;
TxtFile file(std_string2string(filename));
TxtFile file(filename);
std::list<std::string> codePageContent = file.readAnsiOrCodePage();
m_listContentSize = file.getLinesCount();
......@@ -40,7 +40,7 @@ namespace Txt
if (filename.empty())
return;
TxtFile file(std_string2string(filename));
TxtFile file(filename);
//
......@@ -74,13 +74,13 @@ namespace Txt
void File::write(const std::wstring& filename) const
{
TxtFile file(std_string2string(filename));
TxtFile file(filename);
file.writeUtf8(_transform(m_listContent, Encoding::unicode2utf8));
}
void File::writeCodePage(const std::wstring& filename, int code_page) const
{
TxtFile file(std_string2string(filename));
TxtFile file(filename);
std::list<std::string> result;
for (std::list<std::wstring>::const_iterator iter = m_listContent.begin(); iter != m_listContent.end(); ++iter)
......@@ -93,29 +93,28 @@ namespace Txt
void File::writeUtf8(const std::wstring& filename) const
{
TxtFile file(std_string2string(filename));
TxtFile file(filename);
file.writeUtf8(_transform(m_listContent, Encoding::unicode2utf8));
}
void File::writeUnicode(const std::wstring& filename) const
{
TxtFile file(std_string2string(filename));
TxtFile file(filename);
file.writeUnicode(m_listContent);
}
void File::writeBigEndian(const std::wstring& filename) const
{
OOX::CPath path (filename);
TxtFile file(path);
TxtFile file(filename);
file.writeBigEndian(m_listContent);
}
void File::writeAnsi(const std::wstring& filename) const
{
TxtFile file(std_string2string(filename));
TxtFile file(filename);
file.writeAnsiOrCodePage(_transform(m_listContent, Encoding::unicode2ansi));
}
......
......@@ -36,7 +36,7 @@ static std::wstring convertUtf16ToWString(UTF16 * Data, int nLength)
return wstr;
}
TxtFile::TxtFile(const OOX::CPath& path) : m_path(path), m_linesCount(0)
TxtFile::TxtFile(const std::wstring & path) : m_path(path), m_linesCount(0)
{
}
const int TxtFile::getLinesCount()
......@@ -48,7 +48,7 @@ const std::list<std::string> TxtFile::readAnsiOrCodePage() // == readUtf8without
std::list<std::string> result;
CFile file_binary;
if (file_binary.OpenFile(m_path.GetPath()) != S_OK) return result;
if (file_binary.OpenFile(std_string2string(m_path)) != S_OK) return result;
long file_size = file_binary.GetFileSize();
char *file_data = new char[file_size];
......@@ -84,7 +84,7 @@ const std::list<std::wstring> TxtFile::readUnicode()
std::list<std::wstring> result;
CFile file_binary;
if (file_binary.OpenFile(m_path.GetPath()) != S_OK) return result;
if (file_binary.OpenFile(std_string2string(m_path)) != S_OK) return result;
long file_size = file_binary.GetFileSize();
char *file_data = new char[file_size];
......@@ -133,7 +133,7 @@ const std::list<std::wstring> TxtFile::readBigEndian()
std::list<std::wstring> result;
CFile file_binary;
if (file_binary.OpenFile(m_path.GetPath()) != S_OK) return result;
if (file_binary.OpenFile(std_string2string(m_path)) != S_OK) return result;
long file_size = file_binary.GetFileSize();
char *file_data = new char[file_size];
......@@ -198,7 +198,7 @@ const std::list<std::string> TxtFile::readUtf8()
std::list<std::string> result;
CFile file_binary;
if (file_binary.OpenFile(m_path.GetPath()) != S_OK) return result;
if (file_binary.OpenFile(std_string2string(m_path)) != S_OK) return result;
long file_size = file_binary.GetFileSize();
char *file_data = new char[file_size];
......@@ -231,7 +231,7 @@ const std::list<std::string> TxtFile::readUtf8()
void TxtFile::writeAnsiOrCodePage(const std::list<std::string>& content) // === writeUtf8withoutPref
{
CFile file;
if (file.CreateFile(m_path.GetPath()) == S_OK)
if (file.CreateFile(std_string2string(m_path)) == S_OK)
{
BYTE endLine[2] = {0x0d, 0x0a};
for (std::list<std::string>::const_iterator iter = content.begin(); iter != content.end(); ++iter)
......@@ -247,7 +247,7 @@ void TxtFile::writeAnsiOrCodePage(const std::list<std::string>& content) // ===
void TxtFile::writeUnicode(const std::list<std::wstring>& content)
{
CFile file;
if (file.CreateFile(m_path.GetPath()) == S_OK)
if (file.CreateFile(std_string2string(m_path)) == S_OK)
{
BYTE Header[2] = {0xff, 0xfe};
BYTE EndLine[4] = {0x0d, 0x00, 0x0a, 0x00};
......@@ -277,7 +277,7 @@ void TxtFile::writeUnicode(const std::list<std::wstring>& content)
void TxtFile::writeBigEndian(const std::list<std::wstring>& content)
{
CFile file;
if (file.CreateFile(m_path.GetPath()) == S_OK)
if (file.CreateFile(std_string2string(m_path)) == S_OK)
{
BYTE Header[2] = {0xfe, 0xff};
BYTE EndLine[4] = {0x00, 0x0d, 0x00, 0x0a};
......@@ -313,7 +313,7 @@ void TxtFile::writeBigEndian(const std::list<std::wstring>& content)
void TxtFile::writeUtf8(const std::list<std::string>& content)
{
CFile file;
if (file.CreateFile(m_path.GetPath()) == S_OK)
if (file.CreateFile(std_string2string(m_path)) == S_OK)
{
BYTE Header[3] = {0xef ,0xbb , 0xbf};
BYTE EndLine[2] = {0x0d ,0x0a};
......@@ -334,7 +334,7 @@ const bool TxtFile::isUnicode()
{
CFile file;
if (file.OpenFile(m_path.GetPath()) != S_OK) return false;
if (file.OpenFile(std_string2string(m_path)) != S_OK) return false;
BYTE data [2];
file.ReadFile(data,2);
......@@ -349,7 +349,7 @@ const bool TxtFile::isBigEndian()
{
CFile file;
if (file.OpenFile(m_path.GetPath()) != S_OK) return false;
if (file.OpenFile(std_string2string(m_path)) != S_OK) return false;
BYTE data [2];
file.ReadFile(data,2);
......@@ -364,7 +364,7 @@ const bool TxtFile::isUtf8()
{
CFile file;
if (file.OpenFile(m_path.GetPath()) != S_OK) return false;
if (file.OpenFile(std_string2string(m_path)) != S_OK) return false;
BYTE data [3];
file.ReadFile(data,3);
......
......@@ -10,7 +10,7 @@
class TxtFile
{
public:
TxtFile(const OOX::CPath& path);
TxtFile(const std::wstring & path);
const std::list<std::string> readAnsiOrCodePage();
const std::list<std::wstring> readUnicode();
......@@ -30,8 +30,8 @@ public:
const int getLinesCount();
private:
OOX::CPath m_path;
int m_linesCount;
std::wstring m_path;
int m_linesCount;
};
#endif // UTILITY_TXT_FILE_INCLUDE_H_
\ No newline at end of file
......@@ -88,7 +88,7 @@ HRESULT CTxtXmlFile::txt_LoadFromFile(const std::wstring & sSrcFileName, const s
//As Text
Writers::FileWriter *pDocxWriter = new Writers::FileWriter(sDstPath, _T(""), 1, false, NULL, _T(""));
Writers::FileWriter *pDocxWriter = new Writers::FileWriter(std_string2string(sDstPath), _T(""), 1, false, NULL, _T(""));
if (pDocxWriter == NULL) return S_FALSE;
CreateDocxEmpty(std_string2string(sDstPath), pDocxWriter);
......
......@@ -6,6 +6,7 @@
#if defined(_WIN32) || defined(_WIN64)
#include <windows.h>
#include <atlstr.h>
#else
#include "../../../DesktopEditor/common/ASCVariant.h"
#endif
......
......@@ -272,75 +272,6 @@
<References>
</References>
<Files>
<Filter
Name="Docx2Txt"
>
<File
RelativePath="..\Source\Docx2Txt\Converter.cpp"
>
<FileConfiguration
Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/bigobj"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\Source\Docx2Txt\Converter.h"
>
</File>
</Filter>
<Filter
Name="Txt2Docx"
>
<File
RelativePath="..\Source\Txt2Docx\Converter.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\$(InputName)1.obj"
XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/bigobj"
ObjectFile="$(IntDir)\$(InputName)1.obj"
XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\$(InputName)1.obj"
XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\$(InputName)1.obj"
XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\Source\Txt2Docx\Converter.h"
>
</File>
</Filter>
<Filter
Name="TxtFormat"
>
......@@ -481,6 +412,22 @@
</File>
</Filter>
</Filter>
<File
RelativePath="..\Source\ConvertDocx2Txt.cpp"
>
</File>
<File
RelativePath="..\Source\ConvertDocx2Txt.h"
>
</File>
<File
RelativePath="..\Source\ConvertTxt2Docx.cpp"
>
</File>
<File
RelativePath="..\Source\ConvertTxt2Docx.h"
>
</File>
<File
RelativePath="..\Source\TxtXmlFile.cpp"
>
......
......@@ -117,17 +117,16 @@
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="Release"
IntermediateDirectory="Release"
Name="Debug|x64"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="2"
UseOfATL="1"
UseOfATL="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
CommandLine="..\..\Redist\VersionControl.exe $(ProjectDir)\..\version.h"
/>
<Tool
Name="VCCustomBuildTool"
......@@ -140,9 +139,9 @@
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
PreprocessorDefinitions="_DEBUG"
MkTypLibCompatible="false"
TargetEnvironment="1"
TargetEnvironment="3"
GenerateStublessProxies="true"
TypeLibraryName="$(IntDir)/ASCOfficeTxtFile.tlb"
HeaderFileName="ASCOfficeTxtFile.h"
......@@ -152,9 +151,12 @@
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="&quot;..\..\..\DesktopEditor\freetype-2.5.2\include&quot;"
PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG;_USRDLL;_ATL_ATTRIBUTES;_USE_XMLLITE_READER_;USE_LITE_READER;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED"
RuntimeLibrary="2"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions="WIN32;_WINDOWS;_DEBUG;_USRDLL;_ATL_ATTRIBUTES;_USE_XMLLITE_READER_;USE_LITE_READER;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
UsePrecompiledHeader="2"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
......@@ -165,7 +167,7 @@
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
PreprocessorDefinitions="_DEBUG"
Culture="1049"
AdditionalIncludeDirectories="$(IntDir)"
/>
......@@ -176,17 +178,14 @@
Name="VCLinkerTool"
IgnoreImportLibrary="true"
OutputFile="$(OutDir)/ASCOfficeTxtFile.dll"
LinkIncremental="1"
LinkIncremental="2"
AdditionalLibraryDirectories=""
IgnoreDefaultLibraryNames="LIBC.lib"
IgnoreDefaultLibraryNames="LIBCMTD.lib"
MergedIDLBaseFileName="_ASCOfficeTxtFile.idl"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
ImportLibrary="$(OutDir)/ASCOfficeTxtFile.lib"
TargetMachine="1"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
......@@ -212,11 +211,11 @@
<Tool
Name="VCPostBuildEventTool"
Description="Performing registration"
CommandLine="regsvr32 /s /c &quot;$(TargetPath)&quot;&#x0D;&#x0A;copy &quot;$(TargetPath)&quot; &quot;$(SolutionDir)..\..\Redist&quot;&#x0D;&#x0A;"
CommandLine="regsvr32 /s /c &quot;$(TargetPath)&quot;"
/>
</Configuration>
<Configuration
Name="ReleaseASC|Win32"
Name="Release|Win32"
OutputDirectory="Release"
IntermediateDirectory="Release"
ConfigurationType="2"
......@@ -226,8 +225,7 @@
>
<Tool
Name="VCPreBuildEventTool"
CommandLine="..\..\..\Redist\VersionControl.exe $(ProjectDir)\version.h"
ExcludedFromBuild="true"
CommandLine="..\..\Redist\VersionControl.exe $(ProjectDir)\..\version.h"
/>
<Tool
Name="VCCustomBuildTool"
......@@ -252,8 +250,8 @@
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="Source;.\..\Common\ASCDocxFormat\Source\Utility;.\..\Common\ASCDocxFormat\Source\XML;.\..\Common\ASCDocxFormat\Source\Common;.\..\Common\ASCDocxFormat\Source\DocxFormat;Source\TxtFormat;Source\XmlFormat"
PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG;_USRDLL;_ATL_ATTRIBUTES"
AdditionalIncludeDirectories="&quot;..\..\..\DesktopEditor\freetype-2.5.2\include&quot;"
PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG;_USRDLL;_ATL_ATTRIBUTES;_USE_XMLLITE_READER_;USE_LITE_READER;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED"
RuntimeLibrary="2"
UsePrecompiledHeader="2"
WarningLevel="3"
......@@ -265,7 +263,7 @@
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG;ASCBUILD"
PreprocessorDefinitions="NDEBUG"
Culture="1049"
AdditionalIncludeDirectories="$(IntDir)"
/>
......@@ -275,10 +273,9 @@
<Tool
Name="VCLinkerTool"
IgnoreImportLibrary="true"
AdditionalDependencies="comsvcs.lib comsuppw.lib Msimg32.lib"
OutputFile="..\Redist\ASCOfficeTxtFile.dll"
OutputFile="$(OutDir)/ASCOfficeTxtFile.dll"
LinkIncremental="1"
AdditionalLibraryDirectories="..\ASCOfficeUtils\ZLIB\zlib123dll\static32"
AdditionalLibraryDirectories=""
IgnoreDefaultLibraryNames="LIBC.lib"
MergedIDLBaseFileName="_ASCOfficeTxtFile.idl"
GenerateDebugInformation="true"
......@@ -313,20 +310,21 @@
<Tool
Name="VCPostBuildEventTool"
Description="Performing registration"
CommandLine="regsvr32 /s /c &quot;$(TargetPath)&quot;"
CommandLine="regsvr32 /s /c &quot;$(TargetPath)&quot;&#x0D;&#x0A;copy &quot;$(TargetPath)&quot; &quot;$(SolutionDir)..\..\Redist&quot;&#x0D;&#x0A;"
/>
</Configuration>
<Configuration
Name="Debug|x64"
Name="Release|x64"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="2"
UseOfATL="0"
UseOfATL="1"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
CommandLine="..\..\Redist\VersionControl.exe $(ProjectDir)\..\version.h"
/>
<Tool
Name="VCCustomBuildTool"
......@@ -339,7 +337,7 @@
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="_DEBUG"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="false"
TargetEnvironment="3"
GenerateStublessProxies="true"
......@@ -351,12 +349,9 @@
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions="WIN32;_WINDOWS;_DEBUG;_USRDLL;_ATL_ATTRIBUTES;_USE_XMLLITE_READER_;USE_LITE_READER;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
AdditionalIncludeDirectories="&quot;..\..\..\DesktopEditor\freetype-2.5.2\include&quot;"
PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG;_USRDLL;_ATL_ATTRIBUTES;_USE_XMLLITE_READER_;USE_LITE_READER;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED"
RuntimeLibrary="2"
UsePrecompiledHeader="2"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
......@@ -367,7 +362,7 @@
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
PreprocessorDefinitions="NDEBUG"
Culture="1049"
AdditionalIncludeDirectories="$(IntDir)"
/>
......@@ -378,12 +373,15 @@
Name="VCLinkerTool"
IgnoreImportLibrary="true"
OutputFile="$(OutDir)/ASCOfficeTxtFile.dll"
LinkIncremental="2"
LinkIncremental="1"
AdditionalLibraryDirectories=""
IgnoreDefaultLibraryNames="LIBCMTD.lib"
IgnoreDefaultLibraryNames="LIBC.lib"
MergedIDLBaseFileName="_ASCOfficeTxtFile.idl"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
ImportLibrary="$(OutDir)/ASCOfficeTxtFile.lib"
TargetMachine="17"
/>
......@@ -411,13 +409,13 @@
<Tool
Name="VCPostBuildEventTool"
Description="Performing registration"
CommandLine="regsvr32 /s /c &quot;$(TargetPath)&quot;"
CommandLine="regsvr32 /s /c &quot;$(TargetPath)&quot;&#x0D;&#x0A;copy &quot;$(TargetPath)&quot; &quot;$(SolutionDir)..\..\Redist\x64&quot;&#x0D;&#x0A;"
/>
</Configuration>
<Configuration
Name="Release|x64"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
Name="ReleaseASC|Win32"
OutputDirectory="Release"
IntermediateDirectory="Release"
ConfigurationType="2"
UseOfATL="1"
ATLMinimizesCRunTimeLibraryUsage="false"
......@@ -425,7 +423,8 @@
>
<Tool
Name="VCPreBuildEventTool"
CommandLine="..\..\Redist\VersionControl.exe $(ProjectDir)\..\version.h"
CommandLine="..\..\..\Redist\VersionControl.exe $(ProjectDir)\version.h"
ExcludedFromBuild="true"
/>
<Tool
Name="VCCustomBuildTool"
......@@ -440,7 +439,7 @@
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="false"
TargetEnvironment="3"
TargetEnvironment="1"
GenerateStublessProxies="true"
TypeLibraryName="$(IntDir)/ASCOfficeTxtFile.tlb"
HeaderFileName="ASCOfficeTxtFile.h"
......@@ -450,8 +449,8 @@
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="&quot;..\..\..\DesktopEditor\freetype-2.5.2\include&quot;"
PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG;_USRDLL;_ATL_ATTRIBUTES;_USE_XMLLITE_READER_;USE_LITE_READER;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED"
AdditionalIncludeDirectories="Source;.\..\Common\ASCDocxFormat\Source\Utility;.\..\Common\ASCDocxFormat\Source\XML;.\..\Common\ASCDocxFormat\Source\Common;.\..\Common\ASCDocxFormat\Source\DocxFormat;Source\TxtFormat;Source\XmlFormat"
PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG;_USRDLL;_ATL_ATTRIBUTES"
RuntimeLibrary="2"
UsePrecompiledHeader="2"
WarningLevel="3"
......@@ -463,7 +462,7 @@
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
PreprocessorDefinitions="NDEBUG;ASCBUILD"
Culture="1049"
AdditionalIncludeDirectories="$(IntDir)"
/>
......@@ -473,9 +472,10 @@
<Tool
Name="VCLinkerTool"
IgnoreImportLibrary="true"
OutputFile="$(OutDir)/ASCOfficeTxtFile.dll"
AdditionalDependencies="comsvcs.lib comsuppw.lib Msimg32.lib"
OutputFile="..\Redist\ASCOfficeTxtFile.dll"
LinkIncremental="1"
AdditionalLibraryDirectories=""
AdditionalLibraryDirectories="..\ASCOfficeUtils\ZLIB\zlib123dll\static32"
IgnoreDefaultLibraryNames="LIBC.lib"
MergedIDLBaseFileName="_ASCOfficeTxtFile.idl"
GenerateDebugInformation="true"
......@@ -484,7 +484,7 @@
OptimizeReferences="2"
EnableCOMDATFolding="2"
ImportLibrary="$(OutDir)/ASCOfficeTxtFile.lib"
TargetMachine="17"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
......@@ -510,7 +510,7 @@
<Tool
Name="VCPostBuildEventTool"
Description="Performing registration"
CommandLine="regsvr32 /s /c &quot;$(TargetPath)&quot;&#x0D;&#x0A;copy &quot;$(TargetPath)&quot; &quot;$(SolutionDir)..\..\Redist\x64&quot;&#x0D;&#x0A;"
CommandLine="regsvr32 /s /c &quot;$(TargetPath)&quot;"
/>
</Configuration>
<Configuration
......@@ -635,7 +635,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
......@@ -643,7 +643,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="ReleaseASC|Win32"
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
......@@ -651,7 +651,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|x64"
Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
......@@ -659,7 +659,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
Name="ReleaseASC|Win32"
>
<Tool
Name="VCCLCompilerTool"
......@@ -675,6 +675,42 @@
/>
</FileConfiguration>
</File>
<File
RelativePath="..\..\Common\DocxFormat\Source\XML\libxml2\libxml2.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
/>
</FileConfiguration>
</File>
<File
RelativePath=".\stdafx.cpp"
>
......@@ -688,7 +724,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
......@@ -697,7 +733,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="ReleaseASC|Win32"
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
......@@ -706,7 +742,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|x64"
Name="Release|x64"
>
<Tool
Name="VCCLCompilerTool"
......@@ -715,7 +751,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
Name="ReleaseASC|Win32"
>
<Tool
Name="VCCLCompilerTool"
......
......@@ -2,6 +2,6 @@
//1
//0
//1
//68
#define INTVER 1,0,1,68
#define STRVER "1,0,1,68\0"
//80
#define INTVER 1,0,1,80
#define STRVER "1,0,1,80\0"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment