AccessibleText.cxx (4d7c9de0) AccessibleText.cxx (3ea0c3d5)
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 1044 unchanged lines hidden (view full) ---

1053 ScDocShell* pDocSh = NULL;
1054 if (pViewShell)
1055 pDocSh = pViewShell->GetViewData()->GetDocShell();
1056 return pDocSh;
1057}
1058
1059
1060// ============================================================================
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 1044 unchanged lines hidden (view full) ---

1053 ScDocShell* pDocSh = NULL;
1054 if (pViewShell)
1055 pDocSh = pViewShell->GetViewData()->GetDocShell();
1056 return pDocSh;
1057}
1058
1059
1060// ============================================================================
1061//ScAccessibleEditObjectTextData::ScAccessibleEditObjectTextData(EditView* pEditView, Window* pWin)
1062ScAccessibleEditObjectTextData::ScAccessibleEditObjectTextData(EditView* pEditView, Window* pWin, sal_Bool isClone)
1063 :
1064 mpViewForwarder(NULL),
1065 mpEditViewForwarder(NULL),
1066 mpEditView(pEditView),
1067 mpEditEngine(pEditView ? pEditView->GetEditEngine() : 0),
1068 mpForwarder(NULL),
1069 mpWindow(pWin)
1070{
1071 // Solution: If the object is cloned, do NOT add notify hdl.
1072 mbIsCloned = isClone;
1061ScAccessibleEditObjectTextData::ScAccessibleEditObjectTextData(EditView* pEditView, Window* pWin, sal_Bool isClone)
1062 :
1063 mpViewForwarder(NULL),
1064 mpEditViewForwarder(NULL),
1065 mpEditView(pEditView),
1066 mpEditEngine(pEditView ? pEditView->GetEditEngine() : 0),
1067 mpForwarder(NULL),
1068 mpWindow(pWin)
1069{
1070 // Solution: If the object is cloned, do NOT add notify hdl.
1071 mbIsCloned = isClone;
1073 //if (mpEditEngine)
1074 if (mpEditEngine && !mbIsCloned)
1075 mpEditEngine->SetNotifyHdl( LINK(this, ScAccessibleEditObjectTextData, NotifyHdl) );
1076}
1077
1078ScAccessibleEditObjectTextData::~ScAccessibleEditObjectTextData()
1079{
1080 // Solution: If the object is cloned, do NOT set notify hdl.
1072 if (mpEditEngine && !mbIsCloned)
1073 mpEditEngine->SetNotifyHdl( LINK(this, ScAccessibleEditObjectTextData, NotifyHdl) );
1074}
1075
1076ScAccessibleEditObjectTextData::~ScAccessibleEditObjectTextData()
1077{
1078 // Solution: If the object is cloned, do NOT set notify hdl.
1081 //if (mpEditEngine)
1082 if (mpEditEngine && !mbIsCloned)
1083 mpEditEngine->SetNotifyHdl(Link());
1084 if (mpViewForwarder)
1085 delete mpViewForwarder;
1086 if (mpEditViewForwarder)
1087 delete mpEditViewForwarder;
1088 if (mpForwarder)
1089 delete mpForwarder;

--- 28 unchanged lines hidden (view full) ---

1118
1119SvxTextForwarder* ScAccessibleEditObjectTextData::GetTextForwarder()
1120{
1121 if ((!mpForwarder && mpEditView) || (mpEditEngine && !mpEditEngine->GetNotifyHdl().IsSet()))
1122 {
1123 if (!mpEditEngine)
1124 mpEditEngine = mpEditView->GetEditEngine();
1125 // Solution: If the object is cloned, do NOT add notify hdl.
1079 if (mpEditEngine && !mbIsCloned)
1080 mpEditEngine->SetNotifyHdl(Link());
1081 if (mpViewForwarder)
1082 delete mpViewForwarder;
1083 if (mpEditViewForwarder)
1084 delete mpEditViewForwarder;
1085 if (mpForwarder)
1086 delete mpForwarder;

--- 28 unchanged lines hidden (view full) ---

1115
1116SvxTextForwarder* ScAccessibleEditObjectTextData::GetTextForwarder()
1117{
1118 if ((!mpForwarder && mpEditView) || (mpEditEngine && !mpEditEngine->GetNotifyHdl().IsSet()))
1119 {
1120 if (!mpEditEngine)
1121 mpEditEngine = mpEditView->GetEditEngine();
1122 // Solution: If the object is cloned, do NOT add notify hdl.
1126 //if (mpEditEngine && !mpEditEngine->GetNotifyHdl().IsSet())
1127 if (mpEditEngine && !mpEditEngine->GetNotifyHdl().IsSet()&&!mbIsCloned)
1128 mpEditEngine->SetNotifyHdl( LINK(this, ScAccessibleEditObjectTextData, NotifyHdl) );
1129 if(!mpForwarder)
1130 mpForwarder = new SvxEditEngineForwarder(*mpEditEngine);
1131 }
1132 return mpForwarder;
1133}
1134

--- 782 unchanged lines hidden ---
1123 if (mpEditEngine && !mpEditEngine->GetNotifyHdl().IsSet()&&!mbIsCloned)
1124 mpEditEngine->SetNotifyHdl( LINK(this, ScAccessibleEditObjectTextData, NotifyHdl) );
1125 if(!mpForwarder)
1126 mpForwarder = new SvxEditEngineForwarder(*mpEditEngine);
1127 }
1128 return mpForwarder;
1129}
1130

--- 782 unchanged lines hidden ---