https://issues.apache.org/ooo/show_bug.cgi?id=122024
Bug ID: 122024
Issue Type: DEFECT
Summary: [sidebar] Dispatch interception is broken
Classification: Code
Product: General
Version: AOO400-dev
Hardware: All
OS: All
Status: CONFIRMED
Severity: normal
Priority: P3
Component: code
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Created attachment 80516
--> https://issues.apache.org/ooo/attachment.cgi?id=80516&action=edit
Zip file with a Dispatch Provider Interceptor example component
Dispatch interception, as explained here
http://wiki.openoffice.org/wiki/Documentation/DevGuide/OfficeDev/Dispatch_Interception,
is broken.
Download the zip with the example, and unzip it on the sdk/examples/cpp folder
Set up the SDK environment, cd
openoffice/basis4.0/sdk/examples/cpp/DispatchInterceptor/src and compile the
example with DEBUG=yes to turn OSL_TRACE on:
make DEBUG=yes
then run the example:
make DEBUG=yes DispatchInterceptorDemo.run
The example has a Job to register the interceptor on Writer/Impress/Draw. This
can be controlled by adding more modules in StaticSupportedModules::operator(),
on Job.cxx
The example will intercept the commands indicated in
StaticInterceptedURLs::operator(), on DispatchInterceptor.cxx
The interceptor does nothing, it works just like a proxy, dispatching
intercepted commands at the original dispatch object, and notifying status
updates.
---------------
To reproduce the bug:
- make DEBUG=yes DispatchInterceptorDemo.run
- new Writer document
- dt + F3 to insert dummy text
- select a word, and Ctr+B to set it in bold
The command .uno:Bold should be intercepted, and thus dispatched through the
interceptor:
Trace 12373/1: "dispint::DispatchInterceptor::dispatch - ".uno:Bold""
Trace 12373/1: "dispint::DispatchInterceptor::statusChanged - ".uno:Bold""
The status update is reflected in the formatting toolbar item, but not in the
sidebar: the bold toolbox item is not checked.
- Press Bold in the sidebar while the cursor is in the bold word: the word is
still bold (it should have been toggled). The sidebar bold item is now checked.
- Press Bold in the sidebar once again: the sidebar removes the bold from the
word, but bypasses the interceptor: the interceptor didn't dispatch .uno:Bold
--
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.