Dispatching AutoComplete for cell values

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Dispatching AutoComplete for cell values

Peter Eberlein-3
Hi,

how can I turn AutoComplete off?

I tried:
Object helper =
Mcf.createInstanceWithContext("com.sun.star.frame.DispatchHelper",
xComponentContext);
XDispatchHelper xDispatchHelper = (XDispatchHelper)
UnoRuntime.queryInterface(XDispatchHelper.class, helper);

PropertyValue[] args = new PropertyValue[1];
args[0] = new PropertyValue();
args[0].Name = "AutoComplete";
args[0].Value = false;

XDispatchProvider xDispatchProvider = (XDispatchProvider)
UnoRuntime.queryInterface(XDispatchProvider.class,
xModel.getCurrentController().getFrame());

xDispatchHelper.executeDispatch(xDispatchProvider, ".uno:AutoComplete",
"", 0, args);

This doesn't work. Seem there is only a "Toggling" without args possible.
If this is true: How can I detect, if AutoComplete is On or Off?


Regards

Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Dispatching AutoComplete for cell values

Niklas Nebel-2
On 10/27/10 16:30, Peter Eberlein wrote:

> how can I turn AutoComplete off?
>
> I tried:
> Object helper =
> Mcf.createInstanceWithContext("com.sun.star.frame.DispatchHelper",
> xComponentContext);
> XDispatchHelper xDispatchHelper = (XDispatchHelper)
> UnoRuntime.queryInterface(XDispatchHelper.class, helper);
>
> PropertyValue[] args = new PropertyValue[1];
> args[0] = new PropertyValue();
> args[0].Name = "AutoComplete";
> args[0].Value = false;
>
> XDispatchProvider xDispatchProvider = (XDispatchProvider)
> UnoRuntime.queryInterface(XDispatchProvider.class,
> xModel.getCurrentController().getFrame());
>
> xDispatchHelper.executeDispatch(xDispatchProvider, ".uno:AutoComplete",
> "", 0, args);
>
> This doesn't work. Seem there is only a "Toggling" without args possible.
> If this is true: How can I detect, if AutoComplete is On or Off?

Service com.sun.star.sheet.GlobalSheetSettings has a property
DoAutoComplete. It can be read and modified, so you don't need the
dispatch stuff for that.

Niklas

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Dispatching AutoComplete for cell values

Peter Eberlein-3
Hi Niklas,
Am 27.10.2010 19:52, schrieb Niklas Nebel:
> On 10/27/10 16:30, Peter Eberlein wrote:
>> how can I turn AutoComplete off?
>>

>
> Service com.sun.star.sheet.GlobalSheetSettings has a property
> DoAutoComplete. It can be read and modified, so you don't need the
> dispatch stuff for that.
>
Shouldn't this service contain a property "ViewValueHighlighting" too?
Here I need the dispatch stuff.
These differences are sometimes not clear.

Regards

Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Dispatching AutoComplete for cell values

Niklas Nebel-2
On 10/28/10 08:14, Peter Eberlein wrote:
>> Service com.sun.star.sheet.GlobalSheetSettings has a property
>> DoAutoComplete. It can be read and modified, so you don't need the
>> dispatch stuff for that.
>>
> Shouldn't this service contain a property "ViewValueHighlighting" too?
> Here I need the dispatch stuff.
> These differences are sometimes not clear.

Value highlighting is a view setting that can be enabled for each view
individually. It's the property "IsValueHighlightingEnabled" in service
SpreadsheetViewSettings, part of SpreadsheetView.

Niklas

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: View Settings was: Dispatching AutoComplete for cell values

Peter Eberlein-3
Hi Niklas,
Am 28.10.2010 11:02, schrieb Niklas Nebel:

> Value highlighting is a view setting that can be enabled for each view
> individually. It's the property "IsValueHighlightingEnabled" in service
> SpreadsheetViewSettings, part of SpreadsheetView.
>
Thanks (as always) for your fast responses.
Tried in m84 the property ShowCharts=2 without success.
(
http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/Spreadsheets/View_Settings 
)
Is this documented, but not implemented?

Regards
Peter


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: View Settings was: Dispatching AutoComplete for cell values

Niklas Nebel-2
On 10/28/10 15:23, Peter Eberlein wrote:
> Tried in m84 the property ShowCharts=2 without success.
> (
> http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/Spreadsheets/View_Settings
> )
> Is this documented, but not implemented?

The placeholder display was removed a while ago, see issue 80528. The
API implementation now treats 2 (placeholders) like 0 (show).

Niklas

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: View Settings was: Dispatching AutoComplete for cell values

Daniel Rentz-3
In reply to this post by Peter Eberlein-3
Hi Peter,

Am 28.10.2010 15:23, schrieb Peter Eberlein:

> Hi Niklas,
> Am 28.10.2010 11:02, schrieb Niklas Nebel:
>
>> Value highlighting is a view setting that can be enabled for each view
>> individually. It's the property "IsValueHighlightingEnabled" in service
>> SpreadsheetViewSettings, part of SpreadsheetView.
>>
> Thanks (as always) for your fast responses.
> Tried in m84 the property ShowCharts=2 without success.
> (
> http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/Spreadsheets/View_Settings
> )
> Is this documented, but not implemented?

Displaying placeholders is not supported anymore and has been removed
from the code (you can see this in Tools->Options->Calc->View), see
http://qa.openoffice.org/issues/show_bug.cgi?id=80528 . Due to
compatibility, the type of the properties has to remain "short", but the
value 2 will be mapped to "hide objects" (value 1).

So, it is very unfortunate, that you have to use "0" for showing and "1"
for hiding the objects, though the properties are named "Show...". I
will add an appropriate comment in the IDL documentation and the dev guide.


Regards
Daniel

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: View Settings was: Dispatching AutoComplete for cell values

Daniel Rentz-3
Am 28.10.2010 15:58, schrieb Daniel Rentz:

> Hi Peter,
>
> Am 28.10.2010 15:23, schrieb Peter Eberlein:
>> Hi Niklas,
>> Am 28.10.2010 11:02, schrieb Niklas Nebel:
>>
>>> Value highlighting is a view setting that can be enabled for each view
>>> individually. It's the property "IsValueHighlightingEnabled" in service
>>> SpreadsheetViewSettings, part of SpreadsheetView.
>>>
>> Thanks (as always) for your fast responses.
>> Tried in m84 the property ShowCharts=2 without success.
>> (
>> http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/Spreadsheets/View_Settings
>>
>> )
>> Is this documented, but not implemented?
>
> Displaying placeholders is not supported anymore and has been removed
> from the code (you can see this in Tools->Options->Calc->View), see
> http://qa.openoffice.org/issues/show_bug.cgi?id=80528 . Due to
> compatibility, the type of the properties has to remain "short", but the
> value 2 will be mapped to "hide objects" (value 1).

Oops, Niklas is right, value 2 maps to "show" (value 0).


Daniel

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: View Settings was: Dispatching AutoComplete for cell values

Daniel Rentz-3
In reply to this post by Peter Eberlein-3
Am 28.10.2010 15:23, schrieb Peter Eberlein:

> Hi Niklas,
> Am 28.10.2010 11:02, schrieb Niklas Nebel:
>
>> Value highlighting is a view setting that can be enabled for each view
>> individually. It's the property "IsValueHighlightingEnabled" in service
>> SpreadsheetViewSettings, part of SpreadsheetView.
>>
> Thanks (as always) for your fast responses.
> Tried in m84 the property ShowCharts=2 without success.
> (
> http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/Spreadsheets/View_Settings
> )
> Is this documented, but not implemented?

Now http://qa.openoffice.org/issues/show_bug.cgi?id=115296

Note that the old "show placeholders" was never meant to be an
"iconified OLE object", but has just shown a gray outline rectangle with
a default bitmap for all types of objects, instead of the real object
contents.


Daniel

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]