Automated merge with ssh://hg@hg.services.openoffice.org/cws/tabcontrol

This commit is contained in:
Ocke Janssen [oj] 2011-01-28 12:00:17 +01:00
commit 2d71fee9df
63 changed files with 1026 additions and 437 deletions

View File

@ -67,6 +67,7 @@ SHL1STDLIBS= \
SHL1VERSIONMAP=$(TARGET).map
SHL1CREATEJNILIB=TRUE
SHL1IMPLIB=i$(TARGET)
SHL1LIBS=$(SLB)$/$(TARGET).lib
SHL1DEF=$(MISC)$/$(SHL1TARGET).def

View File

@ -125,7 +125,7 @@ public:
@param len initial sequence length
*/
inline Sequence( sal_Int32 len );
inline explicit Sequence( sal_Int32 len );
/** Destructor: Releases sequence handle. Last handle will destruct
elements and free memory.

View File

@ -27,9 +27,7 @@
#ifndef _CPPUHELPER_FACTORY_HXX_
#define _CPPUHELPER_FACTORY_HXX_
#ifndef _RTL_STRING_HXX_
#include <rtl/ustring.hxx>
#endif
#include <uno/dispatcher.h>
#include <rtl/unload.h>
@ -54,7 +52,7 @@ typedef struct _uno_Environment uno_Environment;
compiled it. If the environment is NOT session specific (needs no additional context),
then this function should return the environment type name and leave ppEnv (to 0).
@paramppEnvTypeName environment type name; string must be constant
@param ppEnvTypeName environment type name; string must be constant
@param ppEnv function returns its environment if the environment is session specific,
i.e. has special context
*/

View File

@ -1,4 +1,4 @@
ch cppuhelper : BOOST:boost codemaker cppu offuh NULL
ch cppuhelper : BOOST:boost LIBXSLT:libxslt codemaker cppu offuh NULL
ch cppuhelper usr1 - all ch_mkout NULL
ch cppuhelper\inc nmake - all ch_include NULL
ch cppuhelper\source nmake - all ch_source ch_unotypes ch_include NULL

View File

@ -232,9 +232,17 @@ Reference< XInterface > OSingleFactoryHelper::createInstanceWithArgumentsAndCont
else
{
if ( rArguments.getLength() )
{
// dispose the here created UNO object before throwing out exception
// to avoid risk of memory leaks #i113722#
Reference<XComponent> xComp( xRet, UNO_QUERY );
if (xComp.is())
xComp->dispose();
throw lang::IllegalArgumentException(
OUString( RTL_CONSTASCII_USTRINGPARAM("cannot pass arguments to component => no XInitialization implemented!") ),
Reference< XInterface >(), 0 );
}
}
return xRet;

View File

@ -27,6 +27,11 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_cppuhelper.hxx"
#include "sal/config.h"
#include <vector>
#include <sal/alloca.h>
#include <osl/diagnose.h>
@ -45,7 +50,7 @@
#include <com/sun/star/reflection/XEnumTypeDescription.hpp>
#include <com/sun/star/reflection/XIndirectTypeDescription.hpp>
#include <com/sun/star/reflection/XInterfaceMemberTypeDescription.hpp>
#include <com/sun/star/reflection/XInterfaceAttributeTypeDescription.hpp>
#include <com/sun/star/reflection/XInterfaceAttributeTypeDescription2.hpp>
#include <com/sun/star/reflection/XMethodParameter.hpp>
#include <com/sun/star/reflection/XInterfaceMethodTypeDescription.hpp>
#include <com/sun/star/reflection/XInterfaceTypeDescription2.hpp>
@ -302,7 +307,7 @@ inline static typelib_TypeDescription * createCTD(
}
//==================================================================================================
inline static typelib_TypeDescription * createCTD(
const Reference< XInterfaceAttributeTypeDescription > & xAttribute )
const Reference< XInterfaceAttributeTypeDescription2 > & xAttribute )
{
typelib_TypeDescription * pRet = 0;
if (xAttribute.is())
@ -310,14 +315,31 @@ inline static typelib_TypeDescription * createCTD(
OUString aMemberName( xAttribute->getName() );
Reference< XTypeDescription > xType( xAttribute->getType() );
OUString aMemberTypeName( xType->getName() );
typelib_typedescription_newInterfaceAttribute(
std::vector< rtl_uString * > getExc;
Sequence< Reference< XCompoundTypeDescription > > getExcs(
xAttribute->getGetExceptions() );
for (sal_Int32 i = 0; i != getExcs.getLength(); ++i)
{
OSL_ASSERT( getExcs[i].is() );
getExc.push_back( getExcs[i]->getName().pData );
}
std::vector< rtl_uString * > setExc;
Sequence< Reference< XCompoundTypeDescription > > setExcs(
xAttribute->getSetExceptions() );
for (sal_Int32 i = 0; i != setExcs.getLength(); ++i)
{
OSL_ASSERT( setExcs[i].is() );
setExc.push_back( setExcs[i]->getName().pData );
}
typelib_typedescription_newExtendedInterfaceAttribute(
(typelib_InterfaceAttributeTypeDescription **)&pRet,
xAttribute->getPosition(),
aMemberName.pData, // name
(typelib_TypeClass)xType->getTypeClass(),
aMemberTypeName.pData, // type name
xAttribute->isReadOnly() );
xAttribute->isReadOnly(),
getExc.size(), getExc.empty() ? 0 : &getExc[0],
setExc.size(), setExc.empty() ? 0 : &setExc[0] );
}
return pRet;
}
@ -643,7 +665,7 @@ static typelib_TypeDescription * createCTD(
pRet = createCTD( Reference< XInterfaceMethodTypeDescription >::query( xType ) );
break;
case TypeClass_INTERFACE_ATTRIBUTE:
pRet = createCTD( Reference< XInterfaceAttributeTypeDescription >::query( xType ) );
pRet = createCTD( Reference< XInterfaceAttributeTypeDescription2 >::query( xType ) );
break;
default:
break;

View File

@ -1,4 +1,4 @@
io io : rdbmaker NULL
io io : LIBXSLT:libxslt rdbmaker NULL
io io usr1 - all io_mkout NULL
io io\inc nmake - all io_inc NULL
io io\source\acceptor nmake - all io_acceptor io_connector io_inc NULL

View File

@ -51,6 +51,30 @@ public class Factory
com.sun.star.lang.XSingleComponentFactory and
com.sun.star.lang.XServiceInfo
@param impl_class
implementation class
@param impl_name
implementation name
@param supported_services
services implemented
@return
object factory
@since UDK 3.2.13
*/
public static XSingleComponentFactory createComponentFactory(
Class impl_class, String impl_name, String supported_services [] )
throws com.sun.star.uno.RuntimeException
{
return new Factory( impl_class, impl_name, supported_services );
}
/** Creates an object factory supporting interfaces
com.sun.star.lang.XSingleComponentFactory and
com.sun.star.lang.XServiceInfo
The implementation name is the name of the implementation class.
@param impl_class
implementation class
@param supported_services
@ -62,7 +86,8 @@ public class Factory
Class impl_class, String supported_services [] )
throws com.sun.star.uno.RuntimeException
{
return new Factory( impl_class, supported_services );
return createComponentFactory(
impl_class, impl_class.getName(), supported_services );
}
/** Writes component's implementation info to given registry key.
@ -106,11 +131,10 @@ public class Factory
private java.lang.reflect.Method m_method;
private java.lang.reflect.Constructor m_ctor;
// ctor
private Factory( Class impl_class, String supported_services [] )
throws com.sun.star.uno.RuntimeException
private Factory(
Class impl_class, String impl_name, String supported_services [] )
{
m_impl_name = impl_class.getName();
m_impl_name = impl_name;
m_supported_services = supported_services;
m_impl_class = impl_class;
m_method = null;

View File

@ -1,4 +1,4 @@
jh javaunohelper : bridges cppuhelper jurt ridljar unoil NULL
jh javaunohelper : LIBXSLT:libxslt bridges cppuhelper jurt ridljar unoil NULL
jh javaunohelper usr1 - all jh_mkout NULL
jh javaunohelper\inc nmake - all jh_inc NULL
jh javaunohelper\com\sun\star\comp\helper nmake - all jh_helper jh_inc NULL

View File

@ -52,7 +52,7 @@ final class Cache {
if (e == null) {
if (map.size() < maxSize) {
// There is still room for a new entry at the front:
e = new Entry(content, map.size(), last, null);
e = new Entry(content, map.size(), null, first);
if (first == null) {
last = e;
} else {

View File

@ -17,3 +17,4 @@ ju jurt\com\sun\star\comp\urlresolver nmake - all ju_urlres ju_co_loader NULL
ju jurt\source\pipe nmake - all ju_src_pipe NULL
ju jurt\source\pipe\wrapper nmake - w ju_src_pipe_wrapper NULL
ju jurt\util nmake - all ju_ut ju_brid_jrm ju_co_bfactr ju_con ju_con_sock ju_con_pipe ju_cssl_uno ju_env_java ju_prot_urp ju_servman ju_urlres ju_src_pipe ju_libutil ju_uno NULL
ju jurt\test\com\sun\star\lib\uno\protocols\urp nmake - all ju_test_css_lib_uno_protocols_urp NULL

View File

@ -3,5 +3,6 @@
..\%__SRC%\bin\jpipx.dll %_DEST%\bin%_EXT%\jpipx.dll
..\%__SRC%\lib\libjpipe*.so %_DEST%\lib%_EXT%\libjpipe*.so
..\%__SRC%\lib\libjpipe*.dylib %_DEST%\lib%_EXT%\libjpipe*.dylib
..\%__SRC%\lib\libjpipe*.jnilib %_DEST%\lib%_EXT%\libjpipe*.jnilib
..\%__SRC%\bin\jurt_src.zip %COMMON_DEST%\bin%_EXT%\jurt_src.zip

View File

@ -41,6 +41,7 @@ SHL1TARGET = jpipe
.END
SHL1CODETYPE = C
SHL1CREATEJNILIB=TRUE
SHL1IMPLIB = i$(SHL1TARGET)
SHL1OBJS = $(SLO)/com_sun_star_lib_connections_pipe_PipeConnection.obj
SHL1RPATH = URELIB

View File

@ -27,80 +27,114 @@
package com.sun.star.lib.uno.protocols.urp;
import complexlib.ComplexTestCase;
import org.junit.Test;
import static org.junit.Assert.*;
public final class Cache_Test extends ComplexTestCase {
public String[] getTestMethodNames() {
return new String[] { "test0", "test1", "test2", "test3" };
}
public void test0() {
public final class Cache_Test {
@Test public void test0() {
Cache c = new Cache(0);
boolean[] f = new boolean[1];
int i;
i = c.add(f, "a");
assure("1", i == Cache.NOT_CACHED && !f[0]);
assertTrue(i == Cache.NOT_CACHED && !f[0]);
i = c.add(f, "a");
assure("2", i == Cache.NOT_CACHED && !f[0]);
assertTrue(i == Cache.NOT_CACHED && !f[0]);
i = c.add(f, "b");
assure("3", i == Cache.NOT_CACHED && !f[0]);
assertTrue(i == Cache.NOT_CACHED && !f[0]);
i = c.add(f, "a");
assure("4", i == Cache.NOT_CACHED && !f[0]);
assertTrue(i == Cache.NOT_CACHED && !f[0]);
}
public void test1() {
@Test public void test1() {
Cache c = new Cache(1);
boolean[] f = new boolean[1];
int i;
i = c.add(f, "a");
assure("1", i == 0 && !f[0]);
assertTrue(i == 0 && !f[0]);
i = c.add(f, "a");
assure("2", i == 0 && f[0]);
assertTrue(i == 0 && f[0]);
i = c.add(f, "b");
assure("3", i == 0 && !f[0]);
assertTrue(i == 0 && !f[0]);
i = c.add(f, "b");
assure("4", i == 0 && f[0]);
assertTrue(i == 0 && f[0]);
i = c.add(f, "a");
assure("5", i == 0 && !f[0]);
assertTrue(i == 0 && !f[0]);
}
public void test2() {
@Test public void test2() {
Cache c = new Cache(2);
boolean[] f = new boolean[1];
int i;
i = c.add(f, "a");
assure("1", i == 0 && !f[0]);
assertTrue(i == 0 && !f[0]);
i = c.add(f, "a");
assure("2", i == 0 && f[0]);
assertTrue(i == 0 && f[0]);
i = c.add(f, "b");
assure("3", i == 1 && !f[0]);
assertTrue(i == 1 && !f[0]);
i = c.add(f, "b");
assure("4", i == 1 && f[0]);
assertTrue(i == 1 && f[0]);
i = c.add(f, "a");
assure("5", i == 0 && f[0]);
assertTrue(i == 0 && f[0]);
i = c.add(f, "c");
assure("6", i == 1 && !f[0]);
assertTrue(i == 1 && !f[0]);
i = c.add(f, "b");
assure("7", i == 0 && !f[0]);
assertTrue(i == 0 && !f[0]);
}
public void test3() {
@Test public void test3() {
Cache c = new Cache(3);
boolean[] f = new boolean[1];
int i;
i = c.add(f, "a");
assure("1", i == 0 && !f[0]);
assertTrue(i == 0 && !f[0]);
i = c.add(f, "a");
assure("3", i == 0 && f[0]);
assertTrue(i == 0 && f[0]);
i = c.add(f, "b");
assure("5", i == 1 && !f[0]);
assertTrue(i == 1 && !f[0]);
i = c.add(f, "a");
assure("3", i == 0 && f[0]);
assertTrue(i == 0 && f[0]);
i = c.add(f, "c");
assure("7", i == 2 && !f[0]);
assertTrue(i == 2 && !f[0]);
i = c.add(f, "d");
assure("9", i == 1 && !f[0]);
assertTrue(i == 1 && !f[0]);
i = c.add(f, "d");
assure("11", i == 1 && f[0]);
assertTrue(i == 1 && f[0]);
}
@Test public void testNothingLostFromLruList() {
// Regardless in what order arbitrary values from 0, ..., 3 are inserted
// into a size-4 cache, afterwards adding -1, ..., -4 must return each
// possible index in the range from 0, ..., 3 exactly once (so their sum
// must be 6); this code systematically tests all such arbitrary ways up
// to length 8 (the code arguably violates recommendations for writing
// good tests, but actually helped track down an error in the Cache
// implementation):
int[] a = new int[8];
for (int i = 0; i < a.length; ++i) {
for (int j = 0; j < i; ++j) {
a[j] = 0;
}
for (;;) {
Cache c = new Cache(4);
for (int k = 0; k < i; ++k) {
c.add(new boolean[1], a[k]);
}
assertEquals(
6,
(c.add(new boolean[1], -1) + c.add(new boolean[1], -2) +
c.add(new boolean[1], -3) + c.add(new boolean[1], -4)));
int j = i - 1;
while (j >= 0 && a[j] == 3) {
--j;
}
if (j < 0) {
break;
}
++a[j];
for (int k = j + 1; k < i; ++k) {
a[k] = 0;
}
}
}
}
}

View File

@ -32,21 +32,14 @@ import com.sun.star.uno.IBridge;
import com.sun.star.uno.Type;
import com.sun.star.uno.TypeClass;
import com.sun.star.uno.XInterface;
import complexlib.ComplexTestCase;
import java.lang.reflect.Array;
import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
import org.junit.Test;
import static org.junit.Assert.*;
public final class Marshaling_Test extends ComplexTestCase {
public String getTestObjectName() {
return getClass().getName();
}
public String[] getTestMethodNames() {
return new String[] { "test" };
}
public void test() throws Exception {
public final class Marshaling_Test {
@Test public void test() throws Exception {
short cacheSize = (short)256;
TestBridge testBridge = new TestBridge();
Marshal marshal = new Marshal(testBridge, cacheSize);
@ -239,7 +232,7 @@ public final class Marshaling_Test extends ComplexTestCase {
if(op1 instanceof Any)
op1 = ((Any)op1).getObject();
assure("", compareObjects(op1, op2));
assertTrue(compareObjects(op1, op2));
}
}

View File

@ -34,20 +34,17 @@ import com.sun.star.uno.Any;
import com.sun.star.uno.IBridge;
import com.sun.star.uno.Type;
import com.sun.star.uno.XInterface;
import complexlib.ComplexTestCase;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PipedInputStream;
import java.io.PipedOutputStream;
import java.util.LinkedList;
import org.junit.Test;
import static org.junit.Assert.*;
public final class Protocol_Test extends ComplexTestCase {
public String[] getTestMethodNames() {
return new String[] { "test" };
}
public void test() throws Exception {
public final class Protocol_Test {
@Test public void test() throws Exception {
IBridge iBridge = new TestBridge();
PipedInputStream inA = new PipedInputStream();
PipedOutputStream outA = new PipedOutputStream(inA);
@ -93,7 +90,7 @@ public final class Protocol_Test extends ComplexTestCase {
new Object[] { "hallo" });
Message iMessage = iReceiver.readMessage();
Object[] t_params = iMessage.getArguments();
assure("", "hallo".equals((String)t_params[0]));
assertEquals("hallo", (String)t_params[0]);
// send a reply
iReceiver.writeReply(false, new ThreadId(new byte[] { 0, 1 }), null);
@ -118,7 +115,7 @@ public final class Protocol_Test extends ComplexTestCase {
iReceiver.writeReply(false, new ThreadId(new byte[] { 0, 1 }), null);
iSender.readMessage();
assure("", "testString".equals(((String [])params[0])[0]));
assertEquals("testString", ((String [])params[0])[0]);
}
public void testCallWithInOutParameter(
@ -133,7 +130,7 @@ public final class Protocol_Test extends ComplexTestCase {
Object[] t_params = iMessage.getArguments();
assure("", "inString".equals(((String [])t_params[0])[0]));
assertEquals("inString", ((String [])t_params[0])[0]);
// provide reply
((String [])t_params[0])[0] = "outString";
@ -142,7 +139,7 @@ public final class Protocol_Test extends ComplexTestCase {
iReceiver.writeReply(false, new ThreadId(new byte[] { 0, 1 }), null);
iSender.readMessage();
assure("", "outString".equals(((String [])params[0])[0]));
assertEquals("outString", ((String [])params[0])[0]);
}
public void testCallWithResult(
@ -161,7 +158,7 @@ public final class Protocol_Test extends ComplexTestCase {
Message iMessage = iSender.readMessage();
Object result = iMessage.getResult();
assure("", "resultString".equals(result));
assertEquals("resultString", result);
}
public void testCallWhichRaisesException(
@ -181,7 +178,7 @@ public final class Protocol_Test extends ComplexTestCase {
Object result = iMessage.getResult();
assure("", result instanceof com.sun.star.uno.RuntimeException);
assertTrue(result instanceof com.sun.star.uno.RuntimeException);
}
public void testCallWithIn_Out_InOut_Paramters_and_result(
@ -196,9 +193,9 @@ public final class Protocol_Test extends ComplexTestCase {
Object[] t_params = iMessage.getArguments();
assure("", "hallo".equals((String)t_params[0]));
assertEquals("hallo", (String)t_params[0]);
assure("", "inOutString".equals(((String [])t_params[2])[0]));
assertEquals("inOutString", ((String [])t_params[2])[0]);
((String [])t_params[1])[0] = "outString";
((String [])t_params[2])[0] = "inOutString_res";
@ -209,11 +206,11 @@ public final class Protocol_Test extends ComplexTestCase {
iMessage = iSender.readMessage();
Object result = iMessage.getResult();
assure("", "outString".equals(((String [])params[1])[0]));
assertEquals("outString", ((String [])params[1])[0]);
assure("", "inOutString_res".equals(((String [])params[2])[0]));
assertEquals("inOutString_res", ((String [])params[2])[0]);
assure("", "resultString".equals(result));
assertEquals("resultString", result);
}
public void testCallWhichReturnsAny(
@ -229,9 +226,11 @@ public final class Protocol_Test extends ComplexTestCase {
false, new ThreadId(new byte[] { 0, 1 }), Any.VOID);
Message iMessage = iSender.readMessage();
Object result = iMessage.getResult();
assure("", result instanceof Any
&& (TypeDescription.getTypeDescription(((Any) result).getType()).
getZClass() == void.class));
assertTrue(
result instanceof Any &&
((TypeDescription.getTypeDescription(((Any) result).getType()).
getZClass()) ==
void.class));
// send an ordinary request
iSender.writeRequest(
@ -244,7 +243,7 @@ public final class Protocol_Test extends ComplexTestCase {
new Any(XInterface.class, null));
iMessage = iSender.readMessage();
result = iMessage.getResult();
assure("", result == null);
assertNull(result);
// send an ordinary request
iSender.writeRequest(
@ -256,7 +255,7 @@ public final class Protocol_Test extends ComplexTestCase {
false, new ThreadId(new byte[] { 0, 1 }), new Integer(501));
iMessage = iSender.readMessage();
result = iMessage.getResult();
assure("", result.equals(new Integer(501)));
assertEquals(501, result);
}
private static final class Endpoint {

View File

@ -24,10 +24,16 @@
# for a copy of the LGPLv3 License.
#
#*************************************************************************
.IF "$(OOO_SUBSEQUENT_TESTS)" == ""
nothing .PHONY:
.ELSE
PRJ := ..$/..$/..$/..$/..$/..$/..$/..
PRJNAME := jurt
TARGET := test_com_sun_star_lib_uno_protocols_urp
.IF "$(OOO_JUNIT_JAR)" != ""
PACKAGE := com$/sun$/star$/lib$/uno$/protocols$/urp
JAVATESTFILES := \
Cache_Test.java \
@ -38,5 +44,8 @@ JAVAFILES := \
TestObject.java
JARFILES := ridl.jar
IDLTESTFILES := interfaces.idl
.END
.INCLUDE: javaunittest.mk
.END

View File

@ -51,16 +51,16 @@ using namespace osl;
namespace jfw
{
rtl::OString getElementUpdated()
rtl::OString getElement(::rtl::OString const & docPath,
xmlChar const * pathExpression, bool bThrowIfEmpty)
{
//Prepare the xml document and context
rtl::OString sSettingsPath = jfw::getVendorSettingsPath();
OSL_ASSERT(sSettingsPath.getLength() > 0);
jfw::CXmlDocPtr doc(xmlParseFile(sSettingsPath.getStr()));
OSL_ASSERT(docPath.getLength() > 0);
jfw::CXmlDocPtr doc(xmlParseFile(docPath.getStr()));
if (doc == NULL)
throw FrameworkException(
JFW_E_ERROR,
rtl::OString("[Java framework] Error in function getElementUpdated "
rtl::OString("[Java framework] Error in function getElement "
"(elements.cxx)"));
jfw::CXPathContextPtr context(xmlXPathNewContext(doc));
@ -68,20 +68,42 @@ rtl::OString getElementUpdated()
(xmlChar*) NS_JAVA_FRAMEWORK) == -1)
throw FrameworkException(
JFW_E_ERROR,
rtl::OString("[Java framework] Error in function getElementUpdated "
rtl::OString("[Java framework] Error in function getElement "
"(elements.cxx)"));
CXPathObjectPtr pathObj;
pathObj = xmlXPathEvalExpression(
(xmlChar*)"/jf:javaSelection/jf:updated/text()", context);
pathObj = xmlXPathEvalExpression(pathExpression, context);
rtl::OString sValue;
if (xmlXPathNodeSetIsEmpty(pathObj->nodesetval))
throw FrameworkException(
JFW_E_ERROR,
rtl::OString("[Java framework] Error in function getElementUpdated "
"(elements.cxx)"));
rtl::OString sValue = (sal_Char*) pathObj->nodesetval->nodeTab[0]->content;
{
if (bThrowIfEmpty)
throw FrameworkException(
JFW_E_ERROR,
rtl::OString("[Java framework] Error in function getElement "
"(elements.cxx)"));
}
else
{
sValue = (sal_Char*) pathObj->nodesetval->nodeTab[0]->content;
}
return sValue;
}
rtl::OString getElementUpdated()
{
return getElement(jfw::getVendorSettingsPath(),
(xmlChar*)"/jf:javaSelection/jf:updated/text()", true);
}
// Use only in INSTALL mode !!!
rtl::OString getElementModified()
{
//The modified element is only written in INSTALL mode.
//That is NodeJava::m_layer = INSTALL
return getElement(jfw::getInstallSettingsPath(),
(xmlChar*)"/jf:java/jf:modified/text()", false);
}
void createSettingsStructure(xmlDoc * document, bool * bNeedsSave)
{
@ -579,6 +601,21 @@ void NodeJava::write() const
xmlAddChild(jreLocationsNode, nodeCrLf);
}
}
if (INSTALL == m_layer)
{
//now write the current system time
::TimeValue curTime = {0,0};
if (::osl_getSystemTime(& curTime))
{
rtl::OUString sSeconds =
rtl::OUString::valueOf((sal_Int64) curTime.Seconds);
xmlNewTextChild(
root,NULL, (xmlChar*) "modified", CXmlCharPtr(sSeconds));
xmlNode * nodeCrLf = xmlNewText((xmlChar*) "\n");
xmlAddChild(root, nodeCrLf);
}
}
if (xmlSaveFormatFile(sSettingsPath.getStr(), docUser, 1) == -1)
throw FrameworkException(JFW_E_ERROR, sExcMsg);
}
@ -721,7 +758,7 @@ jfw::FileStatus NodeJava::checkSettingsFileStatus() const
File::RC rc_stat = item.getFileStatus(stat);
if (File::E_None == rc_stat)
{
//ToDo we remove the file and create it shortly after. This
// This
//function may be called multiple times when a java is started.
//If the expiretime is too small then we may loop because everytime
//the file is deleted and we need to search for a java again.
@ -732,20 +769,27 @@ jfw::FileStatus NodeJava::checkSettingsFileStatus() const
//that after removing the file and shortly later creating it again
//did not change the creation time. That is the newly created file
//had the creation time of the former file.
// ::TimeValue time = stat.getCreationTime();
::TimeValue modTime = stat.getModifyTime();
// ::TimeValue modTime = stat.getModifyTime();
::TimeValue curTime = {0,0};
ret = FILE_OK;
if (sal_True == ::osl_getSystemTime(& curTime))
{
if ( curTime.Seconds - modTime.Seconds >
//get the modified time recorded in the <modified> element
sal_uInt32 modified = getModifiedTime();
OSL_ASSERT(modified <= curTime.Seconds);
//Only if modified has a valued then NodeJava::write was called,
//then the xml structure was filled with data.
if ( modified && curTime.Seconds - modified >
BootParams::getInstallDataExpiration())
{
#if OSL_DEBUG_LEVEL >=2
fprintf(stderr, "[Java framework] Settings file is %d seconds old. \n",
(int)( curTime.Seconds - modified));
rtl::OString s = rtl::OUStringToOString(sURL, osl_getThreadTextEncoding());
fprintf(stderr, "[Java framework] Deleting settings file at \n%s\n", s.getStr());
fprintf(stderr, "[Java framework] Settings file is exspired. Deleting settings file at \n%s\n", s.getStr());
#endif
//delete file
// File::RC rc_rem = File::remove(sURL);
File f(sURL);
if (File::E_None == f.open(OpenFlag_Write | OpenFlag_Read)
&& File::E_None == f.setPos(0, 0)
@ -1093,6 +1137,17 @@ JavaInfo * CNodeJavaInfo::makeJavaInfo() const
return pInfo;
}
sal_uInt32 NodeJava::getModifiedTime() const
{
sal_uInt32 ret = 0;
if (m_layer != INSTALL)
{
OSL_ASSERT(0);
return ret;
}
rtl::OString modTimeSeconds = getElementModified();
return (sal_uInt32) modTimeSeconds.toInt64();
}
//================================================================================
MergedSettings::MergedSettings():

View File

@ -195,6 +195,34 @@ private:
*/
boost::optional< ::std::vector< ::rtl::OUString> > m_JRELocations;
/** Only in INSTALL mode. Then NodeJava.write writes a <modified> element
which contains the seconds value of the TimeValue (osl/time.h), obtained
with osl_getSystemTime.
It returns 0 if the value cannot be obtained.
This is used to fix the problem that the modified time of the settings
file is incorrect because it resides on an NFS volume where the NFS
server and NFS client do not have the same system time. For example if
the server time is ahead of the client time then checkSettingsFileStatus
deleted the settings. So even if javaldx determined a Java
(jfw_findAndSelectJRE) then jfw_startVM returned a JFW_E_NO_SELECT. Then
it looked again for a java by calling jfw_findAndSelectJRE, which
returned a JFW_E_NONE. But the following jfw_startVM returned again
JFW_E_NO_SELECT. So it looped. (see issue i114509)
NFS server and NFS client should have the same time. It is common
practise to enforce this in networks. We actually should not work
around a malconfigured network. We must however, make sure that we do
not loop. Maybe a better approach is, that:
- assume that mtime and system time are reliable
- checkSettingsFile uses system time and mtime of the settings file,
instset of using getModifiedTime.
- allow a small error margin
- jfw_startVM must return a JFW_E_EXPIRED_SETTINGS
- XJavaVM::startVM should prevent the loop by processing the new return+ value
*/
sal_uInt32 getModifiedTime() const;
public:
NodeJava(Layer theLayer = USER_OR_INSTALL);

View File

@ -80,7 +80,7 @@ service UnoControlGridModel
<p>You can implement your own instance of <type>XGridDataModel</type> or use
the <type>DefaultGridDataModel</type>.
*/
[property] XGridDataModel DataModel;
[property] XGridDataModel GridDataModel;
/** Specifies the vertical scrollbar mode.
<p>The default value is <FALSE/></p>

View File

@ -281,6 +281,8 @@ interface XExtensionManager
Added extensions will be added to the database and removed extensions
will be removed from the database.
The active extensions are determined. That is, shared or bundled extensions
are not necessaryly registered (<member>XPackage::registerPackage</member>).
@return
If true - then at least one extension was removed or added. Otherwise
@ -295,6 +297,25 @@ interface XExtensionManager
com::sun::star::lang::IllegalArgumentException);
/** synchronizes the special bundled_prereg repository, which is based on
the bundled extensions and has its registration data folder at
$BUNDLED_EXTENSIONS_PREREG (for example openoffice.org3/share/prereg).
All bundled extensions are registered (<member>XPackage::registerPackage</member>).
The active extensions are NOT determined, because this function only works
with bundled extensions.
This function is intended to be called during the installation of OOo.
OOo will copy parts of the registration data folder to the user installation at the
first startup.
*/
void synchronizeBundledPrereg(
[in] com::sun::star::task::XAbortChannel xAbortChannel,
[in] com::sun::star::ucb::XCommandEnvironment xCmdEnv )
raises (DeploymentException);
/** returns all extensions which are currently not in use
because the user did not accept the license.

8
offapi/com/sun/star/deployment/XPackage.idl Normal file → Executable file
View File

@ -262,6 +262,14 @@ interface XPackage
string getDescription()
raises (ExtensionRemovedException);
/** returns a string containing the license text.
@return
license
*/
string getLicenseText()
raises (ExtensionRemovedException);
/** returns a sequence of update information URLs.
The sequence may be empty in case no update information is available.

View File

@ -115,6 +115,13 @@ interface XPackageRegistry
supported <type>XPackageTypeInfo</type>s.
*/
sequence<XPackageTypeInfo> getSupportedPackageTypes();
void packageRemoved(
[in] string url,
[in] string mediaType)
raises (DeploymentException,
com::sun::star::lang::IllegalArgumentException);
};
}; }; }; };

View File

@ -148,7 +148,7 @@ published service MediaDescriptor
<p>
For extensibility, it is recommended to use values of type
sequence<com.sun.star.beans.PropertyValue> with this property.
sequence<com.sun.star.beans.NamedValue> with this property.
</p>
*/
[optional,property] any ComponentData;

View File

@ -1,35 +1,27 @@
/*************************************************************************
*
* OpenOffice.org - a multi-platform office productivity suite
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* $RCSfile: ModuleInfo.idl,v $
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* $Revision: 1.2 $
* OpenOffice.org - a multi-platform office productivity suite
*
* last change: $Author: rt $ $Date: 2006/05/05 10:14:46 $
* This file is part of OpenOffice.org.
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
* 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).
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2005 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library 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 for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
* 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.
*
************************************************************************/

View File

@ -1,35 +1,27 @@
/*************************************************************************
*
* OpenOffice.org - a multi-platform office productivity suite
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* $RCSfile: ModuleType.idl,v $
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* $Revision: 1.2 $
* OpenOffice.org - a multi-platform office productivity suite
*
* last change: $Author: rt $ $Date: 2006/05/05 10:14:46 $
* This file is part of OpenOffice.org.
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
* 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).
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2005 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library 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 for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
* 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.
*
************************************************************************/

View File

@ -0,0 +1,42 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#ifndef __com_sun_star_script_NativeObjectWrapper_idl__
#define __com_sun_star_script_NativeObjectWrapper_idl__
//=============================================================================
module com { module sun { module star { module script {
struct NativeObjectWrapper
{
any ObjectId;
};
//=============================================================================
}; }; }; };
#endif

View File

@ -50,7 +50,8 @@ IDLFILES=\
XStorageBasedLibraryContainer.idl\
ModuleSizeExceededRequest.idl\
ModuleInfo.idl\
ModuleType.idl
ModuleType.idl\
NativeObjectWrapper.idl
# ------------------------------------------------------------------

View File

@ -0,0 +1,49 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#ifndef __com_sun_star_script_vba_VBAMacroResolver_idl__
#define __com_sun_star_script_vba_VBAMacroResolver_idl__
#include <com/sun/star/script/vba/XVBAMacroResolver.idl>
//=============================================================================
module com { module sun { module star { module script { module vba {
//=============================================================================
service VBAMacroResolver : XVBAMacroResolver
{
};
//=============================================================================
}; }; }; }; };
//=============================================================================
#endif

View File

@ -0,0 +1,94 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#ifndef __com_sun_star_script_vba_XVBAMacroResolver_idl__
#define __com_sun_star_script_vba_XVBAMacroResolver_idl__
#include <com/sun/star/lang/IllegalArgumentException.idl>
//=============================================================================
module com { module sun { module star { module script { module vba {
//=============================================================================
/** Converts VBA macro names to script URLs and vice versa.
*/
interface XVBAMacroResolver
{
//-------------------------------------------------------------------------
/** Returns the script URL representing the passed VBA macro name.
@param aVBAMacroName
The VBA macro name to be resolved to a script URL. The macro name
may consist of up to three parts, divided by periods. The first two
parts are optional. The first part represents the VBA project name.
The second part represents the module name. The third part
represents the procedure name. Example: All the VBA macro names
"VBAProject.Module1.TestMacro", "Module1.TestMacro",
"VBAProject.TestMacro", and "TestMacro" may refer to the same VBA
procedure located in "Module" of the project "VBAProject". If the
module name is missing, then all modules are searched for a macro
with the specified name.
@return
The script URL referring to the passed VBA macro.
@throws <type scope="::com::sun::star::lang">IllegalArgumentException</type>
if a macro with the passed name does not exist.
**/
string resolveVBAMacroToScriptURL( [in] string aVBAMacroName )
raises (::com::sun::star::lang::IllegalArgumentException);
//-------------------------------------------------------------------------
/** Returns the VBA macro name for a macro with the passed script URL.
@param aScriptURL
The script URL to be resolved to a VBA macro name. Must be a
document-local script.
@return
The VBA macro name referring to a macro with the passed script URL.
@throws <type scope="::com::sun::star::lang">IllegalArgumentException</type>
if a macro with the passed name does not exist.
**/
string resolveScriptURLtoVBAMacro( [in] string aScriptURL )
raises (::com::sun::star::lang::IllegalArgumentException);
//-------------------------------------------------------------------------
};
//=============================================================================
}; }; }; }; };
//=============================================================================
#endif

View File

@ -40,10 +40,12 @@ PACKAGE=com$/sun$/star$/script$/vba
IDLFILES=\
VBAEventId.idl \
VBAEventProcessor.idl \
VBAMacroResolver.idl \
VBASpreadsheetEventProcessor.idl \
VBATextEventProcessor.idl \
XVBACompatibility.idl \
XVBAEventProcessor.idl \
XVBAMacroResolver.idl \
XVBAModuleInfo.idl
# ------------------------------------------------------------------

View File

@ -56,7 +56,7 @@ constants FormulaMapGroupSpecialOffset
constants.</li>
<li>A <atom>string</atom> for literal text.</li>
<li>A <atom dim="[][]">any</atom> for a literal array. The contained
values shall be of type <atom>double</atom> or atom>string</atom>.
values shall be of type <atom>double</atom> or <atom>string</atom>.
Floating-point values and strings may occur together in an array.</li>
<li>A struct of type <type>SingleReference</type> for a reference to a
single cell in the own document.</li>
@ -142,7 +142,7 @@ constants FormulaMapGroupSpecialOffset
able to parse.
<p>The <member>FormulaToken::Data</member> member shall contain a
<atom>string</string> with the bad data. This string will be displayed
<atom>string</atom> with the bad data. This string will be displayed
literally in the formula.</p>
*/
const long BAD = 7;

View File

@ -28,21 +28,11 @@
#ifndef __com_sun_star_sheet_SheetFilterDescriptor_idl__
#define __com_sun_star_sheet_SheetFilterDescriptor_idl__
#ifndef __com_sun_star_sheet_XSheetFilterDescriptor_idl__
#include <com/sun/star/sheet/XSheetFilterDescriptor.idl>
#endif
#ifndef __com_sun_star_beans_XPropertySet_idl__
#include <com/sun/star/sheet/XSheetFilterDescriptor2.idl>
#include <com/sun/star/beans/XPropertySet.idl>
#endif
#ifndef __com_sun_star_table_TableOrientation_idl__
#include <com/sun/star/table/TableOrientation.idl>
#endif
#ifndef __com_sun_star_table_CellAddress_idl__
#include <com/sun/star/table/CellAddress.idl>
#endif
//=============================================================================
@ -62,7 +52,20 @@ published service SheetFilterDescriptor
/** provides access to the collection of filter fields.
*/
interface com::sun::star::sheet::XSheetFilterDescriptor;
interface XSheetFilterDescriptor;
//-------------------------------------------------------------------------
/** provides access to the collection of filter fields.
<p>This interface provides a sequence of <type>TableFilterField2</type>
structures supporting a wider range of comparison operators, compared
to the <type>TableFilterField</type> structure provided by interface
<type>XSheetFilterDescriptor</type>.
@since OOo 3.2
*/
[optional] interface XSheetFilterDescriptor2;
//-------------------------------------------------------------------------

View File

@ -0,0 +1,61 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#ifndef __com_sun_star_sheet_SpreadsheetViewObjectsMode_idl__
#define __com_sun_star_sheet_SpreadsheetViewObjectsMode_idl__
//=============================================================================
module com { module sun { module star { module sheet {
//=============================================================================
/** Constants that control how embedded objects are shown in the view.
*/
published constants SpreadsheetViewObjectsMode
{
//-------------------------------------------------------------------------
/** Specifies to display a specific set of objects in the spreadsheet view.
*/
const short SHOW = 0;
//-------------------------------------------------------------------------
/** Specifies to hide a specific set of objects from the spreadsheet view.
*/
const short HIDE = 1;
//-------------------------------------------------------------------------
};
//=============================================================================
}; }; }; };
#endif

View File

@ -149,18 +149,24 @@ published service SpreadsheetViewSettings
//-------------------------------------------------------------------------
/** enables display of embedded objects in the view.
@see SpreadsheetViewObjectsMode
*/
[property] short ShowObjects;
//-------------------------------------------------------------------------
/** enables the display of charts in the view.
@see SpreadsheetViewObjectsMode
*/
[property] short ShowCharts;
//-------------------------------------------------------------------------
/** enables the display of drawing objects in the view.
@see SpreadsheetViewObjectsMode
*/
[property] short ShowDrawing;
@ -175,14 +181,14 @@ published service SpreadsheetViewSettings
@see com::sun::star::view::DocumentZoomType
*/
[property] short ZoomType;
[property] short ZoomType;
//-------------------------------------------------------------------------
/** Defines the zoom value to use.
Valid only if the ZoomType is set to
<member scope="com::sun::star::view::DocumentZoomType">BY_VALUE</member>.
*/
[property] short ZoomValue;
[property] short ZoomValue;
};
//=============================================================================

View File

@ -28,13 +28,8 @@
#ifndef __com_sun_star_sheet_TableFilterField_idl__
#define __com_sun_star_sheet_TableFilterField_idl__
#ifndef __com_sun_star_sheet_FilterConnection_idl__
#include <com/sun/star/sheet/FilterConnection.idl>
#endif
#ifndef __com_sun_star_sheet_FilterOperator_idl__
#include <com/sun/star/sheet/FilterOperator.idl>
#endif
//=============================================================================
@ -44,7 +39,7 @@ module com { module sun { module star { module sheet {
/** describes a single condition in a filter descriptor.
@see com::sun::star::sheet::SheetFilterDescriptor
@see SheetFilterDescriptor
*/
published struct TableFilterField
{
@ -52,7 +47,7 @@ published struct TableFilterField
/** specifies how the condition is connected to the previous condition.
*/
com::sun::star::sheet::FilterConnection Connection;
FilterConnection Connection;
//-------------------------------------------------------------------------
@ -64,7 +59,7 @@ published struct TableFilterField
/** specifies the type of the condition.
*/
com::sun::star::sheet::FilterOperator Operator;
FilterOperator Operator;
//-------------------------------------------------------------------------

View File

@ -28,14 +28,8 @@
#ifndef __com_sun_star_sheet_TableFilterField2_idl__
#define __com_sun_star_sheet_TableFilterField2_idl__
#ifndef __com_sun_star_sheet_FilterConnection_idl__
#include <com/sun/star/sheet/FilterConnection.idl>
#endif
#ifndef __com_sun_star_sheet_FilterOperator2_idl__
#include <com/sun/star/sheet/FilterOperator2.idl>
#endif
//=============================================================================
@ -49,7 +43,7 @@ module com { module sun { module star { module sheet {
member, whereas the <type>TableFilterField</type> struct uses the
<type>FilterOperator</type> enum.</p>
@see com::sun::star::sheet::SheetFilterDescriptor
@see SheetFilterDescriptor
@since OOo 3.2
*/
published struct TableFilterField2
@ -58,7 +52,7 @@ published struct TableFilterField2
/** specifies how the condition is connected to the previous condition.
*/
com::sun::star::sheet::FilterConnection Connection;
FilterConnection Connection;
//-------------------------------------------------------------------------
@ -69,7 +63,7 @@ published struct TableFilterField2
//-------------------------------------------------------------------------
/** specifies the type of the condition as defined in
<type>FilterOperator2</type>.
<type>FilterOperator2</type>.
*/
long Operator;

View File

@ -77,7 +77,7 @@ published interface XDatabaseRange: com::sun::star::uno::XInterface
/** returns the sort descriptor stored with the database range.
@see com::sun::star::sheet::SheetSortDescriptor2
@see SheetSortDescriptor2
*/
sequence< com::sun::star::beans::PropertyValue > getSortDescriptor();
@ -88,8 +88,10 @@ published interface XDatabaseRange: com::sun::star::uno::XInterface
<p>If the filter descriptor is modified, the new filtering is
carried out when <member>XDatabaseRange::refresh()</member> is
called.</p>
@see SheetFilterDescriptor
*/
com::sun::star::sheet::XSheetFilterDescriptor getFilterDescriptor();
XSheetFilterDescriptor getFilterDescriptor();
//-------------------------------------------------------------------------
@ -98,15 +100,17 @@ published interface XDatabaseRange: com::sun::star::uno::XInterface
<p>If the subtotal descriptor is modified, the new subtotals are
inserted when <member>XDatabaseRange::refresh()</member> is
called.</p>
@see SubTotalDescriptor
*/
com::sun::star::sheet::XSubTotalDescriptor getSubTotalDescriptor();
XSubTotalDescriptor getSubTotalDescriptor();
//-------------------------------------------------------------------------
/** returns the database import descriptor stored with this database
range.
@see com::sun::star::sheet::DatabaseImportDescriptor
@see DatabaseImportDescriptor
*/
sequence< com::sun::star::beans::PropertyValue > getImportDescriptor();

View File

@ -28,13 +28,8 @@
#ifndef __com_sun_star_sheet_XSheetFilterDescriptor_idl__
#define __com_sun_star_sheet_XSheetFilterDescriptor_idl__
#ifndef __com_sun_star_uno_XInterface_idl__
#include <com/sun/star/uno/XInterface.idl>
#endif
#ifndef __com_sun_star_sheet_TableFilterField_idl__
#include <com/sun/star/sheet/TableFilterField.idl>
#endif
#include <com/sun/star/uno/XInterface.idl>
//=============================================================================
@ -44,7 +39,7 @@ module com { module sun { module star { module sheet {
/** provides access to a collection of filter conditions (filter fields).
@see com::sun::star::sheet::SheetFilterDescriptor
@see SheetFilterDescriptor
*/
published interface XSheetFilterDescriptor: com::sun::star::uno::XInterface
{
@ -52,14 +47,13 @@ published interface XSheetFilterDescriptor: com::sun::star::uno::XInterface
/** returns the collection of filter fields.
*/
sequence< com::sun::star::sheet::TableFilterField > getFilterFields();
sequence< TableFilterField > getFilterFields();
//-------------------------------------------------------------------------
/** sets a new collection of filter fields.
*/
void setFilterFields(
[in] sequence< com::sun::star::sheet::TableFilterField > aFilterFields );
void setFilterFields( [in] sequence< TableFilterField > aFilterFields );
};

View File

@ -28,13 +28,8 @@
#ifndef __com_sun_star_sheet_XSheetFilterDescriptor2_idl__
#define __com_sun_star_sheet_XSheetFilterDescriptor2_idl__
#ifndef __com_sun_star_sheet_TableFilterField2_idl__
#include <com/sun/star/sheet/TableFilterField2.idl>
#endif
#ifndef __com_sun_star_uno_XInterface_idl__
#include <com/sun/star/uno/XInterface.idl>
#endif
//=============================================================================
@ -48,7 +43,7 @@ module com { module sun { module star { module sheet {
whereas the <type>XSheetFilterDescriptor</type> interface uses the
<type>TableFilterField</type> struct.</p>
@see com::sun::star::sheet::SheetFilterDescriptor
@see SheetFilterDescriptor
@since OOo 3.2
*/
published interface XSheetFilterDescriptor2: com::sun::star::uno::XInterface
@ -57,14 +52,13 @@ published interface XSheetFilterDescriptor2: com::sun::star::uno::XInterface
/** returns the collection of filter fields.
*/
sequence< com::sun::star::sheet::TableFilterField2 > getFilterFields2();
sequence< TableFilterField2 > getFilterFields2();
//-------------------------------------------------------------------------
/** sets a new collection of filter fields.
*/
void setFilterFields2(
[in] sequence< com::sun::star::sheet::TableFilterField2 > aFilterFields );
void setFilterFields2( [in] sequence< TableFilterField2 > aFilterFields );
};

View File

@ -198,6 +198,7 @@ IDLFILES=\
SpreadsheetDocumentSettings.idl\
SpreadsheetDrawPage.idl\
SpreadsheetView.idl\
SpreadsheetViewObjectsMode.idl\
SpreadsheetViewPane.idl\
SpreadsheetViewPanesEnumeration.idl\
SpreadsheetViewSettings.idl\

View File

@ -1,4 +1,4 @@
ou offuh :: offapi codemaker NULL
ou offuh :: offapi oovbaapi codemaker NULL
ou offuh usr1 - all ou_mkout NULL
ou offuh\prj get - all ou_prj NULL
ou offuh\source nmake - all ou_source NULL

View File

@ -135,6 +135,21 @@ mkdir: %_DEST%\inc%_EXT%\offuh\com\sun\star\xml\wrapper
#i20156 - end
mkdir: %_DEST%\inc%_EXT%\offuh\com\sun\star\rdf
mkdir: %_DEST%\inc%_EXT%\offuh\ooo
mkdir: %_DEST%\inc%_EXT%\offuh\ooo\vba
mkdir: %_DEST%\inc%_EXT%\offuh\ooo\vba\access
mkdir: %_DEST%\inc%_EXT%\offuh\ooo\vba\adodb
mkdir: %_DEST%\inc%_EXT%\offuh\ooo\vba\dao
mkdir: %_DEST%\inc%_EXT%\offuh\ooo\vba\excel
mkdir: %_DEST%\inc%_EXT%\offuh\ooo\vba\msforms
mkdir: %_DEST%\inc%_EXT%\offuh\ooo\vba\office
mkdir: %_DEST%\inc%_EXT%\offuh\ooo\vba\powerpoint
mkdir: %_DEST%\inc%_EXT%\offuh\ooo\vba\stdole
mkdir: %_DEST%\inc%_EXT%\offuh\ooo\vba\word
mkdir: %_DEST%\inc%_EXT%\offuh\msforms
..\%__SRC%\inc\offuh\com\sun\star\auth\*.hdl %_DEST%\inc%_EXT%\offuh\com\sun\star\auth\*.hdl
..\%__SRC%\inc\offuh\com\sun\star\auth\*.hpp %_DEST%\inc%_EXT%\offuh\com\sun\star\auth\*.hpp
..\%__SRC%\inc\offuh\com\sun\star\accessibility\*.hpp %_DEST%\inc%_EXT%\offuh\com\sun\star\accessibility\*.hpp
@ -380,3 +395,29 @@ mkdir: %_DEST%\inc%_EXT%\offuh\com\sun\star\rdf
..\%__SRC%\inc\offuh\com\sun\star\rdf\*.hpp %_DEST%\inc%_EXT%\offuh\com\sun\star\rdf\*.hpp
..\%__SRC%\inc\offuh\com\sun\star\rdf\*.hdl %_DEST%\inc%_EXT%\offuh\com\sun\star\rdf\*.hdl
..\%__SRC%\inc\offuh\ooo\vba\*.hpp %_DEST%\inc%_EXT%\offuh\ooo\vba\*.hpp
..\%__SRC%\inc\offuh\ooo\vba\*.hdl %_DEST%\inc%_EXT%\offuh\ooo\vba\*.hdl
..\%__SRC%\inc\offuh\ooo\vba\*.hpp %_DEST%\inc%_EXT%\offuh\ooo\vba\*.hpp
..\%__SRC%\inc\offuh\ooo\vba\*.hdl %_DEST%\inc%_EXT%\offuh\ooo\vba\*.hdl
..\%__SRC%\inc\offuh\ooo\vba\access\*.hpp %_DEST%\inc%_EXT%\offuh\ooo\vba\access\*.hpp
..\%__SRC%\inc\offuh\ooo\vba\access\*.hdl %_DEST%\inc%_EXT%\offuh\ooo\vba\access\*.hdl
..\%__SRC%\inc\offuh\ooo\vba\adodb\*.hpp %_DEST%\inc%_EXT%\offuh\ooo\vba\adodb\*.hpp
..\%__SRC%\inc\offuh\ooo\vba\adodb\*.hdl %_DEST%\inc%_EXT%\offuh\ooo\vba\adodb\*.hdl
..\%__SRC%\inc\offuh\ooo\vba\dao\*.hpp %_DEST%\inc%_EXT%\offuh\ooo\vba\dao\*.hpp
..\%__SRC%\inc\offuh\ooo\vba\dao\*.hdl %_DEST%\inc%_EXT%\offuh\ooo\vba\dao\*.hdl
..\%__SRC%\inc\offuh\ooo\vba\excel\*.hpp %_DEST%\inc%_EXT%\offuh\ooo\vba\excel\*.hpp
..\%__SRC%\inc\offuh\ooo\vba\excel\*.hdl %_DEST%\inc%_EXT%\offuh\ooo\vba\excel\*.hdl
..\%__SRC%\inc\offuh\ooo\vba\msforms\*.hpp %_DEST%\inc%_EXT%\offuh\ooo\vba\msforms\*.hpp
..\%__SRC%\inc\offuh\ooo\vba\msforms\*.hdl %_DEST%\inc%_EXT%\offuh\ooo\vba\msforms\*.hdl
..\%__SRC%\inc\offuh\ooo\vba\office\*.hpp %_DEST%\inc%_EXT%\offuh\ooo\vba\office\*.hpp
..\%__SRC%\inc\offuh\ooo\vba\office\*.hdl %_DEST%\inc%_EXT%\offuh\ooo\vba\office\*.hdl
..\%__SRC%\inc\offuh\ooo\vba\powerpoint\*.hpp %_DEST%\inc%_EXT%\offuh\ooo\vba\powerpoint\*.hpp
..\%__SRC%\inc\offuh\ooo\vba\powerpoint\*.hdl %_DEST%\inc%_EXT%\offuh\ooo\vba\powerpoint\*.hdl
..\%__SRC%\inc\offuh\ooo\vba\stdole\*.hpp %_DEST%\inc%_EXT%\offuh\ooo\vba\stdole\*.hpp
..\%__SRC%\inc\offuh\ooo\vba\stdole\*.hdl %_DEST%\inc%_EXT%\offuh\ooo\vba\stdole\*.hdl
..\%__SRC%\inc\offuh\ooo\vba\word\*.hpp %_DEST%\inc%_EXT%\offuh\ooo\vba\word\*.hpp
..\%__SRC%\inc\offuh\ooo\vba\word\*.hdl %_DEST%\inc%_EXT%\offuh\ooo\vba\word\*.hdl
..\%__SRC%\inc\offuh\msforms\*.hpp %_DEST%\inc%_EXT%\offuh\msforms\*.hpp
..\%__SRC%\inc\offuh\msforms\*.hdl %_DEST%\inc%_EXT%\offuh\msforms\*.hdl

View File

@ -33,12 +33,16 @@ TARGET= offuh
.INCLUDE : settings.mk
# ------------------------------------------------------------------
# --- Targets ------------------------------------------------------
.INCLUDE : target.mk
ALLTAR : $(MISC)$/oovbaapi.don $(MISC)$/$(TARGET).don
$(MISC)$/$(TARGET).don : $(UNOUCRRDB)
@@-$(RM) $@
$(CPPUMAKER) -Gc $(CPPUMAKERFLAGS) -B$(UNOUCRBASE) -O$(UNOUCROUT) $(UNOUCRRDB) && echo > $@
# --- Targets ------------------------------------------------------
.INCLUDE : target.mk
$(MISC)$/oovbaapi.don : $(SOLARBINDIR)$/oovbaapi.rdb
@@-$(RM) $@
$(CPPUMAKER) -Gc $(CPPUMAKERFLAGS) -B$(UNOUCRBASE) -O$(UNOUCROUT) $(SOLARBINDIR)$/oovbaapi.rdb -X$(SOLARBINDIR)$/types.rdb && echo > $@
echo $@

View File

@ -1,4 +1,4 @@
bgpu pyuno : stoc cpputools cppuhelper bridges tools PYTHON:python NULL
bgpu pyuno : stoc cpputools cppuhelper bridges tools PYTHON:python LIBXSLT:libxslt NULL
pu pyuno usr1 - all br_mkout NULL
pu pyuno\zipcore nmake - all pu_zipcore NULL
pu pyuno\source\module nmake - all pu_module NULL

View File

@ -1,4 +1,4 @@
rb remotebridges : bridges rdbmaker NULL
rb remotebridges : LIBXSLT:libxslt bridges rdbmaker NULL
rb remotebridges usr1 - all rb_mkout NULL
rb remotebridges\source\bridge nmake - all rb_iiop NULL
rb remotebridges\source\factory nmake - all rb_factory NULL

View File

@ -291,7 +291,7 @@ typedef void * sal_Handle;
These macros are used for inline declarations of exception classes, as in
rtl/malformeduriexception.hxx.
*/
#if defined __GNUC__
#if defined(__GNUC__) && ! defined(__MINGW32__)
#define SAL_EXCEPTION_DLLPUBLIC_EXPORT SAL_DLLPUBLIC_EXPORT
#define SAL_EXCEPTION_DLLPRIVATE SAL_DLLPRIVATE
#else

View File

@ -55,7 +55,8 @@ SLOFILES= \
$(SLO)$/utility.obj\
$(SLO)$/filepath.obj\
$(SLO)$/debugbase.obj\
$(SLO)$/loadmodulerelative.obj
$(SLO)$/loadmodulerelative.obj \
$(SLO)/printtrace.obj
# $(SLO)$/readline.obj\
@ -64,7 +65,8 @@ OBJFILES= \
$(OBJ)$/utility.obj\
$(OBJ)$/filepath.obj\
$(OBJ)$/debugbase.obj\
$(OBJ)$/loadmodulerelative.obj
$(OBJ)$/loadmodulerelative.obj \
$(OBJ)/printtrace.obj
# $(OBJ)$/readline.obj\
#.ENDIF

View File

@ -0,0 +1,65 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#include "precompiled_sal.hxx"
#include "sal/config.h"
#include <cstdarg>
#include <cstdio>
#include <cstring>
#include <stdio.h> // snprintf, vsnprintf
#include "osl/diagnose.h"
#include "osl/thread.hxx"
#include "rtl/string.h"
#include "sal/types.h"
#include "printtrace.h"
void printTrace(unsigned long pid, char const * format, std::va_list arguments)
{
char buf[1024];
int n1 = snprintf(
buf, sizeof buf, "Trace %lu/%" SAL_PRIuUINT32 ": \"", pid,
osl::Thread::getCurrentIdentifier());
OSL_ASSERT(
n1 >= 0 &&
(static_cast< unsigned int >(n1) <
sizeof buf - RTL_CONSTASCII_LENGTH("\"...\n")));
int n2 = sizeof buf - n1 - RTL_CONSTASCII_LENGTH("\"...\n");
int n3 = vsnprintf(buf + n1, n2, format, arguments);
if (n3 < 0) {
std::strcpy(buf + n1, "\"???\n");
} else if (n3 < n2) {
std::strcpy(buf + n1 + n3, "\"\n");
} else {
std::strcpy(buf + n1 + n2 - 1, "\"...\n");
}
std::fputs(buf, stderr);
}

46
sal/osl/inc/printtrace.h Normal file
View File

@ -0,0 +1,46 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#ifndef INCLUDED_SAL_OSL_INC_PRINTTRACE_H
#define INCLUDED_SAL_OSL_INC_PRINTTRACE_H
#include "sal/config.h"
#include <stdarg.h>
#if defined __cplusplus
extern "C" {
#endif
/* called internally by osl_trace */
void printTrace(unsigned long pid, char const * format, va_list arguments);
#if defined __cplusplus
}
#endif
#endif

View File

@ -35,6 +35,8 @@
#include <osl/diagnose.h>
#include <osl/thread.h>
#include "printtrace.h"
BYTE oslTraceEnv[] = "OSL_TRACE_TO_FILE";
typedef pfunc_osl_printDebugMessage oslDebugMessageFunc;
@ -53,29 +55,11 @@ void SAL_CALL osl_breakDebug()
/************************************************************************/
/* osl_trace */
/************************************************************************/
/* comment this define to stop output thread identifier*/
#define OSL_TRACE_THREAD 1
void SAL_CALL osl_trace (
const sal_Char* lpszFormat, ...)
{
void osl_trace(char const * pszFormat, ...) {
va_list args;
#if defined(OSL_PROFILING)
fprintf(stderr, "Time: %06lu : ", osl_getGlobalTimer() );
#else
#if defined(OSL_TRACE_THREAD)
fprintf(stderr,"Thread: %6d :",osl_getThreadIdentifier(NULL));
#else
fprintf(stderr, "Trace Message: ");
#endif
#endif
va_start(args, lpszFormat);
vfprintf(stderr, lpszFormat, args);
va_start(args, pszFormat);
printTrace(0, pszFormat, args); /* TODO: pid */
va_end(args);
fprintf(stderr,"\n");
fflush(stderr);
}
/*----------------------------------------------------------------------------*/

View File

@ -28,7 +28,6 @@
#include "osl/diagnose.h"
#include "system.h"
#ifndef HAVE_DLFCN_H
#if defined(LINUX) || defined(SOLARIS)
@ -58,6 +57,8 @@
#define INCLUDED_STDDEF_H
#endif
#include "printtrace.h"
/************************************************************************/
/* Internal data structures and functions */
/************************************************************************/
@ -301,32 +302,9 @@ pfunc_osl_printDetailedDebugMessage SAL_CALL osl_setDetailedDebugMessageFunc (
/************************************************************************/
/* osl_trace */
/************************************************************************/
/* comment this define to stop output thread identifier*/
#define OSL_TRACE_THREAD 1
void SAL_CALL osl_trace (
const sal_Char* lpszFormat, ...)
{
void osl_trace(char const * pszFormat, ...) {
va_list args;
#if defined(OSL_PROFILING)
fprintf(stderr, "Time: %06lu : ", osl_getGlobalTimer() );
#else
#if defined(OSL_TRACE_THREAD)
fprintf(
stderr, "Thread: %6lu :",
SAL_INT_CAST(unsigned long, osl_getThreadIdentifier(NULL)));
#else
fprintf(stderr, "Trace Message: ");
#endif
#endif
va_start(args, lpszFormat);
vfprintf(stderr, lpszFormat, args);
va_start(args, pszFormat);
printTrace((unsigned long) getpid(), pszFormat, args);
va_end(args);
fprintf(stderr,"\n");
fflush(stderr);
}
/************************************************************************/

View File

@ -844,9 +844,9 @@ void _imp_getProcessLocale( rtl_Locale ** ppLocale )
if ( NULL == locale )
{
locale = (char *)malloc( 20 );
locale = (char *)malloc( 128 );
if ( locale )
macosx_getLocale( locale, 20 );
macosx_getLocale( locale, 128 );
else
fprintf( stderr, "nlsupport.c: locale allocation returned NULL!\n" );
}

37
sal/osl/w32/diagnose.c Normal file → Executable file
View File

@ -32,6 +32,8 @@
#include <osl/diagnose.h>
#include <osl/thread.h>
#include "printtrace.h"
#define NO_DEBUG_CRT
static pfunc_osl_printDebugMessage _pPrintDebugMessage = NULL;
@ -61,46 +63,21 @@ void SAL_CALL osl_breakDebug(void)
DebugBreak();
}
/* Uncomment this define to get profiling time output */
/* #define OSL_PROFILING */
/* comment this define to stop output thread identifier*/
#define OSL_TRACE_THREAD 1
void SAL_CALL osl_trace(const sal_Char* lpszFormat, ...)
{
void osl_trace(char const * pszFormat, ...) {
va_list args;
int written = 0;
va_start(args, lpszFormat);
#if defined(OSL_PROFILING)
fprintf(stderr, "time : %06lu : ", osl_getGlobalTimer() );
#else
#if defined(OSL_TRACE_THREAD)
fprintf(stderr,"Thread: %6d :",osl_getThreadIdentifier(NULL));
#else
fprintf(stderr,"Trace Message : ");
#endif
#endif
va_start(args, pszFormat);
if ( IsDebuggerPresent() )
{
sal_Char szMessage[512];
written = _vsnprintf( szMessage, sizeof(szMessage) - 2, lpszFormat, args );
int written = _vsnprintf(
szMessage, sizeof(szMessage) - 2, pszFormat, args );
if ( written == -1 )
written = sizeof(szMessage) - 2;
szMessage[ written++ ] = '\n';
szMessage[ written ] = 0;
OutputDebugString( szMessage );
}
vfprintf(stderr,lpszFormat, args);
fprintf(stderr,"\n");
fflush(stderr);
printTrace((unsigned long) _getpid(), pszFormat, args);
va_end(args);
}

View File

@ -1,6 +1,7 @@
#ifdef __MINGW32__
#define _GDI32_
#include "macros.h"
#include <w32api.h>
#include <multimon.h>
extern "C" {
extern HMODULE hModuleUnicowsDLL;
@ -461,7 +462,11 @@ DEFINE_UNICOWS_THUNK( kernel32, BOOL, WINAPI, UpdateResourceW, (HANDLE,LPCWSTR,L
DEFINE_UNICOWS_THUNK( version, DWORD, WINAPI, VerFindFileW, (DWORD,LPWSTR,LPWSTR,LPWSTR,LPWSTR,PUINT,LPWSTR,PUINT) )
DEFINE_UNICOWS_THUNK( version, DWORD, WINAPI, VerInstallFileW, (DWORD,LPWSTR,LPWSTR,LPWSTR,LPWSTR,LPWSTR,LPWSTR,PUINT) )
DEFINE_UNICOWS_THUNK( kernel32, DWORD, WINAPI, VerLanguageNameW, (DWORD,LPWSTR,DWORD) )
#if ( __W32API_MAJOR_VERSION > 3 ) || ( __W32API_MAJOR_VERSION == 3 && __W32API_MINOR_VERSION > 13 )
DEFINE_UNICOWS_THUNK( version, BOOL, WINAPI, VerQueryValueW, (const LPVOID,LPCWSTR,LPVOID*,PUINT) )
#else
DEFINE_UNICOWS_THUNK( version, BOOL, WINAPI, VerQueryValueW, (const LPVOID,LPWSTR,LPVOID*,PUINT) )
#endif
DEFINE_UNICOWS_THUNK( user32, SHORT, WINAPI, VkKeyScanExW, (WCHAR,HKL) )
DEFINE_UNICOWS_THUNK( user32, SHORT, WINAPI, VkKeyScanW, (WCHAR) )
DEFINE_UNICOWS_THUNK( user32, DWORD, WINAPI, SetupDecompressOrCopyFileW, (PCWSTR,PCWSTR,PUINT) )

View File

@ -1153,36 +1153,24 @@ static void prepareRegistry(
{
// update entries in SERVICES section
Sequence< Reference < XRegistryKey > > serviceKeys = xKey->openKeys();
OUString implName;
const Reference < XRegistryKey > * pServiceKeys = serviceKeys.getConstArray();
if (serviceKeys.getLength())
OUString implName = OUString(xImplKey->getKeyName().getStr() + 1);
sal_Int32 firstDot = implName.indexOf('/');
if (firstDot >= 0)
implName = implName.copy(firstDot + 1);
sal_Int32 offset = xKey->getKeyName().getLength() + 1;
for (sal_Int32 j = 0; j < serviceKeys.getLength(); j++)
{
const Reference < XRegistryKey > * pServiceKeys = serviceKeys.getConstArray();
OUString serviceName = pServiceKeys[j]->getKeyName().copy(offset);
implName = OUString(xImplKey->getKeyName().getStr() + 1);
sal_Int32 firstDot = implName.indexOf('/');
if (firstDot >= 0)
implName = implName.copy(firstDot + 1);
sal_Int32 offset = xKey->getKeyName().getLength() + 1;
for (sal_Int32 j = 0; j < serviceKeys.getLength(); j++)
{
OUString serviceName = pServiceKeys[j]->getKeyName().copy(offset);
createUniqueSubEntry(
xDest->getRootKey()->createKey(
pool.slash_SERVICES + serviceName ),
implName);
}
}
else
{
throw InvalidRegistryException(
OUString( RTL_CONSTASCII_USTRINGPARAM( "prepareRegistry(): no service names given by component" ) ),
Reference< XInterface > () );
createUniqueSubEntry(
xDest->getRootKey()->createKey(
pool.slash_SERVICES + serviceName ),
implName);
}
xKey = xImplKey->openKey( pool.slash_UNO );
@ -1205,38 +1193,38 @@ static void prepareRegistry(
}
}
}
}
// update LOCATION entry
xKey = xImplKey->createKey( pool.slash_UNO_slash_LOCATION );
// update LOCATION entry
xKey = xImplKey->createKey( pool.slash_UNO_slash_LOCATION );
if (xKey.is())
if (xKey.is())
{
xKey->setAsciiValue(locationUrl);
}
// update ACTIVATOR entry
xKey = xImplKey->createKey( pool.slash_UNO_slash_ACTIVATOR );
if (xKey.is())
{
xKey->setAsciiValue(implementationLoaderUrl);
}
xKey = xImplKey->openKey( pool.slash_UNO_slash_SERVICES );
if (xKey.is() && (xKey->getValueType() == RegistryValueType_ASCIILIST))
{
// update link entries in REGISTRY_LINKS section
Sequence<OUString> linkNames = xKey->getAsciiListValue();
if (linkNames.getLength())
{
xKey->setAsciiValue(locationUrl);
}
const OUString* pLinkNames = linkNames.getConstArray();
// update ACTIVATOR entry
xKey = xImplKey->createKey( pool.slash_UNO_slash_ACTIVATOR );
if (xKey.is())
{
xKey->setAsciiValue(implementationLoaderUrl);
}
xKey = xImplKey->openKey( pool.slash_UNO_slash_SERVICES );
if (xKey.is() && (xKey->getValueType() == RegistryValueType_ASCIILIST))
{
// update link entries in REGISTRY_LINKS section
Sequence<OUString> linkNames = xKey->getAsciiListValue();
if (linkNames.getLength())
for (sal_Int32 j = 0; j < linkNames.getLength(); j++)
{
const OUString* pLinkNames = linkNames.getConstArray();
for (sal_Int32 j = 0; j < linkNames.getLength(); j++)
{
prepareLink(xDest, xImplKey, pLinkNames[j]);
}
prepareLink(xDest, xImplKey, pLinkNames[j]);
}
}
}

View File

@ -172,6 +172,8 @@ public:
virtual Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
// XHierarchicalNameAccess
Any getByHierarchicalNameImpl( const OUString & rName );
virtual Any SAL_CALL getByHierarchicalName( const OUString & rName ) throw(::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException);
virtual sal_Bool SAL_CALL hasByHierarchicalName( const OUString & rName ) throw(::com::sun::star::uno::RuntimeException);
@ -223,14 +225,7 @@ Any ProviderImpl::TypeDescriptionManagerWrapper::getByHierarchicalName(
sal_Bool ProviderImpl::TypeDescriptionManagerWrapper::hasByHierarchicalName(
OUString const & name ) throw (RuntimeException)
{
try
{
return getByHierarchicalName( name ).hasValue();
}
catch (container::NoSuchElementException &)
{
return false;
}
return m_xTDMgr->hasByHierarchicalName( name ) || m_xThisProvider->hasByHierarchicalName( name );
}
//______________________________________________________________________________
@ -344,8 +339,7 @@ Sequence< OUString > ProviderImpl::getSupportedServiceNames()
// XHierarchicalNameAccess
//__________________________________________________________________________________________________
Any SAL_CALL ProviderImpl::getByHierarchicalName( const OUString & rName )
throw(::com::sun::star::uno::RuntimeException, com::sun::star::container::NoSuchElementException)
Any ProviderImpl::getByHierarchicalNameImpl( const OUString & rName )
{
Any aRet;
@ -432,7 +426,17 @@ Any SAL_CALL ProviderImpl::getByHierarchicalName( const OUString & rName )
// Don't stop iteration in this case.
}
catch ( NoSuchElementException const & )
{
}
}
return aRet;
}
Any SAL_CALL ProviderImpl::getByHierarchicalName( const OUString & rName )
throw(::com::sun::star::uno::RuntimeException, com::sun::star::container::NoSuchElementException)
{
Any aRet( getByHierarchicalNameImpl( rName ) );
if ( !aRet.hasValue() )
throw NoSuchElementException(
@ -445,14 +449,7 @@ Any SAL_CALL ProviderImpl::getByHierarchicalName( const OUString & rName )
sal_Bool ProviderImpl::hasByHierarchicalName( const OUString & rName )
throw(::com::sun::star::uno::RuntimeException)
{
try
{
return getByHierarchicalName( rName ).hasValue();
}
catch (NoSuchElementException &)
{
}
return sal_False;
return getByHierarchicalNameImpl( rName ).hasValue();
}
// XTypeDescriptionEnumerationAccess

12
stoc/source/simpleregistry/textualservices.cxx Executable file → Normal file
View File

@ -41,8 +41,10 @@
#include "com/sun/star/uno/XInterface.hpp"
#include "cppuhelper/implbase1.hxx"
#include "osl/diagnose.h"
#include "rtl/malformeduriexception.hxx"
#include "rtl/ref.hxx"
#include "rtl/string.h"
#include "rtl/uri.hxx"
#include "rtl/ustrbuf.hxx"
#include "rtl/ustring.h"
#include "rtl/ustring.hxx"
@ -306,6 +308,16 @@ void Parser::handleComponent() {
": <component> is missing \"loader\" attribute"))),
css::uno::Reference< css::uno::XInterface >());
}
try {
attrUri_ = rtl::Uri::convertRelToAbs(reader_.getUrl(), attrUri_);
} catch (rtl::MalformedUriException & e) {
throw css::registry::InvalidRegistryException(
(reader_.getUrl() +
rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM(": bad \"uri\" attribute: ")) +
e.getMessage()),
css::uno::Reference< css::uno::XInterface >());
}
}
void Parser::handleImplementation() {

View File

@ -0,0 +1,82 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#ifndef __com_sun_star_script_XDirectInvocation_idl__
#define __com_sun_star_script_XDirectInvocation_idl__
#ifndef __com_sun_star_uno_XInterface_idl__
#include <com/sun/star/uno/XInterface.idl>
#endif
#ifndef __com_sun_star_lang_IllegalArgumentException_idl__
#include <com/sun/star/lang/IllegalArgumentException.idl>
#endif
#ifndef __com_sun_star_script_CannotConvertException_idl__
#include <com/sun/star/script/CannotConvertException.idl>
#endif
#ifndef __com_sun_star_reflection_InvocationTargetException_idl__
#include <com/sun/star/reflection/InvocationTargetException.idl>
#endif
#ifndef __com_sun_star_beans_UnknownPropertyException_idl__
#include <com/sun/star/beans/UnknownPropertyException.idl>
#endif
//=============================================================================
module com { module sun { module star { module script {
//=============================================================================
/** provides access to an object's methods and properties.
*/
published interface XDirectInvocation: com::sun::star::uno::XInterface
{
//-------------------------------------------------------------------------
/** provides access to methods and properties exposed by an object.
@param aParams all parameters, out parameters are not supported
*/
any directInvoke( [in] string aName,
[in] sequence<any> aParams )
raises( com::sun::star::lang::IllegalArgumentException,
com::sun::star::script::CannotConvertException,
com::sun::star::reflection::InvocationTargetException );
//-------------------------------------------------------------------------
/** returns <TRUE/> if the method or property with the specified name exists, else <FALSE/>.
*/
boolean hasMember( [in] string aName );
};
//=============================================================================
}; }; }; };
#endif

View File

@ -60,6 +60,7 @@ IDLFILES=\
XAllListener.idl\
XAllListenerAdapterService.idl\
XDebugging.idl\
XDirectInvocation.idl\
XEngine.idl\
XEngineListener.idl\
XEventAttacher.idl\

View File

@ -1,61 +0,0 @@
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License version 3
# only, as published by the Free Software Foundation.
#
# OpenOffice.org is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License version 3 for more details
# (a copy is included in the LICENSE file that accompanied this code).
#
# You should have received a copy of the GNU Lesser General Public License
# version 3 along with OpenOffice.org. If not, see
# <http://www.openoffice.org/license.html>
# for a copy of the LGPLv3 License.
#
#*************************************************************************
PRJ=.
PRJNAME:=udkapi
# --- Settings -----------------------------------------------------
OUT!:=$(PRJ)$/out
# ------------------------------------------------------------------
INCLUDES= \
com$/sun$/star$/container$/makefile.mk \
com$/sun$/star$/io$/makefile.mk \
com$/sun$/star$/reflection$/makefile.mk \
com$/sun$/star$/beans$/makefile.mk \
com$/sun$/star$/lang$/makefile.mk \
com$/sun$/star$/uno$/makefile.mk \
com$/sun$/star$/uno$/util$/logging$/makefile.mk \
com$/sun$/star$/corba$/makefile.mk \
com$/sun$/star$/corba$/iop$/makefile.mk \
com$/sun$/star$/corba$/giop$/makefile.mk \
com$/sun$/star$/corba$/iiop$/makefile.mk \
com$/sun$/star$/script$/makefile.mk \
com$/sun$/star$/test$/makefile.mk \
com$/sun$/star$/registry$/makefile.mk \
com$/sun$/star$/loader$/makefile.mk \
com$/sun$/star$/bridge$/makefile.mk
.INCLUDE: $(INCLUDES)
out$/$(PRJNAME).rdb:: $(ALLIDLFILES)
unoidl @$(mktmp -I$(PRJ) -Burd -OHout $(ALLIDLFILES:+"\n"))
regmerge @$(mktmp $@ /UCR out$/{$(?:f:s/.idl/.urd/:+"\n")} )
touch $@

View File

@ -1,2 +1,2 @@
ur ure : cli_ure io javaunohelper remotebridges solenv stoc NULL
ur ure : LIBXSLT:libxslt cli_ure io javaunohelper remotebridges solenv stoc NULL
ur ure\source nmake - all ur_source NULL

View File

@ -0,0 +1,34 @@
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License version 3
# only, as published by the Free Software Foundation.
#
# OpenOffice.org is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License version 3 for more details
# (a copy is included in the LICENSE file that accompanied this code).
#
# You should have received a copy of the GNU Lesser General Public License
# version 3 along with OpenOffice.org. If not, see
# <http://www.openoffice.org/license.html>
# for a copy of the LGPLv3 License.
#
#***********************************************************************/
<http://qa.openoffice.org/issues/show_bug.cgi?id=115203>: "Issue 113189
extracted xmlreader from configmgr, to make the former available within URE.
The xmlreader library is for now considered a private part of URE (cf.
ure/source/README), for simplicity uses OOO_DLLPUBLIC_XMLREADER-based symbol
visibility (and thus no symbol versioning), but is of course used from outside
URE in configmgr. This works as long as its ABI does not change. If it ever
changes, symbol versioning will have to be added (in some form or other)."