[Libreoffice-commits] core.git: 3 commits - framework/inc framework/Library_fwk.mk framework/source framework/util include/svtools sfx2/inc sfx2/Library_sfx.mk sfx2/source sfx2/util svtools/Library_svt.mk svtools/source
Jan Holesovsky
kendy at suse.cz
Tue Aug 6 10:56:55 PDT 2013
framework/Library_fwk.mk | 3
framework/inc/classes/droptargetlistener.hxx | 88 --
framework/inc/services.h | 1
framework/inc/services/backingcomp.hxx | 150 ---
framework/source/classes/droptargetlistener.cxx | 233 -----
framework/source/register/registerservices.cxx | 2
framework/source/services/backingcomp.cxx | 842 ---------------------
framework/source/services/backingwindow.cxx | 691 -----------------
framework/source/services/backingwindow.hxx | 132 ---
framework/source/services/frame.cxx | 4
framework/util/fwk.component | 3
include/svtools/openfiledroptargetlistener.hxx | 72 +
sfx2/Library_sfx.mk | 2
sfx2/inc/backingcomp.hxx | 138 +++
sfx2/source/appl/appuno.cxx | 2
sfx2/source/dialog/backingcomp.cxx | 831 ++++++++++++++++++++
sfx2/source/dialog/backingwindow.cxx | 690 +++++++++++++++++
sfx2/source/dialog/backingwindow.hxx | 130 +++
sfx2/util/sfx.component | 3
svtools/Library_svt.mk | 1
svtools/source/misc/openfiledroptargetlistener.cxx | 227 +++++
21 files changed, 2098 insertions(+), 2147 deletions(-)
New commits:
commit 3080087d2940e80b956e7750f50a30850778fa0d
Author: Jan Holesovsky <kendy at suse.cz>
Date: Tue Aug 6 19:51:05 2013 +0200
Basic de-uglyfication + added the purpose comment.
Change-Id: I4da0649bf4eb757a7d67beac19da58c4ac755c90
diff --git a/include/svtools/openfiledroptargetlistener.hxx b/include/svtools/openfiledroptargetlistener.hxx
index ef03fb0..2a6832d 100644
--- a/include/svtools/openfiledroptargetlistener.hxx
+++ b/include/svtools/openfiledroptargetlistener.hxx
@@ -30,31 +30,26 @@
#include <sot/exchange.hxx>
#include <tools/string.hxx>
+/** DropTargetListener that takes care of opening a file when it is dropped in the frame.
+*/
class SVT_DLLPUBLIC OpenFileDropTargetListener : public ::cppu::WeakImplHelper1< ::com::sun::star::datatransfer::dnd::XDropTargetListener >
{
- //___________________________________________
- // member
private:
-
/// uno service manager to create necessary services
css::uno::Reference< css::uno::XComponentContext > m_xContext;
+
/// weakreference to target frame (Don't use a hard reference. Owner can't delete us then!)
css::uno::WeakReference< css::frame::XFrame > m_xTargetFrame;
+
/// drag/drop info
DataFlavorExVector* m_pFormats;
- //___________________________________________
- // c++ interface
public:
+ OpenFileDropTargetListener( const css::uno::Reference< css::uno::XComponentContext >& xContext,
+ const css::uno::Reference< css::frame::XFrame >& xFrame );
+ ~OpenFileDropTargetListener();
- OpenFileDropTargetListener( const css::uno::Reference< css::uno::XComponentContext >& xContext ,
- const css::uno::Reference< css::frame::XFrame >& xFrame );
- ~OpenFileDropTargetListener( );
-
- //___________________________________________
- // uno interface
public:
-
// XEventListener
virtual void SAL_CALL disposing ( const css::lang::EventObject& Source ) throw(css::uno::RuntimeException);
@@ -65,15 +60,11 @@ class SVT_DLLPUBLIC OpenFileDropTargetListener : public ::cppu::WeakImplHelper1<
virtual void SAL_CALL dragOver ( const css::datatransfer::dnd::DropTargetDragEvent& dtde ) throw(css::uno::RuntimeException);
virtual void SAL_CALL dropActionChanged( const css::datatransfer::dnd::DropTargetDragEvent& dtde ) throw(css::uno::RuntimeException);
- //___________________________________________
- // internal helper
private:
-
- void implts_BeginDrag ( const css::uno::Sequence< css::datatransfer::DataFlavor >& rSupportedDataFlavors );
- void implts_EndDrag ( );
- sal_Bool implts_IsDropFormatSupported( SotFormatStringId nFormat );
- void implts_OpenFile ( const String& rFilePath );
-
+ void implts_BeginDrag( const css::uno::Sequence< css::datatransfer::DataFlavor >& rSupportedDataFlavors );
+ void implts_EndDrag();
+ sal_Bool implts_IsDropFormatSupported( SotFormatStringId nFormat );
+ void implts_OpenFile( const String& rFilePath );
};
#endif // SVTOOLS_DROPTARGETLISTENER_HXX
commit 9281fc72e7c45c8080a0373449191d73c26e3a08
Author: Jan Holesovsky <kendy at suse.cz>
Date: Tue Aug 6 19:46:05 2013 +0200
startcenter: Rename DropTargetListener to OpenFileTargetListener, ...
...move it to svtools, and kill the cut'n'pasted version.
Change-Id: Ifacf110ff08b359bd0f611dff20b3c5142e6bcc8
diff --git a/framework/Library_fwk.mk b/framework/Library_fwk.mk
index 0074049..7c40db8 100644
--- a/framework/Library_fwk.mk
+++ b/framework/Library_fwk.mk
@@ -65,7 +65,6 @@ $(eval $(call gb_Library_add_exception_objects,fwk,\
framework/source/accelerators/moduleacceleratorconfiguration \
framework/source/accelerators/presethandler \
framework/source/accelerators/storageholder \
- framework/source/classes/droptargetlistener \
framework/source/classes/framecontainer \
framework/source/classes/fwktabwindow \
framework/source/classes/menumanager \
diff --git a/framework/inc/classes/droptargetlistener.hxx b/framework/inc/classes/droptargetlistener.hxx
deleted file mode 100644
index c6fc73d..0000000
--- a/framework/inc/classes/droptargetlistener.hxx
+++ /dev/null
@@ -1,88 +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 __FRAMEWORK_CLASSES_DROPTARGETLISTENER_HXX_
-#define __FRAMEWORK_CLASSES_DROPTARGETLISTENER_HXX_
-
-#include <threadhelp/threadhelpbase.hxx>
-#include <general.h>
-
-#include <com/sun/star/datatransfer/dnd/XDropTargetListener.hpp>
-#include <com/sun/star/frame/XFrame.hpp>
-
-#include <cppuhelper/implbase1.hxx>
-
-#include <sot/exchange.hxx>
-#include <tools/string.hxx>
-
-namespace framework
-{
-
-class DropTargetListener : private ThreadHelpBase
- , public ::cppu::WeakImplHelper1< ::com::sun::star::datatransfer::dnd::XDropTargetListener >
-{
- //___________________________________________
- // member
- private:
-
- /// uno service manager to create necessary services
- css::uno::Reference< css::uno::XComponentContext > m_xContext;
- /// weakreference to target frame (Don't use a hard reference. Owner can't delete us then!)
- css::uno::WeakReference< css::frame::XFrame > m_xTargetFrame;
- /// drag/drop info
- DataFlavorExVector* m_pFormats;
-
- //___________________________________________
- // c++ interface
- public:
-
- DropTargetListener( const css::uno::Reference< css::uno::XComponentContext >& xContext ,
- const css::uno::Reference< css::frame::XFrame >& xFrame );
- ~DropTargetListener( );
-
- //___________________________________________
- // uno interface
- public:
-
- // XEventListener
- virtual void SAL_CALL disposing ( const css::lang::EventObject& Source ) throw(css::uno::RuntimeException);
-
- // XDropTargetListener
- virtual void SAL_CALL drop ( const css::datatransfer::dnd::DropTargetDropEvent& dtde ) throw(css::uno::RuntimeException);
- virtual void SAL_CALL dragEnter ( const css::datatransfer::dnd::DropTargetDragEnterEvent& dtdee ) throw(css::uno::RuntimeException);
- virtual void SAL_CALL dragExit ( const css::datatransfer::dnd::DropTargetEvent& dte ) throw(css::uno::RuntimeException);
- virtual void SAL_CALL dragOver ( const css::datatransfer::dnd::DropTargetDragEvent& dtde ) throw(css::uno::RuntimeException);
- virtual void SAL_CALL dropActionChanged( const css::datatransfer::dnd::DropTargetDragEvent& dtde ) throw(css::uno::RuntimeException);
-
- //___________________________________________
- // internal helper
- private:
-
- void implts_BeginDrag ( const css::uno::Sequence< css::datatransfer::DataFlavor >& rSupportedDataFlavors );
- void implts_EndDrag ( );
- sal_Bool implts_IsDropFormatSupported( SotFormatStringId nFormat );
- void implts_OpenFile ( const String& rFilePath );
-
-}; // class DropTargetListener
-
-} // namespace framework
-
-#endif // __FRAMEWORK_CLASSES_DROPTARGETLISTENER_HXX_
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/framework/source/classes/droptargetlistener.cxx b/framework/source/classes/droptargetlistener.cxx
deleted file mode 100644
index 1b00c54..0000000
--- a/framework/source/classes/droptargetlistener.cxx
+++ /dev/null
@@ -1,233 +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 .
- */
-
-#include <classes/droptargetlistener.hxx>
-#include <threadhelp/readguard.hxx>
-#include <threadhelp/writeguard.hxx>
-#include <targets.h>
-#include <services.h>
-
-#include <com/sun/star/datatransfer/dnd/DNDConstants.hpp>
-#include <com/sun/star/frame/XDispatch.hpp>
-#include <com/sun/star/frame/XDispatchProvider.hpp>
-#include <com/sun/star/beans/PropertyValue.hpp>
-#include <com/sun/star/util/URLTransformer.hpp>
-#include <com/sun/star/util/XURLTransformer.hpp>
-
-#include <svtools/transfer.hxx>
-#include <unotools/localfilehelper.hxx>
-#include <sot/filelist.hxx>
-#include <comphelper/processfactory.hxx>
-
-#include <osl/file.hxx>
-#include <vcl/svapp.hxx>
-
-namespace framework
-{
-
-DropTargetListener::DropTargetListener( const css::uno::Reference< css::uno::XComponentContext >& xContext,
- const css::uno::Reference< css::frame::XFrame >& xFrame )
- : ThreadHelpBase ( &Application::GetSolarMutex() )
- , m_xContext ( xContext )
- , m_xTargetFrame ( xFrame )
- , m_pFormats ( new DataFlavorExVector )
-{
-}
-
-// -----------------------------------------------------------------------------
-
-DropTargetListener::~DropTargetListener()
-{
- m_xTargetFrame.clear();
- m_xContext.clear();
- delete m_pFormats;
- m_pFormats = NULL;
-}
-
-// -----------------------------------------------------------------------------
-
-void SAL_CALL DropTargetListener::disposing( const css::lang::EventObject& ) throw( css::uno::RuntimeException )
-{
- m_xTargetFrame.clear();
- m_xContext.clear();
-}
-
-// -----------------------------------------------------------------------------
-
-void SAL_CALL DropTargetListener::drop( const css::datatransfer::dnd::DropTargetDropEvent& dtde ) throw( css::uno::RuntimeException )
-{
- const sal_Int8 nAction = dtde.DropAction;
-
- try
- {
- if ( css::datatransfer::dnd::DNDConstants::ACTION_NONE != nAction )
- {
- TransferableDataHelper aHelper( dtde.Transferable );
- sal_Bool bFormatFound = sal_False;
- FileList aFileList;
-
- // at first check filelist format
- if ( aHelper.GetFileList( SOT_FORMAT_FILE_LIST, aFileList ) )
- {
- sal_uLong i, nCount = aFileList.Count();
- for ( i = 0; i < nCount; ++i )
- implts_OpenFile( aFileList.GetFile(i) );
- bFormatFound = sal_True;
- }
-
- // then, if necessary, the file format
- String aFilePath;
- if ( !bFormatFound && aHelper.GetString( SOT_FORMAT_FILE, aFilePath ) )
- implts_OpenFile( aFilePath );
- }
- dtde.Context->dropComplete( css::datatransfer::dnd::DNDConstants::ACTION_NONE != nAction );
- }
- catch( const ::com::sun::star::uno::Exception& )
- {
- }
-}
-
-// -----------------------------------------------------------------------------
-
-void SAL_CALL DropTargetListener::dragEnter( const css::datatransfer::dnd::DropTargetDragEnterEvent& dtdee ) throw( css::uno::RuntimeException )
-{
- try
- {
- implts_BeginDrag( dtdee.SupportedDataFlavors );
- }
- catch( const ::com::sun::star::uno::Exception& )
- {
- }
-
- dragOver( dtdee );
-}
-
-// -----------------------------------------------------------------------------
-
-void SAL_CALL DropTargetListener::dragExit( const css::datatransfer::dnd::DropTargetEvent& ) throw( css::uno::RuntimeException )
-{
- try
- {
- implts_EndDrag();
- }
- catch( const ::com::sun::star::uno::Exception& )
- {
- }
-}
-
-// -----------------------------------------------------------------------------
-
-void SAL_CALL DropTargetListener::dragOver( const css::datatransfer::dnd::DropTargetDragEvent& dtde ) throw( css::uno::RuntimeException )
-{
- try
- {
- sal_Bool bAccept = ( implts_IsDropFormatSupported( SOT_FORMAT_FILE ) ||
- implts_IsDropFormatSupported( SOT_FORMAT_FILE_LIST ) );
-
- if ( !bAccept )
- dtde.Context->rejectDrag();
- else
- dtde.Context->acceptDrag( css::datatransfer::dnd::DNDConstants::ACTION_COPY );
- }
- catch( const ::com::sun::star::uno::Exception& )
- {
- }
-}
-
-// -----------------------------------------------------------------------------
-
-void SAL_CALL DropTargetListener::dropActionChanged( const css::datatransfer::dnd::DropTargetDragEvent& ) throw( css::uno::RuntimeException )
-{
-}
-
-void DropTargetListener::implts_BeginDrag( const css::uno::Sequence< css::datatransfer::DataFlavor >& rSupportedDataFlavors )
-{
- /* SAFE { */
- WriteGuard aWriteLock(m_aLock);
- m_pFormats->clear();
- TransferableDataHelper::FillDataFlavorExVector(rSupportedDataFlavors,*m_pFormats);
- aWriteLock.unlock();
- /* } SAFE */
-}
-
-void DropTargetListener::implts_EndDrag()
-{
- /* SAFE { */
- WriteGuard aWriteLock(m_aLock);
- m_pFormats->clear();
- aWriteLock.unlock();
- /* } SAFE */
-}
-
-sal_Bool DropTargetListener::implts_IsDropFormatSupported( SotFormatStringId nFormat )
-{
- /* SAFE { */
- ReadGuard aReadLock(m_aLock);
- DataFlavorExVector::iterator aIter( m_pFormats->begin() ), aEnd( m_pFormats->end() );
- sal_Bool bRet = sal_False;
-
- while ( aIter != aEnd )
- {
- if ( nFormat == (*aIter++).mnSotId )
- {
- bRet = sal_True;
- aIter = aEnd;
- }
- }
- aReadLock.unlock();
- /* } SAFE */
-
- return bRet;
-}
-
-void DropTargetListener::implts_OpenFile( const String& rFilePath )
-{
- OUString aFileURL;
- if ( !::utl::LocalFileHelper::ConvertPhysicalNameToURL( rFilePath, aFileURL ) )
- aFileURL = rFilePath;
-
- ::osl::FileStatus aStatus( osl_FileStatus_Mask_FileURL );
- ::osl::DirectoryItem aItem;
- if( ::osl::FileBase::E_None == ::osl::DirectoryItem::get( aFileURL, aItem ) &&
- ::osl::FileBase::E_None == aItem.getFileStatus( aStatus ) )
- aFileURL = aStatus.getFileURL();
-
- // open file
- /* SAFE { */
- ReadGuard aReadLock(m_aLock);
- css::uno::Reference< css::frame::XFrame > xTargetFrame( m_xTargetFrame.get(), css::uno::UNO_QUERY );
- css::uno::Reference< css::util::XURLTransformer > xParser ( css::util::URLTransformer::create(m_xContext) );
- aReadLock.unlock();
- /* } SAFE */
- if (xTargetFrame.is() && xParser.is())
- {
- css::util::URL aURL;
- aURL.Complete = aFileURL;
- xParser->parseStrict(aURL);
-
- css::uno::Reference < css::frame::XDispatchProvider > xProvider( xTargetFrame, css::uno::UNO_QUERY );
- css::uno::Reference< css::frame::XDispatch > xDispatcher = xProvider->queryDispatch( aURL, SPECIALTARGET_DEFAULT, 0 );
- if ( xDispatcher.is() )
- xDispatcher->dispatch( aURL, css::uno::Sequence < css::beans::PropertyValue >() );
- }
-}
-
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/framework/source/services/frame.cxx b/framework/source/services/frame.cxx
index 69a01d5..94065be 100644
--- a/framework/source/services/frame.cxx
+++ b/framework/source/services/frame.cxx
@@ -27,7 +27,7 @@
#include <helper/oframes.hxx>
#include <helper/statusindicatorfactory.hxx>
#include <framework/titlehelper.hxx>
-#include <classes/droptargetlistener.hxx>
+#include <svtools/openfiledroptargetlistener.hxx>
#include <classes/taskcreator.hxx>
#include <loadenv/targethelper.hxx>
#include <framework/framelistanalyzer.hxx>
@@ -191,7 +191,7 @@ DEFINE_INIT_SERVICE ( Frame,
//-------------------------------------------------------------------------------------------------------------
// Initialize a the drop target listener.
// We hold member as reference ... not as pointer too!
- DropTargetListener* pDropListener = new DropTargetListener( m_xContext, this );
+ OpenFileDropTargetListener* pDropListener = new OpenFileDropTargetListener( m_xContext, this );
m_xDropTargetListener = css::uno::Reference< css::datatransfer::dnd::XDropTargetListener >( static_cast< ::cppu::OWeakObject* >(pDropListener), css::uno::UNO_QUERY );
// Safe impossible cases
diff --git a/include/sfx2/droptargetlistener.hxx b/include/svtools/openfiledroptargetlistener.hxx
similarity index 86%
rename from include/sfx2/droptargetlistener.hxx
rename to include/svtools/openfiledroptargetlistener.hxx
index 102a393..ef03fb0 100644
--- a/include/sfx2/droptargetlistener.hxx
+++ b/include/svtools/openfiledroptargetlistener.hxx
@@ -17,8 +17,10 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef _SXF_DROPTARGETLISTENER_HXX
-#define _SXF_DROPTARGETLISTENER_HXX
+#ifndef SVTOOLS_DROPTARGETLISTENER_HXX
+#define SVTOOLS_DROPTARGETLISTENER_HXX
+
+#include <svtools/svtdllapi.h>
#include <com/sun/star/datatransfer/dnd/XDropTargetListener.hpp>
#include <com/sun/star/frame/XFrame.hpp>
@@ -28,7 +30,7 @@
#include <sot/exchange.hxx>
#include <tools/string.hxx>
-class DropTargetListener : public ::cppu::WeakImplHelper1< ::com::sun::star::datatransfer::dnd::XDropTargetListener >
+class SVT_DLLPUBLIC OpenFileDropTargetListener : public ::cppu::WeakImplHelper1< ::com::sun::star::datatransfer::dnd::XDropTargetListener >
{
//___________________________________________
// member
@@ -45,9 +47,9 @@ class DropTargetListener : public ::cppu::WeakImplHelper1< ::com::sun::star::dat
// c++ interface
public:
- DropTargetListener( const css::uno::Reference< css::uno::XComponentContext >& xContext ,
+ OpenFileDropTargetListener( const css::uno::Reference< css::uno::XComponentContext >& xContext ,
const css::uno::Reference< css::frame::XFrame >& xFrame );
- ~DropTargetListener( );
+ ~OpenFileDropTargetListener( );
//___________________________________________
// uno interface
@@ -72,8 +74,8 @@ class DropTargetListener : public ::cppu::WeakImplHelper1< ::com::sun::star::dat
sal_Bool implts_IsDropFormatSupported( SotFormatStringId nFormat );
void implts_OpenFile ( const String& rFilePath );
-}; // class DropTargetListener
+};
-#endif // _SXF_DROPTARGETLISTENER_HXX
+#endif // SVTOOLS_DROPTARGETLISTENER_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/Library_sfx.mk b/sfx2/Library_sfx.mk
index 1c5f507..4b8f424 100644
--- a/sfx2/Library_sfx.mk
+++ b/sfx2/Library_sfx.mk
@@ -129,7 +129,6 @@ $(eval $(call gb_Library_add_exception_objects,sfx,\
sfx2/source/config/evntconf \
sfx2/source/control/bindings \
sfx2/source/control/ctrlitem \
- sfx2/source/control/droptargetlistener \
sfx2/source/control/minfitem \
sfx2/source/control/msg \
sfx2/source/control/msgpool \
diff --git a/sfx2/source/dialog/backingcomp.cxx b/sfx2/source/dialog/backingcomp.cxx
index 6b7cd16..906922c 100644
--- a/sfx2/source/dialog/backingcomp.cxx
+++ b/sfx2/source/dialog/backingcomp.cxx
@@ -21,7 +21,7 @@
#include "backingwindow.hxx"
-#include <sfx2/droptargetlistener.hxx>
+#include <svtools/openfiledroptargetlistener.hxx>
#include <helpid.hrc>
@@ -454,7 +454,7 @@ void SAL_CALL BackingComp::attachFrame( /*IN*/ const css::uno::Reference< css::f
m_xFrame = xFrame;
// establish drag&drop mode
- DropTargetListener* pDropListener = new DropTargetListener( m_xContext, m_xFrame);
+ OpenFileDropTargetListener* pDropListener = new OpenFileDropTargetListener( m_xContext, m_xFrame);
m_xDropTargetListener = css::uno::Reference< css::datatransfer::dnd::XDropTargetListener >(static_cast< ::cppu::OWeakObject* >(pDropListener), css::uno::UNO_QUERY);
css::uno::Reference< css::awt::XToolkit2 > xToolkit = css::awt::Toolkit::create( m_xContext );
diff --git a/svtools/Library_svt.mk b/svtools/Library_svt.mk
index 89456ec..18fea9b 100644
--- a/svtools/Library_svt.mk
+++ b/svtools/Library_svt.mk
@@ -179,6 +179,7 @@ $(eval $(call gb_Library_add_exception_objects,svt,\
svtools/source/misc/itemdel \
svtools/source/misc/langtab \
svtools/source/misc/langhelp \
+ svtools/source/misc/openfiledroptargetlistener \
svtools/source/misc/sampletext \
svtools/source/misc/stringtransfer \
svtools/source/misc/svtaccessiblefactory \
diff --git a/sfx2/source/control/droptargetlistener.cxx b/svtools/source/misc/openfiledroptargetlistener.cxx
similarity index 80%
rename from sfx2/source/control/droptargetlistener.cxx
rename to svtools/source/misc/openfiledroptargetlistener.cxx
index cb40283..cbdb81a 100644
--- a/sfx2/source/control/droptargetlistener.cxx
+++ b/svtools/source/misc/openfiledroptargetlistener.cxx
@@ -17,7 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <sfx2/droptargetlistener.hxx>
+#include <svtools/openfiledroptargetlistener.hxx>
#include <com/sun/star/datatransfer/dnd/DNDConstants.hpp>
#include <com/sun/star/frame/XDispatch.hpp>
@@ -34,9 +34,10 @@
#include <osl/file.hxx>
#include <vcl/svapp.hxx>
-const OUString SPECIALTARGET_DEFAULT("_default");
+// Create a new task or recycle an existing one
+const char SPECIALTARGET_DEFAULT[] = "_default";
-DropTargetListener::DropTargetListener( const css::uno::Reference< css::uno::XComponentContext >& xContext,
+OpenFileDropTargetListener::OpenFileDropTargetListener( const css::uno::Reference< css::uno::XComponentContext >& xContext,
const css::uno::Reference< css::frame::XFrame >& xFrame )
: m_xContext ( xContext )
, m_xTargetFrame ( xFrame )
@@ -46,7 +47,7 @@ DropTargetListener::DropTargetListener( const css::uno::Reference< css::uno::XCo
// -----------------------------------------------------------------------------
-DropTargetListener::~DropTargetListener()
+OpenFileDropTargetListener::~OpenFileDropTargetListener()
{
m_xTargetFrame.clear();
m_xContext.clear();
@@ -56,7 +57,7 @@ DropTargetListener::~DropTargetListener()
// -----------------------------------------------------------------------------
-void SAL_CALL DropTargetListener::disposing( const css::lang::EventObject& ) throw( css::uno::RuntimeException )
+void SAL_CALL OpenFileDropTargetListener::disposing( const css::lang::EventObject& ) throw( css::uno::RuntimeException )
{
m_xTargetFrame.clear();
m_xContext.clear();
@@ -64,7 +65,7 @@ void SAL_CALL DropTargetListener::disposing( const css::lang::EventObject& ) thr
// -----------------------------------------------------------------------------
-void SAL_CALL DropTargetListener::drop( const css::datatransfer::dnd::DropTargetDropEvent& dtde ) throw( css::uno::RuntimeException )
+void SAL_CALL OpenFileDropTargetListener::drop( const css::datatransfer::dnd::DropTargetDropEvent& dtde ) throw( css::uno::RuntimeException )
{
const sal_Int8 nAction = dtde.DropAction;
@@ -99,7 +100,7 @@ void SAL_CALL DropTargetListener::drop( const css::datatransfer::dnd::DropTarget
// -----------------------------------------------------------------------------
-void SAL_CALL DropTargetListener::dragEnter( const css::datatransfer::dnd::DropTargetDragEnterEvent& dtdee ) throw( css::uno::RuntimeException )
+void SAL_CALL OpenFileDropTargetListener::dragEnter( const css::datatransfer::dnd::DropTargetDragEnterEvent& dtdee ) throw( css::uno::RuntimeException )
{
try
{
@@ -114,7 +115,7 @@ void SAL_CALL DropTargetListener::dragEnter( const css::datatransfer::dnd::DropT
// -----------------------------------------------------------------------------
-void SAL_CALL DropTargetListener::dragExit( const css::datatransfer::dnd::DropTargetEvent& ) throw( css::uno::RuntimeException )
+void SAL_CALL OpenFileDropTargetListener::dragExit( const css::datatransfer::dnd::DropTargetEvent& ) throw( css::uno::RuntimeException )
{
try
{
@@ -127,7 +128,7 @@ void SAL_CALL DropTargetListener::dragExit( const css::datatransfer::dnd::DropTa
// -----------------------------------------------------------------------------
-void SAL_CALL DropTargetListener::dragOver( const css::datatransfer::dnd::DropTargetDragEvent& dtde ) throw( css::uno::RuntimeException )
+void SAL_CALL OpenFileDropTargetListener::dragOver( const css::datatransfer::dnd::DropTargetDragEvent& dtde ) throw( css::uno::RuntimeException )
{
try
{
@@ -146,31 +147,34 @@ void SAL_CALL DropTargetListener::dragOver( const css::datatransfer::dnd::DropTa
// -----------------------------------------------------------------------------
-void SAL_CALL DropTargetListener::dropActionChanged( const css::datatransfer::dnd::DropTargetDragEvent& ) throw( css::uno::RuntimeException )
+void SAL_CALL OpenFileDropTargetListener::dropActionChanged( const css::datatransfer::dnd::DropTargetDragEvent& ) throw( css::uno::RuntimeException )
{
}
-void DropTargetListener::implts_BeginDrag( const css::uno::Sequence< css::datatransfer::DataFlavor >& rSupportedDataFlavors )
+void OpenFileDropTargetListener::implts_BeginDrag( const css::uno::Sequence< css::datatransfer::DataFlavor >& rSupportedDataFlavors )
{
/* SAFE { */
SolarMutexGuard aGuard;
+
m_pFormats->clear();
TransferableDataHelper::FillDataFlavorExVector(rSupportedDataFlavors,*m_pFormats);
/* } SAFE */
}
-void DropTargetListener::implts_EndDrag()
+void OpenFileDropTargetListener::implts_EndDrag()
{
/* SAFE { */
SolarMutexGuard aGuard;
+
m_pFormats->clear();
/* } SAFE */
}
-sal_Bool DropTargetListener::implts_IsDropFormatSupported( SotFormatStringId nFormat )
+sal_Bool OpenFileDropTargetListener::implts_IsDropFormatSupported( SotFormatStringId nFormat )
{
/* SAFE { */
SolarMutexGuard aGuard;
+
DataFlavorExVector::iterator aIter( m_pFormats->begin() ), aEnd( m_pFormats->end() );
sal_Bool bRet = sal_False;
@@ -182,12 +186,12 @@ sal_Bool DropTargetListener::implts_IsDropFormatSupported( SotFormatStringId nFo
aIter = aEnd;
}
}
+ /* } SAFE */
return bRet;
- /* } SAFE */
}
-void DropTargetListener::implts_OpenFile( const String& rFilePath )
+void OpenFileDropTargetListener::implts_OpenFile( const String& rFilePath )
{
OUString aFileURL;
if ( !::utl::LocalFileHelper::ConvertPhysicalNameToURL( rFilePath, aFileURL ) )
@@ -202,6 +206,7 @@ void DropTargetListener::implts_OpenFile( const String& rFilePath )
// open file
/* SAFE { */
SolarMutexGuard aGuard;
+
css::uno::Reference< css::frame::XFrame > xTargetFrame( m_xTargetFrame.get(), css::uno::UNO_QUERY );
css::uno::Reference< css::util::XURLTransformer > xParser ( css::util::URLTransformer::create(m_xContext) );
commit b60f6da2e13706dddc42d1045af95ad633e1829f
Author: Krisztian Pinter <pin.terminator at gmail.com>
Date: Wed Jul 31 20:43:18 2013 +0200
startcenter: Move BackingComp & BackingWindow to sfx2
BackingWindow will use ThumbnailView from sfx2 and it had to be moved
to avoid a circular dependency
Change-Id: I33a5982ed9e51307476c837f3f534ded7ed38ee0
diff --git a/framework/Library_fwk.mk b/framework/Library_fwk.mk
index 2133a94..0074049 100644
--- a/framework/Library_fwk.mk
+++ b/framework/Library_fwk.mk
@@ -108,8 +108,6 @@ $(eval $(call gb_Library_add_exception_objects,fwk,\
framework/source/register/registerservices \
framework/source/services/ContextChangeEventMultiplexer \
framework/source/services/autorecovery \
- framework/source/services/backingcomp \
- framework/source/services/backingwindow \
framework/source/services/desktop \
framework/source/services/frame \
framework/source/services/modulemanager \
diff --git a/framework/inc/services.h b/framework/inc/services.h
index b7fa4ca..2f759c5 100644
--- a/framework/inc/services.h
+++ b/framework/inc/services.h
@@ -83,7 +83,6 @@ namespace framework{
#define IMPLEMENTATIONNAME_MODULEMANAGER DECLARE_ASCII("com.sun.star.comp.framework.ModuleManager" )
#define IMPLEMENTATIONNAME_MODULEUICONFIGURATIONMANAGERSUPPLIER DECLARE_ASCII("com.sun.star.comp.framework.ModuleUIConfigurationManagerSupplier" )
#define IMPLEMENTATIONNAME_MENUBARFACTORY DECLARE_ASCII("com.sun.star.comp.framework.MenuBarFactory" )
-#define IMPLEMENTATIONNAME_STARTMODULE DECLARE_ASCII("com.sun.star.comp.framework.BackingComp" )
#define IMPLEMENTATIONNAME_WINDOWSTATECONFIGURATION DECLARE_ASCII("com.sun.star.comp.framework.WindowStateConfiguration" )
#define IMPLEMENTATIONNAME_TOOLBARFACTORY DECLARE_ASCII("com.sun.star.comp.framework.ToolBarFactory" )
#define IMPLEMENTATIONNAME_ADDONSTOOLBARFACTORY DECLARE_ASCII("com.sun.star.comp.framework.AddonsToolBarFactory" )
diff --git a/framework/source/register/registerservices.cxx b/framework/source/register/registerservices.cxx
index 8ec134c..bf3105b 100644
--- a/framework/source/register/registerservices.cxx
+++ b/framework/source/register/registerservices.cxx
@@ -40,7 +40,6 @@
#include <services/modulemanager.hxx>
#include <jobs/jobexecutor.hxx>
#include <jobs/jobdispatch.hxx>
-#include <services/backingcomp.hxx>
#include <services/layoutmanager.hxx>
#include <uifactory/uielementfactorymanager.hxx>
#include <uifactory/uicontrollerfactory.hxx>
@@ -79,7 +78,6 @@ COMPONENTGETFACTORY ( fwk,
IFFACTORY( ::framework::Frame ) else
IFFACTORY( ::framework::JobExecutor ) else
IFFACTORY( ::framework::JobDispatch ) else
- IFFACTORY( ::framework::BackingComp ) else
IFFACTORY( ::framework::LayoutManager ) else
IFFACTORY( ::framework::UIElementFactoryManager ) else
IFFACTORY( ::framework::PopupMenuControllerFactory ) else
diff --git a/framework/source/services/backingwindow.hxx b/framework/source/services/backingwindow.hxx
deleted file mode 100644
index 1c58f9e..0000000
--- a/framework/source/services/backingwindow.hxx
+++ /dev/null
@@ -1,132 +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 FRAMEWORK_BACKINGWINDOW_HXX
-#define FRAMEWORK_BACKINGWINDOW_HXX
-
-#include <rtl/ustring.hxx>
-
-#include <vcl/builder.hxx>
-#include <vcl/button.hxx>
-#include <vcl/menubtn.hxx>
-#include <vcl/bitmapex.hxx>
-#include <vcl/toolbox.hxx>
-#include <vcl/layout.hxx>
-
-#include <svtools/acceleratorexecute.hxx>
-#include <unotools/moduleoptions.hxx>
-
-#include <com/sun/star/uno/XComponentContext.hpp>
-#include <com/sun/star/frame/XUIControllerFactory.hpp>
-#include <com/sun/star/frame/XPopupMenuController.hpp>
-#include <com/sun/star/awt/XPopupMenu.hpp>
-#include <com/sun/star/frame/XDispatchProvider.hpp>
-#include <com/sun/star/frame/XDesktop.hpp>
-#include <com/sun/star/frame/XFrame.hpp>
-#include <com/sun/star/frame/XTerminateListener.hpp>
-#include <com/sun/star/document/XEventListener.hpp>
-#include <com/sun/star/document/XEventBroadcaster.hpp>
-#include <com/sun/star/util/XURLTransformer.hpp>
-#include <com/sun/star/ui/dialogs/XFilePicker.hpp>
-#include <com/sun/star/ui/dialogs/XFilePickerControlAccess.hpp>
-#include <com/sun/star/ui/dialogs/XFilterManager.hpp>
-#include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
-#include <com/sun/star/ui/dialogs/ExecutableDialogResults.hpp>
-
-#include <set>
-
-class MnemonicGenerator;
-
-namespace framework
-{
- class BackingWindow : public Window, public VclBuilderContainer
- {
- com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > mxContext;
- com::sun::star::uno::Reference<com::sun::star::frame::XDispatchProvider > mxDesktopDispatchProvider;
- com::sun::star::uno::Reference<com::sun::star::frame::XFrame> mxFrame;
- com::sun::star::uno::Reference< com::sun::star::frame::XUIControllerFactory > mxPopupMenuFactory;
- com::sun::star::uno::Reference< com::sun::star::frame::XPopupMenuController > mxPopupMenuController;
- com::sun::star::uno::Reference< com::sun::star::awt::XPopupMenu > mxPopupMenu;
-
- PushButton* mpWriterButton;
- PushButton* mpCalcButton;
- PushButton* mpImpressButton;
- MenuButton* mpOpenButton;
- PushButton* mpDrawButton;
- PushButton* mpDBButton;
- PushButton* mpMathButton;
- PushButton* mpTemplateButton;
-
- PushButton* mpExtensionsButton;
- PushButton* mpInfoButton;
- PushButton* mpTplRepButton;
-
- VclGrid* mpStartCenterContainer;
-
- BitmapEx maBackgroundLeft;
- BitmapEx maBackgroundMiddle;
- BitmapEx maBackgroundRight;
-
- Rectangle maStartCentButtons;
-
- bool mbInitControls;
- sal_Int32 mnHideExternalLinks;
- svt::AcceleratorExecute* mpAccExec;
-
- int mnSCWidth;
- int mnSCHeight;
-
- void setupButton( PushButton* pButton, const OUString& rURL, const std::set<OUString>& rURLS,
- SvtModuleOptions& rOpt, SvtModuleOptions::EModule eMod );
-
- void setupExternalLink( PushButton* pButton );
-
- void dispatchURL( const OUString& i_rURL,
- const OUString& i_rTarget = OUString( "_default" ),
- const com::sun::star::uno::Reference< com::sun::star::frame::XDispatchProvider >& i_xProv = com::sun::star::uno::Reference< com::sun::star::frame::XDispatchProvider >(),
- const com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& = com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >()
- );
-
- DECL_LINK( ClickHdl, Button* );
- DECL_LINK( ExtLinkClickHdl, Button* );
- DECL_LINK( ActivateHdl, Button* );
- DECL_LINK( WindowEventListener, VclSimpleEvent* );
-
- void initControls();
- void initBackground();
- void prepareRecentFileMenu();
-
- public:
- BackingWindow( Window* pParent );
- ~BackingWindow();
-
- virtual void Paint( const Rectangle& rRect );
- virtual void Resize();
- virtual long Notify( NotifyEvent& rNEvt );
-
- virtual Size GetOptimalSize() const;
-
- void setOwningFrame( const com::sun::star::uno::Reference< com::sun::star::frame::XFrame >& xFrame );
- };
-
-}
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/framework/util/fwk.component b/framework/util/fwk.component
index f46b712..27e44bd 100644
--- a/framework/util/fwk.component
+++ b/framework/util/fwk.component
@@ -28,9 +28,6 @@
<implementation name="com.sun.star.comp.framework.AutoRecovery">
<service name="com.sun.star.frame.AutoRecovery"/>
</implementation>
- <implementation name="com.sun.star.comp.framework.BackingComp">
- <service name="com.sun.star.frame.StartModule"/>
- </implementation>
<implementation name="com.sun.star.comp.framework.ControlMenuController">
<service name="com.sun.star.frame.PopupMenuController"/>
</implementation>
diff --git a/include/sfx2/droptargetlistener.hxx b/include/sfx2/droptargetlistener.hxx
new file mode 100644
index 0000000..102a393
--- /dev/null
+++ b/include/sfx2/droptargetlistener.hxx
@@ -0,0 +1,79 @@
+/* -*- 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 _SXF_DROPTARGETLISTENER_HXX
+#define _SXF_DROPTARGETLISTENER_HXX
+
+#include <com/sun/star/datatransfer/dnd/XDropTargetListener.hpp>
+#include <com/sun/star/frame/XFrame.hpp>
+
+#include <cppuhelper/implbase1.hxx>
+
+#include <sot/exchange.hxx>
+#include <tools/string.hxx>
+
+class DropTargetListener : public ::cppu::WeakImplHelper1< ::com::sun::star::datatransfer::dnd::XDropTargetListener >
+{
+ //___________________________________________
+ // member
+ private:
+
+ /// uno service manager to create necessary services
+ css::uno::Reference< css::uno::XComponentContext > m_xContext;
+ /// weakreference to target frame (Don't use a hard reference. Owner can't delete us then!)
+ css::uno::WeakReference< css::frame::XFrame > m_xTargetFrame;
+ /// drag/drop info
+ DataFlavorExVector* m_pFormats;
+
+ //___________________________________________
+ // c++ interface
+ public:
+
+ DropTargetListener( const css::uno::Reference< css::uno::XComponentContext >& xContext ,
+ const css::uno::Reference< css::frame::XFrame >& xFrame );
+ ~DropTargetListener( );
+
+ //___________________________________________
+ // uno interface
+ public:
+
+ // XEventListener
+ virtual void SAL_CALL disposing ( const css::lang::EventObject& Source ) throw(css::uno::RuntimeException);
+
+ // XDropTargetListener
+ virtual void SAL_CALL drop ( const css::datatransfer::dnd::DropTargetDropEvent& dtde ) throw(css::uno::RuntimeException);
+ virtual void SAL_CALL dragEnter ( const css::datatransfer::dnd::DropTargetDragEnterEvent& dtdee ) throw(css::uno::RuntimeException);
+ virtual void SAL_CALL dragExit ( const css::datatransfer::dnd::DropTargetEvent& dte ) throw(css::uno::RuntimeException);
+ virtual void SAL_CALL dragOver ( const css::datatransfer::dnd::DropTargetDragEvent& dtde ) throw(css::uno::RuntimeException);
+ virtual void SAL_CALL dropActionChanged( const css::datatransfer::dnd::DropTargetDragEvent& dtde ) throw(css::uno::RuntimeException);
+
+ //___________________________________________
+ // internal helper
+ private:
+
+ void implts_BeginDrag ( const css::uno::Sequence< css::datatransfer::DataFlavor >& rSupportedDataFlavors );
+ void implts_EndDrag ( );
+ sal_Bool implts_IsDropFormatSupported( SotFormatStringId nFormat );
+ void implts_OpenFile ( const String& rFilePath );
+
+}; // class DropTargetListener
+
+#endif // _SXF_DROPTARGETLISTENER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/Library_sfx.mk b/sfx2/Library_sfx.mk
index 52660b7..1c5f507 100644
--- a/sfx2/Library_sfx.mk
+++ b/sfx2/Library_sfx.mk
@@ -129,6 +129,7 @@ $(eval $(call gb_Library_add_exception_objects,sfx,\
sfx2/source/config/evntconf \
sfx2/source/control/bindings \
sfx2/source/control/ctrlitem \
+ sfx2/source/control/droptargetlistener \
sfx2/source/control/minfitem \
sfx2/source/control/msg \
sfx2/source/control/msgpool \
@@ -150,6 +151,8 @@ $(eval $(call gb_Library_add_exception_objects,sfx,\
sfx2/source/control/thumbnailview \
sfx2/source/control/unoctitm \
sfx2/source/dialog/alienwarn \
+ sfx2/source/dialog/backingcomp \
+ sfx2/source/dialog/backingwindow \
sfx2/source/dialog/basedlgs \
sfx2/source/dialog/checkin \
sfx2/source/dialog/dialoghelper \
diff --git a/framework/inc/services/backingcomp.hxx b/sfx2/inc/backingcomp.hxx
similarity index 94%
rename from framework/inc/services/backingcomp.hxx
rename to sfx2/inc/backingcomp.hxx
index 734291c..16a2ae7 100644
--- a/framework/inc/services/backingcomp.hxx
+++ b/sfx2/inc/backingcomp.hxx
@@ -17,12 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef __FRAMEWORK_SERVICES_BACKINGCOMP_HXX_
-#define __FRAMEWORK_SERVICES_BACKINGCOMP_HXX_
-
-#include <threadhelp/threadhelpbase.hxx>
-#include <general.h>
-#include <stdtypes.h>
+#ifndef __SFX2_DIALOG_BACKINGCOMP_HXX_
+#define __SFX2_DIALOG_BACKINGCOMP_HXX_
#include <com/sun/star/lang/XTypeProvider.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
@@ -44,9 +40,6 @@
//__________________________________________
// definition
-namespace framework
-{
-
//__________________________________________
/**
implements the backing component.
@@ -64,15 +57,12 @@ class BackingComp : public css::lang::XTypeProvider
, public css::lang::XInitialization
, public css::frame::XController // => XComponent
, public css::awt::XKeyListener // => XEventListener
- // attention! Must be the first base class to guarantee right initialize lock ...
- , private ThreadHelpBase
, public ::cppu::OWeakObject
{
//______________________________________
// member
private:
-
/** the global uno service manager.
Must be used to create own needed services. */
css::uno::Reference< css::uno::XComponentContext > m_xContext;
@@ -143,8 +133,6 @@ class BackingComp : public css::lang::XTypeProvider
static css::uno::Reference< css::lang::XSingleServiceFactory > SAL_CALL impl_createFactory ( const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR );
};
-} // namespace framework
-
-#endif // __FRAMEWORK_SERVICES_BACKINGCOMP_HXX_
+#endif // __SFX2_DIALOG_BACKINGCOMP_HXX_
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx
index 4d1fcc1..089946ae 100644
--- a/sfx2/source/appl/appuno.cxx
+++ b/sfx2/source/appl/appuno.cxx
@@ -23,6 +23,7 @@
#include "sfx2/appuno.hxx"
+#include "backingcomp.hxx"
#include "SfxDocumentMetaData.hxx"
#include "appbaslib.hxx"
#include "doctemplates.hxx"
@@ -2275,6 +2276,7 @@ SFX2_DLLPUBLIC void* SAL_CALL sfx_component_getFactory(
// !!! ATTENTION !!!
// Write no ";" at end of line and dont forget "else" ! (see macro)
//=============================================================================
+ IF_NAME_CREATECOMPONENTFACTORY( BackingComp )
IF_NAME_CREATECOMPONENTFACTORY( SfxGlobalEvents_Impl )
IF_NAME_CREATECOMPONENTFACTORY( SfxFrameLoader_Impl )
IF_NAME_CREATECOMPONENTFACTORY( SfxMacroLoader )
diff --git a/sfx2/source/control/droptargetlistener.cxx b/sfx2/source/control/droptargetlistener.cxx
new file mode 100644
index 0000000..cb40283
--- /dev/null
+++ b/sfx2/source/control/droptargetlistener.cxx
@@ -0,0 +1,222 @@
+/* -*- 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 .
+ */
+
+#include <sfx2/droptargetlistener.hxx>
+
+#include <com/sun/star/datatransfer/dnd/DNDConstants.hpp>
+#include <com/sun/star/frame/XDispatch.hpp>
+#include <com/sun/star/frame/XDispatchProvider.hpp>
+#include <com/sun/star/beans/PropertyValue.hpp>
+#include <com/sun/star/util/URLTransformer.hpp>
+#include <com/sun/star/util/XURLTransformer.hpp>
+
+#include <svtools/transfer.hxx>
+#include <unotools/localfilehelper.hxx>
+#include <sot/filelist.hxx>
+#include <comphelper/processfactory.hxx>
+
+#include <osl/file.hxx>
+#include <vcl/svapp.hxx>
+
+const OUString SPECIALTARGET_DEFAULT("_default");
+
+DropTargetListener::DropTargetListener( const css::uno::Reference< css::uno::XComponentContext >& xContext,
+ const css::uno::Reference< css::frame::XFrame >& xFrame )
+ : m_xContext ( xContext )
+ , m_xTargetFrame ( xFrame )
+ , m_pFormats ( new DataFlavorExVector )
+{
+}
+
+// -----------------------------------------------------------------------------
+
+DropTargetListener::~DropTargetListener()
+{
+ m_xTargetFrame.clear();
+ m_xContext.clear();
+ delete m_pFormats;
+ m_pFormats = NULL;
+}
+
+// -----------------------------------------------------------------------------
+
+void SAL_CALL DropTargetListener::disposing( const css::lang::EventObject& ) throw( css::uno::RuntimeException )
+{
+ m_xTargetFrame.clear();
+ m_xContext.clear();
+}
+
+// -----------------------------------------------------------------------------
+
+void SAL_CALL DropTargetListener::drop( const css::datatransfer::dnd::DropTargetDropEvent& dtde ) throw( css::uno::RuntimeException )
+{
+ const sal_Int8 nAction = dtde.DropAction;
+
+ try
+ {
+ if ( css::datatransfer::dnd::DNDConstants::ACTION_NONE != nAction )
+ {
+ TransferableDataHelper aHelper( dtde.Transferable );
+ sal_Bool bFormatFound = sal_False;
+ FileList aFileList;
+
+ // at first check filelist format
+ if ( aHelper.GetFileList( SOT_FORMAT_FILE_LIST, aFileList ) )
+ {
+ sal_uLong i, nCount = aFileList.Count();
+ for ( i = 0; i < nCount; ++i )
+ implts_OpenFile( aFileList.GetFile(i) );
+ bFormatFound = sal_True;
+ }
+
+ // then, if necessary, the file format
+ String aFilePath;
+ if ( !bFormatFound && aHelper.GetString( SOT_FORMAT_FILE, aFilePath ) )
+ implts_OpenFile( aFilePath );
+ }
+ dtde.Context->dropComplete( css::datatransfer::dnd::DNDConstants::ACTION_NONE != nAction );
+ }
+ catch( const ::com::sun::star::uno::Exception& )
+ {
+ }
+}
+
+// -----------------------------------------------------------------------------
+
+void SAL_CALL DropTargetListener::dragEnter( const css::datatransfer::dnd::DropTargetDragEnterEvent& dtdee ) throw( css::uno::RuntimeException )
+{
+ try
+ {
+ implts_BeginDrag( dtdee.SupportedDataFlavors );
+ }
+ catch( const ::com::sun::star::uno::Exception& )
+ {
+ }
+
+ dragOver( dtdee );
+}
+
+// -----------------------------------------------------------------------------
+
+void SAL_CALL DropTargetListener::dragExit( const css::datatransfer::dnd::DropTargetEvent& ) throw( css::uno::RuntimeException )
+{
+ try
+ {
+ implts_EndDrag();
+ }
+ catch( const ::com::sun::star::uno::Exception& )
+ {
+ }
+}
+
+// -----------------------------------------------------------------------------
+
+void SAL_CALL DropTargetListener::dragOver( const css::datatransfer::dnd::DropTargetDragEvent& dtde ) throw( css::uno::RuntimeException )
+{
+ try
+ {
+ sal_Bool bAccept = ( implts_IsDropFormatSupported( SOT_FORMAT_FILE ) ||
+ implts_IsDropFormatSupported( SOT_FORMAT_FILE_LIST ) );
+
+ if ( !bAccept )
+ dtde.Context->rejectDrag();
+ else
+ dtde.Context->acceptDrag( css::datatransfer::dnd::DNDConstants::ACTION_COPY );
+ }
+ catch( const ::com::sun::star::uno::Exception& )
+ {
+ }
+}
+
+// -----------------------------------------------------------------------------
+
+void SAL_CALL DropTargetListener::dropActionChanged( const css::datatransfer::dnd::DropTargetDragEvent& ) throw( css::uno::RuntimeException )
+{
+}
+
+void DropTargetListener::implts_BeginDrag( const css::uno::Sequence< css::datatransfer::DataFlavor >& rSupportedDataFlavors )
+{
+ /* SAFE { */
+ SolarMutexGuard aGuard;
+ m_pFormats->clear();
+ TransferableDataHelper::FillDataFlavorExVector(rSupportedDataFlavors,*m_pFormats);
+ /* } SAFE */
+}
+
+void DropTargetListener::implts_EndDrag()
+{
+ /* SAFE { */
+ SolarMutexGuard aGuard;
+ m_pFormats->clear();
+ /* } SAFE */
+}
+
+sal_Bool DropTargetListener::implts_IsDropFormatSupported( SotFormatStringId nFormat )
+{
+ /* SAFE { */
+ SolarMutexGuard aGuard;
+ DataFlavorExVector::iterator aIter( m_pFormats->begin() ), aEnd( m_pFormats->end() );
+ sal_Bool bRet = sal_False;
+
+ while ( aIter != aEnd )
+ {
+ if ( nFormat == (*aIter++).mnSotId )
+ {
+ bRet = sal_True;
+ aIter = aEnd;
+ }
+ }
+
+ return bRet;
+ /* } SAFE */
+}
+
+void DropTargetListener::implts_OpenFile( const String& rFilePath )
+{
+ OUString aFileURL;
+ if ( !::utl::LocalFileHelper::ConvertPhysicalNameToURL( rFilePath, aFileURL ) )
+ aFileURL = rFilePath;
+
+ ::osl::FileStatus aStatus( osl_FileStatus_Mask_FileURL );
+ ::osl::DirectoryItem aItem;
+ if( ::osl::FileBase::E_None == ::osl::DirectoryItem::get( aFileURL, aItem ) &&
+ ::osl::FileBase::E_None == aItem.getFileStatus( aStatus ) )
+ aFileURL = aStatus.getFileURL();
+
+ // open file
+ /* SAFE { */
+ SolarMutexGuard aGuard;
+ css::uno::Reference< css::frame::XFrame > xTargetFrame( m_xTargetFrame.get(), css::uno::UNO_QUERY );
+ css::uno::Reference< css::util::XURLTransformer > xParser ( css::util::URLTransformer::create(m_xContext) );
+
+ if (xTargetFrame.is() && xParser.is())
+ {
+ css::util::URL aURL;
+ aURL.Complete = aFileURL;
+ xParser->parseStrict(aURL);
+
+ css::uno::Reference < css::frame::XDispatchProvider > xProvider( xTargetFrame, css::uno::UNO_QUERY );
+ css::uno::Reference< css::frame::XDispatch > xDispatcher = xProvider->queryDispatch( aURL, SPECIALTARGET_DEFAULT, 0 );
+ if ( xDispatcher.is() )
+ xDispatcher->dispatch( aURL, css::uno::Sequence < css::beans::PropertyValue >() );
+ }
+ /* } SAFE */
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/framework/source/services/backingcomp.cxx b/sfx2/source/dialog/backingcomp.cxx
similarity index 95%
rename from framework/source/services/backingcomp.cxx
rename to sfx2/source/dialog/backingcomp.cxx
index 89a757d..6b7cd16 100644
--- a/framework/source/services/backingcomp.cxx
+++ b/sfx2/source/dialog/backingcomp.cxx
@@ -17,16 +17,11 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include "services/backingcomp.hxx"
+#include "backingcomp.hxx"
#include "backingwindow.hxx"
-#include <threadhelp/readguard.hxx>
-#include <threadhelp/writeguard.hxx>
-#include <classes/droptargetlistener.hxx>
-#include <targets.h>
-#include <properties.h>
-#include <services.h>
+#include <sfx2/droptargetlistener.hxx>
#include <helpid.hrc>
@@ -58,16 +53,18 @@
#include <unotools/bootstrap.hxx>
-namespace framework
-{
+const char SERVICENAME_FRAMECONTROLLER[] = "com.sun.star.frame.Controller";
+const char IMPLEMENTATIONNAME_STARTMODULE[] = "com.sun.star.comp.sfx2.BackingComp";
+const char FRAME_PROPNAME_LAYOUTMANAGER[] = "LayoutManager";
+const char HID_BACKINGWINDOW[] = "FWK_HID_BACKINGWINDOW";
+const char SPECIALTARGET_MENUBAR[] = "_menubar";
//_______________________________________________
//_______________________________________________
BackingComp::BackingComp( const css::uno::Reference< css::uno::XComponentContext >& xContext )
- : ThreadHelpBase (&Application::GetSolarMutex() )
- , m_xContext (xContext )
+ : m_xContext(xContext)
{
}
@@ -116,10 +113,9 @@ css::uno::Any SAL_CALL BackingComp::queryInterface( /*IN*/ const css::uno::Type&
if (!aResult.hasValue())
{
/* SAFE { */
- ReadGuard aReadLock(m_aLock);
+ SolarMutexGuard aGuard;
if (m_xWindow.is())
aResult = m_xWindow->queryInterface(aType);
- aReadLock.unlock();
/* } SAFE */
}
@@ -177,10 +173,8 @@ css::uno::Sequence< css::uno::Type > SAL_CALL BackingComp::getTypes()
if (!pTypeCollection)
{
/* LOCAL SAFE { */
- ReadGuard aReadLock(m_aLock);
+ SolarMutexGuard aGuard;
css::uno::Reference< css::lang::XTypeProvider > xProvider(m_xWindow, css::uno::UNO_QUERY);
- aReadLock.unlock();
- /* } LOCAL SAFE */
css::uno::Sequence< css::uno::Type > lWindowTypes;
if (xProvider.is())
@@ -195,6 +189,7 @@ css::uno::Sequence< css::uno::Type > SAL_CALL BackingComp::getTypes()
lWindowTypes);
pTypeCollection = &aTypeCollection;
+ /* } LOCAL SAFE */
}
/* } GLOBAL SAFE */
}
@@ -307,7 +302,7 @@ css::uno::Sequence< OUString > SAL_CALL BackingComp::getSupportedServiceNames()
OUString BackingComp::impl_getStaticImplementationName()
{
- return IMPLEMENTATIONNAME_STARTMODULE;
+ return OUString( IMPLEMENTATIONNAME_STARTMODULE );
}
//_______________________________________________
@@ -439,7 +434,7 @@ void SAL_CALL BackingComp::attachFrame( /*IN*/ const css::uno::Reference< css::f
throw (css::uno::RuntimeException)
{
/* SAFE */
- WriteGuard aWriteLock(m_aLock);
+ SolarMutexGuard aGuard;
// check some required states
if (m_xFrame.is())
@@ -459,7 +454,7 @@ void SAL_CALL BackingComp::attachFrame( /*IN*/ const css::uno::Reference< css::f
m_xFrame = xFrame;
// establish drag&drop mode
- ::framework::DropTargetListener* pDropListener = new ::framework::DropTargetListener( m_xContext, m_xFrame);
+ DropTargetListener* pDropListener = new DropTargetListener( m_xContext, m_xFrame);
m_xDropTargetListener = css::uno::Reference< css::datatransfer::dnd::XDropTargetListener >(static_cast< ::cppu::OWeakObject* >(pDropListener), css::uno::UNO_QUERY);
css::uno::Reference< css::awt::XToolkit2 > xToolkit = css::awt::Toolkit::create( m_xContext );
@@ -489,7 +484,7 @@ void SAL_CALL BackingComp::attachFrame( /*IN*/ const css::uno::Reference< css::f
if (xLayoutManager.is())
{
xLayoutManager->lock();
- xLayoutManager->createElement( DECLARE_ASCII( "private:resource/menubar/menubar" ));
+ xLayoutManager->createElement("private:resource/menubar/menubar");
xLayoutManager->unlock();
}
@@ -504,7 +499,6 @@ void SAL_CALL BackingComp::attachFrame( /*IN*/ const css::uno::Reference< css::f
if( pBack )
pBack->setOwningFrame( m_xFrame );
- aWriteLock.unlock();
/* } SAFE */
}
@@ -580,7 +574,7 @@ css::uno::Reference< css::frame::XFrame > SAL_CALL BackingComp::getFrame()
throw (css::uno::RuntimeException)
{
/* SAFE { */
- ReadGuard aReadLock(m_aLock);
+ SolarMutexGuard aGuard;
return m_xFrame;
/* } SAFE */
}
@@ -631,7 +625,7 @@ void SAL_CALL BackingComp::disposing( /*IN*/ const css::lang::EventObject& aEven
// keyPressed() for further details.
/* SAFE { */
- WriteGuard aWriteLock(m_aLock);
+ SolarMutexGuard aGuard;
if (!aEvent.Source.is() || aEvent.Source!=m_xWindow || !m_xWindow.is())
throw css::uno::RuntimeException(
@@ -640,7 +634,6 @@ void SAL_CALL BackingComp::disposing( /*IN*/ const css::lang::EventObject& aEven
m_xWindow = css::uno::Reference< css::awt::XWindow >();
- aWriteLock.unlock();
/* } SAFE */
}
@@ -658,11 +651,11 @@ void SAL_CALL BackingComp::dispose()
throw(css::uno::RuntimeException)
{
/* SAFE { */
- WriteGuard aWriteLock(m_aLock);
+ SolarMutexGuard aGuard;
// kill the menu
css::util::URL aURL;
- aURL.Complete = DECLARE_ASCII(".uno:close");
+ aURL.Complete = OUString(".uno:close");
css::uno::Reference< css::util::XURLTransformer > xParser = css::util::URLTransformer::create(m_xContext);
if (xParser.is())
xParser->parseStrict(aURL);
@@ -706,7 +699,6 @@ void SAL_CALL BackingComp::dispose()
m_xFrame.clear();
m_xContext.clear();
- aWriteLock.unlock();
/* } SAFE */
}
@@ -769,7 +761,7 @@ void SAL_CALL BackingComp::initialize( /*IN*/ const css::uno::Sequence< css::uno
throw(css::uno::Exception, css::uno::RuntimeException)
{
/* SAFE { */
- WriteGuard aWriteLock(m_aLock);
+ SolarMutexGuard aGuard;
if (m_xWindow.is())
throw css::uno::Exception(
@@ -806,7 +798,6 @@ void SAL_CALL BackingComp::initialize( /*IN*/ const css::uno::Sequence< css::uno
m_xWindow->setVisible(sal_True);
- aWriteLock.unlock();
/* } SAFE */
}
@@ -837,6 +828,4 @@ void SAL_CALL BackingComp::keyReleased( /*IN*/ const css::awt::KeyEvent& )
*/
}
-} // namespace framework
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/framework/source/services/backingwindow.cxx b/sfx2/source/dialog/backingwindow.cxx
similarity index 99%
rename from framework/source/services/backingwindow.cxx
rename to sfx2/source/dialog/backingwindow.cxx
index 3043e02..be49bd2 100644
--- a/framework/source/services/backingwindow.cxx
+++ b/sfx2/source/dialog/backingwindow.cxx
@@ -18,7 +18,6 @@
*/
#include "backingwindow.hxx"
-#include <services.h>
#include <vcl/svapp.hxx>
#include <vcl/virdev.hxx>
@@ -45,7 +44,6 @@ using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::frame;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star;
-using namespace framework;
const char RECENT_FILE_LIST[] = ".uno:RecentFileList";
@@ -57,6 +55,7 @@ const char BASE_URL[] = "private:factory/sdatabase?Interactive";
const char MATH_URL[] = "private:factory/smath";
const char TEMPLATE_URL[] = "slot:5500";
const char OPEN_URL[] = ".uno:Open";
+const char SERVICENAME_CFGREADACCESS[] = "com.sun.star.configuration.ConfigurationAccess";
const int nItemId_Extensions = 1;
const int nItemId_Info = 3;
diff --git a/sfx2/source/dialog/backingwindow.hxx b/sfx2/source/dialog/backingwindow.hxx
new file mode 100644
index 0000000..287a777
--- /dev/null
+++ b/sfx2/source/dialog/backingwindow.hxx
@@ -0,0 +1,130 @@
+/* -*- 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 SFX2_BACKINGWINDOW_HXX
+#define SFX2_BACKINGWINDOW_HXX
+
+#include <rtl/ustring.hxx>
+
+#include <vcl/builder.hxx>
+#include <vcl/button.hxx>
+#include <vcl/menubtn.hxx>
+#include <vcl/bitmapex.hxx>
+#include <vcl/toolbox.hxx>
+#include <vcl/layout.hxx>
+
+#include <svtools/acceleratorexecute.hxx>
+#include <unotools/moduleoptions.hxx>
+
+#include <com/sun/star/uno/XComponentContext.hpp>
+#include <com/sun/star/frame/XUIControllerFactory.hpp>
+#include <com/sun/star/frame/XPopupMenuController.hpp>
+#include <com/sun/star/awt/XPopupMenu.hpp>
+#include <com/sun/star/frame/XDispatchProvider.hpp>
+#include <com/sun/star/frame/XDesktop.hpp>
+#include <com/sun/star/frame/XFrame.hpp>
+#include <com/sun/star/frame/XTerminateListener.hpp>
+#include <com/sun/star/document/XEventListener.hpp>
+#include <com/sun/star/document/XEventBroadcaster.hpp>
+#include <com/sun/star/util/XURLTransformer.hpp>
+#include <com/sun/star/ui/dialogs/XFilePicker.hpp>
+#include <com/sun/star/ui/dialogs/XFilePickerControlAccess.hpp>
+#include <com/sun/star/ui/dialogs/XFilterManager.hpp>
+#include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
+#include <com/sun/star/ui/dialogs/ExecutableDialogResults.hpp>
+
+#include <set>
+
+class MnemonicGenerator;
+
+class BackingWindow
+ : public Window
+ , public VclBuilderContainer
+{
+ com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > mxContext;
+ com::sun::star::uno::Reference<com::sun::star::frame::XDispatchProvider > mxDesktopDispatchProvider;
+ com::sun::star::uno::Reference<com::sun::star::frame::XFrame> mxFrame;
+ com::sun::star::uno::Reference< com::sun::star::frame::XUIControllerFactory > mxPopupMenuFactory;
+ com::sun::star::uno::Reference< com::sun::star::frame::XPopupMenuController > mxPopupMenuController;
+ com::sun::star::uno::Reference< com::sun::star::awt::XPopupMenu > mxPopupMenu;
+
+ PushButton* mpWriterButton;
+ PushButton* mpCalcButton;
+ PushButton* mpImpressButton;
+ MenuButton* mpOpenButton;
+ PushButton* mpDrawButton;
+ PushButton* mpDBButton;
+ PushButton* mpMathButton;
+ PushButton* mpTemplateButton;
+
+ PushButton* mpExtensionsButton;
+ PushButton* mpInfoButton;
+ PushButton* mpTplRepButton;
+
+ VclGrid* mpStartCenterContainer;
+
+ BitmapEx maBackgroundLeft;
+ BitmapEx maBackgroundMiddle;
+ BitmapEx maBackgroundRight;
+
+ Rectangle maStartCentButtons;
+
+ bool mbInitControls;
+ sal_Int32 mnHideExternalLinks;
+ svt::AcceleratorExecute* mpAccExec;
+
+ int mnSCWidth;
+ int mnSCHeight;
+
+ void setupButton( PushButton* pButton, const OUString& rURL, const std::set<OUString>& rURLS,
+ SvtModuleOptions& rOpt, SvtModuleOptions::EModule eMod );
+
+ void setupExternalLink( PushButton* pButton );
+
+ void dispatchURL( const OUString& i_rURL,
+ const OUString& i_rTarget = OUString( "_default" ),
+ const com::sun::star::uno::Reference< com::sun::star::frame::XDispatchProvider >& i_xProv = com::sun::star::uno::Reference< com::sun::star::frame::XDispatchProvider >(),
+ const com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& = com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >()
+ );
+
+ DECL_LINK( ClickHdl, Button* );
+ DECL_LINK( ExtLinkClickHdl, Button* );
+ DECL_LINK( ActivateHdl, Button* );
+ DECL_LINK( WindowEventListener, VclSimpleEvent* );
+
+ void initControls();
+ void initBackground();
+ void prepareRecentFileMenu();
+
+public:
+ BackingWindow( Window* pParent );
+ ~BackingWindow();
+
+ virtual void Paint( const Rectangle& rRect );
+ virtual void Resize();
+ virtual long Notify( NotifyEvent& rNEvt );
+
+ virtual Size GetOptimalSize() const;
+
+ void setOwningFrame( const com::sun::star::uno::Reference< com::sun::star::frame::XFrame >& xFrame );
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/util/sfx.component b/sfx2/util/sfx.component
index 0de2629..dc31509 100644
--- a/sfx2/util/sfx.component
+++ b/sfx2/util/sfx.component
@@ -19,6 +19,9 @@
<component loader="com.sun.star.loader.SharedLibrary" prefix="sfx"
xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="com.sun.star.comp.sfx2.BackingComp">
+ <service name="com.sun.star.frame.StartModule"/>
+ </implementation>
<implementation name="SfxDocumentMetaData">
<service name="com.sun.star.document.DocumentProperties"/>
</implementation>
More information about the Libreoffice-commits
mailing list