GSoC notebookbar: impress table tab
Change-Id: I50338e2f5405171785ea610a9febc3d4f5df96e5 Reviewed-on: https://gerrit.libreoffice.org/27052 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
This commit is contained in:
parent
f541b99855
commit
4f71b88ad0
@ -830,5 +830,8 @@
|
|||||||
<glade-widget-class title="Horizontal box hiding childs depending on its priorities" name="sfxlo-PriorityHBox"
|
<glade-widget-class title="Horizontal box hiding childs depending on its priorities" name="sfxlo-PriorityHBox"
|
||||||
generic-name="PriorityHBox" parent="GtkBox"
|
generic-name="PriorityHBox" parent="GtkBox"
|
||||||
icon-name="widget-gtk-box"/>
|
icon-name="widget-gtk-box"/>
|
||||||
|
<glade-widget-class title="Table Design Control" name="sdlo-TableDesignBox"
|
||||||
|
generic-name="TableDesignBox" parent="GtkImage"
|
||||||
|
icon-name="widget-gtk-image"/>
|
||||||
</glade-widget-classes>
|
</glade-widget-classes>
|
||||||
</glade-catalog>
|
</glade-catalog>
|
||||||
|
@ -400,6 +400,7 @@ $(eval $(call gb_Library_add_exception_objects,sd,\
|
|||||||
sd/source/ui/slidesorter/view/SlsTheme \
|
sd/source/ui/slidesorter/view/SlsTheme \
|
||||||
sd/source/ui/slidesorter/view/SlsToolTip \
|
sd/source/ui/slidesorter/view/SlsToolTip \
|
||||||
sd/source/ui/slidesorter/view/SlsViewCacheContext \
|
sd/source/ui/slidesorter/view/SlsViewCacheContext \
|
||||||
|
sd/source/ui/table/TableDesignBox \
|
||||||
sd/source/ui/table/TableDesignPane \
|
sd/source/ui/table/TableDesignPane \
|
||||||
sd/source/ui/table/tablefunction \
|
sd/source/ui/table/tablefunction \
|
||||||
sd/source/ui/table/tableobjectbar \
|
sd/source/ui/table/tableobjectbar \
|
||||||
|
@ -133,6 +133,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/simpress,\
|
|||||||
sd/uiconfig/simpress/ui/slidetransitionspanel \
|
sd/uiconfig/simpress/ui/slidetransitionspanel \
|
||||||
sd/uiconfig/simpress/ui/slidetransitionspanelhorizontal \
|
sd/uiconfig/simpress/ui/slidetransitionspanelhorizontal \
|
||||||
sd/uiconfig/simpress/ui/tabledesignpanel \
|
sd/uiconfig/simpress/ui/tabledesignpanel \
|
||||||
|
sd/uiconfig/simpress/ui/tabledesignpanelhorizontal \
|
||||||
sd/uiconfig/simpress/ui/templatedialog \
|
sd/uiconfig/simpress/ui/templatedialog \
|
||||||
))
|
))
|
||||||
|
|
||||||
|
80
sd/source/ui/table/TableDesignBox.cxx
Normal file
80
sd/source/ui/table/TableDesignBox.cxx
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
/* -*- 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 .
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "ViewShellBase.hxx"
|
||||||
|
#include <sfx2/viewfrm.hxx>
|
||||||
|
#include "TableDesignPane.hxx"
|
||||||
|
#include <vcl/builderfactory.hxx>
|
||||||
|
#include <vcl/layout.hxx>
|
||||||
|
|
||||||
|
namespace sd
|
||||||
|
{
|
||||||
|
|
||||||
|
class TableDesignBox : public VclVBox
|
||||||
|
{
|
||||||
|
VclPtr<TableDesignPane> m_pPane;
|
||||||
|
bool m_bIsInitialized;
|
||||||
|
|
||||||
|
public:
|
||||||
|
TableDesignBox(vcl::Window* pParent);
|
||||||
|
~TableDesignBox() override;
|
||||||
|
|
||||||
|
virtual void dispose() override;
|
||||||
|
virtual void StateChanged(StateChangedType nStateChange) override;
|
||||||
|
};
|
||||||
|
|
||||||
|
VCL_BUILDER_FACTORY(TableDesignBox);
|
||||||
|
|
||||||
|
TableDesignBox::TableDesignBox(vcl::Window* pParent)
|
||||||
|
: VclVBox(pParent)
|
||||||
|
, m_bIsInitialized(false)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
TableDesignBox::~TableDesignBox()
|
||||||
|
{
|
||||||
|
disposeOnce();
|
||||||
|
}
|
||||||
|
|
||||||
|
void TableDesignBox::dispose()
|
||||||
|
{
|
||||||
|
m_pPane.disposeAndClear();
|
||||||
|
VclVBox::dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
void TableDesignBox::StateChanged(StateChangedType nStateChange)
|
||||||
|
{
|
||||||
|
if(SfxViewFrame::Current() && !m_bIsInitialized)
|
||||||
|
{
|
||||||
|
ViewShellBase* pBase = ViewShellBase::GetViewShellBase(SfxViewFrame::Current());
|
||||||
|
|
||||||
|
if(pBase)
|
||||||
|
{
|
||||||
|
m_pPane = VclPtr<TableDesignPane>::Create(this, *pBase, false);
|
||||||
|
m_pPane->Show();
|
||||||
|
m_pPane->SetSizePixel(GetSizePixel());
|
||||||
|
m_bIsInitialized = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
VclVBox::StateChanged(nStateChange);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
@ -317,7 +317,6 @@ void TableValueSet::Resize()
|
|||||||
Image aImage = GetItemImage(GetItemId(0));
|
Image aImage = GetItemImage(GetItemId(0));
|
||||||
Size aItemSize = aImage.GetSizePixel();
|
Size aItemSize = aImage.GetSizePixel();
|
||||||
|
|
||||||
aItemSize.Width() += 10;
|
|
||||||
aItemSize.Height() += 10;
|
aItemSize.Height() += 10;
|
||||||
int nColumnCount = (aValueSetSize.Width() - GetScrollWidth()) / aItemSize.Width();
|
int nColumnCount = (aValueSetSize.Width() - GetScrollWidth()) / aItemSize.Width();
|
||||||
if (nColumnCount < 1)
|
if (nColumnCount < 1)
|
||||||
@ -783,6 +782,7 @@ void TableDesignWidget::FillDesignPreviewControl()
|
|||||||
aSize.Height() += (10 * nRows);
|
aSize.Height() += (10 * nRows);
|
||||||
m_pValueSet->set_width_request(aSize.Width());
|
m_pValueSet->set_width_request(aSize.Width());
|
||||||
m_pValueSet->set_height_request(aSize.Height());
|
m_pValueSet->set_height_request(aSize.Height());
|
||||||
|
m_pValueSet->Resize();
|
||||||
}
|
}
|
||||||
catch( Exception& )
|
catch( Exception& )
|
||||||
{
|
{
|
||||||
|
@ -115,6 +115,12 @@ public:
|
|||||||
, aImpl(this, rBase, false)
|
, aImpl(this, rBase, false)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
TableDesignPane( vcl::Window* pParent, ViewShellBase& rBase, bool )
|
||||||
|
: PanelLayout(pParent, "TableDesignPanel",
|
||||||
|
"modules/simpress/ui/tabledesignpanelhorizontal.ui", css::uno::Reference<css::frame::XFrame>())
|
||||||
|
, aImpl(this, rBase, false)
|
||||||
|
{
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class TableDesignDialog : public ModalDialog
|
class TableDesignDialog : public ModalDialog
|
||||||
|
@ -227,7 +227,7 @@
|
|||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="sdlo-SmallButton" id="Paste">
|
<object class="vcllo-SmallButton" id="Paste">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="receives_default">True</property>
|
<property name="receives_default">True</property>
|
||||||
@ -2571,6 +2571,29 @@
|
|||||||
<property name="tab_fill">False</property>
|
<property name="tab_fill">False</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="sdlo-TableDesignBox" id="TableDesignBox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="position">8</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child type="tab">
|
||||||
|
<object class="GtkLabel" id="TableLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Table</property>
|
||||||
|
<style>
|
||||||
|
<class name="context-Table"/>
|
||||||
|
</style>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="position">9</property>
|
||||||
|
<property name="tab_fill">False</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="expand">False</property>
|
<property name="expand">False</property>
|
||||||
|
142
sd/uiconfig/simpress/ui/tabledesignpanelhorizontal.ui
Normal file
142
sd/uiconfig/simpress/ui/tabledesignpanelhorizontal.ui
Normal file
@ -0,0 +1,142 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!-- Generated with glade 3.18.3 -->
|
||||||
|
<interface>
|
||||||
|
<requires lib="gtk+" version="3.0"/>
|
||||||
|
<requires lib="LibreOffice" version="1.0"/>
|
||||||
|
<object class="GtkBox" id="TableDesignPanel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
<property name="orientation">vertical</property>
|
||||||
|
<property name="spacing">12</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox" id="box1">
|
||||||
|
<property name="height_request">70</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<child>
|
||||||
|
<object class="sdlo-TableValueSet" id="previews:border">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</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="row_spacing">6</property>
|
||||||
|
<property name="column_spacing">6</property>
|
||||||
|
<property name="row_homogeneous">True</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkCheckButton" id="UseFirstRowStyle">
|
||||||
|
<property name="label" translatable="yes">_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">0</property>
|
||||||
|
<property name="top_attach">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkCheckButton" id="UseLastRowStyle">
|
||||||
|
<property name="label" translatable="yes">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">0</property>
|
||||||
|
<property name="top_attach">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkCheckButton" id="UseBandingRowStyle">
|
||||||
|
<property name="label" translatable="yes">_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">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkCheckButton" id="UseBandingColumnStyle">
|
||||||
|
<property name="label" translatable="yes">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">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkCheckButton" id="UseFirstColumnStyle">
|
||||||
|
<property name="label" translatable="yes">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">2</property>
|
||||||
|
<property name="top_attach">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkCheckButton" id="UseLastColumnStyle">
|
||||||
|
<property name="label" translatable="yes">_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">2</property>
|
||||||
|
<property name="top_attach">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</interface>
|
Loading…
x
Reference in New Issue
Block a user