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
75bcb45a
Kaydet (Commit)
75bcb45a
authored
Tem 17, 2012
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
implement import of RTF_ATRFSTART, RTF_ATRFEND and RTF_ATNID
Change-Id: I1dc3d3a33dcad2707468b1bfc1baa5239fddee05
üst
b8146f51
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
50 additions
and
4 deletions
+50
-4
rtfdocumentimpl.cxx
writerfilter/source/rtftok/rtfdocumentimpl.cxx
+45
-3
rtfdocumentimpl.hxx
writerfilter/source/rtftok/rtfdocumentimpl.hxx
+5
-1
No files found.
writerfilter/source/rtftok/rtfdocumentimpl.cxx
Dosyayı görüntüle @
75bcb45a
...
...
@@ -280,6 +280,11 @@ void RTFDocumentImpl::setAuthor(rtl::OUString& rAuthor)
m_aAuthor
=
rAuthor
;
}
void
RTFDocumentImpl
::
setAuthorInitials
(
rtl
::
OUString
&
rAuthorInitials
)
{
m_aAuthorInitials
=
rAuthorInitials
;
}
bool
RTFDocumentImpl
::
isSubstream
()
const
{
return
m_pSuperstream
!=
0
;
...
...
@@ -320,6 +325,11 @@ void RTFDocumentImpl::resolveSubstream(sal_uInt32 nPos, Id nId, OUString& rIgnor
pImpl
->
setAuthor
(
m_aAuthor
);
m_aAuthor
=
OUString
();
}
if
(
!
m_aAuthorInitials
.
isEmpty
())
{
pImpl
->
setAuthorInitials
(
m_aAuthorInitials
);
m_aAuthorInitials
=
OUString
();
}
pImpl
->
seek
(
nPos
);
SAL_INFO
(
"writerfilter"
,
"substream start"
);
Mapper
().
substream
(
nId
,
pImpl
);
...
...
@@ -932,6 +942,7 @@ void RTFDocumentImpl::text(OUString& rString)
case
DESTINATION_TITLE
:
case
DESTINATION_SUBJECT
:
case
DESTINATION_DOCCOMM
:
case
DESTINATION_ATNID
:
m_aStates
.
top
().
aDestinationText
.
append
(
rString
);
break
;
case
DESTINATION_EQINSTRUCTION
:
...
...
@@ -1240,11 +1251,19 @@ int RTFDocumentImpl::dispatchDestination(RTFKeyword nKeyword)
else
{
// If there is an author set, emit it now.
if
(
!
m_aAuthor
.
isEmpty
())
if
(
!
m_aAuthor
.
isEmpty
()
||
!
m_aAuthorInitials
.
isEmpty
()
)
{
RTFValue
::
Pointer_t
pValue
(
new
RTFValue
(
m_aAuthor
));
RTFSprms
aAttributes
;
aAttributes
.
set
(
NS_ooxml
::
LN_CT_TrackChange_author
,
pValue
);
if
(
!
m_aAuthor
.
isEmpty
())
{
RTFValue
::
Pointer_t
pValue
(
new
RTFValue
(
m_aAuthor
));
aAttributes
.
set
(
NS_ooxml
::
LN_CT_TrackChange_author
,
pValue
);
}
if
(
!
m_aAuthorInitials
.
isEmpty
())
{
RTFValue
::
Pointer_t
pValue
(
new
RTFValue
(
m_aAuthorInitials
));
aAttributes
.
set
(
NS_ooxml
::
LN_CT_Comment_initials
,
pValue
);
}
writerfilter
::
Reference
<
Properties
>::
Pointer_t
const
pProperties
(
new
RTFReferenceProperties
(
aAttributes
));
Mapper
().
props
(
pProperties
);
}
...
...
@@ -1350,6 +1369,27 @@ int RTFDocumentImpl::dispatchDestination(RTFKeyword nKeyword)
case
RTF_DOCCOMM
:
m_aStates
.
top
().
nDestinationState
=
DESTINATION_DOCCOMM
;
break
;
case
RTF_ATRFSTART
:
case
RTF_ATRFEND
:
{
// We could send the real value here, but that would make the
// tokenizer more complicated, and dmapper doesn't read the
// result anyway.
RTFValue
::
Pointer_t
pValue
(
new
RTFValue
(
0
));
m_aStates
.
top
().
nDestinationState
=
DESTINATION_SKIP
;
RTFSprms
aAttributes
;
if
(
nKeyword
==
RTF_ATRFSTART
)
aAttributes
.
set
(
NS_ooxml
::
LN_EG_RangeMarkupElements_commentRangeStart
,
pValue
);
else
aAttributes
.
set
(
NS_ooxml
::
LN_EG_RangeMarkupElements_commentRangeEnd
,
pValue
);
writerfilter
::
Reference
<
Properties
>::
Pointer_t
const
pProperties
(
new
RTFReferenceProperties
(
aAttributes
));
Mapper
().
props
(
pProperties
);
}
break
;
case
RTF_ATNID
:
m_aStates
.
top
().
nDestinationState
=
DESTINATION_ATNID
;
break
;
default
:
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
...
...
@@ -3365,6 +3405,8 @@ int RTFDocumentImpl::popState()
}
else
if
(
m_aStates
.
top
().
nDestinationState
==
DESTINATION_ANNOTATIONAUTHOR
)
m_aAuthor
=
m_aStates
.
top
().
aDestinationText
.
makeStringAndClear
();
else
if
(
m_aStates
.
top
().
nDestinationState
==
DESTINATION_ATNID
)
m_aAuthorInitials
=
m_aStates
.
top
().
aDestinationText
.
makeStringAndClear
();
else
if
(
m_aStates
.
top
().
nDestinationState
==
DESTINATION_FALT
)
{
OUString
aStr
(
m_aStates
.
top
().
aDestinationText
.
makeStringAndClear
());
...
...
writerfilter/source/rtftok/rtfdocumentimpl.hxx
Dosyayı görüntüle @
75bcb45a
...
...
@@ -117,7 +117,8 @@ namespace writerfilter {
DESTINATION_PARAGRAPHNUMBERING_TEXTAFTER
,
DESTINATION_TITLE
,
DESTINATION_SUBJECT
,
DESTINATION_DOCCOMM
DESTINATION_DOCCOMM
,
DESTINATION_ATNID
};
enum
RTFBorderState
...
...
@@ -355,6 +356,7 @@ namespace writerfilter {
void
setSubstream
(
bool
bIsSubtream
);
void
setSuperstream
(
RTFDocumentImpl
*
pSuperstream
);
void
setAuthor
(
rtl
::
OUString
&
rAuthor
);
void
setAuthorInitials
(
rtl
::
OUString
&
rAuthorInitials
);
bool
isSubstream
()
const
;
void
finishSubstream
();
void
setIgnoreFirst
(
rtl
::
OUString
&
rIgnoreFirst
);
...
...
@@ -481,6 +483,8 @@ namespace writerfilter {
std
::
map
<
int
,
rtl
::
OUString
>
m_aAuthors
;
/// Annotation author of the next annotation.
rtl
::
OUString
m_aAuthor
;
/// Initials of author of the next annotation.
rtl
::
OUString
m_aAuthorInitials
;
RTFSprms
m_aFormfieldSprms
;
RTFSprms
m_aFormfieldAttributes
;
...
...
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