include/svx/dlgctrl.hxx | 18 +++++++++++++----- svx/source/dialog/dlgctrl.cxx | 41 ++++++++++++++++++++++++++++++++++------- 2 files changed, 47 insertions(+), 12 deletions(-)
New commits: commit c41fed97f212a6b8cd53830e1f5ded0bb9e60bf0 Author: Armin Le Grand <[email protected]> Date: Wed Apr 17 10:51:23 2013 +0000 Resolves: #i122042# corrected adding default values in LineStyleListBox (cherry picked from commit 33242bbc8350f2b253fae2d4261561796d848455) Conflicts: svx/inc/svx/dlgctrl.hxx svx/source/dialog/dlgctrl.cxx Change-Id: I4391164c0dbdd99c64fe7eca1bdd10cd92e32128 diff --git a/include/svx/dlgctrl.hxx b/include/svx/dlgctrl.hxx index d24c38f..549b273 100644 --- a/include/svx/dlgctrl.hxx +++ b/include/svx/dlgctrl.hxx @@ -307,15 +307,23 @@ public: class SVX_DLLPUBLIC LineLB : public ListBox { +private: + /// bitfield + /// defines if standard fields (none, solid) are added, default is true + bool mbAddStandardFields : 1; public: - LineLB( Window* pParent, ResId Id ) : ListBox( pParent, Id ) {} - LineLB( Window* pParent, WinBits aWB ) : ListBox( pParent, aWB ) {} + LineLB(Window* pParent, ResId Id); + LineLB(Window* pParent, WinBits aWB); + virtual ~LineLB(); - virtual void Fill( const XDashListRef &pList ); + virtual void Fill(const XDashListRef &pList); + bool getAddStandardFields() const { return mbAddStandardFields; } + void setAddStandardFields(bool bNew); - void Append( XDashEntry* pEntry, const Bitmap* pBmp = NULL ); - void Modify( XDashEntry* pEntry, sal_uInt16 nPos, const Bitmap* pBmp = NULL ); + void Append(XDashEntry* pEntry, const Bitmap* pBmp = 0); + void Modify(XDashEntry* pEntry, sal_uInt16 nPos, const Bitmap* pBmp = 0); + void SelectEntryByList(const XDashList* pList, const String& rStr, const XDash& rDash, sal_uInt16 nDist = 0); }; /************************************************************************/ diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx index c12dc7f..b863c34 100644 --- a/svx/source/dialog/dlgctrl.cxx +++ b/svx/source/dialog/dlgctrl.cxx @@ -1486,22 +1486,49 @@ void FillTypeLB::Fill() SetUpdateMode( sal_True ); } +LineLB::LineLB(Window* pParent, ResId Id) +: ListBox(pParent, Id), + mbAddStandardFields(true) +{ +} + +LineLB::LineLB(Window* pParent, WinBits aWB) +: ListBox(pParent, aWB), + mbAddStandardFields(true) +{ +} + +LineLB::~LineLB() +{ +} + +void LineLB::setAddStandardFields(bool bNew) +{ + if(getAddStandardFields() != bNew) + { + mbAddStandardFields = bNew; + } +} + // Fills the listbox (provisional) with strings void LineLB::Fill( const XDashListRef &pList ) { Clear(); - // entry for 'none' - InsertEntry(pList->GetStringForUiNoLine()); + if( !pList.is() ) + return; - // entry for solid line - InsertEntry(pList->GetStringForUiSolidLine(), pList->GetBitmapForUISolidLine()); + if(getAddStandardFields()) + { + // entry for 'none' + InsertEntry(pList->GetStringForUiNoLine()); - // entries for dashed lines + // entry for solid line + InsertEntry(pList->GetStringForUiSolidLine(), pList->GetBitmapForUISolidLine()); + } - if( !pList.is() ) - return; + // entries for dashed lines long nCount = pList->Count(); XDashEntry* pEntry; _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
