summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-03-22 09:24:15 +0200
committerNoel Grandin <noel@peralex.com>2013-04-08 13:53:04 +0200
commitb248624126c271c88381d3dad6e04fc954f65779 (patch)
tree989f9131b865ea470ced1317834b91de06efd9e4 /sw
parentc68b934cd03e60ab6e0579108089b0e834ac47ad (diff)
fdo#46808, Convert frame::Frame to new style
Change-Id: I74427d1e0059808f04960c648b93245b06c20f7f
Diffstat (limited to 'sw')
-rw-r--r--sw/source/ui/dbui/dbtablepreviewdialog.cxx16
-rw-r--r--sw/source/ui/dbui/dbtablepreviewdialog.hxx4
-rw-r--r--sw/source/ui/envelp/mailmrge.cxx34
-rw-r--r--sw/source/ui/inc/mailmrge.hxx4
4 files changed, 22 insertions, 36 deletions
diff --git a/sw/source/ui/dbui/dbtablepreviewdialog.cxx b/sw/source/ui/dbui/dbtablepreviewdialog.cxx
index e150f8912c4c..f9d2dafe17c7 100644
--- a/sw/source/ui/dbui/dbtablepreviewdialog.cxx
+++ b/sw/source/ui/dbui/dbtablepreviewdialog.cxx
@@ -20,9 +20,7 @@
#include <swtypes.hxx>
#include <dbtablepreviewdialog.hxx>
#include <comphelper/processfactory.hxx>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/frame/XDispatchProvider.hpp>
-#include <com/sun/star/frame/XFrame.hpp>
+#include <com/sun/star/frame/Frame.hpp>
#include <toolkit/unohlp.hxx>
#include <dbui.hrc>
@@ -67,13 +65,8 @@ SwDBTablePreviewDialog::SwDBTablePreviewDialog(Window* pParent, uno::Sequence< b
try
{
// create a frame wrapper for myself
- uno::Reference< lang::XMultiServiceFactory >
- xMgr = comphelper::getProcessServiceFactory();
- m_xFrame = uno::Reference< frame::XFrame >(xMgr->createInstance("com.sun.star.frame.Frame"), uno::UNO_QUERY);
- if(m_xFrame.is())
- {
- m_xFrame->initialize( VCLUnoHelper::GetInterface ( m_pBeamerWIN ) );
- }
+ m_xFrame = frame::Frame::create( comphelper::getProcessComponentContext() );
+ m_xFrame->initialize( VCLUnoHelper::GetInterface( m_pBeamerWIN ) );
}
catch (uno::Exception const &)
{
@@ -81,10 +74,9 @@ SwDBTablePreviewDialog::SwDBTablePreviewDialog(Window* pParent, uno::Sequence< b
}
if(m_xFrame.is())
{
- uno::Reference<frame::XDispatchProvider> xDP(m_xFrame, uno::UNO_QUERY);
util::URL aURL;
aURL.Complete = ".component:DB/DataSourceBrowser";
- uno::Reference<frame::XDispatch> xD = xDP->queryDispatch(aURL, "", 0x0C);
+ uno::Reference<frame::XDispatch> xD = m_xFrame->queryDispatch(aURL, "", 0x0C);
if(xD.is())
{
xD->dispatch(aURL, rValues);
diff --git a/sw/source/ui/dbui/dbtablepreviewdialog.hxx b/sw/source/ui/dbui/dbtablepreviewdialog.hxx
index 5d58ef83a9fe..826a9fd78604 100644
--- a/sw/source/ui/dbui/dbtablepreviewdialog.hxx
+++ b/sw/source/ui/dbui/dbtablepreviewdialog.hxx
@@ -26,7 +26,7 @@
namespace com{ namespace sun{ namespace star{
namespace beans{ struct PropertyValue; }
- namespace frame{ class XFrame; }
+ namespace frame{ class XFrame2; }
}}}
class SwDBTablePreviewDialog : public SfxModalDialog
@@ -35,7 +35,7 @@ class SwDBTablePreviewDialog : public SfxModalDialog
Window* m_pBeamerWIN;
OKButton m_aOK;
- ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > m_xFrame;
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame2 > m_xFrame;
public:
SwDBTablePreviewDialog(Window* pParent,
::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& rValues );
diff --git a/sw/source/ui/envelp/mailmrge.cxx b/sw/source/ui/envelp/mailmrge.cxx
index d6c235048c78..077ad274273d 100644
--- a/sw/source/ui/envelp/mailmrge.cxx
+++ b/sw/source/ui/envelp/mailmrge.cxx
@@ -42,19 +42,20 @@
#include <sfx2/docfile.hxx>
#include <sfx2/docfilt.hxx>
#include <comphelper/sequenceashashmap.hxx>
-#include <com/sun/star/ui/dialogs/FolderPicker.hpp>
#include <com/sun/star/frame/XDispatchProvider.hpp>
+#include <com/sun/star/container/XChild.hpp>
+#include <com/sun/star/container/XContainerQuery.hpp>
+#include <com/sun/star/container/XEnumeration.hpp>
+#include <com/sun/star/form/runtime/XFormController.hpp>
+#include <com/sun/star/frame/Frame.hpp>
#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
#include <com/sun/star/sdbcx/XRowLocate.hpp>
#include <com/sun/star/sdb/XResultSetAccess.hpp>
#include <com/sun/star/sdbc/XDataSource.hpp>
+#include <com/sun/star/ui/dialogs/FolderPicker.hpp>
#include <toolkit/unohlp.hxx>
#include <comphelper/processfactory.hxx>
-#include <com/sun/star/form/runtime/XFormController.hpp>
#include <cppuhelper/implbase1.hxx>
-#include <com/sun/star/container/XChild.hpp>
-#include <com/sun/star/container/XContainerQuery.hpp>
-#include <com/sun/star/container/XEnumeration.hpp>
#include <unomid.h>
@@ -267,24 +268,17 @@ SwMailMergeDlg::SwMailMergeDlg(Window* pParent, SwWrtShell& rShell,
try
{
// create a frame wrapper for myself
- uno::Reference< XMultiServiceFactory >
- xMgr = comphelper::getProcessServiceFactory();
- xFrame = uno::Reference< XFrame >(xMgr->createInstance("com.sun.star.frame.Frame"), UNO_QUERY);
- if(xFrame.is())
- {
- xFrame->initialize( VCLUnoHelper::GetInterface ( pBeamerWin ) );
- }
+ m_xFrame = frame::Frame::create( comphelper::getProcessComponentContext() );
}
catch (const Exception&)
{
- xFrame.clear();
+ m_xFrame.clear();
}
- if(xFrame.is())
+ if(m_xFrame.is())
{
- uno::Reference<XDispatchProvider> xDP(xFrame, UNO_QUERY);
URL aURL;
aURL.Complete = ".component:DB/DataSourceBrowser";
- uno::Reference<XDispatch> xD = xDP->queryDispatch(aURL,
+ uno::Reference<XDispatch> xD = m_xFrame->queryDispatch(aURL,
"",
0x0C);
if(xD.is())
@@ -300,7 +294,7 @@ SwMailMergeDlg::SwMailMergeDlg(Window* pParent, SwWrtShell& rShell,
xD->dispatch(aURL, aProperties);
pBeamerWin->Show();
}
- uno::Reference<XController> xController = xFrame->getController();
+ uno::Reference<XController> xController = m_xFrame->getController();
pImpl->xFController = uno::Reference<runtime::XFormController>(xController, UNO_QUERY);
if(pImpl->xFController.is())
{
@@ -452,10 +446,10 @@ SwMailMergeDlg::SwMailMergeDlg(Window* pParent, SwWrtShell& rShell,
SwMailMergeDlg::~SwMailMergeDlg()
{
- if(xFrame.is())
+ if(m_xFrame.is())
{
- xFrame->setComponent(NULL, NULL);
- xFrame->dispose();
+ m_xFrame->setComponent(NULL, NULL);
+ m_xFrame->dispose();
}
else
delete pBeamerWin;
diff --git a/sw/source/ui/inc/mailmrge.hxx b/sw/source/ui/inc/mailmrge.hxx
index e170af00f748..e3ebd534ac3c 100644
--- a/sw/source/ui/inc/mailmrge.hxx
+++ b/sw/source/ui/inc/mailmrge.hxx
@@ -39,7 +39,7 @@ class SwXSelChgLstnr_Impl;
struct SwMailMergeDlg_Impl;
namespace com{namespace sun{namespace star{
namespace frame{
- class XFrame;
+ class XFrame2;
}
namespace sdbc{
class XResultSet;
@@ -110,7 +110,7 @@ class SwMailMergeDlg : public SvxStandardDialog
sal_uInt16 nMergeType;
::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > m_aSelection;
- ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > xFrame;
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame2 > m_xFrame;
Size m_aDialogSize;
OUString m_sSaveFilter;