summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2008-04-15 13:05:07 +0000
committerVladimir Glazounov <vg@openoffice.org>2008-04-15 13:05:07 +0000
commite0dde1636b36f72779041b3c30dbbc97ebb327f0 (patch)
treecb53f302ee174389e8179bd3b109fca770a8b356
parent90fc26db3a85fbbc33f45e41629df8a53af0e5f3 (diff)
INTEGRATION: CWS calcshare2 (1.5.252); FILE MERGED
2008/03/25 10:41:56 mav 1.5.252.1: #i85794# set the default answer for the interaction in case of API call with no InteractionHandler
-rw-r--r--framework/source/interaction/stillinteraction.cxx17
1 files changed, 16 insertions, 1 deletions
diff --git a/framework/source/interaction/stillinteraction.cxx b/framework/source/interaction/stillinteraction.cxx
index 156baf9c8b39..278053d6f6bb 100644
--- a/framework/source/interaction/stillinteraction.cxx
+++ b/framework/source/interaction/stillinteraction.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: stillinteraction.cxx,v $
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
* This file is part of OpenOffice.org.
*
@@ -50,6 +50,10 @@
#include <com/sun/star/document/AmbigousFilterRequest.hpp>
#include <com/sun/star/task/ErrorCodeRequest.hpp>
+#ifndef _COM_SUN_STAR_DOCUMENT_LOCKEDDOCUMENTREQUEST_HPP_
+#include <com/sun/star/document/LockedDocumentRequest.hpp>
+#endif
+
//_________________________________________________________________________________________________________________
// other includes
//_________________________________________________________________________________________________________________
@@ -128,6 +132,7 @@ void SAL_CALL StillInteraction::handle( const css::uno::Reference< css::task::XI
// and other ones (ambigous but not unknown filter ...)
css::task::ErrorCodeRequest aErrorCodeRequest ;
css::document::AmbigousFilterRequest aAmbigousFilterRequest;
+ css::document::LockedDocumentRequest aLockedDocumentRequest;
if (aRequest>>=aAmbigousFilterRequest)
{
@@ -151,6 +156,16 @@ void SAL_CALL StillInteraction::handle( const css::uno::Reference< css::task::XI
xAbort->select();
}
else
+ if( aRequest >>= aLockedDocumentRequest )
+ {
+ // the locked document should be opened readonly by default
+ if (xApprove.is())
+ xApprove->select();
+ else
+ if (xAbort.is())
+ xAbort->select();
+ }
+ else
if (xAbort.is())
xAbort->select();
}