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
4ded3c11
Kaydet (Commit)
4ded3c11
authored
Agu 17, 2011
tarafından
Luboš Luňák
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
implement root support for ooxml math export
üst
c070a4d8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
63 additions
and
3 deletions
+63
-3
node.hxx
starmath/inc/node.hxx
+38
-1
ooxml.cxx
starmath/source/ooxml.cxx
+24
-2
ooxml.hxx
starmath/source/ooxml.hxx
+1
-0
No files found.
starmath/inc/node.hxx
Dosyayı görüntüle @
4ded3c11
...
...
@@ -764,7 +764,7 @@ public:
* 0: Argument (optional)<BR>
* 1: Symbol (instance of SmRootSymbolNode)<BR>
* 2: Body<BR>
* Where argument is optinal and may be NULL.
* Where argument is opti
o
nal and may be NULL.
*/
class
SmRootNode
:
public
SmStructureNode
{
...
...
@@ -783,6 +783,13 @@ public:
virtual
void
Arrange
(
const
OutputDevice
&
rDev
,
const
SmFormat
&
rFormat
);
void
CreateTextFromNode
(
String
&
rText
);
void
Accept
(
SmVisitor
*
pVisitor
);
SmNode
*
Argument
();
const
SmNode
*
Argument
()
const
;
SmRootSymbolNode
*
Symbol
();
const
SmRootSymbolNode
*
Symbol
()
const
;
SmNode
*
Body
();
const
SmNode
*
Body
()
const
;
};
...
...
@@ -1221,6 +1228,36 @@ public:
////////////////////////////////////////////////////////////////////////////////
inline
SmNode
*
SmRootNode
::
Argument
()
{
OSL_ASSERT
(
GetNumSubNodes
()
>
0
);
return
GetSubNode
(
0
);
}
inline
const
SmNode
*
SmRootNode
::
Argument
()
const
{
return
const_cast
<
SmRootNode
*
>
(
this
)
->
Argument
();
}
inline
SmRootSymbolNode
*
SmRootNode
::
Symbol
()
{
OSL_ASSERT
(
GetSubNode
(
0
)
->
GetType
()
==
NROOTSYMBOL
);
return
static_cast
<
SmRootSymbolNode
*
>
(
GetSubNode
(
1
));
}
inline
const
SmRootSymbolNode
*
SmRootNode
::
Symbol
()
const
{
return
const_cast
<
SmRootNode
*
>
(
this
)
->
Symbol
();
}
inline
SmNode
*
SmRootNode
::
Body
()
{
OSL_ASSERT
(
GetNumSubNodes
()
>
2
);
return
GetSubNode
(
2
);
}
inline
const
SmNode
*
SmRootNode
::
Body
()
const
{
return
const_cast
<
SmRootNode
*
>
(
this
)
->
Body
();
}
#endif
...
...
starmath/source/ooxml.cxx
Dosyayı görüntüle @
4ded3c11
...
...
@@ -120,10 +120,10 @@ void SmOoxml::HandleNode(SmNode *pNode,int nLevel)
case
NBINVER
:
HandleFractions
(
pNode
,
nLevel
);
break
;
#if 0
case
NROOT
:
HandleRoot(
pNode
,nLevel);
HandleRoot
(
static_cast
<
SmRootNode
*
>
(
pNode
)
,
nLevel
);
break
;
#if 0
case NSPECIAL:
{
SmTextNode *pText=(SmTextNode *)pNode;
...
...
@@ -458,4 +458,26 @@ void SmOoxml::HandleBinaryOperation(SmNode *pNode,int nLevel)
}
}
void
SmOoxml
::
HandleRoot
(
SmRootNode
*
pNode
,
int
nLevel
)
{
m_pSerializer
->
startElementNS
(
XML_m
,
XML_rad
,
FSEND
);
if
(
SmNode
*
argument
=
pNode
->
Argument
())
{
m_pSerializer
->
startElementNS
(
XML_m
,
XML_deg
,
FSEND
);
HandleAllSubNodes
(
argument
,
nLevel
);
m_pSerializer
->
endElementNS
(
XML_m
,
XML_deg
);
}
else
{
m_pSerializer
->
startElementNS
(
XML_m
,
XML_radPr
,
FSEND
);
m_pSerializer
->
singleElementNS
(
XML_m
,
XML_degHide
,
FSNS
(
XML_m
,
XML_val
),
"1"
,
FSEND
);
m_pSerializer
->
endElementNS
(
XML_m
,
XML_radPr
);
m_pSerializer
->
singleElementNS
(
XML_m
,
XML_deg
,
FSEND
);
// empty but present
}
m_pSerializer
->
startElementNS
(
XML_m
,
XML_e
,
FSEND
);
HandleAllSubNodes
(
pNode
->
Body
(),
nLevel
);
m_pSerializer
->
endElementNS
(
XML_m
,
XML_e
);
m_pSerializer
->
endElementNS
(
XML_m
,
XML_rad
);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
starmath/source/ooxml.hxx
Dosyayı görüntüle @
4ded3c11
...
...
@@ -51,6 +51,7 @@ private:
void
HandleMath
(
SmNode
*
pNode
,
int
nLevel
);
void
HandleFractions
(
SmNode
*
pNode
,
int
nLevel
,
const
char
*
type
=
NULL
);
void
HandleBinaryOperation
(
SmNode
*
pNode
,
int
nLevel
);
void
HandleRoot
(
SmRootNode
*
pNode
,
int
nLevel
);
String
str
;
SmNode
*
pTree
;
::
sax_fastparser
::
FSHelperPtr
m_pSerializer
;
...
...
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