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
4c875612
Kaydet (Commit)
4c875612
authored
Kas 23, 2018
tarafından
Tamás Zolnai
Kaydeden (comit)
Jan Holesovsky
Ara 07, 2018
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
LOK: Update failing unit tests
Change-Id: Ib30be297d87fa40c03974e0a97f243812dc488f3
üst
e75c67bd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
19 deletions
+17
-19
tiledrendering.cxx
sd/qa/unit/tiledrendering/tiledrendering.cxx
+17
-19
No files found.
sd/qa/unit/tiledrendering/tiledrendering.cxx
Dosyayı görüntüle @
4c875612
...
...
@@ -867,11 +867,11 @@ void SdTiledRenderingTest::testResizeTable()
auto
pTableObject
=
dynamic_cast
<
sdr
::
table
::
SdrTableObj
*>
(
pObject
);
CPPUNIT_ASSERT
(
pTableObject
);
// Select the table by marking it + starting and ending text edit.
SdrView
*
pView
=
pViewShell
->
GetView
(
);
pView
->
MarkObj
(
pObject
,
pView
->
GetSdrPageView
());
pView
->
SdrBeginTextEdit
(
pObject
);
pView
->
SdrEndTextEdit
(
);
SdrHdlList
handleList
(
nullptr
);
pObject
->
AddToHdlList
(
handleList
);
CPPUNIT_ASSERT_EQUAL
(
static_cast
<
size_t
>
(
14
),
handleList
.
GetHdlCount
());
// Take the top left handle
SdrHdl
*
pHdl
=
handleList
.
GetHdl
(
0
);
// Remember the original row heights.
uno
::
Reference
<
table
::
XColumnRowRange
>
xTable
(
pTableObject
->
getTable
(),
uno
::
UNO_QUERY
);
...
...
@@ -882,15 +882,14 @@ void SdTiledRenderingTest::testResizeTable()
sal_Int32
nExpectedRow2
=
xRow2
->
getPropertyValue
(
"Size"
).
get
<
sal_Int32
>
();
// Resize the upper row, decrease its height by 1 cm.
Point
aInnerRowEdge
=
pObject
->
GetSnapRect
().
Center
();
pXImpressDocument
->
setGraphicSelection
(
LOK_SETGRAPHICSELECTION_START
,
convertMm100ToTwip
(
aInnerRowEdge
.
getX
()),
convertMm100ToTwip
(
aInnerRowEdge
.
getY
()));
pXImpressDocument
->
setGraphicSelection
(
LOK_SETGRAPHICSELECTION_END
,
convertMm100ToTwip
(
aInnerRowEdge
.
getX
()),
convertMm100ToTwip
(
aInnerRowEdge
.
getY
()
-
1000
));
pXImpressDocument
->
setGraphicSelection
(
LOK_SETGRAPHICSELECTION_START
,
convertMm100ToTwip
(
pHdl
->
GetPos
().
getX
()),
convertMm100ToTwip
(
pHdl
->
GetPos
().
getY
()));
pXImpressDocument
->
setGraphicSelection
(
LOK_SETGRAPHICSELECTION_END
,
convertMm100ToTwip
(
pHdl
->
GetPos
().
getX
()),
convertMm100ToTwip
(
pHdl
->
GetPos
().
getY
()
+
1000
));
// Remember the resized row heights.
sal_Int32
nResizedRow1
=
xRow1
->
getPropertyValue
(
"Size"
).
get
<
sal_Int32
>
();
CPPUNIT_ASSERT
(
nResizedRow1
<
nExpectedRow1
);
sal_Int32
nResizedRow2
=
xRow2
->
getPropertyValue
(
"Size"
).
get
<
sal_Int32
>
();
CPPUNIT_ASSERT
_EQUAL
(
nExpectedRow2
,
nResiz
edRow2
);
CPPUNIT_ASSERT
(
nResizedRow2
<
nExpect
edRow2
);
// Now undo the resize.
pXImpressDocument
->
GetDocShell
()
->
GetUndoManager
()
->
Undo
();
...
...
@@ -900,7 +899,7 @@ void SdTiledRenderingTest::testResizeTable()
CPPUNIT_ASSERT_EQUAL
(
nExpectedRow1
,
nActualRow1
);
sal_Int32
nActualRow2
=
xRow2
->
getPropertyValue
(
"Size"
).
get
<
sal_Int32
>
();
// Expected was 4000, actual was 4572, i.e. the second row after undo was larger than expected.
CPPUNIT_ASSERT_
EQUAL
(
nExpectedRow2
,
nActualRow2
);
CPPUNIT_ASSERT_
DOUBLES_EQUAL
(
nExpectedRow2
,
nActualRow2
,
1.0
);
comphelper
::
LibreOfficeKit
::
setActive
(
false
);
}
...
...
@@ -915,11 +914,11 @@ void SdTiledRenderingTest::testResizeTableColumn()
auto
pTableObject
=
dynamic_cast
<
sdr
::
table
::
SdrTableObj
*>
(
pObject
);
CPPUNIT_ASSERT
(
pTableObject
);
// Select the table by marking it + starting and ending text edit.
SdrView
*
pView
=
pViewShell
->
GetView
(
);
pView
->
MarkObj
(
pObject
,
pView
->
GetSdrPageView
());
pView
->
SdrBeginTextEdit
(
pObject
);
pView
->
SdrEndTextEdit
(
);
SdrHdlList
handleList
(
nullptr
);
pObject
->
AddToHdlList
(
handleList
);
CPPUNIT_ASSERT_EQUAL
(
static_cast
<
size_t
>
(
14
),
handleList
.
GetHdlCount
());
// Take the top left handle
SdrHdl
*
pHdl
=
handleList
.
GetHdl
(
0
);
// Remember the original cell widths.
xmlDocPtr
pXmlDoc
=
parseXmlDump
();
...
...
@@ -930,16 +929,15 @@ void SdTiledRenderingTest::testResizeTableColumn()
pXmlDoc
=
nullptr
;
// Resize the left column, decrease its width by 1 cm.
Point
aInnerRowEdge
=
pObject
->
GetSnapRect
().
Center
();
pXImpressDocument
->
setGraphicSelection
(
LOK_SETGRAPHICSELECTION_START
,
convertMm100ToTwip
(
aInnerRowEdge
.
getX
()),
convertMm100ToTwip
(
aInnerRowEdge
.
getY
()));
pXImpressDocument
->
setGraphicSelection
(
LOK_SETGRAPHICSELECTION_END
,
convertMm100ToTwip
(
aInnerRowEdge
.
getX
()
-
1000
),
convertMm100ToTwip
(
aInnerRowEdge
.
getY
()));
pXImpressDocument
->
setGraphicSelection
(
LOK_SETGRAPHICSELECTION_START
,
convertMm100ToTwip
(
pHdl
->
GetPos
().
getX
()),
convertMm100ToTwip
(
pHdl
->
GetPos
().
getY
()));
pXImpressDocument
->
setGraphicSelection
(
LOK_SETGRAPHICSELECTION_END
,
convertMm100ToTwip
(
pHdl
->
GetPos
().
getX
()
+
1000
),
convertMm100ToTwip
(
pHdl
->
GetPos
().
getY
()));
// Remember the resized column widths.
pXmlDoc
=
parseXmlDump
();
sal_Int32
nResizedColumn1
=
getXPath
(
pXmlDoc
,
aPrefix
+
"TableLayouter_Layout[1]"
,
"size"
).
toInt32
();
CPPUNIT_ASSERT
(
nResizedColumn1
<
nExpectedColumn1
);
sal_Int32
nResizedColumn2
=
getXPath
(
pXmlDoc
,
aPrefix
+
"TableLayouter_Layout[2]"
,
"size"
).
toInt32
();
CPPUNIT_ASSERT
(
nResizedColumn2
>
nExpectedColumn2
);
CPPUNIT_ASSERT
(
nResizedColumn2
<
nExpectedColumn2
);
xmlFreeDoc
(
pXmlDoc
);
pXmlDoc
=
nullptr
;
...
...
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