summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--basctl/source/basicide/basidesh.cxx3
-rw-r--r--include/svx/tbcontrl.hxx14
-rw-r--r--svx/source/tbxctrls/lboxctrl.cxx2
-rw-r--r--svx/source/tbxctrls/tbcontrl.cxx25
4 files changed, 1 insertions, 43 deletions
diff --git a/basctl/source/basicide/basidesh.cxx b/basctl/source/basicide/basidesh.cxx
index aa8ae7e364a0..75f0fe35bf90 100644
--- a/basctl/source/basicide/basidesh.cxx
+++ b/basctl/source/basicide/basidesh.cxx
@@ -62,7 +62,6 @@
#include <svx/pszctrl.hxx>
#include <svx/insctrl.hxx>
#include <svx/srchdlg.hxx>
-#include <svx/tbcontrl.hxx>
#include <com/sun/star/script/XLibraryContainerPassword.hpp>
#include <com/sun/star/container/XContainer.hpp>
#include <svx/xmlsecctrl.hxx>
@@ -177,8 +176,6 @@ void Shell::Init()
SvxPosSizeStatusBarControl::RegisterControl();
SvxInsertStatusBarControl::RegisterControl();
XmlSecStatusBarControl::RegisterControl( SID_SIGNATURE );
- SvxSimpleUndoRedoController::RegisterControl( SID_UNDO );
- SvxSimpleUndoRedoController::RegisterControl( SID_REDO );
SvxSearchDialogWrapper::RegisterChildWindow();
diff --git a/include/svx/tbcontrl.hxx b/include/svx/tbcontrl.hxx
index 4e4f477469ee..50efa73c62e2 100644
--- a/include/svx/tbcontrl.hxx
+++ b/include/svx/tbcontrl.hxx
@@ -245,20 +245,6 @@ public:
void EnsurePaletteManager();
};
-class SVXCORE_DLLPUBLIC SvxSimpleUndoRedoController final : public SfxToolBoxControl
-{
-private:
- OUString aDefaultText;
-
-public:
- SFX_DECL_TOOLBOX_CONTROL();
- SvxSimpleUndoRedoController(sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rToolBox);
- virtual ~SvxSimpleUndoRedoController() override;
-
- virtual void StateChanged(sal_uInt16 nSID, SfxItemState eState,
- const SfxPoolItem* pState) override;
-};
-
class SVXCORE_DLLPUBLIC SvxCurrencyToolBoxControl final : public svt::PopupWindowController
{
private:
diff --git a/svx/source/tbxctrls/lboxctrl.cxx b/svx/source/tbxctrls/lboxctrl.cxx
index 0f8b12019263..5497381f02dc 100644
--- a/svx/source/tbxctrls/lboxctrl.cxx
+++ b/svx/source/tbxctrls/lboxctrl.cxx
@@ -154,7 +154,7 @@ void SvxUndoRedoControl::initialize( const css::uno::Sequence< css::uno::Any >&
ToolBox* pToolBox = nullptr;
sal_uInt16 nId = 0;
- if (getToolboxId(nId, &pToolBox))
+ if (getToolboxId(nId, &pToolBox) && getModuleName() != "com.sun.star.script.BasicIDE")
{
pToolBox->SetItemBits(nId, ToolBoxItemBits::DROPDOWN | pToolBox->GetItemBits(nId));
aDefaultTooltip = pToolBox->GetQuickHelpText(nId);
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index 8096ac0168f1..c0398e5783d6 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -133,7 +133,6 @@ using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::lang;
SFX_IMPL_TOOLBOX_CONTROL( SvxStyleToolBoxControl, SfxTemplateItem );
-SFX_IMPL_TOOLBOX_CONTROL( SvxSimpleUndoRedoController, SfxStringItem );
class SvxStyleBox_Impl : public ComboBox
{
@@ -3646,30 +3645,6 @@ com_sun_star_comp_svx_FrameToolBoxControl_get_implementation(
return cppu::acquire( new SvxFrameToolBoxControl( rContext ) );
}
-SvxSimpleUndoRedoController::SvxSimpleUndoRedoController( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx )
- :SfxToolBoxControl( nSlotId, nId, rTbx )
-{
- aDefaultText = rTbx.GetItemText( nId );
-}
-
-SvxSimpleUndoRedoController::~SvxSimpleUndoRedoController()
-{
-}
-
-void SvxSimpleUndoRedoController::StateChanged( sal_uInt16, SfxItemState eState, const SfxPoolItem* pState )
-{
- const SfxStringItem* pItem = dynamic_cast<const SfxStringItem*>( pState );
- ToolBox& rBox = GetToolBox();
- if ( pItem && eState != SfxItemState::DISABLED )
- {
- OUString aNewText( MnemonicGenerator::EraseAllMnemonicChars( pItem->GetValue() ) );
- rBox.SetQuickHelpText( GetId(), aNewText );
- }
- if ( eState == SfxItemState::DISABLED )
- rBox.SetQuickHelpText( GetId(), aDefaultText );
- rBox.EnableItem( GetId(), eState != SfxItemState::DISABLED );
-}
-
SvxCurrencyToolBoxControl::SvxCurrencyToolBoxControl( const css::uno::Reference<css::uno::XComponentContext>& rContext ) :
PopupWindowController( rContext, nullptr, OUString() ),
m_eLanguage( Application::GetSettings().GetLanguageTag().getLanguageType() ),