summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel Power <noel.power@suse.com>2013-06-05 16:08:36 +0100
committerNoel Power <noel.power@suse.com>2013-06-06 14:59:22 +0100
commite8321a374366cf348b6e3731bccf4a716b5ae390 (patch)
tree92325c3055a9ba2e94d24cffe8014d8f6408eec3 /sc
parent516ed22b3f51982df7dbfa875ce8056e167da091 (diff)
Revert "follow patch for fdo#38385 attempt to detect rtl"
Diffstat (limited to 'sc')
-rw-r--r--sc/source/filter/inc/stylesbuffer.hxx4
-rw-r--r--sc/source/filter/oox/stylesbuffer.cxx41
2 files changed, 6 insertions, 39 deletions
diff --git a/sc/source/filter/inc/stylesbuffer.hxx b/sc/source/filter/inc/stylesbuffer.hxx
index 7108a4977f9c..16d577999d3f 100644
--- a/sc/source/filter/inc/stylesbuffer.hxx
+++ b/sc/source/filter/inc/stylesbuffer.hxx
@@ -458,9 +458,7 @@ struct BorderLineModel
/** Contains XML attributes of a complete cell border. */
struct BorderModel
{
- BorderLineModel maStart; /// Start line format.
BorderLineModel maLeft; /// Left line format.
- BorderLineModel maEnd; /// End line format.
BorderLineModel maRight; /// Right line format.
BorderLineModel maTop; /// Top line format.
BorderLineModel maBottom; /// Bottom line format.
@@ -515,7 +513,7 @@ public:
void importDxfBorder( sal_Int32 nElement, SequenceInputStream& rStrm );
/** Final processing after import of all style settings. */
- void finalizeImport( bool bRTL );
+ void finalizeImport();
/** Returns the border model structure. */
inline const BorderModel& getModel() const { return maModel; }
diff --git a/sc/source/filter/oox/stylesbuffer.cxx b/sc/source/filter/oox/stylesbuffer.cxx
index 62f4bc89b2f1..6413a168c2df 100644
--- a/sc/source/filter/oox/stylesbuffer.cxx
+++ b/sc/source/filter/oox/stylesbuffer.cxx
@@ -1575,9 +1575,7 @@ void BorderLineModel::setBiffStyle( sal_Int32 nLineStyle )
// ----------------------------------------------------------------------------
BorderModel::BorderModel( bool bDxf ) :
- maStart( bDxf ),
maLeft( bDxf ),
- maEnd( bDxf ),
maRight( bDxf ),
maTop( bDxf ),
maBottom( bDxf ),
@@ -1703,26 +1701,8 @@ void Border::importDxfBorder( sal_Int32 nElement, SequenceInputStream& rStrm )
}
}
-void Border::finalizeImport( bool bRTL )
+void Border::finalizeImport()
{
- // Swap left/right <-> start/end borders based on RTL
- if ( maModel.maStart.mbUsed || maModel.maEnd.mbUsed )
- {
- if ( bRTL )
- {
- if ( maModel.maStart.mbUsed )
- maModel.maRight = maModel.maStart;
- if ( maModel.maEnd.mbUsed )
- maModel.maLeft = maModel.maEnd;
- }
- else
- {
- if ( maModel.maStart.mbUsed )
- maModel.maLeft = maModel.maStart;
- if ( maModel.maEnd.mbUsed )
- maModel.maRight = maModel.maEnd;
- }
- }
maApiData.mbBorderUsed = maModel.maLeft.mbUsed || maModel.maRight.mbUsed || maModel.maTop.mbUsed || maModel.maBottom.mbUsed;
maApiData.mbDiagUsed = maModel.maDiagonal.mbUsed;
@@ -1818,9 +1798,9 @@ BorderLineModel* Border::getBorderLine( sal_Int32 nElement )
switch( nElement )
{
case XLS_TOKEN( left ): return &maModel.maLeft;
- case XLS_TOKEN( start ): return &maModel.maStart;
+ case XLS_TOKEN( start ): return &maModel.maLeft;
case XLS_TOKEN( right ): return &maModel.maRight;
- case XLS_TOKEN( end ): return &maModel.maEnd;
+ case XLS_TOKEN( end ): return &maModel.maRight;
case XLS_TOKEN( top ): return &maModel.maTop;
case XLS_TOKEN( bottom ): return &maModel.maBottom;
case XLS_TOKEN( diagonal ): return &maModel.maDiagonal;
@@ -2599,22 +2579,13 @@ void Dxf::finalizeImport()
{
if( mxFont.get() )
mxFont->finalizeImport();
- bool bRTL = false;
// number format already finalized by the number formats buffer
if( mxAlignment.get() )
- {
mxAlignment->finalizeImport();
- // how do we detect RTL when text dir is OOX_XF_CONTEXT? ( seems you
- // would need access to the cell content, which we don't here )
- if ( mxAlignment->getModel().mnTextDir == OOX_XF_TEXTDIR_RTL )
- bRTL = true;
- }
if( mxProtection.get() )
mxProtection->finalizeImport();
if( mxBorder.get() )
- {
- mxBorder->finalizeImport( bRTL );
- }
+ mxBorder->finalizeImport();
if( mxFill.get() )
mxFill->finalizeImport();
}
@@ -3139,9 +3110,7 @@ void StylesBuffer::finalizeImport()
// number formats
maNumFmts.finalizeImport();
// borders and fills
- // is there a document wide RTL setting that we
- // would/could need to pass to finalizeImport here ?
- maBorders.forEachMem( &Border::finalizeImport, false );
+ maBorders.forEachMem( &Border::finalizeImport );
maFills.forEachMem( &Fill::finalizeImport );
// style XFs and cell XFs
maStyleXfs.forEachMem( &Xf::finalizeImport );