Easy hacks without code pointers

2017-11-20 Thread Zolnai Tamás
Hi all,

I see that some of the easy hacks have no code pointers, but they are
listed on the easy hacks wiki page:
https://wiki.documentfoundation.org/Development/EasyHacks/lists/by_Difficulty

For example: tdf#40457, tdf#112650, tdf#106890, tdf#71920. These were
generated in the last 7 days.

I thought an easy hack should have a code pointer, otherwise it would be
hard for a new developer to start with that bug. What's about these bugs?
At least, it would be good to add this kind of easy hacks to a separate
list.

Thanks,
Tamás
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice-commits] core.git: Let's have activex control test also a slowcheck test

2017-11-13 Thread Zolnai Tamás
*Typo: I was who added this activex test to the source.

2017-11-13 15:51 GMT+01:00 Zolnai Tamás :

> Hi Stephan,
>
> I was how added this activex test to the source. First I added it to
> subsequent_test because I don't want it to run by make , but then I
> realized that there is also the slowchecks, which are not run by make
> , but run by top level make. It has the same dependency as other
> filters test in sd.
>
> Best Regards,
> Tamás
>
> 2017-11-13 15:43 GMT+01:00 Stephan Bergmann :
>
>> On 11/13/2017 11:54 AM, Tamás Zolnai wrote:
>>
>>> commit 0c5eda9876f353e0516171fec67568643f24c5b6
>>> Author: Tamás Zolnai 
>>> Date:   Mon Nov 13 10:13:13 2017 +0100
>>>
>>>  Let's have activex control test also a slowcheck test
>>>   Change-Id: I55f8f0ca9478e676832ebbb08e98dbd1cf0fa4fc
>>>  Reviewed-on: https://gerrit.libreoffice.org/44666
>>>  Tested-by: Jenkins 
>>>  Reviewed-by: Tamás Zolnai 
>>>
>>> diff --git a/sd/Module_sd.mk b/sd/Module_sd.mk
>>> index becd4528e81f..59f792a78037 100644
>>> --- a/sd/Module_sd.mk
>>> +++ b/sd/Module_sd.mk
>>> @@ -37,6 +37,7 @@ $(eval $(call gb_Module_add_slowcheck_targets,sd,\
>>>   CppunitTest_sd_filters_test \
>>>   CppunitTest_sd_misc_tests \
>>>   CppunitTest_sd_html_export_tests \
>>> +CppunitTest_sd_activex_controls_tests \
>>>   ))
>>>   endif
>>>   @@ -56,7 +57,6 @@ $(eval $(call gb_Module_add_screenshot_targets,sd, \
>>> $(eval $(call gb_Module_add_subsequentcheck_targets,sd,\
>>>   JunitTest_sd_unoapi \
>>> -CppunitTest_sd_activex_controls_tests \
>>>   ))
>>> # vim: set noet sw=4 ts=4:
>>>
>>
>> "Subsequent checks" were originally introduced to work around dependency
>> issues:  Those tests depended on the instdir (or its equivalent, back then)
>> installation set being fully populated, so that those tests (mostly the
>> infamous qadevOOo-style JunitTests, which spawn a full soffice process)
>> could expect everything to be available without specifying full
>> dependencies.  (Where specifying the full dependencies would not even have
>> been possible in all cases, IIRC.)
>>
>> I am not sure how much of that is still relevant, what (if any) implicit
>> dependencies a subsequentcheck can still implicitly rely on.  However, be
>> careful when moving a test from subsequentcheck to somewhere else. It might
>> still carry such implicit dependencies.
>> ___
>> LibreOffice mailing list
>> LibreOffice@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/libreoffice
>>
>
>
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice-commits] core.git: Let's have activex control test also a slowcheck test

2017-11-13 Thread Zolnai Tamás
Hi Stephan,

I was how added this activex test to the source. First I added it to
subsequent_test because I don't want it to run by make , but then I
realized that there is also the slowchecks, which are not run by make
, but run by top level make. It has the same dependency as other
filters test in sd.

Best Regards,
Tamás

2017-11-13 15:43 GMT+01:00 Stephan Bergmann :

> On 11/13/2017 11:54 AM, Tamás Zolnai wrote:
>
>> commit 0c5eda9876f353e0516171fec67568643f24c5b6
>> Author: Tamás Zolnai 
>> Date:   Mon Nov 13 10:13:13 2017 +0100
>>
>>  Let's have activex control test also a slowcheck test
>>   Change-Id: I55f8f0ca9478e676832ebbb08e98dbd1cf0fa4fc
>>  Reviewed-on: https://gerrit.libreoffice.org/44666
>>  Tested-by: Jenkins 
>>  Reviewed-by: Tamás Zolnai 
>>
>> diff --git a/sd/Module_sd.mk b/sd/Module_sd.mk
>> index becd4528e81f..59f792a78037 100644
>> --- a/sd/Module_sd.mk
>> +++ b/sd/Module_sd.mk
>> @@ -37,6 +37,7 @@ $(eval $(call gb_Module_add_slowcheck_targets,sd,\
>>   CppunitTest_sd_filters_test \
>>   CppunitTest_sd_misc_tests \
>>   CppunitTest_sd_html_export_tests \
>> +CppunitTest_sd_activex_controls_tests \
>>   ))
>>   endif
>>   @@ -56,7 +57,6 @@ $(eval $(call gb_Module_add_screenshot_targets,sd, \
>> $(eval $(call gb_Module_add_subsequentcheck_targets,sd,\
>>   JunitTest_sd_unoapi \
>> -CppunitTest_sd_activex_controls_tests \
>>   ))
>> # vim: set noet sw=4 ts=4:
>>
>
> "Subsequent checks" were originally introduced to work around dependency
> issues:  Those tests depended on the instdir (or its equivalent, back then)
> installation set being fully populated, so that those tests (mostly the
> infamous qadevOOo-style JunitTests, which spawn a full soffice process)
> could expect everything to be available without specifying full
> dependencies.  (Where specifying the full dependencies would not even have
> been possible in all cases, IIRC.)
>
> I am not sure how much of that is still relevant, what (if any) implicit
> dependencies a subsequentcheck can still implicitly rely on.  However, be
> careful when moving a test from subsequentcheck to somewhere else. It might
> still carry such implicit dependencies.
> ___
> LibreOffice mailing list
> LibreOffice@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/libreoffice
>
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Running unit test by make

2017-11-13 Thread Zolnai Tamás
Hi Bjoern,

OK, thanks for the info. Not a real problem. I have a headache mostly
because of the sd module, but now sd tests are moved to slowcheck, so
something improved here at least.
I guess if this fast tests (run by "make") are not usefull in general, in
long term they will be moved all to slowcheck anyway.

Best Regards,
Tamás

2017-11-12 21:03 GMT+01:00 Bjoern Michaelsen <
bjoern.michael...@libreoffice.org>:

> Hi,
>
> On Sun, Nov 12, 2017 at 07:00:33PM +0100, Zolnai Tamás wrote:
> > Independently from the actual question, which is still unanswered,
>
> If the question is "why do we have this status quo?" the answer is
> "because it
> is result of some dozen discussions between developers (mostly on the
> ESC).".
> ~Every argument has already been made and I assume most are also preserved
> for
> eternity in the ESC minutes.
>
> > it's always a pleasure to see how "old" developers - living in a
> symbiosis
> > with the code - are worrying about the status quo.
>
> If you assume the status quo to be my personal best preference, I can
> assure you
> that is not the case. If you would dig through the six years of debate on
> ESC,
> you will even find that I was supporting tests to only be run on "make
> check"
> (to be consistent with autotools). That was not going to be due to this
> thing
> called "compromise".
>
> Im just warning that this is a bikeshedding topic that we already had an
> expensive compromise on -- and reopening this will at best require updating
> lots of docs and will at worst open yet another longwinded discussion --
> for little gain.
>
> Best,
>
> Bjoern
>
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Running unit test by make

2017-11-12 Thread Zolnai Tamás
Oh, I just see that in sw module all tests are moved to slowcheck. I guess
somebody already have this issue. So I do the same for sd model which has
more and more tests nowdays.:
https://gerrit.libreoffice.org/#/c/44656/

2017-11-12 19:00 GMT+01:00 Zolnai Tamás :

> Independently from the actual question, which is still unanswered, it's
> always a pleasure to see how "old" developers - living in a symbiosis with
> the code - are worrying about the status quo.
>
> 2017-11-12 18:39 GMT+01:00 Zolnai Tamás :
>
>>
>> As others have pointed out, the targets you are looking for are
>>>> available. If
>>>> you dont like how they are named, please just create yourself some
>>>> function or
>>>> alias in your local ~/.bashrc, but do not force this on the rest of the
>>>> world[1].
>>>>
>>>
>> Anyway adding an optional configure option does not mean forcing anybody
>> to do anything.
>> It was just the idea of an other quasi hidden option (as there are a lots
>> of mostly unknown configure options), but as I said I can solve it my local
>> machine.
>> I was just interested in what is the reason of running random tests by
>> plain make.
>>
>> Best Regards,
>> Tamás
>>
>>
>
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Running unit test by make

2017-11-12 Thread Zolnai Tamás
Independently from the actual question, which is still unanswered, it's
always a pleasure to see how "old" developers - living in a symbiosis with
the code - are worrying about the status quo.

2017-11-12 18:39 GMT+01:00 Zolnai Tamás :

>
> As others have pointed out, the targets you are looking for are available.
>>> If
>>> you dont like how they are named, please just create yourself some
>>> function or
>>> alias in your local ~/.bashrc, but do not force this on the rest of the
>>> world[1].
>>>
>>
> Anyway adding an optional configure option does not mean forcing anybody
> to do anything.
> It was just the idea of an other quasi hidden option (as there are a lots
> of mostly unknown configure options), but as I said I can solve it my local
> machine.
> I was just interested in what is the reason of running random tests by
> plain make.
>
> Best Regards,
> Tamás
>
>
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Running unit test by make

2017-11-12 Thread Zolnai Tamás
> As others have pointed out, the targets you are looking for are available.
>> If
>> you dont like how they are named, please just create yourself some
>> function or
>> alias in your local ~/.bashrc, but do not force this on the rest of the
>> world[1].
>>
>
Anyway adding an optional configure option does not mean forcing anybody to
do anything.
It was just the idea of an other quasi hidden option (as there are a lots
of mostly unknown configure options), but as I said I can solve it my local
machine.
I was just interested in what is the reason of running random tests by
plain make.

Best Regards,
Tamás
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Running unit test by make

2017-11-12 Thread Zolnai Tamás
When I said I'll solve it locally, I mean I'll solve it on my machine only.

2017-11-12 18:29 GMT+01:00 Bjoern Michaelsen <
bjoern.michael...@libreoffice.org>:

> Hi,
>
> On Sat, Nov 11, 2017 at 09:40:41PM +0100, Zolnai Tamás wrote:
> > I meant a configure option what you can add to autogen.input and so you
> > don't need to type make .build or make build-nocheck, but use the
> > simple "make" for building and make check for run a build with tests, but
> > never mind I solve it locally.
>
> Please dont. There have been endless bikeshed on which target do what and
> everytime you change something there will be another (unproductive) one.
> And it
> will take at least 6 month until all the documentation and wikipages on the
> build are again reflecting the status quo.
>
> Furthermore, this isnt about configuration, but about build targets -- so
> it
> doesnt belong to autoconf (which already does way to many things anyway).
>
> As others have pointed out, the targets you are looking for are available.
> If
> you dont like how they are named, please just create yourself some
> function or
> alias in your local ~/.bashrc, but do not force this on the rest of the
> world[1].
>
> Best,
>
> Bjoern
>
> [1] The _only_ reason to change the meaning of common targets at all is to
> move them
> towards the most widely accepted expectations. And that would be to
> resemble:
> http://airs.com/ian/configure/
> as closly as possible. OTOH, better fitting someones personal taste is
> NOT a
> good reason for change.
> And even in the case of moving towards what autotools would do, the
> main
> task is hunting down and updating all preexisting LibreOffice build
> documentation in wikis, askbot, repos and articles and adapt that.
> Without the latter, such a change would STILL be a net negative.
>
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Running unit test by make

2017-11-11 Thread Zolnai Tamás
I meant a configure option what you can add to autogen.input and so you
don't need to type make .build or make build-nocheck, but use the
simple "make" for building and make check for run a build with tests, but
never mind I solve it locally.

2017-11-11 20:59 GMT+01:00 Jaskaran Singh :

> Its actually make build-nocheck
>
> On Sun, Nov 12, 2017 at 1:16 AM, Noel Grandin 
> wrote:
>
>> make build.nocheck​
>>
>> ___
>> LibreOffice mailing list
>> LibreOffice@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/libreoffice
>>
>>
>
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Running unit test by make

2017-11-11 Thread Zolnai Tamás
Anyway, I guess it's OK if I add a config option which avoids running unit
tests by simple make.
It does not make too much sense to me to run only some of the tests on a
module or on the full source. These tests are different only in the run
time, so I can't imagine when it's usefull to run only the fast tests.

Best Regards,
Tamás

2017-11-10 9:33 GMT+01:00 Miklos Vajna :

> Hi,
>
> On Fri, Nov 10, 2017 at 08:03:18AM +0100, Zolnai Tamás <
> zolnaitamas2...@gmail.com> wrote:
> > >  make .build
> >
> > Great, but then what is simple make for?
>
> Similar to plain 'make' (which runs a subset of all tests: unit and
> slowchecks, but not subsequentchecks), 'make ' also runs only a
> subset of tests (unitchecks, but not slowchecks or subsequentchecks).
>
> (Yes, this just describes the situation, I don't know the reasoning
> behind this behavior.)
>
> Regards,
>
> Miklos
>
> ___
> LibreOffice mailing list
> LibreOffice@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/libreoffice
>
>
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Running unit test by make

2017-11-09 Thread Zolnai Tamás
2017-11-10 7:44 GMT+01:00 Noel Grandin :

> if you don't want to run the tests you can do
>
>  make .build
> ​
>

Great, but then what is simple make for?
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Running unit test by make

2017-11-09 Thread Zolnai Tamás
Hi all,

I wonder what the reason of running some of the unit tests by calling
simple make on a module (e.g. make sd). I used to use simple make while
doing the intensive hacking of the code, when I don't need to run unit
tests at all. After I finished with the codewriting, I can run the unit
tests with make check or a top level make. I guess there is some additional
option with which I can avoid unit tests, but I would not waste my time
with typing.
So I wonder whether there is any good reason for having this unit tests run
by make. Why don't we run tests only by make check? Nowdays most of the
patches are pushed via gerrit, so we don't need to worry about that the
commiter don't run the unit tests before pushing to the branch. So I think
it might be good to remove this type of unit tests and run these tests as
slow check targets. At least a config option would be usefull, which can do
that.

Any thoughts about this?

Best Regards,
Tamás
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: libgltf, glTF models, collada etc ?

2017-10-27 Thread Zolnai Tamás
Hi,

It seems a good idea to remove this 3D model support. It's not really used.
Also libgltf is abandoned now (I stopped working on it for some time past).

Best Regards,
Tamás

2017-10-19 16:43 GMT+02:00 Caolán McNamara :

> So we have support for glTF models in LibreOffice. There's is then the
> bug tdf#103884 that they don't work under gtk3. One reason they don't
> work in gtk3 is because gtk3 opengl support is restricted to the core
> profile and libgltf uses a few of the older non-core things.
>
> e.g. would need these fixes...
> https://gerrit.libreoffice.org/#/c/41994/
> https://gerrit.libreoffice.org/#/c/41998/
>
> There's still some other problems that need fixing, but before spending
> any more effort on this...
>
> is this whole 3d model feature still something we still actually want
> to have ? It seems to me to be of marginal utility.
>
>
> ___
> LibreOffice mailing list
> LibreOffice@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/libreoffice
>
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Timer asserts on Windows when opening any bigger document.

2017-09-12 Thread Zolnai Tamás
Hi,

On master I experience that the code always asserts when I try to open any
document which takes a bigger amount of time on Windows.
The assertion comes from the timer code:
https://opengrok.libreoffice.org/xref/core/vcl/win/app/salinst.cxx#725

Is there any idea why this asserts? Can this assert be disabled? I guess
this assert was added recently and code does not respect the idea behind
that assert.

Thanks,
Tamás
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: git-hook: Catch tab indentation also for makefiles

2017-09-04 Thread Zolnai Tamás
2017-09-04 17:13 GMT+02:00 jani libreoffice :

>
> I think temporary GNU make still needs recipe lines to start with tab
>> characters?  And in any case, our makefiles are apparently written with
>> lots of tab characters all over the place.  I'd suggest to revert (at least
>> for now).
>
>
> Yeah, I see that tabs and spaces are mixed in makefiles. That's why I
> thought it would be good to make it consistent similar to other source
> files.
> I did not push it yet. It's on gerrit. So I can abandon it.
>
>
> build breaks on my mac when I replace tab with spaces, so please do not
> make this a demand.
>

OK, I abandoned the patch. Thanks!
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: git-hook: Catch tab indentation also for makefiles

2017-09-04 Thread Zolnai Tamás
2017-09-04 15:43 GMT+02:00 Stephan Bergmann :

> On 09/04/2017 03:30 PM, Tamas Zolnai wrote:
>
>> I just noticed that for makefiles (*.mk) git does not check whether the
>> commit contains tab indentation. As I know we use spaces also for makefiles
>> for indentation, right? So I added a patch changing pre-commit hook to
>> check tab also for makfiles:
>> https://gerrit.libreoffice.org/#/c/41897/
>> I hope it's ok. I don't know who used to care of git stuff.
>>
>
> I think temporary GNU make still needs recipe lines to start with tab
> characters?  And in any case, our makefiles are apparently written with
> lots of tab characters all over the place.  I'd suggest to revert (at least
> for now).


Yeah, I see that tabs and spaces are mixed in makefiles. That's why I
thought it would be good to make it consistent similar to other source
files.
I did not push it yet. It's on gerrit. So I can abandon it.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Revert "tdf#106283: Registry settings are not read properly on Windows"

2017-03-07 Thread Zolnai Tamás
Hi Stephan,

>> 2. About your idea how to fix it in windows registry handler code.
>> I hope I understand your words well. So you suggest to have a third
>> entry for Windows registry keys which specifies the type. For the
>> first thought it was a good idea, as you sad it would be easy to
>> implement. However on the second thought, It was not. LO config
>> manager knows the type of a configuration property, it can search the
>> type of a property in LO configuration files. I think this type
>> deduction or type detection is a function of config manager and not a
>> bug or a hack. Your suggestion means that we add the users some extra
>
>
> No, there's no extra work we burden on the user.  A prop of type oor:any
> (which extension props implicitly are) can take on values of different types
> at different times.  Whenever you specify the value of such a prop, you also
> need to specify the type.
>
> (Claiming that this is adding extra burden on the user is a bit like
> claiming that it is extra burden that e.g. for a boolean prop you need to
> specify the value "false" explicitly, instead of guessing that if no value
> is specified then "false" should be implied.)

Well, If we can't agree at least in that it takes more time to specify
the type explicitly in the Windows registry, than don't, then this
conversation might not lead anywhere. C++ language also has a type
deduction (e.g. auto), in spite of programmers must intimately know
what kind of objects they are using in the code.

>> work (specifying the type of a property), which can be handled by the
>> software itself (my change is about this). As I know software
>
>
> No, again, the software cannot guess the missing type in general.  See
> above.

I see. You are thinking in generalities. I would say, yes config
manager can't guess type in general, but it does not mean it can't
guess it in some usefull cases.

So to be more specific. We have an extensible group defined in
officecfg/registry/schema/org/openoffice/Office/Jobs.xcs called
"Arguments". Here there are no properties defined.
The actual properties are defined in
extensions/source/update/check/org/openoffice/Office/Jobs.xcu. Here
the properties are defined with a name and a type.
As I see this xcu file is converted to an xcd file placed in instdir
(onlineupdate.xcd). This xcd file is read by the config manager
and this allows to have a type hint. So type manager does not work
only based on the scheme file (which defines an extensible group wich
properties might have any type). Also the user need to know the actual
"implementation" of an extensible group (which is defined empty in the
scheme file).

It's true that scheme file does not specify the type of properties of
this extensible group, but also it does not specify the properties at
all. A property called "AutoDownloadEnabled" is defined only in the
onlineupdate.xcd (or Jobs.xcu) file which also defines the type of it.
So when a user finds this property in the LibreOffice configuration
files it clearly has a type. I don't think the property called
"AutoDownloadEnabled" can be set to a different typed value (e.g. via
registrymodification.xcu) without making LO behave unexpectedly. (code
handles this property as bool: see cui/source/options/optupdt.cxx).

Summary, you must be right in general, that configuration scheme files
does not allow to guess the type of such properties. I still think it
can be usefull for the users when an extensible group's properties are
well defined in an xcd file, but ok I see this kind of XCU files are
invalid (now that I saw the specification). So the problem is that we
are using this temporary xcu file for applying windows registry
settings. I will have a look at this problem.

Best Regards,
Tamás
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Revert "tdf#106283: Registry settings are not read properly on Windows"

2017-03-07 Thread Zolnai Tamás
Hi Stephan,

So I think this conversation is heading somewhere. So two things I
have in my minds.

1. From the users perspective (XCU user).
What I see is that user can specify a property in an XCU file without
a type if this proprty is not a member of an extensible group. This
bug I'm trying to fix affects only that rare case when this property
is a member of an extensible group. So my first question is that is
this validity concern is only related to that corner case when a
property is a member of an extensible group? Are other kind of
properties OK if they are used without a type in an XCU file? (I'm
speaking such xcu files which are merged with other LO configuration
files (e.g. registrymodification.xcu) and so type is known)
Is there any specification of these configuration file formats in the meantime?
Other question is that from the user perspective what the difference
between these two kind of properties? (member of an extensible group
or not a member of an extensible group). As a user should I handle
these two kind of properties on a different way? Actually as a user I
would focus on the information that both are properties, both can be
set via Windows registry and I would not care about the
implementation. So I think if allowing this "invalid input" makes
users' every day life easier then I think we should step on this
direction and make this invalid input a valid input.

2. About your idea how to fix it in windows registry handler code.
I hope I understand your words well. So you suggest to have a third
entry for Windows registry keys which specifies the type. For the
first thought it was a good idea, as you sad it would be easy to
implement. However on the second thought, It was not. LO config
manager knows the type of a configuration property, it can search the
type of a property in LO configuration files. I think this type
deduction or type detection is a function of config manager and not a
bug or a hack. Your suggestion means that we add the users some extra
work (specifying the type of a property), which can be handled by the
software itself (my change is about this). As I know software
development used to work on the oposite direction with the aim of
making users life easier, make them get the same result with less
effort, right? So that's why I don't think it's a good idea what you
suggest.

Best Regards,
Tamás

2017-03-07 10:30 GMT+01:00 Stephan Bergmann :
> On 03/07/2017 10:00 AM, Zolnai Tamás wrote:
>>>
>>> So coming back to <https://gerrit.libreoffice.org/#/c/34933/>, I'm not
>>> too
>>> excited about that hack.  It's a quick-fix to work around one specific
>>> shortcoming of the naive Windows registry mapping, but in a way that
>>> would
>>> require that hack to stay for backwards-compatibility reasons even
>>> when/if a
>>> more principled fix for that mapping is done.
>>
>>
>> What do you mean by that "would require that hack to stay for
>> backwards-compatibility reasons"? Why? Do you mean that if now we
>
>
> What I meant is:
>
> Encoding an extension prop in the Windows registry is not possible today
> (because the encoding lacks type information).  So a Windows registry
> instance containing an extension prop (necessarily lacking type information)
> is invalid input to LO.
>
> Gerrit 34933 makes valid certain such invalid inputs.  Users will rely on
> this by providing such inputs.
>
> And users will expect that such inputs remain valid in the future.  (Or
> would you be fine with incompatibly forbidding such inputs again in the
> future?)  Which implies that we'll need to keep the code from Gerrit 34933
> around.
>
>> handle a property without an explicit type (inside an extensible
>> group), than this will be required in the future too? As I see config
>
>
> Yes.  If we now give meaning to certain so-far invalid inputs, we'll
> probably need to continue to do so, see above.
>
>> manager works on the same way for other properties which are not
>> member of an extensible group. It's also an invalid thing, right? And
>
>
> I don't understand this part.
>
>> also the temporary xcu file is generated by LibreOffice, so I hope
>> nobody uses this temporarily generated xcu file as a template or
>> something like that.
>
>
> I'm not sure what the temporary xcu files have to do with this.
>
>> Also I think that principle fix you mentioned is not something which
>> would be allowed to push to a bugix branch, so I think it's better to
>> make it work, if users use it. Of course you are right on that this
>> windos registry handling can be improved.
>
>
> What's wrong with the approach of adding a "Type" key? 

Re: Revert "tdf#106283: Registry settings are not read properly on Windows"

2017-03-07 Thread Zolnai Tamás
Hi Stephan,

> So coming back to , I'm not too
> excited about that hack.  It's a quick-fix to work around one specific
> shortcoming of the naive Windows registry mapping, but in a way that would
> require that hack to stay for backwards-compatibility reasons even when/if a
> more principled fix for that mapping is done.

What do you mean by that "would require that hack to stay for
backwards-compatibility reasons"? Why? Do you mean that if now we
handle a property without an explicit type (inside an extensible
group), than this will be required in the future too? As I see config
manager works on the same way for other properties which are not
member of an extensible group. It's also an invalid thing, right? And
also the temporary xcu file is generated by LibreOffice, so I hope
nobody uses this temporarily generated xcu file as a template or
something like that.
Also I think that principle fix you mentioned is not something which
would be allowed to push to a bugix branch, so I think it's better to
make it work, if users use it. Of course you are right on that this
windos registry handling can be improved.

Best Regards,
Tamás
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Stop jenkins when new patchset uploaded?

2017-02-05 Thread Zolnai Tamás
Hi there,

I wonder whether it can be solved somehow to stop jenkins build, when
a new patch set is uploaded to gerrit. It seems a waste of resources
to finish build of a previous patch set if a new one is there.

Thanks,
Tamás
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: loplugin:useuniqueptr and a crash

2017-02-01 Thread Zolnai Tamás
2017-02-01 18:56 GMT+00:00 Zolnai Tamás :
> Hi guys,
>
> I tried to revert one loplugin:useuniqueptr related change because it
> makes Impress to crash:
> https://bugs.documentfoundation.org/show_bug.cgi?id=105677
>
> But as I pushed a patch to gerrit I see that it makes build failing:
> https://gerrit.libreoffice.org/#/c/33805/
> http://ci.libreoffice.org/job/lo_gerrit/6397/Config=linux_clang_dbgutil_64/console
>
> So what can I do here?

Was a useless question actually.. Noel, I cc-d you to the related bug.

Best Regards,
Tamás
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


loplugin:useuniqueptr and a crash

2017-02-01 Thread Zolnai Tamás
Hi guys,

I tried to revert one loplugin:useuniqueptr related change because it
makes Impress to crash:
https://bugs.documentfoundation.org/show_bug.cgi?id=105677

But as I pushed a patch to gerrit I see that it makes build failing:
https://gerrit.libreoffice.org/#/c/33805/
http://ci.libreoffice.org/job/lo_gerrit/6397/Config=linux_clang_dbgutil_64/console

So what can I do here?

Thanks,
Tamás
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: minutes of ESC call ...

2017-01-30 Thread Zolnai Tamás
Hi,

> * TDF / Budgeting / Brainstorming (Thorsten)
> + checkout spreadsheet:
> https://demo.collaboracloudsuite.com/tdf/index.php/apps/richdocuments/index#719_%2FESC%20minutes
>  + currently ranked by highest score
>  + interesting ranking, thanks for rating.

When will these scores be public? I'm interested how ranking looks like.

Thanks,
Tamás
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Gerrit: mark patches as waiting for review

2017-01-03 Thread Zolnai Tamás
2017-01-03 12:21 GMT+01:00 Bjoern Michaelsen :
> Hi,
>
> On Tue, Jan 03, 2017 at 12:16:29PM +0100, Bjoern Michaelsen wrote:
>> for now, as I dont know (and dont want to know really) how to patch gerrit.
>
> Turns out patching gerrit isnt really needed as at:
>
>  https://gerrit.libreoffice.org/#/settings/preferences
>
> you can set up as much custom queries as you like for your gerrit.
>
> E.g. insert:
>
>  want review
>  #/q/status:open+-label:Code-Review%253D0+-ownerin:Committers
>
> press "+" and save and you have that shortcut.

Thanks Bjoern, it works well!
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Gerrit: mark patches as waiting for review

2017-01-02 Thread Zolnai Tamás
Hi,

I just wondering whether gerrit can be improved some way to make it
allow to mark patches which are actually waiting for review. It's
common to upload patches only for Jenkins to check whether the patch
builds.
It would be good to have some option to filter for patches which need
review. It would make reviewing process faster.

Best Regards,
Tamás
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice-qa] minutes of ESC call ...

2016-11-24 Thread Zolnai Tamás
2016-11-24 21:30 GMT+01:00 Thorsten Behrens :
> Michael Meeks wrote:
>> On 24/11/16 18:34, Zolnai Tamás wrote:
>> > Can I have some code pointers from the last 5 years which shows when
>> > it is "absolutely necessary" to break compatibility? To see when it's
>> > acceptable to do such thing.
>>
>>   I think its worth discussing it with the ESC if its significant.
>>
> Seconded. And if you look at the type reference history, you notice we
> were trying really quite hard not to break published API. It can be
> avoided almost all the time.
>
> I'll repeat the point I made during the ESC here: there's a price when
> one breaks things (API, work flows, interop) for users - beyond a
> certain limit, they consider your project not worth using
> anymore. Since the livelihood for a number of people on this list
> depends on LibreOffice having more users, instead of having less, I
> really rather feel quite strongly about those things.

Hi Thorsten,

I agree with you about that there's a price of breaking things, but I
also see that LibreOffice struggles with regressions and solving
something in ~500 lines of code change instead of ~15 lines means some
new potential regressions.
However it's true that regressions in our core code can be fixed by
ourselves, but regressions coming from API incompatibility can be
fixed only by 3rd party code maintainers (by updating their code or
updating jar files). On the other hand regression in core code affects
all LO users, while API incompatibility affects only those who uses
the specific part of the API.
But, it's OK if this API is working like that (or at least I can't do
anything with that). It just a bit surprising for me. I used other
APIs/SDKs as a user and there it was not a problem if an enum was
extended. I never expected as an SDK user that a published enum will
never change, but those APIs were written in C/C++, so maybe it's
something about Java code.

Best Regards,
Tamás
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: minutes of ESC call ...

2016-11-24 Thread Zolnai Tamás
Hi,

> * Pivot-Tables / UNO / API evolution (Eike)
>+ current state looks good (Eike)
>   + new feature will work.
>+ what needs clarification in future: when & how to break stable API
>   + if not absolutely necessary - don't do it.
>   + adding a new constant is more work & more ugly.
>+ new interface / Function2 bits is uglier for the API users (Stephan)
>   + will there be further extensions of that list of functions ?
>   + yes ? (Michael)
>   + perhaps not (Eike)
>   + if this is the only change this century - say go with incompatible 
> change (Stephan)
>   + if will be further additions likely; perhaps pay the price now.
>+ dug at why addition to enums is incompatible (Kendy)
>   + fail to see why we should consider it incompatible.
>   + from semantic POV - fair cop.
>   + but everything we do is controlled by us
>   + code generated, JARs we generate from newer version.
>   + can generate some odd code here - that would cause issues.
>   + with normal use-cases; get a value of enum, do something, put it back.
>   + reasonably transparent.
>   + perhaps some scenario fails; if someone tries to cast random integers 
> into
>  enums or no real technical reason not to extend an enum.
>   + problem with out-of-process Java code & older JAR file (Stephan)
>  + if you bundle JAR file with ext'n or app - have an issue 
> (Kendy)
>   + mostly a moot discussion wrt. danger of extending it (Stephan)
>   + using constant-groups instead.
>   + Function - to a Constant Group ? (Thorsten)
>   + already done etc.
>   + Concern wrt. tone on each side (Thorsten, Michael)
>   + revert first and then discuss seems reasonable close to branch 
> (Norbert)
>   + real problem is the UNO API used internally (Markus)
>   + long-term solution - to get rid of UNO API for internal code.
>   + happy to see this separated (Eike)
>   + could get the XPropertySet / Any to accept different types incoming 
> (Michael)
>   + doesn't help so much for reading.
>   + What is the view wrt. changing byte-code we generate ? (Kendy)
>   + from 5.3 or 5.4 - so we can change the enums safely.
>   + codemaker magic - that needs some modification ?
>   + no-one looked into the .Net binding (Stephan)
>   + don't see a way to change the Java code.
>   + need an object representing that value
>   + don't see the value.
>   + if we hit a place where an incompat way is preferred (Stephan)
>   + we just do that.
>   + enum situation in the past was a hard-wall (Kendy)
>   + larger API changes - asking consider changes here.
>   + in the future -> say - add a FUTURE_ITEMS (Michael)
>   + then people get warned; we never emit this etc.
>   + not sure we get anything here, but if want to do it - why not 
> ? (Stephan)
>   => anyone welcome to look into improving this.
>   + FWIW - Tamas' spare-time fun improvement (Michael)
>   + concern that we consider 3rd party apps carefully as we move ahead 
> (Thorsten)

Thanks for discussing this, even tough this discussion did not lead to change.
I have only one question for the future, if it ever comes into my mind
to implement something which is related to this DAPI.
Can I have some code pointers from the last 5 years which shows when
it is "absolutely necessary" to break compatibility? To see when it's
acceptable to do such thing.

Thanks,
Tamás
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Request for beta2 release

2016-11-23 Thread Zolnai Tamás
Hi,

As I read the release plan I saw that beta2 release is marked as
optional. I don't know how you used to decide to have this beta
release or not, but I'd like to request to have it.
I added a new feature to Calc:
https://wiki.documentfoundation.org/ReleaseNotes/5.3#Pivot_tables
, but this feature is fully broken in beta1, because of a revertion:
https://cgit.freedesktop.org/libreoffice/core/commit/?id=50244309501d738e7314fa79785db139c826f8d7
It's fixed now on an API compatible way. It would be good to have this
feature released as early as possible so users can test it.
I also needed to change hundreds of line in pivot table code:
https://cgit.freedesktop.org/libreoffice/core/commit/?h=libreoffice-5-3&id=f8daf04a1d06f870202a1f1868b59ce90adde0e4
so this also would be good to be tested.

Thanks,
Tamás
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice-commits] core.git: offapi/com offapi/type_reference

2016-11-23 Thread Zolnai Tamás
Hi Eike,

I had no choice. You've made a decision and it seems I have to live
with the consequences.
So please don't insult me with saying 'thank you'.

Tamás

2016-11-23 13:21 GMT+01:00 Eike Rathke :
> Hi Zolnai,
>
> On Tuesday, 2016-11-22 21:43:11 +0100, Eike Rathke wrote:
>
>> What now needs to be done is
>> [...]
>
> Thanks a lot for taking care of that!
>
>   Eike
>
> --
> LibreOffice Calc developer. Number formatter stricken i18n transpositionizer.
> GPG key "ID" 0x65632D3A - 2265 D7F3 A7B0 95CC 3918  630B 6A6C D5B7 6563 2D3A
> Better use 64-bit 0x6A6CD5B765632D3A here is why: https://evil32.com/
> Care about Free Software, support the FSFE https://fsfe.org/support/?erack
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Re: [Libreoffice-commits] core.git: offapi/com offapi/type_reference

2016-11-21 Thread Zolnai Tamás
Hi Kendy,

I wrote down my opinion. Sorry if I went to far with that word
"ridiculous". Ignore that paragraph and you have what I should say on
an ESC call. I would not bother with this API stability/instability
anymore in general. I'm interested in only this specific case.
Discuss it on ESC if needed and send me your decision. I can't do
anything more with that.

Thanks,
Tamás

2016-11-21 22:16 GMT+01:00 Jan Holesovsky :
> Hi Tamas,
>
> I fear this is not the best way to communicate this...  Can you please
> join the ESC call on Thursday? - I think it will be a better place to
> discuss the API stability & instability.
>
> Thank you,
> Kendy
>
> Zolnai Tamás píše v Po 21. 11. 2016 v 20:14 +:
>> Hi Eike, all,
>>
>> Ok, it's starting to be a bit ridiculous from that point.
>> Is it really the way, if I need to change the API, to create new type
>> like GeneralFunction2 and rewrite the whole pivot table code to use
>> that new type? Really this is our policy to never change API in an
>> incompatible way? Never?! What kind of API is that?
>>
>> You wrote that Java code can bail out if it receives an unknown enum
>> value. This can only be a problem if somebody uses this new
>> functionality I added (pivot median), right? Otherwise this enum value
>> is not set. So you suggest that to revert that API change and also the
>> related new functionality to avoid somebody use this new functionality
>> with a 3rd party code which can't handle that. So better to not have a
>> functionality, than have some 3rd party code which potentially will
>> have problem with that functionality. Why? Who expects that an older
>> 3rd party code can handle a new functionality without updating the
>> code? If a 3rd party code manipulates pivot tables, it won't work for
>> pivot tables with the new median function anyway, right?
>>
>> I checked your suggestion how to extend API on a compatible way, but
>> it seems more risky than extending this GeneralFunction enum. If I
>> understand well your words and if I create a new type called
>> GeneralFunction2 and create new interfaces also (I see about 5 such
>> interfaces) and also rewrite the whole pivot table code to use this
>> new API type and interfaces, then I see that it can lead to regression
>> very easily. I don't think that it's worth it. I don't see that either
>> if the pivot table code uses GeneralFunction2, but a 3rd party code
>> calles API functions with GeneralFunction how it will work. What is
>> needed to make GeneralFunction to be mapped to Generalfunction2.
>>
>> Best Regards,
>> Tamás
>>
>> > On Monday, November 21, 2016 15:20 GMT, Eike Rathke  
>> > wrote:
>> >
>> >> Hi Tamás,
>> >>
>> >> On Monday, 2016-11-21 13:43:18 +, Tamás Zolnai wrote:
>> >>
>> >> >  offapi/com/sun/star/sheet/GeneralFunction.idl |   14 ++
>> >> >  offapi/type_reference/offapi.idl  |   18 +-
>> >>
>> >> This is a no-go, already the previous commit
>> >> eb27a63a38ee7d15292dc40520b0605e4c2228e2 was.. if you have to modify> 
>> >> offapi/type_reference/offapi.idl then obviously you're introducing an
>> >> incompatible change, and the type_reference should *never* be modified,
>> >> as it exactly checks API against incompatibilites with existing API.>
>> >> In this case extending an enum with a new value, even if appended, may
>> >> cause problems with existing Java programs, if it receives an unknown> 
>> >> enum value it will bail out.
>> >>
>> >> Because css::sheet::GeneralFunction is used as readable property, as> 
>> >> return value and also as a member in css::sheet::SubTotalColumn that can
>> >> be returned these changes are not acceptable. Please revert:
>> >>
>> >> commit eabfd1b60f8e181e0ef2721e716210390528f4ce
>> >> Author: Tamás Zolnai 
>> >> Date:   Mon Nov 21 13:57:29 2016 +
>> >>
>> >> commit eb27a63a38ee7d15292dc40520b0605e4c2228e2
>> >> Author: Tamás Zolnai 
>> >> Date:   Sat Nov 19 22:27:20 2016 +0100
>> >>
>> >>
>> >> To introduce new values one has to create a new type, best constant as
>> >> constant values can be extended, add a new optional property using that
>> >> type, overriding the old enum, derive a new interface using the type for
>> >> all interfaces that use GeneralFunction and derive a new struct for
>> >> SubTotalColumn to also use GeneralFunction. Yes this is painful.. and> a 
>> >> reason to never introduce enum types again.
>> >>
>> >> For an example see commit 4c4976f717b3ddce68a872dffc2079ae49c41616
>> ___
>> LibreOffice mailing list
>> LibreOffice@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/libreoffice
>
>
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Re: [Libreoffice-commits] core.git: offapi/com offapi/type_reference

2016-11-21 Thread Zolnai Tamás
Hi Eike, all,

Ok, it's starting to be a bit ridiculous from that point.
Is it really the way, if I need to change the API, to create new type
like GeneralFunction2 and rewrite the whole pivot table code to use
that new type? Really this is our policy to never change API in an
incompatible way? Never?! What kind of API is that?

You wrote that Java code can bail out if it receives an unknown enum
value. This can only be a problem if somebody uses this new
functionality I added (pivot median), right? Otherwise this enum value
is not set. So you suggest that to revert that API change and also the
related new functionality to avoid somebody use this new functionality
with a 3rd party code which can't handle that. So better to not have a
functionality, than have some 3rd party code which potentially will
have problem with that functionality. Why? Who expects that an older
3rd party code can handle a new functionality without updating the
code? If a 3rd party code manipulates pivot tables, it won't work for
pivot tables with the new median function anyway, right?

I checked your suggestion how to extend API on a compatible way, but
it seems more risky than extending this GeneralFunction enum. If I
understand well your words and if I create a new type called
GeneralFunction2 and create new interfaces also (I see about 5 such
interfaces) and also rewrite the whole pivot table code to use this
new API type and interfaces, then I see that it can lead to regression
very easily. I don't think that it's worth it. I don't see that either
if the pivot table code uses GeneralFunction2, but a 3rd party code
calles API functions with GeneralFunction how it will work. What is
needed to make GeneralFunction to be mapped to Generalfunction2.

Best Regards,
Tamás

> On Monday, November 21, 2016 15:20 GMT, Eike Rathke  wrote:
>
>> Hi Tamás,
>>
>> On Monday, 2016-11-21 13:43:18 +, Tamás Zolnai wrote:
>>
>> >  offapi/com/sun/star/sheet/GeneralFunction.idl |   14 ++
>> >  offapi/type_reference/offapi.idl  |   18 +-
>>
>> This is a no-go, already the previous commit
>> eb27a63a38ee7d15292dc40520b0605e4c2228e2 was.. if you have to modify> 
>> offapi/type_reference/offapi.idl then obviously you're introducing an
>> incompatible change, and the type_reference should *never* be modified,
>> as it exactly checks API against incompatibilites with existing API.>
>> In this case extending an enum with a new value, even if appended, may
>> cause problems with existing Java programs, if it receives an unknown> enum 
>> value it will bail out.
>>
>> Because css::sheet::GeneralFunction is used as readable property, as> return 
>> value and also as a member in css::sheet::SubTotalColumn that can
>> be returned these changes are not acceptable. Please revert:
>>
>> commit eabfd1b60f8e181e0ef2721e716210390528f4ce
>> Author: Tamás Zolnai 
>> Date:   Mon Nov 21 13:57:29 2016 +
>>
>> commit eb27a63a38ee7d15292dc40520b0605e4c2228e2
>> Author: Tamás Zolnai 
>> Date:   Sat Nov 19 22:27:20 2016 +0100
>>
>>
>> To introduce new values one has to create a new type, best constant as
>> constant values can be extended, add a new optional property using that
>> type, overriding the old enum, derive a new interface using the type for
>> all interfaces that use GeneralFunction and derive a new struct for
>> SubTotalColumn to also use GeneralFunction. Yes this is painful.. and> a 
>> reason to never introduce enum types again.
>>
>> For an example see commit 4c4976f717b3ddce68a872dffc2079ae49c41616
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice-commits] core.git: 6 commits - offapi/com offapi/type_reference sc/inc sc/qa sc/source

2016-11-21 Thread Zolnai Tamás
Hi Stephan,

2016-11-21 13:23 GMT+01:00 Stephan Bergmann :
> On 11/21/2016 12:53 PM, Zolnai Tamás wrote:
>>
>> 2016-11-21 10:52 GMT+01:00 Stephan Bergmann :
>>>
>>> On 11/20/2016 12:43 AM, Tamás Zolnai wrote:
>>>>
>>>>
>>>> commit eb27a63a38ee7d15292dc40520b0605e4c2228e2
>>>> Author: Tamás Zolnai 
>>>> Date:   Sat Nov 19 22:27:20 2016 +0100
>>>>
>>>> [API Change] PivotMedian: Add median to pivot table function type
>>>
>>>
>>>
>>> Are you sure that this incompatible change is acceptable?  Can you give
>>> some
>>> rationale why that would be so (e.g., this functionality might be known
>>> to
>>> be hardly useful for 3rd party code anyway).
>>
>>
>> Yes. Calc code uses UNO API, that's why I needed to make this
>> modification. The 3rd party code here is Calc.
>
>
> No, 3rd party code is always code that's not shipped as part of LO (so we
> can't adapt it when doing changes like this, so need to rationalize whether
> doing a change like this is acceptable).

I know, what 3rd party code means, thanks. It was irony that Calc is
3rd-party code (well I don't know how to mark a sentence as irony in a
mail). It's problematic that Calc implemented on this way (using API).

But anyway I added a new functionality to Calc and for doing that I
needed to extend API too. I hope it's an acceptable reason. Can we
agree on that?

> The general approach is to avoid incompatible changes as much as possible.
> And if there is compelling reason and consensus to do such a change
> nevertheless, to do it in the least disruptive way.

OK. Then I'll move median to the end of this GeneralFunction enum, to
avoid broke those 3rd party code which uses enums on such way it leads
to problem.

Thanks,
Tamás
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice-commits] core.git: 6 commits - offapi/com offapi/type_reference sc/inc sc/qa sc/source

2016-11-21 Thread Zolnai Tamás
Hi Stephan,

2016-11-21 10:52 GMT+01:00 Stephan Bergmann :
> On 11/20/2016 12:43 AM, Tamás Zolnai wrote:
>>
>> commit eb27a63a38ee7d15292dc40520b0605e4c2228e2
>> Author: Tamás Zolnai 
>> Date:   Sat Nov 19 22:27:20 2016 +0100
>>
>> [API Change] PivotMedian: Add median to pivot table function type
>
>
> Are you sure that this incompatible change is acceptable?  Can you give some
> rationale why that would be so (e.g., this functionality might be known to
> be hardly useful for 3rd party code anyway).

Yes. Calc code uses UNO API, that's why I needed to make this
modification. The 3rd party code here is Calc.

> Why did you add the new member in the middle, changing the values of many
> existing members?  Adding it to the end would at least reduce the risk of
> breaking things.

I thought we can change API on an incompatible way in main versions
like 5.3. Was I wrong here?
I added to the middle because I tried to add it to a reasonable place
in this list. Median can be in a group with Average, Maximum and
Minimum in meaning, but of course I can take it down to the end if
that's your main problem.

In general I don't agree with that idea to fear to change anything in
the API, because it ties the development of it. API actually should
follow the changes of the internal code. Of course, I accept that it
should be done a reasonable way, along a reasonable policy. So my
question is, when I can change API in an incompatible way? What is the
policy here?

Thanks,
Tamás
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: filter/source

2016-09-03 Thread Zolnai Tamás
 filter/source/xsltdialog/xmlfiltersettingsdialog.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit b1053933a9569fdf791aad1dce0ee4f1d3a082dd
Author: Zolnai Tamás 
Date:   Sun Sep 4 01:05:12 2016 +0200

cppcheck: nullPointer

Change-Id: I171d396198dc91b0e0d2ce00f130359ff5f6018b

diff --git a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx 
b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
index f0cab38..94aa8d5 100644
--- a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
+++ b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
@@ -466,7 +466,7 @@ bool XMLFilterSettingsDialog::insertOrEdit( 
filter_info_impl* pNewInfo, const fi
 }
 
 // check if we need to copy the template
-if( !pFilterEntry->maImportTemplate.isEmpty() )
+if( bOk && !pFilterEntry->maImportTemplate.isEmpty() )
 {
 if( !pFilterEntry->maImportTemplate.matchIgnoreAsciiCase( 
m_sTemplatePath ) )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sw/source

2016-09-03 Thread Zolnai Tamás
 sw/source/ui/fldui/fldref.cxx |6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

New commits:
commit 4a7a36b544e1ae3c87fef014922d572c409e94ff
Author: Zolnai Tamás 
Date:   Sat Sep 3 23:52:19 2016 +0200

cppcheck: variableScope

Change-Id: Id290ca5e53c75b2c27dda6a6bb228a380084b115

diff --git a/sw/source/ui/fldui/fldref.cxx b/sw/source/ui/fldui/fldref.cxx
index 4c880b9..301cfb5 100644
--- a/sw/source/ui/fldui/fldref.cxx
+++ b/sw/source/ui/fldui/fldref.cxx
@@ -588,11 +588,10 @@ void SwFieldRefPage::UpdateSubType(const OUString& 
filterString)
 bool bCertainTextNodeSelected( false );
 for ( size_t nOutlIdx = 0; nOutlIdx < maOutlineNodes.size(); 
++nOutlIdx )
 {
-SvTreeListEntry* pEntry = nullptr;
 bool isSubstring = MatchSubstring(pIDoc->getOutlineText( 
nOutlIdx, true, true, false ), filterString);
 if(isSubstring)
 {
-pEntry = m_pSelectionToolTipLB->InsertEntry(
+SvTreeListEntry* pEntry = 
m_pSelectionToolTipLB->InsertEntry(
 pIDoc->getOutlineText( nOutlIdx, true, true, false ) );
 pEntry->SetUserData( reinterpret_cast(nOutlIdx) );
 if ( ( IsFieldEdit() &&
@@ -620,11 +619,10 @@ void SwFieldRefPage::UpdateSubType(const OUString& 
filterString)
 bool bCertainTextNodeSelected( false );
 for ( size_t nNumItemIdx = 0; nNumItemIdx < maNumItems.size(); 
++nNumItemIdx )
 {
-SvTreeListEntry* pEntry = nullptr;
 bool isSubstring = MatchSubstring(pIDoc->getListItemText( 
*maNumItems[nNumItemIdx] ), filterString);
 if(isSubstring)
 {
-pEntry = m_pSelectionToolTipLB->InsertEntry(
+SvTreeListEntry* pEntry = 
m_pSelectionToolTipLB->InsertEntry(
 pIDoc->getListItemText( *maNumItems[nNumItemIdx] ) );
 pEntry->SetUserData( reinterpret_cast(nNumItemIdx) 
);
 if ( ( IsFieldEdit() &&
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sw/source

2016-09-03 Thread Zolnai Tamás
 sw/source/filter/html/htmlatr.cxx |4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

New commits:
commit 423b4ed6a2474f9ba1110b324b54950c2fc56c76
Author: Zolnai Tamás 
Date:   Sat Sep 3 23:48:43 2016 +0200

cppcheck: variableScope

Change-Id: I3850017bdf3ac2ac0436d4f64f45d61be9c8691a

diff --git a/sw/source/filter/html/htmlatr.cxx 
b/sw/source/filter/html/htmlatr.cxx
index 3c5a598..0eaf819 100644
--- a/sw/source/filter/html/htmlatr.cxx
+++ b/sw/source/filter/html/htmlatr.cxx
@@ -303,10 +303,8 @@ SwHTMLFormatInfo::SwHTMLFormatInfo( const SwFormat *pF, 
SwDoc *pDoc, SwDoc *pTem
 
 pItemSet->Set( pFormat->GetAttrSet() );
 
-bool bSetDefaults = true, bClearSame = true;
 if( pReferenceFormat )
-SwHTMLWriter::SubtractItemSet( *pItemSet, 
pReferenceFormat->GetAttrSet(),
-   bSetDefaults, bClearSame );
+SwHTMLWriter::SubtractItemSet( *pItemSet, 
pReferenceFormat->GetAttrSet(), true, true );
 
 // delete ItemSet that is empty straight away. This will save work
 // later on
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sw/source

2016-09-03 Thread Zolnai Tamás
 sw/source/core/layout/calcmove.cxx |5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit dfc2fa4a9bf9e277461d77fb4004086c089187a8
Author: Zolnai Tamás 
Date:   Sat Sep 3 23:31:20 2016 +0200

cppcheck: variableScope

Change-Id: Idd96330afaee66dcbeddc62c93691139c2a1830d

diff --git a/sw/source/core/layout/calcmove.cxx 
b/sw/source/core/layout/calcmove.cxx
index 8afb53c..ef51393 100644
--- a/sw/source/core/layout/calcmove.cxx
+++ b/sw/source/core/layout/calcmove.cxx
@@ -1248,14 +1248,13 @@ void SwContentFrame::MakeAll(vcl::RenderContext* 
/*pRenderContext*/)
 
 SWRECTFN( this )
 
-bool bMoveable;
-
 while ( !mbValidPos || !mbValidSize || !mbValidPrtArea )
 {
 // - loop prevention
 SwRect aOldFrame_StopFormat( Frame() );
 SwRect aOldPrt_StopFormat( Prt() );
-if ( (bMoveable = IsMoveable()) )
+bool bMoveable = IsMoveable();
+if (bMoveable)
 {
 SwFrame *pPre = GetIndPrev();
 if ( CheckMoveFwd( bMakePage, bKeep, bMovedBwd ) )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Link to old easy hacks page

2016-09-02 Thread Zolnai Tamás
Hi there,

I found that on libreoffice.org
(https://www.libreoffice.org/community/developers/) the link with the
title "Easy Hacks!" point to a deleted wiki page.
Would be good to have a link to the new easy hacks wiki page here.

Thanks,
Tamás
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - oox/source sd/qa

2016-01-11 Thread Zolnai Tamás
 dev/null|binary
 oox/source/ppt/pptshape.cxx |9 ++---
 sd/qa/unit/import-tests.cxx |   27 ---
 3 files changed, 6 insertions(+), 30 deletions(-)

New commits:
commit e18c062be49042945644db438608a6e58c7dc98a
Author: Zolnai Tamás 
Date:   Sun Dec 20 14:21:43 2015 +0100

tdf#96051: FILESAVE: Roundtrip any PPTX file with Shapes creates invalid 
OOXML

Revert "bnc#584721: Import subtitle block to master slides"
This reverts commit b3d50feaa87b670baf68288974005ac26ad31736.

It seems the imported subtitle block makes export corrupt the
output. Better to have a valid output.

(cherry picked from commit a9db17aabc3ac970e6e4754e28310d20138144d9)

Conflicts:
sd/qa/unit/import-tests.cxx

Change-Id: I1a3d4f03e4fa0c4431a5394495682a1b9d7677bc
Reviewed-on: https://gerrit.libreoffice.org/20921
Reviewed-by: Michael Stahl 
Tested-by: Michael Stahl 

diff --git a/oox/source/ppt/pptshape.cxx b/oox/source/ppt/pptshape.cxx
index cf61562..f347639 100644
--- a/oox/source/ppt/pptshape.cxx
+++ b/oox/source/ppt/pptshape.cxx
@@ -144,9 +144,12 @@ void PPTShape::addShape(
 break;
 case XML_subTitle :
 {
-sServiceName = 
"com.sun.star.presentation.SubtitleShape";
-aMasterTextListStyle = 
rSlidePersist.getMasterPersist().get() ? 
rSlidePersist.getMasterPersist()->getBodyTextStyle() : 
rSlidePersist.getBodyTextStyle();
-bClearText = true;
+if ( ( meShapeLocation == Master ) || ( 
meShapeLocation == Layout ) )
+sServiceName = OUString();
+else {
+sServiceName = 
"com.sun.star.presentation.SubtitleShape";
+aMasterTextListStyle = 
rSlidePersist.getMasterPersist().get() ? 
rSlidePersist.getMasterPersist()->getBodyTextStyle() : 
rSlidePersist.getBodyTextStyle();
+}
 }
 break;
case XML_obj :
diff --git a/sd/qa/unit/data/pptx/bnc584721_3.pptx 
b/sd/qa/unit/data/pptx/bnc584721_3.pptx
deleted file mode 100644
index 3866257..000
Binary files a/sd/qa/unit/data/pptx/bnc584721_3.pptx and /dev/null differ
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index bdedca1..53f14e8 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -92,7 +92,6 @@ public:
 void testCreationDate();
 void testBnc584721_1();
 void testBnc584721_2();
-void testBnc584721_3();
 void testBnc584721_4();
 void testBnc904423();
 void testShapeLineStyle();
@@ -134,7 +133,6 @@ public:
 CPPUNIT_TEST(testCreationDate);
 CPPUNIT_TEST(testBnc584721_1);
 CPPUNIT_TEST(testBnc584721_2);
-CPPUNIT_TEST(testBnc584721_3);
 CPPUNIT_TEST(testBnc584721_4);
 CPPUNIT_TEST(testBnc904423);
 CPPUNIT_TEST(testShapeLineStyle);
@@ -862,31 +860,6 @@ void SdImportTest::testBnc584721_2()
 xDocShRef->DoClose();
 }
 
-void SdImportTest::testBnc584721_3()
-{
-// Subtitle was simply skipped on master slides.
-// Check whether the second shape is a subtitle shape with the right text.
-
-::sd::DrawDocShellRef xDocShRef = 
loadURL(getURLFromSrc("/sd/qa/unit/data/pptx/bnc584721_3.pptx"), PPTX);
-
-SdDrawDocument *pDoc = xDocShRef->GetDoc();
-CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != NULL );
-const SdrPage *pPage = &(pDoc->GetPage(1)->TRG_GetMasterPage());
-CPPUNIT_ASSERT_MESSAGE( "no page", pPage != NULL );
-SdrTextObj *pTxtObj = dynamic_cast( pPage->GetObj(1) );
-CPPUNIT_ASSERT_MESSAGE( "no text object", pTxtObj != NULL);
-
-// Check the shape type
-uno::Reference< drawing::XShape > xShape( pTxtObj->getUnoShape(), 
uno::UNO_QUERY );
-CPPUNIT_ASSERT_EQUAL(OUString("com.sun.star.presentation.SubtitleShape"), 
xShape->getShapeType());
-
-// Check the text
-const EditTextObject& aEdit = 
pTxtObj->GetOutlinerParaObject()->GetTextObject();
-CPPUNIT_ASSERT_EQUAL(OUString("Click to edit Master subtitle style"), 
aEdit.GetText(0));
-
-xDocShRef->DoClose();
-}
-
 void SdImportTest::testBnc591147()
 {
 ::sd::DrawDocShellRef xDocShRef = 
loadURL(getURLFromSrc("/sd/qa/unit/data/pptx/bnc591147.pptx"), PPTX);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-1' - oox/source sd/qa

2016-01-04 Thread Zolnai Tamás
 dev/null|binary
 oox/source/ppt/pptshape.cxx |9 ++---
 sd/qa/unit/import-tests.cxx |   24 
 3 files changed, 6 insertions(+), 27 deletions(-)

New commits:
commit fe9971de7e792960dc88fc562f2db04fee48cc2d
Author: Zolnai Tamás 
Date:   Sun Dec 20 14:21:43 2015 +0100

tdf#96051: FILESAVE: Roundtrip any PPTX file with Shapes creates invalid 
OOXML

Revert "bnc#584721: Import subtitle block to master slides"
This reverts commit b3d50feaa87b670baf68288974005ac26ad31736.

It seems the imported subtitle block makes export corrupt the
output. Better to have a valid output.

Change-Id: I1a3d4f03e4fa0c4431a5394495682a1b9d7677bc
(cherry picked from commit a9db17aabc3ac970e6e4754e28310d20138144d9)
Reviewed-on: https://gerrit.libreoffice.org/20923
Tested-by: Jenkins 
Reviewed-by: Miklos Vajna 

diff --git a/oox/source/ppt/pptshape.cxx b/oox/source/ppt/pptshape.cxx
index 869d0c4..ce9b835 100644
--- a/oox/source/ppt/pptshape.cxx
+++ b/oox/source/ppt/pptshape.cxx
@@ -144,9 +144,12 @@ void PPTShape::addShape(
 break;
 case XML_subTitle :
 {
-sServiceName = 
"com.sun.star.presentation.SubtitleShape";
-aMasterTextListStyle = 
rSlidePersist.getMasterPersist().get() ? 
rSlidePersist.getMasterPersist()->getBodyTextStyle() : 
rSlidePersist.getBodyTextStyle();
-bClearText = true;
+if ( ( meShapeLocation == Master ) || ( 
meShapeLocation == Layout ) )
+sServiceName = OUString();
+else {
+sServiceName = 
"com.sun.star.presentation.SubtitleShape";
+aMasterTextListStyle = 
rSlidePersist.getMasterPersist().get() ? 
rSlidePersist.getMasterPersist()->getBodyTextStyle() : 
rSlidePersist.getBodyTextStyle();
+}
 }
 break;
case XML_obj :
diff --git a/sd/qa/unit/data/pptx/bnc584721_3.pptx 
b/sd/qa/unit/data/pptx/bnc584721_3.pptx
deleted file mode 100644
index 3866257..000
Binary files a/sd/qa/unit/data/pptx/bnc584721_3.pptx and /dev/null differ
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index bc2b3a4..3fb64ff 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -91,7 +91,6 @@ public:
 void testCreationDate();
 void testBnc584721_1();
 void testBnc584721_2();
-void testBnc584721_3();
 void testBnc584721_4();
 void testBnc904423();
 void testShapeLineStyle();
@@ -133,7 +132,6 @@ public:
 CPPUNIT_TEST(testCreationDate);
 CPPUNIT_TEST(testBnc584721_1);
 CPPUNIT_TEST(testBnc584721_2);
-CPPUNIT_TEST(testBnc584721_3);
 CPPUNIT_TEST(testBnc584721_4);
 CPPUNIT_TEST(testBnc904423);
 CPPUNIT_TEST(testShapeLineStyle);
@@ -800,28 +798,6 @@ void SdImportTest::testBnc584721_2()
 xDocShRef->DoClose();
 }
 
-void SdImportTest::testBnc584721_3()
-{
-// Subtitle was simply skipped on master slides.
-// Check whether the second shape is a subtitle shape with the right text.
-
-sd::DrawDocShellRef xDocShRef = 
loadURL(getURLFromSrc("/sd/qa/unit/data/pptx/bnc584721_3.pptx"), PPTX);
-
-const SdrPage *pPage = &(GetPage( 1, xDocShRef )->TRG_GetMasterPage());
-SdrTextObj *pTxtObj = dynamic_cast( pPage->GetObj(1) );
-CPPUNIT_ASSERT_MESSAGE( "no text object", pTxtObj != nullptr);
-
-// Check the shape type
-uno::Reference< drawing::XShape > xShape( pTxtObj->getUnoShape(), 
uno::UNO_QUERY );
-CPPUNIT_ASSERT_EQUAL(OUString("com.sun.star.presentation.SubtitleShape"), 
xShape->getShapeType());
-
-// Check the text
-const EditTextObject& aEdit = 
pTxtObj->GetOutlinerParaObject()->GetTextObject();
-CPPUNIT_ASSERT_EQUAL(OUString("Click to edit Master subtitle style"), 
aEdit.GetText(0));
-
-xDocShRef->DoClose();
-}
-
 void SdImportTest::testBnc591147()
 {
 sd::DrawDocShellRef xDocShRef = 
loadURL(getURLFromSrc("/sd/qa/unit/data/pptx/bnc591147.pptx"), PPTX);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: oox/source sd/qa

2015-12-22 Thread Zolnai Tamás
 dev/null|binary
 oox/source/ppt/pptshape.cxx |9 ++---
 sd/qa/unit/import-tests.cxx |   24 
 3 files changed, 6 insertions(+), 27 deletions(-)

New commits:
commit a9db17aabc3ac970e6e4754e28310d20138144d9
Author: Zolnai Tamás 
Date:   Sun Dec 20 14:21:43 2015 +0100

tdf#96051: FILESAVE: Roundtrip any PPTX file with Shapes creates invalid 
OOXML

Revert "bnc#584721: Import subtitle block to master slides"
This reverts commit b3d50feaa87b670baf68288974005ac26ad31736.

It seems the imported subtitle block makes export corrupt the
output. Better to have a valid output.

Change-Id: I1a3d4f03e4fa0c4431a5394495682a1b9d7677bc

diff --git a/oox/source/ppt/pptshape.cxx b/oox/source/ppt/pptshape.cxx
index 869d0c4..ce9b835 100644
--- a/oox/source/ppt/pptshape.cxx
+++ b/oox/source/ppt/pptshape.cxx
@@ -144,9 +144,12 @@ void PPTShape::addShape(
 break;
 case XML_subTitle :
 {
-sServiceName = 
"com.sun.star.presentation.SubtitleShape";
-aMasterTextListStyle = 
rSlidePersist.getMasterPersist().get() ? 
rSlidePersist.getMasterPersist()->getBodyTextStyle() : 
rSlidePersist.getBodyTextStyle();
-bClearText = true;
+if ( ( meShapeLocation == Master ) || ( 
meShapeLocation == Layout ) )
+sServiceName = OUString();
+else {
+sServiceName = 
"com.sun.star.presentation.SubtitleShape";
+aMasterTextListStyle = 
rSlidePersist.getMasterPersist().get() ? 
rSlidePersist.getMasterPersist()->getBodyTextStyle() : 
rSlidePersist.getBodyTextStyle();
+}
 }
 break;
case XML_obj :
diff --git a/sd/qa/unit/data/pptx/bnc584721_3.pptx 
b/sd/qa/unit/data/pptx/bnc584721_3.pptx
deleted file mode 100644
index 3866257..000
Binary files a/sd/qa/unit/data/pptx/bnc584721_3.pptx and /dev/null differ
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index bc2b3a4..3fb64ff 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -91,7 +91,6 @@ public:
 void testCreationDate();
 void testBnc584721_1();
 void testBnc584721_2();
-void testBnc584721_3();
 void testBnc584721_4();
 void testBnc904423();
 void testShapeLineStyle();
@@ -133,7 +132,6 @@ public:
 CPPUNIT_TEST(testCreationDate);
 CPPUNIT_TEST(testBnc584721_1);
 CPPUNIT_TEST(testBnc584721_2);
-CPPUNIT_TEST(testBnc584721_3);
 CPPUNIT_TEST(testBnc584721_4);
 CPPUNIT_TEST(testBnc904423);
 CPPUNIT_TEST(testShapeLineStyle);
@@ -800,28 +798,6 @@ void SdImportTest::testBnc584721_2()
 xDocShRef->DoClose();
 }
 
-void SdImportTest::testBnc584721_3()
-{
-// Subtitle was simply skipped on master slides.
-// Check whether the second shape is a subtitle shape with the right text.
-
-sd::DrawDocShellRef xDocShRef = 
loadURL(getURLFromSrc("/sd/qa/unit/data/pptx/bnc584721_3.pptx"), PPTX);
-
-const SdrPage *pPage = &(GetPage( 1, xDocShRef )->TRG_GetMasterPage());
-SdrTextObj *pTxtObj = dynamic_cast( pPage->GetObj(1) );
-CPPUNIT_ASSERT_MESSAGE( "no text object", pTxtObj != nullptr);
-
-// Check the shape type
-uno::Reference< drawing::XShape > xShape( pTxtObj->getUnoShape(), 
uno::UNO_QUERY );
-CPPUNIT_ASSERT_EQUAL(OUString("com.sun.star.presentation.SubtitleShape"), 
xShape->getShapeType());
-
-// Check the text
-const EditTextObject& aEdit = 
pTxtObj->GetOutlinerParaObject()->GetTextObject();
-CPPUNIT_ASSERT_EQUAL(OUString("Click to edit Master subtitle style"), 
aEdit.GetText(0));
-
-xDocShRef->DoClose();
-}
-
 void SdImportTest::testBnc591147()
 {
 sd::DrawDocShellRef xDocShRef = 
loadURL(getURLFromSrc("/sd/qa/unit/data/pptx/bnc591147.pptx"), PPTX);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] help.git: Changes to 'refs/tags/cp-4.2-30'

2015-11-02 Thread Zolnai Tamás
Tag 'cp-4.2-30' created by Andras Timar  at 
2015-11-02 22:04 -0800

cp-4.2-30

Changes since libreoffice-4-2-branch-point-7:
---
 0 files changed
---
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-4' - sw/source

2015-08-25 Thread Zolnai Tamás
 sw/source/core/layout/paintfrm.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 4ffdf7fa5c2f1fbe16c010c2fef639eb0a0725b6
Author: Zolnai Tamás 
Date:   Sun Aug 23 19:15:14 2015 +0200

tdf#91969: Parts of paragraph border is missing

...when border is around more than one paragraph

Regression from:
16f637dab3c1b5f7ac9eacf2c57347800d3fdf09

Change-Id: Iea9455dd7cc3c301c3e2d5d7903c98d98e515595
(cherry picked from commit 8d933132ab01f0070225fae6cf704c9a1982e8f8)
Reviewed-on: https://gerrit.libreoffice.org/17996
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sw/source/core/layout/paintfrm.cxx 
b/sw/source/core/layout/paintfrm.cxx
index 7c395fb..ad7b6bd 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -476,13 +476,13 @@ static sal_uInt8 lcl_TryMergeLines(
 {
 double const fMergeGap(gProp.nSPixelSzW + gProp.nSHalfPixelSzW); // NOT 
static!
 // A is above/before B
-if( mergeA.second <= mergeB.second &&
+if( mergeA.second <= mergeB.first &&
 mergeA.second + fMergeGap >= mergeB.first )
 {
 return 1;
 }
 // B is above/before A
-else if( mergeB.second <= mergeA.second &&
+else if( mergeB.second <= mergeA.first &&
  mergeB.second + fMergeGap >= mergeA.first )
 {
 return 2;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - sw/source

2015-08-25 Thread Zolnai Tamás
 sw/source/core/layout/paintfrm.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 8f44345f1e3e604dae86fef438014d4941b1d298
Author: Zolnai Tamás 
Date:   Sun Aug 23 19:15:14 2015 +0200

tdf#91969: Parts of paragraph border is missing

...when border is around more than one paragraph

Regression from:
16f637dab3c1b5f7ac9eacf2c57347800d3fdf09

Change-Id: Iea9455dd7cc3c301c3e2d5d7903c98d98e515595
(cherry picked from commit 8d933132ab01f0070225fae6cf704c9a1982e8f8)
Reviewed-on: https://gerrit.libreoffice.org/17979
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sw/source/core/layout/paintfrm.cxx 
b/sw/source/core/layout/paintfrm.cxx
index 4a27d6f..0d8bcaa 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -477,13 +477,13 @@ static sal_uInt8 lcl_TryMergeLines(
 {
 double const fMergeGap(properties.nSPixelSzW + properties.nSHalfPixelSzW); 
// NOT static!
 // A is above/before B
-if( mergeA.second <= mergeB.second &&
+if( mergeA.second <= mergeB.first &&
 mergeA.second + fMergeGap >= mergeB.first )
 {
 return 1;
 }
 // B is above/before A
-else if( mergeB.second <= mergeA.second &&
+else if( mergeB.second <= mergeA.first &&
  mergeB.second + fMergeGap >= mergeA.first )
 {
 return 2;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 3 commits - filter/CppunitTest_filter_msfilter.mk filter/CppunitTest_filter_utils.mk filter/Module_filter.mk filter/qa filter/source sw/source

2015-08-23 Thread Zolnai Tamás
 filter/CppunitTest_filter_msfilter.mk |   46 
 filter/CppunitTest_filter_utils.mk|   46 
 filter/Module_filter.mk   |2 
 filter/qa/cppunit/msfilter-test.cxx   |   77 ++
 filter/qa/cppunit/utils-test.cxx  |   77 --
 filter/source/msfilter/util.cxx   |   12 ++---
 sw/source/core/layout/paintfrm.cxx|4 -
 7 files changed, 132 insertions(+), 132 deletions(-)

New commits:
commit 8d933132ab01f0070225fae6cf704c9a1982e8f8
Author: Zolnai Tamás 
Date:   Sun Aug 23 19:15:14 2015 +0200

tdf#91969: Parts of paragraph border is missing

...when border is around more than one paragraph

Regression from:
16f637dab3c1b5f7ac9eacf2c57347800d3fdf09

Change-Id: Iea9455dd7cc3c301c3e2d5d7903c98d98e515595

diff --git a/sw/source/core/layout/paintfrm.cxx 
b/sw/source/core/layout/paintfrm.cxx
index b3e1f77..db70553 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -487,13 +487,13 @@ static sal_uInt8 lcl_TryMergeLines(
 {
 double const fMergeGap(properties.nSPixelSzW + properties.nSHalfPixelSzW); 
// NOT static!
 // A is above/before B
-if( mergeA.second <= mergeB.second &&
+if( mergeA.second <= mergeB.first &&
 mergeA.second + fMergeGap >= mergeB.first )
 {
 return 1;
 }
 // B is above/before A
-else if( mergeB.second <= mergeA.second &&
+else if( mergeB.second <= mergeA.first &&
  mergeB.second + fMergeGap >= mergeA.first )
 {
 return 2;
commit 9a23428ff030106c4d91ba8b6f3a68ce56b7c428
Author: Zolnai Tamás 
Date:   Fri Jul 24 04:23:30 2015 +0200

Use less operator here to be consistent with the original idea (see comment)

This doesn't change the result of the BestIndex method

Change-Id: If1efc04feac3d4966c126b1fa93d017a4beafbe1

diff --git a/filter/source/msfilter/util.cxx b/filter/source/msfilter/util.cxx
index f7e44c0..ce51d20 100644
--- a/filter/source/msfilter/util.cxx
+++ b/filter/source/msfilter/util.cxx
@@ -1361,17 +1361,17 @@ namespace
 static void CalculateScheme(const BitmapColor& rBitmapColor, std::vector 
&vScheme, sal_uInt16 nVariance)
 {
 vScheme.resize(3,1);
-if( rBitmapColor.GetRed() > rBitmapColor.GetGreen() + nVariance )
+if( rBitmapColor.GetRed() < rBitmapColor.GetGreen() + nVariance )
 ++vScheme[0];
-if( rBitmapColor.GetRed() > rBitmapColor.GetBlue() + nVariance )
+if( rBitmapColor.GetRed() < rBitmapColor.GetBlue() + nVariance )
 ++vScheme[0];
-if( rBitmapColor.GetGreen() > rBitmapColor.GetRed() + nVariance )
+if( rBitmapColor.GetGreen() < rBitmapColor.GetRed() + nVariance )
 ++vScheme[1];
-if( rBitmapColor.GetGreen() > rBitmapColor.GetBlue() + nVariance )
+if( rBitmapColor.GetGreen() < rBitmapColor.GetBlue() + nVariance )
 ++vScheme[1];
-if( rBitmapColor.GetBlue() > rBitmapColor.GetRed() + nVariance )
+if( rBitmapColor.GetBlue() < rBitmapColor.GetRed() + nVariance )
 ++vScheme[2];
-if( rBitmapColor.GetBlue() > rBitmapColor.GetGreen() + nVariance )
+if( rBitmapColor.GetBlue() < rBitmapColor.GetGreen() + nVariance )
 ++vScheme[2];
 }
 
commit 3f339c5e77881a0680552c05997db03a7587bf4b
Author: Zolnai Tamás 
Date:   Thu Jul 16 21:49:55 2015 +0200

Better to call this msfilter test

Change-Id: I2abd6aedb16303d8988c17e7204c9607bf8336a3

diff --git a/filter/CppunitTest_filter_utils.mk 
b/filter/CppunitTest_filter_msfilter.mk
similarity index 56%
rename from filter/CppunitTest_filter_utils.mk
rename to filter/CppunitTest_filter_msfilter.mk
index 1d042a9..aa567cd 100644
--- a/filter/CppunitTest_filter_utils.mk
+++ b/filter/CppunitTest_filter_msfilter.mk
@@ -7,18 +7,18 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 #
 
-$(eval $(call gb_CppunitTest_CppunitTest,filter_utils))
+$(eval $(call gb_CppunitTest_CppunitTest,filter_msfilter))
 
-$(eval $(call gb_CppunitTest_use_sdk_api,filter_utils))
-$(eval $(call gb_CppunitTest_use_ure,filter_utils))
+$(eval $(call gb_CppunitTest_use_sdk_api,filter_msfilter))
+$(eval $(call gb_CppunitTest_use_ure,filter_msfilter))
 
-$(eval $(call gb_CppunitTest_use_configuration,filter_utils))
+$(eval $(call gb_CppunitTest_use_configuration,filter_msfilter))
 
-$(eval $(call gb_CppunitTest_use_externals,filter_utils, \
+$(eval $(call gb_CppunitTest_use_externals,filter_msfilter, \
 boost_headers \
 ))
 
-$(eval $(call gb_CppunitTest_use_libraries,filter_utils, \
+$(eval $(call gb_CppunitTest_use_libraries,filter_msfilter, \
tl \
comphelper \
unotest \
@@ -29,7 +29,7 @@ $(eval $(call gb_CppunitTest_use_libraries,filter_utils, \
$(gb_UWINAPI) \
 ))
 
-$(eval $(call gb_CppunitTest_use_components,filter_utils,\
+$(eval $(call gb_CppunitTest_use_components,filter_msfilter,\
configmgr/source/configmgr \
filter/sou

Plugin idea: const methods, params etc

2015-08-15 Thread Zolnai Tamás
Hi Noel,

I see you work with clang plugins nowadays. I've got an idea for a
next plugin. I think it would be a good idea to constify things in the
source code, which could improve its readability.
For example member functions which use data members read-only / calls
only const methods / change only mutable data members should have the
const qualifier. I guess it's implementation is something similar to
loplugin::staticmethods.
Similar check can be implemented for parameters, which are not changed
in the function and also for local objects used on read-only way in
the scope.

What do you think?

Thanks,
Tamás
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: Branch 'libreoffice-5-0-0' - filter/CppunitTest_filter_utils.mk filter/Module_filter.mk filter/qa filter/source sw/qa

2015-07-30 Thread Zolnai Tamás
 filter/CppunitTest_filter_utils.mk |   46 +
 filter/Module_filter.mk|1 
 filter/qa/cppunit/utils-test.cxx   |   77 +
 filter/source/msfilter/util.cxx|   70 +-
 sw/qa/extras/globalfilter/globalfilter.cxx |   24 -
 5 files changed, 205 insertions(+), 13 deletions(-)

New commits:
commit 5c3a4419d10f1645fc1dd4d160b674a0b274cf2e
Author: Zolnai Tamás 
Date:   Tue Jul 14 09:44:10 2015 +0200

tdf#92471: Improve color conversion to MSO highlighting

The simple color distance on RGB color space is not good enough.
It leads to a better result if we use the scheme of the primary
colors.
This method works well with MSO highlighting color palette, but
not neccessarily in general. In highlighting palette light and
dark variant of the same color type (e.g. blue and light blue) has
the exactly same scheme.

(cherry picked from commit 16f9cf57e20ffbe34cb184f694f465708250a578)

filter: filter_utils test needs tools library (from Michael Stahl)

(cherry picked from commit 75d0f7262004d93d457b4b0b499ebf0b23fcda04)

Missing boost_headers (from Stephan Bergmann)

(cherry picked from commit bd8e8db250f99445dc1a8baa7ffc6ddfe90fdf5b)

Change-Id: I0de6e4598f365fda1cccd1d3466429e52cf4067f
Reviewed-on: https://gerrit.libreoffice.org/17058
Reviewed-by: Thorsten Behrens 
Reviewed-by: Michael Stahl 
Reviewed-by: Christian Lohmaier 
Tested-by: Christian Lohmaier 

diff --git a/filter/CppunitTest_filter_utils.mk 
b/filter/CppunitTest_filter_utils.mk
new file mode 100644
index 000..1d042a9
--- /dev/null
+++ b/filter/CppunitTest_filter_utils.mk
@@ -0,0 +1,46 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_CppunitTest_CppunitTest,filter_utils))
+
+$(eval $(call gb_CppunitTest_use_sdk_api,filter_utils))
+$(eval $(call gb_CppunitTest_use_ure,filter_utils))
+
+$(eval $(call gb_CppunitTest_use_configuration,filter_utils))
+
+$(eval $(call gb_CppunitTest_use_externals,filter_utils, \
+boost_headers \
+))
+
+$(eval $(call gb_CppunitTest_use_libraries,filter_utils, \
+   tl \
+   comphelper \
+   unotest \
+   cppuhelper \
+   cppu \
+   msfilter \
+   sal \
+   $(gb_UWINAPI) \
+))
+
+$(eval $(call gb_CppunitTest_use_components,filter_utils,\
+   configmgr/source/configmgr \
+   filter/source/config/cache/filterconfig1 \
+   framework/util/fwk \
+   framework/util/fwl \
+   i18npool/util/i18npool \
+   ucb/source/core/ucb1 \
+   ucb/source/ucp/file/ucpfile1 \
+))
+
+$(eval $(call gb_CppunitTest_add_exception_objects,filter_utils, \
+   filter/qa/cppunit/utils-test \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/filter/Module_filter.mk b/filter/Module_filter.mk
index 33f0f74..4cb6462 100644
--- a/filter/Module_filter.mk
+++ b/filter/Module_filter.mk
@@ -81,6 +81,7 @@ endif
 $(eval $(call gb_Module_add_check_targets,filter,\
 CppunitTest_filter_xslt \
 CppunitTest_filter_priority \
+CppunitTest_filter_utils \
 ))
 
 ifneq ($(DISABLE_CVE_TESTS),TRUE)
diff --git a/filter/qa/cppunit/utils-test.cxx b/filter/qa/cppunit/utils-test.cxx
new file mode 100644
index 000..5e306ef
--- /dev/null
+++ b/filter/qa/cppunit/utils-test.cxx
@@ -0,0 +1,77 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+
+#include 
+
+namespace {
+
+class UtilsTest
+: public test::BootstrapFixtureBase
+{
+public:
+void testTransColToIco();
+
+CPPUNIT_TEST_SUITE(UtilsTest);
+CPPUNIT_TEST(testTransColToIco);
+CPPUNIT_TEST_SUITE_END();
+};
+
+void UtilsTest::testTransColToIco()
+{
+const sal_uInt32 aStdCol[] = {
+0xee, 0x99, 0xff6600, 0xff, 0xff00cc, 0xff33ff, 0x9900ff, 
0xff, 0x00ccff, 0x66, 0x33ff99, 0x99ff66, 0xccff00,
+0xdd, 0x66, 0xffcc00, 0xff, 0xff66cc, 0xff99ff, 0xcc66ff, 
0xff, 0xff, 0x99, 0x66ff99, 0x99ff99, 0xccff66,
+0xcc, 0x00, 0xff9900, 0xff, 0xff3399, 0xff66ff, 0x9933ff, 
0xff, 0x3399ff, 0x00, 0x00ff66, 0x66ff66, 0x99ff33,
+0xb2b2b2, 0xcc9900, 0xff3300, 0xff, 0xff0066, 0xff00ff, 0x6600ff, 
0xff, 0x0066ff, 0x00, 0x00cc33, 0x00cc00, 0x66ff00,
+0x9

[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - filter/CppunitTest_filter_utils.mk filter/Module_filter.mk filter/qa filter/source sw/qa

2015-07-23 Thread Zolnai Tamás
 filter/CppunitTest_filter_utils.mk |   46 +
 filter/Module_filter.mk|1 
 filter/qa/cppunit/utils-test.cxx   |   77 +
 filter/source/msfilter/util.cxx|   70 +-
 sw/qa/extras/globalfilter/globalfilter.cxx |   24 -
 5 files changed, 205 insertions(+), 13 deletions(-)

New commits:
commit 9bde8bdab1024b24a71d56a4355a5eacca720007
Author: Zolnai Tamás 
Date:   Tue Jul 14 09:44:10 2015 +0200

tdf#92471: Improve color conversion to MSO highlighting

The simple color distance on RGB color space is not good enough.
It leads to a better result if we use the scheme of the primary
colors.
This method works well with MSO highlighting color palette, but
not neccessarily in general. In highlighting palette light and
dark variant of the same color type (e.g. blue and light blue) has
the exactly same scheme.

(cherry picked from commit 16f9cf57e20ffbe34cb184f694f465708250a578)

filter: filter_utils test needs tools library (from Michael Stahl)

(cherry picked from commit 75d0f7262004d93d457b4b0b499ebf0b23fcda04)

Missing boost_headers (from Stephan Bergmann)

(cherry picked from commit bd8e8db250f99445dc1a8baa7ffc6ddfe90fdf5b)

Change-Id: I0de6e4598f365fda1cccd1d3466429e52cf4067f
Reviewed-on: https://gerrit.libreoffice.org/17052
Tested-by: Jenkins 
Reviewed-by: Miklos Vajna 

diff --git a/filter/CppunitTest_filter_utils.mk 
b/filter/CppunitTest_filter_utils.mk
new file mode 100644
index 000..1d042a9
--- /dev/null
+++ b/filter/CppunitTest_filter_utils.mk
@@ -0,0 +1,46 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_CppunitTest_CppunitTest,filter_utils))
+
+$(eval $(call gb_CppunitTest_use_sdk_api,filter_utils))
+$(eval $(call gb_CppunitTest_use_ure,filter_utils))
+
+$(eval $(call gb_CppunitTest_use_configuration,filter_utils))
+
+$(eval $(call gb_CppunitTest_use_externals,filter_utils, \
+boost_headers \
+))
+
+$(eval $(call gb_CppunitTest_use_libraries,filter_utils, \
+   tl \
+   comphelper \
+   unotest \
+   cppuhelper \
+   cppu \
+   msfilter \
+   sal \
+   $(gb_UWINAPI) \
+))
+
+$(eval $(call gb_CppunitTest_use_components,filter_utils,\
+   configmgr/source/configmgr \
+   filter/source/config/cache/filterconfig1 \
+   framework/util/fwk \
+   framework/util/fwl \
+   i18npool/util/i18npool \
+   ucb/source/core/ucb1 \
+   ucb/source/ucp/file/ucpfile1 \
+))
+
+$(eval $(call gb_CppunitTest_add_exception_objects,filter_utils, \
+   filter/qa/cppunit/utils-test \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/filter/Module_filter.mk b/filter/Module_filter.mk
index 33f0f74..4cb6462 100644
--- a/filter/Module_filter.mk
+++ b/filter/Module_filter.mk
@@ -81,6 +81,7 @@ endif
 $(eval $(call gb_Module_add_check_targets,filter,\
 CppunitTest_filter_xslt \
 CppunitTest_filter_priority \
+CppunitTest_filter_utils \
 ))
 
 ifneq ($(DISABLE_CVE_TESTS),TRUE)
diff --git a/filter/qa/cppunit/utils-test.cxx b/filter/qa/cppunit/utils-test.cxx
new file mode 100644
index 000..5e306ef
--- /dev/null
+++ b/filter/qa/cppunit/utils-test.cxx
@@ -0,0 +1,77 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+
+#include 
+
+namespace {
+
+class UtilsTest
+: public test::BootstrapFixtureBase
+{
+public:
+void testTransColToIco();
+
+CPPUNIT_TEST_SUITE(UtilsTest);
+CPPUNIT_TEST(testTransColToIco);
+CPPUNIT_TEST_SUITE_END();
+};
+
+void UtilsTest::testTransColToIco()
+{
+const sal_uInt32 aStdCol[] = {
+0xee, 0x99, 0xff6600, 0xff, 0xff00cc, 0xff33ff, 0x9900ff, 
0xff, 0x00ccff, 0x66, 0x33ff99, 0x99ff66, 0xccff00,
+0xdd, 0x66, 0xffcc00, 0xff, 0xff66cc, 0xff99ff, 0xcc66ff, 
0xff, 0xff, 0x99, 0x66ff99, 0x99ff99, 0xccff66,
+0xcc, 0x00, 0xff9900, 0xff, 0xff3399, 0xff66ff, 0x9933ff, 
0xff, 0x3399ff, 0x00, 0x00ff66, 0x66ff66, 0x99ff33,
+0xb2b2b2, 0xcc9900, 0xff3300, 0xff, 0xff0066, 0xff00ff, 0x6600ff, 
0xff, 0x0066ff, 0x00, 0x00cc33, 0x00cc00, 0x66ff00,
+0x99, 0x996600, 0xcc3300, 0xcc, 0xcc0066, 0xcc00cc, 0x6600cc, 
0xcc, 0x0066cc, 

[Libreoffice-commits] core.git: Branch 'libreoffice-5-0-0' - forms/source

2015-07-23 Thread Zolnai Tamás
 forms/source/component/clickableimage.cxx |   21 +
 forms/source/component/clickableimage.hxx |5 +
 2 files changed, 26 insertions(+)

New commits:
commit 702cc62537676a66dc4d714598e6949527dbe629
Author: Zolnai Tamás 
Date:   Sun Jul 12 18:21:35 2015 +0200

tdf#47832: Pictures on buttons, created in forms, gone after reopening form

When image is set to a Button control the correspoding graphic object
lives only temporarily, after the graphic is copied from the graphic
object it's destroyed so save can't find it by graphic ID.
Use the same solution which works for ImageControls: use a graphic object
member for the control, so save can find it.

(cherry picked from commit 70f152983f3425a77df2f65b4798417640d47b76)

fix windows build (from Noel Grandin)

(cherry picked from commit 4c5498ec5ee478e27fd62bdcf9de1208c692422c)

505b7b0e6bf86093fbed1aa7e28b710e12116e6e

Change-Id: If99a3efc4727a07df9d2daaefbdacc9565920005
Reviewed-on: https://gerrit.libreoffice.org/17057
Reviewed-by: Caolán McNamara 
Reviewed-by: Michael Meeks 
Reviewed-by: Thorsten Behrens 
Reviewed-by: Eike Rathke 
Tested-by: Eike Rathke 

diff --git a/forms/source/component/clickableimage.cxx 
b/forms/source/component/clickableimage.cxx
index a0ac4c0..8ce0de6 100644
--- a/forms/source/component/clickableimage.cxx
+++ b/forms/source/component/clickableimage.cxx
@@ -31,6 +31,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 #include 
 #include 
 #include 
@@ -62,6 +64,7 @@ namespace frm
 using namespace ::com::sun::star::util;
 using namespace ::com::sun::star::frame;
 using namespace ::com::sun::star::form::submission;
+using namespace ::com::sun::star::graphic;
 using ::com::sun::star::awt::MouseEvent;
 using ::com::sun::star::task::XInteractionHandler;
 
@@ -451,6 +454,7 @@ namespace frm
 const OUString& rDefault )
 :OControlModel( _rxFactory, _rUnoControlModelTypeName, rDefault )
 ,OPropertyChangeListener(m_aMutex)
+,m_xGraphicObject()
 ,m_pMedium(NULL)
 ,m_pProducer( NULL )
 ,m_bDispatchUrlInternal(false)
@@ -465,6 +469,7 @@ namespace frm
 OClickableImageBaseModel::OClickableImageBaseModel( const 
OClickableImageBaseModel* _pOriginal, const Reference& 
_rxFactory )
 :OControlModel( _pOriginal, _rxFactory )
 ,OPropertyChangeListener( m_aMutex )
+,m_xGraphicObject( _pOriginal->m_xGraphicObject )
 ,m_pMedium( NULL )
 ,m_pProducer( NULL )
 ,m_bDispatchUrlInternal(false)
@@ -497,6 +502,7 @@ namespace frm
 void OClickableImageBaseModel::implConstruct()
 {
 m_pProducer = new ImageProducer;
+m_pProducer->SetDoneHdl( LINK( this, OClickableImageBaseModel, 
OnImageImportDone ) );
 osl_atomic_increment( &m_refCount );
 {
 m_xProducer = m_pProducer;
@@ -852,6 +858,21 @@ namespace frm
 }
 }
 
+IMPL_LINK( OClickableImageBaseModel, OnImageImportDone, Graphic*, 
i_pGraphic )
+{
+const Reference< XGraphic > xGraphic( i_pGraphic != NULL ? 
Graphic(i_pGraphic->GetBitmapEx()).GetXGraphic() : NULL );
+if ( !xGraphic.is() )
+{
+m_xGraphicObject.clear();
+}
+else
+{
+m_xGraphicObject = css::graphic::GraphicObject::create( m_xContext 
);
+m_xGraphicObject->setGraphic( xGraphic );
+}
+return 1L;
+}
+
 
 // OImageProducerThread_Impl
 
diff --git a/forms/source/component/clickableimage.hxx 
b/forms/source/component/clickableimage.hxx
index 5033375..9337b3c 100644
--- a/forms/source/component/clickableimage.hxx
+++ b/forms/source/component/clickableimage.hxx
@@ -33,6 +33,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 
@@ -64,6 +65,8 @@ namespace frm
 
 // ImageProducer stuff
 ::com::sun::star::uno::Reference< 
::com::sun::star::awt::XImageProducer>m_xProducer;
+// Store the image in a graphic object to make it accesible via 
graphic cache using graphic ID.
+::com::sun::star::uno::Reference< 
::com::sun::star::graphic::XGraphicObject > m_xGraphicObject;
 SfxMedium*  m_pMedium; // Download 
medium
 ImageProducer*  m_pProducer;
 boolm_bDispatchUrlInternal; // 
property: is not allowed to set : 1
@@ -143,6 +146,8 @@ namespace frm
 
 // to be called from within the cloning-ctor of your derived class
 void implInitializeImageURL( );
+
+DECL_LINK( OnImageImportDone, ::Graphic* );
 };
 
 class ImageModelMethodGuard : public ::osl::MutexGuard
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-4-5' - forms/source

2015-07-22 Thread Zolnai Tamás
 forms/source/component/clickableimage.cxx |   21 +
 forms/source/component/clickableimage.hxx |5 +
 2 files changed, 26 insertions(+)

New commits:
commit 09c45087cf02eef3166fb870bae531d40216ca66
Author: Zolnai Tamás 
Date:   Thu Jul 16 03:01:59 2015 +0200

tdf#47832: Pictures on buttons, created in forms, gone after reopening form

When image is set to a Button control the correspoding graphic object
lives only temporarily, after the graphic is copied from the graphic
object it's destroyed so save can't find it by graphic ID.
Use the same solution which works for ImageControls: use a graphic object
member for the control, so save can find it.

(cherry picked from commit 70f152983f3425a77df2f65b4798417640d47b76)

fix windows build (from Noel Grandin)

(cherry picked from commit 4c5498ec5ee478e27fd62bdcf9de1208c692422c)

Conflicts:
forms/source/component/clickableimage.cxx

Change-Id: Iad31904bef65e30796538685f7cd7ae8f59762dc
Reviewed-on: https://gerrit.libreoffice.org/17111
Reviewed-by: Michael Meeks 
Reviewed-by: Adolfo Jayme Barrientos 
Reviewed-by: Christian Lohmaier 
Tested-by: Christian Lohmaier 

diff --git a/forms/source/component/clickableimage.cxx 
b/forms/source/component/clickableimage.cxx
index 71ad12e..fe5bcde 100644
--- a/forms/source/component/clickableimage.cxx
+++ b/forms/source/component/clickableimage.cxx
@@ -31,6 +31,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 #include 
 #include 
 #include 
@@ -62,6 +64,7 @@ namespace frm
 using namespace ::com::sun::star::util;
 using namespace ::com::sun::star::frame;
 using namespace ::com::sun::star::form::submission;
+using namespace ::com::sun::star::graphic;
 using ::com::sun::star::awt::MouseEvent;
 using ::com::sun::star::task::XInteractionHandler;
 
@@ -451,6 +454,7 @@ namespace frm
 const OUString& rDefault )
 :OControlModel( _rxFactory, _rUnoControlModelTypeName, rDefault )
 ,OPropertyChangeListener(m_aMutex)
+,m_xGraphicObject()
 ,m_pMedium(NULL)
 ,m_pProducer( NULL )
 ,m_bDispatchUrlInternal(false)
@@ -465,6 +469,7 @@ namespace frm
 OClickableImageBaseModel::OClickableImageBaseModel( const 
OClickableImageBaseModel* _pOriginal, const Reference& 
_rxFactory )
 :OControlModel( _pOriginal, _rxFactory )
 ,OPropertyChangeListener( m_aMutex )
+,m_xGraphicObject( _pOriginal->m_xGraphicObject )
 ,m_pMedium( NULL )
 ,m_pProducer( NULL )
 ,m_bDispatchUrlInternal(false)
@@ -497,6 +502,7 @@ namespace frm
 void OClickableImageBaseModel::implConstruct()
 {
 m_pProducer = new ImageProducer;
+m_pProducer->SetDoneHdl( LINK( this, OClickableImageBaseModel, 
OnImageImportDone ) );
 increment( m_refCount );
 {
 m_xProducer = m_pProducer;
@@ -852,6 +858,21 @@ namespace frm
 }
 }
 
+IMPL_LINK( OClickableImageBaseModel, OnImageImportDone, Graphic*, 
i_pGraphic )
+{
+const Reference< XGraphic > xGraphic( i_pGraphic != NULL ? 
Graphic(i_pGraphic->GetBitmapEx()).GetXGraphic() : NULL );
+if ( !xGraphic.is() )
+{
+m_xGraphicObject.clear();
+}
+else
+{
+m_xGraphicObject = css::graphic::GraphicObject::create( m_xContext 
);
+m_xGraphicObject->setGraphic( xGraphic );
+}
+return 1L;
+}
+
 
 // OImageProducerThread_Impl
 
diff --git a/forms/source/component/clickableimage.hxx 
b/forms/source/component/clickableimage.hxx
index 60f03b8..f3d34ca 100644
--- a/forms/source/component/clickableimage.hxx
+++ b/forms/source/component/clickableimage.hxx
@@ -33,6 +33,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 
@@ -64,6 +65,8 @@ namespace frm
 
 // ImageProducer stuff
 ::com::sun::star::uno::Reference< 
::com::sun::star::awt::XImageProducer>m_xProducer;
+// Store the image in a graphic object to make it accesible via 
graphic cache using graphic ID.
+::com::sun::star::uno::Reference< 
::com::sun::star::graphic::XGraphicObject > m_xGraphicObject;
 SfxMedium*  m_pMedium; // Download 
medium
 ImageProducer*  m_pProducer;
 boolm_bDispatchUrlInternal; // 
property: is not allowed to set : 1
@@ -143,6 +146,8 @@ namespace frm
 
 // to be called from within the cloning-ctor of your derived class
 void implInitializeImageURL( );
+
+DECL_LINK( OnImageImportDone, ::Graphic* );
 };
 
 class ImageModelMethodGuard : public ::osl::MutexGuard
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-4' - forms/source

2015-07-16 Thread Zolnai Tamás
 forms/source/component/clickableimage.cxx |   21 +
 forms/source/component/clickableimage.hxx |5 +
 2 files changed, 26 insertions(+)

New commits:
commit 3d9b62a40947dbb25360f32a6b330519be6f04ea
Author: Zolnai Tamás 
Date:   Wed Jul 15 23:23:48 2015 +0200

tdf#47832: Pictures on buttons, created in forms, gone after reopening form

When image is set to a Button control the correspoding graphic object
lives only temporarily, after the graphic is copied from the graphic
object it's destroyed so save can't find it by graphic ID.
Use the same solution which works for ImageControls: use a graphic object
member for the control, so save can find it.

(cherry picked from commit 70f152983f3425a77df2f65b4798417640d47b76)

fix windows build (from Noel Grandin)

(cherry picked from commit 4c5498ec5ee478e27fd62bdcf9de1208c692422c)

Conflicts:
forms/source/component/clickableimage.cxx

Change-Id: If99a3efc4727a07df9d2daaefbdacc9565920005
Reviewed-on: https://gerrit.libreoffice.org/17092
Reviewed-by: Michael Meeks 
Tested-by: Michael Meeks 

diff --git a/forms/source/component/clickableimage.cxx 
b/forms/source/component/clickableimage.cxx
index 71ad12e..fe5bcde 100644
--- a/forms/source/component/clickableimage.cxx
+++ b/forms/source/component/clickableimage.cxx
@@ -31,6 +31,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 #include 
 #include 
 #include 
@@ -62,6 +64,7 @@ namespace frm
 using namespace ::com::sun::star::util;
 using namespace ::com::sun::star::frame;
 using namespace ::com::sun::star::form::submission;
+using namespace ::com::sun::star::graphic;
 using ::com::sun::star::awt::MouseEvent;
 using ::com::sun::star::task::XInteractionHandler;
 
@@ -451,6 +454,7 @@ namespace frm
 const OUString& rDefault )
 :OControlModel( _rxFactory, _rUnoControlModelTypeName, rDefault )
 ,OPropertyChangeListener(m_aMutex)
+,m_xGraphicObject()
 ,m_pMedium(NULL)
 ,m_pProducer( NULL )
 ,m_bDispatchUrlInternal(false)
@@ -465,6 +469,7 @@ namespace frm
 OClickableImageBaseModel::OClickableImageBaseModel( const 
OClickableImageBaseModel* _pOriginal, const Reference& 
_rxFactory )
 :OControlModel( _pOriginal, _rxFactory )
 ,OPropertyChangeListener( m_aMutex )
+,m_xGraphicObject( _pOriginal->m_xGraphicObject )
 ,m_pMedium( NULL )
 ,m_pProducer( NULL )
 ,m_bDispatchUrlInternal(false)
@@ -497,6 +502,7 @@ namespace frm
 void OClickableImageBaseModel::implConstruct()
 {
 m_pProducer = new ImageProducer;
+m_pProducer->SetDoneHdl( LINK( this, OClickableImageBaseModel, 
OnImageImportDone ) );
 increment( m_refCount );
 {
 m_xProducer = m_pProducer;
@@ -852,6 +858,21 @@ namespace frm
 }
 }
 
+IMPL_LINK( OClickableImageBaseModel, OnImageImportDone, Graphic*, 
i_pGraphic )
+{
+const Reference< XGraphic > xGraphic( i_pGraphic != NULL ? 
Graphic(i_pGraphic->GetBitmapEx()).GetXGraphic() : NULL );
+if ( !xGraphic.is() )
+{
+m_xGraphicObject.clear();
+}
+else
+{
+m_xGraphicObject = css::graphic::GraphicObject::create( m_xContext 
);
+m_xGraphicObject->setGraphic( xGraphic );
+}
+return 1L;
+}
+
 
 // OImageProducerThread_Impl
 
diff --git a/forms/source/component/clickableimage.hxx 
b/forms/source/component/clickableimage.hxx
index 60f03b8..f3d34ca 100644
--- a/forms/source/component/clickableimage.hxx
+++ b/forms/source/component/clickableimage.hxx
@@ -33,6 +33,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 
@@ -64,6 +65,8 @@ namespace frm
 
 // ImageProducer stuff
 ::com::sun::star::uno::Reference< 
::com::sun::star::awt::XImageProducer>m_xProducer;
+// Store the image in a graphic object to make it accesible via 
graphic cache using graphic ID.
+::com::sun::star::uno::Reference< 
::com::sun::star::graphic::XGraphicObject > m_xGraphicObject;
 SfxMedium*  m_pMedium; // Download 
medium
 ImageProducer*  m_pProducer;
 boolm_bDispatchUrlInternal; // 
property: is not allowed to set : 1
@@ -143,6 +146,8 @@ namespace frm
 
 // to be called from within the cloning-ctor of your derived class
 void implInitializeImageURL( );
+
+DECL_LINK( OnImageImportDone, ::Graphic* );
 };
 
 class ImageModelMethodGuard : public ::osl::MutexGuard
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - forms/source

2015-07-15 Thread Zolnai Tamás
 forms/source/component/clickableimage.cxx |   21 +
 forms/source/component/clickableimage.hxx |5 +
 2 files changed, 26 insertions(+)

New commits:
commit e30f56e680a73b201f9059cd09a8ac8c78ebdd51
Author: Zolnai Tamás 
Date:   Sun Jul 12 18:21:35 2015 +0200

tdf#47832: Pictures on buttons, created in forms, gone after reopening form

When image is set to a Button control the correspoding graphic object
lives only temporarily, after the graphic is copied from the graphic
object it's destroyed so save can't find it by graphic ID.
Use the same solution which works for ImageControls: use a graphic object
member for the control, so save can find it.

(cherry picked from commit 70f152983f3425a77df2f65b4798417640d47b76)

fix windows build (from Noel Grandin)

(cherry picked from commit 4c5498ec5ee478e27fd62bdcf9de1208c692422c)

Change-Id: If99a3efc4727a07df9d2daaefbdacc9565920005
Reviewed-on: https://gerrit.libreoffice.org/17051
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/forms/source/component/clickableimage.cxx 
b/forms/source/component/clickableimage.cxx
index a0ac4c0..8ce0de6 100644
--- a/forms/source/component/clickableimage.cxx
+++ b/forms/source/component/clickableimage.cxx
@@ -31,6 +31,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 #include 
 #include 
 #include 
@@ -62,6 +64,7 @@ namespace frm
 using namespace ::com::sun::star::util;
 using namespace ::com::sun::star::frame;
 using namespace ::com::sun::star::form::submission;
+using namespace ::com::sun::star::graphic;
 using ::com::sun::star::awt::MouseEvent;
 using ::com::sun::star::task::XInteractionHandler;
 
@@ -451,6 +454,7 @@ namespace frm
 const OUString& rDefault )
 :OControlModel( _rxFactory, _rUnoControlModelTypeName, rDefault )
 ,OPropertyChangeListener(m_aMutex)
+,m_xGraphicObject()
 ,m_pMedium(NULL)
 ,m_pProducer( NULL )
 ,m_bDispatchUrlInternal(false)
@@ -465,6 +469,7 @@ namespace frm
 OClickableImageBaseModel::OClickableImageBaseModel( const 
OClickableImageBaseModel* _pOriginal, const Reference& 
_rxFactory )
 :OControlModel( _pOriginal, _rxFactory )
 ,OPropertyChangeListener( m_aMutex )
+,m_xGraphicObject( _pOriginal->m_xGraphicObject )
 ,m_pMedium( NULL )
 ,m_pProducer( NULL )
 ,m_bDispatchUrlInternal(false)
@@ -497,6 +502,7 @@ namespace frm
 void OClickableImageBaseModel::implConstruct()
 {
 m_pProducer = new ImageProducer;
+m_pProducer->SetDoneHdl( LINK( this, OClickableImageBaseModel, 
OnImageImportDone ) );
 osl_atomic_increment( &m_refCount );
 {
 m_xProducer = m_pProducer;
@@ -852,6 +858,21 @@ namespace frm
 }
 }
 
+IMPL_LINK( OClickableImageBaseModel, OnImageImportDone, Graphic*, 
i_pGraphic )
+{
+const Reference< XGraphic > xGraphic( i_pGraphic != NULL ? 
Graphic(i_pGraphic->GetBitmapEx()).GetXGraphic() : NULL );
+if ( !xGraphic.is() )
+{
+m_xGraphicObject.clear();
+}
+else
+{
+m_xGraphicObject = css::graphic::GraphicObject::create( m_xContext 
);
+m_xGraphicObject->setGraphic( xGraphic );
+}
+return 1L;
+}
+
 
 // OImageProducerThread_Impl
 
diff --git a/forms/source/component/clickableimage.hxx 
b/forms/source/component/clickableimage.hxx
index 5033375..9337b3c 100644
--- a/forms/source/component/clickableimage.hxx
+++ b/forms/source/component/clickableimage.hxx
@@ -33,6 +33,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 
@@ -64,6 +65,8 @@ namespace frm
 
 // ImageProducer stuff
 ::com::sun::star::uno::Reference< 
::com::sun::star::awt::XImageProducer>m_xProducer;
+// Store the image in a graphic object to make it accesible via 
graphic cache using graphic ID.
+::com::sun::star::uno::Reference< 
::com::sun::star::graphic::XGraphicObject > m_xGraphicObject;
 SfxMedium*  m_pMedium; // Download 
medium
 ImageProducer*  m_pProducer;
 boolm_bDispatchUrlInternal; // 
property: is not allowed to set : 1
@@ -143,6 +146,8 @@ namespace frm
 
 // to be called from within the cloning-ctor of your derived class
 void implInitializeImageURL( );
+
+DECL_LINK( OnImageImportDone, ::Graphic* );
 };
 
 class ImageModelMethodGuard : public ::osl::MutexGuard
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - filter/CppunitTest_filter_utils.mk filter/Module_filter.mk filter/qa filter/source forms/source sw/qa

2015-07-14 Thread Zolnai Tamás
 filter/CppunitTest_filter_utils.mk |   41 +++
 filter/Module_filter.mk|1 
 filter/qa/cppunit/utils-test.cxx   |   77 +
 filter/source/msfilter/util.cxx|   70 +-
 forms/source/component/clickableimage.cxx  |   21 +++
 forms/source/component/clickableimage.hxx  |5 +
 sw/qa/extras/globalfilter/globalfilter.cxx |   24 -
 7 files changed, 226 insertions(+), 13 deletions(-)

New commits:
commit 16f9cf57e20ffbe34cb184f694f465708250a578
Author: Zolnai Tamás 
Date:   Tue Jul 14 09:44:10 2015 +0200

tdf#92471: Improve color conversion to MSO highlighting

The simple color distance on RGB color space is not good enough.
It leads to a better result if we use the scheme of the primary
colors.
This method works well with MSO highlighting color palette, but
not neccessarily in general. In highlighting palette light and
dark variant of the same color type (e.g. blue and light blue) has
the exactly same scheme.

Change-Id: Ied08b4c388b8020326709d01d2de290afdd9d77b

diff --git a/filter/CppunitTest_filter_utils.mk 
b/filter/CppunitTest_filter_utils.mk
new file mode 100644
index 000..4735abb
--- /dev/null
+++ b/filter/CppunitTest_filter_utils.mk
@@ -0,0 +1,41 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_CppunitTest_CppunitTest,filter_utils))
+
+$(eval $(call gb_CppunitTest_use_sdk_api,filter_utils))
+$(eval $(call gb_CppunitTest_use_ure,filter_utils))
+
+$(eval $(call gb_CppunitTest_use_configuration,filter_utils))
+
+$(eval $(call gb_CppunitTest_use_libraries,filter_utils, \
+   comphelper \
+   unotest \
+   cppuhelper \
+   cppu \
+   msfilter \
+   sal \
+   $(gb_UWINAPI) \
+))
+
+$(eval $(call gb_CppunitTest_use_components,filter_utils,\
+   configmgr/source/configmgr \
+   filter/source/config/cache/filterconfig1 \
+   framework/util/fwk \
+   framework/util/fwl \
+   i18npool/util/i18npool \
+   ucb/source/core/ucb1 \
+   ucb/source/ucp/file/ucpfile1 \
+))
+
+$(eval $(call gb_CppunitTest_add_exception_objects,filter_utils, \
+   filter/qa/cppunit/utils-test \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/filter/Module_filter.mk b/filter/Module_filter.mk
index 33f0f74..4cb6462 100644
--- a/filter/Module_filter.mk
+++ b/filter/Module_filter.mk
@@ -81,6 +81,7 @@ endif
 $(eval $(call gb_Module_add_check_targets,filter,\
 CppunitTest_filter_xslt \
 CppunitTest_filter_priority \
+CppunitTest_filter_utils \
 ))
 
 ifneq ($(DISABLE_CVE_TESTS),TRUE)
diff --git a/filter/qa/cppunit/utils-test.cxx b/filter/qa/cppunit/utils-test.cxx
new file mode 100644
index 000..5e306ef
--- /dev/null
+++ b/filter/qa/cppunit/utils-test.cxx
@@ -0,0 +1,77 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+
+#include 
+
+namespace {
+
+class UtilsTest
+: public test::BootstrapFixtureBase
+{
+public:
+void testTransColToIco();
+
+CPPUNIT_TEST_SUITE(UtilsTest);
+CPPUNIT_TEST(testTransColToIco);
+CPPUNIT_TEST_SUITE_END();
+};
+
+void UtilsTest::testTransColToIco()
+{
+const sal_uInt32 aStdCol[] = {
+0xee, 0x99, 0xff6600, 0xff, 0xff00cc, 0xff33ff, 0x9900ff, 
0xff, 0x00ccff, 0x66, 0x33ff99, 0x99ff66, 0xccff00,
+0xdd, 0x66, 0xffcc00, 0xff, 0xff66cc, 0xff99ff, 0xcc66ff, 
0xff, 0xff, 0x99, 0x66ff99, 0x99ff99, 0xccff66,
+0xcc, 0x00, 0xff9900, 0xff, 0xff3399, 0xff66ff, 0x9933ff, 
0xff, 0x3399ff, 0x00, 0x00ff66, 0x66ff66, 0x99ff33,
+0xb2b2b2, 0xcc9900, 0xff3300, 0xff, 0xff0066, 0xff00ff, 0x6600ff, 
0xff, 0x0066ff, 0x00, 0x00cc33, 0x00cc00, 0x66ff00,
+0x99, 0x996600, 0xcc3300, 0xcc, 0xcc0066, 0xcc00cc, 0x6600cc, 
0xcc, 0x0066cc, 0x00, 0x009933, 0x009900, 0x66cc00,
+0x808080, 0x663300, 0x801900, 0x99, 0x990066, 0x990099, 0x330099, 
0x99, 0x006699, 0x00, 0x007826, 0x006600, 0x669900,
+0x66, 0x00, 0x461900, 0x33, 0x330033, 0x660066, 0x33, 
0x66, 0x80, 0x00, 0x00331a, 0x003300, 0x193300,
+0x33, 0x33, 0x661900, 0x66, 0x660033, 0x663366, 0x330066, 
0x66, 0x003366, 0x33, 0x006633, 0x336633, 0x336600 };
+

Re: [SOLVED] Re: About GraphicDisplayCacheEntry::IsCacheableAsBitmap/GraphicManager::ImplCreateOutput

2015-07-12 Thread Zolnai Tamás
2015-07-12 13:02 GMT+02:00 Julien Nabet :
> On 12/07/2015 12:47, Zolnai Tamás wrote:
>>
>> Hi Julien,
>>
>> 2015-07-12 0:44 GMT+02:00 julien2412 :
>>>
>>> Hello,
>>>
>>> Giving a try to tdf#47832, I noticed that there were similar comments in
>>> these files:
>>> GraphicDisplayCacheEntry::IsCacheableAsBitmap:
>>>  487 // This function is based on GraphicManager::ImplCreateOutput(),
>>> in
>>> fact it mostly copies
>>>  488 // it, the difference is that this one does not create anything,
>>> it
>>> only checks if
>>>  489 // ImplCreateOutput() would use the optimization of using the
>>> single
>>> bitmap.
>>>  490 // If you do changes here, change the original function too.
>>> see
>>>
>>> http://opengrok.libreoffice.org/xref/core/svtools/source/graphic/grfcache.cxx#487
>>> and GraphicManager::ImplCreateOutput
>>> 1112 // NOTE: If you do changes in this function, check
>>> GraphicDisplayCacheEntry::IsCacheableAsBitmap
>>> 1113 // in grfcache.cxx too.
>>> see
>>>
>>> http://opengrok.libreoffice.org/xref/core/svtools/source/graphic/grfmgr2.cxx#1112
>>>
>>> But MetaActionType::FONT case isn't managed the same way:
>>> In the first, there's just a fallthrough,
>>> in the second one, there's some treatment.
>>>
>>> 1) Should we copy/paste the treatment in the first file?
>>> 2) Should we remove the treatment in the second file?
>>> 3) Should we just tweak the comment?
>>> or simply nothing at all?
>>
>> The code seems good to me.
>> GraphicDisplayCacheEntry::IsCacheableAsBitmap() is checks whether the
>> metafile can be displayed as a single bitmap. In ImplCreateOutput() I
>> see that MetaActionType::FONT is not handled as a bitmap (see
>> nNumBitmaps increment), so it's useless to copy that code.
>> If you check the IsCacheableAsBitmap()'s return value:
>>  return nNumBitmaps == 1 && !bNonBitmapActionEncountered;
>> you can see that non of these variables are affected by
>> MetaActionType::FONT case in ImplCreateOutput().
>> So I think we don't need any changes here.
>>
> Thank you for the explanation Zolnai! :-)
> (You didn't mention about tweaking comment so I suppose it doesn't worth it
> too)


Yeap, that's right. The existing comment seems good enough for me.

Tamás
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: About GraphicDisplayCacheEntry::IsCacheableAsBitmap/GraphicManager::ImplCreateOutput

2015-07-12 Thread Zolnai Tamás
Hi Julien,

2015-07-12 0:44 GMT+02:00 julien2412 :
> Hello,
>
> Giving a try to tdf#47832, I noticed that there were similar comments in
> these files:
> GraphicDisplayCacheEntry::IsCacheableAsBitmap:
> 487 // This function is based on GraphicManager::ImplCreateOutput(), in
> fact it mostly copies
> 488 // it, the difference is that this one does not create anything, it
> only checks if
> 489 // ImplCreateOutput() would use the optimization of using the single
> bitmap.
> 490 // If you do changes here, change the original function too.
> see
> http://opengrok.libreoffice.org/xref/core/svtools/source/graphic/grfcache.cxx#487
> and GraphicManager::ImplCreateOutput
>1112 // NOTE: If you do changes in this function, check
> GraphicDisplayCacheEntry::IsCacheableAsBitmap
>1113 // in grfcache.cxx too.
> see
> http://opengrok.libreoffice.org/xref/core/svtools/source/graphic/grfmgr2.cxx#1112
>
> But MetaActionType::FONT case isn't managed the same way:
> In the first, there's just a fallthrough,
> in the second one, there's some treatment.
>
> 1) Should we copy/paste the treatment in the first file?
> 2) Should we remove the treatment in the second file?
> 3) Should we just tweak the comment?
> or simply nothing at all?

The code seems good to me.
GraphicDisplayCacheEntry::IsCacheableAsBitmap() is checks whether the
metafile can be displayed as a single bitmap. In ImplCreateOutput() I
see that MetaActionType::FONT is not handled as a bitmap (see
nNumBitmaps increment), so it's useless to copy that code.
If you check the IsCacheableAsBitmap()'s return value:
return nNumBitmaps == 1 && !bNonBitmapActionEncountered;
you can see that non of these variables are affected by
MetaActionType::FONT case in ImplCreateOutput().
So I think we don't need any changes here.

Best Regards,
Tamás
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - dbaccess/source

2015-07-07 Thread Zolnai Tamás
 dbaccess/source/ui/dlg/dbadmin.cxx |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit cde471c5668d40b4623257db0c33738e191f4bc5
Author: Zolnai Tamás 
Date:   Sat Jul 4 20:40:32 2015 +0200

tdf#92520: LibO crash when editing .odb database properties

Regression from:
f7424ed710e54bb2437a28380b03ed7c26290edc

Change-Id: I7665d579696f21846abaed21ca8c4f14acdc964c
(cherry picked from commit 9216e5ef76ab718568ebda64ccfa0c010390e11a)
Reviewed-on: https://gerrit.libreoffice.org/16768
Tested-by: Jenkins 
Reviewed-by: Miklos Vajna 

diff --git a/dbaccess/source/ui/dlg/dbadmin.cxx 
b/dbaccess/source/ui/dlg/dbadmin.cxx
index 6f040be..f20c732 100644
--- a/dbaccess/source/ui/dlg/dbadmin.cxx
+++ b/dbaccess/source/ui/dlg/dbadmin.cxx
@@ -194,8 +194,7 @@ void ODbAdminDialog::impl_resetPages(const Reference< 
XPropertySet >& _rxDatasou
 // extract all relevant data from the property set of the data source
 m_pImpl->translateProperties(_rxDatasource, *GetInputSetImpl());
 
-// propagate this set as our new input set and reset the example set
-SetInputSet(GetInputSetImpl());
+// reset the example set
 delete pExampleSet;
 pExampleSet = new SfxItemSet(*GetInputSetImpl());
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: dbaccess/source

2015-07-04 Thread Zolnai Tamás
 dbaccess/source/ui/dlg/dbadmin.cxx |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 9216e5ef76ab718568ebda64ccfa0c010390e11a
Author: Zolnai Tamás 
Date:   Sat Jul 4 20:40:32 2015 +0200

tdf#92520: LibO crash when editing .odb database properties

Regression from:
f7424ed710e54bb2437a28380b03ed7c26290edc

Change-Id: I7665d579696f21846abaed21ca8c4f14acdc964c

diff --git a/dbaccess/source/ui/dlg/dbadmin.cxx 
b/dbaccess/source/ui/dlg/dbadmin.cxx
index 6f040be..f20c732 100644
--- a/dbaccess/source/ui/dlg/dbadmin.cxx
+++ b/dbaccess/source/ui/dlg/dbadmin.cxx
@@ -194,8 +194,7 @@ void ODbAdminDialog::impl_resetPages(const Reference< 
XPropertySet >& _rxDatasou
 // extract all relevant data from the property set of the data source
 m_pImpl->translateProperties(_rxDatasource, *GetInputSetImpl());
 
-// propagate this set as our new input set and reset the example set
-SetInputSet(GetInputSetImpl());
+// reset the example set
 delete pExampleSet;
 pExampleSet = new SfxItemSet(*GetInputSetImpl());
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - cui/source sw/source

2015-06-17 Thread Zolnai Tamás
 cui/source/dialogs/srchxtra.cxx   |1 -
 cui/source/inc/backgrnd.hxx   |4 
 cui/source/tabpages/backgrnd.cxx  |   36 +++-
 sw/source/uibase/utlui/uitool.cxx |   21 ++---
 4 files changed, 41 insertions(+), 21 deletions(-)

New commits:
commit 2b13db0125dabdfa77f8b5d0e8ef934b65a4f17d
Author: Zolnai Tamás 
Date:   Wed Jun 17 09:55:33 2015 +0200

Handle highlighting case inside SvxBackgroundPage class

... instead of converting attributes.

(cherry picked from commit 62fb96e075e79676b45912a3a8ec2702b1e3aaf2)

Change-Id: I3e45c0641389a7b6bdecb5141646aa13ee5c0aa5

diff --git a/cui/source/dialogs/srchxtra.cxx b/cui/source/dialogs/srchxtra.cxx
index db41952..088ba45 100644
--- a/cui/source/dialogs/srchxtra.cxx
+++ b/cui/source/dialogs/srchxtra.cxx
@@ -113,7 +113,6 @@ void SvxSearchFormatDialog::PageCreated( sal_uInt16 nId, 
SfxTabPage& rPage )
 }
 else if (nId == m_nBackPageId)
 {
-static_cast(rPage).ShowParaControl(true);
 SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
 
aSet.Put(SfxUInt32Item(SID_FLAG_TYPE,static_cast(SvxBackgroundTabFlags::SHOW_HIGHLIGHTING)));
 rPage.PageCreated(aSet);
diff --git a/cui/source/inc/backgrnd.hxx b/cui/source/inc/backgrnd.hxx
index c08b8a1..6845c41 100644
--- a/cui/source/inc/backgrnd.hxx
+++ b/cui/source/inc/backgrnd.hxx
@@ -25,6 +25,7 @@
 #include 
 #include 
 #include 
+#include 
 
 class BackgroundPreviewImpl;
 class SvxOpenGraphicDialog;
@@ -118,6 +119,8 @@ private:
 boolbLinkOnly   : 1;
 boolbColTransparency: 1;
 boolbGraphTransparency  : 1;
+boolbHighlighting   : 1;
+
 Graphic aBgdGraphic;
 OUStringaBgdGraphicPath;
 OUStringaBgdGraphicFilter;
@@ -127,6 +130,7 @@ private:
 
 SvxBackgroundTable_Impl*pTableBck_Impl;///< Items for Sw-Table must be 
corrected
 SvxBackgroundPara_Impl* pParaBck_Impl;///< also for the paragraph style
+std::unique_ptr pHighlighting;
 
 voidFillColorValueSets_Impl();
 voidShowColorUI_Impl();
diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx
index 14c90e9..a396f49 100644
--- a/cui/source/tabpages/backgrnd.cxx
+++ b/cui/source/tabpages/backgrnd.cxx
@@ -358,10 +358,12 @@ SvxBackgroundTabPage::SvxBackgroundTabPage(vcl::Window* 
pParent, const SfxItemSe
 , bLinkOnly(false)
 , bColTransparency(false)
 , bGraphTransparency(false)
+, bHighlighting(false)
 , pPageImpl(new SvxBackgroundPage_Impl)
 , pImportDlg(NULL)
 , pTableBck_Impl(NULL)
 , pParaBck_Impl(NULL)
+, pHighlighting(nullptr)
 {
 get(m_pAsGrid, "asgrid");
 get(m_pSelectTxt, "asft");
@@ -554,6 +556,10 @@ void SvxBackgroundTabPage::Reset( const SfxItemSet* rSet )
 break;
 }
 }
+else if( bHighlighting )
+{
+nSlot = SID_ATTR_BRUSH_CHAR;
+}
 //#73# the destination item is missing when the parent style has been 
changed
 if(USHRT_MAX == nDestValue && 
(m_pParaLBox->IsVisible()||m_pTblLBox->IsVisible()))
 nDestValue = 0;
@@ -624,7 +630,7 @@ void SvxBackgroundTabPage::Reset( const SfxItemSet* rSet )
 TblDestinationHdl_Impl(m_pTblLBox);
 m_pTblLBox->SaveValue();
 }
-else
+else if (m_pParaLBox->GetData() == m_pParaLBox)
 {
 sal_Int32 nValue = m_pParaLBox->GetSelectEntryPos();
 
@@ -659,6 +665,15 @@ void SvxBackgroundTabPage::Reset( const SfxItemSet* rSet )
 ParaDestinationHdl_Impl(m_pParaLBox);
 m_pParaLBox->SaveValue();
 }
+else if( bHighlighting )
+{
+nWhich = GetWhich( SID_ATTR_BRUSH_CHAR );
+if ( rSet->GetItemState( nWhich, false ) >= SfxItemState::DEFAULT )
+{
+pBgdAttr = static_cast(&( rSet->Get( 
nWhich ) ));
+pHighlighting.reset(new SvxBrushItem(*pBgdAttr));
+}
+}
 }
 }
 
@@ -770,6 +785,10 @@ bool SvxBackgroundTabPage::FillItemSet( SfxItemSet* 
rCoreSet )
 break;
 }
 }
+else if( bHighlighting )
+{
+nSlot = SID_ATTR_BRUSH_CHAR;
+}
 sal_uInt16 nWhich = GetWhich( nSlot );
 
 const SfxPoolItem* pOld = GetOldItem( *rCoreSet, nSlot );
@@ -974,6 +993,20 @@ bool SvxBackgroundTabPage::FillItemSet( SfxItemSet* 
rCoreSet )
 bModified |= true;
 }
 }
+else if( bHighlighting )
+{
+if( nSlot != SID_ATTR_BRUSH_CHAR )
+{
+const SfxPoolItem* pOldChar =
+GetOldItem( *rCoreSet, SID_ATTR_BRUSH_CHAR );
+if ( pOldChar && pHighlighting &&
+(*pHighlighting != *pOldChar || *pHighlighting != 
SvxBrushItem(SID_ATTR_BRUSH_CHAR)))
+{
+rCoreSet->Put( *pHighlighting );
+bModified |= true;
+}
+

Re: test infrastructure ideas appreciated ... -- automatically generated unit tests

2015-06-17 Thread Zolnai Tamás
2015-06-16 23:52 GMT+02:00 Zolnai Tamás :
> 2015-06-16 9:15 GMT+02:00 Stephan Bergmann :
>> On 06/15/2015 03:51 PM, Zolnai Tamás wrote:
>>>
>>> I've got an idea too: automatically generated unit tests.
>>> I think with a clang plugin we can generate unit tests for all
>>> class/struct in the source code in build time. Build system can link
>>> it as a simple unit test and run it directly after generation. If it
>>> returns with no error it can be removed. If it returns an error the
>>> test should be untouched to allow running it directly (without
>>> regeneration).
>>>
>>> These kind of tests gets in my mind now:
>>> - Create an object and remove it (check no problem with destruction)
>>> - Create and remove an object thousand of times (memory leak)
>>> - Copy operator and copy constructor result is equivalent (operator== is
>>> needed)
>>> - Copy an object, remove the original object (shallow copy)
>>> - Create a const object, call all const method on it and check it remains
>>> equal.
>>> - Getter and setter method: set a value and check the corresponding
>>> getter method returns with the same value
>>> -- Set values depending on the parameter type
>>> --- int: end points of the value range, negative value, 0, positive value
>>> --- string: empty string, dummy string, string with wild characters.
>>
>>
>> I'm not sure how exciting an approach that is.  Especially for the later
>> part of your list, it builds on the assumption that an object is merely a
>> conglomeration of public member functions, that can be called in arbitrary
>> sequence and with arbitrary arguments, and that is often just not the case.
>> The dreaded JunitTest_*_unoapi are modeled somewhat like that.
>
> Yeap, that's right. There are cases when they are not arbitrary, but
> when that's the case I think it's always a good idea to add assertions
> (or warnings or comments or anything) to the code to make assumptions
> explicit about the arguments or order of the member functions. The
> unit test generator should use these information.

I've got a good example how useful this unit test generation could be.
Next to the general test we can create tests for specific classes for
example for those which inherited from SfxPoolItem. We could test
whether setting attributes via PutValue will result in the same value
when get it back with QueryValue (with and without CONVERT_TWIPS
flag). Assertions can be added to specify the range of member ids. To
find out which member id means what kind of attributes unomap.cxx file
can be parsed (or more assertions can be added :D). With that we would
have unit test not just for existing classes, but for the future ones
too.
I'm still not sure what a clang plugin can do, so I'm speaking about
the way how it should work in theory.

Best Regards,
Tamás
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - sw/source sw/uiconfig

2015-06-16 Thread Zolnai Tamás
 sw/source/ui/fmtui/tmpdlg.cxx |   10 +-
 sw/uiconfig/swriter/ui/templatedialog2.ui |   13 +
 2 files changed, 18 insertions(+), 5 deletions(-)

New commits:
commit 343f992816ab594c608537fd32fb4bf412f5fabb
Author: Zolnai Tamás 
Date:   Wed Jun 17 00:00:27 2015 +0200

tdf#90072: No character background (highlight) tab in paragraph styles 
dialog

Background Tab was replaced with Area Tab on Paragraph Style
Dialog. With that we lost the opportunity to set character background
color. So bring back the Background tab as Highlighting.

(cherry picked from commit 9874db206eed84616e4e232b1b56c7b7532166a0)

Change-Id: I29925f72816fbd27243060231d551e6590f1b9d9
Reviewed-on: https://gerrit.libreoffice.org/16324
Reviewed-by: Adolfo Jayme Barrientos 
Tested-by: Adolfo Jayme Barrientos 

diff --git a/sw/source/ui/fmtui/tmpdlg.cxx b/sw/source/ui/fmtui/tmpdlg.cxx
index f0ad083..cbb4c1d 100644
--- a/sw/source/ui/fmtui/tmpdlg.cxx
+++ b/sw/source/ui/fmtui/tmpdlg.cxx
@@ -187,6 +187,10 @@ SwTemplateDlg::SwTemplateDlg(vcl::Window* pParent,
 OSL_ENSURE(pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_TWOLINES 
) , "GetTabPageRangesFunc fail!");
 m_nAsianLayoutId = AddTabPage("asianlayout", 
pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_TWOLINES ), 
pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_TWOLINES ) );
 
+OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), 
"GetTabPageCreatorFunc fail!");
+OSL_ENSURE(pFact->GetTabPageRangesFunc( RID_SVXPAGE_BACKGROUND ) , 
"GetTabPageRangesFunc fail!");
+m_nBackgroundId = AddTabPage("highlighting", 
pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), 
pFact->GetTabPageRangesFunc( RID_SVXPAGE_BACKGROUND ));
+
 OSL_ENSURE(pFact->GetTabPageCreatorFunc(RID_SVXPAGE_TABULATOR), 
"GetTabPageCreatorFunc fail!");
 OSL_ENSURE(pFact->GetTabPageRangesFunc(RID_SVXPAGE_TABULATOR), 
"GetTabPageRangesFunc fail!");
 m_nTabId = AddTabPage("tabs", 
pFact->GetTabPageCreatorFunc(RID_SVXPAGE_TABULATOR),
pFact->GetTabPageRangesFunc(RID_SVXPAGE_TABULATOR) );
@@ -480,13 +484,9 @@ void SwTemplateDlg::PageCreated( sal_uInt16 nId, 
SfxTabPage &rPage )
 else if (nId == m_nBackgroundId)
 {
 SvxBackgroundTabFlags nFlagType = SvxBackgroundTabFlags::NONE;
-if( SFX_STYLE_FAMILY_PARA == nType )
-nFlagType |= SvxBackgroundTabFlags::SHOW_PARACTL;
-if( SFX_STYLE_FAMILY_CHAR != nType )
-nFlagType |= SvxBackgroundTabFlags::SHOW_SELECTOR;
 if( SFX_STYLE_FAMILY_FRAME == nType )
 nFlagType |= SvxBackgroundTabFlags::ENABLE_TRANSPARENCY;
-if( SFX_STYLE_FAMILY_CHAR == nType )
+if( SFX_STYLE_FAMILY_CHAR == nType || SFX_STYLE_FAMILY_PARA == nType )
 nFlagType |= SvxBackgroundTabFlags::SHOW_HIGHLIGHTING;
 aSet.Put (SfxUInt32Item(SID_FLAG_TYPE, 
static_cast(nFlagType)));
 rPage.PageCreated(aSet);
diff --git a/sw/uiconfig/swriter/ui/templatedialog2.ui 
b/sw/uiconfig/swriter/ui/templatedialog2.ui
index 6b9f61b..017cbd3 100644
--- a/sw/uiconfig/swriter/ui/templatedialog2.ui
+++ b/sw/uiconfig/swriter/ui/templatedialog2.ui
@@ -249,6 +249,19 @@
   
 
 
+  
+True
+False
+Highlighting
+  
+  
+False
+  
+
+
+  
+
+
   
 True
 False
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - cui/source cui/uiconfig include/svx reportdesign/source reportdesign/uiconfig sw/source sw/uiconfig

2015-06-16 Thread Zolnai Tamás
 cui/source/dialogs/srchxtra.cxx |3 +++
 cui/source/inc/backgrnd.hxx |1 +
 cui/source/inc/cuires.hrc   |1 +
 cui/source/tabpages/backgrnd.cxx|5 +
 cui/source/tabpages/strings.src |4 
 cui/uiconfig/ui/backgroundpage.ui   |2 +-
 cui/uiconfig/ui/optfltrembedpage.ui |2 +-
 cui/uiconfig/ui/searchformatdialog.ui   |2 +-
 include/svx/flagsdef.hxx|1 +
 reportdesign/source/ui/dlg/dlgpage.cxx  |   12 +++-
 reportdesign/source/ui/inc/dlgpage.hxx  |3 +++
 reportdesign/uiconfig/dbreport/ui/chardialog.ui |2 +-
 sw/source/ui/chrdlg/chardlg.cxx |5 +
 sw/source/ui/fmtui/tmpdlg.cxx   |2 ++
 sw/uiconfig/swriter/ui/characterproperties.ui   |2 +-
 sw/uiconfig/swriter/ui/templatedialog1.ui   |2 +-
 16 files changed, 42 insertions(+), 7 deletions(-)

New commits:
commit 94e9ad75943c39af548fc4b094c1e67df900e8a1
Author: Zolnai Tamás 
Date:   Tue Jun 16 21:43:56 2015 +0200

tdf#89830: Ambiguous naming of character background

Use 'Highlighting' also on Character Dialog.

(cherry picked from commit 3588a04f438b001cb64aa1fd86b28869f2c4e70b)

Options: Background -> Highlighting

(cherry picked from commit b47151f5d1e287425511b45c5474e10eb0ba3a9d)

Search By Format: Background -> Highlighting

(cherry picked from commit 16d202f29cafbdc8d0648b830d2209f5c61c878f)

Make this string localizable

(cherry picked from commit a676ad5ec8348a6c8074e3a8d42590e8fd189cf5)

Change-Id: Ifa48799bb9e415d17f4e323008fac57270bae34b
Reviewed-on: https://gerrit.libreoffice.org/16322
Reviewed-by: Adolfo Jayme Barrientos 
Tested-by: Adolfo Jayme Barrientos 

diff --git a/cui/source/dialogs/srchxtra.cxx b/cui/source/dialogs/srchxtra.cxx
index 4497601..db41952 100644
--- a/cui/source/dialogs/srchxtra.cxx
+++ b/cui/source/dialogs/srchxtra.cxx
@@ -114,6 +114,9 @@ void SvxSearchFormatDialog::PageCreated( sal_uInt16 nId, 
SfxTabPage& rPage )
 else if (nId == m_nBackPageId)
 {
 static_cast(rPage).ShowParaControl(true);
+SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
+
aSet.Put(SfxUInt32Item(SID_FLAG_TYPE,static_cast(SvxBackgroundTabFlags::SHOW_HIGHLIGHTING)));
+rPage.PageCreated(aSet);
 }
 }
 
diff --git a/cui/source/inc/backgrnd.hxx b/cui/source/inc/backgrnd.hxx
index 633e4e6..c08b8a1 100644
--- a/cui/source/inc/backgrnd.hxx
+++ b/cui/source/inc/backgrnd.hxx
@@ -81,6 +81,7 @@ private:
 VclPtrm_pTblLBox;
 VclPtrm_pParaLBox;
 
+VclPtr  m_pBackGroundColorLabelFT;
 VclPtr   m_pBackGroundColorFrame;
 VclPtr   m_pBackgroundColorSet;
 VclPtr  m_pPreviewWin1;
diff --git a/cui/source/inc/cuires.hrc b/cui/source/inc/cuires.hrc
index 3214b51..87eb802 100644
--- a/cui/source/inc/cuires.hrc
+++ b/cui/source/inc/cuires.hrc
@@ -93,6 +93,7 @@
 #define RID_SVXSTR_CHARNAME_FONT(RID_SVX_START + 241)
 #define RID_SVXSTR_CHARNAME_STYLE   (RID_SVX_START + 242)
 #define RID_SVXSTR_CHARNAME_TYPEFACE(RID_SVX_START + 243)
+#define RID_SVXSTR_CHARNAME_HIGHLIGHTING(RID_SVX_START + 244)
 
 // options
 #define RID_SVXSTR_DIAGRAM_ROW  (RID_SVX_START + 
1162)
diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx
index 9ba70fa..14c90e9 100644
--- a/cui/source/tabpages/backgrnd.cxx
+++ b/cui/source/tabpages/backgrnd.cxx
@@ -370,6 +370,7 @@ SvxBackgroundTabPage::SvxBackgroundTabPage(vcl::Window* 
pParent, const SfxItemSe
 get(m_pTblLBox, "tablelb");
 get(m_pParaLBox, "paralb");
 
+get(m_pBackGroundColorLabelFT, "background_label");
 get(m_pBackGroundColorFrame, "backgroundcolorframe");
 get(m_pBackgroundColorSet, "backgroundcolorset");
 get(m_pPreviewWin1, "preview1");
@@ -1785,6 +1786,10 @@ void SvxBackgroundTabPage::PageCreated(const 
SfxAllItemSet& aSet)
 ShowSelector();
 if ( nFlags & SvxBackgroundTabFlags::ENABLE_TRANSPARENCY )
 EnableTransparency(true, true);
+if ( nFlags & SvxBackgroundTabFlags::SHOW_HIGHLIGHTING )
+{
+
m_pBackGroundColorLabelFT->SetText(CUI_RES(RID_SVXSTR_CHARNAME_HIGHLIGHTING));
+}
 }
 }
 
diff --git a/cui/source/tabpages/strings.src b/cui/source/tabpages/strings.src
index da547d4..e380d5a 100644
--- a/cui/source/tabpages/strings.src
+++ b/cui/source/tabpages/strings.src
@@ -103,6 +103,10 @@ String RID_SVXSTR_CHARNAME_TYPEFACE
 {
 Text [ en-US ] = "Typeface";
 };
+String RID_SVXSTR_CHARNAME_HIGHLIGHTING
+{
+Text [ en-US ] = "Highlighting Color";
+};
 String RID_SVXSTR_USE_REPLACE
 {
 Text [ en-US ] = "Use replacement table" ;
diff --git a/cui/uiconfig/ui/backgroundpage.ui 
b/cui/uiconfig/ui/ba

UI changes for LO-5.0 - review needed

2015-06-16 Thread Zolnai Tamás
Hi guys,

I submit two patches to gerrit related to text highlighting:
First one renames all instances of character "Background" to "Highlighting":
https://gerrit.libreoffice.org/#/c/16322/
Second one adds a Highlighting Tab to paragraph styles dialog, because
in the LO-4.4 release we lost the functionality of setting character
background for paragraph styles:
https://gerrit.libreoffice.org/#/c/16324/

I would need review from the UX side. I hope it can get into the 5.0
branch before the UI freeze.

Thanks,
Tamás
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: sw/source sw/uiconfig

2015-06-16 Thread Zolnai Tamás
 sw/source/ui/fmtui/tmpdlg.cxx |8 +---
 sw/uiconfig/swriter/ui/templatedialog2.ui |   13 +
 2 files changed, 18 insertions(+), 3 deletions(-)

New commits:
commit 9874db206eed84616e4e232b1b56c7b7532166a0
Author: Zolnai Tamás 
Date:   Tue Jun 16 22:22:42 2015 +0200

tdf#90072: No character background (highlight) tab in paragraph styles 
dialog

Background Tab was replaced with Area Tab on Paragraph Style
Dialog. With that we lost the opportunity to set character background
color. So bring back the Background tab as Highlighting.

Change-Id: I29925f72816fbd27243060231d551e6590f1b9d9

diff --git a/sw/source/ui/fmtui/tmpdlg.cxx b/sw/source/ui/fmtui/tmpdlg.cxx
index e29858a..738eee2 100644
--- a/sw/source/ui/fmtui/tmpdlg.cxx
+++ b/sw/source/ui/fmtui/tmpdlg.cxx
@@ -187,6 +187,10 @@ SwTemplateDlg::SwTemplateDlg(vcl::Window* pParent,
 OSL_ENSURE(pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_TWOLINES 
) , "GetTabPageRangesFunc fail!");
 m_nAsianLayoutId = AddTabPage("asianlayout", 
pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_TWOLINES ), 
pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_TWOLINES ) );
 
+OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), 
"GetTabPageCreatorFunc fail!");
+OSL_ENSURE(pFact->GetTabPageRangesFunc( RID_SVXPAGE_BACKGROUND ) , 
"GetTabPageRangesFunc fail!");
+m_nBackgroundId = AddTabPage("highlighting", 
pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), 
pFact->GetTabPageRangesFunc( RID_SVXPAGE_BACKGROUND ));
+
 OSL_ENSURE(pFact->GetTabPageCreatorFunc(RID_SVXPAGE_TABULATOR), 
"GetTabPageCreatorFunc fail!");
 OSL_ENSURE(pFact->GetTabPageRangesFunc(RID_SVXPAGE_TABULATOR), 
"GetTabPageRangesFunc fail!");
 m_nTabId = AddTabPage("tabs", 
pFact->GetTabPageCreatorFunc(RID_SVXPAGE_TABULATOR),
pFact->GetTabPageRangesFunc(RID_SVXPAGE_TABULATOR) );
@@ -467,9 +471,7 @@ void SwTemplateDlg::PageCreated( sal_uInt16 nId, SfxTabPage 
&rPage )
 else if (nId == m_nBackgroundId)
 {
 SvxBackgroundTabFlags nFlagType = SvxBackgroundTabFlags::NONE;
-if( SFX_STYLE_FAMILY_CHAR != nType )
-nFlagType |= SvxBackgroundTabFlags::SHOW_SELECTOR;
-if( SFX_STYLE_FAMILY_CHAR == nType )
+if( SFX_STYLE_FAMILY_CHAR == nType || SFX_STYLE_FAMILY_PARA == nType )
 nFlagType |= SvxBackgroundTabFlags::SHOW_HIGHLIGHTING;
 aSet.Put (SfxUInt32Item(SID_FLAG_TYPE, 
static_cast(nFlagType)));
 rPage.PageCreated(aSet);
diff --git a/sw/uiconfig/swriter/ui/templatedialog2.ui 
b/sw/uiconfig/swriter/ui/templatedialog2.ui
index 6b9f61b..017cbd3 100644
--- a/sw/uiconfig/swriter/ui/templatedialog2.ui
+++ b/sw/uiconfig/swriter/ui/templatedialog2.ui
@@ -249,6 +249,19 @@
   
 
 
+  
+True
+False
+Highlighting
+  
+  
+False
+  
+
+
+  
+
+
   
 True
 False
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: test infrastructure ideas appreciated ... -- automatically generated unit tests

2015-06-16 Thread Zolnai Tamás
2015-06-16 9:15 GMT+02:00 Stephan Bergmann :
> On 06/15/2015 03:51 PM, Zolnai Tamás wrote:
>>
>> I've got an idea too: automatically generated unit tests.
>> I think with a clang plugin we can generate unit tests for all
>> class/struct in the source code in build time. Build system can link
>> it as a simple unit test and run it directly after generation. If it
>> returns with no error it can be removed. If it returns an error the
>> test should be untouched to allow running it directly (without
>> regeneration).
>>
>> These kind of tests gets in my mind now:
>> - Create an object and remove it (check no problem with destruction)
>> - Create and remove an object thousand of times (memory leak)
>> - Copy operator and copy constructor result is equivalent (operator== is
>> needed)
>> - Copy an object, remove the original object (shallow copy)
>> - Create a const object, call all const method on it and check it remains
>> equal.
>> - Getter and setter method: set a value and check the corresponding
>> getter method returns with the same value
>> -- Set values depending on the parameter type
>> --- int: end points of the value range, negative value, 0, positive value
>> --- string: empty string, dummy string, string with wild characters.
>
>
> I'm not sure how exciting an approach that is.  Especially for the later
> part of your list, it builds on the assumption that an object is merely a
> conglomeration of public member functions, that can be called in arbitrary
> sequence and with arbitrary arguments, and that is often just not the case.
> The dreaded JunitTest_*_unoapi are modeled somewhat like that.

Yeap, that's right. There are cases when they are not arbitrary, but
when that's the case I think it's always a good idea to add assertions
(or warnings or comments or anything) to the code to make assumptions
explicit about the arguments or order of the member functions. The
unit test generator should use these information.

Best Regards,
Tamás
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: test infrastructure ideas appreciated ... -- automatically generated unit tests

2015-06-16 Thread Zolnai Tamás
2015-06-15 21:34 GMT+02:00 Michael Meeks :
> Hi Tamas,
>
> On Mon, 2015-06-15 at 15:51 +0200, Zolnai Tamás wrote:
>> I've got an idea too: automatically generated unit tests.
>
> Sounds interesting :-) are there some existing examples of clang
> plugins that do this - or some papers / existing code that does this ? I
> imagine we would want annotations in the code to help the unit-tester,
> and also (I guess) support methods that create working helpful objects
> to pass into constructors like documents, shells, filters etc. ;-)
>
> Added to the list for discussion; it'd be great to hear from you in 
> the
> ESC call on Thursday if you can make it on this topic. Then again - it's
> less than clear to me (given the bulk of suggestions) how we'll
> prioritize them to build a recommendation for a tender to do this =)

Hi Michael,

I didn't find any example code in this topic. It was just a sudden
idea deducted from the general rule: If you are bored doing things
manually do it automatically. :)
I'm not sure what clang plugins capable of. There are more experienced
guys in this territory.

Best Regards,
Tamás
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: test infrastructure ideas appreciated ... -- automatically generated unit tests

2015-06-15 Thread Zolnai Tamás
Hi guys,

I've got an idea too: automatically generated unit tests.
I think with a clang plugin we can generate unit tests for all
class/struct in the source code in build time. Build system can link
it as a simple unit test and run it directly after generation. If it
returns with no error it can be removed. If it returns an error the
test should be untouched to allow running it directly (without
regeneration).

These kind of tests gets in my mind now:
- Create an object and remove it (check no problem with destruction)
- Create and remove an object thousand of times (memory leak)
- Copy operator and copy constructor result is equivalent (operator== is needed)
- Copy an object, remove the original object (shallow copy)
- Create a const object, call all const method on it and check it remains equal.
- Getter and setter method: set a value and check the corresponding
getter method returns with the same value
-- Set values depending on the parameter type
--- int: end points of the value range, negative value, 0, positive value
--- string: empty string, dummy string, string with wild characters.

Best Regards,
Tamás


2015-06-03 15:33 GMT+02:00 Michael Meeks :
> Hi guys,
>
> The ESC are interested in improving unit (and other automated) testing
> and are interested in concrete ideas for implementing new automated
> tests to prevent regressions. We hope to turn this into a proposal for
> the Board, which if approved -could- turn into a tender to fund more
> work in this area. Having said that writing unit tests is every
> developers' responsibility where feasible - so this ask focuses on new
> infrastructure.
>
> It is noticeable that where there are existing tests & infrastructure,
> new tests are easier to create and often there are more of them - so are
> there places where we should work to create infrastructure ?
>
> Is there something we can improve by throwing hardware at it ? as we
> have done for the crash-testing; if so what hardware is needed ?
>
> Is there a large area of code that is completely un-tested or
> under-tested that you'd love us to invest in making test-able ?
>
> Is there a test that currently only runs in an obscure setup /
> corner-case that we can invest in standardizing and making more easy to
> use ?
>
> Constructive thoughts appreciated in reply here.
>
> ATB,
>
> Michael.
>
> --
>  michael.me...@collabora.com  <><, Pseudo Engineer, itinerant idiot
>
> ___
> LibreOffice mailing list
> LibreOffice@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/libreoffice
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: include/editeng

2015-06-14 Thread Zolnai Tamás
 include/editeng/brushitem.hxx |3 ---
 1 file changed, 3 deletions(-)

New commits:
commit 46564fd97308ce070248482ad65a311a329a2b76
Author: Zolnai Tamás 
Date:   Mon Jun 15 00:27:15 2015 +0200

Remove unused macros

Change-Id: I2f5e47a3c894238557d52139c2849a2bd5a066b6

diff --git a/include/editeng/brushitem.hxx b/include/editeng/brushitem.hxx
index 0dd5f5c..22a3d42 100644
--- a/include/editeng/brushitem.hxx
+++ b/include/editeng/brushitem.hxx
@@ -41,9 +41,6 @@ enum SvxGraphicPosition
 GPOS_AREA, GPOS_TILED
 };
 
-#define PARA_DEST_PARA  0
-#define PARA_DEST_CHAR  1
-
 class SvxBrushItem_Impl;
 class EDITENG_DLLPUBLIC SvxBrushItem : public SfxPoolItem
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 5 commits - cui/source cui/uiconfig include/svx svx/source sw/source

2015-06-14 Thread Zolnai Tamás
 cui/source/dialogs/srchxtra.cxx   |4 
 cui/source/inc/backgrnd.hxx   |9 -
 cui/source/inc/cuires.hrc |1 
 cui/source/tabpages/backgrnd.cxx  |  211 ++
 cui/source/tabpages/strings.src   |4 
 cui/uiconfig/ui/backgroundpage.ui |   15 --
 cui/uiconfig/ui/optfltrembedpage.ui   |2 
 cui/uiconfig/ui/searchformatdialog.ui |2 
 include/svx/flagsdef.hxx  |1 
 include/svx/svxids.hrc|1 
 svx/source/dialog/srchdlg.cxx |3 
 sw/source/ui/fmtui/tmpdlg.cxx |7 -
 sw/source/uibase/app/docst.cxx|2 
 sw/source/uibase/app/docstyle.cxx |3 
 sw/source/uibase/utlui/uitool.cxx |   21 ---
 15 files changed, 32 insertions(+), 254 deletions(-)

New commits:
commit a676ad5ec8348a6c8074e3a8d42590e8fd189cf5
Author: Zolnai Tamás 
Date:   Sun Jun 14 21:39:02 2015 +0200

Make this string localizable

Change-Id: I074ae2866a67cf90637cd229c717aa999f718558

diff --git a/cui/source/inc/cuires.hrc b/cui/source/inc/cuires.hrc
index 3214b51..87eb802 100644
--- a/cui/source/inc/cuires.hrc
+++ b/cui/source/inc/cuires.hrc
@@ -93,6 +93,7 @@
 #define RID_SVXSTR_CHARNAME_FONT(RID_SVX_START + 241)
 #define RID_SVXSTR_CHARNAME_STYLE   (RID_SVX_START + 242)
 #define RID_SVXSTR_CHARNAME_TYPEFACE(RID_SVX_START + 243)
+#define RID_SVXSTR_CHARNAME_HIGHLIGHTING(RID_SVX_START + 244)
 
 // options
 #define RID_SVXSTR_DIAGRAM_ROW  (RID_SVX_START + 
1162)
diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx
index 0a8e453..94b68db 100644
--- a/cui/source/tabpages/backgrnd.cxx
+++ b/cui/source/tabpages/backgrnd.cxx
@@ -1533,7 +1533,7 @@ void SvxBackgroundTabPage::PageCreated(const 
SfxAllItemSet& aSet)
 }
 if ( nFlags & SvxBackgroundTabFlags::SHOW_HIGHLIGHTING )
 {
-m_pBackGroundColorLabelFT->SetText("Highlighting Color");
+
m_pBackGroundColorLabelFT->SetText(CUI_RES(RID_SVXSTR_CHARNAME_HIGHLIGHTING));
 bHighlighting = true;
 }
 }
diff --git a/cui/source/tabpages/strings.src b/cui/source/tabpages/strings.src
index da547d4..e380d5a 100644
--- a/cui/source/tabpages/strings.src
+++ b/cui/source/tabpages/strings.src
@@ -103,6 +103,10 @@ String RID_SVXSTR_CHARNAME_TYPEFACE
 {
 Text [ en-US ] = "Typeface";
 };
+String RID_SVXSTR_CHARNAME_HIGHLIGHTING
+{
+Text [ en-US ] = "Highlighting Color";
+};
 String RID_SVXSTR_USE_REPLACE
 {
 Text [ en-US ] = "Use replacement table" ;
commit e030422305590084263b7490301c3b7ea356d424
Author: Zolnai Tamás 
Date:   Sun Jun 14 20:25:26 2015 +0200

Paragraph related part of Background Tab is unused now

For paragraphs Area Tab is used for setting background.

Change-Id: I83859a1b2125374b81c084cfa45487a42adcd5a6

diff --git a/cui/source/inc/backgrnd.hxx b/cui/source/inc/backgrnd.hxx
index 2aefa5d..98933c9 100644
--- a/cui/source/inc/backgrnd.hxx
+++ b/cui/source/inc/backgrnd.hxx
@@ -30,7 +30,6 @@
 class BackgroundPreviewImpl;
 class SvxOpenGraphicDialog;
 struct SvxBackgroundTable_Impl;
-struct SvxBackgroundPara_Impl;
 struct SvxBackgroundPage_Impl;
 class SvxBrushItem;
 
@@ -62,8 +61,6 @@ public:
 voidShowSelector();
 /// for the Writer (cells/rows/tables)
 voidShowTblControl();
-/// for the Writer (paragraph/characters)
-voidShowParaControl(bool bCharOnly = false);
 
 virtual voidPageCreated(const SfxAllItemSet& aSet) SAL_OVERRIDE;
 protected:
@@ -79,7 +76,6 @@ private:
 VclPtrm_pLbSelect;
 VclPtr  m_pTblDesc;
 VclPtrm_pTblLBox;
-VclPtrm_pParaLBox;
 
 VclPtr  m_pBackGroundColorLabelFT;
 VclPtr   m_pBackGroundColorFrame;
@@ -120,7 +116,6 @@ private:
 SvxOpenGraphicDialog* pImportDlg;
 
 SvxBackgroundTable_Impl*pTableBck_Impl;///< Items for Sw-Table must be 
corrected
-SvxBackgroundPara_Impl* pParaBck_Impl;///< also for the paragraph style
 std::unique_ptr pHighlighting;
 
 voidFillColorValueSets_Impl();
@@ -144,7 +139,6 @@ private:
 DECL_LINK( FileClickHdl_Impl, CheckBox* );
 DECL_LINK(BackgroundColorHdl_Impl, void *);
 DECL_LINK( TblDestinationHdl_Impl, ListBox* );
-DECL_LINK( ParaDestinationHdl_Impl, ListBox* );
 };
 
 #endif // INCLUDED_CUI_SOURCE_INC_BACKGRND_HXX
diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx
index 2e066a3..0a8e453 100644
--- a/cui/source/tabpages/backgrnd.cxx
+++ b/cui/source/tabpages/backgrnd.cxx
@@ -89,21 +89,6 @@ struct SvxBackgroundTable_Impl
 {}
 };
 
-struct SvxBackgroundPara_Impl
-{
-SvxBrushItem*   pParaBrush;
-SvxBrushItem*   pCharBrush;
-
-sal_Int32   nActPos;
-
-SvxBackgroundPara_Impl()
-: pParaBrush(NULL)
-, pCharBru

[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - svx/source

2015-06-14 Thread Zolnai Tamás
 svx/source/items/svxitems.src |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit f4b44a81fad83a4c3c8c4dd5f962ad52fd57a2b2
Author: Zolnai Tamás 
Date:   Sun Jun 14 11:14:52 2015 +0200

tdf#90063 Avoid duplicated attribute names in RID_ATTR_NAMES

It causes trouble to localiztation tools and also
makes hard to distinguish these items on the UI.
e.g. Edit -> Find & Replace -> Other options
-> Attributes.

(cherry picked from commit dd79dbedd6c7f889f5e39f146a1927d235bc8a59)

Change-Id: Ie7a17e02947200a570b5e6209c8a99d1883a6860

diff --git a/svx/source/items/svxitems.src b/svx/source/items/svxitems.src
index 3121ea9..6687cfd 100644
--- a/svx/source/items/svxitems.src
+++ b/svx/source/items/svxitems.src
@@ -44,7 +44,7 @@ StringArray RID_ATTR_NAMES
 < "Effects" ;   SID_ATTR_CHAR_CASEMAP ; > ;
 < "Language";   SID_ATTR_CHAR_LANGUAGE ; > ;
 < "Position";   SID_ATTR_CHAR_ESCAPEMENT ; > ;
-< "Blinking";   SID_ATTR_CHAR_AUTOKERN ; > ;
+< "Character blinking"; SID_ATTR_CHAR_AUTOKERN ; > ;
 < "Character set color"   ; SID_ATTR_CHAR_CHARSETCOLOR ; > ;
 < "Overline"  ; SID_ATTR_CHAR_OVERLINE ; > ;
 < "Paragraph"   ;   SID_ATTR_PARA ; > ;
@@ -55,8 +55,8 @@ StringArray RID_ATTR_NAMES
 < "Do not split paragraph"; SID_ATTR_PARA_SPLIT ; > ;
 < "Orphans" ;   SID_ATTR_PARA_ORPHANS ; > ;
 < "Widows"  ;   SID_ATTR_PARA_WIDOWS ; > ;
-< "Spacing" ;   SID_ATTR_PARA_ULSPACE ; > ;
-< "Indent"  ;   SID_ATTR_PARA_LRSPACE ; > ;
+< "Paragraph spacing" ; SID_ATTR_PARA_ULSPACE ; > ;
+< "Paragraph indent"  ; SID_ATTR_PARA_LRSPACE ; > ;
 < "Indent"  ;   SID_ATTR_LRSPACE ; > ;
 < "Spacing" ;   SID_ATTR_ULSPACE ; > ;
 < "Page";   SID_ATTR_PAGE ; > ;
@@ -81,7 +81,7 @@ StringArray RID_ATTR_NAMES
 < "Hanging punctuation" ;   SID_ATTR_PARA_HANGPUNCTUATION ; > ;
 < "Forbidden characters";   SID_ATTR_PARA_FORBIDDEN_RULES ; > ;
 < "Rotation";   SID_ATTR_CHAR_ROTATED ; > ;
-< "Scale"   ;   SID_ATTR_CHAR_SCALEWIDTH ; > ;
+< "Character scaling"   ;   SID_ATTR_CHAR_SCALEWIDTH ; > ;
 < "Relief"  ;   SID_ATTR_CHAR_RELIEF ; > ;
 < "Vertical text alignment" ;   SID_PARA_VERTALIGN ; > ;
 };
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: cui/source cui/uiconfig include/svx reportdesign/source reportdesign/uiconfig sw/source sw/uiconfig

2015-06-14 Thread Zolnai Tamás
 cui/source/inc/backgrnd.hxx |1 +
 cui/source/tabpages/backgrnd.cxx|7 +++
 cui/uiconfig/ui/backgroundpage.ui   |2 +-
 include/svx/flagsdef.hxx|1 +
 reportdesign/source/ui/dlg/dlgpage.cxx  |   12 +++-
 reportdesign/source/ui/inc/dlgpage.hxx  |3 +++
 reportdesign/uiconfig/dbreport/ui/chardialog.ui |2 +-
 sw/source/ui/chrdlg/chardlg.cxx |5 +
 sw/source/ui/fmtui/tmpdlg.cxx   |2 ++
 sw/uiconfig/swriter/ui/characterproperties.ui   |2 +-
 sw/uiconfig/swriter/ui/templatedialog1.ui   |2 +-
 11 files changed, 34 insertions(+), 5 deletions(-)

New commits:
commit 3588a04f438b001cb64aa1fd86b28869f2c4e70b
Author: Zolnai Tamás 
Date:   Sun Jun 14 18:50:01 2015 +0200

tdf#89830: Ambiguous naming of character background

Use 'Highlighting' also on Character Dialog.

Change-Id: Ie81d25651e5998a35b4e2646089b8f2c590cfb98

diff --git a/cui/source/inc/backgrnd.hxx b/cui/source/inc/backgrnd.hxx
index a0441bf..c12a33b 100644
--- a/cui/source/inc/backgrnd.hxx
+++ b/cui/source/inc/backgrnd.hxx
@@ -80,6 +80,7 @@ private:
 VclPtrm_pTblLBox;
 VclPtrm_pParaLBox;
 
+VclPtr  m_pBackGroundColorLabelFT;
 VclPtr   m_pBackGroundColorFrame;
 VclPtr   m_pBackgroundColorSet;
 VclPtr  m_pPreviewWin1;
diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx
index 733dcaf..bc4b6c6 100644
--- a/cui/source/tabpages/backgrnd.cxx
+++ b/cui/source/tabpages/backgrnd.cxx
@@ -357,6 +357,7 @@ SvxBackgroundTabPage::SvxBackgroundTabPage(vcl::Window* 
pParent, const SfxItemSe
 get(m_pTblLBox, "tablelb");
 get(m_pParaLBox, "paralb");
 
+get(m_pBackGroundColorLabelFT, "background_label");
 get(m_pBackGroundColorFrame, "backgroundcolorframe");
 get(m_pBackgroundColorSet, "backgroundcolorset");
 get(m_pPreviewWin1, "preview1");
@@ -1707,7 +1708,13 @@ void SvxBackgroundTabPage::PageCreated(const 
SfxAllItemSet& aSet)
 if ( nFlags & SvxBackgroundTabFlags::SHOW_PARACTL )
 ShowParaControl();
 if ( nFlags & SvxBackgroundTabFlags::SHOW_SELECTOR )
+{
 ShowSelector();
+}
+if ( nFlags & SvxBackgroundTabFlags::SHOW_HIGHLIGHTING )
+{
+m_pBackGroundColorLabelFT->SetText("Highlighting Color");
+}
 }
 }
 
diff --git a/cui/uiconfig/ui/backgroundpage.ui 
b/cui/uiconfig/ui/backgroundpage.ui
index 6076bab..91c5cb8 100644
--- a/cui/uiconfig/ui/backgroundpage.ui
+++ b/cui/uiconfig/ui/backgroundpage.ui
@@ -221,7 +221,7 @@
   
 
 
-  
+  
 True
 False
 Background 
Color
diff --git a/include/svx/flagsdef.hxx b/include/svx/flagsdef.hxx
index e074520..c3795de 100644
--- a/include/svx/flagsdef.hxx
+++ b/include/svx/flagsdef.hxx
@@ -44,6 +44,7 @@ enum class SvxBackgroundTabFlags
 SHOW_SELECTOR   = 0x01,
 SHOW_PARACTL= 0x02,
 SHOW_TBLCTL = 0x08,
+SHOW_HIGHLIGHTING   = 0x10,
 };
 namespace o3tl
 {
diff --git a/reportdesign/source/ui/dlg/dlgpage.cxx 
b/reportdesign/source/ui/dlg/dlgpage.cxx
index e4e7628..3e8ff66 100644
--- a/reportdesign/source/ui/dlg/dlgpage.cxx
+++ b/reportdesign/source/ui/dlg/dlgpage.cxx
@@ -60,7 +60,7 @@ ORptPageDialog::ORptPageDialog( vcl::Window* pParent, const 
SfxItemSet* pAttr, c
 AddTabPage("fonteffects", pFact->GetTabPageCreatorFunc( 
RID_SVXPAGE_CHAR_EFFECTS ), 0 );
 AddTabPage("position", pFact->GetTabPageCreatorFunc( 
RID_SVXPAGE_CHAR_POSITION ), 0 );
 AddTabPage("asianlayout", pFact->GetTabPageCreatorFunc( 
RID_SVXPAGE_CHAR_TWOLINES ), 0 );
-AddTabPage("background", pFact->GetTabPageCreatorFunc( 
RID_SVXPAGE_BACKGROUND ), 0 );
+m_nCharBgdId = AddTabPage("background", pFact->GetTabPageCreatorFunc( 
RID_SVXPAGE_BACKGROUND ), 0 );
 AddTabPage("alignment", pFact->GetTabPageCreatorFunc( 
RID_SVXPAGE_ALIGNMENT ), 0 );
 }
 else
@@ -71,6 +71,16 @@ ORptPageDialog::ORptPageDialog( vcl::Window* pParent, const 
SfxItemSet* pAttr, c
 RemoveTabPage("asianlayout");
 }
 
+void ORptPageDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
+{
+SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
+if (nId == m_nCharBgdId)
+{
+
aSet.Put(SfxUInt32Item(SID_FLAG_TYPE,static_cast(SvxBackgroundTabFlags::SHOW_HIGHLIGHTING)));
+rPage.PageCreated(aSet);
+}
+}
+
 } // namespace rptui
 
 
diff --git a/reportdesign/source/ui/inc/dlgpage.hxx 
b/reportdesign/source/ui/inc/dlgpage.hxx
index 5085aab..1b577a4 100644
--- a/reportdesign/source/ui/inc/dlgpage.hxx
+++ b/reportdesign/source/ui/inc/dlgpage.hxx
@@ -33,9 +33,12 @@ class ORptPageDialog : public SfxTabDialog
 private:
 ORptPageDialog(const ORptPageDialog&) SAL_DELETED_FUNCTION;
 void operator =(const O

[Libreoffice-commits] core.git: cui/source cui/uiconfig include/svx sw/source

2015-06-14 Thread Zolnai Tamás
 cui/source/inc/backgrnd.hxx   |8 ---
 cui/source/tabpages/backgrnd.cxx  |   79 --
 cui/uiconfig/ui/backgroundpage.ui |   72 --
 include/svx/flagsdef.hxx  |1 
 sw/source/ui/fmtui/tmpdlg.cxx |   10 
 5 files changed, 1 insertion(+), 169 deletions(-)

New commits:
commit 63ca46a0dc064de0bba52224449effeec3e90efc
Author: Zolnai Tamás 
Date:   Sun Jun 14 18:23:13 2015 +0200

Transparency part of Background Tab is unused now

It was used for frames, but on Frame Dialog
Background Tab was replaced with Area Tab.

Change-Id: I69774c7321a210094f6e139a5b3d4d5819947ceb

diff --git a/cui/source/inc/backgrnd.hxx b/cui/source/inc/backgrnd.hxx
index 633e4e6..a0441bf 100644
--- a/cui/source/inc/backgrnd.hxx
+++ b/cui/source/inc/backgrnd.hxx
@@ -64,7 +64,6 @@ public:
 /// for the Writer (paragraph/characters)
 voidShowParaControl(bool bCharOnly = false);
 
-voidEnableTransparency(bool bColor, bool bGraphic);
 virtual voidPageCreated(const SfxAllItemSet& aSet) SAL_OVERRIDE;
 protected:
 virtual sfxpg   DeactivatePage( SfxItemSet* pSet = 0 ) SAL_OVERRIDE;
@@ -85,8 +84,6 @@ private:
 VclPtr   m_pBackgroundColorSet;
 VclPtr  m_pPreviewWin1;
 
-VclPtr  m_pColTransFT;///m_pColTransMF;
 VclPtr   m_pBtnPreview;
 
 // Background Bitmap --
@@ -103,9 +100,6 @@ private:
 VclPtrm_pBtnTile;
 VclPtr m_pWndPosition;
 
-VclPtr   m_pGraphTransFrame;///m_pGraphTransMF;
-
 VclPtr  m_pPreviewWin2;
 
 // DDListBox for Writer ---
@@ -115,8 +109,6 @@ private:
 boolbAllowShowSelector  : 1;
 boolbIsGraphicValid : 1;
 boolbLinkOnly   : 1;
-boolbColTransparency: 1;
-boolbGraphTransparency  : 1;
 Graphic aBgdGraphic;
 OUStringaBgdGraphicPath;
 OUStringaBgdGraphicFilter;
diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx
index 9ba70fa..733dcaf 100644
--- a/cui/source/tabpages/backgrnd.cxx
+++ b/cui/source/tabpages/backgrnd.cxx
@@ -115,21 +115,10 @@ struct SvxBackgroundPage_Impl
 {}
 };
 
-static inline sal_uInt8 lcl_PercentToTransparency(long nPercent)
-{
-//0xff must not be returned!
-return sal_uInt8(nPercent ? (50 + 0xfe * nPercent) / 100 : 0);
-}
 static inline sal_uInt8 lcl_TransparencyToPercent(sal_uInt8 nTrans)
 {
 return (nTrans * 100 + 127) / 254;
 }
-static void lcl_SetTransparency(SvxBrushItem& rBrush, long nTransparency)
-{
-uno::Any aTransparency;
-aTransparency <<= (sal_Int8)nTransparency;
-rBrush.PutValue(aTransparency, MID_GRAPHIC_TRANSPARENCY);
-}
 
 /// Returns the fill style of the currently selected entry.
 static drawing::FillStyle lcl_getFillStyle(ListBox* pLbSelect)
@@ -356,8 +345,6 @@ SvxBackgroundTabPage::SvxBackgroundTabPage(vcl::Window* 
pParent, const SfxItemSe
 , bAllowShowSelector(true)
 , bIsGraphicValid(false)
 , bLinkOnly(false)
-, bColTransparency(false)
-, bGraphTransparency(false)
 , pPageImpl(new SvxBackgroundPage_Impl)
 , pImportDlg(NULL)
 , pTableBck_Impl(NULL)
@@ -374,8 +361,6 @@ SvxBackgroundTabPage::SvxBackgroundTabPage(vcl::Window* 
pParent, const SfxItemSe
 get(m_pBackgroundColorSet, "backgroundcolorset");
 get(m_pPreviewWin1, "preview1");
 
-get(m_pColTransFT, "transparencyft");
-get(m_pColTransMF, "transparencymf");
 get(m_pBtnPreview, "showpreview");
 
 get(m_pBitmapContainer, "graphicgrid");
@@ -391,9 +376,6 @@ SvxBackgroundTabPage::SvxBackgroundTabPage(vcl::Window* 
pParent, const SfxItemSe
 get(m_pBtnTile, "tilerb");
 get(m_pWndPosition, "windowpos");
 
-get(m_pGraphTransFrame, "graphtransframe");
-get(m_pGraphTransMF, "graphtransmf");
-
 get(m_pPreviewWin2, "preview2");
 m_pPreviewWin2->setBmp(true);
 
@@ -460,8 +442,6 @@ void SvxBackgroundTabPage::dispose()
 m_pBackGroundColorFrame.clear();
 m_pBackgroundColorSet.clear();
 m_pPreviewWin1.clear();
-m_pColTransFT.clear();
-m_pColTransMF.clear();
 m_pBtnPreview.clear();
 m_pBitmapContainer.clear();
 m_pFileFrame.clear();
@@ -474,8 +454,6 @@ void SvxBackgroundTabPage::dispose()
 m_pBtnArea.clear();
 m_pBtnTile.clear();
 m_pWndPosition.clear();
-m_pGraphTransFrame.clear();
-m_pGraphTransMF.clear();
 m_pPreviewWin2.clear();
 SvxTabPage::dispose();
 }
@@ -775,19 +753,12 @@ bool SvxBackgroundTabPage::FillItemSet( SfxItemSet* 
rCoreSet )
 SfxItemState eOldItemState = rCoreSet->GetItemState(nSlot, false);
 const SfxItemSet& rOldSet = GetItemSet();
 
-bool bGraphTransparencyChanged = bGraphTransparency && 
m_pGraphTransMF->IsValueChangedFromSaved();
 if ( pOld )
 {
 const SvxBrush

[Libreoffice-commits] core.git: 2 commits - chart2/inc chart2/source drawinglayer/Library_drawinglayer.mk drawinglayer/source include/drawinglayer include/svx include/vcl svx/inc svx/Library_svxcore.m

2015-06-14 Thread Zolnai Tamás
 chart2/inc/pch/precompiled_chartopengl.hxx |1 
 chart2/source/view/main/OpenglShapeFactory.cxx |1 
 drawinglayer/Library_drawinglayer.mk   |1 
 drawinglayer/source/primitive2d/baseprimitive2d.cxx|1 
 drawinglayer/source/primitive2d/openglprimitive2d.cxx  |   32 
 drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx |6 
 drawinglayer/source/processor2d/vclprocessor2d.cxx |   10 -
 drawinglayer/source/processor2d/vclprocessor2d.hxx |2 
 include/drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx |1 
 include/drawinglayer/primitive2d/openglprimitive2d.hxx |   41 
--
 include/svx/svdobj.hxx |1 
 include/svx/unoshape.hxx   |   10 -
 include/vcl/opengl/IOpenGLRenderer.hxx |   47 
---
 svx/Library_svxcore.mk |3 
 svx/inc/pch/precompiled_svxcore.hxx|2 
 svx/inc/sdr/contact/viewobjectcontactofopenglobj.hxx   |   36 -
 svx/inc/svdoopengl.hxx |   51 
---
 svx/source/items/svxitems.src  |8 -
 svx/source/sdr/contact/viewcontactofopenglobj.cxx  |   44 
--
 svx/source/sdr/contact/viewobjectcontactofopenglobj.cxx|   54 

 svx/source/svdraw/svdobj.cxx   |3 
 svx/source/svdraw/svdoopengl.cxx   |   65 
--
 svx/source/unodraw/unomod.cxx  |4 
 svx/source/unodraw/unopage.cxx |3 
 svx/source/unodraw/unoprov.cxx |1 
 svx/source/unodraw/unoshap4.cxx|   11 -
 unusedcode.easy|2 
 27 files changed, 4 insertions(+), 437 deletions(-)

New commits:
commit 0bf12a06b6344659fe964955a022c7f367598634
Author: Zolnai Tamás 
Date:   Sun Jun 14 12:22:01 2015 +0200

Remove unused OpenGLObject

Change-Id: I5c4832bd076cc5f05f936ac0d6a80027344e40ff

diff --git a/chart2/inc/pch/precompiled_chartopengl.hxx 
b/chart2/inc/pch/precompiled_chartopengl.hxx
index ffcb6ed..c46509d 100644
--- a/chart2/inc/pch/precompiled_chartopengl.hxx
+++ b/chart2/inc/pch/precompiled_chartopengl.hxx
@@ -55,7 +55,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
diff --git a/chart2/source/view/main/OpenglShapeFactory.cxx 
b/chart2/source/view/main/OpenglShapeFactory.cxx
index 55774a9..5c9f756 100644
--- a/chart2/source/view/main/OpenglShapeFactory.cxx
+++ b/chart2/source/view/main/OpenglShapeFactory.cxx
@@ -47,7 +47,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 
 #include 
diff --git a/drawinglayer/Library_drawinglayer.mk 
b/drawinglayer/Library_drawinglayer.mk
index a4ef767..690c73a 100644
--- a/drawinglayer/Library_drawinglayer.mk
+++ b/drawinglayer/Library_drawinglayer.mk
@@ -91,7 +91,6 @@ $(eval $(call gb_Library_add_exception_objects,drawinglayer,\
 drawinglayer/source/primitive2d/metafileprimitive2d \
 drawinglayer/source/primitive2d/modifiedcolorprimitive2d \
 drawinglayer/source/primitive2d/objectinfoprimitive2d \
-drawinglayer/source/primitive2d/openglprimitive2d \
 drawinglayer/source/primitive2d/pagepreviewprimitive2d \
drawinglayer/source/primitive2d/patternfillprimitive2d \
 drawinglayer/source/primitive2d/pointarrayprimitive2d \
diff --git a/drawinglayer/source/primitive2d/baseprimitive2d.cxx 
b/drawinglayer/source/primitive2d/baseprimitive2d.cxx
index 89f8ef1..83c8108 100644
--- a/drawinglayer/source/primitive2d/baseprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/baseprimitive2d.cxx
@@ -357,7 +357,6 @@ namespace drawinglayer
 case PRIMITIVE2D_ID_OBJECTINFOPRIMITIVE2D: return 
OUString("OBJECTINFO");
 case PRIMITIVE2D_ID_POLYPOLYGONSELECTIONPRIMITIVE2D: return 
OUString("POLYPOLYGONSELECTION");
 case PRIMITIVE2D_ID_CLIPPEDBORDERLINEPRIMITIVE2D: return 
OUString("CLIPPEDBORDERLINE");
-case PRIMITIVE2D_ID_OPENGLPRIMITIVE2D: return OUString("OPENGL");
 default: return OUString::number((nId >> 16) & 0xFF) + "|" + 
OUString::number(nId & 0xFF);
 }
 }
diff --git a/drawinglayer/source/primitive2d/openglprimitive2d.cxx 
b/drawinglayer/source/primitive2d/openglprimitive2d.cxx
deleted file mode 100644
index 3ed333b..000
--- a/drawinglayer/source/primitive2d/openglprimitive2d.cxx
+++ /dev/null
@@ -1,32 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code 

[Libreoffice-commits] core.git: sw/source

2015-05-01 Thread Zolnai Tamás
 sw/source/uibase/shells/textsh1.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit d2448a45767230d3e2913becb44f1a8bd2dfc46a
Author: Zolnai Tamás 
Date:   Fri May 1 12:20:19 2015 +0200

tdf#90968: Highlighting is not repeated with Ctrl+Shft+Y (Edit>Repeat)

Regression from:
08cfbbaca2d23727bc95912082ae46b8f8a37f03

Use undo actions to make the shell handle all of the background
related changes in one piece.

Change-Id: Ia2b64267727693f663ace5daf1dc094a663ea345

diff --git a/sw/source/uibase/shells/textsh1.cxx 
b/sw/source/uibase/shells/textsh1.cxx
index 0c0ed9b..ac1e453 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -1176,6 +1176,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
 
 if(!pApply && (rWrtSh.HasSelection() || rReq.IsAPI()))
 {
+rWrtSh.StartUndo( UNDO_INSATTR );
 SvxBrushItem aBrushItem(RES_CHRATR_BACKGROUND);
 aBrushItem.SetColor(aSet);
 rWrtSh.SetAttrItem( aBrushItem );
@@ -1199,6 +1200,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
 }
 rWrtSh.SetAttrItem( aGrabBag );
 }
+rWrtSh.EndUndo( UNDO_INSATTR );
 }
 else if(!pApply || pApply->nColor != 
SID_ATTR_CHAR_COLOR_BACKGROUND_EXT)
 {
@@ -1229,6 +1231,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
 {
 if(nSlot == SID_ATTR_CHAR_COLOR_BACKGROUND_EXT)
 {
+rWrtSh.StartUndo( UNDO_INSATTR );
 rWrtSh.SetAttrItem(
 SvxBrushItem( rEdtWin.GetTextBackColor(), 
RES_CHRATR_BACKGROUND) );
 
@@ -1251,6 +1254,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
 }
 rWrtSh.SetAttrItem( aGrabBag );
 }
+rWrtSh.EndUndo( UNDO_INSATTR );
 }
 else
 rWrtSh.SetAttrItem(
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sw/source

2015-04-21 Thread Zolnai Tamás
 sw/source/uibase/shells/tabsh.cxx |   19 +++
 1 file changed, 11 insertions(+), 8 deletions(-)

New commits:
commit badec7478035008f514e0976a94438fe2e32dc40
Author: Zolnai Tamás 
Date:   Tue Apr 21 15:28:36 2015 +0200

tdf#90766: Table - keep with paragraph setting is broken

Modify input set before dialog is created

Change-Id: I66d9ed5c07fcdfe4841d071be9b5252aa925b987

diff --git a/sw/source/uibase/shells/tabsh.cxx 
b/sw/source/uibase/shells/tabsh.cxx
index 888bf21..0631ece 100644
--- a/sw/source/uibase/shells/tabsh.cxx
+++ b/sw/source/uibase/shells/tabsh.cxx
@@ -562,6 +562,16 @@ void SwTableShell::Execute(SfxRequest &rReq)
 FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebView, 
&rSh.GetView()));
 SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< 
sal_uInt16 >(eMetric)));
 boost::scoped_ptr pTblRep(::lcl_TableParamToItemSet( 
aCoreSet, rSh ));
+
+aCoreSet.Put(SfxUInt16Item(SID_HTML_MODE, 
::GetHtmlMode(GetView().GetDocShell(;
+rSh.GetTblAttr(aCoreSet);
+// GetTblAttr overwrites the background!
+SvxBrushItem aBrush( RES_BACKGROUND );
+if(rSh.GetBoxBackground(aBrush))
+aCoreSet.Put( aBrush );
+else
+aCoreSet.InvalidateItem( RES_BACKGROUND );
+
 boost::scoped_ptr pDlg;
 {
 SwAbstractDialogFactory* pFact = 
SwAbstractDialogFactory::Create();
@@ -573,14 +583,7 @@ void SwTableShell::Execute(SfxRequest &rReq)
 if (pItem)
 pDlg->SetCurPageId(OUStringToOString(static_cast(pItem)->GetValue(), RTL_TEXTENCODING_UTF8));
 }
-aCoreSet.Put(SfxUInt16Item(SID_HTML_MODE, 
::GetHtmlMode(GetView().GetDocShell(;
-rSh.GetTblAttr(aCoreSet);
-// GetTblAttr overwrites the background!
-SvxBrushItem aBrush( RES_BACKGROUND );
-if(rSh.GetBoxBackground(aBrush))
-aCoreSet.Put( aBrush );
-else
-aCoreSet.InvalidateItem( RES_BACKGROUND );
+
 
 if ( (!pDlg && rReq.GetArgs()) || (pDlg && pDlg->Execute() == 
RET_OK) )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] help.git: Changes to 'refs/tags/cp-4.2-29'

2015-04-07 Thread Zolnai Tamás
Tag 'cp-4.2-29' created by Andras Timar  at 
2015-04-07 09:05 -0700

cp-4.2-29

Changes since libreoffice-4-2-branch-point-7:
---
 0 files changed
---
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - oox/source sd/qa

2015-03-31 Thread Zolnai Tamás
 oox/source/drawingml/table/tablecell.cxx |   11 +++
 sd/qa/unit/data/pptx/bnc910045.pptx  |binary
 sd/qa/unit/import-tests.cxx  |   23 +++
 3 files changed, 34 insertions(+)

New commits:
commit d23f9b40c5d95ab209747417aa543f8b7ecc3d5f
Author: Zolnai Tamás 
Date:   Fri Dec 5 19:23:01 2014 +0100

bnc#910045 wrong cell fill color defined by table style

Problems were with those table styles which used
color themes to define cell fill color.

Reviewed-on: https://gerrit.libreoffice.org/15089
Tested-by: Jenkins 
Reviewed-by: Andras Timar 
(cherry picked from commit debf3ffb87d607704ddea97f6710c3ceaa9a243d)
Signed-off-by: Andras Timar 

Conflicts:
sd/qa/unit/import-tests.cxx

Change-Id: Ibde90df81ff253ba65618dde4038093d1caabfe8

diff --git a/oox/source/drawingml/table/tablecell.cxx 
b/oox/source/drawingml/table/tablecell.cxx
index 1b33659..7c4dd9f 100644
--- a/oox/source/drawingml/table/tablecell.cxx
+++ b/oox/source/drawingml/table/tablecell.cxx
@@ -116,6 +116,17 @@ void applyTableStylePart( const 
::oox::core::XmlFilterBase& rFilterBase,
 ::oox::drawingml::FillPropertiesPtr& rPartFillPropertiesPtr( 
rTableStylePart.getFillProperties() );
 if ( rPartFillPropertiesPtr.get() )
 rFillProperties.assignUsed( *rPartFillPropertiesPtr );
+else
+{
+::oox::drawingml::ShapeStyleRef& rFillStyleRef = 
rTableStylePart.getStyleRefs()[ XML_fillRef ];
+const Theme* pTheme = rFilterBase.getCurrentTheme();
+if (pTheme && rFillStyleRef.mnThemedIdx != 0 )
+{
+rFillProperties.assignUsed( *pTheme->getFillStyle( 
rFillStyleRef.mnThemedIdx ) );
+sal_Int32 nPhClr = rFillStyleRef.maPhClr.getColor( 
rFilterBase.getGraphicHelper() );
+rFillProperties.maFillColor.setSrgbClr( nPhClr );
+}
+}
 
 applyBorder( rFilterBase, rTableStylePart, XML_left, rLeftBorder );
 applyBorder( rFilterBase, rTableStylePart, XML_right, rRightBorder );
diff --git a/sd/qa/unit/data/pptx/bnc910045.pptx 
b/sd/qa/unit/data/pptx/bnc910045.pptx
new file mode 100644
index 000..5788ea9
Binary files /dev/null and b/sd/qa/unit/data/pptx/bnc910045.pptx differ
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index c5fc418..13b23b7 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -100,6 +100,7 @@ public:
 void testShapeLineStyle();
 void testBnc862510_6();
 void testBnc862510_7();
+void testBnc910045();
 #if !defined WNT
 void testBnc822341();
 #endif
@@ -144,6 +145,7 @@ public:
 CPPUNIT_TEST(testBnc822341);
 #endif
 
+CPPUNIT_TEST(testBnc910045);
 
 CPPUNIT_TEST_SUITE_END();
 };
@@ -1366,6 +1368,27 @@ void SdFiltersTest::testBnc822341()
 
 #endif
 
+void SdFiltersTest::testBnc910045()
+{
+// Problem with table style which defines cell color with fill style
+::sd::DrawDocShellRef xDocShRef = loadURL( 
getURLFromSrc("/sd/qa/unit/data/pptx/bnc910045.pptx") );
+
+SdDrawDocument *pDoc = xDocShRef->GetDoc();
+CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != NULL );
+const SdrPage *pPage = pDoc->GetPage(1);
+CPPUNIT_ASSERT_MESSAGE( "no page", pPage != NULL );
+
+sdr::table::SdrTableObj *pTableObj = 
dynamic_cast(pPage->GetObj(0));
+CPPUNIT_ASSERT( pTableObj );
+uno::Reference< table::XCellRange > xTable(pTableObj->getTable(), 
uno::UNO_QUERY_THROW);
+uno::Reference< beans::XPropertySet > xCell;
+sal_Int32 nColor;
+
+xCell.set(xTable->getCellByPosition(0, 0), uno::UNO_QUERY_THROW);
+xCell->getPropertyValue("FillColor") >>= nColor;
+CPPUNIT_ASSERT_EQUAL(sal_Int32(5210557), nColor);
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(SdFiltersTest);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-4' - oox/source sd/qa

2015-03-31 Thread Zolnai Tamás
 oox/source/drawingml/table/tablecell.cxx |   11 +++
 sd/qa/unit/data/pptx/bnc910045.pptx  |binary
 sd/qa/unit/import-tests.cxx  |   23 +++
 3 files changed, 34 insertions(+)

New commits:
commit 0207796fe509e8d00a7101d4da8f8301cb58a099
Author: Zolnai Tamás 
Date:   Fri Dec 5 19:23:01 2014 +0100

bnc#910045 wrong cell fill color defined by table style

Problems were with those table styles which used
color themes to define cell fill color.

Reviewed-on: https://gerrit.libreoffice.org/15089
Tested-by: Jenkins 
Reviewed-by: Andras Timar 
(cherry picked from commit debf3ffb87d607704ddea97f6710c3ceaa9a243d)
Signed-off-by: Andras Timar 

Conflicts:
sd/qa/unit/import-tests.cxx

Change-Id: Ibde90df81ff253ba65618dde4038093d1caabfe8

diff --git a/oox/source/drawingml/table/tablecell.cxx 
b/oox/source/drawingml/table/tablecell.cxx
index 45486fd..c94848a 100644
--- a/oox/source/drawingml/table/tablecell.cxx
+++ b/oox/source/drawingml/table/tablecell.cxx
@@ -116,6 +116,17 @@ void applyTableStylePart( const 
::oox::core::XmlFilterBase& rFilterBase,
 ::oox::drawingml::FillPropertiesPtr& rPartFillPropertiesPtr( 
rTableStylePart.getFillProperties() );
 if ( rPartFillPropertiesPtr.get() )
 rFillProperties.assignUsed( *rPartFillPropertiesPtr );
+else
+{
+::oox::drawingml::ShapeStyleRef& rFillStyleRef = 
rTableStylePart.getStyleRefs()[ XML_fillRef ];
+const Theme* pTheme = rFilterBase.getCurrentTheme();
+if (pTheme && rFillStyleRef.mnThemedIdx != 0 )
+{
+rFillProperties.assignUsed( *pTheme->getFillStyle( 
rFillStyleRef.mnThemedIdx ) );
+sal_Int32 nPhClr = rFillStyleRef.maPhClr.getColor( 
rFilterBase.getGraphicHelper() );
+rFillProperties.maFillColor.setSrgbClr( nPhClr );
+}
+}
 
 applyBorder( rFilterBase, rTableStylePart, XML_left, rLeftBorder );
 applyBorder( rFilterBase, rTableStylePart, XML_right, rRightBorder );
diff --git a/sd/qa/unit/data/pptx/bnc910045.pptx 
b/sd/qa/unit/data/pptx/bnc910045.pptx
new file mode 100644
index 000..5788ea9
Binary files /dev/null and b/sd/qa/unit/data/pptx/bnc910045.pptx differ
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index a9d55c5..c9de7bd 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -96,6 +96,7 @@ public:
 void testBnc862510_7();
 void testPDFImport();
 void testPDFImportSkipImages();
+void testBnc910045();
 
 CPPUNIT_TEST_SUITE(SdImportTest);
 
@@ -129,6 +130,7 @@ public:
 CPPUNIT_TEST(testBnc862510_6);
 CPPUNIT_TEST(testBnc862510_7);
 CPPUNIT_TEST(testPDFImport);
+CPPUNIT_TEST(testBnc910045);
 
 CPPUNIT_TEST_SUITE_END();
 };
@@ -1112,6 +1114,27 @@ void SdImportTest::testPDFImportSkipImages()
 xDocShRef->DoClose();
 }
 
+void SdImportTest::testBnc910045()
+{
+// Problem with table style which defines cell color with fill style
+::sd::DrawDocShellRef xDocShRef = loadURL( 
getURLFromSrc("/sd/qa/unit/data/pptx/bnc910045.pptx"), PPTX );
+
+SdDrawDocument *pDoc = xDocShRef->GetDoc();
+CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != NULL );
+const SdrPage *pPage = pDoc->GetPage(1);
+CPPUNIT_ASSERT_MESSAGE( "no page", pPage != NULL );
+
+sdr::table::SdrTableObj *pTableObj = 
dynamic_cast(pPage->GetObj(0));
+CPPUNIT_ASSERT( pTableObj );
+uno::Reference< table::XCellRange > xTable(pTableObj->getTable(), 
uno::UNO_QUERY_THROW);
+uno::Reference< beans::XPropertySet > xCell;
+sal_Int32 nColor;
+
+xCell.set(xTable->getCellByPosition(0, 0), uno::UNO_QUERY_THROW);
+xCell->getPropertyValue("FillColor") >>= nColor;
+CPPUNIT_ASSERT_EQUAL(sal_Int32(5210557), nColor);
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(SdImportTest);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: oox/source sd/qa

2015-03-31 Thread Zolnai Tamás
 oox/source/drawingml/table/tablecell.cxx |   11 +++
 sd/qa/unit/data/pptx/bnc910045.pptx  |binary
 sd/qa/unit/import-tests.cxx  |   23 +++
 3 files changed, 34 insertions(+)

New commits:
commit debf3ffb87d607704ddea97f6710c3ceaa9a243d
Author: Zolnai Tamás 
Date:   Fri Dec 5 19:23:01 2014 +0100

bnc#910045 wrong cell fill color defined by table style

Problems were with those table styles which used
color themes to define cell fill color.

Change-Id: Ibde90df81ff253ba65618dde4038093d1caabfe8
Reviewed-on: https://gerrit.libreoffice.org/15089
Tested-by: Jenkins 
Reviewed-by: Andras Timar 

diff --git a/oox/source/drawingml/table/tablecell.cxx 
b/oox/source/drawingml/table/tablecell.cxx
index 2d8dfb8..d753326 100644
--- a/oox/source/drawingml/table/tablecell.cxx
+++ b/oox/source/drawingml/table/tablecell.cxx
@@ -116,6 +116,17 @@ void applyTableStylePart( const 
::oox::core::XmlFilterBase& rFilterBase,
 ::oox::drawingml::FillPropertiesPtr& rPartFillPropertiesPtr( 
rTableStylePart.getFillProperties() );
 if ( rPartFillPropertiesPtr.get() )
 rFillProperties.assignUsed( *rPartFillPropertiesPtr );
+else
+{
+::oox::drawingml::ShapeStyleRef& rFillStyleRef = 
rTableStylePart.getStyleRefs()[ XML_fillRef ];
+const Theme* pTheme = rFilterBase.getCurrentTheme();
+if (pTheme && rFillStyleRef.mnThemedIdx != 0 )
+{
+rFillProperties.assignUsed( *pTheme->getFillStyle( 
rFillStyleRef.mnThemedIdx ) );
+sal_Int32 nPhClr = rFillStyleRef.maPhClr.getColor( 
rFilterBase.getGraphicHelper() );
+rFillProperties.maFillColor.setSrgbClr( nPhClr );
+}
+}
 
 applyBorder( rFilterBase, rTableStylePart, XML_left, rLeftBorder );
 applyBorder( rFilterBase, rTableStylePart, XML_right, rRightBorder );
diff --git a/sd/qa/unit/data/pptx/bnc910045.pptx 
b/sd/qa/unit/data/pptx/bnc910045.pptx
new file mode 100644
index 000..5788ea9
Binary files /dev/null and b/sd/qa/unit/data/pptx/bnc910045.pptx differ
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index fb8264e..d9d92b9 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -97,6 +97,7 @@ public:
 void testPDFImport();
 void testPDFImportSkipImages();
 void testBulletSuffix();
+void testBnc910045();
 
 CPPUNIT_TEST_SUITE(SdImportTest);
 
@@ -132,6 +133,7 @@ public:
 CPPUNIT_TEST(testPDFImport);
 CPPUNIT_TEST(testPDFImportSkipImages);
 CPPUNIT_TEST(testBulletSuffix);
+CPPUNIT_TEST(testBnc910045);
 
 CPPUNIT_TEST_SUITE_END();
 };
@@ -1139,6 +1141,27 @@ void SdImportTest::testBulletSuffix()
 xDocShRef->DoClose();
 }
 
+void SdImportTest::testBnc910045()
+{
+// Problem with table style which defines cell color with fill style
+::sd::DrawDocShellRef xDocShRef = loadURL( 
getURLFromSrc("/sd/qa/unit/data/pptx/bnc910045.pptx"), PPTX );
+
+SdDrawDocument *pDoc = xDocShRef->GetDoc();
+CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != NULL );
+const SdrPage *pPage = pDoc->GetPage(1);
+CPPUNIT_ASSERT_MESSAGE( "no page", pPage != NULL );
+
+sdr::table::SdrTableObj *pTableObj = 
dynamic_cast(pPage->GetObj(0));
+CPPUNIT_ASSERT( pTableObj );
+uno::Reference< table::XCellRange > xTable(pTableObj->getTable(), 
uno::UNO_QUERY_THROW);
+uno::Reference< beans::XPropertySet > xCell;
+sal_Int32 nColor;
+
+xCell.set(xTable->getCellByPosition(0, 0), uno::UNO_QUERY_THROW);
+xCell->getPropertyValue("FillColor") >>= nColor;
+CPPUNIT_ASSERT_EQUAL(sal_Int32(5210557), nColor);
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(SdImportTest);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: [Libreoffice-ux-advise] Discussion about highlighting (MS compatibility issue)

2015-03-24 Thread Zolnai Tamás
Hi there,

So in the end I solved this issue on the following way:
- I did not touch toolbar icons. I created a bug report about the
ambiguity of character background naming:
https://bugs.documentfoundation.org/show_bug.cgi?id=89830
- Both highlighting and shading can be a good candidate to export LO
character background to, so I added
a compatibility option to Tools -> Options -> Load/Save -> Microsoft
Office, where user can select how
to save LO character background (as which MSO attribute).
- Since the name "Highlighting" is more accessible than character
background in LO and than shading in MSO, I set
highlighting as the default for export. LO help also calls character
background as "Highlighting". So from a user point of
view LO character background is closer to MSO highlighting, in spite
of that on the implementation level it's closer to
MSO shading.
- MSO import / export filters preserve both MSO attributes. These two
attributes are there at a specific text range until
character background is edited by LO. Editing removes markers
indicating there we have MSO imported attributes and
adds LO specific character background.


Best Regards,
Tamás

2015-02-11 15:43 GMT+01:00 Zolnai Tamás :
> 2015-02-10 17:29 GMT+01:00 Michael Stahl :
>> On 10.02.2015 15:12, Zolnai Tamás wrote:
>>
>>> Second thing, I compared these three kind of character backgrounds and
>>> found that LO's character
>>> background is closer to MS shading attribute then to MS highlighting, 
>>> because:
>>> - LO's background color is a general attribute for different objects
>>> like text range, paragraph, frame, page, cell and so on, and character
>>> background is a specialization of it (like shading).
>>> - LO's background color and MS shading both has more color to choose
>>> from, while MS highlighting allows only 16 colors.
>>> - LO's background color and MS shading has a meaning like "fill the
>>> selected object's background with a color", while highlight has the
>>> meaning like "highlight a text range with a highlighter pen".
>>> So IMHO LO background color should be exported as shading to MS file
>>> formats and not as highlighting.
>>>
>>> Only similarity between LO's background color and MS highlighting is
>>> the "Highlighting" toolbar button and this is the
>>> problem here. Why LO uses an other name for character background on
>>> the toolbar and why not use exactly the same
>>> name (e.g. as in the menu)? This causes the misconceptions we have here.
>>
>> i agree that having 2 different ways to do almost but not exactly the
>> same thing in the UI is confusing.
>>
>>> So my new plan is:
>>> - Remove "Highlighting" toolbar button
>>> - Replace it with the existing "Background color" toolbar button (set
>>> it as default)
>>> - Extend the functionality of this "Background color" button to be
>>> able to set character background too (By now it is used for setting
>>> paragraph, frame and cell background)
>>>
>>> With that the toolbar icon of LO's character background will be
>>> similar to that which is used in Word for setting MS shading attribute
>>> (a paintbucket). This also means we don't need to support highlighting
>>> in LO to solve this interoperability problem.
>>>
>>> With respect to RES_CHRATR_HIGHLIGHT attribute it's still useful to
>>> store MS highlighting on a separate attribute so an MS file won't
>>> loose shading/highlighting information during a round trip. We can
>>> solve that on a transparent way, so the users won't know that we have
>>> two kind of character backgrounds behind the scenes.
>>
>> actually - why do we need 2 core attributes for this?  if you apply both
>> "highlight" and "shading" in Word, one should override the other
>> completely in the document view, or how does it work?  can't we just in
>> the import filter convert both to the same core item, and if both apply
>> to the same text range, then only apply the "higher priority" one?  then
>> export it again as the attribute that allows more colors :)
>
> In Word when both shading and highlighting is set to the same text
> range, then highlighting covers shading, but
> when highlighting is removed later then the shading "under" the
> highlighting becomes visible. I can imagine this like
> shading is a static part of the document while highlighting is set
> temporarily (similar to the comments highlighting).

[Libreoffice-commits] core.git: sw/source

2015-03-21 Thread Zolnai Tamás
 sw/source/filter/ww8/docxattributeoutput.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 6c76ba2437dad6afb0d760922eba7814418bda1e
Author: Zolnai Tamás 
Date:   Sat Mar 21 21:34:28 2015 +0100

TransHighlightColor: update description

Change-Id: I5248a1869e83d63026ec13fbcb793abfec43fcf0

diff --git a/sw/source/filter/ww8/docxattributeoutput.hxx 
b/sw/source/filter/ww8/docxattributeoutput.hxx
index bcbf38e..32f1c79 100644
--- a/sw/source/filter/ww8/docxattributeoutput.hxx
+++ b/sw/source/filter/ww8/docxattributeoutput.hxx
@@ -443,7 +443,7 @@ private:
  * Translate an ico value to the corresponding HighlightColorValues 
enumaration item
  *
  * @param[in]   nIco  ico value [0..16]
- * @return  color name (e.g. "red"), if color is inside the 
enumeration's range
+ * @return  color name (e.g. "red"), if color is inside [1..16] range
  *  empty string, otherwise
 **/
 static OString TransHighlightColor( sal_uInt8 nIco );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] help.git: source/text

2015-03-21 Thread Zolnai Tamás
 source/text/shared/optionen/01130200.xhp |   16 +++-
 1 file changed, 11 insertions(+), 5 deletions(-)

New commits:
commit 8b5320fd78d6ea9b3508c286a7e6acef31acb192
Author: Zolnai Tamás 
Date:   Sat Mar 21 16:58:36 2015 +0100

Help about new MSO compatibility option (character background export)

Change-Id: Iff9c549b170aee95cbb980534996a0d65beb

diff --git a/source/text/shared/optionen/01130200.xhp 
b/source/text/shared/optionen/01130200.xhp
index 04f9047..01ade1b 100644
--- a/source/text/shared/optionen/01130200.xhp
+++ b/source/text/shared/optionen/01130200.xhp
@@ -30,18 +30,24 @@
   

  Microsoft Office
- Specifies the settings for importing and exporting 
Microsoft Office OLE objects.
+ Specifies the settings for importing and exporting 
Microsoft Office documents.
   
-  These settings are valid when no Microsoft OLE server exists (for 
example, in UNIX) or when there is no $[officename] OLE server ready for 
editing the OLE objects.
-  If an OLE server is active for the embedded object, then the OLE 
server will be used to handle the object.
-  If no OLE server is active for MathType objects, then embedded 
MathType objects can be converted to %PRODUCTNAME Math objects. For this 
conversion, the embedded MathType objects must not exceed the MathType 3.1 
specifications.mail answer by Thomas Lange re 
i97686
   
  
   
-
+  Embedded Objects
+  The Embedded Objects section specifies how to import 
and export Microsoft Office OLE objects.
+  These settings are valid when no Microsoft OLE server exists (for 
example, in UNIX) or when there is no $[officename] OLE server ready for 
editing the OLE objects.
+  If an OLE server is active for the embedded object, then the OLE 
server will be used to handle the object.
+  If no OLE server is active for MathType objects, then embedded 
MathType objects can be converted to %PRODUCTNAME Math objects. For this 
conversion, the embedded MathType objects must not exceed the MathType 3.1 
specifications.mail answer by Thomas Lange re 
i97686
+
 List Box
   The List 
Box field displays the entries for the pair of OLE objects that can be 
converted when loading into $[officename] (L) and/or when saving into a 
Microsoft format (S). 
   Mark the box in the [L] column in front of the entry if a Microsoft 
OLE object is to be converted into the specified $[officename] OLE object when 
a Microsoft document is loaded into $[officename].
   Mark the box in the [S] column in front of the entry if a 
$[officename] OLE object is to be converted into the specified Microsoft OLE 
object when a document is saved in a Microsoft file format.
+
+
+Character Background
+  Microsoft Office has two character attributes similar to 
$[officename] character background. Select the appropriate attribute 
(highlighting or shading) which you would like to use during export to 
Microsoft Office file formats.

 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: helpcontent2

2015-03-21 Thread Zolnai Tamás
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 3bff04431fafc0725c7c537b93dfec50c2c1bc18
Author: Zolnai Tamás 
Date:   Sat Mar 21 16:58:36 2015 +0100

Updated core
Project: help  8b5320fd78d6ea9b3508c286a7e6acef31acb192

diff --git a/helpcontent2 b/helpcontent2
index be139ba..8b5320f 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit be139ba7c2e4eef2c529c8506820641185867ae0
+Subproject commit 8b5320fd78d6ea9b3508c286a7e6acef31acb192
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 12 commits - cui/source cui/uiconfig filter/source include/filter include/svl include/unotools include/xmloff officecfg/registry sw/qa sw/source unotools/source writerf

2015-03-21 Thread Zolnai Tamás
 cui/source/options/optfltr.cxx  |   19 
 cui/source/options/optfltr.hxx  |3 
 cui/uiconfig/ui/optfltrembedpage.ui |   94 +++
 dev/null|binary
 filter/source/msfilter/util.cxx |   42 +
 include/filter/msfilter/util.hxx|9 
 include/svl/grabbagitem.hxx |5 
 include/unotools/fltrcfg.hxx|5 
 include/xmloff/txtprmap.hxx |2 
 officecfg/registry/schema/org/openoffice/Office/Common.xcs  |7 
 sw/qa/extras/globalfilter/data/char_background.odt  |binary
 sw/qa/extras/globalfilter/data/char_background_editing.docx |binary
 sw/qa/extras/globalfilter/data/char_highlight.docx  |binary
 sw/qa/extras/globalfilter/globalfilter.cxx  |  311 +++-
 sw/qa/extras/ooxmlexport/ooxmlexport3.cxx   |   49 -
 sw/qa/extras/rtfexport/data/fdo79599.rtf|   38 -
 sw/qa/extras/rtfexport/rtfexport.cxx|9 
 sw/qa/extras/rtfimport/data/fdo79599.rtf|   38 -
 sw/qa/extras/rtfimport/rtfimport.cxx|   56 --
 sw/source/filter/ww8/attributeoutputbase.hxx|1 
 sw/source/filter/ww8/docxattributeoutput.cxx|   42 -
 sw/source/filter/ww8/docxattributeoutput.hxx|6 
 sw/source/filter/ww8/rtfattributeoutput.cxx |   11 
 sw/source/filter/ww8/rtfattributeoutput.hxx |2 
 sw/source/filter/ww8/rtfexport.cxx  |   19 
 sw/source/filter/ww8/wrtww8.cxx |2 
 sw/source/filter/ww8/wrtww8.hxx |2 
 sw/source/filter/ww8/wrtww8gr.cxx   |2 
 sw/source/filter/ww8/ww8atr.cxx |   94 +--
 sw/source/filter/ww8/ww8attributeoutput.hxx |2 
 sw/source/filter/ww8/ww8par6.cxx|   17 
 sw/source/ui/envelp/envfmt.cxx  |2 
 sw/source/uibase/app/docst.cxx  |4 
 sw/source/uibase/inc/uitool.hxx |3 
 sw/source/uibase/shells/textsh1.cxx |   56 ++
 sw/source/uibase/utlui/uitool.cxx   |   55 +-
 unotools/source/config/fltrcfg.cxx  |   33 +
 writerfilter/source/dmapper/DomainMapper.cxx|   22 
 writerfilter/source/dmapper/DomainMapper.hxx|2 
 writerfilter/source/dmapper/PropertyIds.cxx |1 
 writerfilter/source/dmapper/PropertyIds.hxx |1 
 xmloff/source/text/txtexppr.cxx |   19 
 xmloff/source/text/txtprmap.cxx |8 
 43 files changed, 781 insertions(+), 312 deletions(-)

New commits:
commit cfbb1f47acfbf3318071d20c73c44df8916a51fa
Author: Zolnai Tamás 
Date:   Sat Mar 21 13:38:27 2015 +0100

Avoid C style cast in sw_globalfilter test

Change-Id: I8d05a73728875ccd51cb9e5f9c7ad9f60677bf67

diff --git a/sw/qa/extras/globalfilter/globalfilter.cxx 
b/sw/qa/extras/globalfilter/globalfilter.cxx
index 9680a67..c0c5191 100644
--- a/sw/qa/extras/globalfilter/globalfilter.cxx
+++ b/sw/qa/extras/globalfilter/globalfilter.cxx
@@ -60,7 +60,7 @@ void Test::testSwappedOutImageExport()
 
 // Set cache size to a very small value to make sure one of the images 
is swapped out
 std::shared_ptr< comphelper::ConfigurationChanges > 
batch(comphelper::ConfigurationChanges::create());
-
officecfg::Office::Common::Cache::GraphicManager::TotalCacheSize::set(sal_Int32(1),
 batch);
+
officecfg::Office::Common::Cache::GraphicManager::TotalCacheSize::set(static_cast(1),
 batch);
 batch->commit();
 
 if (mxComponent.is())
@@ -182,7 +182,7 @@ void Test::testLinkedGraphicRT()
 const GraphicObject& rGraphicObj = pGrfNode->GetGrfObj(true);
 CPPUNIT_ASSERT_MESSAGE( sFailedMessage.getStr(), 
!rGraphicObj.IsSwappedOut());
 CPPUNIT_ASSERT_EQUAL_MESSAGE( sFailedMessage.getStr(), 
GRAPHIC_BITMAP, rGraphicObj.GetType());
-CPPUNIT_ASSERT_EQUAL_MESSAGE( sFailedMessage.getStr(), 
sal_uLong(864900), rGraphicObj.GetSizeBytes());
+CPPUNIT_ASSERT_EQUAL_MESSAGE( sFailedMessage.getStr(), 
static_cast(864900), rGraphicObj.GetSizeBytes());
 bImageFound = true;
 }
 }
@@ -204,7 +204,7 @@ void Test::testImageWithSpecialID()
 
 // Trigger swap out mechanism to test swapped state factor too.
 std::shared_ptr< comphelper::ConfigurationChanges > 
batch(comphelper::ConfigurationChanges::create());
-
officecfg::Office::Common::Cache::GraphicManager::TotalC

Re: New Defects reported by Coverity Scan for LibreOffice

2015-03-19 Thread Zolnai Tamás
> caolanm->Tamás: cid#1288897
> after f7424ed710e54bb2437a28380b03ed7c26290edc
> SdTabTemplateDlg::GetRefreshedSet->SdTabTemplateDlg::RefreshInputSet has
> a leaky "pRet = new SfxItemSet" in it now, what's the right fix there ?

Thanks for the notification! It's fixed now.

Tamás
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: sd/source

2015-03-19 Thread Zolnai Tamás
 sd/source/ui/dlg/tabtempl.cxx |   10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 3640717c8153e8b8e212e3aaa505007f7b8b0430
Author: Zolnai Tamás 
Date:   Fri Mar 20 07:21:27 2015 +0100

coverity#1288897 Resource leak

Here pRet was used to change the input set, so
use SetInputSet to get the same result.
Plus rename pRet since it's not a return value
any more.

Change-Id: I9e75abe2a86b372beb6fe5bd211dcf4fbbefb3da

diff --git a/sd/source/ui/dlg/tabtempl.cxx b/sd/source/ui/dlg/tabtempl.cxx
index a213c38..e2e7613 100644
--- a/sd/source/ui/dlg/tabtempl.cxx
+++ b/sd/source/ui/dlg/tabtempl.cxx
@@ -174,15 +174,15 @@ void SdTabTemplateDlg::PageCreated( sal_uInt16 nId, 
SfxTabPage &rPage )
 
 void SdTabTemplateDlg::RefreshInputSet()
 {
-SfxItemSet* pRet = GetInputSetImpl();
+SfxItemSet* pInputSet = GetInputSetImpl();
 
-if( pRet )
+if( pInputSet )
 {
-pRet->ClearItem();
-pRet->SetParent( GetStyleSheet().GetItemSet().GetParent() );
+pInputSet->ClearItem();
+pInputSet->SetParent( GetStyleSheet().GetItemSet().GetParent() );
 }
 else
-pRet = new SfxItemSet( GetStyleSheet().GetItemSet() );
+SetInputSet(&GetStyleSheet().GetItemSet());
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-4-2' - cui/uiconfig

2015-03-18 Thread Zolnai Tamás
 cui/uiconfig/ui/optfltrembedpage.ui |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 715a945721ffe3920dc13aa98f4cbfe3841b1c87
Author: Zolnai Tamás 
Date:   Sat Mar 7 21:12:12 2015 +0100

Make "Embedded Objects" frame expendable to fill space better

(cherry picked from commit b5aa8604ec39f7f8d573fe2dde94b7c7e70d93b8)
(cherry picked from commit 36c76e4731236c8044f757182954a7d8faabfb18)

Change-Id: I9b9335464c774bca13013576583877895d673592
Reviewed-on: https://gerrit.libreoffice.org/14832
Reviewed-by: Adolfo Jayme Barrientos 
Reviewed-by: Jan Holesovsky 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/cui/uiconfig/ui/optfltrembedpage.ui 
b/cui/uiconfig/ui/optfltrembedpage.ui
index a3fe815..c7439b1 100644
--- a/cui/uiconfig/ui/optfltrembedpage.ui
+++ b/cui/uiconfig/ui/optfltrembedpage.ui
@@ -12,6 +12,7 @@
 True
 False
 True
+True
 0
 none
 
@@ -32,6 +33,7 @@
   
 True
 False
+True
 
   
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Run buildbot on a feature branch?

2015-03-18 Thread Zolnai Tamás
Hi there,

I just wonder whether there is a way to run a buildbot / tinderbox on
a specific feature branch. It would be helpful before merge one to
master.


Thanks,
Tamás
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: Changes to 'feature/highlighting2'

2015-03-18 Thread Zolnai Tamás
New branch 'feature/highlighting2' available with the following commits:
commit e9f973f38e20f6c56c2fc7d26529977dde17f096
Author: Zolnai Tamás 
Date:   Wed Mar 18 15:27:59 2015 +0100

Avoid C style cast in sw_globalfiter test

Change-Id: I8d05a73728875ccd51cb9e5f9c7ad9f60677bf67

commit a3c8ab090b7661bad6a36b8bf07224158980d12b
Author: Zolnai Tamás 
Date:   Wed Mar 18 15:23:58 2015 +0100

Char highlight: convert LO character background to MSO highlighting

DOC export has a good approximating algorithm for that
so use it everywhere.
In RTF case use the default color table which is added
also by MSO Word. With that highlight colors are also added to
the table.

Change-Id: Ie4827a933c316d4dc0c0c7a32d8cf319477d1bf9

commit 67febfbafc8ff37e106e60e980d7428b75edd972
Author: Zolnai Tamás 
Date:   Sun Mar 15 21:12:39 2015 +0100

Char highlight: test related to editing of MSO background attributes

Change-Id: I39828754284b0e3d43d043a9695f81d404b4e0aa

commit 8f32690ddbb387334b3a6e3c34e3fd3584be1123
Author: Zolnai Tamás 
Date:   Sun Mar 15 15:31:09 2015 +0100

Char highlight: editing by "Highlighting" button

Change-Id: I9581da0631643199a9c076990bf689d54dbadf8c

commit 07178d81d3421d429c01afb3ca0c0aa50c038b10
Author: Zolnai Tamás 
Date:   Wed Mar 18 15:19:46 2015 +0100

Char shading: use a marker for character background imported from MSO 
shading

* So MSO format export filters can recognize that it should be exported
as shading.
* Editing in LO removes this shading marker, so from that point there
will be an LO character background.

Change-Id: I853b952f0395b33d36bb2934a6d910f2182cc1d9

commit 553830772203319faabf1056de11609a4968ace3
Author: Zolnai Tamás 
Date:   Wed Mar 18 10:31:11 2015 +0100

Char highlight: export character background to MSO formats based on settings

Change-Id: Iaaf9e7ee5e61cfabb0d675b83fa71776dece87e2

commit c74da3891a7e204f4c29b3867e0787ec0fbc43af
Author: Zolnai Tamás 
Date:   Wed Mar 18 10:30:18 2015 +0100

Char highlight: option about export LO character background to MSO formats

Export as highlighting or shading.
Highlighting is the default.

Change-Id: Ib2a38e4cd0d49317288bb565383b690d4222c8ed

commit cda91e7ab9c77982b86fde6dd9d8fccadc665816
Author: Zolnai Tamás 
Date:   Wed Mar 18 10:27:56 2015 +0100

Char highlight: editing by Character Properties dialog

Modify character highlight using character dialog's
"Background" tab.

Change-Id: I693aebe1915e6b77af9919acf223fb2c87608516

commit b000a2fb04feadab1a6aea597a374398150ed226
Author: Zolnai Tamás 
Date:   Wed Mar 18 10:25:05 2015 +0100

Char highlight: ODT filters

Export merges the two background attribute.

Change-Id: I882321fbd5a7d24991fb01b8dc9d2cc0bd294051

commit 59d78bcb51dfcd695ec453e9e28380e4e36a437e
Author: Zolnai Tamás 
Date:   Sat Feb 21 10:37:54 2015 +0100

Char highlight: DOC filters

Change-Id: Ia609425f6753796091d4dfdfae8e621c062e0c15

commit 3cacd963ee24214d48b5f3f1248233df3eb51909
Author: Zolnai Tamás 
Date:   Wed Mar 18 10:22:51 2015 +0100

Char highlight: RTF filters

Handle \highlightN and \chcbpatN separately.

Change-Id: I20546bd4c26154e8b1168f87dcb4ab44a192ad83

commit 292824eeb3193be3f50e14135d095f7423f8fd3d
Author: Zolnai Tamás 
Date:   Wed Mar 18 10:19:25 2015 +0100

Char highlight: enable DOCX import

Disabled by:
b5e60724ac73bb0e62b249145a8931fd6166bb69

Change-Id: Ifde33d53198306eac845db6c269d337fa051f6ab

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - cui/source include/sfx2 sc/source sd/source sfx2/source sw/source

2015-03-16 Thread Zolnai Tamás
 cui/source/dialogs/iconcdlg.cxx   |8 +++-
 cui/source/inc/iconcdlg.hxx   |2 +-
 include/sfx2/styledlg.hxx |2 +-
 include/sfx2/tabdlg.hxx   |4 ++--
 sc/source/ui/inc/styledlg.hxx |2 +-
 sc/source/ui/styleui/styledlg.cxx |3 +--
 sd/source/ui/dlg/tabtempl.cxx |4 +---
 sd/source/ui/inc/tabtempl.hxx |2 +-
 sfx2/source/dialog/styledlg.cxx   |5 ++---
 sfx2/source/dialog/tabdlg.cxx |   19 +--
 sw/source/filter/ww8/ww8par.cxx   |1 -
 sw/source/filter/ww8/ww8par.hxx   |1 -
 sw/source/filter/ww8/ww8par2.cxx  |2 +-
 sw/source/filter/ww8/ww8par6.cxx  |   12 
 sw/source/ui/fmtui/tmpdlg.cxx |3 +--
 sw/source/uibase/inc/tmpdlg.hxx   |2 +-
 16 files changed, 25 insertions(+), 47 deletions(-)

New commits:
commit d4652b5e2f1c7a2c207888fade7a41245b7ae9fb
Author: Zolnai Tamás 
Date:   Sun Mar 15 11:05:19 2015 +0100

WW8: bShdTxtCol is always false

Change-Id: I745dabe00567a5d0d076741bfa38c0b5e07713b6

diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 5441d713..3f2df5e 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -4201,7 +4201,6 @@ SwWW8ImplReader::SwWW8ImplReader(sal_uInt8 nVersionPara, 
SvStorage* pStorage,
 , nInTable(0)
 , bWasTabRowEnd(false)
 , bWasTabCellEnd(false)
-, bShdTxtCol(false)
 , bAnl(false)
 , bHdFtFtnEdn(false)
 , bFtnEdn(false)
diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx
index 76e5e3e..7d537f0 100644
--- a/sw/source/filter/ww8/ww8par.hxx
+++ b/sw/source/filter/ww8/ww8par.hxx
@@ -1314,7 +1314,6 @@ private:
 bool bWasTabRowEnd; // Tabelle : Row End Mark
 bool bWasTabCellEnd;// table: Cell End Mark
 
-bool bShdTxtCol;// Textfarbe indirekt gesetzt ( Hintergrund sw )
 bool bAnl;  // Nummerierung in Bearbeitung
 // Anl heisst Autonumber level
 
diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx
index 376de19..66a6648 100644
--- a/sw/source/filter/ww8/ww8par2.cxx
+++ b/sw/source/filter/ww8/ww8par2.cxx
@@ -3818,7 +3818,7 @@ void WW8RStyle::PostStyle(SwWW8StyInf &rSI, bool 
bOldNoImp)
 {
 // Reset attribute flags, because there are no style-ends.
 
-pIo->bHasBorder = pIo->bShdTxtCol = pIo->bSpec = pIo->bObj = pIo->bSymbol 
= false;
+pIo->bHasBorder = pIo->bSpec = pIo->bObj = pIo->bSymbol = false;
 pIo->nCharFmt = -1;
 
 // If Style basiert auf Nichts oder Basis ignoriert
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index e70b771..791ebb6 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -4608,12 +4608,6 @@ void SwWW8ImplReader::Read_Shade( sal_uInt16, const 
sal_uInt8* pData, short nLen
 {
 // Ende des Attributes
 pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_BACKGROUND );
-if (bShdTxtCol)
-{
-// Zeichenfarbe auch
-pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_CHRATR_COLOR );
-bShdTxtCol = false;
-}
 }
 else
 {
@@ -4631,12 +4625,6 @@ void SwWW8ImplReader::Read_ParaBackColor(sal_uInt16, 
const sal_uInt8* pData, sho
 {
 // Ende des Attributes
 pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_BACKGROUND );
-if (bShdTxtCol)
-{
-// Zeichenfarbe auch
-pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_CHRATR_COLOR );
-bShdTxtCol = false;
-}
 }
 else
 {
commit f7424ed710e54bb2437a28380b03ed7c26290edc
Author: Zolnai Tamás 
Date:   Sun Mar 15 13:29:53 2015 +0100

SfxTabDialog: avoid changing const input parameter

* SfxTabDialog constructor has a const pointer parameter
pointing  to the input set and also the corresponding member
is a const pointer which indicated that set is not changed by
the dialog, but this is not true, const is casted away and
the input set is changed.
* So use a copy of the input set instead, pointed by
a non-const member, so we can spare some const cast and
misunderstandings.
* GetRefreshedSet not behaves as a getter method, but changes
the input set instead, so redeclare it accordingly.

Change-Id: Ic63f9ae68c50e65d4498b20f597547c1c075b94e

diff --git a/cui/source/dialogs/iconcdlg.cxx b/cui/source/dialogs/iconcdlg.cxx
index 45e8dcb..982ed6c 100644
--- a/cui/source/dialogs/iconcdlg.cxx
+++ b/cui/source/dialogs/iconcdlg.cxx
@@ -547,8 +547,7 @@ bool IconChoiceDialog::DeActivatePageImpl ()
 
 if ( nRet & IconChoicePage::REFRESH_SET )
 {
-pSet = GetRefreshedSet();
-DBG_ASSERT( pSet, "GetRefreshedSet() liefert NULL" );
+RefreshInputSet();
 // flag all pages to be newly initialized
 for ( size_t i = 0, nCount = maPageList.size(); i < nCount; ++i

[Libreoffice-commits] core.git: Branch 'feature/highlighting' - sw/source

2015-03-16 Thread Zolnai Tamás
 sw/source/filter/ww8/rtfexport.cxx |2 --
 1 file changed, 2 deletions(-)

New commits:
commit e0af55032479c49a93dde7aee0b4ec55127b90e8
Author: Zolnai Tamás 
Date:   Tue Mar 17 06:57:43 2015 +0100

Unused includes

Change-Id: I7414081938778fca6e5a7bc48620ea7e5fbb231c

diff --git a/sw/source/filter/ww8/rtfexport.cxx 
b/sw/source/filter/ww8/rtfexport.cxx
index 98ba065..8130678 100644
--- a/sw/source/filter/ww8/rtfexport.cxx
+++ b/sw/source/filter/ww8/rtfexport.cxx
@@ -45,8 +45,6 @@
 #include 
 #endif
 #include 
-#include 
-#include 
 
 using namespace ::com::sun::star;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/highlighting' - 4 commits - filter/source include/filter sw/qa sw/source

2015-03-16 Thread Zolnai Tamás
 filter/source/msfilter/util.cxx |   42 ++
 include/filter/msfilter/util.hxx|9 
 sw/qa/extras/globalfilter/data/char_background.odt  |binary
 sw/qa/extras/globalfilter/data/char_background_editing.docx |binary
 sw/qa/extras/globalfilter/globalfilter.cxx  |  204 +++-
 sw/source/filter/ww8/docxattributeoutput.cxx|   42 +-
 sw/source/filter/ww8/docxattributeoutput.hxx|6 
 sw/source/filter/ww8/rtfattributeoutput.cxx |2 
 sw/source/filter/ww8/rtfexport.cxx  |   23 +
 sw/source/filter/ww8/wrtww8.cxx |2 
 sw/source/filter/ww8/wrtww8.hxx |2 
 sw/source/filter/ww8/wrtww8gr.cxx   |2 
 sw/source/filter/ww8/ww8atr.cxx |   56 ---
 sw/source/uibase/shells/textsh1.cxx |   54 +++
 14 files changed, 352 insertions(+), 92 deletions(-)

New commits:
commit fecf0e75c7b21f8216aefc8923c324342bfd1c91
Author: Zolnai Tamás 
Date:   Tue Mar 17 00:13:23 2015 +0100

Avoid C style cast in the new code

Change-Id: I8d05a73728875ccd51cb9e5f9c7ad9f60677bf67

diff --git a/sw/qa/extras/globalfilter/globalfilter.cxx 
b/sw/qa/extras/globalfilter/globalfilter.cxx
index 8f3128c..fbbedc3 100644
--- a/sw/qa/extras/globalfilter/globalfilter.cxx
+++ b/sw/qa/extras/globalfilter/globalfilter.cxx
@@ -421,7 +421,7 @@ void Test::testCharHighlightBody()
 
 if( strcmp(aFilterNames[nFilter], "writer8") == 0 )
 {
-CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailedMessage.getStr(), 
sal_Int32(COL_TRANSPARENT), getProperty(xRun,"CharHighlight"));
+CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailedMessage.getStr(), 
static_cast(COL_TRANSPARENT), 
getProperty(xRun,"CharHighlight"));
 CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailedMessage.getStr(), 
nHighlightColor, getProperty(xRun,"CharBackColor"));
 }
 else // MS filters
@@ -436,21 +436,21 @@ void Test::testCharHighlightBody()
 const uno::Reference xRun(getRun(xPara,18), 
uno::UNO_QUERY);
 if( strcmp(aFilterNames[nFilter], "writer8") == 0 )
 {
-CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailedMessage.getStr(), 
sal_Int32(COL_TRANSPARENT), getProperty(xRun,"CharHighlight"));
-CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailedMessage.getStr(), 
sal_Int32(0xff), getProperty(xRun,"CharBackColor"));
+CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailedMessage.getStr(), 
static_cast(COL_TRANSPARENT), 
getProperty(xRun,"CharHighlight"));
+CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailedMessage.getStr(), 
static_cast(0xff), getProperty(xRun,"CharBackColor"));
 }
 else
 {
-CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailedMessage.getStr(), 
sal_Int32(0xff), getProperty(xRun,"CharHighlight"));
-CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailedMessage.getStr(), 
sal_Int32(COL_TRANSPARENT), getProperty(xRun,"CharBackColor"));
+CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailedMessage.getStr(), 
static_cast(0xff), getProperty(xRun,"CharHighlight"));
+CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailedMessage.getStr(), 
static_cast(COL_TRANSPARENT), 
getProperty(xRun,"CharBackColor"));
 }
 }
 
 // Only background
 {
 const uno::Reference xRun(getRun(xPara,19), 
uno::UNO_QUERY);
-CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailedMessage.getStr(), 
sal_Int32(COL_TRANSPARENT), getProperty(xRun,"CharHighlight"));
-CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailedMessage.getStr(), 
sal_Int32(0xff), getProperty(xRun,"CharBackColor"));
+CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailedMessage.getStr(), 
static_cast(COL_TRANSPARENT), 
getProperty(xRun,"CharHighlight"));
+CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailedMessage.getStr(), 
static_cast(0xff), getProperty(xRun,"CharBackColor"));
 }
 }
 }
commit c70307d889113c52cac668acb0d8f3547588a2c4
Author: Zolnai Tamás 
Date:   Tue Mar 17 00:10:19 2015 +0100

Char highlight: convert an LO background color to MSO highlighting

Doc export had a good converter algorithm for that
so use it everywhere.
In RTF case use the default color table which is added
also by Word. With that highlight colors are also added.

Change-Id: Ie4827a933c316d4dc0c0c7a32d8cf319477d1bf9

diff --git a/filter/source/msfilter/util.cxx b/filter/source/msfilter/util.cxx
index 958f0b8..9031a77 100644
--- a/filter/source/msfilter/util.cxx
+++ b/filter/source/msfilter/util.cxx
@@ -12,6 +12,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -1350,6 +1351,47 @@ bool HasTextBoxContent(sal_uInt32 nShapeType)
 return true;
 }
 }
+
+sal_uInt8 TransColToIco( const Color& rCol )
+{
+sal_uInt8 nCol 

[Libreoffice-commits] help.git: Changes to 'refs/tags/cp-4.2-28'

2015-03-16 Thread Zolnai Tamás
Tag 'cp-4.2-28' created by Andras Timar  at 
2015-03-16 21:08 -0700

cp-4.2-28

Changes since libreoffice-4-2-branch-point-7:
---
 0 files changed
---
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sw/source

2015-03-15 Thread Zolnai Tamás
 sw/source/filter/ww8/ww8par.cxx  |1 -
 sw/source/filter/ww8/ww8par.hxx  |1 -
 sw/source/filter/ww8/ww8par2.cxx |3 +--
 sw/source/filter/ww8/ww8par6.cxx |   17 -
 4 files changed, 1 insertion(+), 21 deletions(-)

New commits:
commit de145fb467f2a168261915d63b47d3cd3b03d732
Author: Zolnai Tamás 
Date:   Sun Feb 8 10:26:26 2015 +0100

WW8: bCharShdTxtCol is always false

Change-Id: Ib62a4f5dcd7e41cd8c8e82f23efebb468e2e7c91

diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 497e19c..5441d713 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -4202,7 +4202,6 @@ SwWW8ImplReader::SwWW8ImplReader(sal_uInt8 nVersionPara, 
SvStorage* pStorage,
 , bWasTabRowEnd(false)
 , bWasTabCellEnd(false)
 , bShdTxtCol(false)
-, bCharShdTxtCol(false)
 , bAnl(false)
 , bHdFtFtnEdn(false)
 , bFtnEdn(false)
diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx
index df39a7f..76e5e3e 100644
--- a/sw/source/filter/ww8/ww8par.hxx
+++ b/sw/source/filter/ww8/ww8par.hxx
@@ -1315,7 +1315,6 @@ private:
 bool bWasTabCellEnd;// table: Cell End Mark
 
 bool bShdTxtCol;// Textfarbe indirekt gesetzt ( Hintergrund sw )
-bool bCharShdTxtCol;// Textfarbe indirekt gesetzt ( Zeichenhintergrund 
sw )
 bool bAnl;  // Nummerierung in Bearbeitung
 // Anl heisst Autonumber level
 
diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx
index c9f965c..376de19 100644
--- a/sw/source/filter/ww8/ww8par2.cxx
+++ b/sw/source/filter/ww8/ww8par2.cxx
@@ -3818,8 +3818,7 @@ void WW8RStyle::PostStyle(SwWW8StyInf &rSI, bool 
bOldNoImp)
 {
 // Reset attribute flags, because there are no style-ends.
 
-pIo->bHasBorder = pIo->bShdTxtCol = pIo->bCharShdTxtCol
-= pIo->bSpec = pIo->bObj = pIo->bSymbol = false;
+pIo->bHasBorder = pIo->bShdTxtCol = pIo->bSpec = pIo->bObj = pIo->bSymbol 
= false;
 pIo->nCharFmt = -1;
 
 // If Style basiert auf Nichts oder Basis ignoriert
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index 451fba5..e70b771 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -3791,12 +3791,6 @@ void SwWW8ImplReader::Read_CharShadow(  sal_uInt16, 
const sal_uInt8* pData, shor
 if( nLen <= 0 )
 {
 pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_CHRATR_BACKGROUND );
-if( bCharShdTxtCol )
-{
-// Zeichenfarbe auch
-pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_CHRATR_COLOR );
-bCharShdTxtCol = false;
-}
 }
 else
 {
@@ -3813,12 +3807,6 @@ void SwWW8ImplReader::Read_TxtBackColor(sal_uInt16, 
const sal_uInt8* pData, shor
 if( nLen <= 0 )
 {
 pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_CHRATR_BACKGROUND );
-if( bCharShdTxtCol )
-{
-// Zeichenfarbe auch
-pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_CHRATR_COLOR );
-bCharShdTxtCol = false;
-}
 }
 else
 {
@@ -3835,11 +3823,6 @@ void SwWW8ImplReader::Read_CharHighlight(sal_uInt16, 
const sal_uInt8* pData, sho
 if( nLen <= 0 )
 {
 pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_CHRATR_BACKGROUND );
-if( bCharShdTxtCol )
-{
-pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_CHRATR_COLOR );  // 
Zeichenfarbe auch
-bCharShdTxtCol = false;
-}
 }
 else
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/highlighting' - 6 commits - cui/source cui/uiconfig include/sfx2 include/svl include/unotools officecfg/registry sc/source sd/source sfx2/source sw/qa s

2015-03-15 Thread Zolnai Tamás
 cui/source/dialogs/iconcdlg.cxx|8 -
 cui/source/inc/iconcdlg.hxx|2 
 cui/source/options/optfltr.cxx |   19 ++
 cui/source/options/optfltr.hxx |3 
 cui/uiconfig/ui/optfltrembedpage.ui|   96 +
 include/sfx2/styledlg.hxx  |2 
 include/sfx2/tabdlg.hxx|4 
 include/svl/grabbagitem.hxx|5 
 include/unotools/fltrcfg.hxx   |5 
 officecfg/registry/schema/org/openoffice/Office/Common.xcs |7 
 sc/source/ui/inc/styledlg.hxx  |2 
 sc/source/ui/styleui/styledlg.cxx  |3 
 sd/source/ui/dlg/tabtempl.cxx  |4 
 sd/source/ui/inc/tabtempl.hxx  |2 
 sfx2/source/dialog/styledlg.cxx|5 
 sfx2/source/dialog/tabdlg.cxx  |   19 +-
 sw/qa/extras/globalfilter/globalfilter.cxx |   16 ++
 sw/source/filter/ww8/attributeoutputbase.hxx   |1 
 sw/source/filter/ww8/ww8atr.cxx|   29 +++
 sw/source/filter/ww8/ww8par6.cxx   |   13 +
 sw/source/ui/envelp/envfmt.cxx |2 
 sw/source/ui/fmtui/tmpdlg.cxx  |3 
 sw/source/uibase/app/docst.cxx |4 
 sw/source/uibase/inc/tmpdlg.hxx|2 
 sw/source/uibase/inc/uitool.hxx|3 
 sw/source/uibase/shells/basesh.cxx |   36 
 sw/source/uibase/shells/textsh1.cxx|2 
 sw/source/uibase/utlui/uitool.cxx  |   22 ++
 unotools/source/config/fltrcfg.cxx |   33 
 writerfilter/source/dmapper/DomainMapper.cxx   |1 
 writerfilter/source/dmapper/PropertyIds.cxx|1 
 writerfilter/source/dmapper/PropertyIds.hxx|1 
 32 files changed, 273 insertions(+), 82 deletions(-)

New commits:
commit 858222a622bed10cf1d93130e8fdf391efd7564a
Author: Zolnai Tamás 
Date:   Sun Mar 15 01:20:44 2015 +0100

Char shading: add a marker to background imported from MSO shading

Change-Id: I853b952f0395b33d36bb2934a6d910f2182cc1d9

diff --git a/include/svl/grabbagitem.hxx b/include/svl/grabbagitem.hxx
index c02edaa..6454d2c 100644
--- a/include/svl/grabbagitem.hxx
+++ b/include/svl/grabbagitem.hxx
@@ -35,6 +35,11 @@ public:
 return m_aMap;
 }
 
+std::map& GetGrabBag()
+{
+return m_aMap;
+}
+
 virtual bool operator==(const SfxPoolItem&) const SAL_OVERRIDE;
 virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const SAL_OVERRIDE;
 
diff --git a/sw/qa/extras/globalfilter/globalfilter.cxx 
b/sw/qa/extras/globalfilter/globalfilter.cxx
index 13d1de9..288b89f 100644
--- a/sw/qa/extras/globalfilter/globalfilter.cxx
+++ b/sw/qa/extras/globalfilter/globalfilter.cxx
@@ -30,6 +30,7 @@ public:
 void testImageWithSpecialID();
 void testGraphicShape();
 void testCharHighlight();
+void testCharHighlightBody();
 
 CPPUNIT_TEST_SUITE(Test);
 CPPUNIT_TEST(testSwappedOutImageExport);
@@ -353,7 +354,7 @@ void Test::testGraphicShape()
 }
 }
 
-void Test::testCharHighlight()
+void Test::testCharHighlightBody()
 {
 // MS Word has two kind of character background called character shading 
and highlight
 // MS filters handle these attributes separately, but ODF export merges 
them into one background attribute
@@ -365,9 +366,6 @@ void Test::testCharHighlight()
 "Office Open XML Text",
 };
 
-SvtFilterOptions& rOpt = SvtFilterOptions::Get();
-rOpt.SetCharBackground2Shading();
-
 for( size_t nFilter = 0; nFilter < SAL_N_ELEMENTS(aFilterNames); ++nFilter 
)
 {
 if (mxComponent.is())
@@ -453,6 +451,18 @@ void Test::testCharHighlight()
 }
 }
 
+void Test::testCharHighlight()
+{
+SvtFilterOptions& rOpt = SvtFilterOptions::Get();
+rOpt.SetCharBackground2Shading();
+
+testCharHighlightBody();
+
+rOpt.SetCharBackground2Highlighting();
+
+testCharHighlightBody();
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(Test);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index f095817..4700e42 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -5636,15 +5636,28 @@ const SwRedlineData* 
AttributeOutputBase::GetParagraphMarkerRedline( const SwTxt
 
 void AttributeOutputBase::CharBackgroundBase( const SvxBrushItem& rBrush )
 {
-const SvtFilterOptions& rOpt = SvtFilterOptions::Get();
-if( rOpt.IsCharBackground2Highlighting() )
+bool bConvertToShading = 
SvtFilterOptions::Get().

[Libreoffice-commits] help.git: Changes to 'refs/tags/cp-4.2-27'

2015-03-13 Thread Zolnai Tamás
Tag 'cp-4.2-27' created by Andras Timar  at 
2015-03-13 09:22 -0700

cp-4.2-27

Changes since libreoffice-4-2-branch-point-7:
---
 0 files changed
---
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-4' - cui/uiconfig

2015-03-11 Thread Zolnai Tamás
 cui/uiconfig/ui/optfltrembedpage.ui |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 36c76e4731236c8044f757182954a7d8faabfb18
Author: Zolnai Tamás 
Date:   Sat Mar 7 21:12:12 2015 +0100

Make "Embedded Objects" frame expendable to fill space better

Change-Id: I9b9335464c774bca13013576583877895d673592

diff --git a/cui/uiconfig/ui/optfltrembedpage.ui 
b/cui/uiconfig/ui/optfltrembedpage.ui
index a3fe815..c7439b1 100644
--- a/cui/uiconfig/ui/optfltrembedpage.ui
+++ b/cui/uiconfig/ui/optfltrembedpage.ui
@@ -12,6 +12,7 @@
 True
 False
 True
+True
 0
 none
 
@@ -32,6 +33,7 @@
   
 True
 False
+True
 
   
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 3 commits - cui/uiconfig editeng/source include/editeng sw/source

2015-03-10 Thread Zolnai Tamás
 cui/uiconfig/ui/optfltrembedpage.ui  |2 ++
 editeng/source/items/frmitems.cxx|   10 +-
 include/editeng/brushitem.hxx|6 +++---
 sw/source/filter/ww8/docxattributeoutput.cxx |6 +++---
 4 files changed, 13 insertions(+), 11 deletions(-)

New commits:
commit 8e8a97feebd357687927f62b12c89f18c65382a0
Author: Zolnai Tamás 
Date:   Sun Mar 8 14:02:51 2015 +0100

const_cast -> mutable

Change-Id: Idedcb4a9add451fbdf39cad1429669a12b8c11b9

diff --git a/editeng/source/items/frmitems.cxx 
b/editeng/source/items/frmitems.cxx
index 0621746..fae0be7 100644
--- a/editeng/source/items/frmitems.cxx
+++ b/editeng/source/items/frmitems.cxx
@@ -3939,7 +3939,7 @@ const GraphicObject* 
SvxBrushItem::GetGraphicObject(OUString const & referer) co
 
 if( nRes != GRFILTER_OK )
 {
-const_cast < SvxBrushItem*> (this)->bLoadAgain = false;
+bLoadAgain = false;
 }
 else
 {
@@ -3950,7 +3950,7 @@ const GraphicObject* 
SvxBrushItem::GetGraphicObject(OUString const & referer) co
 }
 else
 {
-const_cast < SvxBrushItem*> (this)->bLoadAgain = false;
+bLoadAgain = false;
 }
 }
 
diff --git a/include/editeng/brushitem.hxx b/include/editeng/brushitem.hxx
index fee7628..b529d31 100644
--- a/include/editeng/brushitem.hxx
+++ b/include/editeng/brushitem.hxx
@@ -53,7 +53,7 @@ class EDITENG_DLLPUBLIC SvxBrushItem : public SfxPoolItem
 OUStringmaStrLink;
 OUStringmaStrFilter;
 SvxGraphicPosition  eGraphicPos;
-boolbLoadAgain;
+mutable boolbLoadAgain;
 
 voidApplyGraphicTransparency_Impl();
 DECL_STATIC_LINK( SvxBrushItem, DoneHdl_Impl, void *);
commit b5aa8604ec39f7f8d573fe2dde94b7c7e70d93b8
Author: Zolnai Tamás 
Date:   Sat Mar 7 21:12:12 2015 +0100

Make "Embedded Objects" frame expendable to fill space better

Change-Id: I9b9335464c774bca13013576583877895d673592

diff --git a/cui/uiconfig/ui/optfltrembedpage.ui 
b/cui/uiconfig/ui/optfltrembedpage.ui
index a3fe815..c7439b1 100644
--- a/cui/uiconfig/ui/optfltrembedpage.ui
+++ b/cui/uiconfig/ui/optfltrembedpage.ui
@@ -12,6 +12,7 @@
 True
 False
 True
+True
 0
 none
 
@@ -32,6 +33,7 @@
   
 True
 False
+True
 
   
 
commit d4a1e2a491cb50c8fee072458aa2c676c2f1a0fd
Author: Zolnai Tamás 
Date:   Sun Mar 8 14:00:26 2015 +0100

Avoid casting SvxBrushItem:nShadingValue

Change-Id: Ida97950286bc69154d10cbc9b5ac699e7ad608ad

diff --git a/editeng/source/items/frmitems.cxx 
b/editeng/source/items/frmitems.cxx
index 2c0adcc..0621746 100644
--- a/editeng/source/items/frmitems.cxx
+++ b/editeng/source/items/frmitems.cxx
@@ -3636,7 +3636,7 @@ bool SvxBrushItem::QueryValue( uno::Any& rVal, sal_uInt8 
nMemberId ) const
 
 case MID_SHADING_VALUE:
 {
-rVal <<= (sal_Int32)(nShadingValue);
+rVal <<= nShadingValue;
 }
 break;
 }
@@ -3753,7 +3753,7 @@ bool SvxBrushItem::PutValue( const uno::Any& rVal, 
sal_uInt8 nMemberId )
 
 case MID_SHADING_VALUE:
 {
-sal_uInt32 nVal = 0;
+sal_Int32 nVal = 0;
 if (!(rVal >>= nVal))
 return false;
 
@@ -4068,7 +4068,7 @@ void SvxBrushItem::SetGraphicFilter( const OUString& rNew 
)
 maStrFilter = rNew;
 }
 
-void SvxBrushItem::SetShadingValue( const sal_uInt32 nNew )
+void SvxBrushItem::SetShadingValue( const sal_Int32 nNew )
 {
 nShadingValue = nNew;
 }
diff --git a/include/editeng/brushitem.hxx b/include/editeng/brushitem.hxx
index 9a7bb0f..fee7628 100644
--- a/include/editeng/brushitem.hxx
+++ b/include/editeng/brushitem.hxx
@@ -104,13 +104,13 @@ public:
 
 voidPurgeMedium() const;
 
-sal_uInt32  GetShadingValue() const { return 
nShadingValue; }
+sal_Int32   GetShadingValue() const { return 
nShadingValue; }
 const Graphic*  GetGraphic(OUString const & referer = 
OUString()/*TODO*/) const;
 const GraphicObject*GetGraphicObject(OUString const & referer = 
OUString()/*TODO*/) const;
 OUStringGetGraphicLink() const  { return maStrLink; }
 OUStringGetGraphicFilter() const{ return maStrFilter; }
 
-voidSetShadingValue( const sal_uInt32 nNew );
+voidSetShadingValue( const sal_Int32 nNew );
 
 // get graphic transparency in percent
 sal_Int8 getGraphicTransparency() const;
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index 6033c9a..f7af823 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/sour

[Libreoffice-commits] core.git: Branch 'libreoffice-4-4' - include/svtools svtools/source

2015-03-02 Thread Zolnai Tamás
 include/svtools/grfmgr.hxx  |4 
 svtools/source/graphic/grfcache.cxx |   24 
 svtools/source/graphic/grfcache.hxx |1 -
 svtools/source/graphic/grfmgr.cxx   |7 ---
 svtools/source/graphic/grfmgr2.cxx  |   18 --
 5 files changed, 8 insertions(+), 46 deletions(-)

New commits:
commit c31c3ea7afcb7dbe711c338ecceb072eadcc1012
Author: Zolnai Tamás 
Date:   Sat Feb 21 19:48:33 2015 +0100

More improvements of graphic cache size handling

* ImplFillSwappedGraphicObject method is part of
the old caching mechanism which interferes with
the newer one, so remove this method.
* Use Graphic size directly becuase in some case
it does not match with the GraphicObject's
size.
* Assertions to avoid underflow of mnUsedSize

Change-Id: I3381f49ca05e3e5d565848c8af24c78e7b9ac3af
(cherry picked from commit ab00ac3e88e0a28d0e38c5968c23014a6a8fb194)
Reviewed-on: https://gerrit.libreoffice.org/14699
Tested-by: Michael Stahl 
Reviewed-by: Michael Stahl 

diff --git a/include/svtools/grfmgr.hxx b/include/svtools/grfmgr.hxx
index 234ec9a..7c6f419 100644
--- a/include/svtools/grfmgr.hxx
+++ b/include/svtools/grfmgr.hxx
@@ -593,10 +593,6 @@ private:
 
 // Only used in swap case by GraphicObject
 void SVT_DLLPRIVATE ImplGraphicObjectWasSwappedOut( const GraphicObject& 
rObj );
-bool SVT_DLLPRIVATE ImplFillSwappedGraphicObject(
-const GraphicObject& rObj,
-Graphic& rSubstitute
-);
 void SVT_DLLPRIVATE ImplGraphicObjectWasSwappedIn( const GraphicObject& 
rObj );
 
 OString SVT_DLLPRIVATE ImplGetUniqueID( const GraphicObject& rObj ) const;
diff --git a/svtools/source/graphic/grfcache.cxx 
b/svtools/source/graphic/grfcache.cxx
index ca4347e..571d837 100644
--- a/svtools/source/graphic/grfcache.cxx
+++ b/svtools/source/graphic/grfcache.cxx
@@ -174,7 +174,6 @@ public:
 
 voidTryToSwapIn();
 voidGraphicObjectWasSwappedOut( const GraphicObject& rObj 
);
-boolFillSwappedGraphicObject( const GraphicObject& rObj, 
Graphic& rSubstitute );
 voidGraphicObjectWasSwappedIn( const GraphicObject& rObj );
 };
 
@@ -375,19 +374,6 @@ void GraphicCacheEntry::GraphicObjectWasSwappedOut( const 
GraphicObject& /*rObj*
 }
 }
 
-bool GraphicCacheEntry::FillSwappedGraphicObject( const GraphicObject& rObj, 
Graphic& rSubstitute )
-{
-bool bRet = false;
-
-if( !mbSwappedAll && rObj.IsSwappedOut() )
-{
-ImplFillSubstitute( rSubstitute );
-bRet = true;
-}
-
-return bRet;
-}
-
 void GraphicCacheEntry::GraphicObjectWasSwappedIn( const GraphicObject& rObj )
 {
 if( mbSwappedAll )
@@ -991,16 +977,6 @@ void GraphicCache::GraphicObjectWasSwappedOut( const 
GraphicObject& rObj )
 pEntry->GraphicObjectWasSwappedOut( rObj );
 }
 
-bool GraphicCache::FillSwappedGraphicObject( const GraphicObject& rObj, 
Graphic& rSubstitute )
-{
-GraphicCacheEntry* pEntry = ImplGetCacheEntry( rObj );
-
-if( !pEntry )
-return false;
-
-return pEntry->FillSwappedGraphicObject( rObj, rSubstitute );
-}
-
 void GraphicCache::GraphicObjectWasSwappedIn( const GraphicObject& rObj )
 {
 GraphicCacheEntry* pEntry = ImplGetCacheEntry( rObj );
diff --git a/svtools/source/graphic/grfcache.hxx 
b/svtools/source/graphic/grfcache.hxx
index ddb6f6b..a1c990c 100644
--- a/svtools/source/graphic/grfcache.hxx
+++ b/svtools/source/graphic/grfcache.hxx
@@ -74,7 +74,6 @@ public:
 voidReleaseGraphicObject( const GraphicObject& rObj );
 
 voidGraphicObjectWasSwappedOut( const GraphicObject& 
rObj );
-boolFillSwappedGraphicObject( const GraphicObject& rObj, 
Graphic& rSubstitute );
 voidGraphicObjectWasSwappedIn( const GraphicObject& 
rObj );
 
 OStringGetUniqueID( const GraphicObject& rObj ) const;
diff --git a/svtools/source/graphic/grfmgr.cxx 
b/svtools/source/graphic/grfmgr.cxx
index ec3c59b..ef23607 100644
--- a/svtools/source/graphic/grfmgr.cxx
+++ b/svtools/source/graphic/grfmgr.cxx
@@ -210,9 +210,6 @@ void GraphicObject::ImplAutoSwapIn()
 {
 if( IsSwappedOut() )
 {
-if( mpMgr && mpMgr->ImplFillSwappedGraphicObject( *this, maGraphic ) )
-mbAutoSwapped = false;
-else
 {
 mbIsInSwapIn = true;
 
@@ -1037,10 +1034,6 @@ bool GraphicObject::SwapIn()
 ImplAutoSwapIn();
 bRet = true;
 }
-else if( mpMgr && mpMgr->ImplFillSwappedGraphicObject( *this, maGraphic ) )
-{
-bRet = true;
-}
 else
 {
 bRet = maGraphic.SwapIn();
diff --git a/svtools/source/graphic/grfmgr2.cxx 
b/svtools/source/graphic/grfmgr2.cxx
index 3aabb52..0c4e17b 100644
--- a/svtools/source/graphic/grfmgr2.cxx
+++ b/svtools/source/graphic/grfmgr2.cxx

[Libreoffice-commits] core.git: sw/source

2015-02-22 Thread Zolnai Tamás
 sw/source/core/docnode/swbaslnk.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit f5ffba36cdf82d7540381e0a0b3200c9c585921d
Author: Zolnai Tamás 
Date:   Sun Feb 22 15:31:51 2015 +0100

-Werror,-Wunused-variable

Change-Id: I4c98d863b16ab057aa7d99c78fea1eb51935fc47

diff --git a/sw/source/core/docnode/swbaslnk.cxx 
b/sw/source/core/docnode/swbaslnk.cxx
index fbc3af8..de6f3dd 100644
--- a/sw/source/core/docnode/swbaslnk.cxx
+++ b/sw/source/core/docnode/swbaslnk.cxx
@@ -129,7 +129,7 @@ static void lcl_CallModify( SwGrfNode& rGrfNd, SfxPoolItem& 
rItem )
 bool bGraphicArrived = false;
 bool bGraphicPieceArrived = false;
 bool bDontNotify = false;
-Size aGrfSz, aOldSz, aFrmFmtSz;
+Size aGrfSz, aOldSz;
 
 SwGrfNode* pSwGrfNode = NULL;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 3 commits - include/svtools svtools/qa svtools/source sw/inc sw/source

2015-02-22 Thread Zolnai Tamás
 include/svtools/grfmgr.hxx|4 --
 svtools/qa/unit/GraphicObjectTest.cxx |   66 ++
 svtools/source/graphic/grfcache.cxx   |   24 
 svtools/source/graphic/grfcache.hxx   |1 
 svtools/source/graphic/grfmgr.cxx |7 ---
 svtools/source/graphic/grfmgr2.cxx|   18 -
 sw/inc/ndgrf.hxx  |5 --
 sw/source/core/docnode/swbaslnk.cxx   |   29 --
 sw/source/core/graphic/ndgrf.cxx  |6 +--
 sw/source/filter/html/htmlgrin.cxx|2 -
 10 files changed, 88 insertions(+), 74 deletions(-)

New commits:
commit 2d16cf85d1d1145eae37780920961e4a667f2e51
Author: Zolnai Tamás 
Date:   Sat Feb 21 09:59:12 2015 +0100

ChgTwipSizeFromPixel flag is useless

It is used only to make the same conversion
on a different way.
GetGraphicSizeTwip() also returns the size in twips.

Change-Id: Ic532341ab37c86a63792c82bf3a5fb2e3d8d0e67

diff --git a/sw/inc/ndgrf.hxx b/sw/inc/ndgrf.hxx
index b40da0c..ce25a78 100644
--- a/sw/inc/ndgrf.hxx
+++ b/sw/inc/ndgrf.hxx
@@ -46,7 +46,6 @@ class SW_DLLPUBLIC SwGrfNode: public SwNoTxtNode
 
 bool bGraphicArrived:1;
 bool bChgTwipSize   :1;
-bool bChgTwipSizeFromPixel  :1;
 bool bFrameInPaint  :1; ///< To avoid Start-/EndActions in Paint 
via SwapIn.
 bool bScaleImageMap :1; ///< Scale image map in SetTwipSize.
 
@@ -144,11 +143,9 @@ public:
 bool IsAnimated() const  { return maGrfObj.IsAnimated(); }
 
 bool IsChgTwipSize() const   { return bChgTwipSize; }
-bool IsChgTwipSizeFromPixel() const  { return bChgTwipSizeFromPixel; }
-void SetChgTwipSize( bool b, bool bFromPx=false )
+void SetChgTwipSize( bool b)
 {
 bChgTwipSize = b;
-bChgTwipSizeFromPixel = bFromPx;
 }
 
 bool IsGraphicArrived() const{ return bGraphicArrived; }
diff --git a/sw/source/core/docnode/swbaslnk.cxx 
b/sw/source/core/docnode/swbaslnk.cxx
index 85ec6f8..fbc3af8 100644
--- a/sw/source/core/docnode/swbaslnk.cxx
+++ b/sw/source/core/docnode/swbaslnk.cxx
@@ -53,7 +53,7 @@
 
 using namespace com::sun::star;
 
-static bool SetGrfFlySize( const Size& rGrfSz, const Size& rFrmSz, SwGrfNode* 
pGrfNd, const Size &rOrigGrfSize );
+static bool SetGrfFlySize( const Size& rGrfSz, SwGrfNode* pGrfNd, const Size 
&rOrigGrfSize );
 
 TYPEINIT1( SwBaseLink, ::sfx2::SvBaseLink );
 
@@ -153,17 +153,6 @@ static void lcl_CallModify( SwGrfNode& rGrfNd, 
SfxPoolItem& rItem )
   GRAPHIC_DEFAULT != rGrfObj.GetType() ) )
 {
 aGrfSz = ::GetGraphicSizeTwip( aGrf, 0 );
-if( pSwGrfNode->IsChgTwipSizeFromPixel() )
-{
-const MapMode aMapTwip( MAP_TWIP );
-aFrmFmtSz =
-Application::GetDefaultDevice()->PixelToLogic(
-aGrf.GetSizePixel(), aMapTwip );
-}
-else
-{
-aFrmFmtSz = aGrfSz;
-}
 
 if( bGraphicPieceArrived && GRAPHIC_DEFAULT != aGrf.GetType() &&
 ( !aOldSz.Width() || !aOldSz.Height() ) )
@@ -261,13 +250,13 @@ static void lcl_CallModify( SwGrfNode& rGrfNd, 
SfxPoolItem& rItem )
 IsGraphicArrived() );
 
 // Adjust the Fly's graphic
-if (!::SetGrfFlySize(aGrfSz, aFrmFmtSz, pGrfNd, 
aPreArriveSize))
+if (!::SetGrfFlySize(aGrfSz, pGrfNd, aPreArriveSize))
 ::lcl_CallModify( *pGrfNd, aMsgHint );
 }
 else if (pBLink == this)
 {
 assert(pGrfNd == pSwGrfNode && "fdo#87083 needs a 
different fix");
-if (!::SetGrfFlySize(aGrfSz, aFrmFmtSz, pGrfNd, 
aOldSz))
+if (!::SetGrfFlySize(aGrfSz, pGrfNd, aOldSz))
 {
 // Adjust the Fly's graphic
 ::lcl_CallModify( *pGrfNd, aMsgHint );
@@ -300,7 +289,7 @@ static void lcl_CallModify( SwGrfNode& rGrfNd, SfxPoolItem& 
rItem )
 return SUCCESS;
 }
 
-static bool SetGrfFlySize( const Size& rGrfSz, const Size& rFrmSz, SwGrfNode* 
pGrfNd, const Size& rOrigGrfSize )
+static bool SetGrfFlySize( const Size& rGrfSz, SwGrfNode* pGrfNd, const Size& 
rOrigGrfSize )
 {
 bool bRet = false;
 SwViewShell *pSh = 
pGrfNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentViewShell();
@@ -319,15 +308,15 @@ static bool SetGrfFlySize( const Size& rGrfSz, const 
Size& rFrmSz, SwGrfNode* pG
 Size aCalcSz( aSz );
 if ( !aSz.Height() && aSz.Width() )
 // Calculate the right height
-aCalcSz.Height() = rFrmSz.Height() *
-aSz.Width() / rFrmSz.Width();
+aCalcSz.Height() = rGrfSz.Height() *
+a

  1   2   3   4   5   6   7   8   9   10   >