summaryrefslogtreecommitdiff
path: root/sc/source/ui/app
diff options
context:
space:
mode:
authorMathias Bauer <mba@openoffice.org>2010-07-13 14:38:37 +0200
committerMathias Bauer <mba@openoffice.org>2010-07-13 14:38:37 +0200
commit0266406fef116fbed7b8e69e309bcda0df4896dd (patch)
tree7d08d330d7ee76707ab4eb757a60fe2559178957 /sc/source/ui/app
parent4a02c63d1431b2e8686a035e119c4a2f5c972592 (diff)
parent686b7955271806e65222a3a4bfe97365cab33a06 (diff)
CWS changehid: resync to m84
Diffstat (limited to 'sc/source/ui/app')
-rw-r--r--sc/source/ui/app/inputhdl.cxx43
-rw-r--r--sc/source/ui/app/inputwin.cxx2
-rw-r--r--sc/source/ui/app/makefile.mk2
-rw-r--r--sc/source/ui/app/scdll.cxx13
-rw-r--r--sc/source/ui/app/scmod.cxx63
-rw-r--r--sc/source/ui/app/transobj.cxx22
6 files changed, 73 insertions, 72 deletions
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 40b65ce401ad..55aa0986d2ec 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -429,7 +429,9 @@ ScInputHandler::ScInputHandler()
pColumnData( NULL ),
pFormulaData( NULL ),
pFormulaDataPara( NULL ),
+ pTipVisibleParent( NULL ),
nTipVisible( 0 ),
+ pTipVisibleSecParent( NULL ),
nTipVisibleSec( 0 ),
nAutoPos( SCPOS_INVALID ),
bUseTab( FALSE ),
@@ -691,12 +693,29 @@ void ScInputHandler::GetFormulaData()
}
}
+IMPL_LINK( ScInputHandler, ShowHideTipVisibleParentListener, VclWindowEvent*, pEvent )
+{
+ if( pEvent->GetId() == VCLEVENT_OBJECT_DYING || pEvent->GetId() == VCLEVENT_WINDOW_HIDE )
+ HideTip();
+ return 0;
+}
+
+IMPL_LINK( ScInputHandler, ShowHideTipVisibleSecParentListener, VclWindowEvent*, pEvent )
+{
+ if( pEvent->GetId() == VCLEVENT_OBJECT_DYING || pEvent->GetId() == VCLEVENT_WINDOW_HIDE )
+ HideTipBelow();
+ return 0;
+}
+
void ScInputHandler::HideTip()
{
if ( nTipVisible )
{
+ if (pTipVisibleParent)
+ pTipVisibleParent->RemoveEventListener( LINK( this, ScInputHandler, ShowHideTipVisibleParentListener ) );
Help::HideTip( nTipVisible );
nTipVisible = 0;
+ pTipVisibleParent = NULL;
}
aManualTip.Erase();
}
@@ -704,8 +723,11 @@ void ScInputHandler::HideTipBelow()
{
if ( nTipVisibleSec )
{
+ if (pTipVisibleSecParent)
+ pTipVisibleSecParent->RemoveEventListener( LINK( this, ScInputHandler, ShowHideTipVisibleSecParentListener ) );
Help::HideTip( nTipVisibleSec );
nTipVisibleSec = 0;
+ pTipVisibleSecParent = NULL;
}
aManualTip.Erase();
}
@@ -897,15 +919,16 @@ void ScInputHandler::ShowTip( const String& rText )
if (pActiveView)
{
Point aPos;
- Window* pWin = pActiveView->GetWindow();
+ pTipVisibleParent = pActiveView->GetWindow();
Cursor* pCur = pActiveView->GetCursor();
if (pCur)
- aPos = pWin->LogicToPixel( pCur->GetPos() );
- aPos = pWin->OutputToScreenPixel( aPos );
+ aPos = pTipVisibleParent->LogicToPixel( pCur->GetPos() );
+ aPos = pTipVisibleParent->OutputToScreenPixel( aPos );
Rectangle aRect( aPos, aPos );
USHORT nAlign = QUICKHELP_LEFT|QUICKHELP_BOTTOM;
- nTipVisible = Help::ShowTip(pWin, aRect, rText, nAlign);
+ nTipVisible = Help::ShowTip(pTipVisibleParent, aRect, rText, nAlign);
+ pTipVisibleParent->AddEventListener( LINK( this, ScInputHandler, ShowHideTipVisibleParentListener ) );
}
}
@@ -917,18 +940,19 @@ void ScInputHandler::ShowTipBelow( const String& rText )
if ( pActiveView )
{
Point aPos;
- Window* pWin = pActiveView->GetWindow();
+ pTipVisibleSecParent = pActiveView->GetWindow();
Cursor* pCur = pActiveView->GetCursor();
if ( pCur )
{
Point aLogicPos = pCur->GetPos();
aLogicPos.Y() += pCur->GetHeight();
- aPos = pWin->LogicToPixel( aLogicPos );
+ aPos = pTipVisibleSecParent->LogicToPixel( aLogicPos );
}
- aPos = pWin->OutputToScreenPixel( aPos );
+ aPos = pTipVisibleSecParent->OutputToScreenPixel( aPos );
Rectangle aRect( aPos, aPos );
- USHORT nAlign = QUICKHELP_LEFT | QUICKHELP_TOP;
- nTipVisibleSec = Help::ShowTip(pWin, aRect, rText, nAlign);
+ USHORT nAlign = QUICKHELP_LEFT | QUICKHELP_TOP | QUICKHELP_NOEVADEPOINTER;
+ nTipVisibleSec = Help::ShowTip(pTipVisibleSecParent, aRect, rText, nAlign);
+ pTipVisibleSecParent->AddEventListener( LINK( this, ScInputHandler, ShowHideTipVisibleSecParentListener ) );
}
}
@@ -2690,6 +2714,7 @@ void ScInputHandler::EnterHandler( BYTE nBlockMode )
delete pObject;
HideTip();
+ HideTipBelow();
nFormSelStart = nFormSelEnd = 0;
aFormText.Erase();
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index f6fc2cb27b71..2cabe7f9f2d6 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -289,7 +289,7 @@ sal_Bool ScInputWindow::UseSubTotal(ScRangeList* pRangeList) const
SCROW nRow(pRange->aStart.Row());
while (!bSubTotal && nRow <= nRowEnd)
{
- if (pDoc->IsFiltered(nRow, nTab))
+ if (pDoc->RowFiltered(nRow, nTab))
bSubTotal = sal_True;
else
++nRow;
diff --git a/sc/source/ui/app/makefile.mk b/sc/source/ui/app/makefile.mk
index a5e4fe8cc024..a7ff3fe86d7d 100644
--- a/sc/source/ui/app/makefile.mk
+++ b/sc/source/ui/app/makefile.mk
@@ -57,8 +57,10 @@ SLOFILES = \
EXCEPTIONSFILES= \
$(SLO)$/drwtrans.obj \
+ $(SLO)$/scdll.obj \
$(SLO)$/scmod2.obj \
$(SLO)$/scmod.obj \
+ $(SLO)$/typemap.obj \
$(SLO)$/client.obj \
$(SLO)$/inputwin.obj
diff --git a/sc/source/ui/app/scdll.cxx b/sc/source/ui/app/scdll.cxx
index 4a460eb7e4ad..8051399d06fa 100644
--- a/sc/source/ui/app/scdll.cxx
+++ b/sc/source/ui/app/scdll.cxx
@@ -40,6 +40,7 @@
#include <svx/tbxcolor.hxx>
#include <sot/clsids.hxx>
+#include <sfx2/taskpane.hxx>
#include <sfx2/docfilt.hxx>
#include <sfx2/fcontnr.hxx>
#include <sfx2/docfile.hxx>
@@ -47,7 +48,7 @@
#include <avmedia/mediaplayer.hxx>
#include <avmedia/mediatoolbox.hxx>
#include <comphelper/types.hxx>
-#include <svx/extrusioncontrols.hxx>
+#include <svx/extrusioncolorcontrol.hxx>
#include <svx/fontworkgallery.hxx>
#include <svx/tbxcustomshapes.hxx>
@@ -263,6 +264,9 @@ void ScDLL::Init()
//Media Controller
::avmedia::MediaToolBoxControl::RegisterControl( SID_AVMEDIA_TOOLBOX, pMod );
+ // common SFX controller
+ ::sfx2::TaskPaneWrapper::RegisterChildWindow( FALSE, pMod );
+
// Svx-StatusBar-Controller
SvxInsertStatusBarControl ::RegisterControl(SID_ATTR_INSERT, pMod);
SvxSelectionModeControl ::RegisterControl(SID_STATUS_SELMODE, pMod);
@@ -278,15 +282,8 @@ void ScDLL::Init()
SvxFontSizeMenuControl ::RegisterControl(SID_ATTR_CHAR_FONTHEIGHT, pMod);
// CustomShape extrusion controller
- svx::ExtrusionDepthControl::RegisterControl( SID_EXTRUSION_DEPTH_FLOATER, pMod );
- svx::ExtrusionDirectionControl::RegisterControl( SID_EXTRUSION_DIRECTION_FLOATER, pMod );
- svx::ExtrusionLightingControl::RegisterControl( SID_EXTRUSION_LIGHTING_FLOATER, pMod );
- svx::ExtrusionSurfaceControl::RegisterControl( SID_EXTRUSION_SURFACE_FLOATER, pMod );
svx::ExtrusionColorControl::RegisterControl( SID_EXTRUSION_3D_COLOR, pMod );
-
svx::FontWorkShapeTypeControl::RegisterControl( SID_FONTWORK_SHAPE_TYPE, pMod );
- svx::FontWorkAlignmentControl::RegisterControl( SID_FONTWORK_ALIGNMENT_FLOATER, pMod );
- svx::FontWorkCharacterSpacingControl::RegisterControl( SID_FONTWORK_CHARACTER_SPACING_FLOATER, pMod );
// Child-Windows
diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx
index 9c3ae8ce805e..f7a02e1577f7 100644
--- a/sc/source/ui/app/scmod.cxx
+++ b/sc/source/ui/app/scmod.cxx
@@ -98,7 +98,6 @@
#include "msgpool.hxx"
#include "scresid.hxx"
#include "anyrefdg.hxx"
-#include "teamdlg.hxx"
#include "dwfunctr.hxx"
#include "formdata.hxx"
//CHINA001 #include "tpview.hxx"
@@ -142,7 +141,6 @@ ScModule::ScModule( SfxObjectFactory* pFact ) :
pSelTransfer( NULL ),
pMessagePool( NULL ),
pRefInputHandler( NULL ),
- pTeamDlg( NULL ),
pViewCfg( NULL ),
pDocCfg( NULL ),
pAppCfg( NULL ),
@@ -1445,11 +1443,6 @@ void ScModule::ViewShellGone( ScTabViewShell* pViewSh )
ScInputHandler* pHdl = GetInputHdl();
if (pHdl)
pHdl->ViewShellGone( pViewSh );
-
- // Team dialog is opened with the window from a view as parent
- // -> close it if any view is closed
- if (pTeamDlg)
- pTeamDlg->Close(); // resets variable pTeamDlg
}
void ScModule::SetRefInputHdl( ScInputHandler* pNew )
@@ -1573,21 +1566,6 @@ void ScModule::SetRefDialog( USHORT nId, BOOL bVis, SfxViewFrame* pViewFrm )
}
}
-void ScModule::OpenTeamDlg()
-{
- if ( !pTeamDlg )
- {
- // team dialog needs an existing parent window
- // -> use window from active view (dialog is closed in ViewShellGone)
-
- ScTabViewShell* pShell = ScTabViewShell::GetActiveViewShell();
- if (pShell)
- pTeamDlg = new ScTeamDlg( pShell->GetActiveWin() );
- }
- else
- pTeamDlg->Center();
-}
-
SfxChildWindow* lcl_GetChildWinFromAnyView( USHORT nId )
{
// first try the current view
@@ -1868,21 +1846,19 @@ IMPL_LINK( ScModule, IdleHandler, Timer*, EMPTYARG )
if ( pDocSh )
{
ScDocument* pDoc = pDocSh->GetDocument();
- if ( pDoc->IsLoadingDone() )
- {
- BOOL bLinks = pDoc->IdleCheckLinks();
- BOOL bWidth = pDoc->IdleCalcTextWidth();
- BOOL bSpell = pDoc->ContinueOnlineSpelling();
- if ( bSpell )
- aSpellTimer.Start(); // da ist noch was
-
- bMore = bLinks || bWidth || bSpell; // ueberhaupt noch was?
-
- // While calculating a Basic formula, a paint event may have occured,
- // so check the bNeedsRepaint flags for this document's views
- if (bWidth)
- lcl_CheckNeedsRepaint( pDocSh );
- }
+
+ BOOL bLinks = pDoc->IdleCheckLinks();
+ BOOL bWidth = pDoc->IdleCalcTextWidth();
+ BOOL bSpell = pDoc->ContinueOnlineSpelling();
+ if ( bSpell )
+ aSpellTimer.Start(); // da ist noch was
+
+ bMore = bLinks || bWidth || bSpell; // ueberhaupt noch was?
+
+ // While calculating a Basic formula, a paint event may have occured,
+ // so check the bNeedsRepaint flags for this document's views
+ if (bWidth)
+ lcl_CheckNeedsRepaint( pDocSh );
}
ULONG nOldTime = aIdleTimer.GetTimeout();
@@ -2152,9 +2128,6 @@ IMPL_LINK( ScModule, CalcFieldValueHdl, EditFieldInfo*, pInfo )
return 0;
}
-
-
-//<!--Added by PengYunQuan for Validity Cell Range Picker
BOOL ScModule::RegisterRefWindow( USHORT nSlotId, Window *pWnd )
{
std::list<Window*> & rlRefWindow = m_mapRefWindow[nSlotId];
@@ -2204,10 +2177,13 @@ BOOL ScModule::IsAliveRefDlg( USHORT nSlotId, Window *pWnd )
Window * ScModule::Find1RefWindow( USHORT nSlotId, Window *pWndAncestor )
{
+ if (!pWndAncestor)
+ return NULL;
+
std::map<USHORT, std::list<Window*> >::iterator iSlot = m_mapRefWindow.find( nSlotId );
if( iSlot == m_mapRefWindow.end() )
- return FALSE;
+ return NULL;
std::list<Window*> & rlRefWindow = iSlot->second;
@@ -2222,6 +2198,9 @@ Window * ScModule::Find1RefWindow( USHORT nSlotId, Window *pWndAncestor )
Window * ScModule::Find1RefWindow( Window *pWndAncestor )
{
+ if (!pWndAncestor)
+ return NULL;
+
while( Window *pParent = pWndAncestor->GetParent() ) pWndAncestor = pParent;
for( std::map<USHORT, std::list<Window*> >::iterator i = m_mapRefWindow.begin();
@@ -2232,4 +2211,4 @@ Window * ScModule::Find1RefWindow( Window *pWndAncestor )
return NULL;
}
-//<!--Added by PengYunQuan for Validity Cell Range Picker
+
diff --git a/sc/source/ui/app/transobj.cxx b/sc/source/ui/app/transobj.cxx
index a5b286e8a9ea..4b268b9da791 100644
--- a/sc/source/ui/app/transobj.cxx
+++ b/sc/source/ui/app/transobj.cxx
@@ -602,25 +602,23 @@ void ScTransferObj::InitDocShell()
// widths / heights
// (must be copied before CopyFromClip, for drawing objects)
- SCCOL nCol;
- SCROW nRow;
+ SCCOL nCol, nLastCol;
SCTAB nSrcTab = aBlock.aStart.Tab();
pDestDoc->SetLayoutRTL(0, pDoc->IsLayoutRTL(nSrcTab));
for (nCol=nStartX; nCol<=nEndX; nCol++)
- if ( pDoc->GetColFlags( nCol, nSrcTab ) & CR_HIDDEN )
+ if ( pDoc->ColHidden(nCol, nSrcTab, nLastCol) )
pDestDoc->ShowCol( nCol, 0, FALSE );
else
pDestDoc->SetColWidth( nCol, 0, pDoc->GetColWidth( nCol, nSrcTab ) );
ScBitMaskCompressedArray< SCROW, BYTE> & rDestRowFlags =
pDestDoc->GetRowFlagsArrayModifiable(0);
- ScCompressedArrayIterator< SCROW, BYTE> aIter( pDoc->GetRowFlagsArray(
- nSrcTab), nStartY, nEndY);
- for ( ; aIter; ++aIter )
+
+ for (SCROW nRow = nStartY; nRow <= nEndY; ++nRow)
{
- nRow = aIter.GetPos();
- BYTE nSourceFlags = *aIter;
- if ( nSourceFlags & CR_HIDDEN )
+ BYTE nSourceFlags = pDoc->GetRowFlags(nRow, nSrcTab);
+ SCROW nLastRow = -1;
+ if ( pDoc->RowHidden(nRow, nSrcTab, nLastRow) )
pDestDoc->ShowRow( nRow, 0, FALSE );
else
{
@@ -684,7 +682,7 @@ void ScTransferObj::InitDocShell()
for (nCol=0; nCol<nStartX; nCol++)
nPosX += pDestDoc->GetColWidth( nCol, 0 );
- nPosY += pDestDoc->FastGetRowHeight( 0, nStartY-1, 0 );
+ nPosY += pDestDoc->GetRowHeight( 0, nStartY-1, 0 );
nPosX = (long) ( nPosX * HMM_PER_TWIPS );
nPosY = (long) ( nPosY * HMM_PER_TWIPS );
@@ -701,9 +699,9 @@ void ScTransferObj::InitDocShell()
break;
nSizeX += nAdd;
}
- for (nRow=nStartY; nRow<=nEndY; nRow++)
+ for (SCROW nRow=nStartY; nRow<=nEndY; nRow++)
{
- long nAdd = pDestDoc->FastGetRowHeight( nRow, 0 );
+ long nAdd = pDestDoc->GetRowHeight( nRow, 0 );
if ( nSizeY+nAdd > aPaperSize.Height() && nSizeY ) // above limit?
break;
nSizeY += nAdd;