sc/source/ui/vba/vbaaxes.cxx | 8 ++++++++ sc/source/ui/vba/vbaformatconditions.cxx | 6 +++++- sc/source/ui/vba/vbaoleobjects.cxx | 4 ++++ sc/source/ui/vba/vbastyles.cxx | 7 +++++-- 4 files changed, 22 insertions(+), 3 deletions(-)
New commits: commit 7afacb97a7f8a6f98daba0f5c8dfcd4035218ce4 Author: Matúš Kukan <matus.ku...@collabora.com> Date: Fri Aug 22 23:02:09 2014 +0200 Use anonymous namespace for these. (mostly EnumWrapper) Change-Id: Ice90e519bbd32a12de59d696a6dfedaaf45bd45e diff --git a/sc/source/ui/vba/vbaaxes.cxx b/sc/source/ui/vba/vbaaxes.cxx index ca76ea4..46d9672 100644 --- a/sc/source/ui/vba/vbaaxes.cxx +++ b/sc/source/ui/vba/vbaaxes.cxx @@ -39,6 +39,8 @@ typedef ::std::vector< AxesCoordinate > vecAxesIndices; typedef ::cppu::WeakImplHelper1< container::XIndexAccess > AxisIndexWrapper_BASE; +namespace { + class EnumWrapper : public EnumerationHelper_BASE { uno::Reference<container::XIndexAccess > m_xIndexAccess; @@ -58,6 +60,8 @@ public: } }; +} + uno::Reference< excel::XAxis > ScVbaAxes::createAxis( const uno::Reference< excel::XChart >& xChart, const uno::Reference< uno::XComponentContext >& xContext, sal_Int32 nType, sal_Int32 nAxisGroup ) throw ( uno::RuntimeException, script::BasicErrorException ) { @@ -78,6 +82,8 @@ ScVbaAxes::createAxis( const uno::Reference< excel::XChart >& xChart, const uno: return new ScVbaAxis( xParent, xContext, xAxisPropertySet, nType, nAxisGroup); } +namespace { + class AxisIndexWrapper : public AxisIndexWrapper_BASE { // if necessary for better performance we could change this into a map and cache the @@ -133,6 +139,8 @@ uno::Reference< container::XIndexAccess > createIndexWrapper( const uno::Referen return new AxisIndexWrapper( xContext, xChart ); } +} + // #FIXME The collection semantics will never work as this object is not yet initialised correctly ScVbaAxes::ScVbaAxes( const uno::Reference< XHelperInterface >& xParent,const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< excel::XChart >& xChart ) : ScVbaAxes_BASE( xParent, xContext, createIndexWrapper( xChart, xContext )), moChartParent( xChart ) { diff --git a/sc/source/ui/vba/vbaformatconditions.cxx b/sc/source/ui/vba/vbaformatconditions.cxx index 10fbede..21e8158 100644 --- a/sc/source/ui/vba/vbaformatconditions.cxx +++ b/sc/source/ui/vba/vbaformatconditions.cxx @@ -66,7 +66,7 @@ ScVbaFormatConditions::getElementType() throw (css::uno::RuntimeException) return cppu::UnoType<excel::XFormatCondition>::get(); } -uno::Any xSheetConditionToFormatCondition( const uno::Reference< XHelperInterface >& xRangeParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< excel::XStyles >& xStyles, const uno::Reference< excel::XFormatConditions >& xFormatConditions, const uno::Reference< beans::XPropertySet >& xRangeProps, const uno::Any& aObject ) +static uno::Any xSheetConditionToFormatCondition( const uno::Reference< XHelperInterface >& xRangeParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< excel::XStyles >& xStyles, const uno::Reference< excel::XFormatConditions >& xFormatConditions, const uno::Reference< beans::XPropertySet >& xRangeProps, const uno::Any& aObject ) { uno::Reference< sheet::XSheetConditionalEntry > xSheetConditionalEntry; aObject >>= xSheetConditionalEntry; @@ -82,6 +82,8 @@ ScVbaFormatConditions::createCollectionObject(const uno::Any& aObject ) return xSheetConditionToFormatCondition( uno::Reference< XHelperInterface >( mxRangeParent, uno::UNO_QUERY_THROW ), mxContext, mxStyles, this, mxParentRangePropertySet, aObject ); } +namespace { + class EnumWrapper : public EnumerationHelper_BASE { uno::Reference<container::XIndexAccess > m_xIndexAccess; @@ -107,6 +109,8 @@ public: } }; +} + uno::Reference< excel::XFormatCondition > SAL_CALL ScVbaFormatConditions::Add( ::sal_Int32 _nType, const uno::Any& _aOperator, const uno::Any& _aFormula1, const uno::Any& _aFormula2 ) throw (script::BasicErrorException, uno::RuntimeException, std::exception) { diff --git a/sc/source/ui/vba/vbaoleobjects.cxx b/sc/source/ui/vba/vbaoleobjects.cxx index cabfaa2..426dc12 100644 --- a/sc/source/ui/vba/vbaoleobjects.cxx +++ b/sc/source/ui/vba/vbaoleobjects.cxx @@ -30,6 +30,8 @@ using namespace ooo::vba; typedef ::cppu::WeakImplHelper1< container::XIndexAccess > XIndexAccess_BASE; +namespace { + class IndexAccessWrapper : public XIndexAccess_BASE { typedef std::vector< uno::Reference< drawing::XControlShape > > OLEObjects; @@ -102,6 +104,8 @@ uno::Reference< container::XIndexAccess > oleObjectIndexWrapper( const uno::Refe return new IndexAccessWrapper( xIndexAccess ); } +} + ScVbaOLEObjects::ScVbaOLEObjects( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XIndexAccess >& xIndexAccess ) : OLEObjectsImpl_BASE( xParent, xContext, oleObjectIndexWrapper( xIndexAccess ) ) diff --git a/sc/source/ui/vba/vbastyles.cxx b/sc/source/ui/vba/vbastyles.cxx index 79fe5c1..44de5c9 100644 --- a/sc/source/ui/vba/vbastyles.cxx +++ b/sc/source/ui/vba/vbastyles.cxx @@ -23,7 +23,6 @@ using namespace ::ooo::vba; using namespace ::com::sun::star; -static OUString SDEFAULTCELLSTYLENAME("Default"); static css::uno::Any lcl_createAPIStyleToVBAObject( const css::uno::Any& aObject, const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< frame::XModel >& xModel ) { @@ -63,6 +62,8 @@ ScVbaStyles::getElementType() throw (uno::RuntimeException) return cppu::UnoType<excel::XStyle>::get(); } +namespace { + class EnumWrapper : public EnumerationHelper_BASE { uno::Reference<container::XIndexAccess > m_xIndexAccess; @@ -85,6 +86,8 @@ public: } }; +} + uno::Reference< container::XEnumeration > SAL_CALL ScVbaStyles::createEnumeration() throw (uno::RuntimeException) { @@ -125,7 +128,7 @@ ScVbaStyles::Add( const OUString& _sName, const uno::Any& _aBasedOn ) throw (scr { mxNameContainerCellStyles->insertByName(_sName, uno::makeAny( xStyle) ); } - if (!sParentCellStyleName.equals(SDEFAULTCELLSTYLENAME)) + if (!sParentCellStyleName.equals("Default")) { xStyle->setParentStyle( sParentCellStyleName ); }
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits