summaryrefslogtreecommitdiff
path: root/sc/source/ui/view
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-03-31 13:07:32 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-04-03 06:22:40 +0000
commitfcad02149f3a9964f36522d97faaf303fc321788 (patch)
tree86f2ba2af66bf02c93f78759667a836955fd6d3d /sc/source/ui/view
parent74917d23782413aa0f129bcf9e6bf5a1c496d23b (diff)
use actual UNO enums in sc
Change-Id: I51dbe623178e3c463dc4c941f23edac04fbfe349 Reviewed-on: https://gerrit.libreoffice.org/35968 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/ui/view')
-rw-r--r--sc/source/ui/view/cellsh1.cxx2
-rw-r--r--sc/source/ui/view/dbfunc3.cxx9
-rw-r--r--sc/source/ui/view/gridwin.cxx4
-rw-r--r--sc/source/ui/view/gridwin2.cxx11
4 files changed, 13 insertions, 13 deletions
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index fd31875848fe..0a1f250ceb7b 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -1073,7 +1073,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
if ( pDPObj )
{
Sequence<sheet::DataPilotFieldFilter> aFilters;
- sal_uInt16 nOrientation;
+ css::sheet::DataPilotFieldOrientation nOrientation;
if ( pTabViewShell->HasSelectionForDrillDown( nOrientation ) )
{
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
diff --git a/sc/source/ui/view/dbfunc3.cxx b/sc/source/ui/view/dbfunc3.cxx
index ad0f714e9b65..cc512457c5d3 100644
--- a/sc/source/ui/view/dbfunc3.cxx
+++ b/sc/source/ui/view/dbfunc3.cxx
@@ -32,7 +32,6 @@
#include <com/sun/star/sheet/DataPilotFieldOrientation.hpp>
#include <com/sun/star/sheet/DataPilotFieldSortMode.hpp>
#include <com/sun/star/sheet/DataPilotTableHeaderData.hpp>
-#include <com/sun/star/sheet/GeneralFunction.hpp>
#include <com/sun/star/sheet/MemberResultFlags.hpp>
#include <com/sun/star/sheet/XDimensionsSupplier.hpp>
#include <com/sun/star/sheet/XDrillDownDataSupplier.hpp>
@@ -1337,7 +1336,7 @@ void ScDBFunc::DataPilotInput( const ScAddress& rPos, const OUString& rString )
ScDPSaveData aData( *pDPObj->GetSaveData() );
bool bChange = false;
- sal_uInt16 nOrient = DataPilotFieldOrientation_HIDDEN;
+ DataPilotFieldOrientation nOrient = DataPilotFieldOrientation_HIDDEN;
long nField = pDPObj->GetHeaderDim( rPos, nOrient );
if ( nField >= 0 )
{
@@ -1841,7 +1840,7 @@ bool ScDBFunc::DataPilotMove( const ScRange& rSource, const ScAddress& rDest )
return bRet;
}
-bool ScDBFunc::HasSelectionForDrillDown( sal_uInt16& rOrientation )
+bool ScDBFunc::HasSelectionForDrillDown( css::sheet::DataPilotFieldOrientation& rOrientation )
{
bool bRet = false;
@@ -1863,7 +1862,7 @@ bool ScDBFunc::HasSelectionForDrillDown( sal_uInt16& rOrientation )
ScDPSaveDimension* pDim = pSaveData->GetExistingDimensionByName( aDimName );
if ( pDim )
{
- sal_uInt16 nDimOrient = pDim->GetOrientation();
+ css::sheet::DataPilotFieldOrientation nDimOrient = pDim->GetOrientation();
ScDPSaveDimension* pInner = pSaveData->GetInnermostDimension( nDimOrient );
if ( pDim == pInner )
{
@@ -1910,7 +1909,7 @@ void ScDBFunc::SetDataPilotDetails(bool bShow, const OUString* pNewDimensionName
pDuplicated = aData.DuplicateDimension( *pNewDimensionName );
}
- sal_uInt16 nOrientation = pDim->GetOrientation();
+ css::sheet::DataPilotFieldOrientation nOrientation = pDim->GetOrientation();
pNewDim->SetOrientation( nOrientation );
long nPosition = LONG_MAX;
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index d0c878b52bb6..4e33afb9bda7 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -2031,7 +2031,7 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
if ( ( aData.Flags & sheet::MemberResultFlags::HASMEMBER ) &&
! ( aData.Flags & sheet::MemberResultFlags::SUBTOTAL ) )
{
- sal_uInt16 nDummy;
+ css::sheet::DataPilotFieldOrientation nDummy;
if ( pView->HasSelectionForDrillDown( nDummy ) )
{
// execute slot to show dialog
@@ -3443,7 +3443,7 @@ sal_Int8 ScGridWindow::AcceptPrivateDrop( const AcceptDropEvent& rEvt )
{
ScRange aOutRange = pDPObj->GetOutRange();
- sal_uInt16 nOrient = pDim->GetOrientation();
+ sheet::DataPilotFieldOrientation nOrient = pDim->GetOrientation();
if ( nOrient == sheet::DataPilotFieldOrientation_COLUMN )
{
eDragInsertMode = INS_CELLSRIGHT;
diff --git a/sc/source/ui/view/gridwin2.cxx b/sc/source/ui/view/gridwin2.cxx
index 91936ae35c0e..88fe45a6c96a 100644
--- a/sc/source/ui/view/gridwin2.cxx
+++ b/sc/source/ui/view/gridwin2.cxx
@@ -61,7 +61,7 @@ DataPilotFieldOrientation ScGridWindow::GetDPFieldOrientation( SCCOL nCol, SCROW
if (!pDPObj)
return DataPilotFieldOrientation_HIDDEN;
- sal_uInt16 nOrient = DataPilotFieldOrientation_HIDDEN;
+ DataPilotFieldOrientation nOrient = DataPilotFieldOrientation_HIDDEN;
// Check for page field first.
if (nCol > 0)
@@ -86,7 +86,7 @@ DataPilotFieldOrientation ScGridWindow::GetDPFieldOrientation( SCCOL nCol, SCROW
bool bIsDataLayout = false;
OUString aFieldName = pDPObj->GetDimName(nField, bIsDataLayout);
if (!aFieldName.isEmpty() && !bIsDataLayout)
- return static_cast<DataPilotFieldOrientation>(nOrient);
+ return nOrient;
}
return DataPilotFieldOrientation_HIDDEN;
@@ -156,7 +156,7 @@ void ScGridWindow::DoPushPivotButton( SCCOL nCol, SCROW nRow, const MouseEvent&
if (pDPObj)
{
- sal_uInt16 nOrient = DataPilotFieldOrientation_HIDDEN;
+ DataPilotFieldOrientation nOrient = DataPilotFieldOrientation_HIDDEN;
ScAddress aPos( nCol, nRow, nTab );
ScAddress aDimPos = aPos;
if (!bButton && bPopup && aDimPos.Col() > 0)
@@ -276,7 +276,7 @@ void ScGridWindow::DPTestMouse( const MouseEvent& rMEvt, bool bMove )
ScAddress aPos( nPosX, nPosY, pViewData->GetTabNo() );
tools::Rectangle aPosRect;
- sal_uInt16 nOrient;
+ DataPilotFieldOrientation nOrient;
long nDimPos;
bool bHasRange = pDragDPObj->GetHeaderDrag( aPos, bMouseLeft, bMouseTop, nDPField,
aPosRect, nOrient, nDimPos );
@@ -299,6 +299,7 @@ void ScGridWindow::DPTestMouse( const MouseEvent& rMEvt, bool bMove )
case DataPilotFieldOrientation_ROW: ePointer = PointerStyle::PivotRow; break;
case DataPilotFieldOrientation_PAGE:
case DataPilotFieldOrientation_DATA: ePointer = PointerStyle::PivotField; break;
+ default: break;
}
SetPointer( ePointer );
}
@@ -439,7 +440,7 @@ private:
void ScGridWindow::DPLaunchFieldPopupMenu(const Point& rScreenPosition, const Size& rScreenSize,
const ScAddress& rAddress, ScDPObject* pDPObject)
{
- sal_uInt16 nOrient;
+ DataPilotFieldOrientation nOrient;
long nDimIndex = pDPObject->GetHeaderDim(rAddress, nOrient);
DPLaunchFieldPopupMenu(rScreenPosition, rScreenSize, nDimIndex, pDPObject);