Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
d720cc6c
Kaydet (Commit)
d720cc6c
authored
Şub 28, 2003
tarafından
Juergen Schmidt
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#107931# synch with OOO_STABLE_1
üst
54d89d1e
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
25 additions
and
100 deletions
+25
-100
Makefile
odk/examples/java/Inspector/Makefile
+5
-1
Makefile
odk/examples/java/MinimalComponent/Makefile
+2
-2
MinimalComponent.java
odk/examples/java/MinimalComponent/MinimalComponent.java
+6
-42
Makefile
odk/examples/java/NotesAccess/Makefile
+3
-3
NotesAccess.java
odk/examples/java/NotesAccess/NotesAccess.java
+3
-23
Makefile
odk/examples/java/PropertySet/Makefile
+2
-2
Makefile
odk/examples/java/ToDo/Makefile
+2
-2
ToDo.java
odk/examples/java/ToDo/ToDo.java
+2
-25
No files found.
odk/examples/java/Inspector/Makefile
Dosyayı görüntüle @
d720cc6c
...
...
@@ -37,7 +37,11 @@ CLASSFILES = $(patsubst %.java,$(OUT_COMP_CLASS)/%.class,$(JAVAFILES))
CLASSFILES
+=
$
(
subst
$(OUT_COMP_GEN)
,
$(OUT_COMP_CLASS)
,
$
(
GENJAVAFILES:.java
=
.class
))
$(COMPONENT1_NAME)
_CLASSFILES
=
$(COMPONENT1_NAME)
.class
\
$(COMPONENT1_NAME)$$
_
$(COMPONENT1_NAME)
.class
$(COMPONENT1_NAME)$(QUOTE)$$
_
$(COMPONENT1_NAME)
.class
\
$(COMPONENT1_NAME)$(QUOTE)$$
1.class
\
$(COMPONENT1_NAME)$(QUOTE)$$
2.class
\
$(COMPONENT1_NAME)$(QUOTE)$$
3.class
\
$(COMPONENT1_NAME)$(QUOTE)$$
4.class
$(COMPONENT1_NAME)_CLASSFILES += $(subst $(OUT_COMP_GEN)/,,$(GENJAVAFILES
:
.java=.class))
...
...
odk/examples/java/MinimalComponent/Makefile
Dosyayı görüntüle @
d720cc6c
...
...
@@ -37,7 +37,7 @@ CLASSFILES = $(patsubst %.java,$(OUT_COMP_CLASS)/%.class,$(JAVAFILES))
#CLASSFILES += $(subst $(OUT_COMP_GEN),$(OUT_COMP_CLASS),$(GENJAVAFILES:.java=.class))
$(COMPONENT1_NAME)
_CLASSFILES
=
$(COMPONENT1_NAME)
.class
\
$(COMPONENT1_NAME)$
$$(COMPONENT1_NAME)
Implementation.class
$(COMPONENT1_NAME)$
(QUOTE)$$$(COMPONENT1_NAME)
Implementation.class
#$(COMPONENT1_NAME)_CLASSFILES += $(subst $(OUT_COMP_GEN)/,,$(GENJAVAFILES:.java=.class))
...
...
@@ -98,7 +98,7 @@ endif
JavaMinimalComponentExample
:
$(REGISTERFLAG)
@
echo
--------------------------------------------------------------------------------
@
echo
Please use
one of the following commands to execute the examples
!
@
echo
Please use
the following
command
to execute the example
!
@
echo
-
@
echo
make TestMinimalComponent.run
@
echo
------
...
...
odk/examples/java/MinimalComponent/MinimalComponent.java
Dosyayı görüntüle @
d720cc6c
...
...
@@ -2,9 +2,9 @@
*
* $RCSfile: MinimalComponent.java,v $
*
* $Revision: 1.
2
$
* $Revision: 1.
3
$
*
* last change: $Author:
bnolte $ $Date: 2002-01-11 10:31:50
$
* last change: $Author:
jsc $ $Date: 2003-02-28 17:39:28
$
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
...
...
@@ -62,6 +62,7 @@
import
com.sun.star.comp.loader.FactoryHelper
;
import
com.sun.star.lang.XMultiServiceFactory
;
import
com.sun.star.lang.XSingleServiceFactory
;
import
com.sun.star.lib.uno.helper.WeakBase
;
import
com.sun.star.uno.UnoRuntime
;
import
com.sun.star.registry.XRegistryKey
;
import
com.sun.star.lang.XInitialization
;
...
...
@@ -73,15 +74,15 @@ import com.sun.star.uno.Type;
* factory for creating the service (<CODE>__getServiceFactory</CODE>) and a
* method, that writes the information into the given registry key
* (<CODE>__writeRegistryServiceInfo</CODE>).
* @version $Date: 200
2-01-11 10:31:50
$
* @version $Date: 200
3-02-28 17:39:28
$
* @author Bertram Nolte
*/
public
class
MinimalComponent
{
/** This class implements the component. At least the interfaces XServiceInfo,
* XTypeProvider, and XInitialization should be provided by the service.
*/
public
static
class
MinimalComponentImplementation
implements
XInitialization
,
X
TypeProvider
,
X
ServiceInfo
{
public
static
class
MinimalComponentImplementation
extends
WeakBase
implements
XInitialization
,
XServiceInfo
{
/** The service name, that must be used to get an instance of this service.
*/
static
private
final
String
__serviceName
=
...
...
@@ -113,27 +114,6 @@ public class MinimalComponent {
XMultiServiceFactory
.
class
,
object
[
0
]
);
}
/** Provides a sequence of all types (usually interface types)
* provided by the object.
* @return Sequence of all types (usually interface types) provided by the
* service.
*/
public
Type
[]
getTypes
()
{
Type
[]
typeReturn
=
{};
try
{
typeReturn
=
new
Type
[]
{
new
Type
(
XTypeProvider
.
class
),
new
Type
(
XServiceInfo
.
class
),
new
Type
(
XInitialization
.
class
)
};
}
catch
(
Exception
exception
)
{
System
.
err
.
println
(
exception
);
}
return
(
typeReturn
);
}
/** This method returns an array of all supported service names.
* @return Array of supported service names.
*/
...
...
@@ -167,22 +147,6 @@ public class MinimalComponent {
return
(
MinimalComponentImplementation
.
class
.
getName
()
);
}
/** This method returns an array of bytes, that can be used to
* unambiguously distinguish between two sets of types, e.g.
* to realise hashing functionality when the object is introspected.
* Two objects that return the same ID also have to return
* the same set of types in getTypes(). If an unique
* implementation Id cannot be provided this method has to
* return an empty sequence. Important: If the object
* aggregates other objects the ID has to be unique for the
* whole combination of objects.
* @return Array of bytes, in order to distinguish between two sets.
*/
public
byte
[]
getImplementationId
()
{
byte
[]
byteReturn
=
{};
return
(
byteReturn
);
}
}
...
...
odk/examples/java/NotesAccess/Makefile
Dosyayı görüntüle @
d720cc6c
...
...
@@ -37,18 +37,18 @@ $(OUT_COMP_CLASS) : $(OUT)
$(OFFICE_CLASSES_DIR)/Notes.jar
:
@
echo
--------------------------------------------------------------------------------
@
echo
You need the
Notes.jar
from Notes/Domino
for
this example.
@
echo
You need the
"
$(QM)
'Notes.jar
$(QM)
"
from Notes/Domino
for
this example.
@
echo
You can download it from http://www.servlets.com/cos/index.html
@
echo
and
then
please copy it into your
$(OFFICE_CLASSES_DIR)
directory.
@
echo
--------------------------------------------------------------------------------
$(CLASSFILES)
:
$(O
UT_COMP_CLASS) $(JAVAFILES) $(OFFICE_CLASSES_DIR)/Notes.jar
$(CLASSFILES)
:
$(O
FFICE_CLASSES_DIR)/Notes.jar $(OUT_COMP_CLASS) $(JAVAFILES)
javac
-classpath
"
$(SDK_CLASSPATH)
"
-d
$(OUT_COMP_CLASS)
$(JAVAFILES)
JavaNotesAccessExample
:
$(CLASSFILES)
@
echo
--------------------------------------------------------------------------------
@
echo
Please use
one of the following commands to execute the examples
!
@
echo
Please use
the following
command
to execute the example
!
@
echo
-
@
echo
make NotesAccess.run
@
echo
--------------------------------------------------------------------------------
...
...
odk/examples/java/NotesAccess/NotesAccess.java
Dosyayı görüntüle @
d720cc6c
...
...
@@ -73,7 +73,7 @@ public class NotesAccess implements Runnable {
// It is possible to use a different connection string, passed as argument
if
(
args
.
length
==
2
)
{
s
ConnectionString
=
args
[
1
];
s
OfficeConnection
=
args
[
1
];
}
if
(
!
args
[
1
].
trim
().
equals
(
""
)
)
{
...
...
@@ -126,27 +126,6 @@ public class NotesAccess implements Runnable {
XMultiComponentFactory
xmulticomponentfactory
=
xcomponentcontext
.
getServiceManager
();
// NOTE: This is special code, that is only necessary, when connecting to
// a Sun ONE Webtop !
// Connection: "portal,host=<portalhost>,port=<port>,service=soffice,user=<username>,password=<passwd>"
if
(
stringOfficeConnection
.
regionMatches
(
4
,
"portal"
,
0
,
6
)
)
{
com
.
sun
.
star
.
loader
.
XImplementationLoader
ximplementationloader
=
(
com
.
sun
.
star
.
loader
.
XImplementationLoader
)
UnoRuntime
.
queryInterface
(
com
.
sun
.
star
.
loader
.
XImplementationLoader
.
class
,
xmulticomponentfactory
.
createInstanceWithContext
(
"com.sun.star.loader.Java"
,
xcomponentcontext
)
);
com
.
sun
.
star
.
container
.
XSet
xset
=
(
com
.
sun
.
star
.
container
.
XSet
)
UnoRuntime
.
queryInterface
(
com
.
sun
.
star
.
container
.
XSet
.
class
,
xmulticomponentfactory
);
com
.
sun
.
star
.
lang
.
XSingleServiceFactory
xsingleservicefactory
=
(
com
.
sun
.
star
.
lang
.
XSingleServiceFactory
)
UnoRuntime
.
queryInterface
(
com
.
sun
.
star
.
lang
.
XSingleServiceFactory
.
class
,
ximplementationloader
.
activate
(
"com.sun.star.comp.portal_connect.Connector"
,
null
,
null
,
null
)
);
xset
.
insert
(
xsingleservicefactory
);
}
/* Creates an instance of the component UnoUrlResolver which
supports the services specified by the factory. */
Object
objectUrlResolver
=
...
...
@@ -205,7 +184,8 @@ public class NotesAccess implements Runnable {
XIndexAccess
.
class
,
xspreadsheets
);
// Getting the first spreadsheet.
XSpreadsheet
xspreadsheet
=
(
XSpreadsheet
)
xindexaccess
.
getByIndex
(
0
);
XSpreadsheet
xspreadsheet
=
(
XSpreadsheet
)
UnoRuntime
.
queryInterface
(
XSpreadsheet
.
class
,
xindexaccess
.
getByIndex
(
0
));
Session
session
;
if
(
!
stringHost
.
equals
(
""
)
)
{
...
...
odk/examples/java/PropertySet/Makefile
Dosyayı görüntüle @
d720cc6c
...
...
@@ -71,8 +71,8 @@ endif
JavaPropertySetExample
:
$(REGISTERFLAG)
@
echo
--------------------------------------------------------------------------------
@
echo
The PropTest was installed
if
SDK_AUTO_DEPLOYMENT
=
YES.
@
echo
Load the
PropertySet.sxw document to see how this component works. You can use
@
echo
this component inside your office installation, see the example description.
@
echo
Load the
"
$(QM)
PropertySet.sxw
$(QM)
"
document to see how this component works. You
@
echo
can use
this component inside your office installation, see the example description.
@
echo
--------------------------------------------------------------------------------
.PHONY
:
clean
...
...
odk/examples/java/ToDo/Makefile
Dosyayı görüntüle @
d720cc6c
...
...
@@ -36,7 +36,7 @@ CLASSFILES = $(patsubst %.java,$(OUT_COMP_CLASS)/%.class,$(JAVAFILES))
CLASSFILES
+=
$
(
subst
$(OUT_COMP_GEN)
,
$(OUT_COMP_CLASS)
,
$
(
GENJAVAFILES:.java
=
.class
))
$(COMPONENT1_NAME)
_CLASSFILES
=
$(COMPONENT1_NAME)
.class
\
$(COMPONENT1_NAME)$
$$(COMPONENT1_NAME)
Implementation.class
$(COMPONENT1_NAME)$
(QUOTE)$$$(COMPONENT1_NAME)
Implementation.class
$(COMPONENT1_NAME)_CLASSFILES += $(subst $(OUT_COMP_GEN)/,,$(GENJAVAFILES
:
.java=.class))
...
...
@@ -98,7 +98,7 @@ endif
JavaToDoExample
:
$(REGISTERFLAG)
@
echo
--------------------------------------------------------------------------------
@
echo
The ToDo Java component was installed
if
SDK_AUTO_DEPLOYMENT
=
YES.
@
echo
Please load the
ToDo.sxc
document to see how this component works, see
@
echo
Please load the
"
$(QM)
ToDo.sxc
$(QM)
"
document to see how this component works, see
@
echo
the example description.
@
echo
--------------------------------------------------------------------------------
...
...
odk/examples/java/ToDo/ToDo.java
Dosyayı görüntüle @
d720cc6c
...
...
@@ -160,29 +160,6 @@ public class ToDo {
return
(
ToDoImplementation
.
class
.
getName
()
);
}
/** Provides a sequence of all types (usually interface types)
* provided by the object.
* @return Sequence of all types (usually interface types) provided by the
* service.
*/
public
Type
[]
getTypes
()
{
Type
[]
typeReturn
=
{};
try
{
typeReturn
=
new
Type
[]
{
new
Type
(
XToDo
.
class
),
new
Type
(
XTypeProvider
.
class
),
new
Type
(
XServiceInfo
.
class
),
new
Type
(
XWeak
.
class
),
new
Type
(
XInterface
.
class
)
};
}
catch
(
Exception
exception
)
{
System
.
err
.
println
(
exception
);
}
return
(
typeReturn
);
}
/** For every bug/feature listed in a spreadsheet document this method calculates
* the start date, day of week of the start date, the end date and the day of week
* of the end date. All calculations are dependent on the values of "Needed Days",
...
...
@@ -210,8 +187,8 @@ public class ToDo {
xspreadsheetdocument
.
getSheets
()
);
// Getting the first XSpreadsheet
XSpreadsheet
xspreadsheet
=
(
XSpreadsheet
)
xindexaccess
.
getByIndex
(
0
);
XSpreadsheet
xspreadsheet
=
(
XSpreadsheet
)
UnoRuntime
.
queryInterface
(
XSpreadsheet
.
class
,
xindexaccess
.
getByIndex
(
0
)
);
// Querying for the interface XCellRange on the XSpeadsheet
XCellRange
xcellrange
=
(
XCellRange
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment