diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-08-02 10:12:55 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-08-02 11:42:23 +0100 |
commit | 3b35bcf25fce566f91d084574650181ea791dff8 (patch) | |
tree | 6c88c34861607186707f2d6940fec81d99c9c223 /include | |
parent | 0ac1e2ad19d4fdb46dcf54f67db2df081f4675bb (diff) |
split out VclBuilder static methods
Change-Id: Ic94b39351c9a6131fb61883a98ae9e3ee60ad119
Diffstat (limited to 'include')
-rw-r--r-- | include/vcl/builder.hxx | 39 | ||||
-rw-r--r-- | include/vcl/builderfactory.hxx | 2 | ||||
-rw-r--r-- | include/vcl/edit.hxx | 2 | ||||
-rw-r--r-- | include/vcl/window.hxx | 3 |
4 files changed, 23 insertions, 23 deletions
diff --git a/include/vcl/builder.hxx b/include/vcl/builder.hxx index b2f6c94ca5e4..6d1fe7eed0a2 100644 --- a/include/vcl/builder.hxx +++ b/include/vcl/builder.hxx @@ -82,30 +82,12 @@ public: //release ownership of pWindow, i.e. don't delete it void drop_ownership(const vcl::Window *pWindow); - //apply the properties of rProps to pWindow - static void set_properties(vcl::Window *pWindow, const stringmap &rProps); - - //Convert _ gtk markup to ~ vcl markup - static OUString convertMnemonicMarkup(const OUString &rIn); - - static OUString extractCustomProperty(stringmap &rMap); - static FieldUnit detectUnit(OUString const&); - - static bool extractDropdown(stringmap &rMap); - - //add a default value of 25 width-chars to a map if width-chars not set - static void ensureDefaultWidthChars(VclBuilder::stringmap &rMap); - //see m_aDeferredProperties, you need this for toplevel dialogs //which build themselves from their ctor. The properties on //the top level are stored in m_aDeferredProperties and need //to be applied post ctor void setDeferredProperties(); - //Helpers to retrofit all the existing code to the builder - static void reorderWithinParent(std::vector< vcl::Window*>& rChilds, bool bIsButtonBox); - static void reorderWithinParent(vcl::Window &rWindow, sal_uInt16 nNewPosition); - /// return UI-File name (without '.ui') const OString& getUIFile() const { @@ -399,6 +381,27 @@ private: void delete_by_window(vcl::Window *pWindow); }; +namespace BuilderUtils +{ + //apply the properties of rProps to pWindow + VCL_DLLPUBLIC void set_properties(vcl::Window *pWindow, const VclBuilder::stringmap &rProps); + + //Convert _ gtk markup to ~ vcl markup + VCL_DLLPUBLIC OUString convertMnemonicMarkup(const OUString &rIn); + + VCL_DLLPUBLIC OUString extractCustomProperty(VclBuilder::stringmap &rMap); + VCL_DLLPUBLIC FieldUnit detectUnit(OUString const&); + + VCL_DLLPUBLIC bool extractDropdown(VclBuilder::stringmap &rMap); + + //add a default value of 25 width-chars to a map if width-chars not set + VCL_DLLPUBLIC void ensureDefaultWidthChars(VclBuilder::stringmap &rMap); + + //Helpers to retrofit all the existing code to the builder + VCL_DLLPUBLIC void reorderWithinParent(std::vector< vcl::Window*>& rChilds, bool bIsButtonBox); + VCL_DLLPUBLIC void reorderWithinParent(vcl::Window &rWindow, sal_uInt16 nNewPosition); +} + template <typename T> inline T* VclBuilder::get(VclPtr<T>& ret, const OString& sID) { diff --git a/include/vcl/builderfactory.hxx b/include/vcl/builderfactory.hxx index c2bada89ffe2..8014832b3ac2 100644 --- a/include/vcl/builderfactory.hxx +++ b/include/vcl/builderfactory.hxx @@ -30,7 +30,7 @@ #define VCL_BUILDER_FACTORY_CONSTRUCTOR(typeName,arg2) \ extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL make##typeName(VclPtr<vcl::Window> & rRet, VclPtr<vcl::Window> & pParent, VclBuilder::stringmap & rMap) \ { \ - OUString sBorder = VclBuilder::extractCustomProperty(rMap); \ + OUString sBorder = BuilderUtils::extractCustomProperty(rMap); \ WinBits wb = arg2; \ if (!sBorder.isEmpty()) \ wb |= WB_BORDER; \ diff --git a/include/vcl/edit.hxx b/include/vcl/edit.hxx index 632e9b751ee7..75b571ff87ca 100644 --- a/include/vcl/edit.hxx +++ b/include/vcl/edit.hxx @@ -40,10 +40,10 @@ namespace i18n { class XExtendedInputSequenceChecker; }}}} +class VclBuilder; struct DDInfo; struct Impl_IMEInfos; - #define EDIT_NOLIMIT SAL_MAX_INT32 #define EDIT_UPDATEDATA_TIMEOUT 350 diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx index 71ca0d2f282b..7c2aa534fa69 100644 --- a/include/vcl/window.hxx +++ b/include/vcl/window.hxx @@ -433,7 +433,6 @@ namespace vcl { class Cursor; } class Dialog; class WindowImpl; class PaintHelper; -class VclBuilder; class VclSizeGroup; class OutputDevice; class Application; @@ -448,7 +447,6 @@ class PushButton; class RadioButton; class SystemChildWindow; class ImplBorderWindow; -class VclBuilder; class ImplDockingWindowWrapper; class ImplPopupFloatWin; class MenuFloatingWindow; @@ -495,7 +493,6 @@ class VCL_DLLPUBLIC Window : public ::OutputDevice friend class ::RadioButton; friend class ::SystemChildWindow; friend class ::ImplBorderWindow; - friend class ::VclBuilder; friend class ::PaintHelper; friend class ::LifecycleTest; |