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
b0163130
Kaydet (Commit)
b0163130
authored
Şub 02, 2001
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#82042# Making StarMath XML filter accessable as magical uno components
üst
9e2a874f
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
41 additions
and
27 deletions
+41
-27
document.hxx
starmath/inc/document.hxx
+3
-2
document.cxx
starmath/source/document.cxx
+8
-19
mathml.cxx
starmath/source/mathml.cxx
+0
-0
mathml.hxx
starmath/source/mathml.hxx
+30
-6
No files found.
starmath/inc/document.hxx
Dosyayı görüntüle @
b0163130
...
...
@@ -2,9 +2,9 @@
*
* $RCSfile: document.hxx,v $
*
* $Revision: 1.
1.1.1
$
* $Revision: 1.
2
$
*
* last change: $Author:
hr $ $Date: 2000-09-18 16:57:24
$
* last change: $Author:
cmc $ $Date: 2001-02-02 10:20:47
$
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
...
...
@@ -252,6 +252,7 @@ public:
void
Parse
();
SmParser
&
GetParser
()
{
return
aInterpreter
;
}
const
SmNode
*
GetFormulaTree
()
const
{
return
pTree
;
}
void
SetFormulaTree
(
SmNode
*&
rTree
)
{
pTree
=
rTree
;
}
void
Draw
(
OutputDevice
&
rDev
,
Point
&
rPosition
);
Size
GetSize
();
...
...
starmath/source/document.cxx
Dosyayı görüntüle @
b0163130
...
...
@@ -2,9 +2,9 @@
*
* $RCSfile: document.cxx,v $
*
* $Revision: 1.
6
$
* $Revision: 1.
7
$
*
* last change: $Author: cmc $ $Date: 2001-0
1-18 14:57:19
$
* last change: $Author: cmc $ $Date: 2001-0
2-02 10:20:47
$
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
...
...
@@ -629,26 +629,15 @@ void SmDocShell::Convert40To50Txt()
BOOL
SmDocShell
::
ConvertFrom
(
SfxMedium
&
rMedium
)
{
BOOL
bSuccess
=
FALSE
;
if
(
rMedium
.
GetFilter
()
->
GetFilterName
().
EqualsAscii
(
"MathML XML (Math)"
))
if
(
rMedium
.
GetFilter
()
->
GetFilterName
().
EqualsAscii
(
"MathML XML (Math)"
))
{
SmXMLWrapper
aEquation
(
GetModel
());
DBG_ASSERT
(
!
pTree
,
"pTree not NULL"
);
if
(
pTree
)
delete
pTree
;
pTree
=
aEquation
.
Import
(
rMedium
);
if
(
pTree
)
{
pTree
->
CreateTextFromNode
(
aText
);
aText
.
EraseTrailingChars
();
while
((
aText
.
GetChar
(
0
)
==
'{'
)
&&
(
aText
.
GetChar
(
aText
.
Len
()
-
1
)
==
'}'
))
{
aText
.
Erase
(
0
,
1
);
aText
.
Erase
(
aText
.
Len
()
-
1
,
1
);
}
bSuccess
=
TRUE
;
delete
pTree
;
pTree
=
0
;
}
SmXMLWrapper
aEquation
(
GetModel
());
bSuccess
=
aEquation
.
Import
(
rMedium
);
}
else
if
(
rMedium
.
IsStorage
()
&&
rMedium
.
GetStorage
()
->
IsStream
(
C2S
(
"Equation Native"
)))
...
...
@@ -834,7 +823,7 @@ BOOL SmDocShell::ConvertTo( SfxMedium &rMedium )
"MathML XML (Math)"
))
{
SmXMLWrapper
aEquation
(
GetModel
());
bRet
=
aEquation
.
Export
(
rMedium
,
pTree
);
bRet
=
aEquation
.
Export
(
rMedium
);
}
else
if
(
pFlt
->
GetFilterName
().
EqualsAscii
(
"MathType 3.x"
))
bRet
=
WriteAsMathType3
(
rMedium
);
...
...
starmath/source/mathml.cxx
Dosyayı görüntüle @
b0163130
This diff is collapsed.
Click to expand it.
starmath/source/mathml.hxx
Dosyayı görüntüle @
b0163130
...
...
@@ -2,9 +2,9 @@
*
* $RCSfile: mathml.hxx,v $
*
* $Revision: 1.
3
$
* $Revision: 1.
4
$
*
* last change: $Author: cmc $ $Date: 2001-0
1-18 14:57:19
$
* last change: $Author: cmc $ $Date: 2001-0
2-02 10:20:47
$
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
...
...
@@ -78,8 +78,8 @@ class SmXMLWrapper
{
public
:
SmXMLWrapper
(
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
frame
::
XModel
>
&
rRef
)
:
rModel
(
rRef
)
{};
SmNode
*
SmXMLWrapper
::
Import
(
SfxMedium
&
rMedium
);
sal_Bool
Export
(
SfxMedium
&
rMedium
,
SmNode
*
pTree
);
sal_Bool
Import
(
SfxMedium
&
rMedium
);
sal_Bool
Export
(
SfxMedium
&
rMedium
);
private
:
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
frame
::
XModel
>
&
rModel
;
...
...
@@ -89,14 +89,27 @@ private:
class
SmXMLImport
:
public
SvXMLImport
{
public
:
SmXMLImport
()
:
pMathElemTokenMap
(
0
),
pPresLayoutElemTokenMap
(
0
),
pPresElemTokenMap
(
0
),
pPresScriptEmptyElemTokenMap
(
0
),
pPresTableElemTokenMap
(
0
),
pPresLayoutAttrTokenMap
(
0
),
pFencedAttrTokenMap
(
0
),
pOperatorAttrTokenMap
(
0
),
pColorTokenMap
(
0
),
bSuccess
(
sal_False
)
{}
SmXMLImport
(
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
frame
::
XModel
>
&
rModel
,
const
rtl
::
OUString
&
rFileName
)
:
SvXMLImport
(
rModel
)
,
pMathElemTokenMap
(
0
),
pPresLayoutElemTokenMap
(
0
),
pPresElemTokenMap
(
0
),
pPresScriptEmptyElemTokenMap
(
0
),
pPresTableElemTokenMap
(
0
),
pPresLayoutAttrTokenMap
(
0
),
pFencedAttrTokenMap
(
0
),
pOperatorAttrTokenMap
(
0
),
pColorTokenMap
(
0
)
pOperatorAttrTokenMap
(
0
),
pColorTokenMap
(
0
)
,
bSuccess
(
sal_False
)
{}
void
SAL_CALL
endDocument
(
void
)
throw
(
::
com
::
sun
::
star
::
xml
::
sax
::
SAXException
,
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
sal_Int64
SAL_CALL
getSomething
(
const
::
com
::
sun
::
star
::
uno
::
Sequence
<
sal_Int8
>&
rId
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
static
const
::
com
::
sun
::
star
::
uno
::
Sequence
<
sal_Int8
>
&
getUnoTunnelId
()
throw
();
SvXMLImportContext
*
CreateContext
(
sal_uInt16
nPrefix
,
const
rtl
::
OUString
&
rLocalName
,
const
com
::
sun
::
star
::
uno
::
Reference
<
...
...
@@ -233,6 +246,7 @@ public:
virtual
~
SmXMLImport
();
SmNodeStack
&
GetNodeStack
()
{
return
aNodeStack
;}
SmNode
*
GetTree
()
{
return
aNodeStack
.
Pop
();}
sal_Bool
GetSuccess
()
{
return
bSuccess
;
}
private
:
SvXMLTokenMap
*
pMathElemTokenMap
;
SvXMLTokenMap
*
pPresLayoutElemTokenMap
;
...
...
@@ -245,6 +259,7 @@ private:
SvXMLTokenMap
*
pColorTokenMap
;
SmNodeStack
aNodeStack
;
sal_Bool
bSuccess
;
};
enum
SmXMLMathElemTokenMap
...
...
@@ -322,10 +337,11 @@ enum SmXMLOperatorAttrTokenMap
class
SmXMLExport
:
public
SvXMLExport
{
public
:
SmXMLExport
();
SmXMLExport
(
const
SmNode
*
pIn
,
const
rtl
::
OUString
&
rFileName
,
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
xml
::
sax
::
XDocumentHandler
>
&
rHandler
)
:
SvXMLExport
(
rFileName
,
rHandler
),
pTree
(
pIn
)
{}
SvXMLExport
(
rFileName
,
rHandler
),
pTree
(
pIn
)
,
bSuccess
(
sal_False
)
{}
virtual
~
SmXMLExport
()
{};
void
_ExportAutoStyles
()
{}
...
...
@@ -333,6 +349,13 @@ public:
void
_ExportContent
();
sal_uInt32
exportDoc
(
const
sal_Char
*
pClass
);
sal_Int64
SAL_CALL
getSomething
(
const
::
com
::
sun
::
star
::
uno
::
Sequence
<
sal_Int8
>&
rId
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
static
const
::
com
::
sun
::
star
::
uno
::
Sequence
<
sal_Int8
>
&
getUnoTunnelId
()
throw
();
sal_Bool
GetSuccess
()
{
return
bSuccess
;}
protected
:
void
ExportNodes
(
const
SmNode
*
pIn
,
int
nLevel
);
void
ExportTable
(
const
SmNode
*
pIn
,
int
nLevel
);
...
...
@@ -353,5 +376,6 @@ protected:
void
ExportMatrix
(
const
SmNode
*
pNode
,
int
nLevel
);
private
:
const
SmNode
*
pTree
;
sal_Bool
bSuccess
;
};
#endif
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