include/sal/log-areas.dox | 1 + stoc/source/invocation/invocation.cxx | 18 ------------------ sw/source/ui/vba/service.cxx | 2 +- sw/source/ui/vba/vbaaddins.cxx | 2 +- sw/source/ui/vba/vbadocument.cxx | 2 +- sw/source/ui/vba/vbadocumentproperties.cxx | 8 ++++---- sw/source/ui/vba/vbafield.cxx | 4 ++-- sw/source/ui/vba/vbaglobals.cxx | 16 +++++++++------- sw/source/ui/vba/vbalisthelper.cxx | 2 +- sw/source/ui/vba/vbastyles.cxx | 2 +- 10 files changed, 21 insertions(+), 36 deletions(-)
New commits: commit 4dfd6d22e50b839d695eaf2983d193156391ffcf Author: Tor Lillqvist <t...@collabora.com> Date: Mon Feb 5 10:57:07 2018 +0200 Remove code that has been commented out since initial import in 2000 Change-Id: I42aaed79e88b6cb8bb0b93aa49555aad45050fe7 (cherry picked from commit 52030a3a65657dc5a3aed3208b25b33df7277e1b) diff --git a/stoc/source/invocation/invocation.cxx b/stoc/source/invocation/invocation.cxx index e70017baa0da..3ea0f1419f9e 100644 --- a/stoc/source/invocation/invocation.cxx +++ b/stoc/source/invocation/invocation.cxx @@ -364,10 +364,6 @@ void Invocation_Impl::setMaterial( const Any& rMaterial ) _xNameContainer.set( _xDirect, UNO_QUERY ); _xENDirect.set( _xDirect, UNO_QUERY ); _xDirect2.set( _xDirect, UNO_QUERY ); - - // only once!!! - //_xIntrospectionAccess = XIntrospectionAccessRef(); - //_xPropertySet = XPropertySetRef(); } else { @@ -424,20 +420,6 @@ void Invocation_Impl::setMaterial( const Any& rMaterial ) _xENIntrospection.set( _xIntrospectionAccess, UNO_QUERY ); } } - /* only once !!! - _xDirect = XInvocationRef(); - if( !_xIntrospectionAccess.is() ) - { - // reset - _xElementAccess = XElementAccessRef(); - _xEnumerationAccess = XEnumerationAccessRef(); - _xIndexAccess = XIndexAccessRef(); - _xIndexContainer = XIndexContainerRef(); - _xNameAccess = XNameAccessRef(); - _xNameContainer = XNameContainerRef(); - _xPropertySet = XPropertySetRef(); - } - */ } } commit 0fd6fa15a9fc29874ceaa0c3369787a56486937c Author: Tor Lillqvist <t...@collabora.com> Date: Thu Feb 1 20:48:10 2018 +0200 Don't crash if aArgs is empty Change-Id: Icaa09de92fb25583f35139632fa8453e5fa4dd85 (cherry picked from commit ef3d1bf9e35d4753c52883137e07236ce8617f2f) diff --git a/sw/source/ui/vba/vbaglobals.cxx b/sw/source/ui/vba/vbaglobals.cxx index 9fd6514aaf7c..bfb9ffadcf07 100644 --- a/sw/source/ui/vba/vbaglobals.cxx +++ b/sw/source/ui/vba/vbaglobals.cxx @@ -36,12 +36,14 @@ using namespace ::ooo::vba; SwVbaGlobals::SwVbaGlobals( uno::Sequence< uno::Any > const& aArgs, uno::Reference< uno::XComponentContext >const& rxContext ) : SwVbaGlobals_BASE( uno::Reference< XHelperInterface >(), rxContext, "WordDocumentContext" ) { SAL_INFO("sw.vba", "SwVbaGlobals::SwVbaGlobals()"); - uno::Sequence< beans::PropertyValue > aInitArgs( 2 ); + uno::Sequence< beans::PropertyValue > aInitArgs( aArgs.getLength() + 1 ); aInitArgs[ 0 ].Name = "Application"; aInitArgs[ 0 ].Value <<= getApplication(); - aInitArgs[ 1 ].Name = "WordDocumentContext"; - aInitArgs[ 1 ].Value <<= getXSomethingFromArgs< frame::XModel >( aArgs, 0 ); - + if ( aArgs.getLength() > 0 ) + { + aInitArgs[ 1 ].Name = "WordDocumentContext"; + aInitArgs[ 1 ].Value <<= getXSomethingFromArgs< frame::XModel >( aArgs, 0 ); + } init( aInitArgs ); } commit d219c6e3b21be03945b9bb5f4f69a15584e3f9d4 Author: Tor Lillqvist <t...@collabora.com> Date: Thu Feb 1 16:44:43 2018 +0200 Use more specific tag in SAL_INFO and SAL_WARN here Surely we shouldn't be using the very generic "sw" for such a feature-specific part of the Writer code. Change-Id: Id8913b9121a419f5da1f46a552fab95c903a3b13 (cherry picked from commit 8bc49ff1c28dd07d7eb191a895fa5e95c51d6898) diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox index 3858ea12175b..a3e25b8fea27 100644 --- a/include/sal/log-areas.dox +++ b/include/sal/log-areas.dox @@ -518,6 +518,7 @@ certain functionality. @li @c sw.tiled @li @c sw.ui @li @c sw.uno - Writer UNO interfaces +@li @c sw.vba - Writer VBA @li @c sw.ww8 - .doc/.docx export filter, .doc import filter (not writerfilter) @li @c sw.ww8.level2 - further info for sw.ww8 @li @c sw.xml - Writer .odt import/export diff --git a/sw/source/ui/vba/service.cxx b/sw/source/ui/vba/service.cxx index 3864993f0ed5..583d1051b18f 100644 --- a/sw/source/ui/vba/service.cxx +++ b/sw/source/ui/vba/service.cxx @@ -31,7 +31,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL vbaswobj_component_getFactory( void* pRet = sdecl::component_getFactoryHelper(pImplName, {&globals::serviceDecl, &::document::serviceDecl, &wrapformat::serviceDecl, &vbaeventshelper::serviceDecl} ); - SAL_INFO("sw", "Ret is " << pRet); + SAL_INFO("sw.vba", "Ret is " << pRet); return pRet; } diff --git a/sw/source/ui/vba/vbaaddins.cxx b/sw/source/ui/vba/vbaaddins.cxx index 59092cc3bd5f..af69cfe3f844 100644 --- a/sw/source/ui/vba/vbaaddins.cxx +++ b/sw/source/ui/vba/vbaaddins.cxx @@ -35,7 +35,7 @@ static uno::Reference< container::XIndexAccess > lcl_getAddinCollection( const u SvtPathOptions aPathOpt; // FIXME: temporary the STARTUP path is located in $OO/basic3.1/program/addin OUString aAddinPath = aPathOpt.GetAddinPath(); - SAL_INFO("sw", "lcl_getAddinCollection: " << aAddinPath ); + SAL_INFO("sw.vba", "lcl_getAddinCollection: " << aAddinPath ); if( xSFA->isFolder( aAddinPath ) ) { uno::Sequence< OUString > sEntries = xSFA->getFolderContents( aAddinPath, false ); diff --git a/sw/source/ui/vba/vbadocument.cxx b/sw/source/ui/vba/vbadocument.cxx index cc4cc4bb5541..aa4849a6ab8e 100644 --- a/sw/source/ui/vba/vbadocument.cxx +++ b/sw/source/ui/vba/vbadocument.cxx @@ -477,7 +477,7 @@ SwVbaDocument::getIntrospection( ) uno::Any SAL_CALL SwVbaDocument::invoke( const OUString& aFunctionName, const uno::Sequence< uno::Any >& /*aParams*/, uno::Sequence< ::sal_Int16 >& /*aOutParamIndex*/, uno::Sequence< uno::Any >& /*aOutParam*/ ) { - SAL_INFO("sw", "** will barf " << aFunctionName ); + SAL_INFO("sw.vba", "** will barf " << aFunctionName ); throw uno::RuntimeException(); // unsupported operation } diff --git a/sw/source/ui/vba/vbadocumentproperties.cxx b/sw/source/ui/vba/vbadocumentproperties.cxx index 2b31ebe73992..625c46e0e1e2 100644 --- a/sw/source/ui/vba/vbadocumentproperties.cxx +++ b/sw/source/ui/vba/vbadocumentproperties.cxx @@ -300,7 +300,7 @@ public: } catch (const uno::Exception&) { - SAL_WARN("sw", "Got exception"); + SAL_WARN("sw.vba", "Got exception"); } uno::Any aReturn; if ( rPropName == "LineCount" ) // special processing needed @@ -837,7 +837,7 @@ public: virtual sal_Bool SAL_CALL hasByName( const OUString& aName ) override { - SAL_INFO("sw", "hasByName(" << aName << ") returns " << mxUserDefinedProp->getPropertySetInfo()->hasPropertyByName( aName ) ); + SAL_INFO("sw.vba", "hasByName(" << aName << ") returns " << mxUserDefinedProp->getPropertySetInfo()->hasPropertyByName( aName ) ); return mxUserDefinedProp->getPropertySetInfo()->hasPropertyByName( aName ); } @@ -855,13 +855,13 @@ public: virtual uno::Reference< container::XEnumeration > SAL_CALL createEnumeration( ) override { // create a map of properties ( the key doesn't matter ) - SAL_INFO("sw", "Creating an enumeration"); + SAL_INFO("sw.vba", "Creating an enumeration"); sal_Int32 key = 0; sal_Int32 nElem = getCount(); DocProps simpleDocPropSnapShot; for ( ; key < nElem; ++key ) simpleDocPropSnapShot[ key ].set( getByIndex( key ), uno::UNO_QUERY_THROW ); - SAL_INFO("sw", "After creating the enumeration"); + SAL_INFO("sw.vba", "After creating the enumeration"); return new DocPropEnumeration( simpleDocPropSnapShot ); } diff --git a/sw/source/ui/vba/vbafield.cxx b/sw/source/ui/vba/vbafield.cxx index 3e35953f5547..b60245621f5d 100644 --- a/sw/source/ui/vba/vbafield.cxx +++ b/sw/source/ui/vba/vbafield.cxx @@ -317,7 +317,7 @@ SwVbaFields::Add( const css::uno::Reference< ::ooo::vba::word::XRange >& Range, { SwVbaReadFieldParams aReadParam(sText); sFieldName = aReadParam.GetFieldName(); - SAL_INFO("sw", "the field name is " << sFieldName ); + SAL_INFO("sw.vba", "the field name is " << sFieldName ); } uno::Reference< text::XTextContent > xTextField; @@ -430,7 +430,7 @@ uno::Reference< text::XTextField > SwVbaFields::Create_Field_DocProperty( const } } aDocProperty = aDocProperty.replaceAll("\"", ""); - SAL_INFO("sw", "SwVbaFields::Create_Field_DocProperty, the document property name is " << aDocProperty ); + SAL_INFO("sw.vba", "SwVbaFields::Create_Field_DocProperty, the document property name is " << aDocProperty ); if( aDocProperty.isEmpty() ) { throw uno::RuntimeException(); diff --git a/sw/source/ui/vba/vbaglobals.cxx b/sw/source/ui/vba/vbaglobals.cxx index 92a385cc34a9..9fd6514aaf7c 100644 --- a/sw/source/ui/vba/vbaglobals.cxx +++ b/sw/source/ui/vba/vbaglobals.cxx @@ -35,7 +35,7 @@ using namespace ::ooo::vba; SwVbaGlobals::SwVbaGlobals( uno::Sequence< uno::Any > const& aArgs, uno::Reference< uno::XComponentContext >const& rxContext ) : SwVbaGlobals_BASE( uno::Reference< XHelperInterface >(), rxContext, "WordDocumentContext" ) { - SAL_INFO("sw", "SwVbaGlobals::SwVbaGlobals()"); + SAL_INFO("sw.vba", "SwVbaGlobals::SwVbaGlobals()"); uno::Sequence< beans::PropertyValue > aInitArgs( 2 ); aInitArgs[ 0 ].Name = "Application"; aInitArgs[ 0 ].Value <<= getApplication(); @@ -47,7 +47,7 @@ SwVbaGlobals::SwVbaGlobals( uno::Sequence< uno::Any > const& aArgs, uno::Refere SwVbaGlobals::~SwVbaGlobals() { - SAL_INFO("sw", "SwVbaGlobals::~SwVbaGlobals"); + SAL_INFO("sw.vba", "SwVbaGlobals::~SwVbaGlobals"); } // XGlobals @@ -55,7 +55,7 @@ SwVbaGlobals::~SwVbaGlobals() uno::Reference<word::XApplication > const & SwVbaGlobals::getApplication() { - SAL_INFO("sw", "In SwVbaGlobals::getApplication"); + SAL_INFO("sw.vba", "In SwVbaGlobals::getApplication"); if ( !mxApplication.is() ) mxApplication.set( new SwVbaApplication( mxContext) ); diff --git a/sw/source/ui/vba/vbalisthelper.cxx b/sw/source/ui/vba/vbalisthelper.cxx index e0775ced187b..cc14183fc813 100644 --- a/sw/source/ui/vba/vbalisthelper.cxx +++ b/sw/source/ui/vba/vbalisthelper.cxx @@ -81,7 +81,7 @@ void SwVbaListHelper::Init() // get the numbering style uno::Reference< style::XStyleFamiliesSupplier > xStyleSupplier( mxTextDocument, uno::UNO_QUERY_THROW ); mxStyleFamily.set( xStyleSupplier->getStyleFamilies()->getByName("NumberingStyles"), uno::UNO_QUERY_THROW ); - SAL_INFO("sw", "numbering style name: " << msStyleName ); + SAL_INFO("sw.vba", "numbering style name: " << msStyleName ); if( mxStyleFamily->hasByName( msStyleName ) ) { mxStyleProps.set( mxStyleFamily->getByName( msStyleName ), uno::UNO_QUERY_THROW ); diff --git a/sw/source/ui/vba/vbastyles.cxx b/sw/source/ui/vba/vbastyles.cxx index e24bb18ed567..5dddfd9c7bdf 100644 --- a/sw/source/ui/vba/vbastyles.cxx +++ b/sw/source/ui/vba/vbastyles.cxx @@ -339,7 +339,7 @@ SwVbaStyles::Item( const uno::Any& Index1, const uno::Any& Index2 ) } else { - SAL_WARN("sw", "the builtin style type is not implemented"); + SAL_WARN("sw.vba", "the builtin style type is not implemented"); throw uno::RuntimeException("Not implemented" ); } } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits