diff options
author | Xisco Faulí <xiscofauli@libreoffice.org> | 2019-09-24 18:48:29 +0200 |
---|---|---|
committer | Xisco Faulí <xiscofauli@libreoffice.org> | 2019-09-24 20:59:51 +0200 |
commit | 332a37ebf3eeb7546ef0972035d72c6e836bcc7d (patch) | |
tree | c21435436bf4f065afffe88cdc4f244e17af7b48 /sw | |
parent | 3912f173c71e4e7449c59c57a027203967f45673 (diff) |
Revert "tdf#107784: DOCX Import: Show citation's title in fields"
This reverts commit 417d993b8b8a86c019758ee0850e4b42967e2afa.
it breaks the bibliography entries, so it needs more work than I initially thought. Reverting for the time being.
Change-Id: Idd75fd6794dedc5f2d4b7f1c262ba8d12aee5036
Reviewed-on: https://gerrit.libreoffice.org/79472
Tested-by: Jenkins
Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/ooxmlimport/data/tdf107784.docx | bin | 14852 -> 0 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 17 | ||||
-rw-r--r-- | sw/source/core/fields/fldbas.cxx | 2 |
3 files changed, 1 insertions, 18 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/tdf107784.docx b/sw/qa/extras/ooxmlimport/data/tdf107784.docx Binary files differdeleted file mode 100644 index 2dc868246ac0..000000000000 --- a/sw/qa/extras/ooxmlimport/data/tdf107784.docx +++ /dev/null diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index f5c85890e3b2..f90d894b0f1e 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -685,23 +685,6 @@ DECLARE_OOXMLIMPORT_TEST(testTdf105975formula, "tdf105975.docx") CPPUNIT_ASSERT_EQUAL(OUString("25"), xEnumerationAccess->getPresentation(false).trim()); } -DECLARE_OOXMLIMPORT_TEST(testTdf107784, "tdf107784.docx") -{ - // Make sure the field displays the citation's title and not the identifier - uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY); - uno::Reference<container::XEnumerationAccess> xFieldsAccess(xTextFieldsSupplier->getTextFields()); - uno::Reference<container::XEnumeration> xFields(xFieldsAccess->createEnumeration()); - - if( !xFields->hasMoreElements() ) { - CPPUNIT_ASSERT(false); - return; - } - - uno::Reference<text::XTextField> xEnumerationAccess(xFields->nextElement(), uno::UNO_QUERY); - CPPUNIT_ASSERT_EQUAL(OUString("Bibliography entry"), xEnumerationAccess->getPresentation(true).trim()); - CPPUNIT_ASSERT_EQUAL(OUString("(Smith, 1950)"), xEnumerationAccess->getPresentation(false).trim()); -} - DECLARE_OOXMLIMPORT_TEST(testTdf115883, "tdf115883.docx") { // Import failed due to an unhandled exception when getting the Surround diff --git a/sw/source/core/fields/fldbas.cxx b/sw/source/core/fields/fldbas.cxx index 0d8894141506..c46e5bfd3824 100644 --- a/sw/source/core/fields/fldbas.cxx +++ b/sw/source/core/fields/fldbas.cxx @@ -418,7 +418,7 @@ SwField::ExpandField(bool const bCached, SwRootFrame const*const pLayout) const if (GetTypeId() == SwFieldTypesEnum::Authority) { const SwAuthorityField* pAuthorityField = static_cast<const SwAuthorityField*>(this); - m_Cache = pAuthorityField->ExpandCitation(AUTH_FIELD_TITLE, pLayout); + m_Cache = pAuthorityField->ConditionalExpandAuthIdentifier(pLayout); } else m_Cache = ExpandImpl(pLayout); |