diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2009-01-21 15:28:14 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2009-01-21 15:28:14 +0000 |
commit | df3e716b3c4313d9c495c64aa7d84082fb9596e7 (patch) | |
tree | 8e3a7cf6d42a453c65d6e8a4b8da54a810cc9153 /sfx2/source/doc | |
parent | da2cac30aada8a34b7edfe56298fd873e1cd3d71 (diff) |
CWS-TOOLING: integrate CWS fwk95
2009-01-15 13:24:14 +0100 cd r266366 : #i96390# Change method name to use UNO AWT style for mnemonics
2009-01-15 13:23:30 +0100 cd r266365 : #i96390# Change method name to use UNO AWT style for mnemonics
2009-01-12 17:25:13 +0100 cd r266174 : #i97983# Check pointer returned by dynamic_cast
2009-01-12 15:31:40 +0100 cd r266162 : #i97983# Create toolkit popup menus via service manager instead of implementation class
2008-12-11 15:04:34 +0100 cd r265305 : #i95863# Remove user defined properties
2008-12-11 14:56:45 +0100 cd r265302 : #i95606# Update documentation for textfields
2008-12-11 10:06:20 +0100 cd r265250 : #i96390# Fix warning on Solaris compiler
2008-12-09 17:27:32 +0100 cd r265119 : CWS-TOOLING: rebase CWS fwk95 to trunk@264807 (milestone: DEV300:m37)
2008-12-01 13:29:43 +0100 cd r264597 : #i96390# New interfaces and structures for complete UNO AWT menu API
2008-12-01 13:25:22 +0100 cd r264596 : #i96390# Added implementation of the new UNO AWT interfaces and structures for menus
2008-11-28 13:55:19 +0100 cd r264553 : #i96640# Fixed wrong property type for MenuBarCloser
2008-11-28 13:53:56 +0100 cd r264552 : #i96621# Fixed ambiguous usage of && and ||
2008-11-18 16:05:45 +0100 cd r263781 : #i95316# Initialize SvtTabAppearanceCfg to enable system settings changed notiifcation code
2008-11-18 16:05:43 +0100 cd r263780 : #i96155# Fix wrong statement to check for enabled argument
2008-10-20 16:54:37 +0200 cd r262328 : #i10000# migrate CWS fwk95 to SVN.
Diffstat (limited to 'sfx2/source/doc')
-rw-r--r-- | sfx2/source/doc/objserv.cxx | 23 | ||||
-rw-r--r-- | sfx2/source/doc/sfxbasemodel.cxx | 33 |
2 files changed, 26 insertions, 30 deletions
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx index b84e988ec9fd..95640642f565 100644 --- a/sfx2/source/doc/objserv.cxx +++ b/sfx2/source/doc/objserv.cxx @@ -51,15 +51,11 @@ #include <comphelper/processfactory.hxx> #include <com/sun/star/security/CertificateValidity.hpp> -#ifndef _COM_SUN_STAR_SECURITY_DOCUMENTSIGNATURESINFORMATION_HPP_ #include <com/sun/star/security/DocumentSignatureInformation.hpp> -#endif #include <com/sun/star/security/XDocumentDigitalSignatures.hpp> #include <tools/urlobj.hxx> #include <svtools/whiter.hxx> -#ifndef _MSGBOX_HXX //autogen #include <vcl/msgbox.hxx> -#endif #include <svtools/intitem.hxx> #include <svtools/eitem.hxx> #include <vcl/wrkwin.hxx> @@ -106,13 +102,9 @@ #include <com/sun/star/document/XDocumentSubStorageSupplier.hpp> #include <com/sun/star/embed/XTransactedObject.hpp> #include <com/sun/star/util/XCloneable.hpp> -#include <com/sun/star/document/XDocumentInfo.hpp> -#include <com/sun/star/document/XDocumentInfoSupplier.hpp> #include <com/sun/star/document/XDocumentProperties.hpp> -#ifndef _SFX_HELPID_HRC #include "helpid.hrc" -#endif #include "guisaveas.hxx" @@ -423,10 +415,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq) if ( pDocInfItem ) { // parameter, e.g. from replayed macro - uno::Reference<document::XDocumentInfoSupplier> xDIS( - GetModel(), uno::UNO_QUERY_THROW); - pDocInfItem->updateDocumentInfo(getDocProperties(), - xDIS->getDocumentInfo()); + pDocInfItem->updateDocumentInfo(getDocProperties()); SetUseUserData( pDocInfItem->IsUseUserData() ); } else @@ -467,10 +456,8 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq) aTitle = GetTitle(); } - uno::Reference<document::XDocumentInfoSupplier> xDIS( - GetModel(), uno::UNO_QUERY_THROW); SfxDocumentInfoItem aDocInfoItem( aURL, getDocProperties(), - xDIS->getDocumentInfo(), IsUseUserData() ); + IsUseUserData() ); if ( !GetSlotState( SID_DOCTEMPLATE ) ) // templates not supported aDocInfoItem.SetTemplate(FALSE); @@ -491,14 +478,12 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq) if ( pDocInfoItem ) { // user has done some changes to DocumentInfo - pDocInfoItem->updateDocumentInfo(getDocProperties(), - xDIS->getDocumentInfo()); + pDocInfoItem->updateDocumentInfo(getDocProperties()); SetUseUserData( ((const SfxDocumentInfoItem *)pDocInfoItem)->IsUseUserData() ); // add data from dialog for possible recording purposes rReq.AppendItem( SfxDocumentInfoItem( GetTitle(), - getDocProperties(), xDIS->getDocumentInfo(), - IsUseUserData() ) ); + getDocProperties(), IsUseUserData() ) ); } rReq.Done(); diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx index 588396fda97d..09dc93f53f36 100644 --- a/sfx2/source/doc/sfxbasemodel.cxx +++ b/sfx2/source/doc/sfxbasemodel.cxx @@ -2632,17 +2632,28 @@ void SfxBaseModel::impl_store( const ::rtl::OUString& sURL if ( bCopyTo ) { xOldDocProps = getDocumentProperties(); - xOldDocInfo = getDocumentInfo(); - Reference<util::XCloneable> xCloneable(xOldDocInfo, - UNO_QUERY_THROW); - Reference<document::XDocumentInfo> xNewDocInfo( - xCloneable->createClone(), UNO_QUERY_THROW); - Reference<document::XDocumentPropertiesSupplier> xDPS( - xNewDocInfo, UNO_QUERY_THROW); - Reference<document::XDocumentProperties> xNewDocProps( - xDPS->getDocumentProperties()); - m_pData->m_xDocumentProperties = xNewDocProps; - m_pData->m_xDocumentInfo = xNewDocInfo; + if (m_pData->m_xDocumentInfo.is()) + { + xOldDocInfo = getDocumentInfo(); + const Reference<util::XCloneable> xCloneable(xOldDocInfo, + UNO_QUERY_THROW); + const Reference<document::XDocumentInfo> xNewDocInfo( + xCloneable->createClone(), UNO_QUERY_THROW); + const Reference<document::XDocumentPropertiesSupplier> xDPS( + xNewDocInfo, UNO_QUERY_THROW); + const Reference<document::XDocumentProperties> xNewDocProps( + xDPS->getDocumentProperties()); + m_pData->m_xDocumentProperties = xNewDocProps; + m_pData->m_xDocumentInfo = xNewDocInfo; + } + else // try not to create DocumentInfo if it does not exist... + { + const Reference<util::XCloneable> xCloneable(xOldDocProps, + UNO_QUERY_THROW); + const Reference<document::XDocumentProperties> xNewDocProps( + xCloneable->createClone(), UNO_QUERY_THROW); + m_pData->m_xDocumentProperties = xNewDocProps; + } } sal_Bool bRet = m_pData->m_pObjectShell->APISaveAs_Impl( sURL, aParams ); |