summaryrefslogtreecommitdiffstats
path: root/framework/inc/classes
diff options
context:
space:
mode:
Diffstat (limited to 'framework/inc/classes')
-rw-r--r--framework/inc/classes/actiontriggercontainer.hxx68
-rw-r--r--framework/inc/classes/actiontriggerpropertyset.hxx117
-rw-r--r--framework/inc/classes/actiontriggerseparatorpropertyset.hxx99
-rw-r--r--framework/inc/classes/converter.hxx50
-rw-r--r--framework/inc/classes/framecontainer.hxx94
-rw-r--r--framework/inc/classes/fwkresid.hxx30
-rw-r--r--framework/inc/classes/imagewrapper.hxx62
-rw-r--r--framework/inc/classes/protocolhandlercache.hxx150
-rw-r--r--framework/inc/classes/resource.hxx33
-rw-r--r--framework/inc/classes/rootactiontriggercontainer.hxx104
-rw-r--r--framework/inc/classes/taskcreator.hxx63
11 files changed, 870 insertions, 0 deletions
diff --git a/framework/inc/classes/actiontriggercontainer.hxx b/framework/inc/classes/actiontriggercontainer.hxx
new file mode 100644
index 000000000..ad01f4111
--- /dev/null
+++ b/framework/inc/classes/actiontriggercontainer.hxx
@@ -0,0 +1,68 @@
+/* -*- 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 INCLUDED_FRAMEWORK_INC_CLASSES_ACTIONTRIGGERCONTAINER_HXX
+#define INCLUDED_FRAMEWORK_INC_CLASSES_ACTIONTRIGGERCONTAINER_HXX
+
+#include <helper/propertysetcontainer.hxx>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/lang/XTypeProvider.hpp>
+#include <framework/fwedllapi.h>
+
+#define SERVICENAME_ACTIONTRIGGERCONTAINER "com.sun.star.ui.ActionTriggerContainer"
+#define IMPLEMENTATIONNAME_ACTIONTRIGGERCONTAINER "com.sun.star.comp.ui.ActionTriggerContainer"
+
+namespace framework
+{
+
+class ActionTriggerContainer final : public PropertySetContainer,
+ public css::lang::XMultiServiceFactory,
+ public css::lang::XServiceInfo,
+ public css::lang::XTypeProvider
+{
+ public:
+ ActionTriggerContainer();
+ virtual ~ActionTriggerContainer() override;
+
+ // XInterface
+ virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type& aType ) override;
+ virtual void SAL_CALL acquire() throw () override;
+ virtual void SAL_CALL release() throw () override;
+
+ // XMultiServiceFactory
+ virtual css::uno::Reference< css::uno::XInterface > SAL_CALL createInstance( const OUString& aServiceSpecifier ) override;
+ virtual css::uno::Reference< css::uno::XInterface > SAL_CALL createInstanceWithArguments( const OUString& ServiceSpecifier, const css::uno::Sequence< css::uno::Any >& Arguments ) override;
+ virtual css::uno::Sequence< OUString > SAL_CALL getAvailableServiceNames() override;
+
+ // XServiceInfo
+ virtual OUString SAL_CALL getImplementationName( ) override;
+ virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
+ virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) override;
+
+ // XTypeProvider
+ virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override;
+ virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) override;
+};
+
+}
+
+#endif // INCLUDED_FRAMEWORK_INC_CLASSES_ACTIONTRIGGERCONTAINER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/framework/inc/classes/actiontriggerpropertyset.hxx b/framework/inc/classes/actiontriggerpropertyset.hxx
new file mode 100644
index 000000000..8dd37f068
--- /dev/null
+++ b/framework/inc/classes/actiontriggerpropertyset.hxx
@@ -0,0 +1,117 @@
+/* -*- 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 INCLUDED_FRAMEWORK_INC_CLASSES_ACTIONTRIGGERPROPERTYSET_HXX
+#define INCLUDED_FRAMEWORK_INC_CLASSES_ACTIONTRIGGERPROPERTYSET_HXX
+
+#include <cppuhelper/basemutex.hxx>
+#include <cppuhelper/propshlp.hxx>
+#include <cppuhelper/weak.hxx>
+#include <rtl/ustring.hxx>
+
+#include <com/sun/star/awt/XBitmap.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/lang/XTypeProvider.hpp>
+#include <framework/fwedllapi.h>
+
+#define SERVICENAME_ACTIONTRIGGER "com.sun.star.ui.ActionTrigger"
+#define IMPLEMENTATIONNAME_ACTIONTRIGGER "com.sun.star.comp.ui.ActionTrigger"
+
+namespace framework
+{
+
+class ActionTriggerPropertySet final : private cppu::BaseMutex,
+ public css::lang::XServiceInfo ,
+ public css::lang::XTypeProvider,
+ public ::cppu::OBroadcastHelper ,
+ public ::cppu::OPropertySetHelper , // -> XPropertySet, XFastPropertySet, XMultiPropertySet
+ public ::cppu::OWeakObject
+{
+ public:
+ ActionTriggerPropertySet();
+ virtual ~ActionTriggerPropertySet() override;
+
+ // XInterface
+ virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type& aType ) override;
+ virtual void SAL_CALL acquire() throw () override;
+ virtual void SAL_CALL release() throw () override;
+
+ // XServiceInfo
+ virtual OUString SAL_CALL getImplementationName( ) override;
+ virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
+ virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) override;
+
+ // XTypeProvider
+ virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override;
+ virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) override;
+
+ private:
+
+ // OPropertySetHelper
+
+ virtual sal_Bool SAL_CALL convertFastPropertyValue( css::uno::Any& aConvertedValue,
+ css::uno::Any& aOldValue,
+ sal_Int32 nHandle,
+ const css::uno::Any& aValue ) override;
+
+ virtual void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const css::uno::Any& aValue ) override;
+
+ using cppu::OPropertySetHelper::getFastPropertyValue;
+ virtual void SAL_CALL getFastPropertyValue( css::uno::Any& aValue, sal_Int32 nHandle ) const override;
+
+ virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() override;
+
+ virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override;
+
+ static css::uno::Sequence< css::beans::Property > impl_getStaticPropertyDescriptor();
+
+ // helper
+
+ /// @throws css::lang::IllegalArgumentException
+ bool impl_tryToChangeProperty( const OUString& aCurrentValue ,
+ const css::uno::Any& aNewValue ,
+ css::uno::Any& aOldValue ,
+ css::uno::Any& aConvertedValue );
+
+ /// @throws css::lang::IllegalArgumentException
+ bool impl_tryToChangeProperty( const css::uno::Reference< css::awt::XBitmap >& xBitmap,
+ const css::uno::Any& aNewValue ,
+ css::uno::Any& aOldValue ,
+ css::uno::Any& aConvertedValue );
+
+ /// @throws css::lang::IllegalArgumentException
+ bool impl_tryToChangeProperty( const css::uno::Reference< css::uno::XInterface >& xInterface,
+ const css::uno::Any& aNewValue ,
+ css::uno::Any& aOldValue ,
+ css::uno::Any& aConvertedValue );
+
+ // members
+
+ OUString m_aCommandURL;
+ OUString m_aHelpURL;
+ OUString m_aText;
+ css::uno::Reference< css::awt::XBitmap > m_xBitmap;
+ css::uno::Reference< css::uno::XInterface > m_xActionTriggerContainer;
+};
+
+}
+
+#endif // INCLUDED_FRAMEWORK_INC_CLASSES_ACTIONTRIGGERPROPERTYSET_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/framework/inc/classes/actiontriggerseparatorpropertyset.hxx b/framework/inc/classes/actiontriggerseparatorpropertyset.hxx
new file mode 100644
index 000000000..ed213b8fa
--- /dev/null
+++ b/framework/inc/classes/actiontriggerseparatorpropertyset.hxx
@@ -0,0 +1,99 @@
+/* -*- 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 INCLUDED_FRAMEWORK_INC_CLASSES_ACTIONTRIGGERSEPARATORPROPERTYSET_HXX
+#define INCLUDED_FRAMEWORK_INC_CLASSES_ACTIONTRIGGERSEPARATORPROPERTYSET_HXX
+
+#include <cppuhelper/basemutex.hxx>
+#include <cppuhelper/propshlp.hxx>
+#include <cppuhelper/weak.hxx>
+#include <rtl/ustring.hxx>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/lang/XTypeProvider.hpp>
+
+#define SERVICENAME_ACTIONTRIGGERSEPARATOR "com.sun.star.ui.ActionTriggerSeparator"
+#define IMPLEMENTATIONNAME_ACTIONTRIGGERSEPARATOR "com.sun.star.comp.ui.ActionTriggerSeparator"
+
+namespace framework
+{
+
+class ActionTriggerSeparatorPropertySet final : private cppu::BaseMutex,
+ public css::lang::XServiceInfo ,
+ public css::lang::XTypeProvider,
+ public ::cppu::OBroadcastHelper ,
+ public ::cppu::OPropertySetHelper , // -> XPropertySet, XFastPropertySet, XMultiPropertySet
+ public ::cppu::OWeakObject
+{
+ public:
+ ActionTriggerSeparatorPropertySet();
+ virtual ~ActionTriggerSeparatorPropertySet() override;
+
+ // XInterface
+ virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type& aType ) override;
+ virtual void SAL_CALL acquire() throw () override;
+ virtual void SAL_CALL release() throw () override;
+
+ // XServiceInfo
+ virtual OUString SAL_CALL getImplementationName( ) override;
+ virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
+ virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) override;
+
+ // XTypeProvider
+ virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override;
+ virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) override;
+
+ private:
+
+ // OPropertySetHelper
+
+ virtual sal_Bool SAL_CALL convertFastPropertyValue( css::uno::Any& aConvertedValue,
+ css::uno::Any& aOldValue,
+ sal_Int32 nHandle,
+ const css::uno::Any& aValue ) override;
+
+ virtual void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const css::uno::Any& aValue ) override;
+
+ using cppu::OPropertySetHelper::getFastPropertyValue;
+ virtual void SAL_CALL getFastPropertyValue( css::uno::Any& aValue, sal_Int32 nHandle ) const override;
+
+ virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() override;
+
+ virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override;
+
+ static css::uno::Sequence< css::beans::Property > impl_getStaticPropertyDescriptor();
+
+ // helper
+
+ /// @throws css::lang::IllegalArgumentException
+ /// @throws css::uno::RuntimeException
+ bool impl_tryToChangeProperty( sal_Int16 aCurrentValue ,
+ const css::uno::Any& aNewValue ,
+ css::uno::Any& aOldValue ,
+ css::uno::Any& aConvertedValue );
+
+ // members
+
+ sal_Int16 m_nSeparatorType;
+};
+
+}
+
+#endif // INCLUDED_FRAMEWORK_INC_CLASSES_ACTIONTRIGGERSEPARATORPROPERTYSET_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/framework/inc/classes/converter.hxx b/framework/inc/classes/converter.hxx
new file mode 100644
index 000000000..15d36a5f0
--- /dev/null
+++ b/framework/inc/classes/converter.hxx
@@ -0,0 +1,50 @@
+/* -*- 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 INCLUDED_FRAMEWORK_INC_CLASSES_CONVERTER_HXX
+#define INCLUDED_FRAMEWORK_INC_CLASSES_CONVERTER_HXX
+
+#include <config_options.h>
+#include <vector>
+
+#include <com/sun/star/uno/Sequence.hxx>
+#include <com/sun/star/beans/PropertyValue.hpp>
+#include <com/sun/star/beans/NamedValue.hpp>
+#include <tools/datetime.hxx>
+#include <fwidllapi.h>
+
+namespace framework{
+
+class UNLESS_MERGELIBS(FWI_DLLPUBLIC) Converter
+{
+ public:
+ // Seq<beans.NamedValue> <=> Seq<beans.PropertyValue>
+ static css::uno::Sequence< css::beans::NamedValue > convert_seqPropVal2seqNamedVal ( const css::uno::Sequence< css::beans::PropertyValue >& lSource );
+
+ // Seq<String> => Vector<String>
+ static std::vector<OUString> convert_seqOUString2OUStringList( const css::uno::Sequence< OUString >& lSource );
+
+ static OUString convert_DateTime2ISO8601 ( const DateTime& aSource );
+};
+
+} // namespace framework
+
+#endif // INCLUDED_FRAMEWORK_INC_CLASSES_CONVERTER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/framework/inc/classes/framecontainer.hxx b/framework/inc/classes/framecontainer.hxx
new file mode 100644
index 000000000..72a868f66
--- /dev/null
+++ b/framework/inc/classes/framecontainer.hxx
@@ -0,0 +1,94 @@
+/* -*- 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 INCLUDED_FRAMEWORK_INC_CLASSES_FRAMECONTAINER_HXX
+#define INCLUDED_FRAMEWORK_INC_CLASSES_FRAMECONTAINER_HXX
+
+#include <sal/config.h>
+
+#include <vector>
+
+#include <com/sun/star/frame/XFrame.hpp>
+#include <com/sun/star/uno/Reference.hxx>
+
+#include <rtl/ustring.hxx>
+
+namespace framework{
+
+typedef ::std::vector< css::uno::Reference< css::frame::XFrame > > TFrameContainer;
+
+/*-************************************************************************************************************
+ @short implement a container to hold children of frame, task or desktop
+ @descr Every object of frame, task or desktop hold reference to its children. These container is used as helper
+ to do this. Some helper-classes like OFrames or OTasksAccess use it to. They hold a pointer to an instance
+ of this class, which is a member of a frame, task or desktop! You can append and remove frames.
+ It's possible to set one of these frames as active or deactivate. You could have full index-access to
+ container-items.
+
+ @devstatus ready to use
+ @threadsafe yes
+*//*-*************************************************************************************************************/
+class FrameContainer final
+{
+
+ // member
+
+ private:
+
+ /// list to hold all frames
+ TFrameContainer m_aContainer;
+ /// one container item can be the current active frame. It's necessary for Desktop or Frame implementation.
+ css::uno::Reference< css::frame::XFrame > m_xActiveFrame;
+
+ // interface
+
+ public:
+
+ /// constructor / destructor
+ FrameContainer();
+ ~FrameContainer();
+
+ /// add/remove/mark container items
+ void append ( const css::uno::Reference< css::frame::XFrame >& xFrame );
+ void remove ( const css::uno::Reference< css::frame::XFrame >& xFrame );
+ void setActive ( const css::uno::Reference< css::frame::XFrame >& xFrame );
+ css::uno::Reference< css::frame::XFrame > getActive ( ) const;
+
+ /// checks and free memory
+ bool exist ( const css::uno::Reference< css::frame::XFrame >& xFrame ) const;
+ void clear ( );
+
+ /// deprecated IndexAccess!
+ sal_uInt32 getCount ( ) const;
+ css::uno::Reference< css::frame::XFrame > operator[]( sal_uInt32 nIndex ) const;
+
+ /// replacement for deprecated index access
+ css::uno::Sequence< css::uno::Reference< css::frame::XFrame > > getAllElements() const;
+
+ /// special helper for Frame::findFrame()
+ css::uno::Reference< css::frame::XFrame > searchOnAllChildrens ( const OUString& sName ) const;
+ css::uno::Reference< css::frame::XFrame > searchOnDirectChildrens( const OUString& sName ) const;
+
+}; // class FrameContainer
+
+} // namespace framework
+
+#endif // INCLUDED_FRAMEWORK_INC_CLASSES_FRAMECONTAINER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/framework/inc/classes/fwkresid.hxx b/framework/inc/classes/fwkresid.hxx
new file mode 100644
index 000000000..c6606c527
--- /dev/null
+++ b/framework/inc/classes/fwkresid.hxx
@@ -0,0 +1,30 @@
+/* -*- 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 INCLUDED_FRAMEWORK_INC_CLASSES_FWKRESID_HXX
+#define INCLUDED_FRAMEWORK_INC_CLASSES_FWKRESID_HXX
+
+#include <framework/fwedllapi.h>
+#include <rtl/ustring.hxx>
+
+FWE_DLLPUBLIC OUString FwkResId(const char* pId);
+
+#endif // __FRAMEWORK_CLASSES_FWKRESID
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/framework/inc/classes/imagewrapper.hxx b/framework/inc/classes/imagewrapper.hxx
new file mode 100644
index 000000000..9818552cb
--- /dev/null
+++ b/framework/inc/classes/imagewrapper.hxx
@@ -0,0 +1,62 @@
+/* -*- 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 INCLUDED_FRAMEWORK_INC_CLASSES_IMAGEWRAPPER_HXX
+#define INCLUDED_FRAMEWORK_INC_CLASSES_IMAGEWRAPPER_HXX
+
+#include <com/sun/star/awt/XBitmap.hpp>
+#include <com/sun/star/lang/XUnoTunnel.hpp>
+#include <cppuhelper/implbase.hxx>
+#include <vcl/image.hxx>
+#include <framework/fwedllapi.h>
+
+namespace framework
+{
+
+class ImageWrapper final : public ::cppu::WeakImplHelper< css::awt::XBitmap,
+ css::lang::XUnoTunnel >
+{
+ public:
+ ImageWrapper( const Image& aImage );
+ virtual ~ImageWrapper() override;
+
+ const Image& GetImage() const
+ {
+ return m_aImage;
+ }
+
+ static css::uno::Sequence< sal_Int8 > const & GetUnoTunnelId();
+
+ // XBitmap
+ virtual css::awt::Size SAL_CALL getSize() override;
+ virtual css::uno::Sequence< sal_Int8 > SAL_CALL getDIB() override;
+ virtual css::uno::Sequence< sal_Int8 > SAL_CALL getMaskDIB() override;
+
+ // XUnoTunnel
+ virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override;
+
+ private:
+ Image m_aImage;
+};
+
+}
+
+#endif // INCLUDED_FRAMEWORK_INC_CLASSES_IMAGEWRAPPER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/framework/inc/classes/protocolhandlercache.hxx b/framework/inc/classes/protocolhandlercache.hxx
new file mode 100644
index 000000000..fa7907927
--- /dev/null
+++ b/framework/inc/classes/protocolhandlercache.hxx
@@ -0,0 +1,150 @@
+/* -*- 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 INCLUDED_FRAMEWORK_INC_CLASSES_PROTOCOLHANDLERCACHE_HXX
+#define INCLUDED_FRAMEWORK_INC_CLASSES_PROTOCOLHANDLERCACHE_HXX
+
+#include <config_options.h>
+#include <unordered_map>
+
+#include <com/sun/star/util/URL.hpp>
+
+#include <unotools/configitem.hxx>
+#include <rtl/ustring.hxx>
+#include <fwidllapi.h>
+
+namespace framework{
+
+#define PACKAGENAME_PROTOCOLHANDLER "Office.ProtocolHandler" /// name of our configuration package
+
+#define CFG_PATH_SEPARATOR "/" /// separator for configuration paths
+
+#define PROPERTY_PROTOCOLS "Protocols" /// properties of a protocol handler
+
+/**
+ Programmer can register his own services to handle different protocols.
+ Don't forget: It doesn't mean "handling of documents" ... these services could handle protocols ...
+ e.g. "mailto:", "file://", ".java:"
+ This struct holds the information about one such registered protocol handler.
+ A list of handler objects is defined as ProtocolHandlerHash. see below
+*/
+struct FWI_DLLPUBLIC ProtocolHandler
+{
+ /* member */
+ public:
+
+ /// the uno implementation name of this handler
+ OUString m_sUNOName;
+ /// list of URL pattern which defines the protocols which this handler is registered for
+ std::vector<OUString> m_lProtocols;
+};
+
+/**
+ This hash use registered pattern of all protocol handlers as keys and provide her
+ uno implementation names as value. Overloading of the index operator makes it possible
+ to search for a key by using a full qualified URL on list of all possible pattern keys.
+*/
+typedef std::unordered_map<OUString, OUString> PatternHash;
+
+/**
+ This hash holds protocol handler structs by her names.
+*/
+typedef std::unordered_map<OUString, ProtocolHandler> HandlerHash;
+
+/**
+ @short this hash makes it easy to find a protocol handler by using his uno implementation name.
+ @descr It holds two lists of information:
+ - first holds all handler by her uno implementation names and
+ can be used to get her other properties
+ - another one maps her registered pattern to her uno names to
+ perform search on such data
+ But this lists a static for all instances of this class. So it's possible to
+ create new objects without opening configuration twice and free memory automatically
+ if last object will gone.
+
+ @attention We implement a singleton concept - so we don't need any mutex member here.
+ Because to safe access on static member we must use a static global lock
+ here too.
+
+ @devstatus ready to use
+ @threadsafe yes
+*/
+
+class HandlerCFGAccess;
+class UNLESS_MERGELIBS(FWI_DLLPUBLIC) HandlerCache final
+{
+ /* member */
+ private:
+
+ /// list of all registered handler registered by her uno implementation names
+ static std::unique_ptr<HandlerHash> s_pHandler;
+ /// maps URL pattern to handler names
+ static std::unique_ptr<PatternHash> s_pPattern;
+ /// informs about config updates
+ static HandlerCFGAccess* s_pConfig;
+ /// ref count to construct/destruct internal member lists on demand by using singleton mechanism
+ static sal_Int32 m_nRefCount;
+
+ /* interface */
+ public:
+
+ HandlerCache();
+ ~HandlerCache();
+
+ bool search( const OUString& sURL, ProtocolHandler* pReturn ) const;
+ bool search( const css::util::URL& aURL, ProtocolHandler* pReturn ) const;
+
+ void takeOver(std::unique_ptr<HandlerHash> pHandler, std::unique_ptr<PatternHash> pPattern);
+};
+
+/**
+ @short implements configuration access for handler configuration
+ @descr We use the ConfigItem mechanism to read/write values from/to configuration.
+ We set a data container pointer for filling or reading ... this class use it temp.
+ After successfully calling of read(), we can use filled container directly or merge it with an existing one.
+ After successfully calling of write() all values of given data container are flushed to our configuration -
+ but current implementation doesn't support writing really.
+
+ @base ::utl::ConfigItem
+ base mechanism for configuration access
+
+ @devstatus ready to use
+ @threadsafe no
+*/
+class HandlerCFGAccess : public ::utl::ConfigItem
+{
+ private:
+ HandlerCache* m_pCache;
+
+ virtual void ImplCommit() override;
+
+ /* interface */
+ public:
+ HandlerCFGAccess( const OUString& sPackage );
+ void read ( HandlerHash& rHandlerHash, PatternHash& rPatternHash );
+
+ void setCache(HandlerCache* pCache) {m_pCache = pCache;};
+ virtual void Notify(const css::uno::Sequence< OUString >& lPropertyNames) override;
+};
+
+} // namespace framework
+
+#endif // INCLUDED_FRAMEWORK_INC_CLASSES_PROTOCOLHANDLERCACHE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/framework/inc/classes/resource.hxx b/framework/inc/classes/resource.hxx
new file mode 100644
index 000000000..04f00677c
--- /dev/null
+++ b/framework/inc/classes/resource.hxx
@@ -0,0 +1,33 @@
+/* -*- 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 INCLUDED_FRAMEWORK_INC_CLASSES_RESOURCE_HXX
+#define INCLUDED_FRAMEWORK_INC_CLASSES_RESOURCE_HXX
+
+#define MENUITEM_TOOLBAR_VISIBLEBUTTON 1
+#define MENUITEM_TOOLBAR_CUSTOMIZETOOLBAR 2
+#define MENUITEM_TOOLBAR_UNDOCKTOOLBAR 3
+#define MENUITEM_TOOLBAR_DOCKTOOLBAR 4
+#define MENUITEM_TOOLBAR_DOCKALLTOOLBAR 5
+#define MENUITEM_TOOLBAR_LOCKTOOLBARPOSITION 6
+#define MENUITEM_TOOLBAR_CLOSE 7
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/framework/inc/classes/rootactiontriggercontainer.hxx b/framework/inc/classes/rootactiontriggercontainer.hxx
new file mode 100644
index 000000000..42f8766a1
--- /dev/null
+++ b/framework/inc/classes/rootactiontriggercontainer.hxx
@@ -0,0 +1,104 @@
+/* -*- 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 INCLUDED_FRAMEWORK_INC_CLASSES_ROOTACTIONTRIGGERCONTAINER_HXX
+#define INCLUDED_FRAMEWORK_INC_CLASSES_ROOTACTIONTRIGGERCONTAINER_HXX
+
+#include <helper/propertysetcontainer.hxx>
+#include <vcl/menu.hxx>
+#include <com/sun/star/container/XNamed.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/lang/XUnoTunnel.hpp>
+#include <com/sun/star/lang/XTypeProvider.hpp>
+#include <framework/fwedllapi.h>
+
+#define IMPLEMENTATIONNAME_ROOTACTIONTRIGGERCONTAINER "com.sun.star.comp.ui.RootActionTriggerContainer"
+
+namespace framework
+{
+
+class RootActionTriggerContainer final : public PropertySetContainer,
+ public css::lang::XMultiServiceFactory,
+ public css::lang::XServiceInfo,
+ public css::lang::XUnoTunnel,
+ public css::lang::XTypeProvider,
+ public css::container::XNamed
+{
+ public:
+ RootActionTriggerContainer( const Menu* pMenu, const OUString* pMenuIdentifier);
+ virtual ~RootActionTriggerContainer() override;
+
+ // XInterface
+ virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type& aType ) override;
+ virtual void SAL_CALL acquire() throw () override;
+ virtual void SAL_CALL release() throw () override;
+
+ // XMultiServiceFactory
+ virtual css::uno::Reference< css::uno::XInterface > SAL_CALL createInstance( const OUString& aServiceSpecifier ) override;
+ virtual css::uno::Reference< css::uno::XInterface > SAL_CALL createInstanceWithArguments( const OUString& ServiceSpecifier, const css::uno::Sequence< css::uno::Any >& Arguments ) override;
+ virtual css::uno::Sequence< OUString > SAL_CALL getAvailableServiceNames() override;
+
+ // XIndexContainer
+ virtual void SAL_CALL insertByIndex( sal_Int32 Index, const css::uno::Any& Element ) override;
+
+ virtual void SAL_CALL removeByIndex( sal_Int32 Index ) override;
+
+ // XIndexReplace
+ virtual void SAL_CALL replaceByIndex( sal_Int32 Index, const css::uno::Any& Element ) override;
+
+ // XIndexAccess
+ virtual sal_Int32 SAL_CALL getCount() override;
+
+ virtual css::uno::Any SAL_CALL getByIndex( sal_Int32 Index ) override;
+
+ // XElementAccess
+ virtual css::uno::Type SAL_CALL getElementType() override;
+
+ virtual sal_Bool SAL_CALL hasElements() override;
+
+ // XServiceInfo
+ virtual OUString SAL_CALL getImplementationName( ) override;
+ virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
+ virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) override;
+
+ // XUnoTunnel
+ virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override;
+
+ // XTypeProvider
+ virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override;
+ virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) override;
+
+ // XNamed
+ virtual OUString SAL_CALL getName( ) override;
+ virtual void SAL_CALL setName( const OUString& aName ) override;
+
+ private:
+ void FillContainer();
+
+ bool m_bContainerCreated;
+ VclPtr<const Menu> m_pMenu;
+ const OUString* m_pMenuIdentifier;
+};
+
+}
+
+#endif // INCLUDED_FRAMEWORK_INC_CLASSES_ROOTACTIONTRIGGERCONTAINER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/framework/inc/classes/taskcreator.hxx b/framework/inc/classes/taskcreator.hxx
new file mode 100644
index 000000000..e9e98df4e
--- /dev/null
+++ b/framework/inc/classes/taskcreator.hxx
@@ -0,0 +1,63 @@
+/* -*- 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 INCLUDED_FRAMEWORK_INC_CLASSES_TASKCREATOR_HXX
+#define INCLUDED_FRAMEWORK_INC_CLASSES_TASKCREATOR_HXX
+
+#include <com/sun/star/frame/XFrame.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
+
+#include <com/sun/star/uno/Reference.hxx>
+#include <rtl/ustring.hxx>
+#include <unotools/mediadescriptor.hxx>
+
+namespace framework{
+
+/*
+ @short a helper to create new tasks or sub frames for "_blank" or FrameSearchFlag::CREATE
+ @descr There are different places to create new (task)frames and it's not easy to service this code.
+ That's the reason for this helper. It encapsulates asynchronous/synchronous creation
+ by providing a simple interface.
+
+ @devstatus ready to use
+ @threadsafe yes
+*/
+class TaskCreator final
+{
+
+ // member
+ private:
+
+ css::uno::Reference< css::uno::XComponentContext > m_xContext;
+
+ // interface
+ public:
+
+ TaskCreator( const css::uno::Reference< css::uno::XComponentContext >& xContext );
+ ~TaskCreator( );
+
+ css::uno::Reference< css::frame::XFrame > createTask( const OUString& sName, const utl::MediaDescriptor& rDescriptor );
+
+}; // class TaskCreator
+
+} // namespace framework
+
+#endif // INCLUDED_FRAMEWORK_INC_CLASSES_TASKCREATOR_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */