chartuno.cxx (b3f79822) chartuno.cxx (7d1ce60b)
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

--- 5 unchanged lines hidden (view full) ---

14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied. See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
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

--- 5 unchanged lines hidden (view full) ---

14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied. See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
22
23
24// MARKER(update_precomp.py): autogen include statement, do not remove
25#include "precompiled_sc.hxx"
26
22// MARKER(update_precomp.py): autogen include statement, do not remove
23#include "precompiled_sc.hxx"
24
27
28#include <com/sun/star/embed/Aspects.hpp>
29#include <com/sun/star/awt/Size.hpp>
30#include <com/sun/star/beans/PropertyAttribute.hpp>
31#include <com/sun/star/chart2/data/XDataReceiver.hpp>
32#include <com/sun/star/chart/ChartDataRowSource.hpp>
33#include <com/sun/star/chart2/XChartDocument.hpp>
34#include <com/sun/star/embed/Aspects.hpp>
35#include <com/sun/star/table/CellRangeAddress.hpp>

--- 419 unchanged lines hidden (view full) ---

455
456ScChartObj::ScChartObj(ScDocShell* pDocSh, SCTAB nT, const String& rN)
457 :ScChartObj_Base( m_aMutex )
458 ,ScChartObj_PBase( ScChartObj_Base::rBHelper )
459 ,pDocShell( pDocSh )
460 ,nTab( nT )
461 ,aChartName( rN )
462{
25#include <com/sun/star/embed/Aspects.hpp>
26#include <com/sun/star/awt/Size.hpp>
27#include <com/sun/star/beans/PropertyAttribute.hpp>
28#include <com/sun/star/chart2/data/XDataReceiver.hpp>
29#include <com/sun/star/chart/ChartDataRowSource.hpp>
30#include <com/sun/star/chart2/XChartDocument.hpp>
31#include <com/sun/star/embed/Aspects.hpp>
32#include <com/sun/star/table/CellRangeAddress.hpp>

--- 419 unchanged lines hidden (view full) ---

452
453ScChartObj::ScChartObj(ScDocShell* pDocSh, SCTAB nT, const String& rN)
454 :ScChartObj_Base( m_aMutex )
455 ,ScChartObj_PBase( ScChartObj_Base::rBHelper )
456 ,pDocShell( pDocSh )
457 ,nTab( nT )
458 ,aChartName( rN )
459{
463 pDocShell->GetDocument()->AddUnoObject(*this);
464
460 pDocShell->GetDocument()->AddUnoObject(*this);
461 SdrOle2Obj* pObject = lcl_FindChartObj( pDocShell, nTab, aChartName );
462 if ( pObject && svt::EmbeddedObjectRef::TryRunningState( pObject->GetObjRef() ) )
463 aObjectName = pObject->GetName(); // #i121178#: keep the OLE object's name
465 uno::Sequence< table::CellRangeAddress > aInitialPropValue;
466 registerPropertyNoMember( ::rtl::OUString::createFromAscii( "RelatedCellRanges" ),
467 PROP_HANDLE_RELATED_CELLRANGES, beans::PropertyAttribute::MAYBEVOID,
468 ::getCppuType( &aInitialPropValue ), &aInitialPropValue );
469}
470
471ScChartObj::~ScChartObj()
472{

--- 323 unchanged lines hidden (view full) ---

796}
797
798void SAL_CALL ScChartObj::setName( const rtl::OUString& /* aName */ ) throw(uno::RuntimeException)
799{
800 ScUnoGuard aGuard;
801 throw uno::RuntimeException(); // name cannot be changed
802}
803
464 uno::Sequence< table::CellRangeAddress > aInitialPropValue;
465 registerPropertyNoMember( ::rtl::OUString::createFromAscii( "RelatedCellRanges" ),
466 PROP_HANDLE_RELATED_CELLRANGES, beans::PropertyAttribute::MAYBEVOID,
467 ::getCppuType( &aInitialPropValue ), &aInitialPropValue );
468}
469
470ScChartObj::~ScChartObj()
471{

--- 323 unchanged lines hidden (view full) ---

795}
796
797void SAL_CALL ScChartObj::setName( const rtl::OUString& /* aName */ ) throw(uno::RuntimeException)
798{
799 ScUnoGuard aGuard;
800 throw uno::RuntimeException(); // name cannot be changed
801}
802
803// XNamedEx
804
805rtl::OUString SAL_CALL ScChartObj::getDisplayName() throw(uno::RuntimeException)
806{
807 ScUnoGuard aGuard;
808 return aObjectName;
809}
810
811void SAL_CALL ScChartObj::setDisplayName( const rtl::OUString& aName ) throw(uno::RuntimeException)
812{
813 ScUnoGuard aGuard;
814 aObjectName = aName;
815}
816
804// XPropertySet
805
806uno::Reference< beans::XPropertySetInfo > ScChartObj::getPropertySetInfo() throw (uno::RuntimeException)
807{
808 return createPropertySetInfo( getInfoHelper() ) ;
809}
810
811//------------------------------------------------------------------------
812
813
814
817// XPropertySet
818
819uno::Reference< beans::XPropertySetInfo > ScChartObj::getPropertySetInfo() throw (uno::RuntimeException)
820{
821 return createPropertySetInfo( getInfoHelper() ) ;
822}
823
824//------------------------------------------------------------------------
825
826
827