summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@suse.com>2012-11-12 17:21:24 +0000
committerMichael Meeks <michael.meeks@suse.com>2012-11-15 16:06:08 +0000
commit17ff7b41d15ab9928e2e2706faa26234a09802cd (patch)
tree597ca5fd177dfd74990db5b8ce49e21759a612f6 /svx
parentf2d8b05b73f058cd4b9e3e8b5a3e54c5047c2c8a (diff)
re-base on ALv2 code. Includes:
Patches contributed by: Armin Le Grand. #118558# Correcting OLE attributes of LO3.4 at load time by loading as OOo3.3, details see task. http://svn.apache.org/viewvc?view=revision&revision=1195906 #118485# - Styles for OLEs are not saved. http://svn.apache.org/viewvc?view=revision&revision=1182166 #118898# Adapted ImpGraphic::ImplGetBitmap to correctly convert metafiles http://svn.apache.org/viewvc?view=revision&revision=1293316 #119337# Solves the wrong get/setPropertyValue calls in SvxShapeText (and thus in SvxOle2Shape) http://svn.apache.org/viewvc?view=revision&revision=1344156 Patches contributed by Mathias Bauer (and others) gnumake4 work variously http://svn.apache.org/viewvc?view=revision&revision=1394707 http://svn.apache.org/viewvc?view=revision&revision=1394326 cws mba34issues01: #i117717#: remove wrong assertion http://svn.apache.org/viewvc?view=revision&revision=1172349 Patch contributed by Herbert Duerr goodbye Registration and License dialogs, don't let the door hit you http://svn.apache.org/viewvc?view=revision&revision=1172613 help gcc 4.6.0 on 32bit ubuntu 11.10" http://svn.apache.org/viewvc?view=revision&revision=1245357 Do not add targets for junit tests when junit is disabled. Patch contributed by Andre Fischer http://svn.apache.org/viewvc?view=revision&revision=1241508 Revert "sb140: #i117082# avoid unncessary static class data members commit 21d97438e2944861e26e4984195f959a0cce1e41. remove obsolete FreeBSD visibility special case. retain consolidated BSD bridge code, remove OS/2 pieces.
Diffstat (limited to 'svx')
-rw-r--r--svx/inc/svx/unoshape.hxx43
-rw-r--r--svx/source/table/cell.cxx74
-rw-r--r--svx/source/table/cell.hxx25
-rw-r--r--svx/source/unodraw/unoprov.cxx66
-rw-r--r--svx/source/unodraw/unoshap4.cxx58
-rw-r--r--svx/source/unodraw/unoshape.cxx67
6 files changed, 195 insertions, 138 deletions
diff --git a/svx/inc/svx/unoshape.hxx b/svx/inc/svx/unoshape.hxx
index 99615a06a02b..1a1752900c2a 100644
--- a/svx/inc/svx/unoshape.hxx
+++ b/svx/inc/svx/unoshape.hxx
@@ -1,30 +1,22 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
+/*
+ * This file is part of the LibreOffice project.
*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
- * Copyright 2000, 2010 Oracle and/or its affiliates.
+ * This file incorporates work covered by the following license notice:
*
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
#ifndef _SVX_UNOSHAPE_HXX
#define _SVX_UNOSHAPE_HXX
@@ -562,10 +554,11 @@ public:
* *
***********************************************************************/
-class SVX_DLLPUBLIC SvxOle2Shape : public SvxShape
+// #i118485# changed parent to SvxShapeText to allow Text handling over UNO API
+class SVX_DLLPUBLIC SvxOle2Shape : public SvxShapeText
{
protected:
-// overide these for special property handling in subcasses. Return true if property is handled
+ // overide these for special property handling in subcasses. Return true if property is handled
virtual bool setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
virtual bool getPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
diff --git a/svx/source/table/cell.cxx b/svx/source/table/cell.cxx
index 9ffbd38e7ac4..7878426e1fe8 100644
--- a/svx/source/table/cell.cxx
+++ b/svx/source/table/cell.cxx
@@ -297,7 +297,7 @@ rtl::Reference< Cell > Cell::create( SdrTableObj& rTableObj, OutlinerParaObject*
Cell::Cell( SdrTableObj& rTableObj, OutlinerParaObject* pOutlinerParaObject ) throw()
: SdrText( rTableObj, pOutlinerParaObject )
-, Cell_Base( ImplGetSvxUnoOutlinerTextCursorSvxPropertySet() )
+, SvxUnoTextBase( ImplGetSvxUnoOutlinerTextCursorSvxPropertySet() )
, mpPropSet( ImplGetSvxCellPropertySet() )
, mpProperties( new sdr::properties::CellProperties( rTableObj, this ) )
, mnCellContentType( CellContentType_EMPTY )
@@ -744,6 +744,78 @@ sdr::properties::TextProperties* Cell::CloneProperties( SdrObject& rNewObj, Cell
}
// -----------------------------------------------------------------------------
+// XInterface
+// -----------------------------------------------------------------------------
+
+Any SAL_CALL Cell::queryInterface( const Type & rType ) throw(RuntimeException)
+{
+ if( rType == XMergeableCell::static_type() )
+ return Any( Reference< XMergeableCell >( this ) );
+
+ if( rType == XCell::static_type() )
+ return Any( Reference< XCell >( this ) );
+
+ if( rType == XLayoutConstrains::static_type() )
+ return Any( Reference< XLayoutConstrains >( this ) );
+
+ if( rType == XEventListener::static_type() )
+ return Any( Reference< XEventListener >( this ) );
+
+ Any aRet( SvxUnoTextBase::queryAggregation( rType ) );
+ if( aRet.hasValue() )
+ return aRet;
+
+ return ::cppu::OWeakObject::queryInterface( rType );
+}
+
+// -----------------------------------------------------------------------------
+
+void SAL_CALL Cell::acquire() throw ()
+{
+ ::cppu::OWeakObject::acquire();
+}
+
+// -----------------------------------------------------------------------------
+
+void SAL_CALL Cell::release() throw ()
+{
+ ::cppu::OWeakObject::release();
+}
+
+// -----------------------------------------------------------------------------
+// XTypeProvider
+// -----------------------------------------------------------------------------
+
+Sequence< Type > SAL_CALL Cell::getTypes( ) throw (RuntimeException)
+{
+ Sequence< Type > aTypes( SvxUnoTextBase::getTypes() );
+
+ sal_Int32 nLen = aTypes.getLength();
+ aTypes.realloc(nLen + 2);
+ aTypes[nLen++] = XMergeableCell::static_type();
+ aTypes[nLen++] = XLayoutConstrains::static_type();
+
+ return aTypes;
+}
+
+// -----------------------------------------------------------------------------
+
+Sequence< sal_Int8 > SAL_CALL Cell::getImplementationId( ) throw (RuntimeException)
+{
+ static ::cppu::OImplementationId* pId = 0;
+ if (! pId)
+ {
+ ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
+ if (! pId)
+ {
+ static ::cppu::OImplementationId aId;
+ pId = &aId;
+ }
+ }
+ return pId->getImplementationId();
+}
+
+// -----------------------------------------------------------------------------
// XServiceInfo
// -----------------------------------------------------------------------------
diff --git a/svx/source/table/cell.hxx b/svx/source/table/cell.hxx
index e9573f45bcfd..cff8c2cdbeb6 100644
--- a/svx/source/table/cell.hxx
+++ b/svx/source/table/cell.hxx
@@ -34,7 +34,6 @@
#include <com/sun/star/beans/XMultiPropertyStates.hpp>
#include <com/sun/star/lang/XEventListener.hpp>
-#include <cppuhelper/implbase3.hxx>
#include <rtl/ref.hxx>
#include <svl/style.hxx>
#include "svx/sdtaitm.hxx"
@@ -58,15 +57,12 @@ namespace sdr { namespace table {
// -----------------------------------------------------------------------------
-typedef
- cppu::AggImplInheritanceHelper3<
- SvxUnoTextBase,
- ::com::sun::star::table::XMergeableCell,
- ::com::sun::star::awt::XLayoutConstrains,
- ::com::sun::star::lang::XEventListener >
- Cell_Base;
-
-class SVX_DLLPUBLIC Cell : public SdrText, public Cell_Base
+class SVX_DLLPUBLIC Cell : public SdrText,
+ public SvxUnoTextBase,
+ public ::com::sun::star::table::XMergeableCell,
+ public ::com::sun::star::awt::XLayoutConstrains,
+ public ::com::sun::star::lang::XEventListener,
+ public ::cppu::OWeakObject
{
friend class CellUndo;
@@ -115,6 +111,15 @@ public:
SVX_DLLPRIVATE void setMerged();
+ // XInterface
+ SVX_DLLPRIVATE virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& Type ) throw (::com::sun::star::uno::RuntimeException);
+ SVX_DLLPRIVATE virtual void SAL_CALL acquire() throw ();
+ SVX_DLLPRIVATE virtual void SAL_CALL release() throw ();
+
+ // XTypeProvider
+ SVX_DLLPRIVATE virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw (::com::sun::star::uno::RuntimeException);
+ SVX_DLLPRIVATE virtual ::com::sun::star::uno::Sequence< ::sal_Int8 > SAL_CALL getImplementationId( ) throw (::com::sun::star::uno::RuntimeException);
+
// XServiceInfo
SVX_DLLPRIVATE virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException);
SVX_DLLPRIVATE virtual ::sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException);
diff --git a/svx/source/unodraw/unoprov.cxx b/svx/source/unodraw/unoprov.cxx
index 7e99ef6918bc..c6d4f584c28c 100644
--- a/svx/source/unodraw/unoprov.cxx
+++ b/svx/source/unodraw/unoprov.cxx
@@ -1,30 +1,21 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
+/*
+ * This file is part of the LibreOffice project.
*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
- * Copyright 2000, 2010 Oracle and/or its affiliates.
+ * This file incorporates work covered by the following license notice:
*
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
#include <sal/macros.h>
#include <com/sun/star/table/XTable.hpp>
@@ -249,7 +240,10 @@ SfxItemPropertyMapEntry* ImplGetSvxGraphicObjectPropertyMap()
LINE_PROPERTIES
LINE_PROPERTIES_START_END
SHAPE_DESCRIPTOR_PROPERTIES
- MISC_OBJ_PROPERTIES_NO_SHEAR
+
+ // #i118485# Full properties now, shear included
+ MISC_OBJ_PROPERTIES
+
LINKTARGET_PROPERTIES
SHADOW_PROPERTIES
TEXT_PROPERTIES
@@ -466,13 +460,17 @@ SfxItemPropertyMapEntry* ImplGetSvxOle2PropertyMap()
{
static SfxItemPropertyMapEntry aOle2PropertyMap_Impl[] =
{
- { MAP_CHAR_LEN("Transformation"), OWN_ATTR_TRANSFORMATION , &::getCppuType((const struct com::sun::star::drawing::HomogenMatrix3*)0), 0, 0 }, \
- { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_ZORDER), OWN_ATTR_ZORDER , &::getCppuType((const sal_Int32*)0), 0, 0},
- { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_LAYERID), SDRATTR_LAYERID , &::getCppuType((const sal_Int16*)0), 0, 0},
- { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_LAYERNAME),SDRATTR_LAYERNAME , &::getCppuType((const ::rtl::OUString*)0), 0, 0},
- { MAP_CHAR_LEN(UNO_NAME_LINKDISPLAYBITMAP), OWN_ATTR_LDBITMAP , &::getCppuType(( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XBitmap >*)0), ::com::sun::star::beans::PropertyAttribute::READONLY, 0},
- { MAP_CHAR_LEN(UNO_NAME_LINKDISPLAYNAME), OWN_ATTR_LDNAME , &::getCppuType(( const ::rtl::OUString*)0), ::com::sun::star::beans::PropertyAttribute::READONLY, 0},
- { MAP_CHAR_LEN(UNO_NAME_OLE2_METAFILE), OWN_ATTR_METAFILE , SEQTYPE(::getCppuType((::com::sun::star::uno::Sequence<sal_Int8>*)0)), ::com::sun::star::beans::PropertyAttribute::READONLY, 0},
+ // #i118485# Adding properties for line, fill, text, shadow, fontwork, rotate, shear
+ FILL_PROPERTIES
+ LINE_PROPERTIES
+ LINE_PROPERTIES_START_END
+ SHAPE_DESCRIPTOR_PROPERTIES
+ MISC_OBJ_PROPERTIES
+ LINKTARGET_PROPERTIES
+ SHADOW_PROPERTIES
+ TEXT_PROPERTIES
+ FONTWORK_PROPERTIES
+
{ MAP_CHAR_LEN("ThumbnailGraphicURL"), OWN_ATTR_THUMBNAIL , &::getCppuType(( const ::rtl::OUString*)0), 0, 0 },
{ MAP_CHAR_LEN("Model"), OWN_ATTR_OLEMODEL , &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >*)0), ::com::sun::star::beans::PropertyAttribute::READONLY, 0},
{ MAP_CHAR_LEN("EmbeddedObject"), OWN_ATTR_OLE_EMBEDDED_OBJECT , &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XEmbeddedObject >*)0), ::com::sun::star::beans::PropertyAttribute::READONLY, 0},
@@ -482,15 +480,9 @@ SfxItemPropertyMapEntry* ImplGetSvxOle2PropertyMap()
{ MAP_CHAR_LEN("IsInternal"), OWN_ATTR_INTERNAL_OLE , &::getBooleanCppuType() , ::com::sun::star::beans::PropertyAttribute::READONLY, 0},
{ MAP_CHAR_LEN("VisibleArea"), OWN_ATTR_OLE_VISAREA , &::getCppuType((const ::com::sun::star::awt::Rectangle*)0), 0, 0},
{ MAP_CHAR_LEN("Aspect"), OWN_ATTR_OLE_ASPECT , &::getCppuType((const sal_Int64*)0), 0, 0},
- { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_MOVEPROTECT), SDRATTR_OBJMOVEPROTECT, &::getBooleanCppuType(),0, 0},
- { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_SIZEPROTECT), SDRATTR_OBJSIZEPROTECT, &::getBooleanCppuType(),0, 0},
{ MAP_CHAR_LEN(UNO_NAME_OLE2_PERSISTNAME), OWN_ATTR_PERSISTNAME , &::getCppuType(( const ::rtl::OUString*)0), 0, 0 },
{ MAP_CHAR_LEN("LinkURL"), OWN_ATTR_OLE_LINKURL , &::getCppuType(( const ::rtl::OUString*)0), 0, 0 },
- { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_BOUNDRECT), OWN_ATTR_BOUNDRECT, &::getCppuType((const ::com::sun::star::awt::Rectangle*)0), ::com::sun::star::beans::PropertyAttribute::READONLY, 0},
{ MAP_CHAR_LEN(UNO_NAME_GRAPHOBJ_GRAPHIC), OWN_ATTR_VALUE_GRAPHIC , &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic>*)0), 0, 0},
- // #i68101#
- { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_TITLE), OWN_ATTR_MISC_OBJ_TITLE , &::getCppuType((const ::rtl::OUString*)0), 0, 0},
- { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_DESCRIPTION), OWN_ATTR_MISC_OBJ_DESCRIPTION , &::getCppuType((const ::rtl::OUString*)0), 0, 0},
{0,0,0,0,0,0}
};
diff --git a/svx/source/unodraw/unoshap4.cxx b/svx/source/unodraw/unoshap4.cxx
index ab308e5d40a2..27f3f074b1e1 100644
--- a/svx/source/unodraw/unoshap4.cxx
+++ b/svx/source/unodraw/unoshap4.cxx
@@ -1,30 +1,21 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
+/*
+ * This file is part of the LibreOffice project.
*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
- * Copyright 2000, 2010 Oracle and/or its affiliates.
+ * This file incorporates work covered by the following license notice:
*
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
#include <com/sun/star/util/XModifiable.hpp>
#include <com/sun/star/embed/XLinkageSupport.hpp>
@@ -73,12 +64,13 @@ using namespace ::com::sun::star::beans;
///////////////////////////////////////////////////////////////////////
SvxOle2Shape::SvxOle2Shape( SdrObject* pObject ) throw()
-: SvxShape( pObject, getSvxMapProvider().GetMap(SVXMAP_OLE2), getSvxMapProvider().GetPropertySet(SVXMAP_OLE2, SdrObject::GetGlobalDrawObjectItemPool()) )
+: SvxShapeText( pObject, getSvxMapProvider().GetMap(SVXMAP_OLE2),
+ getSvxMapProvider().GetPropertySet(SVXMAP_OLE2,SdrObject::GetGlobalDrawObjectItemPool()) )
{
}
SvxOle2Shape::SvxOle2Shape( SdrObject* pObject, const SfxItemPropertyMapEntry* pPropertyMap, const SvxItemPropertySet* pPropertySet ) throw ()
-: SvxShape( pObject, pPropertyMap, pPropertySet )
+: SvxShapeText( pObject, pPropertyMap, pPropertySet )
{
}
@@ -88,7 +80,7 @@ SvxOle2Shape::~SvxOle2Shape() throw()
::com::sun::star::uno::Any SAL_CALL SvxOle2Shape::queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException)
{
- return SvxShape::queryAggregation( rType );
+ return SvxShapeText::queryAggregation( rType );
}
//XPropertySet
@@ -197,7 +189,7 @@ bool SvxOle2Shape::setPropertyValueImpl( const ::rtl::OUString& rName, const Sfx
break;
}
default:
- return SvxShape::setPropertyValueImpl( rName, pProperty, rValue );
+ return SvxShapeText::setPropertyValueImpl( rName, pProperty, rValue );
}
throw IllegalArgumentException();
@@ -399,7 +391,7 @@ bool SvxOle2Shape::getPropertyValueImpl( const ::rtl::OUString& rName, const Sfx
break;
}
default:
- return SvxShape::getPropertyValueImpl( rName, pProperty, rValue );
+ return SvxShapeText::getPropertyValueImpl( rName, pProperty, rValue );
}
return true;
@@ -417,7 +409,7 @@ sal_Bool SvxOle2Shape::createObject( const SvGlobalName &aClassName )
::comphelper::IEmbeddedHelper* pPersist = mpModel->GetPersist();
::rtl::OUString aPersistName;
OUString aTmpStr;
- if( getPropertyValue( OUString( UNO_NAME_OLE2_PERSISTNAME ) ) >>= aTmpStr )
+ if( SvxShape::getPropertyValue( UNO_NAME_OLE2_PERSISTNAME ) >>= aTmpStr )
aPersistName = aTmpStr;
//TODO/LATER: how to cope with creation failure?!
@@ -448,7 +440,7 @@ sal_Bool SvxOle2Shape::createObject( const SvGlobalName &aClassName )
}
// connect the object after the visual area is set
- setPropertyValue( OUString( UNO_NAME_OLE2_PERSISTNAME ), Any( aTmpStr = aPersistName ) );
+ SvxShape::setPropertyValue( UNO_NAME_OLE2_PERSISTNAME, Any( aTmpStr = aPersistName ) );
// the object is inserted during setting of PersistName property usually
if( pOle2Obj->IsEmpty() )
@@ -511,7 +503,7 @@ sal_Bool SvxOle2Shape::createLink( const ::rtl::OUString& aLinkURL )
}
// connect the object after the visual area is set
- setPropertyValue( OUString( UNO_NAME_OLE2_PERSISTNAME ), uno::makeAny( aPersistName ) );
+ SvxShape::setPropertyValue( UNO_NAME_OLE2_PERSISTNAME, uno::makeAny( aPersistName ) );
// the object is inserted during setting of PersistName property usually
if ( pOle2Obj->IsEmpty() )
@@ -677,7 +669,7 @@ void SAL_CALL SvxPluginShape::setPropertyValue( const ::rtl::OUString& aProperty
void SAL_CALL SvxPluginShape::setPropertyValues( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& rValues ) throw (::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
{
- SvxOle2Shape::setPropertyValues( aPropertyNames, rValues );
+ SvxShape::setPropertyValues( aPropertyNames, rValues );
resetModifiedState();
}
@@ -750,7 +742,7 @@ void SAL_CALL SvxFrameShape::setPropertyValue( const ::rtl::OUString& aPropertyN
void SAL_CALL SvxFrameShape::setPropertyValues( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& rValues ) throw (::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
{
- SvxOle2Shape::setPropertyValues( aPropertyNames, rValues );
+ SvxShape::setPropertyValues( aPropertyNames, rValues );
resetModifiedState();
}
diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx
index 975f573f63a4..7855f82b488b 100644
--- a/svx/source/unodraw/unoshape.cxx
+++ b/svx/source/unodraw/unoshape.cxx
@@ -1,30 +1,21 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/**h***********************************************************************
+/*
+ * This file is part of the LibreOffice project.
*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
- * Copyright 2000, 2010 Oracle and/or its affiliates.
+ * This file incorporates work covered by the following license notice:
*
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
#include <cppuhelper/typeprovider.hxx>
#include <com/sun/star/awt/XBitmap.hpp>
@@ -760,7 +751,6 @@ uno::Sequence< uno::Type > SAL_CALL SvxShape::_getTypes()
switch( mpImpl->mnObjId )
{
// shapes without text
- case OBJ_OLE2:
case OBJ_PAGE:
case OBJ_FRAME:
case OBJ_OLE2_PLUGIN:
@@ -992,6 +982,7 @@ uno::Sequence< uno::Type > SAL_CALL SvxShape::_getTypes()
case OBJ_TEXT:
case OBJ_CAPTION:
case OBJ_TABLE:
+ case OBJ_OLE2: // #i118485# Moved to shapes with text
default:
{
static ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > aTypeSequence;
@@ -3605,9 +3596,22 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames()
{
static uno::Sequence< OUString > SvxShape_Ole2Services;
- comphelper::ServiceInfoHelper::addToSequence( SvxShape_Ole2Services, 2,
+ comphelper::ServiceInfoHelper::addToSequence( SvxShape_Ole2Services, 12,
sUNO_service_drawing_OLE2Shape,
- sUNO_service_drawing_Shape);
+ sUNO_service_drawing_Shape,
+
+ // #i118485# Added Text, Shadow and Rotation
+ sUNO_service_drawing_Text,
+ sUNO_service_drawing_TextProperties,
+ sUNO_service_style_ParagraphProperties,
+ sUNO_service_style_ParagraphPropertiesComplex,
+ sUNO_service_style_ParagraphPropertiesAsian,
+ sUNO_service_style_CharacterProperties,
+ sUNO_service_style_CharacterPropertiesComplex,
+ sUNO_service_style_CharacterPropertiesAsian,
+
+ sUNO_service_drawing_ShadowProperties,
+ sUNO_service_drawing_RotationDescriptor);
pSeq = &SvxShape_Ole2Services;
}
@@ -3991,7 +3995,7 @@ SvxShapeText::SvxShapeText( SdrObject* pObject ) throw ()
: SvxShape( pObject, getSvxMapProvider().GetMap(SVXMAP_TEXT), getSvxMapProvider().GetPropertySet(SVXMAP_TEXT, SdrObject::GetGlobalDrawObjectItemPool()) ), SvxUnoTextBase( ImplGetSvxUnoOutlinerTextCursorSvxPropertySet() )
{
if( pObject && pObject->GetModel() )
- SetEditSource( new SvxTextEditSource( pObject, 0, static_cast< cppu::OWeakObject * >( static_cast< SvxShape * >( this ) ) ) );
+ SetEditSource( new SvxTextEditSource( pObject, 0, static_cast< uno::XWeak * >( this ) ) );
}
//----------------------------------------------------------------------
@@ -3999,7 +4003,7 @@ SvxShapeText::SvxShapeText( SdrObject* pObject, const SfxItemPropertyMapEntry* p
: SvxShape( pObject, pPropertyMap, pPropertySet ), SvxUnoTextBase( ImplGetSvxUnoOutlinerTextCursorSvxPropertySet() )
{
if( pObject && pObject->GetModel() )
- SetEditSource( new SvxTextEditSource( pObject, 0, static_cast< cppu::OWeakObject * >( static_cast< SvxShape * >( this ) ) ) );
+ SetEditSource( new SvxTextEditSource( pObject, 0, static_cast< uno::XWeak * >( this ) ) );
}
//----------------------------------------------------------------------
@@ -4013,8 +4017,7 @@ SvxShapeText::~SvxShapeText() throw ()
void SvxShapeText::Create( SdrObject* pNewObj, SvxDrawPage* pNewPage )
{
if( pNewObj && (NULL == GetEditSource()))
- SetEditSource( new SvxTextEditSource( pNewObj, 0, static_cast< cppu::OWeakObject * >( static_cast< SvxShape* >(this) ) ) );
-
+ SetEditSource( new SvxTextEditSource( pNewObj, 0, static_cast< uno::XWeak* >(this) ) );
SvxShape::Create( pNewObj, pNewPage );
}
@@ -4247,12 +4250,12 @@ uno::Any SAL_CALL SvxShapeRect::queryAggregation( const uno::Type & rType ) thro
void SAL_CALL SvxShapeRect::acquire() throw()
{
- SvxShapeText::acquire();
+ OWeakAggObject::acquire();
}
void SAL_CALL SvxShapeRect::release() throw()
{
- SvxShapeText::release();
+ OWeakAggObject::release();
}
//----------------------------------------------------------------------
// XServiceInfo