Kaydet (Commit) 8d4aafa7 authored tarafından Michael Stahl's avatar Michael Stahl

sw: turns out that SwComboBoxStyle stuff was not actually used

Change-Id: I4e0e3832268e11a445391a99d52d099917bc8aec
üst 03eb1593
......@@ -22,8 +22,6 @@
#include <swtypes.hxx>
#include <swlbox.hxx>
using namespace nsSwComboBoxStyle;
// Description: ListboxElement
SwBoxEntry::SwBoxEntry() :
......@@ -49,16 +47,14 @@ SwBoxEntry::SwBoxEntry(const SwBoxEntry& rOld) :
{
}
SwComboBox::SwComboBox(Window* pParent, sal_uInt16 nStyleBits) :
ComboBox(pParent),
nStyle(nStyleBits)
SwComboBox::SwComboBox(Window* pParent)
: ComboBox(pParent)
{
Init();
}
SwComboBox::SwComboBox(Window* pParent, const ResId& rId, sal_uInt16 nStyleBits) :
ComboBox(pParent, rId),
nStyle(nStyleBits)
SwComboBox::SwComboBox(Window* pParent, const ResId& rId)
: ComboBox(pParent, rId)
{
Init();
}
......@@ -145,36 +141,4 @@ void SwComboBox::InsertSorted(SwBoxEntry* pEntry)
aEntryLst.insert( aEntryLst.begin() + nPos, pEntry );
}
void SwComboBox::KeyInput( const KeyEvent& rKEvt )
{
sal_uInt16 nChar = rKEvt.GetCharCode();
if(nStyle & CBS_FILENAME)
{
#if defined UNX
if(nChar == '/' || nChar == ' ' )
return;
#else
if(nChar == ':' || nChar == '\\' || nChar == '.' || nChar == ' ')
return;
#endif
}
ComboBox::KeyInput(rKEvt);
}
// Convert text according to option
OUString SwComboBox::GetText() const
{
OUString aTxt( ComboBox::GetText() );
if(nStyle & CBS_LOWER)
aTxt = GetAppCharClass().lowercase( aTxt );
else if( nStyle & CBS_UPPER )
aTxt = GetAppCharClass().uppercase( aTxt );
return aTxt;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -53,41 +53,23 @@ public:
/*--------------------------------------------------------------------
Description: for combo boxes
--------------------------------------------------------------------*/
typedef sal_uInt16 SwComboBoxStyle;
namespace nsSwComboBoxStyle
{
const SwComboBoxStyle CBS_UPPER = 0x01;
const SwComboBoxStyle CBS_LOWER = 0x02;
const SwComboBoxStyle CBS_ALL = 0x04;
const SwComboBoxStyle CBS_FILENAME = 0x08;
const SwComboBoxStyle CBS_SW_FILENAME = CBS_FILENAME;
}
class SW_DLLPUBLIC SwComboBox : public ComboBox
{
SwEntryLst aEntryLst;
SwEntryLst aDelEntryLst;
SwBoxEntry aDefault;
sal_uInt16 nStyle;
SW_DLLPRIVATE void InitComboBox();
SW_DLLPRIVATE void InsertSorted(SwBoxEntry* pEntry);
SW_DLLPRIVATE void Init();
using Window::GetStyle;
using Window::SetStyle;
public:
SwComboBox(Window* pParent,
sal_uInt16 nStyleBits = nsSwComboBoxStyle::CBS_ALL);
SwComboBox(Window* pParent, const ResId& rId,
sal_uInt16 nStyleBits = nsSwComboBoxStyle::CBS_ALL);
SwComboBox(Window* pParent);
SwComboBox(Window* pParent, const ResId& rId);
~SwComboBox();
virtual void KeyInput(const KeyEvent& rKEvt) SAL_OVERRIDE;
void InsertSwEntry(const SwBoxEntry&);
virtual sal_uInt16 InsertEntry(const OUString& rStr, sal_uInt16 = 0) SAL_OVERRIDE;
......@@ -99,11 +81,6 @@ public:
sal_uInt16 GetRemovedCount() const;
const SwBoxEntry& GetRemovedEntry(sal_uInt16 nPos) const;
// FIXME ??? what is this
sal_uInt16 GetSwStyle() const { return nStyle; }
void SetSwStyle(const sal_uInt16 nSt) { nStyle = nSt; }
OUString GetText() const;
};
#endif /* _SWLBOX_HXX */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment