Kaydet (Commit) 025db498 authored tarafından Julien Nabet's avatar Julien Nabet

Revert "Typo: ..syncronous..=>synchronous (dbaccess)"

This reverts commit 285654bf.
üst 285654bf
......@@ -88,7 +88,7 @@ $(eval $(call gb_Library_add_exception_objects,dbu,\
dbaccess/source/ui/app/AppTitleWindow \
dbaccess/source/ui/app/AppView \
dbaccess/source/ui/app/subcomponentmanager \
dbaccess/source/ui/browser/AsynchronousLink \
dbaccess/source/ui/browser/AsyncronousLink \
dbaccess/source/ui/browser/brwctrlr \
dbaccess/source/ui/browser/brwview \
dbaccess/source/ui/browser/dataview \
......
......@@ -117,7 +117,7 @@ namespace dbaui
TransferableClipboardListener*
m_pClipbordNotifier; // notifier for changes in the clipboard
ImplSVEvent * m_nAsyncDrop;
OAsynchronousLink m_aSelectContainerEvent;
OAsyncronousLink m_aSelectContainerEvent;
PreviewMode m_ePreviewMode; // the mode of the preview
ElementType m_eCurrentType;
bool m_bNeedToReconnect; // true when the settings of the data source were modified and the connection is no longer up to date
......
/* -*- 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 <dbaccess/AsyncronousLink.hxx>
#include <vcl/svapp.hxx>
#include <tools/debug.hxx>
// OAsyncronousLink
using namespace dbaui;
OAsyncronousLink::OAsyncronousLink( const Link& _rHandler )
:m_aHandler(_rHandler)
,m_aEventSafety()
,m_aDestructionSafety()
,m_nEventId(0)
{
}
OAsyncronousLink::~OAsyncronousLink()
{
{
::osl::MutexGuard aEventGuard( m_aEventSafety );
if ( m_nEventId )
Application::RemoveUserEvent(m_nEventId);
m_nEventId = 0;
}
{
::osl::MutexGuard aDestructionGuard( m_aDestructionSafety );
// this is just for the case we're deleted while another thread just handled the event :
// if this other thread called our link while we were deleting the event here, the
// link handler blocked. With leaving the above block it continued, but now we are prevented
// to leave this destructor 'til the link handler recognizes that nEvent == 0 and leaves.
}
}
void OAsyncronousLink::Call( void* _pArgument )
{
::osl::MutexGuard aEventGuard( m_aEventSafety );
if (m_nEventId)
Application::RemoveUserEvent(m_nEventId);
m_nEventId = Application::PostUserEvent( LINK( this, OAsyncronousLink, OnAsyncCall ), _pArgument );
}
void OAsyncronousLink::CancelCall()
{
::osl::MutexGuard aEventGuard( m_aEventSafety );
if ( m_nEventId )
Application::RemoveUserEvent( m_nEventId );
m_nEventId = 0;
}
IMPL_LINK(OAsyncronousLink, OnAsyncCall, void*, _pArg)
{
{
::osl::MutexGuard aDestructionGuard( m_aDestructionSafety );
{
::osl::MutexGuard aEventGuard( m_aEventSafety );
if (!m_nEventId)
// our destructor deleted the event just while we are waiting for m_aEventSafety
// -> get outta here
return 0;
m_nEventId = 0;
}
}
if (m_aHandler.IsSet())
return m_aHandler.Call(_pArg);
return 0L;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -42,7 +42,7 @@
#include "dbaccess_helpid.hrc"
#include "ConnectionPageSetup.hxx"
#include "UITools.hxx"
#include <dbaccess/AsynchronousLink.hxx>
#include <dbaccess/AsyncronousLink.hxx>
#include <sfx2/filedlghelper.hxx>
#include <cppuhelper/exc_hlp.hxx>
......@@ -880,7 +880,7 @@ bool ODbTypeWizDialogSetup::SaveDatabaseDocument()
Reference< XDesktop2 > m_xDesktop;
Reference< XInteractionHandler2 > m_xInteractionHandler;
OUString m_sURL;
OAsynchronousLink m_aAsyncCaller;
OAsyncronousLink m_aAsyncCaller;
public:
AsyncLoader( const Reference< XComponentContext >& _rxORB, const OUString& _rURL );
......
......@@ -96,8 +96,8 @@ namespace dbaui
TransferableClipboardListener*
m_pClipbordNotifier; // notifier for changes in the clipboard
OAsynchronousLink m_aAsyncGetCellFocus;
OAsynchronousLink m_aAsyncDisplayError;
OAsyncronousLink m_aAsyncGetCellFocus;
OAsyncronousLink m_aAsyncDisplayError;
::dbtools::SQLExceptionInfo m_aCurrentError;
OUString m_sStateSaveRecord;
......@@ -273,7 +273,7 @@ namespace dbaui
// load the form
// the default implementation does an direct load or starts a load thread, depending on the multithread capabilities
// of the data source.
// the default implementation also calls LoadFinished after a synchronous load, so be sure to do the same if you override
// the default implementation also calls LoadFinished after a syncronous load, so be sure to do the same if you override
// this metod and don't call the base class' method
virtual void LoadFinished(bool bWasSynch);
......
......@@ -36,7 +36,7 @@ namespace dbaui
event while another thread tries to delete this event in the _destructor_ of the
class).
*/
class OAsynchronousLink
class OAsyncronousLink
{
Link m_aHandler;
......@@ -47,10 +47,10 @@ namespace dbaui
public:
/** constructs the object
@param _rHandler The link to be called asynchronously
@param _rHandler The link to be called asyncronously
*/
OAsynchronousLink( const Link& _rHandler );
virtual ~OAsynchronousLink();
OAsyncronousLink( const Link& _rHandler );
virtual ~OAsyncronousLink();
bool IsRunning() const { return m_nEventId != 0; }
......
......@@ -26,7 +26,7 @@
#include <map>
#include <vector>
#include <dbaccess/AsynchronousLink.hxx>
#include <dbaccess/AsyncronousLink.hxx>
#include <dbaccess/controllerframe.hxx>
#include <dbaccess/dbaccessdllapi.h>
#include <dbaccess/IController.hxx>
......@@ -238,8 +238,8 @@ namespace dbaui
::osl::Mutex m_aFeatureMutex; // locked when features are append to or remove from deque
StateCache m_aStateCache; // save the current status of feature state
Dispatch m_arrStatusListener; // all our listeners where we dispatch status changes
OAsynchronousLink m_aAsyncInvalidateAll;
OAsynchronousLink m_aAsyncCloseTask; // called when a task should be closed
OAsyncronousLink m_aAsyncInvalidateAll;
OAsyncronousLink m_aAsyncCloseTask; // called when a task should be closed
::com::sun::star::uno::Reference< ::com::sun::star::util::XURLTransformer > m_xUrlTransformer; // needed sometimes
::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment