summaryrefslogtreecommitdiff
path: root/svtools/source/misc/templatefoldercache.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svtools/source/misc/templatefoldercache.cxx')
-rw-r--r--svtools/source/misc/templatefoldercache.cxx11
1 files changed, 7 insertions, 4 deletions
diff --git a/svtools/source/misc/templatefoldercache.cxx b/svtools/source/misc/templatefoldercache.cxx
index a6c3617b50a7..3c118445c6f4 100644
--- a/svtools/source/misc/templatefoldercache.cxx
+++ b/svtools/source/misc/templatefoldercache.cxx
@@ -116,8 +116,8 @@ namespace svt
//=====================================================================
struct TemplateContent;
typedef ::std::vector< ::vos::ORef< TemplateContent > > TemplateFolderContent;
- typedef TemplateFolderContent::const_iterator ConstFolderIterator;
- typedef TemplateFolderContent::iterator FolderIterator;
+ typedef TemplateFolderContent::const_iterator ConstFolderIterator;
+ typedef TemplateFolderContent::iterator FolderIterator;
/** a struct describing one content in one of the template dirs (or at least it's relevant aspects)
*/
@@ -706,15 +706,18 @@ namespace svt
m_aCurrentState.swap( aTemplateFolderContent );
// the template directories from the config
- String aDirs = SvtPathOptions().GetTemplatePath();
+ const SvtPathOptions aPathOptions;
+ String aDirs = aPathOptions.GetTemplatePath();
sal_uInt16 nDirs = aDirs.GetTokenCount( ';' );
m_aCurrentState.reserve( nDirs );
// loop through all the root-level template folders
for ( sal_uInt16 i=0; i<nDirs; ++i)
{
+ String sTemplatePath( aDirs.GetToken( i, ';' ) );
+ sTemplatePath = aPathOptions.ExpandMacros( sTemplatePath );
// create a new entry
- m_aCurrentState.push_back( new TemplateContent( INetURLObject( aDirs.GetToken( i, ';' ) ) ) );
+ m_aCurrentState.push_back( new TemplateContent( INetURLObject( sTemplatePath ) ) );
TemplateFolderContent::iterator aCurrentRoot = m_aCurrentState.end();
--aCurrentRoot;