summaryrefslogtreecommitdiff
path: root/sw/source/uibase/shells/grfsh.cxx
AgeCommit message (Collapse)Author
2019-12-11jsdialog: send items on status changeSzymon Kłos
Use existing mechanism, delete sending in getter code which caused unnecessary work. Change-Id: Ibc191c16b95fd58e7065e019f48f3837cfed5bbd Reviewed-on: https://gerrit.libreoffice.org/84888 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2019-11-28jsdialogs: send graphic items updatesSzymon Kłos
Change-Id: I57d05726f80115b92e7599a7d033bf1ea8f79695 Reviewed-on: https://gerrit.libreoffice.org/83773 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2018-11-25weld SwFrameDlgCaolán McNamara
and now can remove... commit 5d84af7e83404f22d3c9cd0b0bb88fb84d0550e7 Date: Tue Dec 4 22:43:46 2012 +0100 fdo#57553: Picture dialog Macro tab page: lazily init ... because JVM startup is annoying, so delay it until really activating Macro tab. This patch is sort of lame but with the change in bd2c14ec78a7549d4a19738154cdd5ea890f61c4 what can you do... and description is revealed to be a text_view not an entry Change-Id: Ibc92cf11870d4349ddc728ec17c846e4158e82ac Reviewed-on: https://gerrit.libreoffice.org/63984 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-06-12simplify calls to *DialogFactory::Create methodsNoel Grandin
we don't need to check for nullptr here, it's never null. Change-Id: I3cc5337a8f4dec6747821679e39ccba3cec20f56 Reviewed-on: https://gerrit.libreoffice.org/55114 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-19weld CompressGraphicsDialogCaolán McNamara
Change-Id: I593e6f0fe2e002c75ecd367a38dda96e7e6552f9 Reviewed-on: https://gerrit.libreoffice.org/53125 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-04-17tdf#42949 Remove unnecessary localization headers from swGabor Kelemen
Found by searching for the header names and the localization function: git grep -l -e \<strings.hrc\> sw | xargs grep -c -e SwResId -e StartProgress -e GetResource | grep :0$ | grep -v /pch Change-Id: I041a4e8b4c4cc7414f83bd08e64a1ff921244b44 Reviewed-on: https://gerrit.libreoffice.org/52919 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-04-06weld linkeditdialogCaolán McNamara
which enables changing FileDialogHelper over to welded Change-Id: I988342a6574cb7ed09b2724929e8c7117474a56c Reviewed-on: https://gerrit.libreoffice.org/52388 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-03-20drop unnecessary includesCaolán McNamara
Change-Id: I1a817d5575bbd57ecaa874a27158b9218e4210cc Reviewed-on: https://gerrit.libreoffice.org/51603 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-03-16weld SvxObjectTitleDescDialogCaolán McNamara
Change-Id: Id08c201ee4377fe84618906725e7699d29dc1160 Reviewed-on: https://gerrit.libreoffice.org/51395 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-03-13SDI: don't #define/#undef names of actual classes for slot headersMike Kaganski
Visual Studio 2015/2017 cannot handle that correctly, and emits a lot of intellisense errors. So, just prepend the define with "ShellClass_" Change-Id: I473ceb7e0a88e114b92e6342fd4ae63015cafd3e Reviewed-on: https://gerrit.libreoffice.org/51135 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-02-22weld native message dialogsCaolán McNamara
just the straight-forward MessageDialog cases first a) remove border_width from message dialog .ui so as to take the default border width b) retain 12 as default message dialog border for vcl widget case c) remove layour_style from message dialog button boxes so as to take the default mode (a no-op for vcl widget case) d) use gtk response ids (vcl builder will converts to vcl ones) Change-Id: I7de281093a1b64f92f71ca11e7cbba42bb658154 Reviewed-on: https://gerrit.libreoffice.org/50143 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-02-21loplugin:changetoolsgen in swNoel Grandin
Change-Id: If07efe4c15cfc28df38a9327856d39313ca78d50 Reviewed-on: https://gerrit.libreoffice.org/50078 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-15SID_ATTR_TRANSFORM_ANGLE is an SfxInt32ItemStephan Bergmann
...as reported by UBSan when rotating an image in Writer: > sw/source/uibase/shells/grfsh.cxx:531:52: runtime error: downcast of address 0x00000bba8d80 which does not point to an object of type 'const SfxUInt32Item' > 0x00000bba8d80: note: object is of type 'SfxInt32Item' > 00 00 00 00 f8 8f 04 42 8f 7f 00 00 01 00 00 00 6f 27 00 00 d4 17 00 00 00 00 00 00 41 00 00 00 > ^~~~~~~~~~~~~~~~~~~~~~~ > vptr for 'SfxInt32Item' > #0 0x7f8eaf7fcdad in SwGrfShell::Execute(SfxRequest&) sw/source/uibase/shells/grfsh.cxx:531:52 > #1 0x7f8eaf7ed2f5 in SfxStubSwGrfShellExecute(SfxShell*, SfxRequest&) workdir/SdiTarget/sw/sdi/swslots.hxx:12460:1 > #2 0x7f8f3ff4637a in SfxShell::CallExec(void (*)(SfxShell*, SfxRequest&), SfxRequest&) include/sfx2/shell.hxx:211:35 ... Code had been introduced with a42b0985c7619efdc934bb1cf19e5e2c2b6faea2 "RotGrfFlyFrame: Initial adaptions". Change-Id: Id402244d723bcf653e414a3cd45ce07ad216e29f Reviewed-on: https://gerrit.libreoffice.org/49738 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-01-15More loplugin:cstylecast: swStephan Bergmann
Change-Id: I75f75b53e58221a3bd0a6eb837483e7ebae3a02b
2017-12-24convert RES_FRM constants to TypedWhichIdNoel Grandin
Change-Id: I0c71a6fd2e094cebdb720e6c0661cd8a7bb8482c Reviewed-on: https://gerrit.libreoffice.org/46812 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-18convert SVX_GRAPHICFILTER constants to scoped enumNoel Grandin
Change-Id: I220a2cfe9ea9ef2aa85e4ad8278be70c338891a5 Reviewed-on: https://gerrit.libreoffice.org/46705 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-12TypeWhichId in swNoel Grandin
Change-Id: Ia5654aaf88f13c37f52e3c17d61dd3475641070a Reviewed-on: https://gerrit.libreoffice.org/46230 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-20RotGrfFlyFrame: Added interactive rotation modeArmin Le Grand
The FlyFrames containing a graphic now support an interactive rotation mode. Added a rotation icon to the Toolbar close to right/left 90degree rotation. When activated, works as similar to draw object mode as possible. Shear and move of the rotation center is deactivated since not supported. It uses as much of the existing interaction stuff as possible. Change-Id: Ia1a4e5c064d8576b114c3fcf3a96ccb42c9372bb
2017-10-20RotGrfFlyFrame: Minimal working rotation solutionArmin Le Grand
This version allows rotation (in 10th degrees) and perserves it over save/load cycles. Rotation of multiples of 90 degree behave close to original except not changing the contained Graphic and being adaptable to all kinds of graphic. The rotated Graphic is displayed centered and under preserved AspectRatio in the available frame space (so no rotation, 180 degree is identical, 90/-90 is identical with 1:1 ratio of the graphic) Change-Id: I54b3385f709ee0d34a55324aca919dcd2ce0c009
2017-10-20RotGrfFlyFrame: Initial adaptionsArmin Le Grand
To allow free rotation of Graphic FlyFrames in Writer, several adaptions are necessary. This change takes care of all needed changes to internally support a freely definable rotation angle for that case. Save/Load round trip is working, the graphic does no longer get modified and added in 90-degree-changed state to the object, the original will be preserved. Support for needed slot in core/ui is implemented. Rotation can be applied from Menus/Toolbars in the known 90/180 degree steps. Added a slot/Button/command to reset rotation in these cases. Added support in Sidebar to rotate using the rotation wheel and/or numeric field. These fields and support added to Image TabPage, too, fully functional. Missing now is a solution for displaying the rotated Graphic. For now, it just gets rotated, but this will not be the final state of this change. Change-Id: I6f3b85ebb5be2b4ad3311c536d54f27a37a494e7 RotGrfFlyFrame: Linux build adaptions Change-Id: I365287ecd6525b1972e8436d61332f7121d88649
2017-10-09uibase: consistently use "" and <> in include directivesMike Kaganski
Change-Id: Ib6888045cecb4bd7b3498534605d790324f1b40a Reviewed-on: https://gerrit.libreoffice.org/43265 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-09-08set parent for file dialog helperCaolán McNamara
Change-Id: I3994ee48dcb5b2732cb27cb9ccb54926abf0828a Reviewed-on: https://gerrit.libreoffice.org/42048 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-08-06loplugin:constparams in sw part7Noel Grandin
Change-Id: Iaace9c024649481b2f7cdd67aaf1e86624fe0d4a Reviewed-on: https://gerrit.libreoffice.org/40811 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-21migrate to boost::gettextCaolán McNamara
* all .ui files go from <interface> to <interface domain="MODULE"> e.g. vcl * all .src files go away and the english source strings folded into the .hrc as NC_("context", "source string") * ResMgr is dropped in favour of std::locale imbued by boost::locale::generator pointed at matching MODULE .mo files * UIConfig translations are folded into the module .mo, so e.g. UIConfig_cui goes from l10n target to normal one, so the res/lang.zips of UI files go away * translation via Translation::get(hrc-define-key, imbued-std::locale) * python can now be translated with its inbuilt gettext support (we keep the name strings.hrc there to keep finding the .hrc file uniform) so magic numbers can go away there * java and starbasic components can be translated via the pre-existing css.resource.StringResourceWithLocation mechanism * en-US res files go away, their strings are now the .hrc keys in the source code * remaining .res files are replaced by .mo files * in .res/.ui-lang-zip files, the old scheme missing translations of strings results in inserting the english original so something can be found, now the standard fallback of using the english original from the source key is used, so partial translations shrink dramatically in size * extract .hrc strings with hrcex which backs onto xgettext -C --add-comments --keyword=NC_:1c,2 --from-code=UTF-8 --no-wrap * extract .ui strings with uiex which backs onto xgettext --add-comments --no-wrap * qtz for gettext translations is generated at runtime as ascii-ified crc32 of content + "|" + msgid * [API CHANGE] remove deprecated binary .res resouce loader related uno apis com::sun::star::resource::OfficeResourceLoader com::sun::star::resource::XResourceBundleLoader com::sun::star::resource::XResourceBundle when translating strings via uno apis com.sun.star.resource.StringResourceWithLocation can continue to be used Change-Id: Ia2594a2672b7301d9c3421fdf31b6cfe7f3f8d0a
2017-07-07loplugin:unnecessaryparen handle parens inside call exprNoel Grandin
stick to single-arg function calls, sometimes parens in multi-arg calls might be there for clarity Change-Id: Ib80190c571ce65b5d219a88056687042de749e74 Reviewed-on: https://gerrit.libreoffice.org/39676 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-05Fix a bit obscure pointer check.Marco Cecchetti
Change-Id: I843b7e15e6239288359590d2c40c0e6b5f8168ea Reviewed-on: https://gerrit.libreoffice.org/39569 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-07-04support for saving a modified image instead of original versionMarco Cecchetti
Normally when you save an image through the "Save..." entry in the context menu for an image, the saved image is the original one more eventually applied filters (which are not removeable). Further applied transformations like rotations, cropping, color effects are not included in the saved image. This patch offers the user to choose if saving the original image (with filters) or the modified version through a pop-up dialog. The new feature is available in Writer, Draw and Calc. Change-Id: I4f983e3a5e8a6839fa5789a96c4d8c44477c1fd7 Reviewed-on: https://gerrit.libreoffice.org/39480 Reviewed-by: Marco Cecchetti <mrcekets@gmail.com> Tested-by: Marco Cecchetti <mrcekets@gmail.com>
2017-06-19Make SfxItemSet ranges correct by construction: Fix static casesStephan Bergmann
...with the aid of an extended compilerplugins/clang/store/sfxitemsetrewrite.cxx (which in turn needed a small addition to compilerplugins/clang/check.hxx). Enable svl::detail::validGap check for the static case, but keep it disabled for now for the dynamic case. Change-Id: I4846ba8e99aff94a86518e2cb5044e575093386e
2017-06-16Make SfxItemSet ranges correct by constructionStephan Bergmann
This is a follow-up to 45a7f5b62d0b1b21763c1c94255ef2309ea4280b "Keep WID ranges sorted, and join adjacent ones". While SfxItemSet::MergeRange relies on the m_pWhichRanges being sorted (and, under DBG_UTIL, asserts if they are not), the various SfxItemSet constructors curiously only check (via assert or DBG_ASSERT) that each individual range has an upper bound not smaller than its lower bound. Arguably, all SfxItemSet instances should fulfill the stronger guarantees required and checked by MergeRange. And in many cases the ranges are statically known, so that the checking can happen at compile time. Therefore, replace the two SfxItemSet ctors taking explicit ranges with two other ctors that actually do proper checking. The (templated) overload taking an svl::Items struct should be used in all cases where the range values are statically known at compile time, while the overload taking a std::initializer_list<Pair> is for the remaining cases (that can only do runtime checking via assert). Most of those latter cases are simple cases with a single range covering a single item, but a few are more complex. (At least some of the uses of the existing SfxItemSet overload taking a const sal_uInt16* pWhichPairTable can probably also be strengthened, but that is left for another day.) This commit is the first in a series of two. Apart from the manual changes to compilerplugins/clang/store/sfxitemsetrewrite.cxx, include/svl/itemset.hxx, and svl/source/items/itemset.cxx, it only consists of automatic rewriting of the relevant SfxItemSet ctor calls (plus a few required manual fixes, see next). But it does not yet check that the individual ranges are properly sorted (see the TODO in svl::detail::validGap). That check will be enabled, and the ensuing manual fixes will be made in a follow-up commit, to reduce the likelyhood of accidents. There were three cases of necessary manual intervention: * sw/source/core/unocore/unostyle.cxx uses eAtr of enum type RES_FRMATR in braced-init-list syntax now, so needs explicit narrowing conversion to sal_uInt16. * In sw/source/uibase/uiview/formatclipboard.cxx, the trailiing comma in the definition of macro FORMAT_PAINTBRUSH_FRAME_IDS needed to be removed manually. * In svx/source/svdraw/svdoashp.cxx, svx/source/svdraw/svdotext.cxx, sw/source/uibase/app/docstyle.cxx, sw/source/uibase/shells/frmsh.cxx, sw/source/uibase/shells/grfsh.cxx, and sw/source/uibase/shells/textsh1.cxx, some comments had to be put back (see "TODO: the replaced range can contain relevant comments" in compilerplugins/clang/store/sfxitemsetrewrite.cxx). A few uses of the variadic form erroneously used nullptr instead of 0 for termination. But this should have been harmless even if promoted std::nullptr_t is larger than promoted sal_uInt16, assuming that the part of the nullptr value that was interpreted as sal_uInt16/promoted int was all-zero bits. Similarly, some uses made the harmless error of using 0L instead of 0. Change-Id: I2afea97282803cb311b9321a99bb627520ef5e35 Reviewed-on: https://gerrit.libreoffice.org/38861 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2017-06-02Improved loplugin:redundantcast static_cast handling: swStephan Bergmann
Change-Id: I699e7f0201d6c49344cfeb5a1146b20fcde72f9b
2017-05-31disambiguate dual use of toolbar idsCaolán McNamara
for toolbar title string resource and identifier (for config) Change-Id: I2657c3cbb586a62d8075db7cb43cc064b2030f28 Reviewed-on: https://gerrit.libreoffice.org/38274 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-05-30tdf#107589 Make description editable from Options tab.Gulsah Kose
That commit makes possible to edit descriptions of images frames and objects from "Options" tab of Object/Properties dialogs Change-Id: I62d06b32da6919df62ff77b50c4c77d6a265bd64 Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/38176 Tested-by: Jenkins <ci@libreoffice.org>
2017-04-13convert annotation menu to .uiCaolán McNamara
Change-Id: Id15e1c2040d3d202e90984888598da4426b5fec4
2017-03-31tdf#82580 tools: rename Rectangle to tools::RectangleMiklos Vajna
Mostly generated using make check COMPILER_EXTERNAL_TOOL=1 CCACHE_PREFIX=clang-rename-wrapper RENAME_ARGS="-qualified-name=Rectangle -new-name=tools::Rectangle" Except some modules have their own foo::tools namespace, so there have to use ::tools::Rectangle. This commit just moves the class from the global namespace, it does not update pre/postwin.h yet. Change-Id: I42b2de3c6f769fcf28cfe086f98eb31e42a305f2 Reviewed-on: https://gerrit.libreoffice.org/35923 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-03-23remove unused helpid in SfxShellNoel Grandin
Unused since commit 2c8fe2e737b84ecd3dbac36a4fe6bd061bbd3bae "update unusedmethods plugin to deal with constructors" where I removed a unused SfxDockingWindow constructor. And in that case, the helpid was only being used to assign the window a UniqueId. Change-Id: I148e424424fcf08449440b83a8600071b39d7a07 Reviewed-on: https://gerrit.libreoffice.org/35554 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-22loplugin:redundantcast find redundant c-style enum castsNoel Grandin
Change-Id: I2dab376d87804521aed6b6bd41ad7762830fa349 Reviewed-on: https://gerrit.libreoffice.org/35467 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-16convert SwUndoId to scoped enumNoel Grandin
Change-Id: I782fdd53641c0d7c629265b6179de70aa54382f9 Reviewed-on: https://gerrit.libreoffice.org/35246 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-15convert MirrorGraph to scoped enumNoel Grandin
Change-Id: I2eae815a10e23a7904e1aa54577a959cb8579172 Reviewed-on: https://gerrit.libreoffice.org/35179 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-14remove noise UUUU tags in commentsNoel Grandin
Change-Id: Id8a2940ae7348bf75ca967f31adf8489dc678d00 Reviewed-on: https://gerrit.libreoffice.org/35161 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-13convert GraphicDrawMode to scoped enumNoel Grandin
Change-Id: I18eec89c4e1ebb86d64297e7cef4b36bf12df59f Reviewed-on: https://gerrit.libreoffice.org/35004 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-03convert SfxEnumItem to type-safe template classNoel Grandin
and drop the SvxChartTextOrientItem class, unused. Change-Id: I99100837d1beb953450f57b2cda47d165df1620c Reviewed-on: https://gerrit.libreoffice.org/34747 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-13convert CurRectType to scoped enumNoel Grandin
and drop read-only enumerators RECT_OUTTABSECTION_PRT RECT_HEADERFOOTER_PRT Change-Id: I2d7d159cf5f1a2022c015e37df4aa71cae1e266c
2017-01-27tdf#87700 command to rotate 180 degreesgiacco
same things, with less code Change-Id: Ied67277f1a48b58aba094f3ca650c08133e95d68 Reviewed-on: https://gerrit.libreoffice.org/33619 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2016-12-23tdf#87700 command to rotate 180 degreesgiacco
added command to rotate an image 180 degrees in Writer Change-Id: I4a1e40f4c3475aceb24edd44691a74372f61b49a Reviewed-on: https://gerrit.libreoffice.org/30074 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Reviewed-by: Heiko Tietze <tietze.heiko@googlemail.com> Reviewed-by: jan iversen <jani@documentfoundation.org> Tested-by: jan iversen <jani@documentfoundation.org>
2016-12-21convert EnumContext::Context to scoped enumNoel Grandin
Change-Id: I16ec63beb801073e5d604d852892c2fd6e8d8fc3 Reviewed-on: https://gerrit.libreoffice.org/32272 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-05convert DecodeMechanism to scoped enumNoel Grandin
Change-Id: I5c56634b1bca8e37fa73d02d2428645301b6c547
2016-11-29sw ui: de-obfuscate assignments in conditions to help GCCMichael Stahl
GCC 6.2.1 with -Og produces spurious -Werror=maybe-uninitialized on variables that are assigned in conditions; perhaps it's better to de-obfuscate the code if even GCC is confused about it. Change-Id: I5276f35be773f8e7a6d27f970085f0cd00cea0aa Reviewed-on: https://gerrit.libreoffice.org/31331 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
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-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-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>