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
331a0a34
Kaydet (Commit)
331a0a34
authored
Ock 21, 2016
tarafından
Michael Stahl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
starmath: fix OOXML export of non-BMP Unicode
Change-Id: Iafaeb9ea2e96ee6d8cc96174731ba3845c230b5e
üst
fefd1221
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
3 deletions
+32
-3
Math.pptx
sd/qa/unit/data/pptx/Math.pptx
+0
-0
export-tests.cxx
sd/qa/unit/export-tests.cxx
+29
-0
ooxmlexport.cxx
starmath/source/ooxmlexport.cxx
+3
-3
No files found.
sd/qa/unit/data/pptx/Math.pptx
0 → 100644
Dosyayı görüntüle @
331a0a34
File added
sd/qa/unit/export-tests.cxx
Dosyayı görüntüle @
331a0a34
...
...
@@ -142,6 +142,7 @@ public:
void
testTdf91378
();
void
testBnc822341
();
void
testMathObject
();
void
testMathObjectPPT2010
();
void
testTdf80224
();
void
testTdf92527
();
...
...
@@ -182,6 +183,7 @@ public:
CPPUNIT_TEST
(
testBnc822341
);
CPPUNIT_TEST
(
testMathObject
);
CPPUNIT_TEST
(
testMathObjectPPT2010
);
CPPUNIT_TEST
(
testTdf80224
);
CPPUNIT_TEST
(
testExportTransitionsPPTX
);
...
...
@@ -1202,6 +1204,33 @@ void SdExportTest::testMathObject()
xDocShRef
->
DoClose
();
}
void
SdExportTest
::
testMathObjectPPT2010
()
{
// Check import / export of math object
::
sd
::
DrawDocShellRef
xDocShRef
=
loadURL
(
getURLFromSrc
(
"sd/qa/unit/data/pptx/Math.pptx"
),
PPTX
);
utl
::
TempFile
tempFile1
;
xDocShRef
=
saveAndReload
(
xDocShRef
,
PPTX
,
&
tempFile1
);
// Export an MS specific ole object (imported from a PPTX document)
{
xmlDocPtr
pXmlDocContent
=
parseExport
(
tempFile1
,
"ppt/slides/slide1.xml"
);
assertXPath
(
pXmlDocContent
,
"/p:sld/p:cSld/p:spTree/mc:AlternateContent/mc:Choice"
,
"Requires"
,
"a14"
);
assertXPathContent
(
pXmlDocContent
,
"/p:sld/p:cSld/p:spTree/mc:AlternateContent/mc:Choice/p:sp/p:txBody/a:p/a14:m/m:oMath/m:sSup/m:e/m:r[1]/m:t"
,
OUString
::
fromUtf8
(
"
\xf0\x9d\x91\x8e
"
));
// non-BMP char
const
SdrPage
*
pPage
=
GetPage
(
1
,
xDocShRef
);
const
SdrObject
*
pObj
=
dynamic_cast
<
SdrObject
*>
(
pPage
->
GetObj
(
0
));
CPPUNIT_ASSERT_MESSAGE
(
"no object"
,
pObj
!=
nullptr
);
CPPUNIT_ASSERT_EQUAL
(
static_cast
<
sal_uInt16
>
(
OBJ_OLE2
),
pObj
->
GetObjIdentifier
());
}
xDocShRef
->
DoClose
();
}
void
SdExportTest
::
testBulletMarginAndIndentation
()
{
::
sd
::
DrawDocShellRef
xDocShRef
=
loadURL
(
getURLFromSrc
(
"/sd/qa/unit/data/pptx/bulletMarginAndIndent.pptx"
),
PPTX
);
...
...
starmath/source/ooxmlexport.cxx
Dosyayı görüntüle @
331a0a34
...
...
@@ -75,6 +75,7 @@ void SmOoxmlExport::HandleText( const SmNode* pNode, int /*nLevel*/)
m_pSerializer
->
startElementNS
(
XML_m
,
XML_t
,
FSNS
(
XML_xml
,
XML_space
),
"preserve"
,
FSEND
);
const
SmTextNode
*
pTemp
=
static_cast
<
const
SmTextNode
*
>
(
pNode
);
SAL_INFO
(
"starmath.ooxml"
,
"Text:"
<<
OUStringToOString
(
pTemp
->
GetText
(),
RTL_TEXTENCODING_UTF8
).
getStr
());
OUStringBuffer
buf
(
pTemp
->
GetText
());
for
(
sal_Int32
i
=
0
;
i
<
pTemp
->
GetText
().
getLength
();
i
++
)
{
#if 0
...
...
@@ -94,9 +95,7 @@ void SmOoxmlExport::HandleText( const SmNode* pNode, int /*nLevel*/)
nFace = 0x7;
*pS << sal_uInt8(nFace+128); //typeface
#endif
sal_uInt16
nChar
=
pTemp
->
GetText
()[
i
];
m_pSerializer
->
writeEscaped
(
OUString
(
SmTextNode
::
ConvertSymbolToUnicode
(
nChar
)));
buf
[
i
]
=
SmTextNode
::
ConvertSymbolToUnicode
(
buf
[
i
]);
#if 0
//Mathtype can only have these sort of character
//attributes on a single character, starmath can put them
...
...
@@ -127,6 +126,7 @@ void SmOoxmlExport::HandleText( const SmNode* pNode, int /*nLevel*/)
}
#endif
}
m_pSerializer
->
writeEscaped
(
buf
.
makeStringAndClear
());
m_pSerializer
->
endElementNS
(
XML_m
,
XML_t
);
m_pSerializer
->
endElementNS
(
XML_m
,
XML_r
);
}
...
...
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