diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2012-03-16 14:57:51 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2012-03-19 10:46:45 +0000 |
commit | ec752de623f4f7c7e297422730f193034e21f93f (patch) | |
tree | 3333fc4cc076d61928a5ffe85144073839da4315 /svtools/source/misc | |
parent | 8d7726c6a54cd65700f4d3183baef7800aaeced5 (diff) |
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).
Signed-off-by: Michael Meeks <michael.meeks@suse.com>
Diffstat (limited to 'svtools/source/misc')
-rw-r--r-- | svtools/source/misc/templatefoldercache.cxx | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/svtools/source/misc/templatefoldercache.cxx b/svtools/source/misc/templatefoldercache.cxx index 41f0af0839cd..d5325f448c9c 100644 --- a/svtools/source/misc/templatefoldercache.cxx +++ b/svtools/source/misc/templatefoldercache.cxx @@ -695,6 +695,17 @@ namespace svt { String sTemplatePath( aDirs.GetToken( i, ';' ) ); 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(); |