summaryrefslogtreecommitdiff
path: root/binfilter/bf_svx/source/editeng/svx_impedit4.cxx
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-08-23 15:10:15 +0200
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-08-23 15:10:15 +0200
commit5c22c7b613228daf8f46baf70928ae7da6485289 (patch)
tree75ae8ba4d004cdfbf539762aa8fd819d4760b56a /binfilter/bf_svx/source/editeng/svx_impedit4.cxx
parent62479cc5aa788ddebf9fa23e0124a0dc2495426c (diff)
recreated tag libreoffice-3.3.1.1 which had these commits:
commit 1163151cf51a15a68700eda522ba7a789e378361 (tag: refs/tags/libreoffice-3.3.1.1) Author: Petr Mladek <pmladek@suse.cz> Date: Tue Feb 8 18:07:43 2011 +0100 Version 3.3.1.1, tag libreoffice-3.3.1.1 (3.3.1-rc1) commit 3d8f2d6ee7f86ec048ffca70a7dd59efb64ab90c Author: Jan Holesovsky <kendy@suse.cz> Date: Mon Feb 7 21:23:24 2011 +0100 Branch libreoffice-3-3-1 This is 'libreoffice-3-3-1' - the stable branch for the 3.3.1 release. Only very safe changes, reviewed by three people are allowed. If you want to commit more complicated fix for the next 3.3.x release, please use the 'libreoffice-3-3' branch. If you want to build something cool, unstable, and risky, use master. commit 4d86423be75125185f7e220877839c68934bfedc Author: Joseph Powers <jpowers27@cox.net> Date: Mon Feb 7 16:32:57 2011 +0000 cherry picked from 0679158ebb6c84863e6e0e2fe877ea06eba4a2d4 Move XServiceInfo.hpp from DEBUG to main. Now that XServiceInfo is always used, it would be nice to always include if defination. This fixes a compile error on mac. PS: Also some trailing white space. The changed code all appears at the top of the patch. Signed-off-by: Noel Power <noel.power@novell.com> writerfilter/source/dmapper/DomainMapper_Impl.cxx | 144 ++++++++++---------- 1 files changed, 72 insertions(+), 72 deletions(-) commit 8efa2697b2a2737ee5951358878a17203073ac49 Author: Noel Power <noel.power@novell.com> Date: Mon Feb 7 12:01:46 2011 +0000 fix for bnc#655763 cherry picked from ae5d018c49d3ab61416cde7fb09c37bcce7d9566 reviewed in bug https://bugzilla.novell.com/show_bug.cgi?id=655763#c6 Signed-off-by: Cedric Bosdonnat <cbosdonnat@novell.com> writerfilter/source/dmapper/DomainMapper_Impl.cxx | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) commit 780535edc21bc230a859d672b7408f10e2691a38 Author: Petr Mladek <pmladek@suse.cz> Date: Wed Feb 2 17:09:03 2011 +0100 RTF export crasher (bnc#656503) Signed off by Cedric filter/source/msfilter/escherex.cxx | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) commit ecda6f3b42d84e88d35d4d6bd4ea5cc32b9b8c89 Author: Takeshi Kurosawa <taken.spc@gmail.com> Date: Thu Jan 27 14:31:57 2011 +0900 Use product name for EPS Creator header (cherry picked from commit 2d07f1d678dc868687a9ae8c326b766e7def21c2) Signed-off-by: Thorsten Behrens <tbehrens@novell.com> filter/source/graphicfilter/eps/eps.cxx | 16 +++++++++++++++- filter/source/graphicfilter/eps/makefile.mk | 2 +- 2 files changed, 16 insertions(+), 2 deletions(-) commit dd73734f0440787d84ddbe5737e7f996803dacf2 Author: Takeshi Kurosawa <taken.spc@gmail.com> Date: Thu Jan 27 13:45:16 2011 +0900 Parse 'color' property (fdo#33551) Parse 'color' property and store the value as currentColor. (cherry picked from commit d4bac116d0c35d8811a048fdd991363a32df14ca) Signed-off-by: Thorsten Behrens <tbehrens@novell.com> filter/source/svg/svgreader.cxx | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) commit 9a7fcfcf49e393c02e8d115dfa4a40811582375f Author: Fridrich Štrba <fridrich.strba@bluewin.ch> Date: Sun Jan 30 10:22:38 2011 +0100 Use double instead of float (cherry picked from commit c90c5d503543a960a05b43752a5dff9ccf4bcd30) Signed-off-by: Caolán McNamara <caolanm@redhat.com> writerperfect/source/filter/DocumentCollector.cxx | 2 +- writerperfect/source/filter/DocumentCollector.hxx | 2 +- writerperfect/source/filter/FilterInternal.hxx | 6 +++--- writerperfect/source/filter/ListStyle.cxx | 12 ++++++------ writerperfect/source/filter/SectionStyle.cxx | 2 +- writerperfect/source/filter/TextRunStyle.cxx | 6 +++--- writerperfect/source/filter/WriterProperties.hxx | 4 ++-- 7 files changed, 17 insertions(+), 17 deletions(-) commit 9fd267985820db81454cce1b4a76752769b471b7 Author: Thomas Klausner <wiz@NetBSD.org> Date: Sat Nov 6 00:30:42 2010 +0100 Use PYTHON as passed through by set_soenv.in. filter/source/config/fragments/makefile.mk | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 82102abd307f911c400735eb6f9b43fa69d221d8 Author: Noel Power <noel.power@novell.com> Date: Tue Jan 18 12:58:17 2011 +0000 fdo#33237 remove debug line writerfilter/source/dmapper/DomainMapper_Impl.cxx | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) commit 9c976ba4f8e1fd2bcd40412873e22728ed83d5bd Author: Noel Power <noel.power@novell.com> Date: Tue Jan 18 12:43:50 2011 +0000 fdo#33237# fix ole object import for writer (docx) writerfilter/source/dmapper/DomainMapper_Impl.cxx | 41 +++++++++++++++++++++ 1 files changed, 41 insertions(+), 0 deletions(-) commit 8383f008c60c0615005f4bb22ae9ddaeca4540cf Author: Fridrich Štrba <fridrich.strba@bluewin.ch> Date: Tue Jan 18 11:12:52 2011 +0100 Fix a typo SolarMuexGuard -> SolarMutexGuard signoff: Jan Holesovsky <kendy@suse.cz> signoff: Thorsten Behrens <thb@documentfoundation.org> signoff: Tor Lillqvist <tlillqvist@novell.com> signoff: Petr Mladek <pmladek@suse.cz> binfilter/bf_so3/source/ole/socli.cxx | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 247a91f1df71614fc8d9b2264d10f0952055c611 Author: Petr Mladek <pmladek@suse.cz> Date: Tue Jan 11 23:05:56 2011 +0100 Please, ignore the previous message; it was for the libreoffice-3-3-0 branch This is 'libreoffice-3-3' - the stable branch for the 3.3.x releases. Only safe changes, reviewed by anoter person are allowed. If you want to build something cool, unstable, and risky, use master. commit 9628deac573830fdfbce2c402f8574379ac71a35 Author: Petr Mladek <pmladek@suse.cz> Date: Tue Jan 11 22:39:07 2011 +0100 Branch libreoffice-3-3-0 This is 'libreoffice-3-3-0' - the stable branch for the 3.3.0 release. Only very safe changes, reviewed by three people are allowed. If you want to commit more complicated fix for the next 3.3.x release, please use the 'libreoffice-3-3' branch. If you want to build something cool, unstable, and risky, use master.
Notes
split repo tag: filters_libreoffice-3.3.1.1 split repo tag: filters_libreoffice-3.3.1.2
Diffstat (limited to 'binfilter/bf_svx/source/editeng/svx_impedit4.cxx')
-rw-r--r--binfilter/bf_svx/source/editeng/svx_impedit4.cxx533
1 files changed, 533 insertions, 0 deletions
diff --git a/binfilter/bf_svx/source/editeng/svx_impedit4.cxx b/binfilter/bf_svx/source/editeng/svx_impedit4.cxx
new file mode 100644
index 000000000000..b5a0ad3903b3
--- /dev/null
+++ b/binfilter/bf_svx/source/editeng/svx_impedit4.cxx
@@ -0,0 +1,533 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+
+#include <vcl/svapp.hxx>
+#ifdef _MSC_VER
+#pragma hdrstop
+#endif
+
+#include "eeitem.hxx"
+#include "eeitemid.hxx"
+
+#include <vcl/window.hxx>
+
+#include <impedit.hxx>
+
+#include "lrspitem.hxx"
+#include "langitem.hxx"
+
+#include <rtl/tencinfo.h>
+
+#include <unolingu.hxx>
+
+namespace binfilter {
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::linguistic2;
+
+
+
+
+
+
+
+
+#ifndef SVX_LIGHT
+#endif
+
+
+
+
+
+#ifndef SVX_LIGHT
+#endif
+
+
+
+
+
+
+/*N*/ EditTextObject* ImpEditEngine::CreateTextObject()
+/*N*/ {
+/*N*/ EditSelection aCompleteSelection;
+/*N*/ aCompleteSelection.Min() = aEditDoc.GetStartPaM();
+/*N*/ aCompleteSelection.Max() = aEditDoc.GetEndPaM();
+/*N*/
+/*N*/ return CreateTextObject( aCompleteSelection );
+/*N*/ }
+
+/*N*/ EditTextObject* ImpEditEngine::CreateTextObject( EditSelection aSel )
+/*N*/ {
+/*N*/ return CreateBinTextObject( aSel, GetEditTextObjectPool(), aStatus.AllowBigObjects(), nBigTextObjectStart );
+/*N*/ }
+
+/*N*/ EditTextObject* ImpEditEngine::CreateBinTextObject( EditSelection aSel, SfxItemPool* pPool, sal_Bool bAllowBigObjects, sal_uInt16 nBigObjectStart ) const
+/*N*/ {
+/*N*/ BinTextObject* pTxtObj = new BinTextObject( pPool );
+/*N*/ pTxtObj->SetVertical( IsVertical() );
+/*N*/ MapUnit eMapUnit = (MapUnit)aEditDoc.GetItemPool().GetMetric( DEF_METRIC );
+/*N*/ pTxtObj->SetMetric( (sal_uInt16) eMapUnit );
+/*N*/ if ( pTxtObj->IsOwnerOfPool() )
+/*N*/ pTxtObj->GetPool()->SetDefaultMetric( (SfxMapUnit) eMapUnit );
+/*N*/
+/*N*/ sal_uInt16 nStartNode, nEndNode;
+/*N*/ sal_uInt32 nTextPortions = 0;
+/*N*/
+/*N*/ aSel.Adjust( aEditDoc );
+/*N*/ nStartNode = aEditDoc.GetPos( aSel.Min().GetNode() );
+/*N*/ nEndNode = aEditDoc.GetPos( aSel.Max().GetNode() );
+/*N*/
+/*N*/ sal_Bool bOnlyFullParagraphs = ( aSel.Min().GetIndex() ||
+/*N*/ ( aSel.Max().GetIndex() < aSel.Max().GetNode()->Len() ) ) ?
+/*N*/ sal_False : sal_True;
+/*N*/
+/*N*/ // Vorlagen werden nicht gespeichert!
+/*N*/ // ( Nur Name und Familie, Vorlage selbst muss in App stehen! )
+/*N*/
+/*N*/ pTxtObj->SetScriptType( GetScriptType( aSel ) );
+/*N*/
+/*N*/ // ueber die Absaetze iterieren...
+/*N*/ sal_uInt16 nNode;
+/*N*/ for ( nNode = nStartNode; nNode <= nEndNode; nNode++ )
+/*N*/ {
+/*N*/ ContentNode* pNode = aEditDoc.SaveGetObject( nNode );
+/*N*/ DBG_ASSERT( pNode, "Node nicht gefunden: Search&Replace" );
+/*N*/
+/*N*/ if ( bOnlyFullParagraphs )
+/*N*/ {
+/*N*/ ParaPortion* pParaPortion = GetParaPortions()[nNode];
+/*N*/ nTextPortions += pParaPortion->GetTextPortions().Count();
+/*N*/ }
+/*N*/
+/*N*/ sal_uInt16 nStartPos = 0;
+/*N*/ sal_uInt16 nEndPos = pNode->Len();
+/*N*/
+/*N*/ sal_Bool bEmptyPara = nEndPos ? sal_False : sal_True;
+/*N*/
+/*N*/ if ( ( nNode == nStartNode ) && !bOnlyFullParagraphs )
+/*?*/ nStartPos = aSel.Min().GetIndex();
+/*N*/ if ( ( nNode == nEndNode ) && !bOnlyFullParagraphs )
+/*?*/ nEndPos = aSel.Max().GetIndex();
+/*N*/
+/*N*/
+/*N*/ ContentInfo* pC = pTxtObj->CreateAndInsertContent();
+/*N*/
+/*N*/ // Die Absatzattribute...
+/*N*/ pC->GetParaAttribs().Set( pNode->GetContentAttribs().GetItems() );
+/*N*/
+/*N*/ // Seit der 5.1 werden im Outliner die LRSpaceItems anders interpretiert.
+/*N*/ // Damit sie in einer 5.0 und aelter richtig sind, muss das Flag
+/*N*/ // richtig gesetzt sein...
+/*N*/ sal_Bool bOutliner = aStatus.IsAnyOutliner();
+/*N*/ for ( sal_uInt16 n = 0; n <=1; n++ )
+/*N*/ {
+/*N*/ sal_uInt16 nItemId = n ? EE_PARA_LRSPACE : EE_PARA_OUTLLRSPACE;
+/*N*/ if ( pC->GetParaAttribs().GetItemState( nItemId ) == SFX_ITEM_ON )
+/*N*/ {
+/*N*/ const SvxLRSpaceItem& rItem = (const SvxLRSpaceItem&) pC->GetParaAttribs().Get( nItemId );
+/*N*/ if ( rItem.IsBulletFI() != bOutliner )
+/*N*/ {
+/*N*/ SvxLRSpaceItem aNewItem( rItem );
+/*N*/ aNewItem.SetBulletFI( bOutliner );
+/*N*/ pC->GetParaAttribs().Put( aNewItem );
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/
+/*N*/ // Das StyleSheet...
+/*N*/ if ( pNode->GetStyleSheet() )
+/*N*/ {
+/*N*/ pC->GetStyle() = pNode->GetStyleSheet()->GetName();
+/*N*/ pC->GetFamily() = pNode->GetStyleSheet()->GetFamily();
+/*N*/ }
+/*N*/
+/*N*/ // Der Text...
+/*N*/ pC->GetText() = pNode->Copy( nStartPos, nEndPos-nStartPos );
+/*N*/
+/*N*/ // und die Attribute...
+/*N*/ sal_uInt16 nAttr = 0;
+/*N*/ EditCharAttrib* pAttr = GetAttrib( pNode->GetCharAttribs().GetAttribs(), nAttr );
+/*N*/ while ( pAttr )
+/*N*/ {
+/*N*/ // In einem leeren Absatz die Attribute behalten!
+/*N*/ if ( bEmptyPara ||
+/*N*/ ( ( pAttr->GetEnd() > nStartPos ) && ( pAttr->GetStart() < nEndPos ) ) )
+/*N*/ {
+/*N*/ XEditAttribute* pX = pTxtObj->CreateAttrib( *pAttr->GetItem(), pAttr->GetStart(), pAttr->GetEnd() );
+/*N*/ // Evtl. korrigieren...
+/*N*/ if ( ( nNode == nStartNode ) && ( nStartPos != 0 ) )
+/*N*/ {
+/*?*/ pX->GetStart() = ( pX->GetStart() > nStartPos ) ? pX->GetStart()-nStartPos : 0;
+/*?*/ pX->GetEnd() -= nStartPos;
+/*N*/
+/*N*/ }
+/*N*/ if ( nNode == nEndNode )
+/*N*/ {
+/*N*/ if ( pX->GetEnd() > (nEndPos-nStartPos) )
+/*?*/ pX->GetEnd() = nEndPos-nStartPos;
+/*N*/ }
+/*N*/ DBG_ASSERT( pX->GetEnd() <= (nEndPos-nStartPos), "CreateBinTextObject: Attribut zu lang!" );
+/*N*/ if ( !pX->GetLen() && !bEmptyPara )
+/*?*/ pTxtObj->DestroyAttrib( pX );
+/*N*/ else
+/*N*/ pC->GetAttribs().Insert( pX, pC->GetAttribs().Count() );
+/*N*/ }
+/*N*/ nAttr++;
+/*N*/ pAttr = GetAttrib( pNode->GetCharAttribs().GetAttribs(), nAttr );
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ // Bei grossen Textobjekten die PortionInfos merken:
+/*N*/ // Schwelle rauf setzen, wenn Olli die Absaetze nicht mehr zerhackt!
+/*N*/ if ( bAllowBigObjects && bOnlyFullParagraphs && IsFormatted() && GetUpdateMode() && ( nTextPortions >= nBigObjectStart ) )
+/*N*/ {
+/*?*/ XParaPortionList* pXList = new XParaPortionList( GetRefDevice(), aPaperSize.Width() );
+/*?*/ pTxtObj->SetPortionInfo( pXList );
+/*?*/ for ( nNode = nStartNode; nNode <= nEndNode; nNode++ )
+/*?*/ {
+/*?*/ ParaPortion* pParaPortion = GetParaPortions()[nNode];
+/*?*/ XParaPortion* pX = new XParaPortion;
+/*?*/ pXList->Insert( pX, pXList->Count() );
+/*?*/
+/*?*/ pX->nHeight = pParaPortion->GetHeight();
+/*?*/ pX->nFirstLineOffset = pParaPortion->GetFirstLineOffset();
+/*?*/
+/*?*/ // Die TextPortions
+/*?*/ sal_uInt16 nCount = pParaPortion->GetTextPortions().Count();
+/*?*/ sal_uInt16 n;
+/*?*/ for ( n = 0; n < nCount; n++ )
+/*?*/ {
+/*?*/ TextPortion* pTextPortion = pParaPortion->GetTextPortions()[n];
+/*?*/ TextPortion* pNew = new TextPortion( *pTextPortion );
+/*?*/ pX->aTextPortions.Insert( pNew, pX->aTextPortions.Count() );
+/*?*/ }
+/*?*/
+/*?*/ // Die Zeilen
+/*?*/ nCount = pParaPortion->GetLines().Count();
+/*?*/ for ( n = 0; n < nCount; n++ )
+/*?*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 EditLine* pLine = pParaPortion->GetLines()[n];
+/*?*/ }
+/*?*/ #ifdef DBG_UTIL
+/*?*/ USHORT nTest, nTPLen = 0, nTxtLen = 0;
+/*?*/ for ( nTest = pParaPortion->GetTextPortions().Count(); nTest; )
+/*?*/ nTPLen += pParaPortion->GetTextPortions().GetObject( --nTest )->GetLen();
+/*?*/ for ( nTest = pParaPortion->GetLines().Count(); nTest; )
+/*?*/ nTxtLen += pParaPortion->GetLines().GetObject( --nTest )->GetLen();
+/*?*/ DBG_ASSERT( ( nTPLen == pParaPortion->GetNode()->Len() ) && ( nTxtLen == pParaPortion->GetNode()->Len() ), "CreateBinTextObject: ParaPortion not completely formatted!" );
+/*?*/ #endif
+/*?*/ }
+/*N*/ }
+/*N*/ return pTxtObj;
+/*N*/ }
+
+/*N*/ void ImpEditEngine::SetText( const EditTextObject& rTextObject )
+/*N*/ {
+/*N*/ // Da Setzen eines TextObject ist nicht Undo-faehig!
+/*N*/ ResetUndoManager();
+/*N*/ sal_Bool bUpdate = GetUpdateMode();
+/*N*/ sal_Bool bUndo = IsUndoEnabled();
+/*N*/
+/*N*/ SetText( XubString() );
+/*N*/ EditPaM aPaM = aEditDoc.GetStartPaM();
+/*N*/
+/*N*/ SetUpdateMode( sal_False );
+/*N*/ EnableUndo( sal_False );
+/*N*/
+/*N*/ InsertText( rTextObject, EditSelection( aPaM, aPaM ) );
+/*N*/ SetVertical( rTextObject.IsVertical() );
+/*N*/
+/*N*/ #ifndef SVX_LIGHT
+/*N*/ DBG_ASSERT( !HasUndoManager() || !GetUndoManager().GetUndoActionCount(), "Woher kommt das Undo in SetText ?!" );
+/*N*/ #endif
+/*N*/ SetUpdateMode( bUpdate );
+/*N*/ EnableUndo( bUndo );
+/*N*/ }
+
+/*N*/ EditSelection ImpEditEngine::InsertText( const EditTextObject& rTextObject, EditSelection aSel )
+/*N*/ {
+/*N*/ EnterBlockNotifications();
+/*N*/ aSel.Adjust( aEditDoc );
+/*N*/ if ( aSel.HasRange() )
+/*?*/ aSel = ImpDeleteSelection( aSel );
+/*N*/ EditSelection aNewSel = InsertBinTextObject( (BinTextObject&)rTextObject, aSel.Max() );
+/*N*/ LeaveBlockNotifications();
+/*N*/ return aNewSel;
+/*N*/
+/*N*/ // MT 05/00: InsertBinTextObject direkt hier machen...
+/*N*/ }
+
+/*N*/ EditSelection ImpEditEngine::InsertBinTextObject( BinTextObject& rTextObject, EditPaM aPaM )
+/*N*/ {
+/*N*/ // Optimieren:
+/*N*/ // Kein GetPos undFindParaportion, sondern Index berechnen!
+/*N*/ EditSelection aSel( aPaM, aPaM );
+/*N*/
+/*N*/ sal_Bool bUsePortionInfo = sal_False;
+/*N*/ sal_Bool bFields = sal_False;
+/*N*/ XParaPortionList* pPortionInfo = rTextObject.GetPortionInfo();
+/*N*/
+/*N*/ if ( pPortionInfo && ( (long)pPortionInfo->GetPaperWidth() == aPaperSize.Width() )
+/*N*/ && ( pPortionInfo->GetRefMapMode() == GetRefDevice()->GetMapMode() ) )
+/*N*/ {
+/*?*/ if ( ( pPortionInfo->GetRefDevPtr() == (sal_uIntPtr)GetRefDevice() ) ||
+/*?*/ ( ( pPortionInfo->GetRefDevType() == OUTDEV_VIRDEV ) &&
+/*?*/ ( GetRefDevice()->GetOutDevType() == OUTDEV_VIRDEV ) ) )
+/*?*/ bUsePortionInfo = sal_True;
+/*N*/ }
+/*N*/
+/*N*/ sal_Bool bConvertItems = sal_False;
+/*N*/ MapUnit eSourceUnit, eDestUnit;
+/*N*/ if ( rTextObject.HasMetric() )
+/*N*/ {
+/*N*/ eSourceUnit = (MapUnit)rTextObject.GetMetric();
+/*N*/ eDestUnit = (MapUnit)aEditDoc.GetItemPool().GetMetric( DEF_METRIC );
+/*N*/ if ( eSourceUnit != eDestUnit )
+/*N*/ bConvertItems = sal_True;
+/*N*/ }
+/*N*/
+/*N*/ sal_uInt16 nContents = rTextObject.GetContents().Count();
+/*N*/ sal_uInt16 nPara = aEditDoc.GetPos( aPaM.GetNode() );
+/*N*/
+/*N*/ for ( sal_uInt16 n = 0; n < nContents; n++, nPara++ )
+/*N*/ {
+/*N*/ ContentInfo* pC = rTextObject.GetContents().GetObject( n );
+/*N*/ sal_Bool bNewContent = aPaM.GetNode()->Len() ? sal_False: sal_True;
+/*N*/ sal_uInt16 nStartPos = aPaM.GetIndex();
+/*N*/
+/*N*/ aPaM = ImpFastInsertText( aPaM, pC->GetText() );
+/*N*/
+/*N*/ ParaPortion* pPortion = FindParaPortion( aPaM.GetNode() );
+/*N*/ DBG_ASSERT( pPortion, "Blinde Portion in FastInsertText" );
+/*N*/ pPortion->MarkInvalid( nStartPos, pC->GetText().Len() );
+/*N*/
+/*N*/ // Zeicheattribute...
+/*N*/ sal_Bool bAllreadyHasAttribs = aPaM.GetNode()->GetCharAttribs().Count() ? sal_True : sal_False;
+/*N*/ sal_uInt16 nNewAttribs = pC->GetAttribs().Count();
+/*N*/ if ( nNewAttribs )
+/*N*/ {
+/*N*/ BOOL bUpdateFields = FALSE;
+/*N*/ for ( sal_uInt16 nAttr = 0; nAttr < nNewAttribs; nAttr++ )
+/*N*/ {
+/*N*/ XEditAttribute* pX = pC->GetAttribs().GetObject( nAttr );
+/*N*/ // Kann passieren wenn Absaetze >16K entstehen, dann wird einfach umgebrochen.
+/*N*/ if ( pX->GetEnd() <= aPaM.GetNode()->Len() )
+/*N*/ {
+/*N*/ if ( !bAllreadyHasAttribs || pX->IsFeature() )
+/*N*/ {
+/*N*/ // Normale Attribute gehen dann schneller...
+/*N*/ // Features duerfen nicht ueber EditDoc::InsertAttrib
+/*N*/ // eingefuegt werden, sie sind bei FastInsertText schon im TextFluss
+/*N*/ DBG_ASSERT( pX->GetEnd() <= aPaM.GetNode()->Len(), "InsertBinTextObject: Attribut zu gross!" );
+/*N*/ EditCharAttrib* pAttr;
+/*N*/ if ( !bConvertItems )
+/*N*/ pAttr = MakeCharAttrib( aEditDoc.GetItemPool(), *(pX->GetItem()), pX->GetStart()+nStartPos, pX->GetEnd()+nStartPos );
+/*N*/ else
+/*N*/ {
+/*?*/ SfxPoolItem* pNew = pX->GetItem()->Clone();
+/*?*/ ConvertItem( *pNew, eSourceUnit, eDestUnit );
+/*?*/ pAttr = MakeCharAttrib( aEditDoc.GetItemPool(), *pNew, pX->GetStart()+nStartPos, pX->GetEnd()+nStartPos );
+/*?*/ delete pNew;
+/*N*/ }
+/*N*/ DBG_ASSERT( pAttr->GetEnd() <= aPaM.GetNode()->Len(), "InsertBinTextObject: Attribut passt nicht! (1)" );
+/*N*/ aPaM.GetNode()->GetCharAttribs().InsertAttrib( pAttr );
+/*N*/ if ( pAttr->Which() == EE_FEATURE_FIELD )
+/*N*/ bUpdateFields = TRUE;
+/*N*/ }
+/*N*/ else
+/*N*/ {
+/*?*/ DBG_ASSERT( pX->GetEnd()+nStartPos <= aPaM.GetNode()->Len(), "InsertBinTextObject: Attribut passt nicht! (2)" );
+/*?*/ // Tabs und andere Features koennen nicht ueber InsertAttrib eingefuegt werden:
+/*?*/ aEditDoc.InsertAttrib( aPaM.GetNode(), pX->GetStart()+nStartPos, pX->GetEnd()+nStartPos, *pX->GetItem() );
+/*N*/ }
+/*N*/ }
+/*N*/ }
+/*N*/ if ( bUpdateFields )
+/*N*/ UpdateFields();
+/*N*/
+/*N*/ // Sonst QuickFormat => Keine Attribute!
+/*N*/ pPortion->MarkSelectionInvalid( nStartPos, pC->GetText().Len() );
+/*N*/ }
+/*N*/
+/*N*/ DBG_ASSERT( CheckOrderedList( aPaM.GetNode()->GetCharAttribs().GetAttribs(), sal_True ), "InsertBinTextObject: Start-Liste verdreht" );
+/*N*/
+/*N*/ sal_Bool bParaAttribs = sal_False;
+/*N*/ if ( bNewContent || ( ( n > 0 ) && ( n < (nContents-1) ) ) )
+/*N*/ {
+/*N*/ bParaAttribs = sal_False;
+/*N*/ // #101512# Don't overwrite level/style from existing paragraph in OutlineView
+/*N*/ // MT 10/2002: Removed because of #103874#, handled in Outliner::EndPasteOrDropHdl now.
+/*N*/ // if ( !aStatus.IsOutliner() || n )
+/*N*/ {
+/*N*/ // nur dann Style und ParaAttribs, wenn neuer Absatz, oder
+/*N*/ // komplett inneliegender...
+/*N*/ bParaAttribs = pC->GetParaAttribs().Count() ? sal_True : sal_False;
+/*N*/ if ( GetStyleSheetPool() && pC->GetStyle().Len() )
+/*N*/ {
+/*N*/ SfxStyleSheet* pStyle = (SfxStyleSheet*)GetStyleSheetPool()->Find( pC->GetStyle(), pC->GetFamily() );
+/*N*/ DBG_ASSERT( pStyle, "InsertBinTextObject - Style not found!" );
+/*N*/ SetStyleSheet( nPara, pStyle );
+/*N*/ }
+/*N*/ if ( !bConvertItems )
+/*N*/ SetParaAttribs( aEditDoc.GetPos( aPaM.GetNode() ), pC->GetParaAttribs() );
+/*N*/ else
+/*N*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001
+/*N*/ }
+/*N*/ }
+/*N*/ if ( bNewContent && bUsePortionInfo )
+/*N*/ {
+/*?*/ XParaPortion* pXP = pPortionInfo->GetObject( n );
+/*?*/ DBG_ASSERT( pXP, "InsertBinTextObject: PortionInfo?" );
+/*?*/ ParaPortion* pParaPortion = GetParaPortions()[ nPara ];
+/*?*/ DBG_ASSERT( pParaPortion, "InsertBinTextObject: ParaPortion?" );
+/*?*/ pParaPortion->nHeight = pXP->nHeight;
+/*?*/ pParaPortion->nFirstLineOffset = pXP->nFirstLineOffset;
+/*?*/ pParaPortion->bForceRepaint = sal_True;
+/*?*/ pParaPortion->SetValid(); // Nicht formatieren
+/*?*/
+/*?*/ // Die TextPortions
+/*?*/ pParaPortion->GetTextPortions().Reset();
+/*?*/ sal_uInt16 nCount = pXP->aTextPortions.Count();
+/*?*/ for ( sal_uInt16 n = 0; n < nCount; n++ )
+/*?*/ {
+/*?*/ TextPortion* pTextPortion = pXP->aTextPortions[n];
+/*?*/ TextPortion* pNew = new TextPortion( *pTextPortion );
+/*?*/ pParaPortion->GetTextPortions().Insert( pNew, n );
+/*?*/ }
+/*?*/
+/*?*/ // Die Zeilen
+/*?*/ pParaPortion->GetLines().Reset();
+/*?*/ nCount = pXP->aLines.Count();
+/*?*/ for ( sal_uInt16 m = 0; m < nCount; m++ )
+/*?*/ {
+/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 EditLine* pLine = pXP->aLines[m];
+/*?*/ }
+/*?*/ #ifdef DBG_UTIL
+/*?*/ USHORT nTest, nTPLen = 0, nTxtLen = 0;
+/*?*/ for ( nTest = pParaPortion->GetTextPortions().Count(); nTest; )
+/*?*/ nTPLen += pParaPortion->GetTextPortions().GetObject( --nTest )->GetLen();
+/*?*/ for ( nTest = pParaPortion->GetLines().Count(); nTest; )
+/*?*/ nTxtLen += pParaPortion->GetLines().GetObject( --nTest )->GetLen();
+/*?*/ DBG_ASSERT( ( nTPLen == pParaPortion->GetNode()->Len() ) && ( nTxtLen == pParaPortion->GetNode()->Len() ), "InsertBinTextObject: ParaPortion not completely formatted!" );
+/*?*/ #endif
+/*N*/ }
+/*N*/ }
+/*N*/ if ( !bParaAttribs ) // DefFont wird bei FastInsertParagraph nicht berechnet
+/*N*/ {
+/*N*/ aPaM.GetNode()->GetCharAttribs().GetDefFont() = aEditDoc.GetDefFont();
+/*N*/ if ( aStatus.UseCharAttribs() )
+/*N*/ aPaM.GetNode()->CreateDefFont();
+/*N*/ }
+/*N*/
+/*N*/ // Zeilenumbruch, wenn weitere folgen...
+/*N*/ if ( n < ( nContents-1) )
+/*N*/ {
+/*N*/ if ( bNewContent )
+/*N*/ aPaM = ImpFastInsertParagraph( nPara+1 );
+/*N*/ else
+/*?*/ aPaM = ImpInsertParaBreak( aPaM, sal_False );
+/*N*/ }
+/*N*/ }
+/*N*/
+/*N*/ aSel.Max() = aPaM;
+/*N*/ return aSel;
+/*N*/ }
+
+/*N*/ LanguageType ImpEditEngine::GetLanguage( const EditPaM& rPaM, USHORT* pEndPos ) const
+/*N*/ {
+/*N*/ short nScriptType = GetScriptType( rPaM, pEndPos ); // pEndPos will be valid now, pointing to ScriptChange or NodeLen
+/*N*/ USHORT nLangId = GetScriptItemId( EE_CHAR_LANGUAGE, nScriptType );
+/*N*/ const SvxLanguageItem* pLangItem = &(const SvxLanguageItem&)rPaM.GetNode()->GetContentAttribs().GetItem( nLangId );
+/*N*/ EditCharAttrib* pAttr = rPaM.GetNode()->GetCharAttribs().FindAttrib( nLangId, rPaM.GetIndex() );
+/*N*/ if ( pAttr )
+/*?*/ pLangItem = (const SvxLanguageItem*)pAttr->GetItem();
+/*N*/
+/*N*/ if ( pEndPos && pAttr && ( pAttr->GetEnd() < *pEndPos ) )
+/*?*/ *pEndPos = pAttr->GetEnd();
+/*N*/
+/*N*/ return pLangItem->GetLanguage();
+/*N*/ }
+
+/*N*/ ::com::sun::star::lang::Locale ImpEditEngine::GetLocale( const EditPaM& rPaM ) const
+/*N*/ {
+/*N*/ return SvxCreateLocale( GetLanguage( rPaM ) );
+/*N*/ }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+/*N*/ void ImpEditEngine::SetAsianCompressionMode( USHORT n )
+/*N*/ {
+/*N*/ if ( n != nAsianCompressionMode )
+/*N*/ {
+/*N*/ nAsianCompressionMode = n;
+/*N*/ if ( ImplHasText() )
+/*N*/ {
+/*N*/ FormatFullDoc();
+/*N*/ UpdateViews();
+/*N*/ }
+/*N*/ }
+/*N*/ }
+
+/*N*/ void ImpEditEngine::SetKernAsianPunctuation( BOOL b )
+/*N*/ {
+/*N*/ if ( b != bKernAsianPunctuation )
+/*N*/ {
+/*NBFF*/ bKernAsianPunctuation = b;
+/*NBFF*/ if ( ImplHasText() )
+/*NBFF*/ {
+/*NBFF*/ FormatFullDoc();
+/*NBFF*/ UpdateViews();
+/*NBFF*/ }
+/*N*/ }
+/*N*/ }
+
+
+/*N*/ BOOL ImpEditEngine::ImplHasText() const
+/*N*/ {
+/*N*/ return ( ( GetEditDoc().Count() > 1 ) || GetEditDoc().GetObject(0)->Len() );
+/*N*/ }
+
+
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */