Update ooo320-m1
[ooovba.git] / applied_patches / 0130-calc-multiline-pattern-fix.diff
blob0ae8243f36359ec925330021e21a05eceee8f2df
1 diff --git sc/source/ui/app/inputhdl.cxx sc/source/ui/app/inputhdl.cxx
2 index 7a4e452..90bd8e3 100644
3 --- sc/source/ui/app/inputhdl.cxx
4 +++ sc/source/ui/app/inputhdl.cxx
5 @@ -2108,13 +2108,27 @@ void ScInputHandler::EnterHandler( BYTE nBlockMode )
6 USHORT nParCnt = pEngine->GetParagraphCount();
7 if ( nParCnt == 0 )
8 nParCnt = 1;
10 + bool bUniformAttribs = true;
11 + SfxItemSet aPara1Attribs = pEngine->GetAttribs(0, 0, pEngine->GetTextLen(0));
12 + for (USHORT nPara = 1; nPara < nParCnt; ++nPara)
13 + {
14 + SfxItemSet aPara2Attribs = pEngine->GetAttribs(nPara, 0, pEngine->GetTextLen(nPara));
15 + if (!(aPara1Attribs == aPara2Attribs))
16 + {
17 + // paragraph format different from that of the 1st paragraph.
18 + bUniformAttribs = false;
19 + break;
20 + }
21 + }
23 ESelection aSel( 0, 0, nParCnt-1, pEngine->GetTextLen(nParCnt-1) );
24 SfxItemSet aOldAttribs = pEngine->GetAttribs( aSel );
25 const SfxPoolItem* pItem = NULL;
27 // find common (cell) attributes before RemoveAdjust
29 - if ( pActiveViewSh )
30 + if ( pActiveViewSh && bUniformAttribs )
32 SfxItemSet* pCommonAttrs = NULL;
33 for (USHORT nId = EE_CHAR_START; nId <= EE_CHAR_END; nId++)