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
6486899b
Kaydet (Commit)
6486899b
authored
Tem 27, 2012
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
test RTF_M{RAD,SEPCHR,SSUB,F}
Change-Id: I73f472fb09f97d94fbc9ef5cf38d9cf3c4beb999
üst
c0bd973c
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
481 additions
and
0 deletions
+481
-0
math-rad.rtf
sw/qa/extras/rtfexport/data/math-rad.rtf
+48
-0
math-sepchr.rtf
sw/qa/extras/rtfexport/data/math-sepchr.rtf
+39
-0
math-subscripts.rtf
sw/qa/extras/rtfexport/data/math-subscripts.rtf
+224
-0
math-vertical-stacks.rtf
sw/qa/extras/rtfexport/data/math-vertical-stacks.rtf
+131
-0
rtfexport.cxx
sw/qa/extras/rtfexport/rtfexport.cxx
+39
-0
No files found.
sw/qa/extras/rtfexport/data/math-rad.rtf
0 → 100644
Dosyayı görüntüle @
6486899b
{\rtf1
{\mmath
{\*\moMathPara
{\*\moMath
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid816065 }
{\mrad
{\mradPr
{\mdegHide on}
{\mctrlPr\f34 }
}
{\mdeg
{\rtlch\fcs1 \af1 \ltrch\fcs0
\f34\insrsid816065 }
}
{\me
{\rtlch\fcs1 \af1 \ltrch\fcs0 \i\f34\insrsid816065 \hich\af34\dbch\af42\loch\f34
{\mr\mscr0\msty2 4}
}
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid816065 }
}
}
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid816065 }
{\mrad
{\mradPr
{\mctrlPr
\f34 }
}
{\mdeg
{\rtlch\fcs1 \af1 \ltrch\fcs0 \i\f34\insrsid816065 \hich\af34\dbch\af42\loch\f34
{\mr\mscr0\msty2 3}
}
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid816065 }
}
{\me
{\rtlch\fcs1 \af1 \ltrch\fcs0 \i\f34\insrsid816065 \hich\af34\dbch\af42\loch\f34
{\mr\mscr0\msty2 x}
}
{\rtlch\fcs1 \af1 \ltrch\fcs0 \i\f34\insrsid816065 \hich\af34\dbch\af42\loch\f34
{\mr\mscr0\msty2 +1}
}
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid816065 }
}
}
}
}
}
\par
}
sw/qa/extras/rtfexport/data/math-sepchr.rtf
0 → 100644
Dosyayı görüntüle @
6486899b
{\rtf1
{\mmath
{\*\moMathPara
{\*\moMath
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid13126585 }
{\md
{\mdPr
{\mbegChr A}
{\msepChr B}
{\mendChr C}
{\mctrlPr\f34 }
}
{\me
{\rtlch\fcs1 \af1 \ltrch\fcs0
\i\f34\insrsid13126585 \hich\af34\dbch\af42\loch\f34
{\mr\mscr0\msty2 x}
}
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid13126585 }
}
{\me
{\rtlch\fcs1 \af1 \ltrch\fcs0 \i\f34\insrsid13126585 \hich\af34\dbch\af42\loch\f34
{\mr\mscr0\msty2 y}
}
{\rtlch\fcs1 \af1
\ltrch\fcs0 \f34\insrsid13126585 }
}
{\me
{\rtlch\fcs1 \af1 \ltrch\fcs0 \i\f34\insrsid13126585 \hich\af34\dbch\af42\loch\f34
{\mr\mscr0\msty2 z}
}
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid13126585 }
}
}
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid13126585 }
}
}
}
\par
}
sw/qa/extras/rtfexport/data/math-subscripts.rtf
0 → 100644
Dosyayı görüntüle @
6486899b
{\rtf1
{\mmath
{\*\moMathPara
{\*\moMath
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid15485000 }
{\msSup
{\msSupPr
{\mctrlPr\f34 }
}
{\me
{\rtlch\fcs1 \af1 \ltrch\fcs0
\i\f34\insrsid15485000 \hich\af34\dbch\af42\loch\f34
{\mr\mscr0\msty2 x}
}
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid15485000 }
}
{\msup
{\rtlch\fcs1 \af1 \ltrch\fcs0 \i\f34\insrsid15485000 \hich\af34\dbch\af42\loch\f34
{\mr\mscr0\msty2 y}
}
{\rtlch\fcs1 \af1
\ltrch\fcs0 \f34\insrsid15485000 }
}
}
{\rtlch\fcs1 \af1 \ltrch\fcs0 \i\f34\insrsid15485000 \hich\af34\dbch\af42\loch\f34
{\mr\mscr0\msty2 +}
}
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid15485000 }
{\msSup
{\msSupPr
{\mctrlPr\f34 }
}
{\me
{\rtlch\fcs1 \af1
\ltrch\fcs0 \i\f34\insrsid15485000 \hich\af34\dbch\af42\loch\f34
{\mr\mscr0\msty2 e}
}
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid15485000 }
}
{\msup
{\rtlch\fcs1 \af1 \ltrch\fcs0 \i\f34\insrsid15485000 \hich\af34\dbch\af42\loch\f34
{\mr\mscr0\msty2 x}
}
{
\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid15485000 }
}
}
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid15485000 }
{\msSup
{\msSupPr
{\mctrlPr\f34 }
}
{\me
{\rtlch\fcs1 \af1 \ltrch\fcs0 \i\f34\insrsid15485000 \hich\af34\dbch\af42\loch\f34
{\mr\mscr0\msty2 x}
}
{
\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid15485000 }
}
{\msup
{\rtlch\fcs1 \af1 \ltrch\fcs0 \i\f34\insrsid15485000 \hich\af34\dbch\af42\loch\f34
{\mr\mscr0\msty2 b}
}
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid15485000 }
}
}
{\rtlch\fcs1 \af1 \ltrch\fcs0
\f34\insrsid15485000 }
{\msSub
{\msSubPr
{\mctrlPr\f34 }
}
{\me
{\rtlch\fcs1 \af1 \ltrch\fcs0 \i\f34\insrsid15485000 \hich\af34\dbch\af42\loch\f34
{\mr\mscr0\msty2 x}
}
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid15485000 }
}
{\msub
{\rtlch\fcs1 \af1 \ltrch\fcs0
\i\f34\insrsid15485000 \hich\af34\dbch\af42\loch\f34
{\mr\mscr0\msty2 b}
}
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid15485000 }
}
}
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid15485000 }
{\msSubSup
{\msSubSupPr
{\mctrlPr\f34 }
}
{\me
{\rtlch\fcs1 \af1 \ltrch\fcs0
\i\f34\insrsid15485000 \hich\af34\dbch\af42\loch\f34
{\mr\mscr0\msty2 a}
}
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid15485000 }
}
{\msub
{\rtlch\fcs1 \af1 \ltrch\fcs0 \i\f34\insrsid15485000 \hich\af34\dbch\af42\loch\f34
{\mr\mscr0\msty2 c}
}
{\rtlch\fcs1 \af1
\ltrch\fcs0 \f34\insrsid15485000 }
}
{\msup
{\rtlch\fcs1 \af1 \ltrch\fcs0 \i\f34\insrsid15485000 \hich\af34\dbch\af42\loch\f34
{\mr\mscr0\msty2 b}
}
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid15485000 }
}
}
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid15485000 }
{\msPre
{\msPrePr
{\mctrlPr\f34 }
}
{\msub
{\rtlch\fcs1 \af1 \ltrch\fcs0 \i\f34\insrsid15485000 \hich\af34\dbch\af42\loch\f34
{\mr\mscr0\msty2 2}
}
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid15485000 }
}
{\msup
{\rtlch\fcs1 \af1 \ltrch\fcs0 \i\f34\insrsid15485000
\hich\af34\dbch\af42\loch\f34
{\mr\mscr0\msty2 1}
}
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid15485000 }
}
{\me
{\rtlch\fcs1 \af1 \ltrch\fcs0 \i\f34\insrsid15485000 \hich\af34\dbch\af42\loch\f34
{\mr\mscr0\msty2 x}
}
{\rtlch\fcs1 \af1 \ltrch\fcs0
\f34\insrsid15485000 }
}
}
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid15485000 }
{\msSubSup
{\msSubSupPr
{\mctrlPr\f34 }
}
{\me
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid15485000 }
{\msPre
{\msPrePr
{\mctrlPr\f34 }
}
{\msub
{\rtlch\fcs1 \af1 \ltrch\fcs0
\i\f34\insrsid15485000 \hich\af34\dbch\af42\loch\f34
{\mr\mscr0\msty2 4}
}
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid15485000 }
}
{\msup
{\rtlch\fcs1 \af1 \ltrch\fcs0 \i\f34\insrsid15485000 \hich\af34\dbch\af42\loch\f34
{\mr\mscr0\msty2 5}
}
{\rtlch\fcs1 \af1
\ltrch\fcs0 \f34\insrsid15485000 }
}
{\me
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid15485000 }
{\mlimLow
{\mlimLowPr
{\mctrlPr\f34 }
}
{\me
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid15485000 }
{\mlimUpp
{\mlimUppPr
{\mctrlPr\f34 }
}
{\me
{\rtlch\fcs1 \af1 \ltrch\fcs0
\i\f34\insrsid15485000 \hich\af34\dbch\af42\loch\f34
{\mr\mscr0\msty2 x}
}
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid15485000 }
}
{\mlim
{\rtlch\fcs1 \af1 \ltrch\fcs0 \i\f34\insrsid15485000 \hich\af34\dbch\af42\loch\f34
{\mr\mscr0\msty2 6}
}
{\rtlch\fcs1 \af1
\ltrch\fcs0 \f34\insrsid15485000 }
}
}
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid15485000 }
}
{\mlim
{\rtlch\fcs1 \af1 \ltrch\fcs0 \i\f34\insrsid15485000 \hich\af34\dbch\af42\loch\f34
{\mr\mscr0\msty2 3}
}
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid15485000 }
}
}
{
\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid15485000 }
}
}
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid15485000 }
}
{\msub
{\rtlch\fcs1 \af1 \ltrch\fcs0 \i\f34\insrsid15485000 \hich\af34\dbch\af42\loch\f34
{\mr\mscr0\msty2 2}
}
{\rtlch\fcs1 \af1 \ltrch\fcs0
\f34\insrsid15485000 }
}
{\msup
{\rtlch\fcs1 \af1 \ltrch\fcs0 \i\f34\insrsid15485000 \hich\af34\dbch\af42\loch\f34
{\mr\mscr0\msty2 1}
}
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid15485000 }
}
}
}
}
}
\par
}
sw/qa/extras/rtfexport/data/math-vertical-stacks.rtf
0 → 100644
Dosyayı görüntüle @
6486899b
{\rtf1
{\mmath
{\*\moMathPara
{\*\moMath
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid936301 }
{\mf
{\mfPr
{\mctrlPr\f34 }
}
{\mnum
{\rtlch\fcs1 \af1 \ltrch\fcs0
\i\f34\insrsid936301 \hich\af34\dbch\af42\loch\f34
{\mr\mscr0\msty2 a}
}
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid936301 }
}
{\mden
{\rtlch\fcs1 \af1 \ltrch\fcs0 \i\f34\insrsid936301 \hich\af34\dbch\af42\loch\f34
{\mr\mscr0\msty2 b}
}
{\rtlch\fcs1 \af1
\ltrch\fcs0 \f34\insrsid936301 }
}
}
}
}
}
{\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid6706768
\par }
{\mmath
{\*\moMathPara
{\*\moMath
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid936301 }
{\mf
{\mfPr
{\mtype lin}
{\mctrlPr\f34 }
}
{\mnum
{\rtlch\fcs1 \af1 \ltrch\fcs0 \i\f34\insrsid936301 \hich\af34\dbch\af42\loch\f34
{\mr\mscr0\msty2 a}
}
{\rtlch\fcs1 \af1
\ltrch\fcs0 \f34\insrsid936301 }
}
{\mden
{\rtlch\fcs1 \af1 \ltrch\fcs0 \i\f34\insrsid936301 \hich\af34\dbch\af42\loch\f34
{\mr\mscr0\msty2 b}
}
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid936301 }
}
}
}
}
}
{
\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid6706768
\par }
{\mmath
{\*\moMathPara
{\*\moMath
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid936301 }
{\mf
{\mfPr
{\mtype noBar}
{\mctrlPr\f34 }
}
{\mnum
{\rtlch\fcs1 \af1 \ltrch\fcs0 \i\f34\insrsid936301 \hich\af34\dbch\af42\loch\f34
{\mr\mscr0\msty2 a}
}
{\rtlch\fcs1 \af1
\ltrch\fcs0 \f34\insrsid936301 }
}
{\mden
{\rtlch\fcs1 \af1 \ltrch\fcs0 \i\f34\insrsid936301 \hich\af34\dbch\af42\loch\f34
{\mr\mscr0\msty2 b}
}
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid936301 }
}
}
}
}
}
{\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid6706768
\par }
{\mmath
{\*\moMathPara
{\*\moMath
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid936301 }
{\mf
{\mfPr
{\mtype noBar}
{\mctrlPr\f34 }
}
{\mnum
{\rtlch\fcs1 \af1 \ltrch\fcs0 \i\f34\insrsid936301 \hich\af34\dbch\af42\loch\f34
{\mr\mscr0\msty2 a}
}
{\rtlch\fcs1 \af1
\ltrch\fcs0 \f34\insrsid936301 }
}
{\mden
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid936301 }
{\mf
{\mfPr
{\mtype noBar}
{\mctrlPr\f34 }
}
{\mnum
{\rtlch\fcs1 \af1 \ltrch\fcs0 \i\f34\insrsid936301 \hich\af34\dbch\af42\loch\f34
{\mr\mscr0\msty2 b}
}
{\rtlch\fcs1 \af1
\ltrch\fcs0 \f34\insrsid936301 }
}
{\mden
{\rtlch\fcs1 \af1 \ltrch\fcs0 \i\f34\insrsid936301 \hich\af34\dbch\af42\loch\f34
{\mr\mscr0\msty2 c}
}
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid936301 }
}
}
{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid936301 }
}
}
}
}
}
\par
}
sw/qa/extras/rtfexport/rtfexport.cxx
Dosyayı görüntüle @
6486899b
...
@@ -63,6 +63,10 @@ public:
...
@@ -63,6 +63,10 @@ public:
void
testMathLimupp
();
void
testMathLimupp
();
void
testMathStrikeh
();
void
testMathStrikeh
();
void
testMathPlaceholders
();
void
testMathPlaceholders
();
void
testMathRad
();
void
testMathSepchr
();
void
testMathSubscripts
();
void
testMathVerticalstacks
();
CPPUNIT_TEST_SUITE
(
Test
);
CPPUNIT_TEST_SUITE
(
Test
);
#if !defined(MACOSX) && !defined(WNT)
#if !defined(MACOSX) && !defined(WNT)
...
@@ -88,6 +92,10 @@ public:
...
@@ -88,6 +92,10 @@ public:
CPPUNIT_TEST
(
testMathLimupp
);
CPPUNIT_TEST
(
testMathLimupp
);
CPPUNIT_TEST
(
testMathStrikeh
);
CPPUNIT_TEST
(
testMathStrikeh
);
CPPUNIT_TEST
(
testMathPlaceholders
);
CPPUNIT_TEST
(
testMathPlaceholders
);
CPPUNIT_TEST
(
testMathRad
);
CPPUNIT_TEST
(
testMathSepchr
);
CPPUNIT_TEST
(
testMathSubscripts
);
CPPUNIT_TEST
(
testMathVerticalstacks
);
#endif
#endif
#endif
#endif
CPPUNIT_TEST_SUITE_END
();
CPPUNIT_TEST_SUITE_END
();
...
@@ -358,6 +366,37 @@ void Test::testMathPlaceholders()
...
@@ -358,6 +366,37 @@ void Test::testMathPlaceholders()
CPPUNIT_ASSERT_EQUAL
(
OUString
(
"sum from <?> to <?> <?>"
),
aActual
);
CPPUNIT_ASSERT_EQUAL
(
OUString
(
"sum from <?> to <?> <?>"
),
aActual
);
}
}
void
Test
::
testMathRad
()
{
roundtrip
(
"math-rad.rtf"
);
OUString
aActual
=
getFormula
(
getRun
(
getParagraph
(
1
),
1
));
CPPUNIT_ASSERT_EQUAL
(
OUString
(
"sqrt {4} nroot {3} {x + 1}"
),
aActual
);
}
void
Test
::
testMathSepchr
()
{
roundtrip
(
"math-sepchr.rtf"
);
OUString
aActual
=
getFormula
(
getRun
(
getParagraph
(
1
),
1
));
CPPUNIT_ASSERT_EQUAL
(
OUString
(
"AxByBzC"
),
aActual
);
}
void
Test
::
testMathSubscripts
()
{
roundtrip
(
"math-subscripts.rtf"
);
OUString
aActual
=
getFormula
(
getRun
(
getParagraph
(
1
),
1
));
OUString
aExpected
(
"{x} ^ {y} + {e} ^ {x} {x} ^ {b} {x} rsub {b} {a} rsub {c} rsup {b} {x} lsub {2} lsup {1} {{x csup {6} csub {3}} lsub {4} lsup {5}} rsub {2} rsup {1}"
);
CPPUNIT_ASSERT_EQUAL
(
aExpected
,
aActual
);
}
void
Test
::
testMathVerticalstacks
()
{
roundtrip
(
"math-vertical-stacks.rtf"
);
CPPUNIT_ASSERT_EQUAL
(
OUString
(
"{a} over {b}"
),
getFormula
(
getRun
(
getParagraph
(
1
),
1
)));
CPPUNIT_ASSERT_EQUAL
(
OUString
(
"{a} / {b}"
),
getFormula
(
getRun
(
getParagraph
(
2
),
1
)));
CPPUNIT_ASSERT_EQUAL
(
OUString
(
"stack { a # b }"
),
getFormula
(
getRun
(
getParagraph
(
3
),
1
)));
CPPUNIT_ASSERT_EQUAL
(
OUString
(
"stack { a # stack { b # c } }"
),
getFormula
(
getRun
(
getParagraph
(
4
),
1
)));
}
CPPUNIT_TEST_SUITE_REGISTRATION
(
Test
);
CPPUNIT_TEST_SUITE_REGISTRATION
(
Test
);
CPPUNIT_PLUGIN_IMPLEMENT
();
CPPUNIT_PLUGIN_IMPLEMENT
();
...
...
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