Kaydet (Commit) 3dfe2fc3 authored tarafından Julien Nabet's avatar Julien Nabet Kaydeden (comit) Caolán McNamara

tdf#68871: Remove the old Elements panel from Math

Conflicts:
	starmath/inc/toolbox.hxx
	starmath/source/toolbox.cxx

Change-Id: Ie148d57dc14ed3f38566c24ee027f23e25987810
Reviewed-on: https://gerrit.libreoffice.org/15599Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst a878ffae
......@@ -84,7 +84,6 @@ $(eval $(call gb_Library_add_exception_objects,sm,\
starmath/source/smdll \
starmath/source/smmod \
starmath/source/symbol \
starmath/source/toolbox \
starmath/source/tmpdevice \
starmath/source/typemap \
starmath/source/unodoc \
......
......@@ -27,7 +27,6 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/smath,\
starmath/uiconfig/smath/ui/alignmentdialog \
starmath/uiconfig/smath/ui/catalogdialog \
starmath/uiconfig/smath/ui/dockingelements \
starmath/uiconfig/smath/ui/floatingelements \
starmath/uiconfig/smath/ui/fontdialog \
starmath/uiconfig/smath/ui/fontsizedialog \
starmath/uiconfig/smath/ui/fonttypedialog \
......
/* -*- 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_STARMATH_INC_TOOLBOX_HXX
#define INCLUDED_STARMATH_INC_TOOLBOX_HXX
#include <sfx2/basedlgs.hxx>
#include <sfx2/childwin.hxx>
#include <vcl/toolbox.hxx>
#include "smmod.hxx"
#include "config.hxx"
#include "toolbox.hrc"
class SmToolBoxWindow : public SfxFloatingWindow
{
protected:
VclPtr<ToolBox> m_pToolBoxCat;
sal_uInt16 m_nUnbinopsId;
sal_uInt16 m_nRelationsId;
sal_uInt16 m_nSetoperationsId;
sal_uInt16 m_nFunctionsId;
sal_uInt16 m_nOperatorsId;
sal_uInt16 m_nAttributesId;
sal_uInt16 m_nBracketsId;
sal_uInt16 m_nFormatId;
sal_uInt16 m_nMiscId;
VclPtr<ToolBox> pToolBoxCmd;
VclPtr<ToolBox> vToolBoxCategories[NUM_TBX_CATEGORIES];
ImageList *aImageLists [NUM_TBX_CATEGORIES + 1]; /* regular */
sal_uInt16 nActiveCategoryRID;
virtual bool Close() SAL_OVERRIDE;
virtual void GetFocus() SAL_OVERRIDE;
void ApplyImageLists( sal_uInt16 nCategoryRID );
DECL_LINK_TYPED( CategoryClickHdl, ToolBox*, void );
DECL_LINK_TYPED( CmdSelectHdl, ToolBox*, void );
SmViewShell * GetView();
const ImageList * GetImageList( sal_uInt16 nResId );
sal_uInt16 MapToolbarIdToCategory(sal_uInt16 nId) const;
public:
SmToolBoxWindow(SfxBindings *pBindings,
SfxChildWindow *pChildWindow,
Window *pParent);
virtual ~SmToolBoxWindow();
virtual void dispose() SAL_OVERRIDE;
// Window
virtual void StateChanged( StateChangedType nStateChange ) SAL_OVERRIDE;
virtual void DataChanged( const DataChangedEvent &rEvt ) SAL_OVERRIDE;
void AdjustPos();
void SetCategory(sal_uInt16 nCategory);
};
/**************************************************************************/
class SmToolBoxWrapper : public SfxChildWindow
{
SFX_DECL_CHILDWINDOW_WITHID(SmToolBoxWrapper);
protected:
SmToolBoxWrapper(vcl::Window *pParentWindow,
sal_uInt16, SfxBindings*, SfxChildWinInfo*);
};
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -79,7 +79,6 @@
#include <smdll.hxx>
#include <starmath.hrc>
#include <symbol.hxx>
#include <toolbox.hxx>
#include <unomodel.hxx>
#include <utility.hxx>
#include <view.hxx>
......
......@@ -31,7 +31,6 @@
#include <smdll.hxx>
#include <document.hxx>
#include <toolbox.hxx>
#include <view.hxx>
#include <ElementsDockingWindow.hxx>
......@@ -74,7 +73,6 @@ namespace
SvxUndoRedoControl::RegisterControl(SID_REDO, pModule);
XmlSecStatusBarControl::RegisterControl(SID_SIGNATURE, pModule);
SmToolBoxWrapper::RegisterChildWindow(true);
SmCmdBoxWrapper::RegisterChildWindow(true);
SmElementsDockingWindowWrapper::RegisterChildWindow(true);
......
This diff is collapsed.
......@@ -1411,35 +1411,6 @@
};
};
#define UNBINOPS_IDLIST \
IdList = \
{ \
RID_PLUSX ; \
RID_MINUSX ; \
RID_PLUSMINUSX ; \
RID_MINUSPLUSX ; \
RID_XPLUSY ; \
RID_XCDOTY ; \
RID_XTIMESY ; \
RID_XSYMTIMESY ; \
RID_XMINUSY ; \
RID_XOVERY ; \
RID_XDIVY ; \
RID_XSYMDIVIDEY ; \
RID_NEGX ; \
RID_XANDY ; \
RID_XORY ; \
RID_XCIRCY ; \
}; \
IdCount = { 16 ; };
ImageList RID_IL_UNBINOPS
{
Prefix = "un";
MaskColor = IMAGE_STDBTN_COLOR ;
UNBINOPS_IDLIST
};
#define RELATIONS_IDLIST \
IdList = \
{ \
......@@ -1710,26 +1681,4 @@
MISC_IDLIST
};
#define CATALOG_IDLIST \
IdList = \
{ \
RID_UNBINOPS_CAT ; \
RID_RELATIONS_CAT ; \
RID_SETOPERATIONS_CAT ; \
RID_FUNCTIONS_CAT ; \
RID_OPERATORS_CAT ; \
RID_ATTRIBUTES_CAT ; \
RID_MISC_CAT ; \
RID_BRACKETS_CAT ; \
RID_FORMAT_CAT ; \
}; \
IdCount = { 9 ; };
ImageList RID_IL_CATALOG
{
Prefix = "im";
MaskColor = IMAGE_STDBTN_COLOR ;
CATALOG_IDLIST
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -68,7 +68,6 @@
#include "dialog.hxx"
#include "document.hxx"
#include "starmath.hrc"
#include "toolbox.hxx"
#include "mathmlimport.hxx"
#include "cursor.hxx"
#include "accessibility.hxx"
......@@ -935,7 +934,6 @@ void SmViewShell::InitInterface_Impl()
//Dummy-Objectbar, to avoid quiver while activating
GetStaticInterface()->RegisterChildWindow(SID_TASKPANE);
GetStaticInterface()->RegisterChildWindow(SmToolBoxWrapper::GetChildWindowId());
GetStaticInterface()->RegisterChildWindow(SmCmdBoxWrapper::GetChildWindowId());
GetStaticInterface()->RegisterChildWindow(SmElementsDockingWindowWrapper::GetChildWindowId());
}
......@@ -1801,12 +1799,6 @@ void SmViewShell::Execute(SfxRequest& rReq)
}
break;
case SID_TOOLBOX:
{
GetViewFrame()->ToggleChildWindow( SmToolBoxWrapper::GetChildWindowId() );
}
break;
case SID_ELEMENTSDOCKINGWINDOW:
{
GetViewFrame()->ToggleChildWindow( SmElementsDockingWindowWrapper::GetChildWindowId() );
......@@ -1919,17 +1911,6 @@ void SmViewShell::GetState(SfxItemSet &rSet)
rSet.Put(SfxBoolItem(SID_ELEMENTSDOCKINGWINDOW, bState));
}
break;
case SID_TOOLBOX:
{
bool bState = false;
SfxChildWindow *pChildWnd = GetViewFrame()->
GetChildWindow( SmToolBoxWrapper::GetChildWindowId() );
if (pChildWnd && pChildWnd->GetWindow()->IsVisible())
bState = true;
rSet.Put(SfxBoolItem(SID_TOOLBOX, bState));
}
break;
}
}
}
......
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.16.1 -->
<interface>
<requires lib="gtk+" version="3.0"/>
<object class="GtkWindow" id="FloatingElements">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="border_width">6</property>
<property name="title" translatable="yes">Elements</property>
<property name="resizable">False</property>
<property name="type_hint">utility</property>
<property name="has_resize_grip">False</property>
<child>
<object class="GtkGrid" id="grid1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="row_spacing">12</property>
<child>
<object class="GtkSeparator" id="separator1">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkToolbar" id="catalog">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="toolbar_style">icons</property>
<property name="show_arrow">False</property>
<child>
<object class="GtkToolButton" id="RID_UNBINOPS_CAT">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="action_name">RID_UNBINOPS_CAT</property>
<property name="label" translatable="yes">Unary/Binary Operators</property>
<property name="use_underline">True</property>
<property name="icon_name">starmath/res/im21101.png</property>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkToolButton" id="RID_RELATIONS_CAT">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="action_name">RID_RELATIONS_CAT</property>
<property name="label" translatable="yes">Relations</property>
<property name="use_underline">True</property>
<property name="icon_name">starmath/res/im21102.png</property>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkToolButton" id="RID_SETOPERATIONS_CAT">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="action_name">RID_SETOPERATIONS_CAT</property>
<property name="label" translatable="yes">Set Operations</property>
<property name="use_underline">True</property>
<property name="icon_name">starmath/res/im21103.png</property>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkToolButton" id="RID_FUNCTIONS_CAT">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="action_name">RID_FUNCTIONS_CAT</property>
<property name="label" translatable="yes">Functions</property>
<property name="use_underline">True</property>
<property name="icon_name">starmath/res/im21104.png</property>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkToolButton" id="RID_OPERATORS_CAT">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="action_name">RID_OPERATORS_CAT</property>
<property name="label" translatable="yes">Operators</property>
<property name="use_underline">True</property>
<property name="icon_name">starmath/res/im21105.png</property>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkToolButton" id="RID_ATTRIBUTES_CAT">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="action_name">RID_ATTRIBUTES_CAT</property>
<property name="label" translatable="yes">Attributes</property>
<property name="use_underline">True</property>
<property name="icon_name">starmath/res/im21106.png</property>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkToolButton" id="RID_MISC_CAT">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="action_name">RID_MISC_CAT</property>
<property name="label" translatable="yes">Others</property>
<property name="use_underline">True</property>
<property name="icon_name">starmath/res/im21117.png</property>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkToolButton" id="RID_BRACKETS_CAT">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="action_name">RID_BRACKETS_CAT</property>
<property name="label" translatable="yes">Brackets</property>
<property name="use_underline">True</property>
<property name="icon_name">starmath/res/im21107.png</property>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkToolButton" id="RID_FORMAT_CAT">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="action_name">RID_FORMAT_CAT</property>
<property name="label" translatable="yes">Formats</property>
<property name="use_underline">True</property>
<property name="icon_name">starmath/res/im21108.png</property>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkBox" id="box">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="orientation">vertical</property>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">2</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
</object>
</child>
</object>
</interface>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment