Compare commits

..

2 Commits

Author SHA1 Message Date
6b5e03df5e . 2017-12-23 12:29:40 +03:00
d0e0109560 . 2017-12-22 15:10:45 +03:00
34 changed files with 137 additions and 53 deletions

View File

@ -49,6 +49,7 @@
BasicRuntimeChecks="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"
ProgramDataBaseFileName="$(IntDir)\OdfFileWriterTest.pdb"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="4"
@ -66,7 +67,7 @@
Name="VCLinkerTool"
AdditionalDependencies="
Rpcrt4.lib"
LinkIncremental="2"
IgnoreDefaultLibraryNames="LIBCMTD.lib"
IgnoreDefaultLibraryNames=""
GenerateDebugInformation="true"
SubSystem="1"
TargetMachine="1"
@ -450,6 +451,14 @@
<File
RelativePath="..\..\ASCOfficeDocxFile2\DocWrapper\XlsxSerializer.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/bigobj"
/>
</FileConfiguration>
</File>
</Filter>
</Filter>

View File

@ -1478,6 +1478,13 @@ void odf_chart_context::set_series_pie_explosion(int val)//или точка с
impl_->current_level_.back().chart_properties_->content_.chart_pie_offset_ = val;
}
void odf_chart_context::set_series_pie_bubble(bool val)
{
if (!impl_->current_level_.back().chart_properties_)return;
impl_->current_level_.back().chart_properties_->content_.chart_pie_bubble_ = val;
}
//void odf_chart_context::set_cash(std::wstring format, std::vector<double> &data_double)
//{
// if (data_double.size() <1 || impl_->data_cell_ranges_.size() < 1) return;

View File

@ -89,6 +89,7 @@ public:
long get_count_data_points_series();
void set_series_pie_explosion(int val);
void set_series_pie_bubble(bool val);
void end_series();
void end_group_series();

View File

@ -100,6 +100,7 @@ public:
Impl(odf_conversion_context *odf_context) :odf_context_(odf_context)
{
default_column_width = -1;
optimal_column_width = false;
}
odf_table_state & current_table() {return tables_.back();}
@ -107,13 +108,21 @@ public:
void start_table(odf_table_state & state) {tables_.push_back(state);}
void end_table() {if (tables_.size() > 0) tables_.pop_back(); default_column_width = -1; default_cell_properties = L"";}
void end_table()
{
if (tables_.size() > 0) tables_.pop_back();
default_column_width = -1; // todo .. in level ???
default_cell_properties = L"";
optimal_column_width = false;
}
odf_style_context * styles_context() {return odf_context_->styles_context();}
odf_conversion_context *odf_context_;
double default_column_width;
double default_column_width;
bool optimal_column_width;
std::wstring default_cell_properties; // для предустановки ..
private:
@ -307,6 +316,10 @@ void odf_table_context::set_default_column_width(double width)
{
impl_->default_column_width = width;
}
void odf_table_context::set_optimal_column_width(bool val)
{
impl_->optimal_column_width = val;
}
void odf_table_context::set_column_optimal(bool val)
{
if (impl_->empty()) return;
@ -362,7 +375,11 @@ void odf_table_context::set_column_width(double width)
{
properties->style_table_column_properties_attlist_.style_column_width_ = length(length(width,length::pt).get_value_unit(length::cm),length::cm);
//properties->style_table_column_properties_attlist_.style_rel_column_width_ = length(length(width,length::pt).get_value_unit(length::cm),length::cm);
//properties->style_table_column_properties_attlist_.style_use_optimal_column_width_ = false;
if (impl_->optimal_column_width)
{
properties->style_table_column_properties_attlist_.style_use_optimal_column_width_ = true;
}
impl_->current_table().table_width += width;
}
@ -370,7 +387,7 @@ void odf_table_context::set_column_width(double width)
{
properties->style_table_column_properties_attlist_.style_use_optimal_column_width_ = true;
if (impl_->default_column_width >=0)
if (impl_->default_column_width >= 0)
{
properties->style_table_column_properties_attlist_.style_column_width_ = length(length(impl_->default_column_width,length::pt).get_value_unit(length::cm),length::cm);
//properties->style_table_column_properties_attlist_.style_rel_column_width_ = length(length(impl_->current_table().table_width,length::pt).get_value_unit(length::cm),length::cm);

View File

@ -66,6 +66,7 @@ public:
void start_table(office_element_ptr &elm, bool styled = false);
void set_default_column_width(double width);
void set_optimal_column_width(bool val);
void change_current_column_width(double width);
void end_table();

View File

@ -95,6 +95,7 @@ public:
_CP_OPT(int) chart_spline_order_;
_CP_OPT(int) chart_spline_resolution_;
_CP_OPT(int) chart_pie_offset_;
_CP_OPT(bool) chart_pie_bubble_;
_CP_OPT(int) chart_interval_minor_divisor_;
_CP_OPT(double) chart_maximum_;

View File

@ -971,6 +971,8 @@ void OoxConverter::convert(OOX::Spreadsheet::CT_Marker* marker, std::vector<OOX:
convert(dPt[i]->m_marker);
if (dPt[i]->m_explosion && dPt[i]->m_explosion->m_val)
odf_context()->chart_context()->set_series_pie_explosion(*dPt[i]->m_explosion->m_val);
if (dPt[i]->m_bubble3D && dPt[i]->m_bubble3D->m_val)
odf_context()->chart_context()->set_series_pie_bubble(*dPt[i]->m_bubble3D->m_val);
odf_context()->chart_context()->end_element();
current_point = set_point+1;

View File

@ -214,6 +214,7 @@ void DocxConverter::convert_document()
section.props = document->m_oSectPr.GetPointer();
section.start_para = last_section_start;
section.end_para = document->m_arrItems.end();
sections.push_back(section);
//----------------------------------------------------------------------------------------------------------
@ -3926,13 +3927,22 @@ bool DocxConverter::convert(OOX::Logic::CTableProperty *oox_table_pr, odf_writer
if (oox_table_pr == NULL) return false;
if (table_properties == NULL) return false;
if (oox_table_pr->m_oTblW.IsInit())
if (oox_table_pr->m_oTblW.IsInit() && oox_table_pr->m_oTblW->m_oW.IsInit())
{
if ((oox_table_pr->m_oTblW->m_oType.IsInit() && oox_table_pr->m_oTblW->m_oType->GetValue() == SimpleTypes::tblwidthDxa) &&
(oox_table_pr->m_oTblW->m_oW.IsInit() && oox_table_pr->m_oTblW->m_oW->GetValue() >0))
if (oox_table_pr->m_oTblW->m_oType.IsInit() && oox_table_pr->m_oTblW->m_oW.IsInit())
{
if (oox_table_pr->m_oTblW->m_oW->IsPercent() == false)
odt_context->table_context()->set_default_column_width(oox_table_pr->m_oTblW->m_oW->GetValue()/20.);
if ( oox_table_pr->m_oTblW->m_oType->GetValue() == SimpleTypes::tblwidthDxa &&
oox_table_pr->m_oTblW->m_oW->GetValue() > 0 )
{
if ( oox_table_pr->m_oTblW->m_oW->IsPercent() == false)
odt_context->table_context()->set_default_column_width(oox_table_pr->m_oTblW->m_oW->GetValue() / 20.);
}
else if ( oox_table_pr->m_oTblW->m_oType->GetValue() == SimpleTypes::tblwidthAuto &&
oox_table_pr->m_oTblW->m_oW->GetValue() == 0 )
{
//динамическое расширение - автоподбор по содержимому.
odt_context->table_context()->set_optimal_column_width(true);
}
}
}
@ -4033,7 +4043,7 @@ bool DocxConverter::convert(OOX::Logic::CTableProperty *oox_table_pr, bool base_
{//напрямую задать cell_prop на саму таблицу низя - тока как default-cell-style-name на columns & row
//общие свойства ячеек
odt_context->styles_context()->create_style(L"",odf_types::style_family::TableCell, true, false, -1); //ради нормального задания дефолтовых свойств на cells
odt_context->styles_context()->create_style(L"", odf_types::style_family::TableCell, true, false, -1); //ради нормального задания дефолтовых свойств на cells
odt_context->styles_context()->last_state()->set_dont_write(true);
odf_writer::style_table_cell_properties * table_cell_properties = odt_context->styles_context()->last_state()->get_table_cell_properties();

View File

@ -60,6 +60,7 @@
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
EnableEnhancedInstructionSet="0"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="false"

View File

@ -46,10 +46,12 @@
Optimization="0"
AdditionalIncludeDirectories="../../DesktopEditor/xml/build/vs2005;../../DesktopEditor/xml/libxml2/include"
PreprocessorDefinitions="_DEBUG;_CONSOLE;_USE_MATH_DEFINES;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED;USE_LITE_READER;_USE_XMLLITE_READER_;_PRESENTATION_WRITER_;_SVG_CONVERT_TO_IMAGE_;DONT_WRITE_EMBEDDED_FONTS"
MinimalRebuild="false"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
RuntimeLibrary="1"
EnableEnhancedInstructionSet="0"
UsePrecompiledHeader="0"
ProgramDataBaseFileName="$(IntDir)\PptFileFormatTest.pdb"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="4"
@ -67,7 +69,7 @@
Name="VCLinkerTool"
AdditionalDependencies="Urlmon.lib"
LinkIncremental="1"
IgnoreDefaultLibraryNames="LIBCMTD.lib;libcmt.lib"
IgnoreDefaultLibraryNames=""
IgnoreEmbeddedIDL="true"
GenerateDebugInformation="true"
SubSystem="1"

View File

@ -1212,7 +1212,7 @@ namespace PPTX
}
}
bool bRect = bOle; //ole ВСЕГДА rect
bool bRect = bOle; //ole ВСЕГДА rect или shape c типом ctPictFrame(75)
if (spPr.Geometry.is<PPTX::Logic::PrstGeom>())
{

View File

@ -49,6 +49,7 @@
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
EnableEnhancedInstructionSet="0"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="true"

View File

@ -48,6 +48,7 @@
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
EnableEnhancedInstructionSet="0"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="false"

View File

@ -335,8 +335,10 @@
Optimization="0"
EnableIntrinsicFunctions="true"
PreprocessorDefinitions="_DEBUG;_WINDOWS;USE_PRECOMPILED_HEADERS;WIN32"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
EnableEnhancedInstructionSet="1"
EnableEnhancedInstructionSet="0"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="pch.h"
ObjectFile="$(IntDir)\"

View File

@ -48,6 +48,7 @@
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
EnableEnhancedInstructionSet="0"
ProgramDataBaseFileName="$(IntDir)\DocxFormat.pdb"
WarningLevel="3"
DebugInformationFormat="4"

View File

@ -83,13 +83,18 @@ namespace OOX
}
virtual ~CAuthors()
{
ClearItems();
}
virtual void ClearItems()
{
m_arrItems.clear();
}
virtual void fromXML(XmlUtils::CXmlNode& node)
{
}
virtual std::wstring toXML() const
virtual std::wstring toXML() const
{
return _T("");
return L"";
}
virtual void toXML(NSStringUtils::CStringBuilder& writer) const
{
@ -106,7 +111,7 @@ namespace OOX
}
writer.WriteString(L"</authors>");
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
{
ReadAttributes( oReader );
@ -118,8 +123,11 @@ namespace OOX
{
std::wstring sName = XmlUtils::GetNameNoNS(oReader.GetName());
if ( _T("author") == sName )
m_arrItems.push_back(new std::wstring(oReader.GetText3()));
if ( L"author" == sName )
{
std::wstring *str = new std::wstring(oReader.GetText3());
m_arrItems.push_back(str);
}
}
}
@ -148,7 +156,7 @@ namespace OOX
}
virtual std::wstring toXML() const
{
return _T("");
return L"";
}
virtual void toXML(NSStringUtils::CStringBuilder& writer) const
{
@ -190,13 +198,10 @@ namespace OOX
private:
void ReadAttributes(XmlUtils::CXmlLiteReader& oReader)
{
// Читаем атрибуты
WritingElement_ReadAttributes_Start( oReader )
WritingElement_ReadAttributes_Read_if ( oReader, _T("ref"), m_oRef )
WritingElement_ReadAttributes_Read_if ( oReader, _T("authorId"), m_oAuthorId )
WritingElement_ReadAttributes_End( oReader )
WritingElement_ReadAttributes_Read_if ( oReader, L"ref", m_oRef )
WritingElement_ReadAttributes_Read_if ( oReader, L"authorId", m_oAuthorId )
WritingElement_ReadAttributes_End( oReader )
}
public:
nullable<SimpleTypes::CRelationshipId > m_oRef;
@ -219,7 +224,7 @@ namespace OOX
}
virtual std::wstring toXML() const
{
return _T("");
return L"";
}
virtual void toXML(NSStringUtils::CStringBuilder& writer) const
{
@ -247,7 +252,7 @@ namespace OOX
{
std::wstring sName = XmlUtils::GetNameNoNS(oReader.GetName());
if ( _T("comment") == sName )
if ( L"comment" == sName )
m_arrItems.push_back(new CComment(oReader));
}
}
@ -277,8 +282,6 @@ namespace OOX
virtual ~CComments()
{
}
public:
virtual void read(const CPath& oPath)
{
//don't use this. use read(const CPath& oRootPath, const CPath& oFilePath)
@ -299,7 +302,7 @@ namespace OOX
return;
std::wstring sName = XmlUtils::GetNameNoNS(oReader.GetName());
if ( _T("comments") == sName )
if ( L"comments" == sName )
{
ReadAttributes( oReader );
@ -310,9 +313,9 @@ namespace OOX
{
sName = XmlUtils::GetNameNoNS(oReader.GetName());
if ( _T("authors") == sName )
if ( L"authors" == sName )
m_oAuthors = oReader;
else if ( _T("commentList") == sName )
else if ( L"commentList" == sName )
m_oCommentList = oReader;
}
}
@ -321,12 +324,12 @@ namespace OOX
virtual void write(const CPath& oPath, const CPath& oDirectory, CContentTypes& oContent) const
{
NSStringUtils::CStringBuilder sXml;
sXml.WriteString(_T("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><comments xmlns=\"http://schemas.openxmlformats.org/spreadsheetml/2006/main\">"));
sXml.WriteString(L"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><comments xmlns=\"http://schemas.openxmlformats.org/spreadsheetml/2006/main\">");
if(m_oAuthors.IsInit())
m_oAuthors->toXML(sXml);
if(m_oCommentList.IsInit())
m_oCommentList->toXML(sXml);
sXml.WriteString(_T("</comments>"));
sXml.WriteString(L"</comments>");
std::wstring sPath = oPath.GetPath();
NSFile::CFileBinary::SaveToFile(sPath, sXml.GetData());
@ -375,7 +378,7 @@ namespace OOX
}
virtual std::wstring toXML() const
{
return _T("");
return L"";
}
virtual void toXML(NSStringUtils::CStringBuilder& writer) const
{
@ -403,12 +406,9 @@ namespace OOX
private:
void ReadAttributes(XmlUtils::CXmlLiteReader& oReader)
{
// Читаем атрибуты
WritingElement_ReadAttributes_Start( oReader )
WritingElement_ReadAttributes_Read_if ( oReader, _T("r:id"), m_oId )
WritingElement_ReadAttributes_End( oReader )
WritingElement_ReadAttributes_Read_if ( oReader, L"r:id", m_oId )
WritingElement_ReadAttributes_End( oReader )
}
public:
nullable<SimpleTypes::CRelationshipId > m_oId;

View File

@ -53,6 +53,7 @@
BasicRuntimeChecks="3"
RuntimeLibrary="1"
StructMemberAlignment="0"
EnableEnhancedInstructionSet="0"
PrecompiledHeaderFile=""
AssemblerListingLocation="$(ConfigurationName)\agg2d.pch"
ObjectFile="$(ConfigurationName)\"

View File

@ -502,6 +502,7 @@
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
EnableEnhancedInstructionSet="0"
PrecompiledHeaderFile=""
AssemblerListingLocation="$(ConfigurationName)\"
ObjectFile="$(IntDir)\"

View File

@ -50,6 +50,7 @@
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
EnableEnhancedInstructionSet="0"
PrecompiledHeaderFile=""
AssemblerListingLocation="$(ConfigurationName)\"
ObjectFile="$(IntDir)\"

View File

@ -343,7 +343,8 @@
PreprocessorDefinitions="WIN32;_DEBUG;_LIB"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
RuntimeLibrary="1"
EnableEnhancedInstructionSet="0"
PrecompiledHeaderFile=""
AssemblerListingLocation="$(ConfigurationName)\"
ObjectFile="$(IntDir)\"

View File

@ -337,8 +337,10 @@
Name="VCCLCompilerTool"
Optimization="0"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
EnableEnhancedInstructionSet="0"
PrecompiledHeaderFile=""
AssemblerListingLocation="$(ConfigurationName)\"
ObjectFile="$(IntDir)\"

View File

@ -345,6 +345,7 @@
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
EnableEnhancedInstructionSet="0"
PrecompiledHeaderFile=""
AssemblerListingLocation="$(ConfigurationName)\"
ObjectFile="$(IntDir)\"

View File

@ -50,6 +50,7 @@
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
EnableEnhancedInstructionSet="0"
PrecompiledHeaderFile=""
AssemblerListingLocation="$(IntDir)\"
ObjectFile="$(IntDir)\"

View File

@ -48,8 +48,10 @@
Optimization="0"
AdditionalIncludeDirectories="..\zlib"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
EnableEnhancedInstructionSet="0"
PrecompiledHeaderFile=""
AssemblerListingLocation="$(ConfigurationName)\"
ObjectFile="$(IntDir)\"

View File

@ -196,6 +196,7 @@
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
EnableEnhancedInstructionSet="0"
PrecompiledHeaderFile=""
AssemblerListingLocation="$(ConfigurationName)\"
ObjectFile="$(IntDir)\"

View File

@ -51,6 +51,7 @@
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
EnableEnhancedInstructionSet="0"
PrecompiledHeaderFile=""
AssemblerListingLocation="$(ConfigurationName)\"
ObjectFile="$(IntDir)\"

View File

@ -199,6 +199,7 @@
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
EnableEnhancedInstructionSet="0"
PrecompiledHeaderFile=""
AssemblerListingLocation="$(ConfigurationName)\"
ObjectFile="$(IntDir)\"

View File

@ -499,8 +499,10 @@
Optimization="0"
AdditionalIncludeDirectories="..\..\..\include"
PreprocessorDefinitions="_DEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT_DEBUG_LEVEL_ERROR;FT_DEBUG_LEVEL_TRACE;FT2_BUILD_LIBRARY"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
EnableEnhancedInstructionSet="0"
DisableLanguageExtensions="true"
PrecompiledHeaderFile=""
AssemblerListingLocation="$(ConfigurationName)/"

View File

@ -212,10 +212,11 @@
Optimization="0"
AdditionalIncludeDirectories="&quot;../agg-2.4/include&quot;;&quot;../freetype-2.5.2/include&quot;"
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;$(NOINHERIT)"
MinimalRebuild="false"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
StructMemberAlignment="0"
EnableEnhancedInstructionSet="0"
DisableLanguageExtensions="false"
PrecompiledHeaderFile=""
AssemblerListingLocation="$(ConfigurationName)\"

View File

@ -47,6 +47,7 @@
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
EnableEnhancedInstructionSet="0"
UsePrecompiledHeader="0"
ObjectFile="$(IntDir)\"
ProgramDataBaseFileName="$(IntDir)\vc80.pdb"

View File

@ -496,6 +496,7 @@
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
EnableEnhancedInstructionSet="0"
PrecompiledHeaderFile=""
AssemblerListingLocation="$(ConfigurationName)\"
ObjectFile="$(IntDir)\"

View File

@ -47,6 +47,7 @@
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
EnableEnhancedInstructionSet="0"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="true"

View File

@ -48,6 +48,7 @@
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
EnableEnhancedInstructionSet="0"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="true"

View File

@ -74,22 +74,30 @@ namespace BinXlsxRW {
{
bool bEmpty = true;
SimpleTypes::Spreadsheet::CHexColor oRgbColor;
if(color.m_oIndexed.IsInit())
{
int nIndex = (int)color.m_oIndexed->GetValue();
bool bDefault = true;
std::map<int, OOX::Spreadsheet::CRgbColor*>::iterator pFind = pIndexedColors->mapIndexedColors.find(nIndex);
if(pFind != pIndexedColors->mapIndexedColors.end())
if (pIndexedColors)
{
OOX::Spreadsheet::CRgbColor* pRgbColor = pFind->second;
if(pRgbColor->m_oRgb.IsInit())
std::map<int, OOX::Spreadsheet::CRgbColor*>::iterator pFind = pIndexedColors->mapIndexedColors.find(nIndex);
if(pFind != pIndexedColors->mapIndexedColors.end())
{
bEmpty = false;
oRgbColor = pRgbColor->m_oRgb.get();
OOX::Spreadsheet::CRgbColor* pRgbColor = pFind->second;
if(pRgbColor->m_oRgb.IsInit())
{
bEmpty = false;
oRgbColor = pRgbColor->m_oRgb.get();
bDefault = false;
}
}
}
else
if (bDefault)
{
unsigned char ucA;
unsigned char ucR;