Hi Kohei
Kohei Yoshida wrote:
The presence of the base struct is to ease the handling of these
different filter types, so that the consumer of this API can store all
filters in a single container without sacrificing type safety too much.
thats a nice idea :-)
These data structures are exchanged via XExtendedSheetFilterDescriptor,
which is exported by the existing SheetFilterDescriptor service.
interface XExtendedSheetFilterDescriptor
{
void begin();
void commit();
void addFilterFieldNormal(
[in] sheet::TableFilterFieldNormal aField );
void addFilterFieldMultiString(
[in] sheet::TableFilterFieldMultiString aField );
TableFilterFieldType getFirstType();
TableFilterFieldType getNextType();
void getFilterFieldNormal(
[out] sheet::TableFilterFieldNormal aField );
void getFilterFieldMultiString(
[out] sheet::TableFilterFieldMultiString aField );
};
mmm this seems to break your previous effort to ease making this service
easily extensible by locking in the FilterField types into the
interface, so perhaps something like
Any getFilterField( [in] TableFilterFieldType aType ) would do
achieve what you want?
Also the getFirstType() and getNextType() seem to indicate some sort of
access to the underlying container but it seems that specific access to
the elements of the container isn't possible ( or perhaps you just don't
show some sort of XSomethingAccess interface that is part of the service )
There is also an enum type css.sheet.TableFilterFieldType:
enum TableFilterFieldType
{
NORMAL,
MULTI_STRING,
NONE
};
for extensibility probably best to steer away from enums ( iirc the
upper limit of the enum range of values is hardcoded in the generated
c++ files ) and use constants instead
On a side note something that I came across that would be great to
address in an update to the api is the ability to 'unfilter' a field (
e.g. the equivelant of selecting all in the drop down filter list )
Perhaps I missed something but I never found how to do this with the api
( maybe someone can elighten me about that, but when I last looked at
this it seems that when you delete a FilterField via the api then the
bDoQuery for the associated ScQueryEntry is set to false, later on when
refresh is called in ScDBDocFunc::RepeatDB such queries are not then
passed to ScDBDocFunc::Query which would then do the 'all' for you )
Noel
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]