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
36ac7749
Kaydet (Commit)
36ac7749
authored
Eyl 24, 2014
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
DOCX import: make sure rotation does not affect shape position
Change-Id: I7916a24d63bb7c995267059e9bedbf1f08adc152
üst
2916dfdb
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
0 deletions
+25
-0
position-and-rotation.docx
sw/qa/extras/ooxmlexport/data/position-and-rotation.docx
+0
-0
ooxmlexport.cxx
sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+11
-0
GraphicImport.cxx
writerfilter/source/dmapper/GraphicImport.cxx
+14
-0
No files found.
sw/qa/extras/ooxmlexport/data/position-and-rotation.docx
0 → 100644
Dosyayı görüntüle @
36ac7749
File added
sw/qa/extras/ooxmlexport/ooxmlexport.cxx
Dosyayı görüntüle @
36ac7749
...
...
@@ -272,6 +272,17 @@ DECLARE_OOXMLEXPORT_TEST(testChartDupe, "chart-dupe.docx")
CPPUNIT_ASSERT_EQUAL
(
sal_Int32
(
1
),
xEmbeddedObjects
->
getCount
());
}
DECLARE_OOXMLEXPORT_TEST
(
testPositionAndRotation
,
"position-and-rotation.docx"
)
{
// The document should look like: "This line is tricky, <image> because only 'This line is tricky,' is on the left."
// But the image was pushed down, so it did not break the line into two text portions.
uno
::
Reference
<
drawing
::
XShape
>
xShape
=
getShape
(
1
);
// Should be 1559, was -5639
CPPUNIT_ASSERT
(
xShape
->
getPosition
().
X
>
1500
);
// Should be 88, was 473
CPPUNIT_ASSERT
(
xShape
->
getPosition
().
Y
<
100
);
}
CPPUNIT_PLUGIN_IMPLEMENT
();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
writerfilter/source/dmapper/GraphicImport.cxx
Dosyayı görüntüle @
36ac7749
...
...
@@ -779,9 +779,23 @@ void GraphicImport::lcl_attribute(Id nName, Value& rValue)
if
(
xServiceInfo
->
supportsService
(
"com.sun.star.drawing.GroupShape"
)
||
xServiceInfo
->
supportsService
(
"com.sun.star.drawing.GraphicObjectShape"
))
{
// You would expect that position and rotation are
// independent, but they are not. Till we are not
// there yet to handle all scaling, translation and
// rotation with a single transformation matrix,
// make sure there is no rotation set when we set
// the position.
sal_Int32
nRotation
=
0
;
xShapeProps
->
getPropertyValue
(
"RotateAngle"
)
>>=
nRotation
;
if
(
nRotation
)
xShapeProps
->
setPropertyValue
(
"RotateAngle"
,
uno
::
makeAny
(
sal_Int32
(
0
)));
// Position of the groupshape should be set after children have been added.
// fdo#80555: also set position for graphic shapes here
m_xShape
->
setPosition
(
awt
::
Point
(
m_pImpl
->
nLeftPosition
,
m_pImpl
->
nTopPosition
));
if
(
nRotation
)
xShapeProps
->
setPropertyValue
(
"RotateAngle"
,
uno
::
makeAny
(
nRotation
));
}
m_pImpl
->
applyRelativePosition
(
xShapeProps
);
...
...
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