summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2013-04-09 10:31:51 -0400
committerKohei Yoshida <kohei.yoshida@gmail.com>2013-04-09 13:01:26 -0400
commit7a41848fab13e2c487515e02a16fd7548512dcd9 (patch)
treecb95f6040aaa0ff8b41a3ae8362f0d5619094fe5 /sfx2
parent8b13be7436c522b039fa66732cc9caa3cd9cf225 (diff)
Store filter provider property with SfxMedium.
Change-Id: I4ee6eed94cdfd8a8a514a79a33a1ccb4ff586ce5
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/inc/sfx2/sfxsids.hrc1
-rw-r--r--sfx2/source/appl/appuno.cxx19
2 files changed, 19 insertions, 1 deletions
diff --git a/sfx2/inc/sfx2/sfxsids.hrc b/sfx2/inc/sfx2/sfxsids.hrc
index 12198b6ed6e6..7130f0648f27 100644
--- a/sfx2/inc/sfx2/sfxsids.hrc
+++ b/sfx2/inc/sfx2/sfxsids.hrc
@@ -148,6 +148,7 @@
#define SID_CHECKOUT (SID_SFX_START + 512)
#define SID_CANCELCHECKOUT (SID_SFX_START + 513)
#define SID_CHECKIN (SID_SFX_START + 514)
+#define SID_FILTER_PROVIDER (SID_SFX_START + 515)
#define SID_FORCERELOAD (SID_SFX_START + 1502)
#define SID_FILE_DIALOG (SID_SFX_START + 304)
diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx
index 340bd94edb52..4c07daea3012 100644
--- a/sfx2/source/appl/appuno.cxx
+++ b/sfx2/source/appl/appuno.cxx
@@ -203,6 +203,7 @@ static char const sSuggestedSaveAsName[] = "SuggestedSaveAsName";
static char const sEncryptionData[] = "EncryptionData";
static char const sFailOnWarning[] = "FailOnWarning";
static char const sDocumentService[] = "DocumentService";
+static char const sFilterProvider[] = "FilterProvider";
static bool isMediaDescriptor( sal_uInt16 nSlotId )
{
@@ -509,7 +510,7 @@ void TransformParameters( sal_uInt16 nSlotId, const uno::Sequence<beans::Propert
++nFoundArgs;
#endif
const beans::PropertyValue& rProp = pPropsVal[n];
- OUString aName = rProp.Name;
+ const OUString& aName = rProp.Name;
if ( aName == sModel )
rSet.Put( SfxUnoAnyItem( SID_DOCUMENT, rProp.Value ) );
else if ( aName == sComponentData )
@@ -912,6 +913,13 @@ void TransformParameters( sal_uInt16 nSlotId, const uno::Sequence<beans::Propert
if (bOK)
rSet.Put(SfxStringItem(SID_DOC_SERVICE, aVal));
}
+ else if (aName == sFilterProvider)
+ {
+ OUString aVal;
+ bool bOK = ((rProp.Value >>= aVal) && !aVal.isEmpty());
+ if (bOK)
+ rSet.Put(SfxStringItem(SID_FILTER_PROVIDER, aVal));
+ }
#ifdef DBG_UTIL
else
--nFoundArgs;
@@ -1138,6 +1146,8 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, uno::Sequence<b
nAdditional++;
if ( rSet.GetItemState( SID_DOC_SERVICE ) == SFX_ITEM_SET )
nAdditional++;
+ if (rSet.HasItem(SID_FILTER_PROVIDER))
+ ++nAdditional;
// consider additional arguments
nProps += nAdditional;
@@ -1277,6 +1287,8 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, uno::Sequence<b
continue;
if ( nId == SID_DOC_SERVICE )
continue;
+ if (nId == SID_FILTER_PROVIDER)
+ continue;
// used only internally
if ( nId == SID_SAVETO )
@@ -1685,6 +1697,11 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, uno::Sequence<b
pValue[nActProp].Name = OUString(sDocumentService);
pValue[nActProp++].Value <<= OUString(static_cast<const SfxStringItem*>(pItem)->GetValue());
}
+ if (rSet.HasItem(SID_FILTER_PROVIDER, &pItem))
+ {
+ pValue[nActProp].Name = sFilterProvider;
+ pValue[nActProp++].Value <<= OUString(static_cast<const SfxStringItem*>(pItem)->GetValue());
+ }
}
}