170f497fbSAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 370f497fbSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 470f497fbSAndrew Rist * or more contributor license agreements. See the NOTICE file 570f497fbSAndrew Rist * distributed with this work for additional information 670f497fbSAndrew Rist * regarding copyright ownership. The ASF licenses this file 770f497fbSAndrew Rist * to you under the Apache License, Version 2.0 (the 870f497fbSAndrew Rist * "License"); you may not use this file except in compliance 970f497fbSAndrew Rist * with the License. You may obtain a copy of the License at 1070f497fbSAndrew Rist * 1170f497fbSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 1270f497fbSAndrew Rist * 1370f497fbSAndrew Rist * Unless required by applicable law or agreed to in writing, 1470f497fbSAndrew Rist * software distributed under the License is distributed on an 1570f497fbSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 1670f497fbSAndrew Rist * KIND, either express or implied. See the License for the 1770f497fbSAndrew Rist * specific language governing permissions and limitations 1870f497fbSAndrew Rist * under the License. 1970f497fbSAndrew Rist * 2070f497fbSAndrew Rist *************************************************************/ 2170f497fbSAndrew Rist 22cdf0e10cSrcweir #include <cppuhelper/compbase1.hxx> 23cdf0e10cSrcweir #include <comphelper/broadcasthelper.hxx> 24cdf0e10cSrcweir 25cdf0e10cSrcweir #include <basegfx/matrix/b2dhommatrix.hxx> 26cdf0e10cSrcweir #include <basegfx/range/b2drectangle.hxx> 27cdf0e10cSrcweir #include <cppcanvas/spritecanvas.hxx> 28cdf0e10cSrcweir 29cdf0e10cSrcweir #include "view.hxx" 30cdf0e10cSrcweir #include "unoview.hxx" 31cdf0e10cSrcweir #include "unoviewcontainer.hxx" 32cdf0e10cSrcweir #include "shape.hxx" 33cdf0e10cSrcweir #include "tests.hxx" 34*d9ee14b8SDamjan Jovanovic #include "gtest/gtest.h" 35cdf0e10cSrcweir #include "com/sun/star/presentation/XSlideShowView.hpp" 36cdf0e10cSrcweir 37cdf0e10cSrcweir namespace target = slideshow::internal; 38cdf0e10cSrcweir using namespace ::com::sun::star; 39cdf0e10cSrcweir 40cdf0e10cSrcweir namespace 41cdf0e10cSrcweir { 42cdf0e10cSrcweir 43*d9ee14b8SDamjan Jovanovic class UnoViewContainerTest : public ::testing::Test 44cdf0e10cSrcweir { 45cdf0e10cSrcweir public: 46cdf0e10cSrcweir }; // class UnoViewContainerTest 47cdf0e10cSrcweir TEST_F(UnoViewContainerTest,testContainer)48*d9ee14b8SDamjan JovanovicTEST_F(UnoViewContainerTest, testContainer) 49*d9ee14b8SDamjan Jovanovic { 50*d9ee14b8SDamjan Jovanovic target::UnoViewContainer aContainer; 51cdf0e10cSrcweir 52*d9ee14b8SDamjan Jovanovic TestViewSharedPtr pView = createTestView(); 53*d9ee14b8SDamjan Jovanovic aContainer.addView( pView ); 54cdf0e10cSrcweir 55*d9ee14b8SDamjan Jovanovic ASSERT_TRUE( 1 == std::distance( aContainer.begin(), aContainer.end() )) << "Testing container size"; 56*d9ee14b8SDamjan Jovanovic ASSERT_TRUE( pView->paintScreen() ) << "Testing disposedness"; 57*d9ee14b8SDamjan Jovanovic aContainer.dispose(); 58*d9ee14b8SDamjan Jovanovic ASSERT_TRUE( 0 == std::distance( aContainer.begin(), aContainer.end() )) << "Testing dispose: container must be empty"; 59*d9ee14b8SDamjan Jovanovic ASSERT_TRUE( !pView->paintScreen() ) << "Testing dispose: all elements must receive dispose"; 60*d9ee14b8SDamjan Jovanovic } 61cdf0e10cSrcweir 62cdf0e10cSrcweir 63*d9ee14b8SDamjan Jovanovic } // namespace 64