diff options
Diffstat (limited to 'sd/source/ui/unoidl')
34 files changed, 140 insertions, 338 deletions
diff --git a/sd/source/ui/unoidl/DrawController.cxx b/sd/source/ui/unoidl/DrawController.cxx index 65fa2dbf0206..acd57f18d85c 100644 --- a/sd/source/ui/unoidl/DrawController.cxx +++ b/sd/source/ui/unoidl/DrawController.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: DrawController.cxx,v $ - * $Revision: 1.27 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sd/source/ui/unoidl/SdUnoDrawView.cxx b/sd/source/ui/unoidl/SdUnoDrawView.cxx index 6d54240a8899..5a497231158d 100644 --- a/sd/source/ui/unoidl/SdUnoDrawView.cxx +++ b/sd/source/ui/unoidl/SdUnoDrawView.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SdUnoDrawView.cxx,v $ - * $Revision: 1.35 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sd/source/ui/unoidl/SdUnoOutlineView.cxx b/sd/source/ui/unoidl/SdUnoOutlineView.cxx index 6e5c2592cbf0..5804765d633c 100644 --- a/sd/source/ui/unoidl/SdUnoOutlineView.cxx +++ b/sd/source/ui/unoidl/SdUnoOutlineView.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SdUnoOutlineView.cxx,v $ - * $Revision: 1.21 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sd/source/ui/unoidl/SdUnoPresView.cxx b/sd/source/ui/unoidl/SdUnoPresView.cxx index 2e42a82cb783..dcd5001ace38 100644 --- a/sd/source/ui/unoidl/SdUnoPresView.cxx +++ b/sd/source/ui/unoidl/SdUnoPresView.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SdUnoPresView.cxx,v $ - * $Revision: 1.10 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sd/source/ui/unoidl/SdUnoSlideView.cxx b/sd/source/ui/unoidl/SdUnoSlideView.cxx index c9708bde1c00..34121dc5ac4b 100644 --- a/sd/source/ui/unoidl/SdUnoSlideView.cxx +++ b/sd/source/ui/unoidl/SdUnoSlideView.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SdUnoSlideView.cxx,v $ - * $Revision: 1.17 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sd/source/ui/unoidl/UnoDocumentSettings.cxx b/sd/source/ui/unoidl/UnoDocumentSettings.cxx index 7a24893c3bc5..ed47e57b2130 100644 --- a/sd/source/ui/unoidl/UnoDocumentSettings.cxx +++ b/sd/source/ui/unoidl/UnoDocumentSettings.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: UnoDocumentSettings.cxx,v $ - * $Revision: 1.38 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -70,7 +67,7 @@ #else #include <svx/svdoutl.hxx> #endif -#include <svx/editstat.hxx> +#include <editeng/editstat.hxx> #include <svx/unoapi.hxx> #define MAP_LEN(x) x, sizeof(x)-1 diff --git a/sd/source/ui/unoidl/UnoDocumentSettings.hxx b/sd/source/ui/unoidl/UnoDocumentSettings.hxx index c615babb4569..432b02174e73 100644 --- a/sd/source/ui/unoidl/UnoDocumentSettings.hxx +++ b/sd/source/ui/unoidl/UnoDocumentSettings.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: UnoDocumentSettings.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sd/source/ui/unoidl/detreg.cxx b/sd/source/ui/unoidl/detreg.cxx index 8c674f5f6647..a45496d5d5a4 100644 --- a/sd/source/ui/unoidl/detreg.cxx +++ b/sd/source/ui/unoidl/detreg.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: detreg.cxx,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sd/source/ui/unoidl/facreg.cxx b/sd/source/ui/unoidl/facreg.cxx index 959f22e30cf1..b8dcba6beecd 100644 --- a/sd/source/ui/unoidl/facreg.cxx +++ b/sd/source/ui/unoidl/facreg.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: facreg.cxx,v $ - * $Revision: 1.15 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sd/source/ui/unoidl/makefile.mk b/sd/source/ui/unoidl/makefile.mk index 98c0cbaf3eef..b3e71df86740 100644 --- a/sd/source/ui/unoidl/makefile.mk +++ b/sd/source/ui/unoidl/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.21 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sd/source/ui/unoidl/randomnode.cxx b/sd/source/ui/unoidl/randomnode.cxx index a08c5853c390..9a57fd090c7a 100644 --- a/sd/source/ui/unoidl/randomnode.cxx +++ b/sd/source/ui/unoidl/randomnode.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: randomnode.cxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sd/source/ui/unoidl/sddetect.cxx b/sd/source/ui/unoidl/sddetect.cxx index a59b63a3df10..90767a332609 100644 --- a/sd/source/ui/unoidl/sddetect.cxx +++ b/sd/source/ui/unoidl/sddetect.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: sddetect.cxx,v $ - * $Revision: 1.12 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -40,9 +37,7 @@ #include <com/sun/star/frame/XModel.hpp> #include <com/sun/star/awt/XWindow.hpp> #include <com/sun/star/lang/XUnoTunnel.hpp> -#ifndef _UNOTOOLS_PROCESSFACTORY_HXX #include <comphelper/processfactory.hxx> -#endif #include <com/sun/star/beans/PropertyValue.hpp> #include <com/sun/star/container/XNameAccess.hpp> #include <com/sun/star/io/XInputStream.hpp> @@ -52,15 +47,10 @@ #include <com/sun/star/ucb/InteractiveAppException.hpp> #include <com/sun/star/ucb/XContent.hpp> #include <com/sun/star/packages/zip/ZipIOException.hpp> - - #include <framework/interaction.hxx> - -#ifndef _TOOLKIT_UNOHLP_HXX #include <toolkit/helper/vclunohelper.hxx> -#endif #include <ucbhelper/simpleinteractionrequest.hxx> - +#include <svtools/filter.hxx> #include <rtl/ustring.h> #include <rtl/logfile.hxx> #include <svl/itemset.hxx> @@ -80,7 +70,6 @@ #include <sfx2/docfilt.hxx> #include <sfx2/fcontnr.hxx> #include <sfx2/brokenpackageint.hxx> -#include <svx/impgrf.hxx> #include <svtools/FilterConfigItem.hxx> #include <sot/storage.hxx> #include <unotools/moduleoptions.hxx> @@ -378,7 +367,7 @@ SdFilterDetect::~SdFilterDetect() const String aFileName( aMedium.GetURLObject().GetMainURL( INetURLObject::NO_DECODE ) ); GraphicDescriptor aDesc( *pStm, &aFileName ); - GraphicFilter* pGrfFilter = GetGrfFilter(); + GraphicFilter* pGrfFilter = GraphicFilter::GetGraphicFilter(); if( !aDesc.Detect( FALSE ) ) { pFilter = 0; diff --git a/sd/source/ui/unoidl/sddetect.hxx b/sd/source/ui/unoidl/sddetect.hxx index 2c9002273a21..5daa3d0fe23e 100644 --- a/sd/source/ui/unoidl/sddetect.hxx +++ b/sd/source/ui/unoidl/sddetect.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: sddetect.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sd/source/ui/unoidl/unocpres.cxx b/sd/source/ui/unoidl/unocpres.cxx index 7a197f08f1d6..b8f48a6928aa 100644 --- a/sd/source/ui/unoidl/unocpres.cxx +++ b/sd/source/ui/unoidl/unocpres.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unocpres.cxx,v $ - * $Revision: 1.12 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -36,6 +33,7 @@ #include <vcl/svapp.hxx> #include <svx/svdpage.hxx> #include <comphelper/extract.hxx> +#include <comphelper/serviceinfohelper.hxx> #include "unohelp.hxx" #include "unomodel.hxx" @@ -84,7 +82,7 @@ OUString SAL_CALL SdXCustomPresentation::getImplementationName() sal_Bool SAL_CALL SdXCustomPresentation::supportsService( const OUString& ServiceName ) throw(uno::RuntimeException) { - return SvxServiceInfoHelper::supportsService( ServiceName, getSupportedServiceNames() ); + return comphelper::ServiceInfoHelper::supportsService( ServiceName, getSupportedServiceNames() ); } uno::Sequence< OUString > SAL_CALL SdXCustomPresentation::getSupportedServiceNames() @@ -305,7 +303,7 @@ OUString SAL_CALL SdXCustomPresentationAccess::getImplementationName() sal_Bool SAL_CALL SdXCustomPresentationAccess::supportsService( const OUString& ServiceName ) throw(uno::RuntimeException) { - return SvxServiceInfoHelper::supportsService( ServiceName, getSupportedServiceNames() ); + return comphelper::ServiceInfoHelper::supportsService( ServiceName, getSupportedServiceNames() ); } uno::Sequence< OUString > SAL_CALL SdXCustomPresentationAccess::getSupportedServiceNames() diff --git a/sd/source/ui/unoidl/unocpres.hxx b/sd/source/ui/unoidl/unocpres.hxx index f2af402a190d..1267b3a58b0a 100644 --- a/sd/source/ui/unoidl/unocpres.hxx +++ b/sd/source/ui/unoidl/unocpres.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unocpres.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sd/source/ui/unoidl/unodoc.cxx b/sd/source/ui/unoidl/unodoc.cxx index 55b7a59fa56f..a423692caa4f 100644 --- a/sd/source/ui/unoidl/unodoc.cxx +++ b/sd/source/ui/unoidl/unodoc.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unodoc.cxx,v $ - * $Revision: 1.12 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -69,12 +66,9 @@ uno::Reference< uno::XInterface > SAL_CALL SdDrawingDocument_createInstance( SdDLL::Init(); - const SfxObjectCreateMode eCreateMode = ( _nCreationFlags & SFXMODEL_EMBEDDED_OBJECT ) ? SFX_CREATE_MODE_EMBEDDED : SFX_CREATE_MODE_STANDARD; - const bool bScriptSupport = ( _nCreationFlags & SFXMODEL_DISABLE_EMBEDDED_SCRIPTS ) == 0; - SfxObjectShell* pShell = new ::sd::GraphicDocShell( - eCreateMode, FALSE, DOCUMENT_TYPE_DRAW, bScriptSupport ); + _nCreationFlags, FALSE, DOCUMENT_TYPE_DRAW ); return uno::Reference< uno::XInterface >( pShell->GetModel() ); } @@ -101,12 +95,9 @@ uno::Reference< uno::XInterface > SAL_CALL SdPresentationDocument_createInstance SdDLL::Init(); - const SfxObjectCreateMode eCreateMode = ( _nCreationFlags & SFXMODEL_EMBEDDED_OBJECT ) ? SFX_CREATE_MODE_EMBEDDED : SFX_CREATE_MODE_STANDARD; - const bool bScriptSupport = ( _nCreationFlags & SFXMODEL_DISABLE_EMBEDDED_SCRIPTS ) == 0; - SfxObjectShell* pShell = new ::sd::DrawDocShell( - eCreateMode, FALSE, DOCUMENT_TYPE_IMPRESS, bScriptSupport ); + _nCreationFlags, FALSE, DOCUMENT_TYPE_IMPRESS ); return uno::Reference< uno::XInterface >( pShell->GetModel() ); } diff --git a/sd/source/ui/unoidl/unohelp.hxx b/sd/source/ui/unoidl/unohelp.hxx index 713c3f5061d6..9f25da2c6089 100644 --- a/sd/source/ui/unoidl/unohelp.hxx +++ b/sd/source/ui/unoidl/unohelp.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unohelp.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sd/source/ui/unoidl/unokywds.cxx b/sd/source/ui/unoidl/unokywds.cxx index 2072c1be67ec..2f417a5f4709 100644 --- a/sd/source/ui/unoidl/unokywds.cxx +++ b/sd/source/ui/unoidl/unokywds.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unokywds.cxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sd/source/ui/unoidl/unolayer.cxx b/sd/source/ui/unoidl/unolayer.cxx index 17fad0f5fdc1..5ad9fe3fd555 100644 --- a/sd/source/ui/unoidl/unolayer.cxx +++ b/sd/source/ui/unoidl/unolayer.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unolayer.cxx,v $ - * $Revision: 1.15 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -39,6 +36,7 @@ #include <svx/svdpagv.hxx> #include <svx/unoshape.hxx> #include <svx/svdobj.hxx> +#include <comphelper/serviceinfohelper.hxx> // folgende fuer InsertSdPage() #include <svx/svdlayer.hxx> @@ -52,7 +50,7 @@ #include <unomodel.hxx> #include "unoprnms.hxx" #include <com/sun/star/lang/NoSupportException.hpp> - +#include <svx/svdpool.hxx> #include "unohelp.hxx" #include "FrameView.hxx" #include "DrawViewShell.hxx" @@ -94,7 +92,7 @@ const SvxItemPropertySet* ImplGetSdLayerPropertySet() { MAP_CHAR_LEN("Description"), WID_LAYER_DESC, &::getCppuType((const OUString*)0), 0, 0 }, { 0,0,0,0,0,0} }; - static SvxItemPropertySet aSDLayerPropertySet_Impl( aSdLayerPropertyMap_Impl ); + static SvxItemPropertySet aSDLayerPropertySet_Impl( aSdLayerPropertyMap_Impl, SdrObject::GetGlobalDrawObjectItemPool() ); return &aSDLayerPropertySet_Impl; } @@ -182,7 +180,7 @@ OUString SAL_CALL SdLayer::getImplementationName() sal_Bool SAL_CALL SdLayer::supportsService( const OUString& ServiceName ) throw(uno::RuntimeException) { - return SvxServiceInfoHelper::supportsService( ServiceName, getSupportedServiceNames() ); + return comphelper::ServiceInfoHelper::supportsService( ServiceName, getSupportedServiceNames() ); } uno::Sequence< OUString > SAL_CALL SdLayer::getSupportedServiceNames() @@ -523,7 +521,7 @@ OUString SAL_CALL SdLayerManager::getImplementationName() sal_Bool SAL_CALL SdLayerManager::supportsService( const OUString& ServiceName ) throw(uno::RuntimeException) { - return SvxServiceInfoHelper::supportsService( ServiceName, getSupportedServiceNames() ); + return comphelper::ServiceInfoHelper::supportsService( ServiceName, getSupportedServiceNames() ); } uno::Sequence< OUString > SAL_CALL SdLayerManager::getSupportedServiceNames() diff --git a/sd/source/ui/unoidl/unolayer.hxx b/sd/source/ui/unoidl/unolayer.hxx index 7ede7e5803d1..76ccc6e22ab1 100644 --- a/sd/source/ui/unoidl/unolayer.hxx +++ b/sd/source/ui/unoidl/unolayer.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unolayer.hxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx index 0222f972938e..5b0594ba58b0 100644 --- a/sd/source/ui/unoidl/unomodel.cxx +++ b/sd/source/ui/unoidl/unomodel.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unomodel.cxx,v $ - * $Revision: 1.114 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -43,21 +40,20 @@ #include <com/sun/star/presentation/XPresentation2.hpp> #include <osl/mutex.hxx> +#include <comphelper/serviceinfohelper.hxx> -#ifndef _UTL_SEQUENCE_HXX_ #include <comphelper/sequence.hxx> -#endif #include <rtl/uuid.h> #include <rtl/memory.h> -#include <svx/unofield.hxx> +#include <editeng/unofield.hxx> #include <unomodel.hxx> #include <sfx2/dispatch.hxx> #include <sfx2/bindings.hxx> #include <vcl/svapp.hxx> -#include <svx/UnoForbiddenCharsTable.hxx> +#include <editeng/UnoForbiddenCharsTable.hxx> #include <svx/svdoutl.hxx> -#include <svx/forbiddencharacterstable.hxx> +#include <editeng/forbiddencharacterstable.hxx> #include <svx/UnoNamespaceMap.hxx> #include <svx/svdlayer.hxx> #include <svx/svdsob.hxx> @@ -65,17 +61,16 @@ #include <svx/unofill.hxx> #include <svx/unopool.hxx> #include <svx/svdorect.hxx> -#include <svx/flditem.hxx> +#include <editeng/flditem.hxx> #include <vos/mutex.hxx> #include <toolkit/awt/vclxdevice.hxx> - -#include <svtools/unoimap.hxx> -#include <svx/unolingu.hxx> +#include <svx/svdpool.hxx> +#include <editeng/unolingu.hxx> #include <svx/svdpagv.hxx> - +#include <svtools/unoimap.hxx> #include <svx/unoshape.hxx> -#include <svx/unonrule.hxx> -#include <svx/eeitem.hxx> +#include <editeng/unonrule.hxx> +#include <editeng/eeitem.hxx> // #99870# Support creation of GraphicObjectResolver and EmbeddedObjectResolver #include <svx/xmleohlp.hxx> @@ -212,7 +207,7 @@ const SvxItemPropertySet* ImplGetDrawModelPropertySet() { MAP_CHAR_LEN(sUNO_Prop_HasValidSignatures), WID_MODEL_HASVALIDSIGNATURES, &::getCppuType(static_cast< const sal_Bool * >(0)), beans::PropertyAttribute::READONLY, 0 }, { 0,0,0,0,0,0 } }; - static SvxItemPropertySet aDrawModelPropertySet_Impl( aDrawModelPropertyMap_Impl ); + static SvxItemPropertySet aDrawModelPropertySet_Impl( aDrawModelPropertyMap_Impl, SdrObject::GetGlobalDrawObjectItemPool() ); return &aDrawModelPropertySet_Impl; } @@ -460,23 +455,9 @@ void SdXImpressDocument::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) { if( hasEventListeners() ) { - - bool bBackgroundShape = false; - - // the background shape itself has no api representation, so filter all notifies for it - const SdrObject* pSdrObj = pSdrHint->GetObject(); - if( pSdrObj && (pSdrObj->GetObjInventor() == SdrInventor) && (pSdrObj->GetObjIdentifier() == OBJ_RECT) ) - { - SdPage* pPage = (SdPage*)pSdrObj->GetPage(); - bBackgroundShape = pPage && (pPage->GetPresObjKind(const_cast<SdrObject*>(pSdrObj)) == PRESOBJ_BACKGROUND); - } - - if( !bBackgroundShape ) - { - document::EventObject aEvent; - if( SvxUnoDrawMSFactory::createEvent( mpDoc, pSdrHint, aEvent ) ) - notifyEvent( aEvent ); - } + document::EventObject aEvent; + if( SvxUnoDrawMSFactory::createEvent( mpDoc, pSdrHint, aEvent ) ) + notifyEvent( aEvent ); } if( pSdrHint->GetKind() == HINT_MODELCLEARED ) @@ -2748,13 +2729,9 @@ uno::Reference< drawing::XDrawPage > SAL_CALL SdMasterPagesAccess::insertNewByIn pMPage->SetLayoutName( aLayoutName ); mpDoc->InsertMasterPage(pMPage, (USHORT)nInsertPos); - { // insert background object - Point aBackgroundPos ( pMPage->GetLftBorder(), pMPage->GetUppBorder() ); - Size aBackgroundSize ( pMPage->GetSize() ); - aBackgroundSize.Width() -= pMPage->GetLftBorder() + pMPage->GetRgtBorder() - 1; - aBackgroundSize.Height() -= pMPage->GetUppBorder() + pMPage->GetLwrBorder() - 1; - Rectangle aBackgroundRect (aBackgroundPos, aBackgroundSize); - pMPage->CreatePresObj(PRESOBJ_BACKGROUND, FALSE, aBackgroundRect, sal_True ); + { + // ensure default MasterPage fill + pMPage->EnsureMasterPageDefaultBackground(); } xDrawPage = uno::Reference< drawing::XDrawPage >::query( pMPage->getUnoPage() ); @@ -3034,7 +3011,7 @@ OUString SAL_CALL SdDocLinkTargets::getImplementationName() sal_Bool SAL_CALL SdDocLinkTargets::supportsService( const OUString& ServiceName ) throw(uno::RuntimeException) { - return SvxServiceInfoHelper::supportsService( ServiceName, getSupportedServiceNames() ); + return comphelper::ServiceInfoHelper::supportsService( ServiceName, getSupportedServiceNames() ); } uno::Sequence< OUString > SAL_CALL SdDocLinkTargets::getSupportedServiceNames() diff --git a/sd/source/ui/unoidl/unomodule.cxx b/sd/source/ui/unoidl/unomodule.cxx index 917304a9119f..7769f7e14dba 100644 --- a/sd/source/ui/unoidl/unomodule.cxx +++ b/sd/source/ui/unoidl/unomodule.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unomodule.cxx,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sd/source/ui/unoidl/unomodule.hxx b/sd/source/ui/unoidl/unomodule.hxx index 0a7d00a06cfc..bce015702ddd 100644 --- a/sd/source/ui/unoidl/unomodule.hxx +++ b/sd/source/ui/unoidl/unomodule.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unomodule.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sd/source/ui/unoidl/unoobj.cxx b/sd/source/ui/unoidl/unoobj.cxx index 5fedbcd717b3..54c3f88a6916 100644 --- a/sd/source/ui/unoidl/unoobj.cxx +++ b/sd/source/ui/unoidl/unoobj.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unoobj.cxx,v $ - * $Revision: 1.61 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -42,7 +39,7 @@ #include <vos/mutex.hxx> #include <svl/itemprop.hxx> #include <svl/style.hxx> - +#include <svx/svdpool.hxx> #include <sfx2/viewfrm.hxx> #include <sfx2/app.hxx> #include <svtools/unoimap.hxx> @@ -58,10 +55,11 @@ #include <svx/svdopath.hxx> #include <svx/svdoole2.hxx> #include <svx/svdograf.hxx> -#include <svx/outlobj.hxx> +#include <editeng/outlobj.hxx> #include "CustomAnimationPreset.hxx" #include "Outliner.hxx" #include "sdresid.hxx" +#include <comphelper/serviceinfohelper.hxx> #include "anminfo.hxx" #include "unohelp.hxx" @@ -247,12 +245,12 @@ static SdTypesCache gImplTypesCache; { if( bGraphicObj ) { - static SvxItemPropertySet aImpress_SdXShapePropertyGraphicSet_Impl( lcl_GetImpress_SdXShapePropertyGraphicMap_Impl()); + static SvxItemPropertySet aImpress_SdXShapePropertyGraphicSet_Impl( lcl_GetImpress_SdXShapePropertyGraphicMap_Impl(), SdrObject::GetGlobalDrawObjectItemPool()); pRet = &aImpress_SdXShapePropertyGraphicSet_Impl; } else { - static SvxItemPropertySet aImpress_SdXShapePropertySet_Impl(lcl_GetImpress_SdXShapePropertySimpleMap_Impl()); + static SvxItemPropertySet aImpress_SdXShapePropertySet_Impl(lcl_GetImpress_SdXShapePropertySimpleMap_Impl(), SdrObject::GetGlobalDrawObjectItemPool()); pRet = &aImpress_SdXShapePropertySet_Impl; } } @@ -260,12 +258,12 @@ static SdTypesCache gImplTypesCache; { if( bGraphicObj ) { - static SvxItemPropertySet aDraw_SdXShapePropertyGraphicSet_Impl(lcl_GetDraw_SdXShapePropertyGraphicMap_Impl()); + static SvxItemPropertySet aDraw_SdXShapePropertyGraphicSet_Impl(lcl_GetDraw_SdXShapePropertyGraphicMap_Impl(), SdrObject::GetGlobalDrawObjectItemPool()); pRet = &aDraw_SdXShapePropertyGraphicSet_Impl; } else { - static SvxItemPropertySet aDraw_SdXShapePropertySet_Impl( lcl_GetDraw_SdXShapePropertySimpleMap_Impl()); + static SvxItemPropertySet aDraw_SdXShapePropertySet_Impl( lcl_GetDraw_SdXShapePropertySimpleMap_Impl(), SdrObject::GetGlobalDrawObjectItemPool()); pRet = &aDraw_SdXShapePropertySet_Impl; } } @@ -282,7 +280,7 @@ static SdTypesCache gImplTypesCache; static const SvxItemPropertySet* lcl_GetEmpty_SdXShapePropertySet_Impl() { - static SvxItemPropertySet aEmptyPropSet( lcl_GetEmpty_SdXShapePropertyMap_Impl() ); + static SvxItemPropertySet aEmptyPropSet( lcl_GetEmpty_SdXShapePropertyMap_Impl(), SdrObject::GetGlobalDrawObjectItemPool() ); return &aEmptyPropSet; } const SvEventDescription* ImplGetSupportedMacroItems() @@ -957,7 +955,7 @@ uno::Sequence< ::rtl::OUString > SAL_CALL SdXShape::getSupportedServiceNames() t { uno::Sequence< OUString > aSeq( mpShape->_getSupportedServiceNames() ); - SvxServiceInfoHelper::addToSequence( aSeq, 2, "com.sun.star.presentation.Shape", + comphelper::ServiceInfoHelper::addToSequence( aSeq, 2, "com.sun.star.presentation.Shape", "com.sun.star.document.LinkTarget" ); SdrObject* pObj = mpShape->GetSdrObject(); @@ -967,10 +965,10 @@ uno::Sequence< ::rtl::OUString > SAL_CALL SdXShape::getSupportedServiceNames() t switch( nInventor ) { case OBJ_TITLETEXT: - SvxServiceInfoHelper::addToSequence( aSeq, 1, "com.sun.star.presentation.TitleTextShape" ); + comphelper::ServiceInfoHelper::addToSequence( aSeq, 1, "com.sun.star.presentation.TitleTextShape" ); break; case OBJ_OUTLINETEXT: - SvxServiceInfoHelper::addToSequence( aSeq, 1, "com.sun.star.presentation.OutlinerShape" ); + comphelper::ServiceInfoHelper::addToSequence( aSeq, 1, "com.sun.star.presentation.OutlinerShape" ); break; } } diff --git a/sd/source/ui/unoidl/unoobj.hxx b/sd/source/ui/unoidl/unoobj.hxx index 417e13bbdb60..3e7c3fab7d3c 100644 --- a/sd/source/ui/unoidl/unoobj.hxx +++ b/sd/source/ui/unoidl/unoobj.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unoobj.hxx,v $ - * $Revision: 1.13 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -40,7 +37,7 @@ #include <svx/svdpool.hxx> #include <svx/unomaster.hxx> -#include <svx/unoipset.hxx> +#include <editeng/unoipset.hxx> #include <cppuhelper/implbase2.hxx> diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx index 685bb4a48144..69d961d7237a 100644 --- a/sd/source/ui/unoidl/unopage.cxx +++ b/sd/source/ui/unoidl/unopage.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unopage.cxx,v $ - * $Revision: 1.96 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -44,23 +41,17 @@ #include <rtl/ustrbuf.hxx> #include <vcl/bitmapex.hxx> #include <vcl/metaact.hxx> -#ifndef _TOOLKIT_UNOIFACE_HXX #include <toolkit/unohlp.hxx> -#endif #include <vcl/svapp.hxx> #include <vcl/settings.hxx> #include <unomodel.hxx> #include <unopage.hxx> -#ifndef _SVX_SVXIDS_HRC #include <svx/svxids.hrc> -#endif #include <svl/itemset.hxx> #include <svx/svdmodel.hxx> #include <sdresid.hxx> #include <glob.hrc> -#ifndef _SD_PAGE_HXX //autogen #include <sdpage.hxx> -#endif #include <unoprnms.hxx> #include <sdattr.hxx> #include <drawdoc.hxx> @@ -71,13 +62,14 @@ #include <svl/style.hxx> #include <rtl/uuid.h> #include <rtl/memory.h> +#include <comphelper/serviceinfohelper.hxx> #include <comphelper/extract.hxx> #include <list> #include <svx/svditer.hxx> #include <svtools/wmf.hxx> #include <svx/svdoole2.hxx> - +#include <svx/svdpool.hxx> #include <svx/svdview.hxx> #include "misc.hxx" #include "View.hxx" @@ -259,19 +251,19 @@ const SvxItemPropertySet* ImplGetDrawPagePropertySet( sal_Bool bImpress, PageKin if( ePageKind == PK_STANDARD ) { //PK_STANDARD always has a background property - static SvxItemPropertySet aDrawPagePropertySet_Impl( aDrawPagePropertyMap_Impl ); + static SvxItemPropertySet aDrawPagePropertySet_Impl( aDrawPagePropertyMap_Impl, SdrObject::GetGlobalDrawObjectItemPool() ); pRet = &aDrawPagePropertySet_Impl; } else { if(bWithoutBackground) { - static SvxItemPropertySet aDrawPageNotesHandoutPropertyNoBackSet_Impl( aDrawPageNotesHandoutPropertyNoBackMap_Impl ); + static SvxItemPropertySet aDrawPageNotesHandoutPropertyNoBackSet_Impl( aDrawPageNotesHandoutPropertyNoBackMap_Impl, SdrObject::GetGlobalDrawObjectItemPool() ); pRet = &aDrawPageNotesHandoutPropertyNoBackSet_Impl; } else { - static SvxItemPropertySet aDrawPageNotesHandoutPropertySet_Impl( aDrawPageNotesHandoutPropertyMap_Impl ); + static SvxItemPropertySet aDrawPageNotesHandoutPropertySet_Impl( aDrawPageNotesHandoutPropertyMap_Impl, SdrObject::GetGlobalDrawObjectItemPool() ); pRet = &aDrawPageNotesHandoutPropertySet_Impl; } } @@ -280,12 +272,12 @@ const SvxItemPropertySet* ImplGetDrawPagePropertySet( sal_Bool bImpress, PageKin { if(bWithoutBackground) { - static SvxItemPropertySet aGraphicPagePropertyNoBackSet_Impl( aGraphicPagePropertyNoBackMap_Impl ); + static SvxItemPropertySet aGraphicPagePropertyNoBackSet_Impl( aGraphicPagePropertyNoBackMap_Impl, SdrObject::GetGlobalDrawObjectItemPool() ); pRet = &aGraphicPagePropertyNoBackSet_Impl; } else { - static SvxItemPropertySet aGraphicPagePropertySet_Impl( aGraphicPagePropertyMap_Impl ); + static SvxItemPropertySet aGraphicPagePropertySet_Impl( aGraphicPagePropertyMap_Impl, SdrObject::GetGlobalDrawObjectItemPool() ); pRet = &aGraphicPagePropertySet_Impl; } } @@ -342,12 +334,12 @@ const SvxItemPropertySet* ImplGetMasterPagePropertySet( PageKind ePageKind ) const SvxItemPropertySet* pRet = 0; if( ePageKind == PK_HANDOUT ) { - static SvxItemPropertySet aHandoutMasterPagePropertySet_Impl( aHandoutMasterPagePropertyMap_Impl ); + static SvxItemPropertySet aHandoutMasterPagePropertySet_Impl( aHandoutMasterPagePropertyMap_Impl, SdrObject::GetGlobalDrawObjectItemPool() ); pRet = &aHandoutMasterPagePropertySet_Impl; } else { - static SvxItemPropertySet aMasterPagePropertySet_Impl( aMasterPagePropertyMap_Impl ); + static SvxItemPropertySet aMasterPagePropertySet_Impl( aMasterPagePropertyMap_Impl, SdrObject::GetGlobalDrawObjectItemPool() ); pRet = &aMasterPagePropertySet_Impl; } return pRet; @@ -364,7 +356,6 @@ SdGenericDrawPage::SdGenericDrawPage( SdXImpressDocument* _pModel, SdPage* pInPa mpModel ( _pModel ), mpSdrModel(0), mpPropSet ( _pSet ), - mbHasBackgroundObject(sal_False), mbIsImpressDocument(false) { mpSdrModel = SvxFmDrawPage::mpModel; @@ -1392,9 +1383,6 @@ Reference< drawing::XShape > SdGenericDrawPage::_CreateShape( SdrObject *pObj ) case PRESOBJ_TABLE: aShapeType += String( RTL_CONSTASCII_USTRINGPARAM("TableShape") ); break; - case PRESOBJ_BACKGROUND: - DBG_ASSERT( sal_False, "Danger! Someone got hold of the horrible background shape!" ); - break; case PRESOBJ_PAGE: aShapeType += String( RTL_CONSTASCII_USTRINGPARAM("PageShape") ); break; @@ -1447,7 +1435,7 @@ Sequence< OUString > SAL_CALL SdGenericDrawPage::getSupportedServiceNames() throw(uno::RuntimeException) { Sequence< OUString > aSeq( SvxFmDrawPage::getSupportedServiceNames() ); - SvxServiceInfoHelper::addToSequence( aSeq, 3, "com.sun.star.drawing.GenericDrawPage", + comphelper::ServiceInfoHelper::addToSequence( aSeq, 3, "com.sun.star.drawing.GenericDrawPage", "com.sun.star.document.LinkTarget", "com.sun.star.document.LinkTargetSupplier"); return aSeq; @@ -1987,7 +1975,7 @@ OUString SAL_CALL SdPageLinkTargets::getImplementationName() sal_Bool SAL_CALL SdPageLinkTargets::supportsService( const OUString& ServiceName ) throw(uno::RuntimeException) { - return SvxServiceInfoHelper::supportsService( ServiceName, getSupportedServiceNames() ); + return comphelper::ServiceInfoHelper::supportsService( ServiceName, getSupportedServiceNames() ); } Sequence< OUString > SAL_CALL SdPageLinkTargets::getSupportedServiceNames() @@ -2219,10 +2207,10 @@ Sequence< OUString > SAL_CALL SdDrawPage::getSupportedServiceNames() throw(uno:: throwIfDisposed(); Sequence< OUString > aSeq( SdGenericDrawPage::getSupportedServiceNames() ); - SvxServiceInfoHelper::addToSequence( aSeq, 1, "com.sun.star.drawing.DrawPage" ); + comphelper::ServiceInfoHelper::addToSequence( aSeq, 1, "com.sun.star.drawing.DrawPage" ); if( mbIsImpressDocument ) - SvxServiceInfoHelper::addToSequence( aSeq, 1, "com.sun.star.presentation.DrawPage" ); + comphelper::ServiceInfoHelper::addToSequence( aSeq, 1, "com.sun.star.presentation.DrawPage" ); return aSeq; } @@ -2469,40 +2457,11 @@ void SdDrawPage::setBackground( const Any& rValue ) if( !xSet.is() ) { - // the easy case, clear the background obj - GetPage()->SetBackgroundObj( NULL ); - - // #110094#-15 - // tell the page that it's visualization has changed - GetPage()->ActionChanged(); - + // the easy case, no background set. Set XFILL_NONE to represent this + GetPage()->getSdrPageProperties().PutItem(XFillStyleItem(XFILL_NONE)); return; } - // prepare background object - SdrObject* pObj = GetPage()->GetBackgroundObj(); - if( NULL == pObj ) - { - pObj = new SdrRectObj(); - GetPage()->SetBackgroundObj( pObj ); - - // #110094#-15 - // tell the page that it's visualization has changed - GetPage()->ActionChanged(); - } - - const sal_Int32 nLeft = GetPage()->GetLftBorder(); - const sal_Int32 nRight = GetPage()->GetRgtBorder(); - const sal_Int32 nUpper = GetPage()->GetUppBorder(); - const sal_Int32 nLower = GetPage()->GetLwrBorder(); - - Point aPos ( nLeft, nRight ); - Size aSize( GetPage()->GetSize() ); - aSize.Width() -= nLeft + nRight - 1; - aSize.Height() -= nUpper + nLower - 1; - Rectangle aRect( aPos, aSize ); - pObj->SetLogicRect( aRect ); - // is it our own implementation? SdUnoPageBackground* pBack = SdUnoPageBackground::getImplementation( xSet ); @@ -2540,11 +2499,14 @@ void SdDrawPage::setBackground( const Any& rValue ) //-/ pObj->NbcSetAttributes( aSet, sal_False ); if( aSet.Count() == 0 ) { - GetPage()->SetBackgroundObj( NULL ); + // no background fill, represent by setting XFILL_NONE + GetPage()->getSdrPageProperties().PutItem(XFillStyleItem(XFILL_NONE)); } else { - pObj->SetMergedItemSet(aSet); + // background fill, set at page (not sure if ClearItem is needed) + GetPage()->getSdrPageProperties().ClearItem(); + GetPage()->getSdrPageProperties().PutItemSet(aSet); } // repaint only @@ -2575,14 +2537,19 @@ Reference< XAnnotationEnumeration > SAL_CALL SdGenericDrawPage::createAnnotation void SdDrawPage::getBackground( Any& rValue ) throw() { - SdrObject* pObj = GetPage()->GetBackgroundObj(); - if( NULL == pObj ) + const SfxItemSet& rFillAttributes = GetPage()->getSdrPageProperties().GetItemSet(); + + if(XFILL_NONE == ((const XFillStyleItem&)rFillAttributes.Get(XATTR_FILLSTYLE)).GetValue()) { + // no fill set (switched off by XFILL_NONE), clear rValue to represent this rValue.clear(); } else { - Reference< beans::XPropertySet > xSet( new SdUnoPageBackground( GetModel()->GetDoc(), pObj ) ); + // there is a fill set, export to rValue + Reference< beans::XPropertySet > xSet(new SdUnoPageBackground( + GetModel()->GetDoc(), + &GetPage()->getSdrPageProperties().GetItemSet())); rValue <<= xSet; } } @@ -2686,7 +2653,6 @@ Any SdGenericDrawPage::getNavigationOrder() SdMasterPage::SdMasterPage( SdXImpressDocument* pModel, SdPage* pPage ) throw() : SdGenericDrawPage( pModel, pPage, ImplGetMasterPagePropertySet( pPage ? pPage->GetPageKind() : PK_STANDARD ) ) { - mbHasBackgroundObject = pPage && GetPage()->GetPageKind() == PK_STANDARD; } SdMasterPage::~SdMasterPage() throw() @@ -2807,10 +2773,10 @@ Sequence< OUString > SAL_CALL SdMasterPage::getSupportedServiceNames() throw(uno throwIfDisposed(); Sequence< OUString > aSeq( SdGenericDrawPage::getSupportedServiceNames() ); - SvxServiceInfoHelper::addToSequence( aSeq, 1, "com.sun.star.drawing.MasterPage" ); + comphelper::ServiceInfoHelper::addToSequence( aSeq, 1, "com.sun.star.drawing.MasterPage" ); if( SvxFmDrawPage::mpPage && ((SdPage*)SvxFmDrawPage::mpPage)->GetPageKind() == PK_HANDOUT ) - SvxServiceInfoHelper::addToSequence( aSeq, 1, "com.sun.star.presentation.HandoutMasterPage" ); + comphelper::ServiceInfoHelper::addToSequence( aSeq, 1, "com.sun.star.presentation.HandoutMasterPage" ); return aSeq; } @@ -2831,7 +2797,7 @@ sal_Bool SAL_CALL SdMasterPage::hasElements() throw(uno::RuntimeException) if( SvxFmDrawPage::mpPage == NULL ) return sal_False; - return (SvxFmDrawPage::mpPage->GetObjCount() > 1) || (!mbHasBackgroundObject && SvxFmDrawPage::mpPage->GetObjCount() == 1 ); + return SvxFmDrawPage::mpPage->GetObjCount() > 0; } uno::Type SAL_CALL SdMasterPage::getElementType() @@ -2848,13 +2814,7 @@ sal_Int32 SAL_CALL SdMasterPage::getCount() throwIfDisposed(); - sal_Int32 nCount = SdGenericDrawPage::getCount(); - DBG_ASSERT( !mbHasBackgroundObject || (nCount > 0), "possible wrong shape count!" ); - - if( mbHasBackgroundObject && ( nCount > 0 ) ) - nCount--; - - return nCount; + return SdGenericDrawPage::getCount(); } Any SAL_CALL SdMasterPage::getByIndex( sal_Int32 Index ) @@ -2864,9 +2824,6 @@ Any SAL_CALL SdMasterPage::getByIndex( sal_Int32 Index ) throwIfDisposed(); - if( mbHasBackgroundObject ) - Index++; - return SdGenericDrawPage::getByIndex(Index); } @@ -2966,16 +2923,9 @@ void SdMasterPage::setBackground( const Any& rValue ) } } - - // if no background style is available, try the background object - SdrObject* pObj = GetPage()->GetPresObj(PRESOBJ_BACKGROUND); - if( pObj == NULL ) - return; - - pObj->SetMergedItemSet(aSet); - - // repaint only - SvxFmDrawPage::mpPage->ActionChanged(); + // if no background style is available, set at page directly. This + // is an error and should NOT happen (and will be asserted from the SdrPage) + GetPage()->getSdrPageProperties().PutItemSet(aSet); } } catch( Exception& ) @@ -3018,23 +2968,19 @@ void SdMasterPage::getBackground( Any& rValue ) throw() } } - // no stylesheet? try old fashion background rectangle - SdrObject* pObj = NULL; - if( SvxFmDrawPage::mpPage->GetObjCount() >= 1 ) + // No style found, use fill attributes from page background. This + // should NOT happen and is an error + const SfxItemSet& rFallbackItemSet(SvxFmDrawPage::mpPage->getSdrPageProperties().GetItemSet()); + + if(XFILL_NONE == ((const XFillStyleItem&)rFallbackItemSet.Get(XATTR_FILLSTYLE)).GetValue()) { - pObj = SvxFmDrawPage::mpPage->GetObj(0); - if( pObj->GetObjInventor() != SdrInventor || pObj->GetObjIdentifier() != OBJ_RECT ) - pObj = NULL; + rValue <<= Reference< beans::XPropertySet >( + new SdUnoPageBackground(GetModel()->GetDoc(), &rFallbackItemSet)); } - - if( pObj ) + else { - rValue <<= Reference< beans::XPropertySet >( new SdUnoPageBackground( GetModel()->GetDoc(), pObj ) ); - return; + rValue.clear(); } - - - rValue.clear(); } } catch( Exception& ) diff --git a/sd/source/ui/unoidl/unopage.hxx b/sd/source/ui/unoidl/unopage.hxx index 5d4c76bd9e82..52e5cc061f7d 100644 --- a/sd/source/ui/unoidl/unopage.hxx +++ b/sd/source/ui/unoidl/unopage.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unopage.hxx,v $ - * $Revision: 1.20 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -97,7 +94,6 @@ protected: void SetWidth( sal_Int32 nWidth ); void SetHeight( sal_Int32 nHeight ); - sal_Bool mbHasBackgroundObject; bool mbIsImpressDocument; virtual void disposing() throw(); diff --git a/sd/source/ui/unoidl/unopback.cxx b/sd/source/ui/unoidl/unopback.cxx index 5150afb2d10f..1ac62fb1363f 100644 --- a/sd/source/ui/unoidl/unopback.cxx +++ b/sd/source/ui/unoidl/unopback.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unopback.cxx,v $ - * $Revision: 1.17 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -34,7 +31,7 @@ #include <vos/mutex.hxx> #include <vcl/svapp.hxx> #include <svl/itemset.hxx> - +#include <svx/svdpool.hxx> #include <comphelper/extract.hxx> #include <rtl/uuid.h> #include <rtl/memory.h> @@ -43,6 +40,7 @@ #include <svx/svdobj.hxx> #include <svx/unoprov.hxx> #include <svx/unoshape.hxx> +#include <comphelper/serviceinfohelper.hxx> #include "unopback.hxx" #include "unohelp.hxx" @@ -61,27 +59,18 @@ const SvxItemPropertySet* ImplGetPageBackgroundPropertySet() {0,0,0,0,0,0} }; - static SvxItemPropertySet aPageBackgroundPropertySet_Impl( aPageBackgroundPropertyMap_Impl ); + static SvxItemPropertySet aPageBackgroundPropertySet_Impl( aPageBackgroundPropertyMap_Impl, SdrObject::GetGlobalDrawObjectItemPool() ); return &aPageBackgroundPropertySet_Impl; } UNO3_GETIMPLEMENTATION_IMPL( SdUnoPageBackground ); -SdUnoPageBackground::SdUnoPageBackground( SdDrawDocument* pDoc /* = NULL */, SdrObject* pObj /* = NULL */ ) throw() -: mpPropSet( ImplGetPageBackgroundPropertySet() ), mpSet( NULL ), mpDoc( pDoc ) -{ - if( pDoc ) - { - StartListening( *pDoc ); - mpSet = new SfxItemSet( pDoc->GetPool(), XATTR_FILL_FIRST, XATTR_FILL_LAST ); - - if( pObj ) - mpSet->Put(pObj->GetMergedItemSet()); - } -} - -SdUnoPageBackground::SdUnoPageBackground( SdDrawDocument* pDoc, const SfxItemSet* pSet ) throw() -: mpPropSet( ImplGetPageBackgroundPropertySet() ), mpSet( NULL ), mpDoc( pDoc ) +SdUnoPageBackground::SdUnoPageBackground( + SdDrawDocument* pDoc /* = NULL */, + const SfxItemSet* pSet /* = NULL */) throw() +: mpPropSet(ImplGetPageBackgroundPropertySet()), + mpSet(NULL), + mpDoc(pDoc) { if( pDoc ) { @@ -212,7 +201,7 @@ OUString SAL_CALL SdUnoPageBackground::getImplementationName() sal_Bool SAL_CALL SdUnoPageBackground::supportsService( const OUString& ServiceName ) throw(uno::RuntimeException) { - return SvxServiceInfoHelper::supportsService( ServiceName, getSupportedServiceNames() ); + return comphelper::ServiceInfoHelper::supportsService( ServiceName, getSupportedServiceNames() ); } uno::Sequence< OUString > SAL_CALL SdUnoPageBackground::getSupportedServiceNames() @@ -278,7 +267,7 @@ void SAL_CALL SdUnoPageBackground::setPropertyValue( const OUString& aPropertyNa } else { - mpPropSet->setPropertyValue( pEntry, aValue, aSet ); + SvxItemPropertySet_setPropertyValue( *mpPropSet, pEntry, aValue, aSet ); } mpSet->Put( aSet ); @@ -332,7 +321,7 @@ uno::Any SAL_CALL SdUnoPageBackground::getPropertyValue( const OUString& Propert aSet.Put( rPool.GetDefaultItem( pEntry->nWID ) ); // Hole Wert aus ItemSet - aAny = mpPropSet->getPropertyValue( pEntry, aSet ); + aAny = SvxItemPropertySet_getPropertyValue( *mpPropSet, pEntry, aSet ); } } else @@ -460,7 +449,7 @@ uno::Any SAL_CALL SdUnoPageBackground::getPropertyDefault( const OUString& aProp SfxItemSet aSet( rPool, pEntry->nWID, pEntry->nWID); aSet.Put( rPool.GetDefaultItem( pEntry->nWID ) ); - aAny = mpPropSet->getPropertyValue( pEntry, aSet ); + aAny = SvxItemPropertySet_getPropertyValue( *mpPropSet, pEntry, aSet ); } } return aAny; diff --git a/sd/source/ui/unoidl/unopback.hxx b/sd/source/ui/unoidl/unopback.hxx index eace69d82c9c..530a75856662 100644 --- a/sd/source/ui/unoidl/unopback.hxx +++ b/sd/source/ui/unoidl/unopback.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unopback.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -36,15 +33,13 @@ #include <com/sun/star/lang/XUnoTunnel.hpp> #include <svx/unoshprp.hxx> -#include <svx/unoipset.hxx> +#include <editeng/unoipset.hxx> #include <comphelper/servicehelper.hxx> #include <cppuhelper/implbase4.hxx> const SvxItemPropertySet* ImplGetPageBackgroundPropertySet(); - -class SdrObject; class SdDrawDocument; class SfxItemSet; @@ -62,8 +57,7 @@ protected: const SfxItemPropertySimpleEntry* getPropertyMapEntry( const ::rtl::OUString& rPropertyName ) const throw(); public: - SdUnoPageBackground( SdDrawDocument* pDoc = NULL, SdrObject* pObj = NULL ) throw(); - SdUnoPageBackground( SdDrawDocument* pDoc, const SfxItemSet* pSet ) throw(); + SdUnoPageBackground( SdDrawDocument* pDoc = NULL, const SfxItemSet* pSet = NULL) throw(); ~SdUnoPageBackground() throw(); // internal diff --git a/sd/source/ui/unoidl/unopool.cxx b/sd/source/ui/unoidl/unopool.cxx index 403b28e6a71b..21ac567edc70 100644 --- a/sd/source/ui/unoidl/unopool.cxx +++ b/sd/source/ui/unoidl/unopool.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unopool.cxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -32,7 +29,7 @@ #include "precompiled_sd.hxx" #include <i18npool/mslangid.hxx> #include <comphelper/propertysetinfo.hxx> -#include <svx/eeitem.hxx> +#include <editeng/eeitem.hxx> #include <svx/unopool.hxx> #include "drawdoc.hxx" diff --git a/sd/source/ui/unoidl/unosrch.cxx b/sd/source/ui/unoidl/unosrch.cxx index 30be3b1f9682..a1cd11861d3a 100644 --- a/sd/source/ui/unoidl/unosrch.cxx +++ b/sd/source/ui/unoidl/unosrch.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unosrch.cxx,v $ - * $Revision: 1.10 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -33,11 +30,10 @@ #include <vcl/svapp.hxx> #include <vos/mutex.hxx> -#ifndef SVX_UNOSHAPE_HXX #include <svx/unoshape.hxx> -#endif +#include <svx/svdpool.hxx> #include <svx/unoprov.hxx> -#include <svx/unotext.hxx> +#include <editeng/unotext.hxx> #include <comphelper/extract.hxx> #include <rtl/uuid.h> @@ -732,7 +728,7 @@ UNO3_GETIMPLEMENTATION_IMPL( SdUnoSearchReplaceDescriptor ); SdUnoSearchReplaceDescriptor::SdUnoSearchReplaceDescriptor( sal_Bool bReplace ) throw() { - mpPropSet = new SvxItemPropertySet(ImplGetSearchPropertyMap()); + mpPropSet = new SvxItemPropertySet(ImplGetSearchPropertyMap(), SdrObject::GetGlobalDrawObjectItemPool()); mbBackwards = sal_False; mbCaseSensitive = sal_False; diff --git a/sd/source/ui/unoidl/unovwcrs.cxx b/sd/source/ui/unoidl/unovwcrs.cxx index 3fc4b0a99c5b..8b72cbe1fd96 100644 --- a/sd/source/ui/unoidl/unovwcrs.cxx +++ b/sd/source/ui/unoidl/unovwcrs.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unovwcrs.cxx,v $ - * $Revision: 1.10 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sd/source/ui/unoidl/unowcntr.cxx b/sd/source/ui/unoidl/unowcntr.cxx index 79cc64a5f747..fbb9991981f9 100644 --- a/sd/source/ui/unoidl/unowcntr.cxx +++ b/sd/source/ui/unoidl/unowcntr.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unowcntr.cxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/sd/source/ui/unoidl/unowcntr.hxx b/sd/source/ui/unoidl/unowcntr.hxx index e4fb565a06a2..86d68f3c4d22 100644 --- a/sd/source/ui/unoidl/unowcntr.hxx +++ b/sd/source/ui/unoidl/unowcntr.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: unowcntr.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify |