summaryrefslogtreecommitdiff
path: root/sw/source/core/fields/authfld.cxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2021-07-21 14:52:05 +0200
committerMiklos Vajna <vmiklos@collabora.com>2021-07-21 16:42:48 +0200
commit3b2b2eae863d1082a36c02851190e0846f90cdd1 (patch)
treeda877b3ed5f2e80bc5b939c97828572e4d80cc7e /sw/source/core/fields/authfld.cxx
parent37247ffb6f255ca7f96c6110149bcf85a2cddd44 (diff)
sw bibliography, local copy: add document model & UNO API
The idea is that a bibliography entry (field) can have not only an URL (which might be unavailable due to lack of network connectivity, paywall, etc) but also a local copy, which is also a URL. The local copy doesn't replace the original URL. The local copy is stored part of the document, since it may be a relative URL, e.g. ODT + several PDFs copied around in the same directory. This commit just starts this feature, up to the extent that read and write of the new property works. Change-Id: I3c4df2be3a1f3b02a87c097f8a0630951def09d0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119322 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'sw/source/core/fields/authfld.cxx')
-rw-r--r--sw/source/core/fields/authfld.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/sw/source/core/fields/authfld.cxx b/sw/source/core/fields/authfld.cxx
index 7a2dea545ab9..fec3e1a2b4c4 100644
--- a/sw/source/core/fields/authfld.cxx
+++ b/sw/source/core/fields/authfld.cxx
@@ -678,7 +678,8 @@ const char* const aFieldNames[] =
"Custom3",
"Custom4",
"Custom5",
- "ISBN"
+ "ISBN",
+ "LocalURL"
};
void SwAuthEntry::dumpAsXml(xmlTextWriterPtr pWriter) const
@@ -736,7 +737,7 @@ bool SwAuthorityField::PutValue( const Any& rAny, sal_uInt16 /*nWhichId*/ )
return false;
OUStringBuffer sBuf;
- comphelper::string::padToLength(sBuf, AUTH_FIELD_ISBN, TOX_STYLE_DELIMITER);
+ comphelper::string::padToLength(sBuf, AUTH_FIELD_LOCAL_URL, TOX_STYLE_DELIMITER);
OUString sToSet(sBuf.makeStringAndClear());
for(const PropertyValue& rParam : std::as_const(aParam))
{