https://bugs.documentfoundation.org/show_bug.cgi?id=113535
--- Comment #6 from Wolfgang Jäger <[email protected]> ---
(In reply to sworddragon2 from comment #5)
> (In reply to Wolfgang Jäger from comment #3)
> > The 'Source' entered using 'Cell Range' mode needs to ba a cell range
> > actually containing the accepted values or an expression returning a
> > respective reference or array. A1 does neither contain the two entries. As
> > soon as ther is entered one of the accepted values, the validity dropdown of
> > A2 will offer this single entry.
>
> My thought as I created this ticket was probably that the source A1 as cell
> range would access the validity list from the cell A1 to fetch the values
> that would then be listed in the dropdown field of A2. This would be useful
> if multiple cells would use the same selection of entries for their dropdown
> field as the first cell could act as a master cell containing the raw
> validity list while other cells would use the master cell's validity list as
> reference instead of using their own same values for storage/performance
> reasons.
I was aware of what you hoped to get. However, it is neither the actual nor the
generally expected behaviour.
> I could workaround that by writing all valid entries in cell(s) and use them
> as reference - but this is an ugly solution.
I wouldn't judge this to be "ugly" in a sense people would generally agree
with.
On the other hand the behaviour you preferred would make it impossiple to
select some entries from elsewhere or from lists in a range of cells based on
'Validity' and then to use that range with the selected values in a secondary
application of 'Validity' to a different cell. Thus I would judge this is more
a matter of consistence than of aesthetics. (Consistence, however, has also its
role in aesthetics as I see it.)
In fact I feel it a breach of "ClarityOfData" to offer the internal 'List'
option at all. What can be selected is data, isn't it? And data should be given
in cells in spreadsheets. Using 'Validity' or cell attributes to represent data
can easily cause problems.
> But maybe LibreOffice supports what I actually want to try to achieve and I
> just did not encounter this feature yet. If not what I'm actually looking
> for could be described as 'Supporting "Allow: Validity list" in the menubar
> -> Data -> Validity... -> Criteria' which takes as "Source" a cell pointing
> in any way to a validity list.
Well, thats an indirection I would not miss.
If you URGENTLY miss it, you can use the following CustomFunction under the
'Cell Range' mode in the range bar to apply the validity List from a different
cell. No guarantee of any kind! (pZ is the number of the source sheet,
1-based!)
Function getValidityList(pZ As Long, pCellName As String) ' ONLY for LIST!
Dim h : getValidityList = h ' Clear if BASIC didn't it correctly.
pCell = ThisComponent.Sheets(pZ - 1).GetCellRangeByName(pCellName)
f1 = pCell.Validation.Formula1
IF NOT (Left(f1, 1)="""") Then Exit Function
h = Split(f1, """;""")
u = Ubound(h)
h(0) = Mid(h(0), 2, Len(h(0)) - 1)
h(u) = Mid(h(u), 1, Len(h(u)) - 1)
getValidityList = h
End Function
--
You are receiving this mail because:
You are the assignee for the bug._______________________________________________
Libreoffice-bugs mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs