diff options
Diffstat (limited to 'extensions')
506 files changed, 7789 insertions, 7790 deletions
diff --git a/extensions/inc/abpilot.hrc b/extensions/inc/abpilot.hrc index ad2c4b1115c2..aea77a3f3b9b 100644 --- a/extensions/inc/abpilot.hrc +++ b/extensions/inc/abpilot.hrc @@ -1,6 +1,6 @@ /************************************************************************* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/inc/appsettings.hxx b/extensions/inc/appsettings.hxx index 8622db0bd77e..78f38ffb4fe5 100644 --- a/extensions/inc/appsettings.hxx +++ b/extensions/inc/appsettings.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/inc/bibliography.hrc b/extensions/inc/bibliography.hrc index c67060e18edf..90372fc0b564 100644 --- a/extensions/inc/bibliography.hrc +++ b/extensions/inc/bibliography.hrc @@ -1,6 +1,6 @@ /************************************************************************* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/inc/dbpilots.hrc b/extensions/inc/dbpilots.hrc index 46ee01805938..38a47138c875 100644 --- a/extensions/inc/dbpilots.hrc +++ b/extensions/inc/dbpilots.hrc @@ -1,6 +1,6 @@ /************************************************************************* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -41,10 +41,10 @@ #define HID_LISTWIZARD_NEXT ( HID_DBP_START + 9) #define HID_LISTWIZARD_CANCEL ( HID_DBP_START + 10) #define HID_LISTWIZARD_FINISH ( HID_DBP_START + 11) -#define HID_GRIDWIZARD_PREVIOUS ( HID_DBP_START + 12) -#define HID_GRIDWIZARD_NEXT ( HID_DBP_START + 13) -#define HID_GRIDWIZARD_CANCEL ( HID_DBP_START + 14) -#define HID_GRIDWIZARD_FINISH ( HID_DBP_START + 15) +#define HID_GRIDWIZARD_PREVIOUS ( HID_DBP_START + 12) +#define HID_GRIDWIZARD_NEXT ( HID_DBP_START + 13) +#define HID_GRIDWIZARD_CANCEL ( HID_DBP_START + 14) +#define HID_GRIDWIZARD_FINISH ( HID_DBP_START + 15) // !! if you add new IDs, please also adjust HID_ABP_LAST below !! #define HID_DBP_LAST HID_GRIDWIZARD_FINISH diff --git a/extensions/inc/extensio.hrc b/extensions/inc/extensio.hrc index bd643892d42f..5b1154763738 100644 --- a/extensions/inc/extensio.hrc +++ b/extensions/inc/extensio.hrc @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -32,8 +32,8 @@ // ----------------------------------------------------------------------- // - resource id ranges -#define RID_ABP_START ( RID_MORE_EXTENSIONS_START + 0 ) -#define RID_ABP_END ( RID_MORE_EXTENSIONS_START + 19 ) +#define RID_ABP_START ( RID_MORE_EXTENSIONS_START + 0 ) +#define RID_ABP_END ( RID_MORE_EXTENSIONS_START + 19 ) #define RID_DBP_START ( RID_MORE_EXTENSIONS_START + 20 ) #define RID_DBP_END ( RID_MORE_EXTENSIONS_START + 39 ) @@ -49,11 +49,11 @@ // ----------------------------------------------------------------------- // - help id ranges -#define HID_DBP_START ( HID_EXTENSIONS_START + 0 ) -#define HID_DBP_END ( HID_EXTENSIONS_START + 19 ) +#define HID_DBP_START ( HID_EXTENSIONS_START + 0 ) +#define HID_DBP_END ( HID_EXTENSIONS_START + 19 ) -#define HID_ABP_START ( HID_EXTENSIONS_START + 20 ) -#define HID_ABP_END ( HID_EXTENSIONS_START + 39 ) +#define HID_ABP_START ( HID_EXTENSIONS_START + 20 ) +#define HID_ABP_END ( HID_EXTENSIONS_START + 39 ) #define HID_BIBLIO_START ( HID_EXTENSIONS_START + 40 ) #define HID_BIBLIO_END ( HID_EXTENSIONS_START + 89 ) diff --git a/extensions/inc/pch/precompiled_extensions.cxx b/extensions/inc/pch/precompiled_extensions.cxx index 9943e17e4c45..6a73045125b8 100644 --- a/extensions/inc/pch/precompiled_extensions.cxx +++ b/extensions/inc/pch/precompiled_extensions.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/inc/pch/precompiled_extensions.hxx b/extensions/inc/pch/precompiled_extensions.hxx index d0f8b8936f10..91c1d8849fc9 100644 --- a/extensions/inc/pch/precompiled_extensions.hxx +++ b/extensions/inc/pch/precompiled_extensions.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/inc/propctrlr.hrc b/extensions/inc/propctrlr.hrc index 477f512797ec..ab11bf432117 100644 --- a/extensions/inc/propctrlr.hrc +++ b/extensions/inc/propctrlr.hrc @@ -1,6 +1,6 @@ /************************************************************************* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/inc/ucbhelper/ext_content.hxx b/extensions/inc/ucbhelper/ext_content.hxx index 69d4a016eecb..50d7f83a3c4e 100644 --- a/extensions/inc/ucbhelper/ext_content.hxx +++ b/extensions/inc/ucbhelper/ext_content.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -59,30 +59,30 @@ using namespace osl; template <class Type> class safe_list : public osl::Mutex, public std::list< Type > {}; -class OSimpleContentIdentifier : public OWeakObject, +class OSimpleContentIdentifier : public OWeakObject, public XContentIdentifier { private: - OUString Identifier; - OUString ProviderScheme; + OUString Identifier; + OUString ProviderScheme; public: OSimpleContentIdentifier( const OUString& rIdentifier, const OUString& rProviderScheme ); // XInterface - virtual Any SAL_CALL queryInterface( const Type &type ) throw( RuntimeException ); - virtual void SAL_CALL acquire() throw(RuntimeException); - virtual void SAL_CALL release() throw(RuntimeException); + virtual Any SAL_CALL queryInterface( const Type &type ) throw( RuntimeException ); + virtual void SAL_CALL acquire() throw(RuntimeException); + virtual void SAL_CALL release() throw(RuntimeException); // XContentIdentifier - virtual OUString SAL_CALL getContentIdentifier() throw(RuntimeException); - virtual OUString SAL_CALL getContentProviderScheme() throw(RuntimeException); + virtual OUString SAL_CALL getContentIdentifier() throw(RuntimeException); + virtual OUString SAL_CALL getContentProviderScheme() throw(RuntimeException); }; //--------------------------------------------------------------------------- // -// FileSystemContent +// FileSystemContent // //--------------------------------------------------------------------------- @@ -98,8 +98,8 @@ public XComponent public: struct PropertyChangeEventInfo { - OUString Name; - long Handle; + OUString Name; + long Handle; PropertyChangeEventInfo() : Handle( -1 ) {} @@ -113,8 +113,8 @@ public: struct PropertyChangeListenerInfo { - Reference< XPropertiesChangeListener > xListener; - list< PropertyChangeEventInfo > aEventInfos; + Reference< XPropertiesChangeListener > xListener; + list< PropertyChangeEventInfo > aEventInfos; inline int operator ==( const PropertyChangeListenerInfo& crInfo ) const { return xListener == crInfo.xListener; } @@ -127,9 +127,9 @@ public: protected: Sequence< PropertyChangeEvent > matchListenerEvents( const Sequence< PropertyChangeEvent >& crEvents, const PropertyChangeListenerInfo & crInfo ); - safe_list< Reference< XContentEventListener > > m_aContentListeners; - safe_list< Reference< XEventListener > > m_aComponentListeners; - safe_list< PropertyChangeListenerInfo > m_aPropertyChangeListeners; + safe_list< Reference< XContentEventListener > > m_aContentListeners; + safe_list< Reference< XEventListener > > m_aComponentListeners; + safe_list< PropertyChangeListenerInfo > m_aPropertyChangeListeners; public: virtual ~OContent() {} @@ -140,7 +140,7 @@ public: virtual Any doCommand( const Command & crCommand ) = 0; // XInterface - virtual Any SAL_CALL queryInterface( const Type &type ) throw( RuntimeException ); + virtual Any SAL_CALL queryInterface( const Type &type ) throw( RuntimeException ); virtual void SAL_CALL acquire() throw(RuntimeException); virtual void SAL_CALL release() throw(RuntimeException); @@ -159,7 +159,7 @@ public: // XCommandInfo virtual CommandInfo SAL_CALL getCommandInfoByName( const OUString& rName ) throw( UnsupportedCommandException ); - virtual CommandInfo SAL_CALL getCommandInfoByHandle( long nHandle ) throw( UnsupportedCommandException ); + virtual CommandInfo SAL_CALL getCommandInfoByHandle( long nHandle ) throw( UnsupportedCommandException ); virtual sal_Bool SAL_CALL hasCommandByName( const OUString& rName ) throw(); virtual sal_Bool SAL_CALL hasCommandByHandle( long nHandle ) throw(); @@ -175,19 +175,19 @@ public: //--------------------------------------------------------------------------- // -// FolderContent +// FolderContent // //--------------------------------------------------------------------------- // supported Commands -static const sal_Int32 OPEN = 0; -static const sal_Int32 CLOSE = 1; +static const sal_Int32 OPEN = 0; +static const sal_Int32 CLOSE = 1; class OFolderContent : public OContent { protected: // Already provided children - safe_list< XContent > m_aChildList; + safe_list< XContent > m_aChildList; // OContent virtual Any doCommand( const Command & crCommand ); @@ -210,7 +210,7 @@ public: //--------------------------------------------------------------------------- // -// OContentTask +// OContentTask // //--------------------------------------------------------------------------- @@ -218,12 +218,12 @@ class OContentTask : public OWeakObject, public XContentTask { - Guard< OContent > m_aContentGuard; + Guard< OContent > m_aContentGuard; protected: - OContent *m_pContent; - Reference< XContentTaskEnvironment > m_xEnvironment; - ContentTaskStatus m_eStatus; - oslThread m_aThread; + OContent *m_pContent; + Reference< XContentTaskEnvironment > m_xEnvironment; + ContentTaskStatus m_eStatus; + oslThread m_aThread; static void executeWorker( void * ); virtual ContentTaskStatus setStatus( ContentTaskStatus eStatus ); @@ -235,7 +235,7 @@ public: virtual ~OContentTask(); // XInterface - virtual Any SAL_CALL queryInterface( const Type &type ) throw( RuntimeException ); + virtual Any SAL_CALL queryInterface( const Type &type ) throw( RuntimeException ); virtual void SAL_CALL acquire() throw(RuntimeException); virtual void SAL_CALL release() throw(RuntimeException); @@ -250,7 +250,7 @@ public: //--------------------------------------------------------------------------- // -// OCommandTask +// OCommandTask // //--------------------------------------------------------------------------- @@ -259,8 +259,8 @@ public OContentTask, public XCommandTask { protected: - Command m_aCommand; - Any m_aResult; + Command m_aCommand; + Any m_aResult; public: OCommandTask( const Reference< XContentTaskEnvironment >& xEnv, OContent *pContent, const Command& rCommand ); @@ -269,9 +269,9 @@ public: virtual void doExecute(); // XInterface - virtual Any SAL_CALL queryInterface( const Type &type ) throw( RuntimeException ); - virtual void SAL_CALL acquire() throw(RuntimeException); - virtual void SAL_CALL release() throw(RuntimeException); + virtual Any SAL_CALL queryInterface( const Type &type ) throw( RuntimeException ); + virtual void SAL_CALL acquire() throw(RuntimeException); + virtual void SAL_CALL release() throw(RuntimeException); // XContentTask virtual void SAL_CALL start() throw(); @@ -287,7 +287,7 @@ public: //--------------------------------------------------------------------------- // -// OPropertyTask +// OPropertyTask // //--------------------------------------------------------------------------- @@ -296,11 +296,11 @@ public OContentTask, public XPropertyTask { protected: - Sequence< PropertyValueInfo > m_aProperties; - PropertyTaskType m_eType; + Sequence< PropertyValueInfo > m_aProperties; + PropertyTaskType m_eType; public: OPropertyTask(const Reference< XContentTaskEnvironment >& Environment, OContent *pContent, const Sequence< PropertyValue >& Properties, PropertyTaskType Type ); - virtual ~OPropertyTask(); + virtual ~OPropertyTask(); virtual void doExecute(); @@ -309,9 +309,9 @@ public: virtual void getPropertyValue( PropertyValueInfo & rProperty ) = 0; // XInterface - virtual Any SAL_CALL queryInterface( const Type &type ) throw( RuntimeException ); - virtual void SAL_CALL acquire() throw(RuntimeException); - virtual void SAL_CALL release() throw(RuntimeException); + virtual Any SAL_CALL queryInterface( const Type &type ) throw( RuntimeException ); + virtual void SAL_CALL acquire() throw(RuntimeException); + virtual void SAL_CALL release() throw(RuntimeException); // XContentTask virtual void SAL_CALL start() throw(); diff --git a/extensions/inc/update.hrc b/extensions/inc/update.hrc index 2cd1f8f69f12..9dd3463157dc 100644 --- a/extensions/inc/update.hrc +++ b/extensions/inc/update.hrc @@ -1,6 +1,6 @@ /************************************************************************* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/qa/complex/extensions/OfficeResourceLoader.java b/extensions/qa/complex/extensions/OfficeResourceLoader.java index d0b2f1db2db8..16bc967cc08b 100644 --- a/extensions/qa/complex/extensions/OfficeResourceLoader.java +++ b/extensions/qa/complex/extensions/OfficeResourceLoader.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/qa/complex/extensions/orl_de.src b/extensions/qa/complex/extensions/orl_de.src index c5a91afe6b2e..e92ac818a446 100644 --- a/extensions/qa/complex/extensions/orl_de.src +++ b/extensions/qa/complex/extensions/orl_de.src @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/qa/complex/extensions/orl_en-US.src b/extensions/qa/complex/extensions/orl_en-US.src index 77518f4d5e26..bdeaac39a69f 100644 --- a/extensions/qa/complex/extensions/orl_en-US.src +++ b/extensions/qa/complex/extensions/orl_en-US.src @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/qa/integration/extensions/ComponentFactory.java b/extensions/qa/integration/extensions/ComponentFactory.java index b1824c1f5577..5edeb1bb65e0 100644 --- a/extensions/qa/integration/extensions/ComponentFactory.java +++ b/extensions/qa/integration/extensions/ComponentFactory.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/qa/integration/extensions/ConsoleWait.java b/extensions/qa/integration/extensions/ConsoleWait.java index 4c92b9c57554..4c4a4349161b 100644 --- a/extensions/qa/integration/extensions/ConsoleWait.java +++ b/extensions/qa/integration/extensions/ConsoleWait.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/qa/integration/extensions/Frame.java b/extensions/qa/integration/extensions/Frame.java index 4b61d60d05e5..a53fe65a29f2 100644 --- a/extensions/qa/integration/extensions/Frame.java +++ b/extensions/qa/integration/extensions/Frame.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/qa/integration/extensions/MethodHandler.java b/extensions/qa/integration/extensions/MethodHandler.java index ca14eae0723d..e75e0205e634 100644 --- a/extensions/qa/integration/extensions/MethodHandler.java +++ b/extensions/qa/integration/extensions/MethodHandler.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/qa/integration/extensions/ObjectInspector.java b/extensions/qa/integration/extensions/ObjectInspector.java index 0a436a1ae650..e6799dfa9d66 100644 --- a/extensions/qa/integration/extensions/ObjectInspector.java +++ b/extensions/qa/integration/extensions/ObjectInspector.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/qa/integration/extensions/ServicesHandler.java b/extensions/qa/integration/extensions/ServicesHandler.java index 33bb69961028..0340a988a31f 100644 --- a/extensions/qa/integration/extensions/ServicesHandler.java +++ b/extensions/qa/integration/extensions/ServicesHandler.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/qa/integration/extensions/TestSkeleton.java b/extensions/qa/integration/extensions/TestSkeleton.java index dad1cfc375b2..833f06b36a68 100644 --- a/extensions/qa/integration/extensions/TestSkeleton.java +++ b/extensions/qa/integration/extensions/TestSkeleton.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/abpilot/abpfinalpage.cxx b/extensions/source/abpilot/abpfinalpage.cxx index dc4f026390d2..af6e0dc4b5be 100644 --- a/extensions/source/abpilot/abpfinalpage.cxx +++ b/extensions/source/abpilot/abpfinalpage.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -62,14 +62,14 @@ namespace abp //--------------------------------------------------------------------- FinalPage::FinalPage( OAddessBookSourcePilot* _pParent ) :AddressBookSourcePage(_pParent, ModuleRes(RID_PAGE_FINAL)) - ,m_aExplanation ( this, ModuleRes( FT_FINISH_EXPL ) ) - ,m_aLocationLabel ( this, ModuleRes( FT_LOCATION ) ) - ,m_aLocation ( this, ModuleRes( CBB_LOCATION ) ) - ,m_aBrowse ( this, ModuleRes( PB_BROWSE ) ) - ,m_aRegisterName ( this, ModuleRes( CB_REGISTER_DS ) ) - ,m_aNameLabel ( this, ModuleRes( FT_NAME_EXPL ) ) - ,m_aName ( this, ModuleRes( ET_DATASOURCENAME ) ) - ,m_aDuplicateNameError ( this, ModuleRes( FT_DUPLICATENAME ) ) + ,m_aExplanation ( this, ModuleRes( FT_FINISH_EXPL ) ) + ,m_aLocationLabel ( this, ModuleRes( FT_LOCATION ) ) + ,m_aLocation ( this, ModuleRes( CBB_LOCATION ) ) + ,m_aBrowse ( this, ModuleRes( PB_BROWSE ) ) + ,m_aRegisterName ( this, ModuleRes( CB_REGISTER_DS ) ) + ,m_aNameLabel ( this, ModuleRes( FT_NAME_EXPL ) ) + ,m_aName ( this, ModuleRes( ET_DATASOURCENAME ) ) + ,m_aDuplicateNameError ( this, ModuleRes( FT_DUPLICATENAME ) ) ,m_aLocationController( ::comphelper::ComponentContext( _pParent->getORB() ), m_aLocation, m_aBrowse ) { FreeResource(); @@ -223,7 +223,7 @@ namespace abp return 0L; } //......................................................................... -} // namespace abp +} // namespace abp //......................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/extensions/source/abpilot/abpfinalpage.hxx b/extensions/source/abpilot/abpfinalpage.hxx index 036b4fa543b4..6fbf76b540a4 100644 --- a/extensions/source/abpilot/abpfinalpage.hxx +++ b/extensions/source/abpilot/abpfinalpage.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -47,31 +47,31 @@ namespace abp class FinalPage : public AddressBookSourcePage { protected: - FixedText m_aExplanation; - FixedText m_aLocationLabel; - ::svt::OFileURLControl m_aLocation; - PushButton m_aBrowse; - CheckBox m_aRegisterName; - FixedText m_aNameLabel; - Edit m_aName; - FixedText m_aDuplicateNameError; + FixedText m_aExplanation; + FixedText m_aLocationLabel; + ::svt::OFileURLControl m_aLocation; + PushButton m_aBrowse; + CheckBox m_aRegisterName; + FixedText m_aNameLabel; + Edit m_aName; + FixedText m_aDuplicateNameError; ::svx::DatabaseLocationInputController m_aLocationController; - StringBag m_aInvalidDataSourceNames; + StringBag m_aInvalidDataSourceNames; public: FinalPage( OAddessBookSourcePilot* _pParent ); protected: // OWizardPage overridables - virtual void initializePage(); - virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason ); + virtual void initializePage(); + virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason ); // TabDialog overridables - virtual void ActivatePage(); - virtual void DeactivatePage(); + virtual void ActivatePage(); + virtual void DeactivatePage(); // OImportPage overridables virtual bool canAdvance() const; @@ -80,13 +80,13 @@ namespace abp DECL_LINK( OnNameModified, Edit* ); DECL_LINK( OnRegister, CheckBox* ); - sal_Bool isValidName() const; - void implCheckName(); - void setFields(); + sal_Bool isValidName() const; + void implCheckName(); + void setFields(); }; //......................................................................... -} // namespace abp +} // namespace abp //......................................................................... #endif // EXTENSIONS_ABP_ABPFINALPAGE_HXX diff --git a/extensions/source/abpilot/abpresid.hrc b/extensions/source/abpilot/abpresid.hrc index 1afc6e88a2f0..273ba6b6efb9 100644 --- a/extensions/source/abpilot/abpresid.hrc +++ b/extensions/source/abpilot/abpresid.hrc @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -33,78 +33,78 @@ //======================================================================== // basics -#define RID_DIALOG_START RID_ABP_START -#define RID_PAGE_START RID_ABP_START -#define RID_STRING_START RID_ABP_START -#define RID_ERRORBOX_START RID_ABP_START -#define RID_UNTYPED_START RID_ABP_START -#define RID_QUERYBOX_START RID_ABP_START -#define RID_BITMAP_START RID_ABP_START +#define RID_DIALOG_START RID_ABP_START +#define RID_PAGE_START RID_ABP_START +#define RID_STRING_START RID_ABP_START +#define RID_ERRORBOX_START RID_ABP_START +#define RID_UNTYPED_START RID_ABP_START +#define RID_QUERYBOX_START RID_ABP_START +#define RID_BITMAP_START RID_ABP_START //======================================================================== // dialogs -#define RID_DLG_ADDRESSBOOKSOURCEPILOT ( RID_DIALOG_START + 0 ) +#define RID_DLG_ADDRESSBOOKSOURCEPILOT ( RID_DIALOG_START + 0 ) // please adjust RID_DIALOG_END (below) when adding new dialogs -#define RID_DIALOG_END RID_DLG_ADDRESSBOOKSOURCEPILOT +#define RID_DIALOG_END RID_DLG_ADDRESSBOOKSOURCEPILOT //======================================================================== // tab pages -#define RID_PAGE_SELECTABTYPE ( RID_PAGE_START + 0 ) -#define RID_PAGE_ADMININVOKATION ( RID_PAGE_START + 1 ) -#define RID_PAGE_TABLESELECTION_AB ( RID_PAGE_START + 2 ) -#define RID_PAGE_FIELDMAPPING ( RID_PAGE_START + 3 ) -#define RID_PAGE_FINAL ( RID_PAGE_START + 4 ) +#define RID_PAGE_SELECTABTYPE ( RID_PAGE_START + 0 ) +#define RID_PAGE_ADMININVOKATION ( RID_PAGE_START + 1 ) +#define RID_PAGE_TABLESELECTION_AB ( RID_PAGE_START + 2 ) +#define RID_PAGE_FIELDMAPPING ( RID_PAGE_START + 3 ) +#define RID_PAGE_FINAL ( RID_PAGE_START + 4 ) // please adjust RID_PAGE_END (below) when adding new tab pages -#define RID_PAGE_END RID_PAGE_FINAL +#define RID_PAGE_END RID_PAGE_FINAL //======================================================================== // strings -#define RID_STR_DEFAULT_NAME ( RID_STRING_START + 0 ) -#define RID_STR_ADMINDIALOGTITLE ( RID_STRING_START + 1 ) -#define RID_STR_NOCONNECTION ( RID_STRING_START + 2 ) -#define RID_STR_PLEASECHECKSETTINGS ( RID_STRING_START + 3 ) -#define RID_STR_FIELDDIALOGTITLE ( RID_STRING_START + 4 ) -#define RID_STR_NOFIELDSASSIGNED ( RID_STRING_START + 5 ) +#define RID_STR_DEFAULT_NAME ( RID_STRING_START + 0 ) +#define RID_STR_ADMINDIALOGTITLE ( RID_STRING_START + 1 ) +#define RID_STR_NOCONNECTION ( RID_STRING_START + 2 ) +#define RID_STR_PLEASECHECKSETTINGS ( RID_STRING_START + 3 ) +#define RID_STR_FIELDDIALOGTITLE ( RID_STRING_START + 4 ) +#define RID_STR_NOFIELDSASSIGNED ( RID_STRING_START + 5 ) // please adjust RID_STRING_END (below) when adding new strings -#define RID_STRING_END RID_STR_NOFIELDSASSIGNED +#define RID_STRING_END RID_STR_NOFIELDSASSIGNED //======================================================================== // error boxes -#define RID_ERR_NEEDTYPESELECTION ( RID_ERRORBOX_START + 0 ) +#define RID_ERR_NEEDTYPESELECTION ( RID_ERRORBOX_START + 0 ) // please adjust RID_ERRORBOX_END (below) when adding new error boxes -#define RID_ERRORBOX_END RID_ERR_NEEDTYPESELECTION +#define RID_ERRORBOX_END RID_ERR_NEEDTYPESELECTION //======================================================================== // query boxes -#define RID_QRY_NOTABLES ( RID_QUERYBOX_START + 0 ) +#define RID_QRY_NOTABLES ( RID_QUERYBOX_START + 0 ) // please adjust RID_QUERYBOX_END (below) when adding new query boxes -#define RID_QUERYBOX_END RID_QRY_NOTABLES +#define RID_QUERYBOX_END RID_QRY_NOTABLES //======================================================================== // untyped resources -#define RID_RSC_NOTUSEDYET ( RID_UNTYPED_START + 0 ) +#define RID_RSC_NOTUSEDYET ( RID_UNTYPED_START + 0 ) // please adjust RID_UNTYPED_END (below) when adding new untyped resources -#define RID_UNTYPED_END RID_RSC_NOTUSEDYET +#define RID_UNTYPED_END RID_RSC_NOTUSEDYET //======================================================================== // bitmaps -#define BMP_HEADERIMAGE ( RID_BITMAP_START + 0 ) +#define BMP_HEADERIMAGE ( RID_BITMAP_START + 0 ) // please adjust RID_BITMAP_END (below) when adding new bitmaps -#define RID_BITMAP_END BMP_HEADERIMAGE +#define RID_BITMAP_END BMP_HEADERIMAGE //======================================================================== //======================================================================== @@ -136,52 +136,52 @@ // local resource ids //........................................................................ -#define FL_SEPARATOR 1 -#define FL_TYPE 2 -#define FL_NAME 3 +#define FL_SEPARATOR 1 +#define FL_TYPE 2 +#define FL_NAME 3 //........................................................................ -#define FT_TYPE_HINTS 1 -#define FT_ADMINEXPLANATION 3 -#define FT_NAME_EXPL 4 -#define FT_ERROR 5 -#define FL_TOOMUCHTABLES 6 -#define FT_FIELDASSIGMENTEXPL 7 -#define FT_ASSIGNEDFIELDS 8 -#define FT_FINISH_EXPL 9 -#define FT_DUPLICATENAME 10 -#define FT_LOCATION 11 +#define FT_TYPE_HINTS 1 +#define FT_ADMINEXPLANATION 3 +#define FT_NAME_EXPL 4 +#define FT_ERROR 5 +#define FL_TOOMUCHTABLES 6 +#define FT_FIELDASSIGMENTEXPL 7 +#define FT_ASSIGNEDFIELDS 8 +#define FT_FINISH_EXPL 9 +#define FT_DUPLICATENAME 10 +#define FT_LOCATION 11 //........................................................................ -#define RB_MORK 1 +#define RB_MORK 1 #define RB_THUNDERBIRD 2 -#define RB_EVOLUTION 3 -#define RB_KAB 4 -#define RB_MACAB 5 -#define RB_LDAP 6 -#define RB_OUTLOOK 7 -#define RB_OUTLOOKEXPRESS 8 -#define RB_OTHER 9 +#define RB_EVOLUTION 3 +#define RB_KAB 4 +#define RB_MACAB 5 +#define RB_LDAP 6 +#define RB_OUTLOOK 7 +#define RB_OUTLOOKEXPRESS 8 +#define RB_OTHER 9 #define RB_EVOLUTION_GROUPWISE 10 -#define RB_EVOLUTION_LDAP 11 +#define RB_EVOLUTION_LDAP 11 //........................................................................ -#define ET_DATASOURCENAME 1 -#define ET_LOCATION 2 +#define ET_DATASOURCENAME 1 +#define ET_LOCATION 2 //........................................................................ -#define PB_INVOKE_ADMIN_DIALOG 1 -#define PB_INVOKE_FIELDS_DIALOG 2 -#define PB_BROWSE 3 +#define PB_INVOKE_ADMIN_DIALOG 1 +#define PB_INVOKE_FIELDS_DIALOG 2 +#define PB_BROWSE 3 //........................................................................ -#define LB_TABLELIST 1 +#define LB_TABLELIST 1 //........................................................................ -#define CB_REGISTER_DS 1 +#define CB_REGISTER_DS 1 //........................................................................ -#define CBB_LOCATION 1 +#define CBB_LOCATION 1 //........................................................................ #define STR_SELECT_ABTYPE 1 @@ -194,18 +194,18 @@ // some defines //........................................................................ -#define WINDOW_SIZE_X 240 -#define WINDOW_SIZE_Y 185 +#define WINDOW_SIZE_X 240 +#define WINDOW_SIZE_Y 185 -#define WINDOW_BORDER_X 12 -#define WINDOW_BORDER_Y 14 +#define WINDOW_BORDER_X 12 +#define WINDOW_BORDER_Y 14 -#define BUTTON_SIZE_X 50 -#define BUTTON_SIZE_Y 14 +#define BUTTON_SIZE_X 50 +#define BUTTON_SIZE_Y 14 -#define HEADER_SIZE_Y 30 +#define HEADER_SIZE_Y 30 -#define BORDER_X 12 +#define BORDER_X 12 //........................................................................ @@ -214,6 +214,6 @@ /************************************************************************* * history: * - * Revision 1.0 30.01.01 16:38:29 fs + * Revision 1.0 30.01.01 16:38:29 fs ************************************************************************/ diff --git a/extensions/source/abpilot/abpservices.cxx b/extensions/source/abpilot/abpservices.cxx index 9f07a1aabb6b..93818ebc9e79 100644 --- a/extensions/source/abpilot/abpservices.cxx +++ b/extensions/source/abpilot/abpservices.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -58,8 +58,8 @@ extern "C" void SAL_CALL abp_initializeModule() extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( - const sal_Char **ppEnvTypeName, - uno_Environment ** /*ppEnv*/ + const sal_Char **ppEnvTypeName, + uno_Environment ** /*ppEnv*/ ) { abp_initializeModule(); @@ -72,8 +72,8 @@ extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( void* pRegistryKey ) { - if (pRegistryKey) - try + if (pRegistryKey) + try { return ::abp::OModule::writeComponentInfos( static_cast<XMultiServiceFactory*>(pServiceManager), diff --git a/extensions/source/abpilot/abptypes.hxx b/extensions/source/abpilot/abptypes.hxx index 2a5922ba2c0c..3df98e9a96bc 100644 --- a/extensions/source/abpilot/abptypes.hxx +++ b/extensions/source/abpilot/abptypes.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -42,7 +42,7 @@ namespace abp DECLARE_STL_USTRINGACCESS_MAP( ::rtl::OUString, MapString2String ); //......................................................................... -} // namespace abp +} // namespace abp //......................................................................... #endif // EXTENSIONS_ABP_ABPTYPES_HXX diff --git a/extensions/source/abpilot/abspage.cxx b/extensions/source/abpilot/abspage.cxx index b46674355255..993396ab3727 100644 --- a/extensions/source/abpilot/abspage.cxx +++ b/extensions/source/abpilot/abspage.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -73,7 +73,7 @@ namespace abp } //--------------------------------------------------------------------- - const AddressSettings& AddressBookSourcePage::getSettings() const + const AddressSettings& AddressBookSourcePage::getSettings() const { return getDialog()->getSettings(); } @@ -85,7 +85,7 @@ namespace abp } //......................................................................... -} // namespace abp +} // namespace abp //......................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/extensions/source/abpilot/abspage.hxx b/extensions/source/abpilot/abspage.hxx index 47c6725342f2..c80c8a7a2602 100644 --- a/extensions/source/abpilot/abspage.hxx +++ b/extensions/source/abpilot/abspage.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -55,19 +55,19 @@ namespace abp protected: // helper - OAddessBookSourcePilot* getDialog(); - const OAddessBookSourcePilot* getDialog() const; + OAddessBookSourcePilot* getDialog(); + const OAddessBookSourcePilot* getDialog() const; ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > getORB(); - AddressSettings& getSettings(); - const AddressSettings& getSettings() const; + AddressSettings& getSettings(); + const AddressSettings& getSettings() const; // TabDialog overridables - virtual void DeactivatePage(); + virtual void DeactivatePage(); }; //......................................................................... -} // namespace abp +} // namespace abp //......................................................................... #endif // EXTENSIONS_ABP_ABSPAGE_HXX diff --git a/extensions/source/abpilot/abspilot.cxx b/extensions/source/abpilot/abspilot.cxx index 13ddcf175909..d8de0a7c9a0c 100644 --- a/extensions/source/abpilot/abspilot.cxx +++ b/extensions/source/abpilot/abspilot.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -175,7 +175,7 @@ namespace abp // 2. check if we need to register the data source if ( m_aSettings.bRegisterDataSource ) m_aNewDataSource.registerDataSource(m_aSettings.sRegisteredDataSourceName); - + // 3. write the data source / table names into the configuration addressconfig::writeTemplateAddressSource( getORB(), m_aSettings.bRegisterDataSource ? m_aSettings.sRegisteredDataSourceName : m_aSettings.sDataSourceName, m_aSettings.sSelectedTable ); @@ -312,9 +312,9 @@ namespace abp const sal_Char* pGuess = NULL; switch ( getSettings().eType ) { - case AST_MORK : + case AST_MORK : case AST_THUNDERBIRD : pGuess = "Personal Address book"; break; - case AST_LDAP : pGuess = "LDAP Directory"; break; + case AST_LDAP : pGuess = "LDAP Directory"; break; case AST_EVOLUTION : case AST_EVOLUTION_GROUPWISE: case AST_EVOLUTION_LDAP : pGuess = "Personal"; break; @@ -339,7 +339,7 @@ namespace abp void OAddessBookSourcePilot::implCreateDataSource() { if (m_aNewDataSource.isValid()) - { // we already have a data source object + { // we already have a data source object if ( m_aSettings.eType == m_eNewDataSourceType ) // and it already has the correct type return; @@ -495,7 +495,7 @@ namespace abp } //......................................................................... -} // namespace abp +} // namespace abp //......................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/extensions/source/abpilot/abspilot.hxx b/extensions/source/abpilot/abspilot.hxx index 25795aa61def..c9d7eaba2251 100644 --- a/extensions/source/abpilot/abspilot.hxx +++ b/extensions/source/abpilot/abspilot.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -49,10 +49,10 @@ namespace abp protected: ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xORB; - AddressSettings m_aSettings; + AddressSettings m_aSettings; - ODataSource m_aNewDataSource; - AddressSourceType m_eNewDataSourceType; + ODataSource m_aNewDataSource; + AddressSourceType m_eNewDataSourceType; public: /// ctor @@ -63,14 +63,14 @@ namespace abp /// get the service factory which was used to create the dialog ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > getORB() { return m_xORB; } - AddressSettings& getSettings() { return m_aSettings; } - const AddressSettings& getSettings() const { return m_aSettings; } + AddressSettings& getSettings() { return m_aSettings; } + const AddressSettings& getSettings() const { return m_aSettings; } - const ODataSource& getDataSource() const { return m_aNewDataSource; } + const ODataSource& getDataSource() const { return m_aNewDataSource; } - sal_Bool connectToDataSource( sal_Bool _bForceReConnect ); + sal_Bool connectToDataSource( sal_Bool _bForceReConnect ); - void travelNext( ) { OAddessBookSourcePilot_Base::travelNext(); } + void travelNext( ) { OAddessBookSourcePilot_Base::travelNext(); } /// to be called when the selected type changed void typeSelectionChanged( AddressSourceType _eType ); @@ -85,7 +85,7 @@ namespace abp // RoadmapWizard virtual String getStateDisplayName( WizardState _nState ) const; - virtual BOOL Close(); + virtual BOOL Close(); private: DECL_LINK( OnCancelClicked, void* ); @@ -101,16 +101,16 @@ namespace abp /// guesses a default for the table name, if no valid table is selected void implDefaultTableName(); - inline sal_Bool needAdminInvokationPage( AddressSourceType _eType ) const + inline sal_Bool needAdminInvokationPage( AddressSourceType _eType ) const { - return ( ( AST_LDAP == _eType ) - || ( AST_OTHER == _eType ) + return ( ( AST_LDAP == _eType ) + || ( AST_OTHER == _eType ) ); } /// check if with the current settings, we would need to invoke he administration dialog for more details about the data source - inline sal_Bool needAdminInvokationPage() const + inline sal_Bool needAdminInvokationPage() const { - return needAdminInvokationPage( m_aSettings.eType ); + return needAdminInvokationPage( m_aSettings.eType ); } inline sal_Bool needManualFieldMapping( AddressSourceType _eType ) const @@ -143,7 +143,7 @@ namespace abp }; //......................................................................... -} // namespace abp +} // namespace abp //......................................................................... #endif // EXTENSIONS_ABSPILOT_HXX diff --git a/extensions/source/abpilot/abspilot.src b/extensions/source/abpilot/abspilot.src index be177b5f6e19..a69ac07eba75 100644 --- a/extensions/source/abpilot/abspilot.src +++ b/extensions/source/abpilot/abspilot.src @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -36,11 +36,11 @@ ModalDialog RID_DLG_ADDRESSBOOKSOURCEPILOT HelpId = HID_ABSPILOT; - OutputSize = TRUE ; - SVLook = TRUE ; - Moveable = TRUE ; - Closeable = TRUE ; - Hide = TRUE; + OutputSize = TRUE ; + SVLook = TRUE ; + Moveable = TRUE ; + Closeable = TRUE ; + Hide = TRUE; String STR_SELECT_ABTYPE { @@ -71,13 +71,13 @@ ModalDialog RID_DLG_ADDRESSBOOKSOURCEPILOT //........................................................................ TabPage RID_PAGE_SELECTABTYPE { - SVLook = TRUE ; - Size = MAP_APPFONT ( WINDOW_SIZE_X , WINDOW_SIZE_Y ) ; + SVLook = TRUE ; + Size = MAP_APPFONT ( WINDOW_SIZE_X , WINDOW_SIZE_Y ) ; FixedText FT_TYPE_HINTS { - Pos = MAP_APPFONT ( BORDER_X, 9 ) ; - Size = MAP_APPFONT ( WINDOW_SIZE_X - 2 * BORDER_X, 40 ) ; + Pos = MAP_APPFONT ( BORDER_X, 9 ) ; + Size = MAP_APPFONT ( WINDOW_SIZE_X - 2 * BORDER_X, 40 ) ; WordBreak = TRUE; Text [ en-US ] = "%PRODUCTNAME lets you access address data already present in your system. To do this, a %PRODUCTNAME data source will be created in which your address data is available in tabular form.\n\nThis wizard helps you create the data source."; @@ -85,65 +85,65 @@ TabPage RID_PAGE_SELECTABTYPE FixedLine FL_TYPE { - Pos = MAP_APPFONT ( 7, 56 ) ; - Size = MAP_APPFONT ( WINDOW_SIZE_X - 14, 8 ) ; + Pos = MAP_APPFONT ( 7, 56 ) ; + Size = MAP_APPFONT ( WINDOW_SIZE_X - 14, 8 ) ; Text [ en-US ] = "Please select the type of your external address book:"; }; RadioButton RB_EVOLUTION { - Size = MAP_APPFONT ( WINDOW_SIZE_X - 30, 8 ) ; + Size = MAP_APPFONT ( WINDOW_SIZE_X - 30, 8 ) ; Text [ en-US ] = "Evolution"; }; RadioButton RB_EVOLUTION_GROUPWISE { - Size = MAP_APPFONT ( WINDOW_SIZE_X - 30, 8 ) ; + Size = MAP_APPFONT ( WINDOW_SIZE_X - 30, 8 ) ; Text [ en-US ] = "Groupwise"; }; RadioButton RB_EVOLUTION_LDAP { - Size = MAP_APPFONT ( WINDOW_SIZE_X - 30, 8 ) ; + Size = MAP_APPFONT ( WINDOW_SIZE_X - 30, 8 ) ; Text [ en-US ] = "Evolution LDAP"; }; RadioButton RB_MORK { - Size = MAP_APPFONT ( WINDOW_SIZE_X - 30, 8 ) ; + Size = MAP_APPFONT ( WINDOW_SIZE_X - 30, 8 ) ; Text [ en-US ] = "Mozilla / Netscape"; }; RadioButton RB_THUNDERBIRD { - Size = MAP_APPFONT ( WINDOW_SIZE_X - 30, 8 ) ; + Size = MAP_APPFONT ( WINDOW_SIZE_X - 30, 8 ) ; Text [ en-US ] = "Thunderbird"; }; RadioButton RB_KAB { - Size = MAP_APPFONT ( WINDOW_SIZE_X - 30, 8 ) ; + Size = MAP_APPFONT ( WINDOW_SIZE_X - 30, 8 ) ; Text [ en-US ] = "KDE address book"; }; RadioButton RB_MACAB { - Size = MAP_APPFONT ( WINDOW_SIZE_X - 30, 8 ) ; + Size = MAP_APPFONT ( WINDOW_SIZE_X - 30, 8 ) ; Text [ en-US ] = "Mac OS X address book"; }; RadioButton RB_LDAP { - Size = MAP_APPFONT ( WINDOW_SIZE_X - 30, 8 ) ; + Size = MAP_APPFONT ( WINDOW_SIZE_X - 30, 8 ) ; Text [ en-US ] = "LDAP address data"; }; RadioButton RB_OUTLOOK { - Size = MAP_APPFONT ( WINDOW_SIZE_X - 30, 8 ) ; + Size = MAP_APPFONT ( WINDOW_SIZE_X - 30, 8 ) ; Text [ en-US ] = "Outlook address book"; }; RadioButton RB_OUTLOOKEXPRESS { - Size = MAP_APPFONT ( WINDOW_SIZE_X - 30, 8 ) ; + Size = MAP_APPFONT ( WINDOW_SIZE_X - 30, 8 ) ; Text [ en-US ] = "Windows system address book"; }; RadioButton RB_OTHER { - Size = MAP_APPFONT ( WINDOW_SIZE_X - 30, 8 ) ; + Size = MAP_APPFONT ( WINDOW_SIZE_X - 30, 8 ) ; Text [ en-US ] = "Other external data source"; }; }; @@ -151,13 +151,13 @@ TabPage RID_PAGE_SELECTABTYPE //........................................................................ TabPage RID_PAGE_ADMININVOKATION { - SVLook = TRUE ; - Size = MAP_APPFONT ( WINDOW_SIZE_X , WINDOW_SIZE_Y ) ; + SVLook = TRUE ; + Size = MAP_APPFONT ( WINDOW_SIZE_X , WINDOW_SIZE_Y ) ; FixedText FT_ADMINEXPLANATION { - Pos = MAP_APPFONT ( BORDER_X, 9 ) ; - Size = MAP_APPFONT ( WINDOW_SIZE_X - 2 * BORDER_X, 48 ) ; + Pos = MAP_APPFONT ( BORDER_X, 9 ) ; + Size = MAP_APPFONT ( WINDOW_SIZE_X - 2 * BORDER_X, 48 ) ; WordBreak = TRUE; Text [ en-US ] = "To set up the new data source, additional information is required.\n\nClick the following button to open another dialog in which you then enter the necessary information."; @@ -165,16 +165,16 @@ TabPage RID_PAGE_ADMININVOKATION PushButton PB_INVOKE_ADMIN_DIALOG { - Pos = MAP_APPFONT ( ( WINDOW_SIZE_X - BUTTON_SIZE_X ) / 2, 60 ) ; - Size = MAP_APPFONT ( BUTTON_SIZE_X, BUTTON_SIZE_Y ) ; + Pos = MAP_APPFONT ( ( WINDOW_SIZE_X - BUTTON_SIZE_X ) / 2, 60 ) ; + Size = MAP_APPFONT ( BUTTON_SIZE_X, BUTTON_SIZE_Y ) ; Text [ en-US ] = "Settings"; }; FixedText FT_ERROR { - Pos = MAP_APPFONT ( BORDER_X, WINDOW_SIZE_Y - HEADER_SIZE_Y - 7 - 48 ) ; - Size = MAP_APPFONT ( WINDOW_SIZE_X - 2 * BORDER_X, 48 ) ; + Pos = MAP_APPFONT ( BORDER_X, WINDOW_SIZE_Y - HEADER_SIZE_Y - 7 - 48 ) ; + Size = MAP_APPFONT ( WINDOW_SIZE_X - 2 * BORDER_X, 48 ) ; WordBreak = TRUE; Hide = TRUE; @@ -185,13 +185,13 @@ TabPage RID_PAGE_ADMININVOKATION //........................................................................ TabPage RID_PAGE_TABLESELECTION_AB { - SVLook = TRUE ; - Size = MAP_APPFONT ( WINDOW_SIZE_X , WINDOW_SIZE_Y ) ; + SVLook = TRUE ; + Size = MAP_APPFONT ( WINDOW_SIZE_X , WINDOW_SIZE_Y ) ; FixedText FL_TOOMUCHTABLES { - Pos = MAP_APPFONT ( BORDER_X, 9 ) ; - Size = MAP_APPFONT ( WINDOW_SIZE_X - 2 * BORDER_X, 24 ) ; + Pos = MAP_APPFONT ( BORDER_X, 9 ) ; + Size = MAP_APPFONT ( WINDOW_SIZE_X - 2 * BORDER_X, 24 ) ; WordBreak = TRUE; Text [ en-US ] = "The external data source you have chosen contains more than one address book.\nPlease select the one you mainly want to work with:"; @@ -199,8 +199,8 @@ TabPage RID_PAGE_TABLESELECTION_AB ListBox LB_TABLELIST { - Pos = MAP_APPFONT ( BORDER_X, 36 ) ; - Size = MAP_APPFONT ( WINDOW_SIZE_X - 2 * BORDER_X, 50 ) ; + Pos = MAP_APPFONT ( BORDER_X, 36 ) ; + Size = MAP_APPFONT ( WINDOW_SIZE_X - 2 * BORDER_X, 50 ) ; SVLook = TRUE; Sort = TRUE; DropDown = FALSE; @@ -212,13 +212,13 @@ TabPage RID_PAGE_TABLESELECTION_AB //........................................................................ TabPage RID_PAGE_FIELDMAPPING { - SVLook = TRUE ; - Size = MAP_APPFONT ( WINDOW_SIZE_X , WINDOW_SIZE_Y ) ; + SVLook = TRUE ; + Size = MAP_APPFONT ( WINDOW_SIZE_X , WINDOW_SIZE_Y ) ; FixedText FT_FIELDASSIGMENTEXPL { - Pos = MAP_APPFONT ( BORDER_X, 9 ) ; - Size = MAP_APPFONT ( WINDOW_SIZE_X - 2 * BORDER_X, 72 ) ; + Pos = MAP_APPFONT ( BORDER_X, 9 ) ; + Size = MAP_APPFONT ( WINDOW_SIZE_X - 2 * BORDER_X, 72 ) ; WordBreak = TRUE; Text [ en-US ] = "To incorporate the address data in your templates, %PRODUCTNAME has to know which fields contain which data.\n\nFor instance, you could have stored the e-mail addresses in a field named \"email\", or \"E-mail\" or \"EM\" - or something completely different.\n\nClick the button below to open another dialog where you can enter the settings for your data source."; @@ -226,16 +226,16 @@ TabPage RID_PAGE_FIELDMAPPING PushButton PB_INVOKE_FIELDS_DIALOG { - Pos = MAP_APPFONT ( ( WINDOW_SIZE_X - BUTTON_SIZE_X ) / 2, 84 ) ; - Size = MAP_APPFONT ( BUTTON_SIZE_X, BUTTON_SIZE_Y ) ; + Pos = MAP_APPFONT ( ( WINDOW_SIZE_X - BUTTON_SIZE_X ) / 2, 84 ) ; + Size = MAP_APPFONT ( BUTTON_SIZE_X, BUTTON_SIZE_Y ) ; Text [ en-US ] = "Field Assignment"; }; FixedText FT_ASSIGNEDFIELDS { - Pos = MAP_APPFONT ( BORDER_X, WINDOW_SIZE_Y - HEADER_SIZE_Y - 7 - 32 ) ; - Size = MAP_APPFONT ( WINDOW_SIZE_X - 2 * BORDER_X, 32 ) ; + Pos = MAP_APPFONT ( BORDER_X, WINDOW_SIZE_Y - HEADER_SIZE_Y - 7 - 32 ) ; + Size = MAP_APPFONT ( WINDOW_SIZE_X - 2 * BORDER_X, 32 ) ; WordBreak = TRUE; }; }; @@ -243,76 +243,76 @@ TabPage RID_PAGE_FIELDMAPPING //........................................................................ TabPage RID_PAGE_FINAL { - SVLook = TRUE ; - Size = MAP_APPFONT ( WINDOW_SIZE_X , WINDOW_SIZE_Y ) ; + SVLook = TRUE ; + Size = MAP_APPFONT ( WINDOW_SIZE_X , WINDOW_SIZE_Y ) ; FixedText FT_FINISH_EXPL { - Pos = MAP_APPFONT ( BORDER_X, 9 ) ; - Size = MAP_APPFONT ( WINDOW_SIZE_X - 2 * BORDER_X, 40 ) ; + Pos = MAP_APPFONT ( BORDER_X, 9 ) ; + Size = MAP_APPFONT ( WINDOW_SIZE_X - 2 * BORDER_X, 40 ) ; WordBreak = TRUE; Text [ en-US ] = "That was all the information necessary to integrate your address data into %PRODUCTNAME.\n\nNow, just enter the name under which you want to register the data source in %PRODUCTNAME."; }; - + FixedText FT_LOCATION { - Pos = MAP_APPFONT ( BORDER_X, 53 ) ; - Size = MAP_APPFONT ( 50, 8 ) ; + Pos = MAP_APPFONT ( BORDER_X, 53 ) ; + Size = MAP_APPFONT ( 50, 8 ) ; Group = TRUE; Text [ en-US ] = "Location"; }; - + ComboBox CBB_LOCATION { - Pos = MAP_APPFONT ( BORDER_X , 64 ) ; - Size = MAP_APPFONT ( WINDOW_SIZE_X - 53 - BORDER_X - BORDER_X, 12) ; + Pos = MAP_APPFONT ( BORDER_X , 64 ) ; + Size = MAP_APPFONT ( WINDOW_SIZE_X - 53 - BORDER_X - BORDER_X, 12) ; SVLook = TRUE; Border = TRUE; DropDown = TRUE ; AutoHScroll = TRUE ; }; - + PushButton PB_BROWSE { - Pos = MAP_APPFONT ( WINDOW_SIZE_X - 50 - BORDER_X , 63 ) ; - Size = MAP_APPFONT ( 50, 14) ; + Pos = MAP_APPFONT ( WINDOW_SIZE_X - 50 - BORDER_X , 63 ) ; + Size = MAP_APPFONT ( 50, 14) ; SVLook = TRUE; Group = FALSE; - + Text [ en-US ] = "Browse..."; }; CheckBox CB_REGISTER_DS { - Pos = MAP_APPFONT ( BORDER_X, 82 ) ; - Size = MAP_APPFONT ( WINDOW_SIZE_X - BORDER_X - BORDER_X, 8) ; + Pos = MAP_APPFONT ( BORDER_X, 82 ) ; + Size = MAP_APPFONT ( WINDOW_SIZE_X - BORDER_X - BORDER_X, 8) ; SVLook = TRUE; Group = TRUE; - + Text [ en-US ] = "Make this address book available to all modules in %PRODUCTNAME."; }; FixedText FT_NAME_EXPL { - Pos = MAP_APPFONT ( BORDER_X + 10, 93 ) ; - Size = MAP_APPFONT ( WINDOW_SIZE_X - BORDER_X - BORDER_X - 10, 8 ) ; + Pos = MAP_APPFONT ( BORDER_X + 10, 93 ) ; + Size = MAP_APPFONT ( WINDOW_SIZE_X - BORDER_X - BORDER_X - 10, 8 ) ; Text [ en-US ] = "Address book name"; }; Edit ET_DATASOURCENAME { - Pos = MAP_APPFONT ( BORDER_X + 10, 104 ) ; - Size = MAP_APPFONT ( WINDOW_SIZE_X - 56 - BORDER_X - BORDER_X - 10, 12) ; + Pos = MAP_APPFONT ( BORDER_X + 10, 104 ) ; + Size = MAP_APPFONT ( WINDOW_SIZE_X - 56 - BORDER_X - BORDER_X - 10, 12) ; SVLook = TRUE; Border = TRUE; }; FixedText FT_DUPLICATENAME { - Pos = MAP_APPFONT ( BORDER_X + 10, WINDOW_SIZE_Y - HEADER_SIZE_Y - 7 - 24 ) ; - Size = MAP_APPFONT ( WINDOW_SIZE_X - 2 * BORDER_X, 24) ; + Pos = MAP_APPFONT ( BORDER_X + 10, WINDOW_SIZE_Y - HEADER_SIZE_Y - 7 - 24 ) ; + Size = MAP_APPFONT ( WINDOW_SIZE_X - 2 * BORDER_X, 24) ; WordBreak = TRUE; Hide = TRUE; Group = FALSE; diff --git a/extensions/source/abpilot/addresssettings.hxx b/extensions/source/abpilot/addresssettings.hxx index 6acb48022fc5..9c05144befb6 100644 --- a/extensions/source/abpilot/addresssettings.hxx +++ b/extensions/source/abpilot/addresssettings.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -63,17 +63,17 @@ namespace abp //===================================================================== struct AddressSettings { - AddressSourceType eType; - ::rtl::OUString sDataSourceName; - ::rtl::OUString sRegisteredDataSourceName; - ::rtl::OUString sSelectedTable; + AddressSourceType eType; + ::rtl::OUString sDataSourceName; + ::rtl::OUString sRegisteredDataSourceName; + ::rtl::OUString sSelectedTable; bool bIgnoreNoTable; - MapString2String aFieldMapping; + MapString2String aFieldMapping; bool bRegisterDataSource; }; //......................................................................... -} // namespace abp +} // namespace abp //......................................................................... #endif // EXTENSIONS_ABP_ADDRESSSETTINGS_HXX diff --git a/extensions/source/abpilot/admininvokationimpl.cxx b/extensions/source/abpilot/admininvokationimpl.cxx index 41eda708fd19..8f406ced1ce7 100644 --- a/extensions/source/abpilot/admininvokationimpl.cxx +++ b/extensions/source/abpilot/admininvokationimpl.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -39,7 +39,7 @@ #include "componentmodule.hxx" #include <vcl/waitobj.hxx> - + //......................................................................... namespace abp { @@ -114,7 +114,7 @@ namespace abp } if (xDialog.is()) - { // execute it + { // execute it if (xDialog->execute()) return sal_True; } @@ -129,7 +129,7 @@ namespace abp } //......................................................................... -} // namespace abp +} // namespace abp //......................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/extensions/source/abpilot/admininvokationimpl.hxx b/extensions/source/abpilot/admininvokationimpl.hxx index a4fbd8910361..760d2270e0cd 100644 --- a/extensions/source/abpilot/admininvokationimpl.hxx +++ b/extensions/source/abpilot/admininvokationimpl.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -51,7 +51,7 @@ namespace abp ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xORB; ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > m_xDataSource; - Window* m_pMessageParent; + Window* m_pMessageParent; public: OAdminDialogInvokation( @@ -64,7 +64,7 @@ namespace abp }; //......................................................................... -} // namespace abp +} // namespace abp //......................................................................... #endif // EXTENSIONS_ABP_ADMININVOKATIONIMPL_HXX diff --git a/extensions/source/abpilot/admininvokationpage.cxx b/extensions/source/abpilot/admininvokationpage.cxx index 3ef7fc398ab5..872c050508a2 100644 --- a/extensions/source/abpilot/admininvokationpage.cxx +++ b/extensions/source/abpilot/admininvokationpage.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -42,9 +42,9 @@ namespace abp //===================================================================== AdminDialogInvokationPage::AdminDialogInvokationPage( OAddessBookSourcePilot* _pParent ) :AddressBookSourcePage(_pParent, ModuleRes(RID_PAGE_ADMININVOKATION)) - ,m_aExplanation (this, ModuleRes(FT_ADMINEXPLANATION)) - ,m_aInvokeAdminDialog (this, ModuleRes(PB_INVOKE_ADMIN_DIALOG)) - ,m_aErrorMessage (this, ModuleRes(FT_ERROR)) + ,m_aExplanation (this, ModuleRes(FT_ADMINEXPLANATION)) + ,m_aInvokeAdminDialog (this, ModuleRes(PB_INVOKE_ADMIN_DIALOG)) + ,m_aErrorMessage (this, ModuleRes(FT_ERROR)) ,m_bSuccessfullyExecutedDialog(sal_False) { FreeResource(); @@ -110,7 +110,7 @@ namespace abp } //......................................................................... -} // namespace abp +} // namespace abp //......................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/extensions/source/abpilot/admininvokationpage.hxx b/extensions/source/abpilot/admininvokationpage.hxx index 377d32e9d0b1..ac435be2cd07 100644 --- a/extensions/source/abpilot/admininvokationpage.hxx +++ b/extensions/source/abpilot/admininvokationpage.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -42,19 +42,19 @@ namespace abp class AdminDialogInvokationPage : public AddressBookSourcePage { protected: - FixedText m_aExplanation; - PushButton m_aInvokeAdminDialog; - FixedText m_aErrorMessage; + FixedText m_aExplanation; + PushButton m_aInvokeAdminDialog; + FixedText m_aErrorMessage; - sal_Bool m_bSuccessfullyExecutedDialog; + sal_Bool m_bSuccessfullyExecutedDialog; public: AdminDialogInvokationPage( OAddessBookSourcePilot* _pParent ); protected: // TabDialog overridables - virtual void ActivatePage(); - virtual void initializePage(); + virtual void ActivatePage(); + virtual void initializePage(); // OImportPage overridables virtual bool canAdvance() const; @@ -67,7 +67,7 @@ namespace abp }; //......................................................................... -} // namespace abp +} // namespace abp //......................................................................... #endif // EXTENSIONS_ABP_ADMINDIALOG_INVOKATION_PAGE_HXX diff --git a/extensions/source/abpilot/datasourcehandling.cxx b/extensions/source/abpilot/datasourcehandling.cxx index eb024565a840..95e2be27bea8 100644 --- a/extensions/source/abpilot/datasourcehandling.cxx +++ b/extensions/source/abpilot/datasourcehandling.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -113,7 +113,7 @@ namespace abp DBG_ASSERT( xDynamicContext.is(), "lcl_implCreateAndInsert: missing an interface on the context (XNamingService)!" ); if (xDynamicContext.is()) { - // xDynamicContext->registerObject( _rName, xNewDataSource ); + // xDynamicContext->registerObject( _rName, xNewDataSource ); _rxNewDataSource = xNewDataSource; } } @@ -180,14 +180,14 @@ namespace abp //===================================================================== struct ODataSourceContextImpl { - Reference< XMultiServiceFactory > xORB; - Reference< XNameAccess > xContext; /// the UNO data source context - StringBag aDataSourceNames; /// for quicker name checks (without the UNO overhead) + Reference< XMultiServiceFactory > xORB; + Reference< XNameAccess > xContext; /// the UNO data source context + StringBag aDataSourceNames; /// for quicker name checks (without the UNO overhead) ODataSourceContextImpl( const Reference< XMultiServiceFactory >& _rxORB ) : xORB( _rxORB ) { } ODataSourceContextImpl( const ODataSourceContextImpl& _rSource ) - :xORB ( _rSource.xORB ) - ,xContext ( _rSource.xContext ) + :xORB ( _rSource.xORB ) + ,xContext ( _rSource.xContext ) { } }; @@ -229,7 +229,7 @@ namespace abp sal_Int32 nPostFix = 1; while ( ( m_pImpl->aDataSourceNames.end() != aPos ) && ( nPostFix < 65535 ) ) - { // there already is a data source with this name + { // there already is a data source with this name sCheck = _rDataSourceName; sCheck += ::rtl::OUString::valueOf( nPostFix++ ); @@ -247,65 +247,65 @@ namespace abp } //--------------------------------------------------------------------- - ODataSource ODataSourceContext::createNewLDAP( const ::rtl::OUString& _rName) SAL_THROW (( )) + ODataSource ODataSourceContext::createNewLDAP( const ::rtl::OUString& _rName) SAL_THROW (( )) { return lcl_implCreateAndSetURL( m_pImpl->xORB, _rName, "sdbc:address:ldap:" ); } //--------------------------------------------------------------------- - ODataSource ODataSourceContext::createNewMORK( const ::rtl::OUString& _rName) SAL_THROW (( )) + ODataSource ODataSourceContext::createNewMORK( const ::rtl::OUString& _rName) SAL_THROW (( )) { return lcl_implCreateAndSetURL( m_pImpl->xORB, _rName, "sdbc:address:mozilla" ); } //--------------------------------------------------------------------- - ODataSource ODataSourceContext::createNewThunderbird( const ::rtl::OUString& _rName ) SAL_THROW (( )) + ODataSource ODataSourceContext::createNewThunderbird( const ::rtl::OUString& _rName ) SAL_THROW (( )) { return lcl_implCreateAndSetURL( m_pImpl->xORB, _rName, "sdbc:address:thunderbird" ); } //--------------------------------------------------------------------- - ODataSource ODataSourceContext::createNewEvolutionLdap( const ::rtl::OUString& _rName) SAL_THROW (( )) + ODataSource ODataSourceContext::createNewEvolutionLdap( const ::rtl::OUString& _rName) SAL_THROW (( )) { return lcl_implCreateAndSetURL( m_pImpl->xORB, _rName, "sdbc:address:evolution:ldap" ); } //--------------------------------------------------------------------- - ODataSource ODataSourceContext::createNewEvolutionGroupwise( const ::rtl::OUString& _rName) SAL_THROW (( )) + ODataSource ODataSourceContext::createNewEvolutionGroupwise( const ::rtl::OUString& _rName) SAL_THROW (( )) { return lcl_implCreateAndSetURL( m_pImpl->xORB, _rName, "sdbc:address:evolution:groupwise" ); } //--------------------------------------------------------------------- - ODataSource ODataSourceContext::createNewEvolution( const ::rtl::OUString& _rName) SAL_THROW (( )) + ODataSource ODataSourceContext::createNewEvolution( const ::rtl::OUString& _rName) SAL_THROW (( )) { return lcl_implCreateAndSetURL( m_pImpl->xORB, _rName, "sdbc:address:evolution:local" ); } //--------------------------------------------------------------------- - ODataSource ODataSourceContext::createNewKab( const ::rtl::OUString& _rName) SAL_THROW (( )) + ODataSource ODataSourceContext::createNewKab( const ::rtl::OUString& _rName) SAL_THROW (( )) { return lcl_implCreateAndSetURL( m_pImpl->xORB, _rName, "sdbc:address:kab" ); } //--------------------------------------------------------------------- - ODataSource ODataSourceContext::createNewMacab( const ::rtl::OUString& _rName) SAL_THROW (( )) + ODataSource ODataSourceContext::createNewMacab( const ::rtl::OUString& _rName) SAL_THROW (( )) { return lcl_implCreateAndSetURL( m_pImpl->xORB, _rName, "sdbc:address:macab" ); } //--------------------------------------------------------------------- - ODataSource ODataSourceContext::createNewOutlook( const ::rtl::OUString& _rName) SAL_THROW (( )) + ODataSource ODataSourceContext::createNewOutlook( const ::rtl::OUString& _rName) SAL_THROW (( )) { return lcl_implCreateAndSetURL( m_pImpl->xORB, _rName, "sdbc:address:outlook" ); } //--------------------------------------------------------------------- - ODataSource ODataSourceContext::createNewOE( const ::rtl::OUString& _rName) SAL_THROW (( )) + ODataSource ODataSourceContext::createNewOE( const ::rtl::OUString& _rName) SAL_THROW (( )) { return lcl_implCreateAndSetURL( m_pImpl->xORB, _rName, "sdbc:address:outlookexp" ); } //--------------------------------------------------------------------- - ODataSource ODataSourceContext::createNewDBase( const ::rtl::OUString& _rName) SAL_THROW (( )) + ODataSource ODataSourceContext::createNewDBase( const ::rtl::OUString& _rName) SAL_THROW (( )) { return lcl_implCreateAndSetURL( m_pImpl->xORB, _rName, "sdbc:dbase:" ); } @@ -316,13 +316,13 @@ namespace abp struct ODataSourceImpl { public: - Reference< XMultiServiceFactory > xORB; /// the service factory - Reference< XPropertySet > xDataSource; /// the UNO data source + Reference< XMultiServiceFactory > xORB; /// the service factory + Reference< XPropertySet > xDataSource; /// the UNO data source ::utl::SharedUNOComponent< XConnection > xConnection; - StringBag aTables; // the cached table names - ::rtl::OUString sName; - sal_Bool bTablesUpToDate; // table name cache up-to-date? + StringBag aTables; // the cached table names + ::rtl::OUString sName; + sal_Bool bTablesUpToDate; // table name cache up-to-date? ODataSourceImpl( const Reference< XMultiServiceFactory >& _rxORB ) :xORB( _rxORB ) @@ -411,7 +411,7 @@ namespace abp catch(const Exception&) { DBG_ERROR( "ODataSource::registerDataSource: caught an exception while creating the data source!" ); - } + } } //--------------------------------------------------------------------- @@ -633,7 +633,7 @@ namespace abp } //......................................................................... -} // namespace abp +} // namespace abp //......................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/extensions/source/abpilot/datasourcehandling.hxx b/extensions/source/abpilot/datasourcehandling.hxx index bffcb62cdf97..cce6253bb9bf 100644 --- a/extensions/source/abpilot/datasourcehandling.hxx +++ b/extensions/source/abpilot/datasourcehandling.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -59,7 +59,7 @@ namespace abp class ODataSourceContext { private: - ODataSourceContextImpl* m_pImpl; + ODataSourceContextImpl* m_pImpl; public: ODataSourceContext( @@ -67,7 +67,7 @@ namespace abp ); /// retrieves the names of all data sources - void getDataSourceNames( StringBag& _rNames ) const SAL_THROW (( )); + void getDataSourceNames( StringBag& _rNames ) const SAL_THROW (( )); /// disambiguates the given name by appending auccessive numbers ::rtl::OUString& disambiguate(::rtl::OUString& _rDataSourceName); @@ -94,16 +94,16 @@ namespace abp ODataSource createNewMacab( const ::rtl::OUString& _rName ) SAL_THROW (( )); /// creates a new LDAP data source - ODataSource createNewLDAP( const ::rtl::OUString& _rName ) SAL_THROW (( )); + ODataSource createNewLDAP( const ::rtl::OUString& _rName ) SAL_THROW (( )); /// creates a new Outlook data source - ODataSource createNewOutlook( const ::rtl::OUString& _rName ) SAL_THROW (( )); + ODataSource createNewOutlook( const ::rtl::OUString& _rName ) SAL_THROW (( )); /// creates a new Outlook express data source - ODataSource createNewOE( const ::rtl::OUString& _rName ) SAL_THROW (( )); + ODataSource createNewOE( const ::rtl::OUString& _rName ) SAL_THROW (( )); /// creates a new dBase data source - ODataSource createNewDBase( const ::rtl::OUString& _rName ) SAL_THROW (( )); + ODataSource createNewDBase( const ::rtl::OUString& _rName ) SAL_THROW (( )); }; //===================================================================== @@ -120,7 +120,7 @@ namespace abp class ODataSource { private: - ODataSourceImpl* m_pImpl; + ODataSourceImpl* m_pImpl; public: // ---------------------------------------------------------------- @@ -142,11 +142,11 @@ namespace abp // ---------------------------------------------------------------- /// checks whether or not the object represents a valid data source - sal_Bool isValid() const SAL_THROW (( )); + sal_Bool isValid() const SAL_THROW (( )); // ---------------------------------------------------------------- /// removes the data source represented by the object from the data source context - void remove() SAL_THROW (( )); + void remove() SAL_THROW (( )); // TODO: put this into the context class /// returns the name of the data source @@ -154,7 +154,7 @@ namespace abp getName() const SAL_THROW (( )); /// renames the data source - sal_Bool rename( const ::rtl::OUString& _rName ) SAL_THROW (( )); + sal_Bool rename( const ::rtl::OUString& _rName ) SAL_THROW (( )); // TODO: put this into the context class // ---------------------------------------------------------------- @@ -166,25 +166,25 @@ namespace abp at all. @see isConnected */ - sal_Bool connect( Window* _pMessageParent ) SAL_THROW (( )); + sal_Bool connect( Window* _pMessageParent ) SAL_THROW (( )); /// returns <TRUE/> if the object has a valid connection, obtained from it's data source - sal_Bool isConnected( ) const SAL_THROW (( )); + sal_Bool isConnected( ) const SAL_THROW (( )); /// disconnects from the data source (i.e. disposes the UNO connection hold internally) - void disconnect( ) SAL_THROW (( )); + void disconnect( ) SAL_THROW (( )); /// stores the database file - void store() SAL_THROW (( )); + void store() SAL_THROW (( )); /// register the data source under the given name in the configuration - void registerDataSource( const ::rtl::OUString& _sRegisteredDataSourceName ) SAL_THROW (( )); + void registerDataSource( const ::rtl::OUString& _sRegisteredDataSourceName ) SAL_THROW (( )); // ---------------------------------------------------------------- /** retrieves the tables names from the connection <p>to be called when <method>isConnection</method> returns <TRUE/> only</p> */ - const StringBag& getTableNames() const SAL_THROW (( )); + const StringBag& getTableNames() const SAL_THROW (( )); /** determines whether a given table exists */ @@ -198,7 +198,7 @@ namespace abp /** set a new data source. <p>Available to selected clients only</p> */ - void setDataSource( + void setDataSource( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxDS ,const ::rtl::OUString& _sName ,PackageAccessControl @@ -209,7 +209,7 @@ namespace abp }; //......................................................................... -} // namespace abp +} // namespace abp //......................................................................... #endif // EXTENSIONS_ABP_DATASOURCEHANDLING_HXX diff --git a/extensions/source/abpilot/fieldmappingimpl.cxx b/extensions/source/abpilot/fieldmappingimpl.cxx index c7af76636362..48e0073360f3 100644 --- a/extensions/source/abpilot/fieldmappingimpl.cxx +++ b/extensions/source/abpilot/fieldmappingimpl.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -172,28 +172,28 @@ namespace abp // So what we need first is a mapping from programmatic names (1) to programmatic names (2) const sal_Char* pMappingProgrammatics[] = { - "FirstName", "FirstName", - "LastName", "LastName", - "Street", "HomeAddress", - "Zip", "HomeZipCode", - "City", "HomeCity", - "State", "HomeState", - "Country", "HomeCountry", - "PhonePriv", "HomePhone", - "PhoneComp", "WorkPhone", - "PhoneCell", "CellularNumber", - "Pager", "PagerNumber", - "Fax", "FaxNumber", - "EMail", "PrimaryEmail", - "URL", "WebPage1", - "Note", "Notes", - "Altfield1", "Custom1", - "Altfield2", "Custom2", - "Altfield3", "Custom3", - "Altfield4", "Custom4", - "Title", "JobTitle", - "Company", "Company", - "Department", "Department" + "FirstName", "FirstName", + "LastName", "LastName", + "Street", "HomeAddress", + "Zip", "HomeZipCode", + "City", "HomeCity", + "State", "HomeState", + "Country", "HomeCountry", + "PhonePriv", "HomePhone", + "PhoneComp", "WorkPhone", + "PhoneCell", "CellularNumber", + "Pager", "PagerNumber", + "Fax", "FaxNumber", + "EMail", "PrimaryEmail", + "URL", "WebPage1", + "Note", "Notes", + "Altfield1", "Custom1", + "Altfield2", "Custom2", + "Altfield3", "Custom3", + "Altfield4", "Custom4", + "Title", "JobTitle", + "Company", "Company", + "Department", "Department" }; // (this list is not complete: both lists of programmatic names are larger in real, // but this list above is the intersection) @@ -217,7 +217,7 @@ namespace abp ::rtl::OUString sAddressProgrammatic; ::rtl::OUString sDriverProgrammatic; ::rtl::OUString sDriverUI; - for ( sal_Int32 i=0; + for ( sal_Int32 i=0; i < nIntersectedProgrammatics; ++i ) @@ -284,7 +284,7 @@ namespace abp // do we have a new alias for the programmatic? MapString2StringIterator aPos = aFieldAssignment.find( *pExistentFields ); if ( aFieldAssignment.end() != aPos ) - { // yes + { // yes // -> set a new value OConfigurationNode aExistentField = aFields.openNode( *pExistentFields ); aExistentField.setNodeValue( sAssignedNodeName, makeAny( aPos->second ) ); @@ -292,7 +292,7 @@ namespace abp aFieldAssignment.erase( *pExistentFields ); } else - { // no + { // no // -> remove it aFields.removeNode( *pExistentFields ); } @@ -300,7 +300,7 @@ namespace abp // now everything remaining in aFieldAssignment marks a mapping entry which was not present // in the config before - for ( ConstMapString2StringIterator aNewMapping = aFieldAssignment.begin(); + for ( ConstMapString2StringIterator aNewMapping = aFieldAssignment.begin(); aNewMapping != aFieldAssignment.end(); ++aNewMapping ) @@ -319,7 +319,7 @@ namespace abp } //..................................................................... - } // namespace fieldmapping + } // namespace fieldmapping //..................................................................... //..................................................................... @@ -364,11 +364,11 @@ namespace abp } //..................................................................... - } // namespace addressconfig + } // namespace addressconfig //..................................................................... //......................................................................... -} // namespace abp +} // namespace abp //......................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/extensions/source/abpilot/fieldmappingimpl.hxx b/extensions/source/abpilot/fieldmappingimpl.hxx index 7d8ae420bc39..fe93fd01f2f9 100644 --- a/extensions/source/abpilot/fieldmappingimpl.hxx +++ b/extensions/source/abpilot/fieldmappingimpl.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -34,7 +34,7 @@ #include <com/sun/star/uno/Reference.hxx> #include "addresssettings.hxx" -namespace com { namespace sun { namespace star { +namespace com { namespace sun { namespace star { namespace lang { class XMultiServiceFactory; } @@ -77,7 +77,7 @@ namespace abp <p>The column names as used by the SDBC driver for address books is stored in the configuration, and this function creates a mapping which uses this configuration information.</p> */ - void defaultMapping( + void defaultMapping( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB, MapString2String& /* [out] */ _rFieldAssignment ) SAL_THROW ( ( ) ); @@ -91,7 +91,7 @@ namespace abp ) SAL_THROW ( ( ) ); //..................................................................... - } // namespace fieldmapping + } // namespace fieldmapping //..................................................................... //..................................................................... @@ -116,11 +116,11 @@ namespace abp ) SAL_THROW ( ( ) ); //..................................................................... - } // namespace addressconfig + } // namespace addressconfig //..................................................................... //......................................................................... -} // namespace abp +} // namespace abp //......................................................................... #endif // EXTENSIONS_ABP_FIELDMAPPINGIMPL_HXX diff --git a/extensions/source/abpilot/fieldmappingpage.cxx b/extensions/source/abpilot/fieldmappingpage.cxx index 323259965d62..82f25f900d2d 100644 --- a/extensions/source/abpilot/fieldmappingpage.cxx +++ b/extensions/source/abpilot/fieldmappingpage.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -44,9 +44,9 @@ namespace abp //--------------------------------------------------------------------- FieldMappingPage::FieldMappingPage( OAddessBookSourcePilot* _pParent ) :AddressBookSourcePage( _pParent, ModuleRes( RID_PAGE_FIELDMAPPING ) ) - ,m_aExplanation ( this, ModuleRes( FT_FIELDASSIGMENTEXPL ) ) - ,m_aInvokeDialog ( this, ModuleRes( PB_INVOKE_FIELDS_DIALOG ) ) - ,m_aHint ( this, ModuleRes( FT_ASSIGNEDFIELDS ) ) + ,m_aExplanation ( this, ModuleRes( FT_FIELDASSIGMENTEXPL ) ) + ,m_aInvokeDialog ( this, ModuleRes( PB_INVOKE_FIELDS_DIALOG ) ) + ,m_aHint ( this, ModuleRes( FT_ASSIGNEDFIELDS ) ) { FreeResource(); @@ -115,7 +115,7 @@ namespace abp } //......................................................................... -} // namespace abp +} // namespace abp //......................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/extensions/source/abpilot/fieldmappingpage.hxx b/extensions/source/abpilot/fieldmappingpage.hxx index 330c8e37c4a8..3da50be83ad9 100644 --- a/extensions/source/abpilot/fieldmappingpage.hxx +++ b/extensions/source/abpilot/fieldmappingpage.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -42,20 +42,20 @@ namespace abp class FieldMappingPage : public AddressBookSourcePage { protected: - FixedText m_aExplanation; - PushButton m_aInvokeDialog; - FixedText m_aHint; + FixedText m_aExplanation; + PushButton m_aInvokeDialog; + FixedText m_aHint; public: FieldMappingPage( OAddessBookSourcePilot* _pParent ); protected: // OWizardPage overridables - virtual void initializePage(); + virtual void initializePage(); // TabDialog overridables - virtual void ActivatePage(); - virtual void DeactivatePage(); + virtual void ActivatePage(); + virtual void DeactivatePage(); private: DECL_LINK( OnInvokeDialog, void* ); @@ -64,7 +64,7 @@ namespace abp }; //......................................................................... -} // namespace abp +} // namespace abp //......................................................................... #endif // EXTENSIONS_ABP_FIELDMAPPINGPAGE_HXX diff --git a/extensions/source/abpilot/moduleabp.cxx b/extensions/source/abpilot/moduleabp.cxx index 6fb06c7f68ac..ead9753193f4 100644 --- a/extensions/source/abpilot/moduleabp.cxx +++ b/extensions/source/abpilot/moduleabp.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/abpilot/tableselectionpage.cxx b/extensions/source/abpilot/tableselectionpage.cxx index fa3d4cc23c7c..5e6a2182d145 100644 --- a/extensions/source/abpilot/tableselectionpage.cxx +++ b/extensions/source/abpilot/tableselectionpage.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -45,8 +45,8 @@ namespace abp //--------------------------------------------------------------------- TableSelectionPage::TableSelectionPage( OAddessBookSourcePilot* _pParent ) :AddressBookSourcePage(_pParent, ModuleRes(RID_PAGE_TABLESELECTION_AB)) - ,m_aLabel ( this, ModuleRes( FL_TOOMUCHTABLES ) ) - ,m_aTableList ( this, ModuleRes( LB_TABLELIST ) ) + ,m_aLabel ( this, ModuleRes( FL_TOOMUCHTABLES ) ) + ,m_aTableList ( this, ModuleRes( LB_TABLELIST ) ) { FreeResource(); @@ -83,7 +83,7 @@ namespace abp // this page should never bother the user if there is 1 or less tables. // fill the list - for ( ConstStringBagIterator aTables = aTableNames.begin(); + for ( ConstStringBagIterator aTables = aTableNames.begin(); aTables != aTableNames.end(); ++aTables ) @@ -124,12 +124,12 @@ namespace abp //--------------------------------------------------------------------- bool TableSelectionPage::canAdvance() const { - return AddressBookSourcePage::canAdvance() - && ( 0 < m_aTableList.GetSelectEntryCount() ); + return AddressBookSourcePage::canAdvance() + && ( 0 < m_aTableList.GetSelectEntryCount() ); } //......................................................................... -} // namespace abp +} // namespace abp //......................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/extensions/source/abpilot/tableselectionpage.hxx b/extensions/source/abpilot/tableselectionpage.hxx index 9a7edca449dc..82b2d5d57c03 100644 --- a/extensions/source/abpilot/tableselectionpage.hxx +++ b/extensions/source/abpilot/tableselectionpage.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -43,20 +43,20 @@ namespace abp class TableSelectionPage : public AddressBookSourcePage { protected: - FixedText m_aLabel; - ListBox m_aTableList; + FixedText m_aLabel; + ListBox m_aTableList; public: TableSelectionPage( OAddessBookSourcePilot* _pParent ); protected: // OWizardPage overridables - virtual void initializePage(); - virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason ); + virtual void initializePage(); + virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason ); // TabDialog overridables - virtual void ActivatePage(); - virtual void DeactivatePage(); + virtual void ActivatePage(); + virtual void DeactivatePage(); // OImportPage overridables virtual bool canAdvance() const; @@ -67,7 +67,7 @@ namespace abp }; //......................................................................... -} // namespace abp +} // namespace abp //......................................................................... #endif // EXTENSIONS_ABP_TABLESELECTIONPAGE_HXX diff --git a/extensions/source/abpilot/typeselectionpage.cxx b/extensions/source/abpilot/typeselectionpage.cxx index 67b360d9dc91..f78878f0419c 100644 --- a/extensions/source/abpilot/typeselectionpage.cxx +++ b/extensions/source/abpilot/typeselectionpage.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -48,19 +48,19 @@ namespace abp //--------------------------------------------------------------------- TypeSelectionPage::TypeSelectionPage( OAddessBookSourcePilot* _pParent ) :AddressBookSourcePage(_pParent, ModuleRes(RID_PAGE_SELECTABTYPE)) - ,m_aHint (this, ModuleRes(FT_TYPE_HINTS)) - ,m_aTypeSep (this, ModuleRes(FL_TYPE)) - ,m_aEvolution (this, ModuleRes(RB_EVOLUTION)) - ,m_aEvolutionGroupwise (this, ModuleRes(RB_EVOLUTION_GROUPWISE)) - ,m_aEvolutionLdap (this, ModuleRes(RB_EVOLUTION_LDAP)) - ,m_aMORK (this, ModuleRes(RB_MORK)) + ,m_aHint (this, ModuleRes(FT_TYPE_HINTS)) + ,m_aTypeSep (this, ModuleRes(FL_TYPE)) + ,m_aEvolution (this, ModuleRes(RB_EVOLUTION)) + ,m_aEvolutionGroupwise (this, ModuleRes(RB_EVOLUTION_GROUPWISE)) + ,m_aEvolutionLdap (this, ModuleRes(RB_EVOLUTION_LDAP)) + ,m_aMORK (this, ModuleRes(RB_MORK)) ,m_aThunderbird (this, ModuleRes(RB_THUNDERBIRD)) - ,m_aKab (this, ModuleRes(RB_KAB)) - ,m_aMacab (this, ModuleRes(RB_MACAB)) - ,m_aLDAP (this, ModuleRes(RB_LDAP)) - ,m_aOutlook (this, ModuleRes(RB_OUTLOOK)) - ,m_aOE (this, ModuleRes(RB_OUTLOOKEXPRESS)) - ,m_aOther (this, ModuleRes(RB_OTHER)) + ,m_aKab (this, ModuleRes(RB_KAB)) + ,m_aMacab (this, ModuleRes(RB_MACAB)) + ,m_aLDAP (this, ModuleRes(RB_LDAP)) + ,m_aOutlook (this, ModuleRes(RB_OUTLOOK)) + ,m_aOE (this, ModuleRes(RB_OUTLOOKEXPRESS)) + ,m_aOther (this, ModuleRes(RB_OTHER)) { FreeResource(); @@ -229,8 +229,8 @@ namespace abp //--------------------------------------------------------------------- bool TypeSelectionPage::canAdvance() const { - return AddressBookSourcePage::canAdvance() - && (AST_INVALID != getSelectedType()); + return AddressBookSourcePage::canAdvance() + && (AST_INVALID != getSelectedType()); } //--------------------------------------------------------------------- @@ -242,7 +242,7 @@ namespace abp } //......................................................................... -} // namespace abp +} // namespace abp //......................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/extensions/source/abpilot/typeselectionpage.hxx b/extensions/source/abpilot/typeselectionpage.hxx index b78f3f036f52..37e0a8beb6da 100644 --- a/extensions/source/abpilot/typeselectionpage.hxx +++ b/extensions/source/abpilot/typeselectionpage.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -44,19 +44,19 @@ namespace abp class TypeSelectionPage : public AddressBookSourcePage { protected: - FixedText m_aHint; - FixedLine m_aTypeSep; - RadioButton m_aEvolution; - RadioButton m_aEvolutionGroupwise; - RadioButton m_aEvolutionLdap; - RadioButton m_aMORK; - RadioButton m_aThunderbird; - RadioButton m_aKab; - RadioButton m_aMacab; - RadioButton m_aLDAP; - RadioButton m_aOutlook; - RadioButton m_aOE; - RadioButton m_aOther; + FixedText m_aHint; + FixedLine m_aTypeSep; + RadioButton m_aEvolution; + RadioButton m_aEvolutionGroupwise; + RadioButton m_aEvolutionLdap; + RadioButton m_aMORK; + RadioButton m_aThunderbird; + RadioButton m_aKab; + RadioButton m_aMacab; + RadioButton m_aLDAP; + RadioButton m_aOutlook; + RadioButton m_aOE; + RadioButton m_aOther; struct ButtonItem { RadioButton *m_pItem; @@ -83,12 +83,12 @@ namespace abp protected: // OWizardPage overridables - virtual void initializePage(); - virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason ); + virtual void initializePage(); + virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason ); // TabDialog overridables - virtual void ActivatePage(); - virtual void DeactivatePage(); + virtual void ActivatePage(); + virtual void DeactivatePage(); // OImportPage overridables virtual bool canAdvance() const; @@ -96,11 +96,11 @@ namespace abp private: DECL_LINK( OnTypeSelected, void* ); - void selectType( AddressSourceType _eType ); + void selectType( AddressSourceType _eType ); }; //......................................................................... -} // namespace abp +} // namespace abp //......................................................................... #endif // EXTENSIONS_ABP_TYPESELECTIONPAGE_HXX diff --git a/extensions/source/abpilot/unodialogabp.cxx b/extensions/source/abpilot/unodialogabp.cxx index 2d7c8633489c..0c58f088a665 100644 --- a/extensions/source/abpilot/unodialogabp.cxx +++ b/extensions/source/abpilot/unodialogabp.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -159,7 +159,7 @@ namespace abp } //-------------------------------------------------------------------------- - Dialog* OABSPilotUno::createDialog(Window* _pParent) + Dialog* OABSPilotUno::createDialog(Window* _pParent) { return new OAddessBookSourcePilot(_pParent, m_aContext.getLegacyServiceFactory()); } @@ -192,7 +192,7 @@ namespace abp } //......................................................................... -} // namespace abp +} // namespace abp //......................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/extensions/source/abpilot/unodialogabp.hxx b/extensions/source/abpilot/unodialogabp.hxx index aa320b027191..ab56106b5746 100644 --- a/extensions/source/abpilot/unodialogabp.hxx +++ b/extensions/source/abpilot/unodialogabp.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -44,9 +44,9 @@ namespace abp //= OABSPilotUno //===================================================================== class OABSPilotUno; - typedef ::svt::OGenericUnoDialog OABSPilotUno_DBase; - typedef ::cppu::ImplHelper1< ::com::sun::star::task::XJob > OABSPilotUno_JBase; - typedef ::comphelper::OPropertyArrayUsageHelper< OABSPilotUno > OABSPilotUno_PBase; + typedef ::svt::OGenericUnoDialog OABSPilotUno_DBase; + typedef ::cppu::ImplHelper1< ::com::sun::star::task::XJob > OABSPilotUno_JBase; + typedef ::comphelper::OPropertyArrayUsageHelper< OABSPilotUno > OABSPilotUno_PBase; /// the UNO wrapper for the address book source pilot class OABSPilotUno :public OABSPilotUno_DBase @@ -90,12 +90,12 @@ namespace abp using OABSPilotUno_DBase::execute; protected: // OGenericUnoDialog overridables - virtual Dialog* createDialog(Window* _pParent); + virtual Dialog* createDialog(Window* _pParent); virtual void executedDialog(sal_Int16 _nExecutionResult); }; //......................................................................... -} // namespace abp +} // namespace abp //......................................................................... #endif // EXTENSIONS_ABP_UNODIALOG_HXX diff --git a/extensions/source/activex/main/SOActionsApproval.cpp b/extensions/source/activex/main/SOActionsApproval.cpp index b795b92fcf76..fd4abb170959 100644 --- a/extensions/source/activex/main/SOActionsApproval.cpp +++ b/extensions/source/activex/main/SOActionsApproval.cpp @@ -11,7 +11,7 @@ STDMETHODIMP SOActionsApproval::InterfaceSupportsErrorInfo(REFIID riid) { - static const IID* arr[] = + static const IID* arr[] = { &IID_ISOActionsApproval, }; diff --git a/extensions/source/activex/main/SOActionsApproval.h b/extensions/source/activex/main/SOActionsApproval.h index a5570312864d..097d7b97a29f 100644 --- a/extensions/source/activex/main/SOActionsApproval.h +++ b/extensions/source/activex/main/SOActionsApproval.h @@ -51,7 +51,7 @@ DECLARE_REGISTRY_RESOURCEID(IDR_SODOCUMENTEVENTLISTENER) STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid); // ISOActionsApproval - virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE approveAction( + virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE approveAction( /* [in] */ long nActionID, /* [retval][out] */ boolean *pbApproval) { diff --git a/extensions/source/activex/main/SOActiveX.cpp b/extensions/source/activex/main/SOActiveX.cpp index f95e42772185..3468337a0e80 100644 --- a/extensions/source/activex/main/SOActiveX.cpp +++ b/extensions/source/activex/main/SOActiveX.cpp @@ -61,7 +61,7 @@ HRESULT ExecuteFunc( IDispatch* idispUnoObject, // for debugging purposes // USES_CONVERSION; // if ( !SUCCEEDED( hr ) ) - // ::MessageBox( NULL, OLE2A( myInfo.bstrDescription ), OLE2A( myInfo.bstrSource ), MB_OK | MB_ICONINFORMATION ); + // ::MessageBox( NULL, OLE2A( myInfo.bstrDescription ), OLE2A( myInfo.bstrSource ), MB_OK | MB_ICONINFORMATION ); return hr; } @@ -142,16 +142,16 @@ CSOActiveX::CSOActiveX() if( !SUCCEEDED( hr ) ) OutputError_Impl( NULL, hr ); - mPWinClass.style = CS_HREDRAW|CS_VREDRAW; - mPWinClass.lpfnWndProc = ::DefWindowProc; - mPWinClass.cbClsExtra = 0; - mPWinClass.cbWndExtra = 0; - mPWinClass.hInstance = (HINSTANCE) GetModuleHandle(NULL); //myInstance; - mPWinClass.hIcon = NULL; - mPWinClass.hCursor = NULL; - mPWinClass.hbrBackground = (HBRUSH) COLOR_BACKGROUND; - mPWinClass.lpszMenuName = NULL; - mPWinClass.lpszClassName = STAROFFICE_WINDOWCLASS; + mPWinClass.style = CS_HREDRAW|CS_VREDRAW; + mPWinClass.lpfnWndProc = ::DefWindowProc; + mPWinClass.cbClsExtra = 0; + mPWinClass.cbWndExtra = 0; + mPWinClass.hInstance = (HINSTANCE) GetModuleHandle(NULL); //myInstance; + mPWinClass.hIcon = NULL; + mPWinClass.hCursor = NULL; + mPWinClass.hbrBackground = (HBRUSH) COLOR_BACKGROUND; + mPWinClass.lpszMenuName = NULL; + mPWinClass.lpszClassName = STAROFFICE_WINDOWCLASS; RegisterClass(&mPWinClass); } @@ -260,7 +260,7 @@ HRESULT CSOActiveX::TerminateOffice() hr = ExecuteFunc( pdispChildren, L"queryFrames", &nFlag, 1, &aFrames ); if ( SUCCEEDED( hr ) ) { - if ( ( aFrames.vt == ( VT_ARRAY | VT_DISPATCH ) || aFrames.vt == ( VT_ARRAY | VT_VARIANT ) ) + if ( ( aFrames.vt == ( VT_ARRAY | VT_DISPATCH ) || aFrames.vt == ( VT_ARRAY | VT_VARIANT ) ) && ( !aFrames.parray || aFrames.parray->cDims == 1 && aFrames.parray->rgsabound[0].cElements == 0 ) ) { // there is no frames open @@ -269,7 +269,7 @@ HRESULT CSOActiveX::TerminateOffice() hr = ExecuteFunc( pdispDesktop, L"terminate", NULL, 0, &dummyResult ); } } - + return hr; } @@ -372,7 +372,7 @@ STDMETHODIMP CSOActiveX::Load( LPPROPERTYBAG pPropBag, LPERRORLOG /*pErrorLog*/ hr = CBindStatusCallback<CSOActiveX>::Download( this, &CSOActiveX::CallbackCreateXInputStream, mCurFileUrl, m_spClientSite, FALSE ); if ( hr == MK_S_ASYNCHRONOUS ) hr = S_OK; - + if ( !SUCCEEDED( hr ) ) { // trigger initialization without stream @@ -574,7 +574,7 @@ HRESULT CSOActiveX::CreateFrameOldWay( HWND hwnd, int width, int height ) long nInitInd = 0; CComVariant pFrameVariant( mpDispFrame ); SafeArrayPutElement( pInitVals, &nInitInd, &pFrameVariant ); - + // the second sequence element nInitInd = 1; CComVariant pStrArr( 1L ); @@ -615,7 +615,7 @@ HRESULT CSOActiveX::CallLoadComponentFromURL1PBool( OLECHAR* sUrl, OLECHAR* sArg HRESULT hr = GetUnoStruct( L"com.sun.star.beans.PropertyValue", pdispPropVal ); if( !SUCCEEDED( hr ) ) return hr; - OLECHAR* sPropMemberNames[2] = { L"Name", L"Value" }; + OLECHAR* sPropMemberNames[2] = { L"Name", L"Value" }; CComVariant pPropVar[2]; pPropVar[0] = CComVariant( sArgName ); pPropVar[1].vt = VT_BOOL; pPropVar[1].boolVal = sArgVal ? VARIANT_TRUE : VARIANT_FALSE ; @@ -666,7 +666,7 @@ HRESULT CSOActiveX::CallDispatchMethod( OLECHAR* sUrl, hr = GetUnoStruct( L"com.sun.star.beans.PropertyValue", pdispPropVal ); if( !SUCCEEDED( hr ) ) return hr; - OLECHAR* sPropMemberNames[2] = { L"Name", L"Value" }; + OLECHAR* sPropMemberNames[2] = { L"Name", L"Value" }; CComVariant pPropVar[2]; pPropVar[0] = aArgNames[ix]; pPropVar[1] = aArgVals[ix]; @@ -719,7 +719,7 @@ void CSOActiveX::CallbackCreateXInputStream( CBindStatusCallback<CSOActiveX>* /* if( SUCCEEDED( hr ) && mpDispTempFile ) { SAFEARRAY FAR* pDataArray = SafeArrayCreateVector( VT_I1, 0, dwSize ); - + if ( pDataArray ) { hr = SafeArrayLock( pDataArray ); @@ -951,7 +951,7 @@ HRESULT CSOActiveX::OnDrawAdvanced( ATL_DRAWINFO& di ) if ( mbDrawLocked ) return S_OK; LockingGuard aGuard( mbDrawLocked ); - + if( m_spInPlaceSite && mCurFileUrl && mbReadyForActivation ) { HWND hwnd; @@ -1084,7 +1084,7 @@ STDMETHODIMP CSOActiveX::SetClientSite( IOleClientSite* aClientSite ) CComPtr<IOleContainer> aContainer; m_spClientSite->GetContainer( &aContainer ); -// ATLASSERT( aContainer ); +// ATLASSERT( aContainer ); if( SUCCEEDED( hr ) && aContainer ) { @@ -1096,7 +1096,7 @@ STDMETHODIMP CSOActiveX::SetClientSite( IOleClientSite* aClientSite ) aServiceProvider->QueryService( SID_SInternetExplorer, IID_IWebBrowser, (void**)&mWebBrowser2 ); -// ATLASSERT( mWebBrowser2 ); +// ATLASSERT( mWebBrowser2 ); if( mWebBrowser2 ) AtlAdvise( mWebBrowser2, GetUnknown(), DIID_DWebBrowserEvents2, &mCookie ); } diff --git a/extensions/source/activex/main/SOActiveX.h b/extensions/source/activex/main/SOActiveX.h index fea95d09c9b9..4b589090b6aa 100644 --- a/extensions/source/activex/main/SOActiveX.h +++ b/extensions/source/activex/main/SOActiveX.h @@ -50,38 +50,38 @@ class ATL_NO_VTABLE CSOActiveX : public IOleInPlaceActiveObjectImpl<CSOActiveX>, public IViewObjectExImpl<CSOActiveX>, public IOleInPlaceObjectWindowlessImpl<CSOActiveX>, -// public IConnectionPointContainerImpl<CSOActiveX>, +// public IConnectionPointContainerImpl<CSOActiveX>, public CComCoClass<CSOActiveX, &CLSID_SOActiveX>, -// public CProxy_ItryPluginEvents< CSOActiveX >, +// public CProxy_ItryPluginEvents< CSOActiveX >, public IPersistPropertyBagImpl< CSOActiveX >, - public IProvideClassInfo2Impl< &CLSID_SOActiveX, + public IProvideClassInfo2Impl< &CLSID_SOActiveX, &DIID__ISOActiveXEvents, &LIBID_SO_ACTIVEXLib >, public IObjectSafetyImpl< CSOActiveX, INTERFACESAFE_FOR_UNTRUSTED_DATA > { protected: - CComPtr<IWebBrowser2> mWebBrowser2; - DWORD mCookie; - - CComPtr<IDispatch> mpDispFactory; - CComPtr<IDispatch> mpDispFrame; - CComPtr<IDispatch> mpInstanceLocker; - CComPtr<IDispatch> mpDispWin; - OLECHAR* mCurFileUrl; - BOOL mbLoad; - BOOL mbViewOnly; + CComPtr<IWebBrowser2> mWebBrowser2; + DWORD mCookie; + + CComPtr<IDispatch> mpDispFactory; + CComPtr<IDispatch> mpDispFrame; + CComPtr<IDispatch> mpInstanceLocker; + CComPtr<IDispatch> mpDispWin; + OLECHAR* mCurFileUrl; + BOOL mbLoad; + BOOL mbViewOnly; WNDCLASS mPWinClass; - HWND mParentWin; - HWND mOffWin; + HWND mParentWin; + HWND mOffWin; SODispatchInterceptor* mpDispatchInterceptor; - SOVersion mnVersion; + SOVersion mnVersion; - BOOL mbReadyForActivation; - CComPtr<IDispatch> mpDispTempFile; + BOOL mbReadyForActivation; + CComPtr<IDispatch> mpDispTempFile; - BOOL mbDrawLocked; + BOOL mbDrawLocked; public: CSOActiveX(); @@ -105,7 +105,7 @@ BEGIN_COM_MAP(CSOActiveX) COM_INTERFACE_ENTRY(IOleObject) COM_INTERFACE_ENTRY(IPersistStreamInit) COM_INTERFACE_ENTRY2(IPersist, IPersistStreamInit) -// COM_INTERFACE_ENTRY(IConnectionPointContainer) +// COM_INTERFACE_ENTRY(IConnectionPointContainer) COM_INTERFACE_ENTRY(IProvideClassInfo) COM_INTERFACE_ENTRY(IProvideClassInfo2) COM_INTERFACE_ENTRY(IPersistPropertyBag) @@ -162,7 +162,7 @@ public: HRESULT CallDispatchMethod( OLECHAR* sUrl, CComVariant* sArgNames, CComVariant* sArgVal, unsigned int count ); HRESULT CallLoadComponentFromURL1PBool( OLECHAR* sUrl, OLECHAR* sArgName, BOOL sArgVal ); HRESULT GetUrlStruct( OLECHAR* sUrl, CComPtr<IDispatch>& pdispUrl ); - HRESULT Cleanup(); + HRESULT Cleanup(); HRESULT TerminateOffice(); HRESULT GetURL( const OLECHAR* url, const OLECHAR* target ); diff --git a/extensions/source/activex/main/SOComWindowPeer.cpp b/extensions/source/activex/main/SOComWindowPeer.cpp index 6ae1c805fa39..b6c0986c0ab2 100644 --- a/extensions/source/activex/main/SOComWindowPeer.cpp +++ b/extensions/source/activex/main/SOComWindowPeer.cpp @@ -10,7 +10,7 @@ STDMETHODIMP SOComWindowPeer::InterfaceSupportsErrorInfo(REFIID riid) { - static const IID* arr[] = + static const IID* arr[] = { &IID_ISOComWindowPeer, }; diff --git a/extensions/source/activex/main/SODispatchInterceptor.cpp b/extensions/source/activex/main/SODispatchInterceptor.cpp index 5a4455265b97..eadce51085e8 100644 --- a/extensions/source/activex/main/SODispatchInterceptor.cpp +++ b/extensions/source/activex/main/SODispatchInterceptor.cpp @@ -13,7 +13,7 @@ STDMETHODIMP SODispatchInterceptor::InterfaceSupportsErrorInfo(REFIID riid) { - static const IID* arr[] = + static const IID* arr[] = { &IID_ISODispatchInterceptor, }; @@ -71,7 +71,7 @@ STDMETHODIMP SODispatchInterceptor::queryDispatch( IDispatch FAR* aURL, aArgs[0] = CComVariant( nSearchFlags ); aArgs[1] = CComVariant( aTargetFrameName ); aArgs[2] = CComVariant( aURL ); - + hr = ExecuteFunc( m_xSlave, L"queryDispatch", aArgs, 3, &aResult ); if( !SUCCEEDED( hr ) || aResult.vt != VT_DISPATCH || aResult.pdispVal == NULL ) { @@ -91,9 +91,9 @@ STDMETHODIMP SODispatchInterceptor::queryDispatch( IDispatch FAR* aURL, STDMETHODIMP SODispatchInterceptor::queryDispatches( SAFEARRAY FAR* aDescripts, SAFEARRAY FAR* FAR* retVal) { - if ( !aDescripts || !retVal || SafeArrayGetDim( aDescripts ) != 1 ) + if ( !aDescripts || !retVal || SafeArrayGetDim( aDescripts ) != 1 ) return E_FAIL; - + long nLB, nUB; HRESULT hr = SafeArrayGetLBound( aDescripts, 1, &nLB ); @@ -128,7 +128,7 @@ STDMETHODIMP SODispatchInterceptor::queryDispatches( SAFEARRAY FAR* aDescripts, return S_OK; } - + STDMETHODIMP SODispatchInterceptor::dispatch( IDispatch FAR* aURL, SAFEARRAY FAR* aArgs) { // get url from aURL @@ -185,19 +185,19 @@ STDMETHODIMP SODispatchInterceptor::dispatch( IDispatch FAR* aURL, SAFEARRAY FAR return S_OK; } - + STDMETHODIMP SODispatchInterceptor::addStatusListener( IDispatch FAR* /*xControl*/, IDispatch FAR* /*aURL*/) { // not implemented return S_OK; } - + STDMETHODIMP SODispatchInterceptor::removeStatusListener( IDispatch FAR* /*xControl*/, IDispatch FAR* /*aURL*/) { // not implemented return S_OK; } - + STDMETHODIMP SODispatchInterceptor::getInterceptedURLs( SAFEARRAY FAR* FAR* pVal ) { *pVal = SafeArrayCreateVector( VT_BSTR, 0, 3 ); diff --git a/extensions/source/activex/main/SODispatchInterceptor.h b/extensions/source/activex/main/SODispatchInterceptor.h index 538b12f24d2e..1a9b7e38cd6a 100644 --- a/extensions/source/activex/main/SODispatchInterceptor.h +++ b/extensions/source/activex/main/SODispatchInterceptor.h @@ -33,10 +33,10 @@ class SODispatchInterceptor : public CComObjectRoot, public CComCoClass<SODispatchInterceptor,&CLSID_SODispatchInterceptor> { - CComPtr<IDispatch> m_xMaster; - CComPtr<IDispatch> m_xSlave; - CSOActiveX* m_xParentControl; - CRITICAL_SECTION mMutex; + CComPtr<IDispatch> m_xMaster; + CComPtr<IDispatch> m_xSlave; + CSOActiveX* m_xParentControl; + CRITICAL_SECTION mMutex; public: SODispatchInterceptor() : m_xParentControl( NULL ) { InitializeCriticalSection(&mMutex); } virtual ~SODispatchInterceptor() { ATLASSERT( !m_xParentControl ); DeleteCriticalSection(&mMutex); } diff --git a/extensions/source/activex/main/com_uno_helper.h b/extensions/source/activex/main/com_uno_helper.h index 230fc63a6e77..94573c645d16 100644 --- a/extensions/source/activex/main/com_uno_helper.h +++ b/extensions/source/activex/main/com_uno_helper.h @@ -1,26 +1,26 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ #include "stdafx2.h" -HRESULT ExecuteFunc( IDispatch* idispUnoObject, - OLECHAR* sFuncName, - CComVariant* params, - unsigned int count, +HRESULT ExecuteFunc( IDispatch* idispUnoObject, + OLECHAR* sFuncName, + CComVariant* params, + unsigned int count, CComVariant* pResult ); -HRESULT GetIDispByFunc( IDispatch* idispUnoObject, - OLECHAR* sFuncName, - CComVariant* params, - unsigned int count, +HRESULT GetIDispByFunc( IDispatch* idispUnoObject, + OLECHAR* sFuncName, + CComVariant* params, + unsigned int count, CComPtr<IDispatch>& pdispResult ); -HRESULT PutPropertiesToIDisp( IDispatch* pdispObject, - OLECHAR** sMemberNames, - CComVariant* pVariant, +HRESULT PutPropertiesToIDisp( IDispatch* pdispObject, + OLECHAR** sMemberNames, + CComVariant* pVariant, unsigned int count ); -HRESULT GetPropertiesFromIDisp( IDispatch* pdispObject, - OLECHAR** sMemberNames, - CComVariant* pVariant, +HRESULT GetPropertiesFromIDisp( IDispatch* pdispObject, + OLECHAR** sMemberNames, + CComVariant* pVariant, unsigned int count ); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/extensions/source/activex/main/resource.h b/extensions/source/activex/main/resource.h index fe74853c6d15..a80234031fb0 100644 --- a/extensions/source/activex/main/resource.h +++ b/extensions/source/activex/main/resource.h @@ -15,7 +15,7 @@ // Next default values for new objects -// +// #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 201 diff --git a/extensions/source/activex/main/so_activex.cpp b/extensions/source/activex/main/so_activex.cpp index 43e49b6b3345..a681d18f6ffa 100644 --- a/extensions/source/activex/main/so_activex.cpp +++ b/extensions/source/activex/main/so_activex.cpp @@ -3,7 +3,7 @@ // Note: Proxy/Stub Information -// To build a separate proxy/stub DLL, +// To build a separate proxy/stub DLL, // run nmake -f so_activexps.mk in the project directory. #include "stdio.h" @@ -30,14 +30,14 @@ END_OBJECT_MAP() #define X32_LIB_NAME "so_activex.dll" // 06.11.2009 tkr: to provide windows xp as build systems for mingw we need to define KEY_WOW64_64KEY -// in mingw 3.13 KEY_WOW64_64KEY isn't available < Win2003 systems. +// in mingw 3.13 KEY_WOW64_64KEY isn't available < Win2003 systems. // Also defined in setup_native\source\win32\customactions\reg64\reg64.cxx,source\win32\customactions\shellextensions\shellextensions.cxx and // extensions\source\activex\main\so_activex.cpp #ifndef KEY_WOW64_64KEY - #define KEY_WOW64_64KEY (0x0100) + #define KEY_WOW64_64KEY (0x0100) #endif #ifndef KEY_WOW64_32KEY - #define KEY_WOW64_32KEY (0x0200) + #define KEY_WOW64_32KEY (0x0200) #endif const REGSAM n64KeyAccess = KEY_ALL_ACCESS | KEY_WOW64_64KEY; @@ -53,7 +53,7 @@ const BOOL bX64 = FALSE; // 10.11.2009 tkr: MinGW doesn't know anything about RegDeleteKeyExA if WINVER < 0x0502. extern "C" { -WINADVAPI LONG WINAPI RegDeleteKeyExA(HKEY,LPCSTR,REGSAM,DWORD); +WINADVAPI LONG WINAPI RegDeleteKeyExA(HKEY,LPCSTR,REGSAM,DWORD); } ///////////////////////////////////////////////////////////////////////////// @@ -102,14 +102,14 @@ const char* aFileExt[] = { ".vor", const char* aMimeType[] = { "application/vnd.stardivision.writer", - "application/vnd.stardivision.chart", + "application/vnd.stardivision.chart", "application/vnd.stardivision.draw", "application/vnd.stardivision.impress", "application/vnd.stardivision.impress-packed", "application/vnd.stardivision.calc", "application/vnd.stardivision.writer", "application/vnd.stardivision.math", - + MIMETYPE_VND_SUN_XML_WRITER_TEMPLATE_ASCII, MIMETYPE_VND_SUN_XML_CALC_TEMPLATE_ASCII, MIMETYPE_VND_SUN_XML_IMPRESS_TEMPLATE_ASCII, @@ -164,27 +164,27 @@ const char* aLocalPrefix = "Software\\Classes\\"; BOOL createKey( HKEY hkey, const char* aKeyToCreate, REGSAM nKeyAccess, - const char* aValue = NULL, - const char* aChildName = NULL, + const char* aValue = NULL, + const char* aChildName = NULL, const char* aChildValue = NULL ) { HKEY hkey1; - - return ( ERROR_SUCCESS == RegCreateKeyExA( hkey, aKeyToCreate, 0, NULL, REG_OPTION_NON_VOLATILE, nKeyAccess, NULL, &hkey1 , NULL ) - && ( !aValue || ERROR_SUCCESS == RegSetValueExA( hkey1, - "", - 0, - REG_SZ, - (const BYTE*)aValue, + + return ( ERROR_SUCCESS == RegCreateKeyExA( hkey, aKeyToCreate, 0, NULL, REG_OPTION_NON_VOLATILE, nKeyAccess, NULL, &hkey1 , NULL ) + && ( !aValue || ERROR_SUCCESS == RegSetValueExA( hkey1, + "", + 0, + REG_SZ, + (const BYTE*)aValue, strlen( aValue ) ) ) - && ( !aChildName || ERROR_SUCCESS == RegSetValueExA( hkey1, - aChildName, - 0, - REG_SZ, - (const BYTE*)aChildValue, + && ( !aChildName || ERROR_SUCCESS == RegSetValueExA( hkey1, + aChildName, + 0, + REG_SZ, + (const BYTE*)aChildValue, strlen( aChildValue ) ) ) && ERROR_SUCCESS == RegCloseKey( hkey1 ) ); - + } STDAPI DllUnregisterServerNative( int nMode, BOOL bForAllUsers, BOOL bFor64Bit ); @@ -204,7 +204,7 @@ STDAPI DllRegisterServerNative_Impl( int nMode, BOOL bForAllUsers, REGSAM nKeyAc char pActiveXPath[1124]; char pActiveXPath101[1124]; - + // In case SO7 is installed for this user he can have local registry entries that will prevent him from // using SO8 ActiveX control. The fix is just to clean up the local entries related to ActiveX control. // Unfortunately it can be done only for the user who installs the office. @@ -222,7 +222,7 @@ STDAPI DllRegisterServerNative_Impl( int nMode, BOOL bForAllUsers, REGSAM nKeyAc { wsprintfA( aSubKey, "%sCLSID\\%s", aPrefix, aClassID ); - aResult = + aResult = ( ERROR_SUCCESS == RegCreateKeyExA( bForAllUsers ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER, aSubKey, 0, NULL, REG_OPTION_NON_VOLATILE, nKeyAccess, NULL, &hkey , NULL ) && ERROR_SUCCESS == RegSetValueExA( hkey, "", 0, REG_SZ, (const BYTE*)"SOActiveX Class", 17 ) && createKey( hkey, "Control", nKeyAccess ) @@ -291,22 +291,22 @@ STDAPI DllRegisterServerNative_Impl( int nMode, BOOL bForAllUsers, REGSAM nKeyAc { wsprintfA( aSubKey, "%sMIME\\DataBase\\Content Type\\%s", aPrefix, aMimeType[ind] ); if ( ERROR_SUCCESS != RegCreateKeyExA( bForAllUsers ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER, aSubKey, 0, NULL, REG_OPTION_NON_VOLATILE, nKeyAccess, NULL, &hkey, NULL ) -// || ERROR_SUCCESS != RegSetValueExA(hkey, "Extension", 0, REG_SZ, +// || ERROR_SUCCESS != RegSetValueExA(hkey, "Extension", 0, REG_SZ, // (const BYTE *)aFileExt[ind], strlen( aFileExt[ind] ) ) || ERROR_SUCCESS != RegSetValueExA(hkey, "CLSID", 0, REG_SZ, (const BYTE *)aClassID, strlen(aClassID)) ) aResult = FALSE; - - if( hkey ) + + if( hkey ) RegCloseKey(hkey),hkey= NULL; /* wsprintfA( aSubKey, "%s%s", aPrefix, aFileExt[ind] ); - if ( ERROR_SUCCESS != RegCreateKeyExA( bForAllUsers ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER, aSubKey, 0, NULL, REG_OPTION_NON_VOLATILE, nKeyAccess, NULL, &hkey, NULL ) + if ( ERROR_SUCCESS != RegCreateKeyExA( bForAllUsers ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER, aSubKey, 0, NULL, REG_OPTION_NON_VOLATILE, nKeyAccess, NULL, &hkey, NULL ) || ERROR_SUCCESS != RegSetValueExA(hkey, "Content Type", 0, REG_SZ, (const BYTE *)aMimeType[ind], strlen( aMimeType[ind] ) ) ) aResult = FALSE; - if( hkey ) + if( hkey ) RegCloseKey(hkey),hkey= NULL; */ } @@ -320,7 +320,7 @@ STDAPI DllRegisterServerNative_Impl( int nMode, BOOL bForAllUsers, REGSAM nKeyAc wsprintfA( aSubKey, "EnableFullPage\\%s", aFileExt[ind] ); if ( ERROR_SUCCESS != RegCreateKeyExA( hkey, aSubKey, 0, NULL, REG_OPTION_NON_VOLATILE, nKeyAccess, NULL, &hkey1 , NULL ) ) aResult = FALSE; - + if ( hkey1 ) RegCloseKey(hkey1),hkey1= NULL; } @@ -375,7 +375,7 @@ STDAPI DllUnregisterServerNative_Impl( int nMode, BOOL bForAllUsers, REGSAM nKey BOOL fErr = FALSE; char aSubKey[513]; const char* aPrefix = aLocalPrefix; // bForAllUsers ? "" : aLocalPrefix; - + for( int ind = 0; ind < SUPPORTED_EXT_NUM; ind++ ) { if( nForModes[ind] & nMode ) @@ -388,7 +388,7 @@ STDAPI DllUnregisterServerNative_Impl( int nMode, BOOL bForAllUsers, REGSAM nKey { if ( ERROR_SUCCESS != RegDeleteValue( hkey, "CLSID" ) ) fErr = TRUE; - + if ( ERROR_SUCCESS != RegQueryInfoKey( hkey, NULL, NULL, NULL, &nSubKeys, NULL, NULL, &nValues, NULL, NULL, NULL, NULL ) ) @@ -396,14 +396,14 @@ STDAPI DllUnregisterServerNative_Impl( int nMode, BOOL bForAllUsers, REGSAM nKey RegCloseKey( hkey ), hkey = NULL; fErr = TRUE; } - else + else { RegCloseKey( hkey ), hkey = NULL; if ( !nSubKeys && !nValues ) DeleteKeyTree( bForAllUsers ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER, aSubKey, nKeyAccess ); } } - + wsprintfA( aSubKey, "%s%s", aPrefix, aFileExt[ind] ); if ( ERROR_SUCCESS != RegCreateKeyExA( bForAllUsers ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER, aSubKey, 0, NULL, REG_OPTION_NON_VOLATILE, nKeyAccess, NULL, &hkey, NULL ) ) fErr = TRUE; @@ -416,7 +416,7 @@ STDAPI DllUnregisterServerNative_Impl( int nMode, BOOL bForAllUsers, REGSAM nKey RegCloseKey( hkey ), hkey = NULL; fErr = TRUE; } - else + else { RegCloseKey( hkey ), hkey = NULL; if ( !nSubKeys && !nValues ) @@ -472,12 +472,12 @@ STDAPI DllUnregisterServerNative( int nMode, BOOL bForAllUsers, BOOL bFor64Bit ) #define SUPPORTED_MSEXT_NUM 7 const char* aMSFileExt[] = { ".dot", ".doc", ".xlt", ".xls", ".pot", ".ppt", ".pps" }; -const char* aMSMimeType[] = { "application/msword", - "application/msword", - "application/msexcell", - "application/msexcell", - "application/mspowerpoint", - "application/mspowerpoint", +const char* aMSMimeType[] = { "application/msword", + "application/msword", + "application/msexcell", + "application/msexcell", + "application/mspowerpoint", + "application/mspowerpoint", "application/mspowerpoint" }; const int nForMSModes[] = { 1, 1, 2, 2, 4, 4, 4 }; @@ -504,22 +504,22 @@ STDAPI DllRegisterServerDoc_Impl( int nMode, BOOL bForAllUsers, REGSAM nKeyAcces { wsprintfA( aSubKey, "%sMIME\\DataBase\\Content Type\\%s", aPrefix, aMSMimeType[ind] ); if ( ERROR_SUCCESS != RegCreateKeyExA( bForAllUsers ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER, aSubKey, 0, NULL, REG_OPTION_NON_VOLATILE, nKeyAccess, NULL, &hkey, NULL ) - || ERROR_SUCCESS != RegSetValueExA(hkey, "Extension", 0, REG_SZ, + || ERROR_SUCCESS != RegSetValueExA(hkey, "Extension", 0, REG_SZ, (const BYTE *)aMSFileExt[ind], strlen( aMSFileExt[ind] ) ) || ERROR_SUCCESS != RegSetValueExA(hkey, "CLSID", 0, REG_SZ, (const BYTE *)aClassID, strlen(aClassID)) ) aResult = FALSE; - - if( hkey ) + + if( hkey ) RegCloseKey(hkey),hkey= NULL; - + wsprintfA( aSubKey, "%s%s", aPrefix, aMSFileExt[ind] ); - if ( ERROR_SUCCESS != RegCreateKeyExA( bForAllUsers ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER, aSubKey, 0, NULL, REG_OPTION_NON_VOLATILE, nKeyAccess, NULL, &hkey, NULL ) + if ( ERROR_SUCCESS != RegCreateKeyExA( bForAllUsers ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER, aSubKey, 0, NULL, REG_OPTION_NON_VOLATILE, nKeyAccess, NULL, &hkey, NULL ) || ERROR_SUCCESS != RegSetValueExA(hkey, "Content Type", 0, REG_SZ, (const BYTE *)aMSMimeType[ind], strlen( aMSMimeType[ind] ) ) ) aResult = FALSE; - - if( hkey ) + + if( hkey ) RegCloseKey(hkey),hkey= NULL; } } @@ -572,13 +572,13 @@ STDAPI DllUnregisterServerDoc_Impl( int nMode, BOOL bForAllUsers, REGSAM nKeyAcc BOOL fErr = FALSE; char aSubKey[513]; const char* aPrefix = aLocalPrefix; // bForAllUsers ? "" : aLocalPrefix; - + for( int ind = 0; ind < SUPPORTED_MSEXT_NUM; ind++ ) { if( nForMSModes[ind] & nMode ) { DWORD nSubKeys = 0, nValues = 0; - + wsprintfA( aSubKey, "%sMIME\\DataBase\\Content Type\\%s", aPrefix, aMSMimeType[ind] ); if ( ERROR_SUCCESS != RegCreateKeyExA( bForAllUsers ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER, aSubKey, 0, NULL, REG_OPTION_NON_VOLATILE, nKeyAccess, NULL, &hkey, NULL ) ) fErr = TRUE; @@ -597,7 +597,7 @@ STDAPI DllUnregisterServerDoc_Impl( int nMode, BOOL bForAllUsers, REGSAM nKeyAcc RegCloseKey( hkey ), hkey = NULL; fErr = TRUE; } - else + else { RegCloseKey( hkey ), hkey = NULL; if ( !nSubKeys && !nValues ) @@ -620,7 +620,7 @@ STDAPI DllUnregisterServerDoc_Impl( int nMode, BOOL bForAllUsers, REGSAM nKeyAcc RegCloseKey( hkey ), hkey = NULL; fErr = TRUE; } - else + else { RegCloseKey( hkey ), hkey = NULL; if ( !nSubKeys && !nValues ) diff --git a/extensions/source/activex/msidl/so_activex.idl b/extensions/source/activex/msidl/so_activex.idl index d1a7d9936eed..ff396f5f9008 100644 --- a/extensions/source/activex/msidl/so_activex.idl +++ b/extensions/source/activex/msidl/so_activex.idl @@ -29,36 +29,36 @@ import "ocidl.idl"; ] interface ISOComWindowPeer : IDispatch { - [id(1), helpstring("method getWindowHandle")] + [id(1), helpstring("method getWindowHandle")] HRESULT getWindowHandle( [in] SAFEARRAY(VARIANT) procId, [in] short s, [out,retval] long* ret); - [id(2), helpstring("method getToolkit")] + [id(2), helpstring("method getToolkit")] HRESULT getToolkit( [out,retval] IDispatch** retVal ); - [id(3), helpstring("method setPointer")] + [id(3), helpstring("method setPointer")] HRESULT setPointer( [in] IDispatch* xPointer ); - [id(4), helpstring("method setBackground")] + [id(4), helpstring("method setBackground")] HRESULT setBackground( [in] int nColor ); - [id(5), helpstring("method invalidate")] + [id(5), helpstring("method invalidate")] HRESULT invalidate( [in] short ); - [id(6), helpstring("method invalidateRect")] + [id(6), helpstring("method invalidateRect")] HRESULT invalidateRect( [in] IDispatch* aRect, [in] short nFlags ); - [id(7), helpstring("method dispose")] + [id(7), helpstring("method dispose")] HRESULT dispose(); - [id(8), helpstring("method addEventListener")] + [id(8), helpstring("method addEventListener")] HRESULT addEventListener( [in] IDispatch* xListener ); - [id(9), helpstring("method removeEventListener")] + [id(9), helpstring("method removeEventListener")] HRESULT removeEventListener( [in] IDispatch* xListener ); - [propget, id(10), helpstring("property_implementedInterfaces")] + [propget, id(10), helpstring("property_implementedInterfaces")] HRESULT Bridge_implementedInterfaces([out, retval] SAFEARRAY(BSTR) *pVal); }; @@ -71,20 +71,20 @@ interface ISOComWindowPeer : IDispatch ] interface ISODispatchInterceptor : IDispatch { -//com.sun.star.frame.XDispatchProviderInterceptor +//com.sun.star.frame.XDispatchProviderInterceptor [id(1), helpstring("method getSlaveDispatchProvider")] HRESULT getSlaveDispatchProvider( [out,retval] IDispatch** retVal ); - [id(2), helpstring("method setSlaveDispatchProvider")] + [id(2), helpstring("method setSlaveDispatchProvider")] HRESULT setSlaveDispatchProvider( [in] IDispatch* xNewDispatchProvider ); - [id(3), helpstring("method getMasterDispatchProvider")] + [id(3), helpstring("method getMasterDispatchProvider")] HRESULT getMasterDispatchProvider( [out,retval] IDispatch** retVal ); - [id(4), helpstring("method setMasterDispatchProvider")] + [id(4), helpstring("method setMasterDispatchProvider")] HRESULT setMasterDispatchProvider( [in] IDispatch* xNewSupplier ); - + // com.sun.star.frame.XDispatchProvider [id(5), helpstring("method queryDispatch")] @@ -93,7 +93,7 @@ interface ISODispatchInterceptor : IDispatch [in] long nSearchFlags, [out,retval] IDispatch** retVal ); - [id(6), helpstring("method queryDispatches")] + [id(6), helpstring("method queryDispatches")] HRESULT queryDispatches( [in] SAFEARRAY(IDispatch*) aDescripts, [out,retval] SAFEARRAY(VARIANT)* retVal ); @@ -104,14 +104,14 @@ interface ISODispatchInterceptor : IDispatch HRESULT dispatch( [in] IDispatch* aURL, [in] SAFEARRAY(VARIANT) aArgs ); - [id(8), helpstring("method addStatusListener")] + [id(8), helpstring("method addStatusListener")] HRESULT addStatusListener( [in] IDispatch* xControl, [in] IDispatch* aURL ); - [id(9), helpstring("method removeStatusListener")] + [id(9), helpstring("method removeStatusListener")] HRESULT removeStatusListener( [in] IDispatch* xControl, [in] IDispatch* aURL ); - + // com.sun.star.frame.XInterceptorInfo @@ -119,7 +119,7 @@ interface ISODispatchInterceptor : IDispatch HRESULT getInterceptedURLs( [out,retval] SAFEARRAY(BSTR)* pVal ); // the common UNO-COM staff - [propget, id(11), helpstring("property_implementedInterfaces")] + [propget, id(11), helpstring("property_implementedInterfaces")] HRESULT Bridge_implementedInterfaces([out, retval] SAFEARRAY(BSTR) *pVal); }; @@ -138,12 +138,12 @@ interface ISOActionsApproval : IDispatch { //com.sun.star.embed.XActionsApproval - [id(1), helpstring("method approveAction")] + [id(1), helpstring("method approveAction")] HRESULT approveAction( [in] long aActionID, [out,retval] boolean* pbApproval ); // the common UNO-COM staff - [propget, id(2), helpstring("property_implementedInterfaces")] + [propget, id(2), helpstring("property_implementedInterfaces")] HRESULT Bridge_implementedInterfaces([out, retval] SAFEARRAY(BSTR) *pVal); }; diff --git a/extensions/source/bibliography/bib.hrc b/extensions/source/bibliography/bib.hrc index 319c58d509ad..eb6afcb44135 100644 --- a/extensions/source/bibliography/bib.hrc +++ b/extensions/source/bibliography/bib.hrc @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -30,50 +30,50 @@ #include "bibliography.hrc" #ifndef RID_BIB_START -#define RID_BIB_START RID_EXTENSIONS_START +#define RID_BIB_START RID_EXTENSIONS_START #endif // ResIDs //Dialogs (100) -#define RID_BIB_DIALOG (RID_BIB_START) -#define RID_TP_GENERAL (RID_BIB_DIALOG) +#define RID_BIB_DIALOG (RID_BIB_START) +#define RID_TP_GENERAL (RID_BIB_DIALOG) #define RID_DLG_MAPPING (RID_BIB_DIALOG + 1) #define RID_DLG_DBCHANGE (RID_BIB_DIALOG + 2) //Controls(100) -#define RID_BIB_CONTROLS (RID_BIB_START + 100) -#define RID_BIB_TOOLBAR (RID_BIB_CONTROLS+ 1) +#define RID_BIB_CONTROLS (RID_BIB_START + 100) +#define RID_BIB_TOOLBAR (RID_BIB_CONTROLS+ 1) #define RID_TOOLBAR_IMGLIST (RID_BIB_CONTROLS+ 2) #define RID_TOOLBAR_IMGLIST_HC (RID_BIB_CONTROLS+ 3) #define RID_TOOLBAR_BIGIMGLIST (RID_BIB_CONTROLS+ 4) #define RID_TOOLBAR_BIGIMGLIST_HC (RID_BIB_CONTROLS+ 5) //Menu(100) -#define RID_BIB_MENU (RID_BIB_CONTROLS + 100) -#define RID_MAIN_MENU (RID_BIB_MENU +1) -//#define RID_MAIN_ME_HIERARCHICAL (RID_BIB_MENU +2) -#define RID_MAIN_ME_NEWENTRY (RID_BIB_MENU +3) -#define RID_MAIN_ME_CHANGEENTRY (RID_BIB_MENU +4) -#define RID_MAIN_ME_REMOVEENTRY (RID_BIB_MENU +5) -#define RID_MAIN_ME_SEARCH (RID_BIB_MENU +6) -#define RID_MAIN_ME_FIELDDLG (RID_BIB_MENU +7) -//#define RID_MAIN_ME_LAYOUT (RID_BIB_MENU +8) -#define RID_MAIN_ME_MAPPING (RID_BIB_MENU +9) -#define RID_MAIN_ME_DBSOURCE (RID_BIB_MENU +10) +#define RID_BIB_MENU (RID_BIB_CONTROLS + 100) +#define RID_MAIN_MENU (RID_BIB_MENU +1) +//#define RID_MAIN_ME_HIERARCHICAL (RID_BIB_MENU +2) +#define RID_MAIN_ME_NEWENTRY (RID_BIB_MENU +3) +#define RID_MAIN_ME_CHANGEENTRY (RID_BIB_MENU +4) +#define RID_MAIN_ME_REMOVEENTRY (RID_BIB_MENU +5) +#define RID_MAIN_ME_SEARCH (RID_BIB_MENU +6) +#define RID_MAIN_ME_FIELDDLG (RID_BIB_MENU +7) +//#define RID_MAIN_ME_LAYOUT (RID_BIB_MENU +8) +#define RID_MAIN_ME_MAPPING (RID_BIB_MENU +9) +#define RID_MAIN_ME_DBSOURCE (RID_BIB_MENU +10) #define RID_MAIN_DELETE_RECORD (RID_BIB_MENU +11) #define RID_MAIN_INSERT_RECORD (RID_BIB_MENU +12) -#define MN_TEMPLATES (RID_BIB_MENU +13) // to make makro ITEM_FILE_DOCTEMPLATE happy... +#define MN_TEMPLATES (RID_BIB_MENU +13) // to make makro ITEM_FILE_DOCTEMPLATE happy... -#define RID_POPUP_ME_VIEW (RID_BIB_MENU +50) +#define RID_POPUP_ME_VIEW (RID_BIB_MENU +50) // Strings (500) -#define RID_BIB_STRING (RID_BIB_START + 200) - // FREE (RID_BIB_STRING + 1) -#define RID_BIB_STR_FIELDSELECTION (RID_BIB_STRING + 2) -#define RID_BIB_STR_TABWIN_PREFIX (RID_BIB_STRING + 3) -#define RID_BIB_STR_FRAME_TITLE (RID_BIB_STRING + 4) -#define RID_MAP_QUESTION (RID_BIB_STRING + 5) +#define RID_BIB_STRING (RID_BIB_START + 200) + // FREE (RID_BIB_STRING + 1) +#define RID_BIB_STR_FIELDSELECTION (RID_BIB_STRING + 2) +#define RID_BIB_STR_TABWIN_PREFIX (RID_BIB_STRING + 3) +#define RID_BIB_STR_FRAME_TITLE (RID_BIB_STRING + 4) +#define RID_MAP_QUESTION (RID_BIB_STRING + 5) #define ST_IDENTIFIER (RID_BIB_STRING + 6) #define ST_AUTHTYPE (RID_BIB_STRING + 7) diff --git a/extensions/source/bibliography/bib.src b/extensions/source/bibliography/bib.src index 1ad6a7c83d17..1492de7b650a 100644 --- a/extensions/source/bibliography/bib.src +++ b/extensions/source/bibliography/bib.src @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/bibliography/bibbeam.cxx b/extensions/source/bibliography/bibbeam.cxx index 6caac4f610d3..f6f7c93f0470 100644 --- a/extensions/source/bibliography/bibbeam.cxx +++ b/extensions/source/bibliography/bibbeam.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -53,9 +53,9 @@ using namespace ::com::sun::star::uno; #define C2U(cChar) OUString::createFromAscii(cChar) -#define PROPERTY_FRAME 1 -#define ID_TOOLBAR 1 -#define ID_GRIDWIN 2 +#define PROPERTY_FRAME 1 +#define ID_TOOLBAR 1 +#define ID_GRIDWIN 2 //......................................................................... namespace bib @@ -66,14 +66,14 @@ namespace bib void HandleTaskPaneList( Window* pWindow, BOOL bAddToList ) { - Window* pParent = pWindow->GetParent(); + Window* pParent = pWindow->GetParent(); DBG_ASSERT( pParent, "-GetTaskPaneList(): everybody here should have a parent!" ); - SystemWindow* pSysWin = pParent->GetSystemWindow(); + SystemWindow* pSysWin = pParent->GetSystemWindow(); if( pSysWin ) { - TaskPaneList* pTaskPaneList = pSysWin->GetTaskPaneList(); + TaskPaneList* pTaskPaneList = pSysWin->GetTaskPaneList(); if( pTaskPaneList ) { if( bAddToList ) @@ -91,16 +91,16 @@ namespace bib :public Window //DockingWindow { private: - Reference< awt::XWindow > m_xGridWin; - Reference< awt::XControlModel > m_xGridModel; - Reference< awt::XControl > m_xControl; - Reference< awt::XControlContainer > m_xControlContainer; + Reference< awt::XWindow > m_xGridWin; + Reference< awt::XControlModel > m_xGridModel; + Reference< awt::XControl > m_xControl; + Reference< awt::XControlContainer > m_xControlContainer; // #100312# --------- Reference< frame::XDispatchProviderInterception> m_xDispatchProviderInterception; - + protected: - virtual void Resize(); + virtual void Resize(); public: @@ -154,7 +154,7 @@ namespace bib if ( m_xGridModel.is() && xMgr.is()) { - uno::Reference< XPropertySet > xPropSet( m_xGridModel, UNO_QUERY ); + uno::Reference< XPropertySet > xPropSet( m_xGridModel, UNO_QUERY ); if ( xPropSet.is() && m_xGridModel.is() ) { @@ -289,7 +289,7 @@ namespace bib xReturn = pGridWin->getDispatchProviderInterception(); return xReturn; } - + //--------------------------------------------------------------------- void BibBeamer::SetXController(const uno::Reference< frame::XController > & xCtr) { @@ -316,7 +316,7 @@ namespace bib } //......................................................................... -} // namespace bib +} // namespace bib //......................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/extensions/source/bibliography/bibbeam.hxx b/extensions/source/bibliography/bibbeam.hxx index 68fc1fe38441..c9742b38baaa 100644 --- a/extensions/source/bibliography/bibbeam.hxx +++ b/extensions/source/bibliography/bibbeam.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -55,40 +55,40 @@ namespace bib { private: - ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController > m_xController; - ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > m_xToolBarRef; - ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > m_xGridRef; - ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > m_xGridWin; + ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController > m_xController; + ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > m_xToolBarRef; + ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > m_xGridRef; + ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > m_xGridWin; - BibDataManager* pDatMan; - BibToolBar* pToolBar; - BibGridwin* pGridWin; + BibDataManager* pDatMan; + BibToolBar* pToolBar; + BibGridwin* pGridWin; DECL_LINK( RecalcLayout_Impl, void* ); protected: - void createToolBar(); - void createGridWin(); + void createToolBar(); + void createGridWin(); // FormControlContainer ---------- virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer > getControlContainer(); public: // #100312# ------------------- - virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProviderInterception > + virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProviderInterception > getDispatchProviderInterception(); BibBeamer(Window* pParent,BibDataManager* pDatMan, WinBits nStyle = WB_3DLOOK ); ~BibBeamer(); - void SetXController(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController > &); + void SetXController(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController > &); - virtual void GetFocus(); + virtual void GetFocus(); }; //......................................................................... -} // namespace bib +} // namespace bib //......................................................................... #endif diff --git a/extensions/source/bibliography/bibconfig.cxx b/extensions/source/bibliography/bibconfig.cxx index 2ab99b35bf23..adf7ef75c276 100644 --- a/extensions/source/bibliography/bibconfig.cxx +++ b/extensions/source/bibliography/bibconfig.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -189,7 +189,7 @@ BibConfig::BibConfig() : pAssignmentPropertyNames[nFieldIdx] = sSubPrefix; pAssignmentPropertyNames[nFieldIdx++] += C2U("/ProgrammaticFieldName"); pAssignmentPropertyNames[nFieldIdx] = sSubPrefix; - pAssignmentPropertyNames[nFieldIdx++] += C2U("/AssignedFieldName"); + pAssignmentPropertyNames[nFieldIdx++] += C2U("/AssignedFieldName"); } Sequence<Any> aAssignmentValues = GetProperties(aAssignmentPropertyNames); const Any* pAssignmentValues = aAssignmentValues.getConstArray(); @@ -225,7 +225,7 @@ BibConfig::~BibConfig() ---------------------------------------------------------------------------*/ BibDBDescriptor BibConfig::GetBibliographyURL() { - BibDBDescriptor aRet; + BibDBDescriptor aRet; aRet.sDataSource = sDataSource; aRet.sTableOrQuery = sTableOrQuery; aRet.nCommandType = nTblOrQuery; @@ -246,7 +246,7 @@ void BibConfig::Notify( const com::sun::star::uno::Sequence<rtl::OUString>& ) { } -void BibConfig::Commit() +void BibConfig::Commit() { const Sequence<OUString> aPropertyNames = GetPropertyNames(); Sequence<Any> aValues(aPropertyNames.getLength()); @@ -285,13 +285,13 @@ void BibConfig::Commit() sPrefix += C2U("/_"); sPrefix += OUString::valueOf(i); sPrefix += C2U("/"); - pNodeValues[nIndex].Name = sPrefix; - pNodeValues[nIndex].Name += sName; + pNodeValues[nIndex].Name = sPrefix; + pNodeValues[nIndex].Name += sName; pNodeValues[nIndex++].Value <<= pMapping->sURL; - pNodeValues[nIndex].Name = sPrefix; + pNodeValues[nIndex].Name = sPrefix; pNodeValues[nIndex].Name += sTable; pNodeValues[nIndex++].Value <<= pMapping->sTableName; - pNodeValues[nIndex].Name = sPrefix; + pNodeValues[nIndex].Name = sPrefix; pNodeValues[nIndex].Name += sCommandType; pNodeValues[nIndex++].Value <<= pMapping->nCommandType; SetSetProperties( C2U(cDataSourceHistory), aNodeValues); @@ -310,11 +310,11 @@ void BibConfig::Commit() sSubPrefix += OUString::valueOf(nFieldAssignment); Sequence< PropertyValue > aAssignmentValues(2); PropertyValue* pAssignmentValues = aAssignmentValues.getArray(); - pAssignmentValues[0].Name = sSubPrefix; - pAssignmentValues[0].Name += sFieldName; + pAssignmentValues[0].Name = sSubPrefix; + pAssignmentValues[0].Name += sFieldName; pAssignmentValues[0].Value <<= pMapping->aColumnPairs[nFieldAssignment].sLogicalColumnName; - pAssignmentValues[1].Name = sSubPrefix; - pAssignmentValues[1].Name += sDatabaseFieldName; + pAssignmentValues[1].Name = sSubPrefix; + pAssignmentValues[1].Name += sDatabaseFieldName; pAssignmentValues[1].Value <<= pMapping->aColumnPairs[nFieldAssignment].sRealColumnName; SetSetProperties( sPrefix, aAssignmentValues ); nFieldAssignment++; @@ -324,7 +324,7 @@ void BibConfig::Commit() /* -----------------------------13.11.00 12:23-------------------------------- ---------------------------------------------------------------------------*/ -const Mapping* BibConfig::GetMapping(const BibDBDescriptor& rDesc) const +const Mapping* BibConfig::GetMapping(const BibDBDescriptor& rDesc) const { for(sal_uInt16 i = 0; i < pMappingsArr->Count(); i++) { diff --git a/extensions/source/bibliography/bibconfig.hxx b/extensions/source/bibliography/bibconfig.hxx index 093f0078b828..18af8fed5f46 100644 --- a/extensions/source/bibliography/bibconfig.hxx +++ b/extensions/source/bibliography/bibconfig.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -33,9 +33,9 @@ class MappingArray; //----------------------------------------------------------------------------- -#define COLUMN_COUNT 31 -#define IDENTIFIER_POS 0 -#define AUTHORITYTYPE_POS 1 +#define COLUMN_COUNT 31 +#define IDENTIFIER_POS 0 +#define AUTHORITYTYPE_POS 1 #define AUTHOR_POS 2 #define TITLE_POS 3 #define YEAR_POS 4 @@ -68,16 +68,16 @@ class MappingArray; //----------------------------------------------------------------------------- struct StringPair { - rtl::OUString sRealColumnName; - rtl::OUString sLogicalColumnName; + rtl::OUString sRealColumnName; + rtl::OUString sLogicalColumnName; }; //----------------------------------------------------------------------------- struct Mapping { - rtl::OUString sTableName; - rtl::OUString sURL; - sal_Int16 nCommandType; - StringPair aColumnPairs[COLUMN_COUNT]; + rtl::OUString sTableName; + rtl::OUString sURL; + sal_Int16 nCommandType; + StringPair aColumnPairs[COLUMN_COUNT]; Mapping() : nCommandType(0){} @@ -85,55 +85,55 @@ struct Mapping //----------------------------------------------------------------------------- struct BibDBDescriptor { - rtl::OUString sDataSource; - rtl::OUString sTableOrQuery; - sal_Int32 nCommandType; + rtl::OUString sDataSource; + rtl::OUString sTableOrQuery; + sal_Int32 nCommandType; }; //----------------------------------------------------------------------------- class BibConfig : public utl::ConfigItem { - rtl::OUString sDataSource; - rtl::OUString sTableOrQuery; - sal_Int32 nTblOrQuery; - - rtl::OUString sQueryField; - rtl::OUString sQueryText; - MappingArray* pMappingsArr; - long nBeamerSize; - long nViewSize; + rtl::OUString sDataSource; + rtl::OUString sTableOrQuery; + sal_Int32 nTblOrQuery; + + rtl::OUString sQueryField; + rtl::OUString sQueryText; + MappingArray* pMappingsArr; + long nBeamerSize; + long nViewSize; sal_Bool bShowColumnAssignmentWarning; - rtl::OUString aColumnDefaults[COLUMN_COUNT]; + rtl::OUString aColumnDefaults[COLUMN_COUNT]; com::sun::star::uno::Sequence<rtl::OUString> GetPropertyNames(); public: BibConfig(); ~BibConfig(); - virtual void Commit(); + virtual void Commit(); virtual void Notify( const com::sun::star::uno::Sequence<rtl::OUString>& aPropertyNames); - BibDBDescriptor GetBibliographyURL(); - void SetBibliographyURL(const BibDBDescriptor& rDesc); + BibDBDescriptor GetBibliographyURL(); + void SetBibliographyURL(const BibDBDescriptor& rDesc); - const Mapping* GetMapping(const BibDBDescriptor& rDesc) const; - void SetMapping(const BibDBDescriptor& rDesc, const Mapping* pMapping); + const Mapping* GetMapping(const BibDBDescriptor& rDesc) const; + void SetMapping(const BibDBDescriptor& rDesc, const Mapping* pMapping); - const rtl::OUString& GetDefColumnName(sal_uInt16 nIndex) const + const rtl::OUString& GetDefColumnName(sal_uInt16 nIndex) const {return aColumnDefaults[nIndex];} - void setBeamerSize(long nSize) {SetModified(); nBeamerSize = nSize;} - long getBeamerSize()const {return nBeamerSize;} - void setViewSize(long nSize) {SetModified(); nViewSize = nSize;} - long getViewSize() {return nViewSize;} + void setBeamerSize(long nSize) {SetModified(); nBeamerSize = nSize;} + long getBeamerSize()const {return nBeamerSize;} + void setViewSize(long nSize) {SetModified(); nViewSize = nSize;} + long getViewSize() {return nViewSize;} - const rtl::OUString& getQueryField() const {return sQueryField;} - void setQueryField(const rtl::OUString& rSet) {SetModified(); sQueryField = rSet;} + const rtl::OUString& getQueryField() const {return sQueryField;} + void setQueryField(const rtl::OUString& rSet) {SetModified(); sQueryField = rSet;} - const rtl::OUString& getQueryText() const {return sQueryText;} - void setQueryText(const rtl::OUString& rSet) {SetModified(); sQueryText = rSet;} + const rtl::OUString& getQueryText() const {return sQueryText;} + void setQueryText(const rtl::OUString& rSet) {SetModified(); sQueryText = rSet;} sal_Bool IsShowColumnAssignmentWarning() const { return bShowColumnAssignmentWarning;} diff --git a/extensions/source/bibliography/bibcont.cxx b/extensions/source/bibliography/bibcont.cxx index ac137f462d63..2c3e0f4d1e37 100644 --- a/extensions/source/bibliography/bibcont.cxx +++ b/extensions/source/bibliography/bibcont.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -90,7 +90,7 @@ using namespace ::com::sun::star::frame; using namespace ::rtl; #define C2U(cChar) OUString::createFromAscii(cChar) -#define PROPERTY_FRAME 1 +#define PROPERTY_FRAME 1 //split window size is a percent value #define WIN_MIN_HEIGHT 10 #define WIN_STEP_SIZE 5 @@ -101,7 +101,7 @@ BibWindowContainer::BibWindowContainer( Window* pParent, BibShortCutHandler* pCh { if(pChild!=NULL) { - Window* pChildWindow = GetChild(); + Window* pChildWindow = GetChild(); pChildWindow->SetParent(this); pChildWindow->Show(); pChildWindow->SetPosPixel(Point(0,0)); @@ -113,7 +113,7 @@ BibWindowContainer::~BibWindowContainer() if( pChild ) { Window* pDel = GetChild(); - pChild = NULL; // prevents GetFocus for child while deleting! + pChild = NULL; // prevents GetFocus for child while deleting! delete pDel; } } @@ -158,14 +158,14 @@ BibBookContainer::~BibBookContainer() if( pTopWin ) { Window* pDel = pTopWin; - pTopWin = NULL; // prevents GetFocus for child while deleting! + pTopWin = NULL; // prevents GetFocus for child while deleting! delete pDel; } if( pBottomWin ) { Window* pDel = pBottomWin; - pBottomWin = NULL; // prevents GetFocus for child while deleting! + pBottomWin = NULL; // prevents GetFocus for child while deleting! delete pDel; } @@ -178,10 +178,10 @@ void BibBookContainer::Split() } IMPL_LINK( BibBookContainer, SplitHdl, Timer*,/*pT*/) { - long nSize= GetItemSize( TOP_WINDOW); + long nSize= GetItemSize( TOP_WINDOW); BibConfig* pConfig = BibModul::GetConfig(); pConfig->setBeamerSize(nSize); - nSize = GetItemSize( BOTTOM_WINDOW); + nSize = GetItemSize( BOTTOM_WINDOW); pConfig->setViewSize(nSize); return 0; } diff --git a/extensions/source/bibliography/bibcont.hxx b/extensions/source/bibliography/bibcont.hxx index be725ac5f713..54659be8ec08 100644 --- a/extensions/source/bibliography/bibcont.hxx +++ b/extensions/source/bibliography/bibcont.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -36,29 +36,29 @@ #include "bibmod.hxx" -#define TOP_WINDOW 1 -#define BOTTOM_WINDOW 2 +#define TOP_WINDOW 1 +#define BOTTOM_WINDOW 2 class BibDataManager; -class BibWindowContainer : public BibWindow //Window +class BibWindowContainer : public BibWindow //Window { private: // !BibShortCutHandler is also always a Window! - BibShortCutHandler* pChild; + BibShortCutHandler* pChild; protected: - virtual void Resize(); + virtual void Resize(); public: BibWindowContainer( Window* pParent, BibShortCutHandler* pChild, WinBits nStyle = WB_3DLOOK); ~BibWindowContainer(); - inline Window* GetChild(); + inline Window* GetChild(); - virtual void GetFocus(); + virtual void GetFocus(); - virtual BOOL HandleShortCutKey( const KeyEvent& rKeyEvent ); // returns true, if key was handled + virtual BOOL HandleShortCutKey( const KeyEvent& rKeyEvent ); // returns true, if key was handled using Window::GetChild; }; @@ -73,24 +73,24 @@ class BibBookContainer: public BibSplitWindow { private: - ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > xTopFrameRef; - ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > xBottomFrameRef; + ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > xTopFrameRef; + ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > xBottomFrameRef; - ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > xTopPeerRef; - ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > xBottomPeerRef; + ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > xTopPeerRef; + ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > xBottomPeerRef; - BibDataManager* pDatMan; - BibWindowContainer* pTopWin; - BibWindowContainer* pBottomWin; - sal_Bool bFirstTime; - HdlBibModul pBibMod; - Timer aTimer; + BibDataManager* pDatMan; + BibWindowContainer* pTopWin; + BibWindowContainer* pBottomWin; + sal_Bool bFirstTime; + HdlBibModul pBibMod; + Timer aTimer; DECL_LINK( SplitHdl, Timer*); protected: - virtual void Split(); + virtual void Split(); virtual long PreNotify( NotifyEvent& rNEvt ); @@ -99,17 +99,17 @@ class BibBookContainer: public BibSplitWindow BibBookContainer(Window* pParent,BibDataManager*, WinBits nStyle = WB_3DLOOK ); ~BibBookContainer(); - inline BibWindow* GetTopWin() {return pTopWin;} - inline BibWindow* GetBottomWin() {return pBottomWin;} + inline BibWindow* GetTopWin() {return pTopWin;} + inline BibWindow* GetBottomWin() {return pBottomWin;} // !BibShortCutHandler is also always a Window! - void createTopFrame( BibShortCutHandler* pWin ); + void createTopFrame( BibShortCutHandler* pWin ); - void createBottomFrame( BibShortCutHandler* pWin ); + void createBottomFrame( BibShortCutHandler* pWin ); - virtual void GetFocus(); + virtual void GetFocus(); - virtual sal_Bool HandleShortCutKey( const KeyEvent& rKeyEvent ); // returns true, if key was handled + virtual sal_Bool HandleShortCutKey( const KeyEvent& rKeyEvent ); // returns true, if key was handled }; #endif diff --git a/extensions/source/bibliography/bibload.cxx b/extensions/source/bibliography/bibload.cxx index db46e5d9f8d6..776f50a03067 100644 --- a/extensions/source/bibliography/bibload.cxx +++ b/extensions/source/bibliography/bibload.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -39,7 +39,7 @@ #include <svl/urihelper.hxx> #include <toolkit/helper/vclunohelper.hxx> #include <comphelper/processfactory.hxx> -#include <cppuhelper/factory.hxx> // helper for factories +#include <cppuhelper/factory.hxx> // helper for factories #include <com/sun/star/sdbc/ResultSetType.hpp> #include <com/sun/star/sdbc/ResultSetConcurrency.hpp> #include <com/sun/star/sdb/XColumn.hpp> @@ -90,37 +90,37 @@ using namespace ::com::sun::star::frame; //----------------------------------------------------------------------------- -#define PROPERTY_FRAME 1 +#define PROPERTY_FRAME 1 class BibliographyLoader : public cppu::WeakImplHelper4 < XServiceInfo, XNameAccess, XPropertySet, XFrameLoader > { - HdlBibModul m_pBibMod; - Reference< XLoadable > m_xDatMan; - BibDataManager* m_pDatMan; - Reference< XNameAccess > m_xColumns; - Reference< XResultSet > m_xCursor; + HdlBibModul m_pBibMod; + Reference< XLoadable > m_xDatMan; + BibDataManager* m_pDatMan; + Reference< XNameAccess > m_xColumns; + Reference< XResultSet > m_xCursor; private: - void loadView(const Reference< XFrame > & aFrame, const rtl::OUString& aURL, + void loadView(const Reference< XFrame > & aFrame, const rtl::OUString& aURL, const Sequence< PropertyValue >& aArgs, const Reference< XLoadEventListener > & aListener); - BibDataManager* GetDataManager()const; - Reference< XNameAccess > GetDataColumns() const; - Reference< XResultSet > GetDataCursor() const; - Reference< sdb::XColumn > GetIdentifierColumn() const; + BibDataManager* GetDataManager()const; + Reference< XNameAccess > GetDataColumns() const; + Reference< XResultSet > GetDataCursor() const; + Reference< sdb::XColumn > GetIdentifierColumn() const; public: BibliographyLoader(); ~BibliographyLoader(); // XServiceInfo - rtl::OUString SAL_CALL getImplementationName() throw( ); - sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ); - Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ); - static rtl::OUString getImplementationName_Static() throw( ) + rtl::OUString SAL_CALL getImplementationName() throw( ); + sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ); + Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ); + static rtl::OUString getImplementationName_Static() throw( ) { //! @@ -146,15 +146,15 @@ public: virtual void SAL_CALL addVetoableChangeListener(const rtl::OUString& PropertyName, const Reference< XVetoableChangeListener > & aListener) throw( UnknownPropertyException, WrappedTargetException, RuntimeException ); virtual void SAL_CALL removeVetoableChangeListener(const rtl::OUString& PropertyName, const Reference< XVetoableChangeListener > & aListener) throw( UnknownPropertyException, WrappedTargetException, RuntimeException ); - static Sequence<rtl::OUString> SAL_CALL getSupportedServiceNames_Static(void) throw( ); + static Sequence<rtl::OUString> SAL_CALL getSupportedServiceNames_Static(void) throw( ); - friend Reference< XInterface > SAL_CALL BibliographyLoader_CreateInstance( const Reference< XMultiServiceFactory > & rSMgr ) throw( Exception ); + friend Reference< XInterface > SAL_CALL BibliographyLoader_CreateInstance( const Reference< XMultiServiceFactory > & rSMgr ) throw( Exception ); // XLoader - virtual void SAL_CALL load(const Reference< XFrame > & aFrame, const rtl::OUString& aURL, + virtual void SAL_CALL load(const Reference< XFrame > & aFrame, const rtl::OUString& aURL, const Sequence< PropertyValue >& aArgs, const Reference< XLoadEventListener > & aListener) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL cancel(void) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL cancel(void) throw (::com::sun::star::uno::RuntimeException); }; BibliographyLoader::BibliographyLoader() : @@ -204,7 +204,7 @@ Sequence< rtl::OUString > BibliographyLoader::getSupportedServiceNames(void) thr } // ORegistryServiceManager_Static -Sequence< rtl::OUString > BibliographyLoader::getSupportedServiceNames_Static(void) throw( ) +Sequence< rtl::OUString > BibliographyLoader::getSupportedServiceNames_Static(void) throw( ) { Sequence< rtl::OUString > aSNS( 2 ); aSNS.getArray()[0] = C2U("com.sun.star.frame.FrameLoader"); @@ -234,11 +234,11 @@ extern "C" //sKey += rtl::OUString::createFromAscii("/UNO/SERVICES"); - Reference< registry::XRegistryKey > xNewKey = xImplKey->createKey( C2U("/UNO/SERVICES") ); + Reference< registry::XRegistryKey > xNewKey = xImplKey->createKey( C2U("/UNO/SERVICES") ); Sequence< rtl::OUString > aServices = BibliographyLoader::getSupportedServiceNames_Static(); for( INT32 i = 0; i < aServices.getLength(); i++ ) xNewKey->createKey( aServices.getConstArray()[i]); - xNewKey = xImplKey->createKey( C2U("/UNO/Loader")); + xNewKey = xImplKey->createKey( C2U("/UNO/Loader")); Reference< registry::XRegistryKey > xPatternKey = xImplKey->createKey( C2U("/Loader/Pattern" )); xPatternKey->setAsciiValue( C2U( ".component:Bibliography/*" ) ); @@ -327,16 +327,16 @@ void BibliographyLoader::loadView(const Reference< XFrame > & rFrame, const rtl: aURL.Complete = aMenuRes; Reference< XMultiServiceFactory > xMgr = comphelper::getProcessServiceFactory(); - Reference< util::XURLTransformer > xTrans ( xMgr->createInstance( C2U("com.sun.star.util.URLTransformer") ), UNO_QUERY ); + Reference< util::XURLTransformer > xTrans ( xMgr->createInstance( C2U("com.sun.star.util.URLTransformer") ), UNO_QUERY ); if( xTrans.is() ) { // Datei laden xTrans->parseStrict( aURL ); - Reference< XDispatchProvider > xProv( rFrame, UNO_QUERY ); + Reference< XDispatchProvider > xProv( rFrame, UNO_QUERY ); if ( xProv.is() ) { - Reference< XDispatch > aDisp = xProv->queryDispatch( aURL, C2U("_menubar"), 12 ); + Reference< XDispatch > aDisp = xProv->queryDispatch( aURL, C2U("_menubar"), 12 ); if ( aDisp.is() ) aDisp->dispatch( aURL, Sequence<PropertyValue>() ); } @@ -643,7 +643,7 @@ sal_Bool BibliographyLoader::hasByName(const rtl::OUString& rName) throw ( Runti Reference< XResultSet > xCursor = GetDataCursor(); Reference< sdb::XColumn > xIdColumn = GetIdentifierColumn(); - if (xIdColumn.is()) // implies xCursor.is() + if (xIdColumn.is()) // implies xCursor.is() { do { @@ -715,37 +715,37 @@ Any BibliographyLoader::getPropertyValue(const rtl::OUString& rPropertyName) Any aRet; static const sal_uInt16 aInternalMapping[] = { - IDENTIFIER_POS , // BibliographyDataField_IDENTIFIER - AUTHORITYTYPE_POS , // BibliographyDataField_BIBILIOGRAPHIC_TYPE - ADDRESS_POS , // BibliographyDataField_ADDRESS - ANNOTE_POS , // BibliographyDataField_ANNOTE - AUTHOR_POS , // BibliographyDataField_AUTHOR - BOOKTITLE_POS , // BibliographyDataField_BOOKTITLE - CHAPTER_POS , // BibliographyDataField_CHAPTER - EDITION_POS , // BibliographyDataField_EDITION - EDITOR_POS , // BibliographyDataField_EDITOR - HOWPUBLISHED_POS , // BibliographyDataField_HOWPUBLISHED - INSTITUTION_POS , // BibliographyDataField_INSTITUTION - JOURNAL_POS , // BibliographyDataField_JOURNAL - MONTH_POS , // BibliographyDataField_MONTH - NOTE_POS , // BibliographyDataField_NOTE - NUMBER_POS , // BibliographyDataField_NUMBER - ORGANIZATIONS_POS , // BibliographyDataField_ORGANIZATIONS - PAGES_POS , // BibliographyDataField_PAGES - PUBLISHER_POS , // BibliographyDataField_PUBLISHER - SCHOOL_POS , // BibliographyDataField_SCHOOL - SERIES_POS , // BibliographyDataField_SERIES - TITLE_POS , // BibliographyDataField_TITLE - REPORTTYPE_POS , // BibliographyDataField_REPORT_TYPE - VOLUME_POS , // BibliographyDataField_VOLUME - YEAR_POS , // BibliographyDataField_YEAR - URL_POS , // BibliographyDataField_URL - CUSTOM1_POS , // BibliographyDataField_CUSTOM1 - CUSTOM2_POS , // BibliographyDataField_CUSTOM2 - CUSTOM3_POS , // BibliographyDataField_CUSTOM3 - CUSTOM4_POS , // BibliographyDataField_CUSTOM4 - CUSTOM5_POS , // BibliographyDataField_CUSTOM5 - ISBN_POS //BibliographyDataField_ISBN + IDENTIFIER_POS , // BibliographyDataField_IDENTIFIER + AUTHORITYTYPE_POS , // BibliographyDataField_BIBILIOGRAPHIC_TYPE + ADDRESS_POS , // BibliographyDataField_ADDRESS + ANNOTE_POS , // BibliographyDataField_ANNOTE + AUTHOR_POS , // BibliographyDataField_AUTHOR + BOOKTITLE_POS , // BibliographyDataField_BOOKTITLE + CHAPTER_POS , // BibliographyDataField_CHAPTER + EDITION_POS , // BibliographyDataField_EDITION + EDITOR_POS , // BibliographyDataField_EDITOR + HOWPUBLISHED_POS , // BibliographyDataField_HOWPUBLISHED + INSTITUTION_POS , // BibliographyDataField_INSTITUTION + JOURNAL_POS , // BibliographyDataField_JOURNAL + MONTH_POS , // BibliographyDataField_MONTH + NOTE_POS , // BibliographyDataField_NOTE + NUMBER_POS , // BibliographyDataField_NUMBER + ORGANIZATIONS_POS , // BibliographyDataField_ORGANIZATIONS + PAGES_POS , // BibliographyDataField_PAGES + PUBLISHER_POS , // BibliographyDataField_PUBLISHER + SCHOOL_POS , // BibliographyDataField_SCHOOL + SERIES_POS , // BibliographyDataField_SERIES + TITLE_POS , // BibliographyDataField_TITLE + REPORTTYPE_POS , // BibliographyDataField_REPORT_TYPE + VOLUME_POS , // BibliographyDataField_VOLUME + YEAR_POS , // BibliographyDataField_YEAR + URL_POS , // BibliographyDataField_URL + CUSTOM1_POS , // BibliographyDataField_CUSTOM1 + CUSTOM2_POS , // BibliographyDataField_CUSTOM2 + CUSTOM3_POS , // BibliographyDataField_CUSTOM3 + CUSTOM4_POS , // BibliographyDataField_CUSTOM4 + CUSTOM5_POS , // BibliographyDataField_CUSTOM5 + ISBN_POS //BibliographyDataField_ISBN }; if(C2U("BibliographyDataFieldNames") == rPropertyName) { diff --git a/extensions/source/bibliography/bibmod.cxx b/extensions/source/bibliography/bibmod.cxx index 05d068b807af..a9809282d354 100644 --- a/extensions/source/bibliography/bibmod.cxx +++ b/extensions/source/bibliography/bibmod.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -56,7 +56,7 @@ using namespace ::com::sun::star::ucb; #define C2U(cChar) OUString::createFromAscii(cChar) #define C2S(cChar) String::CreateFromAscii(cChar) -HdlBibModul OpenBibModul() +HdlBibModul OpenBibModul() { if(pBibModul==NULL) { @@ -93,12 +93,12 @@ BibModul::~BibModul() pBibConfig = 0; } -BibDataManager* BibModul::createDataManager() +BibDataManager* BibModul::createDataManager() { return new BibDataManager(); } //----------------------------------------------------------------------------- -BibConfig* BibModul::GetConfig() +BibConfig* BibModul::GetConfig() { if(! pBibConfig) pBibConfig = new BibConfig; diff --git a/extensions/source/bibliography/bibmod.hxx b/extensions/source/bibliography/bibmod.hxx index 475d67937129..0e2f04854e14 100644 --- a/extensions/source/bibliography/bibmod.hxx +++ b/extensions/source/bibliography/bibmod.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -34,34 +34,34 @@ class ResMgr; class BibDataManager; class BibConfig; -#define BIBLIOGRAPHY_INI_GROUP "Bibliography" -#define BIBLIOGRAPHY_INI_CUR_NAME "BibliographyCurrent" -#define BIBLIOGRAPHY_INI_DB_ENTRY "Bibliography" +#define BIBLIOGRAPHY_INI_GROUP "Bibliography" +#define BIBLIOGRAPHY_INI_CUR_NAME "BibliographyCurrent" +#define BIBLIOGRAPHY_INI_DB_ENTRY "Bibliography" #define BIBLIOGRAPHY_INI_MAPPING "BibliographyFields" #define BIBLIOGRAPHY_TYPE_NAMES "BibliographyTypeNames" class BibModul { private: - ResMgr* pResMgr; - static BibConfig* pBibConfig; + ResMgr* pResMgr; + static BibConfig* pBibConfig; public: BibModul(); ~BibModul(); - ResMgr* GetResMgr(){return pResMgr;} - static BibConfig* GetConfig(); + ResMgr* GetResMgr(){return pResMgr;} + static BibConfig* GetConfig(); - BibDataManager* createDataManager(); + BibDataManager* createDataManager(); }; -typedef BibModul* PtrBibModul; -typedef PtrBibModul* HdlBibModul; +typedef BibModul* PtrBibModul; +typedef PtrBibModul* HdlBibModul; -HdlBibModul OpenBibModul(); -void CloseBibModul(HdlBibModul ppBibModul); +HdlBibModul OpenBibModul(); +void CloseBibModul(HdlBibModul ppBibModul); #endif diff --git a/extensions/source/bibliography/bibprop.hrc b/extensions/source/bibliography/bibprop.hrc index 42767a2c01b1..0f24597eee7a 100644 --- a/extensions/source/bibliography/bibprop.hrc +++ b/extensions/source/bibliography/bibprop.hrc @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/bibliography/bibresid.hxx b/extensions/source/bibliography/bibresid.hxx index de8c6c0a0769..724dec0c3673 100644 --- a/extensions/source/bibliography/bibresid.hxx +++ b/extensions/source/bibliography/bibresid.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/bibliography/bibshortcuthandler.hxx b/extensions/source/bibliography/bibshortcuthandler.hxx index f0bf5aa574b0..88fe8b18a532 100644 --- a/extensions/source/bibliography/bibshortcuthandler.hxx +++ b/extensions/source/bibliography/bibshortcuthandler.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -40,16 +40,16 @@ class BibShortCutHandler { private: - Window* pBaseClass; // in cases, where BibShortCutHandler also has to be a window + Window* pBaseClass; // in cases, where BibShortCutHandler also has to be a window protected: - inline BibShortCutHandler( Window* pBaseClass ); + inline BibShortCutHandler( Window* pBaseClass ); public: - virtual ~BibShortCutHandler(); - virtual BOOL HandleShortCutKey( const KeyEvent& rKeyEvent ); // returns true, if key was handled + virtual ~BibShortCutHandler(); + virtual BOOL HandleShortCutKey( const KeyEvent& rKeyEvent ); // returns true, if key was handled - inline Window* GetWindow( void ); + inline Window* GetWindow( void ); }; inline BibShortCutHandler::BibShortCutHandler( Window* _pBaseClass ) : pBaseClass( _pBaseClass ) @@ -66,7 +66,7 @@ class BibWindow : public Window, public BibShortCutHandler { public: BibWindow( Window* pParent,WinBits nStyle = WB_3DLOOK); - virtual ~BibWindow(); + virtual ~BibWindow(); }; @@ -74,7 +74,7 @@ class BibSplitWindow : public SplitWindow, public BibShortCutHandler { public: BibSplitWindow( Window* pParent,WinBits nStyle = WB_3DLOOK); - virtual ~BibSplitWindow(); + virtual ~BibSplitWindow(); }; @@ -82,7 +82,7 @@ class BibTabPage : public TabPage, public BibShortCutHandler { public: BibTabPage( Window* pParent, const ResId& rResId ); - virtual ~BibTabPage(); + virtual ~BibTabPage(); }; #endif diff --git a/extensions/source/bibliography/bibtools.hxx b/extensions/source/bibliography/bibtools.hxx index 91dd5648ce63..d62a5bce7528 100644 --- a/extensions/source/bibliography/bibtools.hxx +++ b/extensions/source/bibliography/bibtools.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -28,7 +28,7 @@ #ifndef BIBTOOLS_HXX -#include <vcl/taskpanelist.hxx> // includes also vcl/window.hxx +#include <vcl/taskpanelist.hxx> // includes also vcl/window.hxx namespace bib { diff --git a/extensions/source/bibliography/bibview.cxx b/extensions/source/bibliography/bibview.cxx index abf2d293ba82..44c94cb1a317 100644 --- a/extensions/source/bibliography/bibview.cxx +++ b/extensions/source/bibliography/bibview.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -102,8 +102,8 @@ namespace bib } catch( const uno::Exception& rEx) { - (void) rEx; - } + (void) rEx; + } } } @@ -227,7 +227,7 @@ namespace bib } //......................................................................... -} // namespace bib +} // namespace bib //......................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/extensions/source/bibliography/bibview.hxx b/extensions/source/bibliography/bibview.hxx index f4fa44ea7b17..0f86069a554a 100644 --- a/extensions/source/bibliography/bibview.hxx +++ b/extensions/source/bibliography/bibview.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -33,8 +33,8 @@ #include "formcontrolcontainer.hxx" #include "bibshortcuthandler.hxx" -class BibGeneralPage; -class BibDataManager; +class BibGeneralPage; +class BibDataManager; namespace com{ namespace sun{ namespace star{ namespace awt{ class XFocusListener;}}}} @@ -47,39 +47,39 @@ namespace bib class BibView : public BibWindow, public FormControlContainer { private: - BibDataManager* m_pDatMan; - ::com::sun::star::uno::Reference< ::com::sun::star::form::XLoadable> m_xDatMan; - ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFocusListener> m_xGeneralPage; - BibGeneralPage* m_pGeneralPage; + BibDataManager* m_pDatMan; + ::com::sun::star::uno::Reference< ::com::sun::star::form::XLoadable> m_xDatMan; + ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFocusListener> m_xGeneralPage; + BibGeneralPage* m_pGeneralPage; private: DECL_STATIC_LINK(BibView, CallMappingHdl, BibView*); protected: // Window overridables - virtual void Resize(); + virtual void Resize(); // FormControlContainer - virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer > + virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer > getControlContainer(); // XLoadListener equivalents - virtual void _loaded( const ::com::sun::star::lang::EventObject& _rEvent ); - virtual void _reloaded( const ::com::sun::star::lang::EventObject& _rEvent ); + virtual void _loaded( const ::com::sun::star::lang::EventObject& _rEvent ); + virtual void _reloaded( const ::com::sun::star::lang::EventObject& _rEvent ); public: BibView( Window* _pParent, BibDataManager* _pDatMan, WinBits nStyle = WB_3DLOOK ); ~BibView(); - void UpdatePages(); + void UpdatePages(); - virtual void GetFocus(); + virtual void GetFocus(); - virtual BOOL HandleShortCutKey( const KeyEvent& rKeyEvent ); // returns true, if key was handled + virtual BOOL HandleShortCutKey( const KeyEvent& rKeyEvent ); // returns true, if key was handled }; //......................................................................... -} // namespace bib +} // namespace bib //......................................................................... #endif diff --git a/extensions/source/bibliography/datman.cxx b/extensions/source/bibliography/datman.cxx index fa9775377896..1290431f760c 100644 --- a/extensions/source/bibliography/datman.cxx +++ b/extensions/source/bibliography/datman.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -112,7 +112,7 @@ using namespace ::ucb; Reference< XConnection > getConnection(const ::rtl::OUString& _rURL) { // first get the sdb::DataSource corresponding to the url - Reference< XDataSource > xDataSource; + Reference< XDataSource > xDataSource; // is it a favorite title ? Reference< XMultiServiceFactory > xMgr = comphelper::getProcessServiceFactory(); Reference<XInterface> xNamingContextIfc = xMgr->createInstance(C2U("com.sun.star.sdb.DatabaseContext")); @@ -126,19 +126,19 @@ Reference< XConnection > getConnection(const ::rtl::OUString& _rURL) } catch(Exception eEx) { - (void) eEx; // make compiler happy + (void) eEx; // make compiler happy DBG_ERROR("Exception caught in ODatabaseContext::getRegisteredObject()"); } } // build the connection from the data source - Reference< XConnection > xConn; + Reference< XConnection > xConn; if (xDataSource.is()) { // need user/pwd for this ::rtl::OUString sUser, sPwd; Reference< XPropertySet > xDataSourceProps(xDataSource, UNO_QUERY); Reference< XCompletedConnection > xComplConn(xDataSource, UNO_QUERY); -/* Reference< XPropertySetInfo > xInfo = xDataSourceProps.is() ? xDataSourceProps->getPropertySetInfo() : Reference< XPropertySetInfo > (); +/* Reference< XPropertySetInfo > xInfo = xDataSourceProps.is() ? xDataSourceProps->getPropertySetInfo() : Reference< XPropertySetInfo > (); if (xInfo.is() && xInfo->hasPropertyByName(C2U("User"))) xDataSourceProps->getPropertyValue(C2U("User")) >>= sUser; if (xInfo.is() && xInfo->hasPropertyByName(C2U("Password"))) @@ -150,7 +150,7 @@ Reference< XConnection > getConnection(const ::rtl::OUString& _rURL) Reference<XInterface> xHdl = xMgr->createInstance(C2U("com.sun.star.task.InteractionHandler")); Reference<task::XInteractionHandler> xIHdl(xHdl, UNO_QUERY); xConn = xComplConn->connectWithCompletion(xIHdl); -// xConn = xDataSource->getConnection(sUser, sPwd); +// xConn = xDataSource->getConnection(sUser, sPwd); } catch(SQLException&) { @@ -158,7 +158,7 @@ Reference< XConnection > getConnection(const ::rtl::OUString& _rURL) } catch(Exception& e ) { - (void) e; // make compiler happy + (void) e; // make compiler happy } } @@ -168,9 +168,9 @@ Reference< XConnection > getConnection(const ::rtl::OUString& _rURL) /* -----------------17.01.00 14:46------------------- --------------------------------------------------*/ -Reference< XConnection > getConnection(const Reference< XInterface > & xRowSet) +Reference< XConnection > getConnection(const Reference< XInterface > & xRowSet) { - Reference< XConnection > xConn; + Reference< XConnection > xConn; try { Reference< XPropertySet > xFormProps(xRowSet, UNO_QUERY); @@ -185,7 +185,7 @@ Reference< XConnection > getConnection(const Reference< XInterface > & xRowSe } catch(Exception& e ) { - (void) e; // make compiler happy + (void) e; // make compiler happy DBG_ERROR("exception in getConnection"); } @@ -203,7 +203,7 @@ Reference< XNameAccess > getColumns(const Reference< XForm > & _rxForm) xReturn = xSupplyCols->getColumns(); if (!xReturn.is() || (xReturn->getElementNames().getLength() == 0)) - { // no .... + { // no .... xReturn = NULL; // -> get the table the form is bound to and ask it for their columns Reference< XTablesSupplier > xSupplyTables( getConnection( _rxForm ), UNO_QUERY ); @@ -248,78 +248,78 @@ Reference< XNameAccess > getColumns(const Reference< XForm > & _rxForm) class MappingDialog_Impl : public ModalDialog { BibDataManager* pDatMan; - OKButton aOKBT; - CancelButton aCancelBT; - HelpButton aHelpBT; - FixedLine aMapGB; - FixedText aIdentifierFT; - ListBox aIdentifierLB; - FixedText aAuthorityTypeFT; - ListBox aAuthorityTypeLB; + OKButton aOKBT; + CancelButton aCancelBT; + HelpButton aHelpBT; + FixedLine aMapGB; + FixedText aIdentifierFT; + ListBox aIdentifierLB; + FixedText aAuthorityTypeFT; + ListBox aAuthorityTypeLB; FixedText aAuthorFT; - ListBox aAuthorLB; - FixedText aTitleFT; - ListBox aTitleLB; + ListBox aAuthorLB; + FixedText aTitleFT; + ListBox aTitleLB; FixedText aMonthFT; - ListBox aMonthLB; + ListBox aMonthLB; FixedText aYearFT; - ListBox aYearLB; + ListBox aYearLB; FixedText aISBNFT; - ListBox aISBNLB; + ListBox aISBNLB; FixedText aBooktitleFT; - ListBox aBooktitleLB; + ListBox aBooktitleLB; FixedText aChapterFT; - ListBox aChapterLB; + ListBox aChapterLB; FixedText aEditionFT; - ListBox aEditionLB; + ListBox aEditionLB; FixedText aEditorFT; - ListBox aEditorLB; + ListBox aEditorLB; FixedText aHowpublishedFT; - ListBox aHowpublishedLB; + ListBox aHowpublishedLB; FixedText aInstitutionFT; - ListBox aInstitutionLB; + ListBox aInstitutionLB; FixedText aJournalFT; - ListBox aJournalLB; + ListBox aJournalLB; FixedText aNoteFT; - ListBox aNoteLB; + ListBox aNoteLB; FixedText aAnnoteFT; - ListBox aAnnoteLB; + ListBox aAnnoteLB; FixedText aNumberFT; - ListBox aNumberLB; + ListBox aNumberLB; FixedText aOrganizationsFT; - ListBox aOrganizationsLB; + ListBox aOrganizationsLB; FixedText aPagesFT; - ListBox aPagesLB; + ListBox aPagesLB; FixedText aPublisherFT; - ListBox aPublisherLB; + ListBox aPublisherLB; FixedText aAddressFT; - ListBox aAddressLB; + ListBox aAddressLB; FixedText aSchoolFT; - ListBox aSchoolLB; + ListBox aSchoolLB; FixedText aSeriesFT; - ListBox aSeriesLB; + ListBox aSeriesLB; FixedText aReportTypeFT; - ListBox aReportTypeLB; + ListBox aReportTypeLB; FixedText aVolumeFT; - ListBox aVolumeLB; + ListBox aVolumeLB; FixedText aURLFT; - ListBox aURLLB; + ListBox aURLLB; FixedText aCustom1FT; - ListBox aCustom1LB; - FixedText aCustom2FT; - ListBox aCustom2LB; - FixedText aCustom3FT; - ListBox aCustom3LB; - FixedText aCustom4FT; - ListBox aCustom4LB; - FixedText aCustom5FT; - ListBox aCustom5LB; - ListBox* aListBoxes[COLUMN_COUNT]; - String sNone; - - sal_Bool bModified; - - + ListBox aCustom1LB; + FixedText aCustom2FT; + ListBox aCustom2LB; + FixedText aCustom3FT; + ListBox aCustom3LB; + FixedText aCustom4FT; + ListBox aCustom4LB; + FixedText aCustom5FT; + ListBox aCustom5LB; + ListBox* aListBoxes[COLUMN_COUNT]; + String sNone; + + sal_Bool bModified; + + DECL_LINK(OkHdl, OKButton*); DECL_LINK(ListBoxSelectHdl, ListBox*); @@ -328,7 +328,7 @@ public: MappingDialog_Impl(Window* pParent, BibDataManager* pDatMan); ~MappingDialog_Impl(); - void SetModified() {bModified = TRUE;} + void SetModified() {bModified = TRUE;} }; /* -----------------11.11.99 16:42------------------- @@ -348,110 +348,110 @@ sal_uInt16 lcl_FindLogicalName(BibConfig* pConfig , MappingDialog_Impl::MappingDialog_Impl(Window* pParent, BibDataManager* pMan) : ModalDialog(pParent, BibResId(RID_DLG_MAPPING) ), pDatMan(pMan), - aOKBT(this, BibResId( BT_OK )), - aCancelBT(this, BibResId( BT_CANCEL )), - aHelpBT(this, BibResId( BT_HELP )), - - aMapGB(this, BibResId( GB_MAPPING )), - - aIdentifierFT(this, BibResId( FT_IDENTIFIER )), - aIdentifierLB(this, BibResId( LB_IDENTIFIER )), - aAuthorityTypeFT(this, BibResId( FT_AUTHORITYTYPE )), - aAuthorityTypeLB(this, BibResId( LB_AUTHORITYTYPE )), - aAuthorFT(this, BibResId( FT_AUTHOR )), - aAuthorLB(this, BibResId( LB_AUTHOR )), - aTitleFT(this, BibResId( FT_TITLE )), - aTitleLB(this, BibResId( LB_TITLE )), - aMonthFT(this, BibResId( FT_MONTH )), - aMonthLB(this, BibResId( LB_MONTH )), - aYearFT(this, BibResId( FT_YEAR )), - aYearLB(this, BibResId( LB_YEAR )), - aISBNFT(this, BibResId( FT_ISBN )), - aISBNLB(this, BibResId( LB_ISBN )), - aBooktitleFT(this, BibResId( FT_BOOKTITLE )), - aBooktitleLB(this, BibResId( LB_BOOKTITLE )), - aChapterFT(this, BibResId( FT_CHAPTER )), - aChapterLB(this, BibResId( LB_CHAPTER )), - aEditionFT(this, BibResId( FT_EDITION )), - aEditionLB(this, BibResId( LB_EDITION )), - aEditorFT(this, BibResId( FT_EDITOR )), - aEditorLB(this, BibResId( LB_EDITOR )), - aHowpublishedFT(this, BibResId( FT_HOWPUBLISHED )), - aHowpublishedLB(this, BibResId( LB_HOWPUBLISHED )), - aInstitutionFT(this, BibResId( FT_INSTITUTION )), - aInstitutionLB(this, BibResId( LB_INSTITUTION )), - aJournalFT(this, BibResId( FT_JOURNAL )), - aJournalLB(this, BibResId( LB_JOURNAL )), - aNoteFT(this, BibResId( FT_NOTE )), - aNoteLB(this, BibResId( LB_NOTE )), - aAnnoteFT(this, BibResId( FT_ANNOTE )), - aAnnoteLB(this, BibResId( LB_ANNOTE )), - aNumberFT(this, BibResId( FT_NUMBER )), - aNumberLB(this, BibResId( LB_NUMBER )), - aOrganizationsFT(this, BibResId( FT_ORGANIZATIONS )), - aOrganizationsLB(this, BibResId( LB_ORGANIZATIONS )), - aPagesFT(this, BibResId( FT_PAGES )), - aPagesLB(this, BibResId( LB_PAGES )), - aPublisherFT(this, BibResId( FT_PUBLISHER )), - aPublisherLB(this, BibResId( LB_PUBLISHER )), - aAddressFT(this, BibResId( FT_ADDRESS )), - aAddressLB(this, BibResId( LB_ADDRESS )), - aSchoolFT(this, BibResId( FT_SCHOOL )), - aSchoolLB(this, BibResId( LB_SCHOOL )), - aSeriesFT(this, BibResId( FT_SERIES )), - aSeriesLB(this, BibResId( LB_SERIES )), - aReportTypeFT(this, BibResId( FT_REPORTTYPE )), - aReportTypeLB(this, BibResId( LB_REPORTTYPE )), - aVolumeFT(this, BibResId( FT_VOLUME )), - aVolumeLB(this, BibResId( LB_VOLUME )), - aURLFT(this, BibResId( FT_URL )), - aURLLB(this, BibResId( LB_URL )), - aCustom1FT(this, BibResId( FT_CUSTOM1 )), - aCustom1LB(this, BibResId( LB_CUSTOM1 )), - aCustom2FT(this, BibResId( FT_CUSTOM2 )), - aCustom2LB(this, BibResId( LB_CUSTOM2 )), - aCustom3FT(this, BibResId( FT_CUSTOM3 )), - aCustom3LB(this, BibResId( LB_CUSTOM3 )), - aCustom4FT(this, BibResId( FT_CUSTOM4 )), - aCustom4LB(this, BibResId( LB_CUSTOM4 )), - aCustom5FT(this, BibResId( FT_CUSTOM5 )), - aCustom5LB(this, BibResId( LB_CUSTOM5 )), + aOKBT(this, BibResId( BT_OK )), + aCancelBT(this, BibResId( BT_CANCEL )), + aHelpBT(this, BibResId( BT_HELP )), + + aMapGB(this, BibResId( GB_MAPPING )), + + aIdentifierFT(this, BibResId( FT_IDENTIFIER )), + aIdentifierLB(this, BibResId( LB_IDENTIFIER )), + aAuthorityTypeFT(this, BibResId( FT_AUTHORITYTYPE )), + aAuthorityTypeLB(this, BibResId( LB_AUTHORITYTYPE )), + aAuthorFT(this, BibResId( FT_AUTHOR )), + aAuthorLB(this, BibResId( LB_AUTHOR )), + aTitleFT(this, BibResId( FT_TITLE )), + aTitleLB(this, BibResId( LB_TITLE )), + aMonthFT(this, BibResId( FT_MONTH )), + aMonthLB(this, BibResId( LB_MONTH )), + aYearFT(this, BibResId( FT_YEAR )), + aYearLB(this, BibResId( LB_YEAR )), + aISBNFT(this, BibResId( FT_ISBN )), + aISBNLB(this, BibResId( LB_ISBN )), + aBooktitleFT(this, BibResId( FT_BOOKTITLE )), + aBooktitleLB(this, BibResId( LB_BOOKTITLE )), + aChapterFT(this, BibResId( FT_CHAPTER )), + aChapterLB(this, BibResId( LB_CHAPTER )), + aEditionFT(this, BibResId( FT_EDITION )), + aEditionLB(this, BibResId( LB_EDITION )), + aEditorFT(this, BibResId( FT_EDITOR )), + aEditorLB(this, BibResId( LB_EDITOR )), + aHowpublishedFT(this, BibResId( FT_HOWPUBLISHED )), + aHowpublishedLB(this, BibResId( LB_HOWPUBLISHED )), + aInstitutionFT(this, BibResId( FT_INSTITUTION )), + aInstitutionLB(this, BibResId( LB_INSTITUTION )), + aJournalFT(this, BibResId( FT_JOURNAL )), + aJournalLB(this, BibResId( LB_JOURNAL )), + aNoteFT(this, BibResId( FT_NOTE )), + aNoteLB(this, BibResId( LB_NOTE )), + aAnnoteFT(this, BibResId( FT_ANNOTE )), + aAnnoteLB(this, BibResId( LB_ANNOTE )), + aNumberFT(this, BibResId( FT_NUMBER )), + aNumberLB(this, BibResId( LB_NUMBER )), + aOrganizationsFT(this, BibResId( FT_ORGANIZATIONS )), + aOrganizationsLB(this, BibResId( LB_ORGANIZATIONS )), + aPagesFT(this, BibResId( FT_PAGES )), + aPagesLB(this, BibResId( LB_PAGES )), + aPublisherFT(this, BibResId( FT_PUBLISHER )), + aPublisherLB(this, BibResId( LB_PUBLISHER )), + aAddressFT(this, BibResId( FT_ADDRESS )), + aAddressLB(this, BibResId( LB_ADDRESS )), + aSchoolFT(this, BibResId( FT_SCHOOL )), + aSchoolLB(this, BibResId( LB_SCHOOL )), + aSeriesFT(this, BibResId( FT_SERIES )), + aSeriesLB(this, BibResId( LB_SERIES )), + aReportTypeFT(this, BibResId( FT_REPORTTYPE )), + aReportTypeLB(this, BibResId( LB_REPORTTYPE )), + aVolumeFT(this, BibResId( FT_VOLUME )), + aVolumeLB(this, BibResId( LB_VOLUME )), + aURLFT(this, BibResId( FT_URL )), + aURLLB(this, BibResId( LB_URL )), + aCustom1FT(this, BibResId( FT_CUSTOM1 )), + aCustom1LB(this, BibResId( LB_CUSTOM1 )), + aCustom2FT(this, BibResId( FT_CUSTOM2 )), + aCustom2LB(this, BibResId( LB_CUSTOM2 )), + aCustom3FT(this, BibResId( FT_CUSTOM3 )), + aCustom3LB(this, BibResId( LB_CUSTOM3 )), + aCustom4FT(this, BibResId( FT_CUSTOM4 )), + aCustom4LB(this, BibResId( LB_CUSTOM4 )), + aCustom5FT(this, BibResId( FT_CUSTOM5 )), + aCustom5LB(this, BibResId( LB_CUSTOM5 )), sNone(BibResId(ST_NONE)), bModified(sal_False) { FreeResource(); - aIdentifierFT.SetText(String( BibResId( ST_IDENTIFIER ))); - aAuthorityTypeFT.SetText(String( BibResId( ST_AUTHTYPE ))); - aAuthorFT.SetText(String( BibResId( ST_AUTHOR ))); - aTitleFT.SetText(String( BibResId( ST_TITLE ))); - aMonthFT.SetText(String( BibResId( ST_MONTH ))); - aYearFT.SetText(String( BibResId( ST_YEAR ))); - aISBNFT.SetText(String( BibResId( ST_ISBN ))); - aBooktitleFT.SetText(String( BibResId( ST_BOOKTITLE ))); - aChapterFT.SetText(String( BibResId( ST_CHAPTER ))); - aEditionFT.SetText(String( BibResId( ST_EDITION ))); - aEditorFT.SetText(String( BibResId( ST_EDITOR ))); - aHowpublishedFT.SetText(String( BibResId( ST_HOWPUBLISHED ))); - aInstitutionFT.SetText(String( BibResId( ST_INSTITUTION ))); - aJournalFT.SetText(String( BibResId( ST_JOURNAL ))); - aNoteFT.SetText(String( BibResId( ST_NOTE ))); - aAnnoteFT.SetText(String( BibResId( ST_ANNOTE ))); - aNumberFT.SetText(String( BibResId( ST_NUMBER ))); - aOrganizationsFT.SetText(String( BibResId( ST_ORGANIZATION ))); - aPagesFT.SetText(String( BibResId( ST_PAGE ))); - aPublisherFT.SetText(String( BibResId( ST_PUBLISHER ))); - aAddressFT.SetText(String( BibResId( ST_ADDRESS ))); - aSchoolFT.SetText(String( BibResId( ST_SCHOOL ))); - aSeriesFT.SetText(String( BibResId( ST_SERIES ))); - aReportTypeFT.SetText(String( BibResId( ST_REPORT ))); - aVolumeFT.SetText(String( BibResId( ST_VOLUME ))); - aURLFT.SetText(String( BibResId( ST_URL ))); - aCustom1FT.SetText(String( BibResId( ST_CUSTOM1 ))); - aCustom2FT.SetText(String( BibResId( ST_CUSTOM2 ))); - aCustom3FT.SetText(String( BibResId( ST_CUSTOM3 ))); - aCustom4FT.SetText(String( BibResId( ST_CUSTOM4 ))); - aCustom5FT.SetText(String( BibResId( ST_CUSTOM5 ))); + aIdentifierFT.SetText(String( BibResId( ST_IDENTIFIER ))); + aAuthorityTypeFT.SetText(String( BibResId( ST_AUTHTYPE ))); + aAuthorFT.SetText(String( BibResId( ST_AUTHOR ))); + aTitleFT.SetText(String( BibResId( ST_TITLE ))); + aMonthFT.SetText(String( BibResId( ST_MONTH ))); + aYearFT.SetText(String( BibResId( ST_YEAR ))); + aISBNFT.SetText(String( BibResId( ST_ISBN ))); + aBooktitleFT.SetText(String( BibResId( ST_BOOKTITLE ))); + aChapterFT.SetText(String( BibResId( ST_CHAPTER ))); + aEditionFT.SetText(String( BibResId( ST_EDITION ))); + aEditorFT.SetText(String( BibResId( ST_EDITOR ))); + aHowpublishedFT.SetText(String( BibResId( ST_HOWPUBLISHED ))); + aInstitutionFT.SetText(String( BibResId( ST_INSTITUTION ))); + aJournalFT.SetText(String( BibResId( ST_JOURNAL ))); + aNoteFT.SetText(String( BibResId( ST_NOTE ))); + aAnnoteFT.SetText(String( BibResId( ST_ANNOTE ))); + aNumberFT.SetText(String( BibResId( ST_NUMBER ))); + aOrganizationsFT.SetText(String( BibResId( ST_ORGANIZATION ))); + aPagesFT.SetText(String( BibResId( ST_PAGE ))); + aPublisherFT.SetText(String( BibResId( ST_PUBLISHER ))); + aAddressFT.SetText(String( BibResId( ST_ADDRESS ))); + aSchoolFT.SetText(String( BibResId( ST_SCHOOL ))); + aSeriesFT.SetText(String( BibResId( ST_SERIES ))); + aReportTypeFT.SetText(String( BibResId( ST_REPORT ))); + aVolumeFT.SetText(String( BibResId( ST_VOLUME ))); + aURLFT.SetText(String( BibResId( ST_URL ))); + aCustom1FT.SetText(String( BibResId( ST_CUSTOM1 ))); + aCustom2FT.SetText(String( BibResId( ST_CUSTOM2 ))); + aCustom3FT.SetText(String( BibResId( ST_CUSTOM3 ))); + aCustom4FT.SetText(String( BibResId( ST_CUSTOM4 ))); + aCustom5FT.SetText(String( BibResId( ST_CUSTOM5 ))); aOKBT.SetClickHdl(LINK(this, MappingDialog_Impl, OkHdl)); String sTitle = GetText(); @@ -592,25 +592,25 @@ IMPL_LINK(MappingDialog_Impl, OkHdl, OKButton*, EMPTYARG) --------------------------------------------------*/ class DBChangeDialog_Impl : public ModalDialog { - OKButton aOKBT; - CancelButton aCancelBT; - HelpButton aHelpBT; - FixedLine aSelectionGB; - SvTabListBox aSelectionLB; - HeaderBar aSelectionHB; - DBChangeDialogConfig_Impl aConfig; - String aEntryST; - String aURLST; + OKButton aOKBT; + CancelButton aCancelBT; + HelpButton aHelpBT; + FixedLine aSelectionGB; + SvTabListBox aSelectionLB; + HeaderBar aSelectionHB; + DBChangeDialogConfig_Impl aConfig; + String aEntryST; + String aURLST; BibDataManager* pDatMan; -// DECL_LINK(EndDragHdl, HeaderBar*); +// DECL_LINK(EndDragHdl, HeaderBar*); DECL_LINK(DoubleClickHdl, SvTabListBox*); public: DBChangeDialog_Impl(Window* pParent, BibDataManager* pMan ); ~DBChangeDialog_Impl(); - String GetCurrentURL()const; + String GetCurrentURL()const; }; /*-- 18.11.99 10:35:20--------------------------------------------------- @@ -618,12 +618,12 @@ public: -----------------------------------------------------------------------*/ DBChangeDialog_Impl::DBChangeDialog_Impl(Window* pParent, BibDataManager* pMan ) : ModalDialog(pParent, BibResId(RID_DLG_DBCHANGE) ), - aOKBT(this, BibResId( BT_OK )), - aCancelBT(this, BibResId( BT_CANCEL )), - aHelpBT(this, BibResId( BT_HELP )), - aSelectionGB(this, BibResId( GB_SELECTION )), - aSelectionLB(this, BibResId( LB_SELECTION )), - aSelectionHB(this, BibResId( HB_SELECTION )), + aOKBT(this, BibResId( BT_OK )), + aCancelBT(this, BibResId( BT_CANCEL )), + aHelpBT(this, BibResId( BT_HELP )), + aSelectionGB(this, BibResId( GB_SELECTION )), + aSelectionLB(this, BibResId( LB_SELECTION )), + aSelectionHB(this, BibResId( HB_SELECTION )), aEntryST(BibResId(ST_ENTRY)), aURLST( BibResId(ST_URL)), pDatMan(pMan) @@ -663,7 +663,7 @@ DBChangeDialog_Impl::DBChangeDialog_Impl(Window* pParent, BibDataManager* pMan ) } catch(Exception& e ) { - (void) e; // make compiler happy + (void) e; // make compiler happy DBG_ERROR("Exception in BibDataManager::DBChangeDialog_Impl::DBChangeDialog_Impl"); } @@ -699,7 +699,7 @@ DBChangeDialog_Impl::~DBChangeDialog_Impl() /* -----------------18.11.99 12:36------------------- --------------------------------------------------*/ -String DBChangeDialog_Impl::GetCurrentURL()const +String DBChangeDialog_Impl::GetCurrentURL()const { String sRet; SvLBoxEntry* pEntry = aSelectionLB.FirstSelected(); @@ -809,9 +809,9 @@ BibDataManager::BibDataManager() --------------------------------------------------*/ BibDataManager::~BibDataManager() { - Reference< XLoadable > xLoad( m_xForm, UNO_QUERY ); - Reference< XPropertySet > xPrSet( m_xForm, UNO_QUERY ); - Reference< XComponent > xComp( m_xForm, UNO_QUERY ); + Reference< XLoadable > xLoad( m_xForm, UNO_QUERY ); + Reference< XPropertySet > xPrSet( m_xForm, UNO_QUERY ); + Reference< XComponent > xComp( m_xForm, UNO_QUERY ); if ( m_xForm.is() ) { Reference< XComponent > xConnection; @@ -871,8 +871,8 @@ void BibDataManager::InsertFields(const Reference< XFormComponent > & _rxGrid) ::rtl::OUString sCurrentModelType; const ::rtl::OUString sType(C2U("Type")); sal_Int32 nType = 0; - sal_Bool bIsFormatted = sal_False; - sal_Bool bFormattedIsNumeric = sal_True; + sal_Bool bIsFormatted = sal_False; + sal_Bool bFormattedIsNumeric = sal_True; xField->getPropertyValue(sType) >>= nType; switch(nType) { @@ -909,7 +909,7 @@ void BibDataManager::InsertFields(const Reference< XFormComponent > & _rxGrid) xCurrentCol->setPropertyValue(C2U("TreatAsNumber"), aFormatted); } Any aColName = makeAny( *pFields ); - xCurrentCol->setPropertyValue(FM_PROP_CONTROLSOURCE, aColName); + xCurrentCol->setPropertyValue(FM_PROP_CONTROLSOURCE, aColName); xCurrentCol->setPropertyValue(FM_PROP_LABEL, aColName); xColContainer->insertByName( *pFields, makeAny( xCurrentCol ) ); @@ -917,21 +917,21 @@ void BibDataManager::InsertFields(const Reference< XFormComponent > & _rxGrid) } catch(Exception& e ) { - (void) e; // make compiler happy + (void) e; // make compiler happy DBG_ERROR("Exception in BibDataManager::InsertFields"); } } /* -------------------------------------------------- --------------------------------------------------*/ -Reference< awt::XControlModel > BibDataManager::updateGridModel() +Reference< awt::XControlModel > BibDataManager::updateGridModel() { return updateGridModel( m_xForm ); } /* -------------------------------------------------- --------------------------------------------------*/ -Reference< awt::XControlModel > BibDataManager::updateGridModel(const Reference< XForm > & xDbForm) +Reference< awt::XControlModel > BibDataManager::updateGridModel(const Reference< XForm > & xDbForm) { try { @@ -944,8 +944,8 @@ Reference< awt::XControlModel > BibDataManager::updateGridModel(const Reference< m_xGridModel = createGridModel( gGridName ); Reference< XNameContainer > xNameCont(xDbForm, UNO_QUERY); -// if (xNameCont->hasByName(sName)) -// xNameCont->removeByName(sName); +// if (xNameCont->hasByName(sName)) +// xNameCont->removeByName(sName); // xNameCont->insertByName( sName, makeAny( m_xGridModel ) ); } @@ -956,7 +956,7 @@ Reference< awt::XControlModel > BibDataManager::updateGridModel(const Reference< } catch(Exception& e ) { - (void) e; // make compiler happy + (void) e; // make compiler happy DBG_ERROR("::updateGridModel: something went wrong !"); } @@ -966,9 +966,9 @@ Reference< awt::XControlModel > BibDataManager::updateGridModel(const Reference< /* -------------------------------------------------- --------------------------------------------------*/ -Reference< XForm > BibDataManager::createDatabaseForm(BibDBDescriptor& rDesc) +Reference< XForm > BibDataManager::createDatabaseForm(BibDBDescriptor& rDesc) { - Reference< XForm > xResult; + Reference< XForm > xResult; try { Reference< XMultiServiceFactory > xMgr = comphelper::getProcessServiceFactory(); @@ -989,7 +989,7 @@ Reference< XForm > BibDataManager::createDatabaseForm(BibDBDescriptor& rDesc) aVal <<= (sal_Int32)50; aPropertySet->setPropertyValue(C2U("FetchSize"), aVal); - Reference< XConnection > xConnection = getConnection(rDesc.sDataSource); + Reference< XConnection > xConnection = getConnection(rDesc.sDataSource); aVal <<= xConnection; aPropertySet->setPropertyValue(C2U("ActiveConnection"), aVal); @@ -1018,7 +1018,7 @@ Reference< XForm > BibDataManager::createDatabaseForm(BibDBDescriptor& rDesc) aPropertySet->setPropertyValue(C2U("CommandType"), aVal); - Reference< XDatabaseMetaData > xMetaData = xConnection->getMetaData(); + Reference< XDatabaseMetaData > xMetaData = xConnection->getMetaData(); aQuoteChar = xMetaData->getIdentifierQuoteString(); Reference< XMultiServiceFactory > xFactory(xConnection, UNO_QUERY); @@ -1042,7 +1042,7 @@ Reference< XForm > BibDataManager::createDatabaseForm(BibDBDescriptor& rDesc) } catch(Exception& e ) { - (void) e; // make compiler happy + (void) e; // make compiler happy DBG_ERROR("::createDatabaseForm: something went wrong !"); } @@ -1065,7 +1065,7 @@ Sequence< ::rtl::OUString > BibDataManager::getDataSources() } catch(Exception& e ) { - (void) e; // make compiler happy + (void) e; // make compiler happy DBG_ERROR("::getDataSources: something went wrong !"); } @@ -1180,7 +1180,7 @@ void BibDataManager::setActiveDataSource(const ::rtl::OUString& rURL) Reference< XComponent > xOldConnection; aPropertySet->getPropertyValue(C2U("ActiveConnection")) >>= xOldConnection; - Reference< XConnection > xConnection = getConnection(rURL); + Reference< XConnection > xConnection = getConnection(rURL); if(!xConnection.is()) { aDataSourceURL = sTmp; @@ -1230,7 +1230,7 @@ void BibDataManager::setActiveDataSource(const ::rtl::OUString& rURL) FeatureStateEvent aEvent; util::URL aURL; aEvent.IsEnabled = sal_True; - aEvent.Requery = sal_False; + aEvent.Requery = sal_False; aEvent.FeatureDescriptor = getActiveDataTable(); aEvent.State = makeAny( getDataSources() ); @@ -1259,7 +1259,7 @@ void BibDataManager::setActiveDataTable(const ::rtl::OUString& rTable) if(aPropertySet.is()) { - Reference< XConnection > xConnection = getConnection( m_xForm ); + Reference< XConnection > xConnection = getConnection( m_xForm ); Reference< XTablesSupplier > xSupplyTables(xConnection, UNO_QUERY); Reference< XNameAccess > xAccess = xSupplyTables->getTables(); Sequence< ::rtl::OUString > aTableNameSeq = xAccess->getElementNames(); @@ -1280,7 +1280,7 @@ void BibDataManager::setActiveDataTable(const ::rtl::OUString& rTable) } if (pTableNames != pTableNamesEnd) { - Reference< XDatabaseMetaData > xMetaData = xConnection->getMetaData(); + Reference< XDatabaseMetaData > xMetaData = xConnection->getMetaData(); aQuoteChar = xMetaData->getIdentifierQuoteString(); Reference< XMultiServiceFactory > xFactory(xConnection, UNO_QUERY); @@ -1309,7 +1309,7 @@ void BibDataManager::setActiveDataTable(const ::rtl::OUString& rTable) } catch(Exception& e ) { - (void) e; // make compiler happy + (void) e; // make compiler happy DBG_ERROR("::setActiveDataTable: something went wrong !"); } @@ -1410,9 +1410,9 @@ void SAL_CALL BibDataManager::removeLoadListener( const Reference< XLoadListener } //------------------------------------------------------------------------ -Reference< awt::XControlModel > BibDataManager::createGridModel(const ::rtl::OUString& rName) +Reference< awt::XControlModel > BibDataManager::createGridModel(const ::rtl::OUString& rName) { - Reference< awt::XControlModel > xModel; + Reference< awt::XControlModel > xModel; try { @@ -1442,7 +1442,7 @@ Reference< awt::XControlModel > BibDataManager::createGridModel(const ::rtl::OUS } catch(Exception& e ) { - (void) e; // make compiler happy + (void) e; // make compiler happy DBG_ERROR("::createGridModel: something went wrong !"); } @@ -1489,10 +1489,10 @@ Reference< awt::XControlModel > BibDataManager::createGridModel(const ::rtl::OUS return aResStr; } //------------------------------------------------------------------------ -Reference< awt::XControlModel > BibDataManager::loadControlModel( +Reference< awt::XControlModel > BibDataManager::loadControlModel( const ::rtl::OUString& rName, sal_Bool bForceListBox) { - Reference< awt::XControlModel > xModel; + Reference< awt::XControlModel > xModel; ::rtl::OUString aName(C2U("View_")); aName += rName; @@ -1565,7 +1565,7 @@ Reference< awt::XControlModel > BibDataManager::loadControlModel( } catch(Exception& e ) { - (void) e; // make compiler happy + (void) e; // make compiler happy DBG_ERROR("::loadControlModel: something went wrong !"); } return xModel; @@ -1606,7 +1606,7 @@ void BibDataManager::propertyChange(const beans::PropertyChangeEvent& evt) throw } catch(Exception& e ) { - (void) e; // make compiler happy + (void) e; // make compiler happy DBG_ERROR("::propertyChange: something went wrong !"); } @@ -1651,7 +1651,7 @@ try } catch(Exception& e ) { - (void) e; // make compiler happy + (void) e; // make compiler happy DBG_ERROR("Exception in BibDataManager::SetMeAsUidListener"); } @@ -1697,7 +1697,7 @@ try } catch(Exception& e ) { - (void) e; // make compiler happy + (void) e; // make compiler happy DBG_ERROR("Exception in BibDataManager::RemoveMeAsUidListener"); } @@ -1712,9 +1712,9 @@ void BibDataManager::CreateMappingDialog(Window* pParent) if(RET_OK == pDlg->Execute() && pBibView) { reload(); -// unload(); -// pBibView->UpdatePages(); -// load(); +// unload(); +// pBibView->UpdatePages(); +// load(); } delete pDlg; } diff --git a/extensions/source/bibliography/datman.hrc b/extensions/source/bibliography/datman.hrc index 97f72cf98431..5ea4749eef1c 100644 --- a/extensions/source/bibliography/datman.hrc +++ b/extensions/source/bibliography/datman.hrc @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -26,15 +26,15 @@ ************************************************************************/ -#define BT_OK 1 +#define BT_OK 1 #define BT_CANCEL 2 #define BT_HELP 3 #define GB_MAPPING 4 #define FT_IDENTIFIER 5 #define LB_IDENTIFIER 6 -#define ST_NONE 7 +#define ST_NONE 7 -#define FT_AUTHORITYTYPE 8 +#define FT_AUTHORITYTYPE 8 #define LB_AUTHORITYTYPE 9 #define FT_ADDRESS 10 #define LB_ADDRESS 11 @@ -95,8 +95,8 @@ #define FT_CUSTOM5 66 #define LB_CUSTOM5 67 -#define GB_SELECTION 68 -#define ST_ENTRY 69 -#define LB_SELECTION 71 -#define HB_SELECTION 72 +#define GB_SELECTION 68 +#define ST_ENTRY 69 +#define LB_SELECTION 71 +#define HB_SELECTION 72 diff --git a/extensions/source/bibliography/datman.hxx b/extensions/source/bibliography/datman.hxx index 7a499b785e71..4f485641e9e1 100644 --- a/extensions/source/bibliography/datman.hxx +++ b/extensions/source/bibliography/datman.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -73,28 +73,28 @@ public: BibInterceptorHelper( ::bib::BibBeamer* pBibBeamer, ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > xDispatch); void ReleaseInterceptor(); - + // XDispatchProvider virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > SAL_CALL queryDispatch( const ::com::sun::star::util::URL& aURL, const ::rtl::OUString& aTargetFrameName, sal_Int32 nSearchFlags ) throw (::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > > SAL_CALL queryDispatches( const ::com::sun::star::uno::Sequence< ::com::sun::star::frame::DispatchDescriptor >& aDescripts ) throw (::com::sun::star::uno::RuntimeException); - // XDispatchProviderInterceptor + // XDispatchProviderInterceptor virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider > SAL_CALL getSlaveDispatchProvider( ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL setSlaveDispatchProvider( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider >& xNewSlaveDispatchProvider ) throw (::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider > SAL_CALL getMasterDispatchProvider( ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL setMasterDispatchProvider( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider >& xNewMasterDispatchProvider ) throw (::com::sun::star::uno::RuntimeException); }; -typedef cppu::WeakComponentImplHelper2 < ::com::sun::star::beans::XPropertyChangeListener - , ::com::sun::star::form::XLoadable - > BibDataManager_Base; +typedef cppu::WeakComponentImplHelper2 < ::com::sun::star::beans::XPropertyChangeListener + , ::com::sun::star::form::XLoadable + > BibDataManager_Base; class BibDataManager :public ::comphelper::OMutexAndBroadcastHelper ,public BibDataManager_Base { private: - ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm > m_xForm; - ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > m_xGridModel; - ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > m_xSourceProps; + ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm > m_xForm; + ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > m_xGridModel; + ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > m_xSourceProps; ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSingleSelectQueryComposer > m_xParser; ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormController > m_xFormCtrl; // #100312# ------------------- @@ -102,24 +102,24 @@ private: BibInterceptorHelper* m_pInterceptorHelper; ::rtl::OUString aActiveDataTable; - ::rtl::OUString aDataSourceURL; - ::rtl::OUString aQuoteChar; - ::com::sun::star::uno::Any aUID; - ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > xBibCursor; + ::rtl::OUString aDataSourceURL; + ::rtl::OUString aQuoteChar; + ::com::sun::star::uno::Any aUID; + ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > xBibCursor; - ::cppu::OInterfaceContainerHelper m_aLoadListeners; + ::cppu::OInterfaceContainerHelper m_aLoadListeners; - ::bib::BibView* pBibView; - BibToolBar* pToolbar; + ::bib::BibView* pBibView; + BibToolBar* pToolbar; - rtl::OUString sIdentifierMapping; + rtl::OUString sIdentifierMapping; protected: - void InsertFields(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent > & xGrid); - void SetMeAsUidListener(); - void RemoveMeAsUidListener(); + void InsertFields(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent > & xGrid); + void SetMeAsUidListener(); + void RemoveMeAsUidListener(); - void UpdateAddressbookCursor(::rtl::OUString aSourceName); + void UpdateAddressbookCursor(::rtl::OUString aSourceName); ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > updateGridModel(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm > & xDbForm); @@ -141,53 +141,53 @@ public: BibDataManager(); ~BibDataManager(); - virtual void SAL_CALL propertyChange(const ::com::sun::star::beans::PropertyChangeEvent& evt) + virtual void SAL_CALL propertyChange(const ::com::sun::star::beans::PropertyChangeEvent& evt) throw( ::com::sun::star::uno::RuntimeException ); - virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) + virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw( ::com::sun::star::uno::RuntimeException ); - ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm > createDatabaseForm( BibDBDescriptor& aDesc); + ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm > createDatabaseForm( BibDBDescriptor& aDesc); - ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > updateGridModel(); + ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > updateGridModel(); - ::com::sun::star::uno::Sequence< ::rtl::OUString> getDataSources(); + ::com::sun::star::uno::Sequence< ::rtl::OUString> getDataSources(); - ::rtl::OUString getActiveDataSource() {return aDataSourceURL;} - void setActiveDataSource(const ::rtl::OUString& rURL); + ::rtl::OUString getActiveDataSource() {return aDataSourceURL;} + void setActiveDataSource(const ::rtl::OUString& rURL); - ::rtl::OUString getActiveDataTable(); - void setActiveDataTable(const ::rtl::OUString& rTable); + ::rtl::OUString getActiveDataTable(); + void setActiveDataTable(const ::rtl::OUString& rTable); - void setFilter(const ::rtl::OUString& rQuery); - ::rtl::OUString getFilter(); + void setFilter(const ::rtl::OUString& rQuery); + ::rtl::OUString getFilter(); - ::com::sun::star::uno::Sequence< ::rtl::OUString> getQueryFields(); - ::rtl::OUString getQueryField(); - void startQueryWith(const ::rtl::OUString& rQuery); + ::com::sun::star::uno::Sequence< ::rtl::OUString> getQueryFields(); + ::rtl::OUString getQueryField(); + void startQueryWith(const ::rtl::OUString& rQuery); - const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSingleSelectQueryComposer >& getParser() { return m_xParser; } - const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm >& getForm() { return m_xForm; } + const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSingleSelectQueryComposer >& getParser() { return m_xParser; } + const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm >& getForm() { return m_xForm; } - ::rtl::OUString getControlName(sal_Int32 nFormatKey ); + ::rtl::OUString getControlName(sal_Int32 nFormatKey ); - ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > loadControlModel(const ::rtl::OUString& rName, + ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > loadControlModel(const ::rtl::OUString& rName, sal_Bool bForceListBox = sal_False); - void CreateMappingDialog(Window* pParent); + void CreateMappingDialog(Window* pParent); ::rtl::OUString CreateDBChangeDialog(Window* pParent); void DispatchDBChangeDialog(); - sal_Bool HasActiveConnection() const; + sal_Bool HasActiveConnection() const; - void SetView( ::bib::BibView* pView ) { pBibView = pView; } + void SetView( ::bib::BibView* pView ) { pBibView = pView; } - void SetToolbar(BibToolBar* pSet); + void SetToolbar(BibToolBar* pSet); - const rtl::OUString& GetIdentifierMapping(); - void ResetIdentifierMapping() {sIdentifierMapping = rtl::OUString();} + const rtl::OUString& GetIdentifierMapping(); + void ResetIdentifierMapping() {sIdentifierMapping = rtl::OUString();} ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormController > GetFormController(); // #100312# ---------- diff --git a/extensions/source/bibliography/datman.src b/extensions/source/bibliography/datman.src index 0a0643b1b117..6b8c4b00ef41 100644 --- a/extensions/source/bibliography/datman.src +++ b/extensions/source/bibliography/datman.src @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -55,7 +55,7 @@ ModalDialog RID_DLG_MAPPING Size = MAP_APPFONT ( 329 , 8 ) ; Text [ en-US ] = "Column names"; }; - FixedText FT_IDENTIFIER + FixedText FT_IDENTIFIER { Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 50 , 10 ) ; diff --git a/extensions/source/bibliography/formcontrolcontainer.cxx b/extensions/source/bibliography/formcontrolcontainer.cxx index db61efc3e7c3..22ee46485b04 100644 --- a/extensions/source/bibliography/formcontrolcontainer.cxx +++ b/extensions/source/bibliography/formcontrolcontainer.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -129,7 +129,7 @@ namespace bib } catch( const Exception& e) { - (void) e; // make compiler happy + (void) e; // make compiler happy DBG_ERROR( "FormControlContainer::implSetDesignMode: caught an exception!" ); } } @@ -176,7 +176,7 @@ namespace bib } //......................................................................... -} // namespace bib +} // namespace bib //......................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/extensions/source/bibliography/formcontrolcontainer.hxx b/extensions/source/bibliography/formcontrolcontainer.hxx index b80b60d8bc75..a1e72b11a222 100644 --- a/extensions/source/bibliography/formcontrolcontainer.hxx +++ b/extensions/source/bibliography/formcontrolcontainer.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -48,23 +48,23 @@ namespace bib ,public ::bib::OLoadListener { private: - OLoadListenerAdapter* m_pFormAdapter; + OLoadListenerAdapter* m_pFormAdapter; ::com::sun::star::uno::Reference< ::com::sun::star::form::XLoadable > m_xForm; private: - void implSetDesignMode( sal_Bool _bDesign ); + void implSetDesignMode( sal_Bool _bDesign ); protected: FormControlContainer( ); ~FormControlContainer( ); - sal_Bool isFormConnected() const { return NULL != m_pFormAdapter; } - void connectForm( const ::com::sun::star::uno::Reference< ::com::sun::star::form::XLoadable >& _rxForm ); - void disconnectForm(); + sal_Bool isFormConnected() const { return NULL != m_pFormAdapter; } + void connectForm( const ::com::sun::star::uno::Reference< ::com::sun::star::form::XLoadable >& _rxForm ); + void disconnectForm(); - void ensureDesignMode(); + void ensureDesignMode(); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer > + virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer > getControlContainer() = 0; protected: @@ -78,7 +78,7 @@ namespace bib }; //......................................................................... -} // namespace bib +} // namespace bib //......................................................................... #endif // EXTENSIONS_BIB_FORMCONTROLCONTAINER_HXX diff --git a/extensions/source/bibliography/framectr.cxx b/extensions/source/bibliography/framectr.cxx index 1194982782c3..495362294602 100644 --- a/extensions/source/bibliography/framectr.cxx +++ b/extensions/source/bibliography/framectr.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -139,7 +139,7 @@ const CmdToInfoCache& GetCommandToInfoCache() bCacheInitialized = sal_True; } } - + return aCmdToInfoCache; } @@ -147,10 +147,10 @@ const CmdToInfoCache& GetCommandToInfoCache() class BibFrameCtrl_Impl : public cppu::WeakImplHelper1 < XFrameActionListener > { public: - Mutex aMutex; - OMultiTypeInterfaceContainerHelper aLC; + Mutex aMutex; + OMultiTypeInterfaceContainerHelper aLC; - BibFrameController_Impl* pController; + BibFrameController_Impl* pController; BibFrameCtrl_Impl() : aLC( aMutex ) @@ -159,8 +159,8 @@ public: ~BibFrameCtrl_Impl(); - virtual void SAL_CALL frameAction(const FrameActionEvent& aEvent) throw( RuntimeException ); - virtual void SAL_CALL disposing( const lang::EventObject& Source ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL frameAction(const FrameActionEvent& aEvent) throw( RuntimeException ); + virtual void SAL_CALL disposing( const lang::EventObject& Source ) throw (::com::sun::star::uno::RuntimeException); }; @@ -235,7 +235,7 @@ sal_Bool SAL_CALL BibFrameController_Impl::supportsService( const ::rtl::OUStrin // base services are included there and should be asked by uno-rtti. ::com::sun::star::uno::Sequence< ::rtl::OUString > lNames(1); lNames[0] = ::rtl::OUString::createFromAscii("com.sun.star.frame.Bibliography"); - return lNames; + return lNames; } void BibFrameController_Impl::attachFrame( const uno::Reference< XFrame > & xArg ) throw (::com::sun::star::uno::RuntimeException) @@ -298,7 +298,7 @@ void BibFrameController_Impl::removeEventListener( const uno::Reference< lang::X pImp->aLC.removeInterface( ::getCppuType((const Reference< lang::XEventListener >*)0), aListener ); } -uno::Reference< frame::XDispatch > BibFrameController_Impl::queryDispatch( const util::URL& aURL, const rtl::OUString& /*aTarget*/, sal_Int32 /*nSearchFlags*/ ) throw (::com::sun::star::uno::RuntimeException) +uno::Reference< frame::XDispatch > BibFrameController_Impl::queryDispatch( const util::URL& aURL, const rtl::OUString& /*aTarget*/, sal_Int32 /*nSearchFlags*/ ) throw (::com::sun::star::uno::RuntimeException) { if ( !bDisposing ) { @@ -306,7 +306,7 @@ uno::Reference< frame::XDispatch > BibFrameController_Impl::queryDispatch( cons CmdToInfoCache::const_iterator pIter = rCmdCache.find( aURL.Complete ); if ( pIter != rCmdCache.end() ) { - if (( pDatMan->HasActiveConnection() ) || + if (( pDatMan->HasActiveConnection() ) || ( !pIter->second.bActiveConnection )) return (frame::XDispatch*) this; } @@ -323,7 +323,7 @@ uno::Sequence<uno::Reference< XDispatch > > BibFrameController_Impl::queryDispat return aDispatches; } -uno::Sequence< ::sal_Int16 > SAL_CALL BibFrameController_Impl::getSupportedCommandGroups() +uno::Sequence< ::sal_Int16 > SAL_CALL BibFrameController_Impl::getSupportedCommandGroups() throw (::com::sun::star::uno::RuntimeException) { uno::Sequence< ::sal_Int16 > aDispatchInfo( 4 ); @@ -335,12 +335,12 @@ throw (::com::sun::star::uno::RuntimeException) return aDispatchInfo; } - -uno::Sequence< frame::DispatchInformation > SAL_CALL BibFrameController_Impl::getConfigurableDispatchInformation( ::sal_Int16 nCommandGroup ) + +uno::Sequence< frame::DispatchInformation > SAL_CALL BibFrameController_Impl::getConfigurableDispatchInformation( ::sal_Int16 nCommandGroup ) throw (::com::sun::star::uno::RuntimeException) { const CmdToInfoCache& rCmdCache = GetCommandToInfoCache(); - + sal_Bool bGroupFound( sal_False ); frame::DispatchInformation aDispatchInfo; std::list< frame::DispatchInformation > aDispatchInfoList; @@ -369,7 +369,7 @@ throw (::com::sun::star::uno::RuntimeException) ::com::sun::star::uno::Sequence< ::com::sun::star::frame::DispatchInformation > aSeq = comphelper::containerToSequence< ::com::sun::star::frame::DispatchInformation, std::list< ::com::sun::star::frame::DispatchInformation > >( aDispatchInfoList ); - + return aSeq; } @@ -422,7 +422,7 @@ sal_Bool BibFrameController_Impl::SaveModified(const Reference< form::runtime::X } Window* lcl_GetFocusChild( Window* pParent ) -{ +{ USHORT nChildren = pParent->GetChildCount(); for( USHORT nChild = 0; nChild < nChildren; ++nChild) { @@ -484,8 +484,8 @@ void BibFrameController_Impl::dispatch(const util::URL& _rURL, const uno::Sequen FeatureStateEvent aEvent; aEvent.FeatureURL = pObj->aURL; aEvent.IsEnabled = sal_True; - aEvent.Requery = sal_False; - aEvent.Source = (XDispatch *) this; + aEvent.Requery = sal_False; + aEvent.Source = (XDispatch *) this; pObj->xListener->statusChanged( aEvent ); //break; because there are more than one } @@ -571,8 +571,8 @@ void BibFrameController_Impl::dispatch(const util::URL& _rURL, const uno::Sequen FeatureStateEvent aEvent; aEvent.FeatureURL = pObj->aURL; aEvent.IsEnabled = 0 != pDatMan->getParser()->getFilter().getLength(); - aEvent.Requery = sal_False; - aEvent.Source = (XDispatch *) this; + aEvent.Requery = sal_False; + aEvent.Source = (XDispatch *) this; pObj->xListener->statusChanged( aEvent ); } } @@ -673,29 +673,29 @@ void BibFrameController_Impl::dispatch(const util::URL& _rURL, const uno::Sequen { Window* pChild = lcl_GetFocusChild( VCLUnoHelper::GetWindow( xWindow ) ); if(pChild) - { + { KeyEvent aEvent( 0, KEYFUNC_CUT ); pChild->KeyInput( aEvent ); } - } + } else if(aCommand.EqualsAscii("Copy")) { Window* pChild = lcl_GetFocusChild( VCLUnoHelper::GetWindow( xWindow ) ); if(pChild) - { + { KeyEvent aEvent( 0, KEYFUNC_COPY ); pChild->KeyInput( aEvent ); } - } + } else if(aCommand.EqualsAscii("Paste")) { Window* pChild = lcl_GetFocusChild( VCLUnoHelper::GetWindow( xWindow ) ); if(pChild) - { + { KeyEvent aEvent( 0, KEYFUNC_PASTE ); pChild->KeyInput( aEvent ); } - } + } } } IMPL_STATIC_LINK( BibFrameController_Impl, DisposeHdl, void*, EMPTYARG ) @@ -813,7 +813,7 @@ void BibFrameController_Impl::addStatusListener( { } } - } + } uno::Reference< datatransfer::XTransferable > xContents = xClip->getContents( ); } } @@ -829,12 +829,12 @@ void BibFrameController_Impl::addStatusListener( xSet->getPropertyValue(C2U("RowCount")) >>= nCount; aEvent.IsEnabled = nCount > 0; } - } + } else if (aURL.Path == C2U("Bib/InsertRecord")) { Reference< beans::XPropertySet > xSet(pDatMan->getForm(), UNO_QUERY); aEvent.IsEnabled = canInsertRecords(xSet); - } + } aListener->statusChanged( aEvent ); } //----------------------------------------------------------------------------- @@ -879,8 +879,8 @@ void BibFrameController_Impl::RemoveFilter() FeatureStateEvent aEvent; aEvent.FeatureURL = pObj->aURL; aEvent.IsEnabled = sal_False; - aEvent.Requery = sal_False; - aEvent.Source = (XDispatch *) this; + aEvent.Requery = sal_False; + aEvent.Source = (XDispatch *) this; pObj->xListener->statusChanged( aEvent ); bRemoveFilter=sal_True; } @@ -889,8 +889,8 @@ void BibFrameController_Impl::RemoveFilter() FeatureStateEvent aEvent; aEvent.FeatureURL = pObj->aURL; aEvent.IsEnabled = sal_True; - aEvent.Requery = sal_False; - aEvent.Source = (XDispatch *) this; + aEvent.Requery = sal_False; + aEvent.Source = (XDispatch *) this; aEvent.State <<= aQuery; pObj->xListener->statusChanged( aEvent ); bQueryText=sal_True; @@ -919,7 +919,7 @@ void BibFrameController_Impl::ChangeDataSource(const uno::Sequence< beans::Prope aDBTableName = pDatMan->getActiveDataTable(); } else - { + { m_xDatMan->unload(); pDatMan->setActiveDataTable(aDBTableName); pDatMan->updateGridModel(); @@ -939,8 +939,8 @@ void BibFrameController_Impl::ChangeDataSource(const uno::Sequence< beans::Prope FeatureStateEvent aEvent; aEvent.FeatureURL = pObj->aURL; aEvent.IsEnabled = sal_True; - aEvent.Requery = sal_False; - aEvent.Source = (XDispatch *) this; + aEvent.Requery = sal_False; + aEvent.Source = (XDispatch *) this; aEvent.FeatureDescriptor=pDatMan->getQueryField(); uno::Sequence<rtl::OUString> aStringSeq=pDatMan->getQueryFields(); @@ -954,8 +954,8 @@ void BibFrameController_Impl::ChangeDataSource(const uno::Sequence< beans::Prope FeatureStateEvent aEvent; aEvent.FeatureURL = pObj->aURL; aEvent.IsEnabled = sal_True; - aEvent.Requery = sal_False; - aEvent.Source = (XDispatch *) this; + aEvent.Requery = sal_False; + aEvent.Source = (XDispatch *) this; BibConfig* pConfig = BibModul::GetConfig(); aEvent.State <<= pConfig->getQueryText(); pObj->xListener->statusChanged( aEvent ); diff --git a/extensions/source/bibliography/framectr.hxx b/extensions/source/bibliography/framectr.hxx index 5cd7e9d46471..4ef00f967fed 100644 --- a/extensions/source/bibliography/framectr.hxx +++ b/extensions/source/bibliography/framectr.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -49,9 +49,9 @@ namespace com{namespace sun{namespace star{ class BibStatusDispatch { public: - ::com::sun::star::util::URL aURL; - ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener > xListener; - BibStatusDispatch( const ::com::sun::star::util::URL& rURL, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener > xRef ) + ::com::sun::star::util::URL aURL; + ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener > xListener; + BibStatusDispatch( const ::com::sun::star::util::URL& rURL, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener > xRef ) : aURL( rURL ) , xListener( xRef ) {} @@ -69,15 +69,15 @@ class BibFrameController_Impl : public cppu::WeakImplHelper5 < > { friend class BibFrameCtrl_Impl; - BibFrameCtrl_Impl* pImp; - BibStatusDispatchArr aStatusListeners; - ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > xWindow; - ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > xFrame; - sal_Bool bDisposing; - sal_Bool bHierarchical; - ::com::sun::star::uno::Reference< ::com::sun::star::form::XLoadable > m_xDatMan; - BibDataManager* pDatMan; - HdlBibModul pBibMod; + BibFrameCtrl_Impl* pImp; + BibStatusDispatchArr aStatusListeners; + ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > xWindow; + ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > xFrame; + sal_Bool bDisposing; + sal_Bool bHierarchical; + ::com::sun::star::uno::Reference< ::com::sun::star::form::XLoadable > m_xDatMan; + BibDataManager* pDatMan; + HdlBibModul pBibMod; DECL_STATIC_LINK( BibFrameController_Impl, DisposeHdl, void* ); @@ -88,11 +88,11 @@ public: ~BibFrameController_Impl(); - void activate(); - void deactivate(); + void activate(); + void deactivate(); - void ChangeDataSource(const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aArgs); - void RemoveFilter(); + void ChangeDataSource(const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aArgs); + void RemoveFilter(); // ::com::sun::star::lang::XServiceInfo virtual ::rtl::OUString SAL_CALL getImplementationName() throw (::com::sun::star::uno::RuntimeException); @@ -100,27 +100,27 @@ public: virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw (::com::sun::star::uno::RuntimeException); // ::com::sun::star::frame::XController - virtual void SAL_CALL attachFrame( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > & xFrame ) throw (::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL attachModel( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > & xModel ) throw (::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL suspend( sal_Bool bSuspend ) throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Any SAL_CALL getViewData() throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL restoreViewData( const ::com::sun::star::uno::Any& Value ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL attachFrame( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > & xFrame ) throw (::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL attachModel( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > & xModel ) throw (::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL suspend( sal_Bool bSuspend ) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getViewData() throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL restoreViewData( const ::com::sun::star::uno::Any& Value ) throw (::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > SAL_CALL getFrame() throw (::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > SAL_CALL getModel() throw (::com::sun::star::uno::RuntimeException); // ::com::sun::star::lang::XComponent - virtual void SAL_CALL dispose() throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL dispose() throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener ) throw (::com::sun::star::uno::RuntimeException); // ::com::sun::star::frame::XDispatchProvider - virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > SAL_CALL queryDispatch( const ::com::sun::star::util::URL& aURL, const rtl::OUString& aTargetFrameName, sal_Int32 nSearchFlags) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > SAL_CALL queryDispatch( const ::com::sun::star::util::URL& aURL, const rtl::OUString& aTargetFrameName, sal_Int32 nSearchFlags) throw (::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > > SAL_CALL queryDispatches( const ::com::sun::star::uno::Sequence< ::com::sun::star::frame::DispatchDescriptor >& aDescripts) throw (::com::sun::star::uno::RuntimeException); //class ::com::sun::star::frame::XDispatch - virtual void SAL_CALL dispatch(const ::com::sun::star::util::URL& aURL, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aArgs) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL addStatusListener(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener > & xControl, const ::com::sun::star::util::URL& aURL) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removeStatusListener(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener > & xControl, const ::com::sun::star::util::URL& aURL) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL dispatch(const ::com::sun::star::util::URL& aURL, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aArgs) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addStatusListener(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener > & xControl, const ::com::sun::star::util::URL& aURL) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeStatusListener(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener > & xControl, const ::com::sun::star::util::URL& aURL) throw (::com::sun::star::uno::RuntimeException); // ::com::sun::star::frame::XDispatchInformationProvider virtual ::com::sun::star::uno::Sequence< ::sal_Int16 > SAL_CALL getSupportedCommandGroups( ) throw (::com::sun::star::uno::RuntimeException); diff --git a/extensions/source/bibliography/general.cxx b/extensions/source/bibliography/general.cxx index 3cee7f8b8364..c699aff5d485 100644 --- a/extensions/source/bibliography/general.cxx +++ b/extensions/source/bibliography/general.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -96,9 +96,9 @@ OUString lcl_GetColumnName( const Mapping* pMapping, sal_uInt16 nIndexPos ) /* -----------------------------04.01.00 10:54-------------------------------- ---------------------------------------------------------------------------*/ -class BibPosListener :public cppu::WeakImplHelper1 <sdbc::XRowSetListener> +class BibPosListener :public cppu::WeakImplHelper1 <sdbc::XRowSetListener> { - BibGeneralPage* pParentPage; + BibGeneralPage* pParentPage; public: BibPosListener(BibGeneralPage* pParent); @@ -162,7 +162,7 @@ void BibPosListener::cursorMoved(const lang::EventObject& /*aEvent*/) throw( uno { uno::Any aVal = xValueAcc->getByName(uTypeMapping); uno::Reference< uno::XInterface > xInt = *(uno::Reference< uno::XInterface > *)aVal.getValue(); - uno::Reference< sdb::XColumn > xCol(xInt, UNO_QUERY); + uno::Reference< sdb::XColumn > xCol(xInt, UNO_QUERY); DBG_ASSERT(xCol.is(), "BibPosListener::positioned : invalid column (no sdb::XColumn) !"); if (xCol.is()) { @@ -189,7 +189,7 @@ void BibPosListener::cursorMoved(const lang::EventObject& /*aEvent*/) throw( uno } catch(Exception& rEx) { - (void) rEx; // make compiler happy + (void) rEx; // make compiler happy DBG_ERROR("BibPosListener::positioned: something went wrong !"); } } @@ -206,40 +206,40 @@ void BibPosListener::disposing(const lang::EventObject& /*Source*/) throw( uno:: BibGeneralPage::BibGeneralPage(Window* pParent, BibDataManager* pMan): BibTabPage(pParent,BibResId(RID_TP_GENERAL)), aControlParentWin(this, WB_DIALOGCONTROL), - aIdentifierFT(&aControlParentWin, BibResId(FT_IDENTIFIER )), - aAuthTypeFT(&aControlParentWin, BibResId(FT_AUTHTYPE )), - aYearFT(&aControlParentWin, BibResId(FT_YEAR )), - aAuthorFT(&aControlParentWin, BibResId(FT_AUTHOR )), - aTitleFT(&aControlParentWin, BibResId(FT_TITLE )), - aPublisherFT(&aControlParentWin, BibResId(FT_PUBLISHER )), - aAddressFT(&aControlParentWin, BibResId(FT_ADDRESS )), - aISBNFT(&aControlParentWin, BibResId(FT_ISBN )), - aChapterFT(&aControlParentWin, BibResId(FT_CHAPTER )), - aPagesFT(&aControlParentWin, BibResId(FT_PAGE )), + aIdentifierFT(&aControlParentWin, BibResId(FT_IDENTIFIER )), + aAuthTypeFT(&aControlParentWin, BibResId(FT_AUTHTYPE )), + aYearFT(&aControlParentWin, BibResId(FT_YEAR )), + aAuthorFT(&aControlParentWin, BibResId(FT_AUTHOR )), + aTitleFT(&aControlParentWin, BibResId(FT_TITLE )), + aPublisherFT(&aControlParentWin, BibResId(FT_PUBLISHER )), + aAddressFT(&aControlParentWin, BibResId(FT_ADDRESS )), + aISBNFT(&aControlParentWin, BibResId(FT_ISBN )), + aChapterFT(&aControlParentWin, BibResId(FT_CHAPTER )), + aPagesFT(&aControlParentWin, BibResId(FT_PAGE )), aFirstFL(&aControlParentWin, BibResId(FL_1 )), - aEditorFT(&aControlParentWin, BibResId(FT_EDITOR )), - aEditionFT(&aControlParentWin, BibResId(FT_EDITION )), - aBooktitleFT(&aControlParentWin, BibResId(FT_BOOKTITLE )), - aVolumeFT(&aControlParentWin, BibResId(FT_VOLUME )), - aHowpublishedFT(&aControlParentWin, BibResId(FT_HOWPUBLISHED )), - aOrganizationsFT(&aControlParentWin,BibResId(FT_ORGANIZATION )), - aInstitutionFT(&aControlParentWin, BibResId(FT_INSTITUTION )), - aSchoolFT(&aControlParentWin, BibResId(FT_SCHOOL )), - aReportTypeFT(&aControlParentWin, BibResId(FT_REPORT )), - aMonthFT(&aControlParentWin, BibResId(FT_MONTH )), + aEditorFT(&aControlParentWin, BibResId(FT_EDITOR )), + aEditionFT(&aControlParentWin, BibResId(FT_EDITION )), + aBooktitleFT(&aControlParentWin, BibResId(FT_BOOKTITLE )), + aVolumeFT(&aControlParentWin, BibResId(FT_VOLUME )), + aHowpublishedFT(&aControlParentWin, BibResId(FT_HOWPUBLISHED )), + aOrganizationsFT(&aControlParentWin,BibResId(FT_ORGANIZATION )), + aInstitutionFT(&aControlParentWin, BibResId(FT_INSTITUTION )), + aSchoolFT(&aControlParentWin, BibResId(FT_SCHOOL )), + aReportTypeFT(&aControlParentWin, BibResId(FT_REPORT )), + aMonthFT(&aControlParentWin, BibResId(FT_MONTH )), aSecondFL(&aControlParentWin, BibResId(FL_2 )), - aJournalFT(&aControlParentWin, BibResId(FT_JOURNAL )), - aNumberFT(&aControlParentWin, BibResId(FT_NUMBER )), - aSeriesFT(&aControlParentWin, BibResId(FT_SERIES )), - aAnnoteFT(&aControlParentWin, BibResId(FT_ANNOTE )), - aNoteFT(&aControlParentWin, BibResId(FT_NOTE )), - aURLFT(&aControlParentWin, BibResId(FT_URL )), + aJournalFT(&aControlParentWin, BibResId(FT_JOURNAL )), + aNumberFT(&aControlParentWin, BibResId(FT_NUMBER )), + aSeriesFT(&aControlParentWin, BibResId(FT_SERIES )), + aAnnoteFT(&aControlParentWin, BibResId(FT_ANNOTE )), + aNoteFT(&aControlParentWin, BibResId(FT_NOTE )), + aURLFT(&aControlParentWin, BibResId(FT_URL )), aThirdFL(&aControlParentWin, BibResId(FL_3 )), - aCustom1FT(&aControlParentWin, BibResId(FT_CUSTOM1 )), - aCustom2FT(&aControlParentWin, BibResId(FT_CUSTOM2 )), - aCustom3FT(&aControlParentWin, BibResId(FT_CUSTOM3 )), - aCustom4FT(&aControlParentWin, BibResId(FT_CUSTOM4 )), - aCustom5FT(&aControlParentWin, BibResId(FT_CUSTOM5 )), + aCustom1FT(&aControlParentWin, BibResId(FT_CUSTOM1 )), + aCustom2FT(&aControlParentWin, BibResId(FT_CUSTOM2 )), + aCustom3FT(&aControlParentWin, BibResId(FT_CUSTOM3 )), + aCustom4FT(&aControlParentWin, BibResId(FT_CUSTOM4 )), + aCustom5FT(&aControlParentWin, BibResId(FT_CUSTOM5 )), aHoriScroll(this, WB_HORZ), aVertScroll(this, WB_VERT), sErrorPrefix(BibResId(ST_ERROR_PREFIX)), @@ -253,24 +253,24 @@ BibGeneralPage::BibGeneralPage(Window* pParent, BibDataManager* pMan): aBibTypeArr[1] = String(BibResId(ST_TYPE_BOOK)); aBibTypeArr[2] = String(BibResId(ST_TYPE_BOOKLET)); aBibTypeArr[3] = String(BibResId(ST_TYPE_CONFERENCE)); - aBibTypeArr[4] = String(BibResId(ST_TYPE_INBOOK )); + aBibTypeArr[4] = String(BibResId(ST_TYPE_INBOOK )); aBibTypeArr[5] = String(BibResId(ST_TYPE_INCOLLECTION)); aBibTypeArr[6] = String(BibResId(ST_TYPE_INPROCEEDINGS)); - aBibTypeArr[7] = String(BibResId(ST_TYPE_JOURNAL )); - aBibTypeArr[8] = String(BibResId(ST_TYPE_MANUAL )); + aBibTypeArr[7] = String(BibResId(ST_TYPE_JOURNAL )); + aBibTypeArr[8] = String(BibResId(ST_TYPE_MANUAL )); aBibTypeArr[9] = String(BibResId(ST_TYPE_MASTERSTHESIS)); - aBibTypeArr[10] = String(BibResId(ST_TYPE_MISC )); - aBibTypeArr[11] = String(BibResId(ST_TYPE_PHDTHESIS )); - aBibTypeArr[12] = String(BibResId(ST_TYPE_PROCEEDINGS )); - aBibTypeArr[13] = String(BibResId(ST_TYPE_TECHREPORT )); - aBibTypeArr[14] = String(BibResId(ST_TYPE_UNPUBLISHED )); - aBibTypeArr[15] = String(BibResId(ST_TYPE_EMAIL )); - aBibTypeArr[16] = String(BibResId(ST_TYPE_WWW )); - aBibTypeArr[17] = String(BibResId(ST_TYPE_CUSTOM1 )); - aBibTypeArr[18] = String(BibResId(ST_TYPE_CUSTOM2 )); - aBibTypeArr[19] = String(BibResId(ST_TYPE_CUSTOM3 )); - aBibTypeArr[20] = String(BibResId(ST_TYPE_CUSTOM4 )); - aBibTypeArr[21] = String(BibResId(ST_TYPE_CUSTOM5 )); + aBibTypeArr[10] = String(BibResId(ST_TYPE_MISC )); + aBibTypeArr[11] = String(BibResId(ST_TYPE_PHDTHESIS )); + aBibTypeArr[12] = String(BibResId(ST_TYPE_PROCEEDINGS )); + aBibTypeArr[13] = String(BibResId(ST_TYPE_TECHREPORT )); + aBibTypeArr[14] = String(BibResId(ST_TYPE_UNPUBLISHED )); + aBibTypeArr[15] = String(BibResId(ST_TYPE_EMAIL )); + aBibTypeArr[16] = String(BibResId(ST_TYPE_WWW )); + aBibTypeArr[17] = String(BibResId(ST_TYPE_CUSTOM1 )); + aBibTypeArr[18] = String(BibResId(ST_TYPE_CUSTOM2 )); + aBibTypeArr[19] = String(BibResId(ST_TYPE_CUSTOM3 )); + aBibTypeArr[20] = String(BibResId(ST_TYPE_CUSTOM4 )); + aBibTypeArr[21] = String(BibResId(ST_TYPE_CUSTOM5 )); FreeResource(); @@ -310,7 +310,7 @@ BibGeneralPage::BibGeneralPage(Window* pParent, BibDataManager* pMan): // the control should be a bit smaller than the fixed text Size aControlSize(aIdentifierFT.GetSizePixel()); aControlSize.Width() = aControlSize.Width() * 8 / 10; - + AddControlWithError( lcl_GetColumnName( pMapping, IDENTIFIER_POS ), lcl_MovePoint( aIdentifierFT ), aControlSize, sTableErrorString, aIdentifierFT.GetText(), HID_BIB_IDENTIFIER_POS, 0 ); @@ -321,7 +321,7 @@ BibGeneralPage::BibGeneralPage(Window* pParent, BibDataManager* pMan): aAuthTypeFT.GetText(), HID_BIB_AUTHORITYTYPE_POS, 1 ); ::Point aYearPos = lcl_MovePoint(aYearFT); - AddControlWithError( lcl_GetColumnName( pMapping, YEAR_POS ), aYearPos, + AddControlWithError( lcl_GetColumnName( pMapping, YEAR_POS ), aYearPos, aControlSize, sTableErrorString, aYearFT.GetText(), HID_BIB_YEAR_POS, 4 ); AddControlWithError( lcl_GetColumnName(pMapping, AUTHOR_POS), lcl_MovePoint(aAuthorFT), @@ -345,19 +345,19 @@ BibGeneralPage::BibGeneralPage(Window* pParent, BibDataManager* pMan): AddControlWithError( lcl_GetColumnName( pMapping, CHAPTER_POS ), lcl_MovePoint(aChapterFT), aControlSize, sTableErrorString, aChapterFT.GetText(), HID_BIB_CHAPTER_POS, 10 ); - AddControlWithError( lcl_GetColumnName( pMapping, PAGES_POS ), lcl_MovePoint( aPagesFT ), + AddControlWithError( lcl_GetColumnName( pMapping, PAGES_POS ), lcl_MovePoint( aPagesFT ), aControlSize, sTableErrorString, aPagesFT.GetText(), HID_BIB_PAGES_POS, 19 ); - AddControlWithError( lcl_GetColumnName( pMapping, EDITOR_POS ), lcl_MovePoint( aEditorFT ), + AddControlWithError( lcl_GetColumnName( pMapping, EDITOR_POS ), lcl_MovePoint( aEditorFT ), aControlSize, sTableErrorString, aEditorFT.GetText(), HID_BIB_EDITOR_POS, 12 ); - AddControlWithError( lcl_GetColumnName( pMapping, EDITION_POS ), lcl_MovePoint(aEditionFT), + AddControlWithError( lcl_GetColumnName( pMapping, EDITION_POS ), lcl_MovePoint(aEditionFT), aControlSize, sTableErrorString, aEditionFT.GetText(), HID_BIB_EDITION_POS, 11 ); AddControlWithError( lcl_GetColumnName(pMapping, BOOKTITLE_POS), lcl_MovePoint(aBooktitleFT), aControlSize, sTableErrorString, aBooktitleFT.GetText(), HID_BIB_BOOKTITLE_POS, 9 ); - AddControlWithError( lcl_GetColumnName( pMapping, VOLUME_POS ), lcl_MovePoint( aVolumeFT ), + AddControlWithError( lcl_GetColumnName( pMapping, VOLUME_POS ), lcl_MovePoint( aVolumeFT ), aControlSize, sTableErrorString, aVolumeFT.GetText(), HID_BIB_VOLUME_POS, 24 ); AddControlWithError( lcl_GetColumnName( pMapping, HOWPUBLISHED_POS ), lcl_MovePoint( aHowpublishedFT ), @@ -369,46 +369,46 @@ BibGeneralPage::BibGeneralPage(Window* pParent, BibDataManager* pMan): AddControlWithError( lcl_GetColumnName( pMapping, INSTITUTION_POS ), lcl_MovePoint( aInstitutionFT ), aControlSize, sTableErrorString, aInstitutionFT.GetText(), HID_BIB_INSTITUTION_POS, 14 ); - AddControlWithError( lcl_GetColumnName( pMapping, SCHOOL_POS ), lcl_MovePoint( aSchoolFT ), + AddControlWithError( lcl_GetColumnName( pMapping, SCHOOL_POS ), lcl_MovePoint( aSchoolFT ), aControlSize, sTableErrorString, aSchoolFT.GetText(), HID_BIB_SCHOOL_POS, 20 ); AddControlWithError( lcl_GetColumnName( pMapping, REPORTTYPE_POS ), lcl_MovePoint( aReportTypeFT ), aControlSize, sTableErrorString, aReportTypeFT.GetText(), HID_BIB_REPORTTYPE_POS, 23 ); - AddControlWithError( lcl_GetColumnName( pMapping, MONTH_POS ), lcl_MovePoint( aMonthFT ), + AddControlWithError( lcl_GetColumnName( pMapping, MONTH_POS ), lcl_MovePoint( aMonthFT ), aControlSize, sTableErrorString, aMonthFT.GetText(), HID_BIB_MONTH_POS, 3 ); AddControlWithError( lcl_GetColumnName( pMapping, JOURNAL_POS ), lcl_MovePoint( aJournalFT ), aControlSize, sTableErrorString, aJournalFT.GetText(), HID_BIB_JOURNAL_POS, 15 ); - AddControlWithError( lcl_GetColumnName( pMapping, NUMBER_POS ), lcl_MovePoint( aNumberFT ), + AddControlWithError( lcl_GetColumnName( pMapping, NUMBER_POS ), lcl_MovePoint( aNumberFT ), aControlSize, sTableErrorString, aNumberFT.GetText(), HID_BIB_NUMBER_POS, 17 ); - AddControlWithError( lcl_GetColumnName( pMapping, SERIES_POS ), lcl_MovePoint( aSeriesFT ), + AddControlWithError( lcl_GetColumnName( pMapping, SERIES_POS ), lcl_MovePoint( aSeriesFT ), aControlSize, sTableErrorString, aSeriesFT.GetText(), HID_BIB_SERIES_POS, 21 ); - AddControlWithError( lcl_GetColumnName( pMapping, ANNOTE_POS ), lcl_MovePoint( aAnnoteFT ), + AddControlWithError( lcl_GetColumnName( pMapping, ANNOTE_POS ), lcl_MovePoint( aAnnoteFT ), aControlSize, sTableErrorString, aAnnoteFT.GetText(), HID_BIB_ANNOTE_POS, 8 ); - AddControlWithError( lcl_GetColumnName( pMapping, NOTE_POS ), lcl_MovePoint( aNoteFT ), + AddControlWithError( lcl_GetColumnName( pMapping, NOTE_POS ), lcl_MovePoint( aNoteFT ), aControlSize, sTableErrorString, aNoteFT.GetText(), HID_BIB_NOTE_POS, 16 ); - AddControlWithError( lcl_GetColumnName( pMapping, URL_POS ), lcl_MovePoint( aURLFT ), + AddControlWithError( lcl_GetColumnName( pMapping, URL_POS ), lcl_MovePoint( aURLFT ), aControlSize, sTableErrorString, aURLFT.GetText(), HID_BIB_URL_POS, 25 ); AddControlWithError( lcl_GetColumnName( pMapping, CUSTOM1_POS ), lcl_MovePoint( aCustom1FT ), aControlSize, sTableErrorString, aCustom1FT.GetText(), HID_BIB_CUSTOM1_POS, 26 ); - AddControlWithError( lcl_GetColumnName( pMapping, CUSTOM2_POS ), lcl_MovePoint( aCustom2FT ), + AddControlWithError( lcl_GetColumnName( pMapping, CUSTOM2_POS ), lcl_MovePoint( aCustom2FT ), aControlSize, sTableErrorString, aCustom2FT.GetText(), HID_BIB_CUSTOM2_POS, 27 ); - AddControlWithError( lcl_GetColumnName( pMapping, CUSTOM3_POS ), lcl_MovePoint( aCustom3FT ), + AddControlWithError( lcl_GetColumnName( pMapping, CUSTOM3_POS ), lcl_MovePoint( aCustom3FT ), aControlSize, sTableErrorString, aCustom3FT.GetText(), HID_BIB_CUSTOM3_POS, 28 ); - AddControlWithError( lcl_GetColumnName( pMapping, CUSTOM4_POS ), lcl_MovePoint( aCustom4FT ), + AddControlWithError( lcl_GetColumnName( pMapping, CUSTOM4_POS ), lcl_MovePoint( aCustom4FT ), aControlSize, sTableErrorString, aCustom4FT.GetText(), HID_BIB_CUSTOM4_POS, 29 ); - AddControlWithError( lcl_GetColumnName( pMapping, CUSTOM5_POS ), lcl_MovePoint( aCustom5FT ), + AddControlWithError( lcl_GetColumnName( pMapping, CUSTOM5_POS ), lcl_MovePoint( aCustom5FT ), aControlSize, sTableErrorString, aCustom5FT.GetText(), HID_BIB_CUSTOM5_POS, 30 ); xPosListener = new BibPosListener(this); @@ -468,8 +468,8 @@ void BibGeneralPage::AddControlWithError( const OUString& rColumnName, const ::P { // adds also the XControl and creates a map entry in nFT2CtrlMap[] for mapping between control and FT - INT16 nIndex = -1; - uno::Reference< awt::XControlModel > xTmp = AddXControl(rColumnName, rPos, rSize, nHelpId, nIndex ); + INT16 nIndex = -1; + uno::Reference< awt::XControlModel > xTmp = AddXControl(rColumnName, rPos, rSize, nHelpId, nIndex ); if( xTmp.is() ) { DBG_ASSERT( nIndexInFTArray < FIELD_COUNT, "*BibGeneralPage::AddControlWithError(): wrong array index!" ); @@ -562,9 +562,9 @@ uno::Reference< awt::XControlModel > BibGeneralPage::AddXControl( // Peer als Child zu dem FrameWindow xCtrlContnr->addControl(rName, xControl); - uno::Reference< awt::XWindow > xCtrWin(xControl, UNO_QUERY ); + uno::Reference< awt::XWindow > xCtrWin(xControl, UNO_QUERY ); xCtrWin->addFocusListener( this ); - rIndex = -1; // -> implies, that not found + rIndex = -1; // -> implies, that not found for(USHORT i = 0; i < FIELD_COUNT; i++) if(!aControls[i].is()) { @@ -585,7 +585,7 @@ uno::Reference< awt::XControlModel > BibGeneralPage::AddXControl( } catch(Exception& rEx) { - (void) rEx; // make compiler happy + (void) rEx; // make compiler happy DBG_ERROR("BibGeneralPage::AddXControl: something went wrong !"); } return xCtrModel; @@ -634,7 +634,7 @@ void BibGeneralPage::AdjustScrollbars() if(bHoriVisible) aControlParentWinSz.Height() -= aSize.Height(); if(bVertVisible) - aControlParentWinSz.Width() -= aSize.Width(); + aControlParentWinSz.Width() -= aSize.Width(); aControlParentWin.SetSizePixel(aControlParentWinSz); } @@ -648,39 +648,39 @@ void BibGeneralPage::Resize() void BibGeneralPage::InitFixedTexts( void ) { - String aFixedStrings[ FIELD_COUNT ] = + String aFixedStrings[ FIELD_COUNT ] = { - String( BibResId( ST_IDENTIFIER ) ), - String( BibResId( ST_AUTHTYPE ) ), - String( BibResId( ST_AUTHOR ) ), - String( BibResId( ST_TITLE ) ), - String( BibResId( ST_MONTH ) ), - String( BibResId( ST_YEAR ) ), - String( BibResId( ST_ISBN ) ), - String( BibResId( ST_BOOKTITLE ) ), - String( BibResId( ST_CHAPTER ) ), - String( BibResId( ST_EDITION ) ), - String( BibResId( ST_EDITOR ) ), - String( BibResId( ST_HOWPUBLISHED ) ), - String( BibResId( ST_INSTITUTION ) ), - String( BibResId( ST_JOURNAL ) ), - String( BibResId( ST_NOTE ) ), - String( BibResId( ST_ANNOTE ) ), - String( BibResId( ST_NUMBER ) ), - String( BibResId( ST_ORGANIZATION ) ), - String( BibResId( ST_PAGE ) ), - String( BibResId( ST_PUBLISHER ) ), - String( BibResId( ST_ADDRESS ) ), - String( BibResId( ST_SCHOOL ) ), - String( BibResId( ST_SERIES ) ), - String( BibResId( ST_REPORT ) ), - String( BibResId( ST_VOLUME ) ), - String( BibResId( ST_URL ) ), - String( BibResId( ST_CUSTOM1 ) ), - String( BibResId( ST_CUSTOM2 ) ), - String( BibResId( ST_CUSTOM3 ) ), - String( BibResId( ST_CUSTOM4 ) ), - String( BibResId( ST_CUSTOM5 ) ) + String( BibResId( ST_IDENTIFIER ) ), + String( BibResId( ST_AUTHTYPE ) ), + String( BibResId( ST_AUTHOR ) ), + String( BibResId( ST_TITLE ) ), + String( BibResId( ST_MONTH ) ), + String( BibResId( ST_YEAR ) ), + String( BibResId( ST_ISBN ) ), + String( BibResId( ST_BOOKTITLE ) ), + String( BibResId( ST_CHAPTER ) ), + String( BibResId( ST_EDITION ) ), + String( BibResId( ST_EDITOR ) ), + String( BibResId( ST_HOWPUBLISHED ) ), + String( BibResId( ST_INSTITUTION ) ), + String( BibResId( ST_JOURNAL ) ), + String( BibResId( ST_NOTE ) ), + String( BibResId( ST_ANNOTE ) ), + String( BibResId( ST_NUMBER ) ), + String( BibResId( ST_ORGANIZATION ) ), + String( BibResId( ST_PAGE ) ), + String( BibResId( ST_PUBLISHER ) ), + String( BibResId( ST_ADDRESS ) ), + String( BibResId( ST_SCHOOL ) ), + String( BibResId( ST_SERIES ) ), + String( BibResId( ST_REPORT ) ), + String( BibResId( ST_VOLUME ) ), + String( BibResId( ST_URL ) ), + String( BibResId( ST_CUSTOM1 ) ), + String( BibResId( ST_CUSTOM2 ) ), + String( BibResId( ST_CUSTOM3 ) ), + String( BibResId( ST_CUSTOM4 ) ), + String( BibResId( ST_CUSTOM5 ) ) }; aFixedTexts[0] = &aIdentifierFT; @@ -715,9 +715,9 @@ void BibGeneralPage::InitFixedTexts( void ) aFixedTexts[29] = &aCustom4FT; aFixedTexts[30] = &aCustom5FT; - int i; + int i; - MnemonicGenerator aMnemonicGenerator; + MnemonicGenerator aMnemonicGenerator; // init mnemonics, first register all strings for( i = 0 ; i < FIELD_COUNT ; ++i ) aMnemonicGenerator.RegisterMnemonic( aFixedStrings[ i ] ); @@ -812,7 +812,7 @@ void BibGeneralPage::disposing(const lang::EventObject& /*Source*/) throw( uno:: void BibGeneralPage::GetFocus() { - Reference< awt::XWindow >* pxControl = aControls; + Reference< awt::XWindow >* pxControl = aControls; for( int i = FIELD_COUNT ; i ; --i, ++pxControl ) { @@ -831,40 +831,40 @@ BOOL BibGeneralPage::HandleShortCutKey( const KeyEvent& rKeyEvent ) { DBG_ASSERT( KEY_MOD2 == rKeyEvent.GetKeyCode().GetModifier(), "+BibGeneralPage::HandleShortCutKey(): this is not for me!" ); - const vcl::I18nHelper& rI18nHelper = Application::GetSettings().GetUILocaleI18nHelper(); - const xub_Unicode c = rKeyEvent.GetCharCode(); - BOOL bHandled = FALSE; + const vcl::I18nHelper& rI18nHelper = Application::GetSettings().GetUILocaleI18nHelper(); + const xub_Unicode c = rKeyEvent.GetCharCode(); + BOOL bHandled = FALSE; - sal_Int16 i; + sal_Int16 i; - typedef std::vector< sal_Int16 > sal_Int16_vector; + typedef std::vector< sal_Int16 > sal_Int16_vector; - sal_Int16_vector::size_type nFocused = 0xFFFF; // index of focused in vector, no one focused initial + sal_Int16_vector::size_type nFocused = 0xFFFF; // index of focused in vector, no one focused initial DBG_ASSERT( nFocused > 0, "*BibGeneralPage::HandleShortCutKey(): size_type works not as expected!" ); - sal_Int16_vector aMatchList; + sal_Int16_vector aMatchList; for( i = 0 ; i < FIELD_COUNT ; ++i ) { if( rI18nHelper.MatchMnemonic( aFixedTexts[ i ]->GetText(), c ) ) { bHandled = TRUE; - sal_Int16 nCtrlIndex = nFT2CtrlMap[ i ]; + sal_Int16 nCtrlIndex = nFT2CtrlMap[ i ]; if( nCtrlIndex >= 0 ) - { // store index of control + { // store index of control DBG_ASSERT( aControls[ nCtrlIndex ].is(), "-BibGeneralPage::HandleShortCutKey(): valid index and no control?" ); uno::Reference< awt::XControl > xControl( aControls[ nCtrlIndex ], UNO_QUERY ); DBG_ASSERT( xControl.is(), "-BibGeneralPage::HandleShortCutKey(): a control wich is not a control!" ); - Window* pWindow = VCLUnoHelper::GetWindow( xControl->getPeer() ); + Window* pWindow = VCLUnoHelper::GetWindow( xControl->getPeer() ); if( pWindow ) { aMatchList.push_back( nCtrlIndex ); if( pWindow->HasChildPathFocus() ) - { // save focused control + { // save focused control DBG_ASSERT( nFocused == 0xFFFF, "+BibGeneralPage::HandleShortCutKey(): more than one with focus?!" ); DBG_ASSERT( aMatchList.size() > 0, "+BibGeneralPage::HandleShortCutKey(): push_back and no content?!" ); nFocused = aMatchList.size() - 1; diff --git a/extensions/source/bibliography/general.hxx b/extensions/source/bibliography/general.hxx index 2db696bbe1f3..5f2211cbdaba 100644 --- a/extensions/source/bibliography/general.hxx +++ b/extensions/source/bibliography/general.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -53,69 +53,69 @@ typedef cppu::WeakAggImplHelper1 < ::com::sun::star::awt::XFocusListener > BibGe class BibGeneralPage: public BibGeneralPageBaseClass, public BibTabPage { - Window aControlParentWin; - FixedText aIdentifierFT; - FixedText aAuthTypeFT; + Window aControlParentWin; + FixedText aIdentifierFT; + FixedText aAuthTypeFT; FixedText aYearFT; - FixedText aAuthorFT; + FixedText aAuthorFT; FixedText aTitleFT; - FixedText aPublisherFT; + FixedText aPublisherFT; FixedText aAddressFT; FixedText aISBNFT; FixedText aChapterFT; FixedText aPagesFT; FixedLine aFirstFL; - + FixedText aEditorFT; FixedText aEditionFT; - + FixedText aBooktitleFT; FixedText aVolumeFT; FixedText aHowpublishedFT; - + FixedText aOrganizationsFT; FixedText aInstitutionFT; FixedText aSchoolFT; - + FixedText aReportTypeFT; FixedText aMonthFT; FixedLine aSecondFL; - + FixedText aJournalFT; FixedText aNumberFT; FixedText aSeriesFT; - + FixedText aAnnoteFT; FixedText aNoteFT; FixedText aURLFT; FixedLine aThirdFL; FixedText aCustom1FT; - FixedText aCustom2FT; - FixedText aCustom3FT; - FixedText aCustom4FT; - FixedText aCustom5FT; + FixedText aCustom2FT; + FixedText aCustom3FT; + FixedText aCustom4FT; + FixedText aCustom5FT; - ScrollBar aHoriScroll; - ScrollBar aVertScroll; + ScrollBar aHoriScroll; + ScrollBar aVertScroll; - FixedText* aFixedTexts[ FIELD_COUNT ]; - sal_Int16 nFT2CtrlMap[ FIELD_COUNT ]; + FixedText* aFixedTexts[ FIELD_COUNT ]; + sal_Int16 nFT2CtrlMap[ FIELD_COUNT ]; ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > aControls[ FIELD_COUNT ]; - Size aStdSize; - Point aBasePos; + Size aStdSize; + Point aBasePos; - String aBibTypeArr[ TYPE_COUNT ]; - String sErrorPrefix; - String sTableErrorString; + String aBibTypeArr[ TYPE_COUNT ]; + String sErrorPrefix; + String sTableErrorString; - String sTypeColumnName; + String sTypeColumnName; ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer > xCtrlContnr; @@ -133,49 +133,49 @@ class BibGeneralPage: public BibGeneralPageBaseClass, public BibTabPage xPosListener; - BibDataManager* pDatMan; + BibDataManager* pDatMan; ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > AddXControl( const String& rName, Point aPos, Size aSize, sal_uInt16 nHelpId, sal_Int16& rIndex ); - void AddControlWithError( const rtl::OUString& rColumnName, const Point& rPos, + void AddControlWithError( const rtl::OUString& rColumnName, const Point& rPos, const Size& rSize, String& rErrorString, String aColumnUIName, sal_uInt16 nHelpId, sal_uInt16 nIndexInFTArray ); - void AdjustScrollbars(); + void AdjustScrollbars(); DECL_LINK( ScrollHdl, ScrollBar* ); protected: - virtual void Resize(); - void InitFixedTexts( void ); // create mnemonics and set text an all fixed texts + virtual void Resize(); + void InitFixedTexts( void ); // create mnemonics and set text an all fixed texts public: BibGeneralPage(Window* pParent, BibDataManager* pDatMan); - virtual ~BibGeneralPage(); + virtual ~BibGeneralPage(); - inline const String& GetErrorString() const; + inline const String& GetErrorString() const; inline const ::com::sun::star::uno::Reference< ::com::sun::star::form::XBoundComponent >& GetTypeListBoxModel() const; inline const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer >& GetControlContainer() const; - inline BibDataManager* GetDataManager(); + inline BibDataManager* GetDataManager(); - void CommitActiveControl(); + void CommitActiveControl(); - virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw( com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw( com::sun::star::uno::RuntimeException ); - void SAL_CALL focusGained( const ::com::sun::star::awt::FocusEvent& e ) throw( com::sun::star::uno::RuntimeException ); - void SAL_CALL focusLost( const ::com::sun::star::awt::FocusEvent& e ) throw( com::sun::star::uno::RuntimeException ); + void SAL_CALL focusGained( const ::com::sun::star::awt::FocusEvent& e ) throw( com::sun::star::uno::RuntimeException ); + void SAL_CALL focusLost( const ::com::sun::star::awt::FocusEvent& e ) throw( com::sun::star::uno::RuntimeException ); - void RemoveListeners(); + void RemoveListeners(); - virtual void GetFocus(); + virtual void GetFocus(); - virtual BOOL HandleShortCutKey( const KeyEvent& rKeyEvent ); // returns true, if key was handled + virtual BOOL HandleShortCutKey( const KeyEvent& rKeyEvent ); // returns true, if key was handled }; diff --git a/extensions/source/bibliography/hidother.src b/extensions/source/bibliography/hidother.src index 7517961645e3..57028fb426e1 100644 --- a/extensions/source/bibliography/hidother.src +++ b/extensions/source/bibliography/hidother.src @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -27,35 +27,35 @@ #include "bibliography.hrc" -hidspecial HID_BIB_IDENTIFIER_POS { HelpID = HID_BIB_IDENTIFIER_POS ; }; -hidspecial HID_BIB_AUTHORITYTYPE_POS { HelpID = HID_BIB_AUTHORITYTYPE_POS ; }; -hidspecial HID_BIB_AUTHOR_POS { HelpID = HID_BIB_AUTHOR_POS ; }; -hidspecial HID_BIB_TITLE_POS { HelpID = HID_BIB_TITLE_POS ; }; -hidspecial HID_BIB_YEAR_POS { HelpID = HID_BIB_YEAR_POS ; }; -hidspecial HID_BIB_ISBN_POS { HelpID = HID_BIB_ISBN_POS ; }; -hidspecial HID_BIB_BOOKTITLE_POS { HelpID = HID_BIB_BOOKTITLE_POS ; }; -hidspecial HID_BIB_CHAPTER_POS { HelpID = HID_BIB_CHAPTER_POS ; }; -hidspecial HID_BIB_EDITION_POS { HelpID = HID_BIB_EDITION_POS ; }; -hidspecial HID_BIB_EDITOR_POS { HelpID = HID_BIB_EDITOR_POS ; }; -hidspecial HID_BIB_HOWPUBLISHED_POS { HelpID = HID_BIB_HOWPUBLISHED_POS ; }; -hidspecial HID_BIB_INSTITUTION_POS { HelpID = HID_BIB_INSTITUTION_POS ; }; -hidspecial HID_BIB_JOURNAL_POS { HelpID = HID_BIB_JOURNAL_POS ; }; -hidspecial HID_BIB_MONTH_POS { HelpID = HID_BIB_MONTH_POS ; }; -hidspecial HID_BIB_NOTE_POS { HelpID = HID_BIB_NOTE_POS ; }; -hidspecial HID_BIB_ANNOTE_POS { HelpID = HID_BIB_ANNOTE_POS ; }; -hidspecial HID_BIB_NUMBER_POS { HelpID = HID_BIB_NUMBER_POS ; }; -hidspecial HID_BIB_ORGANIZATIONS_POS { HelpID = HID_BIB_ORGANIZATIONS_POS ; }; -hidspecial HID_BIB_PAGES_POS { HelpID = HID_BIB_PAGES_POS ; }; -hidspecial HID_BIB_PUBLISHER_POS { HelpID = HID_BIB_PUBLISHER_POS ; }; -hidspecial HID_BIB_ADDRESS_POS { HelpID = HID_BIB_ADDRESS_POS ; }; -hidspecial HID_BIB_SCHOOL_POS { HelpID = HID_BIB_SCHOOL_POS ; }; -hidspecial HID_BIB_SERIES_POS { HelpID = HID_BIB_SERIES_POS ; }; -hidspecial HID_BIB_REPORTTYPE_POS { HelpID = HID_BIB_REPORTTYPE_POS ; }; -hidspecial HID_BIB_VOLUME_POS { HelpID = HID_BIB_VOLUME_POS ; }; -hidspecial HID_BIB_URL_POS { HelpID = HID_BIB_URL_POS ; }; -hidspecial HID_BIB_CUSTOM1_POS { HelpID = HID_BIB_CUSTOM1_POS ; }; -hidspecial HID_BIB_CUSTOM2_POS { HelpID = HID_BIB_CUSTOM2_POS ; }; -hidspecial HID_BIB_CUSTOM3_POS { HelpID = HID_BIB_CUSTOM3_POS ; }; -hidspecial HID_BIB_CUSTOM4_POS { HelpID = HID_BIB_CUSTOM4_POS ; }; -hidspecial HID_BIB_CUSTOM5_POS { HelpID = HID_BIB_CUSTOM5_POS ; }; +hidspecial HID_BIB_IDENTIFIER_POS { HelpID = HID_BIB_IDENTIFIER_POS ; }; +hidspecial HID_BIB_AUTHORITYTYPE_POS { HelpID = HID_BIB_AUTHORITYTYPE_POS ; }; +hidspecial HID_BIB_AUTHOR_POS { HelpID = HID_BIB_AUTHOR_POS ; }; +hidspecial HID_BIB_TITLE_POS { HelpID = HID_BIB_TITLE_POS ; }; +hidspecial HID_BIB_YEAR_POS { HelpID = HID_BIB_YEAR_POS ; }; +hidspecial HID_BIB_ISBN_POS { HelpID = HID_BIB_ISBN_POS ; }; +hidspecial HID_BIB_BOOKTITLE_POS { HelpID = HID_BIB_BOOKTITLE_POS ; }; +hidspecial HID_BIB_CHAPTER_POS { HelpID = HID_BIB_CHAPTER_POS ; }; +hidspecial HID_BIB_EDITION_POS { HelpID = HID_BIB_EDITION_POS ; }; +hidspecial HID_BIB_EDITOR_POS { HelpID = HID_BIB_EDITOR_POS ; }; +hidspecial HID_BIB_HOWPUBLISHED_POS { HelpID = HID_BIB_HOWPUBLISHED_POS ; }; +hidspecial HID_BIB_INSTITUTION_POS { HelpID = HID_BIB_INSTITUTION_POS ; }; +hidspecial HID_BIB_JOURNAL_POS { HelpID = HID_BIB_JOURNAL_POS ; }; +hidspecial HID_BIB_MONTH_POS { HelpID = HID_BIB_MONTH_POS ; }; +hidspecial HID_BIB_NOTE_POS { HelpID = HID_BIB_NOTE_POS ; }; +hidspecial HID_BIB_ANNOTE_POS { HelpID = HID_BIB_ANNOTE_POS ; }; +hidspecial HID_BIB_NUMBER_POS { HelpID = HID_BIB_NUMBER_POS ; }; +hidspecial HID_BIB_ORGANIZATIONS_POS { HelpID = HID_BIB_ORGANIZATIONS_POS ; }; +hidspecial HID_BIB_PAGES_POS { HelpID = HID_BIB_PAGES_POS ; }; +hidspecial HID_BIB_PUBLISHER_POS { HelpID = HID_BIB_PUBLISHER_POS ; }; +hidspecial HID_BIB_ADDRESS_POS { HelpID = HID_BIB_ADDRESS_POS ; }; +hidspecial HID_BIB_SCHOOL_POS { HelpID = HID_BIB_SCHOOL_POS ; }; +hidspecial HID_BIB_SERIES_POS { HelpID = HID_BIB_SERIES_POS ; }; +hidspecial HID_BIB_REPORTTYPE_POS { HelpID = HID_BIB_REPORTTYPE_POS ; }; +hidspecial HID_BIB_VOLUME_POS { HelpID = HID_BIB_VOLUME_POS ; }; +hidspecial HID_BIB_URL_POS { HelpID = HID_BIB_URL_POS ; }; +hidspecial HID_BIB_CUSTOM1_POS { HelpID = HID_BIB_CUSTOM1_POS ; }; +hidspecial HID_BIB_CUSTOM2_POS { HelpID = HID_BIB_CUSTOM2_POS ; }; +hidspecial HID_BIB_CUSTOM3_POS { HelpID = HID_BIB_CUSTOM3_POS ; }; +hidspecial HID_BIB_CUSTOM4_POS { HelpID = HID_BIB_CUSTOM4_POS ; }; +hidspecial HID_BIB_CUSTOM5_POS { HelpID = HID_BIB_CUSTOM5_POS ; }; hidspecial HID_BIB_DB_GRIDCTRL { HelpID = HID_BIB_DB_GRIDCTRL ; }; diff --git a/extensions/source/bibliography/loadlisteneradapter.cxx b/extensions/source/bibliography/loadlisteneradapter.cxx index ff71292c9e7f..928fb020ac4d 100644 --- a/extensions/source/bibliography/loadlisteneradapter.cxx +++ b/extensions/source/bibliography/loadlisteneradapter.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -144,7 +144,7 @@ namespace bib m_pListener->_disposing( _rSource ); // disconnect the listener - if ( m_pListener ) // may have been reset whilest calling into _disposing + if ( m_pListener ) // may have been reset whilest calling into _disposing m_pListener->setAdapter( NULL ); } @@ -235,7 +235,7 @@ namespace bib } //......................................................................... -} // namespace bib +} // namespace bib //......................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/extensions/source/bibliography/loadlisteneradapter.hxx b/extensions/source/bibliography/loadlisteneradapter.hxx index c37384e4d266..c35cb939b5b0 100644 --- a/extensions/source/bibliography/loadlisteneradapter.hxx +++ b/extensions/source/bibliography/loadlisteneradapter.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -49,8 +49,8 @@ namespace bib friend class OComponentAdapterBase; private: - OComponentAdapterBase* m_pAdapter; - ::osl::Mutex& m_rMutex; + OComponentAdapterBase* m_pAdapter; + ::osl::Mutex& m_rMutex; protected: OComponentListener( ::osl::Mutex& _rMutex ) :m_pAdapter( NULL ) @@ -77,10 +77,10 @@ namespace bib private: ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > m_xComponent; - OComponentListener* m_pListener; - sal_Int32 m_nLockCount; - sal_Bool m_bListening : 1; - sal_Bool m_bAutoRelease : 1; + OComponentListener* m_pListener; + sal_Int32 m_nLockCount; + sal_Bool m_bListening : 1; + sal_Bool m_bAutoRelease : 1; // impl method for dispose - virtual, 'cause you at least need to remove the listener from the broadcaster virtual void disposing() = 0; @@ -88,11 +88,11 @@ namespace bib protected: // attribute access for derivees const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& - getComponent() const { return m_xComponent; } - OComponentListener* getListener() { return m_pListener; } + getComponent() const { return m_xComponent; } + OComponentListener* getListener() { return m_pListener; } // to be called by derivees which started listening at the component - virtual void startComponentListening() = 0; + virtual void startComponentListening() = 0; virtual ~OComponentAdapterBase(); @@ -113,7 +113,7 @@ namespace bib // helper /// get the lock count - sal_Int32 locked() const { return m_nLockCount; } + sal_Int32 locked() const { return m_nLockCount; } /// dispose the object - stop listening and such void dispose(); @@ -144,17 +144,17 @@ namespace bib //===================================================================== //= OLoadListenerAdapter //===================================================================== - typedef ::cppu::WeakImplHelper1< ::com::sun::star::form::XLoadListener > OLoadListenerAdapter_Base; + typedef ::cppu::WeakImplHelper1< ::com::sun::star::form::XLoadListener > OLoadListenerAdapter_Base; class OLoadListenerAdapter :public OLoadListenerAdapter_Base ,public OComponentAdapterBase { protected: - OLoadListener* getLoadListener( ) { return static_cast< OLoadListener* >( getListener() ); } + OLoadListener* getLoadListener( ) { return static_cast< OLoadListener* >( getListener() ); } protected: - virtual void disposing(); - virtual void startComponentListening(); + virtual void disposing(); + virtual void startComponentListening(); public: OLoadListenerAdapter( @@ -179,7 +179,7 @@ namespace bib }; //......................................................................... -} // namespace bib +} // namespace bib //......................................................................... #endif // EXTENSIONS_BIB_LOADLISTENERADAPTER_HXX diff --git a/extensions/source/bibliography/menu.src b/extensions/source/bibliography/menu.src index 0ccc8a1c7f41..6b8adc355fb1 100644 --- a/extensions/source/bibliography/menu.src +++ b/extensions/source/bibliography/menu.src @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -39,7 +39,7 @@ /* -The menu bar resource has become obsolete. You find the menu bar definition +The menu bar resource has become obsolete. You find the menu bar definition now at: <project>/uiconfig/sbibliography/menubar/menubar.xml */ diff --git a/extensions/source/bibliography/sections.hrc b/extensions/source/bibliography/sections.hrc index 5d146e04ce53..2488f4ed62df 100644 --- a/extensions/source/bibliography/sections.hrc +++ b/extensions/source/bibliography/sections.hrc @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -28,82 +28,82 @@ #include "bib.hrc" //General -/*#define FT_FIRST_MIDDLE 1 -#define ED_FIRST 2 -#define ED_MIDDLE 3 -#define FT_NAME_SUFFIX 4 -#define ED_NAME 5 -#define CB_SUFFIX 6 -#define ED_INITIALS 8 -#define FT_COMPANY 9 -#define ED_COMPANY 10 -#define FT_DEPARTMENT 11 -#define ED_DEPARTMENT 12 -#define FT_SALUTATION 13 -#define CB_SALUTATION 14 -#define FT_SHOWNNAME 15 -#define ED_SHOWNNAME 16*/ -#define FT_IDENTIFIER 1 -#define FT_AUTHTYPE 2 -#define FT_AUTHOR 3 -#define FT_YEAR 4 -#define FT_ISBN 5 +/*#define FT_FIRST_MIDDLE 1 +#define ED_FIRST 2 +#define ED_MIDDLE 3 +#define FT_NAME_SUFFIX 4 +#define ED_NAME 5 +#define CB_SUFFIX 6 +#define ED_INITIALS 8 +#define FT_COMPANY 9 +#define ED_COMPANY 10 +#define FT_DEPARTMENT 11 +#define ED_DEPARTMENT 12 +#define FT_SALUTATION 13 +#define CB_SALUTATION 14 +#define FT_SHOWNNAME 15 +#define ED_SHOWNNAME 16*/ +#define FT_IDENTIFIER 1 +#define FT_AUTHTYPE 2 +#define FT_AUTHOR 3 +#define FT_YEAR 4 +#define FT_ISBN 5 -#define FT_MONTH 6 +#define FT_MONTH 6 -#define FT_PUBLISHER 8 +#define FT_PUBLISHER 8 -#define FT_ADDRESS 9 -#define FT_ANNOTE 10 -#define FT_BOOKTITLE 11 -#define FT_CHAPTER 12 -#define FT_EDITION 13 -#define FT_EDITOR 14 -#define FT_HOWPUBLISHED 15 -#define FT_INSTITUTION 16 -#define FT_JOURNAL 17 -#define FT_NOTE 18 -#define FT_NUMBER 19 -#define FT_ORGANIZATION 20 -#define FT_PAGE 21 -#define FT_SCHOOL 22 -#define FT_SERIES 23 -#define FT_TITLE 24 -#define FT_REPORT 25 -#define FT_VOLUME 26 -#define FT_URL 27 -#define FT_CUSTOM1 28 -#define FT_CUSTOM2 29 -#define FT_CUSTOM3 30 -#define FT_CUSTOM4 31 -#define FT_CUSTOM5 32 -#define ST_ERROR_PREFIX 33 +#define FT_ADDRESS 9 +#define FT_ANNOTE 10 +#define FT_BOOKTITLE 11 +#define FT_CHAPTER 12 +#define FT_EDITION 13 +#define FT_EDITOR 14 +#define FT_HOWPUBLISHED 15 +#define FT_INSTITUTION 16 +#define FT_JOURNAL 17 +#define FT_NOTE 18 +#define FT_NUMBER 19 +#define FT_ORGANIZATION 20 +#define FT_PAGE 21 +#define FT_SCHOOL 22 +#define FT_SERIES 23 +#define FT_TITLE 24 +#define FT_REPORT 25 +#define FT_VOLUME 26 +#define FT_URL 27 +#define FT_CUSTOM1 28 +#define FT_CUSTOM2 29 +#define FT_CUSTOM3 30 +#define FT_CUSTOM4 31 +#define FT_CUSTOM5 32 +#define ST_ERROR_PREFIX 33 #define FL_1 34 #define FL_2 35 #define FL_3 36 //Business Address -#define FT_OFFICE 1 -#define FT_STREET 2 -#define FT_CITY 3 -#define FT_STATE 4 -#define FT_COUNTRY 5 -#define FT_ZIP 6 -#define ED_OFFICE 7 -#define ED_STREET 8 -#define ED_CITY 9 -#define ED_STATE 10 -#define ED_COUNTRY 11 -#define ED_ZIP 12 -#define ED_POBOX 13 +#define FT_OFFICE 1 +#define FT_STREET 2 +#define FT_CITY 3 +#define FT_STATE 4 +#define FT_COUNTRY 5 +#define FT_ZIP 6 +#define ED_OFFICE 7 +#define ED_STREET 8 +#define ED_CITY 9 +#define ED_STATE 10 +#define ED_COUNTRY 11 +#define ED_ZIP 12 +#define ED_POBOX 13 //Popup SectionControl -#define PU_INSERT 1 -#define PU_REMOVE 2 -#define PU_CHG_NAME 3 +#define PU_INSERT 1 +#define PU_REMOVE 2 +#define PU_CHG_NAME 3 -#define ST_TYPE_ARTICLE 40 +#define ST_TYPE_ARTICLE 40 #define ST_TYPE_BOOK 41 #define ST_TYPE_BOOKLET 42 #define ST_TYPE_CONFERENCE 43 diff --git a/extensions/source/bibliography/sections.src b/extensions/source/bibliography/sections.src index 19501bd0e62a..3f7fe83d5fba 100644 --- a/extensions/source/bibliography/sections.src +++ b/extensions/source/bibliography/sections.src @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -31,11 +31,11 @@ #define FT_POS 12 #define FTSIZE_LEFT 88 -#define ED_POS_LEFT FT_POS+FTSIZE_LEFT+1 +#define ED_POS_LEFT FT_POS+FTSIZE_LEFT+1 #define ED_SIZE 70 -#define ED_POS_LEFT2 ED_POS_LEFT + ED_SIZE +1 -#define FT_POS_MIDDLE ED_POS_LEFT2 + 5 -#define FT_POS_RIGHT FT_POS_MIDDLE + FT_POS_MIDDLE - FT_POS +#define ED_POS_LEFT2 ED_POS_LEFT + ED_SIZE +1 +#define FT_POS_MIDDLE ED_POS_LEFT2 + 5 +#define FT_POS_RIGHT FT_POS_MIDDLE + FT_POS_MIDDLE - FT_POS #define FL_POS 6 #define PAGE_WIDTH FT_POS_RIGHT + FTSIZE_LEFT + (FTSIZE_LEFT * 8 / 10) + FL_POS + 5 diff --git a/extensions/source/bibliography/toolbar.cxx b/extensions/source/bibliography/toolbar.cxx index 1cfb4726068d..dc801d27f808 100644 --- a/extensions/source/bibliography/toolbar.cxx +++ b/extensions/source/bibliography/toolbar.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -91,7 +91,7 @@ void BibToolBarListener::statusChanged(const ::com::sun::star::frame::FeatureSta } }; -rtl::OUString BibToolBarListener::GetCommand() +rtl::OUString BibToolBarListener::GetCommand() { return aCommand; } @@ -166,7 +166,7 @@ void BibTBQueryMenuListener::statusChanged(const frame::FeatureStateEvent& rEvt) sal_uInt16 nID=pToolBar->InsertFilterItem(String(pStringArray[i])); if(pStringArray[i]==rEvt.FeatureDescriptor) { -// XubString aStr = rEvt.FeatureDescriptor; +// XubString aStr = rEvt.FeatureDescriptor; pToolBar->SelectFilterItem(nID); } } @@ -231,7 +231,7 @@ BibToolBar::BibToolBar(Window* pParent, Link aLink, WinBits nStyle): aLBSource.SetDropDownLineCount(9); aLBSource.Show(); aLBSource.SetSelectHdl(LINK( this, BibToolBar, SelHdl)); - + SvtMiscOptions().AddListenerLink( LINK( this, BibToolBar, OptionsChanged_Impl ) ); Application::AddEventListener( LINK( this, BibToolBar, SettingsChanged_Impl ) ); @@ -272,10 +272,10 @@ BibToolBar::~BibToolBar() void BibToolBar::InitListener() { - sal_uInt16 nCount=GetItemCount(); + sal_uInt16 nCount=GetItemCount(); uno::Reference< lang::XMultiServiceFactory > xMgr = comphelper::getProcessServiceFactory(); - uno::Reference< frame::XDispatch > xDisp(xController,UNO_QUERY); + uno::Reference< frame::XDispatch > xDisp(xController,UNO_QUERY); uno::Reference< util::XURLTransformer > xTrans ( xMgr->createInstance( C2U("com.sun.star.util.URLTransformer") ), UNO_QUERY ); if( xTrans.is() ) @@ -330,7 +330,7 @@ void BibToolBar::SetXController(const uno::Reference< frame::XController > & xCt void BibToolBar::Select() { - sal_uInt16 nId=GetCurItemId(); + sal_uInt16 nId=GetCurItemId(); if(nId!=TBC_BT_AUTOFILTER) { @@ -354,7 +354,7 @@ void BibToolBar::SendDispatch(sal_uInt16 nId, const Sequence< PropertyValue >& r { rtl::OUString aCommand = GetItemCommand(nId); - uno::Reference< frame::XDispatchProvider > xDSP( xController, UNO_QUERY ); + uno::Reference< frame::XDispatchProvider > xDSP( xController, UNO_QUERY ); if( xDSP.is() && aCommand.getLength()) { @@ -369,7 +369,7 @@ void BibToolBar::SendDispatch(sal_uInt16 nId, const Sequence< PropertyValue >& r xTrans->parseStrict( aURL ); - uno::Reference< frame::XDispatch > xDisp = xDSP->queryDispatch( aURL, rtl::OUString(), frame::FrameSearchFlag::SELF ); + uno::Reference< frame::XDispatch > xDisp = xDSP->queryDispatch( aURL, rtl::OUString(), frame::FrameSearchFlag::SELF ); if ( xDisp.is() ) xDisp->dispatch( aURL, rArgs); @@ -380,7 +380,7 @@ void BibToolBar::SendDispatch(sal_uInt16 nId, const Sequence< PropertyValue >& r void BibToolBar::Click() { - sal_uInt16 nId=GetCurItemId(); + sal_uInt16 nId=GetCurItemId(); if(nId == TBC_BT_COL_ASSIGN ) { @@ -412,7 +412,7 @@ sal_uInt16 BibToolBar::InsertFilterItem(const XubString& aMenuEntry) return nMenuId; } -void BibToolBar::SelectFilterItem(sal_uInt16 nId) +void BibToolBar::SelectFilterItem(sal_uInt16 nId) { aPopupMenu.CheckItem(nId); nSelMenuItem=nId; @@ -497,7 +497,7 @@ IMPL_LINK( BibToolBar, SendSelHdl, Timer*,/*pT*/) Sequence<PropertyValue> aPropVal(1); PropertyValue* pPropertyVal = (PropertyValue*)aPropVal.getConstArray(); pPropertyVal[0].Name = C2U("DataSourceName"); - String aEntry( MnemonicGenerator::EraseAllMnemonicChars( aLBSource.GetSelectEntry() ) ); + String aEntry( MnemonicGenerator::EraseAllMnemonicChars( aLBSource.GetSelectEntry() ) ); rtl::OUString aSelection = aEntry; pPropertyVal[0].Value <<= aSelection; SendDispatch(TBC_LB_SOURCE,aPropVal); @@ -510,7 +510,7 @@ IMPL_LINK( BibToolBar, MenuHdl, ToolBox*, /*pToolbox*/) sal_uInt16 nId=GetCurItemId(); if(nId==TBC_BT_AUTOFILTER) { - EndSelection(); // vor SetDropMode (SetDropMode ruft SetItemImage) + EndSelection(); // vor SetDropMode (SetDropMode ruft SetItemImage) SetItemDown(TBC_BT_AUTOFILTER,sal_True); nId = aPopupMenu.Execute(this, GetItemRect(TBC_BT_AUTOFILTER)); @@ -542,7 +542,7 @@ IMPL_LINK( BibToolBar, MenuHdl, ToolBox*, /*pToolbox*/) return 0; } //----------------------------------------------------------------------------- -void BibToolBar::statusChanged(const frame::FeatureStateEvent& rEvent) +void BibToolBar::statusChanged(const frame::FeatureStateEvent& rEvent) throw( uno::RuntimeException ) { for(sal_uInt16 i = 0; i < aListenerArr.Count(); i++) @@ -579,7 +579,7 @@ IMPL_LINK( BibToolBar, OptionsChanged_Impl, void*, /*pVoid*/ ) SetOutStyle( nOutStyle ); bRebuildToolBar = sal_True; } - + if ( bRebuildToolBar ) RebuildToolbar(); @@ -597,7 +597,7 @@ IMPL_LINK( BibToolBar, SettingsChanged_Impl, void*, /*pVoid*/ ) nSymbolsSize = eSymbolsSize; RebuildToolbar(); } - + return 0L; } @@ -613,10 +613,10 @@ void BibToolBar::RebuildToolbar() void BibToolBar::ApplyImageList() { - ImageList& rList = ( nSymbolsSize == SFX_SYMBOLS_SIZE_SMALL ) ? + ImageList& rList = ( nSymbolsSize == SFX_SYMBOLS_SIZE_SMALL ) ? ( GetSettings().GetStyleSettings().GetHighContrastMode() ? aImgLstHC : aImgLst ) : ( GetSettings().GetStyleSettings().GetHighContrastMode() ? aBigImgLstHC : aBigImgLst ); - + SetItemImage(TBC_BT_AUTOFILTER , rList.GetImage(SID_FM_AUTOFILTER)); SetItemImage(TBC_BT_FILTERCRIT , rList.GetImage(SID_FM_FILTERCRIT)); SetItemImage(TBC_BT_REMOVEFILTER, rList.GetImage(SID_FM_REMOVE_FILTER_SORT )); diff --git a/extensions/source/bibliography/toolbar.hrc b/extensions/source/bibliography/toolbar.hrc index 05c81921e44d..7349bd2c2aae 100644 --- a/extensions/source/bibliography/toolbar.hrc +++ b/extensions/source/bibliography/toolbar.hrc @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -26,21 +26,21 @@ ************************************************************************/ #include "bib.hrc" -#define TBC_FT_SOURCE 1 -#define TBC_LB_SOURCE 2 -#define TBC_FT_QUERY 3 -#define TBC_ED_QUERY 4 -#define TBC_BT_AUTOFILTER 5 -#define TBC_BT_FILTERCRIT 6 -#define TBC_BT_REMOVEFILTER 7 -#define TBC_BT_NEWCARD 8 -#define TBC_BT_EDITCARD 9 -#define TBC_BT_REMOVECARD 10 -#define TBC_BT_INSERT 11 -#define TBC_BT_UPDATE 12 -#define TBC_BT_MAIL 13 -#define TBC_BT_URL 14 -#define TBC_BT_COL_ASSIGN 15 +#define TBC_FT_SOURCE 1 +#define TBC_LB_SOURCE 2 +#define TBC_FT_QUERY 3 +#define TBC_ED_QUERY 4 +#define TBC_BT_AUTOFILTER 5 +#define TBC_BT_FILTERCRIT 6 +#define TBC_BT_REMOVEFILTER 7 +#define TBC_BT_NEWCARD 8 +#define TBC_BT_EDITCARD 9 +#define TBC_BT_REMOVECARD 10 +#define TBC_BT_INSERT 11 +#define TBC_BT_UPDATE 12 +#define TBC_BT_MAIL 13 +#define TBC_BT_URL 14 +#define TBC_BT_COL_ASSIGN 15 #define TBC_BT_CHANGESOURCE 16 #define IL_TOOLBOX 17 #define ILH_TOOLBOX 18 diff --git a/extensions/source/bibliography/toolbar.hxx b/extensions/source/bibliography/toolbar.hxx index fe1f615d8c2c..07775e31f121 100644 --- a/extensions/source/bibliography/toolbar.hxx +++ b/extensions/source/bibliography/toolbar.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -48,27 +48,27 @@ class BibToolBarListener: public cppu::WeakImplHelper1 < ::com::sun::star::frame { private: - sal_uInt16 nIndex; - rtl::OUString aCommand; + sal_uInt16 nIndex; + rtl::OUString aCommand; protected: - BibToolBar *pToolBar; + BibToolBar *pToolBar; public: BibToolBarListener(BibToolBar *pTB,rtl::OUString aStr,sal_uInt16 nId); ~BibToolBarListener(); - rtl::OUString GetCommand(); + rtl::OUString GetCommand(); // ::com::sun::star::lang::XEventListener // we do not hold References to dispatches, so there is nothing to do on disposal - virtual void SAL_CALL disposing(const ::com::sun::star::lang::EventObject& /*Source*/) + virtual void SAL_CALL disposing(const ::com::sun::star::lang::EventObject& /*Source*/) throw( ::com::sun::star::uno::RuntimeException ){}; // ::com::sun::star::frame::XStatusListener - virtual void SAL_CALL statusChanged(const ::com::sun::star::frame::FeatureStateEvent& Event) + virtual void SAL_CALL statusChanged(const ::com::sun::star::frame::FeatureStateEvent& Event) throw( ::com::sun::star::uno::RuntimeException ); }; @@ -80,7 +80,7 @@ public: BibTBListBoxListener(BibToolBar *pTB,rtl::OUString aStr,sal_uInt16 nId); ~BibTBListBoxListener(); - virtual void SAL_CALL statusChanged(const ::com::sun::star::frame::FeatureStateEvent& Event) + virtual void SAL_CALL statusChanged(const ::com::sun::star::frame::FeatureStateEvent& Event) throw( ::com::sun::star::uno::RuntimeException ); }; @@ -92,19 +92,19 @@ public: BibTBEditListener(BibToolBar *pTB,rtl::OUString aStr,sal_uInt16 nId); ~BibTBEditListener(); - virtual void SAL_CALL statusChanged(const ::com::sun::star::frame::FeatureStateEvent& Event) + virtual void SAL_CALL statusChanged(const ::com::sun::star::frame::FeatureStateEvent& Event) throw( ::com::sun::star::uno::RuntimeException ); }; -class BibTBQueryMenuListener: public BibToolBarListener +class BibTBQueryMenuListener: public BibToolBarListener { public: BibTBQueryMenuListener(BibToolBar *pTB,rtl::OUString aStr,sal_uInt16 nId); ~BibTBQueryMenuListener(); - virtual void SAL_CALL statusChanged(const ::com::sun::star::frame::FeatureStateEvent& Event) + virtual void SAL_CALL statusChanged(const ::com::sun::star::frame::FeatureStateEvent& Event) throw( ::com::sun::star::uno::RuntimeException ); }; @@ -113,31 +113,31 @@ public: typedef ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener>* BibToolBarListenerPtr; SV_DECL_PTRARR_DEL( BibToolBarListenerArr, BibToolBarListenerPtr, 4, 4 ) -class BibToolBar: public ToolBox +class BibToolBar: public ToolBox { private: - BibToolBarListenerArr aListenerArr; - ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController > xController; - Timer aTimer; + BibToolBarListenerArr aListenerArr; + ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController > xController; + Timer aTimer; // Timer aMenuTimer; ImageList aImgLst; ImageList aImgLstHC; ImageList aBigImgLst; ImageList aBigImgLstHC; - FixedText aFtSource; - ListBox aLBSource; - FixedText aFtQuery; - Edit aEdQuery; - PopupMenu aPopupMenu; - sal_uInt16 nMenuId; - sal_uInt16 nSelMenuItem; - rtl::OUString aQueryField; + FixedText aFtSource; + ListBox aLBSource; + FixedText aFtQuery; + Edit aEdQuery; + PopupMenu aPopupMenu; + sal_uInt16 nMenuId; + sal_uInt16 nSelMenuItem; + rtl::OUString aQueryField; Link aLayoutManager; sal_Int16 nSymbolsSize; sal_Int16 nOutStyle; - BibDataManager* pDatMan; + BibDataManager* pDatMan; DECL_LINK( SelHdl, ListBox* ); DECL_LINK( SendSelHdl, Timer* ); DECL_LINK( MenuHdl, ToolBox* ); @@ -146,13 +146,13 @@ class BibToolBar: public ToolBox void ApplyImageList(); void RebuildToolbar(); - + protected: void DataChanged( const DataChangedEvent& rDCEvt ); void InitListener(); - virtual void Select(); - virtual void Click(); + virtual void Select(); + virtual void Click(); long PreNotify( NotifyEvent& rNEvt ); @@ -161,26 +161,26 @@ class BibToolBar: public ToolBox BibToolBar(Window* pParent, Link aLink, WinBits nStyle = WB_3DLOOK ); ~BibToolBar(); - void SetXController(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController > &); + void SetXController(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController > &); - void ClearSourceList(); - void UpdateSourceList(sal_Bool bFlag=sal_True); - void EnableSourceList(sal_Bool bFlag=sal_True); - void InsertSourceEntry(const XubString&,sal_uInt16 nPos=LISTBOX_APPEND ); - void SelectSourceEntry(const XubString& ); + void ClearSourceList(); + void UpdateSourceList(sal_Bool bFlag=sal_True); + void EnableSourceList(sal_Bool bFlag=sal_True); + void InsertSourceEntry(const XubString&,sal_uInt16 nPos=LISTBOX_APPEND ); + void SelectSourceEntry(const XubString& ); - void EnableQuery(sal_Bool bFlag=sal_True); - void SetQueryString(const XubString& ); + void EnableQuery(sal_Bool bFlag=sal_True); + void SetQueryString(const XubString& ); void AdjustToolBox(); - void ClearFilterMenu(); - sal_uInt16 InsertFilterItem(const XubString& ); - void SelectFilterItem(sal_uInt16 nId); + void ClearFilterMenu(); + sal_uInt16 InsertFilterItem(const XubString& ); + void SelectFilterItem(sal_uInt16 nId); - void statusChanged(const ::com::sun::star::frame::FeatureStateEvent& Event) + void statusChanged(const ::com::sun::star::frame::FeatureStateEvent& Event) throw( ::com::sun::star::uno::RuntimeException ); - void SetDatMan(BibDataManager& rDatMan) {pDatMan = &rDatMan;} + void SetDatMan(BibDataManager& rDatMan) {pDatMan = &rDatMan;} void SendDispatch(sal_uInt16 nId, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rArgs); }; diff --git a/extensions/source/bibliography/toolbar.src b/extensions/source/bibliography/toolbar.src index b8a604587bc4..9016a4570b8b 100644 --- a/extensions/source/bibliography/toolbar.src +++ b/extensions/source/bibliography/toolbar.src @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -28,7 +28,7 @@ #include "bibliography.hrc" #include "toolbar.hrc" -#define MASKCOLOR MaskColor = Color { Red = 0xFFFF; Green = 0x0000; Blue = 0xFFFF; }; +#define MASKCOLOR MaskColor = Color { Red = 0xFFFF; Green = 0x0000; Blue = 0xFFFF; }; ToolBox RID_BIB_TOOLBAR { @@ -109,7 +109,7 @@ ToolBox RID_BIB_TOOLBAR { Identifier = TBC_BT_COL_ASSIGN ; HelpId = HID_BIB_MAPPINGDLG; -// Command = ".uno:Bib/Mapping" ; +// Command = ".uno:Bib/Mapping" ; // ItemBitmap = Bitmap { File = "sc10711.bmp" ; }; Text [ en-US ] = "Column Arrangement"; }; diff --git a/extensions/source/bibliography/uiconfig/sbibliography/menubar/menubar.xml b/extensions/source/bibliography/uiconfig/sbibliography/menubar/menubar.xml index a1924145b4cf..817473af0e73 100644 --- a/extensions/source/bibliography/uiconfig/sbibliography/menubar/menubar.xml +++ b/extensions/source/bibliography/uiconfig/sbibliography/menubar/menubar.xml @@ -85,7 +85,6 @@ <menu:menuitem menu:id=".uno:ExtendedHelp"/> <menu:menuseparator/> <menu:menuitem menu:id=".uno:ShowLicense"/> - <menu:menuitem menu:id=".uno:OnlineRegistrationDlg"/> <menu:menuseparator/> <menu:menuitem menu:id=".uno:About"/> </menu:menupopup> diff --git a/extensions/source/config/ldap/componentdef.cxx b/extensions/source/config/ldap/componentdef.cxx index 0943f6e0cb84..87c535d7e0ad 100644 --- a/extensions/source/config/ldap/componentdef.cxx +++ b/extensions/source/config/ldap/componentdef.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -42,7 +42,7 @@ static uno::Reference<uno::XInterface> SAL_CALL createLdapUserProfileBe( } //------------------------------------------------------------------------------ -static const cppu::ImplementationEntry kImplementations_entries[] = +static const cppu::ImplementationEntry kImplementations_entries[] = { { createLdapUserProfileBe, diff --git a/extensions/source/config/ldap/ldapaccess.cxx b/extensions/source/config/ldap/ldapaccess.cxx index 9a4747b74811..827baec0b928 100644 --- a/extensions/source/config/ldap/ldapaccess.cxx +++ b/extensions/source/config/ldap/ldapaccess.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -37,9 +37,9 @@ namespace extensions { namespace config { namespace ldap { -oslModule LdapConnection::s_Ldap_Module = NULL; +oslModule LdapConnection::s_Ldap_Module = NULL; t_ldap_unbind_s LdapConnection::s_p_unbind_s = NULL; -t_ldap_simple_bind_s LdapConnection::s_p_simple_bind_s = NULL; +t_ldap_simple_bind_s LdapConnection::s_p_simple_bind_s = NULL; t_ldap_set_option LdapConnection::s_p_set_option = NULL; t_ldap_err2string LdapConnection::s_p_err2string = NULL; t_ldap_init LdapConnection::s_p_init = NULL; @@ -58,10 +58,10 @@ typedef int LdapErrCode; struct LdapMessageHolder { LdapMessageHolder() : msg(0) {} - ~LdapMessageHolder() - { - if (msg) - (*LdapConnection::s_p_msgfree)(msg); + ~LdapMessageHolder() + { + if (msg) + (*LdapConnection::s_p_msgfree)(msg); } LDAPMessage * msg; @@ -71,16 +71,16 @@ private: void operator=(LdapMessageHolder const&); }; //------------------------------------------------------------------------------ -LdapConnection::~LdapConnection() +LdapConnection::~LdapConnection() { if (isValid()) disconnect(); } //------------------------------------------------------------------------------ -void LdapConnection::disconnect() +void LdapConnection::disconnect() { - if (mConnection != NULL) - { + if (mConnection != NULL) + { (*s_p_unbind_s)(mConnection) ; mConnection = NULL; } @@ -89,16 +89,16 @@ void LdapConnection::disconnect() static void checkLdapReturnCode(const sal_Char *aOperation, LdapErrCode aRetCode, - LDAP * /*aConnection*/) + LDAP * /*aConnection*/) { if (aRetCode == LDAP_SUCCESS) { return ; } static const sal_Char *kNoSpecificMessage = "No additional information" ; rtl::OUStringBuffer message ; - if (aOperation != NULL) + if (aOperation != NULL) { - message.appendAscii(aOperation).appendAscii(": ") ; + message.appendAscii(aOperation).appendAscii(": ") ; } message.appendAscii((*LdapConnection::s_p_err2string)(aRetCode)).appendAscii(" (") ; sal_Char *stub = NULL ; @@ -106,23 +106,23 @@ static void checkLdapReturnCode(const sal_Char *aOperation, #ifndef LDAP_OPT_SIZELIMIT // for use with OpenLDAP (*s_p_get_lderrno)(aConnection, NULL, &stub) ; #endif - if (stub != NULL) + if (stub != NULL) { message.appendAscii(stub) ; // It would seem the message returned is actually // not a copy of a string but rather some static - // string itself. At any rate freeing it seems to + // string itself. At any rate freeing it seems to // cause some undue problems at least on Windows. // This call is thus disabled for the moment. //(*s_p_memfree)(stub) ; } else { message.appendAscii(kNoSpecificMessage) ; } message.appendAscii(")") ; - throw ldap::LdapGenericException(message.makeStringAndClear(), + throw ldap::LdapGenericException(message.makeStringAndClear(), NULL, aRetCode) ; } //------------------------------------------------------------------------------ -void LdapConnection::connectSimple(const LdapDefinition& aDefinition) +void LdapConnection::connectSimple(const LdapDefinition& aDefinition) throw (ldap::LdapConnectionException, ldap::LdapGenericException) { OSL_ENSURE(!isValid(), "Recoonecting an LDAP connection that is already established"); @@ -132,9 +132,9 @@ void LdapConnection::connectSimple(const LdapDefinition& aDefinition) connectSimple(); } //------------------------------------------------------------------------------ -void LdapConnection::connectSimple() +void LdapConnection::connectSimple() throw (ldap::LdapConnectionException, ldap::LdapGenericException) -{ +{ if (!isValid()) { // Connect to the server @@ -148,11 +148,11 @@ void LdapConnection::connectSimple() #ifdef LDAP_X_OPT_CONNECT_TIMEOUT // OpenLDAP doesn't support this and the func /* timeout is specified in milliseconds -> 4 seconds*/ int timeout = 4000; - (*s_p_set_option)( mConnection, - LDAP_X_OPT_CONNECT_TIMEOUT, + (*s_p_set_option)( mConnection, + LDAP_X_OPT_CONNECT_TIMEOUT, &timeout ); #endif - + // Do the bind LdapErrCode retCode = (*s_p_simple_bind_s)(mConnection, mLdapDefinition.mAnonUser , @@ -162,10 +162,10 @@ void LdapConnection::connectSimple() } } //------------------------------------------------------------------------------ -void LdapConnection::initConnection() +void LdapConnection::initConnection() throw (ldap::LdapConnectionException) { - if (mLdapDefinition.mServer.getLength() == 0) + if (mLdapDefinition.mServer.getLength() == 0) { rtl::OUStringBuffer message ; @@ -175,9 +175,9 @@ void LdapConnection::initConnection() if (mLdapDefinition.mPort == 0) mLdapDefinition.mPort = LDAP_PORT; - mConnection = (*s_p_init)(mLdapDefinition.mServer, + mConnection = (*s_p_init)(mLdapDefinition.mServer, mLdapDefinition.mPort) ; - if (mConnection == NULL) + if (mConnection == NULL) { rtl::OUStringBuffer message ; @@ -185,7 +185,7 @@ void LdapConnection::initConnection() message.appendAscii(mLdapDefinition.mServer) ; message.appendAscii(":") ; message.append(mLdapDefinition.mPort) ; - throw ldap::LdapConnectionException(message.makeStringAndClear(), + throw ldap::LdapConnectionException(message.makeStringAndClear(), NULL) ; } } @@ -208,7 +208,7 @@ void LdapConnection::initConnection() 0, 0, // Attributes + values &result.msg) ; - + checkLdapReturnCode("getUserProfile", retCode,mConnection) ; void * ptr; @@ -227,23 +227,23 @@ void LdapConnection::initConnection() } //------------------------------------------------------------------------------ rtl::OString LdapConnection::findUserDn(const rtl::OString& aUser) - throw (lang::IllegalArgumentException, + throw (lang::IllegalArgumentException, ldap::LdapConnectionException, ldap::LdapGenericException) { if (!isValid()) { connectSimple(); } - if (aUser.getLength() == 0) + if (aUser.getLength() == 0) { throw lang::IllegalArgumentException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM ("LdapConnection::findUserDn -User id is empty")), NULL, 0) ; } - - - + + + rtl::OStringBuffer filter( "(&(objectclass=" ); - + filter.append( mLdapDefinition.mUserObjectClass ).append(")(") ; filter.append( mLdapDefinition.mUserUniqueAttr ).append("=").append(aUser).append("))") ; @@ -251,7 +251,7 @@ void LdapConnection::initConnection() sal_Char * attributes [2]; attributes[0]= const_cast<sal_Char *>(LDAP_NO_ATTRS); attributes[1]= NULL; - LdapErrCode retCode = (*s_p_search_s)(mConnection, + LdapErrCode retCode = (*s_p_search_s)(mConnection, mLdapDefinition.mBaseDN, LDAP_SCOPE_SUBTREE, filter.makeStringAndClear(), attributes, 0, &result.msg) ; @@ -260,10 +260,10 @@ void LdapConnection::initConnection() rtl::OString userDn ; LDAPMessage *entry = (*s_p_first_entry)(mConnection, result.msg) ; - if (entry != NULL) + if (entry != NULL) { sal_Char *charsDn = (*s_p_get_dn)(mConnection, entry) ; - + userDn = charsDn ; (*s_p_memfree)(charsDn) ; } diff --git a/extensions/source/config/ldap/ldapaccess.hxx b/extensions/source/config/ldap/ldapaccess.hxx index 691178fd0e50..a9bcbee5826a 100644 --- a/extensions/source/config/ldap/ldapaccess.hxx +++ b/extensions/source/config/ldap/ldapaccess.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -52,18 +52,18 @@ struct LdapUserProfile; class LdapUserProfileMap; typedef LDAP_API(int) (LDAP_CALL *t_ldap_unbind_s)( LDAP *ld ); -typedef LDAP_API(int) (LDAP_CALL *t_ldap_simple_bind_s)( LDAP *ld, const char *who, const char *passwd ); -typedef LDAP_API(int) (LDAP_CALL *t_ldap_set_option)( LDAP *ld, int option, const void *optdata ); +typedef LDAP_API(int) (LDAP_CALL *t_ldap_simple_bind_s)( LDAP *ld, const char *who, const char *passwd ); +typedef LDAP_API(int) (LDAP_CALL *t_ldap_set_option)( LDAP *ld, int option, const void *optdata ); typedef LDAP_API(char *) (LDAP_CALL *t_ldap_err2string)( int err ); typedef LDAP_API(LDAP *) (LDAP_CALL *t_ldap_init)( const char *defhost, int defport ); typedef LDAP_API(int) (LDAP_CALL *t_ldap_msgfree)( LDAPMessage *lm ); typedef LDAP_API(char *) (LDAP_CALL *t_ldap_get_dn)( LDAP *ld, LDAPMessage *entry ); -typedef LDAP_API(LDAPMessage *) (LDAP_CALL *t_ldap_first_entry)( LDAP *ld, LDAPMessage *chain ); +typedef LDAP_API(LDAPMessage *) (LDAP_CALL *t_ldap_first_entry)( LDAP *ld, LDAPMessage *chain ); typedef LDAP_API(char *) (LDAP_CALL *t_ldap_first_attribute)( LDAP *ld, LDAPMessage *entry, void **ptr ); typedef LDAP_API(char *) (LDAP_CALL *t_ldap_next_attribute)( LDAP *ld, LDAPMessage *entry, void *ptr ); -typedef LDAP_API(int) (LDAP_CALL *t_ldap_search_s)( LDAP *ld, const char *base, int scope, const char *filter, char **attrs, int attrsonly, LDAPMessage **res ); +typedef LDAP_API(int) (LDAP_CALL *t_ldap_search_s)( LDAP *ld, const char *base, int scope, const char *filter, char **attrs, int attrsonly, LDAPMessage **res ); typedef LDAP_API(void) (LDAP_CALL *t_ldap_value_free)( char **vals ); -typedef LDAP_API(char **) (LDAP_CALL *t_ldap_get_values)( LDAP *ld, LDAPMessage *entry, const char *target ); +typedef LDAP_API(char **) (LDAP_CALL *t_ldap_get_values)( LDAP *ld, LDAPMessage *entry, const char *target ); typedef LDAP_API(void) (LDAP_CALL *t_ldap_memfree)( void *p ); //------------------------------------------------------------------------------ /** Struct containing the information on LDAP connection */ @@ -88,11 +88,11 @@ struct LdapDefinition typedef std::map< rtl::OUString, rtl::OUString > LdapData; // key/value pairs /** Class encapulating all LDAP functionality */ -class LdapConnection +class LdapConnection { friend struct LdapMessageHolder; public: - + /** Default constructor */ LdapConnection(void) : mConnection(NULL),mLdapDefinition() {} /** Destructor, releases the connection */ @@ -102,7 +102,7 @@ public: throw (ldap::LdapConnectionException, ldap::LdapGenericException); - /** + /** Gets LdapUserProfile from LDAP repository for specified user @param aUser name of logged on user @param aUserProfileMap Map containing LDAP->00o mapping @@ -119,16 +119,16 @@ public: /** finds DN of user @return DN of User */ - rtl::OString findUserDn(const rtl::OString& aUser) + rtl::OString findUserDn(const rtl::OString& aUser) throw (lang::IllegalArgumentException, - ldap::LdapConnectionException, + ldap::LdapConnectionException, ldap::LdapGenericException); void loadModule(); static t_ldap_err2string s_p_err2string; private: - + void initConnection() throw (ldap::LdapConnectionException); void disconnect(); @@ -137,20 +137,20 @@ private: @return sal_True if connection is valid, sal_False otherwise */ bool isValid(void) const { return mConnection != NULL ; } - + void connectSimple() throw (ldap::LdapConnectionException, ldap::LdapGenericException); - + /** LDAP connection object */ LDAP* mConnection ; LdapDefinition mLdapDefinition; - static oslModule s_Ldap_Module; + static oslModule s_Ldap_Module; static t_ldap_value_free s_p_value_free; static t_ldap_get_values s_p_get_values; static t_ldap_unbind_s s_p_unbind_s; - static t_ldap_simple_bind_s s_p_simple_bind_s; + static t_ldap_simple_bind_s s_p_simple_bind_s; static t_ldap_set_option s_p_set_option; static t_ldap_init s_p_init; static t_ldap_msgfree s_p_msgfree; @@ -159,7 +159,7 @@ private: static t_ldap_first_attribute s_p_first_attribute; static t_ldap_next_attribute s_p_next_attribute; static t_ldap_search_s s_p_search_s; - + static t_ldap_memfree s_p_memfree; } ; diff --git a/extensions/source/config/ldap/ldapuserprofilebe.cxx b/extensions/source/config/ldap/ldapuserprofilebe.cxx index c87c5935fee9..6cc22c7190b1 100644 --- a/extensions/source/config/ldap/ldapuserprofilebe.cxx +++ b/extensions/source/config/ldap/ldapuserprofilebe.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -58,7 +58,7 @@ LdapUserProfileBe::LdapUserProfileBe( const uno::Reference<uno::XComponentContex { osl::Mutex & aInitMutex = rtl::Static< osl::Mutex, LdapUserProfileBe >::get(); osl::MutexGuard aInitGuard(aInitMutex); - + static bool bReentrantCall; // = false OSL_ENSURE(!bReentrantCall, "configuration: Ldap Backend constructor called reentrantly - probably a registration error."); @@ -74,10 +74,10 @@ LdapUserProfileBe::LdapUserProfileBe( const uno::Reference<uno::XComponentContex &aDefinition, &loggedOnUser)) { throw css::uno::RuntimeException( - rtl::OUString::createFromAscii("LdapUserProfileBe- LDAP not configured"), - NULL); + rtl::OUString::createFromAscii("LdapUserProfileBe- LDAP not configured"), + NULL); } - + bReentrantCall = false ; } catch (...) @@ -94,7 +94,7 @@ LdapUserProfileBe::LdapUserProfileBe( const uno::Reference<uno::XComponentContex connection.getUserProfile(loggedOnUser, &data_); } //------------------------------------------------------------------------------ -LdapUserProfileBe::~LdapUserProfileBe() +LdapUserProfileBe::~LdapUserProfileBe() { } //------------------------------------------------------------------------------ @@ -120,7 +120,7 @@ bool LdapUserProfileBe::readLdapConfiguration( try { uno::Reference< lang::XMultiServiceFactory > xCfgProvider( - factory->createInstance(kConfigurationProviderService), + factory->createInstance(kConfigurationProviderService), uno::UNO_QUERY); OSL_ENSURE(xCfgProvider.is(),"LdapUserProfileBe: could not create the configuration provider"); if (!xCfgProvider.is()) @@ -132,12 +132,12 @@ bool LdapUserProfileBe::readLdapConfiguration( aArgs[0] <<= aPath; xIface = xCfgProvider->createInstanceWithArguments(kReadOnlyViewService, aArgs); - + uno::Reference<container::XNameAccess > xAccess(xIface, uno::UNO_QUERY_THROW); - xAccess->getByName(kServerDefiniton) >>= xIface; + xAccess->getByName(kServerDefiniton) >>= xIface; uno::Reference<container::XNameAccess > xChildAccess(xIface, uno::UNO_QUERY_THROW); - + if (!getLdapStringParam(xChildAccess, kServer, definition->mServer)) return false; if (!getLdapStringParam(xChildAccess, kBaseDN, definition->mBaseDN)) @@ -162,15 +162,15 @@ bool LdapUserProfileBe::readLdapConfiguration( rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).getStr() ); return false; } - + osl::Security aSecurityContext; if (!aSecurityContext.getUserName(*loggedOnUser)) OSL_TRACE("LdapUserProfileBackend - could not get Logged on user from system"); - + sal_Int32 nIndex = loggedOnUser->indexOf('/'); if (nIndex > 0) *loggedOnUser = loggedOnUser->copy(nIndex+1); - + //Remember to remove OSL_TRACE("Logged on user is %s", rtl::OUStringToOString(*loggedOnUser,RTL_TEXTENCODING_ASCII_US).getStr()); @@ -186,7 +186,7 @@ bool LdapUserProfileBe::getLdapStringParam( rtl::OUString sParam; xAccess->getByName(aLdapSetting) >>= sParam; aServerParameter = rtl::OUStringToOString(sParam, RTL_TEXTENCODING_ASCII_US); - + return aServerParameter.getLength() != 0; } //------------------------------------------------------------------------------ @@ -238,14 +238,14 @@ rtl::OUString SAL_CALL LdapUserProfileBe::getLdapUserProfileBeName(void) { } //------------------------------------------------------------------------------ -rtl::OUString SAL_CALL LdapUserProfileBe::getImplementationName(void) - throw (uno::RuntimeException) +rtl::OUString SAL_CALL LdapUserProfileBe::getImplementationName(void) + throw (uno::RuntimeException) { return getLdapUserProfileBeName() ; } //------------------------------------------------------------------------------ -uno::Sequence<rtl::OUString> SAL_CALL LdapUserProfileBe::getLdapUserProfileBeServiceNames(void) +uno::Sequence<rtl::OUString> SAL_CALL LdapUserProfileBe::getLdapUserProfileBeServiceNames(void) { uno::Sequence<rtl::OUString> aServices(1) ; aServices[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.backend.LdapUserProfileBe")) ; @@ -253,8 +253,8 @@ uno::Sequence<rtl::OUString> SAL_CALL LdapUserProfileBe::getLdapUserProfileBeSer } //------------------------------------------------------------------------------ -sal_Bool SAL_CALL LdapUserProfileBe::supportsService(const rtl::OUString& aServiceName) - throw (uno::RuntimeException) +sal_Bool SAL_CALL LdapUserProfileBe::supportsService(const rtl::OUString& aServiceName) + throw (uno::RuntimeException) { uno::Sequence< rtl::OUString > const svc = getLdapUserProfileBeServiceNames(); @@ -266,9 +266,9 @@ sal_Bool SAL_CALL LdapUserProfileBe::supportsService(const rtl::OUString& aServi //------------------------------------------------------------------------------ -uno::Sequence<rtl::OUString> -SAL_CALL LdapUserProfileBe::getSupportedServiceNames(void) - throw (uno::RuntimeException) +uno::Sequence<rtl::OUString> +SAL_CALL LdapUserProfileBe::getSupportedServiceNames(void) + throw (uno::RuntimeException) { return getLdapUserProfileBeServiceNames() ; } diff --git a/extensions/source/config/ldap/ldapuserprofilebe.hxx b/extensions/source/config/ldap/ldapuserprofilebe.hxx index 2a6cc93385cc..6fced57bca1e 100644 --- a/extensions/source/config/ldap/ldapuserprofilebe.hxx +++ b/extensions/source/config/ldap/ldapuserprofilebe.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -54,28 +54,28 @@ typedef cppu::WeakComponentImplHelper2<css::beans::XPropertySet, struct LdapProfileMutexHolder { osl::Mutex mMutex; }; /** - Implements the PlatformBackend service, a specialization of the - XPropertySet service for retreiving LDAP user profile + Implements the PlatformBackend service, a specialization of the + XPropertySet service for retreiving LDAP user profile configuration settings from a LDAP repsoitory. */ -class LdapUserProfileBe : private LdapProfileMutexHolder, public BackendBase +class LdapUserProfileBe : private LdapProfileMutexHolder, public BackendBase { public : - + LdapUserProfileBe(const uno::Reference<uno::XComponentContext>& xContext); ~LdapUserProfileBe(void) ; // XServiceInfo - virtual rtl::OUString SAL_CALL - getImplementationName( ) + virtual rtl::OUString SAL_CALL + getImplementationName( ) throw (uno::RuntimeException) ; - - virtual sal_Bool SAL_CALL - supportsService( const rtl::OUString& aServiceName ) + + virtual sal_Bool SAL_CALL + supportsService( const rtl::OUString& aServiceName ) throw (uno::RuntimeException) ; - virtual uno::Sequence<rtl::OUString> SAL_CALL - getSupportedServiceNames( ) + virtual uno::Sequence<rtl::OUString> SAL_CALL + getSupportedServiceNames( ) throw (uno::RuntimeException) ; // XPropertySet @@ -138,7 +138,7 @@ class LdapUserProfileBe : private LdapProfileMutexHolder, public BackendBase Provides the supported services names @return service names */ - static uno::Sequence<rtl::OUString> SAL_CALL + static uno::Sequence<rtl::OUString> SAL_CALL getLdapUserProfileBeServiceNames(void) ; private: @@ -146,7 +146,7 @@ class LdapUserProfileBe : private LdapProfileMutexHolder, public BackendBase bool readLdapConfiguration( uno::Reference<lang::XMultiServiceFactory> const & factory, LdapDefinition * definition, rtl::OUString * loggedOnUser); - + bool getLdapStringParam(uno::Reference<container::XNameAccess>& xAccess, const rtl::OUString& aLdapSetting, rtl::OString& aServerParameter); diff --git a/extensions/source/config/ldap/wrapldapinclude.hxx b/extensions/source/config/ldap/wrapldapinclude.hxx index 4a43f1fa06ca..9e401944c1cc 100644 --- a/extensions/source/config/ldap/wrapldapinclude.hxx +++ b/extensions/source/config/ldap/wrapldapinclude.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/dbpilots/commonpagesdbp.cxx b/extensions/source/dbpilots/commonpagesdbp.cxx index 8554dc52500f..4ec5568481db 100644 --- a/extensions/source/dbpilots/commonpagesdbp.cxx +++ b/extensions/source/dbpilots/commonpagesdbp.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -69,13 +69,13 @@ namespace dbp //--------------------------------------------------------------------- OTableSelectionPage::OTableSelectionPage(OControlWizard* _pParent) :OControlWizardPage(_pParent, ModuleRes(RID_PAGE_TABLESELECTION)) - ,m_aData (this, ModuleRes(FL_DATA)) - ,m_aExplanation (this, ModuleRes(FT_EXPLANATION)) - ,m_aDatasourceLabel (this, ModuleRes(FT_DATASOURCE)) - ,m_aDatasource (this, ModuleRes(LB_DATASOURCE)) - ,m_aSearchDatabase (this, ModuleRes(PB_FORMDATASOURCE)) - ,m_aTableLabel (this, ModuleRes(FT_TABLE)) - ,m_aTable (this, ModuleRes(LB_TABLE)) + ,m_aData (this, ModuleRes(FL_DATA)) + ,m_aExplanation (this, ModuleRes(FT_EXPLANATION)) + ,m_aDatasourceLabel (this, ModuleRes(FT_DATASOURCE)) + ,m_aDatasource (this, ModuleRes(LB_DATASOURCE)) + ,m_aSearchDatabase (this, ModuleRes(PB_FORMDATASOURCE)) + ,m_aTableLabel (this, ModuleRes(FT_TABLE)) + ,m_aTable (this, ModuleRes(LB_TABLE)) { FreeResource(); @@ -234,7 +234,7 @@ namespace dbp IMPL_LINK( OTableSelectionPage, OnListboxSelection, ListBox*, _pBox ) { if (&m_aDatasource == _pBox) - { // new data source selected + { // new data source selected implFillTables(); } else @@ -296,7 +296,7 @@ namespace dbp } if (m_xDSContext->getByName(sCurrentDatasource) >>= xDatasource) - { // connect + { // connect // get the default SDB interaction handler Reference< XInteractionHandler > xHandler = getDialog()->getInteractionHandler(this); if (!xHandler.is() ) @@ -353,7 +353,7 @@ namespace dbp if ( aSQLException.hasValue() ) - { // an SQLException (or derivee) was thrown ... + { // an SQLException (or derivee) was thrown ... Reference< XInteractionRequest > xRequest = new OInteractionRequest(aSQLException); try { @@ -466,12 +466,12 @@ namespace dbp //--------------------------------------------------------------------- ODBFieldPage::ODBFieldPage( OControlWizard* _pParent ) :OMaybeListSelectionPage(_pParent, ModuleRes(RID_PAGE_OPTION_DBFIELD)) - ,m_aFrame (this, ModuleRes(FL_DATABASEFIELD_EXPL)) - ,m_aDescription (this, ModuleRes(FT_DATABASEFIELD_EXPL)) - ,m_aQuestion (this, ModuleRes(FT_DATABASEFIELD_QUEST)) - ,m_aStoreYes (this, ModuleRes(RB_STOREINFIELD_YES)) - ,m_aStoreNo (this, ModuleRes(LB_STOREINFIELD)) - ,m_aStoreWhere (this, ModuleRes(RB_STOREINFIELD_NO)) + ,m_aFrame (this, ModuleRes(FL_DATABASEFIELD_EXPL)) + ,m_aDescription (this, ModuleRes(FT_DATABASEFIELD_EXPL)) + ,m_aQuestion (this, ModuleRes(FT_DATABASEFIELD_QUEST)) + ,m_aStoreYes (this, ModuleRes(RB_STOREINFIELD_YES)) + ,m_aStoreNo (this, ModuleRes(LB_STOREINFIELD)) + ,m_aStoreWhere (this, ModuleRes(RB_STOREINFIELD_NO)) { FreeResource(); announceControls(m_aStoreYes, m_aStoreNo, m_aStoreWhere); @@ -501,7 +501,7 @@ namespace dbp } //......................................................................... -} // namespace dbp +} // namespace dbp //......................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/extensions/source/dbpilots/commonpagesdbp.hxx b/extensions/source/dbpilots/commonpagesdbp.hxx index 7dd210de79e4..bdeb59fff3ec 100644 --- a/extensions/source/dbpilots/commonpagesdbp.hxx +++ b/extensions/source/dbpilots/commonpagesdbp.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -45,13 +45,13 @@ namespace dbp class OTableSelectionPage : public OControlWizardPage { protected: - FixedLine m_aData; - FixedText m_aExplanation; - FixedText m_aDatasourceLabel; - ListBox m_aDatasource; - PushButton m_aSearchDatabase; - FixedText m_aTableLabel; - ListBox m_aTable; + FixedLine m_aData; + FixedText m_aExplanation; + FixedText m_aDatasourceLabel; + ListBox m_aDatasource; + PushButton m_aSearchDatabase; + FixedText m_aTableLabel; + ListBox m_aTable; ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > m_xDSContext; @@ -64,8 +64,8 @@ namespace dbp void ActivatePage(); // OWizardPage overridables - virtual void initializePage(); - virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason ); + virtual void initializePage(); + virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason ); protected: DECL_LINK( OnListboxSelection, ListBox* ); @@ -73,7 +73,7 @@ namespace dbp DECL_LINK( OnSearchClicked, PushButton* ); void implCollectDatasource(); - void implFillTables(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& + void implFillTables(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConn = ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >()); // OControlWizardPage overridables @@ -86,9 +86,9 @@ namespace dbp class OMaybeListSelectionPage : public OControlWizardPage { protected: - RadioButton* m_pYes; - RadioButton* m_pNo; - ListBox* m_pList; + RadioButton* m_pYes; + RadioButton* m_pNo; + ListBox* m_pList; public: OMaybeListSelectionPage( OControlWizard* _pParent, const ResId& _rId ); @@ -100,7 +100,7 @@ namespace dbp void ActivatePage(); // own helper - void announceControls( + void announceControls( RadioButton& _rYesButton, RadioButton& _rNoButton, ListBox& _rSelection); @@ -117,12 +117,12 @@ namespace dbp class ODBFieldPage : public OMaybeListSelectionPage { protected: - FixedLine m_aFrame; - FixedText m_aDescription; - FixedText m_aQuestion; - RadioButton m_aStoreYes; - RadioButton m_aStoreNo; - ListBox m_aStoreWhere; + FixedLine m_aFrame; + FixedText m_aDescription; + FixedText m_aQuestion; + RadioButton m_aStoreYes; + RadioButton m_aStoreNo; + ListBox m_aStoreWhere; public: ODBFieldPage( OControlWizard* _pParent ); @@ -139,7 +139,7 @@ namespace dbp }; //......................................................................... -} // namespace dbp +} // namespace dbp //......................................................................... diff --git a/extensions/source/dbpilots/commonpagesdbp.src b/extensions/source/dbpilots/commonpagesdbp.src index 41d199a70209..783bdb48b65f 100644 --- a/extensions/source/dbpilots/commonpagesdbp.src +++ b/extensions/source/dbpilots/commonpagesdbp.src @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -39,7 +39,7 @@ TabPage RID_PAGE_TABLESELECTION { Pos = MAP_APPFONT ( 4 , 3 ) ; Size = MAP_APPFONT ( WINDOW_SIZE_X - 8 , 8 ) ; - Text [ en-US ] = "Data"; + Text [ en-US ] = "Data"; }; FixedText FT_EXPLANATION { @@ -65,14 +65,14 @@ TabPage RID_PAGE_TABLESELECTION DropDown = TRUE ; AutoHScroll = TRUE ; }; - + PushButton PB_FORMDATASOURCE { Pos = MAP_APPFONT ( WINDOW_HALF_SIZE_X + 3 + WINDOW_HALF_SIZE_X - 24 , 25 ) ; Size = MAP_APPFONT ( 14 , 14 ) ; Text [ en-US ] = "~..."; }; - + FixedText FT_TABLE { Pos = MAP_APPFONT ( WINDOW_HALF_SIZE_X + 3, 46 ) ; diff --git a/extensions/source/dbpilots/controlwizard.cxx b/extensions/source/dbpilots/controlwizard.cxx index 202263cff749..45e436d28fd0 100644 --- a/extensions/source/dbpilots/controlwizard.cxx +++ b/extensions/source/dbpilots/controlwizard.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -192,13 +192,13 @@ namespace dbp ModuleRes aModuleRes(RID_PAGE_FORM_DATASOURCE_STATUS); OLocalResourceAccess aLocalControls(aModuleRes, RSC_TABPAGE); - m_pFormSettingsSeparator = new FixedLine(this, ModuleRes(FL_FORMSETINGS)); - m_pFormDatasourceLabel = new FixedText(this, ModuleRes(FT_FORMDATASOURCELABEL)); - m_pFormDatasource = new FixedText(this, ModuleRes(FT_FORMDATASOURCE)); - m_pFormContentTypeLabel = new FixedText(this, ModuleRes(FT_FORMCONTENTTYPELABEL)); - m_pFormContentType = new FixedText(this, ModuleRes(FT_FORMCONTENTTYPE)); - m_pFormTableLabel = new FixedText(this, ModuleRes(FT_FORMTABLELABEL)); - m_pFormTable = new FixedText(this, ModuleRes(FT_FORMTABLE)); + m_pFormSettingsSeparator = new FixedLine(this, ModuleRes(FL_FORMSETINGS)); + m_pFormDatasourceLabel = new FixedText(this, ModuleRes(FT_FORMDATASOURCELABEL)); + m_pFormDatasource = new FixedText(this, ModuleRes(FT_FORMDATASOURCE)); + m_pFormContentTypeLabel = new FixedText(this, ModuleRes(FT_FORMCONTENTTYPELABEL)); + m_pFormContentType = new FixedText(this, ModuleRes(FT_FORMCONTENTTYPE)); + m_pFormTableLabel = new FixedText(this, ModuleRes(FT_FORMTABLELABEL)); + m_pFormTable = new FixedText(this, ModuleRes(FT_FORMTABLE)); const OControlWizardContext& rContext = getContext(); if ( rContext.bEmbedded ) @@ -347,7 +347,7 @@ namespace dbp for (sal_Int32 i=0; i<nObjects; ++i) { if (xPageObjects->getByIndex(i) >>= xControlShape) - { // it _is_ a control shape + { // it _is_ a control shape xControlModel = xControlShape->getControl(); DBG_ASSERT(xControlModel.is(), "OControlWizard::implDetermineShape: control shape without model!"); if (xModelCompare.get() == xControlModel.get()) @@ -398,7 +398,7 @@ namespace dbp Reference< XDrawPageSupplier > xPageSupp(xModel, UNO_QUERY); if (xPageSupp.is()) - { // it's a document with only one page -> Writer + { // it's a document with only one page -> Writer xPage = xPageSupp->getDrawPage(); } else @@ -410,7 +410,7 @@ namespace dbp // maybe it's a spredsheet Reference< XSpreadsheetView > xView(xController, UNO_QUERY); if (xView.is()) - { // okay, it is one + { // okay, it is one Reference< XSpreadsheet > xSheet = xView->getActiveSheet(); xPageSupp = Reference< XDrawPageSupplier >(xSheet, UNO_QUERY); DBG_ASSERT(xPageSupp.is(), "OControlWizard::implDeterminePage: a spreadsheet which is no page supplier!"); @@ -418,7 +418,7 @@ namespace dbp xPage = xPageSupp->getDrawPage(); } else - { // can be a draw/impress doc only + { // can be a draw/impress doc only Reference< XDrawView > xDrawView(xController, UNO_QUERY); DBG_ASSERT(xDrawView.is(), "OControlWizard::implDeterminePage: no alternatives left ... can't determine the page!"); if (xDrawView.is()) @@ -427,7 +427,7 @@ namespace dbp } } else - { + { DBG_ASSERT(xPage.is(), "OControlWizard::implDeterminePage: can't determine the page (no model)!"); } m_aContext.xDrawPage = xPage; @@ -462,7 +462,7 @@ namespace dbp //--------------------------------------------------------------------- Reference< XConnection > OControlWizard::getFormConnection(const OAccessRegulator&) const - { + { return getFormConnection(); } //--------------------------------------------------------------------- @@ -472,7 +472,7 @@ namespace dbp try { if ( !::dbtools::isEmbeddedInDatabase(m_aContext.xForm,xConn) ) - m_aContext.xForm->getPropertyValue(::rtl::OUString::createFromAscii("ActiveConnection")) >>= xConn; + m_aContext.xForm->getPropertyValue(::rtl::OUString::createFromAscii("ActiveConnection")) >>= xConn; } catch(const Exception&) { @@ -632,9 +632,9 @@ namespace dbp if (xColumns.is()) { m_aContext.aFieldNames = xColumns->getElementNames(); - static const ::rtl::OUString s_sFieldTypeProperty = ::rtl::OUString::createFromAscii("Type"); + static const ::rtl::OUString s_sFieldTypeProperty = ::rtl::OUString::createFromAscii("Type"); const ::rtl::OUString* pBegin = m_aContext.aFieldNames.getConstArray(); - const ::rtl::OUString* pEnd = pBegin + m_aContext.aFieldNames.getLength(); + const ::rtl::OUString* pEnd = pBegin + m_aContext.aFieldNames.getLength(); for(;pBegin != pEnd;++pBegin) { sal_Int32 nFieldType = DataType::OTHER; @@ -663,7 +663,7 @@ namespace dbp ::comphelper::disposeComponent(xStatement); if (aSQLException.hasValue()) - { // an SQLException (or derivee) was thrown ... + { // an SQLException (or derivee) was thrown ... // prepend an extra SQLContext explaining what we were doing SQLContext aContext; @@ -745,35 +745,35 @@ namespace dbp // lemme see ... return (0 == getContext().aFieldNames.getLength()); // if we got fields, the data source is valid ... -// try -// { -// // first, we need a valid data source name -// ::rtl::OUString sDataSourceName; -// m_aContext.xForm->getPropertyValue(::rtl::OUString::createFromAscii("DataSourceName")) >>= sDataSourceName; -// if (m_aContext.xDatasourceContext.is() && m_aContext.xDatasourceContext->hasByName(sDataSourceName)) -// { // at least the data source name is valid ... -// // then, a CommandType "table" would be nice ... -// sal_Int32 nCommandType = CommandType::COMMAND; -// m_aContext.xForm->getPropertyValue(::rtl::OUString::createFromAscii("CommandType")) >>= nCommandType; -// if (CommandType::TABLE == nCommandType) -// { // okay .... -// // now the table itself should be valid -// ::rtl::OUString sTableName; -// m_aContext.xForm->getPropertyValue(::rtl::OUString::createFromAscii("Command")) >>= sTableName; -// if (m_aContext.xObjectContainer.is() && m_aContext.xObjectContainer->hasByName(sTableName)) -// return sal_False; -// } -// } -// } -// catch(Exception&) -// { -// DBG_ERROR("OControlWizard::needDatasourceSelection: caught an exception while checking the form settings!"); -// } -// return sal_True; +// try +// { +// // first, we need a valid data source name +// ::rtl::OUString sDataSourceName; +// m_aContext.xForm->getPropertyValue(::rtl::OUString::createFromAscii("DataSourceName")) >>= sDataSourceName; +// if (m_aContext.xDatasourceContext.is() && m_aContext.xDatasourceContext->hasByName(sDataSourceName)) +// { // at least the data source name is valid ... +// // then, a CommandType "table" would be nice ... +// sal_Int32 nCommandType = CommandType::COMMAND; +// m_aContext.xForm->getPropertyValue(::rtl::OUString::createFromAscii("CommandType")) >>= nCommandType; +// if (CommandType::TABLE == nCommandType) +// { // okay .... +// // now the table itself should be valid +// ::rtl::OUString sTableName; +// m_aContext.xForm->getPropertyValue(::rtl::OUString::createFromAscii("Command")) >>= sTableName; +// if (m_aContext.xObjectContainer.is() && m_aContext.xObjectContainer->hasByName(sTableName)) +// return sal_False; +// } +// } +// } +// catch(Exception&) +// { +// DBG_ERROR("OControlWizard::needDatasourceSelection: caught an exception while checking the form settings!"); +// } +// return sal_True; } //......................................................................... -} // namespace dbp +} // namespace dbp //......................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/extensions/source/dbpilots/controlwizard.hxx b/extensions/source/dbpilots/controlwizard.hxx index 292515c46f9b..0c5eb649d9dc 100644 --- a/extensions/source/dbpilots/controlwizard.hxx +++ b/extensions/source/dbpilots/controlwizard.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -55,7 +55,7 @@ namespace dbp //===================================================================== struct OControlWizardSettings { - String sControlLabel; + String sControlLabel; }; //===================================================================== @@ -66,20 +66,20 @@ namespace dbp class OControlWizardPage : public OControlWizardPage_Base { protected: - FixedLine* m_pFormSettingsSeparator; - FixedText* m_pFormDatasourceLabel; - FixedText* m_pFormDatasource; - FixedText* m_pFormContentTypeLabel; - FixedText* m_pFormContentType; - FixedText* m_pFormTableLabel; - FixedText* m_pFormTable; + FixedLine* m_pFormSettingsSeparator; + FixedText* m_pFormDatasourceLabel; + FixedText* m_pFormDatasource; + FixedText* m_pFormContentTypeLabel; + FixedText* m_pFormContentType; + FixedText* m_pFormTableLabel; + FixedText* m_pFormTable; protected: - OControlWizard* getDialog(); - const OControlWizard* getDialog() const; - const OControlWizardContext& getContext(); - sal_Bool updateContext(); - void setFormConnection(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConn, sal_Bool _bAutoDispose = sal_True ); + OControlWizard* getDialog(); + const OControlWizard* getDialog() const; + const OControlWizardContext& getContext(); + sal_Bool updateContext(); + void setFormConnection(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConn, sal_Bool _bAutoDispose = sal_True ); ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > getFormConnection() const; @@ -103,7 +103,7 @@ namespace dbp protected: // OWizardPage overridables - virtual void initializePage(); + virtual void initializePage(); }; struct OAccessRegulator; @@ -114,7 +114,7 @@ namespace dbp class OControlWizard : public OControlWizard_Base { private: - OControlWizardContext m_aContext; + OControlWizardContext m_aContext; protected: ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > @@ -130,15 +130,15 @@ namespace dbp ~OControlWizard(); // make the some base class methods public - sal_Bool travelNext() { return OControlWizard_Base::travelNext(); } + sal_Bool travelNext() { return OControlWizard_Base::travelNext(); } public: ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > getServiceFactory() const { return m_xORB; } - const OControlWizardContext& getContext() const { return m_aContext; } - sal_Bool updateContext(const OAccessRegulator&); - void setFormConnection(const OAccessRegulator&, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConn, sal_Bool _bAutoDispose = sal_True ); + const OControlWizardContext& getContext() const { return m_aContext; } + sal_Bool updateContext(const OAccessRegulator&); + void setFormConnection(const OAccessRegulator&, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConn, sal_Bool _bAutoDispose = sal_True ); ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > getFormConnection(const OAccessRegulator&) const; @@ -162,7 +162,7 @@ namespace dbp virtual sal_Bool approveControl(sal_Int16 _nClassId) = 0; // ModalDialog overridables - virtual short Execute(); + virtual short Execute(); private: sal_Bool initContext(); @@ -177,7 +177,7 @@ namespace dbp }; //......................................................................... -} // namespace dbp +} // namespace dbp //......................................................................... #endif // _EXTENSIONS_DBP_CONTROLWIZARD_HXX diff --git a/extensions/source/dbpilots/dbpilots.src b/extensions/source/dbpilots/dbpilots.src index fa96cbead1eb..fcdda32e0747 100644 --- a/extensions/source/dbpilots/dbpilots.src +++ b/extensions/source/dbpilots/dbpilots.src @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -33,29 +33,29 @@ ModalDialog RID_DLG_GROUPBOXWIZARD { Text [ en-US ] = "Group Element Wizard"; - OutputSize = TRUE ; - SVLook = TRUE ; - Moveable = TRUE ; - Closeable = TRUE ; - Hide = TRUE; + OutputSize = TRUE ; + SVLook = TRUE ; + Moveable = TRUE ; + Closeable = TRUE ; + Hide = TRUE; }; ModalDialog RID_DLG_LISTCOMBOWIZARD { - OutputSize = TRUE ; - SVLook = TRUE ; - Moveable = TRUE ; - Closeable = TRUE ; - Hide = TRUE; + OutputSize = TRUE ; + SVLook = TRUE ; + Moveable = TRUE ; + Closeable = TRUE ; + Hide = TRUE; }; ModalDialog RID_DLG_GRIDWIZARD { - OutputSize = TRUE ; - SVLook = TRUE ; - Moveable = TRUE ; - Closeable = TRUE ; - Hide = TRUE; + OutputSize = TRUE ; + SVLook = TRUE ; + Moveable = TRUE ; + Closeable = TRUE ; + Hide = TRUE; Text [ en-US ] = "Table Element Wizard"; }; diff --git a/extensions/source/dbpilots/dbpresid.hrc b/extensions/source/dbpilots/dbpresid.hrc index ecb424c5e3b7..81f61d49c96b 100644 --- a/extensions/source/dbpilots/dbpresid.hrc +++ b/extensions/source/dbpilots/dbpresid.hrc @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -33,63 +33,63 @@ //======================================================================== // basics -#define RID_DIALOG_START RID_DBP_START -#define RID_PAGE_START RID_DBP_START -#define RID_STRING_START RID_DBP_START -#define RID_ERRORBOX_START RID_DBP_START +#define RID_DIALOG_START RID_DBP_START +#define RID_PAGE_START RID_DBP_START +#define RID_STRING_START RID_DBP_START +#define RID_ERRORBOX_START RID_DBP_START //======================================================================== // strings -#define RID_STR_GROUPWIZ_DBFIELD (RID_STRING_START + 1 ) -#define RID_STR_COMBOWIZ_DBFIELD (RID_STRING_START + 2 ) -#define RID_STR_LISTWIZARD_TITLE (RID_STRING_START + 3 ) -#define RID_STR_COMBOWIZARD_TITLE (RID_STRING_START + 4 ) -#define RID_STR_COULDNOTOPENTABLE (RID_STRING_START + 5 ) -#define RID_STR_DATEPOSTFIX (RID_STRING_START + 6 ) -#define RID_STR_TIMEPOSTFIX (RID_STRING_START + 7 ) -#define RID_STR_TYPE_QUERY (RID_STRING_START + 8 ) -#define RID_STR_TYPE_TABLE (RID_STRING_START + 9 ) -#define RID_STR_TYPE_COMMAND (RID_STRING_START + 10 ) +#define RID_STR_GROUPWIZ_DBFIELD (RID_STRING_START + 1 ) +#define RID_STR_COMBOWIZ_DBFIELD (RID_STRING_START + 2 ) +#define RID_STR_LISTWIZARD_TITLE (RID_STRING_START + 3 ) +#define RID_STR_COMBOWIZARD_TITLE (RID_STRING_START + 4 ) +#define RID_STR_COULDNOTOPENTABLE (RID_STRING_START + 5 ) +#define RID_STR_DATEPOSTFIX (RID_STRING_START + 6 ) +#define RID_STR_TIMEPOSTFIX (RID_STRING_START + 7 ) +#define RID_STR_TYPE_QUERY (RID_STRING_START + 8 ) +#define RID_STR_TYPE_TABLE (RID_STRING_START + 9 ) +#define RID_STR_TYPE_COMMAND (RID_STRING_START + 10 ) // please adjust RID_STRING_END (below) when adding new strings -#define RID_STRING_END RID_STR_TIMEPOSTFIX +#define RID_STRING_END RID_STR_TIMEPOSTFIX //======================================================================== // dialogs -#define RID_DLG_GROUPBOXWIZARD ( RID_DIALOG_START + 1 ) -#define RID_DLG_LISTCOMBOWIZARD ( RID_DIALOG_START + 2 ) -#define RID_DLG_GRIDWIZARD ( RID_DIALOG_START + 3 ) +#define RID_DLG_GROUPBOXWIZARD ( RID_DIALOG_START + 1 ) +#define RID_DLG_LISTCOMBOWIZARD ( RID_DIALOG_START + 2 ) +#define RID_DLG_GRIDWIZARD ( RID_DIALOG_START + 3 ) // please adjust RID_DIALOG_END (below) when adding new dialogs -#define RID_DIALOG_END RID_DLG_GRIDWIZARD +#define RID_DIALOG_END RID_DLG_GRIDWIZARD //======================================================================== // tab pages -#define RID_PAGE_TABLESELECTION ( RID_PAGE_START + 1 ) -#define RID_PAGE_GROUPRADIOSELECTION ( RID_PAGE_START + 2 ) -#define RID_PAGE_DEFAULTFIELDSELECTION ( RID_PAGE_START + 3 ) -#define RID_PAGE_OPTIONVALUES ( RID_PAGE_START + 4 ) -#define RID_PAGE_OPTION_DBFIELD ( RID_PAGE_START + 5 ) -#define RID_PAGE_OPTIONS_FINAL ( RID_PAGE_START + 6 ) -#define RID_PAGE_LCW_CONTENTSELECTION_TABLE ( RID_PAGE_START + 7 ) -#define RID_PAGE_LCW_CONTENTSELECTION_FIELD ( RID_PAGE_START + 8 ) -#define RID_PAGE_LCW_FIELDLINK ( RID_PAGE_START + 9 ) -#define RID_PAGE_GW_FIELDSELECTION ( RID_PAGE_START + 10 ) -#define RID_PAGE_FORM_DATASOURCE_STATUS ( RID_PAGE_START + 11 ) +#define RID_PAGE_TABLESELECTION ( RID_PAGE_START + 1 ) +#define RID_PAGE_GROUPRADIOSELECTION ( RID_PAGE_START + 2 ) +#define RID_PAGE_DEFAULTFIELDSELECTION ( RID_PAGE_START + 3 ) +#define RID_PAGE_OPTIONVALUES ( RID_PAGE_START + 4 ) +#define RID_PAGE_OPTION_DBFIELD ( RID_PAGE_START + 5 ) +#define RID_PAGE_OPTIONS_FINAL ( RID_PAGE_START + 6 ) +#define RID_PAGE_LCW_CONTENTSELECTION_TABLE ( RID_PAGE_START + 7 ) +#define RID_PAGE_LCW_CONTENTSELECTION_FIELD ( RID_PAGE_START + 8 ) +#define RID_PAGE_LCW_FIELDLINK ( RID_PAGE_START + 9 ) +#define RID_PAGE_GW_FIELDSELECTION ( RID_PAGE_START + 10 ) +#define RID_PAGE_FORM_DATASOURCE_STATUS ( RID_PAGE_START + 11 ) // please adjust RID_PAGE_END (below) when adding new tab pages -#define RID_PAGE_END RID_PAGE_GW_FIELDSELECTION +#define RID_PAGE_END RID_PAGE_GW_FIELDSELECTION //======================================================================== // ErrorBox -#define RID_ERR_INVALID_FORM_CONNECTION ( RID_ERRORBOX_START + 1 ) +#define RID_ERR_INVALID_FORM_CONNECTION ( RID_ERRORBOX_START + 1 ) // please adjust RID_ERRORBOX_END (below) when adding new error boxes -#define RID_ERRORBOX_END RID_ERR_INVALID_FORM_CONNECTION +#define RID_ERRORBOX_END RID_ERR_INVALID_FORM_CONNECTION //======================================================================== @@ -115,96 +115,96 @@ //........................................................................ // FixedLine -#define FL_DATA 1 -#define FL_DEFAULTSELECTION 2 -#define FL_OPTIONVALUES 3 -#define FL_DATABASEFIELD_EXPL 4 -#define FL_NAMEIT 5 -#define FL_FRAME 6 -#define FL_FORMSETINGS 7 +#define FL_DATA 1 +#define FL_DEFAULTSELECTION 2 +#define FL_OPTIONVALUES 3 +#define FL_DATABASEFIELD_EXPL 4 +#define FL_NAMEIT 5 +#define FL_FRAME 6 +#define FL_FORMSETINGS 7 //........................................................................ // FixedText -#define FT_DATASOURCE 1 -#define FT_TABLE 2 -#define FT_RADIOLABELS 3 -#define FT_RADIOBUTTONS 4 -#define FT_DEFAULTSELECTION 5 -#define FT_OPTIONVALUES_EXPL 6 -#define FT_OPTIONVALUES 7 -#define FT_DATABASEFIELD_EXPL 8 -#define FT_DATABASEFIELD_QUEST 9 -#define FT_NAMEIT 10 -#define FT_THATSALL 11 -#define FT_SELECTTABLE_LABEL 12 -#define FT_TABLEFIELDS 13 -#define FT_DISPLAYEDFIELD 14 -#define FT_CONTENTFIELD_INFO 15 -#define FT_VALUELISTFIELD 16 -#define FT_TABLEFIELD 17 -#define FT_EXPLANATION 18 -#define FT_EXISTING_FIELDS 19 -#define FT_SELECTED_FIELDS 20 -#define FT_FIELDLINK_DESC 21 -#define FT_FORMDATASOURCELABEL 22 -#define FT_FORMDATASOURCE 23 -#define FT_FORMTABLELABEL 24 -#define FT_FORMTABLE 25 -#define FT_FORMCONTENTTYPELABEL 26 -#define FT_FORMCONTENTTYPE 27 +#define FT_DATASOURCE 1 +#define FT_TABLE 2 +#define FT_RADIOLABELS 3 +#define FT_RADIOBUTTONS 4 +#define FT_DEFAULTSELECTION 5 +#define FT_OPTIONVALUES_EXPL 6 +#define FT_OPTIONVALUES 7 +#define FT_DATABASEFIELD_EXPL 8 +#define FT_DATABASEFIELD_QUEST 9 +#define FT_NAMEIT 10 +#define FT_THATSALL 11 +#define FT_SELECTTABLE_LABEL 12 +#define FT_TABLEFIELDS 13 +#define FT_DISPLAYEDFIELD 14 +#define FT_CONTENTFIELD_INFO 15 +#define FT_VALUELISTFIELD 16 +#define FT_TABLEFIELD 17 +#define FT_EXPLANATION 18 +#define FT_EXISTING_FIELDS 19 +#define FT_SELECTED_FIELDS 20 +#define FT_FIELDLINK_DESC 21 +#define FT_FORMDATASOURCELABEL 22 +#define FT_FORMDATASOURCE 23 +#define FT_FORMTABLELABEL 24 +#define FT_FORMTABLE 25 +#define FT_FORMCONTENTTYPELABEL 26 +#define FT_FORMCONTENTTYPE 27 //........................................................................ // ListBox -#define LB_DATASOURCE 1 -#define LB_TABLE 2 -#define LB_RADIOBUTTONS 3 -#define LB_DEFSELECTIONFIELD 3 -#define LB_STOREINFIELD 4 -#define LB_SELECTTABLE 5 -#define LB_SELECTFIELD 6 -#define LB_EXISTING_FIELDS 7 -#define LB_SELECTED_FIELDS 8 +#define LB_DATASOURCE 1 +#define LB_TABLE 2 +#define LB_RADIOBUTTONS 3 +#define LB_DEFSELECTIONFIELD 3 +#define LB_STOREINFIELD 4 +#define LB_SELECTTABLE 5 +#define LB_SELECTFIELD 6 +#define LB_EXISTING_FIELDS 7 +#define LB_SELECTED_FIELDS 8 //........................................................................ // Edit -#define ET_RADIOLABELS 1 -#define ET_OPTIONVALUE 2 -#define ET_NAMEIT 3 -#define ET_DISPLAYEDFIELD 4 +#define ET_RADIOLABELS 1 +#define ET_OPTIONVALUE 2 +#define ET_NAMEIT 3 +#define ET_DISPLAYEDFIELD 4 //........................................................................ // PushButton -#define PB_MOVETORIGHT 1 -#define PB_MOVETOLEFT 2 -#define PB_FIELDRIGHT 3 -#define PB_ALLFIELDSRIGHT 4 -#define PB_FIELDLEFT 5 -#define PB_ALLFIELDSLEFT 6 -#define PB_FORMDATASOURCE 7 +#define PB_MOVETORIGHT 1 +#define PB_MOVETOLEFT 2 +#define PB_FIELDRIGHT 3 +#define PB_ALLFIELDSRIGHT 4 +#define PB_FIELDLEFT 5 +#define PB_ALLFIELDSLEFT 6 +#define PB_FORMDATASOURCE 7 //........................................................................ // RadioButton -#define RB_DEFSELECTION_YES 1 -#define RB_DEFSELECTION_NO 2 -#define RB_STOREINFIELD_YES 3 -#define RB_STOREINFIELD_NO 4 +#define RB_DEFSELECTION_YES 1 +#define RB_DEFSELECTION_NO 2 +#define RB_STOREINFIELD_YES 3 +#define RB_STOREINFIELD_NO 4 //........................................................................ // ComboBox -#define CMB_VALUELISTFIELD 1 -#define CMB_TABLEFIELD 2 +#define CMB_VALUELISTFIELD 1 +#define CMB_TABLEFIELD 2 //........................................................................ // String -#define STR_FIELDINFO_LISTBOX 1 -#define STR_FIELDINFO_COMBOBOX 2 +#define STR_FIELDINFO_LISTBOX 1 +#define STR_FIELDINFO_COMBOBOX 2 //........................................................................ // Image @@ -217,15 +217,15 @@ //======================================================================== // defines -#define WINDOW_SIZE_X 260 -#define WINDOW_SIZE_Y 185 -#define WINDOW_HALF_SIZE_X ( WINDOW_SIZE_X / 2 ) +#define WINDOW_SIZE_X 260 +#define WINDOW_SIZE_Y 185 +#define WINDOW_HALF_SIZE_X ( WINDOW_SIZE_X / 2 ) -#define BUTTON_SIZE_X 50 -#define BUTTON_SIZE_Y 14 +#define BUTTON_SIZE_X 50 +#define BUTTON_SIZE_Y 14 -#define ITEM_BUTTON_SIZE_X 20 -#define ITEM_BUTTON_SIZE_Y 12 +#define ITEM_BUTTON_SIZE_X 20 +#define ITEM_BUTTON_SIZE_Y 12 diff --git a/extensions/source/dbpilots/dbpservices.cxx b/extensions/source/dbpilots/dbpservices.cxx index 3b251c144eb7..e1e41725af25 100644 --- a/extensions/source/dbpilots/dbpservices.cxx +++ b/extensions/source/dbpilots/dbpservices.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -62,8 +62,8 @@ extern "C" void SAL_CALL dbp_initializeModule() extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( - const sal_Char **ppEnvTypeName, - uno_Environment ** /*ppEnv*/ + const sal_Char **ppEnvTypeName, + uno_Environment ** /*ppEnv*/ ) { dbp_initializeModule(); @@ -76,8 +76,8 @@ extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( void* pRegistryKey ) { - if (pRegistryKey) - try + if (pRegistryKey) + try { return ::dbp::OModule::writeComponentInfos( static_cast<XMultiServiceFactory*>(pServiceManager), diff --git a/extensions/source/dbpilots/dbptools.cxx b/extensions/source/dbpilots/dbptools.cxx index 6bf34b177643..05d85f5c8790 100644 --- a/extensions/source/dbpilots/dbptools.cxx +++ b/extensions/source/dbpilots/dbptools.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -66,7 +66,7 @@ namespace dbp } //......................................................................... -} // namespace dbp +} // namespace dbp //......................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/extensions/source/dbpilots/dbptools.hxx b/extensions/source/dbpilots/dbptools.hxx index 971b37fe10c9..7c37e7edd305 100644 --- a/extensions/source/dbpilots/dbptools.hxx +++ b/extensions/source/dbpilots/dbptools.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -41,7 +41,7 @@ namespace dbp ::rtl::OUString& _rElementsName); //......................................................................... -} // namespace dbp +} // namespace dbp //......................................................................... diff --git a/extensions/source/dbpilots/dbptypes.hxx b/extensions/source/dbpilots/dbptypes.hxx index ef5676f9fea9..be188f63fdf0 100644 --- a/extensions/source/dbpilots/dbptypes.hxx +++ b/extensions/source/dbpilots/dbptypes.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -42,7 +42,7 @@ namespace dbp DECLARE_STL_STDKEY_MAP( sal_uInt32, String, MapInt2String ); //......................................................................... -} // namespace dbp +} // namespace dbp //......................................................................... #endif // _EXTENSIONS_DBP_DBPTYPES_HXX_ diff --git a/extensions/source/dbpilots/gridpages.src b/extensions/source/dbpilots/gridpages.src index 5aca75b77d55..5b5d557ca18a 100644 --- a/extensions/source/dbpilots/gridpages.src +++ b/extensions/source/dbpilots/gridpages.src @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/dbpilots/gridwizard.cxx b/extensions/source/dbpilots/gridwizard.cxx index f3bd194a27c3..6c39ac373524 100644 --- a/extensions/source/dbpilots/gridwizard.cxx +++ b/extensions/source/dbpilots/gridwizard.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -40,8 +40,8 @@ #include "dbptools.hxx" #include "dbpilots.hrc" -#define GW_STATE_DATASOURCE_SELECTION 0 -#define GW_STATE_FIELDSELECTION 1 +#define GW_STATE_DATASOURCE_SELECTION 0 +#define GW_STATE_FIELDSELECTION 1 //......................................................................... namespace dbp @@ -75,7 +75,7 @@ namespace dbp // if we do not need the data source selection page ... if (!needDatasourceSelection()) - { // ... skip it! + { // ... skip it! skip(1); m_bHadDataSelection = sal_False; } @@ -111,17 +111,17 @@ namespace dbp if (!xColumnFactory.is() || !xColumnContainer.is()) return; - static const ::rtl::OUString s_sDataFieldProperty = ::rtl::OUString::createFromAscii("DataField"); - static const ::rtl::OUString s_sLabelProperty = ::rtl::OUString::createFromAscii("Label"); - static const ::rtl::OUString s_sWidthProperty = ::rtl::OUString::createFromAscii("Width"); + static const ::rtl::OUString s_sDataFieldProperty = ::rtl::OUString::createFromAscii("DataField"); + static const ::rtl::OUString s_sLabelProperty = ::rtl::OUString::createFromAscii("Label"); + static const ::rtl::OUString s_sWidthProperty = ::rtl::OUString::createFromAscii("Width"); static const ::rtl::OUString s_sMouseWheelBehavior = ::rtl::OUString::createFromAscii("MouseWheelBehavior"); static const ::rtl::OUString s_sEmptyString; // collect "descriptors" for the to-be-created (grid)columns DECLARE_STL_VECTOR( ::rtl::OUString, StringArray ); - StringArray aColumnServiceNames; // service names to be used with the XGridColumnFactory - StringArray aColumnLabelPostfixes; // postfixes to append to the column labels - StringArray aFormFieldNames; // data field names + StringArray aColumnServiceNames; // service names to be used with the XGridColumnFactory + StringArray aColumnLabelPostfixes; // postfixes to append to the column labels + StringArray aFormFieldNames; // data field names aColumnServiceNames.reserve(getSettings().aSelectedFields.getLength()); aColumnLabelPostfixes.reserve(getSettings().aSelectedFields.getLength()); @@ -188,8 +188,8 @@ namespace dbp } } - DBG_ASSERT( aFormFieldNames.size() == aColumnServiceNames.size() - && aColumnServiceNames.size() == aColumnLabelPostfixes.size(), + DBG_ASSERT( aFormFieldNames.size() == aColumnServiceNames.size() + && aColumnServiceNames.size() == aColumnLabelPostfixes.size(), "OGridWizard::implApplySettings: inconsistent descriptor sequences!"); // now loop through the descriptions and create the (grid)columns out of th descriptors @@ -227,9 +227,9 @@ namespace dbp } catch(Exception&) { - DBG_ERROR( ::rtl::OString("OGridWizard::implApplySettings: unexpected exception while creating the grid column for field ") - += ::rtl::OString(pFormFieldName->getStr(), pFormFieldName->getLength(), gsl_getSystemTextEncoding()) - += ::rtl::OString("!")); + DBG_ERROR( ::rtl::OString("OGridWizard::implApplySettings: unexpected exception while creating the grid column for field ") + += ::rtl::OString(pFormFieldName->getStr(), pFormFieldName->getLength(), gsl_getSystemTextEncoding()) + += ::rtl::OString("!")); } } } @@ -306,15 +306,15 @@ namespace dbp //--------------------------------------------------------------------- OGridFieldsSelection::OGridFieldsSelection( OGridWizard* _pParent ) :OGridPage(_pParent, ModuleRes(RID_PAGE_GW_FIELDSELECTION)) - ,m_aFrame (this, ModuleRes(FL_FRAME)) - ,m_aExistFieldsLabel (this, ModuleRes(FT_EXISTING_FIELDS)) - ,m_aExistFields (this, ModuleRes(LB_EXISTING_FIELDS)) - ,m_aSelectOne (this, ModuleRes(PB_FIELDRIGHT)) - ,m_aSelectAll (this, ModuleRes(PB_ALLFIELDSRIGHT)) - ,m_aDeselectOne (this, ModuleRes(PB_FIELDLEFT)) - ,m_aDeselectAll (this, ModuleRes(PB_ALLFIELDSLEFT)) - ,m_aSelFieldsLabel (this, ModuleRes(FT_SELECTED_FIELDS)) - ,m_aSelFields (this, ModuleRes(LB_SELECTED_FIELDS)) + ,m_aFrame (this, ModuleRes(FL_FRAME)) + ,m_aExistFieldsLabel (this, ModuleRes(FT_EXISTING_FIELDS)) + ,m_aExistFields (this, ModuleRes(LB_EXISTING_FIELDS)) + ,m_aSelectOne (this, ModuleRes(PB_FIELDRIGHT)) + ,m_aSelectAll (this, ModuleRes(PB_ALLFIELDSRIGHT)) + ,m_aDeselectOne (this, ModuleRes(PB_FIELDLEFT)) + ,m_aDeselectAll (this, ModuleRes(PB_ALLFIELDSLEFT)) + ,m_aSelFieldsLabel (this, ModuleRes(FT_SELECTED_FIELDS)) + ,m_aSelFields (this, ModuleRes(LB_SELECTED_FIELDS)) { FreeResource(); @@ -426,7 +426,7 @@ namespace dbp USHORT nInsertPos = LISTBOX_APPEND; if (!bMoveRight) - { // need to determine an insert pos which reflects the original + { // need to determine an insert pos which reflects the original nInsertPos = 0; while (nInsertPos < rMoveTo.GetEntryCount()) { @@ -481,7 +481,7 @@ namespace dbp } //......................................................................... -} // namespace dbp +} // namespace dbp //......................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/extensions/source/dbpilots/gridwizard.hxx b/extensions/source/dbpilots/gridwizard.hxx index 8af95be86aa0..085762ce4f7c 100644 --- a/extensions/source/dbpilots/gridwizard.hxx +++ b/extensions/source/dbpilots/gridwizard.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -42,7 +42,7 @@ namespace dbp //===================================================================== struct OGridSettings : public OControlWizardSettings { - ::com::sun::star::uno::Sequence< ::rtl::OUString > aSelectedFields; + ::com::sun::star::uno::Sequence< ::rtl::OUString > aSelectedFields; }; //===================================================================== @@ -51,8 +51,8 @@ namespace dbp class OGridWizard : public OControlWizard { protected: - OGridSettings m_aSettings; - sal_Bool m_bHadDataSelection : 1; + OGridSettings m_aSettings; + sal_Bool m_bHadDataSelection : 1; public: OGridWizard( @@ -65,10 +65,10 @@ namespace dbp protected: // OWizardMachine overridables - virtual ::svt::OWizardPage* createPage( WizardState _nState ); - virtual WizardState determineNextState( WizardState _nCurrentState ) const; - virtual void enterState( WizardState _nState ); - virtual sal_Bool leaveState( WizardState _nState ); + virtual ::svt::OWizardPage* createPage( WizardState _nState ); + virtual WizardState determineNextState( WizardState _nCurrentState ) const; + virtual void enterState( WizardState _nState ); + virtual sal_Bool leaveState( WizardState _nState ); virtual sal_Bool onFinish(); virtual sal_Bool approveControl(sal_Int16 _nClassId); @@ -95,15 +95,15 @@ namespace dbp class OGridFieldsSelection : public OGridPage { protected: - FixedLine m_aFrame; - FixedText m_aExistFieldsLabel; - ListBox m_aExistFields; - PushButton m_aSelectOne; - PushButton m_aSelectAll; - PushButton m_aDeselectOne; - PushButton m_aDeselectAll; - FixedText m_aSelFieldsLabel; - ListBox m_aSelFields; + FixedLine m_aFrame; + FixedText m_aExistFieldsLabel; + ListBox m_aExistFields; + PushButton m_aSelectOne; + PushButton m_aSelectAll; + PushButton m_aDeselectOne; + PushButton m_aDeselectAll; + FixedText m_aSelFieldsLabel; + ListBox m_aSelFields; public: OGridFieldsSelection( OGridWizard* _pParent ); @@ -113,8 +113,8 @@ namespace dbp virtual void ActivatePage(); // OWizardPage overridables - virtual void initializePage(); - virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason ); + virtual void initializePage(); + virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason ); virtual bool canAdvance() const; protected: @@ -130,7 +130,7 @@ namespace dbp }; //......................................................................... -} // namespace dbp +} // namespace dbp //......................................................................... #endif // _EXTENSIONS_DBP_GRIDWIZARD_HXX_ diff --git a/extensions/source/dbpilots/groupboxpages.src b/extensions/source/dbpilots/groupboxpages.src index 6b651e848010..f5538e2a14af 100644 --- a/extensions/source/dbpilots/groupboxpages.src +++ b/extensions/source/dbpilots/groupboxpages.src @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/dbpilots/groupboxwiz.cxx b/extensions/source/dbpilots/groupboxwiz.cxx index f8cd1c509ebf..8bda68c04c72 100644 --- a/extensions/source/dbpilots/groupboxwiz.cxx +++ b/extensions/source/dbpilots/groupboxwiz.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -37,12 +37,12 @@ #include "dbpilots.hrc" -//#define GBW_STATE_DATASELECTION 0 -#define GBW_STATE_OPTIONLIST 0 -#define GBW_STATE_DEFAULTOPTION 1 -#define GBW_STATE_OPTIONVALUES 2 -#define GBW_STATE_DBFIELD 3 -#define GBW_STATE_FINALIZE 4 +//#define GBW_STATE_DATASELECTION 0 +#define GBW_STATE_OPTIONLIST 0 +#define GBW_STATE_DEFAULTOPTION 1 +#define GBW_STATE_OPTIONVALUES 2 +#define GBW_STATE_DBFIELD 3 +#define GBW_STATE_FINALIZE 4 //......................................................................... namespace dbp @@ -84,8 +84,8 @@ namespace dbp { switch (_nState) { -// case GBW_STATE_DATASELECTION: -// return new OTableSelectionPage(this); +// case GBW_STATE_DATASELECTION: +// return new OTableSelectionPage(this); // case GBW_STATE_OPTIONLIST: return new ORadioSelectionPage(this); @@ -111,8 +111,8 @@ namespace dbp { switch (_nCurrentState) { -// case GBW_STATE_DATASELECTION: -// return GBW_STATE_OPTIONLIST; +// case GBW_STATE_DATASELECTION: +// return GBW_STATE_OPTIONLIST; // case GBW_STATE_OPTIONLIST: return GBW_STATE_DEFAULTOPTION; @@ -141,7 +141,7 @@ namespace dbp { case GBW_STATE_DEFAULTOPTION: if (!m_bVisitedDefault) - { // assume that the first of the radio buttons should be selected + { // assume that the first of the radio buttons should be selected DBG_ASSERT(m_aSettings.aLabels.size(), "OGroupBoxWizard::enterState: should never have reached this state!"); m_aSettings.sDefaultField = m_aSettings.aLabels[0]; } @@ -150,7 +150,7 @@ namespace dbp case GBW_STATE_DBFIELD: if (!m_bVisitedDB) - { // try to generate a default for the DB field + { // try to generate a default for the DB field // (simply use the first field in the DB names collection) if (getContext().aFieldNames.getLength()) m_aSettings.sDBField = getContext().aFieldNames[0]; @@ -205,13 +205,13 @@ namespace dbp //--------------------------------------------------------------------- ORadioSelectionPage::ORadioSelectionPage( OControlWizard* _pParent ) :OGBWPage(_pParent, ModuleRes(RID_PAGE_GROUPRADIOSELECTION)) - ,m_aFrame (this, ModuleRes(FL_DATA)) - ,m_aRadioNameLabel (this, ModuleRes(FT_RADIOLABELS)) - ,m_aRadioName (this, ModuleRes(ET_RADIOLABELS)) - ,m_aMoveRight (this, ModuleRes(PB_MOVETORIGHT)) - ,m_aMoveLeft (this, ModuleRes(PB_MOVETOLEFT)) - ,m_aExistingRadiosLabel (this, ModuleRes(FT_RADIOBUTTONS)) - ,m_aExistingRadios (this, ModuleRes(LB_RADIOBUTTONS)) + ,m_aFrame (this, ModuleRes(FL_DATA)) + ,m_aRadioNameLabel (this, ModuleRes(FT_RADIOLABELS)) + ,m_aRadioName (this, ModuleRes(ET_RADIOLABELS)) + ,m_aMoveRight (this, ModuleRes(PB_MOVETORIGHT)) + ,m_aMoveLeft (this, ModuleRes(PB_MOVETOLEFT)) + ,m_aExistingRadiosLabel (this, ModuleRes(FT_RADIOBUTTONS)) + ,m_aExistingRadios (this, ModuleRes(LB_RADIOBUTTONS)) { FreeResource(); @@ -359,11 +359,11 @@ namespace dbp //--------------------------------------------------------------------- ODefaultFieldSelectionPage::ODefaultFieldSelectionPage( OControlWizard* _pParent ) :OMaybeListSelectionPage(_pParent, ModuleRes(RID_PAGE_DEFAULTFIELDSELECTION)) - ,m_aFrame (this, ModuleRes(FL_DEFAULTSELECTION)) - ,m_aDefaultSelectionLabel (this, ModuleRes(FT_DEFAULTSELECTION)) - ,m_aDefSelYes (this, ModuleRes(RB_DEFSELECTION_YES)) - ,m_aDefSelNo (this, ModuleRes(RB_DEFSELECTION_NO)) - ,m_aDefSelection (this, ModuleRes(LB_DEFSELECTIONFIELD)) + ,m_aFrame (this, ModuleRes(FL_DEFAULTSELECTION)) + ,m_aDefaultSelectionLabel (this, ModuleRes(FT_DEFAULTSELECTION)) + ,m_aDefSelYes (this, ModuleRes(RB_DEFSELECTION_YES)) + ,m_aDefSelNo (this, ModuleRes(RB_DEFSELECTION_NO)) + ,m_aDefSelection (this, ModuleRes(LB_DEFSELECTIONFIELD)) { FreeResource(); @@ -380,7 +380,7 @@ namespace dbp // fill the listbox m_aDefSelection.Clear(); - for ( ConstStringArrayIterator aLoop = rSettings.aLabels.begin(); + for ( ConstStringArrayIterator aLoop = rSettings.aLabels.begin(); aLoop != rSettings.aLabels.end(); ++aLoop ) @@ -408,12 +408,12 @@ namespace dbp //--------------------------------------------------------------------- OOptionValuesPage::OOptionValuesPage( OControlWizard* _pParent ) :OGBWPage(_pParent, ModuleRes(RID_PAGE_OPTIONVALUES)) - ,m_aFrame (this, ModuleRes(FL_OPTIONVALUES)) - ,m_aDescription (this, ModuleRes(FT_OPTIONVALUES_EXPL)) - ,m_aValueLabel (this, ModuleRes(FT_OPTIONVALUES)) - ,m_aValue (this, ModuleRes(ET_OPTIONVALUE)) - ,m_aOptionsLabel (this, ModuleRes(FT_RADIOBUTTONS)) - ,m_aOptions (this, ModuleRes(LB_RADIOBUTTONS)) + ,m_aFrame (this, ModuleRes(FL_OPTIONVALUES)) + ,m_aDescription (this, ModuleRes(FT_OPTIONVALUES_EXPL)) + ,m_aValueLabel (this, ModuleRes(FT_OPTIONVALUES)) + ,m_aValue (this, ModuleRes(ET_OPTIONVALUE)) + ,m_aOptionsLabel (this, ModuleRes(FT_RADIOBUTTONS)) + ,m_aOptions (this, ModuleRes(LB_RADIOBUTTONS)) ,m_nLastSelection((::svt::WizardTypes::WizardState)-1) { FreeResource(); @@ -462,7 +462,7 @@ namespace dbp // fill the list with all available options m_aOptions.Clear(); m_nLastSelection = -1; - for ( ConstStringArrayIterator aLoop = rSettings.aLabels.begin(); + for ( ConstStringArrayIterator aLoop = rSettings.aLabels.begin(); aLoop != rSettings.aLabels.end(); ++aLoop ) @@ -515,10 +515,10 @@ namespace dbp //--------------------------------------------------------------------- OFinalizeGBWPage::OFinalizeGBWPage( OControlWizard* _pParent ) :OGBWPage(_pParent, ModuleRes(RID_PAGE_OPTIONS_FINAL)) - ,m_aFrame (this, ModuleRes(FL_NAMEIT)) - ,m_aNameLabel (this, ModuleRes(FT_NAMEIT)) - ,m_aName (this, ModuleRes(ET_NAMEIT)) - ,m_aThatsAll (this, ModuleRes(FT_THATSALL)) + ,m_aFrame (this, ModuleRes(FL_NAMEIT)) + ,m_aNameLabel (this, ModuleRes(FT_NAMEIT)) + ,m_aName (this, ModuleRes(ET_NAMEIT)) + ,m_aThatsAll (this, ModuleRes(FT_THATSALL)) { FreeResource(); } @@ -557,7 +557,7 @@ namespace dbp } //......................................................................... -} // namespace dbp +} // namespace dbp //......................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/extensions/source/dbpilots/groupboxwiz.hxx b/extensions/source/dbpilots/groupboxwiz.hxx index 725e36e6d8e1..2b762e1f96ce 100644 --- a/extensions/source/dbpilots/groupboxwiz.hxx +++ b/extensions/source/dbpilots/groupboxwiz.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -42,11 +42,11 @@ namespace dbp //===================================================================== struct OOptionGroupSettings : public OControlWizardSettings { - StringArray aLabels; - StringArray aValues; - String sDefaultField; - String sDBField; - String sName; + StringArray aLabels; + StringArray aValues; + String sDefaultField; + String sDBField; + String sName; }; //===================================================================== @@ -55,10 +55,10 @@ namespace dbp class OGroupBoxWizard : public OControlWizard { protected: - OOptionGroupSettings m_aSettings; + OOptionGroupSettings m_aSettings; - sal_Bool m_bVisitedDefault : 1; - sal_Bool m_bVisitedDB : 1; + sal_Bool m_bVisitedDefault : 1; + sal_Bool m_bVisitedDB : 1; public: OGroupBoxWizard( @@ -71,9 +71,9 @@ namespace dbp protected: // OWizardMachine overridables - virtual ::svt::OWizardPage* createPage( WizardState _nState ); - virtual WizardState determineNextState( WizardState _nCurrentState ) const; - virtual void enterState( WizardState _nState ); + virtual ::svt::OWizardPage* createPage( WizardState _nState ); + virtual WizardState determineNextState( WizardState _nCurrentState ) const; + virtual void enterState( WizardState _nState ); virtual sal_Bool onFinish(); virtual sal_Bool approveControl(sal_Int16 _nClassId); @@ -100,13 +100,13 @@ namespace dbp class ORadioSelectionPage : public OGBWPage { protected: - FixedLine m_aFrame; - FixedText m_aRadioNameLabel; - Edit m_aRadioName; - PushButton m_aMoveRight; - PushButton m_aMoveLeft; - FixedText m_aExistingRadiosLabel; - ListBox m_aExistingRadios; + FixedLine m_aFrame; + FixedText m_aRadioNameLabel; + Edit m_aRadioName; + PushButton m_aMoveRight; + PushButton m_aMoveLeft; + FixedText m_aExistingRadiosLabel; + ListBox m_aExistingRadios; public: ORadioSelectionPage( OControlWizard* _pParent ); @@ -116,8 +116,8 @@ namespace dbp void ActivatePage(); // OWizardPage overridables - virtual void initializePage(); - virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason ); + virtual void initializePage(); + virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason ); virtual bool canAdvance() const; DECL_LINK( OnMoveEntry, PushButton* ); @@ -133,19 +133,19 @@ namespace dbp class ODefaultFieldSelectionPage : public OMaybeListSelectionPage { protected: - FixedLine m_aFrame; - FixedText m_aDefaultSelectionLabel; - RadioButton m_aDefSelYes; - RadioButton m_aDefSelNo; - ListBox m_aDefSelection; + FixedLine m_aFrame; + FixedText m_aDefaultSelectionLabel; + RadioButton m_aDefSelYes; + RadioButton m_aDefSelNo; + ListBox m_aDefSelection; public: ODefaultFieldSelectionPage( OControlWizard* _pParent ); protected: // OWizardPage overridables - virtual void initializePage(); - virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason ); + virtual void initializePage(); + virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason ); OOptionGroupSettings& getSettings() { return static_cast<OGroupBoxWizard*>(getDialog())->getSettings(); } }; @@ -156,14 +156,14 @@ namespace dbp class OOptionValuesPage : public OGBWPage { protected: - FixedLine m_aFrame; - FixedText m_aDescription; - FixedText m_aValueLabel; - Edit m_aValue; - FixedText m_aOptionsLabel; - ListBox m_aOptions; - - StringArray m_aUncommittedValues; + FixedLine m_aFrame; + FixedText m_aDescription; + FixedText m_aValueLabel; + Edit m_aValue; + FixedText m_aOptionsLabel; + ListBox m_aOptions; + + StringArray m_aUncommittedValues; ::svt::WizardTypes::WizardState m_nLastSelection; @@ -175,8 +175,8 @@ namespace dbp void ActivatePage(); // OWizardPage overridables - virtual void initializePage(); - virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason ); + virtual void initializePage(); + virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason ); void implTraveledOptions(); @@ -204,10 +204,10 @@ namespace dbp class OFinalizeGBWPage : public OGBWPage { protected: - FixedLine m_aFrame; - FixedText m_aNameLabel; - Edit m_aName; - FixedText m_aThatsAll; + FixedLine m_aFrame; + FixedText m_aNameLabel; + Edit m_aName; + FixedText m_aThatsAll; public: OFinalizeGBWPage( OControlWizard* _pParent ); @@ -217,13 +217,13 @@ namespace dbp void ActivatePage(); // OWizardPage overridables - virtual void initializePage(); - virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason ); + virtual void initializePage(); + virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason ); virtual bool canAdvance() const; }; //......................................................................... -} // namespace dbp +} // namespace dbp //......................................................................... #endif // _EXTENSIONS_DBP_GROUPBOXWIZ_HXX_ diff --git a/extensions/source/dbpilots/listcombopages.src b/extensions/source/dbpilots/listcombopages.src index eb83140de316..7e48fef2cca9 100644 --- a/extensions/source/dbpilots/listcombopages.src +++ b/extensions/source/dbpilots/listcombopages.src @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/dbpilots/listcombowizard.cxx b/extensions/source/dbpilots/listcombowizard.cxx index d70fdcb97378..93c71ba16085 100644 --- a/extensions/source/dbpilots/listcombowizard.cxx +++ b/extensions/source/dbpilots/listcombowizard.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -75,7 +75,7 @@ namespace dbp // if we do not need the data source selection page ... if (!needDatasourceSelection()) - { // ... skip it! + { // ... skip it! skip(1); m_bHadDataSelection = sal_False; } @@ -293,9 +293,9 @@ namespace dbp //--------------------------------------------------------------------- OContentTableSelection::OContentTableSelection( OListComboWizard* _pParent ) :OLCPage(_pParent, ModuleRes(RID_PAGE_LCW_CONTENTSELECTION_TABLE)) - ,m_aFrame (this, ModuleRes(FL_FRAME)) - ,m_aSelectTableLabel (this, ModuleRes(FT_SELECTTABLE_LABEL)) - ,m_aSelectTable (this, ModuleRes(LB_SELECTTABLE)) + ,m_aFrame (this, ModuleRes(FL_FRAME)) + ,m_aSelectTableLabel (this, ModuleRes(FT_SELECTTABLE_LABEL)) + ,m_aSelectTable (this, ModuleRes(LB_SELECTTABLE)) { FreeResource(); @@ -380,12 +380,12 @@ namespace dbp //--------------------------------------------------------------------- OContentFieldSelection::OContentFieldSelection( OListComboWizard* _pParent ) :OLCPage(_pParent, ModuleRes(RID_PAGE_LCW_CONTENTSELECTION_FIELD)) - ,m_aFrame (this, ModuleRes(FL_FRAME)) - ,m_aTableFields (this, ModuleRes(FT_TABLEFIELDS)) - ,m_aSelectTableField (this, ModuleRes(LB_SELECTFIELD)) - ,m_aDisplayedFieldLabel (this, ModuleRes(FT_DISPLAYEDFIELD)) - ,m_aDisplayedField (this, ModuleRes(ET_DISPLAYEDFIELD)) - ,m_aInfo (this, ModuleRes(FT_CONTENTFIELD_INFO)) + ,m_aFrame (this, ModuleRes(FL_FRAME)) + ,m_aTableFields (this, ModuleRes(FT_TABLEFIELDS)) + ,m_aSelectTableField (this, ModuleRes(LB_SELECTFIELD)) + ,m_aDisplayedFieldLabel (this, ModuleRes(FT_DISPLAYEDFIELD)) + ,m_aDisplayedField (this, ModuleRes(ET_DISPLAYEDFIELD)) + ,m_aInfo (this, ModuleRes(FT_CONTENTFIELD_INFO)) { m_aInfo.SetText(String(ModuleRes( isListBox() ? STR_FIELDINFO_LISTBOX : STR_FIELDINFO_COMBOBOX))); FreeResource(); @@ -454,12 +454,12 @@ namespace dbp //--------------------------------------------------------------------- OLinkFieldsPage::OLinkFieldsPage( OListComboWizard* _pParent ) :OLCPage(_pParent, ModuleRes(RID_PAGE_LCW_FIELDLINK)) - ,m_aDescription (this, ModuleRes(FT_FIELDLINK_DESC)) - ,m_aFrame (this, ModuleRes(FL_FRAME)) - ,m_aValueListFieldLabel (this, ModuleRes(FT_VALUELISTFIELD)) - ,m_aValueListField (this, ModuleRes(CMB_VALUELISTFIELD)) - ,m_aTableFieldLabel (this, ModuleRes(FT_TABLEFIELD)) - ,m_aTableField (this, ModuleRes(CMB_TABLEFIELD)) + ,m_aDescription (this, ModuleRes(FT_FIELDLINK_DESC)) + ,m_aFrame (this, ModuleRes(FL_FRAME)) + ,m_aValueListFieldLabel (this, ModuleRes(FT_VALUELISTFIELD)) + ,m_aValueListField (this, ModuleRes(CMB_VALUELISTFIELD)) + ,m_aTableFieldLabel (this, ModuleRes(FT_TABLEFIELD)) + ,m_aTableField (this, ModuleRes(CMB_TABLEFIELD)) { FreeResource(); @@ -558,7 +558,7 @@ namespace dbp } //......................................................................... -} // namespace dbp +} // namespace dbp //......................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/extensions/source/dbpilots/listcombowizard.hxx b/extensions/source/dbpilots/listcombowizard.hxx index 67e32b50ba88..2f0ff8f85be1 100644 --- a/extensions/source/dbpilots/listcombowizard.hxx +++ b/extensions/source/dbpilots/listcombowizard.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -37,21 +37,21 @@ namespace dbp { //......................................................................... -#define LCW_STATE_DATASOURCE_SELECTION 0 -#define LCW_STATE_TABLESELECTION 1 -#define LCW_STATE_FIELDSELECTION 2 -#define LCW_STATE_FIELDLINK 3 -#define LCW_STATE_COMBODBFIELD 4 +#define LCW_STATE_DATASOURCE_SELECTION 0 +#define LCW_STATE_TABLESELECTION 1 +#define LCW_STATE_FIELDSELECTION 2 +#define LCW_STATE_FIELDLINK 3 +#define LCW_STATE_COMBODBFIELD 4 //===================================================================== //= OListComboSettings //===================================================================== struct OListComboSettings : public OControlWizardSettings { - String sListContentTable; - String sListContentField; - String sLinkedFormField; - String sLinkedListField; + String sListContentTable; + String sListContentField; + String sLinkedFormField; + String sLinkedListField; }; //===================================================================== @@ -60,9 +60,9 @@ namespace dbp class OListComboWizard : public OControlWizard { protected: - OListComboSettings m_aSettings; - sal_Bool m_bListBox : 1; - sal_Bool m_bHadDataSelection : 1; + OListComboSettings m_aSettings; + sal_Bool m_bListBox : 1; + sal_Bool m_bHadDataSelection : 1; public: OListComboWizard( @@ -77,10 +77,10 @@ namespace dbp protected: // OWizardMachine overridables - virtual ::svt::OWizardPage* createPage( WizardState _nState ); - virtual WizardState determineNextState( WizardState _nCurrentState ) const; - virtual void enterState( WizardState _nState ); - virtual sal_Bool leaveState( WizardState _nState ); + virtual ::svt::OWizardPage* createPage( WizardState _nState ); + virtual WizardState determineNextState( WizardState _nCurrentState ) const; + virtual void enterState( WizardState _nState ); + virtual sal_Bool leaveState( WizardState _nState ); virtual sal_Bool onFinish(); virtual sal_Bool approveControl(sal_Int16 _nClassId); @@ -116,9 +116,9 @@ namespace dbp class OContentTableSelection : public OLCPage { protected: - FixedLine m_aFrame; - FixedText m_aSelectTableLabel; - ListBox m_aSelectTable; + FixedLine m_aFrame; + FixedText m_aSelectTableLabel; + ListBox m_aSelectTable; public: OContentTableSelection( OListComboWizard* _pParent ); @@ -128,8 +128,8 @@ namespace dbp virtual void ActivatePage(); // OWizardPage overridables - virtual void initializePage(); - virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason ); + virtual void initializePage(); + virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason ); virtual bool canAdvance() const; protected: @@ -143,12 +143,12 @@ namespace dbp class OContentFieldSelection : public OLCPage { protected: - FixedLine m_aFrame; - FixedText m_aTableFields; - ListBox m_aSelectTableField; - FixedText m_aDisplayedFieldLabel; - Edit m_aDisplayedField; - FixedText m_aInfo; + FixedLine m_aFrame; + FixedText m_aTableFields; + ListBox m_aSelectTableField; + FixedText m_aDisplayedFieldLabel; + Edit m_aDisplayedField; + FixedText m_aInfo; public: @@ -162,8 +162,8 @@ namespace dbp virtual void ActivatePage(); // OWizardPage overridables - virtual void initializePage(); - virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason ); + virtual void initializePage(); + virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason ); virtual bool canAdvance() const; }; @@ -173,12 +173,12 @@ namespace dbp class OLinkFieldsPage : public OLCPage { protected: - FixedText m_aDescription; - FixedLine m_aFrame; - FixedText m_aValueListFieldLabel; - ComboBox m_aValueListField; - FixedText m_aTableFieldLabel; - ComboBox m_aTableField; + FixedText m_aDescription; + FixedLine m_aFrame; + FixedText m_aValueListFieldLabel; + ComboBox m_aValueListField; + FixedText m_aTableFieldLabel; + ComboBox m_aTableField; public: @@ -189,8 +189,8 @@ namespace dbp virtual void ActivatePage(); // OWizardPage overridables - virtual void initializePage(); - virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason ); + virtual void initializePage(); + virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason ); virtual bool canAdvance() const; private: @@ -221,7 +221,7 @@ namespace dbp }; //......................................................................... -} // namespace dbp +} // namespace dbp //......................................................................... #endif // _EXTENSIONS_DBP_LISTCOMBOWIZARD_HXX_ diff --git a/extensions/source/dbpilots/moduledbp.cxx b/extensions/source/dbpilots/moduledbp.cxx index 6fb06c7f68ac..ead9753193f4 100644 --- a/extensions/source/dbpilots/moduledbp.cxx +++ b/extensions/source/dbpilots/moduledbp.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/dbpilots/optiongrouplayouter.cxx b/extensions/source/dbpilots/optiongrouplayouter.cxx index 13c453243d0f..7bc1f84cf91d 100644 --- a/extensions/source/dbpilots/optiongrouplayouter.cxx +++ b/extensions/source/dbpilots/optiongrouplayouter.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -48,11 +48,11 @@ namespace dbp { //......................................................................... -#define BUTTON_HEIGHT 300 -#define TOP_HEIGHT 300 -#define HEIGHT 450 -#define OFFSET 300 -#define MIN_WIDTH 600 +#define BUTTON_HEIGHT 300 +#define TOP_HEIGHT 300 +#define HEIGHT 450 +#define OFFSET 300 +#define MIN_WIDTH 600 using namespace ::com::sun::star::uno; using namespace ::com::sun::star::drawing; @@ -212,7 +212,7 @@ namespace dbp } //......................................................................... -} // namespace dbp +} // namespace dbp //......................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/extensions/source/dbpilots/optiongrouplayouter.hxx b/extensions/source/dbpilots/optiongrouplayouter.hxx index 0d38149146a5..52b6e7bfc315 100644 --- a/extensions/source/dbpilots/optiongrouplayouter.hxx +++ b/extensions/source/dbpilots/optiongrouplayouter.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -57,19 +57,19 @@ namespace dbp ); public: - void doLayout( + void doLayout( const OControlWizardContext& _rContext, const OOptionGroupSettings& _rSettings ); protected: - void implAnchorShape( + void implAnchorShape( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxShapeProps ); }; //......................................................................... -} // namespace dbp +} // namespace dbp //......................................................................... #endif // _EXTENSIONS_DBP_OPTIONGROUPLAYOUTER_HXX_ diff --git a/extensions/source/dbpilots/unoautopilot.hxx b/extensions/source/dbpilots/unoautopilot.hxx index b55d9ae34b7d..bfa4e0cfed6d 100644 --- a/extensions/source/dbpilots/unoautopilot.hxx +++ b/extensions/source/dbpilots/unoautopilot.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -49,7 +49,7 @@ namespace dbp struct IServiceInfo { public: - ::rtl::OUString getImplementationName() const; + ::rtl::OUString getImplementationName() const; ::com::sun::star::uno::Sequence< ::rtl::OUString > getServiceNames() const; }; @@ -57,7 +57,7 @@ namespace dbp //===================================================================== //= OUnoAutoPilot //===================================================================== - typedef ::svt::OGenericUnoDialog OUnoAutoPilot_Base; + typedef ::svt::OGenericUnoDialog OUnoAutoPilot_Base; template <class TYPE, class SERVICEINFO> class OUnoAutoPilot :public OUnoAutoPilot_Base @@ -93,14 +93,14 @@ namespace dbp protected: // OGenericUnoDialog overridables - virtual Dialog* createDialog(Window* _pParent); + virtual Dialog* createDialog(Window* _pParent); virtual void implInitialize(const com::sun::star::uno::Any& _rValue); }; #include "unoautopilot.inl" //......................................................................... -} // namespace dbp +} // namespace dbp //......................................................................... #endif // _EXTENSIONS_DBP_UNOAUTOPILOT_HXX_ diff --git a/extensions/source/dbpilots/unoautopilot.inl b/extensions/source/dbpilots/unoautopilot.inl index 0e3a953bcad1..cc1fa0eba310 100644 --- a/extensions/source/dbpilots/unoautopilot.inl +++ b/extensions/source/dbpilots/unoautopilot.inl @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -111,7 +111,7 @@ template <class TYPE, class SERVICEINFO> //-------------------------------------------------------------------------- template <class TYPE, class SERVICEINFO> -Dialog* OUnoAutoPilot<TYPE, SERVICEINFO>::createDialog(Window* _pParent) +Dialog* OUnoAutoPilot<TYPE, SERVICEINFO>::createDialog(Window* _pParent) { return new TYPE(_pParent, m_xObjectModel, m_aContext.getLegacyServiceFactory()); } diff --git a/extensions/source/dbpilots/wizardcontext.hxx b/extensions/source/dbpilots/wizardcontext.hxx index 07d8fb0920c2..93cc936bdd73 100644 --- a/extensions/source/dbpilots/wizardcontext.hxx +++ b/extensions/source/dbpilots/wizardcontext.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -86,7 +86,7 @@ namespace dbp }; //......................................................................... -} // namespace dbp +} // namespace dbp //......................................................................... #endif // _EXTENSIONS_DBP_WIZARDCONTEXT_HXX_ diff --git a/extensions/source/dbpilots/wizardservices.cxx b/extensions/source/dbpilots/wizardservices.cxx index 23d0c2b6c80b..b90e47478fc3 100644 --- a/extensions/source/dbpilots/wizardservices.cxx +++ b/extensions/source/dbpilots/wizardservices.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -116,7 +116,7 @@ namespace dbp } //......................................................................... -} // namespace dbp +} // namespace dbp //......................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/extensions/source/dbpilots/wizardservices.hxx b/extensions/source/dbpilots/wizardservices.hxx index 23f71d2722cc..48c57115b1c8 100644 --- a/extensions/source/dbpilots/wizardservices.hxx +++ b/extensions/source/dbpilots/wizardservices.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -44,7 +44,7 @@ namespace dbp struct OGroupBoxSI { public: - ::rtl::OUString getImplementationName() const; + ::rtl::OUString getImplementationName() const; ::com::sun::star::uno::Sequence< ::rtl::OUString > getServiceNames() const; }; @@ -56,7 +56,7 @@ namespace dbp struct OListComboSI { public: - ::rtl::OUString getImplementationName() const; + ::rtl::OUString getImplementationName() const; ::com::sun::star::uno::Sequence< ::rtl::OUString > getServiceNames() const; }; @@ -68,13 +68,13 @@ namespace dbp struct OGridSI { public: - ::rtl::OUString getImplementationName() const; + ::rtl::OUString getImplementationName() const; ::com::sun::star::uno::Sequence< ::rtl::OUString > getServiceNames() const; }; //......................................................................... -} // namespace dbp +} // namespace dbp //......................................................................... #endif // _EXTENSIONS_DBW_WIZARDSERVICES_HXX_ diff --git a/extensions/source/inc/componentmodule.cxx b/extensions/source/inc/componentmodule.cxx index fe8321be9cdd..b5b80f89963a 100644 --- a/extensions/source/inc/componentmodule.cxx +++ b/extensions/source/inc/componentmodule.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -32,10 +32,10 @@ #include <comphelper/sequence.hxx> #include <tools/debug.hxx> -#define ENTER_MOD_METHOD() \ - ::osl::MutexGuard aGuard(s_aMutex); \ +#define ENTER_MOD_METHOD() \ + ::osl::MutexGuard aGuard(s_aMutex); \ ensureImpl() - + //......................................................................... namespace COMPMOD_NAMESPACE { @@ -54,9 +54,9 @@ namespace COMPMOD_NAMESPACE */ class OModuleImpl { - ResMgr* m_pRessources; - sal_Bool m_bInitialized; - ByteString m_sFilePrefix; + ResMgr* m_pRessources; + sal_Bool m_bInitialized; + ByteString m_sFilePrefix; public: /// ctor @@ -64,8 +64,8 @@ namespace COMPMOD_NAMESPACE ~OModuleImpl(); /// get the manager for the ressources of the module - ResMgr* getResManager(); - void setResourceFilePrefix(const ::rtl::OString& _rPrefix) { m_sFilePrefix = _rPrefix; } + ResMgr* getResManager(); + void setResourceFilePrefix(const ::rtl::OString& _rPrefix) { m_sFilePrefix = _rPrefix; } }; //------------------------------------------------------------------------- @@ -83,7 +83,7 @@ namespace COMPMOD_NAMESPACE } //------------------------------------------------------------------------- - ResMgr* OModuleImpl::getResManager() + ResMgr* OModuleImpl::getResManager() { // note that this method is not threadsafe, which counts for the whole class ! if (!m_pRessources && !m_bInitialized) @@ -93,10 +93,10 @@ namespace COMPMOD_NAMESPACE ByteString aMgrName = m_sFilePrefix; m_pRessources = ResMgr::CreateResMgr(aMgrName.GetBuffer()); - DBG_ASSERT(m_pRessources, + DBG_ASSERT(m_pRessources, (ByteString("OModuleImpl::getResManager: could not create the resource manager (file name: ") - += aMgrName - += ByteString(")!")).GetBuffer()); + += aMgrName + += ByteString(")!")).GetBuffer()); m_bInitialized = sal_True; } @@ -106,12 +106,12 @@ namespace COMPMOD_NAMESPACE //========================================================================= //= OModule //========================================================================= - ::osl::Mutex OModule::s_aMutex; - sal_Int32 OModule::s_nClients = 0; - OModuleImpl* OModule::s_pImpl = NULL; - ::rtl::OString OModule::s_sResPrefix; + ::osl::Mutex OModule::s_aMutex; + sal_Int32 OModule::s_nClients = 0; + OModuleImpl* OModule::s_pImpl = NULL; + ::rtl::OString OModule::s_sResPrefix; //------------------------------------------------------------------------- - ResMgr* OModule::getResManager() + ResMgr* OModule::getResManager() { ENTER_MOD_METHOD(); return s_pImpl->getResManager(); @@ -157,10 +157,10 @@ namespace COMPMOD_NAMESPACE //- registration helper //-------------------------------------------------------------------------- - Sequence< ::rtl::OUString >* OModule::s_pImplementationNames = NULL; - Sequence< Sequence< ::rtl::OUString > >* OModule::s_pSupportedServices = NULL; - Sequence< sal_Int64 >* OModule::s_pCreationFunctionPointers = NULL; - Sequence< sal_Int64 >* OModule::s_pFactoryFunctionPointers = NULL; + Sequence< ::rtl::OUString >* OModule::s_pImplementationNames = NULL; + Sequence< Sequence< ::rtl::OUString > >* OModule::s_pSupportedServices = NULL; + Sequence< sal_Int64 >* OModule::s_pCreationFunctionPointers = NULL; + Sequence< sal_Int64 >* OModule::s_pFactoryFunctionPointers = NULL; //-------------------------------------------------------------------------- void OModule::registerComponent( @@ -181,9 +181,9 @@ namespace COMPMOD_NAMESPACE OSL_ENSURE(s_pImplementationNames && s_pSupportedServices && s_pCreationFunctionPointers && s_pFactoryFunctionPointers, "OModule::registerComponent : inconsistent state (the pointers (2)) !"); - OSL_ENSURE( (s_pImplementationNames->getLength() == s_pSupportedServices->getLength()) - && (s_pImplementationNames->getLength() == s_pCreationFunctionPointers->getLength()) - && (s_pImplementationNames->getLength() == s_pFactoryFunctionPointers->getLength()), + OSL_ENSURE( (s_pImplementationNames->getLength() == s_pSupportedServices->getLength()) + && (s_pImplementationNames->getLength() == s_pCreationFunctionPointers->getLength()) + && (s_pImplementationNames->getLength() == s_pFactoryFunctionPointers->getLength()), "OModule::registerComponent : inconsistent state !"); sal_Int32 nOldLen = s_pImplementationNames->getLength(); @@ -208,9 +208,9 @@ namespace COMPMOD_NAMESPACE } OSL_ENSURE(s_pImplementationNames && s_pSupportedServices && s_pCreationFunctionPointers && s_pFactoryFunctionPointers, "OModule::revokeComponent : inconsistent state (the pointers) !"); - OSL_ENSURE( (s_pImplementationNames->getLength() == s_pSupportedServices->getLength()) - && (s_pImplementationNames->getLength() == s_pCreationFunctionPointers->getLength()) - && (s_pImplementationNames->getLength() == s_pFactoryFunctionPointers->getLength()), + OSL_ENSURE( (s_pImplementationNames->getLength() == s_pSupportedServices->getLength()) + && (s_pImplementationNames->getLength() == s_pCreationFunctionPointers->getLength()) + && (s_pImplementationNames->getLength() == s_pFactoryFunctionPointers->getLength()), "OModule::revokeComponent : inconsistent state !"); sal_Int32 nLen = s_pImplementationNames->getLength(); @@ -250,9 +250,9 @@ namespace COMPMOD_NAMESPACE } OSL_ENSURE(s_pImplementationNames && s_pSupportedServices && s_pCreationFunctionPointers && s_pFactoryFunctionPointers, "OModule::writeComponentInfos : inconsistent state (the pointers) !"); - OSL_ENSURE( (s_pImplementationNames->getLength() == s_pSupportedServices->getLength()) - && (s_pImplementationNames->getLength() == s_pCreationFunctionPointers->getLength()) - && (s_pImplementationNames->getLength() == s_pFactoryFunctionPointers->getLength()), + OSL_ENSURE( (s_pImplementationNames->getLength() == s_pSupportedServices->getLength()) + && (s_pImplementationNames->getLength() == s_pCreationFunctionPointers->getLength()) + && (s_pImplementationNames->getLength() == s_pFactoryFunctionPointers->getLength()), "OModule::writeComponentInfos : inconsistent state !"); sal_Int32 nLen = s_pImplementationNames->getLength(); @@ -299,9 +299,9 @@ namespace COMPMOD_NAMESPACE } OSL_ENSURE(s_pImplementationNames && s_pSupportedServices && s_pCreationFunctionPointers && s_pFactoryFunctionPointers, "OModule::getComponentFactory : inconsistent state (the pointers) !"); - OSL_ENSURE( (s_pImplementationNames->getLength() == s_pSupportedServices->getLength()) - && (s_pImplementationNames->getLength() == s_pCreationFunctionPointers->getLength()) - && (s_pImplementationNames->getLength() == s_pFactoryFunctionPointers->getLength()), + OSL_ENSURE( (s_pImplementationNames->getLength() == s_pSupportedServices->getLength()) + && (s_pImplementationNames->getLength() == s_pCreationFunctionPointers->getLength()) + && (s_pImplementationNames->getLength() == s_pFactoryFunctionPointers->getLength()), "OModule::getComponentFactory : inconsistent state !"); @@ -335,7 +335,7 @@ namespace COMPMOD_NAMESPACE //......................................................................... -} // namespace COMPMOD_NAMESPACE +} // namespace COMPMOD_NAMESPACE //......................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/extensions/source/inc/componentmodule.hxx b/extensions/source/inc/componentmodule.hxx index 8ac75326a56e..d0c93c5b0663 100644 --- a/extensions/source/inc/componentmodule.hxx +++ b/extensions/source/inc/componentmodule.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -76,36 +76,36 @@ typedef ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleService protected: // resource administration - static ::osl::Mutex s_aMutex; /// access safety - static sal_Int32 s_nClients; /// number of registered clients - static OModuleImpl* s_pImpl; /// impl class. lives as long as at least one client for the module is registered - static ::rtl::OString s_sResPrefix; + static ::osl::Mutex s_aMutex; /// access safety + static sal_Int32 s_nClients; /// number of registered clients + static OModuleImpl* s_pImpl; /// impl class. lives as long as at least one client for the module is registered + static ::rtl::OString s_sResPrefix; // auto registration administration - static ::com::sun::star::uno::Sequence< ::rtl::OUString >* + static ::com::sun::star::uno::Sequence< ::rtl::OUString >* s_pImplementationNames; - static ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::rtl::OUString > >* + static ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::rtl::OUString > >* s_pSupportedServices; - static ::com::sun::star::uno::Sequence< sal_Int64 >* + static ::com::sun::star::uno::Sequence< sal_Int64 >* s_pCreationFunctionPointers; - static ::com::sun::star::uno::Sequence< sal_Int64 >* + static ::com::sun::star::uno::Sequence< sal_Int64 >* s_pFactoryFunctionPointers; public: // cna be set as long as no resource has been accessed ... - static void setResourceFilePrefix(const ::rtl::OString& _rPrefix); + static void setResourceFilePrefix(const ::rtl::OString& _rPrefix); /// get the vcl res manager of the module - static ResMgr* getResManager(); + static ResMgr* getResManager(); /** register a component implementing a service with the given data. - @param _rImplementationName + @param _rImplementationName the implementation name of the component - @param _rServiceNames + @param _rServiceNames the services the component supports - @param _pCreateFunction + @param _pCreateFunction a function for creating an instance of the component - @param _pFactoryFunction + @param _pFactoryFunction a function for creating a factory for that component @see revokeComponent */ @@ -116,7 +116,7 @@ typedef ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleService FactoryInstantiation _pFactoryFunction); /** revoke the registration for the specified component - @param _rImplementationName + @param _rImplementationName the implementation name of the component */ static void revokeComponent( @@ -126,9 +126,9 @@ typedef ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleService <p>writes the registration information of all components which are currently registered into the specified registry.<p/> <p>Usually used from within component_writeInfo.<p/> - @param _rxServiceManager + @param _rxServiceManager the service manager - @param _rRootKey + @param _rRootKey the registry key under which the information will be stored @return sal_True if the registration of all implementations was successfull, sal_False otherwise @@ -139,9 +139,9 @@ typedef ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleService /** creates a Factory for the component with the given implementation name. <p>Usually used from within component_getFactory.<p/> - @param _rxServiceManager + @param _rxServiceManager a pointer to an XMultiServiceFactory interface as got in component_getFactory - @param _pImplementationName + @param _pImplementationName the implementation name of the component @return the XInterface access to a factory for the component @@ -153,9 +153,9 @@ typedef ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleService protected: /// register a client for the module - static void registerClient(); + static void registerClient(); /// revoke a client for the module - static void revokeClient(); + static void revokeClient(); private: /** ensure that the impl class exists @@ -167,13 +167,13 @@ typedef ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleService //========================================================================= //= OModuleResourceClient //========================================================================= - /** base class for objects which uses any global module-specific ressources + /** base class for objects which uses any global module-specific ressources */ class OModuleResourceClient { public: - OModuleResourceClient() { OModule::registerClient(); } - ~OModuleResourceClient() { OModule::revokeClient(); } + OModuleResourceClient() { OModule::registerClient(); } + ~OModuleResourceClient() { OModule::revokeClient(); } }; //========================================================================= @@ -272,7 +272,7 @@ typedef ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleService } //......................................................................... -} // namespace COMPMOD_NAMESPACE +} // namespace COMPMOD_NAMESPACE //......................................................................... #endif // _EXTENSIONS_COMPONENT_MODULE_HXX_ diff --git a/extensions/source/logging/consolehandler.cxx b/extensions/source/logging/consolehandler.cxx index c095198900ef..9e51ca370a7b 100644 --- a/extensions/source/logging/consolehandler.cxx +++ b/extensions/source/logging/consolehandler.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -180,7 +180,7 @@ namespace logging MethodGuard aGuard( *this ); return m_nThreshold; } - + //-------------------------------------------------------------------- void SAL_CALL ConsoleHandler::setThreshold( ::sal_Int32 _threshold ) throw (RuntimeException) { @@ -196,42 +196,42 @@ namespace logging OSL_VERIFY( m_aHandlerHelper.getEncoding( sEncoding ) ); return sEncoding; } - + //-------------------------------------------------------------------- void SAL_CALL ConsoleHandler::setEncoding( const ::rtl::OUString& _rEncoding ) throw (RuntimeException) { MethodGuard aGuard( *this ); OSL_VERIFY( m_aHandlerHelper.setEncoding( _rEncoding ) ); } - + //-------------------------------------------------------------------- Reference< XLogFormatter > SAL_CALL ConsoleHandler::getFormatter() throw (RuntimeException) { MethodGuard aGuard( *this ); return m_aHandlerHelper.getFormatter(); } - + //-------------------------------------------------------------------- void SAL_CALL ConsoleHandler::setFormatter( const Reference< XLogFormatter >& _rxFormatter ) throw (RuntimeException) { MethodGuard aGuard( *this ); m_aHandlerHelper.setFormatter( _rxFormatter ); } - + //-------------------------------------------------------------------- ::sal_Int32 SAL_CALL ConsoleHandler::getLevel() throw (RuntimeException) { MethodGuard aGuard( *this ); return m_aHandlerHelper.getLevel(); } - + //-------------------------------------------------------------------- void SAL_CALL ConsoleHandler::setLevel( ::sal_Int32 _nLevel ) throw (RuntimeException) { MethodGuard aGuard( *this ); m_aHandlerHelper.setLevel( _nLevel ); } - + //-------------------------------------------------------------------- void SAL_CALL ConsoleHandler::flush( ) throw (RuntimeException) { @@ -239,7 +239,7 @@ namespace logging fflush( stdout ); fflush( stderr ); } - + //-------------------------------------------------------------------- ::sal_Bool SAL_CALL ConsoleHandler::publish( const LogRecord& _rRecord ) throw (RuntimeException) { @@ -292,7 +292,7 @@ namespace logging { return getImplementationName_static(); } - + //-------------------------------------------------------------------- ::sal_Bool SAL_CALL ConsoleHandler::supportsService( const ::rtl::OUString& _rServiceName ) throw(RuntimeException) { @@ -305,19 +305,19 @@ namespace logging return sal_True; return sal_False; } - + //-------------------------------------------------------------------- Sequence< ::rtl::OUString > SAL_CALL ConsoleHandler::getSupportedServiceNames() throw(RuntimeException) { return getSupportedServiceNames_static(); } - + //-------------------------------------------------------------------- ::rtl::OUString SAL_CALL ConsoleHandler::getImplementationName_static() { return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.extensions.ConsoleHandler" ) ); } - + //-------------------------------------------------------------------- Sequence< ::rtl::OUString > SAL_CALL ConsoleHandler::getSupportedServiceNames_static() { diff --git a/extensions/source/logging/csvformatter.cxx b/extensions/source/logging/csvformatter.cxx index 275d6938217b..244b0b3407ba 100644 --- a/extensions/source/logging/csvformatter.cxx +++ b/extensions/source/logging/csvformatter.cxx @@ -1,7 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -72,7 +72,7 @@ namespace logging { public: virtual ::rtl::OUString SAL_CALL formatMultiColumn(const Sequence< ::rtl::OUString>& column_data) throw (RuntimeException); - + // XServiceInfo - static version static ::rtl::OUString SAL_CALL getImplementationName_static(); static Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames_static(); @@ -145,7 +145,7 @@ namespace // special treatment for the last character if(quote_char==str[str_length-1]) buf.append(quote_char); - // iterating backwards because the index at which we insert wont be shifted + // iterating backwards because the index at which we insert wont be shifted // when moving that way. for(sal_Int32 i = str_length; i>=0; ) { @@ -157,8 +157,8 @@ namespace } else buf.append(str); - }; - + }; + ::com::sun::star::uno::Sequence< ::rtl::OUString> initialColumns() { com::sun::star::uno::Sequence< ::rtl::OUString> result = ::com::sun::star::uno::Sequence< ::rtl::OUString>(1); @@ -171,11 +171,11 @@ namespace namespace logging { CsvFormatter::CsvFormatter( const Reference< XComponentContext >& context ) - :m_aContext( context ), - m_LogEventNo(true), - m_LogThread(true), - m_LogTimestamp(true), - m_LogSource(false), + :m_aContext( context ), + m_LogEventNo(true), + m_LogThread(true), + m_LogTimestamp(true), + m_LogSource(false), m_MultiColumn(false), m_Columnnames(initialColumns()) { } @@ -225,7 +225,7 @@ namespace logging void CsvFormatter::setLogSource(::sal_Bool log_source) throw (RuntimeException) { - m_LogSource = log_source; + m_LogSource = log_source; } void CsvFormatter::setColumnnames(const Sequence< ::rtl::OUString >& columnnames) throw (RuntimeException) @@ -248,7 +248,7 @@ namespace logging sal_Int32 columns = m_Columnnames.getLength(); for(sal_Int32 i=0; i<columns; i++) { - buf.append(m_Columnnames[i]); + buf.append(m_Columnnames[i]); buf.append(comma_char); } buf.setLength(buf.getLength()-1); @@ -288,7 +288,7 @@ namespace logging aLogEntry.appendAscii( buffer ); aLogEntry.append(comma_char); } - + if(m_LogSource) { appendEncodedString(aLogEntry, record.SourceClassName); @@ -310,7 +310,7 @@ namespace logging aLogEntry.append( dos_newline ); return aLogEntry.makeStringAndClear(); } - + ::rtl::OUString SAL_CALL CsvFormatter::getTail( ) throw (RuntimeException) { return ::rtl::OUString(); @@ -340,22 +340,22 @@ namespace logging return sal_True; return sal_False; } - + ::rtl::OUString SAL_CALL CsvFormatter::getImplementationName() throw(RuntimeException) { return getImplementationName_static(); } - + Sequence< ::rtl::OUString > SAL_CALL CsvFormatter::getSupportedServiceNames() throw(RuntimeException) { return getSupportedServiceNames_static(); } - + ::rtl::OUString SAL_CALL CsvFormatter::getImplementationName_static() { return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.extensions.CsvFormatter" ) ); } - + Sequence< ::rtl::OUString > SAL_CALL CsvFormatter::getSupportedServiceNames_static() { Sequence< ::rtl::OUString > aServiceNames(1); diff --git a/extensions/source/logging/filehandler.cxx b/extensions/source/logging/filehandler.cxx index e0680441a85a..beeccbb7453b 100644 --- a/extensions/source/logging/filehandler.cxx +++ b/extensions/source/logging/filehandler.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -286,42 +286,42 @@ namespace logging OSL_VERIFY( m_aHandlerHelper.getEncoding( sEncoding ) ); return sEncoding; } - + //-------------------------------------------------------------------- void SAL_CALL FileHandler::setEncoding( const ::rtl::OUString& _rEncoding ) throw (RuntimeException) { MethodGuard aGuard( *this ); OSL_VERIFY( m_aHandlerHelper.setEncoding( _rEncoding ) ); } - + //-------------------------------------------------------------------- Reference< XLogFormatter > SAL_CALL FileHandler::getFormatter() throw (RuntimeException) { MethodGuard aGuard( *this ); return m_aHandlerHelper.getFormatter(); } - + //-------------------------------------------------------------------- void SAL_CALL FileHandler::setFormatter( const Reference< XLogFormatter >& _rxFormatter ) throw (RuntimeException) { MethodGuard aGuard( *this ); m_aHandlerHelper.setFormatter( _rxFormatter ); } - + //-------------------------------------------------------------------- ::sal_Int32 SAL_CALL FileHandler::getLevel() throw (RuntimeException) { MethodGuard aGuard( *this ); return m_aHandlerHelper.getLevel(); } - + //-------------------------------------------------------------------- void SAL_CALL FileHandler::setLevel( ::sal_Int32 _nLevel ) throw (RuntimeException) { MethodGuard aGuard( *this ); m_aHandlerHelper.setLevel( _nLevel ); } - + //-------------------------------------------------------------------- void SAL_CALL FileHandler::flush( ) throw (RuntimeException) { @@ -337,7 +337,7 @@ namespace logging m_pFile->sync(); OSL_ENSURE(res == ::osl::FileBase::E_None, "FileHandler::flush: Could not sync logfile to filesystem."); } - + //-------------------------------------------------------------------- ::sal_Bool SAL_CALL FileHandler::publish( const LogRecord& _rRecord ) throw (RuntimeException) { @@ -391,7 +391,7 @@ namespace logging { return getImplementationName_static(); } - + //-------------------------------------------------------------------- ::sal_Bool SAL_CALL FileHandler::supportsService( const ::rtl::OUString& _rServiceName ) throw(RuntimeException) { @@ -404,19 +404,19 @@ namespace logging return sal_True; return sal_False; } - + //-------------------------------------------------------------------- Sequence< ::rtl::OUString > SAL_CALL FileHandler::getSupportedServiceNames() throw(RuntimeException) { return getSupportedServiceNames_static(); } - + //-------------------------------------------------------------------- ::rtl::OUString SAL_CALL FileHandler::getImplementationName_static() { return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.extensions.FileHandler" ) ); } - + //-------------------------------------------------------------------- Sequence< ::rtl::OUString > SAL_CALL FileHandler::getSupportedServiceNames_static() { diff --git a/extensions/source/logging/log_module.cxx b/extensions/source/logging/log_module.cxx index c6b2eb677c0d..5cdf5e73723a 100644 --- a/extensions/source/logging/log_module.cxx +++ b/extensions/source/logging/log_module.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/logging/log_module.hxx b/extensions/source/logging/log_module.hxx index dfee11365350..dbc06816ccab 100644 --- a/extensions/source/logging/log_module.hxx +++ b/extensions/source/logging/log_module.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/logging/log_services.cxx b/extensions/source/logging/log_services.cxx index 9659849d0970..4cf0d54e13c0 100644 --- a/extensions/source/logging/log_services.cxx +++ b/extensions/source/logging/log_services.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/logging/logger.cxx b/extensions/source/logging/logger.cxx index 0f20d88753e0..64de34fc78b5 100644 --- a/extensions/source/logging/logger.cxx +++ b/extensions/source/logging/logger.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -94,7 +94,7 @@ namespace logging return sal_False; } } - + //==================================================================== //= EventLogger - declaration //==================================================================== @@ -217,7 +217,7 @@ namespace logging return true; } - + //-------------------------------------------------------------------- void EventLogger::impl_ts_logEvent_nothrow( const LogRecord& _rRecord ) { @@ -237,35 +237,35 @@ namespace logging { return m_sName; } - + //-------------------------------------------------------------------- ::sal_Int32 SAL_CALL EventLogger::getLevel() throw (RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); return m_nLogLevel; } - + //-------------------------------------------------------------------- void SAL_CALL EventLogger::setLevel( ::sal_Int32 _level ) throw (RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); m_nLogLevel = _level; } - + //-------------------------------------------------------------------- void SAL_CALL EventLogger::addLogHandler( const Reference< XLogHandler >& _rxLogHandler ) throw (RuntimeException) { if ( _rxLogHandler.is() ) m_aHandlers.addInterface( _rxLogHandler ); } - + //-------------------------------------------------------------------- void SAL_CALL EventLogger::removeLogHandler( const Reference< XLogHandler >& _rxLogHandler ) throw (RuntimeException) { if ( _rxLogHandler.is() ) m_aHandlers.removeInterface( _rxLogHandler ); } - + //-------------------------------------------------------------------- ::sal_Bool SAL_CALL EventLogger::isLoggable( ::sal_Int32 _nLevel ) throw (RuntimeException) { @@ -283,7 +283,7 @@ namespace logging osl_incrementInterlockedCount( &m_nEventNumber ) ) ); } - + //-------------------------------------------------------------------- void SAL_CALL EventLogger::logp( ::sal_Int32 _nLevel, const ::rtl::OUString& _rSourceClass, const ::rtl::OUString& _rSourceMethod, const ::rtl::OUString& _rMessage ) throw (RuntimeException) { @@ -302,13 +302,13 @@ namespace logging { return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.extensions.EventLogger" ) ); } - + //-------------------------------------------------------------------- ::sal_Bool EventLogger::supportsService( const ::rtl::OUString& _rServiceName ) throw(RuntimeException) { return lcl_supportsService_nothrow( *this, _rServiceName ); } - + //-------------------------------------------------------------------- Sequence< ::rtl::OUString > SAL_CALL EventLogger::getSupportedServiceNames() throw(RuntimeException) { @@ -331,13 +331,13 @@ namespace logging { return getImplementationName_static(); } - + //-------------------------------------------------------------------- ::sal_Bool SAL_CALL LoggerPool::supportsService( const ::rtl::OUString& _rServiceName ) throw(RuntimeException) { return lcl_supportsService_nothrow( *this, _rServiceName ); } - + //-------------------------------------------------------------------- Sequence< ::rtl::OUString > SAL_CALL LoggerPool::getSupportedServiceNames() throw(RuntimeException) { @@ -349,7 +349,7 @@ namespace logging { return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.extensions.LoggerPool" ) ); } - + //-------------------------------------------------------------------- Sequence< ::rtl::OUString > SAL_CALL LoggerPool::getSupportedServiceNames_static() { @@ -386,7 +386,7 @@ namespace logging return xLogger; } - + //-------------------------------------------------------------------- Reference< XLogger > SAL_CALL LoggerPool::getDefaultLogger( ) throw (RuntimeException) { diff --git a/extensions/source/logging/loggerconfig.cxx b/extensions/source/logging/loggerconfig.cxx index 048ede71a41e..e05c93e1ebf9 100644 --- a/extensions/source/logging/loggerconfig.cxx +++ b/extensions/source/logging/loggerconfig.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/logging/loggerconfig.hxx b/extensions/source/logging/loggerconfig.hxx index eb41a6e12f78..78157d8ad73a 100644 --- a/extensions/source/logging/loggerconfig.hxx +++ b/extensions/source/logging/loggerconfig.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/logging/loghandler.cxx b/extensions/source/logging/loghandler.cxx index 796cdd114192..a2c7411b390b 100644 --- a/extensions/source/logging/loghandler.cxx +++ b/extensions/source/logging/loghandler.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/logging/loghandler.hxx b/extensions/source/logging/loghandler.hxx index 235e7e850a6a..34f93d4c2824 100644 --- a/extensions/source/logging/loghandler.hxx +++ b/extensions/source/logging/loghandler.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -45,7 +45,7 @@ namespace logging //........................................................................ //==================================================================== - //= + //= //==================================================================== class LogHandlerHelper { diff --git a/extensions/source/logging/logrecord.cxx b/extensions/source/logging/logrecord.cxx index bbab43afe117..8ff2f94b1af1 100644 --- a/extensions/source/logging/logrecord.cxx +++ b/extensions/source/logging/logrecord.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/logging/logrecord.hxx b/extensions/source/logging/logrecord.hxx index 5e741df5788d..53c8f49f7d07 100644 --- a/extensions/source/logging/logrecord.hxx +++ b/extensions/source/logging/logrecord.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/logging/methodguard.hxx b/extensions/source/logging/methodguard.hxx index 5067cf5425ea..62b37f6706fc 100644 --- a/extensions/source/logging/methodguard.hxx +++ b/extensions/source/logging/methodguard.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/logging/plaintextformatter.cxx b/extensions/source/logging/plaintextformatter.cxx index 3ea85f415b7c..6d5591467960 100644 --- a/extensions/source/logging/plaintextformatter.cxx +++ b/extensions/source/logging/plaintextformatter.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -125,7 +125,7 @@ namespace logging aHeader.appendAscii( "\n" ); return aHeader.makeStringAndClear(); } - + //-------------------------------------------------------------------- ::rtl::OUString SAL_CALL PlainTextFormatter::format( const LogRecord& _rRecord ) throw (RuntimeException) { @@ -163,7 +163,7 @@ namespace logging return aLogEntry.makeStringAndClear(); } - + //-------------------------------------------------------------------- ::rtl::OUString SAL_CALL PlainTextFormatter::getTail( ) throw (RuntimeException) { @@ -183,25 +183,25 @@ namespace logging return sal_True; return sal_False; } - + //-------------------------------------------------------------------- ::rtl::OUString SAL_CALL PlainTextFormatter::getImplementationName() throw(RuntimeException) { return getImplementationName_static(); } - + //-------------------------------------------------------------------- Sequence< ::rtl::OUString > SAL_CALL PlainTextFormatter::getSupportedServiceNames() throw(RuntimeException) { return getSupportedServiceNames_static(); } - + //-------------------------------------------------------------------- ::rtl::OUString SAL_CALL PlainTextFormatter::getImplementationName_static() { return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.extensions.PlainTextFormatter" ) ); } - + //-------------------------------------------------------------------- Sequence< ::rtl::OUString > SAL_CALL PlainTextFormatter::getSupportedServiceNames_static() { diff --git a/extensions/source/macosx/spotlight/OOoContentDataParser.h b/extensions/source/macosx/spotlight/OOoContentDataParser.h index 537a1b2e49ed..b307bb3756cd 100644 --- a/extensions/source/macosx/spotlight/OOoContentDataParser.h +++ b/extensions/source/macosx/spotlight/OOoContentDataParser.h @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -32,13 +32,13 @@ @interface OOoContentDataParser : NSObject { // indicates if we are interested in an element's content BOOL shouldReadCharacters; - + // the MD importer's values NSMutableDictionary *mdiValues; - + // all of the text inside a document NSMutableString *textContent; - + // the current element's content NSMutableString *runningTextContent; } diff --git a/extensions/source/macosx/spotlight/OOoMetaDataParser.h b/extensions/source/macosx/spotlight/OOoMetaDataParser.h index d22e10f128a2..fdeb61d15c67 100644 --- a/extensions/source/macosx/spotlight/OOoMetaDataParser.h +++ b/extensions/source/macosx/spotlight/OOoMetaDataParser.h @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -34,7 +34,7 @@ BOOL shouldReadCharacters; //indicates if the current element is a custom metadata tag BOOL isCustom; - + NSMutableDictionary *metaValues; NSMutableString *textCurrentElement; NSString *customAttribute; diff --git a/extensions/source/macosx/spotlight/OOoSpotlightImporter.h b/extensions/source/macosx/spotlight/OOoSpotlightImporter.h index 78493590b177..6fec52fae722 100644 --- a/extensions/source/macosx/spotlight/OOoSpotlightImporter.h +++ b/extensions/source/macosx/spotlight/OOoSpotlightImporter.h @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/macosx/spotlight/ioapi.h b/extensions/source/macosx/spotlight/ioapi.h index 3bfb93d551e2..4b10726a7dad 100644 --- a/extensions/source/macosx/spotlight/ioapi.h +++ b/extensions/source/macosx/spotlight/ioapi.h @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/macosx/spotlight/mdimporter/schema.xml b/extensions/source/macosx/spotlight/mdimporter/schema.xml index f0b634475a81..06457c86fca2 100644 --- a/extensions/source/macosx/spotlight/mdimporter/schema.xml +++ b/extensions/source/macosx/spotlight/mdimporter/schema.xml @@ -1,11 +1,11 @@ <?xml version="1.0" encoding="UTF-8"?> - + <schema version="1.0" xmlns="http://www.apple.com/metadata" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.apple.com/metadata file:///System/Library/Frameworks/CoreServices.framework/Frameworks/Metadata.framework/Resources/MetadataSchema.xsd"> <note> OpenOffice.org allows the user to enter 4 pieces of custom information in the document's metadata. - These metadata fields are described here for Spotlight's use. + These metadata fields are described here for Spotlight's use. </note> <attributes> <attribute name="org_openoffice_opendocument_custominfo1" type="CFString"/> diff --git a/extensions/source/macosx/spotlight/unzip.h b/extensions/source/macosx/spotlight/unzip.h index a513d0dcd37f..e710cd84a0d6 100644 --- a/extensions/source/macosx/spotlight/unzip.h +++ b/extensions/source/macosx/spotlight/unzip.h @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -78,7 +78,7 @@ extern "C" { #endif #include <zlib.h> - + #include "ioapi.h" #if defined(STRICTUNZIP) || defined(STRICTZIPUNZIP) diff --git a/extensions/source/nsplugin/source/npshell.cxx b/extensions/source/nsplugin/source/npshell.cxx index d009774aeb25..d19b7b6d2482 100644 --- a/extensions/source/nsplugin/source/npshell.cxx +++ b/extensions/source/nsplugin/source/npshell.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/nsplugin/source/npshell.hxx b/extensions/source/nsplugin/source/npshell.hxx index 8af8bc687535..e3e44c93ac09 100644 --- a/extensions/source/nsplugin/source/npshell.hxx +++ b/extensions/source/nsplugin/source/npshell.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/nsplugin/source/ns_debug.hxx b/extensions/source/nsplugin/source/ns_debug.hxx index 83dc5a695534..d2ee5b0bd2cd 100644 --- a/extensions/source/nsplugin/source/ns_debug.hxx +++ b/extensions/source/nsplugin/source/ns_debug.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/nsplugin/source/nsp_func.hxx b/extensions/source/nsplugin/source/nsp_func.hxx index 566236a24ad3..c9ebbc7d747c 100644 --- a/extensions/source/nsplugin/source/nsp_func.hxx +++ b/extensions/source/nsplugin/source/nsp_func.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -49,7 +49,7 @@ typedef int NSP_PIPE_FD; #define NSP_Write_Pipe(a, b, c, d) write(a, b, c) #define NSP_Read_Pipe(a, b, c, d) read(a, b, c) -//for socket +//for socket #define NSP_CloseSocket close //for sleep @@ -86,13 +86,13 @@ SECURITY_ATTRIBUTES NSP_pipe_access = { sizeof(SECURITY_ATTRIBUTES), NULL, TRUE //for execl() #define NSP_CreateProcess(a, b ) CreateProcess(a, b, NULL, NULL, TRUE, 0, NULL, NULL, NULL, NULL) -//for socket +//for socket #define NSP_CloseSocket closesocket //for sleep #define NSP_Sleep(a) Sleep(a*1000) //for mutex -#define NSP_Mute_Obj HANDLE +#define NSP_Mute_Obj HANDLE #define NSP_New_Mute_Obj() CreateMutex (NULL, FALSE, NULL) #define NSP_Lock_Mute_Obj(a) WaitForSingleObject(a, INFINITE) #define NSP_Unlock_Mute_Obj(a) ReleaseMutex(a) diff --git a/extensions/source/nsplugin/source/nsp_windows.cxx b/extensions/source/nsplugin/source/nsp_windows.cxx index fe9060d134b1..85cabfbb278c 100644 --- a/extensions/source/nsplugin/source/nsp_windows.cxx +++ b/extensions/source/nsplugin/source/nsp_windows.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -39,28 +39,28 @@ int NSP_ResetWinStyl(long hParent) { int ret = 0; -#ifdef WNT +#ifdef WNT LONG dOldStyl = GetWindowLong( (HWND)hParent, GWL_STYLE); ret = dOldStyl; - + if(ret != 0) { LONG dNewStyl = dOldStyl|WS_CLIPCHILDREN; if(0 == SetWindowLong((HWND)hParent, GWL_STYLE, dNewStyl)) ret = 0; } -#endif +#endif return ret; - + } int NSP_RestoreWinStyl(long hParent, long dOldStyle) { int ret = 0; -#ifdef WNT +#ifdef WNT ret = SetWindowLong((HWND)hParent, GWL_STYLE, dOldStyle); -#endif - return ret; +#endif + return ret; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/extensions/source/nsplugin/source/nsp_windows.hxx b/extensions/source/nsplugin/source/nsp_windows.hxx index 1a2d49711973..4ed2f89c3906 100644 --- a/extensions/source/nsplugin/source/nsp_windows.hxx +++ b/extensions/source/nsplugin/source/nsp_windows.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -29,7 +29,7 @@ #ifndef __NSP_WINDOWS_HXX__ #define __NSP_WINDOWS_HXX__ - + int NSP_ResetWinStyl(long hParent); int NSP_RestoreWinStyl(long hParent, long dOldStyle); diff --git a/extensions/source/nsplugin/source/nsplugin_oo.rc b/extensions/source/nsplugin/source/nsplugin_oo.rc index 42a2a642e023..9d30de3918a1 100644 --- a/extensions/source/nsplugin/source/nsplugin_oo.rc +++ b/extensions/source/nsplugin/source/nsplugin_oo.rc @@ -26,5 +26,5 @@ ************************************************************************/ #define ADDITIONAL_VERINFO1 value "FileExtents", "sdc|sds|sda|sdd|sdp|smf|vor|sgl|sdw|sxc|stc|sxd|std|sxi|sti|sxm|sxw|sxg|stw|odt|ott|odm|oth|ods|ots|odg|otg|odp|otp|odf\0"\ value "FileOpenName", "StarCalc 3.0 - 5.0|StarChart 3.0 - 5.0|StarDraw 3.0 - 5.0|StarImpress 3.0 - 5.0|StarImpress-packed 3.0 - 5.0|StarMath 3.0 - 5.0|StarWriter Template 3.0 - 5.0|StarWriter Global 3.0 - 5.0|StarWriter 3.0 - 5.0|StarOffice 6.0/7 Spreadsheet|StarOffice 6.0/7 Spreadsheet Template|StarOffice 6.0/7 Drawing|StarOffice 6.0/7 Drawing Template|StarOffice 6.0/7 Presentation|StarOffice 6.0/7 Presentation Template|StarOffice 6.0/7 Formula|StarOffice 6.0/7 Text Document|StarOffice 6.0/7 Master Document|StarOffice 6.0/7 Text Document Template|OpenDocument Text|OpenDocument Text Template|OpenDocument Master Document|HTML Document Template|OpenDocument Spreadsheet|OpenDocument Spreadsheet Template|OpenDocument Drawing|OpenDocument Drawing Template|OpenDocument Presentation|OpenDocument Presentation Template|OpenDocument Formula\0" -#define ADDITIONAL_VERINFO2 value "FileDescription", "OpenOffice.org Plug-in handles all its documents" value "ProductName", "OpenOffice.org Plug-in" value "MIMEType", "application/vnd.stardivision.calc|application/vnd.stardivision.chart|application/vnd.stardivision.draw|application/vnd.stardivision.impress|application/vnd.stardivision.impress-packed|application/vnd.stardivision.math|application/vnd.stardivision.writer|application/vnd.stardivision.writer-global|application/vnd.staroffice.writer|application/vnd.sun.xml.calc|application/vnd.sun.xml.calc.template|application/vnd.sun.xml.draw|application/vnd.sun.xml.draw.template|" +#define ADDITIONAL_VERINFO2 value "FileDescription", "LibreOffice Plug-in handles all its documents" value "ProductName", "LibreOffice Plug-in" value "MIMEType", "application/vnd.stardivision.calc|application/vnd.stardivision.chart|application/vnd.stardivision.draw|application/vnd.stardivision.impress|application/vnd.stardivision.impress-packed|application/vnd.stardivision.math|application/vnd.stardivision.writer|application/vnd.stardivision.writer-global|application/vnd.staroffice.writer|application/vnd.sun.xml.calc|application/vnd.sun.xml.calc.template|application/vnd.sun.xml.draw|application/vnd.sun.xml.draw.template|" #define ADDITIONAL_VERINFO3 "application/vnd.sun.xml.impress|application/vnd.sun.xml.impress.template|application/vnd.sun.xml.math|application/vnd.sun.xml.writer|application/vnd.sun.xml.writer.global|application/vnd.sun.xml.writer.template|application/vnd.oasis.opendocument.text|application/vnd.oasis.opendocument.text-template|application/vnd.oasis.opendocument.text-master|application/vnd.oasis.opendocument.text-web|application/vnd.oasis.opendocument.spreadsheet|application/vnd.oasis.opendocument.spreadsheet-template|application/vnd.oasis.opendocument.graphics|application/vnd.oasis.opendocument.graphics-template|application/vnd.oasis.opendocument.presentation|application/vnd.oasis.opendocument.presentation-template|application/vnd.oasis.opendocument.formula\0" diff --git a/extensions/source/nsplugin/source/so_closelistener.cxx b/extensions/source/nsplugin/source/so_closelistener.cxx index 3b99747b104b..4fb26e593669 100644 --- a/extensions/source/nsplugin/source/so_closelistener.cxx +++ b/extensions/source/nsplugin/source/so_closelistener.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/nsplugin/source/so_closelistener.hxx b/extensions/source/nsplugin/source/so_closelistener.hxx index 733381544399..7451c44b8203 100644 --- a/extensions/source/nsplugin/source/so_closelistener.hxx +++ b/extensions/source/nsplugin/source/so_closelistener.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -49,7 +49,7 @@ public: virtual void SAL_CALL notifyClosing( const ::com::sun::star::lang::EventObject& aEvent ) throw ( ::com::sun::star::uno::RuntimeException ) ; virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& aEvent ) throw ( ::com::sun::star::uno::RuntimeException ) ; -}; +}; #endif diff --git a/extensions/source/nsplugin/source/so_env.cxx b/extensions/source/nsplugin/source/so_env.cxx index bf782a74933f..8f8e436f0d7d 100644 --- a/extensions/source/nsplugin/source/so_env.cxx +++ b/extensions/source/nsplugin/source/so_env.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -110,7 +110,7 @@ restoreUTF8(char *pPath) unsigned char *s, *d; #define XDIGIT(c) ((c) <= '9' ? (c) - '0' : ((c) & 0x4F) - 'A' + 10) - + s = d = (unsigned char *)pPath; do { if (*s == '%' && s[1] && s[2]) { diff --git a/extensions/source/nsplugin/source/so_env.hxx b/extensions/source/nsplugin/source/so_env.hxx index 5da85f23c467..9737425f428e 100644 --- a/extensions/source/nsplugin/source/so_env.hxx +++ b/extensions/source/nsplugin/source/so_env.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -53,7 +53,7 @@ #ifdef UNIX #define STAROFFICE_VERSION_FILE "/.sversionrc" #define STAROFFICE_EXE_FILE_NAME "soffice" -#endif +#endif #ifdef WNT #define STAROFFICE_VERSION_FILE "\\sversion.ini" #define STAROFFICE_EXE_FILE_NAME "soffice.exe" @@ -72,7 +72,7 @@ const char* findInstallDir(); // return SO program dir absolute path, like "/home/build/staroffice/program" const char* findProgramDir(); - + #ifdef WNT // return SO executable absolute path, like "/home/build/staroffice/program/soffice" const char* findSofficeExecutable(); diff --git a/extensions/source/nsplugin/source/so_instance.cxx b/extensions/source/nsplugin/source/so_instance.cxx index f6320c22f33e..b94d2958a815 100644 --- a/extensions/source/nsplugin/source/so_instance.cxx +++ b/extensions/source/nsplugin/source/so_instance.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -36,15 +36,15 @@ #include <com/sun/star/awt/XVclWindowPeer.hpp> #include <com/sun/star/util/XCloseable.hpp> #include <com/sun/star/lang/DisposedException.hpp> -#include <com/sun/star/ucb/XSimpleFileAccess.hpp> -#include <com/sun/star/presentation/XPresentation.hpp> -#include <com/sun/star/presentation/XPresentationSupplier.hpp> +#include <com/sun/star/ucb/XSimpleFileAccess.hpp> +#include <com/sun/star/presentation/XPresentation.hpp> +#include <com/sun/star/presentation/XPresentationSupplier.hpp> #include <tools/debug.hxx> #include <tools/color.hxx> #include <vcl/window.hxx> #include <rtl/textenc.h> #include <rtl/locale.h> -#include <osl/nlsupport.h> +#include <osl/nlsupport.h> #include <stdio.h> #include <stdlib.h> @@ -84,12 +84,12 @@ SoPluginInstance::SoPluginInstance(long pParent, Reference< XMultiServiceFactory m_nHeight = 0; m_nX = 0; m_nY = 0; - m_nFlag = 15; + m_nFlag = 15; m_bInit = sal_False; m_sURL = rtl::OUString::createFromAscii(""); m_hParent = 0; m_pParent = pParent; - m_dParentStyl = 0; + m_dParentStyl = 0; mxRemoteMSF = xMSF; } @@ -102,8 +102,8 @@ sal_Bool SoPluginInstance::SetURL(char* aURL) debug_fprintf(NSP_LOG_APPEND, "SoPluginInstance::SetURL %s\n", aURL); sal_uInt16 encoding = 11; - rtl_Locale* pLocale = NULL; - osl_getProcessLocale(&pLocale); + rtl_Locale* pLocale = NULL; + osl_getProcessLocale(&pLocale); encoding = osl_getTextEncodingFromLocale(pLocale); m_sURL = ::rtl::OUString(aURL, strlen(aURL), encoding); @@ -120,7 +120,7 @@ sal_Bool SoPluginInstance::LoadDocument(NSP_HWND hParent) { debug_fprintf(NSP_LOG_APPEND, "only reset windows size\n"); m_xUnoWin->setPosSize( m_nX, m_nY, m_nWidth, m_nHeight, m_nFlag ); - debug_fprintf(NSP_LOG_APPEND, "set windows to x:%d y:%d w:%d h%d falg:%d\n", + debug_fprintf(NSP_LOG_APPEND, "set windows to x:%d y:%d w:%d h%d falg:%d\n", m_nX, m_nY, m_nWidth, m_nHeight, m_nFlag); return sal_True; } @@ -135,7 +135,7 @@ sal_Bool SoPluginInstance::LoadDocument(NSP_HWND hParent) try { // try to create netscape plugin window - Reference< awt::XToolkit > xToolkit( + Reference< awt::XToolkit > xToolkit( mxRemoteMSF->createInstance( ::rtl::OUString::createFromAscii("com.sun.star.awt.Toolkit") ), uno::UNO_QUERY ); if( !xToolkit.is() ) @@ -143,7 +143,7 @@ sal_Bool SoPluginInstance::LoadDocument(NSP_HWND hParent) debug_fprintf(NSP_LOG_APPEND, "Can not create Toolkit!\n"); return sal_False; } - + // prepare parameters for plugin window css::uno::Any hwndParent = css::uno::makeAny((sal_Int32)hParent); #ifdef UNIX @@ -152,10 +152,10 @@ sal_Bool SoPluginInstance::LoadDocument(NSP_HWND hParent) #ifdef WNT sal_Int16 nWindowType = css::lang::SystemDependent::SYSTEM_WIN32; #endif //end of WNT - + Reference< awt::XSystemChildFactory > xToolkitSystemChildFactory(xToolkit, uno::UNO_QUERY); if (!xToolkitSystemChildFactory.is()) - { + { debug_fprintf(NSP_LOG_APPEND, "print by Nsplugin, get xToolkitSystemChildFactory failure.\n"); return sal_False; } @@ -163,8 +163,8 @@ sal_Bool SoPluginInstance::LoadDocument(NSP_HWND hParent) debug_fprintf(NSP_LOG_APPEND, "print by Nsplugin, try to create plugin container window HWIN:%ld.\n", hParent); // create the plugin window - Reference< awt::XWindowPeer > xNewWinPeer = - xToolkitSystemChildFactory->createSystemChild( hwndParent, + Reference< awt::XWindowPeer > xNewWinPeer = + xToolkitSystemChildFactory->createSystemChild( hwndParent, css::uno::Sequence<sal_Int8>(), nWindowType ); if ( !xNewWinPeer.is() ) { @@ -184,7 +184,7 @@ sal_Bool SoPluginInstance::LoadDocument(NSP_HWND hParent) xNewWinPeer->setBackground( COL_GRAY ); m_xUnoWin->setVisible( sal_True ); m_xUnoWin->setPosSize( m_nX, m_nY, m_nWidth, m_nHeight, m_nFlag ); - debug_fprintf(NSP_LOG_APPEND, "set windows to x:%d y:%d w:%d h%d falg:%d\n", + debug_fprintf(NSP_LOG_APPEND, "set windows to x:%d y:%d w:%d h%d falg:%d\n", m_nX, m_nY, m_nWidth, m_nHeight, m_nFlag); // create frame @@ -199,7 +199,7 @@ sal_Bool SoPluginInstance::LoadDocument(NSP_HWND hParent) // initialize frame m_xFrame->initialize( m_xUnoWin ); - + try { // currently ignore errors in this code @@ -211,9 +211,9 @@ sal_Bool SoPluginInstance::LoadDocument(NSP_HWND hParent) } catch( uno::Exception& ) {} - + // get frames supplier - Reference< frame::XFramesSupplier > m_xFramesSupplier( + Reference< frame::XFramesSupplier > m_xFramesSupplier( mxRemoteMSF->createInstance( ::rtl::OUString::createFromAscii("com.sun.star.frame.Desktop") ), uno::UNO_QUERY ); if ( !m_xFramesSupplier.is() ) @@ -221,7 +221,7 @@ sal_Bool SoPluginInstance::LoadDocument(NSP_HWND hParent) debug_fprintf(NSP_LOG_APPEND, "can not get desktop\n"); return sal_False; } - + // get frames m_xFrames = m_xFramesSupplier->getFrames(); if ( !m_xFrames.is() ) @@ -229,10 +229,10 @@ sal_Bool SoPluginInstance::LoadDocument(NSP_HWND hParent) debug_fprintf(NSP_LOG_APPEND, "can not get frames from FramesSupplier\n"); return sal_False; } - + // append m_xFrame to m_xFrames m_xFrames->append( m_xFrame ); - + // create XComponentLoader Reference< frame::XComponentLoader > xLoader( m_xFrame, uno::UNO_QUERY ); if ( !xLoader.is() ) @@ -240,7 +240,7 @@ sal_Bool SoPluginInstance::LoadDocument(NSP_HWND hParent) debug_fprintf(NSP_LOG_APPEND, "can not get ComponentLoader to load URL\n"); return sal_False; } - + //create stream for the document Reference< ::com::sun::star::ucb::XSimpleFileAccess > xSimpleFileAccess( mxRemoteMSF->createInstance( ::rtl::OUString::createFromAscii("com.sun.star.ucb.SimpleFileAccess") ), @@ -248,14 +248,14 @@ sal_Bool SoPluginInstance::LoadDocument(NSP_HWND hParent) if(!xSimpleFileAccess.is()) { debug_fprintf(NSP_LOG_APPEND, "can not create SimpleFileAccess to load URL\n"); - return sal_False; + return sal_False; } - Reference<io::XInputStream> xInputStream = xSimpleFileAccess->openFileRead( m_sURL ); - + Reference<io::XInputStream> xInputStream = xSimpleFileAccess->openFileRead( m_sURL ); + if(!xInputStream.is()) { debug_fprintf(NSP_LOG_APPEND, "can not create XInputStream for URL\n"); - return sal_False; + return sal_False; } // prepare to load document @@ -271,35 +271,35 @@ sal_Bool SoPluginInstance::LoadDocument(NSP_HWND hParent) setPropValues[ 3 ].Name = "FilterName"; setPropValues[ 3 ].Value = "Flat XML File";*/ - debug_fprintf(NSP_LOG_APPEND, "try to load copy of URL from local file %s:%d\n", - ::rtl::OUStringToOString( m_sURL, RTL_TEXTENCODING_ASCII_US ).getStr( ), + debug_fprintf(NSP_LOG_APPEND, "try to load copy of URL from local file %s:%d\n", + ::rtl::OUStringToOString( m_sURL, RTL_TEXTENCODING_ASCII_US ).getStr( ), m_sURL.getLength() ); - + // load document -/* +/* m_xComponent = xLoader->loadComponentFromURL( - OUString(RTL_CONSTASCII_USTRINGPARAM("private:stream")), //m_sURL, + OUString(RTL_CONSTASCII_USTRINGPARAM("private:stream")), //m_sURL, m_xFrame->getName(), 0, setPropValues ); - */ + */ Sequence< ::com::sun::star::beans::PropertyValue > setPropValues2(3); setPropValues2[0].Name = OUString( RTL_CONSTASCII_USTRINGPARAM("ViewOnly") ); setPropValues2[0].Value <<= sal_True; setPropValues2[1].Name = OUString( RTL_CONSTASCII_USTRINGPARAM("ReadOnly") ); - setPropValues2[1].Value <<= sal_True; + setPropValues2[1].Value <<= sal_True; setPropValues2[2].Name = OUString( RTL_CONSTASCII_USTRINGPARAM("AsTemplate") ); - setPropValues2[2].Value <<= sal_False; + setPropValues2[2].Value <<= sal_False; m_xComponent = xLoader->loadComponentFromURL( - m_sURL, - m_xFrame->getName(), 0, setPropValues2 ); - + m_sURL, + m_xFrame->getName(), 0, setPropValues2 ); + if ( !m_xComponent.is() ) { debug_fprintf(NSP_LOG_APPEND, "print by Nsplugin, Load Componment error\n"); return sal_False; - } - + } + // register the closelistener that will prevent closing of the component Reference< util::XCloseable > xCloseable( m_xFrame, uno::UNO_QUERY ); if ( xCloseable.is() ) @@ -315,7 +315,7 @@ sal_Bool SoPluginInstance::LoadDocument(NSP_HWND hParent) debug_fprintf(NSP_LOG_APPEND, "load document success\n"); // create frame::XDispatchHelper and frame::XDispatchProvider - m_xDispatcher = Reference< frame::XDispatchHelper > ( + m_xDispatcher = Reference< frame::XDispatchHelper > ( mxRemoteMSF->createInstance(::rtl::OUString::createFromAscii("com.sun.star.frame.DispatchHelper")), uno::UNO_QUERY ); if(!m_xDispatcher.is()) @@ -327,23 +327,23 @@ sal_Bool SoPluginInstance::LoadDocument(NSP_HWND hParent) if(!m_xDispatchProvider.is()) { debug_fprintf(NSP_LOG_APPEND, "m_xDispatchProvider can not be getten\n"); - return sal_False; + return sal_False; } //try to enable toolbar and tool windows Sequence< ::com::sun::star::beans::PropertyValue > propertyValue(1); propertyValue[0].Name = OUString( RTL_CONSTASCII_USTRINGPARAM("FunctionBarVisible") ); propertyValue[0].Value <<= sal_True; - m_xDispatcher->executeDispatch(m_xDispatchProvider, - ::rtl::OUString::createFromAscii(".uno:FunctionBarVisible"), + m_xDispatcher->executeDispatch(m_xDispatchProvider, + ::rtl::OUString::createFromAscii(".uno:FunctionBarVisible"), m_xFrame->getName(), 0, - propertyValue ); - + propertyValue ); + // reset window style of parent window #ifdef WNT - m_dParentStyl = ::NSP_ResetWinStyl (m_hParent); + m_dParentStyl = ::NSP_ResetWinStyl (m_hParent); #endif - m_bInit = sal_True; + m_bInit = sal_True; try { @@ -382,10 +382,10 @@ sal_Bool SoPluginInstance::SetWindow(NSP_HWND hParent, int x, int y, int w, int { m_hParent = hParent; - debug_fprintf(NSP_LOG_APPEND, "SoPluginInstance::SetWindow %s : %d\n", - ::rtl::OUStringToOString(m_sURL, RTL_TEXTENCODING_ASCII_US).getStr(), + debug_fprintf(NSP_LOG_APPEND, "SoPluginInstance::SetWindow %s : %d\n", + ::rtl::OUStringToOString(m_sURL, RTL_TEXTENCODING_ASCII_US).getStr(), m_sURL.getLength() ); - m_nWidth = w; + m_nWidth = w; m_nHeight =h; m_nX = x; m_nY = y; @@ -406,7 +406,7 @@ sal_Bool SoPluginInstance::SetWindow(NSP_HWND hParent, int x, int y, int w, int mxRemoteMSF = Reference< XMultiServiceFactory >(); m_bInit = sal_False; bRetval = LoadDocument(hParent); - debug_fprintf(NSP_LOG_APPEND, "load document again, return %d\n", bRetval); + debug_fprintf(NSP_LOG_APPEND, "load document again, return %d\n", bRetval); } } @@ -415,16 +415,16 @@ sal_Bool SoPluginInstance::SetWindow(NSP_HWND hParent, int x, int y, int w, int sal_Bool SoPluginInstance::Destroy(void) { -#ifdef WNT +#ifdef WNT if(m_dParentStyl != 0) NSP_RestoreWinStyl(m_hParent, m_dParentStyl); #endif -// if(m_xDispatcher.is()){ -// m_xDispatcher->executeDispatch(m_xDispatchProvider, -// ::rtl::OUString::createFromAscii(".uno:CloseFrame"), +// if(m_xDispatcher.is()){ +// m_xDispatcher->executeDispatch(m_xDispatchProvider, +// ::rtl::OUString::createFromAscii(".uno:CloseFrame"), // ::rtl::OUString::createFromAscii("_top"), 0, // Sequence< ::com::sun::star::beans::PropertyValue >() ); -// } +// } uno::Reference< util::XCloseable > xCloseable( m_xFrame, uno::UNO_QUERY ); @@ -451,7 +451,7 @@ sal_Bool SoPluginInstance::Destroy(void) ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.embed.DocumentCloser" ) ), aArgs ), uno::UNO_QUERY_THROW ); - + xDocumentCloser->dispose(); // this call should close the document } catch( uno::Exception& ) @@ -479,19 +479,19 @@ sal_Bool SoPluginInstance::Destroy(void) m_xFrames = Reference< frame::XFrames >(); m_xDispatcher = Reference< frame::XDispatchHelper >(); m_xDispatchProvider = Reference< frame::XDispatchProvider >(); - return sal_True; -} + return sal_True; +} sal_Bool SoPluginInstance::Print(void) { if(!m_xDispatcher.is()) return sal_False; - + Sequence< ::com::sun::star::beans::PropertyValue > propertyValue(1); - m_xDispatcher->executeDispatch(m_xDispatchProvider, - ::rtl::OUString::createFromAscii(".uno:PrintDefault"), + m_xDispatcher->executeDispatch(m_xDispatchProvider, + ::rtl::OUString::createFromAscii(".uno:PrintDefault"), m_xFrame->getName(), 0, - propertyValue ); + propertyValue ); return sal_True; } diff --git a/extensions/source/nsplugin/source/so_instance.hxx b/extensions/source/nsplugin/source/so_instance.hxx index 54974799f9a4..07b73ba8c1d6 100644 --- a/extensions/source/nsplugin/source/so_instance.hxx +++ b/extensions/source/nsplugin/source/so_instance.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -55,7 +55,7 @@ typedef sal_Int32 NSP_HWND; class PluginDocumentClosePreventer; -class SoPluginInstance +class SoPluginInstance { private: @@ -63,7 +63,7 @@ private: static ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > mxRemoteMSF; // Dir where Soffice is in, ie. /Soffice7/program static char sSO_Dir[NPP_PATH_MAX]; - int m_nWidth; + int m_nWidth; int m_nHeight; int m_nX; int m_nY; @@ -71,7 +71,7 @@ private: ::rtl::OUString m_sURL; // URL of the document to be loaded sal_Bool m_bInit; // If the Plugin instance is initilaized. NSP_HWND m_hParent; // Windows handle of parent window - long m_pParent; // ID of this instance - get from NPP + long m_pParent; // ID of this instance - get from NPP // StarOffice window ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > m_xUnoWin; // StarOffice component window @@ -90,14 +90,14 @@ private: ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloseListener > m_xCloseListener; sal_Bool LoadDocument(NSP_HWND hParent); - + long m_dParentStyl; // Old Windows style of parent window - + public: SoPluginInstance(long iInstance, ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xMSF); virtual ~SoPluginInstance(void); - virtual sal_Bool SetURL(char* aURL); + virtual sal_Bool SetURL(char* aURL); virtual sal_Bool IsInit(void){return m_bInit;}; virtual sal_Bool SetWindow(NSP_HWND hParent, int x, int y, int w, int h) ; virtual sal_Bool Destroy(void) ; diff --git a/extensions/source/nsplugin/source/so_main.cxx b/extensions/source/nsplugin/source/so_main.cxx index 76381fab9c61..eaead5ff5303 100644 --- a/extensions/source/nsplugin/source/so_main.cxx +++ b/extensions/source/nsplugin/source/so_main.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -42,7 +42,7 @@ #endif #pragma warning (push,1) #pragma warning (disable:4668) -#define WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN #include <windows.h> #include <winsock2.h> #include <stdlib.h> @@ -98,23 +98,23 @@ using namespace ::com::sun::star::uno; SoPluginInstance* lpInstance[MAX_NODE_NUM]; -static NSP_PIPE_FD la_read_fd = 0; +static NSP_PIPE_FD la_read_fd = 0; static char const * progdir = NULL; long int NSP_ReadFromPipe(NSP_PIPE_FD fp, void* buf, unsigned long int len) { unsigned long int len_unix = 0, len_wnt = 0; - + len_unix = NSP_Read_Pipe(fp, buf, len, &len_wnt); #ifdef UNIX (void)len_wnt; return len_unix; -#endif //end of UNIX +#endif //end of UNIX #ifdef WNT - return len_wnt; -#endif //end of WNT - + return len_wnt; +#endif //end of WNT + } int find_free_node() @@ -131,7 +131,7 @@ int find_cur_node(long cur_id) { for(int i=0; i<MAX_NODE_NUM; i++) { - if(lpInstance[i] == NULL) + if(lpInstance[i] == NULL) continue; if(cur_id == lpInstance[i]->GetParent()) return i; @@ -144,9 +144,9 @@ sal_Bool dump_plugin_message(PLUGIN_MSG* pMsg) if (!pMsg) return sal_False; debug_fprintf(NSP_LOG_APPEND, "NSPlugin Message: msg_id:%d; instance_id:%d;wnd_id:%d;wnd_x:%d;wnd_y:%d;wnd_w:%d;wnd_h:%d; url:%s\n", - pMsg->msg_id, pMsg->instance_id, pMsg->wnd_id, + pMsg->msg_id, pMsg->instance_id, pMsg->wnd_id, pMsg->wnd_x, pMsg->wnd_y, pMsg->wnd_w, pMsg->wnd_h, pMsg->url); - return sal_True; + return sal_True; } int Set_Window(PLUGIN_MSG* pMsg) @@ -159,7 +159,7 @@ int Set_Window(PLUGIN_MSG* pMsg) pMsg->wnd_x, pMsg->wnd_y, pMsg->wnd_w, pMsg->wnd_h)) return 0; else - return -1; + return -1; } int Set_URL(PLUGIN_MSG* pMsg) @@ -171,7 +171,7 @@ int Set_URL(PLUGIN_MSG* pMsg) if(lpInstance[cur_no]->SetURL(pMsg->url)) return 0; else - return -1; + return -1; } int New_Instance(PLUGIN_MSG* pMsg, Reference< lang::XMultiServiceFactory > xMSF) @@ -294,7 +294,7 @@ Reference< lang::XMultiServiceFactory > SAL_CALL start_office(NSP_PIPE_FD read_f #endif //end of WNT // create default local component context - Reference< XComponentContext > xLocalContext( + Reference< XComponentContext > xLocalContext( defaultBootstrap_InitialComponentContext() ); if ( !xLocalContext.is() ) { @@ -341,14 +341,14 @@ Reference< lang::XMultiServiceFactory > SAL_CALL start_office(NSP_PIPE_FD read_f OSL_ASSERT( buf.getLength() == 0 ); buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "uno:pipe,name=" ) ); buf.append( aPluginPipeName ); - buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( + buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( ";urp;StarOffice.ComponentContext" ) ); OUString sConnectString( buf.makeStringAndClear() ); try { // try to connect to office, no need to start instance again if office already started - xRemoteContext.set( + xRemoteContext.set( xUrlResolver->resolve( sConnectString ), UNO_QUERY_THROW ); debug_fprintf(NSP_LOG_APPEND, "Staroffice already start\n"); return Reference< lang::XMultiServiceFactory >(xRemoteContext->getServiceManager(), UNO_QUERY); @@ -375,7 +375,7 @@ Reference< lang::XMultiServiceFactory > SAL_CALL start_office(NSP_PIPE_FD read_f NULL); _exit(255); } -#else +#else (void) read_fd; /* avoid warning about unused parameter */ Security sec; oslProcess hProcess = 0; @@ -413,7 +413,7 @@ Reference< lang::XMultiServiceFactory > SAL_CALL start_office(NSP_PIPE_FD read_f try { // try to connect to office - xRemoteContext.set( + xRemoteContext.set( xUrlResolver->resolve( sConnectString ), UNO_QUERY_THROW ); return Reference< lang::XMultiServiceFactory >(xRemoteContext->getServiceManager(), UNO_QUERY); } @@ -459,7 +459,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) fd_pipe[0] = (NSP_PIPE_FD) iPipe[0] ; fd_pipe[1] = (NSP_PIPE_FD) iPipe[1] ; NSP_Close_Pipe(fd_pipe[1]); - + la_read_fd = fd_pipe[0]; if(la_read_fd < 0) { diff --git a/extensions/source/nsplugin/source/so_msg.hxx b/extensions/source/nsplugin/source/so_msg.hxx index 8a539ed72a87..162bb40f04ec 100644 --- a/extensions/source/nsplugin/source/so_msg.hxx +++ b/extensions/source/nsplugin/source/so_msg.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -34,7 +34,7 @@ enum msg_type SO_SET_WINDOW, // 1 SO_SET_URL, // 2 SO_NEW_INSTANCE, // 3 - SO_DESTROY, // 4 + SO_DESTROY, // 4 SO_SHUTDOWN, // 5 SO_PRINT // 6 }; diff --git a/extensions/source/ole/comifaces.hxx b/extensions/source/ole/comifaces.hxx index 70308715ef4d..d33f350b8f70 100644 --- a/extensions/source/ole/comifaces.hxx +++ b/extensions/source/ole/comifaces.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/ole/jscriptclasses.cxx b/extensions/source/ole/jscriptclasses.cxx index b2f75f1e667c..5b5083a0c848 100644 --- a/extensions/source/ole/jscriptclasses.cxx +++ b/extensions/source/ole/jscriptclasses.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -59,13 +59,13 @@ STDMETHODIMP JScriptValue::GetTypeInfo( UINT /*iTInfo*/, // JScriptValue, IDispatch -------------------------------------------- STDMETHODIMP JScriptValue::GetIDsOfNames( REFIID /*riid*/, LPOLESTR *rgszNames, - UINT /*cNames*/, + UINT /*cNames*/, LCID /*lcid*/, DISPID *rgDispId) { if( !rgDispId) return E_POINTER; - + HRESULT ret= S_OK; CComBSTR name(*rgszNames); @@ -99,7 +99,7 @@ STDMETHODIMP JScriptValue::Invoke( DISPID dispIdMember, return DISP_E_NONAMEDARGS; - HRESULT ret= S_OK; + HRESULT ret= S_OK; switch( dispIdMember) { case 0: // DISPID_VALUE @@ -113,13 +113,13 @@ STDMETHODIMP JScriptValue::Invoke( DISPID dispIdMember, break; case 1: if( wFlags & DISPATCH_METHOD) - ret= Set( pDispParams->rgvarg[1], pDispParams->rgvarg[0]); + ret= Set( pDispParams->rgvarg[1], pDispParams->rgvarg[0]); if( FAILED( ret)) ret= DISP_E_EXCEPTION; break; - case 2: + case 2: if( wFlags & DISPATCH_METHOD) - ret= Get( pVarResult); + ret= Get( pVarResult); if( FAILED( ret)) ret= DISP_E_EXCEPTION; break; @@ -145,7 +145,7 @@ STDMETHODIMP JScriptValue::Invoke( DISPID dispIdMember, // JScriptValue, IScriptOutParam----------------------- STDMETHODIMP JScriptValue::Set( VARIANT type, VARIANT value) -{ +{ Lock(); HRESULT hr= S_OK; m_varValue.Clear(); @@ -213,7 +213,7 @@ STDMETHODIMP JScriptValue::GetValue( BSTR* type, VARIANT *value) if( !type || !value) return E_POINTER; HRESULT hr; - if( SUCCEEDED( hr= m_bstrType.CopyTo( type))) + if( SUCCEEDED( hr= m_bstrType.CopyTo( type))) hr= VariantCopy( value, &m_varValue); Unlock(); return hr; @@ -249,13 +249,13 @@ STDMETHODIMP JScriptOutParam::GetTypeInfo( UINT /*iTInfo*/, // JScriptOutParam, IDispatch -------------------------------------------- STDMETHODIMP JScriptOutParam::GetIDsOfNames( REFIID /*riid*/, LPOLESTR *rgszNames, - UINT /*cNames*/, + UINT /*cNames*/, LCID /*lcid*/, DISPID *rgDispId) { if( !rgDispId) return E_POINTER; - + HRESULT ret= S_OK; CComBSTR name(*rgszNames); @@ -279,7 +279,7 @@ STDMETHODIMP JScriptOutParam::Invoke( DISPID dispIdMember, EXCEPINFO* /*pExcepInfo*/, UINT* /*puArgErr*/) { - HRESULT ret= S_OK; + HRESULT ret= S_OK; switch( dispIdMember) { case 0: // DISPID_VALUE @@ -297,7 +297,7 @@ STDMETHODIMP JScriptOutParam::Invoke( DISPID dispIdMember, else ret= E_POINTER; break; - case 1: // + case 1: // if( wFlags & DISPATCH_PROPERTYGET && pVarResult) { if( FAILED( VariantCopy( pVarResult, &m_varValue))) diff --git a/extensions/source/ole/jscriptclasses.hxx b/extensions/source/ole/jscriptclasses.hxx index b881e94419dd..7eab4bd8c8aa 100644 --- a/extensions/source/ole/jscriptclasses.hxx +++ b/extensions/source/ole/jscriptclasses.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/ole/ole2uno.cxx b/extensions/source/ole/ole2uno.cxx index 203c6b4d3b8b..16060432ac75 100644 --- a/extensions/source/ole/ole2uno.cxx +++ b/extensions/source/ole/ole2uno.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -57,18 +57,18 @@ Mutex * getBridgeMutex() // Mutex* getBridgeMutex() // { -// static Mutex* pMutex= NULL; +// static Mutex* pMutex= NULL; -// if( ! pMutex) -// { -// MutexGuard guard( Mutex::getGlobalMutex() ); -// if( !pMutex) -// { -// static Mutex aMutex; -// pMutex= &aMutex; -// } -// } -// return pMutex; +// if( ! pMutex) +// { +// MutexGuard guard( Mutex::getGlobalMutex() ); +// if( !pMutex) +// { +// static Mutex aMutex; +// pMutex= &aMutex; +// } +// } +// return pMutex; // } } diff --git a/extensions/source/ole/ole2uno.hxx b/extensions/source/ole/ole2uno.hxx index 2cd8c75d3857..fc3ad87ce0b5 100644 --- a/extensions/source/ole/ole2uno.hxx +++ b/extensions/source/ole/ole2uno.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/ole/oledll.cxx b/extensions/source/ole/oledll.cxx index 6c80487ffcb4..5346aa940cf7 100644 --- a/extensions/source/ole/oledll.cxx +++ b/extensions/source/ole/oledll.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/ole/oleobjw.cxx b/extensions/source/ole/oleobjw.cxx index 847ce89ce4f9..20359a21901b 100644 --- a/extensions/source/ole/oleobjw.cxx +++ b/extensions/source/ole/oleobjw.cxx @@ -78,7 +78,7 @@ using namespace com::sun::star::bridge::oleautomation; using namespace com::sun::star::bridge::ModelDependent; #define JSCRIPT_ID_PROPERTY L"_environment" -#define JSCRIPT_ID L"jscript" +#define JSCRIPT_ID L"jscript" namespace ole_adapter { @@ -128,7 +128,7 @@ IUnknownWrapper_Impl::~IUnknownWrapper_Impl() // remove entries in global maps typedef hash_map<sal_uInt32, sal_uInt32>::iterator _IT; - _IT it= WrapperToAdapterMap.find( (sal_uInt32) xIntRoot); + _IT it= WrapperToAdapterMap.find( (sal_uInt32) xIntRoot); if( it != WrapperToAdapterMap.end()) { sal_uInt32 adapter= it->second; @@ -1078,9 +1078,9 @@ Any IUnknownWrapper_Impl::invokeWithDispIdUnoTlb(const OUString& sFunctionName, } - CComVariant varResult; - ExcepInfo excepinfo; - unsigned int uArgErr; + CComVariant varResult; + ExcepInfo excepinfo; + unsigned int uArgErr; DISPPARAMS dispparams= { pVarParams, NULL, parameterCount, 0}; // Get the DISPID FuncDesc aDesc(getTypeInfo()); @@ -1161,7 +1161,7 @@ Any IUnknownWrapper_Impl::invokeWithDispIdUnoTlb(const OUString& sFunctionName, { try { - if( pMethod ) + if( pMethod ) variantToAny(&varResult, ret, Type( pMethod->pReturnTypeRef), sal_False); else variantToAny(&varResult, ret, sal_False); @@ -1185,7 +1185,7 @@ Any IUnknownWrapper_Impl::invokeWithDispIdUnoTlb(const OUString& sFunctionName, if( !bConvRet) // conversion of return or out parameter failed throw CannotConvertException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Call to COM object failed. Conversion of return or out value failed")), - Reference<XInterface>( static_cast<XWeak*>(this), UNO_QUERY ), TypeClass_UNKNOWN, + Reference<XInterface>( static_cast<XWeak*>(this), UNO_QUERY ), TypeClass_UNKNOWN, FailReason::UNKNOWN, 0);// lookup error code // conversion of return or out parameter failed switch (hr) @@ -1421,7 +1421,7 @@ sal_Bool IUnknownWrapper_Impl::isJScriptObject() if( disp) { CComVariant result; - if( SUCCEEDED( disp.GetPropertyByName( JSCRIPT_ID_PROPERTY, &result))) + if( SUCCEEDED( disp.GetPropertyByName( JSCRIPT_ID_PROPERTY, &result))) { if(result.vt == VT_BSTR) { @@ -1473,10 +1473,10 @@ Any IUnknownWrapper_Impl::invokeWithDispIdComTlb(FuncDesc& aFuncDesc, Any ret; HRESULT result; - DISPPARAMS dispparams = {NULL, NULL, 0, 0}; - CComVariant varResult; - ExcepInfo excepinfo; - unsigned int uArgErr; + DISPPARAMS dispparams = {NULL, NULL, 0, 0}; + CComVariant varResult; + ExcepInfo excepinfo; + unsigned int uArgErr; sal_Int32 i = 0; sal_Int32 nUnoArgs = Params.getLength(); DISPID idPropertyPut = DISPID_PROPERTYPUT; @@ -1779,7 +1779,7 @@ Any IUnknownWrapper_Impl::invokeWithDispIdComTlb(FuncDesc& aFuncDesc, } // in parameter no VT_BYREF except for array, interfaces else - { // void any stands for optional param + { // void any stands for optional param if (i < nUnoArgs && anyArg.getValueTypeClass() != TypeClass_VOID) { anyToVariant( & arArgs[revIndex], anyArg, varType); @@ -2029,7 +2029,7 @@ bool IUnknownWrapper_Impl::getDispid(const OUString& sFuncName, DISPID * id) { OSL_ASSERT(m_spDispatch); LPOLESTR lpsz = const_cast<LPOLESTR> (reinterpret_cast<LPCOLESTR>(sFuncName.getStr())); - HRESULT hr = m_spDispatch->GetIDsOfNames(IID_NULL, &lpsz, 1, LOCALE_USER_DEFAULT, id); + HRESULT hr = m_spDispatch->GetIDsOfNames(IID_NULL, &lpsz, 1, LOCALE_USER_DEFAULT, id); return hr == S_OK ? true : false; } void IUnknownWrapper_Impl::getFuncDesc(const OUString & sFuncName, FUNCDESC ** pFuncDesc) diff --git a/extensions/source/ole/oleobjw.hxx b/extensions/source/ole/oleobjw.hxx index 733d25f1d78b..0f926695eaab 100644 --- a/extensions/source/ole/oleobjw.hxx +++ b/extensions/source/ole/oleobjw.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -145,7 +145,7 @@ protected: Sequence<sal_Int16 >& OutParamIndex, Sequence< Any >& OutParam); // Is used for OleObjectFactory service - virtual Any invokeWithDispIdComTlb(const OUString& sFuncName, + virtual Any invokeWithDispIdComTlb(const OUString& sFuncName, const Sequence< Any >& Params, Sequence< sal_Int16 >& OutParamIndex, Sequence< Any >& OutParam); @@ -162,7 +162,7 @@ protected: // UnoConversionUtilities ------------------------------------------------------------------------------- - virtual Reference<XInterface> createUnoWrapperInstance(); + virtual Reference<XInterface> createUnoWrapperInstance(); virtual Reference<XInterface> createComWrapperInstance(); /**Obtains a FUNCDESC structure for a function. @@ -189,13 +189,13 @@ protected: // After return attributInfo contains typelib_InterfaceAttributeTypeDescription::pAttributeTypeRef void getAttributeInfo(const OUString& sName, TypeDescription& attributeInfo); // used by get MethodInfo - TypeDescription getInterfaceMemberDescOfCurrentCall(const OUString& sName); + TypeDescription getInterfaceMemberDescOfCurrentCall(const OUString& sName); /** Returns alway a valid ITypeInfo interface or throws a BridgeRuntimeError. The returned interface does not need to be AddRef'ed as long as it is locally used. The interface is kept in the instance of this class. */ - ITypeInfo* getTypeInfo(); - + ITypeInfo* getTypeInfo(); + /** Returns the DISPID for a function or property name. If true is returned then id contains a valid DISPID. */ @@ -203,10 +203,10 @@ protected: bool getDispid(const OUString& sFuncName, DISPID * id); VARTYPE getUserDefinedElementType( ITypeInfo* pTypeInfo, const DWORD nHrefType ); - + /** Gets the element type in a VARIANT like style. E.g. if desc->lptdesc contains a VT_PTR than it is replaced by VT_BYREF and VT_SAFEARRAY is replaced by VT_ARRAY - If the TYPEDESC describes an SAFEARRAY then varType is a combination of VT_ARRAY + If the TYPEDESC describes an SAFEARRAY then varType is a combination of VT_ARRAY and the element type. The argument desc must be obtained from FUNCDESC::lprgelemdescParam[i].tdesc where FUNCDESC was obtained from the ITypeInfo belonging to wrapped IDispatch. @@ -221,10 +221,10 @@ protected: /** Returns a FUNCDESC structure which contains type information about the current XInvocation::invoke call. The FUNCDESC either describes a method, - a property put or a property get operation. + a property put or a property get operation. It uses the types com.sun.star.bridge.oleautomation.PropertyPutArgument which can be - contained in the sequence of in-arguments of invoke to determine if the call is + contained in the sequence of in-arguments of invoke to determine if the call is a property put or property get operation. If no adequate FUNCDESC was found, an IllegalArgumentException is thrown. Therefore it is safe to assume that the returned FUNCDESC* is not NULL. @@ -259,8 +259,8 @@ protected: was transported as VT_DISPATCH in a VARIANT rather then a VT_UNKNOWN */ sal_Bool m_bOriginalDispatch; - DispIdMap m_dispIdMap; - Reference<XIdlClass>* m_pxIdlClass; + DispIdMap m_dispIdMap; + Reference<XIdlClass>* m_pxIdlClass; // used by isJScriptObject diff --git a/extensions/source/ole/olethread.cxx b/extensions/source/ole/olethread.cxx index bd17dff2b90e..bd6f5fbceeec 100644 --- a/extensions/source/ole/olethread.cxx +++ b/extensions/source/ole/olethread.cxx @@ -54,7 +54,7 @@ void o2u_attachCurrentThread() if ((sal_Bool)(sal_IntPtr)oleThreadData.getData() != sal_True) { - HINSTANCE inst= LoadLibrary( _T("ole32.dll")); + HINSTANCE inst= LoadLibrary( _T("ole32.dll")); if( inst ) { HRESULT hr; diff --git a/extensions/source/ole/servprov.cxx b/extensions/source/ole/servprov.cxx index 82c5170a075a..ecf45a4ce074 100644 --- a/extensions/source/ole/servprov.cxx +++ b/extensions/source/ole/servprov.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -82,7 +82,7 @@ DEFINE_GUID(OID_ServiceManager, 0x82154420, 0xfbf, 0x11d4, 0x83, 0x13, 0x0, 0x50 DEFINE_GUID(OID_ServiceManager, 0xd9bb9d1d, 0xbfa9, 0x4357, 0x9f, 0x11, 0x9a, 0x2e, 0x90, 0x61, 0xf0, 0x6e); #endif -extern rtl_StandardModuleCount globalModuleCount; +extern rtl_StandardModuleCount globalModuleCount; /***************************************************************************** @@ -544,7 +544,7 @@ OleClient_Impl::~OleClient_Impl() globalModuleCount.modCnt.release( &globalModuleCount.modCnt); } -Sequence< OUString > SAL_CALL OleClient_Impl::getAvailableServiceNames() throw( RuntimeException ) +Sequence< OUString > SAL_CALL OleClient_Impl::getAvailableServiceNames() throw( RuntimeException ) { Sequence< OUString > ret; @@ -559,23 +559,23 @@ OUString OleClient_Impl::getImplementationName() Reference<XInterface> SAL_CALL OleClient_Impl::createInstance(const OUString& ServiceSpecifier) throw (Exception, RuntimeException ) { - Reference<XInterface> ret; - HRESULT result; - IUnknown* pUnknown = NULL; - CLSID classId; + Reference<XInterface> ret; + HRESULT result; + IUnknown* pUnknown = NULL; + CLSID classId; o2u_attachCurrentThread(); result = CLSIDFromProgID( - reinterpret_cast<LPCWSTR>(ServiceSpecifier.getStr()), //Pointer to the ProgID - &classId); //Pointer to the CLSID + reinterpret_cast<LPCWSTR>(ServiceSpecifier.getStr()), //Pointer to the ProgID + &classId); //Pointer to the CLSID if (result == NOERROR) { result = CoCreateInstance( - classId, //Class identifier (CLSID) of the object - NULL, //Pointer to whether object is or isn't part of an aggregate + classId, //Class identifier (CLSID) of the object + NULL, //Pointer to whether object is or isn't part of an aggregate CLSCTX_SERVER, //Context for running executable code IID_IUnknown, //Reference to the identifier of the interface (void**)&pUnknown); //Address of output variable that receives @@ -584,11 +584,11 @@ Reference<XInterface> SAL_CALL OleClient_Impl::createInstance(const OUString& Se if (pUnknown != NULL) { - Any any; + Any any; CComVariant variant; V_VT(&variant) = VT_UNKNOWN; - V_UNKNOWN(&variant) = pUnknown; + V_UNKNOWN(&variant) = pUnknown; // AddRef for Variant pUnknown->AddRef(); @@ -661,7 +661,7 @@ OleServer_Impl::OleServer_Impl( const Reference<XMultiServiceFactory>& smgr): sal_Bool bOLERegister = sal_False; #else sal_Bool bOLERegister = sal_True; -#endif +#endif sal_Bool ret = provideInstance( m_smgr, (GUID*)&OID_ServiceManager, bOLERegister ); (void)ret; } diff --git a/extensions/source/ole/servprov.hxx b/extensions/source/ole/servprov.hxx index d9c47cdbd7eb..49091b1fcd38 100644 --- a/extensions/source/ole/servprov.hxx +++ b/extensions/source/ole/servprov.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -42,11 +42,11 @@ using namespace std; namespace ole_adapter { -Reference< XInterface> SAL_CALL ConverterProvider_CreateInstance( const Reference<XMultiServiceFactory> & xSMgr) +Reference< XInterface> SAL_CALL ConverterProvider_CreateInstance( const Reference<XMultiServiceFactory> & xSMgr) throw( Exception); -Reference< XInterface> SAL_CALL ConverterProvider_CreateInstance2( const Reference<XMultiServiceFactory> & xSMgr) +Reference< XInterface> SAL_CALL ConverterProvider_CreateInstance2( const Reference<XMultiServiceFactory> & xSMgr) throw( Exception); -Reference< XInterface> SAL_CALL ConverterProvider_CreateInstanceVar1( const Reference<XMultiServiceFactory> & xSMgr) +Reference< XInterface> SAL_CALL ConverterProvider_CreateInstanceVar1( const Reference<XMultiServiceFactory> & xSMgr) throw( Exception); Reference<XInterface> SAL_CALL OleClient_CreateInstance( const Reference<XMultiServiceFactory> & xSMgr) throw( Exception); @@ -56,10 +56,10 @@ Reference<XInterface> SAL_CALL OleServer_CreateInstance( const Reference<XMultiS class declaration IClassFactoryWrapper - Specify abstract helper methods on class factories, which provide + Specify abstract helper methods on class factories, which provide UNO objects. These methods are used by objects of class OleServer_Impl, to handle the OLE registration of different class factories. - + *****************************************************************************/ class IClassFactoryWrapper : public IClassFactory @@ -74,14 +74,14 @@ public: class declaration ProviderOleWrapper_Impl - Provides an UNO service provider as OLE class factory. Handle the - OLE registration by overloading the abstract methods from + Provides an UNO service provider as OLE class factory. Handle the + OLE registration by overloading the abstract methods from IClassFactoryWrapper. Acts as a COM class factory. When IClassFactory::CreateInstance is being called then it creates an service by help of the XSingleServiceFactory member and maps maps it to a COM object. - + *****************************************************************************/ class ProviderOleWrapper_Impl : public IClassFactoryWrapper @@ -94,7 +94,7 @@ public: sal_Bool registerClass(); sal_Bool deregisterClass(); - + /* IUnknown methods */ STDMETHOD(QueryInterface)(REFIID riid, LPVOID FAR * ppvObj); STDMETHOD_(ULONG, AddRef)(); @@ -108,9 +108,9 @@ protected: oslInterlockedCount m_refCount; Reference<XSingleServiceFactory> m_xSingleServiceFactory; - GUID m_guid; - DWORD m_factoryHandle; - Reference<XBridgeSupplier2> m_bridgeSupplier; + GUID m_guid; + DWORD m_factoryHandle; + Reference<XBridgeSupplier2> m_bridgeSupplier; Reference<XMultiServiceFactory> m_smgr; }; @@ -118,10 +118,10 @@ protected: class declaration OneInstanceOleWrapper_Impl - Provides an single UNO object as OLE object. Handle the - OLE registration by overloading the abstract methods from + Provides an single UNO object as OLE object. Handle the + OLE registration by overloading the abstract methods from IClassFactoryWrapper. - + Acts as a COM class factory. When IClassFactory::CreateInstance is being called then it maps the XInstance member it to a COM object. @@ -136,7 +136,7 @@ public: sal_Bool registerClass(); sal_Bool deregisterClass(); - + /* IUnknown methods */ STDMETHOD(QueryInterface)(REFIID riid, LPVOID FAR * ppvObj); STDMETHOD_(ULONG, AddRef)(); @@ -149,10 +149,10 @@ public: protected: oslInterlockedCount m_refCount; - Reference<XInterface> m_xInst; - GUID m_guid; - DWORD m_factoryHandle; - Reference<XBridgeSupplier2> m_bridgeSupplier; + Reference<XInterface> m_xInst; + GUID m_guid; + DWORD m_factoryHandle; + Reference<XBridgeSupplier2> m_bridgeSupplier; Reference<XMultiServiceFactory> m_smgr; unsigned long m_nApplRegHandle; sal_Bool m_bAsApplication; @@ -163,17 +163,17 @@ protected: class declaration OleConverter_Impl2 Implementation of the UNO service com.sun.star.bridge.OleBridgeSupplier2. - + *****************************************************************************/ -// This class realizes the service com.sun.star.bridge.OleBridgeSupplier2 and +// This class realizes the service com.sun.star.bridge.OleBridgeSupplier2 and // com.sun.star.bridge.OleBridgeSupplierVar1. The class implements XBridgeSupplier2 // instead of XBridgeSuppplier as done by class OleConverter_Impl. The XBridgeSupplier2 // interface does not need a Maschine Id in its createBridge function anymore, // If an UNO interface is to be converted then the member m_nUnoWrapperClass determines -// what wrapper class is to be used. There are currently InterfaceOleWrapper_Impl and -// UnoObjectWrapperRemoteOpt. The first is used for the OleBridgeSupplier2 and the -// latter for OleBridgeSupplierVar1. +// what wrapper class is to be used. There are currently InterfaceOleWrapper_Impl and +// UnoObjectWrapperRemoteOpt. The first is used for the OleBridgeSupplier2 and the +// latter for OleBridgeSupplierVar1. // The m_nComWrapperClass specifies the class which is used as wrapper for COM interfaces. // Currently there is only one class available ( IUnknownWrapper_Impl). class OleConverter_Impl2 : public WeakImplHelper2<XBridgeSupplier2, XInitialization>, @@ -182,14 +182,14 @@ class OleConverter_Impl2 : public WeakImplHelper2<XBridgeSupplier2, XInitializat public: OleConverter_Impl2( const Reference<XMultiServiceFactory>& smgr); OleConverter_Impl2( const Reference<XMultiServiceFactory>& smgr, sal_uInt8 unoWrapperClass, sal_uInt8 comWrapperClass ); - virtual ~OleConverter_Impl2(); + virtual ~OleConverter_Impl2(); // XBridgeSupplier2 --------------------------------------------------- - virtual Any SAL_CALL createBridge(const Any& modelDepObject, - const Sequence<sal_Int8>& ProcessId, - sal_Int16 sourceModelType, - sal_Int16 destModelType) + virtual Any SAL_CALL createBridge(const Any& modelDepObject, + const Sequence<sal_Int8>& ProcessId, + sal_Int16 sourceModelType, + sal_Int16 destModelType) throw (IllegalArgumentException, RuntimeException); // XInitialization @@ -208,7 +208,7 @@ protected: class declaration OleClient_Impl Implementation of the UNO service com.sun.star.bridge.OleObjectFactory. - + *****************************************************************************/ @@ -222,8 +222,8 @@ public: // XMultiServiceFactory virtual Reference<XInterface> SAL_CALL createInstance(const OUString& ServiceSpecifier) throw( Exception, RuntimeException); virtual Reference<XInterface> SAL_CALL createInstanceWithArguments(const OUString& ServiceSpecifier, const Sequence< Any >& Arguments) throw (Exception, RuntimeException); - Sequence< OUString > SAL_CALL getAvailableServiceNames() throw (RuntimeException); - + Sequence< OUString > SAL_CALL getAvailableServiceNames() throw (RuntimeException); + // Abstract struct UnoConversionUtilities virtual Reference< XInterface > createUnoWrapperInstance(); virtual Reference< XInterface > createComWrapperInstance(); @@ -231,7 +231,7 @@ public: OUString getImplementationName(); protected: - Reference<XBridgeSupplier2> m_bridgeSupplier; + Reference<XBridgeSupplier2> m_bridgeSupplier; }; /***************************************************************************** @@ -239,10 +239,10 @@ protected: class declaration OleServer_Impl Implementation of the UNO service com.sun.star.bridge.OleApplicationRegistration. - Register the calling application as OLE automation server for - standard OLE object. The objects will be registered while instanciating - this implementation and deregistrated, if this implementation is destroyed. - + Register the calling application as OLE automation server for + standard OLE object. The objects will be registered while instanciating + this implementation and deregistrated, if this implementation is destroyed. + *****************************************************************************/ class OleServer_Impl : public OWeakObject, XTypeProvider @@ -266,7 +266,7 @@ protected: sal_Bool provideInstance(const Reference<XInterface>& xInst, GUID* guid, sal_Bool bAsApplication ); list< IClassFactoryWrapper* > m_wrapperList; - Reference< XBridgeSupplier2 > m_bridgeSupplier; + Reference< XBridgeSupplier2 > m_bridgeSupplier; Reference<XMultiServiceFactory> m_smgr; }; diff --git a/extensions/source/ole/servreg.cxx b/extensions/source/ole/servreg.cxx index 7311f965ca8d..16a99df48fa4 100644 --- a/extensions/source/ole/servreg.cxx +++ b/extensions/source/ole/servreg.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -44,14 +44,14 @@ rtl_StandardModuleCount globalModuleCount= MODULE_COUNT_INIT; -Reference<XInterface> SAL_CALL ConverterProvider_CreateInstance2( const Reference<XMultiServiceFactory> & xSMgr) +Reference<XInterface> SAL_CALL ConverterProvider_CreateInstance2( const Reference<XMultiServiceFactory> & xSMgr) throw(Exception) { Reference<XInterface> xService = *new OleConverter_Impl2( xSMgr); return xService; } -Reference<XInterface> SAL_CALL ConverterProvider_CreateInstanceVar1( const Reference<XMultiServiceFactory> & xSMgr) +Reference<XInterface> SAL_CALL ConverterProvider_CreateInstanceVar1( const Reference<XMultiServiceFactory> & xSMgr) throw(Exception) { Reference<XInterface> xService = *new OleConverter_Impl2( xSMgr, UNO_OBJECT_WRAPPER_REMOTE_OPT, IUNKNOWN_WRAPPER_IMPL); @@ -77,50 +77,50 @@ extern "C" void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ ) { void * pRet = 0; - + OUString aImplName( OUString::createFromAscii( pImplName ) ); Reference< XSingleServiceFactory > xFactory; Sequence<OUString> seqServiceNames; if (pServiceManager && aImplName.equals( reinterpret_cast<const sal_Unicode*>(L"com.sun.star.comp.ole.OleConverter2") )) { xFactory= createSingleFactory( reinterpret_cast< XMultiServiceFactory*>(pServiceManager), - OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.ole.OleConverter2")), + OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.ole.OleConverter2")), ConverterProvider_CreateInstance2, seqServiceNames, &globalModuleCount.modCnt ); } else if (pServiceManager && aImplName.equals( reinterpret_cast<const sal_Unicode*>(L"com.sun.star.comp.ole.OleConverterVar1") )) { xFactory= createSingleFactory( reinterpret_cast<XMultiServiceFactory*>(pServiceManager), - OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.ole.OleConverterVar1")), + OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.ole.OleConverterVar1")), ConverterProvider_CreateInstanceVar1, seqServiceNames, &globalModuleCount.modCnt ); } else if(pServiceManager && aImplName.equals(reinterpret_cast<const sal_Unicode*>(L"com.sun.star.comp.ole.OleClient"))) { xFactory= createSingleFactory( reinterpret_cast< XMultiServiceFactory*>(pServiceManager), - OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.ole.OleClient")), + OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.ole.OleClient")), OleClient_CreateInstance, seqServiceNames, &globalModuleCount.modCnt); } else if(pServiceManager && aImplName.equals(reinterpret_cast<const sal_Unicode*>(L"com.sun.star.comp.ole.OleServer"))) { xFactory= createOneInstanceFactory( reinterpret_cast< XMultiServiceFactory*>(pServiceManager), - OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.ole.OleServer")), + OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.ole.OleServer")), OleServer_CreateInstance, seqServiceNames, &globalModuleCount.modCnt); } - + if (xFactory.is()) { xFactory->acquire(); pRet = xFactory.get(); } - + return pRet; } -extern "C" sal_Bool SAL_CALL component_writeInfo( void * /*pServiceManager*/, void * pRegistryKey ) +extern "C" sal_Bool SAL_CALL component_writeInfo( void * /*pServiceManager*/, void * pRegistryKey ) { if (pRegistryKey) { @@ -150,7 +150,7 @@ extern "C" sal_Bool SAL_CALL component_writeInfo( void * /*pServiceManager*/, xNewKey->createKey(reinterpret_cast<const sal_Unicode*>(L"com.sun.star.bridge.OleApplicationRegistration")); xNewKey->createKey(reinterpret_cast<const sal_Unicode*>(L"com.sun.star.bridge.oleautomation.ApplicationRegistration")); - + return sal_True; } catch (InvalidRegistryException &) @@ -168,7 +168,7 @@ extern "C" void SAL_CALL component_getImplementationEnvironment( } -extern "C" sal_Bool component_canUnload( TimeValue* libUnused) +extern "C" sal_Bool component_canUnload( TimeValue* libUnused) { return globalModuleCount.canUnload( &globalModuleCount, libUnused); } diff --git a/extensions/source/ole/unoconversionutilities.hxx b/extensions/source/ole/unoconversionutilities.hxx index a220bd5d1578..1970b08fd843 100644 --- a/extensions/source/ole/unoconversionutilities.hxx +++ b/extensions/source/ole/unoconversionutilities.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -46,14 +46,14 @@ // for some reason DECIMAL_NEG (wtypes.h) which contains BYTE is not resolved. typedef unsigned char BYTE; // classes for wrapping uno objects -#define INTERFACE_OLE_WRAPPER_IMPL 1 -#define UNO_OBJECT_WRAPPER_REMOTE_OPT 2 +#define INTERFACE_OLE_WRAPPER_IMPL 1 +#define UNO_OBJECT_WRAPPER_REMOTE_OPT 2 #define INVOCATION_SERVICE reinterpret_cast<const sal_Unicode*>(L"com.sun.star.script.Invocation") // classes for wrapping ole objects -#define IUNKNOWN_WRAPPER_IMPL 1 +#define IUNKNOWN_WRAPPER_IMPL 1 #define INTERFACE_ADAPTER_FACTORY reinterpret_cast<const sal_Unicode*>(L"com.sun.star.script.InvocationAdapterFactory") // COM or JScript objects implementing UNO interfaces have to implement this property @@ -75,14 +75,14 @@ namespace ole_adapter extern hash_map<sal_uInt32, sal_uInt32> AdapterToWrapperMap; extern hash_map<sal_uInt32, sal_uInt32> WrapperToAdapterMap; typedef hash_map<sal_uInt32, sal_uInt32>::iterator IT_Wrap; -typedef hash_map<sal_uInt32, sal_uInt32>::iterator CIT_Wrap; +typedef hash_map<sal_uInt32, sal_uInt32>::iterator CIT_Wrap; //Maps IUnknown pointers to a weak reference of the respective wrapper class (e.g. // IUnknownWrapperImpl. It is the responsibility of the wrapper to remove the entry when // it is being destroyed. // Used to ensure that an Automation object is always mapped to the same UNO objects. extern hash_map<sal_uInt32, WeakReference<XInterface> > ComPtrToWrapperMap; typedef hash_map<sal_uInt32, WeakReference<XInterface> >::iterator IT_Com; -typedef hash_map<sal_uInt32, WeakReference<XInterface> >::const_iterator CIT_Com; +typedef hash_map<sal_uInt32, WeakReference<XInterface> >::const_iterator CIT_Com; // Maps XInterface pointers to a weak reference of its wrapper class (i.e. // InterfaceOleWrapper_Impl). It is the responsibility of the wrapper to remove the entry when @@ -134,11 +134,11 @@ public: /** @exception com.sun.star.lang.IllegalArgumentException If rSeq does not contain a sequence then the exception is thrown. */ - SAFEARRAY* createUnoSequenceWrapper(const Any& rSeq); + SAFEARRAY* createUnoSequenceWrapper(const Any& rSeq); /** @exception com.sun.star.lang.IllegalArgumentException If rSeq does not contain a sequence or elemtype has no proper value then the exception is thrown. - */ + */ SAFEARRAY* createUnoSequenceWrapper(const Any& rSeq, VARTYPE elemtype); /** @exception com.sun.star.lang.IllegalArgumentException @@ -191,15 +191,15 @@ public: static sal_Bool isJScriptArray(const VARIANT* pvar); Sequence<Type> getImplementedInterfaces(IUnknown* pUnk); - + protected: Reference<XInterface> createAdapter(const Sequence<Type>& types, const Reference<XInterface>& receiver); - + // helper function for Sequence conversion void getElementCountAndTypeOfSequence( const Any& rSeq, sal_Int32 dim, Sequence< sal_Int32 >& seqElementCounts, TypeDescription& typeDesc); // helper function for Sequence conversion - sal_Bool incrementMultidimensionalIndex(sal_Int32 dimensions, const sal_Int32 * parDimensionLength, - sal_Int32 * parMultidimensionalIndex); + sal_Bool incrementMultidimensionalIndex(sal_Int32 dimensions, const sal_Int32 * parDimensionLength, + sal_Int32 * parMultidimensionalIndex); // helper function for Sequence conversion size_t getOleElementSize( VARTYPE type); @@ -209,7 +209,7 @@ protected: Reference<XTypeConverter> getTypeConverter(); // This member determines what class is used to convert a UNO object - // or struct to a COM object. It is passed along to the o2u_anyToVariant + // or struct to a COM object. It is passed along to the o2u_anyToVariant // function in the createBridge function implementation sal_uInt8 m_nUnoWrapperClass; sal_uInt8 m_nComWrapperClass; @@ -254,7 +254,7 @@ bool convertSelfToCom( T& unoInterface, VARIANT * pVar) Sequence<sal_Int8> seqId( arId, 16); Any anySource; anySource <<= xInt; - Any anyDisp= xSupplier->createBridge( anySource, seqId, UNO, OLE); + Any anyDisp= xSupplier->createBridge( anySource, seqId, UNO, OLE); if( anyDisp.getValueTypeClass() == TypeClass_UNSIGNED_LONG) { VARIANT* pvariant= *(VARIANT**)anyDisp.getValue(); @@ -277,11 +277,11 @@ bool convertSelfToCom( T& unoInterface, VARIANT * pVar) // Gets the invocation factory depending on the Type in the Any. // The factory can be created by a local or remote multi service factory. -// In case there is a remote multi service factory available there are +// In case there is a remote multi service factory available there are // some services or types for which the local factory is used. The exceptions // are: all structs. // Param anyObject - contains the object ( interface, struct) for what we need an invocation object. -// +// template<class T> Reference< XSingleServiceFactory > UnoConversionUtilities<T>::getInvocationFactory(const Any& anyObject) { @@ -291,14 +291,14 @@ Reference< XSingleServiceFactory > UnoConversionUtilities<T>::getInvocationFacto m_smgrRemote.is() ) { if( ! m_xInvocationFactoryRemote.is() ) - m_xInvocationFactoryRemote= Reference<XSingleServiceFactory>( + m_xInvocationFactoryRemote= Reference<XSingleServiceFactory>( m_smgrRemote->createInstance( INVOCATION_SERVICE), UNO_QUERY); retVal= m_xInvocationFactoryRemote; } else { if( ! m_xInvocationFactoryLocal.is() ) - m_xInvocationFactoryLocal= Reference<XSingleServiceFactory>( + m_xInvocationFactoryLocal= Reference<XSingleServiceFactory>( m_smgr->createInstance(INVOCATION_SERVICE ), UNO_QUERY); retVal= m_xInvocationFactoryLocal; } @@ -314,7 +314,7 @@ void UnoConversionUtilities<T>::variantToAny( const VARIANTARG* pArg, Any& rAny, bool bFail = false; bool bCannotConvert = false; CComVariant var; - + // There is no need to support indirect values, since they're not supported by UNO if( FAILED(hr= VariantCopyInd( &var, const_cast<VARIANTARG*>(pArg)))) // remove VT_BYREF throw BridgeRuntimeError( @@ -322,14 +322,14 @@ void UnoConversionUtilities<T>::variantToAny( const VARIANTARG* pArg, Any& rAny, "VariantCopyInd failed for reason : ") + OUString::valueOf(hr)); bool bHandled = convertValueObject( & var, rAny); if( bHandled) - OSL_ENSURE( rAny.getValueType() == ptype, "type in Value Object must match the type parameter"); - + OSL_ENSURE( rAny.getValueType() == ptype, "type in Value Object must match the type parameter"); + if( ! bHandled) { // convert into a variant type that is the equivalent to the type // the sequence expects. Thus variantToAny produces the correct type // E.g. An Array object contains VT_I4 and the sequence expects shorts - // than the vartype must be changed. The reason is, you can't specify the + // than the vartype must be changed. The reason is, you can't specify the // type in JavaScript and the script engine determines the type beeing used. switch( ptype.getTypeClass()) { @@ -354,12 +354,12 @@ void UnoConversionUtilities<T>::variantToAny( const VARIANTARG* pArg, Any& rAny, } break; case TypeClass_INTERFACE: // could also be an IUnknown - case TypeClass_STRUCT: - { + case TypeClass_STRUCT: + { rAny = createOleObjectWrapper( & var, ptype); break; } - case TypeClass_ENUM: + case TypeClass_ENUM: if(SUCCEEDED(hr = VariantChangeType( & var, &var, 0, VT_I4))) rAny.setValue((void*) & var.lVal, ptype); else if (hr == DISP_E_TYPEMISMATCH) @@ -367,11 +367,11 @@ void UnoConversionUtilities<T>::variantToAny( const VARIANTARG* pArg, Any& rAny, else bFail = true; break; - case TypeClass_SEQUENCE: + case TypeClass_SEQUENCE: // There are different ways of receiving a sequence: // 1: JScript, VARTYPE: VT_DISPATCH // 2. VBScript simple arraysVT_VARIANT|VT_BYREF the referenced VARIANT contains - // a VT_ARRAY| <type> + // a VT_ARRAY| <type> // 3. VBSrcript multi dimensional arrays: VT_ARRAY|VT_BYREF if( pArg->vt == VT_DISPATCH) { @@ -386,7 +386,7 @@ void UnoConversionUtilities<T>::variantToAny( const VARIANTARG* pArg, Any& rAny, Reference<XTypeConverter> conv = getTypeConverter(); if (conv.is()) { - try + try { Any anySeq = makeAny(unoSeq); Any convAny = conv->convertTo(anySeq, ptype); @@ -409,16 +409,16 @@ void UnoConversionUtilities<T>::variantToAny( const VARIANTARG* pArg, Any& rAny, } } } - break; - case TypeClass_VOID: + break; + case TypeClass_VOID: rAny.setValue(NULL,Type()); break; - case TypeClass_ANY: // Any + case TypeClass_ANY: // Any // There could be a JScript Array that needs special handling // If an Any is expected and this Any must contain a Sequence // then we cannot figure out what element type is required. // Therefore we convert to Sequence< Any > - if( pArg->vt == VT_DISPATCH && isJScriptArray( pArg)) + if( pArg->vt == VT_DISPATCH && isJScriptArray( pArg)) { dispatchExObject2Sequence( pArg, rAny, getCppuType((Sequence<Any>*) 0)); @@ -435,11 +435,11 @@ void UnoConversionUtilities<T>::variantToAny( const VARIANTARG* pArg, Any& rAny, variantToAny( & var, rAny, getCppuType( (sal_uInt64*) 0), bReduceValueRange); } - else + else { //negative value variantToAny( & var, rAny, getCppuType( (sal_Int64*) 0), - bReduceValueRange); + bReduceValueRange); } } else @@ -447,7 +447,7 @@ void UnoConversionUtilities<T>::variantToAny( const VARIANTARG* pArg, Any& rAny, variantToAny( & var, rAny); } break; - case TypeClass_BOOLEAN: // VARIANT could be VARIANT_BOOL or other + case TypeClass_BOOLEAN: // VARIANT could be VARIANT_BOOL or other if(SUCCEEDED(hr = VariantChangeType( & var, &var, 0, VT_BOOL))) variantToAny( & var, rAny); else if (hr == DISP_E_TYPEMISMATCH) @@ -455,7 +455,7 @@ void UnoConversionUtilities<T>::variantToAny( const VARIANTARG* pArg, Any& rAny, else bFail = true; break; - case TypeClass_STRING: // UString + case TypeClass_STRING: // UString if(SUCCEEDED(hr = VariantChangeType( & var, &var, 0, VT_BSTR))) variantToAny( & var, rAny); else if (hr == DISP_E_TYPEMISMATCH) @@ -463,7 +463,7 @@ void UnoConversionUtilities<T>::variantToAny( const VARIANTARG* pArg, Any& rAny, else bFail = true; break; - case TypeClass_FLOAT: // float + case TypeClass_FLOAT: // float if(SUCCEEDED(hr = VariantChangeType( & var, &var, 0, VT_R4))) variantToAny( & var, rAny); else if (hr == DISP_E_TYPEMISMATCH) @@ -471,7 +471,7 @@ void UnoConversionUtilities<T>::variantToAny( const VARIANTARG* pArg, Any& rAny, else bFail = true; break; - case TypeClass_DOUBLE: // double + case TypeClass_DOUBLE: // double if(SUCCEEDED(hr = VariantChangeType( & var, &var, 0, VT_R8))) variantToAny(& var, rAny); else if (hr == DISP_E_TYPEMISMATCH) @@ -479,7 +479,7 @@ void UnoConversionUtilities<T>::variantToAny( const VARIANTARG* pArg, Any& rAny, else bFail = true; break; - case TypeClass_BYTE: // BYTE + case TypeClass_BYTE: // BYTE if(SUCCEEDED(hr = VariantChangeType( & var, &var, 0, VT_I1))) variantToAny( & var, rAny); else if (hr == DISP_E_TYPEMISMATCH) @@ -487,11 +487,11 @@ void UnoConversionUtilities<T>::variantToAny( const VARIANTARG* pArg, Any& rAny, else bFail = true; break; - case TypeClass_SHORT: // INT16 + case TypeClass_SHORT: // INT16 if(SUCCEEDED(hr = VariantChangeType( & var, &var, 0, VT_I2))) variantToAny( & var, rAny); else if (hr == DISP_E_TYPEMISMATCH) - bCannotConvert = true; + bCannotConvert = true; else bFail = true; break; @@ -499,7 +499,7 @@ void UnoConversionUtilities<T>::variantToAny( const VARIANTARG* pArg, Any& rAny, if(SUCCEEDED(hr = VariantChangeType(& var, &var, 0, VT_I4))) variantToAny( & var, rAny, bReduceValueRange); else if (hr == DISP_E_TYPEMISMATCH) - bCannotConvert = true; + bCannotConvert = true; else bFail = true; break; @@ -519,15 +519,15 @@ void UnoConversionUtilities<T>::variantToAny( const VARIANTARG* pArg, Any& rAny, rAny <<= value; } else if (hr == DISP_E_TYPEMISMATCH) - bCannotConvert = true; + bCannotConvert = true; else bFail = true; break; - case TypeClass_UNSIGNED_SHORT: // UINT16 + case TypeClass_UNSIGNED_SHORT: // UINT16 if(SUCCEEDED(hr = VariantChangeType( & var, &var, 0, VT_UI2))) variantToAny( & var, rAny); else if (hr == DISP_E_TYPEMISMATCH) - bCannotConvert = true; + bCannotConvert = true; else bFail = true; break; @@ -535,11 +535,11 @@ void UnoConversionUtilities<T>::variantToAny( const VARIANTARG* pArg, Any& rAny, if(SUCCEEDED(hr = VariantChangeType( & var, &var, 0, VT_UI4))) variantToAny( & var, rAny, bReduceValueRange); else if (hr == DISP_E_TYPEMISMATCH) - bCannotConvert = true; + bCannotConvert = true; else bFail = true; break; - case TypeClass_UNSIGNED_HYPER: + case TypeClass_UNSIGNED_HYPER: if(SUCCEEDED(hr = VariantChangeType(& var, &var, 0, VT_DECIMAL))) { if (var.decVal.Hi32 > 0 || var.decVal.scale > 0) @@ -550,7 +550,7 @@ void UnoConversionUtilities<T>::variantToAny( const VARIANTARG* pArg, Any& rAny, rAny <<= var.decVal.Lo64; } else if (hr == DISP_E_TYPEMISMATCH) - bCannotConvert = true; + bCannotConvert = true; else bFail = true; break; @@ -563,13 +563,13 @@ void UnoConversionUtilities<T>::variantToAny( const VARIANTARG* pArg, Any& rAny, bFail = true; break; default: -// case TypeClass_SERVICE: break; // meta construct +// case TypeClass_SERVICE: break; // meta construct // case TypeClass_TYPEDEF: break; -// case TypeClass_UNION: break; -// case TypeClass_MODULE: break; // module -// case TypeClass_EXCEPTION: break; +// case TypeClass_UNION: break; +// case TypeClass_MODULE: break; // module +// case TypeClass_EXCEPTION: break; // case TypeClass_ARRAY: break; // there's no Array at the moment -// case TypeClass_UNKNOWN: break; +// case TypeClass_UNKNOWN: break; bCannotConvert = true; break; } @@ -582,7 +582,7 @@ void UnoConversionUtilities<T>::variantToAny( const VARIANTARG* pArg, Any& rAny, OUSTR("\" to the expected UNO type of type class: ") + OUString::valueOf((sal_Int32) ptype.getTypeClass()), 0, TypeClass_UNKNOWN, FailReason::TYPE_NOT_SUPPORTED,0); - + if (bFail) throw IllegalArgumentException( OUSTR("[automation bridge]UnoConversionUtilities<T>:variantToAny\n" @@ -614,9 +614,9 @@ void UnoConversionUtilities<T>::variantToAny( const VARIANTARG* pArg, Any& rAny, "UnoConversionUtilities<T>::variantToAny !")); } } - + // The function only converts Sequences to SAFEARRAYS with elements of the type -// specified by the parameter type. Everything else is forwarded to +// specified by the parameter type. Everything else is forwarded to // anyToVariant(VARIANT* pVariant, const Any& rAny) // Param type must not be VT_BYREF template<class T> @@ -638,7 +638,7 @@ void UnoConversionUtilities<T>::anyToVariant(VARIANT* pVariant, const Any& rAny, pVariant->byref= ar; } } - else if(type == VT_VARIANT) + else if(type == VT_VARIANT) { anyToVariant(pVariant, rAny); } @@ -656,14 +656,14 @@ void UnoConversionUtilities<T>::anyToVariant(VARIANT* pVariant, const Any& rAny, OUSTR("\" to the expected Automation type of VARTYPE: ") + OUString::valueOf((sal_Int32)type), 0, TypeClass_UNKNOWN, FailReason::TYPE_NOT_SUPPORTED,0); - + throw BridgeRuntimeError( OUSTR("[automation bridge]UnoConversionUtilities<T>::anyToVariant \n" "Conversion of any with ") + rAny.getValueType().getTypeName() + OUSTR(" to VARIANT with type: ") + OUString::valueOf((sal_Int32) type) + OUSTR(" failed! Error code: ") + OUString::valueOf(hr)); - + } if(FAILED(hr = VariantCopy(pVariant, &var))) { @@ -671,7 +671,7 @@ void UnoConversionUtilities<T>::anyToVariant(VARIANT* pVariant, const Any& rAny, OUSTR("[automation bridge]UnoConversionUtilities<T>::anyToVariant \n" "VariantCopy failed for reason: ") + OUString::valueOf(hr)); } - } + } } catch (IllegalArgumentException &) { @@ -689,7 +689,7 @@ void UnoConversionUtilities<T>::anyToVariant(VARIANT* pVariant, const Any& rAny, { throw BridgeRuntimeError( OUSTR("[automation bridge]UnoConversionUtilities<T>::anyToVariant \n" - "Unexpected exception occurred. Message: ") + e.Message); + "Unexpected exception occurred. Message: ") + e.Message); } catch(...) { @@ -707,7 +707,7 @@ void UnoConversionUtilities<T>::anyToVariant(VARIANT* pVariant, const Any& rAny) { switch (rAny.getValueTypeClass()) { - case TypeClass_INTERFACE: + case TypeClass_INTERFACE: { Reference<XInterface> xInt; if (rAny >>= xInt) @@ -784,7 +784,7 @@ void UnoConversionUtilities<T>::anyToVariant(VARIANT* pVariant, const Any& rAny) } break; } - case TypeClass_SEQUENCE: // sequence ??? SafeArray descriptor + case TypeClass_SEQUENCE: // sequence ??? SafeArray descriptor { SAFEARRAY* pArray = createUnoSequenceWrapper(rAny); if (pArray) @@ -809,7 +809,7 @@ void UnoConversionUtilities<T>::anyToVariant(VARIANT* pVariant, const Any& rAny) } break; } - case TypeClass_BOOLEAN: + case TypeClass_BOOLEAN: { sal_Bool value; if (rAny >>= value) @@ -849,7 +849,7 @@ void UnoConversionUtilities<T>::anyToVariant(VARIANT* pVariant, const Any& rAny) { float value; if (rAny >>= value) - { + { pVariant->vt = VT_R4; pVariant->fltVal = value; } @@ -888,8 +888,8 @@ void UnoConversionUtilities<T>::anyToVariant(VARIANT* pVariant, const Any& rAny) } break; } - case TypeClass_SHORT: // INT16 - case TypeClass_UNSIGNED_SHORT: // UINT16 + case TypeClass_SHORT: // INT16 + case TypeClass_UNSIGNED_SHORT: // UINT16 { sal_Int16 value; if (rAny >>= value) @@ -927,15 +927,15 @@ void UnoConversionUtilities<T>::anyToVariant(VARIANT* pVariant, const Any& rAny) } case TypeClass_HYPER: { - + pVariant->vt = VT_DECIMAL; pVariant->decVal.scale = 0; pVariant->decVal.sign = 0; pVariant->decVal.Hi32 = 0; - + sal_Int64 value; rAny >>= value; - + if (value & SAL_CONST_UINT64(0x8000000000000000)) pVariant->decVal.sign = DECIMAL_NEG; @@ -971,7 +971,7 @@ void UnoConversionUtilities<T>::anyToVariant(VARIANT* pVariant, const Any& rAny) break; } default: - //TypeClass_SERVICE: + //TypeClass_SERVICE: //TypeClass_EXCEPTION: //When a InvocationTargetException is thrown when calling XInvocation::invoke //on a UNO object, then the target exception is directly used to create a @@ -980,8 +980,8 @@ void UnoConversionUtilities<T>::anyToVariant(VARIANT* pVariant, const Any& rAny) //TypeClass_ANY: //TypeClass_UNKNOWN: //TypeClass_UNSIGNED_OCTET: - // TypeClass_UNION: - // TypeClass_ARRAY: + // TypeClass_UNION: + // TypeClass_ARRAY: // TypeClass_UNSIGNED_INT: // TypeClass_UNSIGNED_BYTE: // TypeClass_MODULE: @@ -1000,8 +1000,8 @@ void UnoConversionUtilities<T>::anyToVariant(VARIANT* pVariant, const Any& rAny) throw IllegalArgumentException( OUSTR("[automation bridge]UnoConversionUtilities<T>::anyToVariant\n" "The provided any of type\" ") + rAny.getValueType().getTypeName() + - OUSTR("\" is unappropriate for conversion!"), Reference<XInterface>(), -1); - + OUSTR("\" is unappropriate for conversion!"), Reference<XInterface>(), -1); + } } catch (CannotConvertException & ) @@ -1020,18 +1020,18 @@ void UnoConversionUtilities<T>::anyToVariant(VARIANT* pVariant, const Any& rAny) { throw BridgeRuntimeError( OUSTR("[automation bridge]UnoConversionUtilities<T>::anyToVariant \n" - "Unexpected exception occurred. Message: ") + e.Message); + "Unexpected exception occurred. Message: ") + e.Message); } catch(...) { throw BridgeRuntimeError( OUSTR("[automation bridge]UnoConversionUtilities<T>::anyToVariant \n" - "Unexpected exception occurred. ") ); + "Unexpected exception occurred. ") ); } } // Creates an SAFEARRAY of the specified element and if necessary -// creates a SAFEARRAY whith multiple dimensions. +// creates a SAFEARRAY whith multiple dimensions. // Used by sal_Bool anyToVariant(VARIANT* pVariant, const Any& rAny, VARTYPE type); template<class T> SAFEARRAY* UnoConversionUtilities<T>::createUnoSequenceWrapper(const Any& rSeq, VARTYPE elemtype) @@ -1042,9 +1042,9 @@ SAFEARRAY* UnoConversionUtilities<T>::createUnoSequenceWrapper(const Any& rSeq, "The any does not contain a sequence!"), 0, 0); if (elemtype == VT_NULL || elemtype == VT_EMPTY) throw IllegalArgumentException( - OUSTR("[automation bridge]UnoConversionUtilities<T>::createUnoSequenceWrapper \n" + OUSTR("[automation bridge]UnoConversionUtilities<T>::createUnoSequenceWrapper \n" "No element type supplied!"),0, -1); - SAFEARRAY* pArray= NULL; + SAFEARRAY* pArray= NULL; // Get the dimensions. This is done by examining the type name string // The count of brackets determines the dimensions. OUString sTypeName= rSeq.getValueType().getTypeName(); @@ -1073,7 +1073,7 @@ SAFEARRAY* UnoConversionUtilities<T>::createUnoSequenceWrapper(const Any& rSeq, size_t oleElementSize= getOleElementSize( elemtype); // SafeArrayCreate clears the memory for the data itself. pArray = SafeArrayCreate(elemtype, dims, prgsabound); - + // convert the Sequence's elements and populate the SAFEARRAY if( pArray) { @@ -1084,7 +1084,7 @@ SAFEARRAY* UnoConversionUtilities<T>::createUnoSequenceWrapper(const Any& rSeq, const sal_Int32* parElementCount= seqElementCounts.getConstArray(); uno_Sequence * pMultiSeq= *(uno_Sequence* const*) rSeq.getValue(); sal_Int32 dimsSeq= dims - 1; - + // arDimSeqIndizes contains the current index of a block of data. // E.g. Sequence<Sequence<sal_Int32>> , the index would refer to Sequence<sal_Int32> // In this case arDimSeqIndices would have the size 1. That is the elements are not counted @@ -1096,11 +1096,11 @@ SAFEARRAY* UnoConversionUtilities<T>::createUnoSequenceWrapper(const Any& rSeq, { sarDimsSeqIndices.reset(new sal_Int32[dimsSeq]); arDimsSeqIndices = sarDimsSeqIndices.get(); - memset( arDimsSeqIndices, 0, sizeof( sal_Int32 ) * dimsSeq); + memset( arDimsSeqIndices, 0, sizeof( sal_Int32 ) * dimsSeq); } - + char* psaCurrentData= (char*)pSAData; - + do { // Get the Sequence at the current index , see arDimsSeqIndices @@ -1127,17 +1127,17 @@ SAFEARRAY* UnoConversionUtilities<T>::createUnoSequenceWrapper(const Any& rSeq, if( skipSeq) continue; - + // Calculate the current position within the datablock of the SAFEARRAY - // for the next Sequence. - sal_Int32 memOffset= 0; + // for the next Sequence. + sal_Int32 memOffset= 0; sal_Int32 dimWeight= parElementCount[ dims - 1]; // size of the rightmost dimension for(sal_Int16 idims=0; idims < dimsSeq; idims++ ) { memOffset+= arDimsSeqIndices[dimsSeq - 1 - idims] * dimWeight; // now determine the weight of the dimension to the left of the current. if( dims - 2 - idims >=0) - dimWeight*= parElementCount[dims - 2 - idims]; + dimWeight*= parElementCount[dims - 2 - idims]; } psaCurrentData= (char*)pSAData + memOffset * oleElementSize; // convert the Sequence and put the elements into the Safearray @@ -1157,22 +1157,22 @@ SAFEARRAY* UnoConversionUtilities<T>::createUnoSequenceWrapper(const Any& rSeq, anyToVariant( &var, unoElement); if( elemtype == VT_VARIANT ) { - VariantCopy( ( VARIANT*)psaCurrentData, &var); + VariantCopy( ( VARIANT*)psaCurrentData, &var); VariantClear( &var); } else - memcpy( psaCurrentData, &var.byref, oleElementSize); - + memcpy( psaCurrentData, &var.byref, oleElementSize); + psaCurrentData+= oleElementSize; } } while( incrementMultidimensionalIndex( dimsSeq, parElementCount, arDimsSeqIndices)); - + SafeArrayUnaccessData( pArray); - } + } } } - return pArray; + return pArray; } // Increments a multi dimensional index. @@ -1180,17 +1180,17 @@ SAFEARRAY* UnoConversionUtilities<T>::createUnoSequenceWrapper(const Any& rSeq, // False is also returned if an overflow of the most significant dimension occurs. E.g. // assume an array with the dimensions (2,2), then the lowest index is (0,0) and the highest // index is (1,1). If the function is being called with the index (1,1) then the overflow would -// occur, with the result (0,0) and a sal_False as return value. +// occur, with the result (0,0) and a sal_False as return value. // Param dimensions - number of dimensions -// Param parDimensionsLength - The array contains the size of each dimension, that is the -// size of the array equals the parameter dimensions. -// The rightmost dimensions is the least significant one -// ( parDimensionsLengths[ dimensions -1 ] ). -// Param parMultiDimensionalIndex - The array contains the index. Each dimension index is -// 0 based. +// Param parDimensionsLength - The array contains the size of each dimension, that is the +// size of the array equals the parameter dimensions. +// The rightmost dimensions is the least significant one +// ( parDimensionsLengths[ dimensions -1 ] ). +// Param parMultiDimensionalIndex - The array contains the index. Each dimension index is +// 0 based. template<class T> -sal_Bool UnoConversionUtilities<T>::incrementMultidimensionalIndex(sal_Int32 dimensions, - const sal_Int32 * parDimensionLengths, +sal_Bool UnoConversionUtilities<T>::incrementMultidimensionalIndex(sal_Int32 dimensions, + const sal_Int32 * parDimensionLengths, sal_Int32 * parMultidimensionalIndex) { if( dimensions < 1) @@ -1198,7 +1198,7 @@ sal_Bool UnoConversionUtilities<T>::incrementMultidimensionalIndex(sal_Int32 dim sal_Bool ret= sal_True; sal_Bool carry= sal_True; // to get into the while loop - + sal_Int32 currentDimension= dimensions; //most significant is 1 while( carry) { @@ -1222,7 +1222,7 @@ sal_Bool UnoConversionUtilities<T>::incrementMultidimensionalIndex(sal_Int32 dim } // Determines the size of a certain OLE type. The function takes -// only those types into account which are oleautomation types and +// only those types into account which are oleautomation types and // can have a value ( unless VT_NULL, VT_EMPTY, VT_ARRAY, VT_BYREF). // Currently used in createUnoSequenceWrapper to calculate addresses // for data within a SAFEARRAY. @@ -1248,34 +1248,34 @@ size_t UnoConversionUtilities<T>::getOleElementSize( VARTYPE type) return size; } -//If a Sequence is being converted into a SAFEARRAY then we possibly have +//If a Sequence is being converted into a SAFEARRAY then we possibly have // to create a SAFEARRAY with multiple dimensions. This is the case when a // Sequence contains Sequences ( Sequence< Sequence < XXX > > ). The leftmost // Sequence in the declaration is assumed to represent dimension 1. Because -// all Sequence elements of a Sequence can have different length, we have to +// all Sequence elements of a Sequence can have different length, we have to // determine the maximum length which is then the length of the respective // dimension. // getElementCountAndTypeOfSequence determines the length of each dimension and calls itself recursively // in the process. // param rSeq - an Any that has to contain a Sequence // param dim - the dimension for which the number of elements is being determined, -// must be one. -// param seqElementCounts - countains the maximum number of elements for each -// dimension. Index 0 contains the number of dimension one. -// After return the Sequence contains the maximum number of -// elements for each dimension. -// The length of the Sequence must equal the number of dimensions. -// param typeClass - TypeClass of the element type that is no Sequence, e.g. -// Sequence< Sequence <Sequence <sal_Int32> > > - type is sal_Int32) +// must be one. +// param seqElementCounts - countains the maximum number of elements for each +// dimension. Index 0 contains the number of dimension one. +// After return the Sequence contains the maximum number of +// elements for each dimension. +// The length of the Sequence must equal the number of dimensions. +// param typeClass - TypeClass of the element type that is no Sequence, e.g. +// Sequence< Sequence <Sequence <sal_Int32> > > - type is sal_Int32) template<class T> -void UnoConversionUtilities<T>::getElementCountAndTypeOfSequence( const Any& rSeq, sal_Int32 dim, +void UnoConversionUtilities<T>::getElementCountAndTypeOfSequence( const Any& rSeq, sal_Int32 dim, Sequence< sal_Int32 >& seqElementCounts, TypeDescription& typeDesc) { sal_Int32 dimCount= (*(uno_Sequence* const *) rSeq.getValue())->nElements; if( dimCount > seqElementCounts[ dim-1]) seqElementCounts[ dim-1]= dimCount; - // we need the element type to construct the any that is + // we need the element type to construct the any that is // passed into getElementCountAndTypeOfSequence again typelib_TypeDescription* pSeqDesc= NULL; rSeq.getValueTypeDescription( &pSeqDesc); @@ -1283,7 +1283,7 @@ void UnoConversionUtilities<T>::getElementCountAndTypeOfSequence( const Any& rS // if the elements are Sequences than do recursion if( dim < seqElementCounts.getLength() ) - { + { uno_Sequence* pSeq = *(uno_Sequence* const*) rSeq.getValue(); uno_Sequence** arSequences= (uno_Sequence**)pSeq->elements; for( sal_Int32 i=0; i < dimCount; i++) @@ -1302,27 +1302,27 @@ void UnoConversionUtilities<T>::getElementCountAndTypeOfSequence( const Any& rS template<class T> -SAFEARRAY* UnoConversionUtilities<T>::createUnoSequenceWrapper(const Any& rSeq) +SAFEARRAY* UnoConversionUtilities<T>::createUnoSequenceWrapper(const Any& rSeq) { SAFEARRAY* pArray = NULL; sal_uInt32 n = 0; - + if( rSeq.getValueTypeClass() != TypeClass_SEQUENCE ) throw IllegalArgumentException( OUSTR("[automation bridge]UnoConversionUtilities<T>::createUnoSequenceWrapper\n" "The UNO argument is not a sequence"), 0, -1); - + uno_Sequence * punoSeq= *(uno_Sequence**) rSeq.getValue(); - + typelib_TypeDescriptionReference* pSeqTypeRef= rSeq.getValueTypeRef(); typelib_TypeDescription* pSeqType= NULL; TYPELIB_DANGER_GET( &pSeqType, pSeqTypeRef); - typelib_IndirectTypeDescription * pSeqIndDec= (typelib_IndirectTypeDescription*) pSeqType; - - + typelib_IndirectTypeDescription * pSeqIndDec= (typelib_IndirectTypeDescription*) pSeqType; + + typelib_TypeDescriptionReference * pSeqElementTypeRef= pSeqIndDec->pType; TYPELIB_DANGER_RELEASE( pSeqType); - + typelib_TypeDescription* pSeqElementDesc= NULL; TYPELIB_DANGER_GET( &pSeqElementDesc, pSeqElementTypeRef); @@ -1339,36 +1339,36 @@ SAFEARRAY* UnoConversionUtilities<T>::createUnoSequenceWrapper(const Any& rSeq) { sal_Int32 nElementSize= pSeqElementDesc->nSize; n= punoSeq->nElements; - + SAFEARRAYBOUND rgsabound[1]; rgsabound[0].lLbound = 0; rgsabound[0].cElements = n; VARIANT oleElement; long safeI[1]; - + pArray = SafeArrayCreate(VT_VARIANT, 1, rgsabound); - + Any unoElement; - // sal_uInt8 * pSeqData= (sal_uInt8*) punoSeq->pElements; + // sal_uInt8 * pSeqData= (sal_uInt8*) punoSeq->pElements; sal_uInt8 * pSeqData= (sal_uInt8*) punoSeq->elements; - + for (sal_uInt32 i = 0; i < n; i++) { unoElement.setValue( pSeqData + i * nElementSize, pSeqElementDesc); VariantInit(&oleElement); - + anyToVariant(&oleElement, unoElement); - + safeI[0] = i; SafeArrayPutElement(pArray, safeI, &oleElement); - + VariantClear(&oleElement); } } TYPELIB_DANGER_RELEASE( pSeqElementDesc); - - return pArray; + + return pArray; } /* The argument rObj can contain @@ -1383,7 +1383,7 @@ template<class T> void UnoConversionUtilities<T>::createUnoObjectWrapper(const Any & rObj, VARIANT * pVar) { MutexGuard guard(getBridgeMutex()); - + Reference<XInterface> xInt; TypeClass tc = rObj.getValueTypeClass(); @@ -1392,7 +1392,7 @@ void UnoConversionUtilities<T>::createUnoObjectWrapper(const Any & rObj, VARIANT OUSTR("[automation bridge]UnoConversionUtilities<T>::createUnoObjectWrapper \n" "Cannot create an Automation interface for a UNO type which is not " "a struct or interface!"), 0, -1); - + if (rObj.getValueTypeClass() == TypeClass_INTERFACE) { if (! (rObj >>= xInt)) @@ -1409,7 +1409,7 @@ void UnoConversionUtilities<T>::createUnoObjectWrapper(const Any & rObj, VARIANT //make sure we have the main XInterface which is used with a map xInt = Reference<XInterface>(xInt, UNO_QUERY); //If there is already a wrapper for the UNO object then use it - + Reference<XInterface> xIntWrapper; // Does a UNO wrapper exist already ? IT_Uno it_uno = UnoObjToWrapperMap.find( (sal_uInt32) xInt.get()); @@ -1422,7 +1422,7 @@ void UnoConversionUtilities<T>::createUnoObjectWrapper(const Any & rObj, VARIANT return; } } - // Is the object a COM wrapper ( either XInvocation, or Adapter object) + // Is the object a COM wrapper ( either XInvocation, or Adapter object) // or does it suppy an IDispatch by its own ? else { @@ -1453,15 +1453,15 @@ void UnoConversionUtilities<T>::createUnoObjectWrapper(const Any & rObj, VARIANT xInv= Reference<XInvocation>(xInt, UNO_QUERY); } } - + if (xInv.is()) - { + { Reference<XInterface> xNewWrapper = createUnoWrapperInstance(); Reference<XInitialization> xInitWrapper(xNewWrapper, UNO_QUERY); if (xInitWrapper.is()) { VARTYPE vartype= getVarType( rObj); - + if (xInt.is()) { Any params[3]; @@ -1477,7 +1477,7 @@ void UnoConversionUtilities<T>::createUnoObjectWrapper(const Any & rObj, VARIANT params[1] <<= vartype; xInitWrapper->initialize( Sequence<Any>(params, 2)); } - + // put the newly created object into a map. If the same object will // be mapped again and there is already a wrapper then the old wrapper // will be used. @@ -1488,9 +1488,9 @@ void UnoConversionUtilities<T>::createUnoObjectWrapper(const Any & rObj, VARIANT } } } - + template<class T> -void UnoConversionUtilities<T>::variantToAny( const VARIANT* pVariant, Any& rAny, +void UnoConversionUtilities<T>::variantToAny( const VARIANT* pVariant, Any& rAny, sal_Bool bReduceValueRange /* = sal_True */) { HRESULT hr = S_OK; @@ -1503,21 +1503,21 @@ void UnoConversionUtilities<T>::variantToAny( const VARIANT* pVariant, Any& rAny throw BridgeRuntimeError( OUSTR("[automation bridge] UnoConversionUtilities<T>::variantToAny \n" "VariantCopyInd failed for reason : ") + OUString::valueOf(hr)); - + if ( ! convertValueObject( & var, rAny)) { if ((var.vt & VT_ARRAY) > 0) { VARTYPE oleTypeFlags = ::sal::static_int_cast< VARTYPE, int >( var.vt ^ VT_ARRAY ); - + Sequence<Any> unoSeq = createOleArrayWrapper(var.parray, oleTypeFlags); rAny.setValue( &unoSeq, getCppuType( &unoSeq)); } else { - switch (var.vt) + switch (var.vt) { - case VT_EMPTY: + case VT_EMPTY: rAny.setValue(NULL, Type()); break; case VT_NULL: @@ -1633,7 +1633,7 @@ void UnoConversionUtilities<T>::variantToAny( const VARIANT* pVariant, Any& rAny rAny <<= dec; break; } - + default: break; } @@ -1665,7 +1665,7 @@ void UnoConversionUtilities<T>::variantToAny( const VARIANT* pVariant, Any& rAny "UnoConversionUtilities<T>::variantToAny !")); } -} +} // The function converts an IUnknown* into an UNO interface or struct. The // IUnknown pointer can constitute different kind of objects: // 1. a wrapper of an UNO struct (the wrapper was created by this bridge) @@ -1673,27 +1673,27 @@ void UnoConversionUtilities<T>::variantToAny( const VARIANT* pVariant, Any& rAny // 3. a dispatch object that implements UNO interfaces // 4. a dispatch object. -// If the parameter "aType" has a value then the COM object ( pUnknown) is supposed to -// implement the interface described by "aType". Moreover it ( pUnknown) can implement +// If the parameter "aType" has a value then the COM object ( pUnknown) is supposed to +// implement the interface described by "aType". Moreover it ( pUnknown) can implement // several other // UNO interfaces in which case it has to support the SUPPORTED_INTERFACES_PROP (see // #define) property. That property contains all names of interfaces. -// "pUnknown" is wrapped by a COM wrapper object that implements XInvocation, e.g. +// "pUnknown" is wrapped by a COM wrapper object that implements XInvocation, e.g. // IUnknownWrapper_Impl. Additionally an object of type "aType" is created by help // of the INTERFACE_ADAPTER_FACTORY (see #define) service. The implementation of // "aType" calls on the COM wrapper's XInvocation::invoke. If the COM object supports -// more then one UNO interfaces, as can be determined by the property +// more then one UNO interfaces, as can be determined by the property // SUPPORTED_INTERFACES_PROP, then the INTERFACE_ADAPTER_FACTORY creates an object that // implements all these interfaces. -// This is only done if "pUnknown" is not already a UNO wrapper, +// This is only done if "pUnknown" is not already a UNO wrapper, // that is it is actually NOT an UNO object that was converted to a COM object. If it is an // UNO wrapper than the original UNO object is being extracted, queried for "aType" (if // it is no struct) and returned. template<class T> #ifdef __MINGW32__ -Any UnoConversionUtilities<T>::createOleObjectWrapper(VARIANT* pVar, const Type& aType) +Any UnoConversionUtilities<T>::createOleObjectWrapper(VARIANT* pVar, const Type& aType) #else -Any UnoConversionUtilities<T>::createOleObjectWrapper(VARIANT* pVar, const Type& aType= Type()) +Any UnoConversionUtilities<T>::createOleObjectWrapper(VARIANT* pVar, const Type& aType= Type()) #endif { //To allow passing "Nothing" in VS 2008 we need to accept VT_EMPTY @@ -1706,7 +1706,7 @@ Any UnoConversionUtilities<T>::createOleObjectWrapper(VARIANT* pVar, const Type& CComPtr<IUnknown> spUnknown; CComPtr<IDispatch> spDispatch; - + if (pVar->vt == VT_UNKNOWN) { spUnknown = pVar->punkVal; @@ -1727,7 +1727,7 @@ Any UnoConversionUtilities<T>::createOleObjectWrapper(VARIANT* pVar, const Type& spDispatch.QueryInterface( & spUnknown.p); #endif } - + static Type VOID_TYPE= Type(); Any ret; //If no Type is provided and pVar contains IUnknown then we return a XInterface. @@ -1747,12 +1747,12 @@ Any UnoConversionUtilities<T>::createOleObjectWrapper(VARIANT* pVar, const Type& break; default: desiredType = aType; - } + } } // COM pointer are NULL, no wrapper required if (spUnknown == NULL) - { + { Reference<XInterface> xInt; if( aType.getTypeClass() == TypeClass_INTERFACE) ret.setValue( &xInt, aType); @@ -1762,8 +1762,8 @@ Any UnoConversionUtilities<T>::createOleObjectWrapper(VARIANT* pVar, const Type& ret <<= xInt; return ret; } - - + + // Check if "spUnknown" is a UNO wrapper, that is an UNO object that has been // passed to COM. Then it supports IUnoObjectWrapper // and we extract the original UNO object. @@ -1787,7 +1787,7 @@ Any UnoConversionUtilities<T>::createOleObjectWrapper(VARIANT* pVar, const Type& } return ret; } - + // "spUnknown" is a real COM object. // Before we create a new wrapper object we check if there is an existing wrapper // There can be two kinds of wrappers, those who wrap dispatch - UNO objects, and those who @@ -1814,7 +1814,7 @@ Any UnoConversionUtilities<T>::createOleObjectWrapper(VARIANT* pVar, const Type& if (seqTypes.getLength() > 0) { //It is a COM UNO object - xIntAdapter = createAdapter(seqTypes, xIntWrapper); + xIntAdapter = createAdapter(seqTypes, xIntWrapper); } else { @@ -1840,7 +1840,7 @@ Any UnoConversionUtilities<T>::createOleObjectWrapper(VARIANT* pVar, const Type& "The COM object is not suitable for the UNO type: ") + desiredType.getTypeName(), 0, -1); } - + return ret; } // No existing wrapper. Therefore create a new proxy. @@ -1859,7 +1859,7 @@ Any UnoConversionUtilities<T>::createOleObjectWrapper(VARIANT* pVar, const Type& OUSTR("[automation bridge]UnoConversionUtilities<T>::createOleObjectWrapper \n" "Could not create proxy object for COM object!")); - // initialize the COM wrapper + // initialize the COM wrapper Reference<XInitialization> xInit( xIntNewProxy, UNO_QUERY); OSL_ASSERT( xInit.is()); @@ -1872,29 +1872,29 @@ Any UnoConversionUtilities<T>::createOleObjectWrapper(VARIANT* pVar, const Type& sal_Bool bDisp = pVar->vt == VT_DISPATCH ? sal_True : sal_False; params[1].setValue( & bDisp, getBooleanCppuType()); params[2] <<= seqTypes; - + xInit->initialize( Sequence<Any>( params, 3)); #ifdef __MINGW32__ - ComPtrToWrapperMap[reinterpret_cast<sal_uInt32>( spUnknown.p )]= xIntNewProxy; + ComPtrToWrapperMap[reinterpret_cast<sal_uInt32>( spUnknown.p )]= xIntNewProxy; #else - ComPtrToWrapperMap[reinterpret_cast<sal_uInt32>(spUnknown.p)]= xIntNewProxy; + ComPtrToWrapperMap[reinterpret_cast<sal_uInt32>(spUnknown.p)]= xIntNewProxy; #endif - + // we have a wrapper object //The wrapper implements already XInvocation and XInterface. If - //param aType is void then the object is supposed to have XInvocation. + //param aType is void then the object is supposed to have XInvocation. if (aType == getCppuType((Reference<XInvocation>*)0) || (aType == VOID_TYPE && seqTypes.getLength() == 0 )) { ret = xIntNewProxy->queryInterface(desiredType); } - else + else { Reference<XInterface> xIntAdapter = createAdapter(seqTypes, xIntNewProxy); ret = xIntAdapter->queryInterface(desiredType); } - return ret; + return ret; } template<class T> Reference<XInterface> UnoConversionUtilities<T>::createAdapter(const Sequence<Type>& seqTypes, @@ -1903,18 +1903,18 @@ Reference<XInterface> UnoConversionUtilities<T>::createAdapter(const Sequence<Ty Reference< XInterface> xIntAdapterFac; xIntAdapterFac= m_smgr->createInstance(INTERFACE_ADAPTER_FACTORY); // We create an adapter object that does not only implement the required type but also - // all types that the COM object pretends to implement. An COM object must therefore - // support the property "_implementedInterfaces". + // all types that the COM object pretends to implement. An COM object must therefore + // support the property "_implementedInterfaces". Reference<XInterface> xIntAdapted; Reference<XInvocation> xInv(receiver, UNO_QUERY); Reference<XInvocationAdapterFactory2> xAdapterFac( xIntAdapterFac, UNO_QUERY); if( xAdapterFac.is()) xIntAdapted= xAdapterFac->createAdapter( xInv, seqTypes); - + if( xIntAdapted.is()) { // Put the pointer to the wrapper object and the interface pointer of the adapted interface - // in a global map. Thus we can determine in a call to createUnoObjectWrapper whether the UNO + // in a global map. Thus we can determine in a call to createUnoObjectWrapper whether the UNO // object is a wrapped COM object. In that case we extract the original COM object rather than // creating a wrapper around the UNO object. typedef hash_map<sal_uInt32,sal_uInt32>::value_type VALUE; @@ -1929,8 +1929,8 @@ Reference<XInterface> UnoConversionUtilities<T>::createAdapter(const Sequence<Ty } return xIntAdapted; } -// "convertValueObject" converts a JScriptValue object contained in "var" into -// an any. The type contained in the any is stipulated by a "type value" thas +// "convertValueObject" converts a JScriptValue object contained in "var" into +// an any. The type contained in the any is stipulated by a "type value" thas // was set within the JScript script on the value object ( see JScriptValue). template<class T> bool UnoConversionUtilities<T>::convertValueObject( const VARIANTARG *var, Any& any) @@ -1941,7 +1941,7 @@ bool UnoConversionUtilities<T>::convertValueObject( const VARIANTARG *var, Any& bool bFail = false; HRESULT hr= S_OK; CComVariant varDisp; - + if(SUCCEEDED(hr = varDisp.ChangeType( VT_DISPATCH, var))) { CComPtr <IJScriptValueObject> spValue; @@ -1951,7 +1951,7 @@ bool UnoConversionUtilities<T>::convertValueObject( const VARIANTARG *var, Any& CComPtr<IDispatch> spDisp( varDisp.pdispVal); if(spDisp) { - if(SUCCEEDED( spDisp->QueryInterface( __uuidof( IJScriptValueObject), + if(SUCCEEDED( spDisp->QueryInterface( __uuidof( IJScriptValueObject), reinterpret_cast<void**> (&spValue)))) { ret = true; // is is a ValueObject @@ -1975,13 +1975,13 @@ bool UnoConversionUtilities<T>::convertValueObject( const VARIANTARG *var, Any& } } else - bFail = true;; + bFail = true;; } } } else if( hr != DISP_E_TYPEMISMATCH && hr != E_NOINTERFACE) bFail = true; - + if (bFail) throw BridgeRuntimeError( OUSTR("[automation bridge] Conversion of ValueObject failed ")); @@ -2016,19 +2016,19 @@ void UnoConversionUtilities<T>::dispatchExObject2Sequence( const VARIANTARG* pva "Conversion of dispatch object to Sequence failed!")); IDispatchEx* pdispEx; HRESULT hr; - if( FAILED( hr= pvar->pdispVal->QueryInterface( IID_IDispatchEx, + if( FAILED( hr= pvar->pdispVal->QueryInterface( IID_IDispatchEx, reinterpret_cast<void**>( &pdispEx)))) throw BridgeRuntimeError(OUSTR("[automation bridge] UnoConversionUtilities<T>::dispatchExObject2Sequence \n" "Conversion of dispatch object to Sequence failed!")); - + DISPID dispid; OUString sindex; DISPPARAMS param= {0,0,0,0}; CComVariant result; - + OLECHAR* sLength= L"length"; - - // Get the length of the array. Can also be obtained throu GetNextDispID. The + + // Get the length of the array. Can also be obtained throu GetNextDispID. The // method only returns DISPIDs of the array data. Their names are like "0", "1" etc. if( FAILED( hr= pdispEx->GetIDsOfNames(IID_NULL, &sLength , 1, LOCALE_USER_DEFAULT, &dispid))) throw BridgeRuntimeError(OUSTR("[automation bridge] UnoConversionUtilities<T>::dispatchExObject2Sequence \n" @@ -2036,20 +2036,20 @@ void UnoConversionUtilities<T>::dispatchExObject2Sequence( const VARIANTARG* pva if( FAILED( hr= pdispEx->InvokeEx(dispid, LOCALE_USER_DEFAULT, DISPATCH_PROPERTYGET, ¶m, &result, NULL, NULL))) throw BridgeRuntimeError(OUSTR("[automation bridge] UnoConversionUtilities<T>::dispatchExObject2Sequence \n" - "Conversion of dispatch object to Sequence failed!")); + "Conversion of dispatch object to Sequence failed!")); if( FAILED( VariantChangeType( &result, &result, 0, VT_I4))) throw BridgeRuntimeError(OUSTR("[automation bridge] UnoConversionUtilities<T>::dispatchExObject2Sequence \n" - "Conversion of dispatch object to Sequence failed!")); + "Conversion of dispatch object to Sequence failed!")); long length= result.lVal; result.Clear(); - + // get a few basic facts about the sequence, and reallocate: // create the Sequences // get the size of the elements typelib_TypeDescription *pDesc= NULL; type.getDescription( &pDesc); - + typelib_IndirectTypeDescription *pSeqDesc= reinterpret_cast<typelib_IndirectTypeDescription*>(pDesc); typelib_TypeDescriptionReference *pSeqElemDescRef= pSeqDesc->pType; // type of the Sequence' elements Type elemType( pSeqElemDescRef); @@ -2057,41 +2057,41 @@ void UnoConversionUtilities<T>::dispatchExObject2Sequence( const VARIANTARG* pva TYPELIB_DANGER_GET( &pSeqElemDesc, pSeqElemDescRef) sal_uInt32 nelementSize= pSeqElemDesc->nSize; TYPELIB_DANGER_RELEASE( pSeqElemDesc) - + uno_Sequence *p_uno_Seq; uno_sequence_construct( &p_uno_Seq, pDesc, NULL, length, cpp_acquire); - + typelib_TypeClass typeElement= pSeqDesc->pType->eTypeClass; char *pArray= p_uno_Seq->elements; - + // Get All properties in the object, convert their values to the expected type and // put them into the passed in sequence for( sal_Int32 i= 0; i< length; i++) { OUString ousIndex=OUString::valueOf( i); OLECHAR* sindex = (OLECHAR*)ousIndex.getStr(); - + if( FAILED( hr= pdispEx->GetIDsOfNames(IID_NULL, &sindex , 1, LOCALE_USER_DEFAULT, &dispid))) { throw BridgeRuntimeError(OUSTR("[automation bridge] UnoConversionUtilities<T>::dispatchExObject2Sequence \n" - "Conversion of dispatch object to Sequence failed!")); + "Conversion of dispatch object to Sequence failed!")); } if( FAILED( hr= pdispEx->InvokeEx(dispid, LOCALE_USER_DEFAULT, DISPATCH_PROPERTYGET, ¶m, &result, NULL, NULL))) { throw BridgeRuntimeError(OUSTR("[automation bridge] UnoConversionUtilities<T>::dispatchExObject2Sequence \n" "Conversion of dispatch object to Sequence failed!")); - } - + } + // If the result is VT_DISPATCH than the Sequence's element type could be Sequence // Look that up in the CoreReflection to make clear. // That requires a recursiv conversion - Any any; + Any any; // Destination address within the out-Sequence "anySeq" where to copy the next converted element void* pDest= (void*)(pArray + (i * nelementSize)); - + if( result.vt & VT_DISPATCH && typeElement == typelib_TypeClass_SEQUENCE) - { + { variantToAny( &result, any, elemType, sal_False); // copy the converted VARIANT, that is a Sequence to the Sequence uno_Sequence * p_unoSeq= *(uno_Sequence**)any.getValue(); @@ -2100,7 +2100,7 @@ void UnoConversionUtilities<T>::dispatchExObject2Sequence( const VARIANTARG* pva memcpy( pDest, &p_unoSeq, nelementSize); osl_incrementInterlockedCount( &p_unoSeq->nRefCount); } - else // Element type is no Sequence -> do one conversion + else // Element type is no Sequence -> do one conversion { variantToAny( &result, any, elemType, sal_False); if( typeElement == typelib_TypeClass_ANY) @@ -2122,7 +2122,7 @@ void UnoConversionUtilities<T>::dispatchExObject2Sequence( const VARIANTARG* pva anySeq.setValue( &p_uno_Seq, pDesc); uno_destructData( &p_uno_Seq, pDesc, cpp_release); typelib_typedescription_release( pDesc); - + if (bFail) throw BridgeRuntimeError( OUSTR("[automation bridge] Conversion of ValueObject failed ")); @@ -2148,7 +2148,7 @@ void UnoConversionUtilities<T>::dispatchExObject2Sequence( const VARIANTARG* pva /* The argument unotype is the type that is expected by the currently called UNO function. For example: []long, [][]long. If the function calls itself recursively then the element type is passed on. For example a two dimensional SAFEARRAY of type VT_I4 is to be converted. Then - unotype has to be either void or [][]long. When the function calls itself recursivly then + unotype has to be either void or [][]long. When the function calls itself recursivly then it passes the element type which is []long. */ template<class T> @@ -2164,14 +2164,14 @@ Sequence<Any> UnoConversionUtilities<T>::createOleArrayWrapperOfDim(SAFEARRAY* p SafeArrayGetUBound(pArray, actDim, &uBound); nCountElements= uBound - lBound +1; - Sequence<Any> anySeq(nCountElements); - Any* pUnoArray = anySeq.getArray(); - + Sequence<Any> anySeq(nCountElements); + Any* pUnoArray = anySeq.getArray(); + for (index[actDim - 1] = lBound; index[actDim - 1] <= uBound; index[actDim - 1]++) { if (actDim > 1 ) { - Sequence<Any> element = createOleArrayWrapperOfDim(pArray, dimCount, + Sequence<Any> element = createOleArrayWrapperOfDim(pArray, dimCount, actDim - 1, index, type, getElementTypeOfSequence(unotype)); pUnoArray[index[actDim - 1] - lBound].setValue(&element, getCppuType(&element)); @@ -2179,7 +2179,7 @@ Sequence<Any> UnoConversionUtilities<T>::createOleArrayWrapperOfDim(SAFEARRAY* p else { VARIANT variant; - + VariantInit(&variant); V_VT(&variant) = type; @@ -2236,18 +2236,18 @@ Sequence<Any> UnoConversionUtilities<T>::createOleArrayWrapperOfDim(SAFEARRAY* p break; default: break; - } + } if( unotype.getTypeClass() == TypeClass_VOID) // the function was called without specifying the destination type variantToAny(&variant, pUnoArray[index[actDim - 1] - lBound], sal_False); else - variantToAny(&variant, pUnoArray[index[actDim - 1] - lBound], + variantToAny(&variant, pUnoArray[index[actDim - 1] - lBound], getElementTypeOfSequence(unotype), sal_False); VariantClear(&variant); } - } + } return anySeq; } @@ -2280,12 +2280,12 @@ Sequence<Any> UnoConversionUtilities<T>::createOleArrayWrapper(SAFEARRAY* pArray for (unsigned int i = 0; i < dim; i++) { index[i] = 0; - } - - ret = createOleArrayWrapperOfDim(pArray, dim, dim, index, type, unoType); + } + + ret = createOleArrayWrapperOfDim(pArray, dim, dim, index, type, unoType); } - - return ret; + + return ret; } // If an VARIANT has the type VT_DISPATCH it can either be an JScript Array @@ -2303,15 +2303,15 @@ sal_Bool UnoConversionUtilities<T>::isJScriptArray(const VARIANT* rvar) DISPID id; if ( rvar->vt == VT_DISPATCH && rvar->pdispVal ) { - hr= rvar->pdispVal->GetIDsOfNames( IID_NULL, &sindex, 1, + hr= rvar->pdispVal->GetIDsOfNames( IID_NULL, &sindex, 1, LOCALE_USER_DEFAULT, &id); - + if( SUCCEEDED ( hr) ) return sal_True; } return sal_False; -} +} template<class T> VARTYPE UnoConversionUtilities<T>::mapTypeClassToVartype( TypeClass type) @@ -2331,7 +2331,7 @@ VARTYPE UnoConversionUtilities<T>::mapTypeClassToVartype( TypeClass type) break; case TypeClass_BOOLEAN: ret= VT_BOOL; break; - case TypeClass_CHAR: ret= VT_I2; + case TypeClass_CHAR: ret= VT_I2; break; case TypeClass_STRING: ret= VT_BSTR; break; @@ -2365,13 +2365,13 @@ Sequence<Type> UnoConversionUtilities<T>::getImplementedInterfaces(IUnknown* pUn CComVariant var; HRESULT hr= S_OK; // There are two different property names possible. - if( FAILED( hr= disp.GetPropertyByName( SUPPORTED_INTERFACES_PROP, &var))) + if( FAILED( hr= disp.GetPropertyByName( SUPPORTED_INTERFACES_PROP, &var))) { hr= disp.GetPropertyByName( SUPPORTED_INTERFACES_PROP2, &var); } if (SUCCEEDED( hr)) { - // we exspect an array( SafeArray or IDispatch) of Strings. + // we exspect an array( SafeArray or IDispatch) of Strings. Any anyNames; variantToAny( &var, anyNames, getCppuType( (Sequence<Any>*) 0)); Sequence<Any> seqAny; @@ -2409,12 +2409,12 @@ Reference<XTypeConverter> UnoConversionUtilities<T>::getTypeConverter() // This function tries to the change the type of a value (contained in the Any) // to the smallest possible that can hold the value. This is actually done only // for types of VT_I4 (see o2u_variantToAny). The reason is the following: -// JavaScript passes integer values always as VT_I4. If there is a parameter or +// JavaScript passes integer values always as VT_I4. If there is a parameter or // property of type any then the bridge converts the any's content according // to "o2u_variantToAny". Because the VARTYPE is VT_I4 the value would be converted // to TypeClass_LONG. Say the method XPropertySet::setPropertyValue( string name, any value) -// would be called on an object and the property actually is of TypeClass_SHORT. -// After conversion of the VARIANT parameter the Any would contain type +// would be called on an object and the property actually is of TypeClass_SHORT. +// After conversion of the VARIANT parameter the Any would contain type // TypeClass_LONG. Because the corereflection does not cast from long to short // the "setPropertValue" would fail as the value has not the right type. diff --git a/extensions/source/ole/unoobjw.cxx b/extensions/source/ole/unoobjw.cxx index cae9ecb5caa3..9cd131487dc4 100644 --- a/extensions/source/ole/unoobjw.cxx +++ b/extensions/source/ole/unoobjw.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -90,7 +90,7 @@ hash_map<sal_uInt32, WeakReference<XInterface> > UnoObjToWrapperMap; static sal_Bool writeBackOutParameter(VARIANTARG* pDest, VARIANT* pSource); static sal_Bool writeBackOutParameter2( VARIANTARG* pDest, VARIANT* pSource); static HRESULT mapCannotConvertException( CannotConvertException e, unsigned int * puArgErr); - + /* Does not throw any exceptions. Param pInfo can be NULL. @@ -108,7 +108,7 @@ static void writeExcepinfo(EXCEPINFO * pInfo, const OUString& message) /***************************************************************************** class implementation: InterfaceOleWrapper_Impl - + *****************************************************************************/ InterfaceOleWrapper_Impl::InterfaceOleWrapper_Impl( Reference<XMultiServiceFactory>& xFactory, sal_uInt8 unoWrapperClass, sal_uInt8 comWrapperClass): @@ -127,9 +127,9 @@ InterfaceOleWrapper_Impl::~InterfaceOleWrapper_Impl() #if OSL_DEBUG_LEVEL > 0 fprintf(stderr,"[automation bridge] UnoObjToWrapperMap contains: %i \n", UnoObjToWrapperMap.size()); -#endif - -} +#endif + +} STDMETHODIMP InterfaceOleWrapper_Impl::QueryInterface(REFIID riid, LPVOID FAR * ppv) { @@ -142,7 +142,7 @@ STDMETHODIMP InterfaceOleWrapper_Impl::QueryInterface(REFIID riid, LPVOID FAR * { AddRef(); *ppv = (IUnknown*) (IDispatch*) this; - } + } else if (IsEqualIID(riid, IID_IDispatch)) { AddRef(); @@ -156,7 +156,7 @@ STDMETHODIMP InterfaceOleWrapper_Impl::QueryInterface(REFIID riid, LPVOID FAR * else ret= E_NOINTERFACE; return ret; -} +} STDMETHODIMP_(ULONG) InterfaceOleWrapper_Impl::AddRef() { @@ -164,14 +164,14 @@ STDMETHODIMP_(ULONG) InterfaceOleWrapper_Impl::AddRef() // does not need to guard because one should not rely on the return value of // AddRef anyway return m_refCount; -} +} STDMETHODIMP_(ULONG) InterfaceOleWrapper_Impl::Release() { ULONG n= m_refCount; release(); return n - 1; -} +} // IUnoObjectWrapper -------------------------------------------------------- STDMETHODIMP InterfaceOleWrapper_Impl::getWrapperXInterface( Reference<XInterface>* pXInt) @@ -206,17 +206,17 @@ STDMETHODIMP InterfaceOleWrapper_Impl::getOriginalUnoStruct( Any * pStruct) STDMETHODIMP InterfaceOleWrapper_Impl::GetTypeInfoCount( unsigned int * /*pctinfo*/ ) { return E_NOTIMPL ; -} +} STDMETHODIMP InterfaceOleWrapper_Impl::GetTypeInfo(unsigned int /*itinfo*/, LCID /*lcid*/, ITypeInfo ** /*pptinfo*/) { return E_NOTIMPL; -} +} -STDMETHODIMP InterfaceOleWrapper_Impl::GetIDsOfNames(REFIID /*riid*/, - OLECHAR ** rgszNames, +STDMETHODIMP InterfaceOleWrapper_Impl::GetIDsOfNames(REFIID /*riid*/, + OLECHAR ** rgszNames, unsigned int cNames, - LCID /*lcid*/, + LCID /*lcid*/, DISPID * rgdispid ) { HRESULT ret = DISP_E_UNKNOWNNAME; @@ -227,7 +227,7 @@ STDMETHODIMP InterfaceOleWrapper_Impl::GetIDsOfNames(REFIID /*riid*/, return E_POINTER; // ---------------------------------------- - if( ! _wcsicmp( *rgszNames, JSCRIPT_VALUE_FUNC) || + if( ! _wcsicmp( *rgszNames, JSCRIPT_VALUE_FUNC) || ! _wcsicmp( *rgszNames, BRIDGE_VALUE_FUNC)) { *rgdispid= DISPID_JSCRIPT_VALUE_FUNC; @@ -250,46 +250,46 @@ STDMETHODIMP InterfaceOleWrapper_Impl::GetIDsOfNames(REFIID /*riid*/, { OUString name(reinterpret_cast<const sal_Unicode*>(rgszNames[0])); NameToIdMap::iterator iter = m_nameToDispIdMap.find(name); - + if (iter == m_nameToDispIdMap.end()) { OUString exactName; - + if (m_xExactName.is()) { exactName = m_xExactName->getExactName(name); } else - { + { exactName = name; } - + MemberInfo d(0, exactName); - + if (m_xInvocation->hasProperty(exactName)) { - d.flags |= DISPATCH_PROPERTYGET; + d.flags |= DISPATCH_PROPERTYGET; d.flags |= DISPATCH_PROPERTYPUT; d.flags |= DISPATCH_PROPERTYPUTREF; } - + if (m_xInvocation->hasMethod(exactName)) { - d.flags |= DISPATCH_METHOD; + d.flags |= DISPATCH_METHOD; } - + if (d.flags != 0) { m_MemberInfos.push_back(d); iter = m_nameToDispIdMap.insert(NameToIdMap::value_type(exactName, (DISPID)m_MemberInfos.size())).first; - + if (exactName != name) { iter = m_nameToDispIdMap.insert(NameToIdMap::value_type(name, (DISPID)m_MemberInfos.size())).first; } - } + } } - + if (iter == m_nameToDispIdMap.end()) { ret = DISP_E_UNKNOWNNAME; @@ -299,7 +299,7 @@ STDMETHODIMP InterfaceOleWrapper_Impl::GetIDsOfNames(REFIID /*riid*/, *rgdispid = (*iter).second; ret = S_OK; } - } + } } catch(BridgeRuntimeError& ) { @@ -315,12 +315,12 @@ STDMETHODIMP InterfaceOleWrapper_Impl::GetIDsOfNames(REFIID /*riid*/, } return ret; -} - +} + // "convertDispparamsArgs" converts VARIANTS to their respecting Any counterparts -// The parameters "id", "wFlags" and "pdispparams" equal those as used in -// IDispatch::Invoke. The function handles special JavaScript -// cases where a VARIANT of type VT_DISPATCH is ambiguous and could represent +// The parameters "id", "wFlags" and "pdispparams" equal those as used in +// IDispatch::Invoke. The function handles special JavaScript +// cases where a VARIANT of type VT_DISPATCH is ambiguous and could represent // an object, array ( JavaScript Array object), out parameter and in/out ( JavaScript Array object) // parameter (JavaScript Array object) // Because all those VT_DISPATCH objects need a different conversion @@ -329,10 +329,10 @@ STDMETHODIMP InterfaceOleWrapper_Impl::GetIDsOfNames(REFIID /*riid*/, // A. Type Information // ----------------------------------------------------------------------------- -// With the help of type information the kind of parameter can be exactly determined -// and an appropriate conversion can be choosen. A problem arises if a method expects -// an Any. Then the type info does not tell what the type of the value, that is kept -// by the any, should be. In this situation the decision wheter the param is a +// With the help of type information the kind of parameter can be exactly determined +// and an appropriate conversion can be choosen. A problem arises if a method expects +// an Any. Then the type info does not tell what the type of the value, that is kept +// by the any, should be. In this situation the decision wheter the param is a // sequence or an object is made upon the fact if the object has a property "0" // ( see function "isJScriptArray"). Since this is unsafe it is recommended to use // the JScript value objects within a JScript script on such an occasion. @@ -340,18 +340,18 @@ STDMETHODIMP InterfaceOleWrapper_Impl::GetIDsOfNames(REFIID /*riid*/, // B. JavaScript Value Object ( class JScriptValue ) // ----------------------------------------------------------------------------- // A JScriptValue (ValueObject) object is a COM object in that it implements IDispatch and the -// IJScriptValue object interface. Such objects are provided by all UNO wrapper +// IJScriptValue object interface. Such objects are provided by all UNO wrapper // objects used within a JScript script. To obtain an instance one has to call // "_GetValueObject() or Bridge_GetValueObject()" on an UNO wrapper object (class InterfaceOleWrapper_Impl). -// A value object is appropriately initialized within the script and passed as +// A value object is appropriately initialized within the script and passed as // parameter to an UNO object method or property. The convertDispparamsArgs function -// can easily find out that a param is such an object by queriing for the +// can easily find out that a param is such an object by queriing for the // IJScriptValue interface. By this interface one the type and kind ( out, in/out) -// can be determined and the right conversion can be applied. +// can be determined and the right conversion can be applied. // Using ValueObjects we spare us the effort of aquiring and examining type information // in order to figure out what the an IDispatch parameter is meant for. -// Normal JScript object parameter can be mixed with JScriptValue object. If an +// Normal JScript object parameter can be mixed with JScriptValue object. If an // VARIANT contains an VT_DISPATCH that is no JScriptValue than the type information // is used to find out about the reqired type. void InterfaceOleWrapper_Impl::convertDispparamsArgs(DISPID id, @@ -359,11 +359,11 @@ void InterfaceOleWrapper_Impl::convertDispparamsArgs(DISPID id, { HRESULT hr= S_OK; sal_Int32 countArgs= pdispparams->cArgs; - if( countArgs == 0) + if( countArgs == 0) return; - + rSeq.realloc( countArgs); - Any* pParams = rSeq.getArray(); + Any* pParams = rSeq.getArray(); Any anyParam; @@ -373,14 +373,14 @@ void InterfaceOleWrapper_Impl::convertDispparamsArgs(DISPID id, throw BridgeRuntimeError( OUSTR("[automation bridge]InterfaceOleWrapper_Impl::convertDispparamsArgs \n" "Could not obtain type information for current call.")); - + for (int i = 0; i < countArgs; i++) { if (info.eMemberType == MemberType_METHOD && info.aParamModes[ countArgs - i -1 ] == ParamMode_OUT) continue; - if(convertValueObject( & pdispparams->rgvarg[i], anyParam)) + if(convertValueObject( & pdispparams->rgvarg[i], anyParam)) { //a param is a ValueObject and could be converted pParams[countArgs - (i + 1)] = anyParam; continue; @@ -389,13 +389,13 @@ void InterfaceOleWrapper_Impl::convertDispparamsArgs(DISPID id, // If the param is an out, in/out parameter in // JScript (Array object, with value at index 0) then we // extract Array[0] and put the value into varParam. At the end of the loop varParam - // is converted if it contains a value otherwise the VARIANT from + // is converted if it contains a value otherwise the VARIANT from // DISPPARAMS is converted. CComVariant varParam; // Check for JScript out and in/out paramsobjects (VT_DISPATCH). // To find them out we use typeinformation of the function being called. - if( pdispparams->rgvarg[i].vt == VT_DISPATCH ) + if( pdispparams->rgvarg[i].vt == VT_DISPATCH ) { if( info.eMemberType == MemberType_METHOD && info.aParamModes[ countArgs - i -1 ] == ParamMode_INOUT) { @@ -404,12 +404,12 @@ void InterfaceOleWrapper_Impl::convertDispparamsArgs(DISPID id, // Array object. // Get the IN-param at index "0" IDispatch* pdisp= pdispparams->rgvarg[i].pdispVal; - + OLECHAR* sindex= L"0"; DISPID id; DISPPARAMS noParams= {0,0,0,0}; if(SUCCEEDED( hr= pdisp->GetIDsOfNames( IID_NULL, &sindex, 1, LOCALE_USER_DEFAULT, &id))) - hr= pdisp->Invoke( id, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_PROPERTYGET, + hr= pdisp->Invoke( id, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_PROPERTYGET, & noParams, & varParam, NULL, NULL); if( FAILED( hr)) { @@ -431,27 +431,27 @@ void InterfaceOleWrapper_Impl::convertDispparamsArgs(DISPID id, variantToAny( & varParam, anyParam, info.aType); else OSL_ASSERT(0); - + pParams[countArgs - (i + 1)]= anyParam; }// end for / iterating over all parameters } sal_Bool InterfaceOleWrapper_Impl::getInvocationInfoForCall( DISPID id, InvocationInfo& info) { - sal_Bool bTypesAvailable= sal_False; - + sal_Bool bTypesAvailable= sal_False; + if( !m_xInvocation.is() )return false; Reference<XInvocation2> inv2( m_xInvocation, UNO_QUERY); if( inv2.is()) { - // We need the name of the property or method to get its type information. + // We need the name of the property or method to get its type information. // The name can be identified through the param "id" - // that is kept as value in the map m_nameToDispIdMap. - // Proplem: the Windows JScript engine sometimes changes small letters to capital + // that is kept as value in the map m_nameToDispIdMap. + // Proplem: the Windows JScript engine sometimes changes small letters to capital // letters as happens in xidlclass_obj.createObject( var) // in JScript. // IDispatch::GetIdsOfNames is then called with "CreateObject" !!! // m_nameToDispIdMap can contain several names for one DISPID but only one is - // the exact one. If there's no m_xExactName and therefore no exact name then + // the exact one. If there's no m_xExactName and therefore no exact name then // there's only one entry in the map. typedef NameToIdMap::const_iterator cit; OUString sMemberName; @@ -463,7 +463,7 @@ sal_Bool InterfaceOleWrapper_Impl::getInvocationInfoForCall( DISPID id, Invocat sMemberName= (*ci1).first; break; } - } + } // Get information for the current call ( property or method). // There could be similar names which only differ in the cases // of letters. First we assume that the name which was passed into @@ -478,7 +478,7 @@ sal_Bool InterfaceOleWrapper_Impl::getInvocationInfoForCall( DISPID id, Invocat { validInfo= sal_False; } - + if( ! validInfo) { invInfo= inv2->getInfoForName( sMemberName, sal_True); @@ -496,20 +496,20 @@ sal_Bool InterfaceOleWrapper_Impl::getInvocationInfoForCall( DISPID id, Invocat // If sourceModelType is UNO than any UNO interface implemented by InterfaceOleWrapper_Impl // can bridged to IDispatch ( if destModelType == OLE). The IDispatch is // implemented by this class. -Any SAL_CALL InterfaceOleWrapper_Impl::createBridge(const Any& modelDepObject, - const Sequence<sal_Int8>& /*ProcessId*/, - sal_Int16 sourceModelType, - sal_Int16 destModelType) +Any SAL_CALL InterfaceOleWrapper_Impl::createBridge(const Any& modelDepObject, + const Sequence<sal_Int8>& /*ProcessId*/, + sal_Int16 sourceModelType, + sal_Int16 destModelType) throw (IllegalArgumentException, RuntimeException) { Any retAny; - if( sourceModelType == UNO && destModelType == OLE && + if( sourceModelType == UNO && destModelType == OLE && modelDepObject.getValueTypeClass() == TypeClass_INTERFACE ) { Reference<XInterface> xInt; if( modelDepObject >>= xInt ) - { + { if( xInt == Reference<XInterface>( static_cast<XWeak*>( this), UNO_QUERY)) { VARIANT *pVar= (VARIANT*)CoTaskMemAlloc( sizeof( VARIANT)); @@ -530,7 +530,7 @@ Any SAL_CALL InterfaceOleWrapper_Impl::createBridge(const Any& modelDepObject, // XInitialization -------------------------------------------------- -void SAL_CALL InterfaceOleWrapper_Impl::initialize( const Sequence< Any >& aArguments ) +void SAL_CALL InterfaceOleWrapper_Impl::initialize( const Sequence< Any >& aArguments ) throw(Exception, RuntimeException) { switch( aArguments.getLength() ) @@ -558,7 +558,7 @@ Reference< XInterface > InterfaceOleWrapper_Impl::createUnoWrapperInstance() Reference<XInterface> InterfaceOleWrapper_Impl::createComWrapperInstance() { - Reference<XWeak> xWeak= static_cast<XWeak*>( new IUnknownWrapper_Impl( + Reference<XWeak> xWeak= static_cast<XWeak*>( new IUnknownWrapper_Impl( m_smgr, m_nUnoWrapperClass, m_nComWrapperClass)); return Reference<XInterface>( xWeak, UNO_QUERY); } @@ -571,7 +571,7 @@ bool getType( const BSTR name, Type & type) { Type retType; bool ret = false; - typelib_TypeDescription * pDesc= NULL; + typelib_TypeDescription * pDesc= NULL; OUString str( reinterpret_cast<const sal_Unicode*>(name)); typelib_typedescription_getByName( &pDesc, str.pData ); if( pDesc) @@ -585,12 +585,12 @@ bool getType( const BSTR name, Type & type) static sal_Bool writeBackOutParameter2( VARIANTARG* pDest, VARIANT* pSource) { - sal_Bool ret = sal_False; + sal_Bool ret = sal_False; HRESULT hr; // Handle JScriptValue objects and JScript out params ( Array object ) CComVariant varDest( *pDest); - + if( SUCCEEDED( varDest.ChangeType(VT_DISPATCH))) { CComPtr<IDispatch> spDispDest(varDest.pdispVal); @@ -604,9 +604,9 @@ static sal_Bool writeBackOutParameter2( VARIANTARG* pDest, VARIANT* pSource) if (spValueDest) { VARIANT_BOOL varBool= VARIANT_FALSE; - if( SUCCEEDED( hr= spValueDest->IsOutParam( &varBool) ) - && varBool == VARIANT_TRUE || - SUCCEEDED(hr= spValueDest->IsInOutParam( &varBool) ) + if( SUCCEEDED( hr= spValueDest->IsOutParam( &varBool) ) + && varBool == VARIANT_TRUE || + SUCCEEDED(hr= spValueDest->IsInOutParam( &varBool) ) && varBool == VARIANT_TRUE ) { if( SUCCEEDED( spValueDest->Set( CComVariant(), *pSource))) @@ -635,7 +635,7 @@ static sal_Bool writeBackOutParameter2( VARIANTARG* pDest, VARIANT* pSource) DISPID dispidPut = DISPID_PROPERTYPUT; dispparams.rgdispidNamedArgs = &dispidPut; - if (pSource->vt == VT_UNKNOWN || pSource->vt == VT_DISPATCH || + if (pSource->vt == VT_UNKNOWN || pSource->vt == VT_DISPATCH || (pSource->vt & VT_ARRAY) || (pSource->vt & VT_BYREF)) hr = spDispEx->InvokeEx(dwDispID, LOCALE_USER_DEFAULT, DISPATCH_PROPERTYPUTREF, &dispparams, NULL, NULL, NULL); @@ -651,7 +651,7 @@ static sal_Bool writeBackOutParameter2( VARIANTARG* pDest, VARIANT* pSource) ret= writeBackOutParameter( pDest, pSource); } else // The param can't be a JScript out-parameter ( an Array object), it could be a VBScript - { // param. The function checks itself for correct VBScript params + { // param. The function checks itself for correct VBScript params ret= writeBackOutParameter( pDest, pSource); } return ret; @@ -663,13 +663,13 @@ static sal_Bool writeBackOutParameter2( VARIANTARG* pDest, VARIANT* pSource) static sal_Bool writeBackOutParameter(VARIANTARG* pDest, VARIANT* pSource) { HRESULT hr; - sal_Bool ret = FALSE; + sal_Bool ret = FALSE; // Out parameter must be VT_BYREF if ((V_VT(pDest) & VT_BYREF) != 0 ) { VARTYPE oleTypeFlags = V_VT(pSource); - // if caller accept VARIANT as out parameter, any value must be converted + // if caller accept VARIANT as out parameter, any value must be converted if (V_VT(pDest) == (VT_VARIANT | VT_BYREF)) { // When the user provides a VARIANT rather then a concrete type @@ -677,11 +677,11 @@ static sal_Bool writeBackOutParameter(VARIANTARG* pDest, VARIANT* pSource) // VT_DISPATCH, VT_UNKNOWN, VT_ARRAY, VT_BSTR in the VARIANT that // is contained in pDest are released by VariantCopy VariantCopy(V_VARIANTREF(pDest), pSource); - ret = sal_True; + ret = sal_True; } - else + else { - // variantarg and variant must have same type + // variantarg and variant must have same type if ((V_VT(pDest) & oleTypeFlags) == oleTypeFlags) { if ((oleTypeFlags & VT_ARRAY) != 0) @@ -693,7 +693,7 @@ static sal_Bool writeBackOutParameter(VARIANTARG* pDest, VARIANT* pSource) // Out Param hr= SafeArrayCopy(V_ARRAY(pSource), V_ARRAYREF(pDest)) == NOERROR; if( SUCCEEDED( hr)) - ret = sal_True; + ret = sal_True; } else { @@ -703,88 +703,88 @@ static sal_Bool writeBackOutParameter(VARIANTARG* pDest, VARIANT* pSource) case VT_I2: { *V_I2REF(pDest) = V_I2(pSource); - ret = sal_True; + ret = sal_True; break; } case VT_I4: *V_I4REF(pDest) = V_I4(pSource); - ret = sal_True; + ret = sal_True; break; case VT_R4: *V_R4REF(pDest) = V_R4(pSource); - ret = sal_True; + ret = sal_True; break; case VT_R8: *V_R8REF(pDest) = V_R8(pSource); - ret = sal_True; + ret = sal_True; break; case VT_CY: *V_CYREF(pDest) = V_CY(pSource); - ret = sal_True; + ret = sal_True; break; case VT_DATE: *V_DATEREF(pDest) = V_DATE(pSource); - ret = sal_True; + ret = sal_True; break; case VT_BSTR: SysFreeString( *pDest->pbstrVal); - + *V_BSTRREF(pDest) = SysAllocString(V_BSTR(pSource)); - ret = sal_True; + ret = sal_True; break; case VT_DISPATCH: - if (*V_DISPATCHREF(pDest) != NULL) + if (*V_DISPATCHREF(pDest) != NULL) (*V_DISPATCHREF(pDest))->Release(); - + *V_DISPATCHREF(pDest) = V_DISPATCH(pSource); - - if (*V_DISPATCHREF(pDest) != NULL) + + if (*V_DISPATCHREF(pDest) != NULL) (*V_DISPATCHREF(pDest))->AddRef(); - - ret = sal_True; + + ret = sal_True; break; case VT_ERROR: *V_ERRORREF(pDest) = V_ERROR(pSource); - ret = sal_True; + ret = sal_True; break; case VT_BOOL: *V_BOOLREF(pDest) = V_BOOL(pSource); - ret = sal_True; + ret = sal_True; break; case VT_UNKNOWN: - if (*V_UNKNOWNREF(pDest) != NULL) + if (*V_UNKNOWNREF(pDest) != NULL) (*V_UNKNOWNREF(pDest))->Release(); - + *V_UNKNOWNREF(pDest) = V_UNKNOWN(pSource); - - if (*V_UNKNOWNREF(pDest) != NULL) + + if (*V_UNKNOWNREF(pDest) != NULL) (*V_UNKNOWNREF(pDest))->AddRef(); - - ret = sal_True; + + ret = sal_True; break; case VT_I1: *V_I1REF(pDest) = V_I1(pSource); - ret = sal_True; + ret = sal_True; break; case VT_UI1: *V_UI1REF(pDest) = V_UI1(pSource); - ret = sal_True; + ret = sal_True; break; case VT_UI2: *V_UI2REF(pDest) = V_UI2(pSource); - ret = sal_True; + ret = sal_True; break; case VT_UI4: *V_UI4REF(pDest) = V_UI4(pSource); - ret = sal_True; + ret = sal_True; break; case VT_INT: *V_INTREF(pDest) = V_INT(pSource); - ret = sal_True; + ret = sal_True; break; case VT_UINT: *V_UINTREF(pDest) = V_UINT(pSource); - ret = sal_True; + ret = sal_True; break; case VT_DECIMAL: memcpy(pDest->pdecVal, pSource, sizeof(DECIMAL)); @@ -816,14 +816,14 @@ static sal_Bool writeBackOutParameter(VARIANTARG* pDest, VARIANT* pSource) } } return ret; -} +} -STDMETHODIMP InterfaceOleWrapper_Impl::Invoke(DISPID dispidMember, - REFIID /*riid*/, - LCID /*lcid*/, +STDMETHODIMP InterfaceOleWrapper_Impl::Invoke(DISPID dispidMember, + REFIID /*riid*/, + LCID /*lcid*/, unsigned short wFlags, - DISPPARAMS * pdispparams, - VARIANT * pvarResult, + DISPPARAMS * pdispparams, + VARIANT * pvarResult, EXCEPINFO * pexcepinfo, unsigned int * puArgErr ) { @@ -841,33 +841,33 @@ STDMETHODIMP InterfaceOleWrapper_Impl::Invoke(DISPID dispidMember, { MemberInfo d = m_MemberInfos[dispidMember - 1]; DWORD flags = wFlags & d.flags; - + if (flags != 0) { if ((flags & DISPATCH_METHOD) != 0) { - if (pdispparams->cNamedArgs > 0) - ret = DISP_E_NONAMEDARGS; + if (pdispparams->cNamedArgs > 0) + ret = DISP_E_NONAMEDARGS; else { Sequence<Any> params; - + convertDispparamsArgs(dispidMember, wFlags, pdispparams , params ); - - ret= doInvoke(pdispparams, pvarResult, + + ret= doInvoke(pdispparams, pvarResult, pexcepinfo, puArgErr, d.name, params); } } else if ((flags & DISPATCH_PROPERTYGET) != 0) { - ret= doGetProperty( pdispparams, pvarResult, + ret= doGetProperty( pdispparams, pvarResult, pexcepinfo, d.name); } else if ((flags & DISPATCH_PROPERTYPUT || flags & DISPATCH_PROPERTYPUTREF) != 0) { if (pdispparams->cArgs != 1) ret = DISP_E_BADPARAMCOUNT; - else + else { Sequence<Any> params; convertDispparamsArgs(dispidMember, wFlags, pdispparams, params ); @@ -880,7 +880,7 @@ STDMETHODIMP InterfaceOleWrapper_Impl::Invoke(DISPID dispidMember, } else ret= DISP_E_MEMBERNOTFOUND; - } + } else ret = DISP_E_MEMBERNOTFOUND; } @@ -898,59 +898,59 @@ STDMETHODIMP InterfaceOleWrapper_Impl::Invoke(DISPID dispidMember, } catch(...) { - OUString message= OUSTR("InterfaceOleWrapper_Impl::Invoke : \n" + OUString message= OUSTR("InterfaceOleWrapper_Impl::Invoke : \n" "Unexpected exception"); writeExcepinfo(pexcepinfo, message); ret = DISP_E_EXCEPTION; } return ret; -} +} -HRESULT InterfaceOleWrapper_Impl::doInvoke( DISPPARAMS * pdispparams, VARIANT * pvarResult, +HRESULT InterfaceOleWrapper_Impl::doInvoke( DISPPARAMS * pdispparams, VARIANT * pvarResult, EXCEPINFO * pexcepinfo, unsigned int * puArgErr, OUString& name, Sequence<Any>& params) { - + HRESULT ret= S_OK; try { - Sequence<INT16> outIndex; - Sequence<Any> outParams; - Any returnValue; - - if (pdispparams->cNamedArgs > 0) - return DISP_E_NONAMEDARGS; + Sequence<INT16> outIndex; + Sequence<Any> outParams; + Any returnValue; + + if (pdispparams->cNamedArgs > 0) + return DISP_E_NONAMEDARGS; // invoke method and take care of exceptions - returnValue = m_xInvocation->invoke(name, + returnValue = m_xInvocation->invoke(name, params, outIndex, - outParams); + outParams); - // try to write back out parameter + // try to write back out parameter if (outIndex.getLength() > 0) { const INT16* pOutIndex = outIndex.getConstArray(); const Any* pOutParams = outParams.getConstArray(); - + for (sal_Int32 i = 0; i < outIndex.getLength(); i++) { CComVariant variant; // Currently a Sequence is converted to an SafeArray of VARIANTs. anyToVariant( &variant, pOutParams[i]); - + // out parameter need special handling if they are VT_DISPATCH // and used in JScript int outindex= pOutIndex[i]; - writeBackOutParameter2(&(pdispparams->rgvarg[pdispparams->cArgs - 1 - outindex]), - &variant ); + writeBackOutParameter2(&(pdispparams->rgvarg[pdispparams->cArgs - 1 - outindex]), + &variant ); } } - + // write back return value - if (pvarResult != NULL) - anyToVariant(pvarResult, returnValue); + if (pvarResult != NULL) + anyToVariant(pvarResult, returnValue); } catch(IllegalArgumentException & e) //XInvocation::invoke { @@ -967,7 +967,7 @@ HRESULT InterfaceOleWrapper_Impl::doInvoke( DISPPARAMS * pdispparams, VARIANT * const Any& org = e.TargetException; Exception excTarget; org >>= excTarget; - OUString message= + OUString message= org.getValueType().getTypeName() + OUSTR(": ") + excTarget.Message; writeExcepinfo(pexcepinfo, message); ret = DISP_E_EXCEPTION; @@ -991,7 +991,7 @@ HRESULT InterfaceOleWrapper_Impl::doInvoke( DISPPARAMS * pdispparams, VARIANT * } catch( ... ) { - OUString message= OUSTR("InterfaceOleWrapper_Impl::doInvoke : \n" + OUString message= OUSTR("InterfaceOleWrapper_Impl::doInvoke : \n" "Unexpected exception"); writeExcepinfo(pexcepinfo, message); ret = DISP_E_EXCEPTION; @@ -999,7 +999,7 @@ HRESULT InterfaceOleWrapper_Impl::doInvoke( DISPPARAMS * pdispparams, VARIANT * return ret; } -HRESULT InterfaceOleWrapper_Impl::doGetProperty( DISPPARAMS * /*pdispparams*/, VARIANT * pvarResult, +HRESULT InterfaceOleWrapper_Impl::doGetProperty( DISPPARAMS * /*pdispparams*/, VARIANT * pvarResult, EXCEPINFO * pexcepinfo, OUString& name) { HRESULT ret= S_OK; @@ -1030,7 +1030,7 @@ HRESULT InterfaceOleWrapper_Impl::doGetProperty( DISPPARAMS * /*pdispparams*/, V } catch( ... ) { - OUString message= OUSTR("InterfaceOleWrapper_Impl::doInvoke : \n" + OUString message= OUSTR("InterfaceOleWrapper_Impl::doInvoke : \n" "Unexpected exception"); writeExcepinfo(pexcepinfo, message); ret = DISP_E_EXCEPTION; @@ -1038,15 +1038,15 @@ HRESULT InterfaceOleWrapper_Impl::doGetProperty( DISPPARAMS * /*pdispparams*/, V return ret; } -HRESULT InterfaceOleWrapper_Impl::doSetProperty( DISPPARAMS * /*pdispparams*/, VARIANT * /*pvarResult*/, +HRESULT InterfaceOleWrapper_Impl::doSetProperty( DISPPARAMS * /*pdispparams*/, VARIANT * /*pvarResult*/, EXCEPINFO * pexcepinfo, unsigned int * puArgErr, OUString& name, Sequence<Any> params) { HRESULT ret= S_OK; - + try { m_xInvocation->setValue( name, params.getConstArray()[0]); - } + } catch(UnknownPropertyException ) { ret = DISP_E_MEMBERNOTFOUND; @@ -1060,7 +1060,7 @@ HRESULT InterfaceOleWrapper_Impl::doSetProperty( DISPPARAMS * /*pdispparams*/, V if (pexcepinfo != NULL) { Any org = e.TargetException; - + pexcepinfo->wCode = UNO_2_OLE_EXCEPTIONCODE; pexcepinfo->bstrSource = SysAllocString(L"any ONE component"); pexcepinfo->bstrDescription = SysAllocString( @@ -1089,7 +1089,7 @@ HRESULT InterfaceOleWrapper_Impl::InvokeGeneral( DISPID dispidMember, unsigned s && m_defaultValueType != VT_EMPTY && pvarResult != NULL) { bHandled= sal_True; - if( m_defaultValueType == VT_DISPATCH) + if( m_defaultValueType == VT_DISPATCH) { pvarResult->vt= VT_DISPATCH; pvarResult->pdispVal= static_cast<IDispatch*>( this); @@ -1123,9 +1123,9 @@ HRESULT InterfaceOleWrapper_Impl::InvokeGeneral( DISPID dispidMember, unsigned s { bHandled= sal_True; sal_Bool bStruct= sal_False; - - - Reference<XInterface> xIntCore= m_smgr->createInstance( OUString::createFromAscii("com.sun.star.reflection.CoreReflection")); + + + Reference<XInterface> xIntCore= m_smgr->createInstance( OUString::createFromAscii("com.sun.star.reflection.CoreReflection")); Reference<XIdlReflection> xRefl( xIntCore, UNO_QUERY); if( xRefl.is() ) { @@ -1140,7 +1140,7 @@ HRESULT InterfaceOleWrapper_Impl::InvokeGeneral( DISPID dispidMember, unsigned s classStruct->createObject( anyStruct); CComVariant var; anyToVariant( &var, anyStruct ); - + if( var.vt == VT_DISPATCH) { VariantCopy( pvarResult, & var); @@ -1148,7 +1148,7 @@ HRESULT InterfaceOleWrapper_Impl::InvokeGeneral( DISPID dispidMember, unsigned s } } } - } + } ret= bStruct == sal_True ? S_OK : DISP_E_EXCEPTION; } else if (dispidMember == DISPID_CREATE_TYPE_FUNC) @@ -1162,7 +1162,7 @@ HRESULT InterfaceOleWrapper_Impl::InvokeGeneral( DISPID dispidMember, unsigned s return DISP_E_BADPARAMCOUNT; if (FAILED( arg.ChangeType( VT_BSTR, &pdispparams->rgvarg[0]))) return DISP_E_BADVARTYPE; - + //check if the provided name represents a valid type Type type; if (getType(arg.bstrVal, type) == false) @@ -1195,7 +1195,7 @@ HRESULT InterfaceOleWrapper_Impl::InvokeGeneral( DISPID dispidMember, unsigned s } catch( ... ) { - OUString message= OUSTR("InterfaceOleWrapper_Impl::InvokeGeneral : \n" + OUString message= OUSTR("InterfaceOleWrapper_Impl::InvokeGeneral : \n" "Unexpected exception"); writeExcepinfo(pexcepinfo, message); ret = DISP_E_EXCEPTION; @@ -1208,12 +1208,12 @@ HRESULT InterfaceOleWrapper_Impl::InvokeGeneral( DISPID dispidMember, unsigned s STDMETHODIMP InterfaceOleWrapper_Impl::GetDispID(BSTR /*bstrName*/, DWORD /*grfdex*/, DISPID __RPC_FAR* /*pid*/) { - HRESULT ret = ResultFromScode(E_NOTIMPL); + HRESULT ret = ResultFromScode(E_NOTIMPL); return ret; } -STDMETHODIMP InterfaceOleWrapper_Impl::InvokeEx( +STDMETHODIMP InterfaceOleWrapper_Impl::InvokeEx( /* [in] */ DISPID /*id*/, /* [in] */ LCID /*lcid*/, /* [in] */ WORD /*wFlags*/, @@ -1222,61 +1222,61 @@ STDMETHODIMP InterfaceOleWrapper_Impl::InvokeEx( /* [out] */ EXCEPINFO __RPC_FAR* /*pei*/, /* [unique][in] */ IServiceProvider __RPC_FAR* /*pspCaller*/) { - HRESULT ret = ResultFromScode(E_NOTIMPL); + HRESULT ret = ResultFromScode(E_NOTIMPL); return ret; } -STDMETHODIMP InterfaceOleWrapper_Impl::DeleteMemberByName( +STDMETHODIMP InterfaceOleWrapper_Impl::DeleteMemberByName( /* [in] */ BSTR /*bstr*/, /* [in] */ DWORD /*grfdex*/) { - HRESULT ret = ResultFromScode(E_NOTIMPL); + HRESULT ret = ResultFromScode(E_NOTIMPL); return ret; } STDMETHODIMP InterfaceOleWrapper_Impl::DeleteMemberByDispID(DISPID /*id*/) { - HRESULT ret = ResultFromScode(E_NOTIMPL); + HRESULT ret = ResultFromScode(E_NOTIMPL); return ret; } -STDMETHODIMP InterfaceOleWrapper_Impl::GetMemberProperties( +STDMETHODIMP InterfaceOleWrapper_Impl::GetMemberProperties( /* [in] */ DISPID /*id*/, /* [in] */ DWORD /*grfdexFetch*/, /* [out] */ DWORD __RPC_FAR* /*pgrfdex*/) { - HRESULT ret = ResultFromScode(E_NOTIMPL); + HRESULT ret = ResultFromScode(E_NOTIMPL); return ret; } -STDMETHODIMP InterfaceOleWrapper_Impl::GetMemberName( +STDMETHODIMP InterfaceOleWrapper_Impl::GetMemberName( /* [in] */ DISPID /*id*/, /* [out] */ BSTR __RPC_FAR* /*pbstrName*/) { - HRESULT ret = ResultFromScode(E_NOTIMPL); + HRESULT ret = ResultFromScode(E_NOTIMPL); return ret; } -STDMETHODIMP InterfaceOleWrapper_Impl::GetNextDispID( +STDMETHODIMP InterfaceOleWrapper_Impl::GetNextDispID( /* [in] */ DWORD /*grfdex*/, /* [in] */ DISPID /*id*/, /* [out] */ DISPID __RPC_FAR* /*pid*/) { - HRESULT ret = ResultFromScode(E_NOTIMPL); + HRESULT ret = ResultFromScode(E_NOTIMPL); return ret; } -STDMETHODIMP InterfaceOleWrapper_Impl::GetNameSpaceParent( +STDMETHODIMP InterfaceOleWrapper_Impl::GetNameSpaceParent( /* [out] */ IUnknown __RPC_FAR *__RPC_FAR* /*ppunk*/) { - HRESULT ret = ResultFromScode(E_NOTIMPL); + HRESULT ret = ResultFromScode(E_NOTIMPL); return ret; } @@ -1366,27 +1366,27 @@ STDMETHODIMP UnoObjectWrapperRemoteOpt::Invoke ( DISPID dispidMember, REFIID /* puArgErr, bHandled); if( bHandled) return ret; - + if ( dispidMember > 0 && m_xInvocation.is()) { - + IdToMemberInfoMap::iterator it_MemberInfo= m_idToMemberInfoMap.find( dispidMember); if( it_MemberInfo != m_idToMemberInfoMap.end() ) { MemberInfo& info= it_MemberInfo->second; - + Sequence<Any> params; // holds converted any s if( ! info.flags ) { // DISPID called for the first time if( wFlags == DISPATCH_METHOD ) - { + { convertDispparamsArgs(dispidMember, wFlags, pdispparams, params ); - - if( FAILED( ret= doInvoke( pdispparams, pvarResult, + + if( FAILED( ret= doInvoke( pdispparams, pvarResult, pexcepinfo, puArgErr, info.name, params)) && ret == DISP_E_MEMBERNOTFOUND) { - // try to get the exact name + // try to get the exact name OUString exactName; if (m_xExactName.is()) { @@ -1394,24 +1394,24 @@ STDMETHODIMP UnoObjectWrapperRemoteOpt::Invoke ( DISPID dispidMember, REFIID /* // invoke again if( exactName.getLength() != 0) { - if( SUCCEEDED( ret= doInvoke( pdispparams, pvarResult, + if( SUCCEEDED( ret= doInvoke( pdispparams, pvarResult, pexcepinfo, puArgErr, exactName, params))) info.name= exactName; - } + } } - } + } if( SUCCEEDED( ret ) ) info.flags= DISPATCH_METHOD; } //if( wFlags == DISPATCH_METHOD ) - + else if( wFlags == DISPATCH_PROPERTYPUT || wFlags == DISPATCH_PROPERTYPUTREF) { convertDispparamsArgs(dispidMember, wFlags, pdispparams, params ); - if( FAILED( ret= doSetProperty( pdispparams, pvarResult, + if( FAILED( ret= doSetProperty( pdispparams, pvarResult, pexcepinfo, puArgErr, info.name, params)) && ret == DISP_E_MEMBERNOTFOUND) { - // try to get the exact name + // try to get the exact name OUString exactName; if (m_xExactName.is()) { @@ -1419,23 +1419,23 @@ STDMETHODIMP UnoObjectWrapperRemoteOpt::Invoke ( DISPID dispidMember, REFIID /* // invoke again if( exactName.getLength() != 0) { - if( SUCCEEDED( ret= doSetProperty( pdispparams, pvarResult, + if( SUCCEEDED( ret= doSetProperty( pdispparams, pvarResult, pexcepinfo, puArgErr, exactName, params))) info.name= exactName; - } + } } - } + } if( SUCCEEDED( ret ) ) info.flags= DISPATCH_PROPERTYPUT | DISPATCH_PROPERTYGET; } - + else if( wFlags == DISPATCH_PROPERTYGET) { - if( FAILED( ret= doGetProperty( pdispparams, pvarResult, + if( FAILED( ret= doGetProperty( pdispparams, pvarResult, pexcepinfo, info.name)) && ret == DISP_E_MEMBERNOTFOUND) { - // try to get the exact name + // try to get the exact name OUString exactName; if (m_xExactName.is()) { @@ -1443,107 +1443,107 @@ STDMETHODIMP UnoObjectWrapperRemoteOpt::Invoke ( DISPID dispidMember, REFIID /* // invoke again if( exactName.getLength() != 0) { - if( SUCCEEDED( ret= doGetProperty( pdispparams, pvarResult, + if( SUCCEEDED( ret= doGetProperty( pdispparams, pvarResult, pexcepinfo, exactName))) info.name= exactName; - } + } } - } + } if( SUCCEEDED( ret ) ) info.flags= DISPATCH_PROPERTYGET | DISPATCH_PROPERTYPUT; } - else if( wFlags & DISPATCH_METHOD && + else if( wFlags & DISPATCH_METHOD && (wFlags & DISPATCH_PROPERTYPUT || wFlags & DISPATCH_PROPERTYPUTREF)) { - + OUString exactName; // convert params for DISPATCH_METHOD or DISPATCH_PROPERTYPUT convertDispparamsArgs(dispidMember, wFlags, pdispparams, params ); // try first as method - if( FAILED( ret= doInvoke( pdispparams, pvarResult, + if( FAILED( ret= doInvoke( pdispparams, pvarResult, pexcepinfo, puArgErr, info.name, params)) && ret == DISP_E_MEMBERNOTFOUND) { - // try to get the exact name + // try to get the exact name if (m_xExactName.is()) { exactName = m_xExactName->getExactName( info.name); // invoke again if( exactName.getLength() != 0) { - if( SUCCEEDED( ret= doInvoke( pdispparams, pvarResult, + if( SUCCEEDED( ret= doInvoke( pdispparams, pvarResult, pexcepinfo, puArgErr, exactName, params))) info.name= exactName; - } + } } - } + } if( SUCCEEDED( ret ) ) info.flags= DISPATCH_METHOD; - + // try as property if( FAILED( ret) && pdispparams->cArgs == 1) { - if( FAILED( ret= doSetProperty( pdispparams, pvarResult, + if( FAILED( ret= doSetProperty( pdispparams, pvarResult, pexcepinfo, puArgErr, info.name, params)) && ret == DISP_E_MEMBERNOTFOUND) { - // try to get the exact name + // try to get the exact name if( exactName.getLength() != 0) { - if( SUCCEEDED( ret= doSetProperty( pdispparams, pvarResult, + if( SUCCEEDED( ret= doSetProperty( pdispparams, pvarResult, pexcepinfo, puArgErr, exactName, params))) info.name= exactName; - } - } + } + } if( SUCCEEDED( ret ) ) - info.flags= DISPATCH_PROPERTYPUT | DISPATCH_PROPERTYGET; + info.flags= DISPATCH_PROPERTYPUT | DISPATCH_PROPERTYGET; } } else if( wFlags & DISPATCH_METHOD && wFlags & DISPATCH_PROPERTYGET) { OUString exactName; convertDispparamsArgs(dispidMember, wFlags, pdispparams, params ); - - if( FAILED( ret= doInvoke( pdispparams, pvarResult, + + if( FAILED( ret= doInvoke( pdispparams, pvarResult, pexcepinfo, puArgErr, info.name, params)) && ret == DISP_E_MEMBERNOTFOUND) { - // try to get the exact name + // try to get the exact name if (m_xExactName.is()) { exactName = m_xExactName->getExactName( info.name); // invoke again if( exactName.getLength() != 0) { - if( SUCCEEDED( ret= doInvoke( pdispparams, pvarResult, + if( SUCCEEDED( ret= doInvoke( pdispparams, pvarResult, pexcepinfo, puArgErr, exactName, params))) info.name= exactName; - } + } } - } + } if( SUCCEEDED( ret ) ) info.flags= DISPATCH_METHOD; - + // try as property if( FAILED( ret) && pdispparams->cArgs == 1) { - if( FAILED( ret= doGetProperty( pdispparams, pvarResult, + if( FAILED( ret= doGetProperty( pdispparams, pvarResult, pexcepinfo, info.name)) && ret == DISP_E_MEMBERNOTFOUND) { if( exactName.getLength() != 0) { - if( SUCCEEDED( ret= doSetProperty( pdispparams, pvarResult, + if( SUCCEEDED( ret= doSetProperty( pdispparams, pvarResult, pexcepinfo, puArgErr, exactName, params))) info.name= exactName; - } - } + } + } if( SUCCEEDED( ret ) ) info.flags= DISPATCH_PROPERTYGET; } } - - // update ínformation about this member + + // update ínformation about this member if( ret == DISP_E_MEMBERNOTFOUND) { // Remember the name as not existing @@ -1557,19 +1557,19 @@ STDMETHODIMP UnoObjectWrapperRemoteOpt::Invoke ( DISPID dispidMember, REFIID /* if( wFlags & DISPATCH_METHOD && info.flags == DISPATCH_METHOD) { convertDispparamsArgs(dispidMember, wFlags, pdispparams, params ); - ret= doInvoke( pdispparams, pvarResult, + ret= doInvoke( pdispparams, pvarResult, pexcepinfo, puArgErr, info.name, params); } else if( (wFlags & DISPATCH_PROPERTYPUT || wFlags & DISPATCH_PROPERTYPUTREF ) && info.flags & DISPATCH_PROPERTYPUT) { convertDispparamsArgs(dispidMember, wFlags, pdispparams, params ); - ret= doSetProperty( pdispparams, pvarResult, + ret= doSetProperty( pdispparams, pvarResult, pexcepinfo, puArgErr, info.name, params); } else if( (wFlags & DISPATCH_PROPERTYGET) && ( info.flags & DISPATCH_PROPERTYGET)) { - ret= doGetProperty( pdispparams, pvarResult, + ret= doGetProperty( pdispparams, pvarResult, pexcepinfo, info.name); } else @@ -1577,7 +1577,7 @@ STDMETHODIMP UnoObjectWrapperRemoteOpt::Invoke ( DISPID dispidMember, REFIID /* ret= DISP_E_MEMBERNOTFOUND; } } - }// if( it_MemberInfo != m_idToMemberInfoMap.end() ) + }// if( it_MemberInfo != m_idToMemberInfoMap.end() ) else ret= DISP_E_MEMBERNOTFOUND; } @@ -1596,16 +1596,16 @@ STDMETHODIMP UnoObjectWrapperRemoteOpt::Invoke ( DISPID dispidMember, REFIID /* } catch(...) { - OUString message= OUSTR("UnoObjectWrapperRemoteOpt::Invoke : \n" + OUString message= OUSTR("UnoObjectWrapperRemoteOpt::Invoke : \n" "Unexpected exception"); writeExcepinfo(pexcepinfo, message); ret = DISP_E_EXCEPTION; } - + return ret; } -HRESULT UnoObjectWrapperRemoteOpt::methodInvoke( DISPID /*dispidMember*/, DISPPARAMS * /*pdispparams*/, VARIANT * /*pvarResult*/, +HRESULT UnoObjectWrapperRemoteOpt::methodInvoke( DISPID /*dispidMember*/, DISPPARAMS * /*pdispparams*/, VARIANT * /*pvarResult*/, EXCEPINFO * /*pexcepinfo*/, unsigned int * /*puArgErr*/, Sequence<Any> params) { return S_OK; @@ -1661,12 +1661,12 @@ static HRESULT mapCannotConvertException( CannotConvertException e, unsigned int return ret; } -// The function maps the TypeClass of the any to VARTYPE: If +// The function maps the TypeClass of the any to VARTYPE: If // the Any contains STRUCT or INTERFACE then the return value // is VT_DISPATCH. The function is used from o2u_createUnoObjectWrapper // and the result is put into the constructor of the uno - wrapper // object. If a client asks the object for DISPID_VALUE and this -// funtion returned VT_DISPATCH then the IDispatch of the same +// funtion returned VT_DISPATCH then the IDispatch of the same // object is being returned. // See InterfaceOleWrapper_Impl::Invoke, InterfaceOleWrapper_Impl::m_defaultValueType const VARTYPE getVarType( const Any& value) diff --git a/extensions/source/ole/unoobjw.hxx b/extensions/source/ole/unoobjw.hxx index e57421fc9286..e007dd662883 100644 --- a/extensions/source/ole/unoobjw.hxx +++ b/extensions/source/ole/unoobjw.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -42,16 +42,16 @@ #include "ole2uno.hxx" #include "unoconversionutilities.hxx" -//#define INVOCATION_SERVICE L"com.sun.star.script.Invocation" -#define JSCRIPT_VALUE_FUNC L"_GetValueObject" -#define GET_STRUCT_FUNC L"_GetStruct" +//#define INVOCATION_SERVICE L"com.sun.star.script.Invocation" +#define JSCRIPT_VALUE_FUNC L"_GetValueObject" +#define GET_STRUCT_FUNC L"_GetStruct" #define BRIDGE_VALUE_FUNC L"Bridge_GetValueObject" #define BRIDGE_GET_STRUCT_FUNC L"Bridge_GetStruct" #define BRIDGE_CREATE_TYPE_FUNC L"Bridge_CreateType" #define DISPID_JSCRIPT_VALUE_FUNC -10l -#define DISPID_GET_STRUCT_FUNC -102 -#define DISPID_CREATE_TYPE_FUNC -103 +#define DISPID_GET_STRUCT_FUNC -102 +#define DISPID_CREATE_TYPE_FUNC -103 using namespace std; using namespace cppu; @@ -84,8 +84,8 @@ struct MemberInfo { MemberInfo() : flags(0), name() {} MemberInfo(WORD f, const OUString& n) : flags(f), name(n) {} - - WORD flags; + + WORD flags; OUString name; }; @@ -114,10 +114,10 @@ typedef hash_map /***************************************************************************** class declaration: InterfaceOleWrapper_Impl - + *****************************************************************************/ -class InterfaceOleWrapper_Impl : public WeakImplHelper2<XBridgeSupplier2, XInitialization>, +class InterfaceOleWrapper_Impl : public WeakImplHelper2<XBridgeSupplier2, XInitialization>, public IDispatchEx, public UnoConversionUtilities<InterfaceOleWrapper_Impl>, public IUnoObjectWrapper @@ -144,12 +144,12 @@ public: /* IDispatchEx methods */ - virtual HRESULT STDMETHODCALLTYPE GetDispID( + virtual HRESULT STDMETHODCALLTYPE GetDispID( /* [in] */ BSTR bstrName, /* [in] */ DWORD grfdex, /* [out] */ DISPID __RPC_FAR *pid); - - virtual /* [local] */ HRESULT STDMETHODCALLTYPE InvokeEx( + + virtual /* [local] */ HRESULT STDMETHODCALLTYPE InvokeEx( /* [in] */ DISPID id, /* [in] */ LCID lcid, /* [in] */ WORD wFlags, @@ -157,36 +157,36 @@ public: /* [out] */ VARIANT __RPC_FAR *pvarRes, /* [out] */ EXCEPINFO __RPC_FAR *pei, /* [unique][in] */ IServiceProvider __RPC_FAR *pspCaller); - - virtual HRESULT STDMETHODCALLTYPE DeleteMemberByName( + + virtual HRESULT STDMETHODCALLTYPE DeleteMemberByName( /* [in] */ BSTR bstr, /* [in] */ DWORD grfdex); - - virtual HRESULT STDMETHODCALLTYPE DeleteMemberByDispID( + + virtual HRESULT STDMETHODCALLTYPE DeleteMemberByDispID( /* [in] */ DISPID id); - - virtual HRESULT STDMETHODCALLTYPE GetMemberProperties( + + virtual HRESULT STDMETHODCALLTYPE GetMemberProperties( /* [in] */ DISPID id, /* [in] */ DWORD grfdexFetch, /* [out] */ DWORD __RPC_FAR *pgrfdex); - - virtual HRESULT STDMETHODCALLTYPE GetMemberName( + + virtual HRESULT STDMETHODCALLTYPE GetMemberName( /* [in] */ DISPID id, /* [out] */ BSTR __RPC_FAR *pbstrName); - - virtual HRESULT STDMETHODCALLTYPE GetNextDispID( + + virtual HRESULT STDMETHODCALLTYPE GetNextDispID( /* [in] */ DWORD grfdex, /* [in] */ DISPID id, /* [out] */ DISPID __RPC_FAR *pid); - - virtual HRESULT STDMETHODCALLTYPE GetNameSpaceParent( + + virtual HRESULT STDMETHODCALLTYPE GetNameSpaceParent( /* [out] */ IUnknown __RPC_FAR *__RPC_FAR *ppunk); - + // XBridgeSupplier2 --------------------------------------------------- - virtual Any SAL_CALL createBridge(const Any& modelDepObject, - const Sequence<sal_Int8>& ProcessId, - sal_Int16 sourceModelType, - sal_Int16 destModelType) + virtual Any SAL_CALL createBridge(const Any& modelDepObject, + const Sequence<sal_Int8>& ProcessId, + sal_Int16 sourceModelType, + sal_Int16 destModelType) throw (IllegalArgumentException, RuntimeException); //XInitialization ----------------------------------------------------- @@ -198,34 +198,34 @@ public: STDMETHOD( getOriginalUnoStruct)( Any * pStruct); // UnoConversionUtility - virtual Reference< XInterface > createUnoWrapperInstance(); + virtual Reference< XInterface > createUnoWrapperInstance(); virtual Reference< XInterface > createComWrapperInstance(); protected: - virtual HRESULT doInvoke( DISPPARAMS * pdispparams, VARIANT * pvarResult, + virtual HRESULT doInvoke( DISPPARAMS * pdispparams, VARIANT * pvarResult, EXCEPINFO * pexcepinfo, unsigned int * puArgErr, OUString & name, Sequence<Any>& params); - virtual HRESULT doGetProperty( DISPPARAMS * pdispparams, VARIANT * pvarResult, + virtual HRESULT doGetProperty( DISPPARAMS * pdispparams, VARIANT * pvarResult, EXCEPINFO * pexcepinfo, OUString & name ); - virtual HRESULT doSetProperty( DISPPARAMS * pdispparams, VARIANT * pvarResult, + virtual HRESULT doSetProperty( DISPPARAMS * pdispparams, VARIANT * pvarResult, EXCEPINFO * pexcepinfo, unsigned int * puArgErr, OUString & name, Sequence<Any> params); virtual HRESULT InvokeGeneral( DISPID dispidMember, unsigned short wFlags, DISPPARAMS * pdispparams, VARIANT * pvarResult, EXCEPINFO * pexcepinfo, unsigned int * puArgErr, sal_Bool& bHandled); - void convertDispparamsArgs( DISPID id, unsigned short wFlags, DISPPARAMS* pdispparams, + void convertDispparamsArgs( DISPID id, unsigned short wFlags, DISPPARAMS* pdispparams, Sequence<Any>& rSeq); sal_Bool getInvocationInfoForCall(DISPID id, InvocationInfo& info); - Reference<XInvocation> m_xInvocation; - Reference<XExactName> m_xExactName; - Reference<XInterface> m_xOrigin; - NameToIdMap m_nameToDispIdMap; - vector<MemberInfo> m_MemberInfos; + Reference<XInvocation> m_xInvocation; + Reference<XExactName> m_xExactName; + Reference<XInterface> m_xOrigin; + NameToIdMap m_nameToDispIdMap; + vector<MemberInfo> m_MemberInfos; // This member is used to determine the default value // denoted by DISPID_VALUE (0). For proper results in JavaScript // we have to return the default value when we write an object @@ -234,13 +234,13 @@ protected: // to detect the default value. The wrapped object must then return // its own IDispatch* otherwise we cannot access it within the script. // see InterfaceOleWrapper_Impl::Invoke - VARTYPE m_defaultValueType; + VARTYPE m_defaultValueType; }; /***************************************************************************** - class declaration: UnoObjectWrapperRemoteOpt + class declaration: UnoObjectWrapperRemoteOpt ( Uno Object Wrapper Remote Optimized) This is the UNO wrapper used in the service com.sun.star.bridge.OleBridgeSupplierVar1. Key features: @@ -249,7 +249,7 @@ protected: if a call is made to a property or method if the flags are DISPATCH_METHOD | DISPATCH_PROPERTYPUT. If something has been found out about a property or member than it is saved in a MemberInfo structure hold by a IdToMemberInfoMap stl map. - + *****************************************************************************/ class UnoObjectWrapperRemoteOpt: public InterfaceOleWrapper_Impl { @@ -270,20 +270,20 @@ public: protected: - HRESULT methodInvoke( DISPID dispidMember, DISPPARAMS * pdispparams, VARIANT * pvarResult, + HRESULT methodInvoke( DISPID dispidMember, DISPPARAMS * pdispparams, VARIANT * pvarResult, EXCEPINFO * pexcepinfo, unsigned int * puArgErr, Sequence<Any> params); // In GetIDsOfNames are blindly passed out, that is without verifying - // the name. If two names are passed in during different calls to + // the name. If two names are passed in during different calls to // GetIDsOfNames and the names differ only in their cases then different // id's are passed out ( e.g. "doSomethingMethod" or "dosomethingmethod"). - // In Invoke the DISPID is remapped to the name passed to GetIDsOfNames + // In Invoke the DISPID is remapped to the name passed to GetIDsOfNames // and the name is used as parameter for XInvocation::invoke. If invoke // fails because of a wrong name, then m_xExactName ( XExactName) is used // to verify the name. The correct name is then inserted to m_MemberInfos - // ( vector<MemberInfo> ). During the next call to Invoke the right name - // is used. . - + // ( vector<MemberInfo> ). During the next call to Invoke the right name + // is used. . + BadNameMap m_badNameMap; IdToMemberInfoMap m_idToMemberInfoMap; diff --git a/extensions/source/ole/unotypewrapper.cxx b/extensions/source/ole/unotypewrapper.cxx index ea0393d55ee9..7461d7d0e62f 100644 --- a/extensions/source/ole/unotypewrapper.cxx +++ b/extensions/source/ole/unotypewrapper.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -95,7 +95,7 @@ STDMETHODIMP UnoTypeWrapper::GetTypeInfo( UINT /*iTInfo*/, // UnoTypeWrapper, IDispatch -------------------------------------------- STDMETHODIMP UnoTypeWrapper::GetIDsOfNames( REFIID /*riid*/, LPOLESTR *rgszNames, - UINT /*cNames*/, + UINT /*cNames*/, LCID /*lcid*/, DISPID *rgDispId) { @@ -126,12 +126,12 @@ STDMETHODIMP UnoTypeWrapper::Invoke( DISPID dispIdMember, { if (pDispParams == NULL) return DISP_E_EXCEPTION; - + if( pDispParams->cNamedArgs) return DISP_E_NONAMEDARGS; - - - HRESULT ret= S_OK; + + + HRESULT ret= S_OK; switch( dispIdMember) { case DISPID_VALUE: // DISPID_VALUE @@ -156,7 +156,7 @@ STDMETHODIMP UnoTypeWrapper::Invoke( DISPID dispIdMember, // IUnoTypeWrapper----------------------- STDMETHODIMP UnoTypeWrapper::put_Name(BSTR val) -{ +{ Lock(); HRESULT hr = S_OK; m_sName = val; diff --git a/extensions/source/ole/unotypewrapper.hxx b/extensions/source/ole/unotypewrapper.hxx index 748d7a59da58..f09fd9bfbbb2 100644 --- a/extensions/source/ole/unotypewrapper.hxx +++ b/extensions/source/ole/unotypewrapper.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/ole/windata.cxx b/extensions/source/ole/windata.cxx index 267478b8eb5c..e4047e3b184c 100644 --- a/extensions/source/ole/windata.cxx +++ b/extensions/source/ole/windata.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/ole/windata.hxx b/extensions/source/ole/windata.hxx index ed951f248ea2..fce3d4af5e9c 100644 --- a/extensions/source/ole/windata.hxx +++ b/extensions/source/ole/windata.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -39,7 +39,7 @@ namespace ole_adapter { -//Wrapper for VARDESC +//Wrapper for VARDESC class VarDesc { VARDESC* operator = (const VarDesc*); @@ -88,7 +88,7 @@ class FuncDesc FUNCDESC * m_pFuncDesc; public: - + FuncDesc(ITypeInfo * pTypeInfo) : m_pFuncDesc(NULL), m_pTypeInfo(pTypeInfo) diff --git a/extensions/source/oooimprovecore/core.cxx b/extensions/source/oooimprovecore/core.cxx index 472d844337a3..4c13d5b5e2b3 100644 --- a/extensions/source/oooimprovecore/core.cxx +++ b/extensions/source/oooimprovecore/core.cxx @@ -1,7 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/oooimprovecore/oooimprovecore_module.cxx b/extensions/source/oooimprovecore/oooimprovecore_module.cxx index f77d45f2393a..c686bee9455a 100644 --- a/extensions/source/oooimprovecore/oooimprovecore_module.cxx +++ b/extensions/source/oooimprovecore/oooimprovecore_module.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -34,6 +34,6 @@ namespace oooimprovecore { IMPLEMENT_COMPONENT_MODULE( OooimprovecoreModule ); -} +} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/extensions/source/oooimprovecore/oooimprovecore_module.hxx b/extensions/source/oooimprovecore/oooimprovecore_module.hxx index 432dcc71997d..3cf4d715588f 100644 --- a/extensions/source/oooimprovecore/oooimprovecore_module.hxx +++ b/extensions/source/oooimprovecore/oooimprovecore_module.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -35,6 +35,6 @@ namespace oooimprovecore { DECLARE_COMPONENT_MODULE( OooimprovecoreModule, OooimprovecoreModuleClient ) } -#endif +#endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/extensions/source/oooimprovecore/oooimprovecore_services.cxx b/extensions/source/oooimprovecore/oooimprovecore_services.cxx index 6c3a04539e30..532e9a2d14d1 100644 --- a/extensions/source/oooimprovecore/oooimprovecore_services.cxx +++ b/extensions/source/oooimprovecore/oooimprovecore_services.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/oooimprovement/config.cxx b/extensions/source/oooimprovement/config.cxx index 296df200d50d..52347ac47c2d 100644 --- a/extensions/source/oooimprovement/config.cxx +++ b/extensions/source/oooimprovement/config.cxx @@ -1,7 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/oooimprovement/config.hxx b/extensions/source/oooimprovement/config.hxx index 3fe1cbe5eba7..9aebafe15894 100644 --- a/extensions/source/oooimprovement/config.hxx +++ b/extensions/source/oooimprovement/config.hxx @@ -1,7 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/oooimprovement/corecontroller.cxx b/extensions/source/oooimprovement/corecontroller.cxx index 8a9bae0f62dd..0d3cc368169b 100644 --- a/extensions/source/oooimprovement/corecontroller.cxx +++ b/extensions/source/oooimprovement/corecontroller.cxx @@ -1,7 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/oooimprovement/corecontroller.hxx b/extensions/source/oooimprovement/corecontroller.hxx index 925fa94f038d..5d68cc0395df 100644 --- a/extensions/source/oooimprovement/corecontroller.hxx +++ b/extensions/source/oooimprovement/corecontroller.hxx @@ -1,7 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -63,7 +63,7 @@ namespace oooimprovement CoreController(const css::uno::Reference< css::lang::XMultiServiceFactory>& sm); virtual ~CoreController(); - // css::oooimprovement::XCoreController + // css::oooimprovement::XCoreController virtual sal_Bool SAL_CALL enablingUiEventsLoggerAllowed(sal_Int16 version) throw(css::uno::RuntimeException); virtual sal_Bool SAL_CALL showBuiltinOptionsPage(sal_Int16 version) diff --git a/extensions/source/oooimprovement/errormail.cxx b/extensions/source/oooimprovement/errormail.cxx index de7ef8db0e6f..81bf38ba2868 100644 --- a/extensions/source/oooimprovement/errormail.cxx +++ b/extensions/source/oooimprovement/errormail.cxx @@ -1,7 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -107,7 +107,7 @@ namespace { { struct utsname info; //memset(&info, 0, sizeof(info)); - uname(&info); + uname(&info); OStringBuffer result = "<systeminfo:systeminfo xmlns:systeminfo=\"http://openoffice.org/2002/systeminfo\">\n" "<systeminfo:System name=\"" @@ -170,19 +170,19 @@ namespace { }; } -namespace oooimprovement +namespace oooimprovement { Errormail::Errormail(const Reference<XMultiServiceFactory>& sf) : m_ServiceFactory(sf) {} - + OString Errormail::getXml() { Config config(m_ServiceFactory); const OString usertype; const OString email = OUStringToOString(config.getReporterEmail(), RTL_TEXTENCODING_ASCII_US); OString feedback; - { + { OStringBuffer temp; temp.append(config.getReportCount()); feedback = temp.makeStringAndClear(); @@ -200,7 +200,7 @@ namespace oooimprovement + xmlAttrEncode(title) + "</reportmail:title>\n" "<reportmail:attachment name=\"data.zip\" media-type=\"application/zip\" class=\"OOoImprovementLog\"/>\n" "</reportmail:mail>\n" - + getOfficeInfoXml(m_ServiceFactory) + + getOfficeInfoXml(m_ServiceFactory) + getSystemInfoXml(m_ServiceFactory) + "</errormail:errormail>\n"; return result.makeStringAndClear(); diff --git a/extensions/source/oooimprovement/errormail.hxx b/extensions/source/oooimprovement/errormail.hxx index 8b836514fcac..8a9f3a4db7a4 100644 --- a/extensions/source/oooimprovement/errormail.hxx +++ b/extensions/source/oooimprovement/errormail.hxx @@ -1,7 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/oooimprovement/invite_job.cxx b/extensions/source/oooimprovement/invite_job.cxx index 1b96c0c181cd..59c84acde617 100644 --- a/extensions/source/oooimprovement/invite_job.cxx +++ b/extensions/source/oooimprovement/invite_job.cxx @@ -1,7 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/oooimprovement/invite_job.hxx b/extensions/source/oooimprovement/invite_job.hxx index 65981518657a..fc2feb515a85 100644 --- a/extensions/source/oooimprovement/invite_job.hxx +++ b/extensions/source/oooimprovement/invite_job.hxx @@ -1,7 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/oooimprovement/logpacker.cxx b/extensions/source/oooimprovement/logpacker.cxx index 4defc2ab2cbe..59dadca7a3bb 100644 --- a/extensions/source/oooimprovement/logpacker.cxx +++ b/extensions/source/oooimprovement/logpacker.cxx @@ -1,7 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -70,7 +70,7 @@ namespace oooimprovement LogPacker::LogPacker(const Reference<XMultiServiceFactory>& sf) : m_ServiceFactory(sf) {} - + sal_Int32 LogPacker::pack(const OUString& fileurl) { Reference<XSimpleFileAccess> file_access( @@ -108,10 +108,10 @@ namespace oooimprovement unzipped_stream->closeInput(); zipped_stream->flush(); zipped_stream->closeOutput(); - Reference<XTransactedObject>(storage, UNO_QUERY_THROW)->commit(); + Reference<XTransactedObject>(storage, UNO_QUERY_THROW)->commit(); file_access->kill(fileurl); return logged_events; } -} +} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/extensions/source/oooimprovement/logpacker.hxx b/extensions/source/oooimprovement/logpacker.hxx index fdf08141ba03..52e86fd8e065 100644 --- a/extensions/source/oooimprovement/logpacker.hxx +++ b/extensions/source/oooimprovement/logpacker.hxx @@ -1,7 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/oooimprovement/logstorage.cxx b/extensions/source/oooimprovement/logstorage.cxx index 7181ed2fdce6..27313a5fb4d9 100644 --- a/extensions/source/oooimprovement/logstorage.cxx +++ b/extensions/source/oooimprovement/logstorage.cxx @@ -1,7 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -60,20 +60,20 @@ namespace result = path_sub->substituteVariables(result, sal_False); return result; } - + static bool isZipfile(const OUString& fileurl) { static const OUString file_extension = OUString::createFromAscii(".zip"); - return fileurl.match(file_extension, fileurl.getLength()-file_extension.getLength()); + return fileurl.match(file_extension, fileurl.getLength()-file_extension.getLength()); }; - + static bool isLogfile(const OUString& fileurl) { static const OUString file_extension = OUString::createFromAscii(".csv"); static const OUString current = OUString::createFromAscii("Current.csv"); return fileurl.match(file_extension, fileurl.getLength()-file_extension.getLength()) - && !fileurl.match(current, fileurl.getLength()-current.getLength()); + && !fileurl.match(current, fileurl.getLength()-current.getLength()); }; static bool isZipOrLogFile(const OUString& fileurl) @@ -88,9 +88,9 @@ namespace UNO_QUERY_THROW); return file_access->getFolderContents( getLogPathFromCfg(sf), - false); + false); }; - + static vector<OUString> getLogStoragefiles( const Reference<XMultiServiceFactory>& sf, bool (*condition)(const OUString& path)) @@ -102,7 +102,7 @@ namespace if(condition(candidates[idx])) result.push_back(candidates[idx]); return result; - }; + }; static void assureLogStorageExists(const Reference<XMultiServiceFactory>& sf) { @@ -121,7 +121,7 @@ namespace oooimprovement LogStorage::LogStorage(const Reference<XMultiServiceFactory>& sf) : m_ServiceFactory(sf) {} - + void LogStorage::assureExists() { assureLogStorageExists(m_ServiceFactory); @@ -141,9 +141,9 @@ namespace oooimprovement const vector<OUString> LogStorage::getUnzippedLogFiles() const { return getLogStoragefiles(m_ServiceFactory, &isLogfile); } - + const vector<OUString> LogStorage::getZippedLogFiles() const { return getLogStoragefiles(m_ServiceFactory, &isZipfile); } -} +} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/extensions/source/oooimprovement/logstorage.hxx b/extensions/source/oooimprovement/logstorage.hxx index 82dcdf331f59..f97c99a51085 100644 --- a/extensions/source/oooimprovement/logstorage.hxx +++ b/extensions/source/oooimprovement/logstorage.hxx @@ -1,7 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/oooimprovement/myconfigurationhelper.cxx b/extensions/source/oooimprovement/myconfigurationhelper.cxx index d9ff3ecd03dc..88e11dfcc88d 100644 --- a/extensions/source/oooimprovement/myconfigurationhelper.cxx +++ b/extensions/source/oooimprovement/myconfigurationhelper.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -62,7 +62,7 @@ namespace buf.appendAscii("The requested path \""); buf.append(path); buf.appendAscii("\" does not exists."); - return buf.makeStringAndClear(); + return buf.makeStringAndClear(); }; } diff --git a/extensions/source/oooimprovement/myconfigurationhelper.hxx b/extensions/source/oooimprovement/myconfigurationhelper.hxx index 619d8cf93e06..96936bcb9656 100644 --- a/extensions/source/oooimprovement/myconfigurationhelper.hxx +++ b/extensions/source/oooimprovement/myconfigurationhelper.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/oooimprovement/onlogrotate_job.cxx b/extensions/source/oooimprovement/onlogrotate_job.cxx index 18108df7629e..da78298b6145 100644 --- a/extensions/source/oooimprovement/onlogrotate_job.cxx +++ b/extensions/source/oooimprovement/onlogrotate_job.cxx @@ -1,7 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/oooimprovement/onlogrotate_job.hxx b/extensions/source/oooimprovement/onlogrotate_job.hxx index 16e36530073c..5832c44d658d 100644 --- a/extensions/source/oooimprovement/onlogrotate_job.hxx +++ b/extensions/source/oooimprovement/onlogrotate_job.hxx @@ -1,7 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/oooimprovement/oooimprovement_exports.cxx b/extensions/source/oooimprovement/oooimprovement_exports.cxx index fff1610fcb3a..eed57333d3de 100644 --- a/extensions/source/oooimprovement/oooimprovement_exports.cxx +++ b/extensions/source/oooimprovement/oooimprovement_exports.cxx @@ -1,7 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -108,6 +108,6 @@ extern "C" factory->acquire(); return factory.get(); } -} +} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/extensions/source/oooimprovement/soaprequest.cxx b/extensions/source/oooimprovement/soaprequest.cxx index aad080ed9520..c2dc4b348ef4 100644 --- a/extensions/source/oooimprovement/soaprequest.cxx +++ b/extensions/source/oooimprovement/soaprequest.cxx @@ -1,7 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/oooimprovement/soaprequest.hxx b/extensions/source/oooimprovement/soaprequest.hxx index 313569a2c0d0..126bc0948343 100644 --- a/extensions/source/oooimprovement/soaprequest.hxx +++ b/extensions/source/oooimprovement/soaprequest.hxx @@ -1,7 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/oooimprovement/soapsender.cxx b/extensions/source/oooimprovement/soapsender.cxx index 17a3252fb608..32a50f30e3cb 100644 --- a/extensions/source/oooimprovement/soapsender.cxx +++ b/extensions/source/oooimprovement/soapsender.cxx @@ -1,7 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -58,7 +58,7 @@ namespace { static OString getHttpPostHeader(OString path, sal_Int32 length) { - OStringBuffer result = + OStringBuffer result = "POST " + path + " HTTP/1.0\r\n" "Content-Type: text/xml; charset=\"utf-8\"\r\n" "Content-Length: "; @@ -74,7 +74,7 @@ namespace oooimprovement : m_ServiceFactory(sf) , m_Url(url) { } - + void SoapSender::send(const SoapRequest& request) const { Reference<XTempFile> temp_file( @@ -86,19 +86,19 @@ namespace oooimprovement Reference<XURLTransformer> url_trans( m_ServiceFactory->createInstance(OUString::createFromAscii("com.sun.star.util.URLTransformer")), UNO_QUERY_THROW); - - // writing request to tempfile + + // writing request to tempfile { Reference<XOutputStream> temp_stream = temp_file->getOutputStream(); request.writeTo(temp_stream); temp_stream->flush(); temp_stream->closeOutput(); } - + // parse Url URL url; { - url.Complete = m_Url; + url.Complete = m_Url; url_trans->parseStrict(url); } @@ -112,7 +112,7 @@ namespace oooimprovement OUString::createFromAscii("unable to connect to SOAP server"), Reference<XInterface>()); } - + // send header { OStringBuffer path_on_server = @@ -122,9 +122,9 @@ namespace oooimprovement if(socket->write(header.getStr(), header.getLength()) != static_cast<sal_Int32>(header.getLength())) throw RuntimeException( OUString::createFromAscii("error while sending HTTP header"), - Reference<XInterface>()); + Reference<XInterface>()); } - + // send soap request { Reference<XInputStream> temp_stream = file_access->openFileRead(temp_file->getUri()); @@ -158,6 +158,6 @@ namespace oooimprovement Reference<XInterface>()); } } -} +} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/extensions/source/oooimprovement/soapsender.hxx b/extensions/source/oooimprovement/soapsender.hxx index b21cbe95e011..6a3e3d6f1d51 100644 --- a/extensions/source/oooimprovement/soapsender.hxx +++ b/extensions/source/oooimprovement/soapsender.hxx @@ -1,7 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -50,7 +50,7 @@ namespace oooimprovement void send(const SoapRequest& request) const; private: const css::uno::Reference< css::lang::XMultiServiceFactory> m_ServiceFactory; - const ::rtl::OUString m_Url; + const ::rtl::OUString m_Url; }; #undef css } diff --git a/extensions/source/plugin/aqua/macmgr.cxx b/extensions/source/plugin/aqua/macmgr.cxx index f1d0e3a3c99b..e17b3bde2058 100644 --- a/extensions/source/plugin/aqua/macmgr.cxx +++ b/extensions/source/plugin/aqua/macmgr.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -40,7 +40,7 @@ using namespace com::sun::star::plugin; namespace plugstringhelper { - + rtl::OUString getString( CFStringRef i_xString ) { rtl::OUStringBuffer aBuf; @@ -70,7 +70,7 @@ CFMutableStringRef createString( const rtl::OUString& i_rString ) CFURLRef createURL( const rtl::OUString& i_rString ) { - + CFMutableStringRef xMutableString = createString( i_rString ); CFURLRef xURL = CFURLCreateWithString( NULL, xMutableString, NULL ); CFRelease( xMutableString ); @@ -124,12 +124,12 @@ static int parsePlist( CFBundleRef i_xBundle, const rtl::OUString& i_rBundleURL { return 0; } - + // prepare an array of key and value refs std::vector< CFTypeRef > aKeys( nMimetypes, CFTypeRef(NULL) ); std::vector< CFTypeRef > aValues( nMimetypes, CFTypeRef(NULL) ); CFDictionaryGetKeysAndValues(static_cast<CFDictionaryRef>(xMimeDict), &aKeys[0], &aValues[0] ); - + int nAdded = 0; for( int i = 0; i < nMimetypes; i++ ) { @@ -138,7 +138,7 @@ static int parsePlist( CFBundleRef i_xBundle, const rtl::OUString& i_rBundleURL if( ! xKey || CFGetTypeID(xKey) != CFStringGetTypeID() ) continue; rtl::OUString aMimetype = getString( (CFStringRef)xKey ); - + // the correspoding value should be a dictionary CFTypeRef xDict = aValues[i]; if( ! xDict || CFGetTypeID( xDict ) != CFDictionaryGetTypeID() ) @@ -148,7 +148,7 @@ static int parsePlist( CFBundleRef i_xBundle, const rtl::OUString& i_rBundleURL CFTypeRef xExtArray = CFDictionaryGetValue( (CFDictionaryRef)xDict, CFSTR("WebPluginExtensions" ) ); if( !xExtArray || CFGetTypeID( xExtArray ) != CFArrayGetTypeID() ) continue; - + OUStringBuffer aExtBuf; int nExtensions = CFArrayGetCount( (CFArrayRef)xExtArray ); for( int n = 0; n < nExtensions; n++ ) @@ -164,7 +164,7 @@ static int parsePlist( CFBundleRef i_xBundle, const rtl::OUString& i_rBundleURL aExtBuf.append( aExt ); } } - + // get the description string CFTypeRef xDescString = CFDictionaryGetValue( (CFDictionaryRef)xDict, CFSTR("WebPluginTypeDescription" ) ); if( !xDescString || CFGetTypeID( xDescString ) != CFStringGetTypeID() ) @@ -173,14 +173,14 @@ static int parsePlist( CFBundleRef i_xBundle, const rtl::OUString& i_rBundleURL PluginDescription* pNew = new PluginDescription; // set plugin name (path to library) - pNew->PluginName = i_rBundleURL; + pNew->PluginName = i_rBundleURL; // set mimetype - pNew->Mimetype = aMimetype; + pNew->Mimetype = aMimetype; // set extension line - pNew->Extension = aExtBuf.makeStringAndClear(); + pNew->Extension = aExtBuf.makeStringAndClear(); // set description pNew->Description= aDescription; - + io_rDescriptions.push_back( pNew ); nAdded++; @@ -195,9 +195,9 @@ static int parsePlist( CFBundleRef i_xBundle, const rtl::OUString& i_rBundleURL OUStringToOString( pNew->Description, RTL_TEXTENCODING_UTF8 ).getStr() ); #endif - + } - + return nAdded; } @@ -205,12 +205,12 @@ static int parseMimeString( const rtl::OUString& i_rBundleURL , list< PluginDesc { if( ! i_pMime ) return 0; - + rtl_TextEncoding aEncoding = osl_getThreadTextEncoding(); - + OStringBuffer aMIME; aMIME.append( i_pMime ); - + if( aMIME.getLength() < 1 ) return 0; @@ -221,14 +221,14 @@ static int parseMimeString( const rtl::OUString& i_rBundleURL , list< PluginDesc while( nIndex != -1 ) { OString aType = aLine.getToken( 0, ';', nIndex ); - + sal_Int32 nTypeIndex = 0; - OString aMimetype = aType.getToken( 0, ':', nTypeIndex ); - OString aExtLine = aType.getToken( 0, ':', nTypeIndex ); + OString aMimetype = aType.getToken( 0, ':', nTypeIndex ); + OString aExtLine = aType.getToken( 0, ':', nTypeIndex ); if( nTypeIndex < 0 ) // ensure at least three tokens continue; - OString aDesc = aType.getToken( 0, ':', nTypeIndex ); - + OString aDesc = aType.getToken( 0, ':', nTypeIndex ); + // create extension list string sal_Int32 nExtIndex = 0; OStringBuffer aExtension; @@ -241,19 +241,19 @@ static int parseMimeString( const rtl::OUString& i_rBundleURL , list< PluginDesc if( nExtIndex != -1 ) aExtension.append( ';' ); } - + PluginDescription* pNew = new PluginDescription; // set plugin name (path to library) - pNew->PluginName = i_rBundleURL; + pNew->PluginName = i_rBundleURL; // set mimetype - pNew->Mimetype = OStringToOUString( aMimetype, aEncoding ); + pNew->Mimetype = OStringToOUString( aMimetype, aEncoding ); // set extension line - pNew->Extension = OStringToOUString( aExtension.makeStringAndClear(), aEncoding ); + pNew->Extension = OStringToOUString( aExtension.makeStringAndClear(), aEncoding ); // set description pNew->Description= OStringToOUString( aDesc, aEncoding ); io_rDescriptions.push_back( pNew ); nAdded++; - + #if OSL_DEBUG_LEVEL > 1 fprintf( stderr, "Inserting from mime string:\n" @@ -295,7 +295,7 @@ static int parseMimeResource( CFBundleRef i_xBundle, #endif xRes = 0; BPSupportedMIMETypes aMIMETypesStrangeStruct = {kBPSupportedMIMETypesStructVers_1, NULL, NULL}; - + BP_GetSupportedMIMETypesUPP pBPGetSupp = (BP_GetSupportedMIMETypesUPP)osl_getAsciiFunctionSymbol( i_rMod, "BP_GetSupportedMIMETypes" ); if( pBPGetSupp && noErr == pBPGetSupp( &aMIMETypesStrangeStruct, 0 ) && @@ -324,7 +324,7 @@ static int parseMimeResource( CFBundleRef i_xBundle, } } } - + if( aMIMETypesStrangeStruct.typeStrings && aMIMETypesStrangeStruct.infoStrings ) { short nVariantCount = (**(short**)aMIMETypesStrangeStruct.typeStrings) / 2; @@ -353,19 +353,19 @@ static int parseMimeResource( CFBundleRef i_xBundle, if( nExtIndex != -1 ) aExtension.append( sal_Unicode(';') ); } - + PluginDescription* pNew = new PluginDescription; // set plugin name (path to library) - pNew->PluginName = i_rBundleURL; + pNew->PluginName = i_rBundleURL; // set mimetype - pNew->Mimetype = aMimetype; + pNew->Mimetype = aMimetype; // set extension line - pNew->Extension = aExtension.makeStringAndClear(); + pNew->Extension = aExtension.makeStringAndClear(); // set description pNew->Description= aDescription; io_rDescriptions.push_back( pNew ); nAdded++; - + #if OSL_DEBUG_LEVEL > 1 fprintf( stderr, "Inserting from resource:\n" @@ -379,8 +379,8 @@ static int parseMimeResource( CFBundleRef i_xBundle, #endif } } - - + + // clean up if( aMIMETypesStrangeStruct.typeStrings ) { @@ -394,7 +394,7 @@ static int parseMimeResource( CFBundleRef i_xBundle, } if( xRes ) CFBundleCloseBundleResourceMap( i_xBundle, xRes ); - + return nAdded; } @@ -410,9 +410,9 @@ static bool checkBlackList( CFBundleRef i_xBundle ) CFTypeRef bundleversion = CFBundleGetValueForInfoDictionaryKey( i_xBundle, CFSTR("CFBundleVersion")); if( bundleversion && CFGetTypeID(bundleversion) == CFStringGetTypeID() ) aBundleVersion = getString( static_cast<CFStringRef>(bundleversion) ); - + bool bReject = false; - // #i102735# VLC plugin prior to 1.0 tends to crash + // #i102735# VLC plugin prior to 1.0 tends to crash if( aBundleName.equalsAscii( "VLC Plug-in" ) ) { sal_Int32 nIndex = 0; @@ -427,7 +427,7 @@ static bool checkBlackList( CFBundleRef i_xBundle ) { bReject = true; } - + #if OSL_DEBUG_LEVEL > 1 if( bReject ) fprintf( stderr, "rejecting plugin \"%s\" version %s\n", @@ -444,7 +444,7 @@ static int getPluginDescriptions( CFBundleRef i_xBundle , list< PluginDescriptio int nDescriptions = 0; if( ! i_xBundle ) return nDescriptions; - + if( checkBlackList( i_xBundle ) ) return 0; @@ -452,7 +452,7 @@ static int getPluginDescriptions( CFBundleRef i_xBundle , list< PluginDescriptio CFURLRef xURL = CFBundleCopyBundleURL( i_xBundle ); aPlugURL = getString( xURL ); CFRelease( xURL ); - + #if OSL_DEBUG_LEVEL > 1 rtl::OUString aPlugName, aPlugDescription; CFTypeRef name = CFBundleGetValueForInfoDictionaryKey( i_xBundle, CFSTR("WebPluginName")); @@ -462,15 +462,15 @@ static int getPluginDescriptions( CFBundleRef i_xBundle , list< PluginDescriptio CFTypeRef description = CFBundleGetValueForInfoDictionaryKey( i_xBundle, CFSTR("WebPluginDescription")); if( description && CFGetTypeID(description) == CFStringGetTypeID() ) aPlugDescription = getString( static_cast<CFStringRef>(description) ); - + fprintf( stderr, "URL: %s\nname: %s\ndescription: %s\n", rtl::OUStringToOString( aPlugURL, RTL_TEXTENCODING_UTF8 ).getStr(), rtl::OUStringToOString( aPlugName, RTL_TEXTENCODING_UTF8 ).getStr(), rtl::OUStringToOString( aPlugDescription, RTL_TEXTENCODING_UTF8 ).getStr() ); #endif - - + + // get location of plugin library CFURLRef xLibURL = CFBundleCopyExecutableURL( i_xBundle ); if( ! xLibURL ) @@ -478,7 +478,7 @@ static int getPluginDescriptions( CFBundleRef i_xBundle , list< PluginDescriptio // get the file system path rtl::OUString aModuleURL( CFURLtoOSLURL( xLibURL ) ); CFRelease( xLibURL ); - + #if OSL_DEBUG_LEVEL > 1 fprintf( stderr, "exec URL = %s\n", rtl::OUStringToOString( aModuleURL, RTL_TEXTENCODING_UTF8 ).getStr() ); #endif @@ -506,7 +506,7 @@ static int getPluginDescriptions( CFBundleRef i_xBundle , list< PluginDescriptio osl_unloadModule( aMod ); return nDescriptions; } - + // resolve the symbol that might get us the mimetypes const char* (*pGetMimeDescription)() = (const char*(*)())osl_getAsciiFunctionSymbol( aMod, "_NP_GetMIMEDescription" ); if( pGetMimeDescription ) @@ -522,7 +522,7 @@ static int getPluginDescriptions( CFBundleRef i_xBundle , list< PluginDescriptio } } } - + // and as last resort check the resource of the bundle nDescriptions = parseMimeResource( i_xBundle, aMod, aPlugURL, io_rDescriptions ); osl_unloadModule( aMod ); @@ -536,24 +536,24 @@ static bool CheckPlugin( const rtl::OUString& rPath, list< PluginDescription* >& #if OSL_DEBUG_LEVEL > 1 fprintf( stderr, "Trying path %s ... ", rtl::OUStringToOString( rPath, RTL_TEXTENCODING_UTF8 ).getStr() ); #endif - CFURLRef xURL = createURL( rPath ); - + CFURLRef xURL = createURL( rPath ); + CFArrayRef xBundles = CFBundleCreateBundlesFromDirectory( NULL, xURL, CFSTR("plugin") ); if( ! xBundles ) return false; - + CFIndex nBundles = CFArrayGetCount( xBundles ); - + #if OSL_DEBUG_LEVEL > 1 fprintf( stderr, "got %d bundles\n", (int)nBundles ); #endif - + int nDescriptions = 0; for( CFIndex i = 0; i < nBundles; i++ ) { CFBundleRef xBundle = (CFBundleRef)CFArrayGetValueAtIndex( xBundles, i ); nDescriptions += getPluginDescriptions( xBundle, rDescriptions ); - + CFRelease( xBundle ); } CFRelease( xBundles ); @@ -574,7 +574,7 @@ static rtl::OUString FindFolderURL( FSVolumeRefNum vRefNum, OSType folderType ) aRet = getString( xURL ); CFRelease( xURL ); } - + return aRet; } @@ -587,7 +587,7 @@ Sequence<PluginDescription> XPluginManager_Impl::impl_getPluginDescriptions() th std::list<PluginDescription*> aPlugins; static const char* pNPXPluginPath = getenv( "MOZ_PLUGIN_PATH" ); - + // get directories std::list< rtl::OUString > aPaths; if( pNPXPluginPath ) @@ -599,7 +599,7 @@ Sequence<PluginDescription> XPluginManager_Impl::impl_getPluginDescriptions() th aPaths.push_back( getString( xURL ) ); CFRelease( xURL ); } - + rtl::OUString aPath = FindFolderURL( kUserDomain, kInternetPlugInFolderType ); if( aPath.getLength() ) aPaths.push_back( aPath ); @@ -609,14 +609,14 @@ Sequence<PluginDescription> XPluginManager_Impl::impl_getPluginDescriptions() th aPath = FindFolderURL( kOnAppropriateDisk, kInternetPlugInFolderType ); if( aPath.getLength() ) aPaths.push_back( aPath ); - - + + const Sequence< ::rtl::OUString >& rPaths( PluginManager::getAdditionalSearchPaths() ); for( sal_Int32 i = 0; i < rPaths.getLength(); i++ ) { aPaths.push_back( getURLFromPath( rPaths.getConstArray()[i] ) ); } - + for( std::list< rtl::OUString >::const_iterator it = aPaths.begin(); it != aPaths.end(); ++it ) { rtl::OUString aPath( *it ); @@ -625,8 +625,8 @@ Sequence<PluginDescription> XPluginManager_Impl::impl_getPluginDescriptions() th #endif CheckPlugin( aPath, aPlugins ); } - - + + // create return value aDescriptions = Sequence<PluginDescription>( aPlugins.size() ); #if OSL_DEBUG_LEVEL > 1 diff --git a/extensions/source/plugin/aqua/sysplug.cxx b/extensions/source/plugin/aqua/sysplug.cxx index 39e3fc5cc4c4..3139b5cdfe45 100644 --- a/extensions/source/plugin/aqua/sysplug.cxx +++ b/extensions/source/plugin/aqua/sysplug.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -208,7 +208,7 @@ MacPluginComm::MacPluginComm( const rtl::OUString& i_rMimetype, const rtl::OUStr { // initialize plugin function table memset( &m_aNPPfuncs, 0, sizeof( m_aNPPfuncs ) ); - + // load the bundle CFURLRef xURL = createURL( i_rBundle ); m_xBundle = CFBundleCreate( NULL, xURL ); @@ -247,7 +247,7 @@ MacPluginComm::MacPluginComm( const rtl::OUString& i_rMimetype, const rtl::OUStr m_aNPPfuncs.size = sizeof( m_aNPPfuncs ); m_aNPPfuncs.version = 0; - + m_eCall = eNP_Initialize; execute(); } @@ -277,7 +277,7 @@ BOOL MacPluginComm::retrieveFunction( const char* i_pName, void** o_ppFunc ) con return FALSE; *o_ppFunc = (void*)osl_getAsciiFunctionSymbol( m_hPlugLib, i_pName ); - + if( ! *o_ppFunc && m_xBundle ) { rtl::OUString aName( OUString::createFromAscii( *i_pName == '_' ? i_pName+1 : i_pName ) ); @@ -295,7 +295,7 @@ BOOL MacPluginComm::retrieveFunction( const char* i_pName, void** o_ppFunc ) con IMPL_LINK( MacPluginComm, NullTimerHdl, void*, EMPTYARG ) { // note: this is a Timer handler, we are already protected by the SolarMutex - + FakeEventRecord aRec; aRec.what = nullEvent; aRec.where.h = aRec.where.v = 20000; @@ -307,7 +307,7 @@ IMPL_LINK( MacPluginComm, NullTimerHdl, void*, EMPTYARG ) if( rPlugData.m_pPlugView ) // for safety do not dispatch null events before first NPP_SetWindow (*m_aNPPfuncs.event)( (*it)->getNPPInstance(), &aRec ); } - + return 0; } @@ -330,8 +330,8 @@ long MacPluginComm::doIt() NPError (*pEntry)( NPPluginFuncs* ); retrieveFunction( "NP_GetEntryPoints", (void**)&pEntry ); nErr = (*pEntry)( &m_aNPPfuncs ); - - DBG_ASSERT( nErr == NPERR_NO_ERROR, "NP_GetEntryPoints() failed!" ); + + DBG_ASSERT( nErr == NPERR_NO_ERROR, "NP_GetEntryPoints() failed!" ); } else { @@ -343,7 +343,7 @@ long MacPluginComm::doIt() case eNPP_Destroy: if( m_aNullEventClients.empty() ) delete m_pNullTimer, m_pNullTimer = NULL; - + TRACE( "eNPP_Destroy" ); nRet = (m_aNPPfuncs.destroy ? (*m_aNPPfuncs.destroy)( @@ -408,7 +408,7 @@ long MacPluginComm::doIt() (NPP)m_aArgs[0], (NPWindow*)m_aArgs[1] ) : NPERR_GENERIC_ERROR); - + break; } case eNPP_HandleEvent: @@ -419,7 +419,7 @@ long MacPluginComm::doIt() (NPP)m_aArgs[0], m_aArgs[1] ) : NPERR_GENERIC_ERROR); - + break; } case eNPP_StreamAsFile: @@ -501,9 +501,9 @@ NPError MacPluginComm::NPP_Destroy( XPlugin_Impl* i_pImpl, NPSavedData** save ) { // remove from NullEvent timer m_aNullEventClients.remove( i_pImpl ); - + NPError nErr = NPP_Destroy( i_pImpl->getNPPInstance(), save ); - + // release plugin view SysPlugData& rPlugData( i_pImpl->getSysPlugData() ); if( rPlugData.m_pPlugView ) @@ -512,7 +512,7 @@ NPError MacPluginComm::NPP_Destroy( XPlugin_Impl* i_pImpl, NPSavedData** save ) [rPlugData.m_pPlugView release]; rPlugData.m_pPlugView = nil; } - + return nErr; } @@ -546,7 +546,7 @@ NPError MacPluginComm::NPP_New( NPMIMEType pluginType, NPP instance, uint16 mode if( pImpl ) // sanity check m_aNullEventClients.push_back( pImpl ); - + DBG_ASSERT( m_aNPPfuncs.newp, "### NPP_New(): null pointer in NPP functions table!" ); #if OSL_DEBUG_LEVEL > 1 fprintf( stderr, "NPP_New( %s. %p, %d, %d", @@ -563,7 +563,7 @@ NPError MacPluginComm::NPP_New( NPMIMEType pluginType, NPP instance, uint16 mode m_aArgs[4] = (void*)argn; m_aArgs[5] = (void*)argv; m_aArgs[6] = (void*)saved; - + return (NPError)execute(); } @@ -703,7 +703,7 @@ void MacPluginComm::NPP_Shutdown() NPError MacPluginComm::NPP_SetWindow( XPlugin_Impl* i_pImpl ) { // update window NPWindow from view - SysPlugData& rPlugData( i_pImpl->getSysPlugData() ); + SysPlugData& rPlugData( i_pImpl->getSysPlugData() ); // update plug view NSRect aPlugRect = [rPlugData.m_pParentView frame]; @@ -721,31 +721,31 @@ NPError MacPluginComm::NPP_SetWindow( XPlugin_Impl* i_pImpl ) NSRect aWinRect = [pWin frame]; NSRect aBounds = [rPlugData.m_pPlugView frame]; NSRect aVisibleBounds = [rPlugData.m_pPlugView visibleRect]; - + #if OSL_DEBUG_LEVEL > 1 fprintf( stderr, "visible bounds = %d+%d+%dx%d\n", (int)aVisibleBounds.origin.x, (int)aVisibleBounds.origin.y, (int)aVisibleBounds.size.width, (int)aVisibleBounds.size.height ); #endif - + NSPoint aViewOrigin = [rPlugData.m_pPlugView convertPoint: NSZeroPoint toView: nil]; // save view origin so we can notice movement of the view in drawView // in case of a moved view we need to reset the port/context rPlugData.m_aLastPlugViewOrigin = aViewOrigin; - + // convert view origin to topdown coordinates aViewOrigin.y = aWinRect.size.height - aViewOrigin.y; - + // same for clipping NSPoint aClipOrigin = [rPlugData.m_pPlugView convertPoint: aVisibleBounds.origin toView: nil]; aClipOrigin.y = aWinRect.size.height - aClipOrigin.y; - + #if OSL_DEBUG_LEVEL > 1 fprintf( stderr, "view origin: %d+%d, clip origin = %d+%d\n", (int)aViewOrigin.x, (int)aViewOrigin.y, (int)aClipOrigin.x, (int)aClipOrigin.y ); #endif - + pNPWin->x = aViewOrigin.x; pNPWin->y = aViewOrigin.y; pNPWin->width = aBounds.size.width; @@ -756,7 +756,7 @@ NPError MacPluginComm::NPP_SetWindow( XPlugin_Impl* i_pImpl ) pNPWin->clipRect.bottom = aClipOrigin.y + aVisibleBounds.size.height; if( rPlugData.m_nDrawingModel == 1 ) - { + { rPlugData.m_aCGContext.window = reinterpret_cast<WindowRef>([pWin windowRef]); pNPWin->window = &rPlugData.m_aCGContext; rPlugData.m_aCGContext.context = reinterpret_cast<CGContextRef>([[pWin graphicsContext] graphicsPort]); @@ -776,12 +776,12 @@ NPError MacPluginComm::NPP_SetWindow( XPlugin_Impl* i_pImpl ) rPlugData.m_aNPPort.port, (int)rPlugData.m_aNPPort.portx, (int)rPlugData.m_aNPPort.porty ); #endif } - + if( pNPWin->width == 0 || pNPWin->height == 0 || [rPlugData.m_pPlugView isHiddenOrHasHiddenAncestor] ) rPlugData.m_bSetWindowOnDraw = true; NPError nErr = NPP_SetWindow( i_pImpl->getNPPInstance(), i_pImpl->getNPWindow() ); - + return nErr; } diff --git a/extensions/source/plugin/base/context.cxx b/extensions/source/plugin/base/context.cxx index 4d6a109d57e5..bf23f9c19113 100644 --- a/extensions/source/plugin/base/context.cxx +++ b/extensions/source/plugin/base/context.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -52,19 +52,19 @@ using namespace com::sun::star::io; namespace ext_plug { - + class FileSink : public ::cppu::WeakAggImplHelper1< ::com::sun::star::io::XOutputStream > { private: - Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xSMgr; - FILE* fp; - Reference< ::com::sun::star::plugin::XPlugin > m_xPlugin; - ::rtl::OUString m_aMIMEType; - ::rtl::OUString m_aTarget; - ::rtl::OUString m_aFileName; + Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xSMgr; + FILE* fp; + Reference< ::com::sun::star::plugin::XPlugin > m_xPlugin; + ::rtl::OUString m_aMIMEType; + ::rtl::OUString m_aTarget; + ::rtl::OUString m_aFileName; public: - FileSink( const Reference< ::com::sun::star::lang::XMultiServiceFactory > &, + FileSink( const Reference< ::com::sun::star::lang::XMultiServiceFactory > &, const Reference< ::com::sun::star::plugin::XPlugin > & plugin, const ::rtl::OUString& mimetype, const ::rtl::OUString& target, @@ -82,8 +82,8 @@ using namespace ext_plug; class XPluginContext_Impl : public ::cppu::WeakAggImplHelper1< ::com::sun::star::plugin::XPluginContext > { - Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xSMgr; - rtl_TextEncoding m_aEncoding; + Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xSMgr; + rtl_TextEncoding m_aEncoding; public: XPluginContext_Impl( const Reference< ::com::sun::star::lang::XMultiServiceFactory > & ); @@ -142,7 +142,7 @@ void XPluginContext_Impl::getURL(const Reference< ::com::sun::star::plugin::XPlu 0, 0, (sal_Bool)(aUrl.compareToAscii( "file:", 5 ) == 0) ); return; } - + Reference< ::com::sun::star::frame::XComponentLoader > xLoader( xInst, UNO_QUERY ); XPlugin_Impl* pPlugin = XPluginManager_Impl::getPluginImplementation( plugin ); @@ -151,9 +151,9 @@ void XPluginContext_Impl::getURL(const Reference< ::com::sun::star::plugin::XPlu try { ::com::sun::star::beans::PropertyValue aValue; - aValue.Name = ::rtl::OUString::createFromAscii( "Referer" ); + aValue.Name = ::rtl::OUString::createFromAscii( "Referer" ); aValue.Value <<= pPlugin->getRefererURL(); - + Sequence< ::com::sun::star::beans::PropertyValue > aArgs( &aValue, 1 ); Reference< ::com::sun::star::lang::XComponent > xComp = xLoader->loadComponentFromURL( @@ -228,10 +228,10 @@ void XPluginContext_Impl::postURL(const Reference< ::com::sun::star::plugin::XPl try { ::com::sun::star::beans::PropertyValue aValues[2]; - aValues[0].Name = ::rtl::OUString::createFromAscii( "Referer" ); + aValues[0].Name = ::rtl::OUString::createFromAscii( "Referer" ); aValues[0].Value <<= pPlugin->getRefererURL(); - - aValues[1].Name = ::rtl::OUString::createFromAscii( "PostString" ); + + aValues[1].Name = ::rtl::OUString::createFromAscii( "PostString" ); aValues[1].Value <<= ::rtl::OStringToOUString( (char*)( file ? aBuf : buf ).getConstArray(), m_aEncoding ); Sequence< ::com::sun::star::beans::PropertyValue > aArgs( aValues, 2 ); Reference< ::com::sun::star::lang::XComponent > xComp = @@ -313,7 +313,7 @@ void FileSink::closeOutput() throw() ::com::sun::star::beans::PropertyValue aValue; aValue.Name = ::rtl::OUString::createFromAscii( "Referer" ); aValue.Value <<= pPlugin->getRefererURL(); - + Sequence< ::com::sun::star::beans::PropertyValue > aArgs( &aValue, 1 ); Reference< ::com::sun::star::lang::XComponent > xComp = xLoader->loadComponentFromURL( diff --git a/extensions/source/plugin/base/evtlstnr.cxx b/extensions/source/plugin/base/evtlstnr.cxx index d01844aadff6..ffbf3c208031 100644 --- a/extensions/source/plugin/base/evtlstnr.cxx +++ b/extensions/source/plugin/base/evtlstnr.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/plugin/base/manager.cxx b/extensions/source/plugin/base/manager.cxx index 0ebee37244c9..4e193244d0eb 100644 --- a/extensions/source/plugin/base/manager.cxx +++ b/extensions/source/plugin/base/manager.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/plugin/base/multiplx.cxx b/extensions/source/plugin/base/multiplx.cxx index 209885f6a475..bd25b51db184 100644 --- a/extensions/source/plugin/base/multiplx.cxx +++ b/extensions/source/plugin/base/multiplx.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -31,9 +31,9 @@ #include <osl/diagnose.h> #include <plugin/multiplx.hxx> -// --------------------------------------------------------------------- -// class MRCListenerMultiplexerHelper -// --------------------------------------------------------------------- +// --------------------------------------------------------------------- +// class MRCListenerMultiplexerHelper +// --------------------------------------------------------------------- MRCListenerMultiplexerHelper::MRCListenerMultiplexerHelper ( const Reference< ::com::sun::star::awt::XWindow > & rControl @@ -172,32 +172,32 @@ void MRCListenerMultiplexerHelper::disposing(const ::com::sun::star::lang::Event xPeer = Reference< ::com::sun::star::awt::XWindow > (); } -#define MULTIPLEX( InterfaceName, MethodName, EventName ) \ -::cppu::OInterfaceContainerHelper * pCont; \ -pCont = aListenerHolder.getContainer( ::getCppuType((const Reference< InterfaceName >*)0) ); \ -if( pCont ) \ -{ \ - ::cppu::OInterfaceIteratorHelper aIt( *pCont ); \ - EventName aEvt = e; \ - /* Remark: The control is the event source not the peer. We must change */ \ - /* the source of the event */ \ +#define MULTIPLEX( InterfaceName, MethodName, EventName ) \ +::cppu::OInterfaceContainerHelper * pCont; \ +pCont = aListenerHolder.getContainer( ::getCppuType((const Reference< InterfaceName >*)0) ); \ +if( pCont ) \ +{ \ + ::cppu::OInterfaceIteratorHelper aIt( *pCont ); \ + EventName aEvt = e; \ + /* Remark: The control is the event source not the peer. We must change */ \ + /* the source of the event */ \ aEvt.Source = xControl;\ - /*.is the control not destroyed */ \ - if( aEvt.Source.is() ) \ - { \ - if( aIt.hasMoreElements() ) \ - { \ - InterfaceName * pListener = (InterfaceName *)aIt.next(); \ - try \ - { \ - pListener->MethodName( aEvt ); \ - } \ - catch( RuntimeException& ) \ - { \ - /* ignore all usr system exceptions from the listener */ \ - } \ - } \ - } \ + /*.is the control not destroyed */ \ + if( aEvt.Source.is() ) \ + { \ + if( aIt.hasMoreElements() ) \ + { \ + InterfaceName * pListener = (InterfaceName *)aIt.next(); \ + try \ + { \ + pListener->MethodName( aEvt ); \ + } \ + catch( RuntimeException& ) \ + { \ + /* ignore all usr system exceptions from the listener */ \ + } \ + } \ + } \ } // ::com::sun::star::awt::XFocusListener diff --git a/extensions/source/plugin/base/nfuncs.cxx b/extensions/source/plugin/base/nfuncs.cxx index b378795a92f1..cbfc05e423e8 100644 --- a/extensions/source/plugin/base/nfuncs.cxx +++ b/extensions/source/plugin/base/nfuncs.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -158,9 +158,9 @@ static ::rtl::OString normalizeURL( XPlugin_Impl* plugin, const ::rtl::OString& struct AsynchronousGetURL { - OUString aUrl; - OUString aTarget; - Reference< XEventListener > xListener; + OUString aUrl; + OUString aTarget; + Reference< XEventListener > xListener; DECL_LINK( getURL, XPlugin_Impl* ); }; @@ -287,9 +287,9 @@ extern "C" { pImpl->addPluginEventListener( pListener ); pListener = NULL; } - pAsync->aUrl = OStringToOUString( aLoadURL, pImpl->getTextEncoding() ); - pAsync->aTarget = OStringToOUString( target, pImpl->getTextEncoding() ); - pAsync->xListener = pListener; + pAsync->aUrl = OStringToOUString( aLoadURL, pImpl->getTextEncoding() ); + pAsync->aTarget = OStringToOUString( target, pImpl->getTextEncoding() ); + pAsync->xListener = pListener; pImpl->setLastGetUrl( aLoadURL ); Application::PostUserEvent( LINK( pAsync, AsynchronousGetURL, getURL ), pImpl ); @@ -550,7 +550,7 @@ NPError SAL_CALL NP_LOADDS NPN_GetValue( NPP instance, NPNVariable variable, vo if( ! pImpl ) return 0; - + NPError aResult( NPERR_NO_ERROR ); switch( variable ) @@ -622,9 +622,9 @@ NPError SAL_CALL NP_LOADDS NPN_SetValue( NPP instance, case (NPPVariable)1000: // NPNVpluginDrawingModel { int nDrawingModel = (int)value; // ugly, but that's the way we need to do it - + TRACEN( "drawing model: ", nDrawingModel ); - + XPlugin_Impl* pImpl = XPluginManager_Impl::getXPluginFromNPP( instance ); if( pImpl ) pImpl->getSysPlugData().m_nDrawingModel = nDrawingModel; diff --git a/extensions/source/plugin/base/plcom.cxx b/extensions/source/plugin/base/plcom.cxx index 9aef0e1de458..a77145cdf573 100644 --- a/extensions/source/plugin/base/plcom.cxx +++ b/extensions/source/plugin/base/plcom.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/plugin/base/plctrl.cxx b/extensions/source/plugin/base/plctrl.cxx index 4498ecedcb3b..cf86074806f9 100644 --- a/extensions/source/plugin/base/plctrl.cxx +++ b/extensions/source/plugin/base/plctrl.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -99,11 +99,11 @@ void PluginControl_Impl::dispose(void) void PluginControl_Impl::setPosSize( sal_Int32 nX_, sal_Int32 nY_, sal_Int32 nWidth_, sal_Int32 nHeight_, sal_Int16 nFlags ) throw( RuntimeException ) { - _nX = nX_ >=0 ? nX_ : 0; - _nY = nY_ >=0 ? nY_ : 0; - _nWidth = nWidth_ >=0 ? nWidth_ : 0; - _nHeight = nHeight_ >=0 ? nHeight_ : 0; - _nFlags = nFlags; + _nX = nX_ >=0 ? nX_ : 0; + _nY = nY_ >=0 ? nY_ : 0; + _nWidth = nWidth_ >=0 ? nWidth_ : 0; + _nHeight = nHeight_ >=0 ? nHeight_ : 0; + _nFlags = nFlags; if (_xPeerWindow.is()) _xPeerWindow->setPosSize( _nX, _nY, _nWidth, _nHeight, nFlags ); @@ -124,7 +124,7 @@ void PluginControl_Impl::setVisible( sal_Bool bVisible ) if (_xPeerWindow.is()) _xPeerWindow->setVisible( _bVisible && !_bInDesignMode ); } - + //---- ::com::sun::star::awt::XWindow ------------------------------------------------------------------------------------- void PluginControl_Impl::setEnable( sal_Bool bEnable ) throw( RuntimeException ) @@ -133,7 +133,7 @@ void PluginControl_Impl::setEnable( sal_Bool bEnable ) if (_xPeerWindow.is()) _xPeerWindow->setEnable( _bEnable ); } - + //---- ::com::sun::star::awt::XWindow ------------------------------------------------------------------------------------- void PluginControl_Impl::setFocus(void) throw( RuntimeException ) { @@ -149,9 +149,9 @@ void PluginControl_Impl::releasePeer() { _xParentWindow->removeFocusListener( this ); _xPeerWindow->dispose(); - _pSysChild = NULL; - _xPeerWindow = Reference< ::com::sun::star::awt::XWindow > (); - _xPeer = Reference< ::com::sun::star::awt::XWindowPeer > (); + _pSysChild = NULL; + _xPeerWindow = Reference< ::com::sun::star::awt::XWindow > (); + _xPeer = Reference< ::com::sun::star::awt::XWindowPeer > (); getMultiplexer()->setPeer( Reference< ::com::sun::star::awt::XWindow > () ); } } @@ -169,20 +169,20 @@ void PluginControl_Impl::createPeer( const Reference< ::com::sun::star::awt::XTo _xParentPeer = xParentPeer; _xParentWindow = Reference< ::com::sun::star::awt::XWindow > ( xParentPeer, UNO_QUERY ); DBG_ASSERT( _xParentWindow.is(), "### no parent peer window!" ); - + Window* pImpl = VCLUnoHelper::GetWindow( xParentPeer ); if (pImpl) { _pSysChild = new SystemChildWindow( pImpl, WB_CLIPCHILDREN ); if (pImpl->HasFocus()) _pSysChild->GrabFocus(); - + // get peer - _xPeer = Reference< ::com::sun::star::awt::XWindowPeer > ( _pSysChild->GetComponentInterface() ); - _xPeerWindow = Reference< ::com::sun::star::awt::XWindow > ( _xPeer, UNO_QUERY ); + _xPeer = Reference< ::com::sun::star::awt::XWindowPeer > ( _pSysChild->GetComponentInterface() ); + _xPeerWindow = Reference< ::com::sun::star::awt::XWindow > ( _xPeer, UNO_QUERY ); // !_BOTH_ MUST BE VALID! DBG_ASSERT( (_xPeer.is() && _xPeerWindow.is()), "### no peer!" ); - + _xParentWindow->addFocusListener( this ); _xPeerWindow->setPosSize( _nX, _nY, _nWidth, _nHeight, _nFlags ); _xPeerWindow->setEnable( _bEnable ); @@ -220,7 +220,7 @@ void PluginControl_Impl::removePaintListener( const Reference< ::com::sun::star: } //---- ::com::sun::star::awt::XWindow ------------------------------------------------------------------------------------- -void PluginControl_Impl::addWindowListener( const Reference< ::com::sun::star::awt::XWindowListener > & l ) +void PluginControl_Impl::addWindowListener( const Reference< ::com::sun::star::awt::XWindowListener > & l ) throw( RuntimeException ) { getMultiplexer()->advise( ::getCppuType((const Reference< ::com::sun::star::awt::XWindowListener >*)0), l ); diff --git a/extensions/source/plugin/base/plmodel.cxx b/extensions/source/plugin/base/plmodel.cxx index 9cd5cd0e79cc..5a7164720900 100644 --- a/extensions/source/plugin/base/plmodel.cxx +++ b/extensions/source/plugin/base/plmodel.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -115,13 +115,13 @@ Reference< ::com::sun::star::beans::XPropertySetInfo > PluginModel::getProperty } sal_Bool PluginModel::convertFastPropertyValue( Any & rConvertedValue, - Any & rOldValue, + Any & rOldValue, sal_Int32 nHandle, const Any& rValue ) throw() { if( nHandle == 1 || nHandle == 2 ) { - if( rValue.getValueTypeClass() == TypeClass_STRING ) + if( rValue.getValueTypeClass() == TypeClass_STRING ) { rConvertedValue = rValue; if( nHandle == 2 ) @@ -182,7 +182,7 @@ void PluginModel::dispose(void) throw() (*it)->disposing( aEvt ); m_aDisposeListeners.clear(); - + disposing(); } diff --git a/extensions/source/plugin/base/service.cxx b/extensions/source/plugin/base/service.cxx index 1ce6dcc1a05c..0b5d8321bf22 100644 --- a/extensions/source/plugin/base/service.cxx +++ b/extensions/source/plugin/base/service.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -68,17 +68,17 @@ extern "C" { try { Reference< ::com::sun::star::registry::XRegistryKey > xKey( reinterpret_cast< ::com::sun::star::registry::XRegistryKey* >( pXUnoKey ) ); - + ::rtl::OUString aImplName = ::rtl::OUString::createFromAscii( "/" ); aImplName += XPluginManager_Impl::getImplementationName_Static(); aImplName += ::rtl::OUString::createFromAscii( "/UNO/SERVICES/com.sun.star.plugin.PluginManager" ); xKey->createKey( aImplName ); - + aImplName = ::rtl::OUString::createFromAscii( "/" ); aImplName += PluginModel::getImplementationName_Static(); aImplName += ::rtl::OUString::createFromAscii( "/UNO/SERVICES/com.sun.star.plugin.PluginModel" ); xKey->createKey( aImplName ); - + return sal_True; } catch( ::com::sun::star::registry::InvalidRegistryException& ) diff --git a/extensions/source/plugin/base/xplugin.cxx b/extensions/source/plugin/base/xplugin.cxx index 8e8af63b94b8..610cc8dd1d91 100644 --- a/extensions/source/plugin/base/xplugin.cxx +++ b/extensions/source/plugin/base/xplugin.cxx @@ -283,14 +283,14 @@ void XPlugin_Impl::freeArgs() void XPlugin_Impl::prependArg( const char* pName, const char* pValue ) { - const char** pNewNames = new const char*[m_nArgs+1]; - const char** pNewValues = new const char*[m_nArgs+1]; + const char** pNewNames = new const char*[m_nArgs+1]; + const char** pNewValues = new const char*[m_nArgs+1]; - pNewNames[0] = strdup( pName ); - pNewValues[0] = strdup( pValue ); + pNewNames[0] = strdup( pName ); + pNewValues[0] = strdup( pValue ); for( int nIndex = 0; nIndex < m_nArgs; ++nIndex ) { - pNewNames[nIndex+1] = m_pArgn[nIndex]; + pNewNames[nIndex+1] = m_pArgn[nIndex]; pNewValues[nIndex+1]= m_pArgv[nIndex]; } // free old arrays @@ -334,23 +334,23 @@ void XPlugin_Impl::handleSpecialArgs() m_pArgv = new const char*[m_nArgs]; // SRC - m_pArgn[0] = strdup( "SRC" ); - m_pArgv[0] = strdup( OUStringToOString( aURL, m_aEncoding ).getStr() ); + m_pArgn[0] = strdup( "SRC" ); + m_pArgv[0] = strdup( OUStringToOString( aURL, m_aEncoding ).getStr() ); // WIDTH - m_pArgn[1] = strdup( "WIDTH" ); - m_pArgv[1] = strdup( "200" ); + m_pArgn[1] = strdup( "WIDTH" ); + m_pArgv[1] = strdup( "200" ); // HEIGHT - m_pArgn[2] = strdup( "HEIGHT" ); - m_pArgv[2] = strdup( "200" ); + m_pArgn[2] = strdup( "HEIGHT" ); + m_pArgv[2] = strdup( "200" ); // CONTROLS - m_pArgn[3] = strdup( "CONTROLS" ); - m_pArgv[3] = strdup( "PlayButton,StopButton,ImageWindow" ); + m_pArgn[3] = strdup( "CONTROLS" ); + m_pArgv[3] = strdup( "PlayButton,StopButton,ImageWindow" ); // AUTOSTART - m_pArgn[4] = strdup( "AUTOSTART" ); - m_pArgv[4] = strdup( "TRUE" ); + m_pArgn[4] = strdup( "AUTOSTART" ); + m_pArgv[4] = strdup( "TRUE" ); // NOJAVA - m_pArgn[5] = strdup( "NOJAVA" ); - m_pArgv[5] = strdup( "TRUE" ); + m_pArgn[5] = strdup( "NOJAVA" ); + m_pArgv[5] = strdup( "TRUE" ); } } // #69333# special for pdf @@ -875,14 +875,14 @@ void XPlugin_Impl::setPosSize( sal_Int32 nX_, sal_Int32 nY_, sal_Int32 nWidth_, PluginControl_Impl::setPosSize(nX_, nY_, nWidth_, nHeight_, nFlags); - m_aNPWindow.x = 0; - m_aNPWindow.y = 0; - m_aNPWindow.width = nWidth_; - m_aNPWindow.height = nHeight_; - m_aNPWindow.clipRect.top = 0; - m_aNPWindow.clipRect.left = 0; - m_aNPWindow.clipRect.right = ::sal::static_int_cast< uint16, sal_Int32 >( nWidth_ ); - m_aNPWindow.clipRect.bottom = ::sal::static_int_cast< uint16, sal_Int32 >( nHeight_ ); + m_aNPWindow.x = 0; + m_aNPWindow.y = 0; + m_aNPWindow.width = nWidth_; + m_aNPWindow.height = nHeight_; + m_aNPWindow.clipRect.top = 0; + m_aNPWindow.clipRect.left = 0; + m_aNPWindow.clipRect.right = ::sal::static_int_cast< uint16, sal_Int32 >( nWidth_ ); + m_aNPWindow.clipRect.bottom = ::sal::static_int_cast< uint16, sal_Int32 >( nHeight_ ); if( getPluginComm() ) getPluginComm()->NPP_SetWindow( this ); diff --git a/extensions/source/plugin/inc/plugin/aqua/sysplug.hxx b/extensions/source/plugin/inc/plugin/aqua/sysplug.hxx index 01b8dafa0f2c..acabff40f123 100644 --- a/extensions/source/plugin/inc/plugin/aqua/sysplug.hxx +++ b/extensions/source/plugin/inc/plugin/aqua/sysplug.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -70,7 +70,7 @@ rtl::OUString CFURLtoOSLURL( CFURLRef i_xURL ); class MacPluginComm : public PluginComm, public ::vcl::SolarThreadExecutor - + { enum CallType { eNPP_Destroy, @@ -92,13 +92,13 @@ class MacPluginComm : eNP_Initialize }; - void* m_aArgs[ 8 ]; - CallType m_eCall; - - virtual long doIt(); + void* m_aArgs[ 8 ]; + CallType m_eCall; + + virtual long doIt(); public: MacPluginComm( const rtl::OUString& rMIME, const rtl::OUString& rName, NSView* pView ); - virtual ~MacPluginComm(); + virtual ~MacPluginComm(); // FIXME: // this actually should be from the NP headers @@ -111,39 +111,39 @@ public: } NP_CGContext; public: - virtual NPError NPP_Destroy( NPP instance, NPSavedData** save ); - virtual NPError NPP_DestroyStream( NPP instance, NPStream* stream, NPError reason ); - virtual void * NPP_GetJavaClass(); - virtual NPError NPP_Initialize(); - virtual NPError NPP_New( NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc, + virtual NPError NPP_Destroy( NPP instance, NPSavedData** save ); + virtual NPError NPP_DestroyStream( NPP instance, NPStream* stream, NPError reason ); + virtual void * NPP_GetJavaClass(); + virtual NPError NPP_Initialize(); + virtual NPError NPP_New( NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc, char* argn[], char* argv[], NPSavedData *saved ); - virtual NPError NPP_NewStream( NPP instance, NPMIMEType type, NPStream* stream, + virtual NPError NPP_NewStream( NPP instance, NPMIMEType type, NPStream* stream, NPBool seekable, uint16* stype ); - virtual void NPP_Print( NPP instance, NPPrint* platformPrint ); - virtual NPError NPP_SetWindow( NPP instance, NPWindow* window ); - virtual void NPP_Shutdown(); - virtual void NPP_StreamAsFile( NPP instance, NPStream* stream, const char* fname ); - virtual void NPP_URLNotify( NPP instance, const char* url, + virtual void NPP_Print( NPP instance, NPPrint* platformPrint ); + virtual NPError NPP_SetWindow( NPP instance, NPWindow* window ); + virtual void NPP_Shutdown(); + virtual void NPP_StreamAsFile( NPP instance, NPStream* stream, const char* fname ); + virtual void NPP_URLNotify( NPP instance, const char* url, NPReason reason, void* notifyData ); - virtual int32 NPP_Write( NPP instance, NPStream* stream, int32 offset, + virtual int32 NPP_Write( NPP instance, NPStream* stream, int32 offset, int32 len, void* buffer ); - virtual int32 NPP_WriteReady( NPP instance, NPStream* stream ); - virtual NPError NPP_GetValue( NPP instance, NPPVariable variable, void *ret_value ); - virtual NPError NPP_SetValue( NPP instance, NPNVariable variable, void *ret_value ); + virtual int32 NPP_WriteReady( NPP instance, NPStream* stream ); + virtual NPError NPP_GetValue( NPP instance, NPPVariable variable, void *ret_value ); + virtual NPError NPP_SetValue( NPP instance, NPNVariable variable, void *ret_value ); virtual int16 NPP_HandleEvent( NPP instance, void* event ); virtual NPError NPP_SetWindow( XPlugin_Impl* ); virtual NPError NPP_Destroy( XPlugin_Impl*, NPSavedData** save ); - + void drawView( XPlugin_Impl* ); private: - BOOL retrieveFunction( const char* i_pName, void** i_ppFunc ) const; + BOOL retrieveFunction( const char* i_pName, void** i_ppFunc ) const; DECL_LINK( NullTimerHdl, void* ); - + private: CFBundleRef m_xBundle; - oslModule m_hPlugLib; - NPPluginFuncs m_aNPPfuncs; + oslModule m_hPlugLib; + NPPluginFuncs m_aNPPfuncs; // timer for sending nullEvents AutoTimer* m_pNullTimer; diff --git a/extensions/source/plugin/inc/plugin/impl.hxx b/extensions/source/plugin/inc/plugin/impl.hxx index a11460eb384f..99bedc5da5ce 100644 --- a/extensions/source/plugin/inc/plugin/impl.hxx +++ b/extensions/source/plugin/inc/plugin/impl.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -69,11 +69,11 @@ #include <list> -#ifdef WNT +#ifdef WNT #include "plugin/win/sysplug.hxx" #endif -#ifdef WNT +#ifdef WNT #include <plugin/win/sysplug.hxx> #elif defined(OS2) #include "plugin/os2/sysplug.hxx" @@ -100,9 +100,9 @@ typedef int SysPlugData; using namespace com::sun::star::uno; -#define PROVIDING_NONE 0 -#define PROVIDING_NOW 1 -#define PROVIDING_MODEL_UPDATE 2 +#define PROVIDING_NONE 0 +#define PROVIDING_NOW 1 +#define PROVIDING_MODEL_UPDATE 2 // forwards namespace ucbhelper { class Content; } @@ -118,36 +118,36 @@ class XPlugin_Impl : public com::sun::star::plugin::XPlugin, public com::sun::star::beans::XPropertyChangeListener { private: - ::osl::Mutex m_aMutex; - Reference< com::sun::star::lang::XMultiServiceFactory > m_xSMgr; - Reference< com::sun::star::plugin::XPluginContext > m_rBrowserContext; + ::osl::Mutex m_aMutex; + Reference< com::sun::star::lang::XMultiServiceFactory > m_xSMgr; + Reference< com::sun::star::plugin::XPluginContext > m_rBrowserContext; - PluginComm* m_pPluginComm; - NPP_t m_aInstance; - NPWindow m_aNPWindow; + PluginComm* m_pPluginComm; + NPP_t m_aInstance; + NPWindow m_aNPWindow; SysPlugData m_aSysPlugData; - rtl_TextEncoding m_aEncoding; + rtl_TextEncoding m_aEncoding; - const char** m_pArgv; - const char** m_pArgn; - int m_nArgs; - rtl::OString m_aLastGetUrl; + const char** m_pArgv; + const char** m_pArgn; + int m_nArgs; + rtl::OString m_aLastGetUrl; - Reference< com::sun::star::awt::XControlModel > m_xModel; + Reference< com::sun::star::awt::XControlModel > m_xModel; - ::com::sun::star::plugin::PluginDescription m_aDescription; - sal_Int16 m_aPluginMode; + ::com::sun::star::plugin::PluginDescription m_aDescription; + sal_Int16 m_aPluginMode; - int m_nProvidingState; - int m_nCalledFromPlugin; - PluginDisposer* m_pDisposer; + int m_nProvidingState; + int m_nCalledFromPlugin; + PluginDisposer* m_pDisposer; - ::std::list<PluginInputStream*> m_aInputStreams; - ::std::list<PluginOutputStream*> m_aOutputStreams; - ::std::list<PluginEventListener*> m_aPEventListeners; - ::rtl::OUString m_aURL; + ::std::list<PluginInputStream*> m_aInputStreams; + ::std::list<PluginOutputStream*> m_aOutputStreams; + ::std::list<PluginEventListener*> m_aPEventListeners; + ::rtl::OUString m_aURL; - sal_Bool m_bIsDisposed; + sal_Bool m_bIsDisposed; void prependArg( const char* pName, const char* pValue ); // arguments will be strdup'ed void initArgs( const Sequence< rtl::OUString >& argn, @@ -155,7 +155,7 @@ private: sal_Int16 mode ); void freeArgs(); void handleSpecialArgs(); - + void loadPlugin(); void destroyInstance(); void modelChanged(); @@ -165,7 +165,7 @@ public: virtual ~XPlugin_Impl(); ::osl::Mutex& getMutex() { return m_aMutex; } - + void destroyStreams(); void setLastGetUrl( const rtl::OString& rUrl ) { m_aLastGetUrl = rUrl; } @@ -174,8 +174,8 @@ public: ::std::list<PluginInputStream*>& getInputStreams() { return m_aInputStreams; } ::std::list<PluginOutputStream*>& getOutputStreams() { return m_aOutputStreams; } - PluginComm* getPluginComm() { return m_pPluginComm; } - void setPluginComm( PluginComm* comm ) + PluginComm* getPluginComm() { return m_pPluginComm; } + void setPluginComm( PluginComm* comm ) { if( ! m_pPluginComm ) { @@ -186,32 +186,32 @@ public: Reference< com::sun::star::lang::XMultiServiceFactory > getServiceManager() { return m_xSMgr; } const com::sun::star::plugin::PluginDescription& getDescription() const { return m_aDescription; } rtl_TextEncoding getTextEncoding() { return m_aEncoding; } - NPP getNPPInstance() { return &m_aInstance; } - NPWindow* getNPWindow() { return &m_aNPWindow; } + NPP getNPPInstance() { return &m_aInstance; } + NPWindow* getNPWindow() { return &m_aNPWindow; } SysPlugData& getSysPlugData() { return m_aSysPlugData; } - void enterPluginCallback() { m_nCalledFromPlugin++; } - void leavePluginCallback() { m_nCalledFromPlugin--; } - sal_Bool isDisposable() { return m_nCalledFromPlugin < 1 ? sal_True : sal_False; } - DECL_LINK( secondLevelDispose, XPlugin_Impl* ); + void enterPluginCallback() { m_nCalledFromPlugin++; } + void leavePluginCallback() { m_nCalledFromPlugin--; } + sal_Bool isDisposable() { return m_nCalledFromPlugin < 1 ? sal_True : sal_False; } + DECL_LINK( secondLevelDispose, XPlugin_Impl* ); void addPluginEventListener( PluginEventListener* pListener ) { m_aPEventListeners.push_back( pListener ); } void checkListeners( const char* normalizedURL ); - - void initInstance( + + void initInstance( const com::sun::star::plugin::PluginDescription& rDescription, const Sequence< rtl::OUString >& argn, const Sequence< rtl::OUString >& argv, sal_Int16 mode ); - void initInstance( + void initInstance( const rtl::OUString& rURL, const Sequence< rtl::OUString >& argn, const Sequence< rtl::OUString >& argv, sal_Int16 mode ); - const rtl::OUString& getRefererURL() { return m_aURL; } - ::rtl::OUString getCreationURL(); + const rtl::OUString& getRefererURL() { return m_aURL; } + ::rtl::OUString getCreationURL(); PluginStream* getStreamFromNPStream( NPStream* ); @@ -223,11 +223,11 @@ public: void setPluginContext( const Reference< com::sun::star::plugin::XPluginContext > & ); void secondLevelDispose(); - -// static const Reference< com::sun::star::reflection::XIdlClass > & staticGetIdlClass(); + +// static const Reference< com::sun::star::reflection::XIdlClass > & staticGetIdlClass(); // XInterface - virtual Any SAL_CALL queryInterface( const Type& ) throw( com::sun::star::uno::RuntimeException ); + virtual Any SAL_CALL queryInterface( const Type& ) throw( com::sun::star::uno::RuntimeException ); virtual void SAL_CALL acquire() throw() { OWeakAggObject::acquire(); } virtual void SAL_CALL release() throw() @@ -258,12 +258,12 @@ public: class PluginManager { private: - Reference< com::sun::star::lang::XMultiServiceFactory > m_xSMgr; - ::std::list<PluginComm*> m_aPluginComms; - ::std::list<XPlugin_Impl*> m_aAllPlugins; - ::osl::Mutex m_aPluginMutex; + Reference< com::sun::star::lang::XMultiServiceFactory > m_xSMgr; + ::std::list<PluginComm*> m_aPluginComms; + ::std::list<XPlugin_Impl*> m_aAllPlugins; + ::osl::Mutex m_aPluginMutex; - static PluginManager* pManager; + static PluginManager* pManager; PluginManager(); public: @@ -280,7 +280,7 @@ public: class XPluginManager_Impl : public cppu::WeakAggImplHelper1< com::sun::star::plugin::XPluginManager > { - Reference< com::sun::star::lang::XMultiServiceFactory > m_xSMgr; + Reference< com::sun::star::lang::XMultiServiceFactory > m_xSMgr; public: XPluginManager_Impl( const Reference< com::sun::star::lang::XMultiServiceFactory > & ); virtual ~XPluginManager_Impl(); @@ -302,10 +302,10 @@ public: virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw(); virtual rtl::OUString SAL_CALL getImplementationName() throw(); - + Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ); static Sequence< rtl::OUString > getSupportedServiceNames_Static(void) throw( ); - static rtl::OUString getImplementationName_Static() throw( ) + static rtl::OUString getImplementationName_Static() throw( ) { /** the soplayer uses this name in its source! maybe not after 5.2 */ return rtl::OUString::createFromAscii( "com.sun.star.extensions.PluginManager" ); @@ -318,8 +318,8 @@ enum PluginStreamType { InputStream, OutputStream }; class PluginStream { protected: - XPlugin_Impl* m_pPlugin; - NPStream m_aNPStream; + XPlugin_Impl* m_pPlugin; + NPStream m_aNPStream; public: PluginStream( XPlugin_Impl* pPlugin, const char* url, sal_uInt32 len, sal_uInt32 lastmod ); @@ -339,26 +339,26 @@ class PluginInputStream : > { private: - ::ucbhelper::Content* m_pContent; - sal_Int32 m_nMode; - UINT32 m_nWritePos; + ::ucbhelper::Content* m_pContent; + sal_Int32 m_nMode; + UINT32 m_nWritePos; - Reference< com::sun::star::io::XActiveDataSource > m_xSource; + Reference< com::sun::star::io::XActiveDataSource > m_xSource; // hold a reference on input until closeOutput is called - - Reference< com::sun::star::io::XConnectable > m_xPredecessor; - Reference< com::sun::star::io::XConnectable > m_xSuccessor; + + Reference< com::sun::star::io::XConnectable > m_xPredecessor; + Reference< com::sun::star::io::XConnectable > m_xSuccessor; // needed to hold a reference to self in NP_SEEK mode - Reference< com::sun::star::io::XOutputStream > m_xSelf; - - SvFileStream m_aFileStream; + Reference< com::sun::star::io::XOutputStream > m_xSelf; + + SvFileStream m_aFileStream; public: PluginInputStream( XPlugin_Impl* pPlugin, const char* url, UINT32 len, UINT32 lastmod ); PluginInputStream() : PluginStream( NULL, NULL, 0, 0 ) {} - + virtual ~PluginInputStream(); virtual PluginStreamType getStreamType(); @@ -370,7 +370,7 @@ public: void load(); // clear reference - bool releaseSelf() + bool releaseSelf() { bool bRet = m_xSelf.is(); m_xSelf.clear(); return bRet; } // XOutputStream @@ -393,7 +393,7 @@ public: class PluginOutputStream : public PluginStream { private: - Reference< com::sun::star::io::XOutputStream > m_xStream; + Reference< com::sun::star::io::XOutputStream > m_xStream; public: PluginOutputStream( XPlugin_Impl* pPlugin, const char* url, sal_uInt32 len, sal_uInt32 lastmod ); @@ -408,11 +408,11 @@ class PluginEventListener : public cppu::WeakAggImplHelper1< com::sun::star::lang::XEventListener > { private: - XPlugin_Impl* m_pPlugin; - Reference< com::sun::star::plugin::XPlugin > m_xPlugin; // just to hold the plugin - char* m_pUrl; - char* m_pNormalizedUrl; - void* m_pNotifyData; + XPlugin_Impl* m_pPlugin; + Reference< com::sun::star::plugin::XPlugin > m_xPlugin; // just to hold the plugin + char* m_pUrl; + char* m_pNormalizedUrl; + void* m_pNotifyData; public: PluginEventListener( XPlugin_Impl*, const char* url, @@ -422,8 +422,8 @@ public: const char* getURL() { return m_pUrl; } const char* getNormalizedURL() { return m_pNormalizedUrl; } - void* getNotifyData() { return m_pNotifyData; } - + void* getNotifyData() { return m_pNotifyData; } + // com::sun::star::lang::XEventListener virtual void SAL_CALL disposing( const com::sun::star::lang::EventObject& Source ) throw(); }; diff --git a/extensions/source/plugin/inc/plugin/model.hxx b/extensions/source/plugin/inc/plugin/model.hxx index 8832b8ed1f75..91dfea02e32f 100644 --- a/extensions/source/plugin/inc/plugin/model.hxx +++ b/extensions/source/plugin/inc/plugin/model.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -56,7 +56,7 @@ public: ~BroadcasterHelperHolder() {} ::cppu::OBroadcastHelper& getHelper() { return m_aHelper; } - + }; class PluginModel : public BroadcasterHelperHolder, @@ -111,7 +111,7 @@ class PluginModel : public BroadcasterHelperHolder, // OPropertySetHelper virtual cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); virtual sal_Bool SAL_CALL convertFastPropertyValue( Any & rConvertedValue, - Any & rOldValue, + Any & rOldValue, sal_Int32 nHandle, const Any& rValue ) throw(); virtual void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, diff --git a/extensions/source/plugin/inc/plugin/multiplx.hxx b/extensions/source/plugin/inc/plugin/multiplx.hxx index 27c29785721f..4544304b785e 100644 --- a/extensions/source/plugin/inc/plugin/multiplx.hxx +++ b/extensions/source/plugin/inc/plugin/multiplx.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -63,7 +63,7 @@ struct MRCListenerMultiplexerHelper_Mutex ::osl::Mutex aMutex; }; -class MRCListenerMultiplexerHelper : +class MRCListenerMultiplexerHelper : public MRCListenerMultiplexerHelper_Mutex, public ::cppu::WeakAggImplHelper7< @@ -79,17 +79,17 @@ public: /** * Create a Multiplexer of XWindowEvents. * - * @param rControl The control. All listeners think that this is the original - * broadcaster. - * @param rPeer The peer from which the original events are dispatched. Null is - * allowed. + * @param rControl The control. All listeners think that this is the original + * broadcaster. + * @param rPeer The peer from which the original events are dispatched. Null is + * allowed. */ MRCListenerMultiplexerHelper( const Reference< ::com::sun::star::awt::XWindow > & rControl, const Reference< ::com::sun::star::awt::XWindow > & rPeer ); /** * Remove all listeners from the previous set peer and add the needed listeners to rPeer. - * @param rPeer The peer from which the original events are dispatched. Null is - * allowed. + * @param rPeer The peer from which the original events are dispatched. Null is + * allowed. */ void setPeer( const Reference< ::com::sun::star::awt::XWindow > & rPeer ); @@ -108,61 +108,61 @@ public: void unadvise(const Type& type, const Reference< XInterface > & listener); // ::com::sun::star::lang::XEventListener - void SAL_CALL disposing(const ::com::sun::star::lang::EventObject& Source) throw(); + void SAL_CALL disposing(const ::com::sun::star::lang::EventObject& Source) throw(); // ::com::sun::star::awt::XFocusListener - void SAL_CALL focusGained(const ::com::sun::star::awt::FocusEvent& e) throw(); - void SAL_CALL focusLost(const ::com::sun::star::awt::FocusEvent& e) throw(); + void SAL_CALL focusGained(const ::com::sun::star::awt::FocusEvent& e) throw(); + void SAL_CALL focusLost(const ::com::sun::star::awt::FocusEvent& e) throw(); // ::com::sun::star::awt::XWindowListener - void SAL_CALL windowResized(const ::com::sun::star::awt::WindowEvent& e) throw(); - void SAL_CALL windowMoved(const ::com::sun::star::awt::WindowEvent& e) throw(); - void SAL_CALL windowShown(const ::com::sun::star::lang::EventObject& e) throw(); - void SAL_CALL windowHidden(const ::com::sun::star::lang::EventObject& e) throw(); + void SAL_CALL windowResized(const ::com::sun::star::awt::WindowEvent& e) throw(); + void SAL_CALL windowMoved(const ::com::sun::star::awt::WindowEvent& e) throw(); + void SAL_CALL windowShown(const ::com::sun::star::lang::EventObject& e) throw(); + void SAL_CALL windowHidden(const ::com::sun::star::lang::EventObject& e) throw(); // ::com::sun::star::awt::XKeyListener - void SAL_CALL keyPressed( const ::com::sun::star::awt::KeyEvent& e ) throw(); - void SAL_CALL keyReleased( const ::com::sun::star::awt::KeyEvent& e ) throw(); + void SAL_CALL keyPressed( const ::com::sun::star::awt::KeyEvent& e ) throw(); + void SAL_CALL keyReleased( const ::com::sun::star::awt::KeyEvent& e ) throw(); // ::com::sun::star::awt::XMouseListener - void SAL_CALL mousePressed(const ::com::sun::star::awt::MouseEvent& e) throw(); - void SAL_CALL mouseReleased(const ::com::sun::star::awt::MouseEvent& e) throw(); - void SAL_CALL mouseEntered(const ::com::sun::star::awt::MouseEvent& e) throw(); - void SAL_CALL mouseExited(const ::com::sun::star::awt::MouseEvent& e) throw(); + void SAL_CALL mousePressed(const ::com::sun::star::awt::MouseEvent& e) throw(); + void SAL_CALL mouseReleased(const ::com::sun::star::awt::MouseEvent& e) throw(); + void SAL_CALL mouseEntered(const ::com::sun::star::awt::MouseEvent& e) throw(); + void SAL_CALL mouseExited(const ::com::sun::star::awt::MouseEvent& e) throw(); // ::com::sun::star::awt::XMouseMotionListener - void SAL_CALL mouseDragged(const ::com::sun::star::awt::MouseEvent& e) throw(); - void SAL_CALL mouseMoved(const ::com::sun::star::awt::MouseEvent& e) throw(); + void SAL_CALL mouseDragged(const ::com::sun::star::awt::MouseEvent& e) throw(); + void SAL_CALL mouseMoved(const ::com::sun::star::awt::MouseEvent& e) throw(); // ::com::sun::star::awt::XPaintListener - void SAL_CALL windowPaint(const ::com::sun::star::awt::PaintEvent& e) throw(); + void SAL_CALL windowPaint(const ::com::sun::star::awt::PaintEvent& e) throw(); // ::com::sun::star::awt::XTopWindowListener - void SAL_CALL windowOpened( const ::com::sun::star::lang::EventObject& e ) throw(); - void SAL_CALL windowClosing( const ::com::sun::star::lang::EventObject& e ) throw(); - void SAL_CALL windowClosed( const ::com::sun::star::lang::EventObject& e ) throw(); - void SAL_CALL windowMinimized( const ::com::sun::star::lang::EventObject& e ) throw(); - void SAL_CALL windowNormalized( const ::com::sun::star::lang::EventObject& e ) throw(); - void SAL_CALL windowActivated( const ::com::sun::star::lang::EventObject& e ) throw(); - void SAL_CALL windowDeactivated( const ::com::sun::star::lang::EventObject& e ) throw(); + void SAL_CALL windowOpened( const ::com::sun::star::lang::EventObject& e ) throw(); + void SAL_CALL windowClosing( const ::com::sun::star::lang::EventObject& e ) throw(); + void SAL_CALL windowClosed( const ::com::sun::star::lang::EventObject& e ) throw(); + void SAL_CALL windowMinimized( const ::com::sun::star::lang::EventObject& e ) throw(); + void SAL_CALL windowNormalized( const ::com::sun::star::lang::EventObject& e ) throw(); + void SAL_CALL windowActivated( const ::com::sun::star::lang::EventObject& e ) throw(); + void SAL_CALL windowDeactivated( const ::com::sun::star::lang::EventObject& e ) throw(); protected: /** * Remove the listener with the uik rUik from the peer rPeer. - * @param rPeer the peer from which the listener is removed. - * @param rUik the listener uik, which specify the type of the listener. + * @param rPeer the peer from which the listener is removed. + * @param rUik the listener uik, which specify the type of the listener. */ - void adviseToPeer( const Reference< ::com::sun::star::awt::XWindow > & rPeer, const Type & type ); + void adviseToPeer( const Reference< ::com::sun::star::awt::XWindow > & rPeer, const Type & type ); /** * Add the listener with the uik rUik to the peer rPeer. - * @param rPeer the peer to which the listener is added. - * @param rUik the listener uik, which specify the type of the listener. + * @param rPeer the peer to which the listener is added. + * @param rUik the listener uik, which specify the type of the listener. */ - void unadviseFromPeer( const Reference< ::com::sun::star::awt::XWindow > & rPeer, const Type & type ); + void unadviseFromPeer( const Reference< ::com::sun::star::awt::XWindow > & rPeer, const Type & type ); private: /** The source of the events. Normally this is the peer object.*/ - Reference< ::com::sun::star::awt::XWindow > xPeer; - WeakReference< ::com::sun::star::awt::XControl > xControl; - ::cppu::OMultiTypeInterfaceContainerHelper aListenerHolder; + Reference< ::com::sun::star::awt::XWindow > xPeer; + WeakReference< ::com::sun::star::awt::XControl > xControl; + ::cppu::OMultiTypeInterfaceContainerHelper aListenerHolder; MRCListenerMultiplexerHelper( const MRCListenerMultiplexerHelper & ); MRCListenerMultiplexerHelper & operator = ( const MRCListenerMultiplexerHelper & ); }; -#endif // _MRC_MULTIPLX_HXX +#endif // _MRC_MULTIPLX_HXX diff --git a/extensions/source/plugin/inc/plugin/plcom.hxx b/extensions/source/plugin/inc/plugin/plcom.hxx index b23fc6c6ada9..8775a8450e16 100644 --- a/extensions/source/plugin/inc/plugin/plcom.hxx +++ b/extensions/source/plugin/inc/plugin/plcom.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -36,9 +36,9 @@ class XPlugin_Impl; class PluginComm { protected: - int m_nRefCount; - ::rtl::OString m_aLibName; - std::list< String > m_aFilesToDelete; + int m_nRefCount; + ::rtl::OString m_aLibName; + std::list< String > m_aFilesToDelete; public: PluginComm( const ::rtl::OString& rLibName, bool bReusable = true ); virtual ~PluginComm(); @@ -78,7 +78,7 @@ public: virtual NPError NPP_GetValue( NPP instance, NPPVariable variable, void* value ) = 0; virtual NPError NPP_SetValue( NPP instance, NPNVariable variable, void *value) = 0; - + virtual NPError NPP_SetWindow( XPlugin_Impl* ); virtual NPError NPP_Destroy( XPlugin_Impl*, NPSavedData** save ); }; diff --git a/extensions/source/plugin/inc/plugin/plctrl.hxx b/extensions/source/plugin/inc/plugin/plctrl.hxx index 06ee50cb8e0a..c98199213512 100644 --- a/extensions/source/plugin/inc/plugin/plctrl.hxx +++ b/extensions/source/plugin/inc/plugin/plctrl.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -80,33 +80,33 @@ public: { _xContext = xContext; } virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL getContext() throw( ::com::sun::star::uno::RuntimeException ) { return _xContext; } - + virtual sal_Bool SAL_CALL setModel( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > & Model ) throw( ::com::sun::star::uno::RuntimeException ) = 0; -// { DBG_ERROR( "### setModel() illegal on plugincontrol!" ); return sal_False; } +// { DBG_ERROR( "### setModel() illegal on plugincontrol!" ); return sal_False; } virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > SAL_CALL getModel() throw( ::com::sun::star::uno::RuntimeException ) = 0; virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XView > SAL_CALL getView() throw( ::com::sun::star::uno::RuntimeException ) { return (::com::sun::star::awt::XView*)this; } - + virtual sal_Bool SAL_CALL isTransparent() throw( ::com::sun::star::uno::RuntimeException ) { return sal_False; } - + virtual void SAL_CALL setDesignMode( sal_Bool bOn ) throw( ::com::sun::star::uno::RuntimeException ); virtual sal_Bool SAL_CALL isDesignMode() throw( ::com::sun::star::uno::RuntimeException ) { return _bInDesignMode; } - + virtual void SAL_CALL createPeer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit > & xToolkit, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > & Parent) throw( ::com::sun::star::uno::RuntimeException ); virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > SAL_CALL getPeer() throw( ::com::sun::star::uno::RuntimeException ) { return _xPeer; } - + // ::com::sun::star::awt::XWindow virtual void SAL_CALL setVisible( sal_Bool bVisible ) throw( ::com::sun::star::uno::RuntimeException ); virtual void SAL_CALL setEnable( sal_Bool bEnable ) throw( ::com::sun::star::uno::RuntimeException ); virtual void SAL_CALL setFocus(void) throw( ::com::sun::star::uno::RuntimeException ); - + virtual void SAL_CALL setPosSize( sal_Int32 nX_, sal_Int32 nY_, sal_Int32 nWidth_, sal_Int32 nHeight_, sal_Int16 nFlags ) throw( ::com::sun::star::uno::RuntimeException ); virtual ::com::sun::star::awt::Rectangle SAL_CALL getPosSize(void) throw( ::com::sun::star::uno::RuntimeException ); - + virtual void SAL_CALL addWindowListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowListener > & l ) throw( ::com::sun::star::uno::RuntimeException ); virtual void SAL_CALL removeWindowListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowListener > & l ) throw( ::com::sun::star::uno::RuntimeException ); virtual void SAL_CALL addFocusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFocusListener > & l ) throw( ::com::sun::star::uno::RuntimeException ); @@ -125,11 +125,11 @@ public: // ::com::sun::star::awt::XFocusListener virtual void SAL_CALL focusGained( const ::com::sun::star::awt::FocusEvent & rEvt ) throw( ::com::sun::star::uno::RuntimeException ); virtual void SAL_CALL focusLost( const ::com::sun::star::awt::FocusEvent & rEvt ) throw( ::com::sun::star::uno::RuntimeException ); - + // ::com::sun::star::lang::XComponent virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & l ) throw( ::com::sun::star::uno::RuntimeException ); virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & l ) throw( ::com::sun::star::uno::RuntimeException ); - + virtual void SAL_CALL dispose() throw( ::com::sun::star::uno::RuntimeException ); // ::com::sun::star::awt::XView @@ -137,44 +137,44 @@ public: { return sal_False; } virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XGraphics > SAL_CALL getGraphics(void) throw( ::com::sun::star::uno::RuntimeException ) { return ::com::sun::star::uno::Reference< ::com::sun::star::awt::XGraphics > (); } - - virtual ::com::sun::star::awt::Size SAL_CALL getSize(void) throw( ::com::sun::star::uno::RuntimeException ) + + virtual ::com::sun::star::awt::Size SAL_CALL getSize(void) throw( ::com::sun::star::uno::RuntimeException ) { return ::com::sun::star::awt::Size(_nWidth, _nHeight); } - + virtual void SAL_CALL draw( sal_Int32 x, sal_Int32 y ) throw( ::com::sun::star::uno::RuntimeException ); virtual void SAL_CALL setZoom( float ZoomX, float ZoomY ) throw( ::com::sun::star::uno::RuntimeException ); public: PluginControl_Impl(); - virtual ~PluginControl_Impl(); - + virtual ~PluginControl_Impl(); + MRCListenerMultiplexerHelper* getMultiplexer(); protected: - void releasePeer(); - + void releasePeer(); + protected: - ::std::list< Reference< ::com::sun::star::lang::XEventListener > > _aDisposeListeners; - MRCListenerMultiplexerHelper* _pMultiplexer; - - Reference< XInterface > _xContext; - - sal_Int32 _nX; - sal_Int32 _nY; - sal_Int32 _nWidth; - sal_Int32 _nHeight; - sal_Int16 _nFlags; - - sal_Bool _bVisible; - sal_Bool _bInDesignMode; - sal_Bool _bEnable; - - SystemChildWindow* _pSysChild; - ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > _xPeer; - ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > _xPeerWindow; - - ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > _xParentWindow; - ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > _xParentPeer; + ::std::list< Reference< ::com::sun::star::lang::XEventListener > > _aDisposeListeners; + MRCListenerMultiplexerHelper* _pMultiplexer; + + Reference< XInterface > _xContext; + + sal_Int32 _nX; + sal_Int32 _nY; + sal_Int32 _nWidth; + sal_Int32 _nHeight; + sal_Int16 _nFlags; + + sal_Bool _bVisible; + sal_Bool _bInDesignMode; + sal_Bool _bEnable; + + SystemChildWindow* _pSysChild; + ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > _xPeer; + ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > _xPeerWindow; + + ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > _xParentWindow; + ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > _xParentPeer; }; #endif diff --git a/extensions/source/plugin/inc/plugin/unx/mediator.hxx b/extensions/source/plugin/inc/plugin/unx/mediator.hxx index acf73c498a6c..1c847bb88e08 100644 --- a/extensions/source/plugin/inc/plugin/unx/mediator.hxx +++ b/extensions/source/plugin/inc/plugin/unx/mediator.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -44,10 +44,10 @@ struct MediatorMessage { - ULONG m_nID; - ULONG m_nBytes; - char* m_pBytes; - char* m_pRun; + ULONG m_nID; + ULONG m_nBytes; + char* m_pBytes; + char* m_pRun; MediatorMessage() : m_nID( 0 ), m_nBytes( 0 ), m_pBytes( NULL ), m_pRun( NULL ) {} @@ -73,13 +73,13 @@ struct MediatorMessage memcpy( m_pBytes, pBytes, (size_t)m_nBytes ); } - ULONG ExtractULONG(); - char* GetString(); - UINT32 GetUINT32(); - void* GetBytes( ULONG& ); - void* GetBytes() { ULONG nBytes; return GetBytes( nBytes ); } + ULONG ExtractULONG(); + char* GetString(); + UINT32 GetUINT32(); + void* GetBytes( ULONG& ); + void* GetBytes() { ULONG nBytes; return GetBytes( nBytes ); } - void Rewind() { m_pRun = NULL; } + void Rewind() { m_pRun = NULL; } }; class MediatorListener; @@ -88,22 +88,22 @@ class Mediator { friend class MediatorListener; protected: - int m_nSocket; + int m_nSocket; - std::vector<MediatorMessage*> m_aMessageQueue; + std::vector<MediatorMessage*> m_aMessageQueue; osl::Mutex m_aQueueMutex; osl::Mutex m_aSendMutex; // only one thread can send a message at any given time osl::Condition m_aNewMessageCdtn; - MediatorListener* m_pListener; + MediatorListener* m_pListener; // thread to fill the queue - ULONG m_nCurrentID; + ULONG m_nCurrentID; // will be constantly increased with each message sent - bool m_bValid; + bool m_bValid; - Link m_aConnectionLostHdl; - Link m_aNewMessageHdl; + Link m_aConnectionLostHdl; + Link m_aNewMessageHdl; public: Mediator( int nSocket ); ~Mediator(); @@ -155,7 +155,7 @@ class MediatorListener : public osl::Thread { friend class Mediator; private: - Mediator* m_pMediator; + Mediator* m_pMediator; ::osl::Mutex m_aMutex; MediatorListener( Mediator* ); diff --git a/extensions/source/plugin/inc/plugin/unx/plugcon.hxx b/extensions/source/plugin/inc/plugin/unx/plugcon.hxx index 7db023161249..491fdf4475a5 100644 --- a/extensions/source/plugin/inc/plugin/unx/plugcon.hxx +++ b/extensions/source/plugin/inc/plugin/unx/plugcon.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -39,15 +39,15 @@ # define USE_MOTIF #endif -#define Window XLIB_Window -#define Font XLIB_Font -#define KeyCode XLIB_KeyCode -#define Time XLIB_Time -#define Cursor XLIB_Cursor -#define Region XLIB_Region -#define String XLIB_String -#define Boolean XLIB_Boolean -#define XPointer XLIB_XPointer +#define Window XLIB_Window +#define Font XLIB_Font +#define KeyCode XLIB_KeyCode +#define Time XLIB_Time +#define Cursor XLIB_Cursor +#define Region XLIB_Region +#define String XLIB_String +#define Boolean XLIB_Boolean +#define XPointer XLIB_XPointer #include <X11/Xlib.h> extern "C" { #include <X11/Intrinsic.h> @@ -137,17 +137,17 @@ extern "C" { class ConnectorInstance { public: - NPP instance; - NPWindow window; - NPSetWindowCallbackStruct ws_info; - char* pMimeType; - void* pShell; - void* pWidget; - void* pForm; - + NPP instance; + NPWindow window; + NPSetWindowCallbackStruct ws_info; + char* pMimeType; + void* pShell; + void* pWidget; + void* pForm; + GtkWidget* pGtkWindow; GtkWidget* pGtkWidget; - + bool bShouldUseXEmbed; int nArg; @@ -170,29 +170,29 @@ protected: osl::Mutex m_aUserEventMutex; static std::vector<PluginConnector*> allConnectors; - + DECL_LINK( NewMessageHdl, Mediator* ); DECL_LINK( WorkOnNewMessageHdl, Mediator* ); - + std::vector<NPStream*> m_aNPWrapStreams; std::vector<ConnectorInstance*> m_aInstances; - - ULONG FillBuffer( char*&, const char*, ULONG, va_list ); + + ULONG FillBuffer( char*&, const char*, ULONG, va_list ); public: PluginConnector( int nSocket ); ~PluginConnector(); virtual MediatorMessage* WaitForAnswer( ULONG nMessageID ); - MediatorMessage* Transact( const char*, ULONG, ... ); - MediatorMessage* Transact( UINT32, ... ); - void Respond( ULONG nID, char*, ULONG, ... ); - ULONG Send( UINT32, ... ); + MediatorMessage* Transact( const char*, ULONG, ... ); + MediatorMessage* Transact( UINT32, ... ); + void Respond( ULONG nID, char*, ULONG, ... ); + ULONG Send( UINT32, ... ); static const UINT32 UnknownStreamID = 0xffffffff; static const UINT32 UnknownNPPID = 0xffffffff; - UINT32 GetStreamID( NPStream* pStream ); - UINT32 GetNPPID( NPP ); + UINT32 GetStreamID( NPStream* pStream ); + UINT32 GetNPPID( NPP ); std::vector<NPStream*>& getStreamList() { return m_aNPWrapStreams; } @@ -209,7 +209,7 @@ public: LINK( this, PluginConnector, WorkOnNewMessageHdl ). Call( (Mediator*)this ); } - + ConnectorInstance* getInstance( NPP ); ConnectorInstance* getInstanceById( UINT32 ); }; diff --git a/extensions/source/plugin/inc/plugin/unx/sysplug.hxx b/extensions/source/plugin/inc/plugin/unx/sysplug.hxx index df44c149e30a..69d64f7ac514 100644 --- a/extensions/source/plugin/inc/plugin/unx/sysplug.hxx +++ b/extensions/source/plugin/inc/plugin/unx/sysplug.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -37,9 +37,9 @@ class UnxPluginComm : public PluginComm, public PluginConnector { private: - static int nConnCounter; + static int nConnCounter; - pid_t m_nCommPID; + pid_t m_nCommPID; public: UnxPluginComm( const String& mimetype, const String& library, diff --git a/extensions/source/plugin/inc/plugin/win/sysplug.hxx b/extensions/source/plugin/inc/plugin/win/sysplug.hxx index 45e09d98d950..4161312b4988 100644 --- a/extensions/source/plugin/inc/plugin/win/sysplug.hxx +++ b/extensions/source/plugin/inc/plugin/win/sysplug.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -58,7 +58,7 @@ class PluginComm_Impl : public PluginComm, public ::vcl::SolarThreadExecutor - + { enum CallType { eNPP_Destroy, @@ -79,45 +79,45 @@ class PluginComm_Impl : eNP_Initialize }; - void* m_aArgs[ 8 ]; - CallType m_eCall; - - virtual long doIt(); + void* m_aArgs[ 8 ]; + CallType m_eCall; + + virtual long doIt(); public: PluginComm_Impl( const rtl::OUString& rMIME, const rtl::OUString& rName, HWND hWnd ); - virtual ~PluginComm_Impl(); - + virtual ~PluginComm_Impl(); + public: using PluginComm::NPP_Destroy; - virtual NPError NPP_Destroy( NPP instance, NPSavedData** save ); - virtual NPError NPP_DestroyStream( NPP instance, NPStream* stream, NPError reason ); - virtual void * NPP_GetJavaClass(); - virtual NPError NPP_Initialize(); - virtual NPError NPP_New( NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc, + virtual NPError NPP_Destroy( NPP instance, NPSavedData** save ); + virtual NPError NPP_DestroyStream( NPP instance, NPStream* stream, NPError reason ); + virtual void * NPP_GetJavaClass(); + virtual NPError NPP_Initialize(); + virtual NPError NPP_New( NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc, char* argn[], char* argv[], NPSavedData *saved ); - virtual NPError NPP_NewStream( NPP instance, NPMIMEType type, NPStream* stream, + virtual NPError NPP_NewStream( NPP instance, NPMIMEType type, NPStream* stream, NPBool seekable, uint16* stype ); - virtual void NPP_Print( NPP instance, NPPrint* platformPrint ); - + virtual void NPP_Print( NPP instance, NPPrint* platformPrint ); + using PluginComm::NPP_SetWindow; - virtual NPError NPP_SetWindow( NPP instance, NPWindow* window ); - virtual void NPP_Shutdown(); - virtual void NPP_StreamAsFile( NPP instance, NPStream* stream, const char* fname ); - virtual void NPP_URLNotify( NPP instance, const char* url, + virtual NPError NPP_SetWindow( NPP instance, NPWindow* window ); + virtual void NPP_Shutdown(); + virtual void NPP_StreamAsFile( NPP instance, NPStream* stream, const char* fname ); + virtual void NPP_URLNotify( NPP instance, const char* url, NPReason reason, void* notifyData ); - virtual int32 NPP_Write( NPP instance, NPStream* stream, int32 offset, + virtual int32 NPP_Write( NPP instance, NPStream* stream, int32 offset, int32 len, void* buffer ); - virtual int32 NPP_WriteReady( NPP instance, NPStream* stream ); - virtual NPError NPP_GetValue( NPP instance, NPPVariable variable, void *ret_alue ); - virtual NPError NPP_SetValue( NPP instance, NPNVariable variable, void *ret_alue ); - + virtual int32 NPP_WriteReady( NPP instance, NPStream* stream ); + virtual NPError NPP_GetValue( NPP instance, NPPVariable variable, void *ret_alue ); + virtual NPError NPP_SetValue( NPP instance, NPNVariable variable, void *ret_alue ); + private: - BOOL retrieveFunction( TCHAR* pName, void** ppFunc ) const; - + BOOL retrieveFunction( TCHAR* pName, void** ppFunc ) const; + private: - HINSTANCE _plDLL; + HINSTANCE _plDLL; - NPPluginFuncs _NPPfuncs; + NPPluginFuncs _NPPfuncs; }; diff --git a/extensions/source/plugin/unx/mediator.cxx b/extensions/source/plugin/unx/mediator.cxx index 4cbab9e0c9a2..afd42fa308bf 100644 --- a/extensions/source/plugin/unx/mediator.cxx +++ b/extensions/source/plugin/unx/mediator.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -198,7 +198,7 @@ void MediatorListener::run() { ULONG nHeader[ 3 ]; int nBytes; - + if( m_pMediator && ( nBytes = read( m_pMediator->m_nSocket, nHeader, sizeof( nHeader ) ) ) == sizeof( nHeader ) && nHeader[2] == MEDIATOR_MAGIC) { if( nHeader[ 0 ] == 0 && nHeader[ 1 ] == 0 ) diff --git a/extensions/source/plugin/unx/npnapi.cxx b/extensions/source/plugin/unx/npnapi.cxx index 6e862f67b2c0..f1f58fcc08bf 100644 --- a/extensions/source/plugin/unx/npnapi.cxx +++ b/extensions/source/plugin/unx/npnapi.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -61,12 +61,12 @@ static void* l_NPN_MemAlloc( uint32 nBytes ) void* pMem = new char[nBytes]; return pMem; } - + static void l_NPN_MemFree( void* pMem ) { delete [] (char*)pMem; } - + static uint32 l_NPN_MemFlush( uint32 /*nSize*/ ) { return 0; @@ -77,7 +77,7 @@ static NPError l_NPN_DestroyStream( NPP instance, NPStream* stream, NPError reas UINT32 nInstance = pConnector->GetNPPID( instance ); if( nInstance == PluginConnector::UnknownNPPID ) return NPERR_GENERIC_ERROR; - + UINT32 nFileID = pConnector->GetStreamID( stream ); MediatorMessage* pMes= pConnector-> @@ -128,14 +128,14 @@ static NPError l_NPN_GetURL( NPP instance, const char* url, const char* window ) UINT32 nInstance = pConnector->GetNPPID( instance ); if( nInstance == PluginConnector::UnknownNPPID ) return NPERR_GENERIC_ERROR; - + MediatorMessage* pMes= pConnector-> Transact( eNPN_GetURL, &nInstance, sizeof( nInstance ), POST_STRING(url), POST_STRING(window), - NULL ); + NULL ); medDebug( !pMes, "geturl: message unaswered\n" ); if( ! pMes ) return NPERR_GENERIC_ERROR; @@ -200,7 +200,7 @@ static NPError l_NPN_NewStream( NPP instance, NPMIMEType type, const char* targe pStream->end = pMes->GetUINT32(); pStream->lastmodified = pMes->GetUINT32(); pStream->ndata = pStream->pdata = pStream->notifyData = NULL; - + pConnector->getStreamList().push_back( pStream ); *stream = pStream; } @@ -268,7 +268,7 @@ static NPError l_NPN_RequestRead( NPStream* stream, NPByteRange* rangeList ) nRanges++; pRange = pRange->next; } - + UINT32* pArray = new UINT32[ 2 * nRanges ]; pRange = rangeList; UINT32 n = 0; @@ -305,7 +305,7 @@ static void l_NPN_Status( NPP instance, const char* message ) pConnector->Send( eNPN_Status, &nInstance, sizeof( nInstance ), POST_STRING( message ), - NULL ); + NULL ); } static const char* l_NPN_UserAgent( NPP instance ) @@ -382,7 +382,7 @@ static int32 l_NPN_Write( NPP instance, NPStream* stream, int32 len, void* buffe return 0; INT32 nRet = pMes->GetUINT32(); - return nRet; + return nRet; } static void l_NPN_ReloadPlugins( NPBool /*reloadPages*/ ) @@ -519,9 +519,9 @@ static NPPluginFuncs aPluginFuncs = oslModule pPluginLib = NULL; -char*(*pNPP_GetMIMEDescription)() = NULL; -NPError (*pNP_Initialize)(NPNetscapeFuncs*,NPPluginFuncs*) = NULL; -NPError (*pNP_Shutdown)() = NULL; +char*(*pNPP_GetMIMEDescription)() = NULL; +NPError (*pNP_Initialize)(NPNetscapeFuncs*,NPPluginFuncs*) = NULL; +NPError (*pNP_Shutdown)() = NULL; std::vector< PluginConnector* > PluginConnector::allConnectors; @@ -547,11 +547,11 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ ) { case eNPP_DestroyStream: { - UINT32 nInstance = pMessage->GetUINT32(); - NPP instance = m_aInstances[ nInstance ]->instance; - UINT32 nFileID = pMessage->GetUINT32(); - NPStream* pStream = m_aNPWrapStreams[ nFileID ]; - NPError aReason = GetNPError( pMessage ); + UINT32 nInstance = pMessage->GetUINT32(); + NPP instance = m_aInstances[ nInstance ]->instance; + UINT32 nFileID = pMessage->GetUINT32(); + NPStream* pStream = m_aNPWrapStreams[ nFileID ]; + NPError aReason = GetNPError( pMessage ); m_aNPWrapStreams.erase( m_aNPWrapStreams.begin() + nFileID ); aReason = aPluginFuncs.destroystream( instance, pStream, aReason ); @@ -565,7 +565,7 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ ) break; case eNPP_Destroy: { - UINT32 nInstance = pMessage->GetUINT32(); + UINT32 nInstance = pMessage->GetUINT32(); ConnectorInstance* pInst= m_aInstances[ nInstance ]; // some plugin rely on old netscapes behaviour @@ -573,9 +573,9 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ ) // the instance, so mimic that behaviour here if( pInst->pShell ) XtDestroyWidget( (Widget)pInst->pShell ); - + pInst->pWidget = pInst->pShell = NULL; - + // the other side will call eNPP_DestroyPhase2 after this NPError aReason = NPERR_NO_ERROR; Respond( pMessage->m_nID, (char*)&aReason, sizeof( aReason ), NULL ); @@ -584,9 +584,9 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ ) case eNPP_DestroyPhase2: { // now really destroy the instance - UINT32 nInstance = pMessage->GetUINT32(); + UINT32 nInstance = pMessage->GetUINT32(); ConnectorInstance* pInst= m_aInstances[ nInstance ]; - NPP instance = pInst->instance; + NPP instance = pInst->instance; NPSavedData* pSave = NULL; NPError aRet = aPluginFuncs.destroy( instance, &pSave ); @@ -619,15 +619,15 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ ) break; case eNPP_NewStream: { - UINT32 nInstance = pMessage->GetUINT32(); - NPP instance = m_aInstances[ nInstance ]->instance; - char* pType = pMessage->GetString(); - NPStream* pStream = new NPStream; - pStream->url = pMessage->GetString(); - pStream->end = pMessage->GetUINT32(); - pStream->lastmodified = pMessage->GetUINT32(); + UINT32 nInstance = pMessage->GetUINT32(); + NPP instance = m_aInstances[ nInstance ]->instance; + char* pType = pMessage->GetString(); + NPStream* pStream = new NPStream; + pStream->url = pMessage->GetString(); + pStream->end = pMessage->GetUINT32(); + pStream->lastmodified = pMessage->GetUINT32(); pStream->pdata = pStream->ndata = pStream->notifyData = NULL; - NPBool* pSeekable = (NPBool*)pMessage->GetBytes(); + NPBool* pSeekable = (NPBool*)pMessage->GetBytes(); m_aNPWrapStreams.push_back( pStream ); uint16 nStype = NP_ASFILE; NPError aRet = aPluginFuncs.newstream( instance, pType, pStream, @@ -646,10 +646,10 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ ) break; case eNPP_New: { - char* pType = pMessage->GetString(); - uint16* pMode = (uint16*)pMessage->GetBytes(); - int16* pArgc = (int16*)pMessage->GetBytes(); - NPP instance = new NPP_t; + char* pType = pMessage->GetString(); + uint16* pMode = (uint16*)pMessage->GetBytes(); + int16* pArgc = (int16*)pMessage->GetBytes(); + NPP instance = new NPP_t; instance->pdata = instance->ndata = NULL; ULONG nArgnBytes, nArgvBytes; char* pArgn = (char*)pMessage->GetBytes( nArgnBytes ); @@ -692,7 +692,7 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ ) medDebug( 1, "should use xembed = %s\n", pInst->bShouldUseXEmbed ? "true" : "false" ); } #endif - + Respond( pMessage->m_nID, (char*)&aRet, sizeof( aRet ), NULL ); @@ -703,10 +703,10 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ ) break; case eNPP_SetWindow: { - UINT32 nInstance = pMessage->GetUINT32(); + UINT32 nInstance = pMessage->GetUINT32(); ConnectorInstance* pInst= m_aInstances[ nInstance ]; - NPWindow* pWindow = (NPWindow*)pMessage->GetBytes(); - + NPWindow* pWindow = (NPWindow*)pMessage->GetBytes(); + if( pWindow->width < 1 ) pWindow->width = 1; if( pWindow->height < 1 ) @@ -718,7 +718,7 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ ) if( ! pInst->pGtkWidget ) { medDebug( 1, "creating gtk plug and socket\n" ); - + pInst->pGtkWindow = gtk_plug_new((GdkNativeWindow)reinterpret_cast<sal_uIntPtr>(pWindow->window)); gtk_widget_show( pInst->pGtkWindow ); pInst->pGtkWidget = gtk_socket_new(); @@ -733,56 +733,56 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ ) XSync( pAppDisplay, False ); } - + // update widget size; alas out parent is not yet really XEMBED conformant gtk_widget_set_size_request( pInst->pGtkWidget, pWindow->width, pWindow->height ); gtk_window_resize( GTK_WINDOW(pInst->pGtkWindow), pWindow->width, pWindow->height ); - + GdkScreen* pGdkScreen = gtk_widget_get_screen( pInst->pGtkWidget ); Screen* pScreen = ScreenOfDisplay( pAppDisplay, gdk_screen_get_number( pGdkScreen ) ); - pInst->window.x = 0; - pInst->window.y = 0; - pInst->window.width = pWindow->width; - pInst->window.height = pWindow->height; - pInst->window.clipRect.left = 0; - pInst->window.clipRect.top = 0; - pInst->window.clipRect.right = pWindow->width; - pInst->window.clipRect.bottom = pWindow->height; - pInst->window.ws_info = &pInst->ws_info; - pInst->window.type = NPWindowTypeWindow; - pInst->ws_info.type = NP_SETWINDOW; - pInst->ws_info.display = pAppDisplay; - pInst->ws_info.visual = DefaultVisualOfScreen( pScreen ); - pInst->ws_info.colormap = DefaultColormapOfScreen( pScreen ); - pInst->ws_info.depth = DefaultDepthOfScreen( pScreen ); + pInst->window.x = 0; + pInst->window.y = 0; + pInst->window.width = pWindow->width; + pInst->window.height = pWindow->height; + pInst->window.clipRect.left = 0; + pInst->window.clipRect.top = 0; + pInst->window.clipRect.right = pWindow->width; + pInst->window.clipRect.bottom = pWindow->height; + pInst->window.ws_info = &pInst->ws_info; + pInst->window.type = NPWindowTypeWindow; + pInst->ws_info.type = NP_SETWINDOW; + pInst->ws_info.display = pAppDisplay; + pInst->ws_info.visual = DefaultVisualOfScreen( pScreen ); + pInst->ws_info.colormap = DefaultColormapOfScreen( pScreen ); + pInst->ws_info.depth = DefaultDepthOfScreen( pScreen ); } else #endif { if( ! pInst->pWidget ) { - pInst->pWidget = CreateNewShell( &(pInst->pShell), (XLIB_Window)pWindow->window ); + pInst->pWidget = CreateNewShell( &(pInst->pShell), (XLIB_Window)pWindow->window ); } - + // fill in NPWindow and NPCallbackStruct - pInst->window.window = (void*)XtWindow( (Widget)pInst->pWidget ); - pInst->window.x = 0; - pInst->window.y = 0; - pInst->window.width = pWindow->width; - pInst->window.height = pWindow->height; - pInst->window.clipRect.left = 0; - pInst->window.clipRect.top = 0; - pInst->window.clipRect.right = pWindow->width; - pInst->window.clipRect.bottom = pWindow->height; - pInst->window.ws_info = &pInst->ws_info; - pInst->window.type = NPWindowTypeWindow; - pInst->ws_info.type = NP_SETWINDOW; - pInst->ws_info.display = XtDisplay( (Widget)pInst->pWidget ); - pInst->ws_info.visual = DefaultVisualOfScreen( XtScreen( (Widget)pInst->pWidget ) ); - pInst->ws_info.colormap = DefaultColormapOfScreen( XtScreen( (Widget)pInst->pWidget ) ); - pInst->ws_info.depth = DefaultDepthOfScreen( XtScreen( (Widget)pInst->pWidget ) ); - + pInst->window.window = (void*)XtWindow( (Widget)pInst->pWidget ); + pInst->window.x = 0; + pInst->window.y = 0; + pInst->window.width = pWindow->width; + pInst->window.height = pWindow->height; + pInst->window.clipRect.left = 0; + pInst->window.clipRect.top = 0; + pInst->window.clipRect.right = pWindow->width; + pInst->window.clipRect.bottom = pWindow->height; + pInst->window.ws_info = &pInst->ws_info; + pInst->window.type = NPWindowTypeWindow; + pInst->ws_info.type = NP_SETWINDOW; + pInst->ws_info.display = XtDisplay( (Widget)pInst->pWidget ); + pInst->ws_info.visual = DefaultVisualOfScreen( XtScreen( (Widget)pInst->pWidget ) ); + pInst->ws_info.colormap = DefaultColormapOfScreen( XtScreen( (Widget)pInst->pWidget ) ); + pInst->ws_info.depth = DefaultDepthOfScreen( XtScreen( (Widget)pInst->pWidget ) ); + XtResizeWidget( (Widget)pInst->pShell, pInst->window.width, pInst->window.height, @@ -803,11 +803,11 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ ) break; case eNPP_StreamAsFile: { - UINT32 nInstance = pMessage->GetUINT32(); - NPP instance = m_aInstances[ nInstance ]->instance; - UINT32 nFileID = pMessage->GetUINT32(); - NPStream* pStream = m_aNPWrapStreams[ nFileID ]; - char* fname = pMessage->GetString(); + UINT32 nInstance = pMessage->GetUINT32(); + NPP instance = m_aInstances[ nInstance ]->instance; + UINT32 nFileID = pMessage->GetUINT32(); + NPStream* pStream = m_aNPWrapStreams[ nFileID ]; + char* fname = pMessage->GetString(); medDebug( 1, "pluginapp: NPP_StreamAsFile %s\n", fname ); aPluginFuncs.asfile( instance, pStream, fname ); delete [] fname; @@ -815,11 +815,11 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ ) break; case eNPP_URLNotify: { - UINT32 nInstance = pMessage->GetUINT32(); - NPP instance = m_aInstances[ nInstance ]->instance; - char* url = pMessage->GetString(); - NPReason* pReason = (NPReason*)pMessage->GetBytes(); - void** notifyData = (void**)pMessage->GetBytes(); + UINT32 nInstance = pMessage->GetUINT32(); + NPP instance = m_aInstances[ nInstance ]->instance; + char* url = pMessage->GetString(); + NPReason* pReason = (NPReason*)pMessage->GetBytes(); + void** notifyData = (void**)pMessage->GetBytes(); aPluginFuncs.urlnotify( instance, url, *pReason, *notifyData ); delete [] url; delete [] pReason; @@ -828,15 +828,15 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ ) break; case eNPP_WriteReady: { - UINT32 nInstance = pMessage->GetUINT32(); - NPP instance = m_aInstances[ nInstance ]->instance; - UINT32 nFileID = pMessage->GetUINT32(); - NPStream* pStream = m_aNPWrapStreams[ nFileID ]; + UINT32 nInstance = pMessage->GetUINT32(); + NPP instance = m_aInstances[ nInstance ]->instance; + UINT32 nFileID = pMessage->GetUINT32(); + NPStream* pStream = m_aNPWrapStreams[ nFileID ]; int32 nRet = aPluginFuncs.writeready( instance, pStream ); - + medDebug( 1, "pluginapp: NPP_WriteReady( %p, %p ) (stream id = %d) returns %d\n", instance, pStream, nFileID, nRet ); - + Respond( pMessage->m_nID, (char*)&nRet, sizeof( nRet ), NULL ); @@ -844,15 +844,15 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ ) break; case eNPP_Write: { - UINT32 nInstance = pMessage->GetUINT32(); - NPP instance = m_aInstances[ nInstance ]->instance; - UINT32 nFileID = pMessage->GetUINT32(); - NPStream* pStream = m_aNPWrapStreams[ nFileID ]; - int32 offset = pMessage->GetUINT32(); + UINT32 nInstance = pMessage->GetUINT32(); + NPP instance = m_aInstances[ nInstance ]->instance; + UINT32 nFileID = pMessage->GetUINT32(); + NPStream* pStream = m_aNPWrapStreams[ nFileID ]; + int32 offset = pMessage->GetUINT32(); ULONG len; - char* buffer = (char*)pMessage->GetBytes( len ); + char* buffer = (char*)pMessage->GetBytes( len ); int32 nRet = aPluginFuncs.write( instance, pStream, offset, len, buffer ); - + medDebug( 1,"pluginapp: NPP_Write( %p, %p, %d, %d, %p ) returns %d\n" "stream = { pdata = %p, ndata = %p, url = %s, end = %d, lastmodified = %d, notifyData = %p }\n", instance, pStream, offset, len, buffer, nRet, diff --git a/extensions/source/plugin/unx/nppapi.cxx b/extensions/source/plugin/unx/nppapi.cxx index bf0faabf15dc..c6dd6a59895d 100644 --- a/extensions/source/plugin/unx/nppapi.cxx +++ b/extensions/source/plugin/unx/nppapi.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -109,10 +109,10 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ ) { case eNPN_GetURL: { - UINT32 nInstance = pMessage->GetUINT32(); - NPP instance = m_aInstances[ nInstance ]->instance; - char* pUrl = pMessage->GetString(); - char* pWindow = pMessage->GetString(); + UINT32 nInstance = pMessage->GetUINT32(); + NPP instance = m_aInstances[ nInstance ]->instance; + char* pUrl = pMessage->GetString(); + char* pWindow = pMessage->GetString(); NPError aRet = NPN_GetURL( instance, pUrl, pWindow ); Respond( pMessage->m_nID, (char*)(&aRet), sizeof( NPError ), NULL ); @@ -122,11 +122,11 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ ) break; case eNPN_GetURLNotify: { - UINT32 nInstance = pMessage->GetUINT32(); - NPP instance = m_aInstances[ nInstance ]->instance; - char* pUrl = pMessage->GetString(); - char* pWindow = pMessage->GetString(); - void** pNotifyData = (void**)pMessage->GetBytes(); + UINT32 nInstance = pMessage->GetUINT32(); + NPP instance = m_aInstances[ nInstance ]->instance; + char* pUrl = pMessage->GetString(); + char* pWindow = pMessage->GetString(); + void** pNotifyData = (void**)pMessage->GetBytes(); NPError aRet = NPN_GetURLNotify( instance, pUrl, pWindow, *pNotifyData ); Respond( pMessage->m_nID, @@ -138,11 +138,11 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ ) break; case eNPN_DestroyStream: { - UINT32 nInstance = pMessage->GetUINT32(); - NPP instance = m_aInstances[ nInstance ]->instance; - UINT32 nFileID = pMessage->GetUINT32(); - char* pUrl = pMessage->GetString(); - NPError* pReason = (NPError*)pMessage->GetBytes(); + UINT32 nInstance = pMessage->GetUINT32(); + NPP instance = m_aInstances[ nInstance ]->instance; + UINT32 nFileID = pMessage->GetUINT32(); + char* pUrl = pMessage->GetString(); + NPError* pReason = (NPError*)pMessage->GetBytes(); NPError aRet = NPERR_FILE_NOT_FOUND; if( nFileID < static_cast<UINT32>(m_aNPWrapStreams.size()) ) { @@ -169,10 +169,10 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ ) break; case eNPN_NewStream: { - UINT32 nInstance = pMessage->GetUINT32(); - NPP instance = m_aInstances[ nInstance ]->instance; - NPMIMEType pType = pMessage->GetString(); - char* pTarget = pMessage->GetString(); + UINT32 nInstance = pMessage->GetUINT32(); + NPP instance = m_aInstances[ nInstance ]->instance; + NPMIMEType pType = pMessage->GetString(); + char* pTarget = pMessage->GetString(); NPStream* pStream = NULL; @@ -200,21 +200,21 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ ) &pStream->lastmodified, sizeof(UINT32), NULL ); } - + delete [] pTarget; delete [] pType; } break; case eNPN_PostURLNotify: { - UINT32 nInstance = pMessage->GetUINT32(); - NPP instance = m_aInstances[ nInstance ]->instance; - char* pUrl = pMessage->GetString(); - char* pTarget = pMessage->GetString(); - UINT32 nLen = pMessage->GetUINT32(); - char* pBuf = (char*)pMessage->GetBytes(); - NPBool* pFile = (NPBool*)pMessage->GetBytes(); - void** pNData = (void**)pMessage->GetBytes(); + UINT32 nInstance = pMessage->GetUINT32(); + NPP instance = m_aInstances[ nInstance ]->instance; + char* pUrl = pMessage->GetString(); + char* pTarget = pMessage->GetString(); + UINT32 nLen = pMessage->GetUINT32(); + char* pBuf = (char*)pMessage->GetBytes(); + NPBool* pFile = (NPBool*)pMessage->GetBytes(); + void** pNData = (void**)pMessage->GetBytes(); NPError aRet = NPN_PostURLNotify( instance, pUrl, pTarget, nLen, pBuf, *pFile, *pNData ); Respond( pMessage->m_nID, (char*)&aRet, sizeof( aRet ), NULL ); @@ -227,13 +227,13 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ ) break; case eNPN_PostURL: { - UINT32 nInstance = pMessage->GetUINT32(); - NPP instance = m_aInstances[ nInstance ]->instance; - char* pUrl = pMessage->GetString(); - char* pWindow = pMessage->GetString(); - UINT32 nLen = pMessage->GetUINT32(); - char* pBuf = (char*)pMessage->GetBytes(); - NPBool* pFile = (NPBool*)pMessage->GetBytes(); + UINT32 nInstance = pMessage->GetUINT32(); + NPP instance = m_aInstances[ nInstance ]->instance; + char* pUrl = pMessage->GetString(); + char* pWindow = pMessage->GetString(); + UINT32 nLen = pMessage->GetUINT32(); + char* pBuf = (char*)pMessage->GetBytes(); + NPBool* pFile = (NPBool*)pMessage->GetBytes(); NPError aRet = NPN_PostURL( instance, pUrl, pWindow, nLen, pBuf, *pFile ); Respond( pMessage->m_nID, (char*)&aRet, sizeof( aRet ), NULL ); @@ -245,13 +245,13 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ ) break; case eNPN_RequestRead: { - UINT32 nFileID = pMessage->GetUINT32(); - NPStream* pStream = m_aNPWrapStreams[ nFileID ]; - UINT32 nRanges = pMessage->GetUINT32(); - UINT32* pArray = (UINT32*)pMessage->GetBytes(); + UINT32 nFileID = pMessage->GetUINT32(); + NPStream* pStream = m_aNPWrapStreams[ nFileID ]; + UINT32 nRanges = pMessage->GetUINT32(); + UINT32* pArray = (UINT32*)pMessage->GetBytes(); // build ranges table NPByteRange* pFirst = new NPByteRange; - NPByteRange* pRun = pFirst; + NPByteRange* pRun = pFirst; for( UINT32 n = 0; n < nRanges; n++ ) { pRun->offset = pArray[ 2*n ]; @@ -272,9 +272,9 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ ) break; case eNPN_Status: { - UINT32 nInstance = pMessage->GetUINT32(); - NPP instance = m_aInstances[ nInstance ]->instance; - char* pString = pMessage->GetString(); + UINT32 nInstance = pMessage->GetUINT32(); + NPP instance = m_aInstances[ nInstance ]->instance; + char* pString = pMessage->GetString(); NPN_Status( instance, pString ); delete [] pString; } @@ -293,12 +293,12 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ ) break; case eNPN_Write: { - UINT32 nInstance = pMessage->GetUINT32(); - NPP instance = m_aInstances[ nInstance ]->instance; - UINT32 nFileID = pMessage->GetUINT32(); - NPStream* pStream = m_aNPWrapStreams[ nFileID ]; - INT32 nLen = pMessage->GetUINT32(); - void* pBuffer = pMessage->GetBytes(); + UINT32 nInstance = pMessage->GetUINT32(); + NPP instance = m_aInstances[ nInstance ]->instance; + UINT32 nFileID = pMessage->GetUINT32(); + NPStream* pStream = m_aNPWrapStreams[ nFileID ]; + INT32 nLen = pMessage->GetUINT32(); + void* pBuffer = pMessage->GetBytes(); INT32 nRet = NPN_Write( instance, pStream, nLen, pBuffer ); Respond( pMessage->m_nID, (char*)&nRet, sizeof( nRet ), @@ -309,8 +309,8 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ ) break; case eNPN_UserAgent: { - UINT32 nInstance = pMessage->GetUINT32(); - NPP instance = m_aInstances[ nInstance ]->instance; + UINT32 nInstance = pMessage->GetUINT32(); + NPP instance = m_aInstances[ nInstance ]->instance; const char* pAnswer = NPN_UserAgent( instance ); Respond( pMessage->m_nID, (char*)pAnswer, strlen( pAnswer ), @@ -320,7 +320,7 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ ) default: medDebug( 1, "caught unknown NPN request %d\n", nCommand ); } - + delete pMessage; } return 0; @@ -342,7 +342,7 @@ NPError UnxPluginComm::NPP_Destroy( NPP instance, NPSavedData** save ) { NPError aRet = NPERR_GENERIC_ERROR; GET_INSTANCE_RET( aRet ); - MediatorMessage* pMes = + MediatorMessage* pMes = Transact( eNPP_Destroy, POST_INSTANCE(), NULL ); @@ -379,8 +379,8 @@ NPError UnxPluginComm::NPP_DestroyStream( NPP instance, NPStream* stream, NPErro UINT32 nFileID = GetStreamID( stream ); if( nFileID == PluginConnector::UnknownStreamID ) return NPERR_GENERIC_ERROR; - - MediatorMessage* pMes = + + MediatorMessage* pMes = Transact( eNPP_DestroyStream, POST_INSTANCE(), &nFileID, sizeof( nFileID ), @@ -402,7 +402,7 @@ void* UnxPluginComm::NPP_GetJavaClass() NPError UnxPluginComm::NPP_Initialize() { - MediatorMessage* pMes = + MediatorMessage* pMes = Transact( eNPP_Initialize, NULL ); if( ! pMes ) @@ -444,7 +444,7 @@ NPError UnxPluginComm::NPP_New( NPMIMEType pluginType, NPP instance, uint16 mode MediatorMessage* pMes; if( saved ) - pMes = + pMes = Transact( eNPP_New, pluginType, strlen( pluginType ), &mode, sizeof( mode ), @@ -454,7 +454,7 @@ NPError UnxPluginComm::NPP_New( NPMIMEType pluginType, NPP instance, uint16 mode saved->buf, static_cast<size_t>(saved->len), NULL ); else - pMes = + pMes = Transact( eNPP_New, pluginType, strlen( pluginType ), &mode, sizeof( mode ), @@ -481,7 +481,7 @@ NPError UnxPluginComm::NPP_NewStream( NPP instance, NPMIMEType type, NPStream* s GET_INSTANCE_RET( aRet ); m_aNPWrapStreams.push_back( stream ); - MediatorMessage* pMes = + MediatorMessage* pMes = Transact( eNPP_NewStream, POST_INSTANCE(), type, strlen( type ), @@ -505,14 +505,14 @@ NPError UnxPluginComm::NPP_NewStream( NPP instance, NPMIMEType type, NPStream* s void UnxPluginComm::NPP_Print( NPP /*instance*/, NPPrint* /*platformPrint*/ ) { -} +} NPError UnxPluginComm::NPP_SetWindow( NPP instance, NPWindow* window ) { NPError aRet = NPERR_GENERIC_ERROR; GET_INSTANCE_RET( aRet ); - MediatorMessage* pMes = + MediatorMessage* pMes = Transact( eNPP_SetWindow, POST_INSTANCE(), window, sizeof( NPWindow ), @@ -547,7 +547,7 @@ void UnxPluginComm::NPP_StreamAsFile( NPP instance, NPStream* stream, const char void UnxPluginComm::NPP_URLNotify( NPP instance, const char* url, NPReason reason, void* notifyData ) { GET_INSTANCE(); - + Send( eNPP_URLNotify, POST_INSTANCE(), url, strlen( url ), @@ -563,7 +563,7 @@ int32 UnxPluginComm::NPP_Write( NPP instance, NPStream* stream, int32 offset, in if( nFileID == PluginConnector::UnknownStreamID ) return -1; - MediatorMessage* pMes = + MediatorMessage* pMes = Transact( eNPP_Write, POST_INSTANCE(), &nFileID, sizeof( nFileID ), @@ -575,7 +575,7 @@ int32 UnxPluginComm::NPP_Write( NPP instance, NPStream* stream, int32 offset, in int32 aRet = pMes->GetUINT32(); delete pMes; - + return aRet; } @@ -586,7 +586,7 @@ int32 UnxPluginComm::NPP_WriteReady( NPP instance, NPStream* stream ) if( nFileID == PluginConnector::UnknownStreamID ) return -1; - MediatorMessage* pMes = + MediatorMessage* pMes = Transact( eNPP_WriteReady, POST_INSTANCE(), &nFileID, sizeof( nFileID ), @@ -597,14 +597,14 @@ int32 UnxPluginComm::NPP_WriteReady( NPP instance, NPStream* stream ) int32 aRet = pMes->GetUINT32(); delete pMes; - + return aRet; } char* UnxPluginComm::NPP_GetMIMEDescription() { static char* pDesc = NULL; - MediatorMessage* pMes = + MediatorMessage* pMes = Transact( eNPP_GetMIMEDescription, NULL ); if( ! pMes ) diff --git a/extensions/source/plugin/unx/npwrap.cxx b/extensions/source/plugin/unx/npwrap.cxx index 7124972d8578..04f4bbbacf5a 100644 --- a/extensions/source/plugin/unx/npwrap.cxx +++ b/extensions/source/plugin/unx/npwrap.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -47,9 +47,9 @@ PluginConnector* pConnector = NULL; -int nAppArguments = 0; -char** pAppArguments = NULL; -Display* pAppDisplay = NULL; +int nAppArguments = 0; +char** pAppArguments = NULL; +Display* pAppDisplay = NULL; Display* pXtAppDisplay = NULL; extern oslModule pPluginLib; @@ -65,7 +65,7 @@ static bool bPluginAppQuit = false; static long GlobalConnectionLostHdl( void* /*pInst*/, void* /*pArg*/ ) { medDebug( 1, "pluginapp exiting due to connection lost\n" ); - + write( wakeup_fd[1], "xxxx", 4 ); return 0; } @@ -76,14 +76,14 @@ extern "C" { return 0; } - + #ifndef ENABLE_GTK static void ThreadEventHandler( XtPointer /*client_data*/, int* /*source*/, XtInputId* id ) { char buf[256]; // clear pipe int len, nLast = -1; - + while( (len = read( wakeup_fd[0], buf, sizeof( buf ) ) ) > 0 ) nLast = len-1; if( ! bPluginAppQuit ) @@ -114,7 +114,7 @@ IMPL_LINK( PluginConnector, NewMessageHdl, Mediator*, /*pMediator*/ ) medDebug( 1, "new message handler\n" ); write( wakeup_fd[1], "cccc", 4 ); return 0; - + } Widget createSubWidget( char* /*pPluginText*/, Widget shell, XLIB_Window aParentWindow ) @@ -145,7 +145,7 @@ Widget createSubWidget( char* /*pPluginText*/, Widget shell, XLIB_Window aParent 0, 0 ); XtMapWidget( shell ); XtMapWidget( newWidget ); - XRaiseWindow( pXtAppDisplay, XtWindow( shell ) ); + XRaiseWindow( pXtAppDisplay, XtWindow( shell ) ); XSync( pXtAppDisplay, False ); return newWidget; @@ -192,7 +192,7 @@ static oslModule LoadModule( const char* pPath ) static void CheckPlugin( const char* pPath ) { oslModule pLib = LoadModule( pPath ); - + char*(*pNP_GetMIMEDescription)() = (char*(*)()) osl_getAsciiFunctionSymbol( pLib, "NP_GetMIMEDescription" ); if( pNP_GetMIMEDescription ) @@ -279,7 +279,7 @@ static gboolean pollXtTimerCallback(gpointer) static gboolean prepareWakeupEvent( GSource*, gint* ) { struct pollfd aPoll = { wakeup_fd[0], POLLIN, 0 }; - poll( &aPoll, 1, 0 ); + poll( &aPoll, 1, 0 ); return (aPoll.revents & POLLIN ) != 0; } @@ -294,7 +294,7 @@ static gboolean dispatchWakeupEvent( GSource*, GSourceFunc, gpointer ) char buf[256]; // clear pipe int len, nLast = -1; - + while( (len = read( wakeup_fd[0], buf, sizeof( buf ) ) ) > 0 ) nLast = len-1; if( ( nLast == -1 || buf[nLast] != 'x' ) && pConnector ) @@ -307,7 +307,7 @@ static gboolean dispatchWakeupEvent( GSource*, GSourceFunc, gpointer ) delete pConnector; pConnector = NULL; } - + return TRUE; } @@ -359,7 +359,7 @@ int main( int argc, char **argv) } // initialize 'wakeup' pipe. int flags; - + // set close-on-exec descriptor flag. if ((flags = fcntl (wakeup_fd[0], F_GETFD)) != -1) { @@ -371,7 +371,7 @@ int main( int argc, char **argv) flags |= FD_CLOEXEC; fcntl (wakeup_fd[1], F_SETFD, flags); } - + // set non-blocking I/O flag. if ((flags = fcntl (wakeup_fd[0], F_GETFL)) != -1) { @@ -390,7 +390,7 @@ int main( int argc, char **argv) exit(255); } int nSocket = atol( argv[1] ); - + #ifdef ENABLE_GTK g_thread_init(NULL); gtk_init(&argc, &argv); @@ -416,7 +416,7 @@ int main( int argc, char **argv) medDebug( 1, "could not get Xt GSource" ); return 1; } - + g_source_set_priority( pXTSource, GDK_PRIORITY_EVENTS ); g_source_set_can_recurse( pXTSource, TRUE ); g_source_attach( pXTSource, NULL ); @@ -424,7 +424,7 @@ int main( int argc, char **argv) aXtPollDesc.events = G_IO_IN; aXtPollDesc.revents = 0; g_source_add_poll( pXTSource, &aXtPollDesc ); - + gint xt_polling_timer_id = g_timeout_add( 25, pollXtTimerCallback, NULL); // Initialize wakeup events listener GSource *pWakeupSource = g_source_new( &aWakeupEventFuncs, sizeof(GSource) ); @@ -491,7 +491,7 @@ int main( int argc, char **argv) #ifdef ENABLE_GTK g_source_remove(xt_polling_timer_id); #endif - + pNP_Shutdown(); medDebug( 1, "NP_Shutdown done\n" ); osl_unloadModule( pPluginLib ); diff --git a/extensions/source/plugin/unx/plugcon.cxx b/extensions/source/plugin/unx/plugcon.cxx index 607ae05d9877..52be98fdae87 100644 --- a/extensions/source/plugin/unx/plugcon.cxx +++ b/extensions/source/plugin/unx/plugcon.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -82,7 +82,7 @@ struct PtrStruct { char* pData; ULONG nBytes; - + PtrStruct( char* i_pData, ULONG i_nBytes ) : pData( i_pData ), nBytes( i_nBytes ) {} }; @@ -94,7 +94,7 @@ ULONG PluginConnector::FillBuffer( char*& rpBuffer, { std::vector< PtrStruct > aList; aList.reserve( 5 ); - + ULONG nDataSize = nFunctionLen + sizeof( ULONG ); char* pNext; @@ -164,7 +164,7 @@ void PluginConnector::Respond( ULONG nID, { va_list ap; char* pBuffer; - + va_start( ap, nFunctionLen ); ULONG nSize = FillBuffer( pBuffer, pFunction, nFunctionLen, ap ); va_end( ap ); @@ -257,34 +257,34 @@ const char* GetCommandName( CommandAtoms eCommand ) { switch( eCommand ) { - case eNPN_GetURL: return "NPN_GetURL"; - case eNPN_GetURLNotify: return "NPN_GetURLNotify"; - case eNPN_DestroyStream: return "NPN_DestroyStream"; - case eNPN_NewStream: return "NPN_NewStream"; - case eNPN_PostURLNotify: return "NPN_PostURLNotify"; - case eNPN_PostURL: return "NPN_PostURL"; - case eNPN_RequestRead: return "NPN_RequestRead"; - case eNPN_Status: return "NPN_Status"; - case eNPN_Version: return "NPN_Version"; - case eNPN_Write: return "NPN_Write"; - case eNPN_UserAgent: return "NPN_UserAgent"; - - case eNPP_DestroyStream: return "NPP_DestroyStream"; - case eNPP_Destroy: return "NPP_Destroy"; - case eNPP_DestroyPhase2: return "NPP_DestroyPhase2"; - case eNPP_NewStream: return "NPP_NewStream"; - case eNPP_New: return "NPP_New"; - case eNPP_SetWindow: return "NPP_SetWindow"; - case eNPP_StreamAsFile: return "NPP_StreamAsFile"; - case eNPP_URLNotify: return "NPP_URLNotify"; - case eNPP_WriteReady: return "NPP_WriteReady"; - case eNPP_Write: return "NPP_Write"; - case eNPP_GetMIMEDescription: return "NPP_GetMIMEDescription"; - case eNPP_Initialize: return "NPP_Initialize"; - case eNPP_Shutdown: return "NPP_Shutdown"; - - case eMaxCommand: return "eMaxCommand"; - default: return "unknown command"; + case eNPN_GetURL: return "NPN_GetURL"; + case eNPN_GetURLNotify: return "NPN_GetURLNotify"; + case eNPN_DestroyStream: return "NPN_DestroyStream"; + case eNPN_NewStream: return "NPN_NewStream"; + case eNPN_PostURLNotify: return "NPN_PostURLNotify"; + case eNPN_PostURL: return "NPN_PostURL"; + case eNPN_RequestRead: return "NPN_RequestRead"; + case eNPN_Status: return "NPN_Status"; + case eNPN_Version: return "NPN_Version"; + case eNPN_Write: return "NPN_Write"; + case eNPN_UserAgent: return "NPN_UserAgent"; + + case eNPP_DestroyStream: return "NPP_DestroyStream"; + case eNPP_Destroy: return "NPP_Destroy"; + case eNPP_DestroyPhase2: return "NPP_DestroyPhase2"; + case eNPP_NewStream: return "NPP_NewStream"; + case eNPP_New: return "NPP_New"; + case eNPP_SetWindow: return "NPP_SetWindow"; + case eNPP_StreamAsFile: return "NPP_StreamAsFile"; + case eNPP_URLNotify: return "NPP_URLNotify"; + case eNPP_WriteReady: return "NPP_WriteReady"; + case eNPP_Write: return "NPP_Write"; + case eNPP_GetMIMEDescription: return "NPP_GetMIMEDescription"; + case eNPP_Initialize: return "NPP_Initialize"; + case eNPP_Shutdown: return "NPP_Shutdown"; + + case eMaxCommand: return "eMaxCommand"; + default: return "unknown command"; } return NULL; } diff --git a/extensions/source/plugin/unx/sysplug.cxx b/extensions/source/plugin/unx/sysplug.cxx index dc7be6799ae3..f5221aa027c8 100644 --- a/extensions/source/plugin/unx/sysplug.cxx +++ b/extensions/source/plugin/unx/sysplug.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/plugin/unx/unxmgr.cxx b/extensions/source/plugin/unx/unxmgr.cxx index 0ecd12b65ff7..b042815f8343 100644 --- a/extensions/source/plugin/unx/unxmgr.cxx +++ b/extensions/source/plugin/unx/unxmgr.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -121,18 +121,18 @@ static bool CheckPlugin( const ByteString& rPath, list< PluginDescription* >& rD if( aMIME.getLength() > 0 ) { OString aLine = aMIME.makeStringAndClear(); - + sal_Int32 nIndex = 0; while( nIndex != -1 ) { OString aType = aLine.getToken( 0, ';', nIndex ); sal_Int32 nTypeIndex = 0; - OString aMimetype = aType.getToken( 0, ':', nTypeIndex ); - OString aExtLine = aType.getToken( 0, ':', nTypeIndex ); + OString aMimetype = aType.getToken( 0, ':', nTypeIndex ); + OString aExtLine = aType.getToken( 0, ':', nTypeIndex ); if( nTypeIndex < 0 ) // ensure at least three tokens continue; - OString aDesc = aType.getToken( 0, ':', nTypeIndex ); + OString aDesc = aType.getToken( 0, ':', nTypeIndex ); // create extension list string sal_Int32 nExtIndex = 0; @@ -149,11 +149,11 @@ static bool CheckPlugin( const ByteString& rPath, list< PluginDescription* >& rD PluginDescription* pNew = new PluginDescription; // set plugin name (path to library) - pNew->PluginName = OStringToOUString( rPath, aEncoding ); + pNew->PluginName = OStringToOUString( rPath, aEncoding ); // set mimetype - pNew->Mimetype = OStringToOUString( aMimetype, aEncoding ); + pNew->Mimetype = OStringToOUString( aMimetype, aEncoding ); // set extension line - pNew->Extension = OStringToOUString( aExtension.makeStringAndClear(), aEncoding ); + pNew->Extension = OStringToOUString( aExtension.makeStringAndClear(), aEncoding ); // set description pNew->Description= OStringToOUString( aDesc, aEncoding ); rDescriptions.push_back( pNew ); @@ -209,7 +209,7 @@ static void CheckPluginRegistryFiles( const rtl::OString& rPath, list< PluginDes } fclose( fp ); } - + // check subdirectories DIR* pDIR = opendir( rPath.getStr() ); struct dirent* pDirEnt = NULL; @@ -224,7 +224,7 @@ static void CheckPluginRegistryFiles( const rtl::OString& rPath, list< PluginDes aBuf.append( rPath ); aBuf.append( '/' ); aBuf.append( pBaseName ); - + if( ! stat( aBuf.getStr(), &aStat ) ) { if( S_ISDIR( aStat.st_mode ) ) diff --git a/extensions/source/plugin/win/sysplug.cxx b/extensions/source/plugin/win/sysplug.cxx index c992341dc947..607aa4b87f88 100644 --- a/extensions/source/plugin/win/sysplug.cxx +++ b/extensions/source/plugin/win/sysplug.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -102,7 +102,7 @@ PluginComm_Impl::~PluginComm_Impl() { if (_plDLL) { -// NPP_Shutdown(); +// NPP_Shutdown(); NPError (WINAPI * pShutdown)(); if (retrieveFunction( _T("NP_Shutdown"), (void**)&pShutdown )) diff --git a/extensions/source/plugin/win/winmgr.cxx b/extensions/source/plugin/win/winmgr.cxx index db90cfbf7a45..ff9b713c6085 100644 --- a/extensions/source/plugin/win/winmgr.cxx +++ b/extensions/source/plugin/win/winmgr.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -411,7 +411,7 @@ Sequence< PluginDescription > XPluginManager_Impl::impl_getPluginDescriptions(vo OString aExtToken2( aExt.getToken( 0, '|', nIndex2 ) ); if( aMIMEToken.getLength() == 0 || aExtToken2.getLength() == 0 ) continue; - + rDescr.Mimetype = OUString( aMIMEToken.getStr(), aMIMEToken.getLength(), RTL_TEXTENCODING_MS_1252 ); if (! rDescr.Mimetype.getLength()) diff --git a/extensions/source/preload/modulepreload.cxx b/extensions/source/preload/modulepreload.cxx index 6fb06c7f68ac..ead9753193f4 100644 --- a/extensions/source/preload/modulepreload.cxx +++ b/extensions/source/preload/modulepreload.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/preload/oemwiz.cxx b/extensions/source/preload/oemwiz.cxx index 9264205d7ae0..f02d20a0a824 100644 --- a/extensions/source/preload/oemwiz.cxx +++ b/extensions/source/preload/oemwiz.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/preload/oemwiz.hxx b/extensions/source/preload/oemwiz.hxx index e7b0c36db46b..5874994b5192 100644 --- a/extensions/source/preload/oemwiz.hxx +++ b/extensions/source/preload/oemwiz.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/preload/preload.hrc b/extensions/source/preload/preload.hrc index 19cb8a15ac10..a7d9725bd110 100644 --- a/extensions/source/preload/preload.hrc +++ b/extensions/source/preload/preload.hrc @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -46,12 +46,12 @@ #define ML_LICENSE 11 #define ST_LICENSE_AGREEMENT 12 #define ST_INSERT_USER_DATA 13 -#define IMG_ARROW 14 -#define FT_INFO2_1 15 -#define FT_INFO3_1 16 +#define IMG_ARROW 14 +#define FT_INFO2_1 15 +#define FT_INFO3_1 16 #define FT_INFO3 17 #define PB_PAGEDOWN 18 -#define CB_ACCEPT 19 +#define CB_ACCEPT 19 #define LICENCE_ACCEPT 20 #define LICENCE_NOTACCEPT 21 diff --git a/extensions/source/preload/preload.src b/extensions/source/preload/preload.src index 59805b768adf..301e489cddbf 100644 --- a/extensions/source/preload/preload.src +++ b/extensions/source/preload/preload.src @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -33,11 +33,11 @@ ModalDialog RID_DLG_OEMWIZARD { Text = "%PRODUCTNAME %PRODUCTVERSION"; - OutputSize = TRUE ; - SVLook = TRUE ; - Moveable = TRUE ; - Closeable = TRUE ; - Hide = TRUE; + OutputSize = TRUE ; + SVLook = TRUE ; + Moveable = TRUE ; + Closeable = TRUE ; + Hide = TRUE; PushButton PB_PREV { Size = MAP_APPFONT ( 50 , 14 ) ; @@ -125,7 +125,7 @@ TabPage RID_TP_WELCOME #define LICENSE_COL_4 (LICENSE_DIALOG_WIDTH - LICENSE_RIGHT_BORDER - PD_WIDTH) #define LICENSE_WIDTH (LICENSE_DIALOG_WIDTH - LICENSE_RIGHT_BORDER - LICENSE_ROW_1) -#define COL3_WIDTH (LICENSE_COL_4 - LICENSE_COL_3) +#define COL3_WIDTH (LICENSE_COL_4 - LICENSE_COL_3) TabPage RID_TP_LICENSE diff --git a/extensions/source/preload/preloadservices.cxx b/extensions/source/preload/preloadservices.cxx index 3ce121c98a4f..f23d65310479 100644 --- a/extensions/source/preload/preloadservices.cxx +++ b/extensions/source/preload/preloadservices.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/preload/preloadservices.hxx b/extensions/source/preload/preloadservices.hxx index f4ef0c2500dc..ba51e0547bab 100644 --- a/extensions/source/preload/preloadservices.hxx +++ b/extensions/source/preload/preloadservices.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -44,7 +44,7 @@ namespace preload struct OEMPreloadSI { public: - ::rtl::OUString getImplementationName() const; + ::rtl::OUString getImplementationName() const; ::com::sun::star::uno::Sequence< ::rtl::OUString > getServiceNames() const; }; diff --git a/extensions/source/preload/services.cxx b/extensions/source/preload/services.cxx index 5c2b199275f9..04dcc48657ef 100644 --- a/extensions/source/preload/services.cxx +++ b/extensions/source/preload/services.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -58,8 +58,8 @@ extern "C" void SAL_CALL preload_initializeModule() extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( - const sal_Char **ppEnvTypeName, - uno_Environment ** /*ppEnv*/ + const sal_Char **ppEnvTypeName, + uno_Environment ** /*ppEnv*/ ) { preload_initializeModule(); diff --git a/extensions/source/preload/unoautopilot.hxx b/extensions/source/preload/unoautopilot.hxx index 8533736e0e6a..dd485d887876 100644 --- a/extensions/source/preload/unoautopilot.hxx +++ b/extensions/source/preload/unoautopilot.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -49,7 +49,7 @@ namespace preload struct IServiceInfo { public: - ::rtl::OUString getImplementationName() const; + ::rtl::OUString getImplementationName() const; ::com::sun::star::uno::Sequence< ::rtl::OUString > getServiceNames() const; }; @@ -57,7 +57,7 @@ namespace preload //===================================================================== //= OUnoAutoPilot //===================================================================== - typedef ::svt::OGenericUnoDialog OUnoAutoPilot_Base; + typedef ::svt::OGenericUnoDialog OUnoAutoPilot_Base; template <class TYPE, class SERVICEINFO> class OUnoAutoPilot :public OUnoAutoPilot_Base @@ -93,14 +93,14 @@ namespace preload protected: // OGenericUnoDialog overridables - virtual Dialog* createDialog(Window* _pParent); + virtual Dialog* createDialog(Window* _pParent); virtual void implInitialize(const com::sun::star::uno::Any& _rValue); }; #include "unoautopilot.inl" //......................................................................... -} // namespace dbp +} // namespace dbp //......................................................................... #endif // _EXTENSIONS_PRELOAD_UNOAUTOPILOT_HXX_ diff --git a/extensions/source/preload/unoautopilot.inl b/extensions/source/preload/unoautopilot.inl index 27acdd6864f3..77c3f7b589ab 100644 --- a/extensions/source/preload/unoautopilot.inl +++ b/extensions/source/preload/unoautopilot.inl @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -111,7 +111,7 @@ template <class TYPE, class SERVICEINFO> //-------------------------------------------------------------------------- template <class TYPE, class SERVICEINFO> -Dialog* OUnoAutoPilot<TYPE, SERVICEINFO>::createDialog(Window* _pParent) +Dialog* OUnoAutoPilot<TYPE, SERVICEINFO>::createDialog(Window* _pParent) { return new TYPE(_pParent, m_xObjectModel, m_aContext.getLegacyServiceFactory()); } diff --git a/extensions/source/propctrlr/MasterDetailLinkDialog.cxx b/extensions/source/propctrlr/MasterDetailLinkDialog.cxx index b84319c47ad3..ed69baf7a8c1 100644 --- a/extensions/source/propctrlr/MasterDetailLinkDialog.cxx +++ b/extensions/source/propctrlr/MasterDetailLinkDialog.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -25,11 +25,11 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ - + #include "precompiled_extensions.hxx" #include "MasterDetailLinkDialog.hxx" #include "formlinkdialog.hxx" - + extern "C" void SAL_CALL createRegistryInfo_MasterDetailLinkDialog() { ::pcr::OAutoRegistration< ::pcr::MasterDetailLinkDialog > aAutoRegistration; @@ -113,7 +113,7 @@ namespace pcr } //-------------------------------------------------------------------------- - Dialog* MasterDetailLinkDialog::createDialog(Window* _pParent) + Dialog* MasterDetailLinkDialog::createDialog(Window* _pParent) { return new FormLinkDialog(_pParent,m_xDetail,m_xMaster,m_aContext.getLegacyServiceFactory() ,m_sExplanation,m_sDetailLabel,m_sMasterLabel); diff --git a/extensions/source/propctrlr/MasterDetailLinkDialog.hxx b/extensions/source/propctrlr/MasterDetailLinkDialog.hxx index d0b68fc18e2a..dcfd8e76e9fd 100644 --- a/extensions/source/propctrlr/MasterDetailLinkDialog.hxx +++ b/extensions/source/propctrlr/MasterDetailLinkDialog.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -35,8 +35,8 @@ namespace pcr //........................................................................ class MasterDetailLinkDialog; - typedef ::svt::OGenericUnoDialog MasterDetailLinkDialog_DBase; - typedef ::comphelper::OPropertyArrayUsageHelper< MasterDetailLinkDialog > MasterDetailLinkDialog_PBase; + typedef ::svt::OGenericUnoDialog MasterDetailLinkDialog_DBase; + typedef ::comphelper::OPropertyArrayUsageHelper< MasterDetailLinkDialog > MasterDetailLinkDialog_PBase; //======================================================================== //= MasterDetailLinkDialog @@ -69,7 +69,7 @@ namespace pcr virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const; // OGenericUnoDialog overridables - virtual Dialog* createDialog(Window* _pParent); + virtual Dialog* createDialog(Window* _pParent); virtual void implInitialize(const com::sun::star::uno::Any& _rValue); ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> m_xDetail; @@ -80,7 +80,7 @@ namespace pcr }; //........................................................................ -} // namespace pcr +} // namespace pcr //........................................................................ #endif // PROPCTRLR_MASTERDETAILLINKDIALOG_HXX diff --git a/extensions/source/propctrlr/browserline.cxx b/extensions/source/propctrlr/browserline.cxx index ad43e61ca7f9..74a2765166a0 100644 --- a/extensions/source/propctrlr/browserline.cxx +++ b/extensions/source/propctrlr/browserline.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/propctrlr/browserline.hxx b/extensions/source/propctrlr/browserline.hxx index fd091c712e78..323b457cd590 100644 --- a/extensions/source/propctrlr/browserline.hxx +++ b/extensions/source/propctrlr/browserline.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/propctrlr/browserlistbox.cxx b/extensions/source/propctrlr/browserlistbox.cxx index 02e663c820c4..a70d7cc50d67 100644 --- a/extensions/source/propctrlr/browserlistbox.cxx +++ b/extensions/source/propctrlr/browserlistbox.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -195,7 +195,7 @@ namespace pcr private: /** processes the given event, i.e. notifies it to our IControlContext @param _rEvent - the event no notify + the event no notify @precond our mutex (well, the SolarMutex) is locked */ @@ -1033,8 +1033,8 @@ namespace pcr ++nLine; } - if ( ( (size_t)nLine >= m_aOrderedLines.size() ) - && ( m_aOrderedLines.size() > 0 ) + if ( ( (size_t)nLine >= m_aOrderedLines.size() ) + && ( m_aOrderedLines.size() > 0 ) ) // wrap around m_aOrderedLines[0]->second.pLine->GrabFocus(); @@ -1065,7 +1065,7 @@ namespace pcr //------------------------------------------------------------------ void OBrowserListBox::Clear() { - for ( ListBoxLines::iterator loop = m_aLines.begin(); + for ( ListBoxLines::iterator loop = m_aLines.begin(); loop != m_aLines.end(); ++loop ) @@ -1117,7 +1117,7 @@ namespace pcr if ( nPos < m_aOrderedLines.size() ) { - Window* pRefWindow = NULL; + Window* pRefWindow = NULL; if ( nPos > 0 ) pRefWindow = m_aOrderedLines[nPos-1]->second.pLine->GetRefWindow(); @@ -1202,7 +1202,7 @@ namespace pcr if ( _rPropertyData.bReadOnly ) { rLine.pLine->SetReadOnly( true ); - + // user controls (i.e. the ones not provided by the usual // XPropertyControlFactory) have no chance to know that they should be read-only, // since XPropertyHandler::describePropertyLine does not transport this @@ -1269,7 +1269,7 @@ namespace pcr } } - return 1L; + return 1L; // handled this. In particular, we also consume PageUp/Down events if we do not use them for scrolling, // otherwise they would be used to scroll the document view, which does not sound like it is desired by // the user. @@ -1286,9 +1286,9 @@ namespace pcr case EVENT_COMMAND: { const CommandEvent* pCommand = _rNEvt.GetCommandEvent(); - if ( ( COMMAND_WHEEL == pCommand->GetCommand() ) - || ( COMMAND_STARTAUTOSCROLL == pCommand->GetCommand() ) - || ( COMMAND_AUTOSCROLL == pCommand->GetCommand() ) + if ( ( COMMAND_WHEEL == pCommand->GetCommand() ) + || ( COMMAND_STARTAUTOSCROLL == pCommand->GetCommand() ) + || ( COMMAND_AUTOSCROLL == pCommand->GetCommand() ) ) { // interested in scroll events if we have a scrollbar diff --git a/extensions/source/propctrlr/browserlistbox.hxx b/extensions/source/propctrlr/browserlistbox.hxx index d038f58c626d..6ae8b6427283 100644 --- a/extensions/source/propctrlr/browserlistbox.hxx +++ b/extensions/source/propctrlr/browserlistbox.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -172,7 +172,7 @@ namespace pcr sal_Bool IsModified( ) const; void CommitModified( ); - + protected: // IControlContext virtual void SAL_CALL focusGained( const ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XPropertyControl >& Control ) throw (::com::sun::star::uno::RuntimeException); diff --git a/extensions/source/propctrlr/browserpage.cxx b/extensions/source/propctrlr/browserpage.cxx index 1c3de21b9da8..30f1516190f4 100644 --- a/extensions/source/propctrlr/browserpage.cxx +++ b/extensions/source/propctrlr/browserpage.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -92,13 +92,13 @@ namespace pcr { return m_aListBox.GetMinimumWidth() + LAYOUT_BORDER_LEFT + LAYOUT_BORDER_RIGHT; } - + //------------------------------------------------------------------ sal_Int32 OBrowserPage::getMinimumHeight() { return m_aListBox.GetMinimumHeight() + LAYOUT_BORDER_TOP + LAYOUT_BORDER_BOTTOM; } - + //............................................................................ } // namespace pcr //............................................................................ diff --git a/extensions/source/propctrlr/browserpage.hxx b/extensions/source/propctrlr/browserpage.hxx index a77cfb76e9e9..348e56bbc5a7 100644 --- a/extensions/source/propctrlr/browserpage.hxx +++ b/extensions/source/propctrlr/browserpage.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -43,7 +43,7 @@ namespace pcr class OBrowserPage : public TabPage { private: - OBrowserListBox m_aListBox; + OBrowserListBox m_aListBox; protected: virtual void Resize(); @@ -55,7 +55,7 @@ namespace pcr sal_Int32 getMinimumWidth(); sal_Int32 getMinimumHeight(); - + OBrowserListBox& getListBox(); const OBrowserListBox& getListBox() const; }; diff --git a/extensions/source/propctrlr/browserview.cxx b/extensions/source/propctrlr/browserview.cxx index 3ec4e3bf3ded..1c9e29f89f8e 100644 --- a/extensions/source/propctrlr/browserview.cxx +++ b/extensions/source/propctrlr/browserview.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -138,7 +138,7 @@ namespace pcr } return ::com::sun::star::awt::Size( aSize.Width(), aSize.Height() ); } - + //............................................................................ } // namespace pcr //............................................................................ diff --git a/extensions/source/propctrlr/browserview.hxx b/extensions/source/propctrlr/browserview.hxx index 90c729b01ab7..5e7801f927ca 100644 --- a/extensions/source/propctrlr/browserview.hxx +++ b/extensions/source/propctrlr/browserview.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -44,15 +44,15 @@ namespace pcr class OPropertyEditor; //======================================================================== - //= + //= //======================================================================== class OPropertyBrowserView : public Window { - ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xORB; + ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xORB; - OPropertyEditor* m_pPropBox; - sal_uInt16 m_nActivePage; - Link m_aPageActivationHandler; + OPropertyEditor* m_pPropBox; + sal_uInt16 m_nActivePage; + Link m_aPageActivationHandler; protected: virtual void Resize(); @@ -60,7 +60,7 @@ namespace pcr virtual long Notify( NotifyEvent& _rNEvt ); public: - OPropertyBrowserView(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _xORB, + OPropertyBrowserView(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _xORB, Window* pParent, WinBits nBits = 0); virtual ~OPropertyBrowserView(); @@ -68,15 +68,15 @@ namespace pcr OPropertyEditor& getPropertyBox() { return *m_pPropBox; } // page handling - sal_uInt16 getActivaPage() const { return m_nActivePage; } - void activatePage(sal_uInt16 _nPage); + sal_uInt16 getActivaPage() const { return m_nActivePage; } + void activatePage(sal_uInt16 _nPage); - void setPageActivationHandler(const Link& _rHdl) { m_aPageActivationHandler = _rHdl; } - Link getPageActivationHandler() const { return m_aPageActivationHandler; } + void setPageActivationHandler(const Link& _rHdl) { m_aPageActivationHandler = _rHdl; } + Link getPageActivationHandler() const { return m_aPageActivationHandler; } // #95343# ------------------ ::com::sun::star::awt::Size getMinimumSize(); - + protected: DECL_LINK(OnPageActivation, void*); }; diff --git a/extensions/source/propctrlr/buttonnavigationhandler.cxx b/extensions/source/propctrlr/buttonnavigationhandler.cxx index 6435da2f763b..5f9f8e941ecf 100644 --- a/extensions/source/propctrlr/buttonnavigationhandler.cxx +++ b/extensions/source/propctrlr/buttonnavigationhandler.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -158,7 +158,7 @@ namespace pcr return aReturn; } - + //-------------------------------------------------------------------- void SAL_CALL ButtonNavigationHandler::setPropertyValue( const ::rtl::OUString& _rPropertyName, const Any& _rValue ) throw (UnknownPropertyException, RuntimeException) { @@ -184,7 +184,7 @@ namespace pcr OSL_ENSURE( sal_False, "ButtonNavigationHandler::setPropertyValue: cannot handle this id!" ); } } - + //-------------------------------------------------------------------- bool ButtonNavigationHandler::isNavigationCapableButton( const Reference< XPropertySet >& _rxComponent ) { diff --git a/extensions/source/propctrlr/buttonnavigationhandler.hxx b/extensions/source/propctrlr/buttonnavigationhandler.hxx index f703e010e8e5..d3be8b131e29 100644 --- a/extensions/source/propctrlr/buttonnavigationhandler.hxx +++ b/extensions/source/propctrlr/buttonnavigationhandler.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/propctrlr/cellbindinghandler.cxx b/extensions/source/propctrlr/cellbindinghandler.cxx index ea64279b2e81..41bc249994b1 100644 --- a/extensions/source/propctrlr/cellbindinghandler.cxx +++ b/extensions/source/propctrlr/cellbindinghandler.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -113,7 +113,7 @@ namespace pcr aInterestingProperties[2] = PROPERTY_CONTROLSOURCE; return aInterestingProperties; } - + //-------------------------------------------------------------------- void SAL_CALL CellBindingPropertyHandler::actuatingPropertyChanged( const ::rtl::OUString& _rActuatingPropertyName, const Any& _rNewValue, const Any& /*_rOldValue*/, const Reference< XObjectInspectorUI >& _rxInspectorUI, sal_Bool _bFirstTimeInit ) throw (NullPointerException, RuntimeException) { diff --git a/extensions/source/propctrlr/cellbindinghandler.hxx b/extensions/source/propctrlr/cellbindinghandler.hxx index 8d6d60d83f69..e5e27f609879 100644 --- a/extensions/source/propctrlr/cellbindinghandler.hxx +++ b/extensions/source/propctrlr/cellbindinghandler.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/propctrlr/cellbindinghelper.cxx b/extensions/source/propctrlr/cellbindinghelper.cxx index 24fdc7fc28c3..dc9abea4b5cb 100644 --- a/extensions/source/propctrlr/cellbindinghelper.cxx +++ b/extensions/source/propctrlr/cellbindinghelper.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/propctrlr/cellbindinghelper.hxx b/extensions/source/propctrlr/cellbindinghelper.hxx index faee59c24e32..8fe262b165fc 100644 --- a/extensions/source/propctrlr/cellbindinghelper.hxx +++ b/extensions/source/propctrlr/cellbindinghelper.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -45,7 +45,7 @@ namespace pcr { //............................................................................ - + //======================================================================== //= CellBindingHelper //======================================================================== @@ -68,7 +68,7 @@ namespace pcr const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxControlModel, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& _rxContextDocument ); - + public: /** determines whether the given model is a spreadsheet document model diff --git a/extensions/source/propctrlr/commoncontrol.cxx b/extensions/source/propctrlr/commoncontrol.cxx index ebb80d3eba24..f532fe25c88b 100644 --- a/extensions/source/propctrlr/commoncontrol.cxx +++ b/extensions/source/propctrlr/commoncontrol.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -73,31 +73,31 @@ namespace pcr { return m_nControlType; } - + //-------------------------------------------------------------------- Reference< XPropertyControlContext > SAL_CALL ControlHelper::getControlContext() throw (RuntimeException) { return m_xContext; } - + //-------------------------------------------------------------------- void SAL_CALL ControlHelper::setControlContext( const Reference< XPropertyControlContext >& _controlcontext ) throw (RuntimeException) { m_xContext = _controlcontext; } - + //-------------------------------------------------------------------- Reference< XWindow > SAL_CALL ControlHelper::getControlWindow() throw (RuntimeException) { return VCLUnoHelper::GetInterface( m_pControlWindow ); } - + //-------------------------------------------------------------------- ::sal_Bool SAL_CALL ControlHelper::isModified( ) throw (RuntimeException) { return m_bModified; } - + //-------------------------------------------------------------------- void SAL_CALL ControlHelper::notifyModifiedValue( ) throw (RuntimeException) { diff --git a/extensions/source/propctrlr/commoncontrol.hxx b/extensions/source/propctrlr/commoncontrol.hxx index a38f0e027255..6c834e9773ad 100644 --- a/extensions/source/propctrlr/commoncontrol.hxx +++ b/extensions/source/propctrlr/commoncontrol.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -272,35 +272,35 @@ namespace pcr { return m_aImplControl.getControlType(); } - + //-------------------------------------------------------------------- template< class CONTROL_INTERFACE, class CONTROL_WINDOW > inline ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XPropertyControlContext > SAL_CALL CommonBehaviourControl< CONTROL_INTERFACE, CONTROL_WINDOW >::getControlContext() throw (::com::sun::star::uno::RuntimeException) { return m_aImplControl.getControlContext(); } - + //-------------------------------------------------------------------- template< class CONTROL_INTERFACE, class CONTROL_WINDOW > inline void SAL_CALL CommonBehaviourControl< CONTROL_INTERFACE, CONTROL_WINDOW >::setControlContext( const ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XPropertyControlContext >& _controlcontext ) throw (::com::sun::star::uno::RuntimeException) { m_aImplControl.setControlContext( _controlcontext ); } - + //-------------------------------------------------------------------- template< class CONTROL_INTERFACE, class CONTROL_WINDOW > inline ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > SAL_CALL CommonBehaviourControl< CONTROL_INTERFACE, CONTROL_WINDOW >::getControlWindow() throw (::com::sun::star::uno::RuntimeException) { return m_aImplControl.getControlWindow(); } - + //-------------------------------------------------------------------- template< class CONTROL_INTERFACE, class CONTROL_WINDOW > inline ::sal_Bool SAL_CALL CommonBehaviourControl< CONTROL_INTERFACE, CONTROL_WINDOW >::isModified( ) throw (::com::sun::star::uno::RuntimeException) { return m_aImplControl.isModified(); } - + //-------------------------------------------------------------------- template< class CONTROL_INTERFACE, class CONTROL_WINDOW > inline void SAL_CALL CommonBehaviourControl< CONTROL_INTERFACE, CONTROL_WINDOW >::notifyModifiedValue( ) throw (::com::sun::star::uno::RuntimeException) diff --git a/extensions/source/propctrlr/composeduiupdate.cxx b/extensions/source/propctrlr/composeduiupdate.cxx index f78349c651e5..f40d92e0a259 100644 --- a/extensions/source/propctrlr/composeduiupdate.cxx +++ b/extensions/source/propctrlr/composeduiupdate.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -65,9 +65,9 @@ namespace pcr //==================================================================== namespace { - struct HandlerLess : public ::std::binary_function < Reference< XPropertyHandler > + struct HandlerLess : public ::std::binary_function < Reference< XPropertyHandler > , Reference< XPropertyHandler > - , bool + , bool > { bool operator()( const Reference< XPropertyHandler >& lhs, const Reference< XPropertyHandler >& rhs) const @@ -379,7 +379,7 @@ namespace pcr // register listeners themself m_rMaster.getDelegatorUI()->registerControlObserver( _Observer ); } - + //-------------------------------------------------------------------- void SAL_CALL CachedInspectorUI::revokeControlObserver( const Reference< XPropertyControlObserver >& _Observer ) throw (RuntimeException) { diff --git a/extensions/source/propctrlr/composeduiupdate.hxx b/extensions/source/propctrlr/composeduiupdate.hxx index 0ee9a98eeaf7..3660246d3838 100644 --- a/extensions/source/propctrlr/composeduiupdate.hxx +++ b/extensions/source/propctrlr/composeduiupdate.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/propctrlr/controlfontdialog.cxx b/extensions/source/propctrlr/controlfontdialog.cxx index fbe64bf1bd30..d922d853ea66 100644 --- a/extensions/source/propctrlr/controlfontdialog.cxx +++ b/extensions/source/propctrlr/controlfontdialog.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -136,7 +136,7 @@ namespace pcr } //-------------------------------------------------------------------------- - Dialog* OControlFontDialog::createDialog(Window* _pParent) + Dialog* OControlFontDialog::createDialog(Window* _pParent) { ControlCharacterDialog::createItemSet(m_pFontItems, m_pItemPool, m_pItemPoolDefaults); @@ -171,7 +171,7 @@ namespace pcr } //........................................................................ -} // namespace pcr +} // namespace pcr //........................................................................ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/extensions/source/propctrlr/controlfontdialog.hxx b/extensions/source/propctrlr/controlfontdialog.hxx index 55ea4c4eb618..555370d37623 100644 --- a/extensions/source/propctrlr/controlfontdialog.hxx +++ b/extensions/source/propctrlr/controlfontdialog.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -44,8 +44,8 @@ namespace pcr //= OControlFontDialog //==================================================================== class OControlFontDialog; - typedef ::svt::OGenericUnoDialog OControlFontDialog_DBase; - typedef ::comphelper::OPropertyArrayUsageHelper< OControlFontDialog > OControlFontDialog_PBase; + typedef ::svt::OGenericUnoDialog OControlFontDialog_DBase; + typedef ::comphelper::OPropertyArrayUsageHelper< OControlFontDialog > OControlFontDialog_PBase; class OControlFontDialog :public OControlFontDialog_DBase @@ -58,9 +58,9 @@ namespace pcr m_xControlModel; // </properties> - SfxItemSet* m_pFontItems; // item set for the dialog - SfxItemPool* m_pItemPool; // item pool for the item set for the dialog - SfxPoolItem** m_pItemPoolDefaults; // pool defaults + SfxItemSet* m_pFontItems; // item set for the dialog + SfxItemPool* m_pItemPool; // item pool for the item set for the dialog + SfxPoolItem** m_pItemPoolDefaults; // pool defaults public: OControlFontDialog(const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& _rxContext); @@ -88,13 +88,13 @@ namespace pcr protected: // OGenericUnoDialog overridables - virtual Dialog* createDialog(Window* _pParent); - virtual void destroyDialog(); - virtual void executedDialog(sal_Int16 _nExecutionResult); + virtual Dialog* createDialog(Window* _pParent); + virtual void destroyDialog(); + virtual void executedDialog(sal_Int16 _nExecutionResult); }; //........................................................................ -} // namespace pcr +} // namespace pcr //........................................................................ #endif // _EXTENSIONS_PROPCTRLR_CONTROLFONTDIALOG_HXX_ diff --git a/extensions/source/propctrlr/controltype.hxx b/extensions/source/propctrlr/controltype.hxx index e4871431ed06..c2c502449838 100644 --- a/extensions/source/propctrlr/controltype.hxx +++ b/extensions/source/propctrlr/controltype.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/propctrlr/defaultforminspection.cxx b/extensions/source/propctrlr/defaultforminspection.cxx index 3fd14196537a..124941034d4c 100644 --- a/extensions/source/propctrlr/defaultforminspection.cxx +++ b/extensions/source/propctrlr/defaultforminspection.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -173,7 +173,7 @@ namespace pcr return aReturn; } - + //-------------------------------------------------------------------- Sequence< PropertyCategoryDescriptor > SAL_CALL DefaultFormComponentInspectorModel::describeCategories( ) throw (RuntimeException) { diff --git a/extensions/source/propctrlr/defaultforminspection.hxx b/extensions/source/propctrlr/defaultforminspection.hxx index 3e3a873b5482..9fe1cd3972b2 100644 --- a/extensions/source/propctrlr/defaultforminspection.hxx +++ b/extensions/source/propctrlr/defaultforminspection.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/propctrlr/defaulthelpprovider.cxx b/extensions/source/propctrlr/defaulthelpprovider.cxx index f9d9fd8f5967..290450050ec3 100644 --- a/extensions/source/propctrlr/defaulthelpprovider.cxx +++ b/extensions/source/propctrlr/defaulthelpprovider.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -122,7 +122,7 @@ namespace pcr DBG_UNHANDLED_EXCEPTION(); } } - + //-------------------------------------------------------------------- void SAL_CALL DefaultHelpProvider::valueChanged( const Reference< XPropertyControl >& /*_Control*/ ) throw (RuntimeException) { diff --git a/extensions/source/propctrlr/defaulthelpprovider.hxx b/extensions/source/propctrlr/defaulthelpprovider.hxx index b99d513c2f5e..625521660240 100644 --- a/extensions/source/propctrlr/defaulthelpprovider.hxx +++ b/extensions/source/propctrlr/defaulthelpprovider.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/propctrlr/editpropertyhandler.cxx b/extensions/source/propctrlr/editpropertyhandler.cxx index 9dd3911cd7bd..f57b62039da5 100644 --- a/extensions/source/propctrlr/editpropertyhandler.cxx +++ b/extensions/source/propctrlr/editpropertyhandler.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/propctrlr/editpropertyhandler.hxx b/extensions/source/propctrlr/editpropertyhandler.hxx index a50e36b430b6..8035cc8938db 100644 --- a/extensions/source/propctrlr/editpropertyhandler.hxx +++ b/extensions/source/propctrlr/editpropertyhandler.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/propctrlr/eformshelper.cxx b/extensions/source/propctrlr/eformshelper.cxx index 387b3aa06479..9a356d452c1b 100644 --- a/extensions/source/propctrlr/eformshelper.cxx +++ b/extensions/source/propctrlr/eformshelper.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -92,7 +92,7 @@ namespace pcr m_xDocument = m_xDocument.query( _rxContextDocument ); OSL_ENSURE( m_xDocument.is(), "EFormsHelper::EFormsHelper: invalid document!" ); - + } //-------------------------------------------------------------------- diff --git a/extensions/source/propctrlr/eformshelper.hxx b/extensions/source/propctrlr/eformshelper.hxx index ba6c3ca681e4..53883b348d13 100644 --- a/extensions/source/propctrlr/eformshelper.hxx +++ b/extensions/source/propctrlr/eformshelper.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -224,7 +224,7 @@ namespace pcr @see getModelElementUIName @see getModelElementFromUIName */ - void getAllElementUINames( + void getAllElementUINames( const ModelElementType _eType, ::std::vector< ::rtl::OUString >& /* [out] */ _rElementNames, bool _bPrepentEmptyEntry diff --git a/extensions/source/propctrlr/eformspropertyhandler.cxx b/extensions/source/propctrlr/eformspropertyhandler.cxx index 68bd6ae46311..5002606ecc76 100644 --- a/extensions/source/propctrlr/eformspropertyhandler.cxx +++ b/extensions/source/propctrlr/eformspropertyhandler.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/propctrlr/eformspropertyhandler.hxx b/extensions/source/propctrlr/eformspropertyhandler.hxx index 1cf932e6c7ff..f1613a661583 100644 --- a/extensions/source/propctrlr/eformspropertyhandler.hxx +++ b/extensions/source/propctrlr/eformspropertyhandler.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/propctrlr/enumrepresentation.hxx b/extensions/source/propctrlr/enumrepresentation.hxx index b6f65724b520..058dd1096f4a 100644 --- a/extensions/source/propctrlr/enumrepresentation.hxx +++ b/extensions/source/propctrlr/enumrepresentation.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/propctrlr/eventhandler.cxx b/extensions/source/propctrlr/eventhandler.cxx index 08aaa69b37cb..ac148ed648cd 100644 --- a/extensions/source/propctrlr/eventhandler.cxx +++ b/extensions/source/propctrlr/eventhandler.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -525,14 +525,14 @@ namespace pcr { return getImplementationName_static(); } - + //-------------------------------------------------------------------- ::sal_Bool SAL_CALL EventHandler::supportsService( const ::rtl::OUString& ServiceName ) throw (RuntimeException) { StlSyntaxSequence< ::rtl::OUString > aAllServices( getSupportedServiceNames() ); return ::std::find( aAllServices.begin(), aAllServices.end(), ServiceName ) != aAllServices.end(); } - + //-------------------------------------------------------------------- Sequence< ::rtl::OUString > SAL_CALL EventHandler::getSupportedServiceNames( ) throw (RuntimeException) { @@ -544,7 +544,7 @@ namespace pcr { return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.extensions.EventHandler" ) ); } - + //-------------------------------------------------------------------- Sequence< ::rtl::OUString > SAL_CALL EventHandler::getSupportedServiceNames_static( ) throw (RuntimeException) { @@ -552,7 +552,7 @@ namespace pcr aSupported[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.form.inspection.EventHandler" ) ); return aSupported; } - + //-------------------------------------------------------------------- Reference< XInterface > SAL_CALL EventHandler::Create( const Reference< XComponentContext >& _rxContext ) { @@ -626,7 +626,7 @@ namespace pcr return makeAny( aPropertyValue ); } - + //-------------------------------------------------------------------- void SAL_CALL EventHandler::setPropertyValue( const ::rtl::OUString& _rPropertyName, const Any& _rValue ) throw (UnknownPropertyException, RuntimeException) { @@ -659,7 +659,7 @@ namespace pcr aEvent.NewValue <<= aNewScriptEvent; m_aPropertyListeners.notify( aEvent, &XPropertyChangeListener::propertyChange ); } - + //-------------------------------------------------------------------- Any SAL_CALL EventHandler::convertToPropertyValue( const ::rtl::OUString& _rPropertyName, const Any& _rControlValue ) throw (UnknownPropertyException, RuntimeException) { @@ -687,7 +687,7 @@ namespace pcr aAssignedScript.ScriptCode = sNewScriptCode; return makeAny( aAssignedScript ); } - + //-------------------------------------------------------------------- Any SAL_CALL EventHandler::convertToControlValue( const ::rtl::OUString& /*_rPropertyName*/, const Any& _rPropertyValue, const Type& _rControlValueType ) throw (UnknownPropertyException, RuntimeException) { @@ -752,13 +752,13 @@ namespace pcr return makeAny( sScript ); } - + //-------------------------------------------------------------------- PropertyState SAL_CALL EventHandler::getPropertyState( const ::rtl::OUString& /*_rPropertyName*/ ) throw (UnknownPropertyException, RuntimeException) { return PropertyState_DIRECT_VALUE; } - + //-------------------------------------------------------------------- void SAL_CALL EventHandler::addPropertyChangeListener( const Reference< XPropertyChangeListener >& _rxListener ) throw (RuntimeException) { @@ -767,14 +767,14 @@ namespace pcr throw NullPointerException(); m_aPropertyListeners.addListener( _rxListener ); } - + //-------------------------------------------------------------------- void SAL_CALL EventHandler::removePropertyChangeListener( const Reference< XPropertyChangeListener >& _rxListener ) throw (RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); m_aPropertyListeners.removeListener( _rxListener ); } - + //-------------------------------------------------------------------- Sequence< Property > SAL_CALL EventHandler::getSupportedProperties() throw (RuntimeException) { @@ -848,21 +848,21 @@ namespace pcr ::std::select2nd< ::std::map< EventId, Property >::value_type >() ); return aReturn; } - + //-------------------------------------------------------------------- Sequence< ::rtl::OUString > SAL_CALL EventHandler::getSupersededProperties( ) throw (RuntimeException) { // none return Sequence< ::rtl::OUString >( ); } - + //-------------------------------------------------------------------- Sequence< ::rtl::OUString > SAL_CALL EventHandler::getActuatingProperties( ) throw (RuntimeException) { // none return Sequence< ::rtl::OUString >( ); } - + //-------------------------------------------------------------------- LineDescriptor SAL_CALL EventHandler::describePropertyLine( const ::rtl::OUString& _rPropertyName, const Reference< XPropertyControlFactory >& _rxControlFactory ) @@ -886,13 +886,13 @@ namespace pcr aDescriptor.Category = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Events" ) ); return aDescriptor; } - + //-------------------------------------------------------------------- ::sal_Bool SAL_CALL EventHandler::isComposable( const ::rtl::OUString& /*_rPropertyName*/ ) throw (UnknownPropertyException, RuntimeException) { return sal_False; } - + //-------------------------------------------------------------------- InteractiveSelectionResult SAL_CALL EventHandler::onInteractivePropertySelection( const ::rtl::OUString& _rPropertyName, sal_Bool /*_bPrimary*/, Any& /*_rData*/, const Reference< XObjectInspectorUI >& _rxInspectorUI ) throw (UnknownPropertyException, NullPointerException, RuntimeException) { @@ -967,13 +967,13 @@ namespace pcr return InteractiveSelectionResult_Success; } - + //-------------------------------------------------------------------- void SAL_CALL EventHandler::actuatingPropertyChanged( const ::rtl::OUString& /*_rActuatingPropertyName*/, const Any& /*_rNewValue*/, const Any& /*_rOldValue*/, const Reference< XObjectInspectorUI >& /*_rxInspectorUI*/, sal_Bool /*_bFirstTimeInit*/ ) throw (NullPointerException, RuntimeException) { DBG_ERROR( "EventHandler::actuatingPropertyChanged: no actuating properties -> no callback (well, this is how it *should* be!)" ); } - + //-------------------------------------------------------------------- IMPLEMENT_FORWARD_XCOMPONENT( EventHandler, EventHandler_Base ) diff --git a/extensions/source/propctrlr/eventhandler.hxx b/extensions/source/propctrlr/eventhandler.hxx index 4ea10e0e6463..7e113ec741bb 100644 --- a/extensions/source/propctrlr/eventhandler.hxx +++ b/extensions/source/propctrlr/eventhandler.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/propctrlr/fontdialog.cxx b/extensions/source/propctrlr/fontdialog.cxx index b9a5e2afffe3..c18d5735d60d 100644 --- a/extensions/source/propctrlr/fontdialog.cxx +++ b/extensions/source/propctrlr/fontdialog.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -91,13 +91,13 @@ namespace pcr _rxProps ); public: - sal_Bool getCheckFontProperty(const ::rtl::OUString& _rPropName, ::com::sun::star::uno::Any& _rValue); - ::rtl::OUString getStringFontProperty(const ::rtl::OUString& _rPropName, const ::rtl::OUString& _rDefault); - sal_Int16 getInt16FontProperty(const ::rtl::OUString& _rPropName, const sal_Int16 _nDefault); - sal_Int32 getInt32FontProperty(const ::rtl::OUString& _rPropName, const sal_Int32 _nDefault); - float getFloatFontProperty(const ::rtl::OUString& _rPropName, const float _nDefault); + sal_Bool getCheckFontProperty(const ::rtl::OUString& _rPropName, ::com::sun::star::uno::Any& _rValue); + ::rtl::OUString getStringFontProperty(const ::rtl::OUString& _rPropName, const ::rtl::OUString& _rDefault); + sal_Int16 getInt16FontProperty(const ::rtl::OUString& _rPropName, const sal_Int16 _nDefault); + sal_Int32 getInt32FontProperty(const ::rtl::OUString& _rPropName, const sal_Int32 _nDefault); + float getFloatFontProperty(const ::rtl::OUString& _rPropName, const float _nDefault); - void invalidateItem( + void invalidateItem( const ::rtl::OUString& _rPropName, sal_uInt16 _nItemId, SfxItemSet& _rSet, @@ -123,7 +123,7 @@ namespace pcr } //------------------------------------------------------------------------ - ::rtl::OUString OFontPropertyExtractor::getStringFontProperty(const ::rtl::OUString& _rPropName, const ::rtl::OUString& _rDefault) + ::rtl::OUString OFontPropertyExtractor::getStringFontProperty(const ::rtl::OUString& _rPropName, const ::rtl::OUString& _rDefault) { Any aValue; if (getCheckFontProperty(_rPropName, aValue)) @@ -169,8 +169,8 @@ namespace pcr //------------------------------------------------------------------------ void OFontPropertyExtractor::invalidateItem(const ::rtl::OUString& _rPropName, sal_uInt16 _nItemId, SfxItemSet& _rSet, sal_Bool _bForceInvalidation) { - if ( _bForceInvalidation - || ( m_xPropStateAccess.is() + if ( _bForceInvalidation + || ( m_xPropStateAccess.is() && (PropertyState_AMBIGUOUS_VALUE == m_xPropStateAccess->getPropertyState(_rPropName)) ) ) @@ -212,23 +212,23 @@ namespace pcr ::com::sun::star::awt::FontDescriptor aDefaultFont = VCLUnoHelper::CreateFontDescriptor(aDefaultVCLFont); // get the current properties - ::rtl::OUString aFontName = aPropExtractor.getStringFontProperty(PROPERTY_FONT_NAME, aDefaultFont.Name); - ::rtl::OUString aFontStyleName = aPropExtractor.getStringFontProperty(PROPERTY_FONT_STYLENAME, aDefaultFont.StyleName); - sal_Int16 nFontFamily = aPropExtractor.getInt16FontProperty(PROPERTY_FONT_FAMILY, aDefaultFont.Family); - sal_Int16 nFontCharset = aPropExtractor.getInt16FontProperty(PROPERTY_FONT_CHARSET, aDefaultFont.CharSet); - float nFontHeight = aPropExtractor.getFloatFontProperty(PROPERTY_FONT_HEIGHT, (float)aDefaultFont.Height); - float nFontWeight = aPropExtractor.getFloatFontProperty(PROPERTY_FONT_WEIGHT, aDefaultFont.Weight); - sal_Int16 nFontSlant = aPropExtractor.getInt16FontProperty(PROPERTY_FONT_SLANT, (sal_Int16)aDefaultFont.Slant); - sal_Int16 nFontUnderline = aPropExtractor.getInt16FontProperty(PROPERTY_FONT_UNDERLINE, aDefaultFont.Underline); - sal_Int16 nFontStrikeout = aPropExtractor.getInt16FontProperty(PROPERTY_FONT_STRIKEOUT, aDefaultFont.Strikeout); - - sal_Int32 nTextLineColor = aPropExtractor.getInt32FontProperty(PROPERTY_TEXTLINECOLOR, COL_AUTO); - sal_Int16 nFontRelief = aPropExtractor.getInt16FontProperty(PROPERTY_FONT_RELIEF, (sal_Int16)aDefaultVCLFont.GetRelief()); - sal_Int16 nFontEmphasisMark = aPropExtractor.getInt16FontProperty(PROPERTY_FONT_EMPHASIS_MARK, aDefaultVCLFont.GetEmphasisMark()); + ::rtl::OUString aFontName = aPropExtractor.getStringFontProperty(PROPERTY_FONT_NAME, aDefaultFont.Name); + ::rtl::OUString aFontStyleName = aPropExtractor.getStringFontProperty(PROPERTY_FONT_STYLENAME, aDefaultFont.StyleName); + sal_Int16 nFontFamily = aPropExtractor.getInt16FontProperty(PROPERTY_FONT_FAMILY, aDefaultFont.Family); + sal_Int16 nFontCharset = aPropExtractor.getInt16FontProperty(PROPERTY_FONT_CHARSET, aDefaultFont.CharSet); + float nFontHeight = aPropExtractor.getFloatFontProperty(PROPERTY_FONT_HEIGHT, (float)aDefaultFont.Height); + float nFontWeight = aPropExtractor.getFloatFontProperty(PROPERTY_FONT_WEIGHT, aDefaultFont.Weight); + sal_Int16 nFontSlant = aPropExtractor.getInt16FontProperty(PROPERTY_FONT_SLANT, (sal_Int16)aDefaultFont.Slant); + sal_Int16 nFontUnderline = aPropExtractor.getInt16FontProperty(PROPERTY_FONT_UNDERLINE, aDefaultFont.Underline); + sal_Int16 nFontStrikeout = aPropExtractor.getInt16FontProperty(PROPERTY_FONT_STRIKEOUT, aDefaultFont.Strikeout); + + sal_Int32 nTextLineColor = aPropExtractor.getInt32FontProperty(PROPERTY_TEXTLINECOLOR, COL_AUTO); + sal_Int16 nFontRelief = aPropExtractor.getInt16FontProperty(PROPERTY_FONT_RELIEF, (sal_Int16)aDefaultVCLFont.GetRelief()); + sal_Int16 nFontEmphasisMark = aPropExtractor.getInt16FontProperty(PROPERTY_FONT_EMPHASIS_MARK, aDefaultVCLFont.GetEmphasisMark()); Any aValue; - sal_Bool bWordLineMode = aPropExtractor.getCheckFontProperty(PROPERTY_WORDLINEMODE, aValue) ? aDefaultFont.WordLineMode : ::cppu::any2bool(aValue); - sal_Int32 nColor32 = aPropExtractor.getInt32FontProperty(PROPERTY_TEXTCOLOR, 0); + sal_Bool bWordLineMode = aPropExtractor.getCheckFontProperty(PROPERTY_WORDLINEMODE, aValue) ? aDefaultFont.WordLineMode : ::cppu::any2bool(aValue); + sal_Int32 nColor32 = aPropExtractor.getInt32FontProperty(PROPERTY_TEXTCOLOR, 0); // build SfxItems with the values SvxFontItem aFontItem((FontFamily)nFontFamily, aFontName, aFontStyleName, PITCH_DONTKNOW, nFontCharset, CFID_FONT); @@ -236,18 +236,18 @@ namespace pcr nFontHeight = (float)OutputDevice::LogicToLogic(Size(0, (sal_Int32)nFontHeight), MAP_POINT, MAP_TWIP).Height(); SvxFontHeightItem aSvxFontHeightItem((sal_uInt32)nFontHeight,100,CFID_HEIGHT); - FontWeight eWeight=VCLUnoHelper::ConvertFontWeight(nFontWeight); - FontItalic eItalic=(FontItalic)nFontSlant; - FontUnderline eUnderline=(FontUnderline)nFontUnderline; - FontStrikeout eStrikeout=(FontStrikeout)nFontStrikeout; + FontWeight eWeight=VCLUnoHelper::ConvertFontWeight(nFontWeight); + FontItalic eItalic=(FontItalic)nFontSlant; + FontUnderline eUnderline=(FontUnderline)nFontUnderline; + FontStrikeout eStrikeout=(FontStrikeout)nFontStrikeout; - SvxWeightItem aWeightItem(eWeight,CFID_WEIGHT); - SvxPostureItem aPostureItem(eItalic,CFID_POSTURE); + SvxWeightItem aWeightItem(eWeight,CFID_WEIGHT); + SvxPostureItem aPostureItem(eItalic,CFID_POSTURE); - SvxCrossedOutItem aCrossedOutItem(eStrikeout,CFID_STRIKEOUT); + SvxCrossedOutItem aCrossedOutItem(eStrikeout,CFID_STRIKEOUT); SvxWordLineModeItem aWordLineModeItem(bWordLineMode, CFID_WORDLINEMODE); - SvxUnderlineItem aUnderlineItem(eUnderline,CFID_UNDERLINE); + SvxUnderlineItem aUnderlineItem(eUnderline,CFID_UNDERLINE); aUnderlineItem.SetColor(Color(nTextLineColor)); SvxColorItem aSvxColorItem(nColor32,CFID_CHARCOLOR); @@ -489,7 +489,7 @@ namespace pcr } //------------------------------------------------------------------------ - SfxItemSet* ControlCharacterDialog::createItemSet(SfxItemSet*& _rpSet, SfxItemPool*& _rpPool, SfxPoolItem**& _rppDefaults) + SfxItemSet* ControlCharacterDialog::createItemSet(SfxItemSet*& _rpSet, SfxItemPool*& _rpPool, SfxPoolItem**& _rppDefaults) { // just to be sure .... _rpSet = NULL; @@ -501,7 +501,7 @@ namespace pcr Font aDefaultVCLFont = Application::GetDefaultDevice()->GetSettings().GetStyleSettings().GetAppFont(); - SfxPoolItem** pCounter = _rppDefaults; // want to modify this without affecting the out param _rppDefaults + SfxPoolItem** pCounter = _rppDefaults; // want to modify this without affecting the out param _rppDefaults *pCounter++ = new SvxFontItem(aDefaultVCLFont.GetFamily(), aDefaultVCLFont.GetName(), aDefaultVCLFont.GetStyleName(), aDefaultVCLFont.GetPitch(), aDefaultVCLFont.GetCharSet(), CFID_FONT); *pCounter++ = new SvxFontHeightItem(aDefaultVCLFont.GetHeight(), 100, CFID_HEIGHT); *pCounter++ = new SvxWeightItem(aDefaultVCLFont.GetWeight(), CFID_WEIGHT); @@ -529,26 +529,26 @@ namespace pcr // create the pool static SfxItemInfo __READONLY_DATA aItemInfos[CFID_LAST_ITEM_ID - CFID_FIRST_ITEM_ID + 1] = { - { SID_ATTR_CHAR_FONT, 0 }, - { SID_ATTR_CHAR_FONTHEIGHT, 0 }, - { SID_ATTR_CHAR_WEIGHT, 0 }, - { SID_ATTR_CHAR_POSTURE, 0 }, - { SID_ATTR_CHAR_LANGUAGE, 0 }, - { SID_ATTR_CHAR_UNDERLINE, 0 }, - { SID_ATTR_CHAR_STRIKEOUT, 0 }, - { SID_ATTR_CHAR_WORDLINEMODE, 0 }, - { SID_ATTR_CHAR_COLOR, 0 }, - { SID_ATTR_CHAR_RELIEF, 0 }, - { SID_ATTR_CHAR_EMPHASISMARK, 0 }, - { 0, 0 }, - { 0, 0 }, - { 0, 0 }, - { 0, 0 }, - { 0, 0 }, - { 0, 0 }, - { 0, 0 }, - { 0, 0 }, - { SID_ATTR_CHAR_FONTLIST, 0 } + { SID_ATTR_CHAR_FONT, 0 }, + { SID_ATTR_CHAR_FONTHEIGHT, 0 }, + { SID_ATTR_CHAR_WEIGHT, 0 }, + { SID_ATTR_CHAR_POSTURE, 0 }, + { SID_ATTR_CHAR_LANGUAGE, 0 }, + { SID_ATTR_CHAR_UNDERLINE, 0 }, + { SID_ATTR_CHAR_STRIKEOUT, 0 }, + { SID_ATTR_CHAR_WORDLINEMODE, 0 }, + { SID_ATTR_CHAR_COLOR, 0 }, + { SID_ATTR_CHAR_RELIEF, 0 }, + { SID_ATTR_CHAR_EMPHASISMARK, 0 }, + { 0, 0 }, + { 0, 0 }, + { 0, 0 }, + { 0, 0 }, + { 0, 0 }, + { 0, 0 }, + { 0, 0 }, + { 0, 0 }, + { SID_ATTR_CHAR_FONTLIST, 0 } }; _rpPool = new SfxItemPool(String::CreateFromAscii("PCRControlFontItemPool"), CFID_FIRST_ITEM_ID, CFID_LAST_ITEM_ID, @@ -603,7 +603,7 @@ namespace pcr } //............................................................................ -} // namespace pcr +} // namespace pcr //............................................................................ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/extensions/source/propctrlr/fontdialog.hxx b/extensions/source/propctrlr/fontdialog.hxx index 5cd285470fc4..b7d812c4af90 100644 --- a/extensions/source/propctrlr/fontdialog.hxx +++ b/extensions/source/propctrlr/fontdialog.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -51,13 +51,13 @@ namespace pcr ~ControlCharacterDialog(); /// creates an item set to be used with this dialog - static SfxItemSet* createItemSet(SfxItemSet*& _rpSet, SfxItemPool*& _rpPool, SfxPoolItem**& _rppDefaults); + static SfxItemSet* createItemSet(SfxItemSet*& _rpSet, SfxItemPool*& _rpPool, SfxPoolItem**& _rppDefaults); /// destroys an item previously created with <method>createItemSet</method> - static void destroyItemSet(SfxItemSet*& _rpSet, SfxItemPool*& _rpPool, SfxPoolItem**& _rppDefaults); + static void destroyItemSet(SfxItemSet*& _rpSet, SfxItemPool*& _rpPool, SfxPoolItem**& _rppDefaults); /// fills the given item set with values obtained from the given property set - static void translatePropertiesToItems( + static void translatePropertiesToItems( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxModel, SfxItemSet* _pSet); @@ -77,7 +77,7 @@ namespace pcr virtual void PageCreated(sal_uInt16 _nId, SfxTabPage& _rPage); }; //............................................................................ -} // namespace pcr +} // namespace pcr //............................................................................ #endif // _EXTENSIONS_PROPCTRLR_FONTDIALOG_HXX_ diff --git a/extensions/source/propctrlr/fontdialog.src b/extensions/source/propctrlr/fontdialog.src index 51dbb6913178..7d628e9efbae 100644 --- a/extensions/source/propctrlr/fontdialog.src +++ b/extensions/source/propctrlr/fontdialog.src @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/propctrlr/fontitemids.hxx b/extensions/source/propctrlr/fontitemids.hxx index 888b80c15c6b..2089f93ccbeb 100644 --- a/extensions/source/propctrlr/fontitemids.hxx +++ b/extensions/source/propctrlr/fontitemids.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -29,38 +29,38 @@ #ifndef _EXTENSIONS_PROPCTRLR_FONTITEMIDS_HXX_ #define _EXTENSIONS_PROPCTRLR_FONTITEMIDS_HXX_ -#define CFID_FONT 1 -#define CFID_HEIGHT 2 -#define CFID_WEIGHT 3 -#define CFID_POSTURE 4 -#define CFID_LANGUAGE 5 -#define CFID_UNDERLINE 6 -#define CFID_STRIKEOUT 7 -#define CFID_WORDLINEMODE 8 -#define CFID_CHARCOLOR 9 -#define CFID_RELIEF 10 -#define CFID_EMPHASIS 11 +#define CFID_FONT 1 +#define CFID_HEIGHT 2 +#define CFID_WEIGHT 3 +#define CFID_POSTURE 4 +#define CFID_LANGUAGE 5 +#define CFID_UNDERLINE 6 +#define CFID_STRIKEOUT 7 +#define CFID_WORDLINEMODE 8 +#define CFID_CHARCOLOR 9 +#define CFID_RELIEF 10 +#define CFID_EMPHASIS 11 -#define CFID_CJK_FONT 12 -#define CFID_CJK_HEIGHT 13 -#define CFID_CJK_WEIGHT 14 -#define CFID_CJK_POSTURE 15 -#define CFID_CJK_LANGUAGE 16 -#define CFID_CASEMAP 17 -#define CFID_CONTOUR 18 -#define CFID_SHADOWED 19 +#define CFID_CJK_FONT 12 +#define CFID_CJK_HEIGHT 13 +#define CFID_CJK_WEIGHT 14 +#define CFID_CJK_POSTURE 15 +#define CFID_CJK_LANGUAGE 16 +#define CFID_CASEMAP 17 +#define CFID_CONTOUR 18 +#define CFID_SHADOWED 19 -#define CFID_FONTLIST 20 +#define CFID_FONTLIST 20 -#define CFID_FIRST_ITEM_ID CFID_FONT -#define CFID_LAST_ITEM_ID CFID_FONTLIST +#define CFID_FIRST_ITEM_ID CFID_FONT +#define CFID_LAST_ITEM_ID CFID_FONTLIST //........................................................................ namespace pcr { //........................................................................ //........................................................................ -} // namespace pcr +} // namespace pcr //........................................................................ #endif // _EXTENSIONS_PROPCTRLR_FONTITEMIDS_HXX_ diff --git a/extensions/source/propctrlr/formbrowsertools.cxx b/extensions/source/propctrlr/formbrowsertools.cxx index 1e60db01326c..d39e6c1ee170 100644 --- a/extensions/source/propctrlr/formbrowsertools.cxx +++ b/extensions/source/propctrlr/formbrowsertools.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -62,7 +62,7 @@ namespace pcr aUnoObj >>= xIFace; sClassName = String(PcrRes(RID_STR_PROPTITLE_EDIT)); if (xIFace.is()) - { // we have a chance to check if it's a formatted field model + { // we have a chance to check if it's a formatted field model Reference< XServiceInfo > xInfo(xIFace, UNO_QUERY); if (xInfo.is() && (xInfo->supportsService(SERVICE_COMPONENT_FORMATTEDFIELD))) sClassName = String(PcrRes(RID_STR_PROPTITLE_FORMATTED)); diff --git a/extensions/source/propctrlr/formbrowsertools.hxx b/extensions/source/propctrlr/formbrowsertools.hxx index 4374c28e253e..ec6d329e50da 100644 --- a/extensions/source/propctrlr/formbrowsertools.hxx +++ b/extensions/source/propctrlr/formbrowsertools.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -74,7 +74,7 @@ namespace pcr //======================================================================== struct PropertyLessByName - :public ::std::binary_function < ::com::sun::star::beans::Property, + :public ::std::binary_function < ::com::sun::star::beans::Property, ::com::sun::star::beans::Property, bool > @@ -87,7 +87,7 @@ namespace pcr //======================================================================== struct TypeLessByName - :public ::std::binary_function < ::com::sun::star::uno::Type, + :public ::std::binary_function < ::com::sun::star::uno::Type, ::com::sun::star::uno::Type, bool > diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx index c5eb86be632c..5ffafad89fe4 100644 --- a/extensions/source/propctrlr/formcomponenthandler.cxx +++ b/extensions/source/propctrlr/formcomponenthandler.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -377,7 +377,7 @@ namespace pcr ::rtl::OUString aValueStr; _rValue >>= aValueStr; xStringResourceManager->setString( aPureIdStr, aValueStr ); - aValue = aPropertyValue; // set value to force modified + aValue = aPropertyValue; // set value to force modified } } // StringItemList? @@ -2561,7 +2561,7 @@ namespace pcr if ( bAdd ) { sTemp.append(_sName); - sTemp.appendAscii("/"); + sTemp.appendAscii("/"); } sTemp.append(*pQueryNames); Reference< XNameAccess > xSubQueries(_xQueryNames->getByName(*pQueryNames),UNO_QUERY); diff --git a/extensions/source/propctrlr/formcomponenthandler.hxx b/extensions/source/propctrlr/formcomponenthandler.hxx index 1b250cef718a..81f72606f1cc 100644 --- a/extensions/source/propctrlr/formcomponenthandler.hxx +++ b/extensions/source/propctrlr/formcomponenthandler.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -79,7 +79,7 @@ namespace pcr /// access to property states ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyState > m_xPropertyState; /// the parent of our component - ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > m_xObjectParent; + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > m_xObjectParent; /// the database connection. Owned by us if and only if we created it ourself. mutable ::dbtools::SharedConnection m_xRowSetConnection; @@ -103,7 +103,7 @@ namespace pcr /// our component has a "Command" property bool m_bHaveCommand : 1; /// the class id of the component - if appliable - sal_Int16 m_nClassId; + sal_Int16 m_nClassId; public: FormComponentPropertyHandler( diff --git a/extensions/source/propctrlr/formcontroller.cxx b/extensions/source/propctrlr/formcontroller.cxx index 14a4d6465bfc..e2c5b7cdc7b6 100644 --- a/extensions/source/propctrlr/formcontroller.cxx +++ b/extensions/source/propctrlr/formcontroller.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/propctrlr/formcontroller.hxx b/extensions/source/propctrlr/formcontroller.hxx index d46b4e04a76c..fc398beb42d5 100644 --- a/extensions/source/propctrlr/formcontroller.hxx +++ b/extensions/source/propctrlr/formcontroller.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/propctrlr/formgeometryhandler.cxx b/extensions/source/propctrlr/formgeometryhandler.cxx index 0af7c29b7f80..5c0875e7870c 100644 --- a/extensions/source/propctrlr/formgeometryhandler.cxx +++ b/extensions/source/propctrlr/formgeometryhandler.cxx @@ -1,7 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -777,7 +777,7 @@ namespace pcr m_aPropertyChangeListeners.notifyEach( &XPropertyChangeListener::propertyChange, aTranslatedEvent ); } } - + //-------------------------------------------------------------------- void SAL_CALL ShapeGeometryChangeNotifier::disposing( const EventObject& /*_event*/ ) throw (RuntimeException) { diff --git a/extensions/source/propctrlr/formlinkdialog.cxx b/extensions/source/propctrlr/formlinkdialog.cxx index 1f31a25fdd1c..21e965ede7b7 100644 --- a/extensions/source/propctrlr/formlinkdialog.cxx +++ b/extensions/source/propctrlr/formlinkdialog.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/propctrlr/formlinkdialog.hrc b/extensions/source/propctrlr/formlinkdialog.hrc index 768034901182..25a179352d66 100644 --- a/extensions/source/propctrlr/formlinkdialog.hrc +++ b/extensions/source/propctrlr/formlinkdialog.hrc @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/propctrlr/formlinkdialog.hxx b/extensions/source/propctrlr/formlinkdialog.hxx index a660a569cd89..04d35cc9fc6e 100644 --- a/extensions/source/propctrlr/formlinkdialog.hxx +++ b/extensions/source/propctrlr/formlinkdialog.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/propctrlr/formlinkdialog.src b/extensions/source/propctrlr/formlinkdialog.src index f319675d7c42..ca936a58d4d4 100644 --- a/extensions/source/propctrlr/formlinkdialog.src +++ b/extensions/source/propctrlr/formlinkdialog.src @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/propctrlr/formlocalid.hrc b/extensions/source/propctrlr/formlocalid.hrc index dca59a024321..387a1418a000 100644 --- a/extensions/source/propctrlr/formlocalid.hrc +++ b/extensions/source/propctrlr/formlocalid.hrc @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -28,8 +28,8 @@ #ifndef _EXTENSIONS_PROPCTRLR_FORMLOCALID_HRC_ #define _EXTENSIONS_PROPCTRLR_FORMLOCALID_HRC_ -#define TABPAGE_CHARACTERS 1 -#define TABPAGE_CHARACTERS_EXT 2 +#define TABPAGE_CHARACTERS 1 +#define TABPAGE_CHARACTERS_EXT 2 #define IMG_PLUS 1 #define IMG_MINUS 2 diff --git a/extensions/source/propctrlr/formmetadata.cxx b/extensions/source/propctrlr/formmetadata.cxx index d4790a44350b..ae14c90c2b44 100644 --- a/extensions/source/propctrlr/formmetadata.cxx +++ b/extensions/source/propctrlr/formmetadata.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -52,19 +52,19 @@ namespace pcr //======================================================================== struct OPropertyInfoImpl { - String sName; - String sTranslation; + String sName; + String sTranslation; sal_uInt32 nHelpId; sal_Int32 nId; sal_uInt16 nPos; sal_uInt32 nUIFlags; OPropertyInfoImpl( - const ::rtl::OUString& rName, - sal_Int32 _nId, - const String& aTranslation, - sal_uInt16 nPosId, - sal_uInt32 nHelpId, + const ::rtl::OUString& rName, + sal_Int32 _nId, + const String& aTranslation, + sal_uInt16 nPosId, + sal_uInt32 nHelpId, sal_uInt32 _nUIFlags); }; @@ -89,7 +89,7 @@ namespace pcr return _rLHS.sName.CompareTo( _rRHS.sName ) == COMPARE_LESS; } }; - + //======================================================================== //= OPropertyInfoService //======================================================================== @@ -112,8 +112,8 @@ namespace pcr #define DEF_INFO_5( ident, uinameres, helpid, flag1, flag2, flag3, flag4, flag5 ) \ DEF_INFO( ident, uinameres, helpid, PROP_FLAG_##flag1 | PROP_FLAG_##flag2 | PROP_FLAG_##flag3 | PROP_FLAG_##flag4 | PROP_FLAG_##flag5 ) - sal_uInt16 OPropertyInfoService::s_nCount = 0; - OPropertyInfoImpl* OPropertyInfoService::s_pPropertyInfos = NULL; + sal_uInt16 OPropertyInfoService::s_nCount = 0; + OPropertyInfoImpl* OPropertyInfoService::s_pPropertyInfos = NULL; //------------------------------------------------------------------------ const OPropertyInfoImpl* OPropertyInfoService::getPropertyInfo() { @@ -351,9 +351,9 @@ namespace pcr DEF_INFO_3( HELPURL, HELPURL, HELPURL, FORM_VISIBLE, DIALOG_VISIBLE, COMPOSEABLE ), DEF_INFO_3( SELECTION_TYPE, SELECTION_TYPE, SELECTION_TYPE, DIALOG_VISIBLE, ENUM, COMPOSEABLE ), DEF_INFO_2( ROOT_DISPLAYED, ROOT_DISPLAYED, ROOT_DISPLAYED, DIALOG_VISIBLE, COMPOSEABLE ), - DEF_INFO_2( SHOWS_HANDLES, SHOWS_HANDLES, SHOWS_HANDLES, DIALOG_VISIBLE, COMPOSEABLE ), - DEF_INFO_2( SHOWS_ROOT_HANDLES, SHOWS_ROOT_HANDLES, SHOWS_ROOT_HANDLES, DIALOG_VISIBLE, COMPOSEABLE ), - DEF_INFO_2( EDITABLE, EDITABLE, EDITABLE, DIALOG_VISIBLE, COMPOSEABLE ), + DEF_INFO_2( SHOWS_HANDLES, SHOWS_HANDLES, SHOWS_HANDLES, DIALOG_VISIBLE, COMPOSEABLE ), + DEF_INFO_2( SHOWS_ROOT_HANDLES, SHOWS_ROOT_HANDLES, SHOWS_ROOT_HANDLES, DIALOG_VISIBLE, COMPOSEABLE ), + DEF_INFO_2( EDITABLE, EDITABLE, EDITABLE, DIALOG_VISIBLE, COMPOSEABLE ), DEF_INFO_2( INVOKES_STOP_NOT_EDITING, INVOKES_STOP_NOT_EDITING, INVOKES_STOP_NOT_EDITING, DIALOG_VISIBLE, COMPOSEABLE ), DEF_INFO_2( DECORATION, DECORATION, DECORATION, DIALOG_VISIBLE, COMPOSEABLE ), DEF_INFO_2( NOLABEL, NOLABEL, NOLABEL, DIALOG_VISIBLE, COMPOSEABLE ) @@ -613,7 +613,7 @@ namespace pcr { return m_rMetaData.getPropertyEnumRepresentations( m_nPropertyId ); } - + //-------------------------------------------------------------------- void SAL_CALL DefaultEnumRepresentation::getValueFromDescription( const ::rtl::OUString& _rDescription, Any& _out_rValue ) const { @@ -656,7 +656,7 @@ namespace pcr _out_rValue.clear(); } } - + //-------------------------------------------------------------------- ::rtl::OUString SAL_CALL DefaultEnumRepresentation::getDescriptionForValue( const Any& _rEnumValue ) const { @@ -675,18 +675,18 @@ namespace pcr sReturn = aEnumStrings[ nIntValue ]; } else - { + { DBG_ERROR( "DefaultEnumRepresentation::getDescriptionForValue: could not translate an enum value" ); } return sReturn; } - + //-------------------------------------------------------------------- oslInterlockedCount SAL_CALL DefaultEnumRepresentation::acquire() { return osl_incrementInterlockedCount( &m_refCount ); } - + //-------------------------------------------------------------------- oslInterlockedCount SAL_CALL DefaultEnumRepresentation::release() { diff --git a/extensions/source/propctrlr/formmetadata.hxx b/extensions/source/propctrlr/formmetadata.hxx index 24341b617d08..66aaf8ab2e70 100644 --- a/extensions/source/propctrlr/formmetadata.hxx +++ b/extensions/source/propctrlr/formmetadata.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -50,16 +50,16 @@ namespace pcr ,public PcrClient { protected: - static sal_uInt16 s_nCount; - static OPropertyInfoImpl* s_pPropertyInfos; + static sal_uInt16 s_nCount; + static OPropertyInfoImpl* s_pPropertyInfos; // TODO: a real structure which allows quick access by name as well as by id public: // IPropertyInfoService - virtual sal_Int32 getPropertyId(const String& _rName) const; - virtual String getPropertyTranslation(sal_Int32 _nId) const; - virtual sal_Int32 getPropertyHelpId(sal_Int32 _nId) const; - virtual sal_Int16 getPropertyPos(sal_Int32 _nId) const; + virtual sal_Int32 getPropertyId(const String& _rName) const; + virtual String getPropertyTranslation(sal_Int32 _nId) const; + virtual sal_Int32 getPropertyHelpId(sal_Int32 _nId) const; + virtual sal_Int16 getPropertyPos(sal_Int32 _nId) const; virtual sal_uInt32 getPropertyUIFlags(sal_Int32 _nId) const; virtual ::std::vector< ::rtl::OUString > getPropertyEnumRepresentations(sal_Int32 _nId) const; virtual String getPropertyName( sal_Int32 _nPropId ); @@ -140,125 +140,125 @@ namespace pcr //= property ids (for all browseable properties) //======================================================================== - #define PROPERTY_ID_NAME 1 - #define PROPERTY_ID_LABEL 2 - #define PROPERTY_ID_CONTROLLABEL 3 - #define PROPERTY_ID_MAXTEXTLEN 4 - #define PROPERTY_ID_EDITMASK 5 - #define PROPERTY_ID_LITERALMASK 6 - #define PROPERTY_ID_STRICTFORMAT 7 - #define PROPERTY_ID_ENABLED 8 - #define PROPERTY_ID_READONLY 9 - #define PROPERTY_ID_PRINTABLE 10 - #define PROPERTY_ID_CONTROLSOURCE 11 - #define PROPERTY_ID_TABSTOP 12 - #define PROPERTY_ID_TABINDEX 13 - #define PROPERTY_ID_DATASOURCE 14 - #define PROPERTY_ID_COMMAND 15 - #define PROPERTY_ID_COMMANDTYPE 16 + #define PROPERTY_ID_NAME 1 + #define PROPERTY_ID_LABEL 2 + #define PROPERTY_ID_CONTROLLABEL 3 + #define PROPERTY_ID_MAXTEXTLEN 4 + #define PROPERTY_ID_EDITMASK 5 + #define PROPERTY_ID_LITERALMASK 6 + #define PROPERTY_ID_STRICTFORMAT 7 + #define PROPERTY_ID_ENABLED 8 + #define PROPERTY_ID_READONLY 9 + #define PROPERTY_ID_PRINTABLE 10 + #define PROPERTY_ID_CONTROLSOURCE 11 + #define PROPERTY_ID_TABSTOP 12 + #define PROPERTY_ID_TABINDEX 13 + #define PROPERTY_ID_DATASOURCE 14 + #define PROPERTY_ID_COMMAND 15 + #define PROPERTY_ID_COMMANDTYPE 16 #define PROPERTY_ID_FILTER 17 - #define PROPERTY_ID_SORT 18 - #define PROPERTY_ID_INSERTONLY 19 - #define PROPERTY_ID_ALLOWADDITIONS 20 - #define PROPERTY_ID_ALLOWEDITS 21 - #define PROPERTY_ID_ALLOWDELETIONS 22 - #define PROPERTY_ID_GROUP_NAME 23 - #define PROPERTY_ID_NAVIGATION 24 - #define PROPERTY_ID_CYCLE 25 - #define PROPERTY_ID_HIDDEN_VALUE 26 - #define PROPERTY_ID_VALUEMIN 27 - #define PROPERTY_ID_VALUEMAX 28 - #define PROPERTY_ID_VALUESTEP 29 - #define PROPERTY_ID_DEFAULT_VALUE 30 - #define PROPERTY_ID_DECIMAL_ACCURACY 31 - #define PROPERTY_ID_SHOWTHOUSANDSEP 32 - #define PROPERTY_ID_REFVALUE 33 - #define PROPERTY_ID_CURRENCYSYMBOL 34 - #define PROPERTY_ID_CURRSYM_POSITION 35 - #define PROPERTY_ID_DATEMIN 36 - #define PROPERTY_ID_DATEMAX 37 - #define PROPERTY_ID_DATEFORMAT 38 + #define PROPERTY_ID_SORT 18 + #define PROPERTY_ID_INSERTONLY 19 + #define PROPERTY_ID_ALLOWADDITIONS 20 + #define PROPERTY_ID_ALLOWEDITS 21 + #define PROPERTY_ID_ALLOWDELETIONS 22 + #define PROPERTY_ID_GROUP_NAME 23 + #define PROPERTY_ID_NAVIGATION 24 + #define PROPERTY_ID_CYCLE 25 + #define PROPERTY_ID_HIDDEN_VALUE 26 + #define PROPERTY_ID_VALUEMIN 27 + #define PROPERTY_ID_VALUEMAX 28 + #define PROPERTY_ID_VALUESTEP 29 + #define PROPERTY_ID_DEFAULT_VALUE 30 + #define PROPERTY_ID_DECIMAL_ACCURACY 31 + #define PROPERTY_ID_SHOWTHOUSANDSEP 32 + #define PROPERTY_ID_REFVALUE 33 + #define PROPERTY_ID_CURRENCYSYMBOL 34 + #define PROPERTY_ID_CURRSYM_POSITION 35 + #define PROPERTY_ID_DATEMIN 36 + #define PROPERTY_ID_DATEMAX 37 + #define PROPERTY_ID_DATEFORMAT 38 #define PROPERTY_ID_SELECTEDITEMS 39 - #define PROPERTY_ID_DEFAULT_DATE 40 - #define PROPERTY_ID_TIMEMIN 41 - #define PROPERTY_ID_TIMEMAX 42 - #define PROPERTY_ID_TIMEFORMAT 43 - #define PROPERTY_ID_DEFAULT_TIME 44 - #define PROPERTY_ID_EFFECTIVE_MIN 45 - #define PROPERTY_ID_EFFECTIVE_MAX 46 - #define PROPERTY_ID_EFFECTIVE_DEFAULT 47 - #define PROPERTY_ID_FORMATKEY 48 - #define PROPERTY_ID_CLASSID 50 - #define PROPERTY_ID_HEIGHT 51 - #define PROPERTY_ID_WIDTH 52 - #define PROPERTY_ID_BOUNDCOLUMN 53 - #define PROPERTY_ID_LISTSOURCETYPE 54 - #define PROPERTY_ID_LISTSOURCE 55 - #define PROPERTY_ID_LISTINDEX 56 - #define PROPERTY_ID_STRINGITEMLIST 57 - #define PROPERTY_ID_DEFAULT_TEXT 58 + #define PROPERTY_ID_DEFAULT_DATE 40 + #define PROPERTY_ID_TIMEMIN 41 + #define PROPERTY_ID_TIMEMAX 42 + #define PROPERTY_ID_TIMEFORMAT 43 + #define PROPERTY_ID_DEFAULT_TIME 44 + #define PROPERTY_ID_EFFECTIVE_MIN 45 + #define PROPERTY_ID_EFFECTIVE_MAX 46 + #define PROPERTY_ID_EFFECTIVE_DEFAULT 47 + #define PROPERTY_ID_FORMATKEY 48 + #define PROPERTY_ID_CLASSID 50 + #define PROPERTY_ID_HEIGHT 51 + #define PROPERTY_ID_WIDTH 52 + #define PROPERTY_ID_BOUNDCOLUMN 53 + #define PROPERTY_ID_LISTSOURCETYPE 54 + #define PROPERTY_ID_LISTSOURCE 55 + #define PROPERTY_ID_LISTINDEX 56 + #define PROPERTY_ID_STRINGITEMLIST 57 + #define PROPERTY_ID_DEFAULT_TEXT 58 #define PROPERTY_ID_FONT 59 - #define PROPERTY_ID_ALIGN 60 - #define PROPERTY_ID_ROWHEIGHT 61 - #define PROPERTY_ID_BACKGROUNDCOLOR 62 - #define PROPERTY_ID_FILLCOLOR 63 - #define PROPERTY_ID_ESCAPE_PROCESSING 64 - #define PROPERTY_ID_LINECOLOR 65 - #define PROPERTY_ID_BORDER 66 - #define PROPERTY_ID_DROPDOWN 67 - #define PROPERTY_ID_AUTOCOMPLETE 68 - #define PROPERTY_ID_LINECOUNT 69 + #define PROPERTY_ID_ALIGN 60 + #define PROPERTY_ID_ROWHEIGHT 61 + #define PROPERTY_ID_BACKGROUNDCOLOR 62 + #define PROPERTY_ID_FILLCOLOR 63 + #define PROPERTY_ID_ESCAPE_PROCESSING 64 + #define PROPERTY_ID_LINECOLOR 65 + #define PROPERTY_ID_BORDER 66 + #define PROPERTY_ID_DROPDOWN 67 + #define PROPERTY_ID_AUTOCOMPLETE 68 + #define PROPERTY_ID_LINECOUNT 69 #define PROPERTY_ID_WORDBREAK 70 - #define PROPERTY_ID_MULTILINE 71 - #define PROPERTY_ID_MULTISELECTION 72 + #define PROPERTY_ID_MULTILINE 71 + #define PROPERTY_ID_MULTISELECTION 72 #define PROPERTY_ID_AUTOLINEBREAK 73 - #define PROPERTY_ID_HSCROLL 74 - #define PROPERTY_ID_VSCROLL 75 - #define PROPERTY_ID_SPIN 76 - #define PROPERTY_ID_BUTTONTYPE 77 - #define PROPERTY_ID_TARGET_URL 78 - #define PROPERTY_ID_TARGET_FRAME 79 - #define PROPERTY_ID_SUBMIT_ACTION 80 - #define PROPERTY_ID_SUBMIT_TARGET 81 - #define PROPERTY_ID_SUBMIT_METHOD 82 - #define PROPERTY_ID_SUBMIT_ENCODING 83 - #define PROPERTY_ID_DEFAULT_STATE 84 - #define PROPERTY_ID_DEFAULTBUTTON 85 - #define PROPERTY_ID_IMAGE_URL 86 - #define PROPERTY_ID_DEFAULT_SELECT_SEQ 87 - #define PROPERTY_ID_ECHO_CHAR 88 - #define PROPERTY_ID_EMPTY_IS_NULL 89 - #define PROPERTY_ID_TRISTATE 90 - #define PROPERTY_ID_MASTERFIELDS 91 - #define PROPERTY_ID_DETAILFIELDS 92 - #define PROPERTY_ID_RECORDMARKER 93 - #define PROPERTY_ID_FILTERPROPOSAL 94 - #define PROPERTY_ID_TAG 95 - #define PROPERTY_ID_HELPTEXT 96 - #define PROPERTY_ID_HELPURL 97 - #define PROPERTY_ID_HASNAVIGATION 98 - #define PROPERTY_ID_POSITIONX 99 - #define PROPERTY_ID_POSITIONY 100 - #define PROPERTY_ID_TITLE 101 - #define PROPERTY_ID_STEP 102 - #define PROPERTY_ID_PROGRESSVALUE 103 - #define PROPERTY_ID_PROGRESSVALUE_MIN 104 - #define PROPERTY_ID_PROGRESSVALUE_MAX 105 - #define PROPERTY_ID_SCROLLVALUE 106 - #define PROPERTY_ID_SCROLLVALUE_MAX 107 - #define PROPERTY_ID_LINEINCREMENT 108 - #define PROPERTY_ID_BLOCKINCREMENT 109 - #define PROPERTY_ID_VISIBLESIZE 110 - #define PROPERTY_ID_ORIENTATION 111 + #define PROPERTY_ID_HSCROLL 74 + #define PROPERTY_ID_VSCROLL 75 + #define PROPERTY_ID_SPIN 76 + #define PROPERTY_ID_BUTTONTYPE 77 + #define PROPERTY_ID_TARGET_URL 78 + #define PROPERTY_ID_TARGET_FRAME 79 + #define PROPERTY_ID_SUBMIT_ACTION 80 + #define PROPERTY_ID_SUBMIT_TARGET 81 + #define PROPERTY_ID_SUBMIT_METHOD 82 + #define PROPERTY_ID_SUBMIT_ENCODING 83 + #define PROPERTY_ID_DEFAULT_STATE 84 + #define PROPERTY_ID_DEFAULTBUTTON 85 + #define PROPERTY_ID_IMAGE_URL 86 + #define PROPERTY_ID_DEFAULT_SELECT_SEQ 87 + #define PROPERTY_ID_ECHO_CHAR 88 + #define PROPERTY_ID_EMPTY_IS_NULL 89 + #define PROPERTY_ID_TRISTATE 90 + #define PROPERTY_ID_MASTERFIELDS 91 + #define PROPERTY_ID_DETAILFIELDS 92 + #define PROPERTY_ID_RECORDMARKER 93 + #define PROPERTY_ID_FILTERPROPOSAL 94 + #define PROPERTY_ID_TAG 95 + #define PROPERTY_ID_HELPTEXT 96 + #define PROPERTY_ID_HELPURL 97 + #define PROPERTY_ID_HASNAVIGATION 98 + #define PROPERTY_ID_POSITIONX 99 + #define PROPERTY_ID_POSITIONY 100 + #define PROPERTY_ID_TITLE 101 + #define PROPERTY_ID_STEP 102 + #define PROPERTY_ID_PROGRESSVALUE 103 + #define PROPERTY_ID_PROGRESSVALUE_MIN 104 + #define PROPERTY_ID_PROGRESSVALUE_MAX 105 + #define PROPERTY_ID_SCROLLVALUE 106 + #define PROPERTY_ID_SCROLLVALUE_MAX 107 + #define PROPERTY_ID_LINEINCREMENT 108 + #define PROPERTY_ID_BLOCKINCREMENT 109 + #define PROPERTY_ID_VISIBLESIZE 110 + #define PROPERTY_ID_ORIENTATION 111 #define PROPERTY_ID_IMAGEPOSITION 112 - #define PROPERTY_ID_DATE 113 - #define PROPERTY_ID_STATE 114 - #define PROPERTY_ID_TIME 115 - #define PROPERTY_ID_VALUE 116 - #define PROPERTY_ID_SCALEIMAGE 117 - #define PROPERTY_ID_PUSHBUTTONTYPE 118 - #define PROPERTY_ID_EFFECTIVE_VALUE 119 - #define PROPERTY_ID_TEXT 120 + #define PROPERTY_ID_DATE 113 + #define PROPERTY_ID_STATE 114 + #define PROPERTY_ID_TIME 115 + #define PROPERTY_ID_VALUE 116 + #define PROPERTY_ID_SCALEIMAGE 117 + #define PROPERTY_ID_PUSHBUTTONTYPE 118 + #define PROPERTY_ID_EFFECTIVE_VALUE 119 + #define PROPERTY_ID_TEXT 120 #define PROPERTY_ID_BOUND_CELL 121 #define PROPERTY_ID_LIST_CELL_RANGE 122 #define PROPERTY_ID_CELL_EXCHANGE_TYPE 123 @@ -326,14 +326,14 @@ namespace pcr #define PROPERTY_ID_LIST_BINDING 185 #define PROPERTY_ID_VERTICAL_ALIGN 186 #define PROPERTY_ID_BINDING_NAME 187 - #define PROPERTY_ID_DECORATION 188 - #define PROPERTY_ID_SELECTION_TYPE 189 - #define PROPERTY_ID_ROOT_DISPLAYED 190 - #define PROPERTY_ID_SHOWS_HANDLES 191 - #define PROPERTY_ID_SHOWS_ROOT_HANDLES 192 - #define PROPERTY_ID_EDITABLE 193 + #define PROPERTY_ID_DECORATION 188 + #define PROPERTY_ID_SELECTION_TYPE 189 + #define PROPERTY_ID_ROOT_DISPLAYED 190 + #define PROPERTY_ID_SHOWS_HANDLES 191 + #define PROPERTY_ID_SHOWS_ROOT_HANDLES 192 + #define PROPERTY_ID_EDITABLE 193 #define PROPERTY_ID_INVOKES_STOP_NOT_EDITING 194 - #define PROPERTY_ID_NOLABEL 195 + #define PROPERTY_ID_NOLABEL 195 #define PROPERTY_ID_SCALE_MODE 196 #define PROPERTY_ID_INPUT_REQUIRED 197 #define PROPERTY_ID_WRITING_MODE 198 diff --git a/extensions/source/propctrlr/formres.src b/extensions/source/propctrlr/formres.src index a1ac9fe2c0c4..1170c89cccf8 100644 --- a/extensions/source/propctrlr/formres.src +++ b/extensions/source/propctrlr/formres.src @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -765,11 +765,11 @@ String RID_STR_EVT_BEFOREUPDATE }; String RID_STR_EVT_APPROVEROWCHANGE { - Text [ en-US ] = "Before record action" ; + Text [ en-US ] = "Before record action" ; }; String RID_STR_EVT_ROWCHANGE { - Text [ en-US ] = "After record action" ; + Text [ en-US ] = "After record action" ; }; String RID_STR_EVT_CONFIRMDELETE { @@ -805,11 +805,11 @@ String RID_STR_EVT_LOADED }; String RID_STR_EVT_RELOADING { - Text [ en-US ] = "Before reloading" ; + Text [ en-US ] = "Before reloading" ; }; String RID_STR_EVT_RELOADED { - Text [ en-US ] = "When reloading" ; + Text [ en-US ] = "When reloading" ; }; String RID_STR_EVT_MOUSEDRAGGED { @@ -857,7 +857,7 @@ String RID_STR_EVT_APPROVEACTIONPERFORMED }; String RID_STR_EVT_SUBMITTED { - Text [ en-US ] = "Before submitting" ; + Text [ en-US ] = "Before submitting" ; }; String RID_STR_EVT_TEXTCHANGED { diff --git a/extensions/source/propctrlr/formresid.hrc b/extensions/source/propctrlr/formresid.hrc index 0aeab5306da9..e05a6bbab365 100644 --- a/extensions/source/propctrlr/formresid.hrc +++ b/extensions/source/propctrlr/formresid.hrc @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -35,118 +35,118 @@ // ----------------------------------------------------------------------- // - Strings -#define RID_STR_FORMS ( RID_FORMBROWSER_START + 1 ) -#define RID_STR_PROPTITLE_DBGRID ( RID_FORMBROWSER_START + 2 ) -#define RID_STR_PROPTITLE_PATTERNFIELD ( RID_FORMBROWSER_START + 3 ) -#define RID_STR_PROPTITLE_CURRENCYFIELD ( RID_FORMBROWSER_START + 4 ) -#define RID_STR_PROPTITLE_NUMERICFIELD ( RID_FORMBROWSER_START + 5 ) -#define RID_STR_PROPTITLE_TIMEFIELD ( RID_FORMBROWSER_START + 6 ) -#define RID_STR_PROPTITLE_DATEFIELD ( RID_FORMBROWSER_START + 7 ) -#define RID_STR_PROPTITLE_FILECONTROL ( RID_FORMBROWSER_START + 8 ) -#define RID_STR_PROPTITLE_IMAGECONTROL ( RID_FORMBROWSER_START + 9 ) -#define RID_STR_PROPTITLE_IMAGEBUTTON ( RID_FORMBROWSER_START + 10 ) -#define RID_STR_PROPTITLE_COMBOBOX ( RID_FORMBROWSER_START + 11 ) -#define RID_STR_PROPTITLE_LISTBOX ( RID_FORMBROWSER_START + 12 ) -#define RID_STR_PROPTITLE_FORMATTED ( RID_FORMBROWSER_START + 13 ) -#define RID_STR_PROPTITLE_EDIT ( RID_FORMBROWSER_START + 14 ) -#define RID_STR_PROPTITLE_GROUPBOX ( RID_FORMBROWSER_START + 15 ) -#define RID_STR_PROPTITLE_FIXEDTEXT ( RID_FORMBROWSER_START + 16 ) -#define RID_STR_PROPTITLE_CHECKBOX ( RID_FORMBROWSER_START + 17 ) -#define RID_STR_PROPTITLE_RADIOBUTTON ( RID_FORMBROWSER_START + 18 ) -#define RID_STR_PROPTITLE_PUSHBUTTON ( RID_FORMBROWSER_START + 19 ) -#define RID_STR_PROPTITLE_HIDDENCONTROL ( RID_FORMBROWSER_START + 30 ) -#define RID_STR_PROPTITLE_UNKNOWNCONTROL ( RID_FORMBROWSER_START + 31 ) +#define RID_STR_FORMS ( RID_FORMBROWSER_START + 1 ) +#define RID_STR_PROPTITLE_DBGRID ( RID_FORMBROWSER_START + 2 ) +#define RID_STR_PROPTITLE_PATTERNFIELD ( RID_FORMBROWSER_START + 3 ) +#define RID_STR_PROPTITLE_CURRENCYFIELD ( RID_FORMBROWSER_START + 4 ) +#define RID_STR_PROPTITLE_NUMERICFIELD ( RID_FORMBROWSER_START + 5 ) +#define RID_STR_PROPTITLE_TIMEFIELD ( RID_FORMBROWSER_START + 6 ) +#define RID_STR_PROPTITLE_DATEFIELD ( RID_FORMBROWSER_START + 7 ) +#define RID_STR_PROPTITLE_FILECONTROL ( RID_FORMBROWSER_START + 8 ) +#define RID_STR_PROPTITLE_IMAGECONTROL ( RID_FORMBROWSER_START + 9 ) +#define RID_STR_PROPTITLE_IMAGEBUTTON ( RID_FORMBROWSER_START + 10 ) +#define RID_STR_PROPTITLE_COMBOBOX ( RID_FORMBROWSER_START + 11 ) +#define RID_STR_PROPTITLE_LISTBOX ( RID_FORMBROWSER_START + 12 ) +#define RID_STR_PROPTITLE_FORMATTED ( RID_FORMBROWSER_START + 13 ) +#define RID_STR_PROPTITLE_EDIT ( RID_FORMBROWSER_START + 14 ) +#define RID_STR_PROPTITLE_GROUPBOX ( RID_FORMBROWSER_START + 15 ) +#define RID_STR_PROPTITLE_FIXEDTEXT ( RID_FORMBROWSER_START + 16 ) +#define RID_STR_PROPTITLE_CHECKBOX ( RID_FORMBROWSER_START + 17 ) +#define RID_STR_PROPTITLE_RADIOBUTTON ( RID_FORMBROWSER_START + 18 ) +#define RID_STR_PROPTITLE_PUSHBUTTON ( RID_FORMBROWSER_START + 19 ) +#define RID_STR_PROPTITLE_HIDDENCONTROL ( RID_FORMBROWSER_START + 30 ) +#define RID_STR_PROPTITLE_UNKNOWNCONTROL ( RID_FORMBROWSER_START + 31 ) -#define RID_STR_NAME ( RID_FORMBROWSER_START + 32 ) -#define RID_STR_LABEL ( RID_FORMBROWSER_START + 33 ) -#define RID_STR_LABELCONTROL ( RID_FORMBROWSER_START + 34 ) -#define RID_STR_MAXTEXTLEN ( RID_FORMBROWSER_START + 35 ) -#define RID_STR_EDITMASK ( RID_FORMBROWSER_START + 36 ) -#define RID_STR_LITERALMASK ( RID_FORMBROWSER_START + 37 ) -#define RID_STR_STRICTFORMAT ( RID_FORMBROWSER_START + 38 ) -#define RID_STR_ENABLED ( RID_FORMBROWSER_START + 39 ) -#define RID_STR_READONLY ( RID_FORMBROWSER_START + 40 ) -#define RID_STR_PRINTABLE ( RID_FORMBROWSER_START + 41 ) -#define RID_STR_CONTROLSOURCE ( RID_FORMBROWSER_START + 42 ) -#define RID_STR_TABSTOP ( RID_FORMBROWSER_START + 43 ) -#define RID_STR_TABINDEX ( RID_FORMBROWSER_START + 44 ) -#define RID_STR_DATASOURCE ( RID_FORMBROWSER_START + 45 ) -#define RID_STR_CURSORSOURCE ( RID_FORMBROWSER_START + 46 ) -#define RID_STR_CURSORSOURCETYPE ( RID_FORMBROWSER_START + 47 ) +#define RID_STR_NAME ( RID_FORMBROWSER_START + 32 ) +#define RID_STR_LABEL ( RID_FORMBROWSER_START + 33 ) +#define RID_STR_LABELCONTROL ( RID_FORMBROWSER_START + 34 ) +#define RID_STR_MAXTEXTLEN ( RID_FORMBROWSER_START + 35 ) +#define RID_STR_EDITMASK ( RID_FORMBROWSER_START + 36 ) +#define RID_STR_LITERALMASK ( RID_FORMBROWSER_START + 37 ) +#define RID_STR_STRICTFORMAT ( RID_FORMBROWSER_START + 38 ) +#define RID_STR_ENABLED ( RID_FORMBROWSER_START + 39 ) +#define RID_STR_READONLY ( RID_FORMBROWSER_START + 40 ) +#define RID_STR_PRINTABLE ( RID_FORMBROWSER_START + 41 ) +#define RID_STR_CONTROLSOURCE ( RID_FORMBROWSER_START + 42 ) +#define RID_STR_TABSTOP ( RID_FORMBROWSER_START + 43 ) +#define RID_STR_TABINDEX ( RID_FORMBROWSER_START + 44 ) +#define RID_STR_DATASOURCE ( RID_FORMBROWSER_START + 45 ) +#define RID_STR_CURSORSOURCE ( RID_FORMBROWSER_START + 46 ) +#define RID_STR_CURSORSOURCETYPE ( RID_FORMBROWSER_START + 47 ) #define RID_STR_FILTER ( RID_FORMBROWSER_START + 48 ) -#define RID_STR_SORT_CRITERIA ( RID_FORMBROWSER_START + 49 ) -#define RID_STR_ALLOW_ADDITIONS ( RID_FORMBROWSER_START + 50 ) -#define RID_STR_ALLOW_EDITS ( RID_FORMBROWSER_START + 51 ) -#define RID_STR_ALLOW_DELETIONS ( RID_FORMBROWSER_START + 52 ) -#define RID_STR_DATAENTRY ( RID_FORMBROWSER_START + 53 ) -#define RID_STR_CYCLE ( RID_FORMBROWSER_START + 54 ) -#define RID_STR_VALUE ( RID_FORMBROWSER_START + 55 ) -#define RID_STR_VALUESTEP ( RID_FORMBROWSER_START + 56 ) -#define RID_STR_DECIMAL_ACCURACY ( RID_FORMBROWSER_START + 57 ) -#define RID_STR_SHOWTHOUSANDSEP ( RID_FORMBROWSER_START + 58 ) -#define RID_STR_REFVALUE ( RID_FORMBROWSER_START + 59 ) -#define RID_STR_CURRENCYSYMBOL ( RID_FORMBROWSER_START + 60 ) -#define RID_STR_CURRSYM_POSITION ( RID_FORMBROWSER_START + 61 ) -#define RID_STR_DATEMIN ( RID_FORMBROWSER_START + 62 ) -#define RID_STR_DATEMAX ( RID_FORMBROWSER_START + 63 ) -#define RID_STR_DATEFORMAT ( RID_FORMBROWSER_START + 64 ) -#define RID_STR_SELECTEDITEMS ( RID_FORMBROWSER_START + 65 ) -#define RID_STR_TIMEMIN ( RID_FORMBROWSER_START + 66 ) -#define RID_STR_TIMEMAX ( RID_FORMBROWSER_START + 67 ) -#define RID_STR_TIMEFORMAT ( RID_FORMBROWSER_START + 68 ) -#define RID_STR_VALUEMIN ( RID_FORMBROWSER_START + 69 ) -#define RID_STR_VALUEMAX ( RID_FORMBROWSER_START + 70 ) -#define RID_STR_FORMATKEY ( RID_FORMBROWSER_START + 71 ) -#define RID_STR_CLASSID ( RID_FORMBROWSER_START + 72 ) -#define RID_STR_HEIGHT ( RID_FORMBROWSER_START + 73 ) -#define RID_STR_WIDTH ( RID_FORMBROWSER_START + 74 ) -#define RID_STR_BOUNDCOLUMN ( RID_FORMBROWSER_START + 75 ) -#define RID_STR_LISTSOURCETYPE ( RID_FORMBROWSER_START + 76 ) -#define RID_STR_LISTSOURCE ( RID_FORMBROWSER_START + 77 ) -#define RID_STR_LISTINDEX ( RID_FORMBROWSER_START + 78 ) -#define RID_STR_STRINGITEMLIST ( RID_FORMBROWSER_START + 79 ) -#define RID_STR_DEFAULTVALUE ( RID_FORMBROWSER_START + 80 ) -#define RID_STR_FONT ( RID_FORMBROWSER_START + 81 ) -#define RID_STR_ALIGN ( RID_FORMBROWSER_START + 82 ) -#define RID_STR_ROWHEIGHT ( RID_FORMBROWSER_START + 83 ) -#define RID_STR_BACKGROUNDCOLOR ( RID_FORMBROWSER_START + 84 ) -#define RID_STR_FILLCOLOR ( RID_FORMBROWSER_START + 85 ) -#define RID_STR_LINECOLOR ( RID_FORMBROWSER_START + 86 ) -#define RID_STR_BORDER ( RID_FORMBROWSER_START + 87 ) -#define RID_STR_DROPDOWN ( RID_FORMBROWSER_START + 88 ) -#define RID_STR_AUTOCOMPLETE ( RID_FORMBROWSER_START + 89 ) -#define RID_STR_LINECOUNT ( RID_FORMBROWSER_START + 90 ) -#define RID_STR_MULTILINE ( RID_FORMBROWSER_START + 91 ) -#define RID_STR_MULTISELECTION ( RID_FORMBROWSER_START + 92 ) +#define RID_STR_SORT_CRITERIA ( RID_FORMBROWSER_START + 49 ) +#define RID_STR_ALLOW_ADDITIONS ( RID_FORMBROWSER_START + 50 ) +#define RID_STR_ALLOW_EDITS ( RID_FORMBROWSER_START + 51 ) +#define RID_STR_ALLOW_DELETIONS ( RID_FORMBROWSER_START + 52 ) +#define RID_STR_DATAENTRY ( RID_FORMBROWSER_START + 53 ) +#define RID_STR_CYCLE ( RID_FORMBROWSER_START + 54 ) +#define RID_STR_VALUE ( RID_FORMBROWSER_START + 55 ) +#define RID_STR_VALUESTEP ( RID_FORMBROWSER_START + 56 ) +#define RID_STR_DECIMAL_ACCURACY ( RID_FORMBROWSER_START + 57 ) +#define RID_STR_SHOWTHOUSANDSEP ( RID_FORMBROWSER_START + 58 ) +#define RID_STR_REFVALUE ( RID_FORMBROWSER_START + 59 ) +#define RID_STR_CURRENCYSYMBOL ( RID_FORMBROWSER_START + 60 ) +#define RID_STR_CURRSYM_POSITION ( RID_FORMBROWSER_START + 61 ) +#define RID_STR_DATEMIN ( RID_FORMBROWSER_START + 62 ) +#define RID_STR_DATEMAX ( RID_FORMBROWSER_START + 63 ) +#define RID_STR_DATEFORMAT ( RID_FORMBROWSER_START + 64 ) +#define RID_STR_SELECTEDITEMS ( RID_FORMBROWSER_START + 65 ) +#define RID_STR_TIMEMIN ( RID_FORMBROWSER_START + 66 ) +#define RID_STR_TIMEMAX ( RID_FORMBROWSER_START + 67 ) +#define RID_STR_TIMEFORMAT ( RID_FORMBROWSER_START + 68 ) +#define RID_STR_VALUEMIN ( RID_FORMBROWSER_START + 69 ) +#define RID_STR_VALUEMAX ( RID_FORMBROWSER_START + 70 ) +#define RID_STR_FORMATKEY ( RID_FORMBROWSER_START + 71 ) +#define RID_STR_CLASSID ( RID_FORMBROWSER_START + 72 ) +#define RID_STR_HEIGHT ( RID_FORMBROWSER_START + 73 ) +#define RID_STR_WIDTH ( RID_FORMBROWSER_START + 74 ) +#define RID_STR_BOUNDCOLUMN ( RID_FORMBROWSER_START + 75 ) +#define RID_STR_LISTSOURCETYPE ( RID_FORMBROWSER_START + 76 ) +#define RID_STR_LISTSOURCE ( RID_FORMBROWSER_START + 77 ) +#define RID_STR_LISTINDEX ( RID_FORMBROWSER_START + 78 ) +#define RID_STR_STRINGITEMLIST ( RID_FORMBROWSER_START + 79 ) +#define RID_STR_DEFAULTVALUE ( RID_FORMBROWSER_START + 80 ) +#define RID_STR_FONT ( RID_FORMBROWSER_START + 81 ) +#define RID_STR_ALIGN ( RID_FORMBROWSER_START + 82 ) +#define RID_STR_ROWHEIGHT ( RID_FORMBROWSER_START + 83 ) +#define RID_STR_BACKGROUNDCOLOR ( RID_FORMBROWSER_START + 84 ) +#define RID_STR_FILLCOLOR ( RID_FORMBROWSER_START + 85 ) +#define RID_STR_LINECOLOR ( RID_FORMBROWSER_START + 86 ) +#define RID_STR_BORDER ( RID_FORMBROWSER_START + 87 ) +#define RID_STR_DROPDOWN ( RID_FORMBROWSER_START + 88 ) +#define RID_STR_AUTOCOMPLETE ( RID_FORMBROWSER_START + 89 ) +#define RID_STR_LINECOUNT ( RID_FORMBROWSER_START + 90 ) +#define RID_STR_MULTILINE ( RID_FORMBROWSER_START + 91 ) +#define RID_STR_MULTISELECTION ( RID_FORMBROWSER_START + 92 ) #define RID_STR_BUTTONTYPE ( RID_FORMBROWSER_START + 93 ) -#define RID_STR_HSCROLL ( RID_FORMBROWSER_START + 94 ) -#define RID_STR_VSCROLL ( RID_FORMBROWSER_START + 95 ) -#define RID_STR_SPIN ( RID_FORMBROWSER_START + 96 ) +#define RID_STR_HSCROLL ( RID_FORMBROWSER_START + 94 ) +#define RID_STR_VSCROLL ( RID_FORMBROWSER_START + 95 ) +#define RID_STR_SPIN ( RID_FORMBROWSER_START + 96 ) #define RID_STR_AUTOLINEBREAK ( RID_FORMBROWSER_START + 97 ) -#define RID_STR_TARGET_URL ( RID_FORMBROWSER_START + 98 ) -#define RID_STR_TARGET_FRAME ( RID_FORMBROWSER_START + 99 ) -#define RID_STR_SUBMIT_ACTION ( RID_FORMBROWSER_START + 100 ) -#define RID_STR_SUBMIT_TARGET ( RID_FORMBROWSER_START + 101 ) -#define RID_STR_SUBMIT_METHOD ( RID_FORMBROWSER_START + 102 ) -#define RID_STR_SUBMIT_ENCODING ( RID_FORMBROWSER_START + 103 ) +#define RID_STR_TARGET_URL ( RID_FORMBROWSER_START + 98 ) +#define RID_STR_TARGET_FRAME ( RID_FORMBROWSER_START + 99 ) +#define RID_STR_SUBMIT_ACTION ( RID_FORMBROWSER_START + 100 ) +#define RID_STR_SUBMIT_TARGET ( RID_FORMBROWSER_START + 101 ) +#define RID_STR_SUBMIT_METHOD ( RID_FORMBROWSER_START + 102 ) +#define RID_STR_SUBMIT_ENCODING ( RID_FORMBROWSER_START + 103 ) #define RID_STR_DEFAULT_STATE ( RID_FORMBROWSER_START + 104 ) -#define RID_STR_DEFAULT_BUTTON ( RID_FORMBROWSER_START + 105 ) -#define RID_STR_IMAGE_URL ( RID_FORMBROWSER_START + 106 ) -#define RID_STR_DEFAULT_SELECT_SEQ ( RID_FORMBROWSER_START + 107 ) -#define RID_STR_ECHO_CHAR ( RID_FORMBROWSER_START + 108 ) -#define RID_STR_EMPTY_IS_NULL ( RID_FORMBROWSER_START + 109 ) -#define RID_STR_TRISTATE ( RID_FORMBROWSER_START + 110 ) -#define RID_STR_MASTERFIELDS ( RID_FORMBROWSER_START + 111 ) -#define RID_STR_SLAVEFIELDS ( RID_FORMBROWSER_START + 112 ) -#define RID_STR_NAVIGATION ( RID_FORMBROWSER_START + 113 ) -#define RID_STR_RECORDMARKER ( RID_FORMBROWSER_START + 114 ) -#define RID_STR_FILTERPROPOSAL ( RID_FORMBROWSER_START + 115 ) -#define RID_STR_TAG ( RID_FORMBROWSER_START + 116 ) -#define RID_STR_HELPTEXT ( RID_FORMBROWSER_START + 117 ) -#define RID_STR_HELPURL ( RID_FORMBROWSER_START + 118 ) +#define RID_STR_DEFAULT_BUTTON ( RID_FORMBROWSER_START + 105 ) +#define RID_STR_IMAGE_URL ( RID_FORMBROWSER_START + 106 ) +#define RID_STR_DEFAULT_SELECT_SEQ ( RID_FORMBROWSER_START + 107 ) +#define RID_STR_ECHO_CHAR ( RID_FORMBROWSER_START + 108 ) +#define RID_STR_EMPTY_IS_NULL ( RID_FORMBROWSER_START + 109 ) +#define RID_STR_TRISTATE ( RID_FORMBROWSER_START + 110 ) +#define RID_STR_MASTERFIELDS ( RID_FORMBROWSER_START + 111 ) +#define RID_STR_SLAVEFIELDS ( RID_FORMBROWSER_START + 112 ) +#define RID_STR_NAVIGATION ( RID_FORMBROWSER_START + 113 ) +#define RID_STR_RECORDMARKER ( RID_FORMBROWSER_START + 114 ) +#define RID_STR_FILTERPROPOSAL ( RID_FORMBROWSER_START + 115 ) +#define RID_STR_TAG ( RID_FORMBROWSER_START + 116 ) +#define RID_STR_HELPTEXT ( RID_FORMBROWSER_START + 117 ) +#define RID_STR_HELPURL ( RID_FORMBROWSER_START + 118 ) #define RID_STR_INPUT_REQUIRED ( RID_FORMBROWSER_START + 119 ) #define RID_STR_UNCHECKEDREFVALUE ( RID_FORMBROWSER_START + 120 ) -#define RID_STR_CURSOR_TYPE ( RID_FORMBROWSER_START + 121 ) +#define RID_STR_CURSOR_TYPE ( RID_FORMBROWSER_START + 121 ) #define RID_STR_ENABLE_VISIBLE ( RID_FORMBROWSER_START + 122 ) #define RID_STR_WHEEL_BEHAVIOR ( RID_FORMBROWSER_START + 123 ) #define RID_STR_GROUP_NAME ( RID_FORMBROWSER_START + 124 ) @@ -157,66 +157,66 @@ // FREE // FREE // FREE -#define RID_STR_ENUM_NAVIGATION ( RID_FORMBROWSER_START + 131 ) -#define RID_STR_EVT_APPROVEACTIONPERFORMED ( RID_FORMBROWSER_START + 132 ) -#define RID_STR_EVT_ACTIONPERFORMED ( RID_FORMBROWSER_START + 133 ) -#define RID_STR_EVT_CHANGED ( RID_FORMBROWSER_START + 134 ) -#define RID_STR_EVT_TEXTCHANGED ( RID_FORMBROWSER_START + 135 ) -#define RID_STR_EVT_ITEMSTATECHANGED ( RID_FORMBROWSER_START + 136 ) -#define RID_STR_EVT_FOCUSGAINED ( RID_FORMBROWSER_START + 137 ) -#define RID_STR_EVT_FOCUSLOST ( RID_FORMBROWSER_START + 138 ) -#define RID_STR_EVT_KEYTYPED ( RID_FORMBROWSER_START + 139 ) -#define RID_STR_EVT_KEYUP ( RID_FORMBROWSER_START + 140 ) -#define RID_STR_EVT_MOUSEENTERED ( RID_FORMBROWSER_START + 141 ) -#define RID_STR_EVT_MOUSEDRAGGED ( RID_FORMBROWSER_START + 142 ) -#define RID_STR_EVT_MOUSEMOVED ( RID_FORMBROWSER_START + 143 ) -#define RID_STR_EVT_MOUSEPRESSED ( RID_FORMBROWSER_START + 144 ) -#define RID_STR_EVT_MOUSERELEASED ( RID_FORMBROWSER_START + 145 ) -#define RID_STR_EVT_MOUSEEXITED ( RID_FORMBROWSER_START + 146 ) -#define RID_STR_EVT_APPROVERESETTED ( RID_FORMBROWSER_START + 147 ) -#define RID_STR_EVT_RESETTED ( RID_FORMBROWSER_START + 148 ) -#define RID_STR_EVT_SUBMITTED ( RID_FORMBROWSER_START + 149 ) -#define RID_STR_EVT_BEFOREUPDATE ( RID_FORMBROWSER_START + 150 ) -#define RID_STR_EVT_AFTERUPDATE ( RID_FORMBROWSER_START + 151 ) -#define RID_STR_EVT_LOADED ( RID_FORMBROWSER_START + 152 ) -#define RID_STR_EVT_RELOADING ( RID_FORMBROWSER_START + 153 ) -#define RID_STR_EVT_RELOADED ( RID_FORMBROWSER_START + 154 ) -#define RID_STR_EVT_UNLOADING ( RID_FORMBROWSER_START + 155 ) -#define RID_STR_EVT_UNLOADED ( RID_FORMBROWSER_START + 156 ) -#define RID_STR_EVT_CONFIRMDELETE ( RID_FORMBROWSER_START + 157 ) -#define RID_STR_EVT_APPROVEROWCHANGE ( RID_FORMBROWSER_START + 158 ) -#define RID_STR_EVT_ROWCHANGE ( RID_FORMBROWSER_START + 159 ) -#define RID_STR_EVT_POSITIONING ( RID_FORMBROWSER_START + 160 ) -#define RID_STR_EVT_POSITIONED ( RID_FORMBROWSER_START + 161 ) -#define RID_STR_EVT_APPROVEPARAMETER ( RID_FORMBROWSER_START + 162 ) -#define RID_STR_EVT_ERROROCCURED ( RID_FORMBROWSER_START + 163 ) -#define RID_STR_EVENTS ( RID_FORMBROWSER_START + 164 ) -#define RID_STR_ESCAPE_PROCESSING ( RID_FORMBROWSER_START + 165 ) +#define RID_STR_ENUM_NAVIGATION ( RID_FORMBROWSER_START + 131 ) +#define RID_STR_EVT_APPROVEACTIONPERFORMED ( RID_FORMBROWSER_START + 132 ) +#define RID_STR_EVT_ACTIONPERFORMED ( RID_FORMBROWSER_START + 133 ) +#define RID_STR_EVT_CHANGED ( RID_FORMBROWSER_START + 134 ) +#define RID_STR_EVT_TEXTCHANGED ( RID_FORMBROWSER_START + 135 ) +#define RID_STR_EVT_ITEMSTATECHANGED ( RID_FORMBROWSER_START + 136 ) +#define RID_STR_EVT_FOCUSGAINED ( RID_FORMBROWSER_START + 137 ) +#define RID_STR_EVT_FOCUSLOST ( RID_FORMBROWSER_START + 138 ) +#define RID_STR_EVT_KEYTYPED ( RID_FORMBROWSER_START + 139 ) +#define RID_STR_EVT_KEYUP ( RID_FORMBROWSER_START + 140 ) +#define RID_STR_EVT_MOUSEENTERED ( RID_FORMBROWSER_START + 141 ) +#define RID_STR_EVT_MOUSEDRAGGED ( RID_FORMBROWSER_START + 142 ) +#define RID_STR_EVT_MOUSEMOVED ( RID_FORMBROWSER_START + 143 ) +#define RID_STR_EVT_MOUSEPRESSED ( RID_FORMBROWSER_START + 144 ) +#define RID_STR_EVT_MOUSERELEASED ( RID_FORMBROWSER_START + 145 ) +#define RID_STR_EVT_MOUSEEXITED ( RID_FORMBROWSER_START + 146 ) +#define RID_STR_EVT_APPROVERESETTED ( RID_FORMBROWSER_START + 147 ) +#define RID_STR_EVT_RESETTED ( RID_FORMBROWSER_START + 148 ) +#define RID_STR_EVT_SUBMITTED ( RID_FORMBROWSER_START + 149 ) +#define RID_STR_EVT_BEFOREUPDATE ( RID_FORMBROWSER_START + 150 ) +#define RID_STR_EVT_AFTERUPDATE ( RID_FORMBROWSER_START + 151 ) +#define RID_STR_EVT_LOADED ( RID_FORMBROWSER_START + 152 ) +#define RID_STR_EVT_RELOADING ( RID_FORMBROWSER_START + 153 ) +#define RID_STR_EVT_RELOADED ( RID_FORMBROWSER_START + 154 ) +#define RID_STR_EVT_UNLOADING ( RID_FORMBROWSER_START + 155 ) +#define RID_STR_EVT_UNLOADED ( RID_FORMBROWSER_START + 156 ) +#define RID_STR_EVT_CONFIRMDELETE ( RID_FORMBROWSER_START + 157 ) +#define RID_STR_EVT_APPROVEROWCHANGE ( RID_FORMBROWSER_START + 158 ) +#define RID_STR_EVT_ROWCHANGE ( RID_FORMBROWSER_START + 159 ) +#define RID_STR_EVT_POSITIONING ( RID_FORMBROWSER_START + 160 ) +#define RID_STR_EVT_POSITIONED ( RID_FORMBROWSER_START + 161 ) +#define RID_STR_EVT_APPROVEPARAMETER ( RID_FORMBROWSER_START + 162 ) +#define RID_STR_EVT_ERROROCCURED ( RID_FORMBROWSER_START + 163 ) +#define RID_STR_EVENTS ( RID_FORMBROWSER_START + 164 ) +#define RID_STR_ESCAPE_PROCESSING ( RID_FORMBROWSER_START + 165 ) // FREE -#define RID_STR_POSITIONX ( RID_FORMBROWSER_START + 167 ) -#define RID_STR_POSITIONY ( RID_FORMBROWSER_START + 168 ) -#define RID_STR_TITLE ( RID_FORMBROWSER_START + 169 ) -#define RID_STR_STEP ( RID_FORMBROWSER_START + 170 ) -#define RID_STR_PROGRESSVALUE ( RID_FORMBROWSER_START + 171 ) -#define RID_STR_PROGRESSVALUE_MIN ( RID_FORMBROWSER_START + 172 ) -#define RID_STR_PROGRESSVALUE_MAX ( RID_FORMBROWSER_START + 173 ) -#define RID_STR_SCROLLVALUE ( RID_FORMBROWSER_START + 174 ) -#define RID_STR_SCROLLVALUE_MAX ( RID_FORMBROWSER_START + 175 ) -#define RID_STR_LINEINCREMENT ( RID_FORMBROWSER_START + 176 ) -#define RID_STR_BLOCKINCREMENT ( RID_FORMBROWSER_START + 177 ) -#define RID_STR_VISIBLESIZE ( RID_FORMBROWSER_START + 178 ) -#define RID_STR_ORIENTATION ( RID_FORMBROWSER_START + 179 ) +#define RID_STR_POSITIONX ( RID_FORMBROWSER_START + 167 ) +#define RID_STR_POSITIONY ( RID_FORMBROWSER_START + 168 ) +#define RID_STR_TITLE ( RID_FORMBROWSER_START + 169 ) +#define RID_STR_STEP ( RID_FORMBROWSER_START + 170 ) +#define RID_STR_PROGRESSVALUE ( RID_FORMBROWSER_START + 171 ) +#define RID_STR_PROGRESSVALUE_MIN ( RID_FORMBROWSER_START + 172 ) +#define RID_STR_PROGRESSVALUE_MAX ( RID_FORMBROWSER_START + 173 ) +#define RID_STR_SCROLLVALUE ( RID_FORMBROWSER_START + 174 ) +#define RID_STR_SCROLLVALUE_MAX ( RID_FORMBROWSER_START + 175 ) +#define RID_STR_LINEINCREMENT ( RID_FORMBROWSER_START + 176 ) +#define RID_STR_BLOCKINCREMENT ( RID_FORMBROWSER_START + 177 ) +#define RID_STR_VISIBLESIZE ( RID_FORMBROWSER_START + 178 ) +#define RID_STR_ORIENTATION ( RID_FORMBROWSER_START + 179 ) // FREE #define RID_STR_VERTICAL_ALIGN ( RID_FORMBROWSER_START + 181 ) -#define RID_STR_EVT_ADJUSTMENTVALUECHANGED ( RID_FORMBROWSER_START + 182 ) -#define RID_STR_DATE ( RID_FORMBROWSER_START + 183 ) -#define RID_STR_STATE ( RID_FORMBROWSER_START + 184 ) -#define RID_STR_TIME ( RID_FORMBROWSER_START + 185 ) -#define RID_STR_SCALEIMAGE ( RID_FORMBROWSER_START + 186 ) -#define RID_STR_PUSHBUTTONTYPE ( RID_FORMBROWSER_START + 187 ) -#define RID_STR_ENUM_PUSHBUTTONTYPE ( RID_FORMBROWSER_START + 188 ) -#define RID_STR_UNABLETOCONNECT ( RID_FORMBROWSER_START + 189 ) -#define RID_STR_TEXT ( RID_FORMBROWSER_START + 190 ) +#define RID_STR_EVT_ADJUSTMENTVALUECHANGED ( RID_FORMBROWSER_START + 182 ) +#define RID_STR_DATE ( RID_FORMBROWSER_START + 183 ) +#define RID_STR_STATE ( RID_FORMBROWSER_START + 184 ) +#define RID_STR_TIME ( RID_FORMBROWSER_START + 185 ) +#define RID_STR_SCALEIMAGE ( RID_FORMBROWSER_START + 186 ) +#define RID_STR_PUSHBUTTONTYPE ( RID_FORMBROWSER_START + 187 ) +#define RID_STR_ENUM_PUSHBUTTONTYPE ( RID_FORMBROWSER_START + 188 ) +#define RID_STR_UNABLETOCONNECT ( RID_FORMBROWSER_START + 189 ) +#define RID_STR_TEXT ( RID_FORMBROWSER_START + 190 ) #define RID_STR_BOUND_CELL ( RID_FORMBROWSER_START + 191 ) #define RID_STR_LIST_CELL_RANGE ( RID_FORMBROWSER_START + 192 ) #define RID_STR_CELL_EXCHANGE_TYPE ( RID_FORMBROWSER_START + 193 ) @@ -270,14 +270,14 @@ #define RID_STR_LIST_BINDING ( RID_FORMBROWSER_START + 241 ) #define RID_STR_BINDING_UI_NAME ( RID_FORMBROWSER_START + 242 ) #define RID_STR_BINDING_NAME RID_STR_BINDING_UI_NAME -#define RID_STR_DECORATION ( RID_FORMBROWSER_START + 243 ) -#define RID_STR_SELECTION_TYPE ( RID_FORMBROWSER_START + 244 ) -#define RID_STR_ROOT_DISPLAYED ( RID_FORMBROWSER_START + 245 ) -#define RID_STR_SHOWS_HANDLES ( RID_FORMBROWSER_START + 246 ) -#define RID_STR_SHOWS_ROOT_HANDLES ( RID_FORMBROWSER_START + 247 ) -#define RID_STR_EDITABLE ( RID_FORMBROWSER_START + 248 ) +#define RID_STR_DECORATION ( RID_FORMBROWSER_START + 243 ) +#define RID_STR_SELECTION_TYPE ( RID_FORMBROWSER_START + 244 ) +#define RID_STR_ROOT_DISPLAYED ( RID_FORMBROWSER_START + 245 ) +#define RID_STR_SHOWS_HANDLES ( RID_FORMBROWSER_START + 246 ) +#define RID_STR_SHOWS_ROOT_HANDLES ( RID_FORMBROWSER_START + 247 ) +#define RID_STR_EDITABLE ( RID_FORMBROWSER_START + 248 ) #define RID_STR_INVOKES_STOP_NOT_EDITING ( RID_FORMBROWSER_START + 249 ) -#define RID_STR_NOLABEL ( RID_FORMBROWSER_START + 250 ) +#define RID_STR_NOLABEL ( RID_FORMBROWSER_START + 250 ) #define RID_STR_FONTSTYLE_REGULAR ( RID_FORMBROWSER_START + 251 ) #define RID_STR_FONTSTYLE_BOLD_ITALIC ( RID_FORMBROWSER_START + 252 ) #define RID_STR_FONTSTYLE_ITALIC ( RID_FORMBROWSER_START + 253 ) @@ -293,7 +293,7 @@ // ----------------------------------------------------------------------- // - dialogs -#define RID_DLG_SELECTLABELCONTROL ( RID_PROPCONTROLLER_START + 0 ) +#define RID_DLG_SELECTLABELCONTROL ( RID_PROPCONTROLLER_START + 0 ) #define RID_DLG_TABORDER ( RID_PROPCONTROLLER_START + 1 ) #define RID_DLG_FORMLINKS ( RID_PROPCONTROLLER_START + 2 ) #define RID_DLG_SELECTION ( RID_PROPCONTROLLER_START + 3 ) @@ -302,12 +302,12 @@ // ----------------------------------------------------------------------- // - tab dialogs -#define RID_TABDLG_FONTDIALOG ( RID_PROPCONTROLLER_START + 0 ) +#define RID_TABDLG_FONTDIALOG ( RID_PROPCONTROLLER_START + 0 ) // ----------------------------------------------------------------------- // - ImageLists -#define RID_IL_FORMEXPLORER ( RID_PROPCONTROLLER_START + 0 ) +#define RID_IL_FORMEXPLORER ( RID_PROPCONTROLLER_START + 0 ) #define RID_IL_FORMEXPLORER_HC ( RID_PROPCONTROLLER_START + 1 ) // ----------------------------------------------------------------------- @@ -355,32 +355,32 @@ // we do not duplicate images. Instead we do some hard coding for the image ids -#define RID_SVXIMG_CONTROL 10144 -#define RID_SVXIMG_BUTTON 10594 -#define RID_SVXIMG_RADIOBUTTON 10595 -#define RID_SVXIMG_CHECKBOX 10596 -#define RID_SVXIMG_FIXEDTEXT 10597 -#define RID_SVXIMG_GROUPBOX 10598 -#define RID_SVXIMG_EDIT 10599 -#define RID_SVXIMG_LISTBOX 10600 -#define RID_SVXIMG_COMBOBOX 10601 -#define RID_SVXIMG_URLBUTTON 10602 -#define RID_SVXIMG_GRID 10603 -#define RID_SVXIMG_IMAGEBUTTON 10604 -#define RID_SVXIMG_FILECONTROL 10605 -#define RID_SVXIMG_DATEFIELD 10704 -#define RID_SVXIMG_TIMEFIELD 10705 -#define RID_SVXIMG_NUMERICFIELD 10706 -#define RID_SVXIMG_CURRENCYFIELD 10707 -#define RID_SVXIMG_PATTERNFIELD 10708 -#define RID_SVXIMG_IMAGECONTROL 10710 -#define RID_SVXIMG_HIDDEN 18022 +#define RID_SVXIMG_CONTROL 10144 +#define RID_SVXIMG_BUTTON 10594 +#define RID_SVXIMG_RADIOBUTTON 10595 +#define RID_SVXIMG_CHECKBOX 10596 +#define RID_SVXIMG_FIXEDTEXT 10597 +#define RID_SVXIMG_GROUPBOX 10598 +#define RID_SVXIMG_EDIT 10599 +#define RID_SVXIMG_LISTBOX 10600 +#define RID_SVXIMG_COMBOBOX 10601 +#define RID_SVXIMG_URLBUTTON 10602 +#define RID_SVXIMG_GRID 10603 +#define RID_SVXIMG_IMAGEBUTTON 10604 +#define RID_SVXIMG_FILECONTROL 10605 +#define RID_SVXIMG_DATEFIELD 10704 +#define RID_SVXIMG_TIMEFIELD 10705 +#define RID_SVXIMG_NUMERICFIELD 10706 +#define RID_SVXIMG_CURRENCYFIELD 10707 +#define RID_SVXIMG_PATTERNFIELD 10708 +#define RID_SVXIMG_IMAGECONTROL 10710 +#define RID_SVXIMG_HIDDEN 18022 #define RID_SVXIMG_FORMATTEDFIELD 10728 -#define RID_SVXIMG_FILTER 10715 -#define RID_SVXIMG_FORMS 18013 -#define RID_SVXIMG_FORM 10593 -#define RID_SVXIMG_COLLAPSEDNODE 18002 -#define RID_SVXIMG_EXPANDEDNODE 18003 +#define RID_SVXIMG_FILTER 10715 +#define RID_SVXIMG_FORMS 18013 +#define RID_SVXIMG_FORM 10593 +#define RID_SVXIMG_COLLAPSEDNODE 18002 +#define RID_SVXIMG_EXPANDEDNODE 18003 #define RID_SVXIMG_SCROLLBAR 10768 #define RID_SVXIMG_SPINBUTTON 10769 #define RID_SVXIMG_NAVIGATIONBAR 10607 diff --git a/extensions/source/propctrlr/formstrings.cxx b/extensions/source/propctrlr/formstrings.cxx index 9d04554cb554..45aefb4b04bb 100644 --- a/extensions/source/propctrlr/formstrings.cxx +++ b/extensions/source/propctrlr/formstrings.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/propctrlr/formstrings.hxx b/extensions/source/propctrlr/formstrings.hxx index 19bffe32e30c..0910105dabc3 100644 --- a/extensions/source/propctrlr/formstrings.hxx +++ b/extensions/source/propctrlr/formstrings.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -36,158 +36,158 @@ namespace pcr { //............................................................................ - PCR_CONSTASCII_STRING( PROPERTY_DEFAULTCONTROL, "DefaultControl" ); - PCR_CONSTASCII_STRING( PROPERTY_INTROSPECTEDOBJECT, "IntrospectedObject" ); - PCR_CONSTASCII_STRING( PROPERTY_CURRENTPAGE, "CurrentPage" ); + PCR_CONSTASCII_STRING( PROPERTY_DEFAULTCONTROL, "DefaultControl" ); + PCR_CONSTASCII_STRING( PROPERTY_INTROSPECTEDOBJECT, "IntrospectedObject" ); + PCR_CONSTASCII_STRING( PROPERTY_CURRENTPAGE, "CurrentPage" ); PCR_CONSTASCII_STRING( PROPERTY_CONTROLCONTEXT, "ControlContext" ); // properties - PCR_CONSTASCII_STRING( PROPERTY_CLASSID, "ClassId" ); - PCR_CONSTASCII_STRING( PROPERTY_CONTROLLABEL, "LabelControl"); - PCR_CONSTASCII_STRING( PROPERTY_LABEL, "Label"); - PCR_CONSTASCII_STRING( PROPERTY_TABINDEX, "TabIndex"); + PCR_CONSTASCII_STRING( PROPERTY_CLASSID, "ClassId" ); + PCR_CONSTASCII_STRING( PROPERTY_CONTROLLABEL, "LabelControl"); + PCR_CONSTASCII_STRING( PROPERTY_LABEL, "Label"); + PCR_CONSTASCII_STRING( PROPERTY_TABINDEX, "TabIndex"); PCR_CONSTASCII_STRING( PROPERTY_WHEEL_BEHAVIOR, "MouseWheelBehavior"); - PCR_CONSTASCII_STRING( PROPERTY_TAG, "Tag"); - PCR_CONSTASCII_STRING( PROPERTY_NAME, "Name"); + PCR_CONSTASCII_STRING( PROPERTY_TAG, "Tag"); + PCR_CONSTASCII_STRING( PROPERTY_NAME, "Name"); PCR_CONSTASCII_STRING( PROPERTY_GROUP_NAME, "GroupName"); - PCR_CONSTASCII_STRING( PROPERTY_VALUE, "Value"); - PCR_CONSTASCII_STRING( PROPERTY_TEXT, "Text"); - PCR_CONSTASCII_STRING( PROPERTY_NAVIGATION, "NavigationBarMode"); - PCR_CONSTASCII_STRING( PROPERTY_CYCLE, "Cycle"); - PCR_CONSTASCII_STRING( PROPERTY_CONTROLSOURCE, "DataField"); + PCR_CONSTASCII_STRING( PROPERTY_VALUE, "Value"); + PCR_CONSTASCII_STRING( PROPERTY_TEXT, "Text"); + PCR_CONSTASCII_STRING( PROPERTY_NAVIGATION, "NavigationBarMode"); + PCR_CONSTASCII_STRING( PROPERTY_CYCLE, "Cycle"); + PCR_CONSTASCII_STRING( PROPERTY_CONTROLSOURCE, "DataField"); PCR_CONSTASCII_STRING( PROPERTY_INPUT_REQUIRED, "InputRequired"); - PCR_CONSTASCII_STRING( PROPERTY_ENABLED, "Enabled"); + PCR_CONSTASCII_STRING( PROPERTY_ENABLED, "Enabled"); PCR_CONSTASCII_STRING( PROPERTY_ENABLE_VISIBLE, "EnableVisible" ); - PCR_CONSTASCII_STRING( PROPERTY_READONLY, "ReadOnly"); - PCR_CONSTASCII_STRING( PROPERTY_ISREADONLY, "IsReadOnly"); - PCR_CONSTASCII_STRING( PROPERTY_FILTER, "Filter"); - PCR_CONSTASCII_STRING( PROPERTY_WIDTH, "Width"); - PCR_CONSTASCII_STRING( PROPERTY_MULTILINE, "MultiLine"); - PCR_CONSTASCII_STRING( PROPERTY_WORDBREAK, "WordBreak"); - PCR_CONSTASCII_STRING( PROPERTY_TARGET_URL, "TargetURL"); - PCR_CONSTASCII_STRING( PROPERTY_TARGET_FRAME, "TargetFrame"); - PCR_CONSTASCII_STRING( PROPERTY_MAXTEXTLEN, "MaxTextLen"); - PCR_CONSTASCII_STRING( PROPERTY_EDITMASK, "EditMask"); - PCR_CONSTASCII_STRING( PROPERTY_SPIN, "Spin"); - PCR_CONSTASCII_STRING( PROPERTY_TRISTATE, "TriState"); - PCR_CONSTASCII_STRING( PROPERTY_HIDDEN_VALUE, "HiddenValue"); - PCR_CONSTASCII_STRING( PROPERTY_BUTTONTYPE, "ButtonType"); + PCR_CONSTASCII_STRING( PROPERTY_READONLY, "ReadOnly"); + PCR_CONSTASCII_STRING( PROPERTY_ISREADONLY, "IsReadOnly"); + PCR_CONSTASCII_STRING( PROPERTY_FILTER, "Filter"); + PCR_CONSTASCII_STRING( PROPERTY_WIDTH, "Width"); + PCR_CONSTASCII_STRING( PROPERTY_MULTILINE, "MultiLine"); + PCR_CONSTASCII_STRING( PROPERTY_WORDBREAK, "WordBreak"); + PCR_CONSTASCII_STRING( PROPERTY_TARGET_URL, "TargetURL"); + PCR_CONSTASCII_STRING( PROPERTY_TARGET_FRAME, "TargetFrame"); + PCR_CONSTASCII_STRING( PROPERTY_MAXTEXTLEN, "MaxTextLen"); + PCR_CONSTASCII_STRING( PROPERTY_EDITMASK, "EditMask"); + PCR_CONSTASCII_STRING( PROPERTY_SPIN, "Spin"); + PCR_CONSTASCII_STRING( PROPERTY_TRISTATE, "TriState"); + PCR_CONSTASCII_STRING( PROPERTY_HIDDEN_VALUE, "HiddenValue"); + PCR_CONSTASCII_STRING( PROPERTY_BUTTONTYPE, "ButtonType"); PCR_CONSTASCII_STRING( PROPERTY_XFORMS_BUTTONTYPE, "XFormsButtonType"); - PCR_CONSTASCII_STRING( PROPERTY_STRINGITEMLIST, "StringItemList"); - PCR_CONSTASCII_STRING( PROPERTY_DEFAULT_TEXT, "DefaultText"); - PCR_CONSTASCII_STRING( PROPERTY_DEFAULT_STATE, "DefaultState"); - PCR_CONSTASCII_STRING( PROPERTY_FORMATKEY, "FormatKey"); - PCR_CONSTASCII_STRING( PROPERTY_FORMATSSUPPLIER, "FormatsSupplier"); - PCR_CONSTASCII_STRING( PROPERTY_SUBMIT_ACTION, "SubmitAction"); - PCR_CONSTASCII_STRING( PROPERTY_SUBMIT_TARGET, "SubmitTarget"); - PCR_CONSTASCII_STRING( PROPERTY_SUBMIT_METHOD, "SubmitMethod"); - PCR_CONSTASCII_STRING( PROPERTY_SUBMIT_ENCODING, "SubmitEncoding"); - PCR_CONSTASCII_STRING( PROPERTY_IMAGE_URL, "ImageURL"); - PCR_CONSTASCII_STRING( PROPERTY_EMPTY_IS_NULL, "ConvertEmptyToNull"); - PCR_CONSTASCII_STRING( PROPERTY_LISTSOURCETYPE, "ListSourceType"); - PCR_CONSTASCII_STRING( PROPERTY_LISTSOURCE, "ListSource"); - PCR_CONSTASCII_STRING( PROPERTY_DEFAULT_SELECT_SEQ, "DefaultSelection"); - PCR_CONSTASCII_STRING( PROPERTY_MULTISELECTION, "MultiSelection"); - PCR_CONSTASCII_STRING( PROPERTY_ALIGN, "Align"); + PCR_CONSTASCII_STRING( PROPERTY_STRINGITEMLIST, "StringItemList"); + PCR_CONSTASCII_STRING( PROPERTY_DEFAULT_TEXT, "DefaultText"); + PCR_CONSTASCII_STRING( PROPERTY_DEFAULT_STATE, "DefaultState"); + PCR_CONSTASCII_STRING( PROPERTY_FORMATKEY, "FormatKey"); + PCR_CONSTASCII_STRING( PROPERTY_FORMATSSUPPLIER, "FormatsSupplier"); + PCR_CONSTASCII_STRING( PROPERTY_SUBMIT_ACTION, "SubmitAction"); + PCR_CONSTASCII_STRING( PROPERTY_SUBMIT_TARGET, "SubmitTarget"); + PCR_CONSTASCII_STRING( PROPERTY_SUBMIT_METHOD, "SubmitMethod"); + PCR_CONSTASCII_STRING( PROPERTY_SUBMIT_ENCODING, "SubmitEncoding"); + PCR_CONSTASCII_STRING( PROPERTY_IMAGE_URL, "ImageURL"); + PCR_CONSTASCII_STRING( PROPERTY_EMPTY_IS_NULL, "ConvertEmptyToNull"); + PCR_CONSTASCII_STRING( PROPERTY_LISTSOURCETYPE, "ListSourceType"); + PCR_CONSTASCII_STRING( PROPERTY_LISTSOURCE, "ListSource"); + PCR_CONSTASCII_STRING( PROPERTY_DEFAULT_SELECT_SEQ, "DefaultSelection"); + PCR_CONSTASCII_STRING( PROPERTY_MULTISELECTION, "MultiSelection"); + PCR_CONSTASCII_STRING( PROPERTY_ALIGN, "Align"); PCR_CONSTASCII_STRING( PROPERTY_VERTICAL_ALIGN, "VerticalAlign"); - PCR_CONSTASCII_STRING( PROPERTY_DEFAULT_DATE, "DefaultDate"); - PCR_CONSTASCII_STRING( PROPERTY_DEFAULT_TIME, "DefaultTime"); - PCR_CONSTASCII_STRING( PROPERTY_DEFAULT_VALUE, "DefaultValue"); - PCR_CONSTASCII_STRING( PROPERTY_DECIMAL_ACCURACY, "DecimalAccuracy"); - PCR_CONSTASCII_STRING( PROPERTY_REFVALUE, "RefValue"); + PCR_CONSTASCII_STRING( PROPERTY_DEFAULT_DATE, "DefaultDate"); + PCR_CONSTASCII_STRING( PROPERTY_DEFAULT_TIME, "DefaultTime"); + PCR_CONSTASCII_STRING( PROPERTY_DEFAULT_VALUE, "DefaultValue"); + PCR_CONSTASCII_STRING( PROPERTY_DECIMAL_ACCURACY, "DecimalAccuracy"); + PCR_CONSTASCII_STRING( PROPERTY_REFVALUE, "RefValue"); PCR_CONSTASCII_STRING( PROPERTY_UNCHECKEDREFVALUE, "SecondaryRefValue"); - PCR_CONSTASCII_STRING( PROPERTY_VALUEMIN, "ValueMin"); - PCR_CONSTASCII_STRING( PROPERTY_VALUEMAX, "ValueMax"); - PCR_CONSTASCII_STRING( PROPERTY_STRICTFORMAT, "StrictFormat"); - PCR_CONSTASCII_STRING( PROPERTY_ALLOWADDITIONS, "AllowInserts"); - PCR_CONSTASCII_STRING( PROPERTY_ALLOWEDITS, "AllowUpdates"); - PCR_CONSTASCII_STRING( PROPERTY_ALLOWDELETIONS, "AllowDeletes"); - PCR_CONSTASCII_STRING( PROPERTY_MASTERFIELDS, "MasterFields"); - PCR_CONSTASCII_STRING( PROPERTY_LITERALMASK, "LiteralMask"); - PCR_CONSTASCII_STRING( PROPERTY_VALUESTEP, "ValueStep"); - PCR_CONSTASCII_STRING( PROPERTY_SHOWTHOUSANDSEP, "ShowThousandsSeparator"); - PCR_CONSTASCII_STRING( PROPERTY_CURRENCYSYMBOL, "CurrencySymbol"); - PCR_CONSTASCII_STRING( PROPERTY_DATEFORMAT, "DateFormat"); - PCR_CONSTASCII_STRING( PROPERTY_DATEMIN, "DateMin"); - PCR_CONSTASCII_STRING( PROPERTY_DATEMAX, "DateMax"); - PCR_CONSTASCII_STRING( PROPERTY_TIMEFORMAT, "TimeFormat"); - PCR_CONSTASCII_STRING( PROPERTY_TIMEMIN, "TimeMin"); - PCR_CONSTASCII_STRING( PROPERTY_TIMEMAX, "TimeMax"); - PCR_CONSTASCII_STRING( PROPERTY_LINECOUNT, "LineCount"); - PCR_CONSTASCII_STRING( PROPERTY_BOUNDCOLUMN, "BoundColumn"); - PCR_CONSTASCII_STRING( PROPERTY_BACKGROUNDCOLOR, "BackgroundColor"); - PCR_CONSTASCII_STRING( PROPERTY_FILLCOLOR, "FillColor"); - PCR_CONSTASCII_STRING( PROPERTY_TEXTCOLOR, "TextColor"); - PCR_CONSTASCII_STRING( PROPERTY_LINECOLOR, "LineColor"); - PCR_CONSTASCII_STRING( PROPERTY_BORDER, "Border"); - PCR_CONSTASCII_STRING( PROPERTY_ICONSIZE, "IconSize"); - PCR_CONSTASCII_STRING( PROPERTY_DROPDOWN, "Dropdown"); - PCR_CONSTASCII_STRING( PROPERTY_HSCROLL, "HScroll"); - PCR_CONSTASCII_STRING( PROPERTY_VSCROLL, "VScroll"); + PCR_CONSTASCII_STRING( PROPERTY_VALUEMIN, "ValueMin"); + PCR_CONSTASCII_STRING( PROPERTY_VALUEMAX, "ValueMax"); + PCR_CONSTASCII_STRING( PROPERTY_STRICTFORMAT, "StrictFormat"); + PCR_CONSTASCII_STRING( PROPERTY_ALLOWADDITIONS, "AllowInserts"); + PCR_CONSTASCII_STRING( PROPERTY_ALLOWEDITS, "AllowUpdates"); + PCR_CONSTASCII_STRING( PROPERTY_ALLOWDELETIONS, "AllowDeletes"); + PCR_CONSTASCII_STRING( PROPERTY_MASTERFIELDS, "MasterFields"); + PCR_CONSTASCII_STRING( PROPERTY_LITERALMASK, "LiteralMask"); + PCR_CONSTASCII_STRING( PROPERTY_VALUESTEP, "ValueStep"); + PCR_CONSTASCII_STRING( PROPERTY_SHOWTHOUSANDSEP, "ShowThousandsSeparator"); + PCR_CONSTASCII_STRING( PROPERTY_CURRENCYSYMBOL, "CurrencySymbol"); + PCR_CONSTASCII_STRING( PROPERTY_DATEFORMAT, "DateFormat"); + PCR_CONSTASCII_STRING( PROPERTY_DATEMIN, "DateMin"); + PCR_CONSTASCII_STRING( PROPERTY_DATEMAX, "DateMax"); + PCR_CONSTASCII_STRING( PROPERTY_TIMEFORMAT, "TimeFormat"); + PCR_CONSTASCII_STRING( PROPERTY_TIMEMIN, "TimeMin"); + PCR_CONSTASCII_STRING( PROPERTY_TIMEMAX, "TimeMax"); + PCR_CONSTASCII_STRING( PROPERTY_LINECOUNT, "LineCount"); + PCR_CONSTASCII_STRING( PROPERTY_BOUNDCOLUMN, "BoundColumn"); + PCR_CONSTASCII_STRING( PROPERTY_BACKGROUNDCOLOR, "BackgroundColor"); + PCR_CONSTASCII_STRING( PROPERTY_FILLCOLOR, "FillColor"); + PCR_CONSTASCII_STRING( PROPERTY_TEXTCOLOR, "TextColor"); + PCR_CONSTASCII_STRING( PROPERTY_LINECOLOR, "LineColor"); + PCR_CONSTASCII_STRING( PROPERTY_BORDER, "Border"); + PCR_CONSTASCII_STRING( PROPERTY_ICONSIZE, "IconSize"); + PCR_CONSTASCII_STRING( PROPERTY_DROPDOWN, "Dropdown"); + PCR_CONSTASCII_STRING( PROPERTY_HSCROLL, "HScroll"); + PCR_CONSTASCII_STRING( PROPERTY_VSCROLL, "VScroll"); PCR_CONSTASCII_STRING( PROPERTY_SHOW_SCROLLBARS, "ShowScrollbars"); - PCR_CONSTASCII_STRING( PROPERTY_TABSTOP, "Tabstop"); - PCR_CONSTASCII_STRING( PROPERTY_AUTOCOMPLETE, "Autocomplete"); - PCR_CONSTASCII_STRING( PROPERTY_PRINTABLE, "Printable"); - PCR_CONSTASCII_STRING( PROPERTY_ECHO_CHAR, "EchoChar"); - PCR_CONSTASCII_STRING( PROPERTY_ROWHEIGHT, "RowHeight"); - PCR_CONSTASCII_STRING( PROPERTY_HELPTEXT, "HelpText"); + PCR_CONSTASCII_STRING( PROPERTY_TABSTOP, "Tabstop"); + PCR_CONSTASCII_STRING( PROPERTY_AUTOCOMPLETE, "Autocomplete"); + PCR_CONSTASCII_STRING( PROPERTY_PRINTABLE, "Printable"); + PCR_CONSTASCII_STRING( PROPERTY_ECHO_CHAR, "EchoChar"); + PCR_CONSTASCII_STRING( PROPERTY_ROWHEIGHT, "RowHeight"); + PCR_CONSTASCII_STRING( PROPERTY_HELPTEXT, "HelpText"); PCR_CONSTASCII_STRING( PROPERTY_FONT, "FontDescriptor"); PCR_CONSTASCII_STRING( PROPERTY_FONT_NAME, "FontName"); - PCR_CONSTASCII_STRING( PROPERTY_FONT_STYLENAME, "FontStyleName"); - PCR_CONSTASCII_STRING( PROPERTY_FONT_FAMILY, "FontFamily"); - PCR_CONSTASCII_STRING( PROPERTY_FONT_CHARSET, "FontCharset"); - PCR_CONSTASCII_STRING( PROPERTY_FONT_HEIGHT, "FontHeight"); - PCR_CONSTASCII_STRING( PROPERTY_FONT_WEIGHT, "FontWeight"); - PCR_CONSTASCII_STRING( PROPERTY_FONT_SLANT, "FontSlant"); - PCR_CONSTASCII_STRING( PROPERTY_FONT_UNDERLINE, "FontUnderline"); - PCR_CONSTASCII_STRING( PROPERTY_FONT_STRIKEOUT, "FontStrikeout"); - PCR_CONSTASCII_STRING( PROPERTY_FONT_RELIEF, "FontRelief"); - PCR_CONSTASCII_STRING( PROPERTY_FONT_EMPHASIS_MARK, "FontEmphasisMark"); - PCR_CONSTASCII_STRING( PROPERTY_TEXTLINECOLOR, "TextLineColor"); - PCR_CONSTASCII_STRING( PROPERTY_HELPURL, "HelpURL"); - PCR_CONSTASCII_STRING( PROPERTY_RECORDMARKER, "HasRecordMarker"); - PCR_CONSTASCII_STRING( PROPERTY_EFFECTIVE_DEFAULT, "EffectiveDefault"); - PCR_CONSTASCII_STRING( PROPERTY_EFFECTIVE_MIN, "EffectiveMin"); - PCR_CONSTASCII_STRING( PROPERTY_EFFECTIVE_MAX, "EffectiveMax"); - PCR_CONSTASCII_STRING( PROPERTY_FILTERPROPOSAL, "UseFilterValueProposal"); - PCR_CONSTASCII_STRING( PROPERTY_CURRSYM_POSITION, "PrependCurrencySymbol"); - PCR_CONSTASCII_STRING( PROPERTY_COMMAND, "Command"); - PCR_CONSTASCII_STRING( PROPERTY_COMMANDTYPE, "CommandType"); - PCR_CONSTASCII_STRING( PROPERTY_INSERTONLY, "IgnoreResult"); - PCR_CONSTASCII_STRING( PROPERTY_ESCAPE_PROCESSING, "EscapeProcessing"); - PCR_CONSTASCII_STRING( PROPERTY_TITLE, "Title"); - PCR_CONSTASCII_STRING( PROPERTY_SORT, "Order"); - PCR_CONSTASCII_STRING( PROPERTY_DATASOURCE, "DataSourceName"); - PCR_CONSTASCII_STRING( PROPERTY_DETAILFIELDS, "DetailFields"); - PCR_CONSTASCII_STRING( PROPERTY_DEFAULTBUTTON, "DefaultButton"); - PCR_CONSTASCII_STRING( PROPERTY_LISTINDEX, "ListIndex"); - PCR_CONSTASCII_STRING( PROPERTY_HEIGHT, "Height"); - PCR_CONSTASCII_STRING( PROPERTY_HASNAVIGATION, "HasNavigationBar"); - PCR_CONSTASCII_STRING( PROPERTY_POSITIONX, "PositionX"); - PCR_CONSTASCII_STRING( PROPERTY_POSITIONY, "PositionY"); - PCR_CONSTASCII_STRING( PROPERTY_STEP, "Step"); - PCR_CONSTASCII_STRING( PROPERTY_WORDLINEMODE, "FontWordLineMode"); - PCR_CONSTASCII_STRING( PROPERTY_PROGRESSVALUE, "ProgressValue"); - PCR_CONSTASCII_STRING( PROPERTY_PROGRESSVALUE_MIN, "ProgressValueMin"); - PCR_CONSTASCII_STRING( PROPERTY_PROGRESSVALUE_MAX, "ProgressValueMax"); - PCR_CONSTASCII_STRING( PROPERTY_SCROLLVALUE, "ScrollValue"); - PCR_CONSTASCII_STRING( PROPERTY_DEFAULT_SCROLLVALUE, "DefaultScrollValue"); - PCR_CONSTASCII_STRING( PROPERTY_SCROLLVALUE_MIN, "ScrollValueMin"); - PCR_CONSTASCII_STRING( PROPERTY_SCROLLVALUE_MAX, "ScrollValueMax"); - PCR_CONSTASCII_STRING( PROPERTY_LINEINCREMENT, "LineIncrement"); - PCR_CONSTASCII_STRING( PROPERTY_BLOCKINCREMENT, "BlockIncrement"); - PCR_CONSTASCII_STRING( PROPERTY_VISIBLESIZE, "VisibleSize"); - PCR_CONSTASCII_STRING( PROPERTY_ORIENTATION, "Orientation"); + PCR_CONSTASCII_STRING( PROPERTY_FONT_STYLENAME, "FontStyleName"); + PCR_CONSTASCII_STRING( PROPERTY_FONT_FAMILY, "FontFamily"); + PCR_CONSTASCII_STRING( PROPERTY_FONT_CHARSET, "FontCharset"); + PCR_CONSTASCII_STRING( PROPERTY_FONT_HEIGHT, "FontHeight"); + PCR_CONSTASCII_STRING( PROPERTY_FONT_WEIGHT, "FontWeight"); + PCR_CONSTASCII_STRING( PROPERTY_FONT_SLANT, "FontSlant"); + PCR_CONSTASCII_STRING( PROPERTY_FONT_UNDERLINE, "FontUnderline"); + PCR_CONSTASCII_STRING( PROPERTY_FONT_STRIKEOUT, "FontStrikeout"); + PCR_CONSTASCII_STRING( PROPERTY_FONT_RELIEF, "FontRelief"); + PCR_CONSTASCII_STRING( PROPERTY_FONT_EMPHASIS_MARK, "FontEmphasisMark"); + PCR_CONSTASCII_STRING( PROPERTY_TEXTLINECOLOR, "TextLineColor"); + PCR_CONSTASCII_STRING( PROPERTY_HELPURL, "HelpURL"); + PCR_CONSTASCII_STRING( PROPERTY_RECORDMARKER, "HasRecordMarker"); + PCR_CONSTASCII_STRING( PROPERTY_EFFECTIVE_DEFAULT, "EffectiveDefault"); + PCR_CONSTASCII_STRING( PROPERTY_EFFECTIVE_MIN, "EffectiveMin"); + PCR_CONSTASCII_STRING( PROPERTY_EFFECTIVE_MAX, "EffectiveMax"); + PCR_CONSTASCII_STRING( PROPERTY_FILTERPROPOSAL, "UseFilterValueProposal"); + PCR_CONSTASCII_STRING( PROPERTY_CURRSYM_POSITION, "PrependCurrencySymbol"); + PCR_CONSTASCII_STRING( PROPERTY_COMMAND, "Command"); + PCR_CONSTASCII_STRING( PROPERTY_COMMANDTYPE, "CommandType"); + PCR_CONSTASCII_STRING( PROPERTY_INSERTONLY, "IgnoreResult"); + PCR_CONSTASCII_STRING( PROPERTY_ESCAPE_PROCESSING, "EscapeProcessing"); + PCR_CONSTASCII_STRING( PROPERTY_TITLE, "Title"); + PCR_CONSTASCII_STRING( PROPERTY_SORT, "Order"); + PCR_CONSTASCII_STRING( PROPERTY_DATASOURCE, "DataSourceName"); + PCR_CONSTASCII_STRING( PROPERTY_DETAILFIELDS, "DetailFields"); + PCR_CONSTASCII_STRING( PROPERTY_DEFAULTBUTTON, "DefaultButton"); + PCR_CONSTASCII_STRING( PROPERTY_LISTINDEX, "ListIndex"); + PCR_CONSTASCII_STRING( PROPERTY_HEIGHT, "Height"); + PCR_CONSTASCII_STRING( PROPERTY_HASNAVIGATION, "HasNavigationBar"); + PCR_CONSTASCII_STRING( PROPERTY_POSITIONX, "PositionX"); + PCR_CONSTASCII_STRING( PROPERTY_POSITIONY, "PositionY"); + PCR_CONSTASCII_STRING( PROPERTY_STEP, "Step"); + PCR_CONSTASCII_STRING( PROPERTY_WORDLINEMODE, "FontWordLineMode"); + PCR_CONSTASCII_STRING( PROPERTY_PROGRESSVALUE, "ProgressValue"); + PCR_CONSTASCII_STRING( PROPERTY_PROGRESSVALUE_MIN, "ProgressValueMin"); + PCR_CONSTASCII_STRING( PROPERTY_PROGRESSVALUE_MAX, "ProgressValueMax"); + PCR_CONSTASCII_STRING( PROPERTY_SCROLLVALUE, "ScrollValue"); + PCR_CONSTASCII_STRING( PROPERTY_DEFAULT_SCROLLVALUE, "DefaultScrollValue"); + PCR_CONSTASCII_STRING( PROPERTY_SCROLLVALUE_MIN, "ScrollValueMin"); + PCR_CONSTASCII_STRING( PROPERTY_SCROLLVALUE_MAX, "ScrollValueMax"); + PCR_CONSTASCII_STRING( PROPERTY_LINEINCREMENT, "LineIncrement"); + PCR_CONSTASCII_STRING( PROPERTY_BLOCKINCREMENT, "BlockIncrement"); + PCR_CONSTASCII_STRING( PROPERTY_VISIBLESIZE, "VisibleSize"); + PCR_CONSTASCII_STRING( PROPERTY_ORIENTATION, "Orientation"); PCR_CONSTASCII_STRING( PROPERTY_IMAGEPOSITION, "ImagePosition"); - PCR_CONSTASCII_STRING( PROPERTY_ACTIVE_CONNECTION, "ActiveConnection"); - PCR_CONSTASCII_STRING( PROPERTY_ACTIVECOMMAND, "ActiveCommand"); - PCR_CONSTASCII_STRING( PROPERTY_DATE, "Date"); - PCR_CONSTASCII_STRING( PROPERTY_STATE, "State"); - PCR_CONSTASCII_STRING( PROPERTY_TIME, "Time"); - PCR_CONSTASCII_STRING( PROPERTY_SCALEIMAGE, "ScaleImage"); + PCR_CONSTASCII_STRING( PROPERTY_ACTIVE_CONNECTION, "ActiveConnection"); + PCR_CONSTASCII_STRING( PROPERTY_ACTIVECOMMAND, "ActiveCommand"); + PCR_CONSTASCII_STRING( PROPERTY_DATE, "Date"); + PCR_CONSTASCII_STRING( PROPERTY_STATE, "State"); + PCR_CONSTASCII_STRING( PROPERTY_TIME, "Time"); + PCR_CONSTASCII_STRING( PROPERTY_SCALEIMAGE, "ScaleImage"); PCR_CONSTASCII_STRING( PROPERTY_SCALE_MODE, "ScaleMode"); - PCR_CONSTASCII_STRING( PROPERTY_PUSHBUTTONTYPE, "PushButtonType"); - PCR_CONSTASCII_STRING( PROPERTY_EFFECTIVE_VALUE, "EffectiveValue"); + PCR_CONSTASCII_STRING( PROPERTY_PUSHBUTTONTYPE, "PushButtonType"); + PCR_CONSTASCII_STRING( PROPERTY_EFFECTIVE_VALUE, "EffectiveValue"); PCR_CONSTASCII_STRING( PROPERTY_SELECTEDITEMS, "SelectedItems"); PCR_CONSTASCII_STRING( PROPERTY_REPEAT, "Repeat"); PCR_CONSTASCII_STRING( PROPERTY_REPEAT_DELAY, "RepeatDelay"); @@ -211,7 +211,7 @@ namespace pcr PCR_CONSTASCII_STRING( PROPERTY_SHOWS_ROOT_HANDLES, "ShowsRootHandles"); PCR_CONSTASCII_STRING( PROPERTY_EDITABLE, "Editable"); PCR_CONSTASCII_STRING( PROPERTY_INVOKES_STOP_NOT_EDITING, "InvokesStopNodeEditing"); - + PCR_CONSTASCII_STRING( PROPERTY_HARDLINEBREAKS, "HardLineBreaks"); PCR_CONSTASCII_STRING( PROPERTY_TOGGLE, "Toggle" ); @@ -220,9 +220,9 @@ namespace pcr PCR_CONSTASCII_STRING( PROPERTY_VISUALEFFECT, "VisualEffect" ); PCR_CONSTASCII_STRING( PROPERTY_BORDERCOLOR, "BorderColor" ); - PCR_CONSTASCII_STRING( PROPERTY_ADDRESS, "Address"); - PCR_CONSTASCII_STRING( PROPERTY_REFERENCE_SHEET, "ReferenceSheet"); - PCR_CONSTASCII_STRING( PROPERTY_UI_REPRESENTATION, "UserInterfaceRepresentation"); + PCR_CONSTASCII_STRING( PROPERTY_ADDRESS, "Address"); + PCR_CONSTASCII_STRING( PROPERTY_REFERENCE_SHEET, "ReferenceSheet"); + PCR_CONSTASCII_STRING( PROPERTY_UI_REPRESENTATION, "UserInterfaceRepresentation"); PCR_CONSTASCII_STRING( PROPERTY_XML_DATA_MODEL, "XMLDataModel" ); PCR_CONSTASCII_STRING( PROPERTY_BINDING_NAME, "BindingName" ); @@ -273,19 +273,19 @@ namespace pcr PCR_CONSTASCII_STRING( PROPERTY_MODEL, "Model" ); - PCR_CONSTASCII_STRING( PROPERTY_CELL_EXCHANGE_TYPE, "ExchangeSelectionIndex"); - PCR_CONSTASCII_STRING( PROPERTY_BOUND_CELL, "BoundCell"); - PCR_CONSTASCII_STRING( PROPERTY_LIST_CELL_RANGE, "CellRange"); + PCR_CONSTASCII_STRING( PROPERTY_CELL_EXCHANGE_TYPE, "ExchangeSelectionIndex"); + PCR_CONSTASCII_STRING( PROPERTY_BOUND_CELL, "BoundCell"); + PCR_CONSTASCII_STRING( PROPERTY_LIST_CELL_RANGE, "CellRange"); PCR_CONSTASCII_STRING( PROPERTY_AUTOLINEBREAK, "AutomaticLineBreak"); PCR_CONSTASCII_STRING( PROPERTY_TEXTTYPE, "TextType"); PCR_CONSTASCII_STRING( PROPERTY_RICHTEXT, "RichText"); PCR_CONSTASCII_STRING( PROPERTY_ROWSET, "RowSet"); // services - PCR_CONSTASCII_STRING( SERVICE_COMPONENT_GROUPBOX, "com.sun.star.form.component.GroupBox" ); - PCR_CONSTASCII_STRING( SERVICE_COMPONENT_FIXEDTEXT, "com.sun.star.form.component.FixedText" ); + PCR_CONSTASCII_STRING( SERVICE_COMPONENT_GROUPBOX, "com.sun.star.form.component.GroupBox" ); + PCR_CONSTASCII_STRING( SERVICE_COMPONENT_FIXEDTEXT, "com.sun.star.form.component.FixedText" ); PCR_CONSTASCII_STRING( SERVICE_COMPONENT_FORMATTEDFIELD,"com.sun.star.form.component.FormattedField" ); - PCR_CONSTASCII_STRING( SERVICE_DATABASE_CONTEXT, "com.sun.star.sdb.DatabaseContext" ); + PCR_CONSTASCII_STRING( SERVICE_DATABASE_CONTEXT, "com.sun.star.sdb.DatabaseContext" ); PCR_CONSTASCII_STRING( SERVICE_TEXT_DOCUMENT, "com.sun.star.text.TextDocument" ); PCR_CONSTASCII_STRING( SERVICE_WEB_DOCUMENT, "com.sun.star.text.WebDocument" ); diff --git a/extensions/source/propctrlr/genericpropertyhandler.cxx b/extensions/source/propctrlr/genericpropertyhandler.cxx index e86830db5624..51d11c86f1ec 100644 --- a/extensions/source/propctrlr/genericpropertyhandler.cxx +++ b/extensions/source/propctrlr/genericpropertyhandler.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -281,7 +281,7 @@ namespace pcr impl_dispatch_throw( sURL ); } - + //-------------------------------------------------------------------- void SAL_CALL UrlClickHandler::disposing( const EventObject& /*Source*/ ) throw (RuntimeException) { @@ -335,14 +335,14 @@ namespace pcr { return getImplementationName_static(); } - + //-------------------------------------------------------------------- ::sal_Bool SAL_CALL GenericPropertyHandler::supportsService( const ::rtl::OUString& ServiceName ) throw (RuntimeException) { StlSyntaxSequence< ::rtl::OUString > aAllServices( getSupportedServiceNames() ); return ::std::find( aAllServices.begin(), aAllServices.end(), ServiceName ) != aAllServices.end(); } - + //-------------------------------------------------------------------- Sequence< ::rtl::OUString > SAL_CALL GenericPropertyHandler::getSupportedServiceNames( ) throw (RuntimeException) { @@ -354,7 +354,7 @@ namespace pcr { return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.extensions.GenericPropertyHandler" ) ); } - + //-------------------------------------------------------------------- Sequence< ::rtl::OUString > SAL_CALL GenericPropertyHandler::getSupportedServiceNames_static( ) throw (RuntimeException) { @@ -362,7 +362,7 @@ namespace pcr aSupported[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.inspection.GenericPropertyHandler" ) ); return aSupported; } - + //-------------------------------------------------------------------- Reference< XInterface > SAL_CALL GenericPropertyHandler::Create( const Reference< XComponentContext >& _rxContext ) { @@ -717,7 +717,7 @@ namespace pcr // not disposeAndClear: the listeners are (virtually) listeners at our introspectee, not // at this handler instance } - + //-------------------------------------------------------------------- IMPLEMENT_FORWARD_XCOMPONENT( GenericPropertyHandler, GenericPropertyHandler_Base ); diff --git a/extensions/source/propctrlr/genericpropertyhandler.hxx b/extensions/source/propctrlr/genericpropertyhandler.hxx index 24beb828a0bf..4d5fc7a1e8ac 100644 --- a/extensions/source/propctrlr/genericpropertyhandler.hxx +++ b/extensions/source/propctrlr/genericpropertyhandler.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -86,7 +86,7 @@ namespace pcr PropertyMap m_aProperties; /// property change listeners ::cppu::OInterfaceContainerHelper m_aPropertyListeners; - ::std::map< ::com::sun::star::uno::Type, ::rtl::Reference< IPropertyEnumRepresentation >, TypeLess > + ::std::map< ::com::sun::star::uno::Type, ::rtl::Reference< IPropertyEnumRepresentation >, TypeLess > m_aEnumConverters; /// has ->m_aProperties been initialized? diff --git a/extensions/source/propctrlr/handlerhelper.cxx b/extensions/source/propctrlr/handlerhelper.cxx index fbdf4b18206e..9dcee3265d81 100644 --- a/extensions/source/propctrlr/handlerhelper.cxx +++ b/extensions/source/propctrlr/handlerhelper.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/propctrlr/handlerhelper.hxx b/extensions/source/propctrlr/handlerhelper.hxx index 9be5b6add529..1505997e8292 100644 --- a/extensions/source/propctrlr/handlerhelper.hxx +++ b/extensions/source/propctrlr/handlerhelper.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -99,7 +99,7 @@ namespace pcr @param _bSorted determines whether the list entries should be sorted - + @return the newly created control */ @@ -110,7 +110,7 @@ namespace pcr sal_Bool _bReadOnlyControl, sal_Bool _bSorted ); - + /** creates an <member scope="com::sun::star::inspection">PropertyControlType::ComboBox</member>-type control and fills it with initial values @@ -122,10 +122,10 @@ namespace pcr @param _bReadOnlyControl determines whether the control should be read-only - + @param _bSorted determines whether the list entries should be sorted - + @return the newly created control */ @@ -153,7 +153,7 @@ namespace pcr (<member scope="com::sun::star::inspection">XNumericControl::MaxValue</member>) @param _bReadOnlyControl determines whether the control should be read-only - + @return the newly created control */ @@ -165,7 +165,7 @@ namespace pcr const ::com::sun::star::beans::Optional< double >& _rMaxValue, sal_Bool _bReadOnlyControl ); - + /** marks the document passed in our UNO context as modified The method looks up a value called "ContextDocument" in the given UNO component context, diff --git a/extensions/source/propctrlr/inspectorhelpwindow.cxx b/extensions/source/propctrlr/inspectorhelpwindow.cxx index 6182efbb495a..2ed90d583b86 100644 --- a/extensions/source/propctrlr/inspectorhelpwindow.cxx +++ b/extensions/source/propctrlr/inspectorhelpwindow.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/propctrlr/inspectorhelpwindow.hxx b/extensions/source/propctrlr/inspectorhelpwindow.hxx index e5f9d3f72863..bae38265ab29 100644 --- a/extensions/source/propctrlr/inspectorhelpwindow.hxx +++ b/extensions/source/propctrlr/inspectorhelpwindow.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/propctrlr/inspectormodelbase.cxx b/extensions/source/propctrlr/inspectormodelbase.cxx index 751673af491b..3402d28a4077 100644 --- a/extensions/source/propctrlr/inspectormodelbase.cxx +++ b/extensions/source/propctrlr/inspectormodelbase.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -205,13 +205,13 @@ namespace pcr { return m_pProperties->convertFastPropertyValue( rConvertedValue, rOldValue, nHandle, rValue ); } - + //-------------------------------------------------------------------- void SAL_CALL ImplInspectorModel::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const Any& rValue ) throw (Exception) { m_pProperties->setFastPropertyValue( nHandle, rValue ); } - + //-------------------------------------------------------------------- void SAL_CALL ImplInspectorModel::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) const { @@ -223,13 +223,13 @@ namespace pcr { return m_pProperties->hasHelpSection(); } - + //-------------------------------------------------------------------- ::sal_Int32 SAL_CALL ImplInspectorModel::getMinHelpTextLines() throw (RuntimeException) { return m_pProperties->getMinHelpTextLines(); } - + //-------------------------------------------------------------------- ::sal_Int32 SAL_CALL ImplInspectorModel::getMaxHelpTextLines() throw (RuntimeException) { diff --git a/extensions/source/propctrlr/inspectormodelbase.hxx b/extensions/source/propctrlr/inspectormodelbase.hxx index 0ca2ded6e19c..3c79dfe2d7c2 100644 --- a/extensions/source/propctrlr/inspectormodelbase.hxx +++ b/extensions/source/propctrlr/inspectormodelbase.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/propctrlr/linedescriptor.hxx b/extensions/source/propctrlr/linedescriptor.hxx index e6db8b65c090..84d11e17f4a2 100644 --- a/extensions/source/propctrlr/linedescriptor.hxx +++ b/extensions/source/propctrlr/linedescriptor.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -43,12 +43,12 @@ namespace pcr //======================================================================== struct OLineDescriptor : public ::com::sun::star::inspection::LineDescriptor { - ::rtl::OUString sName; // the name of the property + ::rtl::OUString sName; // the name of the property ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XPropertyHandler > xPropertyHandler; // the handler for this property ::com::sun::star::uno::Any aValue; // the current value of the property - bool bUnknownValue : 1; // is the property value currently "unknown"? (PropertyState_AMBIGUOUS) + bool bUnknownValue : 1; // is the property value currently "unknown"? (PropertyState_AMBIGUOUS) bool bReadOnly : 1; OLineDescriptor() diff --git a/extensions/source/propctrlr/listselectiondlg.cxx b/extensions/source/propctrlr/listselectiondlg.cxx index 3bf379813739..9c8cfcd59aea 100644 --- a/extensions/source/propctrlr/listselectiondlg.cxx +++ b/extensions/source/propctrlr/listselectiondlg.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/propctrlr/listselectiondlg.hrc b/extensions/source/propctrlr/listselectiondlg.hrc index cfd85be0a1aa..6419f530311b 100644 --- a/extensions/source/propctrlr/listselectiondlg.hrc +++ b/extensions/source/propctrlr/listselectiondlg.hrc @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/propctrlr/listselectiondlg.hxx b/extensions/source/propctrlr/listselectiondlg.hxx index 740e29c7a5f7..feaf8c0fa0e4 100644 --- a/extensions/source/propctrlr/listselectiondlg.hxx +++ b/extensions/source/propctrlr/listselectiondlg.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/propctrlr/listselectiondlg.src b/extensions/source/propctrlr/listselectiondlg.src index 24a1d7f0a815..7b148e8a9908 100644 --- a/extensions/source/propctrlr/listselectiondlg.src +++ b/extensions/source/propctrlr/listselectiondlg.src @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/propctrlr/modulepcr.cxx b/extensions/source/propctrlr/modulepcr.cxx index 827ca1a648ba..06d89a385277 100644 --- a/extensions/source/propctrlr/modulepcr.cxx +++ b/extensions/source/propctrlr/modulepcr.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/propctrlr/modulepcr.hxx b/extensions/source/propctrlr/modulepcr.hxx index 8d18e6ea0169..458aff77b7bf 100644 --- a/extensions/source/propctrlr/modulepcr.hxx +++ b/extensions/source/propctrlr/modulepcr.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/propctrlr/newdatatype.cxx b/extensions/source/propctrlr/newdatatype.cxx index 44253137de0d..cf97f503caaf 100644 --- a/extensions/source/propctrlr/newdatatype.cxx +++ b/extensions/source/propctrlr/newdatatype.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/propctrlr/newdatatype.hrc b/extensions/source/propctrlr/newdatatype.hrc index 3dc8635b05f7..91f64128581a 100644 --- a/extensions/source/propctrlr/newdatatype.hrc +++ b/extensions/source/propctrlr/newdatatype.hrc @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/propctrlr/newdatatype.hxx b/extensions/source/propctrlr/newdatatype.hxx index e84f3ffe9ce7..e4fc0aec2549 100644 --- a/extensions/source/propctrlr/newdatatype.hxx +++ b/extensions/source/propctrlr/newdatatype.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/propctrlr/newdatatype.src b/extensions/source/propctrlr/newdatatype.src index 50fbad0be2f1..6cf39a322074 100644 --- a/extensions/source/propctrlr/newdatatype.src +++ b/extensions/source/propctrlr/newdatatype.src @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/propctrlr/objectinspectormodel.cxx b/extensions/source/propctrlr/objectinspectormodel.cxx index 7ed387cdf9ee..6c7a4f99149a 100644 --- a/extensions/source/propctrlr/objectinspectormodel.cxx +++ b/extensions/source/propctrlr/objectinspectormodel.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/propctrlr/pcrcommon.cxx b/extensions/source/propctrlr/pcrcommon.cxx index 55a9f8d4ae2b..b04ddba264d1 100644 --- a/extensions/source/propctrlr/pcrcommon.cxx +++ b/extensions/source/propctrlr/pcrcommon.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/propctrlr/pcrcommon.hxx b/extensions/source/propctrlr/pcrcommon.hxx index f6a601528160..f9a0fcda2489 100644 --- a/extensions/source/propctrlr/pcrcommon.hxx +++ b/extensions/source/propctrlr/pcrcommon.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -29,7 +29,7 @@ #ifndef _EXTENSIONS_PROPCTRLR_PCRCOMMON_HXX_ #define _EXTENSIONS_PROPCTRLR_PCRCOMMON_HXX_ -#define EDITOR_LIST_APPEND (sal_uInt16)-1 +#define EDITOR_LIST_APPEND (sal_uInt16)-1 #define EDITOR_LIST_REPLACE_EXISTING (sal_uInt16)-1 /** === begin UNO includes === **/ diff --git a/extensions/source/propctrlr/pcrcommontypes.hxx b/extensions/source/propctrlr/pcrcommontypes.hxx index 434f395af4e5..0c20bf3cad01 100644 --- a/extensions/source/propctrlr/pcrcommontypes.hxx +++ b/extensions/source/propctrlr/pcrcommontypes.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/propctrlr/pcrcomponentcontext.cxx b/extensions/source/propctrlr/pcrcomponentcontext.cxx index 70de26669887..afd60eff5baa 100644 --- a/extensions/source/propctrlr/pcrcomponentcontext.cxx +++ b/extensions/source/propctrlr/pcrcomponentcontext.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/propctrlr/pcrcomponentcontext.hxx b/extensions/source/propctrlr/pcrcomponentcontext.hxx index 41ec8c494196..bfd52cd32741 100644 --- a/extensions/source/propctrlr/pcrcomponentcontext.hxx +++ b/extensions/source/propctrlr/pcrcomponentcontext.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/propctrlr/pcrmiscres.src b/extensions/source/propctrlr/pcrmiscres.src index d547b52ed5ea..f898cf439983 100644 --- a/extensions/source/propctrlr/pcrmiscres.src +++ b/extensions/source/propctrlr/pcrmiscres.src @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/propctrlr/pcrservices.cxx b/extensions/source/propctrlr/pcrservices.cxx index 034aee9881ef..da6bbef37276 100644 --- a/extensions/source/propctrlr/pcrservices.cxx +++ b/extensions/source/propctrlr/pcrservices.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -94,8 +94,8 @@ extern "C" void SAL_CALL pcr_initializeModule() extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( - const sal_Char **ppEnvTypeName, - uno_Environment ** /*ppEnv*/ + const sal_Char **ppEnvTypeName, + uno_Environment ** /*ppEnv*/ ) { pcr_initializeModule(); @@ -108,8 +108,8 @@ extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( void* pRegistryKey ) { - if (pRegistryKey) - try + if (pRegistryKey) + try { return ::pcr::PcrModule::getInstance().writeComponentInfos( static_cast<XMultiServiceFactory*>(pServiceManager), diff --git a/extensions/source/propctrlr/pcrstrings.cxx b/extensions/source/propctrlr/pcrstrings.cxx index 7e081ab54db1..378312fca422 100644 --- a/extensions/source/propctrlr/pcrstrings.cxx +++ b/extensions/source/propctrlr/pcrstrings.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/propctrlr/pcrstrings.hxx b/extensions/source/propctrlr/pcrstrings.hxx index e49577427b3c..413b1c6a6ffd 100644 --- a/extensions/source/propctrlr/pcrstrings.hxx +++ b/extensions/source/propctrlr/pcrstrings.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/propctrlr/pcrunodialogs.cxx b/extensions/source/propctrlr/pcrunodialogs.cxx index f02be18b2f3b..0a7b4acf1c82 100644 --- a/extensions/source/propctrlr/pcrunodialogs.cxx +++ b/extensions/source/propctrlr/pcrunodialogs.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -136,7 +136,7 @@ namespace pcr } //-------------------------------------------------------------------------- - Dialog* OTabOrderDialog::createDialog( Window* _pParent ) + Dialog* OTabOrderDialog::createDialog( Window* _pParent ) { return new TabOrderDialog( _pParent, m_xTabbingModel, m_xControlContext, m_aContext.getLegacyServiceFactory() ); } diff --git a/extensions/source/propctrlr/pcrunodialogs.hxx b/extensions/source/propctrlr/pcrunodialogs.hxx index 24390001f491..5175cfe62eec 100644 --- a/extensions/source/propctrlr/pcrunodialogs.hxx +++ b/extensions/source/propctrlr/pcrunodialogs.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/propctrlr/propcontroller.cxx b/extensions/source/propctrlr/propcontroller.cxx index 50a6ed66bd65..8fd253a8ff6a 100644 --- a/extensions/source/propctrlr/propcontroller.cxx +++ b/extensions/source/propctrlr/propcontroller.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -90,7 +90,7 @@ namespace pcr using namespace ::com::sun::star::ucb; using namespace ::comphelper; -#define THISREF() static_cast< XController* >(this) +#define THISREF() static_cast< XController* >(this) //======================================================================== //= OPropertyBrowserController @@ -177,7 +177,7 @@ namespace pcr { return m_xModel; } - + //-------------------------------------------------------------------- void OPropertyBrowserController::impl_initializeView_nothrow() { @@ -217,7 +217,7 @@ namespace pcr { if ( !m_xModel.is() ) return false; - + return m_xModel->getIsReadOnly(); } @@ -272,7 +272,7 @@ namespace pcr impl_bindToNewModel_nothrow( _inspectorModel ); } - + //-------------------------------------------------------------------- Reference< XObjectInspectorUI > SAL_CALL OPropertyBrowserController::getInspectorUI() throw (RuntimeException) { @@ -307,7 +307,7 @@ namespace pcr // we don't have any dispatches at all, right now return Reference< XDispatch >(); } - + //-------------------------------------------------------------------- Sequence< Reference< XDispatch > > SAL_CALL OPropertyBrowserController::queryDispatches( const Sequence< DispatchDescriptor >& Requests ) throw (RuntimeException) { @@ -315,9 +315,9 @@ namespace pcr sal_Int32 nLen = Requests.getLength(); aReturn.realloc( nLen ); - Reference< XDispatch >* pReturn = aReturn.getArray(); - const Reference< XDispatch >* pReturnEnd = aReturn.getArray() + nLen; - const DispatchDescriptor* pDescripts = Requests.getConstArray(); + Reference< XDispatch >* pReturn = aReturn.getArray(); + const Reference< XDispatch >* pReturnEnd = aReturn.getArray() + nLen; + const DispatchDescriptor* pDescripts = Requests.getConstArray(); for ( ; pReturn != pReturnEnd; ++ pReturn, ++pDescripts ) *pReturn = queryDispatch( pDescripts->FeatureURL, pDescripts->FrameName, pDescripts->SearchFlags ); @@ -388,7 +388,7 @@ namespace pcr // Maybe it is intended to only announce the frame to the controller, and the instance doing this // announcement is responsible for calling setComponent, too. Reference< XWindow > xContainerWindow = m_xFrame->getContainerWindow(); - VCLXWindow* pContainerWindow = VCLXWindow::GetImplementation(xContainerWindow); + VCLXWindow* pContainerWindow = VCLXWindow::GetImplementation(xContainerWindow); Window* pParentWin = pContainerWindow ? pContainerWindow->GetWindow() : NULL; if (!pParentWin) throw RuntimeException(::rtl::OUString::createFromAscii("The frame is invalid. Unable to extract the container window."),*this); @@ -623,7 +623,7 @@ namespace pcr xContainerWindow = m_xFrame->getContainerWindow(); if ( xContainerWindow.get() == xSourceWindow.get() ) - { // our container window got the focus + { // our container window got the focus if ( haveView() ) getPropertyBox().GrabFocus(); } @@ -1351,7 +1351,7 @@ namespace pcr InteractiveSelectionResult eResult = handler->second->onInteractivePropertySelection( _rName, _bPrimary, aData, m_pUIRequestComposer->getUIForPropertyHandler( handler->second ) ); - + switch ( eResult ) { case InteractiveSelectionResult_Cancelled: @@ -1398,7 +1398,7 @@ namespace pcr if ( rName.equals( PROPERTY_IMAGE_URL ) ) { - // if the prop value is the PlaceHolder + // if the prop value is the PlaceHolder // can ignore it rtl::OUString sVal; _rValue >>= sVal; @@ -1457,7 +1457,7 @@ namespace pcr { m_aControlObservers.notifyEach( &XPropertyControlObserver::focusGained, _Control ); } - + //-------------------------------------------------------------------- void OPropertyBrowserController::valueChanged( const Reference< XPropertyControl >& _Control ) { @@ -1714,7 +1714,7 @@ namespace pcr { m_aControlObservers.addInterface( _Observer ); } - + //-------------------------------------------------------------------- void SAL_CALL OPropertyBrowserController::revokeControlObserver( const Reference< XPropertyControlObserver >& _Observer ) throw (RuntimeException) { diff --git a/extensions/source/propctrlr/propcontroller.hxx b/extensions/source/propctrlr/propcontroller.hxx index 6535ce6d3ca8..74d45dd48371 100644 --- a/extensions/source/propctrlr/propcontroller.hxx +++ b/extensions/source/propctrlr/propcontroller.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -96,14 +96,14 @@ namespace pcr //= OPropertyBrowserController //======================================================================== // #95343#------------------------------------------------------------------------------------ - typedef ::cppu::WeakImplHelper7 < ::com::sun::star::lang::XServiceInfo - , ::com::sun::star::awt::XFocusListener - , ::com::sun::star::awt::XLayoutConstrains - , ::com::sun::star::beans::XPropertyChangeListener + typedef ::cppu::WeakImplHelper7 < ::com::sun::star::lang::XServiceInfo + , ::com::sun::star::awt::XFocusListener + , ::com::sun::star::awt::XLayoutConstrains + , ::com::sun::star::beans::XPropertyChangeListener , ::com::sun::star::inspection::XPropertyControlFactory , ::com::sun::star::inspection::XObjectInspector , ::com::sun::star::lang::XInitialization - > OPropertyBrowserController_Base; + > OPropertyBrowserController_Base; class OPropertyBrowserController :public ::comphelper::OMutexAndBroadcastHelper @@ -132,8 +132,8 @@ namespace pcr // meta data about the properties OPropertyBrowserView* m_pView; - ::rtl::OUString m_sPageSelection; - ::rtl::OUString m_sLastValidPageSelection; + ::rtl::OUString m_sPageSelection; + ::rtl::OUString m_sLastValidPageSelection; typedef ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XPropertyHandler > PropertyHandlerRef; @@ -223,8 +223,8 @@ namespace pcr protected: // IPropertyLineListener - virtual void Clicked( const ::rtl::OUString& _rName, sal_Bool _bPrimary ); - virtual void Commit( const ::rtl::OUString& _rName, const ::com::sun::star::uno::Any& _rVal ); + virtual void Clicked( const ::rtl::OUString& _rName, sal_Bool _bPrimary ); + virtual void Commit( const ::rtl::OUString& _rName, const ::com::sun::star::uno::Any& _rVal ); // IPropertyControlObserver virtual void focusGained( const ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XPropertyControl >& _Control ); diff --git a/extensions/source/propctrlr/propcontrolobserver.hxx b/extensions/source/propctrlr/propcontrolobserver.hxx index d1d48ab8b80a..fc4fcf2b36e4 100644 --- a/extensions/source/propctrlr/propcontrolobserver.hxx +++ b/extensions/source/propctrlr/propcontrolobserver.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/propctrlr/propertycomposer.cxx b/extensions/source/propctrlr/propertycomposer.cxx index 4f88c2a0bed9..469a4606d397 100644 --- a/extensions/source/propctrlr/propertycomposer.cxx +++ b/extensions/source/propctrlr/propertycomposer.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -84,7 +84,7 @@ namespace pcr ::std::copy( _rBag.begin(), _rBag.end(), _rArray.getArray() ); } } - + //==================================================================== //= PropertyComposer //==================================================================== @@ -140,28 +140,28 @@ namespace pcr MethodGuard aGuard( *this ); return m_aSlaveHandlers[0]->getPropertyValue( _rPropertyName ); } - + //-------------------------------------------------------------------- void SAL_CALL PropertyComposer::setPropertyValue( const ::rtl::OUString& _rPropertyName, const Any& _rValue ) throw (UnknownPropertyException, RuntimeException) { MethodGuard aGuard( *this ); ::std::for_each( m_aSlaveHandlers.begin(), m_aSlaveHandlers.end(), SetPropertyValue( _rPropertyName, _rValue ) ); } - + //-------------------------------------------------------------------- Any SAL_CALL PropertyComposer::convertToPropertyValue( const ::rtl::OUString& _rPropertyName, const Any& _rControlValue ) throw (UnknownPropertyException, RuntimeException) { MethodGuard aGuard( *this ); return m_aSlaveHandlers[0]->convertToPropertyValue( _rPropertyName, _rControlValue ); } - + //-------------------------------------------------------------------- Any SAL_CALL PropertyComposer::convertToControlValue( const ::rtl::OUString& _rPropertyName, const Any& _rPropertyValue, const Type& _rControlValueType ) throw (UnknownPropertyException, RuntimeException) { MethodGuard aGuard( *this ); return m_aSlaveHandlers[0]->convertToControlValue( _rPropertyName, _rPropertyValue, _rControlValueType ); } - + //-------------------------------------------------------------------- PropertyState SAL_CALL PropertyComposer::getPropertyState( const ::rtl::OUString& _rPropertyName ) throw (UnknownPropertyException, RuntimeException) { @@ -200,21 +200,21 @@ namespace pcr return eState; } - + //-------------------------------------------------------------------- void SAL_CALL PropertyComposer::addPropertyChangeListener( const Reference< XPropertyChangeListener >& _rxListener ) throw (RuntimeException) { MethodGuard aGuard( *this ); m_aPropertyListeners.addListener( _rxListener ); } - + //-------------------------------------------------------------------- void SAL_CALL PropertyComposer::removePropertyChangeListener( const Reference< XPropertyChangeListener >& _rxListener ) throw (RuntimeException) { MethodGuard aGuard( *this ); m_aPropertyListeners.removeListener( _rxListener ); } - + //-------------------------------------------------------------------- Sequence< Property > SAL_CALL PropertyComposer::getSupportedProperties() throw (RuntimeException) { @@ -270,7 +270,7 @@ namespace pcr copyBagToArray( m_aSupportedProperties, aSurvived ); return aSurvived; } - + //-------------------------------------------------------------------- void uniteStringArrays( const PropertyComposer::HandlerArray& _rHandlers, Sequence< ::rtl::OUString > (SAL_CALL XPropertyHandler::*pGetter)( void ), Sequence< ::rtl::OUString >& /* [out] */ _rUnion ) @@ -300,7 +300,7 @@ namespace pcr uniteStringArrays( m_aSlaveHandlers, &XPropertyHandler::getSupersededProperties, aSuperseded ); return aSuperseded; } - + //-------------------------------------------------------------------- Sequence< ::rtl::OUString > SAL_CALL PropertyComposer::getActuatingProperties( ) throw (RuntimeException) { @@ -311,7 +311,7 @@ namespace pcr uniteStringArrays( m_aSlaveHandlers, &XPropertyHandler::getActuatingProperties, aActuating ); return aActuating; } - + //-------------------------------------------------------------------- LineDescriptor SAL_CALL PropertyComposer::describePropertyLine( const ::rtl::OUString& _rPropertyName, const Reference< XPropertyControlFactory >& _rxControlFactory ) @@ -320,7 +320,7 @@ namespace pcr MethodGuard aGuard( *this ); return m_aSlaveHandlers[0]->describePropertyLine( _rPropertyName, _rxControlFactory ); } - + //-------------------------------------------------------------------- ::sal_Bool SAL_CALL PropertyComposer::isComposable( const ::rtl::OUString& _rPropertyName ) throw (UnknownPropertyException, RuntimeException) { @@ -378,7 +378,7 @@ namespace pcr return eResult; } - + //-------------------------------------------------------------------- void PropertyComposer::impl_ensureUIRequestComposer( const Reference< XObjectInspectorUI >& _rxInspectorUI ) { diff --git a/extensions/source/propctrlr/propertycomposer.hxx b/extensions/source/propctrlr/propertycomposer.hxx index d57d4ad16cfb..645023ad71c9 100644 --- a/extensions/source/propctrlr/propertycomposer.hxx +++ b/extensions/source/propctrlr/propertycomposer.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/propctrlr/propertycontrolextender.cxx b/extensions/source/propctrlr/propertycontrolextender.cxx index 49e352331812..5b69e210489e 100644 --- a/extensions/source/propctrlr/propertycontrolextender.cxx +++ b/extensions/source/propctrlr/propertycontrolextender.cxx @@ -1,7 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -122,13 +122,13 @@ namespace pcr } } } - + //-------------------------------------------------------------------- void SAL_CALL PropertyControlExtender::keyReleased( const KeyEvent& /*_event*/ ) throw (RuntimeException) { // not interested in } - + //-------------------------------------------------------------------- void SAL_CALL PropertyControlExtender::disposing( const EventObject& Source ) throw (RuntimeException) { diff --git a/extensions/source/propctrlr/propertycontrolextender.hxx b/extensions/source/propctrlr/propertycontrolextender.hxx index 7346d0b8b1af..12e300cc2d5c 100644 --- a/extensions/source/propctrlr/propertycontrolextender.hxx +++ b/extensions/source/propctrlr/propertycontrolextender.hxx @@ -1,7 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/propctrlr/propertyeditor.cxx b/extensions/source/propctrlr/propertyeditor.cxx index 657c59961430..ebab4b66dbcb 100644 --- a/extensions/source/propctrlr/propertyeditor.cxx +++ b/extensions/source/propctrlr/propertyeditor.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/propctrlr/propertyeditor.hxx b/extensions/source/propctrlr/propertyeditor.hxx index c4c2fd305662..eec51c6a03fa 100644 --- a/extensions/source/propctrlr/propertyeditor.hxx +++ b/extensions/source/propctrlr/propertyeditor.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -119,14 +119,14 @@ namespace pcr void RemoveEntry( const ::rtl::OUString& _rName ); void ChangeEntry( const OLineDescriptor& ); - void setPageActivationHandler(const Link& _rHdl) { m_aPageActivationHandler = _rHdl; } - Link getPageActivationHandler() const { return m_aPageActivationHandler; } + void setPageActivationHandler(const Link& _rHdl) { m_aPageActivationHandler = _rHdl; } + Link getPageActivationHandler() const { return m_aPageActivationHandler; } // #95343# ------------------------------- sal_Int32 getMinimumWidth(); sal_Int32 getMinimumHeight(); - void CommitModified(); + void CommitModified(); protected: using Window::SetHelpText; diff --git a/extensions/source/propctrlr/propertyhandler.cxx b/extensions/source/propctrlr/propertyhandler.cxx index ee5e4dd67cc4..2b4ee7768f5b 100644 --- a/extensions/source/propctrlr/propertyhandler.cxx +++ b/extensions/source/propctrlr/propertyhandler.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -76,7 +76,7 @@ namespace pcr ,m_pInfoService ( new OPropertyInfoService ) { DBG_CTOR( PropertyHandler, NULL ); - + m_xTypeConverter = Reference< XTypeConverter >( m_aContext.createComponent( "com.sun.star.script.Converter" ), UNO_QUERY_THROW @@ -116,7 +116,7 @@ namespace pcr while ( readdListener->hasMoreElements() ) addPropertyChangeListener( static_cast< XPropertyChangeListener* >( readdListener->next() ) ); } - + //-------------------------------------------------------------------- void PropertyHandler::onNewComponent() { @@ -251,7 +251,7 @@ namespace pcr DBG_ERROR( "PropertyHandler::onInteractivePropertySelection: not implemented!" ); return InteractiveSelectionResult_Cancelled; } - + //-------------------------------------------------------------------- void SAL_CALL PropertyHandler::actuatingPropertyChanged( const ::rtl::OUString& /*_rActuatingPropertyName*/, const Any& /*_rNewValue*/, const Any& /*_rOldValue*/, const Reference< XObjectInspectorUI >& /*_rxInspectorUI*/, sal_Bool /*_bFirstTimeInit*/ ) throw (NullPointerException, RuntimeException) { @@ -266,14 +266,14 @@ namespace pcr throw NullPointerException(); m_aPropertyListeners.addListener( _rxListener ); } - + //-------------------------------------------------------------------- void SAL_CALL PropertyHandler::removePropertyChangeListener( const Reference< XPropertyChangeListener >& _rxListener ) throw (RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); m_aPropertyListeners.removeListener( _rxListener ); } - + //-------------------------------------------------------------------- sal_Bool SAL_CALL PropertyHandler::suspend( sal_Bool /*_bSuspend*/ ) throw (RuntimeException) { @@ -458,7 +458,7 @@ namespace pcr StlSyntaxSequence< ::rtl::OUString > aAllServices( getSupportedServiceNames() ); return ::std::find( aAllServices.begin(), aAllServices.end(), ServiceName ) != aAllServices.end(); } - + //........................................................................ } // namespace pcr //........................................................................ diff --git a/extensions/source/propctrlr/propertyhandler.hxx b/extensions/source/propctrlr/propertyhandler.hxx index 1fffc177b82f..8e5fa68ea67c 100644 --- a/extensions/source/propctrlr/propertyhandler.hxx +++ b/extensions/source/propctrlr/propertyhandler.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/propctrlr/propertyinfo.hxx b/extensions/source/propctrlr/propertyinfo.hxx index 6e71ef58c7a1..4c46361f6d84 100644 --- a/extensions/source/propctrlr/propertyinfo.hxx +++ b/extensions/source/propctrlr/propertyinfo.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -45,10 +45,10 @@ namespace pcr class SAL_NO_VTABLE IPropertyInfoService { public: - virtual sal_Int32 getPropertyId(const String& _rName) const = 0; - virtual String getPropertyTranslation(sal_Int32 _nId) const = 0; - virtual sal_Int32 getPropertyHelpId(sal_Int32 _nId) const = 0; - virtual sal_Int16 getPropertyPos(sal_Int32 _nId) const = 0; + virtual sal_Int32 getPropertyId(const String& _rName) const = 0; + virtual String getPropertyTranslation(sal_Int32 _nId) const = 0; + virtual sal_Int32 getPropertyHelpId(sal_Int32 _nId) const = 0; + virtual sal_Int16 getPropertyPos(sal_Int32 _nId) const = 0; virtual sal_uInt32 getPropertyUIFlags(sal_Int32 _nId) const = 0; virtual ::std::vector< ::rtl::OUString > getPropertyEnumRepresentations(sal_Int32 _nId) const = 0; diff --git a/extensions/source/propctrlr/propeventtranslation.cxx b/extensions/source/propctrlr/propeventtranslation.cxx index 6ab21e547289..d3dabd93fe31 100644 --- a/extensions/source/propctrlr/propeventtranslation.cxx +++ b/extensions/source/propctrlr/propeventtranslation.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -80,7 +80,7 @@ namespace pcr m_xDelegator->propertyChange( aTranslatedEvent ); } } - + //-------------------------------------------------------------------- void SAL_CALL PropertyEventTranslation::disposing( const EventObject& Source ) throw (RuntimeException) { diff --git a/extensions/source/propctrlr/propeventtranslation.hxx b/extensions/source/propctrlr/propeventtranslation.hxx index 284855e2c413..c5f5c8165b7c 100644 --- a/extensions/source/propctrlr/propeventtranslation.hxx +++ b/extensions/source/propctrlr/propeventtranslation.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/propctrlr/proplinelistener.hxx b/extensions/source/propctrlr/proplinelistener.hxx index 79eeaee28962..e1eb39e645fe 100644 --- a/extensions/source/propctrlr/proplinelistener.hxx +++ b/extensions/source/propctrlr/proplinelistener.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -40,8 +40,8 @@ namespace pcr class IPropertyLineListener { public: - virtual void Clicked( const ::rtl::OUString& _rName, sal_Bool _bPrimary ) = 0; - virtual void Commit( const ::rtl::OUString& _rName, const ::com::sun::star::uno::Any& _rVal ) = 0; + virtual void Clicked( const ::rtl::OUString& _rName, sal_Bool _bPrimary ) = 0; + virtual void Commit( const ::rtl::OUString& _rName, const ::com::sun::star::uno::Any& _rVal ) = 0; }; //............................................................................ diff --git a/extensions/source/propctrlr/propres.src b/extensions/source/propctrlr/propres.src index 23b11a932e34..6449f86f045c 100644 --- a/extensions/source/propctrlr/propres.src +++ b/extensions/source/propctrlr/propres.src @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/propctrlr/propresid.hrc b/extensions/source/propctrlr/propresid.hrc index 5328617735a9..e1fc83667ca2 100644 --- a/extensions/source/propctrlr/propresid.hrc +++ b/extensions/source/propctrlr/propresid.hrc @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -30,17 +30,17 @@ // TODO: create a new resource range in <svl/solar.hrc> -#define RID_PROPCONTROLLER_START 1000 +#define RID_PROPCONTROLLER_START 1000 // arbitrary at the moment -#define RID_FORMBROWSER_START RID_PROPCONTROLLER_START + 2000 +#define RID_FORMBROWSER_START RID_PROPCONTROLLER_START + 2000 // ----------------------------------------------------------------------- // - Strings // ----------------------------------------------------------------------- -#define RID_STR_STANDARD ( RID_PROPCONTROLLER_START + 0 ) -#define RID_STR_PROPPAGE_DEFAULT ( RID_PROPCONTROLLER_START + 1 ) -#define RID_STR_PROPPAGE_DATA ( RID_PROPCONTROLLER_START + 2 ) +#define RID_STR_STANDARD ( RID_PROPCONTROLLER_START + 0 ) +#define RID_STR_PROPPAGE_DEFAULT ( RID_PROPCONTROLLER_START + 1 ) +#define RID_STR_PROPPAGE_DATA ( RID_PROPCONTROLLER_START + 2 ) #define RID_STR_HELP_SECTION_LABEL ( RID_PROPCONTROLLER_START + 3 ) #define RID_EMBED_IMAGE_PLACEHOLDER ( RID_PROPCONTROLLER_START + 4 ) #define RID_STR_TEXT_FORMAT ( RID_PROPCONTROLLER_START + 5 ) diff --git a/extensions/source/propctrlr/pushbuttonnavigation.cxx b/extensions/source/propctrlr/pushbuttonnavigation.cxx index 6b96f6f0867f..6195b99374b3 100644 --- a/extensions/source/propctrlr/pushbuttonnavigation.cxx +++ b/extensions/source/propctrlr/pushbuttonnavigation.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -123,7 +123,7 @@ namespace pcr m_xControlModel->getPropertyValue( PROPERTY_TARGET_URL ) >>= sTargetURL; sal_Int32 nNavigationURLIndex = lcl_getNavigationURLIndex( sTargetURL ); - if ( nNavigationURLIndex >= 0) + if ( nNavigationURLIndex >= 0) // it actually *is* a virtual button type nButtonType = s_nFirstVirtualButtonType + nNavigationURLIndex; } diff --git a/extensions/source/propctrlr/pushbuttonnavigation.hxx b/extensions/source/propctrlr/pushbuttonnavigation.hxx index d192326279d9..3626e4234eed 100644 --- a/extensions/source/propctrlr/pushbuttonnavigation.hxx +++ b/extensions/source/propctrlr/pushbuttonnavigation.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/propctrlr/selectlabeldialog.cxx b/extensions/source/propctrlr/selectlabeldialog.cxx index 7bba7ee4510a..d4237a52c6ac 100644 --- a/extensions/source/propctrlr/selectlabeldialog.cxx +++ b/extensions/source/propctrlr/selectlabeldialog.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -111,7 +111,7 @@ namespace pcr { // check wich service the allowed components must suppport sal_Int16 nClassId = 0; - try { nClassId = ::comphelper::getINT16(m_xControlModel->getPropertyValue(PROPERTY_CLASSID)); } catch(...) { } + try { nClassId = ::comphelper::getINT16(m_xControlModel->getPropertyValue(PROPERTY_CLASSID)); } catch(...) { } m_sRequiredService = (FormComponentType::RADIOBUTTON == nClassId) ? SERVICE_COMPONENT_GROUPBOX : SERVICE_COMPONENT_FIXEDTEXT; m_aRequiredControlImage = m_aModelImages.GetImage((FormComponentType::RADIOBUTTON == nClassId) ? RID_SVXIMG_GROUPBOX : RID_SVXIMG_FIXEDTEXT); @@ -126,7 +126,7 @@ namespace pcr // insert the root Image aRootImage = m_aModelImages.GetImage(RID_SVXIMG_FORMS); SvLBoxEntry* pRoot = m_aControlTree.InsertEntry(PcrRes(RID_STR_FORMS), aRootImage, aRootImage); - + // build the tree m_pInitialSelection = NULL; m_bHaveAssignableControl = sal_False; @@ -148,7 +148,7 @@ namespace pcr } if (!m_bHaveAssignableControl) - { // no controls which can be assigned + { // no controls which can be assigned m_aNoAssignment.Check(sal_True); m_aNoAssignment.Enable(sal_False); } @@ -205,10 +205,10 @@ namespace pcr continue; if (!xInfo->supportsService(m_sRequiredService)) - { // perhaps it is a container + { // perhaps it is a container Reference< XIndexAccess > xCont(xAsSet, UNO_QUERY); if (xCont.is() && xCont->getCount()) - { // yes -> step down + { // yes -> step down Image aFormImage = m_aModelImages.GetImage( RID_SVXIMG_FORM ); SvLBoxEntry* pCont = m_aControlTree.InsertEntry(sName, aFormImage, aFormImage, pContainerEntry); sal_Int32 nContChildren = InsertEntries(xCont, pCont); @@ -218,7 +218,7 @@ namespace pcr ++nChildren; } else - { // oops, no valid childs -> remove the entry + { // oops, no valid childs -> remove the entry m_aControlTree.ModelIsRemoving(pCont); m_aControlTree.GetModel()->Remove(pCont); m_aControlTree.ModelHasRemoved(pCont); @@ -307,7 +307,7 @@ namespace pcr } //............................................................................ -} // namespace pcr +} // namespace pcr //............................................................................ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/extensions/source/propctrlr/selectlabeldialog.hxx b/extensions/source/propctrlr/selectlabeldialog.hxx index c455f48e1c68..bb713b875862 100644 --- a/extensions/source/propctrlr/selectlabeldialog.hxx +++ b/extensions/source/propctrlr/selectlabeldialog.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -49,23 +49,23 @@ namespace pcr :public ModalDialog ,public PcrClient { - FixedText m_aMainDesc; - SvTreeListBox m_aControlTree; - CheckBox m_aNoAssignment; - FixedLine m_aSeparator; - OKButton m_aOk; - CancelButton m_aCancel; + FixedText m_aMainDesc; + SvTreeListBox m_aControlTree; + CheckBox m_aNoAssignment; + FixedLine m_aSeparator; + OKButton m_aOk; + CancelButton m_aCancel; - ImageList m_aModelImages; - ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > m_xControlModel; - ::rtl::OUString m_sRequiredService; - Image m_aRequiredControlImage; - SvLBoxEntry* m_pInitialSelection; - ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > m_xInitialLabelControl; + ImageList m_aModelImages; + ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > m_xControlModel; + ::rtl::OUString m_sRequiredService; + Image m_aRequiredControlImage; + SvLBoxEntry* m_pInitialSelection; + ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > m_xInitialLabelControl; - ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > m_xSelectedControl; - SvLBoxEntry* m_pLastSelected; - sal_Bool m_bHaveAssignableControl; + ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > m_xSelectedControl; + SvLBoxEntry* m_pLastSelected; + sal_Bool m_bHaveAssignableControl; public: OSelectLabelDialog(Window* pParent, ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > _xControlModel); @@ -81,7 +81,7 @@ namespace pcr }; //............................................................................ -} // namespace pcr +} // namespace pcr //............................................................................ #endif // _EXTENSIONS_PROPCTRLR_SELECTLABELDIALOG_HXX_ diff --git a/extensions/source/propctrlr/selectlabeldialog.src b/extensions/source/propctrlr/selectlabeldialog.src index af536befb3bf..93cf7d24ece8 100644 --- a/extensions/source/propctrlr/selectlabeldialog.src +++ b/extensions/source/propctrlr/selectlabeldialog.src @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -47,7 +47,7 @@ ModalDialog RID_DLG_SELECTLABELCONTROL Pos = MAP_APPFONT( 6, 29 ); Size = MAP_APPFONT( 188, 83 ); TabStop = TRUE; - Border = TRUE ; + Border = TRUE ; }; CheckBox 1 { diff --git a/extensions/source/propctrlr/sqlcommanddesign.cxx b/extensions/source/propctrlr/sqlcommanddesign.cxx index 1e0e2e865d34..d7abbc8b6c7e 100644 --- a/extensions/source/propctrlr/sqlcommanddesign.cxx +++ b/extensions/source/propctrlr/sqlcommanddesign.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -160,7 +160,7 @@ namespace pcr } } } - + //-------------------------------------------------------------------- void SAL_CALL SQLCommandDesigner::disposing( const EventObject& Source ) throw (RuntimeException) { diff --git a/extensions/source/propctrlr/sqlcommanddesign.hxx b/extensions/source/propctrlr/sqlcommanddesign.hxx index 592bdc91fd04..f439f67840b8 100644 --- a/extensions/source/propctrlr/sqlcommanddesign.hxx +++ b/extensions/source/propctrlr/sqlcommanddesign.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/propctrlr/standardcontrol.cxx b/extensions/source/propctrlr/standardcontrol.cxx index 5dea67099f86..6d3f3c9a1475 100644 --- a/extensions/source/propctrlr/standardcontrol.cxx +++ b/extensions/source/propctrlr/standardcontrol.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -697,7 +697,7 @@ namespace pcr pColorTable = XColorTable::GetStdColorTable(); } - + DBG_ASSERT(pColorTable, "OColorControl::OColorControl: no color table!"); if (pColorTable) @@ -729,7 +729,7 @@ namespace pcr getTypedControlWindow()->SelectEntry( aRgbCol ); if ( !getTypedControlWindow()->IsEntrySelected( aRgbCol ) ) - { // the given color is not part of the list -> insert a new entry with the hex code of the color + { // the given color is not part of the list -> insert a new entry with the hex code of the color String aStr = String::CreateFromAscii("0x"); aStr += MakeHexStr(nColor,8); getTypedControlWindow()->InsertEntry( aRgbCol, aStr ); @@ -889,7 +889,7 @@ namespace pcr ::rtl::OUString* pIter = aRet.getArray(); for (USHORT i = 0; i < nCount ; ++i,++pIter) *pIter = getTypedControlWindow()->GetEntry(i); - + return aRet; } @@ -959,7 +959,7 @@ namespace pcr ::rtl::OUString* pIter = aRet.getArray(); for (USHORT i = 0; i < nCount ; ++i,++pIter) *pIter = getTypedControlWindow()->GetEntry(i); - + return aRet; } @@ -978,17 +978,17 @@ namespace pcr class OMultilineFloatingEdit : public FloatingWindow { private: - MultiLineEdit m_aImplEdit; + MultiLineEdit m_aImplEdit; protected: - virtual void Resize(); + virtual void Resize(); public: OMultilineFloatingEdit(Window* _pParen); MultiLineEdit* getEdit() { return &m_aImplEdit; } protected: - virtual long PreNotify(NotifyEvent& _rNEvt); + virtual long PreNotify(NotifyEvent& _rNEvt); }; //------------------------------------------------------------------ @@ -1016,11 +1016,11 @@ namespace pcr const KeyCode& aKeyCode = _rNEvt.GetKeyEvent()->GetKeyCode(); sal_uInt16 nKey = aKeyCode.GetCode(); - if ( ( (KEY_RETURN == nKey) + if ( ( (KEY_RETURN == nKey) && !aKeyCode.IsShift() ) - || ( (KEY_UP == nKey) - && aKeyCode.IsMod2() + || ( (KEY_UP == nKey) + && aKeyCode.IsMod2() ) ) { @@ -1159,7 +1159,7 @@ namespace pcr ShowDropDown( sal_True ); m_pFloatingEdit->getEdit()->GrabFocus(); m_pFloatingEdit->getEdit()->SetSelection( aSel ); - Window* pFocusWin = Application::GetFocusWindow(); + Window* pFocusWin = Application::GetFocusWindow(); pFocusWin->KeyInput( *rNEvt.GetKeyEvent() ); } } @@ -1217,7 +1217,7 @@ namespace pcr } //------------------------------------------------------------------ - #define STD_HEIGHT 100 + #define STD_HEIGHT 100 sal_Bool DropDownEditControl::ShowDropDown( sal_Bool bShow ) { if (bShow) diff --git a/extensions/source/propctrlr/standardcontrol.hxx b/extensions/source/propctrlr/standardcontrol.hxx index c480b508cd25..8fed840fc605 100644 --- a/extensions/source/propctrlr/standardcontrol.hxx +++ b/extensions/source/propctrlr/standardcontrol.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -273,7 +273,7 @@ namespace pcr virtual void SAL_CALL setDisplayUnit( ::sal_Int16 _displayunit ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); virtual ::sal_Int16 SAL_CALL getValueUnit() throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL setValueUnit( ::sal_Int16 _valueunit ) throw (::com::sun::star::uno::RuntimeException); - + private: /** converts an API value (<code>double</code>, as passed into <code>set[Max|Min|]Value) into a <code>long</code> value which can be passed to our NumericField. diff --git a/extensions/source/propctrlr/stlops.hxx b/extensions/source/propctrlr/stlops.hxx index 3ac44fcf32d6..b0249ec57821 100644 --- a/extensions/source/propctrlr/stlops.hxx +++ b/extensions/source/propctrlr/stlops.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -39,7 +39,7 @@ namespace pcr //======================================================================== struct PropertyLessByName - :public ::std::binary_function < ::com::sun::star::beans::Property, + :public ::std::binary_function < ::com::sun::star::beans::Property, ::com::sun::star::beans::Property, bool > @@ -52,7 +52,7 @@ namespace pcr //======================================================================== struct TypeLessByName - :public ::std::binary_function < ::com::sun::star::uno::Type, + :public ::std::binary_function < ::com::sun::star::uno::Type, ::com::sun::star::uno::Type, bool > diff --git a/extensions/source/propctrlr/stringdefine.hxx b/extensions/source/propctrlr/stringdefine.hxx index e5a27caa34f8..b7101590dd8b 100644 --- a/extensions/source/propctrlr/stringdefine.hxx +++ b/extensions/source/propctrlr/stringdefine.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -42,17 +42,17 @@ namespace pcr //============================================================ struct ConstAsciiString { - const sal_Char* ascii; - sal_Int32 length; + const sal_Char* ascii; + sal_Int32 length; - inline operator const ::rtl::OUString& () const; - inline operator const sal_Char* () const { return ascii; } + inline operator const ::rtl::OUString& () const; + inline operator const sal_Char* () const { return ascii; } inline ConstAsciiString(const sal_Char* _pAsciiZeroTerminated, const sal_Int32 _nLength); inline ~ConstAsciiString(); private: - mutable ::rtl::OUString* ustring; + mutable ::rtl::OUString* ustring; }; //------------------------------------------------------------ @@ -80,7 +80,7 @@ namespace pcr //============================================================ -#define CONST_ASCII_LENGTH(c) \ +#define CONST_ASCII_LENGTH(c) \ (const sal_Char*)c, c.length() //============================================================ diff --git a/extensions/source/propctrlr/stringrepresentation.cxx b/extensions/source/propctrlr/stringrepresentation.cxx index f07d4d60f756..92133ebba8ca 100644 --- a/extensions/source/propctrlr/stringrepresentation.cxx +++ b/extensions/source/propctrlr/stringrepresentation.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -426,7 +426,7 @@ bool StringRepresentation::convertGenericValueToString( const uno::Any& _rValue, ++i; } break; - + // some structs case uno::TypeClass_STRUCT: OSL_ENSURE( false, "StringRepresentation::convertGenericValueToString(STRUCT): this is dead code - isn't it?" ); @@ -474,7 +474,7 @@ uno::Any StringRepresentation::convertStringToSimple( const ::rtl::OUString& _rV if ( m_aConstants.getLength() && m_aValues.getLength() ) { const ::rtl::OUString* pIter = m_aValues.getConstArray(); - const ::rtl::OUString* pEnd = pIter + m_aValues.getLength(); + const ::rtl::OUString* pEnd = pIter + m_aValues.getLength(); for(sal_Int32 i = 0;pIter != pEnd;++pIter,++i) { if ( *pIter == _rValue ) @@ -579,7 +579,7 @@ bool StringRepresentation::convertStringToGenericValue( const ::rtl::OUString& _ // weird enough, the string representation of dates, as used // by the control displaying dates, and thus as passed through the layers, // is YYYYMMDD. - + _rValue <<= ::dbtools::DBTypeConversion::toDate(_rStringRep); } else if ( _rTargetType.equals( ::getCppuType( static_cast< util::Time* >( NULL ) ) ) ) diff --git a/extensions/source/propctrlr/submissionhandler.cxx b/extensions/source/propctrlr/submissionhandler.cxx index b14153383f6f..fee3f2a61831 100644 --- a/extensions/source/propctrlr/submissionhandler.cxx +++ b/extensions/source/propctrlr/submissionhandler.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -178,7 +178,7 @@ namespace pcr return aReturn; } - + //-------------------------------------------------------------------- void SAL_CALL SubmissionPropertyHandler::setPropertyValue( const ::rtl::OUString& _rPropertyName, const Any& _rValue ) throw (UnknownPropertyException, RuntimeException) { @@ -221,7 +221,7 @@ namespace pcr OSL_ENSURE( sal_False, "SubmissionPropertyHandler::setPropertyValue: caught an exception!" ); } } - + //-------------------------------------------------------------------- Sequence< ::rtl::OUString > SAL_CALL SubmissionPropertyHandler::getActuatingProperties( ) throw (RuntimeException) { @@ -394,7 +394,7 @@ namespace pcr return aPropertyValue; } - + //-------------------------------------------------------------------- Any SAL_CALL SubmissionPropertyHandler::convertToControlValue( const ::rtl::OUString& _rPropertyName, const Any& _rPropertyValue, const Type& _rControlValueType ) throw (UnknownPropertyException, RuntimeException) { diff --git a/extensions/source/propctrlr/submissionhandler.hxx b/extensions/source/propctrlr/submissionhandler.hxx index 0ee0e8df8a03..1c2bd4082531 100644 --- a/extensions/source/propctrlr/submissionhandler.hxx +++ b/extensions/source/propctrlr/submissionhandler.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/propctrlr/taborder.cxx b/extensions/source/propctrlr/taborder.cxx index c21539e43d13..ae24730a4a7f 100644 --- a/extensions/source/propctrlr/taborder.cxx +++ b/extensions/source/propctrlr/taborder.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/propctrlr/taborder.hrc b/extensions/source/propctrlr/taborder.hrc index 00a6341d13a8..03be169a18eb 100644 --- a/extensions/source/propctrlr/taborder.hrc +++ b/extensions/source/propctrlr/taborder.hrc @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/propctrlr/taborder.hxx b/extensions/source/propctrlr/taborder.hxx index 9a0d99f68bf2..fbe134f79a9f 100644 --- a/extensions/source/propctrlr/taborder.hxx +++ b/extensions/source/propctrlr/taborder.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/propctrlr/taborder.src b/extensions/source/propctrlr/taborder.src index 73f12ff3ff89..fe55988f34af 100644 --- a/extensions/source/propctrlr/taborder.src +++ b/extensions/source/propctrlr/taborder.src @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -51,11 +51,11 @@ ModalDialog RID_DLG_TABORDER Control CTRL_TREE { - Border = TRUE; + Border = TRUE; Pos = MAP_APPFONT ( 6, 14) ; Size = MAP_APPFONT ( 90, 136 ) ; - TabStop = TRUE; - HelpId = HID_PROP_TABORDER_CONTROLS; + TabStop = TRUE; + HelpId = HID_PROP_TABORDER_CONTROLS; }; PushButton PB_MOVE_UP diff --git a/extensions/source/propctrlr/unourl.cxx b/extensions/source/propctrlr/unourl.cxx index 63600fc4c827..136969621e07 100644 --- a/extensions/source/propctrlr/unourl.cxx +++ b/extensions/source/propctrlr/unourl.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/propctrlr/unourl.hxx b/extensions/source/propctrlr/unourl.hxx index e9eebdd6e409..8324751050dd 100644 --- a/extensions/source/propctrlr/unourl.hxx +++ b/extensions/source/propctrlr/unourl.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/propctrlr/usercontrol.cxx b/extensions/source/propctrlr/usercontrol.cxx index 4b7fbf18a5d8..a6dbea212338 100644 --- a/extensions/source/propctrlr/usercontrol.cxx +++ b/extensions/source/propctrlr/usercontrol.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -115,7 +115,7 @@ namespace pcr { // else set the new format key, the text will be reformatted getTypedControlWindow()->SetFormatKey( nFormatKey ); - + SvNumberFormatter* pNF = getTypedControlWindow()->GetFormatter(); const SvNumberformat* pEntry = pNF->GetEntry( nFormatKey ); OSL_ENSURE( pEntry, "OFormatSampleControl::setValue: invalid format entry!" ); diff --git a/extensions/source/propctrlr/usercontrol.hxx b/extensions/source/propctrlr/usercontrol.hxx index d5965600ae34..6bd985b2e3b7 100644 --- a/extensions/source/propctrlr/usercontrol.hxx +++ b/extensions/source/propctrlr/usercontrol.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/propctrlr/xsddatatypes.cxx b/extensions/source/propctrlr/xsddatatypes.cxx index 2b7b99692d87..d9c8cff9b807 100644 --- a/extensions/source/propctrlr/xsddatatypes.cxx +++ b/extensions/source/propctrlr/xsddatatypes.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/propctrlr/xsddatatypes.hxx b/extensions/source/propctrlr/xsddatatypes.hxx index c2015aa3a39c..22307028b2dd 100644 --- a/extensions/source/propctrlr/xsddatatypes.hxx +++ b/extensions/source/propctrlr/xsddatatypes.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -68,7 +68,7 @@ namespace pcr public: XSDDataType( - const ::com::sun::star::uno::Reference< ::com::sun::star::xsd::XDataType >& _rxDataType + const ::com::sun::star::uno::Reference< ::com::sun::star::xsd::XDataType >& _rxDataType ); // IReference diff --git a/extensions/source/propctrlr/xsdvalidationhelper.cxx b/extensions/source/propctrlr/xsdvalidationhelper.cxx index 7e6440ae5a8c..88d15f8c613f 100644 --- a/extensions/source/propctrlr/xsdvalidationhelper.cxx +++ b/extensions/source/propctrlr/xsdvalidationhelper.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/propctrlr/xsdvalidationhelper.hxx b/extensions/source/propctrlr/xsdvalidationhelper.hxx index e3881cdbcbe9..4b514b75765d 100644 --- a/extensions/source/propctrlr/xsdvalidationhelper.hxx +++ b/extensions/source/propctrlr/xsdvalidationhelper.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx b/extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx index c254800af14c..7555ecbad4ce 100644 --- a/extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx +++ b/extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/propctrlr/xsdvalidationpropertyhandler.hxx b/extensions/source/propctrlr/xsdvalidationpropertyhandler.hxx index 9bcf9e4dd3e4..9763d43ba303 100644 --- a/extensions/source/propctrlr/xsdvalidationpropertyhandler.hxx +++ b/extensions/source/propctrlr/xsdvalidationpropertyhandler.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/resource/oooresourceloader.cxx b/extensions/source/resource/oooresourceloader.cxx index ff87b3d51724..59b71c143516 100644 --- a/extensions/source/resource/oooresourceloader.cxx +++ b/extensions/source/resource/oooresourceloader.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -297,7 +297,7 @@ namespace res { return loadBundle( _baseName, Application::GetSettings().GetUILocale() ); } - + //-------------------------------------------------------------------- Reference< XResourceBundle > SAL_CALL OpenOfficeResourceLoader::loadBundle( const ::rtl::OUString& _baseName, const Locale& _locale ) throw (MissingResourceException, RuntimeException) { @@ -318,7 +318,7 @@ namespace res return xBundle; } - + //-------------------------------------------------------------------- ComponentInfo getComponentInfo_OpenOfficeResourceLoader() { @@ -364,21 +364,21 @@ namespace res ::osl::MutexGuard aGuard( m_aMutex ); return m_xParent; } - + //-------------------------------------------------------------------- void SAL_CALL OpenOfficeResourceBundle::setParent( const Reference< XResourceBundle >& _parent ) throw (RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); m_xParent = _parent; } - + //-------------------------------------------------------------------- Locale SAL_CALL OpenOfficeResourceBundle::getLocale( ) throw (RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); return m_aLocale; } - + //-------------------------------------------------------------------- bool OpenOfficeResourceBundle::impl_getResourceTypeAndId_nothrow( const ::rtl::OUString& _key, ResourceTypePtr& _out_resourceType, sal_Int32& _out_resourceId ) const { @@ -424,7 +424,7 @@ namespace res impl_getDirectElement_nothrow( _key, aElement ); return aElement; } - + //-------------------------------------------------------------------- Any SAL_CALL OpenOfficeResourceBundle::getByName( const ::rtl::OUString& _key ) throw (NoSuchElementException, WrappedTargetException, RuntimeException) { @@ -442,7 +442,7 @@ namespace res return aElement; } - + //-------------------------------------------------------------------- Sequence< ::rtl::OUString > SAL_CALL OpenOfficeResourceBundle::getElementNames( ) throw (RuntimeException) { @@ -451,7 +451,7 @@ namespace res // the (Simple)ResManager does not provide an API to enumerate the resources return Sequence< ::rtl::OUString >( ); } - + //-------------------------------------------------------------------- ::sal_Bool SAL_CALL OpenOfficeResourceBundle::hasByName( const ::rtl::OUString& _key ) throw (RuntimeException) { @@ -467,13 +467,13 @@ namespace res return sal_True; } - + //-------------------------------------------------------------------- Type SAL_CALL OpenOfficeResourceBundle::getElementType( ) throw (RuntimeException) { return ::cppu::UnoType< Any >::get(); } - + //-------------------------------------------------------------------- ::sal_Bool SAL_CALL OpenOfficeResourceBundle::hasElements( ) throw (RuntimeException) { diff --git a/extensions/source/resource/res_services.cxx b/extensions/source/resource/res_services.cxx index 2239ef361cc7..c87e59f0db2c 100644 --- a/extensions/source/resource/res_services.cxx +++ b/extensions/source/resource/res_services.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -78,7 +78,7 @@ sal_Bool SAL_CALL component_writeInfo( void * /*pServiceManager*/, XRegistryKey Reference< XRegistryKey > xNewKey = pRegistryKey->createKey( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/") ) + loop->sImplementationName + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES" ) ) ); - + for( sal_Int32 i = 0; i < loop->aSupportedServices.getLength(); ++i ) xNewKey->createKey( loop->aSupportedServices.getConstArray()[i]); @@ -91,7 +91,7 @@ sal_Bool SAL_CALL component_writeInfo( void * /*pServiceManager*/, XRegistryKey xNewKey->setStringValue( loop->aSupportedServices[ 0 ] ); } } - + return sal_True; } catch (Exception &) @@ -124,7 +124,7 @@ void * SAL_CALL component_getFactory( } } return pRet; -} +} } // extern "C" diff --git a/extensions/source/resource/res_services.hxx b/extensions/source/resource/res_services.hxx index ac61f0e423ac..3f47764e51ba 100644 --- a/extensions/source/resource/res_services.hxx +++ b/extensions/source/resource/res_services.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/resource/resource.cxx b/extensions/source/resource/resource.cxx index e5a61e69e376..8ebd503c0d98 100644 --- a/extensions/source/resource/resource.cxx +++ b/extensions/source/resource/resource.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -31,9 +31,9 @@ #include "res_services.hxx" #include <osl/mutex.hxx> -#include <uno/lbnames.h> // CPPU_CURRENT_LANGUAGE_BINDING_NAME macro, which specify the environment type -#include <cppuhelper/factory.hxx> // helper for factories -#include <cppuhelper/implbase3.hxx> // helper for implementations +#include <uno/lbnames.h> // CPPU_CURRENT_LANGUAGE_BINDING_NAME macro, which specify the environment type +#include <cppuhelper/factory.hxx> // helper for factories +#include <cppuhelper/implbase3.hxx> // helper for implementations #include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/script/XInvocation.hpp> @@ -69,36 +69,36 @@ public: ~ResourceService(); // XServiceInfo - OUString SAL_CALL getImplementationName() throw(); - BOOL SAL_CALL supportsService(const OUString& ServiceName) throw(); - Sequence< OUString > SAL_CALL getSupportedServiceNames(void) throw(); + OUString SAL_CALL getImplementationName() throw(); + BOOL SAL_CALL supportsService(const OUString& ServiceName) throw(); + Sequence< OUString > SAL_CALL getSupportedServiceNames(void) throw(); static Sequence< OUString > getSupportedServiceNames_Static(void) throw(); - static OUString getImplementationName_Static() throw() + static OUString getImplementationName_Static() throw() { return OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.extensions.ResourceService")); } static Reference< XInterface > Create( const Reference< XComponentContext >& _rxContext ); // XExactName - OUString SAL_CALL getExactName( const OUString & ApproximateName ) throw(RuntimeException); + OUString SAL_CALL getExactName( const OUString & ApproximateName ) throw(RuntimeException); // XInvokation Reference< XIntrospectionAccess > SAL_CALL getIntrospection(void) throw(RuntimeException); - Any SAL_CALL invoke(const OUString& FunctionName, const Sequence< Any >& Params, Sequence< sal_Int16 >& OutParamIndex, Sequence< Any >& OutParam) throw(IllegalArgumentException, CannotConvertException, InvocationTargetException, RuntimeException); - void SAL_CALL setValue(const OUString& PropertyName, const Any& Value) throw(UnknownPropertyException, CannotConvertException, InvocationTargetException, RuntimeException); - Any SAL_CALL getValue(const OUString& PropertyName) throw(UnknownPropertyException, RuntimeException); - BOOL SAL_CALL hasMethod(const OUString& Name) throw(RuntimeException); - BOOL SAL_CALL hasProperty(const OUString& Name) throw(RuntimeException); + Any SAL_CALL invoke(const OUString& FunctionName, const Sequence< Any >& Params, Sequence< sal_Int16 >& OutParamIndex, Sequence< Any >& OutParam) throw(IllegalArgumentException, CannotConvertException, InvocationTargetException, RuntimeException); + void SAL_CALL setValue(const OUString& PropertyName, const Any& Value) throw(UnknownPropertyException, CannotConvertException, InvocationTargetException, RuntimeException); + Any SAL_CALL getValue(const OUString& PropertyName) throw(UnknownPropertyException, RuntimeException); + BOOL SAL_CALL hasMethod(const OUString& Name) throw(RuntimeException); + BOOL SAL_CALL hasProperty(const OUString& Name) throw(RuntimeException); private: - Reference< XTypeConverter > getTypeConverter() const; - Reference< XInvocation > getDefaultInvocation() const; - - Reference< XMultiServiceFactory > xSMgr; - Reference< XInvocation > xDefaultInvocation; - Reference< XTypeConverter > xTypeConverter; - OUString aFileName; - ResMgr * pResMgr; + Reference< XTypeConverter > getTypeConverter() const; + Reference< XInvocation > getDefaultInvocation() const; + + Reference< XMultiServiceFactory > xSMgr; + Reference< XInvocation > xDefaultInvocation; + Reference< XTypeConverter > xTypeConverter; + OUString aFileName; + ResMgr * pResMgr; }; @@ -187,7 +187,7 @@ Reference< XInvocation > ResourceService::getDefaultInvocation() const } // XExactName -OUString SAL_CALL ResourceService::getExactName( const OUString & ApproximateName ) throw(RuntimeException) +OUString SAL_CALL ResourceService::getExactName( const OUString & ApproximateName ) throw(RuntimeException) { OUString aName( ApproximateName ); aName = aName.toAsciiLowerCase(); @@ -212,7 +212,7 @@ OUString SAL_CALL ResourceService::getExactName( const OUString & Approximate } // XInvokation -Reference< XIntrospectionAccess > SAL_CALL ResourceService::getIntrospection(void) +Reference< XIntrospectionAccess > SAL_CALL ResourceService::getIntrospection(void) throw(RuntimeException) { Reference< XInvocation > xI = getDefaultInvocation(); @@ -224,9 +224,9 @@ Reference< XIntrospectionAccess > SAL_CALL ResourceService::getIntrospection(voi // XInvokation Any SAL_CALL ResourceService::invoke ( - const OUString& FunctionName, - const Sequence< Any >& Params, - Sequence< sal_Int16 >& OutParamIndex, + const OUString& FunctionName, + const Sequence< Any >& Params, + Sequence< sal_Int16 >& OutParamIndex, Sequence< Any >& OutParam ) throw(IllegalArgumentException, CannotConvertException, InvocationTargetException, RuntimeException) @@ -245,16 +245,16 @@ Any SAL_CALL ResourceService::invoke throw IllegalArgumentException(); if( !pResMgr ) throw IllegalArgumentException(); - + Sequence< OUString > aStrings( Params.getLength() ); Sequence< sal_Bool > aBools( Params.getLength() ); const Any* pIn = Params.getConstArray(); OUString* pOutString = aStrings.getArray(); sal_Bool* pOutBool = aBools.getArray(); - + Reference< XTypeConverter > xC = getTypeConverter(); bool bGetBranch = FunctionName.equalsAscii( "getString" ) || FunctionName.equalsAscii( "getStrings" ); - + SolarMutexGuard aGuard; for( sal_Int32 n = 0; n < nElements; n++ ) { @@ -270,7 +270,7 @@ Any SAL_CALL ResourceService::invoke } if( nId > 0xFFFF || nId < 0 ) throw IllegalArgumentException(); - + if( bGetBranch ) { ResId aId( (USHORT)nId, *pResMgr ); @@ -321,7 +321,7 @@ Any SAL_CALL ResourceService::invoke else throw CannotConvertException(); } - + if( FunctionName.equalsAscii("getStringList") ) { ResId aId( (USHORT)nId, *pResMgr ); @@ -368,7 +368,7 @@ Any SAL_CALL ResourceService::invoke } // XInvokation -void SAL_CALL ResourceService::setValue(const OUString& PropertyName, const Any& Value) +void SAL_CALL ResourceService::setValue(const OUString& PropertyName, const Any& Value) throw(UnknownPropertyException, CannotConvertException, InvocationTargetException, RuntimeException) { if( PropertyName.equalsAscii("FileName") ) @@ -405,7 +405,7 @@ void SAL_CALL ResourceService::setValue(const OUString& PropertyName, const Any& } // XInvokation -Any SAL_CALL ResourceService::getValue(const OUString& PropertyName) +Any SAL_CALL ResourceService::getValue(const OUString& PropertyName) throw(UnknownPropertyException, RuntimeException) { SolarMutexGuard aGuard; @@ -420,7 +420,7 @@ Any SAL_CALL ResourceService::getValue(const OUString& PropertyName) } // XInvokation -BOOL SAL_CALL ResourceService::hasMethod(const OUString& Name) +BOOL SAL_CALL ResourceService::hasMethod(const OUString& Name) throw(RuntimeException) { if( Name.equalsAscii("getString") || @@ -442,7 +442,7 @@ BOOL SAL_CALL ResourceService::hasMethod(const OUString& Name) } // XInvokation -BOOL SAL_CALL ResourceService::hasProperty(const OUString& Name) +BOOL SAL_CALL ResourceService::hasProperty(const OUString& Name) throw(RuntimeException) { if( Name.equalsAscii("FileName") ) diff --git a/extensions/source/scanner/grid.cxx b/extensions/source/scanner/grid.cxx index 61f52b916e5d..df48ec6cf155 100644 --- a/extensions/source/scanner/grid.cxx +++ b/extensions/source/scanner/grid.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -45,14 +45,14 @@ ResId SaneResId( sal_uInt32 ); /*********************************************************************** * - * GridWindow + * GridWindow * ***********************************************************************/ // --------------------------------------------------------------------- -GridWindow::GridWindow(double* pXValues, double* pYValues, int nValues, Window* pParent, BOOL bCutValues ) -: ModalDialog( pParent, SaneResId( GRID_DIALOG ) ), +GridWindow::GridWindow(double* pXValues, double* pYValues, int nValues, Window* pParent, BOOL bCutValues ) +: ModalDialog( pParent, SaneResId( GRID_DIALOG ) ), m_aGridArea( 50, 15, 100, 100 ), m_pXValues( pXValues ), m_pOrigYValues( pYValues ), @@ -272,7 +272,7 @@ void GridWindow::computeNew() std::sort(m_aHandles.begin(), m_aHandles.end()); const int nSorted = m_aHandles.size(); int i; - + // get node arrays double* nodex = new double[ nSorted ]; double* nodey = new double[ nSorted ]; diff --git a/extensions/source/scanner/grid.hrc b/extensions/source/scanner/grid.hrc index 480598bf6c4f..fa364b909102 100644 --- a/extensions/source/scanner/grid.hrc +++ b/extensions/source/scanner/grid.hrc @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -27,16 +27,16 @@ #ifndef GRID_HRC #define GRID_HRC -#define GRID_DIALOG 1100 -#define GRID_DIALOG_OK_BTN 1 -#define GRID_DIALOG_CANCEL_BTN 2 -#define GRID_DIALOG_RESET_BTN 3 -#define GRID_DIALOG_TYPE_BOX 4 -#define GRID_DIALOG_HANDLE_BMP 5 +#define GRID_DIALOG 1100 +#define GRID_DIALOG_OK_BTN 1 +#define GRID_DIALOG_CANCEL_BTN 2 +#define GRID_DIALOG_RESET_BTN 3 +#define GRID_DIALOG_TYPE_BOX 4 +#define GRID_DIALOG_HANDLE_BMP 5 -#define RESET_TYPE_LINEAR_ASCENDING 10 -#define RESET_TYPE_LINEAR_DESCENDING 11 -#define RESET_TYPE_RESET 12 -#define RESET_TYPE_EXPONENTIAL 13 +#define RESET_TYPE_LINEAR_ASCENDING 10 +#define RESET_TYPE_LINEAR_DESCENDING 11 +#define RESET_TYPE_RESET 12 +#define RESET_TYPE_EXPONENTIAL 13 #endif diff --git a/extensions/source/scanner/grid.hxx b/extensions/source/scanner/grid.hxx index 585f7913fbf4..d598b1a6a469 100644 --- a/extensions/source/scanner/grid.hxx +++ b/extensions/source/scanner/grid.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -38,21 +38,21 @@ class GridWindow : public ModalDialog // helper class for handles struct impHandle { - Point maPos; - sal_uInt16 mnOffX; - sal_uInt16 mnOffY; + Point maPos; + sal_uInt16 mnOffX; + sal_uInt16 mnOffY; - impHandle(const Point& rPos, sal_uInt16 nX, sal_uInt16 nY) - : maPos(rPos), mnOffX(nX), mnOffY(nY) + impHandle(const Point& rPos, sal_uInt16 nX, sal_uInt16 nY) + : maPos(rPos), mnOffX(nX), mnOffY(nY) { } - - bool operator<(const impHandle& rComp) const - { - return (maPos.X() < rComp.maPos.X()); + + bool operator<(const impHandle& rComp) const + { + return (maPos.X() < rComp.maPos.X()); } - void draw(Window& rWin, const BitmapEx& rBitmapEx) + void draw(Window& rWin, const BitmapEx& rBitmapEx) { const Point aOffset(rWin.PixelToLogic(Point(mnOffX, mnOffY))); rWin.DrawBitmapEx(maPos - aOffset, rBitmapEx); @@ -66,39 +66,39 @@ class GridWindow : public ModalDialog } }; - Rectangle m_aGridArea; + Rectangle m_aGridArea; - double m_fMinX; - double m_fMinY; - double m_fMaxX; - double m_fMaxY; + double m_fMinX; + double m_fMinY; + double m_fMaxX; + double m_fMaxY; - double m_fChunkX; - double m_fMinChunkX; - double m_fChunkY; - double m_fMinChunkY; + double m_fChunkX; + double m_fMinChunkX; + double m_fChunkY; + double m_fMinChunkY; - double* m_pXValues; - double* m_pOrigYValues; - int m_nValues; - double* m_pNewYValues; + double* m_pXValues; + double* m_pOrigYValues; + int m_nValues; + double* m_pNewYValues; - sal_uInt16 m_BmOffX; - sal_uInt16 m_BmOffY; + sal_uInt16 m_BmOffX; + sal_uInt16 m_BmOffY; - BOOL m_bCutValues; + BOOL m_bCutValues; // stuff for handles - std::vector< impHandle > m_aHandles; - sal_uInt32 m_nDragIndex; + std::vector< impHandle > m_aHandles; + sal_uInt32 m_nDragIndex; - BitmapEx m_aMarkerBitmap; + BitmapEx m_aMarkerBitmap; - OKButton m_aOKButton; - CancelButton m_aCancelButton; + OKButton m_aOKButton; + CancelButton m_aCancelButton; - ListBox m_aResetTypeBox; - PushButton m_aResetButton; + ListBox m_aResetTypeBox; + PushButton m_aResetButton; Point transform( double x, double y ); diff --git a/extensions/source/scanner/grid.src b/extensions/source/scanner/grid.src index e7e8128cbc84..ddf593ef77ce 100644 --- a/extensions/source/scanner/grid.src +++ b/extensions/source/scanner/grid.src @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -28,10 +28,10 @@ ModalDialog GRID_DIALOG { - OutputSize = TRUE ; - SVLook = TRUE ; - Pos = MAP_APPFONT ( 10 , 10 ) ; - Size = MAP_APPFONT ( 300, 200 ) ; + OutputSize = TRUE ; + SVLook = TRUE ; + Pos = MAP_APPFONT ( 10 , 10 ) ; + Size = MAP_APPFONT ( 300, 200 ) ; Moveable = TRUE ; Closeable = TRUE ; @@ -43,13 +43,13 @@ ModalDialog GRID_DIALOG }; CancelButton GRID_DIALOG_CANCEL_BTN { - Pos = MAP_APPFONT ( 245 , 25 ) ; - Size = MAP_APPFONT ( 50 , 15 ) ; + Pos = MAP_APPFONT ( 245 , 25 ) ; + Size = MAP_APPFONT ( 50 , 15 ) ; }; ListBox GRID_DIALOG_TYPE_BOX { - Border = TRUE ; - Dropdown = TRUE ; + Border = TRUE ; + Dropdown = TRUE ; Pos = MAP_APPFONT( 245, 45 ); Size = MAP_APPFONT( 50, 130 ); }; diff --git a/extensions/source/scanner/sane.cxx b/extensions/source/scanner/sane.cxx index d6df2a30644a..717cf4c6140a 100644 --- a/extensions/source/scanner/sane.cxx +++ b/extensions/source/scanner/sane.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -60,63 +60,63 @@ inline void dbg_msg( const char* pString, ... ) } #define FAIL_SHUTDOWN_STATE( x, y, z ) \ - if( x != SANE_STATUS_GOOD ) \ - { \ - dump_state( "%s returned error %d (%s)\n", \ - y, x, p_strstatus( x ) ); \ - DeInit(); \ - return z; \ + if( x != SANE_STATUS_GOOD ) \ + { \ + dump_state( "%s returned error %d (%s)\n", \ + y, x, p_strstatus( x ) ); \ + DeInit(); \ + return z; \ } #define FAIL_STATE( x, y, z ) \ - if( x != SANE_STATUS_GOOD ) \ - { \ - dump_state( "%s returned error %d (%s)\n", \ - y, x, p_strstatus( x ) ); \ - return z; \ + if( x != SANE_STATUS_GOOD ) \ + { \ + dump_state( "%s returned error %d (%s)\n", \ + y, x, p_strstatus( x ) ); \ + return z; \ } #define DUMP_STATE( x, y ) \ - if( x != SANE_STATUS_GOOD ) \ - { \ - dump_state( "%s returned error %d (%s)\n", \ - y, x, p_strstatus( x ) ); \ + if( x != SANE_STATUS_GOOD ) \ + { \ + dump_state( "%s returned error %d (%s)\n", \ + y, x, p_strstatus( x ) ); \ } #define CHECK_STATE( x, y ) \ - if( x != SANE_STATUS_GOOD ) \ - { \ - dump_state( "%s returned error %d (%s)\n", \ - y, x, p_strstatus( x ) ); \ - } \ + if( x != SANE_STATUS_GOOD ) \ + { \ + dump_state( "%s returned error %d (%s)\n", \ + y, x, p_strstatus( x ) ); \ + } \ else -int Sane::nRefCount = 0; +int Sane::nRefCount = 0; oslModule Sane::pSaneLib = 0; -SANE_Int Sane::nVersion = 0; -SANE_Device** Sane::ppDevices = 0; -int Sane::nDevices = 0; +SANE_Int Sane::nVersion = 0; +SANE_Device** Sane::ppDevices = 0; +int Sane::nDevices = 0; -SANE_Status (*Sane::p_init)( SANE_Int*, +SANE_Status (*Sane::p_init)( SANE_Int*, SANE_Auth_Callback ) = 0; -void (*Sane::p_exit)() = 0; -SANE_Status (*Sane::p_get_devices)( const SANE_Device***, +void (*Sane::p_exit)() = 0; +SANE_Status (*Sane::p_get_devices)( const SANE_Device***, SANE_Bool ) = 0; -SANE_Status (*Sane::p_open)( SANE_String_Const, SANE_Handle ) = 0; -void (*Sane::p_close)( SANE_Handle ) = 0; +SANE_Status (*Sane::p_open)( SANE_String_Const, SANE_Handle ) = 0; +void (*Sane::p_close)( SANE_Handle ) = 0; const SANE_Option_Descriptor* (*Sane::p_get_option_descriptor)( SANE_Handle, SANE_Int ) = 0; -SANE_Status (*Sane::p_control_option)( SANE_Handle, SANE_Int, +SANE_Status (*Sane::p_control_option)( SANE_Handle, SANE_Int, SANE_Action, void*, SANE_Int* ) = 0; -SANE_Status (*Sane::p_get_parameters)( SANE_Handle, +SANE_Status (*Sane::p_get_parameters)( SANE_Handle, SANE_Parameters* ) = 0; -SANE_Status (*Sane::p_start)( SANE_Handle ) = 0; -SANE_Status (*Sane::p_read)( SANE_Handle, SANE_Byte*, SANE_Int, +SANE_Status (*Sane::p_start)( SANE_Handle ) = 0; +SANE_Status (*Sane::p_read)( SANE_Handle, SANE_Byte*, SANE_Int, SANE_Int* ) = 0; -void (*Sane::p_cancel)( SANE_Handle ) = 0; -SANE_Status (*Sane::p_set_io_mode)( SANE_Handle, SANE_Bool ) = 0; -SANE_Status (*Sane::p_get_select_fd)( SANE_Handle, SANE_Int* ) = 0; +void (*Sane::p_cancel)( SANE_Handle ) = 0; +SANE_Status (*Sane::p_set_io_mode)( SANE_Handle, SANE_Bool ) = 0; +SANE_Status (*Sane::p_get_select_fd)( SANE_Handle, SANE_Int* ) = 0; SANE_String_Const (*Sane::p_strstatus)( SANE_Status ) = 0; static BOOL bSaneSymbolLoadFailed = FALSE; @@ -136,8 +136,8 @@ inline oslGenericFunction Sane::LoadSymbol( const char* pSymbolname ) SANE_Status Sane::ControlOption( int nOption, SANE_Action nAction, void* pData ) { - SANE_Status nStatus = SANE_STATUS_GOOD; - SANE_Int nInfo = 0; + SANE_Status nStatus = SANE_STATUS_GOOD; + SANE_Int nInfo = 0; nStatus = p_control_option( maHandle, (SANE_Int)nOption, nAction, pData, &nInfo ); @@ -160,7 +160,7 @@ SANE_Status Sane::ControlOption( int nOption, SANE_Action nAction, pAction ); } #endif -// if( nInfo & ( SANE_INFO_RELOAD_OPTIONS | SANE_INFO_RELOAD_PARAMS ) ) +// if( nInfo & ( SANE_INFO_RELOAD_OPTIONS | SANE_INFO_RELOAD_PARAMS ) ) if( nInfo & SANE_INFO_RELOAD_OPTIONS ) ReloadOptions(); return nStatus; @@ -567,7 +567,7 @@ BOOL Sane::CheckConsistency( const char* pMes, BOOL bInit ) BOOL Sane::Start( BitmapTransporter& rBitmap ) { int nStream = 0, nLine = 0, i = 0; - SANE_Parameters aParams; + SANE_Parameters aParams; FrameStyleType eType = FrameStyle_Gray; BOOL bSuccess = TRUE; BOOL bWidthSet = FALSE; @@ -575,27 +575,27 @@ BOOL Sane::Start( BitmapTransporter& rBitmap ) if( ! maHandle ) return FALSE; - int nWidthMM = 0; - int nHeightMM = 0; + int nWidthMM = 0; + int nHeightMM = 0; double fTLx, fTLy, fBRx, fBRy, fResl = 0.0; int nOption; - if( ( nOption = GetOptionByName( "tl-x" ) ) != -1 && - GetOptionValue( nOption, fTLx, 0 ) && + if( ( nOption = GetOptionByName( "tl-x" ) ) != -1 && + GetOptionValue( nOption, fTLx, 0 ) && GetOptionUnit( nOption ) == SANE_UNIT_MM ) { - if( ( nOption = GetOptionByName( "br-x" ) ) != -1 && - GetOptionValue( nOption, fBRx, 0 ) && + if( ( nOption = GetOptionByName( "br-x" ) ) != -1 && + GetOptionValue( nOption, fBRx, 0 ) && GetOptionUnit( nOption ) == SANE_UNIT_MM ) { nWidthMM = (int)fabs(fBRx - fTLx); } } - if( ( nOption = GetOptionByName( "tl-y" ) ) != -1 && - GetOptionValue( nOption, fTLy, 0 ) && + if( ( nOption = GetOptionByName( "tl-y" ) ) != -1 && + GetOptionValue( nOption, fTLy, 0 ) && GetOptionUnit( nOption ) == SANE_UNIT_MM ) { - if( ( nOption = GetOptionByName( "br-y" ) ) != -1 && - GetOptionValue( nOption, fBRy, 0 ) && + if( ( nOption = GetOptionByName( "br-y" ) ) != -1 && + GetOptionValue( nOption, fBRy, 0 ) && GetOptionUnit( nOption ) == SANE_UNIT_MM ) { nHeightMM = (int)fabs(fBRy - fTLy); @@ -836,9 +836,9 @@ BOOL Sane::Start( BitmapTransporter& rBitmap ) for( i = 0; i < (aParams.pixels_per_line); i++ ) { UINT8 nRed, nGreen, nBlue; - nRed = _ReadValue( pFrame, aParams.depth ); - nGreen = _ReadValue( pFrame, aParams.depth ); - nBlue = _ReadValue( pFrame, aParams.depth ); + nRed = _ReadValue( pFrame, aParams.depth ); + nGreen = _ReadValue( pFrame, aParams.depth ); + nBlue = _ReadValue( pFrame, aParams.depth ); aConverter << nBlue; aConverter << nGreen; aConverter << nRed; diff --git a/extensions/source/scanner/sane.hxx b/extensions/source/scanner/sane.hxx index fdc5e5011534..7cf91a5b9fc5 100644 --- a/extensions/source/scanner/sane.hxx +++ b/extensions/source/scanner/sane.hxx @@ -41,28 +41,28 @@ class BitmapTransporter : public OWeakObject, AWT::XBitmap { - SvMemoryStream m_aStream; + SvMemoryStream m_aStream; osl::Mutex m_aProtector; public: BitmapTransporter(); - virtual ~BitmapTransporter(); + virtual ~BitmapTransporter(); // XInterface - virtual ANY SAL_CALL queryInterface( const Type & rType ) throw( RuntimeException ); - virtual void SAL_CALL acquire() throw() { OWeakObject::acquire(); } - virtual void SAL_CALL release() throw() { OWeakObject::release(); } + virtual ANY SAL_CALL queryInterface( const Type & rType ) throw( RuntimeException ); + virtual void SAL_CALL acquire() throw() { OWeakObject::acquire(); } + virtual void SAL_CALL release() throw() { OWeakObject::release(); } - virtual AWT::Size SAL_CALL getSize() throw(); - virtual SEQ( sal_Int8 ) SAL_CALL getDIB() throw(); - virtual SEQ( sal_Int8 ) SAL_CALL getMaskDIB() throw() { return SEQ( sal_Int8 )(); } + virtual AWT::Size SAL_CALL getSize() throw(); + virtual SEQ( sal_Int8 ) SAL_CALL getDIB() throw(); + virtual SEQ( sal_Int8 ) SAL_CALL getMaskDIB() throw() { return SEQ( sal_Int8 )(); } // Misc - void lock() { m_aProtector.acquire(); } - void unlock() { m_aProtector.release(); } - SvMemoryStream& getStream() { return m_aStream; } + void lock() { m_aProtector.acquire(); } + void unlock() { m_aProtector.release(); } + SvMemoryStream& getStream() { return m_aStream; } }; // -------- @@ -72,46 +72,46 @@ public: class Sane { private: - static int nRefCount; + static int nRefCount; static oslModule pSaneLib; - static SANE_Status (*p_init)( SANE_Int*, + static SANE_Status (*p_init)( SANE_Int*, SANE_Auth_Callback ); - static void (*p_exit)(); - static SANE_Status (*p_get_devices)( const SANE_Device***, + static void (*p_exit)(); + static SANE_Status (*p_get_devices)( const SANE_Device***, SANE_Bool ); - static SANE_Status (*p_open)( SANE_String_Const, SANE_Handle ); - static void (*p_close)( SANE_Handle ); + static SANE_Status (*p_open)( SANE_String_Const, SANE_Handle ); + static void (*p_close)( SANE_Handle ); static const SANE_Option_Descriptor* (*p_get_option_descriptor)( SANE_Handle, SANE_Int ); - static SANE_Status (*p_control_option)( SANE_Handle, SANE_Int, + static SANE_Status (*p_control_option)( SANE_Handle, SANE_Int, SANE_Action, void*, SANE_Int* ); - static SANE_Status (*p_get_parameters)( SANE_Handle, + static SANE_Status (*p_get_parameters)( SANE_Handle, SANE_Parameters* ); - static SANE_Status (*p_start)( SANE_Handle ); - static SANE_Status (*p_read)( SANE_Handle, SANE_Byte*, SANE_Int, + static SANE_Status (*p_start)( SANE_Handle ); + static SANE_Status (*p_read)( SANE_Handle, SANE_Byte*, SANE_Int, SANE_Int* ); - static void (*p_cancel)( SANE_Handle ); - static SANE_Status (*p_set_io_mode)( SANE_Handle, SANE_Bool ); - static SANE_Status (*p_get_select_fd)( SANE_Handle, SANE_Int* ); + static void (*p_cancel)( SANE_Handle ); + static SANE_Status (*p_set_io_mode)( SANE_Handle, SANE_Bool ); + static SANE_Status (*p_get_select_fd)( SANE_Handle, SANE_Int* ); static SANE_String_Const (*p_strstatus)( SANE_Status ); - static SANE_Int nVersion; - static SANE_Device** ppDevices; - static int nDevices; + static SANE_Int nVersion; + static SANE_Device** ppDevices; + static int nDevices; - const SANE_Option_Descriptor** mppOptions; - int mnOptions; - int mnDevice; - SANE_Handle maHandle; + const SANE_Option_Descriptor** mppOptions; + int mnOptions; + int mnDevice; + SANE_Handle maHandle; - Link maReloadOptionsLink; + Link maReloadOptionsLink; inline oslGenericFunction LoadSymbol( const char* ); - void Init(); - void DeInit(); + void Init(); + void DeInit(); SANE_Status ControlOption( int, SANE_Action, void* ); @@ -121,64 +121,64 @@ public: Sane(); ~Sane(); - static BOOL IsSane() + static BOOL IsSane() { return pSaneLib ? TRUE : FALSE; } - BOOL IsOpen() + BOOL IsOpen() { return maHandle ? TRUE : FALSE; } - static int CountDevices() + static int CountDevices() { return nDevices; } - static String GetName( int n ) + static String GetName( int n ) { return String( ppDevices[n]->name ? ppDevices[n]->name : "", osl_getThreadTextEncoding() ); } - static String GetVendor( int n ) + static String GetVendor( int n ) { return String( ppDevices[n]->vendor ? ppDevices[n]->vendor : "", osl_getThreadTextEncoding() ); } - static String GetModel( int n ) + static String GetModel( int n ) { return String( ppDevices[n]->model ? ppDevices[n]->model : "", osl_getThreadTextEncoding() ); } - static String GetType( int n ) + static String GetType( int n ) { return String( ppDevices[n]->type ? ppDevices[n]->type : "", osl_getThreadTextEncoding() ); } - String GetOptionName( int n ) + String GetOptionName( int n ) { return String( mppOptions[n]->name ? (char*)mppOptions[n]->name : "", osl_getThreadTextEncoding() ); } - String GetOptionTitle( int n ) + String GetOptionTitle( int n ) { return String( mppOptions[n]->title ? (char*)mppOptions[n]->title : "", osl_getThreadTextEncoding() ); } - SANE_Value_Type GetOptionType( int n ) + SANE_Value_Type GetOptionType( int n ) { return mppOptions[n]->type; } - SANE_Unit GetOptionUnit( int n ) + SANE_Unit GetOptionUnit( int n ) { return mppOptions[n]->unit; } - String GetOptionUnitName( int n ); - SANE_Int GetOptionCap( int n ) + String GetOptionUnitName( int n ); + SANE_Int GetOptionCap( int n ) { return mppOptions[n]->cap; } SANE_Constraint_Type GetOptionConstraintType( int n ) { return mppOptions[n]->constraint_type; } - const char** GetStringConstraint( int n ) + const char** GetStringConstraint( int n ) { return (const char**)mppOptions[n]->constraint.string_list; } - int GetRange( int, double*& ); + int GetRange( int, double*& ); - inline int GetOptionElements( int n ); - int GetOptionByName( const char* ); - BOOL GetOptionValue( int, BOOL& ); - BOOL GetOptionValue( int, ByteString& ); - BOOL GetOptionValue( int, double&, int nElement = 0 ); - BOOL GetOptionValue( int, double* ); + inline int GetOptionElements( int n ); + int GetOptionByName( const char* ); + BOOL GetOptionValue( int, BOOL& ); + BOOL GetOptionValue( int, ByteString& ); + BOOL GetOptionValue( int, double&, int nElement = 0 ); + BOOL GetOptionValue( int, double* ); - BOOL SetOptionValue( int, BOOL ); - BOOL SetOptionValue( int, const String& ); - BOOL SetOptionValue( int, double, int nElement = 0 ); - BOOL SetOptionValue( int, double* ); + BOOL SetOptionValue( int, BOOL ); + BOOL SetOptionValue( int, const String& ); + BOOL SetOptionValue( int, double, int nElement = 0 ); + BOOL SetOptionValue( int, double* ); - BOOL ActivateButtonOption( int ); + BOOL ActivateButtonOption( int ); - int CountOptions() { return mnOptions; } - int GetDeviceNumber() { return mnDevice; } + int CountOptions() { return mnOptions; } + int GetDeviceNumber() { return mnDevice; } - BOOL Open( const char* ); - BOOL Open( int ); - void Close(); - void ReloadDevices(); - void ReloadOptions(); + BOOL Open( const char* ); + BOOL Open( int ); + void Close(); + void ReloadDevices(); + void ReloadOptions(); - BOOL Start( BitmapTransporter& ); + BOOL Start( BitmapTransporter& ); - inline Link SetReloadOptionsHdl( const Link& rLink ); + inline Link SetReloadOptionsHdl( const Link& rLink ); }; inline int Sane::GetOptionElements( int n ) @@ -191,7 +191,7 @@ inline int Sane::GetOptionElements( int n ) return 1; } -inline Link Sane::SetReloadOptionsHdl( const Link& rLink ) +inline Link Sane::SetReloadOptionsHdl( const Link& rLink ) { Link aRet = maReloadOptionsLink; maReloadOptionsLink = rLink; diff --git a/extensions/source/scanner/sanedlg.cxx b/extensions/source/scanner/sanedlg.cxx index d1e8ed07ad58..98c654695ee4 100644 --- a/extensions/source/scanner/sanedlg.cxx +++ b/extensions/source/scanner/sanedlg.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -122,10 +122,10 @@ SaneDlg::SaneDlg( Window* pParent, Sane& rSane ) : Bitmap( SaneResId( RID_SCAN_BITMAP_PLUS ) ), Bitmap( SaneResId( RID_SCAN_BITMAP_MINUS ) ) ); - maOptionBox.SetWindowBits( WB_HASLINES | - WB_HASBUTTONS | - WB_NOINITIALSELECTION | - WB_HASBUTTONSATROOT | + maOptionBox.SetWindowBits( WB_HASLINES | + WB_HASBUTTONS | + WB_NOINITIALSELECTION | + WB_HASBUTTONSATROOT | WB_HASLINESATROOT ); FreeResource(); @@ -225,9 +225,9 @@ void SaneDlg::InitFields() maReslBox.SetMax( (long)pDouble[1] ); maReslBox.InsertValue( (long)pDouble[0] ); // mh@openoffice.org: issue 68557: Can only select 75 and 2400 dpi in Scanner dialogue - // scanner allows random setting of dpi resolution, a slider might be useful + // scanner allows random setting of dpi resolution, a slider might be useful // support that - // workaround: offer at least some more standard dpi resolution between + // workaround: offer at least some more standard dpi resolution between // min and max value int bGot300 = 0; for ( int nRes = (long) pDouble[0] * 2; nRes < (long) pDouble[1]; nRes = nRes * 2 ) @@ -291,8 +291,8 @@ void SaneDlg::InitFields() } switch( i ) { case 0: maTopLeft.X() = (int)fValue;break; - case 1: maTopLeft.Y() = (int)fValue;break; - case 2: maBottomRight.X() = (int)fValue;break; + case 1: maTopLeft.Y() = (int)fValue;break; + case 2: maBottomRight.X() = (int)fValue;break; case 3: maBottomRight.Y() = (int)fValue;break; } } @@ -460,7 +460,7 @@ IMPL_LINK( SaneDlg, ClickBtnHdl, Button*, pButton ) aGrid.setBoundings( 0, mfMin, nElements, mfMax ); if( aGrid.Execute() && aGrid.getNewYValues() ) mrSane.SetOptionValue( mnCurrentOption, aGrid.getNewYValues() ); - + delete [] x; delete [] y; } @@ -537,7 +537,7 @@ IMPL_LINK( SaneDlg, OptionsBoxSelectHdl, SvTreeListBox*, pBox ) SANE_Constraint_Type nConstraint; switch( nType ) { - case SANE_TYPE_BOOL: EstablishBoolOption();break; + case SANE_TYPE_BOOL: EstablishBoolOption();break; case SANE_TYPE_STRING: nConstraint = mrSane.GetOptionConstraintType( mnCurrentOption ); if( nConstraint == SANE_CONSTRAINT_STRING_LIST ) @@ -931,20 +931,20 @@ void SaneDlg::MouseMove( const MouseEvent& rMEvt ) aMousePos = GetPixelPos( aLogicPos ); switch( meDragDirection ) { - case TopLeft: maTopLeft = aMousePos; break; - case Top: maTopLeft.Y() = aMousePos.Y(); break; + case TopLeft: maTopLeft = aMousePos; break; + case Top: maTopLeft.Y() = aMousePos.Y(); break; case TopRight: maTopLeft.Y() = aMousePos.Y(); maBottomRight.X() = aMousePos.X(); break; - case Right: maBottomRight.X() = aMousePos.X(); break; - case BottomRight: maBottomRight = aMousePos; break; - case Bottom: maBottomRight.Y() = aMousePos.Y(); break; + case Right: maBottomRight.X() = aMousePos.X(); break; + case BottomRight: maBottomRight = aMousePos; break; + case Bottom: maBottomRight.Y() = aMousePos.Y(); break; case BottomLeft: maTopLeft.X() = aMousePos.X(); maBottomRight.Y() = aMousePos.Y(); break; - case Left: maTopLeft.X() = aMousePos.X(); break; + case Left: maTopLeft.X() = aMousePos.X(); break; default: break; } int nSwap; diff --git a/extensions/source/scanner/sanedlg.hrc b/extensions/source/scanner/sanedlg.hrc index ca893122c9a9..711caff9ac2b 100644 --- a/extensions/source/scanner/sanedlg.hrc +++ b/extensions/source/scanner/sanedlg.hrc @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -27,56 +27,56 @@ #ifndef _SVT_SANEDLG_HRC #define _SVT_SANEDLG_HRC -#define RID_SANE_DIALOG 1000 -#define RID_SCAN_OK 1 -#define RID_SCAN_CANCEL 2 -#define RID_DEVICEINFO_BTN 3 -#define RID_PREVIEW_BOX 4 -#define RID_DEVICE_BOX_TXT 5 -#define RID_DEVICE_BOX 6 -#define RID_SCANAREA_BOX 7 -#define RID_SCAN_LEFT_TXT 8 -#define RID_SCAN_LEFT_BOX 9 -#define RID_SCAN_TOP_BOX 10 -#define RID_SCAN_TOP_TXT 11 -#define RID_SCAN_RIGHT_TXT 12 -#define RID_SCAN_RIGHT_BOX 13 -#define RID_SCAN_BOTTOM_TXT 14 -#define RID_SCAN_BOTTOM_BOX 15 -#define RID_SCAN_RESOLUTION_TXT 16 -#define RID_SCAN_RESOLUTION_BOX 17 -#define RID_PREVIEW_BTN 18 -#define RID_SCAN_OPTION_BOX 19 -#define RID_SCAN_OPTIONTITLE_TXT 20 -#define RID_SCAN_OPTION_DESC_TXT 21 -#define RID_SCAN_BOOL_OPTION_BOX 22 -#define RID_SCAN_OPTION_TXT 23 -#define RID_SCAN_STRING_OPTION_EDT 24 -#define RID_SCAN_QUANTUM_RANGE_BOX 25 -#define RID_SCAN_STRING_RANGE_BOX 26 -#define RID_SCAN_NUMERIC_OPTION_EDT 27 -#define RID_SCAN_BUTTON_OPTION_BTN 28 -#define RID_SCAN_NUMERIC_VECTOR_BOX 29 -#define RID_SCAN_NUMERIC_VECTOR_TXT 30 -#define RID_SCAN_BITMAP_PLUS 31 -#define RID_SCAN_BITMAP_MINUS 32 -#define RID_SCAN_ADVANCED_BOX 33 -#define RID_SCAN_ADVANCED_TXT 34 +#define RID_SANE_DIALOG 1000 +#define RID_SCAN_OK 1 +#define RID_SCAN_CANCEL 2 +#define RID_DEVICEINFO_BTN 3 +#define RID_PREVIEW_BOX 4 +#define RID_DEVICE_BOX_TXT 5 +#define RID_DEVICE_BOX 6 +#define RID_SCANAREA_BOX 7 +#define RID_SCAN_LEFT_TXT 8 +#define RID_SCAN_LEFT_BOX 9 +#define RID_SCAN_TOP_BOX 10 +#define RID_SCAN_TOP_TXT 11 +#define RID_SCAN_RIGHT_TXT 12 +#define RID_SCAN_RIGHT_BOX 13 +#define RID_SCAN_BOTTOM_TXT 14 +#define RID_SCAN_BOTTOM_BOX 15 +#define RID_SCAN_RESOLUTION_TXT 16 +#define RID_SCAN_RESOLUTION_BOX 17 +#define RID_PREVIEW_BTN 18 +#define RID_SCAN_OPTION_BOX 19 +#define RID_SCAN_OPTIONTITLE_TXT 20 +#define RID_SCAN_OPTION_DESC_TXT 21 +#define RID_SCAN_BOOL_OPTION_BOX 22 +#define RID_SCAN_OPTION_TXT 23 +#define RID_SCAN_STRING_OPTION_EDT 24 +#define RID_SCAN_QUANTUM_RANGE_BOX 25 +#define RID_SCAN_STRING_RANGE_BOX 26 +#define RID_SCAN_NUMERIC_OPTION_EDT 27 +#define RID_SCAN_BUTTON_OPTION_BTN 28 +#define RID_SCAN_NUMERIC_VECTOR_BOX 29 +#define RID_SCAN_NUMERIC_VECTOR_TXT 30 +#define RID_SCAN_BITMAP_PLUS 31 +#define RID_SCAN_BITMAP_MINUS 32 +#define RID_SCAN_ADVANCED_BOX 33 +#define RID_SCAN_ADVANCED_TXT 34 -#define RID_SANE_DEVICEINFO_TXT 1001 -#define RID_SANE_SCANERROR_TXT 1002 -#define RID_SANE_NORESOLUTIONOPTION_TXT 1003 -#define RID_SANE_NOSANELIB_TXT 1004 +#define RID_SANE_DEVICEINFO_TXT 1001 +#define RID_SANE_SCANERROR_TXT 1002 +#define RID_SANE_NORESOLUTIONOPTION_TXT 1003 +#define RID_SANE_NOSANELIB_TXT 1004 -#define SCAN_AREA_TOP 17 -#define SCAN_AREA_LEFT 8 +#define SCAN_AREA_TOP 17 +#define SCAN_AREA_LEFT 8 #define PREVIEW_UPPER_LEFT SCAN_AREA_LEFT #define PREVIEW_UPPER_TOP SCAN_AREA_TOP + 80 #define PREVIEW_WIDTH 113 #define PREVIEW_HEIGHT 160 -#define PREVIEW_BOTTOM PREVIEW_UPPER_TOP + PREVIEW_HEIGHT -#define PREVIEW_RIGHT PREVIEW_UPPER_LEFT + PREVIEW_WIDTH -#define SECOND_COLUMN PREVIEW_WIDTH + 20 -#define THIRD_COLUMN SECOND_COLUMN + 135 +#define PREVIEW_BOTTOM PREVIEW_UPPER_TOP + PREVIEW_HEIGHT +#define PREVIEW_RIGHT PREVIEW_UPPER_LEFT + PREVIEW_WIDTH +#define SECOND_COLUMN PREVIEW_WIDTH + 20 +#define THIRD_COLUMN SECOND_COLUMN + 135 #endif diff --git a/extensions/source/scanner/sanedlg.hxx b/extensions/source/scanner/sanedlg.hxx index 8019f5b38d5c..cacd411afdb5 100644 --- a/extensions/source/scanner/sanedlg.hxx +++ b/extensions/source/scanner/sanedlg.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -46,66 +46,66 @@ private: enum DragDirection { TopLeft, Top, TopRight, Right, BottomRight, Bottom, BottomLeft, Left }; - Sane& mrSane; - Bitmap maPreviewBitmap; - Rectangle maPreviewRect; - Point maTopLeft, maBottomRight; - Point maMinTopLeft, maMaxBottomRight; - BOOL mbDragEnable; - BOOL mbIsDragging; - int mnDragMode; - BOOL mbDragDrawn; - DragDirection meDragDirection; - - MapMode maMapMode; - - Link maOldLink; - - OKButton maOKButton; - CancelButton maCancelButton; - PushButton maDeviceInfoButton; - PushButton maPreviewButton; - PushButton maButtonOption; - - FixedText maOptionsTxt; - FixedText maOptionTitle; - FixedText maOptionDescTxt; - FixedText maVectorTxt; - - FixedText maScanLeftTxt; - MetricField maLeftField; - FixedText maScanTopTxt; - MetricField maTopField; - FixedText maRightTxt; - MetricField maRightField; - FixedText maBottomTxt; - MetricField maBottomField; - - FixedText maDeviceBoxTxt; - ListBox maDeviceBox; - FixedText maReslTxt; - NumericBox maReslBox; - FixedText maAdvancedTxt; - CheckBox maAdvancedBox; - - NumericField maVectorBox; - ListBox maQuantumRangeBox; - ListBox maStringRangeBox; - - FixedLine maPreviewBox; - FixedLine maAreaBox; - - CheckBox maBoolCheckBox; - - Edit maStringEdit; - Edit maNumericEdit; - - SvTreeListBox maOptionBox; - - int mnCurrentOption; - int mnCurrentElement; - double* mpRange; - double mfMin, mfMax; + Sane& mrSane; + Bitmap maPreviewBitmap; + Rectangle maPreviewRect; + Point maTopLeft, maBottomRight; + Point maMinTopLeft, maMaxBottomRight; + BOOL mbDragEnable; + BOOL mbIsDragging; + int mnDragMode; + BOOL mbDragDrawn; + DragDirection meDragDirection; + + MapMode maMapMode; + + Link maOldLink; + + OKButton maOKButton; + CancelButton maCancelButton; + PushButton maDeviceInfoButton; + PushButton maPreviewButton; + PushButton maButtonOption; + + FixedText maOptionsTxt; + FixedText maOptionTitle; + FixedText maOptionDescTxt; + FixedText maVectorTxt; + + FixedText maScanLeftTxt; + MetricField maLeftField; + FixedText maScanTopTxt; + MetricField maTopField; + FixedText maRightTxt; + MetricField maRightField; + FixedText maBottomTxt; + MetricField maBottomField; + + FixedText maDeviceBoxTxt; + ListBox maDeviceBox; + FixedText maReslTxt; + NumericBox maReslBox; + FixedText maAdvancedTxt; + CheckBox maAdvancedBox; + + NumericField maVectorBox; + ListBox maQuantumRangeBox; + ListBox maStringRangeBox; + + FixedLine maPreviewBox; + FixedLine maAreaBox; + + CheckBox maBoolCheckBox; + + Edit maStringEdit; + Edit maNumericEdit; + + SvTreeListBox maOptionBox; + + int mnCurrentOption; + int mnCurrentElement; + double* mpRange; + double mfMin, mfMax; DECL_LINK( ClickBtnHdl, Button* ); DECL_LINK( SelectHdl, ListBox* ); @@ -135,7 +135,7 @@ private: // helper BOOL SetAdjustedNumericalValue( const char* pOption, double fValue, int nElement = 0 ); - + virtual void Paint( const Rectangle& ); virtual void MouseMove( const MouseEvent& rMEvt ); virtual void MouseButtonDown( const MouseEvent& rMEvt ); diff --git a/extensions/source/scanner/sanedlg.src b/extensions/source/scanner/sanedlg.src index 2c4cc338ab8a..2b41785c880d 100644 --- a/extensions/source/scanner/sanedlg.src +++ b/extensions/source/scanner/sanedlg.src @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/scanner/scanner.cxx b/extensions/source/scanner/scanner.cxx index e833c4f1d56d..97d8b925c1e4 100644 --- a/extensions/source/scanner/scanner.cxx +++ b/extensions/source/scanner/scanner.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -58,7 +58,7 @@ ScannerManager::~ScannerManager() ANY SAL_CALL ScannerManager::queryInterface( const Type& rType ) throw( RuntimeException ) { - const ANY aRet( cppu::queryInterface( rType, + const ANY aRet( cppu::queryInterface( rType, static_cast< XScannerManager* >( this ), static_cast< AWT::XBitmap* >( this ) ) ); @@ -83,7 +83,7 @@ void SAL_CALL ScannerManager::release() throw() SEQ( sal_Int8 ) SAL_CALL ScannerManager::getMaskDIB() throw() { - return SEQ( sal_Int8 )(); + return SEQ( sal_Int8 )(); } // ----------------------------------------------------------------------------- @@ -98,9 +98,9 @@ OUString ScannerManager::getImplementationName_Static() throw() SEQ( OUString ) ScannerManager::getSupportedServiceNames_Static() throw () { SEQ( OUString ) aSNS( 1 ); - - aSNS.getArray()[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.scanner.ScannerManager" ) ); - + + aSNS.getArray()[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.scanner.ScannerManager" ) ); + return aSNS; } diff --git a/extensions/source/scanner/scanner.hxx b/extensions/source/scanner/scanner.hxx index b263ecaa0802..f8420bd4483f 100644 --- a/extensions/source/scanner/scanner.hxx +++ b/extensions/source/scanner/scanner.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -52,10 +52,10 @@ using namespace com::sun::star::scanner; // - Defines - // ----------- -#define REF( _def_Obj ) Reference< _def_Obj > -#define SEQ( _def_Obj ) Sequence< _def_Obj > -#define ANY Any -#define AWT com::sun::star::awt +#define REF( _def_Obj ) Reference< _def_Obj > +#define SEQ( _def_Obj ) Sequence< _def_Obj > +#define ANY Any +#define AWT com::sun::star::awt // ------------------ // - ScannerManager - @@ -66,42 +66,42 @@ class ScannerManager : public OWeakObject, XScannerManager, AWT::XBitmap protected: osl::Mutex maProtector; - void* mpData; + void* mpData; - void AcquireData(); - void ReleaseData(); + void AcquireData(); + void ReleaseData(); public: ScannerManager(); - virtual ~ScannerManager(); - - // XInterface - virtual ANY SAL_CALL queryInterface( const Type & rType ) throw( RuntimeException ); - virtual void SAL_CALL acquire() throw(); - virtual void SAL_CALL release() throw(); + virtual ~ScannerManager(); + + // XInterface + virtual ANY SAL_CALL queryInterface( const Type & rType ) throw( RuntimeException ); + virtual void SAL_CALL acquire() throw(); + virtual void SAL_CALL release() throw(); // XScannerManager - virtual SEQ( ScannerContext ) SAL_CALL getAvailableScanners() throw(); - virtual BOOL SAL_CALL configureScanner( ScannerContext& scanner_context ) throw( ScannerException ); - virtual void SAL_CALL startScan( const ScannerContext& scanner_context, const REF( com::sun::star::lang::XEventListener )& rxListener ) throw( ScannerException ); - virtual ScanError SAL_CALL getError( const ScannerContext& scanner_context ) throw( ScannerException ); - virtual REF( AWT::XBitmap ) SAL_CALL getBitmap( const ScannerContext& scanner_context ) throw( ScannerException ); + virtual SEQ( ScannerContext ) SAL_CALL getAvailableScanners() throw(); + virtual BOOL SAL_CALL configureScanner( ScannerContext& scanner_context ) throw( ScannerException ); + virtual void SAL_CALL startScan( const ScannerContext& scanner_context, const REF( com::sun::star::lang::XEventListener )& rxListener ) throw( ScannerException ); + virtual ScanError SAL_CALL getError( const ScannerContext& scanner_context ) throw( ScannerException ); + virtual REF( AWT::XBitmap ) SAL_CALL getBitmap( const ScannerContext& scanner_context ) throw( ScannerException ); // XBitmap - virtual AWT::Size SAL_CALL getSize() throw(); - virtual SEQ( sal_Int8 ) SAL_CALL getDIB() throw(); - virtual SEQ( sal_Int8 ) SAL_CALL getMaskDIB() throw(); + virtual AWT::Size SAL_CALL getSize() throw(); + virtual SEQ( sal_Int8 ) SAL_CALL getDIB() throw(); + virtual SEQ( sal_Int8 ) SAL_CALL getMaskDIB() throw(); // Misc - static OUString getImplementationName_Static() throw(); - static Sequence< OUString > getSupportedServiceNames_Static() throw(); + static OUString getImplementationName_Static() throw(); + static Sequence< OUString > getSupportedServiceNames_Static() throw(); - void Lock() { maProtector.acquire(); } - void Unlock() { maProtector.release(); } + void Lock() { maProtector.acquire(); } + void Unlock() { maProtector.release(); } - void* GetData() const { return mpData; } - void SetData( void* pData ) { ReleaseData(); mpData = pData; } + void* GetData() const { return mpData; } + void SetData( void* pData ) { ReleaseData(); mpData = pData; } }; // ----------------------------------------------------------------------------- diff --git a/extensions/source/scanner/scanunx.cxx b/extensions/source/scanner/scanunx.cxx index 7043c3d9a971..0dcf457713b9 100644 --- a/extensions/source/scanner/scanunx.cxx +++ b/extensions/source/scanner/scanunx.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -66,8 +66,8 @@ ANY SAL_CALL BitmapTransporter::queryInterface( const Type& rType ) throw( Runti AWT::Size BitmapTransporter::getSize() throw() { osl::MutexGuard aGuard( m_aProtector ); - int nPreviousPos = m_aStream.Tell(); - AWT::Size aRet; + int nPreviousPos = m_aStream.Tell(); + AWT::Size aRet; // ensure that there is at least a header m_aStream.Seek( STREAM_SEEK_TO_END ); @@ -90,7 +90,7 @@ AWT::Size BitmapTransporter::getSize() throw() SEQ( sal_Int8 ) BitmapTransporter::getDIB() throw() { osl::MutexGuard aGuard( m_aProtector ); - int nPreviousPos = m_aStream.Tell(); + int nPreviousPos = m_aStream.Tell(); // create return value m_aStream.Seek( STREAM_SEEK_TO_END ); @@ -110,11 +110,11 @@ SEQ( sal_Int8 ) BitmapTransporter::getDIB() throw() struct SaneHolder { - Sane m_aSane; - REF( AWT::XBitmap ) m_xBitmap; + Sane m_aSane; + REF( AWT::XBitmap ) m_xBitmap; osl::Mutex m_aProtector; - ScanError m_nError; - bool m_bBusy; + ScanError m_nError; + bool m_bBusy; SaneHolder() : m_nError(ScanError_ScanErrorNone), m_bBusy(false) {} }; @@ -157,9 +157,9 @@ namespace class ScannerThread : public osl::Thread { - boost::shared_ptr<SaneHolder> m_pHolder; - REF( com::sun::star::lang::XEventListener ) m_xListener; - ScannerManager* m_pManager; // just for the disposing call + boost::shared_ptr<SaneHolder> m_pHolder; + REF( com::sun::star::lang::XEventListener ) m_xListener; + ScannerManager* m_pManager; // just for the disposing call public: virtual void run(); @@ -193,9 +193,9 @@ ScannerThread::~ScannerThread() void ScannerThread::run() { - osl::MutexGuard aGuard( m_pHolder->m_aProtector ); - BitmapTransporter* pTransporter = new BitmapTransporter; - REF( XInterface ) aIf( static_cast< OWeakObject* >( pTransporter ) ); + osl::MutexGuard aGuard( m_pHolder->m_aProtector ); + BitmapTransporter* pTransporter = new BitmapTransporter; + REF( XInterface ) aIf( static_cast< OWeakObject* >( pTransporter ) ); m_pHolder->m_xBitmap = REF( AWT::XBitmap )( aIf, UNO_QUERY ); @@ -268,8 +268,8 @@ SEQ( ScannerContext ) ScannerManager::getAvailableScanners() throw() if( Sane::IsSane() ) { SEQ( ScannerContext ) aRet(1); - aRet.getArray()[0].ScannerName = ::rtl::OUString::createFromAscii( "SANE" ); - aRet.getArray()[0].InternalData = 0; + aRet.getArray()[0].ScannerName = ::rtl::OUString::createFromAscii( "SANE" ); + aRet.getArray()[0].InternalData = 0; return aRet; } @@ -306,7 +306,7 @@ BOOL ScannerManager::configureScanner( ScannerContext& scanner_context ) throw( SaneDlg aDlg( NULL, pHolder->m_aSane ); BOOL bRet = (BOOL)aDlg.Execute(); pHolder->m_bBusy = false; - + return bRet; } diff --git a/extensions/source/scanner/scanwin.cxx b/extensions/source/scanner/scanwin.cxx index 457be67d0f9b..a23181a66624 100644 --- a/extensions/source/scanner/scanwin.cxx +++ b/extensions/source/scanner/scanwin.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -61,26 +61,26 @@ using namespace ::com::sun::star; // - Defines - // ----------- -#define TWAIN_SELECT 0x00000001UL -#define TWAIN_ACQUIRE 0x00000002UL -#define TWAIN_TERMINATE 0xFFFFFFFFUL - -#define TWAIN_EVENT_NONE 0x00000000UL -#define TWAIN_EVENT_QUIT 0x00000001UL -#define TWAIN_EVENT_SCANNING 0x00000002UL -#define TWAIN_EVENT_XFER 0x00000004UL - -#define PFUNC (*pDSM) -#define PTWAINMSG MSG* -#define FIXTODOUBLE( nFix ) ((double)nFix.Whole+(double)nFix.Frac/65536.) -#define FIXTOLONG( nFix ) ((long)floor(FIXTODOUBLE(nFix)+0.5)) - -#if defined WIN -#define TWAIN_LIBNAME "TWAIN.DLL" -#define TWAIN_FUNCNAME "DSM_Entry" -#elif defined WNT -#define TWAIN_LIBNAME "TWAIN_32.DLL" -#define TWAIN_FUNCNAME "DSM_Entry" +#define TWAIN_SELECT 0x00000001UL +#define TWAIN_ACQUIRE 0x00000002UL +#define TWAIN_TERMINATE 0xFFFFFFFFUL + +#define TWAIN_EVENT_NONE 0x00000000UL +#define TWAIN_EVENT_QUIT 0x00000001UL +#define TWAIN_EVENT_SCANNING 0x00000002UL +#define TWAIN_EVENT_XFER 0x00000004UL + +#define PFUNC (*pDSM) +#define PTWAINMSG MSG* +#define FIXTODOUBLE( nFix ) ((double)nFix.Whole+(double)nFix.Frac/65536.) +#define FIXTOLONG( nFix ) ((long)floor(FIXTODOUBLE(nFix)+0.5)) + +#if defined WIN +#define TWAIN_LIBNAME "TWAIN.DLL" +#define TWAIN_FUNCNAME "DSM_Entry" +#elif defined WNT +#define TWAIN_LIBNAME "TWAIN_32.DLL" +#define TWAIN_FUNCNAME "DSM_Entry" #endif // -------------- @@ -103,31 +103,31 @@ class ImpTwain : public ::cppu::WeakImplHelper1< util::XCloseListener > { friend LRESULT CALLBACK TwainMsgProc( int nCode, WPARAM wParam, LPARAM lParam ); - uno::Reference< uno::XInterface > mxSelfRef; - uno::Reference< scanner::XScannerManager > mxMgr; - ScannerManager& mrMgr; - TW_IDENTITY aAppIdent; - TW_IDENTITY aSrcIdent; - Link aNotifyLink; - DSMENTRYPROC pDSM; + uno::Reference< uno::XInterface > mxSelfRef; + uno::Reference< scanner::XScannerManager > mxMgr; + ScannerManager& mrMgr; + TW_IDENTITY aAppIdent; + TW_IDENTITY aSrcIdent; + Link aNotifyLink; + DSMENTRYPROC pDSM; osl::Module* pMod; - ULONG nCurState; - HWND hTwainWnd; - HHOOK hTwainHook; - bool mbCloseFrameOnExit; - - bool ImplHandleMsg( void* pMsg ); - void ImplCreate(); - void ImplOpenSourceManager(); - void ImplOpenSource(); - bool ImplEnableSource(); - void ImplXfer(); - void ImplFallback( ULONG nEvent ); - void ImplSendCloseEvent(); - void ImplDeregisterCloseListener(); - void ImplRegisterCloseListener(); - uno::Reference< frame::XFrame > ImplGetActiveFrame(); - uno::Reference< util::XCloseBroadcaster > ImplGetActiveFrameCloseBroadcaster(); + ULONG nCurState; + HWND hTwainWnd; + HHOOK hTwainHook; + bool mbCloseFrameOnExit; + + bool ImplHandleMsg( void* pMsg ); + void ImplCreate(); + void ImplOpenSourceManager(); + void ImplOpenSource(); + bool ImplEnableSource(); + void ImplXfer(); + void ImplFallback( ULONG nEvent ); + void ImplSendCloseEvent(); + void ImplDeregisterCloseListener(); + void ImplRegisterCloseListener(); + uno::Reference< frame::XFrame > ImplGetActiveFrame(); + uno::Reference< util::XCloseBroadcaster > ImplGetActiveFrameCloseBroadcaster(); DECL_LINK( ImplFallbackHdl, void* ); DECL_LINK( ImplDestroyHdl, void* ); @@ -144,10 +144,10 @@ public: ImpTwain( ScannerManager& rMgr, const Link& rNotifyLink ); ~ImpTwain(); - void Destroy(); + void Destroy(); - bool SelectSource(); - bool InitXfer(); + bool SelectSource(); + bool InitXfer(); }; // --------- @@ -177,7 +177,7 @@ LRESULT CALLBACK TwainMsgProc( int nCode, WPARAM wParam, LPARAM lParam ) { pMsg->message = WM_USER; pMsg->lParam = 0; - + return 0; } } @@ -206,8 +206,8 @@ ImpTwain::ImpTwain( ScannerManager& rMgr, const Link& rNotifyLink ) : aAppIdent.Version.Country = TWCY_USA; aAppIdent.ProtocolMajor = TWON_PROTOCOLMAJOR; aAppIdent.ProtocolMinor = TWON_PROTOCOLMINOR; - aAppIdent.SupportedGroups = DG_IMAGE | DG_CONTROL; - strncpy( aAppIdent.Version.Info, "8.0", 32 ); + aAppIdent.SupportedGroups = DG_IMAGE | DG_CONTROL; + strncpy( aAppIdent.Version.Info, "8.0", 32 ); aAppIdent.Version.Info[32] = aAppIdent.Version.Info[33] = 0; strncpy( aAppIdent.Manufacturer, "Sun Microsystems", 32 ); aAppIdent.Manufacturer[32] = aAppIdent.Manufacturer[33] = 0; @@ -218,7 +218,7 @@ ImpTwain::ImpTwain( ScannerManager& rMgr, const Link& rNotifyLink ) : WNDCLASS aWc = { 0, &TwainWndProc, 0, sizeof( WNDCLASS ), GetModuleHandle( NULL ), NULL, NULL, NULL, NULL, "TwainClass" }; RegisterClass( &aWc ); - + hTwainWnd = CreateWindowEx( WS_EX_TOPMOST, aWc.lpszClassName, "TWAIN", 0, 0, 0, 0, 0, HWND_DESKTOP, NULL, aWc.hInstance, 0 ); hTwainHook = SetWindowsHookEx( WH_GETMESSAGE, &TwainMsgProc, NULL, GetCurrentThreadId() ); @@ -322,8 +322,8 @@ void ImpTwain::ImplOpenSource() if( ( PFUNC( &aAppIdent, NULL, DG_CONTROL, DAT_IDENTITY, MSG_GETDEFAULT, &aSrcIdent ) == TWRC_SUCCESS ) && ( PFUNC( &aAppIdent, NULL, DG_CONTROL, DAT_IDENTITY, MSG_OPENDS, &aSrcIdent ) == TWRC_SUCCESS ) ) { - TW_CAPABILITY aCap = { CAP_XFERCOUNT, TWON_ONEVALUE, GlobalAlloc( GHND, sizeof( TW_ONEVALUE ) ) }; - TW_ONEVALUE* pVal = (TW_ONEVALUE*) GlobalLock( aCap.hContainer ); + TW_CAPABILITY aCap = { CAP_XFERCOUNT, TWON_ONEVALUE, GlobalAlloc( GHND, sizeof( TW_ONEVALUE ) ) }; + TW_ONEVALUE* pVal = (TW_ONEVALUE*) GlobalLock( aCap.hContainer ); pVal->ItemType = TWTY_INT16, pVal->Item = 1; GlobalUnlock( aCap.hContainer ); @@ -370,9 +370,9 @@ bool ImpTwain::ImplEnableSource() bool ImpTwain::ImplHandleMsg( void* pMsg ) { - TW_UINT16 nRet; - PTWAINMSG pMess = (PTWAINMSG) pMsg; - TW_EVENT aEvt = { pMess, MSG_NULL }; + TW_UINT16 nRet; + PTWAINMSG pMess = (PTWAINMSG) pMsg; + TW_EVENT aEvt = { pMess, MSG_NULL }; nRet = PFUNC( &aAppIdent, &aSrcIdent, DG_CONTROL, DAT_EVENT, MSG_PROCESSEVENT, &aEvt ); @@ -396,7 +396,7 @@ bool ImpTwain::ImplHandleMsg( void* pMsg ) ImplFallback( nEvent ); } break; - + case MSG_CLOSEDSREQ: ImplFallback( TWAIN_EVENT_QUIT ); break; @@ -417,9 +417,9 @@ void ImpTwain::ImplXfer() { if( nCurState == 6 ) { - TW_IMAGEINFO aInfo; - TW_UINT32 hDIB = 0; - long nWidth, nHeight, nXRes, nYRes; + TW_IMAGEINFO aInfo; + TW_UINT32 hDIB = 0; + long nWidth, nHeight, nXRes, nYRes; if( PFUNC( &aAppIdent, &aSrcIdent, DG_IMAGE, DAT_IMAGEINFO, MSG_GET, &aInfo ) == TWRC_SUCCESS ) { @@ -444,8 +444,8 @@ void ImpTwain::ImplXfer() if( ( nXRes != -1 ) && ( nYRes != - 1 ) && ( nWidth != - 1 ) && ( nHeight != - 1 ) ) { // set resolution of bitmap - BITMAPINFOHEADER* pBIH = (BITMAPINFOHEADER*) GlobalLock( (HGLOBAL) hDIB ); - static const double fFactor = 100.0 / 2.54; + BITMAPINFOHEADER* pBIH = (BITMAPINFOHEADER*) GlobalLock( (HGLOBAL) hDIB ); + static const double fFactor = 100.0 / 2.54; pBIH->biXPelsPerMeter = FRound( fFactor * nXRes ); pBIH->biYPelsPerMeter = FRound( fFactor * nYRes ); @@ -479,8 +479,8 @@ void ImpTwain::ImplFallback( ULONG nEvent ) IMPL_LINK( ImpTwain, ImplFallbackHdl, void*, pData ) { - const ULONG nEvent = (ULONG) pData; - bool bFallback = true; + const ULONG nEvent = (ULONG) pData; + bool bFallback = true; switch( nCurState ) { @@ -502,7 +502,7 @@ IMPL_LINK( ImpTwain, ImplFallbackHdl, void*, pData ) case( 5 ): { TW_USERINTERFACE aUI = { true, true, hTwainWnd }; - + PFUNC( &aAppIdent, &aSrcIdent, DG_CONTROL, DAT_USERINTERFACE, MSG_DISABLEDS, &aUI ); nCurState = 4; @@ -580,7 +580,7 @@ uno::Reference< frame::XFrame > ImpTwain::ImplGetActiveFrame() // query desktop instance uno::Reference< frame::XDesktop > xDesktop( xMgr->createInstance( OUString::createFromAscii( "com.sun.star.frame.Desktop" ) ), uno::UNO_QUERY ); - + if( xDesktop.is() ) { // query property set from desktop, which contains the currently active frame @@ -603,7 +603,7 @@ uno::Reference< frame::XFrame > ImpTwain::ImplGetActiveFrame() } uno::Reference< frame::XFrame > xActiveFrame; - + if( (aActiveFrame >>= xActiveFrame) && xActiveFrame.is() ) { @@ -644,7 +644,7 @@ void ImpTwain::ImplRegisterCloseListener() try { uno::Reference< util::XCloseBroadcaster > xCloseBroadcaster( ImplGetActiveFrameCloseBroadcaster() ); - + if( xCloseBroadcaster.is() ) { xCloseBroadcaster->addCloseListener(this); @@ -670,9 +670,9 @@ void ImpTwain::ImplDeregisterCloseListener() { try { - uno::Reference< util::XCloseBroadcaster > xCloseBroadcaster( + uno::Reference< util::XCloseBroadcaster > xCloseBroadcaster( ImplGetActiveFrameCloseBroadcaster() ); - + if( xCloseBroadcaster.is() ) { xCloseBroadcaster->removeCloseListener(this); @@ -725,7 +725,7 @@ void ImpTwain::ImplSendCloseEvent() try { uno::Reference< util::XCloseable > xCloseable( ImplGetActiveFrame(), uno::UNO_QUERY ); - + if( xCloseable.is() ) xCloseable->close( true ); } @@ -743,23 +743,23 @@ void ImpTwain::ImplSendCloseEvent() class Twain { - uno::Reference< lang::XEventListener > mxListener; - uno::Reference< scanner::XScannerManager > mxMgr; - const ScannerManager* mpCurMgr; - ImpTwain* mpImpTwain; - TwainState meState; - + uno::Reference< lang::XEventListener > mxListener; + uno::Reference< scanner::XScannerManager > mxMgr; + const ScannerManager* mpCurMgr; + ImpTwain* mpImpTwain; + TwainState meState; + DECL_LINK( ImpNotifyHdl, ImpTwain* ); - -public: - + +public: + Twain(); ~Twain(); - - bool SelectSource( ScannerManager& rMgr ); - bool PerformTransfer( ScannerManager& rMgr, const uno::Reference< lang::XEventListener >& rxListener ); - - TwainState GetState() const { return meState; } + + bool SelectSource( ScannerManager& rMgr ); + bool PerformTransfer( ScannerManager& rMgr, const uno::Reference< lang::XEventListener >& rxListener ); + + TwainState GetState() const { return meState; } }; // ------------------------------------------------------------------------ @@ -790,7 +790,7 @@ bool Twain::SelectSource( ScannerManager& rMgr ) // #107835# hold reference to ScannerManager, to prevent premature death mxMgr = uno::Reference< scanner::XScannerManager >( static_cast< OWeakObject* >( const_cast< ScannerManager* >( mpCurMgr = &rMgr ) ), uno::UNO_QUERY ), - + meState = TWAIN_STATE_NONE; mpImpTwain = new ImpTwain( rMgr, LINK( this, Twain, ImpNotifyHdl ) ); bRet = mpImpTwain->SelectSource(); @@ -812,7 +812,7 @@ bool Twain::PerformTransfer( ScannerManager& rMgr, const uno::Reference< lang::X // #107835# hold reference to ScannerManager, to prevent premature death mxMgr = uno::Reference< scanner::XScannerManager >( static_cast< OWeakObject* >( const_cast< ScannerManager* >( mpCurMgr = &rMgr ) ), uno::UNO_QUERY ), - + mxListener = rxListener; meState = TWAIN_STATE_NONE; mpImpTwain = new ImpTwain( rMgr, LINK( this, Twain, ImpNotifyHdl ) ); @@ -858,7 +858,7 @@ IMPL_LINK( Twain, ImpNotifyHdl, ImpTwain*, nEvent ) if( mpImpTwain ) { meState = ( mpCurMgr->GetData() ? TWAIN_STATE_DONE : TWAIN_STATE_CANCELED ); - + mpImpTwain->Destroy(); mpImpTwain = NULL; mpCurMgr = NULL; @@ -905,8 +905,8 @@ void ScannerManager::ReleaseData() AWT::Size ScannerManager::getSize() throw() { - AWT::Size aRet; - HGLOBAL hDIB = (HGLOBAL)(long) mpData; + AWT::Size aRet; + HGLOBAL hDIB = (HGLOBAL)(long) mpData; if( hDIB ) { @@ -915,7 +915,7 @@ AWT::Size ScannerManager::getSize() throw() if( pBIH ) { aRet.Width = pBIH->biWidth; - aRet.Height = pBIH->biHeight; + aRet.Height = pBIH->biHeight; } else aRet.Width = aRet.Height = 0; @@ -936,13 +936,13 @@ SEQ( sal_Int8 ) ScannerManager::getDIB() throw() if( mpData ) { - HGLOBAL hDIB = (HGLOBAL)(long) mpData; - const sal_uInt32 nDIBSize = GlobalSize( hDIB ); - BITMAPINFOHEADER* pBIH = (BITMAPINFOHEADER*) GlobalLock( hDIB ); + HGLOBAL hDIB = (HGLOBAL)(long) mpData; + const sal_uInt32 nDIBSize = GlobalSize( hDIB ); + BITMAPINFOHEADER* pBIH = (BITMAPINFOHEADER*) GlobalLock( hDIB ); if( pBIH ) { - sal_uInt32 nColEntries; + sal_uInt32 nColEntries; switch( pBIH->biBitCount ) { @@ -972,8 +972,8 @@ SEQ( sal_Int8 ) ScannerManager::getDIB() throw() } aRet = SEQ( sal_Int8 )( sizeof( BITMAPFILEHEADER ) + nDIBSize ); - - sal_Int8* pBuf = aRet.getArray(); + + sal_Int8* pBuf = aRet.getArray(); SvMemoryStream* pMemStm = new SvMemoryStream( (char*) pBuf, sizeof( BITMAPFILEHEADER ), STREAM_WRITE ); *pMemStm << 'B' << 'M' << (sal_uInt32) 0 << (sal_uInt32) 0; @@ -995,8 +995,8 @@ SEQ( sal_Int8 ) ScannerManager::getDIB() throw() SEQ( ScannerContext ) SAL_CALL ScannerManager::getAvailableScanners() throw() { osl::MutexGuard aGuard( maProtector ); - SEQ( ScannerContext ) aRet( 1 ); - + SEQ( ScannerContext ) aRet( 1 ); + aRet.getArray()[0].ScannerName = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "TWAIN" ) ); aRet.getArray()[0].InternalData = 0; @@ -1005,11 +1005,11 @@ SEQ( ScannerContext ) SAL_CALL ScannerManager::getAvailableScanners() throw() // ----------------------------------------------------------------------------- -BOOL SAL_CALL ScannerManager::configureScanner( ScannerContext& rContext ) +BOOL SAL_CALL ScannerManager::configureScanner( ScannerContext& rContext ) throw( ScannerException ) { osl::MutexGuard aGuard( maProtector ); - uno::Reference< XScannerManager > xThis( this ); + uno::Reference< XScannerManager > xThis( this ); if( rContext.InternalData != 0 || rContext.ScannerName != ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "TWAIN" ) ) ) throw ScannerException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Scanner does not exist" ) ), xThis, ScanError_InvalidContext ); @@ -1021,11 +1021,11 @@ BOOL SAL_CALL ScannerManager::configureScanner( ScannerContext& rContext ) // ----------------------------------------------------------------------------- -void SAL_CALL ScannerManager::startScan( const ScannerContext& rContext, const uno::Reference< lang::XEventListener >& rxListener ) +void SAL_CALL ScannerManager::startScan( const ScannerContext& rContext, const uno::Reference< lang::XEventListener >& rxListener ) throw( ScannerException ) { osl::MutexGuard aGuard( maProtector ); - uno::Reference< XScannerManager > xThis( this ); + uno::Reference< XScannerManager > xThis( this ); if( rContext.InternalData != 0 || rContext.ScannerName != ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "TWAIN" ) ) ) throw ScannerException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Scanner does not exist" ) ), xThis, ScanError_InvalidContext ); @@ -1040,17 +1040,17 @@ ScanError SAL_CALL ScannerManager::getError( const ScannerContext& rContext ) throw( ScannerException ) { osl::MutexGuard aGuard( maProtector ); - uno::Reference< XScannerManager > xThis( this ); + uno::Reference< XScannerManager > xThis( this ); if( rContext.InternalData != 0 || rContext.ScannerName != ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "TWAIN" ) ) ) throw ScannerException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Scanner does not exist" ) ), xThis, ScanError_InvalidContext ); - + return( ( aTwain.GetState() == TWAIN_STATE_CANCELED ) ? ScanError_ScanCanceled : ScanError_ScanErrorNone ); } // ----------------------------------------------------------------------------- -uno::Reference< awt::XBitmap > SAL_CALL ScannerManager::getBitmap( const ScannerContext& /*rContext*/ ) +uno::Reference< awt::XBitmap > SAL_CALL ScannerManager::getBitmap( const ScannerContext& /*rContext*/ ) throw( ScannerException ) { osl::MutexGuard aGuard( maProtector ); diff --git a/extensions/source/scanner/scnserv.cxx b/extensions/source/scanner/scnserv.cxx index 9e58a0ece115..f77acc084a4e 100644 --- a/extensions/source/scanner/scnserv.cxx +++ b/extensions/source/scanner/scnserv.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -59,13 +59,13 @@ extern "C" sal_Bool SAL_CALL component_writeInfo( void* /*pServiceManager*/, voi try { ::rtl::OUString aImplName( '/' ); - + aImplName += ScannerManager::getImplementationName_Static(); aImplName += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES/" ) ); aImplName += ScannerManager::getImplementationName_Static(); REF( XRegistryKey ) xNewKey1( static_cast< XRegistryKey* >( pRegistryKey )->createKey( aImplName ) ); - + bRet = sal_True; } catch( InvalidRegistryException& ) @@ -84,14 +84,14 @@ extern "C" sal_Bool SAL_CALL component_writeInfo( void* /*pServiceManager*/, voi extern "C" void* SAL_CALL component_getFactory( const sal_Char* pImplName, void* pServiceManager, void* /*pRegistryKey*/ ) { REF( ::com::sun::star::lang::XSingleServiceFactory ) xFactory; - void* pRet = 0; - + void* pRet = 0; + if( ::rtl::OUString::createFromAscii( pImplName ) == ScannerManager::getImplementationName_Static() ) { xFactory = REF( ::com::sun::star::lang::XSingleServiceFactory )( ::cppu::createSingleFactory( static_cast< ::com::sun::star::lang::XMultiServiceFactory* >( pServiceManager ), ScannerManager::getImplementationName_Static(), - ScannerManager_CreateInstance, + ScannerManager_CreateInstance, ScannerManager::getSupportedServiceNames_Static() ) ); } @@ -100,7 +100,7 @@ extern "C" void* SAL_CALL component_getFactory( const sal_Char* pImplName, void* xFactory->acquire(); pRet = xFactory.get(); } - + return pRet; } diff --git a/extensions/source/scanner/twain.cxx b/extensions/source/scanner/twain.cxx index 2b6647e4e7d6..d2a6684f3a86 100644 --- a/extensions/source/scanner/twain.cxx +++ b/extensions/source/scanner/twain.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -34,7 +34,7 @@ #if defined( WNT ) || defined (WIN) #include <tools/svwin.h> -#endif +#endif #ifdef OS2 #include <svpm.h> #endif // OS2 @@ -49,19 +49,19 @@ // - Defines - // ----------- -#define PFUNC (*pDSM) -#define FIXTODOUBLE( nFix ) ((double)nFix.Whole+(double)nFix.Frac/65536.) -#define FIXTOLONG( nFix ) ((long)floor(FIXTODOUBLE(nFix)+0.5)) +#define PFUNC (*pDSM) +#define FIXTODOUBLE( nFix ) ((double)nFix.Whole+(double)nFix.Frac/65536.) +#define FIXTOLONG( nFix ) ((long)floor(FIXTODOUBLE(nFix)+0.5)) #if defined WIN -#define TWAIN_LIBNAME "TWAIN.DLL" -#define TWAIN_FUNCNAME "DSM_Entry" +#define TWAIN_LIBNAME "TWAIN.DLL" +#define TWAIN_FUNCNAME "DSM_Entry" #elif defined WNT -#define TWAIN_LIBNAME "TWAIN_32.DLL" -#define TWAIN_FUNCNAME "DSM_Entry" +#define TWAIN_LIBNAME "TWAIN_32.DLL" +#define TWAIN_FUNCNAME "DSM_Entry" #elif defined OS2 -#define TWAIN_LIBNAME "twain" -#define TWAIN_FUNCNAME "DSM_ENTRY" +#define TWAIN_LIBNAME "twain" +#define TWAIN_FUNCNAME "DSM_ENTRY" #endif // ----------- @@ -101,7 +101,7 @@ static ImpTwain* pImpTwainInstance = NULL; { MSG* pMsg = (MSG*) lParam; - if( ( nCode < 0 ) || + if( ( nCode < 0 ) || ( pImpTwainInstance->hTwainWnd != pMsg->hwnd ) || !pImpTwainInstance->ImplHandleMsg( (void*) lParam ) ) { @@ -111,7 +111,7 @@ static ImpTwain* pImpTwainInstance = NULL; { pMsg->message = WM_USER; pMsg->lParam = 0; - + return 0; } } @@ -124,11 +124,11 @@ static ImpTwain* pImpTwainInstance = NULL; ImpTwain::ImpTwain( const Link& rNotifyLink ) : aNotifyLink ( rNotifyLink ), - pDSM ( NULL ), - pMod ( NULL ), - hTwainWnd ( 0 ), - hTwainHook ( 0 ), - nCurState ( 1 ) + pDSM ( NULL ), + pMod ( NULL ), + hTwainWnd ( 0 ), + hTwainHook ( 0 ), + nCurState ( 1 ) { pImpTwainInstance = this; @@ -139,7 +139,7 @@ ImpTwain::ImpTwain( const Link& rNotifyLink ) : aAppIdent.Version.Country = TWCY_USA; aAppIdent.ProtocolMajor = TWON_PROTOCOLMAJOR; aAppIdent.ProtocolMinor = TWON_PROTOCOLMINOR; - aAppIdent.SupportedGroups = DG_IMAGE | DG_CONTROL; + aAppIdent.SupportedGroups = DG_IMAGE | DG_CONTROL; strcpy( aAppIdent.Version.Info, "6.0" ); strcpy( aAppIdent.Manufacturer, "Sun Microsystems"); strcpy( aAppIdent.ProductFamily,"Office"); @@ -153,8 +153,8 @@ ImpTwain::ImpTwain( const Link& rNotifyLink ) : #else - HWND hParentWnd = HWND_DESKTOP; - WNDCLASS aWc = { 0, &TwainWndProc, 0, sizeof( WNDCLASS ), GetModuleHandle( NULL ), + HWND hParentWnd = HWND_DESKTOP; + WNDCLASS aWc = { 0, &TwainWndProc, 0, sizeof( WNDCLASS ), GetModuleHandle( NULL ), NULL, NULL, NULL, NULL, "TwainClass" }; RegisterClass( &aWc ); @@ -275,11 +275,11 @@ void ImpTwain::ImplOpenSource() #ifdef OS2 // negotiate capabilities - + #else - TW_CAPABILITY aCap = { CAP_XFERCOUNT, TWON_ONEVALUE, GlobalAlloc( GHND, sizeof( TW_ONEVALUE ) ) }; - TW_ONEVALUE* pVal = (TW_ONEVALUE*) GlobalLock( aCap.hContainer ); + TW_CAPABILITY aCap = { CAP_XFERCOUNT, TWON_ONEVALUE, GlobalAlloc( GHND, sizeof( TW_ONEVALUE ) ) }; + TW_ONEVALUE* pVal = (TW_ONEVALUE*) GlobalLock( aCap.hContainer ); pVal->ItemType = TWTY_INT16, pVal->Item = 1; GlobalUnlock( aCap.hContainer ); @@ -318,9 +318,9 @@ BOOL ImpTwain::ImplEnableSource() BOOL ImpTwain::ImplHandleMsg( void* pMsg ) { - TW_UINT16 nRet; - PTWAINMSG pMess = (PTWAINMSG) pMsg; - TW_EVENT aEvt = { pMess, MSG_NULL }; + TW_UINT16 nRet; + PTWAINMSG pMess = (PTWAINMSG) pMsg; + TW_EVENT aEvt = { pMess, MSG_NULL }; nRet = PFUNC( &aAppIdent, &aSrcIdent, DG_CONTROL, DAT_EVENT, MSG_PROCESSEVENT, &aEvt ); @@ -344,7 +344,7 @@ BOOL ImpTwain::ImplHandleMsg( void* pMsg ) ImplFallback( nEvent ); } break; - + case MSG_CLOSEDSREQ: ImplFallback( TWAIN_EVENT_QUIT ); break; @@ -365,12 +365,12 @@ void ImpTwain::ImplXfer() { if( nCurState == 6 ) { - TW_IMAGEINFO aInfo; - TW_UINT32 hDIB = 0; - long nWidth = aInfo.ImageWidth; - long nHeight = aInfo.ImageLength; - long nXRes = FIXTOLONG( aInfo.XResolution ); - long nYRes = FIXTOLONG( aInfo.YResolution ); + TW_IMAGEINFO aInfo; + TW_UINT32 hDIB = 0; + long nWidth = aInfo.ImageWidth; + long nHeight = aInfo.ImageLength; + long nXRes = FIXTOLONG( aInfo.XResolution ); + long nYRes = FIXTOLONG( aInfo.YResolution ); if( PFUNC( &aAppIdent, &aSrcIdent, DG_IMAGE, DAT_IMAGEINFO, MSG_GET, &aInfo ) == TWRC_SUCCESS ) { @@ -396,7 +396,7 @@ void ImpTwain::ImplXfer() #else // OS2 const ULONG nSize = GlobalSize( (HGLOBAL) hDIB ); - char* pBuf = (char*) GlobalLock( (HGLOBAL) hDIB ); + char* pBuf = (char*) GlobalLock( (HGLOBAL) hDIB ); if( pBuf ) { @@ -438,8 +438,8 @@ void ImpTwain::ImplFallback( ULONG nEvent ) IMPL_LINK( ImpTwain, ImplFallbackHdl, void*, pData ) { - const ULONG nEvent = (ULONG) pData; - BOOL bFallback = TRUE; + const ULONG nEvent = (ULONG) pData; + BOOL bFallback = TRUE; switch( nCurState ) { @@ -461,7 +461,7 @@ IMPL_LINK( ImpTwain, ImplFallbackHdl, void*, pData ) case( 5 ): { TW_USERINTERFACE aUI = { TRUE, TRUE, hTwainWnd }; - + PFUNC( &aAppIdent, &aSrcIdent, DG_CONTROL, DAT_USERINTERFACE, MSG_DISABLEDS, &aUI ); nCurState = 4; } diff --git a/extensions/source/scanner/twain.hxx b/extensions/source/scanner/twain.hxx index 446748c920fb..ca7d80240c43 100644 --- a/extensions/source/scanner/twain.hxx +++ b/extensions/source/scanner/twain.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -38,14 +38,14 @@ // - Defines - // ----------- -#define TWAIN_SELECT 0x00000001UL -#define TWAIN_ACQUIRE 0x00000002UL -#define TWAIN_TERMINATE 0xFFFFFFFFUL +#define TWAIN_SELECT 0x00000001UL +#define TWAIN_ACQUIRE 0x00000002UL +#define TWAIN_TERMINATE 0xFFFFFFFFUL -#define TWAIN_EVENT_NONE 0x00000000UL -#define TWAIN_EVENT_QUIT 0x00000001UL -#define TWAIN_EVENT_SCANNING 0x00000002UL -#define TWAIN_EVENT_XFER 0x00000004UL +#define TWAIN_EVENT_NONE 0x00000000UL +#define TWAIN_EVENT_QUIT 0x00000001UL +#define TWAIN_EVENT_SCANNING 0x00000002UL +#define TWAIN_EVENT_XFER 0x00000004UL // ------------ // - ImpTwain - @@ -53,35 +53,35 @@ class ImpTwain { - TW_IDENTITY aAppIdent; - TW_IDENTITY aSrcIdent; - Link aNotifyLink; - Bitmap aBitmap; - DSMENTRYPROC pDSM; + TW_IDENTITY aAppIdent; + TW_IDENTITY aSrcIdent; + Link aNotifyLink; + Bitmap aBitmap; + DSMENTRYPROC pDSM; osl::Module pMod; - ULONG nCurState; + ULONG nCurState; - void ImplCreate(); - void ImplOpenSourceManager(); - void ImplOpenSource(); - BOOL ImplEnableSource(); - void ImplXfer(); - void ImplFallback( ULONG nEvent ); + void ImplCreate(); + void ImplOpenSourceManager(); + void ImplOpenSource(); + BOOL ImplEnableSource(); + void ImplXfer(); + void ImplFallback( ULONG nEvent ); DECL_LINK( ImplFallbackHdl, void* ); DECL_LINK( ImplDestroyHdl, void* ); public: - BOOL ImplHandleMsg( void* pMsg ); + BOOL ImplHandleMsg( void* pMsg ); #ifdef OS2 - HAB hAB; - HWND hTwainWnd; - long hTwainHook; + HAB hAB; + HWND hTwainWnd; + long hTwainHook; #else - HWND hTwainWnd; - HHOOK hTwainHook; + HWND hTwainWnd; + HHOOK hTwainHook; #endif public: @@ -89,11 +89,11 @@ public: ImpTwain( const Link& rNotifyLink ); ~ImpTwain(); - void Destroy(); + void Destroy(); - BOOL SelectSource(); - BOOL InitXfer(); - Bitmap GetXferBitmap(); + BOOL SelectSource(); + BOOL InitXfer(); + Bitmap GetXferBitmap(); }; #endif // _TWAIN_HXX diff --git a/extensions/source/svg/svgaction.cxx b/extensions/source/svg/svgaction.cxx index 14cd09c7fa20..fd460f0c47b7 100644 --- a/extensions/source/svg/svgaction.cxx +++ b/extensions/source/svg/svgaction.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -41,41 +41,41 @@ // - statics - // ----------- -static const char aXMLElemSVG[] = "svg"; -static const char aXMLElemG[] = "g"; -static const char aXMLElemDefs[] = "defs"; -static const char aXMLElemClipPath[] = "clipPath"; -static const char aXMLElemLine[] = "line"; -static const char aXMLElemRect[] = "rect"; -static const char aXMLElemEllipse[] = "ellipse"; -static const char aXMLElemPath[] = "path"; -static const char aXMLElemPolygon[] = "polygon"; -static const char aXMLElemPolyLine[] = "polyline"; -static const char aXMLElemText[] = "text"; -static const char aXMLElemTSpan[] = "tspan"; -static const char aXMLElemImage[] = "image"; - -static const char aXMLAttrTransform[] = "transform"; -static const char aXMLAttrStyle[] = "style"; -static const char aXMLAttrId[] = "id"; - -static const char aXMLAttrD[] = "d"; -static const char aXMLAttrX[] = "x"; -static const char aXMLAttrY[] = "y"; -static const char aXMLAttrX1[] = "x1"; -static const char aXMLAttrY1[] = "y1"; -static const char aXMLAttrX2[] = "x2"; -static const char aXMLAttrY2[] = "y2"; -static const char aXMLAttrCX[] = "cx"; -static const char aXMLAttrCY[] = "cy"; -static const char aXMLAttrRX[] = "rx"; -static const char aXMLAttrRY[] = "ry"; -static const char aXMLAttrWidth[] = "width"; -static const char aXMLAttrHeight[] = "height"; -static const char aXMLAttrPoints[] = "points"; -static const char aXMLAttrXLinkHRef[] = "xlink:href"; - -static const sal_Unicode pBase64[] = +static const char aXMLElemSVG[] = "svg"; +static const char aXMLElemG[] = "g"; +static const char aXMLElemDefs[] = "defs"; +static const char aXMLElemClipPath[] = "clipPath"; +static const char aXMLElemLine[] = "line"; +static const char aXMLElemRect[] = "rect"; +static const char aXMLElemEllipse[] = "ellipse"; +static const char aXMLElemPath[] = "path"; +static const char aXMLElemPolygon[] = "polygon"; +static const char aXMLElemPolyLine[] = "polyline"; +static const char aXMLElemText[] = "text"; +static const char aXMLElemTSpan[] = "tspan"; +static const char aXMLElemImage[] = "image"; + +static const char aXMLAttrTransform[] = "transform"; +static const char aXMLAttrStyle[] = "style"; +static const char aXMLAttrId[] = "id"; + +static const char aXMLAttrD[] = "d"; +static const char aXMLAttrX[] = "x"; +static const char aXMLAttrY[] = "y"; +static const char aXMLAttrX1[] = "x1"; +static const char aXMLAttrY1[] = "y1"; +static const char aXMLAttrX2[] = "x2"; +static const char aXMLAttrY2[] = "y2"; +static const char aXMLAttrCX[] = "cx"; +static const char aXMLAttrCY[] = "cy"; +static const char aXMLAttrRX[] = "rx"; +static const char aXMLAttrRY[] = "ry"; +static const char aXMLAttrWidth[] = "width"; +static const char aXMLAttrHeight[] = "height"; +static const char aXMLAttrPoints[] = "points"; +static const char aXMLAttrXLinkHRef[] = "xlink:href"; + +static const sal_Unicode pBase64[] = { //0 1 2 3 4 5 6 7 'A','B','C','D','E','F','G','H', // 0 @@ -119,8 +119,8 @@ FastString::FastString( sal_Char* pBufferForBase64Encoding, sal_uInt32 nBufLen ) mnBufLen = mnCurLen = ( ( nQuadCount + ( nRest ? 1 : 0 ) ) << 2 ); mpBuffer = new sal_Unicode[ mnBufLen * sizeof( sal_Unicode ) ]; - sal_Char* pTmpSrc = pBufferForBase64Encoding; - sal_Unicode* pTmpDst = mpBuffer; + sal_Char* pTmpSrc = pBufferForBase64Encoding; + sal_Unicode* pTmpDst = mpBuffer; for( sal_uInt32 i = 0; i < nQuadCount; i++ ) { @@ -176,8 +176,8 @@ FastString& FastString::operator+=( const NMSP_RTL::OUString& rStr ) { if( ( mnCurLen + rStr.getLength() ) > mnBufLen ) { - const sal_uInt32 nNewBufLen = ( mnBufLen + ( ( ( mnCurLen + rStr.getLength() ) - mnBufLen ) / mnBufInc + 1 ) * mnBufInc ); - sal_Unicode* pNewBuffer = new sal_Unicode[ nNewBufLen * sizeof( sal_Unicode ) ]; + const sal_uInt32 nNewBufLen = ( mnBufLen + ( ( ( mnCurLen + rStr.getLength() ) - mnBufLen ) / mnBufInc + 1 ) * mnBufInc ); + sal_Unicode* pNewBuffer = new sal_Unicode[ nNewBufLen * sizeof( sal_Unicode ) ]; memcpy( pNewBuffer, mpBuffer, mnBufLen * sizeof( sal_Unicode ) ); delete[] mpBuffer; @@ -263,21 +263,21 @@ SVGAttributeWriter::~SVGAttributeWriter() NMSP_RTL::OUString SVGAttributeWriter::GetFontStyle( const Font& rFont ) { FastString aStyle; - + // font family aStyle += B2UCONST( "font-family:" ); - aStyle += NMSP_RTL::OUString( rFont.GetName().GetToken( 0, ';' ) ); + aStyle += NMSP_RTL::OUString( rFont.GetName().GetToken( 0, ';' ) ); // font size aStyle += B2UCONST( ";" ); aStyle += B2UCONST( "font-size:" ); aStyle += mrParent.GetValueString( mrParent.ImplMap( Size( 0, rFont.GetHeight() ) ).Height(), mrParent.HasDoublePoints() ); - + // font style if( rFont.GetItalic() != ITALIC_NONE ) { aStyle += B2UCONST( ";" ); - aStyle += B2UCONST( "font-style:" ); + aStyle += B2UCONST( "font-style:" ); if( rFont.GetItalic() == ITALIC_OBLIQUE ) aStyle += B2UCONST( "oblique" ); @@ -290,23 +290,23 @@ NMSP_RTL::OUString SVGAttributeWriter::GetFontStyle( const Font& rFont ) switch( rFont.GetWeight() ) { - case WEIGHT_THIN: nFontWeight = 100; break; - case WEIGHT_ULTRALIGHT: nFontWeight = 200; break; - case WEIGHT_LIGHT: nFontWeight = 300; break; - case WEIGHT_SEMILIGHT: nFontWeight = 400; break; - case WEIGHT_NORMAL: nFontWeight = 400; break; - case WEIGHT_MEDIUM: nFontWeight = 500; break; - case WEIGHT_SEMIBOLD: nFontWeight = 600; break; - case WEIGHT_BOLD: nFontWeight = 700; break; - case WEIGHT_ULTRABOLD: nFontWeight = 800; break; - case WEIGHT_BLACK: nFontWeight = 900; break; - default: nFontWeight = 400; break; + case WEIGHT_THIN: nFontWeight = 100; break; + case WEIGHT_ULTRALIGHT: nFontWeight = 200; break; + case WEIGHT_LIGHT: nFontWeight = 300; break; + case WEIGHT_SEMILIGHT: nFontWeight = 400; break; + case WEIGHT_NORMAL: nFontWeight = 400; break; + case WEIGHT_MEDIUM: nFontWeight = 500; break; + case WEIGHT_SEMIBOLD: nFontWeight = 600; break; + case WEIGHT_BOLD: nFontWeight = 700; break; + case WEIGHT_ULTRABOLD: nFontWeight = 800; break; + case WEIGHT_BLACK: nFontWeight = 900; break; + default: nFontWeight = 400; break; } aStyle += B2UCONST( ";" ); aStyle += B2UCONST( "font-weight:" ); aStyle += NMSP_RTL::OUString::valueOf( nFontWeight ); - + // !!! // font-variant // font-stretch @@ -339,7 +339,7 @@ NMSP_RTL::OUString SVGAttributeWriter::GetPaintStyle( const Color& rLineColor, c // line color aStyle += B2UCONST( "stroke:" ); - + if( rLineColor.GetTransparency() == 255 ) aStyle += B2UCONST( "none" ); else @@ -366,7 +366,7 @@ NMSP_RTL::OUString SVGAttributeWriter::GetPaintStyle( const Color& rLineColor, c // fill color aStyle += B2UCONST( ";" ); aStyle += B2UCONST( "fill:" ); - + if( rFillColor.GetTransparency() == 255 ) aStyle += B2UCONST( "none" ); else @@ -490,11 +490,11 @@ NMSP_RTL::OUString SVGActionWriter::GetValueString( sal_Int32 nVal, sal_Bool bDo return NMSP_RTL::OUString::valueOf( nVal ); else { - const double fPoints = nVal * 72.0 / 2540.0; - const sal_Int32 nInt = (sal_Int32) fPoints; - - return( ( NMSP_RTL::OUString::valueOf( nInt ) += - NMSP_RTL::OUString::valueOf( (sal_Unicode) '.' ) ) += + const double fPoints = nVal * 72.0 / 2540.0; + const sal_Int32 nInt = (sal_Int32) fPoints; + + return( ( NMSP_RTL::OUString::valueOf( nInt ) += + NMSP_RTL::OUString::valueOf( (sal_Unicode) '.' ) ) += NMSP_RTL::OUString::valueOf( labs( (sal_Int32) ( ( fPoints - nInt ) * 100.0 ) ) ) ); } } @@ -586,16 +586,16 @@ void SVGActionWriter::ImplWritePolygon( const Polygon& rPoly, sal_Bool bLineOnly ImplWritePolyPolygon( rPoly, bLineOnly, pStyle ); else { - FastString aStyle; - FastString aPoints; - USHORT i = 0, nSize = rPoly.GetSize(); - const NMSP_RTL::OUString aBlank( B2UCONST( " " ) ); + FastString aStyle; + FastString aPoints; + USHORT i = 0, nSize = rPoly.GetSize(); + const NMSP_RTL::OUString aBlank( B2UCONST( " " ) ); // points while( i < nSize ) { const Point aPolyPoint( ImplMap( rPoly[ i ] ) ); - + aPoints += GetValueString( aPolyPoint.X(), mbDoublePoints ); aPoints += B2UCONST( "," ); aPoints += GetValueString( aPolyPoint.Y(), mbDoublePoints ); @@ -620,7 +620,7 @@ void SVGActionWriter::ImplWritePolygon( const Polygon& rPoly, sal_Bool bLineOnly // add point attribute mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrPoints, aPoints.GetString() ); - + // add style attribute if( aStyle.GetLength() ) mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrStyle, aStyle.GetString() ); @@ -644,16 +644,16 @@ void SVGActionWriter::ImplWritePolyPolygon( const PolyPolygon& rPolyPoly, sal_Bo ImplWritePolygon( rPolyPoly[ 0 ], bLineOnly, pStyle ); else { - FastString aStyle; - FastString aPathData; - const NMSP_RTL::OUString aBlank( B2UCONST( " " ) ); - const NMSP_RTL::OUString aComma( B2UCONST( "," ) ); - Point aPolyPoint; + FastString aStyle; + FastString aPathData; + const NMSP_RTL::OUString aBlank( B2UCONST( " " ) ); + const NMSP_RTL::OUString aComma( B2UCONST( "," ) ); + Point aPolyPoint; for( long i = 0, nCount = rPolyPoly.Count(); i < nCount; i++ ) { - const Polygon& rPoly = rPolyPoly[ (USHORT) i ]; - USHORT n = 1, nSize = rPoly.GetSize(); + const Polygon& rPoly = rPolyPoly[ (USHORT) i ]; + USHORT n = 1, nSize = rPoly.GetSize(); if( nSize > 1 ) { @@ -714,7 +714,7 @@ void SVGActionWriter::ImplWritePolyPolygon( const PolyPolygon& rPolyPoly, sal_Bo mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrStyle, aStyle.GetString() ); // add path data attribute - mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrD, aPathData.GetString() ); + mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrD, aPathData.GetString() ); { // write polyline/polygon element SvXMLElementExport aElem( mrExport, XML_NAMESPACE_NONE, aXMLElemPath, TRUE, TRUE ); @@ -730,9 +730,9 @@ void SVGActionWriter::ImplWriteGradientEx( const PolyPolygon& rPolyPoly, const G { if( rPolyPoly.Count() ) { - SvXMLElementExport aElemG( mrExport, XML_NAMESPACE_NONE, aXMLElemG, TRUE, TRUE ); - FastString aClipId; - FastString aClipStyle; + SvXMLElementExport aElemG( mrExport, XML_NAMESPACE_NONE, aXMLElemG, TRUE, TRUE ); + FastString aClipId; + FastString aClipStyle; aClipId += B2UCONST( "clip" ); aClipId += NMSP_RTL::OUString::valueOf( ImplGetNextClipId() ); @@ -756,8 +756,8 @@ void SVGActionWriter::ImplWriteGradientEx( const PolyPolygon& rPolyPoly, const G mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrStyle, aClipStyle.GetString() ); { - GDIMetaFile aTmpMtf; - SvXMLElementExport aElemG2( mrExport, XML_NAMESPACE_NONE, aXMLElemG, TRUE, TRUE ); + GDIMetaFile aTmpMtf; + SvXMLElementExport aElemG2( mrExport, XML_NAMESPACE_NONE, aXMLElemG, TRUE, TRUE ); mpVDev->AddGradientActions( rPolyPoly.GetBoundRect(), rGradient, aTmpMtf ); ImplWriteActions( aTmpMtf, pStyle ); @@ -767,18 +767,18 @@ void SVGActionWriter::ImplWriteGradientEx( const PolyPolygon& rPolyPoly, const G // ----------------------------------------------------------------------------- -void SVGActionWriter::ImplWriteText( const Point& rPos, const String& rText, +void SVGActionWriter::ImplWriteText( const Point& rPos, const String& rText, const sal_Int32* pDXArray, long nWidth, const NMSP_RTL::OUString* pStyle ) { - String aText( rText ); aText.EraseLeadingChars( ' ' ); - UINT32 nLen = aText.Len(), i; + String aText( rText ); aText.EraseLeadingChars( ' ' ); + UINT32 nLen = aText.Len(), i; if( nLen ) { - Size aNormSize; - sal_Int32* pOwnArray; - sal_Int32* pDX; + Size aNormSize; + sal_Int32* pOwnArray; + sal_Int32* pDX; // get text sizes if( pDXArray ) @@ -788,7 +788,7 @@ void SVGActionWriter::ImplWriteText( const Point& rPos, const String& rText, pDX = const_cast< sal_Int32* >( pDXArray ); } else - { + { pOwnArray = new sal_Int32[ nLen ]; aNormSize = Size( mpVDev->GetTextArray( aText, pOwnArray ), 0 ); pDX = pOwnArray; @@ -807,11 +807,11 @@ void SVGActionWriter::ImplWriteText( const Point& rPos, const String& rText, } } - FastString aStyle; - const Font& rFont = mpVDev->GetFont(); - const FontMetric aMetric( mpVDev->GetFontMetric() ); - Point aBaseLinePos( rPos ); - SvXMLElementExport* pTransform = NULL; + FastString aStyle; + const Font& rFont = mpVDev->GetFont(); + const FontMetric aMetric( mpVDev->GetFontMetric() ); + Point aBaseLinePos( rPos ); + SvXMLElementExport* pTransform = NULL; // leading whitespaces erased? => adjust position if( nLen < rText.Len() ) @@ -873,10 +873,10 @@ void SVGActionWriter::ImplWriteText( const Point& rPos, const String& rText, #ifdef _SVG_USE_TSPANS if( pDXArray ) { - SvXMLElementExport aElem( mrExport, XML_NAMESPACE_NONE, aXMLElemText, TRUE, TRUE ); - FastString aTSpanX; - const NMSP_RTL::OUString aSpace( ' ' ); - long i, nX, nCount; + SvXMLElementExport aElem( mrExport, XML_NAMESPACE_NONE, aXMLElemText, TRUE, TRUE ); + FastString aTSpanX; + const NMSP_RTL::OUString aSpace( ' ' ); + long i, nX, nCount; aTSpanX += GetValueString( aPt.X(), mbDoublePoints ); aTSpanX += aSpace; @@ -927,30 +927,30 @@ void SVGActionWriter::ImplWriteText( const Point& rPos, const String& rText, // write strikeout if neccessary if( ( rFont.GetStrikeout() != STRIKEOUT_NONE ) || ( rFont.GetUnderline() != UNDERLINE_NONE ) ) { - Polygon aPoly( 4 ); - const long nLineHeight = Max( (long) FRound( aMetric.GetLineHeight() * 0.05 ), (long) 1 ); + Polygon aPoly( 4 ); + const long nLineHeight = Max( (long) FRound( aMetric.GetLineHeight() * 0.05 ), (long) 1 ); if( rFont.GetStrikeout() ) { - const long nYLinePos = aBaseLinePos.Y() - FRound( aMetric.GetAscent() * 0.26 ); + const long nYLinePos = aBaseLinePos.Y() - FRound( aMetric.GetAscent() * 0.26 ); aPoly[ 0 ].X() = aBaseLinePos.X(); aPoly[ 0 ].Y() = nYLinePos - ( nLineHeight >> 1 ); aPoly[ 1 ].X() = aBaseLinePos.X() + aNormSize.Width() - 1; aPoly[ 1 ].Y() = aPoly[ 0 ].Y(); aPoly[ 2 ].X() = aPoly[ 1 ].X(); aPoly[ 2 ].Y() = aPoly[ 0 ].Y() + nLineHeight - 1; aPoly[ 3 ].X() = aPoly[ 0 ].X(); aPoly[ 3 ].Y() = aPoly[ 2 ].Y(); - + ImplWritePolygon( aPoly, FALSE ); } if( rFont.GetUnderline() ) { - const long nYLinePos = aBaseLinePos.Y() + ( nLineHeight << 1 ); + const long nYLinePos = aBaseLinePos.Y() + ( nLineHeight << 1 ); aPoly[ 0 ].X() = aBaseLinePos.X(); aPoly[ 0 ].Y() = nYLinePos - ( nLineHeight >> 1 ); aPoly[ 1 ].X() = aBaseLinePos.X() + aNormSize.Width() - 1; aPoly[ 1 ].Y() = aPoly[ 0 ].Y(); aPoly[ 2 ].X() = aPoly[ 1 ].X(); aPoly[ 2 ].Y() = aPoly[ 0 ].Y() + nLineHeight - 1; aPoly[ 3 ].X() = aPoly[ 0 ].X(); aPoly[ 3 ].Y() = aPoly[ 2 ].Y(); - + ImplWritePolygon( aPoly, FALSE ); } } @@ -964,16 +964,16 @@ void SVGActionWriter::ImplWriteText( const Point& rPos, const String& rText, // ----------------------------------------------------------------------------- -void SVGActionWriter::ImplWriteBmp( const BitmapEx& rBmpEx, +void SVGActionWriter::ImplWriteBmp( const BitmapEx& rBmpEx, const Point& rPt, const Size& rSz, const Point& rSrcPt, const Size& rSrcSz, const NMSP_RTL::OUString* /*pStyle*/ ) { if( !!rBmpEx ) { - BitmapEx aBmpEx( rBmpEx ); - Point aPoint = Point(); - const Rectangle aBmpRect( aPoint, rBmpEx.GetSizePixel() ); + BitmapEx aBmpEx( rBmpEx ); + Point aPoint = Point(); + const Rectangle aBmpRect( aPoint, rBmpEx.GetSizePixel() ); const Rectangle aSrcRect( rSrcPt, rSrcSz ); if( aSrcRect != aBmpRect ) @@ -985,24 +985,24 @@ void SVGActionWriter::ImplWriteBmp( const BitmapEx& rBmpEx, if( GraphicConverter::Export( aOStm, rBmpEx, CVT_PNG ) == ERRCODE_NONE ) { - const Point aPt( ImplMap( rPt ) ); - const Size aSz( ImplMap( rSz ) ); - FastString aImageData( (sal_Char*) aOStm.GetData(), aOStm.Tell() ); - REF( NMSP_SAX::XExtendedDocumentHandler ) xExtDocHandler( mrExport.GetDocHandler(), NMSP_UNO::UNO_QUERY ); + const Point aPt( ImplMap( rPt ) ); + const Size aSz( ImplMap( rSz ) ); + FastString aImageData( (sal_Char*) aOStm.GetData(), aOStm.Tell() ); + REF( NMSP_SAX::XExtendedDocumentHandler ) xExtDocHandler( mrExport.GetDocHandler(), NMSP_UNO::UNO_QUERY ); if( xExtDocHandler.is() ) { - static const sal_uInt32 nPartLen = 64; - const NMSP_RTL::OUString aSpace( ' ' ); - const NMSP_RTL::OUString aLineFeed( NMSP_RTL::OUString::valueOf( (sal_Unicode) 0x0a ) ); - NMSP_RTL::OUString aString; - NMSP_RTL::OUString aImageString; + static const sal_uInt32 nPartLen = 64; + const NMSP_RTL::OUString aSpace( ' ' ); + const NMSP_RTL::OUString aLineFeed( NMSP_RTL::OUString::valueOf( (sal_Unicode) 0x0a ) ); + NMSP_RTL::OUString aString; + NMSP_RTL::OUString aImageString; aString = aLineFeed; aString += B2UCONST( "<" ); aString += NMSP_RTL::OUString::createFromAscii( aXMLElemImage ); aString += aSpace; - + aString += NMSP_RTL::OUString::createFromAscii( aXMLAttrX ); aString += B2UCONST( "=\"" ); aString += GetValueString( aPt.X(), mbDoublePoints ); @@ -1052,12 +1052,12 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, const NMSP_RTL: for( ULONG i = 0, nCount = rMtf.GetActionCount(); i < nCount; i++ ) { - const MetaAction* pAction = rMtf.GetAction( i ); - const USHORT nType = pAction->GetType(); + const MetaAction* pAction = rMtf.GetAction( i ); + const USHORT nType = pAction->GetType(); switch( nType ) { - case( META_PIXEL_ACTION ): + case( META_PIXEL_ACTION ): { const MetaPixelAction* pA = (const MetaPixelAction*) pAction; @@ -1066,7 +1066,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, const NMSP_RTL: } break; - case( META_POINT_ACTION ): + case( META_POINT_ACTION ): { const MetaPointAction* pA = (const MetaPointAction*) pAction; @@ -1078,7 +1078,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, const NMSP_RTL: case( META_LINE_ACTION ): { const MetaLineAction* pA = (const MetaLineAction*) pAction; - + mpContext->SetPaintAttr( mpVDev->GetLineColor(), mpVDev->GetLineColor() ); ImplWriteLine( pA->GetStartPoint(), pA->GetEndPoint(), NULL, pStyle ); } @@ -1091,7 +1091,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, const NMSP_RTL: } break; - case( META_ROUNDRECT_ACTION ): + case( META_ROUNDRECT_ACTION ): { const MetaRoundRectAction* pA = (const MetaRoundRectAction*) pAction; @@ -1102,8 +1102,8 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, const NMSP_RTL: case( META_ELLIPSE_ACTION ): { - const MetaEllipseAction* pA = (const MetaEllipseAction*) pAction; - const Rectangle& rRect = pA->GetRect(); + const MetaEllipseAction* pA = (const MetaEllipseAction*) pAction; + const Rectangle& rRect = pA->GetRect(); mpContext->SetPaintAttr( mpVDev->GetLineColor(), mpVDev->GetFillColor() ); ImplWriteEllipse( rRect.Center(), rRect.GetWidth() >> 1, rRect.GetHeight() >> 1, pStyle ); @@ -1112,7 +1112,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, const NMSP_RTL: case( META_ARC_ACTION ): case( META_PIE_ACTION ): - case( META_CHORD_ACTION ): + case( META_CHORD_ACTION ): case( META_POLYGON_ACTION ): { Polygon aPoly; @@ -1133,13 +1133,13 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, const NMSP_RTL: } break; - case( META_CHORD_ACTION ): + case( META_CHORD_ACTION ): { const MetaChordAction* pA = (const MetaChordAction*) pAction; aPoly = Polygon( pA->GetRect(), pA->GetStartPoint(), pA->GetEndPoint(), POLY_CHORD ); } break; - + case( META_POLYGON_ACTION ): aPoly = ( (const MetaPolygonAction*) pAction )->GetPolygon(); break; @@ -1155,8 +1155,8 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, const NMSP_RTL: case( META_POLYLINE_ACTION ): { - const MetaPolyLineAction* pA = (const MetaPolyLineAction*) pAction; - const Polygon& rPoly = pA->GetPolygon(); + const MetaPolyLineAction* pA = (const MetaPolyLineAction*) pAction; + const Polygon& rPoly = pA->GetPolygon(); if( rPoly.GetSize() ) { @@ -1168,8 +1168,8 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, const NMSP_RTL: case( META_POLYPOLYGON_ACTION ): { - const MetaPolyPolygonAction* pA = (const MetaPolyPolygonAction*) pAction; - const PolyPolygon& rPolyPoly = pA->GetPolyPolygon(); + const MetaPolyPolygonAction* pA = (const MetaPolyPolygonAction*) pAction; + const PolyPolygon& rPolyPoly = pA->GetPolyPolygon(); if( rPolyPoly.Count() ) { @@ -1181,8 +1181,8 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, const NMSP_RTL: case( META_GRADIENT_ACTION ): { - const MetaGradientAction* pA = (const MetaGradientAction*) pAction; - GDIMetaFile aTmpMtf; + const MetaGradientAction* pA = (const MetaGradientAction*) pAction; + GDIMetaFile aTmpMtf; mpVDev->AddGradientActions( pA->GetRect(), pA->GetGradient(), aTmpMtf ); ImplWriteActions( aTmpMtf, pStyle ); @@ -1191,15 +1191,15 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, const NMSP_RTL: case( META_GRADIENTEX_ACTION ): { - const MetaGradientExAction* pA = (const MetaGradientExAction*) pAction; + const MetaGradientExAction* pA = (const MetaGradientExAction*) pAction; ImplWriteGradientEx( pA->GetPolyPolygon(), pA->GetGradient(), pStyle ); } break; case META_HATCH_ACTION: { - const MetaHatchAction* pA = (const MetaHatchAction*) pAction; - GDIMetaFile aTmpMtf; + const MetaHatchAction* pA = (const MetaHatchAction*) pAction; + GDIMetaFile aTmpMtf; mpVDev->AddHatchActions( pA->GetPolyPolygon(), pA->GetHatch(), aTmpMtf ); ImplWriteActions( aTmpMtf, pStyle ); @@ -1208,8 +1208,8 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, const NMSP_RTL: case( META_TRANSPARENT_ACTION ): { - const MetaTransparentAction* pA = (const MetaTransparentAction*) pAction; - const PolyPolygon& rPolyPoly = pA->GetPolyPolygon(); + const MetaTransparentAction* pA = (const MetaTransparentAction*) pAction; + const PolyPolygon& rPolyPoly = pA->GetPolyPolygon(); if( rPolyPoly.Count() ) { @@ -1221,15 +1221,15 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, const NMSP_RTL: case( META_FLOATTRANSPARENT_ACTION ): { - const MetaFloatTransparentAction* pA = (const MetaFloatTransparentAction*) pAction; - GDIMetaFile aTmpMtf( pA->GetGDIMetaFile() ); - Point aSrcPt( aTmpMtf.GetPrefMapMode().GetOrigin() ); - const Size aSrcSize( aTmpMtf.GetPrefSize() ); - const Point aDestPt( pA->GetPoint() ); - const Size aDestSize( pA->GetSize() ); - const double fScaleX = aSrcSize.Width() ? (double) aDestSize.Width() / aSrcSize.Width() : 1.0; - const double fScaleY = aSrcSize.Height() ? (double) aDestSize.Height() / aSrcSize.Height() : 1.0; - long nMoveX, nMoveY; + const MetaFloatTransparentAction* pA = (const MetaFloatTransparentAction*) pAction; + GDIMetaFile aTmpMtf( pA->GetGDIMetaFile() ); + Point aSrcPt( aTmpMtf.GetPrefMapMode().GetOrigin() ); + const Size aSrcSize( aTmpMtf.GetPrefSize() ); + const Point aDestPt( pA->GetPoint() ); + const Size aDestSize( pA->GetSize() ); + const double fScaleX = aSrcSize.Width() ? (double) aDestSize.Width() / aSrcSize.Width() : 1.0; + const double fScaleY = aSrcSize.Height() ? (double) aDestSize.Height() / aSrcSize.Height() : 1.0; + long nMoveX, nMoveY; if( fScaleX != 1.0 || fScaleY != 1.0 ) { @@ -1250,21 +1250,21 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, const NMSP_RTL: case( META_EPS_ACTION ): { - const MetaEPSAction* pA = (const MetaEPSAction*) pAction; - const GDIMetaFile aGDIMetaFile( pA->GetSubstitute() ); - sal_Bool bFound = sal_False; + const MetaEPSAction* pA = (const MetaEPSAction*) pAction; + const GDIMetaFile aGDIMetaFile( pA->GetSubstitute() ); + sal_Bool bFound = sal_False; for( ULONG j = 0, nCount2 = aGDIMetaFile.GetActionCount(); ( j < nCount2 ) && !bFound; j++ ) { const MetaAction* pSubstAct = aGDIMetaFile.GetAction( j ); - + if( pSubstAct->GetType() == META_BMPSCALE_ACTION ) { bFound = sal_True; const MetaBmpScaleAction* pBmpScaleAction = (const MetaBmpScaleAction*) pSubstAct; mpContext->SetPaintAttr( mpVDev->GetLineColor(), mpVDev->GetFillColor() ); - ImplWriteBmp( pBmpScaleAction->GetBitmap(), - pA->GetPoint(), pA->GetSize(), + ImplWriteBmp( pBmpScaleAction->GetBitmap(), + pA->GetPoint(), pA->GetSize(), Point(), pBmpScaleAction->GetBitmap().GetSizePixel(), pStyle ); } } @@ -1273,13 +1273,13 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, const NMSP_RTL: case( META_COMMENT_ACTION ): { - const MetaCommentAction* pA = (const MetaCommentAction*) pAction; - String aSkipComment; + const MetaCommentAction* pA = (const MetaCommentAction*) pAction; + String aSkipComment; if( pA->GetComment().CompareIgnoreCaseToAscii( "XGRAD_SEQ_BEGIN" ) == COMPARE_EQUAL ) { - const MetaGradientExAction* pGradAction = NULL; - sal_Bool bDone = sal_False; + const MetaGradientExAction* pGradAction = NULL; + sal_Bool bDone = sal_False; while( !bDone && ( ++i < nCount ) ) { @@ -1287,7 +1287,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, const NMSP_RTL: if( pAction->GetType() == META_GRADIENTEX_ACTION ) pGradAction = (const MetaGradientExAction*) pAction; - else if( ( pAction->GetType() == META_COMMENT_ACTION ) && + else if( ( pAction->GetType() == META_COMMENT_ACTION ) && ( ( (const MetaCommentAction*) pAction )->GetComment().CompareIgnoreCaseToAscii( "XGRAD_SEQ_END" ) == COMPARE_EQUAL ) ) { bDone = sal_True; @@ -1303,10 +1303,10 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, const NMSP_RTL: case( META_BMP_ACTION ): { const MetaBmpAction* pA = (const MetaBmpAction*) pAction; - + mpContext->SetPaintAttr( mpVDev->GetLineColor(), mpVDev->GetFillColor() ); - ImplWriteBmp( pA->GetBitmap(), - pA->GetPoint(), mpVDev->PixelToLogic( pA->GetBitmap().GetSizePixel() ), + ImplWriteBmp( pA->GetBitmap(), + pA->GetPoint(), mpVDev->PixelToLogic( pA->GetBitmap().GetSizePixel() ), Point(), pA->GetBitmap().GetSizePixel(), pStyle ); } break; @@ -1314,10 +1314,10 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, const NMSP_RTL: case( META_BMPSCALE_ACTION ): { const MetaBmpScaleAction* pA = (const MetaBmpScaleAction*) pAction; - + mpContext->SetPaintAttr( mpVDev->GetLineColor(), mpVDev->GetFillColor() ); - ImplWriteBmp( pA->GetBitmap(), - pA->GetPoint(), pA->GetSize(), + ImplWriteBmp( pA->GetBitmap(), + pA->GetPoint(), pA->GetSize(), Point(), pA->GetBitmap().GetSizePixel(), pStyle ); } break; @@ -1325,21 +1325,21 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, const NMSP_RTL: case( META_BMPSCALEPART_ACTION ): { const MetaBmpScalePartAction* pA = (const MetaBmpScalePartAction*) pAction; - + mpContext->SetPaintAttr( mpVDev->GetLineColor(), mpVDev->GetFillColor() ); - ImplWriteBmp( pA->GetBitmap(), - pA->GetDestPoint(), pA->GetDestSize(), + ImplWriteBmp( pA->GetBitmap(), + pA->GetDestPoint(), pA->GetDestSize(), pA->GetSrcPoint(), pA->GetSrcSize(), pStyle ); } break; - case( META_BMPEX_ACTION ): + case( META_BMPEX_ACTION ): { - const MetaBmpExAction* pA = (const MetaBmpExAction*) pAction; - + const MetaBmpExAction* pA = (const MetaBmpExAction*) pAction; + mpContext->SetPaintAttr( mpVDev->GetLineColor(), mpVDev->GetFillColor() ); - ImplWriteBmp( pA->GetBitmapEx(), - pA->GetPoint(), mpVDev->PixelToLogic( pA->GetBitmapEx().GetSizePixel() ), + ImplWriteBmp( pA->GetBitmapEx(), + pA->GetPoint(), mpVDev->PixelToLogic( pA->GetBitmapEx().GetSizePixel() ), Point(), pA->GetBitmapEx().GetSizePixel(), pStyle ); } break; @@ -1347,10 +1347,10 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, const NMSP_RTL: case( META_BMPEXSCALE_ACTION ): { const MetaBmpExScaleAction* pA = (const MetaBmpExScaleAction*) pAction; - + mpContext->SetPaintAttr( mpVDev->GetLineColor(), mpVDev->GetFillColor() ); - ImplWriteBmp( pA->GetBitmapEx(), - pA->GetPoint(), pA->GetSize(), + ImplWriteBmp( pA->GetBitmapEx(), + pA->GetPoint(), pA->GetSize(), Point(), pA->GetBitmapEx().GetSizePixel(), pStyle ); } break; @@ -1358,10 +1358,10 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, const NMSP_RTL: case( META_BMPEXSCALEPART_ACTION ): { const MetaBmpExScalePartAction* pA = (const MetaBmpExScalePartAction*) pAction; - + mpContext->SetPaintAttr( mpVDev->GetLineColor(), mpVDev->GetFillColor() ); - ImplWriteBmp( pA->GetBitmapEx(), - pA->GetDestPoint(), pA->GetDestSize(), + ImplWriteBmp( pA->GetBitmapEx(), + pA->GetDestPoint(), pA->GetDestSize(), pA->GetSrcPoint(), pA->GetSrcSize(), pStyle ); } break; @@ -1373,7 +1373,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, const NMSP_RTL: mpContext->SetFontAttr( mpVDev->GetFont() ); mpContext->SetPaintAttr( COL_TRANSPARENT, mpVDev->GetFont().GetColor() ); ImplWriteText( pA->GetPoint(), String( pA->GetText(), pA->GetIndex(), pA->GetLen() ), NULL, 0, pStyle ); - } + } break; case( META_TEXTRECT_ACTION ): @@ -1386,10 +1386,10 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, const NMSP_RTL: } break; - case( META_TEXTARRAY_ACTION ): + case( META_TEXTARRAY_ACTION ): { - const MetaTextArrayAction* pA = (const MetaTextArrayAction*) pAction; - const Point aPos( ImplMap( pA->GetPoint() ) ); + const MetaTextArrayAction* pA = (const MetaTextArrayAction*) pAction; + const Point aPos( ImplMap( pA->GetPoint() ) ); mpContext->SetFontAttr( mpVDev->GetFont() ); mpContext->SetPaintAttr( COL_TRANSPARENT, mpVDev->GetFont().GetColor() ); @@ -1409,7 +1409,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, const NMSP_RTL: case( META_CLIPREGION_ACTION ): case( META_ISECTRECTCLIPREGION_ACTION ): - case( META_ISECTREGIONCLIPREGION_ACTION ): + case( META_ISECTREGIONCLIPREGION_ACTION ): case( META_MOVECLIPREGION_ACTION ): { ( (MetaAction*) pAction )->Execute( mpVDev ); @@ -1419,12 +1419,12 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, const NMSP_RTL: case( META_REFPOINT_ACTION ): case( META_MAPMODE_ACTION ): - case( META_LINECOLOR_ACTION ): - case( META_FILLCOLOR_ACTION ): + case( META_LINECOLOR_ACTION ): + case( META_FILLCOLOR_ACTION ): case( META_TEXTLINECOLOR_ACTION ): - case( META_TEXTFILLCOLOR_ACTION ): - case( META_TEXTCOLOR_ACTION ): - case( META_TEXTALIGN_ACTION ): + case( META_TEXTFILLCOLOR_ACTION ): + case( META_TEXTCOLOR_ACTION ): + case( META_TEXTALIGN_ACTION ): case( META_FONT_ACTION ): case( META_PUSH_ACTION ): case( META_POP_ACTION ): @@ -1435,9 +1435,9 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, const NMSP_RTL: case( META_RASTEROP_ACTION ): case( META_MASK_ACTION ): - case( META_MASKSCALE_ACTION ): - case( META_MASKSCALEPART_ACTION ): - case( META_WALLPAPER_ACTION ): + case( META_MASKSCALE_ACTION ): + case( META_MASKSCALEPART_ACTION ): + case( META_WALLPAPER_ACTION ): case( META_TEXTLINE_ACTION ): case( META_LAYOUTMODE_ACTION ): { diff --git a/extensions/source/svg/svgaction.hxx b/extensions/source/svg/svgaction.hxx index b0ab5413ef17..9ec1e887f86e 100644 --- a/extensions/source/svg/svgaction.hxx +++ b/extensions/source/svg/svgaction.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -39,27 +39,27 @@ class FastString { private: - NMSP_RTL::OUString maString; - sal_Unicode* mpBuffer; - sal_uInt32 mnBufLen; - sal_uInt32 mnCurLen; - sal_uInt32 mnBufInc; - sal_uInt32 mnPartPos; - -public: - + NMSP_RTL::OUString maString; + sal_Unicode* mpBuffer; + sal_uInt32 mnBufLen; + sal_uInt32 mnCurLen; + sal_uInt32 mnBufInc; + sal_uInt32 mnPartPos; + +public: + FastString( sal_uInt32 nInitLen = 2048, sal_uInt32 nIncrement = 2048 ); FastString( sal_Char* pBufferForBase64Encoding, sal_uInt32 nBufLen ); ~FastString(); - - FastString& operator+=( const NMSP_RTL::OUString& rStr ); - - const NMSP_RTL::OUString& GetString() const; - sal_Bool GetFirstPartString( const sal_uInt32 nPartLen, NMSP_RTL::OUString& rPartString ); - sal_Bool GetNextPartString( const sal_uInt32 nPartLen, NMSP_RTL::OUString& rPartString ); - - sal_uInt32 GetLength() const { return mnCurLen; } - void Clear() { mnCurLen = 0, maString = NMSP_RTL::OUString(); } + + FastString& operator+=( const NMSP_RTL::OUString& rStr ); + + const NMSP_RTL::OUString& GetString() const; + sal_Bool GetFirstPartString( const sal_uInt32 nPartLen, NMSP_RTL::OUString& rPartString ); + sal_Bool GetNextPartString( const sal_uInt32 nPartLen, NMSP_RTL::OUString& rPartString ); + + sal_uInt32 GetLength() const { return mnCurLen; } + void Clear() { mnCurLen = 0, maString = NMSP_RTL::OUString(); } }; // ---------------------- @@ -72,26 +72,26 @@ class SVGAttributeWriter { private: - Font maCurFont; - Color maCurLineColor; - Color maCurFillColor; - SVGActionWriter& mrParent; - SvXMLExport& mrExport; - SvXMLElementExport* mpElemFont; - SvXMLElementExport* mpElemPaint; + Font maCurFont; + Color maCurLineColor; + Color maCurFillColor; + SVGActionWriter& mrParent; + SvXMLExport& mrExport; + SvXMLElementExport* mpElemFont; + SvXMLElementExport* mpElemPaint; SVGAttributeWriter(); public: SVGAttributeWriter( SVGActionWriter& rParent, SvXMLExport& rExport ); - virtual ~SVGAttributeWriter(); + virtual ~SVGAttributeWriter(); - NMSP_RTL::OUString GetFontStyle( const Font& rFont ); - NMSP_RTL::OUString GetPaintStyle( const Color& rLineColor, const Color& rFillColor ); + NMSP_RTL::OUString GetFontStyle( const Font& rFont ); + NMSP_RTL::OUString GetPaintStyle( const Color& rLineColor, const Color& rFillColor ); - void SetFontAttr( const Font& rFont ); - void SetPaintAttr( const Color& rLineColor, const Color& rFillColor ); + void SetFontAttr( const Font& rFont ); + void SetPaintAttr( const Color& rLineColor, const Color& rFillColor ); }; // ------------------- @@ -108,42 +108,42 @@ class SVGActionWriter private: - Stack maContextStack; - SvXMLExport& mrExport; - const GDIMetaFile& mrMtf; - SVGAttributeWriter* mpContext; - VirtualDevice* mpVDev; - MapMode maTargetMapMode; - sal_Int32 mnCurClipId; - sal_Bool mbDestroyVDev; - sal_Bool mbPaintAttrChanged; - sal_Bool mbFontAttrChanged; - sal_Bool mbClipAttrChanged; - sal_Bool mbDoublePoints; - - SVGAttributeWriter* ImplAcquireContext() { maContextStack.Push( mpContext = new SVGAttributeWriter( *this, mrExport ) ); return mpContext; } - void ImplReleaseContext() { delete (SVGAttributeWriter*) maContextStack.Pop(); mpContext = (SVGAttributeWriter*) maContextStack.Top(); } - - long ImplMap( sal_Int32 nVal ) const; - Point ImplMap( const Point& rPt ) const; - Size ImplMap( const Size& rSz ) const; - inline Rectangle ImplMap( const Rectangle& rRect ) const { return Rectangle( ImplMap( rRect.TopLeft() ), ImplMap( rRect.GetSize() ) ); } - - void ImplWriteLine( const Point& rPt1, const Point& rPt2, const Color* pLineColor = NULL, const NMSP_RTL::OUString* pStyle = NULL ); - void ImplWriteRect( const Rectangle& rRect, long nRadX = 0, long nRadY = 0, const NMSP_RTL::OUString* pStyle = NULL ); - void ImplWriteEllipse( const Point& rCenter, long nRadX, long nRadY, const NMSP_RTL::OUString* pStyle = NULL ); - void ImplWritePolygon( const Polygon& rPoly, sal_Bool bLineOnly, const NMSP_RTL::OUString* pStyle = NULL ); - void ImplWritePolyPolygon( const PolyPolygon& rPolyPoly, sal_Bool bLineOnly, const NMSP_RTL::OUString* pStyle = NULL ); - void ImplWriteGradientEx( const PolyPolygon& rPolyPoly, const Gradient& rGradient, const NMSP_RTL::OUString* pStyle = NULL ); - void ImplWriteText( const Point& rPos, const String& rText, const sal_Int32* pDXArray, long nWidth, const NMSP_RTL::OUString* pStyle = NULL ); - void ImplWriteBmp( const BitmapEx& rBmpEx, const Point& rPt, const Size& rSz, const Point& rSrcPt, const Size& rSrcSz, const NMSP_RTL::OUString* pStyle = NULL ); - - void ImplCheckFontAttributes(); - void ImplCheckPaintAttributes(); - - void ImplWriteActions( const GDIMetaFile& rMtf, const NMSP_RTL::OUString* pStyle = NULL ); - - sal_Int32 ImplGetNextClipId() { return mnCurClipId++; } + Stack maContextStack; + SvXMLExport& mrExport; + const GDIMetaFile& mrMtf; + SVGAttributeWriter* mpContext; + VirtualDevice* mpVDev; + MapMode maTargetMapMode; + sal_Int32 mnCurClipId; + sal_Bool mbDestroyVDev; + sal_Bool mbPaintAttrChanged; + sal_Bool mbFontAttrChanged; + sal_Bool mbClipAttrChanged; + sal_Bool mbDoublePoints; + + SVGAttributeWriter* ImplAcquireContext() { maContextStack.Push( mpContext = new SVGAttributeWriter( *this, mrExport ) ); return mpContext; } + void ImplReleaseContext() { delete (SVGAttributeWriter*) maContextStack.Pop(); mpContext = (SVGAttributeWriter*) maContextStack.Top(); } + + long ImplMap( sal_Int32 nVal ) const; + Point ImplMap( const Point& rPt ) const; + Size ImplMap( const Size& rSz ) const; + inline Rectangle ImplMap( const Rectangle& rRect ) const { return Rectangle( ImplMap( rRect.TopLeft() ), ImplMap( rRect.GetSize() ) ); } + + void ImplWriteLine( const Point& rPt1, const Point& rPt2, const Color* pLineColor = NULL, const NMSP_RTL::OUString* pStyle = NULL ); + void ImplWriteRect( const Rectangle& rRect, long nRadX = 0, long nRadY = 0, const NMSP_RTL::OUString* pStyle = NULL ); + void ImplWriteEllipse( const Point& rCenter, long nRadX, long nRadY, const NMSP_RTL::OUString* pStyle = NULL ); + void ImplWritePolygon( const Polygon& rPoly, sal_Bool bLineOnly, const NMSP_RTL::OUString* pStyle = NULL ); + void ImplWritePolyPolygon( const PolyPolygon& rPolyPoly, sal_Bool bLineOnly, const NMSP_RTL::OUString* pStyle = NULL ); + void ImplWriteGradientEx( const PolyPolygon& rPolyPoly, const Gradient& rGradient, const NMSP_RTL::OUString* pStyle = NULL ); + void ImplWriteText( const Point& rPos, const String& rText, const sal_Int32* pDXArray, long nWidth, const NMSP_RTL::OUString* pStyle = NULL ); + void ImplWriteBmp( const BitmapEx& rBmpEx, const Point& rPt, const Size& rSz, const Point& rSrcPt, const Size& rSrcSz, const NMSP_RTL::OUString* pStyle = NULL ); + + void ImplCheckFontAttributes(); + void ImplCheckPaintAttributes(); + + void ImplWriteActions( const GDIMetaFile& rMtf, const NMSP_RTL::OUString* pStyle = NULL ); + + sal_Int32 ImplGetNextClipId() { return mnCurClipId++; } SVGActionWriter(); @@ -153,13 +153,13 @@ public: public: - SVGActionWriter( SvXMLExport& rExport, const GDIMetaFile& rMtf, - VirtualDevice* pParentVDev = NULL, + SVGActionWriter( SvXMLExport& rExport, const GDIMetaFile& rMtf, + VirtualDevice* pParentVDev = NULL, sal_Bool bWriteDoublePoints = sal_False ); - virtual ~SVGActionWriter(); + virtual ~SVGActionWriter(); - const VirtualDevice& GetVDev() const { return *mpVDev; } - BOOL HasDoublePoints() const { return mbDoublePoints; } + const VirtualDevice& GetVDev() const { return *mpVDev; } + BOOL HasDoublePoints() const { return mbDoublePoints; } }; #endif diff --git a/extensions/source/svg/svgcom.hxx b/extensions/source/svg/svgcom.hxx index d0441536944e..20ac4c24ee54 100644 --- a/extensions/source/svg/svgcom.hxx +++ b/extensions/source/svg/svgcom.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -57,20 +57,20 @@ // ----------------------------------------------------------------------------- -#define NMSP_CPPU cppu -#define NMSP_RTL rtl -#define NMSP_UNO com::sun::star::uno -#define NMSP_LANG com::sun::star::lang -#define NMSP_SAX com::sun::star::xml::sax -#define NMSP_SVG com::sun::star::svg +#define NMSP_CPPU cppu +#define NMSP_RTL rtl +#define NMSP_UNO com::sun::star::uno +#define NMSP_LANG com::sun::star::lang +#define NMSP_SAX com::sun::star::xml::sax +#define NMSP_SVG com::sun::star::svg #define NMSP_REGISTRY com::sun::star::registry -#define REF( _def_Obj ) NMSP_UNO::Reference< _def_Obj > -#define SEQ( _def_Obj ) NMSP_UNO::Sequence< _def_Obj > -#define ANY NMSP_UNO::Any -#define B2UCONST( _def_pChar ) (NMSP_RTL::OUString(RTL_CONSTASCII_USTRINGPARAM(_def_pChar ))) -#define SVG_DTD_STRING B2UCONST( "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">" ) +#define REF( _def_Obj ) NMSP_UNO::Reference< _def_Obj > +#define SEQ( _def_Obj ) NMSP_UNO::Sequence< _def_Obj > +#define ANY NMSP_UNO::Any +#define B2UCONST( _def_pChar ) (NMSP_RTL::OUString(RTL_CONSTASCII_USTRINGPARAM(_def_pChar ))) +#define SVG_DTD_STRING B2UCONST( "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">" ) #endif // _SYNCCOM_HXX diff --git a/extensions/source/svg/svgprinter.cxx b/extensions/source/svg/svgprinter.cxx index 15b42ce8841f..b52a181ccb38 100644 --- a/extensions/source/svg/svgprinter.cxx +++ b/extensions/source/svg/svgprinter.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -59,65 +59,65 @@ class SVGPrinterExport : public SvXMLExport { private: - Printer maPrinter; - VirtualDevice* mpVDev; - SvXMLElementExport* mpOuterElement; - sal_uInt32 mnPage; + Printer maPrinter; + VirtualDevice* mpVDev; + SvXMLElementExport* mpOuterElement; + sal_uInt32 mnPage; SVGPrinterExport(); - SvXMLElementExport* ImplCreateSVGElement( const JobSetup& rSetup, Size& rOutputSize ); - void ImplWriteMetaAttr( sal_Bool bOuter, sal_Bool bPage ); + SvXMLElementExport* ImplCreateSVGElement( const JobSetup& rSetup, Size& rOutputSize ); + void ImplWriteMetaAttr( sal_Bool bOuter, sal_Bool bPage ); protected: - virtual void _ExportMeta() {} - virtual void _ExportStyles( BOOL /*bUsed*/ ) {} - virtual void _ExportAutoStyles() {} - virtual void _ExportContent() {} - virtual void _ExportMasterStyles() {} - virtual sal_uInt32 exportDoc( enum ::xmloff::token::XMLTokenEnum eClass = ::xmloff::token::XML_TOKEN_INVALID ) { (void)eClass; return 0; } - -public: - + virtual void _ExportMeta() {} + virtual void _ExportStyles( BOOL /*bUsed*/ ) {} + virtual void _ExportAutoStyles() {} + virtual void _ExportContent() {} + virtual void _ExportMasterStyles() {} + virtual sal_uInt32 exportDoc( enum ::xmloff::token::XMLTokenEnum eClass = ::xmloff::token::XML_TOKEN_INVALID ) { (void)eClass; return 0; } + +public: + // #110680# - SVGPrinterExport( + SVGPrinterExport( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceFactory, - const REF( NMSP_SAX::XDocumentHandler )& rxHandler, + const REF( NMSP_SAX::XDocumentHandler )& rxHandler, const JobSetup& rSetup, - const NMSP_RTL::OUString& rJobName, - sal_uInt32 nCopies, + const NMSP_RTL::OUString& rJobName, + sal_uInt32 nCopies, sal_Bool bCollate ); - virtual ~SVGPrinterExport(); + virtual ~SVGPrinterExport(); - virtual void writePage( const JobSetup& rJobSetup, const GDIMetaFile& rMtf ); + virtual void writePage( const JobSetup& rJobSetup, const GDIMetaFile& rMtf ); }; // ----------------------------------------------------------------------------- // #110680# -SVGPrinterExport::SVGPrinterExport( +SVGPrinterExport::SVGPrinterExport( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceFactory, - const REF( NMSP_SAX::XDocumentHandler )& rxHandler, + const REF( NMSP_SAX::XDocumentHandler )& rxHandler, const JobSetup& rSetup, - const NMSP_RTL::OUString& rJobName, - sal_uInt32 /*nCopies*/, - sal_Bool /*bCollate*/ ) -: SvXMLExport( xServiceFactory, NMSP_RTL::OUString(), rxHandler ), + const NMSP_RTL::OUString& rJobName, + sal_uInt32 /*nCopies*/, + sal_Bool /*bCollate*/ ) +: SvXMLExport( xServiceFactory, NMSP_RTL::OUString(), rxHandler ), mpVDev( NULL ), mnPage( 0 ) { maPrinter.SetJobSetup( rSetup ); - + GetDocHandler()->startDocument(); REF( NMSP_SAX::XExtendedDocumentHandler ) xExtDocHandler( GetDocHandler(), NMSP_UNO::UNO_QUERY ); if( xExtDocHandler.is() ) { - NMSP_RTL::OUString aString; - const NMSP_RTL::OUString aLineFeed( NMSP_RTL::OUString::valueOf( (sal_Unicode) 0x0a ) ); + NMSP_RTL::OUString aString; + const NMSP_RTL::OUString aLineFeed( NMSP_RTL::OUString::valueOf( (sal_Unicode) 0x0a ) ); // intro xExtDocHandler->unknown( ( aString = SVG_DTD_STRING ) += aLineFeed ); @@ -141,8 +141,8 @@ SVGPrinterExport::SVGPrinterExport( // write description SvXMLElementExport* pDescElem = new SvXMLElementExport( *this, XML_NAMESPACE_NONE, aXMLElemDesc, TRUE, TRUE ); - NMSP_RTL::OUString aDesc( B2UCONST( "document name: " ) ); - + NMSP_RTL::OUString aDesc( B2UCONST( "document name: " ) ); + GetDocHandler()->characters( aDesc += rJobName ); delete pDescElem; @@ -161,7 +161,7 @@ SVGPrinterExport::~SVGPrinterExport() // ----------------------------------------------------------------------------- -SvXMLElementExport* SVGPrinterExport::ImplCreateSVGElement( const JobSetup& rSetup, Size& rOutputSize ) +SvXMLElementExport* SVGPrinterExport::ImplCreateSVGElement( const JobSetup& rSetup, Size& rOutputSize ) { NMSP_RTL::OUString aAttr; @@ -173,16 +173,16 @@ SvXMLElementExport* SVGPrinterExport::ImplCreateSVGElement( const JobSetup& rSet rOutputSize = maPrinter.PixelToLogic( maPrinter.GetOutputSizePixel(), mpVDev->GetMapMode() ); - aAttr = SVGActionWriter::GetValueString( rOutputSize.Width(), sal_True ); + aAttr = SVGActionWriter::GetValueString( rOutputSize.Width(), sal_True ); AddAttribute( XML_NAMESPACE_NONE, aXMLAttrWidth, aAttr ); - aAttr = SVGActionWriter::GetValueString( rOutputSize.Height(), sal_True ); + aAttr = SVGActionWriter::GetValueString( rOutputSize.Height(), sal_True ); AddAttribute( XML_NAMESPACE_NONE, aXMLAttrHeight, aAttr ); aAttr = B2UCONST( "0.0 0.0 " ); - aAttr += SVGActionWriter::GetValueString( rOutputSize.Width(), sal_True ); + aAttr += SVGActionWriter::GetValueString( rOutputSize.Width(), sal_True ); aAttr += B2UCONST( " " ); - aAttr += SVGActionWriter::GetValueString( rOutputSize.Height(), sal_True ); + aAttr += SVGActionWriter::GetValueString( rOutputSize.Height(), sal_True ); AddAttribute( XML_NAMESPACE_NONE, aXMLAttrViewBox, aAttr ); return( new SvXMLElementExport( *this, XML_NAMESPACE_NONE, aXMLElemSVG, TRUE, TRUE ) ); @@ -192,8 +192,8 @@ SvXMLElementExport* SVGPrinterExport::ImplCreateSVGElement( const JobSetup& rSet void SVGPrinterExport::ImplWriteMetaAttr( sal_Bool bOuter, sal_Bool bPage ) { - SvXMLElementExport aMetaData( *this, XML_NAMESPACE_NONE, aXMLElemMeta, TRUE, TRUE ); - NMSP_RTL::OUString aAttr; + SvXMLElementExport aMetaData( *this, XML_NAMESPACE_NONE, aXMLElemMeta, TRUE, TRUE ); + NMSP_RTL::OUString aAttr; aAttr = bOuter ? B2UCONST( "true" ) : B2UCONST( "false" ); AddAttribute( XML_NAMESPACE_NONE, aXMLAttrMetaSVGOuter, aAttr ); @@ -202,22 +202,22 @@ void SVGPrinterExport::ImplWriteMetaAttr( sal_Bool bOuter, sal_Bool bPage ) AddAttribute( XML_NAMESPACE_NONE, aXMLAttrMetaSVGPage, aAttr ); { - delete( new SvXMLElementExport( *this, XML_NAMESPACE_NONE, aXMLElemMetaSVG, TRUE, TRUE ) ); + delete( new SvXMLElementExport( *this, XML_NAMESPACE_NONE, aXMLElemMetaSVG, TRUE, TRUE ) ); } } // ----------------------------------------------------------------------------- void SVGPrinterExport::writePage( const JobSetup& rSetup, const GDIMetaFile& rMtf ) -{ - Size aOutputSize; - NMSP_RTL::OUString aAttr; +{ + Size aOutputSize; + NMSP_RTL::OUString aAttr; SvXMLElementExport* pPageElem = ImplCreateSVGElement( rSetup, aOutputSize ); // write description SvXMLElementExport* pDescElem = new SvXMLElementExport( *this, XML_NAMESPACE_NONE, aXMLElemDesc, TRUE, TRUE ); - NMSP_RTL::OUString aDesc( B2UCONST( "page: " ) ); - + NMSP_RTL::OUString aDesc( B2UCONST( "page: " ) ); + GetDocHandler()->characters( aDesc += NMSP_RTL::OUString::valueOf( (sal_Int32) ++mnPage ) ); delete pDescElem; @@ -284,17 +284,17 @@ void SAL_CALL SVGPrinter::release() throw() // ----------------------------------------------------------------------------- -sal_Bool SAL_CALL SVGPrinter::startJob( const REF( NMSP_SAX::XDocumentHandler )& rxHandler, - const SEQ( sal_Int8 )& rJobSetupSeq, - const NMSP_RTL::OUString& rJobName, +sal_Bool SAL_CALL SVGPrinter::startJob( const REF( NMSP_SAX::XDocumentHandler )& rxHandler, + const SEQ( sal_Int8 )& rJobSetupSeq, + const NMSP_RTL::OUString& rJobName, sal_uInt32 nCopies, sal_Bool bCollate ) throw( NMSP_UNO::RuntimeException ) { const sal_Bool bRet = ( mpWriter == NULL ); if( bRet ) { - SvMemoryStream aMemStm( (char*) rJobSetupSeq.getConstArray(), rJobSetupSeq.getLength(), STREAM_READ ); - JobSetup aJobSetup; + SvMemoryStream aMemStm( (char*) rJobSetupSeq.getConstArray(), rJobSetupSeq.getLength(), STREAM_READ ); + JobSetup aJobSetup; aMemStm.SetCompressMode( COMPRESSMODE_FULL ); aMemStm >> aJobSetup; @@ -313,8 +313,8 @@ sal_Bool SAL_CALL SVGPrinter::startJob( const REF( NMSP_SAX::XDocumentHandler )& void SAL_CALL SVGPrinter::printPage( const SEQ( sal_Int8 )& rPrintPage ) throw( NMSP_UNO::RuntimeException ) { - SvMemoryStream aMemStm( (char*) rPrintPage.getConstArray(), rPrintPage.getLength(), STREAM_READ ); - PrinterPage aPage; + SvMemoryStream aMemStm( (char*) rPrintPage.getConstArray(), rPrintPage.getLength(), STREAM_READ ); + PrinterPage aPage; aMemStm.SetCompressMode( COMPRESSMODE_FULL ); aMemStm >> aPage; diff --git a/extensions/source/svg/svgprinter.hxx b/extensions/source/svg/svgprinter.hxx index bbc29a06b6f8..24b6bfcf0e13 100644 --- a/extensions/source/svg/svgprinter.hxx +++ b/extensions/source/svg/svgprinter.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -38,31 +38,31 @@ class SVGPrinterExport; class SVGPrinter : public NMSP_CPPU::OWeakObject, NMSP_SVG::XSVGPrinter -{ +{ private: - REF( NMSP_LANG::XMultiServiceFactory ) mxFact; - SVGPrinterExport* mpWriter; - + REF( NMSP_LANG::XMultiServiceFactory ) mxFact; + SVGPrinterExport* mpWriter; + SVGPrinter(); - -public: - + +public: + SVGPrinter( const REF( NMSP_LANG::XMultiServiceFactory )& rxMgr ); - virtual ~SVGPrinter(); - - // XInterface - virtual ANY SAL_CALL queryInterface( const NMSP_UNO::Type & rType ) throw( NMSP_UNO::RuntimeException ); - virtual void SAL_CALL acquire() throw(); - virtual void SAL_CALL release() throw(); - + virtual ~SVGPrinter(); + + // XInterface + virtual ANY SAL_CALL queryInterface( const NMSP_UNO::Type & rType ) throw( NMSP_UNO::RuntimeException ); + virtual void SAL_CALL acquire() throw(); + virtual void SAL_CALL release() throw(); + // XSVGPrinter - virtual sal_Bool SAL_CALL startJob( const REF( NMSP_SAX::XDocumentHandler )& rxHandler, - const SEQ( sal_Int8 )& rJobSetup, - const NMSP_RTL::OUString& rJobName, + virtual sal_Bool SAL_CALL startJob( const REF( NMSP_SAX::XDocumentHandler )& rxHandler, + const SEQ( sal_Int8 )& rJobSetup, + const NMSP_RTL::OUString& rJobName, sal_uInt32 nCopies, sal_Bool bCollate ) throw( NMSP_UNO::RuntimeException ); - virtual void SAL_CALL printPage( const SEQ( sal_Int8 )& rPrintPage ) throw( NMSP_UNO::RuntimeException ); - virtual void SAL_CALL endJob() throw( NMSP_UNO::RuntimeException ); + virtual void SAL_CALL printPage( const SEQ( sal_Int8 )& rPrintPage ) throw( NMSP_UNO::RuntimeException ); + virtual void SAL_CALL endJob() throw( NMSP_UNO::RuntimeException ); }; #endif diff --git a/extensions/source/svg/svguno.cxx b/extensions/source/svg/svguno.cxx index 6cd5c258e66a..e94761253d34 100644 --- a/extensions/source/svg/svguno.cxx +++ b/extensions/source/svg/svguno.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -98,8 +98,8 @@ extern "C" sal_Bool SAL_CALL component_writeInfo( void* /*pServiceManager*/, voi extern "C" void* SAL_CALL component_getFactory( const sal_Char* pImplName, void* pServiceManager, void* /*pRegistryKey*/ ) { REF( NMSP_LANG::XSingleServiceFactory ) xFactory; - void* pRet = 0; - + void* pRet = 0; + if( rtl_str_compare( pImplName, "com.sun.star.comp.extensions.SVGWriter" ) == 0 ) { const NMSP_RTL::OUString aServiceName( B2UCONST( "com.sun.star.svg.SVGWriter" ) ); @@ -124,7 +124,7 @@ extern "C" void* SAL_CALL component_getFactory( const sal_Char* pImplName, void* xFactory->acquire(); pRet = xFactory.get(); } - + return pRet; } diff --git a/extensions/source/svg/svgwriter.cxx b/extensions/source/svg/svgwriter.cxx index 30d5eded34ac..3116199d92b4 100644 --- a/extensions/source/svg/svgwriter.cxx +++ b/extensions/source/svg/svgwriter.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -45,32 +45,32 @@ private: protected: - virtual void _ExportMeta() {} - virtual void _ExportStyles( BOOL /*bUsed*/ ) {} - virtual void _ExportAutoStyles() {} - virtual void _ExportContent() {} - virtual void _ExportMasterStyles() {} - virtual sal_uInt32 exportDoc( enum ::xmloff::token::XMLTokenEnum /*eClass*/ ) { return 0; } - -public: - + virtual void _ExportMeta() {} + virtual void _ExportStyles( BOOL /*bUsed*/ ) {} + virtual void _ExportAutoStyles() {} + virtual void _ExportContent() {} + virtual void _ExportMasterStyles() {} + virtual sal_uInt32 exportDoc( enum ::xmloff::token::XMLTokenEnum /*eClass*/ ) { return 0; } + +public: + // #110680# - SVGMtfExport( + SVGMtfExport( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceFactory, const REF( NMSP_SAX::XDocumentHandler )& rxHandler ); - virtual ~SVGMtfExport(); + virtual ~SVGMtfExport(); - virtual void writeMtf( const GDIMetaFile& rMtf ); + virtual void writeMtf( const GDIMetaFile& rMtf ); }; // ----------------------------------------------------------------------------- // #110680# -SVGMtfExport::SVGMtfExport( +SVGMtfExport::SVGMtfExport( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceFactory, - const REF( NMSP_SAX::XDocumentHandler )& rxHandler ) -: SvXMLExport( xServiceFactory, NMSP_RTL::OUString(), rxHandler ) + const REF( NMSP_SAX::XDocumentHandler )& rxHandler ) +: SvXMLExport( xServiceFactory, NMSP_RTL::OUString(), rxHandler ) { GetDocHandler()->startDocument(); } @@ -86,18 +86,18 @@ SVGMtfExport::~SVGMtfExport() void SVGMtfExport::writeMtf( const GDIMetaFile& rMtf ) { - const Size aSize( OutputDevice::LogicToLogic( rMtf.GetPrefSize(), rMtf.GetPrefMapMode(), MAP_MM ) ); - NMSP_RTL::OUString aAttr; - REF( NMSP_SAX::XExtendedDocumentHandler ) xExtDocHandler( GetDocHandler(), NMSP_UNO::UNO_QUERY ); + const Size aSize( OutputDevice::LogicToLogic( rMtf.GetPrefSize(), rMtf.GetPrefMapMode(), MAP_MM ) ); + NMSP_RTL::OUString aAttr; + REF( NMSP_SAX::XExtendedDocumentHandler ) xExtDocHandler( GetDocHandler(), NMSP_UNO::UNO_QUERY ); if( xExtDocHandler.is() ) xExtDocHandler->unknown( SVG_DTD_STRING ); - aAttr = NMSP_RTL::OUString::valueOf( aSize.Width() ); + aAttr = NMSP_RTL::OUString::valueOf( aSize.Width() ); aAttr += B2UCONST( "mm" ); AddAttribute( XML_NAMESPACE_NONE, "width", aAttr ); - aAttr = NMSP_RTL::OUString::valueOf( aSize.Height() ); + aAttr = NMSP_RTL::OUString::valueOf( aSize.Height() ); aAttr += B2UCONST( "mm" ); AddAttribute( XML_NAMESPACE_NONE, "height", aAttr ); @@ -108,9 +108,9 @@ void SVGMtfExport::writeMtf( const GDIMetaFile& rMtf ) AddAttribute( XML_NAMESPACE_NONE, "viewBox", aAttr ); { - SvXMLElementExport aSVG( *this, XML_NAMESPACE_NONE, "svg", TRUE, TRUE ); - SVGActionWriter* pWriter = new SVGActionWriter( *this, rMtf ); - + SvXMLElementExport aSVG( *this, XML_NAMESPACE_NONE, "svg", TRUE, TRUE ); + SVGActionWriter* pWriter = new SVGActionWriter( *this, rMtf ); + delete pWriter; } } @@ -156,17 +156,17 @@ void SAL_CALL SVGWriter::release() throw() // ----------------------------------------------------------------------------- -void SAL_CALL SVGWriter::write( const REF( NMSP_SAX::XDocumentHandler )& rxDocHandler, +void SAL_CALL SVGWriter::write( const REF( NMSP_SAX::XDocumentHandler )& rxDocHandler, const SEQ( sal_Int8 )& rMtfSeq ) throw( NMSP_UNO::RuntimeException ) { - SvMemoryStream aMemStm( (char*) rMtfSeq.getConstArray(), rMtfSeq.getLength(), STREAM_READ ); - GDIMetaFile aMtf; + SvMemoryStream aMemStm( (char*) rMtfSeq.getConstArray(), rMtfSeq.getLength(), STREAM_READ ); + GDIMetaFile aMtf; aMemStm.SetCompressMode( COMPRESSMODE_FULL ); aMemStm >> aMtf; const REF( NMSP_SAX::XDocumentHandler ) xDocumentHandler( rxDocHandler ); - + // #110680# // SVGMtfExport* pWriter = new SVGMtfExport( xDocumentHandler ); SVGMtfExport* pWriter = new SVGMtfExport( mxFact, xDocumentHandler ); diff --git a/extensions/source/svg/svgwriter.hxx b/extensions/source/svg/svgwriter.hxx index 2622f83f0182..0da9762e2447 100644 --- a/extensions/source/svg/svgwriter.hxx +++ b/extensions/source/svg/svgwriter.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -36,25 +36,25 @@ // ------------- class SVGWriter : public NMSP_CPPU::OWeakObject, NMSP_SVG::XSVGWriter -{ +{ private: - REF( NMSP_LANG::XMultiServiceFactory ) mxFact; - + REF( NMSP_LANG::XMultiServiceFactory ) mxFact; + SVGWriter(); - -public: - + +public: + SVGWriter( const REF( NMSP_LANG::XMultiServiceFactory )& rxMgr ); - virtual ~SVGWriter(); - - // XInterface - virtual ANY SAL_CALL queryInterface( const NMSP_UNO::Type & rType ) throw( NMSP_UNO::RuntimeException ); - virtual void SAL_CALL acquire() throw(); - virtual void SAL_CALL release() throw(); - - // XSVGWriter - virtual void SAL_CALL write( const REF( NMSP_SAX::XDocumentHandler )& rxDocHandler, + virtual ~SVGWriter(); + + // XInterface + virtual ANY SAL_CALL queryInterface( const NMSP_UNO::Type & rType ) throw( NMSP_UNO::RuntimeException ); + virtual void SAL_CALL acquire() throw(); + virtual void SAL_CALL release() throw(); + + // XSVGWriter + virtual void SAL_CALL write( const REF( NMSP_SAX::XDocumentHandler )& rxDocHandler, const SEQ( sal_Int8 )& rMtfSeq ) throw( NMSP_UNO::RuntimeException ); }; diff --git a/extensions/source/unoactivex/main/initwindowpeer.cxx b/extensions/source/unoactivex/main/initwindowpeer.cxx index 5e88b5b489dd..195f5811e6a9 100644 --- a/extensions/source/unoactivex/main/initwindowpeer.cxx +++ b/extensions/source/unoactivex/main/initwindowpeer.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/update/check/actionlistener.hxx b/extensions/source/update/check/actionlistener.hxx index a1c4571900bf..e5df3dd5ad52 100644 --- a/extensions/source/update/check/actionlistener.hxx +++ b/extensions/source/update/check/actionlistener.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/update/check/download.cxx b/extensions/source/update/check/download.cxx index 68123924c567..ff1905be1cf2 100644 --- a/extensions/source/update/check/download.cxx +++ b/extensions/source/update/check/download.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -73,17 +73,17 @@ static void openFile( OutData& out ) { char * effective_url; curl_easy_getinfo(out.curl, CURLINFO_EFFECTIVE_URL, &effective_url); - + double fDownloadSize; curl_easy_getinfo(out.curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD, &fDownloadSize); - + rtl::OString aURL(effective_url); - + // ensure no trailing '/' sal_Int32 nLen = aURL.getLength(); while( (nLen > 0) && ('/' == aURL[nLen-1]) ) aURL = aURL.copy(0, --nLen); - + // extract file name last '/' sal_Int32 nIndex = aURL.lastIndexOf('/'); if( nIndex > 0 ) @@ -91,48 +91,48 @@ static void openFile( OutData& out ) out.File = out.DestinationDir + rtl::OStringToOUString(aURL.copy(nIndex), RTL_TEXTENCODING_UTF8); oslFileError rc; - + // Give the user an overwrite warning if the target file exists const sal_Int32 openFlags = osl_File_OpenFlag_Write | osl_File_OpenFlag_Create; do { rc = osl_openFile(out.File.pData, &out.FileHandle, openFlags); - + if( osl_File_E_EXIST == rc && ! out.Handler->downloadTargetExists(out.File) ) { out.StopCondition.set(); break; } - + } while( osl_File_E_EXIST == rc ); - + if( osl_File_E_None == rc ) out.Handler->downloadStarted(out.File, (sal_Int64) fDownloadSize); - } + } } //------------------------------------------------------------------------------ -static inline rtl::OString +static inline rtl::OString getStringValue(const uno::Reference< container::XNameAccess >& xNameAccess, const rtl::OUString& aName) { rtl::OString aRet; - + OSL_ASSERT(xNameAccess->hasByName(aName)); uno::Any aValue = xNameAccess->getByName(aName); - + return rtl::OUStringToOString(aValue.get<rtl::OUString>(), RTL_TEXTENCODING_UTF8); } //------------------------------------------------------------------------------ -static inline sal_Int32 -getInt32Value(const uno::Reference< container::XNameAccess >& xNameAccess, +static inline sal_Int32 +getInt32Value(const uno::Reference< container::XNameAccess >& xNameAccess, const rtl::OUString& aName, sal_Int32 nDefault=-1) { OSL_ASSERT(xNameAccess->hasByName(aName)); uno::Any aValue = xNameAccess->getByName(aName); - + sal_Int32 n=nDefault; aValue >>= n; return n; @@ -140,19 +140,19 @@ getInt32Value(const uno::Reference< container::XNameAccess >& xNameAccess, //------------------------------------------------------------------------------ -static size_t +static size_t write_function( void *ptr, size_t size, size_t nmemb, void *stream ) { OutData *out = reinterpret_cast < OutData * > (stream); - + if( NULL == out->FileHandle ) openFile(*out); - + sal_uInt64 nBytesWritten = 0; - + if( NULL != out->FileHandle ) osl_writeFile(out->FileHandle, ptr, size * nmemb, &nBytesWritten); - + return (size_t) nBytesWritten; } @@ -165,9 +165,9 @@ progress_callback( void *clientp, double dltotal, double dlnow, double ultotal, (void) ulnow; OutData *out = reinterpret_cast < OutData * > (clientp); - + OSL_ASSERT( out ); - + if( ! out->StopCondition.check() ) { double fPercent = 0; @@ -175,56 +175,56 @@ progress_callback( void *clientp, double dltotal, double dlnow, double ultotal, fPercent = (dlnow + out->Offset) * 100 / (dltotal + out->Offset); if( fPercent < 0 ) fPercent = 0; - + // Do not report progress for redirection replies long nCode; curl_easy_getinfo(out->curl, CURLINFO_RESPONSE_CODE, &nCode); if( (nCode != 302) && (nCode != 303) && (dltotal > 0) ) out->Handler->downloadProgressAt((sal_Int8)fPercent); - + return 0; } - + // If stop condition is set, return non 0 value to abort return -1; } //------------------------------------------------------------------------------ -void +void Download::getProxyForURL(const rtl::OUString& rURL, rtl::OString& rHost, sal_Int32& rPort) const { if( !m_xContext.is() ) - throw uno::RuntimeException( - UNISTRING( "Download: empty component context" ), + throw uno::RuntimeException( + UNISTRING( "Download: empty component context" ), uno::Reference< uno::XInterface >() ); - + uno::Reference< lang::XMultiComponentFactory > xServiceManager(m_xContext->getServiceManager()); - + if( !xServiceManager.is() ) - throw uno::RuntimeException( - UNISTRING( "Download: unable to obtain service manager from component context" ), + throw uno::RuntimeException( + UNISTRING( "Download: unable to obtain service manager from component context" ), uno::Reference< uno::XInterface >() ); - - uno::Reference< lang::XMultiServiceFactory > xConfigProvider( - xServiceManager->createInstanceWithContext( UNISTRING( "com.sun.star.configuration.ConfigurationProvider" ), m_xContext ), - uno::UNO_QUERY_THROW); - + + uno::Reference< lang::XMultiServiceFactory > xConfigProvider( + xServiceManager->createInstanceWithContext( UNISTRING( "com.sun.star.configuration.ConfigurationProvider" ), m_xContext ), + uno::UNO_QUERY_THROW); + beans::PropertyValue aProperty; aProperty.Name = UNISTRING( "nodepath" ); aProperty.Value = uno::makeAny( UNISTRING("org.openoffice.Inet/Settings") ); uno::Sequence< uno::Any > aArgumentList( 1 ); aArgumentList[0] = uno::makeAny( aProperty ); - - uno::Reference< container::XNameAccess > xNameAccess( - xConfigProvider->createInstanceWithArguments( + + uno::Reference< container::XNameAccess > xNameAccess( + xConfigProvider->createInstanceWithArguments( UNISTRING("com.sun.star.configuration.ConfigurationAccess"), aArgumentList ), uno::UNO_QUERY_THROW ); - + OSL_ASSERT(xNameAccess->hasByName(UNISTRING("ooInetProxyType"))); uno::Any aValue = xNameAccess->getByName(UNISTRING("ooInetProxyType")); - + sal_Int32 nProxyType = aValue.get< sal_Int32 >(); if( 0 != nProxyType ) // type 0 means "direct connection to the internet { @@ -250,62 +250,62 @@ Download::getProxyForURL(const rtl::OUString& rURL, rtl::OString& rHost, sal_Int bool curl_run(const rtl::OUString& rURL, OutData& out, const rtl::OString& aProxyHost, sal_Int32 nProxyPort) { - /* Need to investigate further whether it is necessary to call + /* Need to investigate further whether it is necessary to call * curl_global_init or not - leave it for now (as the ftp UCB content * provider does as well). */ - + CURL * pCURL = curl_easy_init(); bool ret = false; - + if( NULL != pCURL ) { out.curl = pCURL; - + rtl::OString aURL(rtl::OUStringToOString(rURL, RTL_TEXTENCODING_UTF8)); curl_easy_setopt(pCURL, CURLOPT_URL, aURL.getStr()); - + // abort on http errors curl_easy_setopt(pCURL, CURLOPT_FAILONERROR, 1); // enable redirection curl_easy_setopt(pCURL, CURLOPT_FOLLOWLOCATION, 1); - + // write function curl_easy_setopt(pCURL, CURLOPT_WRITEDATA, &out); curl_easy_setopt(pCURL, CURLOPT_WRITEFUNCTION, &write_function); - + // progress handler - Condition::check unfortunatly is not defined const curl_easy_setopt(pCURL, CURLOPT_NOPROGRESS, 0); curl_easy_setopt(pCURL, CURLOPT_PROGRESSFUNCTION, &progress_callback); curl_easy_setopt(pCURL, CURLOPT_PROGRESSDATA, &out); - + // proxy curl_easy_setopt(pCURL, CURLOPT_PROXY, aProxyHost.getStr()); curl_easy_setopt(pCURL, CURLOPT_PROXYTYPE, CURLPROXY_HTTP); if( -1 != nProxyPort ) curl_easy_setopt(pCURL, CURLOPT_PROXYPORT, nProxyPort); - + if( out.Offset > 0 ) { - // curl_off_t offset = nOffset; libcurl seems to be compiled with large + // curl_off_t offset = nOffset; libcurl seems to be compiled with large // file support (and we not) .. sal_Int64 offset = (sal_Int64) out.Offset; curl_easy_setopt(pCURL, CURLOPT_RESUME_FROM_LARGE, offset); } - + CURLcode cc = curl_easy_perform(pCURL); // treat zero byte downloads as errors if( NULL == out.FileHandle ) openFile(out); - + if( CURLE_OK == cc ) { out.Handler->downloadFinished(out.File); ret = true; } - + if ( CURLE_PARTIAL_FILE == cc ) { // this sometimes happens, when a user throws away his user data, but has already @@ -318,7 +318,7 @@ bool curl_run(const rtl::OUString& rURL, OutData& out, const rtl::OString& aProx ret = true; } } - + // Avoid target file being removed else if( (CURLE_ABORTED_BY_CALLBACK == cc) || out.StopCondition.check() ) ret = true; @@ -327,7 +327,7 @@ bool curl_run(const rtl::OUString& rURL, OutData& out, const rtl::OString& aProx else { rtl::OString aMessage(RTL_CONSTASCII_STRINGPARAM("Unknown error")); - + const char * error_message = curl_easy_strerror(cc); if( NULL != error_message ) aMessage = error_message; @@ -357,20 +357,20 @@ bool curl_run(const rtl::OUString& rURL, OutData& out, const rtl::OString& aProx if ( !ret ) out.Handler->downloadStalled( rtl::OStringToOUString(aMessage, RTL_TEXTENCODING_UTF8) ); } - + curl_easy_cleanup(pCURL); } - + return ret; } //------------------------------------------------------------------------------ -bool +bool Download::start(const rtl::OUString& rURL, const rtl::OUString& rFile, const rtl::OUString& rDestinationDir) { OSL_ASSERT( m_aHandler.is() ); - + OutData out(m_aCondition); rtl::OUString aFile( rFile ); @@ -430,13 +430,13 @@ Download::start(const rtl::OUString& rURL, const rtl::OUString& rFile, const rtl else if( osl_File_E_NOENT == rc ) // file has been deleted meanwhile .. out.File = rtl::OUString(); } - + rtl::OString aProxyHost; sal_Int32 nProxyPort = -1; getProxyForURL(rURL, aProxyHost, nProxyPort); bool ret = curl_run(rURL, out, aProxyHost, nProxyPort); - + if( NULL != out.FileHandle ) { osl_syncFile(out.FileHandle); @@ -447,14 +447,14 @@ Download::start(const rtl::OUString& rURL, const rtl::OUString& rFile, const rtl // if( ! ret ) // osl_removeFile(out.File.pData); } - + m_aCondition.reset(); return ret; } //------------------------------------------------------------------------------ -void +void Download::stop() { m_aCondition.set(); diff --git a/extensions/source/update/check/download.hxx b/extensions/source/update/check/download.hxx index 00106660b4af..8aa9e4ea3184 100644 --- a/extensions/source/update/check/download.hxx +++ b/extensions/source/update/check/download.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -40,13 +40,13 @@ struct DownloadInteractionHandler : public rtl::IReference // called if the destination file already exists, but resume is false virtual bool downloadTargetExists(const rtl::OUString& rFileName) = 0; - + // called when curl reports an error virtual void downloadStalled(const rtl::OUString& rErrorMessage) = 0; - + // progress handler virtual void downloadProgressAt(sal_Int8 nPercent) = 0; - + // called on first progress notification virtual void downloadStarted(const rtl::OUString& rFileName, sal_Int64 nFileSize) = 0; @@ -63,19 +63,19 @@ public: // returns true when the content of rURL was successfully written to rLocalFile bool start(const rtl::OUString& rURL, const rtl::OUString& rFile, const rtl::OUString& rDestinationDir); - + // stops the download after the next write operation void stop(); - + // returns true if the stop condition is set bool isStopped() const { return sal_True == const_cast <Download *> (this)->m_aCondition.check(); }; - + protected: // Determines the appropriate proxy settings for the given URL. Returns true if a proxy should be used void getProxyForURL(const rtl::OUString& rURL, rtl::OString& rHost, sal_Int32& rPort) const; - + private: osl::Condition m_aCondition; const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& m_xContext; diff --git a/extensions/source/update/check/transform.pl b/extensions/source/update/check/transform.pl index fb452ae0482c..760acf55e60e 100644 --- a/extensions/source/update/check/transform.pl +++ b/extensions/source/update/check/transform.pl @@ -5,7 +5,7 @@ eval 'exec perl -wS $0 ${1+"$@"}' #************************************************************************* # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# +# # Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite @@ -32,14 +32,14 @@ eval 'exec perl -wS $0 ${1+"$@"}' while (<>) { if( /<prop/ ) { - $prop = $_; + $prop = $_; next if( /Text/ || /Bubble/ ); } - + if( /<\/prop>/ ) { next if( $prop =~ /Text/ || $prop =~ /Bubble/ ); - } - + } + if( /xml:lang/ ) { $lang = $_; $lang =~ s/.*xml:lang=\"//; @@ -56,6 +56,6 @@ while (<>) { print $line; next; } - + print; }
\ No newline at end of file diff --git a/extensions/source/update/check/updatecheck.cxx b/extensions/source/update/check/updatecheck.cxx index ccfcda6157cb..310d585649e8 100644 --- a/extensions/source/update/check/updatecheck.cxx +++ b/extensions/source/update/check/updatecheck.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -101,17 +101,17 @@ rtl::OUString getReleaseNote(const UpdateInfo& rInfo, sal_uInt8 pos, bool autoDo } else if( (pos == iter->Pos2) && ((1 == iter->Pos) || (2 == iter->Pos)) && autoDownloadEnabled ) return iter->URL2; - + ++iter; } - - return rtl::OUString(); + + return rtl::OUString(); } //------------------------------------------------------------------------------ -namespace -{ +namespace +{ static inline rtl::OUString getBuildId() { @@ -149,14 +149,14 @@ rtl::OUString getImageFromFileName(const rtl::OUString& aFile) { aUnpackPath = aUnpackPath.copy( 0, lastIndex+1 ); aUnpackPath += UNISTRING( "unpack_update" ); - } - + } + oslFileHandle hOut = NULL; oslProcess hProcess = NULL; - + rtl::OUString aSystemPath; osl::File::getSystemPathFromFileURL(aFile, aSystemPath); - + oslProcessError rc = osl_executeProcess_WithRedirectedIO( aUnpackPath.pData, // [in] Image name &aSystemPath.pData, 1, // [in] Arguments @@ -167,12 +167,12 @@ rtl::OUString getImageFromFileName(const rtl::OUString& aFile) &hProcess, // [out] Process handle NULL, &hOut, NULL // [out] File handles for redirected I/O ); - + if( osl_Process_E_None == rc ) { oslProcessInfo aInfo; aInfo.Size = sizeof(oslProcessInfo); - + if( osl_Process_E_None == osl_getProcessInfo(hProcess, osl_Process_EXITCODE, &aInfo) ) { if( 0 == aInfo.Code ) @@ -180,7 +180,7 @@ rtl::OUString getImageFromFileName(const rtl::OUString& aFile) sal_Char szBuffer[4096]; sal_uInt64 nBytesRead = 0; const sal_uInt64 nBytesToRead = sizeof(szBuffer) - 1; - + rtl::OUString aImageName; while( osl_File_E_None == osl_readFile(hOut, szBuffer, nBytesToRead, &nBytesRead) ) { @@ -188,26 +188,26 @@ rtl::OUString getImageFromFileName(const rtl::OUString& aFile) do { *pc = '\0'; --pc; - } + } while( ('\n' == *pc) || ('\r' == *pc) ); - + aImageName += rtl::OUString(szBuffer, pc - szBuffer + 1, osl_getThreadTextEncoding()); if( nBytesRead < nBytesToRead ) break; } - + if( osl::FileBase::E_None == osl::FileBase::getFileURLFromSystemPath(aImageName, aImageName) ) return aImageName; } } - + osl_closeFile(hOut); osl_freeProcessHandle(hProcess); } - } + } #endif - + return aFile; } @@ -219,15 +219,15 @@ static uno::Reference< beans::XPropertySet > createMenuBarUI( const uno::Reference< task::XJob >& xJob) { if( !xContext.is() ) - throw uno::RuntimeException( + throw uno::RuntimeException( UNISTRING( "UpdateCheckJob: empty component context" ), uno::Reference< uno::XInterface > () ); uno::Reference< lang::XMultiComponentFactory > xServiceManager(xContext->getServiceManager()); if( !xServiceManager.is() ) - throw uno::RuntimeException( + throw uno::RuntimeException( UNISTRING( "UpdateCheckJob: unable to obtain service manager from component context" ), uno::Reference< uno::XInterface > () ); - uno::Reference< beans::XPropertySet > xMenuBarUI = + uno::Reference< beans::XPropertySet > xMenuBarUI = uno::Reference< beans::XPropertySet > ( xServiceManager->createInstanceWithContext( UNISTRING( "com.sun.star.setup.UpdateCheckUI" ), xContext ), uno::UNO_QUERY_THROW); @@ -244,7 +244,7 @@ static uno::Reference< beans::XPropertySet > createMenuBarUI( typedef sal_Bool (* OnlineCheckFunc) (); class UpdateCheckThread : public WorkerThread -{ +{ public: UpdateCheckThread( osl::Condition& rCondition, @@ -266,17 +266,17 @@ protected: private: /* Used to avoid dialup login windows (on platforms we know how to double this) */ - inline bool hasInternetConnection() const + inline bool hasInternetConnection() const { if(m_pHasInternetConnection != NULL ) return (sal_True == m_pHasInternetConnection()); return true; } - + /* Creates a new instance of UpdateInformationProvider and returns this instance */ inline uno::Reference<deployment::XUpdateInformationProvider> createProvider() - { - osl::MutexGuard aGuard(m_aMutex); + { + osl::MutexGuard aGuard(m_aMutex); m_xProvider = deployment::UpdateInformationProvider::create(m_xContext); return m_xProvider; }; @@ -288,19 +288,19 @@ private: /* Releases the remembered instance of UpdateInformationProvider if any */ inline void clearProvider() { osl::MutexGuard aGuard(m_aMutex); m_xProvider.clear(); }; - + osl::Mutex m_aMutex; osl::Module m_aModule; - + protected: osl::Condition& m_aCondition; private: -// const +// const OnlineCheckFunc m_pHasInternetConnection; - const uno::Reference<uno::XComponentContext> m_xContext; + const uno::Reference<uno::XComponentContext> m_xContext; uno::Reference<deployment::XUpdateInformationProvider> m_xProvider; }; @@ -308,32 +308,32 @@ private: class ManualUpdateCheckThread : public UpdateCheckThread { public: - ManualUpdateCheckThread( osl::Condition& rCondition, const uno::Reference<uno::XComponentContext>& xContext ) : + ManualUpdateCheckThread( osl::Condition& rCondition, const uno::Reference<uno::XComponentContext>& xContext ) : UpdateCheckThread(rCondition, xContext) {}; virtual void SAL_CALL run(); }; - + class MenuBarButtonJob : public ::cppu::WeakImplHelper1< task::XJob > { public: MenuBarButtonJob(const rtl::Reference< UpdateCheck >& rUpdateCheck); - + // XJob - virtual uno::Any SAL_CALL execute(const uno::Sequence<beans::NamedValue>&) + virtual uno::Any SAL_CALL execute(const uno::Sequence<beans::NamedValue>&) throw (lang::IllegalArgumentException, uno::Exception); - + private: rtl::Reference< UpdateCheck > m_aUpdateCheck; }; - + class DownloadThread : public WorkerThread { public: DownloadThread( osl::Condition& rCondition, - const uno::Reference<uno::XComponentContext>& xContext, + const uno::Reference<uno::XComponentContext>& xContext, const rtl::Reference< DownloadInteractionHandler >& rHandler, const rtl::OUString& rURL ); @@ -377,7 +377,7 @@ UpdateCheckThread::UpdateCheckThread( osl::Condition& rCondition, m_pHasInternetConnection(NULL), m_xContext(xContext) { - + #ifdef WNT rtl::OUString aPath; if( osl_getExecutableFile(&aPath.pData) == osl_Process_E_None ) @@ -388,7 +388,7 @@ UpdateCheckThread::UpdateCheckThread( osl::Condition& rCondition, aPath = aPath.copy( 0, lastIndex+1 ); aPath += UNISTRING( "onlinecheck" ); } - + if ( m_aModule.load(aPath) ) { m_pHasInternetConnection = @@ -397,7 +397,7 @@ UpdateCheckThread::UpdateCheckThread( osl::Condition& rCondition, } } #endif - + createSuspended(); // actually run the thread @@ -413,7 +413,7 @@ UpdateCheckThread::~UpdateCheckThread() //------------------------------------------------------------------------------ -void SAL_CALL +void SAL_CALL UpdateCheckThread::terminate() { // Cancel potentially hanging http request .. @@ -424,11 +424,11 @@ UpdateCheckThread::terminate() //------------------------------------------------------------------------------ -void SAL_CALL +void SAL_CALL UpdateCheckThread::join() { uno::Reference< deployment::XUpdateInformationProvider > xProvider(getProvider()); - + // do not join during an update check until #i73893# is fixed if( ! xProvider.is() ) { @@ -438,18 +438,18 @@ UpdateCheckThread::join() //------------------------------------------------------------------------------ -void SAL_CALL +void SAL_CALL UpdateCheckThread::cancel() { uno::Reference< deployment::XUpdateInformationProvider > xProvider(getProvider()); - + if( xProvider.is() ) - xProvider->cancel(); + xProvider->cancel(); } //------------------------------------------------------------------------------ -bool +bool UpdateCheckThread::runCheck( bool & rbExtensionsChecked ) { bool ret = false; @@ -457,7 +457,7 @@ UpdateCheckThread::runCheck( bool & rbExtensionsChecked ) UpdateInfo aInfo; rtl::Reference< UpdateCheck > aController(UpdateCheck::get()); - + if( checkForUpdates(aInfo, m_xContext, aController->getInteractionHandler(), createProvider()) ) { aController->setUpdateInfo(aInfo); @@ -506,53 +506,53 @@ UpdateCheckThread::run() osl::Condition::Result aResult = osl::Condition::result_timeout; TimeValue tv = { 10, 0 }; - + // Initial wait to avoid doing further time consuming tasks during start-up aResult = m_aCondition.wait(&tv); - + try { - + while( sal_True == schedule() ) { /* Use cases: * a) manual check requested from auto check thread - "last check" should not be checked (one time) * a1) manual check was requested in the middle of a running auto check, - * condition is set + * condition is set * a2) manual check was requested while waiting for a retry, - * condition is set - * a3) manual check was requested while waiting for time to next + * condition is set + * a3) manual check was requested while waiting for time to next * scheduled check elapsing, condition is set * a4) manual check was requested during initial wait, condition is set - * b) check interval got changed, condition may be set - same sub-cases as a), + * b) check interval got changed, condition may be set - same sub-cases as a), * but "last check" should be honored * c) normal auto check mode, condition not set - "last check" should be honored */ - + // Accessing const members without synchronization - rtl::Reference< UpdateCheck > aController(UpdateCheck::get()); + rtl::Reference< UpdateCheck > aController(UpdateCheck::get()); rtl::Reference< UpdateCheckConfig > rModel = UpdateCheckConfig::get(m_xContext, *aController); - + // FIXME: remember last & offset ? sal_Int64 last = rModel->getLastChecked(); sal_Int64 offset = rModel->getCheckInterval(); - + rModel.clear(); - + // last == 0 means check immediately bool checkNow = ! (last > 0); - - // Reset the condition to avoid busy loops + + // Reset the condition to avoid busy loops if( osl::Condition::result_ok == aResult ) { m_aCondition.reset(); aResult = osl::Condition::result_timeout; checkNow = aController->isDialogShowing(); } - - if( ! checkNow ) + + if( ! checkNow ) { osl_getSystemTime(&systime); - + // Go back to sleep until time has elapsed sal_Int64 next = last + offset; if( last + offset > systime.Seconds ) @@ -565,21 +565,21 @@ UpdateCheckThread::run() } static sal_uInt8 n = 0; - + if( ! hasInternetConnection() || ! runCheck( bExtensionsChecked ) ) { // the extension update check should be independent from the office update check - // + // osl_getSystemTime( &systime ); if ( nExtCheckTime.Seconds + offset < systime.Seconds ) bExtensionsChecked = false; // Increase next by 15, 60, .. minutes static const sal_Int32 nRetryInterval[] = { 900, 3600, 14400, 86400 }; - + if( n < sizeof(nRetryInterval) / sizeof(sal_Int32) ) ++n; - + tv.Seconds = nRetryInterval[n-1]; aResult = m_aCondition.wait(&tv); } @@ -590,12 +590,12 @@ UpdateCheckThread::run() } } } - + catch(const uno::Exception& e) { // Silently catch all errors OSL_TRACE( "Caught exception: %s\n thread terminated.\n", rtl::OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8).getStr() ); - } + } } //------------------------------------------------------------------------------ @@ -613,20 +613,20 @@ ManualUpdateCheckThread::run() // Silently catch all errors OSL_TRACE( "Caught exception: %s\n thread terminated.\n", rtl::OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8).getStr() ); - } + } } //------------------------------------------------------------------------------ -MenuBarButtonJob::MenuBarButtonJob(const rtl::Reference< UpdateCheck >& rUpdateCheck) : - m_aUpdateCheck(rUpdateCheck) +MenuBarButtonJob::MenuBarButtonJob(const rtl::Reference< UpdateCheck >& rUpdateCheck) : + m_aUpdateCheck(rUpdateCheck) { }; - + //------------------------------------------------------------------------------ -uno::Any SAL_CALL -MenuBarButtonJob::execute(const uno::Sequence<beans::NamedValue>& ) +uno::Any SAL_CALL +MenuBarButtonJob::execute(const uno::Sequence<beans::NamedValue>& ) throw (lang::IllegalArgumentException, uno::Exception) { if ( m_aUpdateCheck->shouldShowExtUpdDlg() ) @@ -640,8 +640,8 @@ MenuBarButtonJob::execute(const uno::Sequence<beans::NamedValue>& ) //------------------------------------------------------------------------------ DownloadThread::DownloadThread(osl::Condition& rCondition, - const uno::Reference<uno::XComponentContext>& xContext, - const rtl::Reference< DownloadInteractionHandler >& rHandler, + const uno::Reference<uno::XComponentContext>& xContext, + const rtl::Reference< DownloadInteractionHandler >& rHandler, const rtl::OUString& rURL) : m_aCondition(rCondition), m_xContext(xContext), @@ -658,8 +658,8 @@ DownloadThread::~DownloadThread() } //------------------------------------------------------------------------------ - -void SAL_CALL + +void SAL_CALL DownloadThread::run() { #ifdef WNT @@ -670,28 +670,28 @@ DownloadThread::run() while( schedule() ) { rtl::Reference< UpdateCheckConfig > rModel = UpdateCheckConfig::get(m_xContext); - + rtl::OUString aLocalFile = rModel->getLocalFileName(); rtl::OUString aDownloadDest = rModel->getDownloadDestination(); // release config class for now rModel.clear(); - + static sal_uInt8 n = 0; if( ! m_aDownload.start(m_aURL, aLocalFile, aDownloadDest ) ) { // retry every 15s unless the dialog is not visible TimeValue tv; tv.Seconds = 15; - + if( ! UpdateCheck::get()->isDialogShowing() ) { // Increase next by 1, 5, 15, 60, .. minutes static const sal_Int16 nRetryInterval[] = { 60, 300, 900, 3600 }; - + if( n < sizeof(nRetryInterval) / sizeof(sal_Int16) ) ++n; - + tv.Seconds = nRetryInterval[n-1]; } m_aCondition.wait(&tv); @@ -710,9 +710,9 @@ void SAL_CALL DownloadThread::cancel() { m_aDownload.stop(); resume(); - + rtl::Reference< UpdateCheck > aController(UpdateCheck::get()); - aController->cancelDownload(); + aController->cancelDownload(); } //------------------------------------------------------------------------------ @@ -743,7 +743,7 @@ ShutdownThread::~ShutdownThread() } //------------------------------------------------------------------------------ -void SAL_CALL +void SAL_CALL ShutdownThread::run() { TimeValue tv = { 0, 250 }; @@ -752,16 +752,16 @@ ShutdownThread::run() // Tell QuickStarter not to veto .. uno::Reference< beans::XFastPropertySet > xQuickStarter( - UpdateCheck::createService(UNISTRING("com.sun.star.office.Quickstart"), m_xContext), + UpdateCheck::createService(UNISTRING("com.sun.star.office.Quickstart"), m_xContext), uno::UNO_QUERY ); if (xQuickStarter.is()) - xQuickStarter->setFastPropertyValue(0, uno::makeAny(false)); + xQuickStarter->setFastPropertyValue(0, uno::makeAny(false)); // Shutdown the office uno::Reference< frame::XDesktop > xDesktop( - UpdateCheck::createService(UNISTRING("com.sun.star.frame.Desktop"), m_xContext), + UpdateCheck::createService(UNISTRING("com.sun.star.frame.Desktop"), m_xContext), uno::UNO_QUERY); if( xDesktop.is() ) @@ -782,12 +782,12 @@ void SAL_CALL ShutdownThread::onTerminated() //------------------------------------------------------------------------------ -void +void UpdateCheck::initialize(const uno::Sequence< beans::NamedValue >& rValues, const uno::Reference<uno::XComponentContext>& xContext) { osl::MutexGuard aGuard(m_aMutex); - + if( NOT_INITIALIZED == m_eState ) { NamedValueByNameAccess aNameAccess(rValues); @@ -795,9 +795,9 @@ UpdateCheck::initialize(const uno::Sequence< beans::NamedValue >& rValues, m_xContext = xContext; rtl::OUString aUpdateEntryVersion = aModel.getUpdateEntryVersion(); - + aModel.getUpdateEntry(m_aUpdateInfo); - + bool obsoleteUpdateInfo = isObsoleteUpdateInfo(aUpdateEntryVersion); bool bContinueDownload = false; bool bDownloadAvailable = false; @@ -806,7 +806,7 @@ UpdateCheck::initialize(const uno::Sequence< beans::NamedValue >& rValues, m_bShowExtUpdDlg = false; rtl::OUString aLocalFileName = aModel.getLocalFileName(); - + if( aLocalFileName.getLength() > 0 ) { bContinueDownload = true; @@ -845,24 +845,24 @@ UpdateCheck::initialize(const uno::Sequence< beans::NamedValue >& rValues, enableDownload(true, downloadPaused); setUIState(downloadPaused ? UPDATESTATE_DOWNLOAD_PAUSED : UPDATESTATE_DOWNLOADING); } - + } if ( !bContinueDownload ) { // We do this intentionally only if no download is in progress .. - if( obsoleteUpdateInfo ) + if( obsoleteUpdateInfo ) { // Bring-up release note for position 5 .. const rtl::OUString aURL(getReleaseNote(m_aUpdateInfo, 5)); if( aURL.getLength() > 0 ) showReleaseNote(aURL); - - // Data is outdated, probably due to installed update + + // Data is outdated, probably due to installed update rtl::Reference< UpdateCheckConfig > aConfig = UpdateCheckConfig::get( xContext, *this ); aConfig->clearUpdateFound(); aConfig->clearLocalFileName(); - - + + m_aUpdateInfo = UpdateInfo(); // Remove outdated release notes storeReleaseNote( 1, rtl::OUString() ); @@ -882,25 +882,25 @@ UpdateCheck::initialize(const uno::Sequence< beans::NamedValue >& rValues, //------------------------------------------------------------------------------ -void +void UpdateCheck::cancel() { osl::ClearableMutexGuard aGuard(m_aMutex); - + WorkerThread *pThread = m_pThread; UpdateState eUIState = getUIState(m_aUpdateInfo); aGuard.clear(); - + if( NULL != pThread ) pThread->cancel(); - + setUIState(eUIState); } //------------------------------------------------------------------------------ -void +void UpdateCheck::download() { osl::ClearableMutexGuard aGuard(m_aMutex); @@ -914,7 +914,7 @@ UpdateCheck::download() if( DOWNLOADING != eState ) { shutdownThread(true); - + osl::ClearableMutexGuard aGuard2(m_aMutex); enableDownload(true); aGuard2.clear(); @@ -929,30 +929,30 @@ UpdateCheck::download() //------------------------------------------------------------------------------ -void +void UpdateCheck::install() { osl::MutexGuard aGuard(m_aMutex); - + const uno::Reference< c3s::XSystemShellExecute > xShellExecute( createService( UNISTRING( "com.sun.star.system.SystemShellExecute" ), m_xContext ), uno::UNO_QUERY ); - + try { // Construct install command ?? - + // Store release note for position 3 and 4 rtl::OUString aURL(getReleaseNote(m_aUpdateInfo, 3)); storeReleaseNote(1, aURL); aURL = getReleaseNote(m_aUpdateInfo, 4); storeReleaseNote(2, aURL); - + if( xShellExecute.is() ) { rtl::OUString aInstallImage(m_aImageName); osl::FileBase::getSystemPathFromFileURL(aInstallImage, aInstallImage); - + rtl::OUString aParameter; sal_Int32 nFlags = c3s::SystemShellExecuteFlags::DEFAULTS; #if ( defined LINUX || defined SOLARIS ) @@ -960,9 +960,9 @@ UpdateCheck::install() aParameter = getBaseInstallation(); if( aParameter.getLength() > 0 ) osl::FileBase::getSystemPathFromFileURL(aParameter, aParameter); - + aParameter += UNISTRING(" &"); -#endif +#endif rtl::Reference< UpdateCheckConfig > rModel = UpdateCheckConfig::get( m_xContext ); rModel->clearLocalFileName(); @@ -978,41 +978,41 @@ UpdateCheck::install() //------------------------------------------------------------------------------ -void +void UpdateCheck::pause() { osl::ClearableMutexGuard aGuard(m_aMutex); - + if( NULL != m_pThread ) m_pThread->suspend(); - + rtl::Reference< UpdateCheckConfig > rModel = UpdateCheckConfig::get(m_xContext); aGuard.clear(); - + rModel->storeDownloadPaused(true); setUIState(UPDATESTATE_DOWNLOAD_PAUSED); } //------------------------------------------------------------------------------ -void +void UpdateCheck::resume() { osl::ClearableMutexGuard aGuard(m_aMutex); - + if( NULL != m_pThread ) m_pThread->resume(); - + rtl::Reference< UpdateCheckConfig > rModel = UpdateCheckConfig::get(m_xContext); aGuard.clear(); - + rModel->storeDownloadPaused(false); setUIState(UPDATESTATE_DOWNLOADING); } //------------------------------------------------------------------------------ -void +void UpdateCheck::closeAfterFailure() { osl::ClearableMutexGuard aGuard(m_aMutex); @@ -1027,16 +1027,16 @@ UpdateCheck::closeAfterFailure() //------------------------------------------------------------------------------ -void +void UpdateCheck::shutdownThread(bool join) { osl::ClearableMutexGuard aGuard(m_aMutex); - + // copy thread object pointer to stack osl::Thread *pThread = m_pThread; m_pThread = NULL; aGuard.clear(); - + if( NULL != pThread ) { pThread->terminate(); @@ -1051,22 +1051,22 @@ UpdateCheck::shutdownThread(bool join) //------------------------------------------------------------------------------ -void +void UpdateCheck::enableAutoCheck(bool enable) { if( enable ) m_pThread = new UpdateCheckThread(m_aCondition, m_xContext); - - m_eState = enable ? CHECK_SCHEDULED : DISABLED; + + m_eState = enable ? CHECK_SCHEDULED : DISABLED; } //------------------------------------------------------------------------------ -void +void UpdateCheck::enableDownload(bool enable, bool paused) { OSL_ASSERT(NULL == m_pThread); - + State eState = DISABLED; if( enable ) { @@ -1078,27 +1078,27 @@ UpdateCheck::enableDownload(bool enable, bool paused) } else eState = DOWNLOAD_PAUSED; - + m_eState = eState; } else { enableAutoCheck(UpdateCheckConfig::get(m_xContext)->isAutoCheckEnabled()); } - + } //------------------------------------------------------------------------------ -bool +bool UpdateCheck::downloadTargetExists(const rtl::OUString& rFileName) { osl::ClearableMutexGuard aGuard(m_aMutex); - + rtl::Reference< UpdateHandler > aUpdateHandler(getUpdateHandler()); UpdateState eUIState = UPDATESTATE_DOWNLOADING; - + bool cont = false; - + if( aUpdateHandler->isVisible() ) { cont = aUpdateHandler->showOverwriteWarning(); @@ -1118,16 +1118,16 @@ UpdateCheck::downloadTargetExists(const rtl::OUString& rFileName) m_aImageName = getImageFromFileName(rFileName); eUIState = UPDATESTATE_DOWNLOAD_AVAIL; } - + if( !cont ) { shutdownThread(false); enableDownload(false); - + aGuard.clear(); setUIState(eUIState); - } - + } + return cont; } @@ -1135,48 +1135,48 @@ UpdateCheck::downloadTargetExists(const rtl::OUString& rFileName) bool UpdateCheck::checkDownloadDestination( const rtl::OUString& rFileName ) { osl::ClearableMutexGuard aGuard(m_aMutex); - + rtl::Reference< UpdateHandler > aUpdateHandler( getUpdateHandler() ); - + bool bReload = false; - + if( aUpdateHandler->isVisible() ) { bReload = aUpdateHandler->showOverwriteWarning( rFileName ); } - + return bReload; } //------------------------------------------------------------------------------ -void +void UpdateCheck::downloadStalled(const rtl::OUString& rErrorMessage) { osl::ClearableMutexGuard aGuard(m_aMutex); rtl::Reference< UpdateHandler > aUpdateHandler(getUpdateHandler()); aGuard.clear(); - + aUpdateHandler->setErrorMessage(rErrorMessage); setUIState(UPDATESTATE_ERROR_DOWNLOADING); } //------------------------------------------------------------------------------ -void +void UpdateCheck::downloadProgressAt(sal_Int8 nPercent) { osl::ClearableMutexGuard aGuard(m_aMutex); rtl::Reference< UpdateHandler > aUpdateHandler(getUpdateHandler()); aGuard.clear(); - + aUpdateHandler->setProgress(nPercent); setUIState(UPDATESTATE_DOWNLOADING); } //------------------------------------------------------------------------------ -void +void UpdateCheck::downloadStarted(const rtl::OUString& rLocalFileName, sal_Int64 nFileSize) { if ( nFileSize > 0 ) @@ -1195,20 +1195,20 @@ UpdateCheck::downloadStarted(const rtl::OUString& rLocalFileName, sal_Int64 nFil //------------------------------------------------------------------------------ -void +void UpdateCheck::downloadFinished(const rtl::OUString& rLocalFileName) { osl::ClearableMutexGuard aGuard(m_aMutex); - + // no more retries m_pThread->terminate(); - + m_aImageName = getImageFromFileName(rLocalFileName); UpdateInfo aUpdateInfo(m_aUpdateInfo); - + aGuard.clear(); setUIState(UPDATESTATE_DOWNLOAD_AVAIL); - + // Bring-up release note for position 2 .. rtl::Reference< UpdateCheckConfig > rModel = UpdateCheckConfig::get( m_xContext ); const rtl::OUString aURL(getReleaseNote(aUpdateInfo, 2, rModel->isAutoDownloadEnabled())); @@ -1222,12 +1222,12 @@ void UpdateCheck::cancelDownload() { shutdownThread(true); - + osl::MutexGuard aGuard(m_aMutex); enableDownload(false); - + rtl::Reference< UpdateCheckConfig > rModel = UpdateCheckConfig::get(m_xContext); - + rtl::OUString aLocalFile(rModel->getLocalFileName()); rModel->clearLocalFileName(); rModel->storeDownloadPaused(false); @@ -1240,7 +1240,7 @@ UpdateCheck::cancelDownload() /*oslFileError rc =*/ osl_removeFile(aLocalFile.pData); // FIXME: error handling .. - + } //------------------------------------------------------------------------------ @@ -1249,10 +1249,10 @@ void UpdateCheck::showDialog(bool forceCheck) { osl::ResettableMutexGuard aGuard(m_aMutex); - + bool update_found = m_aUpdateInfo.BuildId.getLength() > 0; bool bSetUIState = ! m_aUpdateHandler.is(); - + UpdateState eDialogState = UPDATESTATES_COUNT; switch( m_eState ) @@ -1269,15 +1269,15 @@ UpdateCheck::showDialog(bool forceCheck) else eDialogState = UPDATESTATE_UPDATE_NO_DOWNLOAD; break; - + case DOWNLOADING: eDialogState = UPDATESTATE_DOWNLOADING; break; - + case DOWNLOAD_PAUSED: eDialogState = UPDATESTATE_DOWNLOAD_PAUSED; break; - + case NOT_INITIALIZED: OSL_ASSERT( false ); break; @@ -1289,9 +1289,9 @@ UpdateCheck::showDialog(bool forceCheck) setUIState(eDialogState, true); // suppress bubble as Dialog will be visible soon aGuard.reset(); } - + getUpdateHandler()->setVisible(true); - + // Run check in separate thread .. if( UPDATESTATE_CHECKING == eDialogState ) { @@ -1300,14 +1300,14 @@ UpdateCheck::showDialog(bool forceCheck) // destructs itself when done, not cancellable for now .. new ManualUpdateCheckThread(m_aCondition, m_xContext); } - + m_aCondition.set(); } } //------------------------------------------------------------------------------ -void +void UpdateCheck::setUpdateInfo(const UpdateInfo& aInfo) { osl::ClearableMutexGuard aGuard(m_aMutex); @@ -1323,23 +1323,23 @@ UpdateCheck::setUpdateInfo(const UpdateInfo& aInfo) { if( iter->IsDirect ) break; - + ++iter; } - + if( (iter != m_aUpdateInfo.Sources.begin()) && (iter != m_aUpdateInfo.Sources.end()) && iter->IsDirect ) { m_aUpdateInfo.Sources.erase(m_aUpdateInfo.Sources.begin(), --iter); } - + rtl::Reference< UpdateCheckConfig > rModel = UpdateCheckConfig::get(m_xContext, *this); OSL_ASSERT( rModel.is() ); - + // Decide whether to use alternate release note pos .. bool autoDownloadEnabled = rModel->isAutoDownloadEnabled(); - + std::vector< ReleaseNote >::iterator iter2 = m_aUpdateInfo.ReleaseNotes.begin(); while( iter2 != m_aUpdateInfo.ReleaseNotes.end() ) { @@ -1350,22 +1350,22 @@ UpdateCheck::setUpdateInfo(const UpdateInfo& aInfo) iter2->Pos = iter2->Pos2; iter2->Pos2 = 0; } - + ++iter2; } - + // do not move below store/clear .. rModel->updateLastChecked(); - + UpdateState eUIState; if( m_aUpdateInfo.Sources.size() > 0 ) { rModel->storeUpdateFound(aInfo, getBuildId()); - + if( m_aUpdateInfo.Sources[0].IsDirect ) { - eUIState = UPDATESTATE_UPDATE_AVAIL; - + eUIState = UPDATESTATE_UPDATE_AVAIL; + if( rModel->isAutoDownloadEnabled() ) { shutdownThread(false); @@ -1381,14 +1381,14 @@ UpdateCheck::setUpdateInfo(const UpdateInfo& aInfo) eUIState = UPDATESTATE_NO_UPDATE_AVAIL; rModel->clearUpdateFound(); } - + aGuard.clear(); setUIState(eUIState, bSuppressBubble); } //------------------------------------------------------------------------------ -void +void UpdateCheck::setCheckFailedState() { setUIState(UPDATESTATE_ERROR_CHECKING); @@ -1408,7 +1408,7 @@ void UpdateCheck::handleMenuBarUI( rtl::Reference< UpdateHandler > rUpdateHandle m_bShowExtUpdDlg = true; else m_bShowExtUpdDlg = false; - + if( xMenuBarUI.is() ) { if( UPDATESTATE_NO_UPDATE_AVAIL == eState ) @@ -1419,7 +1419,7 @@ void UpdateCheck::handleMenuBarUI( rtl::Reference< UpdateHandler > rUpdateHandle { xMenuBarUI->setPropertyValue( PROPERTY_TITLE, uno::makeAny(rUpdateHandler->getBubbleTitle(eState)) ); xMenuBarUI->setPropertyValue( PROPERTY_TEXT, uno::makeAny(rUpdateHandler->getBubbleText(eState)) ); - + if( ! suppressBubble && ( ! rUpdateHandler->isVisible() || rUpdateHandler->isMinimized() ) ) xMenuBarUI->setPropertyValue( PROPERTY_SHOW_BUBBLE, uno::makeAny( sal_True ) ); @@ -1433,10 +1433,10 @@ void UpdateCheck::handleMenuBarUI( rtl::Reference< UpdateHandler > rUpdateHandle void UpdateCheck::setUIState(UpdateState eState, bool suppressBubble) { osl::ClearableMutexGuard aGuard(m_aMutex); - - if( ! m_xMenuBarUI.is() && - (DISABLED != m_eState) && - ( m_bHasExtensionUpdate || (UPDATESTATE_NO_UPDATE_AVAIL != eState)) && + + if( ! m_xMenuBarUI.is() && + (DISABLED != m_eState) && + ( m_bHasExtensionUpdate || (UPDATESTATE_NO_UPDATE_AVAIL != eState)) && (UPDATESTATE_CHECKING != eState) && (UPDATESTATE_ERROR_CHECKING != eState) ) @@ -1455,29 +1455,29 @@ void UpdateCheck::setUIState(UpdateState eState, bool suppressBubble) UpdateInfo aUpdateInfo(m_aUpdateInfo); rtl::OUString aImageName(m_aImageName); - + aGuard.clear(); - + handleMenuBarUI( aUpdateHandler, eState, suppressBubble ); - + if( (UPDATESTATE_UPDATE_AVAIL == eState) || (UPDATESTATE_DOWNLOAD_PAUSED == eState) || (UPDATESTATE_DOWNLOADING == eState) ) { uno::Reference< uno::XComponentContext > xContext(m_xContext); - rtl::OUString aDownloadDestination = + rtl::OUString aDownloadDestination = UpdateCheckConfig::get(xContext, this)->getDownloadDestination(); osl_getSystemPathFromFileURL(aDownloadDestination.pData, &aDownloadDestination.pData); - + aUpdateHandler->setDownloadPath(aDownloadDestination); } else if( UPDATESTATE_DOWNLOAD_AVAIL == eState ) { aUpdateHandler->setDownloadFile(aImageName); } - + aUpdateHandler->setDescription(aUpdateInfo.Description); aUpdateHandler->setNextVersion(aUpdateInfo.Version); aUpdateHandler->setState(eState); @@ -1485,11 +1485,11 @@ void UpdateCheck::setUIState(UpdateState eState, bool suppressBubble) //------------------------------------------------------------------------------ -UpdateState +UpdateState UpdateCheck::getUIState(const UpdateInfo& rInfo) { UpdateState eUIState = UPDATESTATE_NO_UPDATE_AVAIL; - + if( rInfo.BuildId.getLength() > 0 ) { if( rInfo.Sources[0].IsDirect ) @@ -1497,21 +1497,21 @@ UpdateCheck::getUIState(const UpdateInfo& rInfo) else eUIState = UPDATESTATE_UPDATE_NO_DOWNLOAD; } - + return eUIState; } //------------------------------------------------------------------------------ -void +void UpdateCheck::showReleaseNote(const rtl::OUString& rURL) const { const uno::Reference< c3s::XSystemShellExecute > xShellExecute( createService( UNISTRING( "com.sun.star.system.SystemShellExecute" ), m_xContext ), uno::UNO_QUERY ); - + try { - + if( xShellExecute.is() ) xShellExecute->execute(rURL, rtl::OUString(), c3s::SystemShellExecuteFlags::DEFAULTS); } catch(c3s::SystemShellExecuteException&) { @@ -1520,7 +1520,7 @@ UpdateCheck::showReleaseNote(const rtl::OUString& rURL) const //------------------------------------------------------------------------------ -bool +bool UpdateCheck::storeReleaseNote(sal_Int8 nNum, const rtl::OUString &rURL) { osl::FileBase::RC rc; @@ -1572,12 +1572,12 @@ void UpdateCheck::showExtensionDialog() uno::Reference< uno::XInterface > xService; if( ! m_xContext.is() ) - throw uno::RuntimeException( + throw uno::RuntimeException( UNISTRING( "UpdateCheck::showExtensionDialog(): empty component context" ), uno::Reference< uno::XInterface > () ); uno::Reference< lang::XMultiComponentFactory > xServiceManager( m_xContext->getServiceManager() ); if( !xServiceManager.is() ) - throw uno::RuntimeException( + throw uno::RuntimeException( UNISTRING( "UpdateCheck::showExtensionDialog(): unable to obtain service manager from component context" ), uno::Reference< uno::XInterface > () ); xService = xServiceManager->createInstanceWithContext( sServiceName, m_xContext ); @@ -1601,7 +1601,7 @@ UpdateCheck::getUpdateHandler() //------------------------------------------------------------------------------ -uno::Reference< task::XInteractionHandler > +uno::Reference< task::XInteractionHandler > UpdateCheck::getInteractionHandler() const { osl::MutexGuard aGuard(m_aMutex); @@ -1616,44 +1616,44 @@ UpdateCheck::getInteractionHandler() const //------------------------------------------------------------------------------ -uno::Reference< uno::XInterface > -UpdateCheck::createService(const rtl::OUString& rServiceName, +uno::Reference< uno::XInterface > +UpdateCheck::createService(const rtl::OUString& rServiceName, const uno::Reference<uno::XComponentContext>& xContext) { if( !xContext.is() ) - throw uno::RuntimeException( - UNISTRING( "UpdateCheckConfig: empty component context" ), + throw uno::RuntimeException( + UNISTRING( "UpdateCheckConfig: empty component context" ), uno::Reference< uno::XInterface >() ); - + const uno::Reference< lang::XMultiComponentFactory > xServiceManager(xContext->getServiceManager()); - + if( !xServiceManager.is() ) - throw uno::RuntimeException( - UNISTRING( "UpdateCheckConfig: unable to obtain service manager from component context" ), + throw uno::RuntimeException( + UNISTRING( "UpdateCheckConfig: unable to obtain service manager from component context" ), uno::Reference< uno::XInterface >() ); - + return xServiceManager->createInstanceWithContext(rServiceName, xContext); } //------------------------------------------------------------------------------ -bool +bool UpdateCheck::isDialogShowing() const -{ - osl::MutexGuard aGuard(m_aMutex); +{ + osl::MutexGuard aGuard(m_aMutex); return sal_True == m_aUpdateHandler.is() && m_aUpdateHandler->isVisible(); }; //------------------------------------------------------------------------------ -void +void UpdateCheck::autoCheckStatusChanged(bool enabled) -{ +{ osl::ClearableMutexGuard aGuard(m_aMutex); - + if( (CHECK_SCHEDULED == m_eState) && !enabled ) shutdownThread(false); - + if( (DISABLED == m_eState) || (CHECK_SCHEDULED == m_eState) ) { enableAutoCheck(enabled); @@ -1665,27 +1665,27 @@ UpdateCheck::autoCheckStatusChanged(bool enabled) //------------------------------------------------------------------------------ -void +void UpdateCheck::autoCheckIntervalChanged() -{ +{ // just wake-up m_aCondition.set(); }; //------------------------------------------------------------------------------ -oslInterlockedCount SAL_CALL +oslInterlockedCount SAL_CALL UpdateCheck::acquire() SAL_THROW(()) -{ - return ReferenceObject::acquire(); +{ + return ReferenceObject::acquire(); } //------------------------------------------------------------------------------ -oslInterlockedCount SAL_CALL +oslInterlockedCount SAL_CALL UpdateCheck::release() SAL_THROW(()) -{ - return ReferenceObject::release(); +{ + return ReferenceObject::release(); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/extensions/source/update/check/updatecheck.hxx b/extensions/source/update/check/updatecheck.hxx index 0f0768919877..00d3ede1fe78 100644 --- a/extensions/source/update/check/updatecheck.hxx +++ b/extensions/source/update/check/updatecheck.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -47,7 +47,7 @@ class UpdateCheck; class UpdateCheckConfig; class UpdateCheckInitData { - + public: inline rtl::Reference< UpdateCheck > SAL_CALL operator() () const; }; @@ -58,7 +58,7 @@ public: virtual void SAL_CALL cancel() = 0; }; -class UpdateCheck : +class UpdateCheck : public UpdateCheckConfigListener, public IActionListener, public DownloadInteractionHandler, @@ -66,30 +66,30 @@ class UpdateCheck : public rtl::StaticWithInit< rtl::Reference< UpdateCheck >, UpdateCheckInitData > { UpdateCheck() : m_eState(NOT_INITIALIZED), m_eUpdateState(UPDATESTATES_COUNT), m_pThread(NULL) {}; - + public: inline SAL_CALL operator rtl::Reference< UpdateCheckConfigListener > () { return static_cast< UpdateCheckConfigListener * > (this); } - + void initialize(const com::sun::star::uno::Sequence<com::sun::star::beans::NamedValue>& rValues, const com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext>& xContext); - + /* Returns an instance of the specified service obtained from the specified * component context */ - + static com::sun::star::uno::Reference< com::sun::star::uno::XInterface > createService( - const rtl::OUString& aServiceName, + const rtl::OUString& aServiceName, const com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext>& xContext); - + // Update internal update info member void setUpdateInfo(const UpdateInfo& aInfo); - - /* This method turns on the menubar icon, triggers the bubble window or + + /* This method turns on the menubar icon, triggers the bubble window or * updates the dialog text when appropriate */ void setUIState(UpdateState eState, bool suppressBubble = false); - + // Returns the UI state that matches rInfo best static UpdateState getUIState(const UpdateInfo& rInfo); @@ -98,7 +98,7 @@ public: // Executes the update check dialog for manual checks and downloads interaction void showDialog(bool forceCheck = false); - + // Returns true if the update dialog is currently showing bool isDialogShowing() const; bool shouldShowExtUpdDlg() const { return ( m_bShowExtUpdDlg && m_bHasExtensionUpdate ); } @@ -117,28 +117,28 @@ public: // Cancels the download action (and resumes checking if enabled) void cancelDownload(); - + // Returns the XInteractionHandler of the UpdateHandler instance if present (and visible) com::sun::star::uno::Reference< com::sun::star::task::XInteractionHandler > getInteractionHandler() const; // UpdateCheckConfigListener - virtual void autoCheckStatusChanged(bool enabled); + virtual void autoCheckStatusChanged(bool enabled); virtual void autoCheckIntervalChanged(); - // IActionListener + // IActionListener void cancel(); void download(); void install(); void pause(); void resume(); void closeAfterFailure(); - + // rtl::IReference virtual oslInterlockedCount SAL_CALL acquire() SAL_THROW(()); virtual oslInterlockedCount SAL_CALL release() SAL_THROW(()); private: - + // Schedules or cancels next automatic check for updates void enableAutoCheck(bool enable); @@ -168,19 +168,19 @@ private: DOWNLOADING, DOWNLOAD_PAUSED }; - + State m_eState; UpdateState m_eUpdateState; mutable osl::Mutex m_aMutex; WorkerThread *m_pThread; osl::Condition m_aCondition; - + UpdateInfo m_aUpdateInfo; rtl::OUString m_aImageName; bool m_bHasExtensionUpdate; bool m_bShowExtUpdDlg; - + rtl::Reference<UpdateHandler> m_aUpdateHandler; com::sun::star::uno::Reference<com::sun::star::beans::XPropertySet> m_xMenuBarUI; com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> m_xContext; diff --git a/extensions/source/update/check/updatecheckconfig.cxx b/extensions/source/update/check/updatecheckconfig.cxx index 881fe2572d67..7f4227daedbe 100644 --- a/extensions/source/update/check/updatecheckconfig.cxx +++ b/extensions/source/update/check/updatecheckconfig.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -77,20 +77,20 @@ namespace uno = com::sun::star::uno ; #define RELEASE_NOTE "ReleaseNote" #define EXTENSION_PREFIX "Extension_" -static const sal_Char * const aUpdateEntryProperties[] = { - UPDATE_VERSION, - UPDATE_BUILDID, - UPDATE_DESCRIPTION, - DOWNLOAD_URL, +static const sal_Char * const aUpdateEntryProperties[] = { + UPDATE_VERSION, + UPDATE_BUILDID, + UPDATE_DESCRIPTION, + DOWNLOAD_URL, IS_DIRECT_DOWNLOAD, RELEASE_NOTE"1", RELEASE_NOTE"2", RELEASE_NOTE"3", RELEASE_NOTE"4", RELEASE_NOTE"5", - OLD_VERSION + OLD_VERSION }; - + static const sal_uInt32 nUpdateEntryProperties = sizeof(aUpdateEntryProperties) / sizeof(sal_Char *); //------------------------------------------------------------------------------ @@ -101,7 +101,7 @@ NamedValueByNameAccess::~NamedValueByNameAccess() //------------------------------------------------------------------------------ -::com::sun::star::uno::Any +::com::sun::star::uno::Any NamedValueByNameAccess::getValue(const sal_Char * pName) { const sal_Int32 nLen = m_rValues.getLength(); @@ -124,7 +124,7 @@ UpdateCheckROModel::isAutoCheckEnabled() const //------------------------------------------------------------------------------ -bool +bool UpdateCheckROModel::isDownloadPaused() const { return sal_True == m_aNameAccess.getValue(DOWNLOAD_PAUSED).get< sal_Bool >(); @@ -132,31 +132,31 @@ UpdateCheckROModel::isDownloadPaused() const //------------------------------------------------------------------------------ -rtl::OUString +rtl::OUString UpdateCheckROModel::getStringValue(const sal_Char * pStr) const { uno::Any aAny( m_aNameAccess.getValue(pStr) ); rtl::OUString aRet; - + aAny >>= aRet; - + return aRet; } //------------------------------------------------------------------------------ -rtl::OUString UpdateCheckROModel::getLocalFileName() const -{ - return getStringValue(LOCAL_FILE); +rtl::OUString UpdateCheckROModel::getLocalFileName() const +{ + return getStringValue(LOCAL_FILE); }; //------------------------------------------------------------------------------ -sal_Int64 UpdateCheckROModel::getDownloadSize() const -{ +sal_Int64 UpdateCheckROModel::getDownloadSize() const +{ uno::Any aAny( m_aNameAccess.getValue(DOWNLOAD_SIZE) ); sal_Int64 nRet = -1; - + aAny >>= nRet; return nRet; }; @@ -171,18 +171,18 @@ UpdateCheckROModel::getUpdateEntryVersion() const //------------------------------------------------------------------------------ -void +void UpdateCheckROModel::getUpdateEntry(UpdateInfo& rInfo) const { rInfo.BuildId = getStringValue(UPDATE_BUILDID); rInfo.Version = getStringValue(UPDATE_VERSION); rInfo.Description = getStringValue(UPDATE_DESCRIPTION); - + sal_Bool isDirectDownload = sal_False; m_aNameAccess.getValue(IS_DIRECT_DOWNLOAD) >>= isDirectDownload; - + rInfo.Sources.push_back( DownloadSource( isDirectDownload, getStringValue(DOWNLOAD_URL) ) ); - + rtl::OString aStr(RELEASE_NOTE); for(sal_Int32 n=1; n < 6; ++n ) { @@ -198,7 +198,7 @@ UpdateCheckROModel::getUpdateEntry(UpdateInfo& rInfo) const rtl::OUString UpdateCheckConfig::getDesktopDirectory() { rtl::OUString aRet; - + #ifdef WNT WCHAR szPath[MAX_PATH]; @@ -218,7 +218,7 @@ rtl::OUString UpdateCheckConfig::getDesktopDirectory() if( osl::FileBase::E_None != aDocumentsDir.open() ) aRet = aHomeDir; #endif - + return aRet; } @@ -227,7 +227,7 @@ rtl::OUString UpdateCheckConfig::getDesktopDirectory() rtl::OUString UpdateCheckConfig::getAllUsersDirectory() { rtl::OUString aRet; - + #ifdef WNT WCHAR szPath[MAX_PATH]; @@ -235,12 +235,12 @@ rtl::OUString UpdateCheckConfig::getAllUsersDirectory() { aRet = rtl::OUString( reinterpret_cast< sal_Unicode * >(szPath) ); osl::FileBase::RC rc; - rc = osl::FileBase::getFileURLFromSystemPath( aRet, aRet ); + rc = osl::FileBase::getFileURLFromSystemPath( aRet, aRet ); } #else osl::FileBase::getTempDirURL(aRet); #endif - + return aRet; } @@ -262,44 +262,44 @@ UpdateCheckConfig::~UpdateCheckConfig() //------------------------------------------------------------------------------ ::rtl::Reference< UpdateCheckConfig > -UpdateCheckConfig::get( +UpdateCheckConfig::get( const uno::Reference<uno::XComponentContext>& xContext, const ::rtl::Reference< UpdateCheckConfigListener >& rListener) { if( !xContext.is() ) - throw uno::RuntimeException( - UNISTRING( "UpdateCheckConfig: empty component context" ), + throw uno::RuntimeException( + UNISTRING( "UpdateCheckConfig: empty component context" ), uno::Reference< uno::XInterface >() ); - + uno::Reference< lang::XMultiComponentFactory > xServiceManager(xContext->getServiceManager()); - + if( !xServiceManager.is() ) - throw uno::RuntimeException( - UNISTRING( "UpdateCheckConfig: unable to obtain service manager from component context" ), + throw uno::RuntimeException( + UNISTRING( "UpdateCheckConfig: unable to obtain service manager from component context" ), uno::Reference< uno::XInterface >() ); - - uno::Reference< lang::XMultiServiceFactory > xConfigProvider( - xServiceManager->createInstanceWithContext( UNISTRING( "com.sun.star.configuration.ConfigurationProvider" ), xContext ), - uno::UNO_QUERY_THROW); - + + uno::Reference< lang::XMultiServiceFactory > xConfigProvider( + xServiceManager->createInstanceWithContext( UNISTRING( "com.sun.star.configuration.ConfigurationProvider" ), xContext ), + uno::UNO_QUERY_THROW); + beans::PropertyValue aProperty; aProperty.Name = UNISTRING( "nodepath" ); aProperty.Value = uno::makeAny( UNISTRING("org.openoffice.Office.Jobs/Jobs/UpdateCheck/Arguments") ); uno::Sequence< uno::Any > aArgumentList( 1 ); aArgumentList[0] = uno::makeAny( aProperty ); - - uno::Reference< container::XNameContainer > xContainer( - xConfigProvider->createInstanceWithArguments( + + uno::Reference< container::XNameContainer > xContainer( + xConfigProvider->createInstanceWithArguments( UNISTRING("com.sun.star.configuration.ConfigurationUpdateAccess"), aArgumentList ), uno::UNO_QUERY_THROW ); - + return new UpdateCheckConfig( xContainer, rListener ); } //------------------------------------------------------------------------------ -bool +bool UpdateCheckConfig::isAutoCheckEnabled() const { sal_Bool nValue = sal_False; @@ -309,7 +309,7 @@ UpdateCheckConfig::isAutoCheckEnabled() const //------------------------------------------------------------------------------ -bool +bool UpdateCheckConfig::isAutoDownloadEnabled() const { sal_Bool nValue = sal_False; @@ -319,15 +319,15 @@ UpdateCheckConfig::isAutoDownloadEnabled() const //------------------------------------------------------------------------------ -rtl::OUString +rtl::OUString UpdateCheckConfig::getUpdateEntryVersion() const { rtl::OUString aValue; - + // getByName is defined as non const in XNameAccess const_cast < UpdateCheckConfig *> (this)->getByName( UNISTRING( OLD_VERSION ) ) >>= aValue; - - return aValue; + + return aValue; } //------------------------------------------------------------------------------ @@ -336,10 +336,10 @@ sal_Int64 UpdateCheckConfig::getLastChecked() const { sal_Int64 nValue = 0; - + // getByName is defined as non const in XNameAccess const_cast < UpdateCheckConfig *> (this)->getByName( UNISTRING( LAST_CHECK ) ) >>= nValue; - + return nValue; } @@ -349,49 +349,49 @@ sal_Int64 UpdateCheckConfig::getCheckInterval() const { sal_Int64 nValue = 0; - + // getByName is defined as non const in XNameAccess const_cast < UpdateCheckConfig *> (this)->getByName( UNISTRING( CHECK_INTERVAL ) ) >>= nValue; - + return nValue; } //------------------------------------------------------------------------------ -rtl::OUString +rtl::OUString UpdateCheckConfig::getLocalFileName() const { rtl::OUString aName = UNISTRING(LOCAL_FILE); rtl::OUString aRet; - + if( m_xContainer->hasByName(aName) ) m_xContainer->getByName(aName) >>= aRet; - - return aRet; + + return aRet; } //------------------------------------------------------------------------------ -rtl::OUString +rtl::OUString UpdateCheckConfig::getDownloadDestination() const { rtl::OUString aName = UNISTRING(DOWNLOAD_DESTINATION); rtl::OUString aRet; - + const_cast <UpdateCheckConfig *> (this)->getByName(aName) >>= aRet; - - return aRet; + + return aRet; } //------------------------------------------------------------------------------ -void +void UpdateCheckConfig::storeLocalFileName(const rtl::OUString& rLocalFileName, sal_Int64 nFileSize) { const sal_uInt8 nItems = 2; const rtl::OUString aNameList[nItems] = { UNISTRING(LOCAL_FILE), UNISTRING(DOWNLOAD_SIZE) }; const uno::Any aValueList[nItems] = { uno::makeAny(rLocalFileName), uno::makeAny(nFileSize) }; - + for( sal_uInt8 i=0; i < nItems; ++i ) { if( m_xContainer->hasByName(aNameList[i]) ) @@ -399,30 +399,30 @@ UpdateCheckConfig::storeLocalFileName(const rtl::OUString& rLocalFileName, sal_I else m_xContainer->insertByName(aNameList[i], aValueList[i]); } - + commitChanges(); } //------------------------------------------------------------------------------ -void +void UpdateCheckConfig::clearLocalFileName() { const sal_uInt8 nItems = 2; const rtl::OUString aNameList[nItems] = { UNISTRING(LOCAL_FILE), UNISTRING(DOWNLOAD_SIZE) }; - + for( sal_uInt8 i=0; i < nItems; ++i ) { if( m_xContainer->hasByName(aNameList[i]) ) m_xContainer->removeByName(aNameList[i]); } - + commitChanges(); } //------------------------------------------------------------------------------ -void +void UpdateCheckConfig::storeDownloadPaused(bool paused) { replaceByName(UNISTRING(DOWNLOAD_PAUSED) , uno::makeAny(paused)); @@ -436,10 +436,10 @@ UpdateCheckConfig::updateLastChecked() { TimeValue systime; osl_getSystemTime(&systime); - + sal_Int64 lastCheck = systime.Seconds; - replaceByName(UNISTRING(LAST_CHECK), uno::makeAny(lastCheck)); + replaceByName(UNISTRING(LAST_CHECK), uno::makeAny(lastCheck)); } //------------------------------------------------------------------------------ @@ -449,47 +449,47 @@ UpdateCheckConfig::storeUpdateFound( const UpdateInfo& rInfo, const rtl::OUStrin { bool autoDownloadEnabled = isAutoDownloadEnabled(); - - uno::Any aValues[nUpdateEntryProperties] = - { - uno::makeAny(rInfo.Version), - uno::makeAny(rInfo.BuildId), + + uno::Any aValues[nUpdateEntryProperties] = + { + uno::makeAny(rInfo.Version), + uno::makeAny(rInfo.BuildId), uno::makeAny(rInfo.Description), - uno::makeAny(rInfo.Sources[0].URL), + uno::makeAny(rInfo.Sources[0].URL), uno::makeAny(rInfo.Sources[0].IsDirect ? sal_True : sal_False), uno::makeAny(getReleaseNote(rInfo, 1, autoDownloadEnabled) ), uno::makeAny(getReleaseNote(rInfo, 2, autoDownloadEnabled) ), uno::makeAny(getReleaseNote(rInfo, 3, autoDownloadEnabled) ), uno::makeAny(getReleaseNote(rInfo, 4, autoDownloadEnabled) ), uno::makeAny(getReleaseNote(rInfo, 5, autoDownloadEnabled) ), - uno::makeAny(aCurrentBuild) + uno::makeAny(aCurrentBuild) }; - + rtl::OUString aName; for( sal_uInt32 n=0; n < nUpdateEntryProperties; ++n ) { aName = rtl::OUString::createFromAscii(aUpdateEntryProperties[n]); - + if( m_xContainer->hasByName(aName) ) m_xContainer->replaceByName(aName, aValues[n]); else m_xContainer->insertByName(aName,aValues[n]); } - + commitChanges(); } //------------------------------------------------------------------------------ -void +void UpdateCheckConfig::clearUpdateFound() { rtl::OUString aName; - + for( sal_uInt32 n=0; n < nUpdateEntryProperties; ++n ) { aName = rtl::OUString::createFromAscii(aUpdateEntryProperties[n]); - + try { if( m_xContainer->hasByName(aName) ) m_xContainer->removeByName(aName); @@ -510,7 +510,7 @@ UpdateCheckConfig::clearUpdateFound() //------------------------------------------------------------------------------ -uno::Sequence< rtl::OUString > +uno::Sequence< rtl::OUString > UpdateCheckConfig::getServiceNames() { uno::Sequence< rtl::OUString > aServiceList(1); @@ -520,80 +520,80 @@ UpdateCheckConfig::getServiceNames() //------------------------------------------------------------------------------ -rtl::OUString +rtl::OUString UpdateCheckConfig::getImplName() -{ +{ return UNISTRING( "vnd.sun.UpdateCheckConfig"); } //------------------------------------------------------------------------------ -uno::Type SAL_CALL -UpdateCheckConfig::getElementType() throw (uno::RuntimeException) -{ - return m_xContainer->getElementType(); +uno::Type SAL_CALL +UpdateCheckConfig::getElementType() throw (uno::RuntimeException) +{ + return m_xContainer->getElementType(); } //------------------------------------------------------------------------------ -sal_Bool SAL_CALL -UpdateCheckConfig::hasElements() throw (uno::RuntimeException) -{ - return m_xContainer->hasElements(); +sal_Bool SAL_CALL +UpdateCheckConfig::hasElements() throw (uno::RuntimeException) +{ + return m_xContainer->hasElements(); } //------------------------------------------------------------------------------ -uno::Any SAL_CALL -UpdateCheckConfig::getByName( const ::rtl::OUString& aName ) +uno::Any SAL_CALL +UpdateCheckConfig::getByName( const ::rtl::OUString& aName ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException) { uno::Any aValue = m_xContainer->getByName( aName ); - + // Provide dynamic default value if( aName.equalsAscii(DOWNLOAD_DESTINATION) ) { rtl::OUString aStr; aValue >>= aStr; - + if( aStr.getLength() == 0 ) aValue = uno::makeAny(getDesktopDirectory()); } - + return aValue; } - + //------------------------------------------------------------------------------ -uno::Sequence< ::rtl::OUString > SAL_CALL +uno::Sequence< ::rtl::OUString > SAL_CALL UpdateCheckConfig::getElementNames( ) throw (uno::RuntimeException) { return m_xContainer->getElementNames(); } - + //------------------------------------------------------------------------------ - -sal_Bool SAL_CALL + +sal_Bool SAL_CALL UpdateCheckConfig::hasByName( const ::rtl::OUString& aName ) throw (uno::RuntimeException) { return m_xContainer->hasByName( aName ); } - + //------------------------------------------------------------------------------ - -void SAL_CALL + +void SAL_CALL UpdateCheckConfig::replaceByName( const ::rtl::OUString& aName, const uno::Any& aElement ) - throw (lang::IllegalArgumentException, container::NoSuchElementException, + throw (lang::IllegalArgumentException, container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException) { - return m_xContainer->replaceByName( aName, aElement ); + return m_xContainer->replaceByName( aName, aElement ); } //------------------------------------------------------------------------------ // XChangesBatch -void SAL_CALL -UpdateCheckConfig::commitChanges() +void SAL_CALL +UpdateCheckConfig::commitChanges() throw (lang::WrappedTargetException, uno::RuntimeException) { uno::Reference< util::XChangesBatch > xChangesBatch(m_xContainer, uno::UNO_QUERY); @@ -610,7 +610,7 @@ UpdateCheckConfig::commitChanges() for( sal_Int32 i=0; i<nChanges; ++i ) { aChangesSet[i].Accessor >>= aString; - + // FIXME: use non IgnoreAsciiCase version as soon as it becomes available if( aString.endsWithIgnoreAsciiCaseAsciiL(AUTOCHECK_ENABLED "']", sizeof(AUTOCHECK_ENABLED)+1) ) { @@ -630,25 +630,25 @@ UpdateCheckConfig::commitChanges() //------------------------------------------------------------------------------ -sal_Bool SAL_CALL +sal_Bool SAL_CALL UpdateCheckConfig::hasPendingChanges( ) throw (uno::RuntimeException) { uno::Reference< util::XChangesBatch > xChangesBatch(m_xContainer, uno::UNO_QUERY); if( xChangesBatch.is() ) return xChangesBatch->hasPendingChanges(); - + return sal_False; } - + //------------------------------------------------------------------------------ - -uno::Sequence< util::ElementChange > SAL_CALL + +uno::Sequence< util::ElementChange > SAL_CALL UpdateCheckConfig::getPendingChanges( ) throw (uno::RuntimeException) { uno::Reference< util::XChangesBatch > xChangesBatch(m_xContainer, uno::UNO_QUERY); if( xChangesBatch.is() ) return xChangesBatch->getPendingChanges(); - + return uno::Sequence< util::ElementChange >(); } @@ -658,7 +658,7 @@ void UpdateCheckConfig::storeExtensionVersion( const rtl::OUString& rExtensionNa { const rtl::OUString aExtName = UNISTRING( EXTENSION_PREFIX ) + rExtensionName; const uno::Any aValue = uno::makeAny( rVersion ); - + if( m_xContainer->hasByName( aExtName ) ) m_xContainer->replaceByName( aExtName, aValue ); else @@ -715,7 +715,7 @@ bool UpdateCheckConfig::isVersionGreater( const rtl::OUString& rVersion1, if ( sSub1.getLength() < sSub2.getLength() ) { return true; - } else if ( sSub1.getLength() > sSub2.getLength() ) { + } else if ( sSub1.getLength() > sSub2.getLength() ) { return false; } else if ( sSub1 < sSub2 ) { return true; @@ -729,31 +729,31 @@ bool UpdateCheckConfig::isVersionGreater( const rtl::OUString& rVersion1, //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ - -rtl::OUString SAL_CALL + +rtl::OUString SAL_CALL UpdateCheckConfig::getImplementationName() throw (uno::RuntimeException) { return getImplName(); } - + //------------------------------------------------------------------------------ - -sal_Bool SAL_CALL -UpdateCheckConfig::supportsService(rtl::OUString const & serviceName) + +sal_Bool SAL_CALL +UpdateCheckConfig::supportsService(rtl::OUString const & serviceName) throw (uno::RuntimeException) { uno::Sequence< rtl::OUString > aServiceNameList = getServiceNames(); - + for( sal_Int32 n=0; n < aServiceNameList.getLength(); n++ ) if( aServiceNameList[n].equals(serviceName) ) return sal_True; - - return sal_False; + + return sal_False; } - + //------------------------------------------------------------------------------ - -uno::Sequence< rtl::OUString > SAL_CALL + +uno::Sequence< rtl::OUString > SAL_CALL UpdateCheckConfig::getSupportedServiceNames() throw (uno::RuntimeException) { return getServiceNames(); diff --git a/extensions/source/update/check/updatecheckconfig.hxx b/extensions/source/update/check/updatecheckconfig.hxx index 7031ab196b0f..4149e9993aa7 100644 --- a/extensions/source/update/check/updatecheckconfig.hxx +++ b/extensions/source/update/check/updatecheckconfig.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -37,7 +37,7 @@ #include "updatecheckconfiglistener.hxx" #include "updateinfo.hxx" -/* Interface to acess configuration data read-only */ +/* Interface to acess configuration data read-only */ struct IByNameAccess { virtual ::com::sun::star::uno::Any getValue(const sal_Char * pName) = 0; @@ -47,14 +47,14 @@ struct IByNameAccess class NamedValueByNameAccess : public IByNameAccess { const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& m_rValues; - + public: NamedValueByNameAccess( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& rValues) : m_rValues(rValues) {} ; virtual ~NamedValueByNameAccess(); - + virtual ::com::sun::star::uno::Any getValue(const sal_Char * pName); }; @@ -66,17 +66,17 @@ class UpdateCheckROModel { public: UpdateCheckROModel(IByNameAccess& aNameAccess) : m_aNameAccess(aNameAccess) {}; - + bool isAutoCheckEnabled() const; bool isDownloadPaused() const; rtl::OUString getLocalFileName() const; sal_Int64 getDownloadSize() const; - + rtl::OUString getUpdateEntryVersion() const; void getUpdateEntry(UpdateInfo& rInfo) const; - + private: - + rtl::OUString getStringValue(const sal_Char *) const; IByNameAccess& m_aNameAccess; @@ -84,7 +84,7 @@ private: -/* This class implements the non published UNO service com.sun.star.setup.UpdateCheckConfig, +/* This class implements the non published UNO service com.sun.star.setup.UpdateCheckConfig, * which primary use is to be able to track changes done in the Toos -> Options page of this * component, as this is not supported by the OOo configuration for extendable groups. */ @@ -96,14 +96,14 @@ class UpdateCheckConfig : public ::cppu::WeakImplHelper3< { UpdateCheckConfig(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >& xContainer, const ::rtl::Reference< UpdateCheckConfigListener >& rListener ); - + virtual ~UpdateCheckConfig(); public: - + static ::com::sun::star::uno::Sequence< rtl::OUString > getServiceNames(); static rtl::OUString getImplName(); - + static ::rtl::Reference< UpdateCheckConfig > get( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& xContext, const ::rtl::Reference< UpdateCheckConfigListener >& rListener = ::rtl::Reference< UpdateCheckConfigListener >()); @@ -113,10 +113,10 @@ public: bool isAutoDownloadEnabled() const; rtl::OUString getUpdateEntryVersion() const; - /* Updates the timestamp of last check, but does not commit the change - * as either clearUpdateFound() or setUpdateFound() are expected to get + /* Updates the timestamp of last check, but does not commit the change + * as either clearUpdateFound() or setUpdateFound() are expected to get * called next. - */ + */ void updateLastChecked(); /* Returns the date of the last successful check in seconds since 1970 */ @@ -128,11 +128,11 @@ public: /* Reset values of previously remembered update */ void clearUpdateFound(); - + /* Stores the specified data of an available update */ void storeUpdateFound(const UpdateInfo& rInfo, const rtl::OUString& aCurrentBuild); - + // Returns the local file name of a started download rtl::OUString getLocalFileName() const; @@ -141,13 +141,13 @@ public: // stores the local file name of a just started download void storeLocalFileName(const rtl::OUString& rFileName, sal_Int64 nFileSize); - + // Removes the local file name of a download void clearLocalFileName(); - + // Stores the bool value for manually paused downloads void storeDownloadPaused(bool paused); - + // Returns the directory that acts as the user's desktop static rtl::OUString getDesktopDirectory(); @@ -161,50 +161,50 @@ public: const rtl::OUString& rVersion ); // XElementAccess - virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) + virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw (::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL hasElements( ) + virtual sal_Bool SAL_CALL hasElements( ) throw (::com::sun::star::uno::RuntimeException); - + // XNameAccess - virtual ::com::sun::star::uno::Any SAL_CALL getByName( const ::rtl::OUString& aName ) - throw (::com::sun::star::container::NoSuchElementException, - ::com::sun::star::lang::WrappedTargetException, + virtual ::com::sun::star::uno::Any SAL_CALL getByName( const ::rtl::OUString& aName ) + throw (::com::sun::star::container::NoSuchElementException, + ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames( ) + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames( ) throw (::com::sun::star::uno::RuntimeException); - virtual ::sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName ) + virtual ::sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName ) throw (::com::sun::star::uno::RuntimeException); - + // XNameReplace virtual void SAL_CALL replaceByName( const ::rtl::OUString& aName, const ::com::sun::star::uno::Any& aElement ) - throw (::com::sun::star::lang::IllegalArgumentException, - ::com::sun::star::container::NoSuchElementException, - ::com::sun::star::lang::WrappedTargetException, + throw (::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::container::NoSuchElementException, + ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - + // XChangesBatch - virtual void SAL_CALL commitChanges( ) - throw (::com::sun::star::lang::WrappedTargetException, + virtual void SAL_CALL commitChanges( ) + throw (::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); virtual ::sal_Bool SAL_CALL hasPendingChanges( ) throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::util::ElementChange > SAL_CALL getPendingChanges( ) + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::util::ElementChange > SAL_CALL getPendingChanges( ) throw (::com::sun::star::uno::RuntimeException); // XServiceInfo - virtual rtl::OUString SAL_CALL getImplementationName() - throw (::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL supportsService(rtl::OUString const & serviceName) + virtual rtl::OUString SAL_CALL getImplementationName() throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames() + virtual sal_Bool SAL_CALL supportsService(rtl::OUString const & serviceName) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames() + throw (::com::sun::star::uno::RuntimeException); private: static rtl::OUString getSubVersion( const rtl::OUString& rVersion, sal_Int32 *nIndex ); static bool isVersionGreater( const rtl::OUString& rVersion1, const rtl::OUString& rVersion2 ); - + const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > m_xContainer; const ::rtl::Reference< UpdateCheckConfigListener > m_rListener; }; @@ -234,7 +234,7 @@ T getValue( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Name return value; } } - + return T(); } diff --git a/extensions/source/update/check/updatecheckconfiglistener.hxx b/extensions/source/update/check/updatecheckconfiglistener.hxx index fc7ee7926252..d0c79eb655fa 100644 --- a/extensions/source/update/check/updatecheckconfiglistener.hxx +++ b/extensions/source/update/check/updatecheckconfiglistener.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -34,8 +34,8 @@ /* This interface should be implemented by classes acting * as controller (as in the MVC pattern). */ - -struct UpdateCheckConfigListener : public rtl::IReference + +struct UpdateCheckConfigListener : public rtl::IReference { virtual void autoCheckStatusChanged(bool enabled) = 0; virtual void autoCheckIntervalChanged() = 0; diff --git a/extensions/source/update/check/updatecheckjob.cxx b/extensions/source/update/check/updatecheckjob.cxx index ede63876737b..995e4f526b22 100644 --- a/extensions/source/update/check/updatecheckjob.cxx +++ b/extensions/source/update/check/updatecheckjob.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -51,8 +51,8 @@ namespace uno = com::sun::star::uno ; #define UNISTRING(s) rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(s)) -namespace -{ +namespace +{ class InitUpdateCheckJobThread : public osl::Thread { @@ -73,13 +73,13 @@ private: bool m_bTerminating; }; -class UpdateCheckJob : +class UpdateCheckJob : public ::cppu::WeakImplHelper3< task::XJob, lang::XServiceInfo, frame::XTerminateListener > -{ +{ virtual ~UpdateCheckJob(); - + public: - + UpdateCheckJob(const uno::Reference<uno::XComponentContext>& xContext); static uno::Sequence< rtl::OUString > getServiceNames(); @@ -88,17 +88,17 @@ public: // Allows runtime exceptions to be thrown by const methods inline SAL_CALL operator uno::Reference< uno::XInterface > () const { return const_cast< cppu::OWeakObject * > (static_cast< cppu::OWeakObject const * > (this)); }; - + // XJob - virtual uno::Any SAL_CALL execute(const uno::Sequence<beans::NamedValue>&) + virtual uno::Any SAL_CALL execute(const uno::Sequence<beans::NamedValue>&) throw (lang::IllegalArgumentException, uno::Exception); - + // XServiceInfo - virtual rtl::OUString SAL_CALL getImplementationName() + virtual rtl::OUString SAL_CALL getImplementationName() throw (uno::RuntimeException); - virtual sal_Bool SAL_CALL supportsService(rtl::OUString const & serviceName) + virtual sal_Bool SAL_CALL supportsService(rtl::OUString const & serviceName) throw (uno::RuntimeException); - virtual uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames() + virtual uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames() throw (uno::RuntimeException); // XEventListener @@ -160,7 +160,7 @@ void InitUpdateCheckJobThread::setTerminating() { //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ -UpdateCheckJob::UpdateCheckJob( const uno::Reference<uno::XComponentContext>& xContext ) : +UpdateCheckJob::UpdateCheckJob( const uno::Reference<uno::XComponentContext>& xContext ) : m_xContext(xContext) { m_xDesktop.set( xContext->getServiceManager()->createInstanceWithContext( UNISTRING("com.sun.star.frame.Desktop"), xContext ), uno::UNO_QUERY ); @@ -171,12 +171,12 @@ UpdateCheckJob::UpdateCheckJob( const uno::Reference<uno::XComponentContext>& xC //------------------------------------------------------------------------------ UpdateCheckJob::~UpdateCheckJob() -{ +{ } //------------------------------------------------------------------------------ -uno::Sequence< rtl::OUString > +uno::Sequence< rtl::OUString > UpdateCheckJob::getServiceNames() { uno::Sequence< rtl::OUString > aServiceList(1); @@ -186,17 +186,17 @@ UpdateCheckJob::getServiceNames() //------------------------------------------------------------------------------ -rtl::OUString +rtl::OUString UpdateCheckJob::getImplName() -{ +{ return UNISTRING( "vnd.sun.UpdateCheck"); } //------------------------------------------------------------------------------ -uno::Any -UpdateCheckJob::execute(const uno::Sequence<beans::NamedValue>& namedValues) +uno::Any +UpdateCheckJob::execute(const uno::Sequence<beans::NamedValue>& namedValues) throw (lang::IllegalArgumentException, uno::Exception) { for ( sal_Int32 n=namedValues.getLength(); n-- > 0; ) @@ -218,28 +218,28 @@ UpdateCheckJob::execute(const uno::Sequence<beans::NamedValue>& namedValues) } } - uno::Sequence<beans::NamedValue> aConfig = + uno::Sequence<beans::NamedValue> aConfig = getValue< uno::Sequence<beans::NamedValue> > (namedValues, "JobConfig"); - /* Determine the way we got invoked here - + /* Determine the way we got invoked here - * see Developers Guide Chapter "4.7.2 Jobs" to understand the magic */ - - uno::Sequence<beans::NamedValue> aEnvironment = + + uno::Sequence<beans::NamedValue> aEnvironment = getValue< uno::Sequence<beans::NamedValue> > (namedValues, "Environment"); - + rtl::OUString aEventName = getValue< rtl::OUString > (aEnvironment, "EventName"); - + m_pInitThread.reset( new InitUpdateCheckJobThread( m_xContext, aConfig, !aEventName.equalsAscii("onFirstVisibleTask"))); - + return uno::Any(); } //------------------------------------------------------------------------------ -void UpdateCheckJob::handleExtensionUpdates( const uno::Sequence< beans::NamedValue > &rListProp ) +void UpdateCheckJob::handleExtensionUpdates( const uno::Sequence< beans::NamedValue > &rListProp ) { try { uno::Sequence< uno::Sequence< rtl::OUString > > aList = @@ -247,7 +247,7 @@ void UpdateCheckJob::handleExtensionUpdates( const uno::Sequence< beans::NamedVa bool bPrepareOnly = getValue< bool > ( rListProp, "prepareOnly" ); // we will first store any new found updates and then check, if there are any - // pending updates. + // pending updates. storeExtensionUpdateInfos( m_xContext, aList ); if ( bPrepareOnly ) @@ -278,7 +278,7 @@ void UpdateCheckJob::handleExtensionUpdates( const uno::Sequence< beans::NamedVa //------------------------------------------------------------------------------ -rtl::OUString SAL_CALL +rtl::OUString SAL_CALL UpdateCheckJob::getImplementationName() throw (uno::RuntimeException) { return getImplName(); @@ -286,7 +286,7 @@ UpdateCheckJob::getImplementationName() throw (uno::RuntimeException) //------------------------------------------------------------------------------ -uno::Sequence< rtl::OUString > SAL_CALL +uno::Sequence< rtl::OUString > SAL_CALL UpdateCheckJob::getSupportedServiceNames() throw (uno::RuntimeException) { return getServiceNames(); @@ -294,15 +294,15 @@ UpdateCheckJob::getSupportedServiceNames() throw (uno::RuntimeException) //------------------------------------------------------------------------------ -sal_Bool SAL_CALL +sal_Bool SAL_CALL UpdateCheckJob::supportsService( rtl::OUString const & serviceName ) throw (uno::RuntimeException) { uno::Sequence< rtl::OUString > aServiceNameList = getServiceNames(); - + for( sal_Int32 n=0; n < aServiceNameList.getLength(); n++ ) if( aServiceNameList[n].equals(serviceName) ) return sal_True; - + return sal_False; } @@ -311,7 +311,7 @@ UpdateCheckJob::supportsService( rtl::OUString const & serviceName ) throw (uno: void SAL_CALL UpdateCheckJob::disposing( lang::EventObject const & rEvt ) throw ( uno::RuntimeException ) { - bool shutDown = ( rEvt.Source == m_xDesktop ); + bool shutDown = ( rEvt.Source == m_xDesktop ); if ( shutDown && m_xDesktop.is() ) { @@ -341,7 +341,7 @@ void SAL_CALL UpdateCheckJob::notifyTermination( lang::EventObject const & rEvt //------------------------------------------------------------------------------ -static uno::Reference<uno::XInterface> SAL_CALL +static uno::Reference<uno::XInterface> SAL_CALL createJobInstance(const uno::Reference<uno::XComponentContext>& xContext) { return *new UpdateCheckJob(xContext); @@ -349,7 +349,7 @@ createJobInstance(const uno::Reference<uno::XComponentContext>& xContext) //------------------------------------------------------------------------------ -static uno::Reference<uno::XInterface> SAL_CALL +static uno::Reference<uno::XInterface> SAL_CALL createConfigInstance(const uno::Reference<uno::XComponentContext>& xContext) { return *UpdateCheckConfig::get(xContext, *UpdateCheck::get()); @@ -357,7 +357,7 @@ createConfigInstance(const uno::Reference<uno::XComponentContext>& xContext) //------------------------------------------------------------------------------ -static const cppu::ImplementationEntry kImplementations_entries[] = +static const cppu::ImplementationEntry kImplementations_entries[] = { { createJobInstance, @@ -380,16 +380,16 @@ static const cppu::ImplementationEntry kImplementations_entries[] = //------------------------------------------------------------------------------ -extern "C" void SAL_CALL -component_getImplementationEnvironment( const sal_Char **aEnvTypeName, uno_Environment **) +extern "C" void SAL_CALL +component_getImplementationEnvironment( const sal_Char **aEnvTypeName, uno_Environment **) { *aEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME ; } //------------------------------------------------------------------------------ -extern "C" sal_Bool SAL_CALL -component_writeInfo(void *pServiceManager, void *pRegistryKey) +extern "C" sal_Bool SAL_CALL +component_writeInfo(void *pServiceManager, void *pRegistryKey) { return cppu::component_writeInfoHelper( pServiceManager, @@ -401,7 +401,7 @@ component_writeInfo(void *pServiceManager, void *pRegistryKey) //------------------------------------------------------------------------------ extern "C" void * -component_getFactory(const sal_Char *pszImplementationName, void *pServiceManager, void *pRegistryKey) +component_getFactory(const sal_Char *pszImplementationName, void *pServiceManager, void *pRegistryKey) { return cppu::component_getFactoryHelper( pszImplementationName, diff --git a/extensions/source/update/check/updatehdl.cxx b/extensions/source/update/check/updatehdl.cxx index 364d975c537a..6210a8af77a7 100644 --- a/extensions/source/update/check/updatehdl.cxx +++ b/extensions/source/update/check/updatehdl.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -262,7 +262,7 @@ void UpdateHandler::setDownloadFile( const rtl::OUString& rFilePath ) sal_Int32 nLast = rFilePath.lastIndexOf( '/' ); if ( nLast != -1 ) { - msDownloadFile = rFilePath.copy( nLast+1 ); + msDownloadFile = rFilePath.copy( nLast+1 ); const rtl::OUString aDownloadURL = rFilePath.copy( 0, nLast ); osl::FileBase::getSystemPathFromFileURL( aDownloadURL, msDownloadPath ); } @@ -397,7 +397,7 @@ void SAL_CALL UpdateHandler::windowClosing( const lang::EventObject& e ) awt::ActionEvent aActionEvt; aActionEvt.ActionCommand = COMMAND_CLOSE; aActionEvt.Source = e.Source; - + actionPerformed( aActionEvt ); } @@ -449,8 +449,8 @@ void SAL_CALL UpdateHandler::handle( uno::Reference< task::XInteractionRequest > throw uno::RuntimeException( UNISTRING( "UpdateHandler: unable to obtain service manager from component context" ), *this ); mxInteractionHdl = uno::Reference<task::XInteractionHandler> ( - xServiceManager->createInstanceWithContext( - UNISTRING( "com.sun.star.task.InteractionHandler" ), + xServiceManager->createInstanceWithContext( + UNISTRING( "com.sun.star.task.InteractionHandler" ), mxContext), uno::UNO_QUERY_THROW); if( !mxInteractionHdl.is() ) @@ -514,7 +514,7 @@ void SAL_CALL UpdateHandler::notifyTermination( const lang::EventObject& ) uno::Reference< lang::XComponent > xComponent( mxUpdDlg, uno::UNO_QUERY ); if ( xComponent.is() ) - xComponent->dispose(); + xComponent->dispose(); mxUpdDlg.clear(); } @@ -739,7 +739,7 @@ void UpdateHandler::loadStrings() msPauseBtn = loadString( xBundle, RID_UPDATE_BTN_PAUSE ); msResumeBtn = loadString( xBundle, RID_UPDATE_BTN_RESUME ); msCancelBtn = loadString( xBundle, RID_UPDATE_BTN_CANCEL ); - + // all update states before UPDATESTATE_UPDATE_AVAIL don't have a bubble // so we can ignore them for ( int i=0; i < (int)(UPDATESTATES_COUNT - UPDATESTATE_UPDATE_AVAIL); i++ ) @@ -864,13 +864,13 @@ void UpdateHandler::setFullVersion( rtl::OUString& rString ) throw uno::RuntimeException( UNISTRING( "getProductName: empty component context" ), *this ); uno::Reference< lang::XMultiComponentFactory > xServiceManager( mxContext->getServiceManager() ); - + if( !xServiceManager.is() ) throw uno::RuntimeException( UNISTRING( "getProductName: unable to obtain service manager from component context" ), *this ); - - uno::Reference< lang::XMultiServiceFactory > xConfigurationProvider( - xServiceManager->createInstanceWithContext( UNISTRING( "com.sun.star.configuration.ConfigurationProvider" ), mxContext ), - uno::UNO_QUERY_THROW); + + uno::Reference< lang::XMultiServiceFactory > xConfigurationProvider( + xServiceManager->createInstanceWithContext( UNISTRING( "com.sun.star.configuration.ConfigurationProvider" ), mxContext ), + uno::UNO_QUERY_THROW); beans::PropertyValue aProperty; aProperty.Name = UNISTRING( "nodepath" ); @@ -881,7 +881,7 @@ void UpdateHandler::setFullVersion( rtl::OUString& rString ) uno::Reference< uno::XInterface > xConfigAccess; xConfigAccess = xConfigurationProvider->createInstanceWithArguments( UNISTRING("com.sun.star.configuration.ConfigurationAccess"), - aArgumentList ); + aArgumentList ); uno::Reference< container::XNameAccess > xNameAccess( xConfigAccess, uno::UNO_QUERY_THROW ); @@ -942,7 +942,7 @@ bool UpdateHandler::showWarning( const rtl::OUString &rWarningText ) const uno::Reference< awt::XControl > xControl( mxUpdDlg, uno::UNO_QUERY ); if ( !xControl.is() ) return bRet; - + uno::Reference< awt::XWindowPeer > xPeer = xControl->getPeer(); if ( !xPeer.is() ) return bRet; @@ -977,7 +977,7 @@ bool UpdateHandler::showWarning( const rtl::OUString &rWarningText ) const uno::Reference< lang::XComponent > xComponent( xMsgBox, uno::UNO_QUERY ); if ( xComponent.is() ) - xComponent->dispose(); + xComponent->dispose(); return bRet; } @@ -991,7 +991,7 @@ bool UpdateHandler::showWarning( const rtl::OUString &rWarningText, uno::Reference< awt::XControl > xControl( mxUpdDlg, uno::UNO_QUERY ); if ( !xControl.is() ) return bRet; - + uno::Reference< awt::XWindowPeer > xPeer = xControl->getPeer(); if ( !xPeer.is() ) return bRet; @@ -1048,7 +1048,7 @@ bool UpdateHandler::showWarning( const rtl::OUString &rWarningText, uno::Reference< lang::XComponent > xComponent( xMsgBox, uno::UNO_QUERY ); if ( xComponent.is() ) - xComponent->dispose(); + xComponent->dispose(); return bRet; } @@ -1114,7 +1114,7 @@ void UpdateHandler::showControls( short nControls ) nShiftMe = (short)(nControls >> i); showControl( msButtonIDs[i], (bool)(nShiftMe & 0x01) ); } - + nShiftMe = (short)(nControls >> THROBBER_CTRL); startThrobber( (bool)(nShiftMe & 0x01) ); @@ -1145,10 +1145,10 @@ void UpdateHandler::createDialog() } uno::Reference< lang::XMultiComponentFactory > xServiceManager( mxContext->getServiceManager() ); - + if( xServiceManager.is() ) { - uno::Reference< frame::XDesktop > xDesktop( + uno::Reference< frame::XDesktop > xDesktop( xServiceManager->createInstanceWithContext( UNISTRING( "com.sun.star.frame.Desktop"), mxContext ), uno::UNO_QUERY ); if ( xDesktop.is() ) diff --git a/extensions/source/update/check/updatehdl.hrc b/extensions/source/update/check/updatehdl.hrc index ad3d472eaf68..6d7b93086cb3 100644 --- a/extensions/source/update/check/updatehdl.hrc +++ b/extensions/source/update/check/updatehdl.hrc @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -25,8 +25,8 @@ * ************************************************************************/ - #define RID_UPDATE_HDL_START 1200 - + #define RID_UPDATE_HDL_START 1200 + #define RID_UPDATE_STR_CHECKING RID_UPDATE_HDL_START + 1 #define RID_UPDATE_STR_NO_UPD_FOUND RID_UPDATE_HDL_START + 2 #define RID_UPDATE_STR_UPD_FOUND RID_UPDATE_HDL_START + 3 @@ -60,7 +60,7 @@ #define RID_UPDATE_BTN_PAUSE RID_UPDATE_HDL_START + 33 #define RID_UPDATE_BTN_RESUME RID_UPDATE_HDL_START + 34 #define RID_UPDATE_BTN_CANCEL RID_UPDATE_HDL_START + 35 - + #define RID_UPDATE_BUBBLE_TEXT_START RID_UPDATE_HDL_START + 40 #define RID_UPDATE_BUBBLE_UPDATE_AVAIL RID_UPDATE_BUBBLE_TEXT_START + 0 #define RID_UPDATE_BUBBLE_UPDATE_NO_DOWN RID_UPDATE_BUBBLE_TEXT_START + 1 diff --git a/extensions/source/update/check/updatehdl.hxx b/extensions/source/update/check/updatehdl.hxx index 6a6336530747..cc451df57336 100644 --- a/extensions/source/update/check/updatehdl.hxx +++ b/extensions/source/update/check/updatehdl.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -102,7 +102,7 @@ private: osl::Mutex maMutex; rtl::OUString msNextVersion; - rtl::OUString msDownloadPath; + rtl::OUString msDownloadPath; rtl::OUString msDownloadFile; rtl::OUString msDescriptionMsg; rtl::OUString msChecking; // RID_UPDATE_STR_CHECKING diff --git a/extensions/source/update/check/updatehdl.src b/extensions/source/update/check/updatehdl.src index 58f88b7e4852..3dbc0b3676cf 100644 --- a/extensions/source/update/check/updatehdl.src +++ b/extensions/source/update/check/updatehdl.src @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/update/check/updateinfo.hxx b/extensions/source/update/check/updateinfo.hxx index 56ecf2ecfd69..0db0c4e6608d 100644 --- a/extensions/source/update/check/updateinfo.hxx +++ b/extensions/source/update/check/updateinfo.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -36,10 +36,10 @@ struct DownloadSource { bool IsDirect; rtl::OUString URL; - + DownloadSource(bool bIsDirect, const rtl::OUString& aURL) : IsDirect(bIsDirect), URL(aURL) {}; DownloadSource(const DownloadSource& ds) : IsDirect(ds.IsDirect), URL(ds.URL) {}; - + DownloadSource & operator=( const DownloadSource & ds ) { IsDirect = ds.IsDirect; URL = ds.URL; return *this; }; }; @@ -49,10 +49,10 @@ struct ReleaseNote rtl::OUString URL; sal_uInt8 Pos2; rtl::OUString URL2; - + ReleaseNote(sal_uInt8 pos, const rtl::OUString aURL) : Pos(pos), URL(aURL), Pos2(0), URL2() {}; ReleaseNote(sal_uInt8 pos, const rtl::OUString aURL, sal_uInt8 pos2, const rtl::OUString aURL2) : Pos(pos), URL(aURL), Pos2(pos2), URL2(aURL2) {}; - + ReleaseNote(const ReleaseNote& rn) :Pos(rn.Pos), URL(rn.URL), Pos2(rn.Pos2), URL2(rn.URL2) {}; ReleaseNote & operator=( const ReleaseNote& rn) { Pos=rn.Pos; URL=rn.URL; Pos2=rn.Pos2; URL2=rn.URL2; return *this; }; }; @@ -64,20 +64,20 @@ struct UpdateInfo rtl::OUString Description; std::vector< DownloadSource > Sources; std::vector< ReleaseNote > ReleaseNotes; - + UpdateInfo() : BuildId(), Version(), Description(), Sources(), ReleaseNotes() {}; UpdateInfo(const UpdateInfo& ui) : BuildId(ui.BuildId), Version(ui.Version), Description(ui.Description), Sources(ui.Sources), ReleaseNotes(ui.ReleaseNotes) {}; inline UpdateInfo & operator=( const UpdateInfo& ui ); }; -UpdateInfo & UpdateInfo::operator=( const UpdateInfo& ui ) +UpdateInfo & UpdateInfo::operator=( const UpdateInfo& ui ) { - BuildId = ui.BuildId; - Version = ui.Version; + BuildId = ui.BuildId; + Version = ui.Version; Description = ui.Description; - Sources = ui.Sources; - ReleaseNotes = ui.ReleaseNotes; - return *this; + Sources = ui.Sources; + ReleaseNotes = ui.ReleaseNotes; + return *this; } diff --git a/extensions/source/update/check/updateprotocol.cxx b/extensions/source/update/check/updateprotocol.cxx index 9ba37b67308c..cafda1b8cc8f 100644 --- a/extensions/source/update/check/updateprotocol.cxx +++ b/extensions/source/update/check/updateprotocol.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -58,7 +58,7 @@ namespace xml = css::xml ; //------------------------------------------------------------------------------ -static bool +static bool getBootstrapData( uno::Sequence< ::rtl::OUString > & rRepositoryList, ::rtl::OUString & rBuildID, @@ -89,7 +89,7 @@ getBootstrapData( //------------------------------------------------------------------------------ // Returns 'true' if successfully connected to the update server -bool +bool checkForUpdates( UpdateInfo& o_rUpdateInfo, uno::Reference< uno::XComponentContext > const & rxContext, @@ -97,36 +97,36 @@ checkForUpdates( const uno::Reference< deployment::XUpdateInformationProvider >& rUpdateInfoProvider) { OSL_TRACE("checking for updates ..\n"); - + ::rtl::OUString myArch; ::rtl::OUString myOS; - + rtl::Bootstrap::get(UNISTRING("_OS"), myOS); rtl::Bootstrap::get(UNISTRING("_ARCH"), myArch); - + uno::Sequence< ::rtl::OUString > aRepositoryList; ::rtl::OUString aBuildID; ::rtl::OUString aInstallSetID; - + if( ! ( getBootstrapData(aRepositoryList, aBuildID, aInstallSetID) && (aRepositoryList.getLength() > 0) ) ) return false; if( !rxContext.is() ) - throw uno::RuntimeException( + throw uno::RuntimeException( UNISTRING( "checkForUpdates: empty component context" ), uno::Reference< uno::XInterface >() ); - + OSL_ASSERT( rxContext->getServiceManager().is() ); - - // XPath implementation - uno::Reference< xml::xpath::XXPathAPI > xXPath( - rxContext->getServiceManager()->createInstanceWithContext( UNISTRING( "com.sun.star.xml.xpath.XPathAPI" ), rxContext ), - uno::UNO_QUERY_THROW); - + + // XPath implementation + uno::Reference< xml::xpath::XXPathAPI > xXPath( + rxContext->getServiceManager()->createInstanceWithContext( UNISTRING( "com.sun.star.xml.xpath.XPathAPI" ), rxContext ), + uno::UNO_QUERY_THROW); + xXPath->registerNS( UNISTRING("inst"), UNISTRING("http://installation.openoffice.org/description") ); if( rxInteractionHandler.is() ) rUpdateInfoProvider->setInteractionHandler(rxInteractionHandler); - + try { uno::Reference< container::XEnumeration > aUpdateInfoEnumeration = @@ -143,13 +143,13 @@ checkForUpdates( aBuffer.appendAscii("\' and inst:buildid>"); aBuffer.append( aBuildID ); aBuffer.appendAscii("]"); - + rtl::OUString aXPathExpression = aBuffer.makeStringAndClear(); while( aUpdateInfoEnumeration->hasMoreElements() ) { deployment::UpdateInformationEntry aEntry; - + if( aUpdateInfoEnumeration->nextElement() >>= aEntry ) { uno::Reference< xml::dom::XNode > xNode( aEntry.UpdateDocument.get() ); @@ -161,22 +161,22 @@ checkForUpdates( // ignore } -/* - o_rUpdateInfo.Sources.push_back( DownloadSource(true, +/* + o_rUpdateInfo.Sources.push_back( DownloadSource(true, UNISTRING("http://openoffice.bouncer.osuosl.org/?product=OpenOffice.org&os=solarissparcwjre&lang=en-US&version=2.2.1") ) ); */ - + sal_Int32 i, imax = xNodeList->getLength(); for( i = 0; i < imax; ++i ) { uno::Reference< xml::dom::XNode > xNode2( xNodeList->item(i) ); - + if( xNode2.is() ) { uno::Reference< xml::dom::XElement > xParent(xNode2->getParentNode(), uno::UNO_QUERY_THROW); rtl::OUString aType = xParent->getAttribute(UNISTRING("type")); bool bIsDirect = ( sal_False == aType.equalsIgnoreAsciiCaseAscii("text/html") ); - + o_rUpdateInfo.Sources.push_back( DownloadSource(bIsDirect, xNode2->getNodeValue()) ); } } @@ -218,16 +218,16 @@ checkForUpdates( if( xRelNote.is() ) { sal_Int32 pos = xRelNote->getAttribute(UNISTRING("pos")).toInt32(); - + ReleaseNote aRelNote((sal_uInt8) pos, xRelNote->getAttribute(UNISTRING("src"))); - + if( xRelNote->hasAttribute(UNISTRING("src2")) ) { pos = xRelNote->getAttribute(UNISTRING("pos2")).toInt32(); aRelNote.Pos2 = (sal_Int8) pos; aRelNote.URL2 = xRelNote->getAttribute(UNISTRING("src2")); } - + o_rUpdateInfo.ReleaseNotes.push_back(aRelNote); } } @@ -236,7 +236,7 @@ checkForUpdates( ReleaseNote(1, UNISTRING("http://qa.openoffice.org/tests/online_update_test.html")) ); */ - + if( o_rUpdateInfo.Sources.size() > 0 ) return true; } @@ -246,7 +246,7 @@ checkForUpdates( { return false; } - + return true; } diff --git a/extensions/source/update/check/updateprotocol.hxx b/extensions/source/update/check/updateprotocol.hxx index ef7d150867b0..3510367b0ebb 100644 --- a/extensions/source/update/check/updateprotocol.hxx +++ b/extensions/source/update/check/updateprotocol.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -50,7 +50,7 @@ bool checkForPendingUpdates( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext ); -bool storeExtensionUpdateInfos( +bool storeExtensionUpdateInfos( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< rtl::OUString > > &rUpdateInfos ); diff --git a/extensions/source/update/check/updateprotocoltest.cxx b/extensions/source/update/check/updateprotocoltest.cxx index bbcd225019c6..c9fe2f33c0eb 100644 --- a/extensions/source/update/check/updateprotocoltest.cxx +++ b/extensions/source/update/check/updateprotocoltest.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -48,7 +48,7 @@ SAL_IMPLEMENT_MAIN() { (void) argv; (void) argc; - + if( osl_getCommandArgCount() != 0 ) { fprintf(stderr, "Usage: updateprotocoltest\n"); @@ -57,19 +57,19 @@ SAL_IMPLEMENT_MAIN() // create the initial component context uno::Reference< uno::XComponentContext > rComponentContext = cppu::defaultBootstrap_InitialComponentContext(); - + // initialize UCB uno::Sequence< uno::Any > theArguments(2); theArguments[0] = uno::makeAny( UNISTRING( "Local") ); theArguments[1] = uno::makeAny( UNISTRING( "Office") ); - - uno::Reference< uno::XInterface > xUCB = - rComponentContext->getServiceManager()->createInstanceWithArgumentsAndContext( - UNISTRING( "com.sun.star.ucb.UniversalContentBroker" ), - theArguments, + + uno::Reference< uno::XInterface > xUCB = + rComponentContext->getServiceManager()->createInstanceWithArgumentsAndContext( + UNISTRING( "com.sun.star.ucb.UniversalContentBroker" ), + theArguments, rComponentContext ); - - + + rtl::OUString aURL; rtl::OUString aVersion; @@ -77,7 +77,7 @@ SAL_IMPLEMENT_MAIN() { if( checkForUpdates(rComponentContext, uno::Reference< task::XInteractionHandler > (), aURL, aVersion) ) { - OSL_TRACE( "Update found: %s on %s", + OSL_TRACE( "Update found: %s on %s", rtl::OUStringToOString( aVersion, RTL_TEXTENCODING_UTF8).getStr(), rtl::OUStringToOString( aURL, RTL_TEXTENCODING_UTF8).getStr()); } @@ -90,7 +90,7 @@ SAL_IMPLEMENT_MAIN() { OSL_TRACE( "unhandled exception caught" ); } - + return 0; } diff --git a/extensions/source/update/check/updchk.xml b/extensions/source/update/check/updchk.xml index 25d5d361e1d0..487034ecf180 100644 --- a/extensions/source/update/check/updchk.xml +++ b/extensions/source/update/check/updchk.xml @@ -8,8 +8,8 @@ <description> The </description> <loader-name>com.sun.star.loader.SharedLibrary</loader-name> <language>c++</language> - <status value="beta"/> - <supported-service>com.sun.star.setup.UpdateCheck</supported-service> + <status value="beta"/> + <supported-service>com.sun.star.setup.UpdateCheck</supported-service> <service-dependency>...</service-dependency> <type>com.sun.star.beans.NamedValue</type> <type>com.sun.star.beans.PropertyValue</type> diff --git a/extensions/source/update/feed/test/updatefeedtest.cxx b/extensions/source/update/feed/test/updatefeedtest.cxx index a9bd65bc32d1..073eb92166ed 100644 --- a/extensions/source/update/feed/test/updatefeedtest.cxx +++ b/extensions/source/update/feed/test/updatefeedtest.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -64,45 +64,45 @@ SAL_IMPLEMENT_MAIN() // create the initial component context uno::Reference< uno::XComponentContext > rComponentContext = cppu::defaultBootstrap_InitialComponentContext(); - + // initialize UCB uno::Sequence< uno::Any > theArguments(2); theArguments[0] = uno::makeAny( UNISTRING( "Local") ); theArguments[1] = uno::makeAny( UNISTRING( "Office") ); - - uno::Reference< uno::XInterface > xUCB = - rComponentContext->getServiceManager()->createInstanceWithArgumentsAndContext( - UNISTRING( "com.sun.star.ucb.UniversalContentBroker" ), - theArguments, + + uno::Reference< uno::XInterface > xUCB = + rComponentContext->getServiceManager()->createInstanceWithArgumentsAndContext( + UNISTRING( "com.sun.star.ucb.UniversalContentBroker" ), + theArguments, rComponentContext ); - + // retrieve the update information provider uno::Reference< deployment::XUpdateInformationProvider > rUpdateInformationProvider = deployment::UpdateInformationProvider::create( rComponentContext ); - + uno::Sequence< rtl::OUString > theURLs(1); osl_getCommandArg( 0, &theURLs[0].pData ); // theURLs[0] = UNISTRING( "http://localhost/~olli/atomfeed.xml" ); - + rtl::OUString aExtension = UNISTRING( "MyExtension" ); try { - uno::Sequence< uno::Reference< xml::dom::XElement > > theUpdateInfo = + uno::Sequence< uno::Reference< xml::dom::XElement > > theUpdateInfo = rUpdateInformationProvider->getUpdateInformation( theURLs, aExtension ); - + OSL_TRACE( "getUpdateInformation returns %d element(s)", theUpdateInfo.getLength() ); } catch( const uno::Exception & e ) { OSL_TRACE( "exception caught: %s", rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_UTF8 ).getStr()); } - catch( ... ) + catch( ... ) { OSL_TRACE( "exception of undetermined type caught" ); } - + return 0; } diff --git a/extensions/source/update/feed/updatefeed.cxx b/extensions/source/update/feed/updatefeed.cxx index afc3ba1f76ed..ff1a10d86a17 100644 --- a/extensions/source/update/feed/updatefeed.cxx +++ b/extensions/source/update/feed/updatefeed.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/update/feed/updatefeed.xml b/extensions/source/update/feed/updatefeed.xml index 1b0557db3db2..b8606a643c93 100644 --- a/extensions/source/update/feed/updatefeed.xml +++ b/extensions/source/update/feed/updatefeed.xml @@ -8,13 +8,13 @@ <description> The </description> <loader-name>com.sun.star.loader.SharedLibrary</loader-name> <language>c++</language> - <status value="beta"/> - <supported-service>com.sun.star.deployment.UpdateInformationProvider</supported-service> + <status value="beta"/> + <supported-service>com.sun.star.deployment.UpdateInformationProvider</supported-service> <service-dependency>...</service-dependency> <type>com.sun.star.beans.NamedValue</type> <type>com.sun.star.beans.PropertyValue</type> <type>com.sun.star.container.XNameReplace</type> - <type>com.sun.star.deployment.UpdateInformationProvider</type> + <type>com.sun.star.deployment.UpdateInformationProvider</type> <type>com.sun.star.io.XInputStream</type> <type>com.sun.star.io.XOutputStream</type> <type>com.sun.star.lang.XComponent</type> diff --git a/extensions/source/update/tools/ztool.cxx b/extensions/source/update/tools/ztool.cxx index fbcf02e66a65..3695823110b6 100644 --- a/extensions/source/update/tools/ztool.cxx +++ b/extensions/source/update/tools/ztool.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -61,6 +61,6 @@ main( int argc, char **argv ) return 0; } - + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/extensions/source/update/ui/updatecheckui.cxx b/extensions/source/update/ui/updatecheckui.cxx index 550705ee4a67..fe784a7d5630 100644 --- a/extensions/source/update/ui/updatecheckui.cxx +++ b/extensions/source/update/ui/updatecheckui.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -397,7 +397,7 @@ void UpdateCheckUI::AddMenuBarIcon( SystemWindow *pSysWin, bool bAddEventHdl ) aBuf.appendAscii( "\n\n" ); aBuf.append( maBubbleText ); } - + Image aImage = GetMenuBarIcon( pActiveMBar ); mnIconID = pActiveMBar->AddMenuBarButton( aImage, LINK( this, UpdateCheckUI, ClickHdl ), @@ -585,7 +585,7 @@ BubbleWindow * UpdateCheckUI::GetBubbleWindow() Rectangle aIconRect = mpIconMBar->GetMenuBarButtonRectPixel( mnIconID ); if( aIconRect.IsEmpty() ) return NULL; - + BubbleWindow* pBubbleWin = mpBubbleWin; if ( !pBubbleWin ) { @@ -596,7 +596,7 @@ BubbleWindow * UpdateCheckUI::GetBubbleWindow() mbBubbleChanged = false; } else if ( mbBubbleChanged ) { - pBubbleWin->SetTitleAndText( XubString( maBubbleTitle ), + pBubbleWin->SetTitleAndText( XubString( maBubbleTitle ), XubString( maBubbleText ), maBubbleImage ); mbBubbleChanged = false; diff --git a/extensions/source/update/ui/updatecheckui.hrc b/extensions/source/update/ui/updatecheckui.hrc index 3d92e4579f58..3b451fa99d77 100644 --- a/extensions/source/update/ui/updatecheckui.hrc +++ b/extensions/source/update/ui/updatecheckui.hrc @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -25,10 +25,10 @@ * ************************************************************************/ - #define RID_UPDATECHECKUI_START 1100 - + #define RID_UPDATECHECKUI_START 1100 + #define RID_UPDATE_AVAIL_IMAGES RID_UPDATECHECKUI_START + 1 - + #define RID_UPDATE_AVAILABLE_16 RID_UPDATECHECKUI_START + 1 #define RID_UPDATE_AVAILABLE_26 RID_UPDATECHECKUI_START + 2 #define RID_UPDATE_AVAILABLE_16_HC RID_UPDATECHECKUI_START + 3 diff --git a/extensions/source/update/ui/updatecheckui.src b/extensions/source/update/ui/updatecheckui.src index 39b6f44dce4d..813e3e19b9e2 100644 --- a/extensions/source/update/ui/updatecheckui.src +++ b/extensions/source/update/ui/updatecheckui.src @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/source/update/ui/updchkui.xml b/extensions/source/update/ui/updchkui.xml index a9005d8b255f..6c7625ad3358 100644 --- a/extensions/source/update/ui/updchkui.xml +++ b/extensions/source/update/ui/updchkui.xml @@ -8,8 +8,8 @@ <description> The </description> <loader-name>com.sun.star.loader.SharedLibrary</loader-name> <language>c++</language> - <status value="beta"/> - <supported-service>com.sun.star.setup.UpdateCheckUI</supported-service> + <status value="beta"/> + <supported-service>com.sun.star.setup.UpdateCheckUI</supported-service> <service-dependency>...</service-dependency> <type>com.sun.star.document.XEventBroadcaster</type> <type>com.sun.star.document.XEventListener</type> diff --git a/extensions/source/xmlextract/xmxcom.hxx b/extensions/source/xmlextract/xmxcom.hxx index e44419b633fd..a3ce42f843c9 100644 --- a/extensions/source/xmlextract/xmxcom.hxx +++ b/extensions/source/xmlextract/xmxcom.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -48,18 +48,18 @@ // ----------------------------------------------------------------------------- -#define NMSP_CPPU ::cppu -#define NMSP_RTL ::rtl -#define NMSP_UNO ::com::sun::star::uno -#define NMSP_LANG ::com::sun::star::lang -#define NMSP_IO ::com::sun::star::io +#define NMSP_CPPU ::cppu +#define NMSP_RTL ::rtl +#define NMSP_UNO ::com::sun::star::uno +#define NMSP_LANG ::com::sun::star::lang +#define NMSP_IO ::com::sun::star::io #define NMSP_REGISTRY ::com::sun::star::registry -#define REF( _def_Obj ) NMSP_UNO::Reference< _def_Obj > -#define SEQ( _def_Obj ) NMSP_UNO::Sequence< _def_Obj > -#define ANY NMSP_UNO::Any -#define B2UCONST( _def_pChar ) (NMSP_RTL::OUString(RTL_CONSTASCII_USTRINGPARAM(_def_pChar ))) +#define REF( _def_Obj ) NMSP_UNO::Reference< _def_Obj > +#define SEQ( _def_Obj ) NMSP_UNO::Sequence< _def_Obj > +#define ANY NMSP_UNO::Any +#define B2UCONST( _def_pChar ) (NMSP_RTL::OUString(RTL_CONSTASCII_USTRINGPARAM(_def_pChar ))) #endif // _XMXCOM_HXX diff --git a/extensions/source/xmlextract/xmxtrct.cxx b/extensions/source/xmlextract/xmxtrct.cxx index b738c7fa5b1e..7a5b1a87a574 100644 --- a/extensions/source/xmlextract/xmxtrct.cxx +++ b/extensions/source/xmlextract/xmxtrct.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -42,21 +42,21 @@ class XMXLockBytes : public SvLockBytes { - REF( NMSP_IO::XInputStream ) mxIStm; - SEQ( sal_Int8 ) maSeq; + REF( NMSP_IO::XInputStream ) mxIStm; + SEQ( sal_Int8 ) maSeq; XMXLockBytes(); public: XMXLockBytes( const REF( NMSP_IO::XInputStream )& rxIStm ); - virtual ~XMXLockBytes(); + virtual ~XMXLockBytes(); - virtual ErrCode ReadAt( sal_Size nPos, void* pBuffer, sal_Size nCount, sal_Size* pRead ) const; - virtual ErrCode WriteAt( sal_Size nPos, const void* pBuffer, sal_Size nCount, sal_Size* pWritten ); - virtual ErrCode Flush() const; - virtual ErrCode SetSize( sal_Size nSize ); - virtual ErrCode Stat( SvLockBytesStat*, SvLockBytesStatFlag ) const; + virtual ErrCode ReadAt( sal_Size nPos, void* pBuffer, sal_Size nCount, sal_Size* pRead ) const; + virtual ErrCode WriteAt( sal_Size nPos, const void* pBuffer, sal_Size nCount, sal_Size* pWritten ); + virtual ErrCode Flush() const; + virtual ErrCode SetSize( sal_Size nSize ); + virtual ErrCode Stat( SvLockBytesStat*, SvLockBytesStatFlag ) const; }; // ------------------------------------------------------------------------ @@ -66,8 +66,8 @@ XMXLockBytes::XMXLockBytes( const REF( NMSP_IO::XInputStream )& rxIStm ) : { if( mxIStm.is() ) { - const sal_uInt32 nBytesToRead = 65535; - sal_uInt32 nRead; + const sal_uInt32 nBytesToRead = 65535; + sal_uInt32 nRead; do { @@ -96,8 +96,8 @@ XMXLockBytes::~XMXLockBytes() ErrCode XMXLockBytes::ReadAt( sal_Size nPos, void* pBuffer, sal_Size nCount, sal_Size* pRead ) const { - const sal_Size nSeqLen = maSeq.getLength(); - ErrCode nErr = ERRCODE_NONE; + const sal_Size nSeqLen = maSeq.getLength(); + ErrCode nErr = ERRCODE_NONE; if( nPos < nSeqLen ) { @@ -165,11 +165,11 @@ REF( NMSP_IO::XInputStream ) SAL_CALL XMLExtractor::extract( const REF( NMSP_IO: if( rxIStm.is() ) { - SvStream aIStm( new XMXLockBytes( rxIStm ) ); - SvStorageRef aStorage( new SvStorage( aIStm ) ); - String aStmName; - const String aFormat1( String::CreateFromAscii( "XMLFormat" ) ); - const String aFormat2( String::CreateFromAscii( "XMLFormat2" ) ); + SvStream aIStm( new XMXLockBytes( rxIStm ) ); + SvStorageRef aStorage( new SvStorage( aIStm ) ); + String aStmName; + const String aFormat1( String::CreateFromAscii( "XMLFormat" ) ); + const String aFormat2( String::CreateFromAscii( "XMLFormat2" ) ); if( aStorage->IsContained( aFormat2 ) ) aStmName = aFormat2; @@ -182,8 +182,8 @@ REF( NMSP_IO::XInputStream ) SAL_CALL XMLExtractor::extract( const REF( NMSP_IO: if( xStream.Is() ) { - SvMemoryStream* pMemStm = new SvMemoryStream( 65535, 65535 ); - ZCodec aCodec; + SvMemoryStream* pMemStm = new SvMemoryStream( 65535, 65535 ); + ZCodec aCodec; aCodec.BeginCompression( ZCODEC_BEST_COMPRESSION ); aCodec.Decompress( *xStream, *pMemStm ); diff --git a/extensions/source/xmlextract/xmxtrct.hxx b/extensions/source/xmlextract/xmxtrct.hxx index 264609b8d6a7..8b972530bd98 100644 --- a/extensions/source/xmlextract/xmxtrct.hxx +++ b/extensions/source/xmlextract/xmxtrct.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -36,20 +36,20 @@ // ---------------- class XMLExtractor : public ::cppu::WeakImplHelper1< NMSP_IO::XXMLExtractor > -{ +{ private: - REF( NMSP_LANG::XMultiServiceFactory ) mxFact; - + REF( NMSP_LANG::XMultiServiceFactory ) mxFact; + XMLExtractor(); - -public: - + +public: + XMLExtractor( const REF( NMSP_LANG::XMultiServiceFactory )& rxMgr ); - virtual ~XMLExtractor(); - - // XXMLExtractor - virtual REF( NMSP_IO::XInputStream ) SAL_CALL extract( const REF( NMSP_IO::XInputStream )& rxIStm ) throw( NMSP_UNO::RuntimeException ); + virtual ~XMLExtractor(); + + // XXMLExtractor + virtual REF( NMSP_IO::XInputStream ) SAL_CALL extract( const REF( NMSP_IO::XInputStream )& rxIStm ) throw( NMSP_UNO::RuntimeException ); }; #endif diff --git a/extensions/source/xmlextract/xmxuno.cxx b/extensions/source/xmlextract/xmxuno.cxx index 7cb63ea4d13c..ac28ccc7e1ad 100644 --- a/extensions/source/xmlextract/xmxuno.cxx +++ b/extensions/source/xmlextract/xmxuno.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -63,7 +63,7 @@ sal_Bool SAL_CALL component_writeInfo( REF( NMSP_REGISTRY::XRegistryKey ) xNewKey( reinterpret_cast< NMSP_REGISTRY::XRegistryKey * >( pRegistryKey )->createKey( NMSP_RTL::OUString( RTL_CONSTASCII_USTRINGPARAM("/com.sun.star.comp.io.XMLExtractor/UNO/SERVICES/com.sun.star.io.XMLExtractor") ) ) ); - + return sal_True; } catch (NMSP_REGISTRY::InvalidRegistryException &) @@ -78,7 +78,7 @@ void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ ) { void * pRet = 0; - + if (rtl_str_compare( pImplName, "com.sun.star.comp.io.XMLExtractor" ) == 0) { NMSP_RTL::OUString aServiceName( B2UCONST( "com.sum.star.io.XMLExtractor" ) ); @@ -88,14 +88,14 @@ void * SAL_CALL component_getFactory( NMSP_RTL::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.io.XMLExtractor") ), create_XMLExtractor, SEQ( NMSP_RTL::OUString )( &aServiceName, 1 ) ) ); - + if (xFactory.is()) { xFactory->acquire(); pRet = xFactory.get(); } } - + return pRet; } } diff --git a/extensions/stardiv/fontest/fontest.idl b/extensions/stardiv/fontest/fontest.idl index c000a5f0470b..85d8916199dc 100644 --- a/extensions/stardiv/fontest/fontest.idl +++ b/extensions/stardiv/fontest/fontest.idl @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/stardiv/oinstchk/oinstchk.idl b/extensions/stardiv/oinstchk/oinstchk.idl index 04b3fbcd8a67..5c1a3b159cdf 100644 --- a/extensions/stardiv/oinstchk/oinstchk.idl +++ b/extensions/stardiv/oinstchk/oinstchk.idl @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/test/ole/AxTestComponents/AxTestComponents.cpp b/extensions/test/ole/AxTestComponents/AxTestComponents.cpp index 283cffd5f0bc..7d82204aa917 100644 --- a/extensions/test/ole/AxTestComponents/AxTestComponents.cpp +++ b/extensions/test/ole/AxTestComponents/AxTestComponents.cpp @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -28,7 +28,7 @@ // Note: Proxy/Stub Information -// To build a separate proxy/stub DLL, +// To build a separate proxy/stub DLL, // run nmake -f AxTestComponentsps.mk in the project directory. #include "stdafx.h" @@ -96,6 +96,6 @@ STDAPI DllUnregisterServer(void) } -//VT_I4 size_t V_ERROR VARIANT VARIANT_FALSE CComVariant FADF_EMBEDDED +//VT_I4 size_t V_ERROR VARIANT VARIANT_FALSE CComVariant FADF_EMBEDDED /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/extensions/test/ole/AxTestComponents/AxTestComponents.idl b/extensions/test/ole/AxTestComponents/AxTestComponents.idl index 707d85f58941..ad8cca5d2928 100644 --- a/extensions/test/ole/AxTestComponents/AxTestComponents.idl +++ b/extensions/test/ole/AxTestComponents/AxTestComponents.idl @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -124,37 +124,37 @@ import "ocidl.idl"; [id(70), helpstring("method inMulDimArrayByte2")] HRESULT inMulDimArrayByte2([in] SAFEARRAY(unsigned char) val); [id(71), helpstring("method outMore")] HRESULT outMore([out]long* val1, [out]long* val2); - [id(72), helpstring("method optional1")] + [id(72), helpstring("method optional1")] HRESULT optional1([in] long val1, [in, optional] VARIANT* val2); - [id(73), helpstring("method optional2")] + [id(73), helpstring("method optional2")] HRESULT optional2([out] long* val1, [out, optional] VARIANT* val2); - [id(74), helpstring("method optional3")] + [id(74), helpstring("method optional3")] HRESULT optional3([in, optional] VARIANT* val1, [in, optional] VARIANT* val2); - [id(75), helpstring("method optional4")] + [id(75), helpstring("method optional4")] HRESULT optional4([in, out, optional] VARIANT* val1, [in, out, optional] VARIANT* val2); - [id(76), helpstring("method optional5")] + [id(76), helpstring("method optional5")] HRESULT optional5([out, optional] VARIANT* val1, [out, optional] VARIANT* val2); //midl creates for val4 a BSTR "4" as default value in the TLB. The midl complains //but the error message seems to be not for this case. //in defaultvalue2 val4 has an VT_I4 in the TLB. This must be a bug! - [id(77), helpstring("method defaultvalue1")] - HRESULT defaultvalue1([in, defaultvalue(1)] long val1, + [id(77), helpstring("method defaultvalue1")] + HRESULT defaultvalue1([in, defaultvalue(1)] long val1, [in, defaultvalue(2)] double* val2, // [in, defaultvalue(3)] VARIANT val3, //ok [in, defaultvalue(4)] VARIANT* val4); // bug im midl: when val3 and val4 are pointers then the generated header cretates // for all params default values: - //HRESULT STDMETHODCALLTYPE defaultvalue2( + //HRESULT STDMETHODCALLTYPE defaultvalue2( // /* [defaultvalue][in] */ long *val1 = 10, // /* [defaultvalue][in] */ double *val2 = 3.14, // /* [defaultvalue][in] */ VARIANT *val3 = 10, // /* [defaultvalue][in] */ VARIANT *val4 = 100) = 0; - // And that does not compile. - //Therefore we must not include the midl generated header, instead use + // And that does not compile. + //Therefore we must not include the midl generated header, instead use // #import to create the interface header - [id(78), helpstring("method defaultvalue2")] - HRESULT defaultvalue2([in, out, defaultvalue(1)]long* val1, + [id(78), helpstring("method defaultvalue2")] + HRESULT defaultvalue2([in, out, defaultvalue(1)]long* val1, [in, out, defaultvalue(2)] double* val2, // [in, out, defaultvalue(3)] VARIANT *val3, [in, out, defaultvalue(4)] VARIANT *val4); @@ -164,7 +164,7 @@ import "ocidl.idl"; [id(80), helpstring("method varargfunc2")] HRESULT varargfunc2([out] long* val1, [out] SAFEARRAY(VARIANT)* val2); - + [id(86), helpstring("method inSequenceByteDim2")] HRESULT inSequenceByteDim2([in] SAFEARRAY(byte) val); [id(87), helpstring("method inCurrency")] HRESULT inCurrency([in] CY val); [id(88), helpstring("method outCurrency")] HRESULT outCurrency([out] CY* val); @@ -195,9 +195,9 @@ import "ocidl.idl"; [propputref, id(107), helpstring("property prprefVariant")] HRESULT prprefVariant([in] VARIANT* newVal); [propget, id(108), helpstring("property prprefDecimal")] HRESULT prprefDecimal([out, retval] DECIMAL* pVal); [propputref, id(108), helpstring("property prprefDecimal")] HRESULT prprefDecimal([in] DECIMAL* newVal); - [id(109), helpstring("method optional6")] HRESULT optional6([in,optional] VARIANT* val1, + [id(109), helpstring("method optional6")] HRESULT optional6([in,optional] VARIANT* val1, [in,optional] VARIANT * val2, [in,optional] VARIANT* val3, [in,optional] VARIANT* val4); - [id(110), helpstring("method optional7")] HRESULT optional7([out,optional] VARIANT* val1, + [id(110), helpstring("method optional7")] HRESULT optional7([out,optional] VARIANT* val1, [out,optional] VARIANT * val2, [out,optional] VARIANT* val3, [out,optional] VARIANT* val4); [propget, id(111), helpstring("property prpMultiArg1")] HRESULT prpMultiArg1([in,out,optional] VARIANT* val1, [in,out,optional] VARIANT* val2, [out, optional, retval] VARIANT* pVal); diff --git a/extensions/test/ole/AxTestComponents/Basic.cpp b/extensions/test/ole/AxTestComponents/Basic.cpp index 4fa950922801..fab6e68f59c0 100644 --- a/extensions/test/ole/AxTestComponents/Basic.cpp +++ b/extensions/test/ole/AxTestComponents/Basic.cpp @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -32,7 +32,7 @@ ///////////////////////////////////////////////////////////////////////////// // CBasic -CBasic::CBasic(): m_cPrpByte(0),m_nPrpShort(0),m_lPrpLong(0),m_fPrpFloat(0), m_dPrpDouble(0),m_PrpArray(0), +CBasic::CBasic(): m_cPrpByte(0),m_nPrpShort(0),m_lPrpLong(0),m_fPrpFloat(0), m_dPrpDouble(0),m_PrpArray(0), m_safearray(NULL), m_bool(VARIANT_FALSE), m_arByte(0), m_arShort(0), m_arLong(0), m_arString(0), m_arVariant(0), m_arFloat(0), m_arDouble(0), m_arObject(0), m_arByteDim2(0), m_date(0.), m_scode(0) @@ -103,7 +103,7 @@ STDMETHODIMP CBasic::inDouble(double val) STDMETHODIMP CBasic::inVariant(VARIANT val) { - m_var1 = val; + m_var1 = val; return S_OK; } @@ -210,7 +210,7 @@ STDMETHODIMP CBasic::inoutArray(LPSAFEARRAY *val) STDMETHODIMP CBasic::inoutObject(IDispatch **val) { - CComPtr<IDispatch> disp = *val; + CComPtr<IDispatch> disp = *val; if (*val) (*val)->Release(); *val = m_obj; @@ -284,7 +284,7 @@ STDMETHODIMP CBasic::outObject(IDispatch* *val) *val = m_obj; if (m_obj) (*val)->AddRef(); - + return S_OK; } @@ -439,7 +439,7 @@ STDMETHODIMP CBasic::put_prpObject(IDispatch *newVal) return S_OK; } -STDMETHODIMP CBasic::mixed1( +STDMETHODIMP CBasic::mixed1( /* [out][in] */ unsigned char *aChar, /* [out][in] */ float *aFloat, /* [out][in] */ VARIANT *aVar) @@ -537,13 +537,13 @@ void CBasic::printArray( LPSAFEARRAY val, BSTR message, VARTYPE type) hr= SafeArrayGetLBound( val, 1, &lbound); hr= SafeArrayGetUBound( val, 1, &ubound); long length= ubound - lbound +1; - + CComVariant varElement; char buf[1024]; sprintf( buf,"%s", W2A(message)); for( long i= 0; i < length ; i++) - { + { char tmp[1024]; long data=0; CComVariant var; @@ -573,7 +573,7 @@ void CBasic::printArray( LPSAFEARRAY val, BSTR message, VARTYPE type) sprintf( tmp, "%f \n", *(double*) &data); break; case VT_DISPATCH: - // we assume the objects are instances of this component and have the + // we assume the objects are instances of this component and have the // property prpString set. hr= SafeArrayGetElement( val, &i, (void*)&data); IDispatch* pdisp= ( IDispatch*) data; @@ -590,8 +590,8 @@ void CBasic::printArray( LPSAFEARRAY val, BSTR message, VARTYPE type) strcat( buf, tmp); } - MessageBox( NULL, _T(A2T(buf)), _T("AxTestComponents.Basic"), MB_OK); - + MessageBox( NULL, _T(A2T(buf)), _T("AxTestComponents.Basic"), MB_OK); + } // V_ERROR OLECHAR VARIANT VT_UI1 @@ -765,7 +765,7 @@ STDMETHODIMP CBasic::inMulDimArrayByte(LPSAFEARRAY val) // 3-dimensionales array STDMETHODIMP CBasic::inMulDimArrayByte2(LPSAFEARRAY val) { - + // TODO: Add your implementation code here //printMulArray( val, VT_UI1); return S_OK; @@ -829,7 +829,7 @@ void CBasic::printMulArray( SAFEARRAY* val, VARTYPE type) } - + } else if( dims == 3 ) { @@ -921,12 +921,12 @@ STDMETHODIMP CBasic::optional3(/*[in, optional]*/ VARIANT* val1,/*[in, optional] { //if (val1->vt != VT_ERROR) m_var1 = *val1; - + //if (val2->vt != VT_ERROR) m_var2 = *val2; return S_OK; } - + STDMETHODIMP CBasic::optional4(/*[in, out, optional]*/ VARIANT* val1, /*[in, out, optional]*/ VARIANT* val2) { @@ -967,7 +967,7 @@ STDMETHODIMP CBasic::defaultvalue1(/*[in, defaultvalue(10)]*/ long val1, { m_long = val1; m_double = *val2; -// m_var1 = val3; +// m_var1 = val3; m_var2 = *val4; return S_OK; } @@ -979,17 +979,17 @@ STDMETHODIMP CBasic::defaultvalue2(/*[in, out, defaultvalue(10)]*/ long* val1, HRESULT hr = S_OK; long aLong = *val1; double aDouble = *val2; -// CComVariant var1(*val3); +// CComVariant var1(*val3); CComVariant var2(*val4); *val1 = m_long; *val2 = m_double; //if (FAILED(hr = VariantCopy(val3, &m_var1))) - // return hr; + // return hr; if (FAILED(hr = VariantCopy(val4, &m_var2))) return hr; m_long = aLong; m_double = aDouble; -// m_var1 = var1; +// m_var1 = var1; m_var2 = var2; return hr; } @@ -1006,7 +1006,7 @@ STDMETHODIMP CBasic::varargfunc1(/*[in]*/ long val1,/*[in]*/ LPSAFEARRAY val2) if (FAILED(hr = SafeArrayCopy(val2, & m_safearray))) { if (hr != E_INVALIDARG) - return hr; + return hr; } return S_OK; } @@ -1187,7 +1187,7 @@ STDMETHODIMP CBasic::get_prpRefLong(long* pVal) STDMETHODIMP CBasic::putref_prpRefLong(long* newVal) { - m_long = * newVal; + m_long = * newVal; return S_OK; } @@ -1242,7 +1242,7 @@ STDMETHODIMP CBasic::optional7(VARIANT* val1, VARIANT* val2, VARIANT* val3, VARI return hr; if (FAILED(hr = VariantCopy(val4, & m_var4))) return hr; - + return S_OK; } diff --git a/extensions/test/ole/AxTestComponents/Basic.h b/extensions/test/ole/AxTestComponents/Basic.h index 08d63062f13b..eb67ce8bbb21 100644 --- a/extensions/test/ole/AxTestComponents/Basic.h +++ b/extensions/test/ole/AxTestComponents/Basic.h @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -35,7 +35,7 @@ ///////////////////////////////////////////////////////////////////////////// // CBasic -class ATL_NO_VTABLE CBasic : +class ATL_NO_VTABLE CBasic : public CComObjectRootEx<CComSingleThreadModel>, public CComCoClass<CBasic, &CLSID_Basic>, public IDispatchImpl<IBasic, &IID_IBasic, &LIBID_AXTESTCOMPONENTSLib> @@ -54,7 +54,7 @@ public: END_COM_MAP() // IBasic -public: +public: STDMETHOD(outMore)(/*[out]*/long* val1, /*[out]*/long* val2); STDMETHOD(inMulDimArrayByte2)(LPSAFEARRAY val); STDMETHOD(inMulDimArrayByte)(LPSAFEARRAY val); @@ -83,7 +83,7 @@ public: STDMETHOD(inSequenceShort)(LPSAFEARRAY ar); STDMETHOD(inSequenceByte)(LPSAFEARRAY ar); STDMETHOD(inSequenceLong)(LPSAFEARRAY ar); - STDMETHOD(mixed1)( + STDMETHOD(mixed1)( /* [out][in] */ unsigned char *aChar, /* [out][in] */ float *aFloat, /* [out][in] */ VARIANT *aVar); diff --git a/extensions/test/ole/AxTestComponents/Foo.cpp b/extensions/test/ole/AxTestComponents/Foo.cpp index 6d6ae3b7a0bd..6eacea7727be 100644 --- a/extensions/test/ole/AxTestComponents/Foo.cpp +++ b/extensions/test/ole/AxTestComponents/Foo.cpp @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/test/ole/AxTestComponents/Foo.h b/extensions/test/ole/AxTestComponents/Foo.h index 375d09878fa9..a4024ea01a7a 100644 --- a/extensions/test/ole/AxTestComponents/Foo.h +++ b/extensions/test/ole/AxTestComponents/Foo.h @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -35,12 +35,12 @@ ///////////////////////////////////////////////////////////////////////////// // CBasic -class ATL_NO_VTABLE CFoo : +class ATL_NO_VTABLE CFoo : public CComObjectRootEx<CComSingleThreadModel>, public CComCoClass<CFoo, &CLSID_Foo>, public IFoo -// public IDispatchImpl<IFoo, &__uuidof(IFoo), &LIBID_AXTESTCOMPONENTSLib, /* wMajor = */ 1, /* wMinor = */ 0> +// public IDispatchImpl<IFoo, &__uuidof(IFoo), &LIBID_AXTESTCOMPONENTSLib, /* wMajor = */ 1, /* wMinor = */ 0> { public: CFoo(); diff --git a/extensions/test/ole/AxTestComponents/StdAfx.cpp b/extensions/test/ole/AxTestComponents/StdAfx.cpp index 36dc86fc2eba..d881698b27d3 100644 --- a/extensions/test/ole/AxTestComponents/StdAfx.cpp +++ b/extensions/test/ole/AxTestComponents/StdAfx.cpp @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/test/ole/AxTestComponents/StdAfx.h b/extensions/test/ole/AxTestComponents/StdAfx.h index ab7782f42659..a46eeeb618af 100644 --- a/extensions/test/ole/AxTestComponents/StdAfx.h +++ b/extensions/test/ole/AxTestComponents/StdAfx.h @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/test/ole/AxTestComponents/resource.h b/extensions/test/ole/AxTestComponents/resource.h index a3c9b0c20f46..b926189183ec 100644 --- a/extensions/test/ole/AxTestComponents/resource.h +++ b/extensions/test/ole/AxTestComponents/resource.h @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -34,7 +34,7 @@ //#define IDR_FOO 501 // Next default values for new objects -// +// #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 201 diff --git a/extensions/test/ole/EventListenerSample/EventListener/EventListener.cpp b/extensions/test/ole/EventListenerSample/EventListener/EventListener.cpp index 768f9ec29b68..9512ec4c2372 100644 --- a/extensions/test/ole/EventListenerSample/EventListener/EventListener.cpp +++ b/extensions/test/ole/EventListenerSample/EventListener/EventListener.cpp @@ -3,7 +3,7 @@ // Note: Proxy/Stub Information -// To build a separate proxy/stub DLL, +// To build a separate proxy/stub DLL, // run nmake -f EventListenerps.mk in the project directory. #include "stdafx.h" diff --git a/extensions/test/ole/EventListenerSample/EventListener/EvtListener.h b/extensions/test/ole/EventListenerSample/EventListener/EvtListener.h index 24552b9a9641..2bc0a6a9aef9 100644 --- a/extensions/test/ole/EventListenerSample/EventListener/EvtListener.h +++ b/extensions/test/ole/EventListenerSample/EventListener/EvtListener.h @@ -8,7 +8,7 @@ ///////////////////////////////////////////////////////////////////////////// // CEvtListener -class ATL_NO_VTABLE CEvtListener : +class ATL_NO_VTABLE CEvtListener : public CComObjectRootEx<CComSingleThreadModel>, public CComCoClass<CEvtListener, &CLSID_EvtListener>, public IDispatchImpl<IEvtListener, &IID_IEvtListener, &LIBID_EVENTLISTENERLib> diff --git a/extensions/test/ole/EventListenerSample/EventListener/resource.h b/extensions/test/ole/EventListenerSample/EventListener/resource.h index fef53bef1f1f..70bf51a6f1ff 100644 --- a/extensions/test/ole/EventListenerSample/EventListener/resource.h +++ b/extensions/test/ole/EventListenerSample/EventListener/resource.h @@ -7,7 +7,7 @@ #define IDR_EVTLISTENER 101 // Next default values for new objects -// +// #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 201 diff --git a/extensions/test/ole/MfcControl/MfcControlCtl.cpp b/extensions/test/ole/MfcControl/MfcControlCtl.cpp index 9aab5e79a3ac..399fb5db95c2 100644 --- a/extensions/test/ole/MfcControl/MfcControlCtl.cpp +++ b/extensions/test/ole/MfcControl/MfcControlCtl.cpp @@ -196,7 +196,7 @@ void CMfcControlCtrl::OnResetState() // CMfcControlCtrl message handlers -short CMfcControlCtrl::inShort(short val) +short CMfcControlCtrl::inShort(short val) { char buf[256]; sprintf( buf, "inByte: value= %d", val); @@ -204,7 +204,7 @@ short CMfcControlCtrl::inShort(short val) return val+1; } -long CMfcControlCtrl::inLong(long val) +long CMfcControlCtrl::inLong(long val) { char buf[256]; sprintf( buf, "inLong: value= %d", val); @@ -212,7 +212,7 @@ long CMfcControlCtrl::inLong(long val) return val+1; } -BSTR CMfcControlCtrl::inString(BSTR* val) +BSTR CMfcControlCtrl::inString(BSTR* val) { CString strResult; strResult= *val; @@ -223,7 +223,7 @@ BSTR CMfcControlCtrl::inString(BSTR* val) return strResult.AllocSysString(); } -float CMfcControlCtrl::inFloat(float val) +float CMfcControlCtrl::inFloat(float val) { char buf[256]; sprintf( buf, "inFloat: value= %f", val); @@ -231,7 +231,7 @@ float CMfcControlCtrl::inFloat(float val) return val+1; } -double CMfcControlCtrl::inDouble(double val) +double CMfcControlCtrl::inDouble(double val) { char buf[256]; sprintf( buf, "inDouble: value= %g", val); @@ -239,7 +239,7 @@ double CMfcControlCtrl::inDouble(double val) return val+1; } -VARIANT CMfcControlCtrl::inVariant(const VARIANT FAR& val) +VARIANT CMfcControlCtrl::inVariant(const VARIANT FAR& val) { VARIANT vaResult; VariantInit(&vaResult); @@ -254,7 +254,7 @@ VARIANT CMfcControlCtrl::inVariant(const VARIANT FAR& val) return _variant_t( L" a string from CMfcControlCtrl::inVariant"); } -LPDISPATCH CMfcControlCtrl::inObject(LPDISPATCH val) +LPDISPATCH CMfcControlCtrl::inObject(LPDISPATCH val) { char buf[256]; _bstr_t bstr; @@ -278,47 +278,47 @@ LPDISPATCH CMfcControlCtrl::inObject(LPDISPATCH val) } -void CMfcControlCtrl::outShort(short* val) +void CMfcControlCtrl::outShort(short* val) { *val= 123; } -void CMfcControlCtrl::outLong(long* val) +void CMfcControlCtrl::outLong(long* val) { *val= 1234; } -void CMfcControlCtrl::outString(BSTR FAR* val) +void CMfcControlCtrl::outString(BSTR FAR* val) { - *val= SysAllocString(L"A string from CMfcControlCtrl::outString "); + *val= SysAllocString(L"A string from CMfcControlCtrl::outString "); } -void CMfcControlCtrl::outFloat(float* val) +void CMfcControlCtrl::outFloat(float* val) { *val= 3.14f; } -void CMfcControlCtrl::outDouble(double* val) +void CMfcControlCtrl::outDouble(double* val) { *val= 3.145; } -void CMfcControlCtrl::outVariant(VARIANT FAR* val) +void CMfcControlCtrl::outVariant(VARIANT FAR* val) { VariantInit( val); val->vt= VT_BSTR; val->bstrVal= SysAllocString( L"a string in a VARIANT"); } -void CMfcControlCtrl::outObject(LPDISPATCH FAR* val) +void CMfcControlCtrl::outObject(LPDISPATCH FAR* val) { //{BFE10EBE-8584-11D4-005004526AB4} HRESULT hr= S_OK; CLSID clsTestControl; - hr= CLSIDFromProgID( L"AxTestComponents.Basic", &clsTestControl); + hr= CLSIDFromProgID( L"AxTestComponents.Basic", &clsTestControl); IDispatch* pDisp= NULL; - hr= CoCreateInstance( clsTestControl, NULL, CLSCTX_ALL, __uuidof(IDispatch), (void**)&pDisp); + hr= CoCreateInstance( clsTestControl, NULL, CLSCTX_ALL, __uuidof(IDispatch), (void**)&pDisp); if( SUCCEEDED( hr) && val) { diff --git a/extensions/test/ole/MfcControl/MfcControlCtl.h b/extensions/test/ole/MfcControl/MfcControlCtl.h index ea06425a3fcd..f6d4379658b9 100644 --- a/extensions/test/ole/MfcControl/MfcControlCtl.h +++ b/extensions/test/ole/MfcControl/MfcControlCtl.h @@ -35,7 +35,7 @@ protected: DECLARE_OLECREATE_EX(CMfcControlCtrl) // Class factory and guid DECLARE_OLETYPELIB(CMfcControlCtrl) // GetTypeInfo DECLARE_PROPPAGEIDS(CMfcControlCtrl) // Property page IDs - DECLARE_OLECTLTYPE(CMfcControlCtrl) // Type name and misc status + DECLARE_OLECTLTYPE(CMfcControlCtrl) // Type name and misc status // Message maps //{{AFX_MSG(CMfcControlCtrl) diff --git a/extensions/test/ole/MfcControl/StdAfx.h b/extensions/test/ole/MfcControl/StdAfx.h index b0a8f50346c7..4df599c412e3 100644 --- a/extensions/test/ole/MfcControl/StdAfx.h +++ b/extensions/test/ole/MfcControl/StdAfx.h @@ -10,19 +10,19 @@ // or project specific include files that are used frequently, // but are changed infrequently -#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers #include <afxctl.h> // MFC support for ActiveX Controls #include <afxext.h> // MFC extensions -#include <afxdtctl.h> // MFC support for Internet Explorer 4 Comon Controls +#include <afxdtctl.h> // MFC support for Internet Explorer 4 Comon Controls #ifndef _AFX_NO_AFXCMN_SUPPORT -#include <afxcmn.h> // MFC support for Windows Common Controls +#include <afxcmn.h> // MFC support for Windows Common Controls #endif // _AFX_NO_AFXCMN_SUPPORT // Delete the two includes below if you do not wish to use the MFC // database classes -#include <afxdb.h> // MFC database classes -#include <afxdao.h> // MFC DAO database classes +#include <afxdb.h> // MFC database classes +#include <afxdao.h> // MFC DAO database classes //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. diff --git a/extensions/test/ole/OleClient/axhost.cxx b/extensions/test/ole/OleClient/axhost.cxx index 5c96023af26c..93d5721b3b49 100644 --- a/extensions/test/ole/OleClient/axhost.cxx +++ b/extensions/test/ole/OleClient/axhost.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/test/ole/OleClient/axhost.hxx b/extensions/test/ole/OleClient/axhost.hxx index 9857eaa8e28d..88b870f849c5 100644 --- a/extensions/test/ole/OleClient/axhost.hxx +++ b/extensions/test/ole/OleClient/axhost.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -35,7 +35,7 @@ extern CComModule _Module; #include <atlhost.h> -class HostWin: public CWindowImpl<HostWin, CWindow, +class HostWin: public CWindowImpl<HostWin, CWindow, CWinTraits< WS_CAPTION|WS_POPUPWINDOW|WS_VISIBLE, 0> > { CComBSTR controlName; diff --git a/extensions/test/ole/OleClient/clientTest.cxx b/extensions/test/ole/OleClient/clientTest.cxx index 684644e47cec..4a79eead82df 100644 --- a/extensions/test/ole/OleClient/clientTest.cxx +++ b/extensions/test/ole/OleClient/clientTest.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -92,7 +92,7 @@ extern "C" int __cdecl main( int , char **) return -1; } - + _Module.Init( ObjectMap, GetModuleHandle( NULL)); if( FAILED(hr=doTest())) @@ -152,17 +152,17 @@ bool doParameterTest(const Reference<XInvocation> & inv) Sequence<Any> seqNamed5(arArgs, 1); arArgs[0] <<= arg2; Sequence<Any> seqNamed6(arArgs, 1); - + arArgs[0] <<= (sal_Int32) 123; arArgs[1] <<= (sal_Int32) 456; Sequence<Any> seqPositional(arArgs, 2); arArgs[0] <<= (sal_Int32) 123; Sequence<Any> seqPositional2(arArgs, 1); - + arArgs[0] <<= Any(); arArgs[1] <<= Any(); Sequence<Any> seqPositional3(arArgs, 2); - + arArgs[0] <<= (sal_Int32) 123; arArgs[1] <<= SCode(DISP_E_PARAMNOTFOUND); Sequence<Any> seqOutOpt1(arArgs, 2); @@ -180,7 +180,7 @@ bool doParameterTest(const Reference<XInvocation> & inv) arArgs1[2] <<= (sal_Int32) 0; arArgs1[3] <<= (sal_Int32) 0; Sequence<Any> seqMix0(arArgs1, 4); - + arArgs1[0] <<= (sal_Int32) 123; arArgs1[1] <<= (sal_Int32) 456; arArgs1[2] <<= arg3; @@ -215,7 +215,7 @@ bool doParameterTest(const Reference<XInvocation> & inv) inv->invoke(OUString(L"optional5"), seqPositional, seqIndices, seqOut); if ( ! checkOutArgs(seqOut, seqIndices, seqPositional)) return false; - + //2 optional args, 1 provided seqIndices.realloc(0); seqOut.realloc(0); @@ -241,7 +241,7 @@ bool doParameterTest(const Reference<XInvocation> & inv) inv->invoke(OUString(L"optional5"), seqPositional3, seqIndices, seqOut); if ( ! checkOutArgs(seqOut, seqIndices, seqOutOpt2)) return false; - + //named args -------------------------------------------- // 2 named args, correct position @@ -289,7 +289,7 @@ bool doParameterTest(const Reference<XInvocation> & inv) inv->invoke(OUString(L"optional5"), seqNamed4, seqIndices, seqOut); if ( ! checkOutArgs(seqOut, seqIndices, seqNamed2 )) return false; - + //2 args, 1 provided (correct order) seqIndices.realloc(0); @@ -351,8 +351,8 @@ bool doParameterTest(const Reference<XInvocation> & inv) inv->invoke(OUString(L"optional7"), seqMix2Out, seqIndices, seqOut); if ( ! checkOutArgs(seqOut, seqIndices, seqMix2Out)) return false; - - + + return true; } bool doPropertyTest(const Reference<XInvocation> & inv) @@ -379,7 +379,7 @@ bool doPropertyTest(const Reference<XInvocation> & inv) Any inrefDecimal, outrefDecimal; Any inParamsLong, outParamsLong; Reference<XInterface> xintUnknown(getComObject(L"AxTestComponents.Foo")); - + inBool <<= (sal_Bool) sal_True; inv->setValue(OUString(L"prpBool"), inBool); outBool = inv->getValue(OUString(L"prpBool")); @@ -393,7 +393,7 @@ bool doPropertyTest(const Reference<XInvocation> & inv) outShort = inv->getValue(OUString(L"prpShort")); inLong <<= ( sal_Int32) 1234567; - inv->setValue(OUString(L"prpLong"), inLong // TODO: Add your implementation code here + inv->setValue(OUString(L"prpLong"), inLong // TODO: Add your implementation code here ); outLong = inv->getValue(OUString(L"prpLong")); @@ -420,7 +420,7 @@ bool doPropertyTest(const Reference<XInvocation> & inv) inUnknown <<= xintUnknown; inv->setValue(OUString(L"prpUnknown"), inUnknown); outUnknown = inv->getValue(OUString(L"prpUnknown")); - + Currency cur(99999); inCY <<= cur; inv->setValue(OUString(L"prpCurrency"), inCY); @@ -444,7 +444,7 @@ bool doPropertyTest(const Reference<XInvocation> & inv) inrefLong <<= (sal_Int32) 123456; inv->setValue(OUString(L"prprefLong"), inrefLong); outrefLong = inv->getValue(OUString(L"prprefLong")); - + inrefVariant <<= OUString(L"A string in an any"); inv->setValue(OUString(L"prprefVariant"), inrefVariant); outrefVariant = inv->getValue(OUString(L"prprefVariant")); @@ -456,7 +456,7 @@ bool doPropertyTest(const Reference<XInvocation> & inv) if (inBool != outBool || inByte != outByte || inShort != outShort || inLong != outLong || inFloat != outFloat || inDouble != outDouble || inString != outString - || inVariant != outVariant || inObject != outObject + || inVariant != outVariant || inObject != outObject || inUnknown != outUnknown || inCY != outCY || inDate != outDate || inDecimal != outDecimal || inSCode != outSCode || inrefLong != outrefLong ||inrefVariant != outrefVariant @@ -486,7 +486,7 @@ bool doPropertyWithArgumentTest(const Reference<XInvocation> & inv) Sequence<Any> seqMultiArgPut2(arMultiArgs, 2); arMultiArgs[0] <<= NamedArgument(OUString(L"val2"), makeAny((sal_Int32) 1)); - arMultiArgs[1] <<= PropertyPutArgument(makeAny((sal_Int32) 3)); + arMultiArgs[1] <<= PropertyPutArgument(makeAny((sal_Int32) 3)); Sequence<Any> seqMultiArgPut3(arMultiArgs, 2); arMultiArgs[0] <<= NamedArgument(OUString(L"val2"), makeAny((sal_Int32) 1)); @@ -501,12 +501,12 @@ bool doPropertyWithArgumentTest(const Reference<XInvocation> & inv) arMultiArgs[1] <<= makeAny((sal_Int32) 2); Sequence<Any> seqMultiArgGet1(arMultiArgs, 2); Sequence<Any> seqMultiArgGet2(arMultiArgs, 1); - + arMultiArgs[0] <<= makeAny((sal_Int32) 0); arMultiArgs[1] <<= PropertyPutArgument(makeAny((sal_Int32) 0)); Sequence<Any> seqMultiArgPut5(arMultiArgs, 2); - + arMultiArgs[0] <<= makeAny((sal_Int32) 1); arMultiArgs[1] <<= PropertyPutArgument(makeAny((sal_Int32) 2)); Sequence<Any> seqMultiArgPut6(arMultiArgs, 2); @@ -518,7 +518,7 @@ bool doPropertyWithArgumentTest(const Reference<XInvocation> & inv) arMultiArgs[0] = makeAny((sal_Int32) 0); arMultiArgs[1] = makeAny((sal_Int32) 0); Sequence<Any> seqMultiVoid2(arMultiArgs, 2); - + //[propput, ...] HRESULT prpMultiArg1([in,out,optional] VARIANT* val1, [in,out,optional] VARIANT* val2, [in] VARIANT* newVal); //[propget, ...] HRESULT prpMultiArg1([in,out,optional] VARIANT* val1, [in,out,optional] VARIANT* val2, [out, optional, retval] VARIANT* pVal); seqIndices.realloc( 0); @@ -552,7 +552,7 @@ bool doPropertyWithArgumentTest(const Reference<XInvocation> & inv) arMultiArgs[0] = makeAny((sal_Int32) 1); arMultiArgs[1] = makeAny((SCode(DISP_E_PARAMNOTFOUND))); - + if (anyRet != ((PropertyPutArgument const *) seqMultiArgPut2[1].getValue())->Value || ! checkOutArgs(seqOut, seqIndices, Sequence<Any>(arMultiArgs, 2))) { @@ -617,7 +617,7 @@ bool doPropertyWithArgumentTest(const Reference<XInvocation> & inv) if ( anyRet != ((PropertyPutArgument const*) seqMultiArgPut6[1].getValue())->Value || !checkOutArgs(seqOut, seqIndices, seqMultiArgGet2)) return false; - + //hasProperty, hasMethod if (inv->hasProperty(OUSTR("prpMultiArg1"))) @@ -631,7 +631,7 @@ bool doPropertyWithArgumentTest(const Reference<XInvocation> & inv) if ( ! inv->hasMethod(OUSTR("inLong"))) return false; - return true; + return true; } bool doSimpleTest(const Reference<XInvocation> & inv) { @@ -656,9 +656,9 @@ bool doSimpleTest(const Reference<XInvocation> & inv) Any inrefVariant, outrefVariant; Any inrefDecimal, outrefDecimal; - Reference<XInterface> xIntFoo(getComObject(L"AxTestComponents.Foo")); + Reference<XInterface> xIntFoo(getComObject(L"AxTestComponents.Foo")); //################################################################################### - // in and out parameter + // in and out parameter //################################################################################### sal_Bool aBool = sal_True; inBool.setValue(&aBool, getCppuBooleanType()); @@ -746,7 +746,7 @@ bool doSimpleTest(const Reference<XInvocation> & inv) seqOut.realloc(0); inv->invoke(OUString(L"outDate"), Sequence< Any > (& outDate, 1), seqIndices, seqOut); outDate <<= seqOut[0]; - + Decimal dec(3, 0, 0xffffffff, 0xffffffff, 0xfffffff0); inDecimal <<= dec; inv->invoke(OUString(L"inDecimal"), Sequence<Any>( & inDecimal, 1), seqIndices, seqOut); @@ -765,12 +765,12 @@ bool doSimpleTest(const Reference<XInvocation> & inv) if (inBool != outBool || inByte != outByte || inShort != outShort || inLong != outLong || inFloat != outFloat || inDouble != outDouble || inString != outString - || inVariant != outVariant || inObject != outObject || inUnknown != outUnknown + || inVariant != outVariant || inObject != outObject || inUnknown != outUnknown || inCY != outCY || inDate != outDate || inDecimal != outDecimal || inSCode != outSCode) return false; //################################################################################### - // in/out parameter + // in/out parameter //################################################################################### outBool = Any(); seqIndices.realloc( 0); @@ -783,7 +783,7 @@ bool doSimpleTest(const Reference<XInvocation> & inv) seqOut.realloc(0); inv->invoke(OUString(L"inoutByte"), Sequence< Any > ( & inByte, 1), seqIndices, seqOut); outByte <<= seqOut[0]; - + outShort = Any(); seqIndices.realloc( 0); seqOut.realloc(0); @@ -801,7 +801,7 @@ bool doSimpleTest(const Reference<XInvocation> & inv) seqOut.realloc(0); inv->invoke(OUString(L"inoutString"), Sequence< Any > ( & inString, 1), seqIndices, seqOut); outString <<= seqOut[0]; - + outFloat = Any(); seqIndices.realloc( 0); seqOut.realloc(0); @@ -837,7 +837,7 @@ bool doSimpleTest(const Reference<XInvocation> & inv) seqOut.realloc(0); inv->invoke(OUString(L"inoutDate"), Sequence< Any > ( & inDate, 1), seqIndices, seqOut); outDate <<= seqOut[0]; - + outDecimal = Any(); seqIndices.realloc( 0); seqOut.realloc(0); @@ -857,7 +857,7 @@ bool doSimpleTest(const Reference<XInvocation> & inv) return false; //################################################################################### - // in byref parameters + // in byref parameters //################################################################################### inrefLong <<= (sal_Int32) 1234; @@ -866,7 +866,7 @@ bool doSimpleTest(const Reference<XInvocation> & inv) seqOut.realloc(0); inv->invoke(OUString(L"outLong"), Sequence< Any > (& outrefLong, 1), seqIndices, seqOut); outrefLong <<= seqOut[0]; - + inrefVariant <<= OUString(L" A string in an any"); inv->invoke(OUString(L"inrefVariant"), Sequence< Any > ( & inrefVariant, 1), seqIndices, seqOut); seqIndices.realloc( 0); @@ -888,7 +888,7 @@ bool doSimpleTest(const Reference<XInvocation> & inv) //################################################################################### - // mixed parameter + // mixed parameter //################################################################################### // mixed1 seqIndices.realloc( 0); @@ -898,7 +898,7 @@ bool doSimpleTest(const Reference<XInvocation> & inv) param[1] = inFloat; param[2] = inVariant; inv->invoke(OUString(L"mixed1"), Sequence< Any >(param, 3), seqIndices, seqOut); - + if (seqOut.getLength() != 3 || inByte != seqOut[0] || inFloat != seqOut[1] || inVariant != seqOut[2]) return false; @@ -911,7 +911,7 @@ bool doSimpleSequenceTest(const Reference<XInvocation> & inv) Sequence<sal_Int16> seqIndices; Sequence<Any> seqOut; Any voidAny; - Any inArAny; + Any inArAny; Any outArray; Any inArBool, outArBool; Any inArByte, outArByte; @@ -935,7 +935,7 @@ bool doSimpleSequenceTest(const Reference<XInvocation> & inv) Sequence<Any> seq_1( arAnyStrTmp, 3); inArAny <<= seq_1; //################################################################################### - // in, out Sequences + // in, out Sequences //################################################################################### //Test sequence containing Anys of Strings inv->invoke(OUString(L"inArray"), Sequence< Any > ( & inArAny, 1), seqIndices, seqOut); @@ -954,7 +954,7 @@ bool doSimpleSequenceTest(const Reference<XInvocation> & inv) sal_Int8 arByte[]={1,2,3}; Sequence<sal_Int8> seqByte(arByte, 3); inArByte <<= seqByte; - inv->invoke(OUString(L"inSequenceByte"),Sequence<Any>( & inArByte, 1), seqIndices, seqOut); + inv->invoke(OUString(L"inSequenceByte"),Sequence<Any>( & inArByte, 1), seqIndices, seqOut); seqIndices.realloc(0); seqOut.realloc(0); inv->invoke(OUString(L"outSequenceByte"), Sequence< Any >( & voidAny, 1), seqIndices, seqOut); @@ -963,7 +963,7 @@ bool doSimpleSequenceTest(const Reference<XInvocation> & inv) sal_Int16 arShort[]={4,5,6}; Sequence<sal_Int16> seqShort(arShort, 3); inArShort<<= seqShort; - inv->invoke(OUString(L"inSequenceShort"),Sequence< Any >( & inArShort, 1), seqIndices, seqOut); + inv->invoke(OUString(L"inSequenceShort"),Sequence< Any >( & inArShort, 1), seqIndices, seqOut); seqIndices.realloc(0); seqOut.realloc(0); inv->invoke(OUString(L"outSequenceShort"), Sequence< Any >( & voidAny, 1), seqIndices, seqOut); @@ -972,19 +972,19 @@ bool doSimpleSequenceTest(const Reference<XInvocation> & inv) sal_Int32 arLong[] = {7,8,9}; Sequence<sal_Int32> seqLong(arLong, 3); inArLong <<= seqLong; - inv->invoke(OUString(L"inSequenceLong"),Sequence< Any > ( & inArLong, 1), seqIndices, seqOut); + inv->invoke(OUString(L"inSequenceLong"),Sequence< Any > ( & inArLong, 1), seqIndices, seqOut); seqIndices.realloc(0); seqOut.realloc(0); inv->invoke(OUString(L"outSequenceLong"), Sequence< Any >( & voidAny, 1), seqIndices, seqOut); outArLong <<= seqOut[0]; - inv->invoke(OUString(L"inSequenceLong"),Sequence< Any > ( & inArLong, 1), seqIndices, seqOut); + inv->invoke(OUString(L"inSequenceLong"),Sequence< Any > ( & inArLong, 1), seqIndices, seqOut); seqIndices.realloc(0); seqOut.realloc(0); inv->invoke(OUString(L"outSequenceLong"), Sequence< Any >( & voidAny, 1), seqIndices, seqOut); outArLong <<= seqOut[0]; - inv->invoke( OUString(L"inSequenceString"),Sequence< Any > ( & inArString, 1), seqIndices, seqOut); + inv->invoke( OUString(L"inSequenceString"),Sequence< Any > ( & inArString, 1), seqIndices, seqOut); seqIndices.realloc(0); seqOut.realloc(0); inv->invoke(OUString(L"outSequenceString"), Sequence< Any >( & voidAny, 1), seqIndices, seqOut); @@ -993,7 +993,7 @@ bool doSimpleSequenceTest(const Reference<XInvocation> & inv) float arFloat[]={3.14f, 31.4f, 314.f}; Sequence<float> seqFloat( arFloat, 3); inArFloat <<= seqFloat; - inv->invoke( OUString(L"inSequenceFloat"),Sequence< Any > ( & inArFloat, 1), seqIndices, seqOut); + inv->invoke( OUString(L"inSequenceFloat"),Sequence< Any > ( & inArFloat, 1), seqIndices, seqOut); seqIndices.realloc(0); seqOut.realloc(0); inv->invoke(OUString(L"outSequenceFloat"), Sequence< Any >( & voidAny, 1), seqIndices, seqOut); @@ -1002,30 +1002,30 @@ bool doSimpleSequenceTest(const Reference<XInvocation> & inv) double arDouble[]={3.145, 31.45, 3145.}; Sequence<double> seqDouble( arDouble, 3); inArDouble <<= seqDouble; - inv->invoke(OUString(L"inSequenceDouble"),Sequence< Any >( & inArDouble, 1), seqIndices, seqOut); + inv->invoke(OUString(L"inSequenceDouble"),Sequence< Any >( & inArDouble, 1), seqIndices, seqOut); seqIndices.realloc(0); seqOut.realloc(0); inv->invoke(OUString(L"outSequenceDouble"), Sequence< Any >( & voidAny, 1), seqIndices, seqOut); outArDouble <<= seqOut[0]; Sequence<Reference<XInvocation> > seqObj(2); - seqObj[0]= getComObject(L"AxTestComponents.Basic"); - seqObj[1]= getComObject(L"AxTestComponents.Basic"); + seqObj[0]= getComObject(L"AxTestComponents.Basic"); + seqObj[1]= getComObject(L"AxTestComponents.Basic"); inArObject <<= seqObj; - inv->invoke(OUString(L"inSequenceObject"),Sequence< Any >( & inArObject, 1), seqIndices, seqOut); + inv->invoke(OUString(L"inSequenceObject"),Sequence< Any >( & inArObject, 1), seqIndices, seqOut); seqIndices.realloc(0); seqOut.realloc(0); inv->invoke(OUString(L"outSequenceObject"), Sequence< Any >( & voidAny, 1), seqIndices, seqOut); outArObject <<= seqOut[0]; - - if ( ! equalSequences(inArByte, outArByte) || ! equalSequences(inArShort, outArShort) + + if ( ! equalSequences(inArByte, outArByte) || ! equalSequences(inArShort, outArShort) || ! equalSequences(inArLong, outArLong) || ! equalSequences(inArString, outArray) || ! equalSequences(inArFloat, outArFloat) || ! equalSequences(inArDouble, outArDouble) || ! equalSequences(inArString, outArString) || ! equalSequences(inArObject, outArObject)) return false; //################################################################################### - // in/out Sequences + // in/out Sequences //################################################################################### seqIndices.realloc(0); seqOut.realloc(0); @@ -1033,35 +1033,35 @@ bool doSimpleSequenceTest(const Reference<XInvocation> & inv) inv->invoke(OUString(L"inoutArray"), Sequence< Any >( & inArString, 1), seqIndices, seqOut); outArray <<= seqOut[0]; - inv->invoke(OUString(L"inoutSequenceByte"), Sequence<Any>( & inArByte, 1), seqIndices, seqOut); + inv->invoke(OUString(L"inoutSequenceByte"), Sequence<Any>( & inArByte, 1), seqIndices, seqOut); inv->invoke(OUString(L"inoutSequenceByte"), Sequence<Any>( & inArByte, 1), seqIndices, seqOut); outArByte <<= seqOut[0]; - inv->invoke(OUString(L"inoutSequenceShort"), Sequence<Any>( & inArShort, 1), seqIndices, seqOut); + inv->invoke(OUString(L"inoutSequenceShort"), Sequence<Any>( & inArShort, 1), seqIndices, seqOut); inv->invoke(OUString(L"inoutSequenceShort"), Sequence<Any>( & inArShort, 1), seqIndices, seqOut); outArShort <<= seqOut[0]; - inv->invoke(OUString(L"inoutSequenceLong"), Sequence<Any>( & inArLong, 1), seqIndices, seqOut); + inv->invoke(OUString(L"inoutSequenceLong"), Sequence<Any>( & inArLong, 1), seqIndices, seqOut); inv->invoke(OUString(L"inoutSequenceLong"), Sequence< Any >( & inArLong, 1), seqIndices, seqOut); outArLong <<= seqOut[0]; - inv->invoke(OUString(L"inoutSequenceString"), Sequence<Any>( & inArString, 1), seqIndices, seqOut); + inv->invoke(OUString(L"inoutSequenceString"), Sequence<Any>( & inArString, 1), seqIndices, seqOut); inv->invoke(OUString(L"inoutSequenceString"), Sequence<Any>( & inArString, 1), seqIndices, seqOut); outArString <<= seqOut[0]; - inv->invoke(OUString(L"inoutSequenceFloat"), Sequence<Any>( & inArFloat, 1), seqIndices, seqOut); + inv->invoke(OUString(L"inoutSequenceFloat"), Sequence<Any>( & inArFloat, 1), seqIndices, seqOut); inv->invoke(OUString(L"inoutSequenceFloat"), Sequence<Any>( & inArFloat, 1), seqIndices, seqOut); outArFloat <<= seqOut[0]; - inv->invoke(OUString(L"inoutSequenceDouble"), Sequence<Any>( & inArDouble, 1), seqIndices, seqOut); + inv->invoke(OUString(L"inoutSequenceDouble"), Sequence<Any>( & inArDouble, 1), seqIndices, seqOut); inv->invoke(OUString(L"inoutSequenceDouble"), Sequence<Any>( & inArDouble, 1), seqIndices, seqOut); outArDouble <<= seqOut[0]; - inv->invoke(OUString(L"inoutSequenceObject"), Sequence<Any>( & inArObject, 1), seqIndices, seqOut); + inv->invoke(OUString(L"inoutSequenceObject"), Sequence<Any>( & inArObject, 1), seqIndices, seqOut); inv->invoke(OUString(L"inoutSequenceObject"), Sequence<Any>( & inArObject, 1), seqIndices, seqOut); outArObject <<= seqOut[0]; - if ( ! equalSequences(inArByte, outArByte) || ! equalSequences(inArShort, outArShort) + if ( ! equalSequences(inArByte, outArByte) || ! equalSequences(inArShort, outArShort) || ! equalSequences(inArLong, outArLong) || ! equalSequences(inArString, outArray) || ! equalSequences(inArFloat, outArFloat) || ! equalSequences(inArDouble, outArDouble) || ! equalSequences(inArString, outArString) || ! equalSequences(inArObject, outArObject)) @@ -1082,7 +1082,7 @@ HRESULT doTest() Sequence< sal_Int16> seqIndices; Sequence<Any> seqOut; - + Any aAny; Any anyOut; char buff[1024]; @@ -1097,9 +1097,9 @@ HRESULT doTest() if (! doPropertyTest(inv)) { fprintf(stdout, "### Test failed!\n"); - return E_FAIL; + return E_FAIL; } - + if ( ! doSimpleSequenceTest(inv)) { fprintf(stdout, "### Test failed! \n"); @@ -1118,15 +1118,15 @@ HRESULT doTest() return E_FAIL; } - + // -// //################################################################################### -// // in multi Sequences -// //################################################################################### -// // inMulDimArrayLong +// //################################################################################### +// // in multi Sequences +// //################################################################################### +// // inMulDimArrayLong sal_Int32 arLongi[]={1,2,3}; sal_Int32 arLongi2[]={4,5,6,7}; sal_Int32 arLongi3[]={8,9,10,11,12}; @@ -1141,10 +1141,10 @@ HRESULT doTest() seq2i[2]= seqLongi3; seqAny<<= seq2i; // dimension length 3,5 - inv->invoke( OUString(L"inMulDimArrayLong"),Sequence< Any > ( &seqAny, 1), seqIndices, seqOut); -// + inv->invoke( OUString(L"inMulDimArrayLong"),Sequence< Any > ( &seqAny, 1), seqIndices, seqOut); +// //inMulDimArrayVariant - inv->invoke( OUString(L"inMulDimArrayVariant"),Sequence< Any > ( &seqAny, 1), seqIndices, seqOut); + inv->invoke( OUString(L"inMulDimArrayVariant"),Sequence< Any > ( &seqAny, 1), seqIndices, seqOut); //inMulDimArrayLong2 sal_Int32 arLongii1[]={1,2,3}; @@ -1167,12 +1167,12 @@ HRESULT doTest() seq2ii2[0]= seqLongii4; seq2ii2[1]= seqLongii5; - + Sequence< Sequence< Sequence< sal_Int32> > > seq3ii(2); seq3ii[0]=seq2ii; seq3ii[1]=seq2ii2; seqAny<<= seq3ii; - inv->invoke( OUString(L"inMulDimArrayLong2"),Sequence< Any > ( &seqAny, 1), seqIndices, seqOut); + inv->invoke( OUString(L"inMulDimArrayLong2"),Sequence< Any > ( &seqAny, 1), seqIndices, seqOut); // inMulDimArrayByte2 sal_Int8 arByteii1[]={1,2,3}; @@ -1195,27 +1195,27 @@ HRESULT doTest() seq2Byteii2[0]= seqByteii4; seq2Byteii2[1]= seqByteii5; - + Sequence< Sequence< Sequence< sal_Int8> > > seq3Byteii(2); seq3Byteii[0]=seq2Byteii; seq3Byteii[1]=seq2Byteii2; seqAny<<= seq3Byteii; - inv->invoke( OUString(L"inMulDimArrayByte2"),Sequence< Any > ( &seqAny, 1), seqIndices, seqOut); + inv->invoke( OUString(L"inMulDimArrayByte2"),Sequence< Any > ( &seqAny, 1), seqIndices, seqOut); //################################################################################### //################################################################################### //################################################################################### - // Tests with a MFC ActiveX control, ( pure dispinterface) + // Tests with a MFC ActiveX control, ( pure dispinterface) //################################################################################### //################################################################################### - // in parameter MFC ActiveX + // in parameter MFC ActiveX //################################################################################### // unsigned char is not supported by MFC - // aAny <<= ( sal_Int8) 127; - // invMfc->invoke( OUString(L"inByte"), Sequence< Any > ( &aAny, 1), seqIndices, seqOut); + // aAny <<= ( sal_Int8) 127; + // invMfc->invoke( OUString(L"inByte"), Sequence< Any > ( &aAny, 1), seqIndices, seqOut); if ( ! invMfc.is()) return hr; aAny <<= static_cast<sal_Int16>(-1); @@ -1239,12 +1239,12 @@ HRESULT doTest() aAny <<= OUString( L" A string in an any"); aAny=invMfc->invoke( OUString(L"inVariant"), Sequence< Any > ( &aAny, 1), seqIndices, seqOut); - + // Tests with Sequences later. - // OUString arStr4[]= {L"string0", L"string1", L"string2"}; - // Sequence<OUString> seqStr4( arStr4, 3); - // aAny <<= seqStr4; - // invMfc->invoke( OUString(L"inArray"), Sequence< Any > ( &aAny, 1), seqIndices, seqOut); + // OUString arStr4[]= {L"string0", L"string1", L"string2"}; + // Sequence<OUString> seqStr4( arStr4, 3); + // aAny <<= seqStr4; + // invMfc->invoke( OUString(L"inArray"), Sequence< Any > ( &aAny, 1), seqIndices, seqOut); Reference < XInvocation > inv5= getComObject(L"AxTestComponents.Basic"); @@ -1254,11 +1254,11 @@ HRESULT doTest() aAny <<= inv5; aAny=invMfc->invoke( OUString(L"inObject"), Sequence< Any > ( &aAny, 1), seqIndices, seqOut); // -// //################################################################################### -// // out parameter MFC ActiveX -// //################################################################################### -// -// // outShort +// //################################################################################### +// // out parameter MFC ActiveX +// //################################################################################### +// +// // outShort aAny= invMfc->invoke( OUString(L"outShort"), Sequence< Any > ( &aAny, 1), seqIndices, seqOut); anyOut<<= seqOut[0]; sprintf(buff, "MFC outShort %d", *(sal_Int16*)anyOut.getValue()); @@ -1308,9 +1308,9 @@ HRESULT doTest() //################################################################################### - // Sequence parameter MFC ActiveX + // Sequence parameter MFC ActiveX //################################################################################### - // Sequences are not directly supported. + // Sequences are not directly supported. delete pWin; diff --git a/extensions/test/ole/OleClient/funcs.cxx b/extensions/test/ole/OleClient/funcs.cxx index 231f5bc825db..665814341d3e 100644 --- a/extensions/test/ole/OleClient/funcs.cxx +++ b/extensions/test/ole/OleClient/funcs.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -57,7 +57,7 @@ template< class T > bool equalSequences(const Sequence<T>& seqIn, const Sequence<Any> & returned); -Reference< XMultiServiceFactory > objectFactory;// +Reference< XMultiServiceFactory > objectFactory;// Reference<XMultiServiceFactory> getMultiServiceFactory() @@ -76,10 +76,10 @@ Reference<XInvocation> getComObject( OUString progId) { HRESULT hr= S_OK; Reference< XInvocation > ret; -// Reference<XMultiServiceFactory> fac; +// Reference<XMultiServiceFactory> fac; if( ! objectFactory.is()) - { Reference<XMultiServiceFactory> mgr= getMultiServiceFactory(); - Reference<XInterface> xInt= mgr->createInstance( + { Reference<XMultiServiceFactory> mgr= getMultiServiceFactory(); + Reference<XInterface> xInt= mgr->createInstance( OUString(L"com.sun.star.bridge.oleautomation.Factory")); objectFactory= Reference<XMultiServiceFactory>::query( xInt); } @@ -107,8 +107,8 @@ Reference<XInvocation> convertComObject( IUnknown* pUnk) any <<= ( sal_uInt32)&var; sal_uInt8 arId[16]; rtl_getGlobalProcessId( arId); - Any target= xSuppl->createBridge( any, Sequence<sal_Int8>( (sal_Int8*)arId, 16), OLE, UNO ); - + Any target= xSuppl->createBridge( any, Sequence<sal_Int8>( (sal_Int8*)arId, 16), OLE, UNO ); + Reference<XInvocation> ret; target>>= ret; return ret; @@ -121,7 +121,7 @@ Reference<XInvocation> convertComObject( IUnknown* pUnk) The number of items in value must be the same as the number of provided parameter during the call on the method. - + The parameter outArgs, indices correspond to the sequences which are arguments to XInvocation::invoke */ @@ -169,7 +169,7 @@ bool checkOutArgs(const Sequence<Any> & outArgs, return true; } -/* The returned sequence always contains Any elements +/* The returned sequence always contains Any elements */ bool equalSequences(const Any& orig, const Any& returned) { @@ -180,13 +180,13 @@ bool equalSequences(const Any& orig, const Any& returned) } TypeDescription td(orig.getValueTypeRef()); typelib_IndirectTypeDescription * indirect_td = (typelib_IndirectTypeDescription *) td.get(); - + switch (indirect_td->pType->eTypeClass) { case TypeClass_CHAR: { Sequence<sal_Unicode> seq; - orig >>= seq; + orig >>= seq; Sequence<Any> seq2; returned >>= seq2; return equalSequences(seq, seq2); @@ -194,7 +194,7 @@ bool equalSequences(const Any& orig, const Any& returned) case TypeClass_BOOLEAN: { Sequence<sal_Bool> seq; - orig >>= seq; + orig >>= seq; Sequence<Any> seq2; returned >>= seq2; return equalSequences(seq, seq2); @@ -202,7 +202,7 @@ bool equalSequences(const Any& orig, const Any& returned) case TypeClass_BYTE: { Sequence<sal_Int8> seq; - orig >>= seq; + orig >>= seq; Sequence<Any> seq2; returned >>= seq2; return equalSequences(seq, seq2); @@ -210,7 +210,7 @@ bool equalSequences(const Any& orig, const Any& returned) case TypeClass_SHORT: { Sequence<sal_Int16> seq; - orig >>= seq; + orig >>= seq; Sequence<Any> seq2; returned >>= seq2; return equalSequences(seq, seq2); @@ -218,7 +218,7 @@ bool equalSequences(const Any& orig, const Any& returned) case TypeClass_LONG: { Sequence<sal_Int32> seq; - orig >>= seq; + orig >>= seq; Sequence<Any> seq2; returned >>= seq2; return equalSequences(seq, seq2); @@ -226,7 +226,7 @@ bool equalSequences(const Any& orig, const Any& returned) case TypeClass_FLOAT: { Sequence<float> seq; - orig >>= seq; + orig >>= seq; Sequence<Any> seq2; returned >>= seq2; return equalSequences(seq, seq2); @@ -234,7 +234,7 @@ bool equalSequences(const Any& orig, const Any& returned) case TypeClass_DOUBLE: { Sequence<double> seq; - orig >>= seq; + orig >>= seq; Sequence<Any> seq2; returned >>= seq2; return equalSequences(seq, seq2); @@ -242,7 +242,7 @@ bool equalSequences(const Any& orig, const Any& returned) case TypeClass_STRING: { Sequence<OUString> seq; - orig >>= seq; + orig >>= seq; Sequence<Any> seq2; returned >>= seq2; return equalSequences(seq, seq2); @@ -250,7 +250,7 @@ bool equalSequences(const Any& orig, const Any& returned) case TypeClass_ANY: { Sequence<Any> seq; - orig >>= seq; + orig >>= seq; Sequence<Any> seq2; returned >>= seq2; return equalSequences(seq, seq2); @@ -258,7 +258,7 @@ bool equalSequences(const Any& orig, const Any& returned) case TypeClass_SEQUENCE: { //Sequence<sal_Unicode> seq; - //orig >>= seq; + //orig >>= seq; //Sequence<Any> seq2; //returned >>= seq2; //return equalSequences(seq, seq2); @@ -267,7 +267,7 @@ bool equalSequences(const Any& orig, const Any& returned) case TypeClass_INTERFACE: { Sequence<Reference<XInvocation> > seq; - orig >>= seq; + orig >>= seq; Sequence<Any> seq2; returned >>= seq2; return equalSequences(seq, seq2); @@ -292,16 +292,16 @@ bool equalSequences(const Sequence<T>& seqIn, const Sequence<Any> & seqOut) if (anyIn != anyOut) return false; } - + return true; } void printSequence( Sequence<Any>& val) { -// typelib_TypeDescription* desc; -// val.getValueTypeDescription( &desc); -// typelib_typedescription_release( desc); +// typelib_TypeDescription* desc; +// val.getValueTypeDescription( &desc); +// typelib_typedescription_release( desc); USES_CONVERSION; char buff[1024]; diff --git a/extensions/test/ole/OleConverterVar1/convTest.cxx b/extensions/test/ole/OleConverterVar1/convTest.cxx index 6cc6e47462ac..7e89e660d40b 100644 --- a/extensions/test/ole/OleConverterVar1/convTest.cxx +++ b/extensions/test/ole/OleConverterVar1/convTest.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -81,7 +81,7 @@ int __cdecl _tmain( int argc, _TCHAR * argv[] ) return -1; } - + _Module.Init( ObjectMap, GetModuleHandle( NULL)); if( FAILED(hr=doTest())) @@ -107,16 +107,16 @@ double _double[]= {12345, 1234.5, 123.45, 12.345, 1.2345}; CComVariant _variant[]= {L"variant 1", L"variant2", L"variant3"}; wchar_t _wchar[]= {L'1', L'2', L'3', L'A', L' '}; BSTR _bstr[]={L"Ich", L"bin", L"ein", L"Hamburger", L"Jung"}; -SmartArray<char> arByte( _c, 5, VT_I1); -SmartArray< short> arShort( _short, 5, VT_I2); +SmartArray<char> arByte( _c, 5, VT_I1); +SmartArray< short> arShort( _short, 5, VT_I2); //SmartArray< unsigned short> arUShort( _ushort, 5, VT_UI2); -SmartArray< long> arLong( _long, 5, VT_I4); -//SmartArray< unsigned long> arULong( _ulong, 5, VT_UI4); -//SmartArray< float> arFloat( _float, 5, VT_R4 ); -SmartArray< double> arDouble( _double, 5, VT_R8 ); +SmartArray< long> arLong( _long, 5, VT_I4); +//SmartArray< unsigned long> arULong( _ulong, 5, VT_UI4); +//SmartArray< float> arFloat( _float, 5, VT_R4 ); +SmartArray< double> arDouble( _double, 5, VT_R8 ); //SmartArray< unsigned short> arWChar( _wchar, 5, VT_UI2 ); -SmartArray< wchar_t* > arString( _bstr, 5, VT_BSTR); -SmartArray< VARIANT > arVariant( _variant, 3, VT_VARIANT); +SmartArray< wchar_t* > arString( _bstr, 5, VT_BSTR); +SmartArray< VARIANT > arVariant( _variant, 3, VT_VARIANT); HRESULT doTest() @@ -128,7 +128,7 @@ HRESULT doTest() putenv("UNO_TYPES=types.rdb"); putenv("UNO_SERVICES=services.rdb"); Reference<XComponentContext> xContext = defaultBootstrap_InitialComponentContext(); - + Reference< XMultiComponentFactory > mgr = xContext->getServiceManager();//createRegistryServiceFactory( OUString(L"services.rdb")); Reference< XInterface > xIntSupplier= mgr->createInstanceWithContext( OUString(L"com.sun.star.bridge.OleBridgeSupplierVar1"), xContext); @@ -139,12 +139,12 @@ HRESULT doTest() any <<= xOletest; sal_uInt8 arId[16]; rtl_getGlobalProcessId( arId); - Any target= xSuppl->createBridge( any, Sequence<sal_Int8>( (sal_Int8*)arId, 16), UNO, OLE); + Any target= xSuppl->createBridge( any, Sequence<sal_Int8>( (sal_Int8*)arId, 16), UNO, OLE); CComDispatchDriver oletest; if (target.getValueTypeClass() == getCppuType((sal_uInt32*) 0).getTypeClass()) { VARIANT* pVariant = *(VARIANT**)target.getValue(); - + oletest= pVariant->pdispVal; VariantClear(pVariant); @@ -156,22 +156,22 @@ HRESULT doTest() CComVariant varParam2; CComVariant varParam3; CComVariant varParam4; - + long value= 100; varParam1.vt= VT_I1 | VT_BYREF; varParam1.plVal= &value; - // Testing the caching of DISPIDs and the process of aquiring member information + // Testing the caching of DISPIDs and the process of aquiring member information // on demand in IDispatch::Invoke // Step through the corresponding IDispatch implementation of the ole bridge - hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"testinout_methodByte"), &varParam1, &varRet); - hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"testinout_methodByte"), &varParam1, &varRet); + hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"testinout_methodByte"), &varParam1, &varRet); + hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"testinout_methodByte"), &varParam1, &varRet); // Name ok but different case - hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"Testinout_methodByte"), &varParam1, &varRet); - hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"Testinout_methodByte"), &varParam1, &varRet); + hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"Testinout_methodByte"), &varParam1, &varRet); + hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"Testinout_methodByte"), &varParam1, &varRet); // not existing member - hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"Testinout"), &varParam1, &varRet); - hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"Testinout"), &varParam1, &varRet); + hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"Testinout"), &varParam1, &varRet); + hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"Testinout"), &varParam1, &varRet); // Property varParam1.vt= VT_ARRAY | VT_I1; @@ -222,14 +222,14 @@ HRESULT doTest() LPOLESTR attrib= L"AttrByte"; hr = oletest.p->GetIDsOfNames(IID_NULL, &attrib, 1, LOCALE_USER_DEFAULT, &dispid); - + hr = oletest.p->Invoke( dispid, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD | DISPATCH_PROPERTYPUTREF, ¶ms, &varRet, NULL, NULL); hr = oletest.p->Invoke( dispid, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD | DISPATCH_PROPERTYGET, ¶ms, &varRet, NULL, NULL); - + CComVariant varByteArray; varByteArray.vt= VT_ARRAY | VT_I1; @@ -269,36 +269,36 @@ HRESULT doTest() CComVariant varUnkArray; varUnkArray.vt= VT_ARRAY | VT_UNKNOWN; varUnkArray.parray= (SAFEARRAY*)arUnknown; - + // preparing out parameter; char byteOut; - CComVariant varOutByte; //### + CComVariant varOutByte; //### varOutByte.vt= VT_BYREF | VT_UI1; V_I1REF(&varOutByte)= &byteOut; short shortOut; - CComVariant varOutShort; //### + CComVariant varOutShort; //### varOutShort.vt= VT_BYREF | VT_I2; V_I2REF( &varOutShort)= &shortOut; long longOut; - CComVariant varOutLong; //### + CComVariant varOutLong; //### varOutLong.vt= VT_BYREF | VT_I4; V_I4REF( &varOutLong)= &longOut; double doubleOut; - CComVariant varOutDouble; //### + CComVariant varOutDouble; //### varOutDouble.vt= VT_BYREF | VT_R8; V_R8REF( &varOutDouble)= &doubleOut; BSTR bstrOut= NULL; - CComVariant varOutString; //### + CComVariant varOutString; //### varOutString.vt= VT_BYREF | VT_BSTR; V_BSTRREF(&varOutString)= &bstrOut; CComVariant variantOut; - CComVariant varOutAny; //### + CComVariant varOutAny; //### varOutAny.vt= VT_BYREF | VT_VARIANT; V_VARIANTREF(&varOutAny)= &variantOut; CComPtr<IDispatch> dispOut; CComVariant varOutXInterface; //### - varOutXInterface.vt= VT_BYREF |VT_DISPATCH; + varOutXInterface.vt= VT_BYREF |VT_DISPATCH; V_DISPATCHREF(&varOutXInterface)= &dispOut.p; // In Parameter ( all of type Sequence ########################################################### @@ -307,43 +307,43 @@ HRESULT doTest() OutputDebugStringA("methodByte | Params: \n"); printVariant( varByteArray); - hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"methodByte"), &varByteArray, &varRet); + hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"methodByte"), &varByteArray, &varRet); OutputDebugStringA("methodByte | return value \n"); printVariant( varRet); OutputDebugStringA("methodShort | Params: \n"); printVariant( varShortArray); - hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"methodShort"), &varShortArray, &varRet); + hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"methodShort"), &varShortArray, &varRet); OutputDebugStringA("methodShort | return value \n"); printVariant( varRet); OutputDebugStringA("methodLong | Params: \n"); printVariant( varLongArray); - hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"methodLong"), &varLongArray, &varRet); + hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"methodLong"), &varLongArray, &varRet); OutputDebugStringA("methodLong | return value \n"); printVariant( varRet); OutputDebugStringA("methodDouble | Params: \n"); printVariant( varDoubleArray); - hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"methodDouble"), &varDoubleArray, &varRet); + hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"methodDouble"), &varDoubleArray, &varRet); OutputDebugStringA("methodDouble | return value \n"); printVariant( varRet); OutputDebugStringA("methodString | Params: \n"); printVariant( varStringArray); - hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"methodString"), &varStringArray, &varRet); + hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"methodString"), &varStringArray, &varRet); OutputDebugStringA("methodString | return value \n"); printVariant( varRet); OutputDebugStringA("methodAny | Params: \n"); printVariant( varArray); - hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"methodAny"), &varArray, &varRet); + hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"methodAny"), &varArray, &varRet); OutputDebugStringA("methodAny | return value \n"); printVariant( varRet); OutputDebugStringA("methodXInterface | Params: \n"); printVariant( varUnkArray); - hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"methodXInterface"), &varUnkArray, &varRet); + hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"methodXInterface"), &varUnkArray, &varRet); OutputDebugStringA("methodAny | return value \n"); printVariant( varRet); @@ -351,44 +351,44 @@ HRESULT doTest() OutputDebugString( _T("Out parameter ###########################################\n\n")); OutputDebugString(_T("testout_methodByte \n")); - hr= oletest.InvokeN(static_cast<LPCOLESTR>(L"testout_methodByte"), &varOutByte, 1, &varRet); + hr= oletest.InvokeN(static_cast<LPCOLESTR>(L"testout_methodByte"), &varOutByte, 1, &varRet); OutputDebugString(_T("testout_methodByte | out value: \n")); printVariant( varOutByte); OutputDebugString(_T("testout_methodShort \n")); - hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"testout_methodShort"), &varOutShort, &varRet); + hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"testout_methodShort"), &varOutShort, &varRet); OutputDebugString(_T("testout_methodShort | out value: \n")); printVariant( varOutShort); OutputDebugString(_T("testout_methodLong \n")); - hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"testout_methodLong"), &varOutLong, &varRet); + hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"testout_methodLong"), &varOutLong, &varRet); OutputDebugString(_T("testout_methodLong | out value: \n")); printVariant( varOutLong); OutputDebugString(_T("testout_methodDouble \n")); - hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"testout_methodDouble"), &varOutDouble, &varRet); + hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"testout_methodDouble"), &varOutDouble, &varRet); OutputDebugString(_T("testout_methodDouble | out value: \n")); printVariant( varOutDouble); OutputDebugString(_T("testout_methodString \n")); - hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"testout_methodString"), &varOutString, &varRet); + hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"testout_methodString"), &varOutString, &varRet); OutputDebugString(_T("testout_methodString | out value: \n")); printVariant( varOutString); OutputDebugString(_T("testout_methodAny \n")); - hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"testout_methodAny"), &varOutAny, &varRet); + hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"testout_methodAny"), &varOutAny, &varRet); OutputDebugString(_T("methodAny | out value: \n")); printVariant( varOutAny); OutputDebugString(_T("testout_methodXInterface \n")); - hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"testout_methodXInterface"), &varOutXInterface, &varRet); + hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"testout_methodXInterface"), &varOutXInterface, &varRet); OutputDebugString(_T("methodAny | out value: \n")); printVariant( varOutXInterface); CComDispatchDriver outDisp( *varOutXInterface.ppdispVal); CComVariant varAttr3; outDisp.GetPropertyByName(L"AttrAny2", &varAttr3); ATLTRACE("property OleTest.AttrAny2: %s", W2T(varAttr3.bstrVal)); - + OutputDebugString(_T("testout_methodMulParams1 ( 2 out Parameter) \n")); long longOut2=0; CComVariant _params[2]; @@ -396,18 +396,18 @@ HRESULT doTest() _params[0]= varOutLong; _params[1].vt= VT_BYREF | VT_I4; V_I4REF(& _params[1])= &longOut2; - hr= oletest.InvokeN( static_cast<LPCOLESTR>(L"testout_methodMulParams1"), (VARIANT*)&_params, 2); + hr= oletest.InvokeN( static_cast<LPCOLESTR>(L"testout_methodMulParams1"), (VARIANT*)&_params, 2); OutputDebugString(_T("testout_methodMulParams1 | out values: \n")); printVariant( _params[1]); printVariant( _params[0]); - + OutputDebugString(_T("testout_methodMulParams2 ( 3 out Parameter) \n")); CComVariant _params2[3]; _params2[2]= varOutLong; _params2[1].vt= VT_BYREF | VT_I4; V_I4REF(& _params2[1])= &longOut2; _params2[0]= varOutString; - hr= oletest.InvokeN( static_cast<LPCOLESTR>( L"testout_methodMulParams2"), (VARIANT*)&_params2, 3); + hr= oletest.InvokeN( static_cast<LPCOLESTR>( L"testout_methodMulParams2"), (VARIANT*)&_params2, 3); OutputDebugString(_T("testout_methodMulParams2 | out values: \n")); printVariant( _params2[2]); printVariant( _params2[1]); @@ -417,42 +417,42 @@ HRESULT doTest() CComVariant _params3[2]; _params3[1]= CComBSTR(L" In string"); _params3[0]= varOutString; - hr= oletest.InvokeN( static_cast<LPCOLESTR>( L"testout_methodMulParams3"), (VARIANT*)&_params3, 2); + hr= oletest.InvokeN( static_cast<LPCOLESTR>( L"testout_methodMulParams3"), (VARIANT*)&_params3, 2); OutputDebugString(_T("testout_methodMulParams3 | out values: \n")); printVariant( _params3[1]); printVariant( _params3[0]); - + //In Out Parameter ########################################################################### OutputDebugString( _T("In Out parameter ###########################################\n\n")); *V_I1REF(&varOutByte)= 5; ATLTRACE(_T("testinout_methodByte | in value: %d \n"), *V_I1REF(&varOutByte)); - hr= oletest.InvokeN(static_cast<LPCOLESTR>(L"testinout_methodByte"), &varOutByte, 1, &varRet); + hr= oletest.InvokeN(static_cast<LPCOLESTR>(L"testinout_methodByte"), &varOutByte, 1, &varRet); OutputDebugString(_T("testinout_methodByte | out value: \n")); printVariant( varOutByte); OutputDebugString(_T("testinout_methodShort | in value= 1000 \n")); *V_UI2REF(&varOutShort)= 1000; - hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"testinout_methodShort"), &varOutShort, &varRet); + hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"testinout_methodShort"), &varOutShort, &varRet); OutputDebugString(_T("testinout_methodShort | out value: \n")); printVariant( varOutShort); OutputDebugString(_T("testinout_methodLong | in value= 10000 \n")); *V_UI4REF(&varOutLong)= 10000; - hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"testinout_methodLong"), &varOutLong, &varRet); + hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"testinout_methodLong"), &varOutLong, &varRet); OutputDebugString(_T("testinout_methodLong | out value: \n")); printVariant( varOutLong); *V_R8REF(&varOutDouble)= 3.14; ATLTRACE(_T("testinou_methodDouble in value: %f \n"),*V_R8REF(&varOutDouble)); - hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"testinout_methodDouble"), &varOutDouble, &varRet); + hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"testinout_methodDouble"), &varOutDouble, &varRet); OutputDebugString(_T("testinout_methodDouble | out value: \n")); printVariant( varOutDouble); SysFreeString( *V_BSTRREF(&varOutString)); *V_BSTRREF(&varOutString)= SysAllocString( L"this is a in string"); ATLTRACE(_T("testinout_methodString | value: %s \n"), W2T(*V_BSTRREF(&varOutString))); - hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"testinout_methodString"), &varOutString, &varRet); + hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"testinout_methodString"), &varOutString, &varRet); OutputDebugString(_T("testinout_methodString | out value: \n")); printVariant( varOutString); @@ -461,7 +461,7 @@ HRESULT doTest() outVar1.vt= VT_BYREF | VT_VARIANT; outVar1.pvarVal= &var1; ATLTRACE(_T("testinout_methodAny | parameter: %s\n"), W2T(var1.bstrVal)); - hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"testinout_methodAny"), &varOutAny, &varRet); + hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"testinout_methodAny"), &varOutAny, &varRet); OutputDebugString(_T("testinout_methodAny | out value: \n")); printVariant( varOutAny); @@ -472,7 +472,7 @@ HRESULT doTest() (*varOutIFace.ppunkVal)->AddRef(); OutputDebugString(_T("testinout_methodXInterface | in value: \n")); printVariant(varOutIFace); - hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"testinout_methodXInterface"), &varOutIFace, &varRet); + hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"testinout_methodXInterface"), &varOutIFace, &varRet); OutputDebugString(_T("testinout_methodXInterface | out value: \n")); printVariant( varOutIFace); @@ -489,8 +489,8 @@ HRESULT doTest() varRet.Clear(); hr= oletest.GetPropertyByName( static_cast<LPCOLESTR>(L"AttrByte"), &varRet); printVariant( varRet); - - + + return S_OK; @@ -502,7 +502,7 @@ void printVariant( VARIANT & _var) HRESULT hr; USES_CONVERSION; CComVariant var; - hr= VariantCopyInd( &var, &_var); + hr= VariantCopyInd( &var, &_var); if( var.vt & VT_ARRAY) { VARTYPE type= var.vt ^ VT_ARRAY; @@ -522,7 +522,7 @@ void printVariant( VARIANT & _var) OutputDebugString( _T("# Array \n")); for( long i= 0; i < count; i++) { -// CComVariant variantValue; +// CComVariant variantValue; TCHAR *buf[256]; wsprintf( (TCHAR*)buf, _T("%d : "), i); OutputDebugString( (TCHAR*)buf); @@ -602,15 +602,15 @@ void printVariant( VARIANT & _var) break; case VT_I4: wsprintf( (TCHAR*)buf, _T(" VT_I4: %d \n"), V_I4( &var) ); break; - case VT_R8: + case VT_R8: { + +// int decimal, sign; +// char *buffer; +// int precision = 14; +// double source = 3.1415926535; -// int decimal, sign; -// char *buffer; -// int precision = 14; -// double source = 3.1415926535; - -// buffer = _ecvt( V_R8(&var), precision, &decimal, &sign ); +// buffer = _ecvt( V_R8(&var), precision, &decimal, &sign ); sprintf( (TCHAR*)buf, _T(" VT_R8: %f \n"),V_R8( &var) ); break; } @@ -635,7 +635,7 @@ void printVariant( VARIANT & _var) break; } - + case VT_BSTR: { diff --git a/extensions/test/ole/OleConverterVar1/smartarray.h b/extensions/test/ole/OleConverterVar1/smartarray.h index 13b5337cd11e..f38c93d88cd2 100644 --- a/extensions/test/ole/OleConverterVar1/smartarray.h +++ b/extensions/test/ole/OleConverterVar1/smartarray.h @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -42,14 +42,14 @@ public: rgsabound[0].cElements= count; rgsabound[0].lLbound= 0; m_array= SafeArrayCreate( destVartype, 1, rgsabound); - SafeArrayLock( m_array); - + SafeArrayLock( m_array); + void* pData; if( m_array && (SUCCEEDED( SafeArrayAccessData( m_array, (void**)&pData)) ) ) { for( int i=0; i< count; i++) - { + { CComVariant varSource( parParams[i]); switch (destVartype) { @@ -121,18 +121,18 @@ public: VARIANT *pVariant= (VARIANT*)pData; hr= VariantCopy( &pVariant[i], &varSource); break; } -// case VT_UNKNOWN: -// { -// long* pUnk= (long*)pData; -// pUnk[i]= reinterpret_cast<long>(parParams[i]); -// ((IUnknown*)pUnk[i])->AddRef(); break; -// } -// case VT_DISPATCH: -// { -// long* pDisp= (long*)pData; -// pDisp[i]= (long)parParams[i]; -// ((IDispatch*)pDisp[i])->AddRef(); break; -// } +// case VT_UNKNOWN: +// { +// long* pUnk= (long*)pData; +// pUnk[i]= reinterpret_cast<long>(parParams[i]); +// ((IUnknown*)pUnk[i])->AddRef(); break; +// } +// case VT_DISPATCH: +// { +// long* pDisp= (long*)pData; +// pDisp[i]= (long)parParams[i]; +// ((IDispatch*)pDisp[i])->AddRef(); break; +// } default: hr= E_FAIL; } @@ -145,7 +145,7 @@ public: } SafeArrayUnaccessData( m_array); } - ~SmartArray(){ + ~SmartArray(){ SafeArrayUnlock( m_array); SafeArrayDestroy( m_array ); } @@ -162,44 +162,44 @@ class SmartArray<IUnknown*> SAFEARRAY *m_array; public: - SmartArray( sourceType * parParams, int count, VARTYPE destVartype); -// { -// ATLTRACE("SmartArray<IUnknown>"); -// HRESULT hr= S_OK; -// SAFEARRAYBOUND rgsabound[1]; -// rgsabound[0].cElements= count; -// rgsabound[0].lLbound= 0; -// m_array= SafeArrayCreateVector( VT_UNKNOWN, 0, count); -// SafeArrayLock( m_array); + SmartArray( sourceType * parParams, int count, VARTYPE destVartype); +// { +// ATLTRACE("SmartArray<IUnknown>"); +// HRESULT hr= S_OK; +// SAFEARRAYBOUND rgsabound[1]; +// rgsabound[0].cElements= count; +// rgsabound[0].lLbound= 0; +// m_array= SafeArrayCreateVector( VT_UNKNOWN, 0, count); +// SafeArrayLock( m_array); +// +// IUnknown* *pData; +// if( m_array && (SUCCEEDED( SafeArrayAccessData( m_array, (void**)&pData)) ) ) +// { // -// IUnknown* *pData; -// if( m_array && (SUCCEEDED( SafeArrayAccessData( m_array, (void**)&pData)) ) ) -// { +// for( int i=0; i< count; i++) +// { +// CComVariant varSource( parParams[i]); +// switch (destVartype) +// { // -// for( int i=0; i< count; i++) -// { -// CComVariant varSource( parParams[i]); -// switch (destVartype) -// { -// -// case VT_UNKNOWN: -// { -// pData[i]= parParams[i]; -// pData[i]->AddRef(); -// } -// default: -// hr= E_FAIL; -// } -// } -// if( FAILED( hr)) -// { -// SafeArrayDestroy( m_array); -// m_array= NULL; -// } -// } -// SafeArrayUnaccessData( m_array); -// } - ~SmartArray(){ +// case VT_UNKNOWN: +// { +// pData[i]= parParams[i]; +// pData[i]->AddRef(); +// } +// default: +// hr= E_FAIL; +// } +// } +// if( FAILED( hr)) +// { +// SafeArrayDestroy( m_array); +// m_array= NULL; +// } +// } +// SafeArrayUnaccessData( m_array); +// } + ~SmartArray(){ SafeArrayUnlock( m_array); SafeArrayDestroy( m_array ); } @@ -218,13 +218,13 @@ template <> SmartArray <IUnknown*>::SmartArray(sourceType * parParams, int count rgsabound[0].cElements= count; rgsabound[0].lLbound= 0; m_array= SafeArrayCreateVector( VT_UNKNOWN, 0, count); - SafeArrayLock( m_array); - + SafeArrayLock( m_array); + IUnknown* *pData; if( m_array && (SUCCEEDED( SafeArrayAccessData( m_array, (void**)&pData)) ) ) { for( int i=0; i< count; i++) - { + { pData[i]= parParams[i]; pData[i]->AddRef(); } diff --git a/extensions/test/ole/cpnt/cpnt.cxx b/extensions/test/ole/cpnt/cpnt.cxx index c44728b9def5..589d27f438c2 100644 --- a/extensions/test/ole/cpnt/cpnt.cxx +++ b/extensions/test/ole/cpnt/cpnt.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -65,7 +65,7 @@ using namespace oletest; using namespace rtl; using namespace com::sun::star::uno; using namespace com::sun::star::lang; -using namespace com::sun::star::beans; +using namespace com::sun::star::beans; using namespace com::sun::star::registry; using namespace com::sun::star::script; using namespace com::sun::star::reflection; @@ -136,7 +136,7 @@ class OComponent : public WeakImplHelper7< Reference<XInvocation> m_attr_xinvocation; public: - OComponent( const Reference<XMultiServiceFactory> & rFactory ) : + OComponent( const Reference<XMultiServiceFactory> & rFactory ) : m_rFactory( rFactory ), m_arrayConstructor(0) {} ~OComponent(); public: // XTestSequence @@ -157,7 +157,7 @@ public: // XTestSequence virtual Sequence< Sequence< Sequence< sal_Int32 > > > SAL_CALL methodSequence2(const Sequence< Sequence< Sequence< sal_Int32 > > >& aSeq) throw( RuntimeException ); virtual Sequence< Reference<XEventListener> > SAL_CALL methodXEventListeners( const Sequence<Reference<XEventListener> >& aSeq) throw( RuntimeException); virtual Sequence< Sequence<Reference<XEventListener > > > SAL_CALL methodXEventListenersMul( const Sequence<Sequence<Reference<XEventListener > > >& aSeq ) throw (RuntimeException); - + virtual Sequence< sal_Int8 > SAL_CALL getAttrByte(void) throw( RuntimeException ); virtual void SAL_CALL setAttrByte(const Sequence< sal_Int8 >& AttrByte_) throw( RuntimeException ); virtual Sequence< float > SAL_CALL getAttrFloat(void) throw( RuntimeException) ; @@ -263,7 +263,7 @@ public: // XTestSequence virtual void SAL_CALL setAttrAny2(const Any& AttrAny2_) throw( RuntimeException ) ; - // XTestStruct + // XTestStruct virtual void SAL_CALL methodStruct(const Property& aProp) throw( RuntimeException ); virtual Property SAL_CALL retMethodStruct(void) throw( RuntimeException ); @@ -280,25 +280,25 @@ public: // XTestSequence virtual Any SAL_CALL other_methodAny( const Any& rAny, const OUString& typeInAny ) throw (RuntimeException); - + // XTestOutParameters ------------------------------------------------------------------------ // virtual void SAL_CALL out_test(sal_Int8 rIn) throw( RuntimeException ); -// virtual void SAL_CALL out_methodByte(sal_Int8& rOut) throw( RuntimeException ); -// virtual void SAL_CALL out_methodFloat(float& rOut) throw( RuntimeException ); -// virtual void SAL_CALL out_methodDouble(double& rOut) throw( RuntimeException ); -// virtual void SAL_CALL out_methodBool(sal_Bool& rOut) throw( RuntimeException ); -// virtual void SAL_CALL out_methodShort(sal_Int16& rOut) throw( RuntimeException ); -// virtual void SAL_CALL out_methodUShort(sal_uInt16& rOut) throw( RuntimeException ); -// virtual void SAL_CALL out_methodLong(sal_Int32& rOut) throw( RuntimeException ); -// virtual void SAL_CALL out_methodULong(sal_uInt32& rOut) throw( RuntimeException ); -// virtual void SAL_CALL out_methodHyper(sal_Int64& rOut) throw( RuntimeException ); -// virtual void SAL_CALL out_methodUHyper(sal_uInt64& rOut) throw( RuntimeException ); +// virtual void SAL_CALL out_methodByte(sal_Int8& rOut) throw( RuntimeException ); +// virtual void SAL_CALL out_methodFloat(float& rOut) throw( RuntimeException ); +// virtual void SAL_CALL out_methodDouble(double& rOut) throw( RuntimeException ); +// virtual void SAL_CALL out_methodBool(sal_Bool& rOut) throw( RuntimeException ); +// virtual void SAL_CALL out_methodShort(sal_Int16& rOut) throw( RuntimeException ); +// virtual void SAL_CALL out_methodUShort(sal_uInt16& rOut) throw( RuntimeException ); +// virtual void SAL_CALL out_methodLong(sal_Int32& rOut) throw( RuntimeException ); +// virtual void SAL_CALL out_methodULong(sal_uInt32& rOut) throw( RuntimeException ); +// virtual void SAL_CALL out_methodHyper(sal_Int64& rOut) throw( RuntimeException ); +// virtual void SAL_CALL out_methodUHyper(sal_uInt64& rOut) throw( RuntimeException ); // virtual void SAL_CALL out_methodString(OUString& rOut) throw( RuntimeException ); -// virtual void SAL_CALL out_methodChar(sal_Unicode& rOut) throw( RuntimeException ); -// virtual void SAL_CALL out_methodAny(Any& rOut) throw( RuntimeException ); -// virtual void SAL_CALL out_methodSequence(Sequence< sal_Int32 >& rOut) throw( RuntimeException ); -// virtual void SAL_CALL out_methodSequence2(Sequence< Sequence< sal_Int32 > >& rOut) throw( RuntimeException ); +// virtual void SAL_CALL out_methodChar(sal_Unicode& rOut) throw( RuntimeException ); +// virtual void SAL_CALL out_methodAny(Any& rOut) throw( RuntimeException ); +// virtual void SAL_CALL out_methodSequence(Sequence< sal_Int32 >& rOut) throw( RuntimeException ); +// virtual void SAL_CALL out_methodSequence2(Sequence< Sequence< sal_Int32 > >& rOut) throw( RuntimeException ); // virtual void SAL_CALL out_methodMulParams1(sal_Int32& rout1, sal_Int32& rout2) throw( RuntimeException ); // virtual void SAL_CALL out_methodMulParams2(sal_Int32& rout1, sal_Int32& rout2, OUString& rout3) throw( RuntimeException ); // virtual void SAL_CALL out_methodMulParams3(const OUString& sin, OUString& sout) throw( RuntimeException ); @@ -322,7 +322,7 @@ public: // XTestSequence virtual Reference<XInvocation > SAL_CALL in_methodInvocation( const Reference< XInvocation >& inv ) throw (RuntimeException); virtual SimpleStruct SAL_CALL in_methodStruct( const SimpleStruct& aStruct ) throw (RuntimeException); virtual void SAL_CALL in_methodAll( sal_Int8 b, float f, double d, sal_Bool boo, sal_Int16 sh, sal_uInt16 us, sal_Int32 l, sal_uInt32 ul, const OUString& s, sal_Unicode c, const Any& a, const Type& t, const Reference<XInvocation>& inv ) throw (RuntimeException); - + // XTestInterfaces -------------------------------------------------------------------------- virtual void SAL_CALL testInterface( const Reference< XCallback >& xCallback, sal_Int32 mode ) throw(RuntimeException); virtual void SAL_CALL testInterface2( const Reference< XSimple >& xSimple, sal_Int32 mode ) throw(RuntimeException); @@ -355,10 +355,10 @@ OComponent::~OComponent() // Funktions ============================================================================== Reference<XInterface> SAL_CALL OComponent_CreateInstance( const Reference<XMultiServiceFactory> & rSMgr ) throw(RuntimeException) -{ -// Reference<XInterface> xService(static_cast<XWeak*>(new OComponent( rSMgr )), UNO_QUERY); +{ +// Reference<XInterface> xService(static_cast<XWeak*>(new OComponent( rSMgr )), UNO_QUERY); OComponent* o= new OComponent( rSMgr ); - Reference<XInterface> xService(static_cast<XIdentity*>(o), UNO_QUERY); + Reference<XInterface> xService(static_cast<XIdentity*>(o), UNO_QUERY); return xService; } @@ -366,12 +366,12 @@ Sequence<OUString> OComponent_getSupportedServiceNames(void) { Sequence<OUString> aRet(1); aRet.getArray()[0] = SERVICE_NAME;//ODataInputStream_getImplementationName(); - + return aRet; } -extern "C" sal_Bool SAL_CALL component_writeInfo( void * /*pServiceManager*/, void * pRegistryKey ) +extern "C" sal_Bool SAL_CALL component_writeInfo( void * /*pServiceManager*/, void * pRegistryKey ) { if(pRegistryKey) { @@ -402,11 +402,11 @@ extern "C" void * SAL_CALL component_getFactory( { Reference<XMultiServiceFactory> xMulFac( reinterpret_cast< XMultiServiceFactory*>(pServiceManager)); - - Sequence<OUString> seqServiceNames; - Reference<XSingleServiceFactory> xFactory = createOneInstanceFactory( xMulFac, SERVICE_NAME, + + Sequence<OUString> seqServiceNames; + Reference<XSingleServiceFactory> xFactory = createOneInstanceFactory( xMulFac, SERVICE_NAME, OComponent_CreateInstance, seqServiceNames); - + if (xFactory.is()) { xFactory->acquire(); @@ -414,7 +414,7 @@ extern "C" void * SAL_CALL component_getFactory( } } } - return pRet; + return pRet; } extern "C" void SAL_CALL component_getImplementationEnvironment( @@ -425,16 +425,16 @@ extern "C" void SAL_CALL component_getImplementationEnvironment( // XTestSequence ============================================================================ -Sequence<sal_Int8> SAL_CALL OComponent::methodByte(const Sequence< sal_Int8 >& aSeq) throw( RuntimeException ) -{ +Sequence<sal_Int8> SAL_CALL OComponent::methodByte(const Sequence< sal_Int8 >& aSeq) throw( RuntimeException ) +{ sal_Int8 _x; for( sal_Int16 i= 0; i < aSeq.getLength(); i++){ _x= aSeq.getConstArray()[i]; } return aSeq; } -Sequence<float> SAL_CALL OComponent::methodFloat(const Sequence< float>& aSeq) throw( RuntimeException ) -{ +Sequence<float> SAL_CALL OComponent::methodFloat(const Sequence< float>& aSeq) throw( RuntimeException ) +{ float _x; for( sal_Int16 i= 0; i < aSeq.getLength(); i++){ _x= aSeq.getConstArray()[i]; @@ -468,12 +468,12 @@ Sequence< sal_Int16 > SAL_CALL OComponent::methodShort(const Sequence< sal_Int16 Sequence< sal_uInt16 > SAL_CALL OComponent::methodUShort(const Sequence< sal_uInt16 >& aSeq) throw( RuntimeException ) { sal_uInt16 _x; - for( sal_Int16 i= 0; i < aSeq.getLength(); i++){ + for( sal_Int16 i= 0; i < aSeq.getLength(); i++){ _x= aSeq.getConstArray()[i]; } return aSeq; } -Sequence< sal_Int32 > SAL_CALL OComponent::methodLong(const Sequence< sal_Int32 >& aSeq) throw( RuntimeException) +Sequence< sal_Int32 > SAL_CALL OComponent::methodLong(const Sequence< sal_Int32 >& aSeq) throw( RuntimeException) { sal_Int32 _x; for( sal_Int16 i= 0; i < aSeq.getLength(); i++) { @@ -481,7 +481,7 @@ Sequence< sal_Int32 > SAL_CALL OComponent::methodLong(const Sequence< sal_Int32 } return aSeq; } -Sequence< sal_uInt32 > SAL_CALL OComponent::methodULong(const Sequence< sal_uInt32 >& aSeq) throw( RuntimeException) +Sequence< sal_uInt32 > SAL_CALL OComponent::methodULong(const Sequence< sal_uInt32 >& aSeq) throw( RuntimeException) { sal_uInt32 _x; for( sal_Int16 i= 0; i < aSeq.getLength(); i++){ @@ -489,7 +489,7 @@ Sequence< sal_uInt32 > SAL_CALL OComponent::methodULong(const Sequence< sal_uInt } return aSeq; } -Sequence< OUString > SAL_CALL OComponent::methodString(const Sequence< OUString >& aSeq) throw( RuntimeException) +Sequence< OUString > SAL_CALL OComponent::methodString(const Sequence< OUString >& aSeq) throw( RuntimeException) { OUString _x; for( sal_Int16 i= 0; i < aSeq.getLength(); i++) { @@ -497,7 +497,7 @@ Sequence< OUString > SAL_CALL OComponent::methodString(const Sequence< OUString } return aSeq; } -Sequence< sal_Unicode > SAL_CALL OComponent::methodChar(const Sequence< sal_Unicode >& aSeq) throw( RuntimeException) +Sequence< sal_Unicode > SAL_CALL OComponent::methodChar(const Sequence< sal_Unicode >& aSeq) throw( RuntimeException) { sal_Unicode _x; for( sal_Int16 i= 0; i < aSeq.getLength(); i++){ @@ -505,7 +505,7 @@ Sequence< sal_Unicode > SAL_CALL OComponent::methodChar(const Sequence< sal_Unic } return aSeq; } -Sequence< Any > SAL_CALL OComponent::methodAny(const Sequence< Any >& aSeq) throw( RuntimeException) +Sequence< Any > SAL_CALL OComponent::methodAny(const Sequence< Any >& aSeq) throw( RuntimeException) { Any _x; for( sal_Int16 i= 0; i < aSeq.getLength(); i++){ @@ -527,7 +527,7 @@ Sequence< Type > SAL_CALL OComponent::methodType(const Sequence< Type >& aSeq) t return aSeq; } //Sequence< Reference< XInterface> > SAL_CALL methodXInterface ( const Sequence< Reference < XInterface> >& aSeq) -// throw (RuntimeException) +// throw (RuntimeException) Sequence< Reference< XInterface > > SAL_CALL OComponent::methodXInterface( const Sequence< Reference< XInterface > >& aSeq ) throw(RuntimeException) { for( sal_Int32 i= 0; i < aSeq.getLength(); i++) @@ -540,7 +540,7 @@ Sequence< Reference< XInterface > > SAL_CALL OComponent::methodXInterface( const return aSeq; } -Sequence< Sequence< sal_Int32 > > SAL_CALL OComponent::methodSequence(const Sequence< Sequence< sal_Int32 > >& aSeq) throw( RuntimeException) +Sequence< Sequence< sal_Int32 > > SAL_CALL OComponent::methodSequence(const Sequence< Sequence< sal_Int32 > >& aSeq) throw( RuntimeException) { sal_Int32 value; for( sal_Int16 i= 0; i < aSeq.getLength(); i++){ @@ -551,7 +551,7 @@ Sequence< Sequence< sal_Int32 > > SAL_CALL OComponent::methodSequence(const Sequ } return aSeq; } -Sequence< Sequence< Sequence< sal_Int32 > > > SAL_CALL OComponent::methodSequence2(const Sequence< Sequence< Sequence< sal_Int32 > > >& aSeq) +Sequence< Sequence< Sequence< sal_Int32 > > > SAL_CALL OComponent::methodSequence2(const Sequence< Sequence< Sequence< sal_Int32 > > >& aSeq) throw( RuntimeException ) { sal_Int32 value; @@ -577,10 +577,10 @@ Sequence< Reference< XEventListener> > SAL_CALL OComponent::methodXEventListener for( int i= 0; i < aSeq.getLength(); i++) { listener= aSeq[i]; - + listener->disposing( EventObject() ); } - + return aSeq; } @@ -589,7 +589,7 @@ Sequence< Sequence<Reference<XEventListener > > > SAL_CALL OComponent::methodXEv Reference<XEventListener> listener; for( int i= 0; i < aSeq.getLength(); i++) { - Sequence<Reference<XEventListener> > seqInner= aSeq[i]; + Sequence<Reference<XEventListener> > seqInner= aSeq[i]; for( int j= 0; j < seqInner.getLength(); j++) { listener= seqInner[j]; @@ -601,7 +601,7 @@ Sequence< Sequence<Reference<XEventListener > > > SAL_CALL OComponent::methodXEv //--------------------------------------------------------------------------------------------- -Sequence< sal_Int8 > SAL_CALL OComponent::getAttrByte(void) throw( RuntimeException) +Sequence< sal_Int8 > SAL_CALL OComponent::getAttrByte(void) throw( RuntimeException) { return m_seqByte; } @@ -627,8 +627,8 @@ void SAL_CALL OComponent::setAttrDouble(const Sequence< double >& AttrDouble_) t m_seqDouble= AttrDouble_; } -Sequence< sal_Bool > SAL_CALL OComponent::getAttrBool(void) throw( RuntimeException) -{ +Sequence< sal_Bool > SAL_CALL OComponent::getAttrBool(void) throw( RuntimeException) +{ return m_seqBool; } @@ -637,7 +637,7 @@ void SAL_CALL OComponent::setAttrBool(const Sequence< sal_Bool >& AttrBool_) thr m_seqBool= AttrBool_; } -Sequence< sal_Int16 > SAL_CALL OComponent::getAttrShort(void) throw( RuntimeException) +Sequence< sal_Int16 > SAL_CALL OComponent::getAttrShort(void) throw( RuntimeException) { return m_seqShort; } @@ -655,7 +655,7 @@ void SAL_CALL OComponent::setAttrUShort(const Sequence< sal_uInt16 >& AttrUShort m_seqUShort= AttrUShort_; } -Sequence< sal_Int32 > SAL_CALL OComponent::getAttrLong(void) throw( RuntimeException) +Sequence< sal_Int32 > SAL_CALL OComponent::getAttrLong(void) throw( RuntimeException) { return m_seqLong; } @@ -686,12 +686,12 @@ Sequence< sal_Unicode > SAL_CALL OComponent::getAttrChar(void) throw( RuntimeEx { return m_seqChar; } -void SAL_CALL OComponent::setAttrChar(const Sequence< sal_Unicode >& AttrChar_) throw( RuntimeException) +void SAL_CALL OComponent::setAttrChar(const Sequence< sal_Unicode >& AttrChar_) throw( RuntimeException) { m_seqChar= AttrChar_; } -Sequence< Any > SAL_CALL OComponent::getAttrAny(void) throw( RuntimeException) +Sequence< Any > SAL_CALL OComponent::getAttrAny(void) throw( RuntimeException) { return m_seqAny; } @@ -711,7 +711,7 @@ void SAL_CALL OComponent::setAttrType( const Sequence< Type >& AttrType_) throw( } -Sequence< Sequence< sal_Int32 > > SAL_CALL OComponent::getAttrSequence(void) throw( RuntimeException) +Sequence< Sequence< sal_Int32 > > SAL_CALL OComponent::getAttrSequence(void) throw( RuntimeException) { return m_seq1; } @@ -735,7 +735,7 @@ Sequence< Sequence< Sequence< sal_Int32 > > > SAL_CALL OComponent::getAttrSequen { return m_seq2; } -void SAL_CALL OComponent::setAttrSequence2(const Sequence< Sequence< Sequence< sal_Int32 > > >& AttrSequence2_) +void SAL_CALL OComponent::setAttrSequence2(const Sequence< Sequence< Sequence< sal_Int32 > > >& AttrSequence2_) throw( RuntimeException ) { m_seq2= AttrSequence2_; @@ -771,7 +771,7 @@ void SAL_CALL OComponent::setAFloat( float _afloat ) throw (RuntimeException) { m_attr_float = _afloat; } - + double SAL_CALL OComponent::getADouble() throw (RuntimeException) { return m_attr_double; @@ -943,7 +943,7 @@ void SAL_CALL OComponent::testout_methodChar(sal_Unicode& rOut) throw( RuntimeEx { rOut= m_char; } -void SAL_CALL OComponent::testout_methodAny(Any& rOut) throw( RuntimeException) +void SAL_CALL OComponent::testout_methodAny(Any& rOut) throw( RuntimeException) { rOut = m_any; } @@ -953,7 +953,7 @@ void SAL_CALL OComponent::testout_methodType(Type& rOut) throw( RuntimeException rOut = m_type; } -void SAL_CALL OComponent::testout_methodSequence(Sequence< sal_Int32 >& rOut) throw( RuntimeException) +void SAL_CALL OComponent::testout_methodSequence(Sequence< sal_Int32 >& rOut) throw( RuntimeException) { rOut.realloc(10); for( sal_Int16 i= 0; i < rOut.getLength(); i++) rOut.getArray()[i]= i; @@ -993,9 +993,9 @@ void SAL_CALL OComponent::testout_methodMulParams4( float in1, float& out1, sal_ void SAL_CALL OComponent::testout_methodXInterface( Reference< XInterface >& rOut ) throw(RuntimeException) { rOut = m_xinterface; -// OUString string( L"Property Any"); -// m_any <<= string; -// rOut= Reference<XInterface> (static_cast<XTestSequence*>(this), UNO_QUERY); +// OUString string( L"Property Any"); +// m_any <<= string; +// rOut= Reference<XInterface> (static_cast<XTestSequence*>(this), UNO_QUERY); } // XTestInParameters ------------------------------------------------------------ @@ -1023,7 +1023,7 @@ sal_Int16 SAL_CALL OComponent::in_methodShort( sal_Int16 rIn ) throw (RuntimeExc { m_int16 = rIn; return rIn; -} +} sal_uInt16 SAL_CALL OComponent::in_methodUShort( sal_uInt16 rIn ) throw (RuntimeException) { m_uint16 = rIn; @@ -1187,19 +1187,19 @@ void SAL_CALL OComponent::testinout_methodString(OUString& rOut) throw( RuntimeE rOut = m_string; m_string = tmp; } -void SAL_CALL OComponent::testinout_methodChar(sal_Unicode& rOut) throw( RuntimeException) +void SAL_CALL OComponent::testinout_methodChar(sal_Unicode& rOut) throw( RuntimeException) { sal_Unicode tmp = rOut; rOut = m_char; m_char = tmp; } -void SAL_CALL OComponent::testinout_methodAny(Any& rOut) throw( RuntimeException) +void SAL_CALL OComponent::testinout_methodAny(Any& rOut) throw( RuntimeException) { Any tmp = rOut; rOut = m_any; m_any = tmp; } -void SAL_CALL OComponent::testinout_methodType(Type& rOut) throw( RuntimeException) +void SAL_CALL OComponent::testinout_methodType(Type& rOut) throw( RuntimeException) { Type tmp = rOut; rOut = m_type; @@ -1207,9 +1207,9 @@ void SAL_CALL OComponent::testinout_methodType(Type& rOut) throw( RuntimeExcepti } -void SAL_CALL OComponent::testinout_methodSequence(Sequence< sal_Int32 >& rOut) throw( RuntimeException) +void SAL_CALL OComponent::testinout_methodSequence(Sequence< sal_Int32 >& rOut) throw( RuntimeException) { - + sal_Int32* arr= rOut.getArray(); for ( sal_Int32 i=0; i < rOut.getLength(); i++) { @@ -1250,27 +1250,27 @@ void SAL_CALL OComponent::testinout_methodXInterface2( Reference< XInterface > & Reference<XInterface> tmp = rOut; rOut = m_xinterface; m_xinterface = tmp; -// Reference<XTestSequence> xTest( rOut, UNO_QUERY); -// if( xTest.is()) -// { -// Any any= xTest->getAttrAny2(); -// OUString _s; -// any >>= _s; -// OUString string= _s + OUString((L" this string was written in the UNO component to the inout pararmeter")); -// any <<= string; -// xTest->setAttrAny2( any); -// } - -} -Any SAL_CALL OComponent::methodAnyTest1(const Any& rIn) throw( RuntimeException ) +// Reference<XTestSequence> xTest( rOut, UNO_QUERY); +// if( xTest.is()) +// { +// Any any= xTest->getAttrAny2(); +// OUString _s; +// any >>= _s; +// OUString string= _s + OUString((L" this string was written in the UNO component to the inout pararmeter")); +// any <<= string; +// xTest->setAttrAny2( any); +// } + +} +Any SAL_CALL OComponent::methodAnyTest1(const Any& rIn) throw( RuntimeException ) { return rIn; } -Any SAL_CALL OComponent::getAttrAny2(void) throw( RuntimeException ) +Any SAL_CALL OComponent::getAttrAny2(void) throw( RuntimeException ) { return m_any; } -void SAL_CALL OComponent::setAttrAny2(const Any& AttrAny2_) throw( RuntimeException ) +void SAL_CALL OComponent::setAttrAny2(const Any& AttrAny2_) throw( RuntimeException ) { m_any= AttrAny2_; } @@ -1297,7 +1297,7 @@ Property SAL_CALL OComponent::retMethodStruct(void) throw( RuntimeException ) return a; } -Property SAL_CALL OComponent::getAttrStruct(void) throw( RuntimeException) +Property SAL_CALL OComponent::getAttrStruct(void) throw( RuntimeException) { Property a(L"OleTest_Property", 255, getCppuType( (Reference<XInterface>*)0), PropertyAttribute::MAYBEVOID | PropertyAttribute::BOUND | PropertyAttribute::CONSTRAINED | @@ -1313,7 +1313,7 @@ void SAL_CALL OComponent::setAttrStruct(const Property& AttrStruct_) throw( Runt buff[0]= 0; sprintf( buff,"Property::Attribute : %d \n Property::Handle : %d \n Property::Name : %S", AttrStruct_.Attributes, AttrStruct_.Handle, (const sal_Unicode*)AttrStruct_.Name); -// MessageBox( NULL, A2T(buff), _T("OleTest: setAttrStruct"), MB_OK); +// MessageBox( NULL, A2T(buff), _T("OleTest: setAttrStruct"), MB_OK); } Property SAL_CALL OComponent::methodStruct2( const Property& aProp ) throw (RuntimeException) @@ -1347,7 +1347,7 @@ Any SAL_CALL OComponent::other_methodAny( const Any& rAny, const OUString& typeI throw (RuntimeException) { Type expectedType; - typelib_TypeDescription * pDesc= NULL; + typelib_TypeDescription * pDesc= NULL; typelib_typedescription_getByName( &pDesc, typeInAny.pData ); if( pDesc) { @@ -1356,96 +1356,96 @@ Any SAL_CALL OComponent::other_methodAny( const Any& rAny, const OUString& typeI } if (rAny.getValueType() != expectedType) throw RuntimeException(); - + return rAny; } // XTestOutParameters ============================================================================ -// void SAL_CALL OComponent::out_test(sal_Int8 rIn) throw( RuntimeException ) +// void SAL_CALL OComponent::out_test(sal_Int8 rIn) throw( RuntimeException ) // { // } // void SAL_CALL OComponent::out_methodByte(sal_Int8& rOut) throw( RuntimeException ) // { -// rOut= 100; +// rOut= 100; // } // void SAL_CALL OComponent::out_methodDouble(double& rOut) throw( RuntimeException ) // { -// rOut= 3.14; +// rOut= 3.14; // } // void SAL_CALL OComponent::out_methodFloat(float& rOut) throw( RuntimeException ) // { -// rOut= 3.14; +// rOut= 3.14; // } -// void SAL_CALL OComponent::out_methodBool(sal_Bool& rOut) throw( RuntimeException ) +// void SAL_CALL OComponent::out_methodBool(sal_Bool& rOut) throw( RuntimeException ) // { -// rOut= sal_True; +// rOut= sal_True; // } -// void SAL_CALL OComponent::out_methodShort(sal_Int16& rOut) throw( RuntimeException ) +// void SAL_CALL OComponent::out_methodShort(sal_Int16& rOut) throw( RuntimeException ) // { -// rOut= -100; +// rOut= -100; // } -// void SAL_CALL OComponent::out_methodUShort(sal_uInt16& rOut) throw( RuntimeException ) +// void SAL_CALL OComponent::out_methodUShort(sal_uInt16& rOut) throw( RuntimeException ) // { -// rOut= 100; +// rOut= 100; // } -// void SAL_CALL OComponent::out_methodLong(sal_Int32& rOut) throw( RuntimeException ) +// void SAL_CALL OComponent::out_methodLong(sal_Int32& rOut) throw( RuntimeException ) // { -// rOut= -100; +// rOut= -100; // } // void SAL_CALL OComponent::out_methodULong(sal_uInt32& rOut) throw( RuntimeException ) // { -// rOut= 100; +// rOut= 100; // } // void SAL_CALL OComponent::out_methodHyper(sal_Int64& rOut) throw( RuntimeException ) // { - + // } // void SAL_CALL OComponent::out_methodUHyper(sal_uInt64& rOut) throw( RuntimeException ) // { // } -// void SAL_CALL OComponent::out_methodString(OUString& rOut) throw( RuntimeException ) +// void SAL_CALL OComponent::out_methodString(OUString& rOut) throw( RuntimeException ) // { -// rOut= L"I'm a string"; +// rOut= L"I'm a string"; // } -// void SAL_CALL OComponent::out_methodChar(sal_Unicode& rOut) throw( RuntimeException ) +// void SAL_CALL OComponent::out_methodChar(sal_Unicode& rOut) throw( RuntimeException ) // { -// rOut= 'A'; +// rOut= 'A'; // } // void SAL_CALL OComponent::out_methodAny(Any& rOut) throw( RuntimeException) // { -// Any a; +// Any a; // a <<= OUString( L"Hi"); -// rOut= a; +// rOut= a; // } // void SAL_CALL OComponent::out_methodSequence(Sequence< sal_Int32 >& rOut) throw( RuntimeException ) // { -// Sequence< sal_Int32 > aseq(10); -// for( sal_Int16 i= 0; i < aseq.getLength(); i++) aseq.getArray()[i]= i; -// rOut= aseq; +// Sequence< sal_Int32 > aseq(10); +// for( sal_Int16 i= 0; i < aseq.getLength(); i++) aseq.getArray()[i]= i; +// rOut= aseq; // } // void SAL_CALL OComponent::out_methodSequence2(Sequence< Sequence< sal_Int32 > >& rOut) throw( RuntimeException ) // { -// rOut= Sequence< Sequence< sal_Int32 > >(); +// rOut= Sequence< Sequence< sal_Int32 > >(); // } // void SAL_CALL OComponent::out_methodMulParams1(sal_Int32& rout1, sal_Int32& rout2) throw( RuntimeException ) // { -// rout1= 111; -// rout2= 222; +// rout1= 111; +// rout2= 222; // } // void SAL_CALL OComponent::out_methodMulParams2(sal_Int32& rout1, sal_Int32& rout2, OUString& rout3) throw( RuntimeException ) // { -// rout1= 111; -// rout2= 222; -// rout3= L"this is a neet little string"; +// rout1= 111; +// rout2= 222; +// rout3= L"this is a neet little string"; // } // void SAL_CALL OComponent::out_methodMulParams3(const OUString& sin, OUString& sout) throw( RuntimeException ) // { -// sout= L"this is a neet little string"; +// sout= L"this is a neet little string"; // } // XTestInterfaces ------------------------------------------------------------------------------------- @@ -1469,15 +1469,15 @@ void SAL_CALL OComponent::testInterface( const Reference< XCallback >& xCallbac sal_Int8 aByte; sal_Int16 aShort; sal_Int32 aLong; -// sal_uInt16 aUShort; -// sal_uInt32 aULong; +// sal_uInt16 aUShort; +// sal_uInt32 aULong; switch( mode) { case 1: xCallback->func1(); break; case 2: - xSimple= xCallback->returnInterface(); + xSimple= xCallback->returnInterface(); xSimple->func(L"XCallback::returnInterface"); break; @@ -1579,23 +1579,23 @@ void SAL_CALL OComponent::testInterface( const Reference< XCallback >& xCallbac SimpleStruct aSimpleStruct; SimpleEnum aSimpleEnum; Sequence<Any> seqAny; - Any aAny; - sal_Bool aBool; + Any aAny; + sal_Bool aBool; sal_Unicode aChar; - OUString aString; - float aFloat; - double aDouble; - sal_Int8 aByte; - sal_Int16 aShort; - sal_Int32 aLong; -// sal_uInt16 aUShort; -// sal_uInt32 aULong; + OUString aString; + float aFloat; + double aDouble; + sal_Int8 aByte; + sal_Int16 aShort; + sal_Int32 aLong; +// sal_uInt16 aUShort; +// sal_uInt32 aULong; xCallback->outValuesAll( xSimple, aSimpleStruct, aSimpleEnum, seqAny, aAny, aBool, aChar, aString, aFloat, aDouble, aByte, aShort, aLong); - + MessageBox( NULL, _T("XCallback::outValuesAll returned"), _T("OleTest::testInterface"), MB_OK); break; } @@ -1647,7 +1647,7 @@ void SAL_CALL OComponent::testInterface( const Reference< XCallback >& xCallbac // a Struct should now contain a different message MessageBox( NULL, W2T(aStruct.message), _T("OleTest in out parameter"), MB_OK); } - + } break; } @@ -1684,7 +1684,7 @@ void SAL_CALL OComponent::testInterface( const Reference< XCallback >& xCallbac } } - + break; } case 104: @@ -1815,10 +1815,10 @@ void SAL_CALL OComponent::testInterface( const Reference< XCallback >& xCallbac sal_Int16 aShort= 0xff; sal_Int32 aLong= 0xffe; - xCallback->inoutValuesAll( aXSimple, aStruct, aEnum, aSeq, - aAny, aBool, aChar, aString, aFloat, aDouble, + xCallback->inoutValuesAll( aXSimple, aStruct, aEnum, aSeq, + aAny, aBool, aChar, aString, aFloat, aDouble, aByte, aShort, aLong ); - + aXSimple->func(L"XSimple called from OleTest"); MessageBox( NULL, W2T(aStruct.message), _T("OleTest"), MB_OK); @@ -1856,7 +1856,7 @@ void SAL_CALL OComponent::testInterface( const Reference< XCallback >& xCallbac const int LISTENERS= 3; Reference<XEventListener> arListeners[LISTENERS]; EventObject arEvents[LISTENERS]; - + for( int i= 0; i < LISTENERS; i++) { Reference<XInterface> aList= static_cast<XWeak*>( new EventListener()); @@ -1867,7 +1867,7 @@ void SAL_CALL OComponent::testInterface( const Reference< XCallback >& xCallbac Sequence<EventObject>(arEvents, LISTENERS)); break; } - + // ############################################################################ // Call a COM object that has not been passed as parameter to a UNO component and // hence no type information are available in the COM wrapper @@ -1875,30 +1875,30 @@ void SAL_CALL OComponent::testInterface( const Reference< XCallback >& xCallbac case 300: { Reference<XInterface> xIntFact = m_rFactory->createInstance(L"com.sun.star.bridge.oleautomation.Factory"); - + Reference<XMultiServiceFactory> oleFact(xIntFact, UNO_QUERY); Reference<XInterface> xIntCallback= oleFact->createInstance(L"XCallback_Impl.Callback"); Reference<XInvocation> xInv( xIntCallback, UNO_QUERY); //Any SAL_CALL invoke( const OUString& aFunctionName, const Sequence<Any >& aParams,Sequence< sal_Int16 >& aOutParamIndex, -// Sequence<Any >& aOutParam ); +// Sequence<Any >& aOutParam ); Sequence<sal_Int16> seqIndizes; Sequence<Any> seqOutParams; xInv->invoke( OUString( L"outValuesAll"), Sequence<Any>(), seqIndizes, seqOutParams); -// void outValuesAll( [out] oletest::XSimple outInterface, -// [out] SimpleStruct outStruct , -// [out] SimpleEnum outEnum, -// [out] sequence<any> outSeqAny, -// [out] any outAny, -// [out] boolean outBool, -// [out] char outChar, -// [out] string outString, -// [out] float outFloat, -// [out] double outDouble, -// [out] byte outByte, -// [out] short outShort, -// [out] long outLong); +// void outValuesAll( [out] oletest::XSimple outInterface, +// [out] SimpleStruct outStruct , +// [out] SimpleEnum outEnum, +// [out] sequence<any> outSeqAny, +// [out] any outAny, +// [out] boolean outBool, +// [out] char outChar, +// [out] string outString, +// [out] float outFloat, +// [out] double outDouble, +// [out] byte outByte, +// [out] short outShort, +// [out] long outLong); if( seqOutParams.getLength() == 12) { Reference<XSimple> xSimple= *(XSimple**)seqOutParams[0].getValue(); @@ -1914,7 +1914,7 @@ void SAL_CALL OComponent::testInterface( const Reference< XCallback >& xCallbac OUString _s; seqAny[i] >>= _s; } - + Any _any= *(Any*)seqOutParams[4].getValue(); sal_Bool _bool= *(sal_Bool*)seqOutParams[5].getValue(); sal_Unicode _char= *( sal_Unicode*) seqOutParams[6].getValue(); @@ -1934,7 +1934,7 @@ void SAL_CALL OComponent::testInterface( const Reference< XCallback >& xCallbac // in / out parameter { Reference<XInterface> xIntFact = m_rFactory->createInstance(L"com.sun.star.bridge.oleautomation.Factory"); - + Reference<XMultiServiceFactory> oleFact(xIntFact, UNO_QUERY); Reference<XInterface> xIntCallback= oleFact->createInstance(L"XCallback_Impl.Callback"); @@ -1970,7 +1970,7 @@ void SAL_CALL OComponent::testInterface( const Reference< XCallback >& xCallbac arSeqAny[0] <<= OUString( L"string 0"); arSeqAny[1] <<= OUString( L"string 1"); arSeqAny[2] <<= OUString( L"string 2"); - + arAny[3] <<= Sequence< Any >( arAny, 3); OUString str(L" Ein Any param"); @@ -1989,9 +1989,9 @@ void SAL_CALL OComponent::testInterface( const Reference< XCallback >& xCallbac arAny[11] <<= _short; sal_Int32 _long= -1; arAny[12] <<= _long; -// +// Sequence<Any> params( arAny, 13); - + xInv->invoke( OUString( L"inoutValuesAll"), params, seqIndizes, seqOutParams); if( seqOutParams.getLength() == 12) @@ -2009,7 +2009,7 @@ void SAL_CALL OComponent::testInterface( const Reference< XCallback >& xCallbac OUString _s; seqAny[i] >>= _s; } - + Any _any= *(Any*)seqOutParams[4].getValue(); sal_Bool _bool= *(sal_Bool*)seqOutParams[5].getValue(); sal_Unicode _char= *( sal_Unicode*) seqOutParams[6].getValue(); @@ -2027,11 +2027,11 @@ void SAL_CALL OComponent::testInterface( const Reference< XCallback >& xCallbac } case 303: // in parameter -// void inValues( [in] char aChar, [in] long aLong, [in] string aString); +// void inValues( [in] char aChar, [in] long aLong, [in] string aString); { Reference<XInterface> xIntFact = m_rFactory->createInstance( L"com.sun.star.bridge.oleautomation.Factory"); - + Reference<XMultiServiceFactory> oleFact(xIntFact, UNO_QUERY); Reference<XInterface> xIntCallback= oleFact->createInstance(L"XCallback_Impl.Callback"); @@ -2056,7 +2056,7 @@ void SAL_CALL OComponent::testInterface( const Reference< XCallback >& xCallbac // ############################################################################ case 400: - Reference<XSimple> simple= xCallback->getsimple(); + Reference<XSimple> simple= xCallback->getsimple(); simple->func(L"OleTest calls on XSimple"); break; diff --git a/extensions/test/ole/cppToUno/testcppuno.cxx b/extensions/test/ole/cppToUno/testcppuno.cxx index 6c4745a0f5cd..d1606c343d73 100644 --- a/extensions/test/ole/cppToUno/testcppuno.cxx +++ b/extensions/test/ole/cppToUno/testcppuno.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -70,14 +70,14 @@ int __cdecl _tmain( int /*argc*/, _TCHAR * /*argv[]*/ ) return -1; } - + if( FAILED(hr=doTest())) { _com_error err( hr); const TCHAR * errMsg= err.ErrorMessage(); MessageBox( NULL, errMsg, "Test failed", MB_ICONERROR); } - + CoUninitialize(); return 0; } @@ -104,11 +104,11 @@ HRESULT doTest() // disp contains now oletest.OleTest - // one dimensional array + // one dimensional array par= SafeArrayCreateVector( VT_UI1, 0, 5); unsigned char arbyte[]= { 1,2,3,4,5}; for(long i= 0; i < 5;i++) - hr= SafeArrayPutElement( par, &i, &arbyte[i]); + hr= SafeArrayPutElement( par, &i, &arbyte[i]); result.Clear(); param1.vt= VT_ARRAY| VT_UI1; @@ -131,7 +131,7 @@ HRESULT doTest() long uBound2; hr= SafeArrayGetUBound( par, 1, &uBound1); hr= SafeArrayGetUBound( par, 2, &uBound2); - + long index2[2]; memset( index2, 0, 2 * sizeof( long) ); long dimLengths[]={3,2}; @@ -147,28 +147,28 @@ HRESULT doTest() long (*dataL)[2][3]; hr= SafeArrayAccessData( par, (void**)&pdata); dataL= (long(*)[2][3])pdata; - + for (long i= 0; i < 2; i ++) { for(long j= 0; j < 3; j++) data= (*dataL)[i][j]; } hr= SafeArrayUnaccessData(par); - + result.Clear(); param1.vt= VT_ARRAY | VT_I4; param1.byref= par; disp.Invoke1(L"methodSequence", ¶m1, &result); - + SAFEARRAY* arRet= result.parray; - + for(long i= 0; i < 2 ; i++) { CComVariant varx; varx.Clear(); hr= SafeArrayGetElement( arRet, &i, &varx); SAFEARRAY* ari= varx.parray; - + for( j= 0; j < 3; j++) { CComVariant varj; @@ -188,7 +188,7 @@ HRESULT doTest() // left index is least significant bool incrementMultidimensionalIndex( sal_Int32 dimensions, - const sal_Int32 * parDimensionLengths, + const sal_Int32 * parDimensionLengths, sal_Int32 * parMultidimensionalIndex) { if( dimensions < 1) @@ -196,7 +196,7 @@ bool incrementMultidimensionalIndex( bool ret= sal_True; bool carry= sal_True; // to get into the while loop - + sal_Int32 currentDimension= 0; //most significant is 1 while( carry) { diff --git a/extensions/test/ole/cpptest/cpptest.cxx b/extensions/test/ole/cpptest/cpptest.cxx index ef6f44e5d1c7..9582415dfdfe 100644 --- a/extensions/test/ole/cpptest/cpptest.cxx +++ b/extensions/test/ole/cpptest/cpptest.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -57,7 +57,7 @@ int main(int /*argc*/, char** /*argv*/) const TCHAR * errMsg= err.ErrorMessage(); MessageBox( NULL, errMsg, "Test failed", MB_ICONERROR); } - + CoUninitialize(); return 0; } @@ -82,7 +82,7 @@ HRESULT doTest() _variant_t varP1(L"com.sun.star.frame.Desktop"); _variant_t varRet; CComDispatchDriver dispMgr(starManager); - if (FAILED(hr= dispMgr.Invoke1(L"createInstance", &varP1, &varRet))) + if (FAILED(hr= dispMgr.Invoke1(L"createInstance", &varP1, &varRet))) { fprintf(stderr,"createInstance of Desktop failed\n"); return hr; @@ -110,7 +110,7 @@ HRESULT doTest() CComDispatchDriver dispDoc(varRet.pdispVal); varRet.Clear(); return S_OK; - + } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/extensions/test/ole/idl/oletest.idl b/extensions/test/ole/idl/oletest.idl index 61d668dc0580..c62c236de052 100644 --- a/extensions/test/ole/idl/oletest.idl +++ b/extensions/test/ole/idl/oletest.idl @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -46,8 +46,8 @@ interface XTestSequence: com::sun::star::uno::XInterface sequence<unsigned long> methodULong( [in] sequence<unsigned long> aSeq); sequence<string> methodString( [in] sequence<string> aSeq); sequence<char> methodChar( [in] sequence<char> aSeq); - sequence<any> methodAny ( [in] sequence<any> aSeq); - sequence<type> methodType ( [in] sequence<type> aSeq); + sequence<any> methodAny ( [in] sequence<any> aSeq); + sequence<type> methodType ( [in] sequence<type> aSeq); sequence<com::sun::star::uno::XInterface> methodXInterface ( [in] sequence<com::sun::star::uno::XInterface> aSeq); sequence< sequence <long> > methodSequence( [in] sequence< sequence< long > > aSeq); sequence< sequence <sequence <long> > > methodSequence2( [in] sequence< sequence< sequence<long> > > aSeq); @@ -83,7 +83,7 @@ interface XTestSequence: com::sun::star::uno::XInterface [attribute] any AAny; [attribute] type AType; [attribute] com::sun::star::uno::XInterface AXInterface; - [attribute] com::sun::star::script::XInvocation AXInvocation; + [attribute] com::sun::star::script::XInvocation AXInvocation; void testout_methodByte( [out] byte rOut ); void testout_methodFloat( [out] float rOut); @@ -97,8 +97,8 @@ interface XTestSequence: com::sun::star::uno::XInterface void testout_methodUHyper( [out] unsigned hyper rOut); void testout_methodString( [out] string rOut); void testout_methodChar( [out] char rOut); - void testout_methodAny ( [out] any rOut); - void testout_methodType ( [out] type rOut); + void testout_methodAny ( [out] any rOut); + void testout_methodType ( [out] type rOut); void testout_methodSequence( [out] sequence< long > rOut); void testout_methodSequence2( [out] sequence < sequence< long > > rOut); void testout_methodXInterface( [out] com::sun::star::uno::XInterface rOut); @@ -120,8 +120,8 @@ interface XTestSequence: com::sun::star::uno::XInterface void testinout_methodUHyper( [inout] unsigned hyper rOut); void testinout_methodString( [inout] string rOut); void testinout_methodChar( [inout] char rOut); - void testinout_methodAny ( [inout] any rOut); - void testinout_methodType ( [inout] type rOut); + void testinout_methodAny ( [inout] any rOut); + void testinout_methodType ( [inout] type rOut); void testinout_methodSequence( [inout] sequence< long > rOut); void testinout_methodSequence2( [inout] sequence < sequence< long > > rOut); void testinout_methodXInterface( [inout] com::sun::star::script::XInvocation rOut); @@ -135,7 +135,7 @@ interface XTestStruct: com::sun::star::uno::XInterface { // Method taking structs as arguments void methodStruct( [in] com::sun::star::beans::Property aProp); -// Methods returning structs +// Methods returning structs com::sun::star::beans::Property retMethodStruct(); // Attributes as structs [attribute] com::sun::star::beans::Property AttrStruct; @@ -163,8 +163,8 @@ interface XTestInParameters: com::sun::star::uno::XInterface unsigned hyper in_methodUHyper( [in] unsigned hyper rIn); string in_methodString( [in] string rIn); char in_methodChar( [in] char rIn); - any in_methodAny ( [in] any rIn); - type in_methodType ( [in] type rIn); + any in_methodAny ( [in] any rIn); + type in_methodType ( [in] type rIn); com::sun::star::uno::XInterface in_methodXInterface([in] com::sun::star::uno::XInterface rIn); com::sun::star::script::XInvocation in_methodInvocation( [in] com::sun::star::script::XInvocation inv); SimpleStruct in_methodStruct( [in] SimpleStruct aStruct); @@ -242,7 +242,7 @@ interface XCallback: com::sun::star::uno::XInterface [out] string outString, [out] float outFloat, [out] double outDouble, - [out] byte outByte, + [out] byte outByte, [out] short outShort, [out] long outLong); // IN OUT parameters @@ -280,7 +280,7 @@ interface XCallback: com::sun::star::uno::XInterface void inSeqByte( [in] sequence<byte> val); void inSeqXEventListener( [in] sequence<com::sun::star::lang::XEventListener> listener, [in] sequence<com::sun::star::lang::EventObject> events); - + // Attributes [attribute] oletest::XSimple simple; diff --git a/extensions/test/ole/unloading/unloadTest.cxx b/extensions/test/ole/unloading/unloadTest.cxx index 85f2de33db47..ccedf0bd2f74 100644 --- a/extensions/test/ole/unloading/unloadTest.cxx +++ b/extensions/test/ole/unloading/unloadTest.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -89,7 +89,7 @@ sal_Bool test1() osl_unloadModule( hMod); rtl_unloadUnusedModules( NULL); - + OUString sFactoryFunc( RTL_CONSTASCII_USTRINGPARAM("component_getFactory")); void* pSymbol= osl_getSymbol( hMod,sFactoryFunc.pData); // true, instance alive @@ -145,7 +145,7 @@ sal_Bool test3() Reference<XSimpleRegistry> xreg= createSimpleRegistry(); xreg->open( OUString( RTL_CONSTASCII_USTRINGPARAM("services.rdb")), sal_False, sal_False ); - + Reference< XComponentContext > context= bootstrap_InitialComponentContext(xreg); Reference<XMultiComponentFactory> fac= context->getServiceManager(); @@ -172,18 +172,18 @@ sal_Bool test3() Reference<XComponent> xcomp( context, UNO_QUERY); xcomp->dispose(); -// for (int i=0; i < 10; i++) -// { -// Reference<XSimpleRegistry> xreg= createSimpleRegistry(); -// xreg->open( OUString( RTL_CONSTASCII_USTRINGPARAM("applicat.rdb")), -// sal_False, sal_False ); -// Reference< XComponentContext > context= bootstrap_InitialComponentContext(xreg); -// Reference<XComponent> xcomp( context, UNO_QUERY); -// xcomp->dispose(); +// for (int i=0; i < 10; i++) +// { +// Reference<XSimpleRegistry> xreg= createSimpleRegistry(); +// xreg->open( OUString( RTL_CONSTASCII_USTRINGPARAM("applicat.rdb")), +// sal_False, sal_False ); +// Reference< XComponentContext > context= bootstrap_InitialComponentContext(xreg); +// Reference<XComponent> xcomp( context, UNO_QUERY); +// xcomp->dispose(); // -// } +// } -// return sal_True; +// return sal_True; return bTest1 && bTest2; } @@ -217,7 +217,7 @@ sal_Bool test4() // ApplicationRegistration is a one-instance-service, therefore kill service manager first Reference<XComponent> xcomp( context, UNO_QUERY); xcomp->dispose(); - + } rtl_unloadUnusedModules( NULL); pSymbol= osl_getSymbol( hMod,sFactoryFunc.pData); diff --git a/extensions/test/ole/unoTocomCalls/Test/StdAfx.cpp b/extensions/test/ole/unoTocomCalls/Test/StdAfx.cpp index a5d05fe90aa9..36ed10eddb1a 100644 --- a/extensions/test/ole/unoTocomCalls/Test/StdAfx.cpp +++ b/extensions/test/ole/unoTocomCalls/Test/StdAfx.cpp @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -26,8 +26,8 @@ * ************************************************************************/ // stdafx.cpp : source file that includes just the standard includes -// Test.pch will be the pre-compiled header -// stdafx.obj will contain the pre-compiled type information +// Test.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information #include "stdafx.h" diff --git a/extensions/test/ole/unoTocomCalls/Test/StdAfx.h b/extensions/test/ole/unoTocomCalls/Test/StdAfx.h index 408c5cd1fa87..65fffc04cffe 100644 --- a/extensions/test/ole/unoTocomCalls/Test/StdAfx.h +++ b/extensions/test/ole/unoTocomCalls/Test/StdAfx.h @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -37,7 +37,7 @@ #pragma once #endif // _MSC_VER > 1000 -#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers +#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers #include <stdio.h> #include <windows.h> diff --git a/extensions/test/ole/unoTocomCalls/Test/Test.cpp b/extensions/test/ole/unoTocomCalls/Test/Test.cpp index 27a2229a4d5d..fcb121be6b2a 100644 --- a/extensions/test/ole/unoTocomCalls/Test/Test.cpp +++ b/extensions/test/ole/unoTocomCalls/Test/Test.cpp @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -47,7 +47,7 @@ int main(int argc, char* argv[]) return -1; } - + _Module.Init( ObjectMap, GetModuleHandle( NULL)); if( FAILED(hr=doTest())) @@ -61,7 +61,7 @@ int main(int argc, char* argv[]) _Module.Term(); CoUninitialize(); - + return 0; } @@ -78,7 +78,7 @@ HRESULT doTest() CComDispatchDriver manager( spUnk); CComVariant param( L"oletest.OleTest"); CComVariant retVal; - hr= manager.Invoke1((LPCOLESTR)L"createInstance", ¶m, &retVal ); + hr= manager.Invoke1((LPCOLESTR)L"createInstance", ¶m, &retVal ); CComDispatchDriver oletest( retVal.punkVal); @@ -92,7 +92,7 @@ HRESULT doTest() //###################################################################### - // out parameters + // out parameters //###################################################################### CComVariant param1( paramDisp); CComVariant param2(1); @@ -149,13 +149,13 @@ HRESULT doTest() hr= oletest.Invoke2(L"testInterface", ¶m1, ¶m2); // XCallback::outSeqByte - // Does not work currently because Sequences are always converted to + // Does not work currently because Sequences are always converted to // SAFEARRAY( VARIANT) - // param2= 32; - // hr= oletest.Invoke2(L"testInterface", ¶m1, ¶m2); - + // param2= 32; + // hr= oletest.Invoke2(L"testInterface", ¶m1, ¶m2); + //###################################################################### - // in / out parameters + // in / out parameters //###################################################################### // XCallback::inoutInterface param2= 100; @@ -200,7 +200,7 @@ HRESULT doTest() param2=120; hr= oletest.Invoke2(L"testInterface", ¶m1, ¶m2); //###################################################################### - // in parameters + // in parameters //###################################################################### // XCallback::inValues param2= 200; @@ -213,7 +213,7 @@ HRESULT doTest() param2= 202; hr= oletest.Invoke2(L"testInterface", ¶m1, ¶m2); //###################################################################### - // The UNO test component OleTest calls on XCallback_Impl.Callback directly + // The UNO test component OleTest calls on XCallback_Impl.Callback directly // that is the COM object has not been past a parameter but rather OleTest // creates the COM object itself //###################################################################### @@ -244,6 +244,6 @@ HRESULT doTest() return hr; } // VARIANT CComVariant VT_UNKNOWN VT_DISPATCH V_UI1 CComDispatchDriver WINAPI - + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/extensions/test/ole/unoTocomCalls/XCallback_Impl/Callback.cpp b/extensions/test/ole/unoTocomCalls/XCallback_Impl/Callback.cpp index b8e9847b18a7..ea21a969552e 100644 --- a/extensions/test/ole/unoTocomCalls/XCallback_Impl/Callback.cpp +++ b/extensions/test/ole/unoTocomCalls/XCallback_Impl/Callback.cpp @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -43,7 +43,7 @@ STDMETHODIMP CCallback::func1() STDMETHODIMP CCallback::returnInterface(IDispatch **ppdisp) { if( ! ppdisp) - return E_POINTER; + return E_POINTER; CComPtr<IDispatch> spDisp; spDisp.CoCreateInstance( L"XCallback_Impl.Simple"); *ppdisp= spDisp; @@ -53,15 +53,15 @@ STDMETHODIMP CCallback::returnInterface(IDispatch **ppdisp) STDMETHODIMP CCallback::outInterface(IDispatch **ppdisp) { -// return S_OK; +// return S_OK; if( ! ppdisp) - return E_POINTER; + return E_POINTER; CComPtr<IDispatch> spDisp; spDisp.CoCreateInstance( L"XCallback_Impl.Simple"); *ppdisp= spDisp; (*ppdisp)->AddRef(); -// MessageBox( NULL, _T("CCallback::outInterface"), _T(""), MB_OK); +// MessageBox( NULL, _T("CCallback::outInterface"), _T(""), MB_OK); return S_OK; } @@ -76,7 +76,7 @@ STDMETHODIMP CCallback::outValuesMixed(long val, long *pval, BSTR string) } -STDMETHODIMP CCallback::outValuesAll( +STDMETHODIMP CCallback::outValuesAll( /* [out] */ IDispatch __RPC_FAR *__RPC_FAR *ppdisp, /* [out] */ IDispatch __RPC_FAR *__RPC_FAR *ppSimpleStruct, /* [out] */ long __RPC_FAR *aSimpleEnum, @@ -92,11 +92,11 @@ STDMETHODIMP CCallback::outValuesAll( /* [out] */ long __RPC_FAR *aLong) //) { -// if( ! ppdisp || ! ppSimpleStruct || ! aSimpleEnum || -// ! outSeq || !varAny ||! aBool || ! aChar || -// ! aString || ! aFloat || ! aDouble || ! aByte || -// ! aShort || ! aLong || ! aUShort || ! aULong) -// return E_POINTER; +// if( ! ppdisp || ! ppSimpleStruct || ! aSimpleEnum || +// ! outSeq || !varAny ||! aBool || ! aChar || +// ! aString || ! aFloat || ! aDouble || ! aByte || +// ! aShort || ! aLong || ! aUShort || ! aULong) +// return E_POINTER; HRESULT hr=S_OK; hr= outInterface( ppdisp); @@ -117,11 +117,11 @@ STDMETHODIMP CCallback::outValuesAll( STDMETHODIMP CCallback::outStruct(IDispatch **outStruct) { -// return S_OK; +// return S_OK; if( !outStruct) return E_POINTER; HRESULT hr= E_FAIL; -// MessageBox( NULL, _T("CCallback::outStruct"), _T(""), MB_OK); +// MessageBox( NULL, _T("CCallback::outStruct"), _T(""), MB_OK); CComPtr<IDispatch> _dispMgr; if( SUCCEEDED(hr= _dispMgr.CoCreateInstance(L"com.sun.star.ServiceManager"))) @@ -130,14 +130,14 @@ STDMETHODIMP CCallback::outStruct(IDispatch **outStruct) CComVariant param1(L"com.sun.star.reflection.CoreReflection"); CComVariant varRet; hr= manager.Invoke1( L"createInstance", ¶m1, &varRet); - + CComDispatchDriver reflection( varRet.pdispVal); param1= L"oletest.SimpleStruct"; varRet.Clear(); hr= reflection.Invoke1( L"forName", ¶m1, &varRet); CComDispatchDriver classSimpleStruct( varRet.pdispVal); - + CComPtr<IDispatch> dispStruct; param1.vt= VT_DISPATCH | VT_BYREF; param1.ppdispVal= &dispStruct; @@ -146,7 +146,7 @@ STDMETHODIMP CCallback::outStruct(IDispatch **outStruct) // Set the value CComDispatchDriver simpleStruct( dispStruct); param1=L" this is a property string"; - hr= simpleStruct.PutPropertyByName(L"message", ¶m1); + hr= simpleStruct.PutPropertyByName(L"message", ¶m1); *outStruct= dispStruct; (*outStruct)->AddRef(); hr= S_OK; @@ -165,14 +165,14 @@ STDMETHODIMP CCallback::outEnum(long *outEnum) STDMETHODIMP CCallback::outSeqAny(LPSAFEARRAY* outSeq) { -// _CrtDbgBreak(); +// _CrtDbgBreak(); SAFEARRAY* pArr= SafeArrayCreateVector( VT_VARIANT, 0, 3); CComVariant var[3]; var[0]=L" variant 0"; var[1]=L" variant 1"; var[2]=L"variant 2"; for( long i=0; i<3; i++) - { + { SafeArrayPutElement( pArr, &i, (void*)&var[i]); } @@ -298,7 +298,7 @@ STDMETHODIMP CCallback::inoutStruct(IDispatch **inoutVal) hr= outStruct( &dispStruct.p); var.Clear(); var= L"This struct was created in XCallback_Imp.Callback"; - hr= dispStruct.PutPropertyByName(L"message", &var); + hr= dispStruct.PutPropertyByName(L"message", &var); *inoutVal= dispStruct; (*inoutVal)->AddRef(); @@ -332,7 +332,7 @@ STDMETHODIMP CCallback::inoutSeqAny(LPSAFEARRAY *pArray) var.Clear(); hr= SafeArrayGetElement( *pArray, &i, (void*)&var); } - + SafeArrayDestroy( *pArray); outSeqAny( pArray); @@ -368,7 +368,7 @@ STDMETHODIMP CCallback::inoutChar(short *inoutVal) return E_POINTER; USES_CONVERSION; char buff[256]; - sprintf( buff, "character value: %C", *inoutVal); + sprintf( buff, "character value: %C", *inoutVal); MessageBox( NULL, A2T(buff), _T("XCallback_Impl.Callback"), MB_OK); *inoutVal= L'B'; return S_OK; @@ -426,7 +426,7 @@ STDMETHODIMP CCallback::inoutLong(long* inoutVal) return S_OK; } -STDMETHODIMP CCallback::inoutValuesAll( +STDMETHODIMP CCallback::inoutValuesAll( /* [out][in] */ IDispatch __RPC_FAR *__RPC_FAR *aXSimple, /* [out][in] */ IDispatch __RPC_FAR *__RPC_FAR *aStruct, /* [out][in] */ long __RPC_FAR *aEnum, @@ -457,7 +457,7 @@ STDMETHODIMP CCallback::inoutValuesAll( return S_OK; } - + STDMETHODIMP CCallback::inValues(short aChar, long aLong, BSTR aString) { @@ -504,7 +504,7 @@ STDMETHODIMP CCallback::inSeqXEventListener( LPSAFEARRAY listeners, LPSAFEARRAY CComDispatchDriver disp( varListener.pdispVal); hr= disp.Invoke1(L"disposing", &varEvent); } - + } return S_OK; diff --git a/extensions/test/ole/unoTocomCalls/XCallback_Impl/Callback.h b/extensions/test/ole/unoTocomCalls/XCallback_Impl/Callback.h index 645f62c18c93..02cb6cff483f 100644 --- a/extensions/test/ole/unoTocomCalls/XCallback_Impl/Callback.h +++ b/extensions/test/ole/unoTocomCalls/XCallback_Impl/Callback.h @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -34,7 +34,7 @@ ///////////////////////////////////////////////////////////////////////////// // CCallback -class ATL_NO_VTABLE CCallback : +class ATL_NO_VTABLE CCallback : public CComObjectRootEx<CComSingleThreadModel>, public CComCoClass<CCallback, &CLSID_Callback>, public IDispatchImpl<ICallback, &IID_ICallback, &LIBID_XCALLBACK_IMPLLib> @@ -72,7 +72,7 @@ public: STDMETHOD(inoutEnum)(/*[in,out]*/ long * inoutVal); STDMETHOD(inoutStruct)(/*[in,out]*/ IDispatch** inoutVal); STDMETHOD(inoutInterface)(/*[in,out]*/ IDispatch** ppdisp); - STDMETHOD(inoutValuesAll)( + STDMETHOD(inoutValuesAll)( /* [out][in] */ IDispatch __RPC_FAR *__RPC_FAR *aXSimple, /* [out][in] */ IDispatch __RPC_FAR *__RPC_FAR *aStruct, /* [out][in] */ long __RPC_FAR *aEnum, @@ -86,7 +86,7 @@ public: /* [out][in] */ unsigned char __RPC_FAR *aByte, /* [out][in] */ short __RPC_FAR *aShort, /* [out][in] */ long __RPC_FAR *aLong); - + STDMETHOD(outByte)( unsigned char* outByte); STDMETHOD(outLong)(/*[out]*/ long* outLong); STDMETHOD(outShort)(/*[out]*/ short *outShort); @@ -99,7 +99,7 @@ public: STDMETHOD(outSeqAny)(/*[out]*/LPSAFEARRAY* outSeq); STDMETHOD(outEnum)(/*[out]*/ long* outEnum); STDMETHOD(outStruct)(/*[out]*/ IDispatch** outStruct); - virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE outValuesAll( + virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE outValuesAll( /* [out] */ IDispatch __RPC_FAR *__RPC_FAR *ppdisp, /* [out] */ IDispatch __RPC_FAR *__RPC_FAR *ppSimpleStruct, /* [out] */ long __RPC_FAR *aSimpleEnum, @@ -113,19 +113,19 @@ public: /* [out] */ unsigned char __RPC_FAR *aByte, /* [out] */ short __RPC_FAR *aShort, /* [out] */ long __RPC_FAR *aLong); -// ); +// ); // -// STDMETHOD(outValuesAll)( -// /*[out]*/ IDispatch** ppdisp, -// /*[out]*/ IUnknown** ppSimpleStruct, -// /*[out]*/ long* aSimpleEnum, -// /*[out]*/ VARIANT* ArrayAny, -// /*[out]*/ VARIANT* varAny, -// /*[out]*/ VARIANT_BOOL * aBool, -// /*[out]*/ unsigned short* aChar, -// /*[out]*/ BSTR* aString, /*[out]*/ float* aFloat, -// /*[out]*/ double* aDouble, -// /*[out]*/ signed char* aByte, /*[out]*/ short* aShort, /*[out]*/long* aLong, /*[out]*/ unsigned short* aUShort, /*[out]*/ unsigned long* aULong); +// STDMETHOD(outValuesAll)( +// /*[out]*/ IDispatch** ppdisp, +// /*[out]*/ IUnknown** ppSimpleStruct, +// /*[out]*/ long* aSimpleEnum, +// /*[out]*/ VARIANT* ArrayAny, +// /*[out]*/ VARIANT* varAny, +// /*[out]*/ VARIANT_BOOL * aBool, +// /*[out]*/ unsigned short* aChar, +// /*[out]*/ BSTR* aString, /*[out]*/ float* aFloat, +// /*[out]*/ double* aDouble, +// /*[out]*/ signed char* aByte, /*[out]*/ short* aShort, /*[out]*/long* aLong, /*[out]*/ unsigned short* aUShort, /*[out]*/ unsigned long* aULong); STDMETHOD(outValuesMixed)(/*[in]*/ long val, /*[out]*/ long* pval, /*[in]*/ BSTR string); STDMETHOD(outInterface)(/*[out]*/ IDispatch** ppdisp); STDMETHOD(returnInterface)(/*[out, retval]*/ IDispatch** ppdisp); @@ -133,6 +133,6 @@ public: }; #endif //__CALLBACK_H_ - + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/extensions/test/ole/unoTocomCalls/XCallback_Impl/Simple.cpp b/extensions/test/ole/unoTocomCalls/XCallback_Impl/Simple.cpp index e3a738960ee5..34a5075db803 100644 --- a/extensions/test/ole/unoTocomCalls/XCallback_Impl/Simple.cpp +++ b/extensions/test/ole/unoTocomCalls/XCallback_Impl/Simple.cpp @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -60,9 +60,9 @@ STDMETHODIMP CSimple::func3(BSTR message) STDMETHODIMP CSimple::get__implementedInterfaces(LPSAFEARRAY *pVal) { HRESULT hr= S_OK; - SAFEARRAY *pArr= SafeArrayCreateVector( VT_BSTR, 0, 3); + SAFEARRAY *pArr= SafeArrayCreateVector( VT_BSTR, 0, 3); if( pArr) - { long index=0; + { long index=0; BSTR name1= SysAllocString(L"oletest.XSimple"); BSTR name2= SysAllocString(L"oletest.XSimple2"); BSTR name3= SysAllocString(L"oletest.XSimple3"); diff --git a/extensions/test/ole/unoTocomCalls/XCallback_Impl/Simple.h b/extensions/test/ole/unoTocomCalls/XCallback_Impl/Simple.h index c911cb325240..e76795925573 100644 --- a/extensions/test/ole/unoTocomCalls/XCallback_Impl/Simple.h +++ b/extensions/test/ole/unoTocomCalls/XCallback_Impl/Simple.h @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -34,7 +34,7 @@ ///////////////////////////////////////////////////////////////////////////// // CSimple -class ATL_NO_VTABLE CSimple : +class ATL_NO_VTABLE CSimple : public CComObjectRootEx<CComSingleThreadModel>, public CComCoClass<CSimple, &CLSID_Simple>, public IDispatchImpl<ISimple, &IID_ISimple, &LIBID_XCALLBACK_IMPLLib> @@ -55,8 +55,8 @@ END_COM_MAP() // ISimple public: - - STDMETHOD(get__implementedInterfaces)(/*[out, retval]*/ LPSAFEARRAY *pVal); + + STDMETHOD(get__implementedInterfaces)(/*[out, retval]*/ LPSAFEARRAY *pVal); STDMETHOD(func3)(/*[in]*/ BSTR message); STDMETHOD(func2)(/*[in]*/ BSTR message); STDMETHOD(func)( BSTR message); diff --git a/extensions/test/ole/unoTocomCalls/XCallback_Impl/StdAfx.cpp b/extensions/test/ole/unoTocomCalls/XCallback_Impl/StdAfx.cpp index 38d4c2357e81..902524bdf104 100644 --- a/extensions/test/ole/unoTocomCalls/XCallback_Impl/StdAfx.cpp +++ b/extensions/test/ole/unoTocomCalls/XCallback_Impl/StdAfx.cpp @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/test/ole/unoTocomCalls/XCallback_Impl/StdAfx.h b/extensions/test/ole/unoTocomCalls/XCallback_Impl/StdAfx.h index 0bb223891626..f692fae959e7 100644 --- a/extensions/test/ole/unoTocomCalls/XCallback_Impl/StdAfx.h +++ b/extensions/test/ole/unoTocomCalls/XCallback_Impl/StdAfx.h @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/extensions/test/ole/unoTocomCalls/XCallback_Impl/XCallback_Impl.cpp b/extensions/test/ole/unoTocomCalls/XCallback_Impl/XCallback_Impl.cpp index eb5095730702..78585a01bc83 100644 --- a/extensions/test/ole/unoTocomCalls/XCallback_Impl/XCallback_Impl.cpp +++ b/extensions/test/ole/unoTocomCalls/XCallback_Impl/XCallback_Impl.cpp @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -29,7 +29,7 @@ // Note: Proxy/Stub Information -// To build a separate proxy/stub DLL, +// To build a separate proxy/stub DLL, // run nmake -f XCallback_Implps.mk in the project directory. #include "stdafx.h" diff --git a/extensions/test/ole/unoTocomCalls/XCallback_Impl/XCallback_Impl.idl b/extensions/test/ole/unoTocomCalls/XCallback_Impl/XCallback_Impl.idl index 2bb44a4b70be..5532432130c8 100644 --- a/extensions/test/ole/unoTocomCalls/XCallback_Impl/XCallback_Impl.idl +++ b/extensions/test/ole/unoTocomCalls/XCallback_Impl/XCallback_Impl.idl @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -45,18 +45,18 @@ import "ocidl.idl"; [id(2), helpstring("method returnInterface")] HRESULT returnInterface([out, retval] IDispatch** ppdisp); [id(3), helpstring("method outInterface")] HRESULT outInterface([out] IDispatch** ppdisp); [id(4), helpstring("method outValuesMixed")] HRESULT outValuesMixed([in] long val, [out] long* pval, [in] BSTR string); - [id(5), helpstring("method outValuesAll")] HRESULT outValuesAll([out] IDispatch** ppdisp, [out] IDispatch** ppSimpleStruct, [out] long* aSimpleEnum, - [out] SAFEARRAY( VARIANT)* outSeq, - [out] VARIANT* varAny, + [id(5), helpstring("method outValuesAll")] HRESULT outValuesAll([out] IDispatch** ppdisp, [out] IDispatch** ppSimpleStruct, [out] long* aSimpleEnum, + [out] SAFEARRAY( VARIANT)* outSeq, + [out] VARIANT* varAny, [out] VARIANT_BOOL * aBool, [out] short* aChar, [out] BSTR* aString , - [out] float* aFloat, - [out] double* aDouble, + [out] float* aFloat, + [out] double* aDouble, [out] unsigned char* aByte, - [out] short* aShort, + [out] short* aShort, [out]long* aLong); -// ); +// ); [id(6), helpstring("method outStruct")] HRESULT outStruct([out] IDispatch** outStruct); [id(7), helpstring("method outEnum")] HRESULT outEnum([out] long* outEnum); [id(8), helpstring("method outSeqAny")] HRESULT outSeqAny([out] SAFEARRAY( VARIANT)* outSeq); diff --git a/extensions/test/ole/unoTocomCalls/XCallback_Impl/resource.h b/extensions/test/ole/unoTocomCalls/XCallback_Impl/resource.h index afdbe7bcd552..d041b3790555 100644 --- a/extensions/test/ole/unoTocomCalls/XCallback_Impl/resource.h +++ b/extensions/test/ole/unoTocomCalls/XCallback_Impl/resource.h @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -35,7 +35,7 @@ #define IDR_SIMPLESTRUCT 103 // Next default values for new objects -// +// #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 201 diff --git a/extensions/test/pgp/TestPGP.java b/extensions/test/pgp/TestPGP.java index 15bf2b1fcef1..41f21f3b767a 100644 --- a/extensions/test/pgp/TestPGP.java +++ b/extensions/test/pgp/TestPGP.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -67,7 +67,7 @@ import com.sun.star.pgp.*; public class TestPGP { - + static void doSomething(Object r) throws com.sun.star.uno.Exception, IOException, Exception { XNamingService rName = (XNamingService)UnoRuntime.queryInterface(XNamingService.class, r); @@ -75,7 +75,7 @@ public class TestPGP { if(rName != null) { System.err.println("got the remote naming service !"); Object rXsmgr = rName.getRegisteredObject("StarOffice.ServiceManager"); - + XMultiServiceFactory rSmgr = (XMultiServiceFactory)UnoRuntime.queryInterface(XMultiServiceFactory.class, rXsmgr); if(rSmgr != null) { System.err.println("got the remote service manager !"); @@ -86,7 +86,7 @@ public class TestPGP { System.err.println(" couldn't get XSet from ServiceFactory"); return; } -// try{ +// try{ SimplePGPMailerFactoryReg mailerReg= new SimplePGPMailerFactoryReg(); XSingleServiceFactory factory= mailerReg.getServiceFactory( "com.sun.star.pgp.SimplePGPMailerImpl", rSmgr, null, null); @@ -98,10 +98,10 @@ public class TestPGP { set.insert(factory ); System.err.println("PGP factory inserted into service manager"); -// }catch(Exception e ){ -// System.err.println( "exception caught in TestPGP"); -// } - +// }catch(Exception e ){ +// System.err.println( "exception caught in TestPGP"); +// } + } } @@ -115,32 +115,32 @@ public class TestPGP { }; public static void main(String argv[]) throws Exception { - if(argv.length != 1) { + if(argv.length != 1) { System.err.println("usage : testoffice protocol:host:port"); System.exit(-1); } -// try { +// try { com.sun.star.comp.servicemanager.ServiceManager smgr = new com.sun.star.comp.servicemanager.ServiceManager(); smgr.addFactories(neededServices, null); XConnector xConnector = (XConnector)smgr.createInstance("com.sun.star.connection.Connector"); XConnection xConnection = xConnector.connect(argv[0]); - + String rootOid = "classic_uno"; IBridge iBridge = UnoRuntime.getBridgeByName("java", null, "remote", null, new Object[]{"iiop", xConnection, null}); Object rInitialObject = iBridge.mapInterfaceFrom(rootOid, XInterface.class); -// Object rInitialObject = xBridge.getInstance("NamingService"); - +// Object rInitialObject = xBridge.getInstance("NamingService"); + if(rInitialObject != null) { System.err.println("got the remote object"); doSomething(rInitialObject); } -// } -// catch (Exception exception) { -// System.err.println("Exception thrown:" + exception); -// } +// } +// catch (Exception exception) { +// System.err.println("Exception thrown:" + exception); +// } } } diff --git a/extensions/test/sax/factory.hxx b/extensions/test/sax/factory.hxx index 267e7b6649ee..a2d22acdade5 100644 --- a/extensions/test/sax/factory.hxx +++ b/extensions/test/sax/factory.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -27,7 +27,7 @@ ************************************************************************/ XInterfaceRef OSaxWriterTest_CreateInstance( const XMultiServiceFactoryRef & rSMgr ) THROWS((Exception)); UString OSaxWriterTest_getServiceName( ) THROWS( () ); -UString OSaxWriterTest_getImplementationName( ) THROWS( () ); +UString OSaxWriterTest_getImplementationName( ) THROWS( () ); Sequence<UString> OSaxWriterTest_getSupportedServiceNames( ) THROWS( () ); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/extensions/test/sax/testsax.cxx b/extensions/test/sax/testsax.cxx index 0fc3691a47dc..74a947dd34dc 100644 --- a/extensions/test/sax/testsax.cxx +++ b/extensions/test/sax/testsax.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -127,25 +127,25 @@ public: } public: // refcounting - BOOL queryInterface( Uik aUik, XInterfaceRef & rOut ); - void acquire() { OWeakObject::acquire(); } - void release() { OWeakObject::release(); } - void* getImplementation(Reflection *p) { return OWeakObject::getImplementation(p); } + BOOL queryInterface( Uik aUik, XInterfaceRef & rOut ); + void acquire() { OWeakObject::acquire(); } + void release() { OWeakObject::release(); } + void* getImplementation(Reflection *p) { return OWeakObject::getImplementation(p); } public: virtual void testInvariant(const UString& TestName, const XInterfaceRef& TestObject) - THROWS( ( IllegalArgumentException, + THROWS( ( IllegalArgumentException, UsrSystemException) ); - virtual INT32 test( const UString& TestName, + virtual INT32 test( const UString& TestName, const XInterfaceRef& TestObject, - INT32 hTestHandle) THROWS( ( IllegalArgumentException, + INT32 hTestHandle) THROWS( ( IllegalArgumentException, UsrSystemException) ); - virtual BOOL testPassed(void) THROWS( ( UsrSystemException) ); - virtual Sequence< UString > getErrors(void) THROWS( (UsrSystemException) ); - virtual Sequence< UsrAny > getErrorExceptions(void) THROWS( (UsrSystemException) ); - virtual Sequence< UString > getWarnings(void) THROWS( (UsrSystemException) ); + virtual BOOL testPassed(void) THROWS( ( UsrSystemException) ); + virtual Sequence< UString > getErrors(void) THROWS( (UsrSystemException) ); + virtual Sequence< UsrAny > getErrorExceptions(void) THROWS( (UsrSystemException) ); + virtual Sequence< UString > getWarnings(void) THROWS( (UsrSystemException) ); private: void testSimple( const XParserRef &r ); @@ -155,9 +155,9 @@ private: void testPerformance( const XParserRef &rParser ); private: - Sequence<UsrAny> m_seqExceptions; - Sequence<UString> m_seqErrors; - Sequence<UString> m_seqWarnings; + Sequence<UsrAny> m_seqExceptions; + Sequence<UString> m_seqErrors; + Sequence<UString> m_seqWarnings; XMultiServiceFactoryRef m_rFactory; }; @@ -181,7 +181,7 @@ UString OSaxParserTest_getServiceName( ) THROWS( () ) return L"test.com.sun.star.xml.sax.Parser"; } -UString OSaxParserTest_getImplementationName( ) THROWS( () ) +UString OSaxParserTest_getImplementationName( ) THROWS( () ) { return L"test.extensions.xml.sax.Parser"; } @@ -209,7 +209,7 @@ BOOL OSaxParserTest::queryInterface( Uik uik , XInterfaceRef &rOut ) void OSaxParserTest::testInvariant( const UString& TestName, const XInterfaceRef& TestObject ) - THROWS( ( IllegalArgumentException, + THROWS( ( IllegalArgumentException, UsrSystemException) ) { if( L"com.sun.star.xml.sax.Parser" == TestName ) { @@ -220,9 +220,9 @@ void OSaxParserTest::testInvariant( const UString& TestName, const XInterfaceRef } -INT32 OSaxParserTest::test( const UString& TestName, +INT32 OSaxParserTest::test( const UString& TestName, const XInterfaceRef& TestObject, - INT32 hTestHandle) THROWS( ( IllegalArgumentException, + INT32 hTestHandle) THROWS( ( IllegalArgumentException, UsrSystemException) ) { if( L"com.sun.star.xml.sax.Parser" == TestName ) { @@ -273,25 +273,25 @@ INT32 OSaxParserTest::test( const UString& TestName, -BOOL OSaxParserTest::testPassed(void) THROWS( (UsrSystemException) ) +BOOL OSaxParserTest::testPassed(void) THROWS( (UsrSystemException) ) { return m_seqErrors.getLen() == 0; } -Sequence< UString > OSaxParserTest::getErrors(void) THROWS( (UsrSystemException) ) +Sequence< UString > OSaxParserTest::getErrors(void) THROWS( (UsrSystemException) ) { return m_seqErrors; } -Sequence< UsrAny > OSaxParserTest::getErrorExceptions(void) THROWS( (UsrSystemException) ) +Sequence< UsrAny > OSaxParserTest::getErrorExceptions(void) THROWS( (UsrSystemException) ) { return m_seqExceptions; } -Sequence< UString > OSaxParserTest::getWarnings(void) THROWS( (UsrSystemException) ) +Sequence< UString > OSaxParserTest::getWarnings(void) THROWS( (UsrSystemException) ) { return m_seqWarnings; } @@ -360,10 +360,10 @@ public: public: - BOOL queryInterface( Uik aUik, XInterfaceRef & rOut ); - void acquire() { OWeakObject::acquire(); } - void release() { OWeakObject::release(); } - void* getImplementation(Reflection *p) { return OWeakObject::getImplementation(p); } + BOOL queryInterface( Uik aUik, XInterfaceRef & rOut ); + void acquire() { OWeakObject::acquire(); } + void release() { OWeakObject::release(); } + void* getImplementation(Reflection *p) { return OWeakObject::getImplementation(p); } public: // Error handler @@ -420,7 +420,7 @@ public: // ExtendedDocumentHandler printf( "<%s> " , USTRING_TO_PCHAR( aName ) ); for( i = 0 ; i < xAttribs->getLength() ; i ++ ) { - printf( "(%s,%s,'%s')" , USTRING_TO_PCHAR( xAttribs->getNameByIndex( i ) ) , + printf( "(%s,%s,'%s')" , USTRING_TO_PCHAR( xAttribs->getNameByIndex( i ) ) , USTRING_TO_PCHAR( xAttribs->getTypeByIndex( i ) ) , USTRING_TO_PCHAR( xAttribs->getValueByIndex( i ) ) ); } @@ -547,7 +547,7 @@ BOOL TestDocumentHandler::queryInterface( Uik aUik , XInterfaceRef & rOut ) -void OSaxParserTest::testSimple( const XParserRef &rParser ) +void OSaxParserTest::testSimple( const XParserRef &rParser ) { char TestString[] = @@ -585,21 +585,21 @@ void OSaxParserTest::testSimple( const XParserRef &rParser ) InputSource source; source.aInputStream = rInStream; - source.sSystemId = sInput; + source.sSystemId = sInput; TestDocumentHandler *pDocHandler = new TestDocumentHandler( m_rFactory , FALSE ); XDocumentHandlerRef rDocHandler( (XDocumentHandler *) pDocHandler , USR_QUERY ); - XEntityResolverRef rEntityResolver( (XEntityResolver *) pDocHandler , USR_QUERY ); + XEntityResolverRef rEntityResolver( (XEntityResolver *) pDocHandler , USR_QUERY ); rParser->setDocumentHandler( rDocHandler ); rParser->setEntityResolver( rEntityResolver ); try { rParser->parseStream( source ); - ERROR_ASSERT( pDocHandler->m_iElementCount == 4 , "wrong element count" ); - ERROR_ASSERT( pDocHandler->m_iAttributeCount == 2 , "wrong attribut count" ); - ERROR_ASSERT( pDocHandler->m_iCharCount == 130 , "wrong char count" ); - ERROR_ASSERT( pDocHandler->m_iWhitespaceCount == 0, "wrong whitespace count" ); + ERROR_ASSERT( pDocHandler->m_iElementCount == 4 , "wrong element count" ); + ERROR_ASSERT( pDocHandler->m_iAttributeCount == 2 , "wrong attribut count" ); + ERROR_ASSERT( pDocHandler->m_iCharCount == 130 , "wrong char count" ); + ERROR_ASSERT( pDocHandler->m_iWhitespaceCount == 0, "wrong whitespace count" ); } catch( SAXParseException& e ) { BUILD_ERROR( 1 , USTRING_TO_PCHAR( e.Message ) ); @@ -646,28 +646,28 @@ void OSaxParserTest::testNamespaces( const XParserRef &rParser ) InputSource source; source.aInputStream = rInStream; - source.sSystemId = sInput; + source.sSystemId = sInput; TestDocumentHandler *pDocHandler = new TestDocumentHandler( m_rFactory , FALSE ); XDocumentHandlerRef rDocHandler( (XDocumentHandler *) pDocHandler , USR_QUERY ); - XEntityResolverRef rEntityResolver( (XEntityResolver *) pDocHandler , USR_QUERY ); + XEntityResolverRef rEntityResolver( (XEntityResolver *) pDocHandler , USR_QUERY ); rParser->setDocumentHandler( rDocHandler ); rParser->setEntityResolver( rEntityResolver ); try { rParser->parseStream( source ); - ERROR_ASSERT( pDocHandler->m_iElementCount == 6 , "wrong element count" ); - ERROR_ASSERT( pDocHandler->m_iAttributeCount == 2 , "wrong attribut count" ); - ERROR_ASSERT( pDocHandler->m_iCharCount == 33, "wrong char count" ); - ERROR_ASSERT( pDocHandler->m_iWhitespaceCount == 0 , "wrong whitespace count" ); + ERROR_ASSERT( pDocHandler->m_iElementCount == 6 , "wrong element count" ); + ERROR_ASSERT( pDocHandler->m_iAttributeCount == 2 , "wrong attribut count" ); + ERROR_ASSERT( pDocHandler->m_iCharCount == 33, "wrong char count" ); + ERROR_ASSERT( pDocHandler->m_iWhitespaceCount == 0 , "wrong whitespace count" ); } catch( SAXParseException& e ) { BUILD_ERROR( 1 , USTRING_TO_PCHAR( e.Message ) ); } catch( SAXException& e ) { BUILD_ERROR( 1 , USTRING_TO_PCHAR( e.Message ) ); - + } catch( Exception& e ) { BUILD_ERROR( 1 , USTRING_TO_PCHAR( e.Message ) ); @@ -675,12 +675,12 @@ void OSaxParserTest::testNamespaces( const XParserRef &rParser ) catch(...) { BUILD_ERROR( 1 , "unknown exception" ); } - } + } } void OSaxParserTest::testEncoding( const XParserRef &rParser ) { - char TestString[] = + char TestString[] = "<?xml version='1.0' encoding=\"iso-8859-1\"?>\n" "<!-- all elements here are explicitly in the HTML namespace -->\n" "<html:html xmlns:html='http://www.w3.org/TR/REC-html40'>\n" @@ -692,23 +692,23 @@ void OSaxParserTest::testEncoding( const XParserRef &rParser ) Sequence<BYTE> seqBytes( strlen( TestString ) ); memcpy( seqBytes.getArray() , TestString , strlen( TestString ) ); - + XInputStreamRef rInStream; UString sInput; rInStream = createStreamFromSequence( seqBytes , m_rFactory ); sInput = UString( L"internal" ); - + if( rParser.is() ) { InputSource source; source.aInputStream = rInStream; - source.sSystemId = sInput; - + source.sSystemId = sInput; + TestDocumentHandler *pDocHandler = new TestDocumentHandler( m_rFactory , FALSE ); XDocumentHandlerRef rDocHandler( (XDocumentHandler *) pDocHandler , USR_QUERY ); - XEntityResolverRef rEntityResolver( (XEntityResolver *) pDocHandler , USR_QUERY ); - + XEntityResolverRef rEntityResolver( (XEntityResolver *) pDocHandler , USR_QUERY ); + rParser->setDocumentHandler( rDocHandler ); rParser->setEntityResolver( rEntityResolver ); try { @@ -719,7 +719,7 @@ void OSaxParserTest::testEncoding( const XParserRef &rParser ) } catch( SAXException& e ) { BUILD_ERROR( 1 , USTRING_TO_PCHAR( e.Message ) ); - + } catch( Exception& e ) { BUILD_ERROR( 1 , USTRING_TO_PCHAR( e.Message ) ); @@ -732,24 +732,24 @@ void OSaxParserTest::testEncoding( const XParserRef &rParser ) } -void OSaxParserTest::testFile( const XParserRef & rParser ) +void OSaxParserTest::testFile( const XParserRef & rParser ) { - + XInputStreamRef rInStream = createStreamFromFile( "testsax.xml" , m_rFactory ); UString sInput = UString( PCHAR_TO_USTRING( "testsax.xml" ) ); - + if( rParser.is() && rInStream.is() ) { InputSource source; source.aInputStream = rInStream; - source.sSystemId = sInput; - + source.sSystemId = sInput; + TestDocumentHandler *pDocHandler = new TestDocumentHandler( m_rFactory , TRUE ); XDocumentHandlerRef rDocHandler( (XDocumentHandler *) pDocHandler , USR_QUERY ); - XEntityResolverRef rEntityResolver( (XEntityResolver *) pDocHandler , USR_QUERY ); - XErrorHandlerRef rErrorHandler( ( XErrorHandler * )pDocHandler , USR_QUERY ); - + XEntityResolverRef rEntityResolver( (XEntityResolver *) pDocHandler , USR_QUERY ); + XErrorHandlerRef rErrorHandler( ( XErrorHandler * )pDocHandler , USR_QUERY ); + rParser->setDocumentHandler( rDocHandler ); rParser->setEntityResolver( rEntityResolver ); rParser->setErrorHandler( rErrorHandler ); @@ -764,30 +764,30 @@ void OSaxParserTest::testFile( const XParserRef & rParser ) SAXParseException *pEx; if( any.getReflection() == SAXParseException_getReflection() ) { pEx = ( SAXParseException * ) any.get(); - printf( "%s\n" , UStringToString( pEx->Message , CHARSET_SYSTEM ).GetStr() ); + printf( "%s\n" , UStringToString( pEx->Message , CHARSET_SYSTEM ).GetStr() ); any = pEx->WrappedException; } else { - break; + break; } } } catch( SAXException& e ) { - printf( "%s\n" , UStringToString( e.Message , CHARSET_SYSTEM ).GetStr() ); - + printf( "%s\n" , UStringToString( e.Message , CHARSET_SYSTEM ).GetStr() ); + } catch( Exception& e ) { printf( "normal exception ! %s\n", e.getName() ); } catch(...) { - printf( "any exception !!!!\n" ); + printf( "any exception !!!!\n" ); } - } + } } -void OSaxParserTest::testPerformance( const XParserRef & rParser ) +void OSaxParserTest::testPerformance( const XParserRef & rParser ) { - + XInputStreamRef rInStream = createStreamFromFile( "testPerformance.xml" , m_rFactory ); UString sInput = UString( PCHAR_TO_USTRING( "testperformance.xml" ) ); @@ -795,13 +795,13 @@ void OSaxParserTest::testPerformance( const XParserRef & rParser ) InputSource source; source.aInputStream = rInStream; - source.sSystemId = sInput; - + source.sSystemId = sInput; + TestDocumentHandler *pDocHandler = new TestDocumentHandler( m_rFactory , FALSE ); XDocumentHandlerRef rDocHandler( (XDocumentHandler *) pDocHandler , USR_QUERY ); - XEntityResolverRef rEntityResolver( (XEntityResolver *) pDocHandler , USR_QUERY ); - XErrorHandlerRef rErrorHandler( ( XErrorHandler * )pDocHandler , USR_QUERY ); - + XEntityResolverRef rEntityResolver( (XEntityResolver *) pDocHandler , USR_QUERY ); + XErrorHandlerRef rErrorHandler( ( XErrorHandler * )pDocHandler , USR_QUERY ); + rParser->setDocumentHandler( rDocHandler ); rParser->setEntityResolver( rEntityResolver ); rParser->setErrorHandler( rErrorHandler ); @@ -811,12 +811,12 @@ void OSaxParserTest::testPerformance( const XParserRef & rParser ) osl_getSystemTime( &aStartTime ); rParser->parseStream( source ); osl_getSystemTime( &aEndTime ); - + double fStart = (double)aStartTime.Seconds + ((double)aStartTime.Nanosec / 1000000000.0); double fEnd = (double)aEndTime.Seconds + ((double)aEndTime.Nanosec / 1000000000.0); - + printf( "Performance reading : %g s\n" , fEnd - fStart ); - + } catch( SAXParseException& e ) { UsrAny any; @@ -825,25 +825,25 @@ void OSaxParserTest::testPerformance( const XParserRef & rParser ) SAXParseException *pEx; if( any.getReflection() == SAXParseException_getReflection() ) { pEx = ( SAXParseException * ) any.get(); - printf( "%s\n" , UStringToString( pEx->Message , CHARSET_SYSTEM ).GetStr() ); + printf( "%s\n" , UStringToString( pEx->Message , CHARSET_SYSTEM ).GetStr() ); any = pEx->WrappedException; } else { - break; + break; } } } catch( SAXException& e ) { - printf( "%s\n" , UStringToString( e.Message , CHARSET_SYSTEM ).GetStr() ); - + printf( "%s\n" , UStringToString( e.Message , CHARSET_SYSTEM ).GetStr() ); + } catch( Exception& e ) { printf( "normal exception ! %s\n", e.getName() ); } catch(...) { - printf( "any exception !!!!\n" ); + printf( "any exception !!!!\n" ); } - } + } } @@ -854,7 +854,7 @@ BOOL EXTERN_SERVICE_CALLTYPE exService_writeRegEntry( const UNO_INTERFACE(XRegistryKey)* xUnoKey) { - XRegistryKeyRef xKey; + XRegistryKeyRef xKey; uno2smart(xKey, *xUnoKey); UString str = UString( L"/" ) + OSaxParserTest_getImplementationName() + UString( L"/UNO/SERVICES" ); @@ -873,15 +873,15 @@ UNO_INTERFACE(XInterface) EXTERN_SERVICE_CALLTYPE exService_getFactory ( const wchar_t* implementationName, const UNO_INTERFACE(XMultiServiceFactory)* xUnoFact, - const UNO_INTERFACE(XRegistryKey)* + const UNO_INTERFACE(XRegistryKey)* ) { UNO_INTERFACE(XInterface) xUnoRet = {0, 0}; - XInterfaceRef xRet; + XInterfaceRef xRet; XMultiServiceFactoryRef xSMgr; - UString aImplementationName(implementationName); - + UString aImplementationName(implementationName); + uno2smart(xSMgr, *xUnoFact); if (aImplementationName == OSaxWriterTest_getImplementationName() ) @@ -899,8 +899,8 @@ UNO_INTERFACE(XInterface) EXTERN_SERVICE_CALLTYPE exService_getFactory if (xRet.is()) { smart2uno(xRet, xUnoRet); - } - + } + return xUnoRet; } diff --git a/extensions/test/sax/testwriter.cxx b/extensions/test/sax/testwriter.cxx index 692dcb1647ad..f4930dfec5fa 100644 --- a/extensions/test/sax/testwriter.cxx +++ b/extensions/test/sax/testwriter.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -123,7 +123,7 @@ public: public: // refcounting - BOOL queryInterface( Uik aUik, XInterfaceRef & rOut ) + BOOL queryInterface( Uik aUik, XInterfaceRef & rOut ) { if( XOutputStream::getSmartUik() == aUik ) { rOut = (XOutputStream *) this; @@ -132,9 +132,9 @@ public: // refcounting return TRUE; } - void acquire() { OWeakObject::acquire(); } - void release() { OWeakObject::release(); } - void* getImplementation(Reflection *p) { return OWeakObject::getImplementation(p); } + void acquire() { OWeakObject::acquire(); } + void release() { OWeakObject::release(); } + void* getImplementation(Reflection *p) { return OWeakObject::getImplementation(p); } public: virtual void writeBytes(const Sequence< BYTE >& aData) @@ -189,25 +189,25 @@ public: ~OSaxWriterTest() {} public: // refcounting - BOOL queryInterface( Uik aUik, XInterfaceRef & rOut ); - void acquire() { OWeakObject::acquire(); } - void release() { OWeakObject::release(); } - void* getImplementation(Reflection *p) { return OWeakObject::getImplementation(p); } + BOOL queryInterface( Uik aUik, XInterfaceRef & rOut ); + void acquire() { OWeakObject::acquire(); } + void release() { OWeakObject::release(); } + void* getImplementation(Reflection *p) { return OWeakObject::getImplementation(p); } public: virtual void testInvariant(const UString& TestName, const XInterfaceRef& TestObject) - THROWS( ( IllegalArgumentException, + THROWS( ( IllegalArgumentException, UsrSystemException) ); - virtual INT32 test( const UString& TestName, + virtual INT32 test( const UString& TestName, const XInterfaceRef& TestObject, - INT32 hTestHandle) THROWS( ( IllegalArgumentException, + INT32 hTestHandle) THROWS( ( IllegalArgumentException, UsrSystemException) ); - virtual BOOL testPassed(void) THROWS( ( UsrSystemException) ); - virtual Sequence< UString > getErrors(void) THROWS( (UsrSystemException) ); - virtual Sequence< UsrAny > getErrorExceptions(void) THROWS( (UsrSystemException) ); - virtual Sequence< UString > getWarnings(void) THROWS( (UsrSystemException) ); + virtual BOOL testPassed(void) THROWS( ( UsrSystemException) ); + virtual Sequence< UString > getErrors(void) THROWS( (UsrSystemException) ); + virtual Sequence< UsrAny > getErrorExceptions(void) THROWS( (UsrSystemException) ); + virtual Sequence< UString > getWarnings(void) THROWS( (UsrSystemException) ); private: void testSimple( const XExtendedDocumentHandlerRef &r ); @@ -217,9 +217,9 @@ private: void writeParagraph( const XExtendedDocumentHandlerRef &r , const UString & s); private: - Sequence<UsrAny> m_seqExceptions; - Sequence<UString> m_seqErrors; - Sequence<UString> m_seqWarnings; + Sequence<UsrAny> m_seqExceptions; + Sequence<UString> m_seqErrors; + Sequence<UString> m_seqWarnings; XMultiServiceFactoryRef m_rFactory; }; @@ -228,7 +228,7 @@ private: /*---------------------------------------- * -* Attributlist implementation +* Attributlist implementation * *----------------------------------------*/ struct AttributeListImpl_impl; @@ -242,10 +242,10 @@ public: ~AttributeListImpl(); public: - BOOL queryInterface( Uik aUik, XInterfaceRef & rOut ); - void acquire() { OWeakObject::acquire(); } - void release() { OWeakObject::release(); } - void* getImplementation(Reflection *p) { return OWeakObject::getImplementation(p); } + BOOL queryInterface( Uik aUik, XInterfaceRef & rOut ); + void acquire() { OWeakObject::acquire(); } + void release() { OWeakObject::release(); } + void* getImplementation(Reflection *p) { return OWeakObject::getImplementation(p); } public: virtual INT16 getLength(void) THROWS( (UsrSystemException) ); @@ -269,9 +269,9 @@ struct TagAttribute TagAttribute(){} TagAttribute( const UString &sName, const UString &sType , const UString &sValue ) { - this->sName = sName; - this->sType = sType; - this->sValue = sValue; + this->sName = sName; + this->sType = sType; + this->sValue = sValue; } UString sName; @@ -379,7 +379,7 @@ AttributeListImpl::~AttributeListImpl() } -void AttributeListImpl::addAttribute( const UString &sName , +void AttributeListImpl::addAttribute( const UString &sName , const UString &sType , const UString &sValue ) { @@ -421,7 +421,7 @@ UString OSaxWriterTest_getServiceName( ) THROWS( () ) return L"test.com.sun.star.xml.sax.Writer"; } -UString OSaxWriterTest_getImplementationName( ) THROWS( () ) +UString OSaxWriterTest_getImplementationName( ) THROWS( () ) { return L"test.extensions.xml.sax.Writer"; } @@ -449,7 +449,7 @@ BOOL OSaxWriterTest::queryInterface( Uik uik , XInterfaceRef &rOut ) void OSaxWriterTest::testInvariant( const UString& TestName, const XInterfaceRef& TestObject ) - THROWS( ( IllegalArgumentException, + THROWS( ( IllegalArgumentException, UsrSystemException) ) { if( L"com.sun.star.xml.sax.Writer" == TestName ) { @@ -467,9 +467,9 @@ void OSaxWriterTest::testInvariant( const UString& TestName, const XInterfaceRef } -INT32 OSaxWriterTest::test( const UString& TestName, +INT32 OSaxWriterTest::test( const UString& TestName, const XInterfaceRef& TestObject, - INT32 hTestHandle) THROWS( ( IllegalArgumentException, + INT32 hTestHandle) THROWS( ( IllegalArgumentException, UsrSystemException) ) { if( L"com.sun.star.xml.sax.Writer" == TestName ) { @@ -517,25 +517,25 @@ INT32 OSaxWriterTest::test( const UString& TestName, -BOOL OSaxWriterTest::testPassed(void) THROWS( (UsrSystemException) ) +BOOL OSaxWriterTest::testPassed(void) THROWS( (UsrSystemException) ) { return m_seqErrors.getLen() == 0; } -Sequence< UString > OSaxWriterTest::getErrors(void) THROWS( (UsrSystemException) ) +Sequence< UString > OSaxWriterTest::getErrors(void) THROWS( (UsrSystemException) ) { return m_seqErrors; } -Sequence< UsrAny > OSaxWriterTest::getErrorExceptions(void) THROWS( (UsrSystemException) ) +Sequence< UsrAny > OSaxWriterTest::getErrorExceptions(void) THROWS( (UsrSystemException) ) { return m_seqExceptions; } -Sequence< UString > OSaxWriterTest::getWarnings(void) THROWS( (UsrSystemException) ) +Sequence< UString > OSaxWriterTest::getWarnings(void) THROWS( (UsrSystemException) ) { return m_seqWarnings; } @@ -584,7 +584,7 @@ void OSaxWriterTest::testSimple( const XExtendedDocumentHandlerRef &r ) r->startDocument(); - pList->addAttribute( L"Arg1" , L"CDATA" , L"bla\n u" ); + pList->addAttribute( L"Arg1" , L"CDATA" , L"bla\n u" ); pList->addAttribute( L"Arg2" , L"CDATA" , L"blub" ); r->startElement( L"tag1" , rList ); @@ -664,13 +664,13 @@ void OSaxWriterTest::testExceptions( const XExtendedDocumentHandlerRef & r ) } r->startDocument(); - + r->startElement( L"huhu" , rList ); r->startCDATA(); { BOOL bException = TRUE; - try { + try { r->startElement( L"huhu" , rList ); bException = FALSE; } @@ -679,7 +679,7 @@ void OSaxWriterTest::testExceptions( const XExtendedDocumentHandlerRef & r ) } ERROR_ASSERT( bException , "expected exception not thrown !" ); } - + r->endCDATA(); r->endElement( L"hi" ); @@ -691,22 +691,22 @@ void OSaxWriterTest::testDTD(const XExtendedDocumentHandlerRef &r ) { OFileWriter *pw = new OFileWriter("outputDTD.xml"); AttributeListImpl *pList = new AttributeListImpl; - + XAttributeListRef rList( (XAttributeList *) pList , USR_QUERY ); XOutputStreamRef ref( ( XOutputStream * ) pw , USR_QUERY ); - + XActiveDataSourceRef source( r , USR_QUERY ); - + ERROR_ASSERT( ref.is() , "no output stream" ); ERROR_ASSERT( source.is() , "no active data source" ); - + source->setOutputStream( ref ); - + r->startDocument(); r->unknown( L"<!DOCTYPE iCalendar >\n" ); r->startElement( L"huhu" , rList ); - + r->endElement( L"huhu" ); r->endDocument(); } @@ -720,15 +720,15 @@ void OSaxWriterTest::testPerformance(const XExtendedDocumentHandlerRef &r ) L"wohl > Zeilenumbrueche halbwegs richtig macht oder ob er die Zeile " L"bis zum bitteren Ende schreibt."; - + XAttributeListRef rList( (XAttributeList *) pList , USR_QUERY ); XOutputStreamRef ref( ( XOutputStream * ) pw , USR_QUERY ); - + XActiveDataSourceRef source( r , USR_QUERY ); - + ERROR_ASSERT( ref.is() , "no output stream" ); ERROR_ASSERT( source.is() , "no active data source" ); - + source->setOutputStream( ref ); TimeValue aStartTime, aEndTime; @@ -747,8 +747,8 @@ void OSaxWriterTest::testPerformance(const XExtendedDocumentHandlerRef &r ) r->ignorableWhitespace( L""); r->startElement( L"huhu" , rList ); r->characters( testParagraph ); -// writeParagraph( r , testParagraph ); - +// writeParagraph( r , testParagraph ); + r->ignorableWhitespace( L""); r->endElement( L"huhu" ); } @@ -758,7 +758,7 @@ void OSaxWriterTest::testPerformance(const XExtendedDocumentHandlerRef &r ) r->ignorableWhitespace( L""); r->endElement( UString( L"tag" ) + UString::valueOf( i2 ) ); } - + r->endDocument(); osl_getSystemTime( &aEndTime ); diff --git a/extensions/test/stm/datatest.cxx b/extensions/test/stm/datatest.cxx index 6886f99f8b31..7fb7bde49b00 100644 --- a/extensions/test/stm/datatest.cxx +++ b/extensions/test/stm/datatest.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -77,25 +77,25 @@ public: ODataStreamTest( const XMultiServiceFactoryRef & rFactory ) : m_rFactory( rFactory ){} public: // refcounting - BOOL queryInterface( Uik aUik, XInterfaceRef & rOut ); - void acquire() { OWeakObject::acquire(); } - void release() { OWeakObject::release(); } - void* getImplementation(Reflection *p) { return OWeakObject::getImplementation(p); } + BOOL queryInterface( Uik aUik, XInterfaceRef & rOut ); + void acquire() { OWeakObject::acquire(); } + void release() { OWeakObject::release(); } + void* getImplementation(Reflection *p) { return OWeakObject::getImplementation(p); } public: virtual void testInvariant(const UString& TestName, const XInterfaceRef& TestObject) - THROWS( ( IllegalArgumentException, + THROWS( ( IllegalArgumentException, UsrSystemException) ); - virtual INT32 test( const UString& TestName, + virtual INT32 test( const UString& TestName, const XInterfaceRef& TestObject, - INT32 hTestHandle) THROWS( ( IllegalArgumentException, + INT32 hTestHandle) THROWS( ( IllegalArgumentException, UsrSystemException) ); - virtual BOOL testPassed(void) THROWS( ( UsrSystemException) ); - virtual Sequence< UString > getErrors(void) THROWS( (UsrSystemException) ); - virtual Sequence< UsrAny > getErrorExceptions(void) THROWS( (UsrSystemException) ); - virtual Sequence< UString > getWarnings(void) THROWS( (UsrSystemException) ); + virtual BOOL testPassed(void) THROWS( ( UsrSystemException) ); + virtual Sequence< UString > getErrors(void) THROWS( (UsrSystemException) ); + virtual Sequence< UsrAny > getErrorExceptions(void) THROWS( (UsrSystemException) ); + virtual Sequence< UString > getWarnings(void) THROWS( (UsrSystemException) ); private: void testSimple( const XDataInputStreamRef & , const XDataOutputStreamRef &); @@ -122,7 +122,7 @@ BOOL ODataStreamTest::queryInterface( Uik uik , XInterfaceRef &rOut ) void ODataStreamTest::testInvariant( const UString& TestName, const XInterfaceRef& TestObject ) - THROWS( ( IllegalArgumentException, + THROWS( ( IllegalArgumentException, UsrSystemException) ) { if( L"com.sun.star.io.DataInputStream" == TestName ) { @@ -144,10 +144,10 @@ void ODataStreamTest::testInvariant( const UString& TestName, const XInterfaceRe XOutputStreamRef output( TestObject , USR_QUERY ); XDataOutputStreamRef dataOutput( TestObject , USR_QUERY ); - WARNING_ASSERT( connect.is(), "XConnectable cannot be queried" ); - WARNING_ASSERT( active.is() , "XActiveDataSink cannot be queried" ); - ERROR_ASSERT( output.is() , "XInputStream cannot be queried" ); - ERROR_ASSERT( dataOutput.is(), "XDataInputStream cannot be queried" ); + WARNING_ASSERT( connect.is(), "XConnectable cannot be queried" ); + WARNING_ASSERT( active.is() , "XActiveDataSink cannot be queried" ); + ERROR_ASSERT( output.is() , "XInputStream cannot be queried" ); + ERROR_ASSERT( dataOutput.is(), "XDataInputStream cannot be queried" ); } @@ -162,14 +162,14 @@ void ODataStreamTest::testInvariant( const UString& TestName, const XInterfaceRe } -INT32 ODataStreamTest::test( const UString& TestName, +INT32 ODataStreamTest::test( const UString& TestName, const XInterfaceRef& TestObject, - INT32 hTestHandle) THROWS( ( IllegalArgumentException, + INT32 hTestHandle) THROWS( ( IllegalArgumentException, UsrSystemException) ) { - if( L"com.sun.star.io.DataInputStream" == TestName || + if( L"com.sun.star.io.DataInputStream" == TestName || L"com.sun.star.io.DataOutputStream" == TestName ) { - + try { if( 0 == hTestHandle ) { testInvariant( TestName , TestObject ); @@ -181,13 +181,13 @@ INT32 ODataStreamTest::test( const UString& TestName, XDataInputStreamRef rInput( TestObject , USR_QUERY ); XDataOutputStreamRef rOutput( TestObject , USR_QUERY ); - + XInterfaceRef x = m_rFactory->createInstance( L"com.sun.star.io.Pipe"); XInputStreamRef rPipeInput( x , USR_QUERY ); XOutputStreamRef rPipeOutput( x , USR_QUERY ); - - if( ! rSink.is() ) { + + if( ! rSink.is() ) { x = m_rFactory->createInstance( L"com.sun.star.io.DataInputStream" ); x->queryInterface( XDataInputStream::getSmartUik() , rInput ); x->queryInterface( XActiveDataSink::getSmartUik() , rSink ); @@ -209,7 +209,7 @@ INT32 ODataStreamTest::test( const UString& TestName, if( 1 == hTestHandle ) { testSimple( rInput , rOutput ); - } + } } } catch( Exception& e ) { @@ -218,9 +218,9 @@ INT32 ODataStreamTest::test( const UString& TestName, catch(...) { BUILD_ERROR( 0 , "unknown exception (Exception is not base class)" ); } - + hTestHandle ++; - + if( hTestHandle >= 2) { // all tests finished. hTestHandle = -1; @@ -230,34 +230,34 @@ INT32 ODataStreamTest::test( const UString& TestName, BUILD_ERROR( 0 , "service not supported by test." ); } return hTestHandle; -} +} -BOOL ODataStreamTest::testPassed(void) THROWS( (UsrSystemException) ) +BOOL ODataStreamTest::testPassed(void) THROWS( (UsrSystemException) ) { - return m_seqErrors.getLen() == 0; + return m_seqErrors.getLen() == 0; } -Sequence< UString > ODataStreamTest::getErrors(void) THROWS( (UsrSystemException) ) +Sequence< UString > ODataStreamTest::getErrors(void) THROWS( (UsrSystemException) ) { return m_seqErrors; } -Sequence< UsrAny > ODataStreamTest::getErrorExceptions(void) THROWS( (UsrSystemException) ) +Sequence< UsrAny > ODataStreamTest::getErrorExceptions(void) THROWS( (UsrSystemException) ) { return m_seqExceptions; } -Sequence< UString > ODataStreamTest::getWarnings(void) THROWS( (UsrSystemException) ) +Sequence< UString > ODataStreamTest::getWarnings(void) THROWS( (UsrSystemException) ) { return m_seqWarnings; } -void ODataStreamTest::testSimple( const XDataInputStreamRef &rInput, +void ODataStreamTest::testSimple( const XDataInputStreamRef &rInput, const XDataOutputStreamRef &rOutput ) { rOutput->writeLong( 0x34ff3c ); @@ -265,89 +265,89 @@ void ODataStreamTest::testSimple( const XDataInputStreamRef &rInput, ERROR_ASSERT( 0x34ff3c == rInput->readLong() , "long read/write mismatch" ); ERROR_ASSERT( 0x34ff3d == rInput->readLong() , "long read/write mismatch" ); - + rOutput->writeByte( 0x87 ); ERROR_ASSERT( 0x87 == rInput->readByte() , "byte read/write mismatch" ); - + rOutput->writeBoolean( 25 ); ERROR_ASSERT( rInput->readBoolean() , "boolean read/write mismatch" ); - + rOutput->writeBoolean( FALSE ); ERROR_ASSERT( ! rInput->readBoolean() , "boolean read/write mismatch" ); - + rOutput->writeFloat( (float) 42.42 ); ERROR_ASSERT( rInput->readFloat() == ((float)42.42) , "float read/write mismatch" ); - + rOutput->writeDouble( (double) 42.42 ); ERROR_ASSERT( rInput->readDouble() == 42.42 , "double read/write mismatch" ); - + rOutput->writeUTF( L"Live long and prosper !" ); ERROR_ASSERT( rInput->readUTF() == L"Live long and prosper !" , "UTF read/write mismatch" ); - + Sequence<wchar_t> wc(0x10001); for( int i = 0 ; i < 0x10000 ; i ++ ) { - wc.getArray()[i] = L'c'; + wc.getArray()[i] = L'c'; } wc.getArray()[0x10000] = 0; UString str( wc.getArray() , 0x10000 ); rOutput->writeUTF( str ); ERROR_ASSERT( rInput->readUTF() == str , "error reading 64k block" ); - + rOutput->closeOutput(); try { rInput->readLong(); - ERROR_ASSERT( 0 , "eof-exception does not occur !" ); + ERROR_ASSERT( 0 , "eof-exception does not occur !" ); } catch ( IOException& e ){ - //ok + //ok e.getName(); } - catch(...) { + catch(...) { ERROR_ASSERT( 0 , "wrong exception after reading beyond eof" ); } - - ERROR_ASSERT( ! rInput->readBytes( Sequence<BYTE> (1) , 1 ), + + ERROR_ASSERT( ! rInput->readBytes( Sequence<BYTE> (1) , 1 ), "stream must be on eof !" ); - + rInput->closeInput(); - + try { rOutput->writeByte( 1 ); ERROR_ASSERT( 0 , "writing still possible though chain must be interrupted" ); } - catch( IOException& e ) + catch( IOException& e ) { e.getName(); - // ok + // ok } catch( ... ) { - ERROR_ASSERT( 0 , "IOException expected, but another exception was thrown" ); + ERROR_ASSERT( 0 , "IOException expected, but another exception was thrown" ); } - + } -/** +/** * for external binding * * **/ XInterfaceRef ODataStreamTest_CreateInstance( const XMultiServiceFactoryRef & rSMgr ) THROWS((Exception)) -{ +{ ODataStreamTest *p = new ODataStreamTest( rSMgr ); - XInterfaceRef xService = *p; + XInterfaceRef xService = *p; return xService; } Sequence<UString> ODataStreamTest_getSupportedServiceNames( int i) THROWS( () ) { Sequence<UString> aRet(1); - + aRet.getArray()[0] = ODataStreamTest_getImplementationName( i); - - + + return aRet; } @@ -355,19 +355,19 @@ UString ODataStreamTest_getServiceName( int i) THROWS( () ) { if( 1 == i ) { return L"test.com.sun.star.io.DataInputStream"; - } + } else { - return L"test.com.sun.star.io.DataOutputStream"; + return L"test.com.sun.star.io.DataOutputStream"; } } -UString ODataStreamTest_getImplementationName( int i) THROWS( () ) +UString ODataStreamTest_getImplementationName( int i) THROWS( () ) { if( 1 == i ) { return L"test.com.sun.star.comp.extensions.stm.DataInputStream"; } else { - return L"test.com.sun.star.comp.extensions.stm.DataOutputStream"; + return L"test.com.sun.star.comp.extensions.stm.DataOutputStream"; } } @@ -379,7 +379,7 @@ UString ODataStreamTest_getImplementationName( int i) THROWS( () ) * * *------------------------------------------------------*/ -class MyPersistObject : +class MyPersistObject : public XPersistObject, public XPropertySet, public OWeakObject @@ -391,12 +391,12 @@ public: {} ~MyPersistObject() {} - + public: - BOOL queryInterface( Uik aUik, XInterfaceRef & rOut ); - void acquire() { OWeakObject::acquire(); } - void release() { OWeakObject::release(); } - void* getImplementation(Reflection *p) { return OWeakObject::getImplementation(p); } + BOOL queryInterface( Uik aUik, XInterfaceRef & rOut ); + void acquire() { OWeakObject::acquire(); } + void release() { OWeakObject::release(); } + void* getImplementation(Reflection *p) { return OWeakObject::getImplementation(p); } public: virtual UString getServiceName(void) const THROWS( (UsrSystemException) ); @@ -405,72 +405,72 @@ public: public: - virtual XPropertySetInfoRef getPropertySetInfo(void) const THROWS( (UsrSystemException) ); - virtual void setPropertyValue(const UString& aPropertyName, const UsrAny& aValue) - THROWS( ( UnknownPropertyException, - PropertyVetoException, + virtual XPropertySetInfoRef getPropertySetInfo(void) const THROWS( (UsrSystemException) ); + virtual void setPropertyValue(const UString& aPropertyName, const UsrAny& aValue) + THROWS( ( UnknownPropertyException, + PropertyVetoException, IllegalArgumentException, - WrappedTargetException, + WrappedTargetException, UsrSystemException) ); - virtual UsrAny getPropertyValue(const UString& PropertyName) const - THROWS( ( UnknownPropertyException, - WrappedTargetException, + virtual UsrAny getPropertyValue(const UString& PropertyName) const + THROWS( ( UnknownPropertyException, + WrappedTargetException, UsrSystemException) ); - virtual void addPropertyChangeListener( const UString& aPropertyName, - const XPropertyChangeListenerRef& xListener) - THROWS( ( UnknownPropertyException, - WrappedTargetException, + virtual void addPropertyChangeListener( const UString& aPropertyName, + const XPropertyChangeListenerRef& xListener) + THROWS( ( UnknownPropertyException, + WrappedTargetException, UsrSystemException) ); - virtual void removePropertyChangeListener( const UString& aPropertyName, - const XPropertyChangeListenerRef& aListener) - THROWS( ( UnknownPropertyException, - WrappedTargetException, + virtual void removePropertyChangeListener( const UString& aPropertyName, + const XPropertyChangeListenerRef& aListener) + THROWS( ( UnknownPropertyException, + WrappedTargetException, UsrSystemException) ); - virtual void addVetoableChangeListener( const UString& PropertyName, - const XVetoableChangeListenerRef& aListener) - THROWS( ( UnknownPropertyException, - WrappedTargetException, + virtual void addVetoableChangeListener( const UString& PropertyName, + const XVetoableChangeListenerRef& aListener) + THROWS( ( UnknownPropertyException, + WrappedTargetException, UsrSystemException) ); - virtual void removeVetoableChangeListener( const UString& PropertyName, - const XVetoableChangeListenerRef& aListener) - THROWS( ( UnknownPropertyException, - WrappedTargetException, + virtual void removeVetoableChangeListener( const UString& PropertyName, + const XVetoableChangeListenerRef& aListener) + THROWS( ( UnknownPropertyException, + WrappedTargetException, UsrSystemException) ); public: - INT32 m_l; - float m_f; - double m_d; - BOOL m_b; - BYTE m_byte; - wchar_t m_c; - UString m_s; - XPersistObjectRef m_ref; + INT32 m_l; + float m_f; + double m_d; + BOOL m_b; + BYTE m_byte; + wchar_t m_c; + UString m_s; + XPersistObjectRef m_ref; UString m_sServiceName; }; -XPropertySetInfoRef MyPersistObject::getPropertySetInfo(void) const THROWS( (UsrSystemException) ) +XPropertySetInfoRef MyPersistObject::getPropertySetInfo(void) const THROWS( (UsrSystemException) ) { - return XPropertySetInfoRef(); + return XPropertySetInfoRef(); } -void MyPersistObject::setPropertyValue(const UString& aPropertyName, const UsrAny& aValue) - THROWS( ( UnknownPropertyException, - PropertyVetoException, +void MyPersistObject::setPropertyValue(const UString& aPropertyName, const UsrAny& aValue) + THROWS( ( UnknownPropertyException, + PropertyVetoException, IllegalArgumentException, - WrappedTargetException, + WrappedTargetException, UsrSystemException) ) { if( L"long" == aPropertyName ) { - m_l = aValue.getINT32(); + m_l = aValue.getINT32(); } else if ( L"float" == aPropertyName ) { - m_f = aValue.getFloat(); + m_f = aValue.getFloat(); } else if( L"double" == aPropertyName ) { - m_d = aValue.getDouble(); + m_d = aValue.getDouble(); } else if( L"bool" == aPropertyName ) { m_b = aValue.getBOOL(); @@ -479,14 +479,14 @@ void MyPersistObject::setPropertyValue(const UString& aPropertyName, const UsrAn m_byte = aValue.getBYTE(); } else if( L"char" == aPropertyName ) { - m_c = aValue.getChar(); + m_c = aValue.getChar(); } else if( L"string" == aPropertyName ) { - m_s = aValue.getString(); + m_s = aValue.getString(); } else if( L"object" == aPropertyName ) { if( aValue.getReflection() == XPersistObject_getReflection() ) { - XPersistObjectRef *pRef = (XPersistObjectRef*) aValue.get(); + XPersistObjectRef *pRef = (XPersistObjectRef*) aValue.get(); if( pRef ) { m_ref = *pRef; } @@ -502,20 +502,20 @@ void MyPersistObject::setPropertyValue(const UString& aPropertyName, const UsrAn } -UsrAny MyPersistObject::getPropertyValue(const UString& aPropertyName) const - THROWS( ( UnknownPropertyException, - WrappedTargetException, +UsrAny MyPersistObject::getPropertyValue(const UString& aPropertyName) const + THROWS( ( UnknownPropertyException, + WrappedTargetException, UsrSystemException) ) { UsrAny aValue; if( L"long" == aPropertyName ) { - aValue.setINT32( m_l ); + aValue.setINT32( m_l ); } else if ( L"float" == aPropertyName ) { - aValue.setFloat( m_f ); + aValue.setFloat( m_f ); } else if( L"double" == aPropertyName ) { - aValue.setDouble( m_d ); + aValue.setDouble( m_d ); } else if( L"bool" == aPropertyName ) { aValue.setBOOL( m_b ); @@ -524,10 +524,10 @@ UsrAny MyPersistObject::getPropertyValue(const UString& aPropertyName) const aValue.setBYTE( m_byte ); } else if( L"char" == aPropertyName ) { - aValue.setChar( m_c ); + aValue.setChar( m_c ); } else if( L"string" == aPropertyName ) { - aValue.setString( m_s ); + aValue.setString( m_s ); } else if( L"object" == aPropertyName ) { aValue.set( &m_ref , XPersistObject_getReflection() ); @@ -536,53 +536,53 @@ UsrAny MyPersistObject::getPropertyValue(const UString& aPropertyName) const } -void MyPersistObject::addPropertyChangeListener( const UString& aPropertyName, - const XPropertyChangeListenerRef& xListener) - THROWS( ( UnknownPropertyException, - WrappedTargetException, +void MyPersistObject::addPropertyChangeListener( const UString& aPropertyName, + const XPropertyChangeListenerRef& xListener) + THROWS( ( UnknownPropertyException, + WrappedTargetException, UsrSystemException) ) { - + } -void MyPersistObject::removePropertyChangeListener( const UString& aPropertyName, - const XPropertyChangeListenerRef& aListener) - THROWS( ( UnknownPropertyException, - WrappedTargetException, +void MyPersistObject::removePropertyChangeListener( const UString& aPropertyName, + const XPropertyChangeListenerRef& aListener) + THROWS( ( UnknownPropertyException, + WrappedTargetException, UsrSystemException) ) { } -void MyPersistObject::addVetoableChangeListener(const UString& PropertyName, - const XVetoableChangeListenerRef& aListener) - THROWS( ( UnknownPropertyException, - WrappedTargetException, +void MyPersistObject::addVetoableChangeListener(const UString& PropertyName, + const XVetoableChangeListenerRef& aListener) + THROWS( ( UnknownPropertyException, + WrappedTargetException, UsrSystemException) ) { - + } -void MyPersistObject::removeVetoableChangeListener( const UString& PropertyName, - const XVetoableChangeListenerRef& aListener) - THROWS( ( UnknownPropertyException, - WrappedTargetException, +void MyPersistObject::removeVetoableChangeListener( const UString& PropertyName, + const XVetoableChangeListenerRef& aListener) + THROWS( ( UnknownPropertyException, + WrappedTargetException, UsrSystemException) ) { - + } - + BOOL MyPersistObject::queryInterface( Uik aUik , XInterfaceRef &rOut ) { if( XPersistObject::getSmartUik() == aUik ) { - rOut = ( XPersistObject * ) this; + rOut = ( XPersistObject * ) this; } else if( XPropertySet::getSmartUik() == aUik ) { - rOut = ( XPropertySet * ) this; + rOut = ( XPropertySet * ) this; } else return OWeakObject::queryInterface( aUik , rOut ); - + return TRUE; } @@ -591,7 +591,7 @@ UString MyPersistObject::getServiceName() const THROWS( (UsrSystemException) ) return m_sServiceName; } -void MyPersistObject::write( const XObjectOutputStreamRef & rOut ) +void MyPersistObject::write( const XObjectOutputStreamRef & rOut ) THROWS( (IOException,UsrSystemException)) { rOut->writeLong( m_l); @@ -605,7 +605,7 @@ void MyPersistObject::write( const XObjectOutputStreamRef & rOut ) } -void MyPersistObject::read( const XObjectInputStreamRef & rIn ) +void MyPersistObject::read( const XObjectInputStreamRef & rIn ) THROWS( (IOException, UsrSystemException) ) { m_l = rIn->readLong(); @@ -618,11 +618,11 @@ void MyPersistObject::read( const XObjectInputStreamRef & rIn ) m_ref = rIn->readObject(); } -XInterfaceRef OMyPersistObject_CreateInstance( const XMultiServiceFactoryRef & rSMgr ) +XInterfaceRef OMyPersistObject_CreateInstance( const XMultiServiceFactoryRef & rSMgr ) THROWS((Exception)) -{ +{ MyPersistObject *p = new MyPersistObject( ); - XInterfaceRef xService = *p; + XInterfaceRef xService = *p; return xService; } @@ -638,7 +638,7 @@ UString OMyPersistObject_getServiceName( ) THROWS( () ) return L"test.com.sun.star.io.PersistTest"; } -UString OMyPersistObject_getImplementationName( ) THROWS( () ) +UString OMyPersistObject_getImplementationName( ) THROWS( () ) { return L"test.com.sun.star.io.PersistTest"; } @@ -651,22 +651,22 @@ class OObjectStreamTest : { public: OObjectStreamTest( const XMultiServiceFactoryRef &r) : ODataStreamTest(r) {} -public: // refcounting - BOOL queryInterface( Uik aUik, XInterfaceRef & rOut ); +public: // refcounting + BOOL queryInterface( Uik aUik, XInterfaceRef & rOut ); -public: - virtual void testInvariant(const UString& TestName, const XInterfaceRef& TestObject) - THROWS( ( IllegalArgumentException, +public: + virtual void testInvariant(const UString& TestName, const XInterfaceRef& TestObject) + THROWS( ( IllegalArgumentException, UsrSystemException) ); - virtual INT32 test( const UString& TestName, - const XInterfaceRef& TestObject, - INT32 hTestHandle) THROWS( ( IllegalArgumentException, + virtual INT32 test( const UString& TestName, + const XInterfaceRef& TestObject, + INT32 hTestHandle) THROWS( ( IllegalArgumentException, UsrSystemException) ); private: - void OObjectStreamTest::testObject( const XObjectOutputStreamRef &rOut, + void OObjectStreamTest::testObject( const XObjectOutputStreamRef &rOut, const XObjectInputStreamRef &rIn ); private: @@ -679,23 +679,23 @@ BOOL OObjectStreamTest::queryInterface( Uik uik , XInterfaceRef &rOut ) { if( XSimpleTest::getSmartUik() == uik ) { rOut = (XSimpleTest *) this; - } + } else { return ODataStreamTest::queryInterface( uik , rOut ); - } + } return TRUE; } -void OObjectStreamTest::testInvariant( const UString& TestName, const XInterfaceRef& TestObject ) - THROWS( ( IllegalArgumentException, +void OObjectStreamTest::testInvariant( const UString& TestName, const XInterfaceRef& TestObject ) + THROWS( ( IllegalArgumentException, UsrSystemException) ) { - + if( L"com.sun.star.io.ObjectInputStream" == TestName ) { ODataStreamTest::testInvariant( TestName , TestObject ); - XObjectInputStreamRef dataInput( TestObject , USR_QUERY ); + XObjectInputStreamRef dataInput( TestObject , USR_QUERY ); XMarkableStreamRef markable( TestObject , USR_QUERY ); ERROR_ASSERT( dataInput.is() , "XObjectInputStream cannot be queried" ); ERROR_ASSERT( markable.is() , "XMarkableStream cannot be queried" ); @@ -704,7 +704,7 @@ void OObjectStreamTest::testInvariant( const UString& TestName, const XInterface ODataStreamTest::testInvariant( TestName , TestObject ); XMarkableStreamRef markable( TestObject , USR_QUERY ); XObjectOutputStreamRef dataOutput( TestObject , USR_QUERY ); - ERROR_ASSERT( dataOutput.is(), "XObjectOutputStream cannot be queried" ); + ERROR_ASSERT( dataOutput.is(), "XObjectOutputStream cannot be queried" ); ERROR_ASSERT( markable.is() , "XMarkableStream cannot be queried" ); } @@ -718,57 +718,57 @@ void OObjectStreamTest::testInvariant( const UString& TestName, const XInterface } -INT32 OObjectStreamTest::test( const UString& TestName, - const XInterfaceRef& TestObject, - INT32 hTestHandle) THROWS( ( IllegalArgumentException, +INT32 OObjectStreamTest::test( const UString& TestName, + const XInterfaceRef& TestObject, + INT32 hTestHandle) THROWS( ( IllegalArgumentException, UsrSystemException) ) { - if( L"com.sun.star.io.ObjectInputStream" == TestName || + if( L"com.sun.star.io.ObjectInputStream" == TestName || L"com.sun.star.io.ObjectOutputStream" == TestName ) { - + try { if( 0 == hTestHandle ) { testInvariant( TestName , TestObject ); } else if( DATASTREAM_TEST_MAX_HANDLE >= hTestHandle ) { INT32 hOldHandle = hTestHandle; - hTestHandle = ODataStreamTest::test( L"com.sun.star.io.DataInputStream" , + hTestHandle = ODataStreamTest::test( L"com.sun.star.io.DataInputStream" , TestObject , hTestHandle ); if( hTestHandle == -1 ){ hTestHandle = hOldHandle; } } else { - + XActiveDataSinkRef rSink( TestObject, USR_QUERY ); XActiveDataSourceRef rSource( TestObject , USR_QUERY ); XObjectInputStreamRef rInput( TestObject , USR_QUERY ); XObjectOutputStreamRef rOutput( TestObject , USR_QUERY ); - + XInterfaceRef x = m_rFactory->createInstance( L"com.sun.star.io.Pipe"); XInputStreamRef rPipeInput( x , USR_QUERY ); XOutputStreamRef rPipeOutput( x , USR_QUERY ); - + x = m_rFactory->createInstance( L"com.sun.star.io.MarkableInputStream" ); - XInputStreamRef markableInput( x , USR_QUERY ); + XInputStreamRef markableInput( x , USR_QUERY ); XActiveDataSinkRef markableSink( x , USR_QUERY ); - + x = m_rFactory->createInstance( L"com.sun.star.io.MarkableOutputStream" ); - XOutputStreamRef markableOutput( x , USR_QUERY ); - XActiveDataSourceRef markableSource( x , USR_QUERY ); - - OSL_ASSERT( markableInput.is() ); + XOutputStreamRef markableOutput( x , USR_QUERY ); + XActiveDataSourceRef markableSource( x , USR_QUERY ); + + OSL_ASSERT( markableInput.is() ); OSL_ASSERT( markableOutput.is() ); - OSL_ASSERT( markableSink.is() ); + OSL_ASSERT( markableSink.is() ); OSL_ASSERT( markableSource.is() ); markableSink->setInputStream( rPipeInput ); markableSource->setOutputStream( rPipeOutput ); - if( ! rSink.is() ) { + if( ! rSink.is() ) { x = m_rFactory->createInstance( L"com.sun.star.io.ObjectInputStream" ); x->queryInterface( XObjectInputStream::getSmartUik() , rInput ); x->queryInterface( XActiveDataSink::getSmartUik() , rSink ); @@ -781,7 +781,7 @@ INT32 OObjectStreamTest::test( const UString& TestName, OSL_ASSERT( rPipeInput.is() ); OSL_ASSERT( rPipeOutput.is() ); - + rSink->setInputStream( markableInput ); rSource->setOutputStream( markableOutput ); @@ -793,7 +793,7 @@ INT32 OObjectStreamTest::test( const UString& TestName, } rInput->closeInput(); rOutput->closeOutput(); - + } } catch( Exception& e ) { @@ -802,9 +802,9 @@ INT32 OObjectStreamTest::test( const UString& TestName, catch(...) { BUILD_ERROR( 0 , "unknown exception (Exception is not base class)" ); } - + hTestHandle ++; - + if( hTestHandle > 1 +DATASTREAM_TEST_MAX_HANDLE ) { // all tests finished. hTestHandle = -1; @@ -814,7 +814,7 @@ INT32 OObjectStreamTest::test( const UString& TestName, BUILD_ERROR( 0 , "service not supported by test." ); } return hTestHandle; -} +} BOOL compareMyPropertySet( XPropertySetRef &r1 , XPropertySetRef &r2 ) @@ -823,35 +823,35 @@ BOOL compareMyPropertySet( XPropertySetRef &r1 , XPropertySetRef &r2 ) if( r1->getPropertyValue( L"long" ).getReflection() == Void_getReflection() || r2->getPropertyValue( L"long" ).getReflection() == Void_getReflection() ) { - + // one of the objects is not the correct propertyset ! return FALSE; } - - b = b && ( r1->getPropertyValue( L"long" ).getINT32() == + + b = b && ( r1->getPropertyValue( L"long" ).getINT32() == r2->getPropertyValue( L"long" ).getINT32() ); - b = b && ( r1->getPropertyValue( L"float" ).getFloat() == + b = b && ( r1->getPropertyValue( L"float" ).getFloat() == r2->getPropertyValue( L"float" ).getFloat() ); - - b = b && ( r1->getPropertyValue( L"double" ).getDouble() == + + b = b && ( r1->getPropertyValue( L"double" ).getDouble() == r2->getPropertyValue( L"double" ).getDouble() ); - b = b && ( r1->getPropertyValue( L"bool" ).getBOOL() == + b = b && ( r1->getPropertyValue( L"bool" ).getBOOL() == r2->getPropertyValue( L"bool" ).getBOOL() ); - - b = b && ( r1->getPropertyValue( L"byte" ).getBYTE() == + + b = b && ( r1->getPropertyValue( L"byte" ).getBYTE() == r2->getPropertyValue( L"byte" ).getBYTE() ); - - b = b && ( r1->getPropertyValue( L"char" ).getChar() == + + b = b && ( r1->getPropertyValue( L"char" ).getChar() == r2->getPropertyValue( L"char" ).getChar() ); - b = b && ( r1->getPropertyValue( L"string" ).getString() == + b = b && ( r1->getPropertyValue( L"string" ).getString() == r2->getPropertyValue( L"string" ).getString() ); UsrAny o1 = r1->getPropertyValue( L"object" ); UsrAny o2 = r2->getPropertyValue( L"object" ); - + if( o1.getReflection() == XPersistObject_getReflection() ) { if( o2.getReflection() == XPersistObject_getReflection() ) { @@ -859,34 +859,34 @@ BOOL compareMyPropertySet( XPropertySetRef &r1 , XPropertySetRef &r2 ) XPersistObjectRef rPersist2 = *((XPersistObjectRef*) o2.get()); XPropertySetRef rProp1( rPersist1 , USR_QUERY ); XPropertySetRef rProp2( rPersist2 , USR_QUERY ); - - if( rProp1.is() && rProp2.is() && ! ( rProp1 == rProp2 ) + + if( rProp1.is() && rProp2.is() && ! ( rProp1 == rProp2 ) &&( rProp1 != r1 )) { compareMyPropertySet( rProp1 , rProp2 ); - } + } } else { - b = FALSE; + b = FALSE; } } else { if( o2.getReflection() == XPersistObject_getReflection() ) { - b = FALSE; + b = FALSE; } } return b; } -void OObjectStreamTest::testObject( const XObjectOutputStreamRef &rOut, +void OObjectStreamTest::testObject( const XObjectOutputStreamRef &rOut, const XObjectInputStreamRef &rIn ) { ERROR_ASSERT( rOut.is() , "no objectOutputStream" ); ERROR_ASSERT( rIn.is() , "no objectInputStream" ); - + XMultiServiceFactoryRef xProv = getProcessServiceManager(); ERROR_ASSERT( xProv.is() , "no global service manager" ); - + // tests, if saving an object with an unknown service name allows // reading the data behind the object ! @@ -920,40 +920,40 @@ void OObjectStreamTest::testObject( const XObjectOutputStreamRef &rOut, XPersistObjectRef persistRef( x , USR_QUERY ); ERROR_ASSERT( persistRef.is() , "couldn't instantiate PersistTest object" ); - + XPropertySetRef rProp( persistRef , USR_QUERY ); ERROR_ASSERT( rProp.is() , "test object is no property set " ); - + UsrAny any; any.setINT32( 0x83482 ); rProp->setPropertyValue( L"long" , any ); - + any.setFloat( 42.23 ); rProp->setPropertyValue( L"float" , any ); - any.setDouble( 233.321412 ); + any.setDouble( 233.321412 ); rProp->setPropertyValue( L"double" , any ); - + any.setBOOL( TRUE ); rProp->setPropertyValue( L"bool" , any ); any.setBYTE( 130 ); rProp->setPropertyValue( L"byte" , any ); - + any.setChar( 'h' ); rProp->setPropertyValue( L"char" , any ); - + any.setString( L"hi du !" ); rProp->setPropertyValue( L"string" , any ); - + any.set( &persistRef, XPersistObject_getReflection() ); // try a self reference rProp->setPropertyValue( L"object" , any ); - - // do read and write - rOut->writeObject( persistRef ); + + // do read and write + rOut->writeObject( persistRef ); ERROR_ASSERT( 0 != rIn->available() , "no data arrived at input" ); - XPersistObjectRef xReadPersistRef = rIn->readObject( ); - + XPersistObjectRef xReadPersistRef = rIn->readObject( ); + XPropertySetRef rPropRead( xReadPersistRef , USR_QUERY ); ERROR_ASSERT( compareMyPropertySet( rProp , rPropRead ) , "objects has not been read properly !" ); @@ -965,68 +965,68 @@ void OObjectStreamTest::testObject( const XObjectOutputStreamRef &rOut, { XMarkableStreamRef markableOut( rOut , USR_QUERY ); ERROR_ASSERT( markableOut.is() , "markable stream cannot be queried" ); - + // do the same thing multiple times to check if // buffering and marks work correctly for( int i = 0 ; i < 2000 ; i ++ ) { XInterfaceRef x = xProv->createInstance(L"test.com.sun.star.io.PersistTest"); XPersistObjectRef persistRef( x , USR_QUERY ); - + XPropertySetRef rProp( persistRef , USR_QUERY ); ERROR_ASSERT( rProp.is() , "test object is no property set " ); - + UsrAny any; any.setINT32( 0x83482 ); rProp->setPropertyValue( L"long" , any ); - + any.setFloat( 42.23 ); rProp->setPropertyValue( L"float" , any ); - - any.setDouble( 233.321412 ); + + any.setDouble( 233.321412 ); rProp->setPropertyValue( L"double" , any ); - + any.setBOOL( TRUE ); rProp->setPropertyValue( L"bool" , any ); - + any.setBYTE( 130 ); rProp->setPropertyValue( L"byte" , any ); - + any.setChar( 'h' ); rProp->setPropertyValue( L"char" , any ); - + any.setString( L"hi du !" ); rProp->setPropertyValue( L"string" , any ); - - + + x = xProv->createInstance(L"test.com.sun.star.io.PersistTest"); XPersistObjectRef persist2ndRef( x , USR_QUERY ); - - + + // Note : persist2ndRef contains coincident values, but also coincident values must be - // saved properly ! + // saved properly ! any.set( &persist2ndRef, XPersistObject_getReflection() ); // try a self reference rProp->setPropertyValue( L"object" , any ); - + // simply test, if markable operations and object operations do not interfere INT32 nMark = markableOut->createMark(); - // do read and write - rOut->writeObject( persistRef ); - + // do read and write + rOut->writeObject( persistRef ); + // further markable tests ! INT32 nOffset = markableOut->offsetToMark( nMark ); markableOut->jumpToMark( nMark ); markableOut->deleteMark( nMark ); markableOut->jumpToFurthest(); - + ERROR_ASSERT( 0 != rIn->available() , "no data arrived at input" ); - XPersistObjectRef xReadPersistRef = rIn->readObject( ); - + XPersistObjectRef xReadPersistRef = rIn->readObject( ); + XPropertySetRef rProp1( persistRef , USR_QUERY ); XPropertySetRef rProp2( xReadPersistRef , USR_QUERY ); ERROR_ASSERT( compareMyPropertySet( rProp1, rProp2) , "objects has not been read properly !" ); @@ -1036,9 +1036,9 @@ void OObjectStreamTest::testObject( const XObjectOutputStreamRef &rOut, XInterfaceRef OObjectStreamTest_CreateInstance( const XMultiServiceFactoryRef & rSMgr ) THROWS((Exception)) -{ +{ OObjectStreamTest *p = new OObjectStreamTest( rSMgr ); - XInterfaceRef xService = *p; + XInterfaceRef xService = *p; return xService; } @@ -1053,19 +1053,19 @@ UString OObjectStreamTest_getServiceName( int i) THROWS( () ) { if( 1 == i ) { return L"test.com.sun.star.io.ObjectInputStream"; - } + } else { - return L"test.com.sun.star.io.ObjectOutputStream"; + return L"test.com.sun.star.io.ObjectOutputStream"; } } -UString OObjectStreamTest_getImplementationName( int i) THROWS( () ) +UString OObjectStreamTest_getImplementationName( int i) THROWS( () ) { if( 1 == i ) { return L"test.com.sun.star.comp.extensions.stm.ObjectInputStream"; } else { - return L"test.com.sun.star.comp.extensions.stm.ObjectOutputStream"; + return L"test.com.sun.star.comp.extensions.stm.ObjectOutputStream"; } } diff --git a/extensions/test/stm/marktest.cxx b/extensions/test/stm/marktest.cxx index 3043d119c122..1c3c5a0f9d01 100644 --- a/extensions/test/stm/marktest.cxx +++ b/extensions/test/stm/marktest.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -66,29 +66,29 @@ public: ~OMarkableOutputStreamTest(); public: // refcounting - BOOL queryInterface( Uik aUik, XInterfaceRef & rOut ); - void acquire() { OWeakObject::acquire(); } - void release() { OWeakObject::release(); } - void* getImplementation(Reflection *p) { return OWeakObject::getImplementation(p); } + BOOL queryInterface( Uik aUik, XInterfaceRef & rOut ); + void acquire() { OWeakObject::acquire(); } + void release() { OWeakObject::release(); } + void* getImplementation(Reflection *p) { return OWeakObject::getImplementation(p); } public: // implementation names - static Sequence< UString > getSupportedServiceNames_Static(void) THROWS( () ); - static UString getImplementationName_Static() THROWS( () ); + static Sequence< UString > getSupportedServiceNames_Static(void) THROWS( () ); + static UString getImplementationName_Static() THROWS( () ); public: virtual void testInvariant(const UString& TestName, const XInterfaceRef& TestObject) - THROWS( ( IllegalArgumentException, + THROWS( ( IllegalArgumentException, UsrSystemException) ); - virtual INT32 test( const UString& TestName, + virtual INT32 test( const UString& TestName, const XInterfaceRef& TestObject, - INT32 hTestHandle) THROWS( ( IllegalArgumentException, + INT32 hTestHandle) THROWS( ( IllegalArgumentException, UsrSystemException) ); - virtual BOOL testPassed(void) THROWS( ( UsrSystemException) ); - virtual Sequence< UString > getErrors(void) THROWS( (UsrSystemException) ); - virtual Sequence< UsrAny > getErrorExceptions(void) THROWS( (UsrSystemException) ); - virtual Sequence< UString > getWarnings(void) THROWS( (UsrSystemException) ); + virtual BOOL testPassed(void) THROWS( ( UsrSystemException) ); + virtual Sequence< UString > getErrors(void) THROWS( (UsrSystemException) ); + virtual Sequence< UsrAny > getErrorExceptions(void) THROWS( (UsrSystemException) ); + virtual Sequence< UString > getWarnings(void) THROWS( (UsrSystemException) ); private: void testSimple( const XOutputStreamRef &r, const XInputStreamRef &rInput ); @@ -126,7 +126,7 @@ BOOL OMarkableOutputStreamTest::queryInterface( Uik uik , XInterfaceRef &rOut ) void OMarkableOutputStreamTest::testInvariant( const UString& TestName, const XInterfaceRef& TestObject ) - THROWS( ( IllegalArgumentException, + THROWS( ( IllegalArgumentException, UsrSystemException) ) { XServiceInfoRef info( TestObject, USR_QUERY ); @@ -139,9 +139,9 @@ void OMarkableOutputStreamTest::testInvariant( const UString& TestName, const XI } -INT32 OMarkableOutputStreamTest::test( const UString& TestName, +INT32 OMarkableOutputStreamTest::test( const UString& TestName, const XInterfaceRef& TestObject, - INT32 hTestHandle) THROWS( ( IllegalArgumentException, + INT32 hTestHandle) THROWS( ( IllegalArgumentException, UsrSystemException) ) { if( L"com.sun.star.io.MarkableOutputStream" == TestName ) { @@ -190,13 +190,13 @@ INT32 OMarkableOutputStreamTest::test( const UString& TestName, -BOOL OMarkableOutputStreamTest::testPassed(void) THROWS( (UsrSystemException) ) +BOOL OMarkableOutputStreamTest::testPassed(void) THROWS( (UsrSystemException) ) { return m_seqErrors.getLen() == 0; } -Sequence< UString > OMarkableOutputStreamTest::getErrors(void) THROWS( (UsrSystemException) ) +Sequence< UString > OMarkableOutputStreamTest::getErrors(void) THROWS( (UsrSystemException) ) { return m_seqErrors; } @@ -208,13 +208,13 @@ Sequence< UsrAny > OMarkableOutputStreamTest::getErrorExceptions(void) THROWS( ( } -Sequence< UString > OMarkableOutputStreamTest::getWarnings(void) THROWS( (UsrSystemException) ) +Sequence< UString > OMarkableOutputStreamTest::getWarnings(void) THROWS( (UsrSystemException) ) { return m_seqWarnings; } -void OMarkableOutputStreamTest::testSimple( const XOutputStreamRef &rOutput , +void OMarkableOutputStreamTest::testSimple( const XOutputStreamRef &rOutput , const XInputStreamRef &rInput ) { XMarkableStreamRef rMarkable( rOutput , USR_QUERY ); @@ -404,7 +404,7 @@ UString OMarkableOutputStreamTest_getServiceName() THROWS( () ) return L"test.com.sun.star.io.MarkableOutputStream"; } -UString OMarkableOutputStreamTest_getImplementationName() THROWS( () ) +UString OMarkableOutputStreamTest_getImplementationName() THROWS( () ) { return L"test.com.sun.starextensions.stm.MarkableOutputStream"; } @@ -428,29 +428,29 @@ public: ~OMarkableInputStreamTest(); public: // refcounting - BOOL queryInterface( Uik aUik, XInterfaceRef & rOut ); - void acquire() { OWeakObject::acquire(); } - void release() { OWeakObject::release(); } - void* getImplementation(Reflection *p) { return OWeakObject::getImplementation(p); } + BOOL queryInterface( Uik aUik, XInterfaceRef & rOut ); + void acquire() { OWeakObject::acquire(); } + void release() { OWeakObject::release(); } + void* getImplementation(Reflection *p) { return OWeakObject::getImplementation(p); } public: // implementation names - static Sequence< UString > getSupportedServiceNames_Static(void) THROWS( () ); - static UString getImplementationName_Static() THROWS( () ); + static Sequence< UString > getSupportedServiceNames_Static(void) THROWS( () ); + static UString getImplementationName_Static() THROWS( () ); public: virtual void testInvariant(const UString& TestName, const XInterfaceRef& TestObject) - THROWS( ( IllegalArgumentException, + THROWS( ( IllegalArgumentException, UsrSystemException) ); - virtual INT32 test( const UString& TestName, + virtual INT32 test( const UString& TestName, const XInterfaceRef& TestObject, - INT32 hTestHandle) THROWS( ( IllegalArgumentException, + INT32 hTestHandle) THROWS( ( IllegalArgumentException, UsrSystemException) ); - virtual BOOL testPassed(void) THROWS( ( UsrSystemException) ); - virtual Sequence< UString > getErrors(void) THROWS( (UsrSystemException) ); - virtual Sequence< UsrAny > getErrorExceptions(void) THROWS( (UsrSystemException) ); - virtual Sequence< UString > getWarnings(void) THROWS( (UsrSystemException) ); + virtual BOOL testPassed(void) THROWS( ( UsrSystemException) ); + virtual Sequence< UString > getErrors(void) THROWS( (UsrSystemException) ); + virtual Sequence< UsrAny > getErrorExceptions(void) THROWS( (UsrSystemException) ); + virtual Sequence< UString > getWarnings(void) THROWS( (UsrSystemException) ); private: void testSimple( const XOutputStreamRef &r, const XInputStreamRef &rInput ); @@ -488,7 +488,7 @@ BOOL OMarkableInputStreamTest::queryInterface( Uik uik , XInterfaceRef &rOut ) void OMarkableInputStreamTest::testInvariant( const UString& TestName, const XInterfaceRef& TestObject ) - THROWS( ( IllegalArgumentException, + THROWS( ( IllegalArgumentException, UsrSystemException) ) { if( L"com.sun.star.io.MarkableInputStream" == TestName ) { @@ -506,9 +506,9 @@ void OMarkableInputStreamTest::testInvariant( const UString& TestName, const XIn } -INT32 OMarkableInputStreamTest::test( const UString& TestName, +INT32 OMarkableInputStreamTest::test( const UString& TestName, const XInterfaceRef& TestObject, - INT32 hTestHandle) THROWS( ( IllegalArgumentException, + INT32 hTestHandle) THROWS( ( IllegalArgumentException, UsrSystemException) ) { if( L"com.sun.star.io.MarkableInputStream" == TestName ) { @@ -557,31 +557,31 @@ INT32 OMarkableInputStreamTest::test( const UString& TestName, -BOOL OMarkableInputStreamTest::testPassed(void) THROWS( (UsrSystemException) ) +BOOL OMarkableInputStreamTest::testPassed(void) THROWS( (UsrSystemException) ) { return m_seqErrors.getLen() == 0; } -Sequence< UString > OMarkableInputStreamTest::getErrors(void) THROWS( (UsrSystemException) ) +Sequence< UString > OMarkableInputStreamTest::getErrors(void) THROWS( (UsrSystemException) ) { return m_seqErrors; } -Sequence< UsrAny > OMarkableInputStreamTest::getErrorExceptions(void) THROWS( (UsrSystemException) ) +Sequence< UsrAny > OMarkableInputStreamTest::getErrorExceptions(void) THROWS( (UsrSystemException) ) { return m_seqExceptions; } -Sequence< UString > OMarkableInputStreamTest::getWarnings(void) THROWS( (UsrSystemException) ) +Sequence< UString > OMarkableInputStreamTest::getWarnings(void) THROWS( (UsrSystemException) ) { return m_seqWarnings; } -void OMarkableInputStreamTest::testSimple( const XOutputStreamRef &rOutput , +void OMarkableInputStreamTest::testSimple( const XOutputStreamRef &rOutput , const XInputStreamRef &rInput ) { XMarkableStreamRef rMarkable( rInput , USR_QUERY ); @@ -635,7 +635,7 @@ void OMarkableInputStreamTest::testSimple( const XOutputStreamRef &rOutput ERROR_ASSERT( 256-10-50 == rInput->available() , "marking error" ); - ERROR_ASSERT( 100 == rInput->readSomeBytes( seqRead , 100 ) , "wrong results using readSomeBytes" ); + ERROR_ASSERT( 100 == rInput->readSomeBytes( seqRead , 100 ) , "wrong results using readSomeBytes" ); ERROR_ASSERT( 96 == rInput->readSomeBytes( seqRead , 1000) , "wrong results using readSomeBytes" ); rOutput->closeOutput(); rInput->closeInput(); @@ -668,7 +668,7 @@ Sequence<UString> OMarkableInputStreamTest_getSupportedServiceNames(void) THROWS { Sequence<UString> aRet(1); aRet.getArray()[0] = OMarkableInputStreamTest_getImplementationName(); - + return aRet; } @@ -677,7 +677,7 @@ UString OMarkableInputStreamTest_getServiceName() THROWS( () ) return L"test.com.sun.star.io.MarkableInputStream"; } -UString OMarkableInputStreamTest_getImplementationName() THROWS( () ) +UString OMarkableInputStreamTest_getImplementationName() THROWS( () ) { return L"test.com.sun.star.extensions.stm.MarkableInputStream"; } diff --git a/extensions/test/stm/pipetest.cxx b/extensions/test/stm/pipetest.cxx index cf74aa2f33c0..d3de76bd9766 100644 --- a/extensions/test/stm/pipetest.cxx +++ b/extensions/test/stm/pipetest.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -46,8 +46,8 @@ #include <string.h> #include "testfactreg.hxx" -#define IMPLEMENTATION_NAME L"test.com.sun.star.comp.extensions.stm.Pipe" -#define SERVICE_NAME L"test.com.sun.star.io.Pipe" +#define IMPLEMENTATION_NAME L"test.com.sun.star.comp.extensions.stm.Pipe" +#define SERVICE_NAME L"test.com.sun.star.io.Pipe" #ifndef _VOS_NO_NAMESPACE using namespace usr; @@ -104,29 +104,29 @@ public: ~OPipeTest(); public: // refcounting - BOOL queryInterface( Uik aUik, XInterfaceRef & rOut ); - void acquire() { OWeakObject::acquire(); } - void release() { OWeakObject::release(); } - void* getImplementation(Reflection *p) { return OWeakObject::getImplementation(p); } + BOOL queryInterface( Uik aUik, XInterfaceRef & rOut ); + void acquire() { OWeakObject::acquire(); } + void release() { OWeakObject::release(); } + void* getImplementation(Reflection *p) { return OWeakObject::getImplementation(p); } public: // implementation names - static Sequence< UString > getSupportedServiceNames_Static(void) THROWS( () ); - static UString getImplementationName_Static() THROWS( () ); + static Sequence< UString > getSupportedServiceNames_Static(void) THROWS( () ); + static UString getImplementationName_Static() THROWS( () ); public: virtual void testInvariant(const UString& TestName, const XInterfaceRef& TestObject) - THROWS( ( IllegalArgumentException, + THROWS( ( IllegalArgumentException, UsrSystemException) ); - virtual INT32 test( const UString& TestName, + virtual INT32 test( const UString& TestName, const XInterfaceRef& TestObject, - INT32 hTestHandle) THROWS( ( IllegalArgumentException, + INT32 hTestHandle) THROWS( ( IllegalArgumentException, UsrSystemException) ); - virtual BOOL testPassed(void) THROWS( ( UsrSystemException) ); - virtual Sequence< UString > getErrors(void) THROWS( (UsrSystemException) ); - virtual Sequence< UsrAny > getErrorExceptions(void) THROWS( (UsrSystemException) ); - virtual Sequence< UString > getWarnings(void) THROWS( (UsrSystemException) ); + virtual BOOL testPassed(void) THROWS( ( UsrSystemException) ); + virtual Sequence< UString > getErrors(void) THROWS( (UsrSystemException) ); + virtual Sequence< UsrAny > getErrorExceptions(void) THROWS( (UsrSystemException) ); + virtual Sequence< UString > getWarnings(void) THROWS( (UsrSystemException) ); private: void testSimple( const XInterfaceRef & ); @@ -166,7 +166,7 @@ BOOL OPipeTest::queryInterface( Uik uik , XInterfaceRef &rOut ) void OPipeTest::testInvariant( const UString& TestName, const XInterfaceRef& TestObject ) - THROWS( ( IllegalArgumentException, + THROWS( ( IllegalArgumentException, UsrSystemException) ) { XServiceInfoRef info( TestObject, USR_QUERY ); @@ -180,9 +180,9 @@ void OPipeTest::testInvariant( const UString& TestName, const XInterfaceRef& Tes } -INT32 OPipeTest::test( const UString& TestName, +INT32 OPipeTest::test( const UString& TestName, const XInterfaceRef& TestObject, - INT32 hTestHandle) THROWS( ( IllegalArgumentException, + INT32 hTestHandle) THROWS( ( IllegalArgumentException, UsrSystemException) ) { if( L"com.sun.star.io.Pipe" == TestName ) { @@ -222,25 +222,25 @@ INT32 OPipeTest::test( const UString& TestName, -BOOL OPipeTest::testPassed(void) THROWS( (UsrSystemException) ) +BOOL OPipeTest::testPassed(void) THROWS( (UsrSystemException) ) { return m_seqErrors.getLen() == 0; } -Sequence< UString > OPipeTest::getErrors(void) THROWS( (UsrSystemException) ) +Sequence< UString > OPipeTest::getErrors(void) THROWS( (UsrSystemException) ) { return m_seqErrors; } -Sequence< UsrAny > OPipeTest::getErrorExceptions(void) THROWS( (UsrSystemException) ) +Sequence< UsrAny > OPipeTest::getErrorExceptions(void) THROWS( (UsrSystemException) ) { return m_seqExceptions; } -Sequence< UString > OPipeTest::getWarnings(void) THROWS( (UsrSystemException) ) +Sequence< UString > OPipeTest::getWarnings(void) THROWS( (UsrSystemException) ) { return m_seqWarnings; } @@ -283,7 +283,7 @@ void OPipeTest::testSimple( const XInterfaceRef &r ) ERROR_ASSERT( 5 == input->available() , "wrong available after skip/write " ); input->readBytes( seqRead , 5 ); - ERROR_ASSERT( ! strcmp( (char*) seqRead.getArray() , + ERROR_ASSERT( ! strcmp( (char*) seqRead.getArray() , (char*) &( seqWrite.getArray()[seqWrite.getLen()-5] ) ), "write/read mismatich" ); @@ -303,7 +303,7 @@ void OPipeTest::testSimple( const XInterfaceRef &r ) ERROR_ASSERT( 0 , "writing on a closed stream does not cause an exception" ); } catch (IOException& e ) { - e; // just to suppress warning during compile + e; // just to suppress warning during compile } ERROR_ASSERT(! input->readBytes( seqRead , 1 ), "eof not found !" ); @@ -314,7 +314,7 @@ void OPipeTest::testSimple( const XInterfaceRef &r ) ERROR_ASSERT( 0 , "reading from a closed stream does not cause an exception" ); } catch( IOException& e ) { - e; // just to suppress warning during compile + e; // just to suppress warning during compile } } @@ -342,7 +342,7 @@ void OPipeTest::testBufferResizing( const XInterfaceRef &r ) for( i = 0 ; i < iMax ; i ++ ) { input->readBytes( seqRead, createIntSeq(i).getLen() ); - ERROR_ASSERT( ! strcmp( (char*) seqRead.getArray() , + ERROR_ASSERT( ! strcmp( (char*) seqRead.getArray() , (char*) createIntSeq(i).getArray() ) , "written/read mismatch\n" ); } @@ -381,7 +381,7 @@ void OPipeTest::testMultithreading( const XInterfaceRef &r ) break; } - ERROR_ASSERT( ! strcmp( (char*) seqRead.getArray() , + ERROR_ASSERT( ! strcmp( (char*) seqRead.getArray() , (char*) createIntSeq(i).getArray() ) , "written/read mismatch\n" ); } @@ -390,7 +390,7 @@ void OPipeTest::testMultithreading( const XInterfaceRef &r ) input->closeInput(); } -/* { +/* { try { XInterfaceRef x = xSMgr->createInstance( strService ); @@ -398,7 +398,7 @@ void OPipeTest::testMultithreading( const XInterfaceRef &r ) XOutputStreamRef output( x , USR_QUERY ); OSL_ASSERT( output.is() ); - while( TRUE ) { + while( TRUE ) { // basic read/write Sequence<BYTE> seqWrite( 500 ); output->writeBytes( seqWrite ); @@ -442,7 +442,7 @@ UString OPipeTest_getServiceName() THROWS( () ) return SERVICE_NAME; } -UString OPipeTest_getImplementationName() THROWS( () ) +UString OPipeTest_getImplementationName() THROWS( () ) { return IMPLEMENTATION_NAME; } diff --git a/extensions/test/stm/testfactreg.cxx b/extensions/test/stm/testfactreg.cxx index 9c9e1c050a6c..0ebfa87c57d1 100644 --- a/extensions/test/stm/testfactreg.cxx +++ b/extensions/test/stm/testfactreg.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -30,7 +30,7 @@ #include "precompiled_extensions.hxx" #include <string.h> -#include <usr/reflserv.hxx> // for EXTERN_SERVICE_CALLTYPE +#include <usr/reflserv.hxx> // for EXTERN_SERVICE_CALLTYPE #include <usr/factoryhlp.hxx> #include "testfactreg.hxx" @@ -49,7 +49,7 @@ BOOL EXTERN_SERVICE_CALLTYPE exService_writeRegEntry( const UNO_INTERFACE(XRegistryKey)* xUnoKey) { - XRegistryKeyRef xKey; + XRegistryKeyRef xKey; uno2smart(xKey, *xUnoKey); UString str = UString( L"/" ) + OPipeTest_getImplementationName() + UString( L"/UNO/SERVICES" ); @@ -92,15 +92,15 @@ UNO_INTERFACE(XInterface) EXTERN_SERVICE_CALLTYPE exService_getFactory ( const wchar_t* implementationName, const UNO_INTERFACE(XMultiServiceFactory)* xUnoFact, - const UNO_INTERFACE(XRegistryKey)* + const UNO_INTERFACE(XRegistryKey)* ) { UNO_INTERFACE(XInterface) xUnoRet = {0, 0}; - XInterfaceRef xRet; + XInterfaceRef xRet; XMultiServiceFactoryRef xSMgr; - UString aImplementationName(implementationName); - + UString aImplementationName(implementationName); + uno2smart(xSMgr, *xUnoFact); if (aImplementationName == OPipeTest_getImplementationName() ) @@ -112,43 +112,43 @@ UNO_INTERFACE(XInterface) EXTERN_SERVICE_CALLTYPE exService_getFactory else if( aImplementationName == ODataStreamTest_getImplementationName(1) ) { xRet = createSingleFactory( xSMgr , implementationName, ODataStreamTest_CreateInstance, - ODataStreamTest_getSupportedServiceNames(1) ); + ODataStreamTest_getSupportedServiceNames(1) ); } else if( aImplementationName == ODataStreamTest_getImplementationName(2) ) { xRet = createSingleFactory( xSMgr , implementationName, ODataStreamTest_CreateInstance, - ODataStreamTest_getSupportedServiceNames(2) ); + ODataStreamTest_getSupportedServiceNames(2) ); } else if( aImplementationName == OObjectStreamTest_getImplementationName(1) ) { xRet = createSingleFactory( xSMgr , implementationName, OObjectStreamTest_CreateInstance, - OObjectStreamTest_getSupportedServiceNames(1) ); + OObjectStreamTest_getSupportedServiceNames(1) ); } else if( aImplementationName == OObjectStreamTest_getImplementationName(2) ) { xRet = createSingleFactory( xSMgr , implementationName, OObjectStreamTest_CreateInstance, - OObjectStreamTest_getSupportedServiceNames(2) ); + OObjectStreamTest_getSupportedServiceNames(2) ); } else if( aImplementationName == OMarkableOutputStreamTest_getImplementationName() ) { xRet = createSingleFactory( xSMgr , implementationName, OMarkableOutputStreamTest_CreateInstance, - OMarkableOutputStreamTest_getSupportedServiceNames() ); + OMarkableOutputStreamTest_getSupportedServiceNames() ); } else if( aImplementationName == OMarkableInputStreamTest_getImplementationName() ) { xRet = createSingleFactory( xSMgr , implementationName, OMarkableInputStreamTest_CreateInstance, - OMarkableInputStreamTest_getSupportedServiceNames() ); + OMarkableInputStreamTest_getSupportedServiceNames() ); } else if( aImplementationName == OMyPersistObject_getImplementationName() ) { xRet = createSingleFactory( xSMgr , implementationName, OMyPersistObject_CreateInstance, - OMyPersistObject_getSupportedServiceNames() ); + OMyPersistObject_getSupportedServiceNames() ); } if (xRet.is()) { smart2uno(xRet, xUnoRet); - } - + } + return xUnoRet; } @@ -163,7 +163,7 @@ Sequence<BYTE> createSeq( char * p ) return seq; } -Sequence<BYTE> createIntSeq( INT32 i ) +Sequence<BYTE> createIntSeq( INT32 i ) { char pcCount[20]; sprintf( pcCount , "%d" , i ); diff --git a/extensions/test/stm/testfactreg.hxx b/extensions/test/stm/testfactreg.hxx index 81c22d00b351..07e192a94071 100644 --- a/extensions/test/stm/testfactreg.hxx +++ b/extensions/test/stm/testfactreg.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -28,32 +28,32 @@ XInterfaceRef OPipeTest_CreateInstance( const XMultiServiceFactoryRef & rSMgr ) THROWS((Exception)); Sequence<UString> OPipeTest_getSupportedServiceNames(void) THROWS( () ); UString OPipeTest_getServiceName() THROWS( () ); -UString OPipeTest_getImplementationName() THROWS( () ); +UString OPipeTest_getImplementationName() THROWS( () ); XInterfaceRef ODataStreamTest_CreateInstance( const XMultiServiceFactoryRef & rSMgr ) THROWS((Exception)); Sequence<UString> ODataStreamTest_getSupportedServiceNames( int i) THROWS( () ); UString ODataStreamTest_getServiceName( int i) THROWS( ( ) ); -UString ODataStreamTest_getImplementationName( int i) THROWS( () ); +UString ODataStreamTest_getImplementationName( int i) THROWS( () ); XInterfaceRef OMarkableOutputStreamTest_CreateInstance( const XMultiServiceFactoryRef & rSMgr ) THROWS((Exception)); Sequence<UString> OMarkableOutputStreamTest_getSupportedServiceNames(void) THROWS( () ); UString OMarkableOutputStreamTest_getServiceName() THROWS( () ); -UString OMarkableOutputStreamTest_getImplementationName() THROWS( () ); +UString OMarkableOutputStreamTest_getImplementationName() THROWS( () ); XInterfaceRef OMarkableInputStreamTest_CreateInstance( const XMultiServiceFactoryRef & rSMgr ) THROWS((Exception)); Sequence<UString> OMarkableInputStreamTest_getSupportedServiceNames(void) THROWS( () ); UString OMarkableInputStreamTest_getServiceName() THROWS( () ); -UString OMarkableInputStreamTest_getImplementationName() THROWS( () ); +UString OMarkableInputStreamTest_getImplementationName() THROWS( () ); XInterfaceRef OObjectStreamTest_CreateInstance( const XMultiServiceFactoryRef & rSMgr ) THROWS((Exception)); Sequence<UString> OObjectStreamTest_getSupportedServiceNames( int i) THROWS( () ); UString OObjectStreamTest_getServiceName( int i) THROWS( () ); -UString OObjectStreamTest_getImplementationName( int i) THROWS( () ); +UString OObjectStreamTest_getImplementationName( int i) THROWS( () ); -XInterfaceRef OMyPersistObject_CreateInstance( const XMultiServiceFactoryRef & rSMgr ) THROWS((Exception)); -Sequence<UString> OMyPersistObject_getSupportedServiceNames( ) THROWS( () ); -UString OMyPersistObject_getServiceName( ) THROWS( () ); -UString OMyPersistObject_getImplementationName( ) THROWS( () ); +XInterfaceRef OMyPersistObject_CreateInstance( const XMultiServiceFactoryRef & rSMgr ) THROWS((Exception)); +Sequence<UString> OMyPersistObject_getSupportedServiceNames( ) THROWS( () ); +UString OMyPersistObject_getServiceName( ) THROWS( () ); +UString OMyPersistObject_getImplementationName( ) THROWS( () ); Sequence<BYTE> createSeq( char * p ); Sequence<BYTE> createIntSeq( INT32 i ); @@ -75,7 +75,7 @@ Sequence<BYTE> createIntSeq( INT32 i ); m_seqErrors.getArray()[ m_seqErrors.getLen()-1] = StringToOUString( str , CHARSET_SYSTEM ); \ }\ ((void)0) - + #define WARNING_ASSERT(expr, Message) \ if( ! (expr) ) { \ diff --git a/extensions/util/hidother.src b/extensions/util/hidother.src index e890400d6ad8..48f2e8ec8aba 100644 --- a/extensions/util/hidother.src +++ b/extensions/util/hidother.src @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -31,54 +31,54 @@ #include "../inc/propctrlr.hrc" #include "../inc/update.hrc" -hidspecial HID_ABSPILOT { HelpId = HID_ABSPILOT; } -hidspecial HID_ABSPILOT_CANCEL { HelpId = HID_ABSPILOT_CANCEL; } -hidspecial HID_ABSPILOT_FINISH { HelpId = HID_ABSPILOT_FINISH; } -hidspecial HID_ABSPILOT_NEXT { HelpId = HID_ABSPILOT_NEXT; } -hidspecial HID_ABSPILOT_PREVIOUS { HelpId = HID_ABSPILOT_PREVIOUS; } +hidspecial HID_ABSPILOT { HelpId = HID_ABSPILOT; } +hidspecial HID_ABSPILOT_CANCEL { HelpId = HID_ABSPILOT_CANCEL; } +hidspecial HID_ABSPILOT_FINISH { HelpId = HID_ABSPILOT_FINISH; } +hidspecial HID_ABSPILOT_NEXT { HelpId = HID_ABSPILOT_NEXT; } +hidspecial HID_ABSPILOT_PREVIOUS { HelpId = HID_ABSPILOT_PREVIOUS; } -hidspecial HID_BIB_ADDRESS_POS { HelpId = HID_BIB_ADDRESS_POS; } -hidspecial HID_BIB_ANNOTE_POS { HelpId = HID_BIB_ANNOTE_POS; } -hidspecial HID_BIB_AUTHORITYTYPE_POS { HelpId = HID_BIB_AUTHORITYTYPE_POS; } -hidspecial HID_BIB_AUTHOR_POS { HelpId = HID_BIB_AUTHOR_POS; } -hidspecial HID_BIB_BOOKTITLE_POS { HelpId = HID_BIB_BOOKTITLE_POS; } -hidspecial HID_BIB_CHANGESOURCE { HelpId = HID_BIB_CHANGESOURCE; } -hidspecial HID_BIB_CHAPTER_POS { HelpId = HID_BIB_CHAPTER_POS; } -hidspecial HID_BIB_CONTROL_PAGE { HelpId = HID_BIB_CONTROL_PAGE; } -hidspecial HID_BIB_CONTROL_PARENT { HelpId = HID_BIB_CONTROL_PARENT; } -hidspecial HID_BIB_CUSTOM1_POS { HelpId = HID_BIB_CUSTOM1_POS; } -hidspecial HID_BIB_CUSTOM2_POS { HelpId = HID_BIB_CUSTOM2_POS; } -hidspecial HID_BIB_CUSTOM3_POS { HelpId = HID_BIB_CUSTOM3_POS; } -hidspecial HID_BIB_CUSTOM4_POS { HelpId = HID_BIB_CUSTOM4_POS; } -hidspecial HID_BIB_CUSTOM5_POS { HelpId = HID_BIB_CUSTOM5_POS; } -hidspecial HID_BIB_DB_GRIDCTRL { HelpId = HID_BIB_DB_GRIDCTRL; } -hidspecial HID_BIB_DB_TBX { HelpId = HID_BIB_DB_TBX; } +hidspecial HID_BIB_ADDRESS_POS { HelpId = HID_BIB_ADDRESS_POS; } +hidspecial HID_BIB_ANNOTE_POS { HelpId = HID_BIB_ANNOTE_POS; } +hidspecial HID_BIB_AUTHORITYTYPE_POS { HelpId = HID_BIB_AUTHORITYTYPE_POS; } +hidspecial HID_BIB_AUTHOR_POS { HelpId = HID_BIB_AUTHOR_POS; } +hidspecial HID_BIB_BOOKTITLE_POS { HelpId = HID_BIB_BOOKTITLE_POS; } +hidspecial HID_BIB_CHANGESOURCE { HelpId = HID_BIB_CHANGESOURCE; } +hidspecial HID_BIB_CHAPTER_POS { HelpId = HID_BIB_CHAPTER_POS; } +hidspecial HID_BIB_CONTROL_PAGE { HelpId = HID_BIB_CONTROL_PAGE; } +hidspecial HID_BIB_CONTROL_PARENT { HelpId = HID_BIB_CONTROL_PARENT; } +hidspecial HID_BIB_CUSTOM1_POS { HelpId = HID_BIB_CUSTOM1_POS; } +hidspecial HID_BIB_CUSTOM2_POS { HelpId = HID_BIB_CUSTOM2_POS; } +hidspecial HID_BIB_CUSTOM3_POS { HelpId = HID_BIB_CUSTOM3_POS; } +hidspecial HID_BIB_CUSTOM4_POS { HelpId = HID_BIB_CUSTOM4_POS; } +hidspecial HID_BIB_CUSTOM5_POS { HelpId = HID_BIB_CUSTOM5_POS; } +hidspecial HID_BIB_DB_GRIDCTRL { HelpId = HID_BIB_DB_GRIDCTRL; } +hidspecial HID_BIB_DB_TBX { HelpId = HID_BIB_DB_TBX; } hidspecial HID_BIB_DELETE_RECORD { HelpId = HID_BIB_DELETE_RECORD; } -hidspecial HID_BIB_EDITION_POS { HelpId = HID_BIB_EDITION_POS; } -hidspecial HID_BIB_EDITOR_POS { HelpId = HID_BIB_EDITOR_POS; } -hidspecial HID_BIB_HOWPUBLISHED_POS { HelpId = HID_BIB_HOWPUBLISHED_POS; } -hidspecial HID_BIB_IDENTIFIER_POS { HelpId = HID_BIB_IDENTIFIER_POS; } +hidspecial HID_BIB_EDITION_POS { HelpId = HID_BIB_EDITION_POS; } +hidspecial HID_BIB_EDITOR_POS { HelpId = HID_BIB_EDITOR_POS; } +hidspecial HID_BIB_HOWPUBLISHED_POS { HelpId = HID_BIB_HOWPUBLISHED_POS; } +hidspecial HID_BIB_IDENTIFIER_POS { HelpId = HID_BIB_IDENTIFIER_POS; } hidspecial HID_BIB_INSERT_RECORD { HelpId = HID_BIB_INSERT_RECORD; } -hidspecial HID_BIB_INSTITUTION_POS { HelpId = HID_BIB_INSTITUTION_POS; } -hidspecial HID_BIB_ISBN_POS { HelpId = HID_BIB_ISBN_POS; } -hidspecial HID_BIB_JOURNAL_POS { HelpId = HID_BIB_JOURNAL_POS; } -hidspecial HID_BIB_MAPPINGDLG { HelpId = HID_BIB_MAPPINGDLG; } -hidspecial HID_BIB_MONTH_POS { HelpId = HID_BIB_MONTH_POS; } -hidspecial HID_BIB_NOTE_POS { HelpId = HID_BIB_NOTE_POS; } -hidspecial HID_BIB_NUMBER_POS { HelpId = HID_BIB_NUMBER_POS; } -hidspecial HID_BIB_ORGANIZATIONS_POS { HelpId = HID_BIB_ORGANIZATIONS_POS; } -hidspecial HID_BIB_PAGES_POS { HelpId = HID_BIB_PAGES_POS; } -hidspecial HID_BIB_PUBLISHER_POS { HelpId = HID_BIB_PUBLISHER_POS; } -hidspecial HID_BIB_REPORTTYPE_POS { HelpId = HID_BIB_REPORTTYPE_POS; } -hidspecial HID_BIB_SCHOOL_POS { HelpId = HID_BIB_SCHOOL_POS; } -hidspecial HID_BIB_SERIES_POS { HelpId = HID_BIB_SERIES_POS; } -hidspecial HID_BIB_TBX_AUTOFILTER { HelpId = HID_BIB_TBX_AUTOFILTER; } -hidspecial HID_BIB_TBX_SEARCH { HelpId = HID_BIB_TBX_SEARCH; } -hidspecial HID_BIB_TBX_TABLE { HelpId = HID_BIB_TBX_TABLE; } -hidspecial HID_BIB_TITLE_POS { HelpId = HID_BIB_TITLE_POS; } -hidspecial HID_BIB_URL_POS { HelpId = HID_BIB_URL_POS; } -hidspecial HID_BIB_VOLUME_POS { HelpId = HID_BIB_VOLUME_POS; } -hidspecial HID_BIB_YEAR_POS { HelpId = HID_BIB_YEAR_POS; } +hidspecial HID_BIB_INSTITUTION_POS { HelpId = HID_BIB_INSTITUTION_POS; } +hidspecial HID_BIB_ISBN_POS { HelpId = HID_BIB_ISBN_POS; } +hidspecial HID_BIB_JOURNAL_POS { HelpId = HID_BIB_JOURNAL_POS; } +hidspecial HID_BIB_MAPPINGDLG { HelpId = HID_BIB_MAPPINGDLG; } +hidspecial HID_BIB_MONTH_POS { HelpId = HID_BIB_MONTH_POS; } +hidspecial HID_BIB_NOTE_POS { HelpId = HID_BIB_NOTE_POS; } +hidspecial HID_BIB_NUMBER_POS { HelpId = HID_BIB_NUMBER_POS; } +hidspecial HID_BIB_ORGANIZATIONS_POS { HelpId = HID_BIB_ORGANIZATIONS_POS; } +hidspecial HID_BIB_PAGES_POS { HelpId = HID_BIB_PAGES_POS; } +hidspecial HID_BIB_PUBLISHER_POS { HelpId = HID_BIB_PUBLISHER_POS; } +hidspecial HID_BIB_REPORTTYPE_POS { HelpId = HID_BIB_REPORTTYPE_POS; } +hidspecial HID_BIB_SCHOOL_POS { HelpId = HID_BIB_SCHOOL_POS; } +hidspecial HID_BIB_SERIES_POS { HelpId = HID_BIB_SERIES_POS; } +hidspecial HID_BIB_TBX_AUTOFILTER { HelpId = HID_BIB_TBX_AUTOFILTER; } +hidspecial HID_BIB_TBX_SEARCH { HelpId = HID_BIB_TBX_SEARCH; } +hidspecial HID_BIB_TBX_TABLE { HelpId = HID_BIB_TBX_TABLE; } +hidspecial HID_BIB_TITLE_POS { HelpId = HID_BIB_TITLE_POS; } +hidspecial HID_BIB_URL_POS { HelpId = HID_BIB_URL_POS; } +hidspecial HID_BIB_VOLUME_POS { HelpId = HID_BIB_VOLUME_POS; } +hidspecial HID_BIB_YEAR_POS { HelpId = HID_BIB_YEAR_POS; } hidspecial HID_CHECK_FOR_UPD_CANCEL { HelpId = HID_CHECK_FOR_UPD_CANCEL; } hidspecial HID_CHECK_FOR_UPD_CLOSE { HelpId = HID_CHECK_FOR_UPD_CLOSE; } @@ -131,19 +131,19 @@ hidspecial HID_EVT_UNLOADING { HelpId = HID_EVT_UNLOADING; } hidspecial HID_FIELDLINK_DETAIL_COLUMN { HelpId = HID_FIELDLINK_DETAIL_COLUMN; } hidspecial HID_FIELDLINK_MASTER_COLUMN { HelpId = HID_FIELDLINK_MASTER_COLUMN; } -hidspecial HID_GRIDWIZARD_CANCEL { HelpId = HID_GRIDWIZARD_CANCEL; } -hidspecial HID_GRIDWIZARD_FINISH { HelpId = HID_GRIDWIZARD_FINISH; } -hidspecial HID_GRIDWIZARD_NEXT { HelpId = HID_GRIDWIZARD_NEXT; } -hidspecial HID_GRIDWIZARD_PREVIOUS { HelpId = HID_GRIDWIZARD_PREVIOUS; }; -hidspecial HID_GROUPWIZARD_CANCEL { HelpId = HID_GROUPWIZARD_CANCEL; } -hidspecial HID_GROUPWIZARD_FINISH { HelpId = HID_GROUPWIZARD_FINISH; } -hidspecial HID_GROUPWIZARD_NEXT { HelpId = HID_GROUPWIZARD_NEXT; } -hidspecial HID_GROUPWIZARD_PREVIOUS { HelpId = HID_GROUPWIZARD_PREVIOUS; } +hidspecial HID_GRIDWIZARD_CANCEL { HelpId = HID_GRIDWIZARD_CANCEL; } +hidspecial HID_GRIDWIZARD_FINISH { HelpId = HID_GRIDWIZARD_FINISH; } +hidspecial HID_GRIDWIZARD_NEXT { HelpId = HID_GRIDWIZARD_NEXT; } +hidspecial HID_GRIDWIZARD_PREVIOUS { HelpId = HID_GRIDWIZARD_PREVIOUS; }; +hidspecial HID_GROUPWIZARD_CANCEL { HelpId = HID_GROUPWIZARD_CANCEL; } +hidspecial HID_GROUPWIZARD_FINISH { HelpId = HID_GROUPWIZARD_FINISH; } +hidspecial HID_GROUPWIZARD_NEXT { HelpId = HID_GROUPWIZARD_NEXT; } +hidspecial HID_GROUPWIZARD_PREVIOUS { HelpId = HID_GROUPWIZARD_PREVIOUS; } -hidspecial HID_LISTWIZARD_CANCEL { HelpId = HID_LISTWIZARD_CANCEL; } -hidspecial HID_LISTWIZARD_FINISH { HelpId = HID_LISTWIZARD_FINISH; } -hidspecial HID_LISTWIZARD_NEXT { HelpId = HID_LISTWIZARD_NEXT; } -hidspecial HID_LISTWIZARD_PREVIOUS { HelpId = HID_LISTWIZARD_PREVIOUS; } +hidspecial HID_LISTWIZARD_CANCEL { HelpId = HID_LISTWIZARD_CANCEL; } +hidspecial HID_LISTWIZARD_FINISH { HelpId = HID_LISTWIZARD_FINISH; } +hidspecial HID_LISTWIZARD_NEXT { HelpId = HID_LISTWIZARD_NEXT; } +hidspecial HID_LISTWIZARD_PREVIOUS { HelpId = HID_LISTWIZARD_PREVIOUS; } hidspecial HID_PROP_ALIGN { HelpId = HID_PROP_ALIGN; } hidspecial HID_PROP_ALLOW_ADDITIONS { HelpId = HID_PROP_ALLOW_ADDITIONS; } @@ -265,7 +265,7 @@ hidspecial HID_PROP_SCROLLVALUEMIN { HelpId = HID_PROP_SCROLLVALUE_ hidspecial HID_PROP_SCROLLVALUE_MAX { HelpId = HID_PROP_SCROLLVALUE_MAX; } hidspecial HID_PROP_SCROLLVALUE_MIN { HelpId = HID_PROP_SCROLLVALUE_MIN; } hidspecial HID_PROP_SEARCHING { HelpId = HID_PROP_SEARCHING; } -hidspecial HID_PROP_SELECTEDITEMS { HelpId = HID_PROP_SELECTEDITEMS; } +hidspecial HID_PROP_SELECTEDITEMS { HelpId = HID_PROP_SELECTEDITEMS; } hidspecial HID_PROP_SELECTION_TYPE { HelpId = HID_PROP_SELECTION_TYPE; } hidspecial HID_PROP_SHOWS_HANDLES { HelpId = HID_PROP_SHOWS_HANDLES; } hidspecial HID_PROP_SHOWS_ROOT_HANDLES { HelpId = HID_PROP_SHOWS_ROOT_HANDLES; } @@ -342,7 +342,7 @@ hidspecial HID_PROP_XSD_WHITESPACES { HelpId = HID_PROP_XSD_WHITESPA hidspecial HID_SELECTION_TLB { HelpId = HID_SELECTION_TLB; } -hidspecial UID_ABSPILOT_HELP { HelpId = UID_ABSPILOT_HELP; } +hidspecial UID_ABSPILOT_HELP { HelpId = UID_ABSPILOT_HELP; } hidspecial UID_BIB_FRAME_WINDOW { HelpId = UID_BIB_FRAME_WINDOW;} hidspecial UID_BRWEVT_ACTIONPERFORMED { HelpId = UID_BRWEVT_ACTIONPERFORMED; } @@ -391,25 +391,25 @@ hidspecial UID_FIELDLINK_MASTER3 { HelpId = UID_FIELDLINK_MASTER3 hidspecial UID_FIELDLINK_MASTER4 { HelpId = UID_FIELDLINK_MASTER4; } hidspecial UID_PROP_ADD_DATA_TYPE { HelpId = UID_PROP_ADD_DATA_TYPE; } +hidspecial UID_PROP_DLG_ATTR_DATASOURCE { HelpId = UID_PROP_DLG_ATTR_DATASOURCE; } hidspecial UID_PROP_DLG_ATTR_DATASOURCE { HelpId = UID_PROP_DLG_ATTR_DATASOURCE; } -hidspecial UID_PROP_DLG_ATTR_DATASOURCE { HelpId = UID_PROP_DLG_ATTR_DATASOURCE; } -hidspecial UID_PROP_DLG_ATTR_TARGET_URL { HelpId = UID_PROP_DLG_ATTR_TARGET_URL; } +hidspecial UID_PROP_DLG_ATTR_TARGET_URL { HelpId = UID_PROP_DLG_ATTR_TARGET_URL; } hidspecial UID_PROP_DLG_ATTR_TARGET_URL { HelpId = UID_PROP_DLG_ATTR_TARGET_URL; } -hidspecial UID_PROP_DLG_BACKGROUNDCOLOR { HelpId = UID_PROP_DLG_BACKGROUNDCOLOR; } +hidspecial UID_PROP_DLG_BACKGROUNDCOLOR { HelpId = UID_PROP_DLG_BACKGROUNDCOLOR; } hidspecial UID_PROP_DLG_BACKGROUNDCOLOR { HelpId = UID_PROP_DLG_BACKGROUNDCOLOR; } hidspecial UID_PROP_DLG_BIND_EXPRESSION { HelpId = UID_PROP_DLG_BIND_EXPRESSION; } hidspecial UID_PROP_DLG_BORDERCOLOR { HelpId = UID_PROP_DLG_BORDERCOLOR; } +hidspecial UID_PROP_DLG_CONTROLLABEL { HelpId = UID_PROP_DLG_CONTROLLABEL; } hidspecial UID_PROP_DLG_CONTROLLABEL { HelpId = UID_PROP_DLG_CONTROLLABEL; } -hidspecial UID_PROP_DLG_CONTROLLABEL { HelpId = UID_PROP_DLG_CONTROLLABEL; } -hidspecial UID_PROP_DLG_FILLCOLOR { HelpId = UID_PROP_DLG_FILLCOLOR; } +hidspecial UID_PROP_DLG_FILLCOLOR { HelpId = UID_PROP_DLG_FILLCOLOR; } hidspecial UID_PROP_DLG_FILLCOLOR { HelpId = UID_PROP_DLG_FILLCOLOR; } hidspecial UID_PROP_DLG_FILTER { HelpId = UID_PROP_DLG_FILTER; } -hidspecial UID_PROP_DLG_FONT_TYPE { HelpId = UID_PROP_DLG_FONT_TYPE; } +hidspecial UID_PROP_DLG_FONT_TYPE { HelpId = UID_PROP_DLG_FONT_TYPE; } hidspecial UID_PROP_DLG_FONT_TYPE { HelpId = UID_PROP_DLG_FONT_TYPE; } hidspecial UID_PROP_DLG_FORMLINKFIELDS { HelpId = UID_PROP_DLG_FORMLINKFIELDS; } +hidspecial UID_PROP_DLG_IMAGE_URL { HelpId = UID_PROP_DLG_IMAGE_URL; } hidspecial UID_PROP_DLG_IMAGE_URL { HelpId = UID_PROP_DLG_IMAGE_URL; } -hidspecial UID_PROP_DLG_IMAGE_URL { HelpId = UID_PROP_DLG_IMAGE_URL; } -hidspecial UID_PROP_DLG_NUMBER_FORMAT { HelpId = UID_PROP_DLG_NUMBER_FORMAT; } +hidspecial UID_PROP_DLG_NUMBER_FORMAT { HelpId = UID_PROP_DLG_NUMBER_FORMAT; } hidspecial UID_PROP_DLG_NUMBER_FORMAT { HelpId = UID_PROP_DLG_NUMBER_FORMAT; } hidspecial UID_PROP_DLG_ORDER { HelpId = UID_PROP_DLG_ORDER; } hidspecial UID_PROP_DLG_SELECTION { HelpId = UID_PROP_DLG_SELECTION; } diff --git a/extensions/workben/pythonautotest.cxx b/extensions/workben/pythonautotest.cxx index aab403885835..1b44b17ef392 100644 --- a/extensions/workben/pythonautotest.cxx +++ b/extensions/workben/pythonautotest.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -63,34 +63,34 @@ class MyPythonRoot : { public: MyPythonRoot() { m_iTestValue = 15; } - BOOL queryInterface( Uik aUik, XInterfaceRef & rOut ); - void acquire() { OWeakObject::acquire(); } - void release() { OWeakObject::release(); } - void* getImplementation(Reflection *p) { return OWeakObject::getImplementation(p); } + BOOL queryInterface( Uik aUik, XInterfaceRef & rOut ); + void acquire() { OWeakObject::acquire(); } + void release() { OWeakObject::release(); } + void* getImplementation(Reflection *p) { return OWeakObject::getImplementation(p); } public: - XIntrospectionAccessRef getIntrospection(void) const THROWS( (UsrSystemException) ) + XIntrospectionAccessRef getIntrospection(void) const THROWS( (UsrSystemException) ) { return XIntrospectionAccessRef(); } - UsrAny invoke( const UString& FunctionName, + UsrAny invoke( const UString& FunctionName, const Sequence< UsrAny >& Params, Sequence< INT16 >& OutParamIndex, Sequence< UsrAny >& OutParam) - THROWS( ( IllegalArgumentException, + THROWS( ( IllegalArgumentException, CannotConvertException, InvocationTargetException, UsrSystemException) ); - void setValue(const UString& PropertyName, const UsrAny& Value) - THROWS( ( UnknownPropertyException, + void setValue(const UString& PropertyName, const UsrAny& Value) + THROWS( ( UnknownPropertyException, CannotConvertException, InvocationTargetException, UsrSystemException) ); - UsrAny getValue(const UString& PropertyName) - THROWS( ( UnknownPropertyException, + UsrAny getValue(const UString& PropertyName) + THROWS( ( UnknownPropertyException, UsrSystemException) ); - BOOL hasMethod(const UString& Name) const THROWS( (UsrSystemException) ); - BOOL hasProperty(const UString& Name) const THROWS( (UsrSystemException) ); + BOOL hasMethod(const UString& Name) const THROWS( (UsrSystemException) ); + BOOL hasProperty(const UString& Name) const THROWS( (UsrSystemException) ); void getTestValueViaInout( int &inout ) @@ -125,11 +125,11 @@ BOOL MyPythonRoot::queryInterface( Uik aUik, XInterfaceRef &rOut ) } -UsrAny MyPythonRoot::invoke( const UString& FunctionName, +UsrAny MyPythonRoot::invoke( const UString& FunctionName, const Sequence< UsrAny >& Params, Sequence< INT16 >& OutParamIndex, Sequence< UsrAny >& OutParam) - THROWS( ( IllegalArgumentException, + THROWS( ( IllegalArgumentException, CannotConvertException, InvocationTargetException, UsrSystemException) ) @@ -152,8 +152,8 @@ UsrAny MyPythonRoot::invoke( const UString& FunctionName, return UsrAny(); } -void MyPythonRoot::setValue(const UString& PropertyName, const UsrAny& Value) - THROWS( ( UnknownPropertyException, +void MyPythonRoot::setValue(const UString& PropertyName, const UsrAny& Value) + THROWS( ( UnknownPropertyException, CannotConvertException, InvocationTargetException, UsrSystemException) ) @@ -166,8 +166,8 @@ void MyPythonRoot::setValue(const UString& PropertyName, const UsrAny& Value) } } -UsrAny MyPythonRoot::getValue(const UString& PropertyName) - THROWS( ( UnknownPropertyException, +UsrAny MyPythonRoot::getValue(const UString& PropertyName) + THROWS( ( UnknownPropertyException, UsrSystemException) ) { UsrAny aRet; @@ -183,7 +183,7 @@ UsrAny MyPythonRoot::getValue(const UString& PropertyName) } -BOOL MyPythonRoot::hasMethod(const UString& Name) const THROWS( (UsrSystemException) ) +BOOL MyPythonRoot::hasMethod(const UString& Name) const THROWS( (UsrSystemException) ) { if( L"printTestValue" == Name ) { return TRUE; @@ -198,7 +198,7 @@ BOOL MyPythonRoot::hasMethod(const UString& Name) const THROWS( (UsrSyst } -BOOL MyPythonRoot::hasProperty(const UString& Name) const THROWS( (UsrSystemException) ) +BOOL MyPythonRoot::hasProperty(const UString& Name) const THROWS( (UsrSystemException) ) { if( L"TestValue" == Name ) { return TRUE; @@ -237,10 +237,10 @@ public: } } - BOOL queryInterface( Uik aUik, XInterfaceRef & rOut ); - void acquire() { OWeakObject::acquire(); } - void release() { OWeakObject::release(); } - void* getImplementation(Reflection *p) { return OWeakObject::getImplementation(p); } + BOOL queryInterface( Uik aUik, XInterfaceRef & rOut ); + void acquire() { OWeakObject::acquire(); } + void release() { OWeakObject::release(); } + void* getImplementation(Reflection *p) { return OWeakObject::getImplementation(p); } void attach( XDebuggingRef *p ) @@ -331,7 +331,7 @@ void checkInvokation( const XInvokationRef &xInvoke ) any = (*pRef)->invoke( L"count" , seq , Sequence<INT16>(), Sequence<UsrAny>() ); int nOldSize = any.getINT32(); - any = (*pRef)->invoke( L"append" , seq , Sequence<INT16>(), Sequence<UsrAny>() ); + any = (*pRef)->invoke( L"append" , seq , Sequence<INT16>(), Sequence<UsrAny>() ); any = (*pRef)->invoke( L"count" , seq , Sequence<INT16>(), Sequence<UsrAny>() ); OSL_ASSERT( nOldSize + 1 == any.getINT32() ); @@ -343,32 +343,32 @@ class PythonCodeLibrary : public OWeakObject { - BOOL queryInterface( Uik aUik, XInterfaceRef & rOut ); - void acquire() { OWeakObject::acquire(); } - void release() { OWeakObject::release(); } - void* getImplementation(Reflection *p) { return OWeakObject::getImplementation(p); } + BOOL queryInterface( Uik aUik, XInterfaceRef & rOut ); + void acquire() { OWeakObject::acquire(); } + void release() { OWeakObject::release(); } + void* getImplementation(Reflection *p) { return OWeakObject::getImplementation(p); } - virtual BOOL isFunction(const UString& FunctionName) THROWS( (UsrSystemException) ) + virtual BOOL isFunction(const UString& FunctionName) THROWS( (UsrSystemException) ) { return FALSE; } - virtual BOOL isValidPath(const UString& PathName) THROWS( (UsrSystemException) ) + virtual BOOL isValidPath(const UString& PathName) THROWS( (UsrSystemException) ) { return FALSE; } - virtual Sequence< UString > getModuleNames(void) THROWS( (UsrSystemException) ) + virtual Sequence< UString > getModuleNames(void) THROWS( (UsrSystemException) ) { return Sequence<UString> (); } - virtual UString getModuleSource(const UString& ModulName) THROWS( (UsrSystemException) ) + virtual UString getModuleSource(const UString& ModulName) THROWS( (UsrSystemException) ) { if( ModulName == L"testmodul" ) { return UString( L"def testmethod():\n" - L" return 42\n"); + L" return 42\n"); } return UString(); } @@ -430,7 +430,7 @@ int __LOADONCALLAPI main (int argc, char **argv) // execute a simple script - xEngine->run( L"nIntTest = 5\n" + xEngine->run( L"nIntTest = 5\n" L"list = [2,3,4]\n" , XInterfaceRef(), Sequence<UsrAny> () ); /**** @@ -457,9 +457,9 @@ int __LOADONCALLAPI main (int argc, char **argv) // call a python method ! { xEngine->run( L"def foo():\n" - L" return 'this is foo'\n" , XInterfaceRef() , Sequence<UsrAny> () ); - OSL_ASSERT( xInvoke->hasMethod( L"foo" ) ); - UsrAny any = xInvoke->invoke( L"foo" , + L" return 'this is foo'\n" , XInterfaceRef() , Sequence<UsrAny> () ); + OSL_ASSERT( xInvoke->hasMethod( L"foo" ) ); + UsrAny any = xInvoke->invoke( L"foo" , Sequence<UsrAny>(), Sequence<INT16>() , Sequence<UsrAny> () ); @@ -556,7 +556,7 @@ int __LOADONCALLAPI main (int argc, char **argv) XLibraryAccessRef xLibrary( ( XLibraryAccess * ) new PythonCodeLibrary , USR_QUERY ); xEngine->setLibraryAccess( xLibrary ); - xEngine->run( L"import testmodul\n" + xEngine->run( L"import testmodul\n" L"x = testmodul.testmethod()\n" , XInterfaceRef() , Sequence<UsrAny>() ); UsrAny any = xInvoke->getValue( L"x" ); OSL_ASSERT( any.getReflection()->getTypeClass() == TypeClass_LONG ); @@ -566,7 +566,7 @@ int __LOADONCALLAPI main (int argc, char **argv) // check other imports { // Check, if the libraries are available at run time - xEngine->run( L"import math\n" + xEngine->run( L"import math\n" L"dMathTest = math.exp(0)\n" , XInterfaceRef() , Sequence<UsrAny> () ); OSL_ASSERT( xInvoke->hasProperty( L"dMathTest" ) ); @@ -578,7 +578,7 @@ int __LOADONCALLAPI main (int argc, char **argv) // Test connection to root object ! { - xEngine->run( L"x = stardiv.root.TestValue\n" + xEngine->run( L"x = stardiv.root.TestValue\n" L"y = stardiv.inout(5)\n" L"stardiv.root.getTestValueViaInout(y)\n" L"z = y.value\n" , XInterfaceRef() , Sequence<UsrAny> () ); diff --git a/extensions/workben/pythontest.cxx b/extensions/workben/pythontest.cxx index dfb3fa3e0019..85a99532a698 100644 --- a/extensions/workben/pythontest.cxx +++ b/extensions/workben/pythontest.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -86,10 +86,10 @@ public: } } - BOOL queryInterface( Uik aUik, XInterfaceRef & rOut ); - void acquire() { OWeakObject::acquire(); } - void release() { OWeakObject::release(); } - void* getImplementation(Reflection *p) { return OWeakObject::getImplementation(p); } + BOOL queryInterface( Uik aUik, XInterfaceRef & rOut ); + void acquire() { OWeakObject::acquire(); } + void release() { OWeakObject::release(); } + void* getImplementation(Reflection *p) { return OWeakObject::getImplementation(p); } void attach( XDebuggingRef *p , XEngineRef *pEngine , XInvokationRef *pInvokation ) @@ -152,10 +152,10 @@ protected: osl::Condition m_aDebugCondition; XDebuggingRef *m_pDebuggingRef; - XEngineRef *m_pEngineRef; + XEngineRef *m_pEngineRef; XInvokationRef *m_pInvokationRef; int m_bIsRunning; - int m_bIsTerminating; // The listeners ignore everything when set + int m_bIsTerminating; // The listeners ignore everything when set }; @@ -205,13 +205,13 @@ void CmdDebugger::cmdLine() } else if( ! strncmp( pcLine , "sbp" , 3 ) ){ if( m_bIsRunning ) { - (*m_pDebuggingRef)->setBreakPoint( UString( L"<string>" ), + (*m_pDebuggingRef)->setBreakPoint( UString( L"<string>" ), atoi(&pcLine[3]) , TRUE ); } } else if( ! strncmp( pcLine , "rbp" , 3 ) ){ if( m_bIsRunning ) { - (*m_pDebuggingRef)->setBreakPoint( UString( L"<string>" ), + (*m_pDebuggingRef)->setBreakPoint( UString( L"<string>" ), atoi(&pcLine[3]) , FALSE ); } } @@ -319,7 +319,7 @@ void CmdDebugger::cmdLine() " dump Variable : dv varname [CallStack]\n" " set Variable : sv varname value [CallStack]\n" "globals via XInvokation Interface :\n" - " dump Global vars : id\n" + " dump Global vars : id\n" " dump Variable : idv varname\n" " set Variable : isv varname value\n" "ContextInformation : ci\n" @@ -352,8 +352,8 @@ void CmdDebugger::dumpIntrospectionToStream( const XIntrospectionAccessRef &ref, iMax = seqProp.getLen(); Property *aProp = seqProp.getArray(); for( i = 0; i < iMax ; i ++ ) { - fprintf( f, " %s %s\n" , USTRING_TO_PCHAR( aProp[i].Type->getName() ), - USTRING_TO_PCHAR( aProp[i].Name ) ); + fprintf( f, " %s %s\n" , USTRING_TO_PCHAR( aProp[i].Type->getName() ), + USTRING_TO_PCHAR( aProp[i].Name ) ); } } @@ -369,7 +369,7 @@ void CmdDebugger::dumpVarToStream( const char *pc , const UsrAny &aValue, FILE * fprintf( f, "ENUM %s : %d\n", pc , aValue.getEnumAsINT32() ); } else if( TypeClass_STRING == type ) { - fprintf( f, "STRING %s : %s\n" , pc , USTRING_TO_PCHAR( aValue.getString()) ); + fprintf( f, "STRING %s : %s\n" , pc , USTRING_TO_PCHAR( aValue.getString()) ); } else if( TypeClass_BOOLEAN == type ) { fprintf( f, "BOOL %s : %d\n", pc , aValue.getBOOL() ); @@ -387,7 +387,7 @@ void CmdDebugger::dumpVarToStream( const char *pc , const UsrAny &aValue, FILE * fprintf( f, "UINT16 %s : %d\n", pc , (INT32) aValue.getUINT16() ); } else if( TypeClass_UNSIGNED_BYTE == type ) { - fprintf( f, "Byte %s : %d\n", pc , (INT32) aValue.getBYTE() ); + fprintf( f, "Byte %s : %d\n", pc , (INT32) aValue.getBYTE() ); } else if( TypeClass_UNSIGNED_INT == type ) { fprintf( f, "UINT32 %s : %d\n", pc , aValue.getUINT32() ); @@ -519,7 +519,7 @@ int __LOADONCALLAPI main (int argc, char **argv) if( argc >1 && ! strcmp( argv[1] , "1" ) ) { fprintf( stderr, "one thread only\n" ); - Script = UString( L"print 'Hello World'\n" ); + Script = UString( L"print 'Hello World'\n" ); xEngine->runAsync( Script , XInterfaceRef(), args , XEngineListenerRef() ); } else if( argc >1 && ! strcmp( argv[1] , "2" ) ) { diff --git a/extensions/workben/testcomponent.cxx b/extensions/workben/testcomponent.cxx index 705d451da5be..e32a53769830 100644 --- a/extensions/workben/testcomponent.cxx +++ b/extensions/workben/testcomponent.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -72,7 +72,7 @@ int __LOADONCALLAPI main (int argc, char **argv) #endif // create service manager -// XMultiServiceFactoryRef xSMgr = getProcessServiceManager(); +// XMultiServiceFactoryRef xSMgr = getProcessServiceManager(); XMultiServiceFactoryRef xSMgr = createRegistryServiceManager(); OSL_ASSERT( xSMgr.is() ); registerUsrServices( xSMgr ); @@ -81,18 +81,18 @@ int __LOADONCALLAPI main (int argc, char **argv) XImplementationRegistrationRef xReg; XSimpleRegistryRef xSimpleReg; - try { + try { // Create registration service XInterfaceRef x = xSMgr->createInstance( UString::createFromAscii( "com.sun.star.registry.ImplementationRegistration" ) ); x->queryInterface( XImplementationRegistration::getSmartUik() , xReg ); -/* x = xSMgr->createInstance( L"stardiv.uno.repos.SimpleRegistry" ); +/* x = xSMgr->createInstance( L"stardiv.uno.repos.SimpleRegistry" ); OSL_ASSERT( x.is() ); x->queryInterface( XSimpleRegistry::getSmartUik() , xSimpleReg ); OSL_ASSERT( xSimpleReg.is() ); xSimpleReg->open( L"testcomp.rdb" , FALSE , TRUE ); -*/ } +*/ } catch( Exception& e ) { printf( "%s\n" , OWStringToOString( e.getName() , CHARSET_SYSTEM ).getStr() ); exit(1); @@ -165,15 +165,15 @@ int __LOADONCALLAPI main (int argc, char **argv) XInterfaceRef x = xSMgr->createInstance( OStringToOWString( argv[1] , CHARSET_SYSTEM ) ); if( ! x.is() ) { printf( "Couldn't instantiate service !\n" ); - exit( 1 ); + exit( 1 ); } // do the test - try { + try { nNewHandle = xTest->test( OStringToOWString( argv[1] , CHARSET_SYSTEM ) , x , nHandle ); } catch ( Exception& e ) { - printf( "testcomponent : uncaught exception %s\n" , + printf( "testcomponent : uncaught exception %s\n" , OWStringToOString( e.getName(), CHARSET_SYSTEM ).getStr() ); exit(1); } @@ -181,25 +181,25 @@ int __LOADONCALLAPI main (int argc, char **argv) printf( "testcomponent : uncaught unknown exception\n" ); exit(1); } - - + + // print errors and warning Sequence<UString> seqErrors = xTest->getErrors(); Sequence<UString> seqWarnings = xTest->getWarnings(); if( seqWarnings.getLen() > nWarningCount ) { printf( "Warnings during test %d!\n" , nHandle ); for( ; nWarningCount < seqWarnings.getLen() ; nWarningCount ++ ) { - printf( "Warning\n%s\n---------\n" , + printf( "Warning\n%s\n---------\n" , OWStringToOString( seqWarnings.getArray()[nWarningCount], CHARSET_SYSTEM ).getStr() ); - } + } } if( seqErrors.getLen() > nErrorCount ) { printf( "Errors during test %d!\n" , nHandle ); for( ; nErrorCount < seqErrors.getLen() ; nErrorCount ++ ) { - printf( "%s\n" , - OWStringToOString( + printf( "%s\n" , + OWStringToOString( seqErrors.getArray()[nErrorCount], CHARSET_SYSTEM ).getStr() ); } } @@ -211,7 +211,7 @@ int __LOADONCALLAPI main (int argc, char **argv) printf( "Test passed !\n" ); } else { - printf( "Test failed !\n" ); + printf( "Test failed !\n" ); } XComponentRef rComp( xSMgr , USR_QUERY ); diff --git a/extensions/workben/testframecontrol.cxx b/extensions/workben/testframecontrol.cxx index 11025e604648..ba5d53de11c3 100644 --- a/extensions/workben/testframecontrol.cxx +++ b/extensions/workben/testframecontrol.cxx @@ -58,41 +58,41 @@ class Listener_Impl public: SMART_UNO_DECLARATION( Listener_Impl, UsrObject ); - virtual BOOL queryInterface( Uik aUik, XInterfaceRef& rOut ); + virtual BOOL queryInterface( Uik aUik, XInterfaceRef& rOut ); // XMouseListener - virtual void mousePressed( const VclMouseEvent& evt ); - virtual void mouseReleased( const VclMouseEvent& evt ); - virtual void mouseEntered( const VclMouseEvent& evt ); - virtual void mouseExited( const VclMouseEvent& evt ); + virtual void mousePressed( const VclMouseEvent& evt ); + virtual void mouseReleased( const VclMouseEvent& evt ); + virtual void mouseEntered( const VclMouseEvent& evt ); + virtual void mouseExited( const VclMouseEvent& evt ); // XMouseMotionListener - virtual void mouseDragged( const VclMouseEvent& evt ); - virtual void mouseMoved( const VclMouseEvent& evt ); + virtual void mouseDragged( const VclMouseEvent& evt ); + virtual void mouseMoved( const VclMouseEvent& evt ); // XKeyListener - virtual void keyPressed( const VclKeyEvent& evt ); - virtual void keyReleased( const VclKeyEvent& evt ); + virtual void keyPressed( const VclKeyEvent& evt ); + virtual void keyReleased( const VclKeyEvent& evt ); // XFocusListener - virtual void focusGained( const FocusEvent& evt ); - virtual void focusLost( const FocusEvent& evt ); + virtual void focusGained( const FocusEvent& evt ); + virtual void focusLost( const FocusEvent& evt ); // XWindowListener - virtual void windowResized( const WindowEvent& evt ); - virtual void windowMoved( const WindowEvent& evt ); - virtual void windowShown( const EventObject& evt ); - virtual void windowHidden( const EventObject& evt ); + virtual void windowResized( const WindowEvent& evt ); + virtual void windowMoved( const WindowEvent& evt ); + virtual void windowShown( const EventObject& evt ); + virtual void windowHidden( const EventObject& evt ); // XPaintListener - virtual void windowPaint( const PaintEvent& evt ); + virtual void windowPaint( const PaintEvent& evt ); // XEventListener - virtual void disposing( const EventObject& evt ); + virtual void disposing( const EventObject& evt ); public: - void addAllListeners( const XControlRef& xControl ); - void removeAllListeners( const XControlRef& xControl ); + void addAllListeners( const XControlRef& xControl ); + void removeAllListeners( const XControlRef& xControl ); }; //-------------------------------------------------------------------------------------------------- @@ -153,28 +153,28 @@ BOOL Listener_Impl::queryInterface( Uik aUik, XInterfaceRef& rOut ) //-------------------------------------------------------------------------------------------------- // XMouseListener -void Listener_Impl::mousePressed( const VclMouseEvent& evt ) {} -void Listener_Impl::mouseReleased( const VclMouseEvent& evt ) {} -void Listener_Impl::mouseEntered( const VclMouseEvent& evt ) {} -void Listener_Impl::mouseExited( const VclMouseEvent& evt ) {} +void Listener_Impl::mousePressed( const VclMouseEvent& evt ) {} +void Listener_Impl::mouseReleased( const VclMouseEvent& evt ) {} +void Listener_Impl::mouseEntered( const VclMouseEvent& evt ) {} +void Listener_Impl::mouseExited( const VclMouseEvent& evt ) {} // XMouseMotionListener -void Listener_Impl::mouseDragged( const VclMouseEvent& evt ) {} -void Listener_Impl::mouseMoved( const VclMouseEvent& evt ) {} +void Listener_Impl::mouseDragged( const VclMouseEvent& evt ) {} +void Listener_Impl::mouseMoved( const VclMouseEvent& evt ) {} // XKeyListener -void Listener_Impl::keyPressed( const VclKeyEvent& evt ) {} -void Listener_Impl::keyReleased( const VclKeyEvent& evt ) {} +void Listener_Impl::keyPressed( const VclKeyEvent& evt ) {} +void Listener_Impl::keyReleased( const VclKeyEvent& evt ) {} // XFocusListener -void Listener_Impl::focusGained( const FocusEvent& evt ) {} -void Listener_Impl::focusLost( const FocusEvent& evt ) {} +void Listener_Impl::focusGained( const FocusEvent& evt ) {} +void Listener_Impl::focusLost( const FocusEvent& evt ) {} // XWindowListener -void Listener_Impl::windowResized( const WindowEvent& evt ) {} -void Listener_Impl::windowMoved( const WindowEvent& evt ) {} -void Listener_Impl::windowShown( const EventObject& evt ) {} -void Listener_Impl::windowHidden( const EventObject& evt ) {} +void Listener_Impl::windowResized( const WindowEvent& evt ) {} +void Listener_Impl::windowMoved( const WindowEvent& evt ) {} +void Listener_Impl::windowShown( const EventObject& evt ) {} +void Listener_Impl::windowHidden( const EventObject& evt ) {} // XPaintListener void Listener_Impl::windowPaint( const PaintEvent& evt ) @@ -193,7 +193,7 @@ void Listener_Impl::windowPaint( const PaintEvent& evt ) } // XEventListener -void Listener_Impl::disposing( const EventObject& evt ) {} +void Listener_Impl::disposing( const EventObject& evt ) {} //================================================================================================== @@ -205,17 +205,17 @@ public: virtual void ShowStatusText( const XubString& rText ); public: - FrameControlApplication() {} + FrameControlApplication() {} private: - void init(); - void deinit(); + void init(); + void deinit(); private: - Listener_Impl* _pListener; - XControlRef _xControl; + Listener_Impl* _pListener; + XControlRef _xControl; - WorkWindow* _pWorkWin; + WorkWindow* _pWorkWin; }; FrameControlApplication g_App; @@ -281,7 +281,7 @@ void FrameControlApplication::deinit() { _pListener->removeAllListeners( _xControl ); - _xControl->dispose(); // disposing event should occur + _xControl->dispose(); // disposing event should occur _pListener->release(); _pListener = NULL; @@ -296,8 +296,8 @@ void FrameControlApplication::deinit() //-------------------------------------------------------------------------------------------------- void FrameControlApplication::Main() { -// void TestErrcodes(); -// TestErrcodes(); +// void TestErrcodes(); +// TestErrcodes(); EnterMultiThread(); SetAppName( "RadioActiveControl-Demo" ); diff --git a/extensions/workben/testpgp.cxx b/extensions/workben/testpgp.cxx index 6027a68e4d70..1a7902c618db 100644 --- a/extensions/workben/testpgp.cxx +++ b/extensions/workben/testpgp.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -737,7 +737,7 @@ int SAL_CALL main (int argc, char **argv) printf ("Error: no PGPEncoder interface.\n"); exit (4); } - + DataSource_Impl *source = new DataSource_Impl (fd); source->setBuffer (buffer); diff --git a/extensions/workben/testresource.cxx b/extensions/workben/testresource.cxx index 069f33c631b7..73852cfc12e0 100644 --- a/extensions/workben/testresource.cxx +++ b/extensions/workben/testresource.cxx @@ -43,7 +43,7 @@ using namespace usr; class MyApp : public Application { public: - void Main(); + void Main(); }; MyApp aMyApp; diff --git a/extensions/workben/testresource.src b/extensions/workben/testresource.src index d74ed571e5ca..5a9fc3a8a607 100644 --- a/extensions/workben/testresource.src +++ b/extensions/workben/testresource.src @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -27,4 +27,4 @@ String 1000 { Text = "Hello"; -}; +}; |