diff options
author | Kohei Yoshida <kohei.yoshida@gmail.com> | 2012-04-20 00:46:19 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2012-05-03 20:28:15 -0400 |
commit | 4aeb8aff9e418aef1fde4b2b60333216cc527f13 (patch) | |
tree | 95423fbf41b16708f4d8d91ac50d96981d9ebf0c /sc/source/ui | |
parent | 9b99bf09a25d9c9016a1c6b730fa0ef1cc5bc04a (diff) |
New menu now inserts current time into cell.
Diffstat (limited to 'sc/source/ui')
-rw-r--r-- | sc/source/ui/Accessibility/AccessibleText.cxx | 6 | ||||
-rw-r--r-- | sc/source/ui/app/inputhdl.cxx | 6 | ||||
-rw-r--r-- | sc/source/ui/app/inputwin.cxx | 18 | ||||
-rw-r--r-- | sc/source/ui/docshell/docsh8.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/unoobj/textuno.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/view/editsh.cxx | 7 | ||||
-rw-r--r-- | sc/source/ui/view/gridwin.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/view/output2.cxx | 2 |
8 files changed, 25 insertions, 22 deletions
diff --git a/sc/source/ui/Accessibility/AccessibleText.cxx b/sc/source/ui/Accessibility/AccessibleText.cxx index d9a4486425fa..9d55c9772803 100644 --- a/sc/source/ui/Accessibility/AccessibleText.cxx +++ b/sc/source/ui/Accessibility/AccessibleText.cxx @@ -1166,7 +1166,7 @@ SvxTextForwarder* ScAccessibleEditLineTextData::GetTextForwarder() { SfxItemPool* pEnginePool = EditEngine::CreatePool(); pEnginePool->FreezeIdRanges(); - mpEditEngine = new ScFieldEditEngine( pEnginePool, NULL, sal_True ); + mpEditEngine = new ScFieldEditEngine(NULL, pEnginePool, NULL, true); mbEditEngineCreated = sal_True; mpEditEngine->EnableUndo( false ); mpEditEngine->SetRefMapMode( MAP_100TH_MM ); @@ -1386,7 +1386,7 @@ SvxTextForwarder* ScAccessiblePreviewHeaderCellTextData::GetTextForwarder() { SfxItemPool* pEnginePool = EditEngine::CreatePool(); pEnginePool->FreezeIdRanges(); - pEditEngine = new ScFieldEditEngine( pEnginePool, NULL, sal_True ); + pEditEngine = new ScFieldEditEngine(NULL, pEnginePool, NULL, true); } pEditEngine->EnableUndo( false ); if (pDocShell) @@ -1619,7 +1619,7 @@ SvxTextForwarder* ScAccessibleNoteTextData::GetTextForwarder() { SfxItemPool* pEnginePool = EditEngine::CreatePool(); pEnginePool->FreezeIdRanges(); - mpEditEngine = new ScFieldEditEngine( pEnginePool, NULL, sal_True ); + mpEditEngine = new ScFieldEditEngine(NULL, pEnginePool, NULL, true); } mpEditEngine->EnableUndo( false ); if (mpDocSh) diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx index f879e78e0379..62bbe1a6d8c4 100644 --- a/sc/source/ui/app/inputhdl.cxx +++ b/sc/source/ui/app/inputhdl.cxx @@ -620,11 +620,11 @@ void ScInputHandler::ImplCreateEditEngine() { if ( pActiveViewSh ) { - const ScDocument* pDoc = pActiveViewSh->GetViewData()->GetDocShell()->GetDocument(); - pEngine = new ScFieldEditEngine( pDoc->GetEnginePool(), pDoc->GetEditPool() ); + ScDocument* pDoc = pActiveViewSh->GetViewData()->GetDocShell()->GetDocument(); + pEngine = new ScFieldEditEngine(pDoc, pDoc->GetEnginePool(), pDoc->GetEditPool()); } else - pEngine = new ScFieldEditEngine( EditEngine::CreatePool(), NULL, true ); + pEngine = new ScFieldEditEngine(NULL, EditEngine::CreatePool(), NULL, true); pEngine->SetWordDelimiters( ScEditUtil::ModifyDelimiters( pEngine->GetWordDelimiters() ) ); UpdateRefDevice(); // also sets MapMode pEngine->SetPaperSize( Size( 1000000, 1000000 ) ); diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx index 7fa55dfc323e..6f7caa645af2 100644 --- a/sc/source/ui/app/inputwin.cxx +++ b/sc/source/ui/app/inputwin.cxx @@ -1331,11 +1331,11 @@ void ScMultiTextWnd::InitEditEngine() if ( pViewSh ) { pDocSh = pViewSh->GetViewData()->GetDocShell(); - const ScDocument* pDoc = pViewSh->GetViewData()->GetDocument(); - pNew = new ScFieldEditEngine( pDoc->GetEnginePool(), pDoc->GetEditPool() ); + ScDocument* pDoc = pViewSh->GetViewData()->GetDocument(); + pNew = new ScFieldEditEngine(pDoc, pDoc->GetEnginePool(), pDoc->GetEditPool()); } else - pNew = new ScFieldEditEngine( EditEngine::CreatePool(), NULL, sal_True ); + pNew = new ScFieldEditEngine(NULL, EditEngine::CreatePool(), NULL, true); pNew->SetExecuteURL( false ); pEditEngine = pNew; @@ -1716,11 +1716,11 @@ void ScTextWnd::StartEditEngine() ScTabViewShell* pViewSh = ScTabViewShell::GetActiveViewShell(); if ( pViewSh ) { - const ScDocument* pDoc = pViewSh->GetViewData()->GetDocument(); - pNew = new ScFieldEditEngine( pDoc->GetEnginePool(), pDoc->GetEditPool() ); + ScDocument* pDoc = pViewSh->GetViewData()->GetDocument(); + pNew = new ScFieldEditEngine(pDoc, pDoc->GetEnginePool(), pDoc->GetEditPool()); } else - pNew = new ScFieldEditEngine( EditEngine::CreatePool(), NULL, sal_True ); + pNew = new ScFieldEditEngine(NULL, EditEngine::CreatePool(), NULL, true); pNew->SetExecuteURL( false ); pEditEngine = pNew; @@ -1947,11 +1947,11 @@ void ScTextWnd::MakeDialogEditView() ScTabViewShell* pViewSh = ScTabViewShell::GetActiveViewShell(); if ( pViewSh ) { - const ScDocument* pDoc = pViewSh->GetViewData()->GetDocument(); - pNew = new ScFieldEditEngine( pDoc->GetEnginePool(), pDoc->GetEditPool() ); + ScDocument* pDoc = pViewSh->GetViewData()->GetDocument(); + pNew = new ScFieldEditEngine(pDoc, pDoc->GetEnginePool(), pDoc->GetEditPool()); } else - pNew = new ScFieldEditEngine( EditEngine::CreatePool(), NULL, sal_True ); + pNew = new ScFieldEditEngine(NULL, EditEngine::CreatePool(), NULL, true); pNew->SetExecuteURL( false ); pEditEngine = pNew; diff --git a/sc/source/ui/docshell/docsh8.cxx b/sc/source/ui/docshell/docsh8.cxx index af910768d143..ba1c7839f6da 100644 --- a/sc/source/ui/docshell/docsh8.cxx +++ b/sc/source/ui/docshell/docsh8.cxx @@ -823,7 +823,7 @@ sal_uLong ScDocShell::DBaseExport( const rtl::OUString& rFullFileName, CharSet e bHasMemo, eCharSet ); // also needed for exception catch SCROW nDocRow = 0; - ScFieldEditEngine aEditEngine( aDocument.GetEditPool() ); + ScFieldEditEngine aEditEngine(&aDocument, aDocument.GetEditPool()); rtl::OUString aString; String aTabName; diff --git a/sc/source/ui/unoobj/textuno.cxx b/sc/source/ui/unoobj/textuno.cxx index b6fd42965e71..afaa7a595e74 100644 --- a/sc/source/ui/unoobj/textuno.cxx +++ b/sc/source/ui/unoobj/textuno.cxx @@ -885,7 +885,7 @@ ScSimpleEditSourceHelper::ScSimpleEditSourceHelper() pEnginePool->SetDefaultMetric( SFX_MAPUNIT_100TH_MM ); pEnginePool->FreezeIdRanges(); - pEditEngine = new ScFieldEditEngine( pEnginePool, NULL, sal_True ); // TRUE: become owner of pool + pEditEngine = new ScFieldEditEngine(NULL, pEnginePool, NULL, true); // TRUE: become owner of pool pForwarder = new SvxEditEngineForwarder( *pEditEngine ); pOriginalSource = new ScSimpleEditSource( pForwarder ); } @@ -985,7 +985,7 @@ SvxTextForwarder* ScCellTextData::GetTextForwarder() { SfxItemPool* pEnginePool = EditEngine::CreatePool(); pEnginePool->FreezeIdRanges(); - pEditEngine = new ScFieldEditEngine( pEnginePool, NULL, sal_True ); + pEditEngine = new ScFieldEditEngine(NULL, pEnginePool, NULL, true); } // currently, GetPortions doesn't work if UpdateMode is sal_False, // this will be fixed (in EditEngine) by src600 diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx index 8b05f33ce43b..197b0041d4ac 100644 --- a/sc/source/ui/view/editsh.cxx +++ b/sc/source/ui/view/editsh.cxx @@ -615,7 +615,11 @@ void ScEditShell::Execute( SfxRequest& rReq ) lclInsertCharacter( pTableView, pTopView, CHAR_ZWNBSP ); break; case SID_INSERT_FIELD_TEST: - fprintf(stdout, "ScEditShell::Execute: SID_INSERT_FIELD_TEST\n"); + { + SvxExtTimeField aField; + SvxFieldItem aItem(aField, EE_FEATURE_FIELD); + pTableView->InsertField(aItem); + } break; } @@ -718,7 +722,6 @@ void ScEditShell::GetState( SfxItemSet& rSet ) } break; case SID_INSERT_FIELD_TEST: - fprintf(stdout, "ScEditShell::GetState: SID_INSERT_FIELD_TEST\n"); break; } diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index 8b243dfc1319..c0f0a385ff6e 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -5085,7 +5085,7 @@ bool ScGridWindow::GetEditUrlOrError( bool bSpellErr, const Point& rPos, // EditEngine - ScFieldEditEngine aEngine( pDoc->GetEditPool() ); + ScFieldEditEngine aEngine(pDoc, pDoc->GetEditPool()); ScSizeDeviceProvider aProv(pDocSh); aEngine.SetRefDevice( aProv.GetDevice() ); aEngine.SetRefMapMode( MAP_100TH_MM ); diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx index bca73f5ca7a4..a91a7fe86526 100644 --- a/sc/source/ui/view/output2.cxx +++ b/sc/source/ui/view/output2.cxx @@ -2001,7 +2001,7 @@ void ScOutputData::DrawStrings( sal_Bool bPixelToLogic ) ScFieldEditEngine* ScOutputData::CreateOutputEditEngine() { - ScFieldEditEngine* pEngine = new ScFieldEditEngine( pDoc->GetEnginePool() ); + ScFieldEditEngine* pEngine = new ScFieldEditEngine(pDoc, pDoc->GetEnginePool()); pEngine->SetUpdateMode( false ); // a RefDevice always has to be set, otherwise EditEngine would create a VirtualDevice pEngine->SetRefDevice( pFmtDevice ); |