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
8299924b
Kaydet (Commit)
8299924b
authored
Kas 18, 2013
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
cp#1000018 RTF export: avoid additional paragraph at footnote end
Change-Id: I430a7d705208f197050a7d521c9c20b267c33f26
üst
86fd7fd4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
4 deletions
+20
-4
rtfexport.cxx
sw/qa/extras/rtfexport/rtfexport.cxx
+2
-1
rtfattributeoutput.cxx
sw/source/filter/ww8/rtfattributeoutput.cxx
+12
-2
rtfexport.cxx
sw/source/filter/ww8/rtfexport.cxx
+4
-1
rtfexport.hxx
sw/source/filter/ww8/rtfexport.hxx
+2
-0
No files found.
sw/qa/extras/rtfexport/rtfexport.cxx
Dosyayı görüntüle @
8299924b
...
...
@@ -341,10 +341,11 @@ DECLARE_RTFEXPORT_TEST(testFdo53113, "fdo53113.odt")
DECLARE_RTFEXPORT_TEST
(
testFdo55939
,
"fdo55939.odt"
)
{
// The problem was that the exported RTF was invalid.
// Also, the 'Footnote text.' had an additional newline at its end.
uno
::
Reference
<
text
::
XTextRange
>
xParagraph
(
getParagraph
(
1
));
getRun
(
xParagraph
,
1
,
"Main text before footnote."
);
// Why the tab has to be removed here?
CPPUNIT_ASSERT_EQUAL
(
OUString
(
"Footnote text.
\n
"
),
CPPUNIT_ASSERT_EQUAL
(
OUString
(
"Footnote text."
),
getProperty
<
uno
::
Reference
<
text
::
XTextRange
>
>
(
getRun
(
xParagraph
,
2
),
"Footnote"
)
->
getText
()
->
getString
().
replaceAll
(
"
\t
"
,
""
));
getRun
(
xParagraph
,
3
,
" Text after the footnote."
);
// However, this leading space is intentional and OK.
}
...
...
sw/source/filter/ww8/rtfattributeoutput.cxx
Dosyayı görüntüle @
8299924b
...
...
@@ -297,6 +297,12 @@ void RtfAttributeOutput::StartParagraph( ww8::WW8TableNodeInfo::Pointer_t pTextN
void
RtfAttributeOutput
::
EndParagraph
(
ww8
::
WW8TableNodeInfoInner
::
Pointer_t
pTextNodeInfoInner
)
{
SAL_INFO
(
"sw.rtf"
,
OSL_THIS_FUNC
);
bool
bLastPara
=
false
;
if
(
m_rExport
.
nTxtTyp
==
TXT_FTN
||
m_rExport
.
nTxtTyp
==
TXT_EDN
)
{
// We're ending a paragraph that is the last paragraph of a footnote or endnote.
bLastPara
=
m_rExport
.
m_nCurrentNodeIndex
&&
m_rExport
.
m_nCurrentNodeIndex
==
m_rExport
.
pCurPam
->
End
()
->
nNode
.
GetIndex
();
}
FinishTableRowCell
(
pTextNodeInfoInner
);
...
...
@@ -309,8 +315,12 @@ void RtfAttributeOutput::EndParagraph( ww8::WW8TableNodeInfoInner::Pointer_t pTe
else
{
aParagraph
->
append
(
SAL_NEWLINE_STRING
);
aParagraph
->
append
(
OOO_STRING_SVTOOLS_RTF_PAR
);
aParagraph
->
append
(
' '
);
// RTF_PAR at the end of the footnote would cause an additional empty paragraph.
if
(
!
bLastPara
)
{
aParagraph
->
append
(
OOO_STRING_SVTOOLS_RTF_PAR
);
aParagraph
->
append
(
' '
);
}
}
if
(
m_nColBreakNeeded
)
{
...
...
sw/source/filter/ww8/rtfexport.cxx
Dosyayı görüntüle @
8299924b
...
...
@@ -765,8 +765,10 @@ void RtfExport::OutputLinkedOLE( const OUString& )
void
RtfExport
::
OutputTextNode
(
const
SwTxtNode
&
rNode
)
{
m_nCurrentNodeIndex
=
rNode
.
GetIndex
();
if
(
!
m_bOutOutlineOnly
||
rNode
.
IsOutline
(
)
)
MSWordExportBase
::
OutputTextNode
(
rNode
);
m_nCurrentNodeIndex
=
0
;
}
void
RtfExport
::
AppendSection
(
const
SwPageDesc
*
pPageDesc
,
const
SwSectionFmt
*
pFmt
,
sal_uLong
nLnNum
)
...
...
@@ -789,7 +791,8 @@ RtfExport::RtfExport( RtfExportFilter *pFilter, SwDoc *pDocument, SwPaM *pCurren
rtl_getTextEncodingFromWindowsCharset
(
sw
::
ms
::
rtl_TextEncodingToWinCharset
(
DEF_ENCODING
))),
eCurrentEncoding
(
eDefaultEncoding
),
bRTFFlySyntax
(
false
)
bRTFFlySyntax
(
false
),
m_nCurrentNodeIndex
(
0
)
{
mbExportModeRTF
=
true
;
// the attribute output for the document
...
...
sw/source/filter/ww8/rtfexport.hxx
Dosyayı görüntüle @
8299924b
...
...
@@ -148,6 +148,8 @@ public:
rtl_TextEncoding
eCurrentEncoding
;
/// This is used by OutputFlyFrame_Impl() to control the written syntax
bool
bRTFFlySyntax
;
/// Index of the current SwTxtNode, if any.
sal_uLong
m_nCurrentNodeIndex
;
SvStream
&
Strm
();
SvStream
&
OutULong
(
sal_uLong
nVal
);
...
...
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