summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2013-08-07 22:20:19 +0200
committerMichael Stahl <mstahl@redhat.com>2013-08-08 23:25:28 +0200
commit8d4aafa7ce55c873fa55b11d4ffbfa409b412a92 (patch)
tree1f2d5b66294c98680bc87c1d6dd14f2cc4c87ecf /sw
parent03eb15938e04a8a28fc08ca7528b2f7068fe1c7a (diff)
sw: turns out that SwComboBoxStyle stuff was not actually used
Change-Id: I4e0e3832268e11a445391a99d52d099917bc8aec
Diffstat (limited to 'sw')
-rw-r--r--sw/source/ui/cctrl/swlbox.cxx44
-rw-r--r--sw/source/ui/inc/swlbox.hxx27
2 files changed, 6 insertions, 65 deletions
diff --git a/sw/source/ui/cctrl/swlbox.cxx b/sw/source/ui/cctrl/swlbox.cxx
index d66cebcf3645..9860138bbbe3 100644
--- a/sw/source/ui/cctrl/swlbox.cxx
+++ b/sw/source/ui/cctrl/swlbox.cxx
@@ -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: */
diff --git a/sw/source/ui/inc/swlbox.hxx b/sw/source/ui/inc/swlbox.hxx
index fe0b9af96ac4..1b8a02f4e12d 100644
--- a/sw/source/ui/inc/swlbox.hxx
+++ b/sw/source/ui/inc/swlbox.hxx
@@ -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 */