summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Ivan <alexnivan@yahoo.com>2013-07-24 20:09:45 +0300
committerAlex Ivan <alexnivan@yahoo.com>2013-07-24 20:09:45 +0300
commit4887943a2c33475640d1dfed7c2d249e463f714f (patch)
tree13355177c7551391546da16230f1ddfbdbbbd9e8
parenteccd75596b8e8c1993be94151593b598a1031928 (diff)
Fix table styles not loading
Some unused properties were no longer loaded and that messed up the styles, breaking the first and not loading the others. Information about font is not loaded properly and selecting one of the styles for a table causes an error. Things will most likely be changed again since the targeted ideal is to create the styles with the document. Change-Id: I17a2c2c2f4eff36265489f725a83a4317b27339e
-rw-r--r--sw/source/core/doc/tblafmt.cxx43
1 files changed, 43 insertions, 0 deletions
diff --git a/sw/source/core/doc/tblafmt.cxx b/sw/source/core/doc/tblafmt.cxx
index 7a09fa167c7f..3792f1b257f4 100644
--- a/sw/source/core/doc/tblafmt.cxx
+++ b/sw/source/core/doc/tblafmt.cxx
@@ -354,6 +354,17 @@ sal_Bool SwTableBoxFmt::Load( SvStream& rStream, const SwAfVersions& rVersions,
READ( aBox, SvxBoxItem, rVersions.nBoxVersion )
SetBox( aBox );
+ // Unused, but needed to be loaded to not mess the other styles
+ if( nVer >= AUTOFORMAT_DATA_ID_680DR14 )
+ {
+ SvxLineItem aTLBR( 0 );
+ READ( aTLBR, SvxLineItem, rVersions.nLineVersion)
+
+ SvxLineItem aBLTR( 0 );
+ READ( aBLTR, SvxLineItem, rVersions.nLineVersion)
+ }
+ // <- close
+
SvxBrushItem aBackground = SvxBrushItem( RES_BACKGROUND );
READ( aBackground, SvxBrushItem, rVersions.nBrushVersion )
SetBackground( aBackground );
@@ -374,6 +385,38 @@ sal_Bool SwTableBoxFmt::Load( SvStream& rStream, const SwAfVersions& rVersions,
SetVerticalAlignment( aVerticalAlignment );
}
+ // Unused, but needed to be loaded to not mess the other styles
+ SvxHorJustifyItem aHorJustify( SVX_HOR_JUSTIFY_STANDARD, 0 );
+ READ( aHorJustify, SvxHorJustifyItem, rVersions.nHorJustifyVersion )
+
+ SvxVerJustifyItem aVerJustify( SVX_VER_JUSTIFY_STANDARD, 0 );
+ READ( aVerJustify, SvxVerJustifyItem, rVersions.nVerJustifyVersion )
+
+ SvxOrientationItem aOrientation( SVX_ORIENTATION_STANDARD, 0 );
+ READ( aOrientation, SvxOrientationItem, rVersions.nOrientationVersion )
+
+ SvxMarginItem aMargin( 0 );
+ READ( aMargin, SvxMarginItem, rVersions.nMarginVersion )
+
+ SfxBoolItem aLinebreak( 0 );
+ pNew = aLinebreak.Create(rStream, rVersions.nBoolVersion );
+ aLinebreak.SetValue( ((SfxBoolItem*)pNew)->GetValue() );
+ delete pNew;
+
+ if ( nVer >= AUTOFORMAT_DATA_ID_504 )
+ {
+ SfxInt32Item aRotateAngle( 0 );
+ pNew = aRotateAngle.Create( rStream, rVersions.nInt32Version );
+ aRotateAngle.SetValue( ((SfxInt32Item*)pNew)->GetValue() );
+ delete pNew;
+
+ SvxRotateModeItem aRotateMode( SVX_ROTATE_MODE_STANDARD, 0 );
+ pNew = aRotateMode.Create( rStream, rVersions.nRotateModeVersion );
+ aRotateMode.SetValue( ((SvxRotateModeItem*)pNew)->GetValue() );
+ delete pNew;
+ }
+ // <- close
+
if( 0 == rVersions.nNumFmtVersion )
{
sal_uInt16 eSys, eLge;