summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2017-01-26 17:51:17 +0100
committerEike Rathke <erack@redhat.com>2017-01-26 17:51:45 +0100
commit109cff60a3a18b20b2e0efefd0d49f6eab9b52fd (patch)
tree377d21fdc975558f746fb29f73cdb66cd031c9f2 /sc
parentf85fb724d52a0fff9c64365cd202ae8975492c05 (diff)
this is css::sheet::XGlobalSheetSettings attribute LinkUpdateMode
... and not css::document::Settings property LinkUpdateMode. It directly maps to ScLkUpdMode, LM_UNKNOWN isn't documented as a valid input value. Change-Id: I062a1fd32ad6a98db4f8e78de4724be1c8190407
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/unoobj/appluno.cxx13
1 files changed, 6 insertions, 7 deletions
diff --git a/sc/source/ui/unoobj/appluno.cxx b/sc/source/ui/unoobj/appluno.cxx
index f5b0e77ef683..646599a6a25b 100644
--- a/sc/source/ui/unoobj/appluno.cxx
+++ b/sc/source/ui/unoobj/appluno.cxx
@@ -259,18 +259,17 @@ void SAL_CALL ScSpreadsheetSettings::setPropertyValue(
}
else if (aPropertyName == SC_UNONAME_LINKUPD)
{
+ // XXX NOTE: this is not css::document::Settings property
+ // LinkUpdateMode but css::sheet::XGlobalSheetSettings attribute
+ // LinkUpdateMode.
sal_Int16 n;
- if (!(aValue >>= n) || n < css::document::LinkUpdateModes::NEVER
- || n > css::document::LinkUpdateModes::GLOBAL_SETTING)
+ if (!(aValue >>= n) || n < 0 || n >= ScLkUpdMode::LM_UNKNOWN)
{
throw css::lang::IllegalArgumentException(
- ("LinkUpdateMode property value must be a SHORT with a value in"
- " the range of the css.document.LinkUpdateModes constants"),
+ ("LinkUpdateMode property value must be a SHORT with a value in the range of 0--2"
+ " as documented for css::sheet::XGlobalSheetSettings attribute LinkUpdateMode"),
css::uno::Reference<css::uno::XInterface>(), -1);
}
- //TODO: ScLkUpdMode (LM_ALWAYS=0, LM_NEVER=1, LM_ON_DEMAND=2,
- // LM_UNKNOWN=3) does not match css.document.LinkUpdateModes (NEVER=0,
- // MANUAL=1, AUTO=2, GLOBAL_SETTINGS=3):
aAppOpt.SetLinkMode( static_cast<ScLkUpdMode>(n) );
bSaveApp = true;
}