Commit Graph

301 Commits

Author SHA1 Message Date
356f47752d editeng: harmonized types related to Tell()/Seek()
Change-Id: If0484da58011abae23ad19cbc3b9cf7e2e654b4c
Reviewed-on: https://gerrit.libreoffice.org/8216
Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
2014-02-25 04:41:07 +00:00
83aa6d8180 Remove some temporaries around calls to SvNumberFormatter methods
Change-Id: Ib03c97a52df120bac1ac9b2b9d2e52431ead1027
2014-02-24 09:08:35 +01:00
0ce0c369aa Remove unneccessary comments
Change-Id: I939160ae72fecbe3d4a60ce755730bd4c38497fb
Reviewed-on: https://gerrit.libreoffice.org/8182
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-23 03:38:49 +00:00
e8f8f24c84 vcl: sal_Bool -> bool
Change-Id: I2a3e3d3e3266ea0f0fafdd91362076a4aa160f0e
2014-02-21 12:53:51 +01:00
63a4219e69 editeng: sal_Bool->bool
Change-Id: I1a4b8ff5ccecc2776d1f145f8763f3dab6afb38b
2014-02-21 12:19:25 +02:00
a32ed92c95 editeng: sal_Bool->bool
Change-Id: I64cde75157fbdcda6ac92ca4064e6ab8197114c1
2014-02-21 12:19:24 +02:00
72c64c7691 editeng: sal_Bool->bool
Change-Id: I18717328ccd37649683b0d8cb57c85629cdcb4d9
2014-02-21 12:19:23 +02:00
5a5a80dd5c editeng: sal_Bool->bool
Change-Id: I92935238ff016dc441db72e3aadc28466fe84e68
2014-02-21 12:19:23 +02:00
32ef676504 editeng: sal_Bool->bool
Change-Id: I1b215ef78bcade675a2f80def0d6d5afe0ff3d2c
2014-02-21 12:19:23 +02:00
16c8fbfa07 editeng: sal_Bool->bool
Change-Id: I5f0b49b7a51f32fe4974739d2610204adefc4faa
2014-02-21 12:19:22 +02:00
e41ed900a4 sal_Bool->bool
Change-Id: I2849ab93619a0a8c9d28b3c43d370ee483820678
2014-02-21 12:19:22 +02:00
327dde336e editeng: sal_Bool->bool
Change-Id: Ib1113ebcfc523c8c97731debb2bf456a8c99d802
2014-02-21 12:19:21 +02:00
a1d5ff63db sal_Bool->bool
Change-Id: I0c2297ffa00ee23160f65b2859043fcd4842098c
2014-02-21 12:19:21 +02:00
8be2cbc856 sal_Bool->bool
Change-Id: I8623ebe2d46cb897d4dd0c0ec9c136d96af0186c
2014-02-21 12:19:19 +02:00
4692d28e90 sal_Bool->bool
Change-Id: I83a9267cc461c2921b5da04a1122539ba0ac7d2d
2014-02-21 12:19:19 +02:00
a18a1a4545 Remove vcl/settings.hxx from vcl/svapp.hxx and vcl/outdev.hxx
Added vcl/settings.hxx to all cxx files which require it.
This helps to speed up compilation after changes to the settings.

Conflicts:
	sc/source/ui/dbgui/pvlaydlg.cxx

Change-Id: I211a0735c47f72d6879f6f15339355abfe0e3cf4
Reviewed-on: https://gerrit.libreoffice.org/7933
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-20 16:22:17 +00:00
12f1faf7bf svl: sal_Bool -> bool
Change-Id: Ic31455a1f5ffffa35d4fdde901dd70734207b6f4
2014-02-20 08:17:00 +01:00
192623b391 coverity#984086 Uninitialized scalar field
Change-Id: Ifa94f76edbbede207abd1974c9add4fdf740eecf
2014-02-18 15:18:07 +00:00
d9809c68f6 fdo#74141 :In <w:ind> Right margin gets added even if not present in orig doc.
There was a problem that in style.xml and document.xml in <w:ind> tag "right" & "left" margin
attributes gets added(w:right=0 & w:left=0),if these attributes are not set in original document.
(In this case LO should not write these attributes in <w:ind>)

eg. if original doc has implicit right and left indentation values set(In style.xml) and there is no
explicit values provided for some para (In document.xml) still it used to write w:right=0 and w:left=0
in <w:ind> tag of document.xml which overrides an entry from style.xml.

XML difference :
- Original file:
<w:ind w:left="567" />
- Roundtrip file Before Fix:
<w:ind w:left="567" w:right="0" w:hanging="0"/>
- Roundtrip file After Fix:
<w:ind w:left="567" w:hanging="0"/>

Conflicts:
	sw/qa/extras/ooxmlexport/ooxmlexport.cxx
Reviewed on:
	https://gerrit.libreoffice.org/7816

Change-Id: Ifa01bae24d48bb38d5e255356247c46a43beefcc
2014-02-13 17:43:47 +01:00
15535e32dd convert SvStream::operator>> methods to ReadXXX methods
First, I updated the clang rewriter to do the conversion.
Then I lightly hand-tweaked the output for the few places where
the rewriter messed up, mostly when dealing with calls on "this".

Change-Id: I40a6a977959cd97415c678eafc8507de8aa3b1a9
Reviewed-on: https://gerrit.libreoffice.org/7879
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2014-02-12 15:31:40 +00:00
257c82d924 cid#982633 missing break in switch
Change-Id: I20a5a0bd859b0df40a051dbb1894a9d8adfa521d
2014-02-12 10:06:07 +02:00
c60e1800d6 cid#982362 missing break in switch
Change-Id: I132527f5e403721988ae8e1d60f181f3d3241810
2014-02-12 10:06:07 +02:00
5523ed4b35 coverity#707757 Uninitialized scalar field
Change-Id: I3956259474b100d0d14d500f9528b04125e0d169
2014-02-05 16:36:15 -06:00
ffc7f28606 coverity#707756 Uninitialized scalar field
Change-Id: I9985284e852ddc3b29d75cdf0b8969c2a8cecb9a
2014-02-05 16:36:15 -06:00
186b4ebc99 convert specialised SvStream::operator>> methods to ReadXXX methods
as preparation for converting the SvStream::operator>> methods on
primitive types

Change-Id: I62f134bced15c687d6e0d46924f56e8d1c3d95b9
Reviewed-on: https://gerrit.libreoffice.org/7798
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2014-02-04 22:50:39 +00:00
6bdd60462f bool improvements
Change-Id: If99daef91a41036a5b8dac1e53ab68e928b0b710
2014-01-28 20:24:39 +01:00
98bb12e112 Apparently missing "nPos <"
Change-Id: Id334f044d475de7ef14503e1a45190a0021d58be
2014-01-28 20:24:36 +01:00
a3f32769fc Fix bogus mass-conversion equalsAsciiL -> startsWith
3af99e4d59d89c343965a928681a30f36b1007d2 "convert equalsAsciiL calls to
startsWith calls" should rather have converted to oprator ==.

Change-Id: Id4a8836c5d6d570e54661c40be7214632e202b21
2014-01-21 15:54:52 +01:00
d33b4c311e Related: #i56998# use locale rules to format percentage
Change-Id: I4b744cf10165383153d2a71c05df0c0ed327c641
2014-01-20 14:46:21 +00:00
ab50bc9d4a Resolves: #i56998# add a space separater between value and unit...
and remove separator between value and percent to match with ISO 31-0

(cherry picked from commit 0cea884e3f417e4b58d2fdcfc7b0111f3bfc6f30)

Conflicts:
	chart2/source/controller/dialogs/tp_SeriesToAxis.src
	cui/source/dialogs/colorpicker.cxx
	cui/source/dialogs/colorpicker.src
	cui/source/dialogs/grfflt.src
	cui/source/dialogs/zoom.src
	cui/source/tabpages/tabline.src
	editeng/source/items/frmitems.cxx
	editeng/source/items/textitem.cxx
	sd/source/ui/animations/CustomAnimationDialog.src
	sd/source/ui/animations/SlideTransitionPane.src
	svx/source/dialog/bmpmask.src
	svx/source/engine3d/float3d.src
	svx/source/items/algitem.cxx
	svx/source/sidebar/text/TextCharacterSpacingControl.cxx
	svx/source/xoutdev/xattr.cxx
	sw/source/ui/utlui/attrdesc.cxx
	sw/source/ui/utlui/uiitems.cxx

Change-Id: I554309cb72dd8956077c5ca6866a982cdd6529aa
2014-01-20 12:08:54 +00:00
c648d08720 convert SvStream::operator<< overloads to more explicit methods
This is in preparation for more conversion of SvStream::operator<< calls
to use more explicit method names.
This converts the subclasses that have their own convenience overloads
of operator<< to use normal methods.

Change-Id: I5efd5d9a24c264cb86d2471303dd5849bf91ba80
2014-01-16 16:08:34 +01:00
5ea58f534b bool improvements
Change-Id: Ic6488ac278cac2d1d7e240abff545f9ea0b8eafe
2014-01-14 21:28:08 +01:00
92ba7bd75b xub_StrLen->sal_Int32
Change-Id: I9c4d9b8d18b36dda6609b1976cae13a481943563
2014-01-14 09:33:09 +00:00
563ba069b5 longparas: nPartLen always is USHRT_MAX/STRING_LEN to take full string
Change-Id: I55bb0baa8e83948c470ade2fc6fabccb69dea91d
2014-01-14 09:33:09 +00:00
d4dd5c34db longparas: convert ValidateKashidas to sal_Int32
we can use -1 as the failure return code as return value is always checked and
isolated from the rest of the code.

Change-Id: I87a743de82d681a7e4eabc61a576c4e50f1279a8
2014-01-13 20:35:21 +00:00
d1043892df SfxPoolItem::operator ==, != should return bool
...and SfxEnumItemInterface::HasBoolValue, too.

Change-Id: Ia032e3d35a4c3b4c1efdc515ca36e466be03fc0a
2014-01-10 17:11:51 +01:00
b69864f3f8 re-write SvStream operator<< to non-overloaded methods
This is the actual re-write.

Use a clang rewriter to rewrite SvStream::operator<< to methods
like WriteuInt32.
Note that the rewriter is not perfect, and I hand-tweaked the output.
In particular, I had to adjust places doing things like
  (*this) << 1;

Change-Id: I5923eda3f4ebaa8b452b6ef109e726e116235a2a
Reviewed-on: https://gerrit.libreoffice.org/7342
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2014-01-10 13:26:24 +00:00
1235e694c2 fdo#70278: editeng: fix Time fields in Impress
Apparenty an uninitialized SvxTimeField is created instead of the
SvxExtTimeField that is needed to preserve the value and format.

(regression from ee5fc5d25fe102c30daf7d181b8181d40b85a4f3)

Change-Id: I36b16af0c143e8b5451a1925806756492dc2334e
2013-12-10 15:28:53 +01:00
7b9c61c7f2 editeng: fix more 32-bit Time breakage
SfxDateTimeItem and SvxExtTimeField need to use 64-bit integer to store
Time as well.  These classes also have binary serialization
Load()/Save() methods but they are unlikely to be used in a persistent
way, just for the clipboard.

The problem is easy to reproduce in Impress: Insert->Field->Time(fixed)

(regression from 9830fd36dbdb72c79703b0c61efc027fba793c5a)

Change-Id: I5946c5b94dd5a509805b6dc40461bbd910caffc4
2013-12-10 15:28:53 +01:00
3af99e4d59 convert equalsAsciiL calls to startsWith calls
Convert code like:
    aStr.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ActiveConnection" ) )
to
    aStr.startsWith( "ActiveConnection" )
which compiles down to the same machine code.

Change-Id: Id4b0c5e0f9afe716a468d3afc70374699848dc33
2013-11-20 10:07:31 +02:00
c1f416feda SvxBrushItem: Improve Referer from member to GetGraphic[Object] parameter
Change-Id: I034132c315b74d0ea5e03b7d5f7cc225a6c8164e
2013-11-14 17:25:47 +01:00
7e115a4685 Fixed for spacing between lines in paragraph.
Problem Description:
In "w:spacing" value of "w:line" attribute value is not getting preserved.

Conflicts:
	sw/qa/extras/ooxmlexport/ooxmlexport.cxx
Reviewed on:
	https://gerrit.libreoffice.org/6645

Change-Id: Id9da4f9234d14cf4599c6520b4a191ad9af92c25
2013-11-14 13:51:52 +01:00
f0a9ca24fd rhbz#887420 Implement "block untrusted referer links" feature
For now, this checks for a trusted referer (if the BlockUntrustedRefererLinks
configuration prop is set) in utl::MediaDescriptor::impl_openStreamWithURL and
SvxBrushItem::GetGraphicObject.  Checking in additional places will probably be
necessary to block /all/ unwanted communication.  Also, some places marked
/*TODO?*/ currently pass in an empty referer (which is always considered
trusted) and will probably need to be adapted.

Ideally, Referer URIs would never be empty (and consistently use something like
<private:user> for cases where access is explicitly initiated by the user and
should never be blocked), but that's a very daunting task, so start small by
identifying the places that potentially need blocking and adding appropriate
Referer URIs there.  Also, Referer information should always be computed as
freshly as possible from the context in which an access attempt is made, but,
again, always carrying the information from the context all the way to the
relevant functions is a very daunting task, so for now store the information
upon object instantiation in some cases (SvxBrushItem, SdrGrafObj, ...).

The Referer URI (css.document.MediaDescriptor property; SID_REFERER) was already
used to track macro execution, and there is one place in
SfxApplication::OpenDocExec_Impl where opening of hyperlinks (explicitly clicked
by the user) is done that needs the current document's URI as Referer to check
execution of macro URIs but needs an empty (or <private:user>, see above)
Referer to not block non-macro URIs.  Special code has been added there to
handle that.

Change-Id: Iafbdc07a9fe925d9ee580d4f5778448f18f2ebd9
2013-11-14 11:13:25 +01:00
d366c9b20e remove unnecessary sal_Unicode casts in various places
Change-Id: Ibf04062ca86ed866202d748c3b62a210d30ed6ec
2013-11-14 08:17:32 +02:00
e52779d2f8 remove unnecessary use of OUString constructor
Change-Id: Ifb220af71857ddacd64e8204fb6d3e4aad8eef71
2013-11-11 11:21:26 +02:00
296329a926 convert xub_StrLen to sal_Int32
convert for loops using xub_StrLen to use sal_Int32

Change-Id: I5f635ca078966fefe938dbc7e8dea7c8d0d0b554
2013-11-06 08:51:22 +02:00
6aa0488da2 this method is not supposed to throw, fdo#66241
Change-Id: I1e2eaeba47e16e6b261c4c382ec10166eb08d7f3
2013-10-17 02:49:37 +02:00
0a0248f890 Resolves: fdo#69467 nTxtLeft not compared in operator==
so the maLRSpaceItem( 0, 0, 2000, 0, EE_PARA_OUTLLRSPACE )
in sd is considered the same value as the default
all 0 EE_PARA_OUTLLRSPACE.

But why the change of the Which id triggers this apparently
always there underlying problem needs further investigation

Change-Id: I41ef93cf8992f2b5cc72ddb474c54525415657b4
2013-10-11 10:54:23 +01:00
922e4ba299 Use the shorter GetScaledWidth() method
Change-Id: Id3ad483d3830310b8d13c86e407ff88d9a709464
2013-09-15 18:45:57 +02:00
3bd07839d6 WaE: C4701: potentially uninitialized local variable 'pGraphic' used
Change-Id: If726ed1d8b7db0c4bbf27fc9456e5eedd9e28924
2013-09-12 13:41:01 +03:00