diff options
author | Jan Holesovsky <kendy@suse.cz> | 2011-03-18 15:55:08 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@suse.cz> | 2011-03-18 15:55:08 +0100 |
commit | 4fdd55226d2972e3a256426db3122ac23b0615c6 (patch) | |
tree | 23f5b3a68382d6d3b8db0cb5e2537ed74a228d7c /comphelper/source/property | |
parent | c3d5444d84e18fa82235bb9d419861ac5e54f544 (diff) | |
parent | e1028d9225bc47922c387aa462887c7643bc6c40 (diff) |
Merge remote-tracking branch 'origin/integration/dev300_m101'
Conflicts:
comphelper/source/misc/servicedecl.cxx
i18npool/source/breakiterator/breakiteratorImpl.cxx
l10ntools/scripts/localize.pl
svl/source/items/itemset.cxx
svl/source/memtools/svarray.cxx
svl/source/numbers/zformat.cxx
svtools/source/brwbox/brwbox1.cxx
tools/source/stream/strmwnt.cxx
vcl/inc/vcl/graphite_adaptors.hxx
vcl/inc/vcl/graphite_layout.hxx
vcl/inc/vcl/graphite_serverfont.hxx
vcl/source/control/imgctrl.cxx
vcl/source/gdi/outdev.cxx
vcl/source/gdi/outdev3.cxx
vcl/source/glyphs/gcach_ftyp.cxx
vcl/source/glyphs/graphite_adaptors.cxx
vcl/source/glyphs/graphite_layout.cxx
vcl/source/window/winproc.cxx
vcl/unx/source/fontmanager/fontconfig.cxx
Diffstat (limited to 'comphelper/source/property')
-rw-r--r-- | comphelper/source/property/TypeGeneration.cxx | 4 | ||||
-rw-r--r-- | comphelper/source/property/makefile.mk | 65 | ||||
-rw-r--r-- | comphelper/source/property/propagg.cxx | 24 |
3 files changed, 25 insertions, 68 deletions
diff --git a/comphelper/source/property/TypeGeneration.cxx b/comphelper/source/property/TypeGeneration.cxx index 75f101ca6c07..6c5f9e009e90 100644 --- a/comphelper/source/property/TypeGeneration.cxx +++ b/comphelper/source/property/TypeGeneration.cxx @@ -128,7 +128,8 @@ #include <com/sun/star/frame/XModel.hpp> // #i28749# #include <com/sun/star/drawing/HomogenMatrix3.hpp> -#include <com/sun/star/graphic/XGraphicProvider.hpp> +#include <com/sun/star/graphic/XGraphic.hpp> +#include <com/sun/star/embed/XEmbeddedObject.hpp> using ::rtl::OUString; using namespace ::com::sun::star; @@ -225,6 +226,7 @@ namespace comphelper case CPPUTYPE_SEQNAMEDVALUE: pType = &::getCppuType( (Sequence<beans::NamedValue>*)0 ); break; case CPPUTYPE_REFXGRAPHIC: pType = &::getCppuType( (Reference< graphic::XGraphic >*)0); break; case CPPUTYPE_TABLEBORDERDISTANCES: pType = &::getCppuType( (table::TableBorderDistances*)0 ); break; + case CPPUTPYE_REFEMBEDDEDOBJECT: pType = &embed::XEmbeddedObject::static_type(); break; default: OSL_FAIL( "Unknown CPPU type" ); } diff --git a/comphelper/source/property/makefile.mk b/comphelper/source/property/makefile.mk deleted file mode 100644 index 1bcdb4c8dd63..000000000000 --- a/comphelper/source/property/makefile.mk +++ /dev/null @@ -1,65 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# 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. -# -#************************************************************************* - -PRJ=..$/.. -PRJINC=..$/..$/inc -PRJNAME=comphelper -TARGET=property - -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ---------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files ------------------------------------- - -SLOFILES= \ - $(SLO)$/MasterPropertySetInfo.obj \ - $(SLO)$/MasterPropertySet.obj \ - $(SLO)$/ChainablePropertySetInfo.obj \ - $(SLO)$/ChainablePropertySet.obj \ - $(SLO)$/TypeGeneration.obj \ - $(SLO)$/genericpropertyset.obj\ - $(SLO)$/propertysethelper.obj \ - $(SLO)$/propertysetinfo.obj \ - $(SLO)$/composedprops.obj \ - $(SLO)$/propagg.obj \ - $(SLO)$/property.obj \ - $(SLO)$/propmultiplex.obj \ - $(SLO)$/propstate.obj \ - $(SLO)$/propertystatecontainer.obj \ - $(SLO)$/propertycontainer.obj \ - $(SLO)$/propertycontainerhelper.obj \ - $(SLO)$/propertybag.obj \ - $(SLO)$/opropertybag.obj - -# --- Targets ---------------------------------- - -.INCLUDE : target.mk - diff --git a/comphelper/source/property/propagg.cxx b/comphelper/source/property/propagg.cxx index a0ae86c9a735..15c509378fb6 100644 --- a/comphelper/source/property/propagg.cxx +++ b/comphelper/source/property/propagg.cxx @@ -88,20 +88,36 @@ OPropertyArrayAggregationHelper::OPropertyArrayAggregationHelper( const Property* pDelegateProps = _rProperties.getConstArray(); Property* pMergedProps = m_aProperties.getArray(); + // if properties are present both at the delegatee and the aggregate, then the former are supposed to win. + // So, we'll need an existence check. + ::std::set< ::rtl::OUString > aDelegatorProps; + // create the map for the delegator properties sal_Int32 nMPLoop = 0; for ( ; nMPLoop < nDelegatorProps; ++nMPLoop, ++pDelegateProps ) + { m_aPropertyAccessors[ pDelegateProps->Handle ] = OPropertyAccessor( -1, nMPLoop, sal_False ); + OSL_ENSURE( aDelegatorProps.find( pDelegateProps->Name ) == aDelegatorProps.end(), + "OPropertyArrayAggregationHelper::OPropertyArrayAggregationHelper: duplicate delegatee property!" ); + aDelegatorProps.insert( pDelegateProps->Name ); + } // create the map for the aggregate properties sal_Int32 nAggregateHandle = _nFirstAggregateId; pMergedProps += nDelegatorProps; - for ( ; nMPLoop < nMergedProps; ++nMPLoop, ++pMergedProps, ++pAggregateProps ) + for ( ; nMPLoop < nMergedProps; ++pAggregateProps ) { + // if the aggregate property is present at the delegatee already, ignore it + if ( aDelegatorProps.find( pAggregateProps->Name ) != aDelegatorProps.end() ) + { + --nMergedProps; + continue; + } + // next aggregate property - remember it *pMergedProps = *pAggregateProps; - // determine the handle for the property which we will expose to the ourside world + // determine the handle for the property which we will expose to the outside world sal_Int32 nHandle = -1; // ask the infor service first if ( _pInfoService ) @@ -124,7 +140,11 @@ OPropertyArrayAggregationHelper::OPropertyArrayAggregationHelper( // remember the accessor for this property m_aPropertyAccessors[ nHandle ] = OPropertyAccessor( pMergedProps->Handle, nMPLoop, sal_True ); pMergedProps->Handle = nHandle; + + ++nMPLoop; + ++pMergedProps; } + m_aProperties.realloc( nMergedProps ); pMergedProps = m_aProperties.getArray(); // reset, needed again below // sortieren der Properties nach Namen |