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
73893932
Kaydet (Commit)
73893932
authored
Haz 16, 2014
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
SwModelTestBase: add a getShapeByName() method
Change-Id: Ie3b7099aea1d473cca88c4904683234408920100
üst
76fe2776
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
3 deletions
+22
-3
swmodeltestbase.hxx
sw/qa/extras/inc/swmodeltestbase.hxx
+19
-0
ooxmlsdrexport.cxx
sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx
+3
-3
No files found.
sw/qa/extras/inc/swmodeltestbase.hxx
Dosyayı görüntüle @
73893932
...
...
@@ -486,6 +486,25 @@ protected:
return
xShape
;
}
/// Get shape by name
uno
::
Reference
<
drawing
::
XShape
>
getShapeByName
(
const
OUString
&
aName
)
{
uno
::
Reference
<
drawing
::
XShape
>
xRet
;
uno
::
Reference
<
drawing
::
XDrawPageSupplier
>
xDrawPageSupplier
(
mxComponent
,
uno
::
UNO_QUERY
);
uno
::
Reference
<
drawing
::
XDrawPage
>
xDrawPage
=
xDrawPageSupplier
->
getDrawPage
();
for
(
sal_Int32
i
=
0
;
i
<
xDrawPage
->
getCount
();
++
i
)
{
uno
::
Reference
<
container
::
XNamed
>
xShape
(
xDrawPage
->
getByIndex
(
i
),
uno
::
UNO_QUERY
);
if
(
xShape
->
getName
()
==
aName
)
{
xRet
.
set
(
xShape
,
uno
::
UNO_QUERY
);
break
;
}
}
return
xRet
;
}
/// Get TextFrame by name
uno
::
Reference
<
drawing
::
XShape
>
getTextFrameByName
(
const
OUString
&
aName
)
{
...
...
sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx
Dosyayı görüntüle @
73893932
...
...
@@ -215,13 +215,13 @@ DECLARE_OOXMLEXPORT_TEST(testDMLTextFrameVertAdjust, "dml-textframe-vertadjust.d
// TextVerticalAdjust attribute so far.
// 1st frame's context is adjusted to the top
uno
::
Reference
<
beans
::
XPropertySet
>
xFrame
(
get
TextFram
eByName
(
"Rectangle 1"
),
uno
::
UNO_QUERY
);
uno
::
Reference
<
beans
::
XPropertySet
>
xFrame
(
get
Shap
eByName
(
"Rectangle 1"
),
uno
::
UNO_QUERY
);
CPPUNIT_ASSERT_EQUAL
(
drawing
::
TextVerticalAdjust_TOP
,
getProperty
<
drawing
::
TextVerticalAdjust
>
(
xFrame
,
"TextVerticalAdjust"
));
// 2nd frame's context is adjusted to the center
xFrame
.
set
(
get
TextFram
eByName
(
"Rectangle 2"
),
uno
::
UNO_QUERY
);
xFrame
.
set
(
get
Shap
eByName
(
"Rectangle 2"
),
uno
::
UNO_QUERY
);
CPPUNIT_ASSERT_EQUAL
(
drawing
::
TextVerticalAdjust_CENTER
,
getProperty
<
drawing
::
TextVerticalAdjust
>
(
xFrame
,
"TextVerticalAdjust"
));
// 3rd frame's context is adjusted to the bottom
xFrame
.
set
(
get
TextFram
eByName
(
"Rectangle 3"
),
uno
::
UNO_QUERY
);
xFrame
.
set
(
get
Shap
eByName
(
"Rectangle 3"
),
uno
::
UNO_QUERY
);
CPPUNIT_ASSERT_EQUAL
(
drawing
::
TextVerticalAdjust_BOTTOM
,
getProperty
<
drawing
::
TextVerticalAdjust
>
(
xFrame
,
"TextVerticalAdjust"
));
}
...
...
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