Commit 5ac5a547 authored by Elen.Subbotina's avatar Elen.Subbotina Committed by Alexander Trofimov

(1.2.0.210): ASCOfficeOdfFileW - из именованных диапазонов выкинуты ссылки на...

(1.2.0.210): ASCOfficeOdfFileW - из именованных диапазонов выкинуты ссылки на файлы и внешние ссылки


git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@59771 954022d7-b5bf-4e40-9824-e11837661b57
parent 9ba7246e
......@@ -2,6 +2,6 @@
//1
//0
//1
//209
#define INTVER 1,0,1,209
#define STRVER "1,0,1,209\0"
//210
#define INTVER 1,0,1,210
#define STRVER "1,0,1,210\0"
......@@ -91,8 +91,8 @@ void oox_serialize_bitmap_fill(std::wostream & strm, const _oox_fill & val)
{
if (val.bitmap->isInternal)
{
CP_XML_ATTR(L"r:embed",val.bitmap->rId );
CP_XML_ATTR(L"xmlns:r", L"http://schemas.openxmlformats.org/officeDocument/2006/relationships");
CP_XML_ATTR(L"r:embed",val.bitmap->rId );
}
else
CP_XML_ATTR(L"r:link",val.bitmap->rId );
......@@ -105,6 +105,16 @@ void oox_serialize_bitmap_fill(std::wostream & strm, const _oox_fill & val)
}
}
}
if (val.bitmap->bCrop)
{
CP_XML_NODE(L"a:srcRect")
{
CP_XML_ATTR(L"l", static_cast<size_t>(val.bitmap->cropRect[0]*1000));
CP_XML_ATTR(L"t", static_cast<size_t>(val.bitmap->cropRect[1]*1000));
CP_XML_ATTR(L"r", static_cast<size_t>(val.bitmap->cropRect[2]*1000));
CP_XML_ATTR(L"b", static_cast<size_t>(val.bitmap->cropRect[3]*1000));
}
}
if (val.bitmap->bStretch)
{
CP_XML_NODE(L"a:stretch")
......@@ -116,16 +126,6 @@ void oox_serialize_bitmap_fill(std::wostream & strm, const _oox_fill & val)
}
}
if (val.bitmap->bCrop)
{
CP_XML_NODE(L"a:srcRect")
{
CP_XML_ATTR(L"l", static_cast<size_t>(val.bitmap->cropRect[0]*1000));
CP_XML_ATTR(L"t", static_cast<size_t>(val.bitmap->cropRect[1]*1000));
CP_XML_ATTR(L"r", static_cast<size_t>(val.bitmap->cropRect[2]*1000));
CP_XML_ATTR(L"b", static_cast<size_t>(val.bitmap->cropRect[3]*1000));
}
}
if (val.bitmap->bTile)
{
CP_XML_NODE(L"a:tile")
......
......@@ -43,7 +43,7 @@ simple_element::simple_element(const std::wstring & FileName, const std::wstring
void simple_element::write(const std::wstring & RootPath)
{
fs::ofstream file( fs::wpath(RootPath) / file_name_, std::ios_base::out | std::ios_base::binary );
file << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
file << "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>";
file << content_utf8_;
}
......
......@@ -16,6 +16,11 @@ class xlsx_defined_names::Impl
public:
void add(std::wstring const & name, std::wstring const & ref)
{
int is_file_link = 0;
if ((is_file_link = ref.find(L"\\")) >=0) return;
if ((is_file_link = ref.find(L"/")) >=0) return;
formulasconvert::odf2oox_converter converter;
std::wstring const f = converter.convert_named_ref(ref);
name_and_ref_.push_back(name_and_ref(name, f));
......
......@@ -77,8 +77,8 @@ public:
CP_XML_NODE(L"xdr:wsDr")
{
CP_XML_ATTR(L"xmlns:xdr", L"http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing");
CP_XML_ATTR(L"xmlns:a", L"http://schemas.openxmlformats.org/drawingml/2006/main");
CP_XML_ATTR(L"xmlns:r", L"http://schemas.openxmlformats.org/officeDocument/2006/relationships");
CP_XML_ATTR(L"xmlns:a" , L"http://schemas.openxmlformats.org/drawingml/2006/main");
CP_XML_ATTR(L"xmlns:r" , L"http://schemas.openxmlformats.org/officeDocument/2006/relationships");
BOOST_FOREACH(_xlsx_drawing const & d, xlsx_drawings_)
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment