summaryrefslogtreecommitdiff
path: root/sc/source/ui
diff options
context:
space:
mode:
authorPetr Mladek <pmladek@suse.cz>2013-03-04 16:56:53 +0100
committerPetr Mladek <pmladek@suse.cz>2013-03-04 16:56:53 +0100
commit08e4a33966786b29550406fbd20ec8bb4f04d5b4 (patch)
tree1b184355689670680ac48eeefb4144babc76bea9 /sc/source/ui
parentbafef6a9e36380c7c75169e600632914fe099453 (diff)
parent5b932053079c0ed73ea23fd802d5f2f7c291ec25 (diff)
Merge tag 'libreoffice-3.6.5.2' into suse-3.6
Tag libreoffice-3.6.5.2 Conflicts: editeng/source/editeng/impedit3.cxx instsetoo_native/util/openoffice.lst oovbaapi/UnoApi_oovbaapi.mk sc/source/filter/oox/workbookhelper.cxx sc/source/ui/app/scmod.cxx sc/source/ui/cctrl/checklistmenu.cxx solenv/inc/minor.mk writerfilter/source/dmapper/DomainMapper_Impl.cxx writerfilter/source/dmapper/DomainMapper_Impl.hxx writerfilter/source/dmapper/PropertyMap.cxx Change-Id: I7ea70b82b3b874cbe78354d5dd97307e63842e72
Diffstat (limited to 'sc/source/ui')
-rw-r--r--sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx2
-rw-r--r--sc/source/ui/Accessibility/AccessibleTableBase.cxx20
-rw-r--r--sc/source/ui/cctrl/checklistmenu.cxx3
-rw-r--r--sc/source/ui/docshell/dbdocfun.cxx3
-rw-r--r--sc/source/ui/inc/tabview.hxx2
-rw-r--r--sc/source/ui/view/gridwin.cxx3
-rw-r--r--sc/source/ui/view/tabview.cxx27
-rw-r--r--sc/source/ui/view/tabview4.cxx36
8 files changed, 41 insertions, 55 deletions
diff --git a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
index 0408458f9704..cf29eaecce39 100644
--- a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
+++ b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
@@ -55,6 +55,8 @@ using namespace ::com::sun::star::accessibility;
//===== internal ============================================================
+// FIXME: really unclear why we have an ScAccessibleTableBase with
+// only this single sub-class
ScAccessibleSpreadsheet::ScAccessibleSpreadsheet(
ScAccessibleDocument* pAccDoc,
ScTabViewShell* pViewShell,
diff --git a/sc/source/ui/Accessibility/AccessibleTableBase.cxx b/sc/source/ui/Accessibility/AccessibleTableBase.cxx
index c1408dbd005d..82203391f674 100644
--- a/sc/source/ui/Accessibility/AccessibleTableBase.cxx
+++ b/sc/source/ui/Accessibility/AccessibleTableBase.cxx
@@ -272,7 +272,7 @@ sal_Bool SAL_CALL ScAccessibleTableBase::isAccessibleSelected( sal_Int32 /* nRow
return false;
}
- //===== XAccessibleExtendedTable ========================================
+// ===== XAccessibleExtendedTable ========================================
sal_Int32 SAL_CALL ScAccessibleTableBase::getAccessibleIndex( sal_Int32 nRow, sal_Int32 nColumn )
throw (uno::RuntimeException, lang::IndexOutOfBoundsException)
@@ -315,7 +315,7 @@ sal_Int32 SAL_CALL ScAccessibleTableBase::getAccessibleColumn( sal_Int32 nChildI
return nChildIndex % static_cast<sal_Int32>(maRange.aEnd.Col() - maRange.aStart.Col() + 1);
}
- //===== XAccessibleContext ==============================================
+// ===== XAccessibleContext ==============================================
sal_Int32 SAL_CALL
ScAccessibleTableBase::getAccessibleChildCount(void)
@@ -323,9 +323,16 @@ sal_Int32 SAL_CALL
{
SolarMutexGuard aGuard;
IsObjectValid();
- return static_cast<sal_Int32>(maRange.aEnd.Row() - maRange.aStart.Row() + 1) *
- (maRange.aEnd.Col() - maRange.aStart.Col() + 1);
-// return 1;
+
+ // FIXME: representing rows & columns this way is a plain and simple madness.
+ // this needs a radical re-think.
+ sal_Int64 nMax = ((sal_Int64)(maRange.aEnd.Row() - maRange.aStart.Row() + 1) *
+ (sal_Int64)(maRange.aEnd.Col() - maRange.aStart.Col() + 1));
+ if (nMax > SAL_MAX_INT32)
+ nMax = SAL_MAX_INT32;
+ if (nMax < 0)
+ return 0;
+ return static_cast<sal_Int32>(nMax);
}
uno::Reference< XAccessible > SAL_CALL
@@ -339,6 +346,9 @@ uno::Reference< XAccessible > SAL_CALL
if (nIndex >= getAccessibleChildCount() || nIndex < 0)
throw lang::IndexOutOfBoundsException();
+ // FIXME: representing rows & columns this way is a plain and simple madness.
+ // this needs a radical re-think.
+
sal_Int32 nRow(0);
sal_Int32 nColumn(0);
sal_Int32 nTemp(maRange.aEnd.Col() - maRange.aStart.Col() + 1);
diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx
index d7f87f160fd9..2b9a25f26d7f 100644
--- a/sc/source/ui/cctrl/checklistmenu.cxx
+++ b/sc/source/ui/cctrl/checklistmenu.cxx
@@ -915,6 +915,9 @@ ScCheckListMenuWindow::ScCheckListMenuWindow(Window* pParent, ScDocument* pDoc)
maTabStopCtrls.push_back(&maBtnUnselectSingle);
maTabStopCtrls.push_back(&maBtnOk);
maTabStopCtrls.push_back(&maBtnCancel);
+
+ // Enable type-ahead search in the check list box.
+ maChecks.SetStyle(maChecks.GetStyle() | WB_QUICK_SEARCH);
}
ScCheckListMenuWindow::~ScCheckListMenuWindow()
diff --git a/sc/source/ui/docshell/dbdocfun.cxx b/sc/source/ui/docshell/dbdocfun.cxx
index e424763326d6..9fea320c87f6 100644
--- a/sc/source/ui/docshell/dbdocfun.cxx
+++ b/sc/source/ui/docshell/dbdocfun.cxx
@@ -1330,6 +1330,7 @@ bool ScDBDocFunc::DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewOb
if ( pDestObj )
{
pDestObj->ReloadGroupTableData();
+ pDestObj->SyncAllDimensionMembers();
pDestObj->InvalidateData(); // before getting the new output area
// make sure the table has a name (not set by dialog)
@@ -1472,8 +1473,6 @@ sal_uLong ScDBDocFunc::RefreshPivotTables(ScDPObject* pDPObj, bool bApi)
for (; it != itEnd; ++it)
{
ScDPObject* pObj = *it;
- if (!pObj->SyncAllDimensionMembers())
- continue;
// This action is intentionally not undoable since it modifies cache.
DataPilotUpdate(pObj, pObj, false, bApi);
diff --git a/sc/source/ui/inc/tabview.hxx b/sc/source/ui/inc/tabview.hxx
index 2288480f4075..3b3e49055489 100644
--- a/sc/source/ui/inc/tabview.hxx
+++ b/sc/source/ui/inc/tabview.hxx
@@ -195,7 +195,7 @@ private:
void UpdateVarZoom();
static void SetScrollBar( ScrollBar& rScroll, long nRangeMax, long nVisible, long nPos, bool bLayoutRTL );
- static long GetScrollBarPos( ScrollBar& rScroll, bool bLayoutRTL );
+ static long GetScrollBarPos( ScrollBar& rScroll );
void GetPageMoveEndPosition(SCsCOL nMovX, SCsROW nMovY, SCsCOL& rPageX, SCsROW& rPageY);
void GetAreaMoveEndPosition(SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode,
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index b71841798bbe..68ad24cc5a70 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -1074,7 +1074,8 @@ void ScGridWindow::LaunchDataSelectMenu( SCCOL nCol, SCROW nRow, bool bDataSelec
pFilterFloat->SetPopupModeEndHdl( LINK( this, ScGridWindow, PopupModeEndHdl ) );
pFilterBox = new ScFilterListBox(
pFilterFloat, this, nCol, nRow, bDataSelect ? SC_FILTERBOX_DATASELECT : SC_FILTERBOX_FILTER );
- if ( bLayoutRTL )
+ // Fix for bug fdo#44925
+ if (Application::GetSettings().GetLayoutRTL() != bLayoutRTL)
pFilterBox->EnableMirroring();
nSizeX += 1;
diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx
index 0a3ab2863051..0231f81ef9c3 100644
--- a/sc/source/ui/view/tabview.cxx
+++ b/sc/source/ui/view/tabview.cxx
@@ -342,6 +342,8 @@ void ScTabView::InitScrollBar( ScrollBar& rScrollBar, long nMaxVal )
rScrollBar.SetScrollHdl( LINK(this, ScTabView, ScrollHdl) );
rScrollBar.SetEndScrollHdl( LINK(this, ScTabView, EndScrollHdl) );
+
+ rScrollBar.EnableRTL( aViewData.GetDocument()->IsLayoutRTL( aViewData.GetTabNo() ) );
}
// Scroll-Timer
@@ -1095,15 +1097,14 @@ IMPL_LINK( ScTabView, EndScrollHdl, ScrollBar*, pScroll )
if ( pScroll == &aHScrollLeft || pScroll == &aHScrollRight )
{
- bool bMirror = aViewData.GetDocument()->IsLayoutRTL( aViewData.GetTabNo() ) != Application::GetSettings().GetLayoutRTL();
ScHSplitPos eWhich = (pScroll == &aHScrollLeft) ? SC_SPLIT_LEFT : SC_SPLIT_RIGHT;
- long nDelta = GetScrollBarPos( *pScroll, bMirror ) + nScrollMin - aViewData.GetPosX(eWhich);
+ long nDelta = GetScrollBarPos( *pScroll ) + nScrollMin - aViewData.GetPosX(eWhich);
if (nDelta) ScrollX( nDelta, eWhich );
}
else // VScroll...
{
ScVSplitPos eWhich = (pScroll == &aVScrollTop) ? SC_SPLIT_TOP : SC_SPLIT_BOTTOM;
- long nDelta = GetScrollBarPos( *pScroll, false ) + nScrollMin - aViewData.GetPosY(eWhich);
+ long nDelta = GetScrollBarPos( *pScroll ) + nScrollMin - aViewData.GetPosY(eWhich);
if (nDelta) ScrollY( nDelta, eWhich );
}
}
@@ -1126,7 +1127,6 @@ IMPL_LINK( ScTabView, ScrollHdl, ScrollBar*, pScroll )
SC_SPLIT_TOP : SC_SPLIT_BOTTOM );
bool bLayoutRTL = aViewData.GetDocument()->IsLayoutRTL( aViewData.GetTabNo() );
- bool bMirror = bHoriz && (bLayoutRTL != Application::GetSettings().GetLayoutRTL());
ScrollType eType = pScroll->GetType();
if ( eType == SCROLL_DRAG )
@@ -1164,7 +1164,7 @@ IMPL_LINK( ScTabView, ScrollHdl, ScrollBar*, pScroll )
nScrollMin = aViewData.GetFixPosX();
if ( aViewData.GetVSplitMode()==SC_SPLIT_FIX && pScroll == &aVScrollBottom )
nScrollMin = aViewData.GetFixPosY();
- long nScrollPos = GetScrollBarPos( *pScroll, bMirror ) + nScrollMin;
+ long nScrollPos = GetScrollBarPos( *pScroll ) + nScrollMin;
String aHelpStr;
Rectangle aRect;
@@ -1199,21 +1199,6 @@ IMPL_LINK( ScTabView, ScrollHdl, ScrollBar*, pScroll )
if ( bOnlineScroll || eType != SCROLL_DRAG )
{
- if ( bMirror )
- {
- // change scroll type so visible/previous cells calculation below remains the same
- switch ( eType )
- {
- case SCROLL_LINEUP: eType = SCROLL_LINEDOWN; break;
- case SCROLL_LINEDOWN: eType = SCROLL_LINEUP; break;
- case SCROLL_PAGEUP: eType = SCROLL_PAGEDOWN; break;
- case SCROLL_PAGEDOWN: eType = SCROLL_PAGEUP; break;
- default:
- {
- // added to avoid warnings
- }
- }
- }
long nDelta = pScroll->GetDelta();
switch ( eType )
{
@@ -1248,7 +1233,7 @@ IMPL_LINK( ScTabView, ScrollHdl, ScrollBar*, pScroll )
if ( aViewData.GetVSplitMode()==SC_SPLIT_FIX && pScroll == &aVScrollBottom )
nScrollMin = aViewData.GetFixPosY();
- long nScrollPos = GetScrollBarPos( *pScroll, bMirror ) + nScrollMin;
+ long nScrollPos = GetScrollBarPos( *pScroll ) + nScrollMin;
nDelta = nScrollPos - nViewPos;
if ( nScrollPos > nPrevDragPos )
{
diff --git a/sc/source/ui/view/tabview4.cxx b/sc/source/ui/view/tabview4.cxx
index a00edef04513..064a6670d2ec 100644
--- a/sc/source/ui/view/tabview4.cxx
+++ b/sc/source/ui/view/tabview4.cxx
@@ -337,30 +337,16 @@ void ScTabView::SetScrollBar( ScrollBar& rScroll, long nRangeMax, long nVisible,
if ( nVisible == 0 )
nVisible = 1; // #i59893# don't use visible size 0
- // RTL layout uses a negative range to simulate a mirrored scroll bar.
- // SetScrollBar/GetScrollBarPos hide this so outside of these functions normal cell
- // addresses can be used.
+ rScroll.SetRange( Range( 0, nRangeMax ) );
+ rScroll.SetVisibleSize( nVisible );
+ rScroll.SetThumbPos( nPos );
- if ( bLayoutRTL )
- {
- rScroll.SetRange( Range( -nRangeMax, 0 ) );
- rScroll.SetVisibleSize( nVisible );
- rScroll.SetThumbPos( -nPos - nVisible );
- }
- else
- {
- rScroll.SetRange( Range( 0, nRangeMax ) );
- rScroll.SetVisibleSize( nVisible );
- rScroll.SetThumbPos( nPos );
- }
+ rScroll.EnableRTL( bLayoutRTL );
}
-long ScTabView::GetScrollBarPos( ScrollBar& rScroll, bool bLayoutRTL )
+long ScTabView::GetScrollBarPos( ScrollBar& rScroll )
{
- if ( bLayoutRTL )
- return -rScroll.GetThumbPos() - rScroll.GetVisibleSize();
- else
- return rScroll.GetThumbPos();
+ return rScroll.GetThumbPos();
}
// UpdateScrollBars - sichtbaren Bereich und Scrollweite der Scrollbars einstellen
@@ -400,7 +386,7 @@ void ScTabView::UpdateScrollBars()
sal_Bool bRight = ( aViewData.GetHSplitMode() != SC_SPLIT_NONE );
ScDocument* pDoc = aViewData.GetDocument();
SCTAB nTab = aViewData.GetTabNo();
- sal_Bool bMirror = pDoc->IsLayoutRTL( nTab ) != Application::GetSettings().GetLayoutRTL();
+ bool bLayoutRTL = pDoc->IsLayoutRTL( nTab );
SCCOL nUsedX;
SCROW nUsedY;
pDoc->GetTableArea( nTab, nUsedX, nUsedY ); //! cachen !!!!!!!!!!!!!!!
@@ -419,24 +405,24 @@ void ScTabView::UpdateScrollBars()
nVisXL = aViewData.VisibleCellsX( SC_SPLIT_LEFT );
long nMaxXL = lcl_GetScrollRange( nUsedX, aViewData.GetPosX(SC_SPLIT_LEFT), nVisXL, MAXCOL, 0 );
- SetScrollBar( aHScrollLeft, nMaxXL, nVisXL, aViewData.GetPosX( SC_SPLIT_LEFT ), bMirror );
+ SetScrollBar( aHScrollLeft, nMaxXL, nVisXL, aViewData.GetPosX( SC_SPLIT_LEFT ), bLayoutRTL );
nVisYB = aViewData.VisibleCellsY( SC_SPLIT_BOTTOM );
long nMaxYB = lcl_GetScrollRange( nUsedY, aViewData.GetPosY(SC_SPLIT_BOTTOM), nVisYB, MAXROW, nStartY );
- SetScrollBar( aVScrollBottom, nMaxYB, nVisYB, aViewData.GetPosY( SC_SPLIT_BOTTOM ) - nStartY, false );
+ SetScrollBar( aVScrollBottom, nMaxYB, nVisYB, aViewData.GetPosY( SC_SPLIT_BOTTOM ) - nStartY, bLayoutRTL );
if (bRight)
{
nVisXR = aViewData.VisibleCellsX( SC_SPLIT_RIGHT );
long nMaxXR = lcl_GetScrollRange( nUsedX, aViewData.GetPosX(SC_SPLIT_RIGHT), nVisXR, MAXCOL, nStartX );
- SetScrollBar( aHScrollRight, nMaxXR, nVisXR, aViewData.GetPosX( SC_SPLIT_RIGHT ) - nStartX, bMirror );
+ SetScrollBar( aHScrollRight, nMaxXR, nVisXR, aViewData.GetPosX( SC_SPLIT_RIGHT ) - nStartX, bLayoutRTL );
}
if (bTop)
{
nVisYT = aViewData.VisibleCellsY( SC_SPLIT_TOP );
long nMaxYT = lcl_GetScrollRange( nUsedY, aViewData.GetPosY(SC_SPLIT_TOP), nVisYT, MAXROW, 0 );
- SetScrollBar( aVScrollTop, nMaxYT, nVisYT, aViewData.GetPosY( SC_SPLIT_TOP ), false );
+ SetScrollBar( aVScrollTop, nMaxYT, nVisYT, aViewData.GetPosY( SC_SPLIT_TOP ), bLayoutRTL );
}
// Bereich testen