AgeCommit message (Collapse)AuthorFilesLines
2015-09-28Don't merge this branch, a less intrusive approach was pushed to master.feature/table-styleJan Holesovsky0-0/+0
Commit ac6f8bc92b1abe995694602f43d8ad108b7030fb was inspired by the work done in this branch, but used a less intrusive & safer approach. This branch is still kept in the repo for historical reasons, but probably can be removed soon. Change-Id: I75ced30052b60d26d38d81a3aeb296a9dcd690c1
2013-09-16Remove SwTableAutoFmt from implementationAlex Ivan27-645/+299
Remove the aforementioned class from the implementation, replacing it completely with SwTableFmt. May require further testing, but there seems to be no loss in functionality. Some of the functions of the AutoFormat dialog do not work completely, but the dialog needs to be modified alltogheter, so it is not a major issue. Also, saving/loading tables with styles applied does not work, but it will be remedied with the implementation of the the styles import/ export using the filters. Change-Id: I985655344ec88ecc33dae1d15e112d7e2302c700
2013-09-12Remove obsolete UpdateTo/FromSet methodsAlex Ivan2-158/+0
These should have been removed some time ago, since they were not used any more. Seems they somehow escaped. Change-Id: I958de698f96a6c48e4cb41dc5226f96134d2886b
2013-09-12Remove boolean members from SwTableAutoFmtAlex Ivan3-55/+14
Remove members made obsolete by previous patch. As a side-effect, the checkboxes in the AutoFormat dialog which selected what properties from the style to apply no longer have any effect. Should not be a problem, since the dialog will have to be reworked anyway. Change-Id: Ib5f19808ca90187007f13c1c8c65e003fe6c715f
2013-09-12Use items in attrset to determine properties stored in table styleAlex Ivan3-6/+110
Replace the current bool methods of SwTableAutoFmt with methods that check whether specific items are in the SwTableFmt's attrset or in one of the cells attrset. Change-Id: I5088cb933ca9e619bfebeb0180f8fd4667bb7744
2013-09-07Fix SwAttrHandler::Init to take parent attribute set into accountAlex Ivan1-15/+5
The new implementation might not be as efficient as the previous, but the functionality is preserved. The change allows the correct text properties from the table style to be taken into consideration. Change-Id: Icf1460a40baa0c10c6234b05113b1c75848cb4da
2013-08-29Reapply table style after merging tablesAlex Ivan1-0/+5
The undo part was inadvertedly already fixed since it used the same mechanics as some of the previously fixed undo actions. Change-Id: I75380513945a6b84fa8f18ab77c756b4e8c358c1
2013-08-29Reapply table style after spliting table and undoAlex Ivan2-0/+9
Change-Id: I32fea8b4679809070a47368de65d57ce5df7ed9d
2013-08-29Reapply table styles after merging/spliting cells and corresponding undosAlex Ivan2-0/+9
Change-Id: I0a0f1cd1ec05487230af568ab3350de04d98bfb6
2013-08-28Fix copy-pasting table with no table styleAlex Ivan1-2/+2
Change-Id: I11eee9b3a7762dd2500129994e4da61b5b149520
2013-08-28Replace String with OUString in table style undoAlex Ivan1-2/+2
Change-Id: Ibc66d8ea44ac294832cf7c937d7e03fba4ad635b
2013-08-28Apply table style copying from writer to writerAlex Ivan2-2/+15
After the table is copied to the new doc, we search for a style with the same name in this doc, and, if one exists, we apply that one, else, we apply the one from the clipboard. Change-Id: I8e3b6b15efa9d7a267cb48223a6f0d62dde46d6f
2013-08-27Load predifined table styles at document creationAlex Ivan4-9/+12
Until now, the styles were loaded and deleted every time the AutoFormat dialog was opened/closed. Now, they are loaded once at document creation, and unloaded when in the document dtor. Change-Id: I7cc8cfa38c7c8c196e303e542736e937ac0023a8
2013-08-23Add some more security to format parent assigningAlex Ivan1-0/+3
Change-Id: I3f250f88ae68d6604bb4da0e9ae78ccefabf96e9
2013-08-22Proper undo for row/column insertion/deletionAlex Ivan1-0/+8
Change-Id: If0de2939334ecf10d96e26d5a5c3d99dfa3deba2
2013-08-22Reapply table style after row/column deletionAlex Ivan1-0/+7
Change-Id: I24c851a2d1674aec96ca7577dfc92302e226fe4e
2013-08-22Reapply table style after inserting rowsAlex Ivan1-0/+2
Change-Id: I56cc24f80a3812f9a04fcb639cc38eaa628fc95e
2013-08-22Adjust format parent assigningAlex Ivan2-9/+9
Modify format parent assigning mechanism so that the format is claimed when assigning the parent, if it has other dependencies, instead of attempting to have each element created with its own Sw*Fmt on insertion. Change-Id: I569b2a865d41fa6da57e0a0cb090a0fbccddb13c
2013-08-22Reapply table style after inserting columnsAlex Ivan1-0/+2
Change-Id: If0550caf8d020623654eda05efc20d382f050275
2013-08-21Undo Table Style cleanupAlex Ivan1-1/+0
Change-Id: I7f14ce2bd51a4c07e258d9b1aef425cf186414d1
2013-08-13Parent assigning cleanupAlex Ivan1-1/+1
Another place where I had previously not modified to the correct function. Change-Id: I1a2d024fcacf9d1de6eb8f5c3cd2e70bcd1771a9
2013-08-13Fix borders update with table style applicationAlex Ivan1-0/+10
Change-Id: I9d794d96f3542bd3597ab38586df58edff62a16d
2013-08-12Fix undo resize table causing lose of table styleAlex Ivan1-0/+15
_SaveTable class now memorizes the name of the table style applied to the table and it is reapplied after undoing. Not the most elegant solution, but given how the _Save* classes currently store data on the table, this solution avoids modifying too much and possibly breaking other things. Change-Id: I5c2afb0cdd5eb447f548249e9afa1dd6d648e3a9
2013-08-12Store table style in Undo by nameAlex Ivan4-8/+24
Undo object no longer stores a pointer to the style, but rather the name of the respective table style. Change-Id: I1f6f196569d33353a9075489d136df9e5075d36b
2013-08-09Fix undo for applying table styleAlex Ivan3-13/+4
Undo now works for applying a new table style. There is an issue where other undo commands i.e. resizing a cell will undo the table style, probably due to not setting the parents correctly. Change-Id: Ia7955e6303be57ec9ea10bd61a355a888818c420
2013-08-09Fix borders on Text to table methodAlex Ivan1-12/+13
Default borders no longer mask the ones from the table style if borders checkbox is checked in Text to Table dialog and an autoformat is selected. In other words, it bypasses the state of said checkbox. May instead want to default its state to unchecked in order to be clearer to the user. Also, there is a strange crash on the undo operation. (Somehow, a pointer ends up pointing to 0x99..9) Change-Id: I4fe5ebec5ea2470d6b27869f043b5110d5fc0c3a
2013-08-07Correct previously skipped function in parent assigning cleanupAlex Ivan1-1/+1
Change-Id: I12edb436caabd1f74943e77da69b03e17f56f196
2013-08-07Partially fix properties updateAlex Ivan2-0/+10
Invalidating and setting complete paint for the SwTabFrms of the table causes immediate update of the properties, with the exception of the borders. Font properties yet to be fixed. Change-Id: Ie28a2f802ed9a2ad7f7d04ed283ea308b82e5b02
2013-08-05Fix column width in TextToTableAlex Ivan1-4/+1
Change-Id: Ibe6321e5c79a7b1081087b0ae7d24a22ca676c4c
2013-08-05Fix borders on insert tableAlex Ivan1-2/+2
Checking borders in Insert Table dialog will no longer prevent the borders of the table style from being correctly displayed. Change-Id: Ie9fd2ca19e7ba6355e2de6b9f8d7c954ca3a9c76
2013-08-05Some cleanup of the parent assigningAlex Ivan2-14/+25
Change-Id: If7b0e0a06e6ffa3a1739be1422548ff0c6460b4f
2013-08-02Remove default attribute values from Sw*FmtAlex Ivan1-80/+2
These values, because they were being set in the Sw*Fmts from the hard format, were "blocking" the attributes from the table style. All atributes are not yet correctly propagated. Also, the changes are not instant. There needs to be some other interaction with the document before they come into effect. Change-Id: I0c9775c5e988862d67067ac3bc9869851d85945b
2013-08-02Set coresponding parent to attribute setAlex Ivan2-1/+29
Changing style on a table now also changes the parent of the attribute set of the format of each element. Change-Id: I6bdc69bfe385932690851a18a47901e77e57bbec
2013-08-01Register SwFmts to correct parents for each element of tableAlex Ivan3-12/+111
Insert table, text to table and set autoformat methods now set the parent of each SwFmt to the correct element in the table style. For more complex tables, i.e. boxes contain other lines and so on, the parents for these are set to the same as the line/box in which they are found. Change-Id: I24bc35323414bc8bdceda610da7ba53da043f09b
2013-07-30Fix missing font attributes in AutoFormat windowAlex Ivan1-0/+1
The attribute range associated with the SwTableBoxFmt did not include the necessary ids for character attributes, and as a result, these were not stored and not used correctly. The solution should not have any side-effects, but, to be sure there should be further testing of other features where this range came into use. Change-Id: I8cb1ac881b2746ae3ec7958a958167de6f140a7f
2013-07-29Temporary disable of AutoFormat save mechanismAlex Ivan1-2/+0
Temporarily disabled saving any modification to the existing table format file upon closing the AutoFormat window. Most likely, further modifications will be made to this once it is clear how the table styles will be stored. Change-Id: I894d10003876044ba0b08c462fc0b6622bbb2595
2013-07-29Fix resizing of AutoFormat window crashingAlex Ivan1-2/+2
An incorrect modification of the pointer to the currently selected style caused a crash if a resize of the respective window was attempted. Change-Id: Ibb66f1256268820db5440871c30a9697a0634f87
2013-07-29Fix RepeatHeading storage in SwTableFmtAlex Ivan1-1/+6
Fixed an issue where improper storage of the RepeatHeading value in SwTableFmt would cause a crash upon attempting to retrieve the value. Change-Id: I655d4f1f9760bc9e95c53c8fe292ea761e25fefd
2013-07-26Further changes on separating hard formatting from styleAlex Ivan5-47/+30
Changes have been made to better distinguish table style from the table's hard format. These concern setting the table style on a certain table and the associated Undo/Redo operation. Some errors still need to be sorted out. Change-Id: Id7593616b89234301fb33352d46a83aca7c3ac90
2013-07-25Fix missing name for Default Style in AutoFormat dialogAlex Ivan1-1/+1
Fixed the missing name for the default style in the AutoFormat dialog. The String argument of SwStyleNameMapper::GetUIName is not modified in the method, so the actual return value needs to be used to get the desired result. Change-Id: I29b29c11343920dc69a5bc104f65536a26e17d67
2013-07-24Fix table styles not loadingAlex Ivan1-0/+43
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
2013-07-24Added some properties back into hard formatAlex Ivan1-19/+90
In ligth of recent changes, some of the properties that had been previously removed were now added back into the hard format. Change-Id: I4b25cc8415a19e84d9391f59a132b63d38a55188
2013-07-23More protection for pCurData: NULL means default, not much to do thenC├ędric Bosdonnat1-27/+36
Change-Id: Ied3a04a7b7be4f4f7b6174e3d6d2a6e53848afd0
2013-07-23Fix hard format/table style separation issueAlex Ivan1-14/+7
Fixed the failed unit test brought by the previous patch which attempted to correctly separate the hard format from the table style in table insertion and text to table methods. Change-Id: I5eb7ddf074c8c8aaf2b2ec58aa7a94db8792a309
2013-07-21Separated hardformatting/styles in table insertionAlex Ivan1-2/+2
Had previously overlooked where the table style information was stored when inserting a new table into the document. Change-Id: I8b285951c76fabe9b3b24006bba8592a3a6e5364
2013-07-18Modify undo mechanism for applying table formatAlex Ivan2-40/+11
Undo object no longer reconstructs table, but changes the table style back to the original. The actual modification _should_ become visible once the proper modifications to the rendering of the table are done. Change-Id: Ife10f52077c9b13d5cf4f44fa1194fe414661cd1
2013-07-18Table style stored separately from hard formatAlex Ivan1-2/+2
Store/RestoreTableProperties methods used in Set/GetTableAutoFmt now save/apply properties to/from the table's GetRegisteredIn's GetRegisteredIn, thus separating the table style from the actual hard format of the current table. Change-Id: Iac3b73ad4388a9d73446c24d2fb50d96b7d1c380
2013-07-15Removed no longer used helper functionsAlex Ivan1-83/+0
lcl_SetAFmtBox/Line helper functions and structure _SetAFmtTabPara have been removed since they are no longer used because table styles are now stored in order to get the relevant properties at render time. Change-Id: I8a6824d30f9cfd997ac29b94638cdc37400f7976
2013-07-15Table style applied at table levelAlex Ivan1-95/+2
SetTableAutoFmt method has been modified to store the style at table level rather than apply it to the range of selected cells. Similarly, the GetTableAutoFmt does not create a set of properties from the selected range, but uses the info stored at table level. Change-Id: Iacfc6bd38d4f952255358d540edc696f47449baa
2013-07-13Modify InsertTable and TableToText methodsAlex Ivan1-197/+32
The mentioned methods have been modified in order to use the table style provided as parameter, if present, and the default frame format if not. Furthermore, the style is just assigned to the table, rather than applying the properties immediately. Currently, the style is not applied, but it will be at render time once the neccesary modifications are made. Change-Id: I982ad0539da27e87f3d7443e6a9756503d83be27