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


Hello

I am working on bug tdf#104290
https://bugs.documentfoundation.org/show_bug.cgi?id=104290
I've sended a patch for fix and i need to send unit test. I've couldnt
found unit test for text rotation inside textbox. I've just found one
property named "TextRotation" and i've tried it but i get error called
UnknownPropertyException. I did search opengrok but i couldnt found
anything else.

This is my unit test:

void ScFiltersTest::testTdf104290XLSX()
{
    ScDocShellRef xDocSh = loadDoc("tdf104290.", FORMAT_XLSX);
    CPPUNIT_ASSERT_MESSAGE("Failed to load tdf104290 .xlsx", xDocSh.is());
    uno::Reference< drawing::XDrawPagesSupplier > xDoc(
        xDocSh->GetModel(), uno::UNO_QUERY_THROW );
    uno::Reference< drawing::XDrawPage > xPage(
        xDoc->getDrawPages()->getByIndex(0), uno::UNO_QUERY_THROW );
    uno::Reference< drawing::XShape > xShape(
        xPage->getByIndex(0), uno::UNO_QUERY_THROW );
    CPPUNIT_ASSERT_MESSAGE( "failed to load shape", xShape.is() );
    uno::Reference< beans::XPropertySet > xShapeProperties(
        xShape, uno::UNO_QUERY );
    sal_Int32 nTextRotate = 0;
    xShapeProperties->getPropertyValue("TextRotation") >>= nTextRotate;
    CPPUNIT_ASSERT(nTextRotate == 0);
    xDocSh->DoClose();
}

Is there any example unit test for text rotation inside textbox or
somebody knows property name of text rotation inside textbox? Thank
you very much

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.