diff options
author | Mikhail Voitenko <mav@openoffice.org> | 2002-07-09 06:22:37 +0000 |
---|---|---|
committer | Mikhail Voitenko <mav@openoffice.org> | 2002-07-09 06:22:37 +0000 |
commit | 79fcd30b3675a038154dee88a7b14687a1716e55 (patch) | |
tree | 9e0c56c13c379aad6d0e810ffcb8648c14105204 /sfx2/source/appl | |
parent | ad65bff66154b9b6c02f1175f9df17f3bd46b748 (diff) |
#96593# Support UpdateDocFromTemplate param
Diffstat (limited to 'sfx2/source/appl')
-rw-r--r-- | sfx2/source/appl/appuno.cxx | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx index 4183edecc025..7defc617e237 100644 --- a/sfx2/source/appl/appuno.cxx +++ b/sfx2/source/appl/appuno.cxx @@ -2,9 +2,9 @@ * * $RCSfile: appuno.cxx,v $ * - * $Revision: 1.64 $ + * $Revision: 1.65 $ * - * last change: $Author: mba $ $Date: 2002-07-08 07:35:07 $ + * last change: $Author: mav $ $Date: 2002-07-09 07:22:37 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -187,6 +187,9 @@ #ifndef _COM_SUN_STAR_DOCUMENT_MACROEXECMODE_HPP_ #include <com/sun/star/document/MacroExecMode.hpp> #endif +#ifndef _COM_SUN_STAR_DOCUMENT_CONFIGITEMAPIMODE_HPP_ +#include <com/sun/star/document/ConfigItemAPIMode.hpp> +#endif #include <tools/cachestr.hxx> #include <osl/mutex.hxx> @@ -257,6 +260,7 @@ static const String sFilterData = String::CreateFromAscii( "FilterData" ); static const String sSelectionOnly = String::CreateFromAscii( "SelectionOnly" ); static const String sFilterFlags = String::CreateFromAscii( "FilterFlags" ); static const String sMacroExecMode = String::CreateFromAscii( "MacroExecutionMode" ); +static const String sUpdateDocFromTemplate = String::CreateFromAscii( "UpdateDocFromTemplate" ); void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& rArgs, SfxAllItemSet& rSet, const SfxSlot* pSlot ) { @@ -576,8 +580,15 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque { sal_Int16 nValue; if ( rProp.Value >>= nValue ) - rSet.Put( SfxUInt16Item( SID_MACROEXECMODE, *((sal_Int16*)rProp.Value.getValue()) ) ); + rSet.Put( SfxUInt16Item( SID_MACROEXECMODE, nValue ) ); + } + else if ( aName == sUpdateDocFromTemplate ) + { + sal_Int16 nValue; + if ( rProp.Value >>= nValue ) + rSet.Put( SfxUInt16Item( SID_UPDATEDOCFROMTEMP, nValue ) ); } + } } #ifdef DB_UTIL @@ -726,6 +737,8 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta nAdditional++; if ( rSet.GetItemState( SID_MACROEXECMODE ) == SFX_ITEM_SET ) nAdditional++; + if ( rSet.GetItemState( SID_UPDATEDOCFROMTEMP ) == SFX_ITEM_SET ) + nAdditional++; // consider additional arguments nProps += nAdditional; @@ -824,6 +837,8 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta continue; if ( nId == SID_MACROEXECMODE ) continue; + if ( nId == SID_UPDATEDOCFROMTEMP ) + continue; } ByteString aDbg( "Unknown item detected: "); @@ -1082,6 +1097,11 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta pValue[nProps].Name = sMacroExecMode; pValue[nProps++].Value <<= ( (sal_Int16) ((SfxUInt16Item*)pItem)->GetValue() ); } + if ( rSet.GetItemState( SID_UPDATEDOCFROMTEMP, sal_False, &pItem ) == SFX_ITEM_SET ) + { + pValue[nProps].Name = sUpdateDocFromTemplate; + pValue[nProps++].Value <<= ( (sal_Int16) ((SfxUInt16Item*)pItem)->GetValue() ); + } } } |