Re: help in writing tests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Regina ,Miklos, all,

Thanks for the great help and the code pointers .
I tried to modify the code from SdImportTest::testTdf97808() in
sd/qa/unit/import-tests.cxx.
In the code for tdf97808 a line is inspected and using the property 
getPropertyValue("Style") it was checked if it is equal to the property "objectwithoutfill" .
Observing a few more tests I replaced XLine with Xshape  and compared for "Style"

    uno::Reference<beans::XPropertySet> xLine(
          xPage->getByIndex(0), uno::UNO_QUERY_THROW);
    uno::Reference<beans::XPropertySet> xParent;
    CPPUNIT_ASSERT(xLine->getPropertyValue("Style") >>= xParent);
    CPPUNIT_ASSERT_EQUAL(xStyle, xParent);

to

    uno::Reference< drawing::XShape > xShape(
        xPage->getByIndex(0), uno::UNO_QUERY_THROW );
    uno::Reference<beans::XPropertySet> xParent;
    CPPUNIT_ASSERT(xShape->getPropertyValue("Style") >>= xParent);
    CPPUNIT_ASSERT_EQUAL(xStyle, xParent);

but xShape does not have getPropertyValue("") method hence the build failed .
Can we do some modification to xShape ?
Maybe changing the method or something

Also ,  tdf123684 is very similar to tdf123841 , Check for an object and inspect 
its style to be FillStyle_NONE, I used the code and have submitted a patch
https://gerrit.libreoffice.org/c/core/+/87440
and here is the build
 https://ci.libreoffice.org/job/gerrit_master/48393/
I may be wrong in both the approaches.
Please have a look , and suggest me furthur steps.

SIncerely ,
Shivam

On Thu, 23 Jan 2020 at 16:23, Regina Henschel <rb.henschel@xxxxxxxxxxx> wrote:

> I had some private mails with Shivam. I have suggested to create a new
> document and verify, that the default style has filling NONE.

default style --> style, which is "Object without fill" in the UI
_______________________________________________
LibreOffice mailing list
LibreOffice@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/libreoffice
_______________________________________________
LibreOffice mailing list
LibreOffice@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/libreoffice

[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux