summaryrefslogtreecommitdiff
path: root/sfx2/source/appl
diff options
context:
space:
mode:
authorIvo Hinkelmann <ihi@openoffice.org>2007-11-26 15:46:53 +0000
committerIvo Hinkelmann <ihi@openoffice.org>2007-11-26 15:46:53 +0000
commitc459c1f7895253dc60c1a542edcf0f8313448e71 (patch)
tree27e6ebcf1b85d90185d394a7a0b014032769803e /sfx2/source/appl
parent7d4c3f16d0af9b1e429d5bf8d766895634c4c34f (diff)
INTEGRATION: CWS tkr06 (1.125.18); FILE MERGED
2007/10/30 09:37:17 jsc 1.125.18.1: #i83075# check additional optional parameter
Diffstat (limited to 'sfx2/source/appl')
-rw-r--r--sfx2/source/appl/appuno.cxx40
1 files changed, 38 insertions, 2 deletions
diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx
index ffc9fc745544..7a7e745fc098 100644
--- a/sfx2/source/appl/appuno.cxx
+++ b/sfx2/source/appl/appuno.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: appuno.cxx,v $
*
- * $Revision: 1.125 $
+ * $Revision: 1.126 $
*
- * last change: $Author: kz $ $Date: 2007-10-09 15:31:35 $
+ * last change: $Author: ihi $ $Date: 2007-11-26 16:46:53 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -274,6 +274,8 @@ static const String sDocumentBaseURL = String::CreateFromAscii( "DocumentBaseURL
static const String sHierarchicalDocumentName = String::CreateFromAscii( "HierarchicalDocumentName" );
static const String sCopyStreamIfPossible = String::CreateFromAscii( "CopyStreamIfPossible" );
static const String sNoAutoSave = String::CreateFromAscii( "NoAutoSave" );
+static const String sFolderName = String::CreateFromAscii( "FolderName" );
+static const String sUseSystemDialog = String::CreateFromAscii( "UseSystemDialog" );
void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& rArgs, SfxAllItemSet& rSet, const SfxSlot* pSlot )
{
@@ -752,6 +754,14 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
if (bOK)
rSet.Put( SfxBoolItem( SID_EDITDOC, !bVal ) );
}
+ else if ( aName == sUseSystemDialog )
+ {
+ sal_Bool bVal = sal_False;
+ sal_Bool bOK = (rProp.Value >>= bVal);
+ DBG_ASSERT( bOK, "invalid type for ViewOnly" )
+ if (bOK)
+ rSet.Put( SfxBoolItem( SID_FILE_DIALOG, bVal ) );
+ }
else if ( aName == sFileName )
{
::rtl::OUString sVal;
@@ -768,6 +778,14 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
if (bOK)
rSet.Put( SfxStringItem( SID_DOC_SALVAGE, sVal ) );
}
+ else if ( aName == sFolderName )
+ {
+ ::rtl::OUString sVal;
+ sal_Bool bOK = (rProp.Value >>= sVal);
+ DBG_ASSERT( bOK, "invalid type or value for SalvageURL" )
+ if (bOK)
+ rSet.Put( SfxStringItem( SID_PATH, sVal ) );
+ }
else if ( aName == sFrameName )
{
::rtl::OUString sVal;
@@ -1002,6 +1020,10 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta
nAdditional++;
if ( rSet.GetItemState( SID_DOC_SALVAGE ) == SFX_ITEM_SET )
nAdditional++;
+ if ( rSet.GetItemState( SID_PATH ) == SFX_ITEM_SET )
+ nAdditional++;
+ if ( rSet.GetItemState( SID_FILE_DIALOG ) == SFX_ITEM_SET )
+ nAdditional++;
if ( rSet.GetItemState( SID_CONTENT ) == SFX_ITEM_SET )
nAdditional++;
if ( rSet.GetItemState( SID_INPUTSTREAM ) == SFX_ITEM_SET )
@@ -1179,6 +1201,10 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta
continue;
if ( nId == SID_DOC_SALVAGE )
continue;
+ if ( nId == SID_PATH )
+ continue;
+ if ( nId == SID_FILE_DIALOG )
+ continue;
if ( nId == SID_CONTENTTYPE )
continue;
if ( nId == SID_WIN_POSSIZE )
@@ -1466,6 +1492,11 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta
pValue[nActProp].Name = sDontEdit;
pValue[nActProp++].Value <<= (sal_Bool) (!( ((SfxBoolItem*)pItem)->GetValue() ));
}
+ if ( rSet.GetItemState( SID_FILE_DIALOG, sal_False, &pItem ) == SFX_ITEM_SET )
+ {
+ pValue[nActProp].Name = sUseSystemDialog;
+ pValue[nActProp++].Value <<= (sal_Bool) ( ((SfxBoolItem*)pItem)->GetValue() );
+ }
if ( rSet.GetItemState( SID_TARGETNAME, sal_False, &pItem ) == SFX_ITEM_SET )
{
pValue[nActProp].Name = sFrameName;
@@ -1476,6 +1507,11 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta
pValue[nActProp].Name = sSalvageURL;
pValue[nActProp++].Value <<= ( ::rtl::OUString(((SfxStringItem*)pItem)->GetValue()) );
}
+ if ( rSet.GetItemState( SID_PATH, sal_False, &pItem ) == SFX_ITEM_SET )
+ {
+ pValue[nActProp].Name = sFolderName;
+ pValue[nActProp++].Value <<= ( ::rtl::OUString(((SfxStringItem*)pItem)->GetValue()) );
+ }
if ( rSet.GetItemState( SID_CONTENTTYPE, sal_False, &pItem ) == SFX_ITEM_SET )
{
pValue[nActProp].Name = sMediaType;