From 56cb65e9e2458f65c49a22187f223cc438938032 Mon Sep 17 00:00:00 2001 From: Niklas Nebel Date: Fri, 24 Nov 2000 19:07:16 +0000 Subject: #80688# PutItemScript --- sc/source/ui/inc/viewutil.hxx | 8 ++++++-- sc/source/ui/view/viewutil.cxx | 24 ++++++++++++++++++++++-- 2 files changed, 28 insertions(+), 4 deletions(-) (limited to 'sc/source/ui') diff --git a/sc/source/ui/inc/viewutil.hxx b/sc/source/ui/inc/viewutil.hxx index 9f5e90b73680..f35619ae0f5d 100644 --- a/sc/source/ui/inc/viewutil.hxx +++ b/sc/source/ui/inc/viewutil.hxx @@ -2,9 +2,9 @@ * * $RCSfile: viewutil.hxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 16:45:02 $ + * last change: $Author: nn $ $Date: 2000-11-24 20:06:10 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -67,6 +67,7 @@ #endif class String; +class SfxItemSet; class SvxFontItem; class ScChangeAction; @@ -89,6 +90,9 @@ public: static BOOL IsActionShown( const ScChangeAction& rAction, const ScChangeViewSettings& rSettings, ScDocument& rDocument ); + + static void PutItemScript( SfxItemSet& rShellSet, const SfxItemSet& rCoreSet, + USHORT nWhichId, USHORT nScript ); }; // --------------------------------------------------------------------------- diff --git a/sc/source/ui/view/viewutil.cxx b/sc/source/ui/view/viewutil.cxx index caede9a444b5..90696d5fe609 100644 --- a/sc/source/ui/view/viewutil.cxx +++ b/sc/source/ui/view/viewutil.cxx @@ -2,9 +2,9 @@ * * $RCSfile: viewutil.cxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 16:45:10 $ + * last change: $Author: nn $ $Date: 2000-11-24 20:07:16 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -70,6 +70,9 @@ #include "scitems.hxx" #include #include +#include +#include +#include #include #include #include @@ -83,6 +86,23 @@ //================================================================== +// static +void ScViewUtil::PutItemScript( SfxItemSet& rShellSet, const SfxItemSet& rCoreSet, + USHORT nWhichId, USHORT nScript ) +{ + // take the effective item from rCoreSet according to nScript + // and put in rShellSet under the (base) nWhichId + + SfxItemPool& rPool = *rShellSet.GetPool(); + SvxScriptSetItem aSetItem( rPool.GetSlotId(nWhichId), rPool ); + aSetItem.GetItemSet().Put( rCoreSet, FALSE ); + const SfxPoolItem* pI = aSetItem.GetItemOfScript( nScript ); + if (pI) + rShellSet.Put( *pI, nWhichId ); + else + rShellSet.InvalidateItem( nWhichId ); +} + // static BOOL ScViewUtil::IsActionShown( const ScChangeAction& rAction, const ScChangeViewSettings& rSettings, -- cgit