Re: [Libreoffice] [PUSHED] new BUG 36594

2011-09-02 Thread Jenei Gábor
Nice job Eike, but multi-line comment was not necesary, as HSQL doesn't 
handle them, and I am even not sure if other DB systems support this 
type of comment. But thanks for your cooperation.


Gabor
2011. 09. 03. 1:33 keltezéssel, Eike Rathke írta:

are of the latter. That had to be done
anyway to not have the comment extracter/deleter be confused b


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


Re: [Libreoffice] [PATCH] BUG 36594

2011-09-02 Thread Jenei Gábor

Hello Michael,

I think Eike is already working on this problem, but finally we got that 
there is no really good solution, maybe my first advised option could be 
applied with success(storing for each comment if there is a query in the 
same line in a bool variable). I guess you should consult with Eike, but 
naturally if you can mind about the problem it is great also. Actually I 
won't mind too much in the future, but naturally if you have questions 
or suggestions for my patch I'll answer.


Gabor

2011. 09. 02. 22:37 keltezéssel, Michael Meeks írta:

Hi Jenei,

On Mon, 2011-08-29 at 22:45 +0200, Eike Rathke wrote:

On Monday, 2011-08-29 19:10:32 +0200, Jenei Gábor wrote:

Let me to have some questions about your review:

Wow - ... there was a lot of feedback here - hopefully not too
unfriendly ;-) it is really great to have you contributing, and your
work is much appreciated [ sometimes that can get lost in a long list of
minor glitches from Eike ].

Did you have any joy cleaning those up ? or would you like me to have a
look next week ? :-)

All the best,

Michael.



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


Re: [Libreoffice] testing databases

2011-09-02 Thread Jenei Gábor
Yes, but still it is much more complicated to configure on server side, 
however I admit that it has much more functions also, by the way I used 
it in database courses also, it's a quite widely used database system, 
but I don't think it worth the time if you just plan a simple php page 
with database access, for this purpose MySQL is better, as it is easy to 
install (you just push a button and it's on your computer, after this 
you only have to know SQL Table creating commands)


Gabor

2011. 09. 02. 12:37 keltezéssel, Jonathan Aquilina írta:
Jeni you mention oracle being more difficult to configure, In my 
database course last year we used an online oracle database, Its free 
to use and you must ensure no private or real sensative data is used 
to populate the database.


Not sure if this would be of any use

http://apex.oracle.com

its free to use and to work with.

On Fri, Sep 2, 2011 at 12:33 PM, Jenei Gábor <mailto:jen...@elte.hu>> wrote:


Well, naturally it isn't a virtual machine with already set up DB
systems can be useful, however for me it cause no problem to set
up a database, as for MySQL it only needs some basic SQL knowledge
and the using of apt/synaptic. But for example an Oracle server is
much more difficult to configure, it even needs an own oracle
system user who will be the database administrator. But in general
all database systems should be more or less equal, as they all use
SQL, unfortunatelly there are such differences as HSQL<->
Oracle(also MySQL), in HSQL you need to write table names like:
"Table1" in Oracle you can do it just saying table1 or even Table1
as SQL is originally not case sensitive except for string
constants. In HSQL I even noted that there is no C-like /* */
comment, if I am not wrong it exists in Oracle, however Oracle is
a quite extended SQL language, it contains an own programming
language called PL/SQL.

2011. 09. 02. 12:09 keltezéssel, Caolán McNamara írta:

    On Thu, 2011-09-01 at 22:08 +0200, Jenei Gábor wrote:

How can I quickly setup a database and query to test
this thing?

I find setting up databases and configuring them a super pain
in the
ass, so much so that I have a fair number of bugs lingering
because I
can't motivate myself to struggle with configuring databases.

Personally, I think I would be tempted by something like a
virtual box
VDI pre-configured, installed and populated databases
images/appliances

Is this a stupid idea ?

C.



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




--
Jonathan Aquilina


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


Re: [Libreoffice] testing databases

2011-09-02 Thread Jenei Gábor
Well, naturally it isn't a virtual machine with already set up DB 
systems can be useful, however for me it cause no problem to set up a 
database, as for MySQL it only needs some basic SQL knowledge and the 
using of apt/synaptic. But for example an Oracle server is much more 
difficult to configure, it even needs an own oracle system user who will 
be the database administrator. But in general all database systems 
should be more or less equal, as they all use SQL, unfortunatelly there 
are such differences as HSQL<-> Oracle(also MySQL), in HSQL you need to 
write table names like: "Table1" in Oracle you can do it just saying 
table1 or even Table1 as SQL is originally not case sensitive except for 
string constants. In HSQL I even noted that there is no C-like /* */ 
comment, if I am not wrong it exists in Oracle, however Oracle is a 
quite extended SQL language, it contains an own programming language 
called PL/SQL.


2011. 09. 02. 12:09 keltezéssel, Caolán McNamara írta:

On Thu, 2011-09-01 at 22:08 +0200, Jenei Gábor wrote:

How can I quickly setup a database and query to test this thing?

I find setting up databases and configuring them a super pain in the
ass, so much so that I have a fair number of bugs lingering because I
can't motivate myself to struggle with configuring databases.

Personally, I think I would be tempted by something like a virtual box
VDI pre-configured, installed and populated databases images/appliances

Is this a stupid idea ?

C.




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


Re: [Libreoffice] [PATCH] new BUG 36594

2011-09-02 Thread Jenei Gábor
well, yes I forgot about that query even may change in translate 
statement, so to store the positions is not always a good solution, you 
are right. Maybe we could simply put the comments after the query 
string, still the user is able to store comments, and the query is ok, 
however the original position is lost, but the order of comments is 
keeped, so I guess it's not such a bad thing. But in this case to use a 
vector is needless, just a simply OUString is enough to store the 
comments. And yes, my problem was about this case, but somehow my former 
patch worked before, is it possible that translate statement has just 
been modified? I guess you should comment out some lines in my patch, 
and put all the comments after the query.


Gabor

2011. 09. 02. 10:09 keltezéssel, Eike Rathke írta:

Hi Jenei,

On Thursday, 2011-09-01 22:08:33 +0200, Jenei Gábor wrote:


LibreOffice Base if you turn on running SQL query in SQL edit view
it will pass the SQL query directly to HSQL without any type of
modification, or check, so if you push this button it should work
totally as a HSQL prompt.

Played a bit with those, while delComment() in parseTree() seems to
work, the getComment()/concatComment() in translateStatement() does not
because

 sTranslatedStmt = m_xComposer->getComposedQuery();

never includes LFs in its normalized return, so the following

 sTranslatedStmt = concatComment( sTranslatedStmt, 
sComments);


doesnt do anything. This may be what you experienced earlier as well
when you wondered that something was eating the LFs. With the positional
approach not searching for LFs it may have worked accidentally if
original query and composed query were identical except one trailing
comment.

Without messing with the parser itself (and even then we wouldn't know
if following stages would handle the result) I don't see a clean way to
solve this, so I suggest to keep delComment() in parseTree() and discard
getComment()/concatComment(), unfortunately that will lose comments at
some (unimportant?) stage, but the query form seems to remember the
original query at least.

If no objection, I'll commit this evening.

   Eike


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


Re: [Libreoffice] [PATCH] new BUG 36594

2011-09-01 Thread Jenei Gábor
Well, if you are using linux you could get mysql and its client from apt 
on Debian based systems(I guess on redhat based systems you can use 
yum), well, the plus linefeed is not really intentional but does not 
cause any problem, so I didn't mind too much. But also in LibreOffice 
Base if you turn on running SQL query in SQL edit view it will pass the 
SQL query directly to HSQL without any type of modification, or check, 
so if you push this button it should work totally as a HSQL prompt.


Gabor

2011. 09. 01. 21:59 keltezéssel, Eike Rathke írta:

Hi Jenei,

On Thursday, 2011-09-01 20:31:11 +0200, Jenei Gábor wrote:


Well, as I know for HSQL -- and // are equal, so // is like one line
comment in C++.

Hmm.. ok.

Btw, this

+if(sCopy[i]=='\n' || i==nQueryLen-1){
+nCommentLen++;
+if(i==nQueryLen-1)sTemp.append(&sCopy[i],1);
+if(bComment) bComment=false;
+sTemp.append((sal_Unicode)'\n');

appends yet another \n if there was already one at the very end of the
query string, is that intentional?


Well,thanks for your work on the other hand :)

I'm rearranging some logic to fold various if's away that are
unnecessarily executed in the loops. I'll let you know details later.

How can I quickly setup a database and query to test this thing?

   Eike



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


Re: [Libreoffice] bug in vcl make files?

2011-09-01 Thread Jenei Gábor

2011. 09. 01. 21:26 keltezéssel, Stephan Bergmann írta:

On Sep 1, 2011, at 3:47 PM, Matúš Kukan wrote:

On 1 September 2011 15:14, Jenei Gábor  wrote:

Hi all,

As I tried to compile vcl module with raised dbglevel I found out the
following error at linking:


/home/LOff/libo/workdir/unxlngi6.pro/CxxObject/vcl/unx/headless/svpgdi.o: In
function `dbgOut(boost::shared_ptr  const&)':
svpgdi.cxx:(.text._Z6dbgOutRKN5boost10shared_ptrIN7basebmp12BitmapDeviceEEE[dbgOut(boost::shared_ptr
const&)]+0x13a): undefined reference to
`basebmp::debugDump(boost::shared_ptr  const&,
std::basic_ostream  >&)'
collect2: ld returned 1 exit status
make: ***
[/home/LOff/libo/workdir/unxlngi6.pro/LinkTarget/Library/libvclplug_svplo.so]
Error 1

As I saw in cpp code this should be ok, so probably basebmp debug.cxx is not
marked for linking in the project. Could someone look at this issue who
knows make files?


That's not about makefiles. debugDump() is not marked for exporting,
you can do this in cxx file with SAL_DLLPUBLIC_EXPORT
or in hxx files. But in hxx you need to use library specific macro defined as in
http://opengrok.libreoffice.org/xref/core/basebmp/inc/basebmp/bitmapdevice.hxx#42
It's more complicated because of error in windows compilers, I think.

I have pushed this one. (
http://cgit.freedesktop.org/libreoffice/core/commit/?id=e21822008dff0c618e8947d7343bc70d51d47ec3
)

You cannot do it that way -- it will not work on Windows.  
See<http://wiki.services.openoffice.org/wiki/Symbol_Visibility>  for details 
(in short, you need the BASEBMP_DLLPUBLIC/BASEBMP_DLLIMPLEMENTATION stuff in the 
header file if you want to be able to link against the function on Windows).

Will try to remember to prepare a proper patch tomorrow, unless someone beats 
me to it…

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

  Well, it's a unix like system specific source, so I guess there is no 
need to use it in Windows, but thanks for your warn though.

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


Re: [Libreoffice] [PATCH] new BUG 36594

2011-09-01 Thread Jenei Gábor
Well, as I know for HSQL -- and // are equal, so // is like one line 
comment in C++. Well,thanks for your work on the other hand :)


Gabor

2011. 09. 01. 20:15 keltezéssel, Eike Rathke írta:

Hi Jenei,

On Wednesday, 2011-08-31 12:59:06 +0200, Jenei Gábor wrote:


Hello Eike,

I made the changes you said, and I resolved the no linefeed issue
also, I hope it is ok now, and can be pushed, actually for me worked
fine with all types of comments. Also I tried to follow the
principals you said. So, push it if you think there is no need to
correct something.

You're on the right track :-)

First, I have a question because I'm by no means an SQL expert:


+::rtl::OUString delComment(const ::rtl::OUString&  sQuery){
[...]
+for(size_t i=0;i
This and the similar loop in getComment() treats also // as comment
leader, I thought only -- is used for "comment until end of line"?
A short web search didn't come up with anything different.

Second, I erred earlier when I talked about the struct with nPos,
I overlooked that doSaveAsDoc() reconstructs the query string with

 sTranslatedStmt = m_xComposer->getComposedQuery();

so actually the resulting sTranslatedStmt may be different from the
original m_sStatement and the positions may not match and your previous
approach with searching for LFs would be needed instead. Sorry for
confusion. Just tell me about the // leader and I'll fix things up for
you.

   Eike



___
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] [PUSHED][PATCH] warining elimination

2011-09-01 Thread Jenei Gábor

Yes,naturally it was only by mistake, so you can make it to be the old.

2011. 09. 01. 18:14 keltezéssel, Korrawit Pruegsanusak írta:

Hello Jenei, *

On Thu, 2011-09-01 at 15:34 +0200, Jenei Gábor wrote:

Here is a patch to avoid compile time warnings

It seems that your patch has touched the license header in
svtools/source/filter/wmf/enhwmf.cxx. IMHO we should revert this part.

Best Regards,


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


[Libreoffice] [PATCH] warining elimination

2011-09-01 Thread Jenei Gábor

Hello,

Here is a patch to avoid compile time warnings, actually most of them 
are unfortunatelly not in our source but in libraries like OpenSSL, 
could you tell me why are these libraries compiled? On most of the linux 
machines it should be already installed, aren't compiled shared 
libraries enough? And why? I actually don't understand why it's 
compiled, it should be mentioned only as a dependency, so who doesn't 
have it shoul look up on apt/rpm.


Gabor
>From 1b27ced6fc523886ba748e9a4e3e67fbf6312852 Mon Sep 17 00:00:00 2001
From: Gabor Jenei 
Date: Thu, 1 Sep 2011 12:30:03 +0200
Subject: [PATCH] fix warnings

---
 cppcanvas/source/mtfrenderer/emfplus.cxx  |  108 -
 cppcanvas/source/mtfrenderer/implrenderer.cxx |8 +-
 sc/source/core/inc/parclass.hxx   |2 +-
 sc/source/core/tool/parclass.cxx  |   12 ++--
 svtools/source/filter/wmf/enhwmf.cxx  |   15 ++--
 svtools/source/filter/wmf/winmtf.cxx  |2 +-
 6 files changed, 72 insertions(+), 75 deletions(-)

diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx 
b/cppcanvas/source/mtfrenderer/emfplus.cxx
index 327fd41..b70f90a 100644
--- a/cppcanvas/source/mtfrenderer/emfplus.cxx
+++ b/cppcanvas/source/mtfrenderer/emfplus.cxx
@@ -270,7 +270,7 @@ namespace cppcanvas
 s >> header >> parts;
 
 EMFP_DEBUG (printf ("EMF+\tregion\n"));
-EMFP_DEBUG (printf ("EMF+\theader: 0x%08x parts: %d\n", 
header, parts));
+EMFP_DEBUG (printf ("EMF+\theader: 0x%08x parts: %d\n", 
(unsigned int)header, (int)parts));
 
 if (parts) {
 if( parts<0 || 
sal_uInt32(parts)>SAL_MAX_INT32/sizeof(sal_Int32) )
@@ -280,12 +280,12 @@ namespace cppcanvas
 
 for (int i = 0; i < parts; i ++) {
 s >> combineMode [i];
-EMFP_DEBUG (printf ("EMF+\tcombine mode [%d]: 
0x%08x\n", i, combineMode [i]));
+EMFP_DEBUG (printf ("EMF+\tcombine mode [%d]: 
0x%08x\n", i,(unsigned int)combineMode [i]));
 }
 }
 
 s >> initialState;
-EMFP_DEBUG (printf ("EMF+\tinitial state: 0x%08x\n", 
initialState));
+EMFP_DEBUG (printf ("EMF+\tinitial state: 0x%d\n",(int) 
initialState));
 }
 };
 
@@ -355,7 +355,7 @@ namespace cppcanvas
 
 s >> header >> type;
 
-EMFP_DEBUG (printf ("EMF+\tbrush\nEMF+\theader: 0x%08x type: 
%d\n", header, type));
+EMFP_DEBUG (printf ("EMF+\tbrush\nEMF+\theader: 0x%08x type: 
%d\n",(unsigned int) header,(int) type));
 
 switch (type) {
 case 0:
@@ -364,7 +364,7 @@ namespace cppcanvas
 
 s >> color;
 solidColor = ::Color (0xff - (color >> 24), (color >> 
16) & 0xff, (color >> 8) & 0xff, color & 0xff);
-EMFP_DEBUG (printf ("EMF+\tsolid color: 0x%08x\n", 
color));
+EMFP_DEBUG (printf ("EMF+\tsolid color: 0x%08x\n", 
(unsigned int)color));
 
 break;
 }
@@ -373,19 +373,19 @@ namespace cppcanvas
 {
 s >> additionalFlags >> wrapMode;
 
-EMFP_DEBUG (printf ("EMF+\tpath gradient, additional 
flags: 0x%02x\n", additionalFlags));
+EMFP_DEBUG (printf ("EMF+\tpath gradient, additional 
flags: 0x%02x\n",(unsigned int) additionalFlags));
 
 sal_uInt32 color;
 
 s >> color;
 solidColor = ::Color (0xff - (color >> 24), (color >> 
16) & 0xff, (color >> 8) & 0xff, color & 0xff);
-EMFP_DEBUG (printf ("EMF+\tcenter color: 0x%08x\n", 
color));
+EMFP_DEBUG (printf ("EMF+\tcenter color: 
0x%08x\n",(unsigned int) color));
 
 s >> areaX >> areaY;
 EMFP_DEBUG (printf ("EMF+\tcenter point: %f,%f\n", 
areaX, areaY));
 
 s >> surroundColorsNumber;
-EMFP_DEBUG (printf ("EMF+\tsurround colors: %d\n", 
surroundColorsNumber));
+EMFP_DEBUG (printf ("EMF+\tsurround colors: 
%d\n",(int) surroundColorsNumber));
 
 if( surroundColorsNumber<0 || 
sal_uInt32(surroundColorsNumber)>SAL_MAX_INT32/sizeof(::Color) )
 surroundColorsNumber = 
SAL_MAX_INT32/sizeof(::Color);
@@ -396,14 +396,14 @@ namespace cppcanvas
 surroundColors[i] = ::Color (0xff - (color >> 24), 
(color >> 16) & 0xff, (color >> 8) & 0xff, color & 0xff);
 if (i == 0)
 secondColor = surroundColors [0];
-EMFP_DEBUG (printf ("EMF+\tsurround color[%d]: 
0x%08x\n", i, color));
+

[Libreoffice] bug in vcl make files?

2011-09-01 Thread Jenei Gábor

Hi all,

As I tried to compile vcl module with raised dbglevel I found out the 
following error at linking:



/home/LOff/libo/workdir/unxlngi6.pro/CxxObject/vcl/unx/headless/svpgdi.o: In 
function `dbgOut(boost::shared_ptr const&)':
svpgdi.cxx:(.text._Z6dbgOutRKN5boost10shared_ptrIN7basebmp12BitmapDeviceEEE[dbgOut(boost::shared_ptr 
const&)]+0x13a): undefined reference to 
`basebmp::debugDump(boost::shared_ptr const&, 
std::basic_ostream >&)'

collect2: ld returned 1 exit status
make: *** 
[/home/LOff/libo/workdir/unxlngi6.pro/LinkTarget/Library/libvclplug_svplo.so] 
Error 1


As I saw in cpp code this should be ok, so probably basebmp debug.cxx is 
not marked for linking in the project. Could someone look at this issue 
who knows make files?


Thanks,

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


[Libreoffice] [PATCH] new BUG 36594

2011-08-31 Thread Jenei Gábor

Hello Eike,

I made the changes you said, and I resolved the no linefeed issue also, 
I hope it is ok now, and can be pushed, actually for me worked fine with 
all types of comments. Also I tried to follow the principals you said. 
So, push it if you think there is no need to correct something.


Gabor
>From 2615b372f0168673b7074f20b41a9301d1acc18e Mon Sep 17 00:00:00 2001
From: Gabor 
Date: Wed, 31 Aug 2011 12:53:26 +0200
Subject: [PATCH] comment bug fix

---
 connectivity/source/parse/sqlbison.y   |   23 +++-
 dbaccess/source/ui/querydesign/querycontroller.cxx |   61 +++-
 2 files changed, 81 insertions(+), 3 deletions(-)

diff --git a/connectivity/source/parse/sqlbison.y 
b/connectivity/source/parse/sqlbison.y
index d7e7c67..b348d72 100755
--- a/connectivity/source/parse/sqlbison.y
+++ b/connectivity/source/parse/sqlbison.y
@@ -4570,6 +4570,24 @@ void OSQLParser::setParseTree(OSQLParseNode * 
pNewParseTree)
m_pParseTree = pNewParseTree;
 }
 //-
+::rtl::OUString delComment(const ::rtl::OUString& sQuery){
+const sal_Unicode* sCopy=sQuery.getStr();
+sal_Int32 nQueryLen=sQuery.getLength();
+bool bIsText1=false;
+bool bIsText2=false;
+bool bComment=false;
+::rtl::OUStringBuffer sTemp(nQueryLen);
+for(size_t i=0;iSetRule(s_pScanner->GetSQLRule()); // initial
-   s_pScanner->prepareScan(rStatement, m_pContext, bInternational);
+   s_pScanner->prepareScan(sTemp, m_pContext, bInternational);
 
SQLyylval.pParseNode = NULL;
//  SQLyypvt = NULL;
diff --git a/dbaccess/source/ui/querydesign/querycontroller.cxx 
b/dbaccess/source/ui/querydesign/querycontroller.cxx
index 054c854..18a6d10 100644
--- a/dbaccess/source/ui/querydesign/querycontroller.cxx
+++ b/dbaccess/source/ui/querydesign/querycontroller.cxx
@@ -94,6 +94,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 
 extern "C" void SAL_CALL createRegistryInfo_OQueryControl()
 {
@@ -1272,7 +1274,61 @@ Reference 
OQueryController::getObjectContainer()  const
 OSL_ENSURE( xElements.is(), "OQueryController::getObjectContainer: unable 
to obtain the container!" );
 return xElements;
 }
-
+//-
+//this struct is for the following functions
+struct QueryComment{
+sal_Int32 nPos;
+::rtl::OUString sComment;
+};
+//-
+std::vector getComment(const ::rtl::OUString& sQuery){
+const sal_Unicode* sCopy=sQuery.getStr();
+const sal_uInt32 nQueryLen=sQuery.getLength();
+bool bIsText1=false;
+bool bIsText2=false;
+bool bComment=false;
+std::vector sRet;
+::rtl::OUStringBuffer sTemp;
+QueryComment TempComment;
+sal_Int32 nCommentLen=0;
+for(size_t i=0;i& sComments){
+::rtl::OUStringBuffer sRet;
+const sal_Unicode* pBeg=sQuery.getStr();
+sal_Int32 nCurrPos=0;
+for(size_t i=0;i < sComments.size();++i){
+sRet.append(pBeg + nCurrPos , sComments[i].nPos - nCurrPos);
+sRet.append(sComments[i].sComment);
+nCurrPos=sComments[i].nPos;
+}
+return sRet.makeStringAndClear();
+}
 // 
-
 void OQueryController::executeQuery()
 {
@@ -1601,15 +1657,16 @@ bool OQueryController::doSaveAsDoc(sal_Bool _bSaveAs)
 {
 ::rtl::OUString aErrorMsg;
 
+std::vector sComments=getComment(m_sStatement);
 ::connectivity::OSQLParseNode* pNode = m_aSqlParser.parseTree( 
aErrorMsg, m_sStatement, m_bGraphicalDesign );
 if(pNode)
 {
 pNode->parseNodeToStr( sTranslatedStmt, getConnection() );
 delete pNode;
 }
-
 m_xComposer->setQuery(sTranslatedStmt);
 sTranslatedStmt = m_xComposer->getComposedQuery();
+sTranslatedStmt = ConcatComment(sTranslatedStmt,sComments);
 }
 catch(const SQLException& e)
 {
-- 
1.7.2.5

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


[Libreoffice] BUG 36594

2011-08-30 Thread Jenei Gábor

Hello Eike,

I made your recommended changes, but the querycomposer class seems to be 
modified since I last worked on this issu, as unfortunatelly it deletes 
all the linefeeds in the query string, so I cannot make it work. Now I 
could store in a second vector whether one line is just empty(it only 
contains a comment), or it contains query string, so then I iterate on 
this vector, and try to reconstruct my query with comments. Actually 
I've already checked that my delComment function works ok, it leaves the 
linefeeds on their place, so something else must go wrong. I could solve 
the issue, but I guess it will break the usability of the two functions 
in querycontroller.cxx alone, so they only could be used together just 
as before. Maybe I should just unite them into one function?


thanks,

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


[Libreoffice] gdb debugging error

2011-08-30 Thread Jenei Gábor

Hello,

While I try to run gdb on soffice.bin I cannot start soffice.bin as it 
gives the following error:


/home/LOff/libo/desktop/source/app/cmdlineargs.cxx, Line 140: 
CommandLineArgs: no ProcessServiceFactory./lib/bootstrap.uno.so"

 Program received signal SIGSEGV, Segmentation fault.
desktop::CommandLineArgs::ParseCommandLine_Impl (this=0xb7f62ba0, 
supplier=...)

at /home/LOff/libo/desktop/source/app/cmdlineargs.cxx:144
Current language:  auto
The current source language is "auto; currently c++".

can you tell me how to fix it?

Gabor

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


Re: [Libreoffice] [PATCH] BUG 36594

2011-08-29 Thread Jenei Gábor

Hello Eike,

Let me to have some questions about your review:

2011. 08. 22. 21:47 keltezéssel, Eike Rathke írta:

Hi Jenei,

On Sunday, 2011-08-21 14:59:26 +0200, Jenei Gábor wrote:


+::rtl::OUStringBuffer sTemp;

Construct the buffer with a sufficient capacity beforehand so no memory
allocation needs to be done in between:

::rtl::OUStringBuffer sTemp( nQueryLen);


[...]
+return (::rtl::OUString)sTemp;

Make that instead

return sTemp.makeStringAndClear();

With your C-style cast (please don't use those anyhow, this is C++)
a temporary string instance is created and the buffer is copied, which
it isn't when using makeStringAndClear().



+std::vector<  ::rtl::OUStringBuffer>  getComment(const ::rtl::OUString&  
sQuery){

Why return vector  ? vector  seems to be more
straight forward.


+const sal_Unicode* sCopy=sQuery.getStr();
+int nQueryLen=sQuery.getLength();
+bool bIsText1=false;
+bool bIsText2=false;
+bool bComment=false;
+std::vector<  ::rtl::OUStringBuffer>  sRet;
+::rtl::OUStringBuffer sTemp;
+for(int i=0;i
Provided that vector  is returned, change that to

sRet.push_back( sTemp.makeStringAndClear());

then there's also no need to assign sTemp an empty OUString anymore.
Why isn't it needed? sTemp is not local in the loop, so it would contain 
the old line still, so for me it seems that it would do bad push_back. 
Maybe you wanted to tell to declare sTemp inside the loop so it'll be 
local in the loop?



+}
+if(!bIsText1&&  !bIsText2&&  (i+1)
That one is superfluous, sTemp as a stack local variable will be
destructed upon return anyway.

yes,thank you,this is a needless line in the end.



+return sRet;
+}



+//--
+::rtl::OUString ConcatComment(const ::rtl::OUString&  sQuery,std::vector<  
::rtl::OUStringBuffer>  sComments){

Pass sComments as const reference so it doesn't need to be copied when
ConcatComment() is called. And use vector  instead, as above.
Yes,this is also ok, I've already modified it, passing classes by value 
may need long time and memory.



+::rtl::OUStringBuffer sRet;
+int nIndLF=0;
+int nIndBeg=0;
+for(unsigned int i=0;i
This conditional gets executed for each element of sComments, but
clearly sQuery can't change in between, so doing this over and over
again is unnecessary.
So,should I do a break when the condition is true(anyway if there is no 
linefeed in the query it implies that the length of sComments is 1, you 
can see this in getComments function, so the if will be evaluated only once.



+}
+else{
+nIndLF=sQuery.indexOf('\n',nIndLF);
+}
+sRet.append(sQuery.copy(nIndBeg,nIndLF-nIndBeg));

What if sQuery doesn't contain as many LFs as there are elements in
sComments? nIndLF will be -1 and in the next loop run nIndBeg will also
be -1.
Well, I have just told a few lines ago, this is theorically impossible, 
as we used getComment function, which even for lines without comment 
pushes a linefeed just alone,in order to know the correct order of 
lines. So, I guess your problem only may occur if someone uses this 
function without getComment, this might be buggy, yeah.


The append(copy()) construct could be optimized as the copy creates
a temporary OUString instance that then is appended to sRet. More
effective would be something like

sRet.append( sQuery.getStr() + nIndBeg, nIndLF - nIndBeg));


+sRet.append(sComments[i]);
+}
+return (::rtl::OUString)sRet;

Same here, use

return sRet.makeStringAndClear();



Btw,


+sTranslatedStmt=ConcatComment(sTranslatedStmt,sComments);

blanks increase legibility, maybe it's just me but I'd much prefer a

sTranslatedStmt = ConcatComment( sTranslatedStmt, sComments);

style instead.

Thanks
   Eike



___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice
Sorry for this long mail,but I thought it's better to see the whole 
former code, I hope you saw all my questions.


Thank you for your help:

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


Re: [Libreoffice] build error

2011-08-29 Thread Jenei Gábor

Hello,

For a while I did not have this error,but now it appears again. Actually 
I did a totally normal build without debug symbols and dbglevel setting, 
but still it appears. It seems to be a makefile error of LibreOffice. 
Has anyone already met the problem?


2011. 08. 26. 14:49 keltezéssel, Caolán McNamara írta:

On Wed, 2011-08-24 at 15:56 +0200, Jenei Gábor wrote:

Hello,

While building a totally new build on Debian 6 32bit I got the following
error message:

Since you've disabled or enabled at least one algorithm, you need to do
the following before building:

 make depend

Configured for linux-elf.
mkdir: cannot create directory `./unxlngi6/misc/build/openssl-0.9.8o/.':
File exists
making all in crypto...
make[2]: *** No rule to make target `x86cpuid-elf.o', needed by
`../libcrypto.a'.  Stop.
make[1]: *** [build_crypto] Error 1
dmake:  Error code 2, while making './unxlngi6/misc/build/so_built_openssl'

should I do only make depend?

I imagine that the above "do make depend" is an error/warning message
from openssl itself inside its own little embedded build, so doing "make
depend" won't help probably.

Your configure/build options might matter here ?

C.




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


Re: [Libreoffice] smoke test fail

2011-08-25 Thread Jenei Gábor
Yes,the problem is there, actually I found out that in type*.cxx there 
is a reference counting variable,which seems to be not 0 in the end, so 
it looks like a memory leak. But I don't know yet where, and what's the 
reason. Can you help me?


2011. 08. 26. 0:01 keltezéssel, Miklos Vajna írta:

On Thu, Aug 25, 2011 at 06:32:47PM +0200, Jenei Gábor  wrote:

While doing dev-install I got the following errors:

assertion caught: Error: rtl_string2UString_status() - UTF8 test
encoding is wrong From File ustring.c at Line 634
Database Insert record into Database

assertion caught: Error: rtl_string2UString_status() - UTF8 test
encoding is wrong From File ustring.c at Line 634
Database Read other record from Database

and

assertion caught: Error: unexpected java exception occurred! From File
/home/LOff/libo/bridges/source/jni_uno/jni_base.h at Line 130
assertion caught: Error: [jni_uno bridge error]
java.lang.UnsatisfiedLinkError: libjava_uno: libjava_uno.so: The shared
library cannot be opened, there is no such file From File
/home/LOff/libo/bridges/source/jni_uno/jni_bridge.cxx at Line 545
assertion caught: Error: assertion failed! From File
/home/LOff/libo/cppu/source/uno/lbmap.cxx at Line 388
Extension Extension Service

Do you still the whole tree with dbglevel=2?


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


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


[Libreoffice] smoke test fail

2011-08-25 Thread Jenei Gábor

Hello,

While doing dev-install I got the following errors:

assertion caught: Error: rtl_string2UString_status() - UTF8 test 
encoding is wrong From File ustring.c at Line 634

Database Insert record into Database

assertion caught: Error: rtl_string2UString_status() - UTF8 test 
encoding is wrong From File ustring.c at Line 634

Database Read other record from Database

and

assertion caught: Error: unexpected java exception occurred! From File 
/home/LOff/libo/bridges/source/jni_uno/jni_base.h at Line 130
assertion caught: Error: [jni_uno bridge error] 
java.lang.UnsatisfiedLinkError: libjava_uno: libjava_uno.so: The shared 
library cannot be opened, there is no such file From File 
/home/LOff/libo/bridges/source/jni_uno/jni_bridge.cxx at Line 545
assertion caught: Error: assertion failed! From File 
/home/LOff/libo/cppu/source/uno/lbmap.cxx at Line 388

Extension Extension Service

Can you tell me how to fix them?

Thanks,

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


[Libreoffice] build error

2011-08-24 Thread Jenei Gábor
Hello,

While building a totally new build on Debian 6 32bit I got the following
error message:

Since you've disabled or enabled at least one algorithm, you need to do
the following before building:

make depend

Configured for linux-elf.
mkdir: cannot create directory `./unxlngi6/misc/build/openssl-0.9.8o/.':
File exists
making all in crypto...
make[2]: *** No rule to make target `x86cpuid-elf.o', needed by
`../libcrypto.a'.  Stop.
make[1]: *** [build_crypto] Error 1
dmake:  Error code 2, while making './unxlngi6/misc/build/so_built_openssl'

should I do only make depend?
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice] [PATCH] dev-install debug build fix

2011-08-24 Thread Jenei Gábor

Hello,

Thanks to Stephan Bergmann I could fix also the dev-install of make, so 
now it works well even for debug version. Here I am sending the patch 
for this issue.


Gabor
>From 7a8fb1822ffd5994fe3b805577d8eadad4ca41f4 Mon Sep 17 00:00:00 2001
From: Gabor 
Date: Wed, 24 Aug 2011 12:02:44 +0200
Subject: [PATCH] dev-install build fix

---
 filter/source/config/cache/filtercache.cxx |8 +---
 1 files changed, 1 insertions(+), 7 deletions(-)

diff --git a/filter/source/config/cache/filtercache.cxx 
b/filter/source/config/cache/filtercache.cxx
index 37983d3..5099cc9 100644
--- a/filter/source/config/cache/filtercache.cxx
+++ b/filter/source/config/cache/filtercache.cxx
@@ -214,13 +214,7 @@ void FilterCache::load(EFillState eRequired,
 return;
 
 #if OSL_DEBUG_LEVEL > 1
-if (
-(!bByThread) &&
-(
-((eRequired & E_CONTAINS_FILTERS) == E_CONTAINS_FILTERS) ||
-((eRequired & E_CONTAINS_ALL) == E_CONTAINS_ALL)
-)
-   )
+if (!bByThread && ((eRequired & E_CONTAINS_ALL) == E_CONTAINS_ALL))
 {
 OSL_FAIL("Who disturb our \"fill cache on demand\" feature and force 
loading of ALL data during office startup? Please optimize your code, so a full 
filled filter cache is not realy needed here!");
 }
-- 
1.7.2.5

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


Re: [Libreoffice] [PATCH] BUG 36594

2011-08-24 Thread Jenei Gábor
Yes,naturally, I just didn't react because I am already working on 
another job, but as soon as I am done I'll do your recommendations, and 
your comments were actually useful, I did not know about Stringandclear 
method of OUString, and also some notes about memory allocation. So I am 
going to do the modifications on the patch.


Gabor

2011. 08. 24. 2:50 keltezéssel, Eike Rathke írta:

Hi Jenei,

On Monday, 2011-08-22 21:47:58 +0200, Eike Rathke wrote:


[... lots of technical details ...]

I hope my remarks didn't come across as criticism, they weren't meant as
such but more as hints how things could be done better and why.

Of course it's great to have someone working on this! :-)

   Eike



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


[Libreoffice] smoke test failed

2011-08-23 Thread Jenei Gábor
Hello,

I just wanted to do make dev-install after a successful make -sr
debug=true dbglevel=2. I have already posted so patches,because I met
problems even in making, but finally I made it all. Now smoke-test fails
with the error messages:

invokeComponentFactory envDcp:gcc3
implName:com.sun.star.comp.filter.config.FilterFactory
modPath:file:///home/LOff/libo/solver/350/unxlngi6.pro/installation/opt/program/../basis-link/program/libfilterconfig1.so
Trace 2733/8: "> inserting new mapping: ;gcc3[909c6e0];gcc3[909c6e0]"
Trace 2733/8: "> revoking mapping ;gcc3[909c6e0];gcc3[909c6e0]"
Error: File /home/LOff/libo/filter/source/config/cache/filtercache.cxx,
Line 225: Who disturb our "fill cache on demand" feature and force
loading of ALL data during office startup? Please optimize your code, so
a full filled filter cache is not realy needed here!
Exited with code '-1'
> toUNOname(): N3com3sun4star4lang17DisposedExceptionE =>
com.sun.star.lang.DisposedException
> c++ exception occurred: com.sun.star.lang.DisposedException
> uno exception occurred: com.sun.star.lang.DisposedException
Trace 1986/2: "/home/LOff/libo/binaryurp/source/bridge.cxx:504; caught
runtime exception 'Binary URP bridge already disposed'"
Trace 1986/2: "/home/LOff/libo/binaryurp/source/bridge.cxx:504; caught
runtime exception 'Binary URP bridge already disposed'"
Trace 1986/2: "/home/LOff/libo/binaryurp/source/bridge.cxx:504; caught
runtime exception 'Binary URP bridge already disposed'"
> toUNOname(): N3com3sun4star4lang17DisposedExceptionE =>
com.sun.star.lang.DisposedException
> c++ exception occurred: com.sun.star.lang.DisposedException
> toUNOname(): N3com3sun4star4lang17DisposedExceptionE =>
com.sun.star.lang.DisposedException
> toUNOname(): N3com3sun4star4lang17DisposedExceptionE =>
com.sun.star.lang.DisposedException
> c++ exception occurred: com.sun.star.lang.DisposedException
> uno exception occurred: com.sun.star.lang.DisposedException
> toUNOname(): N3com3sun4star4lang17DisposedExceptionE =>
com.sun.star.lang.DisposedException
> c++ exception occurred: com.sun.star.lang.DisposedException
> toUNOname(): N3com3sun4star4lang17DisposedExceptionE =>
com.sun.star.lang.DisposedException
##Failure Location unknown## : Error
Test name: N12_GLOBAL__N_14TestE::test
An uncaught exception of type com.sun.star.lang.DisposedException
- Binary URP bridge disposed during call

##Failure Location unknown## : Error
Test name: N12_GLOBAL__N_14TestE::test
tearDown() failed
- An uncaught exception of type com.sun.star.lang.DisposedException
- Binary URP bridge already disposed

Failures !!!
Run: 1   Failure total: 2   Failures: 0   Errors: 2
Trace 1986/2: "/home/LOff/libo/binaryurp/source/bridge.cxx:504; caught
runtime exception 'Binary URP bridge already disposed'"
Trace 1986/2: "/home/LOff/libo/binaryurp/source/bridge.cxx:504; caught
runtime exception 'Binary URP bridge already disposed'"
Trace 1986/2: "> revoking mapping ;gcc3[40ad3c18];uno[40ad3b58]"
Trace 1986/2: "> revoking mapping ;uno[40ad3b58];gcc3[40ad3c18]"
dmake:  Error code 1, while making 'cpptest'

could someone help in this problem? it seems to me that filtercache.cxx
has a function which has an optional bool parameter, but on call load
function the parameter is not given even in debug version, so maybe I
should give this parameter,but I don't know how it gets true or false.

Thanks for your help,

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


Re: [Libreoffice] [PUSHED][PATCH] build errors

2011-08-23 Thread Jenei Gábor
Yes,naturally, however I've already certified,but all my codes are under 
the mentioned license unless I state something else.


Thanks,

Gabor

2011. 08. 23. 15:07 keltezéssel, Caolán McNamara írta:

On Tue, 2011-08-23 at 14:33 +0200, Jenei Gábor wrote:

Hello,

As I tried to build a fully debug version I saw several errors in
different source files

Looks good, pushed, thanks for this. Can you verify that your patches
are under the preferred LGPLv3+/MPLv1.1 combo ? (can also do a "all my
patches will be under this unless I say otherwise to keep it simple)

C.




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


[Libreoffice] [PATCH] build errors

2011-08-23 Thread Jenei Gábor

Hello,

As I tried to build a fully debug version I saw several errors in 
different source files, finally I made the build to work, but I still 
cannot do make dev-install (I'm going to work on this now). Here is a 
patch that contains all the necessary modifications of sources.


Gabor
>From 98e221820a0474dee27ce18396f1b5cae8a7f168 Mon Sep 17 00:00:00 2001
From: Gabor 
Date: Tue, 23 Aug 2011 14:25:38 +0200
Subject: [PATCH] debug build errors

---
 automation/source/server/statemnt.cxx  |4 ++--
 automation/source/simplecm/simplecm.cxx|4 ++--
 .../source/model/main/ChartModel_Persistence.cxx   |2 +-
 chart2/source/model/template/ChartTypeTemplate.cxx |4 ++--
 cppcanvas/source/mtfrenderer/emfplus.cxx   |1 +
 sc/source/core/data/attarray.cxx   |1 +
 6 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/automation/source/server/statemnt.cxx 
b/automation/source/server/statemnt.cxx
index ed0e110..12a00e3 100644
--- a/automation/source/server/statemnt.cxx
+++ b/automation/source/server/statemnt.cxx
@@ -692,7 +692,7 @@ StatementCommand::StatementCommand( StatementList 
*pAfterThis, sal_uInt16 Method
 if( nParams & PARAM_UINT16_2 )  {m_pDbgWin->AddText( " n2:" 
);m_pDbgWin->AddText( String::CreateFromInt32( nNr2 ) );}
 if( nParams & PARAM_UINT16_3 )  {m_pDbgWin->AddText( " n3:" 
);m_pDbgWin->AddText( String::CreateFromInt32( nNr3 ) );}
 if( nParams & PARAM_UINT16_4 )  {m_pDbgWin->AddText( " n4:" 
);m_pDbgWin->AddText( String::CreateFromInt32( nNr4 ) );}
-if( nParams & PARAM_UINT32_1 )  {m_pDbgWin->AddText( " nl1:" 
);m_pDbgWin->AddText( String::CreateFromInt64( nLNr1 ) );}
+if( nParams & PARAM_UINT32_1 )  {m_pDbgWin->AddText( " nl1:" 
);m_pDbgWin->AddText( String::CreateFromInt64( nLNr1_and_Pointer.nLNr1 ) );}
 if( nParams & PARAM_STR_1 ) {m_pDbgWin->AddText( " s1:" 
);m_pDbgWin->AddText( aString1 );}
 if( nParams & PARAM_STR_2 ) {m_pDbgWin->AddText( " s2:" 
);m_pDbgWin->AddText( aString2 );}
 if( nParams & PARAM_BOOL_1 ){m_pDbgWin->AddText( " b1:" 
);m_pDbgWin->AddText( bBool1 ? "TRUE" : "FALSE" );}
@@ -739,7 +739,7 @@ StatementCommand::StatementCommand( SCmdStream *pCmdIn )
 if( nParams & PARAM_UINT16_2 )  {m_pDbgWin->AddText( " n2:" 
);m_pDbgWin->AddText( String::CreateFromInt32( nNr2 ) );}
 if( nParams & PARAM_UINT16_3 )  {m_pDbgWin->AddText( " n3:" 
);m_pDbgWin->AddText( String::CreateFromInt32( nNr3 ) );}
 if( nParams & PARAM_UINT16_4 )  {m_pDbgWin->AddText( " n4:" 
);m_pDbgWin->AddText( String::CreateFromInt32( nNr4 ) );}
-if( nParams & PARAM_UINT32_1 )  {m_pDbgWin->AddText( " nl1:" 
);m_pDbgWin->AddText( String::CreateFromInt64( nLNr1 ) );}
+if( nParams & PARAM_UINT32_1 )  {m_pDbgWin->AddText( " nl1:" 
);m_pDbgWin->AddText( String::CreateFromInt64( nLNr1_and_Pointer.nLNr1 ) );}
 if( nParams & PARAM_STR_1 ) {m_pDbgWin->AddText( " s1:" 
);m_pDbgWin->AddText( aString1 );}
 if( nParams & PARAM_STR_2 ) {m_pDbgWin->AddText( " s2:" 
);m_pDbgWin->AddText( aString2 );}
 if( nParams & PARAM_BOOL_1 ){m_pDbgWin->AddText( " b1:" 
);m_pDbgWin->AddText( bBool1 ? "TRUE" : "FALSE" );}
diff --git a/automation/source/simplecm/simplecm.cxx 
b/automation/source/simplecm/simplecm.cxx
index 39f8643..2cc5b93 100644
--- a/automation/source/simplecm/simplecm.cxx
+++ b/automation/source/simplecm/simplecm.cxx
@@ -43,10 +43,10 @@
 #include 
 void debug_printf( const char *chars )
 {
-static BOOL bPrint = (getenv("DEBUG") != NULL);
+static bool bPrint = (getenv("DEBUG") != NULL);
 if ( bPrint )
 {
-printf( "%c\n", chars );
+printf( "%s\n", chars );
 fflush( stdout );
 }
 }
diff --git a/chart2/source/model/main/ChartModel_Persistence.cxx 
b/chart2/source/model/main/ChartModel_Persistence.cxx
index b1cbbd0..809419b 100644
--- a/chart2/source/model/main/ChartModel_Persistence.cxx
+++ b/chart2/source/model/main/ChartModel_Persistence.cxx
@@ -503,7 +503,7 @@ void SAL_CALL ChartModel::initNew()
 #if OSL_DEBUG_LEVEL >= CHART_TRACE_OSL_DEBUG_LEVEL
 OSL_TRACE( "ChartModel::initNew: Showing ChartDocument structure" );
 OSL_TRACE( "" );
-debug::ChartDebugTraceDocument( Reference< chart2::XChartDocument >( this 
));
+::chart::debug::ChartDebugTraceDocument( Reference< chart2::XChartDocument 
>( this ));
 #endif
 }
 
diff --git a/chart2/source/model/template/ChartTypeTemplate.cxx 
b/chart2/source/model/template/ChartTypeTemplate.cxx
index 9fee9b3..77d2b3f 100644
--- a/chart2/source/model/template/ChartTypeTemplate.cxx
+++ b/chart2/source/model/template/ChartTypeTemplate.cxx
@@ -322,7 +322,7 @@ void SAL_CALL ChartTypeTemplate::changeDiagramData(
 #if OSL_DEBUG_LEVEL >= CHART_TRACE_OSL_DEBUG_LEVEL
 OSL_TRACE( "ChartTypeTemplate::changeDiagramData: Showing Diagram 
structure" );
 OSL_TRACE( 
"---" );
-d

Re: [Libreoffice] Build failing in tail_build module

2011-08-23 Thread Jenei Gábor

Hello Swagat,

As Cor suggested try to follow the instructions in the output, go to 
root dir of your source and 'source Env.Host.sh' after running this: 'cd 
tail_build', 'make clean', 'make -sr'  I had the same problem and it 
resolved me the issue,however I don't know why this error occured, it 
should be investigated.


Gabor

2011. 08. 23. 11:30 keltezéssel, swagat sharma írta:

Hi I got the following error. Any ideas?
I didn't make any changes in the code, just trying to build the master.

Error -->

scripting deliver
Module 'scripting' delivered successfully. 5 files copied, 30 files 
unchanged

odk deliver
[ build CXX ] sd/source/ui/dlg/TemplateScanner
Module 'odk' delivered successfully. 1 files copied, 3 files unchanged
/home/eswagsh/Documents/LibreOffice_Sourc_Code/libreoffice-3.5.0/libo/sd/source/ui/dlg/TemplateScanner.cxx: 
In member function 'sd::TemplateScanner::State 
sd::TemplateScanner::ScanEntry()':
/home/eswagsh/Documents/LibreOffice_Sourc_Code/libreoffice-3.5.0/libo/sd/source/ui/dlg/TemplateScanner.cxx:268: 
error: 'ConvertResourceString' is not a member of 'SfxDocumentTemplates'

[ build CUT ] hwpfilter_test_hwpfilter
[ build CUT ] lotuswordpro_test_lotuswordpro
make[1]: *** Waiting for unfinished jobs
dmake:  Error code 2, while making 'all'

---
Oh dear - something failed during the build - sorry !
  For more help with debugging build errors, please see the section in:
http://wiki.documentfoundation.org/Development

  internal build errors:

ERROR: error 65280 occurred while making 
/home/eswagsh/Documents/LibreOffice_Sourc_Code/libreoffice-3.5.0/libo/tail_build/prj


 it seems that the error is inside 'tail_build', please re-run build
 inside this module to isolate the error and/or test your fix:
---

rm -Rf 
/home/eswagsh/Documents/LibreOffice_Sourc_Code/libreoffice-3.5.0/libo/tail_build/unxlngx6.pro 
 # optional module 'clean'

/bin/bash
cd /home/eswagsh/Documents/LibreOffice_Sourc_Code/libreoffice-3.5.0/libo
source ./Env.Host.sh 
cd tail_build
make -r

when the problem is isolated and fixed exit and re-run 'make' from the 
top-level

make: *** [all] Error 1

--
Swagat



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


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


[Libreoffice] [PATCH] servicefactory.cxx build error

2011-08-22 Thread Jenei Gábor

Hello,

While compiling debug version I found an error in servicefactory.cxx, it 
uses fprintf without include,so C++ does not know about fprintf. Here is 
a patch to resolve the issue, please put it to git.


thanks:

Gabor
>From 1ea5796bbb53ae90cde8099d0676475cd7083db3 Mon Sep 17 00:00:00 2001
From: Gabor 
Date: Mon, 22 Aug 2011 15:55:25 +0200
Subject: [PATCH] servicefactory fix

---
 cppuhelper/source/servicefactory.cxx |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/cppuhelper/source/servicefactory.cxx 
b/cppuhelper/source/servicefactory.cxx
index e796a96..7971d7a 100644
--- a/cppuhelper/source/servicefactory.cxx
+++ b/cppuhelper/source/servicefactory.cxx
@@ -56,6 +56,7 @@
 #include "com/sun/star/registry/XSimpleRegistry.hpp"
 #include "com/sun/star/registry/XImplementationRegistration.hpp"
 #include "com/sun/star/security/XAccessController.hpp"
+#include 
 
 #define OUSTR(x) ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(x) )
 
-- 
1.7.2.5

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


[Libreoffice] [PATCH] BUG 36594

2011-08-21 Thread Jenei Gábor
Hello,

Here is a patch for bug 36594. It deletes the comments from the SQL
query and puts them beck for saving and execution. Please review it,and
push it to git.

Gabor
>From 73ff25834cca39cd8d4c08210556aa532b48fb77 Mon Sep 17 00:00:00 2001
From: Gabor Jenei 
Date: Sun, 21 Aug 2011 14:51:15 +0200
Subject: [PATCH] Comment bug

---
 connectivity/source/parse/sqlbison.y   |   22 -
 dbaccess/source/ui/querydesign/querycontroller.cxx |   49 +++-
 2 files changed, 68 insertions(+), 3 deletions(-)

diff --git a/connectivity/source/parse/sqlbison.y b/connectivity/source/parse/sqlbison.y
index d7e7c67..8f97d17 100755
--- a/connectivity/source/parse/sqlbison.y
+++ b/connectivity/source/parse/sqlbison.y
@@ -4570,6 +4570,24 @@ void OSQLParser::setParseTree(OSQLParseNode * pNewParseTree)
 	m_pParseTree = pNewParseTree;
 }
 //-
+::rtl::OUString delComment(const ::rtl::OUString& sQuery){
+const sal_Unicode* sCopy=sQuery.getStr();
+int nQueryLen=sQuery.getLength();
+bool bIsText1=false;
+bool bIsText2=false;
+bool bComment=false;
+::rtl::OUStringBuffer sTemp;
+for(int i=0;iSetRule(s_pScanner->GetSQLRule()); // initial
-	s_pScanner->prepareScan(rStatement, m_pContext, bInternational);
+	s_pScanner->prepareScan(sTemp, m_pContext, bInternational);
 
 	SQLyylval.pParseNode = NULL;
 	//	SQLyypvt = NULL;
diff --git a/dbaccess/source/ui/querydesign/querycontroller.cxx b/dbaccess/source/ui/querydesign/querycontroller.cxx
index 054c854..e7c35b3 100644
--- a/dbaccess/source/ui/querydesign/querycontroller.cxx
+++ b/dbaccess/source/ui/querydesign/querycontroller.cxx
@@ -94,6 +94,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 
 extern "C" void SAL_CALL createRegistryInfo_OQueryControl()
 {
@@ -1272,7 +1274,49 @@ Reference OQueryController::getObjectContainer()  const
 OSL_ENSURE( xElements.is(), "OQueryController::getObjectContainer: unable to obtain the container!" );
 return xElements;
 }
-
+//-
+std::vector< ::rtl::OUStringBuffer > getComment(const ::rtl::OUString& sQuery){
+const sal_Unicode* sCopy=sQuery.getStr();
+int nQueryLen=sQuery.getLength();
+bool bIsText1=false;
+bool bIsText2=false;
+bool bComment=false;
+std::vector< ::rtl::OUStringBuffer > sRet;
+::rtl::OUStringBuffer sTemp;
+for(int i=0;i sComments){
+::rtl::OUStringBuffer sRet;
+int nIndLF=0;
+int nIndBeg=0;
+for(unsigned int i=0;i sComments=getComment(m_sStatement);
 ::connectivity::OSQLParseNode* pNode = m_aSqlParser.parseTree( aErrorMsg, m_sStatement, m_bGraphicalDesign );
 if(pNode)
 {
@@ -1610,6 +1654,7 @@ bool OQueryController::doSaveAsDoc(sal_Bool _bSaveAs)
 
 m_xComposer->setQuery(sTranslatedStmt);
 sTranslatedStmt = m_xComposer->getComposedQuery();
+sTranslatedStmt=ConcatComment(sTranslatedStmt,sComments);
 }
 catch(const SQLException& e)
 {
-- 
1.7.2.5

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


Re: [Libreoffice] java LO part with Eclipse

2011-08-13 Thread Jenei Gábor
well,I've never tried, you should make a new clean project and then add 
the module folder to the build path, also you have to set it in debug 
settings, but I advise you to simply do a make -sr debug=true dbglevel=2 
in the module folder, it's easier than to make an eclipse project,and 
you can debug java by remote debugging in eclipse. So,if you are making 
a new version simply you can recompile the module,which took less than a 
minute for me,and you can see your changes through eclipse debugging. 
Are you using some kind of Linux?


Gabor

2011.08.13. 21:29 keltezéssel, julien2412 írta:

Jenei Gábor wrote:

Hello Julien,

I had this problem less than a week ago, if you read Cédric's website
you should find there the right way. First you have to set LO's JVM
setting. you have to set to listen on a port for remote debugger(in the
example it was 8000) and you have to set anotheroption,after this you
restart LO,and  with nmap you should see that port 8000 is open. Now, in
eclipse you go to debug configurations window, it's under the run
toolbar point. And there you have to set localhost and port 8000, after
this if you toogle a breakpoint it should work. For me it worked at
yesterday;)

Good luck:


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


Hello Jenei,

Thank you for the information but I'm far to have reached this step. I'd
like to know how, step by step, create a workspace  "ready to use" with LO
Java part.

Julien.

--
View this message in context: 
http://nabble.documentfoundation.org/java-LO-part-with-Eclipse-tp3251988p3252052.html
Sent from the Dev mailing list archive at Nabble.com.
___
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] java LO part with Eclipse

2011-08-13 Thread Jenei Gábor

Hello Julien,

I had this problem less than a week ago, if you read Cédric's website 
you should find there the right way. First you have to set LO's JVM 
setting. you have to set to listen on a port for remote debugger(in the 
example it was 8000) and you have to set anotheroption,after this you 
restart LO,and  with nmap you should see that port 8000 is open. Now, in 
eclipse you go to debug configurations window, it's under the run 
toolbar point. And there you have to set localhost and port 8000, after 
this if you toogle a breakpoint it should work. For me it worked at 
yesterday;)


Good luck:

Gabor

2011.08.13. 20:53 keltezéssel, julien2412 írta:

Hello,

I asked on the IRC but I had to leave so I certainly haven't let enough time
to people to respond. I'd like to know if there's a wiki page or something
which describes how to manage Java specific parts of LO in Eclipse.
I found these 2 pages :
- http://cedric.bosdonnat.free.fr/wordpress/?p=57
- http://wiki.services.openoffice.org/wiki/Java_and_OpenOffice.org

But I'd like to know how to create a workspace well configured to debug from
scratch.

Julien.

--
View this message in context: 
http://nabble.documentfoundation.org/java-LO-part-with-Eclipse-tp3251988p3251988.html
Sent from the Dev mailing list archive at Nabble.com.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


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


[Libreoffice] [PATCH] Bug 38486

2011-08-12 Thread Jenei Gábor
Hello,

Here is the patch that fixes the Query wizard, it seems that it works
fine now, however the problem mentioned in the patch was a minor
problem, wizard worked wrong for all queries where I wanted to sort by
an aggregate field. Please review it,and push it to git.

Thanks,

Gabor
>From 3210fcf363e242ecca3bfca686ef9b8ac91305ee Mon Sep 17 00:00:00 2001
From: Gabor Jenei 
Date: Fri, 12 Aug 2011 10:15:24 +0200
Subject: [PATCH] Bug 38486 SQL fix

---
 .../com/sun/star/wizards/db/SQLQueryComposer.java  |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/wizards/com/sun/star/wizards/db/SQLQueryComposer.java b/wizards/com/sun/star/wizards/db/SQLQueryComposer.java
index a6d2c2b..3f595f2 100644
--- a/wizards/com/sun/star/wizards/db/SQLQueryComposer.java
+++ b/wizards/com/sun/star/wizards/db/SQLQueryComposer.java
@@ -205,7 +205,7 @@ public class SQLQueryComposer
 {
 sOrder += ", ";
 }
-sOrder += CurDBMetaData.AggregateFieldNames[iAggregate][1] + "(" + CurDBMetaData.AggregateFieldNames[iAggregate][0] + ")";
+sOrder += CurDBMetaData.AggregateFieldNames[iAggregate][1] + "(" + getComposedAliasFieldName(CurDBMetaData.AggregateFieldNames[iAggregate][0]) + ")";
 sOrder += " " + CurDBMetaData.getSortFieldNames()[i][1];
 m_queryComposer.setOrder(sOrder);
 }
-- 
1.7.2.5

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


[Libreoffice] [PATCH] BUG 38486

2011-08-12 Thread Jenei Gábor
Hello,

Here is a patch for the mentioned bug, actually the problem mentioned in
the bug info was just the minority, wizard didn't work for all the
queries where I wanted to sort by an aggregate field. I did several
tries,and it seems to be ok now, however without "group by" in an
aggregate query it seems to be silly to sort by anything, I must notice
Oracle even handles it as an error, it seems that for HSQL it's not a
problem. Please review the patch and push it to git.

Thanks,

Gabor
>From 3210fcf363e242ecca3bfca686ef9b8ac91305ee Mon Sep 17 00:00:00 2001
From: Gabor Jenei 
Date: Fri, 12 Aug 2011 10:15:24 +0200
Subject: [PATCH] Bug 38486 SQL fix

---
 .../com/sun/star/wizards/db/SQLQueryComposer.java  |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/wizards/com/sun/star/wizards/db/SQLQueryComposer.java b/wizards/com/sun/star/wizards/db/SQLQueryComposer.java
index a6d2c2b..3f595f2 100644
--- a/wizards/com/sun/star/wizards/db/SQLQueryComposer.java
+++ b/wizards/com/sun/star/wizards/db/SQLQueryComposer.java
@@ -205,7 +205,7 @@ public class SQLQueryComposer
 {
 sOrder += ", ";
 }
-sOrder += CurDBMetaData.AggregateFieldNames[iAggregate][1] + "(" + CurDBMetaData.AggregateFieldNames[iAggregate][0] + ")";
+sOrder += CurDBMetaData.AggregateFieldNames[iAggregate][1] + "(" + getComposedAliasFieldName(CurDBMetaData.AggregateFieldNames[iAggregate][0]) + ")";
 sOrder += " " + CurDBMetaData.getSortFieldNames()[i][1];
 m_queryComposer.setOrder(sOrder);
 }
-- 
1.7.2.5

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


Re: [Libreoffice] [PATCH] Bug 39168

2011-08-10 Thread Jenei Gábor

Hello Noel,

Well, I just like more if{  } form even is 
code is just one line long, but you are right, it still works(and maybe 
also nicer to leave it) without { and } As for the other comments, 
probably you're right that it's not the best solution, I just haven't 
understood fully all the objects, as to be honest because of the lot of 
classes this part of code needs a quite big effort to be modified, as 
you must understand all the objects before,which can be timeconfusing. 
But I absoloutly agree, that this is not the nicest solution, that's why 
I just signed it as purposed and not as final patch. Even because it 
keeps a quite annoying problem, that the overwrite dialog in saving will 
pop up wrong. So I don't either think that this patch can be pushed in 
this form. I just pushed it if someone wants to mind with it. By the way 
if you say I should correct it, and send it again, I'll do provided that 
someone is really going to push it afterwards, I just interrupted this 
job because of the debates about the bug. Some members even doubted if 
it should be fixed, so why should I mind about something needless then? 
Finally I have to mention that I cannot work on it at the moment, as I 
am busy with another bug about Base's querywizard. But as soon as I am 
done I could mind with this issue again taking into the consideration 
your requests.


Gabor

2011. 08. 10. 18:25 keltezéssel, Noel Power írta:

Hi Jenei
On 08/08/11 11:06, Jenei Gábor wrote:

Hello,

I would like to inform everyone that I attached my purposed patch 
that fixes the bug 39168 in our bug report page, since it causes an 
already mentioned problem in the overwriting dialog's popup I don't 
consider it as something stable, 

[...]
 Here I also attach the purposed patch and I am waiting for your 
reviews.
well I have to admit I am not familiar with this hybrid/pdf thing, not 
sure if it really is a good or bad thing, personally I really don't 
like the double extension thing, but anyway I just have some general 
comments on the patch


sfx2/source/dialog/filedlghelper.cxx


the first hunk in this patch is confusing, it changes the prevailing 
style of positioning for '{'&  '}' if there is no good reason to do 
that then it is better not to make such a change


the second hunk that changes the logic of FileDialogHelper::GetPath is 
a little worrying ( 'cause I guess this is used by many clients ), why 
was this necessary and how does it change the existing behaviour?


sfx2/source/doc/guisaveas.cxx
=

2nd hunk is just whitespace change and again it's quite noisy to review

- in 'sal_Bool ModelData_Impl::OutputFileDialog'

+if(bAddStream==sal_True)
the equality check isn't really necessary&
if((bAddStream)
just reads better for me,

- please don't change the prevailing style for '{' / '}'

- using a map to store and retrieve the desired extension based on the 
filtername would be neater and less cluttered that then the it/then 
construct used in the patch.



what's really uncomfortable is ( from a quick apply&  try of the patch 
) is the fact that the file name you are saving to is sort-of hijacked 
under the hood. e.g. the file dialogs indicate one thing ( save 
with.pdf extension ) but do something else ( save with a .odt.pdf 
extension ).
Using a new filter type would seem a more natural solution e.g. a 
filter type that you could select in the 'save-as' dialog that would 
save the pdf in the required hybrid format and would indicate the ( 
imo horrible dual extension ) The same filter type would be 
preselected ( if hybrid was selected in the pdf export options dialog 
) and shown file dialog raised by the export button. But then again I 
only have a very passing familiarity with stuff, maybe someone else 
might have more constructive advice


Noel


Noel




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



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


[Libreoffice] Java debugging

2011-08-09 Thread Jenei Gábor

Hello,

Could someone help me? I would like to fix a bug with LO Base wizards, I 
found the java source of the wizard,and even I got how to debug it from 
OpenOffice instructions: here 
 and here 
 
Eclipse runs well, it stops at my breakpoint, and even I can see som 
variables, actually all the global and static variables, but local 
variables are not shown,and even if I directly enter the name eclipse 
can't resolve it. Does any of you have experiences with java components 
debugging? It would be nice to use it from Eclipse.


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


[Libreoffice] [BUG] dbaccess/xmlfilter.cxx

2011-08-08 Thread Jenei Gábor

Hello,

I found out that on make -sr debug=true dbglevel=2 dbaccess did not 
compile successfully, the problem is with xmlfilter.cxx, it uses 
OStringBuffer, but there is no include to use it, so cxx says: 
"OStringBuffer is not a member of rtl namespace" I did the include, and 
the build works fine, I must notice that it only appears in debug 
version making, as the code is behind a DBGLEVEL>1 macro. I send the 
patch to fix it in the attachement, please add it to all the sources.


Gabor Jenei
>From 4d1b1789ff14c26bb23f49adfaad6e95991af25c Mon Sep 17 00:00:00 2001
From: Gabor Jenei 
Date: Mon, 8 Aug 2011 19:49:20 +0200
Subject: [PATCH] patch for xmlfilter.cxx

---
 dbaccess/source/filter/xml/xmlfilter.cxx |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/dbaccess/source/filter/xml/xmlfilter.cxx 
b/dbaccess/source/filter/xml/xmlfilter.cxx
index 383fc29..933f9cd 100644
--- a/dbaccess/source/filter/xml/xmlfilter.cxx
+++ b/dbaccess/source/filter/xml/xmlfilter.cxx
@@ -76,6 +76,7 @@
 #include 
 #include 
 #include "dsntypes.hxx"
+#include 
 
 using namespace ::com::sun::star;
 
@@ -269,7 +270,7 @@ sal_Int32 ReadThroughComponent(
 catch (const SAXParseException& r)
 {
 #if OSL_DEBUG_LEVEL > 1
-rtl::OStringBuffer aError(RTL_CONSTASCII_STRINGPARAM(
+::rtl::OStringBuffer aError(RTL_CONSTASCII_STRINGPARAM(
 "SAX parse exception catched while importing:\n"));
 aError.append(rtl::OUStringToOString(r.Message,
 RTL_TEXTENCODING_ASCII_US));
-- 
1.7.2.5

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


[Libreoffice] [PATCH] Bug 39168

2011-08-08 Thread Jenei Gábor

Hello,

I would like to inform everyone that I attached my purposed patch that 
fixes the bug 39168 in our bug report page, since it causes an already 
mentioned problem in the overwriting dialog's popup I don't consider it 
as something stable, but as in the recent days there were arguments 
about the patch I wouldn't like to improve it anymore, or maybe in case 
if you could put it finally into the main branch and could consider it 
as a commit. Here I also attach the purposed patch and I am waiting for 
your reviews.


Thanks,

Gabor
>From 9949add108630b613ec36bf3185bf293ebc7940b Mon Sep 17 00:00:00 2001
From: Gabor Jenei 
Date: Mon, 8 Aug 2011 11:30:51 +0200
Subject: [PATCH] purposed patch for bug 39168

---
 desktop/source/deployment/gui/dp_gui_dialog.src |2 +-
 sfx2/source/dialog/filedlghelper.cxx|   11 +--
 sfx2/source/doc/guisaveas.cxx   |  102 +++---
 3 files changed, 94 insertions(+), 21 deletions(-)

diff --git a/desktop/source/deployment/gui/dp_gui_dialog.src 
b/desktop/source/deployment/gui/dp_gui_dialog.src
index 12b6acb..28962fc 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog.src
+++ b/desktop/source/deployment/gui/dp_gui_dialog.src
@@ -1,4 +1,4 @@
-/*
+/*
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
diff --git a/sfx2/source/dialog/filedlghelper.cxx 
b/sfx2/source/dialog/filedlghelper.cxx
index 996e181..32cf0a1 100644
--- a/sfx2/source/dialog/filedlghelper.cxx
+++ b/sfx2/source/dialog/filedlghelper.cxx
@@ -1655,12 +1655,12 @@ OUString FileDialogHelper_Impl::getPath() const
 {
 OUString aPath;
 
-if ( mxFileDlg.is() )
+if ( mxFileDlg.is() ){
 aPath = mxFileDlg->getDisplayDirectory();
-
-if ( !aPath.getLength() )
+}
+if ( !aPath.getLength() ){
 aPath = maPath;
-
+}
 return aPath;
 }
 
@@ -2496,9 +2496,8 @@ void FileDialogHelper::SetTitle( const String& rNewTitle )
 String FileDialogHelper::GetPath() const
 {
 OUString aPath;
-
 if ( mpImp->mlLastURLs.size() > 0)
-return mpImp->mlLastURLs[0];
+aPath=mpImp->mlLastURLs[0];
 
 if ( mpImp->mxFileDlg.is() )
 {
diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
index 783d623..f09c2a4 100644
--- a/sfx2/source/doc/guisaveas.cxx
+++ b/sfx2/source/doc/guisaveas.cxx
@@ -77,6 +77,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -95,18 +96,18 @@
 #define DOCPROPSNUM 17
 
 // flags that specify requested operation
-#define EXPORT_REQUESTED   1
-#define PDFEXPORT_REQUESTED2
-#define PDFDIRECTEXPORT_REQUESTED  4
-#define WIDEEXPORT_REQUESTED   8
-#define SAVE_REQUESTED 16
-#define SAVEAS_REQUESTED   32
+#define EXPORT_REQUESTED1
+#define PDFEXPORT_REQUESTED 2
+#define PDFDIRECTEXPORT_REQUESTED   4
+#define WIDEEXPORT_REQUESTED8
+#define SAVE_REQUESTED  16
+#define SAVEAS_REQUESTED32
 
 // possible statuses of save operation
-#define STATUS_NO_ACTION   0
-#define STATUS_SAVE1
-#define STATUS_SAVEAS  2
-#define STATUS_SAVEAS_STANDARDNAME 3
+#define STATUS_NO_ACTION0
+#define STATUS_SAVE 1
+#define STATUS_SAVEAS   2
+#define STATUS_SAVEAS_STANDARDNAME  3
 
 const ::rtl::OUString 
aFilterNameString(RTL_CONSTASCII_USTRINGPARAM("FilterName"));
 const ::rtl::OUString 
aFilterOptionsString(RTL_CONSTASCII_USTRINGPARAM("FilterOptions"));
@@ -1013,7 +1014,37 @@ sal_Bool ModelData_Impl::OutputFileDialog( sal_Int8 
nStoreMode,
 GetMediaDescr() << aPropsFromDialog;
 
 // get the path from the dialog
-INetURLObject aURL( pFileDlg->GetPath() );
+String aPath(pFileDlg->GetPath());
+//we need to convert extension in case of PDFExport and IsAddStream is true
+FilterConfigItem 
aCfgItem(String(RTL_CONSTASCII_USTRINGPARAM("Office.Common/Filter/PDF/Export/")));
+sal_Bool 
bAddStream=aCfgItem.ReadBool(String(RTL_CONSTASCII_USTRINGPARAM("IsAddStream")),sal_False);
+if(bAddStream==sal_True){
+//get the begining of extension: len-3
+xub_StrLen nIndex=aPath.Len()-3;
+//modify extension to od*.pdf according to the filter type
+
if(aFilterName==::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("writer_pdf_Export"))){
+aPath.Replace(nIndex,3,String::CreateFromAscii("odt"));
+aPath+=String::CreateFromAscii(".pdf");
+}
+
if(aFilterName==::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("calc_pdf_Export"))){
+aPath.Replace(nIndex,3,String::CreateFromAscii("ods"));
+

Re: [Libreoffice] [Libreoffice-ux-advise] Fwd: [PATCH] Bug 39167

2011-08-05 Thread Jenei Gábor

Hello Yoshida,

Should the patch for the second version of the problem postponed? I am 
almost done with a patch that could do the job for extensions, I only 
have the problem that I have already mentioned yesterday. So, should I 
concentrate on another topic?


Thanks: Gabor

2011. 08. 05. 21:22 keltezéssel, Kohei Yoshida írta:

Hi Gerald,

First of all, thanks for introducing yourself on this list.  I've been
personally wondering who you were since you've filed several EasyHack
bugs and I never saw your name or your email address here before.

I'll leave the specific enhancement request discussion to the UX folks,
but let me address several of your expectations below.

On Fri, 2011-08-05 at 16:59 +0200, Gerald Leppert wrote:


Generally, my experience with enhancement requests in the LO bugzilla
(mine or requests from others) has been that there is currently very
little to no feed back, review, discussion or comments made to
enhancement requests. IMHO this situation is a bit sad and I hope that
this will be changing in the future.

Normally we don't respond to RFE's filed in bugzilla with enthusiasm
unless there is a sign that the proposer is willing to invest
development resources to help bring the RFE into fruition.  We already
receive an abundance of feature requests, and we simply don't have
resources to respond to each and every one of them.

So, I don't want you to have the expectation that, if you file an RFE,
someone else will magically pick it up and make it happen.  That's very
very rare.


Improvements to hybrid PDF: As mentioned in the bug 39168, the hybrid
PDF feature is one of the killer features in LibreOffice. However, its
implementation has some practical and usability problems out of those
most had been already raised in the OpenOffice.org bugzilla. However,
most of them can be easily improved in terms of usability and handling.
This was my intention of the three enhancement requests made to hybrid
PDFs (bug 39167, bug 39168, bug 39169) and I was glad that Gabor liked
the idea and took the initiative to start working on two of these easy
hacks.

Defending bug 39168: As described in the bug entry, the current file
ending "pdf" is suboptimal and hybrid PDFs need to be made more visible
to the user. In the current situation, the hybrid PDF feature is much
less useful than it could be and in many cases it is even
counterproductive (i.e. users who try to open 'real' PDF files in
LibreOffice assuming that they are hybrid PDFs.) There is indeed no hint
to the user what file actually is hybrid pdf. By the way, the file
ending ".pap.pdf" is exactly how it is handled in Papyrus
(www.papyrus.de) where the idea of hybrid PDFs was first implemented.
Marking bug 39168 as 'invalid' without adding any criticism or comment
to the bug entry itself is - in my opinion - inappropriate.

I personally don't object to your argument for the double extension, but
I'd like to leave it to the UX folks to decide what would be the good
design.

Having said that, I'm not pleased to see someone mis-using our EasyHack
system to inject his/her favorite features.  EasyHack is designed to
help new developers get a feel for our code base, and is supposed to be
easy enough and/or have someone willing to provide code pointers&
mentorship etc.  It is not designed for the end users to submit his or
her favorite pet peeves.  If you file one, you are basically signing up
to mentor for the implementation of that feature, either fully or
partially.

So, my question is, are you familiar enough with the code base to help
Jenei work on this?

Kohei



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


Re: [Libreoffice] [Libreoffice-ux-advise] Fwd: [PATCH] Bug 39167

2011-08-05 Thread Jenei Gábor
To be honest before I started minding with this problem I even didn't 
know what a HybridPDF could be, so probably it would be great to have 
some changes on this. And the most of Windows users who I know hate this 
function of windows, and it's among the first options that is turned of( 
even for me in case of fresh windows install). And actually our software 
is mostly used on Linux platforms, where there is no such option, and 
even in windows filecommanders like Windows Commander show the whole 
extension. And to avoid the further misunderstandings I recommend to 
review all the easyhacks before publishing.


2011. 08. 05. 18:41 keltezéssel, Joop Kiefte írta:

I agree with Gerald, and want to add that in Windows (where the
problem of hidden extensions plays) the difference is very clear
because of the icons. .odt.pdf files normally should have an icon of
acrobat or other pdf-software. In the case you link .odt.pdf
specifically with LibreOffice this is not the case any more, but as
well not relevant any more.

2011/8/5 Gerald Leppert:

Hi all,

I am using this opportunity to introduce myself. My name is Gerald and I am
working at the University of Cologne in Germany in social sciences and
economics. I have been intensively using LibreOffice (since 1995 in its
first incarnation as StarOffice) and I closely followed its development
since that time. After OpenOffice.org had been founded I started
contributing from the perspective of an end user or something you might call
a heavy user. Last year, I was very pleased that the product even turned
"libre" around an active developers and users community. So far, I
contributed to the wiki (user name "Gerald"), filed and interacted on some
dozen of bugs in the LO bugzilla, contributed the thesis templates in the OO
templates repository, contributed to the German spell check dictionary and
filed some enhancement requests in the LO bugzilla.

Coming to the point of enhancement requests: After LibreOffice's inception,
I started contributing to the fast growing EasyHacks wiki page. Quite soon
it was mentioned that it would be better and that it is planned to move all
easy hacks to the bugzilla. Hence, I subsequently transferred the easy
hacks, which I had entered, from the wiki to bugzilla. After that, I added
some obvious easy hacks directly to bugzilla.

Generally, my experience with enhancement requests in the LO bugzilla (mine
or requests from others) has been that there is currently very little to no
feed back, review, discussion or comments made to enhancement requests. IMHO
this situation is a bit sad and I hope that this will be changing in the
future.

Improvements to hybrid PDF: As mentioned in the bug 39168, the hybrid PDF
feature is one of the killer features in LibreOffice. However, its
implementation has some practical and usability problems out of those most
had been already raised in the OpenOffice.org bugzilla. However, most of
them can be easily improved in terms of usability and handling. This was my
intention of the three enhancement requests made to hybrid PDFs (bug 39167,
bug 39168, bug 39169) and I was glad that Gabor liked the idea and took the
initiative to start working on two of these easy hacks.

Defending bug 39168: As described in the bug entry, the current file ending
"pdf" is suboptimal and hybrid PDFs need to be made more visible to the
user. In the current situation, the hybrid PDF feature is much less useful
than it could be and in many cases it is even counterproductive (i.e. users
who try to open 'real' PDF files in LibreOffice assuming that they are
hybrid PDFs.) There is indeed no hint to the user what file actually is
hybrid pdf. By the way, the file ending ".pap.pdf" is exactly how it is
handled in Papyrus (www.papyrus.de) where the idea of hybrid PDFs was first
implemented. Marking bug 39168 as 'invalid' without adding any criticism or
comment to the bug entry itself is - in my opinion - inappropriate.

Best greetings,
Gerald


Am 05.08.2011 15:28, schrieb Kohei Yoshida:

On Fri, 2011-08-05 at 14:48 +0200, Andras Timar wrote:

Hi,

2011/8/4 Astron:

I am also not too keen on the ".pdf" file extension being changed to
".odf.pdf"—there will be enough users who still have the "hide known
file extensions" option of Windows on and thus will only see ".odf".
Additionally, two file extensions look awful.


The general problem is that everyone can open a bug in bugzilla and
mark it as easy hack, then someone comes and fix it, and it turns out
in the review phase that the original idea is not so bright. See
https://bugs.freedesktop.org/show_bug.cgi?id=39168
Do you think that fdo#39168 is invalid? Then we should close it as
invalid.

Yeah, I don't like the fact that someone who is not a known contributor
comes along and file an EasyHack even without a discussion on the
developer list.  We don't even know the name of glepp...@gmx.de the
reporter of this EasyHack and several others that I've seen.

To glepp...@gmx.de, could you introduce

[Libreoffice] [EasyHack] HybridPDF 2. strange problem

2011-08-04 Thread Jenei Gábor

Hello,

I have the following problem: In the present version we may export PDF 
by clicking on Export To PDF(or something like this) and Export, 
choosing PDF format and etc. The main difference between the two methods 
is the order of showing the dialogs. With the first method there isn't 
too many problems. But if I use the second method I give the filename 
before checking the HybridPDF(It only appears on PDF Filter dialog) so, 
I cannot decide in the moment of closing the export dialog wether a 
filename is correct(it does not exist yet) or not, so I even cannot warn 
the user if it was an exisiting file (in the EasyHack it's written to 
modify the filename when HybridPDF is checked). So, now should I make a 
later warn(when I already know the output filename), or should I simply 
eliminate Export/PDF filetype functionality? As I see one of these could 
be the only solution, but the first one seems to be better. Otherwise as 
for the original problem I am done with the correct name extension, so 
it could be almost patched except this little problem.


Thank you for your help in advance:

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


[Libreoffice] [PATCH] Bug 39167

2011-07-29 Thread Jenei Gábor
Hello,

Here is a patch for the above mentioned bug, for me it resolved the
issue on 3.5 main version in english, unfortunatelly I couldn't have it
done in other national versions. Please review it, and put it into the
main version if it's ok.

Gábor
>From 5a73827b9981c0481c7eaba6ece7042a9cd2f9e6 Mon Sep 17 00:00:00 2001
From: Gabor Jenei 
Date: Fri, 29 Jul 2011 11:54:57 +0200
Subject: [PATCH] this commit fixes (Bug 39167) in english version

---
 filter/source/pdf/impdialog.src |   41 +++
 1 files changed, 20 insertions(+), 21 deletions(-)

diff --git a/filter/source/pdf/impdialog.src b/filter/source/pdf/impdialog.src
index 1779b5f..3a1e385 100644
--- a/filter/source/pdf/impdialog.src
+++ b/filter/source/pdf/impdialog.src
@@ -1,5 +1,4 @@
-/*
- *
+ /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  * 
  * Copyright 2000, 2010 Oracle and/or its affiliates.
@@ -167,10 +166,18 @@ TabPage  RID_PDF_TAB_GENER
 Size = MAP_APPFONT ( 164 , 8 ) ;
 Text[ en-US ] = "General";
 };
+CheckBox CB_ADDSTREAM
+{
+HelpID = "filter:CheckBox:RID_PDF_TAB_GENER:CB_ADDSTREAM";
+Pos = MAP_APPFONT ( 188 , 30 ) ;
+Size = MAP_APPFONT ( 158 , 10 ) ;
+TabStop = TRUE ;
+Text[ en-US ] = "Create ~LibreOffice fully editable file";
+};
 CheckBox CB_PDFA_1B_SELECT
 {
 HelpID = "filter:CheckBox:RID_PDF_TAB_GENER:CB_PDFA_1B_SELECT";
-Pos = MAP_APPFONT ( 188, 14 ) ;
+Pos = MAP_APPFONT ( 188, 27 ) ;
 Size = MAP_APPFONT ( 158 , 10 ) ;
 TabStop = TRUE ;
 Text[ en-US ] = "P~DF/A-1a";
@@ -178,7 +185,7 @@ TabPage  RID_PDF_TAB_GENER
 CheckBox CB_TAGGEDPDF
 {
 HelpID = "filter:CheckBox:RID_PDF_TAB_GENER:CB_TAGGEDPDF";
-Pos = MAP_APPFONT ( 188 , 27 ) ;
+Pos = MAP_APPFONT ( 188 , 40 ) ;
 Size = MAP_APPFONT ( 158 , 10 ) ;
 TabStop = TRUE ;
 Text[ en-US ] = "~Tagged PDF";
@@ -186,14 +193,14 @@ TabPage  RID_PDF_TAB_GENER
 CheckBox CB_EXPORTFORMFIELDS
 {
 HelpID = "filter:CheckBox:RID_PDF_TAB_GENER:CB_EXPORTFORMFIELDS";
-Pos = MAP_APPFONT ( 188 , 40 ) ;
+Pos = MAP_APPFONT ( 188 , 54 ) ;
 Size = MAP_APPFONT ( 158 , 10 ) ;
 TabStop = TRUE ;
 Text[ en-US ] = "~Create PDF form";
 };
 FixedText FT_FORMSFORMAT
 {
-Pos = MAP_APPFONT ( 206 , 54 ) ;
+Pos = MAP_APPFONT ( 206 , 64 ) ;
 Size = MAP_APPFONT ( 93, 8 ) ;
 Text[ en-US ] = "Submit ~format";
 };
@@ -201,7 +208,7 @@ TabPage  RID_PDF_TAB_GENER
 {
 HelpID = "filter:ListBox:RID_PDF_TAB_GENER:LB_FORMSFORMAT";
 Border = TRUE ;
-Pos = MAP_APPFONT ( 302, 52 ) ;
+Pos = MAP_APPFONT ( 302, 62 ) ;
 Size = MAP_APPFONT ( 38, 48 ) ;
 DeltaLang = < Default ; Default ; Default ; Default ; > ;
 TabStop = TRUE ;
@@ -217,7 +224,7 @@ TabPage  RID_PDF_TAB_GENER
 CheckBox CB_ALLOWDUPLICATEFIELDNAMES
 {
 HelpID = "filter:CheckBox:RID_PDF_TAB_GENER:CB_ALLOWDUPLICATEFIELDNAMES";
-Pos = MAP_APPFONT( 206, 64 );
+Pos = MAP_APPFONT( 206, 76 );
 Size = MAP_APPFONT( 128, 10 );
 TabStop = TRUE;
 Text [ en-US ] = "Allow duplicate field ~names";
@@ -225,7 +232,7 @@ TabPage  RID_PDF_TAB_GENER
 CheckBox CB_EXPORTBOOKMARKS
 {
 HelpID = "filter:CheckBox:RID_PDF_TAB_GENER:CB_EXPORTBOOKMARKS";
-Pos = MAP_APPFONT ( 188 , 76 ) ;
+Pos = MAP_APPFONT ( 188 , 89 ) ;
 Size = MAP_APPFONT ( 158 , 10 ) ;
 TabStop = TRUE ;
 Text[ en-US ] = "Export ~bookmarks";
@@ -233,7 +240,7 @@ TabPage  RID_PDF_TAB_GENER
 CheckBox CB_EXPORTNOTES
 {
 HelpID = "filter:CheckBox:RID_PDF_TAB_GENER:CB_EXPORTNOTES";
-Pos = MAP_APPFONT ( 188 , 89 ) ;
+Pos = MAP_APPFONT ( 188 , 102 ) ;
 Size = MAP_APPFONT ( 158 , 10 ) ;
 TabStop = TRUE ;
 Text[ en-US ] = "~Export comments";
@@ -241,7 +248,7 @@ TabPage  RID_PDF_TAB_GENER
 CheckBox CB_EXPORTNOTESPAGES
 {
 HelpID = "filter:CheckBox:RID_PDF_TAB_GENER:CB_EXPORTNOTESPAGES";
-Pos = MAP_APPFONT ( 188 , 102 ) ;
+Pos = MAP_APPFONT ( 188 , 118 ) ;
 Size = MAP_APPFONT ( 158 , 10 ) ;
 TabStop = TRUE ;
 Text[ en-US ] = "Export ~notes pages";
@@ -249,7 +256,7 @@ TabPage  RID_PDF_TAB_GENER
 CheckBox CB_EXPORTEMPTYPAGES
 {
 HelpID = "filter:CheckBox:RID_PDF_TAB_GENER:CB_EXPORTEMPTYPAGES";
-Pos = MAP_APPFONT ( 188 , 115 ) ;
+Pos = MAP_APPFONT ( 188 , 125 ) ;
 Size = MAP_APPFONT ( 158 , 16 ) ;
 TabStop = TRUE ;
 WordBreak = TRUE ;
@@ -258,18 +265,10 @@ TabPage  RID_PDF_TAB_GENER
 CheckBox CB_EMBEDSTANDARDFONTS
 {
 HelpID = "filter:CheckBox:RID_PDF_TAB_GENER:CB_EMBEDSTANDARDFONTS";
-Pos = M

[Libreoffice] [EasyHack] Hybrid PDF improvement 1 and 2

2011-07-27 Thread Jenei Gábor
Hello,

Could you tell me if the first easyHack mentioned in the subject is
still alive? Because for me it seems to be already resolved in version
3.5(However in 3.4 it can be seen). And as for the second hack, could
someone tell me if it is alive? And where can I find the source code
that does PDF export? If the second one is alive I would try to resolve it.

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


[Libreoffice] [LibreOffice][EasyHack] Hybrid PDF improvement 1 and 2

2011-07-27 Thread Jenei Gábor

Hello,

Could you tell me if the first easyHack mentioned in the subject is
still alive? Because for me it seems to be already resolved in version
3.5(However in 3.4 it can be seen). And as for the second hack, could
someone tell me if it is alive? And where can I find the source code
that does PDF export? If the second one is alive I would try to resolve it.

Gabor Jenei

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