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


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


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.