Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
onlyoffice_core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
onlyoffice_core
Commits
2e99efee
Commit
2e99efee
authored
Jan 19, 2017
by
ElenaSubbotina
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
..
parent
c4492f2c
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
51 additions
and
108 deletions
+51
-108
ASCOfficePPTXFile/PPTXFormat/DocxFormat/Drawing/LegacyDiagramText.h
...PTXFile/PPTXFormat/DocxFormat/Drawing/LegacyDiagramText.h
+2
-2
ASCOfficePPTXFile/PPTXFormat/DocxFormat/IFileBuilder.h
ASCOfficePPTXFile/PPTXFormat/DocxFormat/IFileBuilder.h
+0
-53
ASCOfficePPTXFile/PPTXLib/Linux/PPTXFormatLib/PPTXFormatLib.pro
...icePPTXFile/PPTXLib/Linux/PPTXFormatLib/PPTXFormatLib.pro
+0
-3
Common/DocxFormat/Source/DocxFormat/Docx.cpp
Common/DocxFormat/Source/DocxFormat/Docx.cpp
+0
-1
Common/DocxFormat/Source/DocxFormat/Rels.h
Common/DocxFormat/Source/DocxFormat/Rels.h
+45
-49
Common/DocxFormat/Source/SystemUtility/SystemUtility.cpp
Common/DocxFormat/Source/SystemUtility/SystemUtility.cpp
+4
-0
No files found.
ASCOfficePPTXFile/PPTXFormat/DocxFormat/Drawing/LegacyDiagramText.h
View file @
2e99efee
...
...
@@ -33,9 +33,9 @@
#ifndef PPTX_LegacyDiagramText_INCLUDE_H_
#define PPTX_LegacyDiagramText_INCLUDE_H_
#include "../File.h"
#include "../
../../../Common/DocxFormat/Source/DocxFormat/
File.h"
#include "../../../../Common/DocxFormat/Source/SystemUtility/File.h"
#include "../../../Common/DocxFormat/Source/Base/Types_32.h"
#include "../../../
../
Common/DocxFormat/Source/Base/Types_32.h"
#include "../../Logic/TextParagraphPr.h"
#include "../../Logic/Colors/SrgbClr.h"
...
...
ASCOfficePPTXFile/PPTXFormat/DocxFormat/IFileBuilder.h
deleted
100644 → 0
View file @
c4492f2c
/*
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#pragma once
#ifndef PPTXOOX_FILE_BUILDER_INCLUDE_H_
#define PPTXOOX_FILE_BUILDER_INCLUDE_H_
#include "ContentTypes/File.h"
namespace
PPTX
{
class
IFileBuilder
{
public:
IFileBuilder
()
{}
virtual
~
IFileBuilder
()
{}
public:
virtual
void
Commit
(
const
OOX
::
CPath
&
path
)
=
0
;
virtual
void
Finalize
(
const
OOX
::
CPath
&
path
,
const
OOX
::
CPath
&
directory
,
ContentTypes
::
File
&
content
)
=
0
;
};
}
// namespace OOX
#endif // PPTXOOX_FILE_BUILDER_INCLUDE_H_
ASCOfficePPTXFile/PPTXLib/Linux/PPTXFormatLib/PPTXFormatLib.pro
View file @
2e99efee
...
...
@@ -117,10 +117,7 @@ HEADERS += pptxformatlib.h \
..
/../../
PPTXFormat
/
DocxFormat
/
Rels
/
RelationShip
.
h
\
..
/../../
PPTXFormat
/
DocxFormat
/
Rels
/
RelationTable
.
h
\
..
/../../
PPTXFormat
/
DocxFormat
/
DateTime
.
h
\
..
/../../
PPTXFormat
/
DocxFormat
/
File
.
h
\
..
/../../
PPTXFormat
/
DocxFormat
/
FileType
.
h
\
..
/../../
PPTXFormat
/
DocxFormat
/
FileTypes
.
h
\
..
/../../
PPTXFormat
/
DocxFormat
/
IFileBuilder
.
h
\
..
/../../
PPTXFormat
/
DocxFormat
/
NamespaceOwn
.
h
\
..
/../../
PPTXFormat
/
DocxFormat
/
Namespaces
.
h
\
..
/../../
PPTXFormat
/
DocxFormat
/
WritingElement
.
h
\
...
...
Common/DocxFormat/Source/DocxFormat/Docx.cpp
View file @
2e99efee
...
...
@@ -37,7 +37,6 @@ namespace OOX {
{
// Ищем "/_rels/.rels" и читаем все файлы по рельсам
OOX
::
CRels
oRels
(
oFilePath
/
FILE_SEPARATOR_STR
);
oRels
.
Read
(
oFilePath
/
FILE_SEPARATOR_STR
);
IFileContainer
::
Read
(
oRels
,
oFilePath
,
oFilePath
);
// Выполняем дополнительные действия для более удобной работы с файлом
...
...
Common/DocxFormat/Source/DocxFormat/Rels.h
View file @
2e99efee
...
...
@@ -183,61 +183,57 @@ namespace OOX
void
Read
(
const
CPath
&
oFilePath
)
{
CPath
oRelsPath
=
CreateFileName
(
oFilePath
);
CPath
oRelsPath
=
CreateFileName
(
oFilePath
);
if
(
CSystemUtility
::
IsFileExist
(
oRelsPath
)
)
{
#ifdef USE_LITE_READER
XmlUtils
::
CXmlLiteReader
oReader
;
if
(
!
oReader
.
FromFile
(
oRelsPath
.
GetPath
()
)
)
return
;
if
(
!
oReader
.
ReadNextNode
()
)
return
;
std
::
wstring
sName
=
oReader
.
GetName
();
if
(
_T
(
"Relationships"
)
==
sName
)
{
if
(
!
oReader
.
IsEmptyNode
()
)
{
int
nRelationshipsDepth
=
oReader
.
GetDepth
();
while
(
oReader
.
ReadNextSiblingNode
(
nRelationshipsDepth
)
)
{
sName
=
oReader
.
GetName
();
if
(
_T
(
"Relationship"
)
==
sName
)
{
OOX
::
Rels
::
CRelationShip
*
oRel
=
new
OOX
::
Rels
::
CRelationShip
(
oReader
);
if
(
oRel
)
m_arrRelations
.
push_back
(
oRel
);
}
}
}
}
XmlUtils
::
CXmlLiteReader
oReader
;
if
(
!
oReader
.
FromFile
(
oRelsPath
.
GetPath
()
)
)
return
;
if
(
!
oReader
.
ReadNextNode
()
)
return
;
std
::
wstring
sName
=
oReader
.
GetName
();
if
(
_T
(
"Relationships"
)
==
sName
)
{
if
(
!
oReader
.
IsEmptyNode
()
)
{
int
nRelationshipsDepth
=
oReader
.
GetDepth
();
while
(
oReader
.
ReadNextSiblingNode
(
nRelationshipsDepth
)
)
{
sName
=
oReader
.
GetName
();
if
(
_T
(
"Relationship"
)
==
sName
)
{
OOX
::
Rels
::
CRelationShip
*
oRel
=
new
OOX
::
Rels
::
CRelationShip
(
oReader
);
if
(
oRel
)
m_arrRelations
.
push_back
(
oRel
);
}
}
}
}
#else
XmlUtils
::
CXmlNode
oNode
;
if
(
oNode
.
FromXmlFile2
(
oRelsPath
.
GetPath
()
)
&&
_T
(
"Relationships"
)
==
oNode
.
GetName
()
)
{
XmlUtils
::
CXmlNodes
oNodes
;
if
(
oNode
.
GetNodes
(
_T
(
"Relationship"
),
oNodes
)
)
{
XmlUtils
::
CXmlNode
oRelNode
;
for
(
int
nIndex
=
0
;
nIndex
<
oNodes
.
GetCount
();
nIndex
++
)
{
if
(
oNodes
.
GetAt
(
nIndex
,
oRelNode
)
)
{
//Rels::CRelationShip oRel = oRelNode;
Rels
::
CRelationShip
*
oRel
=
new
Rels
::
CRelationShip
(
oRelNode
);
m_arrRelations
.
push_back
(
oRel
);
}
}
}
}
XmlUtils
::
CXmlNode
oNode
;
if
(
oNode
.
FromXmlFile2
(
oRelsPath
.
GetPath
()
)
&&
_T
(
"Relationships"
)
==
oNode
.
GetName
()
)
{
XmlUtils
::
CXmlNodes
oNodes
;
if
(
oNode
.
GetNodes
(
_T
(
"Relationship"
),
oNodes
)
)
{
XmlUtils
::
CXmlNode
oRelNode
;
for
(
int
nIndex
=
0
;
nIndex
<
oNodes
.
GetCount
();
nIndex
++
)
{
if
(
oNodes
.
GetAt
(
nIndex
,
oRelNode
)
)
{
//Rels::CRelationShip oRel = oRelNode;
Rels
::
CRelationShip
*
oRel
=
new
Rels
::
CRelationShip
(
oRelNode
);
m_arrRelations
.
push_back
(
oRel
);
}
}
}
}
#endif
}
}
void
Write
(
const
CPath
&
oFilePath
)
const
{
...
...
Common/DocxFormat/Source/SystemUtility/SystemUtility.cpp
View file @
2e99efee
...
...
@@ -123,6 +123,10 @@ namespace OOX
int
nCurrentW
=
0
;
bool
bIsUp
=
false
;
#if !defined(_WIN32) && !defined (_WIN64)
if
(
pData
[
nCurrent
]
==
FILE_SEPARATOR_CHAR
)
pDataNorm
[
nCurrentW
++
]
=
pData
[
nCurrent
];
#endif
while
(
nCurrent
<
nLen
)
{
if
(
pData
[
nCurrent
]
==
FILE_SEPARATOR_CHAR
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment