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
29167713
Commit
29167713
authored
Sep 19, 2016
by
ElenaSubbotina
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bugs
parent
9ff6c010
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
41 additions
and
13 deletions
+41
-13
ASCOfficeDocFile/Common/XmlTools.h
ASCOfficeDocFile/Common/XmlTools.h
+10
-1
ASCOfficeDocFile/DocDocxConverter/OleObjectMapping.h
ASCOfficeDocFile/DocDocxConverter/OleObjectMapping.h
+1
-3
ASCOfficeDocFile/DocDocxConverter/TableMapping.cpp
ASCOfficeDocFile/DocDocxConverter/TableMapping.cpp
+13
-4
ASCOfficeDocFile/DocDocxConverter/TableRowPropertiesMapping.cpp
...iceDocFile/DocDocxConverter/TableRowPropertiesMapping.cpp
+2
-2
ASCOfficeOdfFileW/source/OdfFormat/odf_drawing_context.cpp
ASCOfficeOdfFileW/source/OdfFormat/odf_drawing_context.cpp
+6
-0
ASCOfficeOdfFileW/source/OdfFormat/odf_drawing_context.h
ASCOfficeOdfFileW/source/OdfFormat/odf_drawing_context.h
+1
-0
ASCOfficeOdfFileW/source/Oox2OdfConverter/DocxConverter.cpp
ASCOfficeOdfFileW/source/Oox2OdfConverter/DocxConverter.cpp
+8
-3
No files found.
ASCOfficeDocFile/Common/XmlTools.h
View file @
29167713
...
@@ -136,6 +136,7 @@ namespace XMLTools
...
@@ -136,6 +136,7 @@ namespace XMLTools
std
::
basic_string
<
T
>
m_Name
;
std
::
basic_string
<
T
>
m_Name
;
std
::
basic_string
<
T
>
m_ElementText
;
std
::
basic_string
<
T
>
m_ElementText
;
std
::
map
<
std
::
basic_string
<
T
>
,
std
::
basic_string
<
T
>>
m_AttributeMap
;
std
::
map
<
std
::
basic_string
<
T
>
,
std
::
basic_string
<
T
>>
m_AttributeMap
;
std
::
map
<
std
::
basic_string
<
T
>
,
int
>
m_ChildMap
;
//for uniq
std
::
list
<
XMLElement
<
T
>>
m_Elements
;
std
::
list
<
XMLElement
<
T
>>
m_Elements
;
typedef
typename
std
::
list
<
XMLElement
<
T
>>::
iterator
ElementsIterator
;
typedef
typename
std
::
list
<
XMLElement
<
T
>>::
iterator
ElementsIterator
;
...
@@ -206,8 +207,16 @@ namespace XMLTools
...
@@ -206,8 +207,16 @@ namespace XMLTools
/*========================================================================================================*/
/*========================================================================================================*/
void
AppendChild
(
const
XMLElement
<
T
>&
element
)
void
AppendChild
(
const
XMLElement
<
T
>&
element
,
bool
uniq
=
false
)
{
{
if
(
m_ChildMap
.
find
(
element
.
GetName
())
!=
m_ChildMap
.
end
())
{
if
(
uniq
)
return
;
}
else
{
m_ChildMap
.
insert
(
m_ChildMap
.
end
(),
std
::
pair
<
std
::
basic_string
<
T
>
,
int
>
(
element
.
GetName
(),
0
));
}
m_Elements
.
push_back
(
element
);
m_Elements
.
push_back
(
element
);
}
}
...
...
ASCOfficeDocFile/DocDocxConverter/OleObjectMapping.h
View file @
29167713
...
@@ -70,9 +70,7 @@ namespace DocFileFormat
...
@@ -70,9 +70,7 @@ namespace DocFileFormat
//type
//type
if
(
ole
->
bLinked
)
if
(
ole
->
bLinked
)
{
{
int
relID
=
-
1
;
int
relID
=
m_context
->
_docx
->
RegisterExternalOLEObject
(
_caller
,
ole
->
ClipboardFormat
,
ole
->
Link
);
m_context
->
_docx
->
RegisterExternalOLEObject
(
_caller
,
ole
->
ClipboardFormat
,
ole
->
Link
);
m_pXmlWriter
->
WriteAttribute
(
_T
(
"r:id"
),
(
std
::
wstring
(
_T
(
"rId"
)
)
+
FormatUtils
::
IntToWideString
(
relID
)
).
c_str
()
);
m_pXmlWriter
->
WriteAttribute
(
_T
(
"r:id"
),
(
std
::
wstring
(
_T
(
"rId"
)
)
+
FormatUtils
::
IntToWideString
(
relID
)
).
c_str
()
);
m_pXmlWriter
->
WriteAttribute
(
_T
(
"Type"
),
_T
(
"Link"
)
);
m_pXmlWriter
->
WriteAttribute
(
_T
(
"Type"
),
_T
(
"Link"
)
);
...
...
ASCOfficeDocFile/DocDocxConverter/TableMapping.cpp
View file @
29167713
...
@@ -209,7 +209,7 @@ namespace DocFileFormat
...
@@ -209,7 +209,7 @@ namespace DocFileFormat
SectionPropertyExceptions
*
sepxBackup
=
documentMapping
->
_lastValidSepx
;
SectionPropertyExceptions
*
sepxBackup
=
documentMapping
->
_lastValidSepx
;
//start w:tr
//start w:tr
documentMapping
->
GetXMLWriter
()
->
WriteNodeBegin
(
_T
(
"w:tr"
)
);
documentMapping
->
GetXMLWriter
()
->
WriteNodeBegin
(
L"w:tr"
);
//convert the properties
//convert the properties
int
fcRowEnd
=
documentMapping
->
findRowEndFc
(
cp
,
depth
);
int
fcRowEnd
=
documentMapping
->
findRowEndFc
(
cp
,
depth
);
...
@@ -224,13 +224,22 @@ namespace DocFileFormat
...
@@ -224,13 +224,22 @@ namespace DocFileFormat
documentMapping
->
_lastValidPapx
=
papxBackup
;
documentMapping
->
_lastValidPapx
=
papxBackup
;
documentMapping
->
_lastValidSepx
=
sepxBackup
;
documentMapping
->
_lastValidSepx
=
sepxBackup
;
for
(
std
::
list
<
TableCell
>::
iterator
iter
=
cells
.
begin
();
iter
!=
cells
.
end
();
iter
++
)
if
(
cells
.
empty
()
)
{
{
iter
->
Convert
(
mapping
,
&
tapx
,
grid
,
gridIndex
,
nCellIndex
++
);
documentMapping
->
GetXMLWriter
()
->
WriteNodeBegin
(
L"w:tc"
);
documentMapping
->
GetXMLWriter
()
->
WriteNode
(
L"w:p"
,
L""
);
documentMapping
->
GetXMLWriter
()
->
WriteNodeEnd
(
L"w:tc"
);
}
else
{
for
(
std
::
list
<
TableCell
>::
iterator
iter
=
cells
.
begin
();
iter
!=
cells
.
end
();
iter
++
)
{
iter
->
Convert
(
mapping
,
&
tapx
,
grid
,
gridIndex
,
nCellIndex
++
);
}
}
}
//end w:tr
//end w:tr
documentMapping
->
GetXMLWriter
()
->
WriteNodeEnd
(
_T
(
"w:tr"
)
);
documentMapping
->
GetXMLWriter
()
->
WriteNodeEnd
(
L"w:tr"
);
RELEASEOBJECT
(
chpxs
);
RELEASEOBJECT
(
chpxs
);
}
}
...
...
ASCOfficeDocFile/DocDocxConverter/TableRowPropertiesMapping.cpp
View file @
29167713
...
@@ -95,7 +95,7 @@ namespace DocFileFormat
...
@@ -95,7 +95,7 @@ namespace DocFileFormat
XMLTools
::
XMLAttribute
<
wchar_t
>
wAfterType
(
_T
(
"w:type"
),
_T
(
"dxa"
)
);
XMLTools
::
XMLAttribute
<
wchar_t
>
wAfterType
(
_T
(
"w:type"
),
_T
(
"dxa"
)
);
wAfter
.
AppendAttribute
(
wAfterType
);
wAfter
.
AppendAttribute
(
wAfterType
);
_trPr
->
AppendChild
(
wAfter
);
_trPr
->
AppendChild
(
wAfter
,
true
);
}
}
break
;
break
;
...
@@ -111,7 +111,7 @@ namespace DocFileFormat
...
@@ -111,7 +111,7 @@ namespace DocFileFormat
XMLTools
::
XMLAttribute
<
wchar_t
>
wBeforeType
(
_T
(
"w:type"
),
_T
(
"dxa"
)
);
XMLTools
::
XMLAttribute
<
wchar_t
>
wBeforeType
(
_T
(
"w:type"
),
_T
(
"dxa"
)
);
wBefore
.
AppendAttribute
(
wBeforeType
);
wBefore
.
AppendAttribute
(
wBeforeType
);
_trPr
->
AppendChild
(
wBefore
);
_trPr
->
AppendChild
(
wBefore
,
true
);
}
}
}
}
break
;
break
;
...
...
ASCOfficeOdfFileW/source/OdfFormat/odf_drawing_context.cpp
View file @
29167713
...
@@ -1051,6 +1051,12 @@ void odf_drawing_context::set_no_fill()
...
@@ -1051,6 +1051,12 @@ void odf_drawing_context::set_no_fill()
break
;
break
;
}
}
}
}
void
odf_drawing_context
::
set_type_fill
(
int
type
)
{
if
(
!
impl_
->
current_graphic_properties
)
return
;
impl_
->
current_graphic_properties
->
content
().
common_draw_fill_attlist_
.
draw_fill_
=
(
draw_fill
::
type
)
type
;
}
void
odf_drawing_context
::
set_solid_fill
(
std
::
wstring
hexColor
)
void
odf_drawing_context
::
set_solid_fill
(
std
::
wstring
hexColor
)
{
{
if
(
!
impl_
->
current_graphic_properties
)
return
;
if
(
!
impl_
->
current_graphic_properties
)
return
;
...
...
ASCOfficeOdfFileW/source/OdfFormat/odf_drawing_context.h
View file @
29167713
...
@@ -158,6 +158,7 @@ public:
...
@@ -158,6 +158,7 @@ public:
void
set_rotate
(
double
iVal
);
void
set_rotate
(
double
iVal
);
void
set_no_fill
();
void
set_no_fill
();
void
set_type_fill
(
int
type
);
//for area - temp for objects
void
set_solid_fill
(
std
::
wstring
hexColor
);
void
set_solid_fill
(
std
::
wstring
hexColor
);
void
set_opacity
(
double
percent
);
void
set_opacity
(
double
percent
);
//////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////
...
...
ASCOfficeOdfFileW/source/Oox2OdfConverter/DocxConverter.cpp
View file @
29167713
...
@@ -2075,7 +2075,10 @@ void DocxConverter::convert(OOX::Logic::CObject* oox_obj)
...
@@ -2075,7 +2075,10 @@ void DocxConverter::convert(OOX::Logic::CObject* oox_obj)
bool
bSet
=
false
;
bool
bSet
=
false
;
if
(
oox_obj
->
m_oShape
.
IsInit
())
if
(
oox_obj
->
m_oShape
.
IsInit
())
{
{
OOX
::
Vml
::
SptType
sptType
=
oox_obj
->
m_oShapeType
->
m_oSpt
.
IsInit
()
?
static_cast
<
OOX
::
Vml
::
SptType
>
(
oox_obj
->
m_oShapeType
->
m_oSpt
->
GetValue
())
:
OOX
::
Vml
::
sptNotPrimitive
;
OOX
::
Vml
::
SptType
sptType
=
OOX
::
Vml
::
SptType
::
sptNotPrimitive
;
if
((
oox_obj
->
m_oShapeType
.
IsInit
())
&&
(
oox_obj
->
m_oShapeType
->
m_oSpt
.
IsInit
()))
sptType
=
static_cast
<
OOX
::
Vml
::
SptType
>
(
oox_obj
->
m_oShapeType
->
m_oSpt
->
GetValue
());
if
(
sptType
!=
OOX
::
Vml
::
SptType
::
sptNotPrimitive
)
if
(
sptType
!=
OOX
::
Vml
::
SptType
::
sptNotPrimitive
)
{
{
...
@@ -2103,9 +2106,11 @@ void DocxConverter::convert(OOX::Logic::CObject* oox_obj)
...
@@ -2103,9 +2106,11 @@ void DocxConverter::convert(OOX::Logic::CObject* oox_obj)
odf_context
()
->
drawing_context
()
->
set_name
(
L"Rect"
);
odf_context
()
->
drawing_context
()
->
set_name
(
L"Rect"
);
odf_context
()
->
drawing_context
()
->
start_shape
(
SimpleTypes
::
shapetypeRect
);
odf_context
()
->
drawing_context
()
->
start_shape
(
SimpleTypes
::
shapetypeRect
);
}
}
OoxConverter
::
convert
(
oox_obj
->
m_oShape
.
GetPointer
());
OoxConverter
::
convert
(
oox_obj
->
m_oShape
.
GetPointer
());
odf_context
()
->
drawing_context
()
->
end_shape
();
odf_context
()
->
drawing_context
()
->
set_type_fill
(
2
);
//temp ... image
odf_context
()
->
drawing_context
()
->
end_shape
();
odf_context
()
->
drawing_context
()
->
end_drawing
();
odf_context
()
->
drawing_context
()
->
end_drawing
();
odt_context
->
end_drawings
();
odt_context
->
end_drawings
();
...
...
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