diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2015-03-09 15:35:25 +0900 |
---|---|---|
committer | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2015-03-10 14:04:34 +0900 |
commit | 6a2f0cecd249f672e74c3b08653ff56891c24071 (patch) | |
tree | af375b4e890560a62e3c8f741e25694df0516339 /sc | |
parent | 9364aee03b195422367026979940135429b40ffa (diff) |
clean-up ScGridWindow
Change-Id: I006b17efd78334c71c0dddbeb6f906cb955a3f39
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/view/gridwin.cxx | 36 | ||||
-rw-r--r-- | sc/source/ui/view/gridwin2.cxx | 33 |
2 files changed, 36 insertions, 33 deletions
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index 298162fc0cbb..4f36aac83572 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -138,9 +138,8 @@ #include <boost/scoped_ptr.hpp> #include <boost/shared_ptr.hpp> -using namespace com::sun::star; -using ::com::sun::star::uno::Sequence; -using ::com::sun::star::uno::Any; +using namespace css; +using namespace css::uno; const sal_uInt8 SC_NESTEDBUTTON_NONE = 0; const sal_uInt8 SC_NESTEDBUTTON_DOWN = 1; @@ -149,8 +148,8 @@ const sal_uInt8 SC_NESTEDBUTTON_UP = 2; #define SC_AUTOFILTER_ALL 0 #define SC_AUTOFILTER_TOP10 1 #define SC_AUTOFILTER_CUSTOM 2 -#define SC_AUTOFILTER_EMPTY 3 -#define SC_AUTOFILTER_NOTEMPTY 4 +#define SC_AUTOFILTER_EMPTY 3 +#define SC_AUTOFILTER_NOTEMPTY 4 // Modi fuer die FilterListBox enum ScFilterBoxMode @@ -169,13 +168,18 @@ struct ScGridWindow::MouseEventState { bool mbActivatePart; - MouseEventState() : mbActivatePart(false) {} + MouseEventState() : + mbActivatePart(false) + {} }; #define SC_FILTERLISTBOX_LINES 12 -ScGridWindow::VisibleRange::VisibleRange() : - mnCol1(0), mnCol2(MAXCOL), mnRow1(0), mnRow2(MAXROW) +ScGridWindow::VisibleRange::VisibleRange() + : mnCol1(0) + , mnCol2(MAXCOL) + , mnRow1(0) + , mnRow2(MAXROW) { } @@ -2641,25 +2645,25 @@ void ScGridWindow::MouseMove( const MouseEvent& rMEvt ) return; } -static void lcl_InitMouseEvent( ::com::sun::star::awt::MouseEvent& rEvent, const MouseEvent& rEvt ) +static void lcl_InitMouseEvent(css::awt::MouseEvent& rEvent, const MouseEvent& rEvt) { rEvent.Modifiers = 0; if ( rEvt.IsShift() ) - rEvent.Modifiers |= ::com::sun::star::awt::KeyModifier::SHIFT; + rEvent.Modifiers |= css::awt::KeyModifier::SHIFT; if ( rEvt.IsMod1() ) - rEvent.Modifiers |= ::com::sun::star::awt::KeyModifier::MOD1; + rEvent.Modifiers |= css::awt::KeyModifier::MOD1; if ( rEvt.IsMod2() ) - rEvent.Modifiers |= ::com::sun::star::awt::KeyModifier::MOD2; + rEvent.Modifiers |= css::awt::KeyModifier::MOD2; if ( rEvt.IsMod3() ) - rEvent.Modifiers |= ::com::sun::star::awt::KeyModifier::MOD3; + rEvent.Modifiers |= css::awt::KeyModifier::MOD3; rEvent.Buttons = 0; if ( rEvt.IsLeft() ) - rEvent.Buttons |= ::com::sun::star::awt::MouseButton::LEFT; + rEvent.Buttons |= css::awt::MouseButton::LEFT; if ( rEvt.IsRight() ) - rEvent.Buttons |= ::com::sun::star::awt::MouseButton::RIGHT; + rEvent.Buttons |= css::awt::MouseButton::RIGHT; if ( rEvt.IsMiddle() ) - rEvent.Buttons |= ::com::sun::star::awt::MouseButton::MIDDLE; + rEvent.Buttons |= css::awt::MouseButton::MIDDLE; rEvent.X = rEvt.GetPosPixel().X(); rEvent.Y = rEvt.GetPosPixel().Y(); diff --git a/sc/source/ui/view/gridwin2.cxx b/sc/source/ui/view/gridwin2.cxx index 5b434428d3ba..b98dadb4c88b 100644 --- a/sc/source/ui/view/gridwin2.cxx +++ b/sc/source/ui/view/gridwin2.cxx @@ -50,17 +50,16 @@ #include <vector> #include <boost/scoped_ptr.hpp> -using namespace com::sun::star; -using ::com::sun::star::sheet::DataPilotFieldOrientation; -using ::std::vector; -using ::std::unique_ptr; +using namespace css; +using namespace css::sheet; +using css::sheet::DataPilotFieldOrientation; +using std::vector; +using std::unique_ptr; // STATIC DATA ----------------------------------------------------------- DataPilotFieldOrientation ScGridWindow::GetDPFieldOrientation( SCCOL nCol, SCROW nRow ) const { - using namespace ::com::sun::star::sheet; - ScDocument* pDoc = pViewData->GetDocument(); SCTAB nTab = pViewData->GetTabNo(); ScDPObject* pDPObj = pDoc->GetDPAtCursor(nCol, nRow, nTab); @@ -83,7 +82,7 @@ DataPilotFieldOrientation ScGridWindow::GetDPFieldOrientation( SCCOL nCol, SCROW } } - nOrient = sheet::DataPilotFieldOrientation_HIDDEN; + nOrient = DataPilotFieldOrientation_HIDDEN; // Now, check for row/column field. long nField = pDPObj->GetHeaderDim(ScAddress(nCol, nRow, nTab), nOrient); @@ -101,7 +100,7 @@ DataPilotFieldOrientation ScGridWindow::GetDPFieldOrientation( SCCOL nCol, SCROW // private method for mouse button handling bool ScGridWindow::DoPageFieldSelection( SCCOL nCol, SCROW nRow ) { - if (GetDPFieldOrientation( nCol, nRow ) == sheet::DataPilotFieldOrientation_PAGE) + if (GetDPFieldOrientation( nCol, nRow ) == DataPilotFieldOrientation_PAGE) { LaunchPageFieldMenu( nCol, nRow ); return true; @@ -162,7 +161,7 @@ void ScGridWindow::DoPushPivotButton( SCCOL nCol, SCROW nRow, const MouseEvent& if (pDPObj) { - sal_uInt16 nOrient = sheet::DataPilotFieldOrientation_HIDDEN; + sal_uInt16 nOrient = DataPilotFieldOrientation_HIDDEN; ScAddress aPos( nCol, nRow, nTab ); ScAddress aDimPos = aPos; if (!bButton && bPopup && aDimPos.Col() > 0) @@ -300,20 +299,20 @@ void ScGridWindow::DPTestMouse( const MouseEvent& rMEvt, bool bMove ) else if ( bHasRange ) switch (nOrient) { - case sheet::DataPilotFieldOrientation_COLUMN: ePointer = POINTER_PIVOT_COL; break; - case sheet::DataPilotFieldOrientation_ROW: ePointer = POINTER_PIVOT_ROW; break; - case sheet::DataPilotFieldOrientation_PAGE: - case sheet::DataPilotFieldOrientation_DATA: ePointer = POINTER_PIVOT_FIELD; break; + case DataPilotFieldOrientation_COLUMN: ePointer = POINTER_PIVOT_COL; break; + case DataPilotFieldOrientation_ROW: ePointer = POINTER_PIVOT_ROW; break; + case DataPilotFieldOrientation_PAGE: + case DataPilotFieldOrientation_DATA: ePointer = POINTER_PIVOT_FIELD; break; } SetPointer( ePointer ); } else // execute change { if (!bHasRange) - nOrient = sheet::DataPilotFieldOrientation_HIDDEN; + nOrient = DataPilotFieldOrientation_HIDDEN; - if ( bIsDataLayout && ( nOrient != sheet::DataPilotFieldOrientation_COLUMN && - nOrient != sheet::DataPilotFieldOrientation_ROW ) ) + if ( bIsDataLayout && ( nOrient != DataPilotFieldOrientation_COLUMN && + nOrient != DataPilotFieldOrientation_ROW ) ) { // removing data layout is not allowed pViewData->GetView()->ErrorMessage(STR_PIVOT_MOVENOTALLOWED); @@ -477,7 +476,7 @@ void ScGridWindow::DPLaunchFieldPopupMenu( mpDPFieldPopup->initMembers(); } - if (pDim->GetOrientation() != sheet::DataPilotFieldOrientation_PAGE) + if (pDim->GetOrientation() != DataPilotFieldOrientation_PAGE) { vector<OUString> aUserSortNames; ScUserList* pUserList = ScGlobal::GetUserList(); |