diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2007-06-26 15:10:07 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2007-06-26 15:10:07 +0000 |
commit | eaf4a7df2ade7008da032c58304255f9f6af2dc5 (patch) | |
tree | 533cc596604551f2d2d47163b29697ff04390423 /sfx2/source | |
parent | 19a07187ffa2ac60d4679c01209cbb85ce3b5560 (diff) |
INTEGRATION: CWS mav21 (1.120.20); FILE MERGED
2007/05/09 16:49:26 mav 1.120.20.3: RESYNC: (1.120-1.122); FILE MERGED
2006/12/13 14:24:21 mav 1.120.20.2: #i55790# fix modified state control
2006/12/05 15:17:22 mav 1.120.20.1: #i55790# allow more control over modified state
Diffstat (limited to 'sfx2/source')
-rw-r--r-- | sfx2/source/doc/sfxbasemodel.cxx | 55 |
1 files changed, 51 insertions, 4 deletions
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx index fe7fc314fe2e..2abc645204ec 100644 --- a/sfx2/source/doc/sfxbasemodel.cxx +++ b/sfx2/source/doc/sfxbasemodel.cxx @@ -4,9 +4,9 @@ * * $RCSfile: sfxbasemodel.cxx,v $ * - * $Revision: 1.123 $ + * $Revision: 1.124 $ * - * last change: $Author: ihi $ $Date: 2007-06-05 18:38:10 $ + * last change: $Author: hr $ $Date: 2007-06-26 16:10:07 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -717,7 +717,8 @@ ANY SAL_CALL SfxBaseModel::queryInterface( const UNOTYPE& rType ) throw( RUNTIME static_cast< XSTORABLE2* > ( this ) , static_cast< XMODULE* > ( this ) , static_cast< XMODEL2* > ( this ) , - static_cast< XSTORAGEBASEDDOCUMENT* > ( this ) ); + static_cast< XSTORAGEBASEDDOCUMENT* > ( this ) , + static_cast< XMODIFIABLE2* > ( this ) ); } // If searched interface supported by this class ... @@ -784,7 +785,7 @@ SEQUENCE< UNOTYPE > SAL_CALL SfxBaseModel::getTypes() throw( RUNTIMEEXCEPTION ) ::getCppuType(( const REFERENCE< XDOCUMENTINFOSUPPLIER >*)NULL ) , ::getCppuType(( const REFERENCE< XEVENTLISTENER >*)NULL ) , ::getCppuType(( const REFERENCE< XMODEL >*)NULL ) , - ::getCppuType(( const REFERENCE< XMODIFIABLE >*)NULL ) , + ::getCppuType(( const REFERENCE< XMODIFIABLE2 >*)NULL ) , ::getCppuType(( const REFERENCE< XPRINTABLE >*)NULL ) , ::getCppuType(( const REFERENCE< XSTORABLE2 >*)NULL ) , ::getCppuType(( const REFERENCE< XLOADABLE >*)NULL ) , @@ -1509,6 +1510,52 @@ REFERENCE< XINTERFACE > SAL_CALL SfxBaseModel::getCurrentSelection() throw(::com } //________________________________________________________________________________________________________ +// XModifiable2 +//________________________________________________________________________________________________________ + +sal_Bool SAL_CALL SfxBaseModel::disableSetModified() throw (::com::sun::star::uno::RuntimeException) +{ + ::vos::OGuard aGuard( Application::GetSolarMutex() ); + if ( impl_isDisposed() ) + throw DISPOSEDEXCEPTION(); + + if ( !m_pData->m_pObjectShell.Is() ) + throw uno::RuntimeException(); + + sal_Bool bResult = m_pData->m_pObjectShell->IsEnableSetModified(); + m_pData->m_pObjectShell->EnableSetModified( sal_False ); + + return bResult; +} + +sal_Bool SAL_CALL SfxBaseModel::enableSetModified() throw (::com::sun::star::uno::RuntimeException) +{ + ::vos::OGuard aGuard( Application::GetSolarMutex() ); + if ( impl_isDisposed() ) + throw DISPOSEDEXCEPTION(); + + if ( !m_pData->m_pObjectShell.Is() ) + throw uno::RuntimeException(); + + sal_Bool bResult = m_pData->m_pObjectShell->IsEnableSetModified(); + m_pData->m_pObjectShell->EnableSetModified( sal_True ); + + return bResult; +} + +sal_Bool SAL_CALL SfxBaseModel::isSetModifiedEnabled() throw (::com::sun::star::uno::RuntimeException) +{ + ::vos::OGuard aGuard( Application::GetSolarMutex() ); + if ( impl_isDisposed() ) + throw DISPOSEDEXCEPTION(); + + if ( !m_pData->m_pObjectShell.Is() ) + throw uno::RuntimeException(); + + return m_pData->m_pObjectShell->IsEnableSetModified(); +} + +//________________________________________________________________________________________________________ // XModifiable //________________________________________________________________________________________________________ |