Revert "tdf#107784: DOCX Import: Show citation's title in fields"
This reverts commit 417d993b8b
.
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>
This commit is contained in:
Binary file not shown.
@@ -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
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user