summaryrefslogtreecommitdiff
path: root/cui
AgeCommit message (Collapse)Author
2016-06-17cui: fix loplugin:passstuffbyref warningsMiklos Vajna
Change-Id: Ic756db3decb4b4bfde345bc0adc092907622287e
2016-06-17Reduce duplicate code and remove DBG_ASSERTRishabh Kumar
Change-Id: I2abf050bd6627cda993ff03bdf1d1867e209bda5 Reviewed-on: https://gerrit.libreoffice.org/26392 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2016-06-16tdf#85949 Add 1.15 line spacing in the paragraph dialog alsoSamuel Mehrbrodt
Change-Id: I55a6028d1db2f2ebbdf0ed4a91e2db88098899fc Reviewed-on: https://gerrit.libreoffice.org/26370 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2016-06-16loplugin:passstuffbyrefStephan Bergmann
Change-Id: I3388ca4e484a567ed6f00d7ed177a1e45c8af706
2016-06-16Remove color name field from color tabRishabh Kumar
Click on 'Modify' button to change the color name Change-Id: I90397ae81edc3a9b5368f9fc2a9f2811a1e774e0 Reviewed-on: https://gerrit.libreoffice.org/26090 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2016-06-15Move accessibility relations to .ui files, Part 9: tdf#87026Muhammet Kara
By removing unnecessary variables/strings/function calls, and making proper changes in the related .ui files. Change-Id: I52e3f2a16519aee13b06f0efc6beb3385bcb0f1c Reviewed-on: https://gerrit.libreoffice.org/26066 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2016-06-14Related: tdf#90480 explain in the font color dialog why colors aren't used...Caolán McNamara
if the a11y option "Use automatic font color for screen display" is active. I guess we could go to town and have a button to zoom to that option or to directly disable it, but I've never encountered this problem before so surely it isn't that common that we need to immediately do that. Change-Id: Id19cac56591829f5644a8ac66c3d873c77e152f8
2016-06-14tdf#89329: use unique_ptr for m_pImpl in chardlgArnold Dumas
Change-Id: Ic7ac35ebdab7143d75a9f2c8d0e6f99796ffb0e3 Reviewed-on: https://gerrit.libreoffice.org/26232 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-14Minor bugfix for the Color tabRishabh Kumar
Bugs fixed: 1. Allow resizing of SvxColorValueSet on Addition and deletion of colors. 2. Refresh color in SvxColorValueSet on modifying the color. 3. Select the second last color on deleting the last color. Change-Id: Id01a1347683ea183dfb9fbc5c14a4e101eeef9aa Reviewed-on: https://gerrit.libreoffice.org/26084 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2016-06-13Related: tdf#93135 adjust the ui to reflect the text fit options entanglementCaolán McNamara
We have two major groups of text fitting options in draw/impress ones that apply only to custom shapes * Word wrap text in shape * Resize shape to fit text those that apply to other elements, e.g. text boxes, legacy rectangles and lines * Fit width to text * Fit height to text * Fit to frame * Adjust to contour Of the second group, only "fit to frame" is always available. Text boxes have "Fit width to text" and "Fit height to text", while stuff like legacy rectangles and lines etc have "Adjust to contour" instead. A fun issue is that (currently anyway) the bit for "resize shape to fit text" in custom shapes and the bit for "fit height to text" in text boxes is the same bit, SDRATTR_TEXT_AUTOGROWHEIGHT. So before this change in all circumstances the same collection of checkboxes for all settings was visible. With context used to enable or disable which ones could be set according to the type of shape it was. Simultaneously there is logic to enable/disable checkboxes depending on if other checkboxes that control contradictionary options were checked/unchecked. e.g. "Fit to frame" disabled if "fit height to text" is enabled. So its not apparently why some can be enabled and some disabled by clicking about the place in the shared collection. In this commit we split the sizing options into their two families, one frame and column for each of "custom shapes" and "everything else". When adjusting a single selected object we use context to determine which column to show or hide. When editing multiple objects or the underlying graphic styles we show both columns. When editing a presentation style we show just the text box column. (The use of HasText in the original code is a concern, cause it doesn't make sense to me, using it like that means that in the original dialog format->text on an empty text box from F2 shows the contour option, but after entering text and then format->text it shows a set of different text box sizing options, so that's dropped here) Because (currently) the same SDRATTR_TEXT_AUTOGROWHEIGHT bit it used for two apparently different things then we visually toggle on all things that use that bit in multi-column mode when its togged on, i.e. on editing a style visually both "fit height to text" and "resize shape to fix text" are kept in sync when you toggle one or the other. We don't disable the "resize shape to fit text" checkbox (unlike the fit height to text checkbox which controls the same bit) if "fit to frame" and "adjust to contour" are set, and give it additional powers to unset those if clicked. This hopefully makes the ui describe the way things actually are. Because this SDRATTR_TEXT_AUTOGROWHEIGHT is currently sort of doing two purposes selecting a freshly drawn custom rectangle and using format->default formatting will cause it to change properties because the underlying SDRATTR_TEXT_AUTOGROWHEIGHT bit is cleared. The way things should probably be I guess is that there should be a SDRATTR_TEXT_AUTOGROWSIZE property (which used to exist but wasn't hooked up to anything) just for custom shapes which overrides the old family of options if set. Change-Id: I49241c90d919eeb5caa8775beab57746d5c6df04
2016-06-13loplugin:sallogareasNoel Grandin
Change-Id: I6ce045db236b81aa8bc7bce2a0e20c4132c5931f
2016-06-12convert more DBG_ASSERT(false to SAL_WARNNoel Grandin
Change-Id: Ie52f28f28c67a91c4d3d4517d5c6a466890c7a55 Reviewed-on: https://gerrit.libreoffice.org/26195 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-10Clean up uses of Any::getValue() in cuiStephan Bergmann
Change-Id: I31da32c90a09cd0746f2d05ed2cbd7ffde3f81e4
2016-06-10Convert SvxPraVertAlignItem::Align to scoped enumNoel Grandin
Change-Id: I2f73a200b04322dd65e0758f4238347bfea832fb
2016-06-10loplugin:mergeclasses SfxMacroTabPageNoel Grandin
Change-Id: I74790c665fbd191914291365ce711fea9f1cf320 Reviewed-on: https://gerrit.libreoffice.org/26147 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-09Resolves: tdf#93135 there is no SDRATTR_TEXT_AUTOGROWSIZE propertyCaolán McNamara
as far as I can see there is no use of SDRATTR_TEXT_AUTOGROWSIZE anywhere, just a reuse of SDRATTR_TEXT_AUTOGROWHEIGHT for a different mechanism to resize the surrounding shape to fit text in custom shapes. Note there is another different feature to resize text to fit into its frame of SDRATTR_TEXT_FITTOSIZE. Change-Id: Icf08966c70ef79271f462da7d4b2c6e8e855d5df
2016-06-09Resolves: tdf#93135 can't resize shape with "resize shape to fit text"Caolán McNamara
These are regressions from... commit 4a847bb4a2002d7f8f5854b7276ac67d369bdd3b Date: Sun Aug 2 21:20:48 2015 +0200 tdf#93079: "resize shape to fit text" state can't be disabled Wrong copy-paste and commit b2bae9b940fc34d2eecd7839e3cba1f41d111e87 Date: Thu Apr 9 23:38:47 2015 +0200 Related tdf#34467: Fit to Frame for text boxes is broken Wrong Copy-paste Its turns out that there is *no* SDRATTR_TEXT_AUTOGROWSIZE property. Only a SDRATTR_TEXT_AUTOGROWHEIGHT property e.g. see CustomShapeProperties::UpdateTextFrameStatus of svx/source/sdr/properties/customshapeproperties.cxx "change TextFrame flag when bResizeShapeToFitText changes (which is mapped on the item SDRATTR_TEXT_AUTOGROWHEIGHT for custom shapes, argh)" So the inconsistency between getting the itemstate of SDRATTR_TEXT_AUTOGROWSIZE and then setting/getting SDRATTR_TEXT_AUTOGROWHEIGHT is better resolved by getting the itemstate of SDRATTR_TEXT_AUTOGROWHEIGHT will have a follow up patch to remove SDRATTR_TEXT_AUTOGROWSIZE to show its not used by anything Change-Id: I8b8abde17c15761c621815ed2be62d6a8a5cd69a
2016-06-08loplugin:cstylecastNoel Grandin
Change-Id: I412f88094269ba111a984b714202b58d96758a20
2016-06-08Fix widget's library nameRishabh Kumar
Change-Id: I22c66a63bfc71971da87db00b364e56ec55f7222 Reviewed-on: https://gerrit.libreoffice.org/26052 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2016-06-08Addition of new controls and their rearrangement in color tabRishabh Kumar
1. Addition of RGB and CMYK fields for the previous/old color. 2. Removal of color mode(RGB/CMYK) listbox and replacement with RadioButtons. 3. Changing color mode should not change the previous selected color. 4. Hide CMYK controls and color mode RadioButtons. 5. Addition of Hexadecimal color values. Change-Id: Iafc51e750e1f08345771edc9a733b91f6c771500 Reviewed-on: https://gerrit.libreoffice.org/25538 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2016-06-06Convert DeactivePage return code to scoped enumNoel Grandin
Change-Id: Idd5372ad20fc6676864b31b3796f8b9bc0ad73dd Reviewed-on: https://gerrit.libreoffice.org/25918 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-06remove unused constants in HRC filesNoel Grandin
Change-Id: Ia034fb16ce75caeb69fd746d4a602cd5fcfef6d1 Reviewed-on: https://gerrit.libreoffice.org/25817 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-03Move page size listbox from cui to svxKatarina Behrens
make it a custom widget so it is accessible e.g. to sidebar panels Change-Id: Ic36a9a8af96a09fc76efd8e9ae75b8ebdf81717e Reviewed-on: https://gerrit.libreoffice.org/25764 Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de> Tested-by: Katarina Behrens <Katarina.Behrens@cib.de>
2016-06-02Import custom Hatch background colorRishabh Kumar
Change-Id: I36593afb557f9826f2b0117cd93d2712bc676cdd Reviewed-on: https://gerrit.libreoffice.org/25784 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2016-06-02Remove SetAccessibleRelationLabeledBy calls tdf#87026Muhammet Kara
And make proper changes in the related .ui files Change-Id: Iea998b6de25831c08950a8afa725713288113bfa Reviewed-on: https://gerrit.libreoffice.org/25807 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-06-02tdf#100121 : Assertion failed in Area fill of a text box inside a chartRishabh Kumar
Replace MetricField by NumericField Change-Id: I4bde312b709aa6073908c21bc8ed33bcdb3a9b1f Reviewed-on: https://gerrit.libreoffice.org/25797 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2016-06-01Make class HexColorControl globalRishabh Kumar
Change-Id: I755e5aab5425d5d136d5fe7c75706a93cf4559ae Reviewed-on: https://gerrit.libreoffice.org/25665 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2016-06-01remove unused SID constants and associated codeNoel Grandin
found with a python script that looks like: process = subprocess.Popen( "git ls-files *.hrc | xargs grep -hE '#define +SID_' | cut -d ' ' -f 2 | sort -u", shell=True, stdout=subprocess.PIPE) for line in iter(process.stdout.readline, b''): line = line.strip() if line.startswith("//"): continue if line.startswith("sfx"): continue if len(line) < 10: continue i = subprocess.check_output("git grep -nP \"#define +" + line + " \"", shell=True) if i.count("#define") < 2: continue print line + " " + i Change-Id: I40eac2569c2b5b129d9459cb723a9d6f26d09264 Reviewed-on: https://gerrit.libreoffice.org/25715 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-01Convert VCL_MESSAGE to scoped enumNoel Grandin
Change-Id: I976536849fa5585c96cee23b660c56d3d0116933 Reviewed-on: https://gerrit.libreoffice.org/25720 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-31Resolves: tdf#100148 use the selected font for the edit areaCaolán McNamara
I have some doubts if this is a good idea or not, but that's the request so lets try it out for a while. Change-Id: Ibe3f92476de1ced53daf6f41a363f70eff9f361e
2016-05-31Convert PrinterSupport to scoped enumNoel Grandin
Change-Id: I2bde7261b8e8f31e6dd5a02cd4130156a04b8a7f Reviewed-on: https://gerrit.libreoffice.org/25657 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-31teach refcounting clang plugin about uno::ReferenceNoel Grandin
uno::Reference is only allowed to used with classes that have a ::static_type member. So convert all those places to rtl::Reference. Maybe we need some LIBO_INTERNAL_ONLY constructors on rtl::Reference and uno::Reference to make this a little smoother? Change-Id: Icdcb35d71ca40a87b1dc474096776412adbfc7e3 Reviewed-on: https://gerrit.libreoffice.org/25516 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-30Move accessibility relations to .ui files tdf#87026Muhammet Kara
Change-Id: I2ce2c236d124d31aaacacb0c24ba52b3a70b489c Reviewed-on: https://gerrit.libreoffice.org/25555 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2016-05-30editeng: rename misleading SvxBoxItem::GetDistance()/SetDistance()Michael Stahl
Change-Id: Iea61f2de2b907974bbb05c66abf6cdaeab87b8b2
2016-05-30Convert FontRelief to scoped enumNoel Grandin
Change-Id: I545c83d742db27f1a004b66e5eb1ef768f62e011 Reviewed-on: https://gerrit.libreoffice.org/25626 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-30Convert SelectionMode to scoped enumNoel Grandin
Change-Id: I86c435de3918540cb54a0cb24568e58456c2f9d1 Reviewed-on: https://gerrit.libreoffice.org/25611 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-30loplugin:unusedmethodsNoel Grandin
Change-Id: I08e9bb65b2530148b80c67f01d51e594fc698acb Reviewed-on: https://gerrit.libreoffice.org/25543 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-29Resolves: tdf#97839 a single character may be more than 1 utf-16 code pointsCaolán McNamara
Change-Id: Iba2460bfb9335615796db3f5e233b870a8d63339
2016-05-27Convert GRAPHIC to scoped enumNoel Grandin
Change-Id: I1fd09a729cbda00f99841532e0dd3fa66bce7bea Reviewed-on: https://gerrit.libreoffice.org/25534 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-27tdf#34465 remove calls to SfxItemSet::Put(const SfxPoolItem&, sal_uInt16)Noel Grandin
and put an assert in SfxPoolItem::SetWhich() so nothing new creeps in. Change-Id: I6497650fa61ffb2b6941ffff2d471c8f117be1df Reviewed-on: https://gerrit.libreoffice.org/24324 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-26Update CMYK color field correctlyRishabh Kumar
Change-Id: I90f19aa33d619d2177d81376bcdfac13d45e0ca9 Reviewed-on: https://gerrit.libreoffice.org/25324 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2016-05-26loplugin:unusedmethodsNoel Grandin
Change-Id: Ib36bc0e87d00abb638cbfec511cd13b6179eabda Reviewed-on: https://gerrit.libreoffice.org/25431 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-26tdf#89329: use unique_ptr for pImpl in optasianXisco Fauli
Change-Id: Iaa97d318b8e6b327edd6eecc6a591c55082f7531 Reviewed-on: https://gerrit.libreoffice.org/25330 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-26tdf#89329: use unique_ptr for pImpl in SpellDialogXisco Fauli
Change-Id: Ic4231e2c20ec89c59b0bedd32cac6363b830442c Reviewed-on: https://gerrit.libreoffice.org/25329 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-26tdf#89329: use unique_ptr for pImpl in optinet2Xisco Fauli
Change-Id: I3f23ed564a10a9e6b0884fa1ad109d4d81ad1b6c Reviewed-on: https://gerrit.libreoffice.org/25332 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-25Window::SetData and Window::GetData are nearly unused nowCaolán McNamara
except for.. a) one use in sw which we can replace with a map b) one use in svx which didn't do anything c) one amusing piece of crazy in cui Change-Id: If66d9f7eab1eaddfb2bdab7815c3a6f22f4d7745
2016-05-25(nearly) nothing uses GetUniqueId anymore, so remove it.Caolán McNamara
The odd one out is the usage in Formula, which attempts to restore focus to a particular window identified by an unique id. In this case restore focus by keeping a VclPtr to the desired window. Change-Id: I1dc335325c109d75745c6bba2e12662e6ae50638
2016-05-24Convert SnapType to scoped enumNoel Grandin
Change-Id: I3980c2999bab191bb9357c883868db17db79e81f Reviewed-on: https://gerrit.libreoffice.org/25353 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-23Addition of new controls and their rearrangement in hatch tabRishabh Kumar
1. Removal of rectangle hatch angle dial widget 2. Addition of slider widget for changing angle in hatch tab. 3. Move hatch background color control from area tab to hatch tab. 4. Rearrangement of controls 5. Removal of hatch controls from Area tab Change-Id: I596098b328fc183d2fdd5259e90013dbf74d9ad7 Reviewed-on: https://gerrit.libreoffice.org/25147 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2016-05-23tdf#89329: use unique_ptr for pImpl in optsaveXisco Fauli
Change-Id: Ia442a6a5c570c45b03fc878099f1c50005ee7538 Reviewed-on: https://gerrit.libreoffice.org/25331 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>