Hi Matthias,
Am I right when I assume that myComp is the same as in the first line
and that it does not make a difference in using it?
No.
If so, why is the xStorable derived from myComp = null and the xStorable
derived from this.xComponent the correct value?
myComp points to a
Hi again,
one addition:
Now the things I wanted to do are working. Thank you for your
explanations.
I had a method taking an XComponent. After your explanations I
understood, that I can give over a XModel instead. The method did not
complain. That is one thing I did not understand.
Greetings
Tobias Krais wrote:
Hi Stephan,
I did not follow this thread too closely. You should not worry about
what toString() on a UNO proxy gives you, as those are implementation
details, anyway. What is important is that those proxy objects offer
the expected functionality. What exactly is your
Hi Stephan,
I extend the code below for better understanding, what I mean.
-%-
System.out.println(this.xComponent);
XModel xModel = (XModel)UnoRuntime.queryInterface(XModel.class,
this.xComponent);
System.out.println(xModel);
XController xController =
Tobias Krais wrote:
Hi Stephan,
I extend the code below for better understanding, what I mean.
-%-
System.out.println(this.xComponent);
XModel xModel = (XModel)UnoRuntime.queryInterface(XModel.class,
this.xComponent);
System.out.println(xModel);
XController xController =
Hi Matthias,
A frame is an object implementing XComponent (amongst other interfaces)
and the code above retrieves this interface. As XFrame is derived from
XComponent it is not surprising that both interfaces references are the
same proxy object. This also means that the queryInterface call
Hi Stephan
-%-
System.out.println(this.xComponent);
XModel xModel = (XModel)UnoRuntime.queryInterface(XModel.class,
this.xComponent);
System.out.println(xModel);
XController xController = xModel.getCurrentController();
System.out.println(xController);
XComponent myComp =
Tobias Krais wrote:
Hi Stephan,
I extend the code below for better understanding, what I mean.
-%-
System.out.println(this.xComponent);
XModel xModel = (XModel)UnoRuntime.queryInterface(XModel.class,
this.xComponent);
System.out.println(xModel);
XController xController =
Tobias Krais wrote:
Hi Stephan,
even though I'm not the Stephan you addressed ;-)
I'd try to query the XPrintable at you xModel instead of myComp.
Yes, that solved my first qestion:
-%-
XController xController = xFrame.getController();
com.sun.star.frame.XModel xModel =
Hi Stephan,
I did not follow this thread too closely. You should not worry about
what toString() on a UNO proxy gives you, as those are implementation
details, anyway. What is important is that those proxy objects offer
the expected functionality. What exactly is your problem with the Java
Hi together,
this is my last day working for my current company and I'm hanging on
following thing: I have to write one more UNO package. In this
component, I need to get the current XComponent. I asked the question
how to get the current XComponent out of an XFrame last march and got
following
Hi Tobias,
this is my last day working for my current company and I'm hanging on
following thing: I have to write one more UNO package. In this
component, I need to get the current XComponent. I asked the question
how to get the current XComponent out of an XFrame last march and got
Hi Frank,
-%-
XComponent xComponent = (XComponent)
UnoRuntime.queryInterface(XComponent.class, xFrame);
-%-
Depending on what you mean with current component, i.e. what you want
to do with it - shouldn't you ask the frame for its controller
(XFrame.getController()),
Hi Tobias,
OK. Some more information: I want to print my XComponent on different
printer trays.
I don't know the printing API, but I would suurprised if it at the
frame, instead of the controller/model. Finally, you want to print the
document, not the window in which it by chance is just
Hi Frank,
OK. Some more information: I want to print my XComponent on different
printer trays.
I don't know the printing API, but I would suurprised if it at the
frame, instead of the controller/model. Finally, you want to print the
document, not the window in which it by chance is just
Hi Frank
So, I assume the component for you is the XComponent of the controller.
Yes. But how to get it? I know how to get the XController and the
XModel. But how to get the XComponent?
analogous to how you get the XComponent interface of the frame, or how
you get any interface for any
Hi Tobias,
OK. But that does not work...
Here my xFrame:
-%-
CO [EMAIL PROTECTED]
[oid=867a494;gcc3[0];c226f3b38e9111dbbb1ff0b779ca904b,
type=com.sun.star.frame.XFrame]
-%-
Here my xController
-%-
CO [EMAIL PROTECTED]
Hi Frank,
And then I query for the xControllerComponent as you described above:
-%-
CO [EMAIL PROTECTED]
[oid=88fee74;gcc3[0];c226f3b38e9111dbbb1ff0b779ca904b,
type=com.sun.star.frame.XController]
-%-
How did you produce those lines? xControllerComponent.toString()?
Just
Hi together,
after testing, I wrote this little test method:
-%-
public void test() {
XModel xModel = (XModel)UnoRuntime.queryInterface(XModel.class,
this.xComponent);
com.sun.star.frame.XController xController =
Hi Tobias,
after testing, I wrote this little test method:
-%-
public void test() {
XModel xModel = (XModel)UnoRuntime.queryInterface(XModel.class,
this.xComponent);
com.sun.star.frame.XController xController =
Tobias Krais wrote:
Hi together,
after testing, I wrote this little test method:
-%-
public void test() {
XModel xModel = (XModel)UnoRuntime.queryInterface(XModel.class,
this.xComponent);
com.sun.star.frame.XController xController =
Hi Stephan,
-%-
public void test() {
XModel xModel = (XModel)UnoRuntime.queryInterface(XModel.class,
this.xComponent);
com.sun.star.frame.XController xController =
xModel.getCurrentController();
XComponent myComp = (XComponent)
Hi Tobias,
That is interesting. Thank you. But if I continue the code the
following
way, I run into troubles (xPrintable will be null):
-%-
// Querying for the interface XPrintable on the loaded document
XPrintable xPrintable = (XPrintable)
Hi Stephan,
even though I'm not the Stephan you addressed ;-)
I'd try to query the XPrintable at you xModel instead of myComp.
Yes, that solved my first qestion:
-%-
XController xController = xFrame.getController();
com.sun.star.frame.XModel xModel = xController.getModel();
24 matches
Mail list logo