diff options
author | Niklas Nebel <nn@openoffice.org> | 2009-11-16 14:43:11 +0100 |
---|---|---|
committer | Niklas Nebel <nn@openoffice.org> | 2009-11-16 14:43:11 +0100 |
commit | 34f777379bac631ef96502ab88a950861a5154b9 (patch) | |
tree | 8b3da0279ee89594d64659ae4f6d9ad0a51697ed /sfx2/source/doc/guisaveas.cxx | |
parent | d2e7f677c5be667944bb2d873ada261dbefd5309 (diff) | |
parent | cc423d4be4338cbd81eed9f96f7c7a277da0ee88 (diff) |
validityref: merge with DEV300_m64
Diffstat (limited to 'sfx2/source/doc/guisaveas.cxx')
-rw-r--r-- | sfx2/source/doc/guisaveas.cxx | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx index c46a467fa41d..5916fb625787 100644 --- a/sfx2/source/doc/guisaveas.cxx +++ b/sfx2/source/doc/guisaveas.cxx @@ -87,6 +87,8 @@ #include <sfxtypes.hxx> #include "alienwarn.hxx" +#include "../appl/app.hrc" + #define DOCPROPSNUM 17 // flags that specify requested operation @@ -1227,7 +1229,8 @@ sal_Bool SfxStoringHelper::GUIStoreModel( const uno::Reference< frame::XModel >& const ::rtl::OUString& aSlotName, uno::Sequence< beans::PropertyValue >& aArgsSequence, sal_Bool bPreselectPassword, - ::rtl::OUString aSuggestedName ) + ::rtl::OUString aSuggestedName, + sal_uInt16 nDocumentSignatureState ) { ModelData_Impl aModelData( *this, xModel, aArgsSequence ); @@ -1308,6 +1311,24 @@ sal_Bool SfxStoringHelper::GUIStoreModel( const uno::Reference< frame::XModel >& } } + if ( !( nStoreMode & EXPORT_REQUESTED ) ) + { + // if it is no export, warn user that the signature will be removed + if ( SIGNATURESTATE_SIGNATURES_OK == nDocumentSignatureState + || SIGNATURESTATE_SIGNATURES_INVALID == nDocumentSignatureState + || SIGNATURESTATE_SIGNATURES_NOTVALIDATED == nDocumentSignatureState + || SIGNATURESTATE_SIGNATURES_PARTIAL_OK == nDocumentSignatureState) + { + if ( QueryBox( NULL, SfxResId( RID_XMLSEC_QUERY_LOSINGSIGNATURE ) ).Execute() != RET_YES ) + { + // the user has decided not to store the document + throw task::ErrorCodeIOException( ::rtl::OUString(), + uno::Reference< uno::XInterface >(), + ERRCODE_IO_ABORT ); + } + } + } + // preselect a filter for the storing process uno::Sequence< beans::PropertyValue > aFilterProps = aModelData.GetPreselectedFilter_Impl( nStoreMode ); |