diff options
author | Kohei Yoshida <kyoshida@novell.com> | 2010-06-15 05:33:03 +0200 |
---|---|---|
committer | Kohei Yoshida <kyoshida@novell.com> | 2010-06-15 05:33:03 +0200 |
commit | 90d71fa312796762f2a346f92932fa2c74cefbe1 (patch) | |
tree | 2326f5e91d04bb96f3861c5a3d74b95ef48d8a64 /sc/source/ui/app | |
parent | a2a6891094cfa791ded8abb514cb8581ad0748b3 (diff) | |
parent | 5729138f6f974939f75ce5f9c4191f3d6680a22b (diff) |
calctabcolor: rebased to DEV300_m82.
Diffstat (limited to 'sc/source/ui/app')
-rw-r--r-- | sc/source/ui/app/inputhdl.cxx | 49 | ||||
-rw-r--r-- | sc/source/ui/app/scdll.cxx | 13 | ||||
-rw-r--r-- | sc/source/ui/app/scmod.cxx | 22 |
3 files changed, 46 insertions, 38 deletions
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx index 485ea4b88589..28f178565da0 100644 --- a/sc/source/ui/app/inputhdl.cxx +++ b/sc/source/ui/app/inputhdl.cxx @@ -189,6 +189,14 @@ handle_r1c1: if ( (nFlags & SCA_TAB2_3D) == 0 ) aRange.aEnd.SetTab( aRange.aStart.Tab() ); + if ( ( nFlags & ( SCA_VALID_COL2 | SCA_VALID_ROW2 | SCA_VALID_TAB2 ) ) == 0 ) + { + // #i73766# if a single ref was parsed, set the same "abs" flags for ref2, + // so Format doesn't output a double ref because of different flags. + USHORT nAbsFlags = nFlags & ( SCA_COL_ABSOLUTE | SCA_ROW_ABSOLUTE | SCA_TAB_ABSOLUTE ); + nFlags |= nAbsFlags << 4; + } + if (!nCount) { pEngine->SetUpdateMode( FALSE ); @@ -421,7 +429,9 @@ ScInputHandler::ScInputHandler() pColumnData( NULL ), pFormulaData( NULL ), pFormulaDataPara( NULL ), + pTipVisibleParent( NULL ), nTipVisible( 0 ), + pTipVisibleSecParent( NULL ), nTipVisibleSec( 0 ), nAutoPos( SCPOS_INVALID ), bUseTab( FALSE ), @@ -683,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(); } @@ -696,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(); } @@ -889,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 ) ); } } @@ -909,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); + nTipVisibleSec = Help::ShowTip(pTipVisibleSecParent, aRect, rText, nAlign); + pTipVisibleSecParent->AddEventListener( LINK( this, ScInputHandler, ShowHideTipVisibleSecParentListener ) ); } } @@ -2682,6 +2714,7 @@ void ScInputHandler::EnterHandler( BYTE nBlockMode ) delete pObject; HideTip(); + HideTipBelow(); nFormSelStart = nFormSelEnd = 0; aFormText.Erase(); diff --git a/sc/source/ui/app/scdll.cxx b/sc/source/ui/app/scdll.cxx index 11e33a8892e8..a1b8f05d2918 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 5220563be966..8f46b11236ae 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 ), @@ -1507,11 +1505,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 ) @@ -1635,21 +1628,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 |