[Libreoffice-commits] core.git: 10 commits - basctl/source chart2/source comphelper/source cui/source dbaccess/source embedserv/source extensions/source framework/inc framework/source offapi/com offapi/type_reference offapi/UnoApi_offapi.mk reportdesign/source sc/source sd/source sfx2/inc sfx2/source slideshow/source svtools/inc svtools/source svx/inc svx/source sw/source udkapi/com udkapi/UnoApi_udkapi.mk UnoControls/source

Noel Grandin noel at peralex.com
Mon Apr 8 04:53:44 PDT 2013


 UnoControls/source/controls/framecontrol.cxx                 |   54 +---
 UnoControls/source/inc/framecontrol.hxx                      |    4 
 basctl/source/dlged/propbrw.cxx                              |   16 -
 basctl/source/inc/propbrw.hxx                                |    8 
 chart2/source/controller/main/ShapeToolbarController.cxx     |    6 
 chart2/source/controller/main/ShapeToolbarController.hxx     |    2 
 comphelper/source/property/opropertybag.cxx                  |   30 +-
 comphelper/source/property/opropertybag.hxx                  |   21 +
 cui/source/dialogs/insdlg.cxx                                |   20 -
 dbaccess/source/core/dataaccess/ModelImpl.cxx                |   13 
 dbaccess/source/core/dataaccess/ModelImpl.hxx                |    4 
 dbaccess/source/core/dataaccess/connection.cxx               |    5 
 dbaccess/source/core/dataaccess/datasource.cxx               |    2 
 dbaccess/source/ui/app/AppDetailPageHelper.cxx               |   39 +-
 dbaccess/source/ui/app/AppDetailPageHelper.hxx               |    4 
 dbaccess/source/ui/control/toolboxcontroller.cxx             |   21 +
 dbaccess/source/ui/inc/querycontainerwindow.hxx              |    6 
 dbaccess/source/ui/inc/toolboxcontroller.hxx                 |    2 
 dbaccess/source/ui/querydesign/limitboxcontroller.cxx        |   15 -
 dbaccess/source/ui/querydesign/limitboxcontroller.hxx        |    2 
 dbaccess/source/ui/querydesign/querycontainerwindow.cxx      |   14 -
 dbaccess/source/ui/querydesign/querycontroller.cxx           |    2 
 embedserv/source/embed/docholder.cxx                         |  129 +++------
 embedserv/source/inc/docholder.hxx                           |    6 
 extensions/source/nsplugin/source/so_instance.cxx            |   14 -
 extensions/source/nsplugin/source/so_instance.hxx            |    5 
 framework/inc/macros/xtypeprovider.hxx                       |   28 ++
 framework/inc/services.h                                     |    2 
 framework/inc/services/frame.hxx                             |   54 ++--
 framework/inc/services/taskcreatorsrv.hxx                    |   10 
 framework/inc/uielement/addonstoolbarmanager.hxx             |    3 
 framework/inc/uielement/buttontoolbarcontroller.hxx          |    5 
 framework/inc/uielement/comboboxtoolbarcontroller.hxx        |    2 
 framework/inc/uielement/complextoolbarcontroller.hxx         |    2 
 framework/inc/uielement/dropdownboxtoolbarcontroller.hxx     |    2 
 framework/inc/uielement/edittoolbarcontroller.hxx            |    2 
 framework/inc/uielement/generictoolbarcontroller.hxx         |    4 
 framework/inc/uielement/imagebuttontoolbarcontroller.hxx     |    2 
 framework/inc/uielement/popupmenucontroller.hxx              |    2 
 framework/inc/uielement/spinfieldtoolbarcontroller.hxx       |    2 
 framework/inc/uielement/togglebuttontoolbarcontroller.hxx    |    2 
 framework/inc/uielement/toolbarmanager.hxx                   |    5 
 framework/inc/uielement/toolbarmerger.hxx                    |    4 
 framework/source/services/frame.cxx                          |   69 ++++-
 framework/source/services/taskcreatorsrv.cxx                 |   16 -
 framework/source/uielement/addonstoolbarmanager.cxx          |   18 -
 framework/source/uielement/addonstoolbarwrapper.cxx          |    2 
 framework/source/uielement/buttontoolbarcontroller.cxx       |   16 -
 framework/source/uielement/comboboxtoolbarcontroller.cxx     |   14 -
 framework/source/uielement/complextoolbarcontroller.cxx      |   17 -
 framework/source/uielement/dropdownboxtoolbarcontroller.cxx  |    4 
 framework/source/uielement/edittoolbarcontroller.cxx         |    4 
 framework/source/uielement/generictoolbarcontroller.cxx      |   25 +
 framework/source/uielement/imagebuttontoolbarcontroller.cxx  |    4 
 framework/source/uielement/popupmenucontroller.cxx           |   16 -
 framework/source/uielement/spinfieldtoolbarcontroller.cxx    |    4 
 framework/source/uielement/togglebuttontoolbarcontroller.cxx |    4 
 framework/source/uielement/toolbarmanager.cxx                |   49 +--
 framework/source/uielement/toolbarmerger.cxx                 |   23 -
 framework/source/uielement/toolbarwrapper.cxx                |    2 
 offapi/UnoApi_offapi.mk                                      |    8 
 offapi/com/sun/star/embed/MSOLEObjectSystemCreator.idl       |   37 ++
 offapi/com/sun/star/form/FormComponent.idl                   |    4 
 offapi/com/sun/star/frame/Frame.idl                          |  119 ---------
 offapi/com/sun/star/frame/XFrame2.idl                        |  145 +++++++++++
 offapi/com/sun/star/sdb/tools/ConnectionTools.idl            |   36 ++
 offapi/com/sun/star/xforms/XForms.idl                        |   38 ++
 offapi/type_reference/types.rdb                              |binary
 reportdesign/source/ui/inc/propbrw.hxx                       |    9 
 reportdesign/source/ui/inc/toolboxcontroller.hxx             |    2 
 reportdesign/source/ui/misc/toolboxcontroller.cxx            |    6 
 reportdesign/source/ui/report/DesignView.cxx                 |    2 
 reportdesign/source/ui/report/propbrw.cxx                    |   28 --
 sc/source/ui/view/viewfun5.cxx                               |    6 
 sd/source/ui/controller/slidelayoutcontroller.cxx            |    9 
 sd/source/ui/controller/slidelayoutcontroller.hxx            |    4 
 sd/source/ui/view/sdview3.cxx                                |    6 
 sfx2/inc/sfx2/tbxctrl.hxx                                    |    1 
 sfx2/inc/sfx2/templateinfodlg.hxx                            |    4 
 sfx2/source/appl/newhelp.cxx                                 |   39 +-
 sfx2/source/appl/newhelp.hxx                                 |   13 
 sfx2/source/appl/sfxhelp.cxx                                 |   16 -
 sfx2/source/bastyp/fltlst.cxx                                |   15 -
 sfx2/source/dialog/partwnd.cxx                               |   44 +--
 sfx2/source/dialog/recfloat.cxx                              |    2 
 sfx2/source/dialog/templateinfodlg.cxx                       |   13 
 sfx2/source/doc/SfxDocumentMetaData.cxx                      |   26 -
 sfx2/source/doc/iframe.cxx                                   |   18 -
 sfx2/source/inc/iframe.hxx                                   |    9 
 sfx2/source/inet/inettbc.cxx                                 |   19 -
 sfx2/source/toolbox/tbxitem.cxx                              |    7 
 sfx2/source/view/frame2.cxx                                  |    6 
 slideshow/source/engine/shapes/viewappletshape.cxx           |   11 
 slideshow/source/engine/shapes/viewappletshape.hxx           |    4 
 svtools/inc/svtools/generictoolboxcontroller.hxx             |    2 
 svtools/inc/svtools/popupwindowcontroller.hxx                |    2 
 svtools/inc/svtools/toolboxcontroller.hxx                    |   16 -
 svtools/source/contnr/templwin.cxx                           |   27 --
 svtools/source/contnr/templwin.hxx                           |    6 
 svtools/source/uno/generictoolboxcontroller.cxx              |   16 -
 svtools/source/uno/popupwindowcontroller.cxx                 |    4 
 svtools/source/uno/toolboxcontroller.cxx                     |   45 +--
 svx/inc/tbunocontroller.hxx                                  |    3 
 svx/inc/tbunosearchcontrollers.hxx                           |    8 
 svx/source/form/fmPropBrw.cxx                                |   62 +---
 svx/source/inc/fmPropBrw.hxx                                 |    9 
 svx/source/tbxctrls/extrusioncontrols.cxx                    |   24 -
 svx/source/tbxctrls/extrusioncontrols.hxx                    |    8 
 svx/source/tbxctrls/fontworkgallery.cxx                      |   16 -
 svx/source/tbxctrls/tbunocontroller.cxx                      |   14 -
 svx/source/tbxctrls/tbunosearchcontrollers.cxx               |   32 +-
 sw/source/core/doc/docxforms.cxx                             |   12 
 sw/source/filter/xml/swxml.cxx                               |   22 -
 sw/source/ui/dbui/dbtablepreviewdialog.cxx                   |   16 -
 sw/source/ui/dbui/dbtablepreviewdialog.hxx                   |    4 
 sw/source/ui/dochdl/swdtflvr.cxx                             |    6 
 sw/source/ui/envelp/mailmrge.cxx                             |   34 +-
 sw/source/ui/inc/mailmrge.hxx                                |    4 
 sw/source/ui/misc/glossary.cxx                               |    5 
 udkapi/UnoApi_udkapi.mk                                      |    3 
 udkapi/com/sun/star/beans/PropertyBag.idl                    |   17 -
 udkapi/com/sun/star/beans/XPropertyBag.idl                   |   49 +++
 122 files changed, 1093 insertions(+), 941 deletions(-)

New commits:
commit b248624126c271c88381d3dad6e04fc954f65779
Author: Noel Grandin <noel at peralex.com>
Date:   Fri Mar 22 09:24:15 2013 +0200

    fdo#46808, Convert frame::Frame to new style
    
    Change-Id: I74427d1e0059808f04960c648b93245b06c20f7f

diff --git a/UnoControls/source/controls/framecontrol.cxx b/UnoControls/source/controls/framecontrol.cxx
index 27afd5d..c2bfcde 100644
--- a/UnoControls/source/controls/framecontrol.cxx
+++ b/UnoControls/source/controls/framecontrol.cxx
@@ -19,12 +19,13 @@
 
 #include "framecontrol.hxx"
 
+#include <com/sun/star/beans/PropertyAttribute.hpp>
+#include <com/sun/star/frame/Frame.hpp>
+#include <com/sun/star/frame/FrameSearchFlag.hpp>
 #include <com/sun/star/frame/XDispatchProvider.hpp>
+#include <com/sun/star/frame/XDispatch.hpp>
 #include <com/sun/star/util/URLTransformer.hpp>
 #include <com/sun/star/util/XURLTransformer.hpp>
-#include <com/sun/star/frame/XDispatch.hpp>
-#include <com/sun/star/frame/FrameSearchFlag.hpp>
-#include <com/sun/star/beans/PropertyAttribute.hpp>
 #include <comphelper/processfactory.hxx>
 #include <cppuhelper/typeprovider.hxx>
 #include <osl/diagnose.h>
@@ -459,8 +460,8 @@ void FrameControl::impl_createFrame(    const   Reference< XWindowPeer >&   xPee
                                         const   OUString&                   rURL        ,
                                         const   Sequence< PropertyValue >&  rArguments  )
 {
-    Reference< XFrame >     xOldFrame   ;
-    Reference< XFrame >     xNewFrame   ;
+    Reference< XFrame2 >     xOldFrame   ;
+    Reference< XFrame2 >     xNewFrame   ;
 
     {
         MutexGuard  aGuard ( m_aMutex ) ;
@@ -469,29 +470,24 @@ void FrameControl::impl_createFrame(    const   Reference< XWindowPeer >&   xPee
 
 
 
-    xNewFrame = Reference< XFrame >  ( impl_getComponentContext()->getServiceManager()->createInstanceWithContext("com.sun.star.frame.Frame", impl_getComponentContext()), UNO_QUERY ) ;
-    Reference< XDispatchProvider >  xDSP ( xNewFrame, UNO_QUERY ) ;
+    xNewFrame = Frame::create( impl_getComponentContext() );
 
-    if (xDSP.is())
-    {
-        Reference< XWindow >  xWP ( xPeer, UNO_QUERY ) ;
-        xNewFrame->initialize ( xWP ) ;
-
-        //  option
-        //xFrame->setName( "WhatYouWant" );
+    Reference< XWindow >  xWP ( xPeer, UNO_QUERY ) ;
+    xNewFrame->initialize ( xWP ) ;
 
-        Reference< XURLTransformer > xTrans = URLTransformer::create( impl_getComponentContext() );
-        // load file
-        URL aURL ;
+    //  option
+    //xFrame->setName( "WhatYouWant" );
 
-        aURL.Complete = rURL ;
-        xTrans->parseStrict( aURL ) ;
+    Reference< XURLTransformer > xTrans = URLTransformer::create( impl_getComponentContext() );
+    // load file
+    URL aURL ;
+    aURL.Complete = rURL ;
+    xTrans->parseStrict( aURL ) ;
 
-        Reference< XDispatch >  xDisp = xDSP->queryDispatch ( aURL, OUString (), FrameSearchFlag::SELF ) ;
-        if (xDisp.is())
-        {
-            xDisp->dispatch ( aURL, rArguments ) ;
-        }
+    Reference< XDispatch >  xDisp = xNewFrame->queryDispatch ( aURL, OUString (), FrameSearchFlag::SELF ) ;
+    if (xDisp.is())
+    {
+        xDisp->dispatch ( aURL, rArguments ) ;
     }
 
     // set the frame
@@ -519,20 +515,20 @@ void FrameControl::impl_createFrame(    const   Reference< XWindowPeer >&   xPee
 
 void FrameControl::impl_deleteFrame()
 {
-    Reference< XFrame >  xOldFrame;
-    Reference< XFrame >  xNullFrame;
+    Reference< XFrame2 >  xOldFrame;
+    Reference< XFrame2 >  xNullFrame;
 
     {
         // do not dispose the frame in this guarded section (deadlock?)
         MutexGuard aGuard( m_aMutex );
         xOldFrame = m_xFrame;
-        m_xFrame = Reference< XFrame > ();
+        m_xFrame = Reference< XFrame2 > ();
     }
 
     // notify the listeners
     sal_Int32 nFrameId = PROPERTYHANDLE_FRAME;
-    Any aNewFrame( &xNullFrame, ::getCppuType((const Reference< XFrame >*)0) );
-    Any aOldFrame( &xOldFrame, ::getCppuType((const Reference< XFrame >*)0) );
+    Any aNewFrame( &xNullFrame, ::getCppuType((const Reference< XFrame2 >*)0) );
+    Any aOldFrame( &xOldFrame, ::getCppuType((const Reference< XFrame2 >*)0) );
     fire( &nFrameId, &aNewFrame, &aOldFrame, 1, sal_False );
 
     // dispose the frame
diff --git a/UnoControls/source/inc/framecontrol.hxx b/UnoControls/source/inc/framecontrol.hxx
index 96086a6..8da8c67 100644
--- a/UnoControls/source/inc/framecontrol.hxx
+++ b/UnoControls/source/inc/framecontrol.hxx
@@ -22,7 +22,7 @@
 
 #include <com/sun/star/frame/XFrameActionListener.hpp>
 #include <com/sun/star/frame/XComponentLoader.hpp>
-#include <com/sun/star/frame/XFrame.hpp>
+#include <com/sun/star/frame/XFrame2.hpp>
 #include <com/sun/star/frame/FrameActionEvent.hpp>
 #include <com/sun/star/frame/FrameAction.hpp>
 #include <com/sun/star/lang/XServiceName.hpp>
@@ -593,7 +593,7 @@ private:
 
 private:
 
-    ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >         m_xFrame                    ;
+    ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame2 >        m_xFrame                    ;
     OUString                                        m_sComponentURL             ;
     ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >   m_seqLoaderArguments        ;
     ::cppu::OMultiTypeInterfaceContainerHelper      m_aInterfaceContainer       ;
diff --git a/basctl/source/dlged/propbrw.cxx b/basctl/source/dlged/propbrw.cxx
index a5f19ac..24ec2d7 100644
--- a/basctl/source/dlged/propbrw.cxx
+++ b/basctl/source/dlged/propbrw.cxx
@@ -28,6 +28,7 @@
 #include <svx/svxids.hrc>
 
 #include <com/sun/star/awt/PosSize.hpp>
+#include <com/sun/star/frame/Frame.hpp>
 #include <com/sun/star/inspection/XObjectInspector.hpp>
 #include <com/sun/star/lang/XServiceInfo.hpp>
 #include <comphelper/types.hxx>
@@ -85,7 +86,6 @@ DBG_NAME(PropBrw)
 PropBrw::PropBrw (DialogWindowLayout& rLayout_):
     DockingWindow(&rLayout_),
     m_bInitialStateChange(true),
-    m_xORB(comphelper::getProcessServiceFactory()),
     m_xContextDocument(SfxViewShell::Current() ? SfxViewShell::Current()->GetCurrentDocument() : Reference<XModel>()),
     rLayout(rLayout_),
     pView(0)
@@ -99,12 +99,9 @@ PropBrw::PropBrw (DialogWindowLayout& rLayout_):
     try
     {
         // create a frame wrapper for myself
-        m_xMeAsFrame = Reference< XFrame >(m_xORB->createInstance( "com.sun.star.frame.Frame" ), UNO_QUERY);
-        if (m_xMeAsFrame.is())
-        {
-            m_xMeAsFrame->initialize( VCLUnoHelper::GetInterface ( this ) );
-            m_xMeAsFrame->setName( "form property browser" );  // change name!
-        }
+        m_xMeAsFrame = frame::Frame::create( comphelper::getProcessComponentContext() );
+        m_xMeAsFrame->initialize( VCLUnoHelper::GetInterface ( this ) );
+        m_xMeAsFrame->setName( "form property browser" );  // change name!
     }
     catch (const Exception&)
     {
@@ -127,8 +124,7 @@ void PropBrw::ImplReCreateController()
 
     try
     {
-        Reference< XComponentContext > xOwnContext(
-            comphelper::getComponentContext( m_xORB ) );
+        Reference< XComponentContext > xOwnContext = comphelper::getProcessComponentContext();
 
         // a ComponentContext for the
         ::cppu::ContextEntry_Init aHandlerContextInfo[] =
@@ -160,7 +156,7 @@ void PropBrw::ImplReCreateController()
             }
             else
             {
-                xAsXController->attachFrame(m_xMeAsFrame);
+                xAsXController->attachFrame( Reference<XFrame>(m_xMeAsFrame,UNO_QUERY_THROW) );
                 m_xBrowserComponentWindow = m_xMeAsFrame->getComponentWindow();
                 DBG_ASSERT(m_xBrowserComponentWindow.is(), "PropBrw::PropBrw: attached the controller, but have no component window!");
             }
diff --git a/basctl/source/inc/propbrw.hxx b/basctl/source/inc/propbrw.hxx
index fe00cdd..76020e6 100644
--- a/basctl/source/inc/propbrw.hxx
+++ b/basctl/source/inc/propbrw.hxx
@@ -21,6 +21,7 @@
 #define BASCTL_PROPBRW_HXX
 
 #include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/frame/XFrame2.hpp>
 #include <comphelper/stl_types.hxx>
 #include <svl/lstner.hxx>
 #include <svl/brdcst.hxx>
@@ -30,9 +31,6 @@
 class SfxBindings;
 class SdrView;
 class SfxViewShell;
-namespace com { namespace sun { namespace star { namespace lang {
-    class XMultiServiceFactory;
-}}}}
 
 namespace basctl
 {
@@ -44,9 +42,7 @@ class PropBrw : public DockingWindow, public SfxListener, public SfxBroadcaster
 private:
     bool        m_bInitialStateChange;
 
-    ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >
-                    m_xORB;
-    ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >
+    ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame2 >
                     m_xMeAsFrame;
     ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >
                     m_xBrowserController;
diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.cxx b/dbaccess/source/ui/app/AppDetailPageHelper.cxx
index 62ef52d..c7a23ad 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 486ca96..3f8df99 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;
diff --git a/dbaccess/source/ui/inc/querycontainerwindow.hxx b/dbaccess/source/ui/inc/querycontainerwindow.hxx
index 749493e..5fab032 100644
--- a/dbaccess/source/ui/inc/querycontainerwindow.hxx
+++ b/dbaccess/source/ui/inc/querycontainerwindow.hxx
@@ -23,7 +23,7 @@
 #include <vcl/window.hxx>
 #include <vcl/split.hxx>
 #include "dataview.hxx"
-#include <com/sun/star/frame/XFrame.hpp>
+#include <com/sun/star/frame/XFrame2.hpp>
 #include "QueryViewSwitch.hxx"
 #include <vcl/dockwin.hxx>
 
@@ -50,7 +50,7 @@ namespace dbaui
         OQueryViewSwitch*   m_pViewSwitch;
         OBeamer*            m_pBeamer;
         Splitter*           m_pSplitter;
-        ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > m_xBeamer;
+        ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame2 > m_xBeamer;
 
         DECL_LINK( SplitHdl, void* );
     public:
@@ -66,7 +66,7 @@ namespace dbaui
             // called when the beamer has been disposed
         void    disposingPreview();
 
-        ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >
+        ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame2 >
                 getPreviewFrame() const { return m_xBeamer; }
 
         OQueryDesignView*   getDesignView() { return m_pViewSwitch->getDesignView(); }
diff --git a/dbaccess/source/ui/querydesign/querycontainerwindow.cxx b/dbaccess/source/ui/querydesign/querycontainerwindow.cxx
index 07ef8b7..2c04309 100644
--- a/dbaccess/source/ui/querydesign/querycontainerwindow.cxx
+++ b/dbaccess/source/ui/querydesign/querycontainerwindow.cxx
@@ -28,8 +28,9 @@
 #include <sfx2/sfxsids.hrc>
 #include <vcl/fixed.hxx>
 #include "UITools.hxx"
-#include <com/sun/star/util/XCloseable.hpp>
 #include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/frame/Frame.hpp>
+#include <com/sun/star/util/XCloseable.hpp>
 
 //.........................................................................
 namespace dbaui
@@ -195,18 +196,13 @@ namespace dbaui
 
             ::dbaui::notifySystemWindow(this,m_pBeamer,::comphelper::mem_fun(&TaskPaneList::AddWindow));
 
-            Reference < XFrame > xBeamerFrame( m_pViewSwitch->getORB()->getServiceManager()->createInstanceWithContext(OUString("com.sun.star.frame.Frame"), m_pViewSwitch->getORB()),UNO_QUERY );
-            m_xBeamer.set( xBeamerFrame );
-            OSL_ENSURE(m_xBeamer.is(),"No frame created!");
+            m_xBeamer = Frame::create( m_pViewSwitch->getORB() );
             m_xBeamer->initialize( VCLUnoHelper::GetInterface ( m_pBeamer ) );
 
             // notify layout manager to not create internal toolbars
-            Reference < XPropertySet > xPropSet( xBeamerFrame, UNO_QUERY );
             try
             {
-                const OUString aLayoutManager( "LayoutManager" );
-                Reference < XPropertySet > xLMPropSet(xPropSet->getPropertyValue( aLayoutManager ),UNO_QUERY);
-
+                Reference < XPropertySet > xLMPropSet(m_xBeamer->getLayoutManager(), UNO_QUERY);
                 if ( xLMPropSet.is() )
                 {
                     const OUString aAutomaticToolbars( "AutomaticToolbars" );
@@ -222,7 +218,7 @@ namespace dbaui
             // append our frame
             Reference < XFramesSupplier > xSup(_xFrame,UNO_QUERY);
             Reference < XFrames > xFrames = xSup->getFrames();
-            xFrames->append( m_xBeamer );
+            xFrames->append( Reference<XFrame>(m_xBeamer,UNO_QUERY_THROW) );
 
             Size aSize = GetOutputSizePixel();
             Size aBeamer(aSize.Width(),sal_Int32(aSize.Height()*0.33));
diff --git a/dbaccess/source/ui/querydesign/querycontroller.cxx b/dbaccess/source/ui/querydesign/querycontroller.cxx
index ca36ffe..960c8a0 100644
--- a/dbaccess/source/ui/querydesign/querycontroller.cxx
+++ b/dbaccess/source/ui/querydesign/querycontroller.cxx
@@ -1192,7 +1192,7 @@ void SAL_CALL OQueryController::disposing( const EventObject& Source ) throw(Run
     {
         if ( Source.Source == m_aCurrentFrame.getFrame() )
         {   // our frame is being disposed -> close the preview window (if we have one)
-            Reference< XFrame > xPreviewFrame( getContainer()->getPreviewFrame() );
+            Reference< XFrame2 > xPreviewFrame( getContainer()->getPreviewFrame() );
             ::comphelper::disposeComponent( xPreviewFrame );
         }
         else if ( Source.Source == getContainer()->getPreviewFrame() )
diff --git a/embedserv/source/embed/docholder.cxx b/embedserv/source/embed/docholder.cxx
index e5a7511..e56f66f 100644
--- a/embedserv/source/embed/docholder.cxx
+++ b/embedserv/source/embed/docholder.cxx
@@ -30,36 +30,37 @@
 
 #include "common.h"
 #include <Windows.h>
-#include <com/sun/star/lang/SystemDependent.hpp>
+#include <com/sun/star/awt/XTopWindow.hpp>
+#include <com/sun/star/awt/PosSize.hpp>
+#include <com/sun/star/awt/XView.hpp>
 #include <com/sun/star/awt/Toolkit.hpp>
 #include <com/sun/star/awt/XSystemChildFactory.hpp>
 #include <com/sun/star/awt/XSystemDependentWindowPeer.hpp>
 #include <com/sun/star/awt/XSystemDependentMenuPeer.hpp>
-#include <com/sun/star/ui/XUIElement.hpp>
 #include <com/sun/star/awt/WindowAttribute.hpp>
 #include <com/sun/star/awt/XWindow.hpp>
-#include <com/sun/star/frame/XComponentLoader.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/util/XCloseBroadcaster.hpp>
-#include <com/sun/star/util/XCloseAble.hpp>
-#include <com/sun/star/container/XNameAccess.hpp>
 #include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/bridge/XBridgeSupplier2.hpp>
+#include <com/sun/star/bridge/ModelDependent.hpp>
+#include <com/sun/star/container/XNameAccess.hpp>
+#include <com/sun/star/document/MacroExecMode.hpp>
+#include <com/sun/star/embed/EmbedMapUnits.hpp>
+#include <com/sun/star/embed/XVisualObject.hpp>
+#include <com/sun/star/frame/XComponentLoader.hpp>
+#include <com/sun/star/frame/Frame.hpp>
 #include <com/sun/star/frame/XModel.hpp>
 #include <com/sun/star/frame/Desktop.hpp>
 #include <com/sun/star/frame/XFramesSupplier.hpp>
 #include <com/sun/star/frame/FrameSearchFlag.hpp>
 #include <com/sun/star/frame/XStatusListener.hpp>
-#include <com/sun/star/util/XModifyBroadcaster.hpp>
 #include <com/sun/star/frame/XDispatchProviderInterception.hpp>
-#include <com/sun/star/awt/XTopWindow.hpp>
-#include <com/sun/star/awt/PosSize.hpp>
-#include <com/sun/star/awt/XView.hpp>
-#include <com/sun/star/bridge/XBridgeSupplier2.hpp>
-#include <com/sun/star/bridge/ModelDependent.hpp>
-#include <com/sun/star/embed/EmbedMapUnits.hpp>
-#include <com/sun/star/embed/XVisualObject.hpp>
-#include <com/sun/star/document/MacroExecMode.hpp>
+#include <com/sun/star/lang/SystemDependent.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
 #include <com/sun/star/task/InteractionHandler.hpp>
+#include <com/sun/star/ui/XUIElement.hpp>
+#include <com/sun/star/util/XCloseBroadcaster.hpp>
+#include <com/sun/star/util/XCloseAble.hpp>
+#include <com/sun/star/util/XModifyBroadcaster.hpp>
 #include <comphelper/processfactory.hxx>
 #include <osl/diagnose.h>
 #include <rtl/process.h>
@@ -348,28 +349,12 @@ HRESULT DocumentHolder::InPlaceActivate(
             m_xFrame->activate();
         else {
             // create frame and initialize it with with the created window
-            static const OUString aFrameServiceName( "com.sun.star.frame.Frame" );
-            m_xFrame = uno::Reference<frame::XFrame>(
-                m_xFactory->createInstance(aFrameServiceName),
-                uno::UNO_QUERY);
-
-            if(!m_xFrame.is())
-                return ERROR;
-
+            m_xFrame = frame::Frame::create( m_xFactory );
             m_xFrame->initialize(m_xEditWindow);
 
-            uno::Reference<frame::XDispatchProviderInterception>
-                xDPI(m_xFrame,uno::UNO_QUERY);
-            if(xDPI.is())
-                xDPI->registerDispatchProviderInterceptor( CreateNewInterceptor() );
+            m_xFrame->registerDispatchProviderInterceptor( CreateNewInterceptor() );
 
-            uno::Reference<beans::XPropertySet> xPS(m_xFrame,uno::UNO_QUERY);
-            if( xPS.is() )
-            {
-                aAny = xPS->getPropertyValue(
-                    OUString("LayoutManager"));
-                aAny >>= m_xLayoutManager;
-            }
+            m_xLayoutManager.set( m_xFrame->getLayoutManager(), UNO_QUERY_THROW );
 
             if(m_xLayoutManager.is())
                 m_xLayoutManager->setDockingAreaAcceptor(this);
@@ -378,7 +363,7 @@ HRESULT DocumentHolder::InPlaceActivate(
             LoadDocInFrame( sal_True );
 
             uno::Reference< frame::XDesktop2 > xDesktop = frame::Desktop::create(comphelper::getComponentContext(m_xFactory));
-            xDesktop->getFrames()->append(m_xFrame);
+            xDesktop->getFrames()->append( uno::Reference<frame::XFrame>(m_xFrame, uno::UNO_QUERY_THROW) );
 
             // determine the menuhandle to get menutitems.
             if(m_xLayoutManager.is()) {
@@ -661,7 +646,7 @@ void DocumentHolder::DisconnectFrameDocument( sal_Bool bComplete )
 
     if ( bComplete )
     {
-        m_xFrame = uno::Reference< frame::XFrame>();
+        m_xFrame = uno::Reference<frame::XFrame2>();
         m_pIDispatch = NULL;
         m_xDocument = uno::Reference< frame::XModel >();
     }
@@ -709,12 +694,10 @@ void DocumentHolder::CloseFrame()
         catch( const uno::Exception& ) {
         }
     else {
-        uno::Reference<lang::XComponent> xComp(m_xFrame,uno::UNO_QUERY);
-        if(xComp.is())
-            xComp->dispose();
+        m_xFrame->dispose();
     }
 
-    m_xFrame = uno::Reference< frame::XFrame >();
+    m_xFrame = uno::Reference< frame::XFrame2 >();
 }
 
 void DocumentHolder::SetDocument( const uno::Reference< frame::XModel >& xDoc, sal_Bool bLink )
@@ -761,9 +744,7 @@ sal_Bool DocumentHolder::ExecuteSuspendCloseFrame()
                         xCloseable->close(sal_True);
                     else
                     {
-                        uno::Reference<lang::XComponent> xComp( m_xFrame, uno::UNO_QUERY_THROW );
-                        if( xComp.is() )
-                            xComp->dispose();
+                        m_xFrame->dispose();
                     }
                 }
                 catch( const util::CloseVetoException& )
@@ -777,13 +758,13 @@ sal_Bool DocumentHolder::ExecuteSuspendCloseFrame()
         {
         }
 
-        m_xFrame = uno::Reference< frame::XFrame >();
+        m_xFrame = uno::Reference< frame::XFrame2 >();
     }
 
     return sal_True;
 }
 
-uno::Reference< frame::XFrame > DocumentHolder::DocumentFrame()
+uno::Reference< frame::XFrame2 > DocumentHolder::DocumentFrame()
 {
     if(! m_xFrame.is() )
     {
@@ -795,8 +776,7 @@ uno::Reference< frame::XFrame > DocumentHolder::DocumentFrame()
         // is loaded into the frame in ::show() method the terminate listener will be removed
         // this is so only for outplace activation
         if( xFrame.is() )
-            m_xFrame = xFrame->findFrame(
-                OUString("_blank"),0);
+            m_xFrame = xFrame->findFrame( OUString("_blank"), 0 );
 
         uno::Reference< util::XCloseBroadcaster > xBroadcaster(
             m_xFrame, uno::UNO_QUERY );
@@ -811,10 +791,7 @@ uno::Reference< frame::XFrame > DocumentHolder::DocumentFrame()
     if( m_xFrame.is() )
     {
         // intercept
-        uno::Reference<frame::XDispatchProviderInterception>
-            xDPI(m_xFrame,uno::UNO_QUERY);
-        if(xDPI.is())
-            xDPI->registerDispatchProviderInterceptor( CreateNewInterceptor() );
+        m_xFrame->registerDispatchProviderInterceptor( CreateNewInterceptor() );
     }
 
     return m_xFrame;
@@ -868,17 +845,11 @@ void DocumentHolder::show()
             LoadDocInFrame( sal_False );
 
             // get rid of second closer if it is there
-            uno::Reference< beans::XPropertySet > xProps( m_xFrame, uno::UNO_QUERY );
-            if ( xProps.is() )
+            uno::Reference< beans::XPropertySet > xLMProps( m_xFrame->getLayoutManager(), uno::UNO_QUERY );
+            if ( xLMProps.is() )
             {
-                uno::Reference< frame::XLayoutManager > xLayoutManager;
-                xProps->getPropertyValue( OUString( "LayoutManager" ) ) >>= xLayoutManager;
-                uno::Reference< beans::XPropertySet > xLMProps( xLayoutManager, uno::UNO_QUERY );
-                if ( xLMProps.is() )
-                {
-                    xLMProps->setPropertyValue( OUString( "MenuBarCloser" ),
-                                                uno::makeAny( uno::Reference< frame::XStatusListener >() ) );
-                }
+                xLMProps->setPropertyValue( OUString( "MenuBarCloser" ),
+                                            uno::makeAny( uno::Reference< frame::XStatusListener >() ) );
             }
 
             if ( !m_bLink )
@@ -1007,24 +978,16 @@ void DocumentHolder::setTitle(const OUString& aDocumentName)
             }
         }
         // set the title
-        uno::Reference<beans::XPropertySet> xPropSet(
-            m_xFrame,uno::UNO_QUERY);
-        if(xPropSet.is()) {
-            uno::Any aAny;
-            static const sal_Unicode u[] = { ' ','(',0 };
-            static const sal_Unicode c[] = { ')',0 };
-            OUString aTotalName(m_aFilterName);
-            aTotalName += OUString(u);
-            aTotalName += aDocumentName;
-            aTotalName += OUString(c);
-            aAny <<= aTotalName;
-            try {
-                xPropSet->setPropertyValue(
-                    OUString("Title"),
-                    aAny);
-            }
-            catch( const uno::Exception& ) {
-            }
+        static const sal_Unicode u[] = { ' ','(',0 };
+        static const sal_Unicode c[] = { ')',0 };
+        rtl::OUString aTotalName(m_aFilterName);
+        aTotalName += rtl::OUString(u);
+        aTotalName += aDocumentName;
+        aTotalName += rtl::OUString(c);
+        try {
+            m_xFrame->setTitle( aTotalName );
+        }
+        catch( const uno::Exception& ) {
         }
     }
 
@@ -1383,7 +1346,7 @@ DocumentHolder::disposing(
     }
 
     if( m_xFrame.is() && m_xFrame == aSource.Source )
-        m_xFrame = uno::Reference< frame::XFrame >();
+        m_xFrame = uno::Reference< frame::XFrame2 >();
 }
 
 
@@ -1421,14 +1384,14 @@ DocumentHolder::notifyClosing(
         // can happen only in case of links
         m_pIDispatch = NULL;
         m_xDocument = uno::Reference< frame::XModel >();
-        m_xFrame = uno::Reference< frame::XFrame >();
+        m_xFrame = uno::Reference< frame::XFrame2 >();
 
         LockedEmbedDocument_Impl aDocLock = m_xOleAccess->GetEmbedDocument();
         if ( aDocLock.GetEmbedDocument() )
             aDocLock.GetEmbedDocument()->OLENotifyClosing();
     }
     else if( m_xFrame.is() && m_xFrame == aSource.Source )
-        m_xFrame = uno::Reference< frame::XFrame >();
+        m_xFrame = uno::Reference< frame::XFrame2 >();
 }
 
 void SAL_CALL
diff --git a/embedserv/source/inc/docholder.hxx b/embedserv/source/inc/docholder.hxx
index 61c6ef8..e4f72ee 100644
--- a/embedserv/source/inc/docholder.hxx
+++ b/embedserv/source/inc/docholder.hxx
@@ -25,7 +25,7 @@
 #include <com/sun/star/util/XCloseListener.hpp>
 #include <com/sun/star/frame/XTerminateListener.hpp>
 #include <com/sun/star/util/XModifyListener.hpp>
-#include <com/sun/star/frame/XFrame.hpp>
+#include <com/sun/star/frame/XFrame2.hpp>
 #include <com/sun/star/frame/XDispatchProviderInterceptor.hpp>
 #include <cppuhelper/implbase4.hxx>
 
@@ -90,7 +90,7 @@ private:
 
 
     ::com::sun::star::uno::Reference<
-    ::com::sun::star::frame::XFrame > m_xFrame;
+    ::com::sun::star::frame::XFrame2 > m_xFrame;
 
     OUString m_aContainerName,m_aDocumentNamePart,m_aFilterName;
 
@@ -100,7 +100,7 @@ private:
 
 
     ::com::sun::star::uno::Reference<
-    ::com::sun::star::frame::XFrame > DocumentFrame();
+    ::com::sun::star::frame::XFrame2 > DocumentFrame();
 
 
     ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProviderInterceptor >
diff --git a/extensions/source/nsplugin/source/so_instance.cxx b/extensions/source/nsplugin/source/so_instance.cxx
index 23cd49e..0045da3 100644
--- a/extensions/source/nsplugin/source/so_instance.cxx
+++ b/extensions/source/nsplugin/source/so_instance.cxx
@@ -31,6 +31,7 @@
 #include <com/sun/star/frame/Desktop.hpp>
 #include <com/sun/star/frame/DispatchHelper.hpp>
 #include <com/sun/star/frame/XDispatchProviderInterception.hpp>
+#include <com/sun/star/frame/Frame.hpp>
 #include <com/sun/star/lang/SystemDependent.hpp>
 #include <com/sun/star/awt/Toolkit.hpp>
 #include <com/sun/star/awt/XVclWindowPeer.hpp>
@@ -172,14 +173,7 @@ sal_Bool SoPluginInstance::LoadDocument(NSP_HWND hParent)
             m_nX, m_nY, m_nWidth, m_nHeight, m_nFlag);
 
         // create frame
-        m_xFrame = Reference< frame::XFrame >(
-            mxRemoteMSF->createInstance( OUString("com.sun.star.frame.Frame")),
-            uno::UNO_QUERY );
-        if (!m_xFrame.is())
-        {
-            debug_fprintf(NSP_LOG_APPEND, "can not create frame\n");
-            return sal_False;
-        }
+        m_xFrame = frame::Frame::create( xContext );
 
         // initialize frame
         m_xFrame->initialize( m_xUnoWin );
@@ -208,7 +202,7 @@ sal_Bool SoPluginInstance::LoadDocument(NSP_HWND hParent)
         }
 
         // append m_xFrame to m_xFrames
-        m_xFrames->append( m_xFrame );
+        m_xFrames->append( Reference<frame::XFrame>(m_xFrame, uno::UNO_QUERY_THROW) );
 
         // create XComponentLoader
         Reference< frame::XComponentLoader > xLoader( m_xFrame, uno::UNO_QUERY );
@@ -425,7 +419,7 @@ sal_Bool SoPluginInstance::Destroy(void)
 
     m_xUnoWin = Reference< awt::XWindow >();
     m_xComponent = Reference< XComponent >();
-    m_xFrame = Reference< frame::XFrame >();
+    m_xFrame = Reference< frame::XFrame2 >();
     m_xFrames = Reference< frame::XFrames >();
     m_xDispatcher = Reference< frame::XDispatchHelper >();
     m_xDispatchProvider = Reference< frame::XDispatchProvider >();
diff --git a/extensions/source/nsplugin/source/so_instance.hxx b/extensions/source/nsplugin/source/so_instance.hxx
index 1af9146..92b771e 100644
--- a/extensions/source/nsplugin/source/so_instance.hxx
+++ b/extensions/source/nsplugin/source/so_instance.hxx
@@ -37,6 +37,7 @@
 #include <com/sun/star/uno/XNamingService.hpp>
 #include <com/sun/star/connection/ConnectionSetupException.hpp>
 #include <com/sun/star/frame/XComponentLoader.hpp>
+#include <com/sun/star/frame/XLayoutManager.hpp>
 #include <com/sun/star/util/URL.hpp>
 #include <com/sun/star/frame/XStorable.hpp>
 #include <com/sun/star/io/XSeekable.hpp>
@@ -47,7 +48,7 @@
 #include <com/sun/star/awt/WindowDescriptor.hpp>
 #include <rtl/ustring.hxx>
 #include <com/sun/star/awt/XWindow.hpp>
-#include <com/sun/star/frame/XFrame.hpp>
+#include <com/sun/star/frame/XFrame2.hpp>
 #include <com/sun/star/frame/XDispatchHelper.hpp>
 
 #include "ns_debug.hxx"
@@ -77,7 +78,7 @@ private:
     // StarOffice component window
     ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > m_xComponent;
     // StarOffice frame for this Plugin
-    ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > m_xFrame;
+    ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame2 > m_xFrame;
     // Frames of StarOffice
     ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrames > m_xFrames;
     // Dispatcher of frame
diff --git a/framework/inc/macros/xtypeprovider.hxx b/framework/inc/macros/xtypeprovider.hxx
index 3de533f..85648a7 100644
--- a/framework/inc/macros/xtypeprovider.hxx
+++ b/framework/inc/macros/xtypeprovider.hxx
@@ -638,6 +638,34 @@ ________________________________________________________________________________
                                                                     ))                                                                                          \
                                         )
 
+//  implementation of XTypeProvider with 20 additional interfaces for getTypes()
+#define DEFINE_XTYPEPROVIDER_21( CLASS, TYPE1, TYPE2, TYPE3, TYPE4, TYPE5, TYPE6, TYPE7, TYPE8, TYPE9, TYPE10, TYPE11, TYPE12, TYPE13, TYPE14, TYPE15, TYPE16, TYPE17, TYPE18, TYPE19, TYPE20, TYPE21 ) \
+    PRIVATE_DEFINE_XTYPEPROVIDER_LARGE  (   CLASS,                                                                                                              \
+                                            (PRIVATE_DEFINE_TYPE_12 (   TYPE1   ,                                                                               \
+                                                                        TYPE2   ,                                                                               \
+                                                                        TYPE3   ,                                                                               \
+                                                                        TYPE4   ,                                                                               \
+                                                                        TYPE5   ,                                                                               \
+                                                                        TYPE6   ,                                                                               \
+                                                                        TYPE7   ,                                                                               \
+                                                                        TYPE8   ,                                                                               \
+                                                                        TYPE9   ,                                                                               \
+                                                                        TYPE10  ,                                                                               \
+                                                                        TYPE11  ,                                                                               \
+                                                                        TYPE12                                                                                  \
+                                                                    )),                                                                                         \
+                                            (PRIVATE_DEFINE_TYPE_9  (   TYPE13  ,                                                                               \
+                                                                        TYPE14  ,                                                                               \
+                                                                        TYPE15  ,                                                                               \
+                                                                        TYPE16  ,                                                                               \
+                                                                        TYPE17  ,                                                                               \
+                                                                        TYPE18  ,                                                                               \
+                                                                        TYPE19  ,                                                                               \
+                                                                        TYPE20  ,                                                                               \
+                                                                        TYPE21                                                                                  \
+                                                                    ))                                                                                          \
+                                        )
+
 //  implementation of XTypeProvider with 1 additional interface for getTypes() AND using 1 baseclass
 #define DEFINE_XTYPEPROVIDER_1_WITH_BASECLASS( CLASS, BASECLASS, TYPE1 )                                            \
     PRIVATE_DEFINE_XTYPEPROVIDER_BASECLASS  (   CLASS,                                                              \
diff --git a/framework/inc/services.h b/framework/inc/services.h
index 956568d..bf15026 100644
--- a/framework/inc/services.h
+++ b/framework/inc/services.h
@@ -28,7 +28,6 @@ namespace framework{
 //  used servicenames by framework
 //_________________________________________________________________________________________________________________
 
-#define SERVICENAME_FRAME                                       DECLARE_ASCII("com.sun.star.frame.Frame"                            )
 #define SERVICENAME_FRAMELOADERFACTORY                          DECLARE_ASCII("com.sun.star.frame.FrameLoaderFactory"               )
 #define SERVICENAME_FILTERFACTORY                               DECLARE_ASCII("com.sun.star.document.FilterFactory"                 )
 #define SERVICENAME_TYPEDETECTION                               DECLARE_ASCII("com.sun.star.document.TypeDetection"                 )
@@ -62,7 +61,6 @@ namespace framework{
 //  used implementationnames by framework
 //_________________________________________________________________________________________________________________
 
-#define IMPLEMENTATIONNAME_FRAME                                DECLARE_ASCII("com.sun.star.comp.framework.Frame"                   )
 #define IMPLEMENTATIONNAME_DESKTOP                              DECLARE_ASCII("com.sun.star.comp.framework.Desktop"                 )
 #define IMPLEMENTATIONNAME_URLTRANSFORMER                       DECLARE_ASCII("com.sun.star.comp.framework.URLTransformer"          )
 #define IMPLEMENTATIONNAME_GENERICFRAMELOADER                   DECLARE_ASCII("com.sun.star.comp.office.FrameLoader"                )
diff --git a/framework/inc/services/frame.hxx b/framework/inc/services/frame.hxx
index cc050cf..492c398 100644
--- a/framework/inc/services/frame.hxx
+++ b/framework/inc/services/frame.hxx
@@ -35,23 +35,6 @@
 #include <macros/xserviceinfo.hxx>
 #include <general.h>
 
-#include <com/sun/star/frame/XDispatchInformationProvider.hpp>
-#include <com/sun/star/frame/XComponentLoader.hpp>
-#include <com/sun/star/frame/XController.hpp>
-#include <com/sun/star/frame/XDispatch.hpp>
-#include <com/sun/star/frame/XDispatchProvider.hpp>
-#include <com/sun/star/frame/XDispatchRecorderSupplier.hpp>
-#include <com/sun/star/frame/XDispatchProviderInterception.hpp>
-#include <com/sun/star/frame/XDispatchProviderInterceptor.hpp>
-#include <com/sun/star/lang/XEventListener.hpp>
-#include <com/sun/star/frame/XFrame.hpp>
-#include <com/sun/star/frame/XFrameActionListener.hpp>
-#include <com/sun/star/frame/XFrames.hpp>
-#include <com/sun/star/frame/XFramesSupplier.hpp>
-#include <com/sun/star/frame/XTitle.hpp>
-#include <com/sun/star/frame/XTitleChangeBroadcaster.hpp>
-#include <com/sun/star/task/XStatusIndicator.hpp>
-#include <com/sun/star/task/XStatusIndicatorFactory.hpp>
 #include <com/sun/star/awt/XTopWindowListener.hpp>
 #include <com/sun/star/awt/XWindow.hpp>
 #include <com/sun/star/awt/XTopWindow.hpp>
@@ -60,8 +43,18 @@
 #include <com/sun/star/awt/FocusEvent.hpp>
 #include <com/sun/star/datatransfer/dnd/XDropTargetListener.hpp>
 #include <com/sun/star/document/XActionLockable.hpp>
-#include <com/sun/star/util/XCloseable.hpp>
+#include <com/sun/star/lang/XEventListener.hpp>
+#include <com/sun/star/frame/XComponentLoader.hpp>
+#include <com/sun/star/frame/XController.hpp>
+#include <com/sun/star/frame/XDispatch.hpp>
+#include <com/sun/star/frame/XDispatchProviderInterceptor.hpp>
+#include <com/sun/star/frame/XFrame2.hpp>
+#include <com/sun/star/frame/XFrameActionListener.hpp>
 #include <com/sun/star/frame/XLayoutManager.hpp>
+#include <com/sun/star/frame/XTitle.hpp>
+#include <com/sun/star/frame/XTitleChangeBroadcaster.hpp>
+#include <com/sun/star/task/XStatusIndicator.hpp>
+#include <com/sun/star/util/XCloseable.hpp>
 
 #include <unotools/cmdoptions.hxx>
 #include <cppuhelper/interfacecontainer.hxx>
@@ -111,11 +104,7 @@ class WindowCommandDispatch;
 class Frame :   // interfaces
                 public  css::lang::XTypeProvider                    ,
                 public  css::lang::XServiceInfo                     ,
-                public  css::frame::XFramesSupplier                 ,   // => XFrame => XComponent
-                public  css::frame::XDispatchProvider               ,
-                public  css::frame::XDispatchProviderInterception   ,
-                public  css::frame::XDispatchInformationProvider    ,
-                public  css::task::XStatusIndicatorFactory          ,
+                public  css::frame::XFrame2                         ,
                 public  css::awt::XWindowListener                   ,   // => XEventListener
                 public  css::awt::XTopWindowListener                ,
                 public  css::awt::XFocusListener                    ,
@@ -290,6 +279,19 @@ class Frame :   // interfaces
         virtual void SAL_CALL addTitleChangeListener   ( const css::uno::Reference< css::frame::XTitleChangeListener >& xListener) throw (css::uno::RuntimeException);
         virtual void SAL_CALL removeTitleChangeListener( const css::uno::Reference< css::frame::XTitleChangeListener >& xListenr ) throw (css::uno::RuntimeException);
 
+
+        //---------------------------------------------------------------------------------------------------------
+        //  XFrame2 attributes
+        //---------------------------------------------------------------------------------------------------------
+        virtual css::uno::Reference<css::container::XNameContainer> SAL_CALL getUserDefinedAttributes() throw (css::uno::RuntimeException);
+
+        virtual css::uno::Reference<css::frame::XDispatchRecorderSupplier> SAL_CALL getDispatchRecorderSupplier() throw (css::uno::RuntimeException);
+        virtual void SAL_CALL setDispatchRecorderSupplier(const css::uno::Reference<css::frame::XDispatchRecorderSupplier>&) throw (css::uno::RuntimeException);
+
+        virtual css::uno::Reference<css::uno::XInterface> SAL_CALL getLayoutManager() throw (css::uno::RuntimeException);
+        virtual void SAL_CALL setLayoutManager(const css::uno::Reference<css::uno::XInterface>&) throw (css::uno::RuntimeException);
+
+
         //---------------------------------------------------------------------------------------------------------
         //  PropertySetHelper => XPropertySet, XPropertySetInfo
         //---------------------------------------------------------------------------------------------------------
@@ -331,7 +333,7 @@ class Frame :   // interfaces
 
         // non threadsafe
         void                                                    impl_checkMenuCloser            (                                                                        );
-        void                                                    impl_setCloser                  ( const css::uno::Reference< css::frame::XFrame >&      xFrame           ,
+        void                                                    impl_setCloser                  ( const css::uno::Reference< css::frame::XFrame2 >&     xFrame           ,
                                                                                                         sal_Bool                                        bState           );
         void                                                    impl_disposeContainerWindow     (       css::uno::Reference< css::awt::XWindow >&       xWindow          );
         static const css::uno::Sequence< css::beans::Property > impl_getStaticPropertyDescriptor(                                                                        );
@@ -403,8 +405,8 @@ class Frame :   // interfaces
         SvtCommandOptions                                                       m_aCommandOptions                   ;   /// ref counted class to support disabling commands defined by configuration file
         sal_Bool                                                                m_bSelfClose                        ;   /// in case of CloseVetoException on method close() wqs thrown by ourself - we must close ourself later if no internal processes are running
         sal_Bool                                                                m_bIsHidden                         ;   /// indicates, if this frame is used in hidden mode or not
-        static css::uno::WeakReference< css::frame::XFrame >                    m_xCloserFrame                      ;   /// holds the only frame, which must show the special closer menu item (can be NULL!)
-        css::uno::Reference< ::com::sun::star::frame::XLayoutManager >    m_xLayoutManager                    ;   /// is used to layout the child windows of the frame.
+        static css::uno::WeakReference< css::frame::XFrame2 >                   m_xCloserFrame                      ;   /// holds the only frame, which must show the special closer menu item (can be NULL!)
+        css::uno::Reference< ::css::frame::XLayoutManager >    m_xLayoutManager                    ;   /// is used to layout the child windows of the frame.
         css::uno::Reference< css::frame::XDispatchInformationProvider >         m_xDispatchInfoHelper               ;
         css::uno::Reference< css::frame::XTitle >                               m_xTitleHelper                      ;
 
diff --git a/framework/inc/services/taskcreatorsrv.hxx b/framework/inc/services/taskcreatorsrv.hxx
index 2d80f43..68654e0 100644
--- a/framework/inc/services/taskcreatorsrv.hxx
+++ b/framework/inc/services/taskcreatorsrv.hxx
@@ -28,7 +28,7 @@
 #include <stdtypes.h>
 
 #include <com/sun/star/uno/XInterface.hpp>
-#include <com/sun/star/frame/XFrame.hpp>
+#include <com/sun/star/frame/XFrame2.hpp>
 #include <com/sun/star/lang/XTypeProvider.hpp>
 #include <com/sun/star/lang/XServiceInfo.hpp>
 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
@@ -132,14 +132,14 @@ class TaskCreatorService : public  css::lang::XTypeProvider
 
         void implts_applyDocStyleToWindow(const css::uno::Reference< css::awt::XWindow >& xWindow) const;
 
-        css::uno::Reference< css::frame::XFrame > implts_createFrame( const css::uno::Reference< css::frame::XFrame >& xParentFrame     ,
+        css::uno::Reference< css::frame::XFrame2 > implts_createFrame( const css::uno::Reference< css::frame::XFrame >& xParentFrame     ,
                                                                       const css::uno::Reference< css::awt::XWindow >&  xContainerWindow ,
                                                                       const OUString&                           sName            );
 
-        void implts_establishWindowStateListener( const css::uno::Reference< css::frame::XFrame >& xFrame );
-        void implts_establishTitleBarUpdate( const css::uno::Reference< css::frame::XFrame >& xFrame );
+        void implts_establishWindowStateListener( const css::uno::Reference< css::frame::XFrame2 >& xFrame );
+        void implts_establishTitleBarUpdate( const css::uno::Reference< css::frame::XFrame2 >& xFrame );
 
-        void implts_establishDocModifyListener( const css::uno::Reference< css::frame::XFrame >& xFrame );
+        void implts_establishDocModifyListener( const css::uno::Reference< css::frame::XFrame2 >& xFrame );
 
         OUString impl_filterNames( const OUString& sName );
 };
diff --git a/framework/source/services/frame.cxx b/framework/source/services/frame.cxx
index 6c6a32a..44d30d0 100644
--- a/framework/source/services/frame.cxx
+++ b/framework/source/services/frame.cxx
@@ -91,22 +91,23 @@
 
 namespace framework{
 
-css::uno::WeakReference< css::frame::XFrame > Frame::m_xCloserFrame = css::uno::WeakReference< css::frame::XFrame >();
+css::uno::WeakReference< css::frame::XFrame2 > Frame::m_xCloserFrame = css::uno::WeakReference< css::frame::XFrame2 >();
 
 //*****************************************************************************************************************
 //  XInterface, XTypeProvider, XServiceInfo
 //*****************************************************************************************************************
-DEFINE_XINTERFACE_21                (   Frame                                                                   ,
+DEFINE_XINTERFACE_22                (   Frame                                                                   ,
                                         OWeakObject                                                             ,
                                         DIRECT_INTERFACE(css::lang::XTypeProvider                               ),
                                         DIRECT_INTERFACE(css::lang::XServiceInfo                                ),
+                                        DIRECT_INTERFACE(css::frame::XFrame2                                    ),
                                         DIRECT_INTERFACE(css::frame::XFramesSupplier                            ),
                                         DIRECT_INTERFACE(css::frame::XFrame                                     ),
-                                        DIRECT_INTERFACE(css::lang::XComponent                                  ),
                                         DIRECT_INTERFACE(css::task::XStatusIndicatorFactory                     ),
                                         DIRECT_INTERFACE(css::frame::XDispatchProvider                          ),
                                         DIRECT_INTERFACE(css::frame::XDispatchInformationProvider               ),
                                         DIRECT_INTERFACE(css::frame::XDispatchProviderInterception              ),
+                                        DIRECT_INTERFACE(css::lang::XComponent                                  ),
                                         DIRECT_INTERFACE(css::beans::XPropertySet                               ),
                                         DIRECT_INTERFACE(css::beans::XPropertySetInfo                           ),
                                         DIRECT_INTERFACE(css::awt::XWindowListener                              ),
@@ -121,18 +122,19 @@ DEFINE_XINTERFACE_21                (   Frame
                                         DIRECT_INTERFACE(css::frame::XTitleChangeBroadcaster                    )
                                     )
 
-DEFINE_XTYPEPROVIDER_20             (   Frame                                                                   ,
+DEFINE_XTYPEPROVIDER_21             (   Frame                                                                   ,
                                         css::lang::XTypeProvider                                                ,
                                         css::lang::XServiceInfo                                                 ,
+                                        css::frame::XFrame2                                                     ,
                                         css::frame::XFramesSupplier                                             ,
                                         css::frame::XFrame                                                      ,
-                                        css::lang::XComponent                                                   ,
                                         css::task::XStatusIndicatorFactory                                      ,
-                                        css::beans::XPropertySet                                                ,
-                                        css::beans::XPropertySetInfo                                            ,
                                         css::frame::XDispatchProvider                                           ,
                                         css::frame::XDispatchInformationProvider                                ,
                                         css::frame::XDispatchProviderInterception                               ,
+                                        css::lang::XComponent                                                   ,
+                                        css::beans::XPropertySet                                                ,
+                                        css::beans::XPropertySetInfo                                            ,
                                         css::awt::XWindowListener                                               ,
                                         css::awt::XTopWindowListener                                            ,
                                         css::awt::XFocusListener                                                ,
@@ -146,8 +148,8 @@ DEFINE_XTYPEPROVIDER_20             (   Frame
 
 DEFINE_XSERVICEINFO_MULTISERVICE    (   Frame                                                                   ,
                                         ::cppu::OWeakObject                                                     ,
-                                        SERVICENAME_FRAME                                                       ,
-                                        IMPLEMENTATIONNAME_FRAME
+                                        "com.sun.star.frame.Frame"                                              ,
+                                        OUString("com.sun.star.comp.framework.Frame")
                                     )
 
 DEFINE_INIT_SERVICE                 (   Frame,
@@ -1735,6 +1737,47 @@ void SAL_CALL Frame::removeTitleChangeListener( const css::uno::Reference< css::
     xTitle->removeTitleChangeListener(xListener);
 }
 
+css::uno::Reference<css::container::XNameContainer> SAL_CALL Frame::getUserDefinedAttributes() throw (css::uno::RuntimeException)
+{
+    // optional attribute
+    return 0;
+}
+
+css::uno::Reference<css::frame::XDispatchRecorderSupplier> SAL_CALL Frame::getDispatchRecorderSupplier() throw (css::uno::RuntimeException)
+{
+    ReadGuard aReadLock( m_aLock );
+    return m_xDispatchRecorderSupplier;
+}
+
+void SAL_CALL Frame::setDispatchRecorderSupplier(const css::uno::Reference<css::frame::XDispatchRecorderSupplier>& p) throw (css::uno::RuntimeException)
+{
+    TransactionGuard aTransaction( m_aTransactionManager, E_HARDEXCEPTIONS );
+
+    /* SAFE { */
+        WriteGuard aWriteLock( m_aLock );
+            m_xDispatchRecorderSupplier.set(p);
+        aWriteLock.unlock();
+    /* } SAFE */
+}
+
+css::uno::Reference<css::uno::XInterface> SAL_CALL Frame::getLayoutManager() throw (css::uno::RuntimeException)
+{
+    ReadGuard aReadLock( m_aLock );
+    return m_xLayoutManager;
+}
+
+void SAL_CALL Frame::setLayoutManager(const css::uno::Reference<css::uno::XInterface>& p1) throw (css::uno::RuntimeException)
+{
+    TransactionGuard aTransaction( m_aTransactionManager, E_HARDEXCEPTIONS );
+
+    /* SAFE { */
+        WriteGuard aWriteLock( m_aLock );
+            m_xLayoutManager.set(p1, css::uno::UNO_QUERY_THROW);
+        aWriteLock.unlock();
+    /* } SAFE */
+}
+
+
 /*-****************************************************************************************************/
 void Frame::implts_forgetSubFrames()
 {
@@ -3011,7 +3054,7 @@ void Frame::implts_checkSuicide()
                 <TRUE/> enable; <FALSE/> disable this state
  */
 
-void Frame::impl_setCloser( /*IN*/ const css::uno::Reference< css::frame::XFrame >& xFrame ,
+void Frame::impl_setCloser( /*IN*/ const css::uno::Reference< css::frame::XFrame2 >& xFrame ,
                             /*IN*/       sal_Bool                                   bState  )
 {
     // Note: If start module isnt installed - no closer has to be shown!
@@ -3068,7 +3111,7 @@ void Frame::impl_checkMenuCloser()
         FrameListAnalyzer::E_HIDDEN | FrameListAnalyzer::E_HELP | FrameListAnalyzer::E_BACKINGCOMPONENT);
 
     // specify the new frame, which must have this special state ...
-    css::uno::Reference< css::frame::XFrame > xNewCloserFrame;
+    css::uno::Reference< css::frame::XFrame2 > xNewCloserFrame;
 
     // -----------------------------
     // a)
@@ -3088,7 +3131,7 @@ void Frame::impl_checkMenuCloser()
     {
         // others[0] can't be the backing component!
         // Because it's set at the special member aAnalyzer.m_xBackingComponent ... :-)
-        xNewCloserFrame = aAnalyzer.m_lOtherVisibleFrames[0];
+        xNewCloserFrame.set( aAnalyzer.m_lOtherVisibleFrames[0], css::uno::UNO_QUERY_THROW );
     }
     // -----------------------------
     // b)
@@ -3109,7 +3152,7 @@ void Frame::impl_checkMenuCloser()
     // or must be enabled/disabled at all.
     /* STATIC SAFE { */
     WriteGuard aStaticWriteLock(LockHelper::getGlobalLock());
-    css::uno::Reference< css::frame::XFrame > xCloserFrame (m_xCloserFrame.get(), css::uno::UNO_QUERY);
+    css::uno::Reference< css::frame::XFrame2 > xCloserFrame (m_xCloserFrame.get(), css::uno::UNO_QUERY);
     if (xCloserFrame!=xNewCloserFrame)
     {
         if (xCloserFrame.is())
diff --git a/framework/source/services/taskcreatorsrv.cxx b/framework/source/services/taskcreatorsrv.cxx
index b90ef2c..52f5ebe 100644
--- a/framework/source/services/taskcreatorsrv.cxx
+++ b/framework/source/services/taskcreatorsrv.cxx
@@ -27,7 +27,7 @@
 #include <loadenv/targethelper.hxx>
 #include <services.h>
 
-#include <com/sun/star/frame/XFrame.hpp>
+#include <com/sun/star/frame/Frame.hpp>
 #include <com/sun/star/frame/XController.hpp>
 #include <com/sun/star/frame/XModel.hpp>
 #include <com/sun/star/frame/XDesktop.hpp>
@@ -160,7 +160,7 @@ css::uno::Reference< css::uno::XInterface > SAL_CALL TaskCreatorService::createI
     //------------------->
 
     // create the new frame
-    css::uno::Reference< css::frame::XFrame > xFrame = implts_createFrame(xParentFrame, xContainerWindow, sRightName);
+    css::uno::Reference< css::frame::XFrame2 > xFrame = implts_createFrame(xParentFrame, xContainerWindow, sRightName);
 
     // special freature:
     // A special listener will restore pos/size states in case
@@ -264,7 +264,7 @@ css::uno::Reference< css::awt::XWindow > TaskCreatorService::implts_createContai
 }
 
 //-----------------------------------------------
-css::uno::Reference< css::frame::XFrame > TaskCreatorService::implts_createFrame( const css::uno::Reference< css::frame::XFrame >& xParentFrame    ,
+css::uno::Reference< css::frame::XFrame2 > TaskCreatorService::implts_createFrame( const css::uno::Reference< css::frame::XFrame >& xParentFrame    ,
                                                                                   const css::uno::Reference< css::awt::XWindow >&  xContainerWindow,
                                                                                   const OUString&                           sName           )
 {
@@ -275,7 +275,7 @@ css::uno::Reference< css::frame::XFrame > TaskCreatorService::implts_createFrame
     // <- SAFE
 
     // create new frame.
-    css::uno::Reference< css::frame::XFrame > xNewFrame( xSMGR->createInstance( SERVICENAME_FRAME ), css::uno::UNO_QUERY_THROW );
+    css::uno::Reference< css::frame::XFrame2 > xNewFrame = css::frame::Frame::create( comphelper::getComponentContext(xSMGR) );
 
     // Set window on frame.
     // Do it before calling any other interface methods ...
@@ -288,7 +288,7 @@ css::uno::Reference< css::frame::XFrame > TaskCreatorService::implts_createFrame
     {
         css::uno::Reference< css::frame::XFramesSupplier > xSupplier  (xParentFrame, css::uno::UNO_QUERY_THROW);
         css::uno::Reference< css::frame::XFrames >         xContainer = xSupplier->getFrames();
-        xContainer->append( xNewFrame );
+        xContainer->append( css::uno::Reference<css::frame::XFrame>(xNewFrame, css::uno::UNO_QUERY_THROW) );
     }
 
     // Set it's API name (if there is one from outside)
@@ -299,7 +299,7 @@ css::uno::Reference< css::frame::XFrame > TaskCreatorService::implts_createFrame
 }
 
 //-----------------------------------------------
-void TaskCreatorService::implts_establishWindowStateListener( const css::uno::Reference< css::frame::XFrame >& xFrame )
+void TaskCreatorService::implts_establishWindowStateListener( const css::uno::Reference< css::frame::XFrame2 >& xFrame )
 {
     // SAFE  ->
     ReadGuard aReadLock( m_aLock );
@@ -320,7 +320,7 @@ void TaskCreatorService::implts_establishWindowStateListener( const css::uno::Re
 }
 
 //-----------------------------------------------
-void TaskCreatorService::implts_establishDocModifyListener( const css::uno::Reference< css::frame::XFrame >& xFrame )
+void TaskCreatorService::implts_establishDocModifyListener( const css::uno::Reference< css::frame::XFrame2 >& xFrame )
 {
     // SAFE  ->
     ReadGuard aReadLock( m_aLock );
@@ -340,7 +340,7 @@ void TaskCreatorService::implts_establishDocModifyListener( const css::uno::Refe
 }
 
 //-----------------------------------------------
-void TaskCreatorService::implts_establishTitleBarUpdate( const css::uno::Reference< css::frame::XFrame >& xFrame )
+void TaskCreatorService::implts_establishTitleBarUpdate( const css::uno::Reference< css::frame::XFrame2 >& xFrame )
 {
     // SAFE  ->
     ReadGuard aReadLock( m_aLock );
diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk
index 092cefb..3ad428a 100644
--- a/offapi/UnoApi_offapi.mk
+++ b/offapi/UnoApi_offapi.mk
@@ -161,6 +161,7 @@ $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/frame,\
 	DispatchRecorder \
 	DispatchRecorderSupplier \
 	DocumentTemplates \
+	Frame \
 	GlobalEventBroadcaster \
 	MediaTypeDetectionHelper \
 	ModuleManager \
@@ -896,7 +897,6 @@ $(eval $(call gb_UnoApi_add_idlfiles_noheader,offapi,offapi/com/sun/star/frame,\
 	DesktopTask \
 	DesktopTasks \
 	DispatchProvider \
-	Frame \
 	FrameControl \
 	FrameLoader \
 	FrameLoaderFactory \
@@ -2546,6 +2546,7 @@ $(eval $(call gb_UnoApi_add_idlfiles,offapi,offapi/com/sun/star/frame,\
 	XExtendedFilterDetection \
 	XFilterDetect \
 	XFrame \
+	XFrame2 \
 	XFrameActionListener \
 	XFrameLoader \
 	XFrameLoaderQuery \
diff --git a/offapi/com/sun/star/frame/Frame.idl b/offapi/com/sun/star/frame/Frame.idl
index 5d72240..a354fed 100644
--- a/offapi/com/sun/star/frame/Frame.idl
+++ b/offapi/com/sun/star/frame/Frame.idl
@@ -19,15 +19,8 @@
 #ifndef __com_sun_star_frame_Frame_idl__
 #define __com_sun_star_frame_Frame_idl__
 
-#include <com/sun/star/frame/XFrame.idl>
-#include <com/sun/star/frame/XDispatchProvider.idl>
-#include <com/sun/star/frame/XDispatchRecorderSupplier.idl>
-#include <com/sun/star/frame/XDispatchProviderInterception.idl>
-#include <com/sun/star/frame/XFramesSupplier.idl>
-#include <com/sun/star/task/XStatusIndicatorFactory.idl>
-#include <com/sun/star/beans/XPropertySet.idl>
-#include <com/sun/star/frame/XDispatchInformationProvider.idl>
-#include <com/sun/star/xml/UserDefinedAttributesSupplier.idl>
+#include <com/sun/star/frame/XFrame2.idl>
+#include <com/sun/star/awt/XWindow.idl>
 
 
  module com {  module sun {  module star {  module frame {
@@ -45,113 +38,7 @@
 
     @see Desktop
  */
-published service Frame
-{
-    /** contains user defined attributes.
-
-        @see    <type scope="com::sun::star::xml">UserDefinedAttributesSupplier</type>
-     */
-    [optional] service com::sun::star::xml::UserDefinedAttributesSupplier;
-
-    /** allows the component to be loaded and accessed
-        within the frame; it is the main connection to the
-        environment of the component.
-     */
-    interface XFrame;
-
-    /** provides access to dispatchers for the frame.
-
-        <p>
-        What kind of URLs a frame accepts in the calls to <member>XDispatchProvider::queryDispatch()</member>,
-        and how the returned dispatcher handles dispatches is completely implementation dependent
-        (though of course the restrictions of <type>XDispatchProvider</type> must be met).
-        Frame implementations may (optionally) support special targets in the call to
-        <member>XDispatchProvider::queryDispatch()</member>.
-        Such special targets are passed as target frame name. They may, in addition,
-        require special frame search flags (see <type>FrameSearchFlag</type>), or,
-        in opposite, limit the set of allowed flags.<br>
-        Common special targets include:
-        <ul>
-                        <li><b>_blank</b><br> is used to create a new frame when dispatching the URL.</li>
-            <li><b>_default</b><br> is used to recycle empty or create a new frame when dispatching the URL.</li>
-            <li><b>_self</b><br> forces the frame to dispatch the URL into itself. ("" means the same)</li>
-                        <li><b>_parent</b><br> dispatches the URL into the parent frame.</li>
-                        <li><b>_top</b><br> dispatches the URL into the top level frame, the frame where this is invoked belongs to.</li>
-        </ul>
-        </p>
-
-        @see XDispatch
-        @see XFrame::findFrame()
-    */
-    interface XDispatchProvider;
-
-    /** provides information about supported commands
-
-        @since OOo 2.0
-    */
-    [optional] interface XDispatchInformationProvider;
-
-    /** supports interception mechanism for dispatched URLs
-
-        <p>
-        Registered objects can intercept, suppress or reroute dispatched URLs.
-        If they support another interface too (<type>XInterceptorInfo</type>)
-        it's possible to perform it by directly calling of right interceptor without
-        using list of all registered ones.
-        </p>
-     */
-    interface XDispatchProviderInterception;
-
-    /** provides access to sub frames within this frame
-     */
-    interface XFramesSupplier;
-
-    /** supplies access to <type scope="com::sun::star::task">XStatusIndicator</type> objects
-        for the component within the frame to show progresses
-     */
-    [optional] interface com::sun::star::task::XStatusIndicatorFactory;
-
-    /** if possible it sets/gets the UI title on/from the frame container window
-
-        <p>
-        It depends from the type of the frame container window. If it is a system
-        task window all will be OK. Otherwise the title can't be set.
-        Setting/getting of the pure value of this property must be possible in every
-        case. Only showing on the UI can be fail.
-        </p>
-     */
-    [property] string Title;
-
-    /** provides access to the dispatch recorder of the frame
-
-        <p>
-        Such recorder can be used to record dispatch requests.
-        The supplier contains a dispatch recorder and provide the functionality
-        to use it for any dispatch object from outside which supports the interface
-        <type>XDispatch</type>. A supplier is available only, if recording was enabled.
-        That means: if someone wishes to enable recoding on a frame he must set
-        a supplier with a recorder object inside of it. Every user of dispatches
-        has to check then if such supplier is available at this frame property.
-        If value of this property is <NULL/> he must call <member>XDispatch::dispatch()</member>
-        on the original dispatch object. If it's a valid value he must use the supplier
-        by calling his method <member>XDispatchRecorderSupplier::dispatchAndRecord()</member>
-        with the original dispatch object as argument.
-        </p>
-
-        <p>
-        Note:<br>
-        It's not recommended to cache an already gotten supplier. Because there exist
-        no possibility to check for enabled/disabled recording then.
-        </p>
-
-    @since OOo 1.1.2
-     */
-    [optional, property] XDispatchRecorderSupplier RecorderSupplier;
-
-    /** provides access to the <type>LayoutManager</type> of the frame.
-    */
-    [optional, property] com::sun::star::uno::XInterface LayoutManager;
-};
+published service Frame : XFrame2;
 
 
 }; }; }; };
diff --git a/offapi/com/sun/star/frame/XFrame2.idl b/offapi/com/sun/star/frame/XFrame2.idl
new file mode 100644
index 0000000..d90d00b
--- /dev/null
+++ b/offapi/com/sun/star/frame/XFrame2.idl
@@ -0,0 +1,145 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef __com_sun_star_frame_XFrame2_idl__
+#define __com_sun_star_frame_XFrame2_idl__
+
+#include <com/sun/star/container/XNameContainer.idl>
+#include <com/sun/star/frame/XDispatchInformationProvider.idl>
+#include <com/sun/star/frame/XDispatchProvider.idl>
+#include <com/sun/star/frame/XDispatchProviderInterception.idl>
+#include <com/sun/star/frame/XDispatchRecorderSupplier.idl>
+#include <com/sun/star/frame/XFramesSupplier.idl>
+#include <com/sun/star/task/XStatusIndicatorFactory.idl>
+
+
+module com {  module sun {  module star {  module frame {
+
+/**
+    @since LibreOffice 4.1
+ */
+published interface XFrame2
+{
+    /** contains user defined attributes.
+     */
+    [attribute, readonly] com::sun::star::container::XNameContainer UserDefinedAttributes;
+
+    /** provides access to dispatchers for the frame.
+
+        <p>
+        What kind of URLs a frame accepts in the calls to <member>XDispatchProvider::queryDispatch()</member>,
+        and how the returned dispatcher handles dispatches is completely implementation dependent
+        (though of course the restrictions of <type>XDispatchProvider</type> must be met).
+        Frame implementations may (optionally) support special targets in the call to
+        <member>XDispatchProvider::queryDispatch()</member>.
+        Such special targets are passed as target frame name. They may, in addition,
+        require special frame search flags (see <type>FrameSearchFlag</type>), or,
+        in opposite, limit the set of allowed flags.<br>
+        Common special targets include:
+        <ul>
+                        <li><b>_blank</b><br> is used to create a new frame when dispatching the URL.</li>
+            <li><b>_default</b><br> is used to recycle empty or create a new frame when dispatching the URL.</li>
+            <li><b>_self</b><br> forces the frame to dispatch the URL into itself. ("" means the same)</li>
+                        <li><b>_parent</b><br> dispatches the URL into the parent frame.</li>
+                        <li><b>_top</b><br> dispatches the URL into the top level frame, the frame where this is invoked belongs to.</li>
+        </ul>
+        </p>
+
+        @see XDispatch
+        @see XFrame::findFrame()
+    */
+    interface XDispatchProvider;
+
+    /** provides information about supported commands
+
+        @since OOo 2.0
+    */
+    interface XDispatchInformationProvider;
+
+    /** supports interception mechanism for dispatched URLs
+
+        <p>
+        Registered objects can intercept, suppress or reroute dispatched URLs.
+        If they support another interface too (<type>XInterceptorInfo</type>)
+        it's possible to perform it by directly calling of right interceptor without
+        using list of all registered ones.
+        </p>
+     */
+    interface XDispatchProviderInterception;
+
+    /** Provides access to sub frames within this frame,
+        and via it's XFrame sub-interface: Allows the component to be loaded and accessed
+        within the frame; it is the main connection to the
+        environment of the component.
+     */
+    interface XFramesSupplier; // -> XFrame
+
+    /** supplies access to <type scope="com::sun::star::task">XStatusIndicator</type> objects
+        for the component within the frame to show progresses
+     */
+    interface com::sun::star::task::XStatusIndicatorFactory;
+
+    /** if possible it sets/gets the UI title on/from the frame container window
+
+        <p>
+        It depends from the type of the frame container window. If it is a system
+        task window all will be OK. Otherwise the title can't be set.
+        Setting/getting of the pure value of this property must be possible in every
+        case. Only showing on the UI can be fail.
+        </p>
+     */
+    [attribute] string Title;
+
+    /** provides access to the dispatch recorder of the frame
+
+        <p>
+        Such recorder can be used to record dispatch requests.
+        The supplier contains a dispatch recorder and provide the functionality
+        to use it for any dispatch object from outside which supports the interface
+        <type>XDispatch</type>. A supplier is available only, if recording was enabled.
+        That means: if someone wishes to enable recoding on a frame he must set
+        a supplier with a recorder object inside of it. Every user of dispatches
+        has to check then if such supplier is available at this frame property.
+        If value of this property is <NULL/> he must call <member>XDispatch::dispatch()</member>
+        on the original dispatch object. If it's a valid value he must use the supplier
+        by calling his method <member>XDispatchRecorderSupplier::dispatchAndRecord()</member>
+        with the original dispatch object as argument.
+        </p>
+
+        <p>
+        Note:<br>
+        It's not recommended to cache an already gotten supplier. Because there exist
+        no possibility to check for enabled/disabled recording then.
+        </p>
+
+    @since OOo 1.1.2
+     */
+    [attribute] XDispatchRecorderSupplier DispatchRecorderSupplier;
+
+    /** Provides access to the <type>LayoutManager</type> of the frame.
+        This is actually of type XLayoutManager, but this API is still experimental (unpublished).
+    */
+    [attribute] com::sun::star::uno::XInterface LayoutManager;
+};
+
+
+}; }; }; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/type_reference/types.rdb b/offapi/type_reference/types.rdb
index 86a0752..f43806a 100644
Binary files a/offapi/type_reference/types.rdb and b/offapi/type_reference/types.rdb differ
diff --git a/reportdesign/source/ui/inc/propbrw.hxx b/reportdesign/source/ui/inc/propbrw.hxx
index 005d1d5..aae98d4 100644
--- a/reportdesign/source/ui/inc/propbrw.hxx
+++ b/reportdesign/source/ui/inc/propbrw.hxx
@@ -20,10 +20,9 @@
 #ifndef _REPORT_PROPBRW_HXX
 #define _REPORT_PROPBRW_HXX
 
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
 #include <com/sun/star/beans/XPropertySet.hpp>
 #include <com/sun/star/awt/XControlContainer.hpp>
-#include <com/sun/star/frame/XFrame.hpp>
+#include <com/sun/star/frame/XFrame2.hpp>
 #include <com/sun/star/inspection/XObjectInspector.hpp>
 #include <com/sun/star/uno/XComponentContext.hpp>
 #include <svl/brdcst.hxx>
@@ -48,9 +47,9 @@ private:
     OModuleClient       m_aModuleClient;
     ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >
                         m_xInspectorContext;
-    ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >
+    ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >
                         m_xORB;
-    ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >
+    ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame2 >
                         m_xMeAsFrame;
     ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XObjectInspector >
                         m_xBrowserController;
@@ -87,7 +86,7 @@ protected:
     DECL_LINK( OnAsyncGetFocus, void* );
 
 public:
-    PropBrw(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _xORB
+    PropBrw(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _xORB
             ,Window* pParent
             ,ODesignView*  _pDesignView);
     virtual ~PropBrw();
diff --git a/reportdesign/source/ui/report/DesignView.cxx b/reportdesign/source/ui/report/DesignView.cxx
index 9d9ef89..3ca115c 100644
--- a/reportdesign/source/ui/report/DesignView.cxx
+++ b/reportdesign/source/ui/report/DesignView.cxx
@@ -460,7 +460,7 @@ void ODesignView::togglePropertyBrowser(sal_Bool _bToogleOn)
 {
     if ( !m_pPropWin && _bToogleOn )
     {
-        m_pPropWin = new PropBrw(Reference<XMultiServiceFactory>(getController().getORB()->getServiceManager(), UNO_QUERY_THROW), m_pTaskPane,this);
+        m_pPropWin = new PropBrw(getController().getORB(), m_pTaskPane,this);
         m_pPropWin->Invalidate();
         static_cast<OTaskWindow*>(m_pTaskPane)->setPropertyBrowser(m_pPropWin);
         notifySystemWindow(this,m_pPropWin,::comphelper::mem_fun(&TaskPaneList::AddWindow));
diff --git a/reportdesign/source/ui/report/propbrw.cxx b/reportdesign/source/ui/report/propbrw.cxx
index d7f4e22..0b14f2a 100644
--- a/reportdesign/source/ui/report/propbrw.cxx
+++ b/reportdesign/source/ui/report/propbrw.cxx
@@ -25,8 +25,13 @@
 #include <tools/debug.hxx>
 #include <tools/diagnose_ex.h>
 #include <com/sun/star/awt/XLayoutConstrains.hpp>
+#include <com/sun/star/awt/PosSize.hpp>
+#include <com/sun/star/beans/PropertyValue.hpp>
+#include <com/sun/star/frame/Frame.hpp>
 #include <com/sun/star/inspection/ObjectInspector.hpp>
 #include <com/sun/star/inspection/DefaultHelpProvider.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/report/inspection/DefaultComponentInspectorModel.hpp>
 #include <svx/svxids.hrc>
 #include <vcl/stdtext.hxx>
 #include <svx/svdview.hxx>
@@ -40,10 +45,6 @@
 #include <comphelper/stl_types.hxx>
 #include <comphelper/types.hxx>
 #include <comphelper/sequence.hxx>
-#include <com/sun/star/beans/PropertyValue.hpp>
-#include <com/sun/star/awt/PosSize.hpp>
-#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/report/inspection/DefaultComponentInspectorModel.hpp>
 #include <comphelper/processfactory.hxx>
 #include "SectionView.hxx"
 #include "ReportSection.hxx"
@@ -92,7 +93,7 @@ DBG_NAME( rpt_PropBrw )
 
 //----------------------------------------------------------------------------
 
-PropBrw::PropBrw(const Reference< XMultiServiceFactory >&   _xORB,Window* pParent,ODesignView*  _pDesignView)
+PropBrw::PropBrw(const Reference< XComponentContext >& _xORB, Window* pParent, ODesignView*  _pDesignView)
           :DockingWindow(pParent,WinBits(WB_STDMODELESS|WB_SIZEABLE|WB_3DLOOK|WB_ROLLABLE))
           ,m_xORB(_xORB)
           ,m_pDesignView(_pDesignView)
@@ -107,12 +108,9 @@ PropBrw::PropBrw(const Reference< XMultiServiceFactory >&   _xORB,Window* pParen
     try
     {
         // create a frame wrapper for myself
-        m_xMeAsFrame = Reference< XFrame >(m_xORB->createInstance(OUString("com.sun.star.frame.Frame")), UNO_QUERY);
-        if (m_xMeAsFrame.is())
-        {
-            m_xMeAsFrame->initialize( VCLUnoHelper::GetInterface ( this ) );
-            m_xMeAsFrame->setName(OUString("report property browser"));  // change name!
-        }
+        m_xMeAsFrame = Frame::create( m_xORB );
+        m_xMeAsFrame->initialize( VCLUnoHelper::GetInterface ( this ) );
+        m_xMeAsFrame->setName( OUString("report property browser") );  // change name!
     }
     catch (Exception&)
     {
@@ -123,8 +121,6 @@ PropBrw::PropBrw(const Reference< XMultiServiceFactory >&   _xORB,Window* pParen
 
     if (m_xMeAsFrame.is())
     {
-        Reference< XComponentContext > xOwnContext(
-            comphelper::getComponentContext( m_xORB ) );
         try
         {
             ::cppu::ContextEntry_Init aHandlerContextInfo[] =
@@ -135,9 +131,9 @@ PropBrw::PropBrw(const Reference< XMultiServiceFactory >&   _xORB,Window* pParen
             };
             m_xInspectorContext.set(
                 ::cppu::createComponentContext( aHandlerContextInfo, sizeof( aHandlerContextInfo ) / sizeof( aHandlerContextInfo[0] ),
-                xOwnContext ) );
+                m_xORB ) );
             // create a property browser controller
-            bool bEnableHelpSection = lcl_shouldEnableHelpSection( xOwnContext );
+            bool bEnableHelpSection = lcl_shouldEnableHelpSection( m_xORB );
             Reference< inspection::XObjectInspectorModel> xInspectorModel( bEnableHelpSection
                 ?   report::inspection::DefaultComponentInspectorModel::createWithHelpSection( m_xInspectorContext, 3, 8 )
                 :   report::inspection::DefaultComponentInspectorModel::createDefault( m_xInspectorContext ) );
@@ -150,7 +146,7 @@ PropBrw::PropBrw(const Reference< XMultiServiceFactory >&   _xORB,Window* pParen
             }
             else
             {
-                m_xBrowserController->attachFrame(m_xMeAsFrame);
+                m_xBrowserController->attachFrame( Reference<XFrame>(m_xMeAsFrame, UNO_QUERY_THROW));
                 m_xBrowserComponentWindow = m_xMeAsFrame->getComponentWindow();
                 OSL_ENSURE(m_xBrowserComponentWindow.is(), "PropBrw::PropBrw: attached the controller, but have no component window!");
                 if ( bEnableHelpSection )
diff --git a/sfx2/inc/sfx2/templateinfodlg.hxx b/sfx2/inc/sfx2/templateinfodlg.hxx
index db5c11d..69d79b2 100644
--- a/sfx2/inc/sfx2/templateinfodlg.hxx
+++ b/sfx2/inc/sfx2/templateinfodlg.hxx
@@ -18,7 +18,7 @@ namespace svtools {
 }
 
 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; } } } }
 
 class SfxTemplateInfoDlg : public ModalDialog
 {
@@ -41,7 +41,7 @@ private:
     Window *mpPreviewView;  // gets released when xWindows get destroyed (dont delete in constructor)
     svtools::ODocumentInfoPreview *mpInfoView;
 
-    ::com::sun::star::uno::Reference < ::com::sun::star::frame::XFrame > xFrame;
+    ::com::sun::star::uno::Reference < ::com::sun::star::frame::XFrame2 > m_xFrame;
     ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > xWindow;
 };
 
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx
index b75168c..5078c95 100644
--- a/sfx2/source/appl/newhelp.cxx
+++ b/sfx2/source/appl/newhelp.cxx
@@ -42,18 +42,13 @@
 #include <comphelper/processfactory.hxx>
 #include <comphelper/string.hxx>
 #include <toolkit/helper/vclunohelper.hxx>
-#include <com/sun/star/util/XModifiable.hpp>
-#include <com/sun/star/frame/XComponentLoader.hpp>
-#include <com/sun/star/util/XCloseable.hpp>
-#include <com/sun/star/util/CloseVetoException.hpp>
-#include <com/sun/star/lang/XComponent.hpp>
-#include <com/sun/star/lang/DisposedException.hpp>
 #include <com/sun/star/awt/PosSize.hpp>
 #include <com/sun/star/awt/XWindow.hpp>
 #include <com/sun/star/beans/Property.hpp>
 #include <com/sun/star/beans/PropertyValue.hpp>
 #include <com/sun/star/beans/XPropertySetInfo.hpp>
 #include <com/sun/star/container/XIndexAccess.hpp>
+#include <com/sun/star/frame/XComponentLoader.hpp>
 #include <com/sun/star/frame/XTitle.hpp>
 #include <com/sun/star/frame/XLayoutManager.hpp>
 #include <com/sun/star/frame/DispatchResultState.hpp>
@@ -61,9 +56,11 @@
 #include <com/sun/star/frame/XDispatch.hpp>
 #include <com/sun/star/frame/XDispatchProvider.hpp>
 #include <com/sun/star/frame/XDispatchProviderInterception.hpp>
-#include <com/sun/star/frame/XFrame.hpp>
+#include <com/sun/star/frame/Frame.hpp>
 #include <com/sun/star/i18n/XBreakIterator.hpp>
 #include <com/sun/star/i18n/WordType.hpp>
+#include <com/sun/star/lang/XComponent.hpp>
+#include <com/sun/star/lang/DisposedException.hpp>
 #include <com/sun/star/style/XStyle.hpp>
 #include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
 #include <com/sun/star/text/XText.hpp>
@@ -78,9 +75,12 @@
 #include <com/sun/star/util/XSearchDescriptor.hpp>
 #include <com/sun/star/util/URLTransformer.hpp>
 #include <com/sun/star/util/XURLTransformer.hpp>
+#include <com/sun/star/util/XModifiable.hpp>
+#include <com/sun/star/util/XCloseable.hpp>
+#include <com/sun/star/util/CloseVetoException.hpp>
+#include <com/sun/star/ui/XDockingAreaAcceptor.hpp>
 #include <com/sun/star/view/XSelectionSupplier.hpp>
 #include <com/sun/star/view/XViewSettingsSupplier.hpp>
-#include <com/sun/star/ui/XDockingAreaAcceptor.hpp>
 #include <svtools/helpopt.hxx>
 #include <unotools/historyoptions.hxx>
 #include <svtools/menuoptions.hxx>
@@ -1480,7 +1480,7 @@ void SfxHelpWindow_Impl::loadHelpContent(const OUString& sHelpURL, sal_Bool bAdd
         return;
 
     // If a print job runs do not open a new page
-    Reference< XFrame >      xTextFrame      = pTextWin->getFrame();
+    Reference< XFrame2 >     xTextFrame      = pTextWin->getFrame();
     Reference< XController > xTextController ;
     if (xTextFrame.is())
         xTextController = xTextFrame->getController ();
@@ -2004,12 +2004,11 @@ long TextWin_Impl::Notify( NotifyEvent& rNEvt )
 
 // -----------------------------------------------------------------------
 // remove docking area acceptor from layoutmanager, so it will not layout anything further .-)
-static void lcl_disableLayoutOfFrame(const Reference< XFrame >& xFrame)
+static void lcl_disableLayoutOfFrame(const Reference< XFrame2 >& xFrame)
 {
     static const OUString PROP_LAYOUT_MANAGER("LayoutManager");
 
-    Reference< XPropertySet > xPropSet(xFrame, UNO_QUERY_THROW);
-    xPropSet->setPropertyValue(PROP_LAYOUT_MANAGER, makeAny(Reference< XLayoutManager >()));
+    xFrame->setLayoutManager( Reference< XLayoutManager >() );
 }
 
 // class SfxHelpTextWindow_Impl ------------------------------------------
@@ -2037,8 +2036,7 @@ SfxHelpTextWindow_Impl::SfxHelpTextWindow_Impl( SfxHelpWindow_Impl* pParent ) :
 {
     sfx2::AddToTaskPaneList( &aToolBox );
 
-    xFrame = Reference < XFrame > ( ::comphelper::getProcessServiceFactory()->createInstance(
-        "com.sun.star.frame.Frame" ), UNO_QUERY );
+    xFrame = Frame::create( ::comphelper::getProcessComponentContext() );
     xFrame->initialize( VCLUnoHelper::GetInterface ( pTextWin ) );
     xFrame->setName( "OFFICE_HELP" );
     lcl_disableLayoutOfFrame(xFrame);
@@ -2570,12 +2568,10 @@ long SfxHelpTextWindow_Impl::PreNotify( NotifyEvent& rNEvt )
             aMenu.InsertSeparator();
             aMenu.InsertItem( TBI_SELECTIONMODE, SfxResId( STR_HELP_MENU_TEXT_SELECTION_MODE ).toString() );
             aMenu.SetHelpId( TBI_SELECTIONMODE, HID_HELP_TEXT_SELECTION_MODE );
-            Reference < XDispatchProvider > xProv( xFrame, UNO_QUERY );
             URL aURL;
             aURL.Complete = ".uno:SelectTextMode";
             PARSE_URL( aURL );
-            Reference < XDispatch > xDisp = xProv.is() ?
-                    xProv->queryDispatch( aURL, OUString(), 0 ) : Reference < XDispatch >();
+            Reference < XDispatch > xDisp = xFrame->queryDispatch( aURL, OUString(), 0 );
             if(xDisp.is())
             {
                 HelpStatusListener_Impl* pStateListener;
@@ -3148,7 +3144,7 @@ void SfxHelpWindow_Impl::openDone(const OUString& sURL    ,
 // -----------------------------------------------------------------------
 
 SfxHelpWindow_Impl::SfxHelpWindow_Impl(
-    const ::com::sun::star::uno::Reference < ::com::sun::star::frame::XFrame >& rFrame,
+    const ::com::sun::star::uno::Reference < ::com::sun::star::frame::XFrame2 >& rFrame,
     Window* pParent, WinBits ) :
 
     SplitWindow( pParent, WB_3DLOOK | WB_NOSPLITDRAW ),
@@ -3177,12 +3173,11 @@ SfxHelpWindow_Impl::SfxHelpWindow_Impl(
     pIndexWin->SetSelectFactoryHdl( LINK( this, SfxHelpWindow_Impl, SelectFactoryHdl ) );
     pIndexWin->Show();
     pTextWin = new SfxHelpTextWindow_Impl( this );
-    Reference < XFramesSupplier > xSup( rFrame, UNO_QUERY );
-    Reference < XFrames > xFrames = xSup->getFrames();
-    xFrames->append( pTextWin->getFrame() );
+    Reference < XFrames > xFrames = rFrame->getFrames();
+    xFrames->append( Reference<XFrame>(pTextWin->getFrame(), UNO_QUERY_THROW) );
     pTextWin->SetSelectHdl( LINK( this, SfxHelpWindow_Impl, SelectHdl ) );
     pTextWin->Show();
-    pHelpInterceptor->setInterception( pTextWin->getFrame() );
+    pHelpInterceptor->setInterception( Reference<XFrame>(pTextWin->getFrame(), UNO_QUERY_THROW) );
     pHelpListener->SetChangeHdl( LINK( this, SfxHelpWindow_Impl, ChangeHdl ) );
     LoadConfig();
 }
diff --git a/sfx2/source/appl/newhelp.hxx b/sfx2/source/appl/newhelp.hxx
index a3ed34e..fe84268 100644
--- a/sfx2/source/appl/newhelp.hxx
+++ b/sfx2/source/appl/newhelp.hxx
@@ -23,10 +23,9 @@
 #include <com/sun/star/uno/Reference.h>
 #include <com/sun/star/frame/XDispatchResultListener.hpp>
 #include <com/sun/star/frame/XDispatch.hpp>
-#include <com/sun/star/frame/XFrame.hpp>
+#include <com/sun/star/frame/XFrame2.hpp>
 
 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 i18n { class XBreakIterator; } } } }
 namespace com { namespace sun { namespace star { namespace text { class XTextRange; } } } }
 
@@ -445,7 +444,7 @@ private:
     SfxHelpWindow_Impl*     pHelpWin;
     Window*                 pTextWin;
     sfx2::SearchDialog*     pSrchDlg;
-    ::com::sun::star::uno::Reference < ::com::sun::star::frame::XFrame >
+    ::com::sun::star::uno::Reference < ::com::sun::star::frame::XFrame2 >
                             xFrame;
     ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XBreakIterator >
                             xBreakIterator;
@@ -483,7 +482,7 @@ public:
     virtual void            GetFocus();
     virtual void            DataChanged( const DataChangedEvent& rDCEvt );
 
-    inline ::com::sun::star::uno::Reference < ::com::sun::star::frame::XFrame >
+    inline ::com::sun::star::uno::Reference < ::com::sun::star::frame::XFrame2 >
                             getFrame() const { return xFrame; }
 
     inline void             SetSelectHdl( const Link& rLink ) { aToolBox.SetSelectHdl( rLink ); }
@@ -508,7 +507,7 @@ friend class SfxHelpIndexWindow_Impl;
                                 xWindow;
     ::com::sun::star::uno::Reference < ::com::sun::star::frame::XDispatchResultListener >
                                 xOpenListener;
-    ::com::sun::star::uno::Reference < ::com::sun::star::frame::XFrame >
+    ::com::sun::star::uno::Reference < ::com::sun::star::frame::XFrame2 >
                                 xFrame;
 
     SfxHelpIndexWindow_Impl*    pIndexWin;
@@ -543,7 +542,7 @@ friend class SfxHelpIndexWindow_Impl;
     DECL_LINK(          ChangeHdl, HelpListener_Impl* );
 
 public:
-    SfxHelpWindow_Impl( const ::com::sun::star::uno::Reference < ::com::sun::star::frame::XFrame >& rFrame,
+    SfxHelpWindow_Impl( const ::com::sun::star::uno::Reference < ::com::sun::star::frame::XFrame2 >& rFrame,
                         Window* pParent, WinBits nBits );
     ~SfxHelpWindow_Impl();
 
@@ -551,7 +550,7 @@ public:
 
     void                setContainerWindow(
                             ::com::sun::star::uno::Reference < ::com::sun::star::awt::XWindow > xWin );
-    inline ::com::sun::star::uno::Reference < ::com::sun::star::frame::XFrame >
+    inline ::com::sun::star::uno::Reference < ::com::sun::star::frame::XFrame2 >
                         getTextFrame() const { return pTextWin->getFrame(); }
     inline ::com::sun::star::uno::Reference < ::com::sun::star::frame::XDispatchResultListener >
                         getOpenListener() const { return xOpenListener; }
diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx
index 297e356..d37f618 100644
--- a/sfx2/source/appl/sfxhelp.cxx
+++ b/sfx2/source/appl/sfxhelp.cxx
@@ -23,7 +23,7 @@
 #include <algorithm>
 #include <com/sun/star/uno/Reference.h>
 #include <com/sun/star/frame/Desktop.hpp>
-#include <com/sun/star/frame/XFrame.hpp>
+#include <com/sun/star/frame/XFrame2.hpp>
 #include <com/sun/star/frame/XComponentLoader.hpp>
 #include <com/sun/star/lang/XComponent.hpp>
 #include <comphelper/processfactory.hxx>
@@ -526,15 +526,15 @@ OUString SfxHelp::CreateHelpURL_Impl( const OUString& aCommandURL, const OUStrin
     return aHelpURL.makeStringAndClear();
 }
 
-SfxHelpWindow_Impl* impl_createHelp(Reference< XFrame >& rHelpTask   ,
+SfxHelpWindow_Impl* impl_createHelp(Reference< XFrame2 >& rHelpTask   ,
                                     Reference< XFrame >& rHelpContent)
 {
     Reference < XDesktop2 > xDesktop = Desktop::create( ::comphelper::getProcessComponentContext() );
 
     // otherwise - create new help task
-    Reference< XFrame > xHelpTask = xDesktop->findFrame(
-        OUString("OFFICE_HELP_TASK"),
-        FrameSearchFlag::TASKS | FrameSearchFlag::CREATE);
+    Reference< XFrame2 > xHelpTask(
+        xDesktop->findFrame(  "OFFICE_HELP_TASK", FrameSearchFlag::TASKS | FrameSearchFlag::CREATE),
+        UNO_QUERY_THROW);
     if (!xHelpTask.is())
         return 0;
 
@@ -753,9 +753,9 @@ sal_Bool SfxHelp::Start_Impl(const OUString& rURL, const Window* pWindow, const
     // check if help window is still open
     // If not, create a new one and return access directly to the internal sub frame showing the help content
     // search must be done here; search one desktop level could return an arbitraty frame
-    Reference< XFrame > xHelp = xDesktop->findFrame(
-        OUString("OFFICE_HELP_TASK"),
-        FrameSearchFlag::CHILDREN);
+    Reference< XFrame2 > xHelp(
+        xDesktop->findFrame( "OFFICE_HELP_TASK", FrameSearchFlag::CHILDREN),
+        UNO_QUERY_THROW);
     Reference< XFrame > xHelpContent = xDesktop->findFrame(
         OUString("OFFICE_HELP"),
         FrameSearchFlag::CHILDREN);
diff --git a/sfx2/source/dialog/partwnd.cxx b/sfx2/source/dialog/partwnd.cxx
index 4530ecf..fb0058f 100644
--- a/sfx2/source/dialog/partwnd.cxx
+++ b/sfx2/source/dialog/partwnd.cxx
@@ -18,19 +18,19 @@
  */
 
 #include <com/sun/star/awt/XWindow.hpp>
+#include <com/sun/star/awt/PosSize.hpp>
+#include <com/sun/star/beans/PropertyValue.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/frame/Frame.hpp>
+#include <com/sun/star/frame/XController.hpp>
+#include <com/sun/star/lang/XComponent.hpp>
+#include <com/sun/star/lang/DisposedException.hpp>
 #include <com/sun/star/task/XStatusIndicator.hpp>
 #include <com/sun/star/uno/Reference.h>
 #include <com/sun/star/uno/Sequence.hxx>
-#include <com/sun/star/beans/PropertyValue.hpp>
 #include <com/sun/star/util/URL.hpp>
-#include <com/sun/star/frame/XFrame.hpp>
 #include <com/sun/star/util/XCloseable.hpp>
 #include <com/sun/star/util/CloseVetoException.hpp>
-#include <com/sun/star/lang/XComponent.hpp>
-#include <com/sun/star/lang/DisposedException.hpp>
-#include <com/sun/star/frame/XController.hpp>
-#include <com/sun/star/beans/XPropertySet.hpp>
-#include <com/sun/star/awt/PosSize.hpp>
 #include <comphelper/processfactory.hxx>
 
 #include <toolkit/helper/vclunohelper.hxx>
@@ -105,40 +105,32 @@ SfxPartDockWnd_Impl::SfxPartDockWnd_Impl
 )
     : SfxDockingWindow( pBind, pChildWin, pParent, nBits )
 {
-    ::com::sun::star::uno::Reference < ::com::sun::star::frame::XFrame > xFrame(
-            ::comphelper::getProcessServiceFactory()->createInstance(
-            "com.sun.star.frame.Frame" ), ::com::sun::star::uno::UNO_QUERY );
+    css::uno::Reference < css::frame::XFrame2 > xFrame = css::frame::Frame::create(
+            ::comphelper::getProcessComponentContext() );
     xFrame->initialize( VCLUnoHelper::GetInterface ( this ) );
 
-    ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xPropSet(
-        xFrame, ::com::sun::star::uno::UNO_QUERY );
     try
     {
-        const OUString aLayoutManager( "LayoutManager" );
-        ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xLMPropSet;
+        css::uno::Reference< css::beans::XPropertySet > xLMPropSet( xFrame->getLayoutManager(), css::uno::UNO_QUERY_THROW );
 
-        ::com::sun::star::uno::Any a = xPropSet->getPropertyValue( aLayoutManager );
-        if ( a >>= xLMPropSet )
-        {
-            const OUString aAutomaticToolbars( "AutomaticToolbars" );
-            xLMPropSet->setPropertyValue( aAutomaticToolbars, ::com::sun::star::uno::Any( sal_False ));
-        }
+        const OUString aAutomaticToolbars( "AutomaticToolbars" );
+        xLMPropSet->setPropertyValue( aAutomaticToolbars, css::uno::Any( sal_False ));
     }
-    catch( ::com::sun::star::uno::RuntimeException& )
+    catch( css::uno::RuntimeException& )
     {
         throw;
     }
-    catch( ::com::sun::star::uno::Exception& )

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list