diff options
author | Oliver Bolte <obo@openoffice.org> | 2006-03-27 08:33:39 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2006-03-27 08:33:39 +0000 |
commit | ecccc429183b999f2e488e991ef41bbee17604b6 (patch) | |
tree | baf5811291171562df10701e0f86a5cffd68a9ef /sfx2/source/appl/appuno.cxx | |
parent | 9729076672266d5089108fe1cd4d26113f0d249c (diff) |
INTEGRATION: CWS fwk36 (1.113.44); FILE MERGED
2006/03/16 15:44:13 cd 1.113.44.2: #i46895# Fixed typos
2006/03/16 14:55:24 mav 1.113.44.1: #i46895# allow to create a copy of the document if possible
Diffstat (limited to 'sfx2/source/appl/appuno.cxx')
-rw-r--r-- | sfx2/source/appl/appuno.cxx | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx index 0fbc0524d2be..2af47c078a6a 100644 --- a/sfx2/source/appl/appuno.cxx +++ b/sfx2/source/appl/appuno.cxx @@ -4,9 +4,9 @@ * * $RCSfile: appuno.cxx,v $ * - * $Revision: 1.113 $ + * $Revision: 1.114 $ * - * last change: $Author: rt $ $Date: 2006-02-07 10:28:25 $ + * last change: $Author: obo $ $Date: 2006-03-27 09:33:39 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -270,6 +270,7 @@ static const String sComponentData = String::CreateFromAscii( "ComponentData" ) static const String sComponentContext = String::CreateFromAscii( "ComponentContext" ); static const String sDocumentBaseURL = String::CreateFromAscii( "DocumentBaseURL" ); static const String sHierarchicalDocumentName = String::CreateFromAscii( "HierarchicalDocumentName" ); +static const String sCopyStreamIfPossible = String::CreateFromAscii( "CopyStreamIfPossible" ); void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& rArgs, SfxAllItemSet& rSet, const SfxSlot* pSlot ) { @@ -869,6 +870,14 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxStringItem( SID_DOC_HIERARCHICALNAME, sVal ) ); } + else if ( aName == sCopyStreamIfPossible ) + { + sal_Bool bVal = sal_False; + sal_Bool bOK = (rProp.Value >>= bVal); + DBG_ASSERT( bOK, "invalid type for CopyStreamIfPossible" ) + if (bOK) + rSet.Put( SfxBoolItem( SID_COPY_STREAM_IF_POSSIBLE, bVal ) ); + } #ifdef DBG_UTIL else --nFoundArgs; @@ -1048,6 +1057,8 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta nAdditional++; if ( rSet.GetItemState( SID_DOC_HIERARCHICALNAME ) == SFX_ITEM_SET ) nAdditional++; + if ( rSet.GetItemState( SID_COPY_STREAM_IF_POSSIBLE ) == SFX_ITEM_SET ) + nAdditional++; // consider additional arguments nProps += nAdditional; @@ -1171,6 +1182,8 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta continue; if ( nId == SID_DOC_HIERARCHICALNAME ) continue; + if ( nId == SID_COPY_STREAM_IF_POSSIBLE ) + continue; // used only internally if ( nId == SID_SAVETO ) @@ -1498,6 +1511,11 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta pValue[nActProp].Name = sHierarchicalDocumentName; pValue[nActProp++].Value <<= ( ::rtl::OUString(((SfxStringItem*)pItem)->GetValue()) ); } + if ( rSet.GetItemState( SID_COPY_STREAM_IF_POSSIBLE, sal_False, &pItem ) == SFX_ITEM_SET ) + { + pValue[nActProp].Name = sCopyStreamIfPossible; + pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() ); + } } } |