Kaydet (Commit) 5badba20 authored tarafından Jan Holesovsky's avatar Jan Holesovsky

A bit of cleanup.

Change-Id: Ia7c5cf07dba7f65ee65dab67a0a32975c8026dce
üst 5f363ce8
...@@ -96,7 +96,7 @@ public: ...@@ -96,7 +96,7 @@ public:
sal_uInt16 nCol=HEADERBAR_APPEND, sal_uInt16 nCol=HEADERBAR_APPEND,
HeaderBarItemBits nBits = HIB_STDSTYLE); HeaderBarItemBits nBits = HIB_STDSTYLE);
void SetTabs( long* pTabs, MapUnit = MAP_APPFONT ); void SetTabs(const long* pTabs, MapUnit = MAP_APPFONT);
void ClearHeader(); void ClearHeader();
......
...@@ -65,7 +65,7 @@ protected: ...@@ -65,7 +65,7 @@ protected:
public: public:
SvTabListBox( vcl::Window* pParent, WinBits = WB_BORDER ); SvTabListBox( vcl::Window* pParent, WinBits = WB_BORDER );
virtual ~SvTabListBox(); virtual ~SvTabListBox();
void SetTabs( long* pTabs, MapUnit = MAP_APPFONT ); void SetTabs(const long* pTabs, MapUnit = MAP_APPFONT);
sal_uInt16 TabCount() const { return (sal_uInt16)nTabCount; } sal_uInt16 TabCount() const { return (sal_uInt16)nTabCount; }
using SvTreeListBox::GetTab; using SvTreeListBox::GetTab;
long GetTab( sal_uInt16 nTab ) const; long GetTab( sal_uInt16 nTab ) const;
......
...@@ -42,9 +42,7 @@ ...@@ -42,9 +42,7 @@
#define FLT_DATE_BETWEEN 4 #define FLT_DATE_BETWEEN 4
#define FLT_DATE_SAVE 5 #define FLT_DATE_SAVE 5
/// Struct for sorting data.
// Struct for sorting data
class SVX_DLLPUBLIC RedlinData class SVX_DLLPUBLIC RedlinData
{ {
public: public:
...@@ -55,6 +53,7 @@ public: ...@@ -55,6 +53,7 @@ public:
void* pData; void* pData;
}; };
/// Entries for list.
class SvxRedlinEntry : public SvTreeListEntry class SvxRedlinEntry : public SvTreeListEntry
{ {
public: public:
...@@ -62,7 +61,7 @@ public: ...@@ -62,7 +61,7 @@ public:
virtual ~SvxRedlinEntry(); virtual ~SvxRedlinEntry();
}; };
// Class for the representation of Strings depending on the font /// Class for the representation of Strings depending on the font.
class SvLBoxColorString : public SvLBoxString class SvLBoxColorString : public SvLBoxString
{ {
private: private:
...@@ -75,6 +74,10 @@ public: ...@@ -75,6 +74,10 @@ public:
SvLBoxColorString(); SvLBoxColorString();
virtual ~SvLBoxColorString(); virtual ~SvLBoxColorString();
/** Paint function of the SvLBoxColorString class.
The relevant text with the selected color is drawn in the output device.
*/
virtual void Paint( virtual void Paint(
const Point& rPos, SvTreeListBox& rOutDev, const SvViewDataEntry* pView, const SvTreeListEntry* pEntry) SAL_OVERRIDE; const Point& rPos, SvTreeListBox& rOutDev, const SvViewDataEntry* pView, const SvTreeListEntry* pEntry) SAL_OVERRIDE;
...@@ -109,8 +112,6 @@ protected: ...@@ -109,8 +112,6 @@ protected:
virtual sal_Int32 ColCompare(SvTreeListEntry*,SvTreeListEntry*) SAL_OVERRIDE; virtual sal_Int32 ColCompare(SvTreeListEntry*,SvTreeListEntry*) SAL_OVERRIDE;
virtual void InitEntry(SvTreeListEntry*, const OUString&, const Image&, const Image&, SvLBoxButtonKind) SAL_OVERRIDE; virtual void InitEntry(SvTreeListEntry*, const OUString&, const Image&, const Image&, SvLBoxButtonKind) SAL_OVERRIDE;
public: public:
SvxRedlinTable(SvSimpleTableContainer& rParent, WinBits nBits = WB_BORDER); SvxRedlinTable(SvSimpleTableContainer& rParent, WinBits nBits = WB_BORDER);
...@@ -165,9 +166,7 @@ public: ...@@ -165,9 +166,7 @@ public:
const Link& GetColCompareHdl() const { return aColCompareLink; } const Link& GetColCompareHdl() const { return aColCompareLink; }
}; };
/// Tabpage with the filter text entries etc.
// Filter- Tabpage
class SVX_DLLPUBLIC SvxTPFilter: public TabPage class SVX_DLLPUBLIC SvxTPFilter: public TabPage
{ {
private: private:
...@@ -208,7 +207,6 @@ private: ...@@ -208,7 +207,6 @@ private:
DECL_LINK( ModifyDate, void* ); DECL_LINK( ModifyDate, void* );
DECL_LINK( RefHandle, PushButton* ); DECL_LINK( RefHandle, PushButton* );
protected: protected:
void ShowDateFields(sal_uInt16 nKind); void ShowDateFields(sal_uInt16 nKind);
...@@ -242,7 +240,6 @@ public: ...@@ -242,7 +240,6 @@ public:
void SetComment(const OUString& rComment); void SetComment(const OUString& rComment);
OUString GetComment()const; OUString GetComment()const;
// Methods for Calc { // Methods for Calc {
void SetRange(const OUString& rString); void SetRange(const OUString& rString);
OUString GetRange() const; OUString GetRange() const;
...@@ -293,15 +290,10 @@ public: ...@@ -293,15 +290,10 @@ public:
void Enable( bool bEnable = true, bool bChild = true ); void Enable( bool bEnable = true, bool bChild = true );
void Disable( bool bChild = true ); void Disable( bool bChild = true );
// } Methods for Calc // } Methods for Calc
}; };
/// Tabpage with the redlining entries.
// View- Tabpage
class SVX_DLLPUBLIC SvxTPView: public TabPage class SVX_DLLPUBLIC SvxTPView: public TabPage
{ {
private: private:
...@@ -399,7 +391,6 @@ public: ...@@ -399,7 +391,6 @@ public:
SvxRedlinTable* GetViewTable(); SvxRedlinTable* GetViewTable();
}; };
#endif // INCLUDED_SVX_CTREDLIN_HXX #endif // INCLUDED_SVX_CTREDLIN_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -168,7 +168,7 @@ void SvSimpleTable::SetTabs() ...@@ -168,7 +168,7 @@ void SvSimpleTable::SetTabs()
} }
} }
void SvSimpleTable::SetTabs( long* pTabs, MapUnit eMapUnit) void SvSimpleTable::SetTabs(const long* pTabs, MapUnit eMapUnit)
{ {
SvHeaderTabListBox::SetTabs(pTabs,eMapUnit); SvHeaderTabListBox::SetTabs(pTabs,eMapUnit);
} }
......
...@@ -118,7 +118,7 @@ SvTabListBox::~SvTabListBox() ...@@ -118,7 +118,7 @@ SvTabListBox::~SvTabListBox()
#endif #endif
} }
void SvTabListBox::SetTabs( long* pTabs, MapUnit eMapUnit ) void SvTabListBox::SetTabs(const long* pTabs, MapUnit eMapUnit)
{ {
DBG_ASSERT(pTabs,"SetTabs:NULL-Ptr"); DBG_ASSERT(pTabs,"SetTabs:NULL-Ptr");
if( !pTabs ) if( !pTabs )
......
...@@ -33,33 +33,19 @@ ...@@ -33,33 +33,19 @@
#include <svx/ctredlin.hxx> #include <svx/ctredlin.hxx>
#include "helpid.hrc" #include "helpid.hrc"
// Local Defines and Function
static long nStaticTabs[]=
{
5,10,65,120,170,220
};
#define WRITER_DATE 2 #define WRITER_DATE 2
#define CALC_DATE 3 #define CALC_DATE 3
RedlinData::RedlinData() RedlinData::RedlinData() : aDateTime(DateTime::EMPTY)
:
aDateTime( DateTime::EMPTY )
{ {
bDisabled=false; bDisabled=false;
pData=NULL; pData=NULL;
} }
RedlinData::~RedlinData() RedlinData::~RedlinData()
{ {
} }
// class SvxRedlinEntry (Entries for list)
SvxRedlinEntry::SvxRedlinEntry() SvxRedlinEntry::SvxRedlinEntry()
: SvTreeListEntry() : SvTreeListEntry()
{ {
...@@ -71,9 +57,6 @@ SvxRedlinEntry::~SvxRedlinEntry() ...@@ -71,9 +57,6 @@ SvxRedlinEntry::~SvxRedlinEntry()
delete pRedDat; delete pRedDat;
} }
// Functions in the inserts Items of SvxRedlinTable
SvLBoxColorString::SvLBoxColorString(SvTreeListEntry*pEntry, sal_uInt16 nFlags, const OUString& rStr, SvLBoxColorString::SvLBoxColorString(SvTreeListEntry*pEntry, sal_uInt16 nFlags, const OUString& rStr,
const Color& rCol) const Color& rCol)
: SvLBoxString(pEntry, nFlags, rStr) : SvLBoxString(pEntry, nFlags, rStr)
...@@ -99,12 +82,6 @@ SvLBoxItem* SvLBoxColorString::Create() const ...@@ -99,12 +82,6 @@ SvLBoxItem* SvLBoxColorString::Create() const
void SvLBoxColorString::Paint( void SvLBoxColorString::Paint(
const Point& rPos, SvTreeListBox& rDev, const Point& rPos, SvTreeListBox& rDev,
const SvViewDataEntry* pView, const SvTreeListEntry* pEntry) const SvViewDataEntry* pView, const SvTreeListEntry* pEntry)
/* [Description]
Paint function of the SvLBoxColorString class. The relevant text with the
selected color is drawn in the output device.
*/
{ {
Color aColor=rDev.GetTextColor(); Color aColor=rDev.GetTextColor();
Color a2Color=aColor; Color a2Color=aColor;
...@@ -192,7 +169,6 @@ void SvxRedlinTable::SetCalcView(bool bFlag) ...@@ -192,7 +169,6 @@ void SvxRedlinTable::SetCalcView(bool bFlag)
} }
} }
void SvxRedlinTable::UpdateFilterTest() void SvxRedlinTable::UpdateFilterTest()
{ {
Date aDateMax( Date::SYSTEM ); Date aDateMax( Date::SYSTEM );
...@@ -202,7 +178,6 @@ void SvxRedlinTable::UpdateFilterTest() ...@@ -202,7 +178,6 @@ void SvxRedlinTable::UpdateFilterTest()
tools::Time aTMin(0); tools::Time aTMin(0);
tools::Time aTMax(23,59,59); tools::Time aTMax(23,59,59);
DateTime aDTMin(aDateMin); DateTime aDTMin(aDateMin);
DateTime aDTMax(aDateMax); DateTime aDTMax(aDateMax);
...@@ -236,7 +211,6 @@ void SvxRedlinTable::UpdateFilterTest() ...@@ -236,7 +211,6 @@ void SvxRedlinTable::UpdateFilterTest()
} }
} }
void SvxRedlinTable::SetFilterDate(bool bFlag) void SvxRedlinTable::SetFilterDate(bool bFlag)
{ {
bDate=bFlag; bDate=bFlag;
...@@ -414,7 +388,8 @@ SvxTPView::SvxTPView(vcl::Window *pParent, VclBuilderContainer *pTopLevel) ...@@ -414,7 +388,8 @@ SvxTPView::SvxTPView(vcl::Window *pParent, VclBuilderContainer *pTopLevel)
m_pRejectAll->SetClickHdl(aLink); m_pRejectAll->SetClickHdl(aLink);
m_pUndo->SetClickHdl(aLink); m_pUndo->SetClickHdl(aLink);
m_pViewData->SetTabs(nStaticTabs); const long pTabs[] = { 5, 10, 65, 120, 170, 220 };
m_pViewData->SetTabs(pTabs);
} }
void SvxTPView::ActivatePage() void SvxTPView::ActivatePage()
...@@ -1102,8 +1077,6 @@ void SvxAcceptChgCtr::ShowViewPage() ...@@ -1102,8 +1077,6 @@ void SvxAcceptChgCtr::ShowViewPage()
SetCurPageId(m_nViewPageId); SetCurPageId(m_nViewPageId);
} }
SvxRedlinTable* SvxAcceptChgCtr::GetViewTable() SvxRedlinTable* SvxAcceptChgCtr::GetViewTable()
{ {
return pTPView ? pTPView->GetTableControl() : NULL; return pTPView ? pTPView->GetTableControl() : NULL;
......
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