summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorRob Snelders <programming@ertai.nl>2011-10-20 21:25:46 +0200
committerStephan Bergmann <sbergman@redhat.com>2011-10-20 23:04:13 +0200
commit638804f7e2c26047da15af26dfb8eb35b9ee0feb (patch)
treeeb4f9723e24b263ceb9a62e1175e0542d0f6efd6 /sw
parentfecde94354a46463d346a1a78962f39a5a6f9eb8 (diff)
Added a scanbutton to the scan-dialog
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/pch/precompiled_sw.hxx2
-rw-r--r--sw/inc/swmodule.hxx6
-rw-r--r--sw/source/ui/app/swmodule.cxx6
-rw-r--r--sw/source/ui/uiview/uivwimp.cxx10
-rw-r--r--sw/source/ui/uiview/view.cxx4
5 files changed, 15 insertions, 13 deletions
diff --git a/sw/inc/pch/precompiled_sw.hxx b/sw/inc/pch/precompiled_sw.hxx
index bc40045e9695..b154f630f1b4 100644
--- a/sw/inc/pch/precompiled_sw.hxx
+++ b/sw/inc/pch/precompiled_sw.hxx
@@ -271,7 +271,7 @@
#include "com/sun/star/packages/WrongPasswordException.hpp"
#include "com/sun/star/packages/zip/ZipIOException.hpp"
#include "com/sun/star/scanner/ScannerContext.hpp"
-#include "com/sun/star/scanner/XScannerManager.hpp"
+#include "com/sun/star/scanner/XScannerManager2.hpp"
#include "com/sun/star/script/XEventAttacher.hpp"
#include "com/sun/star/script/XEventAttacherManager.hpp"
#include "com/sun/star/script/XLibraryContainer.hpp"
diff --git a/sw/inc/swmodule.hxx b/sw/inc/swmodule.hxx
index dd2b27c72341..763923725958 100644
--- a/sw/inc/swmodule.hxx
+++ b/sw/inc/swmodule.hxx
@@ -72,7 +72,7 @@ struct SwDBData;
#define VIEWOPT_DEST_VIEW_ONLY 3 //ViewOptions are set only at ::com::sun::star::sdbcx::View, not at the appl.
namespace com{ namespace sun{ namespace star{ namespace scanner{
- class XScannerManager;
+ class XScannerManager2;
}}}}
class SW_DLLPUBLIC SwModule: public SfxModule, public SfxListener, public utl::ConfigurationListener
@@ -113,7 +113,7 @@ class SW_DLLPUBLIC SwModule: public SfxModule, public SfxListener, public utl::C
::com::sun::star::uno::Reference<
::com::sun::star::linguistic2::XLinguServiceEventListener > xLngSvcEvtListener;
::com::sun::star::uno::Reference<
- ::com::sun::star::scanner::XScannerManager > m_xScannerManager;
+ ::com::sun::star::scanner::XScannerManager2 > m_xScannerManager;
::com::sun::star::uno::Reference<
::com::sun::star::linguistic2::XLanguageGuessing > m_xLanguageGuesser;
@@ -242,7 +242,7 @@ public:
void CreateLngSvcEvtListener();
::com::sun::star::uno::Reference<
- ::com::sun::star::scanner::XScannerManager >
+ ::com::sun::star::scanner::XScannerManager2 >
GetScannerManager();
::com::sun::star::uno::Reference<
diff --git a/sw/source/ui/app/swmodule.cxx b/sw/source/ui/app/swmodule.cxx
index 0e50081d9faf..4a663622a10b 100644
--- a/sw/source/ui/app/swmodule.cxx
+++ b/sw/source/ui/app/swmodule.cxx
@@ -65,7 +65,7 @@
#include <svx/extrusioncolorcontrol.hxx>
#include <svx/fontworkgallery.hxx>
#include <svx/modctrl.hxx>
-#include <com/sun/star/scanner/XScannerManager.hpp>
+#include <com/sun/star/scanner/XScannerManager2.hpp>
#include <com/sun/star/container/XSet.hpp>
#include <comphelper/processfactory.hxx>
#include <docsh.hxx>
@@ -215,7 +215,7 @@ SwModule::SwModule( SfxObjectFactory* pWebFact,
// at the view options.
GetColorConfig();
}
-uno::Reference< scanner::XScannerManager >
+uno::Reference< scanner::XScannerManager2 >
SwModule::GetScannerManager()
{
if (!m_xScannerManager.is())
@@ -225,7 +225,7 @@ SwModule::GetScannerManager()
if( xMgr.is() )
{
m_xScannerManager =
- uno::Reference< scanner::XScannerManager >(
+ uno::Reference< scanner::XScannerManager2 >(
xMgr->createInstance(
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
"com.sun.star.scanner.ScannerManager")) ),
diff --git a/sw/source/ui/uiview/uivwimp.cxx b/sw/source/ui/uiview/uivwimp.cxx
index aff53fe8f20a..b2faff69d654 100644
--- a/sw/source/ui/uiview/uivwimp.cxx
+++ b/sw/source/ui/uiview/uivwimp.cxx
@@ -33,7 +33,7 @@
#include "globals.hrc"
#include <tools/shl.hxx>
-#include <com/sun/star/scanner/XScannerManager.hpp>
+#include <com/sun/star/scanner/XScannerManager2.hpp>
#include <com/sun/star/datatransfer/clipboard/XClipboardNotifier.hpp>
#include <com/sun/star/datatransfer/clipboard/XClipboard.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
@@ -131,19 +131,21 @@ void SwView_Impl::ExecuteScan( SfxRequest& rReq )
case SID_TWAIN_SELECT:
{
sal_Bool bDone = sal_False;
- Reference< XScannerManager > xScanMgr = SW_MOD()->GetScannerManager();
+ Reference< XScannerManager2 > xScanMgr = SW_MOD()->GetScannerManager();
if( xScanMgr.is() )
{
try
{
+ SwScannerEventListener& rListener = GetScannerEventListener();
const Sequence< ScannerContext >
aContexts( xScanMgr->getAvailableScanners() );
if( aContexts.getLength() )
{
+ Reference< XEventListener > xLstner = &rListener;
ScannerContext aContext( aContexts.getConstArray()[ 0 ] );
- bDone = xScanMgr->configureScanner( aContext );
+ bDone = xScanMgr->configureScannerAndScan( aContext, xLstner );
}
}
catch(...)
@@ -164,7 +166,7 @@ void SwView_Impl::ExecuteScan( SfxRequest& rReq )
{
sal_Bool bDone = sal_False;
- Reference< XScannerManager > xScanMgr = SW_MOD()->GetScannerManager();
+ Reference< XScannerManager2 > xScanMgr = SW_MOD()->GetScannerManager();
if( xScanMgr.is() )
{
SwScannerEventListener& rListener = GetScannerEventListener();
diff --git a/sw/source/ui/uiview/view.cxx b/sw/source/ui/uiview/view.cxx
index 9ddbc8c9f2a5..d9cbad6720e8 100644
--- a/sw/source/ui/uiview/view.cxx
+++ b/sw/source/ui/uiview/view.cxx
@@ -98,7 +98,7 @@
#include <editeng/unolingu.hxx>
#include <com/sun/star/frame/FrameSearchFlag.hpp>
#include <com/sun/star/scanner/ScannerContext.hpp>
-#include <com/sun/star/scanner/XScannerManager.hpp>
+#include <com/sun/star/scanner/XScannerManager2.hpp>
#include <toolkit/unohlp.hxx>
#include <rtl/ustrbuf.hxx>
#include <sax/tools/converter.hxx>
@@ -1682,7 +1682,7 @@ void SwView::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
void SwView::ScannerEventHdl( const EventObject& /*rEventObject*/ )
{
- uno::Reference< XScannerManager > xScanMgr = SW_MOD()->GetScannerManager();
+ uno::Reference< XScannerManager2 > xScanMgr = SW_MOD()->GetScannerManager();
if( xScanMgr.is() )
{
const ScannerContext aContext( xScanMgr->getAvailableScanners().getConstArray()[ 0 ] );