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
0f11f30e
Kaydet (Commit)
0f11f30e
authored
Haz 27, 2012
tarafından
Thomas Arnhold
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Remove unused header files
Those are unused too. Change-Id: I09c9dbcdbc68131c7c54bf0762a23f1280e6e22a
üst
8122fdb0
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
0 additions
and
2353 deletions
+0
-2353
Package_inc.mk
cppu/Package_inc.mk
+0
-3
FreeReference.hxx
cppu/inc/cppu/FreeReference.hxx
+0
-160
Shield.hxx
cppu/inc/cppu/Shield.hxx
+0
-84
cuno.h
cppu/inc/uno/cuno.h
+0
-43
arguments.h
framework/inc/arguments.h
+0
-167
basedispatcher.hxx
framework/inc/dispatch/basedispatcher.hxx
+0
-383
task.hxx
framework/inc/services/task.hxx
+0
-491
Package_inc.mk
salhelper/Package_inc.mk
+0
-1
monitor.hxx
salhelper/inc/salhelper/monitor.hxx
+0
-282
optdlg.hxx
sd/source/ui/inc/optdlg.hxx
+0
-49
ConstrainedIterator.cxx
sd/source/ui/toolpanel/ConstrainedIterator.cxx
+0
-259
ConstrainedIterator.hxx
sd/source/ui/toolpanel/ConstrainedIterator.hxx
+0
-98
preinclude.h
solenv/inc/preinclude.h
+0
-32
Package_inc.mk
svtools/Package_inc.mk
+0
-1
expander.hxx
svtools/inc/svtools/expander.hxx
+0
-86
io.hxx
sw/inc/io.hxx
+0
-158
functional.hxx
xmloff/inc/xmloff/functional.hxx
+0
-56
No files found.
cppu/Package_inc.mk
Dosyayı görüntüle @
0f11f30e
...
...
@@ -41,10 +41,8 @@ $(eval $(call gb_Package_add_file,cppu_inc,inc/cppu/cppudllapi.h,cppu/cppudllapi
$(eval
$(call
gb_Package_add_file,cppu_inc,inc/cppu/EnvDcp.hxx,cppu/EnvDcp.hxx))
$(eval
$(call
gb_Package_add_file,cppu_inc,inc/cppu/Enterable.hxx,cppu/Enterable.hxx))
$(eval
$(call
gb_Package_add_file,cppu_inc,inc/cppu/EnvGuards.hxx,cppu/EnvGuards.hxx))
$(eval
$(call
gb_Package_add_file,cppu_inc,inc/cppu/FreeReference.hxx,cppu/FreeReference.hxx))
$(eval
$(call
gb_Package_add_file,cppu_inc,inc/cppu/macros.hxx,cppu/macros.hxx))
$(eval
$(call
gb_Package_add_file,cppu_inc,inc/cppu/Map.hxx,cppu/Map.hxx))
$(eval
$(call
gb_Package_add_file,cppu_inc,inc/cppu/Shield.hxx,cppu/Shield.hxx))
$(eval
$(call
gb_Package_add_file,cppu_inc,inc/cppu/unotype.hxx,cppu/unotype.hxx))
$(eval
$(call
gb_Package_add_file,cppu_inc,inc/cppu/helper/purpenv/Environment.hxx,cppu/helper/purpenv/Environment.hxx))
$(eval
$(call
gb_Package_add_file,cppu_inc,inc/cppu/helper/purpenv/Mapping.hxx,cppu/helper/purpenv/Mapping.hxx))
...
...
@@ -53,7 +51,6 @@ $(eval $(call gb_Package_add_file,cppu_inc,inc/typelib/typedescription.h,typelib
$(eval
$(call
gb_Package_add_file,cppu_inc,inc/typelib/typedescription.hxx,typelib/typedescription.hxx))
$(eval
$(call
gb_Package_add_file,cppu_inc,inc/typelib/uik.h,typelib/uik.h))
$(eval
$(call
gb_Package_add_file,cppu_inc,inc/uno/any2.h,uno/any2.h))
$(eval
$(call
gb_Package_add_file,cppu_inc,inc/uno/cuno.h,uno/cuno.h))
$(eval
$(call
gb_Package_add_file,cppu_inc,inc/uno/current_context.h,uno/current_context.h))
$(eval
$(call
gb_Package_add_file,cppu_inc,inc/uno/current_context.hxx,uno/current_context.hxx))
$(eval
$(call
gb_Package_add_file,cppu_inc,inc/uno/data.h,uno/data.h))
...
...
cppu/inc/cppu/FreeReference.hxx
deleted
100644 → 0
Dosyayı görüntüle @
8122fdb0
/* -*- 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 .
*/
#ifndef INCLUDED_cppu_FreeReference_hxx
#define INCLUDED_cppu_FreeReference_hxx
#include "uno/environment.hxx"
#include "cppu/Map.hxx"
#include "com/sun/star/uno/Reference.h"
namespace
cssuno
=
com
::
sun
::
star
::
uno
;
namespace
cppu
{
/** Freely (environment independent) usable Reference.
(http://wiki.services.openoffice.org/wiki/Uno/Cpp/Spec/FreeReference)
@since UDK 3.2.7
*/
template
<
class
T
>
class
FreeReference
{
cssuno
::
Environment
m_env
;
T
*
m_pObject
;
public
:
FreeReference
()
:
m_pObject
(
NULL
)
{}
FreeReference
(
T
*
pObject
,
__sal_NoAcquire
)
:
m_env
(
cssuno
::
Environment
::
getCurrent
()),
m_pObject
(
pObject
)
{
}
FreeReference
(
T
*
pObject
)
:
m_env
(
cssuno
::
Environment
::
getCurrent
()),
m_pObject
(
pObject
)
{
if
(
m_pObject
)
m_env
.
get
()
->
pExtEnv
->
acquireInterface
(
m_env
.
get
()
->
pExtEnv
,
m_pObject
);
}
explicit
FreeReference
(
cssuno
::
Reference
<
T
>
const
&
xRef
)
:
m_env
(
cssuno
::
Environment
::
getCurrent
()),
m_pObject
(
xRef
.
get
())
{
if
(
m_pObject
)
m_env
.
get
()
->
pExtEnv
->
acquireInterface
(
m_env
.
get
()
->
pExtEnv
,
m_pObject
);
}
FreeReference
(
FreeReference
<
T
>
const
&
rOther
)
:
m_env
(
rOther
.
m_env
),
m_pObject
(
rOther
.
m_pObject
)
{
if
(
m_pObject
)
m_env
.
get
()
->
pExtEnv
->
acquireInterface
(
m_env
.
get
()
->
pExtEnv
,
m_pObject
);
}
~
FreeReference
()
{
clear
();
}
cssuno
::
Environment
getEnv
()
const
throw
(
cssuno
::
RuntimeException
)
{
return
m_env
;
}
cssuno
::
Reference
<
T
>
get
()
const
throw
(
cssuno
::
RuntimeException
)
{
return
cssuno
::
Reference
<
T
>
(
cppu
::
mapIn
(
m_pObject
,
m_env
),
SAL_NO_ACQUIRE
);
}
operator
cssuno
::
Reference
<
T
>
()
const
throw
(
cssuno
::
RuntimeException
)
{
return
get
();
}
cssuno
::
Reference
<
T
>
operator
->
()
const
throw
(
cssuno
::
RuntimeException
)
{
return
get
();
}
bool
is
()
const
throw
(
cssuno
::
RuntimeException
)
{
return
m_pObject
!=
NULL
;
}
void
clear
()
{
if
(
m_pObject
)
{
m_env
.
get
()
->
pExtEnv
->
releaseInterface
(
m_env
.
get
()
->
pExtEnv
,
m_pObject
);
m_pObject
=
NULL
;
m_env
.
clear
();
}
}
FreeReference
<
T
>
&
operator
=
(
FreeReference
<
T
>
const
&
rOther
)
{
clear
();
m_pObject
=
rOther
.
m_pObject
;
if
(
m_pObject
)
{
m_env
=
rOther
.
m_env
;
m_env
.
get
()
->
pExtEnv
->
acquireInterface
(
m_env
.
get
()
->
pExtEnv
,
m_pObject
);
}
return
*
this
;
}
void
set
(
cssuno
::
Reference
<
T
>
const
&
xRef
)
{
clear
();
m_pObject
=
xRef
.
get
();
if
(
m_pObject
)
{
m_env
=
cssuno
::
Environment
::
getCurrent
();
m_env
.
get
()
->
pExtEnv
->
acquireInterface
(
m_env
.
get
()
->
pExtEnv
,
m_pObject
);
}
}
bool
operator
==
(
FreeReference
const
&
rOther
)
const
{
return
get
()
==
rOther
.
get
();
}
bool
operator
!=
(
FreeReference
const
&
rOther
)
const
{
return
!
operator
==
(
rOther
);
}
};
}
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
cppu/inc/cppu/Shield.hxx
deleted
100644 → 0
Dosyayı görüntüle @
8122fdb0
/* -*- 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 .
*/
#ifndef INCLUDED_cppu_Shield_hxx
#define INCLUDED_cppu_Shield_hxx
#include <cppu/Map.hxx>
namespace
cssu
=
com
::
sun
::
star
::
uno
;
namespace
cppu
{
/** Helpers for mapping objects relative to the thread-safe and current environments.
(http://wiki.services.openoffice.org/wiki/Uno/Cpp/Spec/Shield_Helpers)
*/
/** Maps an object from the current to the thread-safe Environment, returns mapped object.
@param pT the object to be mapped
@return the mapped object
@since UDK 3.2.7
*/
template
<
class
T
>
inline
T
*
shield
(
T
*
pT
)
{
return
mapOut
(
pT
,
cssu
::
Environment
(
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
CPPU_STRINGIFY
(
CPPU_ENV
)))));
}
/** Maps an object from the thread-safe Environment to the current one, returns mapped object.
@param pT the object to be mapped
@return the mapped object
@since UDK 3.2.7
*/
template
<
class
T
>
inline
T
*
unshield
(
T
*
pT
)
{
return
mapIn
(
pT
,
cssu
::
Environment
(
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
CPPU_STRINGIFY
(
CPPU_ENV
)))));
}
/** Maps an any from the current to the thread-safe Environment, fills the passed any.
@param any the any to be mapped
@param res the target any
@since UDK 3.2.7
*/
inline
void
shieldAny
(
cssu
::
Any
const
&
any
,
cssu
::
Any
*
res
)
{
mapOutAny
(
any
,
res
,
cssu
::
Environment
(
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
CPPU_STRINGIFY
(
CPPU_ENV
)))));
}
/** Maps an any from the thread-safe Environment to the current one, fills the passed any.
@param any the any to be mapped
@param res the target any
@since UDK 3.2.7
*/
inline
void
unshieldAny
(
cssu
::
Any
const
&
any
,
cssu
::
Any
*
res
)
{
mapInAny
(
any
,
res
,
cssu
::
Environment
(
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
CPPU_STRINGIFY
(
CPPU_ENV
)))));
}
}
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
cppu/inc/uno/cuno.h
deleted
100644 → 0
Dosyayı görüntüle @
8122fdb0
/* -*- 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 .
*/
#ifndef _UNO_CUNO_H_
#define _UNO_CUNO_H_
#include <sal/types.h>
#define CUNO_ERROR_NONE 0
#define CUNO_ERROR_CALL_FAILED (1 << 31)
#define CUNO_ERROR_EXCEPTION (1 | CUNO_ERROR_CALL_FAILED)
/** macro to call on a C interface
@param interface_pointer interface pointer
*/
#define CUNO_CALL( interface_pointer ) (*interface_pointer)
/** macro to test if an exception was signalled.
@param return_code return code of call
*/
#define CUNO_EXCEPTION_OCCURRED( return_code ) (0 != ((return_code) & CUNO_ERROR_EXCEPTION))
typedef
sal_Int32
cuno_ErrorCode
;
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
framework/inc/arguments.h
deleted
100644 → 0
Dosyayı görüntüle @
8122fdb0
/* -*- 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 .
*/
#ifndef __FRAMEWORK_ARGUMENTS_H_
#define __FRAMEWORK_ARGUMENTS_H_
//_________________________________________________________________________________________________________________
// includes
//_________________________________________________________________________________________________________________
#include <macros/generic.hxx>
//_________________________________________________________________________________________________________________
// namespace
//_________________________________________________________________________________________________________________
namespace
framework
{
/*-************************************************************************************************************//**
@short These arguments are included in given parameter lists - e.g. at dispatch calls at Sequence< PropertyValue >.
You can use class ArgumentAnalyzer to set/get it from a given list!
*//*-*************************************************************************************************************/
#define ARGUMENTNAME_ASTEMPLATE DECLARE_ASCII("AsTemplate" ) // bool
#define ARGUMENTNAME_CHARACTERSET DECLARE_ASCII("CharacterSet" ) // string
#define ARGUMENTNAME_DEEPDETECTION DECLARE_ASCII("DeepDetection" ) // bool
#define ARGUMENTNAME_DETECTSERVICE DECLARE_ASCII("DetectService" ) // string
#define ARGUMENTNAME_EXTENSION DECLARE_ASCII("Extension" ) // string
#define ARGUMENTNAME_FILTERNAME DECLARE_ASCII("FilterName" ) // string
#define ARGUMENTNAME_FILTEROPTIONS DECLARE_ASCII("FilterOptions" ) // string
#define ARGUMENTNAME_FORMAT DECLARE_ASCII("Format" ) // string
#define ARGUMENTNAME_FRAMENAME DECLARE_ASCII("FrameName" ) // string
#define ARGUMENTNAME_HIDDEN DECLARE_ASCII("Hidden" ) // bool
#define ARGUMENTNAME_INPUTSTREAM DECLARE_ASCII("InputStream" ) // Reference< XInputStream >
#define ARGUMENTNAME_INTERACTIONHANDLER DECLARE_ASCII("InteractionHandler" ) // Reference< XInteractionHandler >
#define ARGUMENTNAME_JUMPMARK DECLARE_ASCII("JumpMark" ) // string
#define ARGUMENTNAME_MACROEXECUTIONMODE DECLARE_ASCII("MacroExecutionMode" ) // int16
#define ARGUMENTNAME_MEDIATYPE DECLARE_ASCII("MediaType" ) // string
#define ARGUMENTNAME_MINIMIZED DECLARE_ASCII("Minimized" ) // bool
#define ARGUMENTNAME_OPENNEWVIEW DECLARE_ASCII("OpenNewView" ) // bool
#define ARGUMENTNAME_OUTPUTSTREAM DECLARE_ASCII("OutputStream" ) // Reference< XOutputStream >
#define ARGUMENTNAME_PATTERN DECLARE_ASCII("Pattern" ) // string
#define ARGUMENTNAME_POSSIZE DECLARE_ASCII("PosSize" ) // rectangle
#define ARGUMENTNAME_POSTDATA DECLARE_ASCII("PostData" ) // Reference< XInputStream >
#define ARGUMENTNAME_POSTSTRING DECLARE_ASCII("PostString" ) // string
#define ARGUMENTNAME_PREVIEW DECLARE_ASCII("Preview" ) // bool
#define ARGUMENTNAME_READONLY DECLARE_ASCII("ReadOnly" ) // bool
#define ARGUMENTNAME_REFERRER DECLARE_ASCII("Referer" ) // string
#define ARGUMENTNAME_SILENT DECLARE_ASCII("Silent" ) // bool
#define ARGUMENTNAME_STATUSINDICATOR DECLARE_ASCII("StatusIndicator" ) // Reference< XStatusIndicator >
#define ARGUMENTNAME_TEMPLATENAME DECLARE_ASCII("TemplateName" ) // string
#define ARGUMENTNAME_TEMPLATEREGIONNAME DECLARE_ASCII("TemplateRegionName" ) // string
#define ARGUMENTNAME_TYPENAME DECLARE_ASCII("TypeName" ) // string
#define ARGUMENTNAME_UPDATEDOCMODE DECLARE_ASCII("UpdateDocMode" ) // int16
#define ARGUMENTNAME_URL DECLARE_ASCII("URL" ) // string
#define ARGUMENTNAME_VERSION DECLARE_ASCII("Version" ) // int16
#define ARGUMENTNAME_VIEWID DECLARE_ASCII("ViewId" ) // int16
#define ARGUMENTNAME_REPAIRPACKAGE DECLARE_ASCII("RepairPackage" ) // bool
#define ARGUMENTNAME_DOCUMENTTITLE DECLARE_ASCII("DocumentTitle" ) // string
/*-************************************************************************************************************//**
@short define our argument mask
@descr These mask could be used to define a subset for analyzing arguments or specify
one argument for set/get operations.
We use first byte [bit 0..7] of an int32 to define 8 layer, and follow 3 bytes [bit 8..31]
to address 24 properties per layer! Please use defines to build these mask!!!
With these values we build an special enum field for better using at our Argumentanalyzer-interface ...
Special define ANALYZE_ALL is our default for analyzing. Then we analyze complete argument list.
*//*-*************************************************************************************************************/
#define ARGUMENTLAYER_1 0x00000001
#define ARGUMENTLAYER_2 0x00000002
#define ARGUMENTLAYER_3 0x00000004
#define ARGUMENTLAYER_4 0x00000008
#define ARGUMENTLAYER_5 0x00000010
#define ARGUMENTLAYER_6 0x00000020
#define ARGUMENTLAYER_7 0x00000040
#define ARGUMENTLAYER_8 0x00000080
#define ARGUMENTFLAG_1 0x00000100
#define ARGUMENTFLAG_2 0x00000200
#define ARGUMENTFLAG_3 0x00000400
#define ARGUMENTFLAG_4 0x00000800
#define ARGUMENTFLAG_5 0x00001000
#define ARGUMENTFLAG_6 0x00002000
#define ARGUMENTFLAG_7 0x00004000
#define ARGUMENTFLAG_8 0x00008000
#define ARGUMENTFLAG_9 0x00010000
#define ARGUMENTFLAG_10 0x00020000
#define ARGUMENTFLAG_11 0x00040000
#define ARGUMENTFLAG_12 0x00080000
#define ARGUMENTFLAG_13 0x00100000
#define ARGUMENTFLAG_14 0x00200000
#define ARGUMENTFLAG_15 0x00400000
#define ARGUMENTFLAG_16 0x00800000
#define ARGUMENTFLAG_17 0x01000000
#define ARGUMENTFLAG_18 0x02000000
#define ARGUMENTFLAG_19 0x04000000
#define ARGUMENTFLAG_20 0x08000000
#define ARGUMENTFLAG_21 0x10000000
#define ARGUMENTFLAG_22 0x20000000
#define ARGUMENTFLAG_23 0x40000000
#define ARGUMENTFLAG_24 0x80000000
#define ANALYZE_ALL_ARGUMENTS 0xFFFFFFFF
enum
EArgument
{
E_ASTEMPLATE
=
ARGUMENTLAYER_1
|
ARGUMENTFLAG_1
,
E_CHARACTERSET
=
ARGUMENTLAYER_1
|
ARGUMENTFLAG_2
,
E_DEEPDETECTION
=
ARGUMENTLAYER_1
|
ARGUMENTFLAG_3
,
E_DETECTSERVICE
=
ARGUMENTLAYER_1
|
ARGUMENTFLAG_4
,
E_EXTENSION
=
ARGUMENTLAYER_1
|
ARGUMENTFLAG_5
,
E_FILTERNAME
=
ARGUMENTLAYER_1
|
ARGUMENTFLAG_6
,
E_FILTEROPTIONS
=
ARGUMENTLAYER_1
|
ARGUMENTFLAG_7
,
E_FORMAT
=
ARGUMENTLAYER_1
|
ARGUMENTFLAG_8
,
E_FRAMENAME
=
ARGUMENTLAYER_1
|
ARGUMENTFLAG_9
,
E_HIDDEN
=
ARGUMENTLAYER_1
|
ARGUMENTFLAG_10
,
E_INPUTSTREAM
=
ARGUMENTLAYER_1
|
ARGUMENTFLAG_11
,
E_INTERACTIONHANDLER
=
ARGUMENTLAYER_1
|
ARGUMENTFLAG_12
,
E_JUMPMARK
=
ARGUMENTLAYER_1
|
ARGUMENTFLAG_13
,
E_MACROEXECUTIONMODE
=
ARGUMENTLAYER_1
|
ARGUMENTFLAG_14
,
E_MEDIATYPE
=
ARGUMENTLAYER_1
|
ARGUMENTFLAG_15
,
E_MINIMIZED
=
ARGUMENTLAYER_1
|
ARGUMENTFLAG_16
,
E_OPENNEWVIEW
=
ARGUMENTLAYER_1
|
ARGUMENTFLAG_17
,
E_OUTPUTSTREAM
=
ARGUMENTLAYER_1
|
ARGUMENTFLAG_18
,
E_PATTERN
=
ARGUMENTLAYER_1
|
ARGUMENTFLAG_19
,
E_POSSIZE
=
ARGUMENTLAYER_1
|
ARGUMENTFLAG_20
,
E_POSTDATA
=
ARGUMENTLAYER_1
|
ARGUMENTFLAG_21
,
E_POSTSTRING
=
ARGUMENTLAYER_1
|
ARGUMENTFLAG_22
,
E_PREVIEW
=
ARGUMENTLAYER_1
|
ARGUMENTFLAG_23
,
E_READONLY
=
ARGUMENTLAYER_1
|
ARGUMENTFLAG_24
,
E_REFERRER
=
ARGUMENTLAYER_2
|
ARGUMENTFLAG_1
,
E_SILENT
=
ARGUMENTLAYER_2
|
ARGUMENTFLAG_2
,
E_STATUSINDICATOR
=
ARGUMENTLAYER_2
|
ARGUMENTFLAG_3
,
E_TEMPLATENAME
=
ARGUMENTLAYER_2
|
ARGUMENTFLAG_4
,
E_TEMPLATEREGIONNAME
=
ARGUMENTLAYER_2
|
ARGUMENTFLAG_5
,
E_TYPENAME
=
ARGUMENTLAYER_2
|
ARGUMENTFLAG_6
,
E_UPDATEDOCMODE
=
ARGUMENTLAYER_2
|
ARGUMENTFLAG_7
,
E_URL
=
ARGUMENTLAYER_2
|
ARGUMENTFLAG_8
,
E_VERSION
=
ARGUMENTLAYER_2
|
ARGUMENTFLAG_9
,
E_VIEWID
=
ARGUMENTLAYER_2
|
ARGUMENTFLAG_10
,
E_REPAIRPACKAGE
=
ARGUMENTLAYER_2
|
ARGUMENTFLAG_11
,
E_DOCUMENTTITLE
=
ARGUMENTLAYER_2
|
ARGUMENTFLAG_12
};
}
// namespace framework
#endif // #ifndef __FRAMEWORK_ARGUMENTS_H_
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
framework/inc/dispatch/basedispatcher.hxx
deleted
100644 → 0
Dosyayı görüntüle @
8122fdb0
/* -*- 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 .
*/
#ifndef __FRAMEWORK_DISPATCH_BASEDISPATCHER_HXX_
#define __FRAMEWORK_DISPATCH_BASEDISPATCHER_HXX_
//_________________________________________________________________________________________________________________
// my own includes
//_________________________________________________________________________________________________________________
#include <classes/taskcreator.hxx>
#include <threadhelp/resetableguard.hxx>
#include <threadhelp/threadhelpbase.hxx>
#include <threadhelp/transactionbase.hxx>
#include <macros/xinterface.hxx>
#include <macros/xtypeprovider.hxx>
#include <macros/debug.hxx>
#include <macros/generic.hxx>
#include <stdtypes.h>
//_________________________________________________________________________________________________________________
// interface includes
//_________________________________________________________________________________________________________________
#include <com/sun/star/lang/XTypeProvider.hpp>
#include <com/sun/star/frame/XNotifyingDispatch.hpp>
#include <com/sun/star/util/URL.hpp>
#include <com/sun/star/frame/DispatchDescriptor.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/frame/XDispatchResultListener.hpp>
#include <com/sun/star/frame/XFrameLoader.hpp>
#include <com/sun/star/frame/XLoadEventListener.hpp>
#include <com/sun/star/frame/XDesktop.hpp>
#include <com/sun/star/frame/FeatureStateEvent.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
//_________________________________________________________________________________________________________________
// other includes
//_________________________________________________________________________________________________________________
#include <cppuhelper/weak.hxx>
#include <cppuhelper/weakref.hxx>
#include <cppuhelper/interfacecontainer.h>
/*DRAFT
#include <unotools/historyoptions.hxx>
*/
//_________________________________________________________________________________________________________________
// namespace
//_________________________________________________________________________________________________________________
namespace
framework
{
//_________________________________________________________________________________________________________________
// exported const
//_________________________________________________________________________________________________________________
//_________________________________________________________________________________________________________________
// exported definitions
//_________________________________________________________________________________________________________________
/*-************************************************************************************************************//**
@descr We must support loading of different URLs with different handler or loader into different tasks simultaniously.
They call us back to return state of operation. We need some informations to distinguish
between these different "loading threads".
This is the reason to implement this dynamicly list.
@attention I maked class LoaderThreads threadsafe! Using will be easier in a multithreaded environment.
struct DispatchBinding doesn't need that!
*//*-*************************************************************************************************************/
struct
LoadBinding
{
//-------------------------------------------------------------------------------------------------------------
public
:
//---------------------------------------------------------------------------------------------------------
inline
LoadBinding
()
{
free
();
}
//---------------------------------------------------------------------------------------------------------
// use to initialize struct for asynchronous dispatching by using handler
inline
LoadBinding
(
const
css
::
util
::
URL
&
aNewURL
,
const
css
::
uno
::
Sequence
<
css
::
beans
::
PropertyValue
>
lNewDescriptor
,
const
css
::
uno
::
Reference
<
css
::
frame
::
XDispatch
>&
xNewHandler
,
const
css
::
uno
::
Any
&
aNewAsyncInfo
)
{
free
();
xHandler
=
xNewHandler
;
aURL
=
aNewURL
;
lDescriptor
=
lNewDescriptor
;
aAsyncInfo
=
aNewAsyncInfo
;
}
//---------------------------------------------------------------------------------------------------------
// use to initialize struct for asynchronous loading by using frame loader
inline
LoadBinding
(
const
css
::
util
::
URL
&
aNewURL
,
const
css
::
uno
::
Sequence
<
css
::
beans
::
PropertyValue
>
lNewDescriptor
,
const
css
::
uno
::
Reference
<
css
::
frame
::
XFrame
>&
xNewFrame
,
const
css
::
uno
::
Reference
<
css
::
frame
::
XFrameLoader
>&
xNewLoader
,
const
css
::
uno
::
Any
&
aNewAsyncInfo
)
{
free
();
xLoader
=
xNewLoader
;
xFrame
=
xNewFrame
;
aURL
=
aNewURL
;
lDescriptor
=
lNewDescriptor
;
aAsyncInfo
=
aNewAsyncInfo
;
}
//---------------------------------------------------------------------------------------------------------
// dont forget toe release used references
inline
~
LoadBinding
()
{
free
();
}
//---------------------------------------------------------------------------------------------------------
inline
void
free
()
{
xHandler
=
css
::
uno
::
Reference
<
css
::
frame
::
XDispatch
>
()
;
xLoader
=
css
::
uno
::
Reference
<
css
::
frame
::
XFrameLoader
>
();
xFrame
=
css
::
uno
::
Reference
<
css
::
frame
::
XFrame
>
()
;
aURL
=
css
::
util
::
URL
()
;
lDescriptor
=
css
::
uno
::
Sequence
<
css
::
beans
::
PropertyValue
>
();
aAsyncInfo
=
css
::
uno
::
Any
()
;
}
//-------------------------------------------------------------------------------------------------------------
public
:
css
::
uno
::
Reference
<
css
::
frame
::
XDispatch
>
xHandler
;
// if handler was used, this reference will be valid
css
::
uno
::
Reference
<
css
::
frame
::
XFrameLoader
>
xLoader
;
// if loader was used, this reference will be valid
css
::
uno
::
Reference
<
css
::
frame
::
XFrame
>
xFrame
;
// Target of loading
css
::
util
::
URL
aURL
;
// dispatched URL - neccessary to find listener for status event!
css
::
uno
::
Sequence
<
css
::
beans
::
PropertyValue
>
lDescriptor
;
// dispatched arguments - neccessary for "reactForLoadingState()"!
css
::
uno
::
Any
aAsyncInfo
;
// superclasses could use them to save her own user specific data for these asynchron call-info
css
::
uno
::
Reference
<
css
::
frame
::
XDispatchResultListener
>
xListener
;
};
//*****************************************************************************************************************
class
LoaderThreads
:
private
::
std
::
vector
<
LoadBinding
>
,
private
ThreadHelpBase
{
//-------------------------------------------------------------------------------------------------------------
public
:
//---------------------------------------------------------------------------------------------------------
inline
LoaderThreads
()
:
ThreadHelpBase
()
{
}
//---------------------------------------------------------------------------------------------------------
inline
void
append
(
const
LoadBinding
&
aBinding
)
{
ResetableGuard
aGuard
(
m_aLock
);
push_back
(
aBinding
);
}
//---------------------------------------------------------------------------------------------------------
/// search for handler thread in list wich match given parameter and delete it
inline
sal_Bool
searchAndForget
(
const
css
::
uno
::
Reference
<
css
::
frame
::
XDispatchResultListener
>&
rListener
,
LoadBinding
&
aBinding
)
{
ResetableGuard
aGuard
(
m_aLock
);
sal_Bool
bFound
=
sal_False
;
for
(
iterator
pItem
=
begin
();
pItem
!=
end
();
++
pItem
)
{
if
(
pItem
->
xListener
==
rListener
)
{
aBinding
=
*
pItem
;
erase
(
pItem
);
bFound
=
sal_True
;
break
;
}
}
return
bFound
;
}
//---------------------------------------------------------------------------------------------------------
/// search for loader thread in list wich match given parameter and delete it
inline
sal_Bool
searchAndForget
(
const
css
::
uno
::
Reference
<
css
::
frame
::
XFrameLoader
>
xLoader
,
LoadBinding
&
aBinding
)
{
ResetableGuard
aGuard
(
m_aLock
);
sal_Bool
bFound
=
sal_False
;
for
(
iterator
pItem
=
begin
();
pItem
!=
end
();
++
pItem
)
{
if
(
pItem
->
xLoader
==
xLoader
)
{
aBinding
=
*
pItem
;
erase
(
pItem
);
bFound
=
sal_True
;
break
;
}
}
return
bFound
;
}
//---------------------------------------------------------------------------------------------------------
// free ALL memory ... I hope it
inline
void
free
()
{
ResetableGuard
aGuard
(
m_aLock
);
LoaderThreads
().
swap
(
*
this
);
}
};
/*-************************************************************************************************************//**
@short base class for dispatcher implementations
@descr Most of our dispatch implementations do everytime the same. They try to handle or load
somethinmg into a target ... normaly a frame/task/pluginframe!
They must do it synchron or sometimes asynchron. They must wait for callbacks and
notify registered listener with right status events.
All these things are implemented by this baseclass. You should override some methods
to change something.
"dispatch()" => should be you dispatch algorithm
"reactForLoadingState()" => do something depending from loading state ...
@implements XInterface
XDispatch
XLoadEventListener
XEventListener
@base ThreadHelpBase
TransactionBase
OWeakObject
@devstatus ready to use
@threadsafe yes
*//*-*************************************************************************************************************/
class
BaseDispatcher
:
// interfaces
public
css
::
lang
::
XTypeProvider
,
public
css
::
frame
::
XNotifyingDispatch
,
public
css
::
frame
::
XLoadEventListener
,
// => XEventListener too!
// baseclasses
// Order is neccessary for right initialization!
protected
ThreadHelpBase
,
protected
TransactionBase
,
public
::
cppu
::
OWeakObject
{
//-------------------------------------------------------------------------------------------------------------
// public methods
//-------------------------------------------------------------------------------------------------------------
public
:
// constructor / destructor
BaseDispatcher
(
const
css
::
uno
::
Reference
<
css
::
lang
::
XMultiServiceFactory
>&
xFactory
,
const
css
::
uno
::
Reference
<
css
::
frame
::
XFrame
>&
xOwnerFrame
);
void
dispatchFinished
(
const
css
::
frame
::
DispatchResultEvent
&
aEvent
,
const
css
::
uno
::
Reference
<
css
::
frame
::
XDispatchResultListener
>&
rListener
);
// XInterface
DECLARE_XINTERFACE
DECLARE_XTYPEPROVIDER
// XNotifyingDispatch
virtual
void
SAL_CALL
dispatchWithNotification
(
const
css
::
util
::
URL
&
aURL
,
const
css
::
uno
::
Sequence
<
css
::
beans
::
PropertyValue
>&
aArgs
,
const
css
::
uno
::
Reference
<
css
::
frame
::
XDispatchResultListener
>&
Listener
)
throw
(
css
::
uno
::
RuntimeException
);
// XDispatch
virtual
void
SAL_CALL
dispatch
(
const
css
::
util
::
URL
&
aURL
,
const
css
::
uno
::
Sequence
<
css
::
beans
::
PropertyValue
>&
lArguments
)
throw
(
css
::
uno
::
RuntimeException
)
=
0
;
virtual
void
SAL_CALL
addStatusListener
(
const
css
::
uno
::
Reference
<
css
::
frame
::
XStatusListener
>&
xListener
,
const
css
::
util
::
URL
&
aURL
)
throw
(
css
::
uno
::
RuntimeException
);
virtual
void
SAL_CALL
removeStatusListener
(
const
css
::
uno
::
Reference
<
css
::
frame
::
XStatusListener
>&
xListener
,
const
css
::
util
::
URL
&
aURL
)
throw
(
css
::
uno
::
RuntimeException
);
// XLoadEventListener
virtual
void
SAL_CALL
loadFinished
(
const
css
::
uno
::
Reference
<
css
::
frame
::
XFrameLoader
>&
xLoader
)
throw
(
css
::
uno
::
RuntimeException
);
virtual
void
SAL_CALL
loadCancelled
(
const
css
::
uno
::
Reference
<
css
::
frame
::
XFrameLoader
>&
xLoader
)
throw
(
css
::
uno
::
RuntimeException
);
// XEventListener
virtual
void
SAL_CALL
disposing
(
const
css
::
lang
::
EventObject
&
aEvent
)
throw
(
css
::
uno
::
RuntimeException
);
//-------------------------------------------------------------------------------------------------------------
// protected methods
//-------------------------------------------------------------------------------------------------------------
protected
:
virtual
~
BaseDispatcher
();
/*-****************************************************************************************************//**
@short you should react for successfully or failed load/handle operations.
@descr These baseclass implement handling of dispatched URLs and synchronous/asynchronous loading
of it into a target frame. It implement the complete listener mechanism to get events from
used loader or handler and sending of status events to registered listener too!
But we couldn't react for this events in all cases.
May be - you wish to reactivate suspended controllers or wish to delete a new created
task if operation failed ...!?
By overwriting these pure virtual methods it's possible to do such things.
We call you with all available informations ... you should react for it.
BUT - don't send any status events to your listener! We will do it everytime.
(other listener could be informed as well!)
You will called back in: a) "reactForLoadingState()" , if URL was loaded into a frame
b) "reactForHandlingState()", if URL was handled by a registered content handler
(without using a target frame!)
@seealso method statusChanged()
@seealso method loadFinished()
@seealso method loadCancelled()
@param "aURL" , original dispatched URL
@param "lDescriptor" , original dispatched arguments
@param "xTarget" , target of operation (could be NULL if URL was handled not loaded!)
@param "bState" , state of operation
@return -
@onerror -
@threadsafe -
*//*-*****************************************************************************************************/
virtual
void
SAL_CALL
reactForLoadingState
(
const
css
::
util
::
URL
&
aURL
,
const
css
::
uno
::
Sequence
<
css
::
beans
::
PropertyValue
>&
lDescriptor
,
const
css
::
uno
::
Reference
<
css
::
frame
::
XFrame
>&
xTarget
,
sal_Bool
bState
,
const
css
::
uno
::
Any
&
aAsyncInfo
)
=
0
;
virtual
void
SAL_CALL
reactForHandlingState
(
const
css
::
util
::
URL
&
aURL
,
const
css
::
uno
::
Sequence
<
css
::
beans
::
PropertyValue
>&
lDescriptor
,
sal_Bool
bState
,
const
css
::
uno
::
Any
&
aAsyncInfo
)
=
0
;
//-------------------------------------------------------------------------------------------------------------
// protected methods
//-------------------------------------------------------------------------------------------------------------
protected
:
::
rtl
::
OUString
implts_detectType
(
const
css
::
util
::
URL
&
aURL
,
css
::
uno
::
Sequence
<
css
::
beans
::
PropertyValue
>&
lDescriptor
,
sal_Bool
bDeep
);
sal_Bool
implts_handleIt
(
const
css
::
util
::
URL
&
aURL
,
css
::
uno
::
Sequence
<
css
::
beans
::
PropertyValue
>&
lDescriptor
,
const
::
rtl
::
OUString
&
sTypeName
,
const
css
::
uno
::
Any
&
aAsyncInfo
=
css
::
uno
::
Any
()
);
sal_Bool
implts_loadIt
(
const
css
::
util
::
URL
&
aURL
,
css
::
uno
::
Sequence
<
css
::
beans
::
PropertyValue
>&
lDescriptor
,
const
::
rtl
::
OUString
&
sTypeName
,
const
css
::
uno
::
Reference
<
css
::
frame
::
XFrame
>&
xTarget
,
const
css
::
uno
::
Any
&
aAsyncInfo
=
css
::
uno
::
Any
()
);
void
implts_enableFrame
(
const
css
::
uno
::
Reference
<
css
::
frame
::
XFrame
>&
xFrame
,
const
css
::
uno
::
Sequence
<
css
::
beans
::
PropertyValue
>&
lDescriptor
);
void
implts_disableFrame
(
const
css
::
uno
::
Reference
<
css
::
frame
::
XFrame
>&
xFrame
);
sal_Bool
implts_deactivateController
(
const
css
::
uno
::
Reference
<
css
::
frame
::
XController
>&
xController
);
sal_Bool
implts_reactivateController
(
const
css
::
uno
::
Reference
<
css
::
frame
::
XController
>&
xController
);
void
implts_sendResultEvent
(
const
css
::
uno
::
Reference
<
css
::
frame
::
XFrame
>&
xEventSource
,
const
::
rtl
::
OUString
&
sURL
,
sal_Bool
bLoadState
);
//-------------------------------------------------------------------------------------------------------------
// variables
// - should be private normaly ...
// - but some super classes need access to some of them => protected!
//-------------------------------------------------------------------------------------------------------------
protected
:
css
::
uno
::
Reference
<
css
::
lang
::
XMultiServiceFactory
>
m_xFactory
;
/// global uno service manager to create new services
css
::
uno
::
WeakReference
<
css
::
frame
::
XFrame
>
m_xOwner
;
/// weakreference to owner (Don't use a hard reference. Owner can't delete us then!)
private
:
LoaderThreads
m_aLoaderThreads
;
/// list of bindings between handler/loader, tasks and loaded URLs
ListenerHash
m_aListenerContainer
;
/// hash table for listener at specified URLs
};
// class BaseDispatcher
}
// namespace framework
#endif // #ifndef __FRAMEWORK_DISPATCH_BASEDISPATCHER_HXX_
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
framework/inc/services/task.hxx
deleted
100644 → 0
Dosyayı görüntüle @
8122fdb0
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#ifndef __FRAMEWORK_SERVICES_TASK_HXX_
#define __FRAMEWORK_SERVICES_TASK_HXX_
//_________________________________________________________________________________________________________________
// my own includes
//_________________________________________________________________________________________________________________
#include <services/frame.hxx>
#include <macros/generic.hxx>
#include <macros/debug.hxx>
#include <macros/xinterface.hxx>
#include <macros/xtypeprovider.hxx>
#include <macros/xserviceinfo.hxx>
//_________________________________________________________________________________________________________________
// interface includes
//_________________________________________________________________________________________________________________
#include <com/sun/star/frame/XTask.hpp>
#include <com/sun/star/awt/Point.hpp>
#include <com/sun/star/awt/Size.hpp>
//_________________________________________________________________________________________________________________
// other includes
//_________________________________________________________________________________________________________________
#include <cppuhelper/weak.hxx>
#include <cppuhelper/propshlp.hxx>
#include <tools/link.hxx>
#include <vcl/evntpost.hxx>
//_________________________________________________________________________________________________________________
// namespace
//_________________________________________________________________________________________________________________
namespace
framework
{
//_________________________________________________________________________________________________________________
// exported const
//_________________________________________________________________________________________________________________
//_________________________________________________________________________________________________________________
// exported definitions
//_________________________________________________________________________________________________________________
/*-************************************************************************************************************//**
@short implements an special frame - a task frame
@descr -
@implements XTask
@base Frame
OPropertySet
*//*-*************************************************************************************************************/
class
Task
:
public
css
::
frame
::
XTask
,
// => XFrame => XComponent
public
Frame
// Order of baseclasses is neccessary for right initialization!
{
//-------------------------------------------------------------------------------------------------------------
// public methods
//-------------------------------------------------------------------------------------------------------------
public
:
//---------------------------------------------------------------------------------------------------------
// constructor / destructor
//---------------------------------------------------------------------------------------------------------
/*-****************************************************************************************************//**
@short standard constructor to create instance
@descr This constructor initialize a new instance of this class,
and will be set valid values on his member and baseclasses.
@seealso -
@param -
@return -
@onerror -
*//*-*****************************************************************************************************/
Task
(
const
css
::
uno
::
Reference
<
css
::
lang
::
XMultiServiceFactory
>&
xFactory
);
/*-****************************************************************************************************//**
@short standard destructor
@descr This method destruct an instance of this class and clear some member.
@seealso -
@param -
@return -
@onerror -
*//*-*****************************************************************************************************/
virtual
~
Task
();
//---------------------------------------------------------------------------------------------------------
// XInterface, XTypeProvider, XServiceInfo
//---------------------------------------------------------------------------------------------------------
DECLARE_XINTERFACE
DECLARE_XTYPEPROVIDER
DECLARE_XSERVICEINFO
//---------------------------------------------------------------------------------------------------------
// XTask
//---------------------------------------------------------------------------------------------------------
/*-****************************************************************************************************//**
@short -
@descr -
@seealso -
@param -
@return -
@onerror -
*//*-*****************************************************************************************************/
virtual
sal_Bool
SAL_CALL
close
()
throw
(
css
::
uno
::
RuntimeException
);
/*-****************************************************************************************************//**
@short -
@descr -
@seealso -
@param -
@return -
@onerror -
*//*-*****************************************************************************************************/
virtual
void
SAL_CALL
tileWindows
()
throw
(
css
::
uno
::
RuntimeException
);
/*-****************************************************************************************************//**
@short -
@descr -
@seealso -
@param -
@return -
@onerror -
*//*-*****************************************************************************************************/
virtual
void
SAL_CALL
arrangeWindowsVertical
()
throw
(
css
::
uno
::
RuntimeException
);
/*-****************************************************************************************************//**
@short -
@descr -
@seealso -
@param -
@return -
@onerror -
*//*-*****************************************************************************************************/
virtual
void
SAL_CALL
arrangeWindowsHorizontal
()
throw
(
css
::
uno
::
RuntimeException
);
//---------------------------------------------------------------------------------------------------------
// XComponent
//---------------------------------------------------------------------------------------------------------
/*-****************************************************************************************************//**
@short -
@descr We must overwrite this method, because baseclass Frame implements XFrame and XComponent.
XTask is derived from these classes to! The compiler don't know, which base is the right one.
@seealso -
@param -
@return -
@onerror -
*//*-*****************************************************************************************************/
virtual
void
SAL_CALL
dispose
()
throw
(
css
::
uno
::
RuntimeException
)
{
Frame
::
dispose
();
}
/*-*******************************************************************************************************/
virtual
void
SAL_CALL
addEventListener
(
const
css
::
uno
::
Reference
<
css
::
lang
::
XEventListener
>&
xListener
)
throw
(
css
::
uno
::
RuntimeException
)
{
Frame
::
addEventListener
(
xListener
);
}
/*-*******************************************************************************************************/
virtual
void
SAL_CALL
removeEventListener
(
const
css
::
uno
::
Reference
<
css
::
lang
::
XEventListener
>&
xListener
)
throw
(
css
::
uno
::
RuntimeException
)
{
Frame
::
removeEventListener
(
xListener
);
}
//---------------------------------------------------------------------------------------------------------
// XFrame
//---------------------------------------------------------------------------------------------------------
/*-****************************************************************************************************//**
@short -
@descr We must overwrite this method, because baseclass Frame implements XFrame and XComponent.
XTask is derived from these classes to! The compiler don't know, which base is right.
@seealso -
@param -
@return -
@onerror -
*//*-*****************************************************************************************************/
virtual
void
SAL_CALL
initialize
(
const
css
::
uno
::
Reference
<
css
::
awt
::
XWindow
>&
xWindow
)
throw
(
css
::
uno
::
RuntimeException
)
{
Frame
::
initialize
(
xWindow
);
}
virtual
css
::
uno
::
Reference
<
css
::
awt
::
XWindow
>
SAL_CALL
getContainerWindow
()
throw
(
css
::
uno
::
RuntimeException
)
{
return
Frame
::
getContainerWindow
();
}
virtual
void
SAL_CALL
setCreator
(
const
css
::
uno
::
Reference
<
css
::
frame
::
XFramesSupplier
>&
xCreator
)
throw
(
css
::
uno
::
RuntimeException
)
{
Frame
::
setCreator
(
xCreator
);
}
virtual
css
::
uno
::
Reference
<
css
::
frame
::
XFramesSupplier
>
SAL_CALL
getCreator
()
throw
(
css
::
uno
::
RuntimeException
)
{
return
Frame
::
getCreator
();
}
virtual
::
rtl
::
OUString
SAL_CALL
getName
()
throw
(
css
::
uno
::
RuntimeException
)
{
return
Frame
::
getName
();
}
virtual
void
SAL_CALL
setName
(
const
::
rtl
::
OUString
&
sName
)
throw
(
css
::
uno
::
RuntimeException
)
{
Frame
::
setName
(
sName
);
}
virtual
sal_Bool
SAL_CALL
isTop
()
throw
(
css
::
uno
::
RuntimeException
)
{
return
Frame
::
isTop
();
}
virtual
void
SAL_CALL
activate
()
throw
(
css
::
uno
::
RuntimeException
)
{
Frame
::
activate
();
}
virtual
void
SAL_CALL
deactivate
()
throw
(
css
::
uno
::
RuntimeException
)
{
Frame
::
deactivate
();
}
virtual
sal_Bool
SAL_CALL
isActive
()
throw
(
css
::
uno
::
RuntimeException
)
{
return
Frame
::
isActive
();
}
virtual
sal_Bool
SAL_CALL
setComponent
(
const
css
::
uno
::
Reference
<
css
::
awt
::
XWindow
>&
xComponentWindow
,
const
css
::
uno
::
Reference
<
css
::
frame
::
XController
>&
xController
)
throw
(
css
::
uno
::
RuntimeException
)
{
return
Frame
::
setComponent
(
xComponentWindow
,
xController
);
}
virtual
css
::
uno
::
Reference
<
css
::
awt
::
XWindow
>
SAL_CALL
getComponentWindow
()
throw
(
css
::
uno
::
RuntimeException
)
{
return
Frame
::
getComponentWindow
();
}
virtual
css
::
uno
::
Reference
<
css
::
frame
::
XController
>
SAL_CALL
getController
()
throw
(
css
::
uno
::
RuntimeException
)
{
return
Frame
::
getController
();
}
virtual
void
SAL_CALL
contextChanged
()
throw
(
css
::
uno
::
RuntimeException
)
{
Frame
::
contextChanged
();
}
virtual
void
SAL_CALL
addFrameActionListener
(
const
css
::
uno
::
Reference
<
css
::
frame
::
XFrameActionListener
>&
xListener
)
throw
(
css
::
uno
::
RuntimeException
)
{
Frame
::
addFrameActionListener
(
xListener
);
}
virtual
void
SAL_CALL
removeFrameActionListener
(
const
css
::
uno
::
Reference
<
css
::
frame
::
XFrameActionListener
>&
xListener
)
throw
(
css
::
uno
::
RuntimeException
)
{
Frame
::
removeFrameActionListener
(
xListener
);
}
virtual
css
::
uno
::
Reference
<
css
::
frame
::
XFrame
>
SAL_CALL
findFrame
(
const
::
rtl
::
OUString
&
sTargetFrameName
,
sal_Int32
nSearchFlags
)
throw
(
css
::
uno
::
RuntimeException
);
//---------------------------------------------------------------------------------------------------------
// XTopWindowListener
//---------------------------------------------------------------------------------------------------------
/*-****************************************************************************************************//**
@short -
@descr -
@seealso -
@seealso -
@param -
@return -
@onerror -
*//*-*****************************************************************************************************/
virtual
void
SAL_CALL
windowClosing
(
const
css
::
lang
::
EventObject
&
aEvent
)
throw
(
css
::
uno
::
RuntimeException
);
/*-****************************************************************************************************//**
@short -
@descr -
@seealso -
@seealso -
@param -
@return -
@onerror -
*//*-*****************************************************************************************************/
virtual
void
SAL_CALL
windowActivated
(
const
css
::
lang
::
EventObject
&
aEvent
)
throw
(
css
::
uno
::
RuntimeException
);
/*-****************************************************************************************************//**
@short -
@descr -
@seealso -
@seealso -
@param -
@return -
@onerror -
*//*-*****************************************************************************************************/
virtual
void
SAL_CALL
windowDeactivated
(
const
css
::
lang
::
EventObject
&
aEvent
)
throw
(
css
::
uno
::
RuntimeException
);
//---------------------------------------------------------------------------------------------------------
// XEventListener
//---------------------------------------------------------------------------------------------------------
/*-****************************************************************************************************//**
@short -
@descr This object is forced to release all references to the interfaces given
by the parameter Source.
@seealso -
@param -
@return -
@onerror -
*//*-*****************************************************************************************************/
virtual
void
SAL_CALL
disposing
(
const
css
::
lang
::
EventObject
&
aEvent
)
throw
(
css
::
uno
::
RuntimeException
);
//-------------------------------------------------------------------------------------------------------------
// protected methods
//-------------------------------------------------------------------------------------------------------------
protected
:
//-------------------------------------------------------------------------------------------------------------
// private methods
//-------------------------------------------------------------------------------------------------------------
private
:
DECL_LINK
(
Close_Impl
,
void
*
);
//-------------------------------------------------------------------------------------------------------------
// debug methods
// (should be private everyway!)
//-------------------------------------------------------------------------------------------------------------
/*-****************************************************************************************************//**
@short debug-method to check incoming parameter of some other mehods of this class
@descr The following methods are used to check parameters for other methods
of this class. The return value is used directly for an ASSERT(...).
@seealso ASSERTs in implementation!
@param references to checking variables
@return sal_False on invalid parameter<BR>
sal_True otherway
@onerror -
*//*-*****************************************************************************************************/
#ifdef ENABLE_ASSERTIONS
private
:
// Not used in the moment!
#endif // #ifdef ENABLE_ASSERTIONS
//-------------------------------------------------------------------------------------------------------------
// variables
// (should be private everyway!)
//-------------------------------------------------------------------------------------------------------------
protected
:
// But some values are neede by derived classes!
// sal_Bool m_bIsPlugIn ; /// In objects of these class this member is set to sal_False.
/// But in derived class PlugInFrame it's overwrited with sal_True!
private
:
// Properties
sal_Bool
m_bIsAlwaysVisible
;
sal_Bool
m_bIsFloating
;
css
::
awt
::
Point
m_aPosition
;
css
::
awt
::
Size
m_aSize
;
::
vcl
::
EventPoster
m_aPoster
;
};
// class Tasks
}
// namespace framework
#endif // #ifndef __FRAMEWORK_SERVICES_TASKS_HXX_
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
salhelper/Package_inc.mk
Dosyayı görüntüle @
0f11f30e
...
...
@@ -33,7 +33,6 @@ $(eval $(call gb_Package_add_file,salhelper_inc,inc/salhelper/dynload.hxx,dynloa
$(eval
$(call
gb_Package_add_file,salhelper_inc,inc/salhelper/future.hxx,future.hxx))
$(eval
$(call
gb_Package_add_file,salhelper_inc,inc/salhelper/futurequeue.hxx,futurequeue.hxx))
$(eval
$(call
gb_Package_add_file,salhelper_inc,inc/salhelper/linkhelper.hxx,linkhelper.hxx))
$(eval
$(call
gb_Package_add_file,salhelper_inc,inc/salhelper/monitor.hxx,monitor.hxx))
$(eval
$(call
gb_Package_add_file,salhelper_inc,inc/salhelper/queue.hxx,queue.hxx))
$(eval
$(call
gb_Package_add_file,salhelper_inc,inc/salhelper/refobj.hxx,refobj.hxx))
$(eval
$(call
gb_Package_add_file,salhelper_inc,inc/salhelper/simplereferenceobject.hxx,simplereferenceobject.hxx))
...
...
salhelper/inc/salhelper/monitor.hxx
deleted
100644 → 0
Dosyayı görüntüle @
8122fdb0
/* -*- 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 .
*/
#ifndef _SALHELPER_MONITOR_HXX_
#define _SALHELPER_MONITOR_HXX_
#include <sal/types.h>
#include <osl/conditn.hxx>
#include <osl/diagnose.h>
#include <osl/interlck.h>
#include <rtl/ref.hxx>
#include <salhelper/refobj.hxx>
#include <salhelper/future.hxx>
#include <salhelper/futurequeue.hxx>
namespace
salhelper
{
//----------------------------------------------------------------------------
#ifndef SALHELPER_COPYCTOR_API
#define SALHELPER_COPYCTOR_API(C) C (const C&); C& operator= (const C&)
#endif
//----------------------------------------------------------------------------
class
MonitorCondition
:
protected
osl
::
Condition
{
/** Representation.
*/
oslInterlockedCount
m_nReferenceCount
;
/** Not implemented.
*/
SALHELPER_COPYCTOR_API
(
MonitorCondition
);
public
:
/** Construction.
*/
inline
MonitorCondition
()
SAL_THROW
(())
:
m_nReferenceCount
(
0
)
{
Condition
::
set
();
}
/** Destruction.
*/
inline
~
MonitorCondition
()
SAL_THROW
(())
{
OSL_ASSERT
(
m_nReferenceCount
==
0
);
}
/** Acquire or enter the monitor.
*/
inline
void
acquire
()
SAL_THROW
(())
{
if
(
osl_incrementInterlockedCount
(
&
m_nReferenceCount
)
==
1
)
{
Condition
::
reset
();
}
}
/** Release or leave the monitor.
*/
inline
void
release
()
SAL_THROW
(())
{
if
(
osl_decrementInterlockedCount
(
&
m_nReferenceCount
)
==
0
)
{
Condition
::
set
();
}
}
/** Wait until all references are released.
*/
inline
void
wait
()
SAL_THROW
(())
{
Condition
::
wait
();
}
};
//----------------------------------------------------------------------------
class
QueuedReaderWriterMonitor
:
public
salhelper
::
ReferenceObject
{
/** Representation.
*/
typedef
salhelper
::
Future
<
sal_Int32
>
future_type
;
salhelper
::
FutureQueue
<
sal_Int32
>
m_aQueue
;
salhelper
::
MonitorCondition
m_aMonitor
;
/** Not implemented.
*/
SALHELPER_COPYCTOR_API
(
QueuedReaderWriterMonitor
);
public
:
/** Construction.
*/
inline
QueuedReaderWriterMonitor
()
{
// Insert the token.
m_aQueue
.
put
(
0
);
}
/** Acquire read access.
*/
inline
void
acquireReader
()
{
// Obtain the token.
rtl
::
Reference
<
future_type
>
xFuture
(
m_aQueue
.
get
());
xFuture
->
get
();
// Enter the monitor.
m_aMonitor
.
acquire
();
// Push back the token.
m_aQueue
.
put
(
0
);
}
/** Release read access.
*/
inline
void
releaseReader
()
{
// Leave the monitor.
m_aMonitor
.
release
();
}
/** Acquire write access.
*/
inline
void
acquireWriter
()
{
// Obtain the token.
rtl
::
Reference
<
future_type
>
xFuture
(
m_aQueue
.
get
());
xFuture
->
get
();
// Wait until all readers have left.
m_aMonitor
.
wait
();
}
/** Release write access.
*/
inline
void
releaseWriter
()
{
// Push back the token.
m_aQueue
.
put
(
0
);
}
protected
:
/** Destruction.
*/
virtual
~
QueuedReaderWriterMonitor
()
{}
};
//----------------------------------------------------------------------------
template
<
class
monitor_type
>
class
ReaderGuard
{
/** Representation.
*/
monitor_type
*
m_pMonitor
;
/** Not implemented.
*/
SALHELPER_COPYCTOR_API
(
ReaderGuard
<
monitor_type
>
);
public
:
/** Construction. Acquire monitor read access.
*/
inline
ReaderGuard
(
monitor_type
&
rMonitor
)
:
m_pMonitor
(
&
rMonitor
)
{
m_pMonitor
->
acquireReader
();
}
/** Construction. Acquire monitor read access.
*/
inline
ReaderGuard
(
monitor_type
*
pMonitor
)
:
m_pMonitor
(
pMonitor
)
{
OSL_PRECOND
(
m_pMonitor
,
"ReaderGuard::ReaderGuard(): No Monitor"
);
m_pMonitor
->
acquireReader
();
}
/** Destruction. Release monitor read access.
*/
inline
~
ReaderGuard
()
{
if
(
m_pMonitor
)
m_pMonitor
->
releaseReader
();
}
/** Release monitor read access.
*/
inline
void
clear
()
{
if
(
m_pMonitor
)
{
m_pMonitor
->
releaseReader
();
m_pMonitor
=
0
;
}
}
};
//----------------------------------------------------------------------------
typedef
ReaderGuard
<
QueuedReaderWriterMonitor
>
QueuedReaderGuard
;
//----------------------------------------------------------------------------
template
<
class
monitor_type
>
class
WriterGuard
{
/** Representation.
*/
monitor_type
*
m_pMonitor
;
/** Not implemented.
*/
SALHELPER_COPYCTOR_API
(
WriterGuard
<
monitor_type
>
);
public
:
/** Construction. Acquire monitor write access.
*/
inline
WriterGuard
(
monitor_type
&
rMonitor
)
:
m_pMonitor
(
&
rMonitor
)
{
m_pMonitor
->
acquireWriter
();
}
/** Construction. Acquire monitor write access.
*/
inline
WriterGuard
(
monitor_type
*
pMonitor
)
:
m_pMonitor
(
pMonitor
)
{
OSL_PRECOND
(
m_pMonitor
,
"WriterGuard::WriterGuard(): No Monitor"
);
m_pMonitor
->
acquireWriter
();
}
/** Destruction. Release monitor write access.
*/
inline
~
WriterGuard
()
{
if
(
m_pMonitor
)
m_pMonitor
->
releaseWriter
();
}
/** Release monitor write access.
*/
inline
void
clear
()
{
if
(
m_pMonitor
)
{
m_pMonitor
->
releaseWriter
();
m_pMonitor
=
0
;
}
}
};
//----------------------------------------------------------------------------
typedef
WriterGuard
<
QueuedReaderWriterMonitor
>
QueuedWriterGuard
;
//----------------------------------------------------------------------------
}
// namespace salhelper
#endif
/* !_SALHELPER_MONITOR_HXX_ */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sd/source/ui/inc/optdlg.hxx
deleted
100644 → 0
Dosyayı görüntüle @
8122fdb0
/* -*- 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 .
*/
#ifndef SD_OPTDLG_HXX
#define SD_OPTDLG_HXX
#include <sfx2/tabdlg.hxx>
#include "pres.hxx"
class
SfxItemSet
;
class
SdOptionsDlg
:
public
SfxTabDialog
{
private
:
DocumentType
meDocType
;
public
:
SdOptionsDlg
(
Window
*
pParent
,
const
SfxItemSet
&
rInAttrs
,
DocumentType
eDocType
);
~
SdOptionsDlg
();
protected
:
virtual
void
PageCreated
(
sal_uInt16
nId
,
SfxTabPage
&
rPage
);
};
#endif // SD_OPTDLG_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sd/source/ui/toolpanel/ConstrainedIterator.cxx
deleted
100644 → 0
Dosyayı görüntüle @
8122fdb0
/* -*- 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 .
*/
// This is a definition file of a template class. It is therefore
// included by other files and thus has to be guarded against multiple
// inclusion.
#ifndef SD_TOOLPANEL_CONSTRAINED_ITERATOR_CXX
#define SD_TOOLPANEL_CONSTRAINED_ITERATOR_CXX
namespace
sd
{
namespace
toolpanel
{
template
<
class
Container
>
ConstrainedIterator
<
Container
>::
value_type
&
ConstrainedIterator
<
Container
>::
operator
*
(
void
)
{
return
*
maIterator
;
}
template
<
class
Container
>
const
ConstrainedIterator
<
Container
>::
value_type
&
ConstrainedIterator
<
Container
>::
operator
*
(
void
)
const
{
return
*
maIterator
;
}
template
<
class
Container
>
ConstrainedIterator
<
Container
>::
value_type
&
ConstrainedIterator
<
Container
>::
operator
->
(
void
)
{
return
*
maIterator
;
}
template
<
class
Container
>
const
ConstrainedIterator
<
Container
>::
value_type
&
ConstrainedIterator
<
Container
>::
operator
->
(
void
)
const
{
return
*
maIterator
;
}
template
<
class
Container
>
ConstrainedIterator
<
Container
>
::
ConstrainedIterator
(
void
)
:
mpContainer
(
NULL
)
{
}
template
<
class
Container
>
ConstrainedIterator
<
Container
>::
ConstrainedIterator
(
const
Container
&
rContainer
,
const
Container
::
iterator
&
rIterator
)
:
mpContainer
(
&
rContainer
),
maIterator
(
rIterator
),
mpConstraint
(
NULL
)
{
AdvanceToNextValidElement
();
}
template
<
class
Container
>
ConstrainedIterator
<
Container
>::
ConstrainedIterator
(
const
Container
&
rContainer
,
const
Container
::
iterator
&
rIterator
,
const
Constraint
<
Container
>&
rConstraint
)
:
mpContainer
(
&
rContainer
),
maIterator
(
rIterator
),
mpConstraint
(
&
rConstraint
)
{
AdvanceToNextValidElement
();
}
template
<
class
Container
>
ConstrainedIterator
<
Container
>::
ConstrainedIterator
(
const
ConstrainedIterator
&
rIterator
)
:
mpContainer
(
rIterator
.
mpContainer
),
maIterator
(
rIterator
.
maIterator
),
mpConstraint
(
rIterator
.
mpConstraint
)
{
// Everything has been done in the initializer
}
template
<
class
Container
>
ConstrainedIterator
<
Container
>&
ConstrainedIterator
<
Container
>
::
operator
=
(
const
ConstrainedIterator
&
rIterator
)
{
mpContainer
=
rIterator
.
mpContainer
;
maIterator
=
rIterator
.
maIterator
;
mpConstraint
=
rIterator
.
mpConstraint
;
AdvanceToNextValidElement
();
return
*
this
;
}
template
<
class
Container
>
bool
ConstrainedIterator
<
Container
>::
operator
==
(
const
ConstrainedIterator
&
aIterator
)
const
{
return
!
operator
!=
(
aIterator
);
}
template
<
class
Container
>
bool
ConstrainedIterator
<
Container
>::
operator
!=
(
const
ConstrainedIterator
&
aIterator
)
const
{
return
maIterator
!=
aIterator
.
maIterator
;
}
template
<
class
Container
>
ConstrainedIterator
<
Container
>&
ConstrainedIterator
<
Container
>::
operator
++
(
void
)
{
maIterator
++
;
AdvanceToNextValidElement
();
return
*
this
;
}
template
<
class
Container
>
ConstrainedIterator
<
Container
>
ConstrainedIterator
<
Container
>::
operator
++
(
int
)
{
ConstrainedIterator
aIterator
(
*
this
);
++
(
*
this
);
return
aIterator
;
}
template
<
class
Container
>
ConstrainedIterator
<
Container
>&
ConstrainedIterator
<
Container
>::
operator
--
(
void
)
{
maIterator
--
;
AdvanceToPreviousValidElement
();
return
*
this
;
}
template
<
class
Container
>
ConstrainedIterator
<
Container
>
ConstrainedIterator
<
Container
>::
operator
--
(
int
)
{
ConstrainedIterator
aIterator
(
*
this
);
--
(
*
this
);
return
aIterator
;
}
template
<
class
Container
>
ConstrainedIterator
<
Container
>
ConstrainedIterator
<
Container
>::
operator
+
(
int
nValue
)
const
{
return
ConstrainedIterator
(
*
mpContainer
,
maIterator
+
nValue
);
}
template
<
class
Container
>
ConstrainedIterator
<
Container
>
ConstrainedIterator
<
Container
>::
operator
-
(
int
nValue
)
const
{
return
ConstrainedIterator
(
*
mpContainer
,
maIterator
-
nValue
);
}
template
<
class
Container
>
void
ConstrainedIterator
<
Container
>::
AdvanceToNextValidElement
(
void
)
{
if
(
mpContainer
!=
NULL
&&
mpConstraint
!=
NULL
)
{
while
(
maIterator
!=
mpContainer
->
end
()
&&
!
mpConstraint
->
operator
()(
*
mpContainer
,
maIterator
))
++
maIterator
;
}
}
template
<
class
Container
>
void
ConstrainedIterator
<
Container
>::
AdvanceToPreviousValidElement
(
void
)
{
if
(
mpContainer
!=
NULL
&&
mpConstraint
!=
NULL
)
{
while
(
maIterator
!=
mpContainer
->
begin
()
&&
!
mpConstraint
->
operator
()(
*
mpContainer
,
maIterator
))
--
maIterator
;
}
}
}
}
// end of namespace ::sd::toolpanel
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sd/source/ui/toolpanel/ConstrainedIterator.hxx
deleted
100644 → 0
Dosyayı görüntüle @
8122fdb0
/* -*- 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 .
*/
#ifndef SD_TOOLPANEL_CONSTRAINED_ITERATOR_HXX
#define SD_TOOLPANEL_CONSTRAINED_ITERATOR_HXX
#include <iterator>
namespace
sd
{
namespace
toolpanel
{
template
<
class
Container
>
class
Constraint
{
public
:
virtual
bool
operator
()
(
const
Container
&
rContainer
,
const
Container
::
iterator
&
rIterator
)
const
=
0
;
};
/** This iterator is a bidirectional iterator with something of random
access thrown in. It uses a constraint object to jump over
elements in the underlying container that do not meet the
constraint.
*/
template
<
class
Container
>
class
ConstrainedIterator
:
public
::
std
::
bidirectional_iterator_tag
{
public
:
typedef
Container
::
value_type
value_type
;
typedef
value_type
&
reference
;
typedef
const
value_type
&
const_reference
;
ConstrainedIterator
(
void
);
ConstrainedIterator
(
const
Container
&
rContainer
,
const
Container
::
iterator
&
rIterator
);
ConstrainedIterator
(
const
Container
&
rContainer
,
const
Container
::
iterator
&
rIterator
,
const
Constraint
<
Container
>&
pConstraint
);
ConstrainedIterator
(
const
ConstrainedIterator
&
rIterator
);
ConstrainedIterator
&
operator
=
(
const
ConstrainedIterator
&
aIterator
);
reference
operator
*
(
void
);
const_reference
operator
*
(
void
)
const
;
reference
operator
->
(
void
);
const_reference
operator
->
(
void
)
const
;
bool
operator
==
(
const
ConstrainedIterator
&
aIterator
)
const
;
bool
operator
!=
(
const
ConstrainedIterator
&
aIterator
)
const
;
ConstrainedIterator
&
operator
++
(
void
);
ConstrainedIterator
operator
++
(
int
);
ConstrainedIterator
&
operator
--
(
void
);
ConstrainedIterator
operator
--
(
int
);
ConstrainedIterator
operator
+
(
int
nValue
)
const
;
ConstrainedIterator
operator
-
(
int
nValue
)
const
;
private
:
const
Container
*
mpContainer
;
Container
::
iterator
maIterator
;
const
Constraint
<
Container
>*
mpConstraint
;
void
AdvanceToNextValidElement
(
void
);
void
AdvanceToPreviousValidElement
(
void
);
};
}
}
// end of namespace ::sd::toolpanel
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
solenv/inc/preinclude.h
deleted
100644 → 0
Dosyayı görüntüle @
8122fdb0
/* -*- 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 .
*/
/* HACK: include certain standard header to enable build on glibc-2.2 systems
* and compile vs. glibc-2.1 header
*
* please add more if necessary
*/
#include <stdlib.h>
#include <stddef.h>
#include <stdio.h>
#include <string.h>
#include <wchar.h>
#include <features.h>
#include <assert.h>
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
svtools/Package_inc.mk
Dosyayı görüntüle @
0f11f30e
...
...
@@ -60,7 +60,6 @@ $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/editsyntaxhighlighter.
$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/ehdl.hxx,svtools/ehdl.hxx))
$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/embedhlp.hxx,svtools/embedhlp.hxx))
$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/embedtransfer.hxx,svtools/embedtransfer.hxx))
$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/expander.hxx,svtools/expander.hxx))
$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/extcolorcfg.hxx,svtools/extcolorcfg.hxx))
$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/extensionlistbox.hxx,svtools/extensionlistbox.hxx))
$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/filectrl.hxx,svtools/filectrl.hxx))
...
...
svtools/inc/svtools/expander.hxx
deleted
100644 → 0
Dosyayı görüntüle @
8122fdb0
/* -*- 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 .
*/
#ifndef _SV_EXPANDER_HXX
#define _SV_EXPANDER_HXX
#include <vcl/ctrl.hxx>
#include <vcl/image.hxx>
enum
SvExpanderStateType
{
EST_MIN
=
1
,
EST_PLUS
=
2
,
EST_MIN_DOWN
=
3
,
EST_PLUS_DOWN
=
4
,
EST_NONE
=
5
,
EST_MIN_DIS
=
6
,
EST_PLUS_DIS
=
7
,
EST_MIN_DOWN_DIS
=
8
,
EST_PLUS_DOWN_DIS
=
9
};
class
SvExpander
:
public
Control
{
private
:
Point
aImagePos
;
Point
aTextPos
;
Image
aActiveImage
;
Rectangle
maFocusRect
;
ImageList
maExpanderImages
;
sal_Bool
mbIsExpanded
;
sal_Bool
mbHasFocusRect
;
sal_Bool
mbIsInMouseDown
;
Link
maToggleHdl
;
SvExpanderStateType
eType
;
protected
:
virtual
long
PreNotify
(
NotifyEvent
&
rNEvt
);
virtual
void
MouseButtonDown
(
const
MouseEvent
&
rMEvt
);
virtual
void
MouseMove
(
const
MouseEvent
&
rMEvt
);
virtual
void
MouseButtonUp
(
const
MouseEvent
&
rMEvt
);
virtual
void
Paint
(
const
Rectangle
&
rRect
);
virtual
void
KeyInput
(
const
KeyEvent
&
rKEvt
);
virtual
void
KeyUp
(
const
KeyEvent
&
rKEvt
);
virtual
void
Click
();
virtual
void
Resize
();
public
:
SvExpander
(
Window
*
pParent
,
WinBits
nStyle
=
0
);
SvExpander
(
Window
*
pParent
,
const
ResId
&
rResId
);
sal_Bool
IsExpanded
()
{
return
mbIsExpanded
;}
void
SetToExpanded
(
sal_Bool
bFlag
=
sal_True
);
void
SetExpanderImage
(
SvExpanderStateType
eType
);
Image
GetExpanderImage
(
SvExpanderStateType
eType
);
Size
GetMinSize
()
const
;
void
SetToggleHdl
(
const
Link
&
rLink
)
{
maToggleHdl
=
rLink
;
}
const
Link
&
GetToggleHdl
()
const
{
return
maToggleHdl
;
}
};
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sw/inc/io.hxx
deleted
100644 → 0
Dosyayı görüntüle @
8122fdb0
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
// Special class for IO. Used for system-independent representation
// (change of byte-order, conversion of characters)
// Writes in binary format for efficiency.
#ifndef _IO_HXX
#define _IO_HXX
#ifdef UNX
#include <unistd.h>
#else
#include <io.h>
#endif
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <vcl/keycod.hxx>
#include <tools/stream.hxx>
class
SwIOin
{
private
:
SvFileStream
aStr
;
//$ ifstream
public
:
// Stream is created in respective mode.
SwIOin
(
const
String
&
rFilename
,
StreamMode
nMode
=
STREAM_READ
|
STREAM_NOCREATE
);
SwIOin
&
operator
>>
(
char
&
val
);
SwIOin
&
operator
>>
(
unsigned
char
&
val
);
SwIOin
&
operator
>>
(
char
*
val
);
SwIOin
&
operator
>>
(
unsigned
char
*
val
);
SwIOin
&
operator
>>
(
short
&
val
);
SwIOin
&
operator
>>
(
unsigned
short
&
val
);
SwIOin
&
operator
>>
(
long
&
val
);
SwIOin
&
operator
>>
(
unsigned
long
&
val
);
String
ReadString
();
KeyCode
ReadKeyCode
();
// Can be extended for more arrays of base types.
// nLen is count of elements.
SwIOin
&
Read
(
char
*
buf
,
unsigned
nLen
);
int
operator
!
()
{
return
aStr
.
GetError
()
!=
SVSTREAM_OK
;
}
SvFileStream
&
operator
()()
{
return
aStr
;
}
};
class
SwIOout
{
private
:
void
_write
(
const
char
*
buf
,
unsigned
size
);
SvFileStream
aStr
;
//$ ofstream
public
:
// Stream is created in respective mode.
SwIOout
(
const
String
&
rFilename
,
StreamMode
nMode
=
STREAM_WRITE
|
STREAM_NOCREATE
);
SwIOout
&
operator
<<
(
char
val
);
SwIOout
&
operator
<<
(
unsigned
char
val
);
SwIOout
&
operator
<<
(
char
*
val
);
SwIOout
&
operator
<<
(
unsigned
char
*
val
);
SwIOout
&
operator
<<
(
short
val
);
SwIOout
&
operator
<<
(
unsigned
short
val
);
SwIOout
&
operator
<<
(
long
val
);
SwIOout
&
operator
<<
(
unsigned
long
val
);
SwIOout
&
operator
<<
(
const
String
&
);
SwIOout
&
operator
<<
(
const
KeyCode
&
);
// Can be extended for more arrays of base types.
// nLen is count of elements.
SwIOout
&
Write
(
const
char
*
buf
,
unsigned
nLen
);
int
operator
!
()
{
return
aStr
.
GetError
()
!=
SVSTREAM_OK
;
}
SvFileStream
&
operator
()()
{
return
aStr
;
}
};
class
SwIOinout
{
private
:
SvFileStream
aStr
;
//$ fstream
public
:
// Stream is created in respective mode.
SwIOinout
(
const
String
&
rFilename
,
StreamMode
nMode
=
STREAM_READWRITE
|
STREAM_NOCREATE
);
SwIOinout
&
operator
>>
(
char
&
val
);
SwIOinout
&
operator
>>
(
unsigned
char
&
val
);
SwIOinout
&
operator
>>
(
char
*
val
);
SwIOinout
&
operator
>>
(
unsigned
char
*
val
);
SwIOinout
&
operator
>>
(
short
&
val
);
SwIOinout
&
operator
>>
(
unsigned
short
&
val
);
SwIOinout
&
operator
>>
(
long
&
val
);
SwIOinout
&
operator
>>
(
unsigned
long
&
val
);
String
ReadString
();
KeyCode
ReadKeyCode
();
// Can be extended for more arrays of base types.
// nLen is count of elements.
SwIOinout
&
Read
(
char
*
buf
,
unsigned
nLen
);
SwIOinout
&
Read
(
unsigned
short
*
buf
,
unsigned
nLen
);
SwIOinout
&
operator
<<
(
char
val
);
SwIOinout
&
operator
<<
(
unsigned
char
val
);
SwIOinout
&
operator
<<
(
char
*
val
);
SwIOinout
&
operator
<<
(
unsigned
char
*
val
);
SwIOinout
&
operator
<<
(
short
val
);
SwIOinout
&
operator
<<
(
unsigned
short
val
);
SwIOinout
&
operator
<<
(
long
val
);
SwIOinout
&
operator
<<
(
unsigned
long
val
);
SwIOinout
&
operator
<<
(
const
String
&
);
SwIOinout
&
operator
<<
(
const
KeyCode
&
);
// Can be extended for more arrays of base types.
// nLen is count of elements.
SwIOinout
&
Write
(
const
char
*
buf
,
unsigned
nLen
);
int
operator
!
()
{
return
aStr
.
GetError
()
!=
SVSTREAM_OK
;
}
SvFileStream
&
operator
()()
{
return
aStr
;
}
sal_Bool
Ok
();
};
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
xmloff/inc/xmloff/functional.hxx
deleted
100644 → 0
Dosyayı görüntüle @
8122fdb0
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#ifndef _XMLOFF_FUNCTIONAL_HXX
#define _XMLOFF_FUNCTIONAL_HXX
#include <rtl/ustring.hxx>
/* THIS HEADER IS DEPRECATED. USE comphelper/stl_types.hxx INSTEAD!!! */
/** @#file
*
* re-implement STL functors as needed
*
* The standard comparison operators from the STL cause warnings with
* several compilers about our sal_Bool (=unsigned char) being
* converted to bool (C++ bool). We wish to avoid that.
*/
struct
less_functor
{
bool
operator
()(
const
::
rtl
::
OUString
&
x
,
const
::
rtl
::
OUString
&
y
)
const
{
return
0
!=
(
x
<
y
);
}
};
#endif
/* 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