Commit Graph

85 Commits

Author SHA1 Message Date
0ce0c369aa Remove unneccessary comments
Change-Id: I939160ae72fecbe3d4a60ce755730bd4c38497fb
Reviewed-on: https://gerrit.libreoffice.org/8182
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-23 03:38:49 +00:00
b129443eed fdo#75162 - IA2: map new document roles to ROLE_SYSTEM_DOCUMENT.
Change-Id: I631d6e15162e58cf380b55ab1178a811b0304c33
2014-02-22 22:11:30 +00:00
2bb87dd659 fdo#39944: Add DOCUMENT_* accessibility UNO roles
Added a set of UNO accessibility roles for specific kinds of
documents:
 * DOCUMENT_PRESENTATION for Impress
 * DOCUMENT_SPREADSHEET for Calc
 * DOCUMENT_TEXT for Writer

The other applications still use the existing DOCUMENT role.

These roles translates directly to ATK but in the other toolkits we
keep using the same association that DOCUMENT role had.

Change-Id: Ibac47527e5effdecb28d2314cde8558cf4fb010a
Reviewed-on: https://gerrit.libreoffice.org/7847
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2014-02-04 13:08:57 +00:00
85579b1318 cppcheck: unused variable
Change-Id: I68d70c1d24756de0b815a7850bbc75afcbeb9a15
2014-02-02 22:40:56 +01:00
9e77c2fb7c Remove UNOIDL "array" and "union" vaporware remnants
...and deprecate what cannot be removed for compatibility.

Change-Id: I1ea335af775b867b468b8285113631167729a92a
2014-01-31 10:15:47 +01:00
c1503da35d Typo decendant => descendant in winaccessibility/MAccessible
Change-Id: I2e49ab149b2bbdad623f8694221b6169cdfd2d9a
2014-01-27 23:47:24 +01:00
7f2a2d2b05 fdo#73464 - get relation BSTR allocation right.
Change-Id: I270bc9c8e0507f44d2c27639e86002c60f4e2e6d
2014-01-27 18:01:05 +00:00
44064d1a34 fdo#73464 - guard against NULL / unset m_xAccessible.
Change-Id: I3351acf18d334447336ee98761190fdff32d5b85
2014-01-27 12:15:20 +00:00
ff8cb18e21 Resolves: #i124095# Multiple IAccessible and IAccessible2...
interface methods do not check for NULL pointer access, nor do they trap
exceptions

Fixed by Michael Curran
(cherry picked from commit 113171f2a5d726af6c5266e98e8e790ac6729d2d)

Conflicts:
	winaccessibility/source/UAccCOM/MAccessible.cxx

Change-Id: I28d4b885a6c2db487c2754c2ca11290b3844570b
2014-01-27 11:44:40 +00:00
bcfd016c88 some notes about COM threading in LO generally and winaccessibility
- document general COM threading architecture in vcl README
- document winaccessiblitiy locking in README
- define _ATL_APARTMENT_THREADED for UAccCOM

Change-Id: I7c3fd952f2cdee7d245a818bf33c477e7ea20fc2
2014-01-09 13:44:24 +01:00
6242f8262f Initialize m_containedObjects
(cherry picked from commit 795b3bb9e59c9bf049d27538c860cd66633dddcf)

Change-Id: I45e495ad8b3513613102b7ce7777803303980fbe
2014-01-06 09:25:38 +00:00
9ed364774c Adapt all (non-extension, SharedLibrary) .components to environment="..."
Change-Id: I56f38bd786f3a026cb2908f28540dc9c4003af83
2013-12-17 11:06:00 +01:00
ed22381566 Drop duplicate #include
Change-Id: I63612bc5bd4e13fcc5c4e57ac73bd9c7bbf4f0e6
2013-12-13 12:52:20 +09:00
a8804dfc50 winaccessibility: let's try to remove that IsInMainThread()
... and see what happens.  Hopefully nothing bad since everything should
be thread-safe now.

Change-Id: I333b29bc2066578ccabadb022936a28dafdf7104
2013-12-12 20:06:27 +01:00
fdd76463b4 winaccessibility: remove some noise from not-implemented methods
Change-Id: I8046ae37cba87f0e5df550de831229345df1c6f8
2013-12-12 20:06:27 +01:00
57acb3d068 winaccessibility: out-line those COM methods
Change-Id: I7e9a94898c6bc8142b46a05ffba56fc41eb125c2
2013-12-12 20:06:27 +01:00
975e1d293d winaccessibility: clear entires from XHWNDDocList too
... in DeleteAccObj().  Otherwise pointers to deleted documents will be
used.

Change-Id: Ia807dc3a2c782019cf7fc874d264058219956d74
2013-12-12 20:06:27 +01:00
506bab8f62 winaccessibility: GetChildInterface may return 0
Change-Id: I950072d22cd315d1898b76a2c345121d31d432c4
2013-12-12 20:06:26 +01:00
b22e987113 winaccessibility: do not access freed AccObject
The AccObject is stored by value in XIdAccList, so don't call GetResID()
after it has been erased.

Change-Id: I391aad1e3ab71d443cc6e6b92381f74918e0bcfb
2013-12-12 20:06:26 +01:00
9e351edccf winaccessibility: fix exception handling in AccEventListener
RemoveMeFromBroadcaster() may catch a DisposedException and then not
call NotifyDestroy.

Change-Id: I2b766541c3e6800c88a83aa482de0093714d39c2
2013-12-12 20:06:26 +01:00
b6664d0649 winaccessibility: nobody calls get_XInterface
Change-Id: I201fc14a02c47a6c735c65f649c6b9f068d92c71
2013-12-12 20:06:26 +01:00
d28687d517 winaccessibility: fix locking in UAccCOM
The COM components will (usually? always?) be called on the main thread
via COM, and may also be called on any thread from the UNO event
listeners.  Both ways may access the global AccWinObjectManager.
So the easiest way to lock all that without introducing new deadlocks
seems to be to just use the SolarMutex.

The fact that the main thread is in a COM STA is rather irrelevant here
since we don't currently do the required manual marshalling of the COM
pointers so they can be accessed from UNO event listeners running in
threads other than the main thread anyway.

To get that to build:
- use prewin.h and postwin.h around ATL headers
- link UAccCOM against vcl
- define both UNICODE and _UNICODE to not break on mis-matching TCHAR
  nonsense

Change-Id: I1ccdf7a4a5c2b5f0b9c29ef39d126c4b8a16898a
2013-12-12 20:06:26 +01:00
dd7df93417 winaccessibility: remove CheckEnableAccessible.h and assorted noise
Change-Id: I45e1d72b1abf64a965397c50ac3b95b5bbee3206
2013-12-12 20:06:25 +01:00
cbda6da004 winaccessibility: InlineIsEqualGUID is defined by guiddef.h
Change-Id: Ia469076ec6f815133e77a14940e8afa05e177231
2013-12-12 20:06:25 +01:00
a5c7ed2158 winaccessibility: use SAL_N_ELEMENTS
Change-Id: I479117e0794375f1ec0c96b78db22b3569b456ec
2013-12-12 20:06:24 +01:00
9d71c9a442 winaccessibility: clean up the AGGMAP in CMAccessible
Replace it with a map for the new direct C++ instantiation and move this
implementation detail to the cxx file.

Change-Id: Ia961da03f8eb899481cf02f430c921aa8abd7c5c
2013-12-12 20:06:24 +01:00
a0a903892c Avoid multiple definitions of two lovingly copy-pasted functions
Multple external definitions of a symbol causes problems when linking
statically, as for Android. Just make the functions static for now, as they
are only used locally in the files where defined anyway.

Change-Id: I8ddbaf01497c171bed4e15f6183ba43461c672d1
2013-12-05 18:11:09 +02:00
a718fef094 Use our header guard convention
Using identifiers starting with underscores is questionable even if they don't
happen to clash with anything used by the language implementation.

Change-Id: I0af605d40d85ea7e47e1047572fbe180270e08ac
2013-12-03 13:37:37 +02:00
a21825faf0 No _SV_AccObjectWinManager_HXX anywhere
Change-Id: I0ab040ae4379995353009f3e852e6efc6760fb59
2013-12-03 13:37:37 +02:00
b44ed4c408 vcl: check if AT is running before loading the library
... which should result in faster startup if it's disabled.

Change-Id: I39774b0a56f186d08270c2f17b2b20a823f21dc2
2013-12-02 13:18:04 +01:00
fabca7370e winaccessibility: remove global g_acc_manager
It is possible to retrieve it via the AccTopWindowListener.

Change-Id: I6cc5ab25bc937d0d9f4de54a1bed09a76ce27491
2013-12-02 13:18:03 +01:00
b54d441ad7 Revert "winaccessibility: let CoCreateInstance calls find the components"
This only works partially: the ClassObjects are only registered on the
main thread; CoCreateInstance on other threads still fails.

This reverts commit 29c6216af8c502f220bb84857d3dda901ddfd234.
2013-12-02 13:18:03 +01:00
d0e8e6e3cd winaccessibility: fix my stupid mistake in createAggInstance
Change-Id: I7701021befcf1dbad85557c2095fe4bf0b4e0ff1
2013-12-02 13:18:03 +01:00
0fb33f60ac winaccessibility: improve GenerateNewResId()
Change-Id: I81f98ca83b97bc2e3e419c7a37ad2a011932553b
2013-11-28 00:59:53 +01:00
e094d6fab6 winaccessibility: remove GetXAccByAccObj()
It is pointlessly slow and the AccObject has a method for that.

Change-Id: I7ba1cc853255ac3b3b5008657d1cc79efc3a3f4b
2013-11-28 00:59:52 +01:00
a2afe344c6 winaccessibility: remove AccEventListener::m_isDisposed
It's disposed iff m_xAccessible is 0.

Change-Id: I3f8bc104784adf82be43bcaf43b7573a9897f82a
2013-11-28 00:59:51 +01:00
83ccdb0285 winaccessibility: use uno::Reference in AccEventListener
... and clear it in disposing().

Change-Id: I69cfe3cdcf6549a0471453960d1f935d9c3b7a0d
2013-11-28 00:59:51 +01:00
ef3f28d0ce winaccessibility: use rtl::Reference for listener lifecycle
The manual acquire() call was apparently not coupled with a release()?

Change-Id: I069c969619e9afce2a4b836642cc1675025b11d0
2013-11-28 00:59:50 +01:00
576ba8ce82 winaccessibility: actually the member is unused, remove it
Change-Id: I68e5c1785b73520cb59ca54a602ea176f8146f6f
2013-11-28 00:59:49 +01:00
887cf7ccc6 winaccessibility: don't store XAccessible* in AccDescendant...Listener
Seems safer to store a Reference

Change-Id: I86ef9d18c03b2a58058d38e2ae43553ecd2c7be6
2013-11-28 00:59:49 +01:00
455c39645e winaccessibility: remove all Registry content/registration code
There is no need to register UAccCOM.

Change-Id: I37f5c4030abefbd18b6686652a348bc20a05a9db
2013-11-28 00:59:46 +01:00
5e7b29e642 winaccessibility: remove obsolete act.hxx
... obsoleted by 732ec36edfd09d2091d70c4d71b5f182fe279c45

Change-Id: I7f7a9becac2430a7ed4d096be741b610462a8a00
2013-11-28 00:52:21 +01:00
3cc25be9cd Replace deprecated OUString::valueOf -> OUString::number
Change-Id: Ia9c5d9ce424f810b31ccc8ec939e1ced301329f7
2013-11-26 17:40:36 +01:00
3b86569fcb winaccessibility: replace CoCreateInstance with direct instantiation
This is an alternative (to 732ec36edfd09d2091d70c4d71b5f182fe279c45)
solution to the "CoCreateInstance does not work" problem:
replace all CoCreateInstance calls with equivalent calls to create
the components directly.

Since the only reason why this COM stuff needs to be registered
at all is that AccObject uses CoCreateInstance() to create its
COM objects, another possible solution appears to be to simply link
the libraries and instantiate the COM objects directly, without COM.

The only difference appears to be that CoCreateInstance would
automatically add proxy objects in case the COM objects reside in a
single-threaded appartment; not sure if that is relevant here.

Change-Id: I8ffb8af501f6084f3145fa4d4f53366a070e1691
Reviewed-on: https://gerrit.libreoffice.org/6792
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2013-11-25 03:21:30 -06:00
f529277929 cppcheck: consecutive break
Change-Id: I7e53fa77aada1433f3b311f51e82342bac127b3c
2013-11-24 15:09:15 +01:00
3f23236dbd cppcheck: Prefer prefix ++/-- operators for non-primitive types
Change-Id: I53a7773ed76d5a38301b4f9378c56698e4df7e8b
2013-11-24 14:43:17 +01:00
732ec36edf winaccessibility: let CoCreateInstance calls find the components
The COM services are not found because they are not registered in the
registry via regsvr32 (doing that is unnecessary since the components
are only instantiated by winaccessibility code and undesirable since
that would likely register the IAccessible2 types too, breaking A11y
tools) and the special manifest resource #97 that ActivateActContext()
tries to load does not exist in UAccCOM.dll; this would need to be a
XML manifest, the *.rgs and *.tlb that are already included as
individual resources won't work.

After reading ATL headers for hours it is immediately obvious that the
COM components can simply be registered by a call to
CComModule::RegisterClassObjects() from DllMain; this just requires
actually loading the UAccCOM library from somewhere so the DllMain runs.

Change-Id: Id58b754835cd2f1bcada37e5639a6b6042a42fd5
2013-11-24 01:02:46 +01:00
d04c970e8f winaccessibility: fix some error handling in CAccTable
Change-Id: I3c8bc6a476a6254a4ddc3a7cb0585544f3f78431
2013-11-24 01:00:53 +01:00
ccb1e06bdb winaccessibility: don't need 2 global pointers for AccObjectWinManager
Sadly can't use rtl::Static because it needs a ctor parameter...

Change-Id: I98bbfbb4d2ef54f40a5f110527b260c0b5b01eed
2013-11-24 01:00:53 +01:00
a5e281ff04 winaccessibility: make XAccessibleAction member Reference
Maybe it would be kept alive by AccObject::m_AccActionRef but why not
play it safe.

Change-Id: I03c2be04e97dcde8a177ef8dfd0d75595ab13a53
2013-11-24 01:00:53 +01:00