From 117fdb9898dcc379b4f83437e858c57fd1d11911 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Wed, 21 Nov 2012 22:21:40 +0100 Subject: convert users of XDocumentInfo to XDocumentProperties Change-Id: I10f395f90d554d0ec26fe9f2654ae839e21c7ee5 --- filter/source/msfilter/msvbahelper.cxx | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'filter') diff --git a/filter/source/msfilter/msvbahelper.cxx b/filter/source/msfilter/msvbahelper.cxx index be76c32806a6..cdfa730bdbeb 100644 --- a/filter/source/msfilter/msvbahelper.cxx +++ b/filter/source/msfilter/msvbahelper.cxx @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include @@ -127,11 +126,13 @@ SfxObjectShell* findShellForUrl( const rtl::OUString& sMacroURLOrPath ) if ( sMacroURLOrPath.endsWithIgnoreAsciiCaseAsciiL( ".dot", 4 ) ) { - uno::Reference< document::XDocumentInfoSupplier > xDocInfoSupp( xModel, uno::UNO_QUERY ); - if( xDocInfoSupp.is() ) + uno::Reference const + xDocPropSupp(xModel, uno::UNO_QUERY); + if (xDocPropSupp.is()) { - uno::Reference< document::XDocumentPropertiesSupplier > xDocPropSupp( xDocInfoSupp->getDocumentInfo(), uno::UNO_QUERY_THROW ); - uno::Reference< document::XDocumentProperties > xDocProps( xDocPropSupp->getDocumentProperties(), uno::UNO_QUERY_THROW ); + uno::Reference< document::XDocumentProperties > const + xDocProps(xDocPropSupp->getDocumentProperties(), + uno::UNO_QUERY_THROW); rtl::OUString sCurrName = xDocProps->getTemplateName(); if( sMacroURLOrPath.lastIndexOf( sCurrName ) >= 0 ) { @@ -391,8 +392,8 @@ MacroResolvedInfo resolveVBAMacro( SfxObjectShell* pShell, const rtl::OUString& if ( xPrjNameCache.is() ) { // is this document created from a template? - uno::Reference< document::XDocumentInfoSupplier > xDocInfoSupp( pShell->GetModel(), uno::UNO_QUERY_THROW ); - uno::Reference< document::XDocumentPropertiesSupplier > xDocPropSupp( xDocInfoSupp->getDocumentInfo(), uno::UNO_QUERY_THROW ); + uno::Reference< document::XDocumentPropertiesSupplier > const + xDocPropSupp(pShell->GetModel(), uno::UNO_QUERY_THROW); uno::Reference< document::XDocumentProperties > xDocProps( xDocPropSupp->getDocumentProperties(), uno::UNO_QUERY_THROW ); rtl::OUString sCreatedFrom = xDocProps->getTemplateURL(); -- cgit