UnoControls/source/controls/framecontrol.cxx |   11 --
 UnoControls/source/inc/framecontrol.hxx      |  111 ++-------------------------
 include/sfx2/sfxuno.hxx                      |    2 
 offapi/UnoApi_offapi.mk                      |    3 
 offapi/com/sun/star/frame/FrameControl.idl   |   24 +++++
 offapi/com/sun/star/frame/XFrameControl.idl  |   65 ---------------
 offapi/type_reference/offapi.rdb             |binary
 sw/source/ui/inc/unotools.hxx                |   16 +--
 sw/source/ui/utlui/unotools.cxx              |   89 +++++++++++----------
 9 files changed, 91 insertions(+), 230 deletions(-)

New commits:
commit 96bd18f692f933b328facf75eb200114bb55eee7
Author: Noel Grandin <n...@peralex.com>
Date:   Wed Jul 24 14:41:35 2013 +0200

    fdo#67213 - crash on opening AutoText dialog (Ctrl+F3
    
    Revert "fdo#46808, Convert frame::FrameControl service to new style"
    This reverts commit 32eaa77db33b3b1f5793e92167b9f8c2708ea543.
    Conflicts:
        UnoControls/source/controls/framecontrol.cxx
        UnoControls/source/inc/framecontrol.hxx
    
    .. because I can't work out how it causes fdo#67213 - I suspect my
    changes might be interacting with UNO aggregation, which
    is always tricky.
    
    Change-Id: Icd14f9a7df98585393c5527a3817e05c26246de9

diff --git a/UnoControls/source/controls/framecontrol.cxx 
b/UnoControls/source/controls/framecontrol.cxx
index 957a333..6c30ee8 100644
--- a/UnoControls/source/controls/framecontrol.cxx
+++ b/UnoControls/source/controls/framecontrol.cxx
@@ -46,17 +46,6 @@ using namespace ::com::sun::star::util  ;
 
 namespace unocontrols{
 
-#define SERVICENAME_FRAMECONTROL                        
"com.sun.star.frame.FrameControl"
-#define IMPLEMENTATIONNAME_FRAMECONTROL                 
"stardiv.UnoControls.FrameControl"
-#define PROPERTYNAME_LOADERARGUMENTS                    "LoaderArguments"
-#define PROPERTYNAME_COMPONENTURL                       "ComponentURL"
-#define PROPERTYNAME_FRAME                              "Frame"
-#define PROPERTY_COUNT                                  3                      
                                 // you must count the propertys
-#define PROPERTYHANDLE_COMPONENTURL                     0                      
                                 // Id must be the index into the array
-#define PROPERTYHANDLE_FRAME                            1
-#define PROPERTYHANDLE_LOADERARGUMENTS                  2
-
-
 
//______________________________________________________________________________________________________________
 //  construct/destruct
 
//______________________________________________________________________________________________________________
diff --git a/UnoControls/source/inc/framecontrol.hxx 
b/UnoControls/source/inc/framecontrol.hxx
index 285a2a9..ed97527 100644
--- a/UnoControls/source/inc/framecontrol.hxx
+++ b/UnoControls/source/inc/framecontrol.hxx
@@ -21,7 +21,6 @@
 #define _UNOCONTROLS_FRAMECONTROL_CTRL_HXX
 
 #include <com/sun/star/frame/XFrameActionListener.hpp>
-#include <com/sun/star/frame/XFrameControl.hpp>
 #include <com/sun/star/frame/XComponentLoader.hpp>
 #include <com/sun/star/frame/XFrame2.hpp>
 #include <com/sun/star/frame/FrameActionEvent.hpp>
@@ -40,13 +39,23 @@
 
 namespace unocontrols{
 
+#define SERVICENAME_FRAMECONTROL                        
"com.sun.star.frame.FrameControl"
+#define IMPLEMENTATIONNAME_FRAMECONTROL                 
"stardiv.UnoControls.FrameControl"
+#define PROPERTYNAME_LOADERARGUMENTS                    "LoaderArguments"
+#define PROPERTYNAME_COMPONENTURL                       "ComponentURL"
+#define PROPERTYNAME_FRAME                              "Frame"
+#define ERRORTEXT_VOSENSHURE                            "This is an invalid 
property handle."
+#define PROPERTY_COUNT                                  3                      
                                 // you must count the propertys
+#define PROPERTYHANDLE_COMPONENTURL                     0                      
                                 // Id must be the index into the array
+#define PROPERTYHANDLE_FRAME                            1
+#define PROPERTYHANDLE_LOADERARGUMENTS                  2
+
 
//______________________________________________________________________________________________________________
 //  class
 
//______________________________________________________________________________________________________________
 
 class FrameControl  : public ::com::sun::star::awt::XControlModel
                     , public ::com::sun::star::lang::XConnectionPointContainer
-                    , public ::com::sun::star::frame::XFrameControl
                     , public BaseControl                                // 
This order is necessary for right initialization of m_aMutex!
                     , public ::cppu::OBroadcastHelper
                     , public ::cppu::OPropertySetHelper
@@ -175,104 +184,6 @@ public:
         const ::com::sun::star::uno::Reference< 
::com::sun::star::uno::XInterface >&    xListener
     ) throw( ::com::sun::star::uno::RuntimeException );
 
-
-    
//__________________________________________________________________________________________________________
-    //  XFrameControl
-    
//__________________________________________________________________________________________________________
-
-    virtual rtl::OUString SAL_CALL getComponentURL()
-        throw( ::com::sun::star::uno::RuntimeException )
-    { return m_sComponentURL; }
-    virtual void SAL_CALL setComponentURL(const rtl::OUString& rVal)
-        throw( ::com::sun::star::uno::RuntimeException )
-    { m_sComponentURL = rVal; }
-    virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame2 
> SAL_CALL getFrame()
-        throw( ::com::sun::star::uno::RuntimeException )
-    { return m_xFrame; }
-    virtual void SAL_CALL setFrame(const ::com::sun::star::uno::Reference< 
::com::sun::star::frame::XFrame2 > & rxFrame)
-        throw( ::com::sun::star::uno::RuntimeException )
-    { m_xFrame = rxFrame; }
-    virtual ::com::sun::star::uno::Sequence< 
::com::sun::star::beans::PropertyValue > SAL_CALL getLoaderArguments()
-        throw( ::com::sun::star::uno::RuntimeException )
-    { return m_seqLoaderArguments; }
-    virtual void SAL_CALL setLoaderArguments(const 
::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > & 
rVal)
-        throw( ::com::sun::star::uno::RuntimeException )
-    { m_seqLoaderArguments = rVal; }
-
-    
//__________________________________________________________________________________________________________
-    //  overrides to remove inheritance ambiguity
-    
//__________________________________________________________________________________________________________
-    virtual css::uno::Reference<css::awt::XWindowPeer> SAL_CALL getPeer() 
throw (css::uno::RuntimeException)
-        { return BaseControl::getPeer(); }
-    virtual css::awt::Rectangle SAL_CALL getPosSize() throw 
(css::uno::RuntimeException)
-        { return BaseControl::getPosSize(); }
-    virtual void SAL_CALL setPosSize(sal_Int32 p1, sal_Int32 p2, sal_Int32 p3, 
sal_Int32 p4, sal_Int16 p5) throw (css::uno::RuntimeException)
-        { return BaseControl::setPosSize(p1, p2, p3, p4, p5); }
-    virtual void SAL_CALL addEventListener(const 
css::uno::Reference<css::lang::XEventListener>& p1) throw 
(css::uno::RuntimeException)
-        { return BaseControl::addEventListener(p1); }
-    virtual void SAL_CALL removeEventListener(const 
css::uno::Reference<css::lang::XEventListener>& p1) throw 
(css::uno::RuntimeException)
-        { return BaseControl::removeEventListener(p1); }
-    virtual void SAL_CALL setVisible(sal_Bool p1) throw 
(css::uno::RuntimeException)
-       { return BaseControl::setVisible(p1); }
-    virtual void SAL_CALL setEnable(sal_Bool p1) throw 
(css::uno::RuntimeException)
-        { return BaseControl::setEnable(p1); }
-    virtual void SAL_CALL setFocus() throw (css::uno::RuntimeException)
-        { return BaseControl::setFocus(); }
-    virtual void SAL_CALL addWindowListener(const 
css::uno::Reference<css::awt::XWindowListener>& p1) throw 
(css::uno::RuntimeException)
-        { return BaseControl::addWindowListener(p1); }
-    virtual void SAL_CALL removeWindowListener(const 
css::uno::Reference<css::awt::XWindowListener>& p1) throw 
(css::uno::RuntimeException)
-        { return BaseControl::removeWindowListener(p1); }
-    virtual void SAL_CALL addFocusListener(const 
css::uno::Reference<css::awt::XFocusListener>& p1) throw 
(css::uno::RuntimeException)
-        { return BaseControl::addFocusListener(p1); }
-    virtual void SAL_CALL removeFocusListener(const 
css::uno::Reference<css::awt::XFocusListener>& p1) throw 
(css::uno::RuntimeException)
-        { return BaseControl::removeFocusListener(p1); }
-    virtual void SAL_CALL addKeyListener(const 
css::uno::Reference<css::awt::XKeyListener>& p1) throw 
(css::uno::RuntimeException)
-        { return BaseControl::addKeyListener(p1); }
-    virtual void SAL_CALL removeKeyListener(const 
css::uno::Reference<css::awt::XKeyListener>& p1) throw 
(css::uno::RuntimeException)
-        { return BaseControl::removeKeyListener(p1); }
-    virtual void SAL_CALL addMouseListener(const 
css::uno::Reference<css::awt::XMouseListener>& p1) throw 
(css::uno::RuntimeException)
-        { return BaseControl::addMouseListener(p1); }
-    virtual void SAL_CALL removeMouseListener(const 
css::uno::Reference<css::awt::XMouseListener>& p1) throw 
(css::uno::RuntimeException)
-        { return BaseControl::removeMouseListener(p1); }
-    virtual void SAL_CALL addMouseMotionListener(const 
css::uno::Reference<css::awt::XMouseMotionListener>& p1) throw 
(css::uno::RuntimeException)
-        { return BaseControl::addMouseMotionListener(p1); }
-    virtual void SAL_CALL removeMouseMotionListener(const 
css::uno::Reference<css::awt::XMouseMotionListener>& p1) throw 
(css::uno::RuntimeException)
-        { return BaseControl::removeMouseMotionListener(p1); }
-    virtual void SAL_CALL addPaintListener(const 
css::uno::Reference<css::awt::XPaintListener>& p1) throw 
(css::uno::RuntimeException)
-        { return BaseControl::addPaintListener(p1); }
-    virtual void SAL_CALL removePaintListener(const 
css::uno::Reference<css::awt::XPaintListener>& p1) throw 
(css::uno::RuntimeException)
-        { return BaseControl::removePaintListener(p1); }
-    virtual css::awt::Size SAL_CALL getSize() throw 
(css::uno::RuntimeException)
-        { return BaseControl::getSize(); }
-    virtual void SAL_CALL draw(sal_Int32 p1, sal_Int32 p2) throw 
(css::uno::RuntimeException)
-        { return BaseControl::draw(p1, p2); }
-    virtual void SAL_CALL setZoom(float p1, float p2) throw 
(css::uno::RuntimeException)
-        { return BaseControl::setZoom(p1, p2); }
-    virtual void SAL_CALL setPropertyValue(const rtl::OUString& p1, const 
css::uno::Any& p2) throw (css::uno::RuntimeException)
-        { return ::cppu::OPropertySetHelper::setPropertyValue(p1, p2); }
-    virtual css::uno::Any SAL_CALL getPropertyValue(const rtl::OUString& p1) 
throw (css::uno::RuntimeException)
-        { return ::cppu::OPropertySetHelper::getPropertyValue(p1); }
-    virtual void SAL_CALL SAL_CALL addPropertyChangeListener(const 
rtl::OUString& p1, const 
css::uno::Reference<css::beans::XPropertyChangeListener>& p2) throw 
(css::uno::RuntimeException)
-        { return ::cppu::OPropertySetHelper::addPropertyChangeListener(p1, 
p2); }
-    virtual void SAL_CALL removePropertyChangeListener(const rtl::OUString& 
p1, const css::uno::Reference<css::beans::XPropertyChangeListener>& p2) throw 
(css::uno::RuntimeException)
-        { return ::cppu::OPropertySetHelper::removePropertyChangeListener(p1, 
p2); }
-    virtual void SAL_CALL addVetoableChangeListener(const rtl::OUString& p1, 
const css::uno::Reference<css::beans::XVetoableChangeListener>& p2) throw 
(css::uno::RuntimeException)
-        { return ::cppu::OPropertySetHelper::addVetoableChangeListener(p1, 
p2); }
-    virtual void SAL_CALL removeVetoableChangeListener(const rtl::OUString& 
p1, const css::uno::Reference<css::beans::XVetoableChangeListener>& p2) throw 
(css::uno::RuntimeException)
-        { return ::cppu::OPropertySetHelper::removeVetoableChangeListener(p1, 
p2); }
-    virtual void SAL_CALL setContext(const 
css::uno::Reference<css::uno::XInterface>& p1) throw 
(css::uno::RuntimeException)
-        { return BaseControl::setContext(p1); }
-    virtual css::uno::Reference<css::uno::XInterface> SAL_CALL getContext() 
throw (css::uno::RuntimeException)
-        { return BaseControl::getContext(); }
-    virtual css::uno::Reference<css::awt::XView> SAL_CALL getView() throw 
(css::uno::RuntimeException)
-        { return BaseControl::getView(); }
-    virtual void SAL_CALL setDesignMode(sal_Bool p1) throw 
(css::uno::RuntimeException)
-        { return BaseControl::setDesignMode(p1); }
-    virtual sal_Bool SAL_CALL isDesignMode() throw (css::uno::RuntimeException)
-        { return BaseControl::isDesignMode(); }
-    virtual sal_Bool SAL_CALL isTransparent() throw 
(css::uno::RuntimeException)
-        { return BaseControl::isTransparent(); }
-
     
//__________________________________________________________________________________________________________
     //  impl but public methods to register service!
     
//__________________________________________________________________________________________________________
diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk
index 2232124d..747a305 100644
--- a/offapi/UnoApi_offapi.mk
+++ b/offapi/UnoApi_offapi.mk
@@ -199,7 +199,6 @@ $(eval $(call 
gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/frame,\
        DispatchRecorderSupplier \
        DocumentTemplates \
        Frame \
-       FrameControl \
        FrameLoaderFactory \
        GlobalEventBroadcaster \
        LayoutManager \
@@ -944,6 +943,7 @@ $(eval $(call 
gb_UnoApi_add_idlfiles_noheader,offapi,offapi/com/sun/star/frame,\
        DesktopTask \
        DesktopTasks \
        DispatchProvider \
+       FrameControl \
        FrameLoader \
        FramesContainer \
        PopupMenuController \
@@ -2586,7 +2586,6 @@ $(eval $(call 
gb_UnoApi_add_idlfiles,offapi,offapi/com/sun/star/frame,\
        XFrame \
        XFrame2 \
        XFrameActionListener \
-       XFrameControl \
        XFrameLoader \
        XFrameLoaderQuery \
        XFrameSetModel \
diff --git a/offapi/com/sun/star/frame/FrameControl.idl 
b/offapi/com/sun/star/frame/FrameControl.idl
index 692d239..7a85e6d 100644
--- a/offapi/com/sun/star/frame/FrameControl.idl
+++ b/offapi/com/sun/star/frame/FrameControl.idl
@@ -19,7 +19,8 @@
 #ifndef __com_sun_star_frame_FrameControl_idl__
 #define __com_sun_star_frame_FrameControl_idl__
 
-#include <com/sun/star/frame/XFrameControl.idl>
+#include <com/sun/star/awt/UnoControl.idl>
+#include <com/sun/star/beans/XPropertySet.idl>
 
 
  module com {  module sun {  module star {  module frame {
@@ -33,7 +34,26 @@
     any UI.
     </p>
  */
-published service FrameControl : XFrameControl;
+published service FrameControl
+{
+    /** the base service of all controls
+     */
+    service com::sun::star::awt::UnoControl;
+
+    /** contains the type of the component which is loaded into the frame,
+        or the document which implicitly specifies the type
+     */
+    [property] string ComponentUrl;
+
+    /** the frame held by this control
+
+        <p>
+        The Frame is created if the control
+        is shown and the #ComponentUrl is set.
+        </p>
+     */
+    [property, readonly] string Frame;
+};
 
 
 }; }; }; };
diff --git a/offapi/com/sun/star/frame/XFrameControl.idl 
b/offapi/com/sun/star/frame/XFrameControl.idl
deleted file mode 100644
index 0375f34..0000000
--- a/offapi/com/sun/star/frame/XFrameControl.idl
+++ /dev/null
@@ -1,65 +0,0 @@
-/* -*- 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_XFrameControl_idl__
-#define __com_sun_star_frame_XFrameControl_idl__
-
-#include <com/sun/star/awt/UnoControl.idl>
-#include <com/sun/star/beans/XPropertySet.idl>
-#include <com/sun/star/beans/PropertyValue.idl>
-#include <com/sun/star/frame/XFrame2.idl>
-
-
- module com {  module sun {  module star {  module frame {
-
-/**
-    Unified interface for the FrameControl service.
-    This is not the complete set of interfaces this service implements, just 
the bare minimum
-    that we use internally.
-
-    @since LibreOffice 4.2
- */
-published interface XFrameControl
-{
-    interface com::sun::star::awt::XControl;
-
-    interface com::sun::star::awt::XWindow;
-
-    /** contains the type of the component which is loaded into the frame,
-        or the document which implicitly specifies the type
-     */
-    [attribute] string ComponentURL;
-
-    /** the frame held by this control
-
-        <p>
-        The Frame is created if the control
-        is shown and the #ComponentUrl is set.
-        </p>
-     */
-    [attribute] com::sun::star::frame::XFrame2 Frame;
-
-    [attribute] sequence< ::com::sun::star::beans::PropertyValue > 
LoaderArguments;
-};
-
-
-}; }; }; };
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/type_reference/offapi.rdb b/offapi/type_reference/offapi.rdb
index 667b727..fd83b22 100644
Binary files a/offapi/type_reference/offapi.rdb and 
b/offapi/type_reference/offapi.rdb differ
diff --git a/sw/source/ui/inc/unotools.hxx b/sw/source/ui/inc/unotools.hxx
index 87b296f..33a8cba 100644
--- a/sw/source/ui/inc/unotools.hxx
+++ b/sw/source/ui/inc/unotools.hxx
@@ -26,11 +26,11 @@
 #include <vcl/fixed.hxx>
 #include <vcl/layout.hxx>
 #include <actctrl.hxx>
-#include <com/sun/star/container/XNameAccess.hpp>
-#include <com/sun/star/container/XNamed.hpp>
 #include <com/sun/star/frame/XController.hpp>
-#include <com/sun/star/frame/XFrameControl.hpp>
 #include <com/sun/star/text/XTextCursor.hpp>
+#include <com/sun/star/container/XNameAccess.hpp>
+#include <com/sun/star/awt/XControl.hpp>
+#include <com/sun/star/container/XNamed.hpp>
 #include <tools/resary.hxx>
 #include "swdllapi.h"
 
@@ -68,7 +68,7 @@ class SwView;
 
 class SW_DLLPUBLIC SwOneExampleFrame
 {
-    ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrameControl > 
 m_xFrameControl;
+    ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >        
 _xControl;
     ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >        
 _xModel;
     ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController >   
 _xController;
     ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor >    
 _xCursor;
@@ -102,10 +102,10 @@ public:
                     String* pURL = 0);
     ~SwOneExampleFrame();
 
-    ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrameControl > 
& GetFrameControl() {return m_xFrameControl; }
-    ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > &      
  GetModel()      {return _xModel;}
-    ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController > & 
  GetController() {return _xController;}
-    ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > &  
  GetTextCursor() {return _xCursor;}
+    ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl > &      
 GetControl()    {return _xControl; }
+    ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > &      
 GetModel()      {return _xModel;}
+    ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController > & 
 GetController() {return _xController;}
+    ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > &  
 GetTextCursor() {return _xCursor;}
 
     void ClearDocument( sal_Bool bStartTimer = sal_False );
 
diff --git a/sw/source/ui/utlui/unotools.cxx b/sw/source/ui/utlui/unotools.cxx
index 62fadcc..a0fd65d 100644
--- a/sw/source/ui/utlui/unotools.cxx
+++ b/sw/source/ui/utlui/unotools.cxx
@@ -38,7 +38,6 @@
 #include <com/sun/star/awt/PosSize.hpp>
 #include <com/sun/star/view/XViewSettingsSupplier.hpp>
 #include <com/sun/star/container/XNameContainer.hpp>
-#include <com/sun/star/frame/FrameControl.hpp>
 #include <com/sun/star/frame/XLayoutManager.hpp>
 #include <comphelper/processfactory.hxx>
 #include <sfx2/dispatch.hxx>
@@ -107,51 +106,62 @@ SwOneExampleFrame::~SwOneExampleFrame()
 
 void SwOneExampleFrame::CreateControl()
 {
-    if(m_xFrameControl.is())
+    if(_xControl.is())
         return ;
     uno::Reference< lang::XMultiServiceFactory >
                                     xMgr = 
comphelper::getProcessServiceFactory();
     uno::Reference< uno::XComponentContext > xContext = 
comphelper::getProcessComponentContext();
-    m_xFrameControl = frame::FrameControl::create(xContext);
-
-    uno::Reference< awt::XWindowPeer >  xParent( 
aTopWindow.GetComponentInterface() );
-
-    uno::Reference< awt::XToolkit >  xToolkit( awt::Toolkit::create(xContext), 
uno::UNO_QUERY_THROW );
-
-    m_xFrameControl->createPeer( xToolkit, xParent );
+    uno::Reference< uno::XInterface >  xInst = xMgr->createInstance( 
"com.sun.star.frame.FrameControl" );
+    _xControl = uno::Reference< awt::XControl >(xInst, uno::UNO_QUERY);
+    if(_xControl.is())
+    {
+        uno::Reference< awt::XWindowPeer >  xParent( 
aTopWindow.GetComponentInterface() );
 
-    m_xFrameControl->setVisible(sal_False);
-    Size aWinSize(aTopWindow.GetOutputSizePixel());
-    m_xFrameControl->setPosSize( 0, 0, aWinSize.Width(), aWinSize.Height(), 
awt::PosSize::SIZE );
+        uno::Reference< awt::XToolkit >  xToolkit( 
awt::Toolkit::create(xContext), uno::UNO_QUERY_THROW );
 
-    // create new doc
-    OUString sTempURL(cFactory);
-    if(sArgumentURL.Len())
-        sTempURL = sArgumentURL;
+        _xControl->createPeer( xToolkit, xParent );
 
-    uno::Sequence<beans::PropertyValue> aSeq(3);
-    beans::PropertyValue* pValues = aSeq.getArray();
-    pValues[0].Name = "ReadOnly";
-    sal_Bool bTrue = sal_True;
-    pValues[0].Value.setValue(&bTrue, ::getBooleanCppuType());
-    pValues[1].Name = "OpenFlags";
-    pValues[1].Value <<= OUString("-RB");
-    pValues[2].Name = "Referer";
-    pValues[2].Value <<= OUString("private:user");
+        uno::Reference< awt::XWindow >  xWin( _xControl, uno::UNO_QUERY );
+        xWin->setVisible(sal_False);
+        Size aWinSize(aTopWindow.GetOutputSizePixel());
+        xWin->setPosSize( 0, 0, aWinSize.Width(), aWinSize.Height(), 
awt::PosSize::SIZE );
+
+        uno::Reference< beans::XPropertySet >  xPrSet(xInst, uno::UNO_QUERY);
+        uno::Any aURL;
+        // create new doc
+        OUString sTempURL(cFactory);
+        if(sArgumentURL.Len())
+            sTempURL = sArgumentURL;
+        aURL <<= sTempURL;
+
+        uno::Sequence<beans::PropertyValue> aSeq(3);
+        beans::PropertyValue* pValues = aSeq.getArray();
+        pValues[0].Name = "ReadOnly";
+        sal_Bool bTrue = sal_True;
+        pValues[0].Value.setValue(&bTrue, ::getBooleanCppuType());
+        pValues[1].Name = "OpenFlags";
+        pValues[1].Value <<= OUString("-RB");
+        pValues[2].Name = "Referer";
+        pValues[2].Value <<= OUString("private:user");
+        uno::Any aArgs;
+        aArgs.setValue(&aSeq, 
::getCppuType((uno::Sequence<beans::PropertyValue>*)0));
 
-    m_xFrameControl->setLoaderArguments( aSeq );
-    //save and set readonly???
+        xPrSet->setPropertyValue( "LoaderArguments", aArgs );
+        //save and set readonly???
 
-    m_xFrameControl->setComponentURL( sTempURL );
+        xPrSet->setPropertyValue("ComponentURL", aURL);
 
-    aLoadedTimer.Start();
-    bServiceAvailable = sal_True;
+        aLoadedTimer.Start();
+        bServiceAvailable = sal_True;
+    }
 }
 
 void    SwOneExampleFrame::DisposeControl()
 {
     _xCursor = 0;
-    m_xFrameControl.clear();
+    if(_xControl.is())
+        _xControl->dispose();
+    _xControl = 0;
     _xModel = 0;
     _xController = 0;
 }
@@ -183,11 +193,14 @@ static void disableScrollBars(uno::Reference< 
beans::XPropertySet > xViewProps,
 
 IMPL_LINK( SwOneExampleFrame, TimeoutHdl, Timer*, pTimer )
 {
-    if(!m_xFrameControl.is())
+    if(!_xControl.is())
         return 0;
 
     // now get the model
-    uno::Reference< frame::XFrame >  xFrm = m_xFrameControl->getFrame();
+    uno::Reference< beans::XPropertySet >  xPrSet(_xControl, uno::UNO_QUERY);
+    uno::Any aFrame = xPrSet->getPropertyValue("Frame");
+    uno::Reference< frame::XFrame >  xFrm;
+    aFrame >>= xFrm;
 
     uno::Reference< beans::XPropertySet > xPropSet( xFrm, uno::UNO_QUERY );
     if ( xPropSet.is() )
@@ -349,8 +362,9 @@ IMPL_LINK( SwOneExampleFrame, TimeoutHdl, Timer*, pTimer )
             
xPProp->setPropertyValue(OUString::createFromAscii(SW_PROP_NAME_STR(UNO_NAME_RIGHT_MARGIN)),
 aZero);
         }
 
+        uno::Reference< awt::XWindow >  xWin( _xControl, uno::UNO_QUERY );
         Size aWinSize(aTopWindow.GetOutputSizePixel());
-        m_xFrameControl->setPosSize( 0, 0, aWinSize.Width(), 
aWinSize.Height(), awt::PosSize::SIZE );
+        xWin->setPosSize( 0, 0, aWinSize.Width(), aWinSize.Height(), 
awt::PosSize::SIZE );
 
         // can only be done here - the SFX changes the ScrollBar values
         disableScrollBars(xViewProps, nStyleFlags&EX_SHOW_ONLINE_LAYOUT);
@@ -363,7 +377,7 @@ IMPL_LINK( SwOneExampleFrame, TimeoutHdl, Timer*, pTimer )
         if(xScrCrsr.is())
             xScrCrsr->screenUp();
 
-        m_xFrameControl->setVisible( sal_True );
+        xWin->setVisible( sal_True );
         aTopWindow.Show();
 
         if( xTunnel.is() )
commit f5bf0fa958a709394be833584ed610a2d759ca32
Author: Noel Grandin <n...@peralex.com>
Date:   Wed Jul 24 13:39:31 2013 +0200

    Revert "fdo#67213 - crash on opening AutoText dialog (Ctrl+F3)"
    
    This reverts commit d8fa15f0ea3bbf38f5142f83121b7c72c483c7f5,
    which did not fix the problem.

diff --git a/sw/source/ui/utlui/unotools.cxx b/sw/source/ui/utlui/unotools.cxx
index 64d97c9..62fadcc 100644
--- a/sw/source/ui/utlui/unotools.cxx
+++ b/sw/source/ui/utlui/unotools.cxx
@@ -112,14 +112,7 @@ void SwOneExampleFrame::CreateControl()
     uno::Reference< lang::XMultiServiceFactory >
                                     xMgr = 
comphelper::getProcessServiceFactory();
     uno::Reference< uno::XComponentContext > xContext = 
comphelper::getProcessComponentContext();
-    try
-    {
-        m_xFrameControl = frame::FrameControl::create(xContext);
-    }
-    catch ( css::uno::DeploymentException& )
-    {
-        return;
-    }
+    m_xFrameControl = frame::FrameControl::create(xContext);
 
     uno::Reference< awt::XWindowPeer >  xParent( 
aTopWindow.GetComponentInterface() );
 
commit 88afc74751f250257baf13a89ec11d8e13d90436
Author: Noel Grandin <n...@peralex.com>
Date:   Tue Jul 23 15:05:21 2013 +0200

    convert #define to typedef
    
    Change-Id: I5c0325ade3b7c9ca8497111b554e2fd161e4334a

diff --git a/include/sfx2/sfxuno.hxx b/include/sfx2/sfxuno.hxx
index cab9200..2f69e6e 100644
--- a/include/sfx2/sfxuno.hxx
+++ b/include/sfx2/sfxuno.hxx
@@ -64,7 +64,7 @@ SFX2_DLLPUBLIC void TransformItems(         sal_uInt16
 
 bool GetEncryptionData_Impl( const SfxItemSet* pSet, css::uno::Sequence< 
css::beans::NamedValue >& aEncryptionData );
 
-#define FrameSearchFlags            sal_Int32
+typedef sal_Int32 FrameSearchFlags;
 
 
//________________________________________________________________________________________________________________________
 //  macros for declaration and definition of uno-services
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to