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
629001d4
Kaydet (Commit)
629001d4
authored
Haz 15, 2012
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fdo#50087 fix RTF import of Title, Subject, Comments document properties
Change-Id: I3358fad4949c2c21ecf63983a36b7c8428df9f06
üst
fa200682
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
43 additions
and
1 deletion
+43
-1
fdo50087.rtf
sw/qa/extras/rtfexport/data/fdo50087.rtf
+8
-0
rtfexport.cxx
sw/qa/extras/rtfexport/rtfexport.cxx
+13
-0
rtfdocumentimpl.cxx
writerfilter/source/rtftok/rtfdocumentimpl.cxx
+18
-0
rtfdocumentimpl.hxx
writerfilter/source/rtftok/rtfdocumentimpl.hxx
+4
-1
No files found.
sw/qa/extras/rtfexport/data/fdo50087.rtf
0 → 100644
Dosyayı görüntüle @
629001d4
{\rtf1
{\info
{\title Title}
{\subject Subject}
{\doccomm First line.\'0aSecond line.}
}
\par
}
sw/qa/extras/rtfexport/rtfexport.cxx
Dosyayı görüntüle @
629001d4
...
@@ -47,6 +47,7 @@ public:
...
@@ -47,6 +47,7 @@ public:
void
testFdo38176
();
void
testFdo38176
();
void
testFdo49683
();
void
testFdo49683
();
void
testFdo44174
();
void
testFdo44174
();
void
testFdo50087
();
CPPUNIT_TEST_SUITE
(
Test
);
CPPUNIT_TEST_SUITE
(
Test
);
#if !defined(MACOSX) && !defined(WNT)
#if !defined(MACOSX) && !defined(WNT)
...
@@ -54,6 +55,7 @@ public:
...
@@ -54,6 +55,7 @@ public:
CPPUNIT_TEST
(
testFdo38176
);
CPPUNIT_TEST
(
testFdo38176
);
CPPUNIT_TEST
(
testFdo49683
);
CPPUNIT_TEST
(
testFdo49683
);
CPPUNIT_TEST
(
testFdo44174
);
CPPUNIT_TEST
(
testFdo44174
);
CPPUNIT_TEST
(
testFdo50087
);
#endif
#endif
CPPUNIT_TEST_SUITE_END
();
CPPUNIT_TEST_SUITE_END
();
...
@@ -116,6 +118,17 @@ void Test::testFdo44174()
...
@@ -116,6 +118,17 @@ void Test::testFdo44174()
CPPUNIT_ASSERT_EQUAL
(
OUString
(
"First Page"
),
aValue
);
CPPUNIT_ASSERT_EQUAL
(
OUString
(
"First Page"
),
aValue
);
}
}
void
Test
::
testFdo50087
()
{
roundtrip
(
"fdo50087.rtf"
);
uno
::
Reference
<
document
::
XDocumentPropertiesSupplier
>
xDocumentPropertiesSupplier
(
mxComponent
,
uno
::
UNO_QUERY
);
uno
::
Reference
<
document
::
XDocumentProperties
>
xDocumentProperties
(
xDocumentPropertiesSupplier
->
getDocumentProperties
());
CPPUNIT_ASSERT_EQUAL
(
OUString
(
"Title"
),
xDocumentProperties
->
getTitle
());
CPPUNIT_ASSERT_EQUAL
(
OUString
(
"Subject"
),
xDocumentProperties
->
getSubject
());
CPPUNIT_ASSERT_EQUAL
(
OUString
(
"First line.
\n
Second line."
),
xDocumentProperties
->
getDescription
());
}
CPPUNIT_TEST_SUITE_REGISTRATION
(
Test
);
CPPUNIT_TEST_SUITE_REGISTRATION
(
Test
);
CPPUNIT_PLUGIN_IMPLEMENT
();
CPPUNIT_PLUGIN_IMPLEMENT
();
...
...
writerfilter/source/rtftok/rtfdocumentimpl.cxx
Dosyayı görüntüle @
629001d4
...
@@ -968,6 +968,9 @@ void RTFDocumentImpl::text(OUString& rString)
...
@@ -968,6 +968,9 @@ void RTFDocumentImpl::text(OUString& rString)
case
DESTINATION_FALT
:
case
DESTINATION_FALT
:
case
DESTINATION_PARAGRAPHNUMBERING_TEXTAFTER
:
case
DESTINATION_PARAGRAPHNUMBERING_TEXTAFTER
:
case
DESTINATION_PARAGRAPHNUMBERING_TEXTBEFORE
:
case
DESTINATION_PARAGRAPHNUMBERING_TEXTBEFORE
:
case
DESTINATION_TITLE
:
case
DESTINATION_SUBJECT
:
case
DESTINATION_DOCCOMM
:
m_aStates
.
top
().
aDestinationText
.
append
(
rString
);
m_aStates
.
top
().
aDestinationText
.
append
(
rString
);
break
;
break
;
case
DESTINATION_EQINSTRUCTION
:
case
DESTINATION_EQINSTRUCTION
:
...
@@ -1377,6 +1380,15 @@ int RTFDocumentImpl::dispatchDestination(RTFKeyword nKeyword)
...
@@ -1377,6 +1380,15 @@ int RTFDocumentImpl::dispatchDestination(RTFKeyword nKeyword)
case
RTF_PNTXTB
:
case
RTF_PNTXTB
:
m_aStates
.
top
().
nDestinationState
=
DESTINATION_PARAGRAPHNUMBERING_TEXTBEFORE
;
m_aStates
.
top
().
nDestinationState
=
DESTINATION_PARAGRAPHNUMBERING_TEXTBEFORE
;
break
;
break
;
case
RTF_TITLE
:
m_aStates
.
top
().
nDestinationState
=
DESTINATION_TITLE
;
break
;
case
RTF_SUBJECT
:
m_aStates
.
top
().
nDestinationState
=
DESTINATION_SUBJECT
;
break
;
case
RTF_DOCCOMM
:
m_aStates
.
top
().
nDestinationState
=
DESTINATION_DOCCOMM
;
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
...
@@ -3275,6 +3287,12 @@ int RTFDocumentImpl::popState()
...
@@ -3275,6 +3287,12 @@ int RTFDocumentImpl::popState()
m_xDocumentProperties
->
setKeywords
(
comphelper
::
string
::
convertCommaSeparated
(
m_aStates
.
top
().
aDestinationText
.
makeStringAndClear
()));
m_xDocumentProperties
->
setKeywords
(
comphelper
::
string
::
convertCommaSeparated
(
m_aStates
.
top
().
aDestinationText
.
makeStringAndClear
()));
else
if
(
m_aStates
.
top
().
nDestinationState
==
DESTINATION_COMMENT
&&
m_xDocumentProperties
.
is
())
else
if
(
m_aStates
.
top
().
nDestinationState
==
DESTINATION_COMMENT
&&
m_xDocumentProperties
.
is
())
m_xDocumentProperties
->
setGenerator
(
m_aStates
.
top
().
aDestinationText
.
makeStringAndClear
());
m_xDocumentProperties
->
setGenerator
(
m_aStates
.
top
().
aDestinationText
.
makeStringAndClear
());
else
if
(
m_aStates
.
top
().
nDestinationState
==
DESTINATION_TITLE
&&
m_xDocumentProperties
.
is
())
m_xDocumentProperties
->
setTitle
(
m_aStates
.
top
().
aDestinationText
.
makeStringAndClear
());
else
if
(
m_aStates
.
top
().
nDestinationState
==
DESTINATION_SUBJECT
&&
m_xDocumentProperties
.
is
())
m_xDocumentProperties
->
setSubject
(
m_aStates
.
top
().
aDestinationText
.
makeStringAndClear
());
else
if
(
m_aStates
.
top
().
nDestinationState
==
DESTINATION_DOCCOMM
&&
m_xDocumentProperties
.
is
())
m_xDocumentProperties
->
setDescription
(
m_aStates
.
top
().
aDestinationText
.
makeStringAndClear
());
else
if
(
m_aStates
.
top
().
nDestinationState
==
DESTINATION_OPERATOR
else
if
(
m_aStates
.
top
().
nDestinationState
==
DESTINATION_OPERATOR
||
m_aStates
.
top
().
nDestinationState
==
DESTINATION_COMPANY
)
||
m_aStates
.
top
().
nDestinationState
==
DESTINATION_COMPANY
)
{
{
...
...
writerfilter/source/rtftok/rtfdocumentimpl.hxx
Dosyayı görüntüle @
629001d4
...
@@ -114,7 +114,10 @@ namespace writerfilter {
...
@@ -114,7 +114,10 @@ namespace writerfilter {
DESTINATION_DRAWINGOBJECT
,
DESTINATION_DRAWINGOBJECT
,
DESTINATION_PARAGRAPHNUMBERING
,
DESTINATION_PARAGRAPHNUMBERING
,
DESTINATION_PARAGRAPHNUMBERING_TEXTBEFORE
,
DESTINATION_PARAGRAPHNUMBERING_TEXTBEFORE
,
DESTINATION_PARAGRAPHNUMBERING_TEXTAFTER
DESTINATION_PARAGRAPHNUMBERING_TEXTAFTER
,
DESTINATION_TITLE
,
DESTINATION_SUBJECT
,
DESTINATION_DOCCOMM
};
};
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