Date: prev next · Thread: first prev next last
2016 Archives by date, by thread · List index


Hi,

something like this:

    set doc = thisComponent
    set ctrl = thisComponent.CurrentController
    xChart = ctrl.getModel().getEmbeddedObjects.getByName("Objekt2")   
    xChart.ExtendedControlOverEmbeddedObject.changeState(0)
    xChart.ExtendedControlOverEmbeddedObject.changeState(1)
    xChart.ExtendedControlOverEmbeddedObject.changeState(3)
    xChart.ExtendedControlOverEmbeddedObject.changeState(1)

You can look up the numbers for the states in the
com::sun::star::embed::EmbedStates constant group

Regards,
Jan

Am 31.01.2016 um 13:19 schrieb sos:
Did you tran



Sent from my Samsung Galaxy smartphone.
Did you translate the solution into basic code?

Hi Fernand,

thanks for the ideas. Sadly nothing you or anybody else posted helped.
Finally I found this hack (here xChart has type Reference< XTextContent
xChart):

  Reference < XEmbeddedObjectSupplier2 >xEOS2(xChart, UNO_QUERY_THROW);
  Reference < XEmbeddedObject >
xEmbObj(xEOS2->getExtendedControlOverEmbeddedObject());

  if (xEmbObj->getCurrentState() ==
com::sun::star::embed::EmbedStates::LOADED)
      xEmbObj->changeState( com::sun::star::embed::EmbedStates::RUNNING);
  if (xEmbObj->getCurrentState() ==
com::sun::star::embed::EmbedStates::RUNNING)
      xEmbObj->changeState(
com::sun::star::embed::EmbedStates::INPLACE_ACTIVE);
  if (xEmbObj->getCurrentState() ==
com::sun::star::embed::EmbedStates::INPLACE_ACTIVE)
      xEmbObj->changeState( com::sun::star::embed::EmbedStates::RUNNING);

which works on Windows. On Linux this works better:

  Reference < XEmbeddedObjectSupplier > xEOS(xChart, UNO_QUERY_THROW);
  Reference < ::com::sun::star::chart::XChartDocument >
cDoc(xEOS->getEmbeddedObject(), UNO_QUERY_THROW);

  Reference< XPropertySet > dProperties(cDoc->getDiagram(),
UNO_QUERY_THROW);
  Any type = dProperties->getPropertyValue(OU("SplineType"));
  dProperties->setPropertyValue(OU("SplineType"), makeAny(sal_uInt32(0)));
  dProperties->setPropertyValue(OU("SplineType"), makeAny(sal_uInt32(1)));
  dProperties->setPropertyValue(OU("SplineType"), type);

Regards,
    Jan

_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.