sc/source/ui/formdlg/formula.cxx |    2 
 sc/source/ui/inc/colrowba.hxx    |   13 ++--
 sc/source/ui/inc/hdrcont.hxx     |    8 ++-
 sc/source/ui/view/colrowba.cxx   |  102 +++++++++++++++++++++------------------
 sc/source/ui/view/hdrcont.cxx    |   50 ++++++++++++++++++-
 sc/source/ui/view/tabview.cxx    |    8 +--
 sc/source/ui/view/tabview5.cxx   |    8 +--
 7 files changed, 128 insertions(+), 63 deletions(-)

New commits:
commit e0b93ef5712264f78b8876993e718ccaad2c1216
Author: Dennis Francis <dennisfrancis...@gmail.com>
Date:   Sat Nov 21 05:21:46 2015 +0530

    tdf#34094 : Allow column and row selections while creating a formula
    
    Change-Id: I516ca96c0743840fb03d8208f7236ca25027bc45
    Reviewed-on: https://gerrit.libreoffice.org/20102
    Reviewed-by: Eike Rathke <er...@redhat.com>
    Tested-by: Eike Rathke <er...@redhat.com>

diff --git a/sc/source/ui/formdlg/formula.cxx b/sc/source/ui/formdlg/formula.cxx
index e4d466e..e6327ca 100644
--- a/sc/source/ui/formdlg/formula.cxx
+++ b/sc/source/ui/formdlg/formula.cxx
@@ -102,7 +102,7 @@ ScFormulaDlg::ScFormulaDlg( SfxBindings* pB, 
SfxChildWindow* pCW,
     if ( pInputHdl )
         pInputHdl->NotifyChange( nullptr );
 
-    ScFormulaReferenceHelper::enableInput( false );
+    ScFormulaReferenceHelper::enableInput( true );
     ScFormulaReferenceHelper::EnableSpreadsheets();
     m_aHelper.Init();
     ScFormulaReferenceHelper::SetDispatcherLock( true );
diff --git a/sc/source/ui/inc/colrowba.hxx b/sc/source/ui/inc/colrowba.hxx
index a21e357..65002d8 100644
--- a/sc/source/ui/inc/colrowba.hxx
+++ b/sc/source/ui/inc/colrowba.hxx
@@ -25,16 +25,17 @@
 
 class ScHeaderFunctionSet;
 class ScHeaderSelectionEngine;
+class ScTabView;
 
 class ScColBar : public ScHeaderControl
 {
-    ScViewData*              pViewData;
     ScHSplitPos              eWhich;
     ScHeaderFunctionSet*     pFuncSet;
 
 public:
-                ScColBar( vcl::Window* pParent, ScViewData* pData, ScHSplitPos 
eWhichPos,
-                            ScHeaderFunctionSet* pFunc, 
ScHeaderSelectionEngine* pEng );
+                ScColBar( vcl::Window* pParent, ScHSplitPos eWhichPos,
+                          ScHeaderFunctionSet* pFunc, ScHeaderSelectionEngine* 
pEng,
+                          ScTabView* pTab );
                 virtual ~ScColBar();
 
     virtual SCCOLROW    GetPos() const override;
@@ -60,13 +61,13 @@ public:
 
 class ScRowBar : public ScHeaderControl
 {
-    ScViewData*              pViewData;
     ScVSplitPos              eWhich;
     ScHeaderFunctionSet*     pFuncSet;
 
 public:
-                ScRowBar( vcl::Window* pParent, ScViewData* pData, ScVSplitPos 
eWhichPos,
-                            ScHeaderFunctionSet* pFunc, 
ScHeaderSelectionEngine* pEng );
+                ScRowBar( vcl::Window* pParent, ScVSplitPos eWhichPos,
+                          ScHeaderFunctionSet* pFunc, ScHeaderSelectionEngine* 
pEng,
+                          ScTabView* pTab );
                 virtual ~ScRowBar();
 
     virtual SCCOLROW    GetPos() const override;
diff --git a/sc/source/ui/inc/hdrcont.hxx b/sc/source/ui/inc/hdrcont.hxx
index 775ebd5..fe519f5 100644
--- a/sc/source/ui/inc/hdrcont.hxx
+++ b/sc/source/ui/inc/hdrcont.hxx
@@ -29,6 +29,8 @@
 // Size of the sliders
 #define HDR_SLIDERSIZE      2
 
+class ScTabView;
+
 class ScHeaderControl : public vcl::Window
 {
 private:
@@ -57,6 +59,8 @@ private:
 
     bool            bIgnoreMove;
 
+    bool            bDoneInitRef;
+
     long            GetScrPos( SCCOLROW nEntryNo ) const;
     SCCOLROW        GetMousePos( const MouseEvent& rMEvt, bool& rBorder ) 
const;
     bool            IsSelectionAllowed(SCCOLROW nPos) const;
@@ -67,6 +71,8 @@ private:
     void            DrawShadedRect( long nStart, long nEnd, const Color& 
rBaseColor );
 
 protected:
+    ScTabView*      pTabView;
+
                     // Window overrides
 
     virtual void    Paint( vcl::RenderContext& rRenderContext, const 
Rectangle& rRect ) override;
@@ -102,7 +108,7 @@ protected:
 
 public:
             ScHeaderControl( vcl::Window* pParent, SelectionEngine* 
pSelectionEngine,
-                                SCCOLROW nNewSize, bool bNewVertical );
+                             SCCOLROW nNewSize, bool bNewVertical, ScTabView* 
pTab );
             virtual ~ScHeaderControl();
 
     void    SetIgnoreMove(bool bSet)            { bIgnoreMove = bSet; }
diff --git a/sc/source/ui/view/colrowba.cxx b/sc/source/ui/view/colrowba.cxx
index 027bf58..d18e19f 100644
--- a/sc/source/ui/view/colrowba.cxx
+++ b/sc/source/ui/view/colrowba.cxx
@@ -28,6 +28,7 @@
 #include "appoptio.hxx"
 #include "globstr.hrc"
 #include "markdata.hxx"
+#include "tabview.hxx"
 #include <columnspanset.hxx>
 
 // STATIC DATA -----------------------------------------------------------
@@ -52,10 +53,10 @@ static OUString lcl_MetricString( long nTwips, const 
OUString& rText )
     }
 }
 
-ScColBar::ScColBar( vcl::Window* pParent, ScViewData* pData, ScHSplitPos 
eWhichPos,
-                    ScHeaderFunctionSet* pFunc, ScHeaderSelectionEngine* pEng 
) :
-            ScHeaderControl( pParent, pEng, MAXCOL+1, false ),
-            pViewData( pData ),
+ScColBar::ScColBar( vcl::Window* pParent, ScHSplitPos eWhichPos,
+                    ScHeaderFunctionSet* pFunc, ScHeaderSelectionEngine* pEng,
+                    ScTabView* pTab ) :
+            ScHeaderControl( pParent, pEng, MAXCOL+1, false, pTab ),
             eWhich( eWhichPos ),
             pFuncSet( pFunc )
 {
@@ -68,22 +69,23 @@ ScColBar::~ScColBar()
 
 inline bool ScColBar::UseNumericHeader() const
 {
-    return pViewData->GetDocument()->GetAddressConvention() == 
formula::FormulaGrammar::CONV_XL_R1C1;
+    return pTabView->GetViewData().GetDocument()->GetAddressConvention() == 
formula::FormulaGrammar::CONV_XL_R1C1;
 }
 
 SCCOLROW ScColBar::GetPos() const
 {
-    return pViewData->GetPosX(eWhich);
+    return pTabView->GetViewData().GetPosX(eWhich);
 }
 
 sal_uInt16 ScColBar::GetEntrySize( SCCOLROW nEntryNo ) const
 {
-    ScDocument* pDoc = pViewData->GetDocument();
-    SCTAB nTab = pViewData->GetTabNo();
+    const ScViewData& rViewData = pTabView->GetViewData();
+    ScDocument* pDoc = rViewData.GetDocument();
+    SCTAB nTab = rViewData.GetTabNo();
     if (pDoc->ColHidden(static_cast<SCCOL>(nEntryNo), nTab))
         return 0;
     else
-        return (sal_uInt16) ScViewData::ToPixel( pDoc->GetColWidth( 
static_cast<SCCOL>(nEntryNo), nTab ), pViewData->GetPPTX() );
+        return (sal_uInt16) ScViewData::ToPixel( pDoc->GetColWidth( 
static_cast<SCCOL>(nEntryNo), nTab ), rViewData.GetPPTX() );
 }
 
 OUString ScColBar::GetEntryText( SCCOLROW nEntryNo ) const
@@ -95,6 +97,7 @@ OUString ScColBar::GetEntryText( SCCOLROW nEntryNo ) const
 
 void ScColBar::SetEntrySize( SCCOLROW nPos, sal_uInt16 nNewSize )
 {
+    const ScViewData& rViewData = pTabView->GetViewData();
     sal_uInt16 nSizeTwips;
     ScSizeMode eMode = SC_SIZE_DIRECT;
     if (nNewSize < 10) nNewSize = 10; // pixels
@@ -105,9 +108,9 @@ void ScColBar::SetEntrySize( SCCOLROW nPos, sal_uInt16 
nNewSize )
         eMode = SC_SIZE_OPTIMAL;
     }
     else
-        nSizeTwips = (sal_uInt16) ( nNewSize / pViewData->GetPPTX() );
+        nSizeTwips = (sal_uInt16) ( nNewSize / rViewData.GetPPTX() );
 
-    ScMarkData& rMark = pViewData->GetMarkData();
+    const ScMarkData& rMark = rViewData.GetMarkData();
 
     std::vector<sc::ColRowSpan> aRanges;
     if ( rMark.IsColumnMarked( static_cast<SCCOL>(nPos) ) )
@@ -136,32 +139,33 @@ void ScColBar::SetEntrySize( SCCOLROW nPos, sal_uInt16 
nNewSize )
         aRanges.push_back(sc::ColRowSpan(nPos,nPos));
     }
 
-    pViewData->GetView()->SetWidthOrHeight(true, aRanges, eMode, nSizeTwips);
+    rViewData.GetView()->SetWidthOrHeight(true, aRanges, eMode, nSizeTwips);
 }
 
 void ScColBar::HideEntries( SCCOLROW nStart, SCCOLROW nEnd )
 {
     std::vector<sc::ColRowSpan> aRanges(1, sc::ColRowSpan(nStart,nEnd));
-    pViewData->GetView()->SetWidthOrHeight(true, aRanges, SC_SIZE_DIRECT, 0);
+    pTabView->GetViewData().GetView()->SetWidthOrHeight(true, aRanges, 
SC_SIZE_DIRECT, 0);
 }
 
 void ScColBar::SetMarking( bool bSet )
 {
-    pViewData->GetMarkData().SetMarking( bSet );
+    pTabView->GetViewData().GetMarkData().SetMarking( bSet );
     if (!bSet)
     {
-        pViewData->GetView()->UpdateAutoFillMark();
+        pTabView->GetViewData().GetView()->UpdateAutoFillMark();
     }
 }
 
 void ScColBar::SelectWindow()
 {
-    ScTabViewShell* pViewSh = pViewData->GetViewShell();
+    const ScViewData& rViewData = pTabView->GetViewData();
+    ScTabViewShell* pViewSh = rViewData.GetViewShell();
 
     pViewSh->SetActive();           // Appear and SetViewFrame
     pViewSh->DrawDeselectAll();
 
-    ScSplitPos eActive = pViewData->GetActivePart();
+    ScSplitPos eActive = rViewData.GetActivePart();
     if (eWhich==SC_SPLIT_LEFT)
     {
         if (eActive==SC_SPLIT_TOPRIGHT)     eActive=SC_SPLIT_TOPLEFT;
@@ -183,12 +187,13 @@ void ScColBar::SelectWindow()
 bool ScColBar::IsDisabled() const
 {
     ScModule* pScMod = SC_MOD();
-    return pScMod->IsFormulaMode() || pScMod->IsModalMode();
+    return pScMod->IsModalMode();
 }
 
 bool ScColBar::ResizeAllowed() const
 {
-    return !pViewData->HasEditView( pViewData->GetActivePart() );
+    const ScViewData& rViewData = pTabView->GetViewData();
+    return !rViewData.HasEditView( rViewData.GetActivePart() );
 }
 
 void ScColBar::DrawInvert( long nDragPosP )
@@ -197,24 +202,25 @@ void ScColBar::DrawInvert( long nDragPosP )
     Update();
     Invert(aRect);
 
-    pViewData->GetView()->InvertVertical(eWhich,nDragPosP);
+    pTabView->GetViewData().GetView()->InvertVertical(eWhich,nDragPosP);
 }
 
 OUString ScColBar::GetDragHelp( long nVal )
 {
-    long nTwips = (long) ( nVal / pViewData->GetPPTX() );
+    long nTwips = (long) ( nVal / pTabView->GetViewData().GetPPTX() );
     return lcl_MetricString( nTwips, ScGlobal::GetRscString(STR_TIP_WIDTH) );
 }
 
 bool ScColBar::IsLayoutRTL() const        // override only for columns
 {
-    return pViewData->GetDocument()->IsLayoutRTL( pViewData->GetTabNo() );
+    const ScViewData& rViewData = pTabView->GetViewData();
+    return rViewData.GetDocument()->IsLayoutRTL( rViewData.GetTabNo() );
 }
 
-ScRowBar::ScRowBar( vcl::Window* pParent, ScViewData* pData, ScVSplitPos 
eWhichPos,
-                    ScHeaderFunctionSet* pFunc, ScHeaderSelectionEngine* pEng 
) :
-            ScHeaderControl( pParent, pEng, MAXROW+1, true ),
-            pViewData( pData ),
+ScRowBar::ScRowBar( vcl::Window* pParent, ScVSplitPos eWhichPos,
+                    ScHeaderFunctionSet* pFunc, ScHeaderSelectionEngine* pEng,
+                    ScTabView* pTab ) :
+            ScHeaderControl( pParent, pEng, MAXROW+1, true, pTab ),
             eWhich( eWhichPos ),
             pFuncSet( pFunc )
 {
@@ -227,19 +233,20 @@ ScRowBar::~ScRowBar()
 
 SCCOLROW ScRowBar::GetPos() const
 {
-    return pViewData->GetPosY(eWhich);
+    return pTabView->GetViewData().GetPosY(eWhich);
 }
 
 sal_uInt16 ScRowBar::GetEntrySize( SCCOLROW nEntryNo ) const
 {
-    ScDocument* pDoc = pViewData->GetDocument();
-    SCTAB nTab = pViewData->GetTabNo();
+    const ScViewData& rViewData = pTabView->GetViewData();
+    ScDocument* pDoc = rViewData.GetDocument();
+    SCTAB nTab = rViewData.GetTabNo();
     SCROW nLastRow = -1;
     if (pDoc->RowHidden(nEntryNo, nTab, nullptr, &nLastRow))
         return 0;
     else
         return (sal_uInt16) ScViewData::ToPixel( pDoc->GetOriginalHeight( 
nEntryNo,
-                    nTab ), pViewData->GetPPTY() );
+                    nTab ), rViewData.GetPPTY() );
 }
 
 OUString ScRowBar::GetEntryText( SCCOLROW nEntryNo ) const
@@ -249,6 +256,7 @@ OUString ScRowBar::GetEntryText( SCCOLROW nEntryNo ) const
 
 void ScRowBar::SetEntrySize( SCCOLROW nPos, sal_uInt16 nNewSize )
 {
+    const ScViewData& rViewData = pTabView->GetViewData();
     sal_uInt16 nSizeTwips;
     ScSizeMode eMode = SC_SIZE_DIRECT;
     if (nNewSize < 10) nNewSize = 10; // pixels
@@ -259,9 +267,9 @@ void ScRowBar::SetEntrySize( SCCOLROW nPos, sal_uInt16 
nNewSize )
         eMode = SC_SIZE_OPTIMAL;
     }
     else
-        nSizeTwips = (sal_uInt16) ( nNewSize / pViewData->GetPPTY() );
+        nSizeTwips = (sal_uInt16) ( nNewSize / rViewData.GetPPTY() );
 
-    ScMarkData& rMark = pViewData->GetMarkData();
+    const ScMarkData& rMark = rViewData.GetMarkData();
 
     std::vector<sc::ColRowSpan> aRanges;
     if ( rMark.IsRowMarked( nPos ) )
@@ -290,32 +298,33 @@ void ScRowBar::SetEntrySize( SCCOLROW nPos, sal_uInt16 
nNewSize )
         aRanges.push_back(sc::ColRowSpan(nPos,nPos));
     }
 
-    pViewData->GetView()->SetWidthOrHeight(false, aRanges, eMode, nSizeTwips);
+    rViewData.GetView()->SetWidthOrHeight(false, aRanges, eMode, nSizeTwips);
 }
 
 void ScRowBar::HideEntries( SCCOLROW nStart, SCCOLROW nEnd )
 {
     std::vector<sc::ColRowSpan> aRange(1, sc::ColRowSpan(nStart,nEnd));
-    pViewData->GetView()->SetWidthOrHeight(false, aRange, SC_SIZE_DIRECT, 0);
+    pTabView->GetViewData().GetView()->SetWidthOrHeight(false, aRange, 
SC_SIZE_DIRECT, 0);
 }
 
 void ScRowBar::SetMarking( bool bSet )
 {
-    pViewData->GetMarkData().SetMarking( bSet );
+    pTabView->GetViewData().GetMarkData().SetMarking( bSet );
     if (!bSet)
     {
-        pViewData->GetView()->UpdateAutoFillMark();
+        pTabView->GetViewData().GetView()->UpdateAutoFillMark();
     }
 }
 
 void ScRowBar::SelectWindow()
 {
-    ScTabViewShell* pViewSh = pViewData->GetViewShell();
+    const ScViewData& rViewData = pTabView->GetViewData();
+    ScTabViewShell* pViewSh = rViewData.GetViewShell();
 
     pViewSh->SetActive();           // Appear and SetViewFrame
     pViewSh->DrawDeselectAll();
 
-    ScSplitPos eActive = pViewData->GetActivePart();
+    ScSplitPos eActive = rViewData.GetActivePart();
     if (eWhich==SC_SPLIT_TOP)
     {
         if (eActive==SC_SPLIT_BOTTOMLEFT)   eActive=SC_SPLIT_TOPLEFT;
@@ -337,12 +346,13 @@ void ScRowBar::SelectWindow()
 bool ScRowBar::IsDisabled() const
 {
     ScModule* pScMod = SC_MOD();
-    return pScMod->IsFormulaMode() || pScMod->IsModalMode();
+    return pScMod->IsModalMode();
 }
 
 bool ScRowBar::ResizeAllowed() const
 {
-    return !pViewData->HasEditView( pViewData->GetActivePart() );
+    const ScViewData& rViewData = pTabView->GetViewData();
+    return !rViewData.HasEditView( rViewData.GetActivePart() );
 }
 
 void ScRowBar::DrawInvert( long nDragPosP )
@@ -351,25 +361,27 @@ void ScRowBar::DrawInvert( long nDragPosP )
     Update();
     Invert(aRect);
 
-    pViewData->GetView()->InvertHorizontal(eWhich,nDragPosP);
+    pTabView->GetViewData().GetView()->InvertHorizontal(eWhich,nDragPosP);
 }
 
 OUString ScRowBar::GetDragHelp( long nVal )
 {
-    long nTwips = (long) ( nVal / pViewData->GetPPTY() );
+    long nTwips = (long) ( nVal / pTabView->GetViewData().GetPPTY() );
     return lcl_MetricString( nTwips, ScGlobal::GetRscString(STR_TIP_HEIGHT) );
 }
 
 SCROW ScRowBar::GetHiddenCount( SCROW nEntryNo ) const // override only for 
rows
 {
-    ScDocument* pDoc = pViewData->GetDocument();
-    SCTAB nTab = pViewData->GetTabNo();
+    const ScViewData& rViewData = pTabView->GetViewData();
+    ScDocument* pDoc = rViewData.GetDocument();
+    SCTAB nTab = rViewData.GetTabNo();
     return pDoc->GetHiddenRowCount( nEntryNo, nTab );
 }
 
 bool ScRowBar::IsMirrored() const // override only for rows
 {
-    return pViewData->GetDocument()->IsLayoutRTL( pViewData->GetTabNo() );
+    const ScViewData& rViewData = pTabView->GetViewData();
+    return rViewData.GetDocument()->IsLayoutRTL( rViewData.GetTabNo() );
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/hdrcont.cxx b/sc/source/ui/view/hdrcont.cxx
index 690e5d1..2218484 100644
--- a/sc/source/ui/view/hdrcont.cxx
+++ b/sc/source/ui/view/hdrcont.cxx
@@ -32,6 +32,8 @@
 #include "gridmerg.hxx"
 #include "document.hxx"
 #include "markdata.hxx"
+#include "tabview.hxx"
+#include "viewdata.hxx"
 
 #define SC_DRAG_MIN     2
 
@@ -45,7 +47,7 @@
 #define SC_HDRPAINT_COUNT       7
 
 ScHeaderControl::ScHeaderControl( vcl::Window* pParent, SelectionEngine* 
pSelectionEngine,
-                                  SCCOLROW nNewSize, bool bNewVertical ) :
+                                  SCCOLROW nNewSize, bool bNewVertical, 
ScTabView* pTab ) :
             Window      ( pParent ),
             pSelEngine  ( pSelectionEngine ),
             bVertical   ( bNewVertical ),
@@ -58,7 +60,9 @@ ScHeaderControl::ScHeaderControl( vcl::Window* pParent, 
SelectionEngine* pSelect
             nDragStart  ( 0 ),
             nDragPos    ( 0 ),
             bDragMoved  ( false ),
-            bIgnoreMove ( false )
+            bIgnoreMove ( false ),
+            bDoneInitRef( false ),
+            pTabView    ( pTab )
 {
     // --- RTL --- no default mirroring for this window, the spreadsheet itself
     // is also not mirrored
@@ -656,6 +660,26 @@ void ScHeaderControl::MouseButtonDown( const MouseEvent& 
rMEvt )
         return;
     if ( ! rMEvt.IsLeft() )
         return;
+    if ( SC_MOD()->IsFormulaMode() )
+    {
+        if( !pTabView )
+            return;
+        SCTAB nTab = pTabView->GetViewData().GetTabNo();
+        if( !rMEvt.IsShift() )
+            pTabView->DoneRefMode();
+        bDoneInitRef = true;
+        if( !bVertical )
+        {
+            pTabView->InitRefMode( nHitNo, 0, nTab, SC_REFTYPE_REF );
+            pTabView->UpdateRef( nHitNo, MAXROW, nTab );
+        }
+        else
+        {
+            pTabView->InitRefMode( 0, nHitNo, nTab, SC_REFTYPE_REF );
+            pTabView->UpdateRef( MAXCOL, nHitNo, nTab );
+        }
+        return;
+    }
     if ( bIsBorder && ResizeAllowed() )
     {
         nDragNo = nHitNo;
@@ -714,6 +738,13 @@ void ScHeaderControl::MouseButtonUp( const MouseEvent& 
rMEvt )
     if ( IsDisabled() )
         return;
 
+    if ( SC_MOD()->IsFormulaMode() )
+    {
+        SC_MOD()->EndReference();
+        bDoneInitRef = false;
+        return;
+    }
+
     SetMarking( false );
     bIgnoreMove = false;
 
@@ -767,6 +798,21 @@ void ScHeaderControl::MouseMove( const MouseEvent& rMEvt )
         return;
     }
 
+    if ( bDoneInitRef && rMEvt.IsLeft() && SC_MOD()->IsFormulaMode() )
+    {
+        if( !pTabView )
+            return;
+        bool bTmp;
+        SCCOLROW nHitNo = GetMousePos( rMEvt, bTmp );
+        SCTAB nTab = pTabView->GetViewData().GetTabNo();
+        if( !bVertical )
+            pTabView->UpdateRef( nHitNo, MAXROW, nTab );
+        else
+            pTabView->UpdateRef( MAXCOL, nHitNo, nTab );
+
+        return;
+    }
+
     if ( bDragging )
     {
         long nNewPos = bVertical ? rMEvt.GetPosPixel().Y() : 
rMEvt.GetPosPixel().X();
diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx
index e8a1918..914c684 100644
--- a/sc/source/ui/view/tabview.cxx
+++ b/sc/source/ui/view/tabview.cxx
@@ -1479,11 +1479,11 @@ void ScTabView::UpdateShow()
         pRowOutline[SC_SPLIT_TOP] = VclPtr<ScOutlineWindow>::Create( 
pFrameWin, SC_OUTLINE_VER, &aViewData, SC_SPLIT_TOPLEFT );
 
     if (bShowH && bHeader && !pColBar[SC_SPLIT_RIGHT])
-        pColBar[SC_SPLIT_RIGHT] = VclPtr<ScColBar>::Create( pFrameWin, 
&aViewData, SC_SPLIT_RIGHT,
-                                                &aHdrFunc, pHdrSelEng );
+        pColBar[SC_SPLIT_RIGHT] = VclPtr<ScColBar>::Create( pFrameWin, 
SC_SPLIT_RIGHT,
+                                                            &aHdrFunc, 
pHdrSelEng, this );
     if (bShowV && bHeader && !pRowBar[SC_SPLIT_TOP])
-        pRowBar[SC_SPLIT_TOP] = VclPtr<ScRowBar>::Create( pFrameWin, 
&aViewData, SC_SPLIT_TOP,
-                                                &aHdrFunc, pHdrSelEng );
+        pRowBar[SC_SPLIT_TOP] = VclPtr<ScRowBar>::Create( pFrameWin, 
SC_SPLIT_TOP,
+                                                          &aHdrFunc, 
pHdrSelEng, this );
 
         // show Windows
 
diff --git a/sc/source/ui/view/tabview5.cxx b/sc/source/ui/view/tabview5.cxx
index cca6f0b..fb96255 100644
--- a/sc/source/ui/view/tabview5.cxx
+++ b/sc/source/ui/view/tabview5.cxx
@@ -85,11 +85,11 @@ void ScTabView::Init()
 
     pHdrSelEng = new ScHeaderSelectionEngine( pFrameWin, &aHdrFunc );
 
-    pColBar[SC_SPLIT_LEFT] = VclPtr<ScColBar>::Create( pFrameWin, &aViewData, 
SC_SPLIT_LEFT,
-                                                &aHdrFunc, pHdrSelEng );
+    pColBar[SC_SPLIT_LEFT] = VclPtr<ScColBar>::Create( pFrameWin, 
SC_SPLIT_LEFT,
+                                                       &aHdrFunc, pHdrSelEng, 
this );
     pColBar[SC_SPLIT_RIGHT] = nullptr;
-    pRowBar[SC_SPLIT_BOTTOM] = VclPtr<ScRowBar>::Create( pFrameWin, 
&aViewData, SC_SPLIT_BOTTOM,
-                                                &aHdrFunc, pHdrSelEng );
+    pRowBar[SC_SPLIT_BOTTOM] = VclPtr<ScRowBar>::Create( pFrameWin, 
SC_SPLIT_BOTTOM,
+                                                         &aHdrFunc, 
pHdrSelEng, this );
     pRowBar[SC_SPLIT_TOP] = nullptr;
     for (i=0; i<2; i++)
         pColOutline[i] = pRowOutline[i] = nullptr;
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to