亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? basicexcelvc6.cpp

?? 對(duì)EXCEL的操作
?? CPP
?? 第 1 頁(yè) / 共 5 頁(yè)
字號(hào):
int CompoundFile::ReadFile(const wchar_t* path, vector<char>& data)
// PURPOSE: Read a file's data in the compound file.
// PROMISE: Returns the small blocks of data stored by the Root Entry if path = "\".
// PROMISE: data will not be set if file is not present in the compound file.
{
	data.clear();
	size_t dataSize;
	int ret = FileSize(path, dataSize);
	if (ret != SUCCESS) return ret;

	data.resize(dataSize);
	return ReadFile(path, &*(data.begin()));
}

int CompoundFile::WriteFile(const wchar_t* path, const char* data, size_t size)
// PURPOSE: Write data to a file in the compound file.
// PROMISE: The file's original data will be replaced by the new data.
{
	PropertyTree* property = FindProperty(path);
	if (property == 0) return FILE_NOT_FOUND;
	
	if (property->self_->size_ >= 4096)
	{
		if (size >= 4096) property->self_->startBlock_ = WriteData(data, size, property->self_->startBlock_, true);
		else
		{
			property->self_->startBlock_ = WriteData(0, 0, property->self_->startBlock_, true);
			property->self_->startBlock_ = WriteData(data, size, property->self_->startBlock_, false);
		}
	}
	else
	{
		if (size < 4096) property->self_->startBlock_ = WriteData(data, size, property->self_->startBlock_, false);
		else
		{
			property->self_->startBlock_ = WriteData(0, 0, property->self_->startBlock_, false);
			property->self_->startBlock_ = WriteData(data, size, property->self_->startBlock_, true);
		}
	}
	property->self_->size_ = size;
	SaveHeader();
	SaveBAT();
	SaveProperties();
	return SUCCESS;
}

int CompoundFile::WriteFile(const wchar_t* path, const vector<char>& data, size_t size)
// PURPOSE: Write data to a file in the compound file.
// PROMISE: The file's original data will be replaced by the new data.
{
	return WriteFile(path, &*(data.begin()), size);
}

/*************ANSI char compound file, directory and file functions******************/
bool CompoundFile::Create(const char* filename)
{
	size_t filenameLength = strlen(filename);
	wchar_t* wname = new wchar_t[filenameLength+1];
	mbstowcs(wname, filename, filenameLength);
	wname[filenameLength] = 0;
	bool ret = Create(wname);
	delete[] wname;
	return ret;
}

bool CompoundFile::Open(const char* filename, ios_base::openmode mode)
{
	size_t filenameLength = strlen(filename);
	wchar_t* wname = new wchar_t[filenameLength+1];
	mbstowcs(wname, filename, filenameLength);
	wname[filenameLength] = 0;
	bool ret = Open(wname, mode);
	delete[] wname;
	return ret;
}

int CompoundFile::ChangeDirectory(const char* path)
{
	size_t pathLength = strlen(path);
	wchar_t* wpath = new wchar_t[pathLength+1];
	mbstowcs(wpath, path, pathLength);
	wpath[pathLength] = 0;
	int ret = ChangeDirectory(wpath);
	delete[] wpath;
	return ret;
}

int CompoundFile::MakeDirectory(const char* path)
{
	size_t pathLength = strlen(path);
	wchar_t* wpath = new wchar_t[pathLength+1];
	mbstowcs(wpath, path, pathLength);
	wpath[pathLength] = 0;
	int ret = MakeDirectory(wpath);
	delete[] wpath;
	return ret;
}

int CompoundFile::PresentWorkingDirectory(char* path)
{
	size_t pathLength = strlen(path);
	wchar_t* wpath = new wchar_t[pathLength+1];
	int ret = PresentWorkingDirectory(wpath);
	if (ret == SUCCESS)
	{
		pathLength = wcslen(wpath);
		wcstombs(path, wpath, pathLength);
		path[pathLength] = 0;
	}
	delete[] wpath;
	return ret;
}

int CompoundFile::PresentWorkingDirectory(vector<char>& path)
{
	vector<wchar_t> wpath;
	int ret = PresentWorkingDirectory(wpath);
	if (ret == SUCCESS)
	{
		size_t pathLength = wpath.size();
		path.resize(pathLength);
		wcstombs(&*(path.begin()), &*(wpath.begin()), pathLength);
		path[pathLength] = 0;
	}
	return ret;
}

int CompoundFile::RemoveDirectory(const char* path)
{
	size_t pathLength = strlen(path);
	wchar_t* wpath = new wchar_t[pathLength+1];
	mbstowcs(wpath, path, pathLength);
	wpath[pathLength] = 0;
	int ret = RemoveDirectory(wpath);
	delete[] wpath;
	return ret;
}

int CompoundFile::DelTree(const char* path)
{
	size_t pathLength = strlen(path);
	wchar_t* wpath = new wchar_t[pathLength+1];
	mbstowcs(wpath, path, pathLength);
	wpath[pathLength] = 0;
	int ret = DelTree(wpath);
	delete[] wpath;
	return ret;
}

int CompoundFile::MakeFile(const char* path)
{
	size_t pathLength = strlen(path);
	wchar_t* wpath = new wchar_t[pathLength+1];
	mbstowcs(wpath, path, pathLength);
	wpath[pathLength] = 0;
	int ret = MakeFile(wpath);
	delete[] wpath;
	return ret;
}

int CompoundFile::RemoveFile(const char* path)
{
	size_t pathLength = strlen(path);
	wchar_t* wpath = new wchar_t[pathLength+1];
	mbstowcs(wpath, path, pathLength);
	wpath[pathLength] = 0;
	int ret = RemoveFile(wpath);
	delete[] wpath;
	return ret;
}

int CompoundFile::FileSize(const char* path, size_t& size)
{
	size_t pathLength = strlen(path);
	wchar_t* wpath = new wchar_t[pathLength+1];
	mbstowcs(wpath, path, pathLength);
	wpath[pathLength] = 0;
	int ret = FileSize(wpath, size);
	delete[] wpath;
	return ret;
}
int CompoundFile::ReadFile(const char* path, char* data)
{
	size_t pathLength = strlen(path);
	wchar_t* wpath = new wchar_t[pathLength+1];
	mbstowcs(wpath, path, pathLength);
	wpath[pathLength] = 0;
	int ret = ReadFile(wpath, data);
	delete[] wpath;
	return ret;
}
int CompoundFile::ReadFile(const char* path, vector<char>& data)
{
	size_t pathLength = strlen(path);
	wchar_t* wpath = new wchar_t[pathLength+1];
	mbstowcs(wpath, path, pathLength);
	wpath[pathLength] = 0;
	int ret = ReadFile(wpath, data);
	delete[] wpath;
	return ret;
}
int CompoundFile::WriteFile(const char* path, char* data, size_t size)
{
	size_t pathLength = strlen(path);
	wchar_t* wpath = new wchar_t[pathLength+1];
	mbstowcs(wpath, path, pathLength);
	wpath[pathLength] = 0;
	int ret = WriteFile(wpath, data, size);
	delete[] wpath;
	return ret;
}
int CompoundFile::WriteFile(const char* path, vector<char>& data, size_t size)
{
	size_t pathLength = strlen(path);
	wchar_t* wpath = new wchar_t[pathLength+1];
	mbstowcs(wpath, path, pathLength);
	wpath[pathLength] = 0;
	int ret = WriteFile(wpath, data, size);
	delete[] wpath;
	return ret;
}

/*********************** Inaccessible General Functions ***************************/
void CompoundFile::IncreaseLocationReferences(vector<size_t> indices)
// PURPOSE: Increase block location references in header, BAT indices and properties,
// PURPOSE: which will be affected by the insertion of new indices contained in indices.
// PROMISE: Block location references which are smaller than all the new indices
// PROMISE: will not be affected.
// PROMISE: SBAT location references will not be affected.
// PROMISE: Changes will not be written to compound file.
{
	size_t maxIndices = indices.size();

	// Change BAT Array references
	{for (size_t i=0; i<109 && header_.BATArray_[i]!=-1; ++i)
	{
		size_t count = 0;
		for (size_t j=0; j<maxIndices; ++j)
		{
			if (header_.BATArray_[i] >= indices[j] &&
				header_.BATArray_[i] != -1) ++count;
		}
		header_.BATArray_[i] += count;	
	}}

	// Change XBAT start block if any
	if (header_.XBATCount_) 
	{
		size_t count = 0;
		for (size_t j=0; j<maxIndices; ++j)
		{
			if (header_.XBATStart_ >= indices[j] &&
				header_.XBATStart_ != -2) ++count;
		}
		header_.XBATStart_ += count;	
	}

	// Change SBAT start block if any
	if (header_.SBATCount_) 
	{
		size_t count = 0;
		for (size_t j=0; j<maxIndices; ++j)
		{
			if (header_.SBATStart_ >= indices[j] &&
				header_.SBATStart_ != -2) ++count;
		}
		header_.SBATStart_ += count;	
	}

	// Change BAT block indices
	size_t maxBATindices = blocksIndices_.size();
	{for (size_t i=0; i<maxBATindices && blocksIndices_[i]!=-1; ++i)
	{
		size_t count = 0;
		for (size_t j=0; j<maxIndices; ++j)
		{
			if (blocksIndices_[i] > indices[j] &&
				blocksIndices_[i] != -2 && 
				blocksIndices_[i] != -3) ++count;
		}
		blocksIndices_[i] += count;	
	}}

	// Change properties start block
	size_t count = 0;
	{for (size_t i=0; i<maxIndices; ++i)
	{
		if (header_.propertiesStart_ >= indices[i] &&
			header_.propertiesStart_ != -2) ++count;
	}}
	header_.propertiesStart_ += count;

	// Change individual properties start block if their size is more than 4096
	size_t maxProperties = properties_.size();
	if (!properties_.empty()) 
	{
		size_t count = 0;
		for (size_t j=0; j<maxIndices; ++j)
		{
			if (properties_[0]->startBlock_ >= indices[j] &&
				properties_[0]->startBlock_ != -2) ++count;
		}
		properties_[0]->startBlock_ += count;	
	}
	{for (size_t i=1; i<maxProperties; ++i)
	{
		if (properties_[i]->size_ >= 4096)
		{
			size_t count = 0;
			for (size_t j=0; j<maxIndices; ++j)
			{
				if (properties_[i]->startBlock_ >= indices[j] &&
					properties_[i]->startBlock_ != -2) ++count;
			}
			properties_[i]->startBlock_ += count;	
		}
	}}
}

void CompoundFile::DecreaseLocationReferences(vector<size_t> indices)
// PURPOSE: Decrease block location references in header, BAT indices and properties,
// PURPOSE: which will be affected by the deletion of indices contained in indices.
// PROMISE: BAT indices pointing to a deleted index will be redirected to point to 
// PROMISE: the location where the deleted index original points to.
// PROMISE: Block location references which are smaller than all the new indices
// PROMISE: will not be affected.
// PROMISE: SBAT location references will not be affected.
// PROMISE: Changes will not be written to compound file.
{
	size_t maxIndices = indices.size();

	// Change BAT Array references
	{for (size_t i=0; i<109 && header_.BATArray_[i]!=-1; ++i)
	{
		size_t count = 0;
		for (size_t j=0; j<maxIndices; ++j)
		{
			if (header_.BATArray_[i] > indices[j] &&
				header_.BATArray_[i] != -1) ++count;
		}
		header_.BATArray_[i] -= count;
	}}

	// Change XBAT start block if any
	if (header_.XBATCount_) 
	{
		size_t count = 0;
		for (size_t j=0; j<maxIndices; ++j)
		{
			if (header_.XBATStart_ > indices[j] &&
				header_.XBATStart_ != -2) ++count;
		}
		header_.XBATStart_ -= count;
	}

	// Change SBAT start block if any
	if (header_.SBATCount_) 
	{
		size_t count = 0;
		for (size_t j=0; j<maxIndices; ++j)
		{
			if (header_.SBATStart_ > indices[j] &&
				header_.SBATStart_ != -2) ++count;
		}
		header_.SBATStart_ -= count;
	}
	
	// Change BAT block indices
	// Redirect BAT indices pointing to a deleted index to point to
	// the location where the deleted index original points to.
	size_t maxBATindices = blocksIndices_.size();
	{for (size_t i=0; i<maxBATindices && blocksIndices_[i]!=-1; ++i)
	{
		bool end;
		do
		{
			end = true;
			for (size_t j=0; j<maxIndices; ++j)
			{
				if (blocksIndices_[i] == indices[j]) 
				{
					blocksIndices_[i] = blocksIndices_[indices[j]];
					end = false;
					break;
				}
			}		
		} while (!end);
	}}
	// Erase indices to be deleted from the block indices
	sort (indices.begin(), indices.end(), greater<size_t>());
	{for (size_t i=0; i<maxIndices; ++i)
	{
		blocksIndices_.erase(blocksIndices_.begin()+indices[i]);
		blocksIndices_.push_back(-1);
	}}

	// Decrease block location references for affected block indices.
	{for (size_t i=0; i<maxBATindices && blocksIndices_[i]!=-1; ++i)
	{
		size_t count = 0;
		for (size_t j=0; j<maxIndices; ++j)
		{
			if (blocksIndices_[i] > indices[j] &&
				blocksIndices_[i] != -2 && 
				blocksIndices_[i] != -3) ++count;
		}
		blocksIndices_[i] -= count;	
	}}

	// Change properties start block
	size_t count = 0;
	{for (size_t i=0; i<maxIndices; ++i)
	{
		if (header_.propertiesStart_ > indices[i] &&
			header_.propertiesStart_ != -2) ++count;
	}}

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91视频在线观看| 成人看片黄a免费看在线| 国产视频亚洲色图| 欧美在线一二三| 国产v综合v亚洲欧| 热久久久久久久| 亚洲日本在线看| 欧美精品一区二区三区蜜臀| 在线精品亚洲一区二区不卡| 国产一区二区美女| 丝袜诱惑制服诱惑色一区在线观看| 久久精品欧美一区二区三区麻豆| 欧美性一区二区| 91丨九色丨尤物| 国产精品18久久久久久久久久久久 | 亚洲精选免费视频| 国产网红主播福利一区二区| 制服.丝袜.亚洲.另类.中文| 99re66热这里只有精品3直播 | 久久精品国产精品亚洲精品| 亚洲成人综合视频| 国产精品乱码一区二区三区软件| 欧美www视频| 日韩欧美一级精品久久| 欧美色中文字幕| 一本在线高清不卡dvd| 成人一级片在线观看| 国产精品自拍在线| 韩国欧美一区二区| 久久99国产精品久久99| 视频精品一区二区| 婷婷成人激情在线网| 亚洲国产成人av好男人在线观看| 亚洲色图欧洲色图婷婷| 国产精品久99| 中文字幕在线播放不卡一区| 国产色一区二区| 欧美极品少妇xxxxⅹ高跟鞋| 国产日韩综合av| 中文字幕欧美国产| 中文字幕一区二区三区四区| 国产精品久久久久毛片软件| 中文字幕一区二区日韩精品绯色| 欧美韩国日本综合| 国产精品国产a级| 中文字幕一区二区三区四区不卡| 国产精品家庭影院| 亚洲精品视频免费看| 亚洲免费在线视频一区 二区| 中文字幕一区av| 亚洲精品国产精华液| 一区二区三区日韩精品| 亚洲精品视频一区| 午夜精品一区二区三区三上悠亚| 日日摸夜夜添夜夜添国产精品| 日本欧洲一区二区| 国产精品亚洲一区二区三区妖精 | 久久精品国产成人一区二区三区| 麻豆精品国产91久久久久久| 看电影不卡的网站| 国产麻豆精品在线| 一道本成人在线| 91精品国产欧美一区二区成人| 日韩欧美国产综合一区 | 99免费精品视频| 在线亚洲人成电影网站色www| 欧美中文字幕亚洲一区二区va在线| 欧美三级中文字幕在线观看| 欧美久久久影院| 久久久久久久久久久久久女国产乱| 国产精品不卡在线观看| 亚洲一区成人在线| 国产一区二区三区四区五区美女 | 波多野洁衣一区| 欧美性视频一区二区三区| 日韩一级大片在线观看| 久久精品综合网| 亚洲精品成人在线| 久久er精品视频| 91丨九色丨尤物| 精品免费日韩av| 亚洲人成精品久久久久| 蜜桃av一区二区在线观看| 成人小视频免费在线观看| 欧美性色综合网| 国产欧美一区二区三区网站 | 国产欧美久久久精品影院| 洋洋成人永久网站入口| 青草国产精品久久久久久| 99久久99久久精品国产片果冻| 欧美卡1卡2卡| 成人欧美一区二区三区| 麻豆91在线看| 在线观看免费成人| 国产欧美一区二区精品性| 亚洲电影视频在线| 成人av在线资源| 欧美成人一区二区三区在线观看| 亚洲视频网在线直播| 极品销魂美女一区二区三区| 欧美曰成人黄网| 国产精品黄色在线观看| 国内偷窥港台综合视频在线播放| 欧美影院一区二区| 国产精品久久久久久妇女6080 | 国产精品久久久久久久久免费桃花 | 欧美精品自拍偷拍动漫精品| 国产农村妇女毛片精品久久麻豆| 日韩电影在线免费看| 在线视频观看一区| 国产精品久久久久久一区二区三区| 毛片一区二区三区| 欧美日韩国产高清一区二区三区| 国产精品久久久久久久久动漫| 久久爱www久久做| 在线综合+亚洲+欧美中文字幕| 一区二区三区国产精华| a美女胸又www黄视频久久| 2024国产精品视频| 美日韩黄色大片| 91精品国产综合久久精品图片 | 国产91高潮流白浆在线麻豆| 欧美一级欧美三级在线观看| 亚洲最大的成人av| 99riav久久精品riav| 国产精品国产三级国产a| 国产精品88av| 久久久91精品国产一区二区三区| 日韩精品乱码av一区二区| 欧美无砖专区一中文字| 亚洲靠逼com| 日本高清不卡一区| 亚洲一区二区三区影院| 欧美亚洲尤物久久| 午夜精品久久久久| 欧美老肥妇做.爰bbww| 日韩精品电影在线观看| 欧美日韩高清一区二区不卡| 亚洲高清视频的网址| 欧美日韩日日骚| 手机精品视频在线观看| 制服丝袜亚洲精品中文字幕| 日产欧产美韩系列久久99| 欧美丰满一区二区免费视频| 青青草97国产精品免费观看无弹窗版| 欧美一区永久视频免费观看| 秋霞国产午夜精品免费视频| 91精品国产福利| 国产乱码精品一品二品| 国产欧美精品国产国产专区| av一区二区不卡| 亚洲精品高清在线观看| 7777精品伊人久久久大香线蕉完整版 | 中文字幕在线免费不卡| 91蝌蚪porny九色| 亚洲成a人片在线观看中文| 欧美区一区二区三区| 美女国产一区二区三区| 久久精品夜色噜噜亚洲aⅴ| jiyouzz国产精品久久| 亚洲国产另类av| 日韩精品专区在线影院观看| 国产福利一区二区三区视频 | 激情综合网av| 中文子幕无线码一区tr| 色久综合一二码| 精品一区二区三区免费观看| 日本一区二区三区四区在线视频 | 日韩一区国产二区欧美三区| 国产精品一区一区| 亚洲精品久久嫩草网站秘色| 在线不卡中文字幕播放| 国产麻豆日韩欧美久久| 一区二区三区久久| 2023国产精品视频| 欧美亚洲综合网| 国产乱子伦视频一区二区三区| 亚洲免费在线播放| 日韩情涩欧美日韩视频| 9l国产精品久久久久麻豆| 日韩精品欧美精品| 亚洲欧洲性图库| 日韩欧美在线影院| 96av麻豆蜜桃一区二区| 免费观看日韩av| 亚洲欧美日韩一区二区三区在线观看| 欧美精品亚洲一区二区在线播放| 国产91精品一区二区麻豆网站 | 日韩写真欧美这视频| 99精品欧美一区| 激情成人午夜视频| 亚洲超碰精品一区二区| 国产女人aaa级久久久级| 91精品国产美女浴室洗澡无遮挡| 99精品久久99久久久久| 国产综合色在线视频区| 亚洲va中文字幕| 亚洲日本在线观看| 国产日韩欧美麻豆| 日韩一级黄色片|