diff options
author | Noel Power <noel.power@suse.com> | 2013-03-01 17:07:06 +0000 |
---|---|---|
committer | Noel Power <noel.power@suse.com> | 2013-04-03 10:24:49 +0100 |
commit | 861b9d44d1ad956f621a6fa77d61f2baaa65e6e8 (patch) | |
tree | 1a22c45ccbbcda3472801f1503363677298feb30 /uui | |
parent | 8f5c438e42421f31b194ebc00901b0ebe1083898 (diff) |
raise warning when saving macro laden doc as a macro-free format bnc#791777
Change-Id: Ic947ceef71c86e31fbf0bce74b064aaf91f47178
(cherry picked from commit ec583253c3d761847c93a77fa10c065fc334fab9)
Diffstat (limited to 'uui')
-rw-r--r-- | uui/source/iahndl.cxx | 17 | ||||
-rw-r--r-- | uui/source/ids.hrc | 2 | ||||
-rw-r--r-- | uui/source/ids.src | 5 |
3 files changed, 21 insertions, 3 deletions
diff --git a/uui/source/iahndl.cxx b/uui/source/iahndl.cxx index 92db8392eb4c..4414ba6639f8 100644 --- a/uui/source/iahndl.cxx +++ b/uui/source/iahndl.cxx @@ -784,11 +784,26 @@ UUIInteractionHelper::handleRequest_impl( task::ErrorCodeRequest aErrorCodeRequest; if (aAnyRequest >>= aErrorCodeRequest) { - handleGenericErrorRequest( aErrorCodeRequest.ErrCode, + // Sucky special handling for xlsx macro filter warning + if ( (sal_uInt32)ERRCODE_SFX_VBASIC_CANTSAVE_STORAGE == (sal_uInt32)aErrorCodeRequest.ErrCode) + { + std::vector< rtl::OUString > aArguments; + handleErrorHandlerRequest( task::InteractionClassification_WARNING, + ERRCODE_UUI_IO_WARN_CANTSAVE_MACROS, + aArguments, + rRequest->getContinuations(), + bObtainErrorStringOnly, + bHasErrorString, + rErrorString); + } + else + { + handleGenericErrorRequest( aErrorCodeRequest.ErrCode, rRequest->getContinuations(), bObtainErrorStringOnly, bHasErrorString, rErrorString); + } return true; } diff --git a/uui/source/ids.hrc b/uui/source/ids.hrc index 8803ffe83051..49c11559d30c 100644 --- a/uui/source/ids.hrc +++ b/uui/source/ids.hrc @@ -139,7 +139,7 @@ #define ERRCODE_UUI_LOCKING_NOT_LOCKED (ERRCODE_AREA_UUI + 61) #define ERRCODE_UUI_LOCKING_LOCK_EXPIRED (ERRCODE_AREA_UUI + 62) #define ERRCODE_UUI_CANNOT_ACTIVATE_FACTORY (ERRCODE_AREA_UUI + 63) - +#define ERRCODE_UUI_IO_WARN_CANTSAVE_MACROS (ERRCODE_WARNING_MASK | ( ERRCODE_AREA_UUI + 64)) #define ERRCODE_AREA_UUI_UNKNOWNAUTH 25000 #define SSLWARN_TYPE_DOMAINMISMATCH 10 #define SSLWARN_TYPE_EXPIRED 20 diff --git a/uui/source/ids.src b/uui/source/ids.src index 244626477668..3f78df786b93 100644 --- a/uui/source/ids.src +++ b/uui/source/ids.src @@ -30,7 +30,6 @@ String RID_SAVE_PASSWORD Text [ en-US ] = "~Remember password"; }; - String STR_WARNING_BROKENSIGNATURE_TITLE { Text [ en-US ] = "Invalid Document Signature" ; @@ -397,5 +396,9 @@ Resource RID_UUI_ERRHDL Text [ en-US ] = "Component cannot be loaded, possibly broken or incomplete installation.\nFull error message:\n\n $(ARG1)."; }; + String (ERRCODE_UUI_IO_WARN_CANTSAVE_MACROS & ERRCODE_RES_MASK) + { + Text [ en-US ] = "You are saving to a macro-free document format, the macros contained in this document will not be saved.\nDo you wish to continue?"; + }; }; |