diff options
Diffstat (limited to 'include/uno')
-rw-r--r-- | include/uno/environment.hxx | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/uno/environment.hxx b/include/uno/environment.hxx index 8a836148677a..e8b99a6ec14d 100644 --- a/include/uno/environment.hxx +++ b/include/uno/environment.hxx @@ -94,6 +94,11 @@ public: */ inline Environment( const Environment & rEnv ); +#if defined LIBO_INTERNAL_ONLY + Environment(Environment && other): _pEnv(other._pEnv) + { other._pEnv = nullptr; } +#endif + /** Destructor: releases a set environment. */ inline ~Environment(); @@ -112,6 +117,17 @@ public: inline Environment & SAL_CALL operator = ( const Environment & rEnv ) { return operator = ( rEnv._pEnv ); } +#if defined LIBO_INTERNAL_ONLY + Environment & operator =(Environment && other) { + if (_pEnv != nullptr) { + (*_pEnv->release)(_pEnv); + } + _pEnv = other._pEnv; + other._pEnv = nullptr; + return *this; + } +#endif + /** Provides UNacquired pointer to the set C environment. @return UNacquired pointer to the C environment struct |