diff --git a/ASCOfficeOdfFile/src/docx/mediaitems.cpp b/ASCOfficeOdfFile/src/docx/mediaitems.cpp index e9472f6745..1772b6e71e 100644 --- a/ASCOfficeOdfFile/src/docx/mediaitems.cpp +++ b/ASCOfficeOdfFile/src/docx/mediaitems.cpp @@ -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(count_image+1); count_image++; diff --git a/ASCOfficeOdfFile/src/docx/oox_package.cpp b/ASCOfficeOdfFile/src/docx/oox_package.cpp index 6a571d0768..77806b9ab8 100644 --- a/ASCOfficeOdfFile/src/docx/oox_package.cpp +++ b/ASCOfficeOdfFile/src/docx/oox_package.cpp @@ -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); } diff --git a/ASCOfficeOdfFile/src/odf/datatypes/calcext_type.cpp b/ASCOfficeOdfFile/src/odf/datatypes/calcext_type.cpp index 5c6c0ca1db..7eeea90432 100644 --- a/ASCOfficeOdfFile/src/odf/datatypes/calcext_type.cpp +++ b/ASCOfficeOdfFile/src/odf/datatypes/calcext_type.cpp @@ -1,4 +1,5 @@ -#include "../precompiled_cpodf.h" +#include + #include "calcext_type.h" #include diff --git a/ASCOfficeOdfFile/src/odf/datatypes/iconset_type.cpp b/ASCOfficeOdfFile/src/odf/datatypes/iconset_type.cpp index 53cab8ca04..d75f0b2323 100644 --- a/ASCOfficeOdfFile/src/odf/datatypes/iconset_type.cpp +++ b/ASCOfficeOdfFile/src/odf/datatypes/iconset_type.cpp @@ -1,4 +1,5 @@ -#include "../precompiled_cpodf.h" +#include + #include "iconset_type.h" #include diff --git a/ASCOfficeOdfFile/src/odf/datatypes/style_ref.cpp b/ASCOfficeOdfFile/src/odf/datatypes/style_ref.cpp index 00f9104726..8b9753eb0a 100644 --- a/ASCOfficeOdfFile/src/odf/datatypes/style_ref.cpp +++ b/ASCOfficeOdfFile/src/odf/datatypes/style_ref.cpp @@ -4,7 +4,6 @@ #include #include #include -#include namespace cpdoccore { namespace odf { diff --git a/ASCOfficeOdfFile/src/odf/odf_document_impl.cpp b/ASCOfficeOdfFile/src/odf/odf_document_impl.cpp index 1ace228ec3..b80fe31d00 100644 --- a/ASCOfficeOdfFile/src/odf/odf_document_impl.cpp +++ b/ASCOfficeOdfFile/src/odf/odf_document_impl.cpp @@ -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; } } diff --git a/ASCOfficeOdfFileW/source/OdfFormat/draw_frame.cpp b/ASCOfficeOdfFileW/source/OdfFormat/draw_frame.cpp index 935475ab79..90e800e88f 100644 --- a/ASCOfficeOdfFileW/source/OdfFormat/draw_frame.cpp +++ b/ASCOfficeOdfFileW/source/OdfFormat/draw_frame.cpp @@ -6,8 +6,8 @@ #include #include -#include -#include +#include +#include #include diff --git a/ASCOfficeOdfFileW/source/OdfFormat/draw_shapes.cpp b/ASCOfficeOdfFileW/source/OdfFormat/draw_shapes.cpp index 527a57cf58..ff19a47bf0 100644 --- a/ASCOfficeOdfFileW/source/OdfFormat/draw_shapes.cpp +++ b/ASCOfficeOdfFileW/source/OdfFormat/draw_shapes.cpp @@ -6,8 +6,8 @@ #include #include -#include -#include +#include +#include #include #include diff --git a/ASCOfficeOdfFileW/source/OdfFormat/mediaitems.cpp b/ASCOfficeOdfFileW/source/OdfFormat/mediaitems.cpp index 11dd114b8b..07f54bd95b 100644 --- a/ASCOfficeOdfFileW/source/OdfFormat/mediaitems.cpp +++ b/ASCOfficeOdfFileW/source/OdfFormat/mediaitems.cpp @@ -2,7 +2,7 @@ #include "mediaitems.h" #include "odf_rels.h" -#include +#include #include #include diff --git a/ASCOfficeOdfFileW/source/OdfFormat/object_package.cpp b/ASCOfficeOdfFileW/source/OdfFormat/object_package.cpp index a0ec875feb..c5861b047f 100644 --- a/ASCOfficeOdfFileW/source/OdfFormat/object_package.cpp +++ b/ASCOfficeOdfFileW/source/OdfFormat/object_package.cpp @@ -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); diff --git a/ASCOfficeOdfFileW/source/OdfFormat/odf_drawing_context.cpp b/ASCOfficeOdfFileW/source/OdfFormat/odf_drawing_context.cpp index 6398de9168..d8ba4de143 100644 --- a/ASCOfficeOdfFileW/source/OdfFormat/odf_drawing_context.cpp +++ b/ASCOfficeOdfFileW/source/OdfFormat/odf_drawing_context.cpp @@ -3,6 +3,8 @@ #include #include +#include + #include #include "odf_drawing_context.h" diff --git a/ASCOfficeOdfFileW/source/OdfFormat/odf_number_styles_context.cpp b/ASCOfficeOdfFileW/source/OdfFormat/odf_number_styles_context.cpp index 8a9838dbe1..6a507dd251 100644 --- a/ASCOfficeOdfFileW/source/OdfFormat/odf_number_styles_context.cpp +++ b/ASCOfficeOdfFileW/source/OdfFormat/odf_number_styles_context.cpp @@ -1,4 +1,4 @@ - +#include #include "logging.h" diff --git a/ASCOfficeOdfFileW/source/OdfFormat/ods_conversion_context.cpp b/ASCOfficeOdfFileW/source/OdfFormat/ods_conversion_context.cpp index 594268435c..196e28874a 100644 --- a/ASCOfficeOdfFileW/source/OdfFormat/ods_conversion_context.cpp +++ b/ASCOfficeOdfFileW/source/OdfFormat/ods_conversion_context.cpp @@ -1,4 +1,5 @@ +#include #include "../utils.h" diff --git a/ASCOfficeOdfFileW/source/OdfFormat/ods_table_state.h b/ASCOfficeOdfFileW/source/OdfFormat/ods_table_state.h index ce4b69dcce..d9ec0aab4c 100644 --- a/ASCOfficeOdfFileW/source/OdfFormat/ods_table_state.h +++ b/ASCOfficeOdfFileW/source/OdfFormat/ods_table_state.h @@ -5,6 +5,7 @@ #include #include +#include #include "odf_drawing_context.h" diff --git a/ASCOfficeOdfFileW/source/OdfFormat/office_elements.h b/ASCOfficeOdfFileW/source/OdfFormat/office_elements.h index a71505f420..9c7f2ec2b0 100644 --- a/ASCOfficeOdfFileW/source/OdfFormat/office_elements.h +++ b/ASCOfficeOdfFileW/source/OdfFormat/office_elements.h @@ -8,8 +8,6 @@ #include #include -#include - #include "office_elements_type.h" #include "visitor.h" diff --git a/ASCOfficeOdfFileW/source/OdfFormat/office_elements_create.cpp b/ASCOfficeOdfFileW/source/OdfFormat/office_elements_create.cpp index 8f3acde66d..9411f0ac3f 100644 --- a/ASCOfficeOdfFileW/source/OdfFormat/office_elements_create.cpp +++ b/ASCOfficeOdfFileW/source/OdfFormat/office_elements_create.cpp @@ -67,7 +67,6 @@ bool office_element_creator::register_element(const std::wstring &ns, const std: else { // TODO: элемент уже есть, непонятно что делать - CP_ASSERT(false); i->second = f; } return true; diff --git a/ASCOfficeOdfFileW/source/OdfFormat/office_elements_create.h b/ASCOfficeOdfFileW/source/OdfFormat/office_elements_create.h index 0f184658c4..524c32ceee 100644 --- a/ASCOfficeOdfFileW/source/OdfFormat/office_elements_create.h +++ b/ASCOfficeOdfFileW/source/OdfFormat/office_elements_create.h @@ -2,7 +2,9 @@ #include #include -#include + +#include + #include #include "office_elements.h" diff --git a/ASCOfficeOdfFileW/source/OdfFormat/paragraph_elements.cpp b/ASCOfficeOdfFileW/source/OdfFormat/paragraph_elements.cpp index 7f0d70e14f..da510f17a1 100644 --- a/ASCOfficeOdfFileW/source/OdfFormat/paragraph_elements.cpp +++ b/ASCOfficeOdfFileW/source/OdfFormat/paragraph_elements.cpp @@ -5,7 +5,7 @@ #include #include -#include +#include #include diff --git a/ASCOfficeOdfFileW/source/OdfFormat/svg_creator.h b/ASCOfficeOdfFileW/source/OdfFormat/svg_creator.h index 30b87a9cc0..27ec261fc0 100644 --- a/ASCOfficeOdfFileW/source/OdfFormat/svg_creator.h +++ b/ASCOfficeOdfFileW/source/OdfFormat/svg_creator.h @@ -6,8 +6,9 @@ #include #include -#include -#include +#include +#include + #include namespace cpdoccore