summaryrefslogtreecommitdiff
path: root/extensions/source/scanner/scanwin.cxx
diff options
context:
space:
mode:
authorPhilipp Lohmann [pl] <Philipp.Lohmann@Sun.COM>2010-07-13 13:59:19 +0200
committerPhilipp Lohmann [pl] <Philipp.Lohmann@Sun.COM>2010-07-13 13:59:19 +0200
commit72b6551726a28f5f4daed12d8fc86170c78e7105 (patch)
treeec4888de5b3bff6ebca481303bdf92036398a34e /extensions/source/scanner/scanwin.cxx
parent95cb2b30e3c6323b51dae8fc396c63a17b97ce82 (diff)
vcl113: #i113117# cleanup object life cycle (thanks cmc!)
Diffstat (limited to 'extensions/source/scanner/scanwin.cxx')
-rw-r--r--extensions/source/scanner/scanwin.cxx12
1 files changed, 8 insertions, 4 deletions
diff --git a/extensions/source/scanner/scanwin.cxx b/extensions/source/scanner/scanwin.cxx
index e14fffa87d0c..d779065c58cd 100644
--- a/extensions/source/scanner/scanwin.cxx
+++ b/extensions/source/scanner/scanwin.cxx
@@ -887,7 +887,11 @@ static Twain aTwain;
// - ScannerManager -
// ------------------
-void ScannerManager::DestroyData()
+void ScannerManager::AcquireData()
+{
+}
+
+void ScannerManager::ReleaseData()
{
if( mpData )
{
@@ -979,7 +983,7 @@ SEQ( sal_Int8 ) ScannerManager::getDIB() throw()
}
GlobalUnlock( hDIB );
- DestroyData();
+ ReleaseData();
}
return aRet;
@@ -1009,7 +1013,7 @@ BOOL SAL_CALL ScannerManager::configureScanner( ScannerContext& rContext )
if( rContext.InternalData != 0 || rContext.ScannerName != ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "TWAIN" ) ) )
throw ScannerException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Scanner does not exist" ) ), xThis, ScanError_InvalidContext );
- DestroyData();
+ ReleaseData();
return aTwain.SelectSource( *this );
}
@@ -1025,7 +1029,7 @@ void SAL_CALL ScannerManager::startScan( const ScannerContext& rContext, const u
if( rContext.InternalData != 0 || rContext.ScannerName != ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "TWAIN" ) ) )
throw ScannerException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Scanner does not exist" ) ), xThis, ScanError_InvalidContext );
- DestroyData();
+ ReleaseData();
aTwain.PerformTransfer( *this, rxListener );
}