summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorMaxim Monastirsky <momonasmon@gmail.com>2015-12-22 13:12:23 +0200
committerMaxim Monastirsky <momonasmon@gmail.com>2015-12-23 09:38:25 +0000
commit22328a224df4619218b88205838307f70612207e (patch)
tree251c9aaf8ab1b1db5cf80af9c8644d6cacd6d897 /svtools
parent2351fd5d489fde281e8d1ef97af747149a29c247 (diff)
New saving behavior
Changes in this commit: - AlwaysAllowSave config is gone. Saving is always permitted, unless in a read only document. Also changed the behavior in dbaccess to match sfx2. - The toolbar save button is always enabled, to always give access to the dropdown. That's the case even in a read only document, except that it changes to DROPDOWNONLY, and the save as command icon+tooltip. In table/query designers we still disable the button in read only state. - When the document is modified, the toolbar button gets a special icon to indicate that. TODO: - Icons for the document modified state are still missing. I added some fake links to Tango's links.txt in order to test the new behavior. These links shouldn't stay as-is in a production version! Change-Id: I56c169bf48b78faaf53c2989ce8624f8297ffb6e Reviewed-on: https://gerrit.libreoffice.org/20839 Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com> Tested-by: Maxim Monastirsky <momonasmon@gmail.com>
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/config/miscopt.cxx42
1 files changed, 2 insertions, 40 deletions
diff --git a/svtools/source/config/miscopt.cxx b/svtools/source/config/miscopt.cxx
index 5df1acf4a7a0..fb2a3160856e 100644
--- a/svtools/source/config/miscopt.cxx
+++ b/svtools/source/config/miscopt.cxx
@@ -58,12 +58,10 @@ using namespace ::com::sun::star;
#define PROPERTYHANDLE_SHOWLINKWARNINGDIALOG 6
#define PROPERTYNAME_DISABLEUICUSTOMIZATION "DisableUICustomization"
#define PROPERTYHANDLE_DISABLEUICUSTOMIZATION 7
-#define PROPERTYNAME_ALWAYSALLOWSAVE "AlwaysAllowSave"
-#define PROPERTYHANDLE_ALWAYSALLOWSAVE 8
#define PROPERTYNAME_EXPERIMENTALMODE "ExperimentalMode"
-#define PROPERTYHANDLE_EXPERIMENTALMODE 9
+#define PROPERTYHANDLE_EXPERIMENTALMODE 8
#define PROPERTYNAME_MACRORECORDERMODE "MacroRecorderMode"
-#define PROPERTYHANDLE_MACRORECORDERMODE 10
+#define PROPERTYHANDLE_MACRORECORDERMODE 9
#define VCL_TOOLBOX_STYLE_FLAT ((sal_uInt16)0x0004) // from <vcl/toolbox.hxx>
@@ -85,7 +83,6 @@ private:
bool m_bShowLinkWarningDialog;
bool m_bIsShowLinkWarningDialogRO;
bool m_bDisableUICustomization;
- bool m_bAlwaysAllowSave;
bool m_bExperimentalMode;
bool m_bMacroRecorderMode;
bool m_bIconThemeWasSetAutomatically;
@@ -131,12 +128,6 @@ public:
inline bool DisableUICustomization() const
{ return m_bDisableUICustomization; }
- inline void SetSaveAlwaysAllowed( bool bSet )
- { m_bAlwaysAllowSave = bSet; SetModified(); }
-
- inline bool IsSaveAlwaysAllowed() const
- { return m_bAlwaysAllowSave; }
-
inline void SetExperimentalMode( bool bSet )
{ m_bExperimentalMode = bSet; SetModified(); }
@@ -241,7 +232,6 @@ SvtMiscOptions_Impl::SvtMiscOptions_Impl()
, m_bIsUseSystemPrintDialogRO( false )
, m_bShowLinkWarningDialog( true )
, m_bIsShowLinkWarningDialogRO( false )
- , m_bAlwaysAllowSave( false )
, m_bExperimentalMode( false )
, m_bMacroRecorderMode( false )
, m_bIconThemeWasSetAutomatically( false )
@@ -343,12 +333,6 @@ SvtMiscOptions_Impl::SvtMiscOptions_Impl()
OSL_FAIL("Wrong type of \"Misc\\DisableUICustomization\"!" );
break;
}
- case PROPERTYHANDLE_ALWAYSALLOWSAVE :
- {
- if( !(seqValues[nProperty] >>= m_bAlwaysAllowSave) )
- OSL_FAIL("Wrong type of \"Misc\\AlwaysAllowSave\"!" );
- break;
- }
case PROPERTYHANDLE_EXPERIMENTALMODE :
{
if( !(seqValues[nProperty] >>= m_bExperimentalMode) )
@@ -461,12 +445,6 @@ void SvtMiscOptions_Impl::Load( const Sequence< OUString >& rPropertyNames )
OSL_FAIL("Wrong type of \"Misc\\DisableUICustomization\"!" );
}
break;
- case PROPERTYHANDLE_ALWAYSALLOWSAVE:
- {
- if( !(seqValues[nProperty] >>= m_bAlwaysAllowSave) )
- OSL_FAIL("Wrong type of \"Misc\\AlwaysAllowSave\"!" );
- }
- break;
}
}
}
@@ -624,11 +602,6 @@ void SvtMiscOptions_Impl::ImplCommit()
seqValues[nProperty] <<= m_bDisableUICustomization;
break;
}
- case PROPERTYHANDLE_ALWAYSALLOWSAVE :
- {
- seqValues[nProperty] <<= m_bAlwaysAllowSave;
- break;
- }
case PROPERTYHANDLE_EXPERIMENTALMODE :
{
seqValues[nProperty] <<= m_bExperimentalMode;
@@ -661,7 +634,6 @@ Sequence< OUString > SvtMiscOptions_Impl::GetPropertyNames()
OUString(PROPERTYNAME_USESYSTEMPRINTDIALOG),
OUString(PROPERTYNAME_SHOWLINKWARNINGDIALOG),
OUString(PROPERTYNAME_DISABLEUICUSTOMIZATION),
- OUString(PROPERTYNAME_ALWAYSALLOWSAVE),
OUString(PROPERTYNAME_EXPERIMENTALMODE),
OUString(PROPERTYNAME_MACRORECORDERMODE)
};
@@ -821,16 +793,6 @@ bool SvtMiscOptions::IsShowLinkWarningDialogReadOnly() const
return m_pDataContainer->IsShowLinkWarningDialogReadOnly();
}
-void SvtMiscOptions::SetSaveAlwaysAllowed( bool bSet )
-{
- m_pDataContainer->SetSaveAlwaysAllowed( bSet );
-}
-
-bool SvtMiscOptions::IsSaveAlwaysAllowed() const
-{
- return m_pDataContainer->IsSaveAlwaysAllowed();
-}
-
void SvtMiscOptions::SetExperimentalMode( bool bSet )
{
m_pDataContainer->SetExperimentalMode( bSet );