summaryrefslogtreecommitdiff
path: root/embeddedobj/source/inc
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2006-02-01 18:37:47 +0000
committerKurt Zenker <kz@openoffice.org>2006-02-01 18:37:47 +0000
commit2d366fab97b997887fa05d0dcaab78eeca31d45d (patch)
tree968a0fb549e9968ff17023e5cd521a621b50f1ea /embeddedobj/source/inc
parent0635120bc459d02193eb2bb40d0717e064d92aca (diff)
INTEGRATION: CWS mav19 (1.18.10); FILE MERGED
2006/01/10 13:41:23 mav 1.18.10.7: #i52224# avoid using of STAMPIT workaround for other objects 2005/12/12 12:23:53 mav 1.18.10.6: #i52224# fix typo 2005/12/09 13:33:35 mav 1.18.10.5: #i52224# handle the STAMPIT case correctly 2005/12/08 15:27:03 mav 1.18.10.4: #i52224# handle STAMPIT correctly 2005/12/02 09:44:38 mav 1.18.10.3: #i52224# add method 2005/11/17 18:16:25 mav 1.18.10.2: RESYNC: (1.18-1.19); FILE MERGED 2005/11/16 10:03:27 mav 1.18.10.1: #i52224# handle object size and resizing correctly
Diffstat (limited to 'embeddedobj/source/inc')
-rw-r--r--embeddedobj/source/inc/oleembobj.hxx60
1 files changed, 56 insertions, 4 deletions
diff --git a/embeddedobj/source/inc/oleembobj.hxx b/embeddedobj/source/inc/oleembobj.hxx
index 314a02be4bed..375d4e3d8568 100644
--- a/embeddedobj/source/inc/oleembobj.hxx
+++ b/embeddedobj/source/inc/oleembobj.hxx
@@ -4,9 +4,9 @@
*
* $RCSfile: oleembobj.hxx,v $
*
- * $Revision: 1.20 $
+ * $Revision: 1.21 $
*
- * last change: $Author: obo $ $Date: 2006-01-20 09:51:18 $
+ * last change: $Author: kz $ $Date: 2006-02-01 19:37:47 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -83,10 +83,48 @@
#include <cppuhelper/implbase3.hxx>
#endif
+#include <osl/thread.h>
+
namespace cppu {
class OMultiTypeInterfaceContainerHelper;
}
+class VerbExecutionController
+{
+ // the following mutex is allowed to be locked only for variables initialization, so no deadlock can be caused
+ ::osl::Mutex m_aVerbExecutionMutex;
+
+ sal_Bool m_bVerbExecutionInProgress;
+ oslThreadIdentifier m_nVerbExecutionThreadIdentifier;
+ sal_Bool m_bChangedOnVerbExecution;
+
+ sal_Bool m_bWasEverActive;
+ sal_Int32 m_nNotificationLock;
+
+public:
+
+ VerbExecutionController()
+ : m_bVerbExecutionInProgress( sal_False )
+ , m_nVerbExecutionThreadIdentifier( 0 )
+ , m_bChangedOnVerbExecution( sal_False )
+ , m_bWasEverActive( sal_False )
+ , m_nNotificationLock( 0 )
+ {}
+
+ void StartControlExecution();
+ sal_Bool EndControlExecution_WasModified();
+ void ModificationNotificationIsDone();
+
+ void LockNotification();
+ void UnlockNotification();
+
+ // no need to lock anything to check the value of the numeric members
+ sal_Bool CanDoNotification() { return ( !m_bVerbExecutionInProgress && !m_bWasEverActive && !m_nNotificationLock ); }
+ // ... or to change it
+ void ObjectIsActive() { m_bWasEverActive = sal_True; }
+};
+
+
class OleComponent;
class OwnView_Impl;
class OleEmbeddedObject : public ::cppu::WeakImplHelper3
@@ -137,10 +175,14 @@ class OleEmbeddedObject : public ::cppu::WeakImplHelper3
// TODO/LATER: may need to cache more than one aspect in future
sal_Bool m_bHasCachedSize; // the object has cached size
- sal_Bool m_bHasSizeToSet; // the object has cached size that should be set to OLE component
::com::sun::star::awt::Size m_aCachedSize;
sal_Int64 m_nCachedAspect;
+ sal_Bool m_bHasSizeToSet; // the object has cached size that should be set to OLE component
+ ::com::sun::star::awt::Size m_aSizeToSet; // this size might be different from the cached one ( scaling is applied )
+ sal_Int64 m_nAspectToSet;
+
+
// cache the status of the object
// TODO/LATER: may need to cache more than one aspect in future
sal_Bool m_bGotStatus;
@@ -161,10 +203,20 @@ class OleEmbeddedObject : public ::cppu::WeakImplHelper3
// whether the object should be initialized from clipboard in case of default initialization
sal_Bool m_bFromClipboard;
- ::rtl::OUString m_aTempURL;
+ // STAMPIT solution
+ // the following member is used during verb execution to detect whether the verb execution modifies the object
+ VerbExecutionController m_aVerbExecutionController;
protected:
+ ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream > TryToGetAcceptableFormat_Impl(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream >& xStream )
+ throw ( ::com::sun::star::uno::Exception );
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream > GetNewFilledTempStream_Impl(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& xInStream )
+ throw( ::com::sun::star::io::IOException );
+
void SwitchComponentToRunningState_Impl();
void MakeEventListenerNotification_Impl( const ::rtl::OUString& aEventName );