View | Details | Raw Unified | Return to issue 37905
Collapse All | Expand All

(-)sc/source/filter/excel/excel.cxx (-4 / +60 lines)
Line 7 Link Here
7
 *  $Revision: 1.24 $
7
 *  $Revision: 1.1 $
8
--
Line 9 Link Here
9
 *  last change: $Author: kz $ $Date: 2006/07/21 11:47:43 $
9
 *  last change: $Author: ooo $ $Date: 2006/11/02 12:10:17 $
10
--
Line 85 Link Here
85
#ifndef _SVX_FRMDIRITEM_HXX
86
#include <svx/frmdiritem.hxx>
87
#endif
88
89
#ifndef _SVX_ALGITEM_HXX
90
#include <svx/algitem.hxx>
91
#endif
92
93
#ifndef SC_CELL_HXX
94
#include "cell.hxx"
95
#endif
Line 194 Link Here
205
		for( const ScAddress* pAddr = xFilter->CellIDList.First(); pAddr; pAddr = xFilter->CellIDList.Next() )
206
		{
207
208
			ScBaseCell*	pCell =	pDocument->GetCell( *pAddr );
209
			if (pCell->HasStringData())
210
			{
211
				// For i37905:
212
				int nLen = pCell->GetStringData().Len();
213
				#define IS_HEBREW(x) (x >= 0x590) && (x <= 0x5FF)
214
				#define IS_LATIN(x) (((x >= 'A') && (x <= 'Z')) || ((x >= 'a') && (x <= 'z')))
215
216
				const sal_Unicode *p = pCell->GetStringData().GetBuffer(); 
217
				BOOL bHasLatin = FALSE;
218
				BOOL bHasHebrew = FALSE;
219
				BOOL bFirstCharHebrew = IS_HEBREW(*p);
220
				for (int i = 0; (i < nLen); i++)
221
				{
222
					p++;
223
					if (IS_HEBREW(*p))	bHasHebrew = TRUE;
224
					if (IS_LATIN(*p))	bHasLatin = TRUE;
225
				}
226
227
				// Get cell's writing direction
228
				const SvxFrameDirectionItem* pItem = static_cast< const SvxFrameDirectionItem* >(
229
					pDocument->GetAttr( pAddr->Col(), pAddr->Row(), pAddr->Tab(), ATTR_WRITINGDIR ) );
230
				SvxFrameDirection eCellDir = (SvxFrameDirection)pItem->GetValue();
231
232
				// Get cell's alignment
233
				const SvxHorJustifyItem* pHorJustItem = static_cast< const SvxHorJustifyItem* >(
234
					pDocument->GetAttr( pAddr->Col(), pAddr->Row(), pAddr->Tab(), ATTR_HOR_JUSTIFY ) );
235
				SvxCellHorJustify eHorJust = (SvxCellHorJustify)pHorJustItem->GetValue();
236
						
237
				if (bFirstCharHebrew && (eHorJust == SVX_HOR_JUSTIFY_STANDARD))
238
							pDocument->ApplyAttr( pAddr->Col(), pAddr->Row(), pAddr->Tab(),
239
								SvxHorJustifyItem( SVX_HOR_JUSTIFY_RIGHT, ATTR_HOR_JUSTIFY ) ); 
240
241
				else if (bFirstCharHebrew && (eHorJust == SVX_HOR_JUSTIFY_RIGHT) && (eCellDir == FRMDIR_ENVIRONMENT))
242
								pDocument->ApplyAttr( pAddr->Col(), pAddr->Row(), pAddr->Tab(),
243
									SvxFrameDirectionItem( FRMDIR_HORI_RIGHT_TOP, ATTR_WRITINGDIR ) ); 
244
245
				else if (bHasHebrew && (eCellDir == FRMDIR_ENVIRONMENT))
246
							pDocument->ApplyAttr( pAddr->Col(), pAddr->Row(), pAddr->Tab(),
247
								SvxFrameDirectionItem( FRMDIR_HORI_LEFT_TOP, ATTR_WRITINGDIR ) ); 
248
			}
249
		}
250
Line 196 Link Here
253
(-)sc/source/filter/excel/excimp8.cxx (-9 / +11 lines)
Line 7 Link Here
7
 *  $Revision: 1.114 $
7
 *  $Revision: 1.1 $
8
--
Line 9 Link Here
9
 *  last change: $Author: rt $ $Date: 2006/07/25 09:56:55 $
9
 *  last change: $Author: ooo $ $Date: 2006/11/02 12:10:17 $
10
--
Line 69 Link Here
69
#include <svx/algitem.hxx>
Lines 286-289 Link Here
286
        GetXFRangeBuffer().SetXF( aScPos, nXF );
287
        	GetXFRangeBuffer().SetXF( aScPos, nXF );
287
        pColRowBuff->Used( aScPos );
288
        	pColRowBuff->Used( aScPos );
288
        if( ScBaseCell* pCell = GetSst().CreateCell( nSst, nXF ) )
289
        	if( ScBaseCell* pCell = GetSst().CreateCell( nSst, nXF ) )
289
            GetDoc().PutCell( aScPos.Col(), aScPos.Row(), aScPos.Tab(), pCell );
290
		{
290
--
291
			GetDoc().PutCell( aScPos.Col(), aScPos.Row(), aScPos.Tab(), pCell );
292
			ScAddress* aScPosCopy = new ScAddress(aScPos);
293
			CellIDList.Append( aScPosCopy );
294
		}
(-)sc/source/filter/inc/imp_op.hxx (-5 / +6 lines)
Line 7 Link Here
7
 *  $Revision: 1.38 $
7
 *  $Revision: 1.1 $
8
--
Line 9 Link Here
9
 *  last change: $Author: rt $ $Date: 2006/07/25 09:59:12 $
9
 *  last change: $Author: ooo $ $Date: 2006/11/02 15:46:46 $
10
--
Line 73 Link Here
73
Line 88 Link Here
87
typedef ScfDelList< ScAddress >     XclBaseScAddressList;
88
Line 274 Link Here
275
276
	XclBaseScAddressList	CellIDList;

Return to issue 37905