[Libreoffice-commits] core.git: Branch 'feature/orcus-update' - 90 commits - basctl/source bridges/Library_cpp_uno.mk codemaker/Executable_cppumaker.mk codemaker/Executable_javamaker.mk codemaker/inc codemaker/Package_inc.mk codemaker/README codemaker/source codemaker/StaticLibrary_codemaker.mk dbaccess/source dbaccess/uiconfig distro-configs/LibreOfficeLinux.conf editeng/inc editeng/source extras/source framework/inc framework/source .gitignore helpcompiler/Executable_helpindexer.mk helpcompiler/Executable_helplinker.mk helpcompiler/Library_helplinker.mk helpcontent2 i18npool/source icon-themes/crystal icon-themes/galaxy icon-themes/hicontrast icon-themes/human icon-themes/oxygen jvmfwk/distributions jvmfwk/plugins l10ntools/Executable_helpex.mk Library_merged.mk offapi/com officecfg/registry oox/source package/source pyuno/source RepositoryExternal.mk sal/rtl sax/Library_expwrap.mk sax/Library_fastsax.mk sc/inc sc/Library_scfilt.mk sc/qa sc/source sc/uiconfig sc/UI_scalc.mk sd/source sf x2/inc sfx2/source shell/Library_ooofilt.mk shell/Library_ooofilt_x64.mk shell/Library_propertyhdl.mk shell/Library_propertyhdl_x64.mk shell/Library_recentfile.mk shell/Library_shlxthdl.mk shell/Library_shlxthdl_x64.mk shell/StaticLibrary_shlxthandler_common.mk shell/StaticLibrary_shlxthandler_common_x64.mk shell/StaticLibrary_xmlparser.mk shell/StaticLibrary_xmlparser_x64.mk solenv/bin solenv/gbuild solenv/gdb starmath/source svx/source sw/AllLangResTarget_sw.mk sw/inc sw/Module_sw.mk sw/PythonTest_sw_unoapi.mk sw/qa sw/source sw/uiconfig sw/UI_swriter.mk test/inc test/source unodevtools/Executable_skeletonmaker.mk unodevtools/source unoidl/inc unoidl/source unotest/source vcl/coretext vcl/inc vcl/Library_vcl.mk vcl/source xmlhelp/Library_tvhlp1.mk xmlhelp/Library_ucpchelp1.mk

Kohei Yoshida kohei.yoshida at gmail.com
Tue Apr 9 09:59:39 PDT 2013


Rebased ref, commits from common ancestor:
commit 91ecff9e0c430424022e2b1197890bedcd359172
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Tue Apr 9 13:00:25 2013 -0400

    Get the whole thing to build after the SfxFilter interface change.
    
    Change-Id: I62122e298f1434aa9e44c8f3fdfb7f710513617d

diff --git a/framework/source/loadenv/loadenv.cxx b/framework/source/loadenv/loadenv.cxx
index 33956f1..86646d5 100644
--- a/framework/source/loadenv/loadenv.cxx
+++ b/framework/source/loadenv/loadenv.cxx
@@ -744,6 +744,7 @@ bool queryOrcusTypeAndFilter(const uno::Sequence<beans::PropertyValue>& rDescrip
         rFilter = "gnumeric";
         return true;
     }
+#if 0
     else if (aURL.endsWith(".xlsx"))
     {
         rType = "generic_Text";
@@ -756,6 +757,7 @@ bool queryOrcusTypeAndFilter(const uno::Sequence<beans::PropertyValue>& rDescrip
         rFilter = "ods";
         return true;
     }
+#endif
 
     return false;
 }
diff --git a/sc/source/ui/unoobj/scdetect.cxx b/sc/source/ui/unoobj/scdetect.cxx
index e40be82..6d8a7dc 100644
--- a/sc/source/ui/unoobj/scdetect.cxx
+++ b/sc/source/ui/unoobj/scdetect.cxx
@@ -432,9 +432,9 @@ OUString SAL_CALL ScFilterDetect::detect( uno::Sequence<beans::PropertyValue>& l
                 SvStream* pStream = aMedium.GetInStream();
                 const SfxFilter* pPreselectedFilter = pFilter;
                 bool bCsvSelected = (pPreselectedFilter &&
-                        pPreselectedFilter->GetFilterName().EqualsAscii( pFilterAscii ));
+                        pPreselectedFilter->GetFilterName().equalsAscii(pFilterAscii));
                 bool bExcelSelected = (pPreselectedFilter &&
-                        (pPreselectedFilter->GetName().SearchAscii("Excel") != STRING_NOTFOUND));
+                        (pPreselectedFilter->GetName().indexOf("Excel") >= 0));
                 bool bIsXLS = (bExcelSelected || (bCsvSelected && !aPreselectedFilterName.Len()));
                 pFilter = 0;
                 if ( pStream )
@@ -671,7 +671,7 @@ OUString SAL_CALL ScFilterDetect::detect( uno::Sequence<beans::PropertyValue>& l
                                     pFilter = aMatcher.GetFilter4FilterName( OUString(pFilterAscii) );
                                 bFakeXLS = true;
                             }
-                            else if ( pPreselectedFilter->GetName().EqualsAscii(pFilterDBase) && lcl_MayBeDBase( rStr ) )
+                            else if ( pPreselectedFilter->GetName().equalsAscii(pFilterDBase) && lcl_MayBeDBase( rStr ) )
                                 pFilter = pPreselectedFilter;
                             else if ( bCsvSelected && bMaybeText )
                                 pFilter = pPreselectedFilter;
@@ -686,7 +686,7 @@ OUString SAL_CALL ScFilterDetect::detect( uno::Sequence<beans::PropertyValue>& l
                                 // "foo <br> bar" with a preselected CSV
                                 // filter. So keep this detection to the end.
 
-                                if ( pPreselectedFilter->GetName().EqualsAscii(pFilterHtml) )
+                                if (pPreselectedFilter->GetName().equalsAscii(pFilterHtml))
                                 {
                                     pFilter = pPreselectedFilter;
                                 }
diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx
index 37e0b4d..0e2aa3e 100644
--- a/starmath/source/document.cxx
+++ b/starmath/source/document.cxx
@@ -970,7 +970,7 @@ sal_Bool SmDocShell::ConvertTo( SfxMedium &rMedium )
             aEquation.SetFlat(sal_True);
             bRet = aEquation.Export(rMedium);
         }
-        else if( pFlt->GetFilterName().EqualsAscii("MathType 3.x"))
+        else if (pFlt->GetFilterName().equalsAscii("MathType 3.x"))
             bRet = WriteAsMathType3( rMedium );
     }
     return bRet;
diff --git a/sw/source/core/doc/docglbl.cxx b/sw/source/core/doc/docglbl.cxx
index ddac41e..5c0eb98 100644
--- a/sw/source/core/doc/docglbl.cxx
+++ b/sw/source/core/doc/docglbl.cxx
@@ -214,7 +214,7 @@ bool SwDoc::SplitDoc( sal_uInt16 eDocType, const String& rPath, bool bOutline, c
     GetIDocumentUndoRedo().DoUndo(false);
     SetRedlineMode_intern( (RedlineMode_t)(GetRedlineMode() & ~nsRedlineMode_t::REDLINE_ON));
 
-    String sExt( pFilter->GetSuffixes().GetToken(0, ',') );
+    String sExt = pFilter->GetSuffixes().getToken(0, ',');
     if( !sExt.Len() )
         sExt.AssignAscii( "sxw" );
     if( '.' != sExt.GetChar( 0 ) )
diff --git a/sw/source/ui/app/docsh.cxx b/sw/source/ui/app/docsh.cxx
index e961da1..3a3194a 100644
--- a/sw/source/ui/app/docsh.cxx
+++ b/sw/source/ui/app/docsh.cxx
@@ -193,7 +193,7 @@ Reader* SwDocShell::StartConvertFrom(SfxMedium& rMedium, SwReader** ppRdr,
     SFX_ITEMSET_ARG( rMedium.GetItemSet(), pUpdateDocItem, SfxUInt16Item, SID_UPDATEDOCMODE, sal_False);
     nUpdateDocMode = pUpdateDocItem ? pUpdateDocItem->GetValue() : document::UpdateDocMode::NO_UPDATE;
 
-    if( pFlt->GetDefaultTemplate().Len() )
+    if (!pFlt->GetDefaultTemplate().isEmpty())
         pRead->SetTemplateName( pFlt->GetDefaultTemplate() );
 
     if( pRead == ReadAscii && 0 != rMedium.GetInStream() &&
diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx
index c7ce039..51db9f3 100644
--- a/sw/source/ui/dbui/dbmgr.cxx
+++ b/sw/source/ui/dbui/dbmgr.cxx
@@ -1140,7 +1140,7 @@ sal_Bool SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
 
                                 //convert fields to text if we are exporting to PDF
                                 //this prevents a second merge while updating the fields in SwXTextDocument::getRendererCount()
-                                if( pStoreToFilter && pStoreToFilter->GetFilterName().EqualsAscii("writer_pdf_Export"))
+                                if( pStoreToFilter && pStoreToFilter->GetFilterName().equalsAscii("writer_pdf_Export"))
                                     rWorkShell.ConvertFieldsToText();
                                 xWorkDocSh->DoSaveAs(*pDstMed);
                                 xWorkDocSh->DoSaveCompleted(pDstMed);
commit 0ce9083428d8181a30de1d11d511382ce101c543
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Tue Apr 9 12:22:06 2013 -0400

    String cleanup inside SfxFilter.
    
    Change-Id: I647b9e4de54fdcfadcf17ac7e161b245f3dea546

diff --git a/sfx2/inc/sfx2/docfilt.hxx b/sfx2/inc/sfx2/docfilt.hxx
index 18ccfc8..8400e5a 100644
--- a/sfx2/inc/sfx2/docfilt.hxx
+++ b/sfx2/inc/sfx2/docfilt.hxx
@@ -42,30 +42,32 @@ class SFX2_DLLPUBLIC SfxFilter
 friend class SfxFilterContainer;
 
     WildCard        aWildCard;
-    sal_uIntPtr     lFormat;
-    String          aTypeName;
-    OUString   aUserData;
+
+    OUString aTypeName;
+    OUString aUserData;
+    OUString aServiceName;
+    OUString aMimeType;
+    OUString aFilterName;
+    OUString aPattern;
+    OUString aUIName;
+    OUString aDefaultTemplate;
+
     SfxFilterFlags  nFormatType;
-    sal_uInt16      nDocIcon;
-    OUString   aServiceName;
-    OUString   aMimeType;
-    String          aFilterName;
-    String          aPattern;
     sal_uIntPtr     nVersion;
-    String          aUIName;
-    String          aDefaultTemplate;
+    sal_uIntPtr     lFormat;
+    sal_uInt16      nDocIcon;
 
 public:
-                    SfxFilter( const String &rName,
-                               const String &rWildCard,
-                               SfxFilterFlags nFormatType,
-                               sal_uInt32 lFormat,
-                               const String &rTypeName,
-                               sal_uInt16 nDocIcon,
-                               const String &rMimeType,
-                               const String &rUserData,
-                               const String& rServiceName );
-                    ~SfxFilter();
+    SfxFilter( const OUString &rName,
+               const OUString &rWildCard,
+               SfxFilterFlags nFormatType,
+               sal_uInt32 lFormat,
+               const OUString &rTypeName,
+               sal_uInt16 nDocIcon,
+               const OUString &rMimeType,
+               const OUString &rUserData,
+               const OUString& rServiceName );
+    ~SfxFilter();
 
     bool IsAllowedAsTemplate() const { return nFormatType & SFX_FILTER_TEMPLATE; }
     bool IsOwnFormat() const { return nFormatType & SFX_FILTER_OWN; }
@@ -75,26 +77,26 @@ public:
     bool CanExport() const { return nFormatType & SFX_FILTER_EXPORT; }
     bool IsInternal() const { return nFormatType & SFX_FILTER_INTERNAL; }
     SfxFilterFlags  GetFilterFlags() const  { return nFormatType; }
-    const String&   GetFilterName() const { return aFilterName; }
+    const OUString& GetFilterName() const { return aFilterName; }
     const OUString& GetMimeType() const { return aMimeType; }
-    const String&   GetName() const { return  aFilterName; }
+    const OUString& GetName() const { return  aFilterName; }
     const WildCard& GetWildcard() const { return aWildCard; }
-    const String&   GetRealTypeName() const { return aTypeName; }
+    const OUString& GetRealTypeName() const { return aTypeName; }
     sal_uIntPtr         GetFormat() const { return lFormat; }
-    const String&   GetTypeName() const { return aTypeName; }
-    const String&   GetUIName() const { return aUIName; }
+    const OUString& GetTypeName() const { return aTypeName; }
+    const OUString& GetUIName() const { return aUIName; }
     sal_uInt16          GetDocIconId() const { return nDocIcon; }
     const OUString& GetUserData() const { return aUserData; }
-    const String&   GetDefaultTemplate() const { return aDefaultTemplate; }
+    const OUString& GetDefaultTemplate() const { return aDefaultTemplate; }
     void            SetDefaultTemplate( const String& rStr ) { aDefaultTemplate = rStr; }
-    sal_Bool            UsesStorage() const { return GetFormat() != 0; }
-    void            SetURLPattern( const String& rStr ) { aPattern = rStr; aPattern.ToLowerAscii(); }
-    String          GetURLPattern() const { return aPattern; }
+    bool            UsesStorage() const { return GetFormat() != 0; }
+    void SetURLPattern( const OUString& rStr );
+    OUString GetURLPattern() const { return aPattern; }
     void            SetUIName( const String& rName ) { aUIName = rName; }
     void            SetVersion( sal_uIntPtr nVersionP ) { nVersion = nVersionP; }
     sal_uIntPtr           GetVersion() const { return nVersion; }
-    String          GetSuffixes() const;
-    String          GetDefaultExtension() const;
+    OUString GetSuffixes() const;
+    OUString GetDefaultExtension() const;
     const OUString& GetServiceName() const { return aServiceName; }
 
     static const SfxFilter* GetDefaultFilter( const String& rName );
diff --git a/sfx2/source/bastyp/fltfnc.cxx b/sfx2/source/bastyp/fltfnc.cxx
index 83181be..78b3607 100644
--- a/sfx2/source/bastyp/fltfnc.cxx
+++ b/sfx2/source/bastyp/fltfnc.cxx
@@ -809,7 +809,7 @@ const SfxFilter* SfxFilterMatcher::GetFilter4FilterName( const String& rName, Sf
                 {
                     const SfxFilter* pFilter = (*pFilterArr)[i];
                     SfxFilterFlags nFlags = pFilter->GetFilterFlags();
-                    if ( (nFlags & nMust) == nMust && !(nFlags & nDont ) && pFilter->GetFilterName().CompareIgnoreCaseToAscii( aName ) == COMPARE_EQUAL )
+                    if ((nFlags & nMust) == nMust && !(nFlags & nDont) && pFilter->GetFilterName().equalsIgnoreAsciiCase(aName))
                         return pFilter;
                 }
             }
@@ -826,7 +826,7 @@ const SfxFilter* SfxFilterMatcher::GetFilter4FilterName( const String& rName, Sf
     {
         const SfxFilter* pFilter = (*pList)[i];
         SfxFilterFlags nFlags = pFilter->GetFilterFlags();
-        if ( (nFlags & nMust) == nMust && !(nFlags & nDont ) && pFilter->GetFilterName().CompareIgnoreCaseToAscii( aName ) == COMPARE_EQUAL )
+        if ( (nFlags & nMust) == nMust && !(nFlags & nDont ) && pFilter->GetFilterName().equalsIgnoreAsciiCase(aName))
             return pFilter;
     }
 
diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx
index ee8da3d..88fd6aa 100644
--- a/sfx2/source/dialog/filedlghelper.cxx
+++ b/sfx2/source/dialog/filedlghelper.cxx
@@ -1636,7 +1636,7 @@ void FileDialogHelper_Impl::getRealFilter( String& _rFilter ) const
     {
         const SfxFilter* pFilter =
             mpMatcher->GetFilter4UIName( _rFilter, m_nMustFlags, m_nDontFlags );
-        _rFilter = pFilter ? pFilter->GetFilterName() : _rFilter.Erase();
+        _rFilter = pFilter ? String(pFilter->GetFilterName()) : _rFilter.Erase();
     }
 }
 
diff --git a/sfx2/source/doc/docfilt.cxx b/sfx2/source/doc/docfilt.cxx
index a6ed5aa..ce95b9b 100644
--- a/sfx2/source/doc/docfilt.cxx
+++ b/sfx2/source/doc/docfilt.cxx
@@ -40,67 +40,73 @@ using namespace ::com::sun::star;
 
 DBG_NAME(SfxFilter)
 
-SfxFilter::SfxFilter(  const String &rName,
-                       const String &rWildCard,
-                       SfxFilterFlags nType,
-                       sal_uInt32 lFmt,
-                       const String &rTypNm,
-                       sal_uInt16 nIcon,
-                       const String &rMimeType,
-                       const String &rUsrDat,
-                       const String &rServiceName ):
+SfxFilter::SfxFilter( const OUString &rName,
+                      const OUString &rWildCard,
+                      SfxFilterFlags nType,
+                      sal_uInt32 lFmt,
+                      const OUString &rTypNm,
+                      sal_uInt16 nIcon,
+                      const OUString &rMimeType,
+                      const OUString &rUsrDat,
+                      const OUString &rServiceName ):
     aWildCard(rWildCard, ';'),
-    lFormat(lFmt),
     aTypeName(rTypNm),
     aUserData(rUsrDat),
+    aServiceName(rServiceName),
+    aMimeType(rMimeType),
+    aFilterName(rName),
+    aUIName(aFilterName),
     nFormatType(nType),
-    nDocIcon(nIcon),
-    aServiceName( rServiceName ),
-    aMimeType( rMimeType ),
-    aFilterName( rName )
+    nVersion(SOFFICE_FILEFORMAT_50),
+    lFormat(lFmt),
+    nDocIcon(nIcon)
 {
-    String aExts = GetWildcard().getGlob();
-    String aShort, aLong;
-    String aRet;
+    OUString aExts = GetWildcard().getGlob();
+    OUString aShort, aLong;
+    OUString aRet;
     sal_uInt16 nMaxLength = USHRT_MAX;
     OUString aTest;
     sal_uInt16 nPos = 0;
-    while( ( aRet = aExts.GetToken( nPos++, ';' ) ).Len() )
+    while (!(aRet = aExts.getToken(nPos++, ';')).isEmpty() )
     {
         aTest = aRet;
         aTest = aTest.replaceFirst( "*." , "" );
         if( aTest.getLength() <= nMaxLength )
         {
-            if( aShort.Len() ) aShort += ';';
+            if (!aShort.isEmpty())
+                aShort += ";";
             aShort += aRet;
         }
         else
         {
-            if( aLong.Len() ) aLong += ';';
+            if (!aLong.isEmpty())
+                aLong += ";";
             aLong += aRet;
         }
     }
-    if( aShort.Len() && aLong.Len() )
+    if (!aShort.isEmpty() && !aLong.isEmpty())
     {
-        aShort += ';';
+        aShort += ";";
         aShort += aLong;
     }
     aWildCard.setGlob(aShort);
-
-    nVersion = SOFFICE_FILEFORMAT_50;
-    aUIName = aFilterName;
 }
 
 SfxFilter::~SfxFilter()
 {
 }
 
-String SfxFilter::GetDefaultExtension() const
+OUString SfxFilter::GetDefaultExtension() const
 {
     return comphelper::string::getToken(GetWildcard().getGlob(), 0, ';');
 }
 
-String SfxFilter::GetSuffixes() const
+void SfxFilter::SetURLPattern( const OUString& rStr )
+{
+    aPattern = rStr.toAsciiLowerCase();
+}
+
+OUString SfxFilter::GetSuffixes() const
 {
     String aRet = GetWildcard().getGlob();
     while( aRet.SearchAndReplaceAscii( "*.", String() ) != STRING_NOTFOUND ) ;
diff --git a/sfx2/source/doc/objcont.cxx b/sfx2/source/doc/objcont.cxx
index e6722b7..a03879c 100644
--- a/sfx2/source/doc/objcont.cxx
+++ b/sfx2/source/doc/objcont.cxx
@@ -807,7 +807,7 @@ void SfxObjectShell::UpdateFromTemplate_Impl(  )
 sal_Bool SfxObjectShell::IsHelpDocument() const
 {
     const SfxFilter* pFilter = GetMedium()->GetFilter();
-    return ( pFilter && pFilter->GetFilterName().CompareToAscii("writer_web_HTML_help") == COMPARE_EQUAL );
+    return (pFilter && pFilter->GetFilterName() == "writer_web_HTML_help");
 }
 
 void SfxObjectShell::ResetFromTemplate( const String& rTemplateName, const String& rFileName )
commit 63724f0ab38390d2483f7ceb28d4baf29171f330
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Tue Apr 9 11:44:55 2013 -0400

    com::sun::star cleanup.
    
    Change-Id: I279441c1e1a271c76a2fec92711765134da90cac

diff --git a/sfx2/source/bastyp/fltfnc.cxx b/sfx2/source/bastyp/fltfnc.cxx
index 53e3c26..83181be 100644
--- a/sfx2/source/bastyp/fltfnc.cxx
+++ b/sfx2/source/bastyp/fltfnc.cxx
@@ -79,10 +79,6 @@
 #include <rtl/logfile.hxx>
 #include <rtl/instance.hxx>
 
-using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::ucb;
-using namespace ::com::sun::star::document;
-using namespace ::com::sun::star::beans;
 #include <svl/ctypeitm.hxx>
 #include <svtools/sfxecode.hxx>
 #include <unotools/syslocale.hxx>
@@ -114,6 +110,8 @@ using namespace ::com::sun::star::beans;
 unsigned SfxStack::nLevel = 0;
 #endif
 
+using namespace com::sun::star;
+
 namespace
 {
     class theSfxFilterListener : public rtl::Static<SfxFilterListener, theSfxFilterListener> {};
@@ -380,13 +378,15 @@ sal_uInt32  SfxFilterMatcher::GuessFilterIgnoringContent(
     SfxFilterFlags nMust,
     SfxFilterFlags nDont ) const
 {
-    Reference< XTypeDetection > xDetection( ::comphelper::getProcessServiceFactory()->createInstance(OUString("com.sun.star.document.TypeDetection")), UNO_QUERY );
+    uno::Reference<document::XTypeDetection> xDetection(
+        comphelper::getProcessServiceFactory()->createInstance("com.sun.star.document.TypeDetection"), uno::UNO_QUERY);
+
     OUString sTypeName;
     try
     {
         sTypeName = xDetection->queryTypeByURL( rMedium.GetURLObject().GetMainURL( INetURLObject::NO_DECODE ) );
     }
-    catch( Exception& )
+    catch (uno::Exception&)
     {
     }
 
@@ -415,7 +415,9 @@ sal_uInt32  SfxFilterMatcher::GuessFilterControlDefaultUI( SfxMedium& rMedium, c
     const SfxFilter* pOldFilter = *ppFilter;
 
     // no detection service -> nothing to do !
-    Reference< XTypeDetection > xDetection( ::comphelper::getProcessServiceFactory()->createInstance(OUString("com.sun.star.document.TypeDetection")), UNO_QUERY );
+    uno::Reference<document::XTypeDetection> xDetection(
+        comphelper::getProcessServiceFactory()->createInstance("com.sun.star.document.TypeDetection"), uno::UNO_QUERY);
+
     if (!xDetection.is())
         return ERRCODE_ABORT;
 
@@ -426,7 +428,7 @@ sal_uInt32  SfxFilterMatcher::GuessFilterControlDefaultUI( SfxMedium& rMedium, c
         // Otherwhise it will be tried more then once and show the same interaction more then once ...
 
         OUString sURL( rMedium.GetURLObject().GetMainURL( INetURLObject::NO_DECODE ) );
-        ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > xInStream = rMedium.GetInputStream();
+        uno::Reference< io::XInputStream > xInStream = rMedium.GetInputStream();
         OUString aFilterName;
 
         // stream exists => deep detection (with preselection ... if possible)
@@ -447,7 +449,7 @@ sal_uInt32  SfxFilterMatcher::GuessFilterControlDefaultUI( SfxMedium& rMedium, c
                 aDescriptor[::comphelper::MediaDescriptor::PROP_FILTERNAME()] <<= OUString( pOldFilter->GetFilterName() );
             }
 
-            ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > lDescriptor = aDescriptor.getAsConstPropertyValueList();
+            uno::Sequence< beans::PropertyValue > lDescriptor = aDescriptor.getAsConstPropertyValueList();
             sTypeName = xDetection->queryTypeByDescriptor(lDescriptor, sal_True); // lDescriptor is used as In/Out param ... dont use aDescriptor.getAsConstPropertyValueList() directly!
 
             for (sal_Int32 i = 0; i < lDescriptor.getLength(); ++i)
@@ -475,7 +477,7 @@ sal_uInt32  SfxFilterMatcher::GuessFilterControlDefaultUI( SfxMedium& rMedium, c
                 // If there is no acceptable type for this document at all, the type detection has possibly returned something else.
                 // The DocumentService property is only a preselection, and all preselections are considered as optional!
                 // This "wrong" type will be sorted out now because we match only allowed filters to the detected type
-                ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue > lQuery(1);
+                uno::Sequence< beans::NamedValue > lQuery(1);
                 lQuery[0].Name = OUString("Name");
                 lQuery[0].Value <<= sTypeName;
 
@@ -489,7 +491,7 @@ sal_uInt32  SfxFilterMatcher::GuessFilterControlDefaultUI( SfxMedium& rMedium, c
             }
         }
     }
-    catch(const Exception&)
+    catch (const uno::Exception&)
     {}
 
     return ERRCODE_ABORT;
@@ -605,16 +607,16 @@ sal_uInt32 SfxFilterMatcher::DetectFilter( SfxMedium& rMedium, const SfxFilter**
     return nErr;
 }
 
-const SfxFilter* SfxFilterMatcher::GetFilterForProps( const com::sun::star::uno::Sequence < ::com::sun::star::beans::NamedValue >& aSeq, SfxFilterFlags nMust, SfxFilterFlags nDont ) const
+const SfxFilter* SfxFilterMatcher::GetFilterForProps( const com::sun::star::uno::Sequence < beans::NamedValue >& aSeq, SfxFilterFlags nMust, SfxFilterFlags nDont ) const
 {
-    ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceManager = ::comphelper::getProcessServiceFactory();
-    ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerQuery > xTypeCFG;
+    uno::Reference< lang::XMultiServiceFactory > xServiceManager = ::comphelper::getProcessServiceFactory();
+    uno::Reference< container::XContainerQuery > xTypeCFG;
     if( xServiceManager.is() == sal_True )
-        xTypeCFG   = ::com::sun::star::uno::Reference < com::sun::star::container::XContainerQuery >( xServiceManager->createInstance( "com.sun.star.document.TypeDetection" ), ::com::sun::star::uno::UNO_QUERY );
+        xTypeCFG   = uno::Reference < com::sun::star::container::XContainerQuery >( xServiceManager->createInstance( "com.sun.star.document.TypeDetection" ), uno::UNO_QUERY );
     if ( xTypeCFG.is() )
     {
         // make query for all types matching the properties
-        ::com::sun::star::uno::Reference < com::sun::star::container::XEnumeration > xEnum = xTypeCFG->createSubSetEnumerationByProperties( aSeq );
+        uno::Reference < com::sun::star::container::XEnumeration > xEnum = xTypeCFG->createSubSetEnumerationByProperties( aSeq );
         while ( xEnum->hasMoreElements() )
         {
             ::comphelper::SequenceAsHashMap aProps( xEnum->nextElement() );
@@ -738,7 +740,7 @@ const SfxFilter* SfxFilterMatcher::GetFilter4Extension( const String& rExt, SfxF
 
     com::sun::star::uno::Sequence < com::sun::star::beans::NamedValue > aSeq(1);
     aSeq[0].Name = OUString("Extensions");
-    ::com::sun::star::uno::Sequence < OUString > aExts(1);
+    uno::Sequence < OUString > aExts(1);
     aExts[0] = sExt;
     aSeq[0].Value <<= aExts;
     return GetFilterForProps( aSeq, nMust, nDont );
@@ -788,13 +790,13 @@ const SfxFilter* SfxFilterMatcher::GetFilter4FilterName( const String& rName, Sf
 
     if ( bFirstRead )
     {
-        ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceManager = ::comphelper::getProcessServiceFactory();
-        ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >     xFilterCFG                                                ;
-        ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >     xTypeCFG                                                  ;
+        uno::Reference< lang::XMultiServiceFactory > xServiceManager = ::comphelper::getProcessServiceFactory();
+        uno::Reference< container::XNameAccess >     xFilterCFG                                                ;
+        uno::Reference< container::XNameAccess >     xTypeCFG                                                  ;
         if( xServiceManager.is() == sal_True )
         {
-            xFilterCFG = ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >( xServiceManager->createInstance(  "com.sun.star.document.FilterFactory" ), ::com::sun::star::uno::UNO_QUERY );
-            xTypeCFG   = ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >( xServiceManager->createInstance(  "com.sun.star.document.TypeDetection" ), ::com::sun::star::uno::UNO_QUERY );
+            xFilterCFG = uno::Reference< container::XNameAccess >( xServiceManager->createInstance(  "com.sun.star.document.FilterFactory" ), uno::UNO_QUERY );
+            xTypeCFG   = uno::Reference< container::XNameAccess >( xServiceManager->createInstance(  "com.sun.star.document.TypeDetection" ), uno::UNO_QUERY );
         }
 
         if( xFilterCFG.is() && xTypeCFG.is() )
@@ -891,7 +893,7 @@ const SfxFilter* SfxFilterMatcherIter::Next()
     helper to build own formated string from given stringlist by
     using given seperator
   ---------------------------------------------------------------*/
-OUString implc_convertStringlistToString( const ::com::sun::star::uno::Sequence< OUString >& lList     ,
+OUString implc_convertStringlistToString( const uno::Sequence< OUString >& lList     ,
                                                  const sal_Unicode&                                        cSeperator,
                                                  const OUString&                                    sPrefix   )
 {
@@ -916,22 +918,22 @@ OUString implc_convertStringlistToString( const ::com::sun::star::uno::Sequence<
 
 void SfxFilterContainer::ReadSingleFilter_Impl(
     const OUString& rName,
-    const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& xTypeCFG,
-    const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& xFilterCFG,
+    const uno::Reference< container::XNameAccess >& xTypeCFG,
+    const uno::Reference< container::XNameAccess >& xFilterCFG,
     sal_Bool bUpdate
     )
 {
     OUString sFilterName( rName );
     SfxFilterList_Impl& rList = *pFilterArr;
-    ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > lFilterProperties;
-    ::com::sun::star::uno::Any aResult;
+    uno::Sequence< beans::PropertyValue > lFilterProperties;
+    uno::Any aResult;
     try
     {
         aResult = xFilterCFG->getByName( sFilterName );
     }
-    catch( ::com::sun::star::container::NoSuchElementException& )
+    catch( container::NoSuchElementException& )
     {
-        aResult = ::com::sun::star::uno::Any();
+        aResult = uno::Any();
     }
 
     if( aResult >>= lFilterProperties )
@@ -975,7 +977,7 @@ void SfxFilterContainer::ReadSingleFilter_Impl(
             }
             else if ( lFilterProperties[nFilterProperty].Name == "UserData" )
             {
-                ::com::sun::star::uno::Sequence< OUString > lUserData;
+                uno::Sequence< OUString > lUserData;
                 lFilterProperties[nFilterProperty].Value >>= lUserData;
                 sUserData = implc_convertStringlistToString( lUserData, ',', OUString() );
             }
@@ -999,12 +1001,12 @@ void SfxFilterContainer::ReadSingleFilter_Impl(
                 {
                     aResult = xTypeCFG->getByName( sType );
                 }
-                catch (const ::com::sun::star::container::NoSuchElementException&)
+                catch (const container::NoSuchElementException&)
                 {
-                    aResult = ::com::sun::star::uno::Any();
+                    aResult = uno::Any();
                 }
 
-                ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > lTypeProperties;
+                uno::Sequence< beans::PropertyValue > lTypeProperties;
                 if( aResult >>= lTypeProperties )
                 {
                     // get indirect available properties then (types)
@@ -1028,14 +1030,14 @@ void SfxFilterContainer::ReadSingleFilter_Impl(
                         {
                             if (sExtension.isEmpty())
                             {
-                                ::com::sun::star::uno::Sequence< OUString > lExtensions;
+                                uno::Sequence< OUString > lExtensions;
                                 lTypeProperties[nTypeProperty].Value >>= lExtensions;
                                 sExtension = implc_convertStringlistToString( lExtensions, ';', "*." );
                             }
                         }
                         else if ( lTypeProperties[nTypeProperty].Name == "URLPattern" )
                         {
-                                ::com::sun::star::uno::Sequence< OUString > lPattern;
+                                uno::Sequence< OUString > lPattern;
                                 lTypeProperties[nTypeProperty].Value >>= lPattern;
                                 sPattern = implc_convertStringlistToString( lPattern, ';', OUString() );
                         }
@@ -1123,13 +1125,13 @@ void SfxFilterContainer::ReadFilters_Impl( sal_Bool bUpdate )
     try
     {
         // get the FilterFactory service to access the registered filters ... and types!
-        ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceManager = ::comphelper::getProcessServiceFactory();
-        ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >     xFilterCFG                                                ;
-        ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >     xTypeCFG                                                  ;
+        uno::Reference< lang::XMultiServiceFactory > xServiceManager = ::comphelper::getProcessServiceFactory();
+        uno::Reference< container::XNameAccess >     xFilterCFG                                                ;
+        uno::Reference< container::XNameAccess >     xTypeCFG                                                  ;
         if( xServiceManager.is() == sal_True )
         {
-            xFilterCFG = ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >( xServiceManager->createInstance(  "com.sun.star.document.FilterFactory" ), ::com::sun::star::uno::UNO_QUERY );
-            xTypeCFG   = ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >( xServiceManager->createInstance(  "com.sun.star.document.TypeDetection" ), ::com::sun::star::uno::UNO_QUERY );
+            xFilterCFG = uno::Reference< container::XNameAccess >( xServiceManager->createInstance(  "com.sun.star.document.FilterFactory" ), uno::UNO_QUERY );
+            xTypeCFG   = uno::Reference< container::XNameAccess >( xServiceManager->createInstance(  "com.sun.star.document.TypeDetection" ), uno::UNO_QUERY );
         }
 
         if(
@@ -1138,7 +1140,7 @@ void SfxFilterContainer::ReadFilters_Impl( sal_Bool bUpdate )
           )
         {
             // select right query to get right set of filters for search modul
-            ::com::sun::star::uno::Sequence< OUString > lFilterNames = xFilterCFG->getElementNames();
+            uno::Sequence< OUString > lFilterNames = xFilterCFG->getElementNames();
             if ( lFilterNames.getLength() )
             {
                 // If list of filters already exist ...
@@ -1169,7 +1171,7 @@ void SfxFilterContainer::ReadFilters_Impl( sal_Bool bUpdate )
             }
         }
     }
-    catch(const ::com::sun::star::uno::Exception&)
+    catch(const uno::Exception&)
     {
         DBG_ASSERT( sal_False, "SfxFilterContainer::ReadFilter()\nException detected. Possible not all filters could be cached.\n" );
     }
commit 746f8a08f55fe9597cbab63342ee3c91254f148b
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Tue Apr 9 11:34:45 2013 -0400

    Make the member mutable to avoid ugly casting.
    
    Change-Id: I28fd84b89a8d443e502d2c0e76f38cf006a57d4a

diff --git a/sfx2/source/bastyp/fltfnc.cxx b/sfx2/source/bastyp/fltfnc.cxx
index ff9d51c..53e3c26 100644
--- a/sfx2/source/bastyp/fltfnc.cxx
+++ b/sfx2/source/bastyp/fltfnc.cxx
@@ -248,10 +248,10 @@ class SfxFilterMatcher_Impl
 {
 public:
     OUString     aName;
-    SfxFilterList_Impl* pList;      // is created on demand
+    mutable SfxFilterList_Impl* pList;      // is created on demand
 
     void InitForIterating() const;
-    void Update();
+    void Update() const;
     SfxFilterMatcher_Impl(const OUString &rName)
         : aName(rName)
         , pList(0)
@@ -321,7 +321,7 @@ SfxFilterMatcher::~SfxFilterMatcher()
         aImplArr.clear();
 }
 
-void SfxFilterMatcher_Impl::Update()
+void SfxFilterMatcher_Impl::Update() const
 {
     if ( pList )
     {
@@ -348,13 +348,13 @@ void SfxFilterMatcher_Impl::InitForIterating() const
     if ( !aName.isEmpty() )
     {
         // matcher of factory: use only filters of that document type
-        ((SfxFilterMatcher_Impl*)this)->pList = new SfxFilterList_Impl;
-        ((SfxFilterMatcher_Impl*)this)->Update();
+        pList = new SfxFilterList_Impl;
+        Update();
     }
     else
     {
         // global matcher: use global filter array
-        ((SfxFilterMatcher_Impl*)this)->pList = pFilterArr;
+        pList = pFilterArr;
     }
 }
 
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index 5c15239..edd5fed 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -2873,11 +2873,28 @@ SfxMedium::SfxMedium( const uno::Sequence<beans::PropertyValue>& aArgs ) :
     pImp->m_pSet = pParams;
     TransformParameters( SID_OPENDOC, aArgs, *pParams );
 
-    String aFilterName;
-    SFX_ITEMSET_ARG( pImp->m_pSet, pFilterNameItem, SfxStringItem, SID_FILTER_NAME, false );
-    if( pFilterNameItem )
-        aFilterName = pFilterNameItem->GetValue();
-    pImp->m_pFilter = SFX_APP()->GetFilterMatcher().GetFilter4FilterName( aFilterName );
+    OUString aFilterProvider;
+    {
+        const SfxPoolItem* pItem = NULL;
+        if (pImp->m_pSet->HasItem(SID_FILTER_PROVIDER, &pItem))
+            aFilterProvider = static_cast<const SfxStringItem*>(pItem)->GetValue();
+    }
+
+    fprintf(stdout, "SfxMedium::SfxMedium:   filter provider = '%s'\n", rtl::OUStringToOString(aFilterProvider, RTL_TEXTENCODING_UTF8).getStr());
+    if (aFilterProvider.isEmpty())
+    {
+        // This is a conventional filter type.
+        OUString aFilterName;
+        SFX_ITEMSET_ARG( pImp->m_pSet, pFilterNameItem, SfxStringItem, SID_FILTER_NAME, false );
+        if( pFilterNameItem )
+            aFilterName = pFilterNameItem->GetValue();
+        pImp->m_pFilter = SFX_APP()->GetFilterMatcher().GetFilter4FilterName( aFilterName );
+    }
+    else
+    {
+        // This filter is from an external provider such as orcus.
+
+    }
 
     SFX_ITEMSET_ARG( pImp->m_pSet, pSalvageItem, SfxStringItem, SID_DOC_SALVAGE, false );
     if( pSalvageItem )
commit aa6e3a1d252ac7e86a6338f366b3127b1ea7dcf8
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Tue Apr 9 10:57:06 2013 -0400

    Reduce indentation by early bail-out.
    
    Change-Id: I8430d030fdfce51d3706c801ce8d2cb3fa6eed5d

diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx
index 4c07dae..b707761 100644
--- a/sfx2/source/appl/appuno.cxx
+++ b/sfx2/source/appl/appuno.cxx
@@ -1366,342 +1366,343 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, uno::Sequence<b
                 }
             }
         }
+
+        rArgs = aSequ;
+        return;
     }
-    else
+
+    // slot is a method
+    sal_uInt16 nFormalArgs = pSlot->GetFormalArgumentCount();
+    for ( sal_uInt16 nArg=0; nArg<nFormalArgs; ++nArg )
     {
-        // slot is a method
-        sal_uInt16 nFormalArgs = pSlot->GetFormalArgumentCount();
-        for ( sal_uInt16 nArg=0; nArg<nFormalArgs; ++nArg )
+        const SfxFormalArgument &rArg = pSlot->GetFormalArgument( nArg );
+        sal_uInt16 nWhich = rSet.GetPool()->GetWhich( rArg.nSlotId );
+        sal_Bool bConvertTwips = ( rSet.GetPool()->GetMetric( nWhich ) == SFX_MAPUNIT_TWIP );
+        SFX_ITEMSET_ARG( &rSet, pItem, SfxPoolItem, nWhich, sal_False );
+        if ( pItem ) //???
         {
-            const SfxFormalArgument &rArg = pSlot->GetFormalArgument( nArg );
-            sal_uInt16 nWhich = rSet.GetPool()->GetWhich( rArg.nSlotId );
-            sal_Bool bConvertTwips = ( rSet.GetPool()->GetMetric( nWhich ) == SFX_MAPUNIT_TWIP );
-            SFX_ITEMSET_ARG( &rSet, pItem, SfxPoolItem, nWhich, sal_False );
-            if ( pItem ) //???
+            sal_uInt16 nSubCount = rArg.pType->nAttribs;
+            if ( !nSubCount )
             {
-                sal_uInt16 nSubCount = rArg.pType->nAttribs;
-                if ( !nSubCount )
+                pValue[nActProp].Name = OUString::createFromAscii( rArg.pName ) ;
+                if ( !pItem->QueryValue( pValue[nActProp++].Value ) )
                 {
-                    pValue[nActProp].Name = OUString::createFromAscii( rArg.pName ) ;
-                    if ( !pItem->QueryValue( pValue[nActProp++].Value ) )
+                    OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM(
+                        "Item not convertable: "));
+                    aStr.append(static_cast<sal_Int32>(rArg.nSlotId));
+                    OSL_FAIL(aStr.getStr());
+                }
+            }
+            else
+            {
+                // complex type, add a property value for every member of the struct
+                for ( sal_uInt16 n = 1; n <= nSubCount; ++n )
+                {
+                    sal_uInt8 nSubId = (sal_uInt8) (sal_Int8) rArg.pType->aAttrib[n-1].nAID;
+                    if ( bConvertTwips )
+                        nSubId |= CONVERT_TWIPS;
+
+                    DBG_ASSERT((rArg.pType->aAttrib[n-1].nAID) <= 127, "Member ID out of range" );
+                    String aName( OUString::createFromAscii( rArg.pName ) ) ;
+                    aName += '.';
+                    aName += OUString::createFromAscii( rArg.pType->aAttrib[n-1].pName ) ;
+                    pValue[nActProp].Name = aName;
+                    if ( !pItem->QueryValue( pValue[nActProp++].Value, nSubId ) )
                     {
                         OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM(
-                            "Item not convertable: "));
+                            "Sub item "));
+                        aStr.append(static_cast<sal_Int32>(
+                            rArg.pType->aAttrib[n-1].nAID));
+                        aStr.append(RTL_CONSTASCII_STRINGPARAM(
+                            " not convertable in slot: "));
                         aStr.append(static_cast<sal_Int32>(rArg.nSlotId));
                         OSL_FAIL(aStr.getStr());
                     }
                 }
-                else
-                {
-                    // complex type, add a property value for every member of the struct
-                    for ( sal_uInt16 n = 1; n <= nSubCount; ++n )
-                    {
-                        sal_uInt8 nSubId = (sal_uInt8) (sal_Int8) rArg.pType->aAttrib[n-1].nAID;
-                        if ( bConvertTwips )
-                            nSubId |= CONVERT_TWIPS;
-
-                        DBG_ASSERT((rArg.pType->aAttrib[n-1].nAID) <= 127, "Member ID out of range" );
-                        String aName( OUString::createFromAscii( rArg.pName ) ) ;
-                        aName += '.';
-                        aName += OUString::createFromAscii( rArg.pType->aAttrib[n-1].pName ) ;
-                        pValue[nActProp].Name = aName;
-                        if ( !pItem->QueryValue( pValue[nActProp++].Value, nSubId ) )
-                        {
-                            OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM(
-                                "Sub item "));
-                            aStr.append(static_cast<sal_Int32>(
-                                rArg.pType->aAttrib[n-1].nAID));
-                            aStr.append(RTL_CONSTASCII_STRINGPARAM(
-                                " not convertable in slot: "));
-                            aStr.append(static_cast<sal_Int32>(rArg.nSlotId));
-                            OSL_FAIL(aStr.getStr());
-                        }
-                    }
-                }
             }
         }
+    }
 
-        if ( nSlotId == SID_OPENDOC || nSlotId == SID_EXPORTDOC || nSlotId == SID_SAVEASDOC ||  nSlotId == SID_SAVEDOC ||
-             nSlotId == SID_SAVETO || nSlotId == SID_EXPORTDOCASPDF || nSlotId == SID_DIRECTEXPORTDOCASPDF )
+    if ( nSlotId == SID_OPENDOC || nSlotId == SID_EXPORTDOC || nSlotId == SID_SAVEASDOC ||  nSlotId == SID_SAVEDOC ||
+         nSlotId == SID_SAVETO || nSlotId == SID_EXPORTDOCASPDF || nSlotId == SID_DIRECTEXPORTDOCASPDF )
+    {
+        const SfxPoolItem *pItem=0;
+        if ( rSet.GetItemState( SID_COMPONENTDATA, sal_False, &pItem ) == SFX_ITEM_SET )
         {
-            const SfxPoolItem *pItem=0;
-            if ( rSet.GetItemState( SID_COMPONENTDATA, sal_False, &pItem ) == SFX_ITEM_SET )
-            {
-                pValue[nActProp].Name = OUString(sComponentData);
-                pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() );
-            }
-            if ( rSet.GetItemState( SID_COMPONENTCONTEXT, sal_False, &pItem ) == SFX_ITEM_SET )
-            {
-                pValue[nActProp].Name = OUString(sComponentContext);
-                pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() );
-            }
-            if ( rSet.GetItemState( SID_PROGRESS_STATUSBAR_CONTROL, sal_False, &pItem ) == SFX_ITEM_SET )
-            {
-                pValue[nActProp].Name = OUString(sStatusInd);
-                pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() );
-            }
-            if ( rSet.GetItemState( SID_INTERACTIONHANDLER, sal_False, &pItem ) == SFX_ITEM_SET )
-            {
-                pValue[nActProp].Name = OUString(sInteractionHdl);
-                pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() );
-            }
-            if ( rSet.GetItemState( SID_VIEW_DATA, sal_False, &pItem ) == SFX_ITEM_SET )
-            {
-                pValue[nActProp].Name = OUString(sViewData);
-                pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() );
-            }
-            if ( rSet.GetItemState( SID_FILTER_DATA, sal_False, &pItem ) == SFX_ITEM_SET )
-            {
-                pValue[nActProp].Name = OUString(sFilterData);
-                pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() );
-            }
-            if ( rSet.GetItemState( SID_DOCUMENT, sal_False, &pItem ) == SFX_ITEM_SET )
-            {
-                pValue[nActProp].Name = OUString(sModel);
-                pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() );
-            }
-            if ( rSet.GetItemState( SID_CONTENT, sal_False, &pItem ) == SFX_ITEM_SET )
-            {
-                pValue[nActProp].Name = OUString(sUCBContent);
-                pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() );
-            }
-            if ( rSet.GetItemState( SID_INPUTSTREAM, sal_False, &pItem ) == SFX_ITEM_SET )
-            {
-                pValue[nActProp].Name = OUString(sInputStream);
-                pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() );
-            }
-            if ( rSet.GetItemState( SID_STREAM, sal_False, &pItem ) == SFX_ITEM_SET )
-            {
-                pValue[nActProp].Name = OUString(sStream);
-                pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() );
-            }
-            if ( rSet.GetItemState( SID_OUTPUTSTREAM, sal_False, &pItem ) == SFX_ITEM_SET )
-            {
-                pValue[nActProp].Name = OUString(sOutputStream);
-                pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() );
-            }
-            if ( rSet.GetItemState( SID_POSTDATA, sal_False, &pItem ) == SFX_ITEM_SET )
-            {
-                pValue[nActProp].Name = OUString(sPostData);
-                pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() );
-            }
-            if ( rSet.GetItemState( SID_FILLFRAME, sal_False, &pItem ) == SFX_ITEM_SET )
-            {
-                pValue[nActProp].Name = OUString(sFrame);
-                if ( pItem->ISA( SfxUsrAnyItem ) )
-                {
-                    OSL_FAIL( "TransformItems: transporting an XFrame via an SfxUsrAnyItem is not deprecated!" );
-                    pValue[nActProp++].Value = static_cast< const SfxUsrAnyItem* >( pItem )->GetValue();
-                }
-                else if ( pItem->ISA( SfxUnoFrameItem ) )
-                    pValue[nActProp++].Value <<= static_cast< const SfxUnoFrameItem* >( pItem )->GetFrame();
-                else
-                    OSL_FAIL( "TransformItems: invalid item type for SID_FILLFRAME!" );
-            }
-            if ( rSet.GetItemState( SID_TEMPLATE, sal_False, &pItem ) == SFX_ITEM_SET )
-            {
-                pValue[nActProp].Name = OUString(sAsTemplate);
-                pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() );
-            }
-            if ( rSet.GetItemState( SID_OPEN_NEW_VIEW, sal_False, &pItem ) == SFX_ITEM_SET )
-            {
-                pValue[nActProp].Name = OUString(sOpenNewView);
-                pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() );
-            }
-            if ( rSet.GetItemState( SID_FAIL_ON_WARNING, sal_False, &pItem ) == SFX_ITEM_SET )
-            {
-                pValue[nActProp].Name = OUString(RTL_CONSTASCII_USTRINGPARAM(sFailOnWarning));
-                pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() );
-            }
-            if ( rSet.GetItemState( SID_VIEW_ID, sal_False, &pItem ) == SFX_ITEM_SET )
-            {
-                pValue[nActProp].Name = OUString(sViewId);
-                pValue[nActProp++].Value <<= ( (sal_Int16) ((SfxUInt16Item*)pItem)->GetValue() );
-            }
-            if ( rSet.GetItemState( SID_PLUGIN_MODE, sal_False, &pItem ) == SFX_ITEM_SET )
-            {
-                pValue[nActProp].Name = OUString(sPluginMode);
-                pValue[nActProp++].Value <<= ( (sal_Int16) ((SfxUInt16Item*)pItem)->GetValue() );
-            }
-            if ( rSet.GetItemState( SID_DOC_READONLY, sal_False, &pItem ) == SFX_ITEM_SET )
-            {
-                pValue[nActProp].Name = OUString(sReadOnly);
-                pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() );
-            }
-            if ( rSet.GetItemState( SID_DDE_RECONNECT_ONLOAD, sal_False, &pItem ) == SFX_ITEM_SET )
-            {
-                pValue[nActProp].Name = OUString(sDdeReconnect);
-                pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() );
-            }
-            if ( rSet.GetItemState( SID_DOC_STARTPRESENTATION, sal_False, &pItem ) == SFX_ITEM_SET )
-            {
-                pValue[nActProp].Name = OUString(sStartPresentation);
-                pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() );
-            }
-            if ( rSet.GetItemState( SID_SELECTION, sal_False, &pItem ) == SFX_ITEM_SET )
-            {
-                pValue[nActProp].Name = OUString(sSelectionOnly);
-                pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() );
-            }
-            if ( rSet.GetItemState( SID_HIDDEN, sal_False, &pItem ) == SFX_ITEM_SET )
-            {
-                pValue[nActProp].Name = OUString(sHidden);
-                pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() );
-            }
-            if ( rSet.GetItemState( SID_MINIMIZED, sal_False, &pItem ) == SFX_ITEM_SET )
-            {
-                pValue[nActProp].Name = OUString(sMinimized);
-                pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() );
-            }
-            if ( rSet.GetItemState( SID_SILENT, sal_False, &pItem ) == SFX_ITEM_SET )
-            {
-                pValue[nActProp].Name = OUString(sSilent);
-                pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() );
-            }
-            if ( rSet.GetItemState( SID_PREVIEW, sal_False, &pItem ) == SFX_ITEM_SET )
-            {
-                pValue[nActProp].Name = OUString(sPreview);
-                pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() );
-            }
-            if ( rSet.GetItemState( SID_VIEWONLY, sal_False, &pItem ) == SFX_ITEM_SET )
-            {
-                pValue[nActProp].Name = OUString(sViewOnly);
-                pValue[nActProp++].Value <<= (sal_Bool) (( ((SfxBoolItem*)pItem)->GetValue() ));
-            }
-            if ( rSet.GetItemState( SID_EDITDOC, sal_False, &pItem ) == SFX_ITEM_SET )
-            {
-                pValue[nActProp].Name = OUString(sDontEdit);
-                pValue[nActProp++].Value <<= (sal_Bool) (!( ((SfxBoolItem*)pItem)->GetValue() ));
-            }
-            if ( rSet.GetItemState( SID_FILE_DIALOG, sal_False, &pItem ) == SFX_ITEM_SET )
-            {
-                pValue[nActProp].Name = OUString(sUseSystemDialog);
-                pValue[nActProp++].Value <<= (sal_Bool) ( ((SfxBoolItem*)pItem)->GetValue() );
-            }
-            if ( rSet.GetItemState( SID_STANDARD_DIR, sal_False, &pItem ) == SFX_ITEM_SET )
+            pValue[nActProp].Name = OUString(sComponentData);
+            pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() );
+        }
+        if ( rSet.GetItemState( SID_COMPONENTCONTEXT, sal_False, &pItem ) == SFX_ITEM_SET )
+        {
+            pValue[nActProp].Name = OUString(sComponentContext);
+            pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() );
+        }
+        if ( rSet.GetItemState( SID_PROGRESS_STATUSBAR_CONTROL, sal_False, &pItem ) == SFX_ITEM_SET )
+        {
+            pValue[nActProp].Name = OUString(sStatusInd);
+            pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() );
+        }
+        if ( rSet.GetItemState( SID_INTERACTIONHANDLER, sal_False, &pItem ) == SFX_ITEM_SET )
+        {
+            pValue[nActProp].Name = OUString(sInteractionHdl);
+            pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() );
+        }
+        if ( rSet.GetItemState( SID_VIEW_DATA, sal_False, &pItem ) == SFX_ITEM_SET )
+        {
+            pValue[nActProp].Name = OUString(sViewData);
+            pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() );
+        }
+        if ( rSet.GetItemState( SID_FILTER_DATA, sal_False, &pItem ) == SFX_ITEM_SET )
+        {
+            pValue[nActProp].Name = OUString(sFilterData);
+            pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() );
+        }
+        if ( rSet.GetItemState( SID_DOCUMENT, sal_False, &pItem ) == SFX_ITEM_SET )
+        {
+            pValue[nActProp].Name = OUString(sModel);
+            pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() );
+        }
+        if ( rSet.GetItemState( SID_CONTENT, sal_False, &pItem ) == SFX_ITEM_SET )
+        {
+            pValue[nActProp].Name = OUString(sUCBContent);
+            pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() );
+        }
+        if ( rSet.GetItemState( SID_INPUTSTREAM, sal_False, &pItem ) == SFX_ITEM_SET )
+        {
+            pValue[nActProp].Name = OUString(sInputStream);
+            pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() );
+        }
+        if ( rSet.GetItemState( SID_STREAM, sal_False, &pItem ) == SFX_ITEM_SET )
+        {
+            pValue[nActProp].Name = OUString(sStream);
+            pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() );
+        }
+        if ( rSet.GetItemState( SID_OUTPUTSTREAM, sal_False, &pItem ) == SFX_ITEM_SET )
+        {
+            pValue[nActProp].Name = OUString(sOutputStream);
+            pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() );
+        }
+        if ( rSet.GetItemState( SID_POSTDATA, sal_False, &pItem ) == SFX_ITEM_SET )
+        {
+            pValue[nActProp].Name = OUString(sPostData);
+            pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() );
+        }
+        if ( rSet.GetItemState( SID_FILLFRAME, sal_False, &pItem ) == SFX_ITEM_SET )
+        {
+            pValue[nActProp].Name = OUString(sFrame);
+            if ( pItem->ISA( SfxUsrAnyItem ) )
             {
-                pValue[nActProp].Name = OUString(sStandardDir);
-                pValue[nActProp++].Value <<= (  OUString(((SfxStringItem*)pItem)->GetValue()) );
+                OSL_FAIL( "TransformItems: transporting an XFrame via an SfxUsrAnyItem is not deprecated!" );
+                pValue[nActProp++].Value = static_cast< const SfxUsrAnyItem* >( pItem )->GetValue();
             }
-            if ( rSet.GetItemState( SID_BLACK_LIST, sal_False, &pItem ) == SFX_ITEM_SET )
-            {
-                pValue[nActProp].Name = OUString(sBlackList);
+            else if ( pItem->ISA( SfxUnoFrameItem ) )
+                pValue[nActProp++].Value <<= static_cast< const SfxUnoFrameItem* >( pItem )->GetFrame();
+            else
+                OSL_FAIL( "TransformItems: invalid item type for SID_FILLFRAME!" );
+        }
+        if ( rSet.GetItemState( SID_TEMPLATE, sal_False, &pItem ) == SFX_ITEM_SET )
+        {
+            pValue[nActProp].Name = OUString(sAsTemplate);
+            pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() );
+        }
+        if ( rSet.GetItemState( SID_OPEN_NEW_VIEW, sal_False, &pItem ) == SFX_ITEM_SET )
+        {
+            pValue[nActProp].Name = OUString(sOpenNewView);
+            pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() );
+        }
+        if ( rSet.GetItemState( SID_FAIL_ON_WARNING, sal_False, &pItem ) == SFX_ITEM_SET )
+        {
+            pValue[nActProp].Name = OUString(RTL_CONSTASCII_USTRINGPARAM(sFailOnWarning));
+            pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() );
+        }
+        if ( rSet.GetItemState( SID_VIEW_ID, sal_False, &pItem ) == SFX_ITEM_SET )
+        {
+            pValue[nActProp].Name = OUString(sViewId);
+            pValue[nActProp++].Value <<= ( (sal_Int16) ((SfxUInt16Item*)pItem)->GetValue() );
+        }
+        if ( rSet.GetItemState( SID_PLUGIN_MODE, sal_False, &pItem ) == SFX_ITEM_SET )
+        {
+            pValue[nActProp].Name = OUString(sPluginMode);
+            pValue[nActProp++].Value <<= ( (sal_Int16) ((SfxUInt16Item*)pItem)->GetValue() );
+        }
+        if ( rSet.GetItemState( SID_DOC_READONLY, sal_False, &pItem ) == SFX_ITEM_SET )
+        {
+            pValue[nActProp].Name = OUString(sReadOnly);
+            pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() );
+        }
+        if ( rSet.GetItemState( SID_DDE_RECONNECT_ONLOAD, sal_False, &pItem ) == SFX_ITEM_SET )
+        {
+            pValue[nActProp].Name = OUString(sDdeReconnect);
+            pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() );
+        }
+        if ( rSet.GetItemState( SID_DOC_STARTPRESENTATION, sal_False, &pItem ) == SFX_ITEM_SET )
+        {
+            pValue[nActProp].Name = OUString(sStartPresentation);
+            pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() );
+        }
+        if ( rSet.GetItemState( SID_SELECTION, sal_False, &pItem ) == SFX_ITEM_SET )
+        {
+            pValue[nActProp].Name = OUString(sSelectionOnly);
+            pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() );
+        }
+        if ( rSet.GetItemState( SID_HIDDEN, sal_False, &pItem ) == SFX_ITEM_SET )
+        {
+            pValue[nActProp].Name = OUString(sHidden);
+            pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() );
+        }
+        if ( rSet.GetItemState( SID_MINIMIZED, sal_False, &pItem ) == SFX_ITEM_SET )
+        {
+            pValue[nActProp].Name = OUString(sMinimized);
+            pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() );
+        }
+        if ( rSet.GetItemState( SID_SILENT, sal_False, &pItem ) == SFX_ITEM_SET )
+        {
+            pValue[nActProp].Name = OUString(sSilent);
+            pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() );
+        }
+        if ( rSet.GetItemState( SID_PREVIEW, sal_False, &pItem ) == SFX_ITEM_SET )
+        {
+            pValue[nActProp].Name = OUString(sPreview);
+            pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() );
+        }
+        if ( rSet.GetItemState( SID_VIEWONLY, sal_False, &pItem ) == SFX_ITEM_SET )
+        {
+            pValue[nActProp].Name = OUString(sViewOnly);
+            pValue[nActProp++].Value <<= (sal_Bool) (( ((SfxBoolItem*)pItem)->GetValue() ));
+        }
+        if ( rSet.GetItemState( SID_EDITDOC, sal_False, &pItem ) == SFX_ITEM_SET )
+        {
+            pValue[nActProp].Name = OUString(sDontEdit);
+            pValue[nActProp++].Value <<= (sal_Bool) (!( ((SfxBoolItem*)pItem)->GetValue() ));
+        }
+        if ( rSet.GetItemState( SID_FILE_DIALOG, sal_False, &pItem ) == SFX_ITEM_SET )
+        {
+            pValue[nActProp].Name = OUString(sUseSystemDialog);
+            pValue[nActProp++].Value <<= (sal_Bool) ( ((SfxBoolItem*)pItem)->GetValue() );
+        }
+        if ( rSet.GetItemState( SID_STANDARD_DIR, sal_False, &pItem ) == SFX_ITEM_SET )
+        {
+            pValue[nActProp].Name = OUString(sStandardDir);
+            pValue[nActProp++].Value <<= (  OUString(((SfxStringItem*)pItem)->GetValue()) );
+        }
+        if ( rSet.GetItemState( SID_BLACK_LIST, sal_False, &pItem ) == SFX_ITEM_SET )
+        {
+            pValue[nActProp].Name = OUString(sBlackList);
 
-                com::sun::star::uno::Sequence< OUString > aList;
-                ((SfxStringListItem*)pItem)->GetStringList( aList );
-                pValue[nActProp++].Value <<= aList ;
-            }
-            if ( rSet.GetItemState( SID_TARGETNAME, sal_False, &pItem ) == SFX_ITEM_SET )
-            {
-                pValue[nActProp].Name = OUString(sFrameName);
-                pValue[nActProp++].Value <<= (  OUString(((SfxStringItem*)pItem)->GetValue()) );
-            }
-            if ( rSet.GetItemState( SID_DOC_SALVAGE, sal_False, &pItem ) == SFX_ITEM_SET )
-            {
-                pValue[nActProp].Name = OUString(sSalvagedFile);
-                pValue[nActProp++].Value <<= (  OUString(((SfxStringItem*)pItem)->GetValue()) );
-            }
-            if ( rSet.GetItemState( SID_PATH, sal_False, &pItem ) == SFX_ITEM_SET )
-            {
-                pValue[nActProp].Name = OUString(sFolderName);
-                pValue[nActProp++].Value <<= (  OUString(((SfxStringItem*)pItem)->GetValue()) );
-            }
-            if ( rSet.GetItemState( SID_CONTENTTYPE, sal_False, &pItem ) == SFX_ITEM_SET )
-            {
-                pValue[nActProp].Name = OUString(sMediaType);
-                pValue[nActProp++].Value <<= (  OUString(((SfxStringItem*)pItem)->GetValue())  );
-            }
-            if ( rSet.GetItemState( SID_TEMPLATE_NAME, sal_False, &pItem ) == SFX_ITEM_SET )
-            {
-                pValue[nActProp].Name = OUString(sTemplateName);
-                pValue[nActProp++].Value <<= (  OUString(((SfxStringItem*)pItem)->GetValue())  );
-            }
-            if ( rSet.GetItemState( SID_TEMPLATE_REGIONNAME, sal_False, &pItem ) == SFX_ITEM_SET )
-            {
-                pValue[nActProp].Name = OUString(sTemplateRegionName);
-                pValue[nActProp++].Value <<= (  OUString(((SfxStringItem*)pItem)->GetValue())  );
-            }
-            if ( rSet.GetItemState( SID_JUMPMARK, sal_False, &pItem ) == SFX_ITEM_SET )
-            {
-                pValue[nActProp].Name = OUString(sJumpMark);
-                pValue[nActProp++].Value <<= (  OUString(((SfxStringItem*)pItem)->GetValue())  );
-            }
+            com::sun::star::uno::Sequence< OUString > aList;
+            ((SfxStringListItem*)pItem)->GetStringList( aList );
+            pValue[nActProp++].Value <<= aList ;
+        }
+        if ( rSet.GetItemState( SID_TARGETNAME, sal_False, &pItem ) == SFX_ITEM_SET )
+        {
+            pValue[nActProp].Name = OUString(sFrameName);
+            pValue[nActProp++].Value <<= (  OUString(((SfxStringItem*)pItem)->GetValue()) );
+        }
+        if ( rSet.GetItemState( SID_DOC_SALVAGE, sal_False, &pItem ) == SFX_ITEM_SET )
+        {
+            pValue[nActProp].Name = OUString(sSalvagedFile);
+            pValue[nActProp++].Value <<= (  OUString(((SfxStringItem*)pItem)->GetValue()) );
+        }
+        if ( rSet.GetItemState( SID_PATH, sal_False, &pItem ) == SFX_ITEM_SET )
+        {
+            pValue[nActProp].Name = OUString(sFolderName);
+            pValue[nActProp++].Value <<= (  OUString(((SfxStringItem*)pItem)->GetValue()) );
+        }
+        if ( rSet.GetItemState( SID_CONTENTTYPE, sal_False, &pItem ) == SFX_ITEM_SET )
+        {
+            pValue[nActProp].Name = OUString(sMediaType);
+            pValue[nActProp++].Value <<= (  OUString(((SfxStringItem*)pItem)->GetValue())  );
+        }
+        if ( rSet.GetItemState( SID_TEMPLATE_NAME, sal_False, &pItem ) == SFX_ITEM_SET )
+        {
+            pValue[nActProp].Name = OUString(sTemplateName);
+            pValue[nActProp++].Value <<= (  OUString(((SfxStringItem*)pItem)->GetValue())  );
+        }
+        if ( rSet.GetItemState( SID_TEMPLATE_REGIONNAME, sal_False, &pItem ) == SFX_ITEM_SET )
+        {
+            pValue[nActProp].Name = OUString(sTemplateRegionName);
+            pValue[nActProp++].Value <<= (  OUString(((SfxStringItem*)pItem)->GetValue())  );
+        }
+        if ( rSet.GetItemState( SID_JUMPMARK, sal_False, &pItem ) == SFX_ITEM_SET )
+        {
+            pValue[nActProp].Name = OUString(sJumpMark);
+            pValue[nActProp++].Value <<= (  OUString(((SfxStringItem*)pItem)->GetValue())  );
+        }
 
-            if ( rSet.GetItemState( SID_CHARSET, sal_False, &pItem ) == SFX_ITEM_SET )
-            {
-                pValue[nActProp].Name = OUString(sCharacterSet);
-                pValue[nActProp++].Value <<= (  OUString(((SfxStringItem*)pItem)->GetValue())  );
-            }
-            if ( rSet.GetItemState( SID_MACROEXECMODE, sal_False, &pItem ) == SFX_ITEM_SET )
-            {
-                pValue[nActProp].Name = OUString(sMacroExecMode);
-                pValue[nActProp++].Value <<= ( (sal_Int16) ((SfxUInt16Item*)pItem)->GetValue() );
-            }
-            if ( rSet.GetItemState( SID_UPDATEDOCMODE, sal_False, &pItem ) == SFX_ITEM_SET )
-            {
-                pValue[nActProp].Name = OUString(sUpdateDocMode);
-                pValue[nActProp++].Value <<= ( (sal_Int16) ((SfxUInt16Item*)pItem)->GetValue() );
-            }
-            if ( rSet.GetItemState( SID_REPAIRPACKAGE, sal_False, &pItem ) == SFX_ITEM_SET )
-            {
-                pValue[nActProp].Name = OUString(sRepairPackage);
-                pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() );
-            }
-            if ( rSet.GetItemState( SID_DOCINFO_TITLE, sal_False, &pItem ) == SFX_ITEM_SET )
-            {
-                pValue[nActProp].Name = OUString(sDocumentTitle);
-                pValue[nActProp++].Value <<= ( OUString(((SfxStringItem*)pItem)->GetValue()) );
-            }
-            if ( rSet.GetItemState( SID_DOC_BASEURL, sal_False, &pItem ) == SFX_ITEM_SET )
-            {
-                pValue[nActProp].Name = OUString(sDocumentBaseURL);
-                pValue[nActProp++].Value <<= ( OUString(((SfxStringItem*)pItem)->GetValue()) );
-            }
-            if ( rSet.GetItemState( SID_DOC_HIERARCHICALNAME, sal_False, &pItem ) == SFX_ITEM_SET )
-            {
-                pValue[nActProp].Name = OUString(sHierarchicalDocumentName);
-                pValue[nActProp++].Value <<= ( OUString(((SfxStringItem*)pItem)->GetValue()) );
-            }
-            if ( rSet.GetItemState( SID_COPY_STREAM_IF_POSSIBLE, sal_False, &pItem ) == SFX_ITEM_SET )
-            {
-                pValue[nActProp].Name = OUString(sCopyStreamIfPossible);
-                pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() );
-            }
-            if ( rSet.GetItemState( SID_NOAUTOSAVE, sal_False, &pItem ) == SFX_ITEM_SET )
-            {
-                pValue[nActProp].Name = OUString(sNoAutoSave);
-                pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() );
-            }
-            if ( rSet.GetItemState( SID_MODIFYPASSWORDINFO, sal_False, &pItem ) == SFX_ITEM_SET )
-            {
-                pValue[nActProp].Name = OUString(sModifyPasswordInfo);
-                pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() );
-            }
-            if ( rSet.GetItemState( SID_ENCRYPTIONDATA, sal_False, &pItem ) == SFX_ITEM_SET )
-            {
-                pValue[nActProp].Name = OUString(sEncryptionData);
-                pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() );
-            }
-            if ( rSet.GetItemState( SID_SUGGESTEDSAVEASDIR, sal_False, &pItem ) == SFX_ITEM_SET )
-            {
-                pValue[nActProp].Name = OUString(sSuggestedSaveAsDir);
-                pValue[nActProp++].Value <<= ( OUString(((SfxStringItem*)pItem)->GetValue()) );
-            }
-            if ( rSet.GetItemState( SID_SUGGESTEDSAVEASNAME, sal_False, &pItem ) == SFX_ITEM_SET )
-            {
-                pValue[nActProp].Name = OUString(sSuggestedSaveAsName);
-                pValue[nActProp++].Value <<= ( OUString(((SfxStringItem*)pItem)->GetValue()) );
-            }
-            if ( rSet.GetItemState( SID_DOC_SERVICE, sal_False, &pItem ) == SFX_ITEM_SET )
-            {
-                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());
-            }
+        if ( rSet.GetItemState( SID_CHARSET, sal_False, &pItem ) == SFX_ITEM_SET )
+        {
+            pValue[nActProp].Name = OUString(sCharacterSet);
+            pValue[nActProp++].Value <<= (  OUString(((SfxStringItem*)pItem)->GetValue())  );
+        }
+        if ( rSet.GetItemState( SID_MACROEXECMODE, sal_False, &pItem ) == SFX_ITEM_SET )
+        {
+            pValue[nActProp].Name = OUString(sMacroExecMode);
+            pValue[nActProp++].Value <<= ( (sal_Int16) ((SfxUInt16Item*)pItem)->GetValue() );
+        }
+        if ( rSet.GetItemState( SID_UPDATEDOCMODE, sal_False, &pItem ) == SFX_ITEM_SET )
+        {
+            pValue[nActProp].Name = OUString(sUpdateDocMode);
+            pValue[nActProp++].Value <<= ( (sal_Int16) ((SfxUInt16Item*)pItem)->GetValue() );
+        }
+        if ( rSet.GetItemState( SID_REPAIRPACKAGE, sal_False, &pItem ) == SFX_ITEM_SET )
+        {
+            pValue[nActProp].Name = OUString(sRepairPackage);
+            pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() );
+        }
+        if ( rSet.GetItemState( SID_DOCINFO_TITLE, sal_False, &pItem ) == SFX_ITEM_SET )
+        {
+            pValue[nActProp].Name = OUString(sDocumentTitle);
+            pValue[nActProp++].Value <<= ( OUString(((SfxStringItem*)pItem)->GetValue()) );
+        }
+        if ( rSet.GetItemState( SID_DOC_BASEURL, sal_False, &pItem ) == SFX_ITEM_SET )
+        {
+            pValue[nActProp].Name = OUString(sDocumentBaseURL);
+            pValue[nActProp++].Value <<= ( OUString(((SfxStringItem*)pItem)->GetValue()) );
+        }
+        if ( rSet.GetItemState( SID_DOC_HIERARCHICALNAME, sal_False, &pItem ) == SFX_ITEM_SET )
+        {
+            pValue[nActProp].Name = OUString(sHierarchicalDocumentName);
+            pValue[nActProp++].Value <<= ( OUString(((SfxStringItem*)pItem)->GetValue()) );
+        }
+        if ( rSet.GetItemState( SID_COPY_STREAM_IF_POSSIBLE, sal_False, &pItem ) == SFX_ITEM_SET )
+        {
+            pValue[nActProp].Name = OUString(sCopyStreamIfPossible);
+            pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() );
+        }
+        if ( rSet.GetItemState( SID_NOAUTOSAVE, sal_False, &pItem ) == SFX_ITEM_SET )
+        {
+            pValue[nActProp].Name = OUString(sNoAutoSave);
+            pValue[nActProp++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() );
+        }
+        if ( rSet.GetItemState( SID_MODIFYPASSWORDINFO, sal_False, &pItem ) == SFX_ITEM_SET )
+        {
+            pValue[nActProp].Name = OUString(sModifyPasswordInfo);
+            pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() );
+        }
+        if ( rSet.GetItemState( SID_ENCRYPTIONDATA, sal_False, &pItem ) == SFX_ITEM_SET )
+        {
+            pValue[nActProp].Name = OUString(sEncryptionData);
+            pValue[nActProp++].Value = ( ((SfxUnoAnyItem*)pItem)->GetValue() );
+        }
+        if ( rSet.GetItemState( SID_SUGGESTEDSAVEASDIR, sal_False, &pItem ) == SFX_ITEM_SET )
+        {
+            pValue[nActProp].Name = OUString(sSuggestedSaveAsDir);
+            pValue[nActProp++].Value <<= ( OUString(((SfxStringItem*)pItem)->GetValue()) );
+        }
+        if ( rSet.GetItemState( SID_SUGGESTEDSAVEASNAME, sal_False, &pItem ) == SFX_ITEM_SET )
+        {
+            pValue[nActProp].Name = OUString(sSuggestedSaveAsName);
+            pValue[nActProp++].Value <<= ( OUString(((SfxStringItem*)pItem)->GetValue()) );
+        }
+        if ( rSet.GetItemState( SID_DOC_SERVICE, sal_False, &pItem ) == SFX_ITEM_SET )
+        {
+            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());
         }
     }
 
commit 7a41848fab13e2c487515e02a16fd7548512dcd9
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Tue Apr 9 10:31:51 2013 -0400

    Store filter provider property with SfxMedium.
    
    Change-Id: I4ee6eed94cdfd8a8a514a79a33a1ccb4ff586ce5

diff --git a/sfx2/inc/sfx2/sfxsids.hrc b/sfx2/inc/sfx2/sfxsids.hrc
index 12198b6..7130f06 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 340bd94..4c07dae 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());
+            }
         }
     }
 
commit 8b13be7436c522b039fa66732cc9caa3cd9cf225
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Tue Apr 9 09:38:12 2013 -0400

    Use scoped_ptr for this for better exception safety.
    
    Change-Id: I7f14972e562845eb260b3d567c3fbabda2524d41

diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx
index 5f39baa..340bd94 100644
--- a/sfx2/source/appl/appuno.cxx
+++ b/sfx2/source/appl/appuno.cxx
@@ -110,6 +110,8 @@
 #include <com/sun/star/task/XStatusIndicatorFactory.hpp>
 #include <com/sun/star/ucb/XContent.hpp>
 
+#include <boost/scoped_ptr.hpp>
+
 #define PROTOCOLHANDLER_SERVICENAME     "com.sun.star.frame.ProtocolHandler"
 
 using namespace ::com::sun::star;
@@ -232,7 +234,8 @@ void TransformParameters( sal_uInt16 nSlotId, const uno::Sequence<beans::Propert
     {
         // slot is a property
         const SfxType* pType = pSlot->GetType();
-        SfxPoolItem* pItem = pType->CreateItem();
+        boost::scoped_ptr<SfxPoolItem> pItem(pType->CreateItem());
+
         if ( !pItem )
         {
 #ifdef DBG_UTIL
@@ -338,8 +341,6 @@ void TransformParameters( sal_uInt16 nSlotId, const uno::Sequence<beans::Propert
                 rSet.Put( *pItem );
         }
 
-        delete pItem;
-
         return;
     }
 
@@ -355,7 +356,7 @@ void TransformParameters( sal_uInt16 nSlotId, const uno::Sequence<beans::Propert
     for ( sal_uInt16 nArgs=0; nArgs<nMaxArgs; nArgs++ )
     {
         const SfxFormalArgument &rArg = bIsMediaDescriptor ? aFormalArgs[nArgs] : pSlot->GetFormalArgument( nArgs );
-        SfxPoolItem* pItem = rArg.CreateItem();
+        boost::scoped_ptr<SfxPoolItem> pItem(rArg.CreateItem());
         if ( !pItem )
         {
 #ifdef DBG_UTIL
@@ -472,8 +473,6 @@ void TransformParameters( sal_uInt16 nSlotId, const uno::Sequence<beans::Propert
 
             }
         }
-
-        delete pItem;
     }
 
     // special additional parameters for some slots not seen in the slot definitions
commit 5ed6ba97352bacbf0e423302c52debccbf80114a
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Tue Apr 9 09:35:24 2013 -0400

    Sort the header includes and get it to build.
    
    Change-Id: Iaef855c4829f5b6fc6a0016fd2697c761ed1ea9a

diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx
index 096d578..5f39baa 100644
--- a/sfx2/source/appl/appuno.cxx
+++ b/sfx2/source/appl/appuno.cxx
@@ -20,70 +20,97 @@
 #ifdef _MSC_VER
 #pragma warning( disable : 4290 )
 #endif
-#include <com/sun/star/document/UpdateDocMode.hpp>
 
-#include "sal/config.h"
+#include "sfx2/appuno.hxx"
 
-#include <sfx2/appuno.hxx>
+#include "SfxDocumentMetaData.hxx"
 #include "appbaslib.hxx"
-
+#include "doctemplates.hxx"
+#include "eventsupplier.hxx"
+#include "fltoptint.hxx"
+#include "frmload.hxx"
+#include "iframe.hxx"
+#include "objshimp.hxx"
+#include "plugin.hxx"
+#include "sfx2/app.hxx"
+#include "sfx2/brokenpackageint.hxx"
+#include "sfx2/dispatch.hxx"
 #include "sfx2/dllapi.h"
+#include "sfx2/docfile.hxx"
+#include "sfx2/fcontnr.hxx"
+#include "sfx2/frame.hxx"
+#include "sfx2/module.hxx"
+#include "sfx2/msg.hxx"
+#include "sfx2/msgpool.hxx"
+#include "sfx2/objsh.hxx"
+#include "sfx2/request.hxx"
+#include "sfx2/sfxbasecontroller.hxx"
+#include "sfx2/sfxsids.hrc"
+#include "sfx2/sfxuno.hxx"
+#include "sfx2/unoctitm.hxx"
+#include "sfxslots.hxx"
+#include "sfxtypes.hxx"
+#include "shutdownicon.hxx"
+#include "xpackcreator.hxx"
 
+#include "sal/config.h"
+#include <basic/basmgr.hxx>
+#include <basic/sberrors.hxx>
+#include <basic/sbmeth.hxx>
+#include <basic/sbuno.hxx>
 #include <basic/sbx.hxx>
+#include <basic/sbxcore.hxx>
+#include <basic/sbxmeth.hxx>
+#include <basic/sbxobj.hxx>
+#include <comphelper/interaction.hxx>
+#include <comphelper/processfactory.hxx>
+#include <comphelper/sequence.hxx>
+#include <framework/documentundoguard.hxx>
+#include <osl/mutex.hxx>
+#include <ownsubfilterservice.hxx>
+#include <rtl/ustrbuf.hxx>
+#include <svl/eitem.hxx>
+#include <svl/intitem.hxx>
 #include <svl/itempool.hxx>
+#include <svl/lckbitem.hxx>
+#include <svl/ownlist.hxx>
 #include <svl/rectitem.hxx>
+#include <svl/slstitm.hxx>
+#include <svl/stritem.hxx>
+#include <tools/config.hxx>
 #include <tools/debug.hxx>
-
 #include <tools/urlobj.hxx>
-#include <tools/config.hxx>
-#include <basic/sbxmeth.hxx>
-#include <basic/sbmeth.hxx>
-#include <basic/sbxobj.hxx>
-#include <basic/sberrors.hxx>
-#include <basic/basmgr.hxx>
-#include <basic/sbuno.hxx>
 
-#include <basic/sbxcore.hxx>
-#include <svl/ownlist.hxx>
-#include <svl/lckbitem.hxx>
-#include <svl/stritem.hxx>
-#include <svl/slstitm.hxx>
-#include <svl/intitem.hxx>
-#include <svl/eitem.hxx>
-#include <com/sun/star/task/XStatusIndicatorFactory.hpp>
-#include <com/sun/star/task/XInteractionHandler.hpp>
-#include <com/sun/star/io/XInputStream.hpp>
+#include <com/sun/star/awt/PosSize.hpp>
+#include <com/sun/star/awt/XButton.hpp>
+#include <com/sun/star/awt/XTopWindow.hpp>
+#include <com/sun/star/awt/XWindow.hpp>
 #include <com/sun/star/beans/XPropertySet.hpp>
-#include <com/sun/star/frame/XFrameActionListener.hpp>
-#include <com/sun/star/frame/XComponentLoader.hpp>
-#include <com/sun/star/frame/XFrame.hpp>
-#include <com/sun/star/frame/FrameActionEvent.hpp>
-#include <com/sun/star/frame/FrameAction.hpp>
+#include <com/sun/star/container/ContainerEvent.hpp>
 #include <com/sun/star/container/XContainer.hpp>
-#include <com/sun/star/container/XIndexContainer.hpp>
-#include <com/sun/star/container/XNameReplace.hpp>
 #include <com/sun/star/container/XContainerListener.hpp>
-#include <com/sun/star/container/XSet.hpp>
-#include <com/sun/star/container/ContainerEvent.hpp>
+#include <com/sun/star/container/XIndexContainer.hpp>
 #include <com/sun/star/container/XIndexReplace.hpp>
 #include <com/sun/star/container/XNameContainer.hpp>
-#include <com/sun/star/awt/XTopWindow.hpp>
-#include <com/sun/star/awt/XWindow.hpp>
-#include <com/sun/star/awt/PosSize.hpp>
-#include <com/sun/star/registry/RegistryValueType.hpp>
-#include <comphelper/processfactory.hxx>
-#include <com/sun/star/awt/XButton.hpp>
+#include <com/sun/star/container/XNameReplace.hpp>
+#include <com/sun/star/container/XSet.hpp>
+#include <com/sun/star/document/MacroExecMode.hpp>
+#include <com/sun/star/document/UpdateDocMode.hpp>
 #include <com/sun/star/frame/DispatchResultEvent.hpp>
 #include <com/sun/star/frame/DispatchResultState.hpp>
+#include <com/sun/star/frame/FrameAction.hpp>
+#include <com/sun/star/frame/FrameActionEvent.hpp>
+#include <com/sun/star/frame/XComponentLoader.hpp>
+#include <com/sun/star/frame/XFrame.hpp>
+#include <com/sun/star/frame/XFrameActionListener.hpp>
 #include <com/sun/star/frame/XModel.hpp>
-#include <com/sun/star/document/MacroExecMode.hpp>
+#include <com/sun/star/io/XInputStream.hpp>
+#include <com/sun/star/registry/RegistryValueType.hpp>
+#include <com/sun/star/task/XInteractionHandler.hpp>
+#include <com/sun/star/task/XStatusIndicatorFactory.hpp>
 #include <com/sun/star/ucb/XContent.hpp>
 
-#include <osl/mutex.hxx>
-#include <comphelper/sequence.hxx>
-#include <framework/documentundoguard.hxx>
-#include <rtl/ustrbuf.hxx>
-#include <comphelper/interaction.hxx>
+#define PROTOCOLHANDLER_SERVICENAME     "com.sun.star.frame.ProtocolHandler"
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::ucb;
@@ -93,38 +120,6 @@ using namespace ::com::sun::star::frame;
 using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::io;
 
-#include "sfxtypes.hxx"
-#include <sfx2/sfxuno.hxx>
-#include <sfx2/app.hxx>
-#include <sfx2/sfxsids.hrc>
-#include <sfx2/msg.hxx>
-#include <sfx2/msgpool.hxx>
-#include <sfx2/request.hxx>
-#include <sfx2/module.hxx>
-#include <sfx2/fcontnr.hxx>
-#include "frmload.hxx"
-#include <sfx2/frame.hxx>
-#include <sfx2/objsh.hxx>
-#include <sfx2/unoctitm.hxx>
-#include <sfx2/dispatch.hxx>
-#include "doctemplates.hxx"
-#include "shutdownicon.hxx"
-#include "objshimp.hxx"
-#include "fltoptint.hxx"
-#include <sfx2/docfile.hxx>
-#include <sfx2/sfxbasecontroller.hxx>
-#include <sfx2/brokenpackageint.hxx>
-#include "eventsupplier.hxx"
-#include "xpackcreator.hxx"
-#include "plugin.hxx"
-#include "iframe.hxx"
-#include <ownsubfilterservice.hxx>
-#include "SfxDocumentMetaData.hxx"
-
-#define PROTOCOLHANDLER_SERVICENAME     "com.sun.star.frame.ProtocolHandler"
-
-#include <sfxslots.hxx>
-
 // needs to be converted to a better data structure
 SfxFormalArgument aFormalArgs[] = {
     SFX_ARGUMENT(SID_DEFAULTFILENAME,"SuggestedSaveAsName",SfxStringItem),
diff --git a/sfx2/source/inc/eventsupplier.hxx b/sfx2/source/inc/eventsupplier.hxx
index 8420918..56d4774 100644
--- a/sfx2/source/inc/eventsupplier.hxx
+++ b/sfx2/source/inc/eventsupplier.hxx
@@ -63,8 +63,6 @@ class SfxEvents_Impl : public ::cppu::WeakImplHelper2< css::container::XNameRepl
     ::osl::Mutex                    maMutex;
     SfxObjectShell                 *mpObjShell;
 
-    sal_Bool                    Warn_Impl( const String& );
-
 public:
                                 SfxEvents_Impl( SfxObjectShell* pShell,
                                                 css::uno::Reference< css::document::XEventBroadcaster > xBroadcaster );
commit a4e58db80750d88e41db7e83734f1f2327eb83ed
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Tue Apr 9 09:28:37 2013 -0400

    The 'else if (nCount)' check is not necessary; remove it for less indentation.
    
    We check for nCount != 0 earlier.
    
    Change-Id: Ibdb099fc651210263b8f23182796a8d56a531591

diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx
index 02e80b7..096d578 100644
--- a/sfx2/source/appl/appuno.cxx
+++ b/sfx2/source/appl/appuno.cxx
@@ -344,615 +344,617 @@ void TransformParameters( sal_uInt16 nSlotId, const uno::Sequence<beans::Propert
         }
 
         delete pItem;
+
+        return;
     }
-    else if ( nCount )
-    {
+
+    OSL_ASSERT(nCount > 0);
+
 #ifdef DBG_UTIL
-        // detect parameters that don't match to any formal argument or one of its members
-        sal_Int32 nFoundArgs = 0;
+    // detect parameters that don't match to any formal argument or one of its members
+    sal_Int32 nFoundArgs = 0;
 #endif
-        // slot is a method
-        bool bIsMediaDescriptor = isMediaDescriptor( nSlotId );
-        sal_uInt16 nMaxArgs = bIsMediaDescriptor ? nMediaArgsCount : pSlot->nArgDefCount;
-        for ( sal_uInt16 nArgs=0; nArgs<nMaxArgs; nArgs++ )
+    // slot is a method
+    bool bIsMediaDescriptor = isMediaDescriptor( nSlotId );
+    sal_uInt16 nMaxArgs = bIsMediaDescriptor ? nMediaArgsCount : pSlot->nArgDefCount;
+    for ( sal_uInt16 nArgs=0; nArgs<nMaxArgs; nArgs++ )
+    {
+        const SfxFormalArgument &rArg = bIsMediaDescriptor ? aFormalArgs[nArgs] : pSlot->GetFormalArgument( nArgs );
+        SfxPoolItem* pItem = rArg.CreateItem();
+        if ( !pItem )
         {
-            const SfxFormalArgument &rArg = bIsMediaDescriptor ? aFormalArgs[nArgs] : pSlot->GetFormalArgument( nArgs );
-            SfxPoolItem* pItem = rArg.CreateItem();
-            if ( !pItem )
-            {
 #ifdef DBG_UTIL
-                OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM("No creator method for argument: "));
-                aStr.append(rArg.pName);
-                OSL_FAIL( aStr.getStr() );
+            OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM("No creator method for argument: "));
+            aStr.append(rArg.pName);
+            OSL_FAIL( aStr.getStr() );
 #endif
-                return;
-            }
+            return;
+        }
 
-            sal_uInt16 nWhich = rSet.GetPool()->GetWhich(rArg.nSlotId);
-            sal_Bool bConvertTwips = ( rSet.GetPool()->GetMetric( nWhich ) == SFX_MAPUNIT_TWIP );
-            pItem->SetWhich( nWhich );
-            const SfxType* pType = rArg.pType;
-            sal_uInt16 nSubCount = pType->nAttribs;
-            if ( nSubCount == 0 )
+        sal_uInt16 nWhich = rSet.GetPool()->GetWhich(rArg.nSlotId);
+        sal_Bool bConvertTwips = ( rSet.GetPool()->GetMetric( nWhich ) == SFX_MAPUNIT_TWIP );
+        pItem->SetWhich( nWhich );
+        const SfxType* pType = rArg.pType;
+        sal_uInt16 nSubCount = pType->nAttribs;
+        if ( nSubCount == 0 )
+        {
+            // "simple" (base type) argument
+            for ( sal_uInt16 n=0; n<nCount; n++ )
             {
-                // "simple" (base type) argument
-                for ( sal_uInt16 n=0; n<nCount; n++ )
+                const beans::PropertyValue& rProp = pPropsVal[n];
+                String aName = rProp.Name;
+                if ( aName.CompareToAscii(rArg.pName) == COMPARE_EQUAL )
                 {
-                    const beans::PropertyValue& rProp = pPropsVal[n];
-                    String aName = rProp.Name;
-                    if ( aName.CompareToAscii(rArg.pName) == COMPARE_EQUAL )
-                    {
 #ifdef DBG_UTIL
-                        ++nFoundArgs;
+                    ++nFoundArgs;
 #endif
-                        if( pItem->PutValue( rProp.Value ) )
-                            // only use successfully converted items
-                            rSet.Put( *pItem );
+                    if( pItem->PutValue( rProp.Value ) )
+                        // only use successfully converted items
+                        rSet.Put( *pItem );
 #ifdef DBG_UTIL
-                        else
-                        {
-                            OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM("Property not convertable: "));
-                            aStr.append(rArg.pName);
-                            OSL_FAIL( aStr.getStr() );
-                        }
-#endif
-                        break;
+                    else
+                    {
+                        OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM("Property not convertable: "));
+                        aStr.append(rArg.pName);
+                        OSL_FAIL( aStr.getStr() );
                     }
+#endif
+                    break;
                 }
             }
-            else
+        }
+        else
+        {
+            // complex argument, could be passed in one struct
+            sal_Bool bAsWholeItem = sal_False;
+            for ( sal_uInt16 n=0; n<nCount; n++ )
             {
-                // complex argument, could be passed in one struct
-                sal_Bool bAsWholeItem = sal_False;
-                for ( sal_uInt16 n=0; n<nCount; n++ )
+                const beans::PropertyValue& rProp = pPropsVal[n];
+                String aName = rProp.Name;
+                if ( aName.CompareToAscii(rArg.pName) == COMPARE_EQUAL )
                 {
-                    const beans::PropertyValue& rProp = pPropsVal[n];
-                    String aName = rProp.Name;
-                    if ( aName.CompareToAscii(rArg.pName) == COMPARE_EQUAL )
-                    {
-                        bAsWholeItem = sal_True;
+                    bAsWholeItem = sal_True;
 #ifdef DBG_UTIL
-                        ++nFoundArgs;
+                    ++nFoundArgs;
 #endif
-                        if( pItem->PutValue( rProp.Value ) )
-                            // only use successfully converted items
-                            rSet.Put( *pItem );
+                    if( pItem->PutValue( rProp.Value ) )
+                        // only use successfully converted items
+                        rSet.Put( *pItem );
 #ifdef DBG_UTIL
-                        else
-                        {
-                            OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM("Property not convertable: "));
-                            aStr.append(rArg.pName);
-                            OSL_FAIL( aStr.getStr() );
-                        }
-#endif
+                    else
+                    {
+                        OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM("Property not convertable: "));
+                        aStr.append(rArg.pName);
+                        OSL_FAIL( aStr.getStr() );
                     }
+#endif
                 }
+            }
 
-                if ( !bAsWholeItem )
+            if ( !bAsWholeItem )
+            {
+                // complex argument; collect sub items from argument array and reconstruct complex item
+                // only put item if at least one member was found and had the correct type
+                // (is this a good idea?! Should we ask for *all* members?)
+                sal_Bool bRet = sal_False;
+                for ( sal_uInt16 n=0; n<nCount; n++ )
                 {
-                    // complex argument; collect sub items from argument array and reconstruct complex item
-                    // only put item if at least one member was found and had the correct type
-                    // (is this a good idea?! Should we ask for *all* members?)
-                    sal_Bool bRet = sal_False;
-                    for ( sal_uInt16 n=0; n<nCount; n++ )
+                    const beans::PropertyValue& rProp = pPropsVal[n];
+                    for ( sal_uInt16 nSub=0; nSub<nSubCount; nSub++ )
                     {
-                        const beans::PropertyValue& rProp = pPropsVal[n];
-                        for ( sal_uInt16 nSub=0; nSub<nSubCount; nSub++ )
+                        // search sub item by name
+                        OStringBuffer aStr;
+                        aStr.append(rArg.pName).append('.').append(pType->aAttrib[nSub].pName);
+                        if ( rProp.Name.equalsAsciiL(aStr.getStr(), aStr.getLength()) )
                         {
-                            // search sub item by name
-                            OStringBuffer aStr;
-                            aStr.append(rArg.pName).append('.').append(pType->aAttrib[nSub].pName);
-                            if ( rProp.Name.equalsAsciiL(aStr.getStr(), aStr.getLength()) )
-                            {
-                                // at least one member found ...
-                                bRet = sal_True;
+                            // at least one member found ...
+                            bRet = sal_True;
 #ifdef DBG_UTIL
-                                ++nFoundArgs;
+                            ++nFoundArgs;
 #endif
-                                sal_uInt8 nSubId = (sal_uInt8) (sal_Int8) pType->aAttrib[nSub].nAID;
-                                if ( bConvertTwips )
-                                    nSubId |= CONVERT_TWIPS;
-                                if (!pItem->PutValue( rProp.Value, nSubId ) )
-                                {
-                                    // ... but it was not convertible
-                                    bRet = sal_False;
+                            sal_uInt8 nSubId = (sal_uInt8) (sal_Int8) pType->aAttrib[nSub].nAID;
+                            if ( bConvertTwips )
+                                nSubId |= CONVERT_TWIPS;
+                            if (!pItem->PutValue( rProp.Value, nSubId ) )
+                            {
+                                // ... but it was not convertible
+                                bRet = sal_False;
 #ifdef DBG_UTIL
-                                    OStringBuffer aDbgStr(RTL_CONSTASCII_STRINGPARAM("Property not convertable: "));
-                                    aDbgStr.append(rArg.pName);
-                                    OSL_FAIL( aDbgStr.getStr() );
+                                OStringBuffer aDbgStr(RTL_CONSTASCII_STRINGPARAM("Property not convertable: "));
+                                aDbgStr.append(rArg.pName);
+                                OSL_FAIL( aDbgStr.getStr() );
 #endif
-                                }
-
-                                break;
                             }
+
+                            break;
                         }
                     }
+                }
 
-                    if ( bRet )
-                        // only use successfully converted items
-                        rSet.Put( *pItem );
+                if ( bRet )
+                    // only use successfully converted items
+                    rSet.Put( *pItem );
 
-                }
             }
-
-            delete pItem;
         }
 
-        // special additional parameters for some slots not seen in the slot definitions
-        // Some of these slots are not considered to be used for macro recording, because they shouldn't be recorded as slots,
-        // but as dispatching or factory or arbitrary URLs to the frame
-        // Some also can use additional arguments that are not recordable (will be changed later,
-        // f.e. "SaveAs" shouldn't support parameters not in the slot definition!)
-        if ( nSlotId == SID_NEWWINDOW )
+        delete pItem;
+    }
+
+    // special additional parameters for some slots not seen in the slot definitions
+    // Some of these slots are not considered to be used for macro recording, because they shouldn't be recorded as slots,
+    // but as dispatching or factory or arbitrary URLs to the frame
+    // Some also can use additional arguments that are not recordable (will be changed later,
+    // f.e. "SaveAs" shouldn't support parameters not in the slot definition!)
+    if ( nSlotId == SID_NEWWINDOW )
+    {
+        for ( sal_uInt16 n=0; n<nCount; n++ )
         {
-            for ( sal_uInt16 n=0; n<nCount; n++ )
+            const beans::PropertyValue& rProp = pPropsVal[n];
+            OUString aName = rProp.Name;
+            if ( aName == sFrame )
             {
-                const beans::PropertyValue& rProp = pPropsVal[n];
-                OUString aName = rProp.Name;
-                if ( aName == sFrame )
-                {
-                    Reference< XFrame > xFrame;
-                    OSL_VERIFY( rProp.Value >>= xFrame );
-                    rSet.Put( SfxUnoFrameItem( SID_FILLFRAME, xFrame ) );
-                }
-                else
-                if ( aName == sHidden )
-                {
-                    sal_Bool bVal = sal_False;
-                    if (rProp.Value >>= bVal)
-                        rSet.Put( SfxBoolItem( SID_HIDDEN, bVal ) );
-                }
+                Reference< XFrame > xFrame;
+                OSL_VERIFY( rProp.Value >>= xFrame );
+                rSet.Put( SfxUnoFrameItem( SID_FILLFRAME, xFrame ) );
+            }
+            else
+            if ( aName == sHidden )
+            {
+                sal_Bool bVal = sal_False;
+                if (rProp.Value >>= bVal)
+                    rSet.Put( SfxBoolItem( SID_HIDDEN, bVal ) );
             }
         }
-        else if ( bIsMediaDescriptor )
+    }
+    else if ( bIsMediaDescriptor )
+    {
+        for ( sal_uInt16 n=0; n<nCount; n++ )
         {
-            for ( sal_uInt16 n=0; n<nCount; n++ )
-            {
 #ifdef DBG_UTIL
-                ++nFoundArgs;
+            ++nFoundArgs;
 #endif
-                const beans::PropertyValue& rProp = pPropsVal[n];
-                OUString aName = rProp.Name;
-                if ( aName == sModel )
-                    rSet.Put( SfxUnoAnyItem( SID_DOCUMENT, rProp.Value ) );
-                else if ( aName == sComponentData )
-                {
-                    rSet.Put( SfxUnoAnyItem( SID_COMPONENTDATA, rProp.Value ) );
-                }
-                else if ( aName == sComponentContext )
-                {
-                    rSet.Put( SfxUnoAnyItem( SID_COMPONENTCONTEXT, rProp.Value ) );
-                }
-                else if ( aName == sStatusInd )
-                {
-                    Reference<task::XStatusIndicator> xVal;
-                    sal_Bool bOK = (rProp.Value >>= xVal);
-                    DBG_ASSERT( bOK, "invalid type for StatusIndicator" );
-                    if (bOK && xVal.is())
-                        rSet.Put( SfxUnoAnyItem( SID_PROGRESS_STATUSBAR_CONTROL, rProp.Value ) );
-                }
-                else if ( aName == sInteractionHdl )
-                {
-                    Reference<task::XInteractionHandler> xVal;
-                    sal_Bool bOK = (rProp.Value >>= xVal);
-                    DBG_ASSERT( bOK, "invalid type for InteractionHandler" );
-                    if (bOK && xVal.is())
-                        rSet.Put( SfxUnoAnyItem( SID_INTERACTIONHANDLER, rProp.Value ) );
-                }
-                else if ( aName == sViewData )
-                    rSet.Put( SfxUnoAnyItem( SID_VIEW_DATA, rProp.Value ) );
-                else if ( aName == sFilterData )
-                    rSet.Put( SfxUnoAnyItem( SID_FILTER_DATA, rProp.Value ) );
-                else if ( aName == sInputStream )
-                {
-                    Reference< XInputStream > xVal;
-                    sal_Bool bOK = ((rProp.Value >>= xVal) && xVal.is());
-                    DBG_ASSERT( bOK, "invalid type for InputStream" );
-                    if (bOK)
-                        rSet.Put( SfxUnoAnyItem( SID_INPUTSTREAM, rProp.Value ) );
-                }
-                else if ( aName == sStream )
-                {
-                    Reference< XInputStream > xVal;
-                    sal_Bool bOK = ((rProp.Value >>= xVal) && xVal.is());
-                    DBG_ASSERT( bOK, "invalid type for Stream" );
-                    if (bOK)

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list