summaryrefslogtreecommitdiff
path: root/basctl/source/dlged/dlged.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'basctl/source/dlged/dlged.cxx')
-rw-r--r--basctl/source/dlged/dlged.cxx14
1 files changed, 8 insertions, 6 deletions
diff --git a/basctl/source/dlged/dlged.cxx b/basctl/source/dlged/dlged.cxx
index 326098976d87..324d7d829153 100644
--- a/basctl/source/dlged/dlged.cxx
+++ b/basctl/source/dlged/dlged.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -46,9 +47,7 @@
#include <svl/itempool.hxx>
#include <sfx2/viewfrm.hxx>
-#ifndef _SVX_SVXIDS_HRC
#include <svx/svxids.hrc>
-#endif
#include <svx/svdpagv.hxx>
#include <xmlscript/xml_helper.hxx>
#include <xmlscript/xmldlg_imexp.hxx>
@@ -205,7 +204,7 @@ BOOL DlgEditor::RemarkDialog()
//----------------------------------------------------------------------------
-DlgEditor::DlgEditor()
+DlgEditor::DlgEditor( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xModel )
:pHScroll(NULL)
,pVScroll(NULL)
,pDlgEdModel(NULL)
@@ -227,6 +226,7 @@ DlgEditor::DlgEditor()
,bCreateOK(TRUE)
,bDialogModelChanged(FALSE)
,mnPaintGuard(0)
+ ,m_xDocument( xModel )
{
pDlgEdModel = new DlgEdModel();
pDlgEdModel->GetItemPool().FreezeIdRanges();
@@ -835,7 +835,7 @@ void DlgEditor::Copy()
Reference< beans::XPropertySet > xProps( ::comphelper::getProcessServiceFactory(), UNO_QUERY );
OSL_ASSERT( xProps.is() );
OSL_VERIFY( xProps->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultContext")) ) >>= xContext );
- Reference< XInputStreamProvider > xISP = ::xmlscript::exportDialogModel( xClipDialogModel, xContext );
+ Reference< XInputStreamProvider > xISP = ::xmlscript::exportDialogModel( xClipDialogModel, xContext, m_xDocument );
Reference< XInputStream > xStream( xISP->createInputStream() );
Sequence< sal_Int8 > DialogModelBytes;
implCopyStreamToByteSequence( xStream, DialogModelBytes );
@@ -868,7 +868,7 @@ void DlgEditor::Copy()
uno::Reference< resource::XStringResourceManager >
xStringResourceManager( xStringResourcePersistence, uno::UNO_QUERY );
LocalizationMgr::resetResourceForDialog( xClipDialogModel, xStringResourceManager );
- Reference< XInputStreamProvider > xISP2 = ::xmlscript::exportDialogModel( xClipDialogModel, xContext );
+ Reference< XInputStreamProvider > xISP2 = ::xmlscript::exportDialogModel( xClipDialogModel, xContext, m_xDocument );
Reference< XInputStream > xStream2( xISP2->createInputStream() );
Sequence< sal_Int8 > NoResourceDialogModelBytes;
implCopyStreamToByteSequence( xStream2, NoResourceDialogModelBytes );
@@ -1014,7 +1014,7 @@ void DlgEditor::Paste()
Reference< beans::XPropertySet > xProps( xMSF, UNO_QUERY );
OSL_ASSERT( xProps.is() );
OSL_VERIFY( xProps->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultContext")) ) >>= xContext );
- ::xmlscript::importDialogModel( ::xmlscript::createInputStream( *((::rtl::ByteSequence*)(&DialogModelBytes)) ) , xClipDialogModel, xContext );
+ ::xmlscript::importDialogModel( ::xmlscript::createInputStream( rtl::ByteSequence(DialogModelBytes.getArray(), DialogModelBytes.getLength()) ) , xClipDialogModel, xContext, m_xDocument );
}
// get control models from clipboard dialog model
@@ -1421,3 +1421,5 @@ bool DlgEditor::AdjustPageSize()
}
//----------------------------------------------------------------------------
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */