summaryrefslogtreecommitdiff
path: root/svtools/source
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-07-04 13:13:30 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-07-05 06:32:27 +0000
commitdac06d9cb05552022ef8ee958c75297ed58c01b8 (patch)
tree6104c8e3c13d11e82295ebe480d2b43441a0b041 /svtools/source
parenta12955be5bcfab3dda482a562eed66d7b0ffd996 (diff)
merge svt::StoreString with svt::StoreContentURL
Change-Id: I6f2a7102c697cecc96e8b950b499bc9b0f91240e Reviewed-on: https://gerrit.libreoffice.org/26904 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'svtools/source')
-rw-r--r--svtools/source/misc/templatefoldercache.cxx19
1 files changed, 3 insertions, 16 deletions
diff --git a/svtools/source/misc/templatefoldercache.cxx b/svtools/source/misc/templatefoldercache.cxx
index b9ca359dd8ea..1b74149e271a 100644
--- a/svtools/source/misc/templatefoldercache.cxx
+++ b/svtools/source/misc/templatefoldercache.cxx
@@ -254,22 +254,9 @@ namespace svt
};
- /// functor which allows storing a string
- struct StoreString
- :public ::std::unary_function< OUString, void >
- ,public StorageHelper
- {
- explicit StoreString( SvStream& _rStorage ) : StorageHelper( _rStorage ) { }
-
- void operator() ( const OUString& _rString ) const
- {
- m_rStorage.WriteUniOrByteString( _rString, m_rStorage.GetStreamCharSet() );
- }
- };
-
struct StoreContentURL
:public ::std::unary_function< ::rtl::Reference< TemplateContent >, void >
- ,public StoreString
+ ,public StorageHelper
{
uno::Reference< util::XOfficeInstallationDirectories > m_xOfficeInstDirs;
@@ -277,7 +264,7 @@ namespace svt
const uno::Reference<
util::XOfficeInstallationDirectories > &
xOfficeInstDirs )
- : StoreString( _rStorage ), m_xOfficeInstDirs( xOfficeInstDirs ) { }
+ : StorageHelper( _rStorage ), m_xOfficeInstDirs( xOfficeInstDirs ) { }
void operator() ( const ::rtl::Reference< TemplateContent >& _rxContent ) const
{
@@ -286,7 +273,7 @@ namespace svt
// #116281# Keep office installtion relocatable. Never store
// any direct references to office installation directory.
sURL = m_xOfficeInstDirs->makeRelocatableURL( sURL );
- StoreString::operator() ( sURL );
+ m_rStorage.WriteUniOrByteString( sURL, m_rStorage.GetStreamCharSet() );
}
};