summaryrefslogtreecommitdiffstats
path: root/chart2/source/controller/main/ChartController_TextEdit.cxx
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2007-05-22 17:04:08 +0000
committerVladimir Glazounov <vg@openoffice.org>2007-05-22 17:04:08 +0000
commita3f595ba450f09cb8e6344ed1c394d5b4ac1f186 (patch)
treea1829ccfb71e7d6271a1d7b6bf5c14b22f6a9155 /chart2/source/controller/main/ChartController_TextEdit.cxx
parentINTEGRATION: CWS chart2mst3 (1.24.4); FILE MERGED (diff)
downloadcore-a3f595ba450f09cb8e6344ed1c394d5b4ac1f186.tar.gz
core-a3f595ba450f09cb8e6344ed1c394d5b4ac1f186.zip
INTEGRATION: CWS chart2mst3 (1.7.10); FILE MERGED
2007/05/14 20:04:55 bm 1.7.10.15: RESYNC: (1.9-1.10); FILE MERGED 2007/02/01 18:01:09 iha 1.7.10.14: start edit mode before adding special characters 2007/01/16 16:26:25 iha 1.7.10.13: #i73426# wrong help context bvecause of wrong window hirarchy 2006/11/26 11:43:16 bm 1.7.10.12: includes for solar mutex missing 2006/11/24 21:42:23 iha 1.7.10.11: incompatibel changes for aw024 2006/11/22 17:24:17 iha 1.7.10.10: RESYNC: (1.8-1.9); FILE MERGED 2006/10/20 21:15:35 iha 1.7.10.9: implement selection of additional shapes 2006/10/18 17:07:58 bm 1.7.10.8: RESYNC: (1.7-1.8); FILE MERGED 2006/03/23 09:57:10 bm 1.7.10.7: support for paragraphs for accessibility titles 2005/12/21 21:29:09 iha 1.7.10.6: remove identifiers from model objects and create an index based CID protocol instead for selection purposes 2005/11/15 20:23:40 iha 1.7.10.5: remove superfluous view updates 2005/11/15 15:33:04 iha 1.7.10.4: guard dialogs with solarmutex 2005/10/18 14:45:27 bm 1.7.10.3: lock controllers during model change calls 2005/10/18 14:38:06 bm 1.7.10.2: lock controllers during model change callsProperties.cxxProperties.cxx 2005/10/11 12:49:28 bm 1.7.10.1: #i27351# implement Undo
Diffstat (limited to 'chart2/source/controller/main/ChartController_TextEdit.cxx')
-rw-r--r--chart2/source/controller/main/ChartController_TextEdit.cxx41
1 files changed, 34 insertions, 7 deletions
diff --git a/chart2/source/controller/main/ChartController_TextEdit.cxx b/chart2/source/controller/main/ChartController_TextEdit.cxx
index 75253489b15b..3969fb7d0084 100644
--- a/chart2/source/controller/main/ChartController_TextEdit.cxx
+++ b/chart2/source/controller/main/ChartController_TextEdit.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: ChartController_TextEdit.cxx,v $
*
- * $Revision: 1.10 $
+ * $Revision: 1.11 $
*
- * last change: $Author: rt $ $Date: 2007-04-26 09:38:34 $
+ * last change: $Author: vg $ $Date: 2007-05-22 18:04:08 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -40,8 +40,10 @@
#include "DrawViewWrapper.hxx"
#include "ChartWindow.hxx"
#include "TitleHelper.hxx"
-#include "chartview/ObjectIdentifier.hxx"
+#include "ObjectIdentifier.hxx"
#include "macros.hxx"
+#include "ControllerLockGuard.hxx"
+#include "AccessibleTextHelper.hxx"
#include <svx/svdotext.hxx>
@@ -65,6 +67,13 @@
#include <svx/dialogs.hrc>
#endif
+#ifndef _SV_SVAPP_HXX
+#include <vcl/svapp.hxx>
+#endif
+#ifndef _VOS_MUTEX_HXX_
+#include <vos/mutex.hxx>
+#endif
+
#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
#include <com/sun/star/beans/XPropertySet.hpp>
#endif
@@ -95,6 +104,7 @@ void ChartController::StartTextEdit()
if(!pTextObj)
return;
+ m_aUndoManager.preAction( m_aModel->getModel());
SdrOutliner* pOutliner = m_pDrawViewWrapper->getOutliner();
//pOutliner->SetRefDevice(m_pChartWindow);
//pOutliner->SetStyleSheetPool((SfxStyleSheetPool*)pStyleSheetPool);
@@ -142,15 +152,17 @@ bool ChartController::EndTextEdit()
pOutliner->GetParagraph( 0 ),
pOutliner->GetParagraphCount() );
uno::Reference< beans::XPropertySet > xPropSet =
- ObjectIdentifier::getObjectPropertySet( m_aSelectedObjectCID, getModel() );
+ ObjectIdentifier::getObjectPropertySet( m_aSelection.getSelectedCID(), getModel() );
+
+ // lock controllers till end of block
+ ControllerLockGuard aCLGuard( m_aModel->getModel());
//Paragraph* pPara =
TitleHelper::setCompleteString( aString, uno::Reference<
::com::sun::star::chart2::XTitle >::query( xPropSet ), m_xCC );
try
{
- //need to rebuild to react on changed size of title
- impl_rebuildView();
+ m_aUndoManager.postAction( C2U("Edit Text") );
}
catch( uno::RuntimeException& e)
{
@@ -165,9 +177,14 @@ bool ChartController::EndTextEdit()
void SAL_CALL ChartController::executeDispatch_InsertSpecialCharacter()
{
+ ::vos::OGuard aGuard( Application::GetSolarMutex());
+
+ if( m_pDrawViewWrapper && !m_pDrawViewWrapper->IsTextEdit() )
+ this->StartTextEdit();
+
SvxAbstractDialogFactory * pFact = SvxAbstractDialogFactory::Create();
DBG_ASSERT( pFact, "No dialog factory" );
- AbstractSvxCharacterMap * pDlg = pFact->CreateSvxCharacterMap( NULL, RID_SVXDLG_CHARMAP, FALSE );
+ AbstractSvxCharacterMap * pDlg = pFact->CreateSvxCharacterMap( m_pChartWindow, RID_SVXDLG_CHARMAP, FALSE );
DBG_ASSERT( pDlg, "Couldn't create SvxCharacterMap dialog" );
//set fixed current font
@@ -213,6 +230,16 @@ void SAL_CALL ChartController::executeDispatch_InsertSpecialCharacter()
delete pDlg;
}
+uno::Reference< ::com::sun::star::accessibility::XAccessibleContext >
+ ChartController::impl_createAccessibleTextContext()
+{
+ uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > xResult(
+ new AccessibleTextHelper( m_pDrawViewWrapper ));
+
+ return xResult;
+}
+
+
//.............................................................................
} //namespace chart
//.............................................................................