diff options
Diffstat (limited to 'sw/source/ui/vba')
89 files changed, 512 insertions, 512 deletions
diff --git a/sw/source/ui/vba/service.cxx b/sw/source/ui/vba/service.cxx index 9f9cbff204dd..8200e323b80d 100644 --- a/sw/source/ui/vba/service.cxx +++ b/sw/source/ui/vba/service.cxx @@ -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 @@ -59,24 +59,24 @@ extern sdecl::ServiceDecl const serviceDecl; extern "C" { - void SAL_CALL component_getImplementationEnvironment( + void SAL_CALL component_getImplementationEnvironment( const sal_Char ** ppEnvTypeName, uno_Environment ** /*ppEnv*/ ) { OSL_TRACE("In component_getImplementationEnv"); *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } - sal_Bool SAL_CALL component_writeInfo( + sal_Bool SAL_CALL component_writeInfo( lang::XMultiServiceFactory * pServiceManager, registry::XRegistryKey * pRegistryKey ) { OSL_TRACE("In component_writeInfo"); // Component registration - return component_writeInfoHelper( pServiceManager, pRegistryKey, - globals::serviceDecl, document::serviceDecl, wrapformat::serviceDecl, vbaeventshelper::serviceDecl ); + return component_writeInfoHelper( pServiceManager, pRegistryKey, + globals::serviceDecl, document::serviceDecl, wrapformat::serviceDecl, vbaeventshelper::serviceDecl ); } - void * SAL_CALL component_getFactory( + void * SAL_CALL component_getFactory( const sal_Char * pImplName, lang::XMultiServiceFactory * pServiceManager, registry::XRegistryKey * pRegistryKey ) { diff --git a/sw/source/ui/vba/vbaaddin.cxx b/sw/source/ui/vba/vbaaddin.cxx index 8929ae96a914..418a2dcd414e 100644 --- a/sw/source/ui/vba/vbaaddin.cxx +++ b/sw/source/ui/vba/vbaaddin.cxx @@ -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 @@ -83,14 +83,14 @@ void SAL_CALL SwVbaAddin::setInstalled( ::sal_Bool _installed ) throw (uno::Runt } } -rtl::OUString& +rtl::OUString& SwVbaAddin::getServiceImplName() { static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaAddin") ); return sImplName; } -uno::Sequence< rtl::OUString > +uno::Sequence< rtl::OUString > SwVbaAddin::getServiceNames() { static uno::Sequence< rtl::OUString > aServiceNames; diff --git a/sw/source/ui/vba/vbaaddin.hxx b/sw/source/ui/vba/vbaaddin.hxx index 090f5bcc580f..585d2f865eee 100644 --- a/sw/source/ui/vba/vbaaddin.hxx +++ b/sw/source/ui/vba/vbaaddin.hxx @@ -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/sw/source/ui/vba/vbaaddins.cxx b/sw/source/ui/vba/vbaaddins.cxx index f51e11e359b0..62faf145c6bc 100644 --- a/sw/source/ui/vba/vbaaddins.cxx +++ b/sw/source/ui/vba/vbaaddins.cxx @@ -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 @@ -87,14 +87,14 @@ SwVbaAddins::createCollectionObject( const css::uno::Any& aSource ) return aSource; } -rtl::OUString& +rtl::OUString& SwVbaAddins::getServiceImplName() { static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaAddins") ); return sImplName; } -css::uno::Sequence<rtl::OUString> +css::uno::Sequence<rtl::OUString> SwVbaAddins::getServiceNames() { static uno::Sequence< rtl::OUString > sNames; diff --git a/sw/source/ui/vba/vbaaddins.hxx b/sw/source/ui/vba/vbaaddins.hxx index 6d160f78e27b..6d3c269af4a3 100644 --- a/sw/source/ui/vba/vbaaddins.hxx +++ b/sw/source/ui/vba/vbaaddins.hxx @@ -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 @@ -44,9 +44,9 @@ public: virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException); // SwVbaAddins_BASE - virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource ); + virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource ); virtual rtl::OUString& getServiceImplName(); virtual css::uno::Sequence<rtl::OUString> getServiceNames(); -}; +}; #endif /* SW_VBA_ADDINS_HXX */ diff --git a/sw/source/ui/vba/vbaapplication.cxx b/sw/source/ui/vba/vbaapplication.cxx index 8056f9ae3deb..fd815b2b0474 100644 --- a/sw/source/ui/vba/vbaapplication.cxx +++ b/sw/source/ui/vba/vbaapplication.cxx @@ -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 @@ -61,7 +61,7 @@ using ::rtl::OUString; #define FILE_PATH_SEPERATOR "/" #else // windows #define FILE_PATH_SEPERATOR "\\" -#endif +#endif #define EXCELVERSION "11.0" @@ -93,7 +93,7 @@ SwVbaApplication::getActiveDocument() throw (uno::RuntimeException) return new SwVbaDocument( this, mxContext, getCurrentDocument() ); } -uno::Reference< word::XWindow > SAL_CALL +uno::Reference< word::XWindow > SAL_CALL SwVbaApplication::getActiveWindow() throw (uno::RuntimeException) { // #FIXME sofar can't determine Parent @@ -177,20 +177,20 @@ float SAL_CALL SwVbaApplication::CentimetersToPoints( float _Centimeters ) throw return VbaApplicationBase::CentimetersToPoints( _Centimeters ); } -uno::Reference< frame::XModel > +uno::Reference< frame::XModel > SwVbaApplication::getCurrentDocument() throw (css::uno::RuntimeException) { return getCurrentWordDoc( mxContext ); } -rtl::OUString& +rtl::OUString& SwVbaApplication::getServiceImplName() { static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaApplication") ); return sImplName; } -uno::Sequence< rtl::OUString > +uno::Sequence< rtl::OUString > SwVbaApplication::getServiceNames() { static uno::Sequence< rtl::OUString > aServiceNames; diff --git a/sw/source/ui/vba/vbaapplication.hxx b/sw/source/ui/vba/vbaapplication.hxx index 1261590d7c56..66f9bca50b30 100644 --- a/sw/source/ui/vba/vbaapplication.hxx +++ b/sw/source/ui/vba/vbaapplication.hxx @@ -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 @@ -56,10 +56,10 @@ public: virtual css::uno::Reference< ov::word::XWindow > SAL_CALL getActiveWindow() throw (css::uno::RuntimeException); virtual css::uno::Reference< ooo::vba::word::XOptions > SAL_CALL getOptions() throw (css::uno::RuntimeException); virtual css::uno::Reference< ooo::vba::word::XSelection > SAL_CALL getSelection() throw (css::uno::RuntimeException); - virtual css::uno::Any SAL_CALL CommandBars( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException); - virtual css::uno::Any SAL_CALL Documents( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException); - virtual css::uno::Any SAL_CALL Addins( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException); - virtual css::uno::Any SAL_CALL Dialogs( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException); + virtual css::uno::Any SAL_CALL CommandBars( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException); + virtual css::uno::Any SAL_CALL Documents( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException); + virtual css::uno::Any SAL_CALL Addins( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException); + virtual css::uno::Any SAL_CALL Dialogs( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException); virtual sal_Bool SAL_CALL getDisplayAutoCompleteTips() throw (css::uno::RuntimeException); virtual void SAL_CALL setDisplayAutoCompleteTips( sal_Bool _displayAutoCompleteTips ) throw (css::uno::RuntimeException); virtual sal_Int32 SAL_CALL getEnableCancelKey() throw (css::uno::RuntimeException); diff --git a/sw/source/ui/vba/vbaautotextentry.cxx b/sw/source/ui/vba/vbaautotextentry.cxx index d4c153913553..5d098a29921a 100644 --- a/sw/source/ui/vba/vbaautotextentry.cxx +++ b/sw/source/ui/vba/vbaautotextentry.cxx @@ -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 @@ -62,14 +62,14 @@ uno::Reference< word::XRange > SAL_CALL SwVbaAutoTextEntry::Insert( const uno::R return uno::Reference< word::XRange >( pWhere ); } -rtl::OUString& +rtl::OUString& SwVbaAutoTextEntry::getServiceImplName() { static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaAutoTextEntry") ); return sImplName; } -uno::Sequence< rtl::OUString > +uno::Sequence< rtl::OUString > SwVbaAutoTextEntry::getServiceNames() { static uno::Sequence< rtl::OUString > aServiceNames; @@ -106,14 +106,14 @@ SwVbaAutoTextEntries::createCollectionObject( const css::uno::Any& aSource ) return uno::makeAny( uno::Reference< word::XAutoTextEntry >( new SwVbaAutoTextEntry( this, mxContext, xEntry ) ) ); } -rtl::OUString& +rtl::OUString& SwVbaAutoTextEntries::getServiceImplName() { static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaAutoTextEntries") ); return sImplName; } -css::uno::Sequence<rtl::OUString> +css::uno::Sequence<rtl::OUString> SwVbaAutoTextEntries::getServiceNames() { static uno::Sequence< rtl::OUString > sNames; diff --git a/sw/source/ui/vba/vbaautotextentry.hxx b/sw/source/ui/vba/vbaautotextentry.hxx index 4ec2d986a877..62575243b42e 100644 --- a/sw/source/ui/vba/vbaautotextentry.hxx +++ b/sw/source/ui/vba/vbaautotextentry.hxx @@ -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 @@ -72,9 +72,9 @@ public: virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException); // SwVbaAutoTextEntries_BASE - virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource ); + virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource ); virtual rtl::OUString& getServiceImplName(); virtual css::uno::Sequence<rtl::OUString> getServiceNames(); -}; +}; #endif /* SW_VBA_AUTOTEXTENTRY_HXX */ diff --git a/sw/source/ui/vba/vbabookmark.cxx b/sw/source/ui/vba/vbabookmark.cxx index a710682c5194..bb67fac46156 100644 --- a/sw/source/ui/vba/vbabookmark.cxx +++ b/sw/source/ui/vba/vbabookmark.cxx @@ -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 @@ -88,14 +88,14 @@ uno::Any SAL_CALL SwVbaBookmark::Range() throw ( uno::RuntimeException ) return uno::makeAny( uno::Reference< word::XRange>( new SwVbaRange( this, mxContext, xTextDocument, xTextRange->getStart(), xTextRange->getEnd(), xTextRange->getText() ) ) ); } -rtl::OUString& +rtl::OUString& SwVbaBookmark::getServiceImplName() { static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaBookmark") ); return sImplName; } -uno::Sequence< rtl::OUString > +uno::Sequence< rtl::OUString > SwVbaBookmark::getServiceNames() { static uno::Sequence< rtl::OUString > aServiceNames; diff --git a/sw/source/ui/vba/vbabookmark.hxx b/sw/source/ui/vba/vbabookmark.hxx index 632046c935d8..b8af46074252 100644 --- a/sw/source/ui/vba/vbabookmark.hxx +++ b/sw/source/ui/vba/vbabookmark.hxx @@ -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 @@ private: void checkVality() throw ( css::uno::RuntimeException ); public: - SwVbaBookmark( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, + SwVbaBookmark( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::frame::XModel >& rModel, const rtl::OUString& rName ) throw ( css::uno::RuntimeException ); virtual ~SwVbaBookmark(); diff --git a/sw/source/ui/vba/vbabookmarks.cxx b/sw/source/ui/vba/vbabookmarks.cxx index 609b8f9df767..bccfeeff0efa 100644 --- a/sw/source/ui/vba/vbabookmarks.cxx +++ b/sw/source/ui/vba/vbabookmarks.cxx @@ -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 @@ -44,8 +44,8 @@ class BookmarksEnumeration : public EnumerationHelperImpl public: BookmarksEnumeration( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration, const uno::Reference< frame::XModel >& xModel ) throw ( uno::RuntimeException ) : EnumerationHelperImpl( xParent, xContext, xEnumeration ), mxModel( xModel ) {} - virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException) - { + virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException) + { uno::Reference< container::XNamed > xNamed( m_xEnumeration->nextElement(), uno::UNO_QUERY_THROW ); rtl::OUString aName = xNamed->getName(); return uno::makeAny( uno::Reference< word::XBookmark > ( new SwVbaBookmark( m_xParent, m_xContext, mxModel, aName ) ) ); @@ -69,7 +69,7 @@ public: // XElementAccess virtual uno::Type SAL_CALL getElementType( ) throw (uno::RuntimeException) { return mxIndexAccess->getElementType(); } virtual ::sal_Bool SAL_CALL hasElements( ) throw (uno::RuntimeException) { return mxIndexAccess->hasElements(); } - // XNameAcess + // XNameAcess virtual uno::Any SAL_CALL getByName( const ::rtl::OUString& aName ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException) { if ( !hasByName(aName) ) @@ -113,7 +113,7 @@ public: } }; -SwVbaBookmarks::SwVbaBookmarks( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< ::com::sun::star::uno::XComponentContext > & xContext, const uno::Reference< container::XIndexAccess >& xBookmarks, const uno::Reference< frame::XModel >& xModel ): SwVbaBookmarks_BASE( xParent, xContext, uno::Reference< container::XIndexAccess >( new BookmarkCollectionHelper( xBookmarks ) ) ), mxModel( xModel ) +SwVbaBookmarks::SwVbaBookmarks( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< ::com::sun::star::uno::XComponentContext > & xContext, const uno::Reference< container::XIndexAccess >& xBookmarks, const uno::Reference< frame::XModel >& xModel ): SwVbaBookmarks_BASE( xParent, xContext, uno::Reference< container::XIndexAccess >( new BookmarkCollectionHelper( xBookmarks ) ) ), mxModel( xModel ) { mxBookmarksSupplier.set( mxModel, uno::UNO_QUERY_THROW ); uno::Reference< text::XTextDocument > xDocument( mxModel, uno::UNO_QUERY_THROW ); @@ -179,51 +179,51 @@ SwVbaBookmarks::Add( const rtl::OUString& rName, const uno::Any& rRange ) throw rtl::OUString aName = rName; if( m_xNameAccess->hasByName( aName ) ) removeBookmarkByName( aName ); - + addBookmarkByName( aName, xTextRange ); return uno::makeAny( uno::Reference< word::XBookmark >( new SwVbaBookmark( getParent(), mxContext, mxModel, aName ) ) ); } -sal_Int32 SAL_CALL +sal_Int32 SAL_CALL SwVbaBookmarks::getDefaultSorting() throw (css::uno::RuntimeException) { return word::WdBookmarkSortBy::wdSortByName; } -void SAL_CALL +void SAL_CALL SwVbaBookmarks::setDefaultSorting( sal_Int32/* _type*/ ) throw (css::uno::RuntimeException) { // not support in Writer } -sal_Bool SAL_CALL +sal_Bool SAL_CALL SwVbaBookmarks::getShowHidden() throw (css::uno::RuntimeException) { return sal_True; } -void SAL_CALL +void SAL_CALL SwVbaBookmarks::setShowHidden( sal_Bool /*_hidden*/ ) throw (css::uno::RuntimeException) { // not support in Writer } -sal_Bool SAL_CALL +sal_Bool SAL_CALL SwVbaBookmarks::Exists( const rtl::OUString& rName ) throw (css::uno::RuntimeException) { sal_Bool bExist = m_xNameAccess->hasByName( rName ); return bExist; } -rtl::OUString& +rtl::OUString& SwVbaBookmarks::getServiceImplName() { static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaBookmarks") ); return sImplName; } -css::uno::Sequence<rtl::OUString> +css::uno::Sequence<rtl::OUString> SwVbaBookmarks::getServiceNames() { static uno::Sequence< rtl::OUString > sNames; diff --git a/sw/source/ui/vba/vbabookmarks.hxx b/sw/source/ui/vba/vbabookmarks.hxx index d9047b33d49c..5efef7a31a3c 100644 --- a/sw/source/ui/vba/vbabookmarks.hxx +++ b/sw/source/ui/vba/vbabookmarks.hxx @@ -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 @@ -58,7 +58,7 @@ public: virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException); // SwVbaBookmarks_BASE - virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource ); + virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource ); virtual rtl::OUString& getServiceImplName(); virtual css::uno::Sequence<rtl::OUString> getServiceNames(); @@ -70,6 +70,6 @@ public: virtual css::uno::Any SAL_CALL Add( const rtl::OUString& rName, const css::uno::Any& rRange ) throw (css::uno::RuntimeException); virtual sal_Bool SAL_CALL Exists( const rtl::OUString& rName ) throw (css::uno::RuntimeException); -}; +}; #endif /* SW_VBA_BOOKMARKS_HXX */ diff --git a/sw/source/ui/vba/vbaborders.cxx b/sw/source/ui/vba/vbaborders.cxx index 184f406c49ac..634ab630cdc7 100644 --- a/sw/source/ui/vba/vbaborders.cxx +++ b/sw/source/ui/vba/vbaborders.cxx @@ -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 @@ -58,7 +58,7 @@ class SwVbaBorder : public SwVbaBorder_Base { private: uno::Reference< beans::XPropertySet > m_xProps; - sal_Int32 m_LineType; + sal_Int32 m_LineType; VbaPalette m_Palette; bool setBorderLine( table::BorderLine& rBorderLine ) { @@ -75,7 +75,7 @@ private: aTableBorder.IsTopLineValid = sal_True; aTableBorder.TopLine = rBorderLine; break; - + case word::WdBorderType::wdBorderBottom: aTableBorder.IsBottomLineValid = sal_True; aTableBorder.BottomLine = rBorderLine; @@ -96,13 +96,13 @@ private: case word::WdBorderType::wdBorderDiagonalUp: // #TODO have to ignore at the momement, would be // nice to investigate what we can do here - break; + break; default: return false; } m_xProps->setPropertyValue( sTableBorder, uno::makeAny(aTableBorder) ); return true; - } + } bool getBorderLine( table::BorderLine& rBorderLine ) { @@ -139,18 +139,18 @@ private: case word::WdBorderType::wdBorderDiagonalUp: // #TODO have to ignore at the momement, would be // nice to investigate what we can do here - break; + break; default: return false; } return true; - } + } SwVbaBorder(); // no impl -protected: +protected: virtual rtl::OUString& getServiceImplName() { static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaBorder") ); - return sImplName; + return sImplName; } virtual css::uno::Sequence<rtl::OUString> getServiceNames() { @@ -160,10 +160,10 @@ protected: aServiceNames.realloc( 1 ); aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Border" ) ); } - return aServiceNames; + return aServiceNames; } public: - SwVbaBorder( const uno::Reference< beans::XPropertySet > & xProps, const uno::Reference< uno::XComponentContext >& xContext, sal_Int32 lineType, VbaPalette& rPalette) : SwVbaBorder_Base( uno::Reference< XHelperInterface >( xProps, uno::UNO_QUERY ), xContext ), m_xProps( xProps ), m_LineType( lineType ), m_Palette( rPalette ) {} + SwVbaBorder( const uno::Reference< beans::XPropertySet > & xProps, const uno::Reference< uno::XComponentContext >& xContext, sal_Int32 lineType, VbaPalette& rPalette) : SwVbaBorder_Base( uno::Reference< XHelperInterface >( xProps, uno::UNO_QUERY ), xContext ), m_xProps( xProps ), m_LineType( lineType ), m_Palette( rPalette ) {} uno::Any SAL_CALL getLineStyle() throw (uno::RuntimeException) { @@ -186,7 +186,7 @@ public: } return uno::makeAny( nLineStyle ); } - void SAL_CALL setLineStyle( const uno::Any& _linestyle ) throw (uno::RuntimeException) + void SAL_CALL setLineStyle( const uno::Any& _linestyle ) throw (uno::RuntimeException) { // Urk no choice but to silently ignore we don't support this attribute // #TODO would be nice to support the word line styles @@ -265,14 +265,14 @@ public: RangeBorders( const uno::Reference< table::XCellRange >& xRange, const uno::Reference< uno::XComponentContext > & xContext, VbaPalette& rPalette ) : m_xRange( xRange ), m_xContext( xContext ), m_Palette( rPalette ) { } - // XIndexAccess + // XIndexAccess virtual ::sal_Int32 SAL_CALL getCount( ) throw (uno::RuntimeException) { return sizeof( supportedIndexTable ) / sizeof( supportedIndexTable[0] ); } - virtual uno::Any SAL_CALL getByIndex( ::sal_Int32 Index ) throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException) + virtual uno::Any SAL_CALL getByIndex( ::sal_Int32 Index ) throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException) { - + sal_Int32 nIndex = getTableIndex( Index ); if ( nIndex >= 0 && nIndex < getCount() ) { @@ -291,7 +291,7 @@ public: } }; -uno::Reference< container::XIndexAccess > +uno::Reference< container::XIndexAccess > rangeToBorderIndexAccess( const uno::Reference< table::XCellRange >& xRange, const uno::Reference< uno::XComponentContext > & xContext, VbaPalette& rPalette ) { return new RangeBorders( xRange, xContext, rPalette ); @@ -334,7 +334,7 @@ SwVbaBorders::createCollectionObject( const css::uno::Any& aSource ) return aSource; // its already a Border object } -uno::Type +uno::Type SwVbaBorders::getElementType() throw (uno::RuntimeException) { return word::XBorders::static_type(0); @@ -358,14 +358,14 @@ void SAL_CALL SwVbaBorders::setShadow( sal_Bool /*_shadow*/ ) throw (uno::Runtim throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() ); } -rtl::OUString& +rtl::OUString& SwVbaBorders::getServiceImplName() { static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaBorders") ); return sImplName; } -uno::Sequence< rtl::OUString > +uno::Sequence< rtl::OUString > SwVbaBorders::getServiceNames() { static uno::Sequence< rtl::OUString > aServiceNames; diff --git a/sw/source/ui/vba/vbaborders.hxx b/sw/source/ui/vba/vbaborders.hxx index e8a5ff487b98..a64ba276542b 100644 --- a/sw/source/ui/vba/vbaborders.hxx +++ b/sw/source/ui/vba/vbaborders.hxx @@ -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 @@ -49,9 +49,9 @@ public: virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException); virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException); - // SwVbaCollectionBaseImpl - virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource ); - + // SwVbaCollectionBaseImpl + virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource ); + virtual sal_Bool SAL_CALL getShadow() throw (css::uno::RuntimeException); virtual void SAL_CALL setShadow( sal_Bool _shadow ) throw (css::uno::RuntimeException); diff --git a/sw/source/ui/vba/vbadialog.cxx b/sw/source/ui/vba/vbadialog.cxx index a62fd289ca5d..0e96be4c152d 100644 --- a/sw/source/ui/vba/vbadialog.cxx +++ b/sw/source/ui/vba/vbadialog.cxx @@ -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,7 +45,7 @@ static const WordDialogTable aWordDialogTable[] = { 0, 0 } }; -rtl::OUString +rtl::OUString SwVbaDialog::mapIndexToName( sal_Int32 nIndex ) { for( const WordDialogTable* pTable = aWordDialogTable; pTable != NULL; pTable++ ) @@ -58,14 +58,14 @@ SwVbaDialog::mapIndexToName( sal_Int32 nIndex ) return rtl::OUString(); } -rtl::OUString& +rtl::OUString& SwVbaDialog::getServiceImplName() { static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaDialog") ); return sImplName; } -uno::Sequence< rtl::OUString > +uno::Sequence< rtl::OUString > SwVbaDialog::getServiceNames() { static uno::Sequence< rtl::OUString > aServiceNames; diff --git a/sw/source/ui/vba/vbadialog.hxx b/sw/source/ui/vba/vbadialog.hxx index 591c77bdb41c..41f066a938cd 100644 --- a/sw/source/ui/vba/vbadialog.hxx +++ b/sw/source/ui/vba/vbadialog.hxx @@ -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/sw/source/ui/vba/vbadialogs.cxx b/sw/source/ui/vba/vbadialogs.cxx index f81e66dd5488..b52fe83a2705 100644 --- a/sw/source/ui/vba/vbadialogs.cxx +++ b/sw/source/ui/vba/vbadialogs.cxx @@ -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 @@ -40,14 +40,14 @@ SwVbaDialogs::Item( const uno::Any &aItem ) throw (uno::RuntimeException) return uno::Any( aDialog ); } -rtl::OUString& +rtl::OUString& SwVbaDialogs::getServiceImplName() { static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaDialogs") ); return sImplName; } -uno::Sequence< rtl::OUString > +uno::Sequence< rtl::OUString > SwVbaDialogs::getServiceNames() { static uno::Sequence< rtl::OUString > aServiceNames; diff --git a/sw/source/ui/vba/vbadialogs.hxx b/sw/source/ui/vba/vbadialogs.hxx index 075849c18a98..224a50cb081f 100644 --- a/sw/source/ui/vba/vbadialogs.hxx +++ b/sw/source/ui/vba/vbadialogs.hxx @@ -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 @@ typedef cppu::ImplInheritanceHelper1< VbaDialogsBase, ov::word::XDialogs > SwVba class SwVbaDialogs : public SwVbaDialogs_BASE { public: - SwVbaDialogs( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > &xContext, const css::uno::Reference< css::frame::XModel >& xModel ): SwVbaDialogs_BASE( xParent, xContext, xModel ) {} + SwVbaDialogs( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > &xContext, const css::uno::Reference< css::frame::XModel >& xModel ): SwVbaDialogs_BASE( xParent, xContext, xModel ) {} virtual ~SwVbaDialogs() {} // XCollection diff --git a/sw/source/ui/vba/vbadocument.cxx b/sw/source/ui/vba/vbadocument.cxx index cef47c7e32dc..98692d56ca86 100644 --- a/sw/source/ui/vba/vbadocument.cxx +++ b/sw/source/ui/vba/vbadocument.cxx @@ -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 @@ -62,7 +62,7 @@ SwVbaDocument::SwVbaDocument( const uno::Reference< XHelperInterface >& xParent, SwVbaDocument::SwVbaDocument( uno::Sequence< uno::Any > const& aArgs, uno::Reference< uno::XComponentContext >const& xContext ) : SwVbaDocument_BASE( aArgs, xContext ) { Initialize(); -} +} SwVbaDocument::~SwVbaDocument() { @@ -70,10 +70,10 @@ SwVbaDocument::~SwVbaDocument() void SwVbaDocument::Initialize() { - mxTextDocument.set( getModel(), uno::UNO_QUERY_THROW ); + mxTextDocument.set( getModel(), uno::UNO_QUERY_THROW ); } -uno::Reference< word::XRange > SAL_CALL +uno::Reference< word::XRange > SAL_CALL SwVbaDocument::getContent() throw ( uno::RuntimeException ) { uno::Reference< text::XTextRange > xStart = mxTextDocument->getText()->getStart(); @@ -81,12 +81,12 @@ SwVbaDocument::getContent() throw ( uno::RuntimeException ) return uno::Reference< word::XRange >( new SwVbaRange( this, mxContext, mxTextDocument, xStart, xEnd, sal_True ) ); } -uno::Reference< word::XRange > SAL_CALL +uno::Reference< word::XRange > SAL_CALL SwVbaDocument::Range( const uno::Any& rStart, const uno::Any& rEnd ) throw ( uno::RuntimeException ) { if( !rStart.hasValue() && !rEnd.hasValue() ) return getContent(); - + sal_Int32 nStart = 0; sal_Int32 nEnd = 0; rStart >>= nStart; @@ -120,7 +120,7 @@ SwVbaDocument::Range( const uno::Any& rStart, const uno::Any& rEnd ) throw ( uno catch( uno::Exception ) { DebugHelper::exception(SbERR_METHOD_FAILED, rtl::OUString()); - } + } } return uno::Reference< word::XRange >( new SwVbaRange( this, mxContext, mxTextDocument, xStart, xEnd ) ); } @@ -143,7 +143,7 @@ SwVbaDocument::CustomDocumentProperties( const uno::Any& index ) throw (uno::Run return uno::makeAny( xCol ); } -uno::Any SAL_CALL +uno::Any SAL_CALL SwVbaDocument::Bookmarks( const uno::Any& rIndex ) throw ( uno::RuntimeException ) { uno::Reference< text::XBookmarksSupplier > xBookmarksSupplier( getModel(),uno::UNO_QUERY_THROW ); @@ -151,11 +151,11 @@ SwVbaDocument::Bookmarks( const uno::Any& rIndex ) throw ( uno::RuntimeException uno::Reference< XCollection > xBookmarksVba( new SwVbaBookmarks( this, mxContext, xBookmarks, getModel() ) ); if ( rIndex.getValueTypeClass() == uno::TypeClass_VOID ) return uno::makeAny( xBookmarksVba ); - + return uno::Any( xBookmarksVba->Item( rIndex, uno::Any() ) ); } -uno::Any SAL_CALL +uno::Any SAL_CALL SwVbaDocument::Variables( const uno::Any& rIndex ) throw ( uno::RuntimeException ) { uno::Reference< document::XDocumentPropertiesSupplier > xDocumentPropertiesSupplier( getModel(),uno::UNO_QUERY_THROW ); @@ -165,7 +165,7 @@ SwVbaDocument::Variables( const uno::Any& rIndex ) throw ( uno::RuntimeException uno::Reference< XCollection > xVariables( new SwVbaVariables( this, mxContext, xUserDefined ) ); if ( rIndex.getValueTypeClass() == uno::TypeClass_VOID ) return uno::makeAny( xVariables ); - + return uno::Any( xVariables->Item( rIndex, uno::Any() ) ); } @@ -226,13 +226,13 @@ SwVbaDocument::PageSetup( ) throw (uno::RuntimeException) return uno::makeAny( uno::Reference< word::XPageSetup >( new SwVbaPageSetup( this, mxContext, mxModel, xPageProps ) ) ); } -rtl::OUString& +rtl::OUString& SwVbaDocument::getServiceImplName() { static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaDocument") ); return sImplName; } -uno::Any SAL_CALL +uno::Any SAL_CALL SwVbaDocument::getAttachedTemplate() throw (uno::RuntimeException) { uno::Reference< word::XTemplate > xTemplate; @@ -245,18 +245,18 @@ SwVbaDocument::getAttachedTemplate() throw (uno::RuntimeException) return uno::makeAny( xTemplate ); } -void SAL_CALL +void SAL_CALL SwVbaDocument::setAttachedTemplate( const css::uno::Any& /*_attachedtemplate*/ ) throw (uno::RuntimeException) { throw uno::RuntimeException(); } -uno::Any SAL_CALL +uno::Any SAL_CALL SwVbaDocument::Tables( const css::uno::Any& aIndex ) throw (uno::RuntimeException) { uno::Reference< frame::XModel > xModel( mxTextDocument, uno::UNO_QUERY_THROW ); uno::Reference< XCollection > xColl( new SwVbaTables( mxParent, mxContext, xModel ) ); - + if ( aIndex.hasValue() ) return xColl->Item( aIndex, uno::Any() ); return uno::makeAny( xColl ); @@ -291,44 +291,44 @@ SwVbaDocument::getControlShape( const ::rtl::OUString& sName ) return uno::Any(); } -uno::Reference< beans::XIntrospectionAccess > SAL_CALL +uno::Reference< beans::XIntrospectionAccess > SAL_CALL SwVbaDocument::getIntrospection( ) throw (uno::RuntimeException) { return uno::Reference< beans::XIntrospectionAccess >(); } -uno::Any SAL_CALL +uno::Any SAL_CALL SwVbaDocument::invoke( const ::rtl::OUString& aFunctionName, const uno::Sequence< uno::Any >& /*aParams*/, uno::Sequence< ::sal_Int16 >& /*aOutParamIndex*/, uno::Sequence< uno::Any >& /*aOutParam*/ ) throw (lang::IllegalArgumentException, script::CannotConvertException, reflection::InvocationTargetException, uno::RuntimeException) { OSL_TRACE("** SwVbaDocument::invoke( %s ), will barf", rtl::OUStringToOString( aFunctionName, RTL_TEXTENCODING_UTF8 ).getStr() ); - + throw uno::RuntimeException(); // unsupported operation } -void SAL_CALL +void SAL_CALL SwVbaDocument::setValue( const ::rtl::OUString& /*aPropertyName*/, const uno::Any& /*aValue*/ ) throw (beans::UnknownPropertyException, script::CannotConvertException, reflection::InvocationTargetException, uno::RuntimeException) { throw uno::RuntimeException(); // unsupported operation } -uno::Any SAL_CALL +uno::Any SAL_CALL SwVbaDocument::getValue( const ::rtl::OUString& aPropertyName ) throw (beans::UnknownPropertyException, uno::RuntimeException) { uno::Reference< drawing::XControlShape > xControlShape( getControlShape( aPropertyName ), uno::UNO_QUERY_THROW ); - + uno::Reference<lang::XMultiComponentFactory > xServiceManager( mxContext->getServiceManager(), uno::UNO_QUERY_THROW ); uno::Reference< XControlProvider > xControlProvider( xServiceManager->createInstanceWithContext( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.ControlProvider" ) ), mxContext ), uno::UNO_QUERY_THROW ); uno::Reference< msforms::XControl > xControl( xControlProvider->createControl( xControlShape, getModel() ) ); return uno::makeAny( xControl ); } -::sal_Bool SAL_CALL +::sal_Bool SAL_CALL SwVbaDocument::hasMethod( const ::rtl::OUString& /*aName*/ ) throw (uno::RuntimeException) { return sal_False; } -::sal_Bool SAL_CALL +::sal_Bool SAL_CALL SwVbaDocument::hasProperty( const ::rtl::OUString& aName ) throw (uno::RuntimeException) { uno::Reference< container::XNameAccess > xFormControls( getFormControls() ); @@ -337,7 +337,7 @@ SwVbaDocument::hasProperty( const ::rtl::OUString& aName ) throw (uno::RuntimeEx return sal_False; } -uno::Reference< container::XNameAccess > +uno::Reference< container::XNameAccess > SwVbaDocument::getFormControls() { uno::Reference< container::XNameAccess > xFormControls; @@ -346,7 +346,7 @@ SwVbaDocument::getFormControls() uno::Reference< drawing::XDrawPageSupplier > xDrawPageSupplier( mxTextDocument, uno::UNO_QUERY_THROW ); uno::Reference< form::XFormsSupplier > xFormSupplier( xDrawPageSupplier->getDrawPage(), uno::UNO_QUERY_THROW ); uno::Reference< container::XIndexAccess > xIndexAccess( xFormSupplier->getForms(), uno::UNO_QUERY_THROW ); - // get the www-standard container ( maybe we should access the + // get the www-standard container ( maybe we should access the // 'www-standard' by name rather than index, this seems an // implementation detail xFormControls.set( xIndexAccess->getByIndex(0), uno::UNO_QUERY_THROW ); @@ -357,7 +357,7 @@ SwVbaDocument::getFormControls() return xFormControls; } -uno::Sequence< rtl::OUString > +uno::Sequence< rtl::OUString > SwVbaDocument::getServiceNames() { static uno::Sequence< rtl::OUString > aServiceNames; diff --git a/sw/source/ui/vba/vbadocument.hxx b/sw/source/ui/vba/vbadocument.hxx index ab87798a8ded..4602e9ab08b2 100644 --- a/sw/source/ui/vba/vbadocument.hxx +++ b/sw/source/ui/vba/vbadocument.hxx @@ -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/sw/source/ui/vba/vbadocumentproperties.cxx b/sw/source/ui/vba/vbadocumentproperties.cxx index 50ab62dd904f..475ca93751b9 100644 --- a/sw/source/ui/vba/vbadocumentproperties.cxx +++ b/sw/source/ui/vba/vbadocumentproperties.cxx @@ -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 @@ sal_Int8 lcl_toMSOPropType( const uno::Type& aType ) throw ( lang::IllegalArgume switch ( aType.getTypeClass() ) { - case uno::TypeClass_BOOLEAN: + case uno::TypeClass_BOOLEAN: msoType = office::MsoDocProperties::msoPropertyTypeBoolean; break; case uno::TypeClass_FLOAT: @@ -74,7 +74,7 @@ protected: uno::Reference< frame::XModel > m_xModel; uno::Reference< beans::XPropertySet > mxProps; public: - PropertGetSetHelper( const uno::Reference< frame::XModel >& xModel ):m_xModel( xModel ) + PropertGetSetHelper( const uno::Reference< frame::XModel >& xModel ):m_xModel( xModel ) { uno::Reference< document::XDocumentInfoSupplier > xDocInfoSupp( m_xModel, uno::UNO_QUERY_THROW ); mxProps.set( xDocInfoSupp->getDocumentInfo(), uno::UNO_QUERY_THROW ); @@ -89,7 +89,7 @@ public: class BuiltinPropertyGetSetHelper : public PropertGetSetHelper { public: - BuiltinPropertyGetSetHelper( const uno::Reference< frame::XModel >& xModel ) :PropertGetSetHelper( xModel ) + BuiltinPropertyGetSetHelper( const uno::Reference< frame::XModel >& xModel ) :PropertGetSetHelper( xModel ) { } virtual uno::Any getPropertyValue( const rtl::OUString& rPropName ) @@ -114,7 +114,7 @@ public: CustomPropertyGetSetHelper( const uno::Reference< frame::XModel >& xModel ) :BuiltinPropertyGetSetHelper( xModel ) { uno::Reference< document::XDocumentPropertiesSupplier > xDocPropSupp( mxProps, uno::UNO_QUERY_THROW ); - uno::Reference< document::XDocumentProperties > xDocProp( xDocPropSupp->getDocumentProperties(), uno::UNO_QUERY_THROW ); + uno::Reference< document::XDocumentProperties > xDocProp( xDocPropSupp->getDocumentProperties(), uno::UNO_QUERY_THROW ); mxProps.set( xDocProp->getUserDefinedProperties(), uno::UNO_QUERY_THROW ); } }; @@ -131,7 +131,7 @@ public: virtual uno::Any getPropertyValue( const rtl::OUString& rPropName ) { uno::Sequence< beans::NamedValue > stats; - try + try { // Characters, ParagraphCount & WordCount are available from // the model ( and addtionally these also update the statics object ) @@ -158,7 +158,7 @@ public: { mxModelProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParagraphCount") ) ) >>= stats; mxProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("DocumentStatistic") ) ) >>= stats; - + sal_Int32 nLen = stats.getLength(); bool bFound = false; for ( sal_Int32 index = 0; index < nLen && !bFound ; ++index ) @@ -167,8 +167,8 @@ public: { aReturn = stats[ index ].Value; bFound = true; - } - } + } + } if ( !bFound ) throw uno::RuntimeException(); // bad Property } @@ -180,7 +180,7 @@ public: uno::Sequence< beans::NamedValue > stats; mxProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("DocumentStatistic") ) ) >>= stats; - + sal_Int32 nLen = stats.getLength(); for ( sal_Int32 index = 0; index < nLen; ++index ) { @@ -189,8 +189,8 @@ public: stats[ index ].Value = aValue; mxProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("DocumentStatistic") ), uno::makeAny( stats ) ); break; - } - } + } + } } }; @@ -200,7 +200,7 @@ public: rtl::OUString msMSODesc; rtl::OUString msOOOPropName; boost::shared_ptr< PropertGetSetHelper > mpPropGetSetHelper; - + static DocPropInfo createDocPropInfo( const rtl::OUString& sDesc, const rtl::OUString& sPropName, boost::shared_ptr< PropertGetSetHelper >& rHelper ) { return createDocPropInfo( rtl::OUStringToOString( sDesc, RTL_TEXTENCODING_UTF8 ).getStr(), rtl::OUStringToOString( sPropName, RTL_TEXTENCODING_UTF8 ).getStr(), rHelper ); @@ -214,24 +214,24 @@ public: aItem.mpPropGetSetHelper = rHelper; return aItem; } - uno::Any getValue() + uno::Any getValue() { if ( mpPropGetSetHelper.get() ) - return mpPropGetSetHelper->getPropertyValue( msOOOPropName ); + return mpPropGetSetHelper->getPropertyValue( msOOOPropName ); return uno::Any(); } - void setValue( const uno::Any& rValue ) + void setValue( const uno::Any& rValue ) { if ( mpPropGetSetHelper.get() ) - mpPropGetSetHelper->setPropertyValue( msOOOPropName, rValue ); + mpPropGetSetHelper->setPropertyValue( msOOOPropName, rValue ); } - uno::Reference< beans::XPropertySet > getUnoProperties() - { - + uno::Reference< beans::XPropertySet > getUnoProperties() + { + uno::Reference< beans::XPropertySet > xProps; if ( mpPropGetSetHelper.get() ) - return mpPropGetSetHelper->getUnoProperties(); - return xProps; + return mpPropGetSetHelper->getUnoProperties(); + return xProps; } }; @@ -260,7 +260,7 @@ public: m_docPropInfoMap[ word::WdBuiltInProperty::wdPropertyTimeLastPrinted ] = DocPropInfo::createDocPropInfo( "Last print date", "PrintDate", aStandardHelper ); // doesn't seem to exist - throw or return nothing ? m_docPropInfoMap[ word::WdBuiltInProperty::wdPropertyTimeCreated ] = DocPropInfo::createDocPropInfo( "Creation date", "CreationDate", aStandardHelper ); m_docPropInfoMap[ word::WdBuiltInProperty::wdPropertyTimeLastSaved ] = DocPropInfo::createDocPropInfo( "Last save time", "ModifyDate", aStandardHelper ); - m_docPropInfoMap[ word::WdBuiltInProperty::wdPropertyVBATotalEdit ] = DocPropInfo::createDocPropInfo( "Total editing time", "EditingDuration", aStandardHelper ); // Not sure if this is correct + m_docPropInfoMap[ word::WdBuiltInProperty::wdPropertyVBATotalEdit ] = DocPropInfo::createDocPropInfo( "Total editing time", "EditingDuration", aStandardHelper ); // Not sure if this is correct m_docPropInfoMap[ word::WdBuiltInProperty::wdPropertyPages ] = DocPropInfo::createDocPropInfo( "Number of pages", "PageCount", aUsingStatsHelper ); // special handling required ? m_docPropInfoMap[ word::WdBuiltInProperty::wdPropertyWords ] = DocPropInfo::createDocPropInfo( "Number of words", "WordCount", aUsingStatsHelper ); // special handling require ? m_docPropInfoMap[ word::WdBuiltInProperty::wdPropertyCharacters ] = DocPropInfo::createDocPropInfo( "Number of characters", "CharacterCount", aUsingStatsHelper ); // special handling required ? @@ -358,22 +358,22 @@ SwVbaCustomDocumentProperty::setLinkSource( const rtl::OUString& /*rsLinkContent // #FIXME we need to store the link source somewhere } -void SAL_CALL +void SAL_CALL SwVbaCustomDocumentProperty::setName( const ::rtl::OUString& /*Name*/ ) throw (script::BasicErrorException, uno::RuntimeException) { - // setName on existing property ? - // #FIXME + // setName on existing property ? + // #FIXME // do we need to delete existing property and create a new one? } -void SAL_CALL +void SAL_CALL SwVbaCustomDocumentProperty::setType( ::sal_Int8 /*Type*/ ) throw (script::BasicErrorException, uno::RuntimeException) { // setType, do we need to do a conversion? // #FIXME the underlying value needs to be changed to the new type } -void SAL_CALL +void SAL_CALL SwVbaCustomDocumentProperty::Delete( ) throw (script::BasicErrorException, uno::RuntimeException) { uno::Reference< beans::XPropertyContainer > xContainer( mPropInfo.getUnoProperties(), uno::UNO_QUERY_THROW ); @@ -382,16 +382,16 @@ SwVbaCustomDocumentProperty::Delete( ) throw (script::BasicErrorException, uno: SwVbaBuiltInDocumentProperty::SwVbaBuiltInDocumentProperty( const uno::Reference< ov::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const DocPropInfo& rInfo ) : SwVbaDocumentProperty_BASE( xParent, xContext ), mPropInfo( rInfo ) { -} +} -void SAL_CALL +void SAL_CALL SwVbaBuiltInDocumentProperty::Delete( ) throw (script::BasicErrorException, uno::RuntimeException) { // not valid for Builtin throw uno::RuntimeException(); } - -::rtl::OUString SAL_CALL + +::rtl::OUString SAL_CALL SwVbaBuiltInDocumentProperty::getName( ) throw (script::BasicErrorException, uno::RuntimeException) { return mPropInfo.msMSODesc; @@ -404,33 +404,33 @@ SwVbaBuiltInDocumentProperty::setName( const rtl::OUString& ) throw (script::Bas throw uno::RuntimeException(); } -::sal_Int8 SAL_CALL +::sal_Int8 SAL_CALL SwVbaBuiltInDocumentProperty::getType( ) throw (script::BasicErrorException, uno::RuntimeException) { return lcl_toMSOPropType( getValue().getValueType() ); } -void SAL_CALL +void SAL_CALL SwVbaBuiltInDocumentProperty::setType( ::sal_Int8 /*Type*/ ) throw (script::BasicErrorException, uno::RuntimeException) { // not valid for Builtin throw uno::RuntimeException(); } -::sal_Bool SAL_CALL +::sal_Bool SAL_CALL SwVbaBuiltInDocumentProperty::getLinkToContent( ) throw (script::BasicErrorException, uno::RuntimeException) { return sal_False; // built-in always false } -void SAL_CALL +void SAL_CALL SwVbaBuiltInDocumentProperty::setLinkToContent( ::sal_Bool /*LinkToContent*/ ) throw (script::BasicErrorException, uno::RuntimeException) { // not valid for Builtin throw uno::RuntimeException(); } -uno::Any SAL_CALL +uno::Any SAL_CALL SwVbaBuiltInDocumentProperty::getValue( ) throw (script::BasicErrorException, uno::RuntimeException) { uno::Any aRet = mPropInfo.getValue(); @@ -439,34 +439,34 @@ SwVbaBuiltInDocumentProperty::getValue( ) throw (script::BasicErrorException, u return aRet; } -void SAL_CALL +void SAL_CALL SwVbaBuiltInDocumentProperty::setValue( const uno::Any& Value ) throw (script::BasicErrorException, uno::RuntimeException) { mPropInfo.setValue( Value ); } -rtl::OUString SAL_CALL +rtl::OUString SAL_CALL SwVbaBuiltInDocumentProperty::getLinkSource( ) throw (script::BasicErrorException, uno::RuntimeException) { // not valid for Builtin throw uno::RuntimeException(); } -void SAL_CALL +void SAL_CALL SwVbaBuiltInDocumentProperty::setLinkSource( const rtl::OUString& /*LinkSource*/ ) throw (script::BasicErrorException, uno::RuntimeException) { // not valid for Builtin throw uno::RuntimeException(); } -rtl::OUString& +rtl::OUString& SwVbaBuiltInDocumentProperty::getServiceImplName() { static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaBuiltinDocumentProperty") ); - return sImplName; + return sImplName; } -uno::Sequence<rtl::OUString> +uno::Sequence<rtl::OUString> SwVbaBuiltInDocumentProperty::getServiceNames() { static uno::Sequence< rtl::OUString > aServiceNames; @@ -490,7 +490,7 @@ class DocPropEnumeration : public DocPropEnumeration_BASE DocProps mDocProps; DocProps::iterator mIt; public: - + DocPropEnumeration( const DocProps& rProps ) : mDocProps( rProps ), mIt( mDocProps.begin() ) {} virtual ::sal_Bool SAL_CALL hasMoreElements( ) throw (uno::RuntimeException) { @@ -514,10 +514,10 @@ protected: uno::Reference< uno::XComponentContext > m_xContext; uno::Reference< frame::XModel > m_xModel; uno::Reference< document::XDocumentInfo > m_xOOOBuiltIns; - + DocProps mDocProps; DocPropsByName mNamedDocProps; - + public: BuiltInPropertiesImpl( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< frame::XModel >& xModel ) : m_xParent( xParent ), m_xContext( xContext ), m_xModel( xModel ) { @@ -526,7 +526,7 @@ protected: { mDocProps[ index ] = new SwVbaBuiltInDocumentProperty( xParent, xContext, builtIns.getDocPropInfoMap()[ index ] ); mNamedDocProps[ mDocProps[ index ]->getName() ] = mDocProps[ index ]; - } + } } // XIndexAccess virtual ::sal_Int32 SAL_CALL getCount( ) throw (uno::RuntimeException) @@ -547,7 +547,7 @@ protected: throw container::NoSuchElementException(); DocPropsByName::iterator it = mNamedDocProps.find( aName ); return uno::Any( it->second ); - + } virtual uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames( ) throw (uno::RuntimeException) { @@ -556,7 +556,7 @@ protected: DocPropsByName::iterator it_end = mNamedDocProps.end(); for( DocPropsByName::iterator it = mNamedDocProps.begin(); it != it_end; ++it, ++pName ) *pName = it->first; - return aNames; + return aNames; } virtual ::sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName ) throw (uno::RuntimeException) @@ -567,9 +567,9 @@ protected: return sal_True; } // XElementAccess - virtual uno::Type SAL_CALL getElementType( ) throw (uno::RuntimeException) + virtual uno::Type SAL_CALL getElementType( ) throw (uno::RuntimeException) { - return XDocumentProperty::static_type(0); + return XDocumentProperty::static_type(0); } virtual ::sal_Bool SAL_CALL hasElements( ) throw (uno::RuntimeException) { @@ -583,9 +583,9 @@ protected: SwVbaBuiltinDocumentProperties::SwVbaBuiltinDocumentProperties( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< frame::XModel >& xModel ) : SwVbaDocumentproperties_BASE( xParent, xContext, uno::Reference< container::XIndexAccess >( new BuiltInPropertiesImpl( xParent, xContext, xModel ) ) ), m_xModel( xModel ) { -} +} -uno::Reference< XDocumentProperty > SAL_CALL +uno::Reference< XDocumentProperty > SAL_CALL SwVbaBuiltinDocumentProperties::Add( const ::rtl::OUString& /*Name*/, ::sal_Bool /*LinkToContent*/, ::sal_Int8 /*Type*/, const uno::Any& /*value*/, const uno::Any& /*LinkSource*/ ) throw (script::BasicErrorException, uno::RuntimeException) { throw uno::RuntimeException( @@ -593,21 +593,21 @@ SwVbaBuiltinDocumentProperties::Add( const ::rtl::OUString& /*Name*/, ::sal_Bool } // XEnumerationAccess -uno::Type SAL_CALL +uno::Type SAL_CALL SwVbaBuiltinDocumentProperties::getElementType() throw (uno::RuntimeException) { - return XDocumentProperty::static_type(0); + return XDocumentProperty::static_type(0); } -uno::Reference< container::XEnumeration > SAL_CALL +uno::Reference< container::XEnumeration > SAL_CALL SwVbaBuiltinDocumentProperties::createEnumeration() throw (uno::RuntimeException) { uno::Reference< container::XEnumerationAccess > xEnumAccess( m_xIndexAccess, uno::UNO_QUERY_THROW ); return xEnumAccess->createEnumeration(); } -// ScVbaCollectionBaseImpl -uno::Any +// ScVbaCollectionBaseImpl +uno::Any SwVbaBuiltinDocumentProperties::createCollectionObject( const uno::Any& aSource ) { // pass through @@ -615,14 +615,14 @@ SwVbaBuiltinDocumentProperties::createCollectionObject( const uno::Any& aSource } // XHelperInterface -rtl::OUString& +rtl::OUString& SwVbaBuiltinDocumentProperties::getServiceImplName() { static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaBuiltinDocumentProperties") ); - return sImplName; + return sImplName; } -uno::Sequence<rtl::OUString> +uno::Sequence<rtl::OUString> SwVbaBuiltinDocumentProperties::getServiceNames() { static uno::Sequence< rtl::OUString > aServiceNames; @@ -646,11 +646,11 @@ public: { // suck in the document( custom ) properties uno::Reference< document::XDocumentInfoSupplier > xDocInfoSupp( m_xModel, uno::UNO_QUERY_THROW ); - uno::Reference< document::XDocumentPropertiesSupplier > xDocPropSupp( xDocInfoSupp->getDocumentInfo(), uno::UNO_QUERY_THROW ); - uno::Reference< document::XDocumentProperties > xDocProp( xDocPropSupp->getDocumentProperties(), uno::UNO_QUERY_THROW ); - mxUserDefinedProp.set( xDocProp->getUserDefinedProperties(), uno::UNO_QUERY_THROW ); + uno::Reference< document::XDocumentPropertiesSupplier > xDocPropSupp( xDocInfoSupp->getDocumentInfo(), uno::UNO_QUERY_THROW ); + uno::Reference< document::XDocumentProperties > xDocProp( xDocPropSupp->getDocumentProperties(), uno::UNO_QUERY_THROW ); + mxUserDefinedProp.set( xDocProp->getUserDefinedProperties(), uno::UNO_QUERY_THROW ); mpPropGetSetHelper.reset( new CustomPropertyGetSetHelper( m_xModel ) ); - }; + }; // XIndexAccess virtual ::sal_Int32 SAL_CALL getCount( ) throw (uno::RuntimeException) { @@ -695,9 +695,9 @@ public: } // XElementAccess - virtual uno::Type SAL_CALL getElementType( ) throw (uno::RuntimeException) + virtual uno::Type SAL_CALL getElementType( ) throw (uno::RuntimeException) { - return XDocumentProperty::static_type(0); + return XDocumentProperty::static_type(0); } virtual ::sal_Bool SAL_CALL hasElements( ) throw (uno::RuntimeException) @@ -736,7 +736,7 @@ SwVbaCustomDocumentProperties::SwVbaCustomDocumentProperties( const uno::Referen m_xNameAccess.set( m_xIndexAccess, uno::UNO_QUERY_THROW ); } -uno::Reference< XDocumentProperty > SAL_CALL +uno::Reference< XDocumentProperty > SAL_CALL SwVbaCustomDocumentProperties::Add( const ::rtl::OUString& Name, ::sal_Bool LinkToContent, ::sal_Int8 Type, const uno::Any& Value, const uno::Any& LinkSource ) throw (script::BasicErrorException, uno::RuntimeException) { CustomPropertiesImpl* pCustomProps = dynamic_cast< CustomPropertiesImpl* > ( m_xIndexAccess.get() ); @@ -756,9 +756,9 @@ SwVbaCustomDocumentProperties::Add( const ::rtl::OUString& Name, ::sal_Bool Link } // XHelperInterface -rtl::OUString& +rtl::OUString& SwVbaCustomDocumentProperties::getServiceImplName() { static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaCustomDocumentProperties") ); - return sImplName; + return sImplName; } diff --git a/sw/source/ui/vba/vbadocumentproperties.hxx b/sw/source/ui/vba/vbadocumentproperties.hxx index 5159ea580601..9ab704eff385 100644 --- a/sw/source/ui/vba/vbadocumentproperties.hxx +++ b/sw/source/ui/vba/vbadocumentproperties.hxx @@ -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,7 +46,7 @@ public: // XEnumerationAccess virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException); virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException); - // ScVbaCollectionBaseImpl + // ScVbaCollectionBaseImpl virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource ); // XHelperInterface diff --git a/sw/source/ui/vba/vbadocuments.cxx b/sw/source/ui/vba/vbadocuments.cxx index 41a7e607533e..094dde4c0d65 100644 --- a/sw/source/ui/vba/vbadocuments.cxx +++ b/sw/source/ui/vba/vbadocuments.cxx @@ -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 @@ getDocument( uno::Reference< uno::XComponentContext >& xContext, const uno::Refe uno::Reference< frame::XModel > xModel( xDoc, uno::UNO_QUERY ); if( !xModel.is() ) return uno::Any(); - + SwVbaDocument *pWb = new SwVbaDocument( uno::Reference< XHelperInterface >( aApplication, uno::UNO_QUERY_THROW ), xContext, xModel ); return uno::Any( uno::Reference< word::XDocument > (pWb) ); } @@ -78,8 +78,8 @@ class DocumentEnumImpl : public EnumerationHelperImpl public: DocumentEnumImpl( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration, const uno::Any& aApplication ) throw ( uno::RuntimeException ) : EnumerationHelperImpl( xParent, xContext, xEnumeration ), m_aApplication( aApplication ) {} - virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException) - { + virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException) + { uno::Reference< text::XTextDocument > xDoc( m_xEnumeration->nextElement(), uno::UNO_QUERY_THROW ); return getDocument( m_xContext, xDoc, m_aApplication ); } @@ -98,7 +98,7 @@ uno::Reference< container::XEnumeration > SwVbaDocuments::createEnumeration() throw (uno::RuntimeException) { // #FIXME its possible the DocumentEnumImpl here doens't reflect - // the state of this object ( although it should ) would be + // the state of this object ( although it should ) would be // safer to create an enumeration based on this objects state // rather than one effectively based of the desktop component uno::Reference< container::XEnumerationAccess > xEnumerationAccess( m_xIndexAccess, uno::UNO_QUERY_THROW ); @@ -177,14 +177,14 @@ SwVbaDocuments::Open( const ::rtl::OUString& Filename, const uno::Any& ReadOnly, return VbaDocumentsBase::Open( Filename, ReadOnly, rProps ); } -rtl::OUString& +rtl::OUString& SwVbaDocuments::getServiceImplName() { static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaDocuments") ); return sImplName; } -uno::Sequence<rtl::OUString> +uno::Sequence<rtl::OUString> SwVbaDocuments::getServiceNames() { static uno::Sequence< rtl::OUString > sNames; diff --git a/sw/source/ui/vba/vbadocuments.hxx b/sw/source/ui/vba/vbadocuments.hxx index 81b936a1ae76..7f1c89510e1a 100644 --- a/sw/source/ui/vba/vbadocuments.hxx +++ b/sw/source/ui/vba/vbadocuments.hxx @@ -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 @@ -48,7 +48,7 @@ public: virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException); // SwVbaDocuments_BASE - virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource ); + virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource ); virtual rtl::OUString& getServiceImplName(); virtual css::uno::Sequence<rtl::OUString> getServiceNames(); diff --git a/sw/source/ui/vba/vbafield.cxx b/sw/source/ui/vba/vbafield.cxx index a33b3c208c8f..8e9661d0af08 100644 --- a/sw/source/ui/vba/vbafield.cxx +++ b/sw/source/ui/vba/vbafield.cxx @@ -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,14 +46,14 @@ SwVbaField::SwVbaField( const uno::Reference< ooo::vba::XHelperInterface >& rPa } // XHelperInterface -rtl::OUString& +rtl::OUString& SwVbaField::getServiceImplName() { static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaField") ); - return sImplName; + return sImplName; } -uno::Sequence<rtl::OUString> +uno::Sequence<rtl::OUString> SwVbaField::getServiceNames() { static uno::Sequence< rtl::OUString > aServiceNames; @@ -276,7 +276,7 @@ uno::Any lcl_createField( const uno::Reference< XHelperInterface >& xParent, con typedef ::cppu::WeakImplHelper1< css::container::XEnumeration > FieldEnumeration_BASE; typedef ::cppu::WeakImplHelper2< container::XIndexAccess, container::XEnumerationAccess > FieldCollectionHelper_BASE; -class FieldEnumeration : public FieldEnumeration_BASE +class FieldEnumeration : public FieldEnumeration_BASE { uno::Reference< XHelperInterface > mxParent; uno::Reference< uno::XComponentContext > mxContext; @@ -286,8 +286,8 @@ public: FieldEnumeration( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< frame::XModel >& xModel, const uno::Reference< container::XEnumeration >& xEnumeration ) : mxParent( xParent ), mxContext( xContext ), mxModel( xModel ), mxEnumeration( xEnumeration ) { } - virtual ::sal_Bool SAL_CALL hasMoreElements( ) throw (uno::RuntimeException) - { + virtual ::sal_Bool SAL_CALL hasMoreElements( ) throw (uno::RuntimeException) + { return mxEnumeration->hasMoreElements(); } virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException) @@ -315,15 +315,15 @@ public: virtual ::sal_Bool SAL_CALL hasElements( ) throw (uno::RuntimeException) { return mxEnumerationAccess->hasElements(); } // XIndexAccess virtual ::sal_Int32 SAL_CALL getCount( ) throw (uno::RuntimeException) - { + { uno::Reference< container::XEnumeration > xEnumeration = mxEnumerationAccess->createEnumeration(); sal_Int32 nCount = 0; while( xEnumeration->hasMoreElements() ) { ++nCount; xEnumeration->nextElement(); - } - return nCount; + } + return nCount; } virtual uno::Any SAL_CALL getByIndex( ::sal_Int32 Index ) throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException ) { @@ -349,13 +349,13 @@ public: return uno::Reference< container::XEnumeration >( new FieldEnumeration( mxParent, mxContext, mxModel, xEnumeration ) ); } }; - + SwVbaFields::SwVbaFields( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< frame::XModel >& xModel ) : SwVbaFields_BASE( xParent, xContext , uno::Reference< container::XIndexAccess >( new FieldCollectionHelper( xParent, xContext, xModel ) ) ), mxModel( xModel ) { mxMSF.set( mxModel, uno::UNO_QUERY_THROW ); } -uno::Reference< word::XField > SAL_CALL +uno::Reference< word::XField > SAL_CALL SwVbaFields::Add( const css::uno::Reference< ::ooo::vba::word::XRange >& Range, const css::uno::Any& Type, const css::uno::Any& Text, const css::uno::Any& /*PreserveFormatting*/ ) throw (css::uno::RuntimeException) { sal_Int32 nType = word::WdFieldType::wdFieldEmpty; @@ -419,19 +419,19 @@ uno::Reference< text::XTextField > SwVbaFields::Create_Field_FileName( const rtl return xTextField; } -uno::Reference< container::XEnumeration > SAL_CALL +uno::Reference< container::XEnumeration > SAL_CALL SwVbaFields::createEnumeration() throw (uno::RuntimeException) { uno::Reference< container::XEnumerationAccess > xEnumerationAccess( m_xIndexAccess, uno::UNO_QUERY_THROW ); return xEnumerationAccess->createEnumeration(); } -// ScVbaCollectionBaseImpl -uno::Any +// ScVbaCollectionBaseImpl +uno::Any SwVbaFields::createCollectionObject( const uno::Any& aSource ) { return lcl_createField( mxParent, mxContext, mxModel, aSource ); -} +} sal_Int32 SAL_CALL SwVbaFields::Update() throw (uno::RuntimeException) { @@ -450,21 +450,21 @@ sal_Int32 SAL_CALL SwVbaFields::Update() throw (uno::RuntimeException) } // XHelperInterface -rtl::OUString& +rtl::OUString& SwVbaFields::getServiceImplName() { static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaFields") ); - return sImplName; + return sImplName; } // XEnumerationAccess -uno::Type SAL_CALL +uno::Type SAL_CALL SwVbaFields::getElementType() throw (uno::RuntimeException) { - return word::XField::static_type(0); + return word::XField::static_type(0); } -uno::Sequence<rtl::OUString> +uno::Sequence<rtl::OUString> SwVbaFields::getServiceNames() { static uno::Sequence< rtl::OUString > aServiceNames; diff --git a/sw/source/ui/vba/vbafield.hxx b/sw/source/ui/vba/vbafield.hxx index 3c55acf73e9d..f421179d352d 100644 --- a/sw/source/ui/vba/vbafield.hxx +++ b/sw/source/ui/vba/vbafield.hxx @@ -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 @@ -44,7 +44,7 @@ public: // XHelperInterface virtual rtl::OUString& getServiceImplName(); - virtual css::uno::Sequence<rtl::OUString> getServiceNames(); + virtual css::uno::Sequence<rtl::OUString> getServiceNames(); }; // *** SwVbaFields *********************************************** @@ -66,12 +66,12 @@ public: // XEnumerationAccess virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException); virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException); - // ScVbaCollectionBaseImpl + // ScVbaCollectionBaseImpl virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource ); // XHelperInterface virtual rtl::OUString& getServiceImplName(); - virtual css::uno::Sequence<rtl::OUString> getServiceNames(); + virtual css::uno::Sequence<rtl::OUString> getServiceNames(); }; #endif diff --git a/sw/source/ui/vba/vbafind.cxx b/sw/source/ui/vba/vbafind.cxx index fccf04181993..1af48f7c1eb1 100644 --- a/sw/source/ui/vba/vbafind.cxx +++ b/sw/source/ui/vba/vbafind.cxx @@ -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 @@ -121,7 +121,7 @@ uno::Reference< text::XTextRange > SwVbaFind::FindOneElement() throw ( uno::Runt { mxTVC->gotoStart(sal_False); xFoundOne.set( mxReplaceable->findNext( mxTextRange->getStart(), uno::Reference< util::XSearchDescriptor >( mxPropertyReplace, uno::UNO_QUERY_THROW ) ), uno::UNO_QUERY ); - } + } else { mxTVC->gotoEnd( sal_False ); @@ -320,7 +320,7 @@ void SAL_CALL SwVbaFind::setStyle( const uno::Any& /*_style */ ) throw (uno::Run throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() ); } -sal_Bool SAL_CALL +sal_Bool SAL_CALL SwVbaFind::Execute( const uno::Any& FindText, const uno::Any& MatchCase, const uno::Any& MatchWholeWord, const uno::Any& MatchWildcards, const uno::Any& MatchSoundsLike, const uno::Any& MatchAllWordForms, const uno::Any& Forward, const uno::Any& Wrap, const uno::Any& Format, const uno::Any& ReplaceWith, const uno::Any& Replace, const uno::Any& /*MatchKashida*/, const uno::Any& /*MatchDiacritics*/, const uno::Any& /*MatchAlefHamza*/, const uno::Any& /*MatchControl*/, const uno::Any& /*MatchPrefix*/, const uno::Any& /*MatchSuffix*/, const uno::Any& /*MatchPhrase*/, const uno::Any& /*IgnoreSpace*/, const uno::Any& /*IgnorePunct*/ ) throw (uno::RuntimeException) { sal_Bool result = sal_False; @@ -400,21 +400,21 @@ SwVbaFind::Execute( const uno::Any& FindText, const uno::Any& MatchCase, const u return result; } -void SAL_CALL +void SAL_CALL SwVbaFind::ClearFormatting( ) throw (uno::RuntimeException) { uno::Sequence< beans::PropertyValue > aSearchAttribs; mxPropertyReplace->setSearchAttributes( aSearchAttribs ); } -rtl::OUString& +rtl::OUString& SwVbaFind::getServiceImplName() { static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaFind") ); return sImplName; } -uno::Sequence< rtl::OUString > +uno::Sequence< rtl::OUString > SwVbaFind::getServiceNames() { static uno::Sequence< rtl::OUString > aServiceNames; diff --git a/sw/source/ui/vba/vbafind.hxx b/sw/source/ui/vba/vbafind.hxx index ef971866500d..c624a5aa7acc 100644 --- a/sw/source/ui/vba/vbafind.hxx +++ b/sw/source/ui/vba/vbafind.hxx @@ -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/sw/source/ui/vba/vbafont.cxx b/sw/source/ui/vba/vbafont.cxx index 47f39bcbefda..4855d923ffba 100644 --- a/sw/source/ui/vba/vbafont.cxx +++ b/sw/source/ui/vba/vbafont.cxx @@ -23,8 +23,8 @@ static MapPair UnderLineTable[] = { { word::WdUnderline::wdUnderlineDouble, com::sun::star::awt::FontUnderline::DOUBLE }, { word::WdUnderline::wdUnderlineDotted, com::sun::star::awt::FontUnderline::DOTTED }, { word::WdUnderline::wdUnderlineThick, com::sun::star::awt::FontUnderline::BOLDDASH }, - { word::WdUnderline::wdUnderlineDash, com::sun::star::awt::FontUnderline::DASH }, - { word::WdUnderline::wdUnderlineDotDash, com::sun::star::awt::FontUnderline::DASHDOT }, + { word::WdUnderline::wdUnderlineDash, com::sun::star::awt::FontUnderline::DASH }, + { word::WdUnderline::wdUnderlineDotDash, com::sun::star::awt::FontUnderline::DASHDOT }, { word::WdUnderline::wdUnderlineDotDotDash, com::sun::star::awt::FontUnderline::DASHDOTDOT }, { word::WdUnderline::wdUnderlineWavy, com::sun::star::awt::FontUnderline::WAVE }, { word::WdUnderline::wdUnderlineDottedHeavy, com::sun::star::awt::FontUnderline::BOLDDOTTED }, @@ -63,7 +63,7 @@ public: static UnderLineMapper& instance() { static UnderLineMapper theMapper; - return theMapper; + return theMapper; } sal_Int32 getOOOFromMSO( sal_Int32 nMSOConst ) throw( lang::IllegalArgumentException ) @@ -86,7 +86,7 @@ SwVbaFont::SwVbaFont( const uno::Reference< XHelperInterface >& xParent, const u { } -uno::Any SAL_CALL +uno::Any SAL_CALL SwVbaFont::getUnderline() throw (uno::RuntimeException) { sal_Int32 nOOVal = 0; @@ -94,7 +94,7 @@ SwVbaFont::getUnderline() throw (uno::RuntimeException) return uno::makeAny( UnderLineMapper::instance().getMSOFromOOO( nOOVal ) ); } -void SAL_CALL +void SAL_CALL SwVbaFont::setUnderline( const uno::Any& _underline ) throw (uno::RuntimeException) { sal_Int32 nMSOVal = 0; @@ -119,7 +119,7 @@ SwVbaFont::setColorIndex( const uno::Any& _colorindex ) throw( uno::RuntimeExcep sal_Int32 nIndex = 0; _colorindex >>= nIndex; return setColor( OORGBToXLRGB(mxPalette->getByIndex( nIndex )) ); -} +} uno::Any SAL_CALL SwVbaFont::getColorIndex() throw ( uno::RuntimeException ) @@ -140,8 +140,8 @@ SwVbaFont::getColorIndex() throw ( uno::RuntimeException ) } } return uno::makeAny( nIndex ); -} -uno::Any SAL_CALL +} +uno::Any SAL_CALL SwVbaFont::getSubscript() throw ( uno::RuntimeException ) { sal_Bool bRes = sal_False; @@ -151,7 +151,7 @@ SwVbaFont::getSubscript() throw ( uno::RuntimeException ) return aLongAnyFalse; } -uno::Any SAL_CALL +uno::Any SAL_CALL SwVbaFont::getSuperscript() throw ( uno::RuntimeException ) { sal_Bool bRes = sal_False; @@ -161,7 +161,7 @@ SwVbaFont::getSuperscript() throw ( uno::RuntimeException ) return aLongAnyFalse; } -uno::Any SAL_CALL +uno::Any SAL_CALL SwVbaFont::getBold() throw (uno::RuntimeException) { sal_Bool bRes = sal_False; @@ -171,7 +171,7 @@ SwVbaFont::getBold() throw (uno::RuntimeException) return aLongAnyFalse; } -uno::Any SAL_CALL +uno::Any SAL_CALL SwVbaFont::getItalic() throw (uno::RuntimeException) { sal_Bool bRes = sal_False; @@ -181,7 +181,7 @@ SwVbaFont::getItalic() throw (uno::RuntimeException) return aLongAnyFalse; } -uno::Any SAL_CALL +uno::Any SAL_CALL SwVbaFont::getStrikethrough() throw (css::uno::RuntimeException) { sal_Bool bRes = sal_False; @@ -191,7 +191,7 @@ SwVbaFont::getStrikethrough() throw (css::uno::RuntimeException) return aLongAnyFalse; } -uno::Any SAL_CALL +uno::Any SAL_CALL SwVbaFont::getShadow() throw (uno::RuntimeException) { sal_Bool bRes = sal_False; diff --git a/sw/source/ui/vba/vbafont.hxx b/sw/source/ui/vba/vbafont.hxx index 1500c2a314dd..b684daa58b63 100644 --- a/sw/source/ui/vba/vbafont.hxx +++ b/sw/source/ui/vba/vbafont.hxx @@ -26,6 +26,6 @@ public: virtual css::uno::Any SAL_CALL getShadow() throw (css::uno::RuntimeException); // XHelperInterface virtual rtl::OUString& getServiceImplName(); - virtual css::uno::Sequence<rtl::OUString> getServiceNames(); + virtual css::uno::Sequence<rtl::OUString> getServiceNames(); }; #endif diff --git a/sw/source/ui/vba/vbaglobals.cxx b/sw/source/ui/vba/vbaglobals.cxx index b95c5e5c9e3d..0770ea319675 100644 --- a/sw/source/ui/vba/vbaglobals.cxx +++ b/sw/source/ui/vba/vbaglobals.cxx @@ -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 @@ -53,7 +53,7 @@ SwVbaGlobals::SwVbaGlobals( uno::Sequence< uno::Any > const& aArgs, uno::Refere aInitArgs[ 0 ].Value = uno::makeAny( getApplication() ); aInitArgs[ 1 ].Name = sDocCtxName; aInitArgs[ 1 ].Value = uno::makeAny( getXSomethingFromArgs< frame::XModel >( aArgs, 0 ) ); - + init( aInitArgs ); } @@ -68,32 +68,32 @@ SwVbaGlobals::~SwVbaGlobals() uno::Reference<word::XApplication > SwVbaGlobals::getApplication() throw (uno::RuntimeException) { - OSL_TRACE("In SwVbaGlobals::getApplication"); + OSL_TRACE("In SwVbaGlobals::getApplication"); if ( !mxApplication.is() ) mxApplication.set( new SwVbaApplication( mxContext) ); - - return mxApplication; + + return mxApplication; } uno::Reference<word::XSystem > SAL_CALL SwVbaGlobals::getSystem() throw (uno::RuntimeException) { - return getApplication()->getSystem(); + return getApplication()->getSystem(); } -uno::Reference< word::XDocument > SAL_CALL +uno::Reference< word::XDocument > SAL_CALL SwVbaGlobals::getActiveDocument() throw (uno::RuntimeException) { - return getApplication()->getActiveDocument(); + return getApplication()->getActiveDocument(); } -uno::Reference< word::XWindow > SAL_CALL +uno::Reference< word::XWindow > SAL_CALL SwVbaGlobals::getActiveWindow() throw (uno::RuntimeException) { return getApplication()->getActiveWindow(); } -rtl::OUString SAL_CALL +rtl::OUString SAL_CALL SwVbaGlobals::getName() throw (uno::RuntimeException) { return getApplication()->getName(); @@ -166,7 +166,7 @@ SwVbaGlobals::getAvailableServiceNames( ) throw (uno::RuntimeException) static uno::Sequence< rtl::OUString > serviceNames( SwVbaGlobals_BASE::getAvailableServiceNames() ); if ( !bInit ) { - rtl::OUString names[] = { + rtl::OUString names[] = { ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "ooo.vba.word.Document" ) ), // #FIXME #TODO make Application a proper service // ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "ooo.vba.word.Application" ) ), diff --git a/sw/source/ui/vba/vbaglobals.hxx b/sw/source/ui/vba/vbaglobals.hxx index 9bb2e8fa606d..ad6ce95bce5a 100644 --- a/sw/source/ui/vba/vbaglobals.hxx +++ b/sw/source/ui/vba/vbaglobals.hxx @@ -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,7 +46,7 @@ typedef ::cppu::ImplInheritanceHelper1< VbaGlobalsBase, ov::word::XGlobals > SwVbaGlobals_BASE; -class SwVbaGlobals : public SwVbaGlobals_BASE +class SwVbaGlobals : public SwVbaGlobals_BASE { private: css::uno::Reference< ooo::vba::word::XApplication > mxApplication; @@ -54,7 +54,7 @@ private: virtual css::uno::Reference< ooo::vba::word::XApplication > getApplication() throw (css::uno::RuntimeException); public: - + SwVbaGlobals( css::uno::Sequence< css::uno::Any > const& aArgs, css::uno::Reference< css::uno::XComponentContext >const& rxContext ); virtual ~SwVbaGlobals(); @@ -65,10 +65,10 @@ public: virtual css::uno::Reference< ov::word::XWindow > SAL_CALL getActiveWindow() throw (css::uno::RuntimeException); virtual css::uno::Reference< ooo::vba::word::XOptions > SAL_CALL getOptions() throw (css::uno::RuntimeException); virtual css::uno::Reference< ooo::vba::word::XSelection > SAL_CALL getSelection() throw (css::uno::RuntimeException); - virtual css::uno::Any SAL_CALL CommandBars( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException); - virtual css::uno::Any SAL_CALL Documents( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException); - virtual css::uno::Any SAL_CALL Addins( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException); - virtual css::uno::Any SAL_CALL Dialogs( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException); + virtual css::uno::Any SAL_CALL CommandBars( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException); + virtual css::uno::Any SAL_CALL Documents( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException); + virtual css::uno::Any SAL_CALL Addins( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException); + virtual css::uno::Any SAL_CALL Dialogs( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException); virtual float SAL_CALL CentimetersToPoints( float _Centimeters ) throw (css::uno::RuntimeException); // XMultiServiceFactory virtual css::uno::Sequence< ::rtl::OUString > SAL_CALL getAvailableServiceNames( ) throw (css::uno::RuntimeException); @@ -77,4 +77,4 @@ public: virtual rtl::OUString& getServiceImplName(); virtual css::uno::Sequence<rtl::OUString> getServiceNames(); }; -#endif /* SW_VBA_GLOBALS_HXX */ +#endif /* SW_VBA_GLOBALS_HXX */ diff --git a/sw/source/ui/vba/vbaheaderfooter.cxx b/sw/source/ui/vba/vbaheaderfooter.cxx index 6fb7061c573f..ec3b0cef270a 100644 --- a/sw/source/ui/vba/vbaheaderfooter.cxx +++ b/sw/source/ui/vba/vbaheaderfooter.cxx @@ -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 @@ -90,14 +90,14 @@ SwVbaHeaderFooter::Shapes( const uno::Any& index ) throw (uno::RuntimeException) return uno::makeAny( xCol ); } -rtl::OUString& +rtl::OUString& SwVbaHeaderFooter::getServiceImplName() { static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaHeaderFooter") ); return sImplName; } -uno::Sequence< rtl::OUString > +uno::Sequence< rtl::OUString > SwVbaHeaderFooter::getServiceNames() { static uno::Sequence< rtl::OUString > aServiceNames; diff --git a/sw/source/ui/vba/vbaheaderfooter.hxx b/sw/source/ui/vba/vbaheaderfooter.hxx index dba10ff767d8..2c4832d7d3bd 100644 --- a/sw/source/ui/vba/vbaheaderfooter.hxx +++ b/sw/source/ui/vba/vbaheaderfooter.hxx @@ -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/sw/source/ui/vba/vbaheaderfooterhelper.cxx b/sw/source/ui/vba/vbaheaderfooterhelper.cxx index 604cc1e11d8c..d91f37a20d08 100644 --- a/sw/source/ui/vba/vbaheaderfooterhelper.cxx +++ b/sw/source/ui/vba/vbaheaderfooterhelper.cxx @@ -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 @@ -37,13 +37,13 @@ using namespace ::ooo::vba; #define FIRST_PAGE 1; -// Class HeaderFooterHelper +// Class HeaderFooterHelper sal_Bool HeaderFooterHelper::isHeader( const uno::Reference< frame::XModel >& xModel, const uno::Reference< text::XText >& xCurrentText ) throw (uno::RuntimeException) { uno::Reference< text::XPageCursor > xPageCursor( word::getXTextViewCursor( xModel ), uno::UNO_QUERY_THROW ); uno::Reference< beans::XPropertySet > xStyleProps( word::getCurrentPageStyle( xModel ), uno::UNO_QUERY_THROW ); - + sal_Bool isOn = sal_False; xStyleProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HeaderIsOn"))) >>= isOn; if( !isOn ) @@ -64,7 +64,7 @@ sal_Bool HeaderFooterHelper::isHeader( const uno::Reference< frame::XModel >& xM aPropText = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HeaderTextRight") ); } } - + uno::Reference< text::XText > xText( xStyleProps->getPropertyValue( aPropText ), uno::UNO_QUERY_THROW ); //FIXME: can not compare in this way? return ( xText == xCurrentText ); @@ -93,7 +93,7 @@ sal_Bool HeaderFooterHelper::isEvenPagesHeader( const uno::Reference< frame::XMo { uno::Reference< text::XPageCursor > xPageCursor( word::getXTextViewCursor( xModel ), uno::UNO_QUERY_THROW ); return ( 0 == xPageCursor->getPage() % 2 ); - } + } } return sal_False; } @@ -102,7 +102,7 @@ sal_Bool HeaderFooterHelper::isFooter( const uno::Reference< frame::XModel >& xM { uno::Reference< text::XPageCursor > xPageCursor( word::getXTextViewCursor( xModel ), uno::UNO_QUERY_THROW ); uno::Reference< beans::XPropertySet > xStyleProps( word::getCurrentPageStyle( xModel ), uno::UNO_QUERY_THROW ); - + sal_Bool isOn = sal_False; xStyleProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FooterIsOn"))) >>= isOn; if( !isOn ) @@ -123,7 +123,7 @@ sal_Bool HeaderFooterHelper::isFooter( const uno::Reference< frame::XModel >& xM aPropText = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FooterTextRight") ); } } - + uno::Reference< text::XText > xText( xStyleProps->getPropertyValue( aPropText ), uno::UNO_QUERY_THROW ); return ( xText == xCurrentText ); @@ -151,7 +151,7 @@ sal_Bool HeaderFooterHelper::isEvenPagesFooter( const uno::Reference< frame::XMo { uno::Reference< text::XPageCursor > xPageCursor( word::getXTextViewCursor( xModel ), uno::UNO_QUERY_THROW ); return ( 0 == xPageCursor->getPage() % 2 ); - } + } } return sal_False; } diff --git a/sw/source/ui/vba/vbaheaderfooterhelper.hxx b/sw/source/ui/vba/vbaheaderfooterhelper.hxx index fd29a16015ab..0e5fd4c4508b 100644 --- a/sw/source/ui/vba/vbaheaderfooterhelper.hxx +++ b/sw/source/ui/vba/vbaheaderfooterhelper.hxx @@ -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/sw/source/ui/vba/vbainformationhelper.cxx b/sw/source/ui/vba/vbainformationhelper.cxx index 6fdf8f9f9449..b2f24406f458 100644 --- a/sw/source/ui/vba/vbainformationhelper.cxx +++ b/sw/source/ui/vba/vbainformationhelper.cxx @@ -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 @@ -62,7 +62,7 @@ double SwVbaInformationHelper::handleWdVerticalPositionRelativeToPage( const css // FIXME: handle multipul page style // it is very strange that the curros position is incorrect when open Word file. // e.g. if current cursor in the top left of the text body of the first page without header, - // the top value of current position should be 0, but is 201 when open a Word file. + // the top value of current position should be 0, but is 201 when open a Word file. nCurrentPos = nCurrentPos + nTopMargin - ( DEFAULT_PAGE_DISTANCE + TWIP_TO_MM100( nPageHeight ) ) * ( nCurrentPage - 1 ); return Millimeter::getInPoints( nCurrentPos ); } diff --git a/sw/source/ui/vba/vbainformationhelper.hxx b/sw/source/ui/vba/vbainformationhelper.hxx index 6aeb8439812b..0cf436cef57c 100644 --- a/sw/source/ui/vba/vbainformationhelper.hxx +++ b/sw/source/ui/vba/vbainformationhelper.hxx @@ -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/sw/source/ui/vba/vbaoptions.cxx b/sw/source/ui/vba/vbaoptions.cxx index d59d0326cf5e..34f1e2a58893 100644 --- a/sw/source/ui/vba/vbaoptions.cxx +++ b/sw/source/ui/vba/vbaoptions.cxx @@ -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,7 +46,7 @@ SwVbaOptions::~SwVbaOptions() { } -uno::Any SAL_CALL +uno::Any SAL_CALL SwVbaOptions::DefaultFilePath( sal_Int32 _path ) throw ( uno::RuntimeException ) { switch( _path ) @@ -90,7 +90,7 @@ SwVbaOptions::DefaultFilePath( sal_Int32 _path ) throw ( uno::RuntimeException ) } default: { - DebugHelper::exception( SbERR_NOT_IMPLEMENTED, rtl::OUString() ); + DebugHelper::exception( SbERR_NOT_IMPLEMENTED, rtl::OUString() ); break; } } @@ -264,14 +264,14 @@ void SAL_CALL SwVbaOptions::setAutoFormatApplyBulletedLists( ::sal_Bool /*_autof } -rtl::OUString& +rtl::OUString& SwVbaOptions::getServiceImplName() { static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaOptions") ); return sImplName; } -uno::Sequence< rtl::OUString > +uno::Sequence< rtl::OUString > SwVbaOptions::getServiceNames() { static uno::Sequence< rtl::OUString > aServiceNames; diff --git a/sw/source/ui/vba/vbaoptions.hxx b/sw/source/ui/vba/vbaoptions.hxx index ec1f70068e48..0a1c1f8f61eb 100644 --- a/sw/source/ui/vba/vbaoptions.hxx +++ b/sw/source/ui/vba/vbaoptions.hxx @@ -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,7 +35,7 @@ typedef InheritedHelperInterfaceImpl1< ooo::vba::word::XOptions > SwVbaOptions_BASE; -class SwVbaOptions : public SwVbaOptions_BASE, +class SwVbaOptions : public SwVbaOptions_BASE, public PropListener { private: diff --git a/sw/source/ui/vba/vbapagesetup.cxx b/sw/source/ui/vba/vbapagesetup.cxx index 1cdda8152207..892f2a918f42 100644 --- a/sw/source/ui/vba/vbapagesetup.cxx +++ b/sw/source/ui/vba/vbapagesetup.cxx @@ -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,7 +36,7 @@ using namespace ::com::sun::star; using namespace ::ooo::vba; -SwVbaPageSetup::SwVbaPageSetup(const uno::Reference< XHelperInterface >& xParent, +SwVbaPageSetup::SwVbaPageSetup(const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< frame::XModel >& xModel, const uno::Reference< beans::XPropertySet >& xProps ) throw (uno::RuntimeException): @@ -46,7 +46,7 @@ SwVbaPageSetup::SwVbaPageSetup(const uno::Reference< XHelperInterface >& xParent mxPageProps.set( xProps, uno::UNO_QUERY_THROW ); mnOrientPortrait = word::WdOrientation::wdOrientPortrait; mnOrientLandscape = word::WdOrientation::wdOrientLandscape; -} +} double SAL_CALL SwVbaPageSetup::getGutter() throw (uno::RuntimeException) { @@ -93,7 +93,7 @@ void SAL_CALL SwVbaPageSetup::setHeaderDistance( double _headerdistance ) throw mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HeaderIsOn"))) >>= isHeaderOn; if( !isHeaderOn ) mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HeaderIsOn")), uno::makeAny( sal_True ) ); - + mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("TopMargin"))) >>= aktTopMargin; mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HeaderBodyDistance"))) >>= aktSpacing; mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HeaderHeight"))) >>= aktHeaderHeight; @@ -127,7 +127,7 @@ void SAL_CALL SwVbaPageSetup::setFooterDistance( double _footerdistance ) throw mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FooterIsOn"))) >>= isFooterOn; if( !isFooterOn ) mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FooterIsOn")), uno::makeAny( sal_True ) ); - + mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("BottomMargin"))) >>= aktBottomMargin; mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FooterBodyDistance"))) >>= aktSpacing; mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FooterHeight"))) >>= aktFooterHeight; @@ -243,7 +243,7 @@ rtl::OUString SwVbaPageSetup::getStyleOfFirstPage() throw (uno::RuntimeException wdSectionStart = word::WdSectionStart::wdSectionOddPage; else wdSectionStart = word::WdSectionStart::wdSectionNewPage; - return wdSectionStart; + return wdSectionStart; } void SAL_CALL SwVbaPageSetup::setSectionStart( ::sal_Int32 /*_sectionstart*/ ) throw (uno::RuntimeException) @@ -252,14 +252,14 @@ void SAL_CALL SwVbaPageSetup::setSectionStart( ::sal_Int32 /*_sectionstart*/ ) t // #FIXME: } -rtl::OUString& +rtl::OUString& SwVbaPageSetup::getServiceImplName() { static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaPageSetup") ); return sImplName; } -uno::Sequence< rtl::OUString > +uno::Sequence< rtl::OUString > SwVbaPageSetup::getServiceNames() { static uno::Sequence< rtl::OUString > aServiceNames; diff --git a/sw/source/ui/vba/vbapagesetup.hxx b/sw/source/ui/vba/vbapagesetup.hxx index df7c59a728ce..8449b7f908d3 100644 --- a/sw/source/ui/vba/vbapagesetup.hxx +++ b/sw/source/ui/vba/vbapagesetup.hxx @@ -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,16 +36,16 @@ typedef cppu::ImplInheritanceHelper1< VbaPageSetupBase, ooo::vba::word::XPageSetup > SwVbaPageSetup_BASE; -class SwVbaPageSetup : public SwVbaPageSetup_BASE +class SwVbaPageSetup : public SwVbaPageSetup_BASE { private: rtl::OUString getStyleOfFirstPage() throw (css::uno::RuntimeException); public: - SwVbaPageSetup( const css::uno::Reference< ooo::vba::XHelperInterface >& xParent, + SwVbaPageSetup( const css::uno::Reference< ooo::vba::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, - const css::uno::Reference< css::frame::XModel >& xModel, - const css::uno::Reference< css::beans::XPropertySet >& xProps ) throw (css::uno::RuntimeException); + const css::uno::Reference< css::frame::XModel >& xModel, + const css::uno::Reference< css::beans::XPropertySet >& xProps ) throw (css::uno::RuntimeException); virtual ~SwVbaPageSetup(){} // Attributes diff --git a/sw/source/ui/vba/vbapalette.cxx b/sw/source/ui/vba/vbapalette.cxx index 12554e792e5e..40191df6f82a 100644 --- a/sw/source/ui/vba/vbapalette.cxx +++ b/sw/source/ui/vba/vbapalette.cxx @@ -12,7 +12,7 @@ static const sal_Int32 ColorTable[] = { WdColor::wdColorAutomatic, // 0 WdColor::wdColorBlack, // 1 -WdColor::wdColorBlue, // 2 +WdColor::wdColorBlue, // 2 WdColor::wdColorTurquoise, // 3 WdColor::wdColorBrightGreen, // 4 WdColor::wdColorPink, // 5 @@ -70,6 +70,6 @@ uno::Reference< container::XIndexAccess > VbaPalette::getPalette() const { - return mxPalette; + return mxPalette; } diff --git a/sw/source/ui/vba/vbapalette.hxx b/sw/source/ui/vba/vbapalette.hxx index 6179f1723c0b..130e405a13e6 100644 --- a/sw/source/ui/vba/vbapalette.hxx +++ b/sw/source/ui/vba/vbapalette.hxx @@ -7,7 +7,7 @@ class VbaPalette css::uno::Reference< css::container::XIndexAccess > mxPalette; public: VbaPalette(); - // if no palette available e.g. because the document doesn't have a + // if no palette available e.g. because the document doesn't have a // palette defined then a default palette will be returned. css::uno::Reference< css::container::XIndexAccess > getPalette() const; }; diff --git a/sw/source/ui/vba/vbapane.cxx b/sw/source/ui/vba/vbapane.cxx index dc5d5ccff882..3fcd415c1d3b 100644 --- a/sw/source/ui/vba/vbapane.cxx +++ b/sw/source/ui/vba/vbapane.cxx @@ -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,7 +45,7 @@ SwVbaPane::~SwVbaPane() uno::Any SAL_CALL SwVbaPane::View() throw ( css::uno::RuntimeException ) { - return uno::makeAny( uno::Reference< word::XView >( new SwVbaView( this, mxContext, mxModel ) ) ); + return uno::makeAny( uno::Reference< word::XView >( new SwVbaView( this, mxContext, mxModel ) ) ); } void SAL_CALL @@ -55,14 +55,14 @@ SwVbaPane::Close( ) throw ( css::uno::RuntimeException ) dispatchRequests( mxModel,url ); } -rtl::OUString& +rtl::OUString& SwVbaPane::getServiceImplName() { static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaPane") ); return sImplName; } -uno::Sequence< rtl::OUString > +uno::Sequence< rtl::OUString > SwVbaPane::getServiceNames() { static uno::Sequence< rtl::OUString > aServiceNames; diff --git a/sw/source/ui/vba/vbapane.hxx b/sw/source/ui/vba/vbapane.hxx index b8a6fff38da3..c9b11d99aa7f 100644 --- a/sw/source/ui/vba/vbapane.hxx +++ b/sw/source/ui/vba/vbapane.hxx @@ -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 @@ private: css::uno::Reference< css::frame::XModel > mxModel; public: - SwVbaPane( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, + SwVbaPane( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::frame::XModel >& xModel ) throw ( css::uno::RuntimeException ); virtual ~SwVbaPane(); diff --git a/sw/source/ui/vba/vbapanes.cxx b/sw/source/ui/vba/vbapanes.cxx index b536c800a854..b97991a5500b 100644 --- a/sw/source/ui/vba/vbapanes.cxx +++ b/sw/source/ui/vba/vbapanes.cxx @@ -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 @@ -52,7 +52,7 @@ public: { if( Index != 1 ) throw container::NoSuchElementException(); - return uno::makeAny( uno::Reference< word::XPane >( new SwVbaPane( mxParent, mxContext, mxModel ) ) ); + return uno::makeAny( uno::Reference< word::XPane >( new SwVbaPane( mxParent, mxContext, mxModel ) ) ); } virtual uno::Type SAL_CALL getElementType( ) throw (uno::RuntimeException) { @@ -104,14 +104,14 @@ SwVbaPanes::createCollectionObject( const css::uno::Any& aSource ) return aSource; } -rtl::OUString& +rtl::OUString& SwVbaPanes::getServiceImplName() { static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaPanes") ); return sImplName; } -css::uno::Sequence<rtl::OUString> +css::uno::Sequence<rtl::OUString> SwVbaPanes::getServiceNames() { static uno::Sequence< rtl::OUString > sNames; diff --git a/sw/source/ui/vba/vbapanes.hxx b/sw/source/ui/vba/vbapanes.hxx index 76c24166cfa7..6294e81ba58e 100644 --- a/sw/source/ui/vba/vbapanes.hxx +++ b/sw/source/ui/vba/vbapanes.hxx @@ -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 @@ -49,9 +49,9 @@ public: virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException); // SwVbaPanes_BASE - virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource ); + virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource ); virtual rtl::OUString& getServiceImplName(); virtual css::uno::Sequence<rtl::OUString> getServiceNames(); -}; +}; #endif /* SW_VBA_PANES_HXX */ diff --git a/sw/source/ui/vba/vbaparagraph.cxx b/sw/source/ui/vba/vbaparagraph.cxx index 333fd4ca9a98..075ea6f1072e 100644 --- a/sw/source/ui/vba/vbaparagraph.cxx +++ b/sw/source/ui/vba/vbaparagraph.cxx @@ -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 @@ -42,20 +42,20 @@ SwVbaParagraph::~SwVbaParagraph() { } -uno::Reference< word::XRange > SAL_CALL +uno::Reference< word::XRange > SAL_CALL SwVbaParagraph::getRange( ) throw ( uno::RuntimeException ) { return uno::Reference< word::XRange >( new SwVbaRange( this, mxContext, mxTextDocument, mxTextRange->getStart(), mxTextRange->getEnd(), mxTextRange->getText(), sal_True ) ); } -rtl::OUString& +rtl::OUString& SwVbaParagraph::getServiceImplName() { static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaParagraph") ); return sImplName; } -uno::Sequence< rtl::OUString > +uno::Sequence< rtl::OUString > SwVbaParagraph::getServiceNames() { static uno::Sequence< rtl::OUString > aServiceNames; @@ -75,7 +75,7 @@ class ParagraphCollectionHelper : public ParagraphCollectionHelper_BASE { private: uno::Reference< text::XTextDocument > mxTextDocument; - + uno::Reference< container::XEnumeration > getEnumeration() throw (uno::RuntimeException) { uno::Reference< container::XEnumerationAccess > xParEnumAccess( mxTextDocument->getText(), uno::UNO_QUERY_THROW ); @@ -103,7 +103,7 @@ public: } } return nCount; - } + } virtual uno::Any SAL_CALL getByIndex( ::sal_Int32 Index ) throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException ) { if( Index < getCount() ) @@ -118,7 +118,7 @@ public: if( Index == nCount ) return uno::makeAny( xServiceInfo ); nCount++; - } + } } } throw lang::IndexOutOfBoundsException(); @@ -127,7 +127,7 @@ public: virtual uno::Reference< container::XEnumeration > SAL_CALL createEnumeration( ) throw (uno::RuntimeException) { return getEnumeration(); - } + } }; SwVbaParagraphs::SwVbaParagraphs( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< ::com::sun::star::uno::XComponentContext > & xContext, const uno::Reference< text::XTextDocument >& xDocument ) throw (uno::RuntimeException) : SwVbaParagraphs_BASE( xParent, xContext, new ParagraphCollectionHelper( xDocument ) ), mxTextDocument( xDocument ) @@ -154,14 +154,14 @@ SwVbaParagraphs::createCollectionObject( const css::uno::Any& aSource ) return uno::makeAny( uno::Reference< word::XParagraph >( new SwVbaParagraph( this, mxContext, mxTextDocument, xTextRange ) ) ); } -rtl::OUString& +rtl::OUString& SwVbaParagraphs::getServiceImplName() { static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaParagraphs") ); return sImplName; } -css::uno::Sequence<rtl::OUString> +css::uno::Sequence<rtl::OUString> SwVbaParagraphs::getServiceNames() { static uno::Sequence< rtl::OUString > sNames; diff --git a/sw/source/ui/vba/vbaparagraph.hxx b/sw/source/ui/vba/vbaparagraph.hxx index 894ac61cc7e6..4c2cc448e5c1 100644 --- a/sw/source/ui/vba/vbaparagraph.hxx +++ b/sw/source/ui/vba/vbaparagraph.hxx @@ -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 @@ -73,9 +73,9 @@ public: virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException); // SwVbaParagraphs_BASE - virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource ); + virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource ); virtual rtl::OUString& getServiceImplName(); virtual css::uno::Sequence<rtl::OUString> getServiceNames(); -}; +}; #endif /* SW_VBA_PARAGRAPH_HXX */ diff --git a/sw/source/ui/vba/vbaparagraphformat.cxx b/sw/source/ui/vba/vbaparagraphformat.cxx index 07a822ad5752..dbcadac1e3c4 100644 --- a/sw/source/ui/vba/vbaparagraphformat.cxx +++ b/sw/source/ui/vba/vbaparagraphformat.cxx @@ -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 @@ -91,7 +91,7 @@ void SAL_CALL SwVbaParagraphFormat::setKeepTogether( const uno::Any& _keeptogeth if( _keeptogether >>= bKeep ) { mxParaProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaKeepTogether") ), uno::makeAny( bKeep ) ); - } + } else { DebugHelper::exception( SbERR_BAD_PARAMETER, rtl::OUString() ); @@ -111,7 +111,7 @@ void SAL_CALL SwVbaParagraphFormat::setKeepWithNext( const uno::Any& _keepwithne if( _keepwithnext >>= bKeep ) { mxParaProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaSplit") ), uno::makeAny( bKeep ) ); - } + } else { DebugHelper::exception( SbERR_BAD_PARAMETER, rtl::OUString() ); @@ -131,7 +131,7 @@ void SAL_CALL SwVbaParagraphFormat::setHyphenation( const uno::Any& _hyphenation if( _hyphenation >>= bHypn ) { mxParaProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaIsHyphenation") ), uno::makeAny( bHypn ) ); - } + } else { DebugHelper::exception( SbERR_BAD_PARAMETER, rtl::OUString() ); @@ -179,7 +179,7 @@ void SAL_CALL SwVbaParagraphFormat::setNoLineNumber( const uno::Any& _nolinenumb if( _nolinenumber >>= noLineNum ) { mxParaProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaLineNumberCount") ), uno::makeAny( noLineNum ) ); - } + } else { DebugHelper::exception( SbERR_BAD_PARAMETER, rtl::OUString() ); @@ -235,7 +235,7 @@ void SAL_CALL SwVbaParagraphFormat::setPageBreakBefore( const uno::Any& _breakbe aBreakType = style::BreakType_PAGE_AFTER; } mxParaProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("BreakType") ), uno::makeAny( aBreakType ) ); - } + } else { DebugHelper::exception( SbERR_BAD_PARAMETER, rtl::OUString() ); @@ -339,7 +339,7 @@ style::LineSpacing SwVbaParagraphFormat::getOOoLineSpacing( float _lineSpace, sa style::LineSpacing aLineSpacing; if( mode != style::LineSpacingMode::MINIMUM && mode != style::LineSpacingMode::FIX ) { - // special behaviour of word: if the space is set to these values, the rule and + // special behaviour of word: if the space is set to these values, the rule and // the height are changed accordingly if( _lineSpace == CHARACTER_INDENT_FACTOR ) { @@ -552,14 +552,14 @@ sal_Int32 SwVbaParagraphFormat::getMSWordAlignment( sal_Int32 _alignment ) return wdAlignment; } -rtl::OUString& +rtl::OUString& SwVbaParagraphFormat::getServiceImplName() { static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaParagraphFormat") ); return sImplName; } -uno::Sequence< rtl::OUString > +uno::Sequence< rtl::OUString > SwVbaParagraphFormat::getServiceNames() { static uno::Sequence< rtl::OUString > aServiceNames; diff --git a/sw/source/ui/vba/vbaparagraphformat.hxx b/sw/source/ui/vba/vbaparagraphformat.hxx index 684390820e13..4a061b96b769 100644 --- a/sw/source/ui/vba/vbaparagraphformat.hxx +++ b/sw/source/ui/vba/vbaparagraphformat.hxx @@ -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 @@ -53,7 +53,7 @@ private: public: SwVbaParagraphFormat( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::text::XTextDocument >& rTextDocument, const css::uno::Reference< css::beans::XPropertySet >& rParaProps ); virtual ~SwVbaParagraphFormat(); - + // Attributes virtual ::sal_Int32 SAL_CALL getAlignment() throw (css::uno::RuntimeException); virtual void SAL_CALL setAlignment( ::sal_Int32 _alignment ) throw (css::uno::RuntimeException); diff --git a/sw/source/ui/vba/vbarange.cxx b/sw/source/ui/vba/vbarange.cxx index 647aedb34791..d6f719dd0b51 100644 --- a/sw/source/ui/vba/vbarange.cxx +++ b/sw/source/ui/vba/vbarange.cxx @@ -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,8 +67,8 @@ void SwVbaRange::initialize( const uno::Reference< text::XTextRange >& rStart, c if( !mxText.is() ) { mxText = mxTextDocument->getText(); - } - + } + mxTextCursor = SwVbaRangeHelper::initCursor( rStart, mxText ); mxTextCursor->collapseToStart(); @@ -250,7 +250,7 @@ SwVbaRange::getStyle() throw ( uno::RuntimeException ) uno::Reference< style::XStyleFamiliesSupplier > xStyleSupplier( mxTextDocument, uno::UNO_QUERY_THROW); uno::Reference< container::XNameAccess > xStylesAccess( xStyleSupplier->getStyleFamilies()->getByName( aStyleType ), uno::UNO_QUERY_THROW ); uno::Reference< beans::XPropertySet > xStyleProps( xStylesAccess->getByName( aStyleName ), uno::UNO_QUERY_THROW ); - return uno::Reference< word::XStyle >( new SwVbaStyle( this, mxContext, xStyleProps ) ); + return uno::Reference< word::XStyle >( new SwVbaStyle( this, mxContext, xStyleProps ) ); } void SAL_CALL @@ -324,14 +324,14 @@ void SAL_CALL SwVbaRange::setEnd( ::sal_Int32 _end ) throw (uno::RuntimeExceptio mxTextCursor->gotoRange( xEnd, sal_True ); } -rtl::OUString& +rtl::OUString& SwVbaRange::getServiceImplName() { static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaRange") ); return sImplName; } -uno::Sequence< rtl::OUString > +uno::Sequence< rtl::OUString > SwVbaRange::getServiceNames() { static uno::Sequence< rtl::OUString > aServiceNames; diff --git a/sw/source/ui/vba/vbarange.hxx b/sw/source/ui/vba/vbarange.hxx index 1f1b3a3bbc8b..ca3a4ea21b07 100644 --- a/sw/source/ui/vba/vbarange.hxx +++ b/sw/source/ui/vba/vbarange.hxx @@ -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 @@ -54,7 +54,7 @@ public: SwVbaRange( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::text::XTextDocument >& rTextDocument, const css::uno::Reference< css::text::XTextRange >& rStart, const css::uno::Reference< css::text::XTextRange >& rEnd, const css::uno::Reference< css::text::XText >& rText, sal_Bool _bMaySpanEndOfDocument = sal_False ) throw (css::uno::RuntimeException); virtual ~SwVbaRange(); css::uno::Reference< css::text::XTextDocument > getDocument() { return mxTextDocument; } - + virtual css::uno::Reference< css::text::XTextRange > SAL_CALL getXTextRange() throw (css::uno::RuntimeException); #ifdef TOMORROW void setXTextRange( const css::uno::Reference< css::text::XTextRange >& xRange ) throw (css::uno::RuntimeException); diff --git a/sw/source/ui/vba/vbarangehelper.cxx b/sw/source/ui/vba/vbarangehelper.cxx index 4fd9e5f143f1..337fd9d6ae27 100644 --- a/sw/source/ui/vba/vbarangehelper.cxx +++ b/sw/source/ui/vba/vbarangehelper.cxx @@ -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,7 +33,7 @@ using namespace ::com::sun::star; /** * get a range in a xText by creating - * a cursor that iterates over the text. If the iterating cursor is + * a cursor that iterates over the text. If the iterating cursor is * equal to the desired position, the range equivalent is returned. * Some special cases are tables that are inside of the text, because the * position has to be adjusted. @@ -56,7 +56,7 @@ uno::Reference< text::XTextRange > SwVbaRangeHelper::getRangeByPosition( const u if( _position == nPos ) { xRange = xCursor->getStart(); - } + } else { bCanGo = xCursor->goRight( 1, sal_False ); @@ -73,7 +73,7 @@ void SwVbaRangeHelper::insertString( uno::Reference< text::XTextRange >& rTextRa sal_Int32 nlastIndex = 0; sal_Int32 nIndex = 0; uno::Reference< text::XTextRange > xRange = rTextRange; - + while(( nIndex = rStr.indexOf('\n', nlastIndex)) >= 0 ) { xRange = xRange->getEnd(); diff --git a/sw/source/ui/vba/vbarangehelper.hxx b/sw/source/ui/vba/vbarangehelper.hxx index 71bdf20f94a2..530c7e1fa12d 100644 --- a/sw/source/ui/vba/vbarangehelper.hxx +++ b/sw/source/ui/vba/vbarangehelper.hxx @@ -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/sw/source/ui/vba/vbareplacement.cxx b/sw/source/ui/vba/vbareplacement.cxx index 81f2bb193412..2bd7dcfa580c 100644 --- a/sw/source/ui/vba/vbareplacement.cxx +++ b/sw/source/ui/vba/vbareplacement.cxx @@ -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 @@ -50,14 +50,14 @@ void SAL_CALL SwVbaReplacement::setText( const ::rtl::OUString& _text ) throw (u mxPropertyReplace->setReplaceString( _text ); } -rtl::OUString& +rtl::OUString& SwVbaReplacement::getServiceImplName() { static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaReplacement") ); return sImplName; } -uno::Sequence< rtl::OUString > +uno::Sequence< rtl::OUString > SwVbaReplacement::getServiceNames() { static uno::Sequence< rtl::OUString > aServiceNames; diff --git a/sw/source/ui/vba/vbareplacement.hxx b/sw/source/ui/vba/vbareplacement.hxx index b257fb7a3abc..c0f66af45fdc 100644 --- a/sw/source/ui/vba/vbareplacement.hxx +++ b/sw/source/ui/vba/vbareplacement.hxx @@ -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/sw/source/ui/vba/vbasection.cxx b/sw/source/ui/vba/vbasection.cxx index 2e685fbb1676..4df6f0b5b31a 100644 --- a/sw/source/ui/vba/vbasection.cxx +++ b/sw/source/ui/vba/vbasection.cxx @@ -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 @@ -66,14 +66,14 @@ SwVbaSection::PageSetup( ) throw (uno::RuntimeException) return uno::makeAny( uno::Reference< word::XPageSetup >( new SwVbaPageSetup( this, mxContext, mxModel, mxPageProps ) ) ); } -rtl::OUString& +rtl::OUString& SwVbaSection::getServiceImplName() { static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaSection") ); return sImplName; } -uno::Sequence< rtl::OUString > +uno::Sequence< rtl::OUString > SwVbaSection::getServiceNames() { static uno::Sequence< rtl::OUString > aServiceNames; diff --git a/sw/source/ui/vba/vbasection.hxx b/sw/source/ui/vba/vbasection.hxx index 90a2972c2f52..9dd40586998b 100644 --- a/sw/source/ui/vba/vbasection.hxx +++ b/sw/source/ui/vba/vbasection.hxx @@ -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/sw/source/ui/vba/vbasections.cxx b/sw/source/ui/vba/vbasections.cxx index c0f887f0f249..6a4ae0e45ef7 100644 --- a/sw/source/ui/vba/vbasections.cxx +++ b/sw/source/ui/vba/vbasections.cxx @@ -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 @@ -96,11 +96,11 @@ public: } virtual uno::Any SAL_CALL getByIndex( sal_Int32 Index ) throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException) { - if ( Index < 0 || Index >= getCount() ) + if ( Index < 0 || Index >= getCount() ) throw css::lang::IndexOutOfBoundsException(); uno::Reference< beans::XPropertySet > xPageProps( mxSections[ Index ], uno::UNO_QUERY_THROW ); - return uno::makeAny( uno::Reference< word::XSection >( new SwVbaSection( mxParent, mxContext, mxModel, xPageProps ) ) ); + return uno::makeAny( uno::Reference< word::XSection >( new SwVbaSection( mxParent, mxContext, mxModel, xPageProps ) ) ); } virtual uno::Type SAL_CALL getElementType( ) throw (uno::RuntimeException) { @@ -123,8 +123,8 @@ class SectionsEnumWrapper : public EnumerationHelperImpl public: SectionsEnumWrapper( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration, const uno::Reference< frame::XModel >& xModel ) throw ( uno::RuntimeException ) : EnumerationHelperImpl( xParent, xContext, xEnumeration ), mxModel( xModel ){} - virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException) - { + virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException) + { uno::Reference< beans::XPropertySet > xPageProps( m_xEnumeration->nextElement(), uno::UNO_QUERY_THROW ); return uno::makeAny( uno::Reference< word::XSection > ( new SwVbaSection( m_xParent, m_xContext, mxModel, xPageProps ) ) ); } @@ -166,14 +166,14 @@ SwVbaSections::createCollectionObject( const css::uno::Any& aSource ) return aSource; } -rtl::OUString& +rtl::OUString& SwVbaSections::getServiceImplName() { static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaSections") ); return sImplName; } -css::uno::Sequence<rtl::OUString> +css::uno::Sequence<rtl::OUString> SwVbaSections::getServiceNames() { static uno::Sequence< rtl::OUString > sNames; diff --git a/sw/source/ui/vba/vbasections.hxx b/sw/source/ui/vba/vbasections.hxx index 3204689af5d8..9cb35cf74eb0 100644 --- a/sw/source/ui/vba/vbasections.hxx +++ b/sw/source/ui/vba/vbasections.hxx @@ -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,9 +51,9 @@ public: virtual css::uno::Any SAL_CALL PageSetup( ) throw (css::uno::RuntimeException); // SwVbaSections_BASE - virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource ); + virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource ); virtual rtl::OUString& getServiceImplName(); virtual css::uno::Sequence<rtl::OUString> getServiceNames(); -}; +}; #endif /* SW_VBA_SECTIONS_HXX */ diff --git a/sw/source/ui/vba/vbaselection.cxx b/sw/source/ui/vba/vbaselection.cxx index 620e44fa413b..17d4e2f5a3af 100644 --- a/sw/source/ui/vba/vbaselection.cxx +++ b/sw/source/ui/vba/vbaselection.cxx @@ -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 @@ -73,7 +73,7 @@ uno::Reference< text::XTextRange > SwVbaSelection::GetSelectedRange() throw ( un { uno::Reference< text::XTextRange > xTextRange; uno::Reference< lang::XServiceInfo > xServiceInfo( mxModel->getCurrentSelection(), uno::UNO_QUERY_THROW ); - if( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextRanges") ) ) ) + if( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextRanges") ) ) ) { uno::Reference< container::XIndexAccess > xTextRanges( xServiceInfo, uno::UNO_QUERY_THROW ); if( xTextRanges->getCount() > 0 ) @@ -89,7 +89,7 @@ uno::Reference< text::XTextRange > SwVbaSelection::GetSelectedRange() throw ( un return xTextRange; } -uno::Reference< word::XRange > SAL_CALL +uno::Reference< word::XRange > SAL_CALL SwVbaSelection::getRange() throw ( uno::RuntimeException ) { uno::Reference< text::XTextRange > xTextRange = GetSelectedRange(); @@ -187,7 +187,7 @@ SwVbaSelection::EndKey( const uno::Any& _unit, const uno::Any& _extend ) throw ( void SAL_CALL SwVbaSelection::Delete( const uno::Any& /*_unit*/, const uno::Any& /*_count*/ ) throw ( uno::RuntimeException ) { - // FIXME: handle the arguments: _unit and _count + // FIXME: handle the arguments: _unit and _count rtl::OUString url = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:Delete")); dispatchRequests( mxModel,url ); } @@ -208,7 +208,7 @@ void SwVbaSelection::NextCell( sal_Int32 nCount, E_DIRECTION eDirection ) throw rtl::OUString aCellName; xCellProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("CellName") ) ) >>= aCellName; uno::Reference< text::XTextTableCursor > xTextTableCursor = xTextTable->createCursorByCellName( aCellName ); - // move the table cursor + // move the table cursor switch( eDirection ) { case MOVE_LEFT: @@ -255,17 +255,17 @@ SwVbaSelection::MoveRight( const uno::Any& _unit, const uno::Any& _count, const _count >>= nCount; if( _extend.hasValue() ) _extend >>= nExtend; - + if( nCount == 0 ) return; - + if( nCount < 0 ) { // TODO: call MoveLeft; MoveLeft( _unit, uno::makeAny( -nCount ), _extend ); return; } - + switch( nUnit ) { case word::WdUnits::wdCell: @@ -300,16 +300,16 @@ SwVbaSelection::MoveLeft( const uno::Any& _unit, const uno::Any& _count, const u _count >>= nCount; if( _extend.hasValue() ) _extend >>= nExtend; - + if( nCount == 0 ) return; - + if( nCount < 0 ) { MoveRight( _unit, uno::makeAny( -nCount ), _extend ); return; } - + switch( nUnit ) { case word::WdUnits::wdCell: @@ -344,17 +344,17 @@ SwVbaSelection::MoveDown( const uno::Any& _unit, const uno::Any& _count, const u _count >>= nCount; if( _extend.hasValue() ) _extend >>= nExtend; - + if( nCount == 0 ) return; - + if( nCount < 0 ) { // TODO: call MoveLeft; //MoveUp( _unit, uno::makeAny( -nCount ), _extend ); return; } - + switch( nUnit ) { case word::WdUnits::wdLine: @@ -376,7 +376,7 @@ SwVbaSelection::MoveDown( const uno::Any& _unit, const uno::Any& _count, const u void SAL_CALL SwVbaSelection::TypeParagraph() throw ( uno::RuntimeException ) { - // #FIXME: if the selection is an entire paragraph, it's replaced + // #FIXME: if the selection is an entire paragraph, it's replaced // by the new paragraph sal_Bool isCollapsed = mxTextViewCursor->isCollapsed(); InsertParagraph(); @@ -415,7 +415,7 @@ SwVbaSelection::setParagraphFormat( const uno::Reference< word::XParagraphFormat return getRange()->setParagraphFormat( rParagraphFormat ); } -uno::Reference< word::XFind > SAL_CALL +uno::Reference< word::XFind > SAL_CALL SwVbaSelection::getFind() throw ( uno::RuntimeException ) { uno::Reference< text::XTextRange > xTextRange = GetSelectedRange(); @@ -565,12 +565,12 @@ SwVbaSelection::Tables( const uno::Any& aIndex ) throw (uno::RuntimeException) // Hacky implementation due to missing api ( and lack of knowledge ) // we can only support a selection that is a single table if ( !aIndex.hasValue() ) // currently we can't support multiple tables in a selection - throw uno::RuntimeException(); + throw uno::RuntimeException(); // if the current selection is a XTextTableCursor and the index is 1 then we can service this request, otherwise we just have to throw uno::Reference< text::XTextTableCursor > xTextTableCursor( mxModel->getCurrentSelection(), uno::UNO_QUERY ); if ( !xTextTableCursor.is() ) - throw uno::RuntimeException(); + throw uno::RuntimeException(); sal_Int32 nIndex = 0; aIndex >>= nIndex; @@ -578,7 +578,7 @@ SwVbaSelection::Tables( const uno::Any& aIndex ) throw (uno::RuntimeException) uno::Any aRet; if ( nIndex != 1 ) - throw uno::RuntimeException(); + throw uno::RuntimeException(); SwXTextTableCursor* pTTCursor = dynamic_cast< SwXTextTableCursor* >( xTextTableCursor.get() ); if ( pTTCursor ) { @@ -588,12 +588,12 @@ SwVbaSelection::Tables( const uno::Any& aIndex ) throw (uno::RuntimeException) { uno::Reference< text::XTextTable > xTbl = SwXTextTables::GetObject(*pFmt); uno::Reference< css::text::XTextDocument > xTextDoc( mxModel, uno::UNO_QUERY_THROW ); - uno::Reference< word::XTable > xVBATbl = new SwVbaTable( mxParent, mxContext, xTextDoc, xTbl ); + uno::Reference< word::XTable > xVBATbl = new SwVbaTable( mxParent, mxContext, xTextDoc, xTbl ); aRet <<= xVBATbl; } } return aRet; - + } uno::Any SAL_CALL @@ -618,7 +618,7 @@ SwVbaSelection::getHeaderFooter() throw ( uno::RuntimeException ) nIndex = word::WdHeaderFooterIndex::wdHeaderFooterEvenPages; else if( HeaderFooterHelper::isFirstPageHeader( mxModel, xCurrentText ) || HeaderFooterHelper::isFirstPageFooter( mxModel, xCurrentText ) ) nIndex = word::WdHeaderFooterIndex::wdHeaderFooterFirstPage; - + return uno::Reference< word::XHeaderFooter >( new SwVbaHeaderFooter( this, mxContext, mxModel, xPageStyleProps, isHeader, nIndex ) ); } @@ -631,7 +631,7 @@ SwVbaSelection::ShapeRange( ) throw (uno::RuntimeException) uno::Reference< drawing::XShapes > xShapes( mxModel->getCurrentSelection(), uno::UNO_QUERY ); if ( !xShapes.is() ) - throw uno::RuntimeException(); + throw uno::RuntimeException(); uno::Reference< drawing::XDrawPageSupplier > xDrawPageSupplier( mxModel, uno::UNO_QUERY_THROW ); uno::Reference< drawing::XDrawPage > xDrawPage = xDrawPageSupplier->getDrawPage(); @@ -658,14 +658,14 @@ void SAL_CALL SwVbaSelection::setEnd( ::sal_Int32 _end ) throw (uno::RuntimeExce getRange()->setEnd( _end ); } -rtl::OUString& +rtl::OUString& SwVbaSelection::getServiceImplName() { static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaSelection") ); return sImplName; } -uno::Sequence< rtl::OUString > +uno::Sequence< rtl::OUString > SwVbaSelection::getServiceNames() { static uno::Sequence< rtl::OUString > aServiceNames; diff --git a/sw/source/ui/vba/vbaselection.hxx b/sw/source/ui/vba/vbaselection.hxx index a5079340ee19..afbf79a6c3ff 100644 --- a/sw/source/ui/vba/vbaselection.hxx +++ b/sw/source/ui/vba/vbaselection.hxx @@ -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 @@ -61,7 +61,7 @@ private: public: SwVbaSelection( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::frame::XModel >& rModel ) throw ( css::uno::RuntimeException ); virtual ~SwVbaSelection(); - + // Attribute virtual rtl::OUString SAL_CALL getText() throw (css::uno::RuntimeException); virtual void SAL_CALL setText( const rtl::OUString& rText ) throw (css::uno::RuntimeException); diff --git a/sw/source/ui/vba/vbastyle.cxx b/sw/source/ui/vba/vbastyle.cxx index cf49da020284..a8bb6bee9c51 100644 --- a/sw/source/ui/vba/vbastyle.cxx +++ b/sw/source/ui/vba/vbastyle.cxx @@ -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 @@ -41,13 +41,13 @@ SwVbaStyle::SwVbaStyle( const uno::Reference< XHelperInterface >& xParent, const mxStyle.set( _xPropertySet, uno::UNO_QUERY_THROW ); } -void SAL_CALL +void SAL_CALL SwVbaStyle::setName( const ::rtl::OUString& Name ) throw (uno::RuntimeException) { mxStyle->setName(Name); } -::rtl::OUString SAL_CALL +::rtl::OUString SAL_CALL SwVbaStyle::getName() throw (uno::RuntimeException) { return mxStyle->getName(); @@ -82,9 +82,9 @@ void SAL_CALL SwVbaStyle::setLanguageID( ::sal_Int32 _languageid ) throw (uno::R uno::Reference< lang::XServiceInfo > xServiceInfo( mxStyle, uno::UNO_QUERY_THROW ); if( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.style.ParagraphStyle") ) ) ) nType = word::WdStyleType::wdStyleTypeParagraph; - else if( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.style.CharacterStyle") ) ) ) + else if( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.style.CharacterStyle") ) ) ) nType = word::WdStyleType::wdStyleTypeCharacter; - else // if( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.NumberingStyle") ) ) ) + else // if( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.NumberingStyle") ) ) ) nType = word::WdStyleType::wdStyleTypeList; return nType; } diff --git a/sw/source/ui/vba/vbastyle.hxx b/sw/source/ui/vba/vbastyle.hxx index 401baa5337a1..bfa12e0caa8d 100644 --- a/sw/source/ui/vba/vbastyle.hxx +++ b/sw/source/ui/vba/vbastyle.hxx @@ -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/sw/source/ui/vba/vbastyles.cxx b/sw/source/ui/vba/vbastyles.cxx index 371c1225cafa..58a88e2e7936 100644 --- a/sw/source/ui/vba/vbastyles.cxx +++ b/sw/source/ui/vba/vbastyles.cxx @@ -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 @@ -200,7 +200,7 @@ public: // XElementAccess virtual uno::Type SAL_CALL getElementType( ) throw (uno::RuntimeException) { return style::XStyle::static_type(0); } virtual ::sal_Bool SAL_CALL hasElements( ) throw (uno::RuntimeException) { return getCount() > 0; } - // XNameAcess + // XNameAcess virtual uno::Any SAL_CALL getByName( const ::rtl::OUString& aName ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException) { if ( !hasByName(aName) ) @@ -242,7 +242,7 @@ public: // XIndexAccess virtual ::sal_Int32 SAL_CALL getCount( ) throw (uno::RuntimeException) - { + { uno::Sequence< rtl::OUString > aStyleTypes = getStyleTypes(); sal_Int32 nCount = 0; for( sal_Int32 i = 0; i < aStyleTypes.getLength(); i++ ) @@ -251,12 +251,12 @@ public: nCount += xIndexAccess->getCount(); } return nCount; - } + } virtual uno::Any SAL_CALL getByIndex( ::sal_Int32 Index ) throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException ) { if ( Index < 0 || Index >= getCount() ) throw lang::IndexOutOfBoundsException(); - + // FIXME: need to make a alphabetically sorted list of style names uno::Sequence< rtl::OUString > aStyleTypes = getStyleTypes(); for( sal_Int32 i = 0; i < aStyleTypes.getLength(); i++ ) @@ -286,20 +286,20 @@ SwVbaStyles::SwVbaStyles( const uno::Reference< XHelperInterface >& xParent, con mxMSF.set( mxModel, uno::UNO_QUERY_THROW ); } -uno::Any +uno::Any SwVbaStyles::createCollectionObject(const uno::Any& aObject) { uno::Reference< beans::XPropertySet > xStyleProp( aObject, uno::UNO_QUERY_THROW ); return uno::makeAny( uno::Reference< word::XStyle >( new SwVbaStyle( this, mxContext, xStyleProp ) ) ); } -uno::Type SAL_CALL +uno::Type SAL_CALL SwVbaStyles::getElementType() throw (uno::RuntimeException) { return word::XStyle::static_type(0); } -uno::Reference< container::XEnumeration > SAL_CALL +uno::Reference< container::XEnumeration > SAL_CALL SwVbaStyles::createEnumeration() throw (uno::RuntimeException) { throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() ); diff --git a/sw/source/ui/vba/vbastyles.hxx b/sw/source/ui/vba/vbastyles.hxx index 9cd2e2ff5b1a..76e08c6ba2ff 100644 --- a/sw/source/ui/vba/vbastyles.hxx +++ b/sw/source/ui/vba/vbastyles.hxx @@ -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 @@ -41,11 +41,11 @@ public: virtual css::uno::Any SAL_CALL Item( const css::uno::Any& Index1, const css::uno::Any& Index2 ) throw (css::uno::RuntimeException); // XEnumerationAccess virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException); - virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException); + virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException); virtual css::uno::Any createCollectionObject(const css::uno::Any&); // XHelperInterface virtual rtl::OUString& getServiceImplName(); virtual css::uno::Sequence<rtl::OUString> getServiceNames(); }; -#endif +#endif diff --git a/sw/source/ui/vba/vbasystem.cxx b/sw/source/ui/vba/vbasystem.cxx index 42d1c09ccbac..66e5d1fd4ce9 100644 --- a/sw/source/ui/vba/vbasystem.cxx +++ b/sw/source/ui/vba/vbasystem.cxx @@ -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 @@ -97,7 +97,7 @@ SwVbaSystem::getCursor() throw (uno::RuntimeException) } } -void SAL_CALL +void SAL_CALL SwVbaSystem::setCursor( sal_Int32 _cursor ) throw (uno::RuntimeException) { try @@ -131,11 +131,11 @@ SwVbaSystem::setCursor( sal_Int32 _cursor ) throw (uno::RuntimeException) break; } default: - throw uno::RuntimeException( rtl::OUString( + throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Unknown value for Cursor pointer")), uno::Reference< uno::XInterface >() ); // TODO: isn't this a flaw in the API? It should be allowed to throw an // IllegalArgumentException, or so - } + } } catch( const uno::Exception& ) { @@ -143,7 +143,7 @@ SwVbaSystem::setCursor( sal_Int32 _cursor ) throw (uno::RuntimeException) } } -uno::Any SAL_CALL +uno::Any SAL_CALL SwVbaSystem::PrivateProfileString( const rtl::OUString& rFilename, const rtl::OUString& rSection, const rtl::OUString& rKey ) throw ( uno::RuntimeException ) { if( rFilename.getLength() == 0 ) @@ -167,14 +167,14 @@ SwVbaSystem::PrivateProfileString( const rtl::OUString& rFilename, const rtl::OU return uno::makeAny( uno::Reference< XPropValue > ( new ScVbaPropValue( &maPrivateProfileStringListener ) ) ); } -rtl::OUString& +rtl::OUString& SwVbaSystem::getServiceImplName() { static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaSystem") ); return sImplName; } -uno::Sequence< rtl::OUString > +uno::Sequence< rtl::OUString > SwVbaSystem::getServiceNames() { static uno::Sequence< rtl::OUString > aServiceNames; diff --git a/sw/source/ui/vba/vbasystem.hxx b/sw/source/ui/vba/vbasystem.hxx index deeb6f00fdf4..df548a76a580 100644 --- a/sw/source/ui/vba/vbasystem.hxx +++ b/sw/source/ui/vba/vbasystem.hxx @@ -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 @@ -40,7 +40,7 @@ private: rtl::OUString maFileName; ByteString maGroupName; ByteString maKey; -public: +public: PrivateProfileStringListener(){}; virtual ~PrivateProfileStringListener(); void Initialize( const rtl::OUString& rFileName, const ByteString& rGroupName, const ByteString& rKey ); diff --git a/sw/source/ui/vba/vbatable.cxx b/sw/source/ui/vba/vbatable.cxx index 11969d6717a0..7598dfc6cf7e 100644 --- a/sw/source/ui/vba/vbatable.cxx +++ b/sw/source/ui/vba/vbatable.cxx @@ -18,16 +18,16 @@ SwVbaTable::SwVbaTable( const uno::Reference< ooo::vba::XHelperInterface >& rPa mxTextTable.set( xTextTable, uno::UNO_QUERY_THROW ); } -uno::Reference< word::XRange > SAL_CALL +uno::Reference< word::XRange > SAL_CALL SwVbaTable::Range( ) throw (script::BasicErrorException, uno::RuntimeException) { return new SwVbaRange( mxParent, mxContext, mxTextDocument, mxTextTable->getAnchor() ); } -void SAL_CALL +void SAL_CALL SwVbaTable::Select( ) throw (script::BasicErrorException, uno::RuntimeException) { - uno::Reference< frame::XModel > xModel( mxTextDocument, uno::UNO_QUERY_THROW ); + uno::Reference< frame::XModel > xModel( mxTextDocument, uno::UNO_QUERY_THROW ); uno::Reference< frame::XController > xController = xModel->getCurrentController(); uno::Reference< text::XTextViewCursorSupplier > xViewCursorSupplier( xController, uno::UNO_QUERY_THROW ); @@ -39,20 +39,20 @@ SwVbaTable::Select( ) throw (script::BasicErrorException, uno::RuntimeException // go to the end of the table and span the view uno::Reference< text::XTextViewCursor > xCursor = xViewCursorSupplier->getViewCursor(); xCursor->gotoEnd(sal_True); - + } -void SAL_CALL +void SAL_CALL SwVbaTable::Delete( ) throw (script::BasicErrorException, uno::RuntimeException) { uno::Reference< table::XTableRows > xRows( mxTextTable->getRows() ); xRows->removeByIndex( 0, xRows->getCount() ); } -uno::Reference< word::XRange > SAL_CALL +uno::Reference< word::XRange > SAL_CALL SwVbaTable::ConvertToText( const uno::Any& /*Separator*/, const uno::Any& /*NestedTables*/ ) throw (script::BasicErrorException, uno::RuntimeException) { - // #FIXME the helper api uses the dreaded dispatch mechanism, holding off + // #FIXME the helper api uses the dreaded dispatch mechanism, holding off // implementation while I look for alternative solution throw uno::RuntimeException(); } @@ -76,14 +76,14 @@ SwVbaTable::Borders( const uno::Any& index ) throw (uno::RuntimeException) } // XHelperInterface -rtl::OUString& +rtl::OUString& SwVbaTable::getServiceImplName() { static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaTable") ); - return sImplName; + return sImplName; } -uno::Sequence<rtl::OUString> +uno::Sequence<rtl::OUString> SwVbaTable::getServiceNames() { static uno::Sequence< rtl::OUString > aServiceNames; diff --git a/sw/source/ui/vba/vbatable.hxx b/sw/source/ui/vba/vbatable.hxx index 7d913d718895..c28a3cdaf313 100644 --- a/sw/source/ui/vba/vbatable.hxx +++ b/sw/source/ui/vba/vbatable.hxx @@ -23,6 +23,6 @@ public: virtual css::uno::Any SAL_CALL Borders( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException); // XHelperInterface virtual rtl::OUString& getServiceImplName(); - virtual css::uno::Sequence<rtl::OUString> getServiceNames(); + virtual css::uno::Sequence<rtl::OUString> getServiceNames(); }; #endif diff --git a/sw/source/ui/vba/vbatables.cxx b/sw/source/ui/vba/vbatables.cxx index 9a10622400d3..53178d1c791d 100644 --- a/sw/source/ui/vba/vbatables.cxx +++ b/sw/source/ui/vba/vbatables.cxx @@ -39,8 +39,8 @@ public: TableEnumerationImpl( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< frame::XModel >& xDocument, const uno::Reference< container::XIndexAccess >& xIndexAccess ) : mxParent( xParent ), mxContext( xContext ), mxDocument( xDocument ), mxIndexAccess( xIndexAccess ), mnCurIndex(0) { } - virtual ::sal_Bool SAL_CALL hasMoreElements( ) throw (uno::RuntimeException) - { + virtual ::sal_Bool SAL_CALL hasMoreElements( ) throw (uno::RuntimeException) + { return ( mnCurIndex < mxIndexAccess->getCount() ); } virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException) @@ -49,15 +49,15 @@ public: throw container::NoSuchElementException(); return lcl_createTable( mxParent, mxContext, mxDocument, mxIndexAccess->getByIndex( mnCurIndex++ ) ); } - + }; - + SwVbaTables::SwVbaTables( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< frame::XModel >& xDocument ) : SwVbaTables_BASE( xParent, xContext , lcl_getTables( xDocument ) ), mxDocument( xDocument ) { } -uno::Reference< word::XTable > SAL_CALL +uno::Reference< word::XTable > SAL_CALL SwVbaTables::Add( const uno::Reference< word::XRange >& Range, const uno::Any& NumRows, const uno::Any& NumColumns, const uno::Any& /*DefaultTableBehavior*/, const uno::Any& /*AutoFitBehavior*/ ) throw (script::BasicErrorException, uno::RuntimeException) { sal_Int32 nCols = 0; @@ -66,7 +66,7 @@ SwVbaTables::Add( const uno::Reference< word::XRange >& Range, const uno::Any& N // Preconditions if ( !( pVbaRange && ( NumRows >>= nRows ) && ( NumColumns >>= nCols ) ) ) throw uno::RuntimeException(); // #FIXME better exception?? - if ( nCols <= 0 || nRows <= 0 ) + if ( nCols <= 0 || nRows <= 0 ) throw uno::RuntimeException(); // #FIXME better exception?? uno::Reference< frame::XModel > xModel( pVbaRange->getDocument(), uno::UNO_QUERY_THROW ); @@ -82,42 +82,42 @@ SwVbaTables::Add( const uno::Reference< word::XRange >& Range, const uno::Any& N */ xTable->initialize( nRows, nCols ); uno::Reference< text::XText > xText = xTextRange->getText(); - uno::Reference< text::XTextContent > xContext( xTable, uno::UNO_QUERY_THROW ); - + uno::Reference< text::XTextContent > xContext( xTable, uno::UNO_QUERY_THROW ); + xText->insertTextContent( xTextRange, xContext, true ); uno::Reference< word::XTable > xVBATable( new SwVbaTable( mxParent, mxContext, pVbaRange->getDocument(), xTable ) ); return xVBATable; } -uno::Reference< container::XEnumeration > SAL_CALL +uno::Reference< container::XEnumeration > SAL_CALL SwVbaTables::createEnumeration() throw (uno::RuntimeException) { return new TableEnumerationImpl( mxParent, mxContext, mxDocument, m_xIndexAccess ); } -// ScVbaCollectionBaseImpl -uno::Any +// ScVbaCollectionBaseImpl +uno::Any SwVbaTables::createCollectionObject( const uno::Any& aSource ) { return lcl_createTable( mxParent, mxContext, mxDocument, aSource ); -} +} // XHelperInterface -rtl::OUString& +rtl::OUString& SwVbaTables::getServiceImplName() { static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaTables") ); - return sImplName; + return sImplName; } // XEnumerationAccess -uno::Type SAL_CALL +uno::Type SAL_CALL SwVbaTables::getElementType() throw (uno::RuntimeException) { - return word::XTable::static_type(0); + return word::XTable::static_type(0); } -uno::Sequence<rtl::OUString> +uno::Sequence<rtl::OUString> SwVbaTables::getServiceNames() { static uno::Sequence< rtl::OUString > aServiceNames; diff --git a/sw/source/ui/vba/vbatables.hxx b/sw/source/ui/vba/vbatables.hxx index a789337a2839..79df2f90b7ac 100644 --- a/sw/source/ui/vba/vbatables.hxx +++ b/sw/source/ui/vba/vbatables.hxx @@ -17,12 +17,12 @@ public: // XEnumerationAccess virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException); virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException); - // ScVbaCollectionBaseImpl + // ScVbaCollectionBaseImpl virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource ); // XHelperInterface virtual rtl::OUString& getServiceImplName(); - virtual css::uno::Sequence<rtl::OUString> getServiceNames(); + virtual css::uno::Sequence<rtl::OUString> getServiceNames(); }; #endif diff --git a/sw/source/ui/vba/vbatemplate.cxx b/sw/source/ui/vba/vbatemplate.cxx index 68476b301a17..71dc7acd8532 100644 --- a/sw/source/ui/vba/vbatemplate.cxx +++ b/sw/source/ui/vba/vbatemplate.cxx @@ -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 @@ -64,7 +64,7 @@ SwVbaTemplate::AutoTextEntries( const uno::Any& index ) throw (uno::RuntimeExcep sGroup = msName.copy( 0, msName.lastIndexOf( sal_Unicode('.') ) ); // OSL_TRACE("SwVbaTemplate::AutoTextEntries: %s", rtl::OUStringToOString( sGroup, RTL_TEXTENCODING_UTF8 ).getStr() ); } - + uno::Reference< container::XIndexAccess > xGroup; if( xAutoTextContainer->hasByName( sGroup ) ) { diff --git a/sw/source/ui/vba/vbatemplate.hxx b/sw/source/ui/vba/vbatemplate.hxx index 073e5cc5db1e..4e3359960418 100644 --- a/sw/source/ui/vba/vbatemplate.hxx +++ b/sw/source/ui/vba/vbatemplate.hxx @@ -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 @@ -38,7 +38,7 @@ private: css::uno::Reference< css::frame::XModel > mxModel; rtl::OUString msName; public: - SwVbaTemplate( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, + SwVbaTemplate( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::frame::XModel >& rModel, const rtl::OUString& ); virtual ~SwVbaTemplate(); diff --git a/sw/source/ui/vba/vbavariable.cxx b/sw/source/ui/vba/vbavariable.cxx index b62dc5642114..1799c7b505e3 100644 --- a/sw/source/ui/vba/vbavariable.cxx +++ b/sw/source/ui/vba/vbavariable.cxx @@ -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 @@ -84,14 +84,14 @@ SwVbaVariable::getIndex() throw ( css::uno::RuntimeException ) return 0; } -rtl::OUString& +rtl::OUString& SwVbaVariable::getServiceImplName() { static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaVariable") ); return sImplName; } -uno::Sequence< rtl::OUString > +uno::Sequence< rtl::OUString > SwVbaVariable::getServiceNames() { static uno::Sequence< rtl::OUString > aServiceNames; diff --git a/sw/source/ui/vba/vbavariable.hxx b/sw/source/ui/vba/vbavariable.hxx index af076804ef17..868597915dcd 100644 --- a/sw/source/ui/vba/vbavariable.hxx +++ b/sw/source/ui/vba/vbavariable.hxx @@ -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 @@ -41,7 +41,7 @@ private: rtl::OUString maName; public: - SwVbaVariable( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, + SwVbaVariable( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::beans::XPropertyAccess >& rUserDefined, const rtl::OUString& rName ) throw ( css::uno::RuntimeException ); virtual ~SwVbaVariable(); diff --git a/sw/source/ui/vba/vbavariables.cxx b/sw/source/ui/vba/vbavariables.cxx index 6aa662702a12..85b64f6542e4 100644 --- a/sw/source/ui/vba/vbavariables.cxx +++ b/sw/source/ui/vba/vbavariables.cxx @@ -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 @@ -82,14 +82,14 @@ SwVbaVariables::Add( const rtl::OUString& rName, const uno::Any& rValue ) throw return uno::makeAny( uno::Reference< word::XVariable >( new SwVbaVariable( getParent(), mxContext, mxUserDefined, rName ) ) ); } -rtl::OUString& +rtl::OUString& SwVbaVariables::getServiceImplName() { static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaVariables") ); return sImplName; } -css::uno::Sequence<rtl::OUString> +css::uno::Sequence<rtl::OUString> SwVbaVariables::getServiceNames() { static uno::Sequence< rtl::OUString > sNames; diff --git a/sw/source/ui/vba/vbavariables.hxx b/sw/source/ui/vba/vbavariables.hxx index 4933ef6e75a4..739c875571e1 100644 --- a/sw/source/ui/vba/vbavariables.hxx +++ b/sw/source/ui/vba/vbavariables.hxx @@ -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 @@ -50,12 +50,12 @@ public: virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException); // SwVbaVariables_BASE - virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource ); + virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource ); virtual rtl::OUString& getServiceImplName(); virtual css::uno::Sequence<rtl::OUString> getServiceNames(); // XVariables virtual css::uno::Any SAL_CALL Add( const rtl::OUString& rName, const css::uno::Any& rValue ) throw (css::uno::RuntimeException); -}; +}; #endif /* SW_VBA_VARIABLES_HXX */ diff --git a/sw/source/ui/vba/vbaview.cxx b/sw/source/ui/vba/vbaview.cxx index 9cb8bf1490ce..2cf6194454fb 100644 --- a/sw/source/ui/vba/vbaview.cxx +++ b/sw/source/ui/vba/vbaview.cxx @@ -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 @@ -71,7 +71,7 @@ SwVbaView::~SwVbaView() { } -::sal_Int32 SAL_CALL +::sal_Int32 SAL_CALL SwVbaView::getSeekView() throw (css::uno::RuntimeException) { // FIXME: if the view cursor is in table, field, section and frame @@ -122,7 +122,7 @@ SwVbaView::getSeekView() throw (css::uno::RuntimeException) return word::WdSeekView::wdSeekMainDocument; } -void SAL_CALL +void SAL_CALL SwVbaView::setSeekView( ::sal_Int32 _seekview ) throw (css::uno::RuntimeException) { // FIXME: save the current cursor position, if the cursor is in the main @@ -187,19 +187,19 @@ SwVbaView::setSeekView( ::sal_Int32 _seekview ) throw (css::uno::RuntimeExceptio } } -::sal_Int32 SAL_CALL +::sal_Int32 SAL_CALL SwVbaView::getSplitSpecial() throw (css::uno::RuntimeException) { return word::WdSpecialPane::wdPaneNone; } -void SAL_CALL +void SAL_CALL SwVbaView::setSplitSpecial( ::sal_Int32/* _splitspecial */) throw (css::uno::RuntimeException) { // not support in Writer } -::sal_Bool SAL_CALL +::sal_Bool SAL_CALL SwVbaView::getTableGridLines() throw (css::uno::RuntimeException) { sal_Bool bShowTableGridLine = sal_False; @@ -207,13 +207,13 @@ SwVbaView::getTableGridLines() throw (css::uno::RuntimeException) return bShowTableGridLine; } -void SAL_CALL +void SAL_CALL SwVbaView::setTableGridLines( ::sal_Bool _tablegridlines ) throw (css::uno::RuntimeException) { mxViewSettings->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ShowTableBoundaries")), uno::makeAny( _tablegridlines ) ); } -::sal_Int32 SAL_CALL +::sal_Int32 SAL_CALL SwVbaView::getType() throw (css::uno::RuntimeException) { // FIXME: handle wdPrintPreview type @@ -222,7 +222,7 @@ SwVbaView::getType() throw (css::uno::RuntimeException) return bOnlineLayout ? word::WdViewType::wdWebView : word::WdViewType::wdPrintView; } -void SAL_CALL +void SAL_CALL SwVbaView::setType( ::sal_Int32 _type ) throw (css::uno::RuntimeException) { // FIXME: handle wdPrintPreview type @@ -241,12 +241,12 @@ SwVbaView::setType( ::sal_Int32 _type ) throw (css::uno::RuntimeException) } case word::WdViewType::wdPrintPreview: { - PrintPreviewHelper( uno::Any(),word::getView( mxModel ) ); + PrintPreviewHelper( uno::Any(),word::getView( mxModel ) ); break; } default: DebugHelper::exception( SbERR_NOT_IMPLEMENTED, rtl::OUString() ); - + } } @@ -258,7 +258,7 @@ uno::Reference< text::XTextRange > SwVbaView::getHFTextRange( sal_Int32 nType ) rtl::OUString aPropIsShared; rtl::OUString aPropBodyDistance; rtl::OUString aPropText; - + switch( nType ) { case word::WdSeekView::wdSeekCurrentPageFooter: @@ -286,7 +286,7 @@ uno::Reference< text::XTextRange > SwVbaView::getHFTextRange( sal_Int32 nType ) } uno::Reference< text::XPageCursor > xPageCursor( mxViewCursor, uno::UNO_QUERY_THROW ); - + if( nType == word::WdSeekView::wdSeekFirstPageFooter || nType == word::WdSeekView::wdSeekFirstPageHeader ) { @@ -329,12 +329,12 @@ uno::Reference< text::XTextRange > SwVbaView::getHFTextRange( sal_Int32 nType ) DebugHelper::exception( SbERR_BAD_ACTION, rtl::OUString() ); } break; - } + } default: { break; } - } + } xStyle = word::getCurrentPageStyle( mxModel ); uno::Reference< beans::XPropertySet > xPageProps( xStyle, uno::UNO_QUERY_THROW ); @@ -382,7 +382,7 @@ uno::Reference< text::XTextRange > SwVbaView::getHFTextRange( sal_Int32 nType ) uno::Reference< text::XTextRange > SwVbaView::getFirstObjectPosition( const uno::Reference< text::XText >& xText ) throw (uno::RuntimeException) { - // if the first object is table, get the position of first cell + // if the first object is table, get the position of first cell uno::Reference< text::XTextRange > xTextRange; uno::Reference< container::XEnumerationAccess > xParaAccess( xText, uno::UNO_QUERY_THROW ); uno::Reference< container::XEnumeration> xParaEnum = xParaAccess->createEnumeration(); @@ -401,14 +401,14 @@ uno::Reference< text::XTextRange > SwVbaView::getFirstObjectPosition( const uno: return xTextRange; } -rtl::OUString& +rtl::OUString& SwVbaView::getServiceImplName() { static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaView") ); return sImplName; } -uno::Sequence< rtl::OUString > +uno::Sequence< rtl::OUString > SwVbaView::getServiceNames() { static uno::Sequence< rtl::OUString > aServiceNames; diff --git a/sw/source/ui/vba/vbaview.hxx b/sw/source/ui/vba/vbaview.hxx index 03e183ec38a3..ebb89ac700c9 100644 --- a/sw/source/ui/vba/vbaview.hxx +++ b/sw/source/ui/vba/vbaview.hxx @@ -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 @@ private: css::uno::Reference< css::text::XTextRange > getFirstObjectPosition( const css::uno::Reference< css::text::XText >& xText ) throw (css::uno::RuntimeException); public: - SwVbaView( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, + SwVbaView( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::frame::XModel >& rModel ) throw ( css::uno::RuntimeException ); virtual ~SwVbaView(); diff --git a/sw/source/ui/vba/vbawindow.cxx b/sw/source/ui/vba/vbawindow.cxx index e3d9bddbc7aa..dc5913aaa174 100644 --- a/sw/source/ui/vba/vbawindow.cxx +++ b/sw/source/ui/vba/vbawindow.cxx @@ -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 @@ -56,10 +56,10 @@ SwVbaWindow::Close( const uno::Any& SaveChanges, const uno::Any& RouteDocument ) document.Close(SaveChanges, FileName, RouteDocument ); } -uno::Any SAL_CALL +uno::Any SAL_CALL SwVbaWindow::getView() throw (uno::RuntimeException) { - return uno::makeAny( uno::Reference< word::XView >( new SwVbaView( this, mxContext, m_xModel ) ) ); + return uno::makeAny( uno::Reference< word::XView >( new SwVbaView( this, mxContext, m_xModel ) ) ); } void SAL_CALL SwVbaWindow::setView( const uno::Any& _view ) throw (uno::RuntimeException) @@ -69,33 +69,33 @@ void SAL_CALL SwVbaWindow::setView( const uno::Any& _view ) throw (uno::RuntimeE { SwVbaView view( this, mxContext, m_xModel ); view.setType( nType ); - } + } } -uno::Any SAL_CALL +uno::Any SAL_CALL SwVbaWindow::Panes( const uno::Any& aIndex ) throw (uno::RuntimeException) { uno::Reference< XCollection > xPanes( new SwVbaPanes( this, mxContext, m_xModel ) ); if( aIndex.getValueTypeClass() == uno::TypeClass_VOID ) return uno::makeAny( xPanes ); - return uno::Any( xPanes->Item( aIndex, uno::Any() ) ); + return uno::Any( xPanes->Item( aIndex, uno::Any() ) ); } -uno::Any SAL_CALL +uno::Any SAL_CALL SwVbaWindow::ActivePane() throw (uno::RuntimeException) { - return uno::makeAny( uno::Reference< word::XPane >( new SwVbaPane( this, mxContext, m_xModel ) ) ); + return uno::makeAny( uno::Reference< word::XPane >( new SwVbaPane( this, mxContext, m_xModel ) ) ); } -rtl::OUString& +rtl::OUString& SwVbaWindow::getServiceImplName() { static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaWindow") ); return sImplName; } -uno::Sequence< rtl::OUString > +uno::Sequence< rtl::OUString > SwVbaWindow::getServiceNames() { static uno::Sequence< rtl::OUString > aServiceNames; diff --git a/sw/source/ui/vba/vbawindow.hxx b/sw/source/ui/vba/vbawindow.hxx index 0809d2b73685..1ef1ff91411c 100644 --- a/sw/source/ui/vba/vbawindow.hxx +++ b/sw/source/ui/vba/vbawindow.hxx @@ -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,8 +36,8 @@ typedef cppu::ImplInheritanceHelper1< VbaWindowBase, ov::word::XWindow > WindowImpl_BASE; class SwVbaWindow : public WindowImpl_BASE -{ -public: +{ +public: SwVbaWindow( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::frame::XModel >& xModel ); diff --git a/sw/source/ui/vba/vbawrapformat.cxx b/sw/source/ui/vba/vbawrapformat.cxx index 4125cc00aaa0..84cef6c25163 100644 --- a/sw/source/ui/vba/vbawrapformat.cxx +++ b/sw/source/ui/vba/vbawrapformat.cxx @@ -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 @@ void SwVbaWrapFormat::makeWrap() throw (uno::RuntimeException) m_xPropertySet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("SurroundContour") )) >>= bContour; if( bContour ) nType = word::WdWrapType::wdWrapTight; - else + else nType = word::WdWrapType::wdWrapSquare; break; } @@ -220,14 +220,14 @@ void SAL_CALL SwVbaWrapFormat::setDistanceRight( float _distanceright ) throw (u setDistance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightMargin") ), _distanceright ); } -rtl::OUString& +rtl::OUString& SwVbaWrapFormat::getServiceImplName() { static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaWrapFormat") ); return sImplName; } -uno::Sequence< rtl::OUString > +uno::Sequence< rtl::OUString > SwVbaWrapFormat::getServiceNames() { static uno::Sequence< rtl::OUString > aServiceNames; diff --git a/sw/source/ui/vba/vbawrapformat.hxx b/sw/source/ui/vba/vbawrapformat.hxx index 71520d78aaae..1ee8eb7a4c77 100644 --- a/sw/source/ui/vba/vbawrapformat.hxx +++ b/sw/source/ui/vba/vbawrapformat.hxx @@ -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/sw/source/ui/vba/wordvbahelper.cxx b/sw/source/ui/vba/wordvbahelper.cxx index 82dfacf4f18d..e489b0b69dbf 100644 --- a/sw/source/ui/vba/wordvbahelper.cxx +++ b/sw/source/ui/vba/wordvbahelper.cxx @@ -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 @@ namespace vba namespace word { -SwDocShell* getDocShell( const uno::Reference< frame::XModel>& xModel ) +SwDocShell* getDocShell( const uno::Reference< frame::XModel>& xModel ) { uno::Reference< lang::XUnoTunnel > xTunnel( xModel, uno::UNO_QUERY_THROW ); SwXTextDocument* pXDoc = reinterpret_cast< SwXTextDocument * >( sal::static_int_cast< sal_IntPtr >(xTunnel->getSomething(SwXTextDocument::getUnoTunnelId()))); @@ -88,5 +88,5 @@ sal_Int32 getPageCount( const uno::Reference< frame::XModel>& xModel ) throw (un } } // word -} // +} // } // diff --git a/sw/source/ui/vba/wordvbahelper.hxx b/sw/source/ui/vba/wordvbahelper.hxx index 0629d613a724..489cf25ea378 100644 --- a/sw/source/ui/vba/wordvbahelper.hxx +++ b/sw/source/ui/vba/wordvbahelper.hxx @@ -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,9 +35,9 @@ class SwDocShell; class SwView; -namespace ooo +namespace ooo { - namespace vba + namespace vba { namespace word { |