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
f14e6e06
Kaydet (Commit)
f14e6e06
authored
Ara 16, 2014
tarafından
Michael Stahl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fdo#84685: writerfilter: RTF import: support \xe index entry
Change-Id: Ia957541a5997961aa86b2eb8537ebd29d3092691
üst
38b8c1e8
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
0 deletions
+36
-0
fdo84685.rtf
sw/qa/extras/rtfimport/data/fdo84685.rtf
+5
-0
rtfimport.cxx
sw/qa/extras/rtfimport/rtfimport.cxx
+12
-0
rtfcontrolwords.hxx
writerfilter/source/rtftok/rtfcontrolwords.hxx
+1
-0
rtfdocumentimpl.cxx
writerfilter/source/rtftok/rtfdocumentimpl.cxx
+18
-0
No files found.
sw/qa/extras/rtfimport/data/fdo84685.rtf
0 → 100644
Dosyayı görüntüle @
f14e6e06
{\rtf1\ansi\ansicpg1252\uc1
\pard
{\v {\xe {\v {\f0\fs20 Key the 1st}}}} Some text
\par
}
sw/qa/extras/rtfimport/rtfimport.cxx
Dosyayı görüntüle @
f14e6e06
...
...
@@ -33,6 +33,7 @@
#include <com/sun/star/text/SizeType.hpp>
#include <com/sun/star/text/TableColumnSeparator.hpp>
#include <com/sun/star/text/TextContentAnchorType.hpp>
#include <com/sun/star/text/XDocumentIndexMark.hpp>
#include <com/sun/star/text/XFootnotesSupplier.hpp>
#include <com/sun/star/text/XPageCursor.hpp>
#include <com/sun/star/text/XTextGraphicObjectsSupplier.hpp>
...
...
@@ -2083,6 +2084,17 @@ DECLARE_RTFIMPORT_TEST(testUnbalancedColumns, "unbalanced-columns.rtf")
CPPUNIT_ASSERT_EQUAL
(
true
,
getProperty
<
bool
>
(
xTextSections
->
getByIndex
(
0
),
"DontBalanceTextColumns"
));
}
DECLARE_RTFIMPORT_TEST
(
testFdo84685
,
"fdo84685.rtf"
)
{
// index mark was not imported
uno
::
Reference
<
text
::
XDocumentIndexMark
>
xMark
(
getProperty
<
uno
::
Reference
<
text
::
XDocumentIndexMark
>>
(
getRun
(
getParagraph
(
1
),
1
),
"DocumentIndexMark"
));
CPPUNIT_ASSERT
(
xMark
.
is
());
CPPUNIT_ASSERT_EQUAL
(
OUString
(
"Key the 1st"
),
getProperty
<
OUString
>
(
xMark
,
"PrimaryKey"
));
}
DECLARE_RTFIMPORT_TEST
(
testFdo83204
,
"fdo83204.rtf"
)
{
// This was Standard, \sN was ignored after \bkmkstart and \pard.
...
...
writerfilter/source/rtftok/rtfcontrolwords.hxx
Dosyayı görüntüle @
f14e6e06
...
...
@@ -149,6 +149,7 @@ enum RTFDestinationState
DESTINATION_BACKGROUND
,
DESTINATION_SHAPEGROUP
,
DESTINATION_FOOTNOTESEPARATOR
,
DESTINATION_INDEXENTRY
,
};
enum
RTFKeyword
...
...
writerfilter/source/rtftok/rtfdocumentimpl.cxx
Dosyayı görüntüle @
f14e6e06
...
...
@@ -1259,6 +1259,7 @@ void RTFDocumentImpl::text(OUString& rString)
case
DESTINATION_MSUPHIDE
:
case
DESTINATION_MTYPE
:
case
DESTINATION_MGROW
:
case
DESTINATION_INDEXENTRY
:
m_aStates
.
top
().
pDestinationText
->
append
(
rString
);
break
;
default
:
...
...
@@ -1729,6 +1730,9 @@ int RTFDocumentImpl::dispatchDestination(RTFKeyword nKeyword)
case
RTF_BKMKEND
:
m_aStates
.
top
().
nDestinationState
=
DESTINATION_BOOKMARKEND
;
break
;
case
RTF_XE
:
m_aStates
.
top
().
nDestinationState
=
DESTINATION_INDEXENTRY
;
break
;
case
RTF_REVTBL
:
m_aStates
.
top
().
nDestinationState
=
DESTINATION_REVISIONTABLE
;
break
;
...
...
@@ -5186,6 +5190,20 @@ int RTFDocumentImpl::popState()
Mapper
().
props
(
lcl_getBookmarkProperties
(
m_aBookmarks
[
aStr
],
aStr
));
}
break
;
case
DESTINATION_INDEXENTRY
:
{
if
(
&
m_aStates
.
top
().
aDestinationText
!=
m_aStates
.
top
().
pDestinationText
)
break
;
// not for nested group
OUString
str
(
m_aStates
.
top
().
pDestinationText
->
makeStringAndClear
());
// dmapper expects this as a field, so let's fake something...
str
=
"XE
\"
"
+
str
.
replaceAll
(
"
\"
"
,
"
\\\"
"
)
+
"
\"
"
;
singleChar
(
0x13
);
Mapper
().
utext
(
reinterpret_cast
<
sal_uInt8
const
*>
(
str
.
getStr
()),
str
.
getLength
());
singleChar
(
0x14
);
// no result
singleChar
(
0x15
);
}
break
;
case
DESTINATION_FORMFIELDNAME
:
{
if
(
&
m_aStates
.
top
().
aDestinationText
!=
m_aStates
.
top
().
pDestinationText
)
...
...
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