summaryrefslogtreecommitdiff
path: root/starmath/source/accessibility.cxx
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2008-07-07 11:53:55 +0000
committerRüdiger Timm <rt@openoffice.org>2008-07-07 11:53:55 +0000
commit0e256e2cff0792f00c83dd7b5b0390d3c48b9789 (patch)
tree5f113d9e41dc90fb9d325cff71d3da5e273709ed /starmath/source/accessibility.cxx
parent446f06011259368dc923bccdd1e79ca9d4091ef8 (diff)
INTEGRATION: CWS tl53 (1.33.74); FILE MERGED
2008/06/25 12:36:28 tl 1.33.74.3: RESYNC: (1.35-1.36); FILE MERGED 2008/06/03 13:46:33 tl 1.33.74.2: RESYNC: (1.33-1.35); FILE MERGED 2008/03/18 12:44:13 tl 1.33.74.1: #i74724# missing implementation added
Diffstat (limited to 'starmath/source/accessibility.cxx')
-rw-r--r--starmath/source/accessibility.cxx38
1 files changed, 31 insertions, 7 deletions
diff --git a/starmath/source/accessibility.cxx b/starmath/source/accessibility.cxx
index e943ca0518da..42bb5015b55f 100644
--- a/starmath/source/accessibility.cxx
+++ b/starmath/source/accessibility.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: accessibility.cxx,v $
- * $Revision: 1.37 $
+ * $Revision: 1.38 $
*
* This file is part of OpenOffice.org.
*
@@ -1496,17 +1496,41 @@ sal_Bool SmTextForwarder::InsertText( const String& rStr, const ESelection& rSel
const SfxItemSet* SmTextForwarder::GetEmptyItemSetPtr()
{
- DBG_ERROR("not yet implemented")
- return 0;
+ const SfxItemSet *pItemSet = 0;
+ EditEngine *pEditEngine = rEditAcc.GetEditEngine();
+ if (pEditEngine)
+ {
+ pItemSet = &pEditEngine->GetEmptyItemSet();
+ }
+ return pItemSet;
}
+
void SmTextForwarder::AppendParagraph()
{
- DBG_ERROR("not yet implemented")
+ // append an empty paragraph
+ EditEngine *pEditEngine = rEditAcc.GetEditEngine();
+ if (pEditEngine)
+ {
+ USHORT nParaCount = pEditEngine->GetParagraphCount();
+ pEditEngine->InsertParagraph( nParaCount, String() );
+ }
}
-xub_StrLen SmTextForwarder::AppendTextPortion( USHORT /*nPara*/, const String &/*rText*/, const SfxItemSet &/*rSet*/ )
+
+xub_StrLen SmTextForwarder::AppendTextPortion( USHORT nPara, const String &rText, const SfxItemSet &rSet )
{
- DBG_ERROR("not yet implemented")
- return 0;
+ xub_StrLen nRes = 0;
+ EditEngine *pEditEngine = rEditAcc.GetEditEngine();
+ if (pEditEngine && nPara < pEditEngine->GetParagraphCount())
+ {
+ // append text
+ ESelection aSel( nPara, pEditEngine->GetTextLen( nPara ) );
+ pEditEngine->QuickInsertText( rText, aSel );
+
+ // set attributes for new appended text
+ nRes = aSel.nEndPos = pEditEngine->GetTextLen( nPara );
+ pEditEngine->QuickSetAttribs( rSet, aSel );
+ }
+ return nRes;
}
void SmTextForwarder::CopyText(const SvxTextForwarder& rSource)