summaryrefslogtreecommitdiff
path: root/oox/source/ole/vbacontrol.cxx
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2011-03-18 15:38:26 +0100
committerJan Holesovsky <kendy@suse.cz>2011-03-18 15:38:26 +0100
commit62abc842160313fbcdee8ff46c6b4fae6321f21d (patch)
treee64848c660027d77782a046e5da55d827c2e4b29 /oox/source/ole/vbacontrol.cxx
parentaf9cd95a2499e602887352c833d3ac52ce9670f2 (diff)
parentc08aba6a410bd7e85095a485486dcfb5bb6612b8 (diff)
Merge remote-tracking branch 'origin/integration/dev300_m101'
Conflicts: binfilter/bf_forms/source/component/forms_Filter.cxx binfilter/bf_sw/source/core/inc/node2lay.hxx binfilter/bf_sw/source/filter/xml/sw_swxml.cxx binfilter/inc/bf_sw/swdbtoolsclient.hxx filter/source/xsltdialog/xmlfileview.cxx oox/source/ole/axcontrol.cxx oox/source/vml/vmlformatting.cxx oox/source/xls/autofiltercontext.cxx oox/source/xls/externallinkfragment.cxx oox/source/xls/formulaparser.cxx oox/source/xls/pivotcachebuffer.cxx oox/source/xls/pivotcachefragment.cxx oox/source/xls/sheetdatacontext.cxx writerfilter/source/dmapper/GraphicImport.cxx writerfilter/source/dmapper/SettingsTable.cxx writerfilter/source/ooxml/model.xml
Diffstat (limited to 'oox/source/ole/vbacontrol.cxx')
-rw-r--r--oox/source/ole/vbacontrol.cxx25
1 files changed, 13 insertions, 12 deletions
diff --git a/oox/source/ole/vbacontrol.cxx b/oox/source/ole/vbacontrol.cxx
index da1ee608a471..209f646a05ed 100644
--- a/oox/source/ole/vbacontrol.cxx
+++ b/oox/source/ole/vbacontrol.cxx
@@ -39,13 +39,12 @@
#include <xmlscript/xmldlg_imexp.hxx>
#include "oox/helper/attributelist.hxx"
#include "oox/helper/binaryinputstream.hxx"
+#include "oox/helper/containerhelper.hxx"
#include "oox/helper/propertymap.hxx"
#include "oox/helper/propertyset.hxx"
#include "oox/helper/storagebase.hxx"
#include "oox/helper/textinputstream.hxx"
#include "oox/ole/vbahelper.hxx"
-#include "properties.hxx"
-#include "tokens.hxx"
namespace oox {
namespace ole {
@@ -795,20 +794,23 @@ bool lclEatKeyword( OUString& rCodeLine, const OUString& rKeyword )
// ----------------------------------------------------------------------------
-VbaUserForm::VbaUserForm( const Reference< XMultiServiceFactory >& rxGlobalFactory,
+VbaUserForm::VbaUserForm( const Reference< XComponentContext >& rxContext,
const Reference< XModel >& rxDocModel, const GraphicHelper& rGraphicHelper, bool bDefaultColorBgr ) :
- mxGlobalFactory( rxGlobalFactory ),
+ mxCompContext( rxContext ),
mxDocModel( rxDocModel ),
maConverter( rxDocModel, rGraphicHelper, bDefaultColorBgr )
{
- OSL_ENSURE( mxGlobalFactory.is(), "VbaUserForm::VbaUserForm - missing service factory" );
+ OSL_ENSURE( mxCompContext.is(), "VbaUserForm::VbaUserForm - missing component context" );
+ OSL_ENSURE( mxDocModel.is(), "VbaUserForm::VbaUserForm - missing document model" );
}
-void VbaUserForm::importForm( const Reference< XModel >& rxDocModel, const Reference< XNameContainer >& rxDialogLib,
- StorageBase& rVbaFormStrg, const OUString& rModuleName, rtl_TextEncoding eTextEnc )
+void VbaUserForm::importForm(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& rxDocModel,
+ const Reference< XNameContainer >& rxDialogLib,
+ StorageBase& rVbaFormStrg, const OUString& rModuleName, rtl_TextEncoding eTextEnc )
{
OSL_ENSURE( rxDialogLib.is(), "VbaUserForm::importForm - missing dialog library" );
- if( !mxGlobalFactory.is() || !mxDocModel.is() || !rxDialogLib.is() )
+ if( !mxCompContext.is() || !mxDocModel.is() || !rxDialogLib.is() )
return;
// check that the '03VBFrame' stream exists, this is required for forms
@@ -866,16 +868,15 @@ void VbaUserForm::importForm( const Reference< XModel >& rxDocModel, const Refer
{
// create the dialog model
OUString aServiceName = mxCtrlModel->getServiceName();
- Reference< XControlModel > xDialogModel( mxGlobalFactory->createInstance( aServiceName ), UNO_QUERY_THROW );
+ Reference< XMultiServiceFactory > xFactory( mxCompContext->getServiceManager(), UNO_QUERY_THROW );
+ Reference< XControlModel > xDialogModel( xFactory->createInstance( aServiceName ), UNO_QUERY_THROW );
Reference< XNameContainer > xDialogNC( xDialogModel, UNO_QUERY_THROW );
// convert properties and embedded controls
if( convertProperties( xDialogModel, maConverter, 0 ) )
{
// export the dialog to XML and insert it into the dialog library
- PropertySet aFactoryProps( mxGlobalFactory );
- Reference< XComponentContext > xCompContext( aFactoryProps.getAnyProperty( PROP_DefaultContext ), UNO_QUERY_THROW );
- Reference< XInputStreamProvider > xDialogSource( ::xmlscript::exportDialogModel( xDialogNC, xCompContext, rxDocModel ), UNO_SET_THROW );
+ Reference< XInputStreamProvider > xDialogSource( ::xmlscript::exportDialogModel( xDialogNC, mxCompContext, rxDocModel ), UNO_SET_THROW );
OSL_ENSURE( !rxDialogLib->hasByName( aFormName ), "VbaUserForm::importForm - multiple dialogs with equal name" );
ContainerHelper::insertByName( rxDialogLib, aFormName, Any( xDialogSource ) );
}