예제 #1
0
void CFExTemplateParams::load(CFRecord& record)
{
	record.loadAnyData(data);
}
예제 #2
0
파일: XF.cpp 프로젝트: ONLYOFFICE/core
void XF::readFields(CFRecord& record)
{
	global_info = record.getGlobalWorkbookInfo();
	
	unsigned short	flags;
	FontIndex		ifnt;

	record >> ifnt >> ifmt >> flags;

	font_index = ifnt.getValue();
	
	if (font_index >= 0 && font_index < global_info->m_arFonts.size())
	{
		Font* pFont = dynamic_cast<Font*>(global_info->m_arFonts[font_index].get());
		if (pFont)
		{
			pFont->set(font);
		}
	}

	fLocked		= GETBIT(flags, 0);
	fHidden		= GETBIT(flags, 1);
	fStyle		= GETBIT(flags, 2);
	f123Prefix	= GETBIT(flags, 3);
	ixfParent	= GETBITS(flags, 4, 15);
	
	if (global_info->Version < 0x0600)
	{
		_UINT16 flags1;
		_UINT32 flags2;
		_UINT32 flags3;

		record >> flags1 >> flags2 >> flags3;
		
		alc					= GETBITS(flags1, 0, 2);
		fWrap				= GETBIT (flags1, 3);
		alcV				= GETBITS(flags1, 4, 6);
		fJustLast			= GETBIT (flags1, 7);
		trot				= 0;//static_cast<unsigned char>(GETBITS(flags1, 8, 15));	
		cIndent				= 0;//static_cast<unsigned char>(GETBITS(flags1, 16, 19));
		fShrinkToFit		= 0;//GETBIT(flags1, 20);
		iReadOrder			= 0;//static_cast<unsigned char>(GETBITS(flags1, 22, 23));
			
		char orient			= static_cast<unsigned char>(GETBITS(flags1, 8, 10));

		switch(orient)
		{
			case 0:	trot = 0;		break;		// Text orientation: not rotated.
			case 1: trot = 0xff;	break;		// Text orientation: vertically stacked.
			case 2: trot = 90;		break;		// Text orientation: 90 deg counterclockwise.
			case 3: trot = 270;		break;		// Text orientation: 90 deg clockwise.
		}
		if(!fStyle)
		{
			fAtrNum = GETBIT(flags2, 10);
			fAtrFnt = GETBIT(flags2, 11);
			fAtrAlc = GETBIT(flags2, 12);
			fAtrBdr = GETBIT(flags2, 13);
			fAtrPat = GETBIT(flags2, 14);
			fAtrProt = GETBIT(flags2, 15);
		}

		fill.fls = static_cast<unsigned char>(GETBITS(flags2, 16, 21));
		
		fill.icvFore = GETBITS(flags2, 0, 6);
		fill.icvBack = GETBITS(flags2, 7, 13);
		
		border.dgTop		= static_cast<unsigned char>(GETBITS(flags3, 0, 2));
		border.dgLeft		= static_cast<unsigned char>(GETBITS(flags3, 3, 5));
		border.dgRight		= static_cast<unsigned char>(GETBITS(flags3, 6, 8));		
		border.dgBottom		= static_cast<unsigned char>(GETBITS(flags2, 22, 24));	
		border.dgDiag		= 0;
		border.grbitDiag	= 0;
		
		border.icvTop		= (0 != border.dgTop)	? static_cast<unsigned char>(GETBITS(flags3,  9, 15))	: 0;
		border.icvLeft		= (0 != border.dgLeft)	? static_cast<unsigned char>(GETBITS(flags3, 16, 22))	: 0;
		border.icvRight		= (0 != border.dgRight)	? static_cast<unsigned char>(GETBITS(flags3, 23, 29))	: 0;
		border.icvBottom	= (0 != border.dgBottom)? static_cast<unsigned char>(GETBITS(flags2, 25, 31))	: 0;
		border.icvDiag		= 0;
	}
예제 #3
0
void AxisParent::writeFields(CFRecord& record)
{
	record << iax;
	record.reserveNunBytes(16);// unused
}
예제 #4
0
파일: Guts.cpp 프로젝트: ONLYOFFICE/core
void Guts::readFields(CFRecord& record)
{
	record.skipNunBytes(4); // unused
	record >> iLevelRwMac >> iLevelColMac;
}
예제 #5
0
void ExternDdeLinkNoOper::load(CFRecord& record)
{
	record.skipNunBytes(4); // reserved
	record >> linkName;
}
예제 #6
0
void PtgArray::loadFields(CFRecord& record)
{
	record.skipNunBytes(7); // unused
}
예제 #7
0
void PtgMemNoMem::loadFields(CFRecord& record)
{
	record.skipNunBytes(4); // unused
	record >> cce;
}
예제 #8
0
void PtgAttrSemi::loadFields(CFRecord& record)
{
	record.skipNunBytes(2); // unused
}
예제 #9
0
void PtgAttrSemi::storeFields(CFRecord& record)
{
	record.reserveNunBytes(2); // unused
}