summaryrefslogtreecommitdiffstats
path: root/include/sfx2
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-05-28 17:17:03 +0100
committerCaolán McNamara <caolanm@redhat.com>2019-05-29 14:55:52 +0200
commitb7b78dfc0719c3aa0e250b2992d3b04e135a26be (patch)
treecd909bf91be446efaba3b0a34dfe1daa470cd505 /include/sfx2
parenttdf#56738: fix encoding in comments in doc files (>= Word 97) (diff)
downloadcore-b7b78dfc0719c3aa0e250b2992d3b04e135a26be.tar.gz
core-b7b78dfc0719c3aa0e250b2992d3b04e135a26be.zip
weld SfxCmisPropertiesPage
Change-Id: I3a824acd126dcbd3bde60ca9d68afd79cb708ed8 Reviewed-on: https://gerrit.libreoffice.org/73126 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'include/sfx2')
-rw-r--r--include/sfx2/dinfdlg.hxx72
1 files changed, 33 insertions, 39 deletions
diff --git a/include/sfx2/dinfdlg.hxx b/include/sfx2/dinfdlg.hxx
index 45444aff0166..e8408e794e09 100644
--- a/include/sfx2/dinfdlg.hxx
+++ b/include/sfx2/dinfdlg.hxx
@@ -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