merge DEV300_m70
This commit is contained in:
commit
007267b3ad
@ -61,7 +61,9 @@ static typelib_TypeClass cpp2uno_call(
|
||||
sal_Int64 * pRegisterReturn /* space for register return */ )
|
||||
{
|
||||
int ng = 0; //number of gpr registers used
|
||||
#ifndef __NO_FPRS__
|
||||
int nf = 0; //number of fpr regsiters used
|
||||
#endif
|
||||
void ** pCppStack; //temporary stack pointer
|
||||
|
||||
// gpreg: [ret *], this, [gpr params]
|
||||
@ -123,11 +125,23 @@ static typelib_TypeClass cpp2uno_call(
|
||||
{
|
||||
|
||||
case typelib_TypeClass_DOUBLE:
|
||||
#ifndef __NO_FPRS__
|
||||
if (nf < 8) {
|
||||
pCppArgs[nPos] = fpreg;
|
||||
pUnoArgs[nPos] = fpreg;
|
||||
nf++;
|
||||
fpreg += 2;
|
||||
#else
|
||||
if (ng & 1) {
|
||||
ng++;
|
||||
gpreg++;
|
||||
}
|
||||
if (ng < 8) {
|
||||
pCppArgs[nPos] = gpreg;
|
||||
pUnoArgs[nPos] = gpreg;
|
||||
ng += 2;
|
||||
gpreg += 2;
|
||||
#endif
|
||||
} else {
|
||||
if (((long)ovrflw) & 4) ovrflw++;
|
||||
pCppArgs[nPos] = ovrflw;
|
||||
@ -139,6 +153,7 @@ static typelib_TypeClass cpp2uno_call(
|
||||
case typelib_TypeClass_FLOAT:
|
||||
// fpreg are all double values so need to
|
||||
// modify fpreg to be a single word float value
|
||||
#ifndef __NO_FPRS__
|
||||
if (nf < 8) {
|
||||
float tmp = (float) (*((double *)fpreg));
|
||||
(*((float *) fpreg)) = tmp;
|
||||
@ -146,6 +161,13 @@ static typelib_TypeClass cpp2uno_call(
|
||||
pUnoArgs[nPos] = fpreg;
|
||||
nf++;
|
||||
fpreg += 2;
|
||||
#else
|
||||
if (ng < 8) {
|
||||
pCppArgs[nPos] = gpreg;
|
||||
pUnoArgs[nPos] = gpreg;
|
||||
ng++;
|
||||
gpreg++;
|
||||
#endif
|
||||
} else {
|
||||
#if 0 /* abi is not being followed correctly */
|
||||
if (((long)ovrflw) & 4) ovrflw++;
|
||||
@ -164,11 +186,11 @@ static typelib_TypeClass cpp2uno_call(
|
||||
|
||||
case typelib_TypeClass_HYPER:
|
||||
case typelib_TypeClass_UNSIGNED_HYPER:
|
||||
if (ng < 7) {
|
||||
if (ng & 1) {
|
||||
ng++;
|
||||
gpreg++;
|
||||
}
|
||||
if (ng & 1) {
|
||||
ng++;
|
||||
gpreg++;
|
||||
}
|
||||
if (ng < 8) {
|
||||
pCppArgs[nPos] = gpreg;
|
||||
pUnoArgs[nPos] = gpreg;
|
||||
ng += 2;
|
||||
@ -488,10 +510,12 @@ static typelib_TypeClass cpp_mediate(
|
||||
static void cpp_vtable_call( int nFunctionIndex, int nVtableOffset, void** gpregptr, void** fpregptr, void** ovrflw)
|
||||
{
|
||||
sal_Int32 gpreg[8];
|
||||
double fpreg[8];
|
||||
|
||||
memcpy( gpreg, gpregptr, 32);
|
||||
|
||||
#ifndef __NO_FPRS__
|
||||
double fpreg[8];
|
||||
memcpy( fpreg, fpregptr, 64);
|
||||
#endif
|
||||
|
||||
volatile long nRegReturn[2];
|
||||
|
||||
@ -499,10 +523,14 @@ static void cpp_vtable_call( int nFunctionIndex, int nVtableOffset, void** gpreg
|
||||
// fprintf(stderr,"in cpp_vtable_call nVtableOffset is %x\n",nVtableOffset);
|
||||
// fflush(stderr);
|
||||
|
||||
sal_Bool bComplex = nFunctionIndex & 0x80000000 ? sal_True : sal_False;
|
||||
|
||||
typelib_TypeClass aType =
|
||||
cpp_mediate( nFunctionIndex, nVtableOffset, (void**)gpreg, (void**)fpreg, ovrflw, (sal_Int64*)nRegReturn );
|
||||
cpp_mediate( nFunctionIndex, nVtableOffset, (void**)gpreg,
|
||||
#ifndef __NO_FPRS__
|
||||
(void**)fpreg,
|
||||
#else
|
||||
NULL,
|
||||
#endif
|
||||
ovrflw, (sal_Int64*)nRegReturn );
|
||||
|
||||
switch( aType )
|
||||
{
|
||||
@ -524,13 +552,25 @@ static void cpp_vtable_call( int nFunctionIndex, int nVtableOffset, void** gpreg
|
||||
break;
|
||||
|
||||
case typelib_TypeClass_FLOAT:
|
||||
#ifndef __NO_FPRS__
|
||||
__asm__( "lfs 1,%0\n\t" : :
|
||||
"m" (*((float*)nRegReturn)) );
|
||||
#else
|
||||
__asm__( "lwz 3,%0\n\t" : :
|
||||
"m"(nRegReturn[0]) );
|
||||
#endif
|
||||
break;
|
||||
|
||||
case typelib_TypeClass_DOUBLE:
|
||||
#ifndef __NO_FPRS__
|
||||
__asm__( "lfd 1,%0\n\t" : :
|
||||
"m" (*((double*)nRegReturn)) );
|
||||
#else
|
||||
__asm__( "lwz 3,%0\n\t" : :
|
||||
"m"(nRegReturn[0]) );
|
||||
__asm__( "lwz 4,%0\n\t" : :
|
||||
"m"(nRegReturn[1]) );
|
||||
#endif
|
||||
break;
|
||||
|
||||
case typelib_TypeClass_HYPER:
|
||||
@ -577,6 +617,7 @@ unsigned char * codeSnippet( unsigned char * code, sal_Int32 functionIndex, sal
|
||||
|
||||
|
||||
// # next save fpr 1 to fpr 8 (aligned to 8)
|
||||
// if dedicated floating point registers are used
|
||||
// stfd f1,-2016(r1)
|
||||
// stfd f2,-2008(r1)
|
||||
// stfd f3,-2000(r1)
|
||||
@ -604,6 +645,10 @@ unsigned char * codeSnippet( unsigned char * code, sal_Int32 functionIndex, sal
|
||||
|
||||
// #now load up the pointer to the saved fpr registers
|
||||
// addi r6,r1,-2016
|
||||
// if no dedicated floating point registers are used than we have NULL
|
||||
// pointer there
|
||||
// li r6, 0
|
||||
//
|
||||
|
||||
// #now load up the pointer to the overflow call stack
|
||||
// addi r7,r1,8
|
||||
@ -617,6 +662,7 @@ unsigned char * codeSnippet( unsigned char * code, sal_Int32 functionIndex, sal
|
||||
* p++ = 0x9101f814;
|
||||
* p++ = 0x9121f818;
|
||||
* p++ = 0x9141f81c;
|
||||
#ifndef __NO_FPRS__
|
||||
* p++ = 0xd821f820;
|
||||
* p++ = 0xd841f828;
|
||||
* p++ = 0xd861f830;
|
||||
@ -625,6 +671,17 @@ unsigned char * codeSnippet( unsigned char * code, sal_Int32 functionIndex, sal
|
||||
* p++ = 0xd8c1f848;
|
||||
* p++ = 0xd8e1f850;
|
||||
* p++ = 0xd901f858;
|
||||
#else
|
||||
/* these nops could be replaced with a smaller codeSnippetSize - 8 * 4 */
|
||||
* p++ = 0x60000000;
|
||||
* p++ = 0x60000000;
|
||||
* p++ = 0x60000000;
|
||||
* p++ = 0x60000000;
|
||||
* p++ = 0x60000000;
|
||||
* p++ = 0x60000000;
|
||||
* p++ = 0x60000000;
|
||||
* p++ = 0x60000000;
|
||||
#endif
|
||||
* p++ = 0x3c600000 | (((unsigned long)cpp_vtable_call) >> 16);
|
||||
* p++ = 0x60630000 | (((unsigned long)cpp_vtable_call) & 0x0000FFFF);
|
||||
* p++ = 0x7c6903a6;
|
||||
@ -633,7 +690,11 @@ unsigned char * codeSnippet( unsigned char * code, sal_Int32 functionIndex, sal
|
||||
* p++ = 0x3c800000 | (((unsigned long)vtableOffset) >> 16);
|
||||
* p++ = 0x60840000 | (((unsigned long)vtableOffset) & 0x0000FFFF);
|
||||
* p++ = 0x38a1f800;
|
||||
#ifndef __NO_FPRS__
|
||||
* p++ = 0x38c1f820;
|
||||
#else
|
||||
* p++ = 0x38c00000;
|
||||
#endif
|
||||
* p++ = 0x38e10008;
|
||||
* p++ = 0x4e800420;
|
||||
return (code + codeSnippetSize);
|
||||
|
@ -137,8 +137,8 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR
|
||||
OUString const & unoName = *(OUString const *)&pTypeDescr->aBase.pTypeName;
|
||||
|
||||
MutexGuard guard( m_mutex );
|
||||
t_rtti_map::const_iterator iFind( m_rttis.find( unoName ) );
|
||||
if (iFind == m_rttis.end())
|
||||
t_rtti_map::const_iterator iRttiFind( m_rttis.find( unoName ) );
|
||||
if (iRttiFind == m_rttis.end())
|
||||
{
|
||||
// RTTI symbol
|
||||
OStringBuffer buf( 64 );
|
||||
@ -202,7 +202,7 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR
|
||||
}
|
||||
else
|
||||
{
|
||||
rtti = iFind->second;
|
||||
rtti = iRttiFind->second;
|
||||
}
|
||||
|
||||
return rtti;
|
||||
|
@ -74,12 +74,14 @@ static void callVirtualMethod(
|
||||
void (*ptr)();
|
||||
int gpr[8]; // storage for gpregisters, map to r3-r10
|
||||
int off; // offset used to find function
|
||||
#ifndef __NO_FPRS__
|
||||
double fpr[8]; // storage for fpregisters, map to f1-f8
|
||||
int n; // number of gprs mapped so far
|
||||
int f; // number of fprs mapped so far
|
||||
double dret; // temporary function return values
|
||||
#endif
|
||||
int n; // number of gprs mapped so far
|
||||
long *p; // pointer to parameter overflow area
|
||||
int c; // character of parameter type being decoded
|
||||
double dret; // temporary function return values
|
||||
int iret, iret2;
|
||||
|
||||
// Because of the Power PC calling conventions we could be passing
|
||||
@ -93,7 +95,7 @@ static void callVirtualMethod(
|
||||
|
||||
// Note: could require up to 2*nStackLongs words of parameter stack area
|
||||
// if the call has many float parameters (i.e. floats take up only 1
|
||||
// word on the stack but take 2 words in parameter area in the
|
||||
// word on the stack but double takes 2 words in parameter area in the
|
||||
// stack frame .
|
||||
|
||||
// Update! floats on the outgoing parameter stack only take up 1 word
|
||||
@ -119,7 +121,9 @@ static void callVirtualMethod(
|
||||
|
||||
// now begin to load the C++ function arguments into storage
|
||||
n = 0;
|
||||
#ifndef __NO_FPRS__
|
||||
f = 0;
|
||||
#endif
|
||||
|
||||
// now we need to parse the entire signature string */
|
||||
// until we get the END indicator */
|
||||
@ -143,8 +147,16 @@ static void callVirtualMethod(
|
||||
c = *pPT;
|
||||
switch (c) {
|
||||
case 'D': /* type is double */
|
||||
#ifndef __NO_FPRS__
|
||||
if (f < 8) {
|
||||
fpr[f++] = *((double *)pStackLongs); /* store in register */
|
||||
#else
|
||||
if (n & 1)
|
||||
n++;
|
||||
if (n < 8) {
|
||||
gpr[n++] = *pStackLongs;
|
||||
gpr[n++] = *(pStackLongs+1);
|
||||
#endif
|
||||
} else {
|
||||
if (((long) p) & 4)
|
||||
p++;
|
||||
@ -163,8 +175,13 @@ static void callVirtualMethod(
|
||||
store floats as a *single* word on outgoing parameter stack
|
||||
to match what gcc actually does
|
||||
*/
|
||||
#ifndef __NO_FPRS__
|
||||
if (f < 8) {
|
||||
fpr[f++] = *((float *)pStackLongs);
|
||||
#else
|
||||
if (n < 8) {
|
||||
gpr[n++] = *pStackLongs;
|
||||
#endif
|
||||
} else {
|
||||
#if 0 /* if abi were followed */
|
||||
if (((long) p) & 4)
|
||||
@ -243,6 +260,7 @@ static void callVirtualMethod(
|
||||
"lwz 8, 20(%0)\n\t"
|
||||
"lwz 9, 24(%0)\n\t"
|
||||
"lwz 10, 28(%0)\n\t"
|
||||
#ifndef __NO_FPRS__
|
||||
"lfd 1, 0(%1)\n\t"
|
||||
"lfd 2, 8(%1)\n\t"
|
||||
"lfd 3, 16(%1)\n\t"
|
||||
@ -252,16 +270,24 @@ static void callVirtualMethod(
|
||||
"lfd 7, 48(%1)\n\t"
|
||||
"lfd 8, 56(%1)\n\t"
|
||||
: : "r" (gpr), "r" (fpr)
|
||||
#else
|
||||
: : "r" (gpr)
|
||||
#endif
|
||||
: "0", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"
|
||||
);
|
||||
|
||||
(*ptr)();
|
||||
|
||||
__asm__ __volatile__ (
|
||||
"mr %1, 3\n\t"
|
||||
"mr %2, 4\n\t"
|
||||
"fmr %0, 1\n\t"
|
||||
: "=f" (dret), "=r" (iret), "=r" (iret2) : );
|
||||
"mr %0, 3\n\t"
|
||||
"mr %1, 4\n\t"
|
||||
#ifndef __NO_FPRS__
|
||||
"fmr %2, 1\n\t"
|
||||
: "=r" (iret), "=r" (iret2), "=f" (dret)
|
||||
#else
|
||||
: "=r" (iret), "=r" (iret2)
|
||||
#endif
|
||||
: );
|
||||
|
||||
switch( eReturnType )
|
||||
{
|
||||
@ -284,10 +310,21 @@ static void callVirtualMethod(
|
||||
*(unsigned char*)pRegisterReturn = (unsigned char)iret;
|
||||
break;
|
||||
case typelib_TypeClass_FLOAT:
|
||||
#ifndef __NO_FPRS__
|
||||
*(float*)pRegisterReturn = (float)dret;
|
||||
#else
|
||||
((unsigned int*)pRegisterReturn)[0] = iret;
|
||||
#endif
|
||||
break;
|
||||
case typelib_TypeClass_DOUBLE:
|
||||
#ifndef __NO_FPRS__
|
||||
*(double*)pRegisterReturn = dret;
|
||||
#else
|
||||
((unsigned int*)pRegisterReturn)[0] = iret;
|
||||
((unsigned int*)pRegisterReturn)[1] = iret2;
|
||||
#endif
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -399,6 +436,8 @@ static void cpp_call(
|
||||
case typelib_TypeClass_UNSIGNED_HYPER:
|
||||
*pPT++ = 'H';
|
||||
pCppStack += sizeof(sal_Int32); // extra long
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
// no longer needed
|
||||
@ -518,7 +557,6 @@ void unoInterfaceProxyDispatch(
|
||||
// is my surrogate
|
||||
bridges::cpp_uno::shared::UnoInterfaceProxy * pThis
|
||||
= static_cast< bridges::cpp_uno::shared::UnoInterfaceProxy *> (pUnoI);
|
||||
typelib_InterfaceTypeDescription * pTypeDescr = pThis->pTypeDescr;
|
||||
|
||||
switch (pMemberDescr->eTypeClass)
|
||||
{
|
||||
|
@ -121,16 +121,14 @@ static typelib_TypeClass cpp2uno_call(
|
||||
for ( sal_Int32 nPos = 0; nPos < nParams; ++nPos )
|
||||
{
|
||||
const typelib_MethodParameter & rParam = pParams[nPos];
|
||||
typelib_TypeDescription * pParamTypeDescr = 0;
|
||||
TYPELIB_DANGER_GET( &pParamTypeDescr, rParam.pTypeRef );
|
||||
|
||||
int nUsedGPR = 0;
|
||||
int nUsedSSE = 0;
|
||||
#if OSL_DEBUG_LEVEL > 1
|
||||
#if OSL_DEBUG_LEVEL > 0
|
||||
bool bFitsRegisters =
|
||||
#endif
|
||||
x86_64::examine_argument( rParam.pTypeRef, false, nUsedGPR, nUsedSSE );
|
||||
if ( !rParam.bOut && bridges::cpp_uno::shared::isSimpleType( pParamTypeDescr ) ) // value
|
||||
if ( !rParam.bOut && bridges::cpp_uno::shared::isSimpleType( rParam.pTypeRef ) ) // value
|
||||
{
|
||||
// Simple types must fit exactly one register on x86_64
|
||||
OSL_ASSERT( bFitsRegisters && ( ( nUsedSSE == 1 && nUsedGPR == 0 ) || ( nUsedSSE == 0 && nUsedGPR == 1 ) ) );
|
||||
@ -155,12 +153,12 @@ static typelib_TypeClass cpp2uno_call(
|
||||
else
|
||||
pCppArgs[nPos] = pUnoArgs[nPos] = ovrflw++;
|
||||
}
|
||||
|
||||
// no longer needed
|
||||
TYPELIB_DANGER_RELEASE( pParamTypeDescr );
|
||||
}
|
||||
else // struct <= 16 bytes || ptr to complex value || ref
|
||||
{
|
||||
typelib_TypeDescription * pParamTypeDescr = 0;
|
||||
TYPELIB_DANGER_GET( &pParamTypeDescr, rParam.pTypeRef );
|
||||
|
||||
void *pCppStack;
|
||||
if ( nr_gpr < x86_64::MAX_GPR_REGS )
|
||||
{
|
||||
|
@ -30,12 +30,6 @@
|
||||
|
||||
// MARKER(update_precomp.py): autogen include statement, do not remove
|
||||
#include "precompiled_bridges.hxx"
|
||||
#if OSL_DEBUG_LEVEL == 0
|
||||
# ifndef NDEBUG
|
||||
# define NDEBUG
|
||||
# endif
|
||||
#endif
|
||||
#include <assert.h>
|
||||
#include <sal/alloca.h>
|
||||
#include <bridges/remote/proxy.hxx>
|
||||
#include <bridges/remote/context.h>
|
||||
@ -84,7 +78,7 @@ void acquireRemote2UnoProxy( uno_Interface *pThis )
|
||||
freeRemote2UnoProxy,
|
||||
p->m_sOid.pData,
|
||||
p->m_pType );
|
||||
assert( (uno_Interface *)p == pThis );
|
||||
OSL_ASSERT( (uno_Interface *)p == pThis );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -30,12 +30,6 @@
|
||||
|
||||
// MARKER(update_precomp.py): autogen include statement, do not remove
|
||||
#include "precompiled_bridges.hxx"
|
||||
#if OSL_DEBUG_LEVEL == 0
|
||||
# ifndef NDEBUG
|
||||
# define NDEBUG
|
||||
# endif
|
||||
#endif
|
||||
#include <assert.h>
|
||||
#include <bridges/remote/remote.hxx>
|
||||
#include <bridges/remote/counter.hxx>
|
||||
|
||||
@ -90,7 +84,7 @@ void acquireRemote2RemoteStub( remote_Interface *pThis )
|
||||
freeRemote2RemoteStub,
|
||||
p->m_sOid.pData,
|
||||
p->m_pType );
|
||||
assert( (remote_Interface *)p == pThis );
|
||||
OSL_ASSERT( (remote_Interface *)p == pThis );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -29,7 +29,7 @@
|
||||
************************************************************************/
|
||||
namespace bridges_urp
|
||||
{
|
||||
#ifndef PRODUCT
|
||||
#ifdef DBG_UTIL
|
||||
#define BRIDGES_URP_PROT
|
||||
#endif
|
||||
|
||||
|
@ -372,8 +372,8 @@ inline sal_Bool OReaderThread::readFlags( struct MessageFlags *pFlags )
|
||||
}
|
||||
pFlags->bSynchronous = ( HDRFLAG_SYNCHRONOUS & moreFlags );
|
||||
pFlags->bMustReply = ( HDRFLAG_MUSTREPLY & moreFlags );
|
||||
OSL_ENSURE( pFlags->bSynchronous && pFlags->bMustReply ||
|
||||
! pFlags->bSynchronous && !pFlags->bMustReply,
|
||||
OSL_ENSURE( (pFlags->bSynchronous && pFlags->bMustReply) ||
|
||||
(!pFlags->bSynchronous && !pFlags->bMustReply),
|
||||
"urp-bridge : customized calls currently not supported !");
|
||||
}
|
||||
|
||||
|
@ -32,11 +32,6 @@
|
||||
#include "precompiled_bridges.hxx"
|
||||
#include <string.h>
|
||||
|
||||
#if OSL_DEBUG_LEVEL == 0
|
||||
#undef NDEBUG
|
||||
#define NDEBUG
|
||||
#endif
|
||||
#include <assert.h>
|
||||
#include <osl/time.h>
|
||||
|
||||
#include <osl/mutex.hxx>
|
||||
@ -193,10 +188,10 @@ int main( int argc, char *argv[] )
|
||||
{
|
||||
// test the factory
|
||||
Reference < XBridge > rBridge2 = rFactory->getBridge( OUString( RTL_CONSTASCII_USTRINGPARAM("bla blub")) );
|
||||
assert( rBridge2.is() );
|
||||
assert( rBridge2->getDescription() == rBridge->getDescription( ) );
|
||||
assert( rBridge2->getName() == rBridge->getName() );
|
||||
assert( rBridge2 == rBridge );
|
||||
OSL_ASSERT( rBridge2.is() );
|
||||
OSL_ASSERT( rBridge2->getDescription() == rBridge->getDescription( ) );
|
||||
OSL_ASSERT( rBridge2->getName() == rBridge->getName() );
|
||||
OSL_ASSERT( rBridge2 == rBridge );
|
||||
}
|
||||
|
||||
|
||||
@ -230,7 +225,7 @@ int main( int argc, char *argv[] )
|
||||
}
|
||||
|
||||
Reference < XBridge > rBridge = rFactory->getBridge( OUString( RTL_CONSTASCII_USTRINGPARAM("bla blub")) );
|
||||
// assert( ! rBridge.is() );
|
||||
// OSL_ASSERT( ! rBridge.is() );
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -30,11 +30,6 @@
|
||||
|
||||
// MARKER(update_precomp.py): autogen include statement, do not remove
|
||||
#include "precompiled_bridges.hxx"
|
||||
#if OSL_DEBUG_LEVEL == 0
|
||||
#undef NDEBUG
|
||||
#define NDEBUG
|
||||
#endif
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <osl/time.h>
|
||||
@ -598,7 +593,7 @@ void testException( const Reference < XCallMe > &r )
|
||||
{
|
||||
try {
|
||||
r->call( OUString( RTL_CONSTASCII_USTRINGPARAM("dummy")) , -1 );
|
||||
assert( ! "no exception flown !" );
|
||||
OSL_ASSERT( ! "no exception flown !" );
|
||||
}
|
||||
catch( TestBridgeException & e )
|
||||
{
|
||||
@ -606,11 +601,11 @@ void testException( const Reference < XCallMe > &r )
|
||||
}
|
||||
catch( Exception & e )
|
||||
{
|
||||
assert( ! "only base class of exception could be catched!" );
|
||||
OSL_ASSERT( ! "only base class of exception could be catched!" );
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
assert(! "wrong unknown exception !" );
|
||||
OSL_ASSERT(! "wrong unknown exception !" );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -30,10 +30,6 @@
|
||||
|
||||
// MARKER(update_precomp.py): autogen include statement, do not remove
|
||||
#include "precompiled_bridges.hxx"
|
||||
#if OSL_DEBUG_LEVEL == 0
|
||||
#define NDEBUG
|
||||
#endif
|
||||
#include <assert.h>
|
||||
#include <osl/time.h>
|
||||
|
||||
#include <osl/mutex.hxx>
|
||||
@ -96,7 +92,7 @@ void testPipe( const Reference < XMultiServiceFactory > & rSmgr )
|
||||
rSmgr->createInstance( OUString::createFromAscii( "com.sun.star.io.Pipe" ) ),
|
||||
UNO_QUERY );
|
||||
|
||||
assert( rOut.is() );
|
||||
OSL_ASSERT( rOut.is() );
|
||||
|
||||
{
|
||||
Sequence < sal_Int8 > seq( 10 );
|
||||
@ -115,7 +111,7 @@ void testPipe( const Reference < XMultiServiceFactory > & rSmgr )
|
||||
if( ! ( 42 == seq.getArray()[0] ) )
|
||||
printf( "wrong element in sequence\n" );
|
||||
|
||||
// assert( 0 );
|
||||
// OSL_ASSERT( 0 );
|
||||
}
|
||||
}
|
||||
#include<stdio.h>
|
||||
@ -155,7 +151,7 @@ void testDocument( const Reference < XMultiServiceFactory > & rSmgr )
|
||||
rSmgr->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Desktop" ))),
|
||||
UNO_QUERY );
|
||||
|
||||
assert( rLoader.is() );
|
||||
OSL_ASSERT( rLoader.is() );
|
||||
|
||||
sal_Char *urls[] = {
|
||||
"private:factory/swriter",
|
||||
|
@ -30,11 +30,6 @@
|
||||
|
||||
// MARKER(update_precomp.py): autogen include statement, do not remove
|
||||
#include "precompiled_bridges.hxx"
|
||||
#if OSL_DEBUG_LEVEL == 0
|
||||
#undef NDEBUG
|
||||
#define NDEBUG
|
||||
#endif
|
||||
#include <assert.h>
|
||||
#include <osl/time.h>
|
||||
|
||||
#include <osl/mutex.hxx>
|
||||
@ -201,7 +196,7 @@ int main( int argc, char *argv[] )
|
||||
|
||||
Reference < XBridge > rBridge = rFactory->getBridge(
|
||||
OUString( RTL_CONSTASCII_USTRINGPARAM("bla blub")) );
|
||||
assert( ! rBridge.is() );
|
||||
OSL_ASSERT( ! rBridge.is() );
|
||||
|
||||
}
|
||||
catch( Exception & )
|
||||
|
@ -1,4 +1,4 @@
|
||||
ure cli_ure : cppu cppuhelper sal codemaker stoc udkapi tools NULL
|
||||
ure cli_ure : cppu cppuhelper sal codemaker stoc udkapi bridges NULL
|
||||
ure cli_ure usr1 - all ure_mkout NULL
|
||||
ure cli_ure\inc nmake - all ure_inc NULL
|
||||
ure cli_ure\version nmake - all ure_source_version ure_inc NULL
|
||||
|
@ -41,7 +41,7 @@ CLIMAKER*=$(WRAPCMD) $(BIN)$/climaker
|
||||
|
||||
#----- compile .java files -----------------------------------------
|
||||
|
||||
JARFILES = sandbox.jar ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar
|
||||
JARFILES = ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar
|
||||
JAVAFILES = ClimakerTestCase.java
|
||||
JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class)
|
||||
|
||||
|
@ -38,7 +38,7 @@
|
||||
#include <windows.h>
|
||||
|
||||
#include "sal/types.h"
|
||||
#include "tools/pathutils.hxx"
|
||||
//#include "tools/pathutils.hxx"
|
||||
|
||||
namespace cli_ure {
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#*************************************************************************
|
||||
#
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
#
|
||||
# Copyright 2008 by Sun Microsystems, Inc.
|
||||
#
|
||||
# OpenOffice.org - a multi-platform office productivity suite
|
||||
@ -43,7 +43,7 @@ INCPRE += $(MISC)$/$(TARGET)$/inc
|
||||
|
||||
SHL1TARGET = $(TARGET)
|
||||
SHL1OBJS = $(SLO)$/test_codemaker_cppumaker.obj
|
||||
SHL1STDLIBS = $(CPPULIB) $(CPPUNITLIB) $(SALLIB)
|
||||
SHL1STDLIBS = $(CPPULIB) $(CPPUNITLIB) $(SALLIB) $(TESTSHL2LIB)
|
||||
SHL1VERSIONMAP = version.map
|
||||
SHL1IMPLIB = i$(SHL1TARGET)
|
||||
DEF1NAME = $(SHL1TARGET)
|
||||
|
@ -369,7 +369,7 @@
|
||||
#include "com/sun/star/uno/Any.hxx"
|
||||
#include "com/sun/star/uno/Type.hxx"
|
||||
#include "com/sun/star/uno/TypeClass.hpp"
|
||||
#include "cppunit/simpleheader.hxx"
|
||||
#include "testshl/simpleheader.hxx"
|
||||
#include "rtl/ustring.h"
|
||||
#include "rtl/ustring.hxx"
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#*************************************************************************
|
||||
#
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
#
|
||||
# Copyright 2008 by Sun Microsystems, Inc.
|
||||
#
|
||||
# OpenOffice.org - a multi-platform office productivity suite
|
||||
@ -43,28 +43,28 @@ INCPRE += $(MISC)$/$(TARGET)$/inc
|
||||
|
||||
SHL1TARGET = $(TARGET)_any
|
||||
SHL1OBJS = $(SLO)$/test_any.obj
|
||||
SHL1STDLIBS = $(CPPULIB) $(CPPUNITLIB) $(SALLIB)
|
||||
SHL1STDLIBS = $(CPPULIB) $(CPPUNITLIB) $(TESTSHL2LIB) $(SALLIB)
|
||||
SHL1VERSIONMAP = version.map
|
||||
SHL1IMPLIB = i$(SHL1TARGET)
|
||||
DEF1NAME = $(SHL1TARGET)
|
||||
|
||||
SHL2TARGET = $(TARGET)_unotype
|
||||
SHL2OBJS = $(SLO)$/test_unotype.obj
|
||||
SHL2STDLIBS = $(CPPULIB) $(CPPUNITLIB) $(SALLIB)
|
||||
SHL2STDLIBS = $(CPPULIB) $(CPPUNITLIB) $(TESTSHL2LIB) $(SALLIB)
|
||||
SHL2VERSIONMAP = version.map
|
||||
SHL2IMPLIB = i$(SHL2TARGET)
|
||||
DEF2NAME = $(SHL2TARGET)
|
||||
|
||||
SHL3TARGET = $(TARGET)_reference
|
||||
SHL3OBJS = $(SLO)$/test_reference.obj
|
||||
SHL3STDLIBS = $(CPPULIB) $(CPPUNITLIB) $(SALLIB)
|
||||
SHL3STDLIBS = $(CPPULIB) $(CPPUNITLIB) $(TESTSHL2LIB) $(SALLIB)
|
||||
SHL3VERSIONMAP = version.map
|
||||
SHL3IMPLIB = i$(SHL3TARGET)
|
||||
DEF3NAME = $(SHL3TARGET)
|
||||
|
||||
SHL4TARGET = $(TARGET)_recursion
|
||||
SHL4OBJS = $(SLO)$/test_recursion.obj
|
||||
SHL4STDLIBS = $(CPPULIB) $(CPPUNITLIB) $(SALLIB)
|
||||
SHL4STDLIBS = $(CPPULIB) $(CPPUNITLIB) $(TESTSHL2LIB) $(SALLIB)
|
||||
SHL4VERSIONMAP = version.map
|
||||
SHL4IMPLIB = i$(SHL4TARGET)
|
||||
DEF4NAME = $(SHL4TARGET)
|
||||
@ -92,7 +92,7 @@ $(MISC)$/$(TARGET)$/types.urd: types.idl
|
||||
$(IDLC) -O$(MISC)$/$(TARGET) -I$(SOLARIDLDIR) -cid -we $<
|
||||
|
||||
test .PHONY: $(SHL1TARGETN) $(SHL2TARGETN) $(SHL3TARGETN) $(SHL4TARGETN)
|
||||
testshl2 $(SHL1TARGETN)
|
||||
testshl2 $(SHL2TARGETN)
|
||||
testshl2 $(SHL3TARGETN)
|
||||
testshl2 $(SHL4TARGETN)
|
||||
$(TESTSHL2) $(SHL1TARGETN)
|
||||
$(TESTSHL2) $(SHL2TARGETN)
|
||||
$(TESTSHL2) $(SHL3TARGETN)
|
||||
$(TESTSHL2) $(SHL4TARGETN)
|
||||
|
@ -58,7 +58,7 @@
|
||||
#include "com/sun/star/uno/Sequence.hxx"
|
||||
#include "com/sun/star/uno/Type.hxx"
|
||||
#include "com/sun/star/uno/XInterface.hpp"
|
||||
#include "cppunit/simpleheader.hxx"
|
||||
#include "testshl/simpleheader.hxx"
|
||||
#include "osl/diagnose.h"
|
||||
#include "osl/interlck.h"
|
||||
#include "rtl/string.h"
|
||||
|
@ -31,7 +31,7 @@
|
||||
#include "precompiled_cppu.hxx"
|
||||
#include "sal/config.h"
|
||||
|
||||
#include "cppunit/simpleheader.hxx"
|
||||
#include "testshl/simpleheader.hxx"
|
||||
#include "sal/types.h"
|
||||
|
||||
#include "Rec.hpp"
|
||||
|
@ -35,7 +35,7 @@
|
||||
|
||||
#include "Interface1.hpp"
|
||||
|
||||
#include "cppunit/simpleheader.hxx"
|
||||
#include "testshl/simpleheader.hxx"
|
||||
#include "rtl/ustring.hxx"
|
||||
#include "sal/types.h"
|
||||
|
||||
|
@ -47,7 +47,7 @@
|
||||
#include "com/sun/star/uno/XComponentContext.hpp"
|
||||
#include "com/sun/star/uno/XInterface.hpp"
|
||||
#include "cppu/unotype.hxx"
|
||||
#include "cppunit/simpleheader.hxx"
|
||||
#include "testshl/simpleheader.hxx"
|
||||
#include "rtl/ustring.h"
|
||||
#include "rtl/ustring.hxx"
|
||||
#include "sal/types.h"
|
||||
|
@ -28,7 +28,7 @@
|
||||
*
|
||||
************************************************************************/
|
||||
|
||||
#include <cppunit/simpleheader.hxx>
|
||||
#include <testshl/simpleheader.hxx>
|
||||
|
||||
#include "com/sun/star/lang/XEventListener.hpp"
|
||||
#include "cppuhelper/interfacecontainer.hxx"
|
||||
|
@ -1,7 +1,7 @@
|
||||
#*************************************************************************
|
||||
#
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
#
|
||||
# Copyright 2008 by Sun Microsystems, Inc.
|
||||
#
|
||||
# OpenOffice.org - a multi-platform office productivity suite
|
||||
@ -41,7 +41,7 @@ ENABLE_EXCEPTIONS=TRUE
|
||||
|
||||
|
||||
# BEGIN ----------------------------------------------------------------
|
||||
# auto generated Target:joblist by codegen.pl
|
||||
# auto generated Target:joblist by codegen.pl
|
||||
SHL1OBJS= \
|
||||
$(SLO)$/cppu_ifcontainer.obj
|
||||
SHL1TARGET= cppu_ifcontainer
|
||||
@ -49,6 +49,7 @@ SHL1STDLIBS=\
|
||||
$(CPPUHELPERLIB) \
|
||||
$(SALLIB) \
|
||||
$(CPPULIB) \
|
||||
$(TESTSHL2LIB)\
|
||||
$(CPPUNITLIB)
|
||||
SHL1IMPLIB= i$(SHL1TARGET)
|
||||
DEF1NAME =$(SHL1TARGET)
|
||||
|
@ -1,7 +1,7 @@
|
||||
#*************************************************************************
|
||||
#
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
#
|
||||
# Copyright 2008 by Sun Microsystems, Inc.
|
||||
#
|
||||
# OpenOffice.org - a multi-platform office productivity suite
|
||||
@ -54,7 +54,7 @@ INCPRE += -I$(MISC)$/$(TARGET)$/inc
|
||||
|
||||
SHL1TARGET = $(TARGET)
|
||||
SHL1OBJS = $(SLO)$/test_propertysetmixin.obj
|
||||
SHL1STDLIBS = $(CPPULIB) $(CPPUHELPERLIB) $(CPPUNITLIB) $(SALLIB)
|
||||
SHL1STDLIBS = $(CPPULIB) $(CPPUHELPERLIB) $(CPPUNITLIB) $(SALLIB) $(TESTSHL2LIB)
|
||||
SHL1IMPLIB = i$(SHL1TARGET)
|
||||
DEF1NAME = $(SHL1TARGET)
|
||||
|
||||
|
@ -64,7 +64,7 @@
|
||||
#include "com/sun/star/uno/XComponentContext.hpp"
|
||||
#include "cppuhelper/implbase1.hxx"
|
||||
#include "cppuhelper/servicefactory.hxx"
|
||||
#include "cppunit/simpleheader.hxx"
|
||||
#include "testshl/simpleheader.hxx"
|
||||
#include "osl/mutex.hxx"
|
||||
#include "osl/thread.h"
|
||||
#include "rtl/ref.hxx"
|
||||
|
@ -28,7 +28,7 @@
|
||||
*
|
||||
************************************************************************/
|
||||
|
||||
#include <cppunit/simpleheader.hxx>
|
||||
#include <testshl/simpleheader.hxx>
|
||||
|
||||
#include "cppuhelper/unourl.hxx"
|
||||
#include "rtl/malformeduriexception.hxx"
|
||||
|
@ -1,7 +1,7 @@
|
||||
#*************************************************************************
|
||||
#
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
#
|
||||
# Copyright 2008 by Sun Microsystems, Inc.
|
||||
#
|
||||
# OpenOffice.org - a multi-platform office productivity suite
|
||||
@ -41,7 +41,7 @@ ENABLE_EXCEPTIONS=TRUE
|
||||
|
||||
|
||||
# BEGIN ----------------------------------------------------------------
|
||||
# auto generated Target:joblist by codegen.pl
|
||||
# auto generated Target:joblist by codegen.pl
|
||||
SHL1OBJS= \
|
||||
$(SLO)$/cppu_unourl.obj
|
||||
SHL1TARGET= cppu_unourl
|
||||
@ -49,6 +49,7 @@ SHL1STDLIBS=\
|
||||
$(CPPUHELPERLIB) \
|
||||
$(SALLIB) \
|
||||
$(CPPULIB) \
|
||||
$(TESTSHL2LIB)\
|
||||
$(CPPUNITLIB)
|
||||
SHL1IMPLIB= i$(SHL1TARGET)
|
||||
DEF1NAME =$(SHL1TARGET)
|
||||
|
@ -1,7 +1,7 @@
|
||||
#*************************************************************************
|
||||
#
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
#
|
||||
# Copyright 2008 by Sun Microsystems, Inc.
|
||||
#
|
||||
# OpenOffice.org - a multi-platform office productivity suite
|
||||
@ -41,7 +41,7 @@ DLLPRE = # no leading "lib" on .so files
|
||||
|
||||
SHL1TARGET = $(TARGET)
|
||||
SHL1OBJS = $(SLO)$/test_weak.obj
|
||||
SHL1STDLIBS = $(CPPULIB) $(CPPUHELPERLIB) $(CPPUNITLIB) $(SALLIB)
|
||||
SHL1STDLIBS = $(CPPULIB) $(CPPUHELPERLIB) $(CPPUNITLIB) $(SALLIB) $(TESTSHL2LIB)
|
||||
SHL1VERSIONMAP = version.map
|
||||
SHL1IMPLIB = i$(SHL1TARGET)
|
||||
DEF1NAME = $(SHL1TARGET)
|
||||
@ -53,4 +53,4 @@ SLOFILES = $(SHL1OBJS)
|
||||
ALLTAR: test
|
||||
|
||||
test .PHONY: $(SHL1TARGETN)
|
||||
testshl2 $(SHL1TARGETN)
|
||||
$(TESTSHL2) $(SHL1TARGETN)
|
||||
|
@ -41,7 +41,7 @@
|
||||
#include "com/sun/star/uno/XWeak.hpp"
|
||||
#include "cppuhelper/implbase1.hxx"
|
||||
#include "cppuhelper/weak.hxx"
|
||||
#include "cppunit/simpleheader.hxx"
|
||||
#include "testshl/simpleheader.hxx"
|
||||
#include "rtl/ref.hxx"
|
||||
#include "sal/types.h"
|
||||
|
||||
|
@ -40,13 +40,6 @@
|
||||
|
||||
#include <hash_map>
|
||||
|
||||
#if OSL_DEBUG_LEVEL == 0
|
||||
# ifndef NDEBUG
|
||||
# define NDEBUG
|
||||
# endif
|
||||
#endif
|
||||
#include <assert.h>
|
||||
|
||||
#include <com/sun/star/lang/XEventListener.hpp>
|
||||
|
||||
|
||||
|
@ -30,11 +30,6 @@
|
||||
|
||||
// MARKER(update_precomp.py): autogen include statement, do not remove
|
||||
#include "precompiled_cppuhelper.hxx"
|
||||
#if OSL_DEBUG_LEVEL == 0
|
||||
#undef NDEBUG
|
||||
#define NDEBUG
|
||||
#endif
|
||||
#include <assert.h>
|
||||
|
||||
#include <cppuhelper/stdidlclass.hxx>
|
||||
|
||||
@ -65,18 +60,18 @@ void testidlclass( const Reference < XMultiServiceFactory > &rSMgr)
|
||||
(XServiceInfo * ) 0
|
||||
);
|
||||
|
||||
assert( r.is() );
|
||||
OSL_ASSERT( r.is() );
|
||||
|
||||
|
||||
{ // test the xidlclassprovider interface !
|
||||
Reference< XIdlClassProvider > rProv( r , UNO_QUERY );
|
||||
assert( rProv.is() );
|
||||
OSL_ASSERT( rProv.is() );
|
||||
|
||||
{
|
||||
Sequence < Reference < XIdlClass > > seq = rProv->getIdlClasses();
|
||||
|
||||
// is always one
|
||||
assert( seq.getLength() == 1 );
|
||||
OSL_ASSERT( seq.getLength() == 1 );
|
||||
|
||||
// test the weak reference
|
||||
rProv->getIdlClasses();
|
||||
@ -89,7 +84,7 @@ void testidlclass( const Reference < XMultiServiceFactory > &rSMgr)
|
||||
}
|
||||
|
||||
|
||||
assert( r->getName() == sImplName );
|
||||
OSL_ASSERT( r->getName() == sImplName );
|
||||
|
||||
// test equals
|
||||
Reference < XIdlClass > r2 =
|
||||
@ -101,18 +96,18 @@ void testidlclass( const Reference < XMultiServiceFactory > &rSMgr)
|
||||
(XServiceInfo * ) 0
|
||||
);
|
||||
// test for implementation name
|
||||
assert( r2->equals( r ) );
|
||||
OSL_ASSERT( r2->equals( r ) );
|
||||
|
||||
Sequence < Reference < XIdlClass > > seqIdlClass = r->getInterfaces();
|
||||
|
||||
//TODO !
|
||||
// one idl class for one interface
|
||||
// this test fails, if core reflection fails !
|
||||
// assert( 1 == seqIdlClass.getLength() );
|
||||
// OSL_ASSERT( 1 == seqIdlClass.getLength() );
|
||||
// Reference < XIdlClass > rIdlInterface = seqIdlClass.getArray()[0];
|
||||
|
||||
// check for IdlClass interface returned by Core Reflection
|
||||
// assert( rIdlInterface.is() );
|
||||
// OSL_ASSERT( rIdlInterface.is() );
|
||||
|
||||
|
||||
|
||||
|
@ -34,12 +34,6 @@
|
||||
|
||||
#include <com/sun/star/beans/Property.hpp>
|
||||
|
||||
#if OSL_DEBUG_LEVEL == 0
|
||||
#undef NDEBUG
|
||||
#define NDEBUG
|
||||
#endif
|
||||
#include <assert.h>
|
||||
|
||||
using namespace ::com::sun::star::uno;
|
||||
using namespace ::cppu;
|
||||
|
||||
@ -51,27 +45,27 @@ void testPropertyTypeHelper()
|
||||
|
||||
sal_Int32 i;
|
||||
convertPropertyValue( i , a );
|
||||
assert( 25 == i );
|
||||
OSL_ASSERT( 25 == i );
|
||||
|
||||
sal_Int16 i16;
|
||||
convertPropertyValue( i16 , a );
|
||||
assert( 25 == i16 );
|
||||
OSL_ASSERT( 25 == i16 );
|
||||
|
||||
sal_Int8 i8;
|
||||
convertPropertyValue( i8 , a );
|
||||
assert( 25 == i8 );
|
||||
OSL_ASSERT( 25 == i8 );
|
||||
|
||||
sal_uInt32 i32;
|
||||
convertPropertyValue( i32 , a );
|
||||
assert( 25 == i32 );
|
||||
OSL_ASSERT( 25 == i32 );
|
||||
|
||||
double d;
|
||||
convertPropertyValue( d , a );
|
||||
assert( 25. == d );
|
||||
OSL_ASSERT( 25. == d );
|
||||
|
||||
float f;
|
||||
convertPropertyValue( f , a );
|
||||
assert( 25. == f );
|
||||
OSL_ASSERT( 25. == f );
|
||||
|
||||
::com::sun::star::beans::Property prop;
|
||||
|
||||
@ -83,11 +77,11 @@ void testPropertyTypeHelper()
|
||||
|
||||
::com::sun::star::beans::Property prop2;
|
||||
convertPropertyValue( prop2 , a );
|
||||
assert( prop.Handle == prop2.Handle && prop.Name == prop2.Name && prop.Attributes == prop2.Attributes );
|
||||
OSL_ASSERT( prop.Handle == prop2.Handle && prop.Name == prop2.Name && prop.Attributes == prop2.Attributes );
|
||||
|
||||
|
||||
::rtl::OUString ow;
|
||||
a <<= prop.Name;
|
||||
convertPropertyValue( ow , a );
|
||||
assert( ow == prop.Name );
|
||||
OSL_ASSERT( ow == prop.Name );
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ PRJ=..$/..
|
||||
PRJNAME=cpputools
|
||||
TARGET=sp2bv
|
||||
TARGETTYPE=CUI
|
||||
.IF "$(OS)"!="IRIX" && "$(OS)" != "MACOSX"
|
||||
.IF "$(OS)" != "MACOSX"
|
||||
# hack to get stdc++ linked
|
||||
NO_DEFAULT_STL=TRUE
|
||||
.ENDIF
|
||||
|
@ -49,12 +49,6 @@
|
||||
#include <osl/mutex.hxx>
|
||||
#include <rtl/ustrbuf.hxx>
|
||||
|
||||
#if OSL_DEBUG_LEVEL == 0
|
||||
# ifndef NDEBUG
|
||||
# define NDEBUG
|
||||
# endif
|
||||
#endif
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
||||
|
||||
@ -632,7 +626,7 @@ sal_Int32 OMarkableInputStream::readBytes(Sequence< sal_Int8 >& aData, sal_Int32
|
||||
sal_Int32 nToRead = nBytesToRead - ( m_pBuffer->getSize() - m_nCurrentPos );
|
||||
nRead = m_input->readBytes( aData , nToRead );
|
||||
|
||||
assert( aData.getLength() == nRead );
|
||||
OSL_ASSERT( aData.getLength() == nRead );
|
||||
|
||||
try
|
||||
{
|
||||
@ -650,7 +644,7 @@ sal_Int32 OMarkableInputStream::readBytes(Sequence< sal_Int8 >& aData, sal_Int32
|
||||
}
|
||||
}
|
||||
|
||||
assert( m_pBuffer->getSize() - m_nCurrentPos >= nBytesToRead );
|
||||
OSL_ASSERT( m_pBuffer->getSize() - m_nCurrentPos >= nBytesToRead );
|
||||
|
||||
m_pBuffer->readAt( m_nCurrentPos , aData , nBytesToRead );
|
||||
|
||||
|
@ -55,10 +55,6 @@
|
||||
#include <osl/conditn.hxx>
|
||||
#include <osl/mutex.hxx>
|
||||
|
||||
#if OSL_DEBUG_LEVEL == 0
|
||||
#define NDEBUG
|
||||
#endif
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
||||
using namespace ::rtl;
|
||||
@ -209,13 +205,13 @@ sal_Int32 ODataStreamTest::test(
|
||||
rSource = Reference< XActiveDataSource > ( x, UNO_QUERY );
|
||||
}
|
||||
|
||||
assert( rPipeInput.is() );
|
||||
assert( rPipeOutput.is() );
|
||||
OSL_ASSERT( rPipeInput.is() );
|
||||
OSL_ASSERT( rPipeOutput.is() );
|
||||
rSink->setInputStream( rPipeInput );
|
||||
rSource->setOutputStream( rPipeOutput );
|
||||
|
||||
assert( rSink->getInputStream().is() );
|
||||
assert( rSource->getOutputStream().is() );
|
||||
OSL_ASSERT( rSink->getInputStream().is() );
|
||||
OSL_ASSERT( rSource->getOutputStream().is() );
|
||||
|
||||
if( 1 == hTestHandle ) {
|
||||
testSimple( rInput , rOutput );
|
||||
@ -778,10 +774,10 @@ sal_Int32 OObjectStreamTest::test( const OUString& TestName,
|
||||
Reference <XOutputStream > markableOutput( x , UNO_QUERY );
|
||||
Reference <XActiveDataSource > markableSource( x , UNO_QUERY );
|
||||
|
||||
assert( markableInput.is() );
|
||||
assert( markableOutput.is() );
|
||||
assert( markableSink.is() );
|
||||
assert( markableSource.is() );
|
||||
OSL_ASSERT( markableInput.is() );
|
||||
OSL_ASSERT( markableOutput.is() );
|
||||
OSL_ASSERT( markableSink.is() );
|
||||
OSL_ASSERT( markableSource.is() );
|
||||
|
||||
markableSink->setInputStream( rPipeInput );
|
||||
markableSource->setOutputStream( rPipeOutput );
|
||||
@ -799,14 +795,14 @@ sal_Int32 OObjectStreamTest::test( const OUString& TestName,
|
||||
rSource = Reference <XActiveDataSource>( x, UNO_QUERY );
|
||||
}
|
||||
|
||||
assert( rPipeInput.is() );
|
||||
assert( rPipeOutput.is() );
|
||||
OSL_ASSERT( rPipeInput.is() );
|
||||
OSL_ASSERT( rPipeOutput.is() );
|
||||
|
||||
rSink->setInputStream( markableInput );
|
||||
rSource->setOutputStream( markableOutput );
|
||||
|
||||
assert( rSink->getInputStream().is() );
|
||||
assert( rSource->getOutputStream().is() );
|
||||
OSL_ASSERT( rSink->getInputStream().is() );
|
||||
OSL_ASSERT( rSource->getOutputStream().is() );
|
||||
|
||||
if( 1 + DATASTREAM_TEST_MAX_HANDLE == hTestHandle ) {
|
||||
testObject( rOutput , rInput);
|
||||
|
@ -46,12 +46,6 @@
|
||||
#include <osl/conditn.hxx>
|
||||
#include <osl/mutex.hxx>
|
||||
|
||||
#if OSL_DEBUG_LEVEL == 0
|
||||
#define NDEBUG
|
||||
#endif
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
||||
using namespace ::rtl;
|
||||
using namespace ::osl;
|
||||
using namespace ::cppu;
|
||||
@ -159,8 +153,8 @@ sal_Int32 OMarkableOutputStreamTest::test(
|
||||
|
||||
Reference< XOutputStream > rOutput( TestObject , UNO_QUERY );
|
||||
|
||||
assert( rPipeInput.is() );
|
||||
assert( rOutput.is() );
|
||||
OSL_ASSERT( rPipeInput.is() );
|
||||
OSL_ASSERT( rOutput.is() );
|
||||
if( 1 == hTestHandle ) {
|
||||
// checks usual streaming
|
||||
testSimple( rOutput , rPipeInput );
|
||||
@ -526,8 +520,8 @@ sal_Int32 OMarkableInputStreamTest::test(
|
||||
|
||||
Reference < XInputStream > rInput( TestObject , UNO_QUERY );
|
||||
|
||||
assert( rPipeOutput.is() );
|
||||
assert( rInput.is() );
|
||||
OSL_ASSERT( rPipeOutput.is() );
|
||||
OSL_ASSERT( rInput.is() );
|
||||
if( 1 == hTestHandle ) {
|
||||
// checks usual streaming
|
||||
testSimple( rPipeOutput , rInput );
|
||||
|
@ -37,7 +37,6 @@ import java.lang.ref.ReferenceQueue;
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedList;
|
||||
|
||||
/**
|
||||
* The java_environment is the environment where objects and
|
||||
@ -159,70 +158,64 @@ public final class java_environment implements IEnvironment {
|
||||
}
|
||||
|
||||
private static final class Registry {
|
||||
public Object register(Object object, String oid, Type type) {
|
||||
synchronized (map) {
|
||||
cleanUp();
|
||||
Level1Entry l1 = getLevel1Entry(oid);
|
||||
if (l1 != null) {
|
||||
Level2Entry l2 = l1.get(type);
|
||||
if (l2 != null) {
|
||||
Object o = l2.get();
|
||||
if (o != null) {
|
||||
l2.acquire();
|
||||
return o;
|
||||
}
|
||||
public synchronized Object register(
|
||||
Object object, String oid, Type type)
|
||||
{
|
||||
cleanUp();
|
||||
Level1Entry l1 = level1map.get(oid);
|
||||
if (l1 != null) {
|
||||
Level2Entry l2 = l1.level2map.get(type);
|
||||
if (l2 != null) {
|
||||
Object o = l2.get();
|
||||
if (o != null) {
|
||||
l2.acquire();
|
||||
return o;
|
||||
}
|
||||
}
|
||||
// TODO If a holder references an unreachable object, but still
|
||||
// has a positive count, it is replaced with a new holder
|
||||
// (referencing a reachable object, and with a count of 1). Any
|
||||
// later calls to revoke that should decrement the count of the
|
||||
// previous holder would now decrement the count of the new
|
||||
// holder, removing it prematurely. This is a design flaw that
|
||||
// will be fixed when IEnvironment.revokeInterface is changed to
|
||||
// no longer use counting. (And this problem is harmless, as
|
||||
// currently a holder either references a strongly held object
|
||||
// and uses register/revoke to control it, or references a
|
||||
// weakly held proxy and never revokes it.)
|
||||
if (l1 == null) {
|
||||
l1 = new Level1Entry();
|
||||
map.put(oid, l1);
|
||||
}
|
||||
l1.add(new Level2Entry(oid, type, object, queue));
|
||||
}
|
||||
// TODO If a holder references an unreachable object, but still has
|
||||
// a positive count, it is replaced with a new holder (referencing a
|
||||
// reachable object, and with a count of 1). Any later calls to
|
||||
// revoke that should decrement the count of the previous holder
|
||||
// would now decrement the count of the new holder, removing it
|
||||
// prematurely. This is a design flaw that will be fixed when
|
||||
// IEnvironment.revokeInterface is changed to no longer use
|
||||
// counting. (And this problem is harmless, as currently a holder
|
||||
// either references a strongly held object and uses register/revoke
|
||||
// to control it, or references a weakly held proxy and never
|
||||
// revokes it.)
|
||||
if (l1 == null) {
|
||||
l1 = new Level1Entry();
|
||||
level1map.put(oid, l1);
|
||||
}
|
||||
l1.level2map.put(type, new Level2Entry(oid, type, object, queue));
|
||||
return object;
|
||||
}
|
||||
|
||||
public boolean revoke(String oid, Type type) {
|
||||
synchronized (map) {
|
||||
Level1Entry l1 = getLevel1Entry(oid);
|
||||
Level2Entry l2 = null;
|
||||
if (l1 != null) {
|
||||
l2 = l1.get(type);
|
||||
if (l2 != null && l2.release()) {
|
||||
removeLevel2Entry(oid, l1, l2);
|
||||
}
|
||||
public synchronized boolean revoke(String oid, Type type) {
|
||||
Level1Entry l1 = level1map.get(oid);
|
||||
Level2Entry l2 = null;
|
||||
if (l1 != null) {
|
||||
l2 = l1.level2map.get(type);
|
||||
if (l2 != null && l2.release()) {
|
||||
removeLevel2Entry(l1, oid, type);
|
||||
}
|
||||
cleanUp();
|
||||
return l2 != null;
|
||||
}
|
||||
cleanUp();
|
||||
return l2 != null;
|
||||
}
|
||||
|
||||
public Object get(String oid, Type type) {
|
||||
synchronized (map) {
|
||||
Level1Entry l1 = getLevel1Entry(oid);
|
||||
return l1 == null ? null : l1.find(type);
|
||||
}
|
||||
public synchronized Object get(String oid, Type type) {
|
||||
Level1Entry l1 = level1map.get(oid);
|
||||
return l1 == null ? null : l1.find(type);
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
synchronized (map) {
|
||||
map.clear();
|
||||
cleanUp();
|
||||
}
|
||||
public synchronized void clear() {
|
||||
level1map.clear();
|
||||
cleanUp();
|
||||
}
|
||||
|
||||
// must only be called while synchronized on map:
|
||||
// must only be called while synchronized on this Registry:
|
||||
private void cleanUp() {
|
||||
for (;;) {
|
||||
Level2Entry l2 = (Level2Entry) queue.poll();
|
||||
@ -235,55 +228,38 @@ public final class java_environment implements IEnvironment {
|
||||
// created since now e1.get() == null), and only then e1 is
|
||||
// enqueued. To not erroneously remove the new e2 in that case,
|
||||
// check whether the map still contains e1:
|
||||
String oid = l2.getOid();
|
||||
Level1Entry l1 = getLevel1Entry(oid);
|
||||
if (l1 != null && l1.get(l2.getType()) == l2) {
|
||||
removeLevel2Entry(oid, l1, l2);
|
||||
Level1Entry l1 = level1map.get(l2.oid);
|
||||
if (l1 != null && l1.level2map.get(l2.type) == l2) {
|
||||
removeLevel2Entry(l1, l2.oid, l2.type);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// must only be called while synchronized on map:
|
||||
private Level1Entry getLevel1Entry(String oid) {
|
||||
return (Level1Entry) map.get(oid);
|
||||
}
|
||||
|
||||
// must only be called while synchronized on map:
|
||||
private void removeLevel2Entry(String oid, Level1Entry l1,
|
||||
Level2Entry l2) {
|
||||
if (l1.remove(l2)) {
|
||||
map.remove(oid);
|
||||
// must only be called while synchronized on this Registry:
|
||||
private void removeLevel2Entry(Level1Entry l1, String oid, Type type) {
|
||||
l1.level2map.remove(type);
|
||||
if (l1.level2map.isEmpty()) {
|
||||
level1map.remove(oid);
|
||||
}
|
||||
}
|
||||
|
||||
private static final class Level1Entry {
|
||||
// must only be called while synchronized on map:
|
||||
public Level2Entry get(Type type) {
|
||||
for (Iterator i = list.iterator(); i.hasNext();) {
|
||||
Level2Entry l2 = (Level2Entry) i.next();
|
||||
if (l2.getType().equals(type)) {
|
||||
return l2;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
// must only be called while synchronized on map:
|
||||
// must only be called while synchronized on enclosing Registry:
|
||||
public Object find(Type type) {
|
||||
// First, look for an exactly matching entry; then, look for an
|
||||
// arbitrary entry for a subtype of the request type:
|
||||
for (Iterator i = list.iterator(); i.hasNext();) {
|
||||
Level2Entry l2 = (Level2Entry) i.next();
|
||||
if (l2.getType().equals(type)) {
|
||||
Object o = l2.get();
|
||||
if (o != null) {
|
||||
return o;
|
||||
}
|
||||
Level2Entry l2 = level2map.get(type);
|
||||
if (l2 != null) {
|
||||
Object o = l2.get();
|
||||
if (o != null) {
|
||||
return o;
|
||||
}
|
||||
}
|
||||
for (Iterator i = list.iterator(); i.hasNext();) {
|
||||
Level2Entry l2 = (Level2Entry) i.next();
|
||||
if (type.isSupertypeOf(l2.getType())) {
|
||||
for (Iterator<Level2Entry> i = level2map.values().iterator();
|
||||
i.hasNext();)
|
||||
{
|
||||
l2 = i.next();
|
||||
if (type.isSupertypeOf(l2.type)) {
|
||||
Object o = l2.get();
|
||||
if (o != null) {
|
||||
return o;
|
||||
@ -293,53 +269,37 @@ public final class java_environment implements IEnvironment {
|
||||
return null;
|
||||
}
|
||||
|
||||
// must only be called while synchronized on map:
|
||||
public void add(Level2Entry l2) {
|
||||
list.add(l2);
|
||||
}
|
||||
|
||||
// must only be called while synchronized on map:
|
||||
public boolean remove(Level2Entry l2) {
|
||||
list.remove(l2);
|
||||
return list.isEmpty();
|
||||
}
|
||||
|
||||
private final LinkedList list = new LinkedList(); // of Level2Entry
|
||||
public final HashMap<Type, Level2Entry> level2map =
|
||||
new HashMap<Type, Level2Entry>();
|
||||
}
|
||||
|
||||
private static final class Level2Entry extends WeakReference {
|
||||
public Level2Entry(String oid, Type type, Object object,
|
||||
ReferenceQueue queue) {
|
||||
private static final class Level2Entry extends WeakReference<Object> {
|
||||
public Level2Entry(
|
||||
String oid, Type type, Object object, ReferenceQueue queue)
|
||||
{
|
||||
super(object, queue);
|
||||
this.oid = oid;
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getOid() {
|
||||
return oid;
|
||||
}
|
||||
|
||||
public Type getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
// must only be called while synchronized on map:
|
||||
// must only be called while synchronized on enclosing Registry:
|
||||
public void acquire() {
|
||||
++count;
|
||||
}
|
||||
|
||||
// must only be called while synchronized on map:
|
||||
// must only be called while synchronized on enclosing Registry:
|
||||
public boolean release() {
|
||||
return --count == 0;
|
||||
}
|
||||
|
||||
private final String oid;
|
||||
private final Type type;
|
||||
public final String oid;
|
||||
public final Type type;
|
||||
|
||||
private int count = 1;
|
||||
}
|
||||
|
||||
private final HashMap map = new HashMap();
|
||||
// from OID (String) to Level1Entry
|
||||
private final HashMap<String, Level1Entry> level1map =
|
||||
new HashMap<String, Level1Entry>();
|
||||
private final ReferenceQueue queue = new ReferenceQueue();
|
||||
}
|
||||
|
||||
|
@ -34,9 +34,7 @@ PRJ=..$/..$/..
|
||||
PRJNAME=javaldx
|
||||
TARGET=javaldx
|
||||
TARGETTYPE=CUI
|
||||
.IF "$(OS)"!="IRIX"
|
||||
NO_DEFAULT_STL=TRUE
|
||||
.ENDIF
|
||||
LIBTARGET=NO
|
||||
ENABLE_EXCEPTIONS=true
|
||||
|
||||
|
@ -54,13 +54,6 @@ public:
|
||||
} test;
|
||||
#endif
|
||||
|
||||
SunVersion::SunVersion(): m_nUpdateSpecial(0),
|
||||
m_preRelease(Rel_NONE),
|
||||
m_bValid(false)
|
||||
{
|
||||
memset(m_arVersionParts, 0, sizeof(m_arVersionParts));
|
||||
}
|
||||
|
||||
SunVersion::SunVersion(const rtl::OUString &usVer):
|
||||
m_nUpdateSpecial(0), m_preRelease(Rel_NONE),
|
||||
usVersion(usVer)
|
||||
|
@ -92,7 +92,6 @@ protected:
|
||||
|
||||
PreRelease m_preRelease;
|
||||
public:
|
||||
SunVersion();
|
||||
SunVersion(const char * szVer);
|
||||
SunVersion(const rtl::OUString& usVer);
|
||||
~SunVersion();
|
||||
|
@ -300,13 +300,14 @@ class AsynchReader: public Thread
|
||||
public:
|
||||
|
||||
AsynchReader(oslFileHandle & rHandle);
|
||||
|
||||
#if OSL_DEBUG_LEVEL >= 2
|
||||
/** only call this function after this thread has finished.
|
||||
|
||||
That is, call join on this instance and then call getData.
|
||||
|
||||
*/
|
||||
OString getData();
|
||||
#endif
|
||||
};
|
||||
|
||||
AsynchReader::AsynchReader(oslFileHandle & rHandle):
|
||||
@ -314,11 +315,13 @@ AsynchReader::AsynchReader(oslFileHandle & rHandle):
|
||||
{
|
||||
}
|
||||
|
||||
#if OSL_DEBUG_LEVEL >= 2
|
||||
OString AsynchReader::getData()
|
||||
{
|
||||
OSL_ASSERT(isRunning() == sal_False );
|
||||
return OString(m_arData.get(), m_nDataSize);
|
||||
}
|
||||
#endif
|
||||
|
||||
void AsynchReader::run()
|
||||
{
|
||||
|
@ -42,6 +42,9 @@
|
||||
#include <com/sun/star/util/Color.idl>
|
||||
#endif
|
||||
|
||||
#ifndef __com_sun_star_style_VerticalAlignment_idl__
|
||||
#include <com/sun/star/style/VerticalAlignment.idl>
|
||||
#endif
|
||||
|
||||
//=============================================================================
|
||||
|
||||
@ -262,6 +265,14 @@ published service UnoControlCurrencyFieldModel
|
||||
this is possible.</p>
|
||||
*/
|
||||
[optional, property] short MouseWheelBehavior;
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
/** specifies the vertical alignment of the text in the control.
|
||||
|
||||
@since OpenOffice.org 3.3
|
||||
*/
|
||||
[optional, property] com::sun::star::style::VerticalAlignment VerticalAlign;
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
|
@ -42,6 +42,9 @@
|
||||
#include <com/sun/star/util/Color.idl>
|
||||
#endif
|
||||
|
||||
#ifndef __com_sun_star_style_VerticalAlignment_idl__
|
||||
#include <com/sun/star/style/VerticalAlignment.idl>
|
||||
#endif
|
||||
|
||||
//=============================================================================
|
||||
|
||||
@ -274,6 +277,14 @@ published service UnoControlDateFieldModel
|
||||
this is possible.</p>
|
||||
*/
|
||||
[optional, property] short MouseWheelBehavior;
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
/** specifies the vertical alignment of the text in the control.
|
||||
|
||||
@since OpenOffice.org 3.3
|
||||
*/
|
||||
[optional, property] com::sun::star::style::VerticalAlignment VerticalAlign;
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
|
@ -42,6 +42,9 @@
|
||||
#include <com/sun/star/util/Color.idl>
|
||||
#endif
|
||||
|
||||
#ifndef __com_sun_star_style_VerticalAlignment_idl__
|
||||
#include <com/sun/star/style/VerticalAlignment.idl>
|
||||
#endif
|
||||
|
||||
//=============================================================================
|
||||
|
||||
@ -274,6 +277,14 @@ published service UnoControlEditModel
|
||||
@since OOo 3.1
|
||||
*/
|
||||
[optional, property] short WritingMode;
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
/** specifies the vertical alignment of the text in the control.
|
||||
|
||||
@since OpenOffice.org 3.3
|
||||
*/
|
||||
[optional, property] com::sun::star::style::VerticalAlignment VerticalAlign;
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
|
@ -42,6 +42,9 @@
|
||||
#include <com/sun/star/util/Color.idl>
|
||||
#endif
|
||||
|
||||
#ifndef __com_sun_star_style_VerticalAlignment_idl__
|
||||
#include <com/sun/star/style/VerticalAlignment.idl>
|
||||
#endif
|
||||
|
||||
//=============================================================================
|
||||
|
||||
@ -169,6 +172,13 @@ published service UnoControlFileControlModel
|
||||
*/
|
||||
[property] com::sun::star::util::Color TextLineColor;
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
/** specifies the vertical alignment of the text in the control.
|
||||
|
||||
@since OpenOffice.org 3.3
|
||||
*/
|
||||
[optional, property] com::sun::star::style::VerticalAlignment VerticalAlign;
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
|
@ -46,6 +46,9 @@
|
||||
#include <com/sun/star/util/XNumberFormatsSupplier.idl>
|
||||
#endif
|
||||
|
||||
#ifndef __com_sun_star_style_VerticalAlignment_idl__
|
||||
#include <com/sun/star/style/VerticalAlignment.idl>
|
||||
#endif
|
||||
|
||||
//=============================================================================
|
||||
|
||||
@ -307,6 +310,14 @@ published service UnoControlFormattedFieldModel
|
||||
this is possible.</p>
|
||||
*/
|
||||
[optional, property] short MouseWheelBehavior;
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
/** specifies the vertical alignment of the text in the control.
|
||||
|
||||
@since OpenOffice.org 3.3
|
||||
*/
|
||||
[optional, property] com::sun::star::style::VerticalAlignment VerticalAlign;
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
|
@ -42,6 +42,9 @@
|
||||
#include <com/sun/star/util/Color.idl>
|
||||
#endif
|
||||
|
||||
#ifndef __com_sun_star_style_VerticalAlignment_idl__
|
||||
#include <com/sun/star/style/VerticalAlignment.idl>
|
||||
#endif
|
||||
|
||||
//=============================================================================
|
||||
|
||||
@ -250,6 +253,14 @@ published service UnoControlNumericFieldModel
|
||||
this is possible.</p>
|
||||
*/
|
||||
[optional, property] short MouseWheelBehavior;
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
/** specifies the vertical alignment of the text in the control.
|
||||
|
||||
@since OpenOffice.org 3.3
|
||||
*/
|
||||
[optional, property] com::sun::star::style::VerticalAlignment VerticalAlign;
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
|
@ -42,6 +42,9 @@
|
||||
#include <com/sun/star/util/Color.idl>
|
||||
#endif
|
||||
|
||||
#ifndef __com_sun_star_style_VerticalAlignment_idl__
|
||||
#include <com/sun/star/style/VerticalAlignment.idl>
|
||||
#endif
|
||||
|
||||
//=============================================================================
|
||||
|
||||
@ -209,6 +212,14 @@ published service UnoControlPatternFieldModel
|
||||
this is possible.</p>
|
||||
*/
|
||||
[optional, property] short MouseWheelBehavior;
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
/** specifies the vertical alignment of the text in the control.
|
||||
|
||||
@since OpenOffice.org 3.3
|
||||
*/
|
||||
[optional, property] com::sun::star::style::VerticalAlignment VerticalAlign;
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
|
@ -42,6 +42,9 @@
|
||||
#include <com/sun/star/util/Color.idl>
|
||||
#endif
|
||||
|
||||
#ifndef __com_sun_star_style_VerticalAlignment_idl__
|
||||
#include <com/sun/star/style/VerticalAlignment.idl>
|
||||
#endif
|
||||
|
||||
//=============================================================================
|
||||
|
||||
@ -254,6 +257,14 @@ published service UnoControlTimeFieldModel
|
||||
this is possible.</p>
|
||||
*/
|
||||
[optional, property] short MouseWheelBehavior;
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
/** specifies the vertical alignment of the text in the control.
|
||||
|
||||
@since OpenOffice.org 3.3
|
||||
*/
|
||||
[optional, property] com::sun::star::style::VerticalAlignment VerticalAlign;
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
|
@ -84,127 +84,26 @@ module runtime {
|
||||
|
||||
//=============================================================================
|
||||
|
||||
/** specifies a component controlling the interaction between the user and form functionality.
|
||||
|
||||
<p>As soon as a form (containing controls) is to be presented to the user,
|
||||
there is a need for an instance controlling the user interaction.<br/>
|
||||
Such a <type>FormController</type> is responsible for dialog processing,
|
||||
like controlling the tab order and the grouping of controls.</p>
|
||||
|
||||
<p>As a form may contain one or many subforms, a <type>FormController</type> may
|
||||
contain one or more other <type>FormController</type>s, so the form model structure or hierarchy
|
||||
is reflected in the structure of <type>FormController</type>s.</p>
|
||||
|
||||
<h3>Responsibilities</h3>
|
||||
<p>A <type>FormController</type> is responsible for a <type scope="com::sun::star::awt">UnoControlContainer</type>,
|
||||
and all controls therein.</p>
|
||||
|
||||
<p>Furthermore, a form controller is responsible for preventing invalid user input. That is, if the form
|
||||
contains controls bound to a database, or to an external validator, then the form controller will
|
||||
check their current value when the current record is to be saved to the database.</p>
|
||||
|
||||
<p>First, it will check whether any controls with an external validator exist. If so, those validators
|
||||
will be asked to validate the current control content. If this fails, the message provided by the validator
|
||||
is displayed to the user, the control is focused, and the update of the record is vetoed.</p>
|
||||
|
||||
<p>Second, the controls are examined for NULL values. If a control is bound to a database field which
|
||||
is declared to be <code>NOT NULL</code>, no auto-increment field, but still <NULL/>, then an error
|
||||
message is shown to the user saying that input is required, the respective control is focused, and
|
||||
the update of the record is vetoed.</p>
|
||||
|
||||
<p>Note that you can precent the second check - for database fields containing <NULL/> values - on
|
||||
a per-form and a per-database basis.<br/>
|
||||
For the former, you need to add a boolean property <code>FormsCheckRequiredFields</code> to the form
|
||||
(aka the <code>FormController</code>'s model), using its
|
||||
<member scope="com::sun::star::beans">XPropertyContainer::addProperty</member> method, with a value
|
||||
of <FALSE/>.<br/>
|
||||
For the latter, you need to set the respective property of the data source's <code>Settings</code>
|
||||
(also named <code>FormsCheckRequiredFields</code>) to <FALSE/>.</p>
|
||||
|
||||
<p>Alternatively, you can prevent the check on a per-control basis, using the
|
||||
<member>DataAwareControlModel::InputRequired</member> property of a single control model.</p>
|
||||
|
||||
@see com::sun::star::form::component:Form
|
||||
@see com::sun::star::awt::XTabController
|
||||
@see com::sun::star::form::binding::BindableControlModel
|
||||
@see com::sun::star::sdb::DataSource::Settings
|
||||
/** is superseded by <type scope="com::sun::star::form::runtime">FormController</type>.
|
||||
@deprecated
|
||||
*/
|
||||
published service FormController
|
||||
{
|
||||
/** allows delegating form controller functionality to the component
|
||||
|
||||
<p>If a control which the controller is responsible for supports the <type scope="com::sun::star::frame">XDispatchProviderInterception</type>
|
||||
interface, the controller registers a dispatch interceptor. Then, the control can try to delegate part of its
|
||||
functionality to the controller by querying the dispatch interceptor for it.</p>
|
||||
*/
|
||||
[optional] service FormControllerDispatcher;
|
||||
|
||||
/** denotes the instance which is used to implement operations on the form which the controller
|
||||
works for.
|
||||
|
||||
<p>This instance can be used, for instance, to determine the current state of certain form features.</p>
|
||||
*/
|
||||
[optional, property] ::com::sun::star::form::runtime::XFormOperations FormOperations;
|
||||
|
||||
/** is used for notifying the (de)activation of the controller.
|
||||
*/
|
||||
interface com::sun::star::form::XFormController;
|
||||
|
||||
|
||||
/** is used for tab controlling and grouping of the controls.
|
||||
*/
|
||||
interface com::sun::star::awt::XTabController;
|
||||
|
||||
|
||||
/** A FormController may have a parent controller, such as when the related form is a subform.
|
||||
*/
|
||||
interface com::sun::star::container::XChild;
|
||||
|
||||
|
||||
/** A FormController must be disposable.
|
||||
*/
|
||||
interface com::sun::star::lang::XComponent;
|
||||
|
||||
|
||||
/** A FormController must provide access to its sub controllers.
|
||||
*/
|
||||
interface com::sun::star::container::XEnumerationAccess;
|
||||
|
||||
|
||||
/** A FormController must communicate if any of its children (means sub controllers) or contained
|
||||
controls have been modified.
|
||||
*/
|
||||
interface com::sun::star::util::XModifyBroadcaster;
|
||||
|
||||
/** used to notify deletions of data in the form before they happen.
|
||||
|
||||
<p>A form controller listens for deletion events at the form it is responsible for.<br/>
|
||||
If and only if no <type>XConfirmDeleteListener</type> is registered at
|
||||
the controller, it uses an own dialog to ask the user for confirmation.</p>
|
||||
|
||||
<p>You may use this interface to integrate your own confirmation dialogs.</p>
|
||||
*/
|
||||
interface com::sun::star::form::XConfirmDeleteBroadcaster;
|
||||
|
||||
/** used to notify errors which happen in the form the controller is responsible for.
|
||||
|
||||
<p>A form controller listens for error events at the form it is responsible for.<br/>
|
||||
If and only if no <type scope="com::sun::star::sdb">XSQLErrorListener</type> is registered at the controller, it
|
||||
uses an own dialog to notify the user of the error.</p>
|
||||
|
||||
*/
|
||||
interface com::sun::star::sdb::XSQLErrorBroadcaster;
|
||||
|
||||
/** is used for multiplexing row set events happening on the form which the controller is responsible for.
|
||||
*/
|
||||
interface com::sun::star::sdb::XRowSetApproveBroadcaster;
|
||||
|
||||
/** is used broadcasting parameter events in the form.
|
||||
|
||||
<p>A form controller listens for parameter events at the form it is responsible for.<br/>
|
||||
If and only if no <type>XDatabaseParameterListener</type> is registered at the controller, it
|
||||
uses an own dialog to ask the user for parameter values.</p>
|
||||
*/
|
||||
interface com::sun::star::form::XDatabaseParameterBroadcaster;
|
||||
};
|
||||
|
||||
|
@ -40,177 +40,13 @@ module com { module sun { module star { module form {
|
||||
|
||||
//=============================================================================
|
||||
|
||||
/** specifies a component which can be used to dispatch form controller functionality.
|
||||
/** is not used anymore, and superseded by <type scope="com::sun::star::form::runtime">FormController</type> and
|
||||
<type scope="com::sun::star::form::runtime">FormOperations</type>.
|
||||
|
||||
<p>A form controller dispatcher is an instance which provides access to dispatchers
|
||||
(<type scope="com::sun::star::frame">XDispatch</type>) for certain form controller
|
||||
functionality.</p>
|
||||
|
||||
<p>The way how access to these dispatchers is provided is not defined. It may either
|
||||
be directly via an <type scope="com::sun::star::frame">XDispatchProvider</type> interface,
|
||||
or indirectly, e.g. by registering dispatch interceptors (<type scope="com::sun::star::frame">XDispatchProviderInterceptor</type>)
|
||||
at another instance which supports this (by exposing the <type scope="com::sun::star::frame">XDispatchProviderInterception</type>
|
||||
interface).</p>
|
||||
|
||||
<p>In any scenario, foreign components have a (implicit or explicit) possibility to request a dispatcher
|
||||
for a given URL.</p>
|
||||
|
||||
<p>Below, there's a list of URLs which have a defined meaning - if a <type>FormControllerDispatcher</type>
|
||||
implementation supports one of them, there must be a guaranteed semantices. However, concrete implementations
|
||||
may support an arbitrary sub or super set of these URLs.</p>
|
||||
|
||||
<p>In general, all URLs start with the same prefix, namely <em>.uno:FormController/</em>. To this, a suffix is
|
||||
appended which describes the requested functionality.<br/>
|
||||
Example: The URL suffix for deleting the current record is <em>deleteRecord</em>, so the complete URL for
|
||||
requesting a dispatcher for this functionality is <em>.uno:FormController/deleteRecord</em>.</p>
|
||||
|
||||
<p>Some URLs may require parameters. For this, the sequence of <type scope="com::sun::star::beans">PropertyValue</type>s
|
||||
passed to the <member scope="com::sun::star::frame">XDispatch::dispatch</member> call is used - every property value is
|
||||
used as one named parameter.</p>
|
||||
|
||||
<p>For all URLs, interested parties can register as status listeners (<type scope="com::sun::star::frame">XStatusListener</type>)
|
||||
at the dispatchers, and be notified whenever the functionality associated with the URL becomes enabled or
|
||||
disabled.<br/>
|
||||
For instance, the URL with the suffix <em>moveToFirst</em> is associated with moving the form to the first
|
||||
record, and it will be disabled in case the form is already positioned on the first record.</p>
|
||||
|
||||
<p>Nearly all of the functionality offered by a <type>FormControllerDispatcher</type> can also be
|
||||
reached by other means. E.g., moving a form to its first record can be achieved by calling the
|
||||
method <member scope="com::sun::star::sdbc">XResultSet::first</member> of the form.<br/>
|
||||
However, the advantage of using a <type>FormControllerDispatcher</type> is that it's usually implemented
|
||||
by a component which has additional knowledge about the form. For instance, in a document which
|
||||
displays a form, there might be a control which contains uncommitted changes, plus a control
|
||||
whose changes were already committed to the current record, but <em>not</em> to the database. Simply
|
||||
calling <member scope="com::sun::star::sdbc">XResultSet::first</member> on the form would lose
|
||||
both the content in the uncommitted control, and the changes in the current record.<br/>
|
||||
An <type>FormControllerDispatcher</type> is expected to care for both of these.</p>
|
||||
|
||||
<table style="width:100%;" border="0" cellpadding="2" cellspacing="2"><tbody>
|
||||
|
||||
<tr style="vertical-align: top;">
|
||||
<td><b>URL suffix</b></td>
|
||||
<td><b>functionality</b></td>
|
||||
</tr>
|
||||
|
||||
<tr style="vertical-align: top;">
|
||||
<td><em>positionForm</em></td>
|
||||
<td>positions the form on a record given by absolute number.<br/>
|
||||
There's one parameter for this functionality, named <em>Position</em>, which must be a long
|
||||
value specifying the absolute position to which the form should be moved</td>
|
||||
</tr>
|
||||
|
||||
<tr style="vertical-align: top;">
|
||||
<td><em>RecordCount</em></td>
|
||||
<td>This is a passive functionality: It cannot be dispatched, instead, interested parties may
|
||||
use the dispatcher to add as <type scope="com::sun::star::frame">XStatusListener</type>, and be
|
||||
notified when the record count changes.<br/>
|
||||
The status value which is being notified (<member scope="com::sun::star::frame">FeatureStateEvent::State</member>)
|
||||
is a string which can be used to display the record count. In particular, if the record count is not yet known
|
||||
(<member scope="com::sun::star::sdb">RowSet::IsRowCountFinal</member> is <FALSE/>), this is indicated in the
|
||||
string, too.</td>
|
||||
</tr>
|
||||
|
||||
<tr style="vertical-align: top;">
|
||||
<td><em>moveToFirst</em></td>
|
||||
<td>moves the form to the first record</td>
|
||||
</tr>
|
||||
|
||||
<tr style="vertical-align: top;">
|
||||
<td><em>moveToPrev</em></td>
|
||||
<td>moves the form to the record preceding the current one</td>
|
||||
</tr>
|
||||
|
||||
<tr style="vertical-align: top;">
|
||||
<td><em>moveToNext</em></td>
|
||||
<td>moves the form to the record after the current one</td>
|
||||
</tr>
|
||||
|
||||
<tr style="vertical-align: top;">
|
||||
<td><em>moveToLast</em></td>
|
||||
<td>moves the form to the last record</td>
|
||||
</tr>
|
||||
|
||||
<tr style="vertical-align: top;">
|
||||
<td><em>moveToNew</em></td>
|
||||
<td>moves the form to the virtual "insert row", where new records can be inserted</td>
|
||||
</tr>
|
||||
|
||||
<tr style="vertical-align: top;">
|
||||
<td><em>saveRecord</em></td>
|
||||
<td>Commits any potentially pending changes in the current control, and saves the current record to
|
||||
the database, or inserts a new record if the form is currently positioned on the virtual insertion row.</td>
|
||||
</tr>
|
||||
|
||||
<tr style="vertical-align: top;">
|
||||
<td><em>undoRecord</em></td>
|
||||
<td>reverts the changes done to the current record. Basically, this means refreshing the
|
||||
current row from the database, and updating all controls with the new content.</td>
|
||||
</tr>
|
||||
|
||||
<tr style="vertical-align: top;">
|
||||
<td><em>deleteRecord</em></td>
|
||||
<td>deletes the current record, after asking the user for confirmation.</td>
|
||||
</tr>
|
||||
|
||||
<tr style="vertical-align: top;">
|
||||
<td><em>refreshForm</em></td>
|
||||
<td>reloads the complete form. After this, the form is positioned on the first record</td>
|
||||
</tr>
|
||||
|
||||
<tr style="vertical-align: top;">
|
||||
<td><em>sortUp</em></td>
|
||||
<td>Adds an order clause to the form, to sort it ascending by the field which the current control is bound to,
|
||||
and then reloads the form.</td>
|
||||
</tr>
|
||||
|
||||
<tr style="vertical-align: top;">
|
||||
<td><em>sortDown</em></td>
|
||||
<td>Adds an order clause to the form, to sort it descending by the field which the current control is bound to,
|
||||
and then reloads the form.</td>
|
||||
</tr>
|
||||
|
||||
<tr style="vertical-align: top;">
|
||||
<td><em>sort</em></td>
|
||||
<td>opens an dialog, which allows the user to manipulate the current sorting order of the form. If the dialog
|
||||
is closed with OK, the form is reloaded after setting the new sorting order.</td>
|
||||
</tr>
|
||||
|
||||
<tr style="vertical-align: top;">
|
||||
<td><em>autoFilter</em></td>
|
||||
<td>creates, from the current control, a filter for the form. This is, if the current control is bound to
|
||||
the field, say, "customer", and contains the value "Furs, Inc.", then a filter "customer = 'Furs, Inc.'"
|
||||
is created and set at the form. After this, the form is reloaded.</td>
|
||||
</tr>
|
||||
|
||||
<tr style="vertical-align: top;">
|
||||
<td><em>filter</em></td>
|
||||
<td>opens an dialog, which allows the user to manipulate the current filter of the form. If the dialog
|
||||
is closed with OK, the form is reloaded after setting the new filter.</td>
|
||||
</tr>
|
||||
|
||||
<tr style="vertical-align: top;">
|
||||
<td><em>applyFilter</em></td>
|
||||
<td><p>Toggles the <member scope="com::sun::star::sdb">RowSet::ApplyFilter</member> property
|
||||
of the form.</p>
|
||||
<p>Additionally, status listeners will be provided with the current (boolean) state of this property
|
||||
in the <member scope="com::sun::star::frame">FeatureStateEvent::State</member> member of the event
|
||||
notified by the dispatcher.</p></td>
|
||||
</tr>
|
||||
|
||||
<tr style="vertical-align: top;">
|
||||
<td><em>removeFilterOrder</em></td>
|
||||
<td>completely removes any filter and sorting order from the form, and reloads it.</td>
|
||||
</tr>
|
||||
|
||||
</tbody></table>
|
||||
|
||||
@see FormController
|
||||
@deprecated
|
||||
*/
|
||||
published service FormControllerDispatcher
|
||||
{
|
||||
//-------------------------------------------------------------------------
|
||||
/** allows direct access to the dispatchers provided by the component.
|
||||
*/
|
||||
[optional] interface com::sun::star::frame::XDispatchProvider;
|
||||
};
|
||||
|
||||
|
@ -49,57 +49,14 @@
|
||||
|
||||
//=============================================================================
|
||||
|
||||
/** provides functionality to control the activation of forms controls.
|
||||
|
||||
<p>There is a duality of forms (<type scope="com::sun::star::form::component">DataForm</type>)
|
||||
and form controllers. In a document view, for every loaded form there is a form controller which is
|
||||
responsible for exactly the controls which's models are direct children of the form.<br/>
|
||||
|
||||
In some sense, a form controller is the view representation of a form, like a <em>form control</em> is the
|
||||
view representation of a <em>form control model</em>.<br/>
|
||||
|
||||
This is also reflected in this interface: If you call
|
||||
<method scope="com::sun::star::awt">XTabController::getModel</method> on a form controller, the form which
|
||||
the controller is responsible for will be returned.<br/>
|
||||
|
||||
As always in the model-view-paradigm, there is no way from a model to its controller, mostly, because for
|
||||
<em>one</em> given form, there is one controller for <em>every</em> view of the document.</p>
|
||||
|
||||
<p>A controller is called <em>active</em> if one of the controls it is responsible for has the focus,
|
||||
else inactive. To be notified whenever this activation state of a given controller changes, you can
|
||||
add listeners.</p>
|
||||
|
||||
@see com::sun::star::form::component::Form
|
||||
/** is superseded by <type scope="com::sun::star::form::runtime">XFormController</type>.
|
||||
@deprecated
|
||||
*/
|
||||
published interface XFormController: com::sun::star::awt::XTabController
|
||||
{
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
/** access to the currently active control
|
||||
|
||||
@returns
|
||||
the currently active control, or <NULL/> if there is no such control
|
||||
*/
|
||||
com::sun::star::awt::XControl getCurrentControl();
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
/** adds the specified listener to receive notifications whenever the activation state of
|
||||
the controller changes.
|
||||
|
||||
@param l
|
||||
the listener to add.
|
||||
*/
|
||||
[oneway] void addActivateListener( [in] com::sun::star::form::XFormControllerListener l );
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
/** removes the specified listener
|
||||
|
||||
@param l
|
||||
the listener to remove.
|
||||
*/
|
||||
[oneway] void removeActivateListener( [in] com::sun::star::form::XFormControllerListener l );
|
||||
::com::sun::star::awt::XControl getCurrentControl();
|
||||
[oneway] void addActivateListener( [in] ::com::sun::star::form::XFormControllerListener l );
|
||||
[oneway] void removeActivateListener( [in] ::com::sun::star::form::XFormControllerListener l );
|
||||
|
||||
};
|
||||
|
||||
|
64
offapi/com/sun/star/form/runtime/FilterEvent.idl
Normal file
64
offapi/com/sun/star/form/runtime/FilterEvent.idl
Normal file
@ -0,0 +1,64 @@
|
||||
/*************************************************************************
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* Copyright 2009 by Sun Microsystems, Inc.
|
||||
*
|
||||
* 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 __com_sun_star_form_runtime_FilterEvent_idl__
|
||||
#define __com_sun_star_form_runtime_FilterEvent_idl__
|
||||
|
||||
#include <com/sun/star/lang/EventObject.idl>
|
||||
|
||||
//=============================================================================
|
||||
|
||||
module com { module sun { module star { module form { module runtime {
|
||||
|
||||
//=============================================================================
|
||||
|
||||
/** is an event fired by a filter controller, when the filter managed by the controller changes.
|
||||
|
||||
@see XFilterController
|
||||
|
||||
@since OpenOffice.org 3.3
|
||||
*/
|
||||
struct FilterEvent : ::com::sun::star::lang::EventObject
|
||||
{
|
||||
/** denotes the index of the <em>disjunctive term</em> to which the event applies, if any.
|
||||
*/
|
||||
long DisjunctiveTerm;
|
||||
|
||||
/** denotes the index of the <em>filter component</em> to which the event applies, if any.
|
||||
*/
|
||||
long FilterComponent;
|
||||
|
||||
/** denotes the <em>predicate expression</em> associated with the event.
|
||||
*/
|
||||
string PredicateExpression;
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
|
||||
}; }; }; }; };
|
||||
|
||||
//=============================================================================
|
||||
|
||||
#endif
|
51
offapi/com/sun/star/form/runtime/FormController.idl
Normal file
51
offapi/com/sun/star/form/runtime/FormController.idl
Normal file
@ -0,0 +1,51 @@
|
||||
/*************************************************************************
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* Copyright 2009 by Sun Microsystems, Inc.
|
||||
*
|
||||
* 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 __offapi_com_sun_star_form_runtime_FormController_idl__
|
||||
#define __offapi_com_sun_star_form_runtime_FormController_idl__
|
||||
|
||||
#include <com/sun/star/form/runtime/XFormController.idl>
|
||||
|
||||
//=============================================================================
|
||||
|
||||
module com { module sun { module star { module form { module runtime {
|
||||
|
||||
//=============================================================================
|
||||
|
||||
/** specifies a component controlling the interaction between the user and multiple
|
||||
form controls belonging to a single form.
|
||||
*/
|
||||
service FormController
|
||||
{
|
||||
interface XFormController;
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
|
||||
}; }; }; }; };
|
||||
|
||||
//=============================================================================
|
||||
|
||||
#endif
|
@ -34,8 +34,8 @@
|
||||
#ifndef __com_sun_star_form_runtime_XFormOperations_idl__
|
||||
#include <com/sun/star/form/runtime/XFormOperations.idl>
|
||||
#endif
|
||||
#ifndef __com_sun_star_form_XFormController_idl__
|
||||
#include <com/sun/star/form/XFormController.idl>
|
||||
#ifndef __com_sun_star_form_runtime_XFormController_idl__
|
||||
#include <com/sun/star/form/runtime/XFormController.idl>
|
||||
#endif
|
||||
#ifndef __com_sun_star_form_XForm_idl__
|
||||
#include <com/sun/star/form/XForm.idl>
|
||||
|
180
offapi/com/sun/star/form/runtime/XFilterController.idl
Normal file
180
offapi/com/sun/star/form/runtime/XFilterController.idl
Normal file
@ -0,0 +1,180 @@
|
||||
/*************************************************************************
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* Copyright 2009 by Sun Microsystems, Inc.
|
||||
*
|
||||
* 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 __offapi_com_sun_star_form_runtime_XFilterController_idl__
|
||||
#define __offapi_com_sun_star_form_runtime_XFilterController_idl__
|
||||
|
||||
#include <com/sun/star/awt/XControl.idl>
|
||||
#include <com/sun/star/lang/IndexOutOfBoundsException.idl>
|
||||
|
||||
//=============================================================================
|
||||
|
||||
module com { module sun { module star { module form { module runtime {
|
||||
|
||||
//=============================================================================
|
||||
|
||||
interface XFilterControllerListener;
|
||||
|
||||
/** provides access to a form based filter for a database form
|
||||
|
||||
<p>In a form based filter, form controls bound to a searchable database field are replaced with a control
|
||||
which allows entering a search expression. This so-called <em>predicate expression</em> is basically a part of an
|
||||
SQL <code>WHERE</code> clause, but without the the part denoting the database column. For instance, if you
|
||||
have a form control bound to a table column named <code>Name</code>, then entering the string
|
||||
<q>LIKE '%Smith%'</q> effectively consitutes a SQL <code>WHERE</code> clause <code>"Name" LIKE '%Smith%'</code>.</p>
|
||||
|
||||
<p>In the actual document view, there are usually some relaxations to this. For instance, keywords such as
|
||||
<code>LIKE</code> might be localized, according to OpenOffice.org's UI locale. Also, for an equality criterion,
|
||||
the equality sign <code>=</code> is usually omitted. However, this interface here provides programmatic access
|
||||
to the form based filter, so those relaxations are not considered here.</p>
|
||||
|
||||
<p>The filter maintained by a filter controller is, logically, a disjunctive normal form of an SQL <code>WHERE</code>
|
||||
class. That is, it is a disjunction of <em>m</em> terms, where each term is a conjunction of <em>n</em> clauses
|
||||
of the form <code><column> <predicate> <literal></code> or of the form <code><em><column>
|
||||
IS [NOT] NULL</em></code>.</p>
|
||||
|
||||
<p><em>n</em> equals the number of filter controls which the filter controller is responsible for. This number
|
||||
doesn't change during one session of the form based filter. On the other hand, <em>m</em>, the number of disjunctive
|
||||
terms, is dynamic.</p>
|
||||
|
||||
<a name="active_term"></a>
|
||||
<p>With the above, there are potentially <em>m * n</em> <em>predicate expressions</em> (though usually only a fraction
|
||||
of those will actually exist). Since in a form based filter, there are only <em>n</em> filter controls, and each
|
||||
filter control displays exactly one <em>predicate expression</em>, this means that only a part of the complete
|
||||
filter can be displayed, in particular, only one <em>disjunctive term</em> can be displayed at a time. Thus,
|
||||
the filter controller knows the concept of an <em>active term</em>, denoted by the <member>ActiveTerm</member>
|
||||
attribute, controls which of the terms is currently displayed in the form controls.</p>
|
||||
|
||||
@see XFormController
|
||||
@see com::sun::star::sdbc::XResultSetMetaData::isSearchable
|
||||
@see com::sun::star::sdb::XSingleSelectQueryAnalyzer::getStructuredFilter
|
||||
@see com::sun::star::sdb::SQLFilterOperator
|
||||
|
||||
@since OpenOffice.org 3.3
|
||||
*/
|
||||
interface XFilterController
|
||||
{
|
||||
/** registers a listener to be notified of certain changes in the form based filter.
|
||||
|
||||
<p>Registering the same listener multiple times results in multiple notifications of the same event,
|
||||
and also requires multiple revocations of the listener.
|
||||
*/
|
||||
void addFilterControllerListener( [in] XFilterControllerListener _Listener );
|
||||
|
||||
/** revokes a listener which was previously registered to be notified of certain changes in the form based filter.
|
||||
*/
|
||||
void removeFilterControllerListener( [in] XFilterControllerListener _Listener );
|
||||
|
||||
/** is the number of <em>filter components</em>, or filter controls, which the filter controller is responsible
|
||||
for.
|
||||
|
||||
<p>This number is constant during one session of the form based filter.</p>
|
||||
*/
|
||||
[attribute, readonly] long FilterComponents;
|
||||
|
||||
/** is the number of <em>disjunctive terms</em> of the filter expression represented by the form based filter.
|
||||
*/
|
||||
[attribute, readonly] long DisjunctiveTerms;
|
||||
|
||||
/** denotes the <a href="#active_term"><em>active term</em></a> of the filter controller.
|
||||
*/
|
||||
[attribute] long ActiveTerm
|
||||
{
|
||||
set raises ( ::com::sun::star::lang::IndexOutOfBoundsException );
|
||||
};
|
||||
|
||||
/** sets a given <em>predicate expression</em>
|
||||
|
||||
@param _Component
|
||||
denotes the filter component whose expression is to be set. Must be greater than or equal to 0, and smaller than
|
||||
<member>FilterComponents</member>.
|
||||
|
||||
@param _Term
|
||||
denotes the <em>disjunctive term</em> in which the expression is to be set. Must be greater than or equal to 0,
|
||||
and smaller than <member>DisjunctiveTerms</member>.
|
||||
|
||||
@param _PredicateExpression
|
||||
denotes the <em>predicate expression</em> to set for the given filter component in the given term.
|
||||
|
||||
@throws ::com::sun::star::lang::IndexOutOfBoundsException
|
||||
if one of the indexes is out of the allowed range
|
||||
*/
|
||||
void
|
||||
setPredicateExpression( [in] long _Component, [in] long _Term, [in] string _PredicateExpression )
|
||||
raises( ::com::sun::star::lang::IndexOutOfBoundsException );
|
||||
|
||||
/** retrieves the filter component with the given index.
|
||||
|
||||
<p>The filter control has the same control model as the control which it stands in for. Consequently, you can use this method
|
||||
to obtain the database column which the filter control works on, by examining the control model's <code>BoundField</code>
|
||||
property.</p>
|
||||
|
||||
@param _Component
|
||||
denotes the index of the filter component whose control should be obtained. Must be greater than or equal to 0,
|
||||
and smaller than <member>FilterComponents</member>.
|
||||
|
||||
@throws ::com::sun::star::lang::IndexOutOfBoundsException
|
||||
if <arg>_Component</arg> is out of the allowed range.
|
||||
|
||||
@see ::com::sun::star::form::component::DataAwareControlModel::BoundField
|
||||
*/
|
||||
::com::sun::star::awt::XControl
|
||||
getFilterComponent( [in] long _Component )
|
||||
raises( ::com::sun::star::lang::IndexOutOfBoundsException );
|
||||
|
||||
/** retrieves the entirety of the <em>predicate expressions</em> represented by the filter controller.
|
||||
|
||||
<p>Each element of the returned sequence is a <em>disjunctive term</em>, having exactly <member>FilterComponents</member>
|
||||
elements, which denote the single <em>predicate expressions</em> of this term.</p>
|
||||
*/
|
||||
sequence< sequence< string > >
|
||||
getPredicateExpressions();
|
||||
|
||||
/** removes a given <em>disjunctive term</em>
|
||||
|
||||
@param _Term
|
||||
the index of the term to remove. Must be greater than or equal to 0, and smaller than
|
||||
<member>DisjunctiveTerms</member>.
|
||||
|
||||
@throws ::com::sun::star::lang::IndexOutOfBoundsException
|
||||
if <arg>_Term</arg> is out of the allowed range.
|
||||
*/
|
||||
void
|
||||
removeDisjunctiveTerm( [in] long _Term )
|
||||
raises( ::com::sun::star::lang::IndexOutOfBoundsException );
|
||||
|
||||
/** appends an empty disjunctive term to the list of terms.
|
||||
*/
|
||||
void
|
||||
appendEmptyDisjunctiveTerm();
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
|
||||
}; }; }; }; };
|
||||
|
||||
//=============================================================================
|
||||
|
||||
#endif
|
@ -0,0 +1,84 @@
|
||||
/*************************************************************************
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* Copyright 2009 by Sun Microsystems, Inc.
|
||||
*
|
||||
* 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 __com_sun_star_form_runtime_XFilterControllerListener_idl__
|
||||
#define __com_sun_star_form_runtime_XFilterControllerListener_idl__
|
||||
|
||||
#include <com/sun/star/lang/XEventListener.idl>
|
||||
#include <com/sun/star/form/runtime/FilterEvent.idl>
|
||||
|
||||
//=============================================================================
|
||||
|
||||
module com { module sun { module star { module form { module runtime {
|
||||
|
||||
//=============================================================================
|
||||
|
||||
/** is implemented by components listening for events fired by an <type>XFilterController</type>.
|
||||
|
||||
@since OpenOffice.org 3.3
|
||||
*/
|
||||
interface XFilterControllerListener : ::com::sun::star::lang::XEventListener
|
||||
{
|
||||
/** is fired when a single <em>predicate expression</em> of the filter represented by the filter
|
||||
controller changed.
|
||||
|
||||
<p><member>FilterEvent::DisjunctiveTerm</member> is the index of the <em>disjunctive term</em> in which the
|
||||
expression changed. This usually equals <member>XFilterController::ActiveTerm</member>.</p>
|
||||
|
||||
<p><member>FilterEvent::FilterComponent</member> denotes the index of the filter component whose
|
||||
<em>predicate expression</em> changed.</p>
|
||||
|
||||
<p><member>FilterEvent::PredicateExpression</member> is the new <em>predicate expressions</em>.</p>
|
||||
*/
|
||||
void predicateExpressionChanged( [in] FilterEvent _Event );
|
||||
|
||||
/** is fired when a <em>disjunctive term</em> was removed from the filter of the filter controller.
|
||||
|
||||
<p><member>FilterEvent::DisjunctiveTerm</member> is the index of the <em>disjunctive term</em> which was
|
||||
removed.</p>
|
||||
|
||||
<p><member>FilterEvent::FilterComponent</member> and <member>FilterEvent::PredicateExpression</member> are not
|
||||
used for this event type.</p>
|
||||
*/
|
||||
void disjunctiveTermRemoved( [in] FilterEvent _Event );
|
||||
|
||||
/** is fired when a <em>disjunctive term</em> was added to the filter of the filter controller.
|
||||
|
||||
<p><member>FilterEvent::DisjunctiveTerm</member> is the index of the <em>disjunctive term</em> which was
|
||||
added.</p>
|
||||
|
||||
<p><member>FilterEvent::FilterComponent</member> and <member>FilterEvent::PredicateExpression</member> are not
|
||||
used for this event type.</p>
|
||||
*/
|
||||
void disjunctiveTermAdded( [in] FilterEvent _Event );
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
|
||||
}; }; }; }; };
|
||||
|
||||
//=============================================================================
|
||||
|
||||
#endif
|
373
offapi/com/sun/star/form/runtime/XFormController.idl
Normal file
373
offapi/com/sun/star/form/runtime/XFormController.idl
Normal file
@ -0,0 +1,373 @@
|
||||
/*************************************************************************
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* Copyright 2009 by Sun Microsystems, Inc.
|
||||
*
|
||||
* 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 __offapi_com_sun_star_form_runtime_XFormController_idl__
|
||||
#define __offapi_com_sun_star_form_runtime_XFormController_idl__
|
||||
|
||||
#include <com/sun/star/awt/XTabController.idl>
|
||||
#include <com/sun/star/container/XChild.idl>
|
||||
#include <com/sun/star/lang/XComponent.idl>
|
||||
#include <com/sun/star/container/XIndexAccess.idl>
|
||||
#include <com/sun/star/container/XEnumerationAccess.idl>
|
||||
#include <com/sun/star/util/XModifyBroadcaster.idl>
|
||||
#include <com/sun/star/util/XModeSelector.idl>
|
||||
#include <com/sun/star/form/XConfirmDeleteBroadcaster.idl>
|
||||
#include <com/sun/star/sdb/XSQLErrorBroadcaster.idl>
|
||||
#include <com/sun/star/sdb/XRowSetApproveBroadcaster.idl>
|
||||
#include <com/sun/star/form/XDatabaseParameterBroadcaster2.idl>
|
||||
#include <com/sun/star/form/XFormControllerListener.idl>
|
||||
#include <com/sun/star/task/XInteractionHandler.idl>
|
||||
#include <com/sun/star/lang/IllegalArgumentException.idl>
|
||||
#include <com/sun/star/form/runtime/XFilterController.idl>
|
||||
|
||||
//=============================================================================
|
||||
|
||||
module com { module sun { module star { module form { module runtime {
|
||||
|
||||
interface XFormOperations;
|
||||
interface XFormControllerContext;
|
||||
|
||||
//=============================================================================
|
||||
|
||||
/** specifies a component controlling the interaction between the user and form functionality.
|
||||
|
||||
<p>As soon as a form (containing controls) is to be presented to the user,
|
||||
there is a need for an instance controlling the user interaction.<br/>
|
||||
Such a <code>FormController</code> is responsible for dialog processing,
|
||||
like controlling the tab order and the grouping of controls.</p>
|
||||
|
||||
<p>As a form may contain one or many subforms, a <type>FormController</type> may
|
||||
contain one or more other <type>FormController</type>s, so the form model structure or hierarchy
|
||||
is reflected in the structure of <type>FormController</type>s. That is, retrieving the parent of
|
||||
the model of a controller will give you the same object as retrieving the model of the parent of
|
||||
the controller. Similarly, retrieving the model of the <code>n</code><sup>th</sup> child of
|
||||
a controller gives you the same object as retrieving the <code>n</code><sup>th</sup> child of
|
||||
the model of the controller.</p>
|
||||
|
||||
<p>A controller is called <em>active</em> if one of the controls it is responsible for has the focus,
|
||||
else inactive. To be notified whenever this activation state of a given controller changes, you can
|
||||
add listeners.</p>
|
||||
|
||||
<p>This interface supersedes the <type scope="com::sun::star::form">FormController</type>.</p>
|
||||
|
||||
<h3>Responsibilities</h3>
|
||||
<p>A <type>FormController</type> is responsible for a <type scope="com::sun::star::awt">UnoControlContainer</type>,
|
||||
and all controls therein.</p>
|
||||
|
||||
<p>Furthermore, a form controller is responsible for preventing invalid user input. That is, if the form
|
||||
contains controls bound to a database, or to an external validator, then the form controller will
|
||||
check their current value when the current record is to be saved to the database.</p>
|
||||
|
||||
<p>First, it will check whether any controls with an external validator exist. If so, those validators
|
||||
will be asked to validate the current control content. If this fails, the message provided by the validator
|
||||
is displayed to the user, the control is focused, and the update of the record is vetoed.</p>
|
||||
|
||||
<p>Second, the controls are examined for NULL values. If a control is bound to a database field which
|
||||
is declared to be <code>NOT NULL</code>, no auto-increment field, but still <NULL/>, then an error
|
||||
message is shown to the user saying that input is required, the respective control is focused, and
|
||||
the update of the record is vetoed.</p>
|
||||
|
||||
<p>Note that you can precent the second check - for database fields containing <NULL/> values - on
|
||||
a per-form and a per-database basis.<br/>
|
||||
For the former, you need to add a boolean property <code>FormsCheckRequiredFields</code> to the form
|
||||
(aka the <code>FormController</code>'s model), using its
|
||||
<member scope="com::sun::star::beans">XPropertyContainer::addProperty</member> method, with a value
|
||||
of <FALSE/>.<br/>
|
||||
For the latter, you need to set the respective property of the data source's <code>Settings</code>
|
||||
(also named <code>FormsCheckRequiredFields</code>) to <FALSE/>.</p>
|
||||
|
||||
<p>Alternatively, you can prevent the check on a per-control basis, using the
|
||||
<member>DataAwareControlModel::InputRequired</member> property of a single control model.</p>
|
||||
|
||||
<p>If a control which the controller is responsible for supports the <type scope="com::sun::star::frame">XDispatchProviderInterception</type>
|
||||
interface, the controller registers a dispatch interceptor. Then, the control can try to delegate part of its
|
||||
functionality to the controller by querying the dispatch interceptor for it.</p>
|
||||
|
||||
<p>Below, there's a list of URLs which have a defined meaning - if an implementation supports one of them,
|
||||
there must be a guaranteed semantices. However, concrete implementations may support an arbitrary sub or super
|
||||
set of these URLs.</p>
|
||||
|
||||
<p>In general, all URLs start with the same prefix, namely <em>.uno:FormController/</em>. To this, a suffix is
|
||||
appended which describes the requested functionality.<br/>
|
||||
Example: The URL suffix for deleting the current record is <em>deleteRecord</em>, so the complete URL for
|
||||
requesting a dispatcher for this functionality is <em>.uno:FormController/deleteRecord</em>.</p>
|
||||
|
||||
<p>Some URLs may require parameters. For this, the sequence of <type scope="com::sun::star::beans">PropertyValue</type>s
|
||||
passed to the <member scope="com::sun::star::frame">XDispatch::dispatch</member> call is used - every property value is
|
||||
used as one named parameter.</p>
|
||||
|
||||
<p>For all URLs, interested parties can register as status listeners (<type scope="com::sun::star::frame">XStatusListener</type>)
|
||||
at the dispatchers, and be notified whenever the functionality associated with the URL becomes enabled or
|
||||
disabled.<br/>
|
||||
For instance, the URL with the suffix <em>moveToFirst</em> is associated with moving the form to the first
|
||||
record, and it will be disabled in case the form is already positioned on the first record.</p>
|
||||
|
||||
<table style="width:100%;" border="0" cellpadding="2" cellspacing="2"><tbody>
|
||||
|
||||
<tr style="vertical-align: top;">
|
||||
<td><b>URL suffix</b></td>
|
||||
<td><b>functionality</b></td>
|
||||
</tr>
|
||||
|
||||
<tr style="vertical-align: top;">
|
||||
<td><em>positionForm</em></td>
|
||||
<td>positions the form on a record given by absolute number.<br/>
|
||||
There's one parameter for this functionality, named <em>Position</em>, which must be a long
|
||||
value specifying the absolute position to which the form should be moved</td>
|
||||
</tr>
|
||||
|
||||
<tr style="vertical-align: top;">
|
||||
<td><em>RecordCount</em></td>
|
||||
<td>This is a passive functionality: It cannot be dispatched, instead, interested parties may
|
||||
use the dispatcher to add as <type scope="com::sun::star::frame">XStatusListener</type>, and be
|
||||
notified when the record count changes.<br/>
|
||||
The status value which is being notified (<member scope="com::sun::star::frame">FeatureStateEvent::State</member>)
|
||||
is a string which can be used to display the record count. In particular, if the record count is not yet known
|
||||
(<member scope="com::sun::star::sdb">RowSet::IsRowCountFinal</member> is <FALSE/>), this is indicated in the
|
||||
string, too.</td>
|
||||
</tr>
|
||||
|
||||
<tr style="vertical-align: top;">
|
||||
<td><em>moveToFirst</em></td>
|
||||
<td>moves the form to the first record</td>
|
||||
</tr>
|
||||
|
||||
<tr style="vertical-align: top;">
|
||||
<td><em>moveToPrev</em></td>
|
||||
<td>moves the form to the record preceding the current one</td>
|
||||
</tr>
|
||||
|
||||
<tr style="vertical-align: top;">
|
||||
<td><em>moveToNext</em></td>
|
||||
<td>moves the form to the record after the current one</td>
|
||||
</tr>
|
||||
|
||||
<tr style="vertical-align: top;">
|
||||
<td><em>moveToLast</em></td>
|
||||
<td>moves the form to the last record</td>
|
||||
</tr>
|
||||
|
||||
<tr style="vertical-align: top;">
|
||||
<td><em>moveToNew</em></td>
|
||||
<td>moves the form to the virtual "insert row", where new records can be inserted</td>
|
||||
</tr>
|
||||
|
||||
<tr style="vertical-align: top;">
|
||||
<td><em>saveRecord</em></td>
|
||||
<td>Commits any potentially pending changes in the current control, and saves the current record to
|
||||
the database, or inserts a new record if the form is currently positioned on the virtual insertion row.</td>
|
||||
</tr>
|
||||
|
||||
<tr style="vertical-align: top;">
|
||||
<td><em>undoRecord</em></td>
|
||||
<td>reverts the changes done to the current record. Basically, this means refreshing the
|
||||
current row from the database, and updating all controls with the new content.</td>
|
||||
</tr>
|
||||
|
||||
<tr style="vertical-align: top;">
|
||||
<td><em>deleteRecord</em></td>
|
||||
<td>deletes the current record, after asking the user for confirmation.</td>
|
||||
</tr>
|
||||
|
||||
<tr style="vertical-align: top;">
|
||||
<td><em>refreshForm</em></td>
|
||||
<td>reloads the complete form. After this, the form is positioned on the first record</td>
|
||||
</tr>
|
||||
|
||||
<tr style="vertical-align: top;">
|
||||
<td><em>sortUp</em></td>
|
||||
<td>Adds an order clause to the form, to sort it ascending by the field which the current control is bound to,
|
||||
and then reloads the form.</td>
|
||||
</tr>
|
||||
|
||||
<tr style="vertical-align: top;">
|
||||
<td><em>sortDown</em></td>
|
||||
<td>Adds an order clause to the form, to sort it descending by the field which the current control is bound to,
|
||||
and then reloads the form.</td>
|
||||
</tr>
|
||||
|
||||
<tr style="vertical-align: top;">
|
||||
<td><em>sort</em></td>
|
||||
<td>opens an dialog, which allows the user to manipulate the current sorting order of the form. If the dialog
|
||||
is closed with OK, the form is reloaded after setting the new sorting order.</td>
|
||||
</tr>
|
||||
|
||||
<tr style="vertical-align: top;">
|
||||
<td><em>autoFilter</em></td>
|
||||
<td>creates, from the current control, a filter for the form. This is, if the current control is bound to
|
||||
the field, say, "customer", and contains the value "Furs, Inc.", then a filter "customer = 'Furs, Inc.'"
|
||||
is created and set at the form. After this, the form is reloaded.</td>
|
||||
</tr>
|
||||
|
||||
<tr style="vertical-align: top;">
|
||||
<td><em>filter</em></td>
|
||||
<td>opens an dialog, which allows the user to manipulate the current filter of the form. If the dialog
|
||||
is closed with OK, the form is reloaded after setting the new filter.</td>
|
||||
</tr>
|
||||
|
||||
<tr style="vertical-align: top;">
|
||||
<td><em>applyFilter</em></td>
|
||||
<td><p>Toggles the <member scope="com::sun::star::sdb">RowSet::ApplyFilter</member> property
|
||||
of the form.</p>
|
||||
<p>Additionally, status listeners will be provided with the current (boolean) state of this property
|
||||
in the <member scope="com::sun::star::frame">FeatureStateEvent::State</member> member of the event
|
||||
notified by the dispatcher.</p></td>
|
||||
</tr>
|
||||
|
||||
<tr style="vertical-align: top;">
|
||||
<td><em>removeFilterOrder</em></td>
|
||||
<td>completely removes any filter and sorting order from the form, and reloads it.</td>
|
||||
</tr>
|
||||
|
||||
</tbody></table>
|
||||
|
||||
@see ::com::sun::star::form::component:Form
|
||||
@see ::com::sun::star::form::binding::BindableControlModel
|
||||
@see ::com::sun::star::sdb::DataSource::Settings
|
||||
|
||||
@since OpenOffice.org 3.3
|
||||
*/
|
||||
interface XFormController
|
||||
{
|
||||
/** is used for tab controlling and grouping of the controls.
|
||||
|
||||
<p>The model obtained via <member scope="com::sun::star::awt">XTabController::getModel</member> is the form for which the
|
||||
controller is responsible.</p>
|
||||
*/
|
||||
interface ::com::sun::star::awt::XTabController;
|
||||
|
||||
/** allows access to the parent controller.
|
||||
*/
|
||||
interface ::com::sun::star::container::XChild;
|
||||
|
||||
/** allows access to the sub controllers.
|
||||
*/
|
||||
interface ::com::sun::star::container::XIndexAccess;
|
||||
|
||||
/** allows enumerating sub controllers
|
||||
*/
|
||||
interface ::com::sun::star::container::XEnumerationAccess;
|
||||
|
||||
/** allows life time control of the controller.
|
||||
*/
|
||||
interface ::com::sun::star::lang::XComponent;
|
||||
|
||||
/** allows to register as listener for modifications in the controls which the controller is responsible
|
||||
for.
|
||||
*/
|
||||
interface ::com::sun::star::util::XModifyBroadcaster;
|
||||
|
||||
/** used to notify deletions of data in the form before they happen.
|
||||
|
||||
<p>A form controller listens for deletion events at the form it is responsible for. If and only if no
|
||||
<type scope="com::sun::star::form">XConfirmDeleteListener</type> is registered at
|
||||
the controller, it uses an own dialog to ask the user for confirmation.</p>
|
||||
*/
|
||||
interface ::com::sun::star::form::XConfirmDeleteBroadcaster;
|
||||
|
||||
/** is used to notify errors which happen in the form the controller is responsible for.
|
||||
|
||||
<p>A form controller listens for error events at the form it is responsible for. If and only if no
|
||||
<type scope="com::sun::star::sdb">XSQLErrorListener</type> is registered at the controller, it
|
||||
uses an own dialog to notify the user of the error.</p>
|
||||
|
||||
*/
|
||||
interface ::com::sun::star::sdb::XSQLErrorBroadcaster;
|
||||
|
||||
/** is used for multiplexing row set events happening on the form which the controller is responsible for.
|
||||
*/
|
||||
interface ::com::sun::star::sdb::XRowSetApproveBroadcaster;
|
||||
|
||||
/** is used broadcasting parameter events in the form.
|
||||
|
||||
<p>A form controller listens for parameter events at the form it is responsible for. If and only if no
|
||||
<type scope="com::sun::star::form">XDatabaseParameterListener</type> is registered at the controller, it
|
||||
uses an own dialog to ask the user for parameter values.</p>
|
||||
*/
|
||||
interface ::com::sun::star::form::XDatabaseParameterBroadcaster2;
|
||||
|
||||
/** allows switching the form controller to different operation modes.
|
||||
|
||||
<a name="mode_selector"></a>
|
||||
<p>The two modes usually (but not necessarily) supported by a form controller are the <code>DataMode</code>
|
||||
and the <code>FilterMode</code>, where the former is the usual modus operandi for displaying and modifying
|
||||
data, and the latter is a special mode to enter a filter for the database form which the controller is
|
||||
responsible for.</p>
|
||||
*/
|
||||
interface ::com::sun::star::util::XModeSelector;
|
||||
|
||||
/** allows controlling the filter mode.
|
||||
|
||||
<p>If the form controller supports a <a href="#mode_selector">form based filter mode</a>, then it shall also
|
||||
support the <type>XFilterController</type> interface, which allows controlling this mode.</p>
|
||||
*/
|
||||
[optional] interface XFilterController;
|
||||
|
||||
/** denotes the instance which is used to implement operations on the form which the controller
|
||||
works for.
|
||||
|
||||
<p>This instance can be used, for instance, to determine the current state of certain form features.</p>
|
||||
*/
|
||||
[attribute, readonly] XFormOperations FormOperations;
|
||||
|
||||
/** provicdes access to the currently active control
|
||||
*/
|
||||
[attribute, readonly] ::com::sun::star::awt::XControl CurrentControl;
|
||||
|
||||
/** allows to delegate certain tasks to the context of the form controller
|
||||
*/
|
||||
[attribute] XFormControllerContext Context;
|
||||
|
||||
/** used (if not <NULL/>) for user interactions triggered by the form controller.
|
||||
*/
|
||||
[attribute] ::com::sun::star::task::XInteractionHandler InteractionHandler;
|
||||
|
||||
/** adds the specified listener to receive notifications whenever the activation state of
|
||||
the controller changes.
|
||||
*/
|
||||
void addActivateListener( [in] ::com::sun::star::form::XFormControllerListener _Listener );
|
||||
|
||||
/** removes the specified listener from the list of components to receive notifications whenever the activation
|
||||
state of the controller changes.
|
||||
*/
|
||||
void removeActivateListener( [in] ::com::sun::star::form::XFormControllerListener _Listener );
|
||||
|
||||
/** adds a controller to the list of child controllers
|
||||
@throws ::com::sun::star::lang::IllegalArgumentException
|
||||
if the given controller is <NULL/>, or cannot rightfully be a child controller. Since controllers
|
||||
mirror the hierarchy of the forms the are responsible for, this means that the form of the given
|
||||
child controller must be a child of the controller at which the method is invoked.
|
||||
*/
|
||||
void addChildController( [in] XFormController _ChildController )
|
||||
raises ( ::com::sun::star::lang::IllegalArgumentException );
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
|
||||
}; }; }; }; };
|
||||
|
||||
//=============================================================================
|
||||
|
||||
#endif
|
57
offapi/com/sun/star/form/runtime/XFormControllerContext.idl
Normal file
57
offapi/com/sun/star/form/runtime/XFormControllerContext.idl
Normal file
@ -0,0 +1,57 @@
|
||||
/*************************************************************************
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* Copyright 2009 by Sun Microsystems, Inc.
|
||||
*
|
||||
* 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 __offapi_com_sun_star_form_runtime_XFormControllerContext_idl__
|
||||
#define __offapi_com_sun_star_form_runtime_XFormControllerContext_idl__
|
||||
|
||||
#include <com/sun/star/awt/XControl.idl>
|
||||
|
||||
//=============================================================================
|
||||
|
||||
module com { module sun { module star { module form { module runtime {
|
||||
|
||||
//=============================================================================
|
||||
|
||||
/** provides a context for a <type>FormController</type>
|
||||
|
||||
<p>A <type>FormController</type> knows about the controls it is responsible
|
||||
for, and about the control container which those controls live in. However, it doesn't know
|
||||
about a possible larger context, like a scrollable view which the controls are embedded into.
|
||||
To compensate this, it can be provided a <code>XFormControllerContext</code>.</p>
|
||||
*/
|
||||
interface XFormControllerContext
|
||||
{
|
||||
/** ensures the given control is visible, by scrolling the view if necessary.
|
||||
*/
|
||||
void makeVisible( [in] ::com::sun::star::awt::XControl _Control );
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
|
||||
}; }; }; }; };
|
||||
|
||||
//=============================================================================
|
||||
|
||||
#endif
|
@ -44,8 +44,8 @@
|
||||
#ifndef __com_sun_star_sdbc_XResultSetUpdate_idl__
|
||||
#include <com/sun/star/sdbc/XResultSetUpdate.idl>
|
||||
#endif
|
||||
#ifndef __com_sun_star_form_XFormController_idl__
|
||||
#include <com/sun/star/form/XFormController.idl>
|
||||
#ifndef __com_sun_star_form_runtime_XFormController_idl__
|
||||
#include <com/sun/star/form/runtime/XFormController.idl>
|
||||
#endif
|
||||
#ifndef __com_sun_star_lang_IllegalArgumentException_idl__
|
||||
#include <com/sun/star/lang/IllegalArgumentException.idl>
|
||||
@ -115,7 +115,7 @@ interface XFormOperations : ::com::sun::star::lang::XComponent
|
||||
case some functionality will not be available. In particular, every feature
|
||||
which relies on the active control of the controller might be of limited use.</p>
|
||||
*/
|
||||
[attribute, readonly] ::com::sun::star::form::XFormController Controller;
|
||||
[attribute, readonly] ::com::sun::star::form::runtime::XFormController Controller;
|
||||
|
||||
/** retrieves the current state of the given feature
|
||||
|
||||
|
@ -42,10 +42,16 @@ PACKAGE=com$/sun$/star$/form$/runtime
|
||||
# ------------------------------------------------------------------------
|
||||
|
||||
IDLFILES=\
|
||||
FeatureState.idl\
|
||||
FeatureState.idl \
|
||||
FilterEvent.idl \
|
||||
FormFeature.idl \
|
||||
FormOperations.idl \
|
||||
FormController.idl \
|
||||
XFeatureInvalidation.idl \
|
||||
XFilterController.idl \
|
||||
XFilterControllerListener.idl \
|
||||
XFormController.idl \
|
||||
XFormControllerContext.idl \
|
||||
XFormOperations.idl \
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
|
56
offapi/com/sun/star/frame/XSessionManagerListener2.idl
Normal file
56
offapi/com/sun/star/frame/XSessionManagerListener2.idl
Normal file
@ -0,0 +1,56 @@
|
||||
/*************************************************************************
|
||||
*
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* Copyright 2008 by Sun Microsystems, Inc.
|
||||
*
|
||||
* OpenOffice.org - a multi-platform office productivity suite
|
||||
*
|
||||
* $RCSfile: XSessionManagerListener.idl,v $
|
||||
* $Revision: 1.4 $
|
||||
*
|
||||
* 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 __com_sun_star_frame_XSessionManagerListener2_idl__
|
||||
#define __com_sun_star_frame_XSessionManagerListener2_idl__
|
||||
|
||||
#ifndef __com_sun_star_lang_XEventListener_idl__
|
||||
#include <com/sun/star/lang/XEventListener.idl>
|
||||
#endif
|
||||
|
||||
#ifndef __com_sun_star_frame_XSessionManagerListener_idl__
|
||||
#include <com/sun/star/frame/XSessionManagerListener.idl>
|
||||
#endif
|
||||
//=============================================================================
|
||||
|
||||
module com { module sun { module star { module frame {
|
||||
|
||||
interface XSessionManagerListener2 : XSessionManagerListener
|
||||
{
|
||||
/** doQuit gets called when the session manager has decided
|
||||
the application should quit. Under these circumstances bringing up
|
||||
further UI will usually be impossible and must be avoided.
|
||||
*/
|
||||
[oneway] void doQuit();
|
||||
};
|
||||
|
||||
}; }; }; };
|
||||
|
||||
|
||||
#endif
|
@ -142,6 +142,7 @@ IDLFILES=\
|
||||
XRecordableDispatch.idl\
|
||||
XSessionManagerClient.idl\
|
||||
XSessionManagerListener.idl\
|
||||
XSessionManagerListener2.idl\
|
||||
XStatusListener.idl\
|
||||
XStatusbarController.idl\
|
||||
XStorable.idl\
|
||||
|
@ -168,13 +168,11 @@ published service DataSourceBrowser
|
||||
<p>
|
||||
With a data source browser implementing this interface, external components have access to
|
||||
<ul><li>the grid control which is used to display the currently selected table/query
|
||||
(see
|
||||
<method scope="com.sun.star.form">XFormController::getControls()</method>
|
||||
)
|
||||
(see <method scope="com::sun::star::awt">XTabController::getControls</method>)
|
||||
</li>
|
||||
<li>the data form used for displaying objects. As always for components implementing this service,
|
||||
the object returned by
|
||||
<method scope="com.sun.star.awt">XTabController::getModel()</method>isadataform.
|
||||
<method scope="com::sun::star::awt">XTabController::getModel</method>is a dataform.
|
||||
</li>
|
||||
</ul>
|
||||
</p>
|
||||
|
@ -52,6 +52,8 @@
|
||||
|
||||
module com { module sun { module star { module sdb {
|
||||
|
||||
published interface XDatabaseRegistrations;
|
||||
|
||||
/** is the context for accessing datasource.
|
||||
|
||||
<p>
|
||||
@ -65,12 +67,10 @@
|
||||
*/
|
||||
published service DatabaseContext
|
||||
{
|
||||
|
||||
/** Enumeration on all registered data sources.
|
||||
*/
|
||||
interface com::sun::star::container::XEnumerationAccess;
|
||||
|
||||
|
||||
/** NameAccess on all registered data sources.
|
||||
<p>One exception is the <method "com.sun.star.container.XNameAccess">getByName</method>, this method also allows to ask
|
||||
for a <member "DataAccessDescriptor">DatabaseLocation</member>.
|
||||
@ -89,6 +89,19 @@ published service DatabaseContext
|
||||
/** Interface for creation of new datasources.
|
||||
*/
|
||||
interface com::sun::star::lang::XSingleServiceFactory;
|
||||
|
||||
/** allows to access and modify the configuration data for registered data source.
|
||||
|
||||
<p>The main purpose of this interface is to allow you to register data sources which you know
|
||||
by URL only, and have not yet loaded.</p>
|
||||
|
||||
<p>Also, it hides the details of the configuration data where the data source registrations
|
||||
are maintained, so if possible at all, you should use this interface, instead of modifying or
|
||||
querying the configuration data directly.</p>
|
||||
|
||||
@since OpenOffice.org 3.3
|
||||
*/
|
||||
[optional] interface XDatabaseRegistrations;
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
|
60
offapi/com/sun/star/sdb/DatabaseRegistrationEvent.idl
Normal file
60
offapi/com/sun/star/sdb/DatabaseRegistrationEvent.idl
Normal file
@ -0,0 +1,60 @@
|
||||
/*************************************************************************
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* Copyright 2009 by Sun Microsystems, Inc.
|
||||
*
|
||||
* 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 __com_sun_star_sdb_DatabaseRegistrationEvent_idl__
|
||||
#define __com_sun_star_sdb_DatabaseRegistrationEvent_idl__
|
||||
|
||||
#include <com/sun/star/lang/EventObject.idl>
|
||||
|
||||
//=============================================================================
|
||||
|
||||
module com { module sun { module star { module sdb {
|
||||
|
||||
//=============================================================================
|
||||
|
||||
/** describes a change in a database registration
|
||||
|
||||
@see XDatabaseRegistrations
|
||||
@see XDatabaseRegistrationsListener
|
||||
|
||||
@since OpenOffice.org 3.3
|
||||
*/
|
||||
struct DatabaseRegistrationEvent : ::com::sun::star::lang::EventObject
|
||||
{
|
||||
/// is the name of the database registration affected by the event
|
||||
string Name;
|
||||
/// is the old location of the database which is affected by the event
|
||||
string OldLocation;
|
||||
/// is the new location of the database which is affected by the event
|
||||
string NewLocation;
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
|
||||
}; }; }; };
|
||||
|
||||
//=============================================================================
|
||||
|
||||
#endif
|
@ -54,60 +54,17 @@
|
||||
|
||||
//=============================================================================
|
||||
|
||||
/** is used to connect to a data access bean. A data access bean represents a
|
||||
database connection and provides additional information related to the connection
|
||||
such as forms, reports, or queries.
|
||||
/** is not to be used anymore
|
||||
@deprecated
|
||||
*/
|
||||
published interface XDatabaseAccess: com::sun::star::sdbc::XDataSource
|
||||
{
|
||||
|
||||
/** indicates that connections already exist.
|
||||
@returns
|
||||
<TRUE/> if so
|
||||
*/
|
||||
boolean hasConnections();
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
/** attempts to establish a database connection, that can not be shared with
|
||||
other components. This should be used for transaction processing.
|
||||
@param user
|
||||
the user name
|
||||
@param password
|
||||
the password
|
||||
@returns
|
||||
an isolated connection object
|
||||
@throws com::sun::star::sdbc::SQLException
|
||||
if a database access error occurs.
|
||||
@see com::sun::star::sdbc::XConnection
|
||||
*/
|
||||
com::sun::star::sdbc::XConnection getIsolatedConnection([in]string user, [in]string password)
|
||||
raises (com::sun::star::sdbc::SQLException);
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
/** closes the all connections to database. This request could be aborted by
|
||||
listeners of the component.
|
||||
@throws com::sun::star::sdbc::SQLException
|
||||
if a database access error occurs.
|
||||
*/
|
||||
boolean suspendConnections() raises (com::sun::star::sdbc::SQLException);
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
/** adds the specified listener to receive the events "connectionChanged",
|
||||
"approveConnectionClose", and "connectionClosing".
|
||||
@param listener
|
||||
the listener to append
|
||||
@see com::sun::star::sdb::XDatabaseAccessListener
|
||||
*/
|
||||
[oneway] void addDatabaseAccessListener([in]XDatabaseAccessListener listener);
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
/** removes the specified listener.
|
||||
@param listener
|
||||
the listener to append
|
||||
@see com::sun::star::sdb::XDatabaseAccessListener
|
||||
*/
|
||||
[oneway] void removeDatabaseAccessListener(
|
||||
[in]XDatabaseAccessListener listener);
|
||||
[oneway] void removeDatabaseAccessListener([in]XDatabaseAccessListener listener);
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
|
@ -37,44 +37,13 @@
|
||||
module com { module sun { module star { module sdb {
|
||||
|
||||
|
||||
/** is used for receiving "connectionChanged", "approveConnectionClose", and
|
||||
"connectionClosing" events posted by a database access bean.
|
||||
|
||||
|
||||
<p>
|
||||
A database access bean setting may be changed to connect to a different database.
|
||||
In that case, the connection of the bean must be closed and a new connection must
|
||||
be established. The could affect the current data processing on the bean, as it
|
||||
could be shared by a number of components. To prevent the bean from closing it's
|
||||
connection, a DatabaseAccessListener could abort the closing.
|
||||
</p>
|
||||
/** is not to be used anymore
|
||||
@deprecated
|
||||
*/
|
||||
published interface XDatabaseAccessListener: com::sun::star::lang::XEventListener
|
||||
{
|
||||
|
||||
/** indicates that a new connection for the bean has been established.
|
||||
@param evenet
|
||||
the event happend
|
||||
*/
|
||||
[oneway] void connectionChanged([in]com::sun::star::lang::EventObject event);
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
/** indicates that the connection of the bean will be closed. If there are pending
|
||||
actions on the connection of the bean, "approveConnectionClosing" should return
|
||||
<FALSE/>.
|
||||
|
||||
@param evenet
|
||||
the event happend
|
||||
@returns
|
||||
<TRUE/> when approved, otherwise <FALSE/>
|
||||
*/
|
||||
boolean approveConnectionClosing([in]com::sun::star::lang::EventObject event);
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
/** indicates that the connection will definitely be closed.
|
||||
@param evenet
|
||||
the event happend
|
||||
*/
|
||||
[oneway] void connectionClosing([in]com::sun::star::lang::EventObject event);
|
||||
};
|
||||
|
||||
|
@ -54,39 +54,14 @@
|
||||
|
||||
//=============================================================================
|
||||
|
||||
/** specifies the root of the data access beans. It provides the possiblity
|
||||
to open a data access bean, which contains tables, queries, forms, and
|
||||
report documents, or to open a connection to a database.
|
||||
/** is not to be used anymore.
|
||||
|
||||
@deprecated
|
||||
*/
|
||||
published interface XDatabaseEnvironment: com::sun::star::sdbc::XDriverManager
|
||||
{
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
/** returns an existing DatabaseAccess bean specified by it's URL.
|
||||
|
||||
|
||||
<p>Database Access beans are always shared, so if there's a second request
|
||||
for the same bean, the same instance of the bean will be returned, if it is still alive.
|
||||
</p>
|
||||
@param URL
|
||||
a database url of the form sdbc:subprotocol:subname
|
||||
@returns
|
||||
the database access object for this url
|
||||
*/
|
||||
XDatabaseAccess getDatabaseAccess([in]string URL)
|
||||
raises (com::sun::star::sdbc::SQLException);
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
/** creates a new DatabaseAccess bean specified by it's URL.
|
||||
@param URL
|
||||
a database url of the form sdbc:subprotocol:subname
|
||||
@param title
|
||||
the title of the database access
|
||||
@returns
|
||||
the new created database access object for this url
|
||||
*/
|
||||
XDatabaseAccess createDatabaseAccess([in]string URL, [in]string title)
|
||||
raises (com::sun::star::sdbc::SQLException);
|
||||
};
|
||||
|
158
offapi/com/sun/star/sdb/XDatabaseRegistrations.idl
Normal file
158
offapi/com/sun/star/sdb/XDatabaseRegistrations.idl
Normal file
@ -0,0 +1,158 @@
|
||||
/*************************************************************************
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* Copyright 2009 by Sun Microsystems, Inc.
|
||||
*
|
||||
* 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 __com_sun_star_sdb_XDatabaseRegistrations_idl__
|
||||
#define __com_sun_star_sdb_XDatabaseRegistrations_idl__
|
||||
|
||||
#include <com/sun/star/container/NoSuchElementException.idl>
|
||||
#include <com/sun/star/container/ElementExistException.idl>
|
||||
#include <com/sun/star/lang/IllegalArgumentException.idl>
|
||||
#include <com/sun/star/lang/IllegalAccessException.idl>
|
||||
|
||||
//=============================================================================
|
||||
|
||||
module com { module sun { module star { module sdb {
|
||||
|
||||
interface XDatabaseRegistrationsListener;
|
||||
|
||||
//=============================================================================
|
||||
|
||||
/** provides access to the application-wide registered databases.
|
||||
|
||||
<p>This interface provides a mere wrapper around the respective configuration data,
|
||||
this way hiding the concrete configuration structure from its clients. You should,
|
||||
if possible at all, use this interface, instead of modifying or querying the configuration
|
||||
data directly.</p>
|
||||
|
||||
@since OpenOffice.org 3.3
|
||||
*/
|
||||
interface XDatabaseRegistrations
|
||||
{
|
||||
/** determines whether a database is registered under the given name.
|
||||
|
||||
@throws ::com::sun::star::lang::IllegalArgumentException
|
||||
if the given name is empty
|
||||
*/
|
||||
boolean hasRegisteredDatabase( [in] string Name )
|
||||
raises ( ::com::sun::star::lang::IllegalArgumentException
|
||||
);
|
||||
|
||||
/** returns the names of all registered databases
|
||||
*/
|
||||
sequence< string >
|
||||
getRegistrationNames();
|
||||
|
||||
/** returns the location of the database registered under the given name
|
||||
|
||||
@throws ::com::sun::star::lang::IllegalArgumentException
|
||||
if the given name is empty
|
||||
|
||||
@throws ::com::sun::star::container::NoSuchElementException
|
||||
if there is no database registered under this name
|
||||
*/
|
||||
string getDatabaseLocation( [in] string Name )
|
||||
raises ( ::com::sun::star::lang::IllegalArgumentException
|
||||
, ::com::sun::star::container::NoSuchElementException
|
||||
);
|
||||
|
||||
/** registers a database, given by location, under a given name
|
||||
|
||||
@throws ::com::sun::star::lang::IllegalArgumentException
|
||||
if the given name is empty, or the given location is invalid.
|
||||
|
||||
@throws ::com::sun::star::container::ElementExistException
|
||||
if there already is a databases registered under the given name.
|
||||
*/
|
||||
void registerDatabaseLocation( [in] string Name, [in] string Location )
|
||||
raises ( ::com::sun::star::lang::IllegalArgumentException
|
||||
, ::com::sun::star::container::ElementExistException
|
||||
);
|
||||
|
||||
/** revokes the registration of a database, given by name
|
||||
|
||||
@throws ::com::sun::star::lang::IllegalArgumentException
|
||||
if the given name is empty
|
||||
|
||||
@throws ::com::sun::star::container::NoSuchElementException
|
||||
if there is no database registered under this name
|
||||
|
||||
@throws ::com::sun::star::lang::IllegalAccessException
|
||||
if the registration data for this database is read-only
|
||||
*/
|
||||
void revokeDatabaseLocation( [in] string Name )
|
||||
raises ( ::com::sun::star::lang::IllegalArgumentException
|
||||
, ::com::sun::star::container::NoSuchElementException
|
||||
, ::com::sun::star::lang::IllegalAccessException
|
||||
);
|
||||
|
||||
/** changes the location of a given database registration
|
||||
|
||||
@throws ::com::sun::star::lang::IllegalArgumentException
|
||||
if the given name is empty, or the given location is invalid.
|
||||
|
||||
@throws ::com::sun::star::container::NoSuchElementException
|
||||
if there is no database registered under this name
|
||||
|
||||
@throws ::com::sun::star::lang::IllegalAccessException
|
||||
if the registration data for this database is read-only
|
||||
*/
|
||||
void changeDatabaseLocation( [in] string Name, [in] string NewLocation )
|
||||
raises ( ::com::sun::star::lang::IllegalArgumentException
|
||||
, ::com::sun::star::container::NoSuchElementException
|
||||
, ::com::sun::star::lang::IllegalAccessException
|
||||
);
|
||||
|
||||
/** determines whether the registration data for a database given by name is
|
||||
read-only.
|
||||
|
||||
<p>In this case, attempts to revoke this registration will fail.</p>
|
||||
|
||||
@throws ::com::sun::star::lang::IllegalArgumentException
|
||||
if the given name is empty
|
||||
|
||||
@throws ::com::sun::star::container::NoSuchElementException
|
||||
if there is no database registered under this name
|
||||
*/
|
||||
boolean isDatabaseRegistrationReadOnly( [in] string Name )
|
||||
raises ( ::com::sun::star::lang::IllegalArgumentException
|
||||
, ::com::sun::star::container::NoSuchElementException
|
||||
);
|
||||
|
||||
/** registers a listener which is notified of changes in the registered databases
|
||||
*/
|
||||
void addDatabaseRegistrationsListener( [in] XDatabaseRegistrationsListener Listener );
|
||||
|
||||
/** revokes a previously registered listener
|
||||
*/
|
||||
void removeDatabaseRegistrationsListener( [in] XDatabaseRegistrationsListener Listener );
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
|
||||
}; }; }; };
|
||||
|
||||
//=============================================================================
|
||||
|
||||
#endif
|
70
offapi/com/sun/star/sdb/XDatabaseRegistrationsListener.idl
Normal file
70
offapi/com/sun/star/sdb/XDatabaseRegistrationsListener.idl
Normal file
@ -0,0 +1,70 @@
|
||||
/*************************************************************************
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* Copyright 2009 by Sun Microsystems, Inc.
|
||||
*
|
||||
* 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 __com_sun_star_sdb_XDatabaseRegistrationsListener_idl__
|
||||
#define __com_sun_star_sdb_XDatabaseRegistrationsListener_idl__
|
||||
|
||||
#include <com/sun/star/lang/XEventListener.idl>
|
||||
#include <com/sun/star/sdb/DatabaseRegistrationEvent.idl>
|
||||
|
||||
//=============================================================================
|
||||
|
||||
module com { module sun { module star { module sdb {
|
||||
|
||||
//=============================================================================
|
||||
|
||||
/** implemented by components which want to be notified of changes in the application-wide registered
|
||||
databases.
|
||||
|
||||
@see XDatabaseRegistrations
|
||||
|
||||
@since OpenOffice.org 3.3
|
||||
*/
|
||||
interface XDatabaseRegistrationsListener : ::com::sun::star::lang::XEventListener
|
||||
{
|
||||
/** called when a database has been registered
|
||||
*/
|
||||
void registeredDatabaseLocation( [in] DatabaseRegistrationEvent Event );
|
||||
|
||||
/** called when a database registration has been revoked
|
||||
*/
|
||||
void revokedDatabaseLocation( [in] DatabaseRegistrationEvent Event );
|
||||
|
||||
/** called when a the location of a registered database changed
|
||||
|
||||
<p>Note that this talks about registration data only. That is, if the actual file denoted by the database
|
||||
registration is moved, this is in no way monitored or reported. Only (successful) calls to
|
||||
<member>XDatabaseRegistrations::changeDatabaseLocation</member> are reported here.</p>
|
||||
*/
|
||||
void changedDatabaseLocation( [in] DatabaseRegistrationEvent Event );
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
|
||||
}; }; }; };
|
||||
|
||||
//=============================================================================
|
||||
|
||||
#endif
|
@ -62,6 +62,7 @@ IDLFILES=\
|
||||
DatabaseContext.idl \
|
||||
DatabaseDocument.idl \
|
||||
DatabaseEnvironment.idl \
|
||||
DatabaseRegistrationEvent.idl \
|
||||
DataColumn.idl \
|
||||
DataSettings.idl \
|
||||
DataSource.idl \
|
||||
@ -113,6 +114,8 @@ IDLFILES=\
|
||||
XDataAccessDescriptorFactory.idl \
|
||||
XDatabaseAccess.idl \
|
||||
XDatabaseAccessListener.idl \
|
||||
XDatabaseRegistrations.idl \
|
||||
XDatabaseRegistrationsListener.idl \
|
||||
XDatabaseEnvironment.idl \
|
||||
XDocumentDataSource.idl \
|
||||
XFormDocumentsSupplier.idl \
|
||||
|
@ -127,6 +127,7 @@ constants ItemStyle
|
||||
/** specifies if an icon is placed on left side of the text, like an entry in a taskbar.
|
||||
<p>This style is only valid if the item describes a toolbar item and visible if
|
||||
style of the toolbar is set to symboltext.</p>
|
||||
<p> This style can also be used for custom toolbars and menus, in a custom toolbar an item's Style setting can used to override the toolbar container setting, the style can be bitwise OR-ed with <member scope="::com::sun::star::ui::ItemStyle">TEXT</member> to define text, text+icon or icon only is to be displayed. Similarly for menu items, an items Style can override the application setting to display either text or icon ( note: for menu an icon only setting interpreted as icon+text ) </p>
|
||||
*/
|
||||
const short ICON = 128;
|
||||
|
||||
@ -149,6 +150,10 @@ constants ItemStyle
|
||||
<p>This style is only valid if the item describes a toolbar item.</p>
|
||||
*/
|
||||
const short DROPDOWN_ONLY = 1024;
|
||||
/** indicates if icon, text or text+icon is displayed for the item.
|
||||
<p> This style can be used for custom toolbars and menus, in a custom toolbar an item's Style setting can used to override the toolbar container setting, the style can be bitwise OR-ed with <member scope="com::sun::star::ui::ItemStyle">ICON</member> to define text, text+icon or icon only is to be displayed. Similarly for menu items, an items Style can override the application setting to display either text or icon ( note: for menu an icon only setting interpreted as icon+text ) </p>
|
||||
*/
|
||||
const short TEXT = 2048;
|
||||
};
|
||||
|
||||
}; }; }; };
|
||||
|
104
offapi/com/sun/star/util/Duration.idl
Normal file
104
offapi/com/sun/star/util/Duration.idl
Normal file
@ -0,0 +1,104 @@
|
||||
/*************************************************************************
|
||||
*
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* Copyright 2008 by Sun Microsystems, Inc.
|
||||
*
|
||||
* OpenOffice.org - a multi-platform office productivity suite
|
||||
*
|
||||
* $RCSfile: DateTime.idl,v $
|
||||
* $Revision: 1.7 $
|
||||
*
|
||||
* 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 __com_sun_star_util_Duration_idl__
|
||||
#define __com_sun_star_util_Duration_idl__
|
||||
|
||||
|
||||
//========================================================================
|
||||
|
||||
module com { module sun { module star { module util {
|
||||
|
||||
//========================================================================
|
||||
|
||||
/** represents a duration.
|
||||
|
||||
<p>
|
||||
A duration is the difference of 2 <type>DateTime</type>s.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Note that there are no constraints on the ranges of the members,
|
||||
except that every member must be non-negative:
|
||||
for example, a Duration of 400 Days is valid.
|
||||
</p>
|
||||
|
||||
@since OOo 3.3
|
||||
*/
|
||||
struct Duration
|
||||
{
|
||||
//--------------------------------------------------------------------
|
||||
/** explicit sign bit.
|
||||
*/
|
||||
boolean Negative;
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
/** contains the years.
|
||||
*/
|
||||
unsigned short Years;
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
/** contains the months.
|
||||
*/
|
||||
unsigned short Months;
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
/** contains the days.
|
||||
*/
|
||||
unsigned short Days;
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
/** contains the hours.
|
||||
*/
|
||||
unsigned short Hours;
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
/** contains the minutes.
|
||||
*/
|
||||
unsigned short Minutes;
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
/** contains the seconds.
|
||||
*/
|
||||
unsigned short Seconds;
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
/** contains the hundredth seconds.
|
||||
*/
|
||||
unsigned short HundredthSeconds;
|
||||
|
||||
};
|
||||
|
||||
//========================================================================
|
||||
|
||||
}; }; }; };
|
||||
|
||||
#endif
|
||||
|
@ -53,6 +53,7 @@ IDLFILES=\
|
||||
DateTime.idl\
|
||||
DateTimeRange.idl\
|
||||
DiskFullException.idl\
|
||||
Duration.idl\
|
||||
ElementChange.idl \
|
||||
Endianness.idl \
|
||||
FileIOException.idl\
|
||||
|
69
offapi/com/sun/star/view/DuplexMode.idl
Normal file
69
offapi/com/sun/star/view/DuplexMode.idl
Normal file
@ -0,0 +1,69 @@
|
||||
/*************************************************************************
|
||||
*
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* Copyright 2008 by Sun Microsystems, Inc.
|
||||
*
|
||||
* OpenOffice.org - a multi-platform office productivity suite
|
||||
*
|
||||
* $RCSfile: PaperFormat.idl,v $
|
||||
* $Revision: 1.7 $
|
||||
*
|
||||
* 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 __com_sun_star_view_DuplexMode_idl__
|
||||
#define __com_sun_star_view_DuplexMode_idl__
|
||||
|
||||
|
||||
//=============================================================================
|
||||
|
||||
module com { module sun { module star { module view {
|
||||
|
||||
//=============================================================================
|
||||
|
||||
/** These constants specify available duplex modes
|
||||
*/
|
||||
constants DuplexMode
|
||||
{
|
||||
//-------------------------------------------------------------------------
|
||||
/** specifies an unknown duplex mode.
|
||||
*/
|
||||
const short UNKNOWN = 0;
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
/** specifies that there is no duplex mode enabled
|
||||
*/
|
||||
const short OFF = 1;
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
/** specifies a long edge duplex mode
|
||||
*/
|
||||
const short LONGEDGE = 2;
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
/** specifies a short edge duplex mode
|
||||
*/
|
||||
const short SHORTEDGE = 3;
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
|
||||
}; }; }; };
|
||||
|
||||
#endif
|
@ -85,6 +85,13 @@ published service PrintOptions
|
||||
Otherwhise following actions (as e.g. closing the corresponding model) can fail.
|
||||
*/
|
||||
[optional, property] boolean Wait;
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
/** determines the duplex mode for the print job.
|
||||
|
||||
@see <type>DuplexMode</type> for more information about supported values
|
||||
*/
|
||||
[optional, property] short DuplexMode;
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
|
@ -37,8 +37,8 @@
|
||||
#ifndef __com_sun_star_form_XForm_idl__
|
||||
#include <com/sun/star/form/XForm.idl>
|
||||
#endif
|
||||
#ifndef __com_sun_star_form_XFormController_idl__
|
||||
#include <com/sun/star/form/XFormController.idl>
|
||||
#ifndef __com_sun_star_form_runtime_XFormController_idl__
|
||||
#include <com/sun/star/form/runtime/XFormController.idl>
|
||||
#endif
|
||||
#ifndef __com_sun_star_lang_IllegalArgumentException_idl__
|
||||
#include <com/sun/star/lang/IllegalArgumentException.idl>
|
||||
@ -73,10 +73,10 @@ interface XFormLayerAccess
|
||||
|
||||
@see isDesignMode
|
||||
@see setDesignMode
|
||||
@see ::com::sun::star::form::FormController
|
||||
@see ::com::sun::star::form::runtime::FormController
|
||||
@see ::com::sun::star::form::runtime::FormOperations
|
||||
*/
|
||||
::com::sun::star::form::XFormController
|
||||
::com::sun::star::form::runtime::XFormController
|
||||
getFormController(
|
||||
[in] ::com::sun::star::form::XForm Form
|
||||
);
|
||||
|
@ -73,7 +73,8 @@ IDLFILES=\
|
||||
XPrintJobBroadcaster.idl\
|
||||
XPrintJobListener.idl\
|
||||
XMultiSelectionSupplier.idl\
|
||||
SelectionType.idl
|
||||
SelectionType.idl\
|
||||
DuplexMode.idl
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
|
||||
|
@ -180,12 +180,12 @@ $(OUT)$/ucrdoc$/types_doc.db : $(OUT)$/ucrdoc$/offapi_doc.db $(SOLARBINDIR)$/udk
|
||||
#JSC: i have removed the doc rdb because all type information is already in the
|
||||
# types.rdb, even the service and singleton type info. IDL docu isn't checked.
|
||||
$(REGISTRYCHECKFLAG) : $(UCR)$/types.db $(OUT)$/ucrdoc$/types_doc.db
|
||||
$(REGCOMPARE) -f -t -r1 $(REFERENCE_RDB) -r2 $(UCR)$/types.db \
|
||||
$(COMMAND_ECHO)$(REGCOMPARE) -f -t -r1 $(REFERENCE_RDB) -r2 $(UCR)$/types.db \
|
||||
&& echo > $(REGISTRYCHECKFLAG)
|
||||
|
||||
#JSC: new target to prepare some UNO type statistics, the ouput will be later used
|
||||
# for versioning of UNO cli type libraries
|
||||
$(UNOTYPE_STATISTICS) : $(REGISTRYCHECKFLAG)
|
||||
$(AUGMENT_LIBRARY_PATH) $(PERL) checknewapi.pl $(UCR)$/types.db $(REFERENCE_RDB) "$(RSCREVISION)" "$(REGVIEWTOOL)" > $@
|
||||
$(COMMAND_ECHO)$(AUGMENT_LIBRARY_PATH) $(PERL) checknewapi.pl $(UCR)$/types.db $(REFERENCE_RDB) "$(RSCREVISION)" "$(REGVIEWTOOL)" > $@
|
||||
|
||||
.INCLUDE : target.mk
|
||||
|
@ -365,7 +365,7 @@ RegError ORegKey::setValue(const OUString& valueName, RegValueType vType, RegVal
|
||||
return REG_SET_VALUE_FAILED;
|
||||
}
|
||||
|
||||
rValue.flush();
|
||||
//rValue.flush();
|
||||
rtl_freeMemory(pBuffer);
|
||||
return REG_NO_ERROR;
|
||||
}
|
||||
@ -424,7 +424,7 @@ RegError ORegKey::setLongListValue(const OUString& valueName, sal_Int32* pValueL
|
||||
return REG_SET_VALUE_FAILED;
|
||||
}
|
||||
|
||||
rValue.flush();
|
||||
//rValue.flush();
|
||||
rtl_freeMemory(pBuffer);
|
||||
return REG_NO_ERROR;
|
||||
}
|
||||
@ -492,7 +492,7 @@ RegError ORegKey::setStringListValue(const OUString& valueName, sal_Char** pValu
|
||||
return REG_SET_VALUE_FAILED;
|
||||
}
|
||||
|
||||
rValue.flush();
|
||||
//rValue.flush();
|
||||
rtl_freeMemory(pBuffer);
|
||||
return REG_NO_ERROR;
|
||||
}
|
||||
@ -560,7 +560,7 @@ RegError ORegKey::setUnicodeListValue(const OUString& valueName, sal_Unicode** p
|
||||
return REG_SET_VALUE_FAILED;
|
||||
}
|
||||
|
||||
rValue.flush();
|
||||
//rValue.flush();
|
||||
rtl_freeMemory(pBuffer);
|
||||
return REG_NO_ERROR;
|
||||
}
|
||||
|
@ -848,7 +848,7 @@ RegError ORegistry::eraseKey(ORegKey* pKey, const OUString& keyName)
|
||||
{
|
||||
return REG_DELETE_KEY_FAILED;
|
||||
}
|
||||
sFile.flush();
|
||||
//sFile.flush();
|
||||
|
||||
// set flag deleted !!!
|
||||
((ORegKey*)hOldKey)->setDeleted(sal_True);
|
||||
@ -894,7 +894,7 @@ RegError ORegistry::deleteSubkeysAndValues(ORegKey* pKey)
|
||||
{
|
||||
return REG_DELETE_VALUE_FAILED;
|
||||
}
|
||||
((OStoreFile&)pKey->getStoreFile()).flush();
|
||||
//((OStoreFile&)pKey->getStoreFile()).flush();
|
||||
}
|
||||
|
||||
_err = rStoreDir.next(iter);
|
||||
@ -1065,7 +1065,7 @@ RegError ORegistry::loadAndSaveValue(ORegKey* pTargetKey,
|
||||
{
|
||||
return REG_VALUE_NOT_EXISTS;
|
||||
}
|
||||
pSourceKey->getStoreFile().flush();
|
||||
//pSourceKey->getStoreFile().flush();
|
||||
|
||||
pBuffer = (sal_uInt8*)rtl_allocateMemory(VALUE_HEADERSIZE);
|
||||
|
||||
@ -1137,7 +1137,7 @@ RegError ORegistry::loadAndSaveValue(ORegKey* pTargetKey,
|
||||
rtl_freeMemory(pBuffer);
|
||||
return REG_INVALID_VALUE;
|
||||
}
|
||||
rTargetFile.flush();
|
||||
//rTargetFile.flush();
|
||||
|
||||
if (rwBytes != nSize)
|
||||
{
|
||||
@ -1482,6 +1482,20 @@ RegError ORegistry::dumpRegistry(RegKeyHandle hKey) const
|
||||
return REG_NO_ERROR;
|
||||
}
|
||||
|
||||
RegError ORegistry::flush()
|
||||
{
|
||||
REG_GUARD(m_mutex);
|
||||
|
||||
if (m_file.isValid())
|
||||
{
|
||||
m_file.flush();
|
||||
return REG_NO_ERROR;
|
||||
} else
|
||||
{
|
||||
return REG_REGISTRY_NOT_EXISTS;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//*********************************************************************
|
||||
// dumpValue()
|
||||
|
@ -113,6 +113,8 @@ public:
|
||||
|
||||
RegError dumpRegistry(RegKeyHandle hKey) const;
|
||||
|
||||
RegError flush();
|
||||
|
||||
~ORegistry();
|
||||
|
||||
sal_Bool isReadOnly() const
|
||||
|
@ -430,6 +430,8 @@ static RegError REGISTRY_CALLTYPE mergeKey(RegHandle hReg,
|
||||
*/
|
||||
_ret = pKey->closeKey(pNewKey);
|
||||
|
||||
if (_ret == REG_NO_ERROR )
|
||||
_ret = pReg->flush();
|
||||
return _ret;
|
||||
}
|
||||
|
||||
|
@ -118,20 +118,6 @@ extern "C" {
|
||||
# include <machine/param.h>
|
||||
#endif
|
||||
|
||||
#ifdef IRIX
|
||||
# include <sys/endian.h>
|
||||
# if BYTE_ORDER == LITTLE_ENDIAN
|
||||
# undef _BIG_ENDIAN
|
||||
# undef _PDP_ENDIAN
|
||||
# elif BYTE_ORDER == BIG_ENDIAN
|
||||
# undef _LITTLE_ENDIAN
|
||||
# undef _PDP_ENDIAN
|
||||
# elif BYTE_ORDER == PDP_ENDIAN
|
||||
# undef _LITTLE_ENDIAN
|
||||
# undef _BIG_ENDIAN
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef _WIN16
|
||||
# define _LITTLE_ENDIAN
|
||||
#endif
|
||||
@ -166,8 +152,7 @@ extern "C" {
|
||||
#if !defined(_WIN32) && !defined(_WIN16) && !defined(OS2) && \
|
||||
!defined(LINUX) && !defined(NETBSD) && !defined(SCO) && \
|
||||
!defined(AIX) && !defined(HPUX) && \
|
||||
!defined(SOLARIS) && !defined(IRIX) && \
|
||||
!defined(MACOSX) && !defined(FREEBSD)
|
||||
!defined(SOLARIS) && !defined(MACOSX) && !defined(FREEBSD)
|
||||
# error "Target platform not specified !"
|
||||
#endif
|
||||
|
||||
|
@ -117,7 +117,7 @@ public:
|
||||
osl_joinWithThread(m_hThread);
|
||||
}
|
||||
|
||||
sal_Bool SAL_CALL isRunning()
|
||||
sal_Bool SAL_CALL isRunning() const
|
||||
{
|
||||
return osl_isThreadRunning(m_hThread);
|
||||
}
|
||||
@ -128,7 +128,7 @@ public:
|
||||
osl_setThreadPriority(m_hThread, Priority);
|
||||
}
|
||||
|
||||
oslThreadPriority SAL_CALL getPriority()
|
||||
oslThreadPriority SAL_CALL getPriority() const
|
||||
{
|
||||
return m_hThread ? osl_getThreadPriority(m_hThread) : osl_Thread_PriorityUnknown;
|
||||
}
|
||||
|
@ -357,17 +357,28 @@ inline bool isSignBitSet(double d)
|
||||
*/
|
||||
inline void setInf(double * pd, bool bNegative)
|
||||
{
|
||||
reinterpret_cast< sal_math_Double * >(pd)->w32_parts.msw
|
||||
= bNegative ? 0xFFF00000 : 0x7FF00000;
|
||||
reinterpret_cast< sal_math_Double * >(pd)->w32_parts.lsw = 0;
|
||||
union
|
||||
{
|
||||
double sd;
|
||||
sal_math_Double md;
|
||||
};
|
||||
md.w32_parts.msw = bNegative ? 0xFFF00000 : 0x7FF00000;
|
||||
md.w32_parts.lsw = 0;
|
||||
*pd = sd;
|
||||
}
|
||||
|
||||
/** Set a QNAN.
|
||||
*/
|
||||
inline void setNan(double * pd)
|
||||
{
|
||||
reinterpret_cast< sal_math_Double * >(pd)->w32_parts.msw = 0x7FFFFFFF;
|
||||
reinterpret_cast< sal_math_Double * >(pd)->w32_parts.lsw = 0xFFFFFFFF;
|
||||
union
|
||||
{
|
||||
double sd;
|
||||
sal_math_Double md;
|
||||
};
|
||||
md.w32_parts.msw = 0x7FFFFFFF;
|
||||
md.w32_parts.lsw = 0xFFFFFFFF;
|
||||
*pd = sd;
|
||||
}
|
||||
|
||||
/** If a value is a valid argument for sin(), cos(), tan().
|
||||
|
@ -201,8 +201,6 @@ void SAL_CALL rtl_createNamedUuid(
|
||||
#define UUID_SYSTEM_TIME_RESOLUTION_100NS_TICKS 10
|
||||
#elif MACOSX
|
||||
#define UUID_SYSTEM_TIME_RESOLUTION_100NS_TICKS 100000
|
||||
#elif IRIX
|
||||
#define UUID_SYSTEM_TIME_RESOLUTION_100NS_TICKS 10
|
||||
#else
|
||||
#error "System time resolution must be calculated!"
|
||||
#endif
|
||||
|
@ -31,7 +31,7 @@
|
||||
#ifndef INCLUDED_SAL_ALLOCA_H
|
||||
#define INCLUDED_SAL_ALLOCA_H
|
||||
|
||||
#if defined (SOLARIS) || defined (LINUX) || defined (IRIX) || defined(__EMX__)
|
||||
#if defined (SOLARIS) || defined (LINUX) || defined(__EMX__)
|
||||
|
||||
#ifndef INCLUDED_ALLOCA_H
|
||||
#include <alloca.h>
|
||||
|
@ -102,7 +102,7 @@ extern "C" {
|
||||
#define SAL_SYSCONFIGFILE( name ) name ".ini"
|
||||
#endif
|
||||
|
||||
#if defined(SOLARIS) || defined(LINUX) || defined(NETBSD) || defined(FREEBSD) || defined(SCO) || defined(IRIX)
|
||||
#if defined(SOLARIS) || defined(LINUX) || defined(NETBSD) || defined(FREEBSD) || defined(SCO)
|
||||
#define SAL_UNX
|
||||
#define SAL_DLLEXTENSION ".so"
|
||||
#define SAL_DLLPREFIX "lib"
|
||||
|
@ -2343,7 +2343,7 @@ oslFileError SAL_CALL osl_syncFile(oslFileHandle Handle)
|
||||
# define __OSL_STATFS_IS_CASE_PRESERVING_FS(a) ((__OSL_MSDOS_SUPER_MAGIC != (a).f_type))
|
||||
#endif /* LINUX */
|
||||
|
||||
#if defined(SOLARIS) || defined(IRIX)
|
||||
#if defined(SOLARIS)
|
||||
# define __OSL_STATFS_STRUCT struct statvfs
|
||||
# define __OSL_STATFS(dir, sfs) statvfs((dir), (sfs))
|
||||
# define __OSL_STATFS_BLKSIZ(a) ((sal_uInt64)((a).f_frsize))
|
||||
@ -2355,7 +2355,7 @@ oslFileError SAL_CALL osl_syncFile(oslFileHandle Handle)
|
||||
of the target platforms fix it!!!! */
|
||||
# define __OSL_STATFS_IS_CASE_SENSITIVE_FS(a) (1)
|
||||
# define __OSL_STATFS_IS_CASE_PRESERVING_FS(a) (1)
|
||||
#endif /* SOLARIS || IRIX*/
|
||||
#endif /* SOLARIS */
|
||||
|
||||
# define __OSL_STATFS_INIT(a) (memset(&(a), 0, sizeof(__OSL_STATFS_STRUCT)))
|
||||
|
||||
|
@ -411,9 +411,6 @@ void _imp_getProcessLocale( rtl_Locale ** ppLocale )
|
||||
|
||||
int _imp_setProcessLocale( rtl_Locale * pLocale )
|
||||
{
|
||||
#ifdef IRIX
|
||||
char env_buf[80];
|
||||
#endif
|
||||
char locale_buf[64];
|
||||
|
||||
/* convert rtl_Locale to locale string */
|
||||
@ -421,11 +418,7 @@ int _imp_setProcessLocale( rtl_Locale * pLocale )
|
||||
{
|
||||
/* only change env vars that exist already */
|
||||
if( getenv( "LC_ALL" ) ) {
|
||||
#if defined( IRIX )
|
||||
snprintf(env_buf, sizeof(env_buf), "LC_ALL=%s", locale_buf);
|
||||
env_buf[sizeof(env_buf)] = '\0';
|
||||
putenv(env_buf);
|
||||
#elif defined( FREEBSD ) || defined( NETBSD ) || defined( MACOSX ) || defined( __EMX__ )
|
||||
#if defined( FREEBSD ) || defined( NETBSD ) || defined( MACOSX ) || defined( __EMX__ )
|
||||
setenv( "LC_ALL", locale_buf, 1);
|
||||
#else
|
||||
setenv( "LC_ALL", locale_buf );
|
||||
@ -433,11 +426,7 @@ int _imp_setProcessLocale( rtl_Locale * pLocale )
|
||||
}
|
||||
|
||||
if( getenv( "LC_CTYPE" ) ) {
|
||||
#if defined( IRIX )
|
||||
snprintf(env_buf, sizeof(env_buf), "LC_CTYPE=%s", locale_buf);
|
||||
env_buf[sizeof(env_buf)] = '\0';
|
||||
putenv(env_buf);
|
||||
#elif defined( FREEBSD ) || defined( NETBSD ) || defined( MACOSX ) || defined( __EMX__ )
|
||||
#if defined( FREEBSD ) || defined( NETBSD ) || defined( MACOSX ) || defined( __EMX__ )
|
||||
setenv("LC_CTYPE", locale_buf, 1 );
|
||||
#else
|
||||
setenv( "LC_CTYPE", locale_buf );
|
||||
@ -445,11 +434,7 @@ int _imp_setProcessLocale( rtl_Locale * pLocale )
|
||||
}
|
||||
|
||||
if( getenv( "LANG" ) ) {
|
||||
#if defined( IRIX )
|
||||
snprintf(env_buf, sizeof(env_buf), "LANG=%s", locale_buf);
|
||||
env_buf[sizeof(env_buf)] = '\0';
|
||||
putenv(env_buf);
|
||||
#elif defined( FREEBSD ) || defined( NETBSD ) || defined( MACOSX ) || defined( __EMX__ )
|
||||
#if defined( FREEBSD ) || defined( NETBSD ) || defined( MACOSX ) || defined( __EMX__ )
|
||||
setenv("LC_CTYPE", locale_buf, 1 );
|
||||
#else
|
||||
setenv( "LANG", locale_buf );
|
||||
|
@ -48,7 +48,7 @@
|
||||
#undef HAVE_POLL_H
|
||||
#endif
|
||||
|
||||
#if defined(LINUX) || defined (IRIX) || defined(NETBSD) || defined ( FREEBSD ) || defined (MACOSX)
|
||||
#if defined(LINUX) || defined(NETBSD) || defined ( FREEBSD ) || defined (MACOSX)
|
||||
#include <sys/poll.h>
|
||||
#define HAVE_POLL_H
|
||||
#endif /* HAVE_POLL_H */
|
||||
|
@ -306,36 +306,6 @@ extern unsigned int nanosleep(unsigned int);
|
||||
# define PTHREAD_SIGACTION cma_sigaction
|
||||
#endif
|
||||
|
||||
#ifdef IRIX
|
||||
# define AF_IPX -1
|
||||
# include <pthread.h>
|
||||
# include <semaphore.h>
|
||||
# include <sched.h>
|
||||
# include <sys/socket.h>
|
||||
# include <sys/un.h>
|
||||
# include <sys/stropts.h>
|
||||
# include <netinet/tcp.h>
|
||||
# include <procfs/procfs.h>
|
||||
# include <sys/endian.h>
|
||||
# if BYTE_ORDER == LITTLE_ENDIAN
|
||||
# undef _BIG_ENDIAN
|
||||
# undef _PDP_ENDIAN
|
||||
# elif BYTE_ORDER == BIG_ENDIAN
|
||||
# undef _LITTLE_ENDIAN
|
||||
# undef _PDP_ENDIAN
|
||||
# elif BYTE_ORDER == PDP_ENDIAN
|
||||
# undef _LITTLE_ENDIAN
|
||||
# undef _BIG_ENDIAN
|
||||
# endif
|
||||
# define SA_FAMILY_DECL \
|
||||
union { struct { short sa_family2; } sa_generic; } sa_union
|
||||
# define PTR_SIZE_T(s) ((int *)&(s))
|
||||
# define NO_PTHREAD_PRIORITY
|
||||
# include <dlfcn.h>
|
||||
# define IOCHANNEL_TRANSFER_BSD
|
||||
extern char *strdup(const char *);
|
||||
#endif
|
||||
|
||||
#ifdef SOLARIS
|
||||
# include <shadow.h>
|
||||
# include <sys/procfs.h>
|
||||
@ -389,7 +359,7 @@ char *macxp_tempnam( const char *tmpdir, const char *prefix );
|
||||
#if !defined(_WIN32) && !defined(_WIN16) && !defined(OS2) && \
|
||||
!defined(LINUX) && !defined(NETBSD) && !defined(FREEBSD) && !defined(SCO) && \
|
||||
!defined(AIX) && !defined(HPUX) && \
|
||||
!defined(SOLARIS) && !defined(IRIX) && !defined(MAC) && \
|
||||
!defined(SOLARIS) && !defined(MAC) && \
|
||||
!defined(MACOSX)
|
||||
# error "Target plattform not specified !"
|
||||
#endif
|
||||
|
@ -207,54 +207,6 @@ void backtrace_symbols_fd( void **buffer, int size, int fd )
|
||||
}
|
||||
#endif /* defined FREEBSD */
|
||||
|
||||
#if defined(IRIX)
|
||||
#include <stdio.h>
|
||||
#include <rld_interface.h>
|
||||
#include <exception.h>
|
||||
#include <sys/signal.h>
|
||||
#include <unistd.h>
|
||||
|
||||
/* Need extra libs -lexc -ldwarf -lelf */
|
||||
|
||||
int backtrace( void **buffer, int max_frames )
|
||||
{
|
||||
struct sigcontext context;
|
||||
int i = 0;
|
||||
|
||||
memset(&context, 0, sizeof(struct sigcontext));
|
||||
|
||||
exc_setjmp(&context);
|
||||
while(context.sc_pc != 1 && i < max_frames) {
|
||||
exc_unwind(&context, 0);
|
||||
if(context.sc_pc != 1) {
|
||||
*(buffer++) = (void *)context.sc_pc;
|
||||
i++;
|
||||
}
|
||||
}
|
||||
return(i);
|
||||
}
|
||||
|
||||
void backtrace_symbols_fd( void **buffer, int size, int fd )
|
||||
{
|
||||
FILE *fp = fdopen( fd, "w" );
|
||||
struct sigcontext context;
|
||||
char *name;
|
||||
|
||||
if ( fp ) {
|
||||
while(context.sc_pc!=1) {
|
||||
if(context.sc_pc != 1) {
|
||||
exc_unwind_name(&context, 0, &name);
|
||||
fprintf(fp, " 0x%012lx %.100s\n", context.sc_pc, name ? name : "<unknown function>");
|
||||
free(name);
|
||||
}
|
||||
}
|
||||
|
||||
fflush( fp );
|
||||
fclose( fp );
|
||||
}
|
||||
}
|
||||
#endif /* defined IRIX */
|
||||
|
||||
#ifdef LINUX
|
||||
|
||||
#ifndef _GNU_SOURCE
|
||||
|
@ -466,6 +466,7 @@ oslFileError FileHandle_Impl::readFileAt (
|
||||
oslFileError result = syncFile();
|
||||
if (result != osl_File_E_None)
|
||||
return (result);
|
||||
m_bufptr = -1, m_buflen = 0;
|
||||
|
||||
if (nBytesRequested >= m_bufsiz)
|
||||
{
|
||||
@ -535,6 +536,7 @@ oslFileError FileHandle_Impl::writeFileAt (
|
||||
oslFileError result = syncFile();
|
||||
if (result != osl_File_E_None)
|
||||
return (result);
|
||||
m_bufptr = -1, m_buflen = 0;
|
||||
|
||||
if (nBytesToWrite >= m_bufsiz)
|
||||
{
|
||||
@ -1009,7 +1011,7 @@ SAL_CALL osl_syncFile(oslFileHandle Handle)
|
||||
|
||||
FileHandle_Impl::Guard lock (&(pImpl->m_mutex));
|
||||
|
||||
OSL_FILE_TRACE("osl_syncFile(%d)", pImpl->m_fd);
|
||||
OSL_TRACE("osl_syncFile(%d)", pImpl->m_fd);
|
||||
oslFileError result = pImpl->syncFile();
|
||||
if (result != osl_File_E_None)
|
||||
return (result);
|
||||
|
@ -29,6 +29,7 @@
|
||||
|
||||
#include "osl/diagnose.h"
|
||||
#include "osl/thread.h"
|
||||
#include <osl/signal.h>
|
||||
#include "rtl/alloc.h"
|
||||
|
||||
#include "system.h"
|
||||
@ -48,6 +49,8 @@
|
||||
#include <sys/stat.h>
|
||||
#include <sys/mman.h>
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
/************************************************************************
|
||||
* ToDo
|
||||
*
|
||||
@ -1002,7 +1005,6 @@ static int oslDoCopyFile(const sal_Char* pszSourceFileName, const sal_Char* pszD
|
||||
int SourceFileFD=0;
|
||||
int DestFileFD=0;
|
||||
int nRet=0;
|
||||
void* pSourceFile=0;
|
||||
|
||||
SourceFileFD=open(pszSourceFileName,O_RDONLY);
|
||||
if ( SourceFileFD < 0 )
|
||||
@ -1011,15 +1013,6 @@ static int oslDoCopyFile(const sal_Char* pszSourceFileName, const sal_Char* pszD
|
||||
return nRet;
|
||||
}
|
||||
|
||||
DestFileFD=open(pszDestFileName, O_WRONLY | O_CREAT, mode);
|
||||
|
||||
if ( DestFileFD < 0 )
|
||||
{
|
||||
nRet=errno;
|
||||
close(SourceFileFD);
|
||||
return nRet;
|
||||
}
|
||||
|
||||
/* HACK: because memory mapping fails on various
|
||||
platforms if the size of the source file is 0 byte */
|
||||
if (0 == nSourceSize)
|
||||
@ -1029,56 +1022,79 @@ static int oslDoCopyFile(const sal_Char* pszSourceFileName, const sal_Char* pszD
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* FIXME doCopy: fall back code for systems not having mmap */
|
||||
/* mmap file -- open dest file -- write once -- fsync it */
|
||||
pSourceFile=mmap(0,nSourceSize,PROT_READ,MAP_PRIVATE,SourceFileFD,0);
|
||||
|
||||
if ( pSourceFile == MAP_FAILED )
|
||||
// read and lseek are used to check the possibility to access the data
|
||||
// not a nice solution, but it allows to avoid a crash in case it is an opened samba file
|
||||
// generally, reading of one byte should not affect the performance
|
||||
char nCh;
|
||||
if ( 1 != read( SourceFileFD, &nCh, 1 )
|
||||
|| -1 == lseek( SourceFileFD, 0, SEEK_SET ) )
|
||||
{
|
||||
/* it's important to set nRet before the hack
|
||||
otherwise errno may be changed by lstat */
|
||||
nRet = errno;
|
||||
close(SourceFileFD);
|
||||
close(DestFileFD);
|
||||
|
||||
(void) close( SourceFileFD );
|
||||
return nRet;
|
||||
}
|
||||
|
||||
nRet = write(DestFileFD,pSourceFile,nSourceSize);
|
||||
DestFileFD=open(pszDestFileName, O_WRONLY | O_CREAT, mode);
|
||||
|
||||
/* #112584# if 'write' could not write the requested number of bytes
|
||||
we have to fail of course; because it's not exactly specified if 'write'
|
||||
sets errno if less than requested byte could be written we set nRet
|
||||
explicitly to ENOSPC */
|
||||
if ((nRet < 0) || (nRet != sal::static_int_cast< int >(nSourceSize)))
|
||||
{
|
||||
if (nRet < 0)
|
||||
nRet = errno;
|
||||
else
|
||||
nRet = ENOSPC;
|
||||
|
||||
close(SourceFileFD);
|
||||
close(DestFileFD);
|
||||
munmap((char*)pSourceFile,nSourceSize);
|
||||
return nRet;
|
||||
}
|
||||
|
||||
nRet = munmap((char*)pSourceFile,nSourceSize);
|
||||
if ( nRet < 0 )
|
||||
if ( DestFileFD < 0 )
|
||||
{
|
||||
nRet=errno;
|
||||
close(SourceFileFD);
|
||||
close(DestFileFD);
|
||||
return nRet;
|
||||
}
|
||||
|
||||
close(SourceFileFD);
|
||||
size_t nWritten = 0;
|
||||
size_t nRemains = nSourceSize;
|
||||
|
||||
// Removed call to 'fsync' again (#112584#) and instead
|
||||
// evaluate the return value of 'close' in order to detect
|
||||
// and report ENOSPC and other erronous conditions on close
|
||||
if (close(DestFileFD) == -1)
|
||||
return errno;
|
||||
else
|
||||
return 0;
|
||||
/* mmap file -- open dest file -- write -- fsync it at the end */
|
||||
void* pSourceFile = mmap( 0, nSourceSize, PROT_READ, MAP_SHARED, SourceFileFD, 0 );
|
||||
if ( pSourceFile != MAP_FAILED )
|
||||
{
|
||||
nWritten = write( DestFileFD, pSourceFile, nSourceSize );
|
||||
nRemains -= nWritten;
|
||||
munmap( (char*)pSourceFile, nSourceSize );
|
||||
}
|
||||
|
||||
if ( nRemains )
|
||||
{
|
||||
/* mmap has problems, try the direct streaming */
|
||||
char pBuffer[32000];
|
||||
size_t nRead = 0;
|
||||
|
||||
nRemains = nSourceSize;
|
||||
|
||||
if ( -1 != lseek( SourceFileFD, 0, SEEK_SET )
|
||||
&& -1 != lseek( DestFileFD, 0, SEEK_SET ) )
|
||||
{
|
||||
do
|
||||
{
|
||||
nRead = 0;
|
||||
nWritten = 0;
|
||||
|
||||
size_t nToRead = std::min( (size_t)32000, nRemains );
|
||||
nRead = read( SourceFileFD, pBuffer, nToRead );
|
||||
if ( (size_t)-1 != nRead )
|
||||
nWritten = write( DestFileFD, pBuffer, nRead );
|
||||
|
||||
if ( (size_t)-1 != nWritten )
|
||||
nRemains -= nWritten;
|
||||
}
|
||||
while( nRemains && (size_t)-1 != nRead && nRead == nWritten );
|
||||
}
|
||||
}
|
||||
|
||||
if ( nRemains )
|
||||
{
|
||||
if ( errno )
|
||||
nRet = errno;
|
||||
else
|
||||
nRet = ENOSPC;
|
||||
}
|
||||
|
||||
close( SourceFileFD );
|
||||
if ( close( DestFileFD ) == -1 && nRet == 0 )
|
||||
nRet = errno;
|
||||
|
||||
return nRet;
|
||||
}
|
||||
|
||||
|
@ -76,16 +76,6 @@ static const sal_Char* MOUNTTAB="/etc/mtab";
|
||||
* This information is stored only in the kernel. */
|
||||
/* static const sal_Char* MOUNTTAB="/etc/mtab"; */
|
||||
|
||||
#elif defined(IRIX)
|
||||
|
||||
#include <mntent.h>
|
||||
#include <sys/mount.h>
|
||||
#include <sys/statvfs.h>
|
||||
#define HAVE_STATFS_H
|
||||
#include <sys/quota.h>
|
||||
//#include <ctype.h>
|
||||
static const sal_Char* MOUNTTAB="/etc/mtab";
|
||||
|
||||
#elif defined(MACOSX)
|
||||
|
||||
#include <ufs/ufs/quota.h>
|
||||
@ -140,12 +130,6 @@ static sal_Bool osl_isFloppyMounted(oslVolumeDeviceHandleImpl* pDevice);
|
||||
static sal_Bool osl_getFloppyMountEntry(const sal_Char* pszPath, oslVolumeDeviceHandleImpl* pItem);
|
||||
#endif /* LINUX */
|
||||
|
||||
|
||||
#if defined(IRIX)
|
||||
static sal_Bool osl_isFloppyMounted(oslVolumeDeviceHandleImpl* pDevice);
|
||||
static sal_Bool osl_getFloppyMountEntry(const sal_Char* pszPath, oslVolumeDeviceHandleImpl* pItem);
|
||||
#endif /* IRIX */
|
||||
|
||||
#ifdef DEBUG_OSL_FILE
|
||||
static void osl_printFloppyHandle(oslVolumeDeviceHandleImpl* hFloppy);
|
||||
#endif /* DEBUG_OSL_FILE */
|
||||
@ -220,7 +204,7 @@ oslFileError osl_getVolumeInformation( rtl_uString* ustrDirectoryURL, oslVolumeI
|
||||
# define __OSL_STATFS_IS_CASE_PRESERVING_FS(a) ((__OSL_MSDOS_SUPER_MAGIC != (a).f_type))
|
||||
#endif /* LINUX */
|
||||
|
||||
#if defined(SOLARIS) || defined(IRIX)
|
||||
#if defined(SOLARIS)
|
||||
# define __OSL_STATFS_STRUCT struct statvfs
|
||||
# define __OSL_STATFS(dir, sfs) statvfs((dir), (sfs))
|
||||
# define __OSL_STATFS_BLKSIZ(a) ((sal_uInt64)((a).f_frsize))
|
||||
@ -232,7 +216,7 @@ oslFileError osl_getVolumeInformation( rtl_uString* ustrDirectoryURL, oslVolumeI
|
||||
of the target platforms fix it!!!! */
|
||||
# define __OSL_STATFS_IS_CASE_SENSITIVE_FS(a) (1)
|
||||
# define __OSL_STATFS_IS_CASE_PRESERVING_FS(a) (1)
|
||||
#endif /* SOLARIS || IRIX*/
|
||||
#endif /* SOLARIS */
|
||||
|
||||
# define __OSL_STATFS_INIT(a) (memset(&(a), 0, sizeof(__OSL_STATFS_STRUCT)))
|
||||
|
||||
@ -1093,411 +1077,6 @@ osl_isFloppyMounted (oslVolumeDeviceHandleImpl* pDevice)
|
||||
}
|
||||
#endif /* LINUX */
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* IRIX FLOPPY FUNCTIONS
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
#if defined(IRIX)
|
||||
static oslVolumeDeviceHandle osl_isFloppyDrive(const sal_Char* pszPath)
|
||||
{
|
||||
oslVolumeDeviceHandleImpl* pItem = osl_newVolumeDeviceHandleImpl ();
|
||||
sal_Bool bRet = sal_False;
|
||||
|
||||
#ifdef TRACE_OSL_FILE
|
||||
fprintf(stderr,"In osl_isFloppyDrive\n");
|
||||
#endif
|
||||
|
||||
bRet=osl_getFloppyMountEntry(pszPath,pItem);
|
||||
|
||||
if ( bRet == sal_False )
|
||||
{
|
||||
#ifdef TRACE_OSL_FILE
|
||||
fprintf(stderr,"Out osl_isFloppyDrive [not a floppy]\n");
|
||||
#endif
|
||||
rtl_freeMemory(pItem);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
#ifdef DEBUG_OSL_FILE
|
||||
osl_printFloppyHandle(pItem);
|
||||
#endif
|
||||
#ifdef TRACE_OSL_FILE
|
||||
fprintf(stderr,"Out osl_isFloppyDrive [ok]\n");
|
||||
#endif
|
||||
|
||||
return (oslVolumeDeviceHandle) pItem;
|
||||
}
|
||||
|
||||
|
||||
static oslFileError osl_mountFloppy(oslVolumeDeviceHandle hFloppy)
|
||||
{
|
||||
sal_Bool bRet = sal_False;
|
||||
oslVolumeDeviceHandleImpl* pItem=0;
|
||||
int nRet;
|
||||
sal_Char pszCmd[PATH_MAX];
|
||||
sal_Char* pszMountProg = "mount";
|
||||
sal_Char* pszSuDo = 0;
|
||||
sal_Char* pszTmp = 0;
|
||||
|
||||
pszCmd[0] = '\0';
|
||||
|
||||
#ifdef TRACE_OSL_FILE
|
||||
fprintf(stderr,"In osl_mountFloppy\n");
|
||||
#endif
|
||||
|
||||
pItem = (oslVolumeDeviceHandleImpl*) hFloppy;
|
||||
|
||||
if ( pItem == 0 )
|
||||
{
|
||||
#ifdef TRACE_OSL_FILE
|
||||
fprintf(stderr,"Out osl_mountFloppy [pItem == 0]\n");
|
||||
#endif
|
||||
|
||||
return osl_File_E_INVAL;
|
||||
}
|
||||
|
||||
if ( pItem->ident[0] != 'O' || pItem->ident[1] != 'V' || pItem->ident[2] != 'D' || pItem->ident[3] != 'H' )
|
||||
{
|
||||
#ifdef TRACE_OSL_FILE
|
||||
fprintf(stderr,"Out osl_mountFloppy [invalid handle]\n");
|
||||
#endif
|
||||
return osl_File_E_INVAL;
|
||||
}
|
||||
|
||||
bRet = osl_isFloppyMounted(pItem);
|
||||
if ( bRet == sal_True )
|
||||
{
|
||||
#ifdef DEBUG_OSL_FILE
|
||||
fprintf(stderr,"detected mounted floppy at '%s'\n",pItem->pszMountPoint);
|
||||
#endif
|
||||
return osl_File_E_BUSY;
|
||||
}
|
||||
|
||||
/* mfe: we can't use the mount(2) system call!!! */
|
||||
/* even if we are root */
|
||||
/* since mtab is not updated!!! */
|
||||
/* but we need it to be updated */
|
||||
/* some "magic" must be done */
|
||||
|
||||
/* nRet = mount(pItem->pszDevice,pItem->pszMountPoint,0,0,0); */
|
||||
/* if ( nRet != 0 ) */
|
||||
/* { */
|
||||
/* nRet=errno; */
|
||||
/* #ifdef DEBUG_OSL_FILE */
|
||||
/* perror("mount"); */
|
||||
/* #endif */
|
||||
/* } */
|
||||
|
||||
pszTmp = getenv("SAL_MOUNT_MOUNTPROG");
|
||||
if ( pszTmp != 0 )
|
||||
{
|
||||
pszMountProg=pszTmp;
|
||||
}
|
||||
|
||||
pszTmp=getenv("SAL_MOUNT_SU_DO");
|
||||
if ( pszTmp != 0 )
|
||||
{
|
||||
pszSuDo=pszTmp;
|
||||
}
|
||||
|
||||
if ( pszSuDo != 0 )
|
||||
{
|
||||
snprintf(pszCmd, sizeof(pszCmd), "%s %s %s %s",pszSuDo,pszMountProg,pItem->pszDevice,pItem->pszMountPoint);
|
||||
}
|
||||
else
|
||||
{
|
||||
snprintf(pszCmd, sizeof(pszCmd), "%s %s",pszMountProg,pItem->pszMountPoint);
|
||||
}
|
||||
|
||||
|
||||
#ifdef DEBUG_OSL_FILE
|
||||
fprintf(stderr,"executing '%s'\n",pszCmd);
|
||||
#endif
|
||||
|
||||
nRet = system(pszCmd);
|
||||
|
||||
#ifdef DEBUG_OSL_FILE
|
||||
fprintf(stderr,"call returned '%i'\n",nRet);
|
||||
fprintf(stderr,"exit status is '%i'\n", WEXITSTATUS(nRet));
|
||||
#endif
|
||||
|
||||
|
||||
switch ( WEXITSTATUS(nRet) )
|
||||
{
|
||||
case 0:
|
||||
nRet=0;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
nRet=EPERM;
|
||||
break;
|
||||
|
||||
case 4:
|
||||
nRet=ENOENT;
|
||||
break;
|
||||
|
||||
case 8:
|
||||
nRet=EINTR;
|
||||
break;
|
||||
|
||||
case 16:
|
||||
nRet=EPERM;
|
||||
break;
|
||||
|
||||
case 32:
|
||||
nRet=EBUSY;
|
||||
break;
|
||||
|
||||
case 64:
|
||||
nRet=EAGAIN;
|
||||
break;
|
||||
|
||||
default:
|
||||
nRet=EBUSY;
|
||||
break;
|
||||
}
|
||||
|
||||
return ((0 == nRet) ? oslTranslateFileError(OSL_FET_SUCCESS, nRet) : oslTranslateFileError(OSL_FET_ERROR, nRet));
|
||||
}
|
||||
|
||||
static oslFileError osl_unmountFloppy(oslVolumeDeviceHandle hFloppy)
|
||||
{
|
||||
oslVolumeDeviceHandleImpl* pItem=0;
|
||||
int nRet=0;
|
||||
sal_Char pszCmd[PATH_MAX];
|
||||
sal_Char* pszTmp = 0;
|
||||
sal_Char* pszSuDo = 0;
|
||||
sal_Char* pszUmountProg = "umount";
|
||||
|
||||
pszCmd[0] = '\0';
|
||||
|
||||
#ifdef TRACE_OSL_FILE
|
||||
fprintf(stderr,"In osl_unmountFloppy\n");
|
||||
#endif
|
||||
|
||||
pItem = (oslVolumeDeviceHandleImpl*) hFloppy;
|
||||
|
||||
if ( pItem == 0 )
|
||||
{
|
||||
#ifdef TRACE_OSL_FILE
|
||||
fprintf(stderr,"Out osl_unmountFloppy [pItem==0]\n");
|
||||
#endif
|
||||
return osl_File_E_INVAL;
|
||||
}
|
||||
|
||||
if ( pItem->ident[0] != 'O' || pItem->ident[1] != 'V' || pItem->ident[2] != 'D' || pItem->ident[3] != 'H' )
|
||||
{
|
||||
#ifdef TRACE_OSL_FILE
|
||||
fprintf(stderr,"Out osl_unmountFloppy [invalid handle]\n");
|
||||
#endif
|
||||
return osl_File_E_INVAL;
|
||||
}
|
||||
|
||||
/* mfe: we can't use the umount(2) system call!!! */
|
||||
/* even if we are root */
|
||||
/* since mtab is not updated!!! */
|
||||
/* but we need it to be updated */
|
||||
/* some "magic" must be done */
|
||||
|
||||
/* nRet=umount(pItem->pszDevice); */
|
||||
/* if ( nRet != 0 ) */
|
||||
/* { */
|
||||
/* nRet = errno; */
|
||||
|
||||
/* #ifdef DEBUG_OSL_FILE */
|
||||
/* perror("mount"); */
|
||||
/* #endif */
|
||||
/* } */
|
||||
|
||||
|
||||
pszTmp = getenv("SAL_MOUNT_UMOUNTPROG");
|
||||
if ( pszTmp != 0 )
|
||||
{
|
||||
pszUmountProg=pszTmp;
|
||||
}
|
||||
|
||||
pszTmp = getenv("SAL_MOUNT_SU_DO");
|
||||
if ( pszTmp != 0 )
|
||||
{
|
||||
pszSuDo=pszTmp;
|
||||
}
|
||||
|
||||
if ( pszSuDo != 0 )
|
||||
{
|
||||
snprintf(pszCmd, sizeof(pszCmd), "%s %s %s",pszSuDo,pszUmountProg,pItem->pszMountPoint);
|
||||
}
|
||||
else
|
||||
{
|
||||
snprintf(pszCmd, sizeof(pszCmd), "%s %s",pszUmountProg,pItem->pszMountPoint);
|
||||
}
|
||||
|
||||
|
||||
#ifdef DEBUG_OSL_FILE
|
||||
fprintf(stderr,"executing '%s'\n",pszCmd);
|
||||
#endif
|
||||
|
||||
nRet = system(pszCmd);
|
||||
|
||||
#ifdef DEBUG_OSL_FILE
|
||||
fprintf(stderr,"call returned '%i'\n",nRet);
|
||||
fprintf(stderr,"exit status is '%i'\n", WEXITSTATUS(nRet));
|
||||
#endif
|
||||
|
||||
switch ( WEXITSTATUS(nRet) )
|
||||
{
|
||||
case 0:
|
||||
nRet=0;
|
||||
break;
|
||||
|
||||
default:
|
||||
nRet=EBUSY;
|
||||
break;
|
||||
}
|
||||
|
||||
#ifdef TRACE_OSL_FILE
|
||||
fprintf(stderr,"Out osl_unmountFloppy [ok]\n");
|
||||
#endif
|
||||
|
||||
return ((0 == nRet) ? oslTranslateFileError(OSL_FET_SUCCESS, nRet) : oslTranslateFileError(OSL_FET_ERROR, nRet));
|
||||
|
||||
/* return osl_File_E_None;*/
|
||||
}
|
||||
|
||||
static sal_Bool osl_getFloppyMountEntry(const sal_Char* pszPath, oslVolumeDeviceHandleImpl* pItem)
|
||||
{
|
||||
struct mntent* pMountEnt=0;
|
||||
sal_Char buffer[PATH_MAX];
|
||||
FILE* mntfile=0;
|
||||
int nRet=0;
|
||||
|
||||
buffer[0] = '\0';
|
||||
|
||||
mntfile = setmntent(MOUNTTAB,"r");
|
||||
|
||||
#ifdef TRACE_OSL_FILE
|
||||
fprintf(stderr,"In osl_getFloppyMountEntry\n");
|
||||
#endif
|
||||
|
||||
memset(buffer, 0, sizeof(buffer));
|
||||
strncpy(buffer, pszPath, sizeof(buffer) - 1);
|
||||
|
||||
#ifdef DEBUG_OSL_FILE
|
||||
fprintf(stderr,"Checking mount of %s\n",buffer);
|
||||
#endif
|
||||
|
||||
|
||||
if ( mntfile == 0 )
|
||||
{
|
||||
nRet=errno;
|
||||
#ifdef DEBUG_OSL_FILE
|
||||
perror("mounttab");
|
||||
#endif
|
||||
#ifdef TRACE_OSL_FILE
|
||||
fprintf(stderr,"Out osl_getFloppyMountEntry [mntfile]\n");
|
||||
#endif
|
||||
return sal_False;
|
||||
}
|
||||
|
||||
pMountEnt=getmntent(mntfile);
|
||||
while ( pMountEnt != 0 )
|
||||
{
|
||||
#ifdef DEBUG_OSL_FILE
|
||||
/* fprintf(stderr,"mnt_fsname : %s\n",pMountEnt->mnt_fsname); */
|
||||
/* fprintf(stderr,"mnt_dir : %s\n",pMountEnt->mnt_dir); */
|
||||
/* fprintf(stderr,"mnt_type : %s\n",pMountEnt->mnt_type);*/
|
||||
#endif
|
||||
if ( strcmp(pMountEnt->mnt_dir,buffer) == 0 &&
|
||||
strncmp(pMountEnt->mnt_fsname,"/dev/fd",strlen("/dev/fd")) == 0 )
|
||||
{
|
||||
|
||||
memset(pItem->pszMountPoint, 0, sizeof(pItem->pszMountPoint));
|
||||
strncpy(pItem->pszMountPoint, pMountEnt->mnt_dir, sizeof(pItem->pszMountPoint) - 1);
|
||||
|
||||
memset(pItem->pszFilePath, 0, sizeof(pItem->pszFilePath));
|
||||
strncpy(pItem->pszFilePath, pMountEnt->mnt_dir, sizeof(pItem->pszFilePath) - 1);
|
||||
|
||||
memset(pItem->pszDevice, 0, sizeof(pItem->pszDevice));
|
||||
strncpy(pItem->pszDevice, pMountEnt->mnt_fsname, sizeof(pItem->pszDevice) - 1);
|
||||
|
||||
fclose(mntfile);
|
||||
#ifdef DEBUG_OSL_FILE
|
||||
fprintf(stderr,"Mount Point found '%s'\n",pItem->pszMountPoint);
|
||||
#endif
|
||||
#ifdef TRACE_OSL_FILE
|
||||
fprintf(stderr,"Out osl_getFloppyMountEntry [found]\n");
|
||||
#endif
|
||||
return sal_True;
|
||||
}
|
||||
#ifdef DEBUG_OSL_FILE
|
||||
/* fprintf(stderr,"=================\n");*/
|
||||
#endif
|
||||
pMountEnt=getmntent(mntfile);
|
||||
}
|
||||
|
||||
#ifdef TRACE_OSL_FILE
|
||||
fprintf(stderr,"Out osl_getFloppyMountEntry [not found]\n");
|
||||
#endif
|
||||
|
||||
fclose(mntfile);
|
||||
return sal_False;
|
||||
}
|
||||
|
||||
static sal_Bool osl_isFloppyMounted(oslVolumeDeviceHandleImpl* pDevice)
|
||||
{
|
||||
sal_Char buffer[PATH_MAX];
|
||||
oslVolumeDeviceHandleImpl* pItem=0;
|
||||
sal_Bool bRet=0;
|
||||
|
||||
buffer[0] = '\0';
|
||||
|
||||
#ifdef TRACE_OSL_FILE
|
||||
fprintf(stderr,"In osl_isFloppyMounted\n");
|
||||
#endif
|
||||
|
||||
pItem = osl_newVolumeDeviceHandleImpl ();
|
||||
if ( pItem == 0 )
|
||||
return osl_File_E_NOMEM;
|
||||
|
||||
memset(buffer, 0, sizeof(buffer));
|
||||
strncpy(buffer, pDevice->pszMountPoint, sizeof(buffer) - 1);
|
||||
|
||||
#ifdef DEBUG_OSL_FILE
|
||||
fprintf(stderr,"Checking mount of %s\n",buffer);
|
||||
#endif
|
||||
|
||||
bRet = osl_getFloppyMountEntry(buffer,pItem);
|
||||
|
||||
if ( bRet == sal_False )
|
||||
{
|
||||
#ifdef TRACE_OSL_FILE
|
||||
fprintf(stderr,"Out osl_isFloppyMounted [not mounted]\n");
|
||||
#endif
|
||||
return sal_False;
|
||||
}
|
||||
|
||||
if (strcmp(pItem->pszMountPoint, pDevice->pszMountPoint) == 0 &&
|
||||
strcmp(pItem->pszDevice,pDevice->pszDevice) == 0)
|
||||
{
|
||||
#ifdef TRACE_OSL_FILE
|
||||
fprintf(stderr,"Out osl_isFloppyMounted [is mounted]\n");
|
||||
#endif
|
||||
rtl_freeMemory(pItem);
|
||||
return sal_True;
|
||||
}
|
||||
|
||||
#ifdef TRACE_OSL_FILE
|
||||
fprintf(stderr,"Out osl_isFloppyMounted [may be EBUSY]\n");
|
||||
#endif
|
||||
|
||||
rtl_freeMemory(pItem);
|
||||
return sal_False;
|
||||
}
|
||||
#endif /* IRIX */
|
||||
|
||||
|
||||
/* NetBSD floppy functions have to be added here. Until we have done that,
|
||||
* we use the MACOSX definitions for nonexistent floppy.
|
||||
* */
|
||||
|
@ -55,7 +55,8 @@ CXXFLAGS+= $(LFS_CFLAGS)
|
||||
|
||||
# --- Files --------------------------------------------------------
|
||||
|
||||
SLOFILES= $(SLO)$/conditn.obj \
|
||||
SLOFILES= \
|
||||
$(SLO)$/conditn.obj \
|
||||
$(SLO)$/diagnose.obj \
|
||||
$(SLO)$/semaphor.obj \
|
||||
$(SLO)$/socket.obj \
|
||||
@ -74,7 +75,7 @@ SLOFILES= $(SLO)$/conditn.obj \
|
||||
$(SLO)$/util.obj \
|
||||
$(SLO)$/tempfile.obj\
|
||||
$(SLO)$/file.obj \
|
||||
$(SLO)$/file_misc.obj \
|
||||
$(SLO)$/file_misc.obj\
|
||||
$(SLO)$/file_url.obj\
|
||||
$(SLO)$/file_error_transl.obj\
|
||||
$(SLO)$/file_path_helper.obj\
|
||||
@ -84,6 +85,7 @@ SLOFILES= $(SLO)$/conditn.obj \
|
||||
$(SLO)$/process_impl.obj\
|
||||
$(SLO)$/salinit.obj
|
||||
|
||||
|
||||
#.IF "$(UPDATER)"=="YES"
|
||||
OBJFILES= $(OBJ)$/conditn.obj \
|
||||
$(OBJ)$/diagnose.obj \
|
||||
@ -104,7 +106,7 @@ OBJFILES= $(OBJ)$/conditn.obj \
|
||||
$(OBJ)$/util.obj \
|
||||
$(OBJ)$/tempfile.obj\
|
||||
$(OBJ)$/file.obj \
|
||||
$(OBJ)$/file_misc.obj \
|
||||
$(OBJ)$/file_misc.obj\
|
||||
$(OBJ)$/file_url.obj\
|
||||
$(OBJ)$/file_error_transl.obj\
|
||||
$(OBJ)$/file_path_helper.obj\
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user