Kaydet (Commit) 32a5ad89 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

fdo#37593 Make sure needsUpdate compares canonicalized paths

...so that it does not erroneously always claim an update is needed, so that
SvtDocumentTemplateDialog::UpdateHdl_Impl does not always jump back to
OpenTemplateRoot() shortly after opening the dialog (and thus jumps away from
the last remembered folder).
üst d4b67611
......@@ -693,6 +693,17 @@ namespace svt
{
String sTemplatePath( aDirs.getToken(0, ';', nIndex) );
sTemplatePath = aPathOptions.ExpandMacros( sTemplatePath );
// Make sure excess ".." path segments (from expanding bootstrap
// variables in paths) are normalized in the same way they are
// normalized for paths read from the .templdir.cache file (where
// paths have gone through makeRelocatable URL on writing out and
// then through makeAbsoluteURL when reading back in), as otherwise
// equalStates() in needsUpdate() could erroneously consider
// m_aCurrentState and m_aPreviousState as different:
sTemplatePath = getOfficeInstDirs()->makeAbsoluteURL(
getOfficeInstDirs()->makeRelocatableURL(sTemplatePath));
// create a new entry
m_aCurrentState.push_back( new TemplateContent( INetURLObject( sTemplatePath ) ) );
TemplateFolderContent::iterator aCurrentRoot = m_aCurrentState.end();
......
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