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
71ccb4b0
Kaydet (Commit)
71ccb4b0
authored
Mar 29, 2013
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
implement RtfAttributeOutput::PlaceholderField
Change-Id: Ib6fd380736c5567a98317ec117969d8c76a31f02
üst
3f4d1e17
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
2 deletions
+16
-2
placeholder.odt
sw/qa/extras/rtfexport/data/placeholder.odt
+0
-0
rtfexport.cxx
sw/qa/extras/rtfexport/rtfexport.cxx
+11
-0
rtfattributeoutput.cxx
sw/source/filter/ww8/rtfattributeoutput.cxx
+5
-2
No files found.
sw/qa/extras/rtfexport/data/placeholder.odt
0 → 100644
Dosyayı görüntüle @
71ccb4b0
File added
sw/qa/extras/rtfexport/rtfexport.cxx
Dosyayı görüntüle @
71ccb4b0
...
...
@@ -72,6 +72,7 @@ public:
void
testFdo52286
();
void
testFdo61507
();
void
testFdo30983
();
void
testPlaceholder
();
CPPUNIT_TEST_SUITE
(
Test
);
#if !defined(MACOSX) && !defined(WNT)
...
...
@@ -118,6 +119,7 @@ void Test::run()
{
"fdo52286.odt"
,
&
Test
::
testFdo52286
},
{
"fdo61507.rtf"
,
&
Test
::
testFdo61507
},
{
"fdo30983.rtf"
,
&
Test
::
testFdo30983
},
{
"placeholder.odt"
,
&
Test
::
testPlaceholder
},
};
// Don't test the first import of these, for some reason those tests fail
const
char
*
aBlacklist
[]
=
{
...
...
@@ -495,6 +497,15 @@ void Test::testFdo30983()
CPPUNIT_ASSERT_EQUAL
(
text
::
RelOrientation
::
PAGE_FRAME
,
getProperty
<
sal_Int16
>
(
xDraws
->
getByIndex
(
0
),
"VertOrientRelation"
));
}
void
Test
::
testPlaceholder
()
{
// Only the field text was exported, make sure we still have a field with the correct Hint text.
uno
::
Reference
<
text
::
XTextRange
>
xRun
(
getRun
(
getParagraph
(
1
),
2
));
CPPUNIT_ASSERT_EQUAL
(
OUString
(
"TextField"
),
getProperty
<
OUString
>
(
xRun
,
"TextPortionType"
));
uno
::
Reference
<
beans
::
XPropertySet
>
xField
=
getProperty
<
uno
::
Reference
<
beans
::
XPropertySet
>
>
(
xRun
,
"TextField"
);
CPPUNIT_ASSERT_EQUAL
(
OUString
(
"place holder"
),
getProperty
<
OUString
>
(
xField
,
"Hint"
));
}
CPPUNIT_TEST_SUITE_REGISTRATION
(
Test
);
CPPUNIT_PLUGIN_IMPLEMENT
();
...
...
sw/source/filter/ww8/rtfattributeoutput.cxx
Dosyayı görüntüle @
71ccb4b0
...
...
@@ -3074,9 +3074,12 @@ bool RtfAttributeOutput::DropdownField( const SwField* /*pFld*/ )
return
true
;
}
bool
RtfAttributeOutput
::
PlaceholderField
(
const
SwField
*
)
bool
RtfAttributeOutput
::
PlaceholderField
(
const
SwField
*
pField
)
{
return
true
;
// expand to text?
m_aRunText
->
append
(
"{"
OOO_STRING_SVTOOLS_RTF_FIELD
"{"
OOO_STRING_SVTOOLS_RTF_IGNORE
OOO_STRING_SVTOOLS_RTF_FLDINST
" MACROBUTTON None "
);
RunText
(
pField
->
GetPar1
());
m_aRunText
->
append
(
"}}"
);
return
false
;
// do not expand
}
RtfAttributeOutput
::
RtfAttributeOutput
(
RtfExport
&
rExport
)
...
...
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