diff options
author | Michael Stahl <mstahl@redhat.com> | 2011-12-02 23:35:00 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2011-12-03 00:48:14 +0100 |
commit | c2d3f170fbe6ab553c50a0b9ba63a0496e1b24e0 (patch) | |
tree | 799d7528102e800835f184f4c7cb747978b0f809 /comphelper/source | |
parent | c9a1a2acd51224f525f6ed246e52511192215dc0 (diff) |
move LifecycleProxy out of comphelper::OStorageHelper
... so it can be forward declared
Diffstat (limited to 'comphelper/source')
-rw-r--r-- | comphelper/source/misc/storagehelper.cxx | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/comphelper/source/misc/storagehelper.cxx b/comphelper/source/misc/storagehelper.cxx index 6fb41c9cedb9..e429f2223069 100644 --- a/comphelper/source/misc/storagehelper.cxx +++ b/comphelper/source/misc/storagehelper.cxx @@ -545,10 +545,11 @@ sal_Bool OStorageHelper::PathHasSegment( const ::rtl::OUString& aPath, const ::r return bResult; } -class OStorageHelper::LifecycleProxyImpl : public std::vector< uno::Reference< embed::XStorage > > {}; -OStorageHelper::LifecycleProxy::LifecycleProxy() : - pBadness( new OStorageHelper::LifecycleProxyImpl() ) { } -OStorageHelper::LifecycleProxy::~LifecycleProxy() { delete pBadness; } +class LifecycleProxy::Impl + : public std::vector< uno::Reference< embed::XStorage > > {}; +LifecycleProxy::LifecycleProxy() + : m_pBadness( new Impl() ) { } +LifecycleProxy::~LifecycleProxy() { } static void splitPath( std::vector<rtl::OUString> &rElems, const ::rtl::OUString& rPath ) @@ -560,14 +561,14 @@ static void splitPath( std::vector<rtl::OUString> &rElems, static uno::Reference< embed::XStorage > LookupStorageAtPath( const uno::Reference< embed::XStorage > &xParentStorage, std::vector<rtl::OUString> &rElems, sal_uInt32 nOpenMode, - OStorageHelper::LifecycleProxy &rNastiness ) + LifecycleProxy &rNastiness ) { uno::Reference< embed::XStorage > xStorage( xParentStorage ); - rNastiness.pBadness->push_back( xStorage ); + rNastiness.m_pBadness->push_back( xStorage ); for( size_t i = 0; i < rElems.size() && xStorage.is(); i++ ) { xStorage = xStorage->openStorageElement( rElems[i], nOpenMode ); - rNastiness.pBadness->push_back( xStorage ); + rNastiness.m_pBadness->push_back( xStorage ); } return xStorage; } @@ -575,7 +576,7 @@ static uno::Reference< embed::XStorage > LookupStorageAtPath( uno::Reference< embed::XStorage > OStorageHelper::GetStorageAtPath( const uno::Reference< embed::XStorage > &xStorage, const ::rtl::OUString& rPath, sal_uInt32 nOpenMode, - OStorageHelper::LifecycleProxy &rNastiness ) + LifecycleProxy &rNastiness ) { std::vector<rtl::OUString> aElems; splitPath( aElems, rPath ); @@ -585,7 +586,7 @@ uno::Reference< embed::XStorage > OStorageHelper::GetStorageAtPath( uno::Reference< io::XStream > OStorageHelper::GetStreamAtPath( const uno::Reference< embed::XStorage > &xParentStorage, const ::rtl::OUString& rPath, sal_uInt32 nOpenMode, - OStorageHelper::LifecycleProxy &rNastiness ) + LifecycleProxy &rNastiness ) { std::vector<rtl::OUString> aElems; splitPath( aElems, rPath ); @@ -601,7 +602,7 @@ uno::Reference< io::XStream > OStorageHelper::GetStreamAtPath( uno::Reference< io::XStream > OStorageHelper::GetStreamAtPackageURL( uno::Reference< embed::XStorage > const& xParentStorage, const ::rtl::OUString& rURL, sal_uInt32 const nOpenMode, - OStorageHelper::LifecycleProxy & rNastiness) + LifecycleProxy & rNastiness) { static char const s_PkgScheme[] = "vnd.sun.star.Package:"; if (0 == rtl_ustr_ascii_shortenedCompareIgnoreAsciiCase_WithLength( |