diff options
author | Tor Lillqvist <tml@collabora.com> | 2016-09-12 23:08:14 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2016-09-12 23:29:32 +0300 |
commit | 01755200f6c01afc5c5970141501aea084e8b770 (patch) | |
tree | 188839c69a1b40be80c1e4e841a270f4ffdcc24f | |
parent | Bin a few unused forward declarations (diff) | |
download | core-01755200f6c01afc5c5970141501aea084e8b770.tar.gz core-01755200f6c01afc5c5970141501aea084e8b770.zip |
Bin some noise comments and superfluous vertical whitespace
Change-Id: I3c19457bb29cd1392f14598fc8798aed4b1a1a7f
47 files changed, 57 insertions, 772 deletions
diff --git a/dtrans/source/cnttype/mcnttfactory.cxx b/dtrans/source/cnttype/mcnttfactory.cxx index 295d9d3aa4d0..7d289a6d3365 100644 --- a/dtrans/source/cnttype/mcnttfactory.cxx +++ b/dtrans/source/cnttype/mcnttfactory.cxx @@ -24,16 +24,12 @@ #define MIMECONTENTTYPEFACTORY_IMPL_NAME "com.sun.star.datatransfer.MimeCntTypeFactory" -// namespace directives - using namespace ::osl; using namespace ::cppu; using namespace com::sun::star::uno; using namespace com::sun::star::lang; using namespace com::sun::star::datatransfer; -// helper functions - namespace { Sequence< OUString > SAL_CALL MimeContentTypeFactory_getSupportedServiceNames( ) @@ -43,14 +39,10 @@ namespace } } -// ctor - CMimeContentTypeFactory::CMimeContentTypeFactory() { } -// createMimeContentType - Reference< XMimeContentType > CMimeContentTypeFactory::createMimeContentType( const OUString& aContentType ) throw( IllegalArgumentException, RuntimeException, std::exception ) { @@ -66,15 +58,12 @@ OUString SAL_CALL CMimeContentTypeFactory::getImplementationName( ) return OUString( MIMECONTENTTYPEFACTORY_IMPL_NAME ); } -// XServiceInfo sal_Bool SAL_CALL CMimeContentTypeFactory::supportsService( const OUString& ServiceName ) throw( RuntimeException, std::exception ) { return cppu::supportsService(this, ServiceName); } -// XServiceInfo - Sequence< OUString > SAL_CALL CMimeContentTypeFactory::getSupportedServiceNames( ) throw( RuntimeException, std::exception ) { diff --git a/dtrans/source/cnttype/mcnttype.cxx b/dtrans/source/cnttype/mcnttype.cxx index cf314eb666b0..180c0c48b1c7 100644 --- a/dtrans/source/cnttype/mcnttype.cxx +++ b/dtrans/source/cnttype/mcnttype.cxx @@ -19,23 +19,17 @@ #include "mcnttype.hxx" -// namespace directives - using namespace com::sun::star::uno; using namespace com::sun::star::lang; using namespace com::sun::star::container; using namespace std; using namespace osl; -// constants - const char TSPECIALS[] = "()<>@,;:\\\"/[]?="; const char TOKEN[] = "!#$%&'*+-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ^_`abcdefghijklmnopqrstuvwxyz{|}~."; const char SPACE[] = " "; const char SEMICOLON[] = ";"; -// ctor - CMimeContentType::CMimeContentType( const OUString& aCntType ) { init( aCntType ); diff --git a/dtrans/source/cnttype/mctfentry.cxx b/dtrans/source/cnttype/mctfentry.cxx index 81d71acdabe0..ee045e43339f 100644 --- a/dtrans/source/cnttype/mctfentry.cxx +++ b/dtrans/source/cnttype/mctfentry.cxx @@ -23,21 +23,14 @@ #include <com/sun/star/datatransfer/XMimeContentTypeFactory.hpp> #include "mcnttfactory.hxx" -// some defines - -// the implementation names #define MIMECONTENTTYPEFACTORY_IMPL_NAME "com.sun.star.datatransfer.MimeCntTypeFactory" -// namespace directives - -using namespace ::cppu ; -using namespace ::com::sun::star::uno ; -using namespace ::com::sun::star::registry ; +using namespace ::cppu; +using namespace ::com::sun::star::uno; +using namespace ::com::sun::star::registry; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::datatransfer; -// create a static object to initialize the shell9x library - namespace { diff --git a/dtrans/source/win32/clipb/WinClipbImpl.cxx b/dtrans/source/win32/clipb/WinClipbImpl.cxx index ed84c02008d1..f3daae02a5db 100644 --- a/dtrans/source/win32/clipb/WinClipbImpl.cxx +++ b/dtrans/source/win32/clipb/WinClipbImpl.cxx @@ -38,8 +38,6 @@ #pragma warning(pop) #endif -// namespace directives - using namespace osl; using namespace std; using namespace cppu; @@ -75,8 +73,6 @@ CWinClipbImpl::~CWinClipbImpl( ) unregisterClipboardViewer( ); } -// getContent - Reference< XTransferable > SAL_CALL CWinClipbImpl::getContents( ) throw( RuntimeException ) { // use the shortcut or create a transferable from @@ -111,8 +107,6 @@ Reference< XTransferable > SAL_CALL CWinClipbImpl::getContents( ) throw( Runtime return rClipContent; } -// setContent - void SAL_CALL CWinClipbImpl::setContents( const Reference< XTransferable >& xTransferable, const Reference< XClipboardOwner >& xClipboardOwner ) diff --git a/dtrans/source/win32/clipb/WinClipboard.cxx b/dtrans/source/win32/clipb/WinClipboard.cxx index 3deada710780..ef383e3fe42f 100644 --- a/dtrans/source/win32/clipb/WinClipboard.cxx +++ b/dtrans/source/win32/clipb/WinClipboard.cxx @@ -25,8 +25,6 @@ #include <cppuhelper/supportsservice.hxx> #include "WinClipbImpl.hxx" -// namespace directives - using namespace osl; using namespace std; using namespace cppu; @@ -38,8 +36,6 @@ using namespace com::sun::star::lang; #define WINCLIPBOARD_IMPL_NAME "com.sun.star.datatransfer.clipboard.ClipboardW32" -// helper functions - namespace { Sequence< OUString > SAL_CALL WinClipboard_getSupportedServiceNames() @@ -49,8 +45,6 @@ namespace } } -// ctor - /*XEventListener,*/ CWinClipboard::CWinClipboard( const Reference< XComponentContext >& rxContext, const OUString& aClipboardName ) : WeakComponentImplHelper< XSystemClipboard, XFlushableClipboard, XServiceInfo >( m_aCbListenerMutex ), @@ -61,7 +55,6 @@ CWinClipboard::CWinClipboard( const Reference< XComponentContext >& rxContext, c // XClipboard -// getContent // to avoid unnecessary traffic we check first if there is a clipboard // content which was set via setContent, in this case we don't need // to query the content from the clipboard, create a new wrapper object @@ -82,8 +75,6 @@ Reference< XTransferable > SAL_CALL CWinClipboard::getContents( ) throw( Runtime return Reference< XTransferable >( ); } -// setContent - void SAL_CALL CWinClipboard::setContents( const Reference< XTransferable >& xTransferable, const Reference< XClipboardOwner >& xClipboardOwner ) throw( RuntimeException ) @@ -98,8 +89,6 @@ void SAL_CALL CWinClipboard::setContents( const Reference< XTransferable >& xTra m_pImpl->setContents( xTransferable, xClipboardOwner ); } -// getName - OUString SAL_CALL CWinClipboard::getName( ) throw( RuntimeException ) { if ( rBHelper.bDisposed ) @@ -142,8 +131,6 @@ sal_Int8 SAL_CALL CWinClipboard::getRenderingCapabilities( ) throw( RuntimeExce // XClipboardNotifier -// getName - void SAL_CALL CWinClipboard::addClipboardListener( const Reference< XClipboardListener >& listener ) throw( RuntimeException ) { @@ -160,8 +147,6 @@ void SAL_CALL CWinClipboard::addClipboardListener( const Reference< XClipboardLi rBHelper.aLC.addInterface( cppu::UnoType<decltype(listener)>::get(), listener ); } -// getName - void SAL_CALL CWinClipboard::removeClipboardListener( const Reference< XClipboardListener >& listener ) throw( RuntimeException ) { @@ -178,8 +163,6 @@ void SAL_CALL CWinClipboard::removeClipboardListener( const Reference< XClipboar rBHelper.aLC.removeInterface( cppu::UnoType<decltype(listener)>::get(), listener ); } -// getName - void SAL_CALL CWinClipboard::notifyAllClipboardListener( ) { if ( !rBHelper.bDisposed ) @@ -247,15 +230,12 @@ OUString SAL_CALL CWinClipboard::getImplementationName( ) return OUString( WINCLIPBOARD_IMPL_NAME ); } -// XServiceInfo sal_Bool SAL_CALL CWinClipboard::supportsService( const OUString& ServiceName ) throw(RuntimeException) { return cppu::supportsService(this, ServiceName); } -// XServiceInfo - Sequence< OUString > SAL_CALL CWinClipboard::getSupportedServiceNames( ) throw(RuntimeException) { diff --git a/dtrans/source/win32/clipb/wcbentry.cxx b/dtrans/source/win32/clipb/wcbentry.cxx index ff4c14912cd3..c5c00ef99cf4 100644 --- a/dtrans/source/win32/clipb/wcbentry.cxx +++ b/dtrans/source/win32/clipb/wcbentry.cxx @@ -23,24 +23,16 @@ #include <osl/diagnose.h> #include "WinClipboard.hxx" -// some defines - -// the service names #define WINCLIPBOARD_SERVICE_NAME "com.sun.star.datatransfer.clipboard.SystemClipboard" -// the implementation names #define WINCLIPBOARD_IMPL_NAME "com.sun.star.datatransfer.clipboard.ClipboardW32" -// namespace directives - -using namespace ::com::sun::star::uno ; -using namespace ::com::sun::star::registry ; -using namespace ::cppu ; +using namespace ::com::sun::star::uno; +using namespace ::com::sun::star::registry; +using namespace ::cppu; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::datatransfer::clipboard; -// create a static object to initialize the shell9x library - namespace { diff --git a/dtrans/source/win32/dtobj/DOTransferable.cxx b/dtrans/source/win32/dtobj/DOTransferable.cxx index 74de0dcb0c93..0252ac74b4bf 100644 --- a/dtrans/source/win32/dtobj/DOTransferable.cxx +++ b/dtrans/source/win32/dtobj/DOTransferable.cxx @@ -32,8 +32,6 @@ #include <com/sun/star/datatransfer/MimeContentTypeFactory.hpp> #include <comphelper/processfactory.hxx> -// namespace directives - using namespace std; using namespace osl; using namespace cppu; @@ -160,7 +158,6 @@ sal_Bool SAL_CALL CDOTransferable::isDataFlavorSupported( const DataFlavor& aFla return sal_False; } -// helper function // the list of dataflavors currently on the clipboard will be initialized // only once; if the client of this Transferable will hold a reference // to it und the underlying clipboard content changes, the client does @@ -230,9 +227,6 @@ void SAL_CALL CDOTransferable::addSupportedFlavor( const DataFlavor& aFlavor ) } } -// helper function - -//inline DataFlavor SAL_CALL CDOTransferable::formatEtcToDataFlavor( const FORMATETC& aFormatEtc ) { LCID lcid = 0; diff --git a/dtrans/source/win32/dtobj/DataFmtTransl.cxx b/dtrans/source/win32/dtobj/DataFmtTransl.cxx index 55b1fba12fb1..b0e4c5816f21 100644 --- a/dtrans/source/win32/dtobj/DataFmtTransl.cxx +++ b/dtrans/source/win32/dtobj/DataFmtTransl.cxx @@ -39,8 +39,6 @@ #pragma warning(pop) #endif -// namespace directives - using namespace std; using namespace com::sun::star::uno; using namespace com::sun::star::datatransfer; diff --git a/dtrans/source/win32/dtobj/DtObjFactory.cxx b/dtrans/source/win32/dtobj/DtObjFactory.cxx index 579efe21161f..ee77267304b6 100644 --- a/dtrans/source/win32/dtobj/DtObjFactory.cxx +++ b/dtrans/source/win32/dtobj/DtObjFactory.cxx @@ -21,14 +21,10 @@ #include "XTDataObject.hxx" -// namespace directives - using namespace com::sun::star::uno; using namespace com::sun::star::datatransfer; using namespace com::sun::star::lang; -// implementation - IDataObjectPtr SAL_CALL CDTransObjFactory::createDataObjFromTransferable(const Reference<XComponentContext>& rxContext, const Reference< XTransferable >& refXTransferable) { diff --git a/dtrans/source/win32/dtobj/FetcList.cxx b/dtrans/source/win32/dtobj/FetcList.cxx index fbd950035b68..c3a3c056822c 100644 --- a/dtrans/source/win32/dtobj/FetcList.cxx +++ b/dtrans/source/win32/dtobj/FetcList.cxx @@ -31,8 +31,6 @@ #include "MimeAttrib.hxx" -// namespace directives - using namespace com::sun::star::uno; using namespace com::sun::star::datatransfer; using namespace com::sun::star::lang; diff --git a/dtrans/source/win32/dtobj/XTDataObject.cxx b/dtrans/source/win32/dtobj/XTDataObject.cxx index 51108a16c925..105c42339226 100644 --- a/dtrans/source/win32/dtobj/XTDataObject.cxx +++ b/dtrans/source/win32/dtobj/XTDataObject.cxx @@ -45,8 +45,6 @@ #define __uuidof(I) IID_##I #endif -// namespace directives - using namespace com::sun::star::datatransfer; using namespace com::sun::star::datatransfer::clipboard; using namespace com::sun::star::uno; @@ -61,8 +59,6 @@ public: explicit CInvalidFormatEtcException( HRESULT hr ) : m_hr( hr ) {}; }; -// ctor - CXTDataObject::CXTDataObject( const Reference< XComponentContext >& rxContext, const Reference< XTransferable >& aXTransferable ) : m_nRefCnt( 0 ) @@ -202,7 +198,6 @@ void SAL_CALL CXTDataObject::renderLocaleAndSetupStgMedium( throw CInvalidFormatEtcException( DV_E_FORMATETC ); } -//inline void SAL_CALL CXTDataObject::renderUnicodeAndSetupStgMedium( FORMATETC& fetc, STGMEDIUM& stgmedium ) { @@ -235,7 +230,6 @@ void SAL_CALL CXTDataObject::renderUnicodeAndSetupStgMedium( stgmedium ); } -//inline void SAL_CALL CXTDataObject::renderAnyDataAndSetupStgMedium( FORMATETC& fetc, STGMEDIUM& stgmedium ) { @@ -577,7 +571,6 @@ void CXTDataObject::validateFormatEtc( LPFORMATETC lpFormatEtc ) const throw CInvalidFormatEtcException( DV_E_TYMED ); } -//inline void SAL_CALL CXTDataObject::setupStgMedium( const FORMATETC& fetc, CStgTransferHelper& stgTransHlp, STGMEDIUM& stgmedium ) @@ -642,10 +635,6 @@ inline void SAL_CALL CXTDataObject::InitializeFormatEtcContainer( ) } } -// CEnumFormatEtc - -// ctor - CEnumFormatEtc::CEnumFormatEtc( LPUNKNOWN lpUnkOuter, const CFormatEtcContainer& aFormatEtcContainer ) : m_nRefCnt( 0 ), m_lpUnkOuter( lpUnkOuter ), diff --git a/dtrans/source/win32/ftransl/ftransl.cxx b/dtrans/source/win32/ftransl/ftransl.cxx index 9247f2801562..55fce69266a8 100644 --- a/dtrans/source/win32/ftransl/ftransl.cxx +++ b/dtrans/source/win32/ftransl/ftransl.cxx @@ -47,8 +47,6 @@ const OUString Windows_FormatName ("windows_formatname"); const css::uno::Type CppuType_ByteSequence = cppu::UnoType<css::uno::Sequence<sal_Int8>>::get(); const css::uno::Type CppuType_String = ::cppu::UnoType<OUString>::get(); -// namespace directives - using namespace osl; using namespace cppu; using namespace std; @@ -57,8 +55,6 @@ using namespace com::sun::star::lang; using namespace com::sun::star::datatransfer; using namespace com::sun::star::container; -// helper functions - namespace { Sequence< OUString > SAL_CALL DataFormatTranslator_getSupportedServiceNames( ) @@ -101,8 +97,6 @@ FormatEntry::FormatEntry( aStandardFormatId = std_clipboard_format_id; } -// ctor - CDataFormatTranslatorUNO::CDataFormatTranslatorUNO( const Reference< XComponentContext >& rxContext ) : m_xContext( rxContext ) { @@ -198,15 +192,12 @@ OUString SAL_CALL CDataFormatTranslatorUNO::getImplementationName( ) return OUString( IMPL_NAME ); } -// XServiceInfo sal_Bool SAL_CALL CDataFormatTranslatorUNO::supportsService( const OUString& ServiceName ) throw( RuntimeException ) { return cppu::supportsService(this, ServiceName); } -// XServiceInfo - Sequence< OUString > SAL_CALL CDataFormatTranslatorUNO::getSupportedServiceNames( ) throw( RuntimeException ) { diff --git a/dtrans/source/win32/ftransl/ftranslentry.cxx b/dtrans/source/win32/ftransl/ftranslentry.cxx index 5174d2ce1e4f..99521ab6c2ec 100644 --- a/dtrans/source/win32/ftransl/ftranslentry.cxx +++ b/dtrans/source/win32/ftransl/ftranslentry.cxx @@ -25,24 +25,16 @@ #include <com/sun/star/datatransfer/XDataFormatTranslator.hpp> #include "ftransl.hxx" -// some defines - -// the service names #define SERVICE_NAME "com.sun.star.datatransfer.DataFormatTranslator" -// the implementation names #define IMPL_NAME "com.sun.star.datatransfer.DataFormatTranslator" -// namespace directives - -using namespace ::cppu ; -using namespace ::com::sun::star::uno ; -using namespace ::com::sun::star::registry ; +using namespace ::cppu; +using namespace ::com::sun::star::uno; +using namespace ::com::sun::star::registry; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::datatransfer; -// create a static object to initialize the shell9x library - namespace { @@ -59,9 +51,6 @@ namespace extern "C" { -// component_getFactory -// returns a factory to create XFilePicker-Services - SAL_DLLPUBLIC_EXPORT void* SAL_CALL ftransl_component_getFactory( const sal_Char* pImplName, void* pSrvManager, void* /*pRegistryKey*/ ) { void* pRet = 0; diff --git a/dtrans/source/win32/misc/ImplHelper.cxx b/dtrans/source/win32/misc/ImplHelper.cxx index bfc31c95d410..29299e0b1fe5 100644 --- a/dtrans/source/win32/misc/ImplHelper.cxx +++ b/dtrans/source/win32/misc/ImplHelper.cxx @@ -41,8 +41,6 @@ #define FORMATETC_PARTIAL_MATCH -1 #define FORMATETC_NO_MATCH 0 -// namespace directives - // returns a windows codepage appropriate to the // given mime charset parameter value diff --git a/dtrans/source/win32/workbench/XTDo.cxx b/dtrans/source/win32/workbench/XTDo.cxx index 8961285763d6..2aecc0c5bf22 100644 --- a/dtrans/source/win32/workbench/XTDo.cxx +++ b/dtrans/source/win32/workbench/XTDo.cxx @@ -34,14 +34,10 @@ #include <memory> #include <tchar.h> -// namespace directives - using namespace ::std; // OTWrapperDataObject -// ctor - /* in the constructor we enumerate all formats offered by the transferable and convert the formats into formatetc structures @@ -215,17 +211,11 @@ STDMETHODIMP CXTDataObject::EnumDAdvise( LPENUMSTATDATA * ) return E_NOTIMPL; } -// for our convenience - CXTDataObject::operator IDataObject*( ) { return static_cast< IDataObject* >( this ); } -// CEnumFormatEtc - -// ctor - CEnumFormatEtc::CEnumFormatEtc( LPUNKNOWN pUnkDataObj ) : m_nRefCnt( 0 ), m_pUnkDataObj( pUnkDataObj ), diff --git a/fpicker/source/aqua/SalAquaFilePicker.mm b/fpicker/source/aqua/SalAquaFilePicker.mm index 5ef1b40e0594..5240db3d65ca 100644 --- a/fpicker/source/aqua/SalAquaFilePicker.mm +++ b/fpicker/source/aqua/SalAquaFilePicker.mm @@ -51,9 +51,6 @@ #pragma mark DEFINES -// namespace directives - - using namespace ::com::sun::star; using namespace ::com::sun::star::ui::dialogs; using namespace ::com::sun::star::ui::dialogs::TemplateDescription; @@ -63,10 +60,6 @@ using namespace ::com::sun::star::lang; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::uno; - -// helper functions - - namespace { uno::Sequence<rtl::OUString> SAL_CALL FilePicker_getSupportedServiceNames() @@ -81,9 +74,6 @@ namespace #pragma mark Constructor -// constructor - - SalAquaFilePicker::SalAquaFilePicker() : SalAquaFilePicker_Base( m_rbHelperMtx ) , m_pFilterHelper( nullptr ) @@ -103,9 +93,6 @@ SalAquaFilePicker::~SalAquaFilePicker() #pragma mark XFilePickerNotifier -// XFilePickerNotifier - - void SAL_CALL SalAquaFilePicker::addFilePickerListener( const uno::Reference<XFilePickerListener>& xListener ) throw( uno::RuntimeException ) { @@ -122,8 +109,6 @@ void SAL_CALL SalAquaFilePicker::removeFilePickerListener( const uno::Reference< #pragma mark XAsynchronousExecutableDialog -// XExecutableDialog functions - void SAL_CALL SalAquaFilePicker::setTitle( const rtl::OUString& aTitle ) throw( uno::RuntimeException ) { SolarMutexGuard aGuard; @@ -215,9 +200,6 @@ sal_Int16 SAL_CALL SalAquaFilePicker::execute() throw( uno::RuntimeException ) #pragma mark XFilePicker -// XFilePicker functions - - void SAL_CALL SalAquaFilePicker::setMultiSelectionMode( sal_Bool /* bMode */ ) throw( uno::RuntimeException ) { SolarMutexGuard aGuard; @@ -327,9 +309,6 @@ uno::Sequence<rtl::OUString> SAL_CALL SalAquaFilePicker::getSelectedFiles() thro #pragma mark XFilterManager -// XFilterManager functions - - void SAL_CALL SalAquaFilePicker::appendFilter( const rtl::OUString& aTitle, const rtl::OUString& aFilter ) throw( lang::IllegalArgumentException, uno::RuntimeException ) { @@ -363,9 +342,6 @@ rtl::OUString SAL_CALL SalAquaFilePicker::getCurrentFilter() throw( uno::Runtime #pragma mark XFilterGroupManager -// XFilterGroupManager functions - - void SAL_CALL SalAquaFilePicker::appendFilterGroup( const rtl::OUString& sGroupTitle, const uno::Sequence<beans::StringPair>& aFilters ) throw( lang::IllegalArgumentException, uno::RuntimeException ) { @@ -378,9 +354,6 @@ throw( lang::IllegalArgumentException, uno::RuntimeException ) #pragma mark XFilePickerControlAccess -// XFilePickerControlAccess functions - - void SAL_CALL SalAquaFilePicker::setValue( sal_Int16 nControlId, sal_Int16 nControlAction, const uno::Any& rValue ) throw( uno::RuntimeException ) { @@ -424,9 +397,6 @@ throw( uno::RuntimeException ) #pragma mark XInitialization -// XInitialization - - void SAL_CALL SalAquaFilePicker::initialize( const uno::Sequence<uno::Any>& aArguments ) throw( uno::Exception, uno::RuntimeException ) { @@ -502,9 +472,6 @@ throw( uno::Exception, uno::RuntimeException ) #pragma mark XCancellable -// XCancellable - - void SAL_CALL SalAquaFilePicker::cancel() throw( uno::RuntimeException ) { SolarMutexGuard aGuard; @@ -516,9 +483,6 @@ void SAL_CALL SalAquaFilePicker::cancel() throw( uno::RuntimeException ) #pragma mark XEventListener -// XEventListener - - void SAL_CALL SalAquaFilePicker::disposing( const lang::EventObject& aEvent ) throw( uno::RuntimeException ) { SolarMutexGuard aGuard; @@ -531,9 +495,6 @@ void SAL_CALL SalAquaFilePicker::disposing( const lang::EventObject& aEvent ) th #pragma mark XServiceInfo -// XServiceInfo - - rtl::OUString SAL_CALL SalAquaFilePicker::getImplementationName() throw( uno::RuntimeException ) { @@ -556,9 +517,6 @@ throw( uno::RuntimeException ) #pragma mark Misc/Private -// FilePicker Event functions - - void SAL_CALL SalAquaFilePicker::fileSelectionChanged( FilePickerEvent aEvent ) { if (m_xListener.is()) diff --git a/fpicker/source/aqua/SalAquaFolderPicker.mm b/fpicker/source/aqua/SalAquaFolderPicker.mm index 0de50e03b8f2..24c1817c2084 100644 --- a/fpicker/source/aqua/SalAquaFolderPicker.mm +++ b/fpicker/source/aqua/SalAquaFolderPicker.mm @@ -42,18 +42,11 @@ #pragma mark DEFINES -// namespace directives - - using namespace ::com::sun::star; using namespace ::com::sun::star::ui::dialogs; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::uno; - -// helper functions - - namespace { // controlling event notifications @@ -66,18 +59,13 @@ namespace } } - -// constructor - SalAquaFolderPicker::SalAquaFolderPicker( const uno::Reference<lang::XMultiServiceFactory>& xServiceMgr ) : m_xServiceMgr( xServiceMgr ) { m_nDialogType = NAVIGATIONSERVICES_DIRECTORY; } - -// XExecutableDialog functions - +// XExecutableDialog void SAL_CALL SalAquaFolderPicker::setTitle( const rtl::OUString& aTitle ) throw( uno::RuntimeException ) { @@ -120,9 +108,7 @@ sal_Int16 SAL_CALL SalAquaFolderPicker::execute() throw( uno::RuntimeException ) return retVal; } - -// XFolderPicker functions - +// XFolderPicker void SAL_CALL SalAquaFolderPicker::setDisplayDirectory( const rtl::OUString& aDirectory ) throw( lang::IllegalArgumentException, uno::RuntimeException ) @@ -174,10 +160,8 @@ void SAL_CALL SalAquaFolderPicker::setDescription( const rtl::OUString& rDescrip [m_pDialog setMessage:[NSString stringWithOUString:rDescription]]; } - // XServiceInfo - rtl::OUString SAL_CALL SalAquaFolderPicker::getImplementationName() throw( uno::RuntimeException ) { @@ -198,10 +182,8 @@ uno::Sequence<rtl::OUString> SAL_CALL SalAquaFolderPicker::getSupportedServiceNa return FolderPicker_getSupportedServiceNames(); } - // XCancellable - void SAL_CALL SalAquaFolderPicker::cancel() throw( uno::RuntimeException ) { SolarMutexGuard aGuard; @@ -209,10 +191,8 @@ void SAL_CALL SalAquaFolderPicker::cancel() throw( uno::RuntimeException ) [m_pDialog cancel:nil]; } - // XEventListener - void SAL_CALL SalAquaFolderPicker::disposing( const lang::EventObject& ) throw( uno::RuntimeException ) { diff --git a/fpicker/source/aqua/SalAquaPicker.mm b/fpicker/source/aqua/SalAquaPicker.mm index 602850954e25..4452f6506968 100644 --- a/fpicker/source/aqua/SalAquaPicker.mm +++ b/fpicker/source/aqua/SalAquaPicker.mm @@ -40,15 +40,10 @@ #pragma mark DEFINES #define kSetHideExtensionStateKey @"NSNavLastUserSetHideExtensionButtonState" - -// namespace directives - - using namespace ::com::sun::star; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::uno; -// constructor SalAquaPicker::SalAquaPicker() : m_pDialog(nullptr) , m_pControlHelper(new ControlHelper()) diff --git a/fpicker/source/aqua/resourceprovider.mm b/fpicker/source/aqua/resourceprovider.mm index e687809f768b..f7531cc34bb5 100644 --- a/fpicker/source/aqua/resourceprovider.mm +++ b/fpicker/source/aqua/resourceprovider.mm @@ -31,25 +31,15 @@ #include "resourceprovider.hxx" - -// namespace directives - - using rtl::OUString; using namespace ::com::sun::star::ui::dialogs::ExtendedFilePickerElementIds; using namespace ::com::sun::star::ui::dialogs::CommonFilePickerElementIds; - - - - static const char* RES_NAME = "fps_office"; static const char* OTHER_RES_NAME = "svt"; - // we have to translate control ids to resource ids - struct Entry { sal_Int32 ctrlId; @@ -80,14 +70,9 @@ Entry OtherCtrlIdToResIdTable[] = { { FILE_PICKER_FILE_TYPE, STR_FILEDLG_TYPE } }; - const sal_Int32 SIZE_TABLE = SAL_N_ELEMENTS( CtrlIdToResIdTable ); const sal_Int32 OTHER_SIZE_TABLE = SAL_N_ELEMENTS( OtherCtrlIdToResIdTable ); - - - - sal_Int16 CtrlIdToResId( sal_Int32 aControlId ) { sal_Int16 aResId = -1; @@ -120,38 +105,21 @@ sal_Int16 OtherCtrlIdToResId( sal_Int32 aControlId ) return aResId; } - - - - class CResourceProvider_Impl { public: - - - - - CResourceProvider_Impl( ) { m_ResMgr = ResMgr::CreateResMgr( RES_NAME ); m_OtherResMgr = ResMgr::CreateResMgr( OTHER_RES_NAME ); } - - - - ~CResourceProvider_Impl( ) { delete m_ResMgr; delete m_OtherResMgr; } - - - - NSString* getResString( sal_Int16 aId ) { OUString aResString; @@ -186,28 +154,16 @@ public: ResMgr* m_OtherResMgr; }; - - - - CResourceProvider::CResourceProvider( ) : m_pImpl( new CResourceProvider_Impl() ) { } - - - - CResourceProvider::~CResourceProvider( ) { delete m_pImpl; } - - - - NSString* CResourceProvider::getResString( sal_Int32 aId ) { NSString* sImmutable = m_pImpl->getResString( aId ); diff --git a/fpicker/source/win32/filepicker/FPentry.cxx b/fpicker/source/win32/filepicker/FPentry.cxx index ff8891983c62..665007c47006 100644 --- a/fpicker/source/win32/filepicker/FPentry.cxx +++ b/fpicker/source/win32/filepicker/FPentry.cxx @@ -34,18 +34,13 @@ #include "../folderpicker/FOPServiceInfo.hxx" #include "../folderpicker/WinFOPImpl.hxx" - -// namespace directives - - -using namespace ::com::sun::star::uno ; -using namespace ::com::sun::star::container ; -using namespace ::com::sun::star::lang ; -using namespace ::com::sun::star::registry ; -using namespace ::cppu ; +using namespace ::com::sun::star::uno; +using namespace ::com::sun::star::container; +using namespace ::com::sun::star::lang; +using namespace ::com::sun::star::registry; +using namespace ::cppu; using ::com::sun::star::ui::dialogs::XFilePicker2; - static Reference< XInterface > SAL_CALL createInstance( const Reference< XMultiServiceFactory >& rServiceManager ) { @@ -79,7 +74,6 @@ createInstance_fop( const Reference< XMultiServiceFactory >& rServiceManager ) return Reference< XInterface >( static_cast< cppu::OWeakObject * >( new CFolderPicker( rServiceManager ) ) ); } - extern "C" { diff --git a/fpicker/source/win32/filepicker/FilePicker.cxx b/fpicker/source/win32/filepicker/FilePicker.cxx index 3644f3f6303f..4acf64f0bc00 100644 --- a/fpicker/source/win32/filepicker/FilePicker.cxx +++ b/fpicker/source/win32/filepicker/FilePicker.cxx @@ -33,21 +33,12 @@ #include <comphelper/sequence.hxx> - -// namespace directives - - using namespace com::sun::star; - using namespace ::com::sun::star::ui::dialogs; using namespace ::com::sun::star::ui::dialogs::TemplateDescription; #define FILE_PICKER_DLL_NAME L"fps.dll" - -// helper functions - - namespace { // controlling event notifications @@ -62,7 +53,6 @@ namespace } } - CFilePicker::CFilePicker( const uno::Reference<lang::XMultiServiceFactory>& xServiceMgr) : CFilePicker_Base(m_rbHelperMtx), m_xServiceMgr(xServiceMgr), @@ -81,10 +71,8 @@ CFilePicker::CFilePicker( const uno::Reference<lang::XMultiServiceFactory>& xSer hInstance ) ); } - // XFPEventListenerManager - void SAL_CALL CFilePicker::addFilePickerListener(const uno::Reference<XFilePickerListener>& xListener) throw(uno::RuntimeException) { @@ -97,7 +85,6 @@ void SAL_CALL CFilePicker::addFilePickerListener(const uno::Reference<XFilePicke rBHelper.aLC.addInterface(cppu::UnoType<decltype(xListener)>::get(), xListener ); } - void SAL_CALL CFilePicker::removeFilePickerListener(const uno::Reference<XFilePickerListener>& xListener ) throw(uno::RuntimeException) { @@ -109,10 +96,8 @@ void SAL_CALL CFilePicker::removeFilePickerListener(const uno::Reference<XFilePi rBHelper.aLC.removeInterface(cppu::UnoType<decltype(xListener)>::get(), xListener ); } - // XEventListener - void SAL_CALL CFilePicker::disposing(const lang::EventObject& aEvent) throw(uno::RuntimeException) { uno::Reference<XFilePickerListener> xFilePickerListener(aEvent.Source, css::uno::UNO_QUERY); @@ -121,7 +106,6 @@ void SAL_CALL CFilePicker::disposing(const lang::EventObject& aEvent) throw(uno: removeFilePickerListener(xFilePickerListener); } - void SAL_CALL CFilePicker::fileSelectionChanged(FilePickerEvent aEvent) { aEvent.Source.set(static_cast<XFilePickerNotifier*>(this)); @@ -129,7 +113,6 @@ void SAL_CALL CFilePicker::fileSelectionChanged(FilePickerEvent aEvent) new CFilePickerParamEventNotification(&XFilePickerListener::fileSelectionChanged,aEvent)); } - void SAL_CALL CFilePicker::directoryChanged(FilePickerEvent aEvent) { aEvent.Source.set(static_cast<XFilePickerNotifier*>(this)); @@ -137,7 +120,6 @@ void SAL_CALL CFilePicker::directoryChanged(FilePickerEvent aEvent) new CFilePickerParamEventNotification(&XFilePickerListener::directoryChanged,aEvent)); } - void SAL_CALL CFilePicker::controlStateChanged(FilePickerEvent aEvent) { aEvent.Source.set(static_cast<XFilePickerNotifier*>(this)); @@ -145,17 +127,14 @@ void SAL_CALL CFilePicker::controlStateChanged(FilePickerEvent aEvent) new CFilePickerParamEventNotification(&XFilePickerListener::controlStateChanged,aEvent)); } - void SAL_CALL CFilePicker::dialogSizeChanged() { m_aAsyncEventNotifier.notifyEvent( new CFilePickerEventNotification(&XFilePickerListener::dialogSizeChanged)); } - // If there are more than one listener the return value of the last one wins - OUString SAL_CALL CFilePicker::helpRequested(FilePickerEvent aEvent) const { OUString aHelpText; @@ -198,33 +177,27 @@ OUString SAL_CALL CFilePicker::helpRequested(FilePickerEvent aEvent) const return aHelpText; } - bool CFilePicker::startupEventNotification(bool bStartupSuspended) { return m_aAsyncEventNotifier.startup(bStartupSuspended); } - void CFilePicker::shutdownEventNotification() { m_aAsyncEventNotifier.shutdown(); } - void CFilePicker::suspendEventNotification() { m_aAsyncEventNotifier.suspend(); } - void CFilePicker::resumeEventNotification() { m_aAsyncEventNotifier.resume(); } - -// XFilePicker functions - +// XFilePicker void SAL_CALL CFilePicker::setMultiSelectionMode(sal_Bool bMode) throw(uno::RuntimeException) { @@ -233,7 +206,6 @@ void SAL_CALL CFilePicker::setMultiSelectionMode(sal_Bool bMode) throw(uno::Runt m_pImpl->setMultiSelectionMode(bMode); } - void SAL_CALL CFilePicker::setTitle(const OUString& aTitle) throw(uno::RuntimeException) { OSL_ASSERT(0 != m_pImpl.get()); @@ -241,7 +213,6 @@ void SAL_CALL CFilePicker::setTitle(const OUString& aTitle) throw(uno::RuntimeEx m_pImpl->setTitle(aTitle); } - void SAL_CALL CFilePicker::appendFilter(const OUString& aTitle, const OUString& aFilter) throw(lang::IllegalArgumentException, uno::RuntimeException) { @@ -250,7 +221,6 @@ void SAL_CALL CFilePicker::appendFilter(const OUString& aTitle, const OUString& m_pImpl->appendFilter(aTitle, aFilter); } - void SAL_CALL CFilePicker::setCurrentFilter(const OUString& aTitle) throw(lang::IllegalArgumentException, uno::RuntimeException) { @@ -259,7 +229,6 @@ void SAL_CALL CFilePicker::setCurrentFilter(const OUString& aTitle) m_pImpl->setCurrentFilter(aTitle); } - OUString SAL_CALL CFilePicker::getCurrentFilter() throw(uno::RuntimeException) { OSL_ASSERT(0 != m_pImpl.get()); @@ -267,7 +236,6 @@ OUString SAL_CALL CFilePicker::getCurrentFilter() throw(uno::RuntimeException) return m_pImpl->getCurrentFilter(); } - void SAL_CALL CFilePicker::appendFilterGroup(const OUString& sGroupTitle, const uno::Sequence<beans::StringPair>& aFilters) throw (lang::IllegalArgumentException, uno::RuntimeException) { @@ -276,7 +244,6 @@ void SAL_CALL CFilePicker::appendFilterGroup(const OUString& sGroupTitle, const m_pImpl->appendFilterGroup(sGroupTitle, aFilters); } - void SAL_CALL CFilePicker::setDefaultName(const OUString& aName) throw(uno::RuntimeException) { @@ -285,7 +252,6 @@ void SAL_CALL CFilePicker::setDefaultName(const OUString& aName) m_pImpl->setDefaultName(aName); } - void SAL_CALL CFilePicker::setDisplayDirectory(const OUString& aDirectory) throw(lang::IllegalArgumentException, uno::RuntimeException) { @@ -294,7 +260,6 @@ void SAL_CALL CFilePicker::setDisplayDirectory(const OUString& aDirectory) m_pImpl->setDisplayDirectory(aDirectory); } - OUString SAL_CALL CFilePicker::getDisplayDirectory() throw(uno::RuntimeException) { OSL_ASSERT(0 != m_pImpl.get()); @@ -302,7 +267,6 @@ OUString SAL_CALL CFilePicker::getDisplayDirectory() throw(uno::RuntimeException return m_pImpl->getDisplayDirectory(); } - uno::Sequence<OUString> SAL_CALL CFilePicker::getFiles() throw(uno::RuntimeException) { OSL_ASSERT(0 != m_pImpl.get()); @@ -310,7 +274,6 @@ uno::Sequence<OUString> SAL_CALL CFilePicker::getFiles() throw(uno::RuntimeExcep return m_pImpl->getFiles(); } - uno::Sequence< OUString > SAL_CALL CFilePicker::getSelectedFiles() throw (uno::RuntimeException, std::exception) { OSL_ASSERT(0 != m_pImpl.get()); @@ -348,7 +311,6 @@ uno::Sequence< OUString > SAL_CALL CFilePicker::getSelectedFiles() throw (uno::R return comphelper::containerToSequence(lTarget); } - sal_Int16 SAL_CALL CFilePicker::execute() throw(uno::RuntimeException) { OSL_ASSERT(0 != m_pImpl.get()); @@ -377,10 +339,6 @@ sal_Int16 SAL_CALL CFilePicker::execute() throw(uno::RuntimeException) return ret; } - -// XFilePicker functions - - void SAL_CALL CFilePicker::setValue(sal_Int16 aControlId, sal_Int16 aControlAction, const uno::Any& aValue) throw(uno::RuntimeException) { @@ -390,7 +348,6 @@ void SAL_CALL CFilePicker::setValue(sal_Int16 aControlId, sal_Int16 aControlActi m_pImpl->setValue(aControlId, aControlAction, aValue); } - uno::Any SAL_CALL CFilePicker::getValue(sal_Int16 aControlId, sal_Int16 aControlAction) throw(uno::RuntimeException) { @@ -400,7 +357,6 @@ uno::Any SAL_CALL CFilePicker::getValue(sal_Int16 aControlId, sal_Int16 aControl return m_pImpl->getValue(aControlId, aControlAction); } - void SAL_CALL CFilePicker::enableControl(sal_Int16 aControlId, sal_Bool bEnable) throw(uno::RuntimeException) { @@ -410,7 +366,6 @@ throw(uno::RuntimeException) m_pImpl->enableControl( aControlId, bEnable ); } - void SAL_CALL CFilePicker::setLabel(sal_Int16 aControlId, const OUString& aLabel) throw (uno::RuntimeException) { @@ -420,7 +375,6 @@ void SAL_CALL CFilePicker::setLabel(sal_Int16 aControlId, const OUString& aLabel m_pImpl->setLabel(aControlId, aLabel); } - OUString SAL_CALL CFilePicker::getLabel(sal_Int16 aControlId) throw (uno::RuntimeException) { @@ -430,7 +384,6 @@ OUString SAL_CALL CFilePicker::getLabel(sal_Int16 aControlId) return m_pImpl->getLabel(aControlId); } - uno::Sequence<sal_Int16> SAL_CALL CFilePicker::getSupportedImageFormats() throw (uno::RuntimeException) { OSL_ASSERT(0 != m_pImpl.get()); @@ -439,7 +392,6 @@ uno::Sequence<sal_Int16> SAL_CALL CFilePicker::getSupportedImageFormats() throw return m_pImpl->getSupportedImageFormats(); } - sal_Int32 SAL_CALL CFilePicker::getTargetColorDepth() throw (uno::RuntimeException) { OSL_ASSERT(0 != m_pImpl.get()); @@ -448,7 +400,6 @@ sal_Int32 SAL_CALL CFilePicker::getTargetColorDepth() throw (uno::RuntimeExcepti return m_pImpl->getTargetColorDepth(); } - sal_Int32 SAL_CALL CFilePicker::getAvailableWidth() throw (uno::RuntimeException) { OSL_ASSERT(0 != m_pImpl.get()); @@ -457,7 +408,6 @@ sal_Int32 SAL_CALL CFilePicker::getAvailableWidth() throw (uno::RuntimeException return m_pImpl->getAvailableWidth(); } - sal_Int32 SAL_CALL CFilePicker::getAvailableHeight() throw (uno::RuntimeException) { OSL_ASSERT(0 != m_pImpl.get()); @@ -466,7 +416,6 @@ sal_Int32 SAL_CALL CFilePicker::getAvailableHeight() throw (uno::RuntimeExceptio return m_pImpl->getAvailableHeight(); } - void SAL_CALL CFilePicker::setImage(sal_Int16 aImageFormat, const uno::Any& aImage) throw (lang::IllegalArgumentException, uno::RuntimeException) { @@ -476,7 +425,6 @@ void SAL_CALL CFilePicker::setImage(sal_Int16 aImageFormat, const uno::Any& aIma m_pImpl->setImage(aImageFormat, aImage); } - sal_Bool SAL_CALL CFilePicker::setShowState(sal_Bool bShowState) throw (uno::RuntimeException) { OSL_ASSERT(0 != m_pImpl.get()); @@ -485,7 +433,6 @@ sal_Bool SAL_CALL CFilePicker::setShowState(sal_Bool bShowState) throw (uno::Run return m_pImpl->setShowState(bShowState); } - sal_Bool SAL_CALL CFilePicker::getShowState() throw (uno::RuntimeException) { OSL_ASSERT(0 != m_pImpl.get()); @@ -494,7 +441,6 @@ sal_Bool SAL_CALL CFilePicker::getShowState() throw (uno::RuntimeException) return m_pImpl->getShowState(); } - void SAL_CALL CFilePicker::initialize(const uno::Sequence<uno::Any>& aArguments) throw( uno::Exception, uno::RuntimeException) { @@ -594,7 +540,6 @@ void SAL_CALL CFilePicker::initialize(const uno::Sequence<uno::Any>& aArguments) hInstance ) ); } - void SAL_CALL CFilePicker::cancel() throw(uno::RuntimeException) { @@ -604,27 +549,20 @@ void SAL_CALL CFilePicker::cancel() m_pImpl->cancel(); } - // XServiceInfo - OUString SAL_CALL CFilePicker::getImplementationName() throw(uno::RuntimeException) { return OUString(FILE_PICKER_IMPL_NAME); } -// XServiceInfo sal_Bool SAL_CALL CFilePicker::supportsService(const OUString& ServiceName) throw(uno::RuntimeException ) { return cppu::supportsService(this, ServiceName); } - -// XServiceInfo - - uno::Sequence<OUString> SAL_CALL CFilePicker::getSupportedServiceNames() throw(uno::RuntimeException) { diff --git a/fpicker/source/win32/filepicker/FilterContainer.cxx b/fpicker/source/win32/filepicker/FilterContainer.cxx index a76afac50cc8..c23c2443f4ee 100644 --- a/fpicker/source/win32/filepicker/FilterContainer.cxx +++ b/fpicker/source/win32/filepicker/FilterContainer.cxx @@ -31,23 +31,14 @@ #pragma warning(pop) #endif - -// namespace directives - - -// ctor - - CFilterContainer::CFilterContainer( sal_Int32 initSize ) : m_vFilters( initSize ), m_bIterInitialized( sal_False ) { } - // add a name/filter pair - sal_Bool SAL_CALL CFilterContainer::addFilter( const OUString& aName, const OUString& aFilter, sal_Bool bAllowDuplicates ) { @@ -72,12 +63,10 @@ sal_Bool SAL_CALL CFilterContainer::addFilter( return ( pos < 0 ) ? sal_True : sal_False; } - // delete a filter // Precondition: the container is not empty // there is a filter identified by the given name - sal_Bool SAL_CALL CFilterContainer::delFilter( const OUString& aName ) { OSL_ASSERT( !m_vFilters.empty() ); @@ -92,30 +81,24 @@ sal_Bool SAL_CALL CFilterContainer::delFilter( const OUString& aName ) return ( pos > -1 ) ? sal_True : sal_False; } - // return the number of filters currently in the container - sal_Int32 SAL_CALL CFilterContainer::numFilter( ) { return m_vFilters.size( ); } - // clear all entries - void SAL_CALL CFilterContainer::empty() { m_vFilters.clear( ); } - // get a filter by name // Precondition: the container is not empty // there is a filter identified by the name - sal_Bool SAL_CALL CFilterContainer::getFilter( const OUString& aName, OUString& theFilter ) const { OSL_PRECOND( !m_vFilters.empty() , "Empty filter container" ); @@ -136,7 +119,6 @@ sal_Bool SAL_CALL CFilterContainer::getFilter( const OUString& aName, OUString& return (pos > -1 ) ? sal_True : sal_False; } - sal_Bool SAL_CALL CFilterContainer::getFilter( sal_Int32 aIndex, OUString& theFilter ) const { sal_Bool bRet = sal_True; @@ -154,16 +136,13 @@ sal_Bool SAL_CALL CFilterContainer::getFilter( sal_Int32 aIndex, OUString& theFi return bRet; } - sal_Int32 SAL_CALL CFilterContainer::getFilterPos( const OUString& aName ) const { return getFilterTagPos( aName ); } - // returns the index of the filter identified by name - sal_Int32 SAL_CALL CFilterContainer::getFilterTagPos( const OUString& aName ) const { if ( !m_vFilters.empty() ) @@ -180,20 +159,16 @@ sal_Int32 SAL_CALL CFilterContainer::getFilterTagPos( const OUString& aName ) co return -1; } - // starts enumerating the filter in the container - void SAL_CALL CFilterContainer::beginEnumFilter( ) { m_iter = m_vFilters.begin( ); m_bIterInitialized = sal_True; } - // returns true if another filter has been retrieved - sal_Bool SAL_CALL CFilterContainer::getNextFilter( FILTER_ENTRY_T& nextFilterEntry ) { OSL_ASSERT( m_bIterInitialized ); @@ -208,24 +183,20 @@ sal_Bool SAL_CALL CFilterContainer::getNextFilter( FILTER_ENTRY_T& nextFilterEnt return bRet; } - void SAL_CALL CFilterContainer::setCurrentFilter( const OUString& aName ) { m_sCurrentFilter = aName; } - OUString SAL_CALL CFilterContainer::getCurrentFilter() const { return m_sCurrentFilter; } - // calculates the length of a '\0' separated filter, that means // length of the name + '\0' + length of the filter string + // a trailing '\0' - static sal_uInt32 _getLengthFilter( CFilterContainer::FILTER_ENTRY_T aFilterEntry ) { return ( @@ -233,10 +204,8 @@ static sal_uInt32 _getLengthFilter( CFilterContainer::FILTER_ENTRY_T aFilterEntr aFilterEntry.second.getLength( ) + 1 ); } - // calculates the length of all filters currently in the container - static sal_uInt32 _getTotalFilterLength( CFilterContainer& aFilterContainer ) { CFilterContainer::FILTER_ENTRY_T nextFilter; @@ -250,19 +219,16 @@ static sal_uInt32 _getTotalFilterLength( CFilterContainer& aFilterContainer ) return ( totalLength > 0 ) ? totalLength + 1 : totalLength; } - inline void _wcsmemcpy( sal_Unicode* pDest, const sal_Unicode* pSrc, sal_uInt32 nLength ) { memcpy( pDest, pSrc, nLength * sizeof( sal_Unicode ) ); } - // a helper trivial helper function to create a filter buffer in the // format the Win32 API requires, // e.g. "Text\0*.txt\0Doc\0*.doc;*xls\0\0" - OUString SAL_CALL makeWinFilterBuffer( CFilterContainer& aFilterContainer ) { // calculate the required buffer size diff --git a/fpicker/source/win32/filepicker/PreviewCtrl.cxx b/fpicker/source/win32/filepicker/PreviewCtrl.cxx index a8ffc837b776..18bea27ed4dd 100644 --- a/fpicker/source/win32/filepicker/PreviewCtrl.cxx +++ b/fpicker/source/win32/filepicker/PreviewCtrl.cxx @@ -40,18 +40,10 @@ // means 3 pixel top and 3 pixel bottom #define VERT_BORDER_SPACE 6 - -// static member initialization - - CFilePreview* CFilePreview::s_FilePreviewInst = NULL; CFilePreview::FILEPREVIEW_SINGLETON_DESTROYER_T CFilePreview::s_SingletonDestroyer; - -// some useful helper functions - - -namespace // private +namespace { class CPreviewException { @@ -59,42 +51,35 @@ namespace // private // of the preview window failed }; - inline sal_Int32 SubDiv( sal_Int32 nNumber, sal_Int32 nMinuend, sal_Int32 nDenominator ) { return ( static_cast<sal_Int32>( ( nNumber - nMinuend ) / nDenominator ) ); } - // convert himetric to pixel - inline sal_Int32 Himetric2Pixel( HDC hDC, sal_Int32 hmSize, sal_Int32 nIndex ) { return MulDiv( hmSize, GetDeviceCaps( hDC, nIndex), HIMETRIC_INCH ); } - inline sal_uInt32 _getWidthRect( const RECT& aRect ) { return ( aRect.right - aRect.left ); } - inline sal_uInt32 _getHeightRect( const RECT& aRect ) { return ( aRect.bottom - aRect.top ); } - // calc the upper left corner so that a given window will be // displayed centered within the given window - inline POINT _calcULCorner( HWND hwnd, const CDimension& aPicSize ) { @@ -111,12 +96,10 @@ namespace // private return ulCorner; } - // test if a picture with the given dimensions fits into an // arbitrary window // we expect the width and height to be in pixel - inline sal_Bool _pictureSizeFitsWindowSize( HWND hwnd, const CDimension& aPicSize ) { @@ -130,12 +113,10 @@ namespace // private ( ( nHeightWnd - VERT_BORDER_SPACE ) >= aPicSize.m_cy ) ); } - // calc the dimensions so that a given picture fits into a // given window, if the picture fits into the given window // the original CDimension will be returned - inline CDimension _scalePictureSize( HWND hwnd, const CDimension& aPicSize ) { @@ -169,13 +150,10 @@ namespace // private return scaledPicSize; } - -} // end namespace - +} // unnamed namespace // to ensure only one instance (singleton) - CFilePreview* CFilePreview::createInstance( HWND aParent, POINT ulCorner, @@ -207,7 +185,6 @@ CFilePreview* CFilePreview::createInstance( return s_FilePreviewInst; } - CFilePreview::CFilePreview( HWND aParent, POINT ulCorner, @@ -258,7 +235,6 @@ CFilePreview::CFilePreview( throw CPreviewException( ); } - CFilePreview::~CFilePreview( ) { // unregister preview window class @@ -268,10 +244,8 @@ CFilePreview::~CFilePreview( ) SAL_WARN_IF( !bRet, "fpicker", "Unregister preview window class failed" ); } - // sets the size of the preview window - sal_Bool SAL_CALL CFilePreview::setSize( const CDimension& aSize ) { OSL_PRECOND( IsWindow( m_hwnd ), "Preview window not initialized" ); @@ -287,10 +261,8 @@ sal_Bool SAL_CALL CFilePreview::setSize( const CDimension& aSize ) SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE ); } - // returns the dimension of the preview - sal_Bool SAL_CALL CFilePreview::getSize( CDimension& theSize ) const { OSL_PRECOND( IsWindow( m_hwnd ), "Preview window not initialized" ); @@ -304,12 +276,10 @@ sal_Bool SAL_CALL CFilePreview::getSize( CDimension& theSize ) const return bRet; } - // sets the position of the upper left corner // of the preview window relative to the // upper left corner of the parent window - sal_Bool SAL_CALL CFilePreview::setPos( POINT ulCorner ) { OSL_PRECOND( IsWindow( m_hwnd ), "Preview window not initialized" ); @@ -325,12 +295,10 @@ sal_Bool SAL_CALL CFilePreview::setPos( POINT ulCorner ) SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE ); } - // returns the current position of the preview // relative to the upper left corner of the // parent window - sal_Bool SAL_CALL CFilePreview::getPos( POINT& ulCorner ) const { OSL_PRECOND( IsWindow( m_hwnd ), "Preview window not initialized" ); @@ -348,7 +316,6 @@ sal_Bool SAL_CALL CFilePreview::getPos( POINT& ulCorner ) const return bRet; } - void SAL_CALL CFilePreview::enable( sal_Bool bEnable ) { m_bEnabled = bEnable; @@ -358,7 +325,6 @@ void SAL_CALL CFilePreview::enable( sal_Bool bEnable ) UpdateWindow( m_hwnd ); } - // shows the preview window // possible values see SHOW_STATE // SS_SHOW - make the window visible @@ -366,7 +332,6 @@ void SAL_CALL CFilePreview::enable( sal_Bool bEnable ) // SS_ENABLED - enable the window // SS_DISABLED - disable the window - sal_Bool SAL_CALL CFilePreview::show( sal_Bool bShow ) { OSL_PRECOND( IsWindow( m_hwnd ), "Preview window not initialized" ); @@ -375,7 +340,6 @@ sal_Bool SAL_CALL CFilePreview::show( sal_Bool bShow ) return ShowWindow( m_hwnd, showState ); } - // if the preview is shown and enabled // preview of the given file will be shown // returns true on success or false if an error @@ -405,7 +369,6 @@ sal_Bool SAL_CALL CFilePreview::update( const OUString& aFileName ) return sal_True; } - void SAL_CALL CFilePreview::onPaint( HWND hWnd, HDC hDC ) { OSL_PRECOND( IsWindow( m_hwnd ), "Preview window not initialized" ); @@ -455,7 +418,6 @@ void SAL_CALL CFilePreview::onPaint( HWND hWnd, HDC hDC ) } } - sal_Bool CFilePreview::loadFile( const OUString& aFileName ) { HANDLE hFile = 0; @@ -523,7 +485,6 @@ CLEANUP_AND_EXIT: return ( SUCCEEDED( hr ) ); } - LRESULT CALLBACK CFilePreview::WndProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam ) { @@ -561,5 +522,4 @@ LRESULT CALLBACK CFilePreview::WndProc( return lResult; } - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/fpicker/source/win32/filepicker/VistaFilePicker.cxx b/fpicker/source/win32/filepicker/VistaFilePicker.cxx index 3297949a6aaf..5ac4647b52e0 100644 --- a/fpicker/source/win32/filepicker/VistaFilePicker.cxx +++ b/fpicker/source/win32/filepicker/VistaFilePicker.cxx @@ -53,10 +53,6 @@ #pragma warning (pop) #endif - -// namespace directives - - namespace fpicker{ namespace win32{ namespace vista{ @@ -72,7 +68,6 @@ namespace } } - VistaFilePicker::VistaFilePicker(const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR) : TVistaFilePickerBase (m_aMutex ) , m_xSMGR (xSMGR ) @@ -83,12 +78,10 @@ VistaFilePicker::VistaFilePicker(const css::uno::Reference< css::lang::XMultiSer { } - VistaFilePicker::~VistaFilePicker() { } - void SAL_CALL VistaFilePicker::addFilePickerListener(const css::uno::Reference< css::ui::dialogs::XFilePickerListener >& xListener) throw(css::uno::RuntimeException) { @@ -99,7 +92,6 @@ void SAL_CALL VistaFilePicker::addFilePickerListener(const css::uno::Reference< m_aAsyncExecute.triggerRequestThreadAware(rRequest, AsyncRequests::NON_BLOCKED); } - void SAL_CALL VistaFilePicker::removeFilePickerListener(const css::uno::Reference< css::ui::dialogs::XFilePickerListener >& xListener ) throw(css::uno::RuntimeException) { @@ -110,13 +102,11 @@ void SAL_CALL VistaFilePicker::removeFilePickerListener(const css::uno::Referenc m_aAsyncExecute.triggerRequestThreadAware(rRequest, AsyncRequests::NON_BLOCKED); } - void SAL_CALL VistaFilePicker::disposing(const css::lang::EventObject& /*aEvent*/) throw(css::uno::RuntimeException) { } - void SAL_CALL VistaFilePicker::setMultiSelectionMode(sal_Bool bMode) throw(css::uno::RuntimeException) { @@ -127,7 +117,6 @@ void SAL_CALL VistaFilePicker::setMultiSelectionMode(sal_Bool bMode) m_aAsyncExecute.triggerRequestThreadAware(rRequest, AsyncRequests::NON_BLOCKED); } - void SAL_CALL VistaFilePicker::setTitle(const OUString& sTitle) throw(css::uno::RuntimeException) { @@ -138,7 +127,6 @@ void SAL_CALL VistaFilePicker::setTitle(const OUString& sTitle) m_aAsyncExecute.triggerRequestThreadAware(rRequest, AsyncRequests::NON_BLOCKED); } - void SAL_CALL VistaFilePicker::appendFilter(const OUString& sTitle , const OUString& sFilter) throw(css::lang::IllegalArgumentException, @@ -152,7 +140,6 @@ void SAL_CALL VistaFilePicker::appendFilter(const OUString& sTitle , m_aAsyncExecute.triggerRequestThreadAware(rRequest, AsyncRequests::NON_BLOCKED); } - void SAL_CALL VistaFilePicker::setCurrentFilter(const OUString& sTitle) throw(css::lang::IllegalArgumentException, css::uno::RuntimeException ) @@ -164,7 +151,6 @@ void SAL_CALL VistaFilePicker::setCurrentFilter(const OUString& sTitle) m_aAsyncExecute.triggerRequestThreadAware(rRequest, AsyncRequests::NON_BLOCKED); } - OUString SAL_CALL VistaFilePicker::getCurrentFilter() throw(css::uno::RuntimeException) { @@ -177,7 +163,6 @@ OUString SAL_CALL VistaFilePicker::getCurrentFilter() return sTitle; } - void SAL_CALL VistaFilePicker::appendFilterGroup(const OUString& /*sGroupTitle*/, const css::uno::Sequence< css::beans::StringPair >& rFilters ) throw (css::lang::IllegalArgumentException, @@ -190,7 +175,6 @@ void SAL_CALL VistaFilePicker::appendFilterGroup(const OUString& m_aAsyncExecute.triggerRequestThreadAware(rRequest, AsyncRequests::NON_BLOCKED); } - void SAL_CALL VistaFilePicker::setDefaultName(const OUString& sName ) throw(css::uno::RuntimeException) { @@ -201,7 +185,6 @@ void SAL_CALL VistaFilePicker::setDefaultName(const OUString& sName ) m_aAsyncExecute.triggerRequestThreadAware(rRequest, AsyncRequests::NON_BLOCKED); } - void SAL_CALL VistaFilePicker::setDisplayDirectory(const OUString& sDirectory) throw (css::lang::IllegalArgumentException, css::uno::RuntimeException ) @@ -226,7 +209,6 @@ void SAL_CALL VistaFilePicker::setDisplayDirectory(const OUString& sDirectory) m_aAsyncExecute.triggerRequestThreadAware(rRequest, AsyncRequests::NON_BLOCKED); } - OUString SAL_CALL VistaFilePicker::getDisplayDirectory() throw(css::uno::RuntimeException) { @@ -238,7 +220,6 @@ OUString SAL_CALL VistaFilePicker::getDisplayDirectory() return sDirectory; } - // @deprecated can't be supported any longer ... see IDL description for further details css::uno::Sequence< OUString > SAL_CALL VistaFilePicker::getFiles() throw(css::uno::RuntimeException) @@ -252,7 +233,6 @@ css::uno::Sequence< OUString > SAL_CALL VistaFilePicker::getFiles() return lFiles; } - css::uno::Sequence< OUString > SAL_CALL VistaFilePicker::getSelectedFiles() throw(css::uno::RuntimeException, std::exception) { @@ -266,7 +246,6 @@ css::uno::Sequence< OUString > SAL_CALL VistaFilePicker::getSelectedFiles() return lFiles; } - ::sal_Int16 SAL_CALL VistaFilePicker::execute() throw(css::uno::RuntimeException) { @@ -299,9 +278,7 @@ css::uno::Sequence< OUString > SAL_CALL VistaFilePicker::getSelectedFiles() return nResult; } - -// XFilePicker functions - +// XFilePicker void SAL_CALL VistaFilePicker::setValue( ::sal_Int16 nControlId , ::sal_Int16 nControlAction, @@ -317,7 +294,6 @@ void SAL_CALL VistaFilePicker::setValue( ::sal_Int16 nControlId , m_aAsyncExecute.triggerRequestThreadAware(rRequest, AsyncRequests::NON_BLOCKED); } - css::uno::Any SAL_CALL VistaFilePicker::getValue(::sal_Int16 nControlId , ::sal_Int16 nControlAction) throw(css::uno::RuntimeException) @@ -332,7 +308,6 @@ css::uno::Any SAL_CALL VistaFilePicker::getValue(::sal_Int16 nControlId , return aValue; } - void SAL_CALL VistaFilePicker::enableControl(::sal_Int16 nControlId, sal_Bool bEnable ) throw(css::uno::RuntimeException) @@ -345,7 +320,6 @@ void SAL_CALL VistaFilePicker::enableControl(::sal_Int16 nControlId, m_aAsyncExecute.triggerRequestThreadAware(rRequest, AsyncRequests::NON_BLOCKED); } - void SAL_CALL VistaFilePicker::setLabel( ::sal_Int16 nControlId, const OUString& sLabel ) throw (css::uno::RuntimeException) @@ -358,7 +332,6 @@ void SAL_CALL VistaFilePicker::setLabel( ::sal_Int16 nControlId, m_aAsyncExecute.triggerRequestThreadAware(rRequest, AsyncRequests::NON_BLOCKED); } - OUString SAL_CALL VistaFilePicker::getLabel(::sal_Int16 nControlId) throw (css::uno::RuntimeException) { @@ -371,35 +344,30 @@ OUString SAL_CALL VistaFilePicker::getLabel(::sal_Int16 nControlId) return sLabel; } - css::uno::Sequence< ::sal_Int16 > SAL_CALL VistaFilePicker::getSupportedImageFormats() throw (css::uno::RuntimeException) { return css::uno::Sequence< sal_Int16 >(); } - sal_Int32 SAL_CALL VistaFilePicker::getTargetColorDepth() throw (css::uno::RuntimeException) { return 0; } - sal_Int32 SAL_CALL VistaFilePicker::getAvailableWidth() throw (css::uno::RuntimeException) { return 0; } - sal_Int32 SAL_CALL VistaFilePicker::getAvailableHeight() throw (css::uno::RuntimeException) { return 0; } - void SAL_CALL VistaFilePicker::setImage( sal_Int16 /*nImageFormat*/, const css::uno::Any& /*aImage */) throw (css::lang::IllegalArgumentException, @@ -407,21 +375,18 @@ void SAL_CALL VistaFilePicker::setImage( sal_Int16 /*nImageFormat*/, { } - sal_Bool SAL_CALL VistaFilePicker::setShowState(sal_Bool /*bShowState*/) throw (css::uno::RuntimeException) { return sal_False; } - sal_Bool SAL_CALL VistaFilePicker::getShowState() throw (css::uno::RuntimeException) { return sal_False; } - void SAL_CALL VistaFilePicker::initialize(const css::uno::Sequence< css::uno::Any >& lArguments) throw(css::uno::Exception , css::uno::RuntimeException) @@ -563,33 +528,25 @@ void SAL_CALL VistaFilePicker::initialize(const css::uno::Sequence< css::uno::An } } - void SAL_CALL VistaFilePicker::cancel() throw(css::uno::RuntimeException) { } - // XServiceInfo - OUString SAL_CALL VistaFilePicker::getImplementationName() throw(css::uno::RuntimeException) { return OUString("com.sun.star.comp.fpicker.VistaFileDialog"); } -// XServiceInfo sal_Bool SAL_CALL VistaFilePicker::supportsService(const OUString& sServiceName) throw(css::uno::RuntimeException ) { return cppu::supportsService(this, sServiceName); } - -// XServiceInfo - - css::uno::Sequence< OUString > SAL_CALL VistaFilePicker::getSupportedServiceNames() throw(css::uno::RuntimeException) { diff --git a/fpicker/source/win32/filepicker/WinFileOpenImpl.cxx b/fpicker/source/win32/filepicker/WinFileOpenImpl.cxx index c226fc415ca7..479fadb3ce8e 100644 --- a/fpicker/source/win32/filepicker/WinFileOpenImpl.cxx +++ b/fpicker/source/win32/filepicker/WinFileOpenImpl.cxx @@ -37,10 +37,6 @@ #include <osl/thread.hxx> #include "filepickerstate.hxx" - -// namespace directives - - using namespace com::sun::star; using com::sun::star::ui::dialogs::FilePickerEvent; @@ -51,10 +47,8 @@ using namespace ::com::sun::star::ui::dialogs::ExtendedFilePickerElementIds; using namespace ::com::sun::star::ui::dialogs::CommonFilePickerElementIds; using namespace ::com::sun::star::ui::dialogs::ListboxControlActions; - // to distinguish what to do in the enum child window callback function - enum ECW_ACTION_T { INIT_CUSTOM_CONTROLS, @@ -72,10 +66,6 @@ struct EnumParam {} }; - -// ctor - - CWinFileOpenImpl::CWinFileOpenImpl( CFilePicker* aFilePicker, sal_Bool bFileOpenDialog, @@ -95,20 +85,14 @@ CWinFileOpenImpl::CWinFileOpenImpl( m_FilePickerState = m_NonExecuteFilePickerState; } - -// dtor - - CWinFileOpenImpl::~CWinFileOpenImpl() { delete m_ExecuteFilePickerState; delete m_NonExecuteFilePickerState; } - // we expect the directory in URL format - void CWinFileOpenImpl::setDisplayDirectory(const OUString& aDirectory) throw( IllegalArgumentException, uno::RuntimeException ) { @@ -135,16 +119,13 @@ void CWinFileOpenImpl::setDisplayDirectory(const OUString& aDirectory) CFileOpenDialog::setDisplayDirectory(aSysDirectory); } - // we return the directory in URL format - OUString CWinFileOpenImpl::getDisplayDirectory() throw(uno::RuntimeException) { return m_FilePickerState->getDisplayDirectory(this); } - void SAL_CALL CWinFileOpenImpl::setDefaultName(const OUString& aName) throw( IllegalArgumentException, uno::RuntimeException ) { @@ -158,24 +139,20 @@ void SAL_CALL CWinFileOpenImpl::setDefaultName(const OUString& aName) m_defaultName = aName; } - // return format: URL // if multiselection is allowed there are two different cases // 1. one file selected: the sequence contains one entry path\filename.ext // 2. multiple files selected: the sequence contains multiple entries // the first entry is the path url, all other entries are file names - uno::Sequence<OUString> SAL_CALL CWinFileOpenImpl::getFiles() throw(uno::RuntimeException) { return m_FilePickerState->getFiles(this); } - // shows the FileOpen/FileSave dialog - sal_Int16 SAL_CALL CWinFileOpenImpl::execute( ) throw(uno::RuntimeException) { sal_Int16 rc = CFileOpenDialog::doModal(); @@ -192,12 +169,10 @@ sal_Int16 SAL_CALL CWinFileOpenImpl::execute( ) throw(uno::RuntimeException) return rc; } - // appends a new filter // returns false if the title (aTitle) was already added or the title or the filter are // empty - void SAL_CALL CWinFileOpenImpl::appendFilter(const OUString& aTitle, const OUString& aFilter) throw(IllegalArgumentException, uno::RuntimeException) { @@ -219,10 +194,8 @@ void SAL_CALL CWinFileOpenImpl::appendFilter(const OUString& aTitle, const OUStr CFileOpenDialog::setFilterIndex(1); } - // sets a current filter - void SAL_CALL CWinFileOpenImpl::setCurrentFilter(const OUString& aTitle) throw( IllegalArgumentException, uno::RuntimeException) { @@ -237,10 +210,8 @@ void SAL_CALL CWinFileOpenImpl::setCurrentFilter(const OUString& aTitle) CFileOpenDialog::setFilterIndex(filterPos + 1); } - // returns the currently selected filter - OUString SAL_CALL CWinFileOpenImpl::getCurrentFilter() throw(uno::RuntimeException) { sal_uInt32 nIndex = getSelectedFilterIndex(); @@ -257,16 +228,13 @@ OUString SAL_CALL CWinFileOpenImpl::getCurrentFilter() throw(uno::RuntimeExcepti return currentFilter; } - inline void SAL_CALL CWinFileOpenImpl::appendFilterGroupSeparator() { m_filterContainer->addFilter(FILTER_SEPARATOR, ALL_FILES_WILDCARD, ALLOW_DUPLICATES); } - // XFilterGroupManager - void SAL_CALL CWinFileOpenImpl::appendFilterGroup(const OUString& sGroupTitle, const uno::Sequence<beans::StringPair>& aFilters) throw (IllegalArgumentException, uno::RuntimeException) { @@ -289,10 +257,8 @@ void SAL_CALL CWinFileOpenImpl::appendFilterGroup(const OUString& sGroupTitle, c } } - // XExtendedFilePicker - // #i90917: Due to a different feature set for the system-dependent file pickers // it's possible that generic code (e.g. sfx2) provides control ids // (see ExtendedFilePickerElementIds::LISTBOX_FILTER_SELECTOR) which are NOT @@ -313,11 +279,9 @@ void SAL_CALL CWinFileOpenImpl::setValue(sal_Int16 aControlId, sal_Int16 aContro m_FilePickerState->setValue(aControlId, aControlAction, aValue); } - // returns the value of an custom template element // we assume that there are only checkboxes or comboboxes - uno::Any SAL_CALL CWinFileOpenImpl::getValue(sal_Int16 aControlId, sal_Int16 aControlAction) throw(uno::RuntimeException) { @@ -328,10 +292,8 @@ uno::Any SAL_CALL CWinFileOpenImpl::getValue(sal_Int16 aControlId, sal_Int16 aCo return uno::Any(); } - // enables a custom template element - void SAL_CALL CWinFileOpenImpl::enableControl(sal_Int16 ControlID, sal_Bool bEnable) throw(uno::RuntimeException) { @@ -340,7 +302,6 @@ void SAL_CALL CWinFileOpenImpl::enableControl(sal_Int16 ControlID, sal_Bool bEna m_FilePickerState->enableControl(ControlID, bEnable); } - void SAL_CALL CWinFileOpenImpl::setLabel( sal_Int16 aControlId, const OUString& aLabel ) throw (uno::RuntimeException) { @@ -349,7 +310,6 @@ void SAL_CALL CWinFileOpenImpl::setLabel( sal_Int16 aControlId, const OUString& m_FilePickerState->setLabel(aControlId, aLabel); } - OUString SAL_CALL CWinFileOpenImpl::getLabel( sal_Int16 aControlId ) throw (uno::RuntimeException) { @@ -360,56 +320,48 @@ OUString SAL_CALL CWinFileOpenImpl::getLabel( sal_Int16 aControlId ) return OUString(); } - uno::Sequence<sal_Int16> SAL_CALL CWinFileOpenImpl::getSupportedImageFormats() throw (uno::RuntimeException) { return m_Preview->getSupportedImageFormats(); } - sal_Int32 SAL_CALL CWinFileOpenImpl::getTargetColorDepth() throw (uno::RuntimeException) { return m_Preview->getTargetColorDepth(); } - sal_Int32 SAL_CALL CWinFileOpenImpl::getAvailableWidth() throw (uno::RuntimeException) { return m_Preview->getAvailableWidth(); } - sal_Int32 SAL_CALL CWinFileOpenImpl::getAvailableHeight() throw (uno::RuntimeException) { return m_Preview->getAvailableHeight(); } - void SAL_CALL CWinFileOpenImpl::setImage(sal_Int16 aImageFormat, const uno::Any& aImage) throw (IllegalArgumentException, uno::RuntimeException) { m_Preview->setImage(aImageFormat,aImage); } - sal_Bool SAL_CALL CWinFileOpenImpl::setShowState(sal_Bool bShowState) throw (uno::RuntimeException) { return m_Preview->setShowState(bShowState); } - sal_Bool SAL_CALL CWinFileOpenImpl::getShowState() throw (uno::RuntimeException) { return m_Preview->getShowState(); } - void SAL_CALL CWinFileOpenImpl::cancel() { if (IsWindow(m_hwndFileOpenDlg)) @@ -425,10 +377,8 @@ void SAL_CALL CWinFileOpenImpl::cancel() } } - // returns the id of a custom template element - sal_Int16 SAL_CALL CWinFileOpenImpl::getFocused() { int nID = GetDlgCtrlID(GetFocus()); @@ -442,18 +392,15 @@ sal_Int16 SAL_CALL CWinFileOpenImpl::getFocused() return sal::static_int_cast< sal_Int16 >(nID); } - inline sal_Bool SAL_CALL CWinFileOpenImpl::IsCustomControlHelpRequested(LPHELPINFO lphi) const { return ((lphi->iCtrlId != IDOK) && (lphi->iCtrlId != IDCANCEL) && (lphi->iCtrlId < ctlFirst)); } - // our own DlgProc because we do subclass the dialog // we catch the WM_NCDESTROY message in order to erase an entry in our static map // if one instance dies - LRESULT CALLBACK CWinFileOpenImpl::SubClassFunc( HWND hWnd, UINT wMessage, WPARAM wParam, LPARAM lParam) { @@ -521,7 +468,6 @@ LRESULT CALLBACK CWinFileOpenImpl::SubClassFunc( return lResult; } - void SAL_CALL CWinFileOpenImpl::InitControlLabel(HWND hWnd) { @@ -534,7 +480,6 @@ void SAL_CALL CWinFileOpenImpl::InitControlLabel(HWND hWnd) setLabel(aCtrlId, aLabel); } - // There may be problems with the layout of our custom controls, // so that they are not aligned with the standard controls of the // FileOpen dialog. @@ -547,21 +492,18 @@ void SAL_CALL CWinFileOpenImpl::InitControlLabel(HWND hWnd) // and all push buttons will be left aligned with the standard // "OK" button - void SAL_CALL CWinFileOpenImpl::InitCustomControlContainer(HWND hCustomControl) { m_CustomControls->AddControl( CCustomControlFactory::CreateCustomControl(hCustomControl,m_hwndFileOpenDlg)); } - void SAL_CALL CWinFileOpenImpl::CacheControlState(HWND hWnd) { OSL_ASSERT(m_FilePickerState && m_NonExecuteFilePickerState); m_ExecuteFilePickerState->cacheControlState(hWnd, m_NonExecuteFilePickerState); } - BOOL CALLBACK CWinFileOpenImpl::EnumChildWndProc(HWND hWnd, LPARAM lParam) { EnumParam* enumParam = (EnumParam*)lParam; @@ -590,7 +532,6 @@ BOOL CALLBACK CWinFileOpenImpl::EnumChildWndProc(HWND hWnd, LPARAM lParam) return bRet; } - sal_uInt32 SAL_CALL CWinFileOpenImpl::onFileOk() { m_NonExecuteFilePickerState->reset(); @@ -605,7 +546,6 @@ sal_uInt32 SAL_CALL CWinFileOpenImpl::onFileOk() return 0; } - void SAL_CALL CWinFileOpenImpl::onSelChanged(HWND) { // the windows file open dialog sends an initial @@ -740,14 +680,12 @@ void SAL_CALL CWinFileOpenImpl::onInitDone() CFileOpenDialog::onInitDone(); } - void SAL_CALL CWinFileOpenImpl::onFolderChanged() { FilePickerEvent evt; m_FilePicker->directoryChanged(evt); } - void SAL_CALL CWinFileOpenImpl::onTypeChanged(sal_uInt32) { SetDefaultExtension(); @@ -757,10 +695,8 @@ void SAL_CALL CWinFileOpenImpl::onTypeChanged(sal_uInt32) m_FilePicker->controlStateChanged(evt); } - // onMessageCommand handler - sal_uInt32 SAL_CALL CWinFileOpenImpl::onCtrlCommand( HWND, sal_uInt16 ctrlId, sal_uInt16) { @@ -776,7 +712,6 @@ sal_uInt32 SAL_CALL CWinFileOpenImpl::onCtrlCommand( return 0; } - void CWinFileOpenImpl::onWMSize() { m_Preview->notifyParentSizeChanged(); @@ -784,19 +719,16 @@ void CWinFileOpenImpl::onWMSize() m_FilePicker->dialogSizeChanged(); } - void CWinFileOpenImpl::onWMShow(sal_Bool bShow) { m_Preview->notifyParentShow(bShow); } - void CWinFileOpenImpl::onWMWindowPosChanged() { m_Preview->notifyParentWindowPosChanged(); } - void CWinFileOpenImpl::onCustomControlHelpRequest(LPHELPINFO lphi) { FilePickerEvent evt; @@ -813,7 +745,6 @@ void CWinFileOpenImpl::onCustomControlHelpRequest(LPHELPINFO lphi) } } - void SAL_CALL CWinFileOpenImpl::onInitDialog(HWND hwndDlg) { // subclass the dialog window @@ -823,10 +754,8 @@ void SAL_CALL CWinFileOpenImpl::onInitDialog(HWND hwndDlg) reinterpret_cast<LONG_PTR>(SubClassFunc))); } - // processing before showing the dialog - bool SAL_CALL CWinFileOpenImpl::preModal() { CFileOpenDialog::setFilter( @@ -835,10 +764,8 @@ bool SAL_CALL CWinFileOpenImpl::preModal() return true; } - // processing after showing the dialog - void CWinFileOpenImpl::postModal(sal_Int16 nDialogResult) { CFileOpenDialog::postModal(nDialogResult); @@ -851,7 +778,6 @@ void CWinFileOpenImpl::postModal(sal_Int16 nDialogResult) m_FilePickerState = m_NonExecuteFilePickerState; } - void SAL_CALL CWinFileOpenImpl::SetDefaultExtension() { HWND hwndChkSaveWithExt = GetDlgItem(m_hwndFileOpenDlgChild, 100); @@ -898,7 +824,6 @@ void SAL_CALL CWinFileOpenImpl::SetDefaultExtension() // !!! HACK !!! } - void SAL_CALL CWinFileOpenImpl::InitialSetDefaultName() { // manually setting the file name that appears diff --git a/fpicker/source/win32/filepicker/controlaccess.cxx b/fpicker/source/win32/filepicker/controlaccess.cxx index 64ada1c5f134..451c6caad3bd 100644 --- a/fpicker/source/win32/filepicker/controlaccess.cxx +++ b/fpicker/source/win32/filepicker/controlaccess.cxx @@ -22,23 +22,15 @@ #include "controlaccess.hxx" #include "../misc/WinImplHelper.hxx" - // we are using a table based algorithm to dispatch control // actions there is one table containing one action table for // each control class and one action table per control class // which contains function pointer to control action functions - -// namespace directives - - -namespace // private +namespace { - - // table setup - CTRL_SETVALUE_FUNCTION_T CheckboxSetValueFunctionTable[] = { CheckboxSetState @@ -104,7 +96,6 @@ namespace // private { NULL, 0 } }; - CTRL_SETVALUE_FUNCTION_T SAL_CALL GetCtrlSetValueFunction( CTRL_SETVALUE_FUNCTION_T* aCtrlSetValueFunctionTable, size_t aTableSize, sal_Int16 aCtrlAction ) { @@ -116,7 +107,6 @@ namespace // private return aCtrlSetValueFunctionTable[aCtrlAction]; } - CTRL_GETVALUE_FUNCTION_T SAL_CALL GetCtrlGetValueFunction( CTRL_GETVALUE_FUNCTION_T* aCtrlGetValueFunctionTable, size_t aTableSize, sal_Int16 aCtrlAction ) { @@ -128,14 +118,12 @@ namespace // private return aCtrlGetValueFunctionTable[aCtrlAction]; } - inline _ENTRY SAL_CALL GetCtrlClassSetValueFunctionTable( CTRL_CLASS aCtrlClass ) { return CtrlClassSetValueFunctionTable[aCtrlClass]; } - inline _ENTRY SAL_CALL GetCtrlClassGetValueFunctionTable( CTRL_CLASS aCtrlClass ) { @@ -157,7 +145,6 @@ namespace // private }; // end namespace - CTRL_SETVALUE_FUNCTION_T SAL_CALL GetCtrlSetValueFunction( CTRL_CLASS aCtrlClass, sal_Int16 aCtrlAction ) { _ENTRY aEntry = @@ -169,7 +156,6 @@ CTRL_SETVALUE_FUNCTION_T SAL_CALL GetCtrlSetValueFunction( CTRL_CLASS aCtrlClass aCtrlAction ); } - CTRL_GETVALUE_FUNCTION_T SAL_CALL GetCtrlGetValueFunction( CTRL_CLASS aCtrlClass, sal_Int16 aCtrlAction ) { _ENTRY aEntry = @@ -181,7 +167,6 @@ CTRL_GETVALUE_FUNCTION_T SAL_CALL GetCtrlGetValueFunction( CTRL_CLASS aCtrlClass aCtrlAction ); } - CTRL_CLASS SAL_CALL GetCtrlClass( HWND hwndCtrl ) { CTRL_CLASS aCtrlClass = UNKNOWN; @@ -208,7 +193,6 @@ CTRL_CLASS SAL_CALL GetCtrlClass( HWND hwndCtrl ) return aCtrlClass; } - int SAL_CALL CommonFilePickerCtrlIdToWinFileOpenCtrlId( sal_Int16 aControlId ) { if ( aControlId < 0 || aControlId > SIZE_WINDOWS_FILEOPEN_CTRL_IDS ) diff --git a/fpicker/source/win32/filepicker/filepickereventnotification.cxx b/fpicker/source/win32/filepicker/filepickereventnotification.cxx index a93fa5a0ce76..04d463758725 100644 --- a/fpicker/source/win32/filepicker/filepickereventnotification.cxx +++ b/fpicker/source/win32/filepicker/filepickereventnotification.cxx @@ -20,24 +20,16 @@ #include "filepickereventnotification.hxx" #include <sal/types.h> - -// namespace directives - - using namespace com::sun::star::uno; using namespace com::sun::star::ui::dialogs; - -// A FilePicker event without -// parameter - +// A FilePicker event without parameter CFilePickerEventNotification::CFilePickerEventNotification(EventListenerMethod_t EventListenerMethod) : m_EventListenerMethod(EventListenerMethod) { } - void SAL_CALL CFilePickerEventNotification::notifyEventListener( Reference< XInterface > xListener ) { Reference<XFilePickerListener> xFilePickerListener(xListener,UNO_QUERY); @@ -45,20 +37,16 @@ void SAL_CALL CFilePickerEventNotification::notifyEventListener( Reference< XInt (xFilePickerListener.get()->*m_EventListenerMethod)(); } - // A FilePicker event with parameter - CFilePickerParamEventNotification::CFilePickerParamEventNotification(EventListenerMethod_t EventListenerMethod, const FilePickerEvent& FilePickerEvent) : m_EventListenerMethod(EventListenerMethod), m_FilePickerEvent(FilePickerEvent) { } - // A FilePicker event with parameter - void SAL_CALL CFilePickerParamEventNotification::notifyEventListener( Reference< XInterface > xListener ) { Reference<XFilePickerListener> xFilePickerListener(xListener,UNO_QUERY); diff --git a/fpicker/source/win32/folderpicker/FolderPicker.cxx b/fpicker/source/win32/folderpicker/FolderPicker.cxx index 11010296f8b9..28f4a257e7fa 100644 --- a/fpicker/source/win32/folderpicker/FolderPicker.cxx +++ b/fpicker/source/win32/folderpicker/FolderPicker.cxx @@ -23,10 +23,6 @@ #include <cppuhelper/supportsservice.hxx> #include "WinFOPImpl.hxx" - -// namespace directives - - using com::sun::star::uno::Reference; using com::sun::star::uno::RuntimeException; using com::sun::star::uno::Sequence; @@ -40,10 +36,6 @@ using namespace com::sun::star::ui::dialogs; #define FOLDERPICKER_IMPL_NAME "com.sun.star.ui.dialogs.Win32FolderPicker" - -// helper functions - - namespace { Sequence< OUString > SAL_CALL FolderPicker_getSupportedServiceNames() @@ -53,14 +45,12 @@ namespace } } - CFolderPicker::CFolderPicker( const Reference< XMultiServiceFactory >& xServiceMgr ) : m_xServiceMgr( xServiceMgr ) { m_pFolderPickerImpl = std::unique_ptr< CWinFolderPickerImpl > ( new CWinFolderPickerImpl( this ) ); } - void SAL_CALL CFolderPicker::setTitle( const OUString& aTitle ) throw( RuntimeException ) { OSL_ASSERT( m_pFolderPickerImpl.get( ) ); @@ -68,7 +58,6 @@ void SAL_CALL CFolderPicker::setTitle( const OUString& aTitle ) throw( RuntimeEx m_pFolderPickerImpl->setTitle( aTitle ); } - void SAL_CALL CFolderPicker::setDisplayDirectory( const OUString& aDirectory ) throw( IllegalArgumentException, RuntimeException ) { @@ -77,7 +66,6 @@ void SAL_CALL CFolderPicker::setDisplayDirectory( const OUString& aDirectory ) m_pFolderPickerImpl->setDisplayDirectory( aDirectory ); } - OUString SAL_CALL CFolderPicker::getDisplayDirectory( ) throw( RuntimeException ) { @@ -86,7 +74,6 @@ OUString SAL_CALL CFolderPicker::getDisplayDirectory( ) return m_pFolderPickerImpl->getDisplayDirectory( ); } - OUString SAL_CALL CFolderPicker::getDirectory( ) throw( RuntimeException ) { OSL_ASSERT( m_pFolderPickerImpl.get( ) ); @@ -94,7 +81,6 @@ OUString SAL_CALL CFolderPicker::getDirectory( ) throw( RuntimeException ) return m_pFolderPickerImpl->getDirectory( ); } - void SAL_CALL CFolderPicker::setDescription( const OUString& aDescription ) throw( RuntimeException ) { OSL_ASSERT( m_pFolderPickerImpl.get( ) ); @@ -102,7 +88,6 @@ void SAL_CALL CFolderPicker::setDescription( const OUString& aDescription ) thro m_pFolderPickerImpl->setDescription( aDescription ); } - sal_Int16 SAL_CALL CFolderPicker::execute( ) throw( RuntimeException ) { @@ -115,37 +100,28 @@ sal_Int16 SAL_CALL CFolderPicker::execute( ) return m_pFolderPickerImpl->execute( ); } - // XServiceInfo - OUString SAL_CALL CFolderPicker::getImplementationName( ) throw( RuntimeException ) { return OUString( FOLDERPICKER_IMPL_NAME ); } -// XServiceInfo sal_Bool SAL_CALL CFolderPicker::supportsService( const OUString& ServiceName ) throw( RuntimeException ) { return cppu::supportsService(this, ServiceName); } - -// XServiceInfo - - Sequence< OUString > SAL_CALL CFolderPicker::getSupportedServiceNames( ) throw( RuntimeException ) { return FolderPicker_getSupportedServiceNames(); } - // XCancellable - void SAL_CALL CFolderPicker::cancel( ) throw(RuntimeException) { @@ -154,11 +130,9 @@ void SAL_CALL CFolderPicker::cancel( ) m_pFolderPickerImpl->cancel( ); } - // overwrite base class method, which is called // by base class dispose function - void SAL_CALL CFolderPicker::disposing() { } diff --git a/fpicker/source/win32/folderpicker/WinFOPImpl.cxx b/fpicker/source/win32/folderpicker/WinFOPImpl.cxx index 9c6d100135af..c5dd9b5ab6d5 100644 --- a/fpicker/source/win32/folderpicker/WinFOPImpl.cxx +++ b/fpicker/source/win32/folderpicker/WinFOPImpl.cxx @@ -25,23 +25,14 @@ #include <osl/file.hxx> #include "FolderPicker.hxx" - -// namespace directives - - using com::sun::star::uno::RuntimeException; using com::sun::star::lang::IllegalArgumentException; using namespace com::sun::star::ui::dialogs; using osl::FileBase; - const OUString BACKSLASH( "\\" ); - -// ctor - - CWinFolderPickerImpl::CWinFolderPickerImpl( CFolderPicker* aFolderPicker ) : CMtaFolderPicker( BIF_RETURNONLYFSDIRS | BIF_RETURNFSANCESTORS | BIF_EDITBOX | BIF_VALIDATE ), m_pFolderPicker( aFolderPicker ), @@ -49,7 +40,6 @@ CWinFolderPickerImpl::CWinFolderPickerImpl( CFolderPicker* aFolderPicker ) : { } - // get directory in URL format, convert it to system format and set the // member variable // If the given URL for the directory is invalid the function throws an @@ -57,7 +47,6 @@ CWinFolderPickerImpl::CWinFolderPickerImpl( CFolderPicker* aFolderPicker ) : // If the specified path is well formed but invalid for the underlying // OS the FolderPicker starts in the root of the file system hierarchy - void SAL_CALL CWinFolderPickerImpl::setDisplayDirectory( const OUString& aDirectory ) throw( IllegalArgumentException, RuntimeException ) { @@ -90,10 +79,8 @@ void SAL_CALL CWinFolderPickerImpl::setDisplayDirectory( const OUString& aDirect CMtaFolderPicker::setDisplayDirectory( sysDir ); } - // we return the directory in URL format - OUString CWinFolderPickerImpl::getDisplayDirectory( ) throw( RuntimeException ) { @@ -107,7 +94,6 @@ OUString CWinFolderPickerImpl::getDisplayDirectory( ) return displayDirectoryURL; } - OUString SAL_CALL CWinFolderPickerImpl::getDirectory( ) throw( RuntimeException ) { OUString sysDir = CMtaFolderPicker::getDirectory( ); @@ -119,7 +105,6 @@ OUString SAL_CALL CWinFolderPickerImpl::getDirectory( ) throw( RuntimeException return dirURL; } - sal_Int16 SAL_CALL CWinFolderPickerImpl::execute( ) throw( RuntimeException ) { return m_nLastDlgResult = CMtaFolderPicker::browseForFolder( ) ? @@ -127,7 +112,6 @@ sal_Int16 SAL_CALL CWinFolderPickerImpl::execute( ) throw( RuntimeException ) css::ui::dialogs::ExecutableDialogResults::CANCEL; } - void CWinFolderPickerImpl::onSelChanged( const OUString& aNewPath ) { setStatusText( aNewPath ); diff --git a/fpicker/source/win32/misc/WinImplHelper.cxx b/fpicker/source/win32/misc/WinImplHelper.cxx index 785e755ba9e0..2f06476b573f 100644 --- a/fpicker/source/win32/misc/WinImplHelper.cxx +++ b/fpicker/source/win32/misc/WinImplHelper.cxx @@ -28,22 +28,17 @@ #include <VersionHelpers.h> #endif -// namespace directives - - using ::com::sun::star::lang::IllegalArgumentException; using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::XInterface; using ::com::sun::star::uno::Any; using ::com::sun::star::uno::Sequence; - const OUString TILDE( "~" ); const sal_Unicode TILDE_SIGN = L'~'; const OUString AMPERSAND( "&" ); const sal_Unicode AMPERSAND_SIGN = L'&'; - // OS NAME Platform Major Minor // Windows NT 3.51 VER_PLATFORM_WIN32_NT 3 51 @@ -59,7 +54,6 @@ const sal_Unicode AMPERSAND_SIGN = L'&'; // determine if we are running under Vista or newer OS - bool SAL_CALL IsWindowsVistaOrNewer() { // the Win32 SDK 8.1 deprecates GetVersionEx() @@ -83,7 +77,6 @@ bool SAL_CALL IsWindowsVistaOrNewer() #endif } - void SAL_CALL ListboxAddString( HWND hwnd, const OUString& aString ) { LRESULT rc = SendMessageW( @@ -92,7 +85,6 @@ void SAL_CALL ListboxAddString( HWND hwnd, const OUString& aString ) OSL_ASSERT( (CB_ERR != rc) && (CB_ERRSPACE != rc) ); } - OUString SAL_CALL ListboxGetString( HWND hwnd, sal_Int32 aPosition ) { OSL_ASSERT( IsWindow( hwnd ) ); @@ -124,7 +116,6 @@ OUString SAL_CALL ListboxGetString( HWND hwnd, sal_Int32 aPosition ) return aString; } - void SAL_CALL ListboxAddItem( HWND hwnd, const Any& aItem, const Reference< XInterface >& rXInterface, sal_Int16 aArgPos ) throw( IllegalArgumentException ) { @@ -143,7 +134,6 @@ void SAL_CALL ListboxAddItem( HWND hwnd, const Any& aItem, const Reference< XInt ListboxAddString( hwnd, cbItem ); } - void SAL_CALL ListboxAddItems( HWND hwnd, const Any& aItemList, const Reference< XInterface >& rXInterface, sal_Int16 aArgPos ) throw( IllegalArgumentException ) { @@ -166,7 +156,6 @@ void SAL_CALL ListboxAddItems( HWND hwnd, const Any& aItemList, const Reference< } } - void SAL_CALL ListboxDeleteItem( HWND hwnd, const Any& aPosition, const Reference< XInterface >& rXInterface, sal_Int16 aArgPos ) throw( IllegalArgumentException ) { @@ -195,7 +184,6 @@ void SAL_CALL ListboxDeleteItem( HWND hwnd, const Any& aPosition, const Referenc aArgPos ); } - void SAL_CALL ListboxDeleteItems( HWND hwnd, const Any&, const Reference< XInterface >&, sal_Int16 ) throw( IllegalArgumentException ) { @@ -212,7 +200,6 @@ void SAL_CALL ListboxDeleteItems( HWND hwnd, const Any&, const Reference< XInter while ( (lRet != CB_ERR) && (lRet > 0) ); } - void SAL_CALL ListboxSetSelectedItem( HWND hwnd, const Any& aPosition, const Reference< XInterface >& rXInterface, sal_Int16 aArgPos ) throw( IllegalArgumentException ) { @@ -245,7 +232,6 @@ void SAL_CALL ListboxSetSelectedItem( HWND hwnd, const Any& aPosition, const Ref aArgPos ); } - Any SAL_CALL ListboxGetItems( HWND hwnd ) { OSL_ASSERT( IsWindow( hwnd ) ); @@ -267,7 +253,6 @@ Any SAL_CALL ListboxGetItems( HWND hwnd ) return Any(aItemList); } - Any SAL_CALL ListboxGetSelectedItem( HWND hwnd ) { OSL_ASSERT( IsWindow( hwnd ) ); @@ -277,7 +262,6 @@ Any SAL_CALL ListboxGetSelectedItem( HWND hwnd ) return Any( ListboxGetString( hwnd, idxItem ) ); } - Any SAL_CALL ListboxGetSelectedItemIndex( HWND hwnd ) { OSL_ASSERT( IsWindow( hwnd ) ); @@ -287,7 +271,6 @@ Any SAL_CALL ListboxGetSelectedItemIndex( HWND hwnd ) return Any( static_cast< sal_Int32 >( idxItem ) ); } - Any SAL_CALL CheckboxGetState( HWND hwnd ) { OSL_ASSERT( IsWindow( hwnd ) ); @@ -297,7 +280,6 @@ Any SAL_CALL CheckboxGetState( HWND hwnd ) return Any(bChkState); } - void SAL_CALL CheckboxSetState( HWND hwnd, const css::uno::Any& aState, const Reference< XInterface >& rXInterface, sal_Int16 aArgPos ) throw( IllegalArgumentException ) @@ -316,7 +298,6 @@ void SAL_CALL CheckboxSetState( SendMessageW( hwnd, BM_SETCHECK, wParam, 0 ); } - sal_uInt32 SAL_CALL _wcslenex( const sal_Unicode* pStr ) { if ( !pStr ) @@ -333,7 +314,6 @@ sal_uInt32 SAL_CALL _wcslenex( const sal_Unicode* pStr ) return strLen; } - void Replace( const OUString& aLabel, sal_Unicode OldChar, sal_Unicode NewChar, OUStringBuffer& aBuffer ) { OSL_ASSERT( aLabel.getLength( ) ); @@ -388,7 +368,6 @@ void Replace( const OUString& aLabel, sal_Unicode OldChar, sal_Unicode NewChar, } } - // converts a soffice label to a windows label // the following rules for character replacements // will be done: @@ -396,7 +375,6 @@ void Replace( const OUString& aLabel, sal_Unicode OldChar, sal_Unicode NewChar, // '~~' -> '~' // '&' -> '&&' - OUString SOfficeToWindowsLabel( const OUString& aSOLabel ) { OUString aWinLabel = aSOLabel; @@ -419,7 +397,6 @@ OUString SOfficeToWindowsLabel( const OUString& aSOLabel ) return aWinLabel; } - // converts a windows label to a soffice label // the following rules for character replacements // will be done: @@ -427,7 +404,6 @@ OUString SOfficeToWindowsLabel( const OUString& aSOLabel ) // '&&' -> '&' // '~' -> '~~' - OUString WindowsToSOfficeLabel( const OUString& aWinLabel ) { OUString aSOLabel = aWinLabel; diff --git a/fpicker/source/win32/misc/resourceprovider.cxx b/fpicker/source/win32/misc/resourceprovider.cxx index 55abde0239e6..25778aac84cf 100644 --- a/fpicker/source/win32/misc/resourceprovider.cxx +++ b/fpicker/source/win32/misc/resourceprovider.cxx @@ -29,21 +29,14 @@ #include <com/sun/star/ui/dialogs/CommonFilePickerElementIds.hpp> #include <com/sun/star/ui/dialogs/ExtendedFilePickerElementIds.hpp> - -// namespace directives - - using namespace ::com::sun::star::ui::dialogs::ExtendedFilePickerElementIds; using namespace ::com::sun::star::ui::dialogs::CommonFilePickerElementIds; - #define FOLDERPICKER_TITLE 500 #define FOLDER_PICKER_DEF_DESCRIPTION 501 - // we have to translate control ids to resource ids - struct _Entry { sal_Int32 ctrlId; @@ -68,7 +61,6 @@ _Entry CtrlIdToResIdTable[] = { const sal_Int32 SIZE_TABLE = SAL_N_ELEMENTS( CtrlIdToResIdTable ); - sal_Int16 CtrlIdToResId( sal_Int32 aControlId ) { sal_Int16 aResId = -1; @@ -85,7 +77,6 @@ sal_Int16 CtrlIdToResId( sal_Int32 aControlId ) return aResId; } - class CResourceProvider_Impl { public: @@ -130,19 +121,16 @@ public: SimpleResMgr* m_ResMgr; }; - CResourceProvider::CResourceProvider( ) : m_pImpl( new CResourceProvider_Impl() ) { } - CResourceProvider::~CResourceProvider( ) { delete m_pImpl; } - OUString CResourceProvider::getResString( sal_Int16 aId ) { return m_pImpl->getResString( aId ); diff --git a/sal/workben/clipboardwben/testcopy/XTDataObject.cxx b/sal/workben/clipboardwben/testcopy/XTDataObject.cxx index bd42b0194464..9a5ea91424f0 100644 --- a/sal/workben/clipboardwben/testcopy/XTDataObject.cxx +++ b/sal/workben/clipboardwben/testcopy/XTDataObject.cxx @@ -24,19 +24,13 @@ #include <windows.h> #include <ole2.h> -// namespace directives - // OTWrapperDataObject -// ctor - CXTDataObject::CXTDataObject( LONG nRefCntInitVal ) : m_nRefCnt( nRefCntInitVal ) { } -// dtor - CXTDataObject::~CXTDataObject( ) { } @@ -241,8 +235,6 @@ CXTDataObject::operator IDataObject*( ) // CEnumFormatEtc -// ctor - CEnumFormatEtc::CEnumFormatEtc( LPUNKNOWN pUnkDataObj ) : m_nRefCnt( 0 ), m_pUnkDataObj( pUnkDataObj ), @@ -252,8 +244,6 @@ CEnumFormatEtc::CEnumFormatEtc( LPUNKNOWN pUnkDataObj ) : m_cfFormats[1] = CF_TEXT; } -// dtor - CEnumFormatEtc::~CEnumFormatEtc( ) { } diff --git a/shell/source/backends/macbe/macbackend.mm b/shell/source/backends/macbe/macbackend.mm index 458446f7dee4..8f4e0883e591 100644 --- a/shell/source/backends/macbe/macbackend.mm +++ b/shell/source/backends/macbe/macbackend.mm @@ -50,10 +50,7 @@ typedef enum { } ServiceType; -// helper functions - - -namespace // private +namespace { /* @@ -149,29 +146,21 @@ bool GetProxySetting(ServiceType sType, char *host, size_t hostSize, UInt16 *por return result; } -} // end private namespace - - +} // unnamed namespace MacOSXBackend::MacOSXBackend() { } - - MacOSXBackend::~MacOSXBackend(void) { } - - MacOSXBackend* MacOSXBackend::createInstance() { return new MacOSXBackend; } - - rtl::OUString CFStringToOUString(const CFStringRef sOrig) { CFRetain(sOrig); @@ -435,15 +424,11 @@ css::uno::Any MacOSXBackend::getPropertyValue( } } - - rtl::OUString SAL_CALL MacOSXBackend::getBackendName(void) { return rtl::OUString("com.sun.star.comp.configuration.backend.MacOSXBackend"); } - - rtl::OUString SAL_CALL MacOSXBackend::getImplementationName(void) throw (uno::RuntimeException, std::exception) { diff --git a/shell/source/backends/wininetbe/wininetbackend.cxx b/shell/source/backends/wininetbe/wininetbackend.cxx index 8ba2d95867b6..1a9f9989986b 100644 --- a/shell/source/backends/wininetbe/wininetbackend.cxx +++ b/shell/source/backends/wininetbe/wininetbackend.cxx @@ -57,10 +57,7 @@ typedef struct } ProxyEntry; -// helper functions - - -namespace // private +namespace { ProxyEntry ReadProxyEntry(const OUString& aProxy, sal_Int32& i) { @@ -98,8 +95,7 @@ namespace // private return ProxyEntry(); } -} // end private namespace - +} // unnamed namespace WinInetBackend::WinInetBackend() { @@ -295,18 +291,15 @@ WinInetBackend::WinInetBackend() } } - WinInetBackend::~WinInetBackend() { } - WinInetBackend* WinInetBackend::createInstance() { return new WinInetBackend; } - void WinInetBackend::setPropertyValue( OUString const &, css::uno::Any const &) throw ( @@ -356,12 +349,10 @@ css::uno::Any WinInetBackend::getPropertyValue( } } - OUString SAL_CALL WinInetBackend::getBackendName() { return OUString("com.sun.star.comp.configuration.backend.WinInetBackend") ; } - OUString SAL_CALL WinInetBackend::getImplementationName() throw (uno::RuntimeException) { diff --git a/shell/source/cmdmail/cmdmailentry.cxx b/shell/source/cmdmail/cmdmailentry.cxx index d53347e056cc..006b3cf92c63 100644 --- a/shell/source/cmdmail/cmdmailentry.cxx +++ b/shell/source/cmdmail/cmdmailentry.cxx @@ -22,21 +22,16 @@ #include <osl/diagnose.h> #include "cmdmailsuppl.hxx" - -// namespace directives - - -using namespace ::com::sun::star::uno ; -using namespace ::com::sun::star::container ; -using namespace ::com::sun::star::lang ; -using namespace ::com::sun::star::registry ; -using namespace ::cppu ; +using namespace ::com::sun::star::uno; +using namespace ::com::sun::star::container; +using namespace ::com::sun::star::lang; +using namespace ::com::sun::star::registry; +using namespace ::cppu; using com::sun::star::system::XSimpleMailClientSupplier; #define COMP_SERVICE_NAME "com.sun.star.system.SimpleCommandMail" #define COMP_IMPL_NAME "com.sun.star.comp.system.SimpleCommandMail" - namespace { Reference< XInterface > SAL_CALL createInstance( const Reference< XComponentContext >& xContext ) @@ -48,9 +43,6 @@ namespace extern "C" { -// component_getFactory - - SAL_DLLPUBLIC_EXPORT void* SAL_CALL cmdmail_component_getFactory( const sal_Char* pImplName, SAL_UNUSED_PARAMETER void* /*pSrvManager*/, diff --git a/shell/source/cmdmail/cmdmailsuppl.cxx b/shell/source/cmdmail/cmdmailsuppl.cxx index 919516f6ba1c..621da5f290e2 100644 --- a/shell/source/cmdmail/cmdmailsuppl.cxx +++ b/shell/source/cmdmail/cmdmailsuppl.cxx @@ -40,10 +40,6 @@ #include <errno.h> #include <unistd.h> - -// namespace directives - - using com::sun::star::beans::PropertyValue; using com::sun::star::system::XSimpleMailClientSupplier; using com::sun::star::system::XSimpleMailClient; @@ -58,7 +54,7 @@ using namespace com::sun::star::uno; using namespace com::sun::star::lang; using namespace com::sun::star::configuration; -namespace // private +namespace { Sequence< OUString > SAL_CALL Component_getSupportedServiceNames() { @@ -66,8 +62,7 @@ namespace // private return aRet; } -} // end private namespace - +} CmdMailSuppl::CmdMailSuppl( const Reference< XComponentContext >& xContext ) : WeakImplHelper< XSimpleMailClientSupplier, XSimpleMailClient, XServiceInfo >() @@ -75,30 +70,22 @@ CmdMailSuppl::CmdMailSuppl( const Reference< XComponentContext >& xContext ) : m_xConfigurationProvider = theDefaultProvider::get(xContext); } - // XSimpleMailClientSupplier - Reference< XSimpleMailClient > SAL_CALL CmdMailSuppl::querySimpleMailClient( ) throw (RuntimeException, std::exception) { return static_cast < XSimpleMailClient * > (this); } - // XSimpleMailClient - Reference< XSimpleMailMessage > SAL_CALL CmdMailSuppl::createSimpleMailMessage( ) throw (css::uno::RuntimeException, std::exception) { return Reference< XSimpleMailMessage >( new CmdMailMsg( ) ); } - -// XSimpleMailClient - - namespace { void appendShellWord(OStringBuffer & buffer, OUString const & word, bool strict) @@ -300,20 +287,19 @@ void SAL_CALL CmdMailSuppl::sendSimpleMailMessage( const Reference< XSimpleMailM } // XServiceInfo + OUString SAL_CALL CmdMailSuppl::getImplementationName( ) throw( RuntimeException, std::exception ) { return OUString("com.sun.star.comp.system.SimpleCommandMail"); } -// XServiceInfo sal_Bool SAL_CALL CmdMailSuppl::supportsService( const OUString& ServiceName ) throw( RuntimeException, std::exception ) { return cppu::supportsService(this, ServiceName); } -// XServiceInfo Sequence< OUString > SAL_CALL CmdMailSuppl::getSupportedServiceNames( ) throw( RuntimeException, std::exception ) { diff --git a/shell/source/unix/exec/shellexec.cxx b/shell/source/unix/exec/shellexec.cxx index 7f12a80b76ef..71f01e764a56 100644 --- a/shell/source/unix/exec/shellexec.cxx +++ b/shell/source/unix/exec/shellexec.cxx @@ -42,20 +42,15 @@ #include <errno.h> #include <unistd.h> - -// namespace directives - - using com::sun::star::system::XSystemShellExecute; using com::sun::star::system::SystemShellExecuteException; - using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::system::SystemShellExecuteFlags; using namespace cppu; -namespace // private +namespace { Sequence< OUString > SAL_CALL ShellExec_getSupportedServiceNames() { @@ -78,7 +73,6 @@ void escapeForShell( OStringBuffer & rBuffer, const OString & rURL) } } - ShellExec::ShellExec( const Reference< XComponentContext >& xContext ) : WeakImplHelper< XSystemShellExecute, XServiceInfo >(), m_xContext(xContext) @@ -100,7 +94,6 @@ ShellExec::ShellExec( const Reference< XComponentContext >& xContext ) : } } - void SAL_CALL ShellExec::execute( const OUString& aCommand, const OUString& aParameter, sal_Int32 nFlags ) throw (IllegalArgumentException, SystemShellExecuteException, RuntimeException, std::exception) { @@ -217,20 +210,19 @@ void SAL_CALL ShellExec::execute( const OUString& aCommand, const OUString& aPar } // XServiceInfo + OUString SAL_CALL ShellExec::getImplementationName( ) throw( RuntimeException, std::exception ) { return OUString("com.sun.star.comp.system.SystemShellExecute"); } -// XServiceInfo sal_Bool SAL_CALL ShellExec::supportsService( const OUString& ServiceName ) throw( RuntimeException, std::exception ) { return cppu::supportsService(this, ServiceName); } -// XServiceInfo Sequence< OUString > SAL_CALL ShellExec::getSupportedServiceNames( ) throw( RuntimeException, std::exception ) { diff --git a/shell/source/unix/exec/shellexecentry.cxx b/shell/source/unix/exec/shellexecentry.cxx index 5c1fc4f49c36..2478f8c17808 100644 --- a/shell/source/unix/exec/shellexecentry.cxx +++ b/shell/source/unix/exec/shellexecentry.cxx @@ -21,10 +21,6 @@ #include <osl/diagnose.h> #include "shellexec.hxx" - -// namespace directives - - using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::registry; @@ -34,7 +30,6 @@ using com::sun::star::system::XSystemShellExecute; #define SHELLEXEC_SERVICE_NAME "com.sun.star.system.SystemShellExecute" #define SHELLEXEC_IMPL_NAME "com.sun.star.comp.system.SystemShellExecute" - namespace { Reference< XInterface > SAL_CALL createInstance(const Reference< XComponentContext >& xContext) @@ -46,9 +41,6 @@ namespace extern "C" { -// component_getFactory - - SAL_DLLPUBLIC_EXPORT void* SAL_CALL syssh_component_getFactory( const sal_Char* pImplName, SAL_UNUSED_PARAMETER void* /*pSrvManager*/, diff --git a/shell/source/win32/SysShExec.cxx b/shell/source/win32/SysShExec.cxx index 55cbb90a5782..fe6a82620369 100644 --- a/shell/source/win32/SysShExec.cxx +++ b/shell/source/win32/SysShExec.cxx @@ -39,10 +39,6 @@ #pragma warning(pop) #endif - -// namespace directives - - using com::sun::star::uno::Reference; using com::sun::star::uno::RuntimeException; using com::sun::star::uno::Sequence; @@ -56,11 +52,7 @@ using namespace cppu; #define SYSSHEXEC_IMPL_NAME "com.sun.star.sys.shell.SystemShellExecute" - -// helper functions - - -namespace // private +namespace { Sequence< OUString > SAL_CALL SysShExec_getSupportedServiceNames() { @@ -234,8 +226,7 @@ namespace // private } } -} // end namespace - +} CSysShExec::CSysShExec( const Reference< css::uno::XComponentContext >& xContext ) : WeakComponentImplHelper< XSystemShellExecute, XServiceInfo >( m_aMutex ), @@ -252,7 +243,6 @@ CSysShExec::CSysShExec( const Reference< css::uno::XComponentContext >& xContext CoInitialize( NULL ); } - void SAL_CALL CSysShExec::execute( const OUString& aCommand, const OUString& aParameter, sal_Int32 nFlags ) throw (IllegalArgumentException, SystemShellExecuteException, RuntimeException) { @@ -336,20 +326,19 @@ void SAL_CALL CSysShExec::execute( const OUString& aCommand, const OUString& aPa } // XServiceInfo + OUString SAL_CALL CSysShExec::getImplementationName( ) throw( RuntimeException ) { return OUString(SYSSHEXEC_IMPL_NAME ); } -// XServiceInfo sal_Bool SAL_CALL CSysShExec::supportsService( const OUString& ServiceName ) throw( RuntimeException ) { return cppu::supportsService(this, ServiceName); } -// XServiceInfo Sequence< OUString > SAL_CALL CSysShExec::getSupportedServiceNames( ) throw( RuntimeException ) { diff --git a/shell/source/win32/SysShentry.cxx b/shell/source/win32/SysShentry.cxx index 0f2d91332872..fd37cef26a16 100644 --- a/shell/source/win32/SysShentry.cxx +++ b/shell/source/win32/SysShentry.cxx @@ -22,21 +22,16 @@ #include <osl/diagnose.h> #include "SysShExec.hxx" - -// namespace directives - - -using namespace ::com::sun::star::uno ; -using namespace ::com::sun::star::container ; -using namespace ::com::sun::star::lang ; -using namespace ::com::sun::star::registry ; -using namespace ::cppu ; +using namespace ::com::sun::star::uno; +using namespace ::com::sun::star::container; +using namespace ::com::sun::star::lang; +using namespace ::com::sun::star::registry; +using namespace ::cppu; using com::sun::star::system::XSystemShellExecute; #define SYSSHEXEC_SERVICE_NAME "com.sun.star.system.SystemShellExecute" #define SYSSHEXEC_IMPL_NAME "com.sun.star.sys.shell.SystemShellExecute" - namespace { Reference< XInterface > SAL_CALL createInstance( const Reference< XComponentContext >& xContext ) @@ -48,10 +43,6 @@ namespace extern "C" { -// component_getFactory -// returns a factory to create XFilePicker-Services - - SAL_DLLPUBLIC_EXPORT void* SAL_CALL syssh_component_getFactory( const sal_Char* pImplName, void*, void* /*pRegistryKey*/ ) { diff --git a/shell/source/win32/simplemail/smplmailentry.cxx b/shell/source/win32/simplemail/smplmailentry.cxx index bf797489f54b..f40cda9d1fff 100644 --- a/shell/source/win32/simplemail/smplmailentry.cxx +++ b/shell/source/win32/simplemail/smplmailentry.cxx @@ -22,21 +22,16 @@ #include <osl/diagnose.h> #include "smplmailsuppl.hxx" - -// namespace directives - - -using namespace ::com::sun::star::uno ; -using namespace ::com::sun::star::container ; -using namespace ::com::sun::star::lang ; -using namespace ::com::sun::star::registry ; -using namespace ::cppu ; +using namespace ::com::sun::star::uno; +using namespace ::com::sun::star::container; +using namespace ::com::sun::star::lang; +using namespace ::com::sun::star::registry; +using namespace ::cppu; using com::sun::star::system::XSimpleMailClientSupplier; #define COMP_SERVICE_NAME "com.sun.star.system.SimpleSystemMail" #define COMP_IMPL_NAME "com.sun.star.sys.shell.SimpleSystemMail" - namespace { Reference< XInterface > SAL_CALL createInstance( const Reference< XMultiServiceFactory >& ) @@ -48,10 +43,6 @@ namespace extern "C" { -// component_getFactory -// returns a factory to create XFilePicker-Services - - SAL_DLLPUBLIC_EXPORT void* SAL_CALL smplmail_component_getFactory( const sal_Char* pImplName, void* pSrvManager, void* /*pRegistryKey*/ ) { diff --git a/shell/source/win32/simplemail/smplmailmsg.cxx b/shell/source/win32/simplemail/smplmailmsg.cxx index 31e837701bba..5d6d46e5390b 100644 --- a/shell/source/win32/simplemail/smplmailmsg.cxx +++ b/shell/source/win32/simplemail/smplmailmsg.cxx @@ -22,20 +22,12 @@ #include <osl/file.h> #include "smplmailmsg.hxx" - -// namespace directives - - using com::sun::star::uno::RuntimeException; using com::sun::star::uno::Sequence; using com::sun::star::lang::IllegalArgumentException; using namespace cppu; - -// helper functions - - CSmplMailMsg::CSmplMailMsg( ) { } @@ -52,84 +44,72 @@ void SAL_CALL CSmplMailMsg::setBody( const ::rtl::OUString& aBody ) return m_aBody; } - void SAL_CALL CSmplMailMsg::setRecipient( const OUString& aRecipient ) throw (RuntimeException) { m_aRecipient = aRecipient; } - OUString SAL_CALL CSmplMailMsg::getRecipient( ) throw (RuntimeException) { return m_aRecipient; } - void SAL_CALL CSmplMailMsg::setCcRecipient( const Sequence< OUString >& aCcRecipient ) throw (RuntimeException) { m_CcRecipients = aCcRecipient; } - Sequence< OUString > SAL_CALL CSmplMailMsg::getCcRecipient( ) throw (RuntimeException) { return m_CcRecipients; } - void SAL_CALL CSmplMailMsg::setBccRecipient( const Sequence< OUString >& aBccRecipient ) throw (RuntimeException) { m_BccRecipients = aBccRecipient; } - Sequence< OUString > SAL_CALL CSmplMailMsg::getBccRecipient( ) throw (RuntimeException) { return m_BccRecipients; } - void SAL_CALL CSmplMailMsg::setOriginator( const OUString& aOriginator ) throw (RuntimeException) { m_aOriginator = aOriginator; } - OUString SAL_CALL CSmplMailMsg::getOriginator( ) throw (RuntimeException) { return m_aOriginator; } - void SAL_CALL CSmplMailMsg::setSubject( const OUString& aSubject ) throw (RuntimeException) { m_aSubject = aSubject; } - OUString SAL_CALL CSmplMailMsg::getSubject( ) throw (RuntimeException) { return m_aSubject; } - void SAL_CALL CSmplMailMsg::setAttachement( const Sequence< OUString >& aAttachement ) throw (IllegalArgumentException, RuntimeException) { m_Attachements = aAttachement; } - Sequence< OUString > SAL_CALL CSmplMailMsg::getAttachement( ) throw (RuntimeException) { diff --git a/shell/source/win32/simplemail/smplmailsuppl.cxx b/shell/source/win32/simplemail/smplmailsuppl.cxx index 82610e8f854d..4976f325c5a5 100644 --- a/shell/source/win32/simplemail/smplmailsuppl.cxx +++ b/shell/source/win32/simplemail/smplmailsuppl.cxx @@ -33,7 +33,7 @@ using namespace cppu; #define COMP_IMPL_NAME "com.sun.star.sys.shell.SimpleSystemMail" -namespace // private +namespace { Sequence< OUString > SAL_CALL Component_getSupportedServiceNames() { @@ -41,7 +41,7 @@ namespace // private return aRet; } -} // end private namespace +} CSmplMailSuppl::CSmplMailSuppl() : WeakComponentImplHelper<XSimpleMailClientSupplier, XServiceInfo>(m_aMutex) diff --git a/vcl/osx/DataFlavorMapping.cxx b/vcl/osx/DataFlavorMapping.cxx index 694ad4cd8738..45a3cc507ebd 100644 --- a/vcl/osx/DataFlavorMapping.cxx +++ b/vcl/osx/DataFlavorMapping.cxx @@ -44,7 +44,7 @@ using namespace com::sun::star::lang; using namespace cppu; using namespace std; -namespace // private +namespace { /* Determine whether or not a DataFlavor is valid. */ @@ -139,7 +139,7 @@ namespace // private return (theType == cppu::UnoType<OUString>::get() ); } -} // namespace private +} // unnamed namespace /* A base class for other data provider. */ diff --git a/vcl/osx/HtmlFmtFlt.cxx b/vcl/osx/HtmlFmtFlt.cxx index 301d9d1b6148..9804dbd32e1f 100644 --- a/vcl/osx/HtmlFmtFlt.cxx +++ b/vcl/osx/HtmlFmtFlt.cxx @@ -53,7 +53,7 @@ using namespace com::sun::star::uno; // <!--StartFragment--> and <!--EndFragment--> (no space between !-- and the // text -namespace // private +namespace { std::string GetHtmlFormatHeader(size_t startHtml, size_t endHtml, size_t startFragment, size_t endFragment) { @@ -66,7 +66,7 @@ std::string GetHtmlFormatHeader(size_t startHtml, size_t endHtml, size_t startFr return htmlHeader.str(); } -} // namespace private +} // the office always writes the start and end html tag in upper cases and // without spaces both tags don't allow parameters diff --git a/vcl/osx/OSXTransferable.cxx b/vcl/osx/OSXTransferable.cxx index 4ac5f6f83381..622b2e47396e 100644 --- a/vcl/osx/OSXTransferable.cxx +++ b/vcl/osx/OSXTransferable.cxx @@ -33,7 +33,7 @@ using namespace com::sun::star::io; using namespace com::sun::star::lang; using namespace com::sun::star::container; -namespace // private +namespace { bool isValidFlavor( const DataFlavor& aFlavor ) { @@ -76,7 +76,7 @@ bool cmpAllContentTypeParameter(const Reference<XMimeContentType> & xLhs, return true; } -} // namespace private +} // unnamed namespace OSXTransferable::OSXTransferable(const Reference<XMimeContentTypeFactory> & rXMimeCntFactory, DataFlavorMapperPtr_t pDataFlavorMapper, diff --git a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx index 1f4f4dccdc48..543195fcc3c8 100644 --- a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx +++ b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx @@ -50,8 +50,6 @@ #include "gtk/fpicker/SalGtkFilePicker.hxx" -// namespace directives - using namespace ::com::sun::star; using namespace ::com::sun::star::ui::dialogs; using namespace ::com::sun::star::ui::dialogs::TemplateDescription; |