[ Edit Chart ] -> [ Edit Object ]
This button was introduced in commit 376cd2ceae
Author Muhammet Kara <muhammet.kara@collabora.com>
Date Wed Nov 20 15:30:01 2019 +0300
Add Edit Chart button for online's mobile view
It is shown for any kind of OLE object, including Math. So make its text
more neutral.
Possibly it could make sense to construct the name from the OLE object's
proper name in a follow-up.
Change-Id: Ied2e9b10db3bcbfab4328a1f65f812cd52f85004
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133426
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
This commit is contained in:
@@ -85,7 +85,7 @@ PosSizePropertyPanel::PosSizePropertyPanel(
|
||||
mxAlignDispatch(new ToolbarUnoDispatcher(*mxAlignTbx, *m_xBuilder, rxFrame)),
|
||||
mxAlignTbx2(m_xBuilder->weld_toolbar("aligntoolbar2")),
|
||||
mxAlignDispatch2(new ToolbarUnoDispatcher(*mxAlignTbx2, *m_xBuilder, rxFrame)),
|
||||
mxBtnEditChart(m_xBuilder->weld_button("btnEditChart")),
|
||||
mxBtnEditOLEObject(m_xBuilder->weld_button("btnEditObject")),
|
||||
mpView(nullptr),
|
||||
mlOldWidth(1),
|
||||
mlOldHeight(1),
|
||||
@@ -157,7 +157,7 @@ PosSizePropertyPanel::~PosSizePropertyPanel()
|
||||
mxArrangeDispatch2.reset();
|
||||
mxArrangeTbx.reset();
|
||||
mxArrangeTbx2.reset();
|
||||
mxBtnEditChart.reset();
|
||||
mxBtnEditOLEObject.reset();
|
||||
|
||||
maTransfPosXControl.dispose();
|
||||
maTransfPosYControl.dispose();
|
||||
@@ -226,7 +226,7 @@ void PosSizePropertyPanel::Initialize()
|
||||
pDrawingArea->set_size_request(aSize.Width(), aSize.Height());
|
||||
mxCtrlDial->Init(aSize);
|
||||
|
||||
mxBtnEditChart->connect_clicked( LINK( this, PosSizePropertyPanel, ClickChartEditHdl ) );
|
||||
mxBtnEditOLEObject->connect_clicked( LINK( this, PosSizePropertyPanel, ClickObjectEditHdl ) );
|
||||
|
||||
SfxViewShell* pCurSh = SfxViewShell::Current();
|
||||
if ( pCurSh )
|
||||
@@ -273,7 +273,7 @@ void PosSizePropertyPanel::HandleContextChange(
|
||||
bool bShowPosition = false;
|
||||
bool bShowAngle = false;
|
||||
bool bShowFlip = false;
|
||||
bool bShowEditChart = false;
|
||||
bool bShowEditObject = false;
|
||||
bool bShowArrangeTbx2 = false;
|
||||
|
||||
switch (maContext.GetCombinedContext_DI())
|
||||
@@ -302,13 +302,13 @@ void PosSizePropertyPanel::HandleContextChange(
|
||||
break;
|
||||
|
||||
case CombinedEnumContext(Application::WriterVariants, Context::OLE):
|
||||
bShowEditChart = true;
|
||||
bShowEditObject = true;
|
||||
break;
|
||||
|
||||
case CombinedEnumContext(Application::Calc, Context::OLE):
|
||||
case CombinedEnumContext(Application::DrawImpress, Context::OLE):
|
||||
bShowPosition = true;
|
||||
bShowEditChart = true;
|
||||
bShowEditObject = true;
|
||||
break;
|
||||
|
||||
case CombinedEnumContext(Application::Calc, Context::Chart):
|
||||
@@ -338,8 +338,8 @@ void PosSizePropertyPanel::HandleContextChange(
|
||||
mxFtFlip->set_visible(bShowFlip);
|
||||
mxFlipTbx->set_visible(bShowFlip);
|
||||
|
||||
// Edit Chart
|
||||
mxBtnEditChart->set_visible(bShowEditChart);
|
||||
// Edit Object
|
||||
mxBtnEditOLEObject->set_visible(bShowEditObject);
|
||||
|
||||
// Arrange tool bar 2
|
||||
mxArrangeTbx2->set_visible(bShowArrangeTbx2);
|
||||
@@ -452,7 +452,7 @@ IMPL_LINK_NOARG( PosSizePropertyPanel, RotationHdl, DialControl&, void )
|
||||
SfxCallMode::RECORD, { &aAngleItem, &aRotXItem, &aRotYItem });
|
||||
}
|
||||
|
||||
IMPL_STATIC_LINK_NOARG( PosSizePropertyPanel, ClickChartEditHdl, weld::Button&, void )
|
||||
IMPL_STATIC_LINK_NOARG( PosSizePropertyPanel, ClickObjectEditHdl, weld::Button&, void )
|
||||
{
|
||||
SfxViewShell* pCurSh = SfxViewShell::Current();
|
||||
if ( pCurSh)
|
||||
|
@@ -114,8 +114,8 @@ private:
|
||||
std::unique_ptr<weld::Toolbar> mxAlignTbx2;
|
||||
std::unique_ptr<ToolbarUnoDispatcher> mxAlignDispatch2;
|
||||
|
||||
//edit charts button for online's mobile view
|
||||
std::unique_ptr<weld::Button> mxBtnEditChart;
|
||||
//edit objects button for online's mobile view
|
||||
std::unique_ptr<weld::Button> mxBtnEditOLEObject;
|
||||
|
||||
// Internal variables
|
||||
basegfx::B2DRange maRect;
|
||||
@@ -161,7 +161,7 @@ private:
|
||||
DECL_LINK( ChangeHeightHdl, weld::MetricSpinButton&, void );
|
||||
DECL_LINK( ClickAutoHdl, weld::Toggleable&, void );
|
||||
DECL_LINK( RotationHdl, svx::DialControl&, void );
|
||||
DECL_STATIC_LINK( PosSizePropertyPanel, ClickChartEditHdl, weld::Button&, void );
|
||||
DECL_STATIC_LINK( PosSizePropertyPanel, ClickObjectEditHdl, weld::Button&, void );
|
||||
|
||||
void Initialize();
|
||||
void executeSize();
|
||||
|
@@ -445,8 +445,8 @@
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkButton" id="btnEditChart">
|
||||
<property name="label" translatable="yes" context="sidebarpossize|btnEditChart">Edit Chart</property>
|
||||
<object class="GtkButton" id="btnEditObject">
|
||||
<property name="label" translatable="yes" context="sidebarpossize|btnEditObject">Edit Object</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="valign">start</property>
|
||||
|
Reference in New Issue
Block a user