summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-06-22 16:41:24 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-07-26 09:41:46 +0200
commitb032d746a48b8887ccc2330b2fdbf63d701a213f (patch)
treeb7d2b80a2a614711069f4d814845346ff20df12b /include
parente953ce16d24cff34b97940a6063704cd487fec42 (diff)
weld SwTextGridPage
Change-Id: I4f8e5f643126bea5deef7636b6d20f8080cb6662 Reviewed-on: https://gerrit.libreoffice.org/56309 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/svx/colorbox.hxx13
-rw-r--r--include/svx/colorwindow.hxx1
-rw-r--r--include/vcl/svapp.hxx1
-rw-r--r--include/vcl/weld.hxx12
4 files changed, 26 insertions, 1 deletions
diff --git a/include/svx/colorbox.hxx b/include/svx/colorbox.hxx
index cedcbfff48a8..a4aa9de32133 100644
--- a/include/svx/colorbox.hxx
+++ b/include/svx/colorbox.hxx
@@ -96,9 +96,12 @@ private:
std::unique_ptr<ColorWindow> m_xColorWindow;
std::unique_ptr<weld::MenuButton> m_xButton;
weld::Window* m_pTopLevel;
+ Link<ColorListBox&, void> m_aSelectedLink;
ListBoxColorWrapper m_aColorWrapper;
Color m_aAutoDisplayColor;
+ Color m_aSaveColor;
NamedColor m_aSelectedColor;
+ bool m_bInterimBuilder;
std::shared_ptr<PaletteManager> m_xPaletteManager;
BorderColorStatus m_aBorderColorStatus;
@@ -107,9 +110,14 @@ private:
void LockWidthRequest();
ColorWindow* getColorWindow() const;
public:
- ColorListBox(weld::MenuButton* pControl, weld::Window* pWindow);
+ ColorListBox(weld::MenuButton* pControl, weld::Window* pWindow, bool bInterimBuilder = false);
~ColorListBox();
+ void SetSelectHdl(const Link<ColorListBox&, void>& rLink)
+ {
+ m_aSelectedLink = rLink;
+ }
+
Color const & GetSelectEntryColor() const { return m_aSelectedColor.first; }
void SelectEntry(const Color& rColor);
@@ -118,6 +126,9 @@ public:
void ShowPreview(const NamedColor &rColor);
void EnsurePaletteManager();
+
+ void SaveValue() { m_aSaveColor = GetSelectEntryColor(); }
+ bool IsValueChangedFromSaved() const { return m_aSaveColor != GetSelectEntryColor(); }
};
/** A wrapper for SvxColorListBox. */
diff --git a/include/svx/colorwindow.hxx b/include/svx/colorwindow.hxx
index 1e92a543a2f8..8c061ec0d895 100644
--- a/include/svx/colorwindow.hxx
+++ b/include/svx/colorwindow.hxx
@@ -147,6 +147,7 @@ public:
sal_uInt16 nSlotId,
const css::uno::Reference< css::frame::XFrame >& rFrame,
weld::Window* pParentWindow, weld::MenuButton* pMenuButton,
+ bool bInterimBuilder,
ColorSelectFunction const& rColorSelectFunction);
weld::Container* GetWidget() { return mxTopLevel.get(); }
virtual ~ColorWindow() override;
diff --git a/include/vcl/svapp.hxx b/include/vcl/svapp.hxx
index 201276634765..92a422cb7072 100644
--- a/include/vcl/svapp.hxx
+++ b/include/vcl/svapp.hxx
@@ -1397,6 +1397,7 @@ public:
static weld::Builder* CreateBuilder(weld::Widget* pParent, const OUString &rUIFile);
static weld::Builder* CreateInterimBuilder(vcl::Window* pParent, const OUString &rUIFile); //for the duration of same SfxTabPages in mixed parent types
+ static weld::Builder* CreateInterimBuilder(weld::Widget* pParent, const OUString &rUIFile); //for the duration of same SfxTabPages in mixed parent types
static weld::MessageDialog* CreateMessageDialog(weld::Widget* pParent, VclMessageType eMessageType,
VclButtonsType eButtonType, const OUString& rPrimaryMessage);
diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index fe391c8e26d4..443b916b5142 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -543,6 +543,18 @@ public:
get_range(min, dummy);
set_range(min, max);
}
+ int get_min() const
+ {
+ int min, dummy;
+ get_range(min, dummy);
+ return min;
+ }
+ int get_max() const
+ {
+ int dummy, max;
+ get_range(dummy, max);
+ return max;
+ }
virtual void set_increments(int step, int page) = 0;
virtual void get_increments(int& step, int& page) const = 0;
virtual void set_digits(unsigned int digits) = 0;