Kaydet (Commit) 97a8b3ed authored tarafından Eike Rathke's avatar Eike Rathke

Resolves: fdo#85617 always store fully encoded external document name

Also OOXML calls these API functions, this is the central place to handle it.
üst b6339617
......@@ -1709,7 +1709,8 @@ Reference< sheet::XExternalDocLink > SAL_CALL ScExternalDocLinksObj::addDocLink(
throw (RuntimeException, std::exception)
{
SolarMutexGuard aGuard;
sal_uInt16 nFileId = mpRefMgr->getExternalFileId(aDocName);
OUString aDocUrl( ScGlobal::GetAbsDocName( aDocName, mpDocShell));
sal_uInt16 nFileId = mpRefMgr->getExternalFileId(aDocUrl);
Reference< sheet::XExternalDocLink > aDocLink(new ScExternalDocLinkObj(mpDocShell, mpRefMgr, nFileId));
return aDocLink;
}
......@@ -1718,10 +1719,11 @@ Any SAL_CALL ScExternalDocLinksObj::getByName(const OUString &aName)
throw (container::NoSuchElementException, lang::WrappedTargetException, RuntimeException, std::exception)
{
SolarMutexGuard aGuard;
if (!mpRefMgr->hasExternalFile(aName))
OUString aDocUrl( ScGlobal::GetAbsDocName( aName, mpDocShell));
if (!mpRefMgr->hasExternalFile(aDocUrl))
throw container::NoSuchElementException();
sal_uInt16 nFileId = mpRefMgr->getExternalFileId(aName);
sal_uInt16 nFileId = mpRefMgr->getExternalFileId(aDocUrl);
Reference< sheet::XExternalDocLink > aDocLink(new ScExternalDocLinkObj(mpDocShell, mpRefMgr, nFileId));
Any aAny;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment