Re: HttpClient - HttpComponents

2013-12-31 Thread Pierre-André Jacquod

Hello,
used to progamm a bit, but due to lack of time, was not able to 
contribute with the speeding up of the tree...


But as it seems to be a very low level priority task, I will have a try.
  The Commons HttpClient project is now end of life, and is no

to remove at least this dependency.

 it's probably a waste of time since the only thing using it is
 the Wiki Publisher extension, which likely uses just basic features

 care about performance; it would be better to investigate whether

current JREs (version 6 as baseline) include some equivalent
functionality already to get rid of that external dependency instead


I will try first this path (pure Java rewrite), depsite I like better 
C++ :-)


I intend to remove its use class by class of httpclient. So in case of 
lack of time, a part is done and not lost.


Locally I have removed the use of httpclient.URI.

But I would need a hint: is there a documentfoundation / LO wiki where I 
can get access as _test_ in order to be able to check my changes?


thanks
Best regards
Pierre-André

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


Re: internal compiler error: in connect_traces, at dwarf2cfi.c:2676

2013-12-30 Thread Pierre-André Jacquod

Hello,
works fine by me. Did you try with another compiler / compiler version ?
I have
gcc version 4.7.2 20130108 [gcc-4_7-branch revision 195012] (SUSE Linux)
and last commit in master being:

d8dedc775cedf0e9daf9284bc7e3a0331ccd2963
EMF+: Integer coordinate values are signed.

regards
Pierre-André

On 12/28/2013 10:52 AM, mcmurchy1917-libreoff...@yahoo.co.uk wrote:

Quite early on in compilling LO I get the following error. Any suggestions on
how to resolve. It seems to suggest it's a problem with gcc not with LO.


/usr/bin/make -j 2 -rs -f /home/libreoffice/Downloads/core/Makefile.gbuild \

  \
  \
  \

 all

[build DEP] LNK:Library/libbasegfxlo.so
[build DEP] LNK:Library/libucbhelper.so
[build LNK] Library/libucbhelper.so
[build CXX] basegfx/source/polygon/b2dsvgpolypolygon.cxx
[build CXX] basegfx/source/polygon/b3dpolygontools.cxx
[build CXX] basegfx/source/polygon/b3dpolypolygon.cxx
/home/libreoffice/Downloads/core/basegfx/source/polygon/b2dsvgpolypolygon.cx
x: In function 'rtl::OUString basegfx::tools::exportToSvgD(const
basegfx::B2DPolyPolygon, bool, bool, bool)':
/home/libreoffice/Downloads/core/basegfx/source/polygon/b2dsvgpolypolygon.c
xx:935:9: internal compiler error: in connect_traces, at dwarf2cfi.c:2676
  }
  ^

Please submit a full bug report,
with preprocessed source if appropriate.
See http://gcc.gnu.org/bugs.html for instructions.
make[1]: ***
[/home/libreoffice/Downloads/core/workdir/CxxObject/basegfx/source/polygon/
b2dsvgpolypolygon.o] Error 1 make[1]: *** Waiting for unfinished jobs
make: *** [build] Error 2



Alex
___
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


Re: Beginner

2013-12-24 Thread Pierre-André Jacquod

Hello,
if you want to contribute with coding, I would suggest you:
- first (try to) build LibreOffice, depend on OS it can be tricky, but 
less than it used to be. This implies to download the source code, 
resolve dependencies and use the compiler
- if not yet, get familiar with git (some basic commands are needed) and 
with gerrit


once done, to get more familiar, try to solve an easy hack or solve a 
bug that you can reproduce. But I would recommend solve easy hacks, this 
would avoid starting in some too deep part of the code.


A good starting point is : https://wiki.documentfoundation.org/Development

Else on debugging, even if not solving, already isolating the exact 
point of the problem and the reason is already of big help and a good 
point to get infos/ advice of more experienced developers.


Best regards

On 12/23/2013 06:54 PM, prabhdeep singh wrote:

I want to start contributing to the open source community, but I do not
where to begin.
Your community's cause seems great!
So I would love to start but I am absolutely clueless as to where to begin.
I have a background in C++ and algorithmic operations.
Any help would be appreciated!


___
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


Re: Cppunit-1.13.0 released

2012-07-07 Thread Pierre-André Jacquod

hello,
updated :-)

http://en.wikipedia.org/wiki/CppUnit
regards

On 07/07/2012 04:19 AM, Markus Mohrhard wrote:

Hey,

after we have no longer any build issues with cppunit I have now
officially tagged the 1.13.0 release of cppunit. I would like to thank
everybody who helped during this release.

The changes against the 1.12.1 release are:

- improved windows build experience (VisualStudio project files for
2005 to 2010).
- warning free code
- no auto_ptr in a header any more
- some old bugs fixed (sf#2185407, sf#2186611, sf#3123759, sf#2983798,
rhbz#641350, fdo#51317)

All other changes can be seen in the NEWS file and at
http://cgit.freedesktop.org/libreoffice/cppunit/log/

Please spread the news about our first cppunit release and encourage
people to provide bug report, patches and documentation.

Regards,
Markus
___
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


Re: Cppunit-1.13.0 released

2012-07-07 Thread Pierre-André Jacquod

hello,

git clone git://anongit.freedesktop.org/git/libreoffice/cppunit/
or
http://cgit.freedesktop.org/libreoffice/cppunit/

regards

On 07/07/2012 09:40 AM, Andreas Radke wrote:

Am Sat, 7 Jul 2012 04:19:39 +0200
schrieb Markus Mohrhard markus.mohrh...@googlemail.com:


Hey,

after we have no longer any build issues with cppunit I have now
officially tagged the 1.13.0 release of cppunit. I would like to thank
everybody who helped during this release.


Have you forked the original project? I can't find the new release in
the projects page at
http://sourceforge.net/apps/mediawiki/cppunit/index.php?title=Main_Page
or http://sourceforge.net/projects/cppunit/

-Andy
ArchLinux
___
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


bug 49610 in impress: suspicious commit found, but help needed

2012-06-21 Thread Pierre-André Jacquod

hello,
this bug is a bad regression. Following with debugger, I had as suspect 
the function void Outliner::ProvideNextTextObject (void) line 979 in 
sd/source/ui/view/Outliner.cxx (or something called late from this) as 
main suspect.


After bibisect from QA  the commit

bdfbbb33a491f3ce34375de14ba33436b04
slidesorter1: #i116014# Outliner holds ViewShell as weak_ptr.
* found as LGPLv3-only fix at svn rev 1172131 
(http://svn.apache.org/viewvc?view=revisionrevision=1172131)



touch the suspected function, within the commit frame between last good 
and first bad binaries.


As I just do not understand what it is about here, (neither the goal of 
the change nor the actual content), could you have a look about it? I 
guess it will be the quickest way.


Beware: currently this commit is just a suspect, since I need more than 
4 hours to compile (I am on linux, yeah, but with my hardware...) I am 
still compiling the checkout to try  test.


If / when I get more info (means I have compiled it), I will update to 
confirm (or not) my suspect.


Thanks and regards
Pierre-André
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [ANN] Please use Gerrit from now on for Patch Review

2012-06-21 Thread Pierre-André Jacquod

Hello,
well as free time contributor with commit access to current repository, 
I followed this gerrit story. So not kind of surprise, but yeah, until 
THIS mail and posts, was me very unclear what it would mean.


To say it, first I had a lot of doubt. Reading mails, entry in the wiki, 
looking the web ans thinking, I now have the feeling this could be a 
good move.


Just to say, I basically just really do not like the fact of having to 
use openId, would prefer to have an account at fd.o. I did it really for 
the LibO, a kind of forced to. And NO, I do NOT have any google, flickr, 
facebook or other account. Do not trust them enough to put my data 
there, so to use them as authentication But no choice (!) I kind of 
understood. [+1 for / to Lionel thread]


I - sorry - do not want to read a lot gerrit documentation, I am here 
already in my free time. So I raise some questions that are not clear 
for me, that I did not saw in the wiki, based on my previous 
experiences. Here some points:


[WORKFLOW]
1. I have been beaten back by tinderbox (Mac OS X hurt me well), fixing 
some stupid point of my commits run after run. So would this workflow be 
supported :

some patch done
I push to gerrit and let tinderbox run. In case of success I get ? a +1 
of each tinderbox ? How do I know it passes with success.
Once tinderbox is successful, since my change is small or I am confident 
with, I put a +2 to my patch, which means this will insert automatically 
it to master. So I will be able to positive review my own patch ?


2. If I have several patches, that need to be together, how should I 
proceed with pushing them together to gerrit ? (If I want to have three 
patches in the same review ID from gerrit) ?


[ADMIN]
1. I followed the asked process of setting up an account, etc.. mailed 
to Norbert so he can match my fd.o account to gerrit. Well, how may I 
now see that I actually have / will have commit access to gerrit repo ?


2. When my ssh key expires, it is enough to just change it into my 
gerrit account ?


3. May be a stupid remark, but why do not use this way (opening gerrit 
account ) then to ask for license stuff ? You would have to ack to be 
able to open account, or to load patches. This would ease, ensure the 
process towards this goal ?


Thanks  Regards
Pierre-André

On 06/18/2012 12:09 PM, Bjoern Michaelsen wrote:


Hi all,

with:

  http://sweetshark.livejournal.com/13298.html

gerrit is documented and ready to go. Please use it for code review as much as
possible now as it simplifies things a lot over manual patch fiddling on
mailing lists. I will update the EasyHacks to point to gerrit instead in the
next days.
The last remaining step will be making the repo at gerrit the reference (and
the one at freedesktop a read-only mirror). I assume that to be prepared and
done until mid-July(*).

From that point on, we will have a lot of opportunity to improve our tinderbox

testing and reporting, making life easier and better for everyone working on
the codebase.

Best,

Bjoern

(*) Along with the other repos.
___
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


Re: [Libreoffice] What is bibisect? And what is it doing in my office?

2012-06-21 Thread Pierre-André Jacquod

Hi,
just to say thanks for bibisect
Impressive example with fdo49610 to find the problematic commit.

Regards
Pierre-André

On 12/09/2011 02:59 PM, Bjoern Michaelsen wrote:

Hi all,



So I hope with this, we make regression finding some more fun and allow us --
QA and developers together -- to stabilize this release more quickly that ever
before.

Bjoern

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


Re: bug 49610 in impress: suspicious commit found, but help needed

2012-06-21 Thread Pierre-André Jacquod

Hello,

I locally reverted
bdfbbb33a491f3ce34375de14ba33436b04

 - sadly the change mixes a lot of reformatting with that fix. Hard
 to tell if that is now causing some ripple effects. :/

I can confirm this is the origin of the problem. The generated bug is 
very nasty (creates data loss) and the fix has to / should be in 3.6 as 
well as in 3.5.5


I also have to say honestly that fixing this patch is beyond my 
knowledge of LibO code in this area. So if you say OK, I will push my 
revert to master. This is not the most polite way of fixing it. 
destroying your correction, but the one that fit to my knowledge there.


Or have you time to investigate it and fix it ? Sorry, this sounds not 
very constructive, but in this period I do not have a lot of free time, 
so I can not offer more.


Tack
regards
Pierre-André


On 06/20/2012 11:10 PM, Thorsten Behrens wrote:

Pierre-André Jacquod wrote:

As I just do not understand what it is about here, (neither the goal
of the change nor the actual content), could you have a look about
it? I guess it will be the quickest way.


Hi Pierre-André,

well the goal was to decouple live cycles of Outliner and ViewShell

Cheers,

-- Thorsten



___
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


Re: --enable-debug vs --enable-symbols (Re: [Libreoffice-commits] .: 12 commits - config_host.mk.in configure.in filter/source oox/source sal/inc sc/source solenv/gbuild toolkit/source xmlhelp/source)

2012-05-21 Thread Pierre-André Jacquod

Hello,

On 05/20/2012 11:24 PM, Norbert Thiebaud wrote:

On Wed, May 16, 2012 at 11:30 PM, Pierre-André Jacquod
pjacq...@alumni.ethz.ch  wrote:

expecting to get symbols without optimization, not wanting all asserts
outputs.


If you are intending to debug why wouldn't you want the misnamed
'assert output' ?
Better said, I do not care of them / are not useful: I try to solve some 
bugzilla points and it happens I have not yet have seen one caught by an 
assert :- )


Hence the minimum is the best for me. But yeah, I admit I most probably 
did not get the power of all this stuff.


Regards
Pierre-André
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: --enable-debug vs --enable-symbols (Re: [Libreoffice-commits] .: 12 commits - config_host.mk.in configure.in filter/source oox/source sal/inc sc/source solenv/gbuild toolkit/source xmlhelp/source)

2012-05-20 Thread Pierre-André Jacquod

hello,

On 05/16/2012 04:07 PM, Lubos Lunak wrote:


 If somebody does
a developer build, there are not many good reasons why -O2 should be used -
it takes noticably more time and it makes debugging miserable. I can't think
of anything else than final builds and profiling as a good non-corner-case
reason for -O2.



At least I understand why I always got debug builds with optimization, 
which does not ease the use of debugger... and why it takes so long to 
build.


As occasional developer, I do not want to dig to deep in build options - 
that is also not my interest. So with --enable-symbols, I was really 
expecting to get symbols without optimization, not wanting all asserts 
outputs.


Could it not stay like that? Or how do you obtain this effect (symbols, 
without optimization, without all asserts output?) I really do not want 
to take time to search for such thinks, hacking LO is already during my 
free time.

Regards
Pierre-André
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [PATCH] Re: input for fdo#45779 from a basegfx knowledgeable person needed

2012-05-18 Thread Pierre-André Jacquod

Hello,

On 05/03/2012 11:30 AM, Thorsten Behrens wrote:

So what I suggest is a more defensive fix (or some larger review
across the code is in order): make GetLineArrow() return the
B2DPolyPolygon right away, and have *that one* be empty (i.e. not a


Since I do not intend to become a specialist of this kind of elements, I 
choose your more defensive proposition.

So here the patch...
Thanks for a review and an ack before I push it.


Regards
Pierre-André
From b77f2a21d222607edff535d3a069b8c30d4d2664 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pierre-Andr=C3=A9=20Jacquod?= pjacq...@alumni.ethz.ch
Date: Thu, 17 May 2012 17:51:33 +0200
Subject: [PATCH] fdo#45779 avoiding creation of inconsistent B2DPolygon

this avoid the root cause of this bug, avoiding creating a
B2DPlygon which contains no points.

It seems the code relies somehow on an null B2DPolyPolygon, hence the
change done here. Better would be to have time to look how to remove
this fact. But currently it seems the code relies on  a
rSet.Put( XLineStartItem( aArrowName, aPolyPoly) where aPolyPoly is
not defined in certain cases.

Change-Id: I61b75d925090d1c9a0da96ce1a6eea50a2d60e5a
---
 filter/source/msfilter/msdffimp.cxx |   29 +++--
 1 files changed, 15 insertions(+), 14 deletions(-)

diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index 80785fa..3d9efa7 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -1099,12 +1099,13 @@ void SvxMSDffManager::SolveSolver( const SvxMSDffSolverContainer rSolver )
 
 
 
-static basegfx::B2DPolygon GetLineArrow( const sal_Int32 nLineWidth, const MSO_LineEnd eLineEnd,
+static basegfx::B2DPolyPolygon GetLineArrow( const sal_Int32 nLineWidth, const MSO_LineEnd eLineEnd,
 const MSO_LineEndWidth eLineWidth, const MSO_LineEndLength eLineLenght,
 sal_Int32 rnArrowWidth, sal_Bool rbArrowCenter,
 rtl::OUString rsArrowName, sal_Bool bScaleArrow )
 {
-basegfx::B2DPolygon aRetval;
+basegfx::B2DPolyPolygon aRetPolyPoly;
+
 double  fLineWidth = nLineWidth  70 ? 70.0 : nLineWidth;
 double  fLenghtMul, fWidthMul;
 sal_Int32   nLineNumber;
@@ -1140,7 +1141,7 @@ static basegfx::B2DPolygon GetLineArrow( const sal_Int32 nLineWidth, const MSO_L
 aTriangle.append(basegfx::B2DPoint( fWidthMul * fLineWidth, fLenghtMul * fLineWidth ));
 aTriangle.append(basegfx::B2DPoint( 0.0, fLenghtMul * fLineWidth ));
 aTriangle.setClosed(true);
-aRetval = aTriangle;
+aRetPolyPoly = basegfx::B2DPolyPolygon(aTriangle);
 aArrowName.appendAscii(RTL_CONSTASCII_STRINGPARAM(msArrowEnd ));
 }
 break;
@@ -1169,7 +1170,7 @@ static basegfx::B2DPolygon GetLineArrow( const sal_Int32 nLineWidth, const MSO_L
 aTriangle.append(basegfx::B2DPoint( fWidthMul * fLineWidth * 0.15, fLenghtMul * fLineWidth ));
 aTriangle.append(basegfx::B2DPoint( 0.0, fLenghtMul * fLineWidth * 0.91 ));
 aTriangle.setClosed(true);
-aRetval = aTriangle;
+aRetPolyPoly = basegfx::B2DPolyPolygon(aTriangle);
 aArrowName.appendAscii(RTL_CONSTASCII_STRINGPARAM(msArrowOpenEnd ));
 }
 break;
@@ -1181,7 +1182,7 @@ static basegfx::B2DPolygon GetLineArrow( const sal_Int32 nLineWidth, const MSO_L
 aTriangle.append(basegfx::B2DPoint( fWidthMul * fLineWidth * 0.50 , fLenghtMul * fLineWidth * 0.60 ));
 aTriangle.append(basegfx::B2DPoint( 0.0, fLenghtMul * fLineWidth ));
 aTriangle.setClosed(true);
-aRetval = aTriangle;
+aRetPolyPoly = basegfx::B2DPolyPolygon(aTriangle);
 aArrowName.appendAscii(RTL_CONSTASCII_STRINGPARAM(msArrowStealthEnd ));
 }
 break;
@@ -1193,16 +1194,16 @@ static basegfx::B2DPolygon GetLineArrow( const sal_Int32 nLineWidth, const MSO_L
 aTriangle.append(basegfx::B2DPoint( fWidthMul * fLineWidth * 0.50 , fLenghtMul * fLineWidth ));
 aTriangle.append(basegfx::B2DPoint( 0.0, fLenghtMul * fLineWidth * 0.50 ));
 aTriangle.setClosed(true);
-aRetval = aTriangle;
+aRetPolyPoly = basegfx::B2DPolyPolygon(aTriangle);
 rbArrowCenter = sal_True;
 aArrowName.appendAscii(RTL_CONSTASCII_STRINGPARAM(msArrowDiamondEnd ));
 }
 break;
 case mso_lineArrowOvalEnd :
 {
-aRetval = XPolygon( Point( (sal_Int32)( fWidthMul * fLineWidth * 0.50 ), 0 ),
+aRetPolyPoly = basegfx::B2DPolyPolygon( XPolygon( Point( (sal_Int32)( fWidthMul * fLineWidth * 0.50 ), 0 ),
 (sal_Int32)( fWidthMul * fLineWidth * 0.50 ),
-(sal_Int32)( fLenghtMul * fLineWidth * 0.50 ), 0, 3600 ).getB2DPolygon();
+

some license statement

2012-05-05 Thread Pierre-André Jacquod

Hello,
just to confirm that all of my past  future contributions to 
LibreOffice may be licensed under the MPL/LGPLv3+ dual license.


Best regards
Pierre-André
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[PATCH] Re: input for fdo#45779 from a basegfx knowledgeable person needed

2012-04-30 Thread Pierre-André Jacquod

Hello,
back again after a while.


On 02/15/2012 11:30 AM, Thorsten Behrens wrote:

Fixed with d37abad97d72bae0fd0269de12e94c7a7d3fd7e1 - but, if you
like, would be cool to chase down why in the first place the ppt
import creates polygons with empty sub-paths, that looks like a
worthwhile optimization - code is around
filter/source/msfilter/msdffimp.cxx probably.


It happens that basegfx::GetLineArrow(...) (also defined within 
msdffimp.cxx, line 1102) does not create a valid polygon when eLineEnd 
has the value mso_lineNoEnd...

In the switch(eLineEnd), this goes to
  default: break;
without creating any polygon, letting the return value undefined.

So I propose to skip the creation these incorrect polygons if eLineEnd 
has the value mso_lineNoEnd. But since I do not understand well the 
import / translation from msformat, I may also have missed a big point. 
Hence thanks for reviewing this patch, before I push it.


I hope it helps.

Regards
Pierre-André
From ec4bf50361f3d2c75e2de20fdb1ddebddba8d406 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pierre-Andr=C3=A9=20Jacquod?= pjacq...@alumni.ethz.ch
Date: Sat, 28 Apr 2012 18:57:02 +0200
Subject: [PATCH] impress ms import filter avoid b2dpolygon with 0 b2dpoints

when the lineEnd value is mso_lineNoEnd, the created polygon was
incomplete and with no points, then disabling it.
---
 filter/source/msfilter/msdffimp.cxx |   44 +++---
 1 files changed, 25 insertions(+), 19 deletions(-)

diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index 80785fa..f208dd9 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -1329,17 +1329,20 @@ void DffPropertyReader::ApplyLineAttributes( SfxItemSet rSet, const MSO_SPT eSh
 if ( IsProperty( DFF_Prop_lineStartArrowhead ) )
 {
 MSO_LineEnd eLineEnd = (MSO_LineEnd)GetPropertyValue( DFF_Prop_lineStartArrowhead );
-MSO_LineEndWidtheWidth = (MSO_LineEndWidth)GetPropertyValue( DFF_Prop_lineStartArrowWidth, mso_lineMediumWidthArrow );
-MSO_LineEndLength   eLenght = (MSO_LineEndLength)GetPropertyValue( DFF_Prop_lineStartArrowLength, mso_lineMediumLenArrow );
 
-sal_Int32   nArrowWidth;
-sal_BoolbArrowCenter;
-rtl::OUString aArrowName;
-basegfx::B2DPolygon aPoly(GetLineArrow( nLineWidth, eLineEnd, eWidth, eLenght, nArrowWidth, bArrowCenter, aArrowName, bScaleArrows ));
+if ( eLineEnd != mso_lineNoEnd )
+{
+MSO_LineEndWidtheWidth = (MSO_LineEndWidth)GetPropertyValue( DFF_Prop_lineStartArrowWidth, mso_lineMediumWidthArrow );
+MSO_LineEndLength   eLenght = (MSO_LineEndLength)GetPropertyValue( DFF_Prop_lineStartArrowLength, mso_lineMediumLenArrow );
+sal_Int32   nArrowWidth;
+sal_BoolbArrowCenter;
+rtl::OUString aArrowName;
+basegfx::B2DPolygon aPoly(GetLineArrow( nLineWidth, eLineEnd, eWidth, eLenght, nArrowWidth, bArrowCenter, aArrowName, bScaleArrows ));
 
-rSet.Put( XLineStartWidthItem( nArrowWidth ) );
-rSet.Put( XLineStartItem( aArrowName, basegfx::B2DPolyPolygon(aPoly) ) );
-rSet.Put( XLineStartCenterItem( bArrowCenter ) );
+rSet.Put( XLineStartWidthItem( nArrowWidth ) );
+rSet.Put( XLineStartItem( aArrowName, basegfx::B2DPolyPolygon(aPoly) ) );
+rSet.Put( XLineStartCenterItem( bArrowCenter ) );
+}
 }
 /
 // LineEnd //
@@ -1347,17 +1350,20 @@ void DffPropertyReader::ApplyLineAttributes( SfxItemSet rSet, const MSO_SPT eSh
 if ( IsProperty( DFF_Prop_lineEndArrowhead ) )
 {
 MSO_LineEnd eLineEnd = (MSO_LineEnd)GetPropertyValue( DFF_Prop_lineEndArrowhead );
-MSO_LineEndWidtheWidth = (MSO_LineEndWidth)GetPropertyValue( DFF_Prop_lineEndArrowWidth, mso_lineMediumWidthArrow );
-MSO_LineEndLength   eLenght = (MSO_LineEndLength)GetPropertyValue( DFF_Prop_lineEndArrowLength, mso_lineMediumLenArrow );
+if ( eLineEnd != mso_lineNoEnd)
+{
+MSO_LineEndWidtheWidth = (MSO_LineEndWidth)GetPropertyValue( DFF_Prop_lineEndArrowWidth, mso_lineMediumWidthArrow );
+MSO_LineEndLength   eLenght = (MSO_LineEndLength)GetPropertyValue( DFF_Prop_lineEndArrowLength, mso_lineMediumLenArrow );
 
-sal_Int32   nArrowWidth;
-sal_BoolbArrowCenter;
-rtl::OUString aArrowName;
-basegfx::B2DPolygon aPoly(GetLineArrow( nLineWidth, eLineEnd, eWidth, eLenght, nArrowWidth, bArrowCenter, aArrowName, bScaleArrows ));
+sal_Int32   nArrowWidth;
+

Re: [ANN] Referencing bugs in commits

2012-02-15 Thread Pierre-André Jacquod

hello,


The bug reference has to have fdo#ABCDE form (where ABCDE is the bug
number), and has to be at the first line of the commit (it does not
matter where on that line).


Sorry, one point is for me not clear:

by the first line, do you mean title line or would it works also as 
first line of the comment (hence not being into the title) ?


Thanks
Pierre-André

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


input for fdo#45779 from a basegfx knowledgeable person needed

2012-02-15 Thread Pierre-André Jacquod

hello,
I have quickly investigated the crash in fdo#45779 when saving an 
impress document.


The reason of the crash is in basegfx/inc/basegfx/point/b2dpoint.hxx 
(line 82) where this is called:


2DPoint::B2DPoint (this=0xbfffc850, rPoint=...)
  :   B2DTuple(rPoint)
(from back-trace)

It turns out that in this case, rPoint is 0x0, the null pointer.
and B2DTuple does not support it

B2DTuple(const B2DTuple rTup)
:   mfX( rTup.mfX ),
mfY( rTup.mfY )
{}

Here you dereference the null pointer, which crash.

Ok, the basic attitude would be to let B2DTuple be Null-pointer 
consistent: (checking that rTup is not NULL), but is it really a good idea?


What is a NULL B2DTuple ?

Or should the caller (this is called due to 
basegfx/source/polygon/b2dpolygon.cxx:1257) take care of the case, 
returning either the value, ... or NULL ?


B2DPoint B2DPolygon::getB2DPoint(sal_uInt32 nIndex) const
{
OSL_ENSURE(nIndex  mpPolygon-count(), B2DPolygon a
return mpPolygon-getPoint(nIndex);
}


Or should I look higher in the hierarchy, saying that a NULL point in a 
B2DPolygon has nothing to do and disallow it ?


As far as I could seee, this polygon had 4 elements / points, all with 
NULL data at the time of the crash :-/


What would be the right (and most meaningfull) approach ?

Thanks  regards
Pierre-André
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: input for fdo#45779 from a basegfx knowledgeable person needed

2012-02-15 Thread Pierre-André Jacquod

hello,

Fixed with d37abad97d72bae0fd0269de12e94c7a7d3fd7e1 - but, if you

thanks


import creates polygons with empty sub-paths, that looks like a
worthwhile optimization - code is around
filter/source/msfilter/msdffimp.cxx probably.


as soon as I have more spare time, I will have a try.
Regards
Pierre-André

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


Re: [Libreoffice-qa] [ANN] Referencing bugs in commits

2012-02-14 Thread Pierre-André Jacquod

hello,


The bug reference has to have fdo#ABCDE form (where ABCDE is the bug
number), and has to be at the first line of the commit (it does not
matter where on that line).


Sorry, one point is for me not clear:

by the first line, do you mean title line or would it works also as 
first line of the comment (hence not being into the title) ?


Thanks
Pierre-André

___
List Name: Libreoffice-qa mailing list
Mail address: Libreoffice-qa@lists.freedesktop.org
Change settings: http://lists.freedesktop.org/mailman/listinfo/libreoffice-qa
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://lists.freedesktop.org/archives/libreoffice-qa/


Re: [Libreoffice] bug 36874 (label printing) further improvement?

2012-01-03 Thread Pierre-André Jacquod

Hello,

Just to mix in the middle: from this and a previous mail from you:


  It would be much better if the label-definitions contain all
dimensions, i.e.


yes

 My calculation is based on the assumption (presumption?) that the
 page containing the labels is symmetrical, i.e. rotating the page
 180 degrees is not a problem, left margine equals right margin and
 top margin equals bottom margin.

some labels paper that I bought last year (I guess of too bad quality) 
were not symmetric


But anyway, the change is already very good.
Thanks
regards
Pierre-André
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] .: Branch 'libreoffice-3-5' - 5 commits - filter/source sc/source sd/source vcl/inc vcl/source

2011-12-29 Thread Pierre-André Jacquod
 filter/source/pdf/impdialog.cxx |   13 
 filter/source/pdf/impdialog.hrc |1 
 filter/source/pdf/impdialog.hxx |2 
 filter/source/pdf/impdialog.src |   12 
 filter/source/pdf/pdfexport.cxx |4 
 filter/source/pdf/pdfexport.hxx |1 
 filter/source/pdf/pdffilter.cxx |1 
 sc/source/core/tool/dbdata.cxx  |6 
 sd/source/ui/unoidl/unomodel.cxx|  498 ++--
 vcl/inc/vcl/pdfextoutdevdata.hxx|4 
 vcl/source/gdi/pdfextoutdevdata.cxx |9 
 11 files changed, 298 insertions(+), 253 deletions(-)

New commits:
commit 146fa8dabe816d35e7b879172baa00027575d3b2
Author: Julien Nabet serval2...@yahoo.fr
Date:   Wed Dec 28 23:15:03 2011 +0100

Fix order init

diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx
index cae790a..182af3c 100644
--- a/filter/source/pdf/impdialog.cxx
+++ b/filter/source/pdf/impdialog.cxx
@@ -453,9 +453,9 @@ ImpPDFTabGeneralPage::ImpPDFTabGeneralPage( Window* pParent,
 maCbAllowDuplicateFieldNames( this, PDFFilterResId( 
CB_ALLOWDUPLICATEFIELDNAMES ) ),
 
 maCbExportBookmarks( this, PDFFilterResId( CB_EXPORTBOOKMARKS ) ),
+maCbExportHiddenSlides( this, PDFFilterResId( CB_EXPORTHIDDENSLIDES ) ),
 maCbExportNotes( this, PDFFilterResId( CB_EXPORTNOTES ) ),
 maCbExportNotesPages( this, PDFFilterResId( CB_EXPORTNOTESPAGES ) ),
-maCbExportHiddenSlides( this, PDFFilterResId( CB_EXPORTHIDDENSLIDES ) ),
 maCbExportEmptyPages( this, PDFFilterResId( CB_EXPORTEMPTYPAGES ) ),
 maCbAddStream( this, PDFFilterResId( CB_ADDSTREAM ) ),
 maFtAddStreamDescription( this, PDFFilterResId( FT_ADDSTREAMDESCRIPTION ) 
),
commit 6ea45acb55294fe99dbe44dec1ff844ab0989111
Author: Julien Nabet serval2...@yahoo.fr
Date:   Wed Dec 28 22:55:15 2011 +0100

Fix init order

diff --git a/vcl/source/gdi/pdfextoutdevdata.cxx 
b/vcl/source/gdi/pdfextoutdevdata.cxx
index a2d856d..23d81a4 100644
--- a/vcl/source/gdi/pdfextoutdevdata.cxx
+++ b/vcl/source/gdi/pdfextoutdevdata.cxx
@@ -511,8 +511,8 @@ PDFExtOutDevData::PDFExtOutDevData( const OutputDevice 
rOutDev ) :
 mbTransitionEffects ( sal_True ),
 mbUseLosslessCompression( sal_True ),
 mbReduceImageResolution ( sal_False ),
-mbExportNDests  ( sal_False ),
 mbExportHiddenSlides( sal_False ),
+mbExportNDests  ( sal_False ),
 mnFormsFormat   ( 0 ),
 mnPage  ( -1 ),
 mpPageSyncData  ( NULL ),
commit 0fcf0fa0a6760d85e791bd4a63fe6a0a75e59ea5
Author: Pierre-André Jacquod pjacq...@alumni.ethz.ch
Date:   Sat Dec 24 00:16:59 2011 +0100

option to export hidden slides to pdf files

This add the checkbox hidden pages to the PDF export general tab
and if checked, export also to PDF the hidden slides

diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx
index 25dbbd1..cae790a 100644
--- a/filter/source/pdf/impdialog.cxx
+++ b/filter/source/pdf/impdialog.cxx
@@ -93,6 +93,7 @@ ImpPDFTabDialog::ImpPDFTabDialog( Window* pParent,
 mbExportFormFields( sal_True ),
 mbAllowDuplicateFieldNames( sal_False ),
 mbExportBookmarks( sal_True ),
+mbExportHiddenSlides ( sal_False),
 mnOpenBookmarkLevels( -1 ),
 
 mbHideViewerToolbar( sal_False ),
@@ -194,6 +195,8 @@ ImpPDFTabDialog::ImpPDFTabDialog( Window* pParent,
 mbExportNotes = maConfigItem.ReadBool( OUString( 
RTL_CONSTASCII_USTRINGPARAM( ExportNotes  ) ), sal_False );
 
 mbExportBookmarks = maConfigItem.ReadBool( OUString( 
RTL_CONSTASCII_USTRINGPARAM( ExportBookmarks ) ), sal_True );
+if ( mbIsPresentation )
+mbExportHiddenSlides = maConfigItem.ReadBool( OUString( 
RTL_CONSTASCII_USTRINGPARAM( ExportHiddenSlides ) ), sal_False );
 mnOpenBookmarkLevels = maConfigItem.ReadInt32( OUString( 
RTL_CONSTASCII_USTRINGPARAM( OpenBookmarkLevels ) ), -1 );
 mbUseTransitionEffects = maConfigItem.ReadBool( OUString( 
RTL_CONSTASCII_USTRINGPARAM( UseTransitionEffects  ) ), sal_True );
 mbIsSkipEmptyPages = maConfigItem.ReadBool( OUString( 
RTL_CONSTASCII_USTRINGPARAM( IsSkipEmptyPages  ) ), sal_False );
@@ -333,6 +336,8 @@ Sequence PropertyValue  ImpPDFTabDialog::GetFilterData()
 maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( 
ExportNotes ) ), mbExportNotes );
 
 maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( 
ExportBookmarks ) ), mbExportBookmarks );
+if ( mbIsPresentation )
+maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( 
ExportHiddenSlides ) ), mbExportHiddenSlides );
 maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( 
UseTransitionEffects ) ), mbUseTransitionEffects );
 maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( 
IsSkipEmptyPages ) ), mbIsSkipEmptyPages );
 maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( 
IsAddStream ) ), mbAddStream );
@@ -450,6 +455,7 @@ 

[Libreoffice-commits] .: 4 commits - filter/source sc/source sd/source vcl/inc vcl/source

2011-12-28 Thread Pierre-André Jacquod
 filter/source/pdf/impdialog.cxx |   13 
 filter/source/pdf/impdialog.hrc |1 
 filter/source/pdf/impdialog.hxx |2 
 filter/source/pdf/impdialog.src |   12 
 filter/source/pdf/pdfexport.cxx |4 
 filter/source/pdf/pdfexport.hxx |1 
 filter/source/pdf/pdffilter.cxx |1 
 sc/source/core/tool/dbdata.cxx  |6 
 sc/source/ui/unoobj/cursuno.cxx |2 
 sc/source/ui/vba/vbarange.cxx   |2 
 sd/source/ui/unoidl/unomodel.cxx|  498 ++--
 vcl/inc/vcl/pdfextoutdevdata.hxx|4 
 vcl/source/gdi/pdfextoutdevdata.cxx |9 
 13 files changed, 300 insertions(+), 255 deletions(-)

New commits:
commit 7da3f1bad5f7791756f8450391d94ba78b3d10cc
Author: Pierre-André Jacquod pjacq...@alumni.ethz.ch
Date:   Sat Dec 24 00:16:59 2011 +0100

option to export hidden slides to pdf files

This add the checkbox hidden pages to the PDF export general tab
and if checked, export also to PDF the hidden slides

diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx
index 2f0682c..b10bf68 100644
--- a/filter/source/pdf/impdialog.cxx
+++ b/filter/source/pdf/impdialog.cxx
@@ -93,6 +93,7 @@ ImpPDFTabDialog::ImpPDFTabDialog( Window* pParent,
 mbExportFormFields( sal_True ),
 mbAllowDuplicateFieldNames( sal_False ),
 mbExportBookmarks( sal_True ),
+mbExportHiddenSlides ( sal_False),
 mnOpenBookmarkLevels( -1 ),
 
 mbHideViewerToolbar( sal_False ),
@@ -194,6 +195,8 @@ ImpPDFTabDialog::ImpPDFTabDialog( Window* pParent,
 mbExportNotes = maConfigItem.ReadBool( OUString( 
RTL_CONSTASCII_USTRINGPARAM( ExportNotes  ) ), sal_False );
 
 mbExportBookmarks = maConfigItem.ReadBool( OUString( 
RTL_CONSTASCII_USTRINGPARAM( ExportBookmarks ) ), sal_True );
+if ( mbIsPresentation )
+mbExportHiddenSlides = maConfigItem.ReadBool( OUString( 
RTL_CONSTASCII_USTRINGPARAM( ExportHiddenSlides ) ), sal_False );
 mnOpenBookmarkLevels = maConfigItem.ReadInt32( OUString( 
RTL_CONSTASCII_USTRINGPARAM( OpenBookmarkLevels ) ), -1 );
 mbUseTransitionEffects = maConfigItem.ReadBool( OUString( 
RTL_CONSTASCII_USTRINGPARAM( UseTransitionEffects  ) ), sal_True );
 mbIsSkipEmptyPages = maConfigItem.ReadBool( OUString( 
RTL_CONSTASCII_USTRINGPARAM( IsSkipEmptyPages  ) ), sal_False );
@@ -341,6 +344,8 @@ Sequence PropertyValue  ImpPDFTabDialog::GetFilterData()
 maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( 
ExportNotes ) ), mbExportNotes );
 
 maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( 
ExportBookmarks ) ), mbExportBookmarks );
+if ( mbIsPresentation )
+maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( 
ExportHiddenSlides ) ), mbExportHiddenSlides );
 maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( 
UseTransitionEffects ) ), mbUseTransitionEffects );
 maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( 
IsSkipEmptyPages ) ), mbIsSkipEmptyPages );
 maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( 
IsAddStream ) ), mbAddStream );
@@ -458,6 +463,7 @@ ImpPDFTabGeneralPage::ImpPDFTabGeneralPage( Window* pParent,
 maCbExportBookmarks( this, PDFFilterResId( CB_EXPORTBOOKMARKS ) ),
 maCbExportNotes( this, PDFFilterResId( CB_EXPORTNOTES ) ),
 maCbExportNotesPages( this, PDFFilterResId( CB_EXPORTNOTESPAGES ) ),
+maCbExportHiddenSlides( this, PDFFilterResId( CB_EXPORTHIDDENSLIDES ) ),
 maCbExportEmptyPages( this, PDFFilterResId( CB_EXPORTEMPTYPAGES ) ),
 maCbAddStream( this, PDFFilterResId( CB_ADDSTREAM ) ),
 maFtAddStreamDescription( this, PDFFilterResId( FT_ADDSTREAMDESCRIPTION ) 
),
@@ -569,6 +575,9 @@ void ImpPDFTabGeneralPage::SetFilterConfigItem( const 
ImpPDFTabDialog* paParent
 {
 maCbExportNotesPages.Show( sal_True );
 maCbExportNotesPages.Check( paParent-mbExportNotesPages );
+maCbExportHiddenSlides.Show( sal_True);
+maCbExportHiddenSlides.Check( paParent-mbExportHiddenSlides );
+
 }
 else
 {
@@ -581,6 +590,8 @@ void ImpPDFTabGeneralPage::SetFilterConfigItem( const 
ImpPDFTabDialog* paParent
 maCbEmbedStandardFonts.SetPosPixel( Point( aPos.X(), aPos.Y() - 
nCheckBoxHeight ) );
 maCbExportNotesPages.Show( sal_False );
 maCbExportNotesPages.Check( sal_False );
+maCbExportHiddenSlides.Show( sal_False);
+maCbExportHiddenSlides.Check( sal_False );
 }
 
 maCbExportEmptyPages.Check( !paParent-mbIsSkipEmptyPages );
@@ -606,6 +617,8 @@ void ImpPDFTabGeneralPage::GetFilterConfigItem( 
ImpPDFTabDialog* paParent )
 if ( mbIsPresentation )
 paParent-mbExportNotesPages = maCbExportNotesPages.IsChecked();
 paParent-mbExportBookmarks = maCbExportBookmarks.IsChecked();
+if ( mbIsPresentation )
+paParent-mbExportHiddenSlides = maCbExportHiddenSlides.IsChecked();
 
 paParent-mbIsSkipEmptyPages =  !maCbExportEmptyPages.IsChecked();

[Libreoffice-commits] .: vcl/inc

2011-12-28 Thread Pierre-André Jacquod
 vcl/inc/vcl/pdfextoutdevdata.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 9cc02548dec9b953eb186052d424d981cb2addea
Author: Pierre-André Jacquod pjacq...@alumni.ethz.ch
Date:   Thu Dec 29 00:02:18 2011 +0100

change order of var in PDFExtOutDevData to suppress waring

diff --git a/vcl/inc/vcl/pdfextoutdevdata.hxx b/vcl/inc/vcl/pdfextoutdevdata.hxx
index c1be576..244a11b 100644
--- a/vcl/inc/vcl/pdfextoutdevdata.hxx
+++ b/vcl/inc/vcl/pdfextoutdevdata.hxx
@@ -92,8 +92,8 @@ class VCL_DLLPUBLIC PDFExtOutDevData : public ExtOutDevData
 sal_BoolmbReduceImageResolution;
 sal_BoolmbExportFormFields;
 sal_BoolmbExportBookmarks;
-sal_BoolmbExportHiddenSlides;
 sal_BoolmbExportNDests; //i56629
+sal_BoolmbExportHiddenSlides;
 sal_Int32   mnFormsFormat;
 sal_Int32   mnPage;
 com::sun::star::lang::LocalemaDocLocale;
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/inc

2011-12-28 Thread Pierre-André Jacquod
 vcl/inc/vcl/pdfextoutdevdata.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 3bcee0e100e9fdadc2c5b15036caaf2ed53ac6dc
Author: Pierre-André Jacquod pjacq...@alumni.ethz.ch
Date:   Thu Dec 29 00:05:51 2011 +0100

Revert change order of var in PDFExtOutDevData to suppress waring

since already corrected in an other way.
this reverts commit 9cc02548dec9b953eb186052d424d981cb2addea.

diff --git a/vcl/inc/vcl/pdfextoutdevdata.hxx b/vcl/inc/vcl/pdfextoutdevdata.hxx
index 244a11b..c1be576 100644
--- a/vcl/inc/vcl/pdfextoutdevdata.hxx
+++ b/vcl/inc/vcl/pdfextoutdevdata.hxx
@@ -92,8 +92,8 @@ class VCL_DLLPUBLIC PDFExtOutDevData : public ExtOutDevData
 sal_BoolmbReduceImageResolution;
 sal_BoolmbExportFormFields;
 sal_BoolmbExportBookmarks;
-sal_BoolmbExportNDests; //i56629
 sal_BoolmbExportHiddenSlides;
+sal_BoolmbExportNDests; //i56629
 sal_Int32   mnFormsFormat;
 sal_Int32   mnPage;
 com::sun::star::lang::LocalemaDocLocale;
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: [Libreoffice] [PATCH] fdo#42286, do not shrink the selected area (2)

2011-12-18 Thread Pierre-André Jacquod

Hi Eicke,


The second one:
0001-fdo42286-extend-down-but-also-shrink-if-cells-are-em.patch


For consistency it makes sense to also shrink the area, as
re-initializing the filter area with only one cell or one row selected

.

erroneously included. Please go ahead with this one.


OK


Please check that a defined data base range did not change behavior with
your previous changes.
I have look at the code where GetDataArea is called. The only places 
where a behaviour change could happen are in function GetDBData ( 
sc/source/ui/docshell/docsh5.cxx )
if bOnlyDown is true. In this case, the area will be shrink - if needed 
-  only for the number of rows. Before, all 4 sides (top, right, left 
and bottom) could be shrink. But this change exists only if we shrink. 
For expanding, the behaviour was already ensured as described (bOnlyDown 
= true would have expanded only down, not the other directions).


This now makes the behaviour symmetric between shrinking / expanding the 
area. Based on flags and description, the former behaviour was buggy, 
but maybe something has been build depending of it. Despite knowing what 
is changed, I was not able to produce a way of using it that seemed to 
be problematic. I see you have worked on this function, maybe something 
will strike you immediately :- ).


So here the patch. If no one object, I will push it during my Christmas 
Holiday.


Best regards
Pierre-André

From 994b2c2e5a760503f8e466ae8068cf1cc453a712 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pierre-Andr=C3=A9=20Jacquod?= pjacq...@alumni.ethz.ch
Date: Thu, 15 Dec 2011 19:29:17 +0100
Subject: [PATCH 1/2] fdo42286 better solution: extend and shrink end of row if needed

---
 sc/source/core/tool/dbdata.cxx |6 ++
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/sc/source/core/tool/dbdata.cxx b/sc/source/core/tool/dbdata.cxx
index 3d60554..3cc4146 100644
--- a/sc/source/core/tool/dbdata.cxx
+++ b/sc/source/core/tool/dbdata.cxx
@@ -544,10 +544,8 @@ void ScDBData::UpdateReference(ScDocument* pDoc, UpdateRefMode eUpdateRefMode,
 void ScDBData::ExtendDataArea(ScDocument* pDoc)
 {
 // Extend the DB area to include data rows immediately below.
-SCCOL nCol1a = nStartCol, nCol2a = nEndCol;
-SCROW nRow1a = nStartRow, nRow2a = nEndRow;
-pDoc-GetDataArea(nTable, nCol1a, nRow1a, nCol2a, nRow2a, true, true);
-nEndRow = nRow2a;
+// or shrink it if all cells are empty
+pDoc-GetDataArea(nTable, nStartCol, nStartRow, nEndCol, nEndRow, false, true);
 }
 
 namespace {
-- 
1.7.3.4

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


[Libreoffice-commits] .: 3 commits - sc/source

2011-12-04 Thread Pierre-André Jacquod
 sc/source/core/data/table1.cxx |   82 -
 1 file changed, 48 insertions(+), 34 deletions(-)

New commits:
commit e42ee773ffc12e38d596ce2aa016f0849c4e5ac6
Author: Pierre-André Jacquod pjacq...@alumni.ethz.ch
Date:   Tue Nov 29 09:10:26 2011 +0100

reduce scope of var and better comment of function GetDataArea

diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx
index 3c142c1..06b8203 100644
--- a/sc/source/core/data/table1.cxx
+++ b/sc/source/core/data/table1.cxx
@@ -743,17 +743,19 @@ bool ScTable::GetDataStart( SCCOL rStartCol, SCROW 
rStartRow ) const
 void ScTable::GetDataArea( SCCOL rStartCol, SCROW rStartRow, SCCOL rEndCol, 
SCROW rEndRow,
bool bIncludeOld, bool bOnlyDown ) const
 {
-// bIncludeOld = true ensure that the returned area contains at least the 
initial area,
-//  independently of the case if this area has empty rows / 
columns at its borders
-// bOnlyDown = true means extend the inputed area only down, i.e increase 
only rEndRow
+// return the smallest area containing at least all contiguous cells 
having data. This area
+// is a square containing also empty cells. It may shrink or extend the 
area given as input
+// Flags as modifiers:
+//
+// bIncludeOld = true ensure that the returned area contains at least 
the initial area,
+//   independently of the emptniess of rows / columns 
(i.e. does not allow shrinking)
+// bOnlyDown = true means extend / shrink the inputed area only down, 
i.e modifiy only rEndRow
+
 bool bLeft = false;
 bool bRight  = false;
 bool bTop = false;
 bool bBottom = false;
-bool bChanged;
-bool bFound;
-SCCOL i;
-SCROW nTest;
+bool bChanged = false;
 
 do
 {
@@ -784,12 +786,12 @@ void ScTable::GetDataArea( SCCOL rStartCol, SCROW 
rStartRow, SCCOL rEndCol, S
 
 if (rStartRow  0)
 {
-nTest = rStartRow-1;
-bFound = false;
-for (i=rStartCol; i=rEndCol  !bFound; i++)
+SCROW nTest = rStartRow-1;
+bool needExtend = false;
+for ( SCCOL i = rStartCol; i=rEndCol  !needExtend; i++)
 if (aCol[i].HasDataAt(nTest))
-bFound = true;
-if (bFound)
+needExtend = true;
+if (needExtend)
 {
 --rStartRow;
 bChanged = true;
@@ -800,12 +802,12 @@ void ScTable::GetDataArea( SCCOL rStartCol, SCROW 
rStartRow, SCCOL rEndCol, S
 
 if (rEndRow  MAXROW)
 {
-nTest = rEndRow+1;
-bFound = false;
-for (i=rStartCol; i=rEndCol  !bFound; i++)
+SCROW nTest = rEndRow+1;
+bool needExtend = false;
+for ( SCCOL i = rStartCol; i=rEndCol  !needExtend; i++)
 if (aCol[i].HasDataAt(nTest))
-bFound = true;
-if (bFound)
+needExtend = true;
+if (needExtend)
 {
 ++rEndRow;
 bChanged = true;
@@ -830,7 +832,7 @@ void ScTable::GetDataArea( SCCOL rStartCol, SCROW 
rStartRow, SCCOL rEndCol, S
 bool shrink = true;
 do
 {
-for (i=rStartCol; i=rEndCol  shrink; i++)
+for ( SCCOL i = rStartCol; i=rEndCol  shrink; i++)
 if (aCol[i].HasDataAt(rStartRow))
 shrink = false;
 if (shrink)
@@ -846,7 +848,7 @@ void ScTable::GetDataArea( SCCOL rStartCol, SCROW 
rStartRow, SCCOL rEndCol, S
 bool shrink = true;
 do
 {
-for (i=rStartCol; i=rEndCol  shrink; i++)
+for ( SCCOL i = rStartCol; i=rEndCol  shrink; i++)
 if (aCol[i].HasDataAt(rEndRow))
 shrink = false;
 if (shrink)
commit 2e5023f974dd94dfeec0554ce07d0544f9ce7638
Author: Pierre-André Jacquod pjacq...@alumni.ethz.ch
Date:   Mon Nov 28 10:10:15 2011 +0100

if empty row / col leads to shrink area, suppress all empty rows/col

and not just the last one, leaving the other within the selection
area

diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx
index 2262eca..3c142c1 100644
--- a/sc/source/core/data/table1.cxx
+++ b/sc/source/core/data/table1.cxx
@@ -817,22 +817,25 @@ void ScTable::GetDataArea( SCCOL rStartCol, SCROW 
rStartRow, SCCOL rEndCol, S
 
 if ( !bIncludeOld  !bOnlyDown )
 {
-if ( !bLeft  rStartCol  MAXCOL  rStartCol  rEndCol )
-if ( aCol[rStartCol].IsEmptyBlock(rStartRow,rEndRow) )
+if ( !bLeft )
+while ( aCol[rStartCol].IsEmptyBlock(rStartRow,rEndRow)  
rStartCol  MAXCOL  rStartCol  rEndCol)
 ++rStartCol;
 
-if ( 

Re: [Libreoffice] [PATCH] fdo#42286, do not shrink the selected area (2)

2011-12-04 Thread Pierre-André Jacquod

Hello,


To give you a background, this extend range downward functionality was

Thanks for your explanation.

Following the remark of Eicke, I ended up with 3 possible patches :-/ 
which all have small differences in behaviour. I have a favorite, but do 
not want to choose alone. Please push the one you think is the best for 
the filter drop-down.


The first one is my favorite:
0001-fdo42286-strict-use-of-GetDataArea-and-strict-extens.patch
it extends the area down. It takes into account the cells strictly below 
the already selected area. It never shrinks / shortens the selected 
area. This is the one that implement in my opinion the best the 
behaviour of adding data below already active area.


The second one:
0001-fdo42286-extend-down-but-also-shrink-if-cells-are-em.patch
has the same logic, except it allows to shrink the area, if cells are 
emptied. This the filter is allowed to extend, it could be seen as logic 
that it is also allowed to shrink.


The last one:
0001-fdo42286-extend-down-even-if-last-row-empty-but-a-co.patch
extend down, but also if data is added to the first cell bellow. so if 
you have something like (o means empty cell, x cell with data), initial 
filter only on B2:D3

o
oXXXo
oXXXo
X
and add the last X below right, the the last line will be included in 
the area and shown with empty cells selection. I do not like this, 
since it suddenly take into account a column which was not part of the 
initial filtered area.


Due to my job, I have not been very available last week, and it will be 
the same this week. (I will not be able to code / push until 9th). would 
be nice if this could be inserted before branching to 3.5.0


As prerequisite for working, the following commits are needed:

7359ad4fc772bc355905ef8b4a4a7b44dcfc1ebe
2e5023f974dd94dfeec0554ce07d0544f9ce7638
e42ee773ffc12e38d596ce2aa016f0849c4e5ac6

Regards
Pierre-André


0001-fdo42286-strict-use-of-GetDataArea-and-strict-extens.patch
Description: application/mbox


0001-fdo42286-extend-down-but-also-shrink-if-cells-are-em.patch
Description: application/mbox


0001-fdo42286-extend-down-even-if-last-row-empty-but-a-co.patch
Description: application/mbox
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] [PATCH] fdo#42286, do not shrink the selected area

2011-11-29 Thread Pierre-André Jacquod

Hi Eike


Now you also changed bOnlyDown=false to bOnlyDown=true, which leads to
not include newly appended columns of an area.


half true: the condition is exactly that the newly appended column data 
touch by an angle the already defined area (like C3 to B2) and that all 
other cells below the area are empty.

All columns right/left of the area are filtered.


Why?
very bad reason: I did not really intended to commit this change yet. I 
wanted to ask you about it. But it seems I was too deeply thinking about 
it, I oversee my mixing. F**


less bad reason: If you activates the auto-filter, and append a column 
as mentioned above, you suddenly have columns filtered without seeing 
it, the drop-down at the top of the column not being present.


I will change it (due to point 1), except you oppose :- )


Grounded speculation: if user adds a column or row immediately adjacent
to a data area it is usually related to the already existing data and
she wants that to be included, maybe even doesn't know that earlier the
filter was setup using a selection.


A good point. On the other hand,this makes impossible to filter in the 
middle of data. But this case is very special.



Else, I have attached 3 patches for review touching this function:

* the first one make the flag onlyDown working also for shrinking... No 
reason that you can just extend down, but shrink on all direction? This 
seems to be more coherent with the flag activation.


* the second patch make the shrinking corresponding to the name of the 
function: GetDataArea: i.e. shrinks as long as the outer row/column is 
empty, and not just delete the last one since empty.


* the 3d one: just minor clean up: variable scope reduction and better 
documentation.


Thanks for all
best regards
Pierre-André
From cfd04dda7e441ffa3dcc5a21b6b8f87cbfda05b0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pierre-Andr=C3=A9=20Jacquod?= pjacq...@alumni.ethz.ch
Date: Tue, 29 Nov 2011 09:10:26 +0100
Subject: [PATCH 3/3] reduce scope of var and better comment of function GetDataArea

---
 sc/source/core/data/table1.cxx |   40 +---
 1 files changed, 21 insertions(+), 19 deletions(-)

diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx
index ce2051b..5de641f 100644
--- a/sc/source/core/data/table1.cxx
+++ b/sc/source/core/data/table1.cxx
@@ -741,17 +741,19 @@ bool ScTable::GetDataStart( SCCOL rStartCol, SCROW rStartRow ) const
 void ScTable::GetDataArea( SCCOL rStartCol, SCROW rStartRow, SCCOL rEndCol, SCROW rEndRow,
bool bIncludeOld, bool bOnlyDown ) const
 {
-// bIncludeOld = true ensure that the returned area contains at least the initial area,
-//  independently of the case if this area has empty rows / columns at its borders
-// bOnlyDown = true means extend the inputed area only down, i.e increase only rEndRow
+// return the smallest area containing at least all contiguous cells having data. This area
+// is a square containing also empty cells. It may shrink or extend the area given as input
+// Flags as modifiers:
+//
+// bIncludeOld = true ensure that the returned area contains at least the initial area,
+//   independently of the emptniess of rows / columns (i.e. does not allow shrinking)
+// bOnlyDown = true means extend / shrink the inputed area only down, i.e modifiy only rEndRow
+
 bool bLeft = false;
 bool bRight  = false;
 bool bTop = false;
 bool bBottom = false;
-bool bChanged;
-bool bFound;
-SCCOL i;
-SCROW nTest;
+bool bChanged = false;
 
 do
 {
@@ -782,12 +784,12 @@ void ScTable::GetDataArea( SCCOL rStartCol, SCROW rStartRow, SCCOL rEndCol, S
 
 if (rStartRow  0)
 {
-nTest = rStartRow-1;
-bFound = false;
-for (i=rStartCol; i=rEndCol  !bFound; i++)
+SCROW nTest = rStartRow-1;
+bool needExtend = false;
+for ( SCCOL i = rStartCol; i=rEndCol  !needExtend; i++)
 if (aCol[i].HasDataAt(nTest))
-bFound = true;
-if (bFound)
+needExtend = true;
+if (needExtend)
 {
 --rStartRow;
 bChanged = true;
@@ -798,12 +800,12 @@ void ScTable::GetDataArea( SCCOL rStartCol, SCROW rStartRow, SCCOL rEndCol, S
 
 if (rEndRow  MAXROW)
 {
-nTest = rEndRow+1;
-bFound = false;
-for (i=rStartCol; i=rEndCol  !bFound; i++)
+SCROW nTest = rEndRow+1;
+bool needExtend = false;
+for ( SCCOL i = rStartCol; i=rEndCol  !needExtend; i++)
 if (aCol[i].HasDataAt(nTest))
-bFound = true;
-if (bFound)
+needExtend = true;
+if (needExtend)
 {

Re: [Libreoffice] [PATCH] fdo#42286, do not shrink the selected area (2)

2011-11-29 Thread Pierre-André Jacquod

Hello,
sorry, I was sure there was more about it...but too early this morning, 
I could not sort out all points.



Now you also changed bOnlyDown=false to bOnlyDown=true, which leads to
not include newly appended columns of an area. Why?

by the way, this reflect the comment in

void ScDBData::ExtendDataArea(ScDocument* pDoc)
{
// Extend the DB area to include data rows immediately below.

which comment is from Kohei ( 9f9ff37f ) who toke this from a previous 
comment. Hence, the change would make the call be in line with the comment.


This is the original reason why I started to play with it and changed it 
like this, since comment and implementation were not coherent.


Regards
Pierre-André
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] final and override

2011-11-28 Thread Pierre-André Jacquod

Hello,


However, given that override and final will only make it into GCC 4.7
(according to http://wiki.apache.org/stdcxx/C++0xCompilerSupport), it


according to gcc.gnu.org too..

but since it seems that MSCV (according the same wiki) supports it / 
will support it, why not just wait a bit and then use it directly, 
setting a minimal compiler version ? This would allow a cleaner code, 
not having to take into account before implementation status. (would 
also be valid for other major features ) Most probably a too harsh 
approach ?

regards
Pierre-André

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


[Libreoffice-commits] .: sc/source

2011-11-27 Thread Pierre-André Jacquod
 sc/source/core/data/table1.cxx |7 +--
 sc/source/core/tool/dbdata.cxx |2 +-
 2 files changed, 6 insertions(+), 3 deletions(-)

New commits:
commit 88611e702a18d2a281c22b6d9c28e881be3df223
Author: Pierre-André Jacquod pjacq...@alumni.ethz.ch
Date:   Sun Nov 27 18:17:32 2011 +0100

fdo#42286 call correctly GetDataArea to avoid unwanted shrinking

GetDataArea flags documented and call from ExtendedDataArea adapted.

diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx
index b746ffc..3cf1ca1 100644
--- a/sc/source/core/data/table1.cxx
+++ b/sc/source/core/data/table1.cxx
@@ -741,9 +741,12 @@ bool ScTable::GetDataStart( SCCOL rStartCol, SCROW 
rStartRow ) const
 void ScTable::GetDataArea( SCCOL rStartCol, SCROW rStartRow, SCCOL rEndCol, 
SCROW rEndRow,
bool bIncludeOld, bool bOnlyDown ) const
 {
-bool bLeft   = false;
+// bIncludeOld = true ensure that the returned area contains at least the 
initial area,
+//  independently of the case if this area has empty rows / 
columns at its borders
+// bOnlyDown = true means extend the inputed area only down, i.e increase 
only rEndRow
+bool bLeft = false;
 bool bRight  = false;
-bool bTop= false;
+bool bTop = false;
 bool bBottom = false;
 bool bChanged;
 bool bFound;
diff --git a/sc/source/core/tool/dbdata.cxx b/sc/source/core/tool/dbdata.cxx
index e897630..7014601 100644
--- a/sc/source/core/tool/dbdata.cxx
+++ b/sc/source/core/tool/dbdata.cxx
@@ -548,7 +548,7 @@ void ScDBData::ExtendDataArea(ScDocument* pDoc)
 // Extend the DB area to include data rows immediately below.
 SCCOL nCol1a = nStartCol, nCol2a = nEndCol;
 SCROW nRow1a = nStartRow, nRow2a = nEndRow;
-pDoc-GetDataArea(nTable, nCol1a, nRow1a, nCol2a, nRow2a, false, false);
+pDoc-GetDataArea(nTable, nCol1a, nRow1a, nCol2a, nRow2a, true, true);
 nEndRow = nRow2a;
 }
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: [Libreoffice] [PATCH] fdo#42286, do not shrink the selected area

2011-11-27 Thread Pierre-André Jacquod

Hi,


BUT this is a workaround, to compensate the not so correct behaviour
of GetDataArea :-(


The behaviour in bINcludeOld = false seems me strange (ergh I think 
wrong but you told me to be cautious), since it removes from the side 
of the area that has not yet been extended above the last line / column, 
if empty.
The implementation seems to me flawed, since it does it even if no 
extension has been possible (e.g rEndRow = MAXROW), and suppress just 
ONE line, if empty. What about the new last one ? if also empty, we 
are exactly in the same situation as before, just a bit smaller. Hence 
it seems me that the original programmer (12 years ago) just assumed 
that only the last line / column could be empty, not e.g. the last 4 rows.



I wouldn't say it's wrong unless I checked the original intention behind
that code when GetDataArea() is called with bIncludeOld=false, maybe
it's just the call in ExtendDataArea() that should pass true instead?


Done, you're right.
Finally, changed the call of the flags and documented the flags' meaning.
If you could cherry-pick 88611e702a18d2 for 3.4.5, would be nice.
Many thanks


desired effect. Further some tests have shown me that the behaviour
(regarding area) is not the same, depending if the filter is
activated with Data-Filter-AutoFilter or Standard filter. I fear
some parts will need to be quite overhauled.


And the difference exactly is ...?


Visually: the standard filter adapts and shows the selected area at 
activation of the filter, the auto-filter does not reflect the fact that 
it will take into account a wider area. This area extension happens only 
when the drop-down button is activated and the list of possible value is 
calculated...  and the area extended.


More subtly, this leads to 2 different ranges stored within the file if 
you do

select some area but not all data, activate standard filter , save

or  if you do  exactly the same  with same data / input except 
activating auto-filter instead of standard filter.


Out of subject: from a user perspective, I am not convinced from te fact 
that the filter is allowed to change an area that has been user-defined. 
No problem to auto-extend an area if auto-determined. But if a user 
takes the time to do the area, this should be holly. But this point 
belongs to the user-interface list I guess...


Best regards
Pierre-André
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice] [PATCH] fdo#42286, do not shrink the selected area

2011-11-24 Thread Pierre-André Jacquod

hello,
here attached an new patch (hopefully wiser) to solve the mentioned bug. 
This  ensure that the call to ExtendDataArea does as commented in the 
code sc/source/core/tool/dbdata.cxx :

// Extend the DB area to include data rows immediately below.
and does not shrink the original area... So having a smaller area after 
the function is clearly wrong.


If you agree, I will push it to master.

BUT this is a workaround, to compensate the not so correct behaviour of 
GetDataArea :-(


I did this patch in order to bring the correction in time for 3.5.0  
3.4.5, but I agree, that this is suppressing a symptom and not the root 
cause.


About the root cause: I am still studing the code of the both mentioned 
functions and their integration with filters and filtered areas. Before 
touching it, I would like to define what should be the desired effect. 
Further some tests have shown me that the behaviour (regarding area) is 
not the same, depending if the filter is activated with 
Data-Filter-AutoFilter or Standard filter. I fear some parts will need 
to be quite overhauled.


As said, won't be ready for 3.5, so first this short term solution.

Thanks toa all for having helped me so far.
Best regards
Pierre-André


0001-fdo-42286-do-not-shrink-the-filtered-area-when-calli.patch
Description: application/mbox
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] [PATCH] fdo 42286 in calc solved ?

2011-11-15 Thread Pierre-André Jacquod

Hello,

Thanks for your hints. It took some times, but know I have clearly 
identified the problem , but I do not if my solution is right or could 
create more problems.


In short, the problem is that GetAreadData is called each time the 
filter determines its values, instead of using the current area. This 
does not have influence, as long as your selection area does not end 
with empties rows or empties columns.


But this behaviour produce a wrong result as soon as your filtered area 
ends with empties rows, and as special case, if you select all rows, 
since it decreases the area of 1 row if the last row is empty.


Basically this happens with the call of function ExtendDataArea. This 
originates from documen3.cxx, function GetFilterEntries line 1390 (the 
call itself is at line 1398). (more details below, if needed)


My solution: suppress this call...
I have tested it and it seems to work. I did not managed to find a case 
where something is broken with the filter..


But it seems me too simple.
Could you check this before I push it ?

If Ok, would you like then to approve it  cherry-pick it to 3.4.5 ?

Thanks  best regards
Pierre-André

ps: if what I did is right, I will then update the bug ticket

---

What happens?
As I understand after debugging and following the logic, each time the 
filter is activated (it is an auto-filter) it tries do determine the 
data range when it search for its value to show in the filter drop-down.


For that it searches the biggest contiguous area of data, as when 
applying the filter without selection.


Except the fact that here it goes wrong, since an area has already 
selected (either manually or stored as table:database-range ... tag.
which contains and finish (important in this analysis) with several 
empty rows (columns would produce the same problem). And it tries to fit 
the Area with the GetAreaData algorithm, starting with a predefined 
area. The result: it does not extend it (next row is emtpy), but 
thinking he as extended the area of one row to far (this the last row 
int the area is empty), it reduce the selected area of one row.


And this produce the strange comportment described. (more detailed 
analysis below).


Each time the filter value is changed , the function 
ScTAble::GetAreaData (in  sc/source/core/data/table1.cxx, line 740 in my 
check-out) is called.
At the end of the called function, there is a check: if the last row is 
empty, then the Area is reduced by one, deacreasing its last row value 
by 1 (line 835/836)

if (!bFound)
--rEndRow;

This is obviously wrong, especially if you select e.g the 3 first 
columns (completely) and then apply auto-filter. Since empty lines *are* 
part of the selection... and not only the last one is empty. So each 
time I change the filter value, I reduce by 1 the last row number...



I see that the content.xml ends with some strange empty row

It is ill-formatted by the user ;-)  Cells in columns A:G down to the



However, strange are the spurious entries with
table:visibility=filter


no, this is the result of this filter changes coupled with the order of 
ALL value filter or partial filters.


This also creates a mess with the storage of
table:database-range table:name=__Anonymous_Sheet_DB__0 
reducing the area within the range, depending when you save your file...



From 568c0635089964488a05043d7422eb40be15ccaf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pierre-Andr=C3=A9=20Jacquod?= pjacq...@alumni.ethz.ch
Date: Tue, 15 Nov 2011 20:55:53 +0100
Subject: [PATCH] fdo#42286 do not change selection area when determining filter values

Just use the current area, does not redetermine it in order to
find the list of values for drop-down of the filter.
---
 sc/source/core/data/documen3.cxx |1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/sc/source/core/data/documen3.cxx b/sc/source/core/data/documen3.cxx
index 273af5f..14b0655 100644
--- a/sc/source/core/data/documen3.cxx
+++ b/sc/source/core/data/documen3.cxx
@@ -1395,7 +1395,6 @@ bool ScDocument::GetFilterEntries(
 ScDBData* pDBData = pDBCollection-GetDBAtCursor(nCol, nRow, nTab, false);  //!??
 if (pDBData)
 {
-pDBData-ExtendDataArea(this);
 SCTAB nAreaTab;
 SCCOL nStartCol;
 SCROW nStartRow;
-- 
1.7.3.4

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


[Libreoffice] some hints needed for fdo 42286 in calc

2011-11-01 Thread Pierre-André Jacquod

hello,

I am trying to debug fdo 42286 in calc. It has to do with autofilter, 
where some empty lines (rows) are shown despite the filter criteria that 
is set. (and a strange filter behaviour).


As entry point, I found sc/.. tools/queryparam.cxx  dbdata.cxx but it 
seems that there all is Ok.


As I understand it, there the query is just prepared but I am not able 
to find the code where the actual calculation for displaying it is done. 
could someone hint me / give me a search criteria ?


Just an additional remark: disassembling the bug's attached file, I 
see that the content.xml ends with some strange empty row definitions... 
But this still does not justify to appear witin the filter in my 
opinion. Or does this indicates the file is ill formatted ? (sorry, I do 
not know the oasis spec)


table:table-row table:style-name=ro1 
table:number-rows-repeated=1048532

table:table-cell table:number-columns-repeated=1024/
/table:table-row

table:table-row table:style-name=ro1 
table:visibility=filtertable:table-cell 
table:number-columns-repeated=1024/

/table:table-row

table:table-row table:style-name=ro1
table:table-cell table:number-columns-repeated=1024/
/table:table-row

table:table-row table:style-name=ro1 
table:visibility=filtertable:table-cell 
table:number-columns-repeated=1024/

/table:table-row

table:table-row table:style-name=ro1
table:table-cell table:number-columns-repeated=1024/
/table:table-row

table:table-row table:style-name=ro1 table:visibility=filter 
table:number-rows-repeated=5

table:table-cell table:number-columns-repeated=1024/
/table:table-row

etc all of this kind

thanks for a hint
regards

Pierre-André
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] some hints needed for fdo 42286 in calc

2011-11-01 Thread Pierre-André Jacquod

hello,


and query information. The query is executed in ScDBDocFunc::Query and
related functions.


thanks I will look there  come back if needed


P.S. Do you know if this is a regression against 3.3? Then it might be


No 3.3 available to test (and a bit short of place on HD).

But happens on

LibreOffice 3.4.2
OOO340m1 (Build:1206)
(OpenSuse 11.4 distribution)

and on master, build by myself (also OpenSuse 3.4.2)

regards
Pierre-André
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] Declarations after statements

2011-10-10 Thread Pierre-André Jacquod

Hello,


Declarations after statements are possible only in C99. And MSVC does
not support C99 (refrain from bitching here, please).


sorry Tor, I was not enthusiasm, just systematic and from *xes world.
... and I am - almost - too young to know there was a C89 before...

If time allows, I will try during the dark winter days to compile with 
this strange outdated software called , kind of a black power as I 
heard, MSVC 2010 :-)


regards
Pierre-André
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] dmake/win95: deprecated directory ?

2011-10-09 Thread Pierre-André Jacquod

Hello,

dmake is 3rd-party software,

thanks,

with One git, not being familiar with all part of the code and the 
structure, not always easy to know what is LO and 3rd-party.


Should it not belongs to external/ ? Or what is the semantic there ?

Or would it make sense to have at the top level a directory (like 
3rdparty) to put all these in - I guess zlib, lucene or m4 are the same 
kind of code ?)


Would be easier to understand the structure..:-)

Make no sense? not possible/to hard due to dependencies ?
Should (if time and my *knowledge* allow) have a try at this ? Or lost 
of time ?


Regards
Pierre-André
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] oox/source/drawingml/customshapepresets.cxx is just too much for gcc

2011-10-09 Thread Pierre-André Jacquod

On 10/07/2011 03:51 PM, Norbert Thiebaud wrote:

2011/10/7 Marc-André Laverdièremarc-an...@atc.tcs.com:

Wow, I really missed the 'big debate' :)

me too :- )


- I don't think we can expect developers to run a build before each
push,


Yes we absolutely can expect that. it is actually a bare minimum !
rebase, clean build Ok, rebase and build done on Linux, all ok. (with 
about 70 small patches of warning reduction)


Then

Push ...
read mails, deleted some recurrent Windows tinderboxes mails  - and read 
among others this one :- )



AND keep an eye on the tinderboxes. usually within 20 minutes
you should have the result of a tinderbox run with your pushed change
in it (except windows so far).


look at my trash, see that this time I got also tinderboxes mails from 
MacOSX... Looked at log (since I have read this mail), did not 
understand from a possible guilty commit why this should break MacOSX 
compilation, try a best guess revert and see a green rebuild.


And now fully convinced of the utility of tinderboxes, and of the need 
to take care of them in respect of other platforms that I do not have.


Just to thanks tinderboxes maintainers
Best regards
Pierre-André
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] master build fails in basegfx

2011-10-09 Thread Pierre-André Jacquod

hello,

On 10/09/2011 02:04 PM, Jean-Baptiste Faure wrote:

Le 09/10/2011 09:18, Matúš Kukan a écrit :

On 9 October 2011 09:13, Jean-Baptiste Faurejbf.fa...@orange.fr :

I try to build the master and I get an error in building basegfx.


git revert 49861a0246547554e285b4d14f049a28addd4ddc

But I can't reproduce. Feel free to revert.


reverting this commit make the build successful. But it is strange.


seems to break also different tinderboxes (
http://tinderbox.libreoffice.org/MASTER/status.html )


I probably did something wrong when I duplicated my master in bugfix.


or some parameters for autogen where not the same between your two dir,
or not done a clean build (from scratch) after integrating it.

One of my commits (see  78b1cc1a08d71 ) also broke some tinderboxes, but
I did not got the managed to reproduce locally the problem that concern
you. (some --enable that I did not have, most probably)

regards
Pierre-André
ps: fixing better than reverting, if possible..:- )
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] .: vcl/aqua

2011-10-07 Thread Pierre-André Jacquod
 vcl/aqua/source/gdi/salatsuifontutils.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 78b1cc1a08d712212152a1e57400c8b07654e471
Author: Pierre-André Jacquod pjacq...@alumni.ethz.ch
Date:   Fri Oct 7 20:40:01 2011 +0200

Revert cppcheck scope reduction in vcl/..salatsuifontutils.cxx

This reverts commit e45b962f49829d5c60c913383b2132b579af3fab.
this is the most probale cause of the breakage on MacOSX tinderbox.
Do not really understand why it should break, but I do not see other
potential guilty commits... No MacOSX at hand... so revert and see

diff --git a/vcl/aqua/source/gdi/salatsuifontutils.cxx 
b/vcl/aqua/source/gdi/salatsuifontutils.cxx
index d9d2c8e..e124b3c 100644
--- a/vcl/aqua/source/gdi/salatsuifontutils.cxx
+++ b/vcl/aqua/source/gdi/salatsuifontutils.cxx
@@ -237,6 +237,7 @@ static bool GetDevFontAttributes( ATSUFontID nFontID, 
ImplDevFontAttributes rDF
 return false;
 int nBestNameValue = 0;
 int nBestStyleValue = 0;
+FontLanguageCode eBestLangCode = 0;
 const FontLanguageCode eUILangCode = 
Application::GetSettings().GetUILanguage();
 typedef std::vectorchar NameBuffer;
 NameBuffer aNameBuffer( 256 );
@@ -332,7 +333,7 @@ static bool GetDevFontAttributes( ATSUFontID nFontID, 
ImplDevFontAttributes rDF
 {
 // get the best family name
 nBestNameValue = nNameValue;
-FontLanguageCode eBestLangCode = eFontNameLanguage;
+eBestLangCode = eFontNameLanguage;
 rDFA.maName = aUtf16Name;
 }
 break;
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice] dmake/win95: deprecated directory ?

2011-10-06 Thread Pierre-André Jacquod

hello,
I found a directory that seems to be deprecated since win95 is not 
supported anymore.
There is another directory: dmake/winnt which seems to be more or less 
the clone of dmake/win95.


Since I am not able to compile under windows, -hence not able to check 
what I would break -  I mention it here, if someone wants to clean this 
directory and its dependencies... or move them to dmake/winnt if still 
needed.


regards
Pierre-André
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice] scope of variable reduction, cppcheck-error free build and new bugs

2011-10-06 Thread Pierre-André Jacquod

Hello,
since I had free time, I have taken over to eliminate the scope 
reduction warning from cppcheck in order to reduce the noise by checks.


This has been done almost successfully, about 10 such warnings are still 
available due to #ifdefn or macros. This also allowed me to reduce other 
warnings (like hiding of var) and to find some errors introduced by 
recent changes.


Every change has been checked and done manually, finding also some 
false positives (and one false negative). I have tested several clean 
build with different options, discovering so some too hard scope 
reduction (some #ifdefn masking some if statement). But I guess there 
are - sadly - some configurations where I did not notice that I broke 
something. (Murphy's Law lurks somewhere near us). So my apologies in 
advance.


I will push it during the week-end, once I am finished with rebasing and 
after a last clean build.


If some build option is broken, just revert the concerned commit: they 
are on purpose small and isolated. The log indicates the top directory 
and when possible the file where (the) change(s) has been done.


Regards
Pierre-André
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] .: 13 commits - autodoc/source connectivity/workben rsc/source slideshow/source tools/source vcl/source

2011-09-26 Thread Pierre-André Jacquod
 autodoc/source/display/html/hdimpl.cxx |   11 -
 autodoc/source/parser/cpp/cx_c_pp.cxx  |4 
 connectivity/workben/testmoz/main.cxx  |2 
 rsc/source/res/rscflag.cxx |   22 +-
 slideshow/source/engine/OGLTrans/unx/OGLTrans_TransitionerImpl.cxx |2 
 tools/source/generic/poly.cxx  |   14 -
 vcl/source/fontsubset/cff.cxx  |2 
 vcl/source/fontsubset/sft.cxx  |   31 ++-
 vcl/source/gdi/bitmap3.cxx |   25 +-
 vcl/source/gdi/outdev2.cxx |   10 -
 vcl/source/gdi/outdev3.cxx |9 -
 vcl/source/window/toolbox.cxx  |   90 
+-
 12 files changed, 83 insertions(+), 139 deletions(-)

New commits:
commit 1f1607a5e6ea2b88f072ba2109522de671f20dbf
Author: Pierre-André Jacquod pjacq...@alumni.ethz.ch
Date:   Sat Sep 24 18:08:14 2011 +0200

cppcheck: reduce scope of var in rsc rscflag.cxx

diff --git a/rsc/source/res/rscflag.cxx b/rsc/source/res/rscflag.cxx
index aeaf2fd..6e224fc 100644
--- a/rsc/source/res/rscflag.cxx
+++ b/rsc/source/res/rscflag.cxx
@@ -69,10 +69,10 @@ sal_uInt32 RscFlag::Size()
 */
 ERRTYPE RscFlag::SetNotConst( const RSCINST  rInst, Atom nConst )
 {
-sal_uInt32 i = 0, nFlag = 0;
+sal_uInt32 i = 0;
 
 if( nEntries != (i = GetConstPos( nConst )) ){
-nFlag = 1  (i % (sizeof( sal_uInt32 ) * 8) );
+sal_uInt32 nFlag = 1  (i % (sizeof( sal_uInt32 ) * 8) );
 i = i / (sizeof( sal_uInt32 ) * 8);
 ((RscFlagInst *)rInst.pData)[ i ].nFlags = ~nFlag;
 ((RscFlagInst *)rInst.pData)[ i ].nDfltFlags = ~nFlag;
@@ -89,10 +89,10 @@ ERRTYPE RscFlag::SetNotConst( const RSCINST  rInst, Atom 
nConst )
 */
 ERRTYPE RscFlag::SetConst( const RSCINST  rInst, Atom nConst, sal_Int32 
/*nVal*/ )
 {
-sal_uInt32 i = 0, nFlag = 0;
+sal_uInt32 i = 0;
 
 if( nEntries != (i = GetConstPos( nConst )) ){
-nFlag = 1  (i % (sizeof( sal_uInt32 ) * 8) );
+sal_uInt32 nFlag = 1  (i % (sizeof( sal_uInt32 ) * 8) );
 i = i / (sizeof( sal_uInt32 ) * 8);
 ((RscFlagInst *)rInst.pData)[ i ].nFlags |= nFlag;
 ((RscFlagInst *)rInst.pData)[ i ].nDfltFlags = ~nFlag;
@@ -129,7 +129,6 @@ RSCINST RscFlag::CreateBasic( RSCINST * pInst )
 RSCINST RscFlag::Create( RSCINST * pInst, const RSCINST  rDflt, sal_Bool 
bOwnClass )
 {
 RSCINST aInst = CreateBasic( pInst );
-sal_uInt32  i = 0;
 
 if( !bOwnClass  rDflt.IsInst() )
 bOwnClass = rDflt.pClass-InHierarchy( this );
@@ -138,7 +137,7 @@ RSCINST RscFlag::Create( RSCINST * pInst, const RSCINST  
rDflt, sal_Bool bOwnCl
 memmove( aInst.pData, rDflt.pData, Size() );
 else
 {
-for( i = 0; i  Size() / sizeof( RscFlagInst ); i++ )
+for( sal_uInt32 i = 0; i  Size() / sizeof( RscFlagInst ); i++ )
 {
 ((RscFlagInst *)aInst.pData)[ i ].nFlags = 0;
 ((RscFlagInst *)aInst.pData)[ i ].nDfltFlags = 0x;
@@ -157,13 +156,14 @@ RSCINST RscFlag::CreateClient( RSCINST * pInst, const 
RSCINST  rDfltI,
sal_Bool bOwnClass, Atom nConstId )
 {
 RSCINST aInst = CreateBasic( pInst );
-sal_uInt32 i = 0, nFlag = 0;
+sal_uInt32 i = 0;
 
 if( !bOwnClass  rDfltI.IsInst() )
 bOwnClass = rDfltI.pClass-InHierarchy( this );
 
-if( nEntries != (i = GetConstPos( nConstId )) ){
-nFlag = 1  (i % (sizeof( sal_uInt32 ) * 8) );
+if( nEntries != (i = GetConstPos( nConstId )) )
+{
+sal_uInt32 nFlag = 1  (i % (sizeof( sal_uInt32 ) * 8) );
 i = i / (sizeof( sal_uInt32 ) * 8);
 if( bOwnClass ){
 ((RscFlagInst *)aInst.pData)[ i ].nFlags =
@@ -251,13 +251,11 @@ sal_Bool RscFlag::IsValueDefault( const RSCINST  rInst, 
CLASS_DATA pDef,
 
 sal_Bool RscFlag::IsValueDefault( const RSCINST  rInst, CLASS_DATA pDef )
 {
-sal_uInt32 i = 0;
-
 if( pDef ){
 sal_uInt32  Flag = 0, nIndex = 0;
 
 Flag = 1;
-for( i = 0; i  nEntries; i++ ){
+for( sal_uInt32 i = 0; i  nEntries; i++ ){
 nIndex = i / (sizeof( sal_uInt32 ) * 8);
 if( (((RscFlagInst *)rInst.pData)[ nIndex ].nFlags  Flag)
   != (((RscFlagInst *)pDef)[ nIndex ].nFlags  Flag)  )
commit d04bd631731c45627caa4b7f5dc4aea2c4fa9f9e
Author: Pierre-André Jacquod pjacq...@alumni.ethz.ch
Date:   Sat Sep 24 17:58:01 2011 +0200

cppcheck: reduce scope of var in tools/ poly.cxx

diff --git a/tools/source/generic/poly.cxx b/tools/source/generic/poly.cxx
index 419575d..4ba1ef0 100644
--- 

Re: [Libreoffice] [PUSHED][patch] memset used on struc with std::vector / Windows code

2011-09-13 Thread Pierre-André Jacquod

Hello,


That should happen in a DdeInstData ctor instead.


I intended to do something easier:
struct DdeInstData
{
short x;

DdeInstData(); // and of course implementing this
}


I've moved it into the ctor now.


Thanks, I was not able to react very quickly, making this during free 
time ... and on Linux. Sorry.


Just for my education [answer is optional]:

The fact to change to class and use boost::noncopyable is an improvement 
not related to this point I guess, since before the copy-ctor and copy 
assignment would have worked with the struct.


Or did I missed something?

Thanks.

regards
Pierre-André
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] Cppcheck defect when @ is present

2011-09-11 Thread Pierre-André Jacquod

Hello,


  What's the best thing to do :
- to keep objective C++ parts ?
- to replace objective C++ by plain (with or without boost) C++ ?


for me there are already too many languages and flavour of languages. I 
would stay with  plain C++, not adding objective C++ on top


Just my feelings
regards
Pierre-André
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice] [patch] memset used on struc with std::vector / Windows code

2011-09-11 Thread Pierre-André Jacquod

hello,
I allow me to send also this patch (I should really find out a Windows 
box in order to compile / test by myself).


In short: since
a39d4eae Remove DECLARE_LIST(DdeConnections,DdeConnection*)

the struct DdeInstData contains a std::vector, but was initialized with 
memset( pData,0,sizeof(DdeInstData) )


So I tried to have a consistent initialization with the new struct layout.

regards
Pierre-André



0007-wrong-initialization-of-DdeInstData-with-memset-desp.patch
Description: application/mbox
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] [PATCH] some cleaning for Windows part - need a review

2011-09-10 Thread Pierre-André Jacquod

Hello,


I will have a look at your patches on Monday, unless somebody beats me
to it during the weekend.


Thanks,
based on some remarks, here exactly the same patches, but with improved 
commit comments. Will be probably better to integrate these.


Regards
Pierre-André
From 94bed68189f2298d03972febeb28ebafeadf7d91 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pierre-Andr=C3=A9=20Jacquod?= pjacq...@alumni.ethz.ch
Date: Fri, 9 Sep 2011 21:58:21 +0200
Subject: [PATCH 6/6] [cppchecker] deleted unread var and code in setup_native, vistaspecial.cxx

and simplified coding after that since the logic is not needed
anymore.
---
 .../customactions/shellextensions/vistaspecial.cxx |   60 ++--
 1 files changed, 5 insertions(+), 55 deletions(-)

diff --git a/setup_native/source/win32/customactions/shellextensions/vistaspecial.cxx b/setup_native/source/win32/customactions/shellextensions/vistaspecial.cxx
index aede073..40ff772 100644
--- a/setup_native/source/win32/customactions/shellextensions/vistaspecial.cxx
+++ b/setup_native/source/win32/customactions/shellextensions/vistaspecial.cxx
@@ -96,7 +96,6 @@ static BOOL RemoveCompleteDirectory( std::_tstring sPath )
 {
 bool bDirectoryRemoved = true;
 
-std::_tstring mystr;
 std::_tstring sPattern = sPath + TEXT(\\) + TEXT(*.*);
 WIN32_FIND_DATA aFindData;
 
@@ -114,9 +113,6 @@ static BOOL RemoveCompleteDirectory( std::_tstring sPath )
 {
 std::_tstring sFileName = aFindData.cFileName;
 
-mystr = Current short file:  + sFileName;
-// MessageBox(NULL, mystr.c_str(), Current Content, MB_OK);
-
 if (( strcmp(sFileName.c_str(),sCurrentDir.c_str()) != 0 ) 
 ( strcmp(sFileName.c_str(),sParentDir.c_str()) != 0 ))
 {
@@ -124,31 +120,11 @@ static BOOL RemoveCompleteDirectory( std::_tstring sPath )
 
 if ( aFindData.dwFileAttributes == FILE_ATTRIBUTE_DIRECTORY )
 {
-bool fSuccess = RemoveCompleteDirectory(sCompleteFileName);
-if ( fSuccess )
-{
-mystr = Successfully removed content of dir  + sCompleteFileName;
-// MessageBox(NULL, mystr.c_str(), Removed Directory, MB_OK);
-}
-else
-{
-mystr = An error occurred during removing content of  + sCompleteFileName;
-// MessageBox(NULL, mystr.c_str(), Error removing directory, MB_OK);
-}
+RemoveCompleteDirectory(sCompleteFileName);
 }
 else
 {
-bool fSuccess = DeleteFile( sCompleteFileName.c_str() );
-if ( fSuccess )
-{
-mystr = Successfully removed file  + sCompleteFileName;
-// MessageBox(NULL, mystr.c_str(), Removed File, MB_OK);
-}
-else
-{
-mystr = An error occurred during removal of file  + sCompleteFileName;
-// MessageBox(NULL, mystr.c_str(), Error removing file, MB_OK);
-}
+DeleteFile( sCompleteFileName.c_str() );
 }
 }
 
@@ -162,17 +138,9 @@ static BOOL RemoveCompleteDirectory( std::_tstring sPath )
 // RemoveDirectory is only successful, if the last handle to the directory is closed
 // - first removing content - closing handle - remove empty directory
 
-bool fRemoveDirSuccess = RemoveDirectory(sPath.c_str());
 
-if ( fRemoveDirSuccess )
-{
-mystr = Successfully removed dir  + sPath;
-// MessageBox(NULL, mystr.c_str(), Removed Directory, MB_OK);
-}
-else
+if( !( RemoveDirectory(sPath.c_str()) ) )
 {
-mystr = An error occurred during removal of empty directory  + sPath;
-// MessageBox(NULL, mystr.c_str(), Error removing directory, MB_OK);
 bDirectoryRemoved = false;
 }
 }
@@ -189,8 +157,6 @@ extern C UINT __stdcall RenamePrgFolder( MSIHANDLE handle )
 std::_tstring sRenameSrc = sOfficeInstallPath + TEXT(program);
 std::_tstring sRenameDst = sOfficeInstallPath + TEXT(program_old);
 
-//MessageBox(NULL, sRenameSrc.c_str(), INSTALLLOCATION, MB_OK);
-
 bool bSuccess = MoveFile( sRenameSrc.c_str(), sRenameDst.c_str() );
 if ( !bSuccess )
 {
@@ -205,13 +171,6 @@ extern C UINT __stdcall RenamePrgFolder( MSIHANDLE handle )
 }
 }
 
-#if 0
-if ( !bSuccess )
-MessageBox(NULL, Renaming folder failed, RenamePrgFolder, MB_OK);
-else
-MessageBox(NULL, Renaming folder successful, RenamePrgFolder, MB_OK);
-#endif
-
 return ERROR_SUCCESS;
 }
 
@@ -220,25 +179,16 @@ extern C UINT __stdcall RemovePrgFolder( MSIHANDLE handle 

[Libreoffice] [PATCH] some cleaning for Windows part - need a review

2011-09-09 Thread Pierre-André Jacquod

hello,
liking systematic work, I was cleaning the unreadVariable warning from 
cppchecker.:-) This also let improve my programming knowledge and style...


Here a bunch of changes that touch only Win product,... that I am unable 
to test, having only unix.


Neverless, I did it would it be to reduce the warning noise (also some 
real coding error are popping out sometimes...) Could someone at least 
import and compile it with a Windows box?


By the way, just a question: from which version is Windows supported? 
some function names and comment let think me that some part could be 
deprecated ? (see example below)


Thanks and regards
Pierre-André

static BOOL MoveFileEx9x( LPCSTR lpExistingFileNameA, LPCSTR 
lpNewFileNameA, DWORD dwFlags )

{
BOOLfSuccess = FALSE;   // assume failure

// Windows 9x has a special mechanism to move files after reboot
From 54384140202fb9446b735d6bd5a08b351dc1a2b7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pierre-Andr=C3=A9=20Jacquod?= pjacq...@alumni.ethz.ch
Date: Fri, 9 Sep 2011 21:58:21 +0200
Subject: [PATCH 6/6] [cppchecker] unreadVar warning - deleted unread variable

and simplified coding after that since the logic is not needed
anymore.
---
 .../customactions/shellextensions/vistaspecial.cxx |   60 ++--
 1 files changed, 5 insertions(+), 55 deletions(-)

diff --git a/setup_native/source/win32/customactions/shellextensions/vistaspecial.cxx b/setup_native/source/win32/customactions/shellextensions/vistaspecial.cxx
index aede073..40ff772 100644
--- a/setup_native/source/win32/customactions/shellextensions/vistaspecial.cxx
+++ b/setup_native/source/win32/customactions/shellextensions/vistaspecial.cxx
@@ -96,7 +96,6 @@ static BOOL RemoveCompleteDirectory( std::_tstring sPath )
 {
 bool bDirectoryRemoved = true;
 
-std::_tstring mystr;
 std::_tstring sPattern = sPath + TEXT(\\) + TEXT(*.*);
 WIN32_FIND_DATA aFindData;
 
@@ -114,9 +113,6 @@ static BOOL RemoveCompleteDirectory( std::_tstring sPath )
 {
 std::_tstring sFileName = aFindData.cFileName;
 
-mystr = Current short file:  + sFileName;
-// MessageBox(NULL, mystr.c_str(), Current Content, MB_OK);
-
 if (( strcmp(sFileName.c_str(),sCurrentDir.c_str()) != 0 ) 
 ( strcmp(sFileName.c_str(),sParentDir.c_str()) != 0 ))
 {
@@ -124,31 +120,11 @@ static BOOL RemoveCompleteDirectory( std::_tstring sPath )
 
 if ( aFindData.dwFileAttributes == FILE_ATTRIBUTE_DIRECTORY )
 {
-bool fSuccess = RemoveCompleteDirectory(sCompleteFileName);
-if ( fSuccess )
-{
-mystr = Successfully removed content of dir  + sCompleteFileName;
-// MessageBox(NULL, mystr.c_str(), Removed Directory, MB_OK);
-}
-else
-{
-mystr = An error occurred during removing content of  + sCompleteFileName;
-// MessageBox(NULL, mystr.c_str(), Error removing directory, MB_OK);
-}
+RemoveCompleteDirectory(sCompleteFileName);
 }
 else
 {
-bool fSuccess = DeleteFile( sCompleteFileName.c_str() );
-if ( fSuccess )
-{
-mystr = Successfully removed file  + sCompleteFileName;
-// MessageBox(NULL, mystr.c_str(), Removed File, MB_OK);
-}
-else
-{
-mystr = An error occurred during removal of file  + sCompleteFileName;
-// MessageBox(NULL, mystr.c_str(), Error removing file, MB_OK);
-}
+DeleteFile( sCompleteFileName.c_str() );
 }
 }
 
@@ -162,17 +138,9 @@ static BOOL RemoveCompleteDirectory( std::_tstring sPath )
 // RemoveDirectory is only successful, if the last handle to the directory is closed
 // - first removing content - closing handle - remove empty directory
 
-bool fRemoveDirSuccess = RemoveDirectory(sPath.c_str());
 
-if ( fRemoveDirSuccess )
-{
-mystr = Successfully removed dir  + sPath;
-// MessageBox(NULL, mystr.c_str(), Removed Directory, MB_OK);
-}
-else
+if( !( RemoveDirectory(sPath.c_str()) ) )
 {
-mystr = An error occurred during removal of empty directory  + sPath;
-// MessageBox(NULL, mystr.c_str(), Error removing directory, MB_OK);
 bDirectoryRemoved = false;
 }
 }
@@ -189,8 +157,6 @@ extern C UINT __stdcall RenamePrgFolder( MSIHANDLE handle )
 std::_tstring sRenameSrc = sOfficeInstallPath + TEXT(program);
 std::_tstring sRenameDst = sOfficeInstallPath + TEXT(program_old);
 

[Libreoffice] code simplification: please logic review, to be sure

2011-08-26 Thread Pierre-André Jacquod

Hello,
I am trying to wipe some unneeded calls and I see the following:

while(  )
{
-
SwFrm* pFrm;
if( 0 != ( pONd = aIdx.GetNode().GetOLENode() ) 
aName.Equals( pONd-GetChartTblName() ) 
0 != ( pFrm = pONd-getLayoutFrm( rVSh.GetLayout() ) ) )
{
}
...
}

knowing that pFrm is never used execpt in the comparision, I wanted to 
simplify to :

   0 != ( pONd-getLayoutFrm( rVSh.GetLayout() )
since the return value of the operator= should be the same as the right 
operand.


But this basically, this just ensure that the return value is not NULL 
(comparing the pointer SwFrm* with 0 )


So I though the final version to be:
if( 0 != ( pONd = aIdx.GetNode().GetOLENode() ) 
aName.Equals( pONd-GetChartTblName() ) 
pONd-getLayoutFrm( rVSh.GetLayout() )
{
}

Did I missed something with my logic ?

The code is from line 145 of sw/source/core/doc/docchart.cxx

Thanks a lot for your feed-back

best regards
Pierre-André
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice] how to handle this bug (if this is one?)

2011-08-26 Thread Pierre-André Jacquod

hello,
in vcl/win/source/gdi/winlayout.cxx, around line 695 there is:

 long SimpleWinLayout::FillDXArray( long* pDXArray ) const
 {
+if( !mnWidth )
+{
+long mnWidth = mnBaseAdv;
+for( int i = 0; i  mnGlyphCount; ++i )
+mnWidth += mpGlyphAdvances[ i ];
+}

+if( pDXArray != NULL )
 {
+for( int i = 0; i  mnCharCount; ++i )
+ pDXArray[ i ] = mpCharWidths[ i ];
 }

+return mnWidth;
 }

the statement within th IF does not make any sense for my poor 
understanding. As I read the code, the first IF could also be totally 
removed, since as soon as exiting the first IF, all value are lost.


It seems to me that this is more or less what happened with the early 
code before the change of commit 2f382d6c2579a2 in 2003. But I do not 
sucess to match both logic.

Has someone more / better hints?
Thanks
Pierre-André

long SimpleWinLayout::FillDXArray( long* pDXArray ) const
 {
-if( mnWidth  !pDXArray )
-return mnWidth;
-
-long nWidth = 0;

-for( int i = 0; i  mnGlyphCount; ++i )
 {
-int j = !mpChars2Glyphs ? i : mpChars2Glyphs[i];
-nWidth += mpGlyphAdvances[j];
-if( pDXArray )
-pDXArray[i] = nWidth;
 }

-return nWidth;
 }

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


[Libreoffice] [patch] unused variable in Windows build

2011-08-12 Thread Pierre-André Jacquod

Hello,
a small patch to suppress an unused variable (within a WNT define) 
according cppchecker


Since I can not build on Windows, if someone could review / compile it 
for me before pushing ?


Thanks and regards

Pierre-André


0001-unused-variable-in-Windows-build.patch
Description: application/mbox
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] minutes of tech steering call ...

2011-05-06 Thread Pierre-André Jacquod

Hi,


* announcing binfilter as deprecated in 3.4
+ want to warn people in plenty of time
+ officially deprecate it, we drop save support in 3.4


The code cleaning is not yet finished, I still have commits (and done 
commits) that missed the 3.4 freeze (argh, missing free time) and some 
that needs to be done.


 + be warned - it will die in a new major release soon.

Will be this 3.5 ? Or do you want to wait for the next version? If post 
3.5, then I will continue the cleaning. If no, I may change my work and 
try to perform cleaning (ergh, deletion) as proposed here below.



And also make sure when you remove it completely: Don't remove the
filter-detection part of it. I.e. when a user then opens a
binfilter-covered format, don't present the user with the file-format
selection box, but use a sorry, support for this format was removed -
open it in 3.4 or similar dialog.



Regards
Pierre-André

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


Re: [Libreoffice] release plan : inconsistency between 3.3.3 and 3.4

2011-04-19 Thread Pierre-André Jacquod

Hello,
jumping late into the subject, but

On 04/11/2011 12:25 PM, Michael Meeks wrote:

The plan is (of course), to keep releasing 3.3.x releases as long as
people are interested in creating them I suppose[1] - we should come up


May I disagree ?? This is not a very predictable use for all involved: 
users, distros, etc... When to jump to next version? What happens for 
bug discovered in distros ?


Especially if we have 3-4 X.Y release a year


IMHO it is good to have a stable release of 3.3 after releasing 3.4 -

Here I fully agree,

Could it be not possible to have some rules, like the release of version 
X.Y.0 means end of support for X.(Y-2) version. En in case of X.0.0 
version, only the latest (X-1).Y.Z version is supported ?


and that in what-ever X.Y.Z and X.(Y-1).W, only the latest Z and W are 
supported? But this would implies to have at least within the X.Y path 
an update mechanism, especially for Windows.


But this could lead to problems, since distro's have a more slowly pace 
of release.


So what about picking long term support, e.g. 3.5 is long term support, 
means 2 years, what ever happens for the number of releases ?


This kind of scheme would limited (and clarify) the number of release 
that are / could be cared of. (again, usefull with several X.Y a year) 
So if you get a bug report, you know against which release you have to 
test / it will be tested.


Just thinking loud... other wants to do it also? :-)

regards
Pierre-André
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] Announcement: StarOffice file-format not available any more for saving

2011-03-25 Thread Pierre-André Jacquod

Hello,

On 03/25/2011 10:12 PM, Caolán McNamara wrote:

On Fri, 2011-03-25 at 22:09 +0100, Pierre-André Jacquod wrote:

something... Hopefully my tests are good And  make check was
successful,.. at last :- )


in case you're relying on it as some oracle :-)


No, the other way around: I run make check to be sure not to break it, 
as I did once:- )


More seriously: I have my set of files for testing, but will nerveless 
be happy and thankful if other are also sometimes trying to use binfilter.

regards
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] -Woverloaded-virtual

2011-03-25 Thread Pierre-André Jacquod

Hello,

On 03/25/2011 02:13 PM, Lubos Lunak wrote:

On Friday 25 of March 2011, Caolán McNamara wrote:

argh!, I meant to say then things are *not* too bad, not *too* bad.
I mean that's far less that I would have feared, quite manageable.


  Ok. In that case, if there are no objections, I'll commit my patches.


just a bet: binfilter was off in your try?

So I have some warning more to handle, once I am finished with cleaning. 
And I am always +1 for all what shows potential problems. Else it bites 
you harder later...


regards
Pierre-André
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] [PUSHED] [PATCH] Remove commented out code

2011-03-08 Thread Pierre-André Jacquod
Hello,
all seems to me OK, then I pushed.
Thanks
regards
Pierre-André

On 03/08/2011 12:19 PM, Bálint Dózsa wrote:
 Hi,
 
 I have removed some commented out code form// //xmloff/.
 My code is under the LGPLv3+/MPL dual license.
 
 Regards,
 Balint Dozsa
 
 
 
 ___
 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


Re: [Libreoffice] Remove using namespace ::rtl

2011-03-06 Thread Pierre-André Jacquod
Hello,

 Finally since I'm not sure for the moment about what must be done on
 using namespace com::sun::star::uno, I did the work on binfilters.

Thanks
regards
Pierre-André
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] [PATCH] [PUSHED] Easy Hacks: Translation of Comments from German to English

2011-03-06 Thread Pierre-André Jacquod
Hello,
thanks, just changed a typo
best regards
Pierre-André

On 03/06/2011 04:10 PM, Daniel Di Marco wrote:
 Hi,
 
 I translated some more comments. The patch is attached.
 
 
 Cheers,
 Daniel
 
 
 
 ___
 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


Re: [Libreoffice] Remove using namespace ::rtl

2011-03-05 Thread Pierre-André Jacquod
Hello,

 Even if binfilters is going to be extracted from LO, doesn't it worth
I am doing, this, leting it be only an import filter.

 to purge using namespace ::rtl from it (I think about the people
I think that when cross-module cleaning is done, this is worth to do
it also within binfilter: to get ride of old style, to be consistent
with the rest. But should not be top 1 priority :- )

regards
Pierre-André
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] [PUSHED][PATCH]Cleanup comments

2011-02-28 Thread Pierre-André Jacquod
Hello,
pushed, thanks,
Maybe not forgetting the [patch] tag in subject will help not to miss
your submission.
best regards


On 02/27/2011 04:51 PM, Arnaud Versini wrote:
 Hi,
 
 This patch remove some useless comments in msfilter.
 
 Thanks
 
 -- 
 Arnaud Versini
 
 
 
 ___
 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


Re: [Libreoffice] Nonsense comments?

2011-02-25 Thread Pierre-André Jacquod
On 02/25/2011 09:46 PM, Caolán McNamara wrote:

 po files can have translator-comments in them to help translators
 about ambiguous terms/words, while the .src/.sdf format doesn't though,
translation with gettext would support this with comment using key-words
/ tags. Key words are configurable, maybe a convention has been set with
### as marker...

 right ? I recall a problem with trying to get the Spanish translation of
 an obscure paper size (8.5 x 13 ) set as Oficio given that this

with gettext, it would be roughly something like
coding in file.cxx:
/* TRANSLATORS paper size (8.5 x 13 ) */
printf(Long Bond);

with xgettext --add-comments TRANSLATORS
the po-file for this language would then looks (after translation) like

#. paper size (8.5 x 13 )
#src: file.cxx 123
msgid Long Bond
msgstr Oficio


in crazy idea to go to gettext, when really time available : -)
regards
Pierre-André
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] Comment-translation of writer/sw/source/ui/config

2011-02-24 Thread Pierre-André Jacquod
On 02/24/2011 08:33 PM, Kohei Yoshida wrote:
 On Thu, 2011-02-24 at 19:46 +0100, Jonathan Aquilina wrote:

 Martin i think it would be easier as well as not to end up having ur 
 email black listed for sending out large amounts of emails, but if its 
 for a single module i would attach them all in one email.
 
 For the record this is what git send-email --thread --no-change-reply-to
 does, which the guideline mentions.

yes but it does not recommend to make a commit per file for the same
task within the same directory...

Looking at the patches, there are some with 1 line changed in one file.
In this case, I would recommend to have one commit for translation
within a directory.

If you are programming, you will very often not be able to have one
commit with just one file changed, knowing that a commit should be
compilable and runnable...

Martin, you can still locally commit as often as you did. But when you
are finished with your work, you can group together commits where it
makes sense. (in your case, e.g. one commit for translation per
directory, except with extra-big file for example). Just beware, still
holds to the rule 1 commit is compilable

For this you can use git rebase -i. At
http://book.git-scm.com/4_interactive_rebasing.html
you have a good explanation.

At the end, you can then send the git send-mail, with the fewer number
of commits. (I am not sure if this could be achieved on the fly, but I
think this could be risky, a least too risky for me...)

I hope this can help
regards
Pierre-André
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] Announcement: StarOffice file-format not available any more for saving

2011-02-16 Thread Pierre-André Jacquod
Hello,
after quite a long time, I have done a push again concerning this topic.
Sorry, I was very busy at work and had barely the time to go ahead.

Here is the following work in cleaning within binfilter/bf_sw the code
allowing to write in StarWriter format.

Without touching dependencies outside of binfilter/bf_sw (which I want
to avoid currently), I can’t remove more parts.

So I will start on the next StarOffice format.

Best regards
Pierre-André
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] Announcement: StarOffice file-format not available any more for saving

2011-01-24 Thread Pierre-André Jacquod
Hello,

On 01/24/2011 03:43 PM, Caolán McNamara wrote:
 
 You also needed to adjust the smoketest make check because that has a
 save as staroffice binary file format test in it. I noticed this failed
 this morning and bodged it up to work again.

Oops, sorry, I was not aware of it. Could you just give me a hint where
the code is, so I can have a look?
Thanks
Pierre-André

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


Re: [Libreoffice] Announcement: StarOffice file-format not available any more for saving

2011-01-24 Thread Pierre-André Jacquod
Hello,

   Wonderful :-) do you want help with this ? we could add an easy hack,
 and ask people to contact you, for impress / calc etc.
 
Thanks for this point. I will think if this is easily feasible. But I am
still myself on the (intensive) learning part, so I currently do not
feel me yet enough confident to describe an easy hack :- )
regards
Pierre-André
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice] Announcement: StarOffice file-format not available any more for saving

2011-01-23 Thread Pierre-André Jacquod
Hello,
from now I have started to delete within binfilter the code allowing to
*save* using the StarOffice file format. The import (read) is
still possible and will remain. Bye bye saving sdw, sxw 

This will of course not happens in one go...

With this push, I have done the following changes:
* StarWriter does not export anymore
* start of deletion of functions within binfilter/bf_sw, i.e StarWriter
format

For testing:
I have my set of files created with those formats, allowing me to test
the reading functionality while deleting code. But if other wants to
test it to ensure also that nothing has been broken, I would be happy.

In order to allow interested to test easily, I will push my changes to
master at periodic intervals (each 2-3 weeks, I think/hope if free time
allows), grouping them and making a short announce as reply to this mail.

Best regards
Pierre-André

PS: do not forget the --enable-binfilter flag, if you want to check it
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice] error compiling in libs-gui/canevas

2011-01-17 Thread Pierre-André Jacquod
hello,
there is an error compiling canevas:

the reason: in vcl/inc/vcl/sysdata.hxx
there has been a change at line 125:

-void* pRenderFormat;  // render format for drawable
+void* pXRenderFormat;  // render format for drawable

This produce the error (see below) in canevas compilation.
Since I have no idea about this part and do not know why this change has
been made, I do not risk to fix this of my own...   

Could someone who understands better than me this part fix it? or give
me a go to just change in
libs-gui/canvas/source/cairo/cairo_xlib_cairo.cxx (and if needed other
canevas part) the pRenderFormat to pXRenderFormat ... without much
understanding :- )

regards
Pierre-André

Compiling: canvas/source/cairo/cairo_xlib_cairo.cxx
.../libs-gui/canvas/source/cairo/cairo_xlib_cairo.cxx: In constructor
'cairo::X11SysData::X11SysData(const SystemGraphicsData)':

.../libs-gui/canvas/source/cairo/cairo_xlib_cairo.cxx:79:31: error:
'const struct SystemGraphicsData' has no member named 'pRenderFormat'

.../libs-gui/canvas/source/cairo/cairo_xlib_cairo.cxx: In member
function 'virtual boost::shared_ptrVirtualDevice
cairo::X11Surface::createVirtualDevice() const':

/libs-gui/canvas/source/cairo/cairo_xlib_cairo.cxx:266:29: error:
'struct SystemGraphicsData' has no member named 'pRenderFormat'
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] making binfilter aka StarOffice FileFormat read-only

2011-01-14 Thread Pierre-André Jacquod
Hi,
On 01/14/2011 07:33 PM, Regina Henschel wrote:
 Hi all,
 
 there is something wrong actually. Removing *Export*-filter is
 reasonable, but now in LibO RC3 I cannot *read* my SO5 files.
 
 Kind regards
 Regina
Up to now, nothing has been committed. On trunk master, all is OK, I
just tested it.
regards
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] starmath / cppunit breakage in master

2011-01-03 Thread Pierre-André Jacquod
Hi,

 Does setting
 #define MDDS_HASH_CONTAINER_STLPORT 1
 before
 #include mdds/mixed_type_matrix.hpp
 
 help?
 
 I also saw someone having a similar issue in the same exact spot, which
 I haven't been able to reproduce.
Maybe this is related. I had also a problem after having upgraded to mds
0.4.0 with an up to date (25.12.2010) git
At the ende, I managed to compile making a hack to 0.4.0 (very
dirty...). Since this part was outside of my understanding, I am not
able to know if the error was from my side or not...
 and since you were on holliday I kept it if someone also run in
trouble.  Below more explanation.

Since then, I did not recompile the whole stuff... take too long by me.:- )
regards

 I guess this is specific to system-mdds.
 Conceptually there should be no difference whether it's system or
 internal, since mdds is just a collection of header files with no
 libraries to build or link against.  From the looks of the log file, it
 *may* have some issues with gcc 4.5.x's implementation of unordered_map,
 but I'm not sure 100%...

I have tried make clean, make distclean
I have used
./autogen.sh --with-num-cpus=2 --without-junit --disable-kde
--enable-binfilter

compiler:
gcc version 4.5.0 20100604 [gcc-4_5-branch revision 160292] (SUSE Linux)

I did not success to compile, until I changed:
libo_dev/solver/330/unxlngi6.pro/inc/mdds/hash_container/map.hpp
simulating having MDDS_HASH_CONTAINER_STLPORT defined:

like this:

#else
// c++0x
#include hash_map
#define _mdds_unordered_map_type ::std::hash_map
//#include unordered_map
//#define _mdds_unordered_map_type ::std::unordered_map
#endif

Else, I got error like

Compiling: sc/source/core/tool/scmatrix.cxx
In file included from /usr/include/c++/4.5/bits/stl_algobase.h:63:0,
 from /usr/include/c++/4.5/unordered_map:41,
 from
/home/pjacquod/LibO_dev/libo_dev/solver/330/unxlngi6.pro/inc/mdds/hash_container/map.hpp:41,
 from
/home/pjacquod/LibO_dev/libo_dev/solver/330/unxlngi6.pro/inc/mdds/mixed_type_matrix_flag_storage.hpp:32,
 from
/home/pjacquod/LibO_dev/libo_dev/solver/330/unxlngi6.pro/inc/mdds/mixed_type_matrix.hpp:34,
 from
/home/pjacquod/LibO_dev/libo_dev/clone/calc/sc/source/core/tool/scmatrix.cxx:45:
/usr/include/c++/4.5/bits/cpp_type_traits.h:78:10: error: redefinition
of 'struct _STL::__true_type'
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice] making binfilter aka StarOffice FileFormat read-only

2010-12-27 Thread Pierre-André Jacquod
Hello,
these days, I have tried (and not really with full success) to
understand how binfilter works...

My goal: since it is an old legacy format, make StarOffice formats
read-only, and clean binfilter component of all code used for writing files.

Reason: with read-only, you will still be able to read your old files /
archive, but his will push the users to use a current / supported format
in case of change. So a less heavy software, use of well-maintained (see
minutes of tech steering call ... 2010.12.09)

After some code reading here a resume of my understanding. Thanks for
correcting, asking, challenging me. I hope I did not understand it too
wrongly.

An easy (and clean) possibility would be to change the filters defined
in binfilter as read-only filters (using as filter flag
SFX_FILTER_OPENREADONLY defined as 0x0001L) This will make the
opening read-only. By this way, this is not possible any more to save
using these file formats.
(I have not yet found where this is set, but still searching)

Currently, I have simulated it locally adding in
libs-core/sfx2/source/bastyp/fltfnc.cxx: (almost at the end of the
function SfxFilterContainer::ReadSingleFilter_Impl )

if (nFormatVersion  SOFFICE_FILEFORMAT_60)
{
pFilter-nFormatType = ( nFlags | SFX_FILTER_OPENREADONLY);
}

this is not a nice hack, but it demonstrates me that it works / how it
works.

This shows me:
a) it works. Yesss : -)

b) there are functions defined in libs-core and binfilter (sfx2 of
libs-core and sfx2 in binfilters) that are redundant. e.g
SFX_FILTER_OPENREADONLY (and other constant values) are defined in both
filters/binfilter/inc/bf_sfx2/docfilt.hxx
libs-core/sfx2/inc/sfx2/docfilt.hxx

c) it seems there are elements in the sfx2 of binfilter that are still
called, generated, but have no impact on the running system. For exemple
function SfxFilterContainer::ReadExternalFilters (in
binfilter/bf_sfx2/source/bastyp/sfx2_fltfnc.cxx) is still called,
produced me a lot of debug text, but the above mentionned code inserted
at the same place (as in libs-core but within his function) did not
produced any effect. So this function is still called, but its effects
are not taken into account.

d) So binfilter could be simplified if I take out all wrinting stuff,
and not needed section of code still called...

I noticed the following at SaveAs: all StarOffice format were still
available, but were producing an error at saving, since they are now by
me read-only... I did not find the place, but could someone hint me
where this is? Actually, I think the list of format displayed at Save or
SaveAs should contain only not read-only filters, something like this
in pseudo-code:

(if (filter.getFlags()  SFX_FILTER_OPENREADONLY) !=
SFX_FILTER_OPENREADONLY)
{ display this filter in save / saveas dialog}
(note: I also saw a function isReadOnly() or something like this that
could be called on filter objects, returning true / false. Is probably
even better...)

I do not think there are currently READONLY filters, but basically, I
think this is a bug not taking this flag into account. And so in one go
all problem solved in switching the binfilter to READ-ONLY. If someone
could help me for this part...

Finaly, at saving, this work like this:
(valid for StarOffice format... beware, other format, other paths)

SfxObjectShell::PreDoSaveAs_Impl(param) in libs-core
SfxObjectShell::SaveTo_Impl(param) for ExporTo in libs-core
SfxObjectShell::PreDoSaveAs_Impl(param)
SfxObjectShell::SaveTo_Impl(param) 2  in sfx2_objstor.cxx
SfxObjectShell::SaveAsOwnFormat( param) in sfx2_objstor.cxx
SfxObjectShell::SaveAs(param) in sfx2_objstor.cxx
SfxObjectShell::SaveInfoAndConfig_Impl(param2)
BasicManager::Store(param)
BasicManager::Store(param2)
BasicLibInfo::Store(param)
StgWriter::Write (param)
Sw3Writer::WriteStorage()
Sw3IO::SaveAs
Sw3IO::Save
ExportTo is finished and has returned

with the ExportTo function going magically to the binfilter module. I
did not understood what I read there, with the uno part...

Until (and with) the function BasicLibInfo::Store(param), this the
common part of binfilter for all modules. Then it splits to writer,
calc,...

At opening with read-write filter, some of these write functions are
called (for the lock file). With a read-only filter, this does not
happens. At opening, there is also the dark magic call (:- (  through
uno to go through the different filters one by one for generating them


So how to go ahead?

Here I am asking you:
- is it OK to go ahead with this idea?
- should I make a feature/StarOffice-read-only branch ?
- could someone (help me) implement the sorting in order to ensure that
read-only filters are not available for Save / Save As?

Of course, if going ahead on this way, I will search the code in order
to find the right place for activating the SFX_FILTER_OPENREADONLY flag
as property for the filter, not using this hackhopefully

Thanks for your feed-backs
Regards
Pierre-André

Re: [Libreoffice] binfilter and features...

2010-12-08 Thread Pierre-André Jacquod
Hi,
 There is alright, a phonecon typically once a week or so. maybe we can
 put this topic on the agenda 
would be great

 and you could dial in if its at a suitable time.

doing this during free time, I may really depend if the possibility
arise or not.

But basically, we could think of a kind of general rule according to the
following points:

Do we want to support the file format X ?
if yes
Is the product that produce this file format as default / main / native
file format out of support ?
if yes
Is this product out of support since more than X (3??) years?
if yes
== LibO supports this file format as read only. In case of changes, the
user has to choose another file format, supported for writing.

Note: for me, for an average user, having to install a plug-in is not an
option. At least as I see even in my west-european neighborhood, despite
well educated (university-level!) people, but not computer freaks, using
it as a mere tools. I always wonder as people are using computer in a
way much more nearer of using hammers than cars

Of course, if the product is still on support, this is another story,
since there other criteria should determine if this is read or read-write.
But this kind of rule could help to shrink down in a regular manner the
LibO code, having a basis for suppressing some part of the code.

I proposed 3 years, this in average, this is the renewal time for PC's.
Actually, for basic users, this is somewhat longer (about 5 years), but
as you have seen (or not) for docx-format, after 3 years of the
introduction of the new format, people not able to read the new format
are really in trouble.

This also helps or forces the end-user to migrate to the new format /
up to date format, without loosing access to its archive. This is a good
help for LibO, I think, avoiding having X former file-format existing
around.

Other views, ideas?
regards
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice] fighting with debug macros...

2010-12-08 Thread Pierre-André Jacquod
Hello,

still trying to learn a bit the code. Compiling without DEBUG on gives
some new warnings:- ) This lead me to look at some code construct. Here
is in pseudo-code a typical construct I am crossing:

var y = ;
var x = ;
code
if ( y  MAXVALUE)
{
ASSERT(x, out of range); // only use of var x is here
} // there is no else statement
code

Looking at easy hacks, I also saw that ASSERT is deprecated. I have
looked at the OSL macros, but did not found an equivalent of
ASSERT(condition, message) (defined in
filters/binfilter/inc/bf_sw/errhdl.hxx

But further, this is not very useful for the end-user, since LibO is
shipped without debug-level on. (right? )

So I was thinking:
* either a macro exists to do a hello user, I will crash. Thanks to
send this report, that is added within the if statement.  ??

* or to change the code to something like:
var y = ...;
#if OSL_DEBUG_LEVEL  0
var x = ...; /* if this is not possible to insert x below, and the
initialization of x does not change any state */
#endif

code
#if OSL_DEBUG_LEVEL  0
if ( y  MAXVALUE)
{
ASSERT(x, txt); // only use of var x is here
} // there is no else statement
#endif
code

to avoid shipping unneeded code to end-user. This will also make code
execution more efficient, avoiding dummy branches.

By the way:
what is the right way to achieve the goal of the easy hack : align
ASSERT ( friends) macro foo ?

include /ure/sal/inc/osl/diagnose.h in file, and use only OSL_Debug
macros loosing all messages? Is it possible to add an additional
OSL_ASSERT(condition, message) macro? Or not wanted?

Thanks for your inputs.
regards

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


Re: [Libreoffice] binfilter and features...

2010-12-05 Thread Pierre-André Jacquod
On 12/05/2010 12:39 PM, Caolán McNamara wrote:

 All true. It was just a note that it might be easier, if you have an
 interest in binfilter, to just take the conservative approach and
 silence warnings with e.g converting

I was thinking of taking a 2 steps approach: first silent warning in a
conservative way (this is also less risk to introduce bugs) and then to
down-size the module just keeping the needed part.

In my opinion, the needed part would be, for the next releases, just the
read capability of (older?) binary format build in within LibO.

But if the decision is to drop it anyway for the next release, does not
bring a lot I did not found any inputs about it within mailing
lists. Has the point been discussed somewhere? Is this to be handle by
the steering committee? Is there a technical steering committee for
this kind of decision, where we could propose / give reasons for
thinking this or that? Currently, as said, I am doing conservative
warning fixes, but to start something more intrusive, would like to have
first a kind of direction decision.
regards




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


[Libreoffice] [PATCH 01/16] warning variable unused fix in binfilter bf_sw attr

2010-12-05 Thread Pierre-André Jacquod
Hi,
here some patches to suppress warnings within binfilter.
I took a - sometimes too - conservative approach for doing this. Hope I
did not harm this module
regards
From 3c2cd665fe8a344626265f6c8a2a3b195556441d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pierre-Andr=C3=A9=20Jacquod?= pjacq...@alumni.ethz.ch
Date: Sat, 4 Dec 2010 10:18:51 +0100
Subject: [PATCH 01/16] warning variable unused fix in binfilter bf_sw attr

---
 binfilter/bf_sw/source/core/attr/sw_format.cxx |1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/binfilter/bf_sw/source/core/attr/sw_format.cxx b/binfilter/bf_sw/source/core/attr/sw_format.cxx
index fdc874a..c424aa3 100644
--- a/binfilter/bf_sw/source/core/attr/sw_format.cxx
+++ b/binfilter/bf_sw/source/core/attr/sw_format.cxx
@@ -213,7 +213,6 @@ namespace binfilter {
 /*N*/ void SwFmt::CopyAttrs( const SwFmt rFmt, BOOL bReplace )
 /*N*/ {
 /*N*/ 	// kopiere nur das Attribut-Delta Array
-/*N*/ 	register SwCharFmt* pDropCharFmt = 0;
 /*N*/ 
 /*N*/ 	if ( IsInCache() )
 /*N*/ 	{
-- 
1.7.1

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


[Libreoffice] [PATCH 02/16] warning fix unused variable in binfilter bf_sw bastyp

2010-12-05 Thread Pierre-André Jacquod
regards
From a03ec223cf70c17a1cd6bbf397dc954c8d9d13fe Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pierre-Andr=C3=A9=20Jacquod?= pjacq...@alumni.ethz.ch
Date: Sat, 4 Dec 2010 10:25:53 +0100
Subject: [PATCH 02/16] warning fix unused variable in binfilter bf_sw bastyp

---
 binfilter/bf_sw/source/core/bastyp/sw_calc.cxx|2 +-
 binfilter/bf_sw/source/core/bastyp/sw_swtypes.cxx |4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/binfilter/bf_sw/source/core/bastyp/sw_calc.cxx b/binfilter/bf_sw/source/core/bastyp/sw_calc.cxx
index 7cee1dd..76e7026 100644
--- a/binfilter/bf_sw/source/core/bastyp/sw_calc.cxx
+++ b/binfilter/bf_sw/source/core/bastyp/sw_calc.cxx
@@ -454,7 +454,7 @@ static int
 
 
 
-/*N*/ String SwCalc::GetStrResult( double nValue, BOOL bRound )
+/*N*/ String SwCalc::GetStrResult( double nValue, BOOL /*bRound*/ )
 /*N*/ {
 /*N*/ 	if( nValue = DBL_MAX )
 /*N*/ 		switch( eError )
diff --git a/binfilter/bf_sw/source/core/bastyp/sw_swtypes.cxx b/binfilter/bf_sw/source/core/bastyp/sw_swtypes.cxx
index 198f2a8..60965eb 100644
--- a/binfilter/bf_sw/source/core/bastyp/sw_swtypes.cxx
+++ b/binfilter/bf_sw/source/core/bastyp/sw_swtypes.cxx
@@ -127,9 +127,9 @@ IMPL_FIXEDMEMPOOL_NEWDEL( _SwCursor_SavePos, 20, 20 )
 /*N*/ }
 
 
-/*N*/ Locale CreateLocale( LanguageType eLanguage )
+/*N*/ Locale CreateLocale( LanguageType /*eLanguage*/ )
 /*N*/ {
-/*?*/ 			DBG_BF_ASSERT(0, STRIP); Locale temp; return temp;//STRIP001 	String aLangStr, aCtryStr;
+/*?*/ 			DBG_BF_ASSERT(0, STRIP); Locale temp; return temp;
 /*N*/ }
 
 
-- 
1.7.1

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


[Libreoffice] [PATCH 03/16] fix warning unused var in binfilter bf_sw crsr

2010-12-05 Thread Pierre-André Jacquod
regards
From fe0b41fe4378e18478263caf8d09af1f3adafa28 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pierre-Andr=C3=A9=20Jacquod?= pjacq...@alumni.ethz.ch
Date: Sat, 4 Dec 2010 11:12:21 +0100
Subject: [PATCH 03/16] fix warning unused var in binfilter bf_sw crsr

this is fixing warning, not optimizing. This means, some functions call
have be left, even if it is possible they are not needed any more
---
 binfilter/bf_sw/source/core/crsr/sw_crsrsh.cxx   |   34 ++---
 binfilter/bf_sw/source/core/crsr/sw_findattr.cxx |   16 ++
 binfilter/bf_sw/source/core/crsr/sw_findcoll.cxx |   17 +++
 binfilter/bf_sw/source/core/crsr/sw_findtxt.cxx  |   23 ---
 binfilter/bf_sw/source/core/crsr/sw_pam.cxx  |   19 +---
 binfilter/bf_sw/source/core/crsr/sw_swcrsr.cxx   |   32 ++--
 binfilter/bf_sw/source/core/crsr/sw_trvlreg.cxx  |   16 +-
 binfilter/bf_sw/source/core/crsr/sw_trvltbl.cxx  |   14 
 binfilter/bf_sw/source/core/crsr/sw_unocrsr.cxx  |   19 +---
 9 files changed, 65 insertions(+), 125 deletions(-)

diff --git a/binfilter/bf_sw/source/core/crsr/sw_crsrsh.cxx b/binfilter/bf_sw/source/core/crsr/sw_crsrsh.cxx
index 17da949..dd19e9b 100644
--- a/binfilter/bf_sw/source/core/crsr/sw_crsrsh.cxx
+++ b/binfilter/bf_sw/source/core/crsr/sw_crsrsh.cxx
@@ -117,11 +117,11 @@ using namespace ::com::sun::star::util;
 
 // gebe den aktuellen zurueck
 
-/*N*/ SwPaM* SwCrsrShell::GetCrsr( bool bMakeTblCrsr ) const
+/*N*/ SwPaM* SwCrsrShell::GetCrsr( bool /*bMakeTblCrsr*/ ) const
 /*N*/ {
 /*N*/ 	if( pTblCrsr )
 /*N*/ 	{
-DBG_BF_ASSERT(0, STRIP); //STRIP001  /*?*/ 		if( bMakeTblCrsr  pTblCrsr-IsCrsrMovedUpdt() )
+DBG_BF_ASSERT(0, STRIP);
 /*N*/ 	}
 /*N*/ 	return pCurCrsr;
 /*N*/ }
@@ -148,19 +148,7 @@ DBG_BF_ASSERT(0, STRIP); //STRIP001  /*?*/ 		if( bMakeTblCrsr  pTblCrsr-IsC
 
 /*N*/ void SwCrsrShell::EndAction( const BOOL bIdleEnd )
 /*N*/ {
-/*
-//OS: Wird z.B. eine Basic-Action im Hintergrund ausgefuehrt, geht es so nicht
-if( !bHasFocus )
-{
-// hat die Shell nicht den Focus, dann nur das EndAction an
-// die ViewShell weitergeben.
-ViewShell::EndAction( bIdleEnd );
-return;
-}
-*/
-
 /*N*/ 	bool bVis = bSVCrsrVis;
-
 // Idle-Formatierung ?
 /*N*/ 	if( bIdleEnd  Imp()-GetRegion() )
 /*N*/ 	{
@@ -209,7 +197,7 @@ DBG_BF_ASSERT(0, STRIP); //STRIP001  /*?*/ 		if( bMakeTblCrsr  pTblCrsr-IsC
 /*?*/ 			//der Cursor geupdatet werden; um z.B. den
 /*?*/ 			//TabellenCursor zu erzeugen. Im UpdateCrsr wird
 /*?*/ 			//das jetzt beruecksichtigt!
-DBG_BF_ASSERT(0, STRIP); //STRIP001  /*?*/ 			UpdateCrsr( SwCrsrShell::CHKRANGE, bIdleEnd );
+DBG_BF_ASSERT(0, STRIP);
 /*N*/ 		}
 /*N*/ 		return;
 /*N*/ 	}
@@ -294,7 +282,6 @@ DBG_BF_ASSERT(0, STRIP); //STRIP001  /*?*/ 			UpdateCrsr( SwCrsrShell::CHKRANG
 /*M*/ 
 /*M*/ 	// erfrage den Count fuer die Start-/End-Actions und ob die Shell
 /*M*/ 	// ueberhaupt den Focus hat
-/*M*/ //	if( ActionPend() /*|| !bHasFocus*/ )
 /*M*/ 	//JP 12.01.98: Bug #46496# - es muss innerhalb einer BasicAction der
 /*M*/ 	//Cursor geupdatet werden; um z.B. den TabellenCursor zu
 /*M*/ 	//erzeugen. Im EndAction wird jetzt das UpdateCrsr gerufen!
@@ -324,8 +311,7 @@ DBG_BF_ASSERT(0, STRIP); //STRIP001  /*?*/ 			UpdateCrsr( SwCrsrShell::CHKRANG
 /*M*/ 		  pDoc-IsIdxInTbl( pTstCrsr-GetPoint()-nNode ) 
 /*M*/ 		  ( pTblCrsr ||
 /*M*/ 			pTstCrsr-GetNode( TRUE )-FindStartNode() !=
-/*M*/ 			pTstCrsr-GetNode( FALSE )-FindStartNode() ))
-/*M*/ 		/*|| ( !pTblCrsr  lcl_IsInValueBox( *pTstCrsr, *this ) )*/ )
+/*M*/ 			pTstCrsr-GetNode( FALSE )-FindStartNode() )) )
 /*M*/ 	{DBG_BF_ASSERT(0, STRIP); //STRIP001 
 /*M*/ 	}
 /*M*/ 
@@ -557,12 +543,8 @@ DBG_BF_ASSERT(0, STRIP); //STRIP001  /*?*/ 			UpdateCrsr( SwCrsrShell::CHKRANG
 /*M*/ 		pVisCrsr-Show();   // wieder anzeigen
 /*M*/ }
 
-
-
 // erzeuge eine Kopie vom Cursor und speicher diese im Stack
 
-
-
 /*
  *  Loescht einen Cursor (gesteuert durch bOldCrsr)
  *  - vom Stack oder( bOldCrsr = TRUE )
@@ -572,18 +554,12 @@ DBG_BF_ASSERT(0, STRIP); //STRIP001  /*?*/ 			UpdateCrsr( SwCrsrShell::CHKRANG
  */
 
 
-
 /*
  * Verbinde zwei Cursor miteinander.
  * Loesche vom Stack den obersten und setzen dessen GetMark im Aktuellen.
  */
 
 
-
-
-
-
-
 /*N*/ void SwCrsrShell::ShowCrsrs( BOOL bCrsrVis )
 /*N*/ {
 /*N*/ 	if( !bHasFocus || bAllProtect || bBasicHideCrsr )
@@ -797,8 +773,6 @@ DBG_BF_ASSERT(0, STRIP); //STRIP001  /*?*/ 			UpdateCrsr( SwCrsrShell::CHKRANG
 
 #if defined(DBG_UTIL) || defined(WIN)
 
-
-
 /*N*/ SwCursor* SwCrsrShell::GetSwCrsr( bool bMakeTblCrsr ) const
 /*N*/ {
 /*N*/ 	return (SwCursor*)GetCrsr( bMakeTblCrsr );
diff --git a/binfilter/bf_sw/source/core/crsr/sw_findattr.cxx b/binfilter/bf_sw/source/core/crsr/sw_findattr.cxx
index 03d2972..24d7af4 100644
--- a/binfilter/bf_sw/source/core/crsr/sw_findattr.cxx
+++ b/binfilter/bf_sw/source/core/crsr/sw_findattr.cxx
@@ -53,16 

[Libreoffice] [PATCH 04/16] warning fix for unused var in binfilter bf_sw doc

2010-12-05 Thread Pierre-André Jacquod
regards
From 76026a3ef610c3b348f2fa514591e452eff3cd8e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pierre-Andr=C3=A9=20Jacquod?= pjacq...@alumni.ethz.ch
Date: Sat, 4 Dec 2010 14:56:23 +0100
Subject: [PATCH 04/16] warning fix for unused var in binfilter bf_sw doc

This is warning removing, not code optimization = minimum risks have
been taken and some function calls left behind are probably not usefull
anymore. But goal is not to produce new bugs. Once all warnings removed,
if needed we can do code optimization
---
 binfilter/bf_sw/source/core/doc/sw_docbm.cxx|7 ++--
 binfilter/bf_sw/source/core/doc/sw_doccorr.cxx  |8 ++---
 binfilter/bf_sw/source/core/doc/sw_docdesc.cxx  |   19 ---
 binfilter/bf_sw/source/core/doc/sw_docedt.cxx   |   10 +-
 binfilter/bf_sw/source/core/doc/sw_docfld.cxx   |   15 +++--
 binfilter/bf_sw/source/core/doc/sw_docfly.cxx   |   23 +++--
 binfilter/bf_sw/source/core/doc/sw_docfmt.cxx   |   29 +
 binfilter/bf_sw/source/core/doc/sw_docftn.cxx   |   18 +-
 binfilter/bf_sw/source/core/doc/sw_doclay.cxx   |4 +-
 binfilter/bf_sw/source/core/doc/sw_docnum.cxx   |   39 +--
 binfilter/bf_sw/source/core/doc/sw_docredln.cxx |   17 +-
 binfilter/bf_sw/source/core/doc/sw_doctxm.cxx   |4 +--
 binfilter/bf_sw/source/core/doc/sw_tblrwcl.cxx  |2 +-
 13 files changed, 43 insertions(+), 152 deletions(-)

diff --git a/binfilter/bf_sw/source/core/doc/sw_docbm.cxx b/binfilter/bf_sw/source/core/doc/sw_docbm.cxx
index f0ce7bb..fa28dea 100644
--- a/binfilter/bf_sw/source/core/doc/sw_docbm.cxx
+++ b/binfilter/bf_sw/source/core/doc/sw_docbm.cxx
@@ -165,13 +165,13 @@ namespace binfilter {
 /*N*/{
 /*?*/	if( bBkmrk )
 /*?*/	{
-/*?*/		USHORT nCount = pBookmarkTbl-Count();
+/*?*/		pBookmarkTbl-Count();
 /*?*/		USHORT i = 0;
 /*?*/		do {
 /*?*/			if(!(*pBookmarkTbl)[i]-IsBookMark())
-/*?*/nPos++;
+/*?*/++nPos;
 /*?*/
-/*?*/			i++;
+/*?*/			++i;
 /*?*/		}
 /*?*/		while( i  nPos || !(*pBookmarkTbl)[nPos]-IsBookMark() );
 /*?*/	}
@@ -324,7 +324,6 @@ namespace binfilter {
 /*N*/ 	for( nCnt = 0; nCnt  rTbl.Count(); ++nCnt )
 /*N*/ 	{
 /*N*/ 		// liegt auf der Position ??
-/*N*/ 		int eType = BKMK_POS_NONE;
 /*N*/ 		SwRedline* pRedl = rTbl[ nCnt ];
 /*N*/
 /*N*/ 		SwPosition *pRStt = pRedl-GetBound(TRUE),
diff --git a/binfilter/bf_sw/source/core/doc/sw_doccorr.cxx b/binfilter/bf_sw/source/core/doc/sw_doccorr.cxx
index ff0e123..da64d57 100644
--- a/binfilter/bf_sw/source/core/doc/sw_doccorr.cxx
+++ b/binfilter/bf_sw/source/core/doc/sw_doccorr.cxx
@@ -146,12 +146,11 @@ namespace binfilter {
 /*N*/ 	 const xub_StrLen nOffset,
 /*N*/ 	 BOOL bMoveCrsr )
 /*N*/ {
-/*N*/ 	const SwNode* pOldNode = rOldNode.GetNode();
+/*N*/ 	rOldNode.GetNode();
 /*N*/ 	SwPosition aNewPos( rNewPos );
 /*N*/ 
 /*N*/ 	{ // erstmal die Bookmark korrigieren
 /*N*/ 		register SwBookmarks rBkmks = *pBookmarkTbl;
-/*N*/ 		register SwBookmark* pBkmk;
 /*N*/ 		for( USHORT n = 0; n  rBkmks.Count(); ++n )
 /*N*/ 		{
 /*?*/ 			DBG_BF_ASSERT(0, STRIP); //STRIP001 // liegt auf der Position ??
@@ -282,11 +281,10 @@ namespace binfilter {
 /*N*/ 	 const SwPosition rNewPos,
 /*N*/ 	 BOOL bMoveCrsr )
 /*N*/ {
-/*N*/ 	const ULONG nSttNode = rStartNode.GetIndex();
-/*N*/ 	const ULONG nEndNode = rEndNode.GetIndex();
+/*N*/ 	rStartNode.GetIndex();
+/*N*/ 	rEndNode.GetIndex();
 /*N*/ 	SwPosition aNewPos( rNewPos );
 /*N*/ 
-/*N*/ //	if( !DoesUndo() )
 /*N*/ 		// erstmal die Bookmarks/Redlines korrigieren
 /*N*/ 		_DelBookmarks( rStartNode, rEndNode );
 /*N*/ 
diff --git a/binfilter/bf_sw/source/core/doc/sw_docdesc.cxx b/binfilter/bf_sw/source/core/doc/sw_docdesc.cxx
index 3f2db13..2d509f6 100644
--- a/binfilter/bf_sw/source/core/doc/sw_docdesc.cxx
+++ b/binfilter/bf_sw/source/core/doc/sw_docdesc.cxx
@@ -838,25 +838,6 @@ extern SvPtrarr *pGlobalOLEExcludeList;
 /*N*/
 /*N*/ }
 
-/*
- *	Kleiner Hack;
- *
-const SwPageDesc SwDoc::GetPageDesc( USHORT i ) const
-{
-if( !i  !aPageDescs.Count() )// noch keiner vorhanden?
-((SwDoc*)this)-InitPageDescs();		//Default PageDescriptor
-return *aPageDescs[i];
-}
-
-SwPageDesc SwDoc::_GetPageDesc( USHORT i ) const
-{
-if( !i  !aPageDescs.Count() )			// noch keiner vorhanden?
-((SwDoc*)this)-InitPageDescs();		//Default PageDescriptor
-return *aPageDescs[i];
-}
-*/
-
-
 
 /*N*/ IMPL_LINK( SwDoc, DoUpdateModifiedOLE, Timer *, pTimer )
 /*N*/ {
diff --git a/binfilter/bf_sw/source/core/doc/sw_docedt.cxx b/binfilter/bf_sw/source/core/doc/sw_docedt.cxx
index 0a19f58..84de4dc 100644
--- a/binfilter/bf_sw/source/core/doc/sw_docedt.cxx
+++ b/binfilter/bf_sw/source/core/doc/sw_docedt.cxx
@@ -132,11 +132,6 @@ SV_IMPL_PTRARR( SaveBookmarks, SaveBookmark* )
 /*N*/ }
 
 
-
-
-
-// 
-
 /*N*/ _SaveRedlEndPosForRestore::_SaveRedlEndPosForRestore( const SwNodeIndex rInsIdx )
 /*N*/ 	: pSavArr( 0 ), pSavIdx( 0 )
 /*N*/ {

[Libreoffice] [PATCH 05/16] warning fix unused var in binfilter bf_sw docnode

2010-12-05 Thread Pierre-André Jacquod
regards
From dafaabb2c38990bf4141c6074e15f0ca35d7e160 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pierre-Andr=C3=A9=20Jacquod?= pjacq...@alumni.ethz.ch
Date: Sat, 4 Dec 2010 15:19:44 +0100
Subject: [PATCH 05/16] warning fix unused var in binfilter bf_sw docnode

only warning removal, not code optimization, hence some function calls that
may not be needed anymore left behind.
---
 binfilter/bf_sw/source/core/docnode/sw_ndsect.cxx  |5 ++---
 binfilter/bf_sw/source/core/docnode/sw_ndtbl.cxx   |1 -
 binfilter/bf_sw/source/core/docnode/sw_node.cxx|2 +-
 binfilter/bf_sw/source/core/docnode/sw_section.cxx |4 ++--
 .../bf_sw/source/core/docnode/sw_swbaslnk.cxx  |2 +-
 5 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/binfilter/bf_sw/source/core/docnode/sw_ndsect.cxx b/binfilter/bf_sw/source/core/docnode/sw_ndsect.cxx
index 9612c0d..441f3ca 100644
--- a/binfilter/bf_sw/source/core/docnode/sw_ndsect.cxx
+++ b/binfilter/bf_sw/source/core/docnode/sw_ndsect.cxx
@@ -437,7 +437,7 @@ namespace binfilter {
 /*N*/ 	SwSection* pSection = pFmt-GetSection();
 /*N*/ /// OD 04.10.2002 #102894#
 /*N*/ /// remember hidden condition flag of SwSection before changes
-/*N*/ bool bOldCondHidden = pSection-IsCondHidden() ? true : false;
+/*N*/ pSection-IsCondHidden() ? true : false;
 /*N*/
 /*N*/ 	if( *pSection == rSect )
 /*N*/ 	{
@@ -649,7 +649,6 @@ namespace binfilter {
 /*N*/ 		else
 /*?*/ 			new SwTxtNode( aInsPos, (SwTxtFmtColl*)GetDoc()-GetDfltTxtFmtColl() );
 /*N*/ 	}
-/*N*/ 	SwEndNode* pEndNd = new SwEndNode( aInsPos, *pSectNd );
 /*N*/
 /*N*/ 	pSectNd-GetSection() = rSection;
 /*N*/ 	SwSectionFmt* pSectFmt = pSectNd-GetSection().GetFmt();
@@ -778,7 +777,7 @@ namespace binfilter {
 /*N*/ pLast = aIter++;
 /*N*/ 		}
 /*N*/ 	}
-/*N*/ 	SwDoc* pDoc = GetDoc();
+/*N*/ 	GetDoc();
 /*N*/
 /*N*/ 	SwSectionFmt* pFmt = pSection-GetFmt();
 /*N*/ 	if( pFmt )
diff --git a/binfilter/bf_sw/source/core/docnode/sw_ndtbl.cxx b/binfilter/bf_sw/source/core/docnode/sw_ndtbl.cxx
index 62293df..4a0616b 100644
--- a/binfilter/bf_sw/source/core/docnode/sw_ndtbl.cxx
+++ b/binfilter/bf_sw/source/core/docnode/sw_ndtbl.cxx
@@ -227,7 +227,6 @@ static bool lcl_IsItemSet(const SwCntntNode  rNode, USHORT which)
 SwStartNode* pSttNd = new SwStartNode( aEndIdx, ND_STARTNODE,
 SwTableBoxStartNode );
 pSttNd-pStartOfSection = pTblNd;
-SwEndNode* pEndNd = new SwEndNode( aEndIdx, *pSttNd );
 
 pPrvBox = new SwTableBox( pBoxFmt, *pSttNd, pLine );
 
diff --git a/binfilter/bf_sw/source/core/docnode/sw_node.cxx b/binfilter/bf_sw/source/core/docnode/sw_node.cxx
index b25a262..531f27a 100644
--- a/binfilter/bf_sw/source/core/docnode/sw_node.cxx
+++ b/binfilter/bf_sw/source/core/docnode/sw_node.cxx
@@ -1144,7 +1144,7 @@ using namespace ::com::sun::star::i18n;
 // in pIdx kann die 2. Position returnt werden.
 /*N*/ int SwCntntNode::CanJoinPrev( SwNodeIndex* pIdx ) const
 /*N*/ {
-/*N*/ 	const SwNodes rNds = GetNodes();
+/*N*/ 	GetNodes();
 /*N*/ 	BYTE nNdType = GetNodeType();
 /*N*/ 	SwNodeIndex aIdx( *this, -1 );
 /*N*/
diff --git a/binfilter/bf_sw/source/core/docnode/sw_section.cxx b/binfilter/bf_sw/source/core/docnode/sw_section.cxx
index 30052bf..26b8d11 100644
--- a/binfilter/bf_sw/source/core/docnode/sw_section.cxx
+++ b/binfilter/bf_sw/source/core/docnode/sw_section.cxx
@@ -115,7 +115,7 @@ namespace binfilter {
 /*N*/ 	SwSectionPtr pParentSect = GetParent();
 /*N*/ 	if( pParentSect )
 /*N*/ 	{
-/*N*/ 		bool bPHFlag = pParentSect-IsHiddenFlag();
+/*N*/ 		pParentSect-IsHiddenFlag();
 /*N*/ 		if( pParentSect-IsHiddenFlag() )
 /*?*/ 			SetHidden( TRUE );
 /*N*/
@@ -1132,7 +1132,7 @@ void SwSectionFmt::MakeFrms()
 
 
 
-/*N*/ BOOL SwIntrnlSectRefLink::IsInRange( ULONG nSttNd, ULONG nEndNd, xub_StrLen nStt, xub_StrLen /*nEnd */) const
+/*N*/ BOOL SwIntrnlSectRefLink::IsInRange( ULONG nSttNd, ULONG nEndNd, xub_StrLen /*nStt*/, xub_StrLen /*nEnd */) const
 /*N*/ {
 /*N*/ 	SwStartNode* pSttNd = rSectFmt.GetSectionNode( FALSE );
 /*N*/ 	return pSttNd 
diff --git a/binfilter/bf_sw/source/core/docnode/sw_swbaslnk.cxx b/binfilter/bf_sw/source/core/docnode/sw_swbaslnk.cxx
index 920f809..75f098d 100644
--- a/binfilter/bf_sw/source/core/docnode/sw_swbaslnk.cxx
+++ b/binfilter/bf_sw/source/core/docnode/sw_swbaslnk.cxx
@@ -368,7 +368,7 @@ namespace binfilter {
 /*?*/ 	0 != (pANd = pDoc-GetNodes()[pAPos-nNode]) 
 /*?*/ 	0 != (pTblNd = pANd-FindTableNode()) )
 /*?*/ {
-/*?*/ 	BOOL bLastGrf = !pTblNd-GetTable().DecGrfsThatResize();
+/*?*/ 	pTblNd-GetTable().DecGrfsThatResize();
 /*?*/ 	SwHTMLTableLayout *pLayout =
 /*?*/ 		pTblNd-GetTable().GetHTMLTableLayout();
 /*?*/ 	if(	pLayout )
-- 
1.7.1

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


[Libreoffice] [PATCH 06/16] warning fix unused var in binfilter bf_sw draw

2010-12-05 Thread Pierre-André Jacquod
regards
From eac219396edebdf58deba912b02edac9a7999554 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pierre-Andr=C3=A9=20Jacquod?= pjacq...@alumni.ethz.ch
Date: Sat, 4 Dec 2010 15:30:11 +0100
Subject: [PATCH 06/16] warning fix unused var in binfilter bf_sw draw

---
 binfilter/bf_sw/source/core/draw/sw_dcontact.cxx |   75 +++---
 1 files changed, 9 insertions(+), 66 deletions(-)

diff --git a/binfilter/bf_sw/source/core/draw/sw_dcontact.cxx b/binfilter/bf_sw/source/core/draw/sw_dcontact.cxx
index 67d2f4a..18b3149 100644
--- a/binfilter/bf_sw/source/core/draw/sw_dcontact.cxx
+++ b/binfilter/bf_sw/source/core/draw/sw_dcontact.cxx
@@ -221,7 +221,7 @@ namespace binfilter {
 |*
 |*/
 
-/*N*/ SwFlyDrawContact::SwFlyDrawContact( SwFlyFrmFmt *pToRegisterIn, SdrModel *pMod ) :
+/*N*/ SwFlyDrawContact::SwFlyDrawContact( SwFlyFrmFmt *pToRegisterIn, SdrModel* /*pMod*/ ) :
 /*N*/ 	SwContact( pToRegisterIn )
 /*N*/ {
 /*N*/ 	SetMaster( new SwFlyDrawObj() );
@@ -266,7 +266,7 @@ namespace binfilter {
 |*
 |*/
 
-/*N*/ void SwFlyDrawContact::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew )
+/*N*/ void SwFlyDrawContact::Modify( SfxPoolItem* /*pOld*/, SfxPoolItem* /*pNew*/ )
 /*N*/ {
 /*N*/ }
 
@@ -628,7 +628,7 @@ namespace binfilter {
 |*
 |*/
 
-/*N*/ void SwDrawContact::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew )
+/*N*/ void SwDrawContact::Modify( SfxPoolItem* /*pOld*/, SfxPoolItem* pNew )
 /*N*/ {
 /*N*/ 	//Es kommen immer Sets herein.
 /*N*/ 	//MA 03. Dec. 95: Falsch es kommen nicht immer Sets herein
@@ -984,63 +984,6 @@ void SwDrawContact::ConnectToLayout( const SwFmtAnchor* pAnch )
 }
 }
 break;
-/*
-case FLY_AT_FLY:
-{
-if( pAnch-GetCntntAnchor() ) // LAYER_IMPL
-{
-SwFrm *pAnchor = 0;
-//Erst einmal ueber den Inhalt suchen, weil konstant schnell. Kann
-//Bei verketteten Rahmen aber auch schief gehen, weil dann evtl.
-//niemals ein Frame zu dem Inhalt existiert. Dann muss leider noch
-//die Suche vom StartNode zum FrameFormat sein.
-SwNodeIndex aIdx( pAnch-GetCntntAnchor()-nNode );
-SwCntntNode *pCNd = pFmt-GetDoc()-GetNodes().GoNext( aIdx );
-if ( pCNd  0 != (pAnchor = pCNd-GetFrm( 0, 0, FALSE ) ) )
-pAnchor = pAnchor-FindFlyFrm();
-else
-{
-const SwNodeIndex rIdx = pAnch-GetCntntAnchor()-nNode;
-SwSpzFrmFmts rFmts = *pFmt-GetDoc()-GetSpzFrmFmts();
-for( USHORT i = 0; i  rFmts.Count(); ++i )
-{
-SwFrmFmt *pFmt = rFmts[i];
-SwFlyFrmFmt* pFlyFmt;
-if( 0 != (pFlyFmt = PTR_CAST( SwFlyFrmFmt, pFmt )) 
-pFlyFmt-GetCntnt().GetCntntIdx()  //#57390#, Reader
-rIdx == *pFlyFmt-GetCntnt().GetCntntIdx() )
-{
-pAnchor = pFlyFmt-GetFrm( 0, FALSE );
-break;
-}
-}
-}
-if ( pAnchor )	//Kann sein, dass der Anker noch nicht existiert
-{
-pAnchor-FindFlyFrm()-AppendDrawObj( this );
-bSetAnchorPos = false;
-}
-}
-}
-break;
-*/
-/*
-case FLY_IN_CNTNT:
-{
-ClrContourCache( GetMaster() );
-SwCntntNode *pNode = GetFmt()-GetDoc()-
-GetNodes()[pAnch-GetCntntAnchor()-nNode]-GetCntntNode();
-SwCntntFrm *pCntnt = pNode-GetFrm( 0, 0, FALSE );
-if ( pCntnt )
-{
-//Kann sein, dass der Anker noch nicht existiert
-pCntnt-AppendDrawObj( this );
-pCntnt-InvalidatePrt();
-}
-bSetAnchorPos = false;
-}
-break;
-*/
 #ifdef DBG_UTIL
 default:	ASSERT( FALSE, Unknown Anchor. );
 #endif
@@ -1195,7 +1138,7 @@ const Point SwDrawVirtObj::GetOffset() const
 return maOffset;
 }
 
-void SwDrawVirtObj::operator=( const SdrObject rObj )
+void SwDrawVirtObj::operator=( const SdrObject /*rObj*/ )
 {
 DBG_BF_ASSERT(0, STRIP);//STRIP001 
 }
@@ -1334,7 +1277,7 @@ void SwDrawVirtObj::RecalcBoundRect()
 
 bool SwDrawVirtObj::Paint(ExtOutputDevice rOut, const SdrPaintInfoRec rInfoRec) const
 {
-bool bRet;
+bool bRet = FALSE;
 
 Point 

[Libreoffice] [PATCH 07/16] fix warning unused var in binfilter bf_sw fields

2010-12-05 Thread Pierre-André Jacquod
regards
From 0049d6aa3dd25887c742b51a764776103e67daf8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pierre-Andr=C3=A9=20Jacquod?= pjacq...@alumni.ethz.ch
Date: Sat, 4 Dec 2010 15:44:52 +0100
Subject: [PATCH 07/16] fix warning unused var in binfilter bf_sw fields

still only fixes, no optimization has been done. On purpose, avoid
introducing new bugs...
---
 binfilter/bf_sw/source/core/fields/sw_authfld.cxx |2 +-
 binfilter/bf_sw/source/core/fields/sw_dbfld.cxx   |2 +-
 binfilter/bf_sw/source/core/fields/sw_docufld.cxx |4 ++--
 binfilter/bf_sw/source/core/fields/sw_fldbas.cxx  |6 +++---
 binfilter/bf_sw/source/core/fields/sw_usrfld.cxx  |2 +-
 5 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/binfilter/bf_sw/source/core/fields/sw_authfld.cxx b/binfilter/bf_sw/source/core/fields/sw_authfld.cxx
index 4a1bf01..289ca69 100644
--- a/binfilter/bf_sw/source/core/fields/sw_authfld.cxx
+++ b/binfilter/bf_sw/source/core/fields/sw_authfld.cxx
@@ -402,7 +402,7 @@ USHORT  SwAuthorityFieldType::GetSequencePos(long nHandle)
 //body the directly available text node will be used
 if(!pTxtNode)
 pTxtNode = rFldTxtNode;
-ULONG nPos = pTxtNode-GetIndex();
+pTxtNode-GetIndex();
 if( pTxtNode-GetTxt().Len()  pTxtNode-GetFrm() 
 pTxtNode-GetNodes().IsDocNodes() )
 {
diff --git a/binfilter/bf_sw/source/core/fields/sw_dbfld.cxx b/binfilter/bf_sw/source/core/fields/sw_dbfld.cxx
index 435500c..62950a9 100644
--- a/binfilter/bf_sw/source/core/fields/sw_dbfld.cxx
+++ b/binfilter/bf_sw/source/core/fields/sw_dbfld.cxx
@@ -573,7 +573,7 @@ BOOL SwDBNameInfField::PutValue( const ::com::sun::star::uno::Any rAny, BYTE nM
 
 /*N*/ SwDBNextSetField::SwDBNextSetField(SwDBNextSetFieldType* pTyp,
 /*N*/    const String rCond,
-/*N*/    const String rDummy,
+/*N*/    const String /*rDummy*/ ,
 /*N*/    const SwDBData rDBData) :
 /*N*/ 	SwDBNameInfField(pTyp, rDBData), aCond(rCond), bCondValid(TRUE)
 /*N*/ {}
diff --git a/binfilter/bf_sw/source/core/fields/sw_docufld.cxx b/binfilter/bf_sw/source/core/fields/sw_docufld.cxx
index 0318cae..e2f0090 100644
--- a/binfilter/bf_sw/source/core/fields/sw_docufld.cxx
+++ b/binfilter/bf_sw/source/core/fields/sw_docufld.cxx
@@ -1254,7 +1254,7 @@ BOOL SwDocInfoField::PutValue( const uno::Any rAny, BYTE nMId )
 /*N*/ 
 /*N*/ 	if( TYP_CONDTXTFLD == nSubType )
 /*N*/ 	{
-/*N*/ 		SwNewDBMgr* pMgr = pDoc-GetNewDBMgr();
+/*N*/ 		pDoc-GetNewDBMgr();
 /*N*/ 
 /*N*/ 		bValid = sal_False;
 /*N*/ 		String sTmpName;
@@ -1686,7 +1686,7 @@ BOOL SwPostItField::PutValue( const uno::Any rAny, BYTE nMId )
 /* ---
 
  ---*/
-/*N*/ String SwExtUserFieldType::Expand(sal_uInt16 nSub, sal_uInt32 nFormat) const
+/*N*/ String SwExtUserFieldType::Expand(sal_uInt16 nSub, sal_uInt32 /*nFormat*/) const
 /*N*/ {
 /*N*/ 	SvxAddressItem aAdr;
 /*N*/ 	String aRet( aEmptyStr );
diff --git a/binfilter/bf_sw/source/core/fields/sw_fldbas.cxx b/binfilter/bf_sw/source/core/fields/sw_fldbas.cxx
index 5bc383c..96fda38 100644
--- a/binfilter/bf_sw/source/core/fields/sw_fldbas.cxx
+++ b/binfilter/bf_sw/source/core/fields/sw_fldbas.cxx
@@ -203,10 +203,10 @@ using namespace ::com::sun::star;
 /*N*/ 	return GetPar2();
 /*N*/ }
 
-void SwField::SetPar1(const String rStr)
+void SwField::SetPar1(const String /*rStr*/)
 {}
 
-void SwField::SetPar2(const String rStr)
+void SwField::SetPar2(const String /*rStr*/)
  {}
 
 /*N*/ USHORT SwField::GetSubType() const
@@ -215,7 +215,7 @@ void SwField::SetPar2(const String rStr)
 /*N*/ 	return 0;
 /*N*/ }
 
-void SwField::SetSubType(USHORT nType)
+void SwField::SetSubType(USHORT /*nType*/)
 {
 //  ASSERT(0, Sorry Not implemented);
 }
diff --git a/binfilter/bf_sw/source/core/fields/sw_usrfld.cxx b/binfilter/bf_sw/source/core/fields/sw_usrfld.cxx
index f7862a8..8198a19 100644
--- a/binfilter/bf_sw/source/core/fields/sw_usrfld.cxx
+++ b/binfilter/bf_sw/source/core/fields/sw_usrfld.cxx
@@ -298,7 +298,7 @@ void SwUserField::SetPar2(const String rStr)
 /*N*/ 		if( GetDoc()-GetDrawModel()  GetDepends() )
 /*?*/ 		{DBG_BF_ASSERT(0, STRIP); }//STRIP001 	((SwDPage*)GetDoc()-GetDrawModel()-GetPage( 0 ))-
 /*N*/
-/*N*/ 		sal_Bool bModified = GetDoc()-IsModified();
+/*N*/ 		GetDoc()-IsModified();
 /*N*/ 		GetDoc()-SetModified();
 /*N*/ 	}
 /*N*/ }
-- 
1.7.1

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


[Libreoffice] [PATCH 09/16] fix warning unused var in binfilter bf_sw ole

2010-12-05 Thread Pierre-André Jacquod
regards
From 5a619e9399713a488eeadc484617e630ed9d06ba Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pierre-Andr=C3=A9=20Jacquod?= pjacq...@alumni.ethz.ch
Date: Sat, 4 Dec 2010 20:02:57 +0100
Subject: [PATCH 09/16] fix warning unused var in binfilter bf_sw ole

---
 binfilter/bf_sw/source/core/ole/sw_ndole.cxx |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/binfilter/bf_sw/source/core/ole/sw_ndole.cxx b/binfilter/bf_sw/source/core/ole/sw_ndole.cxx
index 111943e..8a1a31b 100644
--- a/binfilter/bf_sw/source/core/ole/sw_ndole.cxx
+++ b/binfilter/bf_sw/source/core/ole/sw_ndole.cxx
@@ -85,7 +85,7 @@ public:
 };
 
 void SwOLELRUCache::Commit() {}
-void SwOLELRUCache::Notify( const ::com::sun::star::uno::Sequence rtl::OUString  aPropertyNames ) {}
+void SwOLELRUCache::Notify( const ::com::sun::star::uno::Sequence rtl::OUString  /*aPropertyNames*/ ) {}
 
 SwOLELRUCache* SwOLEObj::pOLELRU_Cache = 0;
 
-- 
1.7.1

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


[Libreoffice] [PATCH 10/16] fix warning unused var in binfilter bf_sw sw3io

2010-12-05 Thread Pierre-André Jacquod
regards
From 18b052aa37f4adb95f3250de4967b739bd14be11 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pierre-Andr=C3=A9=20Jacquod?= pjacq...@alumni.ethz.ch
Date: Sat, 4 Dec 2010 20:07:52 +0100
Subject: [PATCH 10/16] fix warning unused var in binfilter bf_sw sw3io

---
 binfilter/bf_sw/source/core/sw3io/sw_sw3field.cxx |2 +-
 binfilter/bf_sw/source/core/sw3io/sw_sw3imp.cxx   |3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/binfilter/bf_sw/source/core/sw3io/sw_sw3field.cxx b/binfilter/bf_sw/source/core/sw3io/sw_sw3field.cxx
index e014201..fb043ad 100644
--- a/binfilter/bf_sw/source/core/sw3io/sw_sw3field.cxx
+++ b/binfilter/bf_sw/source/core/sw3io/sw_sw3field.cxx
@@ -2303,7 +2303,7 @@ SwAuthorityFieldType* lcl_sw3io_InAuthorityFieldType( Sw3IoImp rIo )
 ASSERT( !rIo.IsSw31Export(),
 Wer will denn da ein Script-Feld exportieren );
 
-BYTE cFlags = ((SwScriptField*)pFld)-IsCodeURL() ? 0x01 : 0x00;
+((SwScriptField*)pFld)-IsCodeURL() ? 0x01 : 0x00;
 
 String aCode;
 if( ((SwScriptField*)pFld)-IsCodeURL() )
diff --git a/binfilter/bf_sw/source/core/sw3io/sw_sw3imp.cxx b/binfilter/bf_sw/source/core/sw3io/sw_sw3imp.cxx
index 0bed171..d1cb2dc 100644
--- a/binfilter/bf_sw/source/core/sw3io/sw_sw3imp.cxx
+++ b/binfilter/bf_sw/source/core/sw3io/sw_sw3imp.cxx
@@ -424,7 +424,7 @@ public:
 /*N*/ 	{
 /*N*/ 		if( pDoc-GetDrawModel() )
 /*N*/ 		{
-/*N*/ 			SdrPage *pPage = pDoc-GetDrawModel()-GetPage( 0 );
+/*N*/ 			pDoc-GetDrawModel()-GetPage( 0 );
 /*N*/ 			SwHiddenDrawObjList_Impl::const_iterator aIter = pHiddenDrawObjs-begin();
 /*N*/ 			while( aIter != pHiddenDrawObjs-end() )
 /*N*/ 			{
@@ -1747,7 +1747,6 @@ const int RES_POOLCOLL_HTML_DT_40 = 0x3007;
 /*N*/ 		// Autoformate in dieser Liste muessen mit einer
 /*N*/ 		// Extension versehen werden!
 /*N*/ 		sal_uInt16 nFmtId =  0;
-/*N*/ 		const String rName = rFmt.GetName();
 /*N*/ 		// TODO: unicode: correct?
 /*N*/ 		if( rFmt.IsAuto() ) 		// Autoformat
 /*N*/ 			nFmtId = Count()+1; //++nId;
-- 
1.7.1

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


[Libreoffice] [PATCH 11/16] fix warning unused var in binfilter bf_sw swg

2010-12-05 Thread Pierre-André Jacquod
regards
From c8861cfc5de23428356c1a5cf6aaed6d2a0eced3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pierre-Andr=C3=A9=20Jacquod?= pjacq...@alumni.ethz.ch
Date: Sat, 4 Dec 2010 20:13:44 +0100
Subject: [PATCH 11/16] fix warning unused var in binfilter bf_sw swg

---
 binfilter/bf_sw/source/core/swg/sw_rdflds.cxx |2 +-
 binfilter/bf_sw/source/core/swg/sw_rdhnt.cxx  |4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/binfilter/bf_sw/source/core/swg/sw_rdflds.cxx b/binfilter/bf_sw/source/core/swg/sw_rdflds.cxx
index 4db68bb..fc13bd3 100644
--- a/binfilter/bf_sw/source/core/swg/sw_rdflds.cxx
+++ b/binfilter/bf_sw/source/core/swg/sw_rdflds.cxx
@@ -541,7 +541,7 @@ static SwField* In_SwDocInfoField( SwSwgReader rPar, SwDocInfoFieldType* pType,
 return new SwDocInfoField( pType, (USHORT)nType | nSubType );
 }
 
-static SwField* In_SwTemplNameField( SwSwgReader rPar, SwTemplNameFieldType* pType )
+static SwField* In_SwTemplNameField( SwSwgReader /*rPar*/, SwTemplNameFieldType* pType )
 {
 return new SwTemplNameField( pType, nNewFldFmt );
 }
diff --git a/binfilter/bf_sw/source/core/swg/sw_rdhnt.cxx b/binfilter/bf_sw/source/core/swg/sw_rdhnt.cxx
index e3650e6..27f4857 100644
--- a/binfilter/bf_sw/source/core/swg/sw_rdhnt.cxx
+++ b/binfilter/bf_sw/source/core/swg/sw_rdhnt.cxx
@@ -340,7 +340,7 @@ static USHORT InSWG_SwNoHyphenHere
 }
 
 static USHORT InSWG_SwSoftHyphen
-( SwSwgReader rPar, SfxItemSet* pSet, SwTxtNode* pNd, xub_StrLen nBgn, xub_StrLen nEnd )
+( SwSwgReader /*rPar*/, SfxItemSet* pSet, SwTxtNode* pNd, xub_StrLen nBgn, xub_StrLen /*nEnd*/ )
 {
 if( !pSet )
 pNd-Insert( CHAR_SOFTHYPHEN, SwIndex( pNd, nBgn ));
@@ -348,7 +348,7 @@ static USHORT InSWG_SwSoftHyphen
 }
 
 static USHORT InSWG_SwHardBlank
-( SwSwgReader rPar, SfxItemSet* pSet, SwTxtNode* pNd, xub_StrLen nBgn, xub_StrLen nEnd )
+( SwSwgReader /*rPar*/, SfxItemSet* pSet, SwTxtNode* pNd, xub_StrLen nBgn, xub_StrLen /*nEnd*/ )
 {
 if( !pSet )
 pNd-Insert( CHAR_HARDBLANK, SwIndex( pNd, nBgn ));
-- 
1.7.1

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


[Libreoffice] [PATCH 12/16] fix warning unused var binfilter bf_sw text

2010-12-05 Thread Pierre-André Jacquod
regards
From 22f6a25fcbba5eb41b73436f36a9542b2f898ef4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pierre-Andr=C3=A9=20Jacquod?= pjacq...@alumni.ethz.ch
Date: Sat, 4 Dec 2010 20:38:53 +0100
Subject: [PATCH 12/16] fix warning unused var binfilter bf_sw text

---
 binfilter/bf_sw/source/core/text/sw_atrstck.cxx  |5 ++---
 binfilter/bf_sw/source/core/text/sw_frmform.cxx  |6 +-
 binfilter/bf_sw/source/core/text/sw_itrform2.cxx |4 ++--
 binfilter/bf_sw/source/core/text/sw_itrtxt.cxx   |4 
 binfilter/bf_sw/source/core/text/sw_porexp.cxx   |2 +-
 binfilter/bf_sw/source/core/text/sw_porfld.cxx   |5 ++---
 binfilter/bf_sw/source/core/text/sw_porlin.cxx   |6 +++---
 binfilter/bf_sw/source/core/text/sw_porrst.cxx   |6 +++---
 binfilter/bf_sw/source/core/text/sw_portxt.cxx   |2 +-
 binfilter/bf_sw/source/core/text/sw_txtfld.cxx   |2 +-
 binfilter/bf_sw/source/core/text/sw_txtfly.cxx   |2 +-
 binfilter/bf_sw/source/core/text/sw_txtftn.cxx   |   15 +++
 binfilter/bf_sw/source/core/text/sw_txthyph.cxx  |2 +-
 13 files changed, 25 insertions(+), 36 deletions(-)

diff --git a/binfilter/bf_sw/source/core/text/sw_atrstck.cxx b/binfilter/bf_sw/source/core/text/sw_atrstck.cxx
index 91eeaec..4c678ac 100644
--- a/binfilter/bf_sw/source/core/text/sw_atrstck.cxx
+++ b/binfilter/bf_sw/source/core/text/sw_atrstck.cxx
@@ -376,7 +376,7 @@ const BYTE StackPos[ RES_TXTATR_WITHEND_END - RES_CHRATR_BEGIN + 1 ] = {
  *  SwAttrHandler::Push()
  */
 
-/*M*/ sal_Bool SwAttrHandler::Push( const SwTxtAttr rAttr, const SfxPoolItem rItem, SwFont rFnt )
+/*M*/ sal_Bool SwAttrHandler::Push( const SwTxtAttr rAttr, const SfxPoolItem rItem, SwFont /*rFnt*/ )
 /*M*/ {
 /*M*/ ASSERT( rItem.Which()  RES_TXTATR_WITHEND_END ||
 /*M*/ RES_UNKNOWNATR_CONTAINER == rItem.Which() ,
@@ -692,12 +692,11 @@ const BYTE StackPos[ RES_TXTATR_WITHEND_END - RES_CHRATR_BEGIN + 1 ] = {
 /*M*/ break;
 /*M*/ 
 /*M*/ USHORT nRotateStack = StackPos[ RES_CHRATR_ROTATE ];
-/*M*/ const SfxPoolItem* pRotateItem = 0;
 /*M*/ const SwTxtAttr* pRotateAttr = aAttrStack[ nRotateStack ].Top();
 /*M*/ 
 /*M*/ if ( pRotateAttr )
 /*M*/ {
-/*?*/DBG_BF_ASSERT(0, STRIP); //STRIP001  pRotateItem = lcl_GetItem( *pRotateAttr, RES_CHRATR_ROTATE );
+/*?*/DBG_BF_ASSERT(0, STRIP);
 /*M*/ }
 /*M*/ else
 /*M*/ rFnt.SetVertical(
diff --git a/binfilter/bf_sw/source/core/text/sw_frmform.cxx b/binfilter/bf_sw/source/core/text/sw_frmform.cxx
index a373014..afa7067 100644
--- a/binfilter/bf_sw/source/core/text/sw_frmform.cxx
+++ b/binfilter/bf_sw/source/core/text/sw_frmform.cxx
@@ -606,8 +606,6 @@ MSHORT FormatLevel::nLevel = 0;
 /*?*/ 		const SwpHints *pHints = pFoll-GetTxtNode()-GetpSwpHints();
 /*?*/ 		if( pHints )
 /*?*/ 		{
-/*?*/ 			SwFtnBossFrm *pFtnBoss = 0;
-/*?*/ 			SwFtnBossFrm *pEndBoss = 0;
 /*?*/ 			for( MSHORT i = 0; i  pHints-Count(); ++i )
 /*?*/ 			{
 /*?*/ const SwTxtAttr *pHt = (*pHints)[i];
@@ -662,8 +660,6 @@ MSHORT FormatLevel::nLevel = 0;
 /*?*/ 		const SwpHints *pHints = GetTxtNode()-GetpSwpHints();
 /*?*/ 		if( pHints )
 /*?*/ 		{
-/*?*/ 			SwFtnBossFrm *pFtnBoss = 0;
-/*?*/ 			SwFtnBossFrm *pEndBoss = 0;
 /*?*/ 			for( MSHORT i = 0; i  pHints-Count(); ++i )
 /*?*/ 			{
 /*?*/ const SwTxtAttr *pHt = (*pHints)[i];
@@ -991,7 +987,7 @@ MSHORT FormatLevel::nLevel = 0;
 /*N*/ 	{   // Wenn wir Zeilen abgeben, darf kein Join auf den Folows gerufen werden,
 /*N*/ 		// im Gegenteil, es muss ggf. sogar ein Follow erzeugt werden.
 /*N*/ 		// Dies muss auch geschehen, wenn die Textmasse komplett im Master
-/*N*/ 		// bleibt, denn es könnte ja ein harter Zeilenumbruch noch eine weitere
+/*N*/ 		// bleibt, denn es k�nnte ja ein harter Zeilenumbruch noch eine weitere
 /*N*/ 		// Zeile (ohne Textmassse) notwendig machen!
 /*N*/ 		nEnd = rLine.GetEnd();
 /*N*/ 		if( GetFollow() )
diff --git a/binfilter/bf_sw/source/core/text/sw_itrform2.cxx b/binfilter/bf_sw/source/core/text/sw_itrform2.cxx
index 2a974cc..9465c2e 100644
--- a/binfilter/bf_sw/source/core/text/sw_itrform2.cxx
+++ b/binfilter/bf_sw/source/core/text/sw_itrform2.cxx
@@ -1445,7 +1445,7 @@ extern sal_Bool IsUnderlineBreak( const SwLinePortion rPor, const SwFont rFnt
 /*M*/ 	xub_StrLen nNewStart = nStart + pCurr-GetLen();
 /*M*/ 
 /*M*/ // adjust text if kana compression is enabled
-/*M*/ const SwScriptInfo rSI = GetInfo().GetParaPortion()-GetScriptInfo();
+/*M*/ GetInfo().GetParaPortion()-GetScriptInfo();
 /*M*/ 
 /*M*/ if ( GetInfo().CompressLine() )
 /*M*/ {
@@ -1535,7 +1535,7 @@ extern sal_Bool IsUnderlineBreak( const SwLinePortion rPor, const SwFont rFnt
 /*N*/ 
 /*N*/ 	// Das Dummyflag besitzen Zeilen, die nur Flyportions enthalten, diese
 /*N*/ 	// sollten kein Register etc. beachten. 

[Libreoffice] [PATCH 15/16] fix warning unused var in binfilter - bf_sw unocore

2010-12-05 Thread Pierre-André Jacquod
regards
From 151194c8a68754f9521bd485a9124f6e08f36239 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pierre-Andr=C3=A9=20Jacquod?= pjacq...@alumni.ethz.ch
Date: Sat, 4 Dec 2010 21:58:35 +0100
Subject: [PATCH 15/16] fix warning unused var in binfilter - bf_sw unocore

trying to stay on the safe side, means not always removing the function
call that initialized the parameter. So if this function call changed the
parameter, no issue.
---
 .../bf_sw/source/core/unocore/sw_unocrsrhelper.cxx |2 --
 binfilter/bf_sw/source/core/unocore/sw_unodraw.cxx |3 ---
 .../bf_sw/source/core/unocore/sw_unoframe.cxx  |6 ++
 binfilter/bf_sw/source/core/unocore/sw_unoftn.cxx  |1 -
 binfilter/bf_sw/source/core/unocore/sw_unoidx.cxx  |7 +++
 binfilter/bf_sw/source/core/unocore/sw_unoobj.cxx  |2 +-
 binfilter/bf_sw/source/core/unocore/sw_unoobj2.cxx |1 -
 .../bf_sw/source/core/unocore/sw_unoparagraph.cxx  |4 ++--
 binfilter/bf_sw/source/core/unocore/sw_unoport.cxx |2 +-
 .../bf_sw/source/core/unocore/sw_unoportenum.cxx   |5 ++---
 binfilter/bf_sw/source/core/unocore/sw_unosect.cxx |3 ---
 binfilter/bf_sw/source/core/unocore/sw_unosett.cxx |4 +---
 .../bf_sw/source/core/unocore/sw_unostyle.cxx  |   10 --
 binfilter/bf_sw/source/core/unocore/sw_unotbl.cxx  |   11 ---
 14 files changed, 20 insertions(+), 41 deletions(-)

diff --git a/binfilter/bf_sw/source/core/unocore/sw_unocrsrhelper.cxx b/binfilter/bf_sw/source/core/unocore/sw_unocrsrhelper.cxx
index 2f431f2..2969570 100644
--- a/binfilter/bf_sw/source/core/unocore/sw_unocrsrhelper.cxx
+++ b/binfilter/bf_sw/source/core/unocore/sw_unocrsrhelper.cxx
@@ -295,7 +295,6 @@ sal_Bool getCrsrPropertyValue(const SfxItemPropertyMap* pMap
 {
 const SwTableNode* pTblNode = pSttNode-FindTableNode();
 SwFrmFmt* pTableFmt = (SwFrmFmt*)pTblNode-GetTable().GetFrmFmt();
-SwTable rTable = ((SwTableNode*)pSttNode)-GetTable();
 if(FN_UNO_TEXT_TABLE == pMap-nWID)
 {
 Reference XTextTable   xTable = SwXTextTables::GetObject(*pTableFmt);
@@ -402,7 +401,6 @@ sal_Bool getCrsrPropertyValue(const SfxItemPropertyMap* pMap
 nPaMEnd = nTmp;
 }
 Sequence ::rtl::OUString aCharStyles;
-USHORT nCharStylesFound = 0;
 SwpHints* pHints = pTxtNode-GetpSwpHints();
 for(USHORT nAttr = 0; nAttr  pHints-GetStartCount(); nAttr++ )
 {
diff --git a/binfilter/bf_sw/source/core/unocore/sw_unodraw.cxx b/binfilter/bf_sw/source/core/unocore/sw_unodraw.cxx
index 37cb25e..48fcfa9 100644
--- a/binfilter/bf_sw/source/core/unocore/sw_unodraw.cxx
+++ b/binfilter/bf_sw/source/core/unocore/sw_unodraw.cxx
@@ -1541,7 +1541,6 @@ void SwXGroupShape::add( const Reference XShape  xShape ) throw (RuntimeExcep
 SwFrmFmt* pFmt = GetFrmFmt();
 if(pSvxShape  pFmt)
 {
-sal_Bool bOk = FALSE;
 ReferenceXShapes xShapes;
 if( xShapeAgg.is() )
 {
@@ -1594,7 +1593,6 @@ void SwXGroupShape::add( const Reference XShape  xShape ) throw (RuntimeExcep
 void SwXGroupShape::remove( const Reference XShape  xShape ) throw (RuntimeException)
 {
 SolarMutexGuard aGuard;
-sal_Bool bOk = FALSE;
 ReferenceXShapes xShapes;
 if( xShapeAgg.is() )
 {
@@ -1610,7 +1608,6 @@ void SwXGroupShape::remove( const Reference XShape  xShape ) throw (RuntimeEx
 sal_Int32 SwXGroupShape::getCount(void) throw( uno::RuntimeException )
 {
 SolarMutexGuard aGuard;
-sal_Int32 nRet = 0;
 ReferenceXIndexAccess xAcc;
 if( xShapeAgg.is() )
 {
diff --git a/binfilter/bf_sw/source/core/unocore/sw_unoframe.cxx b/binfilter/bf_sw/source/core/unocore/sw_unoframe.cxx
index 4d1fdbb..b8f2fc8 100644
--- a/binfilter/bf_sw/source/core/unocore/sw_unoframe.cxx
+++ b/binfilter/bf_sw/source/core/unocore/sw_unoframe.cxx
@@ -1570,7 +1570,7 @@ void SwXFrame::setPropertyToDefault( const OUString rPropertyName )
 SwFrmFmt* pFmt = GetFrmFmt();
 if(pFmt)
 {
-const SwAttrSet rFmtSet = pFmt-GetAttrSet();
+pFmt-GetAttrSet();
 const SfxItemPropertyMap* pCur = SfxItemPropertyMap::GetByName(_pMap, rPropertyName);
 if (!pCur)
 throw UnknownPropertyException(OUString ( RTL_CONSTASCII_USTRINGPARAM ( Unknown property:  ) ) + rPropertyName, static_cast  cppu::OWeakObject *  ( this ) );
@@ -1910,7 +1910,6 @@ void SwXFrame::attachToRange(const uno::Reference XTextRange   xTextRange)
 SvInPlaceObjectRef xIPObj;
 if( (*pCLSID) = aCLSID )
 {
-sal_Bool bInternal = sal_True;
 if( !aClassName.MakeId( aCLSID ) )
 {
 IllegalArgumentException aExcept;
@@ -2192,7 +2191,7 @@ uno::Reference XTextCursor   SwXTextFrame::createTextCursor(void) throw( Runti
 
 SwXTextCursor* 

[Libreoffice] [PATCH 16/16] removing code due to endless loop

2010-12-05 Thread Pierre-André Jacquod
regards
From 6551d69a5fbc85f3af92cada84bf543a083d4453 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pierre-Andr=C3=A9=20Jacquod?= pjacq...@alumni.ethz.ch
Date: Sat, 4 Dec 2010 22:05:10 +0100
Subject: [PATCH 16/16] removing code due to endless loop

these part of code have been removed. The While(true) loop
means either that the if statement is never taken, or that
the program hangs there. The second case is not safe, the first
case means that this code is not needed.
---
 binfilter/bf_sw/source/core/txtnode/sw_thints.cxx |   23 -
 1 files changed, 0 insertions(+), 23 deletions(-)

diff --git a/binfilter/bf_sw/source/core/txtnode/sw_thints.cxx b/binfilter/bf_sw/source/core/txtnode/sw_thints.cxx
index 06b91e2..1ad 100644
--- a/binfilter/bf_sw/source/core/txtnode/sw_thints.cxx
+++ b/binfilter/bf_sw/source/core/txtnode/sw_thints.cxx
@@ -923,16 +923,6 @@ using namespace ::com::sun::star::i18n;
 /*N*/
 /*N*/ 	if( pNd == this )
 /*N*/ 	{
-/*?*/ 		if( aThisSet.Count() )
-/*?*/ 		{
-/*?*/ 			SfxItemIter aIter( aThisSet );
-/*?*/ 			const SfxPoolItem* pItem = aIter.GetCurItem();
-/*?*/ 			while( TRUE )
-/*?*/ 			{
-DBG_BF_ASSERT(0, STRIP); //STRIP001 /*?*/ if( lcl_IsNewAttrInSet( *pSwpHints, *pItem, GetTxt().Len() ) )
-/*?*/ 			}
-/*?*/ 		}
-/*N*/
 /*N*/ 	}
 /*N*/ 	else
 /*N*/ 	{
@@ -947,19 +937,6 @@ using namespace ::com::sun::star::i18n;
 /*N*/ 		{
 /*?*/ 			DBG_BF_ASSERT(0, STRIP); //STRIP001 SfxItemIter aIter( aThisSet );
 /*N*/ 		}
-/*N*/
-/*N*/ 		if( aNdSet.Count() )
-/*N*/ 		{
-/*?*/ 			SfxItemIter aIter( aNdSet );
-/*?*/ 			const SfxPoolItem* pItem = aIter.GetCurItem();
-/*?*/ 			while( TRUE )
-/*?*/ 			{
-DBG_BF_ASSERT(0, STRIP); //STRIP001 /*?*/ if( lcl_IsNewAttrInSet( *pNd-pSwpHints, *pItem, pNd-GetTxt().Len() ) )
-/*?*/ 			}
-/*?*/
-/*?*/ 			SwFmtChg aTmp1( pNd-GetFmtColl() );
-/*?*/ 			pNd-SwModify::Modify( aTmp1, aTmp1 );
-/*N*/ 		}
 /*N*/ 	}
 /*N*/
 /*N*/ 	if( pNd-pSwpHints-CanBeDeleted() )
-- 
1.7.1

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


[Libreoffice] binfilter and features...

2010-12-04 Thread Pierre-André Jacquod
Hi,
currently trying to reduce the number of warning coming from binfilter,
I found quite a lot functions like:
func(var x)
{}
or
func(var x)
{ ASSERT (lksd)
}.
sometimes
func (var x)
{return false}

Would someone mind if I track down the call of such functions, remove
the calls and at the end remove the function? This would reduce and
simplified the codebase, also more efficient (less function calls) and -
I hope - a smaller LibO.

Of course, these functions are marker, but intend someone really to
developp binfilter ?

Which make me think: as new feature, for the next LibO release after
3.3, could it be that StarOffice file format are not supported any more,
at least in writing modus?. Reading files would open it in read only,
trying to save would produce a warning like this old format is
deprecated, please save in a new one. Maybe the same for the old OOo
format?

Or do you intend to drop this in a quicker way?

Just for feed-back.
regards
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice] crossing strange code: a little help

2010-12-04 Thread Pierre-André Jacquod
Hi
within
filters/binfilter/bf_sw/source/core/txtnode/sw_thints.cxx
line 955, I crossed this code construct:

if()
{
  .
  while (TRUE)
  {
  DBG_BF_ASSERT(0, STRIP);
  }
  
}

 With and without debugging option on, if the if is entered, then
this is an endless loop? Does it means that the IF is never taken?
thanks
regards
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice



[Libreoffice] [PATCH] making binfilter compiling again

2010-12-03 Thread Pierre-André Jacquod
Thanks to review and push it quite quickly if possible.
Changes have been done (for RTL_OUSTRING_...) without looking that the
namespace rtl is not declared.
I did not introduced it but just corrected the entries, since I am not
enough familiar to know which is the prefered situation within the project.
regards

From a70f9654155a6fd17747305afb717471aac92b4c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pierre-Andr=C3=A9=20Jacquod?= pjacq...@alumni.ethz.ch
Date: Fri, 3 Dec 2010 20:39:37 +0100
Subject: [PATCH] making binfilter compiling again

changes for RTL_CONSTASCII_USTRINGPARAM without taking into account
namespaces
---
 binfilter/bf_sfx2/source/config/sfx2_evntconf.cxx  |   14 +++---
 .../bf_sfx2/source/notify/sfx2_eventsupplier.cxx   |6 +++---
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/binfilter/bf_sfx2/source/config/sfx2_evntconf.cxx b/binfilter/bf_sfx2/source/config/sfx2_evntconf.cxx
index b66811f..7f31956 100644
--- a/binfilter/bf_sfx2/source/config/sfx2_evntconf.cxx
+++ b/binfilter/bf_sfx2/source/config/sfx2_evntconf.cxx
@@ -374,13 +374,13 @@ void SfxEventConfigItem_Impl::Init( SfxConfigManager *pMgr )
 /*N*/ OUSTRINGaLib= pMacro-GetLibName();
 /*N*/ OUSTRINGaMacro  = pMacro-GetMacName();
 /*N*/ 
-/*N*/ pValues[ 0 ].Name = OUString(RTL_CONSTASCII_USTRINGPARAM( PROP_EVENT_TYPE ));
+/*N*/ pValues[ 0 ].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( PROP_EVENT_TYPE ));
 /*N*/ pValues[ 0 ].Value = aType;
 /*N*/ 
-/*N*/ pValues[ 1 ].Name = OUString(RTL_CONSTASCII_USTRINGPARAM( PROP_LIBRARY ));
+/*N*/ pValues[ 1 ].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( PROP_LIBRARY ));
 /*N*/ pValues[ 1 ].Value = aLib;
 /*N*/ 
-/*N*/ pValues[ 2 ].Name = OUString(RTL_CONSTASCII_USTRINGPARAM( PROP_MACRO_NAME ));
+/*N*/ pValues[ 2 ].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( PROP_MACRO_NAME ));
 /*N*/ pValues[ 2 ].Value = aMacro;
 /*N*/ 
 /*N*/ aEventData = aProperties;
@@ -393,10 +393,10 @@ void SfxEventConfigItem_Impl::Init( SfxConfigManager *pMgr )
 /*?*/ OUSTRINGaLib= pMacro-GetLibName();
 /*?*/ OUSTRINGaMacro  = pMacro-GetMacName();
 /*?*/ 
-/*?*/ pValues[ 0 ].Name = OUString(RTL_CONSTASCII_USTRINGPARAM( PROP_EVENT_TYPE ));
+/*?*/ pValues[ 0 ].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( PROP_EVENT_TYPE ));
 /*?*/ pValues[ 0 ].Value = aLib;
 /*?*/ 
-/*?*/ pValues[ 1 ].Name = OUString(RTL_CONSTASCII_USTRINGPARAM( PROP_SCRIPT ));
+/*?*/ pValues[ 1 ].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( PROP_SCRIPT ));
 /*?*/ pValues[ 1 ].Value = aMacro;
 /*?*/ 
 /*?*/ aEventData = aProperties;
@@ -408,10 +408,10 @@ void SfxEventConfigItem_Impl::Init( SfxConfigManager *pMgr )
 /*?*/ 
 /*?*/ OUSTRINGaMacro  = pMacro-GetMacName();
 /*?*/ 
-/*?*/ pValues[ 0 ].Name = OUString(RTL_CONSTASCII_USTRINGPARAM( PROP_EVENT_TYPE ));
+/*?*/ pValues[ 0 ].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( PROP_EVENT_TYPE ));
 /*?*/ pValues[ 0 ].Value = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SVX_MACRO_LANGUAGE_JAVASCRIPT));
 /*?*/ 
-/*?*/ pValues[ 1 ].Name = OUString(RTL_CONSTASCII_USTRINGPARAM( PROP_MACRO_NAME ));
+/*?*/ pValues[ 1 ].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( PROP_MACRO_NAME ));
 /*?*/ pValues[ 1 ].Value = aMacro;
 /*?*/ 
 /*?*/ aEventData = aProperties;
diff --git a/binfilter/bf_sfx2/source/notify/sfx2_eventsupplier.cxx b/binfilter/bf_sfx2/source/notify/sfx2_eventsupplier.cxx
index 117b1ef..bdd2134 100644
--- a/binfilter/bf_sfx2/source/notify/sfx2_eventsupplier.cxx
+++ b/binfilter/bf_sfx2/source/notify/sfx2_eventsupplier.cxx
@@ -387,11 +387,11 @@ namespace binfilter {
 aLibrary = sDocument;
 }
 /*N*/ 
-/*N*/ 		aOutProps[1].Name = OUString(RTL_CONSTASCII_USTRINGPARAM( PROP_SCRIPT ));
+/*N*/ 		aOutProps[1].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( PROP_SCRIPT ));
 /*N*/ 		aOutProps[1].Value = aScript;
-/*N*/ 		aOutProps[2].Name = OUString(RTL_CONSTASCII_USTRINGPARAM( PROP_LIBRARY ));
+/*N*/ 		aOutProps[2].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( PROP_LIBRARY ));
 /*N*/ 		aOutProps[2].Value = aLibrary;
-/*N*/ 		aOutProps[3].Name = OUString(RTL_CONSTASCII_USTRINGPARAM( PROP_MACRO_NAME ));
+/*N*/ 		aOutProps[3].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( PROP_MACRO_NAME ));
 /*N*/ 		aOutProps[3].Value = aMacroName;
 /*N*/ 		rRet = aOutProps;
 /*N*/ }
-- 
1.7.1

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


Re: [Libreoffice] Script to find undocumented classes

2010-12-01 Thread Pierre-André Jacquod
Beware - I am a newcomer - maybe my point of view is quite wrong due to
lack of understanding. But then at least I will understand something
better :- )

My first remark: stepping in seems to me to be very difficult despite
the very friendly behaviour of people here.

 un-documented code-base is an incredibly valuable one - it turns out
 most commercial code-bases are a total mess internally; LibreOffice is
 nothing special. 

Gnap... depend of which software you are speaking, then... For having
(to) read a lot of code in a big software, I can say that
this one (I mean this commercial one) at least is well documented and
quite well written. And no, I do not work for them:- )

 IMHO we cannot and should not put a break on writing that
 just to improve merge-ability, 
Why not drop merging from OOO after LibO 3.3?  As newcomer, I have read
x times not here due to merge / not touch due to merge... Then I am
reluctant to touch some parts...At least, the burden should be on side
of person merging OOo into LibO, not be of a concern for people
contributing to LibO.

 enable the re-factoring that can make our APIs both
 pretty and intuitive over time,
I think would very help any newcomer stepping in. Currently hunting
warning, I do it deliberately in order to get used to the code and uses.
But even there, sometimes I skip the point, not being able after
following the function calling the function calling... and determining
for sure that the change would have a cross effect. And I do not even
tried yet to change a feature.
Deliberate choice from me, clear, but yeah...
Regards


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


[Libreoffice] [PATCH 4/5] trivial warning cleaning in binfilter - unocore (1)

2010-11-30 Thread Pierre-André Jacquod
regards

From f5aac0dd10c586fbcdcd8e6a86e396601db8ad27 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pierre-Andr=C3=A9=20Jacquod?= pjacq...@alumni.ethz.ch
Date: Mon, 29 Nov 2010 08:20:37 +0100
Subject: [PATCH 4/5] trivial warning cleaning in binfilter - unocore (1)

---
 .../source/core/unocore/sw_SwXTextDefaults.cxx |8 ++--
 binfilter/bf_sw/source/core/unocore/sw_unobkm.cxx  |   17 ---
 binfilter/bf_sw/source/core/unocore/sw_unodraw.cxx |9 ++-
 .../bf_sw/source/core/unocore/sw_unofield.cxx  |   24 ++---
 .../bf_sw/source/core/unocore/sw_unoframe.cxx  |   16 +++---
 binfilter/bf_sw/source/core/unocore/sw_unoftn.cxx  |   16 +++---
 binfilter/bf_sw/source/core/unocore/sw_unoidx.cxx  |   32 +---
 binfilter/bf_sw/source/core/unocore/sw_unoobj.cxx  |   16 +--
 .../bf_sw/source/core/unocore/sw_unorefmk.cxx  |   12 ++--
 binfilter/bf_sw/source/core/unocore/sw_unosect.cxx |   22 +
 binfilter/bf_sw/source/core/unocore/sw_unosett.cxx |   50 +++-
 11 files changed, 133 insertions(+), 89 deletions(-)

diff --git a/binfilter/bf_sw/source/core/unocore/sw_SwXTextDefaults.cxx b/binfilter/bf_sw/source/core/unocore/sw_SwXTextDefaults.cxx
index 14e8028..c1acdb5 100644
--- a/binfilter/bf_sw/source/core/unocore/sw_SwXTextDefaults.cxx
+++ b/binfilter/bf_sw/source/core/unocore/sw_SwXTextDefaults.cxx
@@ -166,28 +166,28 @@ Any SAL_CALL SwXTextDefaults::getPropertyValue( const OUString rPropertyName )
 }
 
 
-void SAL_CALL SwXTextDefaults::addPropertyChangeListener( const OUString rPropertyName, const Reference XPropertyChangeListener  xListener )
+void SAL_CALL SwXTextDefaults::addPropertyChangeListener( const OUString /*rPropertyName*/, const Reference XPropertyChangeListener  /*xListener*/ )
 throw(UnknownPropertyException, WrappedTargetException, RuntimeException)
 {
 DBG_WARNING ( not implemented );
 }
 
 
-void SAL_CALL SwXTextDefaults::removePropertyChangeListener( const OUString rPropertyName, const Reference XPropertyChangeListener  aListener )
+void SAL_CALL SwXTextDefaults::removePropertyChangeListener( const OUString /*rPropertyName*/, const Reference XPropertyChangeListener  /*aListener*/ )
 throw(UnknownPropertyException, WrappedTargetException, RuntimeException)
 {
 DBG_WARNING ( not implemented );
 }
 
 
-void SAL_CALL SwXTextDefaults::addVetoableChangeListener( const OUString rPropertyName, const Reference XVetoableChangeListener  aListener )
+void SAL_CALL SwXTextDefaults::addVetoableChangeListener( const OUString /*rPropertyName*/, const Reference XVetoableChangeListener  /*aListener*/ )
 throw(UnknownPropertyException, WrappedTargetException, RuntimeException)
 {
 DBG_WARNING ( not implemented );
 }
 
 
-void SAL_CALL SwXTextDefaults::removeVetoableChangeListener( const OUString rPropertyName, const Reference XVetoableChangeListener  aListener )
+void SAL_CALL SwXTextDefaults::removeVetoableChangeListener( const OUString /*rPropertyName*/, const Reference XVetoableChangeListener  /*aListener*/ )
 throw(UnknownPropertyException, WrappedTargetException, RuntimeException)
 {
 DBG_WARNING ( not implemented );
diff --git a/binfilter/bf_sw/source/core/unocore/sw_unobkm.cxx b/binfilter/bf_sw/source/core/unocore/sw_unobkm.cxx
index 98d174d..fead095 100644
--- a/binfilter/bf_sw/source/core/unocore/sw_unobkm.cxx
+++ b/binfilter/bf_sw/source/core/unocore/sw_unobkm.cxx
@@ -275,7 +275,7 @@ uno::Reference beans::XPropertySetInfo   SwXBookmark::getPropertySetInfo(void)
 return aRef;
 }
 
-void SwXBookmark::setPropertyValue(const OUString PropertyName, const uno::Any aValue)
+void SwXBookmark::setPropertyValue(const OUString PropertyName, const uno::Any /*aValue*/)
 throw( beans::UnknownPropertyException, beans::PropertyVetoException,
 lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException )
 {
@@ -294,25 +294,26 @@ uno::Any SwXBookmark::getPropertyValue(const OUString rPropertyName) throw( bea
 return aRet;
 }
 
-void SwXBookmark::addPropertyChangeListener(const OUString PropertyName,
-const uno::Reference beans::XPropertyChangeListener   aListener)
+void SwXBookmark::addPropertyChangeListener(const OUString /*PropertyName*/,
+const uno::Reference beans::XPropertyChangeListener   /*aListener*/)
 throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException )
 {
 }
 
-void SwXBookmark::removePropertyChangeListener(const OUString PropertyName,
-const uno::Reference beans::XPropertyChangeListener   aListener)
+void SwXBookmark::removePropertyChangeListener(const OUString /*PropertyName*/,
+const uno::Reference beans::XPropertyChangeListener   /*aListener*/)
 throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException )
 {
 }
 
-void SwXBookmark::addVetoableChangeListener(const OUString PropertyName,
-const uno::Reference beans::XVetoableChangeListener   aListener)
+void 

[Libreoffice] [PATCH 3/5] trivial warning fixes within binfilter bf_sw doc

2010-11-29 Thread Pierre-André Jacquod
regards
From 94ae830669bfc1df7b4235c45d0a6a72def30be2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pierre-Andr=C3=A9=20Jacquod?= pjacq...@alumni.ethz.ch
Date: Sun, 28 Nov 2010 21:09:30 +0100
Subject: [PATCH 3/5] trivial warning fixes within binfilter bf_sw doc

---
 .../bf_sw/source/core/doc/sw_SwStyleNameMapper.cxx |2 +-
 binfilter/bf_sw/source/core/doc/sw_doc.cxx |8 ++--
 binfilter/bf_sw/source/core/doc/sw_docbm.cxx   |6 +-
 binfilter/bf_sw/source/core/doc/sw_docchart.cxx|2 +-
 binfilter/bf_sw/source/core/doc/sw_docdde.cxx  |2 +-
 binfilter/bf_sw/source/core/doc/sw_docdesc.cxx |2 +-
 binfilter/bf_sw/source/core/doc/sw_docdraw.cxx |   18 ---
 binfilter/bf_sw/source/core/doc/sw_docedt.cxx  |2 +-
 binfilter/bf_sw/source/core/doc/sw_docfld.cxx  |4 +-
 binfilter/bf_sw/source/core/doc/sw_docfly.cxx  |4 +-
 binfilter/bf_sw/source/core/doc/sw_docfmt.cxx  |2 +-
 binfilter/bf_sw/source/core/doc/sw_docftn.cxx  |2 +-
 binfilter/bf_sw/source/core/doc/sw_doclay.cxx  |   14 +++---
 binfilter/bf_sw/source/core/doc/sw_docnum.cxx  |   10 ++--
 binfilter/bf_sw/source/core/doc/sw_docredln.cxx|   49 
 binfilter/bf_sw/source/core/doc/sw_docsort.cxx |4 +-
 binfilter/bf_sw/source/core/doc/sw_doctxm.cxx  |8 ++--
 binfilter/bf_sw/source/core/doc/sw_fmtcol.cxx  |4 +-
 binfilter/bf_sw/source/core/doc/sw_notxtfrm.cxx|8 ++--
 binfilter/bf_sw/source/core/doc/sw_number.cxx  |2 +-
 binfilter/bf_sw/source/core/doc/sw_poolfmt.cxx |2 +-
 binfilter/bf_sw/source/core/doc/sw_swtable.cxx |6 +-
 binfilter/bf_sw/source/core/doc/sw_tblrwcl.cxx |4 +-
 binfilter/bf_sw/source/core/doc/sw_visiturl.cxx|2 +-
 24 files changed, 70 insertions(+), 97 deletions(-)

diff --git a/binfilter/bf_sw/source/core/doc/sw_SwStyleNameMapper.cxx b/binfilter/bf_sw/source/core/doc/sw_SwStyleNameMapper.cxx
index 159c82a..9a4b51c 100644
--- a/binfilter/bf_sw/source/core/doc/sw_SwStyleNameMapper.cxx
+++ b/binfilter/bf_sw/source/core/doc/sw_SwStyleNameMapper.cxx
@@ -709,7 +709,7 @@ const struct SwTableEntry NumRuleProgNameTable [] =
 /*N*/ }
 
 // Get the programmatic Name from the pool ID
-/*N*/ void SwStyleNameMapper::FillProgName ( sal_uInt16 nId, String rFillName )
+/*N*/ void SwStyleNameMapper::FillProgName ( sal_uInt16 /*nId*/, String /*rFillName*/ )
 /*N*/ {DBG_BF_ASSERT(0, STRIP); //STRIP001
 /*N*/ }
 // Get the programmatic Name from the pool ID
diff --git a/binfilter/bf_sw/source/core/doc/sw_doc.cxx b/binfilter/bf_sw/source/core/doc/sw_doc.cxx
index 3c5811c..c5bfcc0 100644
--- a/binfilter/bf_sw/source/core/doc/sw_doc.cxx
+++ b/binfilter/bf_sw/source/core/doc/sw_doc.cxx
@@ -487,7 +487,7 @@ void SwDoc::SetGlobalMacro( USHORT nEvent, const SvxMacro rMacro )
 //JP 24.06.96: Ist der ArrayPointer 0 dann returne nur, ob im Doc. eine
 //RefMark gesetzt ist
 // OS 25.06.96: ab jetzt wird immer die Anzahl der Referenzen returnt
-/*N*/ USHORT SwDoc::GetRefMarks( SvStringsDtor* pNames ) const
+/*N*/ USHORT SwDoc::GetRefMarks( SvStringsDtor* /*pNames*/ ) const
 /*N*/ {
 /*N*/ DBG_BF_ASSERT(0, STRIP); return 0;//STRIP001 	const SfxPoolItem* pItem;
 /*N*/ }
@@ -524,9 +524,9 @@ void SwDoc::SetGlobalMacro( USHORT nEvent, const SvxMacro rMacro )
 /*N*/ }
 
 
-/*N*/ void SwDoc::ReRead( SwPaM rPam, const String rGrfName,
-/*N*/ 	const String rFltName, const Graphic* pGraphic,
-/*N*/ 	const BfGraphicObject* pGrafObj )
+/*N*/ void SwDoc::ReRead( SwPaM /*rPam*/, const String /*rGrfName*/,
+/*N*/ 	const String /*rFltName*/, const Graphic* /*pGraphic*/,
+/*N*/ 	const BfGraphicObject* /*pGrafObj*/ )
 /*N*/ {
 DBG_BF_ASSERT(0, STRIP); //STRIP001 	SwGrfNode *pGrfNd;
 /*N*/ }
diff --git a/binfilter/bf_sw/source/core/doc/sw_docbm.cxx b/binfilter/bf_sw/source/core/doc/sw_docbm.cxx
index ca32fb5..f0ce7bb 100644
--- a/binfilter/bf_sw/source/core/doc/sw_docbm.cxx
+++ b/binfilter/bf_sw/source/core/doc/sw_docbm.cxx
@@ -181,7 +181,7 @@ namespace binfilter {
 
 // erzeugt einen eindeutigen Namen. Der Name selbst muss vorgegeben
 // werden, es wird dann bei gleichen Namen nur durchnumeriert.
-/*N*/ void SwDoc::MakeUniqueBookmarkName( String rNm )
+/*N*/ void SwDoc::MakeUniqueBookmarkName( String /*rNm*/ )
 /*N*/ {
 /*?*/ 	DBG_BF_ASSERT(0, STRIP); //STRIP001 ASSERT( rNm.Len(), es sollte ein Name vorgegeben werden! );
 /*N*/ }
@@ -189,8 +189,8 @@ namespace binfilter {
 /*  */
 
 /*N*/ SaveBookmark::SaveBookmark( int eType, const SwBookmark rBkmk,
-/*N*/ 			const SwNodeIndex  rMvPos,
-/*N*/ 			const SwIndex* pIdx )
+/*N*/ 			const SwNodeIndex /*rMvPos*/,
+/*N*/ 			const SwIndex* /*pIdx*/ )
 /*N*/ 	: aName( rBkmk.GetName() ), aShortName( rBkmk.GetShortName() ),
 /*N*/ 	aCode( rBkmk.GetKeyCode() ), eBkmkType( (SaveBookmarkType)eType ),
 /*N*/ 	eOrigBkmType(rBkmk.GetType())
diff --git a/binfilter/bf_sw/source/core/doc/sw_docchart.cxx 

[Libreoffice] [PATCH 5/5] trivial warning cleaning in binfilter - unocore (2)

2010-11-29 Thread Pierre-André Jacquod
regards
From 09642903881c193ff01f2801461dcddeae0931ad Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pierre-Andr=C3=A9=20Jacquod?= pjacq...@alumni.ethz.ch
Date: Mon, 29 Nov 2010 22:13:22 +0100
Subject: [PATCH 5/5] trivial warning cleaning in binfilter - unocore (2)

---
 binfilter/bf_sw/source/core/unocore/sw_unodraw.cxx |   12 ++-
 binfilter/bf_sw/source/core/unocore/sw_unomap.cxx  |   11 +--
 binfilter/bf_sw/source/core/unocore/sw_unoobj2.cxx |8 +-
 .../bf_sw/source/core/unocore/sw_unoparagraph.cxx  |   27 ---
 binfilter/bf_sw/source/core/unocore/sw_unoport.cxx |   32 ---
 .../bf_sw/source/core/unocore/sw_unoredline.cxx|   12 ++--
 .../bf_sw/source/core/unocore/sw_unoredlines.cxx   |4 +-
 binfilter/bf_sw/source/core/unocore/sw_unosrch.cxx |   16 +++-
 .../bf_sw/source/core/unocore/sw_unostyle.cxx  |   26 +++---
 binfilter/bf_sw/source/core/unocore/sw_unotbl.cxx  |   90 ++--
 binfilter/bf_sw/source/core/unocore/sw_unotext.cxx |   18 ++--
 11 files changed, 155 insertions(+), 101 deletions(-)

diff --git a/binfilter/bf_sw/source/core/unocore/sw_unodraw.cxx b/binfilter/bf_sw/source/core/unocore/sw_unodraw.cxx
index 5533ee5..37cb25e 100644
--- a/binfilter/bf_sw/source/core/unocore/sw_unodraw.cxx
+++ b/binfilter/bf_sw/source/core/unocore/sw_unodraw.cxx
@@ -1285,27 +1285,29 @@ Any SwXShape::getPropertyDefault( const OUString rPropertyName )
 return aRet;
 }
 
-void SwXShape::addPropertyChangeListener(const OUString /*PropertyName*/, const Reference XPropertyChangeListener   /*aListener*/) 
+void SwXShape::addPropertyChangeListener(const OUString /*PropertyName*/,
+const Reference XPropertyChangeListener   /*aListener*/)
 throw( UnknownPropertyException, WrappedTargetException, RuntimeException )
 {
 DBG_WARNING(not implemented);
 }
 
 void SwXShape::removePropertyChangeListener(
-const OUString PropertyName,
-const Reference XPropertyChangeListener   aListener)
+const OUString /*PropertyName*/,const Reference XPropertyChangeListener   /*aListener*/)
 throw( UnknownPropertyException, WrappedTargetException, RuntimeException )
 {
 DBG_WARNING(not implemented);
 }
 
-void SwXShape::addVetoableChangeListener(const OUString /*PropertyName*/, const Reference XVetoableChangeListener   /*aListener*/) 
+void SwXShape::addVetoableChangeListener(
+const OUString /*PropertyName*/, const Reference XVetoableChangeListener   /*aListener*/)
 throw( UnknownPropertyException, WrappedTargetException, RuntimeException )
 {
 DBG_WARNING(not implemented);
 }
 
-void SwXShape::removeVetoableChangeListener(const OUString /*PropertyName*/, const Reference XVetoableChangeListener   /*aListener*/) 
+void SwXShape::removeVetoableChangeListener(const OUString /*PropertyName*/,
+const Reference XVetoableChangeListener   /*aListener*/)
 throw( UnknownPropertyException, WrappedTargetException, RuntimeException )
 {
 DBG_WARNING(not implemented);
diff --git a/binfilter/bf_sw/source/core/unocore/sw_unomap.cxx b/binfilter/bf_sw/source/core/unocore/sw_unomap.cxx
index 0d0fd71..1a46a94 100644
--- a/binfilter/bf_sw/source/core/unocore/sw_unomap.cxx
+++ b/binfilter/bf_sw/source/core/unocore/sw_unomap.cxx
@@ -2321,17 +2321,10 @@ const SfxItemPropertyMap* SwUnoPropertyMapProvider::GetPropertyMap(sal_uInt16 nP
 }
 return aMapArr[nPropertyId];
 }
-/* -04.07.98 11:42---
- *
- * --*/
-sal_Bool SwItemPropertySet::FillItem(SfxItemSet rSet, sal_uInt16 nWhich, sal_Bool bGetProperty) const
+
+sal_Bool SwItemPropertySet::FillItem(SfxItemSet /*rSet*/, sal_uInt16 /*nWhich*/, sal_Bool /*bGetProperty*/) const
 {
 sal_Bool bRet = sal_False;
-/*	if(nWhich == SID_ATTR_PAGE_PAPERBIN)
-{
-rSet.Put(SvxPaperBinItem(SID_ATTR_PAGE_PAPERBIN, 0));
-bRet = sal_True;
-}*/
 return bRet;
 }
 }
diff --git a/binfilter/bf_sw/source/core/unocore/sw_unoobj2.cxx b/binfilter/bf_sw/source/core/unocore/sw_unoobj2.cxx
index 81ba642..4a88ebc 100644
--- a/binfilter/bf_sw/source/core/unocore/sw_unoobj2.cxx
+++ b/binfilter/bf_sw/source/core/unocore/sw_unoobj2.cxx
@@ -1934,7 +1934,7 @@ Any SAL_CALL SwXTextRange::getPropertyValue( const OUString rPropertyName )
 
   ---*/
 void SAL_CALL SwXTextRange::addPropertyChangeListener(
-const OUString aPropertyName, const Reference XPropertyChangeListener  xListener )
+const OUString /*aPropertyName*/, const Reference XPropertyChangeListener  /*xListener*/ )
 throw(UnknownPropertyException, WrappedTargetException, RuntimeException)
 {
 DBG_WARNING(not implemented);
@@ -1943,7 +1943,7 @@ void SAL_CALL SwXTextRange::addPropertyChangeListener(
 
   ---*/
 void SAL_CALL SwXTextRange::removePropertyChangeListener(
-const OUString aPropertyName, const Reference 

[Libreoffice] [PATCH 4/5] trivial warning cleaning in binfilter - unocore (1)

2010-11-29 Thread Pierre-André Jacquod
regards

From f5aac0dd10c586fbcdcd8e6a86e396601db8ad27 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pierre-Andr=C3=A9=20Jacquod?= pjacq...@alumni.ethz.ch
Date: Mon, 29 Nov 2010 08:20:37 +0100
Subject: [PATCH 4/5] trivial warning cleaning in binfilter - unocore (1)

---
 .../source/core/unocore/sw_SwXTextDefaults.cxx |8 ++--
 binfilter/bf_sw/source/core/unocore/sw_unobkm.cxx  |   17 ---
 binfilter/bf_sw/source/core/unocore/sw_unodraw.cxx |9 ++-
 .../bf_sw/source/core/unocore/sw_unofield.cxx  |   24 ++---
 .../bf_sw/source/core/unocore/sw_unoframe.cxx  |   16 +++---
 binfilter/bf_sw/source/core/unocore/sw_unoftn.cxx  |   16 +++---
 binfilter/bf_sw/source/core/unocore/sw_unoidx.cxx  |   32 +---
 binfilter/bf_sw/source/core/unocore/sw_unoobj.cxx  |   16 +--
 .../bf_sw/source/core/unocore/sw_unorefmk.cxx  |   12 ++--
 binfilter/bf_sw/source/core/unocore/sw_unosect.cxx |   22 +
 binfilter/bf_sw/source/core/unocore/sw_unosett.cxx |   50 +++-
 11 files changed, 133 insertions(+), 89 deletions(-)

diff --git a/binfilter/bf_sw/source/core/unocore/sw_SwXTextDefaults.cxx b/binfilter/bf_sw/source/core/unocore/sw_SwXTextDefaults.cxx
index 14e8028..c1acdb5 100644
--- a/binfilter/bf_sw/source/core/unocore/sw_SwXTextDefaults.cxx
+++ b/binfilter/bf_sw/source/core/unocore/sw_SwXTextDefaults.cxx
@@ -166,28 +166,28 @@ Any SAL_CALL SwXTextDefaults::getPropertyValue( const OUString rPropertyName )
 }
 
 
-void SAL_CALL SwXTextDefaults::addPropertyChangeListener( const OUString rPropertyName, const Reference XPropertyChangeListener  xListener )
+void SAL_CALL SwXTextDefaults::addPropertyChangeListener( const OUString /*rPropertyName*/, const Reference XPropertyChangeListener  /*xListener*/ )
 throw(UnknownPropertyException, WrappedTargetException, RuntimeException)
 {
 DBG_WARNING ( not implemented );
 }
 
 
-void SAL_CALL SwXTextDefaults::removePropertyChangeListener( const OUString rPropertyName, const Reference XPropertyChangeListener  aListener )
+void SAL_CALL SwXTextDefaults::removePropertyChangeListener( const OUString /*rPropertyName*/, const Reference XPropertyChangeListener  /*aListener*/ )
 throw(UnknownPropertyException, WrappedTargetException, RuntimeException)
 {
 DBG_WARNING ( not implemented );
 }
 
 
-void SAL_CALL SwXTextDefaults::addVetoableChangeListener( const OUString rPropertyName, const Reference XVetoableChangeListener  aListener )
+void SAL_CALL SwXTextDefaults::addVetoableChangeListener( const OUString /*rPropertyName*/, const Reference XVetoableChangeListener  /*aListener*/ )
 throw(UnknownPropertyException, WrappedTargetException, RuntimeException)
 {
 DBG_WARNING ( not implemented );
 }
 
 
-void SAL_CALL SwXTextDefaults::removeVetoableChangeListener( const OUString rPropertyName, const Reference XVetoableChangeListener  aListener )
+void SAL_CALL SwXTextDefaults::removeVetoableChangeListener( const OUString /*rPropertyName*/, const Reference XVetoableChangeListener  /*aListener*/ )
 throw(UnknownPropertyException, WrappedTargetException, RuntimeException)
 {
 DBG_WARNING ( not implemented );
diff --git a/binfilter/bf_sw/source/core/unocore/sw_unobkm.cxx b/binfilter/bf_sw/source/core/unocore/sw_unobkm.cxx
index 98d174d..fead095 100644
--- a/binfilter/bf_sw/source/core/unocore/sw_unobkm.cxx
+++ b/binfilter/bf_sw/source/core/unocore/sw_unobkm.cxx
@@ -275,7 +275,7 @@ uno::Reference beans::XPropertySetInfo   SwXBookmark::getPropertySetInfo(void)
 return aRef;
 }
 
-void SwXBookmark::setPropertyValue(const OUString PropertyName, const uno::Any aValue)
+void SwXBookmark::setPropertyValue(const OUString PropertyName, const uno::Any /*aValue*/)
 throw( beans::UnknownPropertyException, beans::PropertyVetoException,
 lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException )
 {
@@ -294,25 +294,26 @@ uno::Any SwXBookmark::getPropertyValue(const OUString rPropertyName) throw( bea
 return aRet;
 }
 
-void SwXBookmark::addPropertyChangeListener(const OUString PropertyName,
-const uno::Reference beans::XPropertyChangeListener   aListener)
+void SwXBookmark::addPropertyChangeListener(const OUString /*PropertyName*/,
+const uno::Reference beans::XPropertyChangeListener   /*aListener*/)
 throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException )
 {
 }
 
-void SwXBookmark::removePropertyChangeListener(const OUString PropertyName,
-const uno::Reference beans::XPropertyChangeListener   aListener)
+void SwXBookmark::removePropertyChangeListener(const OUString /*PropertyName*/,
+const uno::Reference beans::XPropertyChangeListener   /*aListener*/)
 throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException )
 {
 }
 
-void SwXBookmark::addVetoableChangeListener(const OUString PropertyName,
-const uno::Reference beans::XVetoableChangeListener   aListener)
+void 

[Libreoffice] [PATCH 2/7] waring within binfilter - sw3io

2010-11-28 Thread Pierre-André Jacquod
regards
From 0735f42a61482b094d054266ea83781ee122c91e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pierre-Andr=C3=A9=20Jacquod?= pjacq...@alumni.ethz.ch
Date: Fri, 26 Nov 2010 21:04:20 +0100
Subject: [PATCH 2/7] waring within binfilter - sw3io

delete some compiler warning, some of them due to shadowing.
---
 binfilter/bf_sw/source/core/sw3io/sw_sw3nodes.cxx |   54 ++--
 1 files changed, 27 insertions(+), 27 deletions(-)

diff --git a/binfilter/bf_sw/source/core/sw3io/sw_sw3nodes.cxx b/binfilter/bf_sw/source/core/sw3io/sw_sw3nodes.cxx
index c6fdf62..0629080 100644
--- a/binfilter/bf_sw/source/core/sw3io/sw_sw3nodes.cxx
+++ b/binfilter/bf_sw/source/core/sw3io/sw_sw3nodes.cxx
@@ -650,24 +650,24 @@ SV_DECL_PTRARR( SwTxtAttrs, SwTxtAttrPtr, 5, 5 )//STRIP008 ;
 /*N*/ 	String rNdText = (String )rNd.GetTxt();
 /*N*/ 		String aText;
 /*N*/ 		ByteString aText8( rText8 );
-/*N*/ 		SvxFontItem aFontItem( rFont );
+/*N*/ 		SvxFontItem aFontItem1 ( rFont );
 /*N*/ 		if( pConvToSymbolFmts 
-/*N*/ 			lcl_sw3io_isStarSymbolFontItem( aFontItem ) )
+/*N*/ 			lcl_sw3io_isStarSymbolFontItem( aFontItem1 ) )
 /*N*/ 		{
 /*?*/ 			BYTE nFlags = pConvToSymbolFmts-GetFlags( rNd.GetFmtColl() );
 /*?*/ 			if( (SW3IO_CONV_FROM_BATS  nFlags) != 0 )
 /*?*/ 			{
-/*?*/ aFontItem.GetFamilyName() = sStarBats;
-/*?*/ aFontItem.GetCharSet() = RTL_TEXTENCODING_SYMBOL;
+/*?*/ aFontItem1.GetFamilyName() = sStarBats;
+/*?*/ aFontItem1.GetCharSet() = RTL_TEXTENCODING_SYMBOL;
 /*?*/ 			}
 /*?*/ 			else if( (SW3IO_CONV_FROM_MATH  nFlags) != 0 )
 /*?*/ 			{
-/*?*/ aFontItem.GetFamilyName() = sStarMath;
-/*?*/ aFontItem.GetCharSet() = RTL_TEXTENCODING_SYMBOL;
+/*?*/ aFontItem1.GetFamilyName() = sStarMath;
+/*?*/ aFontItem1.GetCharSet() = RTL_TEXTENCODING_SYMBOL;
 /*?*/ 			}
 /*N*/ 		}
 /*N*/ 		ConvertText( aText8, aText, nOffset, rNd,
-/*N*/ 			   eSrcSet, aFontItem, 0, FALSE );
+/*N*/ 			   eSrcSet, aFontItem1, 0, FALSE );
 /*N*/ 		rNdText.Replace( nOffset, aText.Len(), aText );
 /*N*/ 		if( bNdSym 
 /*N*/ 			SFX_ITEM_SET == rNd.GetSwAttrSet().GetItemState( RES_CHRATR_FONT,
@@ -676,12 +676,12 @@ SV_DECL_PTRARR( SwTxtAttrs, SwTxtAttrPtr, 5, 5 )//STRIP008 ;
 /*N*/ 			  rFont.GetFamilyName().EqualsIgnoreCaseAscii( sStarMath ) ) )
 /*N*/ 		{
 /*?*/ 			const Font rSymbolFont = SwNumRule::GetDefBulletFont();
-/*?*/ 			SvxFontItem aFontItem( rSymbolFont.GetFamily(),
+/*?*/ 			SvxFontItem aFontItem2( rSymbolFont.GetFamily(),
 /*?*/    rSymbolFont.GetName(),
 /*?*/    rSymbolFont.GetStyleName(),
 /*?*/    rSymbolFont.GetPitch(),
 /*?*/    rSymbolFont.GetCharSet() );
-/*?*/ 			((SwCntntNode)rNd).SetAttr( aFontItem );
+/*?*/ 			((SwCntntNode)rNd).SetAttr( aFontItem2 );
 /*N*/ 		}
 /*N*/ 
 /*N*/ 	if( pEncs )
@@ -1370,7 +1370,7 @@ SV_DECL_PTRARR( SwTxtAttrs, SwTxtAttrPtr, 5, 5 )//STRIP008 ;
 /*N*/ 		{
 /*N*/ 			// Der Hint liegt zumindest teilweise im Text
 /*N*/ 			const SfxPoolItem rAttr = pHt-GetAttr();
-/*N*/ 			BOOL bInsert = FALSE, bSplit = FALSE;
+/*N*/ 			BOOL bInsert1 = FALSE, bSplit = FALSE;
 /*N*/ 
 /*N*/ 			USHORT nWhich = rAttr.Which();
 /*N*/ 			switch( nWhich )
@@ -1385,7 +1385,7 @@ SV_DECL_PTRARR( SwTxtAttrs, SwTxtAttrPtr, 5, 5 )//STRIP008 ;
 /*N*/ 		// das SwFmtINetFmt ist auf dem Top-Level
 /*N*/ 		nINetFmtStart = nHtStart;
 /*N*/ 		nINetFmtEnd	= nHtEnd;
-/*N*/ 		bInsert = TRUE;
+/*N*/ 		bInsert1 = TRUE;
 /*N*/ 	}
 /*N*/ 	else
 /*N*/ 	{
@@ -1413,7 +1413,7 @@ SV_DECL_PTRARR( SwTxtAttrs, SwTxtAttrPtr, 5, 5 )//STRIP008 ;
 /*N*/ {
 /*N*/ 	// das Attribut beginnt erst hinter einen SwFmtINetFmt
 /*N*/ 	// oder spannt exakt den gleichen Bereich auf
-/*N*/ 	bInsert = TRUE;
+/*N*/ 	bInsert1 = TRUE;
 /*N*/ }
 /*N*/ else if( RES_TXTATR_NOEND_BEGIN = nWhich 
 /*N*/ 		 RES_TXTATR_NOEND_END  nWhich )
@@ -1424,7 +1424,7 @@ SV_DECL_PTRARR( SwTxtAttrs, SwTxtAttrPtr, 5, 5 )//STRIP008 ;
 /*N*/ break;
 /*N*/ 			}
 /*N*/ 
-/*N*/ 			if( bInsert )
+/*N*/ 			if( bInsert1 )
 /*N*/ 			{
 /*N*/ // das Item als letztes an seiner Start-Position beginnen,
 /*N*/ // aber in jedem Fall vor einem SwFmtINetFmt
@@ -1638,7 +1638,7 @@ SV_DECL_PTRARR( SwTxtAttrs, SwTxtAttrPtr, 5, 5 )//STRIP008 ;
 // SWG_WRONGLIST Liste falscher Worte (opt)
 
 /*N*/ void Sw3IoImp::OutTxtNode
-/*N*/ ( SwCntntNode  rNode, xub_StrLen nStart, xub_StrLen nEnd, ULONG nPosIdx )
+/*N*/ ( SwCntntNode  rNode, xub_StrLen nStart, xub_StrLen nEnd1, ULONG nPosIdx )
 /*N*/ {
 /*N*/ 	SwTxtNode *pNd  = ((SwTxtNode) rNode );
 /*N*/ 	const SwFmtColl* pColl = pNd-GetAnyFmtColl();
@@ -1824,24 +1824,24 @@ SV_DECL_PTRARR( SwTxtAttrs, SwTxtAttrPtr, 5, 5 )//STRIP008 ;
 /*N*/ 	}
 /*N*/ #endif
 /*N*/ 
-/*N*/ 	if( (nEnd == STRING_LEN ? pNd-GetTxt().Len() : nEnd)  STRING_MAXLEN52 )
-/*N*/ 		nEnd = STRING_MAXLEN52;
+/*N*/ 	if( (nEnd1 == STRING_LEN ? pNd-GetTxt().Len() : nEnd1)  STRING_MAXLEN52 )
+/*N*/ 		nEnd1 = STRING_MAXLEN52;
 /*N*/ 
 /*N*/ 	SwInsHardBlankSoftHyph 

[Libreoffice] [PATCH 3/7] binfilter sw3io - further shadowing warnings

2010-11-28 Thread Pierre-André Jacquod
regards
From 2b6f503e9a8fc091dcfc216dc12175e646a76a68 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pierre-Andr=C3=A9=20Jacquod?= pjacq...@alumni.ethz.ch
Date: Fri, 26 Nov 2010 22:44:38 +0100
Subject: [PATCH 3/7] binfilter sw3io - further shadowing warnings

---
 binfilter/bf_sw/source/core/sw3io/sw_sw3misc.cxx |  146 +++--
 1 files changed, 76 insertions(+), 70 deletions(-)

diff --git a/binfilter/bf_sw/source/core/sw3io/sw_sw3misc.cxx b/binfilter/bf_sw/source/core/sw3io/sw_sw3misc.cxx
index 590ec5e..eee1c13 100644
--- a/binfilter/bf_sw/source/core/sw3io/sw_sw3misc.cxx
+++ b/binfilter/bf_sw/source/core/sw3io/sw_sw3misc.cxx
@@ -1041,9 +1041,9 @@ extern sal_Bool lcl_sw3io_isTOXHeaderSection( const SwStartNode rSttNd );
 /*N*/ 	{
 /*N*/ 		OpenRec( SWG_TOXDESC );
 /*N*/ 		String aTypeName, aTitle;
-/*N*/ 		sal_uInt16 nStrIdx = IDX_NO_VALUE;
+/*N*/ 		sal_uInt16 nStrIdx0 = IDX_NO_VALUE;
 /*N*/ 		if( IsVersion( SWG_LONGIDX ) )
-/*N*/ 			*pStrm  nStrIdx;
+/*N*/ 			*pStrm  nStrIdx0;
 /*N*/ 		else
 /*N*/ 			InString( *pStrm, aTypeName );
 /*N*/ 
@@ -1064,8 +1064,8 @@ extern sal_Bool lcl_sw3io_isTOXHeaderSection( const SwStartNode rSttNd );
 /*N*/ 		// Wenn keine Name da ist, dann handelt es sich um
 /*N*/ 		// das Standard-Verzeichnis des entsprechenden Typs. Der
 /*N*/ 		// (internationalisierte) Name wird dann gesetzt.
-/*N*/ 		if( IDX_NO_VALUE != nStrIdx )
-/*?*/ 			aTypeName = aStringPool.Find( nStrIdx );
+/*N*/ 		if( IDX_NO_VALUE != nStrIdx0 )
+/*?*/ 			aTypeName = aStringPool.Find( nStrIdx0 );
 /*N*/ 		else if( !aTypeName.Len() )
 /*N*/ 			aTypeName = SwTOXBase::GetTOXName( eTOXType );
 /*N*/ 
@@ -1121,11 +1121,11 @@ extern sal_Bool lcl_sw3io_isTOXHeaderSection( const SwStartNode rSttNd );
 /*N*/ 		*pStrm  nTmpl;
 /*N*/ 		for( i = 0; Good()  i  nTmpl; i++ )
 /*N*/ 		{
-/*N*/ 			sal_uInt16 nStrIdx;
-/*N*/ 			*pStrm  nStrIdx;
+/*N*/ 			sal_uInt16 nStrIdx1;
+/*N*/ 			*pStrm  nStrIdx1;
 /*N*/ 			if( i  aForm.GetFormMax() )
 /*N*/ 			{
-/*N*/ String sNm( aStringPool.Find( nStrIdx ) );
+/*N*/ String sNm( aStringPool.Find( nStrIdx1 ) );
 /*N*/ if( !sNm.Len() )
 /*N*/ {
 /*N*/ 	// Bug 37672: falls keiner gefunden wird, nehme
@@ -1395,6 +1395,8 @@ extern sal_Bool lcl_sw3io_isTOXHeaderSection( const SwStartNode rSttNd );
 /*?*/ 	case TOX_TABLES:
 /*?*/ 		nPoolId = RES_POOLCOLL_LABEL_TABLE;
 /*?*/ 		break;
+default:
+break;
 /*N*/ 	}
 /*N*/ 	String aName;
 /*N*/ 	SwStyleNameMapper::FillUIName( nPoolId, aName );
@@ -1443,23 +1445,23 @@ extern void lcl_sw3io_FillSetExpFieldName( Sw3IoImp rIo, sal_uInt16 nStrId,
 /*N*/ 
 /*N*/ 		sal_uInt8 cFlags = OpenFlagRec();
 /*N*/ 
-/*N*/ 		sal_uInt16 nType, nCreateType, nCaptionDisplay, nStrIdx, nSeqStrIdx, nData;
+/*N*/ 		sal_uInt16 nType0, nCreateType, nCaptionDisplay, nStrIdx0, nSeqStrIdx, nData;
 /*N*/ 		sal_uInt16 nOLEOptions = 0;
 /*N*/ 		sal_uInt8 cFormFlags;
 /*N*/ 
-/*N*/ 		String aTitle, aName, aDummy;
+/*N*/ 		String aTitle, aName0, aDummy;
 /*N*/ 
-/*N*/ 		*pStrm   nType
+/*N*/ 		*pStrm   nType0
 /*N*/  nCreateType
 /*N*/  nCaptionDisplay
-/*N*/  nStrIdx
+/*N*/  nStrIdx0
 /*N*/  nSeqStrIdx
 /*N*/  nData
 /*N*/  cFormFlags;
 /*N*/ 		CloseFlagRec();
 /*N*/ 
 /*N*/ 		sal_uInt16 nMainStyleIdx = IDX_NO_VALUE;
-/*N*/ 		InString( *pStrm, aName );
+/*N*/ 		InString( *pStrm, aName0 );
 /*N*/ 		InString( *pStrm, aTitle );
 /*N*/ 		if( nVersion  SWG_NEWTOX2 )
 /*N*/ 			InString( *pStrm, aDummy );		// was AutoMarkURL
@@ -1469,10 +1471,10 @@ extern void lcl_sw3io_FillSetExpFieldName( Sw3IoImp rIo, sal_uInt16 nStrId,
 /*N*/ 	 nMainStyleIdx;
 /*N*/ 		}
 /*N*/ 
-/*N*/ 		TOXTypes eTOXType = (TOXTypes)nType;
+/*N*/ 		TOXTypes eTOXType = (TOXTypes)nType0;
 /*N*/ 		String aTypeName;
-/*N*/ 		if( IDX_NO_VALUE != nStrIdx )
-/*?*/ 			aTypeName = aStringPool.Find( nStrIdx );
+/*N*/ 		if( IDX_NO_VALUE != nStrIdx0 )
+/*?*/ 			aTypeName = aStringPool.Find( nStrIdx0 );
 /*N*/ 		else
 /*N*/ 			aTypeName = SwTOXBase::GetTOXName( eTOXType );
 /*N*/ 
@@ -1525,24 +1527,24 @@ extern void lcl_sw3io_FillSetExpFieldName( Sw3IoImp rIo, sal_uInt16 nStrId,
 /*N*/ {
 /*N*/ 	OpenRec( SWG_FORMTOKEN_LCL );
 /*N*/ 
-/*N*/ 	sal_uInt16 nType, nStrIdx;
+/*N*/ 	sal_uInt16 nType1, nStrIdx1;
 /*N*/ 
 /*N*/ 	OpenFlagRec();
-/*N*/ 	*pStrm	 nType
-/*N*/ 			 nStrIdx;
+/*N*/ 	*pStrm	 nType1
+/*N*/ 			 nStrIdx1;
 /*N*/ 	CloseFlagRec();
 /*N*/ 
-/*N*/ 	if( nType  TOKEN_END )
+/*N*/ 	if( nType1  TOKEN_END )
 /*N*/ 	{
 /*N*/ //#92986# some older versions created a
 /*N*/ //wrong content index entry definition
-/*N*/ if(TOKEN_ENTRY == nType  eTOXType == TOX_CONTENT)
-/*N*/ nType = TOKEN_ENTRY_TEXT;
-/*N*/ SwFormToken aToken( (FormTokenType)nType );
-/*N*/ 		if( IDX_NO_VALUE != nStrIdx )
+/*N*/ 

[Libreoffice] [PATCH 4/7] binfilter - sw_sw3style.cxx (shadowing) warnings removal

2010-11-28 Thread Pierre-André Jacquod
regards


From 0b31675885126537da8351ba747cd6c6e7ad03fd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pierre-Andr=C3=A9=20Jacquod?= pjacq...@alumni.ethz.ch
Date: Sat, 27 Nov 2010 00:06:37 +0100
Subject: [PATCH 4/7] binfilter -  sw_sw3style.cxx (shadowing) warnings removal

---
 binfilter/bf_sw/source/core/sw3io/sw_sw3style.cxx |   20 ++--
 1 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/binfilter/bf_sw/source/core/sw3io/sw_sw3style.cxx b/binfilter/bf_sw/source/core/sw3io/sw_sw3style.cxx
index db98772..e5fe502 100644
--- a/binfilter/bf_sw/source/core/sw3io/sw_sw3style.cxx
+++ b/binfilter/bf_sw/source/core/sw3io/sw_sw3style.cxx
@@ -187,10 +187,10 @@ public:
 
 
 
-/*N*/ SwStyleSheet::SwStyleSheet( const String rName, SwStyleSheetPool rPool,
-/*N*/ 			SfxStyleFamily eFam, USHORT nMask )
-/*N*/ 	: SfxStyleSheetBase( rName, rPool, eFam, nMask ),
-/*N*/ 	  rDoc( rPool.rDoc ), aSet( rPool.rPool,
+/*N*/ SwStyleSheet::SwStyleSheet( const String rName, SwStyleSheetPool rPool1,
+/*N*/ 			SfxStyleFamily eFam, USHORT nMask1 )
+/*N*/ 	: SfxStyleSheetBase( rName, rPool1, eFam, nMask1 ),
+/*N*/ 	  rDoc( rPool1.rDoc ), aSet( rPool1.rPool,
 /*N*/ 			RES_CHRATR_BEGIN,		RES_CHRATR_END - 1,
 /*N*/ 			RES_PARATR_BEGIN, 		RES_PARATR_END - 1,
 /*N*/ 			RES_FRMATR_BEGIN, 		RES_FRMATR_END - 1,
@@ -426,11 +426,15 @@ public:
 /*N*/ 			pParent = (*rDoc.GetFrmFmts())[ 0 ]; break;
 /*N*/ 		case SFX_STYLE_FAMILY_PARA:
 /*N*/ 			pParent = (*rDoc.GetTxtFmtColls())[ 0 ]; break;
+default:
+break;
 /*N*/ 	}
 /*N*/ 	if( pParent )
 /*N*/ 		pFmt-SetDerivedFrom( pParent );
 /*N*/ 	else
+{
 /*N*/ 		ASSERT( !this, Parent nicht gefunden );
+}
 /*N*/ }
 
 // Setzen des Follows
@@ -447,7 +451,9 @@ public:
 /*N*/ 		if( pFollow )
 /*N*/ 			GetColl()-SetNextTxtFmtColl( *pFollow );
 /*N*/ 		else
+{
 /*N*/ 			ASSERT( !this, Follow nicht gefunden );
+}
 /*N*/ 	}
 /*N*/ }
 
@@ -998,7 +1004,9 @@ sal_Char const SW_CONSTASCII_DEF( sHTML_listing, LISTING );
 /*?*/ 	DBG_BF_ASSERT(0, STRIP); //STRIP001 ((SwConditionTxtFmtColl*)p-pFmt)-InsertCondition(
 /*?*/ }
 /*?*/ else
+{
 /*?*/ 	ASSERT( !this, Collection nicht gefunden );
+}
 /*N*/ 			}
 /*N*/ 	}
 /*N*/ //FEATURE::CONDCOLL
@@ -1009,9 +1017,9 @@ sal_Char const SW_CONSTASCII_DEF( sHTML_listing, LISTING );
 // Faktorei
 
 /*N*/ SfxStyleSheetBase* __EXPORT SwStyleSheetPool::Create( const String rName,
-/*N*/ 			 SfxStyleFamily eFam, USHORT nMask)
+/*N*/ 			 SfxStyleFamily eFam, USHORT nMask2)
 /*N*/ {
-/*N*/ 	return new SwStyleSheet( rName, *this, eFam, nMask);
+/*N*/ 	return new SwStyleSheet( rName, *this, eFam, nMask2);
 /*N*/ }
 
 
-- 
1.7.1

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


Re: [Libreoffice] [PUSHED] Re: [PATCH 9/9] binfilter sw3io warning fixes

2010-11-26 Thread Pierre-André Jacquod
Hi,
First thanks for reviewing, catching my errors and correcting. I have
learned a lot. Next time I do so many errors, please reject and I will
correct it myself.

Michael, I will wait making less errors in changes before requesting an
account, if you don't mind.

Just a question for:
 Err, you sort of changed the logic there. That doesn't look quite right.
 OutAttrSet went from getting called always to only getting called when
 pExportInfo is set. I've fixed this up now as well.

I don't understand my error: I wanted to keep the logic with structure
changes, going from:

var - here waring not initialized
if (pexportinfo)
{
stuff 1
}

OutAttrSet  - the one you mentionned

if (pexportinfo)
{
   stuff 2
}

to the new structure having (at least I though) the same overall logic
but written slightly differently:

if (pexportinfo)
{
   var
   stuff 1
   outAttrSet
   stuff 2
}
else
{
   OutAttrSet
}

I though, this would be better, solving the uninitialized warning,
initializing only if needed and having only one IF evaluation. The
OutAttrSet seems me to be executed in all case one and only once, as before.
Is there a logic error here?
Or did the patch 0009 (the concerned part attached here) something else?

Thanks helping me to improve.
regards
Pierre-André



@@ -938,21 +938,21 @@ sal_Bool lcl_sw3io_insFtn( const SwTxtNode *pTxtNd )
 /*N*/  if( bWriteName )
 /*N*/  OutString( *pStrm, rFmt.GetName() );
 /*N*/  
-/*N*/  BOOL bOldExportFlyFrmFmt;   
-/*N*/  const SwFlyFrm* pOldExportFlyFrm;   
 /*N*/  if( pExportInfo )   
 /*N*/  {   
-/*N*/  bOldExportFlyFrmFmt = pExportInfo-bFlyFrmFmt;  
-/*N*/  pOldExportFlyFrm = pExportInfo-pFlyFrm;
+/*N*/  BOOL bOldExportFlyFrmFmt = pExportInfo-bFlyFrmFmt; 
+/*N*/  const SwFlyFrm* pOldExportFlyFrm = pExportInfo-pFlyFrm;
 /*N*/  pExportInfo-bFlyFrmFmt = (cType == SWG_FLYFMT);
 /*N*/  pExportInfo-pFlyFrm = pExportFlyFrm;   
-/*N*/  }   
-/*N*/  OutAttrSet( rFmt.GetAttrSet(), SWG_SECTFMT == cType );
-/*N*/  if( pExportInfo )
-/*N*/  {
+OutAttrSet( rFmt.GetAttrSet(), SWG_SECTFMT == cType );
 /*N*/  pExportInfo-bFlyFrmFmt = bOldExportFlyFrmFmt;
 /*N*/  pExportInfo-pFlyFrm = pOldExportFlyFrm;
+
 /*N*/  }
+else
+{
+/*N*/  OutAttrSet( rFmt.GetAttrSet(), SWG_SECTFMT == cType );
+}
 /*N*/  CloseRec( cType );
 /*N*/  if( cType != SWG_FREEFMT  cType != SWG_SECTFMT )
 /*N*/  ((SwFmt)rFmt).SetWritten();
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice] warnig and coding, need a little help on C++

2010-11-25 Thread Pierre-André Jacquod
Hello,
as I said, still in warm up phase and getting back familiar with C++..
So cleaning is a good exercise.

I got a compiler warning:

filters/binfilter/bf_sw/source/core/para/sw_paratr.cxx:214:26: warning:
'nTemp' may be used uninitialized in this function

for this:

case MID_DROPCAP_LINES :
{
 sal_Int8 nTemp;
 rVal = nTemp;
 if(nTemp =1  nTemp  0x7f
 nLines = (BYTE)nTemp;
}

Well, that's fine for me, nTemp is effectively not initialized. And the
second line is then the same as: rVal = rVal  nTemp

In my understanding, since nTemps is not initialized, if the compiler is
nice, nTemp is then defaulted to 0 (or NULL). Then rVal = rVal  0 make
not a lot of sense and is a true nop (no operation). And if the compiler
is not nice, I do not know which value has nTemp, i could almost use
random... So for me it seems the two first lines are not needed and even
dangerous.

OK, now the question: what did I missed ?

Thank for your help
regards
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice] [PATCH 1/9] suppress warning in binfilters sc_token

2010-11-25 Thread Pierre-André Jacquod
Hello,
here some patches in binfilter to remove warnings by compiling...
Since some changes could (will) look strange, I submit it in little
chunks, often with compiler warning in comment. This may help the reviewer.

Hope I did no mistake
regards
Pierre-André
From c747a9dcc4af190aac1f216a93f7abd4b39fec85 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pierre-Andr=C3=A9=20Jacquod?= pjacq...@alumni.ethz.ch
Date: Tue, 23 Nov 2010 07:46:54 +0100
Subject: [PATCH 1/9] suppress warning in binfilters sc_token

changes based on following warnings:

sc_token.cxx:1573:28: warning: comparison is always false due to limited range of data type
sc_token.cxx:452:12: warning: unused parameter 'n'
sc_token.cxx:452:12: warning: unused parameter 'rPos'
sc_token.cxx:452:12: warning: unused parameter 'rPos'
sc_token.cxx:452:12: warning: unused parameter 'n'
sc_token.cxx:1613:26: warning: declaration of 'r' shadows a previous local
sc_token.cxx:1593:25: warning: shadowed declaration is here
---
 binfilter/bf_sc/source/core/tool/sc_token.cxx |   45 ++---
 1 files changed, 18 insertions(+), 27 deletions(-)

diff --git a/binfilter/bf_sc/source/core/tool/sc_token.cxx b/binfilter/bf_sc/source/core/tool/sc_token.cxx
index fe98c35..0bfad52 100644
--- a/binfilter/bf_sc/source/core/tool/sc_token.cxx
+++ b/binfilter/bf_sc/source/core/tool/sc_token.cxx
@@ -449,7 +449,7 @@ namespace binfilter {
 /*N*/ 	return 0;
 /*N*/ }
 
-/*N*/ void ScToken::SetByte( BYTE n )
+/*N*/ void ScToken::SetByte( BYTE /*n*/ )
 /*N*/ {
 /*N*/  DBG_ERRORFILE( ScToken::SetByte: virtual dummy called );
 /*N*/ }
@@ -502,12 +502,12 @@ namespace binfilter {
 /*N*/  	return aDummySingleRef;
 /*N*/  }
 
-/*N*/ void ScToken::CalcAbsIfRel( const ScAddress rPos )
+/*N*/ void ScToken::CalcAbsIfRel( const ScAddress /*rPos*/ )
 /*N*/ {
 /*N*/ 	DBG_ERRORFILE( ScToken::CalcAbsIfRel: virtual dummy called );
 /*N*/ }
 
-/*N*/ void ScToken::CalcRelFromAbs( const ScAddress rPos )
+/*N*/ void ScToken::CalcRelFromAbs( const ScAddress /*rPos*/ )
 /*N*/ {
 /*N*/ 	DBG_ERRORFILE( ScToken::CalcRelFromAbs: virtual dummy called );
 /*N*/ }
@@ -524,7 +524,7 @@ namespace binfilter {
 /*N*/ 	return 0;
 /*N*/ }
 
-/*N*/  void ScToken::SetIndex( USHORT n )
+/*N*/  void ScToken::SetIndex( USHORT /*n*/ )
 /*N*/  {
 /*N*/  	DBG_ERRORFILE( ScToken::SetIndex: virtual dummy called );
 /*N*/  }
@@ -1570,16 +1570,7 @@ namespace binfilter {
 /*N*/ 		{
 /*N*/ 			sal_Char c[ MAXSTRLEN+1 ];
 /*N*/ 			rStream  n;
-/*N*/ 			if( n  MAXSTRLEN-1 )
-/*N*/ 			{
-/*?*/ DBG_ERRORFILE( bad string array boundary );
-/*?*/ USHORT nDiff = n - (MAXSTRLEN-1);
-/*?*/ n = MAXSTRLEN-1;
-/*?*/ rStream.Read( c, n );
-/*?*/ rStream.SeekRel( nDiff );
-/*N*/ 			}
-/*N*/ 			else
-/*N*/ rStream.Read( c, n );
+/*N*/ 			rStream.Read( c, n );
 /*N*/ 			cStr[ n ] = 0;
 /*N*/ 			CharSet eSrc = rStream.GetStreamCharSet();
 /*N*/ 			for ( BYTE j=0; jn; j++ )
@@ -1590,10 +1581,10 @@ namespace binfilter {
 /*N*/ 		case svSingleRef:
 /*N*/ 		case svDoubleRef:
 /*N*/ 		{
-/*N*/ 			SingleRefData r = aRef.Ref1;
-/*N*/ 			rStream  r.nCol
-/*N*/ 	 r.nRow
-/*N*/ 	 r.nTab
+/*N*/ 			SingleRefData r1 = aRef.Ref1;
+/*N*/ 			rStream  r1.nCol
+/*N*/ 	 r1.nRow
+/*N*/ 	 r1.nTab
 /*N*/ 	 n;
 /*N*/ 			if ( nVer  SC_RELATIVE_REFS )
 /*N*/ 			{
@@ -1602,18 +1593,18 @@ namespace binfilter {
 /*N*/ aBools.bRelRow = ( ( n  2 )  0x03 );
 /*N*/ aBools.bRelTab = ( ( n  4 )  0x03 );
 /*N*/ aBools.bOldFlag3D = ( ( n  6 )  0x03 );
-/*N*/ r.OldBoolsToNewFlags( aBools );
+/*N*/ r1.OldBoolsToNewFlags( aBools );
 /*N*/ 			}
 /*N*/ 			else
-/*N*/ r.CreateFlagsFromLoadByte( n );
+/*N*/ r1.CreateFlagsFromLoadByte( n );
 /*N*/ 			if( eType == svSingleRef )
-/*N*/ aRef.Ref2 = r;
+/*N*/ aRef.Ref2 = r1;
 /*N*/ 			else
 /*N*/ 			{
-/*N*/ SingleRefData r = aRef.Ref2;
-/*N*/ rStream  r.nCol
-/*N*/ 		 r.nRow
-/*N*/ 		 r.nTab
+/*N*/ SingleRefData r2 = aRef.Ref2;
+/*N*/ rStream  r2.nCol
+/*N*/ 		 r2.nRow
+/*N*/ 		 r2.nTab
 /*N*/ 		 n;
 /*N*/ if ( nVer  SC_RELATIVE_REFS )
 /*N*/ {
@@ -1622,10 +1613,10 @@ namespace binfilter {
 /*N*/ 	aBools.bRelRow = ( ( n  2 )  0x03 );
 /*N*/ 	aBools.bRelTab = ( ( n  4 )  0x03 );
 /*N*/ 	aBools.bOldFlag3D = ( ( n  6 )  0x03 );
-/*N*/ 	r.OldBoolsToNewFlags( aBools );
+/*N*/ 	r2.OldBoolsToNewFlags( aBools );
 /*N*/ }
 /*N*/ else
-/*N*/ 	r.CreateFlagsFromLoadByte( n );
+/*N*/ 	r2.CreateFlagsFromLoadByte( n );
 /*N*/ 			}
 /*N*/ 			break;
 /*N*/ 		}
-- 
1.7.1

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


  1   2   >