diff options
author | Michael Stahl <mstahl@redhat.com> | 2013-12-12 18:52:14 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2013-12-13 19:47:44 +0100 |
commit | 5853af1f01aec3edff340335db1a81f8233d8174 (patch) | |
tree | d31a2ec24faaefd387022689b8ffaad6d669bf24 | |
parent | a00e045cf620a25b28664293f26b35ab79fad949 (diff) |
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
(cherry picked from commit a8804dfc502454b562f1e0f5947c2f5264cd9b92)
-rw-r--r-- | winaccessibility/Library_winaccessibility.mk | 1 | ||||
-rw-r--r-- | winaccessibility/source/service/AccObjectWinManager.cxx | 9 | ||||
-rw-r--r-- | winaccessibility/source/service/checkmt.cxx | 31 | ||||
-rw-r--r-- | winaccessibility/source/service/checkmt.hxx | 26 |
4 files changed, 0 insertions, 67 deletions
diff --git a/winaccessibility/Library_winaccessibility.mk b/winaccessibility/Library_winaccessibility.mk index 45a86f3c917c..89b87a6c1767 100644 --- a/winaccessibility/Library_winaccessibility.mk +++ b/winaccessibility/Library_winaccessibility.mk @@ -45,7 +45,6 @@ $(eval $(call gb_Library_add_exception_objects,winaccessibility,\ winaccessibility/source/service/AccTopWindowListener \ winaccessibility/source/service/msaaservice_impl \ winaccessibility/source/service/AccResource \ - winaccessibility/source/service/checkmt \ )) $(eval $(call gb_Library_use_externals,winaccessibility,\ diff --git a/winaccessibility/source/service/AccObjectWinManager.cxx b/winaccessibility/source/service/AccObjectWinManager.cxx index b3aaf4c0fda6..15c9f9cc9399 100644 --- a/winaccessibility/source/service/AccObjectWinManager.cxx +++ b/winaccessibility/source/service/AccObjectWinManager.cxx @@ -44,7 +44,6 @@ #include "AccTableEventListener.hxx" #include "AccObject.hxx" #include "unomsaaevent.hxx" -#include "checkmt.hxx" using namespace std; @@ -161,14 +160,6 @@ AccObject* AccObjectWinManager::GetTopWindowAccObj(HWND hWnd) */ sal_Bool AccObjectWinManager::NotifyAccEvent(XAccessible* pXAcc,short state) { - // no idea why this checks for main thread but with this check no mutex - // is needed here (the test only accesses Application const member) - - if (!IsInMainThread()) - { - return sal_False; - } - Reference< XAccessibleContext > pRContext; if( pXAcc == NULL) diff --git a/winaccessibility/source/service/checkmt.cxx b/winaccessibility/source/service/checkmt.cxx deleted file mode 100644 index 96535c3ffb03..000000000000 --- a/winaccessibility/source/service/checkmt.cxx +++ /dev/null @@ -1,31 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#include "checkmt.hxx" -#include <vcl/svapp.hxx> - -bool IsInMainThread() -{ - if( Application::GetMainThreadIdentifier() == osl::Thread::getCurrentIdentifier()) - return true; - else - return false; -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/winaccessibility/source/service/checkmt.hxx b/winaccessibility/source/service/checkmt.hxx deleted file mode 100644 index 2c3a6d47cb7f..000000000000 --- a/winaccessibility/source/service/checkmt.hxx +++ /dev/null @@ -1,26 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#pragma once - -#include "comphelper/solarmutex.hxx" - -bool IsInMainThread(); - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |