diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2012-03-16 14:57:51 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-03-16 15:01:26 +0100 |
commit | 32a5ad89a505be22fb8ca0b990a8991a7de6453a (patch) | |
tree | cd0006b3b8de687280056f9de769e531f0206fc5 /svtools | |
parent | Introduced SystemShellExecuteFlags::URIS_ONLY (diff) | |
download | core-32a5ad89a505be22fb8ca0b990a8991a7de6453a.tar.gz core-32a5ad89a505be22fb8ca0b990a8991a7de6453a.zip |
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).
Diffstat (limited to 'svtools')
-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 d7a56796a608..1486fb2a8590 100644 --- a/svtools/source/misc/templatefoldercache.cxx +++ b/svtools/source/misc/templatefoldercache.cxx @@ -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(); |