diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-06-12 11:24:30 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-06-12 12:52:40 -0400 |
commit | cbb2505ced3a750ab0cc2e0c4e6aa3fad6c70aeb (patch) | |
tree | 37463c5fc93d30fe31aecab5b07ae8122f3811e4 /sc | |
parent | 16232bc3066be2c4c24de5df99b18403674bb864 (diff) |
fdo#77506: More reliable way to determine label strings.
Not beautiful, but doable.
(cherry picked from commit a2a1a59a448420a858724371c4a339f75ebe8c1e)
Conflicts:
sc/source/ui/unoobj/chart2uno.cxx
xmloff/source/chart/SchXMLExport.cxx
Change-Id: I6f3b00d620e7d7d19cc05ec4239deeb14d0d5201
Diffstat (limited to 'sc')
-rw-r--r-- | sc/inc/unonames.hxx | 2 | ||||
-rw-r--r-- | sc/source/ui/unoobj/chart2uno.cxx | 12 |
2 files changed, 14 insertions, 0 deletions
diff --git a/sc/inc/unonames.hxx b/sc/inc/unonames.hxx index 0471ae47cddd..56edd2cf441d 100644 --- a/sc/inc/unonames.hxx +++ b/sc/inc/unonames.hxx @@ -654,6 +654,8 @@ #define SC_UNONAME_INCLUDEHIDDENCELLS "IncludeHiddenCells" #define SC_UNONAME_HIDDENVALUES "HiddenValues" #define SC_UNONAME_USE_INTERNAL_DATA_PROVIDER "UseInternalDataProvider" +#define SC_UNONAME_HAS_STRING_LABEL "HasStringLabel" +#define SC_UNONAME_TIME_BASED "TimeBased" // Solver #define SC_UNONAME_TIMEOUT "Timeout" diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx index 093dbbe36d53..10e47d0d1ad3 100644 --- a/sc/source/ui/unoobj/chart2uno.cxx +++ b/sc/source/ui/unoobj/chart2uno.cxx @@ -3499,6 +3499,18 @@ uno::Any SAL_CALL ScChart2DataSequence::getPropertyValue( BuildDataCache(); aRet <<= m_aHiddenValues; } + else if (rPropertyName == SC_UNONAME_HAS_STRING_LABEL) + { + // Read-only property. It returns whether or not the label value is a + // direct user input, rather than an indirect reference. + bool bHasStringLabel = false; + if (m_pTokens->size() == 1) + { + const ScToken& rToken = *(*m_pTokens)[0]; + bHasStringLabel = rToken.GetType() == formula::svString; + } + aRet <<= bHasStringLabel; + } else throw beans::UnknownPropertyException(); // TODO: support optional properties |