charthelper.cxx (78d93489) | charthelper.cxx (6f0b96b4) |
---|---|
1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 19 unchanged lines hidden (view full) --- 28#include <sot/clsids.hxx> 29#include <com/sun/star/lang/XUnoTunnel.hpp> 30#include <com/sun/star/util/XUpdatable.hpp> 31#include <com/sun/star/drawing/XDrawPageSupplier.hpp> 32#include <com/sun/star/lang/XMultiServiceFactory.hpp> 33#include <comphelper/processfactory.hxx> 34#include <com/sun/star/graphic/XPrimitiveFactory2D.hpp> 35#include <drawinglayer/geometry/viewinformation2d.hxx> | 1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 19 unchanged lines hidden (view full) --- 28#include <sot/clsids.hxx> 29#include <com/sun/star/lang/XUnoTunnel.hpp> 30#include <com/sun/star/util/XUpdatable.hpp> 31#include <com/sun/star/drawing/XDrawPageSupplier.hpp> 32#include <com/sun/star/lang/XMultiServiceFactory.hpp> 33#include <comphelper/processfactory.hxx> 34#include <com/sun/star/graphic/XPrimitiveFactory2D.hpp> 35#include <drawinglayer/geometry/viewinformation2d.hxx> |
36#include <com/sun/star/chart2/XChartDocument.hpp> 37#include <com/sun/star/drawing/FillStyle.hpp> 38#include <com/sun/star/drawing/LineStyle.hpp> |
|
36 | 39 |
37//// header for function rtl_createUuid 38//#include <rtl/uuid.h> 39//#include <vcl/pdfextoutdevdata.hxx> 40// 41//#include <com/sun/star/lang/XUnoTunnel.hpp> 42//#include <com/sun/star/lang/XMultiServiceFactory.hpp> 43//#include <svtools/embedhlp.hxx> 44 | |
45////////////////////////////////////////////////////////////////////////////// 46 47using namespace ::com::sun::star; 48 49////////////////////////////////////////////////////////////////////////////// 50 51bool ChartHelper::IsChart(const svt::EmbeddedObjectRef& xObjRef) 52{ --- 81 unchanged lines hidden (view full) --- 134 135 rRange = drawinglayer::primitive2d::getB2DRangeFromPrimitive2DSequence(aRetval, aViewInformation2D); 136 } 137 } 138 139 return aRetval; 140} 141 | 40////////////////////////////////////////////////////////////////////////////// 41 42using namespace ::com::sun::star; 43 44////////////////////////////////////////////////////////////////////////////// 45 46bool ChartHelper::IsChart(const svt::EmbeddedObjectRef& xObjRef) 47{ --- 81 unchanged lines hidden (view full) --- 129 130 rRange = drawinglayer::primitive2d::getB2DRangeFromPrimitive2DSequence(aRetval, aViewInformation2D); 131 } 132 } 133 134 return aRetval; 135} 136 |
137void ChartHelper::AdaptDefaultsForChart( 138 const uno::Reference < embed::XEmbeddedObject > & xEmbObj, 139 bool bNoFillStyle, 140 bool bNoLineStyle) 141{ 142 if( xEmbObj.is()) 143 { 144 uno::Reference< chart2::XChartDocument > xChartDoc( xEmbObj->getComponent(), uno::UNO_QUERY ); 145 OSL_ENSURE( xChartDoc.is(), "Trying to set chart property to non-chart OLE" ); 146 if( !xChartDoc.is()) 147 return; 148 149 try 150 { 151 // set background to transparent (none) 152 uno::Reference< beans::XPropertySet > xPageProp( xChartDoc->getPageBackground()); 153 if( xPageProp.is()) 154 xPageProp->setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FillStyle")), 155 uno::makeAny( drawing::FillStyle_NONE )); 156 // set no border 157 if( xPageProp.is()) 158 xPageProp->setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("LineStyle")), 159 uno::makeAny( drawing::LineStyle_NONE )); 160 } 161 catch( const uno::Exception & ) 162 { 163 OSL_ENSURE( false, "Exception caught in AdaptDefaultsForChart" ); 164 } 165 } 166} 167 |
|
142////////////////////////////////////////////////////////////////////////////// 143// eof | 168////////////////////////////////////////////////////////////////////////////// 169// eof |