Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
4a7dcee7
Kaydet (Commit)
4a7dcee7
authored
Nis 27, 2015
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Clean up tools/link.hxx
Change-Id: I44e4abb228394f99109f7d7e005cfeb26e4b95c1
üst
0acd47f6
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
78 additions
and
133 deletions
+78
-133
mediator.hxx
extensions/source/plugin/inc/plugin/unx/mediator.hxx
+1
-0
plugcon.hxx
extensions/source/plugin/inc/plugin/unx/plugcon.hxx
+2
-0
svparser.hxx
include/svtools/svparser.hxx
+1
-0
link.hxx
include/tools/link.hxx
+67
-92
evntpost.hxx
include/vcl/evntpost.hxx
+1
-0
rscdef.hxx
rsc/inc/rscdef.hxx
+3
-0
refreshtimer.hxx
sc/inc/refreshtimer.hxx
+3
-0
Library_tl.mk
tools/Library_tl.mk
+0
-1
link.cxx
tools/source/generic/link.cxx
+0
-40
No files found.
extensions/source/plugin/inc/plugin/unx/mediator.hxx
Dosyayı görüntüle @
4a7dcee7
...
...
@@ -30,6 +30,7 @@
#include <string.h>
#include <tools/link.hxx>
#include <tools/solar.h>
#include <osl/pipe.hxx>
#include <osl/mutex.hxx>
#include <osl/conditn.hxx>
...
...
extensions/source/plugin/inc/plugin/unx/plugcon.hxx
Dosyayı görüntüle @
4a7dcee7
...
...
@@ -93,6 +93,8 @@ extern "C" {
#include <postx.h>
#include <tools/solar.h>
class
ConnectorInstance
{
public
:
...
...
include/svtools/svparser.hxx
Dosyayı görüntüle @
4a7dcee7
...
...
@@ -23,6 +23,7 @@
#include <svtools/svtdllapi.h>
#include <tools/link.hxx>
#include <tools/ref.hxx>
#include <tools/solar.h>
#include <rtl/textenc.h>
#include <rtl/ustring.hxx>
#include <boost/noncopyable.hpp>
...
...
include/tools/link.hxx
Dosyayı görüntüle @
4a7dcee7
...
...
@@ -16,125 +16,100 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#ifndef INCLUDED_TOOLS_LINK_HXX
#define INCLUDED_TOOLS_LINK_HXX
#include <tools/toolsdllapi.h>
#include <sal/config.h>
#include <sal/types.h>
#include <tools/
solar
.h>
#include <tools/
toolsdllapi
.h>
typedef
sal_IntPtr
(
*
PSTUB
)(
void
*
,
void
*
);
#define DECL_LINK(Member, ArgType) \
static sal_IntPtr LinkStub##Member(void *, void *); \
sal_IntPtr Member(ArgType)
#define DECL_
LINK( Method, ArgType
) \
s
al_IntPtr Method( ArgType
); \
static sal_IntPtr
LinkStub##Method( void* pThis, void*
)
#define DECL_
STATIC_LINK(Class, Member, ArgType
) \
s
tatic sal_IntPtr LinkStub##Member(void *, void *
); \
static sal_IntPtr
Member(Class *, ArgType
)
#define DECL_
STATIC_LINK( Class, Method, ArgType
) \
static sal_IntPtr LinkStub##Method( void* pThis, void*
); \
static sal_IntPtr Method( Class*, ArgType
)
#define DECL_
DLLPRIVATE_LINK(Member, ArgType
) \
SAL_DLLPRIVATE static sal_IntPtr LinkStub##Member(void *, void *
); \
SAL_DLLPRIVATE sal_IntPtr Member(ArgType
)
#define DECL_DLLPRIVATE_
LINK(Method
, ArgType) \
SAL_DLLPRIVATE s
al_IntPtr Method(ArgType
); \
SAL_DLLPRIVATE static sal_IntPtr
LinkStub##Method(void * pThis, void *
)
#define DECL_DLLPRIVATE_
STATIC_LINK(Class, Member
, ArgType) \
SAL_DLLPRIVATE s
tatic sal_IntPtr LinkStub##Member(void *, void *
); \
SAL_DLLPRIVATE static sal_IntPtr
Member(Class *, ArgType
)
#define DECL_DLLPRIVATE_STATIC_LINK(Class, Method, ArgType) \
SAL_DLLPRIVATE static sal_IntPtr LinkStub##Method( void* pThis, void* ); \
SAL_DLLPRIVATE static sal_IntPtr Method(Class *, ArgType)
#define IMPL_LINK(Class, Member, ArgType, ArgName) \
sal_IntPtr Class::LinkStub##Member(void * instance, void * data) { \
return static_cast<Class *>(instance)->Member( \
static_cast<ArgType>(data)); \
} \
sal_IntPtr Class::Member(ArgType ArgName)
#define IMPL_
STUB(Class, Method, ArgType
) \
sal_IntPtr Class::LinkStub##Me
thod( void* pThis, void* pCaller)
\
{
\
return static_cast<Class*>(pThis)->Method( static_cast<ArgType>(pCaller) );
\
}
#define IMPL_
LINK_NOARG(Class, Member
) \
sal_IntPtr Class::LinkStub##Me
mber(void * instance, void * data) {
\
return static_cast<Class *>(instance)->Member(data);
\
}
\
sal_IntPtr Class::Member(SAL_UNUSED_PARAMETER void *)
#define IMPL_STATIC_LINK(
Class, Method, ArgType, ArgName
) \
sal_IntPtr Class::LinkStub##Me
thod( void* pThis, void* pCaller)
\
{
\
return Method( static_cast<Class*>(pThis), static_cast<ArgType>(pCaller)
); \
#define IMPL_STATIC_LINK(
Class, Member, ArgType, ArgName
) \
sal_IntPtr Class::LinkStub##Me
mber(void * instance, void * data) {
\
return Member(
\
static_cast<Class *>(instance), static_cast<ArgType>(data)
); \
} \
sal_IntPtr Class::Me
thod( Class* pThis, ArgType ArgName
)
sal_IntPtr Class::Me
mber(Class * pThis, ArgType ArgName
)
#define IMPL_STATIC_LINK_NOINSTANCE(
Class, Method, ArgType, ArgName
) \
sal_IntPtr Class::LinkStub##Me
thod( void* pThis, void* pCaller)
\
{
\
return Method( static_cast<Class*>(pThis), static_cast<ArgType>(pCaller)
); \
#define IMPL_STATIC_LINK_NOINSTANCE(
Class, Member, ArgType, ArgName
) \
sal_IntPtr Class::LinkStub##Me
mber(void * instance, void * data) {
\
return Member(
\
static_cast<Class *>(instance), static_cast<ArgType>(data)
); \
} \
sal_IntPtr Class::Me
thod( SAL_UNUSED_PARAMETER Class*, ArgType ArgName
)
sal_IntPtr Class::Me
mber(SAL_UNUSED_PARAMETER Class *, ArgType ArgName
)
#define IMPL_STATIC_LINK_NOINSTANCE_NOARG( Class, Method ) \
sal_IntPtr Class::LinkStub##Method( void* pThis, void* pCaller) \
{ \
return Method( static_cast<Class*>(pThis), pCaller ); \
#define IMPL_STATIC_LINK_NOINSTANCE_NOARG(Class, Member) \
sal_IntPtr Class::LinkStub##Member(void * instance, void * data) { \
return Member(static_cast<Class *>(instance), data); \
} \
sal_IntPtr Class::Method( SAL_UNUSED_PARAMETER Class*, SAL_UNUSED_PARAMETER void* )
sal_IntPtr Class::Member( \
SAL_UNUSED_PARAMETER Class *, SAL_UNUSED_PARAMETER void *)
#define LINK(Instance, Class, Member) \
Link(static_cast<Class *>(Instance), &Class::LinkStub##Member)
#define LINK( Inst, Class, Member ) \
Link( static_cast<Class*>(Inst), &Class::LinkStub##Member )
#define EMPTYARG
#define IMPL_LINK( Class, Method, ArgType, ArgName ) \
IMPL_STUB( Class, Method, ArgType ) \
sal_IntPtr Class::Method( ArgType ArgName )
class
TOOLS_DLLPUBLIC
Link
{
public
:
typedef
sal_IntPtr
Stub
(
void
*
,
void
*
);
#define IMPL_LINK_NOARG( Class, Method ) \
IMPL_STUB( Class, Method, void* ) \
sal_IntPtr Class::Method( SAL_UNUSED_PARAMETER void* )
Link
()
:
function_
(
nullptr
),
instance_
(
nullptr
)
{}
#define EMPTYARG
Link
(
void
*
instance
,
Stub
*
function
)
:
function_
(
function
),
instance_
(
instance
)
{}
class
TOOLS_DLLPUBLIC
Link
{
void
*
pInst
;
PSTUB
pFunc
;
sal_IntPtr
Call
(
void
*
data
)
const
{
return
function_
==
nullptr
?
0
:
(
*
function_
)(
instance_
,
data
);
}
public
:
Link
();
Link
(
void
*
pLinkHdl
,
PSTUB
pMemFunc
);
bool
IsSet
()
const
{
return
function_
!=
nullptr
;
}
sal_IntPtr
Call
(
void
*
pCaller
)
const
;
bool
operator
!
()
const
{
return
!
IsSet
();
}
bool
IsSet
()
const
;
bool
operator
!
()
const
;
bool
operator
<
(
Link
const
&
other
)
const
{
return
reinterpret_cast
<
sal_uIntPtr
>
(
function_
)
<
reinterpret_cast
<
sal_uIntPtr
>
(
other
.
function_
);
};
bool
operator
==
(
const
Link
&
rLink
)
const
;
bool
operator
!=
(
const
Link
&
rLink
)
const
{
return
!
(
Link
::
operator
==
(
rLink
));
}
bool
operator
<
(
const
Link
&
rLink
)
const
{
return
reinterpret_cast
<
sal_uIntPtr
>
(
rLink
.
pFunc
)
<
reinterpret_cast
<
sal_uIntPtr
>
(
pFunc
);
}
};
bool
operator
==
(
Link
const
&
other
)
const
{
return
function_
==
other
.
function_
&&
instance_
==
other
.
instance_
;
};
bool
operator
!=
(
Link
const
&
other
)
const
{
return
!
operator
==
(
other
);
};
inline
Link
::
Link
()
{
pInst
=
0
;
pFunc
=
0
;
}
inline
Link
::
Link
(
void
*
pLinkHdl
,
PSTUB
pMemFunc
)
{
pInst
=
pLinkHdl
;
pFunc
=
pMemFunc
;
}
inline
sal_IntPtr
Link
::
Call
(
void
*
pCaller
)
const
{
return
pFunc
?
(
*
pFunc
)(
pInst
,
pCaller
)
:
0
;
}
inline
bool
Link
::
IsSet
()
const
{
if
(
pFunc
)
return
true
;
else
return
false
;
}
inline
bool
Link
::
operator
!
()
const
{
if
(
!
pFunc
)
return
true
;
else
return
false
;
}
private
:
Stub
*
function_
;
void
*
instance_
;
};
#endif
...
...
include/vcl/evntpost.hxx
Dosyayı görüntüle @
4a7dcee7
...
...
@@ -20,6 +20,7 @@
#define INCLUDED_VCL_EVNTPOST_HXX
#include <tools/link.hxx>
#include <tools/solar.h>
#include <vcl/dllapi.h>
struct
ImplSVEvent
;
...
...
rsc/inc/rscdef.hxx
Dosyayı görüntüle @
4a7dcee7
...
...
@@ -19,6 +19,9 @@
#ifndef INCLUDED_RSC_INC_RSCDEF_HXX
#define INCLUDED_RSC_INC_RSCDEF_HXX
#include <sal/config.h>
#include <tools/solar.h>
#include <tools/unqidx.hxx>
#include <rsctree.hxx>
#include <rtl/strbuf.hxx>
...
...
sc/inc/refreshtimer.hxx
Dosyayı görüntüle @
4a7dcee7
...
...
@@ -20,6 +20,9 @@
#ifndef INCLUDED_SC_INC_REFRESHTIMER_HXX
#define INCLUDED_SC_INC_REFRESHTIMER_HXX
#include <sal/config.h>
#include <tools/solar.h>
#include <vcl/timer.hxx>
#include <osl/mutex.hxx>
#include "scdllapi.h"
...
...
tools/Library_tl.mk
Dosyayı görüntüle @
4a7dcee7
...
...
@@ -58,7 +58,6 @@ $(eval $(call gb_Library_add_exception_objects,tl,\
tools/source/generic/fract \
tools/source/generic/gen \
tools/source/generic/line \
tools/source/generic/link \
tools/source/generic/point \
tools/source/generic/poly \
tools/source/generic/poly2 \
...
...
tools/source/generic/link.cxx
deleted
100644 → 0
Dosyayı görüntüle @
0acd47f6
/* -*- 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 <tools/link.hxx>
bool
Link
::
operator
==
(
const
Link
&
rLink
)
const
{
if
(
pFunc
==
rLink
.
pFunc
)
{
if
(
pFunc
)
{
if
(
pInst
==
rLink
.
pInst
)
return
true
;
else
return
false
;
}
else
return
true
;
}
else
return
false
;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment