diff options
author | Mikhail Voytenko <mav@openoffice.org> | 2010-12-01 11:22:11 +0100 |
---|---|---|
committer | Mikhail Voytenko <mav@openoffice.org> | 2010-12-01 11:22:11 +0100 |
commit | b8fde585bdd8bc2df622001352ae4f0e027a0813 (patch) | |
tree | a413dbdf74069823f05283492b15d85a60fe5d38 /sfx2 | |
parent | 134f045600ef3394fdde67bcdec079a44e005faf (diff) |
fwk160: #i74950# let imported links be readonly
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/inc/guisaveas.hxx | 6 | ||||
-rw-r--r-- | sfx2/inc/sfx2/docfilt.hxx | 37 | ||||
-rw-r--r-- | sfx2/source/doc/guisaveas.cxx | 46 | ||||
-rw-r--r-- | sfx2/source/doc/sfxbasemodel.cxx | 2 |
4 files changed, 5 insertions, 86 deletions
diff --git a/sfx2/inc/guisaveas.hxx b/sfx2/inc/guisaveas.hxx index a317b5796232..b10ed6c90819 100644 --- a/sfx2/inc/guisaveas.hxx +++ b/sfx2/inc/guisaveas.hxx @@ -79,12 +79,6 @@ public: ::rtl::OUString aUserSelectedName, sal_uInt16 nDocumentSignatureState = SIGNATURESTATE_NOSIGNATURES ); - static ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SearchForFilter( - const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerQuery >& xFilterQuery, - const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& aSearchRequest, - sal_Int32 nMustFlags, - sal_Int32 nDontFlags ); - static sal_Bool CheckFilterOptionsAppearence( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& xFilterCFG, const ::rtl::OUString& aFilterName ); diff --git a/sfx2/inc/sfx2/docfilt.hxx b/sfx2/inc/sfx2/docfilt.hxx index f024fdb07c06..83bad4d1d01c 100644 --- a/sfx2/inc/sfx2/docfilt.hxx +++ b/sfx2/inc/sfx2/docfilt.hxx @@ -37,42 +37,7 @@ #include <com/sun/star/uno/RuntimeException.hpp> #include <tools/wldcrd.hxx> -// TODO/LATER: The flags should be part of the UNO specification -#define SFX_FILTER_IMPORT 0x00000001L -#define SFX_FILTER_EXPORT 0x00000002L -#define SFX_FILTER_TEMPLATE 0x00000004L -#define SFX_FILTER_INTERNAL 0x00000008L -#define SFX_FILTER_TEMPLATEPATH 0x00000010L -#define SFX_FILTER_OWN 0x00000020L -#define SFX_FILTER_ALIEN 0x00000040L -#define SFX_FILTER_USESOPTIONS 0x00000080L - -#define SFX_FILTER_DEFAULT 0x00000100L -#define SFX_FILTER_EXECUTABLE 0x00000200L -#define SFX_FILTER_SUPPORTSSELECTION 0x00000400L -#define SFX_FILTER_MAPTOAPPPLUG 0x00000800L -#define SFX_FILTER_NOTINFILEDLG 0x00001000L -#define SFX_FILTER_NOTINCHOOSER 0x00002000L -#define SFX_FILTER_ASYNC 0x00004000L -// Legt Objekt nur an, kein Laden -#define SFX_FILTER_CREATOR 0x00008000L -#define SFX_FILTER_OPENREADONLY 0x00010000L -#define SFX_FILTER_MUSTINSTALL 0x00020000L -#define SFX_FILTER_CONSULTSERVICE 0x00040000L - -#define SFX_FILTER_STARONEFILTER 0x00080000L -#define SFX_FILTER_PACKED 0x00100000L -#define SFX_FILTER_SILENTEXPORT 0x00200000L - -#define SFX_FILTER_BROWSERPREFERED 0x00400000L - -#define SFX_FILTER_ENCRYPTION 0x01000000L -#define SFX_FILTER_PASSWORDTOMODIFY 0x02000000L - -#define SFX_FILTER_PREFERED 0x10000000L - -#define SFX_FILTER_VERSION_NONE 0 -#define SFX_FILTER_NOTINSTALLED SFX_FILTER_MUSTINSTALL | SFX_FILTER_CONSULTSERVICE +#include <comphelper/documentconstants.hxx> #include <sfx2/sfxdefs.hxx> diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx index 3c4df7276d6b..ee786ff5c39c 100644 --- a/sfx2/source/doc/guisaveas.cxx +++ b/sfx2/source/doc/guisaveas.cxx @@ -71,6 +71,7 @@ #include <tools/urlobj.hxx> #include <comphelper/processfactory.hxx> #include <comphelper/configurationhelper.hxx> +#include <comphelper/mimeconfighelper.hxx> #include <vcl/msgbox.hxx> #include <vcl/window.hxx> #include <toolkit/awt/vclxwindow.hxx> @@ -507,7 +508,7 @@ uno::Sequence< beans::PropertyValue > ModelData_Impl::GetDocServiceAnyFilter( sa aSearchRequest[0].Name = ::rtl::OUString::createFromAscii( "DocumentService" ); aSearchRequest[0].Value <<= GetDocServiceName(); - return SfxStoringHelper::SearchForFilter( m_pOwner->GetFilterQuery(), aSearchRequest, nMust, nDont ); + return ::comphelper::MimeConfigurationHelper::SearchForFilter( m_pOwner->GetFilterQuery(), aSearchRequest, nMust, nDont ); } //------------------------------------------------------------------------- @@ -527,7 +528,7 @@ uno::Sequence< beans::PropertyValue > ModelData_Impl::GetPreselectedFilter_Impl( aSearchRequest[1].Name = ::rtl::OUString::createFromAscii( "DocumentService" ); aSearchRequest[1].Value <<= GetDocServiceName(); - aFilterProps = SfxStoringHelper::SearchForFilter( m_pOwner->GetFilterQuery(), aSearchRequest, nMust, nDont ); + aFilterProps = ::comphelper::MimeConfigurationHelper::SearchForFilter( m_pOwner->GetFilterQuery(), aSearchRequest, nMust, nDont ); } else { @@ -1650,47 +1651,6 @@ sal_Bool SfxStoringHelper::GUIStoreModel( const uno::Reference< frame::XModel >& //------------------------------------------------------------------------- // static -uno::Sequence< beans::PropertyValue > SfxStoringHelper::SearchForFilter( - const uno::Reference< container::XContainerQuery >& xFilterQuery, - const uno::Sequence< beans::NamedValue >& aSearchRequest, - sal_Int32 nMustFlags, - sal_Int32 nDontFlags ) -{ - uno::Sequence< beans::PropertyValue > aFilterProps; - uno::Reference< container::XEnumeration > xFilterEnum = - xFilterQuery->createSubSetEnumerationByProperties( aSearchRequest ); - - // the first default filter will be taken, - // if there is no filter with flag default the first acceptable filter will be taken - if ( xFilterEnum.is() ) - { - while ( xFilterEnum->hasMoreElements() ) - { - uno::Sequence< beans::PropertyValue > aProps; - if ( xFilterEnum->nextElement() >>= aProps ) - { - ::comphelper::SequenceAsHashMap aPropsHM( aProps ); - sal_Int32 nFlags = aPropsHM.getUnpackedValueOrDefault( ::rtl::OUString::createFromAscii( "Flags" ), - (sal_Int32)0 ); - if ( ( ( nFlags & nMustFlags ) == nMustFlags ) && !( nFlags & nDontFlags ) ) - { - if ( ( nFlags & SFX_FILTER_DEFAULT ) == SFX_FILTER_DEFAULT ) - { - aFilterProps = aProps; - break; - } - else if ( !aFilterProps.getLength() ) - aFilterProps = aProps; - } - } - } - } - - return aFilterProps; -} - -//------------------------------------------------------------------------- -// static sal_Bool SfxStoringHelper::CheckFilterOptionsAppearence( const uno::Reference< container::XNameAccess >& xFilterCFG, const ::rtl::OUString& aFilterName ) diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx index c85a483c64aa..e56cc0ece448 100644 --- a/sfx2/source/doc/sfxbasemodel.cxx +++ b/sfx2/source/doc/sfxbasemodel.cxx @@ -2393,7 +2393,7 @@ void SAL_CALL SfxBaseModel::removeDocumentEventListener( const uno::Reference< d } // --------------------------------- -void SAL_CALL SfxBaseModel::notifyDocumentEvent( const ::rtl::OUString& _EventName, const uno::Reference< frame::XController2 >& _ViewController, const uno::Any& _Supplement ) +void SAL_CALL SfxBaseModel::notifyDocumentEvent( const ::rtl::OUString&, const uno::Reference< frame::XController2 >&, const uno::Any& ) throw ( lang::IllegalArgumentException, lang::NoSupportException, uno::RuntimeException ) { throw lang::NoSupportException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "SfxBaseModel controlls all the sent notifications itself!" ) ), uno::Reference< uno::XInterface >() ); |