summaryrefslogtreecommitdiff
path: root/sw/inc/doc.hxx
AgeCommit message (Collapse)AuthorFilesLines
2015-01-07fdo#75757 remove inheritance to std::vectorMichaël Lefèvre1-12/+6
Conflicts: sw/source/core/doc/docnew.cxx Change-Id: I4ba20e689b77e75bea75e5a60f50ff40577183e8
2015-01-03boost::unordered_map->std::unordered_mapCaolán McNamara1-5/+5
Change-Id: I2c65709cda6f10810452dfb8aa1a247cb3a5564f
2014-12-25sal_uInt16 to size_tMatteo Casalin1-2/+2
Change-Id: I66239d89049f1386e5725e540c4dcc2b09c3ebf0
2014-12-25sal_uInt16 to size_tMatteo Casalin1-2/+2
Change-Id: I5b63396fba55b717f35aee5718dd348a9d795786
2014-12-09changed some timer to idleTobias Madl1-1/+1
Change-Id: Ibd3a4f66cec6fde4fadc064f27ac44901d005b15
2014-11-25Revert "loplugin: cstylecast"Tor Lillqvist1-2/+2
The change was broken. Luckily MSVC noticed: sw\inc\doc.hxx(1707) : warning C4717: 'SwDoc::GetNumberFormatter' : recursive on all control paths, function will cause runtime stack overflow. This reverts commit 7ca3303aaadd20dcc1d6e08bdeba38021cbec4bb.
2014-11-25loplugin: cstylecastNoel Grandin1-2/+2
Change-Id: Idc6c34d8b3cfab35c7dc841a9ff70c218e0282df
2014-11-19move docfunc to own headerBjoern Michaelsen1-42/+0
Change-Id: I5e1c66e09418e534bb47233f45c67206af20cab4
2014-11-16Remove sal_True/sal_False from code and comments in sw includesMatteo Casalin1-12/+12
Change-Id: Icfbbae898749196e27199802ec728417d5205bc5
2014-11-12Fix common typos. No automatic tools. Handmade…Andrea Gelmini1-1/+1
Change-Id: I1ab4e23b0539f8d39974787f226e57a21f96e959 Reviewed-on: https://gerrit.libreoffice.org/12164 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-11-12loplugin: cstylecastNoel Grandin1-1/+2
Change-Id: Ica3b54a7c331f0179294e2b52aadd884f53d53dc
2014-11-10loplugin: cstylecastNoel Grandin1-2/+4
Change-Id: If7ada4cba0b1098bba304f1ec9b860ec7df75e7a
2014-11-10loplugin: cstylecastNoel Grandin1-2/+2
Change-Id: Ie57f543681790e662f6ac7d074ccb37925999790
2014-11-09faster mapping from nodes to SwFrmFmt's anchored at themLuboš Luňák1-0/+5
The SwFrmFmtAnchorMap class provides reverse mapping to SwFrmFmt::GetAnchor().GetCntntAnchor(), so that when code somewhere needs to update SwFrmFmt's anchored at a position, it's not necessary to iterate over all of them (which can be a large number e.g. with mail merge). One special catch with the multimap of SwNodeIndex keys is that the values of those keys change (whenever the node structure of the document changes, indexes of nodes change as a result). This makes it impossible to use any hashing container, as the hashes would change without the container noticing, but multimap should work fine, as it just requires that the keys remain sorted, and that is the case. Nevertheless, the old code in the two converted places is intentionally left there in debug mode to verify the reverse mapping is updated correctly. I intentionally went with SwNodeIndex rather than SwPosition, as SwIndex (the other component of SwPosition) was causing some trouble (see e.g. the SwPosition comparison operator< , where two same positions are different if one is registered and the other not) and it doesn't appear to be actually necessary. Change-Id: I7f1768558f60155d4ba83c84aa7f9e34dc65ebf9
2014-11-06compute page offset for mailmerge based on source document rather than targetLuboš Luňák1-1/+1
This removes another need for doing repeated and expensive layouts of the target document. Change-Id: Id78bc3ccc71c17e42f858dc9660866b9c94dea3a
2014-11-06use bookmarks to mark mailmerge parts in a mailmerge document (fdo#80823)Luboš Luňák1-1/+1
Instead of page numbers, which - was somewhat fragile (and broken, as it was actually off-by-one) - required repeated re-layout of the increasingly large document, making mailmerge awfully slow. The re-layout is not removed by this commit, as it needs further checking whether it can be removed. See the bugreport for details. Change-Id: Ib09bd5f5a6a549c3d38ca40b0f32c0d2831fdd4c
2014-10-31SwDBManager::MergeMailFiles: set unique fly names at the end of the mergeMiklos Vajna1-0/+4
When generating a unique fly name, we have to iterate over all the existing flys to find out what's the first not used one, so doing this for every new fly inserted by mail merge is O(n^2). During import, we already skip this and only do it once at the end of the import, which is O(n). Fix the performance problem by skipping the unique fly name generating when we produce a combined mail merge document as well, and just generate them once the mail merge is complete. For a test document having 12 text frames and 2000 mail merge records, the times for css::text::MailMerge::execute() is 9m37.330s -> 8m18.811s. Change-Id: Idfa8e9fe3acc93f1138f5bb12c2419c1492f8ff1
2014-10-22callcatcher: update unused codeCaolán McNamara1-3/+0
Change-Id: I96b4d44e44389245f3ccc4a08198676461c6a38b
2014-10-18SwDoc: remove unused methodsMiklos Vajna1-4/+0
Change-Id: I073372b74d0362eaffdc1dddfbef8767e58b0fd6
2014-10-12Typo: compatability->compatibilityJulien Nabet1-2/+2
Change-Id: If0b98a30452a9d1fcc340173deb6856755926471
2014-10-09copy document defaults/properties for separate mailmerge result filesLuboš Luňák1-1/+1
Also remove code duplication (that I'm not even sure why it's there). Change-Id: I9a20fe0de9b34adbd03155712869bb19f5969f9b
2014-10-01sw: std::auto_ptr -> std::unique_ptrStephan Bergmann1-1/+1
Change-Id: I60ac3706b9be335c31039ed0997cb8215808ddaa
2014-10-01Constify dumpAsXml and friendsJan-Marek Glogowski1-1/+1
All these dump functions should never change the dumped objects so 'const' all of them. Change-Id: Id83422e3950a73e48feb4708fbd4c251506997e0
2014-09-24fdo#81782 MM: copy most document propertiesJan-Marek Glogowski1-1/+16
Mail merge wasn't copying the document properties into the target document. It also has to copy most document properties into the working copy, as ConvertFieldsToText is called just there. Change-Id: I7e07fec712c225f667d960a94f4eb3fd0b83f041 Reviewed-on: https://gerrit.libreoffice.org/10987 Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com> Tested-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2014-09-17Remove unnecessary includeKrisztian Pinter1-1/+0
Change-Id: I46c7af376aacb824a0d4298674423cc227b592f3
2014-09-17Add writer document font colors to color palettesKrisztian Pinter1-0/+3
Change-Id: If3fedc45586eee068c40e92da87d5d550a456a64
2014-09-12sw: rename SwDoc::Append to something uniqueMichael Stahl1-1/+1
Change-Id: Ibb9db5ecdea6439df20fc1ee609267dcdd864405
2014-09-10MM: introduce SwDoc::Append helper functionJan-Marek Glogowski1-1/+3
This drops all the specialized, workaround code from MM, introduced to use the SwFEShell::Paste function and additionally merges and renames SwDoc::Paste into SwDoc::Append. There is still a little common codepath, therefore this adds comments to always update both functions. Change-Id: I704b3ef3257dd977dac95e16e25049ff8ade97ed Reviewed-on: https://gerrit.libreoffice.org/10967 Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com> Tested-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2014-08-23fdo#82577: Handle KeyCodeTor Lillqvist1-1/+0
Put the VCL KeyCode class in the vcl namespace. Avoids clash with the X11 KeyCode typedef. Change-Id: I624c9d937f7c5f5986d313b6c5f060bd8bb7e028
2014-08-20i#107771: sw: burn, UnoCallBack, burn!Michael Stahl1-4/+0
Change-Id: Ifdb6d4b2e404bd160e6fcec3229691e750bdf698
2014-08-19Refactored SwDoc::GetEditShell .Valentin Kettner1-4/+5
Removed its output paramater as GetCurrentViewShell should be used instead and added a const version. Change-Id: Iad8b57553b6e93e3472ce8c6905d08e8d49af770
2014-08-19fdo#75757: remove inheritance to std::vectorTakeshi Abe1-4/+1
by replacing it with a typedef. Change-Id: Iaa88086e3c5195012982dd625bfd589de2e484a2 Reviewed-on: https://gerrit.libreoffice.org/11017 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
2014-08-12Refactored IDocumentExternalData out of SwDoc.Valentin Kettner1-7/+9
Into the new class DocumentExternalDataManager. Change-Id: Ib863daec170044c46143b47a91739d4c0940d963
2014-08-12Refactored IDocumentStylePoolAccess out of SwDoc.Valentin Kettner1-11/+11
Added non const SwDoc::GetDfltTxtFmtColl and SwDoc::GetTxtFmtColls and SwDoc::GetCharFmts. Had to make the manager friend of SwTxtFmtColl and SwConditionTxtFmtColl Had to make SwDoc::_MakeCharFmt and SwDoc::_MakeFrmFmt public. Change-Id: I19a36d91f92b3781a6c4313ec12eb8f7d4dfacc3
2014-08-12Refactored IDocumentLayoutAccess out of SwDoc.Valentin Kettner1-21/+9
Into the new class DocumentLayoutManager. Change-Id: I02d0cfcc63633d0bdab380508b2ef563187fd269
2014-08-12Refactored IDocumentState out of SwDoc.Valentin Kettner1-20/+8
Into the new class DocumentStateManager. Change-Id: I91c9097b091ff6118d58fd15fff2a4cefe0171fd
2014-08-12Refactored IDocumentStatistics our of SwDoc.Valentin Kettner1-19/+8
Into the new class DocumentStatisticsManager. Change-Id: I281232dc09dbd79c2faf3c2a78ae49625bbe88ee
2014-08-12Refactored IDocumentLineNumberAccess.Valentin Kettner1-5/+3
This interface is obsolete and was deleted. Change-Id: I56d37814f6e43f083ab3d199237ade06db287e18
2014-08-12Refactored IDocumentFieldsAccess out of SwDoc.Valentin Kettner1-52/+6
Into the new class DocumentFieldsManager. Removed SwDoc::_MakeFldList because it is not defined anywhere. Also moved a few non interface methods that belong to the manager. Change-Id: Icefd7ca7adcbb05a18d6fae0529fc54150b862fd
2014-08-12Refactored IDocumentRedlineAccess out of SwDoc.Valentin Kettner1-53/+8
Into the new class DocumentRedlineManager. Added an non const version of GetRedlineTbl to the interface. Also Moved SetAutoFmtRedlineComment which is not part of interface. Change-Id: I600d5821d5d5831557f5fc5375fb1203fe67a295
2014-07-15Refactored IDocumentContentOperations out of SwDoc.Valentin Kettner1-75/+12
Into the new class DocumentContentOperationsManager. Made SwNodes in sw/inc/ndarr.hxx friend class to DocumentContentOperationsManager so it can call DelNodes at end of DocumentContentOperationsManager::DeleteSection . Added DeleteAutoCorrExceptWord to SwDoc, its needed in the Manager. Added a non const version of SwDoc::GetDfltGrfFmtColl() to SwDoc because its needed in the Manager. Made SwDoc a friend class to DocumentContentOperationsManager so it can call SwDoc::checkRedlining and SwDocL::_MakeFlySection. Moved SwDoc::CopyImpl_ , SwDoc::CopyWithFlyInFly and SwDoc::CopyFlyInFlyImpl into the Manager. Moved "struct ParaRstFmt" and "lcl_RstTxtAttr" from docfmt.cxx in DocumentContentOperationsManager.hxx . Change-Id: Icaab57f4a8c158a85e549ecb4aacc752bc95bbc9
2014-07-15Refactored IDocumentOutlineNodes out of SwDoc.Valentin Kettner1-10/+5
Into the new class DocumentOutlineNodesManager. Change-Id: I05581391a1474872113ae91d6429709d181cabfe
2014-07-15Refactored IDocumentListsAccess out of SwDoc.Valentin Kettner1-20/+6
In the new class DocumentListsManager. The method listfunc::CreateUniqueListId was also moved there. Added a new method deleteListsByDefaultListStyle to the Interface, which is needed for SwDoc::DelNumRule. Change-Id: I75ea554a57d9402d2fcfeaedf9fbe50fbae2b020
2014-07-15Refactored IDocumentListItems out of SwDoc.Valentin Kettner1-18/+5
Into the new class DocumentListItemsManager. Change-Id: Ic86200280caa1b6e2c940bb12149235223ed0cd2
2014-07-15Refactored IDocumentLinksAdministration out of SwDoc.Valentin Kettner1-18/+13
To the new class DocumentLinksAdministrationManager. Additional to the Interface methods SwDoc::SelectServerObj was also moved and sw/source/core/doc/docdde.cxx was deleted as it became empty. Also fixed OUString usage in IDocumentLinksAdministration.hxx . Change-Id: I1f2bf0881a7d4add9c657b6441851ae14ad8d161
2014-07-15Refactored IDocumentTimerAccess in SwDoc into DocumentTimerManager.Valentin Kettner1-13/+5
Change-Id: Idb39ef2cdc34e0c0e7853de0a656f579ca3528da
2014-07-15Refactored IDocumentChartDataProviderAccess in SwDoc.Valentin Kettner1-11/+4
Into the new class DocumentChartDataProviderManager. Change-Id: I3be038ba276642546223c0c2fba3bea21980b33d
2014-07-01Related: #i124638# Corrected relationship between DrawModel and...Armin Le Grand1-1/+1
DocShell in Writer, made SwDrawModel and handling more known (includes suspicious removal of setting SID_ATTR_LINEEND_WIDTH_DEFAULT) (cherry picked from commit a7ccadbf3b1ac378ca15d3630d48f48734700e5c) Conflicts: sw/inc/IDocumentDrawModelAccess.hxx sw/inc/doc.hxx sw/inc/docsh.hxx sw/inc/dpage.hxx sw/inc/drawdoc.hxx sw/source/core/access/accmap.cxx sw/source/core/doc/doc.cxx sw/source/core/doc/docdesc.cxx sw/source/core/doc/docdraw.cxx sw/source/core/doc/docfly.cxx sw/source/core/doc/doclay.cxx sw/source/core/doc/docnew.cxx sw/source/core/draw/dcontact.cxx sw/source/core/draw/dpage.cxx sw/source/core/draw/drawdoc.cxx sw/source/core/frmedt/feshview.cxx sw/source/core/layout/fly.cxx sw/source/core/layout/frmtool.cxx sw/source/core/layout/newfrm.cxx sw/source/core/layout/paintfrm.cxx sw/source/core/undo/docundo.cxx sw/source/core/undo/unattr.cxx sw/source/core/unocore/unodraw.cxx sw/source/core/unocore/unoframe.cxx sw/source/core/view/vdraw.cxx sw/source/core/view/viewimp.cxx sw/source/core/view/viewsh.cxx sw/source/filter/html/htmldrawreader.cxx sw/source/filter/rtf/rtffly.cxx sw/source/filter/rtf/swparrtf.cxx sw/source/filter/ww8/docxattributeoutput.cxx sw/source/filter/ww8/rtfattributeoutput.cxx sw/source/filter/ww8/wrtw8esh.cxx sw/source/filter/ww8/wrtww8.cxx sw/source/filter/ww8/ww8graf.cxx sw/source/filter/xml/swxml.cxx sw/source/filter/xml/xmlexp.cxx sw/source/filter/xml/xmlimp.cxx sw/source/ui/app/docshdrw.cxx sw/source/ui/uiview/view.cxx sw/source/ui/uno/unodefaults.cxx sw/source/uibase/app/docst.cxx sw/source/uibase/app/docstyle.cxx sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx sw/source/uibase/lingu/sdrhhcwrap.cxx sw/source/uibase/shells/drwbassh.cxx sw/source/uibase/shells/frmsh.cxx sw/source/uibase/shells/grfsh.cxx sw/source/uibase/shells/textsh1.cxx sw/source/uibase/uno/unotxdoc.cxx sw/source/uibase/utlui/content.cxx Conflicts: sw/source/uibase/app/docshdrw.cxx Change-Id: Icb99eaa7bfb1eb8922a9fd928b5e4149821130dd
2014-06-27Related: #i78498# Do not keep OutlineLevel attribute at paragraph...Oliver-Rainer Wittmann1-3/+3
when a Paragraph Style is assigned. (cherry picked from commit 6a1564284d90c7e175f7848520924f7f6a5884b7) (cherry picked from commit 4a381b1124f60b76cabb558fa24827448a1caab0) Conflicts: sw/inc/doc.hxx sw/inc/editsh.hxx sw/inc/fmtcol.hxx sw/inc/ndtxt.hxx sw/source/core/attr/format.cxx sw/source/core/doc/docfmt.cxx sw/source/core/doc/docglbl.cxx sw/source/core/doc/doctxm.cxx sw/source/core/doc/fmtcol.cxx sw/source/core/edit/edfcol.cxx sw/source/core/txtnode/ndtxt.cxx sw/source/core/undo/unfmco.cxx sw/source/core/unocore/unosett.cxx sw/source/core/unocore/unostyle.cxx Change-Id: Ifa1214876df296f2e1210cc4a35f2df67f9f6bc4
2014-06-25pagedesc: Consolidate FindPageDescByName() and FindPageDesc().Jan Holesovsky1-3/+1
Change-Id: I18d570509cd3f3b65a19a12a9df0b1d5db901d04