summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/sfx2/controlwrapper.hxx33
-rw-r--r--include/sfx2/itemconnect.hxx196
-rw-r--r--include/sfx2/itemwrapper.hxx60
-rw-r--r--include/svtools/treelistbox.hxx1
-rw-r--r--include/svx/dialcontrol.hxx1
-rw-r--r--include/svx/dlgctrl.hxx28
-rw-r--r--include/svx/fontlb.hxx4
-rw-r--r--include/svx/frmdirlbox.hxx1
-rw-r--r--include/svx/orienthelper.hxx1
9 files changed, 0 insertions, 325 deletions
diff --git a/include/sfx2/controlwrapper.hxx b/include/sfx2/controlwrapper.hxx
index c678922dbbab..b81ad28d5951 100644
--- a/include/sfx2/controlwrapper.hxx
+++ b/include/sfx2/controlwrapper.hxx
@@ -142,10 +142,6 @@ public:
explicit ControlWrapperBase() {}
virtual ~ControlWrapperBase();
- /** Derived classes enable, disable, show, or hide control(s).
- @descr Will do nothing, if the corresponding parameter is TRISTATE_INDET. */
- virtual void ModifyControl( TriState eShow ) = 0;
-
private:
ControlWrapperBase( const ControlWrapperBase& ) = delete;
ControlWrapperBase& operator=( const ControlWrapperBase& ) = delete;
@@ -183,10 +179,6 @@ public:
/** Returns a reference to the control this connection works on. */
ControlT& GetControl() { return mrControl; }
- /** Enables, disables, shows, or hides the control.
- @descr Does nothing, if the corresponding parameter is TRISTATE_INDET. */
- virtual void ModifyControl( TriState eShow ) override;
-
/** Derived classes return the value the control contains. */
virtual ValueT GetControlValue() const = 0;
/** Derived classes set the contents of the control to the passed value. */
@@ -197,23 +189,6 @@ private:
};
-/** A dummy wrapper for a VCL Window that does nothing special.
-
- This wrapper is used to implement the DummyItemConnection. It does not
- connect an item to a control, but handles the special flags to disable or
- hide a control, if an item is unknown.
- */
-class SFX2_DLLPUBLIC DummyWindowWrapper:
- public SingleControlWrapper< vcl::Window, void* >
-{
-public:
- explicit DummyWindowWrapper( vcl::Window& rWindow );
-
- virtual void* GetControlValue() const override;
- virtual void SetControlValue( void* ) override;
-};
-
-
#define WRAPPER_LISTBOX_ENTRY_NOTFOUND 0xFFFF /* XXX was value of LISTBOX_ENTRY_NOTFOUND */
/** A wrapper for the VCL ListBox.
@@ -288,14 +263,6 @@ PosT PosValueMapper< PosT, ValueT >::GetPosFromValue( ValueT nValue ) const
// Single control wrappers
-template< typename ControlT, typename ValueT >
-inline void SingleControlWrapper< ControlT, ValueT >::ModifyControl( TriState eShow )
-{
- if( eShow != TRISTATE_INDET )
- mrControl.Show( eShow == TRISTATE_TRUE );
-}
-
-
template< typename ValueT >
ValueT ListBoxWrapper< ValueT >::GetControlValue() const
{
diff --git a/include/sfx2/itemconnect.hxx b/include/sfx2/itemconnect.hxx
deleted file mode 100644
index 377a60eb7bd6..000000000000
--- a/include/sfx2/itemconnect.hxx
+++ /dev/null
@@ -1,196 +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 INCLUDED_SFX2_ITEMCONNECT_HXX
-#define INCLUDED_SFX2_ITEMCONNECT_HXX
-
-#include <sal/config.h>
-#include <o3tl/typed_flags_set.hxx>
-#include <sfx2/dllapi.h>
-#include <sfx2/itemwrapper.hxx>
-#include <sfx2/controlwrapper.hxx>
-#include <svl/itemset.hxx>
-#include <memory>
-
-
-enum class ItemConnFlags
-{
-/** No special state for the connection. */
- NONE = 0x0000,
-/** Hide control(s), if the item is unknown. */
- HideUnknown = 0x0001,
-};
-namespace o3tl
-{
- template<> struct typed_flags<ItemConnFlags> : is_typed_flags<ItemConnFlags, 0x0001> {};
-}
-
-namespace sfx {
-
-// Base connection classes
-
-
-/** A helper for SfxTabPages to connect controls to items.
-
- This is the base class of all control connection classes. Their purpose is
- to connect one or more controls from an SfxTabPage with an item from an
- item set. The goal is to omit any additional code in the virtual functions
- Reset() and FillItemSet() in classes derived from SfxTabPage.
-
- Examples of connections:
- - A check box with an SfxBoolItem,
- - A metric (spin) field with an SfxInt32Item.
- - A group of radio buttons with an SfxEnumItem.
-
- Each SfxTabPage will contain a list of connection objects (derived from
- this class). The connection objects remember the item and control(s) they
- have to work on. The SfxTabPage will call the DoApplyFlags(), DoReset(),
- and DoFillItemSet() functions of all connection objects it knows. The code
- to initialize control(s) from the item value and fill the item from
- control(s) has to be written only once for each control type.
-
- Additional flags passed in the constructor allow to control the behaviour
- of the control(s) if the item is supported/unsupported in the currently
- used item set. For example, it is possible to specify that a control will
- be disabled or hidden if the item is not supported. This is done before
- each call of Reset().
-
- The special flag ITEMCONN_CLONE_ITEM controls how to create new items in
- the DoFillItemSet() function. The standard (and faster) method is to create
- a temporary item on the stack and put it into the item set. But this does
- not work if the item set expects a special item type derived from a common
- item class, i.e. a Boolean item derived from SfxBoolItem providing special
- item representation text. As this code does not know the item type, the
- item cannot be created on the stack. For this case the flag specifies to
- use the virtual Clone() method of the pool default item. This will create
- an item of the correct type but can still be used in conjunction with i.e.
- the standard BoolItemWrapper.
-
- How to use the item connection feature:
-
- A) Single item <-> single control connection
-
- Example: An SfxBoolItem and a check box.
-
- A1) Create a new item wrapper class derived from the SingleItemWrapper
- template, or use the template directly, or use one of the
- predefined item wrappers. See documentation of the
- SingleItemWrapper template for details (itemwrapper.hxx).
- A2) Create a new control wrapper class derived from the
- SingleControlWrapper template and implement the abstract functions,
- or use one of the predefined control wrappers. See documentation of
- the SingleControlWrapper template for details (controlwrapper.hxx).
- A3) Create a new connection class derived from one of the following
- base classes, and implement the abstract functions, or use the
- ItemControlConnection template directly, or use one of the
- predefined connections.
- A4) Create connection objects in the constructor of the tab page, and
- insert them into the tab page with SfxTabPage::AddItemConnection().
- A5) Remove old code from the tab page's Reset() and FillItemSet()
- functions, if necessary.
-
- B) Single item <-> multiple controls connections
-
- B1) See step A1. If the item contains multiple values (and not a
- structure that contains all the values for the different controls),
- the best way is to use the IdentItemWrapper template, that works
- with the item itself. This way it is possible to provide a 'data
- type' that contains the values for all controls.
- B2) Create a new control wrapper class derived from the
- MultiControlWrapper template. Add single control wrapper members
- for all controls to this class and register them in the
- constructor, using the RegisterControlWrapper() function. Implement
- the abstract functions GetControlValue() and SetControlValue().
- These functions should call the respective functions of the own
- single control wrappers and either fill a new data object (the item
- itself in most cases, see step B1) with all the values from the
- controls, or fill all the controls from the data object.
- B3) Create a new connection class derived from ItemControlConnection,
- or use the ItemControlConnection template directly. The multiple
- control wrapper from step B2 acts like a single control, therefore
- it is possible to use the ItemControlConnection.
- B4) See steps A4 and A5.
-
- C) Multiple items <-> single control connections
-
- todo
-
- D) Multiple items <-> multiple controls connections
-
- todo
-
- The current tree of base classes/templates and standard connections:
-
- ItemConnectionBase
- |
- +- DummyItemConnection [1]
- |
- +- ItemControlConnection< ItemWrpT, ControlWrpT >
- | |
- | +- NumericConnection< ItemWrpT > [1]
- | | |
- | | +- [ValueType]NumericConnection [1] [2]
- | |
- | +- ListBoxConnection< ItemWrpT > [1]
- | |
- | +- [ValueType]ListBoxConnection [1] [2]
- |
- +- ItemConnectionArray [1]
-
- Notes:
- [1] Standard connections ready to use.
- [2] [ValueType] is one of Int16, UInt16, Int32, UInt32.
- */
-class SFX2_DLLPUBLIC ItemConnectionBase
-{
-public:
- virtual ~ItemConnectionBase();
-
- /** Calls the virtual ApplyFlags() function, if connection is active. */
- void DoApplyFlags( const SfxItemSet* pItemSet );
- /** Calls the virtual Reset() function, if connection is active. */
- void DoReset( const SfxItemSet* pItemSet );
- /** Calls the virtual FillItemSet() function, if connection is active. */
- bool DoFillItemSet( SfxItemSet& rDestSet, const SfxItemSet& rOldSet );
-
-protected:
- explicit ItemConnectionBase( ItemConnFlags nFlags );
-
- /** Derived classes implement actions according to current flags here. */
- virtual void ApplyFlags( const SfxItemSet* pItemSet ) = 0;
- /** Derived classes implement initializing controls from item sets here. */
- virtual void Reset( const SfxItemSet* pItemSet ) = 0;
- /** Derived classes implement filling item sets from controls here. */
- virtual bool FillItemSet( SfxItemSet& rDestSet, const SfxItemSet& rOldSet ) = 0;
-
- /** Returns whether to show a control, according to current flags. */
- TriState GetShowState( bool bKnown ) const;
-
-private:
- ItemConnectionBase( const ItemConnectionBase& ) = delete;
- ItemConnectionBase& operator=( const ItemConnectionBase& ) = delete;
-
- ItemConnFlags mnFlags; /// Flags for additional options.
-};
-
-} // namespace sfx
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/sfx2/itemwrapper.hxx b/include/sfx2/itemwrapper.hxx
deleted file mode 100644
index 193cd012e550..000000000000
--- a/include/sfx2/itemwrapper.hxx
+++ /dev/null
@@ -1,60 +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 INCLUDED_SFX2_ITEMWRAPPER_HXX
-#define INCLUDED_SFX2_ITEMWRAPPER_HXX
-
-#include <sal/config.h>
-#include <sfx2/dllapi.h>
-#include <svl/eitem.hxx>
-#include <svl/intitem.hxx>
-
-class SfxItemSet;
-
-namespace sfx {
-
-
-// Helpers
-
-
-class SFX2_DLLPUBLIC ItemWrapperHelper
-{
-public:
- /** Returns the WID of the passed SID in the item set. */
- static sal_uInt16 GetWhichId( const SfxItemSet& rItemSet, sal_uInt16 nSlot );
-
- /** Returns true, if the passed item set supports the SID. */
- static bool IsKnownItem( const SfxItemSet& rItemSet, sal_uInt16 nSlot );
-
- /** Returns an item from an item set, if it is not in "don't know" state.
- @return Pointer to item, or 0 if it has "don't know" state. */
- static const SfxPoolItem* GetUniqueItem( const SfxItemSet& rItemSet, sal_uInt16 nSlot );
-
- /** Returns the default item from the pool of the passed item set. */
- static const SfxPoolItem& GetDefaultItem( const SfxItemSet& rItemSet, sal_uInt16 nSlot );
-
- /** Removes an item from rDestSet, if it is default in rOldSet. */
- static void RemoveDefaultItem( SfxItemSet& rDestSet, const SfxItemSet& rOldSet, sal_uInt16 nSlot );
-};
-
-} // namespace sfx
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svtools/treelistbox.hxx b/include/svtools/treelistbox.hxx
index 9f38a6ff76c0..c4df5127375c 100644
--- a/include/svtools/treelistbox.hxx
+++ b/include/svtools/treelistbox.hxx
@@ -686,7 +686,6 @@ public:
void SetSpaceBetweenEntries( short nSpace );
short GetSpaceBetweenEntries() const {return nEntryHeightOffs;}
Point GetEntryPosition( SvTreeListEntry* ) const;
- void ShowEntry( SvTreeListEntry* ); // !!!OBSOLETE, use MakeVisible
void MakeVisible( SvTreeListEntry* pEntry );
void MakeVisible( SvTreeListEntry* pEntry, bool bMoveToTop );
diff --git a/include/svx/dialcontrol.hxx b/include/svx/dialcontrol.hxx
index 44a8291d7435..ae3205d3b8c1 100644
--- a/include/svx/dialcontrol.hxx
+++ b/include/svx/dialcontrol.hxx
@@ -24,7 +24,6 @@
#include <vcl/ctrl.hxx>
#include <vcl/customweld.hxx>
#include <vcl/weld.hxx>
-#include <sfx2/itemconnect.hxx>
#include <svx/svxdllapi.h>
class NumericField;
diff --git a/include/svx/dlgctrl.hxx b/include/svx/dlgctrl.hxx
index ab2bc673292a..6718e7351eb5 100644
--- a/include/svx/dlgctrl.hxx
+++ b/include/svx/dlgctrl.hxx
@@ -216,30 +216,6 @@ public:
/************************************************************************/
-class SAL_WARN_UNUSED SVX_DLLPUBLIC HatchingLB : public ListBox
-{
-public:
- explicit HatchingLB(vcl::Window* pParent, WinBits aWB);
-};
-
-/************************************************************************/
-
-class SAL_WARN_UNUSED SVX_DLLPUBLIC GradientLB : public ListBox
-{
-public:
- explicit GradientLB(vcl::Window* pParent, WinBits aWB);
-};
-
-/************************************************************************/
-
-class SAL_WARN_UNUSED SVX_DLLPUBLIC BitmapLB : public ListBox
-{
-public:
- explicit BitmapLB(vcl::Window* pParent, WinBits aWB);
-};
-
-/************************************************************************/
-
class SAL_WARN_UNUSED SVX_DLLPUBLIC FillTypeLB : public ListBox
{
@@ -262,10 +238,6 @@ public:
void Fill(const XDashListRef &pList);
bool getAddStandardFields() const { return mbAddStandardFields; }
- void setAddStandardFields(bool bNew);
-
- void Append(const XDashEntry& rEntry, const BitmapEx& rBitmap );
- void Modify(const XDashEntry& rEntry, sal_Int32 nPos, const BitmapEx& rBitmap );
};
class SAL_WARN_UNUSED SVX_DLLPUBLIC SvxLineLB
diff --git a/include/svx/fontlb.hxx b/include/svx/fontlb.hxx
index fe9c3b3ce19e..13d0cf43721c 100644
--- a/include/svx/fontlb.hxx
+++ b/include/svx/fontlb.hxx
@@ -35,10 +35,6 @@ private:
public:
SvLBoxFontString();
- SvLBoxFontString(
- const OUString& rString,
- const vcl::Font& rFont,
- const Color* pColor );
virtual ~SvLBoxFontString() override;
diff --git a/include/svx/frmdirlbox.hxx b/include/svx/frmdirlbox.hxx
index 72455bef1770..a6aeb8ed2eb5 100644
--- a/include/svx/frmdirlbox.hxx
+++ b/include/svx/frmdirlbox.hxx
@@ -22,7 +22,6 @@
#include <vcl/lstbox.hxx>
#include <vcl/weld.hxx>
-#include <sfx2/itemconnect.hxx>
#include <editeng/frmdir.hxx>
#include <svx/svxdllapi.h>
diff --git a/include/svx/orienthelper.hxx b/include/svx/orienthelper.hxx
index c5cf59892b93..6fb516f831b0 100644
--- a/include/svx/orienthelper.hxx
+++ b/include/svx/orienthelper.hxx
@@ -22,7 +22,6 @@
#include <memory>
#include <vcl/window.hxx>
-#include <sfx2/itemconnect.hxx>
#include <svx/svxdllapi.h>
class NumericField;