summaryrefslogtreecommitdiff
path: root/sfx2/source/appl
AgeCommit message (Collapse)Author
2016-12-08convert SFX_HINT to scoped enumNoel Grandin
Notes (*) In SC, BULK_DATACHANGED was or'ed into the hint id. Replaced with a dynamic_cast check. (*) In SC, removed the hint id field from ScIndexHint, no point in storing the hint id twice (*) Fold the SfxStyleSheetHintId enum into the new SfxHintId enum, no point in storing two different hint ids (*) In some cases, multiple #define's used to map to the same SFX_HINT value (notably the SFX_HINT_USER* values). I made all of those separate values. Change-Id: I990e2fb587335ebc51c9005588c6a44f768d9de5 Reviewed-on: https://gerrit.libreoffice.org/31751 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-06loplugin:unnecessaryoverrideStephan Bergmann
Change-Id: Ifa46b0eb0fb8f288acbcf19f7090a62c6a1ecef3
2016-12-05convert FSysStyle to o3tl::typed_flagsNoel Grandin
Change-Id: I58a63a0e6f619442f21827064644ecd8ca57b8ff
2016-12-05convert DecodeMechanism to scoped enumNoel Grandin
Change-Id: I5c56634b1bca8e37fa73d02d2428645301b6c547
2016-12-05convert INetURLObject::EncodeMechanism to scoped enumNoel Grandin
Change-Id: I50ea17c7779c7b5cacddf548f1773fd7d6c8bade
2016-12-05loplugin:unnecessaryoverride (dtors) in sfx2Stephan Bergmann
Change-Id: Ic086a22bccd267824e68df6c963df8da76e6df2c
2016-11-29loplugin:vclwidgets check for assigning from VclPt<T> to T*Noel Grandin
Inspired by a recent bug report where we were assigning the result of VclPtr<T>::Create to a raw pointer. As a consequence, we also need to change various methods that were returning newly created Window subclasses via raw pointer, to instead return those via VclPtr Change-Id: I8118e0195a5b2b4780e646cfb0e151692e54ae2b Reviewed-on: https://gerrit.libreoffice.org/31318 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-24vcl: rename Window::Notify to EventNotifyMichael Stahl
There is annoying overloading between Window::Notify and SfxListener::Notify, and the Window one has apparently fewer implementations, so rename that and remove lots of disambiguating "using Notify" in multiply inheriting classes. Change-Id: I8b597fd9e70cf2e7103b9dfa7cc666e79e7aff49
2016-11-24convert SFX_VISIBILITY constants to scoped enumNoel Grandin
* split the position and the flags information * remove unused DESKTOP constant Change-Id: Ibfccb44c7567e89d4527bfd36b3915a73682e6e2
2016-11-21Kill the AutoPilotPresentations UNO commandGabor Kelemen
The presentation wizard was removed in bb8040595c9b6f0ccde39e6833f27a50abb891d8 but the corresponding UNO command is still available. Change-Id: I54e676672bb53d0283394a0ebffbe9f94f29d9c0 Reviewed-on: https://gerrit.libreoffice.org/30983 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2016-11-18includes should be at the top of the fileNoel Grandin
not randomly scattered through the code found with something like: git ls-files *.cpp | xargs grep -Pzl "(?s){.*#include" Change-Id: I9c242fa4ef99e8677f2800d7ec9f16d16e488351 Reviewed-on: https://gerrit.libreoffice.org/30952 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-14tdf#68118: Pass current document frame to SvxScriptSelectorDialogMike Kaganski
... through MacroChooser Without this, current document's macros library is unavailable in "Assign" dialog Change-Id: I83baa3b98858260eab61e8f4fefde3f9979c6d83 Reviewed-on: https://gerrit.libreoffice.org/30600 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-11-11update vclwidget loplugin to find ref-dropping assigmentNoel Grandin
Look for places where we are accidentally assigning a returned-by-value VclPtr<T> to a T*, which generally ends up in a use-after-free. Change-Id: I4f361eaca88820cdb7aa3b8340212db61580fdd9 Reviewed-on: https://gerrit.libreoffice.org/30749 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-09make comphelper::containerToSequence a little smarterNoel Grandin
So we don't have to specify the source and destination type as often. Change-Id: Id9e286417a1cb246d163cbc3c536b231a4a92624 Reviewed-on: https://gerrit.libreoffice.org/30700 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-07sfx2: introduce a new .uno:SignPDFMiklos Vajna
It's similar to File -> Open, but the file picker only offers PDF files in this case, and the import is read-only -- i.e. it's the import equivalent of .uno:ExportToPDF. Change-Id: I7be9d6711e0ea93643e538575c0604d41cff9b26
2016-11-05Replace OSL_ENSURE by SAL_WARN_IF + clean includeJulien Nabet
Change-Id: I4d3a50fda2f865a546aafc38f06096117da34711 Reviewed-on: https://gerrit.libreoffice.org/30588 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2016-11-03loplugin:unnecessaryvirtualNoel Grandin
Change-Id: I572b83949c7e643536b7d62567760546509e4d9f Reviewed-on: https://gerrit.libreoffice.org/30514 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-03remove pParentFrame from SfxFrameNoel Grandin
Found by the singlevalfields loplugin. Dead as least as far back as commit 93a7b558588be1f12e137329548b706daccc07df Author: Frank Schoenheit [fs] <frank.schoenheit@sun.com> Date: Fri Nov 27 21:16:24 2009 +0100 [CWS autorecovery] merged SfxTopFrame into SfxFrame SfxTopFrame was the only class deriving from the abstract class SfxFrame, so both can effectively be treated as one class. Arguably when that commit was done, SfxFrame should also have been renamed to SfxTopFrame, since that it was it now seems to be. Expanding the nullptr value off that field means that: SfxFrame::GetTopFrame always return this SfxFrame::IsParent always returns false SfxViewFrame::GetTopFrame is now the same as SfxViewFrame::GetFrame SfxViewFrame::GetParentViewFrame now returns null Change-Id: Iac088fa485c3d7299d1553845ced2f5ced3c85f2 Reviewed-on: https://gerrit.libreoffice.org/30485 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-02loplugin:singlevalfieldsNoel Grandin
Change-Id: I65f96d9cd24572c8d0946acf4d2d45eb3db83a76 Reviewed-on: https://gerrit.libreoffice.org/30476 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-01loplugin:oncevar in sd..svgioNoel Grandin
Change-Id: I58565460fcc3279c9771c6e1272d0af540b2c87c Reviewed-on: https://gerrit.libreoffice.org/30459 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-28ScopedVclPtr vs std::unique_ptr for VclAbstractDialog derivativesCaolán McNamara
Change-Id: I5e43312b6f42ce0c63946f366eaf1e6dcb9629b2 Reviewed-on: https://gerrit.libreoffice.org/30344 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-10-28convert std::unique_ptr<VclAbstractDialog> to VclPtrNoel Grandin
Change-Id: Ifdd2a0599efd701def02b4a4d2a1c489cb1b27fa
2016-10-27loplugin:expandablemethods in sfx2Noel Grandin
Change-Id: I5dcc9e6e7fef210f85a01057ddf59f8de14b847d Reviewed-on: https://gerrit.libreoffice.org/30320 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-27make the AbstractDialog stuff extend from VclReferenceBaseNoel Grandin
Because some stuff wants to multiple-inherit from VclAbstractDialog and OutputDevice-subclasses, and we'd prefer to keep all the lifetime management through a single smart pointer class (VclPtr) The change in msgbox.cxx and window.cxx is to workaround a bug in VS2013 to do with virtual inheritance and delegating constructors. Change-Id: I178e8983b7d20a7d2790aa283be838dca5d14773 Reviewed-on: https://gerrit.libreoffice.org/29140 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-26assemble SfxStyleFamilies from more generic resource componentsCaolán McNamara
Change-Id: I25aa0d8bca1f16f5fc27d3b299709479a1635ea3
2016-10-25split the creation of SfxStyleFamilies into a methodCaolán McNamara
Change-Id: I2590180fc30d75c89e758c72246a8294b5c4b9a2
2016-10-24loplugin:countusersofdefaultparams in sd..slideshowNoel Grandin
Change-Id: Iaf10935d8f231676333018a5954d97defe35acf6
2016-10-19tdf#96015 (part) link to Doc'tation in Help menuOlivier Hallot
Add the entry "Documentation" to the modules Help menu. on click, the system browser opens http://hub.libreoffice.org/documentation/?&LOlang=<locale> <locale> is obtained from .getLocale() Patch2: create a member with try/catch for external URLs Patch3 Use sfx2::openUriExternally Revert to User Guides.. in UI. Change-Id: I8332253c31bd3be330cdd794f9e056b632b38037 Patch4: remove 1st '&' in URLs Reviewed-on: https://gerrit.libreoffice.org/28817 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2016-10-18tdf#89307: Removed T* SvRef::opeartor &()Jacek Fraczek
Usage has been replaced with SvRef::get() or removed where applicable. Change-Id: I49f108910b668466134c40940b53fc3ab2acd816 Reviewed-on: https://gerrit.libreoffice.org/29780 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-10-18Lock SolarMutex in SfxAppDispatchProvider::queryDispatchStephan Bergmann
...which can be called remotely via UNO, as happens during JunitTest_sfx2_unoapi Change-Id: I9dbf83f9985124ccb84f33cdd30ec1225a4f183d
2016-10-16clang-cl loplugin: sfx2Stephan Bergmann
Change-Id: Ided50d3573a40d50bb980ccba78de7129c42cffd Reviewed-on: https://gerrit.libreoffice.org/29852 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-10-14loplugin:mergeclasses merge SfxWorkWindow with SfxFrameWorkWin_ImplNoel Grandin
Change-Id: If6cab49904fdb044d85a4fd29f79faa7b52c9959
2016-10-13drop unused SID_UNKNOWN resourceCaolán McNamara
Change-Id: Ib12078ec72a61b44339799053cc43a53ba82bba3
2016-10-12safemode: Add flag to indicate safemodeSamuel Mehrbrodt
Change-Id: Ifdbb291715b033eaace159297eac5348530e9f36
2016-10-11loplugin:constantfunctionNoel Grandin
update the plugin similarly to commit 3ee3b36ae0c064fb5c81268d8d63444309d1b970 Author: Stephan Bergmann <sbergman@redhat.com> Date: Fri Oct 7 12:05:49 2016 +0200 loplugin:staticmethods: Don't be fooled by decls starting with macros Change-Id: I98ac3216d5acf89a49a26feb089ae2fd34e6e510 Reviewed-on: https://gerrit.libreoffice.org/29665 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-10safemode: Add uno command and menu entrySamuel Mehrbrodt
Change-Id: I1843767160b79041c42e506eff0cf39399c74f26 Reviewed-on: https://gerrit.libreoffice.org/29668 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2016-10-10tdf#89307: Removed SvRef::operator T*()Jacek Fraczek
Conditional statements are using SvRef::Is() method. Changed static_cast<T*>(svRef<T>) occurances to svRef.get(). Added operator == and != to SvRef. SbxObject::Execute is using SbxVariableRef internally. SbxObject::FindQualified is using SbxVariableRef internally. Change-Id: I45b553e35d8fca9bf71163e6eefc60802a066395 Reviewed-on: https://gerrit.libreoffice.org/29621 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-10-07de-src RID_HELP_ONSTARTUP_BOX checkboxCaolán McNamara
Change-Id: I30ff54c55078333526ad34256f1c81c62fca920c
2016-10-07HID_HELP_ONSTARTUP_BOX goes nowhere in helpCaolán McNamara
Change-Id: I9a8556fcda0bd39107491dd178b816e4421f160c
2016-10-07SfxViewFrame::GetParentViewFrame_Impl always returns nullptrStephan Bergmann
...ever since 4d61332a3cb172cdfe29f64efb325f6ef20c573c "[CWS autorecovery] removed (now) unused methods in Sfx(Top)Frame" Change-Id: I3a1bc00d8a11337211cdf7265ad8e5e7d5363600
2016-10-07loplugin:staticmethods: sfx2Stephan Bergmann
Change-Id: I64bd8564b335481a8cdfb053cc9563bea8ef47d3
2016-10-06I can't see any evidence of any remaining magenta mask using image resourcesCaolán McNamara
Change-Id: I12865d743daa3e6479edb60584d5bd01f88e818d
2016-10-05Replace DdeData conversion operators with proper functionsStephan Bergmann
Change-Id: I866bdcbf1b6a5cda4472b6655ace866a3d5a8983
2016-10-05convert MapUnit to scoped enumNoel Grandin
I left a prefix on the names "Map" so that I would not have to re-arrange each name too much, since I can't start identifiers with digits like "100thMM" And remove RSC_EXTRAMAPUNIT, which doesn't seem to be doing anything anymore. Change-Id: I5187824aa87e30caf5357b51b5384b5ab919d224 Reviewed-on: https://gerrit.libreoffice.org/29096 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-05Remove _TYPED suffix from tools/link.hxx macrosStephan Bergmann
...which was introduced with 3ead3ad52f9bb2f9d1d6cf8dfc73a0a25e6778ed "Gradually typed Link" to distinguish the new, typed versions from the old, untyped ones, but is no longer necessary since 382eb1a23c390154619c385414bdbe6f6e461173 "remove untyped Link<>" removed the old versions. Change-Id: I494025df486a16a45861fcd8192dfe0275b1103c
2016-10-01Fix typosAndrea Gelmini
Change-Id: I6aeda978911b25caa45d4e459e581fc743e93d2c Reviewed-on: https://gerrit.libreoffice.org/29442 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-30loplugin:constantparamNoel Grandin
Change-Id: Idbe8c8e6b3d44cacce296ec8c79b2b244281057c Reviewed-on: https://gerrit.libreoffice.org/29321 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-29tdf#102776 : toolbar mode changing in multiple windowsSzymon Kłos
This patch provides better toolbar mode switching: - only in current module (if eg. Writer and Calc opened) - in multiple windows with the same module (two Writer docs) Change-Id: I81bfe626b677bc0168c4a7cd6ce5563ceed5c14b Reviewed-on: https://gerrit.libreoffice.org/29394 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Szymon Kłos <eszkadev@gmail.com>
2016-09-23perf: eliminate SfxSimpleHint and move to SfxHint, tdf#87101 relatedEike Rathke
There were over 150 places in *::Notify() functions that did some dynamic_cast<SfxSimpleHint*> of which ~98% were unnecessary because the base class SfxHint passed was an SfxSimpleHint anyway. dynamic_cast operations come with quite some cost, so avoid if possible. Specifically for ScFormulaCell::Notify() that created a bottleneck in scenarios where cells were notified that already handled a previous notification. In mass operations doing the dynamic_cast before it could be decided whether having to act on it or not this made 2/3 of all time spent in the Notify() call. To get rid of that rename/move SfxSimpleHint to SfxHint and let classes derive from SfxHint instead of SfxSimpleHint. This comes only with a slight cost that an additional sal_uInt32 is transported in such hints, initialized to 0, but this is neglectable compared to the huge gain. For the rare cases where a Notify() actually expects both, an SfxHint (formerly SfxSimpleHint) and a derived hint, this changed order of the dynamic_cast involved so the simple SfxHint::GetId() is handled last. Modules using such combinations can further optimize by treating the simple SfxHint::GetId() first once verified that none of the other derived hints use an ID not equal to zero respectively none of the ID values the simple hint uses. Change-Id: I9fcf723e3a4487ceb92336189d23a62c344cf0ce Reviewed-on: https://gerrit.libreoffice.org/29205 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2016-09-14loplugin:overrideStephan Bergmann
Change-Id: Id9c234d605b4f8107833980825b402006e4f0031