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
c7d59029
Kaydet (Commit)
c7d59029
authored
Tem 23, 2012
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
implement import of RTF_{MD,MDPR,MBEGCHR,MENDCHR}
Change-Id: Ie671977d523e1fb7142f62ca2d8d47e65082d3fd
üst
43e4ae79
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
4 deletions
+38
-4
rtfdocumentimpl.cxx
writerfilter/source/rtftok/rtfdocumentimpl.cxx
+33
-3
rtfdocumentimpl.hxx
writerfilter/source/rtftok/rtfdocumentimpl.hxx
+5
-1
No files found.
writerfilter/source/rtftok/rtfdocumentimpl.cxx
Dosyayı görüntüle @
c7d59029
...
@@ -952,6 +952,8 @@ void RTFDocumentImpl::text(OUString& rString)
...
@@ -952,6 +952,8 @@ void RTFDocumentImpl::text(OUString& rString)
case
DESTINATION_ATNID
:
case
DESTINATION_ATNID
:
case
DESTINATION_MR
:
case
DESTINATION_MR
:
case
DESTINATION_MCHR
:
case
DESTINATION_MCHR
:
case
DESTINATION_MBEGCHR
:
case
DESTINATION_MENDCHR
:
m_aStates
.
top
().
aDestinationText
.
append
(
rString
);
m_aStates
.
top
().
aDestinationText
.
append
(
rString
);
break
;
break
;
case
DESTINATION_EQINSTRUCTION
:
case
DESTINATION_EQINSTRUCTION
:
...
@@ -1449,10 +1451,24 @@ int RTFDocumentImpl::dispatchDestination(RTFKeyword nKeyword)
...
@@ -1449,10 +1451,24 @@ int RTFDocumentImpl::dispatchDestination(RTFKeyword nKeyword)
case
RTF_MCHR
:
case
RTF_MCHR
:
m_aStates
.
top
().
nDestinationState
=
DESTINATION_MCHR
;
m_aStates
.
top
().
nDestinationState
=
DESTINATION_MCHR
;
break
;
break
;
case
RTF_MBEGCHR
:
m_aStates
.
top
().
nDestinationState
=
DESTINATION_MBEGCHR
;
break
;
case
RTF_MENDCHR
:
m_aStates
.
top
().
nDestinationState
=
DESTINATION_MENDCHR
;
break
;
case
RTF_ME
:
case
RTF_ME
:
m_aMathBuffer
.
appendOpeningTag
(
M_TOKEN
(
e
));
m_aMathBuffer
.
appendOpeningTag
(
M_TOKEN
(
e
));
m_aStates
.
top
().
nDestinationState
=
DESTINATION_ME
;
m_aStates
.
top
().
nDestinationState
=
DESTINATION_ME
;
break
;
break
;
case
RTF_MD
:
m_aMathBuffer
.
appendOpeningTag
(
M_TOKEN
(
d
));
m_aStates
.
top
().
nDestinationState
=
DESTINATION_MD
;
break
;
case
RTF_MDPR
:
m_aMathBuffer
.
appendOpeningTag
(
M_TOKEN
(
dPr
));
m_aStates
.
top
().
nDestinationState
=
DESTINATION_MDPR
;
break
;
default
:
default
:
SAL_INFO
(
"writerfilter"
,
OSL_THIS_FUNC
<<
": TODO handle destination '"
<<
lcl_RtfToString
(
nKeyword
)
<<
"'"
);
SAL_INFO
(
"writerfilter"
,
OSL_THIS_FUNC
<<
": TODO handle destination '"
<<
lcl_RtfToString
(
nKeyword
)
<<
"'"
);
// Make sure we skip destinations (even without \*) till we don't handle them
// Make sure we skip destinations (even without \*) till we don't handle them
...
@@ -3550,12 +3566,22 @@ int RTFDocumentImpl::popState()
...
@@ -3550,12 +3566,22 @@ int RTFDocumentImpl::popState()
m_aMathBuffer
.
appendClosingTag
(
M_TOKEN
(
acc
));
m_aMathBuffer
.
appendClosingTag
(
M_TOKEN
(
acc
));
else
if
(
m_aStates
.
top
().
nDestinationState
==
DESTINATION_MACCPR
)
else
if
(
m_aStates
.
top
().
nDestinationState
==
DESTINATION_MACCPR
)
m_aMathBuffer
.
appendClosingTag
(
M_TOKEN
(
accPr
));
m_aMathBuffer
.
appendClosingTag
(
M_TOKEN
(
accPr
));
else
if
(
m_aStates
.
top
().
nDestinationState
==
DESTINATION_MCHR
)
else
if
(
m_aStates
.
top
().
nDestinationState
==
DESTINATION_MCHR
||
m_aStates
.
top
().
nDestinationState
==
DESTINATION_MBEGCHR
||
m_aStates
.
top
().
nDestinationState
==
DESTINATION_MENDCHR
)
{
{
oox
::
formulaimport
::
XmlStream
::
AttributeList
aAttribs
;
oox
::
formulaimport
::
XmlStream
::
AttributeList
aAttribs
;
aAttribs
[
M_TOKEN
(
val
)]
=
m_aStates
.
top
().
aDestinationText
.
makeStringAndClear
();
aAttribs
[
M_TOKEN
(
val
)]
=
m_aStates
.
top
().
aDestinationText
.
makeStringAndClear
();
m_aMathBuffer
.
appendOpeningTag
(
M_TOKEN
(
chr
),
aAttribs
);
sal_Int32
nToken
=
0
;
m_aMathBuffer
.
appendClosingTag
(
M_TOKEN
(
chr
));
switch
(
m_aStates
.
top
().
nDestinationState
)
{
case
DESTINATION_MCHR
:
nToken
=
M_TOKEN
(
chr
);
break
;
case
DESTINATION_MBEGCHR
:
nToken
=
M_TOKEN
(
begChr
);
break
;
case
DESTINATION_MENDCHR
:
nToken
=
M_TOKEN
(
endChr
);
break
;
default:
break
;
}
m_aMathBuffer
.
appendOpeningTag
(
nToken
,
aAttribs
);
m_aMathBuffer
.
appendClosingTag
(
nToken
);
}
}
else
if
(
m_aStates
.
top
().
nDestinationState
==
DESTINATION_ME
)
else
if
(
m_aStates
.
top
().
nDestinationState
==
DESTINATION_ME
)
m_aMathBuffer
.
appendClosingTag
(
M_TOKEN
(
e
));
m_aMathBuffer
.
appendClosingTag
(
M_TOKEN
(
e
));
...
@@ -3563,6 +3589,10 @@ int RTFDocumentImpl::popState()
...
@@ -3563,6 +3589,10 @@ int RTFDocumentImpl::popState()
m_aMathBuffer
.
appendClosingTag
(
M_TOKEN
(
bar
));
m_aMathBuffer
.
appendClosingTag
(
M_TOKEN
(
bar
));
else
if
(
m_aStates
.
top
().
nDestinationState
==
DESTINATION_MBARPR
)
else
if
(
m_aStates
.
top
().
nDestinationState
==
DESTINATION_MBARPR
)
m_aMathBuffer
.
appendClosingTag
(
M_TOKEN
(
barPr
));
m_aMathBuffer
.
appendClosingTag
(
M_TOKEN
(
barPr
));
else
if
(
m_aStates
.
top
().
nDestinationState
==
DESTINATION_MD
)
m_aMathBuffer
.
appendClosingTag
(
M_TOKEN
(
d
));
else
if
(
m_aStates
.
top
().
nDestinationState
==
DESTINATION_MDPR
)
m_aMathBuffer
.
appendClosingTag
(
M_TOKEN
(
dPr
));
// See if we need to end a track change
// See if we need to end a track change
RTFValue
::
Pointer_t
pTrackchange
=
m_aStates
.
top
().
aCharacterSprms
.
find
(
NS_ooxml
::
LN_trackchange
);
RTFValue
::
Pointer_t
pTrackchange
=
m_aStates
.
top
().
aCharacterSprms
.
find
(
NS_ooxml
::
LN_trackchange
);
...
...
writerfilter/source/rtftok/rtfdocumentimpl.hxx
Dosyayı görüntüle @
c7d59029
...
@@ -132,7 +132,11 @@ namespace writerfilter {
...
@@ -132,7 +132,11 @@ namespace writerfilter {
DESTINATION_MCHR
,
DESTINATION_MCHR
,
DESTINATION_ME
,
DESTINATION_ME
,
DESTINATION_MBAR
,
DESTINATION_MBAR
,
DESTINATION_MBARPR
DESTINATION_MBARPR
,
DESTINATION_MD
,
DESTINATION_MDPR
,
DESTINATION_MBEGCHR
,
DESTINATION_MENDCHR
};
};
enum
RTFBorderState
enum
RTFBorderState
...
...
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