LCOV - code coverage report
Current view: top level - test/source/sheet - cellproperties.cxx (source / functions) Hit Total Coverage
Test: commit e02a6cb2c3e2b23b203b422e4e0680877f232636 Lines: 0 31 0.0 %
Date: 2014-04-14 Functions: 0 4 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       5             :  * This Source Code Form is subject to the terms of the Mozilla Public
       6             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       7             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       8             :  */
       9             : 
      10             : #include <test/sheet/cellproperties.hxx>
      11             : 
      12             : #include <com/sun/star/beans/XPropertySet.hpp>
      13             : #include <com/sun/star/table/CellVertJustify.hpp>
      14             : 
      15             : #include "cppunit/extensions/HelperMacros.h"
      16             : #include <iostream>
      17             : 
      18             : using namespace css;
      19             : using namespace css::uno;
      20             : 
      21             : namespace apitest {
      22             : 
      23           0 : void CellProperties::testVertJustify()
      24             : {
      25           0 :     uno::Reference< beans::XPropertySet > xCellRangeBase(init(),UNO_QUERY_THROW);
      26           0 :     OUString aVertJustify("VertJustify");
      27           0 :     uno::Any aOldVertJustify = xCellRangeBase->getPropertyValue(aVertJustify);
      28           0 :     sal_Int32 aValue = 0;
      29           0 :     CPPUNIT_ASSERT(aOldVertJustify >>= aValue);
      30           0 :     std::cout << "Old VertJustify value: " << aValue << std::endl;
      31             : 
      32           0 :     uno::Any aNewVertJustify;
      33           0 :     aNewVertJustify <<= static_cast<sal_Int32>(3);
      34           0 :     xCellRangeBase->setPropertyValue(aVertJustify, aNewVertJustify);
      35           0 :     uno::Any aVertJustifyControllValue = xCellRangeBase->getPropertyValue(aVertJustify);
      36           0 :     CPPUNIT_ASSERT(aVertJustifyControllValue >>= aValue);
      37           0 :     std::cout << "New VertJustify value: " << aValue << std::endl;
      38           0 :     CPPUNIT_ASSERT_MESSAGE("value has not been changed", aValue == 3);
      39           0 : }
      40             : 
      41           0 : void CellProperties::testRotateReference()
      42             : {
      43           0 :     uno::Reference< beans::XPropertySet > xCellRangeBase(init(),UNO_QUERY_THROW);
      44           0 :     OUString aRotateReference("RotateReference");
      45           0 :     uno::Any aOldRotateReference = xCellRangeBase->getPropertyValue(aRotateReference);
      46           0 :     sal_Int32 aValue = 0;
      47           0 :     CPPUNIT_ASSERT(aOldRotateReference >>= aValue);
      48           0 :     std::cout << "Old RotateReference Value: " << aValue << std::endl;
      49             : 
      50           0 :     uno::Any aNewRotateReference;
      51           0 :     aNewRotateReference <<= static_cast<sal_Int32>(3);
      52           0 :     xCellRangeBase->setPropertyValue(aRotateReference, aNewRotateReference);
      53           0 :     uno::Any aRotateReferenceControllValue = xCellRangeBase->getPropertyValue(aRotateReference);
      54           0 :     CPPUNIT_ASSERT(aRotateReferenceControllValue >>= aValue);
      55           0 :     std::cout << "New RotateReference value: " << aValue << std::endl;
      56           0 :     CPPUNIT_ASSERT_MESSAGE("value has not been changed", aValue == 3);
      57           0 : }
      58             : 
      59           0 : }
      60             : 
      61             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10