Compare commits

...

6 Commits

20 changed files with 330 additions and 97 deletions

View File

@ -486,14 +486,14 @@ namespace PPTX
pReader->Seek(_end_rec);
}
public:
nullable<PrstTxWarp> prstTxWarp;
TextFit Fit;
nullable<Scene3d> scene3d;
nullable_int flatTx;
nullable<Sp3d> sp3d;
// Attributes
// Attributes
nullable_limit<Limit::TextAnchor> anchor;
nullable_bool anchorCtr;
nullable_int bIns;
@ -513,9 +513,8 @@ namespace PPTX
nullable_limit<Limit::TextVerticalType> vert;
nullable_limit<Limit::VertOverflow> vertOverflow;
nullable_limit<Limit::TextWrap> wrap;
//private:
public:
mutable std::wstring m_namespace;
mutable std::wstring m_namespace;
protected:
virtual void FillParentPointersForChilds()
{

View File

@ -162,7 +162,17 @@ namespace PPTX
else if(parentFileIs<TableStyles>())
RGB = parentFileAs<TableStyles>().GetARGBFromMap(str);
else if(parentFileIs<Theme>())
RGB = parentFileAs<Theme>().GetARGBFromMap(str);
{
Theme & theme = parentFileAs<Theme>();
if (theme.isMapPresent())
{
RGB = parentFileAs<Theme>().GetARGBFromMap(str);
}
else
{
RGB = parentFileAs<Theme>().GetABGRFromScheme(str);
}
}
else if(parentFileIs<Presentation>())
RGB = parentFileAs<Presentation>().GetARGBFromMap(str);
//{

View File

@ -40,7 +40,6 @@ namespace PPTX
{
namespace Logic
{
class SolidFill : public WrapperWritingElement
{
public:
@ -127,10 +126,8 @@ namespace PPTX
if(Color.is_init())
fill.Color = Color;
}
public:
UniColor Color;
std::wstring m_namespace;
UniColor Color;
std::wstring m_namespace;
protected:
virtual void FillParentPointersForChilds()
{

View File

@ -140,14 +140,11 @@ namespace PPTX
pReader->Seek(_end_rec);
}
UniColor Color;
nullable_limit<Limit::FontStyleIndex> idx;
public:
UniColor Color;
// Attributes
nullable_limit<Limit::FontStyleIndex> idx;
//private:
public:
std::wstring m_name;
std::wstring m_name;
protected:
virtual void FillParentPointersForChilds()
{

View File

@ -324,15 +324,18 @@ namespace PPTX
}
DWORD GetARGBFromMap(const std::wstring& str)const
{
return GetARGBFromScheme(m_map->GetColorSchemeIndex(str));
if (m_map) return GetARGBFromScheme(m_map->GetColorSchemeIndex(str));
else return 0;
}
DWORD GetBGRAFromMap(const std::wstring& str)const
{
return GetBGRAFromScheme(m_map->GetColorSchemeIndex(str));
if (m_map) return GetBGRAFromScheme(m_map->GetColorSchemeIndex(str));
else return 0;
}
DWORD GetABGRFromMap(const std::wstring& str)const
{
return GetABGRFromScheme(m_map->GetColorSchemeIndex(str));
if (m_map) return GetABGRFromScheme(m_map->GetColorSchemeIndex(str));
else return 0;
}
void GetLineStyle(int number, Logic::Ln& lnStyle)const
{
@ -357,6 +360,7 @@ namespace PPTX
void SetColorMap(const Logic::ClrMap& map){m_map = &map;};
bool isMapPresent() {return (m_map != NULL);}
private:
Logic::ClrMap const* m_map;
};

View File

@ -1926,6 +1926,9 @@ void RtfShapeReader::ShapePropertyReader::ShapePropertyValueReader::PopState( Rt
else if ( L"posrelv" == m_sPropName ) m_oShape.m_nPositionVRelative = nValue;
else if ( L"fLayoutInCell" == m_sPropName ) m_oShape.m_bLayoutInCell = nValue;
else if ( L"fAllowOverlap" == m_sPropName ) m_oShape.m_bAllowOverlap = nValue;
else if ( L"fLockPosition" == m_sPropName ) m_oShape.m_nLockPosition = nValue;
else if ( L"fLockRotation" == m_sPropName ) m_oShape.m_nLockRotation = nValue;
//Position relative
else if ( L"pctHorizPos" == m_sPropName ) m_oShape.m_nPositionHPct = nValue;
else if ( L"pctVertPos" == m_sPropName ) m_oShape.m_nPositionVPct = nValue;
@ -2032,6 +2035,12 @@ void RtfShapeReader::ShapePropertyReader::ShapePropertyValueReader::PopState( Rt
else if ( L"dxTextRight" == m_sPropName ) m_oShape.m_nTexpRight = nValue;
else if ( L"dyTextBottom" == m_sPropName ) m_oShape.m_nTexpBottom = nValue;
else if ( L"anchorText" == m_sPropName ) m_oShape.m_nAnchorText = nValue;
else if ( L"WrapText" == m_sPropName ) m_oShape.m_nWrapText = nValue;
else if ( L"txflTextFlow" == m_sPropName ) m_oShape.m_nTxflTextFlow = nValue;
else if ( L"ccol" == m_sPropName ) m_oShape.m_nCcol = nValue;
else if ( L"txdir" == m_sPropName ) m_oShape.m_nTxdir = nValue;
else if ( L"fFitShapeToText"== m_sPropName ) m_oShape.m_bFitShapeToText = nValue;
else if ( L"fFitTextToShape"== m_sPropName ) m_oShape.m_bFitTextToShape = nValue;
//Geometry
else if ( L"adjustValue" == m_sPropName ) m_oShape.m_nAdjustValue[0] = nValue;

View File

@ -1427,7 +1427,7 @@ bool OOXrPrReader::Parse( ReaderParameter oParam, RtfCharProperty& oOutputProper
if (m_ooxRunProps->m_oPosition.IsInit() && m_ooxRunProps->m_oPosition->m_oVal.IsInit())
{
int nValue = m_ooxRunProps->m_oPosition->m_oVal->ToTwips();
int nValue = m_ooxRunProps->m_oPosition->m_oVal->ToTwips() / 10;
if( nValue >= 0 )
oOutputProperty.m_nUp = nValue;
else
@ -1518,7 +1518,32 @@ bool OOXrPrReader::Parse( ReaderParameter oParam, RtfCharProperty& oOutputProper
m_ooxRunProps->m_oHighlight->m_oVal->Get_G(),
m_ooxRunProps->m_oHighlight->m_oVal->Get_B()));
}
if( m_ooxRunProps->m_oColor.IsInit() )
if ( m_ooxRunProps->m_oTextOutline.IsInit())
{
if (m_ooxRunProps->m_oTextOutline->Fill.m_type == PPTX::Logic::UniFill::noFill )
{
oOutputProperty.m_nForeColor = 0xffffff; //white
}
else if (m_ooxRunProps->m_oTextOutline->Fill.m_type == PPTX::Logic::UniFill::solidFill )
{
NSCommon::smart_ptr<PPTX::Logic::SolidFill> fill = m_ooxRunProps->m_oTextOutline->Fill.Fill.smart_dynamic_cast<PPTX::Logic::SolidFill>();
unsigned int nColor = 0; //black
_CP_OPT(double) opacity;
OOXShapeReader::Parse(oParam, fill->Color.Color.operator ->(), nColor, opacity);
oOutputProperty.m_nForeColor = nColor;
}
if (oOutputProperty.m_nForeColor != PROP_DEF)
{
RtfColor rtfColor;
rtfColor.SetRGB(oOutputProperty.m_nForeColor);
oOutputProperty.m_nForeColor = oParam.oRtf->m_oColorTable.AddItem(rtfColor);
}
}
else if( m_ooxRunProps->m_oColor.IsInit() )
{
OOXColorReader oColorReader;
RtfColor oColor;
@ -1965,14 +1990,22 @@ bool OOXSectionPropertyReader::Parse( ReaderParameter oParam , RtfSectionPropert
}
if( m_ooxSectionProperty->m_oCols.IsInit() )
{
if(m_ooxSectionProperty->m_oCols->m_oNum.IsInit())
oOutput.m_nColumnNumber = m_ooxSectionProperty->m_oCols->m_oNum->GetValue();
else
oOutput.m_nColumnNumber = 1;
if (!m_ooxSectionProperty->m_oCols->m_arrColumns.empty())
{
oOutput.m_nColumnNumber = m_ooxSectionProperty->m_oCols->m_arrColumns.size();
}
if(m_ooxSectionProperty->m_oCols->m_oNum.IsInit())
{
oOutput.m_nColumnNumber = m_ooxSectionProperty->m_oCols->m_oNum->GetValue();
}
if(m_ooxSectionProperty->m_oCols->m_oSpace.IsInit())
oOutput.m_nColumnSpace = m_ooxSectionProperty->m_oCols->m_oSpace->ToTwips(); //todooo twips????
if (m_ooxSectionProperty->m_oCols->m_oSep.IsInit())
oOutput.m_bColumnLineBetween = m_ooxSectionProperty->m_oCols->m_oSep->ToBool();
for (size_t i = 0; i < m_ooxSectionProperty->m_oCols->m_arrColumns.size(); i++ )
{
RtfSectionProperty::ColumnProperty::CollumnVar oNewColumn;

View File

@ -287,16 +287,16 @@ public:
if (m_ooxAnchor->m_oWrapTight->m_oWrapPolygon->m_oStart.IsInit())
{
nValueX = m_ooxAnchor->m_oWrapTight->m_oWrapPolygon->m_oStart->m_oX.ToTwips();
nValueY = m_ooxAnchor->m_oWrapTight->m_oWrapPolygon->m_oStart->m_oY.ToTwips();
nValueX = m_ooxAnchor->m_oWrapTight->m_oWrapPolygon->m_oStart->m_oX.ToEmu();
nValueY = m_ooxAnchor->m_oWrapTight->m_oWrapPolygon->m_oStart->m_oY.ToEmu();
pOutput->m_aWrapPoints.push_back( std::pair<int,int>(nValueX, nValueY) );
}
for (size_t i = 0; i < m_ooxAnchor->m_oWrapTight->m_oWrapPolygon->m_arrLineTo.size(); i++ )
{
nValueX = m_ooxAnchor->m_oWrapTight->m_oWrapPolygon->m_arrLineTo[i]->m_oX.ToTwips();
nValueY = m_ooxAnchor->m_oWrapTight->m_oWrapPolygon->m_arrLineTo[i]->m_oY.ToTwips();
nValueX = m_ooxAnchor->m_oWrapTight->m_oWrapPolygon->m_arrLineTo[i]->m_oX.ToEmu();
nValueY = m_ooxAnchor->m_oWrapTight->m_oWrapPolygon->m_arrLineTo[i]->m_oY.ToEmu();
pOutput->m_aWrapPoints.push_back( std::pair<int,int>(nValueX, nValueY) );
}

View File

@ -51,7 +51,7 @@ public:
pOutput->m_nTop = 0;
pOutput->m_nPositionHRelative = 3;
pOutput->m_nPositionVRelative = 3;
int nDistLeft = m_ooxInline->m_oDistL.IsInit() ? (int)m_ooxInline->m_oDistL->ToTwips() : PROP_DEF;
int nDistTop = m_ooxInline->m_oDistT.IsInit() ? (int)m_ooxInline->m_oDistT->ToTwips() : PROP_DEF;
int nDistRight = m_ooxInline->m_oDistR.IsInit() ? (int)m_ooxInline->m_oDistR->ToTwips() : PROP_DEF;

View File

@ -648,11 +648,13 @@ void OOXShapeReader::Parse(ReaderParameter oParam, PPTX::Logic::ColorBase *oox_c
{
if (!oox_color) return;
oox_color->SetParentFilePointer(oParam.oDocx->m_pTheme);
nColor = oox_color->GetARGB(0);
BYTE alpha = nColor >> 24;
if (alpha != 0xff)
opacity = alpha;
nColor = nColor & 0xff000000;
nColor = nColor & 0x00ffffff;
//switch( oox_color->m_eType )
//{
// case OOX::Drawing::colorSheme: Parse(oParam, &oox_color->m_oShemeClr, nColor, opacity); break;
@ -698,7 +700,10 @@ void OOXShapeReader::Parse(ReaderParameter oParam, RtfShapePtr& pOutput, PPTX::L
if (change_sheme_color && oox_solid_fill->Color.getType() == OOX::et_a_schemeClr)
{
//oox_solid_fill->m_oShemeClr.m_oVal.FromString(*change_sheme_color);
PPTX::Logic::SchemeClr *pSchemeColor = new PPTX::Logic::SchemeClr();
pSchemeColor->val.set(*change_sheme_color);
oox_solid_fill->Color.Color.reset(pSchemeColor);
}
Parse(oParam, oox_solid_fill, nColor, opacity);
@ -910,21 +915,29 @@ void OOXShapeReader::Parse(ReaderParameter oParam, RtfShapePtr& pOutput, PPTX::L
{
NSCommon::smart_ptr<PPTX::Logic::SolidFill> fill = oox_line_prop->Fill.Fill.smart_dynamic_cast<PPTX::Logic::SolidFill>();
NSCommon::smart_ptr<PPTX::Logic::NoFill> no_fill = oox_line_prop->Fill.Fill.smart_dynamic_cast<PPTX::Logic::NoFill>();
if (fill.IsInit())
if (no_fill.IsInit())
{
pOutput->m_bLine = false;
}
else if (fill.IsInit())
{
if (change_sheme_color && fill->Color.getType() == OOX::et_a_schemeClr)
{
//fill->Color.FromString(*change_sheme_color);
}
PPTX::Logic::SchemeClr *pSchemeColor = new PPTX::Logic::SchemeClr();
pSchemeColor->val.set(*change_sheme_color);
fill->Color.Color.reset(pSchemeColor);
}
unsigned int nColor = 0; //black
_CP_OPT(double) opacity;
Parse(oParam, fill.operator->(), nColor, opacity);
pOutput->m_nLineColor = nColor;
}
else if (no_fill.IsInit())
else
{
pOutput->m_bLine = false;
}
}
if (oox_line_prop->w.IsInit())
@ -1061,15 +1074,26 @@ bool OOXShapeReader::ParseShape( ReaderParameter oParam, RtfShapePtr& pOutput)
PPTX::Logic::Shape * ooxShape = dynamic_cast<PPTX::Logic::Shape*> (m_ooxShape);
if (!ooxShape) return false;
PPTX::Logic::BodyPr *text_properties = NULL;
if (ooxShape->oTextBoxBodyPr.IsInit())
if (ooxShape->oTextBoxShape.IsInit())
{
if (ooxShape->oTextBoxBodyPr->fromWordArt.get_value_or(false))
text_properties = ooxShape->oTextBoxBodyPr.GetPointer();
}
if (ooxShape->txBody.IsInit())
{
text_properties = ooxShape->txBody->bodyPr.GetPointer();
}
if (text_properties)
{
if (text_properties->fromWordArt.get_value_or(false))
{
pOutput->m_bGtext = 1;
if (ooxShape->oTextBoxBodyPr->prstTxWarp.IsInit())
if (text_properties->prstTxWarp.IsInit())
{
SimpleTypes::ETextShapeType type = (SimpleTypes::ETextShapeType)ooxShape->oTextBoxBodyPr->prstTxWarp->prst.GetBYTECode();
SimpleTypes::ETextShapeType type = (SimpleTypes::ETextShapeType)text_properties->prstTxWarp->prst.GetBYTECode();
pOutput->m_nShapeType = OOX::PrstTx2VmlShapeType(type);
}
@ -1164,9 +1188,50 @@ bool OOXShapeReader::ParseShape( ReaderParameter oParam, RtfShapePtr& pOutput)
Parse(oParam, pOutput, ooxShape->spPr.ln.GetPointer());
}
//---------------------------------------------------------------------
PPTX::Logic::TxBody * text_properties = NULL;
OOXTextItemReader oTextItemReader;
RtfCharProperty old = oParam.oRtf->m_oDefaultCharProp;
if ((oox_sp_style) && (oox_sp_style->fontRef.idx.IsInit()))
{
std::wstring font_name;
if (oox_sp_style->fontRef.idx->GetBYTECode() == 0)
{
font_name = oParam.oDocx->m_pTheme->themeElements.fontScheme.majorFont.latin.typeface;
}
else if (oox_sp_style->fontRef.idx->GetBYTECode() == 1)
{
font_name = oParam.oDocx->m_pTheme->themeElements.fontScheme.minorFont.latin.typeface;
}
if (!font_name.empty())
{
RtfFont oCurFont;
if( true == oParam.oRtf->m_oFontTable.GetFont( font_name, oCurFont ) )
{
oParam.oRtf->m_oDefaultCharProp.m_nFont = oCurFont.m_nID;
}
else
{
oCurFont.m_sName = font_name;
oCurFont.m_nID = oParam.oRtf->m_oDefaultCharProp.m_nFont = oParam.oRtf->m_oFontTable.GetCount() + 1;
oParam.oRtf->m_oFontTable.AddItem( oCurFont );
}
}
if (oox_sp_style->fontRef.Color.is_init())
{
unsigned int nColor = 0; //black
_CP_OPT(double) opacity;
OOXShapeReader::Parse(oParam, oox_sp_style->fontRef.Color.Color.operator ->(), nColor, opacity);
RtfColor rtfColor;
rtfColor.SetRGB(nColor);
oParam.oRtf->m_oDefaultCharProp.m_nForeColor = oParam.oRtf->m_oColorTable.AddItem(rtfColor);
}
}
Parse(oParam, pOutput, text_properties);
if (ooxShape->txBody.IsInit())
{
for (size_t i=0; i < ooxShape->txBody->Paragrs.size(); i++)
@ -1174,7 +1239,13 @@ bool OOXShapeReader::ParseShape( ReaderParameter oParam, RtfShapePtr& pOutput)
oTextItemReader.Parse(&ooxShape->txBody->Paragrs[i], oParam );
}
text_properties = ooxShape->txBody.GetPointer();
}
else if (ooxShape->oTextBoxShape.IsInit())
{
for (size_t i=0; i < ooxShape->oTextBoxShape->m_arrItems.size(); i++)
{
oTextItemReader.Parse(ooxShape->oTextBoxShape->m_arrItems[i], oParam );
}
}
if (oTextItemReader.m_oTextItems)
@ -1190,13 +1261,66 @@ bool OOXShapeReader::ParseShape( ReaderParameter oParam, RtfShapePtr& pOutput)
{
pOutput->m_aTextItems = oTextItemReader.m_oTextItems;
}
}
if (text_properties)
oParam.oRtf->m_oDefaultCharProp = old;
return true;
}
void OOXShapeReader::Parse(ReaderParameter oParam, RtfShapePtr& pOutput, PPTX::Logic::BodyPr *text_props)
{
if (!text_props) return;
if (text_props->lIns.IsInit()) pOutput->m_nTexpLeft = *text_props->lIns;
if (text_props->tIns.IsInit()) pOutput->m_nTexpTop = *text_props->tIns;
if (text_props->rIns.IsInit()) pOutput->m_nTexpRight = *text_props->rIns;
if (text_props->bIns.IsInit()) pOutput->m_nTexpBottom = *text_props->bIns;
if (text_props->anchor.IsInit())
{
switch(text_props->anchor->GetBYTECode())
{
case 0: pOutput->m_nAnchorText = 2; break;
case 4: pOutput->m_nAnchorText = 0; break;
case 1:
case 2:
case 3:
default:
pOutput->m_nAnchorText = 4; break;
}
}
return true;
if (text_props->rtlCol.IsInit())
pOutput->m_nTxdir = *text_props->rtlCol;
if (text_props->numCol.IsInit())
pOutput->m_nCcol = *text_props->numCol;
switch(text_props->Fit.type)
{
case 2: pOutput->m_bFitShapeToText = 1; break;
case 3: pOutput->m_bFitTextToShape = 1; break;
default:
break;
}
if (text_props->vert.IsInit())
{
switch(text_props->vert->GetBYTECode())
{
case 0: pOutput->m_nTxflTextFlow = 1; break;
case 2: pOutput->m_nTxflTextFlow = 2; break;
case 3: pOutput->m_nTxflTextFlow = 1; break;
case 4: pOutput->m_nTxflTextFlow = 2; break;
case 5: pOutput->m_nTxflTextFlow = 5; break;
case 6: pOutput->m_nTxflTextFlow = 5; break;
default:
break;
}
}
//nullable_int rot;
//nullable_limit<Limit::TextWrap> wrap;
}
bool OOXShapeReader::ParsePic( ReaderParameter oParam, RtfShapePtr& pOutput)

View File

@ -66,14 +66,15 @@ public:
void ParseAdjustment(RtfShape& oShape, std::wstring sAdjustment);
static bool Parse(ReaderParameter oParam, RtfShapePtr& pOutput, PPTX::Logic::BlipFill *oox_bitmap_fill);
static void Parse(ReaderParameter oParam, PPTX::Logic::ColorBase *oox_color, unsigned int & nColor, _CP_OPT(double) &opacity);
private:
bool ParseShape( ReaderParameter oParam , RtfShapePtr& oOutput);
bool ParsePic( ReaderParameter oParam , RtfShapePtr& oOutput);
void Parse(ReaderParameter oParam, RtfShapePtr& pOutput, PPTX::Logic::BodyPr *text_properties);
void Parse(ReaderParameter oParam, RtfShapePtr& pOutput, PPTX::Logic::Xfrm *xfrm);
void Parse(ReaderParameter oParam, PPTX::Logic::ColorBase *oox_color, unsigned int & nColor, _CP_OPT(double) &opacity);
void Parse(ReaderParameter oParam, PPTX::Logic::SolidFill *oox_solid_fill, unsigned int & nColor, _CP_OPT(double) &opacity);
void Parse(ReaderParameter oParam, RtfShapePtr& pOutput, PPTX::Logic::StyleRef *style_ref, int type);

View File

@ -307,13 +307,12 @@ std::wstring RtfSectionProperty::RenderToRtf(RenderParameter oRenderParameter)
RENDER_RTF_INT ( m_nColumnNumber, sResult, L"cols" )
RENDER_RTF_INT ( m_nColumnSpace, sResult, L"colsx" )
RENDER_RTF_BOOL ( m_bColumnLineBetween, sResult, L"linebetcol" )
int nCollFormCount = (int)m_oCollumnProperty.m_aCollumnProperty.size();
if( nCollFormCount > 0 )
{
for( int i = 0; i < nCollFormCount; i++ )
if (m_nColumnNumber > 1)
{
for( size_t i = 0; i < m_oCollumnProperty.m_aCollumnProperty.size(); i++ )
{
sResult += L"\\colno" + std::to_wstring( i + 1 );
sResult += L"\\colno" + std::to_wstring( i + 1 );
RENDER_RTF_INT( m_oCollumnProperty.m_aCollumnProperty[i].m_nColumnSpaceToRightOfCol, sResult, L"colsr" )
RENDER_RTF_INT( m_oCollumnProperty.m_aCollumnProperty[i].m_nColumnWidth, sResult, L"colw" )
}
@ -575,23 +574,36 @@ std::wstring RtfSectionProperty::RenderToOOX(RenderParameter oRenderParameter)
}
}
sCollumnFormating += L"<w:cols w:num=\"" + std::to_wstring(m_nColumnNumber) + L"\"";
if( PROP_DEF != m_nColumnSpace )
sCollumnFormating += L" w:space=\"" + std::to_wstring(m_nColumnSpace) + L"\"";
if( true == bEqualWidth )
sCollumnFormating += L" w:equalWidth=\"true\"/>";
if (m_nColumnNumber > 1)
{
if (PROP_DEF != m_bColumnLineBetween)
sCollumnFormating += std::wstring(L" w:sep=\"") + (m_bColumnLineBetween ? L"1" : L"0") + L"\"";
if( true == bEqualWidth )
sCollumnFormating += L" w:equalWidth=\"true\"/>";
else
{
sCollumnFormating += L" w:equalWidth=\"false\">";
for (size_t i = 0; i < m_oCollumnProperty.m_aCollumnProperty.size(); i++ )
{
sCollumnFormating += L"<w:col";
if( PROP_DEF != m_oCollumnProperty.m_aCollumnProperty[i].m_nColumnWidth )
sCollumnFormating += L" w:w=\"" + std::to_wstring(m_oCollumnProperty.m_aCollumnProperty[i].m_nColumnWidth) + L"\"";
if( PROP_DEF != m_oCollumnProperty.m_aCollumnProperty[i].m_nColumnSpaceToRightOfCol )
sCollumnFormating += L" w:space=\"" + std::to_wstring(m_oCollumnProperty.m_aCollumnProperty[i].m_nColumnSpaceToRightOfCol ) + L"\"";
sCollumnFormating += L"/>";
}
sCollumnFormating += L"</w:cols>";
}
}
else
{
sCollumnFormating += L" w:equalWidth=\"false\">";
for (size_t i = 0; i < m_oCollumnProperty.m_aCollumnProperty.size(); i++ )
{
sCollumnFormating += L"<w:col";
if( PROP_DEF != m_oCollumnProperty.m_aCollumnProperty[i].m_nColumnWidth )
sCollumnFormating += L" w:w=\"" + std::to_wstring(m_oCollumnProperty.m_aCollumnProperty[i].m_nColumnWidth) + L"\"";
if( PROP_DEF != m_oCollumnProperty.m_aCollumnProperty[i].m_nColumnSpaceToRightOfCol )
sCollumnFormating += L" w:space=\"" + std::to_wstring(m_oCollumnProperty.m_aCollumnProperty[i].m_nColumnSpaceToRightOfCol ) + L"\"";
sCollumnFormating += L"/>";
}
sCollumnFormating += L"</w:cols>";
sCollumnFormating += L"/>";
}
if( false == sCollumnFormating.empty() )
sResult += sCollumnFormating;

View File

@ -315,15 +315,11 @@ public:
class ColumnProperty
{
public:
class CollumnVar
struct CollumnVar
{
public: int m_nColumnSpaceToRightOfCol; // colsrN Space to right of column in twips; used to specify formatting for variable-width columns.
int m_nColumnWidth; // colwN Width of column in twips; used to override the default constant width setting for variable-width columns.
CollumnVar()
{
m_nColumnSpaceToRightOfCol = PROP_DEF;
m_nColumnWidth = PROP_DEF;
}
int m_nColumnSpaceToRightOfCol = PROP_DEF; // colsrN Space to right of column in twips; used to specify formatting for variable-width columns.
int m_nColumnWidth = PROP_DEF; // colwN Width of column in twips; used to override the default constant width setting for variable-width columns.
};
std::vector< CollumnVar > m_aCollumnProperty;
ColumnProperty()
@ -570,8 +566,6 @@ public:
DEFAULT_PROPERTY ( m_nColumnSpace )
DEFAULT_PROPERTY ( m_bColumnLineBetween )
m_oCollumnProperty.m_aCollumnProperty.resize( m_nColumnNumber );
//Footnotes and Endnotes
DEFAULT_PROPERTY_DEF( m_eFootnotesJust, fj_none )
DEFAULT_PROPERTY ( m_nFootnotesStart )

View File

@ -55,7 +55,8 @@ void RtfShape::SetDefault()
DEFAULT_PROPERTY( m_bLockAnchor )
DEFAULT_PROPERTY_DEF( m_eXAnchor, ax_column ) //по умолчанию - привязка к тексту
DEFAULT_PROPERTY_DEF( m_eYAnchor, ay_Para )//по умолчанию - привязка к тексту
DEFAULT_PROPERTY( m_nLockPosition )
DEFAULT_PROPERTY( m_nLockRotation )
//Position absolute
DEFAULT_PROPERTY( m_nPositionH )
DEFAULT_PROPERTY( m_nPositionHRelative )
@ -89,19 +90,27 @@ void RtfShape::SetDefault()
//Text box
DEFAULT_PROPERTY( m_nAnchorText )
DEFAULT_PROPERTY_DEF( m_nTexpLeft, 91440 )
DEFAULT_PROPERTY_DEF( m_nTexpTop, 45720 )
DEFAULT_PROPERTY_DEF( m_nTexpRight, 91440 )
DEFAULT_PROPERTY_DEF( m_nTexpBottom, 45720 )
//DEFAULT_PROPERTY_DEF( m_nTexpLeft, 91440 )
//DEFAULT_PROPERTY_DEF( m_nTexpTop, 45720 )
//DEFAULT_PROPERTY_DEF( m_nTexpRight, 91440 )
//DEFAULT_PROPERTY_DEF( m_nTexpBottom, 45720 )
DEFAULT_PROPERTY( m_nTexpLeft )
DEFAULT_PROPERTY( m_nTexpTop )
DEFAULT_PROPERTY( m_nTexpRight )
DEFAULT_PROPERTY( m_nTexpBottom )
DEFAULT_PROPERTY( m_bFitShapeToText )
DEFAULT_PROPERTY( m_bFitTextToShape )
DEFAULT_PROPERTY( m_nCcol )
DEFAULT_PROPERTY( m_nTxdir )
DEFAULT_PROPERTY( m_nWrapText )
DEFAULT_PROPERTY( m_nTxflTextFlow)
DEFAULT_PROPERTY( m_fRotateText)
DEFAULT_PROPERTY( m_nScaleText)
DEFAULT_PROPERTY( m_fAutoTextMargin)
DEFAULT_PROPERTY( m_CdirFont)
//Geometry
for (size_t i = 0; i < 10; i++)
DEFAULT_PROPERTY( m_nAdjustValue[i] )
@ -425,6 +434,8 @@ std::wstring RtfShape::RenderToRtfShapeProperty(RenderParameter oRenderParameter
RENDER_RTF_SHAPE_PROP(L"posrelh", sResult, m_nPositionHRelative);
RENDER_RTF_SHAPE_PROP(L"posv", sResult, m_nPositionV);
RENDER_RTF_SHAPE_PROP(L"posrelv", sResult, m_nPositionVRelative);
RENDER_RTF_SHAPE_PROP(L"fLockPosition", sResult, m_nLockPosition);
RENDER_RTF_SHAPE_PROP(L"fLockRotation", sResult, m_nLockRotation);
RENDER_RTF_SHAPE_PROP(L"fLayoutInCell", sResult, m_bLayoutInCell);
RENDER_RTF_SHAPE_PROP(L"fAllowOverlap", sResult, m_bAllowOverlap);
@ -442,12 +453,12 @@ std::wstring RtfShape::RenderToRtfShapeProperty(RenderParameter oRenderParameter
if (m_sName.empty() == false)
{
sResult += L"{\\sp{\\sn wzName}{\\sv ";
sResult += m_sName + L"}}";
sResult += RtfChar::renderRtfText( m_sName, oRenderParameter.poDocument, -1 ) + L"}}";
}
if (m_sDescription.empty() == false)
{
sResult += L"{\\sp{\\sn wzDescription}{\\sv ";
sResult += m_sDescription + L"}}";
sResult += RtfChar::renderRtfText(m_sDescription, oRenderParameter.poDocument, -1 ) + L"}}";
}
//Rehydration
//RENDER_RTF_SHAPE_PROP(L"metroBlob", sResult, m_sMetroBlob);
@ -482,6 +493,7 @@ std::wstring RtfShape::RenderToRtfShapeProperty(RenderParameter oRenderParameter
RENDER_RTF_SHAPE_PROP(L"ccol", sResult, m_nCcol);
RENDER_RTF_SHAPE_PROP(L"txdir", sResult, m_nTxdir);
RENDER_RTF_SHAPE_PROP(L"WrapText", sResult, m_nWrapText);
RENDER_RTF_SHAPE_PROP(L"txflTextFlow", sResult, m_nTxflTextFlow);
//Geometry
RENDER_RTF_SHAPE_PROP(L"adjustValue", sResult, m_nAdjustValue[0] );
RENDER_RTF_SHAPE_PROP(L"adjust2Value", sResult, m_nAdjustValue[1] );
@ -538,7 +550,7 @@ std::wstring RtfShape::RenderToRtfShapeProperty(RenderParameter oRenderParameter
//Fill
if( 0 == m_bFilled )
sResult += L"{\\sp{\\sn fFilled}{\\sv 0}}";
RENDER_RTF_SHAPE_PROP(L"fillType", sResult, m_nFillType );
RENDER_RTF_SHAPE_PROP(L"fillType", sResult, m_nFillType );
RENDER_RTF_SHAPE_PROP(L"fillColor", sResult, m_nFillColor );
RENDER_RTF_SHAPE_PROP(L"fillBackColor", sResult, m_nFillColor2 );

View File

@ -83,6 +83,8 @@ public:
int m_nWrapSideType; //shpwrkN Wrap on side (for types 2 and 4 for \shpwrN ):
int m_nZOrderRelative; //shpfblwtxtN Describes relative z-ordering:
int m_bLockAnchor; //shplockanchor Lock anchor for a shape.
int m_nLockPosition;
int m_nLockRotation;
_AnchorX m_eXAnchor;
_AnchorY m_eYAnchor;
@ -132,6 +134,11 @@ public:
int m_nCcol; //columns
int m_nTxdir; //bidi
int m_nWrapText;
int m_nTxflTextFlow;
int m_fAutoTextMargin;
int m_fRotateText;
int m_nScaleText;
int m_CdirFont;
//Geometry
int m_nAdjustValue[10];
//Custom

View File

@ -28,7 +28,6 @@
17C1FBA61ACC4250006B99B3 /* ParagraphProperty.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 17E6A0661AC4262700F28F8B /* ParagraphProperty.cpp */; };
17C1FBA71ACC4250006B99B3 /* NumFormat.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 17E6A0001AC4262700F28F8B /* NumFormat.cpp */; };
17C1FBA81ACC4250006B99B3 /* SystemUtility.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 17E6A13D1AC4262800F28F8B /* SystemUtility.cpp */; };
17C1FBAA1ACC4250006B99B3 /* Utils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 17E6A00E1AC4262700F28F8B /* Utils.cpp */; };
17C1FBAB1ACC4250006B99B3 /* FileFactory_Spreadsheet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 17E6A1631AC4262800F28F8B /* FileFactory_Spreadsheet.cpp */; };
17C1FBAC1ACC4250006B99B3 /* AlternateContent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 17E6A0561AC4262700F28F8B /* AlternateContent.cpp */; };
17C1FBAD1ACC4250006B99B3 /* SmartTag.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 17E6A0721AC4262700F28F8B /* SmartTag.cpp */; };
@ -215,6 +214,11 @@
690FE0831E9BBA23004B26D0 /* DiagramDrawing.h in Headers */ = {isa = PBXBuildFile; fileRef = 690FE0811E9BBA23004B26D0 /* DiagramDrawing.h */; };
691C3E131F20C3D500F1775E /* File.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 691C3E121F20C3D500F1775E /* File.cpp */; };
69B3ADA920120093000EC6A7 /* VmlDrawing.h in Headers */ = {isa = PBXBuildFile; fileRef = 69B3ADA820120093000EC6A7 /* VmlDrawing.h */; };
69E6AC872031AB0C00795D9D /* Xlsx.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 69E6AC862031AB0C00795D9D /* Xlsx.cpp */; };
69E6AC892031AC3500795D9D /* SheetData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 69E6AC882031AC3500795D9D /* SheetData.cpp */; };
69E6AC8C2031ACA900795D9D /* VbaProject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 69E6AC8A2031ACA900795D9D /* VbaProject.cpp */; };
69E6AC8D2031ACA900795D9D /* VbaProject.h in Headers */ = {isa = PBXBuildFile; fileRef = 69E6AC8B2031ACA900795D9D /* VbaProject.h */; };
69E6AC8F2031B72500795D9D /* Worksheet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 69E6AC8E2031B72500795D9D /* Worksheet.cpp */; };
69F181EC1C7734A700B2952B /* strings_hack_printf.h in Headers */ = {isa = PBXBuildFile; fileRef = 69F181EA1C7734A700B2952B /* strings_hack_printf.h */; };
/* End PBXBuildFile section */
@ -252,7 +256,6 @@
17E6A00B1AC4262700F28F8B /* SimpleTypes_Word.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SimpleTypes_Word.h; sourceTree = "<group>"; };
17E6A00C1AC4262700F28F8B /* Size.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Size.h; sourceTree = "<group>"; };
17E6A00D1AC4262700F28F8B /* Unit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Unit.h; sourceTree = "<group>"; };
17E6A00E1AC4262700F28F8B /* Utils.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Utils.cpp; sourceTree = "<group>"; };
17E6A00F1AC4262700F28F8B /* Utils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Utils.h; sourceTree = "<group>"; };
17E6A0101AC4262700F28F8B /* Wrap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Wrap.cpp; sourceTree = "<group>"; };
17E6A0111AC4262700F28F8B /* Wrap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Wrap.h; sourceTree = "<group>"; };
@ -435,6 +438,11 @@
690FE0811E9BBA23004B26D0 /* DiagramDrawing.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DiagramDrawing.h; sourceTree = "<group>"; };
691C3E121F20C3D500F1775E /* File.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp.preprocessed; fileEncoding = 4; path = File.cpp; sourceTree = "<group>"; };
69B3ADA820120093000EC6A7 /* VmlDrawing.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VmlDrawing.h; sourceTree = "<group>"; };
69E6AC862031AB0C00795D9D /* Xlsx.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Xlsx.cpp; sourceTree = "<group>"; };
69E6AC882031AC3500795D9D /* SheetData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SheetData.cpp; sourceTree = "<group>"; };
69E6AC8A2031ACA900795D9D /* VbaProject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = VbaProject.cpp; sourceTree = "<group>"; };
69E6AC8B2031ACA900795D9D /* VbaProject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VbaProject.h; sourceTree = "<group>"; };
69E6AC8E2031B72500795D9D /* Worksheet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Worksheet.cpp; sourceTree = "<group>"; };
69F181EA1C7734A700B2952B /* strings_hack_printf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = strings_hack_printf.h; path = ../../Common/DocxFormat/Source/Base/strings_hack_printf.h; sourceTree = "<group>"; };
/* End PBXFileReference section */
@ -541,7 +549,6 @@
17E6A00B1AC4262700F28F8B /* SimpleTypes_Word.h */,
17E6A00C1AC4262700F28F8B /* Size.h */,
17E6A00D1AC4262700F28F8B /* Unit.h */,
17E6A00E1AC4262700F28F8B /* Utils.cpp */,
17E6A00F1AC4262700F28F8B /* Utils.h */,
17E6A0101AC4262700F28F8B /* Wrap.cpp */,
17E6A0111AC4262700F28F8B /* Wrap.h */,
@ -697,6 +704,8 @@
17E6A0871AC4262700F28F8B /* Media.h */,
17E6A0881AC4262700F28F8B /* OleObject.h */,
17E6A0891AC4262700F28F8B /* Video.h */,
69E6AC8A2031ACA900795D9D /* VbaProject.cpp */,
69E6AC8B2031ACA900795D9D /* VbaProject.h */,
);
path = Media;
sourceTree = "<group>";
@ -772,6 +781,7 @@
17E6A1871AC4262800F28F8B /* Worksheets */,
17E6A18F1AC4262800F28F8B /* WritingElement.h */,
17E6A1901AC4262800F28F8B /* Xlsx.h */,
69E6AC862031AB0C00795D9D /* Xlsx.cpp */,
);
path = XlsxFormat;
sourceTree = "<group>";
@ -883,7 +893,9 @@
17E6A18A1AC4262800F28F8B /* Hyperlinks.h */,
17E6A18B1AC4262800F28F8B /* MergeCells.h */,
17E6A18C1AC4262800F28F8B /* SheetData.h */,
69E6AC882031AC3500795D9D /* SheetData.cpp */,
17E6A18D1AC4262800F28F8B /* Worksheet.h */,
69E6AC8E2031B72500795D9D /* Worksheet.cpp */,
17E6A18E1AC4262800F28F8B /* WorksheetChildOther.h */,
);
path = Worksheets;
@ -1052,6 +1064,7 @@
17C1FC691ACC4250006B99B3 /* Footnote.h in Headers */,
17C1FC6A1ACC4250006B99B3 /* ComplexTypes.h in Headers */,
17C1FC6C1ACC4250006B99B3 /* RunContent.h in Headers */,
69E6AC8D2031ACA900795D9D /* VbaProject.h in Headers */,
17C1FC6D1ACC4250006B99B3 /* External.h in Headers */,
17C1FC6E1ACC4250006B99B3 /* Fills.h in Headers */,
17C1FC6F1ACC4250006B99B3 /* PhoneticPr.h in Headers */,
@ -1156,6 +1169,7 @@
17C1FB9E1ACC4250006B99B3 /* Align.cpp in Sources */,
17C1FB9F1ACC4250006B99B3 /* Index.cpp in Sources */,
17C1FBA01ACC4250006B99B3 /* TxtFile.cpp in Sources */,
69E6AC8F2031B72500795D9D /* Worksheet.cpp in Sources */,
17C1FBA11ACC4250006B99B3 /* SectionProperty.cpp in Sources */,
17C1FBA31ACC4250006B99B3 /* Color.cpp in Sources */,
17C1FBA41ACC4250006B99B3 /* Docx.cpp in Sources */,
@ -1163,17 +1177,19 @@
17C1FBA61ACC4250006B99B3 /* ParagraphProperty.cpp in Sources */,
17C1FBA71ACC4250006B99B3 /* NumFormat.cpp in Sources */,
17C1FBA81ACC4250006B99B3 /* SystemUtility.cpp in Sources */,
17C1FBAA1ACC4250006B99B3 /* Utils.cpp in Sources */,
17C1FBAB1ACC4250006B99B3 /* FileFactory_Spreadsheet.cpp in Sources */,
17C1FBAC1ACC4250006B99B3 /* AlternateContent.cpp in Sources */,
17C1FBAD1ACC4250006B99B3 /* SmartTag.cpp in Sources */,
17C1FBAE1ACC4250006B99B3 /* oMath.cpp in Sources */,
69E6AC892031AC3500795D9D /* SheetData.cpp in Sources */,
17C1FBAF1ACC4250006B99B3 /* ChartSerialize.cpp in Sources */,
17C1FBB11ACC4250006B99B3 /* Position.cpp in Sources */,
69E6AC8C2031ACA900795D9D /* VbaProject.cpp in Sources */,
691C3E131F20C3D500F1775E /* File.cpp in Sources */,
17C1FBB21ACC4250006B99B3 /* Vml.cpp in Sources */,
17C1FBB31ACC4250006B99B3 /* unicode_util.cpp in Sources */,
17C1FBB41ACC4250006B99B3 /* FldSimple.cpp in Sources */,
69E6AC872031AB0C00795D9D /* Xlsx.cpp in Sources */,
17C1FBB91ACC4250006B99B3 /* Paragraph.cpp in Sources */,
17C1FBBA1ACC4250006B99B3 /* SimpleTypes_Word.cpp in Sources */,
17C1FBBB1ACC4250006B99B3 /* MathEquation.cpp in Sources */,

View File

@ -1,4 +1,4 @@
VERSION = 2.4.516.0
VERSION = 2.4.517.0
DEFINES += INTVER=$$VERSION
# CONFIGURATION

View File

@ -814,7 +814,7 @@
17A762B21B0F35320046BC0B /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0800;
LastUpgradeCheck = 0920;
ORGANIZATIONNAME = "Ascensio System SIA";
};
buildConfigurationList = 17A762B51B0F35320046BC0B /* Build configuration list for PBXProject "metafile" */;
@ -1019,14 +1019,20 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@ -1061,14 +1067,20 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;

View File

@ -110,10 +110,10 @@ namespace NSUnicodeConverter
{ 46, 65001, "UTF-8", "Unicode (UTF-8)" },
{ 47, 65000, "UTF-7", "Unicode (UTF-7)" },
{ 48, 1200, "UTF-16", "Unicode (UTF-16)" },
{ 48, 1200, "UTF-16LE", "Unicode (UTF-16)" },
{ 49, 1201, "UTF-16BE", "Unicode (UTF-16 Big Endian)" },
{ 50, 12000, "UTF-32", "Unicode (UTF-32)" },
{ 50, 12000, "UTF-32LE", "Unicode (UTF-32)" },
{ 51, 12001, "UTF-32BE", "Unicode (UTF-32 Big Endian)" }
};
}

View File

@ -338,10 +338,16 @@ namespace CSVReader
size_t nSize = sFileDataW.length();
//if (nSize < 1 && nInputBufferSize > 0)
//{
// return AVS_FILEUTILS_ERROR_CONVERT_ICU;
//}
if (nSize < 1 && nInputBufferSize > 0)
{//для синхронности вывода превью и нормального результата
const NSUnicodeConverter::EncodindId& oEncodindId = NSUnicodeConverter::Encodings[nCodePage];
NSUnicodeConverter::CUnicodeConverter oUnicodeConverter;
sFileDataW = oUnicodeConverter.toUnicode((const char*)pInputBuffer, nInputBufferSize, oEncodindId.Name);
nSize = sFileDataW.length();
//return AVS_FILEUTILS_ERROR_CONVERT_ICU;
}
const WCHAR *pTemp = sFileDataW.c_str();
WCHAR wcDelimiterLeading = L'\0';