summaryrefslogtreecommitdiff
path: root/svx
AgeCommit message (Collapse)Author
2015-07-24svx: replace boost::ptr_vector with std::vector<std::unique_ptr>Michael Stahl
Change-Id: I512ed27ef812498e021e320259b1e0862969a10e
2015-07-24convert WindowAlign to scoped enumNoel Grandin
Change-Id: I028d108b3a83bd5541d873c4d03b87339cd3be52
2015-07-24convert GA_ constants to enum classNoel Grandin
Change-Id: I51a197ed530c0a0e432620af23070c90a89a9ac3
2015-07-22tdf#92600 fix missing font preview in character set widgetLászló Németh
The previous fix for tdf#92600 (missing bold text in dialogs) brought back the regression in the special character set widget: the characters show always the default font of the Control class instead of the chosen font, see in the Insert->Special Character... dialog window of Writer. Change-Id: I2bdc2300f481dd680877f84ea2a717b9e749c64c
2015-07-22ListBox in grid: properly set selection on change from modelLionel Elie Mamane
In particular when changing row. 1) Teach DbCellControl about "SelectedItems" as known value property. 2) Fix DbListBox::updateFromModel to actually use the SelectedItems it reads from the model, as opposed to throwing it away. Change-Id: I7074c13b3d271bf2362aa059378aa857682a040b
2015-07-22tdf#92725 FormattedField: when model value is NULL, force empty display stringLionel Elie Mamane
as opposed to implicitly keeping whatever unrelated string was there before. Change-Id: Ifaf1b41e951e97f209ecb617b32ec4f7522b1d08
2015-07-21Listen to error only while operating on controller.Lionel Elie Mamane
Else, on any action done directly (not through the FormControllerHelper) on the controller and raising an SQL error, this would silently swallow the error message, and the operation would fail without any message to the user. E.g. when validating an insertion or modification in a grid control by moving the cursor to a different line (as opposed to clicking the "Save Record" button). Change-Id: Ie569d9c826609f803f7b312c0469907155558ef2
2015-07-21janitorialLionel Elie Mamane
Change-Id: I727c5af7659e9591563c0784fee5d0d9317ebc24
2015-07-21form document view activation: prioritise activation of already active formLionel Elie Mamane
This avoids arbitrarily switching to the first form in the document, which would do a (premature!) save to the database of the modifications pending in the active form. This may lead to a database error, when the data is not in a shape to be written to the database, e.g. when on an insertion row and not all mandatory fields have been filled in. This then pops up an error message to the user. Change-Id: I30bb533598ca707b892bb7155e54ce05d4ddf275
2015-07-21tdf#36796 Status updates for custom shapes buttonsMaxim Monastirsky
We're dealing here with 2 bugs: 1. Single shape buttons (like rectangle, ellipse etc.) don't get the pressed state when active. The cause is that all commands of the same kind (Basic Shapes, Symbol Shapes etc.) are handled as one internally, allowing only one type of status updates. It used to transport the current active shape, but it was changed to a boolean value in the fix for i#41753, and since then used for the pressed state of the group buttons. 2. The pressed state of a group button shows always, even when a user activates a shape from a place other than the drop-down of that button. But in this case the image of the group button doesn't update with the current shape, thus confusing the user on what is currently active. The cause here is that we use (since i#41753) the XSubToolbarController interface to update the last selected function (instead of the old-style status based update), and ToolBarManager notifies a controller about a new selection only if it was made from a particular toolbar that the controller claimed to use in the getSubToolbarName method. Since 7352a7c17875e5adcc4226c45f4a03e11c44ff49 there is a similar regression for other group buttons in sd (like lines, 3D Objects and other), with the same cause. This is also fixed now. Change-Id: Ida074a001ff78bf5bd5bcb8151516daa6e27cbce
2015-07-21bah, removed too muchDavid Tardon
Change-Id: I388f191fecd5f1d632f1540d280a04c163ce6fc9
2015-07-21drop obsolete codeDavid Tardon
Change-Id: I741c5f5ed895b06a445f42e20ef004a8c7c1a100
2015-07-20svtools: change these SvTreeListEntry functions to unique_ptrMichael Stahl
... parameters to make it clear that they take ownership. Change-Id: I572c5fa6268438a86d0a4fa1d2aef15382cb5607
2015-07-19Fix typosAndrea Gelmini
Change-Id: I52cbaad71560d73f5e24f3de3cd62b00d678dd6c Reviewed-on: https://gerrit.libreoffice.org/17187 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2015-07-17cleanup: use SAL_N_ELEMENTS for array sizeCarlos Luque
To be consistent across code in the calculation of the number of elements of an array. Change-Id: Iff73e570231caccdece3cf0e925d58bc0925ccc2 Reviewed-on: https://gerrit.libreoffice.org/17168 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2015-07-17svx: this was supposed to be "image/x-eps"Michael Stahl
Change-Id: Ieb9d7f23a0ef1e4546c488a678dbfde085156216
2015-07-17tdf#92571: add mime types for several image file formatsCarlos Luque
The new mime types were added the followings: - eps -> image/x-eps - wmf -> image/x-wmf - bmp -> image/bmp - pct -> image/x-pct These new mime types are written in the attribute "media-type" of each image in the file "manifest.xml" Change-Id: I16edb625e331d3f917c6e8929df004191e317acc Reviewed-on: https://gerrit.libreoffice.org/17123 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2015-07-17Convert form control buttons to the generic controllerMaxim Monastirsky
Change-Id: Ibecf33160d5d021e84e796f6b16db673f644699d
2015-07-17formatting of public/private/protected section qualifiersNoel Grandin
make it consistent across the codebase, no space between keyword and the colon Change-Id: Idca61ddfc74ad2460fb05fe417499324b05e5de5 Reviewed-on: https://gerrit.libreoffice.org/17148 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-17StyleManager: move style search to its own methodTomaž Vajngerl
And remove obsolete CreateStylePreviewRenderer method with style name as input parameter. Change-Id: I0fdf54fd40148b417250b5a6bf2453994eb83634
2015-07-17create the stlye preview renderer with style as parameterTomaž Vajngerl
Change-Id: Ie191467305279253f165f13980c125f6b7b9fdde
2015-07-16Convert Alignment button to the generic controllerMaxim Monastirsky
Change-Id: I76ead43fa1cfe7ba1b62d2b13c4f4d7658a9f290
2015-07-16Convert FontWorkShapeTypeControl to the generic controllerMaxim Monastirsky
Change-Id: I7824136aa2780c4062a66f7a5284a342862f319a
2015-07-16loplugin:unusedmethods svx(part2)Noel Grandin
Change-Id: I161360e2f3113c4814fe1c2c095e602b2c93dcd7 Reviewed-on: https://gerrit.libreoffice.org/17120 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-16loplugin:unusedmethods svxNoel Grandin
Change-Id: I92158457b3ffaaf7c84c6f4c87708d766c8c9f61 Reviewed-on: https://gerrit.libreoffice.org/17117 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-16loplugin:simplifyboolStephan Bergmann
Change-Id: Ibe187d7a2600c9f6a8524b5fc5665aa95099f512
2015-07-16-Werror,-Wunused-private-fieldStephan Bergmann
Change-Id: I16094fbe0f6455f373ae7ed300563a94df6436dc
2015-07-16loplugin:unusedmethods sfx2Noel Grandin
Change-Id: I98c455d89f76fbcacf74929a4e8775b4da697f62 Reviewed-on: https://gerrit.libreoffice.org/17069 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-15svx, sd, sw: GetPoolDefaultItem() can actually return nullptrMichael Stahl
...if you call ResetPoolDefaultItem() first. Crash found by Varun Dhall. Change-Id: I409484c172fb5843270aee2425844076a008b4df
2015-07-15Resolves: tdf#63955 clip 19km long line to some sane limitCaolán McNamara
Change-Id: If9757a5fa2bb93b56b9cf9f566972f687a4a3a45 Reviewed-on: https://gerrit.libreoffice.org/17036 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-07-15refactor ensuring polygon has at least a line in itCaolán McNamara
just split that out into a standalone function, no logic change Change-Id: I061d5d716b3fc2a9fb6385e7fb249ce300752130
2015-07-15Convert filters button to the generic controllerMaxim Monastirsky
Change-Id: I6d3c76c0aafe0ad77b597a2cb8331e6f8219e2d2
2015-07-15Convert optimize table button to the generic controllerMaxim Monastirsky
Change-Id: I6b9089daaa2bb7d0dfc1072296fc51401e5fc88a
2015-07-13Make content of OSL_ASSERT, DBG_ASSERT, etc. visiblie in non-debug buildsStephan Bergmann
...to avoid lots of loplugin:staticmethods warnings. Also enables DBG_ASSERT etc. also for --enable-debug builds in addition to --enable-dbgutil builds. Change-Id: Ib89ecd9ab8ce7abb2c64790ace248b31f9d2b64d
2015-07-13Introduce generic sub toolbar controllerMaxim Monastirsky
Currently many toolbar controllers are basically doing the same thing - show some docked toolbar. So the idea here is to have one generic controller that will handle all these cases in a unified way. It will get the name of the toolbar that it's supposed to show from the configuration, based on the command it was registered for. Right now it can handle both simple (i.e. with DROPDOWNONLY bits) and split (i.e. with DROPDOWN bits) scenarios, where for split kind it replaces the function (and the image) of the main part of the button, with the last selected function, for easy reusing. A button is considered to be a split one, if the name of the initial default command was passed along with the sub toolbar name, otherwise it will be a simple button. The core change is in framework/. Other parts are a usage example, in form of converting the custom shapes buttons to this new controller. Change-Id: I087cc58c3db1889ca69a26546d4f00fe07e2a58d Reviewed-on: https://gerrit.libreoffice.org/16967 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2015-07-13editeng: make Link<> usage typedNoel Grandin
Change-Id: Iec36c7e4f4fbc2ee2ee25d4d0c8488340ba7d8c4 Reviewed-on: https://gerrit.libreoffice.org/16968 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-13editeng, convert to typed Link<>Noel Grandin
and remove SvxBrushItem::SetDoneLink since the field it sets is unused.wq Change-Id: Ide95a295fa8004f1ddab5e560f01d36d36658a72 Reviewed-on: https://gerrit.libreoffice.org/16943 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-12coverity#1311655 Uninitialized scalar fieldCaolán McNamara
Change-Id: I377bca31f33398754ff48e15ffa29d43fc584f3b
2015-07-10vcl: remove boost/signal2/signal.hpp from headerMichael Stahl
The most relevant signal member function appears to be connect(), so let's create a wrapper function for that now, without the more esoteric ordering features for now. Move the signal member itself to a new pImpl. The benefits are worth it: preprocessor input reduced by 2.8GB, that's 9% of the total (excluding system headers which are not counted because they don't generate dependencies). Change-Id: I0aaeda51a5630a348bb12c81a83f67afbd508a14
2015-07-10Add an a11y action for items in the Special Characters dialogMatthew J. Francis
Change-Id: I53fef3f151f66be775655ceef623a7d564c66f1a Reviewed-on: https://gerrit.libreoffice.org/16771 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Matthew Francis <mjay.francis@gmail.com>
2015-07-09tdf#92645 svx rendercontext: fix missing paint on shape text editingMiklos Vajna
Change-Id: Icb70805969ccf55bd85fb38c03cf70c1e0b16554
2015-07-09SdrPaintView::AddWindowToPaintView: take a vcl::Window, tooMiklos Vajna
Change-Id: Iedb296732c0819a1d6cdc1c59b3f1718e2cd6d38
2015-07-09SdrPaintWindow: optionally take a vcl::Window, tooMiklos Vajna
Change-Id: Ibf6c0cc2e6dc8fe6979632f6acb1b065984cd73f
2015-07-09Related: tdf#92645 svx rendercontext: avoid direct paint on ending text editMiklos Vajna
If the Paint() is ~immediate after Invalidate() (which is the case since the main loop has priorities), it makes no sense to perform any kind of direct paint right after an Invalidate(). With this, we no longer hit the is_double_buffered_window() assert when returning to editing Writer text after editing draw shape text. Change-Id: I3b80ca08aa71d247fc0561133f907aef34de4001
2015-07-08Avoid loplugin:staticmethods in non-debug buildStephan Bergmann
Change-Id: I41cf1baa9899a4c8af3382b0c7c047348bf3498e
2015-07-08various warningsStephan Bergmann
Change-Id: Id3a56d628088f19424bd6e0c8bf23b0ac6c64d25
2015-07-08tdf#87702: Addition of Shadow sidebar tabRishabh Kumar
Change-Id: I75b368c0a8088926c765dbc46c6a4ce7c9d8b9f0 Reviewed-on: https://gerrit.libreoffice.org/16375 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-07-08Limit the font preview text length.Ashod Nakashian
When text is selected, the preview text is the first TEXT_WIDTH (80) characters of the selection rounded up to the next word. However when no word boundary is found, the preview text is as long as the selection, which causes the preview to be less than usable in some extreme cases. This patch is to limit the preview text length when no word boundary is found, thereby always resulting in predictable behavior. Change-Id: I8a21638d601714db956b9b160664dfe1e5e49a4a Reviewed-on: https://gerrit.libreoffice.org/16855 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-07-08Fix typosAndrea Gelmini
Change-Id: I020c7ce4d9aa93cb0292378a410cdb9f7788e920 Signed-off-by: Michael Stahl <mstahl@redhat.com>
2015-07-07spelling dialog always leaked hereCaolán McNamara
Change-Id: I00c96bbfe7106a09c0a8aa09f3209537bc3d2b07