[Libreoffice-commits] core.git: sc/source

Eike Rathke erack at redhat.com
Thu Jan 26 16:52:22 UTC 2017


 sc/source/ui/unoobj/appluno.cxx |   13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

New commits:
commit 109cff60a3a18b20b2e0efefd0d49f6eab9b52fd
Author: Eike Rathke <erack at redhat.com>
Date:   Thu Jan 26 17:51:17 2017 +0100

    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

diff --git a/sc/source/ui/unoobj/appluno.cxx b/sc/source/ui/unoobj/appluno.cxx
index f5b0e77..646599a 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;
     }


More information about the Libreoffice-commits mailing list