--- old/editeng/source/editeng/editdoc.cxx 2011-11-25 17:21:14.000000000 +0800 +++ old/editeng/source/editeng/editdoc.cxx 2011-11-26 11:28:10.000000000 +0800 @@ -1066,12 +1066,29 @@ { // Erst alle Informationen aus dem Style verwenden... SfxStyleSheet* pS = aContentAttribs.GetStyleSheet(); - if ( pS ) - CreateFont( GetCharAttribs().GetDefFont(), pS->GetItemSet() ); - - // ... dann die harte Absatzformatierung rueberbuegeln... - CreateFont( GetCharAttribs().GetDefFont(), - GetContentAttribs().GetItems(), pS == NULL ); + //#115580# modified at 2011/11/28 start + /* if ( pS ) + CreateFont( GetCharAttribs().GetDefFont(), pS->GetItemSet() ); + + // ... dann die harte Absatzformatierung rueberbuegeln... + CreateFont( GetCharAttribs().GetDefFont(), + GetContentAttribs().GetItems(), pS == NULL ); */ + + SvxFont& rFont = GetCharAttribs().GetDefFont(); + SvxFont& rFontCJK = GetCharAttribs().GetDefFontCJK(); + SvxFont& rFontCTL = GetCharAttribs().GetDefFontCTL(); + + if ( pS ) + { + CreateFont( rFont, pS->GetItemSet(), sal_True, i18n::ScriptType::LATIN ); + CreateFont( rFontCJK, pS->GetItemSet(), sal_True, i18n::ScriptType::ASIAN ); + CreateFont( rFontCTL, pS->GetItemSet(), sal_True, i18n::ScriptType::COMPLEX ); + } + + CreateFont( rFont, GetContentAttribs().GetItems(), pS == NULL, i18n::ScriptType::LATIN ); + CreateFont( rFontCJK, GetContentAttribs().GetItems(), pS == NULL, i18n::ScriptType::ASIAN ); + CreateFont( rFontCTL, GetContentAttribs().GetItems(), pS == NULL, i18n::ScriptType::COMPLEX ); + // end } void ContentNode::SetStyleSheet( SfxStyleSheet* pS, const SvxFont& rFontFromStyle ) @@ -1560,6 +1577,10 @@ // Den Default-Font kopieren pNode->GetCharAttribs().GetDefFont() = aPaM.GetNode()->GetCharAttribs().GetDefFont(); + //#115580# added at 2011/11/28 start + pNode->GetCharAttribs().GetDefFontCJK() = aPaM.GetNode()->GetCharAttribs().GetDefFontCJK(); + pNode->GetCharAttribs().GetDefFontCTL() = aPaM.GetNode()->GetCharAttribs().GetDefFontCTL(); + // end SfxStyleSheet* pStyle = aPaM.GetNode()->GetStyleSheet(); if ( pStyle ) { --- old/editeng/source/editeng/editdoc.hxx 2011-11-25 17:21:28.000000000 +0800 +++ old/editeng/source/editeng/editdoc.hxx 2011-11-26 11:26:28.000000000 +0800 @@ -203,6 +203,10 @@ private: CharAttribArray aAttribs; SvxFont aDefFont; // schneller, als jedesmal vom Pool! + //#115580# added at 2011/11/28 start + SvxFont aDefFontCJK; + SvxFont aDefFontCTL; + // end sal_Bool bHasEmptyAttribs; CharAttribList( const CharAttribList& ) {;} @@ -228,6 +232,10 @@ void InsertAttrib( EditCharAttrib* pAttrib ); SvxFont& GetDefFont() { return aDefFont; } + //#115580# added at 2011/11/28 start + SvxFont& GetDefFontCJK() { return aDefFontCJK; } + SvxFont& GetDefFontCTL() { return aDefFontCTL; } + // end sal_Bool HasEmptyAttribs() const { return bHasEmptyAttribs; } sal_Bool& HasEmptyAttribs() { return bHasEmptyAttribs; } @@ -451,7 +459,7 @@ sal_uInt16 nEndPortion; sal_uInt16 nHeight; // Gesamthoehe der Zeile sal_uInt16 nTxtHeight; // Reine Texthoehe - sal_uInt16 nCrsrHeight; // Bei Konturfluss hohe Zeilen => Cursor zu gro�. + sal_uInt16 nCrsrHeight; // Bei Konturfluss hohe Zeilen => Cursor zu gro� sal_uInt16 nMaxAscent; sal_Bool bHangingPunctuation; sal_Bool bInvalid; // fuer geschickte Formatierung --- old/editeng/source/editeng/eertfpar.cxx 2011-11-25 17:21:38.000000000 +0800 +++ old/editeng/source/editeng/eertfpar.cxx 2011-11-26 19:18:08.000000000 +0800 @@ -108,7 +108,7 @@ EditPaM aStart2PaM = aCurSel.Min(); // Sinnvoll oder nicht?: aStart2PaM.GetNode()->GetContentAttribs().GetItems().ClearItem(); - AddRTFDefaultValues( aStart2PaM, aStart2PaM ); + //AddRTFDefaultValues( aStart2PaM, aStart2PaM ); //#115580# deleted at 2011/11/28 EditPaM aEnd1PaM( pImpEditEngine->ImpInsertParaBreak( aCurSel.Max() ) ); // aCurCel zeigt jetzt auf den Zwischenraum @@ -136,6 +136,48 @@ aSel.Min() = EditPaM( pPrevNode, pPrevNode->Len() ); aSel.Max() = EditPaM( pCurNode, 0 ); aCurSel.Max() = pImpEditEngine->ImpDeleteSelection( aSel ); + //#115580# added at 2011/11/28 start + sal_uInt16 nStart2 = pImpEditEngine->GetEditDoc().GetPos( aStart2PaM.GetNode() ); + sal_uInt16 nEnd2 = pImpEditEngine->GetEditDoc().GetPos( aCurSel.Max().GetNode() ); + for ( sal_uInt16 n = nStart2; n <= nEnd2; n++ ) + { + ContentNode* pTmpNode = pImpEditEngine->GetEditDoc().SaveGetObject( n ); + if ( pTmpNode ) + { + {//if ContentAttribs of node has no font info, add default font attribs into it. + Size aSz( 12, 0 ); + MapMode aPntMode( MAP_POINT ); + MapMode _aEditMapMode( pImpEditEngine->GetRefDevice()->GetMapMode().GetMapUnit() ); + aSz = pImpEditEngine->GetRefDevice()->LogicToLogic( aSz, &aPntMode, &_aEditMapMode ); + + SfxItemSet& rSet = pTmpNode->GetContentAttribs().GetItems(); + SvxFont& rFont = pTmpNode->GetCharAttribs().GetDefFont(); + SvxFont& rFontCJK = pTmpNode->GetCharAttribs().GetDefFontCJK(); + SvxFont& rFontCTL = pTmpNode->GetCharAttribs().GetDefFontCTL(); + + if ( rSet.GetItemState( EE_CHAR_FONTINFO ) != SFX_ITEM_ON ) + rSet.Put( SvxFontItem( rFont.GetFamily(), rFont.GetName(), XubString(), + rFont.GetPitch(), rFont.GetCharSet(), EE_CHAR_FONTINFO ) ); + if ( rSet.GetItemState( EE_CHAR_FONTINFO_CJK ) != SFX_ITEM_ON ) + rSet.Put( SvxFontItem( rFontCJK.GetFamily(), rFontCJK.GetName(), XubString(), + rFontCJK.GetPitch(), rFontCJK.GetCharSet(), EE_CHAR_FONTINFO_CJK ) ); + if ( rSet.GetItemState( EE_CHAR_FONTINFO_CTL ) != SFX_ITEM_ON ) + rSet.Put( SvxFontItem( rFontCTL.GetFamily(), rFontCTL.GetName(), XubString(), + rFontCTL.GetPitch(), rFontCTL.GetCharSet(), EE_CHAR_FONTINFO_CTL ) ); + + if ( rSet.GetItemState( EE_CHAR_FONTHEIGHT ) != SFX_ITEM_ON ) + rSet.Put( SvxFontHeightItem( aSz.Width(), 100, EE_CHAR_FONTHEIGHT ) ); + if ( rSet.GetItemState( EE_CHAR_FONTHEIGHT_CJK ) != SFX_ITEM_ON ) + rSet.Put( SvxFontHeightItem( aSz.Width(), 100, EE_CHAR_FONTHEIGHT_CJK ) ); + if ( rSet.GetItemState( EE_CHAR_FONTHEIGHT_CTL ) != SFX_ITEM_ON ) + rSet.Put( SvxFontHeightItem( aSz.Width(), 100, EE_CHAR_FONTHEIGHT_CTL ) ); + } + + pImpEditEngine->AdjustParaAttribsByStyleSheet( pTmpNode ); + pImpEditEngine->ParaAttribsToCharAttribs( pTmpNode ); + } + } + // end } EditPaM aEnd2PaM( aCurSel.Max() ); //AddRTFDefaultValues( aStart2PaM, aEnd2PaM ); @@ -145,14 +187,18 @@ // => Zeichenattribute machen. sal_Bool bSpecialBackward = aStart1PaM.GetNode()->Len() ? sal_False : sal_True; - if ( bOnlyOnePara || aStart1PaM.GetNode()->Len() ) - pImpEditEngine->ParaAttribsToCharAttribs( aStart2PaM.GetNode() ); + //#115580# deleted at 2011/11/28 start + /* if ( bOnlyOnePara || aStart1PaM.GetNode()->Len() ) + pImpEditEngine->ParaAttribsToCharAttribs( aStart2PaM.GetNode() ); */ + // end aCurSel.Min() = pImpEditEngine->ImpConnectParagraphs( aStart1PaM.GetNode(), aStart2PaM.GetNode(), bSpecialBackward ); bSpecialBackward = aEnd1PaM.GetNode()->Len() ? sal_True : sal_False; // wenn bOnlyOnePara, dann ist der Node beim Connect verschwunden. - if ( !bOnlyOnePara && aEnd1PaM.GetNode()->Len() ) - pImpEditEngine->ParaAttribsToCharAttribs( aEnd2PaM.GetNode() ); + //#115580# deleted at 2011/11/28 start + /* if ( !bOnlyOnePara && aEnd1PaM.GetNode()->Len() ) + pImpEditEngine->ParaAttribsToCharAttribs( aEnd2PaM.GetNode() ); */ + // end aCurSel.Max() = pImpEditEngine->ImpConnectParagraphs( ( bOnlyOnePara ? aStart1PaM.GetNode() : aEnd2PaM.GetNode() ), aEnd1PaM.GetNode(), bSpecialBackward ); --- old/editeng/source/editeng/impedit.hxx 2011-11-17 09:47:06.000000000 +0800 +++ old/editeng/source/editeng/impedit.hxx 2011-11-26 11:11:36.000000000 +0800 @@ -479,6 +479,7 @@ sal_Bool bFormatted; sal_Bool bInSelection; sal_Bool bIsInUndo; + sal_Bool bIsPasting; //#115580# added at 2011/11/28 sal_Bool bUpdate; sal_Bool bUndoEnabled; sal_Bool bOwnerOfRefDev; @@ -543,6 +544,7 @@ void SetParaAttrib( sal_uInt8 nFunc, EditSelection aSel, sal_uInt16 nValue ); sal_uInt16 GetParaAttrib( sal_uInt8 nFunc, EditSelection aSel ); void SetCharAttrib( EditSelection aSel, const SfxPoolItem& rItem ); + void AdjustParaAttribsByStyleSheet( ContentNode* pNode ); //#115580# added at 2011/11/28 void ParaAttribsToCharAttribs( ContentNode* pNode ); void GetCharAttribs( sal_uInt16 nPara, EECharAttribArray& rLst ) const; --- old/editeng/source/editeng/impedit2.cxx 2011-11-17 09:46:44.000000000 +0800 +++ old/editeng/source/editeng/impedit2.cxx 2011-11-26 11:11:36.000000000 +0800 @@ -133,6 +133,7 @@ bOwnerOfRefDev = sal_False; bDowning = sal_False; bIsInUndo = sal_False; + bIsPasting = sal_False; //#115580# added at 2011/11/28 bIsFormatting = sal_False; bFormatted = sal_False; bUpdate = sal_True; @@ -3701,6 +3702,7 @@ if ( rxDataObj.is() ) { + bIsPasting = sal_True; //#115580# added at 2011/11/28 datatransfer::DataFlavor aFlavor; sal_Bool bDone = sal_False; @@ -3791,6 +3793,7 @@ } } } + bIsPasting = sal_False; //#115580# added at 2011/11/28 } return aNewSelection; --- old/editeng/source/editeng/impedit4.cxx 2011-11-17 09:46:52.000000000 +0800 +++ old/editeng/source/editeng/impedit4.cxx 2011-11-26 19:16:42.000000000 +0800 @@ -1240,7 +1240,15 @@ // Kein GetPos undFindParaportion, sondern Index berechnen! EditSelection aSel( aPaM, aPaM ); DBG_ASSERT( !aSel.DbgIsBuggy( aEditDoc ), "InsertBibTextObject: Selektion kaput!(1)" ); - + + //#115580# added at 2011/11/28 start + EditPaM aStart1PaM( aSel.Min().GetNode(), aSel.Min().GetIndex() ); + aSel = ImpInsertParaBreak( aSel ); + EditPaM aStart2PaM = aSel.Min(); + EditPaM aEnd1PaM( ImpInsertParaBreak( aSel.Max() ) ); + aEnd1PaM.GetNode()->SetStyleSheet( aStart1PaM.GetNode()->GetStyleSheet(), sal_False ); + // end + sal_Bool bUsePortionInfo = sal_False; // sal_Bool bFields = sal_False; XParaPortionList* pPortionInfo = rTextObject.GetPortionInfo(); @@ -1270,6 +1278,19 @@ for ( sal_uInt16 n = 0; n < nContents; n++, nPara++ ) { ContentInfo* pC = rTextObject.GetContents().GetObject( n ); + + //#115580# added at 2011/11/28 start + if ( bIsPasting ) + { + if ( !n ) + aPaM = aStart2PaM; + //init node + aPaM.GetNode()->SetStyleSheet( aStart1PaM.GetNode()->GetStyleSheet(), sal_False ); + aPaM.GetNode()->GetContentAttribs().GetItems().ClearItem(); + aPaM.GetNode()->GetCharAttribs().Clear(); + } + // end + sal_Bool bNewContent = aPaM.GetNode()->Len() ? sal_False: sal_True; sal_uInt16 nStartPos = aPaM.GetIndex(); @@ -1340,6 +1361,20 @@ // nur dann Style und ParaAttribs, wenn neuer Absatz, oder // komplett inneliegender... bParaAttribs = pC->GetParaAttribs().Count() ? sal_True : sal_False; + + //#115580# added at 2011/11/28 start + if ( bIsPasting ) + { + nPara = aEditDoc.GetPos( aPaM.GetNode() ); + if ( GetStyleSheetPool() && pC->GetStyle().Len() ) + { + SfxStyleSheet* pStyle = (SfxStyleSheet*)GetStyleSheetPool()->Find( pC->GetStyle(), pC->GetFamily() ); + DBG_ASSERT( pStyle, "InsertBinTextObject - Style not found!" ); + SetStyleSheet( nPara, pStyle ); + } + } + else + // end if ( GetStyleSheetPool() && pC->GetStyle().Len() ) { SfxStyleSheet* pStyle = (SfxStyleSheet*)GetStyleSheetPool()->Find( pC->GetStyle(), pC->GetFamily() ); @@ -1412,6 +1447,14 @@ } #endif // !SVX_LIGHT + //#115580# added at 2011/11/28 start + if ( bIsPasting ) + { + AdjustParaAttribsByStyleSheet( aPaM.GetNode() ); + ParaAttribsToCharAttribs( aPaM.GetNode() ); + } + // end + // Zeilenumbruch, wenn weitere folgen... if ( n < ( nContents-1) ) { @@ -1422,7 +1465,25 @@ } } - aSel.Max() = aPaM; + //#115580# modified at 2011/11/28 start + /* aSel.Max() = aPaM; */ + + if ( bIsPasting ) + { + EditPaM aEnd2PaM( aPaM ); + + sal_Bool bSpecialBackward = aStart1PaM.GetNode()->Len() ? sal_False : sal_True; + + aSel.Min() = ImpConnectParagraphs( aStart1PaM.GetNode(), aStart2PaM.GetNode(), bSpecialBackward ); + bSpecialBackward = aEnd1PaM.GetNode()->Len() ? sal_True : sal_False; + + aSel.Max() = ImpConnectParagraphs( ( ( nContents == 1 ) ? aStart1PaM.GetNode() : aEnd2PaM.GetNode() ), + aEnd1PaM.GetNode(), bSpecialBackward ); + } + else + aSel.Max() = aPaM; + // end + DBG_ASSERT( !aSel.DbgIsBuggy( aEditDoc ), "InsertBibTextObject: Selektion kaput!(1)" ); return aSel; } @@ -2869,7 +2930,7 @@ const sal_Int16 nWordType = i18n::WordType::ANYWORD_IGNOREWHITESPACES; //! In order to have less trouble with changing text size, e.g. because - //! of ligatures or � (German small sz) being resolved, we need to process + //! of ligatures or �(German small sz) being resolved, we need to process //! the text replacements from end to start. //! This way the offsets for the yet to be changed words will be //! left unchanged by the already replaced text. --- old/editeng/source/editeng/impedit5.cxx 2011-11-17 09:46:58.000000000 +0800 +++ old/editeng/source/editeng/impedit5.cxx 2011-11-26 11:09:34.000000000 +0800 @@ -813,6 +813,25 @@ } } +//#115580# added at 2011/11/28 start +void ImpEditEngine::AdjustParaAttribsByStyleSheet( ContentNode* pNode ) +{ + if ( !pNode ) + return; + + SfxStyleSheet* pStyle = pNode->GetStyleSheet(); + for ( sal_uInt16 nWhich = EE_PARA_START; nWhich < EE_CHAR_START && pStyle; nWhich++ ) + { + if ( pNode->GetContentAttribs().GetItems().GetItemState( nWhich ) == SFX_ITEM_ON ) + { + const SfxItemSet& rStyleAttribs = pStyle->GetItemSet(); + if ( rStyleAttribs.GetItemState( nWhich ) == SFX_ITEM_ON ) + pNode->GetContentAttribs().GetItems().ClearItem( nWhich ); + } + } +} +// end + void ImpEditEngine::ParaAttribsToCharAttribs( ContentNode* pNode ) { pNode->GetCharAttribs().DeleteEmptyAttribs( GetEditDoc().GetItemPool() ); @@ -841,6 +860,11 @@ } bFormatted = sal_False; // Portion braucht hier nicht invalidiert werden, geschieht woanders. + + //#115580# added at 2011/11/28 start + if ( bIsPasting ) + pNode->GetContentAttribs().GetItems().ClearItem(); + // end } IdleFormattter::IdleFormattter() --- old/sw/inc/docsh.hxx 2011-11-25 17:23:06.000000000 +0800 +++ old/sw/inc/docsh.hxx 2011-11-26 11:43:46.000000000 +0800 @@ -146,6 +146,8 @@ static SfxInterface *_GetInterface() { return GetStaticInterface(); } static rtl::OUString GetEventName( sal_Int32 nId ); + + static void InitDefaultFontAttr( SwDoc* pDoc ); //#115580# added at 2011/11/28 //Das Doc wird fuer SO-Datenaustausch benoetigt! SwDocShell( SfxObjectCreateMode eMode = SFX_CREATE_MODE_EMBEDDED ); --- old/sw/source/ui/app/docshini.cxx 2011-11-25 17:25:10.000000000 +0800 +++ old/sw/source/ui/app/docshini.cxx 2011-11-26 19:16:42.000000000 +0800 @@ -358,6 +358,147 @@ return bRet; } +//#115580# added at 2011/11/28 start +//when creating a new doc, if needs, set default font attributes, as +//well as default language attributes +void SwDocShell::InitDefaultFontAttr( SwDoc* pDoc ) +{ + sal_uInt16 aFontWhich[] = + { + RES_CHRATR_FONT, + RES_CHRATR_CJK_FONT, + RES_CHRATR_CTL_FONT + }; + sal_uInt16 aFontHeightWhich[] = + { + RES_CHRATR_FONTSIZE, + RES_CHRATR_CJK_FONTSIZE, + RES_CHRATR_CTL_FONTSIZE + }; + sal_uInt16 aFontIds[] = + { + FONT_STANDARD, + FONT_STANDARD_CJK, + FONT_STANDARD_CTL + }; + sal_uInt16 nFontTypes[] = + { + DEFAULTFONT_LATIN_TEXT, + DEFAULTFONT_CJK_TEXT, + DEFAULTFONT_CTL_TEXT + }; + + sal_uInt16 aLangWhich[] = + { + RES_CHRATR_LANGUAGE, + RES_CHRATR_CJK_LANGUAGE, + RES_CHRATR_CTL_LANGUAGE + }; + sal_uInt16 aLangTypes[] = + { + LANGUAGE_ENGLISH_US, + LANGUAGE_ENGLISH_US, + LANGUAGE_ARABIC_SAUDI_ARABIA + }; + + SwStdFontConfig* pStdFont = SW_MOD()->GetStdFontConfig(); + SfxPrinter* pPrt = pDoc->getPrinter( false ); + String sEntry; + + for(sal_uInt8 i = 0; i < 3; i++) + { + sal_uInt16 nFontWhich = aFontWhich[i]; + sal_uInt16 nFontId = aFontIds[i]; + SvxFontItem* pFontItem = 0; + const SvxLanguageItem& rLang = (const SvxLanguageItem&)pDoc->GetDefault( aLangWhich[i] ); + LanguageType eLanguage = rLang.GetLanguage(); + if ( (eLanguage == LANGUAGE_DONTKNOW) || (eLanguage == LANGUAGE_NONE) ) + eLanguage = aLangTypes[i]; + { + if ( i == 0 ) + {//At present, just supports for the following languages: english, french and german. + LanguageType eUiLanguage = Application::GetSettings().GetUILanguage(); + switch( eUiLanguage ) + { + case LANGUAGE_ENGLISH_US: + case LANGUAGE_FRENCH: + case LANGUAGE_FRENCH_BELGIAN: + case LANGUAGE_FRENCH_CAMEROON: + case LANGUAGE_FRENCH_CANADIAN: + case LANGUAGE_FRENCH_COTE_D_IVOIRE: + case LANGUAGE_FRENCH_HAITI: + case LANGUAGE_FRENCH_LUXEMBOURG: + case LANGUAGE_FRENCH_MALI: + case LANGUAGE_FRENCH_MONACO: + case LANGUAGE_FRENCH_MOROCCO: + case LANGUAGE_FRENCH_NORTH_AFRICA: + case LANGUAGE_FRENCH_REUNION: + case LANGUAGE_FRENCH_SENEGAL: + case LANGUAGE_FRENCH_SWISS: + case LANGUAGE_FRENCH_WEST_INDIES: + case LANGUAGE_FRENCH_ZAIRE: + case LANGUAGE_GERMAN: + case LANGUAGE_GERMAN_AUSTRIAN: + case LANGUAGE_GERMAN_LIECHTENSTEIN: + case LANGUAGE_GERMAN_LUXEMBOURG: + case LANGUAGE_GERMAN_SWISS: + eLanguage = eUiLanguage; + break; + + } + } + + if ( i == 2 ) //CTL,just supports for HINDI and ARABIC_SAUDI_ARABIA + { + LanguageType eUiLanguage = Application::GetSettings().GetUILanguage(); + switch( eUiLanguage ) + { + case LANGUAGE_HINDI: + eLanguage = eUiLanguage; + break; + + } + } + + if ( i == 1 ) //CJK + { + LanguageType eUiLanguage = Application::GetSettings().GetUILanguage(); + switch( eUiLanguage ) + { + case LANGUAGE_KOREAN: + case LANGUAGE_KOREAN_JOHAB: + case LANGUAGE_CHINESE: + case LANGUAGE_CHINESE_HONGKONG: + case LANGUAGE_CHINESE_MACAU: + case LANGUAGE_CHINESE_SIMPLIFIED: + case LANGUAGE_CHINESE_SINGAPORE: + case LANGUAGE_CHINESE_TRADITIONAL: + case LANGUAGE_JAPANESE: + eLanguage = eUiLanguage; + break; + } + } + + Font aLangDefFont = OutputDevice::GetDefaultFont( + nFontTypes[i], + eLanguage, + DEFAULTFONT_FLAGS_ONLYONE ); + pFontItem = new SvxFontItem(aLangDefFont.GetFamily(), aLangDefFont.GetName(), + aEmptyStr, aLangDefFont.GetPitch(), aLangDefFont.GetCharSet(), nFontWhich); + } + + pDoc->SetDefault(*pFontItem); + delete pFontItem; + + sal_Int32 nFontHeight = pStdFont->GetFontHeight( FONT_STANDARD, i, eLanguage ); + if(nFontHeight <= 0) + nFontHeight = pStdFont->GetDefaultHeightFor( nFontId, eLanguage ); + pDoc->SetDefault(SvxFontHeightItem( nFontHeight, 100, aFontHeightWhich[i] )); + pDoc->SetDefault( SvxLanguageItem( eLanguage, aLangWhich[i] ) ); + } +} +// end + /*-------------------------------------------------------------------- Beschreibung: Ctor mit SfxCreateMode ????? --------------------------------------------------------------------*/ --- old/sw/source/ui/dochdl/swdtflvr.cxx 2011-11-28 09:53:44.000000000 +0800 +++ old/sw/source/ui/dochdl/swdtflvr.cxx 2011-11-28 10:08:22.000000000 +0800 @@ -836,7 +836,9 @@ if( pWrtShell->IsAddMode() && pWrtShell->SwCrsrShell::HasSelection() ) pWrtShell->CreateCrsr(); - SwDoc *const pTmpDoc = lcl_GetDoc(*pClpDocFac); + SwDoc *const pTmpDoc = lcl_GetDoc(*pClpDocFac); + + SwDocShell::InitDefaultFontAttr( pTmpDoc ); //#115580# added at 2011/11/28 pTmpDoc->LockExpFlds(); // nie die Felder updaten - Text so belassen pWrtShell->Copy( pTmpDoc );