summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/svx/dlgctrl.hxx53
-rw-r--r--include/vcl/weld.hxx32
2 files changed, 76 insertions, 9 deletions
diff --git a/include/svx/dlgctrl.hxx b/include/svx/dlgctrl.hxx
index 90c4fc6e8f6d..2061a211f312 100644
--- a/include/svx/dlgctrl.hxx
+++ b/include/svx/dlgctrl.hxx
@@ -268,7 +268,6 @@ public:
void Modify(const XDashEntry& rEntry, sal_Int32 nPos, const BitmapEx& rBitmap );
};
-
/************************************************************************/
class SAL_WARN_UNUSED SVX_DLLPUBLIC LineEndLB : public ListBox
@@ -283,6 +282,27 @@ public:
void Modify( const XLineEndEntry& rEntry, sal_Int32 nPos, const BitmapEx& rBitmap );
};
+class SAL_WARN_UNUSED SVX_DLLPUBLIC SvxLineEndLB
+{
+private:
+ std::unique_ptr<weld::ComboBox> m_xControl;
+
+public:
+ SvxLineEndLB(std::unique_ptr<weld::ComboBox> pControl);
+
+ void Fill( const XLineEndListRef &pList, bool bStart = true );
+
+ void Append( const XLineEndEntry& rEntry, const BitmapEx& rBitmap );
+ void Modify( const XLineEndEntry& rEntry, sal_Int32 nPos, const BitmapEx& rBitmap );
+
+ void clear() { m_xControl->clear(); }
+ void remove(int nPos) { m_xControl->remove(nPos); }
+ int get_active() const { return m_xControl->get_active(); }
+ void set_active(int nPos) { m_xControl->set_active(nPos); }
+ OUString get_active_text() const { return m_xControl->get_active_text(); }
+ void connect_changed(const Link<weld::ComboBox&, void>& rLink) { m_xControl->connect_changed(rLink); }
+ int get_count() const { return m_xControl->get_count(); }
+};
class SdrObject;
class SdrPathObj;
@@ -353,6 +373,11 @@ public:
mpBufferDevice->SetDrawMode(nDrawMode);
}
+ Size GetOutputSize() const
+ {
+ return mpBufferDevice->PixelToLogic(GetOutputSizePixel());
+ }
+
// dada read access
SdrModel& getModel() const
{
@@ -398,6 +423,32 @@ public:
virtual Size GetOptimalSize() const override;
};
+class SAL_WARN_UNUSED SVX_DLLPUBLIC XLinePreview : public PreviewBase
+{
+private:
+ SdrPathObj* mpLineObjA;
+ SdrPathObj* mpLineObjB;
+ SdrPathObj* mpLineObjC;
+
+ Graphic* mpGraphic;
+ bool mbWithSymbol;
+ Size maSymbolSize;
+
+public:
+ XLinePreview();
+ virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override;
+ virtual ~XLinePreview() override;
+
+ void SetLineAttributes(const SfxItemSet& rItemSet);
+
+ void ShowSymbol( bool b ) { mbWithSymbol = b; };
+ void SetSymbol( Graphic* p, const Size& s );
+ void ResizeSymbol( const Size& s );
+
+ virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override;
+ virtual void Resize() override;
+};
+
class SAL_WARN_UNUSED SVX_DLLPUBLIC SvxXRectPreview : public PreviewBase
{
private:
diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index 1ca91e7b4fa9..ddfd104189e4 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -258,12 +258,20 @@ protected:
public:
virtual void insert_text(int pos, const OUString& rStr) = 0;
void append_text(const OUString& rStr) { insert_text(-1, rStr); }
- virtual void insert(int pos, const OUString& rId, const OUString& rStr, const OUString* pImage)
+ virtual void insert(int pos, const OUString& rId, const OUString& rStr,
+ const OUString* pIconName, VirtualDevice* pImageSufface)
= 0;
- void append(const OUString& rId, const OUString& rStr) { insert(-1, rId, rStr, nullptr); }
+ void append(const OUString& rId, const OUString& rStr)
+ {
+ insert(-1, rId, rStr, nullptr, nullptr);
+ }
void append(const OUString& rId, const OUString& rStr, const OUString& rImage)
{
- insert(-1, rId, rStr, &rImage);
+ insert(-1, rId, rStr, &rImage, nullptr);
+ }
+ void append(const OUString& rId, const OUString& rStr, VirtualDevice& rImage)
+ {
+ insert(-1, rId, rStr, nullptr, &rImage);
}
virtual int get_count() const = 0;
@@ -318,13 +326,21 @@ protected:
public:
virtual void insert_text(const OUString& rText, int pos) = 0;
- virtual void insert(int pos, const OUString& rId, const OUString& rStr, const OUString* pImage)
+ virtual void insert(int pos, const OUString& rId, const OUString& rStr,
+ const OUString* pIconName, VirtualDevice* pImageSurface)
= 0;
void append_text(const OUString& rText) { insert_text(rText, -1); }
- void append(const OUString& rId, const OUString& rStr) { insert(-1, rId, rStr, nullptr); }
+ void append(const OUString& rId, const OUString& rStr)
+ {
+ insert(-1, rId, rStr, nullptr, nullptr);
+ }
void append(const OUString& rId, const OUString& rStr, const OUString& rImage)
{
- insert(-1, rId, rStr, &rImage);
+ insert(-1, rId, rStr, &rImage, nullptr);
+ }
+ void append(const OUString& rId, const OUString& rStr, VirtualDevice& rImage)
+ {
+ insert(-1, rId, rStr, nullptr, &rImage);
}
void connect_changed(const Link<TreeView&, void>& rLink) { m_aChangeHdl = rLink; }
@@ -630,9 +646,9 @@ public:
m_xTreeView->insert_text(rStr, pos);
}
virtual void insert(int pos, const OUString& rId, const OUString& rStr,
- const OUString* pImage) override
+ const OUString* pIconName, VirtualDevice* pImageSurface) override
{
- m_xTreeView->insert(pos, rId, rStr, pImage);
+ m_xTreeView->insert(pos, rId, rStr, pIconName, pImageSurface);
}
virtual int get_count() const override { return m_xTreeView->n_children(); }