save and return the set value in the case that 'SpellOnline' is used
in XFunctionAccess Change-Id: I9b917c84732dfd205e46e9bc00656c09341c7077 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164329 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
This commit is contained in:
@@ -64,6 +64,7 @@ private:
|
||||
SfxItemPropertyMap aPropertyMap;
|
||||
bool mbArray;
|
||||
bool mbValid;
|
||||
bool mbSpellOnline;
|
||||
|
||||
public:
|
||||
ScFunctionAccess();
|
||||
|
||||
@@ -195,7 +195,8 @@ namespace
|
||||
ScFunctionAccess::ScFunctionAccess() :
|
||||
aPropertyMap( GetPropertyMap() ),
|
||||
mbArray( true ), // default according to behaviour of older Office versions
|
||||
mbValid( true )
|
||||
mbValid( true ),
|
||||
mbSpellOnline( false )
|
||||
{
|
||||
StartListening( *SfxGetpApp() ); // for SfxHintId::Deinitializing
|
||||
}
|
||||
@@ -266,8 +267,9 @@ void SAL_CALL ScFunctionAccess::setPropertyValue(
|
||||
}
|
||||
else if (aPropertyName == SC_UNO_SPELLONLINE)
|
||||
{
|
||||
// silently ignore this property
|
||||
SAL_WARN("sc", "'SpellOnline' not implemented for ScFunctionAccess");
|
||||
// Allow this property because SpreadsheetDocumentSettings lists it
|
||||
if( !(aValue >>= mbSpellOnline) )
|
||||
throw lang::IllegalArgumentException();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -275,7 +277,6 @@ void SAL_CALL ScFunctionAccess::setPropertyValue(
|
||||
pOptions.reset( new ScDocOptions() );
|
||||
|
||||
// options aren't initialized from configuration - always get the same default behaviour
|
||||
|
||||
bool bDone = ScDocOptionsHelper::setPropertyValue( *pOptions, aPropertyMap, aPropertyName, aValue );
|
||||
if (!bDone)
|
||||
throw beans::UnknownPropertyException(aPropertyName);
|
||||
@@ -289,11 +290,9 @@ uno::Any SAL_CALL ScFunctionAccess::getPropertyValue( const OUString& aPropertyN
|
||||
if ( aPropertyName == "IsArrayFunction" )
|
||||
return uno::Any( mbArray );
|
||||
|
||||
// Allow this property because SpreadsheetDocumentSettings lists it
|
||||
if (aPropertyName == SC_UNO_SPELLONLINE)
|
||||
{
|
||||
SAL_WARN("sc", "'SpellOnline' not implemented for ScFunctionAccess");
|
||||
return uno::Any(false);
|
||||
}
|
||||
return uno::Any(mbSpellOnline);
|
||||
|
||||
if ( !pOptions )
|
||||
pOptions.reset( new ScDocOptions() );
|
||||
|
||||
Reference in New Issue
Block a user