Commit Graph

3868 Commits

Author SHA1 Message Date
Rishabh Kumar
6b3eb4788f Reduce duplicate code and remove DBG_ASSERT
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-17 13:11:25 +00:00
Samuel Mehrbrodt
e74d125954 tdf#85949 Add 1.15 line spacing in the paragraph dialog also
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-16 12:46:48 +00:00
Stephan Bergmann
c3becbd21f loplugin:passstuffbyref
Change-Id: I3388ca4e484a567ed6f00d7ed177a1e45c8af706
2016-06-16 13:44:43 +02:00
Rishabh Kumar
886c35539b Remove color name field from color tab
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-16 10:21:12 +00:00
Muhammet Kara
a00757e75b Move accessibility relations to .ui files, Part 9: tdf#87026
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-15 20:26:35 +00:00
Caolán McNamara
90018d327e Related: tdf#90480 explain in the font color dialog why colors aren't used...
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-14 21:33:42 +01:00
Arnold Dumas
d18a6a56d3 tdf#89329: use unique_ptr for m_pImpl in chardlg
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-14 11:08:07 +00:00
Rishabh Kumar
64bc2eff89 Minor bugfix for the Color tab
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-14 08:32:17 +00:00
Caolán McNamara
8d51397bfd Related: tdf#93135 adjust the ui to reflect the text fit options entanglement
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-13 11:28:19 +01:00
Noel Grandin
9f4e283fc8 loplugin:sallogareas
Change-Id: I6ce045db236b81aa8bc7bce2a0e20c4132c5931f
2016-06-13 10:25:40 +02:00
Noel Grandin
272a8afa60 convert more DBG_ASSERT(false to SAL_WARN
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-12 18:10:44 +00:00
Stephan Bergmann
d453d74b09 Clean up uses of Any::getValue() in cui
Change-Id: I31da32c90a09cd0746f2d05ed2cbd7ffde3f81e4
2016-06-10 18:55:47 +02:00
Noel Grandin
6925222271 Convert SvxPraVertAlignItem::Align to scoped enum
Change-Id: I2f73a200b04322dd65e0758f4238347bfea832fb
2016-06-10 11:01:04 +02:00
Noel Grandin
febeefc6c7 loplugin:mergeclasses SfxMacroTabPage
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-10 08:28:36 +00:00
Caolán McNamara
8c5452044b Resolves: tdf#93135 there is no SDRATTR_TEXT_AUTOGROWSIZE property
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-09 09:59:47 +01:00
Caolán McNamara
d1df071c3f Resolves: tdf#93135 can't resize shape with "resize shape to fit text"
These are regressions from...

commit 4a847bb4a2
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 b2bae9b940
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-09 09:59:47 +01:00
Noel Grandin
6d78ce11e1 loplugin:cstylecast
Change-Id: I412f88094269ba111a984b714202b58d96758a20
2016-06-08 13:39:00 +02:00
Rishabh Kumar
58664b1d43 Fix widget's library name
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-08 11:25:06 +00:00
Rishabh Kumar
7b186b14ba Addition of new controls and their rearrangement in color tab
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-08 08:50:23 +00:00
Noel Grandin
11b4a6ddce Convert DeactivePage return code to scoped enum
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-06 07:02:20 +00:00
Noel Grandin
9f138ffe9d remove unused constants in HRC files
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-06 07:01:43 +00:00
Katarina Behrens
9196de99ed Move page size listbox from cui to svx
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-03 06:46:39 +00:00
Rishabh Kumar
9f5bb8cddd Import custom Hatch background color
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-02 15:45:15 +00:00
Muhammet Kara
3498fd9fe9 Remove SetAccessibleRelationLabeledBy calls tdf#87026
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-02 10:36:59 +00:00
Rishabh Kumar
fa8759400e tdf#100121 : Assertion failed in Area fill of a text box inside a chart
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-02 08:09:32 +00:00
Rishabh Kumar
00fbca5642 Make class HexColorControl global
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-01 15:35:40 +00:00
Noel Grandin
fa135fd0e0 remove unused SID constants and associated code
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-01 06:48:13 +00:00
Noel Grandin
b860b73f2b Convert VCL_MESSAGE to scoped enum
Change-Id: I976536849fa5585c96cee23b660c56d3d0116933
Reviewed-on: https://gerrit.libreoffice.org/25720
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-01 06:46:29 +00:00
Caolán McNamara
2de8345dc4 Resolves: tdf#100148 use the selected font for the edit area
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-31 16:25:42 +01:00
Noel Grandin
fafb2cf4de Convert PrinterSupport to scoped enum
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-31 06:27:16 +00:00
Noel Grandin
0b23eec200 teach refcounting clang plugin about uno::Reference
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-31 06:25:45 +00:00
Muhammet Kara
d7834317c7 Move accessibility relations to .ui files tdf#87026
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-30 21:41:38 +00:00
Michael Stahl
84fb4be390 editeng: rename misleading SvxBoxItem::GetDistance()/SetDistance()
Change-Id: Iea61f2de2b907974bbb05c66abf6cdaeab87b8b2
2016-05-30 17:33:53 +02:00
Noel Grandin
990082f37c Convert FontRelief to scoped enum
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-30 06:41:53 +00:00
Noel Grandin
c47b170c71 Convert SelectionMode to scoped enum
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-30 06:41:28 +00:00
Noel Grandin
77d5491e15 loplugin:unusedmethods
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-30 06:34:42 +00:00
Caolán McNamara
847cdd8efd Resolves: tdf#97839 a single character may be more than 1 utf-16 code points
Change-Id: Iba2460bfb9335615796db3f5e233b870a8d63339
2016-05-29 20:27:00 +01:00
Noel Grandin
850a8d27ca Convert GRAPHIC to scoped enum
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-27 12:59:23 +00:00
Noel Grandin
9eb2e683ab tdf#34465 remove calls to SfxItemSet::Put(const SfxPoolItem&, sal_uInt16)
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-27 07:21:45 +00:00
Rishabh Kumar
3b9cf27513 Update CMYK color field correctly
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-26 16:38:14 +00:00
Noel Grandin
74713b34a3 loplugin:unusedmethods
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-26 07:50:33 +00:00
Xisco Fauli
d0e5ed941a tdf#89329: use unique_ptr for pImpl in optasian
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-26 07:31:16 +00:00
Xisco Fauli
a59fc8cbd0 tdf#89329: use unique_ptr for pImpl in SpellDialog
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-26 07:30:48 +00:00
Xisco Fauli
039c1043ca tdf#89329: use unique_ptr for pImpl in optinet2
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-26 07:29:46 +00:00
Caolán McNamara
86ac0bd314 Window::SetData and Window::GetData are nearly unused now
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 15:51:31 +01:00
Caolán McNamara
07f1a39509 (nearly) nothing uses GetUniqueId anymore, so remove it.
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-25 14:24:20 +01:00
Noel Grandin
9ff8c95e54 Convert SnapType to scoped enum
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-24 12:51:03 +00:00
Rishabh Kumar
7a4bd998e9 Addition of new controls and their rearrangement in hatch tab
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-23 20:30:02 +00:00
Xisco Fauli
bfc51d3fa8 tdf#89329: use unique_ptr for pImpl in optsave
Change-Id: Ia442a6a5c570c45b03fc878099f1c50005ee7538
Reviewed-on: https://gerrit.libreoffice.org/25331
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-23 13:37:00 +00:00
Caolán McNamara
1765ae3f74 Resolves: tdf#99981 make ScriptSelectorDialog modal for its parent
Change-Id: Ia522b36cd1f5d47d08afa74a22cec11de465f567
2016-05-23 13:06:15 +01:00