mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-04-07 13:55:33 +08:00
OdfFile W & R
git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@62610 954022d7-b5bf-4e40-9824-e11837661b57
This commit is contained in:
committed by
Alexander Trofimov
parent
3c609fbe83
commit
9faebc6b6b
@ -88,9 +88,10 @@ std::wstring mediaitems::add_or_find(const std::wstring & href, Type type, bool
|
||||
}
|
||||
else if ( type == typeImage)
|
||||
{
|
||||
if (inputPath.rfind (L".svm") >=0 )
|
||||
int n_svm = inputPath.rfind (L".svm");
|
||||
if ( n_svm >= 0 )
|
||||
{
|
||||
outputPath = outputPath + L".png";
|
||||
outputPath = outputPath.substr(0, n_svm) + L".png";
|
||||
}
|
||||
id = std::wstring(L"picId") + boost::lexical_cast<std::wstring>(count_image+1);
|
||||
count_image++;
|
||||
|
||||
@ -183,7 +183,8 @@ void media::write(const std::wstring & RootPath)
|
||||
std::wstring & file_name = item.href;
|
||||
std::wstring file_name_out = RootPath + FILE_SEPARATOR_STR + item.outputName;
|
||||
|
||||
if (file_name.rfind(L".svm") >= 0)
|
||||
int pos_svm = file_name.rfind(L".svm");
|
||||
if ( pos_svm >= 0)
|
||||
{
|
||||
ConvertSvmToImage(file_name, file_name_out);
|
||||
}
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
#include "../precompiled_cpodf.h"
|
||||
#include <boost/algorithm/string.hpp>
|
||||
|
||||
#include "calcext_type.h"
|
||||
|
||||
#include <ostream>
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
#include "../precompiled_cpodf.h"
|
||||
#include <boost/algorithm/string.hpp>
|
||||
|
||||
#include "iconset_type.h"
|
||||
|
||||
#include <ostream>
|
||||
|
||||
@ -4,7 +4,6 @@
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <cpdoccore/CPScopedPtr.h>
|
||||
#include <cpdoccore/CPAssert.h>
|
||||
|
||||
namespace cpdoccore {
|
||||
namespace odf {
|
||||
|
||||
@ -63,7 +63,7 @@ content_xml_t_ptr read_file_content(const std::wstring & Path)
|
||||
|
||||
result->add_child_element(Reader.get(), namespacePrefix, localName);
|
||||
|
||||
return content_xml_t_ptr();
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -6,8 +6,8 @@
|
||||
#include <string>
|
||||
|
||||
#include <boost/foreach.hpp>
|
||||
#include <boost_string.h>
|
||||
#include <regex.h>
|
||||
#include <boost/algorithm/string.hpp>
|
||||
#include <boost/regex.h>
|
||||
|
||||
#include <cpdoccore/xml/xmlchar.h>
|
||||
|
||||
|
||||
@ -6,8 +6,8 @@
|
||||
#include <string>
|
||||
|
||||
#include <boost/foreach.hpp>
|
||||
#include <boost_string.h>
|
||||
#include <regex.h>
|
||||
#include <boost/algorithm/string.hpp>
|
||||
#include <boost/regex.h>
|
||||
#include <boost/lexical_cast.hpp>
|
||||
|
||||
#include <cpdoccore/xml/xmlchar.h>
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
#include "mediaitems.h"
|
||||
#include "odf_rels.h"
|
||||
|
||||
#include <regex.h>
|
||||
#include <boost/regex.h>
|
||||
#include <boost/foreach.hpp>
|
||||
#include <boost/algorithm/string/case_conv.hpp>
|
||||
|
||||
|
||||
@ -97,7 +97,7 @@ namespace odf
|
||||
rels_.serialize(CP_XML_STREAM());
|
||||
}
|
||||
}
|
||||
std::wstring path = RootPath + FILE_SEPARATOR + L"META-INF";
|
||||
std::wstring path = RootPath + FILE_SEPARATOR_STR + L"META-INF";
|
||||
FileSystem::Directory::CreateDirectory(path);
|
||||
simple_element elm(L"manifest.xml", resStream.str());
|
||||
elm.write(path);
|
||||
|
||||
@ -3,6 +3,8 @@
|
||||
|
||||
#include <boost/foreach.hpp>
|
||||
#include <boost/lexical_cast.hpp>
|
||||
#include <boost/algorithm/string.hpp>
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#include "odf_drawing_context.h"
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
|
||||
#include <boost/algorithm/string.hpp>
|
||||
|
||||
#include "logging.h"
|
||||
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
|
||||
#include <boost/algorithm/string.hpp>
|
||||
|
||||
#include "../utils.h"
|
||||
|
||||
|
||||
@ -5,6 +5,7 @@
|
||||
|
||||
#include <boost/regex.hpp>
|
||||
#include <boost/lexical_cast.hpp>
|
||||
#include <boost/algorithm/string.hpp>
|
||||
|
||||
#include "odf_drawing_context.h"
|
||||
|
||||
|
||||
@ -8,8 +8,6 @@
|
||||
#include <cpdoccore/xml/xmlelement.h>
|
||||
#include <cpdoccore/xml/attributes.h>
|
||||
|
||||
#include <cpdoccore/CPAssert.h>
|
||||
|
||||
#include "office_elements_type.h"
|
||||
|
||||
#include "visitor.h"
|
||||
|
||||
@ -67,7 +67,6 @@ bool office_element_creator::register_element(const std::wstring &ns, const std:
|
||||
else
|
||||
{
|
||||
// TODO: <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
CP_ASSERT(false);
|
||||
i->second = f;
|
||||
}
|
||||
return true;
|
||||
|
||||
@ -2,7 +2,9 @@
|
||||
|
||||
#include <string>
|
||||
#include <map>
|
||||
#include <cpdoccore/CPAssert.h>
|
||||
|
||||
#include <boost/function.hpp>
|
||||
|
||||
#include <cpdoccore/CPSharedPtr.h>
|
||||
|
||||
#include "office_elements.h"
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
#include <string>
|
||||
|
||||
#include <boost/foreach.hpp>
|
||||
#include <boost_string.h>
|
||||
#include <boost/algorithm/string.hpp>
|
||||
|
||||
#include <cpdoccore/xml/xmlchar.h>
|
||||
|
||||
|
||||
@ -6,8 +6,9 @@
|
||||
#include <vector>
|
||||
|
||||
#include <boost/foreach.hpp>
|
||||
#include <boost_string.h>
|
||||
#include <regex.h>
|
||||
#include <boost/algorithm/string.hpp>
|
||||
#include <boost/regex.h>
|
||||
|
||||
#include <cpdoccore/CPOptional.h>
|
||||
|
||||
namespace cpdoccore
|
||||
|
||||
Reference in New Issue
Block a user