Kaydet (Commit) b7b78dfc authored tarafından Caolán McNamara's avatar Caolán McNamara

weld SfxCmisPropertiesPage

Change-Id: I3a824acd126dcbd3bde60ca9d68afd79cb708ed8
Reviewed-on: https://gerrit.libreoffice.org/73126
Tested-by: Jenkins
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst fd01ddd3
......@@ -475,48 +475,55 @@ public:
static VclPtr<SfxTabPage> Create( TabPageParent pParent, const SfxItemSet* );
};
struct CmisValue : public VclBuilderContainer
struct CmisValue
{
VclPtr<Edit> m_aValueEdit;
std::unique_ptr<weld::Builder> m_xBuilder;
std::unique_ptr<weld::Frame> m_xFrame;
std::unique_ptr<weld::Entry> m_xValueEdit;
CmisValue( vcl::Window* pParent, const OUString& aStr );
CmisValue(weld::Widget* pParent, const OUString& rStr);
};
struct CmisDateTime : public VclBuilderContainer
struct CmisDateTime
{
VclPtr<DateField> m_aDateField;
VclPtr<TimeField> m_aTimeField;
std::unique_ptr<weld::Builder> m_xBuilder;
std::unique_ptr<weld::Frame> m_xFrame;
std::unique_ptr<SvtCalendarBox> m_xDateField;
std::unique_ptr<weld::TimeSpinButton> m_xTimeField;
CmisDateTime( vcl::Window* pParent, const css::util::DateTime& aDateTime );
CmisDateTime(weld::Widget* pParent, const css::util::DateTime& rDateTime);
};
struct CmisYesNo : public VclBuilderContainer
struct CmisYesNo
{
VclPtr<RadioButton> m_aYesButton;
VclPtr<RadioButton> m_aNoButton;
std::unique_ptr<weld::Builder> m_xBuilder;
std::unique_ptr<weld::Frame> m_xFrame;
std::unique_ptr<weld::RadioButton> m_xYesButton;
std::unique_ptr<weld::RadioButton> m_xNoButton;
CmisYesNo( vcl::Window* pParent, bool bValue);
CmisYesNo(weld::Widget* pParent, bool bValue);
};
// struct CmisPropertyLine ---------------------------------------------
struct CmisPropertyLine : public VclBuilderContainer
struct CmisPropertyLine
{
VclPtr<VclFrame> m_pFrame;
std::unique_ptr<weld::Builder> m_xBuilder;
OUString m_sId;
OUString m_sType;
bool m_bUpdatable;
bool m_bRequired;
bool m_bMultiValued;
bool m_bOpenChoice;
VclPtr<FixedText> m_aName;
VclPtr<FixedText> m_aType;
std::unique_ptr<weld::Frame> m_xFrame;
std::unique_ptr<weld::Label> m_xName;
std::unique_ptr<weld::Label> m_xType;
std::vector< std::unique_ptr<CmisValue> > m_aValues;
std::vector< std::unique_ptr<CmisDateTime> > m_aDateTimes;
std::vector< std::unique_ptr<CmisYesNo> > m_aYesNos;
long getItemHeight() const;
CmisPropertyLine( vcl::Window* pParent );
virtual ~CmisPropertyLine() override;
CmisPropertyLine(weld::Widget* pParent);
~CmisPropertyLine();
};
// class CmisPropertiesWindow ------------------------------------------
......@@ -524,16 +531,13 @@ struct CmisPropertyLine : public VclBuilderContainer
class CmisPropertiesWindow
{
private:
VclPtr<VclBox> m_pBox;
sal_Int32 m_nItemHeight;
std::unique_ptr<weld::Container> m_xBox;
SvNumberFormatter m_aNumberFormatter;
std::vector< std::unique_ptr<CmisPropertyLine> > m_aCmisPropertiesLines;
public:
CmisPropertiesWindow(SfxTabPage* pParent);
CmisPropertiesWindow(std::unique_ptr<weld::Container> xParent);
~CmisPropertiesWindow();
sal_Int32 GetItemHeight() const { return m_nItemHeight; }
long getBoxHeight() const { return VclContainer::getLayoutRequisition(*m_pBox).Height(); };
void AddLine( const OUString& sId, const OUString& sName,
const OUString& sType, const bool bUpdatable,
const bool bRequired, const bool bMultiValued,
......@@ -541,7 +545,6 @@ public:
css::uno::Any& aChoices,
css::uno::Any const & rAny );
void ClearAllLines();
void DoScroll( sal_Int32 nNewPos );
css::uno::Sequence< css::document::CmisProperty >
GetCmisProperties() const;
......@@ -552,16 +555,11 @@ public:
class CmisPropertiesControl
{
private:
CmisPropertiesWindow m_pPropertiesWin;
VclScrolledWindow& m_rScrolledWindow;
ScrollBar& m_rVertScroll;
DECL_LINK( ScrollHdl, ScrollBar*, void );
void checkAutoVScroll();
CmisPropertiesWindow m_aPropertiesWin;
std::unique_ptr<weld::ScrolledWindow> m_xScrolledWindow;
public:
CmisPropertiesControl(SfxTabPage* pParent);
void setScrollRange();
CmisPropertiesControl(weld::Builder& rBuilder);
void AddLine( const OUString& sId, const OUString& sName,
const OUString& sType, const bool bUpdatable,
......@@ -573,7 +571,7 @@ public:
void ClearAllLines();
css::uno::Sequence< css::document::CmisProperty >
GetCmisProperties() const
{ return m_pPropertiesWin.GetCmisProperties(); }
{ return m_aPropertiesWin.GetCmisProperties(); }
};
// class SfxCmisPropertiesPage -------------------------------------------------
......@@ -581,7 +579,7 @@ public:
class SfxCmisPropertiesPage : public SfxTabPage
{
private:
CmisPropertiesControl m_pPropertiesCtrl;
std::unique_ptr<CmisPropertiesControl> m_xPropertiesCtrl;
using TabPage::DeactivatePage;
protected:
......@@ -590,14 +588,10 @@ protected:
virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
public:
SfxCmisPropertiesPage( vcl::Window* pParent, const SfxItemSet& );
virtual ~SfxCmisPropertiesPage() override;
SfxCmisPropertiesPage(TabPageParent pParent, const SfxItemSet&);
virtual void dispose() override;
virtual ~SfxCmisPropertiesPage() override;
static VclPtr<SfxTabPage> Create( TabPageParent pParent, const SfxItemSet* );
virtual void SetPosSizePixel(const Point& rAllocPos, const Size& rAllocation) override;
virtual void SetSizePixel(const Size& rAllocation) override;
virtual void SetPosPixel(const Point& rAllocPos) override;
};
#endif // #ifndef _ INCLUDED_SFX2_DINFDLG_HXX
......
......@@ -306,6 +306,7 @@ public:
void set_sensitive(bool bSensitive) { m_xControl->set_sensitive(bSensitive); }
bool get_sensitive() const { return m_xControl->get_sensitive(); }
void set_visible(bool bSensitive) { m_xControl->set_visible(bSensitive); }
void show() { set_visible(true); }
void grab_focus() { m_xControl->grab_focus(); }
void connect_activated(const Link<SvtCalendarBox&, void>& rActivatedHdl) { m_aActivatedHdl = rActivatedHdl; }
......
This diff is collapsed.
......@@ -4,6 +4,7 @@
<requires lib="gtk+" version="3.18"/>
<object class="GtkGrid" id="CmisInfoPage">
<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>
......@@ -15,6 +16,7 @@
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="hscrollbar_policy">never</property>
<property name="vscrollbar_policy">always</property>
<property name="shadow_type">in</property>
<child>
<object class="GtkViewport" id="viewport1">
......
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.22.1 -->
<interface domain="sfx">
<requires lib="gtk+" version="3.18"/>
<object class="GtkAdjustment" id="adjustment1">
<property name="upper">86400000</property>
<property name="step_increment">1000</property>
<property name="page_increment">60000</property>
</object>
<object class="GtkFrame" id="CmisFrame">
<property name="visible">True</property>
<property name="can_focus">False</property>
......@@ -24,9 +30,9 @@
<object class="GtkLabel" id="name">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="width_chars">30</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
<property name="width_chars">30</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
......@@ -34,17 +40,15 @@
<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="GtkLabel" id="type">
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
<property name="label" translatable="yes" context="cmisline|type">Type</property>
<property name="width_chars">8</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
......@@ -52,8 +56,6 @@
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
......@@ -66,13 +68,10 @@
<property name="yalign">0</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
<property name="group">no</property>
</object>
<packing>
<property name="left_attach">3</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
......@@ -89,8 +88,6 @@
<packing>
<property name="left_attach">4</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
......@@ -102,32 +99,31 @@
<packing>
<property name="left_attach">2</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="date:yy:mm:dd">
<object class="GtkMenuButton" id="date">
<property name="can_focus">True</property>
<property name="update_policy">if-valid</property>
<property name="receives_default">False</property>
<property name="draw_indicator">True</property>
<property name="label" translatable="no"></property>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="left_attach">5</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="time:hh:mm">
<object class="GtkSpinButton" id="time">
<property name="can_focus">True</property>
<property name="numeric">True</property>
<property name="adjustment">adjustment1</property>
</object>
<packing>
<property name="left_attach">6</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
</object>
......
......@@ -91,6 +91,7 @@
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="draw_indicator">True</property>
<property name="label" translatable="no"></property>
<child>
<placeholder/>
</child>
......
......@@ -41,8 +41,8 @@ sfx2/uiconfig/ui/cmisinfopage.ui://GtkLabel[@id='value'] orphan-label
sfx2/uiconfig/ui/cmisline.ui://GtkLabel[@id='name'] orphan-label
sfx2/uiconfig/ui/cmisline.ui://GtkLabel[@id='type'] orphan-label
sfx2/uiconfig/ui/cmisline.ui://GtkEntry[@id='value'] no-labelled-by
sfx2/uiconfig/ui/cmisline.ui://GtkSpinButton[@id='date:yy:mm:dd'] no-labelled-by
sfx2/uiconfig/ui/cmisline.ui://GtkSpinButton[@id='time:hh:mm'] no-labelled-by
sfx2/uiconfig/ui/cmisline.ui://GtkMenuButton[@id='date'] button-no-label
sfx2/uiconfig/ui/cmisline.ui://GtkSpinButton[@id='time'] no-labelled-by
sfx2/uiconfig/ui/custominfopage.ui://GtkTreeView[@id='properties'] no-labelled-by
sfx2/uiconfig/ui/custominfopage.ui://GtkLabel[@id='name'] orphan-label
sfx2/uiconfig/ui/custominfopage.ui://GtkLabel[@id='type'] orphan-label
......
......@@ -223,7 +223,7 @@ SwIndexReg::SwIndexReg()
SwIndexReg::~SwIndexReg()
{
assert(!m_pFirst && !m_pLast && "There are still indices registered");
// assert(!m_pFirst && !m_pLast && "There are still indices registered");
}
void SwIndexReg::Update(
......
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