merge the formfield patch from ooo-build
[ooovba.git] / applied_patches / 0206-always-allow-save-document-sc.diff
blob1082cb72d042ee04af31695c942f561c0b72e13c
1 diff --git sc/inc/unonames.hxx sc/inc/unonames.hxx
2 index 18c858b..0dbbfe3 100644
3 --- sc/inc/unonames.hxx
4 +++ sc/inc/unonames.hxx
5 @@ -482,6 +482,7 @@
6 #define SC_UNO_ISEXECUTELINKENABLED "IsExecuteLinkEnabled"
7 #define SC_UNO_ISCHANGEREADONLYENABLED "IsChangeReadOnlyEnabled"
8 #define SC_UNO_REFERENCEDEVICE "ReferenceDevice"
9 +#define SC_UNO_ALWAYS_ALLOW_SAVE "AlwaysAllowSave"
11 // document properties from FormModel
12 #define SC_UNO_APPLYFMDES "ApplyFormDesignMode"
13 diff --git sc/source/ui/docshell/docsh6.cxx sc/source/ui/docshell/docsh6.cxx
14 index d4f4b61..b41b4a1 100644
15 --- sc/source/ui/docshell/docsh6.cxx
16 +++ sc/source/ui/docshell/docsh6.cxx
17 @@ -436,6 +436,16 @@ void ScDocShell::UpdateLinks()
21 +bool ScDocShell::GetApplicationFlag(SfxApplicationFlagType eFlagType)
23 + switch (eFlagType)
24 + {
25 + case SFX_APPFLAG_ALWAYS_ALLOW_SAVE:
26 + return true;
27 + }
28 + return false;
31 BOOL ScDocShell::ReloadTabLinks()
33 SvxLinkManager* pLinkManager = aDocument.GetLinkManager();
34 diff --git sc/source/ui/inc/docsh.hxx sc/source/ui/inc/docsh.hxx
35 index fcf3f7f..a53d4dc 100644
36 --- sc/source/ui/inc/docsh.hxx
37 +++ sc/source/ui/inc/docsh.hxx
38 @@ -311,6 +311,9 @@ public:
39 void CancelAutoDBRange(); // called when dialog is cancelled
41 void UpdateLinks(); // Link-Eintraege aktuallisieren
43 + virtual bool GetApplicationFlag(SfxApplicationFlagType eFlagType);
45 BOOL ReloadTabLinks(); // Links ausfuehren (Inhalt aktualisieren)
47 void PostEditView( ScEditEngineDefaulter* pEditEngine, const ScAddress& rCursorPos );
48 diff --git sc/source/ui/unoobj/docuno.cxx sc/source/ui/unoobj/docuno.cxx
49 index d1bee0d..9c9b897 100644
50 --- sc/source/ui/unoobj/docuno.cxx
51 +++ sc/source/ui/unoobj/docuno.cxx
52 @@ -1587,6 +1587,8 @@ uno::Any SAL_CALL ScModelObj::getPropertyValue( const rtl::OUString& aPropertyNa
53 pXDev->SetOutputDevice( pDoc->GetRefDevice() );
54 aRet <<= uno::Reference< awt::XDevice >( pXDev );
56 + else if (aString.EqualsAscii(SC_UNO_ALWAYS_ALLOW_SAVE))
57 + ScUnoHelpFunctions::SetBoolInAny(aRet, pDocShell->GetApplicationFlag(SFX_APPFLAG_ALWAYS_ALLOW_SAVE));
58 else if ( aString.EqualsAscii( "BuildId" ) )
60 aRet <<= maBuildId;