Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
c2c7e4d8
Kaydet (Commit)
c2c7e4d8
authored
Ara 06, 2013
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
DOCX import: handle groupshapes inside wpg elements (groupshapes)
Change-Id: Icb44f91219f75103f469f38f96d843b8e8251e92
üst
131f3230
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
0 deletions
+22
-0
shapegroupcontext.cxx
oox/source/drawingml/shapegroupcontext.cxx
+8
-0
WpgContext.cxx
oox/source/shape/WpgContext.cxx
+6
-0
wpg-nested.docx
sw/qa/extras/ooxmlimport/data/wpg-nested.docx
+0
-0
ooxmlimport.cxx
sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+8
-0
No files found.
oox/source/drawingml/shapegroupcontext.cxx
Dosyayı görüntüle @
c2c7e4d8
...
...
@@ -88,11 +88,19 @@ ContextHandlerRef ShapeGroupContext::onCreateContext( sal_Int32 aElementToken, c
case
XML_grpSp
:
// group shape
return
new
ShapeGroupContext
(
*
this
,
mpGroupShapePtr
,
ShapePtr
(
new
Shape
(
"com.sun.star.drawing.GroupShape"
)
)
);
case
XML_sp
:
// shape
case
XML_wsp
:
return
new
ShapeContext
(
*
this
,
mpGroupShapePtr
,
ShapePtr
(
new
Shape
(
"com.sun.star.drawing.CustomShape"
)
)
);
case
XML_pic
:
// CT_Picture
return
new
GraphicShapeContext
(
*
this
,
mpGroupShapePtr
,
ShapePtr
(
new
Shape
(
"com.sun.star.drawing.GraphicObjectShape"
)
)
);
case
XML_graphicFrame
:
// CT_GraphicalObjectFrame
return
new
GraphicalObjectFrameContext
(
*
this
,
mpGroupShapePtr
,
ShapePtr
(
new
Shape
(
"com.sun.star.drawing.GraphicObjectShape"
)
),
true
);
case
XML_cNvGrpSpPr
:
break
;
case
XML_grpSpLocks
:
break
;
default
:
SAL_WARN
(
"oox"
,
"ShapeGroupContext::onCreateContext: unhandled element: "
<<
getBaseToken
(
aElementToken
));
break
;
}
return
this
;
...
...
oox/source/shape/WpgContext.cxx
Dosyayı görüntüle @
c2c7e4d8
...
...
@@ -47,6 +47,12 @@ oox::core::ContextHandlerRef WpgContext::onCreateContext(sal_Int32 nElementToken
return
new
oox
::
drawingml
::
ShapeContext
(
*
this
,
mpShape
,
pShape
);
}
break
;
case
XML_grpSp
:
{
oox
::
drawingml
::
ShapePtr
pShape
(
new
oox
::
drawingml
::
Shape
(
"com.sun.star.drawing.GroupShape"
));
return
new
oox
::
drawingml
::
ShapeGroupContext
(
*
this
,
mpShape
,
pShape
);
}
break
;
default
:
SAL_WARN
(
"oox"
,
"WpgContext::createFastChildContext: unhandled element: "
<<
getBaseToken
(
nElementToken
));
break
;
...
...
sw/qa/extras/ooxmlimport/data/wpg-nested.docx
0 → 100755
Dosyayı görüntüle @
c2c7e4d8
File added
sw/qa/extras/ooxmlimport/ooxmlimport.cxx
Dosyayı görüntüle @
c2c7e4d8
...
...
@@ -1555,6 +1555,14 @@ DECLARE_OOXMLIMPORT_TEST(testWpgOnly, "wpg-only.docx")
CPPUNIT_ASSERT_EQUAL
(
sal_Int32
(
EMU_TO_MM100
(
548005
)),
xShape
->
getPosition
().
X
);
}
DECLARE_OOXMLIMPORT_TEST
(
testWpgNested
,
"wpg-nested.docx"
)
{
uno
::
Reference
<
drawing
::
XShapes
>
xGroup
(
getShape
(
1
),
uno
::
UNO_QUERY
);
uno
::
Reference
<
drawing
::
XShapeDescriptor
>
xShapeDescriptor
(
xGroup
->
getByIndex
(
0
),
uno
::
UNO_QUERY
);
// This was a com.sun.star.drawing.CustomShape, due to lack of handling of groupshapes inside groupshapes.
CPPUNIT_ASSERT_EQUAL
(
OUString
(
"com.sun.star.drawing.GroupShape"
),
xShapeDescriptor
->
getShapeType
());
}
DECLARE_OOXMLIMPORT_TEST
(
textboxWpgOnly
,
"textbox-wpg-only.docx"
)
{
uno
::
Reference
<
drawing
::
XShape
>
xShape
=
getShape
(
1
);
...
...
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