summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui/app
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 /dbaccess/source/ui/app
parentc68b934cd03e60ab6e0579108089b0e834ac47ad (diff)
fdo#46808, Convert frame::Frame to new style
Change-Id: I74427d1e0059808f04960c648b93245b06c20f7f
Diffstat (limited to 'dbaccess/source/ui/app')
-rw-r--r--dbaccess/source/ui/app/AppDetailPageHelper.cxx39
-rw-r--r--dbaccess/source/ui/app/AppDetailPageHelper.hxx4
2 files changed, 21 insertions, 22 deletions
diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.cxx b/dbaccess/source/ui/app/AppDetailPageHelper.cxx
index 62ef52daf496..c7a23ad41f70 100644
--- a/dbaccess/source/ui/app/AppDetailPageHelper.cxx
+++ b/dbaccess/source/ui/app/AppDetailPageHelper.cxx
@@ -25,30 +25,30 @@
#include "tabletree.hxx"
#include "UITools.hxx"
#include "dbtreelistbox.hxx"
-#include <com/sun/star/frame/XLayoutManager.hpp>
-#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/awt/XTabController.hpp>
-#include <com/sun/star/sdbc/XConnection.hpp>
-#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
-#include <com/sun/star/sdbcx/XViewsSupplier.hpp>
-#include <com/sun/star/frame/XFrame.hpp>
+#include <com/sun/star/awt/XWindow.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/container/XChild.hpp>
+#include <com/sun/star/container/XContainer.hpp>
+#include <com/sun/star/form/XLoadable.hpp>
+#include <com/sun/star/frame/XLayoutManager.hpp>
+#include <com/sun/star/frame/Frame.hpp>
#include <com/sun/star/frame/FrameSearchFlag.hpp>
#include <com/sun/star/frame/XComponentLoader.hpp>
#include <com/sun/star/frame/XFrames.hpp>
#include <com/sun/star/frame/XFramesSupplier.hpp>
-#include <com/sun/star/awt/XWindow.hpp>
-#include <toolkit/helper/vclunohelper.hxx>
-#include <com/sun/star/ucb/XCommandEnvironment.hpp>
-#include <com/sun/star/ucb/XCommandProcessor.hpp>
-#include <com/sun/star/ucb/Command.hpp>
-#include <com/sun/star/form/XLoadable.hpp>
-#include <com/sun/star/container/XChild.hpp>
-#include <com/sun/star/container/XContainer.hpp>
#include <com/sun/star/sdb/CommandType.hpp>
-#include <com/sun/star/util/XCloseable.hpp>
#include <com/sun/star/sdb/application/XDatabaseDocumentUI.hpp>
#include <com/sun/star/sdb/application/DatabaseObject.hpp>
#include <com/sun/star/sdb/application/DatabaseObjectContainer.hpp>
+#include <com/sun/star/sdbc/XConnection.hpp>
+#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
+#include <com/sun/star/sdbcx/XViewsSupplier.hpp>
+#include <com/sun/star/ucb/XCommandEnvironment.hpp>
+#include <com/sun/star/ucb/XCommandProcessor.hpp>
+#include <com/sun/star/ucb/Command.hpp>
+#include <com/sun/star/util/XCloseable.hpp>
+#include <toolkit/helper/vclunohelper.hxx>
#include "AppView.hxx"
#include "dbaccess_helpid.hrc"
#include "dbu_app.hrc"
@@ -1141,20 +1141,19 @@ void OAppDetailPageHelper::showPreview( const OUString& _sDataSourceName,
{
try
{
- m_xFrame = Reference < XFrame > ( getBorderWin().getView()->getORB()->getServiceManager()->createInstanceWithContext( OUString("com.sun.star.frame.Frame"), getBorderWin().getView()->getORB() ), UNO_QUERY );
+ m_xFrame = Frame::create( getBorderWin().getView()->getORB() );
m_xFrame->initialize( m_xWindow );
// no layout manager (and thus no toolbars) in the preview
// Must be called after initialize ... but before any other call to this frame.
// Otherwise frame throws "life time exceptions" as e.g. NON_INITIALIZED
- Reference< XPropertySet > xFrameProps( m_xFrame, UNO_QUERY_THROW );
- xFrameProps->setPropertyValue( OUString( "LayoutManager" ), makeAny(Reference< XLayoutManager >()) );
+ m_xFrame->setLayoutManager( Reference< XLayoutManager >() );
Reference<XFramesSupplier> xSup(getBorderWin().getView()->getAppController().getXController()->getFrame(),UNO_QUERY);
if ( xSup.is() )
{
Reference<XFrames> xFrames = xSup->getFrames();
- xFrames->append(m_xFrame);
+ xFrames->append( Reference<XFrame>(m_xFrame,UNO_QUERY_THROW));
}
}
catch(const Exception&)
@@ -1169,7 +1168,7 @@ void OAppDetailPageHelper::showPreview( const OUString& _sDataSourceName,
xApplication, NULL, _bTable
) );
SAL_WNODEPRECATED_DECLARATIONS_POP
- pDispatcher->setTargetFrame( m_xFrame );
+ pDispatcher->setTargetFrame( Reference<XFrame>(m_xFrame,UNO_QUERY_THROW) );
::comphelper::NamedValueCollection aArgs;
aArgs.put( "Preview", sal_True );
diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.hxx b/dbaccess/source/ui/app/AppDetailPageHelper.hxx
index 486ca96a8baa..3f8df99c8240 100644
--- a/dbaccess/source/ui/app/AppDetailPageHelper.hxx
+++ b/dbaccess/source/ui/app/AppDetailPageHelper.hxx
@@ -37,7 +37,7 @@
#include <memory>
namespace com{ namespace sun { namespace star { namespace awt { class XWindow; } } } }
-namespace com{ namespace sun { namespace star { namespace frame { class XFrame; } } } }
+namespace com{ namespace sun { namespace star { namespace frame { class XFrame2; } } } }
namespace com{ namespace sun { namespace star { namespace io { class XPersist; } } } }
#define ELEMENT_COUNT size_t(E_ELEMENT_TYPE_COUNT)
@@ -90,7 +90,7 @@ namespace dbaui
Window* m_pTablePreview;
::std::auto_ptr<PopupMenu> m_aMenu;
PreviewMode m_ePreviewMode;
- ::com::sun::star::uno::Reference < ::com::sun::star::frame::XFrame >
+ ::com::sun::star::uno::Reference < ::com::sun::star::frame::XFrame2 >
m_xFrame;
::com::sun::star::uno::Reference < ::com::sun::star::io::XPersist >
m_xDocInfo;