summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-05-10 17:46:08 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-05-11 09:54:09 +0200
commit6776a3ba00cf9ba304cd4e158d09b3cc03f68ac9 (patch)
tree77af8da0b5a0afb4624bb705ed8e3223e971386d /sd
parent94aa2e5013025218b302b000d5cccf65ee557055 (diff)
draw has a sidebar, so impress/draw can use same table properties pane
Change-Id: I6f2178bf005fea4885af1359ce07722f17e87ba8 Reviewed-on: https://gerrit.libreoffice.org/54099 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sd')
-rw-r--r--sd/UIConfig_sdraw.mk1
-rw-r--r--sd/qa/unit/data/dialogs-test.txt1
-rw-r--r--sd/source/ui/table/TableDesignPane.cxx20
-rw-r--r--sd/source/ui/table/TableDesignPane.hxx16
-rw-r--r--sd/source/ui/table/tablefunction.cxx18
-rw-r--r--sd/uiconfig/sdraw/ui/tabledesigndialog.ui201
6 files changed, 5 insertions, 252 deletions
diff --git a/sd/UIConfig_sdraw.mk b/sd/UIConfig_sdraw.mk
index 1d2d6e9f2a1e..0091db50ddd8 100644
--- a/sd/UIConfig_sdraw.mk
+++ b/sd/UIConfig_sdraw.mk
@@ -113,7 +113,6 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/sdraw,\
sd/uiconfig/sdraw/ui/namedesign \
sd/uiconfig/sdraw/ui/paranumberingtab \
sd/uiconfig/sdraw/ui/queryunlinkimagedialog \
- sd/uiconfig/sdraw/ui/tabledesigndialog \
sd/uiconfig/sdraw/ui/vectorize \
))
diff --git a/sd/qa/unit/data/dialogs-test.txt b/sd/qa/unit/data/dialogs-test.txt
index eb70982b92c5..63ee21c9550c 100644
--- a/sd/qa/unit/data/dialogs-test.txt
+++ b/sd/qa/unit/data/dialogs-test.txt
@@ -55,7 +55,6 @@ modules/simpress/ui/headerfooterdialog.ui
modules/sdraw/ui/paranumberingtab.ui
modules/sdraw/ui/namedesign.ui
-modules/sdraw/ui/tabledesigndialog.ui
# currently deactivated, leads to problems and the test to not work
# This is typically a hint that these should be hard-coded in the
diff --git a/sd/source/ui/table/TableDesignPane.cxx b/sd/source/ui/table/TableDesignPane.cxx
index 71f331b43eb8..5e1114ea5e51 100644
--- a/sd/source/ui/table/TableDesignPane.cxx
+++ b/sd/source/ui/table/TableDesignPane.cxx
@@ -769,20 +769,6 @@ void TableDesignWidget::FillDesignPreviewControl()
m_pValueSet->SelectItem(nSelectedItem);
}
-short TableDesignDialog::Execute()
-{
- if( ModalDialog::Execute() )
- {
- if( aImpl.isStyleChanged() )
- aImpl.ApplyStyle();
-
- if( aImpl.isOptionsChanged() )
- aImpl.ApplyOptions();
- return RET_OK;
- }
- return RET_CANCEL;
-}
-
VclPtr<vcl::Window> createTableDesignPanel( vcl::Window* pParent, ViewShellBase& rBase )
{
VclPtr<TableDesignPane> pRet = nullptr;
@@ -796,12 +782,6 @@ VclPtr<vcl::Window> createTableDesignPanel( vcl::Window* pParent, ViewShellBase&
return pRet;
}
-void showTableDesignDialog( vcl::Window* pParent, ViewShellBase& rBase )
-{
- ScopedVclPtrInstance< TableDesignDialog > xDialog( pParent, rBase );
- xDialog->Execute();
-}
-
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/table/TableDesignPane.hxx b/sd/source/ui/table/TableDesignPane.hxx
index 6450674e60c5..347e4ed980c2 100644
--- a/sd/source/ui/table/TableDesignPane.hxx
+++ b/sd/source/ui/table/TableDesignPane.hxx
@@ -126,22 +126,6 @@ public:
}
};
-class TableDesignDialog : public ModalDialog
-{
-private:
- TableDesignWidget aImpl;
-public:
- TableDesignDialog( vcl::Window* pParent, ViewShellBase& rBase )
- : ModalDialog(pParent, "TableDesignDialog",
- "modules/sdraw/ui/tabledesigndialog.ui")
- , aImpl(this, rBase, true)
- {
- }
- virtual short Execute() override;
-};
-
-void showTableDesignDialog( vcl::Window*, ViewShellBase& );
-
}
#endif // _SD_TABLEFORMATPANE_HXX
diff --git a/sd/source/ui/table/tablefunction.cxx b/sd/source/ui/table/tablefunction.cxx
index 4a998e0dc8ad..818cde2f7c57 100644
--- a/sd/source/ui/table/tablefunction.cxx
+++ b/sd/source/ui/table/tablefunction.cxx
@@ -227,19 +227,11 @@ void DrawViewShell::FuTable(SfxRequest& rReq)
}
case SID_TABLEDESIGN:
{
- if( GetDoc() && (GetDoc()->GetDocumentType() == DocumentType::Draw) )
- {
- // in draw open a modal dialog since we have no tool pane yet
- showTableDesignDialog( GetActiveWindow(), GetViewShellBase() );
- }
- else
- {
- // First make sure that the sidebar is visible
- GetViewFrame()->ShowChildWindow(SID_SIDEBAR);
- ::sfx2::sidebar::Sidebar::ShowPanel(
- "SdTableDesignPanel",
- GetViewFrame()->GetFrame().GetFrameInterface());
- }
+ // First make sure that the sidebar is visible
+ GetViewFrame()->ShowChildWindow(SID_SIDEBAR);
+ ::sfx2::sidebar::Sidebar::ShowPanel(
+ "SdTableDesignPanel",
+ GetViewFrame()->GetFrame().GetFrameInterface());
Cancel();
rReq.Done ();
diff --git a/sd/uiconfig/sdraw/ui/tabledesigndialog.ui b/sd/uiconfig/sdraw/ui/tabledesigndialog.ui
deleted file mode 100644
index ecac4ed7f255..000000000000
--- a/sd/uiconfig/sdraw/ui/tabledesigndialog.ui
+++ /dev/null
@@ -1,201 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.18.3 -->
-<interface domain="sd">
- <requires lib="gtk+" version="3.18"/>
- <requires lib="LibreOffice" version="1.0"/>
- <object class="GtkDialog" id="TableDesignDialog">
- <property name="can_focus">False</property>
- <property name="border_width">6</property>
- <property name="title" translatable="yes" context="tabledesigndialog|TableDesignDialog">Table Design</property>
- <property name="type_hint">dialog</property>
- <child internal-child="vbox">
- <object class="GtkBox" id="dialog-vbox1">
- <property name="can_focus">False</property>
- <property name="orientation">vertical</property>
- <property name="spacing">12</property>
- <child internal-child="action_area">
- <object class="GtkButtonBox" id="dialog-action_area1">
- <property name="can_focus">False</property>
- <property name="margin_top">5</property>
- <property name="layout_style">end</property>
- <child>
- <object class="GtkButton" id="ok">
- <property name="label">gtk-ok</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="can_default">True</property>
- <property name="has_default">True</property>
- <property name="receives_default">True</property>
- <property name="use_stock">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="cancel">
- <property name="label">gtk-cancel</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_stock">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="help">
- <property name="label">gtk-help</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_stock">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">2</property>
- <property name="secondary">True</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="pack_type">end</property>
- <property name="position">0</property>
- </packing>
- </child>
- <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">6</property>
- <property name="column_spacing">12</property>
- <property name="column_homogeneous">True</property>
- <child>
- <object class="GtkCheckButton" id="UseFirstRowStyle">
- <property name="label" translatable="yes" context="tabledesigndialog|UseFirstRowStyle">_Header row</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="xalign">0</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="UseLastRowStyle">
- <property name="label" translatable="yes" context="tabledesigndialog|UseLastRowStyle">Tot_al row</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="xalign">0</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="UseBandingRowStyle">
- <property name="label" translatable="yes" context="tabledesigndialog|UseBandingRowStyle">_Banded rows</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="xalign">0</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="UseFirstColumnStyle">
- <property name="label" translatable="yes" context="tabledesigndialog|UseFirstColumnStyle">Fi_rst column</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="xalign">0</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">3</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="UseLastColumnStyle">
- <property name="label" translatable="yes" context="tabledesigndialog|UseLastColumnStyle">_Last column</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="xalign">0</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">4</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="UseBandingColumnStyle">
- <property name="label" translatable="yes" context="tabledesigndialog|UseBandingColumnStyle">Ba_nded columns</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="xalign">0</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">5</property>
- </packing>
- </child>
- <child>
- <object class="sdlo-TableValueSet" id="previews:border">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="hexpand">True</property>
- <property name="vexpand">True</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
- <property name="height">6</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- </child>
- <action-widgets>
- <action-widget response="-5">ok</action-widget>
- <action-widget response="-6">cancel</action-widget>
- <action-widget response="-11">help</action-widget>
- </action-widgets>
- </object>
-</interface>