Compare commits

...

22 Commits

Author SHA1 Message Date
59d2dd2840 . 2019-06-27 12:24:51 +03:00
967ab71adc XLsFormat - fix bug #41967 2019-06-26 15:37:01 +03:00
a48322f1cc [x2t] Fix CStreamBinaryWriter 2019-06-25 20:20:28 +03:00
bd41922f66 OdfFormatWriter - fix bug #41956 2019-06-25 17:55:49 +03:00
ccd73c8c68 [ios][x2t] fixed build 2019-06-25 15:33:38 +03:00
5b6659f816 [android][x2t] fix build 2019-06-25 14:40:02 +03:00
7a4cf11c62 [x2t] Revert some merged files in 2019-06-24 17:31:42 +03:00
9b9d7df4e2 Merge remote-tracking branch 'remotes/origin/hotfix/v5.3.3' into develop
# Conflicts:
#	Common/DocxFormat/Source/XlsxFormat/SharedStrings/Text.h
2019-06-24 15:05:16 +03:00
c9330ee0f1 Feature/bug 41890 (#164)
* [x2t] Decode xlsx escaped chars

* [x2t] Fix bug #41890, #36575. Add CStringBuilder::WriteEncodeXmlStringHHHH
2019-06-24 14:56:02 +03:00
2214362426 Fix boost download error 2019-06-24 14:51:39 +03:00
bdce91fccf Merge hotfix/v5.3.2 into develop 2019-06-21 18:38:23 +03:00
dd65f70fcb [ios][x2t] add support bitcode 2019-06-21 16:23:32 +03:00
bf600c6eb0 Core/mac build (#161) 2019-06-21 12:54:00 +03:00
0db6728463 Fix 3rdparty building 2019-06-20 14:32:51 +03:00
09c43b1179 Remove curl & add errors to bat files (#159) 2019-06-19 17:20:12 +03:00
390ab3bcc8 [ios] add constants (#157) 2019-06-18 13:46:28 +03:00
075f70c220 Fix prefious commit (#156) 2019-06-17 16:17:14 +03:00
6abf1613ec Fix mac build (#155) 2019-06-17 15:58:07 +03:00
0abc21d4ee Merge pull request #154 from ONLYOFFICE/ios/fixed-build
Fix ios build
2019-06-17 14:13:41 +03:00
7a7cdab770 up 2019-06-17 14:10:11 +03:00
7ae3c6f2ea Fix bug with svg (#153) 2019-06-07 15:22:15 +03:00
35bd2803a4 v5.3.1 2019-06-06 12:32:18 +03:00
62 changed files with 1306 additions and 523 deletions

View File

@ -342,6 +342,7 @@
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
English,
en,
);
mainGroup = 17E17ED31AC453F800BEA2EA;
@ -384,7 +385,7 @@
17C1FEC01ACC42C4006B99B3 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ENABLE_BITCODE = NO;
ENABLE_BITCODE = YES;
EXECUTABLE_PREFIX = lib;
GCC_ENABLE_CPP_EXCEPTIONS = YES;
GCC_ENABLE_CPP_RTTI = YES;
@ -416,7 +417,7 @@
17C1FEC11ACC42C4006B99B3 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ENABLE_BITCODE = NO;
ENABLE_BITCODE = YES;
EXECUTABLE_PREFIX = lib;
GCC_ENABLE_CPP_EXCEPTIONS = YES;
GCC_ENABLE_CPP_RTTI = YES;

View File

@ -303,14 +303,14 @@ void odf_text_context::start_element(office_element_ptr & elm, office_element_pt
text_elements_list_.push_back(state);
if (!current_level_.empty())
if (false == current_level_.empty())
current_level_.back().elm->add_child_element(elm);
current_level_.push_back(state);
}
void odf_text_context::end_element()
{
if (single_paragraph_ == false && !current_level_.empty())
if (single_paragraph_ == false && false == current_level_.empty())
{
current_level_.pop_back();
}
@ -349,7 +349,7 @@ void odf_text_context::start_span(bool styled)
if (style_)
{
if (parent_span_style_.length() >0)
if (false == parent_span_style_.empty())
{
style_->style_parent_style_name_ = parent_span_style_;
}
@ -371,7 +371,7 @@ void odf_text_context::end_span()
{
if (styles_context_ == NULL || single_paragraph_)return;
if (current_level_.size() > 0)
if (false == current_level_.empty())
current_level_.pop_back();
text_properties_ = NULL;
@ -396,7 +396,7 @@ void odf_text_context::start_list_item()
text_elements_list_.push_back(state);
if (current_level_.size()>0)
if (false == current_level_.empty())
current_level_.back().elm->add_child_element(list_elm);
current_level_.push_back(state);
@ -410,14 +410,14 @@ void odf_text_context::end_list_item()
if (list_state_.levels.back() == false) return;
if (current_level_.size() > 0)
if (false == current_level_.empty())
current_level_.pop_back();
list_state_.levels.back() = false;
}
void odf_text_context::start_list(std::wstring style_name) //todoooo add new_numbering ???
bool odf_text_context::start_list(std::wstring style_name) //todoooo add new_numbering ???
{
if (styles_context_ == NULL || single_paragraph_)return;
if (styles_context_ == NULL || single_paragraph_)return false;
office_element_ptr list_elm;
create_element(L"text", L"list", list_elm, odf_context_);
@ -427,7 +427,7 @@ void odf_text_context::start_list(std::wstring style_name) //todoooo add new_num
office_element_ptr style_elm;
odf_element_state state = { list_elm, style_name, style_elm, level};
if (style_name.length() > 0)
if (false == style_name.empty())
{
text_list* list = dynamic_cast<text_list*>(list_elm.get());
if (list)
@ -443,13 +443,15 @@ void odf_text_context::start_list(std::wstring style_name) //todoooo add new_num
}
text_elements_list_.push_back(state);
if (current_level_.size()>0)
if (false == current_level_.empty())
current_level_.back().elm->add_child_element(list_elm);
current_level_.push_back(state);
list_state_.levels.push_back(false);
list_state_.started_list = true;
return true;
}
void odf_text_context::end_list()
{
@ -574,7 +576,7 @@ void odf_text_context::add_hyperlink (std::wstring ref, std::wstring display_tex
hyperlink->common_xlink_attlist_.href_ = ref;
hyperlink->common_xlink_attlist_.type_ = xlink_type::Simple;
if (current_level_.size()>0)
if (false == current_level_.empty())
current_level_.back().elm->add_child_element(elm);
}
@ -657,7 +659,7 @@ bool odf_text_context::set_type_break(int type, int clear)//todooo clear ???
office_element_ptr elm;
create_element(L"text", L"line-break", elm, odf_context_);
if (current_level_.size()>0)
if (false == current_level_.empty())
current_level_.back().elm->add_child_element(elm);
}
return need_restart;

View File

@ -107,7 +107,7 @@ public:
void start_list_item ();
void end_list_item ();
void start_list (std::wstring style_name);
bool start_list (std::wstring style_name);
void end_list ();
bool is_need_break (){return bool(need_break_);}

View File

@ -1060,47 +1060,46 @@ void ods_table_state::add_or_find_cell_shared_formula(std::wstring & formula, st
if (col2 - col1 > 0)moving_type = 1;
}
ods_shared_formula_state state = {(unsigned int)ind, odf_formula,ref, current_table_column_,current_table_row_, moving_type};
shared_formulas_.push_back(state);
shared_formulas_.insert(std::make_pair((unsigned int)ind, state));
cell->attlist_.table_formula_ = odf_formula;
cells_.back().empty = false;
}
else
{
for (size_t i = 0; i < shared_formulas_.size() ;i++)
std::map<unsigned int, ods_shared_formula_state>::iterator pFind = shared_formulas_.find(ind);
if (pFind != shared_formulas_.end())
{
if (shared_formulas_[i].index == ind)
{
odf_formula = shared_formulas_[i].formula;
odf_formula = pFind->second.formula;
//поменять по ref формулу !!!
if (shared_formulas_[i].moving_type == 1)
{
tmp_column_ = shared_formulas_[i].base_column;
tmp_row_ = shared_formulas_[i].base_row;
const std::wstring res = boost::regex_replace(
odf_formula,
boost::wregex(L"([a-zA-Z]{1,3}[0-9]{1,3})|(?='.*?')|(?=\".*?\")"),
&ods_table_state::replace_cell_column,
boost::match_default | boost::format_all);
odf_formula = res;
}
if (shared_formulas_[i].moving_type == 2)
{
tmp_column_ = shared_formulas_[i].base_column;
tmp_row_ = shared_formulas_[i].base_row;
const std::wstring res = boost::regex_replace(
odf_formula,
boost::wregex(L"([a-zA-Z]{1,3}[0-9]{1,3})|(?='.*?')|(?=\".*?\")"),
&ods_table_state::replace_cell_row,
boost::match_default | boost::format_all);
odf_formula = res;
}
cell->attlist_.table_formula_ = odf_formula;
cells_.back().empty = false;
//поменять по ref формулу !!!
if (pFind->second.moving_type == 1)
{
tmp_column_ = pFind->second.base_column;
tmp_row_ = pFind->second.base_row;
const std::wstring res = boost::regex_replace(
odf_formula,
boost::wregex(L"([a-zA-Z]{1,3}[0-9]{1,3})|(?='.*?')|(?=\".*?\")"),
&ods_table_state::replace_cell_column,
boost::match_default | boost::format_all);
odf_formula = res;
}
else if (pFind->second.moving_type == 2)
{
tmp_column_ = pFind->second.base_column;
tmp_row_ = pFind->second.base_row;
const std::wstring res = boost::regex_replace(
odf_formula,
boost::wregex(L"([a-zA-Z]{1,3}[0-9]{1,3})|(?='.*?')|(?=\".*?\")"),
&ods_table_state::replace_cell_row,
boost::match_default | boost::format_all);
odf_formula = res;
}
cell->attlist_.table_formula_ = odf_formula;
cells_.back().empty = false;
}
}
}

View File

@ -453,8 +453,8 @@ private:
std::vector<ods_cell_state> cells_;
long cells_size_;
std::vector<ods_hyperlink_state> hyperlinks_;
std::vector<ods_shared_formula_state> shared_formulas_;
std::vector<ods_hyperlink_state> hyperlinks_;
std::map<unsigned int, ods_shared_formula_state> shared_formulas_;
std::vector<table_part_state> table_parts_;

View File

@ -1052,19 +1052,22 @@ void odt_conversion_context::start_list_item(int level, std::wstring style_name
if (text_context()->list_state_.started_list == false)
{
text_context()->start_list(style_name);
//text_context()->set_list_continue(true); //??? держать в памяти все списки????
add_to_root();
if (text_context()->start_list(style_name))
{
//text_context()->set_list_continue(true); //??? держать в памяти все списки????
add_to_root();
}
}
text_context()->start_list_item();
text_context()->start_list_item();
if (text_context()->list_state_.style_name == style_name)
style_name = L"";
while (text_context()->list_state_.levels.size() < level)
{
text_context()->start_list(style_name);
if (false == text_context()->start_list(style_name))
break;
text_context()->start_list_item();
}
}
@ -1076,7 +1079,7 @@ void odt_conversion_context::set_no_list()
{
if (text_context()->list_state_.started_list == false) return;
while (text_context()->list_state_.levels.size()>0)
while (false == text_context()->list_state_.levels.empty())
{
text_context()->end_list_item();
text_context()->end_list();
@ -1205,16 +1208,16 @@ void odt_conversion_context::end_comment_content()
}
void odt_conversion_context::end_comment(int oox_comm_id)
{
bool added = comment_context_.find_by_id(oox_comm_id);
int index_added = comment_context_.find_by_id(oox_comm_id);
if (added == true)
if (index_added > 0 )
{
office_element_ptr comm_elm;
create_element(L"office", L"annotation-end", comm_elm, this);
comment_context_.end_comment(comm_elm, oox_comm_id);
if (text_context()->current_level_.size() > 0)
if (false == text_context()->current_level_.empty())
text_context()->current_level_.back().elm->add_child_element(comm_elm);
}
}

View File

@ -1854,7 +1854,10 @@ void OoxConverter::convert(PPTX::Logic::Paragraph *oox_paragraph, PPTX::Logic::T
{
while ((int)odf_context()->text_context()->list_state_.levels.size() < list_level)
{
odf_context()->text_context()->start_list(list_style_name);
if (false == odf_context()->text_context()->start_list(list_style_name))
{
break;
}
odf_context()->text_context()->start_list_item();
if (odf_context()->text_context()->list_state_.style_name == list_style_name)

View File

@ -1129,7 +1129,17 @@ namespace NSBinPptxRW
}
void CBinaryFileWriter::_WriteStringWithLength(const WCHAR* sBuffer, _UINT32 lCount, bool bByte)
{
CheckBufferSize(UINT32_SIZEOF);
//CheckBufferSize at first to prevent negative m_lPosition after Flush in CStreamBinaryWriter
if (sizeof(wchar_t) == 4)
{
_INT32 lSizeMemMax = 4 * lCount + 2;//2 - for null terminator
CheckBufferSize(UINT32_SIZEOF + lSizeMemMax);
}
else
{
_INT32 lSizeMem = 2 * lCount;
CheckBufferSize(UINT32_SIZEOF + lSizeMem);
}
//skip size
m_lPosition += UINT32_SIZEOF;
m_pStreamCur += UINT32_SIZEOF;

View File

@ -3592,6 +3592,7 @@
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
English,
en,
);
mainGroup = 17063B5A1AC5708E0056A3F1;
@ -3771,7 +3772,7 @@
17C1FE891ACC429D006B99B3 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ENABLE_BITCODE = NO;
ENABLE_BITCODE = YES;
EXECUTABLE_PREFIX = lib;
GCC_ENABLE_CPP_EXCEPTIONS = YES;
GCC_ENABLE_CPP_RTTI = YES;
@ -3802,7 +3803,7 @@
17C1FE8A1ACC429D006B99B3 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ENABLE_BITCODE = NO;
ENABLE_BITCODE = YES;
EXECUTABLE_PREFIX = lib;
GCC_ENABLE_CPP_EXCEPTIONS = YES;
GCC_ENABLE_CPP_RTTI = YES;

View File

@ -212,7 +212,7 @@ const bool WorksheetSubstream::loadContent(BinProcessor& proc)
count = proc.repeated<BIGNAME>(0, 0);
while(count > 0)
{
m_arBIGNAME.insert(m_arNote.begin(), elements_.back());
m_arBIGNAME.insert(m_arBIGNAME.begin(), elements_.back());
elements_.pop_back();
count--;
}

View File

@ -31,9 +31,9 @@ NO_FRAMEWORK=
BOOST_VERSION=1.58.0
BOOST_VERSION2=1_58_0
MIN_IOS_VERSION=8.0
IOS_SDK_VERSION=`xcodebuild -showsdks | grep iphoneos | \
IOS_SDK_VERSION=`xcodebuild BITCODE_GENERATION_MODE="bitcode" ENABLE_BITCODE="YES" OTHER_CFLAGS="-fembed-bitcode" -showsdks | grep iphoneos | \
egrep "[[:digit:]]+\.[[:digit:]]+" -o | tail -1`
OSX_SDK_VERSION=`xcodebuild -showsdks | grep macosx | \
OSX_SDK_VERSION=`xcodebuild BITCODE_GENERATION_MODE="bitcode" ENABLE_BITCODE="YES" OTHER_CFLAGS="-fembed-bitcode" -showsdks | grep macosx | \
egrep "[[:digit:]]+\.[[:digit:]]+" -o | tail -1`
XCODE_ROOT=`xcode-select -print-path`
@ -46,7 +46,7 @@ XCODE_ROOT=`xcode-select -print-path`
#
# Should perhaps also consider/use instead: -BOOST_SP_USE_PTHREADS
EXTRA_CPPFLAGS="-DBOOST_AC_USE_PTHREADS -DBOOST_SP_USE_PTHREADS -g -DNDEBUG \
-std=c++11 -stdlib=libc++ -fvisibility=hidden -fvisibility-inlines-hidden"
-std=c++11 -stdlib=libc++ -fvisibility=hidden -fvisibility-inlines-hidden -fembed-bitcode"
EXTRA_IOS_CPPFLAGS="$EXTRA_CPPFLAGS -mios-version-min=$MIN_IOS_VERSION"
EXTRA_OSX_CPPFLAGS="$EXTRA_CPPFLAGS"
@ -342,17 +342,20 @@ buildBoost()
echo Building Boost for iPhone
# Install this one so we can copy the headers for the frameworks...
./b2 -j16 --build-dir=iphone-build --stagedir=iphone-build/stage \
cxxflags="-fembed-bitcode" \
--prefix=$PREFIXDIR toolset=darwin architecture=arm target-os=iphone \
macosx-version=iphone-${IOS_SDK_VERSION} define=_LITTLE_ENDIAN \
link=static stage
./b2 -j16 --build-dir=iphone-build --stagedir=iphone-build/stage \
--prefix=$PREFIXDIR toolset=darwin architecture=arm \
cxxflags="-fembed-bitcode" \
target-os=iphone macosx-version=iphone-${IOS_SDK_VERSION} \
define=_LITTLE_ENDIAN link=static install
doneSection
echo Building Boost for iPhoneSimulator
./b2 -j16 --build-dir=iphonesim-build --stagedir=iphonesim-build/stage \
cxxflags="-fembed-bitcode" \
toolset=darwin-${IOS_SDK_VERSION}~iphonesim architecture=x86 \
target-os=iphone macosx-version=iphonesim-${IOS_SDK_VERSION} \
link=static stage

View File

@ -26,15 +26,15 @@ if not exist "%folder%" (
md %folder%\shared
.\b2.exe --clean
.\bjam.exe link=static --with-filesystem --with-system --with-date_time --with-regex --toolset=%TOOLSET%
.\bjam.exe link=static --with-filesystem --with-system --with-date_time --with-regex --toolset=%TOOLSET% || goto :error
XCOPY /Y stage\lib\* "%folder%\static\"
.\b2.exe --clean
.\bjam.exe link=static cxxflags=-fPIC --with-filesystem --with-system --with-date_time --with-regex --toolset=%TOOLSET%
.\bjam.exe link=static cxxflags=-fPIC --with-filesystem --with-system --with-date_time --with-regex --toolset=%TOOLSET% || goto :error
XCOPY /Y stage\lib\* "%folder%\static_fpic\"
.\b2.exe --clean
.\bjam.exe link=shared --with-filesystem --with-system --with-date_time --with-regex --toolset=%TOOLSET%
.\bjam.exe link=shared --with-filesystem --with-system --with-date_time --with-regex --toolset=%TOOLSET% || goto :error
XCOPY /Y stage\lib\* "%folder%\shared\"
)
@ -54,14 +54,20 @@ if not exist "%folder%" (
md %folder%\shared
.\b2.exe --clean
.\bjam.exe link=static --with-filesystem --with-system --with-date_time --with-regex address-model=64 --toolset=%TOOLSET%
.\bjam.exe link=static --with-filesystem --with-system --with-date_time --with-regex address-model=64 --toolset=%TOOLSET% || goto :error
XCOPY /Y stage\lib\* "%folder%\static\"
.\b2.exe --clean
.\bjam.exe link=static cxxflags=-fPIC --with-filesystem --with-system --with-date_time --with-regex address-model=64 --toolset=%TOOLSET%
.\bjam.exe link=static cxxflags=-fPIC --with-filesystem --with-system --with-date_time --with-regex address-model=64 --toolset=%TOOLSET% || goto :error
XCOPY /Y stage\lib\* "%folder%\static_fpic\"
.\b2.exe --clean
.\bjam.exe link=shared --with-filesystem --with-system --with-date_time --with-regex address-model=64 --toolset=%TOOLSET%
.\bjam.exe link=shared --with-filesystem --with-system --with-date_time --with-regex address-model=64 --toolset=%TOOLSET% || goto :error
XCOPY /Y stage\lib\* "%folder%\shared\"
)
exit /b 0
:error
echo "Failed with error #%errorlevel%."
exit /b %errorlevel%

View File

@ -1,7 +1,5 @@
#!/bin/bash
SCRIPT=$(readlink -f "$0" || grealpath "$0")
SCRIPTPATH=$(dirname "$SCRIPT")
SCRIPTPATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
os=$(uname -s)
platform=""

View File

@ -4,7 +4,7 @@ CD /D %~dp0
if exist "%SCRIPTPATH%boost_1_58_0.7z" (
echo "boost already downloaded"
) else (
Powershell.exe Invoke-WebRequest -OutFile boost_1_58_0.7z http://freefr.dl.sourceforge.net/project/boost/boost/1.58.0/boost_1_58_0.7z
Powershell.exe Invoke-WebRequest -OutFile boost_1_58_0.7z https://downloads.sourceforge.net/project/boost/boost/1.58.0/boost_1_58_0.7z
)
SET UNSIP_PROGRAMM="C:\Program Files\7-Zip\7z.exe"

View File

@ -1,7 +1,6 @@
#!/bin/bash
SCRIPT=$(readlink -f "$0" || grealpath "$0")
SCRIPTPATH=$(dirname "$SCRIPT")
SCRIPTPATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
BOOST_URL=https://downloads.sourceforge.net/project/boost/boost/1.58.0/boost_1_58_0.7z
os=$(uname -s)
platform=""
@ -12,21 +11,11 @@ case "$os" in
*) exit ;;
esac
if [[ "$platform" == *"mac"* ]]
then
if [[ -f "$SCRIPTPATH/7zX_1.7.1.dmg" ]]
then
echo "7z already downloaded"
else
wget http://static.updatestar.net/dl/7zX/7zX_1.7.1.dmg
fi
fi
if [[ -f "$SCRIPTPATH/boost_1_58_0.7z" ]]
then
echo "boost already downloaded"
else
wget http://freefr.dl.sourceforge.net/project/boost/boost/1.58.0/boost_1_58_0.7z
wget $BOOST_URL || curl -O $BOOST_URL
fi
if [ -d "$SCRIPTPATH/boost_1_58_0" ]; then
@ -36,8 +25,6 @@ if [[ "$platform" == *"linux"* ]]
then
7z x -y "$SCRIPTPATH/boost_1_58_0.7z" -o"$SCRIPTPATH/"
else
hdiutil mount "$SCRIPTPATH/7zX_1.7.1.dmg"
/Volumes/7zX/7zX.app/Contents/Resources/7za x "$SCRIPTPATH/boost_1_58_0.7z" -o"$SCRIPTPATH/"
hdiutil unmount /Volumes/7zX
7za x "$SCRIPTPATH/boost_1_58_0.7z" -o"$SCRIPTPATH/"
fi
fi

View File

@ -1,7 +1,5 @@
#!/bin/bash
SCRIPT=$(readlink -f "$0" || grealpath "$0")
SCRIPTPATH=$(dirname "$SCRIPT")
SCRIPTPATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
os=$(uname -s)
platform=""
@ -42,9 +40,10 @@ cef_version="3163"
if [[ "$platform" == *"linux"* ]]
then
cef_version="3202"
fi
cef_url=http://d2ettrnqo7v976.cloudfront.net/cef/$cef_version/$platform$arch/$cef_arch
else
cef_url=http://d2ettrnqo7v976.cloudfront.net/cef/$cef_version/$platform/$cef_arch
fi
if [[ "$platform" == *"linux"* ]]
then
@ -75,3 +74,15 @@ then
cp -r -t build/ ./$cef_binary/Release/* ./$cef_binary/Resources/*
chmod a+xr build/locales
fi
if [[ "$platform" == *"mac"* ]]
then
if [ -d "build/Chromium Embedded Framework.framework" ]
then
echo "cef_binary already extracted"
else
wget $cef_url || curl -O $cef_url
7za x $cef_arch
mv "$cef_binary" "build/Chromium Embedded Framework.framework"
fi
fi

View File

@ -1,43 +0,0 @@
SET SCRIPTPATH=%~dp0
CD /D %~dp0
SET MACHINE=x86
if defined ProgramFiles(x86) (
SET MACHINE=x64
)
if "%TARGET%" == "win-32" (
SET MACHINE=x86
)
if "%TARGET%" == "win-64" (
SET MACHINE=x64
)
if "%MACHINE%" == "x86" (
SET OUTPUT=win_32
)
if "%MACHINE%" == "x64" (
SET OUTPUT=win_64
)
SET VC=%ProgramFiles%\Microsoft Visual Studio 12.0\VC
SET VC64=%ProgramFiles(x86)%\Microsoft Visual Studio 12.0\VC
if exist %VC64% (
SET VC=%VC64%
)
call "%VC%\vcvarsall.bat" %MACHINE%
cd curl
call buildconf.bat
cd winbuild
nmake /f Makefile.vc mode=static ENABLE_WINSSL=yes MACHINE=%MACHINE% VC=12
if not exist "%SCRIPTPATH%%OUTPUT%" (
md %SCRIPTPATH%%OUTPUT%\build
xcopy /Y /S ..\builds\libcurl-vc12-%MACHINE%-release-static-ipv6-sspi-winssl\lib\libcurl_a.lib %SCRIPTPATH%%OUTPUT%\build\
move %SCRIPTPATH%%OUTPUT%\build\libcurl_a.lib %SCRIPTPATH%%OUTPUT%\build\curl.lib
)
cd ..\..

View File

@ -1,73 +0,0 @@
SCRIPT=$(readlink -f "$0" || grealpath "$0")
SCRIPTPATH=$(dirname "$SCRIPT")
os=$(uname -s)
platform=""
case "$os" in
Linux*)
platform="linux"
BUILD_PLATFORM=Linux
;;
Darwin*)
platform="mac"
BUILD_PLATFORM=MacOSX
;;
*) exit ;;
esac
architecture=$(uname -m)
arch=""
case "$architecture" in
x86_64*) arch="_64" ;;
*) arch="_32" ;;
esac
if [[ -d "$SCRIPTPATH/$platform$arch" ]]
then
echo
else
mkdir "$SCRIPTPATH/$platform$arch"
fi
CURL_FOLDER=curl
cd ${CURL_FOLDER}
if [[ ! -f configure ]]
then
./buildconf
fi
if [[ ! -f Makefile ]]
then
./configure \
--disable-shared \
--enable-static \
--disable-ldap \
--disable-sspi \
--without-librtmp \
--disable-ftp \
--disable-file \
--disable-dict \
--disable-telnet \
--disable-tftp \
--disable-rtsp \
--disable-pop3 \
--disable-imap \
--disable-smtp \
--disable-gopher \
--disable-smb \
--without-libidn
fi
make
if [ ! -d "$SCRIPTPATH/$platform$arch/build" ]
then
DESTDIR="$SCRIPTPATH/$platform$arch" make install
mkdir -p "$SCRIPTPATH/$platform$arch/build"
cp "$SCRIPTPATH/$platform$arch/usr/local/lib/libcurl.a" "$SCRIPTPATH/$platform$arch/build/"
fi

View File

@ -1,5 +0,0 @@
core_linux {
INCLUDEPATH += $$PWD/$$CORE_BUILDS_PLATFORM_PREFIX/usr/local/include
LIBS += -lcurl
}

View File

@ -1,7 +0,0 @@
CD /D %~dp0
SET CURL_FOLDER=curl
IF NOT EXIST %CURL_FOLDER% CALL git clone https://github.com/curl/curl.git %CURL_FOLDER%
CD %CURL_FOLDER%
CALL git fetch
CALL git checkout curl-7_54_1
CD ..

View File

@ -1,8 +0,0 @@
CURL_FOLDER=curl
if [ ! -d ${CURL_FOLDER} ]; then
git clone https://github.com/curl/curl.git ${CURL_FOLDER}
fi
cd ${CURL_FOLDER}
git fetch
git checkout curl-7_54_1
cd ..

View File

@ -1,7 +1,5 @@
#!/bin/bash
SCRIPT=$(readlink -f "$0" || grealpath "$0")
SCRIPTPATH=$(dirname "$SCRIPT")
SCRIPTPATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
ICU_MAJOR_VER=58
ICU_MINOR_VER=2
@ -59,11 +57,19 @@ else
svn export http://source.icu-project.org/repos/icu/tags/release-$ICU_MAJOR_VER-$ICU_MINOR_VER/icu4c ./icu
fi
# Workaround for building icu older than 60.0
# on systems without xlocale.h (removed from glibc since 2.26)
# See https://sourceware.org/glibc/wiki/Release/2.26#Removal_of_.27xlocale.h.27
# See https://bugs.archlinux.org/task/55246
sed -i 's/xlocale/locale/' ./icu/source/i18n/digitlst.cpp
if [[ "$platform" == *"linux"* ]]
then
# Workaround for building icu older than 60.0
# on systems without xlocale.h (removed from glibc since 2.26)
# See https://sourceware.org/glibc/wiki/Release/2.26#Removal_of_.27xlocale.h.27
# See https://bugs.archlinux.org/task/55246
sed -i 's/xlocale/locale/' ./icu/source/i18n/digitlst.cpp
fi
if [[ "$platform" == *"mac"* ]]
then
sed -i -e 's/cmd\, \"%s %s -o %s%s %s %s%s %s %s\"\,/cmd\, \"%s %s -o %s%s %s %s %s %s %s\"\,/' ./icu/source/tools/pkgdata/pkgdata.cpp
fi
cd ./icu/source/

View File

@ -1,7 +1,5 @@
#!/bin/bash
SCRIPT=$(readlink -f "$0" || grealpath "$0")
SCRIPTPATH=$(dirname "$SCRIPT")
SCRIPTPATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
ICU_MAJOR_VER=62
ICU_MINOR_VER=1

View File

@ -14,7 +14,13 @@ FOR /f "tokens=*" %%i in ('DIR /a:d /b *') DO (
ECHO %%i
if exist %%i/build.bat (
call %%i/build.bat
call %%i/build.bat || goto :error
)
)
exit /b 0
:error
echo "Failed with error #%errorlevel%."
exit /b %errorlevel%

View File

@ -1,8 +1,7 @@
#!/bin/bash
set -e
SCRIPT=$(readlink -f "$0" || grealpath "$0")
SCRIPTPATH=$(dirname "$SCRIPT")
SCRIPTPATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
cd "$SCRIPTPATH"

View File

@ -1,7 +1,5 @@
#!/bin/bash
SCRIPT=$(readlink -f "$0" || grealpath "$0")
SCRIPTPATH=$(dirname "$SCRIPT")
SCRIPTPATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
cd "$SCRIPTPATH"/openssl

View File

@ -1,7 +1,5 @@
#!/bin/bash
SCRIPT=$(readlink -f "$0" || grealpath "$0")
SCRIPTPATH=$(dirname "$SCRIPT")
SCRIPTPATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
cd "$SCRIPTPATH"

View File

@ -9,19 +9,25 @@ call powershell -File .\fix-static_crt.ps1
cd v8
call gn gen out.gn/win_64/release --args="is_debug=false target_cpu=\"x64\" v8_target_cpu=\"x64\" v8_static_library=true is_component_build=false v8_use_snapshot=false is_clang=false"
call ninja -C out.gn/win_64/release
call ninja -C out.gn/win_64/release || goto :error
call gn gen out.gn/win_64/debug --args="is_debug=true target_cpu=\"x64\" v8_target_cpu=\"x64\" v8_static_library=true is_component_build=false v8_use_snapshot=false is_clang=false"
call ninja -C out.gn/win_64/debug
call ninja -C out.gn/win_64/debug || goto :error
call gn gen out.gn/win_32/release --args="is_debug=false target_cpu=\"x86\" v8_target_cpu=\"x86\" v8_static_library=true is_component_build=false v8_use_snapshot=false is_clang=false"
call ninja -C out.gn/win_32/release
call ninja -C out.gn/win_32/release || goto :error
call gn gen out.gn/win_32/debug --args="is_debug=true target_cpu=\"x86\" v8_target_cpu=\"x86\" v8_static_library=true is_component_build=false v8_use_snapshot=false is_clang=false"
call ninja -C out.gn/win_32/debug
call ninja -C out.gn/win_32/debug || goto :error
rem v8_use_snapshot=true v8_use_external_startup_data=true
if not "%BUILD_PLATFORM%"=="%BUILD_PLATFORM:xp=%" (
call %~dp0v8_xp\build.bat
call %~dp0v8_xp\build.bat || goto :error
cd %~dp0
)
)
exit /b 0
:error
echo "Failed with error #%errorlevel%."
exit /b %errorlevel%

View File

@ -2,8 +2,7 @@
export PATH=`pwd`/depot_tools:"$PATH"
SCRIPT=$(readlink -f "$0" || grealpath "$0")
SCRIPTPATH=$(dirname "$SCRIPT")
SCRIPTPATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
os=$(uname -s)
platform=""
@ -38,6 +37,7 @@ fi
if [[ "$platform" == "mac" ]]
then
sed -i -e "s/if (mac_sdk_version != mac_sdk_min_build_override/if (false \&\& mac_sdk_version != mac_sdk_min_build_override/g" build/config/mac/mac_sdk.gni
# for new macOS!!!
#sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
gn gen out.gn/mac_64 --args='is_debug=false target_cpu="x64" v8_static_library=true is_component_build=false v8_use_snapshot=false'

View File

@ -1,7 +1,5 @@
#!/bin/bash
SCRIPT=$(readlink -f "$0" || grealpath "$0")
SCRIPTPATH=$(dirname "$SCRIPT")
SCRIPTPATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
cd "$SCRIPTPATH"

View File

@ -1,7 +1,5 @@
#!/bin/bash
SCRIPT=$(readlink -f "$0")
SCRIPTPATH=$(dirname "$SCRIPT")
SCRIPTPATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
export PATH=`pwd`/depot_tools:"$PATH"

View File

@ -27,8 +27,8 @@ if not exist "win_32" (
cd "%SCRIPTPATH%v8\tools\gyp"
call devenv v8.sln /Rebuild "Release"
call devenv v8.sln /Rebuild "Debug"
call devenv v8.sln /Rebuild "Release" || goto :error
call devenv v8.sln /Rebuild "Debug" || goto :error
cd "%SCRIPTPATH%"
@ -51,8 +51,8 @@ if not exist "win_64" (
cd "%SCRIPTPATH%v8\tools\gyp"
call devenv v8.sln /Rebuild "Release"
call devenv v8.sln /Rebuild "Debug"
call devenv v8.sln /Rebuild "Release" || goto :error
call devenv v8.sln /Rebuild "Debug" || goto :error
cd "%SCRIPTPATH%"
@ -62,3 +62,9 @@ if not exist "win_64" (
XCOPY /Y "v8\build\Debug\lib\*" "win_64\debug\"
XCOPY /Y "v8\build\Debug\icudt.dll" "win_64\debug\"
)
exit /b 0
:error
echo "Failed with error #%errorlevel%."
exit /b %errorlevel%

View File

@ -232,6 +232,9 @@
8A5B8FD5226F5AF20093271E /* ActiveX.h in Headers */ = {isa = PBXBuildFile; fileRef = 8A5B8FD3226F5AF20093271E /* ActiveX.h */; };
8A5B8FD6226F5AF20093271E /* ActiveX.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8A5B8FD4226F5AF20093271E /* ActiveX.cpp */; };
8A5B8FD8226F61010093271E /* VmlDrawing.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8A5B8FD7226F61000093271E /* VmlDrawing.cpp */; };
8ADF9DA222BB9C4800918F34 /* Si.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8ADF9DA122BB9C4700918F34 /* Si.cpp */; };
8ADF9DA422BB9C4F00918F34 /* Text.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8ADF9DA322BB9C4F00918F34 /* Text.cpp */; };
8ADF9DA622BBA07D00918F34 /* rPr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8ADF9DA522BBA07D00918F34 /* rPr.cpp */; };
8AE10E722228255A00A542DE /* Comments.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AE10E712228255900A542DE /* Comments.cpp */; };
8AE10E742228257E00A542DE /* ConditionalFormatting.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AE10E732228257D00A542DE /* ConditionalFormatting.cpp */; };
8AECC18F218C991900DEE19A /* App.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AECC18E218C991900DEE19A /* App.cpp */; };
@ -476,6 +479,9 @@
8A5B8FD3226F5AF20093271E /* ActiveX.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ActiveX.h; sourceTree = "<group>"; };
8A5B8FD4226F5AF20093271E /* ActiveX.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ActiveX.cpp; sourceTree = "<group>"; };
8A5B8FD7226F61000093271E /* VmlDrawing.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = VmlDrawing.cpp; sourceTree = "<group>"; };
8ADF9DA122BB9C4700918F34 /* Si.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Si.cpp; sourceTree = "<group>"; };
8ADF9DA322BB9C4F00918F34 /* Text.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Text.cpp; sourceTree = "<group>"; };
8ADF9DA522BBA07D00918F34 /* rPr.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = rPr.cpp; sourceTree = "<group>"; };
8AE10E712228255900A542DE /* Comments.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Comments.cpp; sourceTree = "<group>"; };
8AE10E732228257D00A542DE /* ConditionalFormatting.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ConditionalFormatting.cpp; sourceTree = "<group>"; };
8AECC18E218C991900DEE19A /* App.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = App.cpp; sourceTree = "<group>"; };
@ -891,7 +897,9 @@
17E6A16B1AC4262800F28F8B /* Run.h */,
17E6A16C1AC4262800F28F8B /* SharedStrings.h */,
17E6A16D1AC4262800F28F8B /* Si.h */,
8ADF9DA122BB9C4700918F34 /* Si.cpp */,
17E6A16E1AC4262800F28F8B /* Text.h */,
8ADF9DA322BB9C4F00918F34 /* Text.cpp */,
);
path = SharedStrings;
sourceTree = "<group>";
@ -907,6 +915,7 @@
17E6A1761AC4262800F28F8B /* Fonts.h */,
17E6A1771AC4262800F28F8B /* NumFmts.h */,
17E6A1781AC4262800F28F8B /* rPr.h */,
8ADF9DA522BBA07D00918F34 /* rPr.cpp */,
17E6A1791AC4262800F28F8B /* Styles.h */,
17E6A17A1AC4262800F28F8B /* TableStyles.h */,
17E6A17B1AC4262800F28F8B /* Xfs.h */,
@ -1254,6 +1263,7 @@
17C1FBA41ACC4250006B99B3 /* Docx.cpp in Sources */,
17C1FBA51ACC4250006B99B3 /* ZIndex.cpp in Sources */,
8A404FCC2089FFE700F2D5CF /* Directory.cpp in Sources */,
8ADF9DA422BB9C4F00918F34 /* Text.cpp in Sources */,
17C1FBA61ACC4250006B99B3 /* ParagraphProperty.cpp in Sources */,
17C1FBA71ACC4250006B99B3 /* NumFormat.cpp in Sources */,
17C1FBA81ACC4250006B99B3 /* SystemUtility.cpp in Sources */,
@ -1268,11 +1278,13 @@
17C1FBAF1ACC4250006B99B3 /* ChartSerialize.cpp in Sources */,
17C1FBB11ACC4250006B99B3 /* Position.cpp in Sources */,
69E6AC8C2031ACA900795D9D /* VbaProject.cpp in Sources */,
8ADF9DA222BB9C4800918F34 /* Si.cpp in Sources */,
8A404FCE208A001E00F2D5CF /* Path.cpp in Sources */,
8AE10E742228257E00A542DE /* ConditionalFormatting.cpp in Sources */,
691C3E131F20C3D500F1775E /* File.cpp in Sources */,
17C1FBB21ACC4250006B99B3 /* Vml.cpp in Sources */,
8A5B8FD8226F61010093271E /* VmlDrawing.cpp in Sources */,
8ADF9DA622BBA07D00918F34 /* rPr.cpp in Sources */,
17C1FBB31ACC4250006B99B3 /* unicode_util.cpp in Sources */,
17C1FBB41ACC4250006B99B3 /* FldSimple.cpp in Sources */,
69DE2217206E24A700A07A0E /* JsaProject.cpp in Sources */,
@ -1301,7 +1313,7 @@
buildSettings = {
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
ENABLE_BITCODE = NO;
ENABLE_BITCODE = YES;
EXECUTABLE_PREFIX = lib;
GCC_ENABLE_CPP_EXCEPTIONS = YES;
GCC_ENABLE_CPP_RTTI = YES;
@ -1339,7 +1351,7 @@
buildSettings = {
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
ENABLE_BITCODE = NO;
ENABLE_BITCODE = YES;
EXECUTABLE_PREFIX = lib;
GCC_ENABLE_CPP_EXCEPTIONS = YES;
GCC_ENABLE_CPP_RTTI = YES;

View File

@ -61,7 +61,7 @@ namespace OOX
if(std::wstring::npos != m_sText.find(' ') || std::wstring::npos != m_sText.find('\n'))
writer.WriteString(_T(" xml:space=\"preserve\""));
writer.WriteString(_T(">"));
writer.WriteEncodeXmlString(m_sText);
writer.WriteEncodeXmlStringHHHH(m_sText);
writer.WriteString(_T("</t>"));
}
virtual void toXML2(NSStringUtils::CStringBuilder& writer, const wchar_t* name) const
@ -71,7 +71,7 @@ namespace OOX
if(std::wstring::npos != m_sText.find(' ') || std::wstring::npos != m_sText.find('\n'))
writer.WriteString(_T(" xml:space=\"preserve\""));
writer.WriteString(_T(">"));
writer.WriteEncodeXmlString(m_sText);
writer.WriteEncodeXmlStringHHHH(m_sText);
writer.WriteString(_T("</"));
writer.WriteString(name);
writer.WriteString(_T(">"));
@ -83,7 +83,21 @@ namespace OOX
if ( oReader.IsEmptyNode() )
return;
m_sText = oReader.GetText3();
int nDepth = oReader.GetDepth();
XmlUtils::XmlNodeType eNodeType = XmlUtils::XmlNodeType_EndElement;
while (oReader.Read(eNodeType) && oReader.GetDepth() >= nDepth && XmlUtils::XmlNodeType_EndElement != eNodeType)
{
if (eNodeType == XmlUtils::XmlNodeType_Text || eNodeType == XmlUtils::XmlNodeType_Whitespace || eNodeType == XmlUtils::XmlNodeType_SIGNIFICANT_WHITESPACE)
{
std::string sTemp = oReader.GetTextA();
wchar_t* pUnicodes = NULL;
LONG lOutputCount = 0;
NSFile::CUtf8Converter::GetUnicodeStringFromUTF8WithHHHH((BYTE*)sTemp.c_str(), sTemp.length(), pUnicodes, lOutputCount);
m_sText.append(pUnicodes);
RELEASEARRAYOBJECTS(pUnicodes);
}
}
trimString(m_sText, GetSpace());
}
static void fromXMLToXLSB(XmlUtils::CXmlLiteReader& oReader, SimpleTypes::Spreadsheet::ECellTypeType eType, _UINT16& nType, double& dValue, unsigned int& nValue, BYTE& bValue, std::wstring** psValue, bool& bForceFormula);

View File

@ -121,6 +121,10 @@ namespace NSFile
std::wstring CUtf8Converter::GetUnicodeFromCharPtr(const std::string& sParam, INT bIsUtf8)
{
return GetUnicodeFromCharPtr(sParam.c_str(), (LONG)sParam.length(), bIsUtf8);
}
LONG CUtf8Converter::GetUnicodeStringFromUTF8BufferSize(LONG lCount)
{
return lCount + 1;
}
std::wstring CUtf8Converter::GetUnicodeStringFromUTF8_4bytes( BYTE* pBuffer, LONG lCount )
{
@ -305,6 +309,249 @@ namespace NSFile
return GetUnicodeStringFromUTF8_4bytes(pBuffer, lCount);
}
#define CHECK_HHHH(pBuffer) \
wchar_t code = 0; \
if('_' == pBuffer[0] && 'x' == pBuffer[1] && 0 != pBuffer[2] && 0 != pBuffer[3] && 0 != pBuffer[4] && 0 != pBuffer[5] && '_' == pBuffer[6]) \
{ \
int i = 2; \
for(; i < 6; ++i) \
{ \
code *= 16; \
if('0' <= pBuffer[i] && pBuffer[i] <= '9') \
{ \
code += pBuffer[i] - '0'; \
} \
else if('A' <= pBuffer[i] && pBuffer[i] <= 'F') \
{ \
code += pBuffer[i] - 'A' + 10; \
} \
else if('a' <= pBuffer[i] && pBuffer[i] <= 'f') \
{ \
code += pBuffer[i] - 'a' + 10; \
} \
else \
{ \
break; \
} \
} \
if(i == 6) \
{ \
if(0x005F == code) \
{ \
code = '_'; \
} \
return code; \
} \
} \
return -1;
long CUtf8Converter::CheckHHHHChar(const BYTE* pBuffer)
{
CHECK_HHHH(pBuffer);
}
long CUtf8Converter::CheckHHHHChar(const wchar_t* pBuffer)
{
CHECK_HHHH(pBuffer);
}
void CUtf8Converter::GetUnicodeStringFromUTF8WithHHHH_4bytes( const BYTE* pBuffer, LONG lCount, wchar_t*& pUnicodes, LONG& lOutputCount )
{
if (NULL == pUnicodes)
{
pUnicodes = new wchar_t[GetUnicodeStringFromUTF8BufferSize(lCount)];
}
WCHAR* pUnicodeString = pUnicodes;
LONG lIndexUnicode = 0;
LONG lIndex = 0;
while (lIndex < lCount)
{
BYTE byteMain = pBuffer[lIndex];
if (0x00 == (byteMain & 0x80))
{
// 1 byte
long code = CheckHHHHChar(pBuffer + lIndex);
if(code < 0)
{
pUnicodeString[lIndexUnicode++] = (WCHAR)byteMain;
++lIndex;
}
else
{
pUnicodeString[lIndexUnicode++] = (WCHAR)code;
lIndex += 7;
}
}
else if (0x00 == (byteMain & 0x20))
{
// 2 byte
int val = (int)(((byteMain & 0x1F) << 6) |
(pBuffer[lIndex + 1] & 0x3F));
pUnicodeString[lIndexUnicode++] = (WCHAR)(val);
lIndex += 2;
}
else if (0x00 == (byteMain & 0x10))
{
// 3 byte
int val = (int)(((byteMain & 0x0F) << 12) |
((pBuffer[lIndex + 1] & 0x3F) << 6) |
(pBuffer[lIndex + 2] & 0x3F));
pUnicodeString[lIndexUnicode++] = (WCHAR)(val);
lIndex += 3;
}
else if (0x00 == (byteMain & 0x0F))
{
// 4 byte
int val = (int)(((byteMain & 0x07) << 18) |
((pBuffer[lIndex + 1] & 0x3F) << 12) |
((pBuffer[lIndex + 2] & 0x3F) << 6) |
(pBuffer[lIndex + 3] & 0x3F));
pUnicodeString[lIndexUnicode++] = (WCHAR)(val);
lIndex += 4;
}
else if (0x00 == (byteMain & 0x08))
{
// 4 byte
int val = (int)(((byteMain & 0x07) << 18) |
((pBuffer[lIndex + 1] & 0x3F) << 12) |
((pBuffer[lIndex + 2] & 0x3F) << 6) |
(pBuffer[lIndex + 3] & 0x3F));
pUnicodeString[lIndexUnicode++] = (WCHAR)(val);
lIndex += 4;
}
else if (0x00 == (byteMain & 0x04))
{
// 5 byte
int val = (int)(((byteMain & 0x03) << 24) |
((pBuffer[lIndex + 1] & 0x3F) << 18) |
((pBuffer[lIndex + 2] & 0x3F) << 12) |
((pBuffer[lIndex + 3] & 0x3F) << 6) |
(pBuffer[lIndex + 4] & 0x3F));
pUnicodeString[lIndexUnicode++] = (WCHAR)(val);
lIndex += 5;
}
else
{
// 6 byte
int val = (int)(((byteMain & 0x01) << 30) |
((pBuffer[lIndex + 1] & 0x3F) << 24) |
((pBuffer[lIndex + 2] & 0x3F) << 18) |
((pBuffer[lIndex + 3] & 0x3F) << 12) |
((pBuffer[lIndex + 4] & 0x3F) << 6) |
(pBuffer[lIndex + 5] & 0x3F));
pUnicodeString[lIndexUnicode++] = (WCHAR)(val);
lIndex += 5;
}
}
pUnicodeString[lIndexUnicode] = 0;
lOutputCount = lIndexUnicode;
}
void CUtf8Converter::GetUnicodeStringFromUTF8WithHHHH_2bytes( const BYTE* pBuffer, LONG lCount, wchar_t*& pUnicodes, LONG& lOutputCount )
{
if (NULL == pUnicodes)
{
pUnicodes = new wchar_t[GetUnicodeStringFromUTF8BufferSize(lCount)];
}
WCHAR* pUnicodeString = pUnicodes;
WCHAR* pStart = pUnicodeString;
LONG lIndex = 0;
while (lIndex < lCount)
{
BYTE byteMain = pBuffer[lIndex];
if (0x00 == (byteMain & 0x80))
{
// 1 byte
long code = CheckHHHHChar(pBuffer + lIndex);
if(code < 0)
{
*pUnicodeString++ = (WCHAR)byteMain;
++lIndex;
}
else
{
*pUnicodeString++ = (WCHAR)code;
lIndex += 7;
}
}
else if (0x00 == (byteMain & 0x20))
{
// 2 byte
int val = (int)(((byteMain & 0x1F) << 6) |
(pBuffer[lIndex + 1] & 0x3F));
*pUnicodeString++ = (WCHAR)(val);
lIndex += 2;
}
else if (0x00 == (byteMain & 0x10))
{
// 3 byte
int val = (int)(((byteMain & 0x0F) << 12) |
((pBuffer[lIndex + 1] & 0x3F) << 6) |
(pBuffer[lIndex + 2] & 0x3F));
WriteUtf16_WCHAR(val, pUnicodeString);
lIndex += 3;
}
else if (0x00 == (byteMain & 0x0F))
{
// 4 byte
int val = (int)(((byteMain & 0x07) << 18) |
((pBuffer[lIndex + 1] & 0x3F) << 12) |
((pBuffer[lIndex + 2] & 0x3F) << 6) |
(pBuffer[lIndex + 3] & 0x3F));
WriteUtf16_WCHAR(val, pUnicodeString);
lIndex += 4;
}
else if (0x00 == (byteMain & 0x08))
{
// 4 byte
int val = (int)(((byteMain & 0x07) << 18) |
((pBuffer[lIndex + 1] & 0x3F) << 12) |
((pBuffer[lIndex + 2] & 0x3F) << 6) |
(pBuffer[lIndex + 3] & 0x3F));
WriteUtf16_WCHAR(val, pUnicodeString);
lIndex += 4;
}
else if (0x00 == (byteMain & 0x04))
{
// 5 byte
int val = (int)(((byteMain & 0x03) << 24) |
((pBuffer[lIndex + 1] & 0x3F) << 18) |
((pBuffer[lIndex + 2] & 0x3F) << 12) |
((pBuffer[lIndex + 3] & 0x3F) << 6) |
(pBuffer[lIndex + 4] & 0x3F));
WriteUtf16_WCHAR(val, pUnicodeString);
lIndex += 5;
}
else
{
// 6 byte
int val = (int)(((byteMain & 0x01) << 30) |
((pBuffer[lIndex + 1] & 0x3F) << 24) |
((pBuffer[lIndex + 2] & 0x3F) << 18) |
((pBuffer[lIndex + 3] & 0x3F) << 12) |
((pBuffer[lIndex + 4] & 0x3F) << 6) |
(pBuffer[lIndex + 5] & 0x3F));
WriteUtf16_WCHAR(val, pUnicodeString);
lIndex += 5;
}
}
*pUnicodeString++ = 0;
lOutputCount = pUnicodeString - pStart;
}
void CUtf8Converter::GetUnicodeStringFromUTF8WithHHHH( const BYTE* pBuffer, LONG lCount, wchar_t*& pUnicodes, LONG& lOutputCount )
{
if (sizeof(WCHAR) == 2)
return GetUnicodeStringFromUTF8WithHHHH_2bytes(pBuffer, lCount, pUnicodes, lOutputCount);
return GetUnicodeStringFromUTF8WithHHHH_4bytes(pBuffer, lCount, pUnicodes, lOutputCount);
}
void CUtf8Converter::GetUtf8StringFromUnicode_4bytes(const wchar_t* pUnicodes, LONG lCount, BYTE*& pData, LONG& lOutputCount, bool bIsBOM)
{
if (NULL == pData)

View File

@ -1,187 +1,196 @@
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#if defined(GetTempPath)
#undef GetTempPath
#endif
#if defined(CreateFile)
#undef CreateFile
#endif
#if defined(CopyFile)
#undef CopyFile
#endif
#if defined(DeleteFile)
#undef DeleteFile
#endif
#ifndef _BUILD_FILE_CROSSPLATFORM_H_
#define _BUILD_FILE_CROSSPLATFORM_H_
#include <string>
#include <string.h>
#include <stdio.h>
#include "Base64.h"
#include "../../Common/kernel_config.h"
#define U_TO_UTF8(val) NSFile::CUtf8Converter::GetUtf8StringFromUnicode2(val.c_str(), (LONG)val.length())
#define UTF8_TO_U(val) NSFile::CUtf8Converter::GetUnicodeStringFromUTF8((BYTE*)val.c_str(), (LONG)val.length())
#ifndef MAX_PATH
#define MAX_PATH 1024
#endif
std::wstring KERNEL_DECL CorrectPathW(const std::wstring& path);
namespace NSFile
{
#define WriteUtf16_WCHAR(code, p) \
if (code < 0x10000) \
*p++ = code; \
else \
{ \
code -= 0x10000; \
*p++ = 0xD800 | ((code >> 10) & 0x03FF); \
*p++ = 0xDC00 | (code & 0x03FF); \
}
class CStringUtf16
{
public:
BYTE* Data;
int Length;
public:
CStringUtf16()
{
Data = NULL;
Length = 0;
}
~CStringUtf16()
{
RELEASEARRAYOBJECTS(Data);
}
};
class KERNEL_DECL CUtf8Converter
{
public:
static std::wstring GetUnicodeFromCharPtr(const char* pData, LONG lCount, INT bIsUtf8 = FALSE);
static std::wstring GetUnicodeFromCharPtr(const std::string& sParam, INT bIsUtf8 = FALSE);
static std::wstring GetUnicodeStringFromUTF8_4bytes( BYTE* pBuffer, LONG lCount );
static std::wstring GetUnicodeStringFromUTF8_2bytes( BYTE* pBuffer, LONG lCount );
static std::wstring GetUnicodeStringFromUTF8( BYTE* pBuffer, LONG lCount );
static void GetUtf8StringFromUnicode_4bytes(const wchar_t* pUnicodes, LONG lCount, BYTE*& pData, LONG& lOutputCount, bool bIsBOM = false);
static void GetUtf8StringFromUnicode_2bytes(const wchar_t* pUnicodes, LONG lCount, BYTE*& pData, LONG& lOutputCount, bool bIsBOM = false);
static void GetUtf8StringFromUnicode(const wchar_t* pUnicodes, LONG lCount, BYTE*& pData, LONG& lOutputCount, bool bIsBOM = false);
static std::string GetUtf8StringFromUnicode2(const wchar_t* pUnicodes, LONG lCount, bool bIsBOM = false);
static std::string GetUtf8StringFromUnicode(const std::wstring& sData);
// utf16
static void GetUtf16StringFromUnicode_4bytes(const wchar_t* pUnicodes, LONG lCount, BYTE*& pData, int& lOutputCount, bool bIsBOM = false);
static void GetUtf16StringFromUnicode_4bytes2(const wchar_t* pUnicodes, LONG lCount, CStringUtf16& data);
static std::wstring GetWStringFromUTF16(const CStringUtf16& data);
static std::wstring GetWStringFromUTF16(const unsigned short* pUtf16, LONG lCount);
};
class KERNEL_DECL CFileBinary
{
protected:
FILE* m_pFile;
long m_lFilePosition;
long m_lFileSize;
public:
CFileBinary();
virtual ~CFileBinary();
virtual void CloseFile();
FILE* GetFileNative();
long GetFileSize();
long GetFilePosition();
bool OpenFile(const std::wstring& sFileName, bool bRewrite = false);
bool CreateFileW(const std::wstring& sFileName);
bool CreateTempFile();
bool SeekFile(int lFilePosition, int nSeekMode = 0);
bool ReadFile(BYTE* pData, DWORD nBytesToRead, DWORD& dwSizeRead);
bool WriteFile(const BYTE* pData, DWORD nBytesCount);
long TellFile();
long SizeFile();
void WriteStringUTF8(const std::wstring& strXml, bool bIsBOM = false);
static bool ReadAllBytes(const std::wstring& strFileName, BYTE** ppData, DWORD& nBytesCount);
static bool ReadAllTextUtf8(const std::wstring& strFileName, std::wstring& sData);
static bool ReadAllTextUtf8A(const std::wstring& strFileName, std::string& sData);
static bool SaveToFile(const std::wstring& strFileName, const std::wstring& strXml, bool bIsBOM = false);
static bool Exists(const std::wstring& strFileName);
static bool Copy(const std::wstring& strSrc, const std::wstring& strDst);
static bool Remove(const std::wstring& strFileName);
static bool Move(const std::wstring& strSrc, const std::wstring& strDst);
static bool Truncate(const std::wstring& sPath, size_t nNewSize);
static std::wstring GetTempPath();
static std::wstring CreateTempFileWithUniqueName(const std::wstring& strFolderPathRoot, const std::wstring& Prefix);
static bool OpenTempFile(std::wstring *pwsName, FILE **ppFile, wchar_t *wsMode, wchar_t *wsExt, wchar_t *wsFolder, wchar_t* wsName = NULL);
static FILE* OpenFileNative(const std::wstring& sFileName, const std::wstring& sMode);
};
class KERNEL_DECL CBase64Converter
{
public:
static bool Encode(BYTE* pDataSrc, int nLenSrc, char*& pDataDst, int& nLenDst, DWORD dwFlags = NSBase64::B64_BASE64_FLAG_NONE);
static bool Decode(const char* pDataSrc, int nLenSrc, BYTE*& pDataDst, int& nLenDst);
};
}
namespace NSFile
{
#define NS_FILE_MAX_PATH 32768
KERNEL_DECL std::wstring GetProcessPath();
KERNEL_DECL std::wstring GetProcessDirectory();
// CommonFunctions
KERNEL_DECL std::wstring GetFileExtention(const std::wstring& sPath);
KERNEL_DECL std::wstring GetFileName(const std::wstring& sPath);
KERNEL_DECL std::wstring GetDirectoryName(const std::wstring& sPath);
}
#endif //_BUILD_FILE_CROSSPLATFORM_H_
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#if defined(GetTempPath)
#undef GetTempPath
#endif
#if defined(CreateFile)
#undef CreateFile
#endif
#if defined(CopyFile)
#undef CopyFile
#endif
#if defined(DeleteFile)
#undef DeleteFile
#endif
#ifndef _BUILD_FILE_CROSSPLATFORM_H_
#define _BUILD_FILE_CROSSPLATFORM_H_
#include <string>
#include <string.h>
#include <stdio.h>
#include "Base64.h"
#include "../../Common/kernel_config.h"
#define U_TO_UTF8(val) NSFile::CUtf8Converter::GetUtf8StringFromUnicode2(val.c_str(), (LONG)val.length())
#define UTF8_TO_U(val) NSFile::CUtf8Converter::GetUnicodeStringFromUTF8((BYTE*)val.c_str(), (LONG)val.length())
#ifndef MAX_PATH
#define MAX_PATH 1024
#endif
std::wstring KERNEL_DECL CorrectPathW(const std::wstring& path);
namespace NSFile
{
#define WriteUtf16_WCHAR(code, p) \
if (code < 0x10000) \
*p++ = code; \
else \
{ \
code -= 0x10000; \
*p++ = 0xD800 | ((code >> 10) & 0x03FF); \
*p++ = 0xDC00 | (code & 0x03FF); \
}
class CStringUtf16
{
public:
BYTE* Data;
int Length;
public:
CStringUtf16()
{
Data = NULL;
Length = 0;
}
~CStringUtf16()
{
RELEASEARRAYOBJECTS(Data);
}
};
class KERNEL_DECL CUtf8Converter
{
public:
static std::wstring GetUnicodeFromCharPtr(const char* pData, LONG lCount, INT bIsUtf8 = FALSE);
static std::wstring GetUnicodeFromCharPtr(const std::string& sParam, INT bIsUtf8 = FALSE);
static std::wstring GetUnicodeStringFromUTF8_4bytes( BYTE* pBuffer, LONG lCount );
static std::wstring GetUnicodeStringFromUTF8_2bytes( BYTE* pBuffer, LONG lCount );
static std::wstring GetUnicodeStringFromUTF8( BYTE* pBuffer, LONG lCount );
static void GetUnicodeStringFromUTF8WithHHHH_4bytes( const BYTE* pBuffer, LONG lCount, wchar_t*& pUnicodes, LONG& lOutputCount );
static void GetUnicodeStringFromUTF8WithHHHH_2bytes( const BYTE* pBuffer, LONG lCount, wchar_t*& pUnicodes, LONG& lOutputCount );
static void GetUnicodeStringFromUTF8WithHHHH( const BYTE* pBuffer, LONG lCount, wchar_t*& pUnicodes, LONG& lOutputCount );
static inline LONG GetUnicodeStringFromUTF8BufferSize( LONG lCount );
static void GetUtf8StringFromUnicode_4bytes(const wchar_t* pUnicodes, LONG lCount, BYTE*& pData, LONG& lOutputCount, bool bIsBOM = false);
static void GetUtf8StringFromUnicode_2bytes(const wchar_t* pUnicodes, LONG lCount, BYTE*& pData, LONG& lOutputCount, bool bIsBOM = false);
static void GetUtf8StringFromUnicode(const wchar_t* pUnicodes, LONG lCount, BYTE*& pData, LONG& lOutputCount, bool bIsBOM = false);
static std::string GetUtf8StringFromUnicode2(const wchar_t* pUnicodes, LONG lCount, bool bIsBOM = false);
static std::string GetUtf8StringFromUnicode(const std::wstring& sData);
// utf16
static void GetUtf16StringFromUnicode_4bytes(const wchar_t* pUnicodes, LONG lCount, BYTE*& pData, int& lOutputCount, bool bIsBOM = false);
static void GetUtf16StringFromUnicode_4bytes2(const wchar_t* pUnicodes, LONG lCount, CStringUtf16& data);
static std::wstring GetWStringFromUTF16(const CStringUtf16& data);
static std::wstring GetWStringFromUTF16(const unsigned short* pUtf16, LONG lCount);
static long CheckHHHHChar(const BYTE* pBuffer);
static long CheckHHHHChar(const wchar_t* pBuffer);
};
class KERNEL_DECL CFileBinary
{
protected:
FILE* m_pFile;
long m_lFilePosition;
long m_lFileSize;
public:
CFileBinary();
virtual ~CFileBinary();
virtual void CloseFile();
FILE* GetFileNative();
long GetFileSize();
long GetFilePosition();
bool OpenFile(const std::wstring& sFileName, bool bRewrite = false);
bool CreateFileW(const std::wstring& sFileName);
bool CreateTempFile();
bool SeekFile(int lFilePosition, int nSeekMode = 0);
bool ReadFile(BYTE* pData, DWORD nBytesToRead, DWORD& dwSizeRead);
bool WriteFile(const BYTE* pData, DWORD nBytesCount);
long TellFile();
long SizeFile();
void WriteStringUTF8(const std::wstring& strXml, bool bIsBOM = false);
static bool ReadAllBytes(const std::wstring& strFileName, BYTE** ppData, DWORD& nBytesCount);
static bool ReadAllTextUtf8(const std::wstring& strFileName, std::wstring& sData);
static bool ReadAllTextUtf8A(const std::wstring& strFileName, std::string& sData);
static bool SaveToFile(const std::wstring& strFileName, const std::wstring& strXml, bool bIsBOM = false);
static bool Exists(const std::wstring& strFileName);
static bool Copy(const std::wstring& strSrc, const std::wstring& strDst);
static bool Remove(const std::wstring& strFileName);
static bool Move(const std::wstring& strSrc, const std::wstring& strDst);
static bool Truncate(const std::wstring& sPath, size_t nNewSize);
static std::wstring GetTempPath();
static std::wstring CreateTempFileWithUniqueName(const std::wstring& strFolderPathRoot, const std::wstring& Prefix);
static bool OpenTempFile(std::wstring *pwsName, FILE **ppFile, wchar_t *wsMode, wchar_t *wsExt, wchar_t *wsFolder, wchar_t* wsName = NULL);
static FILE* OpenFileNative(const std::wstring& sFileName, const std::wstring& sMode);
};
class KERNEL_DECL CBase64Converter
{
public:
static bool Encode(BYTE* pDataSrc, int nLenSrc, char*& pDataDst, int& nLenDst, DWORD dwFlags = NSBase64::B64_BASE64_FLAG_NONE);
static bool Decode(const char* pDataSrc, int nLenSrc, BYTE*& pDataDst, int& nLenDst);
};
}
namespace NSFile
{
#define NS_FILE_MAX_PATH 32768
KERNEL_DECL std::wstring GetProcessPath();
KERNEL_DECL std::wstring GetProcessDirectory();
// CommonFunctions
KERNEL_DECL std::wstring GetFileExtention(const std::wstring& sPath);
KERNEL_DECL std::wstring GetFileName(const std::wstring& sPath);
KERNEL_DECL std::wstring GetDirectoryName(const std::wstring& sPath);
}
#endif //_BUILD_FILE_CROSSPLATFORM_H_

View File

@ -30,6 +30,7 @@
*
*/
#include "StringBuilder.h"
#include "File.h"
namespace NSStringUtils
{
@ -301,6 +302,18 @@ namespace NSStringUtils
else
WriteEncodeXmlString_4bytes(pString, nCount);
}
void CStringBuilder::WriteEncodeXmlStringHHHH(const std::wstring& sString)
{
WriteEncodeXmlStringHHHH(sString.c_str(), (int)sString.length());
}
void CStringBuilder::WriteEncodeXmlStringHHHH(const wchar_t* pString, int nCount)
{
if (sizeof(wchar_t) == 2)
WriteEncodeXmlStringHHHH_2bytes(pString, nCount);
else
WriteEncodeXmlStringHHHH_4bytes(pString, nCount);
}
inline void CStringBuilder::WriteEncodeXmlString_4bytes(const wchar_t* pString, int nCount)
{
const wchar_t* pData = pString;
@ -354,6 +367,59 @@ namespace NSStringUtils
}
}
}
inline void CStringBuilder::WriteEncodeXmlStringHHHH_4bytes(const wchar_t* pString, int nCount)
{
const wchar_t* pData = pString;
int nCounter = 0;
unsigned int code;
while (*pData != 0)
{
code = (unsigned int)*pData;
WriteEncodeXmlChar(*pData, CheckXmlCodeHHHH(code, pData));
++pData;
if (-1 != nCount)
{
++nCounter;
if (nCounter >= nCount)
break;
}
}
}
inline void CStringBuilder::WriteEncodeXmlStringHHHH_2bytes(const wchar_t* pString, int nCount)
{
const wchar_t* pData = pString;
int nCounter = 0;
unsigned int code;
BYTE type;
while (*pData != 0)
{
code = (unsigned int)*pData;
if (code >= 0xD800 && code <= 0xDFFF && *(pData + 1) != 0)
{
code = 0x10000 + (((code & 0x3FF) << 10) | (0x03FF & *(pData + 1)));
type = CheckXmlCodeHHHH(code, pData);
if(0 != type)
{
WriteEncodeXmlChar(*pData, type);
++pData;
}
}
else
{
type = CheckXmlCodeHHHH(code, pData);
}
WriteEncodeXmlChar(*pData, type);
++pData;
if (-1 != nCount)
{
++nCounter;
if (nCounter >= nCount)
break;
}
}
}
inline void CStringBuilder::WriteEncodeXmlChar(wchar_t code, BYTE type)
{
switch (type)
@ -436,6 +502,27 @@ namespace NSStringUtils
*m_pDataCur++ = (wchar_t)(';');
m_lSizeCur += 5;
break;
case 10:
AddSize(7);
*m_pDataCur++ = (wchar_t)('_');
*m_pDataCur++ = (wchar_t)('x');
*m_pDataCur++ = (wchar_t)('0');
*m_pDataCur++ = (wchar_t)('0');
*m_pDataCur++ = (wchar_t)('5');
*m_pDataCur++ = (wchar_t)('F');
*m_pDataCur++ = (wchar_t)('_');
m_lSizeCur += 7;
break;
case 11:
AddSize(7);
*m_pDataCur++ = (wchar_t)('_');
*m_pDataCur++ = (wchar_t)('x');
m_lSizeCur += 2;
WriteHexByteNoSafe((code >> 8) & 0xFF);
WriteHexByteNoSafe(code & 0xFF);
*m_pDataCur++ = (wchar_t)('_');
++m_lSizeCur;
break;
default:
break;
}
@ -751,6 +838,35 @@ namespace NSStringUtils
return 0;
}
unsigned char CStringBuilder::CheckXmlCodeHHHH(unsigned int c, const wchar_t* pData)
{
if ('&' == c)
return 2;
if ('\'' == c)
return 3;
if ('<' == c)
return 4;
if ('>' == c)
return 5;
if ('\"' == c)
return 6;
if ('\n' == c)//when reading from the attributes is replaced by a space.
return 7;
if ('\r' == c)//when reading from the attributes is replaced by a space.
return 8;
if ('\t' == c)//when reading from the attributes is replaced by a space.
return 9;
if (NSFile::CUtf8Converter::CheckHHHHChar(pData) >= 0)
return 10;
//xml 1.0 Character Range https://www.w3.org/TR/xml/#charsets
if ((0x20 <= c && c <= 0xD7FF) || (0xE000 <= c && c <= 0xFFFD) || (0x10000 <= c && c <= 0x10FFFF))
return 1;
else if(c <= 0xFFFF)
return 11;
return 0;
}
void string_replace(std::wstring& text, const std::wstring& replaceFrom, const std::wstring& replaceTo)
{

View File

@ -109,9 +109,11 @@ namespace NSStringUtils
void AddChar2Safe(const wchar_t _c1, const wchar_t& _c2);
void WriteEncodeXmlString(const std::wstring& sString);
void WriteEncodeXmlString(const wchar_t* pString, int nCount = -1);
void WriteEncodeXmlStringHHHH(const std::wstring& sString);
void WriteEncodeXmlStringHHHH(const wchar_t* pString, int nCount = -1);
size_t GetCurSize();
void SetCurSize(size_t lCurSize);
size_t GetSize();
@ -147,8 +149,11 @@ namespace NSStringUtils
protected:
inline void WriteEncodeXmlString_4bytes(const wchar_t* pString, int nCount);
inline void WriteEncodeXmlString_2bytes(const wchar_t* pString, int nCount);
inline void WriteEncodeXmlStringHHHH_4bytes(const wchar_t* pString, int nCount);
inline void WriteEncodeXmlStringHHHH_2bytes(const wchar_t* pString, int nCount);
inline void WriteEncodeXmlChar(wchar_t code, unsigned char type);
inline unsigned char CheckXmlCode(unsigned int c);
inline unsigned char CheckXmlCodeHHHH(unsigned int c, const wchar_t* pData);
};
KERNEL_DECL void string_replace(std::wstring& text, const std::wstring& replaceFrom, const std::wstring& replaceTo);

View File

@ -290,6 +290,7 @@
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
English,
en,
);
mainGroup = 7C560F661AA71A91000E5860;
@ -466,7 +467,7 @@
buildSettings = {
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
ENABLE_BITCODE = NO;
ENABLE_BITCODE = YES;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_PREPROCESSOR_DEFINITIONS = (
_UNICODE,
@ -506,7 +507,7 @@
buildSettings = {
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
ENABLE_BITCODE = NO;
ENABLE_BITCODE = YES;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_PREPROCESSOR_DEFINITIONS = (
_UNICODE,

View File

@ -735,6 +735,7 @@
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
English,
en,
);
mainGroup = 17D918621AC5A19D0096D788;
@ -795,7 +796,7 @@
17C1FFC71ACC4B21006B99B3 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ENABLE_BITCODE = NO;
ENABLE_BITCODE = YES;
EXECUTABLE_PREFIX = lib;
GCC_ENABLE_CPP_EXCEPTIONS = YES;
GCC_ENABLE_CPP_RTTI = YES;
@ -821,7 +822,7 @@
17C1FFC81ACC4B21006B99B3 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ENABLE_BITCODE = NO;
ENABLE_BITCODE = YES;
EXECUTABLE_PREFIX = lib;
GCC_ENABLE_CPP_EXCEPTIONS = YES;
GCC_ENABLE_CPP_RTTI = YES;

View File

@ -286,6 +286,7 @@
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
English,
en,
);
mainGroup = 17D91A331AC5A7C20096D788;
@ -345,7 +346,7 @@
17C100201ACC4B40006B99B3 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ENABLE_BITCODE = NO;
ENABLE_BITCODE = YES;
EXECUTABLE_PREFIX = lib;
GCC_ENABLE_CPP_EXCEPTIONS = YES;
GCC_ENABLE_CPP_RTTI = YES;
@ -371,7 +372,7 @@
17C100211ACC4B40006B99B3 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ENABLE_BITCODE = NO;
ENABLE_BITCODE = YES;
EXECUTABLE_PREFIX = lib;
GCC_ENABLE_CPP_EXCEPTIONS = YES;
GCC_ENABLE_CPP_RTTI = YES;

View File

@ -465,6 +465,7 @@
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
English,
en,
);
mainGroup = 175CBDA31AC93C09007D7DEC;
@ -641,7 +642,7 @@
17C100EC1ACC4D64006B99B3 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ENABLE_BITCODE = NO;
ENABLE_BITCODE = YES;
EXECUTABLE_PREFIX = lib;
GCC_ENABLE_CPP_EXCEPTIONS = YES;
GCC_ENABLE_CPP_RTTI = YES;
@ -665,7 +666,7 @@
17C100ED1ACC4D64006B99B3 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ENABLE_BITCODE = NO;
ENABLE_BITCODE = YES;
EXECUTABLE_PREFIX = lib;
GCC_ENABLE_CPP_EXCEPTIONS = YES;
GCC_ENABLE_CPP_RTTI = YES;

View File

@ -101,6 +101,7 @@
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
English,
en,
);
mainGroup = 175CBE921AC9458E007D7DEC;
@ -228,7 +229,7 @@
17C100F71ACC4DCC006B99B3 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ENABLE_BITCODE = NO;
ENABLE_BITCODE = YES;
EXECUTABLE_PREFIX = lib;
GCC_ENABLE_CPP_EXCEPTIONS = YES;
GCC_ENABLE_CPP_RTTI = YES;
@ -248,7 +249,7 @@
17C100F81ACC4DCC006B99B3 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ENABLE_BITCODE = NO;
ENABLE_BITCODE = YES;
EXECUTABLE_PREFIX = lib;
GCC_ENABLE_CPP_EXCEPTIONS = YES;
GCC_ENABLE_CPP_RTTI = YES;

View File

@ -343,6 +343,7 @@
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
English,
en,
);
mainGroup = 175CBEBE1AC94658007D7DEC;
@ -536,7 +537,7 @@
17C1014F1ACC4DFA006B99B3 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ENABLE_BITCODE = NO;
ENABLE_BITCODE = YES;
EXECUTABLE_PREFIX = lib;
GCC_ENABLE_CPP_EXCEPTIONS = YES;
GCC_ENABLE_CPP_RTTI = YES;
@ -551,7 +552,7 @@
17C101501ACC4DFA006B99B3 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ENABLE_BITCODE = NO;
ENABLE_BITCODE = YES;
EXECUTABLE_PREFIX = lib;
GCC_ENABLE_CPP_EXCEPTIONS = YES;
GCC_ENABLE_CPP_RTTI = YES;

View File

@ -289,6 +289,7 @@
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
English,
en,
);
mainGroup = 175CBF991AC948D9007D7DEC;
@ -464,7 +465,7 @@
17C101961ACC4EF9006B99B3 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ENABLE_BITCODE = NO;
ENABLE_BITCODE = YES;
EXECUTABLE_PREFIX = lib;
GCC_ENABLE_CPP_EXCEPTIONS = YES;
GCC_ENABLE_CPP_RTTI = YES;
@ -483,7 +484,7 @@
17C101971ACC4EF9006B99B3 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ENABLE_BITCODE = NO;
ENABLE_BITCODE = YES;
EXECUTABLE_PREFIX = lib;
GCC_ENABLE_CPP_EXCEPTIONS = YES;
GCC_ENABLE_CPP_RTTI = YES;

View File

@ -236,6 +236,7 @@
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
English,
en,
);
mainGroup = 175CC0441AC949B4007D7DEC;
@ -380,7 +381,7 @@
17C1022B1ACC4FE0006B99B3 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ENABLE_BITCODE = NO;
ENABLE_BITCODE = YES;
EXECUTABLE_PREFIX = lib;
GCC_ENABLE_CPP_EXCEPTIONS = YES;
GCC_ENABLE_CPP_RTTI = YES;
@ -407,7 +408,7 @@
17C1022C1ACC4FE0006B99B3 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ENABLE_BITCODE = NO;
ENABLE_BITCODE = YES;
EXECUTABLE_PREFIX = lib;
GCC_ENABLE_CPP_EXCEPTIONS = YES;
GCC_ENABLE_CPP_RTTI = YES;

View File

@ -167,6 +167,7 @@
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
English,
en,
);
mainGroup = 175CC1781AC9569C007D7DEC;
@ -308,7 +309,7 @@
17C101FA1ACC4FB7006B99B3 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ENABLE_BITCODE = NO;
ENABLE_BITCODE = YES;
EXECUTABLE_PREFIX = lib;
GCC_ENABLE_CPP_EXCEPTIONS = YES;
GCC_ENABLE_CPP_RTTI = YES;
@ -327,7 +328,7 @@
17C101FB1ACC4FB7006B99B3 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ENABLE_BITCODE = NO;
ENABLE_BITCODE = YES;
EXECUTABLE_PREFIX = lib;
GCC_ENABLE_CPP_EXCEPTIONS = YES;
GCC_ENABLE_CPP_RTTI = YES;

View File

@ -98,6 +98,7 @@
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
English,
en,
);
mainGroup = 175CC14C1AC9560E007D7DEC;
@ -224,7 +225,7 @@
17C101DB1ACC4F80006B99B3 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ENABLE_BITCODE = NO;
ENABLE_BITCODE = YES;
EXECUTABLE_PREFIX = lib;
GCC_ENABLE_CPP_EXCEPTIONS = YES;
GCC_ENABLE_CPP_RTTI = YES;
@ -238,7 +239,7 @@
17C101DC1ACC4F80006B99B3 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ENABLE_BITCODE = NO;
ENABLE_BITCODE = YES;
EXECUTABLE_PREFIX = lib;
GCC_ENABLE_CPP_EXCEPTIONS = YES;
GCC_ENABLE_CPP_RTTI = YES;

View File

@ -257,6 +257,7 @@
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
English,
en,
);
mainGroup = 175CC0AD1AC94D62007D7DEC;
@ -420,7 +421,7 @@
17C101D11ACC4F45006B99B3 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ENABLE_BITCODE = NO;
ENABLE_BITCODE = YES;
EXECUTABLE_PREFIX = lib;
GCC_ENABLE_CPP_EXCEPTIONS = YES;
GCC_ENABLE_CPP_RTTI = YES;
@ -438,7 +439,7 @@
17C101D21ACC4F45006B99B3 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ENABLE_BITCODE = NO;
ENABLE_BITCODE = YES;
EXECUTABLE_PREFIX = lib;
GCC_ENABLE_CPP_EXCEPTIONS = YES;
GCC_ENABLE_CPP_RTTI = YES;

View File

@ -207,6 +207,7 @@
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
English,
en,
);
mainGroup = 17D9182C1AC5A0870096D788;
@ -246,7 +247,7 @@
17C1FF1E1ACC4AF7006B99B3 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ENABLE_BITCODE = NO;
ENABLE_BITCODE = YES;
EXECUTABLE_PREFIX = lib;
GCC_ENABLE_CPP_EXCEPTIONS = YES;
GCC_ENABLE_CPP_RTTI = YES;
@ -271,7 +272,7 @@
17C1FF1F1ACC4AF7006B99B3 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ENABLE_BITCODE = NO;
ENABLE_BITCODE = YES;
EXECUTABLE_PREFIX = lib;
GCC_ENABLE_CPP_EXCEPTIONS = YES;
GCC_ENABLE_CPP_RTTI = YES;

View File

@ -503,6 +503,7 @@
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
English,
en,
);
mainGroup = 17D913FC1AC59C860096D788;
@ -585,7 +586,7 @@
17C100881ACC4BC4006B99B3 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ENABLE_BITCODE = NO;
ENABLE_BITCODE = YES;
EXECUTABLE_PREFIX = lib;
GCC_ENABLE_CPP_EXCEPTIONS = YES;
GCC_ENABLE_CPP_RTTI = YES;
@ -609,7 +610,7 @@
17C100891ACC4BC4006B99B3 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ENABLE_BITCODE = NO;
ENABLE_BITCODE = YES;
EXECUTABLE_PREFIX = lib;
GCC_ENABLE_CPP_EXCEPTIONS = YES;
GCC_ENABLE_CPP_RTTI = YES;

View File

@ -295,6 +295,7 @@
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
English,
en,
);
mainGroup = 17D9130C1AC58E750096D788;
@ -343,7 +344,7 @@
17C1FEFC1ACC4A67006B99B3 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ENABLE_BITCODE = NO;
ENABLE_BITCODE = YES;
EXECUTABLE_PREFIX = lib;
GCC_ENABLE_CPP_EXCEPTIONS = YES;
GCC_ENABLE_CPP_RTTI = YES;
@ -372,7 +373,7 @@
17C1FEFD1ACC4A67006B99B3 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ENABLE_BITCODE = NO;
ENABLE_BITCODE = YES;
EXECUTABLE_PREFIX = lib;
GCC_ENABLE_CPP_EXCEPTIONS = YES;
GCC_ENABLE_CPP_RTTI = YES;

View File

@ -173,8 +173,8 @@
17A7F02B1B13154500760AFB /* SvmPlayer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 17A7F0221B13154500760AFB /* SvmPlayer.cpp */; };
17DD67B71B7E2778000F800F /* lepton_utils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 17DD67B51B7E2778000F800F /* lepton_utils.cpp */; };
697B72D41E3B78D90054C17C /* EmfFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 697B72D31E3B78D90054C17C /* EmfFile.cpp */; };
8AA0EB9B229BE96B00297DE5 /* SVGTransformer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AA0EB99229BE96B00297DE5 /* SVGTransformer.cpp */; };
8AA0EB9C229BE96B00297DE5 /* SVGFramework.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AA0EB9A229BE96B00297DE5 /* SVGFramework.cpp */; };
8A2EE9BB22AFBAC200E8AB1A /* SVGTransformer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8A2EE9B922AFBAC200E8AB1A /* SVGTransformer.cpp */; };
8A2EE9BC22AFBAC200E8AB1A /* SVGFramework.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8A2EE9BA22AFBAC200E8AB1A /* SVGFramework.cpp */; };
8AC2819D2195A582006FA3D7 /* StringExt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AC2819B2195A582006FA3D7 /* StringExt.cpp */; };
/* End PBXBuildFile section */
@ -438,10 +438,10 @@
17A7F0231B13154500760AFB /* SvmPlayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SvmPlayer.h; sourceTree = "<group>"; };
17DD67B51B7E2778000F800F /* lepton_utils.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = lepton_utils.cpp; sourceTree = "<group>"; };
697B72D31E3B78D90054C17C /* EmfFile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EmfFile.cpp; sourceTree = "<group>"; };
8AA0EB97229BE96B00297DE5 /* SVGFramework.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGFramework.h; sourceTree = "<group>"; };
8AA0EB98229BE96B00297DE5 /* SVGTransformer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGTransformer.h; sourceTree = "<group>"; };
8AA0EB99229BE96B00297DE5 /* SVGTransformer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGTransformer.cpp; sourceTree = "<group>"; };
8AA0EB9A229BE96B00297DE5 /* SVGFramework.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGFramework.cpp; sourceTree = "<group>"; };
8A2EE9B722AFBAC200E8AB1A /* SVGFramework.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGFramework.h; sourceTree = "<group>"; };
8A2EE9B822AFBAC200E8AB1A /* SVGTransformer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGTransformer.h; sourceTree = "<group>"; };
8A2EE9B922AFBAC200E8AB1A /* SVGTransformer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGTransformer.cpp; sourceTree = "<group>"; };
8A2EE9BA22AFBAC200E8AB1A /* SVGFramework.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGFramework.cpp; sourceTree = "<group>"; };
8AC2819B2195A582006FA3D7 /* StringExt.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StringExt.cpp; path = ../../../common/StringExt.cpp; sourceTree = "<group>"; };
8AC2819C2195A582006FA3D7 /* StringExt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StringExt.h; path = ../../../common/StringExt.h; sourceTree = "<group>"; };
/* End PBXFileReference section */
@ -476,7 +476,7 @@
17A762BC1B0F35320046BC0B /* metafile */ = {
isa = PBXGroup;
children = (
8AA0EB96229BE96B00297DE5 /* svg */,
8A2EE9B622AFBAC200E8AB1A /* svg */,
17A7F0191B13154500760AFB /* StarView */,
17A765081B0F3A3E0046BC0B /* Jp2 */,
17A7631F1B0F38FE0046BC0B /* JBig2 */,
@ -800,13 +800,13 @@
path = ../../../raster/Metafile/StarView;
sourceTree = "<group>";
};
8AA0EB96229BE96B00297DE5 /* svg */ = {
8A2EE9B622AFBAC200E8AB1A /* svg */ = {
isa = PBXGroup;
children = (
8AA0EB97229BE96B00297DE5 /* SVGFramework.h */,
8AA0EB98229BE96B00297DE5 /* SVGTransformer.h */,
8AA0EB99229BE96B00297DE5 /* SVGTransformer.cpp */,
8AA0EB9A229BE96B00297DE5 /* SVGFramework.cpp */,
8A2EE9B722AFBAC200E8AB1A /* SVGFramework.h */,
8A2EE9B822AFBAC200E8AB1A /* SVGTransformer.h */,
8A2EE9B922AFBAC200E8AB1A /* SVGTransformer.cpp */,
8A2EE9BA22AFBAC200E8AB1A /* SVGFramework.cpp */,
);
name = svg;
path = ../../../raster/Metafile/svg;
@ -1022,8 +1022,8 @@
17A763EF1B0F39370046BC0B /* bardecode.cpp in Sources */,
17A7631E1B0F389C0046BC0B /* MetaFileUtils.cpp in Sources */,
17A763231B0F39120046BC0B /* JBig2File.cpp in Sources */,
8AA0EB9C229BE96B00297DE5 /* SVGFramework.cpp in Sources */,
8AA0EB9B229BE96B00297DE5 /* SVGTransformer.cpp in Sources */,
8A2EE9BC22AFBAC200E8AB1A /* SVGFramework.cpp in Sources */,
8A2EE9BB22AFBAC200E8AB1A /* SVGTransformer.cpp in Sources */,
17A765031B0F39370046BC0B /* writefile.cpp in Sources */,
17A764B11B0F39370046BC0B /* psio2stub.cpp in Sources */,
17A764FF1B0F39370046BC0B /* webpio.cpp in Sources */,
@ -1139,7 +1139,7 @@
17A762D91B0F355E0046BC0B /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ENABLE_BITCODE = NO;
ENABLE_BITCODE = YES;
GCC_PREPROCESSOR_DEFINITIONS = _IOS;
HEADER_SEARCH_PATHS = (
"$(inherited)",
@ -1157,7 +1157,7 @@
17A762DA1B0F355E0046BC0B /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ENABLE_BITCODE = NO;
ENABLE_BITCODE = YES;
GCC_PREPROCESSOR_DEFINITIONS = _IOS;
HEADER_SEARCH_PATHS = (
"$(inherited)",

View File

@ -105,6 +105,7 @@
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
English,
en,
);
mainGroup = 17D913D41AC59B6E0096D788;
@ -133,7 +134,7 @@
17C1FF081ACC4AB0006B99B3 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ENABLE_BITCODE = NO;
ENABLE_BITCODE = YES;
EXECUTABLE_PREFIX = lib;
GCC_ENABLE_CPP_EXCEPTIONS = YES;
GCC_ENABLE_CPP_RTTI = YES;
@ -153,7 +154,7 @@
17C1FF091ACC4AB0006B99B3 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ENABLE_BITCODE = NO;
ENABLE_BITCODE = YES;
EXECUTABLE_PREFIX = lib;
GCC_ENABLE_CPP_EXCEPTIONS = YES;
GCC_ENABLE_CPP_RTTI = YES;

View File

@ -144,7 +144,7 @@ namespace MetaFile
}
return false;
};
}
bool CMetaFile::DrawOnRenderer(IRenderer* pRenderer, double dX, double dY, double dWidth, double dHeight)
{
if (NULL == pRenderer)
@ -176,7 +176,7 @@ namespace MetaFile
}
pRenderer->EndCommand(c_nImageType);
return true;
};
}
void CMetaFile::Close()
{
m_oWmfFile.Close();
@ -185,7 +185,7 @@ namespace MetaFile
m_oSvgFile.Close();
m_lType = 0;
};
}
int CMetaFile::GetType()
{
return m_lType;

View File

@ -828,6 +828,12 @@ namespace NSHtmlRenderer
}
HRESULT CASCSVGWriter::GetTransform(double *pdA, double *pdB, double *pdC, double *pdD, double *pdE, double *pdF)
{
*pdA = m_pTransform->sx();
*pdB = m_pTransform->shy();
*pdC = m_pTransform->shx();
*pdD = m_pTransform->sy();
*pdE = m_pTransform->tx();
*pdF = m_pTransform->ty();
return S_OK;
}
HRESULT CASCSVGWriter::ResetTransform(void)

View File

@ -194,6 +194,7 @@ namespace ParseAllCultureInfo
{38, 1},
{42, 1},
{44, 1},
{1026, 1},
{1028, 1},
{1029, 1},
{1031, 1},
@ -204,9 +205,12 @@ namespace ParseAllCultureInfo
{1040, 1},
{1041, 1},
{1042, 1},
{1043, 1},
{1045, 1},
{1046, 1},
{1049, 1},
{1051, 1},
{1053, 1},
{1055, 1},
{1058, 1},
{1060, 1},
@ -221,6 +225,7 @@ namespace ParseAllCultureInfo
{2064, 1},
{2070, 1},
{2073, 1},
{2077, 1},
{2092, 1},
{3076, 1},
{3079, 1},
@ -289,7 +294,7 @@ namespace ParseAllCultureInfo
Dictionary<int, CultureInfo> aInfos = new Dictionary<int, CultureInfo>();
foreach (CultureInfo ci in CultureInfo.GetCultures(CultureTypes.AllCultures))
{
if (!aInfos.ContainsKey(ci.LCID) && g_mapUsedValues.ContainsKey(ci.LCID))
if (!aInfos.ContainsKey(ci.LCID) && (false || g_mapUsedValues.ContainsKey(ci.LCID)))
{
aLcid.Add(ci.LCID);
aInfos[ci.LCID] = ci;

View File

@ -45,11 +45,21 @@ namespace TestDocsWithChart
{
static void Main(string[] args)
{
getFilesConditional();
//getFilesConditional();
//getFilesPivot();
//getFilesAlternateContent();
//getFilesOverride();
//getFiles();
//getFiles2();
//getFiles3();
//getSize();
//convertFiles();
//getLegacyDrawingHF();
//getShapeType();
//getCustomXml();
//getKeywords();
//getMath();
getExternal2();
}
static void getFilesPivot()
{
@ -75,6 +85,196 @@ namespace TestDocsWithChart
}
}
static void getCustomXml()
{
string sDirInput = @"\\192.168.5.3\files\Files\docx";
string sDirOutput = @"D:\Files\CustomXml";
String[] allfiles = System.IO.Directory.GetFiles(sDirInput, "*.*", System.IO.SearchOption.AllDirectories);
for (var i = 0; i < allfiles.Length; ++i)
{
string file = allfiles[i];
try
{
ZipArchive zip = ZipFile.OpenRead(file);
foreach (ZipArchiveEntry entry in zip.Entries)
{
if (-1 != entry.FullName.IndexOf("CustomXml", StringComparison.OrdinalIgnoreCase))
{
System.IO.File.Copy(file, Path.Combine(sDirOutput, Path.GetFileName(file)), true);
break;
}
}
}
catch { }
}
}
static void getKeywords()
{
string sDirInput = @"\\192.168.5.3\files\Files\docx";
string sDirOutput = @"D:\Files\keywords";
string sFindText = "lastPrinted";
string sFindText2 = "lastPrinted";
String[] allfiles = System.IO.Directory.GetFiles(sDirInput, "*.*", System.IO.SearchOption.AllDirectories);
StringBuilder sb = new StringBuilder();
for (var i = 0; i < allfiles.Length; ++i)
{
string file = allfiles[i];
try
{
ZipArchive zip = ZipFile.OpenRead(file);
foreach (ZipArchiveEntry entry in zip.Entries)
{
if (entry.FullName.EndsWith("core.xml", StringComparison.OrdinalIgnoreCase))
{
using (StreamReader reader = new StreamReader(entry.Open(), Encoding.UTF8))
{
string sXml = reader.ReadToEnd();
int index1 = sXml.IndexOf(sFindText);
int index2 = sXml.IndexOf(sFindText2);
if (-1 != index1 && -1 != index2)
{
String sKeywords = sXml.Substring(index1 + sFindText.Length, index2 - index1 - sFindText.Length);
if (sKeywords.Length > 0)
{
sb.AppendLine(sKeywords);
System.IO.File.Copy(file, Path.Combine(sDirOutput, Path.GetFileName(file)), true);
}
}
}
break;
}
}
}
catch { }
}
}
static void getMath()
{
string sDirInput = @"\\192.168.5.3\files\Files\docx";
string sDirOutput = @"D:\Files\Math";
string sFindText = "m:phant";
String[] allfiles = System.IO.Directory.GetFiles(sDirInput, "*.*", System.IO.SearchOption.AllDirectories);
for (var i = 0; i < allfiles.Length; ++i)
{
string file = allfiles[i];
try
{
ZipArchive zip = ZipFile.OpenRead(file);
foreach (ZipArchiveEntry entry in zip.Entries)
{
if (entry.FullName.EndsWith("document.xml", StringComparison.OrdinalIgnoreCase))
{
using (StreamReader reader = new StreamReader(entry.Open(), Encoding.UTF8))
{
string sXml = reader.ReadToEnd();
if (-1 != sXml.IndexOf(sFindText))
{
//System.IO.File.Copy(file, Path.Combine(sDirOutput, Path.GetFileName(file)), true);
}
}
break;
}
}
}
catch { }
}
}
static void getMove()
{
string sDirInput = @"\\192.168.5.3\files\Files\docx";
string sDirOutput = @"D:\Files\Move";
string sFindText = "w:moveFrom";
String[] allfiles = System.IO.Directory.GetFiles(sDirInput, "*.*", System.IO.SearchOption.AllDirectories);
for (var i = 0; i < allfiles.Length; ++i)
{
string file = allfiles[i];
try
{
ZipArchive zip = ZipFile.OpenRead(file);
foreach (ZipArchiveEntry entry in zip.Entries)
{
if (entry.FullName.EndsWith("document.xml", StringComparison.OrdinalIgnoreCase))
{
using (StreamReader reader = new StreamReader(entry.Open(), Encoding.UTF8))
{
string sXml = reader.ReadToEnd();
if (-1 != sXml.IndexOf(sFindText))
{
System.IO.File.Copy(file, Path.Combine(sDirOutput, Path.GetFileName(file)), true);
}
}
break;
}
}
}
catch { }
}
}
static void getExternal()
{
string sDirInput = @"\\192.168.5.3\files\Files\xlsx";
string sDirOutput = @"D:\Files\ExternalReferences";
string sFindText = "externalBook";
String[] allfiles = System.IO.Directory.GetFiles(sDirInput, "*.*", System.IO.SearchOption.AllDirectories);
for (var i = 0; i < allfiles.Length; ++i)
{
string file = allfiles[i];
try
{
ZipArchive zip = ZipFile.OpenRead(file);
foreach (ZipArchiveEntry entry in zip.Entries)
{
if (entry.FullName.Contains("externalLink") && entry.FullName.EndsWith(".xml"))
{
using (StreamReader reader = new StreamReader(entry.Open(), Encoding.UTF8))
{
string sXml = reader.ReadToEnd();
if (-1 == sXml.IndexOf(sFindText))
{
System.IO.File.Copy(file, Path.Combine(sDirOutput, Path.GetFileName(file)), true);
}
}
break;
}
}
}
catch { }
}
}
static void getExternal2()
{
string sDirInput = @"\\192.168.5.3\files\Files\xlsx";
string sDirOutput = @"D:\Files\ExternalReferences";
string sFindText = "CUBEMEMBER";
String[] allfiles = System.IO.Directory.GetFiles(sDirInput, "*.*", System.IO.SearchOption.AllDirectories);
for (var i = 0; i < allfiles.Length; ++i)
{
string file = allfiles[i];
try
{
ZipArchive zip = ZipFile.OpenRead(file);
foreach (ZipArchiveEntry entry in zip.Entries)
{
if (entry.FullName.Contains("sheet"))
{
using (StreamReader reader = new StreamReader(entry.Open(), Encoding.UTF8))
{
string sXml = reader.ReadToEnd();
if (-1 != sXml.IndexOf(sFindText,StringComparison.OrdinalIgnoreCase))
{
System.IO.File.Copy(file, Path.Combine(sDirOutput, Path.GetFileName(file)), true);
break;
}
}
}
}
}
catch { }
}
}
static void getFilesConditional()
{
//string sFindText = "conditionalFormatting";
@ -162,6 +362,50 @@ namespace TestDocsWithChart
}
}
static void getFilesOverride()
{
string sAlternateContent = "lvlOverride";
string sDirInput = @"\\192.168.5.3\files\Files\docx";
string sDirOutput = @"D:\Files\override";
String[] allfiles = System.IO.Directory.GetFiles(sDirInput, "*.*", System.IO.SearchOption.AllDirectories);
SortedList<long, string> listUncompressed = new SortedList<long, string>();
for (var i = 0; i < allfiles.Length; ++i)
{
string file = allfiles[i];
try
{
ZipArchive zip = ZipFile.OpenRead(file);
string sOutputPath = Path.Combine(sDirOutput, Path.GetFileName(file));
foreach (ZipArchiveEntry entry in zip.Entries)
{
if (entry.FullName.EndsWith("numbering.xml", StringComparison.OrdinalIgnoreCase))
{
using (StreamReader reader = new StreamReader(entry.Open(), Encoding.UTF8))
{
string sXml = reader.ReadToEnd();
int nIndex = -1;
if (-1 != (nIndex = sXml.IndexOf(sAlternateContent, nIndex + 1)))
{
listUncompressed.Add(entry.Length, file);
//System.IO.File.Copy(file, sOutputPath, true);
}
}
break;
}
}
}
catch (Exception e)
{
}
}
StringBuilder sb = new StringBuilder();
sb.Append("size(bytes)\tName\r\n");
foreach (KeyValuePair<long, string> kvp in listUncompressed.Reverse())
{
sb.AppendFormat("{0}\t{1}\r\n", kvp.Key, kvp.Value);
}
}
static void getFiles()
{
string sDirInput = @"\\192.168.3.208\allusers\Files\PPTX";
@ -185,6 +429,136 @@ namespace TestDocsWithChart
}
}
static void getFiles2()
{
string sDirInput = @"\\192.168.5.3\files\Files\docx";
string sDirOutput = @"D:\Files\embed";
String[] allfiles = System.IO.Directory.GetFiles(sDirInput, "*.*", System.IO.SearchOption.AllDirectories);
for (var i = 0; i < allfiles.Length; ++i)
{
string file = allfiles[i];
try
{
ZipArchive zip = ZipFile.OpenRead(file);
foreach (ZipArchiveEntry entry in zip.Entries)
{
if (!entry.FullName.EndsWith("/", StringComparison.OrdinalIgnoreCase) &&
!entry.FullName.EndsWith(".xml", StringComparison.OrdinalIgnoreCase) &&
!entry.FullName.EndsWith(".rels", StringComparison.OrdinalIgnoreCase) &&
!entry.FullName.EndsWith(".docx", StringComparison.OrdinalIgnoreCase) &&
!entry.FullName.EndsWith(".xlsx", StringComparison.OrdinalIgnoreCase) &&
!entry.FullName.EndsWith(".pptx", StringComparison.OrdinalIgnoreCase) &&
!entry.FullName.EndsWith(".doc", StringComparison.OrdinalIgnoreCase) &&
!entry.FullName.EndsWith(".xls", StringComparison.OrdinalIgnoreCase) &&
!entry.FullName.EndsWith(".ppt", StringComparison.OrdinalIgnoreCase) &&
!entry.FullName.EndsWith(".bmp", StringComparison.OrdinalIgnoreCase) &&
!entry.FullName.EndsWith(".jpg", StringComparison.OrdinalIgnoreCase) &&
!entry.FullName.EndsWith(".jpeg", StringComparison.OrdinalIgnoreCase) &&
!entry.FullName.EndsWith(".png", StringComparison.OrdinalIgnoreCase) &&
!entry.FullName.EndsWith(".gif", StringComparison.OrdinalIgnoreCase) &&
!entry.FullName.EndsWith(".tif", StringComparison.OrdinalIgnoreCase) &&
!entry.FullName.EndsWith(".tiff", StringComparison.OrdinalIgnoreCase) &&
!entry.FullName.EndsWith(".wdp", StringComparison.OrdinalIgnoreCase) &&
!entry.FullName.EndsWith(".emf", StringComparison.OrdinalIgnoreCase) &&
!entry.FullName.EndsWith(".emz", StringComparison.OrdinalIgnoreCase) &&
!entry.FullName.EndsWith(".wmf", StringComparison.OrdinalIgnoreCase) &&
!entry.FullName.EndsWith(".wav", StringComparison.OrdinalIgnoreCase) &&
!entry.FullName.EndsWith(".wmv", StringComparison.OrdinalIgnoreCase) &&
!entry.FullName.EndsWith(".mp3", StringComparison.OrdinalIgnoreCase) &&
!entry.FullName.EndsWith(".mp4", StringComparison.OrdinalIgnoreCase) &&
!entry.FullName.EndsWith(".mov", StringComparison.OrdinalIgnoreCase) &&
(!entry.FullName.EndsWith(".bin", StringComparison.OrdinalIgnoreCase) || (!entry.FullName.Contains("embeding") && !entry.FullName.Contains("oleObject") && !entry.FullName.Contains("printerSettings"))) &&
!entry.FullName.EndsWith(".sigs", StringComparison.OrdinalIgnoreCase) &&
!entry.FullName.EndsWith(".sldx", StringComparison.OrdinalIgnoreCase) &&
!entry.FullName.EndsWith(".dat", StringComparison.OrdinalIgnoreCase) &&
!entry.FullName.EndsWith(".vml", StringComparison.OrdinalIgnoreCase) &&
!entry.FullName.EndsWith(".fntdata", StringComparison.OrdinalIgnoreCase) &&
!entry.FullName.EndsWith(".odttf", StringComparison.OrdinalIgnoreCase))
{
System.IO.File.Copy(file, Path.Combine(sDirOutput, Path.GetFileName(file)), true);
break;
}
}
}
catch { }
}
}
static void getFiles3()
{
string sDirInput = @"\\192.168.5.3\files\Files\xlsx";
string sDirOutput = @"D:\Files\height";
string sHeight = " ht=\"";
String[] allfiles = System.IO.Directory.GetFiles(sDirInput, "*.*", System.IO.SearchOption.AllDirectories);
for (var i = 0; i < allfiles.Length; ++i)
{
string file = allfiles[i];
try
{
bool bCopy = false;
ZipArchive zip = ZipFile.OpenRead(file);
foreach (ZipArchiveEntry entry in zip.Entries)
{
if (entry.FullName.Contains("sheet"))
{
using (StreamReader reader = new StreamReader(entry.Open(), Encoding.UTF8))
{
string sXml = reader.ReadToEnd();
int nIndex = -1;
while (-1 != (nIndex = sXml.IndexOf(sHeight, nIndex + 1)))
{
int endIndex = sXml.IndexOf("\"", nIndex + sHeight.Length + 1);
string height = sXml.Substring(nIndex + sHeight.Length, endIndex - (nIndex + sHeight.Length));
int dotIndex;
if (-1 != (dotIndex = height.IndexOf('.')) && height.Length - dotIndex > 3)
{
bCopy = true;
//System.IO.File.Copy(file, Path.Combine(sDirOutput, Path.GetFileName(file)), true);
break;
}
}
}
}
if (bCopy)
{
break;
}
}
}
catch { }
}
}
static void getSize()
{
string sDirInput = @"\\192.168.5.3\files\Files\pptx";
SortedList<long, string> listUncompressed = new SortedList<long,string>();
String[] allfiles = System.IO.Directory.GetFiles(sDirInput, "*.*", System.IO.SearchOption.AllDirectories);
for (var i = 0; i < allfiles.Length; ++i)
{
string file = allfiles[i];
try
{
long uncommressed = 0;
ZipArchive zip = ZipFile.OpenRead(file);
foreach (ZipArchiveEntry entry in zip.Entries)
{
if (entry.FullName.EndsWith(".xml"))
{
uncommressed += entry.Length;
}
}
listUncompressed.Add(uncommressed, file);
}
catch { }
}
StringBuilder sb = new StringBuilder();
sb.Append("uncommressed(bytes)\tfilesize(bytes)\tName\r\n");
foreach (KeyValuePair<long, string> kvp in listUncompressed.Reverse())
{
sb.AppendFormat("{0}\t{1}\t{2}\r\n", kvp.Key, new System.IO.FileInfo(kvp.Value).Length, kvp.Value);
}
}
static void convertFiles()
{
string sPattern = "*.docx";
@ -226,5 +600,79 @@ namespace TestDocsWithChart
Directory.Delete(sDirTemp, true);
}
}
static void getLegacyDrawingHF()
{
string sAlternateContent = "<legacyDrawingHF ";
string sDirInput = @"\\192.168.5.3\files\Files\xlsx";
string sDirOutput = @"D:\Files\legacyDrawingHF";
String[] allfiles = System.IO.Directory.GetFiles(sDirInput, "*.*", System.IO.SearchOption.AllDirectories);
for (var i = 0; i < allfiles.Length; ++i)
{
string file = allfiles[i];
try
{
ZipArchive zip = ZipFile.OpenRead(file);
string sOutputPath = Path.Combine(sDirOutput, Path.GetFileName(file));
foreach (ZipArchiveEntry entry in zip.Entries)
{
if (entry.FullName.StartsWith("xl/worksheets/sheet", StringComparison.OrdinalIgnoreCase) && entry.FullName.EndsWith(".xml", StringComparison.OrdinalIgnoreCase))
{
using (StreamReader reader = new StreamReader(entry.Open(), Encoding.UTF8))
{
string sXml = reader.ReadToEnd();
if(-1 != sXml.IndexOf(sAlternateContent))
{
System.IO.File.Copy(file, sOutputPath, true);
break;
}
}
}
}
}
catch (Exception e)
{
}
}
}
static void getShapeType()
{
string sAlternateContent = "v:shapetype ";
string sAlternateContent2 = "<w:pict";
string sAlternateContent3 = "<w:object";
string sDirInput = @"\\192.168.5.3\files\Files\docx";
string sDirOutput = @"D:\Files\shapetype\docx";
String[] allfiles = System.IO.Directory.GetFiles(sDirInput, "*.*", System.IO.SearchOption.AllDirectories);
for (var i = 0; i < allfiles.Length; ++i)
{
string file = allfiles[i];
try
{
ZipArchive zip = ZipFile.OpenRead(file);
string sOutputPath = Path.Combine(sDirOutput, Path.GetFileName(file));
foreach (ZipArchiveEntry entry in zip.Entries)
{
if (entry.FullName.EndsWith(".xml", StringComparison.OrdinalIgnoreCase))
{
using (StreamReader reader = new StreamReader(entry.Open(), Encoding.UTF8))
{
string sXml = reader.ReadToEnd();
if (-1 != sXml.IndexOf(sAlternateContent) && -1 == sXml.IndexOf(sAlternateContent2) && -1 == sXml.IndexOf(sAlternateContent3))
{
System.IO.File.Copy(file, sOutputPath, true);
break;
}
}
}
}
}
catch (Exception e)
{
}
}
}
}
}

View File

@ -898,6 +898,7 @@
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
English,
en,
);
mainGroup = 17C27A0B1AC2DB3C00E1D003;
@ -1423,6 +1424,7 @@
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
ENABLE_BITCODE = YES;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
@ -1477,6 +1479,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_BITCODE = YES;
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
@ -1500,7 +1503,7 @@
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)";
ENABLE_BITCODE = NO;
ENABLE_BITCODE = YES;
EXECUTABLE_PREFIX = lib;
GCC_PREPROCESSOR_DEFINITIONS = (
UNICODE,
@ -1548,7 +1551,7 @@
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)";
ENABLE_BITCODE = NO;
ENABLE_BITCODE = YES;
EXECUTABLE_PREFIX = lib;
GCC_PREPROCESSOR_DEFINITIONS = (
UNICODE,

View File

@ -2015,6 +2015,7 @@
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
English,
en,
);
mainGroup = 173241771BBECF8400E67992;
@ -2539,7 +2540,7 @@
buildSettings = {
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
ENABLE_BITCODE = NO;
ENABLE_BITCODE = YES;
EXCLUDED_RECURSIVE_SEARCH_PATH_SUBDIRECTORIES = "*.nib *.lproj *.framework *.gch *.xcode* *.xcassets (*) .DS_Store CVS .svn .git .hg *.pbproj *.pbxproj";
GCC_PREPROCESSOR_DEFINITIONS = (
MU_STATIC_IMPLEMENTATION,
@ -2569,7 +2570,7 @@
buildSettings = {
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
ENABLE_BITCODE = NO;
ENABLE_BITCODE = YES;
EXCLUDED_RECURSIVE_SEARCH_PATH_SUBDIRECTORIES = "*.nib *.lproj *.framework *.gch *.xcode* *.xcassets (*) .DS_Store CVS .svn .git .hg *.pbproj *.pbxproj";
GCC_PREPROCESSOR_DEFINITIONS = (
MU_STATIC_IMPLEMENTATION,

View File

@ -244,6 +244,7 @@
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
English,
en,
Base,
);
@ -459,7 +460,7 @@
CLANG_CXX_LIBRARY = "compiler-default";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
DEVELOPMENT_TEAM = 2WH24U26GJ;
ENABLE_BITCODE = NO;
ENABLE_BITCODE = YES;
FRAMEWORK_SEARCH_PATHS = "$(PROJECT_DIR)/../../../Common/3dParty/boost/ios/framework";
INFOPLIST_FILE = TestIOSX2tConverter/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
@ -485,7 +486,7 @@
CLANG_CXX_LIBRARY = "compiler-default";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
DEVELOPMENT_TEAM = 2WH24U26GJ;
ENABLE_BITCODE = NO;
ENABLE_BITCODE = YES;
FRAMEWORK_SEARCH_PATHS = "$(PROJECT_DIR)/../../../Common/3dParty/boost/ios/framework";
INFOPLIST_FILE = TestIOSX2tConverter/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;

View File

@ -42,7 +42,7 @@
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Release"
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"