Kaydet (Commit) 7a41848f authored tarafından Kohei Yoshida's avatar Kohei Yoshida

Store filter provider property with SfxMedium.

Change-Id: I4ee6eed94cdfd8a8a514a79a33a1ccb4ff586ce5
üst 8b13be74
...@@ -148,6 +148,7 @@ ...@@ -148,6 +148,7 @@
#define SID_CHECKOUT (SID_SFX_START + 512) #define SID_CHECKOUT (SID_SFX_START + 512)
#define SID_CANCELCHECKOUT (SID_SFX_START + 513) #define SID_CANCELCHECKOUT (SID_SFX_START + 513)
#define SID_CHECKIN (SID_SFX_START + 514) #define SID_CHECKIN (SID_SFX_START + 514)
#define SID_FILTER_PROVIDER (SID_SFX_START + 515)
#define SID_FORCERELOAD (SID_SFX_START + 1502) #define SID_FORCERELOAD (SID_SFX_START + 1502)
#define SID_FILE_DIALOG (SID_SFX_START + 304) #define SID_FILE_DIALOG (SID_SFX_START + 304)
......
...@@ -203,6 +203,7 @@ static char const sSuggestedSaveAsName[] = "SuggestedSaveAsName"; ...@@ -203,6 +203,7 @@ static char const sSuggestedSaveAsName[] = "SuggestedSaveAsName";
static char const sEncryptionData[] = "EncryptionData"; static char const sEncryptionData[] = "EncryptionData";
static char const sFailOnWarning[] = "FailOnWarning"; static char const sFailOnWarning[] = "FailOnWarning";
static char const sDocumentService[] = "DocumentService"; static char const sDocumentService[] = "DocumentService";
static char const sFilterProvider[] = "FilterProvider";
static bool isMediaDescriptor( sal_uInt16 nSlotId ) static bool isMediaDescriptor( sal_uInt16 nSlotId )
{ {
...@@ -509,7 +510,7 @@ void TransformParameters( sal_uInt16 nSlotId, const uno::Sequence<beans::Propert ...@@ -509,7 +510,7 @@ void TransformParameters( sal_uInt16 nSlotId, const uno::Sequence<beans::Propert
++nFoundArgs; ++nFoundArgs;
#endif #endif
const beans::PropertyValue& rProp = pPropsVal[n]; const beans::PropertyValue& rProp = pPropsVal[n];
OUString aName = rProp.Name; const OUString& aName = rProp.Name;
if ( aName == sModel ) if ( aName == sModel )
rSet.Put( SfxUnoAnyItem( SID_DOCUMENT, rProp.Value ) ); rSet.Put( SfxUnoAnyItem( SID_DOCUMENT, rProp.Value ) );
else if ( aName == sComponentData ) else if ( aName == sComponentData )
...@@ -912,6 +913,13 @@ void TransformParameters( sal_uInt16 nSlotId, const uno::Sequence<beans::Propert ...@@ -912,6 +913,13 @@ void TransformParameters( sal_uInt16 nSlotId, const uno::Sequence<beans::Propert
if (bOK) if (bOK)
rSet.Put(SfxStringItem(SID_DOC_SERVICE, aVal)); 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 #ifdef DBG_UTIL
else else
--nFoundArgs; --nFoundArgs;
...@@ -1138,6 +1146,8 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, uno::Sequence<b ...@@ -1138,6 +1146,8 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, uno::Sequence<b
nAdditional++; nAdditional++;
if ( rSet.GetItemState( SID_DOC_SERVICE ) == SFX_ITEM_SET ) if ( rSet.GetItemState( SID_DOC_SERVICE ) == SFX_ITEM_SET )
nAdditional++; nAdditional++;
if (rSet.HasItem(SID_FILTER_PROVIDER))
++nAdditional;
// consider additional arguments // consider additional arguments
nProps += nAdditional; nProps += nAdditional;
...@@ -1277,6 +1287,8 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, uno::Sequence<b ...@@ -1277,6 +1287,8 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, uno::Sequence<b
continue; continue;
if ( nId == SID_DOC_SERVICE ) if ( nId == SID_DOC_SERVICE )
continue; continue;
if (nId == SID_FILTER_PROVIDER)
continue;
// used only internally // used only internally
if ( nId == SID_SAVETO ) if ( nId == SID_SAVETO )
...@@ -1685,6 +1697,11 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, uno::Sequence<b ...@@ -1685,6 +1697,11 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, uno::Sequence<b
pValue[nActProp].Name = OUString(sDocumentService); pValue[nActProp].Name = OUString(sDocumentService);
pValue[nActProp++].Value <<= OUString(static_cast<const SfxStringItem*>(pItem)->GetValue()); 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());
}
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment