summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Ivan <alexnivan@yahoo.com>2013-07-24 20:09:45 +0300
committerJan Holesovsky <kendy@collabora.com>2015-09-24 01:00:08 +0200
commitca48f0d903d4cee26434a439ab140f6c1fb63754 (patch)
tree7e13396f24aa17ffac4b30c19ba5c90250b9f54e
parenta3a5d00deb65c83df81928a19ab541df644e1744 (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 8de04d9d4a2c..fc047baab328 100644
--- a/sw/source/core/doc/tblafmt.cxx
+++ b/sw/source/core/doc/tblafmt.cxx
@@ -354,6 +354,17 @@ bool SwTableBoxFormat::Load( SvStream& rStream, const SwAfVersions& rVersions, s
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 @@ bool SwTableBoxFormat::Load( SvStream& rStream, const SwAfVersions& rVersions, s
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.nNumFormatVersion )
{
sal_uInt16 eSys, eLge;